PageSourceSearch

https://app.clearnomics.com/assets/AuthRouter-CA13zl3P.js

js clearnomics.com collected 2026-10-06 13:57:29 UTC 2,330,394 bytes, 129 lines download raw bytes

1import{_ as Z,g as Zt,h as zl,a as _i,e as Me,b as Uo,p as Nt,c as wo,d as To,t as t5,f as Ud,i as Ct,r as y,j as Fr,k as Pn,l as Rt,m as Lr,n as le,o as lD,q as n,s as n5,u as r5,v as i5,w as a5,x as s5,T as o5,y as l5,z as c5,S as Dn,A as hj,C as d5,B as u5,P as h5,V as p5,D as Ne,E as Tn,F as f5,G as he,H as m5,I as g5,J as v5,K as b5,L as cD,M as dD,N as y5,O as x5,Q as j5,R as w5,U as S5,W as Ue,X as Ee,Y as Xn,Z as uD,$ as hD,a0 as pj,a1 as _5,a2 as gf,a3 as C5,a4 as N5,a5 as E5,a6 as T5,a7 as k5,a8 as P5,a9 as Ba,aa as dt,ab as nu,ac as Ip,ad as Br,ae as fj,af as pD,ag as ru,ah as I5,ai as D5,aj as R5,ak as Hl,al as O5,am as A5,an as mj,ao as M5,ap as $5,aq as L5,ar as F5,as as fD,at as U5,au as B5,av as q5,aw as V5,ax as z5,ay as H5,az as G5,aA as W5,aB as Y5,aC as K5,aD as ko,aE as $n,aF as mD,aG as Qt,aH as X5,aI as Q5,aJ as _n,aK as yS,aL as Z5,aM as J5,aN as e4,aO as t4,aP as n4,aQ as r4,aR as i4,aS as a4,aT as gD,aU as s4,aV as o4,aW as l4,aX as c4,aY as fs,aZ as d4,a_ as u4,a$ as h4,b0 as p4,b1 as gj,b2 as f4,b3 as Bo,b4 as m4,b5 as g4,b6 as v4,b7 as vD,b8 as b4,b9 as bD,ba as yD,bb as y4,bc as x4,bd as j4,be as w4,bf as S4,bg as _4,bh as C4,bi as N4,bj as E4,bk as T4,bl as xD,bm as k4,bn as jD,bo as P4,bp as I4,bq as D4,br as R4,bs as O4,bt as A4,bu as M4,bv as $4,bw as L4,bx as F4,by as U4,bz as B4,bA as q4,bB as V4,bC as z4,bD as H4,bE as G4,bF as W4,bG as Y4,bH as wD,bI as K4,bJ as X4,bK as Q4,bL as Z4,bM as J4,bN as e3,bO as t3,bP as n3,bQ as r3,bR as i3,bS as a3,bT as s3,bU as o3,bV as l3,bW as c3,bX as d3,bY as u3,bZ as h3,b_ as p3,b$ as f3,c0 as vj,c1 as SD,c2 as Pm,c3 as Mt,c4 as qs,c5 as _D,c6 as bj,c7 as CD,c8 as m3,c9 as g3,ca as v3,cb as b3,cc as y3,cd as x3,ce as j3,cf as w3,cg as yj,ch as xj,ci as S3,cj as _3,ck as C3,cl as Gl,cm as N3,cn as E3,co as T3,cp as k3,cq as P3,cr as I3,cs as D3,ct as Wl,cu as R3,cv as O3,cw as A3,cx as M3,cy as $3,cz as L3,cA as F3,cB as U3,cC as B3,cD as q3,cE as ND,cF as ED,cG as jj,cH as wj,cI as V3,cJ as xS,cK as z3,cL as vd,cM as as,cN as H3,cO as Ys,cP as Dp,cQ as Sj,cR as G3,cS as W3,cT as Y3,cU as K3,cV as X3,cW as Q3,cX as Z3,cY as J3,cZ as eU,c_ as tU,c$ as TD,d0 as nU,d1 as rU,d2 as iU,d3 as aU,d4 as sU,d5 as oU,d6 as lU,d7 as cU,d8 as dU,d9 as uU,da as hU,db as pU,dc as fU,dd as Ei,de as mU,df as _j,dg as gU,dh as vU,di as Yl,dj as bU,dk as yU,dl as Cj,dm as Nj,dn as xU,dp as jU,dq as wU,dr as SU,ds as _U,dt as CU,du as NU,dv as EU,dw as Im,dx as Ej,dy as Tj,dz as TU,dA as kU,dB as PU,dC as IU,dD as DU,dE as RU,dF as OU,dG as AU,dH as MU,dI as $U,dJ as LU,dK as FU,dL as UU,dM as BU,dN as jS,dO as qU,dP as VU,dQ as zU,dR as HU,dS as GU,dT as WU,dU as YU,dV as KU,dW as XU,dX as QU,dY as Mn,dZ as qa,d_ as kj,d$ as kD,e0 as Ti,e1 as ZU,e2 as JU,e3 as eB,e4 as tB,e5 as ri,e6 as PD,e7 as nB,e8 as rB,e9 as iB,ea as aB,eb as sB,ec as oB,ed as ID,ee as lB,ef as cB,eg as dB,eh as uB,ei as hB,ej as pB,ek as Ks,el as fB,em as qo,en as mB,eo as gB,ep as DD,eq as vB,er as RD,es as bB,et as yB,eu as xB,ev as OD,ew as AD,ex as jB,ey as wB,ez as SB,eA as _B,eB as CB,eC as NB,eD as EB,eE as TB,eF as kB,eG as PB,eH as IB,eI as DB,eJ as RB,eK as OB,eL as AB,eM as MB,eN as $B,eO as LB,eP as FB,eQ as UB,eR as BB,eS as qB,eT as VB,eU as zB,eV as HB,eW as GB,eX as WB,eY as YB,eZ as KB,e_ as XB,e$ as QB,f0 as ZB,f1 as JB,f2 as eq,f3 as on,f4 as Bn,f5 as tq,f6 as nq,f7 as rq,f8 as iq,f9 as aq,fa as sq,fb as oq,fc as lq,fd as cq,fe as dq,ff as uq,fg as hq,fh as pq,fi as fq,fj as mq,fk as gq,fl as vq,fm as bq,fn as yq,fo as xq,fp as MD,fq as jq,fr as wq,fs as Sq,ft as _q,fu as Cq,fv as Nq,fw as $D,fx as Eq,fy as ms,fz as Tq,fA as vf,fB as kq,fC as Pq,fD as Iq,fE as Xs,fF as Dq,fG as Rq,fH as Oq,fI as Aq,fJ as Mq,fK as Dm,fL as $q,fM as Pj,fN as Ij,fO as Lq,fP as LD,fQ as FD,fR as bf,fS as yf,fT as Fq,fU as Uq,fV as Bq,fW as qq,fX as Vq,fY as UD,fZ as zq,f_ as Hq,f$ as Gq,g0 as xf,g1 as Dj,g2 as jf,g3 as Wq,g4 as Yq,g5 as Kq,g6 as Xq,g7 as Qq,g8 as Zq,g9 as Jq,ga as e6,gb as t6,gc as n6,gd as r6,ge as i6,gf as a6,gg as s6,gh as o6,gi as l6,gj as c6,gk as d6,gl as u6,gm as h6,gn as p6,go as f6,gp as m6,gq as g6,gr as v6,gs as b6,gt as y6,gu as BD,gv as ki,gw as Rj,gx as Oj,gy as x6,gz as j6,gA as w6,gB as S6,gC as qD,gD as _6,gE as C6,gF as gc,gG as Aj,gH as Mj,gI as ti,gJ as $j,gK as Sl,gL as N6,gM as E6,gN as iu,gO as T6,gP as k6,gQ as P6,gR as I6,gS as D6,gT as R6,gU as O6,gV as A6,gW as M6,gX as $6,gY as L6,gZ as F6,g_ as U6,g$ as wS,h0 as SS,h1 as B6,h2 as wf,h3 as q6,h4 as V6,h5 as _S,h6 as z6,h7 as H6,h8 as G6,h9 as W6,ha as Y6,hb as Lj,hc as Rp,hd as K6,he as X6,hf as Q6,hg as Z6,hh as J6,hi as eV,hj as tV,hk as Kl,hl as yo,hm as nV,hn as CS,ho as rV}from"./index-CVinfSGW.js";function Gu(e){return e.charAt(0)==="/"}function Rm(e,t){for(var r=t,i=r+1,a=e.length;i<a;r+=1,i+=1)e[r]=e[i];e.pop()}function iV(e,t){t===void 0&&(t="");var r=e&&e.split("/")||[],i=t&&t.split("/")||[],a=e&&Gu(e),s=t&&Gu(t),o=a||s;if(e&&Gu(e)?i=r:r.length&&(i.pop(),i=i.concat(r)),!i.length)return"/";var l;if(i.length){var c=i[i.length-1];l=c==="."||c===".."||c===""}else l=!1;for(var h=0,u=i.length;u>=0;u--){var d=i[u];d==="."?Rm(i,u):d===".."?(Rm(i,u),h++):h&&(Rm(i,u),h--)}if(!o)for(;h--;h)i.unshift("..");o&&i[0]!==""&&(!i[0]||!Gu(i[0]))&&i.unshift("");var p=i.join("/");return l&&p.substr(-1)!=="/"&&(p+="/"),p}function NS(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}function pp(e,t){if(e===t)return!0;
1if(e==null||t==null)return!1;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every(function(a,s){return pp(a,t[s])});if(typeof e=="object"||typeof t=="object"){var r=NS(e),i=NS(t);return r!==e||i!==t?pp(r,i):Object.keys(Object.assign({},e,t)).every(function(a){return pp(e[a],t[a])})}return!1}var aV="Invariant failed";function wa(e,t){throw new Error(aV)}function kd(e){return e.charAt(0)==="/"?e:"/"+e}function ES(e){return e.charAt(0)==="/"?e.substr(1):e}function sV(e,t){return e.toLowerCase().indexOf(t.toLowerCase())===0&&"/?#".indexOf(e.charAt(t.length))!==-1}function VD(e,t){return sV(e,t)?e.substr(t.length):e}function zD(e){return e.charAt(e.length-1)==="/"?e.slice(0,-1):e}function oV(e){var t=e||"/",r="",i="",a=t.indexOf("#");a!==-1&&(i=t.substr(a),t=t.substr(0,a));var s=t.indexOf("?");return s!==-1&&(r=t.substr(s),t=t.substr(0,s)),{pathname:t,search:r==="?"?"":r,hash:i==="#"?"":i}}function bi(e){var t=e.pathname,r=e.search,i=e.hash,a=t||"/";return r&&r!=="?"&&(a+=r.charAt(0)==="?"?r:"?"+r),i&&i!=="#"&&(a+=i.charAt(0)==="#"?i:"#"+i),a}function hi(e,t,r,i){var a;typeof e=="string"?(a=oV(e),a.state=t):(a=Z({},e),a.pathname===void 0&&(a.pathname=""),a.search?a.search.charAt(0)!=="?"&&(a.search="?"+a.search):a.search="",a.hash?a.hash.charAt(0)!=="#"&&(a.hash="#"+a.hash):a.hash="",t!==void 0&&a.state===void 0&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return r&&(a.key=r),i?a.pathname?a.pathname.charAt(0)!=="/"&&(a.pathname=iV(a.pathname,i.pathname)):a.pathname=i.pathname:a.pathname||(a.pathname="/"),a}function lV(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&pp(e.state,t.state)}function Fj(){var e=null;function t(o){return e=o,function(){e===o&&(e=null)}}function r(o,l,c,h){if(e!=null){var u=typeof e=="function"?e(o,l):e;typeof u=="string"?typeof c=="function"?c(u,h):h(!0):h(u!==!1)}else h(!0)}var i=[];function a(o){var l=!0;function c(){l&&o.apply(void 0,arguments)}return i.push(c),function(){l=!1,i=i.filter(function(h){return h!==c})}}function s(){for(var o=arguments.length,l=new Array(o),c=0;c<o;c++)l[c]=arguments[c];i.forEach(function(h){return h.apply(void 0,l)})}return{setPrompt:t,confirmTransitionTo:r,appendListener:a,notifyListeners:s}}var HD=!!(typeof window<"u"&&window.document&&window.document.createElement);function GD(e,t){t(window.confirm(e))}function cV(){var e=window.navigator.userAgent;return(e.indexOf("Android 2.")!==-1||e.indexOf("Android 4.0")!==-1)&&e.indexOf("Mobile Safari")!==-1&&e.indexOf("Chrome")===-1&&e.indexOf("Windows Phone")===-1?!1:window.history&&"pushState"in window.history}function dV(){return window.navigator.userAgent.indexOf("Trident")===-1}function uV(){return window.navigator.userAgent.indexOf("Firefox")===-1}function hV(e){return e.state===void 0&&navigator.userAgent.indexOf("CriOS")===-1}var TS="popstate",kS="hashchange";function PS(){try{return window.history.state||{}}catch{return{}}}function pV(e){e===void 0&&(e={}),HD||wa();var t=window.history,r=cV(),i=!dV(),a=e,s=a.forceRefresh,o=s===void 0?!1:s,l=a.getUserConfirmation,c=l===void 0?GD:l,h=a.keyLength,u=h===void 0?6:h,d=e.basename?zD(kd(e.basename)):"";function p(L){var A=L||{},R=A.key,F=A.state,q=window.location,V=q.pathname,X=q.search,M=q.hash,W=V+X+M;return d&&(W=VD(W,d)),hi(W,F,R)}function f(){return Math.random().toString(36).substr(2,u)}var m=Fj();function g(L){Z(B,L),B.length=t.length,m.notifyListeners(B.location,B.action)}function x(L){hV(L)||j(p(L.state))}function v(){j(p(PS()))}var b=!1;function j(L){if(b)b=!1,g();else{var A="POP";m.confirmTransitionTo(L,A,c,function(R){R?g({action:A,location:L}):w(L)})}}function w(L){var A=B.location,R=_.indexOf(A.key);R===-1&&(R=0);var F=_.indexOf(L.key);F===-1&&(F=0);var q=R-F;q&&(b=!0,T(q))}var S=p(PS()),_=[S.key];function C(L){return d+bi(L)}function E(L,A){var R="PUSH",F=hi(L,A,f(),B.location);m.confirmTransitionTo(F,R,c,function(q){if(q){var V=C(F),X=F.key,M=F.state;if(r)if(t.pushState({key:X,state:M},null,V),o)window.location.href=V;else{var W=_.indexOf(B.location.key),K=_.slice(0,W+1);K.push(F.key),_=K,g({action:R,location:F})}else window.location.href=V}})}function P(L,A){var R="REPLACE",F=hi(L,A,f(),B.location);m.confirmTransitionTo(F,R,c,function(q){if(q){var V=C(F),X=F.key,M=F.state;if(r)if(t.replaceState({key:X,state:M},null,V),o)window.location.replace(V);else{var W=_.indexOf(B.location.key);W!==-1&&(_[W]=F.key),g({action:R,location:F})}else window.location.replace(V)}})}function T(L){t.go(L)}function N(){T(-1)}function k(){T(1)}var I=0;function D(L){I+=L,I===1&&L===1?(window.addEventListener(TS,x),i&&window.addEventListener(kS,v)):I===0&&(window.removeEventListener(TS,x),i&&window.removeEventListener(kS,v))}var O=!1;function $(L){L===void 0&&(L=!1);var A=m.setPrompt(L);return O||(D(1),O=!0),function(){return O&&(O=!1,D(-1)),A()}}function U(L){var A=m.appendListener(L);return D(1),function(){D(-1),A()}}var B={length:t.length,action:"POP",location:S,createHref:C,push:E,replace:P,go:T,goBack:N,goForward:k,block:$,listen:U};return B}var IS="hashchange",fV={hashbang:{encodePath:function(t){return t.charAt(0)==="!"?t:"
1!/"+ES(t)},decodePath:function(t){return t.charAt(0)==="!"?t.substr(1):t}},noslash:{encodePath:ES,decodePath:kd},slash:{encodePath:kd,decodePath:kd}};function WD(e){var t=e.indexOf("#");return t===-1?e:e.slice(0,t)}function vc(){var e=window.location.href,t=e.indexOf("#");return t===-1?"":e.substring(t+1)}function mV(e){window.location.hash=e}function Om(e){window.location.replace(WD(window.location.href)+"#"+e)}function gV(e){e===void 0&&(e={}),HD||wa();var t=window.history;uV();var r=e,i=r.getUserConfirmation,a=i===void 0?GD:i,s=r.hashType,o=s===void 0?"slash":s,l=e.basename?zD(kd(e.basename)):"",c=fV[o],h=c.encodePath,u=c.decodePath;function d(){var A=u(vc());return l&&(A=VD(A,l)),hi(A)}var p=Fj();function f(A){Z(L,A),L.length=t.length,p.notifyListeners(L.location,L.action)}var m=!1,g=null;function x(A,R){return A.pathname===R.pathname&&A.search===R.search&&A.hash===R.hash}function v(){var A=vc(),R=h(A);if(A!==R)Om(R);else{var F=d(),q=L.location;if(!m&&x(q,F)||g===bi(F))return;g=null,b(F)}}function b(A){if(m)m=!1,f();else{var R="POP";p.confirmTransitionTo(A,R,a,function(F){F?f({action:R,location:A}):j(A)})}}function j(A){var R=L.location,F=C.lastIndexOf(bi(R));F===-1&&(F=0);var q=C.lastIndexOf(bi(A));q===-1&&(q=0);var V=F-q;V&&(m=!0,N(V))}var w=vc(),S=h(w);w!==S&&Om(S);var _=d(),C=[bi(_)];function E(A){var R=document.querySelector("base"),F="";return R&&R.getAttribute("href")&&(F=WD(window.location.href)),F+"#"+h(l+bi(A))}function P(A,R){var F="PUSH",q=hi(A,void 0,void 0,L.location);p.confirmTransitionTo(q,F,a,function(V){if(V){var X=bi(q),M=h(l+X),W=vc()!==M;if(W){g=X,mV(M);var K=C.lastIndexOf(bi(L.location)),z=C.slice(0,K+1);z.push(X),C=z,f({action:F,location:q})}else f()}})}function T(A,R){var F="REPLACE",q=hi(A,void 0,void 0,L.location);p.confirmTransitionTo(q,F,a,function(V){if(V){var X=bi(q),M=h(l+X),W=vc()!==M;W&&(g=X,Om(M));var K=C.indexOf(bi(L.location));K!==-1&&(C[K]=X),f({action:F,location:q})}})}function N(A){t.go(A)}function k(){N(-1)}function I(){N(1)}var D=0;function O(A){D+=A,D===1&&A===1?window.addEventListener(IS,v):D===0&&window.removeEventListener(IS,v)}var $=!1;function U(A){A===void 0&&(A=!1);var R=p.setPrompt(A);return $||(O(1),$=!0),function(){return $&&($=!1,O(-1)),R()}}function B(A){var R=p.appendListener(A);return O(1),function(){O(-1),R()}}var L={length:t.length,action:"POP",location:_,createHref:E,push:P,replace:T,go:N,goBack:k,goForward:I,block:U,listen:B};return L}function DS(e,t,r){return Math.min(Math.max(e,t),r)}function vV(e){e===void 0&&(e={});var t=e,r=t.getUserConfirmation,i=t.initialEntries,a=i===void 0?["/"]:i,s=t.initialIndex,o=s===void 0?0:s,l=t.keyLength,c=l===void 0?6:l,h=Fj();function u(E){Z(C,E),C.length=C.entries.length,h.notifyListeners(C.location,C.action)}function d(){return Math.random().toString(36).substr(2,c)}var p=DS(o,0,a.length-1),f=a.map(function(E){return typeof E=="string"?hi(E,void 0,d()):hi(E,void 0,E.key||d())}),m=bi;function g(E,P){var T="PUSH",N=hi(E,P,d(),C.location);h.confirmTransitionTo(N,T,r,function(k){if(k){var I=C.index,D=I+1,O=C.entries.slice(0);O.length>D?O.splice(D,O.length-D,N):O.push(N),u({action:T,location:N,index:D,entries:O})}})}function x(E,P){var T="REPLACE",N=hi(E,P,d(),C.location);h.confirmTransitionTo(N,T,r,function(k){k&&(C.entries[C.index]=N,u({action:T,location:N}))})}function v(E){var P=DS(C.index+E,0,C.entries.length-1),T="POP",N=C.entries[P];h.confirmTransitionTo(N,T,r,function(k){k?u({action:T,location:N,index:P}):u()})}function b(){v(-1)}function j(){v(1)}function w(E){var P=C.index+E;return P>=0&&P<C.entries.length}function S(E){return E===void 0&&(E=!1),h.setPrompt(E)}function _(E){return h.appendListener(E)}var C={length:f.length,action:"POP",location:f[p],index:p,entries:f,createHref:m,push:g,replace:x,go:v,goBack:b,goForward:j,canGo:w,block:S,listen:_};return C}var lo={exports:{}},Am,RS;function bV(){return RS||(RS=1,Am=Array.isArray||function(e){return Object.prototype.toString.call(e)=="[object Array]"}),Am}var OS;function yV(){if(OS)return lo.exports;OS=1;var e=bV();lo.exports=x,lo.exports.parse=r,lo.exports.compile=a,lo.exports.tokensToFunction=l,lo.exports.tokensToRegExp=g;var t=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function r(v,b){for(var j=[],w=0,S=0,_="",C=b&&b.delimiter||"/",E;(E=t.exec(v))!=null;){var P=E[0],T=E[1],N=E.index;if(_+=v.slice(S,N),S=N+P.length,T){_+=T[1];continue}var k=v[S],I=E[2],D=E[3],O=E[4],$=E[5],U=E[6],B=E[7];_&&(j.push(_),_="");var L=I!=null&&k!=null&&k!==I,A=U==="+"||U==="*",R=U==="?"||U==="*",F=I||C,q=O||$,V=I||(typeof j[j.length-1]=="string"?j[j.length-1]:"");j.push({name:D||w++,prefix:I||"",delimiter:F,optional:R,repeat:A,partial:L,asterisk:!!B,pattern:q?h(q):B?".*":i(F,V)})}return S<v.length&&(_+=v.substr(S)),_&&j.push(_),j}function i(v,b){return!b||b.indexOf(v)>-1?"[^"+c(v)+"]+?":c(b)+"|(?:(?!"+c(b)+")[^"+c(v)+"])+?"}function a(v,b){return l(r(v,b),b)}function s(v){return encodeURI(v).replace(/[\/?#]/g,function(b){return"%"+b.charCodeAt(0).toString(16).toUpperCase()})}function o(v){return encodeURI(v).replace(/[?#]/g,function(b){return"%"+b.charCodeAt(0).toString(16).toUpperCase()})}function l(v,b){for(var j=new Array(v.length),w=0;w<v.length;w++)typeof v[w]=="object"&&(j[w]=new RegExp("^(?:"+v[w].pattern+")$",d(b)));return function(S,_){for(var C="",E=S||{},P=_||{},T=P.pretty?s:encodeURIComponent,N=0;N<v.length;N++){var k=v[N];if(typeof k=="string"){C+=k;continue}var I=E[k.name],D;if(I==null)if(k.optional){k.partial&&(C+=k.prefix);continue}else throw new TypeError('Expected "'+k.name+'" to be defined');if(e(I)){if(!k.repeat)throw new TypeError('Expected "'+k.name+'" to not repeat, but received `'+JSON.stringify(I)+"`");if(I.length===0){if(k.optional)continue;throw new TypeError('Expected "'+k.name+'" to not be empty')}for(var O=0;O<I.length;O++){if(D=T(I[O]),!j[N].test(D))throw new TypeError('Expected all "'+k.name+'" to match "'+k.pattern+'", but received `'+JSON.stringify(D)+"`");C+=(O===0?k.prefix:k.delimiter)+D}continue}if(D=k.asterisk?o(I):T(I),!j[N].test(D))throw new TypeError('Expected "'+k.name+'" to match "'+k.pattern+'", but received "'+D+'"');C+=k.prefix+D}return C}}function c(v){return v.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function h(v){return v.replace(/([=!:$\/()])/g,"\\$1")}function u(v,b){return v.keys=b,v}function d(v){return v&&v.sensitive?"":"i"}function p(v,b){var j=v.source.match(/\((?!\?)/g);if(j)for(var w=0;w<j.length;w++)b.push({name:w,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return u(v,b)}function f(v,b,j){for(var w=[],S=0;S<v.length;S++)w.push(x(v[S],b,j).source);var _=new RegExp("(?:"+w.join("|")+")",d(j));return u(_,b)}function m(v,b,j){return g(r(v,j),b,j)}function g(v,b,j){e(b)||(j=b||j,b=[]),j=j||{};for(var w=j.strict,S=j.end!==!1,_="",C=0;C<v.length;C++){var E=v[C];if(typeof E=="string")_+=c(E);else{var P=c(E.prefix),T="(?:"+E.pattern+")";b.push(E),E.repeat&&(T+="(?:"+P+T+")*"),E.optional?E.partial?T=P+"("+T+")?":T="(?:"+P+"("+T+"))?":T=P+"("+T+")",_+=T}}var N=c(j.delimiter||"/"),k=_.slice(-N.length)===N;return w||(_=(k?_.slice(0,-N.length):_)+"(?:"+N+"(?=$))?"),S?_+="$":_+=w&&k?"":"(?="+N+"|$)",u(new RegExp("^"+_,d(j)),b)}function x(v,b,j){return e(b)||(j=b||j,b=[]),j=j||{},v instanceof RegExp?p(v,b):e(v)?f(v,b,j):m(v,b,j)}return lo.exports}var xV=yV();const YD=Zt(xV);var Mm={exports:{}},In={};var AS;function jV(){if(AS)return In;AS=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,h=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function j(S){if(typeof S=="object"&&S!==null){var _=S.$$typeof;switch(_){case t:switch(S=S.type,S){case c:case h:case i:case s:case a:case d:return S;
1default:switch(S=S&&S.$$typeof,S){case l:case u:case m:case f:case o:return S;default:return _}}case r:return _}}}function w(S){return j(S)===h}return In.AsyncMode=c,In.ConcurrentMode=h,In.ContextConsumer=l,In.ContextProvider=o,In.Element=t,In.ForwardRef=u,In.Fragment=i,In.Lazy=m,In.Memo=f,In.Portal=r,In.Profiler=s,In.StrictMode=a,In.Suspense=d,In.isAsyncMode=function(S){return w(S)||j(S)===c},In.isConcurrentMode=w,In.isContextConsumer=function(S){return j(S)===l},In.isContextProvider=function(S){return j(S)===o},In.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},In.isForwardRef=function(S){return j(S)===u},In.isFragment=function(S){return j(S)===i},In.isLazy=function(S){return j(S)===m},In.isMemo=function(S){return j(S)===f},In.isPortal=function(S){return j(S)===r},In.isProfiler=function(S){return j(S)===s},In.isStrictMode=function(S){return j(S)===a},In.isSuspense=function(S){return j(S)===d},In.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===i||S===h||S===s||S===a||S===d||S===p||typeof S=="object"&&S!==null&&(S.$$typeof===m||S.$$typeof===f||S.$$typeof===o||S.$$typeof===l||S.$$typeof===u||S.$$typeof===x||S.$$typeof===v||S.$$typeof===b||S.$$typeof===g)},In.typeOf=j,In}var MS;function wV(){return MS||(MS=1,Mm.exports=jV()),Mm.exports}wV();var $m=1073741823,$S=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof wo<"u"?wo:{};function SV(){var e="__global_unique_id__";return $S[e]=($S[e]||0)+1}function _V(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function CV(e){var t=[];return{on:function(i){t.push(i)},off:function(i){t=t.filter(function(a){return a!==i})},get:function(){return e},set:function(i,a){e=i,t.forEach(function(s){return s(e,a)})}}}function NV(e){return Array.isArray(e)?e[0]:e}function EV(e,t){var r,i,a="__create-react-context-"+SV()+"__",s=(function(l){_i(c,l);function c(){for(var u,d=arguments.length,p=new Array(d),f=0;f<d;f++)p[f]=arguments[f];return u=l.call.apply(l,[this].concat(p))||this,u.emitter=CV(u.props.value),u}var h=c.prototype;return h.getChildContext=function(){var d;return d={},d[a]=this.emitter,d},h.componentWillReceiveProps=function(d){if(this.props.value!==d.value){var p=this.props.value,f=d.value,m;_V(p,f)?m=0:(m=typeof t=="function"?t(p,f):$m,m|=0,m!==0&&this.emitter.set(d.value,m))}},h.render=function(){return this.props.children},c})(Me.Component);s.childContextTypes=(r={},r[a]=Nt.object.isRequired,r);var o=(function(l){_i(c,l);function c(){for(var u,d=arguments.length,p=new Array(d),f=0;f<d;f++)p[f]=arguments[f];return u=l.call.apply(l,[this].concat(p))||this,u.observedBits=void 0,u.state={value:u.getValue()},u.onUpdate=function(m,g){var x=u.observedBits|0;(x&g)!==0&&u.setState({value:u.getValue()})},u}var h=c.prototype;return h.componentWillReceiveProps=function(d){var p=d.observedBits;this.observedBits=p??$m},h.componentDidMount=function(){this.context[a]&&this.context[a].on(this.onUpdate);var d=this.props.observedBits;this.observedBits=d??$m},h.componentWillUnmount=function(){this.context[a]&&this.context[a].off(this.onUpdate)},h.getValue=function(){return this.context[a]?this.context[a].get():e},h.render=function(){return NV(this.props.children)(this.state.value)},c})(Me.Component);return o.contextTypes=(i={},i[a]=Nt.object,i),{Provider:s,Consumer:o}}var TV=Me.createContext||EV,KD=function(t){var r=TV();return r.displayName=t,r},XD=KD("Router-History"),Aa=KD("Router"),Sf=(function(e){_i(t,e),t.computeRootMatch=function(a){return{path:"/",url:"/",params:{},isExact:a==="/"}};function t(i){var a;return a=e.call(this,i)||this,a.state={location:i.history.location},a._isMounted=!1,a._pendingLocation=null,i.staticContext||(a.unlisten=i.history.listen(function(s){a._pendingLocation=s})),a}var r=t.prototype;return r.componentDidMount=function(){var a=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen(function(s){a._isMounted&&a.setState({location:s})})),this._pendingLocation&&this.setState({location:this._pendingLocation})},r.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},r.render=function(){return Me.createElement(Aa.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},Me.createElement(XD.Provider,{children:this.props.children||null,value:this.props.history}))},t})(Me.Component);Me.Component;var QD=(function(e){_i(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;return r.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},r.componentDidUpdate=function(a){this.props.onUpdate&&this.props.onUpdate.call(this,this,a)},r.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},r.render=function(){return null},t})(Me.Component);function kV(e){var t=e.message,r=e.when,i=r===void 0?!0:r;
1return Me.createElement(Aa.Consumer,null,function(a){if(a||wa(),!i||a.staticContext)return null;var s=a.history.block;return Me.createElement(QD,{onMount:function(l){l.release=s(t)},onUpdate:function(l,c){c.message!==t&&(l.release(),l.release=s(t))},onUnmount:function(l){l.release()},message:t})})}var Lm={},PV=1e4,LS=0;function IV(e){if(Lm[e])return Lm[e];var t=YD.compile(e);return LS<PV&&(Lm[e]=t,LS++),t}function FS(e,t){return e===void 0&&(e="/"),t===void 0&&(t={}),e==="/"?e:IV(e)(t,{pretty:!0})}function qt(e){var t=e.computedMatch,r=e.to,i=e.push,a=i===void 0?!1:i;return Me.createElement(Aa.Consumer,null,function(s){s||wa();var o=s.history,l=s.staticContext,c=a?o.push:o.replace,h=hi(t?typeof r=="string"?FS(r,t.params):Z({},r,{pathname:FS(r.pathname,t.params)}):r);return l?(c(h),null):Me.createElement(QD,{onMount:function(){c(h)},onUpdate:function(d,p){var f=hi(p.to);lV(f,Z({},h,{key:f.key}))||c(h)},to:r})})}var US={},DV=1e4,BS=0;function RV(e,t){var r=""+t.end+t.strict+t.sensitive,i=US[r]||(US[r]={});if(i[e])return i[e];var a=[],s=YD(e,a,t),o={regexp:s,keys:a};return BS<DV&&(i[e]=o,BS++),o}function Uj(e,t){t===void 0&&(t={}),(typeof t=="string"||Array.isArray(t))&&(t={path:t});var r=t,i=r.path,a=r.exact,s=a===void 0?!1:a,o=r.strict,l=o===void 0?!1:o,c=r.sensitive,h=c===void 0?!1:c,u=[].concat(i);return u.reduce(function(d,p){if(!p&&p!=="")return null;if(d)return d;var f=RV(p,{end:s,strict:l,sensitive:h}),m=f.regexp,g=f.keys,x=m.exec(e);if(!x)return null;var v=x[0],b=x.slice(1),j=e===v;return s&&!j?null:{path:p,url:p==="/"&&v===""?"/":v,isExact:j,params:g.reduce(function(w,S,_){return w[S.name]=b[_],w},{})}},null)}function OV(e){return Me.Children.count(e)===0}var jn=(function(e){_i(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;return r.render=function(){var a=this;return Me.createElement(Aa.Consumer,null,function(s){s||wa();var o=a.props.location||s.location,l=a.props.computedMatch?a.props.computedMatch:a.props.path?Uj(o.pathname,a.props):s.match,c=Z({},s,{location:o,match:l}),h=a.props,u=h.children,d=h.component,p=h.render;return Array.isArray(u)&&OV(u)&&(u=null),Me.createElement(Aa.Provider,{value:c},c.match?u?typeof u=="function"?u(c):u:d?Me.createElement(d,c):p?p(c):null:typeof u=="function"?u(c):null)})},t})(Me.Component);function Bj(e){return e.charAt(0)==="/"?e:"/"+e}function AV(e,t){return e?Z({},t,{pathname:Bj(e)+t.pathname}):t}function MV(e,t){if(!e)return t;var r=Bj(e);return t.pathname.indexOf(r)!==0?t:Z({},t,{pathname:t.pathname.substr(r.length)})}function qS(e){return typeof e=="string"?e:bi(e)}function Fm(e){return function(){wa()}}function VS(){}Me.Component;var us=(function(e){_i(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;return r.render=function(){var a=this;return Me.createElement(Aa.Consumer,null,function(s){s||wa();var o=a.props.location||s.location,l,c;return Me.Children.forEach(a.props.children,function(h){if(c==null&&Me.isValidElement(h)){l=h;var u=h.props.path||h.props.from;c=u?Uj(o.pathname,Z({},h.props,{path:u})):s.match}}),c?Me.cloneElement(l,{location:o,computedMatch:c}):null})},t})(Me.Component);function Jt(e){var t="withRouter("+(e.displayName||e.name)+")",r=function(a){var s=a.wrappedComponentRef,o=Uo(a,["wrappedComponentRef"]);return Me.createElement(Aa.Consumer,null,function(l){return l||wa(),Me.createElement(e,Z({},o,l,{ref:s}))})};return r.displayName=t,r.WrappedComponent=e,zl(r,e)}var ZD=Me.useContext;function oa(){return ZD(XD)}function qj(){return ZD(Aa).location}var $V=(function(e){_i(t,e);function t(){for(var i,a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];return i=e.call.apply(e,[this].concat(s))||this,i.history=pV(i.props),i}var r=t.prototype;return r.render=function(){return Me.createElement(Sf,{history:this.history,children:this.props.children})},t})(Me.Component);Me.Component;var rx=function(t,r){return typeof t=="function"?t(r):t},ix=function(t,r){return typeof t=="string"?hi(t,null,null,r):t},Vj=function(t){return t},Dl=Me.forwardRef;typeof Dl>"u"&&(Dl=Vj);function LV(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var FV=Dl(function(e,t){var r=e.innerRef,i=e.navigate,a=e.onClick,s=Uo(e,["innerRef","navigate","onClick"]),o=s.target,l=Z({},s,{onClick:function(h){try{a&&a(h)}catch(u){throw h.preventDefault(),u}!h.defaultPrevented&&h.button===0&&(!o||o==="_self")&&!LV(h)&&(h.preventDefault(),i())}});return Vj!==Dl?l.ref=t||r:l.ref=r,Me.createElement("a",l)}),Ze=Dl(function(e,t){var r=e.component,i=r===void 0?FV:r,a=e.replace,s=e.to,o=e.innerRef,l=Uo(e,["component","replace","to","innerRef"]);return Me.createElement(Aa.Consumer,null,function(c){c||wa();var h=c.history,u=ix(rx(s,c.location),c.location),d=u?h.createHref(u):"",p=Z({},l,{href:d,navigate:function(){var m=rx(s,c.location),g=bi(c.location)===bi(ix(m)),x=a||g?h.replace:h.push;x(m)}});return Vj!==Dl?p.ref=t||o:p.innerRef=o,Me.createElement(i,p)})}),JD=function(t){return t},Op=Me.forwardRef;typeof Op>"u"&&(Op=JD);function UV(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter(function(i){return i}).join(" ")}Op(function(e,t){var r=e["aria-current"],i=r===void 0?"page":r,a=e.activeClassName,s=a===void 0?"active":a,o=e.activeStyle,l=e.className,c=e.exact,h=e.isActive,u=e.location,d=e.sensitive,p=e.strict,f=e.style,m=e.to,g=e.innerRef,x=Uo(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return Me.createElement(Aa.Consumer,null,function(v){v||wa();var b=u||v.location,j=ix(rx(m,b),b),w=j.pathname,S=w&&w.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),_=S?Uj(b.pathname,{path:S,exact:c,sensitive:d,strict:p}):null,C=!!(h?h(_,b):_),E=typeof l=="function"?l(C):l,P=typeof f=="function"?f(C):f;C&&(E=UV(E,s),P=Z({},P,o));var T=Z({"aria-current":C&&i||null,className:E,style:P,to:j},x);return JD!==Op?T.ref=t||g:T.innerRef=g,Me.createElement(Ze,T)})});var bc={},Um={exports:{}},zS;
1function vn(){return zS||(zS=1,(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Um)),Um.exports}var Bm={exports:{}},qm={exports:{}},HS;function BV(){return HS||(HS=1,(function(e){function t(r){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(qm)),qm.exports}var GS;function bn(){return GS||(GS=1,(function(e){var t=BV().default;function r(i,a){if(typeof WeakMap=="function")var s=new WeakMap,o=new WeakMap;return(e.exports=r=function(c,h){if(!h&&c&&c.__esModule)return c;var u,d,p={__proto__:null,default:c};if(c===null||t(c)!="object"&&typeof c!="function")return p;if(u=h?o:s){if(u.has(c))return u.get(c);u.set(c,p)}for(var f in c)f!=="default"&&{}.hasOwnProperty.call(c,f)&&((d=(u=Object.defineProperty)&&Object.getOwnPropertyDescriptor(c,f))&&(d.get||d.set)?u(p,f,d):p[f]=c[f]);return p},e.exports.__esModule=!0,e.exports.default=e.exports)(i,a)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Bm)),Bm.exports}var Vm={};function zm(e){return e&&To(e)==="object"&&e.constructor===Object}function hs(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{clone:!0},i=r.clone?Z({},e):e;return zm(e)&&zm(t)&&Object.keys(t).forEach(function(a){a!=="__proto__"&&(zm(t[a])&&a in e?i[a]=hs(e[a],t[a],r):i[a]=t[a])}),i}function Po(e){for(var t="https://mui.com/production-error/?code="+e,r=1;r<arguments.length;r+=1)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified Material-UI error #"+e+"; visit "+t+" for the full message."}function ut(e){if(typeof e!="string")throw new Error(Po(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Ma(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.reduce(function(i,a){return a==null?i:function(){for(var o=arguments.length,l=new Array(o),c=0;c<o;c++)l[c]=arguments[c];i.apply(this,l),a.apply(this,l)}},function(){})}function Be(e,t){if(e==null)return{};var r,i,a=Uo(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function eR(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=eR(e[t]))&&(i&&(i+=" "),i+=r);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function $e(){for(var e,t,r=0,i="";r<arguments.length;)(e=arguments[r++])&&(t=eR(e))&&(i&&(i+=" "),i+=t);return i}var qV=typeof Symbol=="function"&&Symbol.for;const tR=qV?Symbol.for("mui.nested"):"__THEME_NESTED__";var VV=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function _f(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.disableGlobal,r=t===void 0?!1:t,i=e.productionPrefix,a=i===void 0?"jss":i,s=e.seed,o=s===void 0?"":s,l=o===""?"":"".concat(o,"-"),c=0,h=function(){return c+=1,c};return function(u,d){var p=d.options.name;if(p&&p.indexOf("Mui")===0&&!d.options.link&&!r){if(VV.indexOf(u.key)!==-1)return"Mui-".concat(u.key);var f="".concat(l).concat(p,"-").concat(u.key);return!d.options.theme[tR]||o!==""?f:"".concat(f,"-").concat(h())}return"".concat(l).concat(a).concat(h())}}function au(e){var t=e.theme,r=e.name,i=e.props;if(!t||!t.props||!t.props[r])return i;var a=t.props[r],s;for(s in a)i[s]===void 0&&(i[s]=a[s]);return i}var WS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},su=(typeof window>"u"?"undefined":WS(window))==="object"&&(typeof document>"u"?"undefined":WS(document))==="object"&&document.nodeType===9;function zV(e,t){for(var r=0;r<t.length;r++){var i=t[r];
1i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,t5(i.key),i)}}function Pi(e,t,r){return t&&zV(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var HV={}.constructor;function ax(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(ax);if(e.constructor!==HV)return e;var t={};for(var r in e)t[r]=ax(e[r]);return t}function zj(e,t,r){e===void 0&&(e="unnamed");var i=r.jss,a=ax(t),s=i.plugins.onCreateRule(e,a,r);return s||(e[0],null)}var YS=function(t,r){for(var i="",a=0;a<t.length&&t[a]!=="!important";a++)i&&(i+=r),i+=t[a];return i},Co=function(t){if(!Array.isArray(t))return t;var r="";if(Array.isArray(t[0]))for(var i=0;i<t.length&&t[i]!=="!important";i++)r&&(r+=", "),r+=YS(t[i]," ");else r=YS(t,", ");return t[t.length-1]==="!important"&&(r+=" !important"),r};function Xl(e){return e&&e.format===!1?{linebreak:"",space:""}:{linebreak:`
2`,space:" "}}function yc(e,t){for(var r="",i=0;i<t;i++)r+="  ";return r+e}function Bd(e,t,r){r===void 0&&(r={});var i="";if(!t)return i;var a=r,s=a.indent,o=s===void 0?0:s,l=t.fallbacks;r.format===!1&&(o=-1/0);var c=Xl(r),h=c.linebreak,u=c.space;if(e&&o++,l)if(Array.isArray(l))for(var d=0;d<l.length;d++){var p=l[d];for(var f in p){var m=p[f];m!=null&&(i&&(i+=h),i+=yc(f+":"+u+Co(m)+";",o))}}else for(var g in l){var x=l[g];x!=null&&(i&&(i+=h),i+=yc(g+":"+u+Co(x)+";",o))}for(var v in t){var b=t[v];b!=null&&v!=="fallbacks"&&(i&&(i+=h),i+=yc(v+":"+u+Co(b)+";",o))}return!i&&!r.allowEmpty||!e?i:(o--,i&&(i=""+h+i+h),yc(""+e+u+"{"+i,o)+yc("}",o))}var GV=/([[\].#*$><+~=|^:(),"'`\s])/g,KS=typeof CSS<"u"&&CSS.escape,Hj=(function(e){return KS?KS(e):e.replace(GV,"\\$1")}),nR=(function(){function e(r,i,a){this.type="style",this.isProcessed=!1;var s=a.sheet,o=a.Renderer;this.key=r,this.options=a,this.style=i,s?this.renderer=s.renderer:o&&(this.renderer=new o)}var t=e.prototype;return t.prop=function(i,a,s){if(a===void 0)return this.style[i];var o=s?s.force:!1;if(!o&&this.style[i]===a)return this;var l=a;(!s||s.process!==!1)&&(l=this.options.jss.plugins.onChangeValue(a,i,this));var c=l==null||l===!1,h=i in this.style;if(c&&!h&&!o)return this;var u=c&&h;if(u?delete this.style[i]:this.style[i]=l,this.renderable&&this.renderer)return u?this.renderer.removeProperty(this.renderable,i):this.renderer.setProperty(this.renderable,i,l),this;var d=this.options.sheet;return d&&d.attached,this},e})(),sx=(function(e){_i(t,e);function t(i,a,s){var o;o=e.call(this,i,a,s)||this;var l=s.selector,c=s.scoped,h=s.sheet,u=s.generateId;return l?o.selectorText=l:c!==!1&&(o.id=u(Ud(Ud(o)),h),o.selectorText="."+Hj(o.id)),o}var r=t.prototype;return r.applyTo=function(a){var s=this.renderer;if(s){var o=this.toJSON();for(var l in o)s.setProperty(a,l,o[l])}return this},r.toJSON=function(){var a={};for(var s in this.style){var o=this.style[s];typeof o!="object"?a[s]=o:Array.isArray(o)&&(a[s]=Co(o))}return a},r.toString=function(a){var s=this.options.sheet,o=s?s.options.link:!1,l=o?Z({},a,{allowEmpty:!0}):a;return Bd(this.selectorText,this.style,l)},Pi(t,[{key:"selector",set:function(a){if(a!==this.selectorText){this.selectorText=a;var s=this.renderer,o=this.renderable;if(!(!o||!s)){var l=s.setSelector(o,a);l||s.replaceRule(o,this)}}},get:function(){return this.selectorText}}]),t})(nR),WV={onCreateRule:function(t,r,i){return t[0]==="@"||i.parent&&i.parent.type==="keyframes"?null:new sx(t,r,i)}},Hm={indent:1,children:!0},YV=/@([\w-]+)/,KV=(function(){function e(r,i,a){this.type="conditional",this.isProcessed=!1,this.key=r;var s=r.match(YV);this.at=s?s[1]:"unknown",this.query=a.name||"@"+this.at,this.options=a,this.rules=new Cf(Z({},a,{parent:this}));for(var o in i)this.rules.add(o,i[o]);this.rules.process()}var t=e.prototype;return t.getRule=function(i){return this.rules.get(i)},t.indexOf=function(i){return this.rules.indexOf(i)},t.addRule=function(i,a,s){var o=this.rules.add(i,a,s);return o?(this.options.jss.plugins.onProcessRule(o),o):null},t.replaceRule=function(i,a,s){var o=this.rules.replace(i,a,s);return o&&this.options.jss.plugins.onProcessRule(o),o},t.toString=function(i){i===void 0&&(i=Hm);var a=Xl(i),s=a.linebreak;if(i.indent==null&&(i.indent=Hm.indent),i.children==null&&(i.children=Hm.children),i.children===!1)return this.query+" {}";var o=this.rules.toString(i);return o?this.query+" {"+s+o+s+"}":""},e})(),XV=/@container|@media|@supports\s+/,QV={onCreateRule:function(t,r,i){return XV.test(t)?new KV(t,r,i):null}},Gm={indent:1,children:!0},ZV=/@keyframes\s+([\w-]+)/,ox=(function(){function e(r,i,a){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var s=r.match(ZV);s&&s[1]?this.name=s[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=a;var o=a.scoped,l=a.sheet,c=a.generateId;this.id=o===!1?this.name:Hj(c(this,l)),this.rules=new Cf(Z({},a,{parent:this}));for(var h in i)this.rules.add(h,i[h],Z({},a,{parent:this}));this.rules.process()}var t=e.prototype;return t.toString=function(i){i===void 0&&(i=Gm);var a=Xl(i),s=a.linebreak;if(i.indent==null&&(i.indent=Gm.indent),i.children==null&&(i.children=Gm.children),i.children===!1)return this.at+" "+this.id+" {}";var o=this.rules.toString(i);return o&&(o=""+s+o+s),this.at+" "+this.id+" {"+o+"}"},e})(),JV=/@keyframes\s+/,ez=/\$([\w-]+)/g,lx=function(t,r){return typeof t=="string"?t.replace(ez,function(i,a){return a in r?r[a]:i}):t},XS=function(t,r,i){var a=t[r],s=lx(a,i);s!==a&&(t[r]=s)},tz={onCreateRule:function(t,r,i){return typeof t=="string"&&JV.test(t)?new ox(t,r,i):null},onProcessStyle:function(t,r,i){return r.type!=="style"||!i||("animation-name"in t&&XS(t,"animation-name",i.keyframes),"animation"in t&&XS(t,"animation",i.keyframes)),t},onChangeValue:function(t,r,i){var a=i.options.sheet;if(!a)return t;switch(r){case"animation":return lx(t,a.keyframes);case"animation-name":return lx(t,a.keyframes);default:return t}}},nz=(function(e){_i(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;return r.toString=function(a){var s=this.options.sheet,o=s?s.options.link:!1,l=o?Z({},a,{allowEmpty:!0}):a;return Bd(this.key,this.style,l)},t})(nR),rz={onCreateRule:function(t,r,i){return i.parent&&i.parent.type==="
2keyframes"?new nz(t,r,i):null}},iz=(function(){function e(r,i,a){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=r,this.style=i,this.options=a}var t=e.prototype;return t.toString=function(i){var a=Xl(i),s=a.linebreak;if(Array.isArray(this.style)){for(var o="",l=0;l<this.style.length;l++)o+=Bd(this.at,this.style[l]),this.style[l+1]&&(o+=s);return o}return Bd(this.at,this.style,i)},e})(),az=/@font-face/,sz={onCreateRule:function(t,r,i){return az.test(t)?new iz(t,r,i):null}},oz=(function(){function e(r,i,a){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=r,this.style=i,this.options=a}var t=e.prototype;return t.toString=function(i){return Bd(this.key,this.style,i)},e})(),lz={onCreateRule:function(t,r,i){return t==="@viewport"||t==="@-ms-viewport"?new oz(t,r,i):null}},cz=(function(){function e(r,i,a){this.type="simple",this.isProcessed=!1,this.key=r,this.value=i,this.options=a}var t=e.prototype;return t.toString=function(i){if(Array.isArray(this.value)){for(var a="",s=0;s<this.value.length;s++)a+=this.key+" "+this.value[s]+";",this.value[s+1]&&(a+=`
3`);return a}return this.key+" "+this.value+";"},e})(),dz={"@charset":!0,"@import":!0,"@namespace":!0},uz={onCreateRule:function(t,r,i){return t in dz?new cz(t,r,i):null}},QS=[WV,QV,tz,rz,sz,lz,uz],hz={process:!0},ZS={force:!0,process:!0},Cf=(function(){function e(r){this.map={},this.raw={},this.index=[],this.counter=0,this.options=r,this.classes=r.classes,this.keyframes=r.keyframes}var t=e.prototype;return t.add=function(i,a,s){var o=this.options,l=o.parent,c=o.sheet,h=o.jss,u=o.Renderer,d=o.generateId,p=o.scoped,f=Z({classes:this.classes,parent:l,sheet:c,jss:h,Renderer:u,generateId:d,scoped:p,name:i,keyframes:this.keyframes,selector:void 0},s),m=i;i in this.raw&&(m=i+"-d"+this.counter++),this.raw[m]=a,m in this.classes&&(f.selector="."+Hj(this.classes[m]));var g=zj(m,a,f);if(!g)return null;this.register(g);var x=f.index===void 0?this.index.length:f.index;return this.index.splice(x,0,g),g},t.replace=function(i,a,s){var o=this.get(i),l=this.index.indexOf(o);o&&this.remove(o);var c=s;return l!==-1&&(c=Z({},s,{index:l})),this.add(i,a,c)},t.get=function(i){return this.map[i]},t.remove=function(i){this.unregister(i),delete this.raw[i.key],this.index.splice(this.index.indexOf(i),1)},t.indexOf=function(i){return this.index.indexOf(i)},t.process=function(){var i=this.options.jss.plugins;this.index.slice(0).forEach(i.onProcessRule,i)},t.register=function(i){this.map[i.key]=i,i instanceof sx?(this.map[i.selector]=i,i.id&&(this.classes[i.key]=i.id)):i instanceof ox&&this.keyframes&&(this.keyframes[i.name]=i.id)},t.unregister=function(i){delete this.map[i.key],i instanceof sx?(delete this.map[i.selector],delete this.classes[i.key]):i instanceof ox&&delete this.keyframes[i.name]},t.update=function(){var i,a,s;if(typeof(arguments.length<=0?void 0:arguments[0])=="string"?(i=arguments.length<=0?void 0:arguments[0],a=arguments.length<=1?void 0:arguments[1],s=arguments.length<=2?void 0:arguments[2]):(a=arguments.length<=0?void 0:arguments[0],s=arguments.length<=1?void 0:arguments[1],i=null),i)this.updateOne(this.get(i),a,s);else for(var o=0;o<this.index.length;o++)this.updateOne(this.index[o],a,s)},t.updateOne=function(i,a,s){s===void 0&&(s=hz);var o=this.options,l=o.jss.plugins,c=o.sheet;if(i.rules instanceof e){i.rules.update(a,s);return}var h=i.style;if(l.onUpdate(a,i,c,s),s.process&&h&&h!==i.style){l.onProcessStyle(i.style,i,c);for(var u in i.style){var d=i.style[u],p=h[u];d!==p&&i.prop(u,d,ZS)}for(var f in h){var m=i.style[f],g=h[f];m==null&&m!==g&&i.prop(f,null,ZS)}}},t.toString=function(i){for(var a="",s=this.options.sheet,o=s?s.options.link:!1,l=Xl(i),c=l.linebreak,h=0;h<this.index.length;h++){var u=this.index[h],d=u.toString(i);!d&&!o||(a&&(a+=c),a+=d)}return a},e})(),rR=(function(){function e(r,i){this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=Z({},i,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),i.Renderer&&(this.renderer=new i.Renderer(this)),this.rules=new Cf(this.options);for(var a in r)this.rules.add(a,r[a]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached?this:(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy(),this)},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(i,a,s){var o=this.queue;
3this.attached&&!o&&(this.queue=[]);var l=this.rules.add(i,a,s);return l?(this.options.jss.plugins.onProcessRule(l),this.attached?(this.deployed&&(o?o.push(l):(this.insertRule(l),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0))),l):(this.deployed=!1,l)):null},t.replaceRule=function(i,a,s){var o=this.rules.get(i);if(!o)return this.addRule(i,a,s);var l=this.rules.replace(i,a,s);return l&&this.options.jss.plugins.onProcessRule(l),this.attached?(this.deployed&&this.renderer&&(l?o.renderable&&this.renderer.replaceRule(o.renderable,l):this.renderer.deleteRule(o)),l):(this.deployed=!1,l)},t.insertRule=function(i){this.renderer&&this.renderer.insertRule(i)},t.addRules=function(i,a){var s=[];for(var o in i){var l=this.addRule(o,i[o],a);l&&s.push(l)}return s},t.getRule=function(i){return this.rules.get(i)},t.deleteRule=function(i){var a=typeof i=="object"?i:this.rules.get(i);return!a||this.attached&&!a.renderable?!1:(this.rules.remove(a),this.attached&&a.renderable&&this.renderer?this.renderer.deleteRule(a.renderable):!0)},t.indexOf=function(i){return this.rules.indexOf(i)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var i;return(i=this.rules).update.apply(i,arguments),this},t.updateOne=function(i,a,s){return this.rules.updateOne(i,a,s),this},t.toString=function(i){return this.rules.toString(i)},e})(),pz=(function(){function e(){this.plugins={internal:[],external:[]},this.registry={}}var t=e.prototype;return t.onCreateRule=function(i,a,s){for(var o=0;o<this.registry.onCreateRule.length;o++){var l=this.registry.onCreateRule[o](i,a,s);if(l)return l}return null},t.onProcessRule=function(i){if(!i.isProcessed){for(var a=i.options.sheet,s=0;s<this.registry.onProcessRule.length;s++)this.registry.onProcessRule[s](i,a);i.style&&this.onProcessStyle(i.style,i,a),i.isProcessed=!0}},t.onProcessStyle=function(i,a,s){for(var o=0;o<this.registry.onProcessStyle.length;o++)a.style=this.registry.onProcessStyle[o](a.style,a,s)},t.onProcessSheet=function(i){for(var a=0;a<this.registry.onProcessSheet.length;a++)this.registry.onProcessSheet[a](i)},t.onUpdate=function(i,a,s,o){for(var l=0;l<this.registry.onUpdate.length;l++)this.registry.onUpdate[l](i,a,s,o)},t.onChangeValue=function(i,a,s){for(var o=i,l=0;l<this.registry.onChangeValue.length;l++)o=this.registry.onChangeValue[l](o,a,s);return o},t.use=function(i,a){a===void 0&&(a={queue:"external"});var s=this.plugins[a.queue];s.indexOf(i)===-1&&(s.push(i),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce(function(o,l){for(var c in l)c in o&&o[c].push(l[c]);return o},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e})(),iR=(function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(i){var a=this.registry,s=i.options.index;if(a.indexOf(i)===-1){if(a.length===0||s>=this.index){a.push(i);return}for(var o=0;o<a.length;o++)if(a[o].options.index>s){a.splice(o,0,i);return}}},t.reset=function(){this.registry=[]},t.remove=function(i){var a=this.registry.indexOf(i);this.registry.splice(a,1)},t.toString=function(i){for(var a=i===void 0?{}:i,s=a.attached,o=Uo(a,["attached"]),l=Xl(o),c=l.linebreak,h="",u=0;u<this.registry.length;u++){var d=this.registry[u];s!=null&&d.attached!==s||(h&&(h+=c),h+=d.toString(o))}return h},Pi(e,[{key:"index",get:function(){return this.registry.length===0?0:this.registry[this.registry.length-1].options.index}}]),e})(),Pd=new iR,cx=typeof globalThis<"u"?globalThis:typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")(),dx="2f1acc6c3a606b082e5eef5e54414ffb";cx[dx]==null&&(cx[dx]=0);var JS=cx[dx]++,e_=function(t){t===void 0&&(t={});var r=0,i=function(s,o){r+=1;var l="",c="";return o&&(o.options.classNamePrefix&&(c=o.options.classNamePrefix),o.options.jss.id!=null&&(l=String(o.options.jss.id))),t.minify?""+(c||"c")+JS+l+r:c+s.key+"-"+JS+(l?"-"+l:"")+"-"+r};return i},aR=function(t){var r;return function(){return r||(r=t()),r}},fz=function(t,r){try{return t.attributeStyleMap?t.attributeStyleMap.get(r):t.style.getPropertyValue(r)}catch{return""}},mz=function(t,r,i){try{var a=i;if(Array.isArray(i)&&(a=Co(i)),t.attributeStyleMap)t.attributeStyleMap.set(r,a);else{var s=a?a.indexOf("!important"):-1,o=s>-1?a.substr(0,s-1):a;t.style.setProperty(r,o,s>-1?"important":"")}}catch{return!1}return!0},gz=function(t,r){try{t.attributeStyleMap?t.attributeStyleMap.delete(r):t.style.removeProperty(r)}catch{}},vz=function(t,r){return t.selectorText=r,t.selectorText===r},sR=aR(function(){return document.querySelector("head")});function bz(e,t){for(var r=0;r<e.length;r++){var i=e[r];if(i.attached&&i.options.index>t.index&&i.options.insertionPoint===t.insertionPoint)return i}return null}function yz(e,t){for(var r=e.length-1;r>=0;r--){var i=e[r];if(i.attached&&i.options.insertionPoint===t.insertionPoint)return i}return null}function xz(e){for(var t=sR(),r=0;r<t.childNodes.length;r++){var i=t.childNodes[r];if(i.nodeType===8&&i.nodeValue.trim()===e)return i}return null}function jz(e){var t=Pd.registry;if(t.length>0){var r=bz(t,e);if(r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element};if(r=yz(t,e),r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element.nextSibling}}var i=e.insertionPoint;if(i&&typeof i=="string"){var a=xz(i);if(a)return{parent:a.parentNode,node:a.nextSibling}}return!1}function wz(e,t){var r=t.insertionPoint,i=jz(t);if(i!==!1&&i.parent){i.parent.insertBefore(e,i.node);return}if(r&&typeof r.nodeType=="number"){var a=r,s=a.parentNode;s&&s.insertBefore(e,a.nextSibling);return}sR().appendChild(e)}var Sz=aR(function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}),t_=function(t,r,i){try{"insertRule"in t?t.insertRule(r,i):"appendRule"in t&&t.appendRule(r)}catch{return!1}return t.cssRules[i]},n_=function(t,r){var i=t.cssRules.length;return r===void 0||r>i?i:r},_z=function(){var t=document.createElement("style");return t.textContent=`
4`,t},Cz=(function(){function e(r){this.getPropertyValue=fz,this.setProperty=mz,this.removeProperty=gz,this.setSelector=vz,this.hasInsertedRules=!1,this.cssRules=[],r&&Pd.add(r),this.sheet=r;var i=this.sheet?this.sheet.options:{},a=i.media,s=i.meta,o=i.element;this.element=o||_z(),this.element.setAttribute("data-jss",""),a&&this.element.setAttribute("media",a),s&&this.element.setAttribute("data-meta",s);var l=Sz();l&&this.element.setAttribute("nonce",l)}var t=e.prototype;return t.attach=function(){if(!(this.element.parentNode||!this.sheet)){wz(this.element,this.sheet.options);var i=!!(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&i&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var i=this.element.parentNode;i&&i.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent=`
5`)}},t.deploy=function(){var i=this.sheet;if(i){if(i.options.link){this.insertRules(i.rules);return}this.element.textContent=`
6`+i.toString()+`
7`}},t.insertRules=function(i,a){for(var s=0;s<i.index.length;s++)this.insertRule(i.index[s],s,a)}
7,t.insertRule=function(i,a,s){if(s===void 0&&(s=this.element.sheet),i.rules){var o=i,l=s;if(i.type==="conditional"||i.type==="keyframes"){var c=n_(s,a);if(l=t_(s,o.toString({children:!1}),c),l===!1)return!1;this.refCssRule(i,c,l)}return this.insertRules(o.rules,l),l}var h=i.toString();if(!h)return!1;var u=n_(s,a),d=t_(s,h,u);return d===!1?!1:(this.hasInsertedRules=!0,this.refCssRule(i,u,d),d)},t.refCssRule=function(i,a,s){i.renderable=s,i.options.parent instanceof rR&&this.cssRules.splice(a,0,s)},t.deleteRule=function(i){var a=this.element.sheet,s=this.indexOf(i);return s===-1?!1:(a.deleteRule(s),this.cssRules.splice(s,1),!0)},t.indexOf=function(i){return this.cssRules.indexOf(i)},t.replaceRule=function(i,a){var s=this.indexOf(i);return s===-1?!1:(this.element.sheet.deleteRule(s),this.cssRules.splice(s,1),this.insertRule(a,s))},t.getRules=function(){return this.element.sheet.cssRules},e})(),Nz=0,Ez=(function(){function e(r){this.id=Nz++,this.version="10.10.0",this.plugins=new pz,this.options={id:{minify:!1},createGenerateId:e_,Renderer:su?Cz:null,plugins:[]},this.generateId=e_({minify:!1});for(var i=0;i<QS.length;i++)this.plugins.use(QS[i],{queue:"internal"});this.setup(r)}var t=e.prototype;return t.setup=function(i){return i===void 0&&(i={}),i.createGenerateId&&(this.options.createGenerateId=i.createGenerateId),i.id&&(this.options.id=Z({},this.options.id,i.id)),(i.createGenerateId||i.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),i.insertionPoint!=null&&(this.options.insertionPoint=i.insertionPoint),"Renderer"in i&&(this.options.Renderer=i.Renderer),i.plugins&&this.use.apply(this,i.plugins),this},t.createStyleSheet=function(i,a){a===void 0&&(a={});var s=a,o=s.index;typeof o!="number"&&(o=Pd.index===0?0:Pd.index+1);var l=new rR(i,Z({},a,{jss:this,generateId:a.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:o}));return this.plugins.onProcessSheet(l),l},t.removeStyleSheet=function(i){return i.detach(),Pd.remove(i),this},t.createRule=function(i,a,s){if(a===void 0&&(a={}),s===void 0&&(s={}),typeof i=="object")return this.createRule(void 0,i,a);var o=Z({},s,{name:i,jss:this,Renderer:this.options.Renderer});o.generateId||(o.generateId=this.generateId),o.classes||(o.classes={}),o.keyframes||(o.keyframes={});var l=zj(i,a,o);return l&&this.plugins.onProcessRule(l),l},t.use=function(){for(var i=this,a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];return s.forEach(function(l){i.plugins.use(l)}),this},e})(),Gj=function(t){return new Ez(t)},Wj=typeof CSS=="object"&&CSS!=null&&"number"in CSS;function oR(e){var t=null;for(var r in e){var i=e[r],a=typeof i;if(a==="function")t||(t={}),t[r]=i;else if(a==="object"&&i!==null&&!Array.isArray(i)){var s=oR(i);s&&(t||(t={}),t[r]=s)}}return t}Gj();var lR=Date.now(),Wm="fnValues"+lR,Ym="fnStyle"+ ++lR,Tz=function(){return{onCreateRule:function(r,i,a){if(typeof i!="function")return null;var s=zj(r,{},a);return s[Ym]=i,s},onProcessStyle:function(r,i){if(Wm in i||Ym in i)return r;var a={};for(var s in r){var o=r[s];typeof o=="function"&&(delete r[s],a[s]=o)}return i[Wm]=a,r},onUpdate:function(r,i,a,s){var o=i,l=o[Ym];l&&(o.style=l(r)||{});var c=o[Wm];if(c)for(var h in c)o.prop(h,c[h](r),s)}}},$s="@global",ux="@global ",kz=(function(){function e(r,i,a){this.type="global",this.at=$s,this.isProcessed=!1,this.key=r,this.options=a,this.rules=new Cf(Z({},a,{parent:this}));for(var s in i)this.rules.add(s,i[s]);this.rules.process()}var t=e.prototype;return t.getRule=function(i){return this.rules.get(i)},t.addRule=function(i,a,s){var o=this.rules.add(i,a,s);return o&&this.options.jss.plugins.onProcessRule(o),o},t.replaceRule=function(i,a,s){var o=this.rules.replace(i,a,s);return o&&this.options.jss.plugins.onProcessRule(o),o},t.indexOf=function(i){return this.rules.indexOf(i)},t.toString=function(i){return this.rules.toString(i)},e})(),Pz=(function(){function e(r,i,a){this.type="global",this.at=$s,this.isProcessed=!1,this.key=r,this.options=a;var s=r.substr(ux.length);this.rule=a.jss.createRule(s,i,Z({},a,{parent:this}))}var t=e.prototype;return t.toString=function(i){return this.rule?this.rule.toString(i):""},e})(),Iz=/\s*,\s*/g;function cR(e,t){for(var r=e.split(Iz),i="",a=0;a<r.length;a++)i+=t+" "+r[a].trim(),r[a+1]&&(i+=", ");return i}function Dz(e,t){var r=e.options,i=e.style,a=i?i[$s]:null;if(a){for(var s in a)t.addRule(s,a[s],Z({},r,{selector:cR(s,e.selector)}));delete i[$s]}}function Rz(e,t){var r=e.options,i=e.style;for(var a in i)if(!(a[0]!=="@"||a.substr(0,$s.length)!==$s)){var s=cR(a.substr($s.length),e.selector);t.addRule(s,i[a],Z({},r,{selector:s})),delete i[a]}}function Oz(){function e(r,i,a){if(!r)return null;if(r===$s)return new kz(r,i,a);if(r[0]==="@"&&r.substr(0,ux.length)===ux)return new Pz(r,i,a);var s=a.parent;return s&&(s.type==="global"||s.options.parent&&s.options.parent.type==="global")&&(a.scoped=!1),!a.selector&&a.scoped===!1&&(a.selector=r),null}function t(r,i){r.type!=="style"||!i||(Dz(r,i),Rz(r,i))}return{onCreateRule:e,onProcessRule:t}}var r_=/\s*,\s*/g,Az=/&/g,Mz=/\$([\w-]+)/g;function $z(){function e(a,s){return function(o,l){var c=a.getRule(l)||s&&s.getRule(l);return c?c.selector:l}}function t(a,s){for(var o=s.split(r_),l=a.split(r_),c="",h=0;h<o.length;h++)for(var u=o[h],d=0;d<l.length;d++){var p=l[d];c&&(c+=", "),c+=p.indexOf("&")!==-1?p.replace(Az,u):u+" "+p}return c}function r(a,s,o){if(o)return Z({},o,{index:o.index+1});var l=a.options.nestingLevel;l=l===void 0?1:l+1;var c=Z({},a.options,{nestingLevel:l,index:s.indexOf(a)+1});return delete c.name,c}function i(a,s,o){if(s.type!=="style")return a;var l=s,c=l.options.parent,h,u;for(var d in a){var p=d.indexOf("&")!==-1,f=d[0]==="@";if(!(!p&&!f)){if(h=r(l,c,h),p){var m=t(d,l.selector);u||(u=e(c,o)),m=m.replace(Mz,u);var g=l.key+"-"+d;"replaceRule"in c?c.replaceRule(g,a[d],Z({},h,{selector:m})):c.addRule(g,a[d],Z({},h,{selector:m}))}else f&&c.addRule(d,{},h).addRule(l.key,a[d],{selector:l.selector});delete a[d]}}return a}return{onProcessStyle:i}}var Lz=/[A-Z]/g,Fz=/^ms-/,Km={};function Uz(e){return"-"+e.toLowerCase()}function dR(e){if(Km.hasOwnProperty(e))return Km[e];var t=e.replace(Lz,Uz);return Km[e]=Fz.test(t)?"-"+t:t}function Ap(e){var t={};for(var r in e){var i=r.indexOf("--")===0?r:dR(r);t[i]=e[r]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(Ap):t.fallbacks=Ap(e.fallbacks)),t}function Bz(){function e(r){if(Array.isArray(r)){for(var i=0;i<r.length;i++)r[i]=Ap(r[i]);return r}return Ap(r)}function t(r,i,a){if(i.indexOf("--")===0)return r;var s=dR(i);return i===s?r:(a.prop(s,r),null)}
7return{onProcessStyle:e,onChangeValue:t}}var Ge=Wj&&CSS?CSS.px:"px",Wu=Wj&&CSS?CSS.ms:"ms",rl=Wj&&CSS?CSS.percent:"%",qz={"animation-delay":Wu,"animation-duration":Wu,"background-position":Ge,"background-position-x":Ge,"background-position-y":Ge,"background-size":Ge,border:Ge,"border-bottom":Ge,"border-bottom-left-radius":Ge,"border-bottom-right-radius":Ge,"border-bottom-width":Ge,"border-left":Ge,"border-left-width":Ge,"border-radius":Ge,"border-right":Ge,"border-right-width":Ge,"border-top":Ge,"border-top-left-radius":Ge,"border-top-right-radius":Ge,"border-top-width":Ge,"border-width":Ge,"border-block":Ge,"border-block-end":Ge,"border-block-end-width":Ge,"border-block-start":Ge,"border-block-start-width":Ge,"border-block-width":Ge,"border-inline":Ge,"border-inline-end":Ge,"border-inline-end-width":Ge,"border-inline-start":Ge,"border-inline-start-width":Ge,"border-inline-width":Ge,"border-start-start-radius":Ge,"border-start-end-radius":Ge,"border-end-start-radius":Ge,"border-end-end-radius":Ge,margin:Ge,"margin-bottom":Ge,"margin-left":Ge,"margin-right":Ge,"margin-top":Ge,"margin-block":Ge,"margin-block-end":Ge,"margin-block-start":Ge,"margin-inline":Ge,"margin-inline-end":Ge,"margin-inline-start":Ge,padding:Ge,"padding-bottom":Ge,"padding-left":Ge,"padding-right":Ge,"padding-top":Ge,"padding-block":Ge,"padding-block-end":Ge,"padding-block-start":Ge,"padding-inline":Ge,"padding-inline-end":Ge,"padding-inline-start":Ge,"mask-position-x":Ge,"mask-position-y":Ge,"mask-size":Ge,height:Ge,width:Ge,"min-height":Ge,"max-height":Ge,"min-width":Ge,"max-width":Ge,bottom:Ge,left:Ge,top:Ge,right:Ge,inset:Ge,"inset-block":Ge,"inset-block-end":Ge,"inset-block-start":Ge,"inset-inline":Ge,"inset-inline-end":Ge,"inset-inline-start":Ge,"box-shadow":Ge,"text-shadow":Ge,"column-gap":Ge,"column-rule":Ge,"column-rule-width":Ge,"column-width":Ge,"font-size":Ge,"font-size-delta":Ge,"letter-spacing":Ge,"text-decoration-thickness":Ge,"text-indent":Ge,"text-stroke":Ge,"text-stroke-width":Ge,"word-spacing":Ge,motion:Ge,"motion-offset":Ge,outline:Ge,"outline-offset":Ge,"outline-width":Ge,perspective:Ge,"perspective-origin-x":rl,"perspective-origin-y":rl,"transform-origin":rl,"transform-origin-x":rl,"transform-origin-y":rl,"transform-origin-z":rl,"transition-delay":Wu,"transition-duration":Wu,"vertical-align":Ge,"flex-basis":Ge,"shape-margin":Ge,size:Ge,gap:Ge,grid:Ge,"grid-gap":Ge,"row-gap":Ge,"grid-row-gap":Ge,"grid-column-gap":Ge,"grid-template-rows":Ge,"grid-template-columns":Ge,"grid-auto-rows":Ge,"grid-auto-columns":Ge,"box-shadow-x":Ge,"box-shadow-y":Ge,"box-shadow-blur":Ge,"box-shadow-spread":Ge,"font-line-height":Ge,"text-shadow-x":Ge,"text-shadow-y":Ge,"text-shadow-blur":Ge};function uR(e){var t=/(-[a-z])/g,r=function(o){return o[1].toUpperCase()},i={};for(var a in e)i[a]=e[a],i[a.replace(t,r)]=e[a];return i}var Vz=uR(qz);function Id(e,t,r){if(t==null)return t;if(Array.isArray(t))for(var i=0;i<t.length;i++)t[i]=Id(e,t[i],r);else if(typeof t=="object")if(e==="fallbacks")for(var a in t)t[a]=Id(a,t[a],r);else for(var s in t)t[s]=Id(e+"-"+s,t[s],r);else if(typeof t=="number"&&isNaN(t)===!1){var o=r[e]||Vz[e];return o&&!(t===0&&o===Ge)?typeof o=="function"?o(t).toString():""+t+o:t.toString()}return t}function zz(e){e===void 0&&(e={});var t=uR(e);function r(a,s){if(s.type!=="style")return a;for(var o in a)a[o]=Id(o,a[o],t);return a}function i(a,s){return Id(s,a,t)}return{onProcessStyle:r,onChangeValue:i}}function hx(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function Hz(e){if(Array.isArray(e))return hx(e)}function hR(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Yj(e,t){if(e){if(typeof e=="string")return hx(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hx(e,t):void 0}}function Gz(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
8In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xr(e){return Hz(e)||hR(e)||Yj(e)||Gz()}var bd="",px="",pR="",fR="",Wz=su&&"ontouchstart"in document.documentElement;if(su){var Xm={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},Yz=document.createElement("p"),Qm=Yz.style,Kz="Transform";for(var Zm in Xm)if(Zm+Kz in Qm){bd=Zm,px=Xm[Zm];break}bd==="Webkit"&&"msHyphens"in Qm&&(bd="ms",px=Xm.ms,fR="edge"),bd==="Webkit"&&"-apple-trailing-word"in Qm&&(pR="apple")}var en={js:bd,css:px,vendor:pR,browser:fR,isTouch:Wz};function Xz(e){return e[1]==="-"||en.js==="ms"?e:"@"+en.css+"keyframes"+e.substr(10)}var Qz={noPrefill:["appearance"],supportedProperty:function(t){return t!=="appearance"?!1:en.js==="ms"?"-webkit-"+t:en.css+t}},Zz={noPrefill:["color-adjust"],supportedProperty:function(t){return t!=="color-adjust"?!1:en.js==="Webkit"?en.css+"print-"+t:t}},Jz=/[-\s]+(.)?/g;function e9(e,t){return t?t.toUpperCase():""}function Kj(e){return e.replace(Jz,e9)}function Vs(e){return Kj("-"+e)}var t9={noPrefill:["mask"],supportedProperty:function(t,r){if(!/^mask/.test(t))return!1;if(en.js==="Webkit"){var i="mask-image";if(Kj(i)in r)return t;if(en.js+Vs(i)in r)return en.css+t}return t}},n9={noPrefill:["text-orientation"],supportedProperty:function(t){return t!=="text-orientation"?!1:en.vendor==="apple"&&!en.isTouch?en.css+t:t}},r9={noPrefill:["transform"],supportedProperty:function(t,r,i){return t!=="transform"?!1:i.transform?t:en.css+t}},i9={noPrefill:["transition"],supportedProperty:function(t,r,i){return t!=="transition"?!1:i.transition?t:en.css+t}},a9={noPrefill:["writing-mode"],supportedProperty:function(t){return t!=="writing-mode"?!1:en.js==="Webkit"||en.js==="ms"&&en.browser!=="edge"?en.css+t:t}}
8,s9={noPrefill:["user-select"],supportedProperty:function(t){return t!=="user-select"?!1:en.js==="Moz"||en.js==="ms"||en.vendor==="apple"?en.css+t:t}},o9={supportedProperty:function(t,r){if(!/^break-/.test(t))return!1;if(en.js==="Webkit"){var i="WebkitColumn"+Vs(t);return i in r?en.css+"column-"+t:!1}if(en.js==="Moz"){var a="page"+Vs(t);return a in r?"page-"+t:!1}return!1}},l9={supportedProperty:function(t,r){if(!/^(border|margin|padding)-inline/.test(t))return!1;if(en.js==="Moz")return t;var i=t.replace("-inline","");return en.js+Vs(i)in r?en.css+i:!1}},c9={supportedProperty:function(t,r){return Kj(t)in r?t:!1}},d9={supportedProperty:function(t,r){var i=Vs(t);return t[0]==="-"||t[0]==="-"&&t[1]==="-"?t:en.js+i in r?en.css+t:en.js!=="Webkit"&&"Webkit"+i in r?"-webkit-"+t:!1}},u9={supportedProperty:function(t){return t.substring(0,11)!=="scroll-snap"?!1:en.js==="ms"?""+en.css+t:t}},h9={supportedProperty:function(t){return t!=="overscroll-behavior"?!1:en.js==="ms"?en.css+"scroll-chaining":t}},p9={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},f9={supportedProperty:function(t,r){var i=p9[t];return i&&en.js+Vs(i)in r?en.css+i:!1}},mR={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},m9=Object.keys(mR),g9=function(t){return en.css+t},v9={supportedProperty:function(t,r,i){var a=i.multiple;if(m9.indexOf(t)>-1){var s=mR[t];if(!Array.isArray(s))return en.js+Vs(s)in r?en.css+s:!1;if(!a)return!1;for(var o=0;o<s.length;o++)if(!(en.js+Vs(s[0])in r))return!1;return s.map(g9)}return!1}},gR=[Qz,Zz,t9,n9,r9,i9,a9,s9,o9,l9,c9,d9,u9,h9,f9,v9],i_=gR.filter(function(e){return e.supportedProperty}).map(function(e){return e.supportedProperty}),b9=gR.filter(function(e){return e.noPrefill}).reduce(function(e,t){return e.push.apply(e,xr(t.noPrefill)),e},[]),yd,xo={};if(su){yd=document.createElement("p");var Jm=window.getComputedStyle(document.documentElement,"");for(var eg in Jm)isNaN(eg)||(xo[Jm[eg]]=Jm[eg]);b9.forEach(function(e){return delete xo[e]})}function fx(e,t){if(t===void 0&&(t={}),!yd)return e;if(xo[e]!=null)return xo[e];(e==="transition"||e==="transform")&&(t[e]=e in yd.style);for(var r=0;r<i_.length&&(xo[e]=i_[r](e,yd.style,t),!xo[e]);r++);try{yd.style[e]=""}catch{return!1}return xo[e]}var il={}
8,y9={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},x9=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g,Ps;function j9(e,t,r){if(t==="var")return"var";if(t==="all")return"all";if(r==="all")return", all";var i=t?fx(t):", "+fx(r);return i||t||r}su&&(Ps=document.createElement("p"));function a_(e,t){var r=t;if(!Ps||e==="content")return t;if(typeof r!="string"||!isNaN(parseInt(r,10)))return r;var i=e+r;if(il[i]!=null)return il[i];try{Ps.style[e]=r}catch{return il[i]=!1,!1}if(y9[e])r=r.replace(x9,j9);else if(Ps.style[e]===""&&(r=en.css+r,r==="-ms-flex"&&(Ps.style[e]="-ms-flexbox"),Ps.style[e]=r,Ps.style[e]===""))return il[i]=!1,!1;return Ps.style[e]="",il[i]=r,il[i]}function w9(){function e(a){if(a.type==="keyframes"){var s=a;s.at=Xz(s.at)}}function t(a){for(var s in a){var o=a[s];if(s==="fallbacks"&&Array.isArray(o)){a[s]=o.map(t);continue}var l=!1,c=fx(s);c&&c!==s&&(l=!0);var h=!1,u=a_(c,Co(o));u&&u!==o&&(h=!0),(l||h)&&(l&&delete a[s],a[c||s]=u||o)}return a}function r(a,s){return s.type!=="style"?a:t(a)}function i(a,s){return a_(s,Co(a))||a}return{onProcessRule:e,onProcessStyle:r,onChangeValue:i}}function S9(){var e=function(r,i){return r.length===i.length?r>i?1:-1:r.length-i.length};return{onProcessStyle:function(r,i){if(i.type!=="style")return r;for(var a={},s=Object.keys(r).sort(e),o=0;o<s.length;o++)a[s[o]]=r[s[o]];return a}}}function Nf(){return{plugins:[Tz(),Oz(),$z(),Bz(),zz(),typeof window>"u"?null:w9(),S9()]}}function Xj(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.baseClasses,r=e.newClasses;if(e.Component,!r)return t;var i=Z({},t);return Object.keys(r).forEach(function(a){r[a]&&(i[a]="".concat(t[a]," ").concat(r[a]))}),i}var _l={set:function(t,r,i,a){var s=t.get(r);s||(s=new Map,t.set(r,s)),s.set(i,a)},get:function(t,r,i){var a=t.get(r);return a?a.get(i):void 0},delete:function(t,r,i){var a=t.get(r);a.delete(i)}},vR=Me.createContext(null);function Qs(){var e=Me.useContext(vR);return e}var _9=Gj(Nf()),C9=_f(),N9=new Map,E9={disableGeneration:!1,generateClassName:C9,jss:_9,sheetsCache:null,sheetsManager:N9,sheetsRegistry:null},mx=Me.createContext(E9),Yu;function Qj(e){var t=e.children,r=e.injectFirst,i=r===void 0?!1:r,a=e.disableGeneration,s=a===void 0?!1:a,o=Be(e,["children","injectFirst","disableGeneration"]),l=Me.useContext(mx),c=Z({},l,{disableGeneration:s},o);if(!c.jss.options.insertionPoint&&i&&typeof window<"u"){if(!Yu){var h=document.head;Yu=document.createComment("mui-inject-first"),h.insertBefore(Yu,h.firstChild)}c.jss=Gj({plugins:Nf().plugins,insertionPoint:Yu})}return Me.createElement(mx.Provider,{value:c},t)}var s_=-1e9;function T9(){return s_+=1,s_}var k9={};function P9(e){var t=typeof e=="function";return{create:function(i,a){var s;try{s=t?e(i):e}catch(c){throw c}if(!a||!i.overrides||!i.overrides[a])return s;var o=i.overrides[a],l=Z({},s);return Object.keys(o).forEach(function(c){l[c]=hs(l[c],o[c])}),l},options:{}}}function I9(e,t,r){var i=e.state,a=e.stylesOptions;if(a.disableGeneration)return t||{};i.cacheClasses||(i.cacheClasses={value:null,lastProp:null,lastJSS:{}});var s=!1;return i.classes!==i.cacheClasses.lastJSS&&(i.cacheClasses.lastJSS=i.classes,s=!0),t!==i.cacheClasses.lastProp&&(i.cacheClasses.lastProp=t,s=!0),s&&(i.cacheClasses.value=Xj({baseClasses:i.cacheClasses.lastJSS,newClasses:t,Component:r})),i.cacheClasses.value}function D9(e,t){var r=e.state,i=e.theme,a=e.stylesOptions,s=e.stylesCreator,o=e.name;if(!a.disableGeneration){var l=_l.get(a.sheetsManager,s,i);l||(l={refs:0,staticSheet:null,dynamicStyles:null},_l.set(a.sheetsManager,s,i,l));var c=Z({},s.options,a,{theme:i,flip:typeof a.flip=="boolean"?a.flip:i.direction==="rtl"});c.generateId=c.serverGenerateClassName||c.generateClassName;var h=a.sheetsRegistry;if(l.refs===0){var u;a.sheetsCache&&(u=_l.get(a.sheetsCache,s,i));var d=s.create(i,o);u||(u=a.jss.createStyleSheet(d,Z({link:!1},c)),u.attach(),a.sheetsCache&&_l.set(a.sheetsCache,s,i,u)),h&&h.add(u),l.staticSheet=u,l.dynamicStyles=oR(d)}if(l.dynamicStyles){var p=a.jss.createStyleSheet(l.dynamicStyles,Z({link:!0},c));p.update(t),p.attach(),r.dynamicSheet=p,r.classes=Xj({baseClasses:l.staticSheet.classes,newClasses:p.classes}),h&&h.add(p)}else r.classes=l.staticSheet.classes;l.refs+=1}}function R9(e,t){var r=e.state;r.dynamicSheet&&r.dynamicSheet.update(t)}function O9(e){var t=e.state,r=e.theme,i=e.stylesOptions,a=e.stylesCreator;if(!i.disableGeneration){var s=_l.get(i.sheetsManager,a,r);s.refs-=1;var o=i.sheetsRegistry;s.refs===0&&(_l.delete(i.sheetsManager,a,r),i.jss.removeStyleSheet(s.staticSheet),o&&o.remove(s.staticSheet)),t.dynamicSheet&&(i.jss.removeStyleSheet(t.dynamicSheet),o&&o.remove(t.dynamicSheet))}}function A9(e,t){var r=Me.useRef([]),i,a=Me.useMemo(function(){return{}},t);r.current!==a&&(r.current=a,i=e()),Me.useEffect(function(){return function(){i&&i()}},[a])}function Zj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.name,i=t.classNamePrefix,a=t.Component,s=t.defaultTheme,o=s===void 0?k9:s,l=Be(t,["name","classNamePrefix","Component","defaultTheme"]),c=P9(e),h=r||i||"makeStyles";c.options={index:T9(),name:r,meta:h,classNamePrefix:h};var u=function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=Qs()||o,m=Z({},Me.useContext(mx),l),g=Me.useRef(),x=Me.useRef();A9(function(){var b={name:r,state:{},stylesCreator:c,stylesOptions:m,theme:f};return D9(b,p),x.current=!1,g.current=b,function(){O9(b)}},[f,c]),Me.useEffect(function(){x.current&&R9(g.current,p),x.current=!0});var v=I9(g.current,p.classes,a);return v};return u}function la(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var bR=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};la(this,e),this.options=t}
8return Pi(e,[{key:"collect",value:function(r){var i=new Map;this.sheetsRegistry=new iR;var a=_f();return Me.createElement(Qj,Z({sheetsManager:i,serverGenerateClassName:a,sheetsRegistry:this.sheetsRegistry},this.options),r)}},{key:"toString",value:function(){return this.sheetsRegistry?this.sheetsRegistry.toString():""}},{key:"getStyleElement",value:function(r){return Me.createElement("style",Z({id:"jss-server-side",key:"jss-server-side",dangerouslySetInnerHTML:{__html:this.toString()}},r))}}]),e})();function M9(e,t){var r={};return Object.keys(e).forEach(function(i){t.indexOf(i)===-1&&(r[i]=e[i])}),r}function $9(e){var t=function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=a.name,o=Be(a,["name"]),l=s,c=typeof i=="function"?function(p){return{root:function(m){return i(Z({theme:p},m))}}}:{root:i},h=Zj(c,Z({Component:e,name:s||e.displayName,classNamePrefix:l},o)),u;i.filterProps&&(u=i.filterProps,delete i.filterProps),i.propTypes&&(i.propTypes,delete i.propTypes);var d=Me.forwardRef(function(f,m){var g=f.children,x=f.className,v=f.clone,b=f.component,j=Be(f,["children","className","clone","component"]),w=h(f),S=$e(w.root,x),_=j;if(u&&(_=M9(_,u)),v)return Me.cloneElement(g,Z({className:$e(g.props.className,S)},_));if(typeof g=="function")return g(Z({className:S},_));var C=b||e;return Me.createElement(C,Z({ref:m,className:S},_),g)});return zl(d,e),d};return t}function L9(e,t){if(typeof t=="function"){var r=t(e);return r}return Z({},e,t)}function qd(e){var t=e.children,r=e.theme,i=Qs(),a=Me.useMemo(function(){var s=i===null?r:L9(i,r);return s!=null&&(s[tR]=i!==null),s},[r,i]);return Me.createElement(vR.Provider,{value:a},t)}var F9=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function(i){var a=r.defaultTheme,s=r.withTheme,o=s===void 0?!1:s,l=r.name,c=Be(r,["defaultTheme","withTheme","name"]),h=l,u=Zj(t,Z({defaultTheme:a,Component:i,name:l||i.displayName,classNamePrefix:h},c)),d=Me.forwardRef(function(f,m){f.classes;var g=f.innerRef,x=Be(f,["classes","innerRef"]),v=u(Z({},i.defaultProps,f)),b,j=x;return(typeof l=="string"||o)&&(b=Qs()||a,l&&(j=au({theme:b,name:l,props:x})),o&&!j.theme&&(j.theme=b)),Me.createElement(i,Z({ref:g||m,classes:v},j))});return zl(d,i),d}};function yR(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.defaultTheme,r=function(a){var s=Me.forwardRef(function(l,c){var h=l.innerRef,u=Be(l,["innerRef"]),d=Qs()||t;return Me.createElement(a,Z({theme:d,ref:h||c},u))});return zl(s,a),s};return r}yR();var Jr=["xs","sm","md","lg","xl"];function U9(e){var t=e.values,r=t===void 0?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,i=e.unit,a=i===void 0?"px":i,s=e.step,o=s===void 0?5:s,l=Be(e,["values","unit","step"]);function c(f){var m=typeof r[f]=="number"?r[f]:f;return"@media (min-width:".concat(m).concat(a,")")}function h(f){var m=Jr.indexOf(f)+1,g=r[Jr[m]];if(m===Jr.length)return c("xs");var x=typeof g=="number"&&m>0?g:f;return"@media (max-width:".concat(x-o/100).concat(a,")")}function u(f,m){var g=Jr.indexOf(m);return g===Jr.length-1?c(f):"@media (min-width:".concat(typeof r[f]=="number"?r[f]:f).concat(a,") and ")+"(max-width:".concat((g!==-1&&typeof r[Jr[g+1]]=="number"?r[Jr[g+1]]:m)-o/100).concat(a,")")}function d(f){return u(f,f)}function p(f){return r[f]}return Z({keys:Jr,values:r,up:c,down:h,between:u,only:d,width:p},l)}function B9(e,t,r){var i;return Z({gutters:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Z({paddingLeft:t(2),paddingRight:t(2)},s,Ct({},e.up("sm"),Z({paddingLeft:t(3),paddingRight:t(3)},s[e.up("sm")])))},toolbar:(i={minHeight:56},Ct(i,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Ct(i,e.up("sm"),{minHeight:64}),i)},r)}var Vd={black:"#000",white:"#fff"},Ef={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},fp={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},mp={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},gp={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},vp={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},bp={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},yp={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function Jj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.min(Math.max(t,e),r)}function ew(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),r=e.match(t);return r&&r[0].length===1&&(r=r.map(function(i){return i+i})),r?"rgb".concat(r.length===4?"a":"","(").concat(r.map(function(i,a){return a<3?parseInt(i,16):Math.round(parseInt(i,16)/255*1e3)/1e3}).join(", "),")"):""}function q9(e){var t=e.toString(16);return t.length===1?"0".concat(t):t}function xR(e){if(e.indexOf("#")===0)return e;var t=$a(e),r=t.values;return"#".concat(r.map(function(i){return q9(i)}).join(""))}function tw(e){e=$a(e);var t=e,r=t.values,i=r[0],a=r[1]/100,s=r[2]/100,o=a*Math.min(s,1-s),l=function(d){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:(d+i/30)%12;return s-o*Math.max(Math.min(p-3,9-p,1),-1)},c="rgb",h=[Math.round(l(0)*255),Math.round(l(8)*255),Math.round(l(4)*255
8)];return e.type==="hsla"&&(c+="a",h.push(r[3])),Ql({type:c,values:h})}function $a(e){if(e.type)return e;if(e.charAt(0)==="#")return $a(ew(e));var t=e.indexOf("("),r=e.substring(0,t);if(["rgb","rgba","hsl","hsla"].indexOf(r)===-1)throw new Error(Po(3,e));var i=e.substring(t+1,e.length-1).split(",");return i=i.map(function(a){return parseFloat(a)}),{type:r,values:i}}function Ql(e){var t=e.type,r=e.values;return t.indexOf("rgb")!==-1?r=r.map(function(i,a){return a<3?parseInt(i,10):i}):t.indexOf("hsl")!==-1&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),"".concat(t,"(").concat(r.join(", "),")")}function nw(e,t){var r=zd(e),i=zd(t);return(Math.max(r,i)+.05)/(Math.min(r,i)+.05)}function zd(e){e=$a(e);var t=e.type==="hsl"?$a(tw(e)).values:e.values;return t=t.map(function(r){return r/=255,r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)}),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Ia(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:.15;return zd(e)>.5?Vo(e,t):zo(e,t)}function jR(e,t){return tn(e,t)}function tn(e,t){return e=$a(e),t=Jj(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.values[3]=t,Ql(e)}function Vo(e,t){if(e=$a(e),t=Jj(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1)for(var r=0;r<3;r+=1)e.values[r]*=1-t;return Ql(e)}function zo(e,t){if(e=$a(e),t=Jj(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(var r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;return Ql(e)}var o_={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Vd.white,default:Ef[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},tg={text:{primary:Vd.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:Ef[800],default:"#303030"},action:{active:Vd.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function l_(e,t,r,i){var a=i.light||i,s=i.dark||i*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=zo(e.main,a):t==="dark"&&(e.dark=Vo(e.main,s)))}function V9(e){var t=e.primary,r=t===void 0?{light:fp[300],main:fp[500],dark:fp[700]}:t,i=e.secondary,a=i===void 0?{light:mp.A200,main:mp.A400,dark:mp.A700}:i,s=e.error,o=s===void 0?{light:gp[300],main:gp[500],dark:gp[700]}:s,l=e.warning,c=l===void 0?{light:vp[300],main:vp[500],dark:vp[700]}:l,h=e.info,u=h===void 0?{light:bp[300],main:bp[500],dark:bp[700]}:h,d=e.success,p=d===void 0?{light:yp[300],main:yp[500],dark:yp[700]}:d,f=e.type,m=f===void 0?"light":f,g=e.contrastThreshold,x=g===void 0?3:g,v=e.tonalOffset,b=v===void 0?.2:v,j=Be(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function w(E){var P=nw(E,tg.text.primary)>=x?tg.text.primary:o_.text.primary;return P}var S=function(P){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:500,N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:300,k=arguments.length>3&&arguments[3]!==void 0?arguments[3]:700;if(P=Z({},P),!P.main&&P[T]&&(P.main=P[T]),!P.main)throw new Error(Po(4,T));if(typeof P.main!="string")throw new Error(Po(5,JSON.stringify(P.main)));return l_(P,"light",N,b),l_(P,"dark",k,b),P.contrastText||(P.contrastText=w(P.main)),P},_={dark:tg,light:o_},C=hs(Z({common:Vd,type:m,primary:S(r),secondary:S(a,"A400","A200","A700"),error:S(o),warning:S(c),info:S(u),success:S(p),grey:Ef,contrastThreshold:x,getContrastText:w,augmentColor:S,tonalOffset:b},_[m]),j);return C}function wR(e){return Math.round(e*1e5)/1e5}function z9(e){return wR(e)}var c_={textTransform:"uppercase"},d_='"Roboto", "Helvetica", "Arial", sans-serif';function H9(e,t){var r=typeof t=="function"?t(e):t,i=r.fontFamily,a=i===void 0?d_:i,s=r.fontSize,o=s===void 0?14:s,l=r.fontWeightLight,c=l===void 0?300:l,h=r.fontWeightRegular,u=h===void 0?400:h,d=r.fontWeightMedium,p=d===void 0?500:d,f=r.fontWeightBold,m=f===void 0?700:f,g=r.htmlFontSize,x=g===void 0?16:g,v=r.allVariants,b=r.pxToRem,j=Be(r,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),w=o/14,S=b||function(E){return"".concat(E/x*w,"rem")},_=function(P,T,N,k,I){return Z({fontFamily:a,fontWeight:P,fontSize:S(T),lineHeight:N},a===d_?{letterSpacing:"".concat(wR(k/T),"em")}:{},I,v)},C={h1:_(c,96,1.167,-1.5),h2:_(c,60,1.2,-.5),h3:_(u,48,1.167,0),h4:_(u,34,1.235,.25),h5:_(u,24,1.334,0),h6:_(p,20,1.6,.15),subtitle1:_(u,16,1.75,.15),subtitle2:_(p,14,1.57,.1),body1:_(u,16,1.5,.15),body2:_(u,14,1.43,.15),button:_(p,14,1.75,.4,c_),caption:_(u,12,1.66,.4),overline:_(u,12,2.66,1,c_)};return hs(Z({htmlFontSize:x,pxToRem:S,round:z9,fontFamily:a,fontSize:o,fontWeightLight:c,fontWeightRegular:u,fontWeightMedium:p,fontWeightBold:m},C),j,{clone:!1})}var G9=.2,W9=.14,Y9=.12;function Wn(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(G9,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(W9,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(Y9,")")].join(",")}var K9=["none",Wn(0,2,1,-1,0,1,1,0,0,1,3,0),Wn(0,3,1,-2,0,2,2,0,0,1,5,0),Wn(0,3,3,-2,0,3,4,0,0,1,8,0),Wn(0,2,4,-1,0,4,5,0,0,1,10,0),Wn(0,3,5,-1,0,5,8,0,0,1,14,0),Wn(0,3,5,-1,0,6,10,0,0,1,18,0),Wn(0,4,5,-2,0,7,10,1,0,2,16,1),Wn(0,5,5,-3,0,8,10,1,0,3,14,2),Wn(0,5,6,-3,0,9,12,1,0,3,16,2),Wn(0,6,6,-3,0,10,14,1,0,4,18,3),Wn(0,6,7,-4,0,11,15,1,0,4,20,3),Wn(0,7,8,-4,0,12,17,2,0,5,22,4),Wn(0,7,8,-4,0,13,19,2,0,5,24,4),Wn(0,7,9,-4,0,14,21,2,0,5,26,4),Wn(0,8,9,-5,0,15,22,2,0,6,28,5),Wn(0,8,10,-5,0,16,24,2,0,6,30,5),Wn(0,8,11,-5,0,17,26,2,0,6,32,5),Wn(0,9,11,-5,0,18,28,2,0,7,34,6),Wn(0,9,12,-6,0,19,29,2,0,7,36,6
8),Wn(0,10,13,-6,0,20,31,3,0,8,38,7),Wn(0,10,13,-6,0,21,33,3,0,8,40,7),Wn(0,10,14,-6,0,22,35,3,0,8,42,7),Wn(0,11,14,-7,0,23,36,3,0,9,44,8),Wn(0,11,15,-7,0,24,38,3,0,9,46,8)],X9={borderRadius:4};function Mp(e,t){return t?hs(e,t,{clone:!1}):e}var Q9={xs:0,sm:600,md:960,lg:1280,xl:1920},u_={keys:["xs","sm","md","lg","xl"],up:function(t){return"@media (min-width:".concat(Q9[t],"px)")}};function SR(e,t,r){if(Array.isArray(t)){var i=e.theme.breakpoints||u_;return t.reduce(function(o,l,c){return o[i.up(i.keys[c])]=r(t[c]),o},{})}if(To(t)==="object"){var a=e.theme.breakpoints||u_;return Object.keys(t).reduce(function(o,l){return o[a.up(l)]=r(t[l]),o},{})}var s=r(t);return s}function h_(e,t){return!t||typeof t!="string"?null:t.split(".").reduce(function(r,i){return r&&r[i]?r[i]:null},e)}function xt(e){var t=e.prop,r=e.cssProperty,i=r===void 0?e.prop:r,a=e.themeKey,s=e.transform,o=function(c){if(c[t]==null)return null;var h=c[t],u=c.theme,d=h_(u,a)||{},p=function(m){var g;return typeof d=="function"?g=d(m):Array.isArray(d)?g=d[m]||m:(g=h_(d,m)||m,s&&(g=s(g))),i===!1?g:Ct({},i,g)};return SR(c,h,p)};return o.propTypes={},o.filterProps=[t],o}function gs(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=function(s){return t.reduce(function(o,l){var c=l(s);return c?Mp(o,c):o},{})};return i.propTypes={},i.filterProps=t.reduce(function(a,s){return a.concat(s.filterProps)},[]),i}function ou(e){return typeof e!="number"?e:"".concat(e,"px solid")}var Z9=xt({prop:"border",themeKey:"borders",transform:ou}),J9=xt({prop:"borderTop",themeKey:"borders",transform:ou}),eH=xt({prop:"borderRight",themeKey:"borders",transform:ou}),tH=xt({prop:"borderBottom",themeKey:"borders",transform:ou}),nH=xt({prop:"borderLeft",themeKey:"borders",transform:ou}),rH=xt({prop:"borderColor",themeKey:"palette"}),iH=xt({prop:"borderRadius",themeKey:"shape"}),aH=gs(Z9,J9,eH,tH,nH,rH,iH);function p_(e,t){var r={};return Object.keys(e).forEach(function(i){t.indexOf(i)===-1&&(r[i]=e[i])}),r}function sH(e){var t=function(i){var a=e(i);return i.css?Z({},Mp(a,e(Z({theme:i.theme},i.css))),p_(i.css,[e.filterProps])):i.sx?Z({},Mp(a,e(Z({theme:i.theme},i.sx))),p_(i.sx,[e.filterProps])):a};return t.propTypes={},t.filterProps=["css","sx"].concat(xr(e.filterProps)),t}var oH=xt({prop:"displayPrint",cssProperty:!1,transform:function(t){return{"@media print":{display:t}}}}),lH=xt({prop:"display"}),cH=xt({prop:"overflow"}),dH=xt({prop:"textOverflow"}),uH=xt({prop:"visibility"}),hH=xt({prop:"whiteSpace"});const pH=gs(oH,lH,cH,dH,uH,hH);var fH=xt({prop:"flexBasis"}),mH=xt({prop:"flexDirection"}),gH=xt({prop:"flexWrap"}),vH=xt({prop:"justifyContent"}),bH=xt({prop:"alignItems"}),yH=xt({prop:"alignContent"}),xH=xt({prop:"order"}),jH=xt({prop:"flex"}),wH=xt({prop:"flexGrow"}),SH=xt({prop:"flexShrink"}),_H=xt({prop:"alignSelf"}),CH=xt({prop:"justifyItems"}),NH=xt({prop:"justifySelf"}),EH=gs(fH,mH,gH,vH,bH,yH,xH,jH,wH,SH,_H,CH,NH),TH=xt({prop:"gridGap"}),kH=xt({prop:"gridColumnGap"}),PH=xt({prop:"gridRowGap"}),IH=xt({prop:"gridColumn"}),DH=xt({prop:"gridRow"}),RH=xt({prop:"gridAutoFlow"}),OH=xt({prop:"gridAutoColumns"}),AH=xt({prop:"gridAutoRows"}),MH=xt({prop:"gridTemplateColumns"}),$H=xt({prop:"gridTemplateRows"}),LH=xt({prop:"gridTemplateAreas"}),FH=xt({prop:"gridArea"}),UH=gs(TH,kH,PH,IH,DH,RH,OH,AH,MH,$H,LH,FH),BH=xt({prop:"color",themeKey:"palette"}),qH=xt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette"}),VH=gs(BH,qH),zH=xt({prop:"position"}),HH=xt({prop:"zIndex",themeKey:"zIndex"}),GH=xt({prop:"top"}),WH=xt({prop:"right"}),YH=xt({prop:"bottom"}),KH=xt({prop:"left"});const XH=gs(zH,HH,GH,WH,YH,KH);var QH=xt({prop:"boxShadow",themeKey:"shadows"});function Zs(e){return e<=1?"".concat(e*100,"%"):e}var ZH=xt({prop:"width",transform:Zs}),JH=xt({prop:"maxWidth",transform:Zs}),e8=xt({prop:"minWidth",transform:Zs}),t8=xt({prop:"height",transform:Zs}),n8=xt({prop:"maxHeight",transform:Zs}),r8=xt({prop:"minHeight",transform:Zs});xt({prop:"size",cssProperty:"width",transform:Zs});xt({prop:"size",cssProperty:"height",transform:Zs});var i8=xt({prop:"boxSizing"}),a8=gs(ZH,JH,e8,t8,n8,r8,i8);function _R(e){if(Array.isArray(e))return e}function s8(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,a,s,o,l=[],c=!0,h=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(c=(i=s.call(r)).done)&&(l.push(i.value),l.length!==t);c=!0);}catch(u){h=!0,a=u}
8finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(h)throw a}}return l}}function CR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
9In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ci(e,t){return _R(e)||s8(e,t)||Yj(e,t)||CR()}function o8(e){var t={};return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var l8={m:"margin",p:"padding"},c8={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},f_={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},d8=o8(function(e){if(e.length>2)if(f_[e])e=f_[e];else return[e];var t=e.split(""),r=Ci(t,2),i=r[0],a=r[1],s=l8[i],o=c8[a]||"";return Array.isArray(o)?o.map(function(l){return s+l}):[s+o]}),NR=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function ER(e){var t=e.spacing||8;return typeof t=="number"?function(r){return t*r}:Array.isArray(t)?function(r){return t[r]}:typeof t=="function"?t:function(){}}function u8(e,t){if(typeof t=="string"||t==null)return t;var r=Math.abs(t),i=e(r);return t>=0?i:typeof i=="number"?-i:"-".concat(i)}function h8(e,t){return function(r){return e.reduce(function(i,a){return i[a]=u8(t,r),i},{})}}function rw(e){var t=e.theme,r=ER(t);return Object.keys(e).map(function(i){if(NR.indexOf(i)===-1)return null;var a=d8(i),s=h8(a,r),o=e[i];return SR(e,o,s)}).reduce(Mp,{})}rw.propTypes={};rw.filterProps=NR;var p8=xt({prop:"fontFamily",themeKey:"typography"}),f8=xt({prop:"fontSize",themeKey:"typography"}),m8=xt({prop:"fontStyle",themeKey:"typography"}),g8=xt({prop:"fontWeight",themeKey:"typography"}),v8=xt({prop:"letterSpacing"}),b8=xt({prop:"lineHeight"}),y8=xt({prop:"textAlign"}),x8=gs(p8,f8,m8,g8,v8,b8,y8);function j8(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:8;if(e.mui)return e;var t=ER({spacing:e}),r=function(){for(var a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];return s.length===0?t(1):s.length===1?t(s[0]):s.map(function(l){if(typeof l=="string")return l;var c=t(l);return typeof c=="number"?"".concat(c,"px"):c}).join(" ")};return Object.defineProperty(r,"unit",{get:function(){return e}}),r.mui=!0,r}var $p={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Rr={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function m_(e){return"".concat(Math.round(e),"ms")}const w8={easing:$p,duration:Rr,create:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["all"],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.duration,a=i===void 0?Rr.standard:i,s=r.easing,o=s===void 0?$p.easeInOut:s,l=r.delay,c=l===void 0?0:l;return Be(r,["duration","easing","delay"]),(Array.isArray(t)?t:[t]).map(function(h){return"".concat(h," ").concat(typeof a=="string"?a:m_(a)," ").concat(o," ").concat(typeof c=="string"?c:m_(c))}).join(",")},getAutoHeightDuration:function(t){if(!t)return 0;var r=t/36;return Math.round((4+15*Math.pow(r,.25)+r/5)*10)}};var TR={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function lu(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.breakpoints,r=t===void 0?{}:t,i=e.mixins,a=i===void 0?{}:i,s=e.palette,o=s===void 0?{}:s,l=e.spacing,c=e.typography,h=c===void 0?{}:c,u=Be(e,["breakpoints","mixins","palette","spacing","typography"]),d=V9(o),p=U9(r),f=j8(l),m=hs({breakpoints:p,direction:"ltr",mixins:B9(p,f,a),overrides:{},palette:d,props:{},shadows:K9,typography:H9(d,h),spacing:f,shape:X9,transitions:w8,zIndex:TR},u),g=arguments.length,x=new Array(g>1?g-1:0),v=1;v<g;v++)x[v-1]=arguments[v];return m=x.reduce(function(b,j){return hs(b,j)},m),m}function iw(){return lu.apply(void 0,arguments)}var cu=lu();function Ye(e,t){return F9(e,Z({defaultTheme:cu},t))}var S8=function(t){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:t.typography.pxToRem(24),transition:t.transitions.create("fill",{duration:t.transitions.duration.shorter})},colorPrimary:{color:t.palette.primary.main},colorSecondary:{color:t.palette.secondary.main},colorAction:{color:t.palette.action.active},colorError:{color:t.palette.error.main},colorDisabled:{color:t.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:t.typography.pxToRem(20)},fontSizeLarge:{fontSize:t.typography.pxToRem(35)}}},kR=y.forwardRef(function(t,r){var i=t.children,a=t.classes,s=t.className,o=t.color,l=o===void 0?"inherit":o,c=t.component,h=c===void 0?"svg":c,u=t.fontSize,d=u===void 0?"medium":u,p=t.htmlColor,f=t.titleAccess,m=t.viewBox,g=m===void 0?"0 0 24 24":m,x=Be(t,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return y.createElement(h,Z({className:$e(a.root,s,l!=="inherit"&&a["color".concat(ut(l))],d!=="default"&&d!=="medium"&&a["fontSize".concat(ut(d))]),focusable:"false",viewBox:g,color:p,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:r},x),i,f?y.createElement("title",null,f):null)});kR.muiName="SvgIcon";const Lp=Ye(S8,{name:"MuiSvgIcon"})(kR);function ar(e,t){var r=function(a,s){return Me.createElement(Lp,Z({ref:s},a),e)};return r.muiName=Lp.muiName,Me.memo(Me.forwardRef(r))}function La(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:166,r;function i(){for(var a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];var l=this,c=function(){e.apply(l,s)};clearTimeout(r),r=setTimeout(c,t)}return i.clear=function(){clearTimeout(r)},i}function PR(e,t){return function(){return null}}function ls(e,t){return y.isValidElement(e)&&t.indexOf(e.type.muiName)!==-1}function Ir(e){return e&&e.ownerDocument||document}function du(e){var t=Ir(e);return t.defaultView||window}function IR(e){return function(){return null}}function Bi(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function DR(e,t,r,i,a){return null}function vs(e){var t=e.controlled,r=e.default;e.name,e.state;var i=y.useRef(t!==void 0),a=i.current,s=y.useState(r),o=s[0],l=s[1],c=a?t:o,h=y.useCallback(function(u){a||l(u)},[]);return[c,h]}var _8=typeof window<"u"?y.useLayoutEffect:y.useEffect;function Un(e){var t=y.useRef(e);return _8(function(){t.current=e}),y.useCallback(function(){return t.current.apply(void 0,arguments)},[])}function mn(e,t){return y.useMemo(function(){return e==null&&t==null?null:function(r){Bi(e,r),Bi(t,r)}},[e,t])}function Rl(e){var t=y.useState(e),r=t[0],i=t[1],a=e||r;return y.useEffect(function(){r==null&&i("mui-".concat(Math.round(Math.random()*1e5)))},[r]),a}var Tf=!0,gx=!1,g_=null,C8={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function N8(e){var t=e.type,r=e.tagName;return!!(r==="INPUT"&&C8[t]&&!e.readOnly||r==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function E8(e){e.metaKey||e.altKey||e.ctrlKey||(Tf=!0)}function ng(){Tf=!1}function T8(){this.visibilityState==="hidden"&&gx&&(Tf=!0)}function k8(e){e.addEventListener("keydown",E8,!0),e.addEventListener("mousedown",ng,!0),e.addEventListener("pointerdown",ng,!0),e.addEventListener("touchstart",ng,!0),e.addEventListener("visibilitychange",T8,!0)}function P8(e){var t=e.target;try{return t.matches(":focus-visible")}catch{}return Tf||N8(t)}function I8(){gx=!0,window.clearTimeout(g_),g_=window.setTimeout(function(){gx=!1},100)}function Zl(){var e=y.useCallback(function(t){var r=Fr.findDOMNode(t);r!=null&&k8(r.ownerDocument)},[]);return{isFocusVisible:P8,onBlurVisible:I8,ref:e}}const D8=Object.freeze(Object.defineProperty({__proto__:null,capitalize:ut,createChainedFunction:Ma,createSvgIcon:ar,debounce:La,deprecatedPropType:PR,isMuiElement:ls,ownerDocument:Ir,ownerWindow:du,requirePropFactory:IR,setRef:Bi,unstable_useId:Rl,unsupportedProp:DR,useControlled:vs,useEventCallback:Un,useForkRef:mn,useIsFocusVisible:Zl},Symbol.toStringTag,{value:"Module"})),R8=Pn(D8);var v_;function yn(){return v_||(v_=1,(function(e){Object.defineProperty(e,"__esMo
9dule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=R8})(Vm)),Vm}var b_;function O8(){if(b_)return bc;b_=1;var e=vn(),t=bn();Object.defineProperty(bc,"__esModule",{value:!0}),bc.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm-2 16l-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z"}),"VerifiedUser");return bc.default=a,bc}var A8=O8();const M8=Zt(A8);var $8=function(t){return L8(t)&&!F8(t)};function L8(e){return!!e&&typeof e=="object"}function F8(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||q8(e)}var U8=typeof Symbol=="function"&&Symbol.for,B8=U8?Symbol.for("react.element"):60103;function q8(e){return e.$$typeof===B8}function V8(e){return Array.isArray(e)?[]:{}}function Fp(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Hd(V8(e),e,t):e}function z8(e,t,r){return e.concat(t).map(function(i){return Fp(i,r)})}function H8(e,t,r){var i={};return r.isMergeableObject(e)&&Object.keys(e).forEach(function(a){i[a]=Fp(e[a],r)}),Object.keys(t).forEach(function(a){!r.isMergeableObject(t[a])||!e[a]?i[a]=Fp(t[a],r):i[a]=Hd(e[a],t[a],r)}),i}function Hd(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||z8,r.isMergeableObject=r.isMergeableObject||$8;var i=Array.isArray(t),a=Array.isArray(e),s=i===a;return s?i?r.arrayMerge(e,t,r):H8(e,t,r):Fp(t,r)}Hd.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(i,a){return Hd(i,a,r)},{})};var vx=Hd,RR=typeof wo=="object"&&wo&&wo.Object===Object&&wo,G8=typeof self=="object"&&self&&self.Object===Object&&self,Va=RR||G8||Function("return this")(),zs=Va.Symbol,OR=Object.prototype,W8=OR.hasOwnProperty,Y8=OR.toString,xc=zs?zs.toStringTag:void 0;function K8(e){var t=W8.call(e,xc),r=e[xc];try{e[xc]=void 0;var i=!0}catch{}var a=Y8.call(e);return i&&(t?e[xc]=r:delete e[xc]),a}var X8=Object.prototype,Q8=X8.toString;function Z8(e){return Q8.call(e)}var J8="[object Null]",e7="[object Undefined]",y_=zs?zs.toStringTag:void 0;function Ho(e){return e==null?e===void 0?e7:J8:y_&&y_ in Object(e)?K8(e):Z8(e)}function AR(e,t){return function(r){return e(t(r))}}var aw=AR(Object.getPrototypeOf,Object);function Go(e){return e!=null&&typeof e=="object"}var t7="[object Object]",n7=Function.prototype,r7=Object.prototype,MR=n7.toString,i7=r7.hasOwnProperty,a7=MR.call(Object);function x_(e){if(!Go(e)||Ho(e)!=t7)return!1;var t=aw(e);if(t===null)return!0;var r=i7.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&MR.call(r)==a7}function s7(){this.__data__=[],this.size=0}function $R(e,t){return e===t||e!==e&&t!==t}function kf(e,t){for(var r=e.length;r--;)if($R(e[r][0],t))return r;return-1}var o7=Array.prototype,l7=o7.splice;function c7(e){var t=this.__data__,r=kf(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():l7.call(t,r,1),--this.size,!0}function d7(e){var t=this.__data__,r=kf(t,e);return r<0?void 0:t[r][1]}function u7(e){return kf(this.__data__,e)>-1}function h7(e,t){var r=this.__data__,i=kf(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function bs(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}bs.prototype.clear=s7;bs.prototype.delete=c7;bs.prototype.get=d7;bs.prototype.has=u7;bs.prototype.set=h7;function p7(){this.__data__=new bs,this.size=0}function f7(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function m7(e){return this.__data__.get(e)}function g7(e){return this.__data__.has(e)}function uu(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var v7="[object AsyncFunction]",b7="[object Function]",y7="[object GeneratorFunction]",x7="[object Proxy]";function LR(e){if(!uu(e))return!1;var t=Ho(e);return t==b7||t==y7||t==v7||t==x7}var rg=Va["__core-js_shared__"],j_=(function(){var e=/[^.]+$/.exec(rg&&rg.keys&&rg.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function j7(e){return!!j_&&j_ in e}var w7=Function.prototype,S7=w7.toString;function Wo(e){if(e!=null){try{return S7.call(e)}catch{}try{return e+""}catch{}}return""}var _7=/[\\^$.*+?()[\]{}|]/g,C7=/^\[object .+?Constructor\]$/,N7=Function.prototype,E7=Object.prototype,T7=N7.toString,k7=E7.hasOwnProperty,P7=RegExp("^"+T7.call(k7).replace(_7,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function I7(e){if(!uu(e)||j7(e))return!1;var t=LR(e)?P7:C7;return t.test(Wo(e))}function D7(e,t){return e?.[t]}function Yo(e,t){var r=D7(e,t);return I7(r)?r:void 0}var Gd=Yo(Va,"Map"),Wd=Yo(Object,"create");function R7(){this.__data__=Wd?Wd(null):{},this.size=0}function O7(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var A7="__lodash_hash_undefined__",M7=Object.prototype,$7=M7.hasOwnProperty;function L7(e){var t=this.__data__;if(Wd){var r=t[e];return r===A7?void 0:r}return $7.call(t,e)?t[e]:void 0}var F7=Object.prototype,U7=F7.hasOwnProperty;function B7(e){var t=this.__data__;return Wd?t[e]!==void 0:U7.call(t,e)}var q7="__lodash_hash_undefined__";function V7(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Wd&&t===void 0?q7:t,this}function Io(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Io.prototype.clear=R7;Io.prototype.delete=O7;Io.prototype.get=L7;Io.prototype.has=B7;Io.prototype.set=V7;function z7(){this.size=0,this.__data__={hash:new Io,map:new(Gd||bs),string:new Io}}function H7(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Pf(e,t){var r=e.__data__;return H7(t)?r[typeof t=="string"?"string":"hash"]:r.map}function G7(e){var t=Pf(this,e).delete(e);return this.size-=t?1:0,t}function W7(e){return Pf(this,e).get(e)}function Y7(e){return Pf(this,e).has(e)}function K7(e,t){var r=Pf(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function Js(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Js.prototype.clear=z7;Js.prototype.delete=G7;Js.prototype.get=W7;Js.prototype.has=Y7;Js.prototype.set=K7;var X7=200;function Q7(e,t){var r=this.__data__;if(r instanceof bs){var i=r.__data__;if(!Gd||i.length<X7-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Js(i)}return r.set(e,t),this.size=r.size,this}function Jl(e){var t=this.__data__=new bs(e);this.size=t.size}Jl.prototype.clear=p7;Jl.prototype.delete=f7;Jl.prototype.get=m7;Jl.prototype.has=g7;Jl.prototype.set=Q7;function Z7(e,t){for(var r=-1,i=e==null?0:e.length;++r<i&&t(e[r],r,e)!==!1;);return e}var w_=(function(){try{var e=Yo(Object,"defineProperty");return e({},"",{}),e}catch{}})();function FR(e,t,r){t=="__proto__"&&w_?w_(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var J7=Object.prototype,eG=J7.hasOwnProperty;function UR(e,t,r){var i=e[t];(!(eG.call(e,t)&&$R(i,r))||r===void 0&&!(t in e))&&FR(e,t,r)}
vendor: 22,902 bytes, line 9
9function If(e,t,r,i){var a=!r;r||(r={});for(var s=-1,o=t.length;++s<o;){var l=t[s],c=void 0;c===void 0&&(c=e[l]),a?FR(r,l,c):UR(r,l,c)}return r}function tG(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var nG="[object Arguments]";function S_(e){return Go(e)&&Ho(e)==nG}var BR=Object.prototype,rG=BR.hasOwnProperty,iG=BR.propertyIsEnumerable,aG=S_((function(){return arguments})())?S_:function(e){return Go(e)&&rG.call(e,"callee")&&!iG.call(e,"callee")},hu=Array.isArray;function sG(){return!1}var qR=typeof exports=="object"&&exports&&!exports.nodeType&&exports,__=qR&&typeof module=="object"&&module&&!module.nodeType&&module,oG=__&&__.exports===qR,C_=oG?Va.Buffer:void 0,lG=C_?C_.isBuffer:void 0,VR=lG||sG,cG=9007199254740991,dG=/^(?:0|[1-9]\d*)$/;function uG(e,t){var r=typeof e;return t=t??cG,!!t&&(r=="number"||r!="symbol"&&dG.test(e))&&e>-1&&e%1==0&&e<t}var hG=9007199254740991;function zR(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=hG}var pG="[object Arguments]",fG="[object Array]",mG="[object Boolean]",gG="[object Date]",vG="[object Error]",bG="[object Function]",yG="[object Map]",xG="[object Number]",jG="[object Object]",wG="[object RegExp]",SG="[object Set]",_G="[object String]",CG="[object WeakMap]",NG="[object ArrayBuffer]",EG="[object DataView]",TG="[object Float32Array]",kG="[object Float64Array]",PG="[object Int8Array]",IG="[object Int16Array]",DG="[object Int32Array]",RG="[object Uint8Array]",OG="[object Uint8ClampedArray]",AG="[object Uint16Array]",MG="[object Uint32Array]",Hn={};Hn[TG]=Hn[kG]=Hn[PG]=Hn[IG]=Hn[DG]=Hn[RG]=Hn[OG]=Hn[AG]=Hn[MG]=!0;Hn[pG]=Hn[fG]=Hn[NG]=Hn[mG]=Hn[EG]=Hn[gG]=Hn[vG]=Hn[bG]=Hn[yG]=Hn[xG]=Hn[jG]=Hn[wG]=Hn[SG]=Hn[_G]=Hn[CG]=!1;function $G(e){return Go(e)&&zR(e.length)&&!!Hn[Ho(e)]}function sw(e){return function(t){return e(t)}}var HR=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Dd=HR&&typeof module=="object"&&module&&!module.nodeType&&module,LG=Dd&&Dd.exports===HR,ig=LG&&RR.process,Ol=(function(){try{var e=Dd&&Dd.require&&Dd.require("util").types;return e||ig&&ig.binding&&ig.binding("util")}catch{}})(),N_=Ol&&Ol.isTypedArray,FG=N_?sw(N_):$G,UG=Object.prototype,BG=UG.hasOwnProperty;function GR(e,t){var r=hu(e),i=!r&&aG(e),a=!r&&!i&&VR(e),s=!r&&!i&&!a&&FG(e),o=r||i||a||s,l=o?tG(e.length,String):[],c=l.length;for(var h in e)(t||BG.call(e,h))&&!(o&&(h=="length"||a&&(h=="offset"||h=="parent")||s&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||uG(h,c)))&&l.push(h);return l}var qG=Object.prototype;function ow(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||qG;return e===r}var VG=AR(Object.keys,Object),zG=Object.prototype,HG=zG.hasOwnProperty;function GG(e){if(!ow(e))return VG(e);var t=[];for(var r in Object(e))HG.call(e,r)&&r!="constructor"&&t.push(r);return t}function WR(e){return e!=null&&zR(e.length)&&!LR(e)}function lw(e){return WR(e)?GR(e):GG(e)}function WG(e,t){return e&&If(t,lw(t),e)}function YG(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var KG=Object.prototype,XG=KG.hasOwnProperty;function QG(e){if(!uu(e))return YG(e);var t=ow(e),r=[];for(var i in e)i=="constructor"&&(t||!XG.call(e,i))||r.push(i);return r}function cw(e){return WR(e)?GR(e,!0):QG(e)}function ZG(e,t){return e&&If(t,cw(t),e)}var YR=typeof exports=="object"&&exports&&!exports.nodeType&&exports,E_=YR&&typeof module=="object"&&module&&!module.nodeType&&module,JG=E_&&E_.exports===YR,T_=JG?Va.Buffer:void 0,k_=T_?T_.allocUnsafe:void 0;function eW(e,t){if(t)return e.slice();var r=e.length,i=k_?k_(r):new e.constructor(r);return e.copy(i),i}function KR(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}function tW(e,t){for(var r=-1,i=e==null?0:e.length,a=0,s=[];++r<i;){var o=e[r];t(o,r,e)&&(s[a++]=o)}return s}function XR(){return[]}var nW=Object.prototype,rW=nW.propertyIsEnumerable,P_=Object.getOwnPropertySymbols,dw=P_?function(e){return e==null?[]:(e=Object(e),tW(P_(e),function(t){return rW.call(e,t)}))}:XR;function iW(e,t){return If(e,dw(e),t)}function QR(e,t){for(var r=-1,i=t.length,a=e.length;++r<i;)e[a+r]=t[r];return e}var aW=Object.getOwnPropertySymbols,ZR=aW?function(e){for(var t=[];e;)QR(t,dw(e)),e=aw(e);return t}:XR;function sW(e,t){return If(e,ZR(e),t)}function JR(e,t,r){var i=t(e);return hu(e)?i:QR(i,r(e))}function oW(e){return JR(e,lw,dw)}function lW(e){return JR(e,cw,ZR)}var bx=Yo(Va,"DataView"),yx=Yo(Va,"Promise"),xx=Yo(Va,"Set"),jx=Yo(Va,"WeakMap"),I_="[object Map]",cW="[object Object]",D_="[object Promise]",R_="[object Set]",O_="[object WeakMap]",A_="[object DataView]",dW=Wo(bx),uW=Wo(Gd),hW=Wo(yx),pW=Wo(xx),fW=Wo(jx),ss=Ho;(bx&&ss(new bx(new ArrayBuffer(1)))!=A_||Gd&&ss(new Gd)!=I_||yx&&ss(yx.resolve())!=D_||xx&&ss(new xx)!=R_||jx&&ss(new jx)!=O_)&&(ss=function(e){var t=Ho(e),r=t==cW?e.constructor:void 0,i=r?Wo(r):"";if(i)switch(i){case dW:return A_;case uW:return I_;case hW:return D_;case pW:return R_;case fW:return O_}return t});var mW=Object.prototype,gW=mW.hasOwnProperty;function vW(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&gW.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var M_=Va.Uint8Array;function uw(e){var t=new e.constructor(e.byteLength);return new M_(t).set(new M_(e)),t}function bW(e,t){var r=t?uw(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var yW=/\w*$/;function xW(e){var t=new e.constructor(e.source,yW.exec(e));return t.lastIndex=e.lastIndex,t}var $_=zs?zs.prototype:void 0,L_=$_?$_.valueOf:void 0;function jW(e){return L_?Object(L_.call(e)):{}}function wW(e,t){var r=t?uw(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var SW="[object Boolean]",_W="[object Date]",CW="[object Map]",NW="[object Number]",EW="[object RegExp]",TW="[object Set]",kW="[object String]",PW="[object Symbol]",IW="[object ArrayBuffer]",DW="[object DataView]",RW="[object Float32Array]",OW="[object Float64Array]",AW="[object Int8Array]",MW="[object Int16Array]",$W="[object Int32Array]",LW="[object Uint8Array]",FW="[object Uint8ClampedArray]",UW="[object Uint16Array]",BW="[object Uint32Array]";function qW(e,t,r){var i=e.constructor;switch(t){case IW:return uw(e);case SW:case _W:return new i(+e);case DW:return bW(e,r);case RW:case OW:case AW:case MW:case $W:case LW:case FW:case UW:case BW:return wW(e,r);case CW:return new i;case NW:case kW:return new i(e);case EW:return xW(e);case TW:return new i;case PW:return jW(e)}}var F_=Object.create,VW=(function(){function e(){}return function(t){if(!uu(t))return{};if(F_)return F_(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function zW(e){return typeof e.constructor=="function"&&!ow(e)?VW(aw(e)):{}}var HW="[object Map]";function GW(e){return Go(e)&&ss(e)==HW}var U_=Ol&&Ol.isMap,WW=U_?sw(U_):GW,YW="[object Set]";function KW(e){return Go(e)&&ss(e)==YW}var B_=Ol&&Ol.isSet,XW=B_?sw(B_):KW,QW=1,ZW=2,JW=4,eO="[object Arguments]",eY="[object Array]",tY="[object Boolean]",nY="[object Date]",rY="[object Error]",tO="[object Function]",iY="[object GeneratorFunction]",aY="[object Map]",sY="[object Number]",nO="[object Object]",oY="[object RegExp]",lY="[object Set]",cY="[object String]",dY="[object Symbol]",uY="[object WeakMap]",hY="[object ArrayBuffer]",pY="[object DataView]",fY="[object Float32Array]",mY="[object Float64Array]",gY="[object Int8Array]",vY="[object Int16Array]",bY="[object Int32Array]",yY="[object Uint8Array]",xY="[object Uint8ClampedArray]",jY="[object Uint16Array]",wY="[object Uint32Array]",qn={};qn[eO]=qn[eY]=qn[hY]=qn[pY]=qn[tY]=qn[nY]=qn[fY]=qn[mY]=qn[gY]=qn[vY]=qn[bY]=qn[aY]=qn[sY]=qn[nO]=qn[oY]=qn[lY]=qn[cY]=qn[dY]=qn[yY]=qn[xY]=qn[jY]=qn[wY]=!0;qn[rY]=qn[tO]=qn[uY]=!1;function Rd(e,t,r,i,a,s){var o,l=t&QW,c=t&ZW,h=t&JW;if(o!==void 0)return o;if(!uu(e))return e;var u=hu(e);if(u){if(o=vW(e),!l)return KR(e,o)}else{var d=ss(e),p=d==tO||d==iY;if(VR(e))return eW(e,l);if(d==nO||d==eO||p&&!a){if(o=c||p?{}:zW(e),!l)return c?sW(e,ZG(o,e)):iW(e,WG(o,e))}else{if(!qn[d])return a?e:{};o=qW(e,d,l)}}s||(s=new Jl);var f=s.get(e);if(f)return f;s.set(e,o),XW(e)?e.forEach(function(x){o.add(Rd(x,t,r,x,e,s))}):WW(e)&&e.forEach(function(x,v){o.set(v,Rd(x,t,r,v,e,s))});var m=h?c?lW:oW:c?cw:lw,g=u?void 0:m(e);return Z7(g||e,function(x,v){g&&(v=x,x=e[v]),UR(o,v,Rd(x,t,r,v,e,s))}),o}var SY=1,_Y=4;function xd(e){return Rd(e,SY|_Y)}var ag,q_;function CY(){if(q_)return ag;q_=1;var e=Array.isArray,t=Object.keys,r=Object.prototype.hasOwnProperty,i=typeof Element<"u";function a(s,o){if(s===o)return!0;if(s&&o&&typeof s=="object"&&typeof o=="object"){var l=e(s),c=e(o),h,u,d;if(l&&c){if(u=s.length,u!=o.length)return!1;for(h=u;h--!==0;)if(!a(s[h],o[h]))return!1;return!0}if(l!=c)return!1;var p=s instanceof Date,f=o instanceof Date;if(p!=f)return!1;if(p&&f)return s.getTime()==o.getTime();var m=s instanceof RegExp,g=o instanceof RegExp;if(m!=g)return!1;if(m&&g)return s.toString()==o.toString();var x=t(s);if(u=x.length,u!==t(o).length)return!1;for(h=u;h--!==0;)if(!r.call(o,x[h]))return!1;if(i&&s instanceof Element&&o instanceof Element)return s===o;for(h=u;h--!==0;)if(d=x[h],!(d==="_owner"&&s.$$typeof)&&!a(s[d],o[d]))return!1;return!0}return s!==s&&o!==o}return ag=function(o,l){try{return a(o,l)}catch(c){if(c.message&&c.message.match(/stack|recursion/i)||c.number===-2146828260)return!1;throw c}},ag}var NY=CY();const Ds=Zt(NY);var EY=4;function V_(e){return Rd(e,EY)}function rO(e,t){for(var r=-1,i=e==null?0:e.length,a=Array(i);++r<i;)a[r]=t(e[r],r,e);return a}var TY="[object Symbol]";function hw(e){return typeof e=="symbol"||Go(e)&&Ho(e)==TY}var kY="Expected a function";function pw(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(kY);var r=function(){var i=arguments,a=t?t.apply(this,i):i[0],s=r.cache;if(s.has(a))return s.get(a);var o=e.apply(this,i);return r.cache=s.set(a,o)||s,o};return r.cache=new(pw.Cache||Js),r}pw.Cache=Js;var PY=500;function IY(e){var t=pw(e,function(i){return r.size===PY&&r.clear(),i}),r=t.cache;return t}var DY=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,RY=/\\(\\)?/g,OY=IY(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(DY,function(r,i,a,s){t.push(a?s.replace(RY,"$1"):i||r)}),t});function AY(e){if(typeof e=="string"||hw(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var z_=zs?zs.prototype:void 0,H_=z_?z_.toString:void 0;function iO(e){if(typeof e=="string")return e;if(hu(e))return rO(e,iO)+"";if(hw(e))return H_?H_.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function MY(e){return e==null?"":iO(e)}function aO(e){return hu(e)?rO(e,AY):hw(e)?[e]:KR(OY(MY(e)))}function An(){return An=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},An.apply(this,arguments)}function $Y(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function So(e,t){if(e==null)return{};var r={},i=Object.keys(e),a,s;for(s=0;s<i.length;s++)a=i[s],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function G_(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Df=y.createContext(void 0);Df.displayName="FormikContext";var LY=Df.Provider,FY=Df.Consumer;function sO(){var e=y.useContext(Df);return e}var W_=function(t){return Array.isArray(t)&&t.length===0},Zr=function(t){return typeof t=="function"},pu=function(t){return t!==null&&typeof t=="object"},UY=function(t){return String(Math.floor(Number(t)))===t},sg=function(t){return Object.prototype.toString.call(t)==="[object String]"},oO=function(t){return y.Children.count(t)===0},og=function(t){return pu(t)&&Zr(t.then)};function Pr(e,t,r,i){i===void 0&&(i=0);for(var a=aO(t);e&&i<a.length;)e=e[a[i++]];return i!==a.length&&!e||e===void 0?r:e}function Da(e,t,r){for(var i=V_(e),a=i,s=0,o=aO(t);s<o.length-1;s++){var l=o[s],c=Pr(e,o.slice(0,s+1));if(c&&(pu(c)||Array.isArray(c)))a=a[l]=V_(c);else{var h=o[s+1];a=a[l]=UY(h)&&Number(h)>=0?[]:{}}}return(s===0?e:a)[o[s]]===r?e:(r===void 0?delete a[o[s]]:a[o[s]]=r,s===0&&r===void 0&&delete i[o[s]],i)}function lO(e,t,r,i){r===void 0&&(r=new WeakMap),i===void 0&&(i={});for(var a=0,s=Object.keys(e);a<s.length;a++){var o=s[a],l=e[o];pu(l)?r.get(l)||(r.set(l,!0),i[o]=Array.isArray(l)?[]:{},lO(l,t,r,i[o])):i[o]=t}return i}function BY(e,t){switch(t.type){case"SET_VALUES":return An({},e,{values:t.payload});case"SET_TOUCHED":return An({},e,{touched:t.payload});case"SET_ERRORS":return Ds(e.errors,t.payload)?e:An({},e,{errors:t.payload});case"SET_STATUS":return An({},e,{status:t.payload});case"SET_ISSUBMITTING":return An({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return An({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return An({},e,{values:Da(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return An({},e,{touched:Da(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return An({},e,{errors:Da(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return An({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return An({},e,{touched:lO(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return An({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return An({},e,{isSubmitting:!1});default:return e}}var co={},Ku={};function qY(e){var t=e.validateOnChange,r=t===void 0?!0:t,i=e.validateOnBlur,a=i===void 0?!0:i,s=e.validateOnMount,o=s===void 0?!1:s,l=e.isInitialValid,c=e.enableReinitialize,h=c===void 0?!1:c,u=e.onSubmit,d=So(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),p=An({validateOnChange:r,validateOnBlur:a,validateOnMount:o,onSubmit:u},d),f=y.useRef(p.initialValues),m=y.useRef(p.initialErrors||co),g=y.useRef(p.initialTouched||Ku),x=y.useRef(p.initialStatus),v=y.useRef(!1),b=y.useRef({});y.useEffect(function(){return v.current=!0,function(){v.current=!1}},[]);var j=y.useState(0),w=j[1],S=y.useRef({values:xd(p.initialValues),errors:xd(p.initialErrors)||co,touched:xd(p.initialTouched)||Ku,status:xd(p.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),_=S.current,C=y.useCallback(function(ae){var Q=S.current;S.current=BY(Q,ae),Q!==S.current&&w(function(ee){return ee+1})},[]),E=y.useCallback(function(ae,Q){return new Promise(function(ee,oe){var Pe=p.validate(ae,Q);Pe==null?ee(co):og(Pe)?Pe.then(function(Fe){ee(Fe||co)},function(Fe){oe(Fe)}):ee(Pe)})},[p.validate]),P=y.useCallback(function(ae,Q){var ee=p.validationSchema,oe=Zr(ee)?ee(Q):ee,Pe=Q&&oe.validateAt?oe.validateAt(Q,ae):zY(ae,oe);return new Promise(function(Fe,Ie){Pe.then(function(){Fe(co)},function(Re){Re.name==="ValidationError"?Fe(VY(Re)):Ie(Re)})})},[p.validationSchema]),T=y.useCallback(function(ae,Q){return new Promise(function(ee){return ee(b.current[ae].validate(Q))})},[]),N=y.useCallback(function(ae){var Q=Object.keys(b.current).filter(function(oe){return Zr(b.current[oe].validate)}),ee=Q.length>0?Q.map(function(oe){return T(oe,Pr(ae,oe))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(ee).then(function(oe){return oe.reduce(function(Pe,Fe,Ie){return Fe==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||Fe&&(Pe=Da(Pe,Q[Ie],Fe)),Pe},{})})},[T]),k=y.useCallback(function(ae){return Promise.all([N(ae),p.validationSchema?P(ae):{},p.validate?E(ae):{}]).then(function(Q){var ee=Q[0],oe=Q[1],Pe=Q[2],Fe=vx.all([ee,oe,Pe],{arrayMerge:HY});return Fe})},[p.validate,p.validationSchema,N,E,P]),I=Zi(function(ae){return ae===void 0&&(ae=_.values),C({type:"SET_ISVALIDATING",payload:!0}),k(ae).then(function(Q){return v.current&&(C({type:"SET_ISVALIDATING",payload:!1}),C({type:"SET_ERRORS",payload:Q})),Q})});y.useEffect(function(){o&&v.current===!0&&Ds(f.current,p.initialValues)&&I(f.current)},[o,I]);var D=y.useCallback(function(ae){var Q=ae&&ae.values?ae.values:f.current,ee=ae&&ae.errors?ae.errors:m.current?m.current:p.initialErrors||{},oe=ae&&ae.touched?ae.touched:g.current?g.current:p.initialTouched||{},Pe=ae&&ae.status?ae.status:x.current?x.current:p.initialStatus;f.current=Q,m.current=ee,g.current=oe,x.current=Pe;var Fe=function(){C({type:"RESET_FORM",payload:{isSubmitting:!!ae&&!!ae.isSubmitting,errors:ee,touched:oe,status:Pe,values:Q,isValidating:!!ae&&!!ae.isValidating,submitCount:ae&&ae.submitCount&&typeof ae.submitCount=="number"?ae.submitCount:0}})};if(p.onReset){var Ie=p.onReset(_.values,ve);og(Ie)?Ie.then(Fe):Fe()}else Fe()},[p.initialErrors,p.initialStatus,p.initialTouched,p.onReset]);y.useEffect(function(){v.current===!0&&!Ds(f.current,p.initialValues)&&h&&(f.current=p.initialValues,D(),o&&I(f.current))},[h,p.initialValues,D,o,I]),y.useEffect(function(){h&&v.current===!0&&!Ds(m.current,p.initialErrors)&&(m.current=p.initialErrors||co,C({type:"SET_ERRORS",payload:p.initialErrors||co}))},[h,p.initialErrors]),y.useEffect(function(){h&&v.current===!0&&!Ds(g.current,p.initialTouched)&&(g.current=p.initialTouched||Ku,C({type:"SET_TOUCHED",payload:p.initialTouched||Ku}))},[h,p.initialTouched]),y.useEffect(function(){h&&v.current===!0&&!Ds(x.current,p.initialStatus)&&(x.current=p.initialStatus,C({type:"SET_STATUS",payload:p.initialStatus}))},[h,p.initialStatus,p.initialTouched]);var O=Zi(function(ae){if(b.current[ae]&&Zr(b.current[ae].validate)){var Q=Pr(_.values,ae),ee=b.current[ae].validate(Q);return og(ee)?(C({type:"SET_ISVALIDATING",payload:!0}),ee.then(function(oe){return oe}).then(function(oe){C({type:"SET_FIELD_ERROR",payload:{field:ae,value:oe}}),C({type:"SET_ISVALIDATING",payload:!1})})):(C({type:"SET_FIELD_ERROR",payload:{field:ae,value:ee}}),Promise.resolve(ee))}else if(p.validationSchema)return C({type:"SET_ISVALIDATING",payload:!0}),P(_.values,ae).then(function(oe){return oe}).then(function(oe){C({type:"SET_FIELD_ERROR",payload:{field:ae,value:Pr(oe,ae)}}),C({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),$=y.useCallback(function(ae,Q){var ee=Q.validate;b.current[ae]={validate:ee}},[]),U=y.useCallback(function(ae){delete b.current[ae]},[]),B=Zi(function(ae,Q){C({type:"SET_TOUCHED",payload:ae});var ee=Q===void 0?a:Q;return ee?I(_.values):Promise.resolve()}),L=y.useCallback(function(ae){C({type:"SET_ERRORS",payload:ae})},[]),A=Zi(function(ae,Q){var ee=Zr(ae)?ae(_.values):ae;C({type:"SET_VALUES",payload:ee});var oe=Q===void 0?r:Q;return oe?I(ee):Promise.resolve()}),R=y.useCallback(function(ae,Q){C({type:"SET_FIELD_ERROR",payload:{field:ae,value:Q}})},[]),F=Zi(function(ae,Q,ee){var oe=Zr(Q)?Q(Pr(_.values,ae)):Q;C({type:"SET_FIELD_VALUE",payload:{field:ae,value:oe}});var Pe=ee===void 0?r:ee;return Pe?I(Da(_.values,ae,oe)):Promise.resolve()}),q=y.useCallback(function(ae,Q){var ee=Q,oe=ae,Pe;if(!sg(ae)){ae.persist&&ae.persist();var Fe=ae.target?ae.target:ae.currentTarget,Ie=Fe.type,Re=Fe.name,Ve=Fe.id,Xe=Fe.value,et=Fe.checked;Fe.outerHTML;var rt=Fe.options,bt=Fe.multiple;ee=Q||Re||Ve,oe=/number|range/.test(Ie)?(Pe=parseFloat(Xe),isNaN(Pe)?"":Pe):/checkbox/.test(Ie)?WY(Pr(_.values,ee),et,Xe):rt&&bt?GY(rt):Xe}ee&&F(ee,oe)},[F,_.values]),V=Zi(function(ae){if(sg(ae))return function(Q){return q(Q,ae)};q(ae)}),X=Zi(function(ae,Q,ee){Q===void 0&&(Q=!0),C({type:"SET_FIELD_TOUCHED",payload:{field:ae,value:Q}});var oe=ee===void 0?a:ee;return oe?I(_.values):Promise.resolve()}),M=y.useCallback(function(ae,Q){ae.persist&&ae.persist();var ee=ae.target,oe=ee.name,Pe=ee.id;ee.outerHTML;var Fe=Q||oe||Pe;X(Fe,!0)},[X]),W=Zi(function(ae){if(sg(ae))return function(Q){return M(Q,ae)};M(ae)}),K=y.useCallback(function(ae){Zr(ae)?C({type:"SET_FORMIK_STATE",payload:ae}):C({type:"SET_FORMIK_STATE",payload:function(){return ae}})},[]),z=y.useCallback(function(ae){C({type:"SET_STATUS",payload:ae})},[]),Y=y.useCallback(function(ae){C({type:"SET_ISSUBMITTING",payload:ae})},[]),ie=Zi(function(){return C({type:"SUBMIT_ATTEMPT"}),I().then(function(ae){var Q=ae instanceof Error,ee=!Q&&Object.keys(ae).length===0;if(ee){var oe;try{if(oe=pe(),oe===void 0)return}catch(Pe){throw Pe}return Promise.resolve(oe).then(function(Pe){return v.current&&C({type:"SUBMIT_SUCCESS"}),Pe}).catch(function(Pe){if(v.current)throw C({type:"SUBMIT_FAILURE"}),Pe})}else if(v.current&&(C({type:"SUBMIT_FAILURE"}),Q))throw ae})}),ne=Zi(function(ae){ae&&ae.preventDefault&&Zr(ae.preventDefault)&&ae.preventDefault(),ae&&ae.stopPropagation&&Zr(ae.stopPropagation)&&ae.stopPropagation(),ie().catch(function(Q){})}),ve={resetForm:D,validateForm:I,validateField:O,setErrors:L,setFieldError:R,setFieldTouched:X,setFieldValue:F,setStatus:z,setSubmitting:Y,setTouched:B,setValues:A,setFormikState:K,submitForm:ie},pe=Zi(function(){return u(_.values,ve)}),be=Zi(function(ae){ae&&ae.preventDefault&&Zr(ae.preventDefault)&&ae.preventDefault(),ae&&ae.stopPropagation&&Zr(ae.stopPropagation)&&ae.stopPropagation(),D()}),ye=y.useCallback(function(ae){return{value:Pr(_.values,ae),error:Pr(_.errors,ae),touched:!!Pr(_.touched,ae),initialValue:Pr(f.current,ae),initialTouched:!!Pr(g.current,ae),initialError:Pr(m.current,ae)}},[_.errors,_.touched,_.values]),ke=y.useCallback(function(ae){return{setValue:function(ee,oe){return F(ae,ee,oe)},setTouched:function(ee,oe){return X(ae,ee,oe)},setError:function(ee){return R(ae,ee)}}},[F,X,R]),fe=y.useCallback(function(ae){var Q=pu(ae),ee=Q?ae.name:ae,oe=Pr(_.values,ee),Pe={name:ee,value:oe,onChange:V,onBlur:W};if(Q){var Fe=ae.type,Ie=ae.value,Re=ae.as,Ve=ae.multiple;Fe==="checkbox"?Ie===void 0?Pe.checked=!!oe:(Pe.checked=!!(Array.isArray(oe)&&~oe.indexOf(Ie)),Pe.value=Ie):Fe==="radio"?(Pe.checked=oe===Ie,Pe.value=Ie):Re==="select"&&Ve&&(Pe.value=Pe.value||[],Pe.multiple=!0)}return Pe},[W,V,_.values]),se=y.useMemo(function(){return!Ds(f.current,_.values)},[f.current,_.values]),ge=y.useMemo(function(){return typeof l<"u"?se?_.errors&&Object.keys(_.errors).length===0:l!==!1&&Zr(l)?l(p):l:_.errors&&Object.keys(_.errors).length===0},[l,se,_.errors,p]),De=An({},_,{initialValues:f.current,initialErrors:m.current,initialTouched:g.current,initialStatus:x.current,handleBlur:W,handleChange:V,handleReset:be,handleSubmit:ne,resetForm:D,setErrors:L,setFormikState:K,setFieldTouched:X,setFieldValue:F,setFieldError:R,setStatus:z,setSubmitting:Y,setTouched:B,setValues:A,submitForm:ie,validateForm:I,validateField:O,isValid:ge,dirty:se,unregisterField:U,registerField:$,getFieldProps:fe,getFieldMeta:ye,getFieldHelpers:ke,validateOnBlur:a,validateOnChange:r,validateOnMount:o});return De}function gt(e){var t=qY(e),r=e.component,i=e.children,a=e.render,s=e.innerRef;return y.useImperativeHandle(s,function(){return t}),y.createElement(LY,{value:t},r?y.createElement(r,t):a?a(t):i?Zr(i)?i(t):oO(i)?null:y.Children.only(i):null)}function VY(e){var t={};if(e.inner){if(e.inner.length===0)return Da(t,e.path,e.message);for(var a=e.inner,r=Array.isArray(a),i=0,a=r?a:a[Symbol.iterator]();;){var s;if(r){if(i>=a.length)break;s=a[i++]}else{if(i=a.next(),i.done)break;s=i.value}var o=s;Pr(t,o.path)||(t=Da(t,o.path,o.message))}}return t}
9function zY(e,t,r,i){r===void 0&&(r=!1);var a=wx(e);return t[r?"validateSync":"validate"](a,{abortEarly:!1,context:a})}function wx(e){var t=Array.isArray(e)?[]:{};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=String(r);Array.isArray(e[i])===!0?t[i]=e[i].map(function(a){return Array.isArray(a)===!0||x_(a)?wx(a):a!==""?a:void 0}):x_(e[i])?t[i]=wx(e[i]):t[i]=e[i]!==""?e[i]:void 0}return t}function HY(e,t,r){var i=e.slice();return t.forEach(function(s,o){if(typeof i[o]>"u"){var l=r.clone!==!1,c=l&&r.isMergeableObject(s);i[o]=c?vx(Array.isArray(s)?[]:{},s,r):s}else r.isMergeableObject(s)?i[o]=vx(e[o],s,r):e.indexOf(s)===-1&&i.push(s)}),i}function GY(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function WY(e,t,r){if(typeof e=="boolean")return!!t;var i=[],a=!1,s=-1;if(Array.isArray(e))i=e,s=e.indexOf(r),a=s>=0;else if(!r||r=="true"||r=="false")return!!t;return t&&r&&!a?i.concat(r):a?i.slice(0,s).concat(i.slice(s+1)):i}var YY=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?y.useLayoutEffect:y.useEffect;function Zi(e){var t=y.useRef(e);return YY(function(){t.current=e}),y.useCallback(function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return t.current.apply(void 0,i)},[])}function me(e){var t=e.validate,r=e.name,i=e.render,a=e.children,s=e.as,o=e.component,l=e.className,c=So(e,["validate","name","render","children","as","component","className"]),h=sO(),u=So(h,["validate","validationSchema"]),d=u.registerField,p=u.unregisterField;y.useEffect(function(){return d(r,{validate:t}),function(){p(r)}},[d,p,r,t]);var f=u.getFieldProps(An({name:r},c)),m=u.getFieldMeta(r),g={field:f,form:u};if(i)return i(An({},g,{meta:m}));if(Zr(a))return a(An({},g,{meta:m}));if(o){if(typeof o=="string"){var x=c.innerRef,v=So(c,["innerRef"]);return y.createElement(o,An({ref:x},f,v,{className:l}),a)}return y.createElement(o,An({field:f,form:u},c,{className:l}),a)}var b=s||"input";if(typeof b=="string"){var j=c.innerRef,w=So(c,["innerRef"]);return y.createElement(b,An({ref:j},f,w,{className:l}),a)}return y.createElement(b,An({},f,c,{className:l}),a)}var vt=y.forwardRef(function(e,t){var r=e.action,i=So(e,["action"]),a=r??"#",s=sO(),o=s.handleReset,l=s.handleSubmit;return y.createElement("form",An({onSubmit:l,ref:t,onReset:o,action:a},i))});vt.displayName="Form";function KY(e){var t=function(a){return y.createElement(FY,null,function(s){return y.createElement(e,An({},a,{formik:s}))})},r=e.displayName||e.name||e.constructor&&e.constructor.name||"Component";return t.WrappedComponent=e,t.displayName="FormikConnect("+r+")",zl(t,e)}var XY=function(t,r,i){var a=Do(t),s=a[r];return a.splice(r,1),a.splice(i,0,s),a},QY=function(t,r,i){var a=Do(t),s=a[r];return a[r]=a[i],a[i]=s,a},lg=function(t,r,i){var a=Do(t);return a.splice(r,0,i),a},ZY=function(t,r,i){var a=Do(t);return a[r]=i,a},Do=function(t){if(t){if(Array.isArray(t))return[].concat(t);var r=Object.keys(t).map(function(i){return parseInt(i)}).reduce(function(i,a){return a>i?a:i},0);return Array.from(An({},t,{length:r+1}))}else return[]},Y_=function(t,r){var i=typeof t=="function"?t:r;return function(a){if(Array.isArray(a)||pu(a)){var s=Do(a);return i(s)}return a}},cO=(function(e){$Y(t,e);function t(i){var a;return a=e.call(this,i)||this,a.updateArrayField=function(s,o,l){var c=a.props,h=c.name,u=c.formik.setFormikState;u(function(d){var p=Y_(l,s),f=Y_(o,s),m=Da(d.values,h,s(Pr(d.values,h))),g=l?p(Pr(d.errors,h)):void 0,x=o?f(Pr(d.touched,h)):void 0;return W_(g)&&(g=void 0),W_(x)&&(x=void 0),An({},d,{values:m,errors:l?Da(d.errors,h,g):d.errors,touched:o?Da(d.touched,h,x):d.touched})})},a.push=function(s){return a.updateArrayField(function(o){return[].concat(Do(o),[xd(s)])},!1,!1)},a.handlePush=function(s){return function(){return a.push(s)}},a.swap=function(s,o){return a.updateArrayField(function(l){return QY(l,s,o)},!0,!0)},a.handleSwap=function(s,o){return function(){return a.swap(s,o)}},a.move=function(s,o){return a.updateArrayField(function(l){return XY(l,s,o)},!0,!0)},a.handleMove=function(s,o){return function(){return a.move(s,o)}},a.insert=function(s,o){return a.updateArrayField(function(l){return lg(l,s,o)},function(l){return lg(l,s,null)},function(l){return lg(l,s,null)})},a.handleInsert=function(s,o){return function(){return a.insert(s,o)}},a.replace=function(s,o){return a.updateArrayField(function(l){return ZY(l,s,o)},!1,!1)},a.handleReplace=function(s,o){return function(){return a.replace(s,o)}},a.unshift=function(s){var o=-1;return a.updateArrayField(function(l){var c=l?[s].concat(l):[s];return o=c.length,c},function(l){return l?[null].concat(l):[null]},function(l){return l?[null].concat(l):[null]}),o},a.handleUnshift=function(s){return function(){return a.unshift(s)}},a.handleRemove=function(s){return function(){return a.remove(s)}},a.handlePop=function(){return function(){return a.pop()}},a.remove=a.remove.bind(G_(a)),a.pop=a.pop.bind(G_(a)),a}var r=t.prototype;return r.componentDidUpdate=function(a){this.props.validateOnChange&&this.props.formik.validateOnChange&&!Ds(Pr(a.formik.values,a.name),Pr(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},r.remove=function(a){var s;return this.updateArrayField(function(o){var l=o?Do(o):[];return s||(s=l[a]),Zr(l.splice)&&l.splice(a,1),Zr(l.every)&&l.every(function(c){return c===void 0})?[]:l},!0,!0),s},r.pop=function(){var a;return this.updateArrayField(function(s){var o=s.slice();return a||(a=o&&o.pop&&o.pop()),o},!0,!0),a},r.render=function(){var a={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},s=this.props,o=s.component,l=s.render,c=s.children,h=s.name,u=s.formik,d=So(u,["validate","validationSchema"]),p=An({},a,{form:d,name:h});return o?y.createElement(o,p):l?l(p):c?typeof c=="function"?c(p):oO(c)?null:y.Children.only(c):null},t})(y.Component);cO.defaultProps={validateOnChange:!0};var fu=KY(cO),Sx;try{Sx=Map}catch{}var _x;try{_x=Set}catch{}function dO(e,t,r){if(!e||typeof e!="object"||typeof e=="function")return e;if(e.nodeType&&"cloneNode"in e)return e.cloneNode(!0);if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);if(Array.isArray(e))return e.map(Cx);if(Sx&&e instanceof Sx)return new Map(Array.from(e.entries()));
9if(_x&&e instanceof _x)return new Set(Array.from(e.values()));if(e instanceof Object){t.push(e);var i=Object.create(e);r.push(i);for(var a in e){var s=t.findIndex(function(o){return o===e[a]});i[a]=s>-1?r[s]:dO(e[a],t,r)}return i}return e}function Cx(e){return dO(e,[],[])}const JY=Object.prototype.toString,eK=Error.prototype.toString,tK=RegExp.prototype.toString,nK=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",rK=/^Symbol\((.*)\)(.*)$/;function iK(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function K_(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return iK(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return nK.call(e).replace(rK,"Symbol($1)");const i=JY.call(e).slice(8,-1);return i==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):i==="Error"||e instanceof Error?"["+eK.call(e)+"]":i==="RegExp"?tK.call(e):null}function Al(e,t){let r=K_(e,t);return r!==null?r:JSON.stringify(e,function(i,a){let s=K_(this[i],t);return s!==null?s:a},2)}let vo={default:"${path} is invalid",required:"${path} is a required field",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:i})=>{let a=i!=null&&i!==r,s=`${e} must be a \`${t}\` type, but the final value was: \`${Al(r,!0)}\``+(a?` (cast from the value \`${Al(i,!0)}\`).`:".");return r===null&&(s+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),s},defined:"${path} must be defined"},ga={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Is={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Nx={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Ex={isValue:"${path} field must be ${value}"},Tx={noUnknown:"${path} field has unspecified keys: ${unknown}"},xp={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"};Object.assign(Object.create(null),{mixed:vo,string:ga,number:Is,date:Nx,object:Tx,array:xp,boolean:Ex});var cg,X_;function aK(){if(X_)return cg;X_=1;var e=Object.prototype,t=e.hasOwnProperty;function r(i,a){return i!=null&&t.call(i,a)}return cg=r,cg}var dg,Q_;function eo(){if(Q_)return dg;Q_=1;var e=Array.isArray;return dg=e,dg}var ug,Z_;function uO(){if(Z_)return ug;Z_=1;var e=typeof Lr=="object"&&Lr&&Lr.Object===Object&&Lr;return ug=e,ug}var hg,J_;function ys(){if(J_)return hg;J_=1;var e=uO(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return hg=r,hg}var pg,eC;function Rf(){if(eC)return pg;eC=1;var e=ys(),t=e.Symbol;return pg=t,pg}var fg,tC;function sK(){if(tC)return fg;tC=1;var e=Rf(),t=Object.prototype,r=t.hasOwnProperty,i=t.toString,a=e?e.toStringTag:void 0;function s(o){var l=r.call(o,a),c=o[a];try{o[a]=void 0;var h=!0}catch{}var u=i.call(o);return h&&(l?o[a]=c:delete o[a]),u}return fg=s,fg}var mg,nC;function oK(){if(nC)return mg;nC=1;var e=Object.prototype,t=e.toString;function r(i){return t.call(i)}return mg=r,mg}var gg,rC;function mu(){if(rC)return gg;rC=1;var e=Rf(),t=sK(),r=oK(),i="[object Null]",a="[object Undefined]",s=e?e.toStringTag:void 0;function o(l){return l==null?l===void 0?a:i:s&&s in Object(l)?t(l):r(l)}return gg=o,gg}var vg,iC;function gu(){if(iC)return vg;iC=1;function e(t){return t!=null&&typeof t=="object"}return vg=e,vg}var bg,aC;function fw(){if(aC)return bg;aC=1;var e=mu(),t=gu(),r="[object Symbol]";function i(a){return typeof a=="symbol"||t(a)&&e(a)==r}return bg=i,bg}var yg,sC;function mw(){if(sC)return yg;sC=1;var e=eo(),t=fw(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function a(s,o){if(e(s))return!1;var l=typeof s;return l=="number"||l=="symbol"||l=="boolean"||s==null||t(s)?!0:i.test(s)||!r.test(s)||o!=null&&s in Object(o)}return yg=a,yg}var xg,oC;function gw(){if(oC)return xg;oC=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return xg=e,xg}var jg,lC;function hO(){if(lC)return jg;lC=1;var e=mu(),t=gw(),r="[object AsyncFunction]",i="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function o(l){if(!t(l))return!1;var c=e(l);return c==i||c==a||c==r||c==s}return jg=o,jg}var wg,cC;function lK(){if(cC)return wg;cC=1;
vendor: 6,596 bytes, line 9
9var e=ys(),t=e["__core-js_shared__"];return wg=t,wg}var Sg,dC;function cK(){if(dC)return Sg;dC=1;var e=lK(),t=(function(){var i=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function r(i){return!!t&&t in i}return Sg=r,Sg}var _g,uC;function pO(){if(uC)return _g;uC=1;var e=Function.prototype,t=e.toString;function r(i){if(i!=null){try{return t.call(i)}catch{}try{return i+""}catch{}}return""}return _g=r,_g}var Cg,hC;function dK(){if(hC)return Cg;hC=1;var e=hO(),t=cK(),r=gw(),i=pO(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,o=Function.prototype,l=Object.prototype,c=o.toString,h=l.hasOwnProperty,u=RegExp("^"+c.call(h).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(p){if(!r(p)||t(p))return!1;var f=e(p)?u:s;return f.test(i(p))}return Cg=d,Cg}var Ng,pC;function uK(){if(pC)return Ng;pC=1;function e(t,r){return t?.[r]}return Ng=e,Ng}var Eg,fC;function Ko(){if(fC)return Eg;fC=1;var e=dK(),t=uK();function r(i,a){var s=t(i,a);return e(s)?s:void 0}return Eg=r,Eg}var Tg,mC;function Of(){if(mC)return Tg;mC=1;var e=Ko(),t=e(Object,"create");return Tg=t,Tg}var kg,gC;function hK(){if(gC)return kg;gC=1;var e=Of();function t(){this.__data__=e?e(null):{},this.size=0}return kg=t,kg}var Pg,vC;function pK(){if(vC)return Pg;vC=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return Pg=e,Pg}var Ig,bC;function fK(){if(bC)return Ig;bC=1;var e=Of(),t="__lodash_hash_undefined__",r=Object.prototype,i=r.hasOwnProperty;function a(s){var o=this.__data__;if(e){var l=o[s];return l===t?void 0:l}return i.call(o,s)?o[s]:void 0}return Ig=a,Ig}var Dg,yC;function mK(){if(yC)return Dg;yC=1;var e=Of(),t=Object.prototype,r=t.hasOwnProperty;function i(a){var s=this.__data__;return e?s[a]!==void 0:r.call(s,a)}return Dg=i,Dg}var Rg,xC;function gK(){if(xC)return Rg;xC=1;var e=Of(),t="__lodash_hash_undefined__";function r(i,a){var s=this.__data__;return this.size+=this.has(i)?0:1,s[i]=e&&a===void 0?t:a,this}return Rg=r,Rg}var Og,jC;function vK(){if(jC)return Og;jC=1;var e=hK(),t=pK(),r=fK(),i=mK(),a=gK();function s(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var h=o[l];this.set(h[0],h[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=r,s.prototype.has=i,s.prototype.set=a,Og=s,Og}var Ag,wC;function bK(){if(wC)return Ag;wC=1;function e(){this.__data__=[],this.size=0}return Ag=e,Ag}var Mg,SC;function fO(){if(SC)return Mg;SC=1;function e(t,r){return t===r||t!==t&&r!==r}return Mg=e,Mg}var $g,_C;function Af(){if(_C)return $g;_C=1;var e=fO();function t(r,i){for(var a=r.length;a--;)if(e(r[a][0],i))return a;return-1}return $g=t,$g}var Lg,CC;function yK(){if(CC)return Lg;CC=1;var e=Af(),t=Array.prototype,r=t.splice;function i(a){var s=this.__data__,o=e(s,a);if(o<0)return!1;var l=s.length-1;return o==l?s.pop():r.call(s,o,1),--this.size,!0}return Lg=i,Lg}var Fg,NC;function xK(){if(NC)return Fg;NC=1;var e=Af();function t(r){var i=this.__data__,a=e(i,r);return a<0?void 0:i[a][1]}return Fg=t,Fg}var Ug,EC;function jK(){if(EC)return Ug;EC=1;var e=Af();function t(r){return e(this.__data__,r)>-1}return Ug=t,Ug}var Bg,TC;function wK(){if(TC)return Bg;TC=1;var e=Af();function t(r,i){var a=this.__data__,s=e(a,r);return s<0?(++this.size,a.push([r,i])):a[s][1]=i,this}return Bg=t,Bg}var qg,kC;function Mf(){if(kC)return qg;kC=1;var e=bK(),t=yK(),r=xK(),i=jK(),a=wK();function s(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var h=o[l];this.set(h[0],h[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=r,s.prototype.has=i,s.prototype.set=a,qg=s,qg}var Vg,PC;function vw(){if(PC)return Vg;PC=1;var e=Ko(),t=ys(),r=e(t,"Map");return Vg=r,Vg}var zg,IC;function SK(){if(IC)return zg;IC=1;var e=vK(),t=Mf(),r=vw();function i(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return zg=i,zg}var Hg,DC;function _K(){if(DC)return Hg;DC=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return Hg=e,Hg}var Gg,RC;function $f(){if(RC)return Gg;RC=1;var e=_K();function t(r,i){var a=r.__data__;return e(i)?a[typeof i=="string"?"string":"hash"]:a.map}return Gg=t,Gg}var Wg,OC;function CK(){if(OC)return Wg;OC=1;var e=$f();function t(r){var i=e(this,r).delete(r);return this.size-=i?1:0,i}return Wg=t,Wg}var Yg,AC;function NK(){if(AC)return Yg;AC=1;var e=$f();function t(r){return e(this,r).get(r)}return Yg=t,Yg}var Kg,MC;function EK(){if(MC)return Kg;MC=1;var e=$f();function t(r){return e(this,r).has(r)}return Kg=t,Kg}var Xg,$C;function TK(){if($C)return Xg;$C=1;var e=$f();function t(r,i){var a=e(this,r),s=a.size;return a.set(r,i),this.size+=a.size==s?0:1,this}return Xg=t,Xg}var Qg,LC;function bw(){if(LC)return Qg;LC=1;var e=SK(),t=CK(),r=NK(),i=EK(),a=TK();function s(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var h=o[l];this.set(h[0],h[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=r,s.prototype.has=i,s.prototype.set=a,Qg=s,Qg}var Zg,FC;function kK(){if(FC)return Zg;FC=1;var e=bw(),t="Expected a function";function r(i,a){if(typeof i!="function"||a!=null&&typeof a!="function")throw new TypeError(t);var s=function(){var o=arguments,l=a?a.apply(this,o):o[0],c=s.cache;if(c.has(l))return c.get(l);var h=i.apply(this,o);return s.cache=c.set(l,h)||c,h};return s.cache=new(r.Cache||e),s}return r.Cache=e,Zg=r,Zg}var Jg,UC;function PK(){if(UC)return Jg;UC=1;var e=kK(),t=500;function r(i){var a=e(i,function(o){return s.size===t&&s.clear(),o}),s=a.cache;return a}return Jg=r,Jg}var ev,BC;function IK(){if(BC)return ev;BC=1;var e=PK(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,i=e(function(a){var s=[];return a.charCodeAt(0)===46&&s.push(""),a.replace(t,function(o,l,c,h){s.push(c?h.replace(r,"$1"):l||o)}),s});return ev=i,ev}var tv,qC;function DK(){if(qC)return tv;qC=1;function e(t,r){for(var i=-1,a=t==null?0:t.length,s=Array(a);++i<a;)s[i]=r(t[i],i,t);return s}return tv=e,tv}var nv,VC;function RK(){if(VC)return nv;VC=1;var e=Rf(),t=DK(),r=eo(),i=fw(),a=e?e.prototype:void 0,s=a?a.toString:void 0;function o(l){if(typeof l=="string")return l;if(r(l))return t(l,o)+"";if(i(l))return s?s.call(l):"";var c=l+"";return c=="0"&&1/l==-1/0?"-0":c}return nv=o,nv}var rv,zC;function vu(){if(zC)return rv;zC=1;var e=RK();function t(r){return r==null?"":e(r)}return rv=t,rv}var iv,HC;function mO(){if(HC)return iv;HC=1;var e=eo(),t=mw(),r=IK(),i=vu();function a(s,o){return e(s)?s:t(s,o)?[s]:r(i(s))}return iv=a,iv}var av,GC;
9function OK(){if(GC)return av;GC=1;var e=mu(),t=gu(),r="[object Arguments]";function i(a){return t(a)&&e(a)==r}return av=i,av}var sv,WC;function gO(){if(WC)return sv;WC=1;var e=OK(),t=gu(),r=Object.prototype,i=r.hasOwnProperty,a=r.propertyIsEnumerable,s=e((function(){return arguments})())?e:function(o){return t(o)&&i.call(o,"callee")&&!a.call(o,"callee")};return sv=s,sv}var ov,YC;function vO(){if(YC)return ov;YC=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(i,a){var s=typeof i;return a=a??e,!!a&&(s=="number"||s!="symbol"&&t.test(i))&&i>-1&&i%1==0&&i<a}return ov=r,ov}var lv,KC;function yw(){if(KC)return lv;KC=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return lv=t,lv}var cv,XC;function Lf(){if(XC)return cv;XC=1;var e=fw();function t(r){if(typeof r=="string"||e(r))return r;var i=r+"";return i=="0"&&1/r==-1/0?"-0":i}return cv=t,cv}var dv,QC;function bO(){if(QC)return dv;QC=1;var e=mO(),t=gO(),r=eo(),i=vO(),a=yw(),s=Lf();function o(l,c,h){c=e(c,l);for(var u=-1,d=c.length,p=!1;++u<d;){var f=s(c[u]);if(!(p=l!=null&&h(l,f)))break;l=l[f]}return p||++u!=d?p:(d=l==null?0:l.length,!!d&&a(d)&&i(f,d)&&(r(l)||t(l)))}return dv=o,dv}var uv,ZC;function AK(){if(ZC)return uv;ZC=1;var e=aK(),t=bO();function r(i,a){return i!=null&&t(i,a,e)}return uv=r,uv}var MK=AK();const Up=Zt(MK),xw=e=>e&&e.__isYupSchema__;class $K{constructor(t,r){if(this.fn=void 0,this.refs=t,this.refs=t,typeof r=="function"){this.fn=r;return}if(!Up(r,"is"))throw new TypeError("`is:` is required for `when()` conditions");if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:i,then:a,otherwise:s}=r,o=typeof i=="function"?i:(...l)=>l.every(c=>c===i);this.fn=function(...l){let c=l.pop(),h=l.pop(),u=o(...l)?a:s;if(u)return typeof u=="function"?u(h):h.concat(u.resolve(c))}}resolve(t,r){let i=this.refs.map(s=>s.getValue(r?.value,r?.parent,r?.context)),a=this.fn.apply(t,i.concat(t,r));if(a===void 0||a===t)return t;if(!xw(a))throw new TypeError("conditions must return a schema object");return a.resolve(r)}}function yO(e){return e==null?[]:[].concat(e)}function kx(){return kx=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},kx.apply(this,arguments)}let LK=/\$\{\s*(\w+)\s*\}/g;
9class wi extends Error{static formatError(t,r){const i=r.label||r.path||"this";return i!==r.path&&(r=kx({},r,{path:i})),typeof t=="string"?t.replace(LK,(a,s)=>Al(r[s])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,i,a){super(),this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this.name="ValidationError",this.value=r,this.path=i,this.type=a,this.errors=[],this.inner=[],yO(t).forEach(s=>{wi.isError(s)?(this.errors.push(...s.errors),this.inner=this.inner.concat(s.inner.length?s.inner:s)):this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,wi)}}const FK=e=>{let t=!1;return(...r)=>{t||(t=!0,e(...r))}};function Bp(e,t){let{endEarly:r,tests:i,args:a,value:s,errors:o,sort:l,path:c}=e,h=FK(t),u=i.length;const d=[];if(o=o||[],!u)return o.length?h(new wi(o,s,c)):h(null,s);for(let p=0;p<i.length;p++){const f=i[p];f(a,function(g){if(g){if(!wi.isError(g))return h(g,s);if(r)return g.value=s,h(g,s);d.push(g)}if(--u<=0){if(d.length&&(l&&d.sort(l),o.length&&d.push(...o),o=d),o.length){h(new wi(o,s,c),s);return}h(null,s)}})}}var hv,JC;function UK(){if(JC)return hv;JC=1;var e=Ko(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return hv=t,hv}var pv,eN;function xO(){if(eN)return pv;eN=1;var e=UK();function t(r,i,a){i=="__proto__"&&e?e(r,i,{configurable:!0,enumerable:!0,value:a,writable:!0}):r[i]=a}return pv=t,pv}var fv,tN;function BK(){if(tN)return fv;tN=1;function e(t){return function(r,i,a){for(var s=-1,o=Object(r),l=a(r),c=l.length;c--;){var h=l[t?c:++s];if(i(o[h],h,o)===!1)break}return r}}return fv=e,fv}var mv,nN;function qK(){if(nN)return mv;nN=1;var e=BK(),t=e();return mv=t,mv}var gv,rN;function VK(){if(rN)return gv;rN=1;function e(t,r){for(var i=-1,a=Array(t);++i<t;)a[i]=r(i);return a}return gv=e,gv}var jd={exports:{}},vv,iN;function zK(){if(iN)return vv;iN=1;function e(){return!1}return vv=e,vv}jd.exports;var aN;function jO(){return aN||(aN=1,(function(e,t){var r=ys(),i=zK(),a=t&&!t.nodeType&&t,s=a&&!0&&e&&!e.nodeType&&e,o=s&&s.exports===a,l=o?r.Buffer:void 0,c=l?l.isBuffer:void 0,h=c||i;e.exports=h})(jd,jd.exports)),jd.exports}var bv,sN;function HK(){if(sN)return bv;sN=1;var e=mu(),t=yw(),r=gu(),i="[object Arguments]",a="[object Array]",s="[object Boolean]",o="[object Date]",l="[object Error]",c="[object Function]",h="[object Map]",u="[object Number]",d="[object Object]",p="[object RegExp]",f="[object Set]",m="[object String]",g="[object WeakMap]",x="[object ArrayBuffer]",v="[object DataView]",b="[object Float32Array]",j="[object Float64Array]",w="[object Int8Array]",S="[object Int16Array]",_="[object Int32Array]",C="[object Uint8Array]",E="[object Uint8ClampedArray]",P="[object Uint16Array]",T="[object Uint32Array]",N={};N[b]=N[j]=N[w]=N[S]=N[_]=N[C]=N[E]=N[P]=N[T]=!0,N[i]=N[a]=N[x]=N[s]=N[v]=N[o]=N[l]=N[c]=N[h]=N[u]=N[d]=N[p]=N[f]=N[m]=N[g]=!1;function k(I){return r(I)&&t(I.length)&&!!N[e(I)]}return bv=k,bv}var yv,oN;function GK(){if(oN)return yv;oN=1;function e(t){return function(r){return t(r)}}return yv=e,yv}var wd={exports:{}};wd.exports;var lN;function WK(){return lN||(lN=1,(function(e,t){var r=uO(),i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,s=a&&a.exports===i,o=s&&r.process,l=(function(){try{var c=a&&a.require&&a.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}})();e.exports=l})(wd,wd.exports)),wd.exports}var xv,cN;function wO(){if(cN)return xv;cN=1;var e=HK(),t=GK(),r=WK(),i=r&&r.isTypedArray,a=i?t(i):e;return xv=a,xv}var jv,dN;function YK(){if(dN)return jv;dN=1;var e=VK(),t=gO(),r=eo(),i=jO(),a=vO(),s=wO(),o=Object.prototype,l=o.hasOwnProperty;function c(h,u){var d=r(h),p=!d&&t(h),f=!d&&!p&&i(h),m=!d&&!p&&!f&&s(h),g=d||p||f||m,x=g?e(h.length,String):[],v=x.length;for(var b in h)(u||l.call(h,b))&&!(g&&(b=="length"||f&&(b=="offset"||b=="parent")||m&&(b=="buffer"||b=="byteLength"||b=="byteOffset")||a(b,v)))&&x.push(b);return x}return jv=c,jv}var wv,uN;function KK(){if(uN)return wv;uN=1;var e=Object.prototype;function t(r){var i=r&&r.constructor,a=typeof i=="function"&&i.prototype||e;return r===a}return wv=t,wv}var Sv,hN;function XK(){if(hN)return Sv;hN=1;function e(t,r){return function(i){return t(r(i))}}return Sv=e,Sv}var _v,pN;function QK(){if(pN)return _v;pN=1;var e=XK(),t=e(Object.keys,Object);return _v=t,_v}var Cv,fN;function ZK(){if(fN)return Cv;fN=1;var e=KK(),t=QK(),r=Object.prototype,i=r.hasOwnProperty;function a(s){if(!e(s))return t(s);var o=[];for(var l in Object(s))i.call(s,l)&&l!="constructor"&&o.push(l);return o}return Cv=a,Cv}var Nv,mN;function JK(){if(mN)return Nv;mN=1;var e=hO(),t=yw();function r(i){return i!=null&&t(i.length)&&!e(i)}return Nv=r,Nv}var Ev,gN;function jw(){if(gN)return Ev;gN=1;var e=YK(),t=ZK(),r=JK();function i(a){return r(a)?e(a):t(a)}return Ev=i,Ev}var Tv,vN;function SO(){if(vN)return Tv;vN=1;var e=qK(),t=jw();function r(i,a){return i&&e(i,a,t)}return Tv=r,Tv}var kv,bN;function eX(){if(bN)return kv;bN=1;var e=Mf();function t(){this.__data__=new e,this.size=0}return kv=t,kv}var Pv,yN;function tX(){if(yN)return Pv;yN=1;function e(t){var r=this.__data__,i=r.delete(t);return this.size=r.size,i}return Pv=e,Pv}var Iv,xN;function nX(){if(xN)return Iv;xN=1;function e(t){return this.__data__.get(t)}
vendor: 7,942 bytes, line 9
9return Iv=e,Iv}var Dv,jN;function rX(){if(jN)return Dv;jN=1;function e(t){return this.__data__.has(t)}return Dv=e,Dv}var Rv,wN;function iX(){if(wN)return Rv;wN=1;var e=Mf(),t=vw(),r=bw(),i=200;function a(s,o){var l=this.__data__;if(l instanceof e){var c=l.__data__;if(!t||c.length<i-1)return c.push([s,o]),this.size=++l.size,this;l=this.__data__=new r(c)}return l.set(s,o),this.size=l.size,this}return Rv=a,Rv}var Ov,SN;function _O(){if(SN)return Ov;SN=1;var e=Mf(),t=eX(),r=tX(),i=nX(),a=rX(),s=iX();function o(l){var c=this.__data__=new e(l);this.size=c.size}return o.prototype.clear=t,o.prototype.delete=r,o.prototype.get=i,o.prototype.has=a,o.prototype.set=s,Ov=o,Ov}var Av,_N;function aX(){if(_N)return Av;_N=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return Av=t,Av}var Mv,CN;function sX(){if(CN)return Mv;CN=1;function e(t){return this.__data__.has(t)}return Mv=e,Mv}var $v,NN;function oX(){if(NN)return $v;NN=1;var e=bw(),t=aX(),r=sX();function i(a){var s=-1,o=a==null?0:a.length;for(this.__data__=new e;++s<o;)this.add(a[s])}return i.prototype.add=i.prototype.push=t,i.prototype.has=r,$v=i,$v}var Lv,EN;function lX(){if(EN)return Lv;EN=1;function e(t,r){for(var i=-1,a=t==null?0:t.length;++i<a;)if(r(t[i],i,t))return!0;return!1}return Lv=e,Lv}var Fv,TN;function cX(){if(TN)return Fv;TN=1;function e(t,r){return t.has(r)}return Fv=e,Fv}var Uv,kN;function CO(){if(kN)return Uv;kN=1;var e=oX(),t=lX(),r=cX(),i=1,a=2;function s(o,l,c,h,u,d){var p=c&i,f=o.length,m=l.length;if(f!=m&&!(p&&m>f))return!1;var g=d.get(o),x=d.get(l);if(g&&x)return g==l&&x==o;var v=-1,b=!0,j=c&a?new e:void 0;for(d.set(o,l),d.set(l,o);++v<f;){var w=o[v],S=l[v];if(h)var _=p?h(S,w,v,l,o,d):h(w,S,v,o,l,d);if(_!==void 0){if(_)continue;b=!1;break}if(j){if(!t(l,function(C,E){if(!r(j,E)&&(w===C||u(w,C,c,h,d)))return j.push(E)})){b=!1;break}}else if(!(w===S||u(w,S,c,h,d))){b=!1;break}}return d.delete(o),d.delete(l),b}return Uv=s,Uv}var Bv,PN;function dX(){if(PN)return Bv;PN=1;var e=ys(),t=e.Uint8Array;return Bv=t,Bv}var qv,IN;function uX(){if(IN)return qv;IN=1;function e(t){var r=-1,i=Array(t.size);return t.forEach(function(a,s){i[++r]=[s,a]}),i}return qv=e,qv}var Vv,DN;function hX(){if(DN)return Vv;DN=1;function e(t){var r=-1,i=Array(t.size);return t.forEach(function(a){i[++r]=a}),i}return Vv=e,Vv}var zv,RN;function pX(){if(RN)return zv;RN=1;var e=Rf(),t=dX(),r=fO(),i=CO(),a=uX(),s=hX(),o=1,l=2,c="[object Boolean]",h="[object Date]",u="[object Error]",d="[object Map]",p="[object Number]",f="[object RegExp]",m="[object Set]",g="[object String]",x="[object Symbol]",v="[object ArrayBuffer]",b="[object DataView]",j=e?e.prototype:void 0,w=j?j.valueOf:void 0;function S(_,C,E,P,T,N,k){switch(E){case b:if(_.byteLength!=C.byteLength||_.byteOffset!=C.byteOffset)return!1;_=_.buffer,C=C.buffer;case v:return!(_.byteLength!=C.byteLength||!N(new t(_),new t(C)));case c:case h:case p:return r(+_,+C);case u:return _.name==C.name&&_.message==C.message;case f:case g:return _==C+"";case d:var I=a;case m:var D=P&o;if(I||(I=s),_.size!=C.size&&!D)return!1;var O=k.get(_);if(O)return O==C;P|=l,k.set(_,C);var $=i(I(_),I(C),P,T,N,k);return k.delete(_),$;case x:if(w)return w.call(_)==w.call(C)}return!1}return zv=S,zv}var Hv,ON;function fX(){if(ON)return Hv;ON=1;function e(t,r){for(var i=-1,a=r.length,s=t.length;++i<a;)t[s+i]=r[i];return t}return Hv=e,Hv}var Gv,AN;function mX(){if(AN)return Gv;AN=1;var e=fX(),t=eo();function r(i,a,s){var o=a(i);return t(i)?o:e(o,s(i))}return Gv=r,Gv}var Wv,MN;function gX(){if(MN)return Wv;MN=1;function e(t,r){for(var i=-1,a=t==null?0:t.length,s=0,o=[];++i<a;){var l=t[i];r(l,i,t)&&(o[s++]=l)}return o}return Wv=e,Wv}var Yv,$N;function vX(){if($N)return Yv;$N=1;function e(){return[]}return Yv=e,Yv}var Kv,LN;function bX(){if(LN)return Kv;LN=1;var e=gX(),t=vX(),r=Object.prototype,i=r.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(o){return o==null?[]:(o=Object(o),e(a(o),function(l){return i.call(o,l)}))}:t;return Kv=s,Kv}var Xv,FN;function yX(){if(FN)return Xv;FN=1;var e=mX(),t=bX(),r=jw();function i(a){return e(a,r,t)}return Xv=i,Xv}var Qv,UN;function xX(){if(UN)return Qv;UN=1;var e=yX(),t=1,r=Object.prototype,i=r.hasOwnProperty;function a(s,o,l,c,h,u){var d=l&t,p=e(s),f=p.length,m=e(o),g=m.length;if(f!=g&&!d)return!1;for(var x=f;x--;){var v=p[x];if(!(d?v in o:i.call(o,v)))return!1}var b=u.get(s),j=u.get(o);if(b&&j)return b==o&&j==s;var w=!0;u.set(s,o),u.set(o,s);for(var S=d;++x<f;){v=p[x];var _=s[v],C=o[v];if(c)var E=d?c(C,_,v,o,s,u):c(_,C,v,s,o,u);if(!(E===void 0?_===C||h(_,C,l,c,u):E)){w=!1;break}S||(S=v=="constructor")}if(w&&!S){var P=s.constructor,T=o.constructor;P!=T&&"constructor"in s&&"constructor"in o&&!(typeof P=="function"&&P instanceof P&&typeof T=="function"&&T instanceof T)&&(w=!1)}return u.delete(s),u.delete(o),w}return Qv=a,Qv}var Zv,BN;function jX(){if(BN)return Zv;BN=1;var e=Ko(),t=ys(),r=e(t,"DataView");return Zv=r,Zv}var Jv,qN;function wX(){if(qN)return Jv;qN=1;var e=Ko(),t=ys(),r=e(t,"Promise");return Jv=r,Jv}var eb,VN;function SX(){if(VN)return eb;VN=1;var e=Ko(),t=ys(),r=e(t,"Set");return eb=r,eb}var tb,zN;function _X(){if(zN)return tb;zN=1;var e=Ko(),t=ys(),r=e(t,"WeakMap");return tb=r,tb}var nb,HN;function CX(){if(HN)return nb;HN=1;var e=jX(),t=vw(),r=wX(),i=SX(),a=_X(),s=mu(),o=pO(),l="[object Map]",c="[object Object]",h="[object Promise]",u="[object Set]",d="[object WeakMap]",p="[object DataView]",f=o(e),m=o(t),g=o(r),x=o(i),v=o(a),b=s;return(e&&b(new e(new ArrayBuffer(1)))!=p||t&&b(new t)!=l||r&&b(r.resolve())!=h||i&&b(new i)!=u||a&&b(new a)!=d)&&(b=function(j){var w=s(j),S=w==c?j.constructor:void 0,_=S?o(S):"";if(_)switch(_){case f:return p;case m:return l;case g:return h;case x:return u;case v:return d}return w}),nb=b,nb}var rb,GN;function NX(){if(GN)return rb;GN=1;var e=_O(),t=CO(),r=pX(),i=xX(),a=CX(),s=eo(),o=jO(),l=wO(),c=1,h="[object Arguments]",u="[object Array]",d="[object Object]",p=Object.prototype,f=p.hasOwnProperty;function m(g,x,v,b,j,w){var S=s(g),_=s(x),C=S?u:a(g),E=_?u:a(x);C=C==h?d:C,E=E==h?d:E;var P=C==d,T=E==d,N=C==E;if(N&&o(g)){if(!o(x))return!1;S=!0,P=!1}if(N&&!P)return w||(w=new e),S||l(g)?t(g,x,v,b,j,w):r(g,x,C,v,b,j,w);if(!(v&c)){var k=P&&f.call(g,"__wrapped__"),I=T&&f.call(x,"__wrapped__");if(k||I){var D=k?g.value():g,O=I?x.value():x;return w||(w=new e),j(D,O,v,b,w)}}return N?(w||(w=new e),i(g,x,v,b,j,w)):!1}return rb=m,rb}var ib,WN;function ww(){if(WN)return ib;WN=1;var e=NX(),t=gu();function r(i,a,s,o,l){return i===a?!0:i==null||a==null||!t(i)&&!t(a)?i!==i&&a!==a:e(i,a,s,o,r,l)}return ib=r,ib}var ab,YN;function EX(){if(YN)return ab;YN=1;var e=_O(),t=ww(),r=1,i=2;function a(s,o,l,c){var h=l.length,u=h,d=!c;if(s==null)return!u;for(s=Object(s);h--;){var p=l[h];if(d&&p[2]?p[1]!==s[p[0]]:!(p[0]in s))return!1}for(;++h<u;){p=l[h];var f=p[0],m=s[f],g=p[1];if(d&&p[2]){if(m===void 0&&!(f in s))return!1}else{var x=new e;if(c)var v=c(m,g,f,s,o,x);if(!(v===void 0?t(g,m,r|i,c,x):v))return!1}}return!0}return ab=a,ab}var sb,KN;function NO(){if(KN)return sb;KN=1;var e=gw();function t(r){return r===r&&!e(r)}return sb=t,sb}var ob,XN;function TX(){if(XN)return ob;XN=1;var e=NO(),t=jw();function r(i){for(var a=t(i),s=a.length;s--;){var o=a[s],l=i[o];a[s]=[o,l,e(l)]}return a}return ob=r,ob}var lb,QN;function EO(){if(QN)return lb;QN=1;function e(t,r){return function(i){return i==null?!1:i[t]===r&&(r!==void 0||t in Object(i))}}return lb=e,lb}var cb,ZN;function kX(){if(ZN)return cb;ZN=1;var e=EX(),t=TX(),r=EO();function i(a){var s=t(a);return s.length==1&&s[0][2]?r(s[0][0],s[0][1]):function(o){return o===a||e(o,a,s)}}return cb=i,cb}var db,JN;function TO(){if(JN)return db;JN=1;var e=mO(),t=Lf();function r(i,a){a=e(a,i);for(var s=0,o=a.length;i!=null&&s<o;)i=i[t(a[s++])];return s&&s==o?i:void 0}return db=r,db}var ub,e1;function PX(){if(e1)return ub;e1=1;var e=TO();function t(r,i,a){var s=r==null?void 0:e(r,i);return s===void 0?a:s}return ub=t,ub}var hb,t1;
9function IX(){if(t1)return hb;t1=1;function e(t,r){return t!=null&&r in Object(t)}return hb=e,hb}var pb,n1;function DX(){if(n1)return pb;n1=1;var e=IX(),t=bO();function r(i,a){return i!=null&&t(i,a,e)}return pb=r,pb}var fb,r1;function RX(){if(r1)return fb;r1=1;var e=ww(),t=PX(),r=DX(),i=mw(),a=NO(),s=EO(),o=Lf(),l=1,c=2;function h(u,d){return i(u)&&a(d)?s(o(u),d):function(p){var f=t(p,u);return f===void 0&&f===d?r(p,u):e(d,f,l|c)}}return fb=h,fb}var mb,i1;function OX(){if(i1)return mb;i1=1;function e(t){return t}return mb=e,mb}var gb,a1;function AX(){if(a1)return gb;a1=1;function e(t){return function(r){return r?.[t]}}return gb=e,gb}var vb,s1;function MX(){if(s1)return vb;s1=1;var e=TO();function t(r){return function(i){return e(i,r)}}return vb=t,vb}var bb,o1;function $X(){if(o1)return bb;o1=1;var e=AX(),t=MX(),r=mw(),i=Lf();function a(s){return r(s)?e(i(s)):t(s)}return bb=a,bb}var yb,l1;function kO(){if(l1)return yb;l1=1;var e=kX(),t=RX(),r=OX(),i=eo(),a=$X();function s(o){return typeof o=="function"?o:o==null?r:typeof o=="object"?i(o)?t(o[0],o[1]):e(o):a(o)}return yb=s,yb}var xb,c1;function LX(){if(c1)return xb;c1=1;var e=xO(),t=SO(),r=kO();function i(a,s){var o={};return s=r(s,3),t(a,function(l,c,h){e(o,c,s(l,c,h))}),o}return xb=i,xb}var FX=LX();const PO=Zt(FX);var jb,d1;function UX(){if(d1)return jb;d1=1;function e(v){this._maxSize=v,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(v){return this._values[v]},e.prototype.set=function(v,b){return this._size>=this._maxSize&&this.clear(),v in this._values||this._size++,this._values[v]=b};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,i=/^\d/,a=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,s=/^\s*(['"]?)(.*?)(\1)\s*$/,o=512,l=new e(o),c=new e(o),h=new e(o);jb={Cache:e,split:d,normalizePath:u,setter:function(v){var b=u(v);return c.get(v)||c.set(v,function(w,S){for(var _=0,C=b.length,E=w;_<C-1;){var P=b[_];if(P==="__proto__"||P==="constructor"||P==="prototype")return w;E=E[b[_++]]}E[b[_]]=S})},getter:function(v,b){var j=u(v);return h.get(v)||h.set(v,function(S){for(var _=0,C=j.length;_<C;)if(S!=null||!b)S=S[j[_++]];else return;return S})},join:function(v){return v.reduce(function(b,j){return b+(f(j)||r.test(j)?"["+j+"]":(b?".":"")+j)},"")},forEach:function(v,b,j){p(Array.isArray(v)?v:d(v),b,j)}};function u(v){return l.get(v)||l.set(v,d(v).map(function(b){return b.replace(s,"$2")}))}function d(v){return v.match(t)||[""]}function p(v,b,j){var w=v.length,S,_,C,E;for(_=0;_<w;_++)S=v[_],S&&(x(S)&&(S='"'+S+'"'),E=f(S),C=!E&&/^\d+$/.test(S),b.call(j,S,E,C,_,v))}function f(v){return typeof v=="string"&&v&&["'",'"'].indexOf(v.charAt(0))!==-1}function m(v){return v.match(i)&&!v.match(r)}function g(v){return a.test(v)}function x(v){return!f(v)&&(m(v)||g(v))}return jb}var Ff=UX();const Xu={context:"$",value:"."};function BX(e,t){return new cs(e,t)}class cs{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Xu.context,this.isValue=this.key[0]===Xu.value,this.isSibling=!this.isContext&&!this.isValue;let i=this.isContext?Xu.context:this.isValue?Xu.value:"";this.path=this.key.slice(i.length),this.getter=this.path&&Ff.getter(this.path,!0),this.map=r.map}getValue(t,r,i){let a=this.isContext?i:this.isValue?t:r;return this.getter&&(a=this.getter(a||{})),this.map&&(a=this.map(a)),a}cast(t,r){return this.getValue(t,r?.parent,r?.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}cs.prototype.__isYupRef=!0;function qp(){return qp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},qp.apply(this,arguments)}function qX(e,t){if(e==null)return{};var r={},i=Object.keys(e),a,s;for(s=0;s<i.length;s++)a=i[s],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function Qu(e){function t(r,i){let{value:a,path:s="",label:o,options:l,originalValue:c,sync:h}=r,u=qX(r,["value","path","label","options","originalValue","sync"]);const{name:d,test:p,params:f,message:m}=e;let{parent:g,context:x}=l;function v(_){return cs.isRef(_)?_.getValue(a,g,x):_}function b(_={}){const C=PO(qp({value:a,originalValue:c,label:o,path:_.path||s},f,_.params),v),E=new wi(wi.formatError(_.message||m,C),a,C.path,_.type||d);return E.params=C,E}let j=qp({path:s,parent:g,type:d,createError:b,resolve:v,options:l,originalValue:c},u);
9if(!h){try{Promise.resolve(p.call(j,a,j)).then(_=>{wi.isError(_)?i(_):_?i(null,_):i(b())}).catch(i)}catch(_){i(_)}return}let w;try{var S;if(w=p.call(j,a,j),typeof((S=w)==null?void 0:S.then)=="function")throw new Error(`Validation test of type: "${j.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`)}catch(_){i(_);return}wi.isError(w)?i(w):w?i(null,w):i(b())}return t.OPTIONS=e,t}let VX=e=>e.substr(0,e.length-1).substr(1);function zX(e,t,r,i=r){let a,s,o;return t?(Ff.forEach(t,(l,c,h)=>{let u=c?VX(l):l;if(e=e.resolve({context:i,parent:a,value:r}),e.innerType){let d=h?parseInt(u,10):0;if(r&&d>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${l}, in the path: ${t}. because there is no value at that index. `);a=r,r=r&&r[d],e=e.innerType}if(!h){if(!e.fields||!e.fields[u])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e._type}")`);a=r,r=r&&r[u],e=e.fields[u]}s=u,o=c?"["+l+"]":"."+l}),{schema:e,parent:a,parentPath:s}):{parent:a,parentPath:t,schema:e}}class Vp{constructor(){this.list=void 0,this.refs=void 0,this.list=new Set,this.refs=new Map}get size(){return this.list.size+this.refs.size}describe(){const t=[];for(const r of this.list)t.push(r);for(const[,r]of this.refs)t.push(r.describe());return t}toArray(){return Array.from(this.list).concat(Array.from(this.refs.values()))}resolveAll(t){return this.toArray().reduce((r,i)=>r.concat(cs.isRef(i)?t(i):i),[])}add(t){cs.isRef(t)?this.refs.set(t.key,t):this.list.add(t)}delete(t){cs.isRef(t)?this.refs.delete(t.key):this.list.delete(t)}clone(){const t=new Vp;return t.list=new Set(this.list),t.refs=new Map(this.refs),t}merge(t,r){const i=this.clone();return t.list.forEach(a=>i.add(a)),t.refs.forEach(a=>i.add(a)),r.list.forEach(a=>i.delete(a)),r.refs.forEach(a=>i.delete(a)),i}}function ra(){return ra=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},ra.apply(this,arguments)}class Wr{constructor(t){this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this._typeError=void 0,this._whitelist=new Vp,this._blacklist=new Vp,this.exclusiveTests=Object.create(null),this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(vo.notType)}),this.type=t?.type||"mixed",this.spec=ra({strip:!1,strict:!1,abortEarly:!0,recursive:!0,nullable:!1,presence:"optional"},t?.spec)}get _type(){return this.type}_typeCheck(t){return!0}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeError=this._typeError,r._whitelistError=this._whitelistError,r._blacklistError=this._blacklistError,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.exclusiveTests=ra({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=Cx(ra({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let i=t(this);return this._mutate=r,i}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,i=t.clone();const a=ra({},r.spec,i.spec);return i.spec=a,i._typeError||(i._typeError=r._typeError),i._whitelistError||(i._whitelistError=r._whitelistError),i._blacklistError||(i._blacklistError=r._blacklistError),i._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),i._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),i.tests=r.tests,i.exclusiveTests=r.exclusiveTests,i.withMutation(s=>{t.tests.forEach(o=>{s.test(o.OPTIONS)})}),i.transforms=[...r.transforms,...i.transforms],i}isType(t){return this.spec.nullable&&t===null?!0:this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let i=r.conditions;r=r.clone(),r.conditions=[],r=i.reduce((a,s)=>s.resolve(a,t),r),r=r.resolve(t)}return r}cast(t,r={}){let i=this.resolve(ra({value:t},r)),a=i._cast(t,r);
9if(t!==void 0&&r.assert!==!1&&i.isType(a)!==!0){let s=Al(t),o=Al(a);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${i._type}". 
10
11attempted value: ${s} 
12`+(o!==s?`result of cast: ${o}`:""))}return a}_cast(t,r){let i=t===void 0?t:this.transforms.reduce((a,s)=>s.call(this,a,t,this),t);return i===void 0&&(i=this.getDefault()),i}_validate(t,r={},i){let{sync:a,path:s,from:o=[],originalValue:l=t,strict:c=this.spec.strict,abortEarly:h=this.spec.abortEarly}=r,u=t;c||(u=this._cast(u,ra({assert:!1},r)));let d={value:u,path:s,options:r,originalValue:l,schema:this,label:this.spec.label,sync:a,from:o},p=[];this._typeError&&p.push(this._typeError);let f=[];this._whitelistError&&f.push(this._whitelistError),this._blacklistError&&f.push(this._blacklistError),Bp({args:d,value:u,path:s,tests:p,endEarly:h},m=>{if(m)return void i(m,u);Bp({tests:this.tests.concat(f),args:d,path:s,sync:a,value:u,endEarly:h},i)})}validate(t,r,i){let a=this.resolve(ra({},r,{value:t}));return typeof i=="function"?a._validate(t,r,i):new Promise((s,o)=>a._validate(t,r,(l,c)=>{l?o(l):s(c)}))}validateSync(t,r){let i=this.resolve(ra({},r,{value:t})),a;return i._validate(t,ra({},r,{sync:!0}),(s,o)=>{if(s)throw s;a=o}),a}isValid(t,r){return this.validate(t,r).then(()=>!0,i=>{if(wi.isError(i))return!1;throw i})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(i){if(wi.isError(i))return!1;throw i}}_getDefault(){let t=this.spec.default;return t==null?t:typeof t=="function"?t.call(this):Cx(t)}getDefault(t){return this.resolve(t||{})._getDefault()}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){let r=this.clone();return r.spec.strict=t,r}_isPresent(t){return t!=null}defined(t=vo.defined){return this.test({message:t,name:"defined",exclusive:!0,test(r){return r!==void 0}})}required(t=vo.required){return this.clone({presence:"required"}).withMutation(r=>r.test({message:t,name:"required",exclusive:!0,test(i){return this.schema._isPresent(i)}}))}notRequired(){let t=this.clone({presence:"optional"});return t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t}nullable(t=!0){return this.clone({nullable:t!==!1})}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=vo.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let i=this.clone(),a=Qu(r),s=r.exclusive||r.name&&i.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(i.exclusiveTests[r.name]=!!r.exclusive),i.tests=i.tests.filter(o=>!(o.OPTIONS.name===r.name&&(s||o.OPTIONS.test===a.OPTIONS.test))),i.tests.push(a),i}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let i=this.clone(),a=yO(t).map(s=>new cs(s));return a.forEach(s=>{s.isSibling&&i.deps.push(s.key)}),i.conditions.push(new $K(a,r)),i}typeError(t){let r=this.clone();return r._typeError=Qu({message:t,name:"typeError",test(i){return i!==void 0&&!this.schema.isType(i)?this.createError({params:{type:this.schema._type}}):!0}}),r}oneOf(t,r=vo.oneOf){let i=this.clone();return t.forEach(a=>{i._whitelist.add(a),i._blacklist.delete(a)}),i._whitelistError=Qu({message:r,name:"oneOf",test(a){if(a===void 0)return!0;let s=this.schema._whitelist,o=s.resolveAll(this.resolve);return o.includes(a)?!0:this.createError({params:{values:s.toArray().join(", "),resolved:o}})}}),i}notOneOf(t,r=vo.notOneOf){let i=this.clone();return t.forEach(a=>{i._blacklist.add(a),i._whitelist.delete(a)}),i._blacklistError=Qu({message:r,name:"notOneOf",test(a){let s=this.schema._blacklist,o=s.resolveAll(this.resolve);return o.includes(a)?this.createError({params:{values:s.toArray().join(", "),resolved:o}}):!0}}),i}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(){const t=this.clone(),{label:r,meta:i}=t.spec;return{meta:i,label:r,type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blackl
12ist.describe(),tests:t.tests.map(s=>({name:s.OPTIONS.name,params:s.OPTIONS.params})).filter((s,o,l)=>l.findIndex(c=>c.name===s.name)===o)}}}Wr.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Wr.prototype[`${e}At`]=function(t,r,i={}){const{parent:a,parentPath:s,schema:o}=zX(this,t,r,i.context);return o[e](a&&a[s],ra({},i,{parent:a,path:t}))};for(const e of["equals","is"])Wr.prototype[e]=Wr.prototype.oneOf;for(const e of["not","nope"])Wr.prototype[e]=Wr.prototype.notOneOf;Wr.prototype.optional=Wr.prototype.notRequired;const IO=Wr;function Px(){return new IO}Px.prototype=IO.prototype;const er=e=>e==null;function cr(){return new DO}class DO extends Wr{constructor(){super({type:"boolean"}),this.withMutation(()=>{this.transform(function(t){if(!this.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}_typeCheck(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}isTrue(t=Ex.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return er(r)||r===!0}})}isFalse(t=Ex.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return er(r)||r===!1}})}}cr.prototype=DO.prototype;let HX=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,GX=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,WX=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,YX=e=>er(e)||e===e.trim(),KX={}.toString();function Ae(){return new RO}class RO extends Wr{constructor(){super({type:"string"}),this.withMutation(()=>{this.transform(function(t){if(this.isType(t)||Array.isArray(t))return t;const r=t!=null&&t.toString?t.toString():t;return r===KX?t:r})})}_typeCheck(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}_isPresent(t){return super._isPresent(t)&&!!t.length}length(t,r=ga.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},test(i){return er(i)||i.length===this.resolve(t)}})}min(t,r=ga.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},test(i){return er(i)||i.length>=this.resolve(t)}})}max(t,r=ga.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},test(i){return er(i)||i.length<=this.resolve(t)}})}matches(t,r){let i=!1,a,s;return r&&(typeof r=="object"?{excludeEmptyString:i=!1,message:a,name:s}=r:a=r),this.test({name:s||"matches",message:a||ga.matches,params:{regex:t},test:o=>er(o)||o===""&&i||o.search(t)!==-1})}email(t=ga.email){return this.matches(HX,{name:"email",message:t,excludeEmptyString:!0})}url(t=ga.url){return this.matches(GX,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=ga.uuid){return this.matches(WX,{name:"uuid",message:t,excludeEmptyString:!1})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=ga.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:YX})}lowercase(t=ga.lowercase){return this.transform(r=>er(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,test:r=>er(r)||r===r.toLowerCase()})}uppercase(t=ga.uppercase){return this.transform(r=>er(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,test:r=>er(r)||r===r.toUpperCase()})}}Ae.prototype=RO.prototype;let XX=e=>e!=+e;function Yd(){return new OO}class OO extends Wr{constructor(){super({type:"number"}),this.withMutation(()=>{this.transform(function(t){let r=t;if(typeof r=="string"){if(r=r.replace(/\s/g,""),r==="")return NaN;r=+r}return this.isType(r)?r:parseFloat(r)})})}_typeCheck(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!XX(t)}min(t,r=Is.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},test(i){return er(i)||i>=this.resolve(t)}})}max(t,r=Is.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:t},test(i){return er(i)||i<=this.resolve(t)}})}lessThan(t,r=Is.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:t},test(i){return er(i)||i<this.resolve(t)}})}moreThan(t,r=Is.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},test(i){return er(i)||i>this.resolve(t)}})}positive(t=Is.positive){return this.moreThan(0,t)}negative(t=Is.negative){return this.lessThan(0,t)}integer(t=Is.integer){return this.test({name:"integer",message:t,test:r=>er(r)||Number.isInteger(r)})}truncate(){return this.transform(t=>er(t)?t:t|0)}round(t){var r;let i=["ceil","floor","round","trunc"];if(t=((r=t)==null?void 0:r.toLowerCase())||"round",t==="trunc")return this.truncate();if(i.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for roun
12d() are: "+i.join(", "));return this.transform(a=>er(a)?a:Math[t](a))}}Yd.prototype=OO.prototype;var QX=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;function ZX(e){var t=[1,4,5,6,7,10,11],r=0,i,a;if(a=QX.exec(e)){for(var s=0,o;o=t[s];++s)a[o]=+a[o]||0;a[2]=(+a[2]||1)-1,a[3]=+a[3]||1,a[7]=a[7]?String(a[7]).substr(0,3):0,(a[8]===void 0||a[8]==="")&&(a[9]===void 0||a[9]==="")?i=+new Date(a[1],a[2],a[3],a[4],a[5],a[6],a[7]):(a[8]!=="Z"&&a[9]!==void 0&&(r=a[10]*60+a[11],a[9]==="+"&&(r=0-r)),i=Date.UTC(a[1],a[2],a[3],a[4],a[5]+r,a[6],a[7]))}else i=Date.parse?Date.parse(e):NaN;return i}let AO=new Date(""),JX=e=>Object.prototype.toString.call(e)==="[object Date]";class eQ extends Wr{constructor(){super({type:"date"}),this.withMutation(()=>{this.transform(function(t){return this.isType(t)?t:(t=ZX(t),isNaN(t)?AO:new Date(t))})})}_typeCheck(t){return JX(t)&&!isNaN(t.getTime())}prepareParam(t,r){let i;if(cs.isRef(t))i=t;else{let a=this.cast(t);if(!this._typeCheck(a))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);i=a}return i}min(t,r=Nx.min){let i=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},test(a){return er(a)||a>=this.resolve(i)}})}max(t,r=Nx.max){let i=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},test(a){return er(a)||a<=this.resolve(i)}})}}eQ.INVALID_DATE=AO;var wb,u1;function tQ(){if(u1)return wb;u1=1;function e(t,r,i,a){var s=-1,o=t==null?0:t.length;for(a&&o&&(i=t[++s]);++s<o;)i=r(i,t[s],s,t);return i}return wb=e,wb}var Sb,h1;function nQ(){if(h1)return Sb;h1=1;function e(t){return function(r){return t?.[r]}}return Sb=e,Sb}var _b,p1;function rQ(){if(p1)return _b;p1=1;var e=nQ(),t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},r=e(t);return _b=r,_b}var Cb,f1;function iQ(){if(f1)return Cb;f1=1;
vendor: 2,943 bytes, line 12
12var e=rQ(),t=vu(),r=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,i="\\u0300-\\u036f",a="\\ufe20-\\ufe2f",s="\\u20d0-\\u20ff",o=i+a+s,l="["+o+"]",c=RegExp(l,"g");function h(u){return u=t(u),u&&u.replace(r,e).replace(c,"")}return Cb=h,Cb}var Nb,m1;function aQ(){if(m1)return Nb;m1=1;var e=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function t(r){return r.match(e)||[]}return Nb=t,Nb}var Eb,g1;function sQ(){if(g1)return Eb;g1=1;var e=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function t(r){return e.test(r)}return Eb=t,Eb}var Tb,v1;function oQ(){if(v1)return Tb;v1=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",a=t+r+i,s="\\u2700-\\u27bf",o="a-z\\xdf-\\xf6\\xf8-\\xff",l="\\xac\\xb1\\xd7\\xf7",c="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",h="\\u2000-\\u206f",u=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",d="A-Z\\xc0-\\xd6\\xd8-\\xde",p="\\ufe0e\\ufe0f",f=l+c+h+u,m="['’]",g="["+f+"]",x="["+a+"]",v="\\d+",b="["+s+"]",j="["+o+"]",w="[^"+e+f+v+s+o+d+"]",S="\\ud83c[\\udffb-\\udfff]",_="(?:"+x+"|"+S+")",C="[^"+e+"]",E="(?:\\ud83c[\\udde6-\\uddff]){2}",P="[\\ud800-\\udbff][\\udc00-\\udfff]",T="["+d+"]",N="\\u200d",k="(?:"+j+"|"+w+")",I="(?:"+T+"|"+w+")",D="(?:"+m+"(?:d|ll|m|re|s|t|ve))?",O="(?:"+m+"(?:D|LL|M|RE|S|T|VE))?",$=_+"?",U="["+p+"]?",B="(?:"+N+"(?:"+[C,E,P].join("|")+")"+U+$+")*",L="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",A="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",R=U+$+B,F="(?:"+[b,E,P].join("|")+")"+R,q=RegExp([T+"?"+j+"+"+D+"(?="+[g,T,"$"].join("|")+")",I+"+"+O+"(?="+[g,T+k,"$"].join("|")+")",T+"?"+k+"+"+D,T+"+"+O,A,L,v,F].join("|"),"g");function V(X){return X.match(q)||[]}return Tb=V,Tb}var kb,b1;function lQ(){if(b1)return kb;b1=1;var e=aQ(),t=sQ(),r=vu(),i=oQ();function a(s,o,l){return s=r(s),o=l?void 0:o,o===void 0?t(s)?i(s):e(s):s.match(o)||[]}return kb=a,kb}var Pb,y1;function MO(){if(y1)return Pb;y1=1;var e=tQ(),t=iQ(),r=lQ(),i="['’]",a=RegExp(i,"g");function s(o){return function(l){return e(r(t(l).replace(a,"")),o,"")}}return Pb=s,Pb}var Ib,x1;function cQ(){if(x1)return Ib;x1=1;var e=MO(),t=e(function(r,i,a){return r+(a?"_":"")+i.toLowerCase()});return Ib=t,Ib}var dQ=cQ();const j1=Zt(dQ);var Db,w1;function uQ(){if(w1)return Db;w1=1;function e(t,r,i){var a=-1,s=t.length;r<0&&(r=-r>s?0:s+r),i=i>s?s:i,i<0&&(i+=s),s=r>i?0:i-r>>>0,r>>>=0;for(var o=Array(s);++a<s;)o[a]=t[a+r];return o}return Db=e,Db}var Rb,S1;function hQ(){if(S1)return Rb;S1=1;var e=uQ();function t(r,i,a){var s=r.length;return a=a===void 0?s:a,!i&&a>=s?r:e(r,i,a)}return Rb=t,Rb}var Ob,_1;function $O(){if(_1)return Ob;_1=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",a=t+r+i,s="\\ufe0e\\ufe0f",o="\\u200d",l=RegExp("["+o+e+a+s+"]");function c(h){return l.test(h)}return Ob=c,Ob}var Ab,C1;
12function pQ(){if(C1)return Ab;C1=1;function e(t){return t.split("")}return Ab=e,Ab}var Mb,N1;function fQ(){if(N1)return Mb;N1=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",a=t+r+i,s="\\ufe0e\\ufe0f",o="["+e+"]",l="["+a+"]",c="\\ud83c[\\udffb-\\udfff]",h="(?:"+l+"|"+c+")",u="[^"+e+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",f="\\u200d",m=h+"?",g="["+s+"]?",x="(?:"+f+"(?:"+[u,d,p].join("|")+")"+g+m+")*",v=g+m+x,b="(?:"+[u+l+"?",l,d,p,o].join("|")+")",j=RegExp(c+"(?="+c+")|"+b+v,"g");function w(S){return S.match(j)||[]}return Mb=w,Mb}var $b,E1;function mQ(){if(E1)return $b;E1=1;var e=pQ(),t=$O(),r=fQ();function i(a){return t(a)?r(a):e(a)}return $b=i,$b}var Lb,T1;function gQ(){if(T1)return Lb;T1=1;var e=hQ(),t=$O(),r=mQ(),i=vu();function a(s){return function(o){o=i(o);var l=t(o)?r(o):void 0,c=l?l[0]:o.charAt(0),h=l?e(l,1).join(""):o.slice(1);return c[s]()+h}}return Lb=a,Lb}var Fb,k1;function vQ(){if(k1)return Fb;k1=1;var e=gQ(),t=e("toUpperCase");return Fb=t,Fb}var Ub,P1;function bQ(){if(P1)return Ub;P1=1;var e=vu(),t=vQ();function r(i){return t(e(i).toLowerCase())}return Ub=r,Ub}var Bb,I1;function yQ(){if(I1)return Bb;I1=1;var e=bQ(),t=MO(),r=t(function(i,a,s){return a=a.toLowerCase(),i+(s?e(a):a)});return Bb=r,Bb}var xQ=yQ();const jQ=Zt(xQ);var qb,D1;function wQ(){if(D1)return qb;D1=1;var e=xO(),t=SO(),r=kO();function i(a,s){var o={};return s=r(s,3),t(a,function(l,c,h){e(o,s(l,c,h),l)}),o}return qb=i,qb}var SQ=wQ();const _Q=Zt(SQ);var Zu={exports:{}},R1;function CQ(){if(R1)return Zu.exports;R1=1,Zu.exports=function(a){return e(t(a),a)},Zu.exports.array=e;function e(a,s){var o=a.length,l=new Array(o),c={},h=o,u=r(s),d=i(a);for(s.forEach(function(f){if(!d.has(f[0])||!d.has(f[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});h--;)c[h]||p(a[h],h,new Set);return l;function p(f,m,g){if(g.has(f)){var x;try{x=", node was:"+JSON.stringify(f)}catch{x=""}throw new Error("Cyclic dependency"+x)}if(!d.has(f))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(f));if(!c[m]){c[m]=!0;var v=u.get(f)||new Set;if(v=Array.from(v),m=v.length){g.add(f);do{var b=v[--m];p(b,d.get(b),g)}while(m);g.delete(f)}l[--o]=f}}}function t(a){for(var s=new Set,o=0,l=a.length;o<l;o++){var c=a[o];s.add(c[0]),s.add(c[1])}return Array.from(s)}function r(a){for(var s=new Map,o=0,l=a.length;o<l;o++){var c=a[o];s.has(c[0])||s.set(c[0],new Set),s.has(c[1])||s.set(c[1],new Set),s.get(c[0]).add(c[1])}return s}function i(a){for(var s=new Map,o=0,l=a.length;o<l;o++)s.set(a[o],o);return s}return Zu.exports}var NQ=CQ();const EQ=Zt(NQ);function TQ(e,t=[]){let r=[],i=new Set,a=new Set(t.map(([o,l])=>`${o}-${l}`));function s(o,l){let c=Ff.split(o)[0];i.add(c),a.has(`${l}-${c}`)||r.push([l,c])}for(const o in e)if(Up(e,o)){let l=e[o];i.add(o),cs.isRef(l)&&l.isSibling?s(l.path,o):xw(l)&&"deps"in l&&l.deps.forEach(c=>s(c,o))}return EQ.array(Array.from(i),r).reverse()}function O1(e,t){let r=1/0;return e.some((i,a)=>{var s;if(((s=t.path)==null?void 0:s.indexOf(i))!==-1)return r=a,!0}),r}function LO(e){return(t,r)=>O1(e,t)-O1(e,r)}function Cl(){return Cl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},Cl.apply(this,arguments)}let A1=e=>Object.prototype.toString.call(e)==="[object Object]";function kQ(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(i=>r.indexOf(i)===-1)}const PQ=LO([]);class FO extends Wr{constructor(t){super({type:"object"}),this.fields=Object.create(null),this._sortErrors=PQ,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{this.transform(function(i){if(typeof i=="string")try{i=JSON.parse(i)}catch{i=null}return this.isType(i)?i:null}),t&&this.shape(t)})}_typeCheck(t){return A1(t)||typeof t=="function"}_cast(t,r={}){var i;let a=super._cast(t,r);if(a===void 0)return this.getDefault();if(!this._typeCheck(a))return a;let s=this.fields,o=(i=r.stripUnknown)!=null?i:this.spec.noUnknown,l=this._nodes.concat(Object.keys(a).filter(d=>this._nodes.indexOf(d)===-1)),c={},h=Cl({},r,{parent:c,__validating:r.__validating||!1}),u=!1;for(const d of l){let p=s[d],f=Up(a,d);if(p){let m,g=a[d];h.path=(r.path?`${r.path}.`:"")+d,p=p.resolve({value:g,context:r.context,parent:c});let x="spec"in p?p.spec:void 0,v=x?.strict;if(x?.strip){u=u||d in a;continue}m=!r.__validating||!v?p.cast(a[d],h):a[d],m!==void 0&&(c[d]=m)}else f&&!o&&(c[d]=a[d]);c[d]!==a[d]&&(u=!0)}return u?c:a}_validate(t,r={},i){let a=[],{sync:s,from:o=[],originalValue:l=t,abortEarly:c=this.spec.abortEarly,recursive:h=this.spec.recursive}=r;o=[{schema:this,value:l}
12,...o],r.__validating=!0,r.originalValue=l,r.from=o,super._validate(t,r,(u,d)=>{if(u){if(!wi.isError(u)||c)return void i(u,d);a.push(u)}if(!h||!A1(d)){i(a[0]||null,d);return}l=l||d;let p=this._nodes.map(f=>(m,g)=>{let x=f.indexOf(".")===-1?(r.path?`${r.path}.`:"")+f:`${r.path||""}["${f}"]`,v=this.fields[f];if(v&&"validate"in v){v.validate(d[f],Cl({},r,{path:x,from:o,strict:!0,parent:d,originalValue:l[f]}),g);return}g(null)});Bp({tests:p,value:d,errors:a,endEarly:c,sort:this._sortErrors,path:r.path},i)})}clone(t){const r=super.clone(t);return r.fields=Cl({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),i=r.fields;for(let[a,s]of Object.entries(this.fields)){const o=i[a];o===void 0?i[a]=s:o instanceof Wr&&s instanceof Wr&&(i[a]=s.concat(o))}return r.withMutation(()=>r.shape(i,this._excludedEdges))}getDefaultFromShape(){let t={};return this._nodes.forEach(r=>{const i=this.fields[r];t[r]="default"in i?i.getDefault():void 0}),t}_getDefault(){if("default"in this.spec)return super._getDefault();if(this._nodes.length)return this.getDefaultFromShape()}shape(t,r=[]){let i=this.clone(),a=Object.assign(i.fields,t);return i.fields=a,i._sortErrors=LO(Object.keys(a)),r.length&&(Array.isArray(r[0])||(r=[r]),i._excludedEdges=[...i._excludedEdges,...r]),i._nodes=TQ(a,i._excludedEdges),i}pick(t){const r={};for(const i of t)this.fields[i]&&(r[i]=this.fields[i]);return this.clone().withMutation(i=>(i.fields={},i.shape(r)))}omit(t){const r=this.clone(),i=r.fields;r.fields={};for(const a of t)delete i[a];return r.withMutation(()=>r.shape(i))}from(t,r,i){let a=Ff.getter(t,!0);return this.transform(s=>{if(s==null)return s;let o=s;return Up(s,t)&&(o=Cl({},s),i||delete o[t],o[r]=a(s)),o})}noUnknown(t=!0,r=Tx.noUnknown){typeof t=="string"&&(r=t,t=!0);let i=this.test({name:"noUnknown",exclusive:!0,message:r,test(a){if(a==null)return!0;const s=kQ(this.schema,a);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return i.spec.noUnknown=t,i}unknown(t=!0,r=Tx.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>r&&_Q(r,(i,a)=>t(a)))}camelCase(){return this.transformKeys(jQ)}snakeCase(){return this.transformKeys(j1)}constantCase(){return this.transformKeys(t=>j1(t).toUpperCase())}describe(){let t=super.describe();return t.fields=PO(this.fields,r=>r.describe()),t}}function _t(e){return new FO(e)}_t.prototype=FO.prototype;function zp(){return zp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},zp.apply(this,arguments)}function jp(e){return new UO(e)}class UO extends Wr{constructor(t){super({type:"array"}),this.innerType=void 0,this.innerType=t,this.withMutation(()=>{this.transform(function(r){if(typeof r=="string")try{r=JSON.parse(r)}catch{r=null}return this.isType(r)?r:null})})}_typeCheck(t){return Array.isArray(t)}get _subType(){return this.innerType}_cast(t,r){const i=super._cast(t,r);if(!this._typeCheck(i)||!this.innerType)return i;let a=!1;const s=i.map((o,l)=>{const c=this.innerType.cast(o,zp({},r,{path:`${r.path||""}[${l}]`}));return c!==o&&(a=!0),c});return a?s:i}_validate(t,r={},i){var a,s;let o=[];r.sync;let l=r.path,c=this.innerType,h=(a=r.abortEarly)!=null?a:this.spec.abortEarly,u=(s=r.recursive)!=null?s:this.spec.recursive,d=r.originalValue!=null?r.originalValue:t;super._validate(t,r,(p,f)=>{if(p){if(!wi.isError(p)||h)return void i(p,f);o.push(p)}if(!u||!c||!this._typeCheck(f)){i(o[0]||null,f);return}d=d||f;let m=new Array(f.length);for(let g=0;g<f.length;g++){let x=f[g],v=`${r.path||""}[${g}]`,b=zp({},r,{path:v,strict:!0,parent:f,index:g,originalValue:d[g]});m[g]=(j,w)=>c.validate(x,b,w)}Bp({path:l,value:f,errors:o,endEarly:h,tests:m},i)})}clone(t){const r=super.clone(t);return r.innerType=this.innerType,r}concat(t){let r=super.concat(t);return r.innerType=this.innerType,t.innerType&&(r.innerType=r.innerType?r.innerType.concat(t.innerType):t.innerType),r}of(t){let r=this.clone();if(!xw(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Al(t));return r.innerType=t,r}length(t,r=xp.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},test(i){return er(i)||i.length===this.resolve(t)}})}min(t,r){return r=r||xp.min,this.test({message:r,name:"min",exclusive:!0,params:{min:t},test(i){return er(i)||i.length>=this.resolve(t)}})}max(t,r){return r=r||xp.max,this.test({message:r,name:"max",exclusive:!0,params:{max:t},test(i){return er(i)||i.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,r)=>this._typeCheck(t)?t:r==null?[]:[].concat(r))}compact(t){let r=t?(i,a,s)=>!t(i,a,s):i=>!!i;return this.transform(i=>i!=null?i.filter(r):i)}describe(){let t=super.describe();return this.innerType&&(t.innerType=this.innerType.describe()),t}nullable(t=!0){return super.nullable(t)}defined(){return super.defined()}required(t){return super.required(t)}}jp.prototype=UO.prototype;function IQ(e){const{getOIDCRedirectURL:t,providerDataName:r,email:i,history:a}=e;y.useEffect(()=>{r!=null&&s(r,i)},[r,i]);const s=async(o,l)=>{const c=await t(o,l);if(!c){a.replace("/");return}const h=c.data;window.location.replace(h)};return n.jsx("div",{})}const DQ=e=>({providerDataName:e.auth.providerData?.name}),RQ=le(DQ,{getOIDCRedirectURL:lD})(IQ),OQ=({resetPasswordEmail:e,handleCancel:t})=>{const[r,i]=y.useState(null),a=_t().shape({email:Ae().email("Please enter a valid email address").required("Please enter an email address")});return r?n.jsx("div",{className:"container row",children:n.jsxs("div",{className:"col s12 m9 l6",children:[n.jsx("h2",{className:"text-center",children:"Reset password"}),n.jsxs("div",{className:"z-depth-1 lighten-4 row reset-password-form",children:[n.jsxs("div",{children:["We've sent an email to ",r," with password reset instructions. Please check your inbox."]}),n.jsx("div",{children:"If you do not see the email soon, please check your spam folder."}),n.jsx("button",{type:"button",className:"btn btn-primary-lg",onClick:t,children:"Back to Login"})]})]})}):n.jsx("div",{className:"container row",children:n.jsxs("div",{className:"col s12 m9 l6",children:[n.jsx("h2",{className:"text-center",children:"Reset password"}),n.jsxs("div",{className:"z-depth-1 lighten-4 row login-form reset-login-form",children:[n.jsx("div",{children:"Enter the email address associated with your Clearnomics account:"}),n.jsx(gt,{validationSchema:a,initialValues:{email:""},onSubmit:s=>{e(s.email).then(()=>{i(s.email)})},children:({values:s,errors:o,touched:l,isSubmitting:c})=>n.jsxs(vt,{className:"col s12",children:[n.jsx("div",{className:"row",children:n.jsxs("div",{className:"input-field",id:"email-input-field",children:[n.jsx("label",{children:"Email"}),n.jsx(me,{type:"email",id:"email","diagnostic-id":"reset-email-input",n
12ame:"email",className:"validate",autoFocus:!0}),o.email&&l.email&&s.email&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:o.email})]})}),n.jsx("div",{className:"row",children:n.jsxs("div",{className:"form-group login-form-group",children:[n.jsx("button",{type:"button",className:"btn-cancel",onClick:t,children:"Back to Login"}),n.jsx("button",{type:"submit",className:"btn btn-primary-lg","diagnostic-id":"reset-send-btn",disabled:c,children:"Send Link"})]})})]})})]})]})})},AQ=le(null,{resetPasswordEmail:n5})(OQ);function MQ(e){const{getSAMLRequest:t,providerDataName:r}=e;y.useEffect(()=>{r!=null&&i(r)},[r]);const i=async a=>{const s=await t(a);if(!s)return;const o=s.data;window.location.replace(o)};return n.jsx("div",{})}const $Q=e=>({providerDataName:e.auth.providerData?.name}),LQ=le($Q,{getSAMLRequest:r5})(MQ);function FQ(e){const{login:t,isAuthenticated:r,history:i,initData:a,getAuthProvider:s,isFirstFactorAuthenticated:o}=e,[l,c]=y.useState(!1),[h,u]=y.useState(""),[d,p]=y.useState(!1),[f,m]=y.useState(""),[g,x]=y.useState(!1),[v,b]=y.useState(""),[j,w]=y.useState(!1),S=y.useRef(null),_=y.useRef(null),C=()=>{c(!1),u(""),m(""),w(!1),p(!1),i.replace("/login")},E=()=>{const{Light:B}=o5;l5().forEach(A=>{A.theme===B?A.element.disabled=!1:A.element.disabled=!0})};y.useEffect(()=>{!r&&E(),!r&&a()},[]);const P=B=>{const L=B.key==="Enter",A=document.getElementById("sso-verification-form");L&&A&&!B.repeat&&x(!0)};y.useEffect(()=>(window.addEventListener("keydown",P),()=>{window.removeEventListener("keydown",P)}),[P]);const T=async B=>{if(B.preventDefault(),!d){const L=S.current.values.email,A=_.current;if(u(L),!A){const F=(await s(L||v)).data.type;m(F),F==="oidc"||F==="saml"?p(!1):(p(!0),w(!0))}}},N=B=>{w(!1),p(!1),B("password","")},k=B=>{B.preventDefault(),x(!0)},I=n.jsx("div",{className:"container row",children:n.jsx("div",{className:"col s12 m9 l6",children:n.jsxs("div",{className:"sso-verification-form",id:"sso-verification-form",children:[n.jsxs("div",{className:"verification-msg-container",children:[n.jsx(M8,{}),n.jsx("h3",{className:"text-center","diagnostic-id":"verification-msg",children:"Continue securely with your company account"})]}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{className:"btn-cancel","diagnostic-id":"cancel-btn",onClick:C,children:"Cancel"}),n.jsx("button",{className:"btn-primary-lg",onClick:k,children:"Continue"}),g&&f==="saml"&&n.jsx(LQ,{...e}),g&&f==="oidc"&&n.jsx(RQ,{...e,email:h})]})]})})}),D=_t().shape({email:Ae().email("Please enter a valid email address").required("Please enter an email address"),password:Ae().required("Please enter your password")}),O=B=>{B.keyCode===13&&B.target.blur()},$={email:"",password:""};if(r)return n.jsx(qt,{to:"/insights"});if(o)return n.jsx(qt,{to:"/two-factor-authentication"});const U=n.jsx("div",{className:"container row",children:n.jsxs("div",{className:"col s12 m9 l6",children:[n.jsx("h2",{className:"text-center",children:"Login"}),n.jsx("div",{className:"z-depth-1 lighten-4 row login-form",children:n.jsx(gt,{innerRef:S,validationSchema:D,initialValues:$,onSubmit:(B,{setFieldError:L,setSubmitting:A})=>{t(B.email,B.password).then(R=>{(!r||!o)&&L("password",R?R.detail==="No active account found with the given credentials"?"Invalid login credentials":R.detail:""),A(!1)})},children:({values:B,errors:L,touched:A,handleSubmit:R,isSubmitting:F,dirty:q,setFieldValue:V,setFieldError:X})=>n.jsxs(vt,{noValidate:!0,className:"col s12",onSubmit:B.email||v?B.password?R:T:R,children:[n.jsxs("div",{className:`input-field-container ${d?"input-fields-wrapper":""}`,children:[n.jsxs("div",{className:"row",children:[n.jsxs("div",{className:"input-field",children:[n.jsx("label",{children:"Email"}),j?n.jsx("div",{className:"email-input-btn","diagnostic-id":"disabled-email-field",onClick:()=>{N(V)},children:B.email}):n.jsx(me,{type:"email",id:"email username","diagnostic-id":"login-un-input",name:"email",className:"validate",autoFocus:!0,onKeyDown:M=>{L.email&&O(M)}})]}),L.email&&A.email&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",ref:_,children:L.email})]}),d&&n.jsxs("div",{className:`row password-field-group ${d?"show-password-field":""}`,children:[n.jsxs("div",{className:"input-field",children:[n.jsx("label",{children:"Password"}),n.jsx(me,{type:"password",className:"validate",name:"password",id:"password","diagnostic-id":"login-pw-input",autoFocus:!0})]}),L.password&&A.password&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:L.password})]})]}),n.jsx("div",{className:"row",children:n.jsxs("div",{className:"form-group login-form-group",children:[n.jsx("button",{type:"button",className:"btn-cancel forgot-password-btn","diagnostic-id":"pw-reset-btn",onClick:()=>{c(!0),i.replace("/reset-password")},children:d&&"Forgot your password?"}),n.jsxs("div",{className:"login-btn-group",children:[j&&n.jsx("button",{type:"button",className:"btn-cancel back-btn","diagnostic-id":"login-back-btn",onClick:()=>N(V),children:"Back"}),n.jsx("button",{type:"submit",className:"btn btn-primary-lg",disabled:F,"diagnostic-id":"continue-login-btn",children:"Continue"})]})]})})]})})})]})});return f==="saml"||f==="oidc"?n.jsx(n.Fragment,{children:I}):l?n.jsx(AQ,{handleCancel:C}):n.jsx(n.Fragment,{children:U})}const UQ=e=>({isAuthenticated:e.auth.isAuthenticated,isFirstFactorAuthenticated:e.auth.isFirstFactorAuthenticated}),M1=le(UQ,{login:s5,initData:a5,getAuthProvider:i5})(FQ);function BQ(e){const{oidcLogin:t,isAuthenticated:r,history:i}=e,a=new URL(document.location).searchParams,s=a.get("code"),o=a.get("state");y.useEffect(()=>{l(s,o)},[s,o]);const l=async(c,h)=>{await t(c,h)||i.replace("/login")};return r?n.jsx(qt,{to:"/chartbooks"}):n.jsxs("div",{className:"sso-logging-in-container",children:[n.jsx(Dn,{}),n.jsx("h2",{children:"Logging in, please wait..."})]})}const qQ=e=>({isAuthenticated:e.auth.isAuthenticated}),VQ=le(qQ,{oidcLogin:c5})(BQ);function zQ(e){const{getOIDCRedirectURL:t,history:r}=e,a=new URL(document.location).searchParams.get("provider");y.useEffect(()=>{s(a)},[a]);const s=async o=>{const l=await t(o);if(!l){r.replace("/login");return}const c=l.data;window.location.replace(c)};return n.jsx("div",{})}const HQ=e=>({}),GQ=le(HQ,{getOIDCRedirectURL:lD})(zQ),WQ=({component:e,auth:t,setLastLocation:r,...i})=>n.jsx(jn,{...i,render:a=>{if(t.user||t.isAuthenticated)return n.jsx(e,{...a}
12);if(t.isLoading)return n.jsx("div",{className:"container"});{const s=window.location.pathname+window.location.search;return!s.includes("upgrade")&&!s.includes("login")&&!s.includes("logout")&&r(s),n.jsx(qt,{to:"/login"})}}}),YQ=e=>({auth:e.auth}),kn=le(YQ,{setLastLocation:hj})(WQ),{apiAddress:Xo}=Tn,KQ=e=>t=>{const r=`${Xo}api/preapprovals/invitation/`,i={headers:{"Content-Type":"application/json"}},a=JSON.stringify({invitation:e});return t({type:g5}),Ne.post(r,a,i).then(s=>(t({type:v5,payload:s.data}),s)).catch(s=>{if(t({type:b5}),s.response&&s.response.data)return s.response.data})},BO=(e,t)=>r=>{const i=`${Xo}api/preapprovals/verification/`,a={headers:{"Content-Type":"application/json"}};let s;return t?s=JSON.stringify({invitation:t}):s=JSON.stringify({verify:e}),r({type:p5}),Ne.post(i,s,a).then(o=>(r({type:f5,payload:o.data}),o.status===200&&r(he({alertMessage:"Verification code sent. Please check your email inbox."})),o)).catch(o=>{if(r({type:m5}),o.response.status===400&&r(he({serverError:"Unable to request a new verification code"})),o.response&&o.response.data)return o.response.data})},XQ=e=>t=>{const r=`${Xo}
12api/preapprovals/confirm-verification/`,i={headers:{"Content-Type":"application/json"}},a=JSON.stringify({verify:e});return Ne.post(r,a,i).then(s=>(t({type:cD,payload:s.data}),s)).catch(s=>(t({type:dD}),(s.response.status===404||s.response.status===400)&&(s.response.data.detail==="Provided link has expired"?t(he({serverError:"Verification code is expired. Please try again or request another code."})):s.response.data.detail==="Unable to process request"?t(he({serverError:"Verification is currently locked. Please try again later."})):t(he({serverError:"Invalid verification code. Please try again or request another code."}))),s.response.data))},QQ=(e,t)=>r=>{const i=`${Xo}api/preapprovals/confirm-verification/`,a={headers:{"Content-Type":"application/json"}},s=JSON.stringify({verification_code:e,invitation:t});return r({type:y5}),Ne.post(i,s,a).then(o=>(r({type:cD,payload:o.data}),o)).catch(o=>(r({type:dD}),(o.response.status===404||o.response.status===400)&&(o.response.data.detail==="Provided link has expired"?r(he({serverError:"Verification code is expired. Please try again or request another code."})):o.response.data.detail==="Unable to process request"?r(he({serverError:"Verification is currently locked. Please try again later."})):r(he({serverError:"Invalid verification code. Please try again or request another code."}))),o.response.data))},ZQ=(e,t,r,i,a)=>s=>{const o=`${Xo}
12api/preapprovals/register/`,l={headers:{"Content-Type":"application/json"}},c=JSON.stringify({email:e,password:t,inviter_id:r,account_creation_code:i,terms_of_use:a});return s({type:j5}),Ne.post(o,c,l).then(h=>(s({type:w5,payload:h.data}),h)).catch(h=>{s({type:S5}),h.message!==Ue&&s(he({serverError:"This session has expired. Please verify your email again"}))})},qO=(e,t,r,i,a)=>(s,o)=>{const l=new FormData,c={profile:r,professional_credentials:i,corporate_title:a};t&&l.append("logo",t),c&&Object.keys(c).forEach(d=>{const p=c[d];l.append(d,p)});const h=`${Xo}api/users/${e}/onboard/`,u=Ee(o,Xn);return Ne.post(h,l,u).then(d=>{s({type:uD,payload:d.data})}).catch(d=>(s({type:hD}),d.message!==Ue&&s(he({serverError:`There was a problem updating your ${t?"logo":"profile details"}, please try again`})),Promise.reject(d)))},za=e=>({type:d5,payload:e}),VO=e=>({type:h5,payload:e}),bu=e=>(t,r)=>{t({type:u5,payload:e})},zO=(e,t,r)=>(i,a)=>{const s=`${Xo}api/users/${e}/onboard/`;let o;return t?o=JSON.stringify({is_logo_skipped:t}):o=JSON.stringify({is_profile_skipped:r}),Ne.post(s,o,Ee(a))},HO=e=>t=>{t({type:x5,payload:e})},$1=[{label:"Verify your email address",step:1},{label:"Set password and create account",step:2},{label:"Upload your company logo",step:3},{label:"Add your profile details",step:4},{label:"Finish account setup",step:5}],JQ=e=>{const{currentStep:t}=e,r=$1.length;return n.jsx("div",{className:"progress-tracker-container",children:n.jsx("div",{className:"progress-steps-container",children:$1.map(({step:i,label:a})=>n.jsxs("div",{className:"progress-step-group",children:[n.jsxs("div",{className:"progress-dot-line",children:[n.jsx("div",{className:`progress-dot ${t===i?"current":"not-current"} ${t>i?"done":"not-done"}`,children:n.jsx("div",{className:"progress-count",children:t>i?n.jsx("i",{className:"material-icons",children:"done"}):n.jsx(n.Fragment,{})})}),i!==r?n.jsx("div",{className:`progress-line ${t>i?"completed":"incomplete"}`}):n.jsx("div",{className:"progress-line final-step"})]}),n.jsx("div",{className:"progress-label-container",children:n.jsx("div",{className:`progress-label ${t===i?"active":"inactive"} ${t>i?"completed":"incomplete"}`,children:a})})]},i))})})},eZ=e=>({currentStep:e.preapproval.currentStep,isAuthenticated:e.auth.isAuthenticated,showProgressTracker:e.preapproval.showProgressTracker,isOnboarded:e.auth.user&&e.auth.user.isOnboarded}),GO=le(eZ,{setCurrentStep:za,setShowProgressTracker:bu})(JQ);var Ns=44,tZ=function(t){return{root:{display:"inline-block"},static:{transition:t.transitions.create("transform")},indeterminate:{animation:"$circular-rotate 1.4s linear infinite"},determinate:{transition:t.transitions.create("transform")},colorPrimary:{color:t.palette.primary.main},colorSecondary:{color:t.palette.secondary.main},svg:{display:"block"},circle:{stroke:"currentColor"},circleStatic:{transition:t.transitions.create("stroke-dashoffset")},circleIndeterminate:{animation:"$circular-dash 1.4s ease-in-out infinite",strokeDasharray:"80px, 200px",strokeDashoffset:"0px"},circleDeterminate:{transition:t.transitions.create("stroke-dashoffset")},"@keyframes circular-rotate":{"0%":{transformOrigin:"50% 50%"},"100%":{transform:"rotate(360deg)"}},"@keyframes circular-dash":{"0%":{strokeDasharray:"1px, 200px",strokeDashoffset:"0px"},"50%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-15px"},"100%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-125px"}},circleDisableShrink:{animation:"none"}}},nZ=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.color,o=s===void 0?"primary":s,l=t.disableShrink,c=l===void 0?!1:l,h=t.size,u=h===void 0?40:h,d=t.style,p=t.thickness,f=p===void 0?3.6:p,m=t.value,g=m===void 0?0:m,x=t.variant,v=x===void 0?"indeterminate":x,b=Be(t,["classes","className","color","disableShrink","size","style","thickness","value","variant"]),j={},w={},S={};if(v==="determinate"||v==="static"){var _=2*Math.PI*((Ns-f)/2);j.strokeDasharray=_.toFixed(3),S["aria-valuenow"]=Math.round(g),j.strokeDashoffset="".concat(((100-g)/100*_).toFixed(3),"px"),w.transform="rotate(-90deg)"}return y.createElement("div",Z({className:$e(i.root,a,o!=="inherit"&&i["color".concat(ut(o))],{determinate:i.determinate,indeterminate:i.indeterminate,static:i.static}[v]),style:Z({width:u,height:u},w,d),ref:r,role:"progressbar"},S,b),y.createElement("svg",{className:i.svg,viewBox:"".concat(Ns/2," ").concat(Ns/2," ").concat(Ns," ").concat(Ns)},y.createElement("circle",{className:$e(i.circle,c&&i.circleDisableShrink,{determinate:i.circleDeterminate,indeterminate:i.circleIndeterminate,static:i.circleStatic}[v]),style:j,cx:Ns,cy:Ns,r:(Ns-f)/2,fill:"none",strokeWidth:f})))});const ur=Ye(tZ,{name:"MuiCircularProgress",flip:!1})(nZ),{apiAddress:WO}=Tn,_r=(e,t,r,i)=>(a,s)=>{const o={action:i,insights_key:t,insights_type:r};return Ne.post(`${WO}api/users/${e}/userevents/`,o,Ee(s))},YO=(e,t,r)=>(i,a)=>{const s={invitation:e,action:r,insights_type:t};return Ne.post(`${WO}api/preapprovaluserevents/`,s,Ee(a))},{apiAddress:KO}=Tn,rZ=(e,t)=>(r,i)=>{const a={chartbook_browser_view:t},s=`${KO}api/users/${e}/`;return Ne.patch(s,a,Ee(i)).then(o=>{r({type:pj,payload:o.data}),r({type:E5,payload:t})}).catch(o=>{r({type:gf}),o.message!==Ue&&r(he({serverError:"There was a problem updating your user preferences, please try again"}))})},iZ=e=>t=>{t({type:k5,payload:e})},aZ=e=>t=>{t({type:P5,payload:e})},sZ=(e,t)=>(r,i)=>{const a={site_appearance_mode:t},s=`${KO}api/users/${e}/`;return Ne.patch(s,a,Ee(i)).then(o=>{r({type:pj,payload:o.data}),r({type:_5,payload:t})}).catch(o=>{r({type:gf}),o.message!==Ue&&r(he({serverError:"There was a problem updating your user preferences, please try again"}))})},Ii=e=>t=>{t({type:C5,payload:e})},oZ=e=>t=>{t({type:T5,payload:e})},XO=e=>({type:N5,payload:e});function lZ({setModal:e,children:t,disableClickOutsideCancel:r,disablePreventDefault:i,setModalStatus:a,isTopClientQuestionsModal:s}){const o=oa();return n.jsx("div",{className:"fullscreen-container",id:"fullscreen-container",onClick:l=>{i||l.preventDefault(),!r&&l.target===l.currentTarget&&(a(!1),e(!1),s&&o.push("/insights?view=explorer"))},children:t})}const cZ=e=>({}),ot=le(cZ,{setModalStatus:Ii})(lZ);function dZ(e){const[t,r]=y.useState(!1),[i,a]=y.useState(!1),[s,o]=y.useState(!1),[l,c]=y.useState(!1),{email:h,firstName:u,lastName:d,orgName:p,inviterId:f,accountCreationCode:m,createAccount:g,setCurrentStep:x,currentStep:v,getUser:b,inviterOrgs:j,setSpinner:w,showSpinner:S,termsUrl:_}=e,C={password:"",confirmPassword:"",termsAccepted:!1},E=_t().shape({password:Ae().required("Please enter your new password").min(8,"New password must be at least 8 characters"),confirmPassword:Ae().required("").oneOf([BX("password"),null],"Passwords must match"),termsAccepted:cr().required("The terms and conditions must be accepted.").oneOf([!0],"The terms and conditions must be accepted.")}),P=()=>/(android)/i.test(navigator.userAgent),T=()=>window.navigator.userAgent.match(/(MSIE|Trident)/),N=()=>{const U=window.navigator.userAgent;return U.indexOf("Chrome")==-1&&U.indexOf("Safari")>-1},k=()=>["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,I=P()||T()||k(),D=n.jsxs("div",{className:"pdf-viewer-download-l
12ink",children:[n.jsx("i",{className:"material-icons",children:"description"}),n.jsx("a",{onClick:U=>Ip(U,_),download:!0,children:n.jsx("h6",{children:"Download the Terms of Use"})})]}),O=n.jsx(ot,{setModal:r,children:n.jsxs("div",{className:"terms-modal-container","diagnostic-id":"terms-container",children:[n.jsx("i",{className:"material-icons","diagnostic-id":"close-terms-btn",onClick:()=>r(!1),children:"close"}),n.jsxs("div",{id:"terms-wrapper",children:[n.jsx("div",{className:"terms-header-section",children:n.jsxs("div",{className:"terms-title-container",children:[n.jsx("h4",{children:"Clearnomics Terms of Use"}),n.jsx("div",{className:"terms-download-btn",children:n.jsxs("button",{onClick:U=>Ip(U,_),className:"btn-secondary",type:"button",disabled:!_,children:[n.jsx(dt,{icon:nu}),"Download PDF"]})})]})}),n.jsx("div",{id:"terms-of-use",className:"is-placeholder",children:i?n.jsx("div",{className:"pdf-viewer-placeholder",children:n.jsxs("h6",{children:["There was a problem loading the document. Please refresh the page or"," ",n.jsx("a",{href:"mailto:[email protected]",target:"_blank",rel:"noopener noreferrer",children:"contact us"}),"for assistance."]})}):I?D:N()?n.jsxs("object",{data:_,children:[D,n.jsx("embed",{src:_})]}):n.jsxs("object",{data:_,type:"application/pdf",children:[D,n.jsx("embed",{src:_,type:"application/pdf"})]})})]})]})}),$=n.jsx("div",{className:"container password-creation-container",children:n.jsxs("div",{className:"preapproval-wrapper",children:[j[0].inviter_organization!=="Clearnomics"?n.jsx("img",{src:j[0].inviter_logo,alt:""}):n.jsx(n.Fragment,{}),n.jsxs("div",{id:"preapproval-header",children:[n.jsx("h3",{children:"Create your account"}),n.jsx("h6",{children:"You're signing up as:"})]}),n.jsxs("div",{className:"user-info-group",children:[n.jsxs("div",{className:"user-info-field-container",children:[n.jsxs("div",{className:"user-info-field",children:[n.jsx("label",{children:"Email"}),n.jsx("div",{children:h})]}),n.jsxs("div",{className:"user-info-field",children:[n.jsx("label",{children:"Name"}),n.jsx("div",{children:u+" "+d})]}),n.jsxs("div",{className:"user-info-field",children:[n.jsx("label",{children:"Company"}),n.jsx("div",{children:p})]})]}),n.jsx(gt,{initialValues:C,validationSchema:E,onSubmit:(U,{setFieldError:B,setSubmitting:L})=>{g(h,U.password,f,m,U.termsAccepted).then(A=>{A?(w(!0),b().then(R=>{R&&(x(v+1),o(!0),setTimeout(()=>w(!1),1e3))})):c(!0)})},children:({values:U,errors:B,handleSubmit:L,isSubmitting:A,setFieldValue:R,touched:F})=>n.jsx(vt,{noValidate:!0,className:"col s12",onSubmit:L,children:l?n.jsxs("div",{className:"verify-email-wrapper",children:[n.jsx("h5",{children:"This session has expired. Please refresh the page or click the button below to verify your email again."}),n.jsx("div",{className:"verify-email-btn",children:n.jsx("button",{className:"btn btn-primary-lg",type:"button",onClick:()=>{window.location.reload()},children:"Verify Email"})})]}):n.jsxs(n.Fragment,{children:[n.jsx("h5",{children:"Set your new password:"}),n.jsxs("div",{className:"create-password-field-group",children:[n.jsxs("div",{className:"password-field",children:[n.jsx("label",{children:"Password"}),n.jsx(me,{type:"password",className:"validate",name:"password",id:"password","diagnostic-id":"new-pw-input",autoFocus:!0,placeholder:"Enter a password..."})]}),B.password&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:B.password}),n.jsxs("div",{className:"password-field",children:[n.jsx("label",{children:"Confirm password"}),n.jsx(me,{type:"password",className:"validate",name:"confirmPassword",id:"confirmPassword","diagnostic-id":"confirm-new-pw-input",placeholder:"Confirm your password..."})]}),B.confirmPassword&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:B.confirmPassword})]}),n.jsxs("div",{className:"tos-checkbox-field",children:[n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"termsAccepted",id:"termsAccepted","diagnostic-id":"termsAccepted",checked:U.termsAccepted,className:"filled-in",onChange:q=>{const V=!!q.target.checked;R("termsAccepted",V)}}),n.jsx("span",{id:"tos-button-wrapper",children:"I have read and accept the"})," "]}),n.jsx("div",{className:"tos-modal-text",onClick:()=>r(!0),"diagnostic-id":"tos-modal-text",children:"Clearnomics Terms of Use"})]}),F.termsAccepted&&B.termsAccepted&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:B.termsAccepted}),n.jsx("div",{className:"row continue-btn",children:n.jsx("button",{type:"submit","diagnostic-id":"create-account-btn",className:"btn btn-primary-lg",disabled:A||!U.password||!U.confirmPassword||!U.termsAccepted,
12children:"Continue"})})]})})})]}),t&&O]})});return s?n.jsx(qt,{to:"/logo-upload"}):n.jsxs(n.Fragment,{children:[S&&n.jsx(Dn,{}),n.jsx(n.Fragment,{children:$})]})}const uZ=e=>({currentStep:e.preapproval.currentStep,email:e.preapproval.preApprovedUser.email,firstName:e.preapproval.preApprovedUser.first_name,lastName:e.preapproval.preApprovedUser.last_name,orgName:e.preapproval.preApprovedUser.organization_name,accountCreationCode:e.preapproval.preApprovedUser.account_creation_code,inviterOrgs:e.preapproval.preApprovedUser?.inviter_organizations,showSpinner:e.preapproval.showSpinner,termsUrl:e.preapproval&&e.preapproval.preApprovedUser&&e.preapproval.preApprovedUser.terms_of_use_pdf_url}),QO=le(uZ,{createAccount:ZQ,setCurrentStep:za,getUser:Ba,setSpinner:HO})(dZ);function hZ(e){const{inviterOrganizations:t,setCurrentStep:r,currentStep:i}=e,a=t?.length,[s,o]=y.useState(a===1?t[0]?.inviter_id:-1),[l,c]=y.useState(!1),h=p=>{o(p.inviter_id)},u=p=>{p.preventDefault(),c(!0),r(i+1)},d=n.jsx("div",{className:"container",children:n.jsxs("div",{className:"preapproval-wrapper",children:[n.jsxs("div",{id:"preapproval-header","diagnostic-id":"preapproval-provider-header",children:[n.jsx("h3",{children:a===1?"Your access provider":"Select your access provider"}),n.jsx("h6",{className:"header-msg",children:a===1?"Your Clearnomics access is provided by:":"You can access Clearnomics through these partners:"})]}),n.jsx("div",{className:"access-provider-container","diagnostic-id":"access-provider-container",children:t?.map((p,f)=>n.jsx("div",{className:`user-info-field-container ${s===p.inviter_id?"provider-selected":""}`,"diagnostic-id":`access-providers-${f}`,onClick:()=>h(p),children:n.jsxs("div",{className:"user-info-field",children:[n.jsxs("div",{className:"provider-info-wrapper",children:[n.jsx("div",{children:p.inviter_organization}),s===p.inviter_id?n.jsx("i",{className:"material-icons",children:"done"}):n.jsx(n.Fragment,{})]}),p.inviter_logo?n.jsx("img",{src:p.inviter_logo,alt:""}):n.jsx("h4",{children:p.inviter_organization})]})},p.inviter_id))}),n.jsx("div",{className:"continue-btn",children:n.jsx("button",{type:"submit","diagnostic-id":"continue-btn",className:"btn btn-primary-lg",onClick:u,disabled:s===-1,children:"Continue"})})]})});return l?n.jsx(QO,{inviterId:s}):d}const pZ=e=>({inviterOrganizations:e.preapproval.preApprovedUser.inviter_organizations,currentStep:e.preapproval.currentStep}),fZ=le(pZ,{setCurrentStep:za})(hZ);function mZ(e){const[t,r]=y.useState(!1),[i,a]=y.useState(!1),[s,o]=y.useState(!1),[l,c]=y.useState(!1),[h,u]=y.useState(!1),[d,p]=y.useState(!1),[f,m]=y.useState(""),[g,x]=y.useState(!1),[v,b]=y.useState(!1),{Community:j,SponsoredCommunity:w}=Br,{verifySignUpCode:S,verifySignUpUrl:_,verifyEmail:C,showCodeInput:E,setShowCodeInput:P,preApprovedEmail:T,setPreApprovedEmail:N,setShowProgressTracker:k,setCurrentStep:I,currentStep:D,inviterLogo:O,licenseType:$,inviterOrganizations:U}=e,B=new URL(document.location).searchParams,L=B.get("invitation"),A=B.get("verify"),R=$===j||$===w;y.useEffect(()=>{A&&(k(!1),_(A).then(K=>{K.detail==="Provided link is invalid"||K.detail==="Unable to process request"?o(!0):K.detail==="Provided link has expired"?(m(K.invitation),c(!0)):K.detail==="Provided link does not exist"?o(!0):(R?(b(!0),I(D+1)):a(!0),k(!0))}))},[A]);const F=K=>{r(!0),C(A,L).then(z=>{N(T)}),setTimeout(()=>{r(!1)},5e3)},q=K=>{x(!0)};if(g)return n.jsx(qt,{to:`/signup/?invitation=${f}`});const V={code:""},X=n.jsx("div",{className:"container verification-code-container",children:n.jsxs("div",{className:"preapproval-wrapper",children:[O?n.jsx("img",{src:O,alt:""}):n.jsx(n.Fragment,{}),n.jsxs("div",{id:"preapproval-header",children:[n.jsxs("h3",{children:["Welcome to Clearnomics ",R?"Community Edition":""]}),n.jsx("h5",{children:"We'll help you set up your Clearnomics account. Please verify your account information."})]}),n.jsx("div",{className:"user-info-group",children:n.jsx("div",{className:"user-info-field-container",children:n.jsxs("div",{className:"user-info-field",children:[n.jsx("label",{children:"Email"}),n.jsx("div",{children:T})]})})}),n.jsx("div",{className:"signup-code-form-container",children:n.jsx(gt,{initialValues:V,onSubmit:(K,{setFieldValue:z,setFieldError:Y,setSubmitting:ie})=>{u(!0),S(K.code,L).then(ne=>{ne.detail==="No identifier provided"||ne.detail==="Unable to find verification code"||ne.detail==="Provided link has expired"||ne.detail==="Unable to process request"?(a(!1),b(!1),z("code","")):ne.detail==="Unable to validate verification code"?(a(!1),b(!1),p(!0),z("code","")):R?(b(!0),I(D+1)):a(!0),u(!1),ie(!1)})},children:({values:K,errors:z,touched:Y,handleSubmit:ie,isSubmitting:ne})=>n.jsxs(vt,{noValidate:!0,className:"col s12",onSubmit:ie,children:[n.jsx("h5",{"diagnostic-id":"verification-msg",children:"We just sent you a verification code. Please check your inbox and paste your co
12de in the box below:"}),n.jsxs("div",{className:"signup-code-container",children:[n.jsx("div",{className:"signup-code-field",children:n.jsx(me,{type:"text",id:"code","diagnostic-id":"verification-code",name:"code",className:"validate",autoFocus:!0,placeholder:"Verification Code"})}),d&&n.jsxs("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:["This account has been locked due to a high number of verification attempts. Please contact"," ",n.jsx("a",{href:"mailto:[email protected]",target:"_blank",rel:"noopener noreferrer",children:"[email protected]"})," ","for assistance."]})]}),t?n.jsx("div",{className:"code-sent-text",children:n.jsxs("div",{className:"btn-primary-text btn-icon-text","diagnostic-id":"code-sent-text",children:[n.jsx("i",{className:"material-icons",children:"done"}),"Code Sent"]})}):n.jsx("div",{className:"resend-code-btn",children:n.jsxs("button",{type:"button","diagnostic-id":"resend-code-btn",className:"btn-primary-text btn-icon-text",onClick:F,disabled:t,children:[n.jsx("i",{className:"material-icons",children:"replay"}),"Resend Code"]})}),n.jsx("div",{className:"continue-btn",children:n.jsxs("button",{type:"submit","diagnostic-id":"continue-verify-btn",className:"btn btn-primary-lg",disabled:ne||!K.code||h,children:[h?n.jsx("div",{id:"spinner-icon-container",children:n.jsx(ur,{size:"1.25em",thickness:8,variant:"indeterminate"})}):"",h?"":"CONTINUE"]})})]})})})]})}),M=n.jsx("div",{className:"container error-container",children:n.jsx("div",{className:"preapproval-wrapper",children:n.jsxs("div",{id:"preapproval-header",children:[n.jsx("h3",{children:"Invalid link"}),n.jsx("h5",{children:"This verification link is not valid. Please contact the Clearnomics team for assistance."}),n.jsx("div",{className:"contact-btn",children:n.jsx("a",{href:"mailto:[email protected]",children:n.jsx("button",{className:"btn btn-primary-lg","diagnostic-id":"contact-us-btn",children:"Contact Clearnomics"})})})]})})}),W=n.jsx("div",{className:"container error-container",children:n.jsx("div",{className:"preapproval-wrapper",children:n.jsxs("div",{id:"preapproval-header","diagnostic-id":"preapproval-header",children:[n.jsx("h3",{children:"Link expired"}),n.jsx("h5",{children:"For your security, this signup link has expired. Please verify your email by clicking the button below."}),n.jsx("div",{className:"contact-btn",children:n.jsx("button",{className:"btn btn-primary-lg","diagnostic-id":"expired-link-btn",onClick:q,children:"Request a new verification"})})]})})});return i?n.jsx(fZ,{}):v?n.jsx(QO,{inviterId:U&&U[0]?.inviter_id}):E?n.jsx(n.Fragment,{children:X}):s?n.jsx(n.Fragment,{children:M}):l?n.jsx(n.Fragment,{children:W}):n.jsx(n.Fragment,{})}const gZ=e=>({preApprovedEmail:e.preapproval?.preApprovedUser?.preApprovedEmail,currentStep:e.preapproval.currentStep,licenseType:e.preapproval?.preApprovedUser?.license_type,inviterOrganizations:e.preapproval.preApprovedUser.inviter_organizations}),ZO=le(gZ,{verifySignUpCode:QQ,verifySignUpUrl:XQ,setCurrentStep:za,verifyEmail:BO,setPreApprovedEmail:VO,setShowProgressTracker:bu,createMessage:he})(mZ);function vZ(e){const{showLandingPage:t,setShowLandingPage:r,setShowProgressTracker:i,setShowInvitationPage:a,logPreapprovalEvent:s,invitationCode:o,firstName:l}=e,c=()=>{r(!1),i(!0),a(!0),s(o,"preapprovalcommunitygetstarted","open")};return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"hero-area",style:{backgroundImage:`url(${Tn.preapprovalHeroImageUrl})`},children:n.jsxs("div",{className:"container",children:[n.jsxs("h2",{className:"hero-header",children:["Hi ",l]}),n.jsx("h2",{children:"Welcome to Clearnomics Community Edition"}),n.jsxs("div",{className:"welcome-page-wrapper",children:[n.jsxs("div",{className:"welcome-page-left",children:[n.jsx("h4",{children:"Custom-Built for Financial Advisors"}),n.jsx("div",{className:"welcome-page-left-subheader",children:"Clearnomics Community Edition is a market and economic insights platform for advisors to boost client communication and marketing. We provide timely, client-friendly, white-labeled commentaries, charts, and more."}),n.jsx("button",{className:"btn btn-primary-lg","diagnostic-id":"welcome-start-btn",type:"button",onClick:c,children:"GET STARTED"})]}),n.jsxs("div",{className:"welcome-page-right",children:[n.jsxs("div",{className:"description-icon-grp",children:[n.jsx("i",{className:"material-icons",children:"description"}),n.jsxs("div",{className:"sub-header-description",children:[n.jsx("div",{className:"sub-header",children:"Customize a Timely Commentary"}),n.jsx("div",{className:"description",children:"Create and share the latest market insights toolkit"})]})]}),n.jsxs("div",{className:"description-icon-grp",children:[n.jsx("i",{className:"material-icons",children:"insert_chart"}),n.jsxs("div",{className:"sub-header-description",children:[n.jsx("div",{className:"sub-header",children:"Access Popular Charts"}),n.jsx("div",{className:"description",children:"Select client-friendly charts on a variety of topics for use in client presentations"})]})]}),n.jsxs("div",{className:"description-icon-grp",children:[n.jsx(dt,{icon:fj}),n.jsxs("div",{className:"sub-header-description",children:[n.jsx("div",{className:"sub-header",children:"Answer Common Client Questions"}),n.jsx("div",{className:"description",children:"Get timely, substantive answers to share with clients"})]})]})]})]})]})}),n.jsxs("div",{className:"why-clearnomics-container container",children:[n.jsx("h3",{children:"How We Support Advisors"}),n.jsx("h4",{className:"mission-header",children:"Our mission is to deliver the industry’s leading insights to advisors"}),n.jsxs("div",{className:"row",children:[n.jsx("div",{className:"section-background",children:n.jsxs("div",{className:"why-clearnomics-wrapper first",children:[n.jsxs("div",{className:"description-text-grp first",children:[n.jsxs("div",{className:"header-icon-grp",children:[n.jsx("i",{className:"material-symbols-outlined",children:"handshake"}),n.jsx("h4",{children:"Creating Value for Your Clients"})]}),n.jsxs("ul",{children:[n.jsx("li",{children:"Clear, accurate, substantive messages in a variety of formats"}),n.jsx("li",{children:"Always up-to-date charts on the topics your clients care about"}),n.jsx("li",{children:"Enabling regular touchpoints to deepen relationships"})]}),n.jsx("h5",{children:"Deliver quality insights to keep your clients informed and on track"})]}),n.jsx("div",{className:"image-wrapper first",children:n.jsx("img",{src:Tn.preapprovalImageTwo,alt:""})})]})}),n.jsx("div",{className:"section-background",children:n.jsxs("div",{className:"why-clearnomics-wrapper",children:[n.jsx("div",{className:"image-wrapper second",children:n.jsx("img",{src:Tn.preapprovalImageOne,alt:""})}),n.jsxs("div",{className:"description-text-grp second",children:[n.jsxs("div",{className:"header-icon-grp",children:[n.jsx("i",{className:"material-symbols-outlined",children:"elevation"}),n.jsx("h4",{children:"Empowering Your Practice"})]}),n.jsxs("ul",{children:[n.jsx("li",{children:"The team of research analysts, financial writers, and marketing experts that stand behind your team"}),n.jsx("li",{children:"Market insights that power your marketing success"}),n.jsx("li",{children:"Timely, white-labeled answers to address client concerns"})]}),n.jsx("h5",{children:"Our insights are tailored to your clients’ needs and built to scale efficiently"})]})]})})]}),n.jsx("div",{className:"row get-started",children:n.jsx("button",{className:"btn btn-primary-lg","diagnostic-id":"welcome-start-btn",type:"button",onClick:c,children:"GET STARTED"})})]})]})}const bZ=e=>({firstName:e.preapproval.preApprovedUser&&e.preapproval.preApprovedUser.first_name}),yZ=le(bZ,{setShowProgressTracker:bu,logPreapprovalEvent:YO})(vZ),xZ=()=>(y.useEffect(()=>{const e=document.createElement("script");return e.type="text/javascript",e.src=(window.location.protocol==="https:"?"https://":"http://")+"secure.wufoo.com/scripts/embed/form.js",e.async=!0,e.onload=()=>{try{const t={userName:"clearnomics",formHash:"m3b8scr0t17noq",autoResize:!1,height:"625",async:!0,host:"wufoo.com",header:"hide",ssl:!0};if(window.WufooForm){const r=new window.WufooForm;r.initialize(t),r.display()}}catch{}},document.body.appendChild(e),()=>{e&&document.body.contains(e)&&document.body.removeChild(e)}},[]),n.jsx("div",{className:"request-invitation-container",children:n.jsx("div",{className:"wufoo-form-container",children:n.jsxs("div",{className:"row",children:[n.jsxs("div",{className:"col request-invitation",children:[n.jsx("h2",{children:"Request an Invitation"}
12),n.jsx("div",{children:"Thank you for your interest in Clearnomics Community Edition. Please complete this form and our team will be in touch shortly."}),n.jsxs("ul",{className:"request-invitation-list",children:[n.jsxs("li",{children:[n.jsx("i",{className:"material-icons check-mark-icon",children:"check"}),"Enhance your practice with a polished chartbook of customized market and economic insights"]}),n.jsxs("li",{children:[n.jsx("i",{className:"material-icons check-mark-icon",children:"check"}),"Automatically white-label insights with your firm's brand"]}),n.jsxs("li",{children:[n.jsx("i",{className:"material-icons check-mark-icon",children:"check"}),"Get clear talking points to frequently asked market questions"]}),n.jsxs("li",{children:[n.jsx("i",{className:"material-icons check-mark-icon",children:"check"}),"Customize client letters on current market and economic topics"]})]})]}),n.jsx("div",{className:"col wufoo-form",children:n.jsx("div",{className:"wrapper",children:n.jsx("div",{className:"wufoo-form-wrapper",children:n.jsx("div",{id:"wufoo-m3b8scr0t17noq",className:"wufoo-form"})})})})]})})}));function jZ(e){const{verifyInvitationCode:t,verifyEmail:r,setCurrentStep:i,currentStep:a,setPreApprovedEmail:s,setShowProgressTracker:o,email:l,licenseType:c,logPreapprovalEvent:h}=e,{Community:u,SponsoredCommunity:d}=Br,p=c===u||c===d,[f,m]=y.useState(!1),[g,x]=y.useState(!1),[v,b]=y.useState(!1),[j,w]=y.useState(""),[S,_]=y.useState(!1),[C,E]=y.useState(!1),[P,T]=y.useState(!1),[N,k]=y.useState(!1),D=new URL(document.location).searchParams.get("invitation");y.useEffect(()=>{o(!1),t(D).then(U=>{U.status===200?(s(U.data.email),w(U.data.inviter_org==="Clearnomics"?"":U.data.inviter_org_logo),U.data.license_type===u||U.data.license_type===d?T(!0):(x(!0),o(!0)),b(!1)):(b(!0),o(!1))})},[D]);const O=n.jsx("div",{className:"container",children:n.jsxs("div",{className:"preapproval-wrapper",children:[j?n.jsx("img",{src:j,alt:""}):n.jsx(n.Fragment,{}),n.jsxs("div",{id:"preapproval-header",children:[n.jsxs("h3",{children:["Welcome to Clearnomics ",p?"Community Edition":""]}),n.jsx("h5",{children:"We'll help you set up your Clearnomics account. Please verify your account information."})]}),n.jsxs("div",{className:"user-info-group",children:[n.jsxs("div",{className:"user-info-field-container",children:[n.jsxs("div",{className:"user-info-field",children:[n.jsx("label",{children:"Email"}),n.jsx("div",{children:l})]}),n.jsxs("div",{className:"request-invitation",children:["Not you?"," ",n.jsx("span",{className:"form-link",onClick:()=>{k(!0),h(D,"preapprovalrequestform","open")},children:"Click here to request an invitation"})]})]}),C&&n.jsxs("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:["This account has been locked due to a high number of verification attempts. Please contact"," ",n.jsx("a",{href:"mailto:[email protected]",target:"_blank",rel:"noopener noreferrer",children:"[email protected]"})," ","for assistance."]})]}),n.jsxs("div",{className:"verify-msg-btn-container",children:[n.jsx("div",{className:"row",children:"We'll send you a verification email once you click the button below"}),!f&&n.jsx("div",{className:"continue-btn",children:n.jsxs("button",{className:"btn btn-primary-lg","diagnostic-id":"verify-email-btn",disabled:S,onClick:()=>{_(!0),r(null,D).then(U=>{U.detail==="Unable to create verification code"?(m(!1),E(!0)):(s(l),m(!0)),_(!1)})},children:[S?n.jsx("div",{id:"spinner-icon-container",children:n.jsx(ur,{size:"1.25em",thickness:8,variant:"indeterminate"})}):"",S?"":"VERIFY EMAIL"]})})]})]})}),$=n.jsx("div",{className:"container error-container",children:n.jsx("div",{className:"preapproval-wrapper",children:n.jsxs("div",{id:"preapproval-header","diagnostic-id":"preapproval-header",children:[n.jsx("h3",{children:"Invalid invitation"}),n.jsx("h5",{children:"This invitation link is not valid."}),n.jsxs("h5",{children:["If you have already registered,",n.jsxs("div",{children:["please"," ",n.jsx(Ze,{to:"/login",className:"redirect-link",children:"click here"})," ","to login."]})]}),n.jsx("h5",{children:"Otherwise, please request a new invitation, or contact the Clearnomics team for assistance."}),n.jsx("div",{className:"contact-btn",children:n.jsx("button",{className:"btn btn-primary-lg","diagnostic-id":"request-invitation-btn",type:"button",onClick:U=>{k(!0),h(D,"preapprovalrequestform","open")},children:"Request Invitation"})}),n.jsxs("div",{className:"request-invitation",children:["Have a question? Contact"," ",n.jsx("a",{href:"mailto:[email protected]",children:n.jsx("span",{className:"form-link",children:"[email protected]"})})]})]})})});return N?n.jsx(xZ,{}):v?n.jsx(n.Fragment,{children:$}):P?n.jsx(yZ,{setShowLandingPage:T,showLandingPage:P,setShowInvitationPage:x,invitationCode:D}):f?n.jsx(ZO,{setShowCodeInput:m,showCodeInput:f,inviterLogo:j}):g?n.jsx(n.Fragment,{children:O}):n.jsx(n.Fragment,{})}const wZ=e=>({currentStep:e.preapproval.currentStep,email:e.preapproval.preApprovedUser&&e.preapproval.preApprovedUser.email,licenseType:e.preapproval&&e.preapproval.preApprovedUser&&e.preapproval.preApprovedUser.license_type}),SZ=le(wZ,{verifyInvitationCode:KQ,verifyEmail:BO,setCurrentStep:za,setPreApprovedEmail
12:VO,setShowProgressTracker:bu,logPreapprovalEvent:YO})(jZ);function _Z(e){const{showProgressTracker:t,getMaintenanceStatus:r,setCurrentStep:i,isAuthenticated:a,location:s}=e,o=new URL(document.location).searchParams,l=o.get("invitation"),c=o.get("verify");return y.useEffect(()=>{r(),i(1)},[]),s.pathname.includes("/signup")&&a?n.jsx(qt,{to:"/insights"}):n.jsxs("div",{className:"preapproval-container",children:[n.jsx(us,{children:n.jsx(jn,{exact:!0,path:"/signup",component:l||!c?SZ:ZO})}),t?n.jsx(GO,{}):null]})}const CZ=e=>({showProgressTracker:e.preapproval.showProgressTracker,isAuthenticated:e.auth.isAuthenticated}),NZ=le(CZ,{setShowProgressTracker:bu,getMaintenanceStatus:pD,setCurrentStep:za})(_Z);function Or(){var e=Qs()||cu;return e}var Uf=function(t){return t.scrollTop};function ja(e,t){var r=e.timeout,i=e.style,a=i===void 0?{}:i;return{duration:a.transitionDuration||typeof r=="number"?r:r[t.mode]||0,delay:a.transitionDelay}}function Ix(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var EZ={entering:{opacity:1,transform:Ix(1)},entered:{opacity:1,transform:"none"}},ec=y.forwardRef(function(t,r){var i=t.children,a=t.disableStrictModeCompat,s=a===void 0?!1:a,o=t.in,l=t.onEnter,c=t.onEntered,h=t.onEntering,u=t.onExit,d=t.onExited,p=t.onExiting,f=t.style,m=t.timeout,g=m===void 0?"auto":m,x=t.TransitionComponent,v=x===void 0?ru:x,b=Be(t,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),j=y.useRef(),w=y.useRef(),S=Or(),_=S.unstable_strictMode&&!s,C=y.useRef(null),E=mn(i.ref,r),P=mn(_?C:void 0,E),T=function(L){return function(A,R){if(L){var F=_?[C.current,A]:[A,R],q=Ci(F,2),V=q[0],X=q[1];X===void 0?L(V):L(V,X)}}},N=T(h),k=T(function(B,L){Uf(B);var A=ja({style:f,timeout:g},{mode:"enter"}),R=A.duration,F=A.delay,q;g==="auto"?(q=S.transitions.getAutoHeightDuration(B.clientHeight),w.current=q):q=R,B.style.transition=[S.transitions.create("opacity",{duration:q,delay:F}),S.transitions.create("transform",{duration:q*.666,delay:F})].join(","),l&&l(B,L)}),I=T(c),D=T(p),O=T(function(B){var L=ja({style:f,timeout:g},{mode:"exit"}),A=L.duration,R=L.delay,F;g==="auto"?(F=S.transitions.getAutoHeightDuration(B.clientHeight),w.current=F):F=A,B.style.transition=[S.transitions.create("opacity",{duration:F,delay:R}),S.transitions.create("transform",{duration:F*.666,delay:R||F*.333})].join(","),B.style.opacity="0",B.style.transform=Ix(.75),u&&u(B)}),$=T(d),U=function(L,A){var R=_?L:A;g==="auto"&&(j.current=setTimeout(R,w.current||0))};return y.useEffect(function(){return function(){clearTimeout(j.current)}},[]),y.createElement(v,Z({appear:!0,in:o,nodeRef:_?C:void 0,onEnter:k,onEntered:I,onEntering:N,onExit:O,onExited:$,onExiting:D,addEndListener:U,timeout:g==="auto"?null:g},b),function(B,L){return y.cloneElement(i,Z({style:Z({opacity:0,transform:Ix(.75),visibility:B==="exited"&&!o?"hidden":void 0},EZ[B],f,i.props.style),ref:P},L))})});ec.muiSupportAuto=!0;const TZ=Object.freeze(Object.defineProperty({__proto__:null,default:ec},Symbol.toStringTag,{value:"Module"}));var yu=typeof window<"u"&&typeof document<"u"&&typeof navigator<"u",kZ=(function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(yu&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0})();function PZ(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}function IZ(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},kZ))}}var DZ=yu&&window.Promise,RZ=DZ?PZ:IZ;function JO(e){var t={};return e&&t.toString.call(e)==="[object Function]"}function Qo(e,t){if(e.nodeType!==1)return[];var r=e.ownerDocument.defaultView,i=r.getComputedStyle(e,null);return t?i[t]:i}function Sw(e){return e.nodeName==="HTML"?e:e.parentNode||e.host}function xu(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=Qo(e),r=t.overflow,i=t.overflowX,a=t.overflowY;return/(auto|scroll|overlay)/.test(r+a+i)?e:xu(Sw(e))}function eA(e){return e&&e.referenceNode?e.referenceNode:e}var L1=yu&&!!(window.MSInputMethodContext&&document.documentMode),F1=yu&&/MSIE 10/.test(navigator.userAgent);function tc(e){return e===11?L1:e===10?F1:L1||F1}function Ml(e){if(!e)return document.documentElement;for(var t=tc(10)?document.body:null,r=e.offsetParent||null;r===t&&e.nextElementSibling;)r=(e=e.nextElementSibling).offsetParent;var i=r&&r.nodeName;return!i||i==="BODY"||i==="HTML"?e?e.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(r.nodeName)!==-1&&Qo(r,"position")==="static"?Ml(r):r}function OZ(e){var t=e.nodeName;return t==="BODY"?!1:t==="HTML"||Ml(e.firstElementChild)===e}function Dx(e){return e.parentNode!==null?Dx(e.parentNode):e}function Hp(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var r=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=r?e:t,a=r?t:e,s=document.createRange();s.setStart(i,0),s.setEnd(a,0);var o=s.commonAncestorContainer;if(e!==o&&t!==o||i.contains(a))return OZ(o)?o:Ml(o);var l=Dx(e);return l.host?Hp(l.host,t):Hp(e,Dx(t).host)}function $l(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",r=t==="top"?"scrollTop":"scrollLeft",i=e.nodeName;if(i==="BODY"||i==="HTML"){var a=e.ownerDocument.documentElement,s=e.ownerDocument.scrollingElement||a;return s[r]}return e[r]}function AZ(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=$l(t,"top"),a=$l(t,"left"),s=r?-1:1;return e.top+=i*s,e.bottom+=i*s,e.left+=a*s,e.right+=a*s,e}function U1(e,t){var r=t==="x"?"Left":"Top",i=r==="Left"?"Right":"Bottom";return parseFloat(e["border"+r+"Width"])+parseFloat(e["border"+i+"Width"])}function B1(e,t,r,i){return Math.max(t["offset"+e],t["scroll"+e],r["client"+e],r["offset"+e],r["scroll"+e],tc(10)?parseInt(r["offset"+e])+parseInt(i["margin"+(e==="Height"?"Top":"Left")])+parseInt(i["margin"+(e==="Height"?"Bottom":"Right")]):0)}function tA(e){var t=e.body,r=e.documentElement,i=tc(10)&&getComputedStyle(r);
vendor: 13,713 bytes, line 12
12return{height:B1("Height",t,r,i),width:B1("Width",t,r,i)}}var MZ=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},$Z=(function(){function e(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}})(),Ll=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},ia=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e};function Hs(e){return ia({},e,{right:e.left+e.width,bottom:e.top+e.height})}function Rx(e){var t={};try{if(tc(10)){t=e.getBoundingClientRect();var r=$l(e,"top"),i=$l(e,"left");t.top+=r,t.left+=i,t.bottom+=r,t.right+=i}else t=e.getBoundingClientRect()}catch{}var a={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},s=e.nodeName==="HTML"?tA(e.ownerDocument):{},o=s.width||e.clientWidth||a.width,l=s.height||e.clientHeight||a.height,c=e.offsetWidth-o,h=e.offsetHeight-l;if(c||h){var u=Qo(e);c-=U1(u,"x"),h-=U1(u,"y"),a.width-=c,a.height-=h}return Hs(a)}function _w(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=tc(10),a=t.nodeName==="HTML",s=Rx(e),o=Rx(t),l=xu(e),c=Qo(t),h=parseFloat(c.borderTopWidth),u=parseFloat(c.borderLeftWidth);r&&a&&(o.top=Math.max(o.top,0),o.left=Math.max(o.left,0));var d=Hs({top:s.top-o.top-h,left:s.left-o.left-u,width:s.width,height:s.height});if(d.marginTop=0,d.marginLeft=0,!i&&a){var p=parseFloat(c.marginTop),f=parseFloat(c.marginLeft);d.top-=h-p,d.bottom-=h-p,d.left-=u-f,d.right-=u-f,d.marginTop=p,d.marginLeft=f}return(i&&!r?t.contains(l):t===l&&l.nodeName!=="BODY")&&(d=AZ(d,t)),d}function LZ(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=e.ownerDocument.documentElement,i=_w(e,r),a=Math.max(r.clientWidth,window.innerWidth||0),s=Math.max(r.clientHeight,window.innerHeight||0),o=t?0:$l(r),l=t?0:$l(r,"left"),c={top:o-i.top+i.marginTop,left:l-i.left+i.marginLeft,width:a,height:s};return Hs(c)}function nA(e){var t=e.nodeName;if(t==="BODY"||t==="HTML")return!1;if(Qo(e,"position")==="fixed")return!0;var r=Sw(e);return r?nA(r):!1}function rA(e){if(!e||!e.parentElement||tc())return document.documentElement;for(var t=e.parentElement;t&&Qo(t,"transform")==="none";)t=t.parentElement;return t||document.documentElement}function Cw(e,t,r,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,s={top:0,left:0},o=a?rA(e):Hp(e,eA(t));if(i==="viewport")s=LZ(o,a);else{var l=void 0;i==="scrollParent"?(l=xu(Sw(t)),l.nodeName==="BODY"&&(l=e.ownerDocument.documentElement)):i==="window"?l=e.ownerDocument.documentElement:l=i;var c=_w(l,o,a);if(l.nodeName==="HTML"&&!nA(o)){var h=tA(e.ownerDocument),u=h.height,d=h.width;s.top+=c.top-c.marginTop,s.bottom=u+c.top,s.left+=c.left-c.marginLeft,s.right=d+c.left}else s=c}r=r||0;var p=typeof r=="number";return s.left+=p?r:r.left||0,s.top+=p?r:r.top||0,s.right-=p?r:r.right||0,s.bottom-=p?r:r.bottom||0,s}function FZ(e){var t=e.width,r=e.height;return t*r}function iA(e,t,r,i,a){var s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(e.indexOf("auto")===-1)return e;var o=Cw(r,i,s,a),l={top:{width:o.width,height:t.top-o.top},right:{width:o.right-t.right,height:o.height},bottom:{width:o.width,height:o.bottom-t.bottom},left:{width:t.left-o.left,height:o.height}},c=Object.keys(l).map(function(p){return ia({key:p},l[p],{area:FZ(l[p])})}).sort(function(p,f){return f.area-p.area}),h=c.filter(function(p){var f=p.width,m=p.height;return f>=r.clientWidth&&m>=r.clientHeight}),u=h.length>0?h[0].key:c[0].key,d=e.split("-")[1];return u+(d?"-"+d:"")}function aA(e,t,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,a=i?rA(t):Hp(t,eA(r));return _w(r,a,i)}function sA(e){var t=e.ownerDocument.defaultView,r=t.getComputedStyle(e),i=parseFloat(r.marginTop||0)+parseFloat(r.marginBottom||0),a=parseFloat(r.marginLeft||0)+parseFloat(r.marginRight||0),s={width:e.offsetWidth+a,height:e.offsetHeight+i};return s}function Gp(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(r){return t[r]})}function oA(e,t,r){r=r.split("-")[0];var i=sA(e),a={width:i.width,height:i.height},s=["right","left"].indexOf(r)!==-1,o=s?"top":"left",l=s?"left":"top",c=s?"height":"width",h=s?"width":"height";return a[o]=t[o]+t[c]/2-i[c]/2,r===l?a[l]=t[l]-i[h]:a[l]=t[Gp(l)],a}function ju(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function UZ(e,t,r){if(Array.prototype.findIndex)return e.findIndex(function(a){return a[t]===r});var i=ju(e,function(a){return a[t]===r});return e.indexOf(i)}function lA(e,t,r){var i=r===void 0?e:e.slice(0,UZ(e,"name",r));return i.forEach(function(a){a.function;var s=a.function||a.fn;a.enabled&&JO(s)&&(t.offsets.popper=Hs(t.offsets.popper),t.offsets.reference=Hs(t.offsets.reference),t=s(t,a))}),t}function BZ(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=aA(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=iA(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=oA(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=lA(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function cA(e,t){return e.some(function(r){var i=r.name,a=r.enabled;return a&&i===t})}function Nw(e){for(var t=[!1,"ms","Webkit","Moz","O"],r=e.charAt(0).toUpperCase()+e.slice(1),i=0;i<t.length;i++){var a=t[i],s=a?""+a+r:e;if(typeof document.body.style[s]<"u")return s}return null}function qZ(){return this.state.isDestroyed=!0,cA(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[Nw("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function dA(e){var t=e.ownerDocument;return t?t.defaultView:window}function uA(e,t,r,i){var a=e.nodeName==="BODY",s=a?e.ownerDocument.defaultView:e;s.addEventListener(t,r,{passive:!0}),a||uA(xu(s.parentNode),t,r,i),i.push(s)}function VZ(e,t,r,i){r.updateBound=i,dA(e).addEventListener("resize",r.updateBound,{passive:!0});var a=xu(e);return uA(a,"scroll",r.updateBound,r.scrollParents),r.scrollElement=a,r.eventsEnabled=!0,r}function zZ(){this.state.eventsEnabled||(this.state=VZ(this.reference,this.options,this.state,this.scheduleUpdate))}function HZ(e,t){return dA(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(r){r.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function GZ(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=HZ(this.reference,this.state))}function Ew(e){return e!==""&&!isNaN(parseFloat(e))&&isFinite(e)}function Ox(e,t){Object.keys(t).forEach(function(r){var i="";["width","height","top","right","bottom","left"].indexOf(r)!==-1&&Ew(t[r])&&(i="px"),e.style[r]=t[r]+i})}function WZ(e,t){Object.keys(t).forEach(function(r){var i=t[r];i!==!1?e.setAttribute(r,t[r]):e.removeAttribute(r)})}function YZ(e){return Ox(e.instance.popper,e.styles),WZ(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&Ox(e.arrowElement,e.arrowStyles),e}function KZ(e,t,r,i,a){var s=aA(a,t,e,r.positionFixed),o=iA(r.placement,s,t,e,r.modifiers.flip.boundariesElement,r.modifiers.flip.padding);return t.setAttribute("x-placement",o),Ox(t,{position:r.positionFixed?"fixed":"absolute"}),r}function XZ(e,t){var r=e.offsets,i=r.popper,a=r.reference,s=Math.round,o=Math.floor,l=function(v){return v},c=s(a.width),h=s(i.width),u=["left","right"].indexOf(e.placement)!==-1,d=e.placement.indexOf("-")!==-1,p=c%2===h%2,f=c%2===1&&h%2===1,m=t?u||d||p?s:o:l,g=t?s:l;return{left:m(f&&!d&&t?i.left-1:i.left),top:g(i.top),bottom:g(i.bottom),right:m(i.right)}}var QZ=yu&&/Firefox/i.test(navigator.userAgent);function ZZ(e,t){var r=t.x,i=t.y,a=e.offsets.popper,s=ju(e.instance.modifiers,function(j){return j.name==="applyStyle"}).gpuAcceleration,o=s!==void 0?s:t.gpuAcceleration,l=Ml(e.instance.popper),c=Rx(l),h={position:a.position},u=XZ(e,window.devicePixelRatio<2||!QZ),d=r==="bottom"?"top":"bottom",p=i==="right"?"left":"right",f=Nw("transform"),m=void 0,g=void 0;if(d==="bottom"?l.nodeName==="HTML"?g=-l.clientHeight+u.bottom:g=-c.height+u.bottom:g=u.top,p==="right"?l.nodeName==="HTML"?m=-l.clientWidth+u.right:m=-c.width+u.right:m=u.left,o&&f)h[f]="translate3d("+m+"px, "+g+"px, 0)",h[d]=0,h[p]=0,h.willChange="transform";else{var x=d==="bottom"?-1:1,v=p==="right"?-1:1;h[d]=g*x,h[p]=m*v,h.willChange=d+", "+p}var b={"x-placement":e.placement};return e.attributes=ia({},b,e.attributes),e.styles=ia({},h,e.styles),e.arrowStyles=ia({},e.offsets.arrow,e.arrowStyles),e}function hA(e,t,r){var i=ju(e,function(l){var c=l.name;return c===t}),a=!!i&&e.some(function(l){return l.name===r&&l.enabled&&l.order<i.order});if(!a)var s="`"+t+"`",o="`"+r+"`";return a}function JZ(e,t){var r;if(!hA(e.instance.modifiers,"arrow","keepTogether"))return e;var i=t.element;if(typeof i=="string"){if(i=e.instance.popper.querySelector(i),!i)return e}else if(!e.instance.popper.contains(i))return e;var a=e.placement.split("-")[0],s=e.offsets,o=s.popper,l=s.reference,c=["left","right"].indexOf(a)!==-1,h=c?"height":"width",u=c?"Top":"Left",d=u.toLowerCase(),p=c?"left":"top",f=c?"bottom":"right",m=sA(i)[h];l[f]-m<o[d]&&(e.offsets.popper[d]-=o[d]-(l[f]-m)),l[d]+m>o[f]&&(e.offsets.popper[d]+=l[d]+m-o[f]),e.offsets.popper=Hs(e.offsets.popper);var g=l[d]+l[h]/2-m/2,x=Qo(e.instance.popper),v=parseFloat(x["margin"+u]),b=parseFloat(x["border"+u+"Width"]),j=g-e.offsets.popper[d]-v-b;return j=Math.max(Math.min(o[h]-m,j),0),e.arrowElement=i,e.offsets.arrow=(r={},Ll(r,d,Math.round(j)),Ll(r,p,""),r),e}function eJ(e){return e==="end"?"start":e==="start"?"end":e}var pA=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Vb=pA.slice(3);function q1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=Vb.indexOf(e),i=Vb.slice(r+1).concat(Vb.slice(0,r));return t?i.reverse():i}var zb={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function tJ(e,t){if(cA(e.instance.modifiers,"inner")||e.flipped&&e.placement===e.originalPlacement)return e;var r=Cw(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),i=e.placement.split("-")[0],a=Gp(i),s=e.placement.split("-")[1]||"",o=[];switch(t.behavior){case zb.FLIP:o=[i,a];break;case zb.CLOCKWISE:o=q1(i);break;case zb.COUNTERCLOCKWISE:o=q1(i,!0);break;default:o=t.behavior}return o.forEach(function(l,c){if(i!==l||o.length===c+1)return e;i=e.placement.split("-")[0],a=Gp(i);var h=e.offsets.popper,u=e.offsets.reference,d=Math.floor,p=i==="left"&&d(h.right)>d(u.left)||i==="right"&&d(h.left)<d(u.right)||i==="top"&&d(h.bottom)>d(u.top)||i==="bottom"&&d(h.top)<d(u.bottom),f=d(h.left)<d(r.left),m=d(h.right)>d(r.right),g=d(h.top)<d(r.top),x=d(h.bottom)>d(r.bottom),v=i==="left"&&f||i==="right"&&m||i==="top"&&g||i==="bottom"&&x,b=["top","bottom"].indexOf(i)!==-1,j=!!t.flipVariations&&(b&&s==="start"&&f||b&&s==="end"&&m||!b&&s==="start"&&g||!b&&s==="end"&&x),w=!!t.flipVariationsByContent&&(b&&s==="start"&&m||b&&s==="end"&&f||!b&&s==="start"&&x||!b&&s==="end"&&g),S=j||w;(p||v||S)&&(e.flipped=!0,(p||v)&&(i=o[c+1]),S&&(s=eJ(s)),e.placement=i+(s?"-"+s:""),e.offsets.popper=ia({},e.offsets.popper,oA(e.instance.popper,e.offsets.reference,e.placement)),e=lA(e.instance.modifiers,e,"flip"))}),e}function nJ(e){var t=e.offsets,r=t.popper,i=t.reference,a=e.placement.split("-")[0],s=Math.floor,o=["top","bottom"].indexOf(a)!==-1,l=o?"right":"bottom",c=o?"left":"top",h=o?"width":"height";return r[l]<s(i[c])&&(e.offsets.popper[c]=s(i[c])-r[h]),r[c]>s(i[l])&&(e.offsets.popper[c]=s(i[l])),e}function rJ(e,t,r,i){var a=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),s=+a[1],o=a[2];if(!s)return e;if(o.indexOf("%")===0){var l=void 0;o==="%p"?l=r:l=i;var c=Hs(l);return c[t]/100*s}else if(o==="vh"||o==="vw"){var h=void 0;return o==="vh"?h=Math.max(document.documentElement.clientHeight,window.innerHeight||0):h=Math.max(document.documentElement.clientWidth,window.innerWidth||0),h/100*s}else return s}function iJ(e,t,r,i){var a=[0,0],s=["right","left"].indexOf(i)!==-1,o=e.split(/(\+|\-)/).map(function(u){return u.trim()}),l=o.indexOf(ju(o,function(u){return u.search(/,|\s/)!==-1}));o[l]&&o[l].indexOf(",");var c=/\s*,\s*|\s+/,h=l!==-1?[o.slice(0,l).concat([o[l].split(c)[0]]),[o[l].split(c)[1]].concat(o.slice(l+1))]:[o];return h=h.map(function(u,d){var p=(d===1?!s:s)?"height":"width",f=!1;return u.reduce(function(m,g){return m[m.length-1]===""&&["+","-"].indexOf(g)!==-1?(m[m.length-1]=g,f=!0,m):f?(m[m.length-1]+=g,f=!1,m):m.concat(g)},[]).map(function(m){return rJ(m,p,t,r)})}),h.forEach(function(u,d){u.forEach(function(p,f){Ew(p)&&(a[d]+=p*(u[f-1]==="-"?-1:1))})}),a}function aJ(e,t){var r=t.offset,i=e.placement,a=e.offsets,s=a.popper,o=a.reference,l=i.split("-")[0],c=void 0;
12return Ew(+r)?c=[+r,0]:c=iJ(r,s,o,l),l==="left"?(s.top+=c[0],s.left-=c[1]):l==="right"?(s.top+=c[0],s.left+=c[1]):l==="top"?(s.left+=c[0],s.top-=c[1]):l==="bottom"&&(s.left+=c[0],s.top+=c[1]),e.popper=s,e}function sJ(e,t){var r=t.boundariesElement||Ml(e.instance.popper);e.instance.reference===r&&(r=Ml(r));var i=Nw("transform"),a=e.instance.popper.style,s=a.top,o=a.left,l=a[i];a.top="",a.left="",a[i]="";var c=Cw(e.instance.popper,e.instance.reference,t.padding,r,e.positionFixed);a.top=s,a.left=o,a[i]=l,t.boundaries=c;var h=t.priority,u=e.offsets.popper,d={primary:function(f){var m=u[f];return u[f]<c[f]&&!t.escapeWithReference&&(m=Math.max(u[f],c[f])),Ll({},f,m)},secondary:function(f){var m=f==="right"?"left":"top",g=u[m];return u[f]>c[f]&&!t.escapeWithReference&&(g=Math.min(u[m],c[f]-(f==="right"?u.width:u.height))),Ll({},m,g)}};return h.forEach(function(p){var f=["left","top"].indexOf(p)!==-1?"primary":"secondary";u=ia({},u,d[f](p))}),e.offsets.popper=u,e}function oJ(e){var t=e.placement,r=t.split("-")[0],i=t.split("-")[1];if(i){var a=e.offsets,s=a.reference,o=a.popper,l=["bottom","top"].indexOf(r)!==-1,c=l?"left":"top",h=l?"width":"height",u={start:Ll({},c,s[c]),end:Ll({},c,s[c]+s[h]-o[h])};e.offsets.popper=ia({},o,u[i])}return e}function lJ(e){if(!hA(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,r=ju(e.instance.modifiers,function(i){return i.name==="preventOverflow"}).boundaries;if(t.bottom<r.top||t.left>r.right||t.top>r.bottom||t.right<r.left){if(e.hide===!0)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(e.hide===!1)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}function cJ(e){var t=e.placement,r=t.split("-")[0],i=e.offsets,a=i.popper,s=i.reference,o=["left","right"].indexOf(r)!==-1,l=["top","left"].indexOf(r)===-1;return a[o?"left":"top"]=s[r]-(l?a[o?"width":"height"]:0),e.placement=Gp(t),e.offsets.popper=Hs(a),e}var dJ={shift:{order:100,enabled:!0,fn:oJ},offset:{order:200,enabled:!0,fn:aJ,offset:0},preventOverflow:{order:300,enabled:!0,fn:sJ,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:nJ},arrow:{order:500,enabled:!0,fn:JZ,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:tJ,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:cJ},hide:{order:800,enabled:!0,fn:lJ},computeStyle:{order:850,enabled:!0,fn:ZZ,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:YZ,onLoad:KZ,gpuAcceleration:void 0}},uJ={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:dJ},Bf=(function(){function e(t,r){var i=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};MZ(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=RZ(this.update.bind(this)),this.options=ia({},e.Defaults,a),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=r&&r.jquery?r[0]:r,this.options.modifiers={},Object.keys(ia({},e.Defaults.modifiers,a.modifiers)).forEach(function(o){i.options.modifiers[o]=ia({},e.Defaults.modifiers[o]||{},a.modifiers?a.modifiers[o]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(o){return ia({name:o},i.options.modifiers[o])}).sort(function(o,l){return o.order-l.order}),this.modifiers.forEach(function(o){o.enabled&&JO(o.onLoad)&&o.onLoad(i.reference,i.popper,i.options,o,i.state)}),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return $Z(e,[{key:"update",value:function(){return BZ.call(this)}},{key:"destroy",value:function(){return qZ.call(this)}},{key:"enableEventListeners",value:function(){return zZ.call(this)}},{key:"disableEventListeners",value:function(){return GZ.call(this)}}]),e})();Bf.Utils=(typeof window<"u"?window:wo).PopperUtils;Bf.placements=pA;Bf.Defaults=uJ;function hJ(e){return e=typeof e=="function"?e():e,Fr.findDOMNode(e)}var Hb=typeof window<"u"?y.useLayoutEffect:y.useEffect,Tw=y.forwardRef(function(t,r){var i=t.children,a=t.container,s=t.disablePortal,o=s===void 0?!1:s,l=t.onRendered,c=y.useState(null),h=c[0],u=c[1],d=mn(y.isValidElement(i)?i.ref:null,r);return Hb(function(){o||u(hJ(a)||document.body)},[a,o]),Hb(function(){if(h&&!o)return Bi(r,h),function(){Bi(r,null)}},[r,h,o]),Hb(function(){l&&(h||o)&&l()},[l,h,o]),o?y.isValidElement(i)?y.cloneElement(i,{ref:d}):i:h&&Fr.createPortal(i,h)});function pJ(e,t){var r=t&&t.direction||"ltr";if(r==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function V1(e){return typeof e=="function"?e():e}var fJ=typeof window<"u"?y.useLayoutEffect:y.useEffect,mJ={},fA=y.forwardRef(function(t,r){var i=t.anchorEl,a=t.children,s=t.container,o=t.disablePortal,l=o===void 0?!1:o,c=t.keepMounted,h=c===void 0?!1:c,u=t.modifiers,d=t.open,p=t.placement,f=p===void 0?"bottom":p,m=t.popperOptions,g=m===void 0?mJ:m,x=t.popperRef,v=t.style,b=t.transition,j=b===void 0?!1:b,w=Be(t,["anchorEl","children","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition"]),S=y.useRef(null),_=mn(S,r),C=y.useRef(null),E=mn(C,x),P=y.useRef(E);fJ(function(){P.current=E},[E]),y.useImperativeHandle(x,function(){return C.current},[]);var T=y.useState(!0),N=T[0],k=T[1],I=Qs(),D=pJ(f,I),O=y.useState(D),$=O[0],U=O[1];
12y.useEffect(function(){C.current&&C.current.update()});var B=y.useCallback(function(){if(!(!S.current||!i||!d)){C.current&&(C.current.destroy(),P.current(null));var V=function(W){U(W.placement)};V1(i);var X=new Bf(V1(i),S.current,Z({placement:D},g,{modifiers:Z({},l?{}:{preventOverflow:{boundariesElement:"window"}},u,g.modifiers),onCreate:Ma(V,g.onCreate),onUpdate:Ma(V,g.onUpdate)}));P.current(X)}},[i,l,u,d,D,g]),L=y.useCallback(function(V){Bi(_,V),B()},[_,B]),A=function(){k(!1)},R=function(){C.current&&(C.current.destroy(),P.current(null))},F=function(){k(!0),R()};if(y.useEffect(function(){return function(){R()}},[]),y.useEffect(function(){!d&&!j&&R()},[d,j]),!h&&!d&&(!j||N))return null;var q={placement:$};return j&&(q.TransitionProps={in:d,onEnter:A,onExited:F}),y.createElement(Tw,{disablePortal:l,container:s},y.createElement("div",Z({ref:L,role:"tooltip"},w,{style:Z({position:"fixed",top:0,left:0,display:!d&&h&&!j?"none":null},v)}),typeof a=="function"?a(q):a))});function z1(e){return Math.round(e*1e5)/1e5}function gJ(){return{'&[x-placement*="bottom"] $arrow':{top:0,left:0,marginTop:"-0.71em",marginLeft:4,marginRight:4,"&::before":{transformOrigin:"0 100%"}},'&[x-placement*="top"] $arrow':{bottom:0,left:0,marginBottom:"-0.71em",marginLeft:4,marginRight:4,"&::before":{transformOrigin:"100% 0"}},'&[x-placement*="right"] $arrow':{left:0,marginLeft:"-0.71em",height:"1em",width:"0.71em",marginTop:4,marginBottom:4,"&::before":{transformOrigin:"100% 100%"}},'&[x-placement*="left"] $arrow':{right:0,marginRight:"-0.71em",height:"1em",width:"0.71em",marginTop:4,marginBottom:4,"&::before":{transformOrigin:"0 0"}}}}var vJ=function(t){return{popper:{zIndex:t.zIndex.tooltip,pointerEvents:"none"},popperInteractive:{pointerEvents:"auto"},popperArrow:gJ(),tooltip:{backgroundColor:tn(t.palette.grey[700],.9),borderRadius:t.shape.borderRadius,color:t.palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(10),lineHeight:"".concat(z1(14/10),"em"),maxWidth:300,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium},tooltipArrow:{position:"relative",margin:"0"},arrow:{overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:tn(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}},touch:{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:"".concat(z1(16/14),"em"),fontWeight:t.typography.fontWeightRegular},tooltipPlacementLeft:Ct({transformOrigin:"right center",margin:"0 24px "},t.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementRight:Ct({transformOrigin:"left center",margin:"0 24px"},t.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementTop:Ct({transformOrigin:"center bottom",margin:"24px 0"},t.breakpoints.up("sm"),{margin:"14px 0"}),tooltipPlacementBottom:Ct({transformOrigin:"center top",margin:"24px 0"},t.breakpoints.up("sm"),{margin:"14px 0"})}},Ju=!1,Gb=null,bJ=y.forwardRef(function(t,r){var i=t.arrow,a=i===void 0?!1:i,s=t.children,o=t.classes,l=t.disableFocusListener,c=l===void 0?!1:l,h=t.disableHoverListener,u=h===void 0?!1:h,d=t.disableTouchListener,p=d===void 0?!1:d,f=t.enterDelay,m=f===void 0?100:f,g=t.enterNextDelay,x=g===void 0?0:g,v=t.enterTouchDelay,b=v===void 0?700:v,j=t.id,w=t.interactive,S=w===void 0?!1:w,_=t.leaveDelay,C=_===void 0?0:_,E=t.leaveTouchDelay,P=E===void 0?1500:E,T=t.onClose,N=t.onOpen,k=t.open,I=t.placement,D=I===void 0?"bottom":I,O=t.PopperComponent,$=O===void 0?fA:O,U=t.PopperProps,B=t.title,L=t.TransitionComponent,A=L===void 0?ec:L,R=t.TransitionProps,F=Be(t,["arrow","children","classes","disableFocusListener","disableHoverListener","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","id","interactive","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","title","TransitionComponent","TransitionProps"]),q=Or(),V=y.useState(),X=V[0],M=V[1],W=y.useState(null),K=W[0],z=W[1],Y=y.useRef(!1),ie=y.useRef(),ne=y.useRef(),ve=y.useRef(),pe=y.useRef(),be=vs({controlled:k,default:!1,name:"Tooltip",state:"open"}),ye=Ci(be,2),ke=ye[0],fe=ye[1],se=ke,ge=Rl(j);y.useEffect(function(){return function(){clearTimeout(ie.current),clearTimeout(ne.current),clearTimeout(ve.current),clearTimeout(pe.current)}},[]);var De=function(pn){clearTimeout(Gb),Ju=!0,fe(!0),N&&N(pn)},ae=function(){var pn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return function(nn){var Rn=s.props;nn.type==="mouseover"&&Rn.onMouseOver&&pn&&Rn.onMouseOver(nn),!(Y.current&&nn.type!=="touchstart")&&(X&&X.removeAttribute("title"),clearTimeout(ne.current),clearTimeout(ve.current),m||Ju&&x?(nn.persist(),ne.current=setTimeout(function(){De(nn)},Ju?x:m)):De(nn))}},Q=Zl(),ee=Q.isFocusVisible,oe=Q.onBlurVisible,Pe=Q.ref,Fe=y.useState(!1),Ie=Fe[0],Re=Fe[1],Ve=function(){Ie&&(Re(!1),oe())},Xe=function(){var pn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return function(nn){X||M(nn.currentTarget),ee(nn)&&(Re(!0),ae()(nn));var Rn=s.props;Rn.onFocus&&pn&&Rn.onFocus(nn)}},et=function(pn){clearTimeout(Gb),Gb=setTimeout(function(){Ju=!1},800+C),fe(!1),T&&T(pn),clearTimeout(ie.current),ie.current=setTimeout(function(){Y.current=!1},q.transitions.duration.shortest)},rt=function(){var pn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return function(nn){var Rn=s.props;nn.type==="blur"&&(Rn.onBlur&&pn&&Rn.onBlur(nn),Ve()),nn.type==="mouseleave"&&Rn.onMouseLeave&&nn.currentTarget===X&&Rn.onMouseLeave(nn),clearTimeout(ne.current),clearTimeout(ve.current),nn.persist(),ve.current=setTimeout(function(){et(nn)},C)}},bt=function(pn){Y.current=!0;var nn=s.props;nn.onTouchStart&&nn.onTouchStart(pn)},Qe=function(pn){bt(pn),clearTimeout(ve.current),clearTimeout(ie.current),clearTimeout(pe.current),pn.persist(),pe.current=setTimeout(function(){ae()(pn)},b)},tt=function(pn){s.props.onTouchEnd&&s.props.onTouchEnd(pn),clearTimeout(pe.current),clearTimeout(ve.current),pn.persist(),ve.current=setTimeout(function(){et(pn)},P)},We=mn(M,r),pt=mn(Pe,We),Et=y.useCallback(function($t){Bi(pt,Fr.findDOMNode($t))},[pt]),Ot=mn(s.ref,Et);B===""&&(se=!1);var kt=!se&&!u,Pt=Z({"aria-describedby":se?ge:null,title:kt&&typeof B=="str
12ing"?B:null},F,s.props,{className:$e(F.className,s.props.className),onTouchStart:bt,ref:Ot}),Ut={};p||(Pt.onTouchStart=Qe,Pt.onTouchEnd=tt),u||(Pt.onMouseOver=ae(),Pt.onMouseLeave=rt(),S&&(Ut.onMouseOver=ae(!1),Ut.onMouseLeave=rt(!1))),c||(Pt.onFocus=Xe(),Pt.onBlur=rt(),S&&(Ut.onFocus=Xe(!1),Ut.onBlur=rt(!1)));var Nn=y.useMemo(function(){return hs({popperOptions:{modifiers:{arrow:{enabled:!!K,element:K}}}},U)},[K,U]);return y.createElement(y.Fragment,null,y.cloneElement(s,Pt),y.createElement($,Z({className:$e(o.popper,S&&o.popperInteractive,a&&o.popperArrow),placement:D,anchorEl:X,open:X?se:!1,id:Pt["aria-describedby"],transition:!0},Ut,Nn),function($t){var pn=$t.placement,nn=$t.TransitionProps;return y.createElement(A,Z({timeout:q.transitions.duration.shorter},nn,R),y.createElement("div",{className:$e(o.tooltip,o["tooltipPlacement".concat(ut(pn.split("-")[0]))],Y.current&&o.touch,a&&o.tooltipArrow)},B,a?y.createElement("span",{className:o.arrow,ref:z}):null))}))});const Ke=Ye(vJ,{name:"MuiTooltip",flip:!1})(bJ),yJ=Object.freeze(Object.defineProperty({__proto__:null,default:Ke},Symbol.toStringTag,{value:"Module"}));var xJ=Object.defineProperty,Wp=Object.getOwnPropertySymbols,mA=Object.prototype.hasOwnProperty,gA=Object.prototype.propertyIsEnumerable,H1=(e,t,r)=>t in e?xJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jJ=(e,t)=>{for(var r in t||(t={}))mA.call(t,r)&&H1(e,r,t[r]);if(Wp)for(var r of Wp(t))gA.call(t,r)&&H1(e,r,t[r]);return e},wJ=(e,t)=>{var r={};for(var i in e)mA.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&Wp)for(var i of Wp(e))t.indexOf(i)<0&&gA.call(e,i)&&(r[i]=e[i]);return r};var Ro;(e=>{const t=class{constructor(c,h,u,d){if(this.version=c,this.errorCorrectionLevel=h,this.modules=[],this.isFunction=[],c<t.MIN_VERSION||c>t.MAX_VERSION)throw new RangeError("Version value out of range");if(d<-1||d>7)throw new RangeError("Mask value out of range");this.size=c*4+17;let p=[];for(let m=0;m<this.size;m++)p.push(!1);for(let m=0;m<this.size;m++)this.modules.push(p.slice()),this.isFunction.push(p.slice());this.drawFunctionPatterns();const f=this.addEccAndInterleave(u);if(this.drawCodewords(f),d==-1){let m=1e9;for(let g=0;g<8;g++){this.applyMask(g),this.drawFormatBits(g);const x=this.getPenaltyScore();x<m&&(d=g,m=x),this.applyMask(g)}}s(0<=d&&d<=7),this.mask=d,this.applyMask(d),this.drawFormatBits(d),this.isFunction=[]}static encodeText(c,h){const u=e.QrSegment.makeSegments(c);return t.encodeSegments(u,h)}static encodeBinary(c,h){const u=e.QrSegment.makeBytes(c);return t.encodeSegments([u],h)}static encodeSegments(c,h,u=1,d=40,p=-1,f=!0){if(!(t.MIN_VERSION<=u&&u<=d&&d<=t.MAX_VERSION)||p<-1||p>7)throw new RangeError("Invalid value");let m,g;for(m=u;;m++){const j=t.getNumDataCodewords(m,h)*8,w=l.getTotalBits(c,m);if(w<=j){g=w;break}if(m>=d)throw new RangeError("Data too long")}for(const j of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])f&&g<=t.getNumDataCodewords(m,j)*8&&(h=j);let x=[];for(const j of c){i(j.mode.modeBits,4,x),i(j.numChars,j.mode.numCharCountBits(m),x);for(const w of j.getData())x.push(w)}s(x.length==g);const v=t.getNumDataCodewords(m,h)*8;s(x.length<=v),i(0,Math.min(4,v-x.length),x),i(0,(8-x.length%8)%8,x),s(x.length%8==0);for(let j=236;x.length<v;j^=253)i(j,8,x);let b=[];for(;b.length*8<x.length;)b.push(0);return x.forEach((j,w)=>b[w>>>3]|=j<<7-(w&7)),new t(m,h,b,p)}getModule(c,h){return 0<=c&&c<this.size&&0<=h&&h<this.size&&this.modules[h][c]}getModules(){return this.modules}drawFunctionPatterns(){for(let u=0;u<this.size;u++)this.setFunctionModule(6,u,u%2==0),this.setFunctionModule(u,6,u%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const c=this.getAlignmentPatternPositions(),h=c.length;for(let u=0;u<h;u++)for(let d=0;d<h;d++)u==0&&d==0||u==0&&d==h-1||u==h-1&&d==0||this.drawAlignmentPattern(c[u],c[d]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(c){const h=this.errorCorrectionLevel.formatBits<<3|c;let u=h;for(let p=0;p<10;p++)u=u<<1^(u>>>9)*1335;const d=(h<<10|u)^21522;s(d>>>15==0);for(let p=0;p<=5;p++)this.setFunctionModule(8,p,a(d,p));this.setFunctionModule(8,7,a(d,6)),this.setFunctionModule(8,8,a(d,7)),this.setFunctionModule(7,8,a(d,8));for(let p=9;p<15;p++)this.setFunctionModule(14-p,8,a(d,p));for(let p=0;p<8;p++)this.setFunctionModule(this.size-1-p,8,a(d,p));for(let p=8;p<15;p++)this.setFunctionModule(8,this.size-15+p,a(d,p));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let c=this.version;for(let u=0;u<12;u++)c=c<<1^(c>>>11)*7973;const h=this.version<<12|c;s(h>>>18==0);for(let u=0;u<18;u++){const d=a(h,u),p=this.size-11+u%3,f=Math.floor(u/3);this.setFunctionModule(p,f,d),this.setFunctionModule(f,p,d)}}drawFinderPattern(c,h){for(let u=-4;u<=4;u++)for(let d=-4;d<=4;d++){const p=Math.max(Math.abs(d),Math.abs(u)),f=c+d,m=h+u;0<=f&&f<this.size&&0<=m&&m<this.size&&this.setFunctionModule(f,m,p!=2&&p!=4)}}drawAlignmentPattern(c,h){for(let u=-2;u<=2;u++)for(let d=-2;d<=2;d++)this.setFunctionModule(c+d,h+u,Math.max(Math.abs(d),Math.abs(u))!=1)}setFunctionModule(c,h,u){this.modules[h][c]=u,this.isFunction[h][c]=!0}addEccAndInterleave(c){const h=this.version,u=this.errorCorrectionLevel;if(c.length!=t.getNumDataCodewords(h,u))throw new RangeError("Invalid argument");const d=t.NUM_ERROR_CORRECTION_BLOCKS[u.ordinal][h],p=t.ECC_CODEWORDS_PER_BLOCK[u.ordinal][h],f=Math.floor(t.getNumRawDataModules(h)/8),m=d-f%d,g=Math.floor(f/d);let x=[];const v=t.reedSolomonComputeDivisor(p);for(let j=0,w=0;j<d;j++){let S=c.slice(w,w+g-p+(j<m?0:1));w+=S.length;const _=t.reedSolomonComputeRemainder(S,v);j<m&&S.push(0),x.push(S.concat(_))}let b=[];for(let j=0;j<x[0].length;
12j++)x.forEach((w,S)=>{(j!=g-p||S>=m)&&b.push(w[j])});return s(b.length==f),b}drawCodewords(c){if(c.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let h=0;for(let u=this.size-1;u>=1;u-=2){u==6&&(u=5);for(let d=0;d<this.size;d++)for(let p=0;p<2;p++){const f=u-p,g=(u+1&2)==0?this.size-1-d:d;!this.isFunction[g][f]&&h<c.length*8&&(this.modules[g][f]=a(c[h>>>3],7-(h&7)),h++)}}s(h==c.length*8)}applyMask(c){if(c<0||c>7)throw new RangeError("Mask value out of range");for(let h=0;h<this.size;h++)for(let u=0;u<this.size;u++){let d;switch(c){case 0:d=(u+h)%2==0;break;case 1:d=h%2==0;break;case 2:d=u%3==0;break;case 3:d=(u+h)%3==0;break;case 4:d=(Math.floor(u/3)+Math.floor(h/2))%2==0;break;case 5:d=u*h%2+u*h%3==0;break;case 6:d=(u*h%2+u*h%3)%2==0;break;case 7:d=((u+h)%2+u*h%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[h][u]&&d&&(this.modules[h][u]=!this.modules[h][u])}}getPenaltyScore(){let c=0;for(let p=0;p<this.size;p++){let f=!1,m=0,g=[0,0,0,0,0,0,0];for(let x=0;x<this.size;x++)this.modules[p][x]==f?(m++,m==5?c+=t.PENALTY_N1:m>5&&c++):(this.finderPenaltyAddHistory(m,g),f||(c+=this.finderPenaltyCountPatterns(g)*t.PENALTY_N3),f=this.modules[p][x],m=1);c+=this.finderPenaltyTerminateAndCount(f,m,g)*t.PENALTY_N3}for(let p=0;p<this.size;p++){let f=!1,m=0,g=[0,0,0,0,0,0,0];for(let x=0;x<this.size;x++)this.modules[x][p]==f?(m++,m==5?c+=t.PENALTY_N1:m>5&&c++):(this.finderPenaltyAddHistory(m,g),f||(c+=this.finderPenaltyCountPatterns(g)*t.PENALTY_N3),f=this.modules[x][p],m=1);c+=this.finderPenaltyTerminateAndCount(f,m,g)*t.PENALTY_N3}for(let p=0;p<this.size-1;p++)for(let f=0;f<this.size-1;f++){const m=this.modules[p][f];m==this.modules[p][f+1]&&m==this.modules[p+1][f]&&m==this.modules[p+1][f+1]&&(c+=t.PENALTY_N2)}let h=0;for(const p of this.modules)h=p.reduce((f,m)=>f+(m?1:0),h);const u=this.size*this.size,d=Math.ceil(Math.abs(h*20-u*10)/u)-1;return s(0<=d&&d<=9),c+=d*t.PENALTY_N4,s(0<=c&&c<=2568888),c}getAlignmentPatternPositions(){if(this.version==1)return[];{const c=Math.floor(this.version/7)+2,h=this.version==32?26:Math.ceil((this.version*4+4)/(c*2-2))*2;let u=[6];for(let d=this.size-7;u.length<c;d-=h)u.splice(1,0,d);return u}}static getNumRawDataModules(c){if(c<t.MIN_VERSION||c>t.MAX_VERSION)throw new RangeError("Version number out of range");let h=(16*c+128)*c+64;if(c>=2){const u=Math.floor(c/7)+2;h-=(25*u-10)*u-55,c>=7&&(h-=36)}return s(208<=h&&h<=29648),h}static getNumDataCodewords(c,h){return Math.floor(t.getNumRawDataModules(c)/8)-t.ECC_CODEWORDS_PER_BLOCK[h.ordinal][c]*t.NUM_ERROR_CORRECTION_BLOCKS[h.ordinal][c]}static reedSolomonComputeDivisor(c){if(c<1||c>255)throw new RangeError("Degree out of range");let h=[];for(let d=0;d<c-1;d++)h.push(0);h.push(1);let u=1;for(let d=0;d<c;d++){for(let p=0;p<h.length;p++)h[p]=t.reedSolomonMultiply(h[p],u),p+1<h.length&&(h[p]^=h[p+1]);u=t.reedSolomonMultiply(u,2)}return h}static reedSolomonComputeRemainder(c,h){let u=h.map(d=>0);for(const d of c){const p=d^u.shift();u.push(0),h.forEach((f,m)=>u[m]^=t.reedSolomonMultiply(f,p))}return u}static reedSolomonMultiply(c,h){if(c>>>8||h>>>8)throw new RangeError("Byte out of range");let u=0;for(let d=7;d>=0;d--)u=u<<1^(u>>>7)*285,u^=(h>>>d&1)*c;return s(u>>>8==0),u}finderPenaltyCountPatterns(c){const h=c[1];s(h<=this.size*3);const u=h>0&&c[2]==h&&c[3]==h*3&&c[4]==h&&c[5]==h;return(u&&c[0]>=h*4&&c[6]>=h?1:0)+(u&&c[6]>=h*4&&c[0]>=h?1:0)}finderPenaltyTerminateAndCount(c,h,u){return c&&(this.finderPenaltyAddHistory(h,u),h=0),h+=this.size,this.finderPenaltyAddHistory(h,u),this.finderPenaltyCountPatterns(u)}finderPenaltyAddHistory(c,h){h[0]==0&&(c+=this.size),h.pop(),h.unshift(c)}};let r=t;r.MIN_VERSION=1,r.MAX_VERSION=40,r.PENALTY_N1=3,r.PENALTY_N2=3,r.PENALTY_N3=40,r.PENALTY_N4=10,r.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],r.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=r;function i(c,h,u){if(h<0||h>31||c>>>h)throw new RangeError("Value out of range");for(let d=h-1;d>=0;d--)u.push(c>>>d&1)}function a(c,h){return(c>>>h&1)!=0}function s(c){if(!c)throw new Error("Assertion error")}const o=class{constructor(c,h,u){if(this.mode=c,this.numChars=h,this.bitData=u,h<0)throw new RangeError("Invalid argument");this.bitData=u.slice()}static makeBytes(c){let h=[];for(const u of c)i(u,8,h);return new o(o.Mode.BYTE,c.length,h)}static makeNumeric(c){if(!o.isNumeric(c))throw new RangeError("String contains 
12non-numeric characters");let h=[];for(let u=0;u<c.length;){const d=Math.min(c.length-u,3);i(parseInt(c.substr(u,d),10),d*3+1,h),u+=d}return new o(o.Mode.NUMERIC,c.length,h)}static makeAlphanumeric(c){if(!o.isAlphanumeric(c))throw new RangeError("String contains unencodable characters in alphanumeric mode");let h=[],u;for(u=0;u+2<=c.length;u+=2){let d=o.ALPHANUMERIC_CHARSET.indexOf(c.charAt(u))*45;d+=o.ALPHANUMERIC_CHARSET.indexOf(c.charAt(u+1)),i(d,11,h)}return u<c.length&&i(o.ALPHANUMERIC_CHARSET.indexOf(c.charAt(u)),6,h),new o(o.Mode.ALPHANUMERIC,c.length,h)}static makeSegments(c){return c==""?[]:o.isNumeric(c)?[o.makeNumeric(c)]:o.isAlphanumeric(c)?[o.makeAlphanumeric(c)]:[o.makeBytes(o.toUtf8ByteArray(c))]}static makeEci(c){let h=[];if(c<0)throw new RangeError("ECI assignment value out of range");if(c<128)i(c,8,h);else if(c<16384)i(2,2,h),i(c,14,h);else if(c<1e6)i(6,3,h),i(c,21,h);else throw new RangeError("ECI assignment value out of range");return new o(o.Mode.ECI,0,h)}static isNumeric(c){return o.NUMERIC_REGEX.test(c)}static isAlphanumeric(c){return o.ALPHANUMERIC_REGEX.test(c)}getData(){return this.bitData.slice()}static getTotalBits(c,h){let u=0;for(const d of c){const p=d.mode.numCharCountBits(h);if(d.numChars>=1<<p)return 1/0;u+=4+p+d.bitData.length}return u}static toUtf8ByteArray(c){c=encodeURI(c);let h=[];for(let u=0;u<c.length;u++)c.charAt(u)!="%"?h.push(c.charCodeAt(u)):(h.push(parseInt(c.substr(u+1,2),16)),u+=2);return h}};let l=o;l.NUMERIC_REGEX=/^[0-9]*$/,l.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,l.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e.QrSegment=l})(Ro||(Ro={}));(e=>{(t=>{const r=class{constructor(a,s){this.ordinal=a,this.formatBits=s}};let i=r;i.LOW=new r(0,1),i.MEDIUM=new r(1,0),i.QUARTILE=new r(2,3),i.HIGH=new r(3,2),t.Ecc=i})(e.QrCode||(e.QrCode={}))})(Ro||(Ro={}));(e=>{(t=>{const r=class{constructor(a,s){this.modeBits=a,this.numBitsCharCount=s}numCharCountBits(a){return this.numBitsCharCount[Math.floor((a+7)/17)]}};let i=r;i.NUMERIC=new r(1,[10,12,14]),i.ALPHANUMERIC=new r(2,[9,11,13]),i.BYTE=new r(4,[8,16,16]),i.KANJI=new r(8,[8,10,12]),i.ECI=new r(7,[0,0,0]),t.Mode=i})(e.QrSegment||(e.QrSegment={}))})(Ro||(Ro={}));var Sd=Ro;var SJ={L:Sd.QrCode.Ecc.LOW,M:Sd.QrCode.Ecc.MEDIUM,Q:Sd.QrCode.Ecc.QUARTILE,H:Sd.QrCode.Ecc.HIGH},_J=128,CJ="L",NJ="#FFFFFF",EJ="#000000",TJ=!1,vA=4,kJ=.1;function PJ(e,t=0){const r=[];return e.forEach(function(i,a){let s=null;i.forEach(function(o,l){if(!o&&s!==null){r.push(`M${s+t} ${a+t}h${l-s}v1H${s+t}z`),s=null;return}if(l===i.length-1){if(!o)return;s===null?r.push(`M${l+t},${a+t} h1v1H${l+t}z`):r.push(`M${s+t},${a+t} h${l+1-s}v1H${s+t}z`);return}o&&s===null&&(s=l)})}),r.join("")}function IJ(e,t){return e.slice().map((r,i)=>i<t.y||i>=t.y+t.h?r:r.map((a,s)=>s<t.x||s>=t.x+t.w?a:!1))}function DJ(e,t,r,i){if(i==null)return null;const a=r?vA:0,s=e.length+a*2,o=Math.floor(t*kJ),l=s/t,c=(i.width||o)*l,h=(i.height||o)*l,u=i.x==null?e.length/2-c/2:i.x*l,d=i.y==null?e.length/2-h/2:i.y*l;let p=null;if(i.excavate){let f=Math.floor(u),m=Math.floor(d),g=Math.ceil(c+u-f),x=Math.ceil(h+d-m);p={x:f,y:m,w:g,h:x}}return{x:u,y:d,h,w:c,excavation:p}}(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})();function kw(e){const t=e,{value:r,size:i=_J,level:a=CJ,bgColor:s=NJ,fgColor:o=EJ,includeMargin:l=TJ,imageSettings:c}=t,h=wJ(t,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let u=Sd.QrCode.encodeText(r,SJ[a]).getModules();const d=l?vA:0,p=u.length+d*2,f=DJ(u,i,l,c);let m=null;c!=null&&f!=null&&(f.excavation!=null&&(u=IJ(u,f.excavation)),m=Me.createElement("image",{xlinkHref:c.src,height:f.h,width:f.w,x:f.x+d,y:f.y+d,preserveAspectRatio:"none"}));const g=PJ(u,d);return Me.createElement("svg",jJ({height:i,width:i,viewBox:`0 0 ${p} ${p}`},h),Me.createElement("path",{fill:s,d:`M0,0 h${p}v${p}H0z`,shapeRendering:"crispEdges"}),Me.createElement("path",{fill:o,d:g,shapeRendering:"crispEdges"}),m)}const RJ=({type:e,history:t})=>{let r,i;switch(e){case"expired":r="For your security, this password reset email has expired. Please request a new email by clicking the button below.",i="Link expired";break;case"used":r="This link has already been used. Please request a new email by clicking the button below.",i="Link used";break;
12case"invalid":r="This link is invalid. Please retry the link or request a new email by clicking the button below.",i="Link invalid";break;case"locked":r="This account is locked. Please contact [email protected] for assistance.",i="Account locked";break;default:return null}return n.jsx("div",{className:"container row",children:n.jsxs("div",{className:"col s12 m9 l6",children:[n.jsx("h2",{className:"text-center",children:i}),n.jsxs("div",{className:"z-depth-1 lighten-4 row login-form",children:[n.jsx("div",{className:"row",children:r}),n.jsx("div",{className:"row",children:n.jsx("div",{className:"form-group login-form-group",children:n.jsx("button",{id:"request-pw-reset",type:"button",className:"btn btn-primary-lg",onClick:()=>e==="locked"?t.push("/login"):window.location.href="/reset-password",children:e==="locked"?"Back To Login":"Request Password Reset"})})})]})]})})},OJ=({verifyLink:e,resetPassword:t,match:r,history:i,verifyResetPassword:a,createMessage:s})=>{const[o,l]=y.useState(null),[c,h]=y.useState(null),[u,d]=y.useState(null),[p,f]=y.useState(""),[m,g]=y.useState(!1),[x,v]=y.useState(!1),[b,j]=y.useState(!1),[w,S]=y.useState(!1);y.useEffect(()=>{e(r.params.key).then(N=>{let k,I,D,O,$,U;switch(N.data.reset_key_status){case"expired":U="expired";break;case"used":case"inactive":U="used";break;case"invalid":U="invalid";break;case"locked":U="locked";break;default:k=N.data.auth_key,I=N.data.auth_uri,O=N.data.require_totp_setup,$=N.data.require_totp_verification,D=N.data.first_factor_code,U=null;break}l(U),h(k),d(I),g(O),v($),f(D),j(O||$)})},[]);const _=_t().shape({password:Ae().required("Please enter your new password").min(8,"New password must be at least 8 characters"),confirmPassword:Ae().required("Please enter your new password").test("passwords-match","Passwords must match",function(N){return this.parent.password===N}
12)}),C=_t().shape({code:Ae().required("Please enter a code")}),E={password:"",confirmPassword:"",reset_key:""};return o?n.jsx(RJ,{type:o,history:i}):b?n.jsxs("div",{className:"container row two-factor-container fadeTransition",children:[n.jsx("h2",{className:"text-center",children:"Two-Factor Authentication"}),n.jsxs("div",{className:"col s12 m9 l9 xl6",children:[n.jsx("div",{className:"z-depth-1 lighten-4 row two-factor-verification-form",children:n.jsx(gt,{initialValues:{code:""},validationSchema:C,onSubmit:(N,{setFieldError:k,setSubmitting:I})=>{const D=r.params.key;a(D,N.code,x,m).then(O=>{O.status===200?(f(O.data.first_factor_code),j(!1)):k("code",O.data.detail==="Provided authentication code is invalid"?"Invalid authentication code. Please try again with another code from your authenticator app.":O.data.detail)}),I(!1)},enableReinitialize:!0,children:N=>{const{values:k,errors:I,touched:D,handleSubmit:O,isSubmitting:$,dirty:U,setFieldValue:B,setFieldError:L}=N;return n.jsx(vt,{className:"col s12",children:n.jsxs("div",{className:"two-factor-verification-form-grp",children:[n.jsxs("h4",{className:"two-factor-type-header",children:[n.jsx("i",{className:"material-icons",children:"ad_units"}),"Authenticator App"]}),m?n.jsxs("div",{className:"auth-app-msg",children:[n.jsx("i",{className:"material-icons",children:"error"}),n.jsx("div",{className:"auth-app-text","diagnostic-id":"auth-app-text",children:"For enhanced security, your organization requires an additional step to verify your identity during sign-in."})]}):n.jsx("p",{className:"verify-text",children:"To help keep your account safe, we need to verify that it is you."}),m&&n.jsxs("div",{className:"two-factor-qr-code-container",children:[n.jsx(kw,{value:u}),n.jsxs("div",{className:"setup-key-message",children:["Unable to scan? You can use the",n.jsx(Ke,{title:n.jsxs("div",{className:"two-factor-key",children:[n.jsx("div",{children:"Your two-factor key"}),n.jsxs("div",{id:"auth-key-grp",children:[n.jsx("div",{id:"auth-key",children:c}),n.jsx("i",{className:"material-icons",onClick:()=>(s({alertMessage:"Setup key has been copied to clipboard"}),S(!0),setTimeout(()=>{S(!1)},3e3),Hl("auth-key")),children:w?"check":"content_copy"})]})]}),placement:"bottom",classes:{popper:"setup-key-tooltip"},interactive:!0,enterTouchDelay:0,leaveTouchDelay:5e3,children:n.jsx("span",{className:"setup-key",id:"setup-key",children:"setup key"})})," ","to manually configure your authenticator app."]})]}),n.jsx("h5",{className:"verify-header-msg",children:"Verify the code from the authenticator app"}),n.jsx(me,{type:"text",autoFocus:!0,autoComplete:"off",id:"code",name:"code","diagnostic-id":"code-input",placeholder:"XXXXXX",maxLength:6,className:I.code&&D.code?"input-error code-input":"form-control code-input"}),I.code&&D.code&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:I.code}),n.jsx("button",{type:"submit",className:"btn btn-primary verify-code-btn","diagnostic-id":"modal-primary-btn",disabled:!k.code||$,children:"VERIFY"}),m&&n.jsxs("div",{className:"two-factor-instructions-container",children:[n.jsx("p",{className:"two-factor-message",children:"Take these steps to enable two-factor authentication and make your account more secure."}),n.jsx("div",{className:"two-factor-instructions-wrapper",children:n.jsxs("ol",{className:"two-factor-instructions-list",children:[n.jsx("li",{children:"Install an authenticator app on your mobile device. Recommended options: Google Authenticator, Authy, Microsoft Authenticator."}),n.jsx("li",{children:"Scan QR code with the authenticator app (or enter the key manually)."}),n.jsx("li",{children:"Enter the 2-step authentication code provided by your app."})]})})]})]})})}})}),n.jsxs("div",{className:"contact-us-msg",children:["Having problems?"," ",n.jsx("span",{onClick:()=>window.location.href="mailto:[email protected]",children:"Contact us."})]})]})]}):n.jsx("div",{className:"container row fadeTransition",children:n.jsxs("div",{className:"col s12 m9 l6",children:[n.jsx("h2",{className:"text-center",children:"Set a new password"}),n.jsxs("div",{className:"z-depth-1 lighten-4 row login-form",children:[n.jsx("div",{children:"Enter your new password:"}),n.jsx(gt,{validationSchema:_,initialValues:E,onSubmit:N=>{N.reset_key=r.params.key,t(N,p).then(()=>{i.push("/login")})},children:({errors:N,touched:k,isSubmitting:I,dirty:D})=>n.jsxs(vt,{className:"col s12",children:[n.jsx("div",{className:"row",children:n.jsxs("div",{className:"input-field",children:[n.jsx("label",{children:"New Password"}),n.jsx(me,{type:"password",id:"password",name:"password",className:"validate"}),N.password&&k.password&&n.jsx("div",{className:"input-feedback",children:N.password})]})}),n.jsx("div",{className:"row",children:n.jsxs("div",{className:"input-field",children:[n.jsx("label",{children:"Confirm Password"}),n.jsx(me,{type:"password",id:"confirmPassword",name:"confirmPassword",className:"validate"}),N.confirmPassword&&k.confirmPassword&&n.jsx("div",{className:"input-feedback",children:N.confirmPassword})]})}),n.jsx("div",{className:"row",children:n.jsx("div",{className:"form-group login-form-group",children:n.jsx("button",{type:"submit",className:"btn btn-primary-lg",disabled:I||!!Object.keys(N).length||!D,children:"Reset Password"})})})]})})]})]})})},AJ=le(null,{verifyLink:R5,resetPassword:D5,verifyResetPassword:I5,createMessage:he})(OJ);function MJ(e){const{firstFactorCode:t,lastUsedTwoFactorAuth:r,otp:i,totp:a,twoFactorLogin:s,isAuthenticated:o,isFirstFactorAuthenticated:l,createMessage:c,requestOtpCodeOnLogin:h,allowOtp:u,allowTotp:d,isLocked:p}=e,[f,m]=y.useState(!1),[g,x]=y.useState(r),[v,b]=y.useState(null),[j,w]=y.useState(!1),[S,_]=y.useState(!1),{EmailOtp:C,Totp:E}=mj,P=U=>{p||(m(!0),h(t).then(B=>{B?setTimeout(()=>{m(!1)},5e3):w(!0)}))},T=i?.is_email_otp_enabled,N=a?.is_authenticator_totp_enabled,k=!!a?.auth_key&&!!a?.auth_uri;if(o)return n.jsx(qt,{to:"/insights"});if(j||!T&&!N&&!a?.auth_uri&&!a?.auth_key)return n.jsx(qt,{to:"/login"});const I=(U,B,L,A,R)=>n.jsxs(n.Fragment,{children:[n.jsxs("h4",{className:"two-factor-type-header",children:[n.jsx("i",{className:"material-icons",children:"ad_units"}),"Authenticator App"]}),k?n.jsxs("div",{className:"auth-app-msg",children:[n.jsx("i",{className:"material-icons",children:"error"}),n.jsx("div",{className:"auth-app-text","diagnostic-id":"auth-app-text",children:"For enhanced 
12security, your organization requires an additional step to verify your identity during sign-in."})]}):n.jsx("p",{className:"verify-text",children:"To help keep your account safe, we need to verify that it is you."}),k&&n.jsxs("div",{className:"two-factor-qr-code-container",children:[n.jsx(kw,{value:a?.auth_uri}),n.jsxs("div",{className:"setup-key-message",children:["Unable to scan? You can use the",n.jsx(Ke,{title:n.jsxs("div",{className:"two-factor-key",children:[n.jsx("div",{children:"Your two-factor key:"}),n.jsxs("div",{id:"auth-key-grp",children:[n.jsx("div",{id:"auth-key",children:a?.auth_key}),n.jsx("i",{className:"material-icons",onClick:()=>(c({alertMessage:"Setup key has been copied to clipboard"}),_(!0),setTimeout(()=>{_(!1)},3e3),Hl("auth-key")),children:S?"check":"content_copy"})]})]}),placement:"bottom",classes:{popper:"setup-key-tooltip"},interactive:!0,enterTouchDelay:0,leaveTouchDelay:5e3,children:n.jsx("span",{className:"setup-key",id:"setup-key",children:"setup key"})})," ","to manually configure your authenticator app."]})]}),n.jsx("h5",{className:"verify-header-msg",children:"Verify the code from the authenticator app"}),n.jsx(me,{type:"text",autoFocus:!0,autoComplete:"off",id:"code",name:"code","diagnostic-id":"code-input",placeholder:"XXXXXX",className:U.code&&B.code?"input-error code-input":"form-control code-input"}),U.code&&B.code&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:U.code}),n.jsx("button",{type:"submit",className:"btn btn-primary verify-code-btn","diagnostic-id":"modal-primary-btn",disabled:!L.code||R,onClick:()=>b(E),children:"VERIFY"}),k&&n.jsxs("div",{className:"two-factor-instructions-container",children:[n.jsx("p",{className:"two-factor-message",children:"Take these steps to enable two-factor authentication and make your account more secure."}),n.jsx("div",{className:"two-factor-instructions-wrapper",children:n.jsxs("ol",{className:"two-factor-instructions-list",children:[n.jsx("li",{children:"Install an authenticator app on your mobile device. Recommended options: Google Authenticator, Authy, Microsoft Authenticator."}),n.jsx("li",{children:"Scan QR code with the authenticator app (or enter the key manually)."}),n.jsx("li",{children:"Enter the 2-step authentication code provided by your app."})]})})]})]}),D=(U,B,L,A,R)=>n.jsxs(n.Fragment,{children:[n.jsxs("h4",{className:"two-factor-type-header",children:[n.jsx("i",{className:"material-icons",children:"key"}),"One-time passcode"]}),n.jsx("p",{className:"verify-text",children:"To help keep your account safe, we need to verify that it is you."}),n.jsx("h5",{className:"verify-header-msg",children:"Enter the one-time passcode sent to your email"}),n.jsx(me,{type:"text",autoComplete:"off",autoFocus:!0,id:"code",name:"code","diagnostic-id":"code-input",placeholder:"XXXXXX",className:U.code&&B.code?"input-error code-input":"form-control code-input"}),U.code&&B.code&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:U.code}),n.jsxs("div",{className:"resend-code-btn-container",children:[n.jsx("div",{children:"This code will expire in a few minutes"}),f?n.jsx("div",{className:"code-sent-text",children:n.jsxs("div",{className:"btn-primary-text btn-icon-text","diagnostic-id":"code-sent-text",children:[n.jsx("i",{className:"material-icons",children:"done"}),"Code Sent"]})}):n.jsx("div",{className:"resend-code-btn",children:n.jsxs("button",{type:"button","diagnostic-id":"resend-code-btn",className:"btn-primary-text btn-icon-text",onClick:P,disabled:f||p,children:[n.jsx("i",{className:"material-icons",children:"replay"}),"Resend Code"]})})]}),n.jsx("button",{type:"submit",className:"btn btn-primary verify-code-btn","diagnostic-id":"modal-primary-btn",disabled:!L.code||R,onClick:()=>b(C),children:"VERIFY"})]}),O=(U,B,L,A,R)=>n.jsx(n.Fragment,{children:g===E?n.jsxs(n.Fragment,{children:[I(U,B,L,A,R),n.jsx("div",{className:"alternate-method-msg-wrapper",children:n.jsx("button",{type:"button","diagnostic-id":"alternate-method-btn",className:"btn-primary-text alternate-method-msg",disabled:f,onClick:F=>{P(),x(C)},children:"Enter one-time passcode from your email"})})]}):g===C?n.jsxs(n.Fragment,{children:[D(U,B,L,A,R),n.jsx("div",{className:"alternate-method-msg-wrapper",children:n.jsx("button",{type:"button","diagnostic-id":"alternate-method-btn",className:"btn-primary-text alternate-method-msg",disabled:f,onClick:()=>{x(E)},children:f?n.jsxs(n.Fragment,{children:[n.jsx("i",{className:"material-icons",children:"done"}),"One-time passcode sent"]}):"Use Authenticator App to verify"})})]}):n.jsx(n.Fragment,{})}),$=_t().shape({code:Ae().required("Please enter a code")});return n.jsxs("div",{className:"container row two-factor-container",children:[n.jsx("h2",{className:"text-center",children:"Two-Factor Authentication"}),n.jsxs("div",{className:"col s12 m9 l9 xl6",children:[n.jsx("div",{className:"z-depth-1 lighten-4 row two-factor-verification-form",children:n.jsx(gt,{initialValues:{code:""},validationSchema:$,onSubmit:(U,{setFieldError:B,setSubmitting:L})=>{s(t,v,U.code,a?.action).then(A=>{o||(A?B("code",A?A.detail==="Provided authentication code is invali
12d"?`Invalid authentication code. Please try again ${v===E?"with another code from your authenticator app.":"or request another code."}`:A.detail:""):w(!0),L(!1))})},enableReinitialize:!0,children:U=>{const{values:B,errors:L,touched:A,handleSubmit:R,isSubmitting:F,dirty:q,setFieldValue:V,setFieldError:X}=U;return n.jsx(vt,{className:"col s12",onClick:M=>M.stopPropagation(),children:n.jsx("div",{className:"two-factor-verification-form-grp",children:u&&d?T&&N?O(L,A,B,V,F):T&&!N?D(L,A,B,V,F):!T&&N?I(L,A,B,V,F):n.jsx(n.Fragment,{}):u&&!d?D(L,A,B,V,F):d&&!u?I(L,A,B,V,F):n.jsx(n.Fragment,{})})})}})}),n.jsxs("div",{className:"contact-us-msg",children:["Having problems?"," ",n.jsx("span",{onClick:()=>window.location.href="mailto:[email protected]",children:"Contact us."})]})]})]})}const $J=e=>({isAuthenticated:e.auth.isAuthenticated,firstFactorCode:e.auth.firstFactorCode,lastUsedTwoFactorAuth:e.auth.lastUsedTwoFactorAuth,otp:e.auth.otp,totp:e.auth.totp,isFirstFactorAuthenticated:e.auth.isFirstFactorAuthenticated,allowOtp:e.auth.allowOtp,allowTotp:e.auth.allowTotp,isLocked:e.auth.isLocked}),LJ=le($J,{twoFactorLogin:A5,createMessage:he,requestOtpCodeOnLogin:O5})(MJ);class FJ extends y.Component{constructor(){super(...arguments),this.state={lastAlert:null}}componentDidUpdate(t){const{alert:r,message:i}=this.props;i!==t.message&&(i.deleteChartbook&&r.success([i.deleteChartbook,"success"]),i.newChartbook&&r.success([i.newChartbook,"success"]),i.updateChartbook&&r.success([i.updateChartbook,"success"]),i.alertMessage&&r.success([i.alertMessage,"success"]),i.passwordError&&r.error([i.passwordError,"error"]),i.serverError&&r.error([i.serverError,"error"]),i.errorMessage&&r.error([i.errorMessage,"error"]),i.networkError&&(!this.state.lastAlert||this.state.lastAlert<Date.now()-($5+2e3))&&(r.error([i.networkError,"error"]),this.setState({lastAlert:Date.now()})))}render(){return n.jsx(n.Fragment,{})}}const UJ=e=>({message:e.messages}),BJ=le(UJ)(M5()(FJ)),{apiAddress:qf}=Tn,qJ=e=>(t,r)=>(Ne.get(`${qf}api/users/${e}/assistant/`,Ee(r)).then(i=>{t({type:z5,payload:i.data})}).catch(i=>{if(i.message!==Ue)t(he({serverError:"There was a problem starting the assistant, please refresh"}));else return Promise.reject(i)}),!0),VJ=(e,t)=>(r,i)=>Ne.get(`${qf}api/users/${e}/recommendation/${t}/`,Ee(i)).then(a=>(r({type:F5,payload:a}),a)).catch(a=>{if(r({type:fD}),a.message!==Ue)return r(he({serverError:"There was a problem recommending charts based on your request, please try again"})),a.response}),zJ=(e,t,r)=>(i,a)=>{const s=`${qf}api/users/${e}/recommendation/`,o=new FormData,l=Ee(a,Xn);return o.append("type",r),o.append(`${r}`,t),i({type:q5}),Ne.post(s,o,l).then(c=>(i({type:V5,payload:c}),c),c=>{if(i({type:fD}),c.message!==Ue&&c.response&&c.response.status!==403&&i(he({serverError:"There was a problem recommending charts based on your request, please try again"})),c.response&&c.response.data)return c.response})},HJ=()=>(e,t)=>{const r=t().auth.user.company.id;return Ne.get(`${qf}api/orgs/${r}/notes/`,Ee(t)).then(i=>{e({type:U5,payload:i.data})}).catch(i=>{i.message!==Ue&&e(he({serverError:"There was a problem retrieving chart notes, please try again"}))})},bA=e=>t=>{t({type:L5,payload:e})},GJ=()=>e=>{e({type:B5})},{apiAddress:WJ}=Tn,YJ=()=>(e,t)=>!0,KJ=(e,t)=>(r,i)=>{const a=`${WJ}api/mira`,s={user_id:e,utterance:t,utterance_type:"text/plain"};return Ne.post(a,s,Ee(i)).then(o=>(r({type:G5,payload:o.data}),o.data)).catch(o=>(r({type:W5}),o.message!==Ue&&r(he({serverError:"There was a problem communicating with Mira, please try again"})),""))},Vf=e=>(t,r)=>{t({type:H5,payload:e})},XJ=Tn.logoUrl;function Wb(){return n.jsx(n.Fragment,{children:n.jsx("img",{alt:"",src:XJ,className:"header-logo"})})}const{apiAddress:QJ}=Tn,ZJ=(e,t,r,i,a,s)=>(o,l)=>{const c=`${QJ}api/users/${e}/contactmanager/`,h={full_name:t,email:r,phone_number:i,company_name:a,message:s};return o({type:Y5}),Ne.post(c,h,Ee(l)).then(u=>(o({type:K5,payload:u.data}),o(he({alertMessage:"Your message has been sent"})),u)).catch(u=>{u.message!==Ue&&o(he({serverError:"There was a problem sending your message, please try again."}))})};function zt(e){return class extends Me.Component{constructor(t){super(t),this.state={isDirty:this.props.isDirty||!1},this.setDirty=r=>{this.setState({isDirty:r})},this.confirmNavigation=this.confirmNavigation.bind(this)}confirmNavigation(t){this.state.isDirty&&(t.returnValue=ko)}componentDidMount(){window.addEventListener("beforeunload",this.confirmNavigation)}componentWillUnmount(){window.removeEventListener("beforeunload",this.confirmNavigation)}componentDidUpdate(t){this.props.isDirty!==void 0&&t.isDirty!==this.props.isDirty&&this.setState({isDirty:this.props.isDirty})}render(){return n.jsxs(n.Fragment,{children:[n.jsx(e,{...this.props,isDirty:this.state.isDirty,setDirty:this.props.setDirty||this.setDirty.bind(this)}),n.jsx(kV,{when:!!this.state.isDirty,message:()=>ko})]})}}}const JJ=e=>{const{providedByLogoUrl:t,providedByName:r,user:i,isDirty:a,setDirty:s,relationshipManager:o,defaultRelationshipManager:l}=e,[c,h]=y.useState(!1),[u,d]=y.useState(!1),p=o||l||null;y.useEffect(()=>{const g=x=>$n(x,e.modal,e.setModal);return window.addEventListener("keyup",g),()=>window.removeEventListener("keyup",g)},[e.modal,e.setModal]);const f={fullName:`${i.first_name&&i.first_name||""} ${i.last_name&&i.last_name||""}`||"",email:i.email||"",phoneNumber:"",companyName:i.company.name||"",message:"I'd like to learn more...",disclosureAccepted:!1},m=_t().shape({fullName:Ae().required("Please enter your full name"),email:Ae().email("Please enter a valid email address").required("Please enter an email address"),phoneNumber:Ae().required("Please enter a phone number"),companyName:Ae().required("Please enter a company name"),message:Ae().max(5e3,"Your message is too long. Please shorten it or contact us for assistance.").required("Please enter a message"),disclosureAccepted:cr().required("The disclosure must be accepted.").oneOf([!0],"The disclosure must be accepted.")});return n.jsx(ot,{setModal:e.setModal,children:n.jsxs("div",{className:"provider-contact-modal-container","diagnostic-id":"provider-contact-modal",children:[n.jsx("i",{className:"material-icons close-icon",onClick:()=>e.setModal(!1),children:"close"}),n.jsxs(n.Fragment,{children:[n.jsxs("h5",{children:["In Partnership with ",r]}),n.jsx("div",{className:"provider-logo-container",children:n.jsx("img",{src:t,alt:"","diagnostic-id":"provider-logo",className:"provider-logo"})}),p&&n.jsxs(n.Fragment,{children:[n.jsx("h6",{children:"Your Relationship Manager"}),n.jsxs("div",{className:"relationship-manager-info",children:[n.jsx("div",{children:p.first_name+" "+p.last_name}),p.phone_number&&n.jsx("div",{children:p.phone_number}),p.email&&n.jsx("div",{children:p.email})]})]}),p&&n.jsxs("h5",{children:["Contact ",p.first_name," ",p.last_name,":"]}),n.jsx(gt,{initialValues:f,onSubmit:(g,{setSubmitting:x})=>{e.contactRelationshipManager(i.id,g.fullName,g.email,g.phoneNumber,g.companyName,g.message).then(()=>{x(!1),e.setModal(!1)})},enableReinitialize:!0,validationSchema:m,children:({values:g,setFieldValue:x,touched:v,errors:b,dirty:j,isSubmitting:w,submitForm:S})=>(j!==a&&s(j),n.jsxs(n.Fragment,{children:[n.jsx(vt,{children:n.jsxs("div",{className:"row cta-form-fields-wrapper",children:[n.jsx("div",{className:"col s12 m12 l6",children:n.jsxs("div",{className:"form-group",children:[n.jsxs("div",{children:[n.jsx("label",{children:"Full Name*"}),n.jsx(me,{type:"text",name:"fullName",id:"fullName","diagnostic-id":"full-name-text-input",maxLength:"240",placeholder:"Full name"}),b.fullName&&v.fullName&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:b.fullName})]}),n.jsxs("div",{children:[n.jsx("label",{children:"Email Address*"}),n.jsx(me,{type:"text",name:"email",id:"email","diagnostic-id":"email-input",maxLength:"240",placeholder:"Email address"}),b.email&&v.email&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:b.email})]}),n.jsxs("div",{children:[n.jsx("label",{children:"Phone Number*"}),n.jsx(me,{type:"text",name:"phoneNumber",id:"phoneNumber","diagnostic-id":"phone-number-input",maxLength:"30",placeholder:"Phone number"}),b.phoneNumber&&v.phoneNumber&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:b.phoneNumber})]}),n.jsxs("div",{children:[n.jsx("label",{children:"Company*"}),n.jsx(me,{type:"text",name:"companyName",id:"companyName","diagnostic-id":"company-name-input",maxLength:"240",placeholder:"Company"}),b.companyName&&v.companyName&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:b.companyName})]})]})}),n.jsx("div",{className:"col s12 m12 l6",children:n.jsx("div",{className:"form-group",children:n.jsxs("div",{children:[n.jsx("label",{children:"Message*"}
12),n.jsx(me,{component:"textarea",name:"message",id:"message","diagnostic-id":"message-input",maxLength:"5000",placeholder:"How can we help?"}),b.message&&v.message&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:b.message})]})})})]})}),n.jsxs("div",{className:"cta-form-btn",children:[n.jsx("div",{className:"accept-disclosure-checkbox",onClick:_=>_.stopPropagation(),children:n.jsxs("label",{children:[n.jsx(me,{type:"checkbox",name:"disclosureAccepted",id:"disclosureAccepted",className:"filled-in",onChange:_=>{const C=_.target.checked;x("disclosureAccepted",C)},"diagnostic-id":"disclosure-accepted-input",checked:g.disclosureAccepted}),n.jsx("span",{"diagnostic-id":"disclosure-accepted-toggle",children:"I understand that clicking submit will send my contact information to the relationship manager"})]})}),n.jsx("button",{type:"submit",className:"btn btn-primary-lg","diagnostic-id":"cta-submit-btn",disabled:!j||!!Object.keys(b).length||w,onClick:S,children:"SUBMIT"})]})]}))})]})]})})},eee=e=>({user:e.auth.user,providedByLogoUrl:e.auth.user&&e.auth.user.company&&e.auth.user.company.provider_organization&&e.auth.user.company.provider_organization.provided_by_logo_url,providedByName:e.auth.user&&e.auth.user.company&&e.auth.user.company.provider_organization&&e.auth.user.company.provider_organization.provided_by_name,relationshipManager:e.auth.user&&e.auth.user.company&&e.auth.user.company.relationship_manager,defaultRelationshipManager:e.auth.user&&e.auth.user.company&&e.auth.user.company.provider_organization&&e.auth.user.company.provider_organization.relationship_manager}),yA=le(eee,{contactRelationshipManager:ZJ})(zt(JJ));function tee(e){const[t,r]=y.useState(!1),i=y.useRef(0),a=Tn.appVersion,s=3,o=(c,h)=>{const u=c.split(".").map(x=>parseInt(x,10)),d=h.split(".").map(x=>parseInt(x,10)),p=u[0],f=u[1],m=d[0],g=d[1];return p>m||p===m&&f>g},l=()=>{e.verifyLogin().then(c=>{i.current+=1;const h=c.headers["cl-webapp-version"];o(a,h)?(r(!0),i.current<s?setTimeout(l,5e3):r(!1)):window.location.reload()})};return e.isAppPatchUpgrade?n.jsx("div",{className:"version-container",children:n.jsxs("div",{id:"version-banner",children:["There is a new version of Clearnomics available.",n.jsx("button",{className:"btn-cancel",onClick:()=>window.location.reload(),children:"Update Now"})]})}):e.isAppMinorUpgrade||e.version&&a!==e.version?e.isAuthenticated?n.jsx("div",{className:"version-modal-container",children:n.jsxs("div",{className:"version-modal",children:[n.jsx("h5",{children:t||i.current===s?"Update in progress...":"Update to the latest version"}),t?"Please wait while the app is updated. The page will refresh once the update is complete.":i.current===s?"The update is still in progress. Please check back soon. In the meantime, feel free to contact us with any questions.":"There is a new update available. Please refresh the page to continue",n.jsx("div",{className:"form-group",children:i.current===s?n.jsxs("div",{className:"version-modal-contact-btns",children:[n.jsx("button",{className:"btn-primary","diagnostic-id":"version-chat-btn",onClick:()=>window.Intercom("show"),children:"Chat"}),n.jsx("button",{className:"btn-primary","diagnostic-id":"version-email-btn",onClick:()=>window.location.href="mailto:[email protected]",children:"Email"})]}):n.jsx("button",{className:"btn-primary",disabled:t,onClick:t?void 0:l,children:t?n.jsx(ur,{size:"1em",thickness:10,variant:"indeterminate"}):"Update"})})]})}):n.jsx(n.Fragment,{}):null}const nee=e=>({isAppPatchUpgrade:e.version.isAppPatchUpgrade,isAppMinorUpgrade:e.version.isAppMinorUpgrade,version:e.version.version,isAuthenticated:e.auth.isAuthenticated}),ree=le(nee,{verifyLogin:mD})(tee);function iee({endDate:e,status:t}){const r=Qt(e).diff(Qt()),i=864e5,a=Math.round(r/i);let s;return t==="Trial"?e?r>i?s=`Your trial ends in ${a} ${a===1?"day":"days"}. Contact us:`:r>=0?s=Qt(e).date()!==Qt().date()?"Your free trial ends tomorrow. Contact us:":"Your free trial ends today. Contact us:":s="Your free trial has ended. Contact us:":s="You are using a free trial. Contact us:":t==="Active"&&e&&(r>i?s=`Your account access ends in ${a} ${a===1?"day":"days"}. Contact us:`:r>=0?s=Qt(e).date()!==Qt().date()?"Your account access ends tomorrow. Contact us:":"Your account access ends today. Contact us:":s="Your account access has ended. Contact us:"),n.jsx("div",{className:"trial-container",children:n.jsxs("div",{id:"trial-banner","diagnostic-id":"trial-banner",children:[n.jsx("h6",{children:s}),n.jsxs("div",{className:"trial-banner-buttons",children:[n.jsx("button",{className:"btn-banner","diagnostic-id":"trial-chat-btn",onClick:()=>window.Intercom("show"),children:"Chat"}),n.jsx("button",{className:"btn-banner","diagnostic-id":"trial-email-btn",onClick:()=>window.location.href="mailto:[email protected]",children:"Email"})]})]})})}const aee=e=>({endDate:e.auth.user.company.license_end_date}),see=le(aee,{})(iee);var jc={},G1;
12function oee(){if(G1)return jc;G1=1;var e=vn(),t=bn();Object.defineProperty(jc,"__esModule",{value:!0}),jc.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");return jc.default=a,jc}var lee=oee();const cee=Zt(lee),dee=({subtitle:e})=>n.jsxs("div",{className:"upgrade-modal-description-container",children:[n.jsx("i",{className:"material-icons-outlined",children:"done"}),n.jsx("p",{children:e})]}),uee=e=>{const[t,r]=y.useState(!1),[i,a]=y.useState(!1);return y.useEffect(()=>{const s=o=>$n(o,e.modal,e.setModal);return window.addEventListener("keyup",s),()=>{window.removeEventListener("keyup",s)}},[e.modal,e.setModal]),n.jsx(ot,{setModal:e.setModal,children:n.jsxs("div",{className:`upgrade-modal-container${t?" requested":""}`,"diagnostic-id":"upgrade-modal",children:[n.jsx(cee,{onClick:()=>e.setModal(!1),className:"upgrade-close-icon"}),t?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"modal-header-icon",children:n.jsx("i",{className:"material-icons",children:"workspace_premium"})}),n.jsxs("h4",{"diagnostic-id":"modal-success-msg",children:[n.jsx("i",{className:"material-icons",children:"done"})," Thank you for your request"]}),n.jsx("h6",{children:"Your submission has been successfully received and a member of the Clearnomics team will be in touch soon."}),n.jsxs("p",{className:"contact-msg",children:["In the meantime, you can contact us at"," ",n.jsx("a",{onClick:()=>window.open("mailto:[email protected]","_blank","noreferrer noopener"),href:"mailto:[email protected]",target:"_blank",rel:"noopener noreferrer",children:"[email protected]"})," ","if we can help further. We look forward to connecting with you."]}),n.jsx("button",{type:"button",className:"btn btn-primary-lg","diagnostic-id":"modal-primary-btn",onClick:()=>e.setModal(!1),children:"CLOSE"})]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"modal-header-icon",children:n.jsx("i",{className:"material-icons",children:"workspace_premium"})}),n.jsx("h2",{children:"Upgrade Your Clearnomics Experience"}),n.jsx("h6",{children:"Unlock more powerful tools to boost and streamline your client communications and marketing. Here are just a few of the capabilities we offer:"}),n.jsx("div",{className:"upgrade-modal-descriptions",children:["Access a fully expanded library of timely commentaries, charts, and videos for you to customize","Get concise, up-to-date, client-friendly talking points within seconds","Create your own videos easily with our end-to-end video tool"].map((s,o)=>n.jsx(dee,{subtitle:s},o))}),e.user?.is_upgrade_disabled?n.jsx("button",{type:"button",className:"btn btn-primary-lg","diagnostic-id":"modal-primary-btn",disabled:!0,children:"UPGRADE REQUESTED"}):n.jsx("button",{type:"button",className:"btn btn-primary-lg","diagnostic-id":"modal-primary-btn",disabled:i,onClick:()=>{a(!0),e.requestUpgrade(e.user.id).then(()=>{a(!1),r(!0)},()=>{a(!1)}).then(()=>e.getUser())},children:"GET STARTED"})]})]})})},hee=e=>({user:e.auth.user}),ii=le(hee,{requestUpgrade:X5,getUser:Ba})(uee);function pee(e){const{isAuthenticated:t,user:r,isImpersonating:i}=e.auth,{isLicenseUpgradable:a,hasAcceptedTerms:s,isOnboarded:o,canUseMira:l,canUseFeatured:c,studioPermissions:h,canUseStudio:u,engagePermissions:d,partnerPermissions:p,canUsePartner:f,canUseInsightsExplorer:m,canUseEngage:g,allowChartExplorer:x,step:v,setAssistantStep:b,composerPermissions:j,hedwigPermissions:w,logEvent:S,isProvidedBy:_,providedByName:C}=e,{Community:E,SponsoredCommunity:P}=Br;let T,N;r&&r.chartbook_theme&&r.company.chartbook_theme&&(r.chartbook_theme.cover_layout?T=r.chartbook_theme.cover_layout:T=r.company.chartbook_theme.cover_layout),r&&r.chartbook_theme&&r.company.chartbook_theme&&(r.chartbook_theme.cover_design?N=r.chartbook_theme.cover_design:N=r.company.chartbook_theme.cover_design);const{Disabled:k,Enabled:I}=_n,[D,O]=y.useState(!1),[$,U]=y.useState(!1),[B,L]=y.useState(!1),A=()=>
12{U(!0),S(r.id,null,"communitycta","open")},R=w?.allow_use_assistant!==k&&r&&r.can_use_assistant,F=r&&r.account_permissions?.name!==E&&r.account_permissions?.name!==P,q=n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"sidenav-trigger",children:[l&&!a&&n.jsx("div",{className:"mira-sidenav-link",children:n.jsx("img",{alt:"",src:Tn.miraIconUrl,onClick:()=>e.setShowMira(!0),className:"mira-avatar"})}),n.jsxs("div",{className:"drop-wrapper",onClick:()=>O(!D),children:[n.jsx("span",{className:"nav-link drop-btn",children:n.jsx("i",{className:"material-icons",children:"menu"})}),n.jsxs("div",{className:"drop-content"+(D?" visible":""),children:[n.jsx("span",{className:"drop-user",children:r?`${r.username}`:""}),a&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"nav-starter",children:[n.jsxs("div",{children:["Clearnomics"," ",F?r.account_permissions?.name:"Community"]}),r.is_upgrade_disabled?n.jsxs("div",{className:"upgrade-submitted-msg",children:[n.jsx("i",{className:"material-icons",children:"done"}),"UPGRADE REQUESTED"]}):n.jsx(Ze,{to:"#",className:"drop-link",onClick:A,children:"UPGRADE"})]}),n.jsx("div",{className:"divider"})]}),R&&F&&n.jsx(Ze,{to:"/assistant",className:"drop-link",children:"ASSISTANT"}),w?.allow_use_question_answer!==k&&r&&r.can_use_question_answer&&n.jsx(Ze,{to:"/questions",className:"drop-link",children:"Q&A"}),c?a?n.jsxs(Ze,{to:"#",className:"drop-link","diagnostic-id":"featured-nav-link",onClick:()=>U(!0),children:[n.jsx(dt,{icon:yS})," FEATURED"]}):n.jsx(Ze,{to:"/featured",className:"drop-link","diagnostic-id":"featured-nav-link",children:"FEATURED"}):n.jsx(n.Fragment,{}),n.jsx(Ze,{to:"/insights",className:"drop-link",children:"INSIGHTS"}),x===I&&n.jsx(Ze,{to:{pathname:"/chartlibrary"},className:"drop-link",children:"CHART LIBRARY"}),r&&r.account_permissions&&(r.account_permissions.allow_design!==k&&(N?.type==="default"||T?.type==="default")||r.account_permissions.allow_personalize!==k||r.account_permissions.allow_disclosures!==k)&&n.jsx(Ze,{to:"/settings",className:"drop-link",children:"DESIGN"}),r&&r.account_role[0].name==="CLAdmin"&&n.jsx(Ze,{to:"/admin",className:"drop-link",children:"ADMIN"}),n.jsx(Ze,{to:"/account",className:"drop-link",children:"ACCOUNT"}),n.jsx(Ze,{to:"/logout",className:"drop-link",children:"LOGOUT"})]})]})]}),n.jsxs("ul",{className:"right hide-on-med-and-down",children:[n.jsx("li",{className:"nav-item",children:n.jsx("div",{className:"drop-wrapper insights",children:n.jsxs("div",{className:"drop-hover-content",children:[R&&F&&n.jsxs(Ze,{to:"/assistant",className:"nav-link","diagnostic-id":"assistant-nav-link",children:[n.jsx(dt,{icon:Z5})," ASSISTANT"]}),n.jsxs("div",{className:"drop-content",children:[F&&n.jsx(Ze,{to:{pathname:"/start"},className:"drop-link",children:"GET STARTED"}),R&&n.jsxs(n.Fragment,{children:[n.jsx(Ze,{to:{pathname:"/assistant"},className:"drop-link","diagnostic-id":"chart-match-link",onClick:()=>{v===1&&b(0)},children:"CHART MATCH"}),n.jsx(Ze,{to:{pathname:"/assistant",search:"?view=describe"},className:"drop-link","diagnostic-id":"text-to-charts-link",onClick:()=>{v===1&&b(0)},children:"TEXT-TO-CHARTS"})]})]})]})})}),n.jsx("li",{className:"nav-item",children:w?.allow_use_question_answer!==k&&r&&r.can_use_question_answer&&n.jsxs(Ze,{to:{pathname:"/questions"},className:"nav-link","diagnostic-id":"q-and-a-link",children:[n.jsx(dt,{icon:fj})," Q&A"]})}),n.jsx("li",{className:"nav-item",children:c?a?n.jsxs(Ze,{to:"#",className:"nav-link","diagnostic-id":"featured-nav-link",onClick:()=>U(!0),children:[n.jsx(dt,{icon:yS})," FEATURED"]}):n.jsxs(Ze,{to:"/featured",className:"nav-link","diagnostic-id":"featured-nav-link",children:[n.jsx(dt,{icon:J5})," FEATURED"]}):n.jsx(n.Fragment,{})}),n.jsx("li",{className:"nav-item",children:n.jsx("div",{className:"drop-wrapper insights",children:n.jsxs("div",{className:"drop-hover-content",children:[n.jsxs(Ze,{to:{pathname:"/insights",search:`?view=${p?.allow_partner&&f?"spotlight":m?"explorer":"chartbooks"}`},className:"nav-link",children:[n.jsx(dt,{icon:e4})," INSIGHTS"]}),n.jsxs("div",{className:"drop-content",children:[p?.allow_partner&&f&&n.jsx(Ze,{to:{pathname:"/insights",search:"?view=spotlight"},className:"drop-link",children:"PARTNER INSIGHTS"}),m&&n.jsx(Ze,{to:{pathname:"/insights",search:"?view=explorer"},className:"drop-link",children:"INSIGHTS EXPLORER"}),x===I&&n.jsx(Ze,{to:{pathname:"/chartlibrary"},className:"drop-link",children:"CHART LIBRARY"}),n.jsx(Ze,{to:{pathname:"/insights",search:"?view=chartbooks"},className:"drop-link",children:"CHARTBOOKS"}),j?.allow_composer!==k&&n.jsx(Ze,{to:{pathname:"/insights",search:"?view=composer"},className:"drop-link",children:"COMPOSER"}),h?.allow_studio!==k&&u&&n.jsx(Ze,{to:{pathname:"/insights",search:"?view=studio"},className:"drop-link",children:"STUDIO"}),d?.allow_engage!==k&&g&&n.jsx(Ze,{to:{pathname:"/insights",search:"?view=engage"},className:"drop-link",children:"ENGAGE"})]})]})})}),r&&r.account_permissions&&(r.account_permissions.allow_design!==k&&(N?.type==="default"||T?.type==="default")||r.account_permissions.allow_personalize!==k||r.account_permissions.allow_disclosures!==k)&&n.jsx("li",{className:"nav-item",children:n.jsxs(Ze,{to:"/settings",className:"nav-link","diagnostic-id":"nav-settings-link",children:[n.jsx("i",{className:"material-icons nav-settings-icon",children:"wallpaper"})," ","DESIGN"]})}),n.jsx("li",{className:"nav-item",children:n.jsx("div",{className:"drop-wrapper",children:n.jsxs("div",{className:"drop-hover-content",children:[n.jsxs("span",{className:"nav-link drop-btn",children:[n.jsx(dt,{icon:t4})," ACCOUNT"]}),n.jsxs("div",{className:"drop-content",children:[n.jsx("span",{className:"drop-u
12ser",children:r?`${r.username}`:""}),a&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"nav-starter",children:[n.jsxs("div",{children:["Clearnomics"," ",F?r?.account_permissions?.name:"Community"]}),r.is_upgrade_disabled?n.jsxs("div",{className:"upgrade-submitted-msg",children:[n.jsx("i",{className:"material-icons",children:"done"}),"UPGRADE REQUESTED"]}):n.jsx(Ze,{to:"#",className:"drop-link",onClick:A,children:"UPGRADE"})]}),n.jsx("div",{className:"divider"})]}),r&&r.account_role[0].name==="CLAdmin"&&n.jsx(Ze,{to:"/admin",className:"drop-link",children:"ADMIN"}),n.jsx(Ze,{to:"/account",className:"drop-link",children:"ACCOUNT"}),n.jsx(Ze,{to:"/logout",className:"drop-link",children:"LOGOUT"})]})]})})}),l&&!a&&n.jsx("li",{className:"nav-item",children:n.jsx("img",{alt:"",src:Tn.miraIconUrl,onClick:()=>e.setShowMira(!0),className:"mira-avatar"})})]})]}),V=n.jsx(Ze,{to:"/insights",className:"nav-link",children:n.jsx(Wb,{})}),X=n.jsx("a",{href:"https://www.clearnomics.com",children:n.jsx(Wb,{})}),M=r?n.jsxs("div",{id:"impersonation-banner","diagnostic-id":"impersonation-banner",children:[n.jsxs("div",{id:"impersonation-message",children:["You are impersonating ",r.email,". "]}),n.jsx("button",{className:"btn-cancel","diagnostic-id":"unimpersonate-user-btn",onClick:()=>e.unimpersonateUser().then(()=>{e.history.push("/admin")}),children:"Switch Back"})]}):n.jsx(n.Fragment,{}),W=n.jsxs("div",{className:"access-provided-by",children:[n.jsxs("div",{className:"provided-by-name",children:["In Partnership with ",C]}),n.jsx("button",{className:"btn-banner","diagnostic-id":"access-provider-btn",onClick:()=>L(!0),children:"Contact"})]}),K=e.isAppPatchUpgrade,z=e.auth.user&&(e.auth.user.company.license_status==="Trial"||e.auth.user.company.license_status==="Active"&&e.auth.user.company.license_end_date),ie={height:64*([i,K,z].filter(ne=>ne).length+1)+"px"};return n.jsx("div",{className:"navbar-fixed",style:ie,children:n.jsxs("nav",{className:"nav-wrapper",children:[n.jsxs("div",{className:`container${s?" navbar":""}`,children:[t?s&&o?_?n.jsxs("div",{className:"navbar-provided-by",children:[V,W]}):V:n.jsx(Wb,{}):X,t&&s&&o?q:null]}),i?M:null,z&&n.jsx(see,{status:e.auth.user.company.license_status}),n.jsx(ree,{}),$&&n.jsx(ii,{setModal:U,modal:$}),B&&n.jsx(yA,{setModal:L,modal:B})]})})}const fee=e=>({auth:e.auth,isAppPatchUpgrade:e.version.isAppPatchUpgrade,isLicenseUpgradable:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.license_type&&e.auth.user.company.license_type.is_upgradable,hasAcceptedTerms:e.auth&&e.auth.user&&e.auth.user.terms_click_accepted,isOnboarded:e.auth&&e.auth.user&&e.auth.user.is_onboarded,canUseMira:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.can_use_mira,canUseFeatured:e.auth&&e.auth.user&&e.auth.user.can_use_featured,composerPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.composer_permissions,studioPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.studio_permissions,engagePermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.engage_permissions,partnerPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.partner_permissions,hedwigPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.hedwig_permissions,canUseStudio:e.auth&&e.auth.user&&e.auth.user.can_use_studio,canUseEngage:e.auth&&e.auth.user&&e.auth.user.can_use_engage,canUsePartner:e.auth&&e.auth.user&&e.auth.user.can_use_partner,canUseInsightsExplorer:e.auth&&e.auth.user&&e.auth.user.can_use_insights_explorer,allowChartExplorer:e.auth&&e.auth.user&&e.auth.user.account_permissions&&e.auth.user.account_permissions.allow_chart_explorer,step:e.assistant&&e.assistant.step,isProvidedBy:e.auth.user&&e.auth.user.company&&e.auth.user.company.provider_organization&&e.auth.user.company.provider_organization.has_provider,providedByName:e.auth.user&&e.auth.user.company&&e.auth.user.company.provider_organization&&e.auth.user.company.provider_organization.provided_by_name}),mee=Jt(le(fee,{unimpersonateUser:Q5,setShowMira:Vf,setAssistantStep:bA,logEvent:_r})(pee));function gee(e){const t=Tn.maintenanceImageUrl;return y.useEffect(()=>{let r;if(e.isUnderMaintenance){e.getMaintenanceStatus();const i=()=>{r=setTimeout(()=>{e.getMaintenanceStatus().then(()=>{e.isUnderMaintenance&&i()})},6e4)};i()}return()=>{r&&clearTimeout(r)}},[e.isUnderMaintenance]),n.jsxs("div",{id:"maintenance-container",children:[n.jsx("div",{id:"maintenance-background",style:{backgroundImage:`url(${t})`}}),n.jsxs("div",{id:"maintenance-message",children:[n.jsx("h2",{children:"Clearnomics is down for scheduled maintenance."}),n.jsx("h2",{children:"Please check back soon."}),n.jsx("button",{className:"btn btn-primary",onClick:()=>window.location.href="https://www.clearnomics.com",children:"Go to Clearnomics.com"}),n.jsx("button",{className:"btn-cancel",onClick:()=>window.location.href="mailto:[email protected]",children:"Contact Us"})]})]})}const vee=e=>({isUnderMaintenance:e.maintenance.isUnderMaintenance}),bee=le(vee,{getMaintenanceStatus:pD})(gee);function yee({version:e,isAppMinorUpgrade:t,setLastLocation:r,resetData:i,location:a,history:s,isAuthenticated:o,user:l,setReduxVersion:c}){return y.useEffect(()=>{const h=Tn.appVersion;o&&(!e||h!==e)&&c()},[o]),y.useEffect(()=>{const h=Tn.appVersion,u=a.pathname+a.search;(t||e&&h!==e)&&o&&(s.push("/upgrade"),!u.includes("login")&&!u.includes("logout")&&u!=="/upgrade"&&r(u),l&&i())},[t,e]),n.jsx(n.Fragment,{})}const xee=e=>({version:e.version.version,isAppMinorUpgrade:e.version.isAppMinorUpgrade,user:e.auth.user,isAuthenticated:e.auth.isAuthenticated}),jee=Jt(le(xee,{setLastLocation:hj,resetData:r4,setReduxVersion:n4})(yee)),mt=({field:{name:e,value:t,onChange:r,onBlur:i},id:a,label:s,className:o,diagId:l,...c})=>n.jsxs("div",{className:`radio-button${e==="authorType"?` ${a}-author-option-radio-btn`:""}`,children:[n.jsx("input",{name:e,id:`${e}-${a}`,type:"radio",value:a,checked:a===t||`${a}`==`${t}`,onChange:r,"diagnostic-id":l,onBlur:i,disabled:e==="authorType"&&!c.display||c.disabled}),n.jsxs("label",{htmlFor:`${e}-${a}`,children:[s,c.showProfile&&n.jsx("div",{className:`${e}-option-wrapper`,children:c.showProfile})]})]});function wee(e){return n.jsx(gt,{initialValues:{theme:e.theme},onSubmit:(t,{setSubmitting:r})=>{e.setScrim(!0),e.setTheme(e.user.id,t.theme).then(i=>{e.setModal(!1),r(!1),setTimeout(()=>e.setScrim(!1),750)})},enableReinitialize:!0,children:({dirty:t,values:r})=>n.jsx(ot,{setModal:e.setModal,children:n.jsxs("div",{className:"theme-modal-container",onClick:i=>i.stopPropagation(),children:[n.jsx("h5",{children:"Site Theme"}
12),n.jsxs(vt,{style:{marginTop:"15px"},children:[n.jsxs("div",{className:"theme-select-group",children:[n.jsx("p",{children:"Select a theme:"}),n.jsxs("div",{className:"form-group",role:"radiogroup",children:[n.jsx(me,{component:mt,name:"theme",id:"auto",label:"Auto",diagId:"site-theme-auto"}),n.jsx(me,{component:mt,name:"theme",id:"light",label:"Light",diagId:"site-theme-light"}),n.jsx(me,{component:mt,name:"theme",id:"dark",label:"Dark",diagId:"site-theme-dark"})]})]}),n.jsxs("div",{className:"form-group",style:{textAlign:"right"},children:[n.jsx("button",{type:"button",className:"btn-cancel",onClick:()=>e.setModal(!1),children:"Cancel"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",disabled:!t,children:"Update"})]})]})]})})})}const See=e=>({user:e.auth.user,theme:e.preferences.theme}),_ee=le(See,{setTheme:sZ})(wee);function Cee({isAuthenticated:e,location:t,theme:r,isPoweredBy:i,isProvidedBy:a,providedByName:s,providedByLogoUrl:o,providedByWebsite:l,relationshipManager:c,defaultRelationshipManager:h}){const[u,d]=y.useState(!1),[p,f]=y.useState(!1),{appVersion:m}=Tn,x={dark:"brightness_4",light:"brightness_7",auto:"brightness_auto"}[r],v=c||h||null;return n.jsx(n.Fragment,{children:e&&!t.pathname.includes("/signup")&&!t.pathname.includes("/logo-upload")&&!t.pathname.includes("/profile-upload")&&!t.pathname.includes("/assistant")&&!t.pathname.includes("/featured")&&!t.pathname.includes("/reset-password")&&!t.pathname.includes("/start")?n.jsxs(n.Fragment,{children:[u&&n.jsx("div",{id:"theme-hider",className:"fadeTransition"}),p&&n.jsx(_ee,{setModal:f,setScrim:d}),n.jsxs("div",{id:"version-number",children:[i&&"Powered by Clearnomics ","v",m,n.jsxs("div",{id:"toggle-theme","diagnostic-id":"toggle-theme-btn",onClick:()=>f(!0),children:[n.jsx("i",{className:"material-icons",children:x}),"Set Site Theme"]})]}),a&&n.jsxs("footer",{id:"access-provided-by-footer",children:[n.jsxs("div",{id:"provider-label","diagnostic-id":"provider-label",children:[n.jsxs("div",{"diagnostic-id":"provided-by-website",className:"provided-by-name-website",children:["In Partnership with",l?n.jsxs(Ze,{to:{pathname:l},target:"_blank",children:[" ",s]}):" "+s]}),o?l?n.jsx(Ze,{to:{pathname:l},target:"_blank",children:n.jsx("div",{className:"provider-logo-container",children:n.jsx("img",{src:o,alt:"","diagnostic-id":"provided-by-logo"})})}):n.jsx("div",{className:"provider-logo-container",children:n.jsx("img",{src:o,alt:"","diagnostic-id":"provided-by-logo"})}):null]}),v&&n.jsxs("div",{id:"provider-relationship-info",children:[n.jsx("div",{children:"Your Relationship Manager"}),n.jsxs("div",{id:"partner-info",children:[n.jsx("span",{className:"material-icons",children:"person"}),v.first_name+" "+v.last_name]}),v.phone_number&&n.jsxs("div",{id:"partner-info",children:[n.jsx("span",{className:"material-icons",children:"phone"}),v.phone_number]}),v.email&&n.jsxs("div",{id:"partner-info",children:[n.jsx("span",{className:"material-icons",children:"mail"}),v.email]})]})]})]}):null})}const Nee=e=>({isAuthenticated:e.auth.isAuthenticated,theme:e.preferences.theme,isProvidedBy:e.auth.user&&e.auth.user.company&&e.auth.user.company.provider_organization&&e.auth.user.company.provider_organization.has_provider,providedByName:e.auth.user&&e.auth.user.company&&e.auth.user.company.provider_organization&&e.auth.user.company.provider_organization.provided_by_name,providedByLogoUrl:e.auth.user&&e.auth.user.company&&e.auth.user.company.provider_organization&&e.auth.user.company.provider_organization.provided_by_logo_url,providedByWebsite:e.auth.user&&e.auth.user.company&&e.auth.user.company.provider_organization&&e.auth.user.company.provider_organization.provided_by_website,isPoweredBy:e.auth.user&&e.auth.user.company.site_theme&&e.auth.user.company.site_theme.display_powered_by,relationshipManager:e.auth.user&&e.auth.user.company&&e.auth.user.company.relationship_manager,defaultRelationshipManager:e.auth.user&&e.auth.user.company&&e.auth.user.company.provider_organization&&e.auth.user.company.provider_organization.relationship_manager}),Eee=Jt(le(Nee,{})(Cee)),al=({showChildren:e,showChildrenOnly:t,component:r,children:i,...a})=>n.jsx(jn,{...a,render:s=>t?e?i:n.jsx(r,{...s,...a}
12):n.jsxs(n.Fragment,{children:[n.jsx(r,{...s,...a}),e?i:n.jsx(n.Fragment,{})]})}),{apiAddress:to}=Tn,Tee=(e,t)=>(r,i)=>{const a=`${to}api/orgs/${e}/`,s={disclosure_text:t};return r({type:l4}),Ne.patch(a,s,Ee(i)).then(o=>{r({type:c4,payload:o.data}),r(he({alertMessage:"Your disclosures have been saved and are updating."}))}).catch(o=>{if(r({type:fs}),o.message!==Ue)return r(he({serverError:"There was a problem updating your disclosures, please try again"}))})},kee=(e,t,r,i)=>(a,s)=>{const o=new FormData;t&&o.append("logo",t),r&&o.append("profile",r),i&&o.append("profile",void 0);const l=`${to}api/users/${e}/personalize/`;a({type:d4});const c=Ee(s,Xn);return Ne.post(l,o,c).then(h=>{a({type:uD,payload:h.data}),a(he({alertMessage:"Your logo and profile picture have been saved and are updating."}))}).catch(h=>(a({type:hD}),h.message!==Ue&&a(he({serverError:"There was a problem updating your logo and/or profile picture. Please contact us for assistance."})),Promise.reject(h)))},Pee=(e,t,r)=>(i,a)=>{i({type:gD});const s={professional_credentials:t,corporate_title:r},o=`${to}api/users/${e}/`;return Ne.patch(o,s,Ee(a)).then(l=>{i({type:pj,payload:l.data}),i(he({alertMessage:"Your Profile Has Been Updated"}))}).catch(l=>{i({type:gf}),l.message!==Ue&&i(he({serverError:"There was a problem updating your user profile, please try again"}))})},Iee=(e,t,r)=>(i,a)=>{i({type:gD});const s={old_password:t,new_password:r},o=`${to}api/users/${e}/password/`;return Ne.post(o,s,Ee(a)).then(l=>{i({type:s4}),i(he({alertMessage:"Your Password Has Been Updated"}))}).catch(l=>(i({type:gf}),l.message!==Ue&&(l.response?.data?.detail==="This account is locked. Please contact [email protected] for assistance."?(i({type:o4}),i(he({serverError:l.response.data.detail}))):i(he({passwordError:"You have entered an incorrect password"}))),Promise.reject(l)))},Dee=e=>(t,r)=>{const i=`${to}api/users/${e}/terms-of-use/`;return Ne.get(i,Ee(r))},Ree=(e,t)=>(r,i)=>{const a=`${to}api/users/${e}/`,s={terms_click_accepted:!0,terms_click_version:t,terms_click_datetime:Qt(Date.now()).utc().format("YYYY-MM-DD HH:mm")};return Ne.patch(a,s,Ee(i)).then(o=>{r({type:i4,payload:o.data}),r(he({alertMessage:"Terms of Use Accepted"}))},o=>{r(he({serverError:"There was a problem accepting the Terms of Service. Please try again."}))})},Oee=e=>(t,r)=>{const i=`${to}api/users/${e}/`,a={qanda_click_accepted:!0};return Ne.patch(i,a,Ee(r)).then(s=>{t({type:a4,payload:s.data})},s=>{t(he({serverError:"There was a problem accepting the terms, please try again"}))})},Aee=(e,t)=>(r,i)=>{r({type:u4});const a={payment_method_id:t},s=`${to}api/orgs/${e}/`;return Ne.patch(s,a,Ee(i)).then(o=>{r({type:h4,payload:o.data}),r(he({alertMessage:"Your credit card has been updated"}))}).catch(o=>{r({type:p4}),o.message!==Ue&&r(he({serverError:"There was a problem updating your credit card, please try again"}))})},Mee=({setModal:e,history:t})=>n.jsx(ot,{setModal:e,children:n.jsxs("div",{className:"decline-terms-modal-container",children:[n.jsx("h5",{children:"Please Confirm"}),n.jsx("p",{children:"Declining the Terms of Use will log you out of Clearnomics, are you sure you want to proceed?"}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel",onClick:()=>e(!1),children:"Cancel"}),n.jsx("button",{type:"button",className:"btn-danger","diagnostic-id":"modal-primary-btn",onClick:()=>t.push("/logout"),children:"Log Out"})]})]})}),$ee=Jt(Mee);function Lee({getTerms:e,updateUserTerms:t,userId:r,history:i,user:a,lastLocation:s,clearLastLocation:o,isDisplay:l}){const[c,h]=y.useState(""),[u,d]=y.useState(null),[p,f]=y.useState(!1),[m,g]=y.useState(!1),[x,v]=y.useState(!1),[b,j]=y.useState("");y.useEffect(()=>{e(a.id).then(N=>{h(N.data.terms_of_use_pdf_url),d(N.data.version_number),j(N.data.terms_summary_text)},()=>{g(!0)})},[]);const w=()=>/(android)/i.test(navigator.userAgent),S=()=>window.navigator.userAgent.match(/(MSIE|Trident)/),_=()=>{const N=window.navigator.userAgent;return N.indexOf("Chrome")==-1&&N.indexOf("Safari")>-1},C=()=>["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,E=w()||S()||C(),P=()=>{f(!0),t(r,u).then(()=>{const N=s;N&&o(),N?i.push(s):i.push(a.chartbook_count>0?"/insights":"/start")},()=>{f(!1)})}
12,T=n.jsxs("div",{className:"pdf-viewer-download-link",children:[n.jsx("i",{className:"material-icons",children:"description"}),n.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",download:!0,children:n.jsx("h6",{children:"Download the Terms of Use"})})]});return n.jsx("div",{className:"container",children:n.jsxs("div",{id:"terms-wrapper","diagnostic-id":"terms-container",children:[n.jsxs("div",{className:"terms-header-section",children:[x&&n.jsx($ee,{setModal:v}),n.jsxs("div",{className:"terms-title-container",children:[n.jsx("h4",{children:l?"Clearnomics Terms of Use":"Welcome to Clearnomics"}),n.jsx("div",{className:"terms-download-btn",children:n.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",children:n.jsxs("button",{className:"btn-secondary",type:"button",disabled:!c,children:[n.jsx(dt,{icon:nu}),"Download PDF"]})})})]}),n.jsxs("div",{children:[!l&&n.jsx("div",{className:"terms-header-caption",children:"Please review the most recent Clearnomics Terms of Use below which support our latest features and enhancements. To use Clearnomics you must accept the Terms of Use."}),!l&&b&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"terms-summary-header",children:"Here is a summary of recent updates:"}),n.jsx("div",{className:"terms-summary-text",children:b})]})]})]}),n.jsx("div",{id:"terms-of-use",className:l?"is-display":"",children:m?n.jsx("div",{className:"pdf-viewer-placeholder",children:n.jsxs("h6",{children:["There was a problem loading the document. Please refresh the page or"," ",n.jsx("a",{href:"mailto:[email protected]",target:"_blank",rel:"noopener noreferrer",children:"contact us"})," ","for assistance."]})}):E?T:_()?n.jsxs("object",{data:c,children:[T,n.jsx("embed",{src:c})]}):n.jsxs("object",{data:c,type:"application/pdf",children:[T,n.jsx("embed",{src:c,type:"application/pdf"})]})}),!l&&n.jsx(n.Fragment,{children:n.jsxs("div",{className:"form-group",style:{textAlign:"right"},children:[n.jsxs("div",{className:"terms-caption",children:['By clicking the "',n.jsx("b",{children:"Accept & Continue"}),'" button below, you agree to and accept the updated Clearnomics Terms of Use.']}),n.jsx("button",{className:"btn-cancel","diagnostic-id":"terms-cancel-btn",onClick:()=>v(!0),children:"Decline"}),n.jsx("button",{className:"btn btn-primary","diagnostic-id":"terms-accept-btn",onClick:P,disabled:p||!c,children:"Accept & Continue"})]})})]})})}const Fee=e=>({userId:e.auth.user&&e.auth.user.id,user:e.auth.user,lastLocation:e.auth.lastLocation}),xA=le(Fee,{getTerms:Dee,updateUserTerms:Ree,clearLastLocation:gj})(Jt(Lee));class Uee extends y.Component{componentDidMount(){this.props.logout()}render(){return this.props.isAuthenticated?null:n.jsx(qt,{to:"/login"})}}const Bee=e=>({isAuthenticated:e.auth.isAuthenticated}),jA=le(Bee,{logout:f4})(Uee);function qee({}){return n.jsxs(us,{children:[n.jsx(kn,{path:"/acceptterms",component:xA}),n.jsx(kn,{exact:!0,path:"/logout",component:jA}),n.jsx(qt,{to:"/acceptterms",from:"*"})]})}function Vee({history:e,lastLocation:t,clearLastLocation:r}){return y.useEffect(()=>{const i=t;i&&r(),i&&e.push(t)},[]),n.jsx(n.Fragment,{})}const zee=e=>({lastLocation:e.auth.lastLocation}),Hee=Jt(le(zee,{clearLastLocation:gj})(Vee));function Gee({user:e,getUser:t,history:r,setUserLoaded:i,lastLocation:a}){return y.useEffect(()=>{const s=!!e;t().then(o=>{i(!0),s||(o.chartbook_count===0&&o.is_onboarded&&(!a||a&&(a==="/"||a==="/insights"))?setTimeout(()=>{r.push("/start")},10):r.push(a))}).catch(()=>{i(!0)})},[]),n.jsx(n.Fragment,{})}const Wee=e=>({user:e.auth.user,lastLocation:e.auth.lastLocation}),Yee=Jt(le(Wee,{getUser:Ba})(Gee));function Kee(e){const[t,r]=y.useState(null),[i,a]=y.useState(!1),{uploadUserDetails:s,user:o,getUser:l,currentStep:c,setCurrentStep:h,skipProfileDetailsUpload:u,LogoIsUploaded:d}=e,p=o?.id,{Starter:f}=Br;y.useEffect(()=>{h(3)},[]);const m=(v,b,j,w,S,_)=>{v===void 0?(r(null),delete j.logoFile,delete b.logoFile):Bo(v)?v&&v.size>1048576?(r(null),_(`${w}File`,void 0,!1),S(w+"File","That file is larger than 1MB. Please use a smaller file or contact us for help.")):(r(URL.createObjectURL(v)),_("logoFile",v),delete b.logoFile):S(w+"File","Image must be a PNG or JPG/JPEG file.")},g=v=>{v.preventDefault(),u(o.id,!0,!1).then(l).then(()=>{h(c+1),a(!0)})},x=n.jsx("div",{className:"preapproval-container",children:n.jsxs("div",{className:"container",children:[n.jsx("div",{className:"preapproval-wrapper",children:n.jsxs("div",{id:"preapproval-header",children:[n.jsx("h3",{children:"Upload your firm's logo"}),n.jsx("div",{className:"col s12",children:n.jsx("h6",{className:"header-msg",children:"Showcase your firm's brand on all charts and insights"})})]})}),n.jsx("div",{className:"preapproval-logo-upload-container",children:n.jsx(gt,{initialValues:{logoFile:void 0},onSubmit:(v,{setSubmitting:b})=>
12{s(p,v.logoFile,"").then(()=>{h(c+1),a(!0),r(null)})},enableReinitialize:!0,children:v=>{const{values:b,touched:j,errors:w,setFieldError:S,setFieldValue:_}=v;return n.jsxs(vt,{className:"drop-file-form",children:[n.jsxs("div",{className:`row drop-file-input ${t?"with-img":"without-img"}`,children:[!t&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"drop-file-input-label",children:[n.jsx("i",{className:"material-icons",children:"add_photo_alternate"}),n.jsx("p",{children:"Drag and drop your .jpg, .jpeg, or .png file here, or click to select a file"})]}),n.jsx("input",{id:"logoFile","diagnostic-id":"preapproval-logo-input",name:"logoFile",type:"file",accept:"image/png,image/x-png,image/jpeg",onChange:C=>{m(C.currentTarget.files[0],w,b,"logo",S,_)},className:w.logoFile&&j.logoFile?"text-input error":"file-path validate"})]}),t&&n.jsxs("div",{className:"img-upload-grp",children:[n.jsx("div",{className:"image-group","diagnostic-id":"logo-img",children:n.jsx("img",{alt:"Logo",src:t})}),n.jsx("button",{id:"clear-btn","diagnostic-id":"clear-btn",type:"button",onClick:()=>{m(void 0,w,b,"logo",S,_)},children:"Clear"})]})]}),w.logoFile&&n.jsx("div",{className:"row input-feedback","diagnostic-id":"input-feedback",children:w.logoFile}),n.jsx("div",{className:"row",children:n.jsx("button",{type:"submit","diagnostic-id":"continue-btn",className:"btn btn-primary-lg continue-btn",disabled:!t,children:"Continue"})}),n.jsx("div",{className:"row",children:n.jsx("button",{type:"button","diagnostic-id":"skip-btn",className:"btn btn-primary-text skip-btn",onClick:g,children:"Skip for now"})})]})}})})]})});return d||i||o?.account_permissions?.name===f?n.jsx(qt,{to:"/profile-upload"}):x}const Xee=e=>({user:e.auth.user,currentStep:e.preapproval.currentStep,LogoIsUploaded:e.auth.isAuthenticated&&e.auth.user&&e.auth.user.company.is_logo_uploaded}),Qee=le(Xee,{uploadUserDetails:qO,getUser:Ba,setCurrentStep:za,skipProfileDetailsUpload:zO})(Kee);function Zee(e){const{getUser:t,setCurrentStep:r,currentStep:i,isLoaded:a,user:s,setWelcomeModal:o}=e,[l,c]=y.useState(!1),[h,u]=y.useState(!1),[d,p]=y.useState(0),{Community:f,SponsoredCommunity:m}=Br;if(y.useEffect(()=>{p(95),setTimeout(()=>{p(100)},6e3)},[]),y.useEffect(()=>{d===100&&setTimeout(()=>{u(!0),r(i+1)},3e3)},[d]),y.useEffect(()=>{const g=x=>{x.preventDefault()};return window.addEventListener("beforeunload",g),()=>{window.removeEventListener("beforeunload",g)}},[]),y.useEffect(()=>{h&&setTimeout(()=>{t()},2e3)},[h]),a){const g=s?.account_permissions?.name===f||s?.account_permissions?.name===m;return g&&o(!0),n.jsx(qt,{to:{pathname:g?"/insights":"/start"}})}return n.jsx("div",{className:"preapproval-container",children:n.jsxs("div",{className:"container finish-page-container",children:[n.jsx("div",{id:"preapproval-header",children:h?n.jsx("h3",{"diagnostic-id":"account-onboarded-msg",children:"You're all set!"}):n.jsx("h3",{children:"We're getting your account ready..."})}),h?n.jsx("div",{className:"completed-meter","diagnostic-id":"completed-meter",children:n.jsx("span",{children:n.jsx("i",{className:"material-icons",children:"done"})})}):n.jsx("div",{className:"meter animate","diagnostic-id":"meter",children:n.jsx("span",{className:`${l?"completed":"incomplete"}`,style:{width:`${d}%`},children:n.jsx("span",{})})})]})})}const Jee=e=>({user:e.auth.user,currentStep:e.preapproval.currentStep,isLoaded:e.auth.isLoading}),ete=le(Jee,{getUser:Ba,setCurrentStep:za,setWelcomeModal:XO})(Zee);function tte(e){const{user:t,getUser:r,uploadUserDetails:i,setCurrentStep:a,currentStep:s,skipProfileDetailsUpload:o}=e,[l,c]=y.useState(null),[h,u]=y.useState(!1),[d,p]=y.useState(!1),{Starter:f}=Br,m=t?.id,g=l||t?.profile_picture_url,x="50";y.useEffect(()=>{a(4)},[]);const v=S=>{S.preventDefault(),o(m,!1,!0),a(s+1),p(!0)},b=(S,_,C,E,P,T)=>{S===void 0?(c(null),h&&u(!1),delete C.profileFile,delete _.profileFile):Bo(S)?S&&S.size>1048576?(c(null),T(`${E}File`,void 0,!1),P(E+"File","That file is larger than 1MB. Please use a smaller file or contact us for help.")):(c(URL.createObjectURL(S)),h&&u(!1),T("profileFile",S),delete _.profileFile):P(E+"File","Image must be a PNG or JPG/JPEG file.")},j=(S,_,C)=>{_("profileFile",null),u(!0),c(null)},w=n.jsx("div",{className:"preapproval-container",children:n.jsxs("div",{className:"container onboard-profile-container",children:[n.jsx("div",{className:"preapproval-wrapper",children:n.jsxs("div",{id:"preapproval-header",children:[n.jsx("h3",{children:"Add your profile details"}),n.jsx("div",{className:"col s12",children:n.jsx("h6",{className:"header-msg",children:"To customize the insights with your details, tell us more about yourself"})})]})}),n.jsx("div",{className:"preapproval-profile-upload-container",children:n.jsx(gt,{initialValues:{profileFile:void 0,jobTitle:t.corporate_title||"",credentials:t.professional_credentials||""},onSubmit:(S,{setSubmitting:_})=>{i(m,"",S.profileFile,S.credentials,S.jobTitle).then(()=>_(!1)),a(s+1),c(null),u(!1),p(!0)},enableReinitialize:!0,children:S=>{const{values:_,touched:C,errors:E,setFieldError:P,setFieldValue:T,isSubmitting:N}=S;return n.jsxs(vt,{className:"drop-file-form",children:[t?.account_permissions?.name===f?n.jsx(n.Fragment,{}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"upload-msg",children:"Upload a profile picture:"}),n.jsx("div",{className:`drop-file-input ${!h&&g?"with-img":"without-img"}`,children:!g||h?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"drop-file-input-label",children:[n.jsx("i",{className:"material-icons",children:"add_photo_alternate"}),n.jsx("p",{children:"Drag and drop your .jpg, .jpeg, or .png file here, or click to select a file"})]}),n.jsx("input",{id:"profileFile","diagnostic-id":"preapproval-profile-input",n
12ame:"profileFile",type:"file",accept:"image/png,image/x-png,image/jpeg",onChange:k=>{b(k.currentTarget.files[0],E,_,"profile",P,T)},className:E.profileFile&&C.profileFile?"text-input error":"file-path validate"})]}):n.jsxs("div",{className:"img-upload-grp",children:[n.jsx("div",{className:"image-group","diagnostic-id":"profile-img",children:n.jsx("img",{alt:"Profile",src:g})}),(l||t.profile_picture_url)&&n.jsx("button",{id:"clear-btn","diagnostic-id":"clear-btn",type:"button",onClick:()=>j(_,T),children:"Clear"})]})}),E.profileFile&&n.jsx("div",{className:"row input-feedback","diagnostic-id":"input-feedback",children:E.profileFile})]}),n.jsxs("div",{className:"profile-details-group",children:[n.jsxs("div",{className:"profile-details-field",children:[n.jsx("label",{children:"Job Title"}),n.jsx(me,{type:"text",className:"validate",name:"jobTitle",id:"jobTitle","diagnostic-id":"job-title-input",autoFocus:!0,placeholder:"Job Title",maxLength:x})]}),E.jobTitle&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:E.jobTitle}),n.jsxs("div",{className:"profile-details-field",children:[n.jsx("label",{children:"Certifications/Credentials (e.g. CFP, CFA, CPA, etc.)"}),n.jsx(me,{type:"text",className:"validate",name:"credentials",id:"credentials","diagnostic-id":"credentials-input",placeholder:"Certifications/Credentials",maxLength:x})]})]}),E.credentials&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:E.credentials}),n.jsx("div",{className:"row",children:n.jsx("button",{type:"submit","diagnostic-id":"continue-btn",className:"btn btn-primary-lg continue-btn",disabled:N||!l&&!_.credentials&&!_.jobTitle,children:N?n.jsx(ur,{size:"1.25em",thickness:8,variant:"indeterminate"}):"Continue"})}),n.jsx("div",{className:"row",children:n.jsx("button",{type:"button","diagnostic-id":"skip-btn",className:"btn btn-primary-text skip-btn",onClick:v,children:"Skip for now"})})]})}})})]})});return d?n.jsx(ete,{}):w}const nte=e=>({user:e.auth.user,currentStep:e.preapproval.currentStep}),rte=le(nte,{uploadUserDetails:qO,getUser:Ba,setCurrentStep:za,skipProfileDetailsUpload:zO})(tte);function ite({showProfilePage:e,user:t,setCurrentStep:r,currentStep:i,setLastLocation:a,setSpinner:s,showSpinner:o,location:l}){return t.id,y.useEffect(()=>{a(null)},[]),n.jsxs(n.Fragment,{children:[o&&n.jsx(Dn,{}),n.jsxs(us,{children:[n.jsx(kn,{path:"/profile-upload",component:rte}),n.jsx(kn,{path:"/logo-upload",component:Qee})]}),e?n.jsx(qt,{to:"/profile-upload",from:"*"}):n.jsx(qt,{to:"/logo-upload",from:"*"}),l.pathname.includes("/start")?null:n.jsx(GO,{})]})}const ate=e=>({user:e.auth.user,showProfilePage:e.auth.isAuthenticated&&e.auth.user&&!e.auth.user.is_onboarded&&e.auth.user.company.is_logo_uploaded,currentStep:e.preapproval.currentStep,showSpinner:e.preapproval.showSpinner}),ste=le(ate,{setCurrentStep:za,setLastLocation:hj,setSpinner:HO})(ite);var Yb={},Kb,W1;function ote(){return W1||(W1=1,Kb=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)),Kb}var Xb,Y1;function lte(){if(Y1)return Xb;Y1=1;var e="%[a-f0-9]{2}",t=new RegExp("("+e+")|([^%]+?)","gi"),r=new RegExp("("+e+")+","gi");function i(o,l){try{return[decodeURIComponent(o.join(""))]}catch{}if(o.length===1)return o;l=l||1;var c=o.slice(0,l),h=o.slice(l);return Array.prototype.concat.call([],i(c),i(h))}function a(o){try{return decodeURIComponent(o)}catch{for(var l=o.match(t)||[],c=1;c<l.length;c++)o=i(l,c).join(""),l=o.match(t)||[];return o}}function s(o){for(var l={"%FE%FF":"��","%FF%FE":"��"},c=r.exec(o);c;){try{l[c[0]]=decodeURIComponent(c[0])}catch{var h=a(c[0]);h!==c[0]&&(l[c[0]]=h)}c=r.exec(o)}l["%C2"]="�";for(var u=Object.keys(l),d=0;d<u.length;d++){var p=u[d];o=o.replace(new RegExp(p,"g"),l[p])}return o}return Xb=function(o){if(typeof o!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof o+"`");try{return o=o.replace(/\+/g," "),decodeURIComponent(o)}catch{return s(o)}},Xb}var Qb,K1;function cte(){return K1||(K1=1,Qb=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]}),Qb}var Zb,X1;function dte(){return X1||(X1=1,Zb=function(e,t){for(var r={},i=Object.keys(e),a=Array.isArray(t),s=0;s<i.length;s++){var o=i[s],l=e[o];(a?t.indexOf(o)!==-1:t(o,l,e))&&(r[o]=l)}return r}),Zb}var Q1;function ute(){return Q1||(Q1=1,(function(e){const t=ote(),r=lte(),i=cte(),a=dte(),s=v=>v==null;function o(v){switch(v.arrayFormat){case"index":return b=>(j,w)=>{const S=j.length;return w===void 0||v.skipNull&&w===null||v.skipEmptyString&&w===""?j:w===null?[...j,[h(b,v),"[",S,"]"].join("")]:[...j,[h(b,v),"[",h(S,v),"]=",h(w,v)].join("")]};case"bracket":return b=>(j,w)=>w===void 0||v.skipNull&&w===null||v.skipEmptyString&&w===""?j:w===null?[...j,[h(b,v),"[]"].join("")]:[...j,[h(b,v),"[]=",h(w,v)].join("")];case"comma":case"separator":return b=>(j,w)=>w==null||w.length===0?j:j.length===0?[[h(b,v),"=",h(w,v)].join("")]:[[j,h(w,v)].join(v.arrayFormatSeparator)];default:return b=>(j,w)=>w===void 0||v.skipNull&&w===null||v.skipEmptyString&&w===""?j:w===null?[...j,h(b,v)]:[...j,[h(b,v),"=",h(w,v)].join("")]}}function l(v){let b;switch(v.arrayFormat){case"index":return(j,w,S)=>{if(b=/\[(\d*)\]$/.exec(j),j=j.replace(/\[\d*\]$/,""),!b){S[j]=w;return}S[j]===void 0&&(S[j]={}),S[j][b[1]]=w};case"bracket":return(j,w,S)=>{if(b=/(\[\])$/.exec(j),j=j.replace(/\[\]$/,""),!b){S[j]=w;return}if(S[j]===void 0){S[j]=[w];return}S[j]=[].concat(S[j],w)};case"comma":case"separator":return(j,w,S)=>{const _=typeof w=="string"&&w.includes(v.arrayFormatSeparator),C=typeof w=="string"&&!_&&u(w,v).includes(v.arrayFormatSeparator);w=C?u(w,v):w;const E=_||C?w.split(v.arrayFormatSeparator).map(P=>u(P,v)):w===null?w:u(w,v);S[j]=E};default:return(j,w,S)=>{if(S[j]===void 0){S[j]=w;return}S[j]=[].concat(S[j],w)}}}function c(v){if(typeof v!="string"||v.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function h(v,b){return b.encode?b.strict?t(v):encodeURIComponent(v):v}function u(v,b){return b.decode?r(v):v}function d(v){return Array.isArray(v)?v.sort():typeof v=="object"?d(Object.keys(v)).sort((b,j)=>Number(b)-Number(j)).map(b=>v[b]):v}function p(v){const b=v.indexOf("#");return b!==-1&&(v=v.slice(0,b)),v}function f(v){let b="";const j=v.indexOf("#");return j!==-1&&(b=v.slice(j)),b}function m(v){v=p(v);const b=v.indexOf("?");return b===-1?"":v.slice(b+1)}function g(v,b){return b.parseNumbers&&!Number.isNaN(Number(v))&&typeof v=="string"&&v.trim()!==""?v=Number(v):b.parseBooleans&&v!==null&&(v.toLowerCase()==="true"||v.toLowerCase()==="false")&&(v=v.toLowerCase()==="true"),v}function x(v,b){b=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},b),c(b.arrayFormatSeparator);const j=l(b),w=Object.create(null);if(typeof v!="string"||(v=v.trim().replace(/^[?#&]/,""),!v))return w;for(const S of v.split("&")){if(S==="")continue;let[_,C]=i(b.decode?S.replace(/\+/g," "):S,"=");C=C===void 0?null:["comma","separator"].includes(b.arrayFormat)?C:u(C,b),j(u(_,b),C,w)}for(const S of Object.keys(w)){const _=w[S];if(typeof _=="object"&&_!==null)for(const C of Object.keys(_))_[C]=g(_[C],b);else w[S]=g(_,b)}return b.sort===!1?w:(b.sort===!0?Object.keys(w).sort():Object.keys(w).sort(b.sort)).reduce((S,_)=>{const C=w[_];return C&&typeof C=="object"&&!Array.isArray(C)?S[_]=d(C):S[_]=C,S},Object.create(null))}e.extract=m,e.parse=x,e.stringify=(v,b)=>{if(!v)return"";b=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},b),c(b.arrayFormatSeparator);const j=C=>b.skipNull&&s(v[C])||b.skipEmptyString&&v[C]==="",w=o(b),S={};for(const C of Object.keys(v))j(C)||(S[C]=v[C]);const _=Object.keys(S);return b.sort!==!1&&_.sort(b.sort),_.map(C=>{const E=v[C];return E===void 0?"":E===null?h(C,b):Array.isArray(E)?E.reduce(w(C),[]).join("&"):h(C,b)+"="+h(E,b)}).filter(C=>C.length>0).join("&")},e.parseUrl=(v,b)=>{b=Object.assign({decode:!0},b);const[j,w]=i(v,"#");return Object.assign({url:j.split("?")[0]||"",query:x(m(v),b)},b&&b.parseFragmentIdentifier&&w?{fragmentIdentifier:u(w,b)}:{})},e.stringifyUrl=(v,b)=>{b=Object.assign({encode:!0,strict:!0},b);const j=p(v.url).split("?")[0]||"",w=e.extract(v.url),S=e.parse(w,{sort:!1}),_=Object.assign(S,v.query);let C=e.stringify(_,b);C&&(C=`?${C}`);let E=f(v.url);return v.fragmentIdentifier&&(E=`#${h(v.fragmentIdentifier,b)}`),`${j}${C}${E}`},e.pick=(v,b,j)=>{j=Object.assign({parseFragmentIdentifier:!0},j);const{url:w,query:S,fragmentIdentifier:_}=e.parseUrl(v,j);return e.stringifyUrl({url:w,query:a(S,b),fragmentIdentifier:_},j)},e.exclude=(v,b,j)=>{const w=Array.isArray(b)?S=>!b.includes(S):(S,_)=>!b(S,_);return e.pick(v,w,j)}})(Yb)),Yb}var hte=ute();const Ni=Zt(hte);function wA(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return lu.apply(void 0,[hs({unstable_strictMode:!0},e)].concat(r))}function SA(e){return e}function _A(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Zj(e,Z({defaultTheme:cu},t))}function Z1(e){return String(parseFloat(e)).length===String(e).length}function pte(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function uo(e){return parseFloat(e)}function fte(e){return function(t,r){var i=pte(t);if(i===r)return t;var a=uo(t);if(i!=="px"){if(i==="em")a=uo(t)*uo(e);else if(i==="rem")return a=uo(t)*uo(e),t}var s=a;if(r!=="px")if(r==="em")s=a/uo(e);else if(r==="rem")s=a/uo(e);else return t;return parseFloat(s.toFixed(5))+r}}function mte(e){var t=e.size,r=e.grid,i=t-t%r,a=i+r;return t-i<a-t?i:a}function gte(e){var t=e.lineHeight,r=e.pixels,i=e.htmlFontSize;return r/(t*i)}function vte(e){var t=e.cssProperty,r=e.min,i=e.max,a=e.unit,s=a===void 0?"rem":a,o=e.breakpoints,l=o===void 0?[600,960,1280]:o,c=e.transform,h=c===void 0?null:c,u=Ct({},t,"".concat(r).concat(s)),d=(i-r)/l[l.length-1];return l.forEach(function(p){var f=r+d*p;h!==null&&(f=h(f)),u["@media (min-width:".concat(p,"px)")]=Ct({},t,"".concat(Math.round(f*1e4)/1e4).concat(s))}),u}function CA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.breakpoints,i=r===void 0?["sm","md","lg"]:r,a=t.disableAlign,s=a===void 0?!1:a,o=t.factor,l=o===void 0?2:o,c=t.variants,h=c===void 0?["h1","h2","h3","h4","h5","h6","
12subtitle1","subtitle2","body1","body2","caption","button","overline"]:c,u=Z({},e);u.typography=Z({},u.typography);var d=u.typography,p=fte(d.htmlFontSize),f=i.map(function(m){return u.breakpoints.values[m]});return h.forEach(function(m){var g=d[m],x=parseFloat(p(g.fontSize,"rem"));if(!(x<=1)){var v=x,b=1+(v-1)/l,j=g.lineHeight;if(!Z1(j)&&!s)throw new Error(Po(6));Z1(j)||(j=parseFloat(p(j,"rem"))/parseFloat(x));var w=null;s||(w=function(_){return mte({size:_,grid:gte({pixels:4,lineHeight:j,htmlFontSize:d.htmlFontSize})})}),d[m]=Z({},g,vte({cssProperty:"fontSize",min:b,max:v,unit:"rem",breakpoints:f,transform:w}))}}),u}var Pw=function(t){var r=$9(t);return function(i,a){return r(i,Z({defaultTheme:cu},a))}},NA=yR({defaultTheme:cu});const bte=Object.freeze(Object.defineProperty({__proto__:null,MuiThemeProvider:qd,ServerStyleSheets:bR,StylesProvider:Qj,ThemeProvider:qd,alpha:tn,createGenerateClassName:_f,createMuiTheme:iw,createStyles:SA,createTheme:lu,darken:Vo,decomposeColor:$a,duration:Rr,easing:$p,emphasize:Ia,fade:jR,getContrastRatio:nw,getLuminance:zd,hexToRgb:ew,hslToRgb:tw,jssPreset:Nf,lighten:zo,makeStyles:_A,recomposeColor:Ql,responsiveFontSizes:CA,rgbToHex:xR,styled:Pw,unstable_createMuiStrictModeTheme:wA,useTheme:Or,withStyles:Ye,withTheme:NA},Symbol.toStringTag,{value:"Module"}));var yte=typeof window>"u"?y.useEffect:y.useLayoutEffect;function xte(e){var t=e.classes,r=e.pulsate,i=r===void 0?!1:r,a=e.rippleX,s=e.rippleY,o=e.rippleSize,l=e.in,c=e.onExited,h=c===void 0?function(){}:c,u=e.timeout,d=y.useState(!1),p=d[0],f=d[1],m=$e(t.ripple,t.rippleVisible,i&&t.ripplePulsate),g={width:o,height:o,top:-(o/2)+s,left:-(o/2)+a},x=$e(t.child,p&&t.childLeaving,i&&t.childPulsate),v=Un(h);return yte(function(){if(!l){f(!0);var b=setTimeout(v,u);return function(){clearTimeout(b)}}},[v,l,u]),y.createElement("span",{className:m,style:g},y.createElement("span",{className:x}))}var Ax=550,jte=80,wte=function(t){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(Ax,"ms ").concat(t.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(t.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(Ax,"ms ").concat(t.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(t.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}},Ste=y.forwardRef(function(t,r){var i=t.center,a=i===void 0?!1:i,s=t.classes,o=t.className,l=Be(t,["center","classes","className"]),c=y.useState([]),h=c[0],u=c[1],d=y.useRef(0),p=y.useRef(null);y.useEffect(function(){p.current&&(p.current(),p.current=null)},[h]);var f=y.useRef(!1),m=y.useRef(null),g=y.useRef(null),x=y.useRef(null);y.useEffect(function(){return function(){clearTimeout(m.current)}},[]);var v=y.useCallback(function(S){var _=S.pulsate,C=S.rippleX,E=S.rippleY,P=S.rippleSize,T=S.cb;u(function(N){return[].concat(xr(N),[y.createElement(xte,{key:d.current,classes:s,timeout:Ax,pulsate:_,rippleX:C,rippleY:E,rippleSize:P})])}),d.current+=1,p.current=T},[s]),b=y.useCallback(function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},_=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=arguments.length>2?arguments[2]:void 0,E=_.pulsate,P=E===void 0?!1:E,T=_.center,N=T===void 0?a||_.pulsate:T,k=_.fakeElement,I=k===void 0?!1:k;if(S.type==="mousedown"&&f.current){f.current=!1;return}S.type==="touchstart"&&(f.current=!0);var D=I?null:x.current,O=D?D.getBoundingClientRect():{width:0,height:0,left:0,top:0},$,U,B;if(N||S.clientX===0&&S.clientY===0||!S.clientX&&!S.touches)$=Math.round(O.width/2),U=Math.round(O.height/2);else{var L=S.touches?S.touches[0]:S,A=L.clientX,R=L.clientY;$=Math.round(A-O.left),U=Math.round(R-O.top)}if(N)B=Math.sqrt((2*Math.pow(O.width,2)+Math.pow(O.height,2))/3),B%2===0&&(B+=1);else{var F=Math.max(Math.abs((D?D.clientWidth:0)-$),$)*2+2,q=Math.max(Math.abs((D?D.clientHeight:0)-U),U)*2+2;B=Math.sqrt(Math.pow(F,2)+Math.pow(q,2))}S.touches?g.current===null&&(g.current=function(){v({pulsate:P,rippleX:$,rippleY:U,rippleSize:B,cb:C})},m.current=setTimeout(function(){g.current&&(g.current(),g.current=null)},jte)):v({pulsate:P,rippleX:$,rippleY:U,rippleSize:B,cb:C})},[a,v]),j=y.useCallback(function(){b({},{pulsate:!0})},[b]),w=y.useCallback(function(S,_){if(clearTimeout(m.current),S.type==="touchend"&&g.current){S.persist(),g.current(),g.current=null,m.current=setTimeout(function(){w(S,_)});return}g.current=null,u(function(C){return C.length>0?C.slice(1):C}),p.current=_},[]);return y.useImperativeHandle(r,function(){return{pulsate:j,start:b,stop:w}},[j,b,w]),y.createElement("span",Z({className:$e(s.root,o),ref:x},l),y.createElement(m4,{component:null,exit:!0},h))});const _te=Ye(wte,{flip:!1,name:"MuiTouchRipple"})(y.memo(Ste));var Cte={root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},Nte=y.forwardRef(function(t,r){var i=t.action,a=t.buttonRef,s=t.centerRipple,o=s===void 0?!1:s,l=t.children,c=t.classes,h=t.className,u=t.component,d=u===void 0?"button":u,p=t.disabled,f=p===void 0?!1:p,m=t.disableRipple,g=m===void 0?!1:m,x=t.disableTouchRipple,v=x===void 0?!1:x,b=t.focusRipple,j=b===void 0?!1:b,w=t.focusVisibleClassName,S=t.onBlur,_=t.onClick,C=t.onF
12ocus,E=t.onFocusVisible,P=t.onKeyDown,T=t.onKeyUp,N=t.onMouseDown,k=t.onMouseLeave,I=t.onMouseUp,D=t.onTouchEnd,O=t.onTouchMove,$=t.onTouchStart,U=t.onDragLeave,B=t.tabIndex,L=B===void 0?0:B,A=t.TouchRippleProps,R=t.type,F=R===void 0?"button":R,q=Be(t,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),V=y.useRef(null);function X(){return Fr.findDOMNode(V.current)}var M=y.useRef(null),W=y.useState(!1),K=W[0],z=W[1];f&&K&&z(!1);var Y=Zl(),ie=Y.isFocusVisible,ne=Y.onBlurVisible,ve=Y.ref;y.useImperativeHandle(i,function(){return{focusVisible:function(){z(!0),V.current.focus()}}},[]),y.useEffect(function(){K&&j&&!g&&M.current.pulsate()},[g,j,K]);function pe(We,pt){var Et=arguments.length>2&&arguments[2]!==void 0?arguments[2]:v;return Un(function(Ot){pt&&pt(Ot);var kt=Et;return!kt&&M.current&&M.current[We](Ot),!0})}var be=pe("start",N),ye=pe("stop",U),ke=pe("stop",I),fe=pe("stop",function(We){K&&We.preventDefault(),k&&k(We)}),se=pe("start",$),ge=pe("stop",D),De=pe("stop",O),ae=pe("stop",function(We){K&&(ne(We),z(!1)),S&&S(We)},!1),Q=Un(function(We){V.current||(V.current=We.currentTarget),ie(We)&&(z(!0),E&&E(We)),C&&C(We)}),ee=function(){var pt=X();return d&&d!=="button"&&!(pt.tagName==="A"&&pt.href)},oe=y.useRef(!1),Pe=Un(function(We){j&&!oe.current&&K&&M.current&&We.key===" "&&(oe.current=!0,We.persist(),M.current.stop(We,function(){M.current.start(We)})),We.target===We.currentTarget&&ee()&&We.key===" "&&We.preventDefault(),P&&P(We),We.target===We.currentTarget&&ee()&&We.key==="Enter"&&!f&&(We.preventDefault(),_&&_(We))}),Fe=Un(function(We){j&&We.key===" "&&M.current&&K&&!We.defaultPrevented&&(oe.current=!1,We.persist(),M.current.stop(We,function(){M.current.pulsate(We)})),T&&T(We),_&&We.target===We.currentTarget&&ee()&&We.key===" "&&!We.defaultPrevented&&_(We)}),Ie=d;Ie==="button"&&q.href&&(Ie="a");var Re={};Ie==="button"?(Re.type=F,Re.disabled=f):((Ie!=="a"||!q.href)&&(Re.role="button"),Re["aria-disabled"]=f);var Ve=mn(a,r),Xe=mn(ve,V),et=mn(Ve,Xe),rt=y.useState(!1),bt=rt[0],Qe=rt[1];y.useEffect(function(){Qe(!0)},[]);var tt=bt&&!g&&!f;return y.createElement(Ie,Z({className:$e(c.root,h,K&&[c.focusVisible,w],f&&c.disabled),onBlur:ae,onClick:_,onFocus:Q,onKeyDown:Pe,onKeyUp:Fe,onMouseDown:be,onMouseLeave:fe,onMouseUp:ke,onDragLeave:ye,onTouchEnd:ge,onTouchMove:De,onTouchStart:se,ref:et,tabIndex:f?-1:L},Re,q),l,tt?y.createElement(_te,Z({ref:M,center:o},A)):null)});const ni=Ye(Cte,{name:"MuiButtonBase"})(Nte);var Ete=function(t){var r;return{root:Z({},t.typography.button,(r={maxWidth:264,minWidth:72,position:"relative",boxSizing:"border-box",minHeight:48,flexShrink:0,padding:"6px 12px"},Ct(r,t.breakpoints.up("sm"),{padding:"6px 24px"}),Ct(r,"overflow","hidden"),Ct(r,"whiteSpace","normal"),Ct(r,"textAlign","center"),Ct(r,t.breakpoints.up("sm"),{minWidth:160}),r)),labelIcon:{minHeight:72,paddingTop:9,"& $wrapper > *:first-child":{marginBottom:6}},textColorInherit:{color:"inherit",opacity:.7,"&$selected":{opacity:1},"&$disabled":{opacity:.5}},textColorPrimary:{color:t.palette.text.secondary,"&$selected":{color:t.palette.primary.main},"&$disabled":{color:t.palette.text.disabled}},textColorSecondary:{color:t.palette.text.secondary,"&$selected":{color:t.palette.secondary.main},"&$disabled":{color:t.palette.text.disabled}},selected:{},disabled:{},fullWidth:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},wrapped:{fontSize:t.typography.pxToRem(12),lineHeight:1.5},wrapper:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"100%",flexDirection:"column"}}},Tte=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.disabled,o=s===void 0?!1:s,l=t.disableFocusRipple,c=l===void 0?!1:l,h=t.fullWidth,u=t.icon,d=t.indicator,p=t.label,f=t.onChange,m=t.onClick,g=t.onFocus,x=t.selected,v=t.selectionFollowsFocus,b=t.textColor,j=b===void 0?"inherit":b,w=t.value,S=t.wrapped,_=S===void 0?!1:S,C=Be(t,["classes","className","disabled","disableFocusRipple","fullWidth","icon","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"]),E=function(N){f&&f(N,w),m&&m(N)},P=function(N){v&&!x&&f&&f(N,w),g&&g(N)};
12return y.createElement(ni,Z({focusRipple:!c,className:$e(i.root,i["textColor".concat(ut(j))],a,o&&i.disabled,x&&i.selected,p&&u&&i.labelIcon,h&&i.fullWidth,_&&i.wrapped),ref:r,role:"tab","aria-selected":x,disabled:o,onClick:E,onFocus:P,tabIndex:x?0:-1},C),y.createElement("span",{className:i.wrapper},u,p),d)});const os=Ye(Ete,{name:"MuiTab"})(Tte);var Jb={exports:{}},Ln={};var J1;function kte(){if(J1)return Ln;J1=1;var e=60103,t=60106,r=60107,i=60108,a=60114,s=60109,o=60110,l=60112,c=60113,h=60120,u=60115,d=60116,p=60121,f=60122,m=60117,g=60129,x=60131;if(typeof Symbol=="function"&&Symbol.for){var v=Symbol.for;e=v("react.element"),t=v("react.portal"),r=v("react.fragment"),i=v("react.strict_mode"),a=v("react.profiler"),s=v("react.provider"),o=v("react.context"),l=v("react.forward_ref"),c=v("react.suspense"),h=v("react.suspense_list"),u=v("react.memo"),d=v("react.lazy"),p=v("react.block"),f=v("react.server.block"),m=v("react.fundamental"),g=v("react.debug_trace_mode"),x=v("react.legacy_hidden")}function b(I){if(typeof I=="object"&&I!==null){var D=I.$$typeof;switch(D){case e:switch(I=I.type,I){case r:case a:case i:case c:case h:return I;default:switch(I=I&&I.$$typeof,I){case o:case l:case d:case u:case s:return I;default:return D}}case t:return D}}}var j=s,w=e,S=l,_=r,C=d,E=u,P=t,T=a,N=i,k=c;return Ln.ContextConsumer=o,Ln.ContextProvider=j,Ln.Element=w,Ln.ForwardRef=S,Ln.Fragment=_,Ln.Lazy=C,Ln.Memo=E,Ln.Portal=P,Ln.Profiler=T,Ln.StrictMode=N,Ln.Suspense=k,Ln.isAsyncMode=function(){return!1},Ln.isConcurrentMode=function(){return!1},Ln.isContextConsumer=function(I){return b(I)===o},Ln.isContextProvider=function(I){return b(I)===s},Ln.isElement=function(I){return typeof I=="object"&&I!==null&&I.$$typeof===e},Ln.isForwardRef=function(I){return b(I)===l},Ln.isFragment=function(I){return b(I)===r},Ln.isLazy=function(I){return b(I)===d},Ln.isMemo=function(I){return b(I)===u},Ln.isPortal=function(I){return b(I)===t},Ln.isProfiler=function(I){return b(I)===a},Ln.isStrictMode=function(I){return b(I)===i},Ln.isSuspense=function(I){return b(I)===c},Ln.isValidElementType=function(I){return typeof I=="string"||typeof I=="function"||I===r||I===a||I===g||I===i||I===c||I===h||I===x||typeof I=="object"&&I!==null&&(I.$$typeof===d||I.$$typeof===u||I.$$typeof===s||I.$$typeof===o||I.$$typeof===l||I.$$typeof===m||I.$$typeof===p||I[0]===f)},Ln.typeOf=b,Ln}var eE;function Pte(){return eE||(eE=1,Jb.exports=kte()),Jb.exports}Pte();var sl;function EA(){if(sl)return sl;var e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),sl="reverse",e.scrollLeft>0?sl="default":(e.scrollLeft=1,e.scrollLeft===0&&(sl="negative")),document.body.removeChild(e),sl}function tE(e,t){var r=e.scrollLeft;if(t!=="rtl")return r;var i=EA();switch(i){case"negative":return e.scrollWidth-e.clientWidth+r;case"reverse":return e.scrollWidth-e.clientWidth-r;default:return r}}function Ite(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function Dte(e,t,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:function(){},s=i.ease,o=s===void 0?Ite:s,l=i.duration,c=l===void 0?300:l,h=null,u=t[e],d=!1,p=function(){d=!0},f=function m(g){if(d){a(new Error("Animation cancelled"));return}h===null&&(h=g);var x=Math.min(1,(g-h)/c);if(t[e]=o(x)*(r-u)+u,x>=1){requestAnimationFrame(function(){a(null)});return}requestAnimationFrame(m)};return u===r?(a(new Error("Element already at target position")),p):(requestAnimationFrame(f),p)}var Rte={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Ote(e){var t=e.onChange,r=Be(e,["onChange"]),i=y.useRef(),a=y.useRef(null),s=function(){i.current=a.current.offsetHeight-a.current.clientHeight};return y.useEffect(function(){var o=La(function(){var l=i.current;s(),l!==i.current&&t(i.current)});return window.addEventListener("resize",o),function(){o.clear(),window.removeEventListener("resize",o)}},[t]),y.useEffect(function(){s(),t(i.current)},[t]),y.createElement("div",Z({style:Rte,ref:a},r))}var Ate=function(t){return{root:{position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},colorPrimary:{backgroundColor:t.palette.primary.main},colorSecondary:{backgroundColor:t.palette.secondary.main},vertical:{height:"100%",width:2,right:0}}},Mte=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.color,o=t.orientation,l=Be(t,["classes","className","color","orientation"]);
12return y.createElement("span",Z({className:$e(i.root,i["color".concat(ut(s))],a,o==="vertical"&&i.vertical),ref:r},l))});const $te=Ye(Ate,{name:"PrivateTabIndicator"})(Mte),Iw=ar(y.createElement("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"})),Dw=ar(y.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}));var Lte={root:{width:40,flexShrink:0,opacity:.8,"&$disabled":{opacity:0}},vertical:{width:"100%",height:40,"& svg":{transform:"rotate(90deg)"}},disabled:{}},Fte=y.createElement(Iw,{fontSize:"small"}),Ute=y.createElement(Dw,{fontSize:"small"}),Bte=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.direction,o=t.orientation,l=t.disabled,c=Be(t,["classes","className","direction","orientation","disabled"]);return y.createElement(ni,Z({component:"div",className:$e(i.root,a,l&&i.disabled,o==="vertical"&&i.vertical),ref:r,role:null,tabIndex:null},c),s==="left"?Fte:Ute)});const TA=Ye(Lte,{name:"MuiTabScrollButton"})(Bte);var qte=function(t){return{root:{overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},vertical:{flexDirection:"column"},flexContainer:{display:"flex"},flexContainerVertical:{flexDirection:"column"},centered:{justifyContent:"center"},scroller:{position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},fixed:{overflowX:"hidden",width:"100%"},scrollable:{overflowX:"scroll",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},scrollButtons:{},scrollButtonsDesktop:Ct({},t.breakpoints.down("xs"),{display:"none"}),indicator:{}}},Vte=y.forwardRef(function(t,r){var i=t["aria-label"],a=t["aria-labelledby"],s=t.action,o=t.centered,l=o===void 0?!1:o,c=t.children,h=t.classes,u=t.className,d=t.component,p=d===void 0?"div":d,f=t.indicatorColor,m=f===void 0?"secondary":f,g=t.onChange,x=t.orientation,v=x===void 0?"horizontal":x,b=t.ScrollButtonComponent,j=b===void 0?TA:b,w=t.scrollButtons,S=w===void 0?"auto":w,_=t.selectionFollowsFocus,C=t.TabIndicatorProps,E=C===void 0?{}:C,P=t.TabScrollButtonProps,T=t.textColor,N=T===void 0?"inherit":T,k=t.value,I=t.variant,D=I===void 0?"standard":I,O=Be(t,["aria-label","aria-labelledby","action","centered","children","classes","className","component","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant"]),$=Or(),U=D==="scrollable",B=$.direction==="rtl",L=v==="vertical",A=L?"scrollTop":"scrollLeft",R=L?"top":"left",F=L?"bottom":"right",q=L?"clientHeight":"clientWidth",V=L?"height":"width",X=y.useState(!1),M=X[0],W=X[1],K=y.useState({}),z=K[0],Y=K[1],ie=y.useState({start:!1,end:!1}),ne=ie[0],ve=ie[1],pe=y.useState({overflow:"hidden",marginBottom:null}),be=pe[0],ye=pe[1],ke=new Map,fe=y.useRef(null),se=y.useRef(null),ge=function(){var We=fe.current,pt;if(We){var Et=We.getBoundingClientRect();pt={clientWidth:We.clientWidth,scrollLeft:We.scrollLeft,scrollTop:We.scrollTop,scrollLeftNormalized:tE(We,$.direction),scrollWidth:We.scrollWidth,top:Et.top,bottom:Et.bottom,left:Et.left,right:Et.right}}var Ot;if(We&&k!==!1){var kt=se.current.children;if(kt.length>0){var Pt=kt[ke.get(k)];Ot=Pt?Pt.getBoundingClientRect():null}}return{tabsMeta:pt,tabMeta:Ot}},De=Un(function(){var tt,We=ge(),pt=We.tabsMeta,Et=We.tabMeta,Ot=0;if(Et&&pt)if(L)Ot=Et.top-pt.top+pt.scrollTop;else{var kt=B?pt.scrollLeftNormalized+pt.clientWidth-pt.scrollWidth:pt.scrollLeft;Ot=Et.left-pt.left+kt}var Pt=(tt={},Ct(tt,R,Ot),Ct(tt,V,Et?Et[V]:0),tt);if(isNaN(z[R])||isNaN(z[V]))Y(Pt);else{var Ut=Math.abs(z[R]-Pt[R]),Nn=Math.abs(z[V]-Pt[V]);(Ut>=1||Nn>=1)&&Y(Pt)}}),ae=function(We){Dte(A,fe.current,We)},Q=function(We){var pt=fe.current[A];L?pt+=We:(pt+=We*(B?-1:1),pt*=B&&EA()==="reverse"?-1:1),ae(pt)},ee=function(){Q(-fe.current[q])},oe=function(){Q(fe.current[q])},Pe=y.useCallback(function(tt){ye({overflow:null,marginBottom:-tt})},[]),Fe=function(){var We={};We.scrollbarSizeListener=U?y.createElement(Ote,{className:h.scrollable,onChange:Pe}):null;var pt=ne.start||ne.end,Et=U&&(S==="auto"&&pt||S==="desktop"||S==="on");return We.scrollButtonStart=Et?y.createElement(j,Z({orientation:v,direction:B?"right":"left",onClick:ee,disabled:!ne.start,className:$e(h.scrollButtons,S!=="on"&&h.scrollButtonsDesktop)},P)):null,We.scrollButtonEnd=Et?y.createElement(j,Z({orientation:v,direction:B?"left":"right",onClick:oe,disabled:!ne.end,className:$e(h.scrollButtons,S!=="on"&&h.scrollButtonsDesktop)},P)):null,We},Ie=Un(function(){var tt=ge(),We=tt.tabsMeta,pt=tt.tabMeta;
12if(!(!pt||!We)){if(pt[R]<We[R]){var Et=We[A]+(pt[R]-We[R]);ae(Et)}else if(pt[F]>We[F]){var Ot=We[A]+(pt[F]-We[F]);ae(Ot)}}}),Re=Un(function(){if(U&&S!=="off"){var tt=fe.current,We=tt.scrollTop,pt=tt.scrollHeight,Et=tt.clientHeight,Ot=tt.scrollWidth,kt=tt.clientWidth,Pt,Ut;if(L)Pt=We>1,Ut=We<pt-Et-1;else{var Nn=tE(fe.current,$.direction);Pt=B?Nn<Ot-kt-1:Nn>1,Ut=B?Nn>1:Nn<Ot-kt-1}(Pt!==ne.start||Ut!==ne.end)&&ve({start:Pt,end:Ut})}});y.useEffect(function(){var tt=La(function(){De(),Re()}),We=du(fe.current);return We.addEventListener("resize",tt),function(){tt.clear(),We.removeEventListener("resize",tt)}},[De,Re]);var Ve=y.useCallback(La(function(){Re()}));y.useEffect(function(){return function(){Ve.clear()}},[Ve]),y.useEffect(function(){W(!0)},[]),y.useEffect(function(){De(),Re()}),y.useEffect(function(){Ie()},[Ie,z]),y.useImperativeHandle(s,function(){return{updateIndicator:De,updateScrollButtons:Re}},[De,Re]);var Xe=y.createElement($te,Z({className:h.indicator,orientation:v,color:m},E,{style:Z({},z,E.style)})),et=0,rt=y.Children.map(c,function(tt){if(!y.isValidElement(tt))return null;var We=tt.props.value===void 0?et:tt.props.value;ke.set(We,et);var pt=We===k;return et+=1,y.cloneElement(tt,{fullWidth:D==="fullWidth",indicator:pt&&!M&&Xe,selected:pt,selectionFollowsFocus:_,onChange:g,textColor:N,value:We})}),bt=function(We){var pt=We.target,Et=pt.getAttribute("role");if(Et==="tab"){var Ot=null,kt=v!=="vertical"?"ArrowLeft":"ArrowUp",Pt=v!=="vertical"?"ArrowRight":"ArrowDown";switch(v!=="vertical"&&$.direction==="rtl"&&(kt="ArrowRight",Pt="ArrowLeft"),We.key){case kt:Ot=pt.previousElementSibling||se.current.lastChild;break;case Pt:Ot=pt.nextElementSibling||se.current.firstChild;break;case"Home":Ot=se.current.firstChild;break;case"End":Ot=se.current.lastChild;break}Ot!==null&&(Ot.focus(),We.preventDefault())}},Qe=Fe();return y.createElement(p,Z({className:$e(h.root,u,L&&h.vertical),ref:r},O),Qe.scrollButtonStart,Qe.scrollbarSizeListener,y.createElement("div",{className:$e(h.scroller,U?h.scrollable:h.fixed),style:be,ref:fe,onScroll:Ve},y.createElement("div",{"aria-label":i,"aria-labelledby":a,className:$e(h.flexContainer,L&&h.flexContainerVertical,l&&!U&&h.centered),onKeyDown:bt,ref:se,role:"tablist"},rt),M&&Xe),Qe.scrollButtonEnd)});const zf=Ye(qte,{name:"MuiTabs"})(Vte),Rw=e=>({indicator:{backgroundColor:"#2093c1",height:3}}),zte=()=>iw({overrides:{MuiPaper:{root:{border:"1px solid #d6d6d6",boxShadow:"0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.12),0 1px 5px 0 rgba(0, 0, 0, 0.2) !important",borderRadius:"2px !important",padding:"5px 15px"}},MuiButtonBase:{root:{boxShadow:"none !important",border:"none !important","&focus":{backgroundColor:"none"}}},MuiInputBase:{root:{border:"none !important"}}}});let Hte=class extends y.Component{constructor(){super(...arguments),this.state={value:0},this.handleChange=(t,r)=>{this.props.handleChoice(r),this.setState({value:r})}}componentDidMount(){this.props.value&&this.setState({value:this.props.value})}componentDidUpdate(t){this.props.value!==t.value&&this.setState({value:this.props.value})}render(){const{classes:t}=this.props;return n.jsx(n.Fragment,{children:n.jsxs(zf,{classes:{indicator:t.indicator},value:this.state.value,onChange:this.handleChange,color:"primary",className:"MuiTabs",style:{marginTop:"10px",borderRadius:"2px"},children:[n.jsx(os,{label:"Profile"}),this.props.showSecurity&&n.jsx(os,{label:"Security"}),this.props.showBilling&&n.jsx(os,{label:"Billing"})]})})}};const Gte=Ye(Rw)(Hte);var wc={},nE;function Wte(){if(nE)return wc;nE=1;var e=vn(),t=bn();Object.defineProperty(wc,"__esModule",{value:!0}),wc.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");return wc.default=a,wc}var Yte=Wte();const Kte=Zt(Yte);function rE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,i)}return r}function iE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
12t%2?rE(Object(r),!0).forEach(function(i){kA(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rE(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function wp(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?wp=function(t){return typeof t}:wp=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wp(e)}function kA(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sp(e,t){return Xte(e)||Qte(e,t)||Zte(e,t)||Jte()}function Xte(e){if(Array.isArray(e))return e}function Qte(e,t){var r=e&&(typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"]);if(r!=null){var i=[],a=!0,s=!1,o,l;try{for(r=r.call(e);!(a=(o=r.next()).done)&&(i.push(o.value),!(t&&i.length===t));a=!0);}catch(c){s=!0,l=c}finally{try{!a&&r.return!=null&&r.return()}finally{if(s)throw l}}return i}}function Zte(e,t){if(e){if(typeof e=="string")return aE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return aE(e,t)}}function aE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}function Jte(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
13In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Mx=function(t){var r=Me.useRef(t);return Me.useEffect(function(){r.current=t},[t]),r.current},Fl=function(t){return t!==null&&wp(t)==="object"},ene=function(t){return Fl(t)&&typeof t.then=="function"},tne=function(t){return Fl(t)&&typeof t.elements=="function"&&typeof t.createToken=="function"&&typeof t.createPaymentMethod=="function"&&typeof t.confirmCardPayment=="function"},sE="[object Object]",nne=function e(t,r){if(!Fl(t)||!Fl(r))return t===r;var i=Array.isArray(t),a=Array.isArray(r);if(i!==a)return!1;var s=Object.prototype.toString.call(t)===sE,o=Object.prototype.toString.call(r)===sE;if(s!==o)return!1;if(!s&&!i)return t===r;var l=Object.keys(t),c=Object.keys(r);if(l.length!==c.length)return!1;for(var h={},u=0;u<l.length;u+=1)h[l[u]]=!0;for(var d=0;d<c.length;d+=1)h[c[d]]=!0;var p=Object.keys(h);if(p.length!==l.length)return!1;var f=t,m=r,g=function(v){return e(f[v],m[v])};return p.every(g)},PA=function(t,r,i){return Fl(t)?Object.keys(t).reduce(function(a,s){var o=!Fl(r)||!nne(t[s],r[s]);return i.includes(s)||!o?a:iE(iE({},a||{}),{},kA({},s,t[s]))},null):null},rne="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",oE=function(t){if(t===null||tne(t))return t;throw new Error(rne)},ine=function(t){if(ene(t))return{tag:"async",stripePromise:Promise.resolve(t).then(oE)};var r=oE(t);return r===null?{tag:"empty"}:{tag:"sync",stripe:r}},Ow=Me.createContext(null);Ow.displayName="ElementsContext";var ane=function(t,r){if(!t)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(r," in an <Elements> provider."));return t},Aw=Me.createContext(null);Aw.displayName="CartElementContext";var sne=function(t,r){if(!t)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(r," in an <Elements> provider."));return t},IA=function(t){var r=t.stripe,i=t.options,a=t.children,s=Me.useMemo(function(){return ine(r)},[r]),o=Me.useState(null),l=Sp(o,2),c=l[0],h=l[1],u=Me.useState(null),d=Sp(u,2),p=d[0],f=d[1],m=Me.useState(function(){return{stripe:s.tag==="sync"?s.stripe:null,elements:s.tag==="sync"?s.stripe.elements(i):null}}),g=Sp(m,2),x=g[0],v=g[1];Me.useEffect(function(){var w=!0,S=function(C){v(function(E){return E.stripe?E:{stripe:C,elements:C.elements(i)}})};return s.tag==="async"&&!x.stripe?s.stripePromise.then(function(_){_&&w&&S(_)}):s.tag==="sync"&&!x.stripe&&S(s.stripe),function(){w=!1}},[s,x,i]);var b=Mx(r);Me.useEffect(function(){},[b,r]);var j=Mx(i);return Me.useEffect(function(){if(x.elements){var w=PA(i,j,["clientSecret","fonts"]);w&&x.elements.update(w)}},[i,j,x.elements]),Me.useEffect(function(){var w=x.stripe;!w||!w._registerWrapper||!w.registerAppInfo||(w._registerWrapper({name:"react-stripe-js",version:"1.16.5"}),w.registerAppInfo({name:"react-stripe-js",version:"1.16.5",url:"https://stripe.com/docs/stripe-js/react"}))},[x.stripe]),Me.createElement(Ow.Provider,{value:x},Me.createElement(Aw.Provider,{value:{cart:c,setCart:h,cartState:p,setCartState:f}},a))};IA.propTypes={stripe:Nt.any,options:Nt.object};var Yp=function(t){var r=Me.useContext(Ow);return ane(r,t)},lE=function(t){var r=Me.useContext(Aw);return sne(r,t)},one=function(){var t=Yp("calls useElements()"),r=t.elements;return r},lne=function(){var t=Yp("calls useStripe()"),r=t.stripe;return r};Nt.func.isRequired;var li=function(t,r,i){var a=!!i,s=Me.useRef(i);Me.useEffect(function(){s.current=i},[i]),Me.useEffect(function(){if(!a||!t)return function(){};var o=function(){s.current&&s.current.apply(s,arguments)};return t.on(r,o),function(){t.off(r,o)}},[a,r,t,s])},cne=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},Cr=function(t,r){var i="".concat(cne(t),"Element"),a=function(c){var h=c.id,u=c.className,d=c.options,p=d===void 0?{}:d,f=c.onBlur,m=c.onFocus,g=c.onReady,x=c.onChange,v=c.onEscape,b=c.onClick,j=c.onLoadError,w=c.onLoaderStart,S=c.onNetworksChange,_=c.onCheckout,C=c.onLineItemClick,E=c.onConfirm,P=c.onCancel,T=c.onShippingAddressChange,N=c.onShippingRateChange,k=Yp("mou
13nts <".concat(i,">")),I=k.elements,D=Me.useState(null),O=Sp(D,2),$=O[0],U=O[1],B=Me.useRef(null),L=Me.useRef(null),A=lE("mounts <".concat(i,">")),R=A.setCart,F=A.setCartState;li($,"blur",f),li($,"focus",m),li($,"escape",v),li($,"click",b),li($,"loaderror",j),li($,"loaderstart",w),li($,"networkschange",S),li($,"lineitemclick",C),li($,"confirm",E),li($,"cancel",P),li($,"shippingaddresschange",T),li($,"shippingratechange",N);var q;t==="cart"?q=function(K){F(K),g&&g(K)}:g&&(t==="payButton"?q=g:q=function(){g($)}),li($,"ready",q);var V=t==="cart"?function(W){F(W),x&&x(W)}:x;li($,"change",V);var X=t==="cart"?function(W){F(W),_&&_(W)}:_;li($,"checkout",X),Me.useLayoutEffect(function(){if(B.current===null&&I&&L.current!==null){var W=I.create(t,p);t==="cart"&&R&&R(W),B.current=W,U(W),W.mount(L.current)}},[I,p,R]);var M=Mx(p);return Me.useEffect(function(){if(B.current){var W=PA(p,M,["paymentRequest"]);W&&B.current.update(W)}},[p,M]),Me.useLayoutEffect(function(){return function(){B.current&&(B.current.destroy(),B.current=null)}},[]),Me.createElement("div",{id:h,className:u,ref:L})},s=function(c){Yp("mounts <".concat(i,">")),lE("mounts <".concat(i,">"));var h=c.id,u=c.className;return Me.createElement("div",{id:h,className:u})},o=r?s:a;return o.propTypes={id:Nt.string,className:Nt.string,onChange:Nt.func,onBlur:Nt.func,onFocus:Nt.func,onReady:Nt.func,onEscape:Nt.func,onClick:Nt.func,onLoadError:Nt.func,onLoaderStart:Nt.func,onNetworksChange:Nt.func,onCheckout:Nt.func,onLineItemClick:Nt.func,onConfirm:Nt.func,onCancel:Nt.func,onShippingAddressChange:Nt.func,onShippingRateChange:Nt.func,options:Nt.object},o.displayName=i,o.__elementType=t,o},Nr=typeof window>"u";Cr("auBankAccount",Nr);var cE=Cr("card",Nr);Cr("cardNumber",Nr);Cr("cardExpiry",Nr);Cr("cardCvc",Nr);Cr("fpxBank",Nr);Cr("iban",Nr);Cr("idealBank",Nr);Cr("p24Bank",Nr);Cr("epsBank",Nr);Cr("payment",Nr);Cr("payButton",Nr);Cr("paymentRequestButton",Nr);Cr("linkAuthentication",Nr);Cr("address",Nr);Cr("shippingAddress",Nr);Cr("cart",Nr);Cr("paymentMethodMessaging",Nr);Cr("affirmMessage",Nr);Cr("afterpayClearpayMessage",Nr);var DA="https://js.stripe.com/v3",dne=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;var une=function(){for(var t=document.querySelectorAll('script[src^="'.concat(DA,'"]')),r=0;r<t.length;r++){var i=t[r];if(dne.test(i.src))return i}return null},hne=function(t){var r="",i=document.createElement("script");i.src="".concat(DA).concat(r);var a=document.head||document.body;if(!a)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return a.appendChild(i),i},pne=function(t,r){!t||!t._registerWrapper||t._registerWrapper({name:"stripe-js",version:"1.54.2",startTime:r})},eh=null,fne=function(t){return eh!==null||(eh=new Promise(function(r,i){if(typeof window>"u"||typeof document>"u"){r(null);return}if(window.Stripe){r(window.Stripe);return}try{var a=une();a&&t||a||(a=hne(t)),a.addEventListener("load",function(){window.Stripe?r(window.Stripe):i(new Error("Stripe.js not available"))}),a.addEventListener("error",function(){i(new Error("Failed to load Stripe.js"))})}catch(s){i(s);return}})),eh},mne=function(t,r,i){if(t===null)return null;var a=t.apply(void 0,r);return pne(a,i),a},RA=Promise.resolve().then(function(){return fne(null)}),OA=!1;RA.catch(function(e){});var gne=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];OA=!0;var a=Date.now();return RA.then(function(s){return mne(s,r,a)})};const vne=e=>{const t=one(),r=lne(),[i,a]=y.useState(null),{setModal:s,company:o,isDirty:l,setDirty:c}=e,[h,u]=y.useState(!1),d=async g=>{if(!r||!t)return;const x=t.getElement(cE),{error:v,paymentMethod:b}=await r.createPaymentMethod({type:"card",card:x,billing_details:{name:g.name}});v||e.updateCompanyPaymentMethod(o.id,b.id)},p=()=>{s(!1)},f={style:{base:{iconColor:"#7b7b7b",color:"#000",fontWeight:400,fontFamily:"Myriad Pro, Roboto, Open Sans, sans-serif",fontSize:"16px",fontSmoothing:"antialiased",lineHeight:"2",":-webkit-autofill":{color:"#fce883"},"::placeholder":{color:"#9d9d9d"}},invalid:{iconColor:"#ff3440",color:"#ff3440"}}},m=({children:g})=>n.jsxs("div",{className:"ErrorMessage",role:"alert",children:[n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 17 17",children:[n.jsx("path",{fill:"#ff3440",d:"M8.5,17 C3.80557963,17 0,13.1944204 0,8.5 C0,3.80557963 3.80557963,0 8.5,0 C13.1944204,0 17,3.80557963 17,8.5 C17,13.1944204 13.1944204,17 8.5,
1317 Z"}),n.jsx("path",{fill:"#fff",d:"M8.5,7.29791847 L6.12604076,4.92395924 C5.79409512,4.59201359 5.25590488,4.59201359 4.92395924,4.92395924 C4.59201359,5.25590488 4.59201359,5.79409512 4.92395924,6.12604076 L7.29791847,8.5 L4.92395924,10.8739592 C4.59201359,11.2059049 4.59201359,11.7440951 4.92395924,12.0760408 C5.25590488,12.4079864 5.79409512,12.4079864 6.12604076,12.0760408 L8.5,9.70208153 L10.8739592,12.0760408 C11.2059049,12.4079864 11.7440951,12.4079864 12.0760408,12.0760408 C12.4079864,11.7440951 12.4079864,11.2059049 12.0760408,10.8739592 L9.70208153,8.5 L12.0760408,6.12604076 C12.4079864,5.79409512 12.4079864,5.25590488 12.0760408,4.92395924 C11.7440951,4.59201359 11.2059049,4.59201359 10.8739592,4.92395924 L8.5,7.29791847 L8.5,7.29791847 Z"})]}),g]});return n.jsx(ot,{setModal:s,disableClickOutsideCancel:!0,children:n.jsx("div",{className:"billing-credit-card-modal-container",children:n.jsx(gt,{initialValues:{name:""},onSubmit:(g,{setSubmitting:x})=>{h&&d(g).then(()=>{e.getUser()}).then(()=>{x(!1),s(!1)})},validationSchema:_t().shape({name:Ae()}),enableReinitialize:!0,children:g=>{const{errors:x,dirty:v,isSubmitting:b,handleSubmit:j}=g;return v!==l&&c(v),n.jsxs(vt,{children:[n.jsx("h5",{children:"Add a new credit card"}),n.jsxs("div",{className:"form-group",children:[n.jsx("label",{children:"Full Name"}),n.jsx(me,{id:"name",name:"name",placeholder:"Full Name"})]}),n.jsx(cE,{options:f,onChange:w=>{a(w.error),u(w.complete)}}),i&&n.jsx(m,{children:i.message}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{className:"btn-cancel","diagnostic-id":"billing-payment-cancel-btn",onClick:p,disabled:b,children:"Cancel"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"billing-payment-update-btn",onClick:j,disabled:!h||!v||!!Object.keys(x).length||b,children:"UPDATE"})]})]})}})})})},bne=e=>({company:e.auth.user.company}),yne=zt(vne),xne=le(bne,{updateCompanyPaymentMethod:Aee,getUser:Ba})(yne),jne=gne(Tn.stripePublicKey),wne=e=>{const{company:t}=e,[r,i]=y.useState(!1),a=t.billing_last4?t.billing_last4:"XXXX",s=t.billing_expiration_month?t.billing_expiration_month:"XX",o=t.billing_expiration_year?t.billing_expiration_year:"XXXX";return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"user-profile",id:"user-billing",children:[n.jsx("h4",{children:"Payment Method"}),t.billing_last4?n.jsx("div",{className:"billing-payment-method",children:n.jsxs("div",{className:"billing-credit-card-update",children:[n.jsx("i",{className:"material-icons",children:"credit_card"}),n.jsxs("div",{className:"billing-credit-card-details",children:[n.jsxs("span",{id:"credit-card-last-four",children:["Card ending in ",a]}),n.jsxs("span",{id:"credit-card-expiration-date",children:["Expires ",s,"/",o]})]}),n.jsx(Ze,{to:"#",className:"btn-primary-text",onClick:()=>i(!0),children:"UPDATE PAYMENT METHOD"})]})}):n.jsx("div",{className:"billing-credit-card-add",children:n.jsxs("button",{type:"submit",className:"btn-primary-lg","diagnostic-id":"reset-send-btn",onClick:()=>i(!0),children:[n.jsx(Kte,{})," ADD A CREDIT CARD"]})})]}),n.jsx(IA,{stripe:jne,children:r&&n.jsx(xne,{setModal:i})})]})},Sne=e=>({user:e.auth.user,company:e.auth.user.company}),_ne=le(Sne,{})(wne);var _p={exports:{}},Cne=_p.exports,dE;function Nne(){return dE||(dE=1,(function(e,t){(function(r,i){e.exports=i()})(Cne,(function(){var r={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(i,a,s){var o=a.prototype,l=o.format;s.en.formats=r,o.format=function(c){c===void 0&&(c="YYYY-MM-DDTHH:mm:ssZ");var h=this.$locale().formats,u=(function(d,p){return d.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(f,m,g){var x=g&&g.toUpperCase();return m||p[g]||r[g]||p[x].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(v,b,j){return b||j.slice(1)}))}))})(c,h===void 0?{}:h);return l.call(this,u)}}}))})(_p)),_p.exports}var Ene=Nne();const AA=Zt(Ene);var Cp={exports:{}},Tne=Cp.exports,uE;function kne(){return uE||(uE=1,(function(e,t){(function(r,i){e.exports=i()})(Tne,(function(){return function(r,i,a){r=r||{};var s=i.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function l(h,u,d,p){return s.fromToBase(h,u,d,p)}a.en.relativeTime=o,s.fromToBase=function(h,u,d,p,f){for(var m,g,x,v=d.$locale().relativeTime||o,b=r.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],j=b.length,w=0;w<j;w+=1){var S=b[w];S.d&&(m=p?a(h).diff(d,S.d,!0):d.diff(h,S.d,!0));var _=(r.rounding||Math.round)(Math.abs(m));if(x=m>0,_<=S.r||!S.r){_<=1&&w>0&&(S=b[w-1]);var C=v[S.l];f&&(_=f(""+_)),g=typeof C=="string"?C.replace("%d",_):C(_,u,S.l,x);break}}if(u)return g;var E=x?v.future:v.past;return typeof E=="function"?E(g):E.replace("%s",g)}
13,s.to=function(h,u){return l(h,u,this,!0)},s.from=function(h,u){return l(h,u,this)};var c=function(h){return h.$u?a.utc():a()};s.toNow=function(h){return this.to(c(this),h)},s.fromNow=function(h){return this.from(c(this),h)}}}))})(Cp)),Cp.exports}var Pne=kne();const MA=Zt(Pne);Qt.extend(MA);Qt.extend(AA);const gn=({children:e,date:t,format:r="YYYY-MM-DD",fromNow:i=!1,local:a=!1})=>{const o=Qt(t??e);return o.isValid()?i?n.jsx(n.Fragment,{children:o.fromNow()}):n.jsx(n.Fragment,{children:o.format(r)}):n.jsx(n.Fragment,{children:"Invalid date"})};function Ine(e){const{isDirty:t,setDirty:r}=e;return n.jsx(gt,{initialValues:{firstName:e.auth.user.first_name,lastName:e.auth.user.last_name,professionalCredentials:e.auth.user.professional_credentials||"",companyName:e.auth.user.company.name,corporateTitle:e.auth.user.corporate_title||""},onSubmit:(i,{setSubmitting:a})=>{e.updateUserProfile(e.auth.user.id,i.professionalCredentials,i.corporateTitle),a(!1)},validationSchema:_t().shape({professionalCredentials:Ae(),corporateTitle:Ae()}),enableReinitialize:!0,children:i=>{const{touched:a,errors:s,dirty:o,isSubmitting:l,handleReset:c}=i;return o!==t&&r(o),n.jsxs(vt,{children:[n.jsxs("div",{className:"form-group",children:[n.jsx("label",{children:"First Name"}),n.jsx(me,{id:"firstName",name:"firstName",placeholder:"First Name",disabled:!0})]}),n.jsxs("div",{className:"form-group",children:[n.jsx("label",{children:"Job Title"}),n.jsx(me,{id:"corporateTitle","diagnostic-id":"corporateTitle",name:"corporateTitle",placeholder:"Job Title",maxLength:"50",className:s.corporateTitle&&a.corporateTitle?"text-input error":"form-control"})]}),n.jsxs("div",{className:"form-group",children:[n.jsx("label",{children:"Last Name"}),n.jsx(me,{id:"lastName",name:"lastName",placeholder:"Last Name",disabled:!0})]}),n.jsxs("div",{className:"form-group",children:[n.jsx("label",{children:"Certifications/Credentials (e.g. CFP, CFA, CPA, etc.)"}),n.jsx(me,{id:"professionalCredentials","diagnostic-id":"professionalCredentials",name:"professionalCredentials",placeholder:"Certifications/Credentials",maxLength:"50",className:s.professionalCredentials&&a.professionalCredentials?"text-input error":"form-control"})]}),n.jsxs("div",{className:"form-group",children:[n.jsx("label",{children:"Company"}),n.jsx(me,{id:"companyName",name:"companyName",placeholder:"Company Name",disabled:!0})]}),n.jsxs("div",{className:"buttons-group",style:{textAlign:"right",padding:"20px"},children:[n.jsx("button",{type:"reset",className:"btn-cancel","diagnostic-id":"profile-cancel-btn",onClick:c,disabled:!o||l,children:"Reset"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"profile-update-btn",disabled:!o||!!Object.keys(s).length||l,children:"UPDATE"})]})]})}})}const Dne=zt(Ine);function Rne(e){const{email:t,create_datetime:r}=e.auth.user;return n.jsxs("div",{className:"user-profile",children:[n.jsxs("div",{className:"profile-header",children:[n.jsxs("div",{className:"profile-title",children:[n.jsxs("h5",{children:["Logged in as ",t]}),n.jsxs("p",{style:{fontStyle:"italic"},children:[n.jsx("span",{children:"Customer since "}),n.jsx(gn,{local:!0,format:"MMMM YYYY",children:r})]})]}),n.jsxs("div",{className:"contact-us",children:[n.jsx("p",{children:"Have a billing or account question?"}),n.jsx("button",{className:"btn-primary",onClick:()=>window.Intercom("show"),children:"Contact Us"})]})]}),n.jsx("div",{className:"row",children:n.jsxs("div",{className:"col s12 m12 l12 acct-profile-wrapper profile",id:"acct-profile-left",children:[n.jsx("h4",{children:"Your Profile"}),n.jsx(Dne,{...e})]})})]})}const One=e=>({auth:e.auth}),Ane=le(One,{updateUserProfile:Pee})(Rne);function Mne(e){const{modal:t,setModal:r,user:i,isTotpEnabled:a,isOtpEnabled:s,selectedStep:o,setSelectedStep:l,configureOtp:c,setupTotp:h,configureTotp:u,setupOtp:d,requestOtpCode:p,configureAction:f,formAction:m,authMethod:g,showSpinner:x,onlyOtp:v,onlyTotp:b,createMessage:j}=e,{EmailOtp:w,Totp:S,Password:_}=mj,{RemoveOtp:C,AddOtp:E,AddTotp:P,EditTotp:T,RemoveTotp:N}=yD,[k,I]=y.useState(g),[D,O]=y.useState(""),[$,U]=y.useState(""),[B,L]=y.useState(!1),[A,R]=y.useState(!1),F=y.useRef(null);y.useEffect(()=>{k===w&&p(i.id)},[]);const q=()=>{L(!0),p(i.id).then(W=>{I(w)}),setTimeout(()=>{L(!1)},5e3)};_t().shape({verifyCode:Ae(),authAppCode:Ae(),otpMethodCode:Ae()});const V=(W,K,z,Y,ie)=>n.jsxs(n.Fragment,{children:[n.jsxs("p",{children:["Logged in as ",n.jsx("span",{className:"logged-in-as-email",children:i.email})]}),k===S?n.jsx("h5",{"diagnostic-id":"two-factor-verify-header",children:"Verify the code from your authenticator app"}):k===w?n.jsx("h5",{"diagnostic-id":"two-factor-verify-header",children:"Verify your one-time passcode"}):k===_?n.jsxs(n.Fragment,{children:[n.jsx("h5",{"diagnostic-id":"two-factor-verify-header",children:"Confirm your password"}),n.jsx("p",{children:"Please enter your password to verify your identity."})]}):n.jsx(n.Fragment,{}),n.jsx(me,{innerRef:F,type:k===_?"password":"text",autoFocus:!0,autoComplete:"off",id:"verifyCode",name:"verifyCode","diagnostic-id":"email-verify-code-input",placeholder:k===_?"Enter your password...":"XXXXXX",className:W.verifyCode&&K.verifyCode?"text-input-error":"form-control"}),W.verifyCode&&K.verifyCode&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:W.verifyCode}
13),k===w&&n.jsxs("div",{className:"resend-code-btn-container",children:[n.jsx("div",{children:"This code will expire in a few minutes"}),B?n.jsx("div",{className:"code-sent-text",children:n.jsxs("div",{className:"btn-primary-text btn-icon-text","diagnostic-id":"code-sent-text",children:[n.jsx("i",{className:"material-icons",children:"done"}),"Code Sent"]})}):n.jsx("div",{className:"resend-code-btn",children:n.jsxs("button",{type:"button","diagnostic-id":"resend-code-btn",className:"btn-primary-text btn-icon-text",onClick:q,disabled:B,children:[n.jsx("i",{className:"material-icons",children:"replay"}),"Resend Code"]})})]}),k===w&&n.jsx("p",{className:"verify-identity-email-msg",children:"An email was sent with a passcode to verify your identity."}),(m===C||m===N)&&n.jsxs("div",{className:"remove-otp-warning-message",children:[n.jsx("i",{className:"material-icons",children:"info"}),n.jsx("div",{className:"banner-text",children:m===C?"After verifying, one-time passcode authentication will be removed.":m===N?"After verifying, your current authenticator app configurations will be removed.":n.jsx(n.Fragment,{})})]}),n.jsx("button",{type:"submit",className:"btn btn-primary verify-code-btn","diagnostic-id":"modal-primary-btn",disabled:!z.verifyCode||ie,children:"VERIFY"}),a&&s?v||b?n.jsx(n.Fragment,{}):n.jsx(n.Fragment,{children:k===S?n.jsx("div",{className:"alternate-method-msg-wrapper",children:n.jsx("button",{type:"button","diagnostic-id":"alternate-method-btn",className:"btn-primary-text alternate-method-msg",disabled:B,onClick:()=>{q(),I(w),F.current?.focus()},children:"Enter one-time passcode from your email"})}):k===w?n.jsx("div",{className:"alternate-method-msg-wrapper",children:n.jsx("button",{type:"button","diagnostic-id":"alternate-method-btn",className:"btn-primary-text alternate-method-msg",disabled:B,onClick:()=>{I(S),F.current?.focus()},children:B?n.jsxs(n.Fragment,{children:[n.jsx("i",{className:"material-icons",children:"done"}),"One-time passcode sent"]}):"Use Authenticator App to verify"})}):n.jsx(n.Fragment,{})}):n.jsx(n.Fragment,{}),n.jsxs("div",{className:"contact-us-msg",children:["Having problems?"," ",n.jsx("span",{onClick:()=>{window.Intercom("show")},children:"Contact us."})]})]}),X=(W,K,z,Y)=>n.jsxs(n.Fragment,{children:[n.jsxs("p",{children:["Logged in as ",n.jsx("span",{className:"logged-in-as-email",children:i.email})]}),n.jsx("h5",{"diagnostic-id":"verify-otp-header",children:"Verify your one-time passcode"}),n.jsx(me,{type:"text",autoFocus:!0,autoComplete:"off",id:"otpMethodCode",name:"otpMethodCode","diagnostic-id":"setup-code-input",placeholder:"XXXXXX",className:W.otpMethodCode&&K.otpMethodCode?"text-input-error":"form-control"}),W.otpMethodCode&&K.otpMethodCode&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:W.otpMethodCode}),n.jsxs("div",{className:"resend-code-btn-container",children:[n.jsx("div",{children:"This code will expire in a few minutes"}),B?n.jsx("div",{className:"code-sent-text",children:n.jsxs("div",{className:"btn-primary-text btn-icon-text","diagnostic-id":"code-sent-text",children:[n.jsx("i",{className:"material-icons",children:"done"}),"Code Sent"]})}):n.jsx("div",{className:"resend-code-btn",children:n.jsxs("button",{type:"button","diagnostic-id":"resend-code-btn",className:"btn-primary-text btn-icon-text",onClick:q,disabled:B,children:[n.jsx("i",{className:"material-icons",children:"replay"}),"Resend Code"]})})]}),n.jsx("p",{children:"An email was sent with a passcode to verify your identity."}),n.jsx("button",{type:"submit",className:"btn btn-primary verify-code-btn","diagnostic-id":"modal-primary-btn",disabled:!z.otpMethodCode||Y,children:"VERIFY"}),n.jsxs("div",{className:"contact-us-msg",children:["Having problems?"," ",n.jsx("span",{onClick:()=>{window.Intercom("show")},children:"Contact us."})]})]}),M=(W,K,z,Y)=>n.jsxs(n.Fragment,{children:[n.jsx("h5",{className:"two-factor-setup-header",children:"Manage Two-Factor Authentication"}),n.jsx("h5",{className:"add-device-header",children:"Add a device"}),n.jsxs("div",{className:"row",children:[n.jsx("div",{className:"col s12 m12 l6",children:n.jsxs("div",{className:"auth-app-qr-code-input-container",children:[n.jsx(kw,{value:D}),n.jsxs("div",{className:"setup-key-message",children:["Unable to scan? You can use the",n.jsx(Ke,{title:n.jsxs("div",{className:"two-factor-key",children:[n.jsx("div",{children:"Your two-factor key:"}),n.jsxs("div",{id:"auth-key-grp",children:[n.jsx("div",{id:"auth-key",children:$}),n.jsx("i",{className:"material-icons",onClick:()=>(j({alertMessage:"Setup key has been copied to clipboard"}),R(!0),setTimeout(()=>{R(!1)},3e3),Hl("auth-key")),children:A?"check":"content_copy"})]})]}),placement:"bottom",classes:{popper:"setup-key-tooltip"},interactive:!0,enterTouchDelay:0,leaveTouchDelay:5e3,children:n.jsx("span",{className:"setup-key",id:"setup-key",children:"setup key"})})," ","to manually configure your authenticator app."]}),n.jsx("h6",{children:"Verify the code from the app"}),n.jsx(me,{type:"text",autoFocus:!0,autoComplete:"off",id:"authAppCode",name:"authAppCode","diagnostic-id":"auth-app-code-input",placeholder:"XXXXXX",className:W.authAppCode&&K.authAppCode?"text-input-error":"form-control"}),W.authAppCode&&K.authAppCode&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:W.authAppCode})]})}),n.jsxs("div",{className:"col s12 m12 l6",children:[n.jsx("p",{className:"two-factor-message",children:a?"After saving you will not be able to use outdated authenticator configurations to verify.":"Take these steps to enable two-factor authentication and make your account more secure."}),n.jsx("div",{className:"two-factor-instructions-wrapper",children:n.jsxs("ol",{className:"two-factor-instructions-list",children:[!a&&n.jsx("li",{children:"Install an authenticator app on your mobile device. Recommended options: Google Authenticator, Authy, Microsoft Authenticator."}),n.jsx("li",{children:"Scan QR code with the authenticator app (or enter the key manually)."}),n.jsx("li",{children:"Enter the 2-step authentication code provided by your app."})]})})]})]}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"cancel-btn",onClick:()=>r(!1),children:"Cancel"}),n.jsx("button",{className:"btn btn-primary","diagnostic-id":"verify-auth-app-code-btn",disabled:!z.authAppCode||Y,type:"submit",children:"Save"})]})]});return n.jsx(gt,{initialValues:{verifyCode:"",authAppCode:"",otpMethodCode:""},onSubmit:(W,{setFieldError:K,setSubmitting:z})=>{o==="verify-identity-step"?f(i.id,W.verifyCode,k,m===C||m===E?!s:m===P||m===N?!a:m===T?a:null).then(Y=>{Y&&(m===E?l("otp-method-verified"):m===P||m===T?(O(Y.data.auth_uri),U(Y.data.auth_key),l("auth-app-verified")):(m===C||m===N)&&r(!1))}).catch(Y=>{K("verifyCode",k===_?"Incorrect password. Please try again.":`Invalid authentication code. Please try again ${k===w?"or request another code.":"with another code from your authenticator app."}`)}).finally(()=>{z(!1)}):o==="auth-app-verified"?h(i.id,W.authAppCode).then(Y=>{Y?r(!1):K("authAppCode","Invalid authentication code. Please try again with another code from your authenticator app."),z(!1)}):o==="otp-method-verified"&&d(i.id,W.otpMethodCode).then(Y=>{Y?r(!1):K("otpMethodCode","Invalid authentication code. Please try again or request another code."),z(!1)})},enableReinitialize:!0,children:W=>{const{values:K,touched:z,errors:Y,setFieldError:ie,setFieldValue:ne,dirty:ve,isSubmitting:pe}=W;return n.jsx(n.Fragment,{children:n.jsx(ot,{setModal:r,disableClickOutsideCancel:!0,
13children:n.jsxs("div",{className:`auth-app-verify-setup-modal-container ${o}`,children:[n.jsx("i",{className:"material-icons",onClick:()=>r(!1),children:"close"}),n.jsxs(vt,{onClick:be=>be.stopPropagation(),children:[o==="verify-identity-step"&&V(Y,z,K,ie,pe),o==="auth-app-verified"&&M(Y,z,K,pe),o==="otp-method-verified"&&X(Y,z,K,pe)]})]})})})}})}const $ne=e=>({user:e.auth.user,showSpinner:e.auth&&e.auth.showSpinner}),Lne=le($ne,{configureOtp:bD,setupTotp:b4,configureTotp:vD,setupOtp:v4,requestOtpCode:g4,createMessage:he})(Mne);function Fne(e){const{configureOtp:t,configureTotp:r}=e,{is_authenticator_totp_enabled:i,is_email_otp_enabled:a,two_factor_auth_permissions:s,last_used_two_factor_auth:o}=e.auth.user,{EmailOtp:l,Totp:c,Password:h}=mj,{RemoveOtp:u,AddOtp:d,AddTotp:p,EditTotp:f,RemoveTotp:m}=yD,{allow_otp:g,allow_totp:x,name:v,require_two_factor_auth:b}=s,[j,w]=y.useState(!1),[S,_]=y.useState(""),[C,E]=y.useState(""),P=x&&!g,T=!x&&g,N=x&&g,k=a,I=i,D=(A,R)=>{A.preventDefault();const F=A.currentTarget.id;w(!0),_(F),E(R)};let O=!1,$=!1,U=h;b?N?k&&I?(O=!1,$=!0,U=o):k&&!I?(O=!0,$=!1,U=l):!k&&I&&(O=!1,$=!1,U=c):T?k?(O=!0,U=l):I&&(U=c):P&&(I?($=!1,U=c):k&&(U=l)):(k&&I?U=o:k&&!I?U=l:!k&&I&&(U=c),I&&($=!0));const B=n.jsxs("div",{className:"two-factor-auth-toggle-container","diagnostic-id":"email-otp-toggle-container",children:[n.jsxs("div",{className:"two-factor-auth-message-wrapper",children:[n.jsxs("p",{className:"two-factor-auth-message-header",children:["One-Time Passcode",k&&n.jsxs("span",{className:"auth-app-status btn-icon-text","diagnostic-id":"otp-status",children:[n.jsx("i",{className:"material-icons",children:"check"}),"Activated"]})]}),n.jsx("p",{className:"two-factor-auth-description",children:"Get one-time passcodes sent to your email to complete verification requests."})]}),n.jsx("div",{className:"auth-buttons",children:n.jsx("button",{className:`btn btn-primary${k?" remove-btn":" add-btn"}`,"diagnostic-id":"otp-auth-btn",onClick:A=>D(A,k?u:d),disabled:O,id:"verify-identity-step",children:k?"Remove":"Add"})})]}),L=n.jsxs("div",{className:"two-factor-auth-toggle-container","diagnostic-id":"auth-app-toggle-container",children:[n.jsxs("div",{className:"two-factor-auth-message-wrapper",children:[n.jsxs("p",{className:"two-factor-auth-message-header",children:["Authenticator App",I&&n.jsxs("span",{className:"auth-app-status btn-icon-text","diagnostic-id":"totp-status",children:[n.jsx("i",{className:"material-icons",children:"check"}),"Activated"]})]}),n.jsx("p",{className:"two-factor-auth-description",children:"Use a mobile authenticator app or browser extension to generate two-factor authentication codes."})]}),n.jsxs("div",{className:"auth-buttons auth-app",children:[n.jsx("button",{className:`btn btn-primary${I?" edit-btn":" add-btn"}`,"diagnostic-id":"authenticator-app-btn",onClick:A=>D(A,I?f:p),id:"verify-identity-step",children:I?"Reset":"Add"}),$&&n.jsx("button",{className:"btn btn-primary remove-btn","diagnostic-id":"authenticator-app-remove-btn",onClick:A=>D(A,m),id:"verify-identity-step",children:"Remove"})]})]});return n.jsxs(n.Fragment,{children:[T?O?n.jsx(Ke,{placement:"top",title:"At least one method of two-factor authentication is required by your organization.",children:B}):B:n.jsx(n.Fragment,{}),P&&L,N&&n.jsxs(n.Fragment,{children:[O?n.jsx(Ke,{placement:"top",title:"At least one method of two-factor authentication is required by your organization.",children:B}):B,L]}),j&&n.jsx(Lne,{modal:j,setModal:w,isTotpEnabled:I,isOtpEnabled:k,selectedStep:S,setSelectedStep:_,authMethod:U,configureAction:C===u||C===d?t:C===p||C===f||C===m?r:null,formAction:C,onlyOtp:T,onlyTotp:P})]})}const Une=e=>({auth:e.auth}),Bne=le(Une,{configureOtp:bD,configureTotp:vD})(Fne);function qne(e){return n.jsx(gt,{initialValues:{currentPassword:"",newPassword:"",confirmPassword:""},onSubmit:(t,{setSubmitting:r,resetForm:i})=>{e.updateUserPassword(e.auth.user.id,t.currentPassword,t.newPassword).then(()=>{i()},()=>r(!1))},validationSchema:_t().shape({currentPassword:Ae().required("Please enter your current password"),newPassword:Ae().required("Please enter your new password").min(8,"New password must be at least 8 characters").test("differentPassword","New password must be different",function(t){return t!==this.parent.currentPassword}),confirmPassword:Ae().required("").test("passwords-match","Passwords must match",function(t){return this.parent.newPassword===t})}),children:t=>{const{touched:r,errors:i,dirty:a,isSubmitting:s,handleReset:o}=t;return n.jsxs(vt,{children:[n.jsxs("div",{className:"form-group",children:[n.jsx("label",{children:"Current Password"}),n.jsx(me,{id:"currentPassword","diagnostic-id":"pw-current-input",n
13ame:"currentPassword",type:"password",maxLength:"100",className:i.currentPassword&&r.currentPassword?"text-input error":"form-control"}),i.currentPassword&&r.currentPassword&&n.jsx("div",{className:"input-feedback",children:i.currentPassword})]}),n.jsxs("div",{className:"form-group",children:[n.jsx("label",{children:"New Password"}),n.jsx(me,{id:"newPassword","diagnostic-id":"pw-new-input",name:"newPassword",type:"password",maxLength:"100",className:i.newPassword&&r.newPassword?"text-input error":"form-control"}),i.newPassword&&r.newPassword&&n.jsx("div",{className:"input-feedback",children:i.newPassword})]}),n.jsxs("div",{className:"form-group",children:[n.jsx("label",{children:"Confirm New Password"}),n.jsx(me,{id:"confirmPassword","diagnostic-id":"pw-confirm-input",name:"confirmPassword",type:"password",maxLength:"100",className:i.confirmPassword&&r.confirmPassword?"text-input error":"form-control"}),i.confirmPassword&&r.confirmPassword&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:i.confirmPassword})]}),n.jsxs("div",{className:"form-group",style:{textAlign:"right",padding:"20px"},children:[n.jsx("button",{type:"button",className:"btn-cancel",onClick:o,disabled:!a||s,children:"CANCEL"}),n.jsx("button",{type:"submit",className:"btn btn-primary",disabled:!a||!!Object.keys(i).length||s,children:"UPDATE"})]})]})}})}function Vne(e){const{email:t,create_datetime:r,two_factor_auth_permissions:i}=e.auth.user;return n.jsxs("div",{className:"user-profile",children:[n.jsxs("div",{className:"profile-header",children:[n.jsxs("div",{className:"profile-title",children:[n.jsxs("h5",{children:["Logged in as ",t]}),n.jsxs("p",{style:{fontStyle:"italic"},children:[n.jsx("span",{children:"Customer since "}),n.jsx(gn,{local:!0,format:"MMMM YYYY",children:r})]})]}),n.jsxs("div",{className:"contact-us",children:[n.jsx("p",{children:"Have a billing or account question?"}),n.jsx("button",{className:"btn-primary",onClick:()=>window.Intercom("show"),children:"Contact Us"})]})]}),n.jsxs("div",{className:"row",children:[n.jsxs("div",{className:"col s12 m12 l6 acct-profile-wrapper password",id:"acct-profile-left",children:[n.jsx("h4",{children:"Change Password"}),n.jsx(qne,{...e})]}),(i.allow_otp||i.allow_totp)&&n.jsxs("div",{className:"col s12 m12 l6 acct-profile-wrapper account-two-factor-auth",id:"acct-profile-right",children:[n.jsx("h4",{children:"Two-Factor Authentication"}),n.jsx("p",{className:"two-factor-message",children:"Two-Factor authentication adds an additional layer of security to your account by requiring more than just a password to sign in."}),n.jsx(Bne,{...e})]})]})]})}const zne=e=>({auth:e.auth}),Hne=le(zne,{updateUserPassword:Iee})(Vne),th={account:0,security:1,billing:2};let Gne=class extends y.Component{constructor(){super(...arguments),this.state={menuChoice:0,menuChoiceName:"account"},this.showBilling=this.props.auth&&this.props.auth.user&&this.props.auth.user.company&&this.props.auth.user.company.billing_type==="Automated"&&this.props.auth.user.company.billing_system==="Stripe"&&this.props.auth.user.company.billing_system_user_id&&this.props.auth.user.is_billing_contact,this.showSecurity=this.props.auth&&this.props.auth.user.provider&&this.props.auth.user.provider.name==="clearnomics-password"&&this.props.auth.user.provider.type==="password",this.getMenuChoice=t=>{this.setState({menuChoice:t})}}componentDidMount(){this.props.getUser();const t=Ni.parse(this.props.location.search),r=t.view&&Object.keys(th).includes(t.view)&&this.showBilling||t.view==="security"&&this.showSecurity;t.view&&!r&&this.props.history.push("/account");const i=th[t.view];r&&this.setState({menuChoice:i,menuChoiceName:t.view})}componentDidUpdate(t,r){if(this.state.menuChoice!==r.menuChoice){const i=Object.keys(th).find(a=>th[a]===this.state.menuChoice);this.setState({menuChoiceName:i}),this.props.history.push(`/account${i!=="account"?`?view=${i}`:""}`)}}render(){const t=this.props.auth,{isAuthenticated:r}=t;return r?n.jsxs("div",{className:"container",children:[n.jsx("h2",{className:"canvas-header",children:"Account"}),n.jsx("div",{className:"row",children:n.jsx(Gte,{handleChoice:this.getMenuChoice,showBilling:this.showBilling,showSecurity:this.showSecurity,value:this.state.menuChoice})}),n.jsx("div",{className:"row fadeTransition",style:{display:this.state.menuChoice===0?"block":"none"},children:n.jsx(Ane,{})}),this.showSecurity&&n.jsx("div",{className:"row fadeTransition",style:{display:this.state.menuChoice===1?"block":"none"},children:n.jsx(Hne,{})}),this.showBilling&&n.jsx("div",{className:"row fadeTransition",style:{display:this.state.menuChoice===2?"block":"none"},children:n.jsx(_ne,{})})]}):null}};const Wne=e=>({auth:e.auth}),Yne=le(Wne,{getUser:Ba})(Gne);class Kne extends y.Component{constructor(){super(...arguments),this.state={value:0},this.handleChange=(t,r)=>{this.props.handleChoice(r),this.setState({value:r})}}render(){const{classes:t}=this.props;return n.jsx(n.Fragment,{children:n.jsxs(zf,{classes:{indicator:t.indicator},value:this.props.value||this.state.value,onChange:this.handleChange,color:"primary",className:"MuiTabs",variant:"scrollable",scrollButtons:"auto",style:{marginTop:"10px",borderRadius:"2px"},children:[n.jsx(os,{label:"Users"}),n.jsx(os,{label:"Organizations"}),n.jsx(os,{label:"Preapprovals"}),n.jsx(os,{label:"Relationship Managers"})]})})}}const Xne=Ye(Rw)(Kne),{apiAddress:Cn}=Tn,Zo=()=>(e,t)=>{e({type:N4});const r=`${Cn}api/orgs/?view=summary`;return Ne.get(r,Ee(t)).then(i=>e({type:E4,payload:i.data}),i=>e({type:T4}))},Hf=()=>(e,t)=>{e({type:xD});const r=`${Cn}api/users/?view=summary`;return Ne.get(r,Ee(t)).then(i=>e({type:k4,payload:i.data}),i=>e({type:jD}))},Qne=e=>(t,r)=>{t({type:D4});const i=`${Cn}api/users/${e}/`;return Ne.get(i,Ee(r)).then(a=>(t({type:R4,payload:a.data}),a.data),a=>t({type:O4}))},Mw=e=>(t,r)=>{t({type:S4});const i=`${Cn}api/orgs/${e}/`;return Ne.get(i,Ee(r)).then(a=>(t({type:_4,payload:a.data}),a.data),a=>t({type:C4}))},Zne=e=>(t,r)=>{if(!r().auth.token)return!1;t({type:xD}),Ne.get(`${Cn}api/users/?company_id=${e}`,Ee(r)).then(a=>{t({type:p3,payload:a.data})},a=>t({type:jD}))},$A=e=>(t,r)=>{const i={company:e.orgId,email:e.email,username:e.email,password:e.password,first_name:e.firstName,last_name:e.lastName,professional_credentials:e.professionalCredentials,corporate_title:e.corporateTitle,access_start_date:e.accessStartDate?Qt(e.accessStartDate).utc().format("YYYY-MM-DD HH:mm"):e.accessStartDate,access_end_date:e.accessEndDate?Qt(e.accessEndDate).utc().format("YYYY-MM-DD HH:mm"):e.accessEndDate,account_role:e.accountRole||"User",profile:e.profile,advisor_crd:e.advisorCrd,is_billing_contact:e.isBillingContact,can_use_engage:e.canUseEngage,can_use_studio:e.canUseStudio,can_use_partner:e.canUsePartner,can_remix_clientpiece:e.canRemixClientPiece,can_remix_video_script:e.canRemixVideoScript,can_use_assistant:e.canUseAssistant,can_use_question_answer:e.canUseQuestionAnswer,can_use_composer:e.canUseComposer},a=new FormData;
13Object.keys(i).forEach(l=>{const c=i[l];a.append(l,c)});const s=`${Cn}api/auth/register/`,o=Ee(r,Xn);return Ne.post(s,a,o).then(l=>(t({type:P4,payload:l.data.user}),l))},Jne=(e,t)=>(r,i)=>{const a={email:t.email,first_name:t.firstName,last_name:t.lastName,professional_credentials:t.professionalCredentials,corporate_title:t.corporateTitle,profile:t.profile,access_start_date:t.accessStartDate?Qt(t.accessStartDate).utc().format("YYYY-MM-DD HH:mm"):null,access_end_date:t.accessEndDate?Qt(t.accessEndDate).utc().format("YYYY-MM-DD HH:mm"):null,account_role:t.accountRole,is_billing_contact:t.isBillingContact,can_use_engage:t.canUseEngage,can_use_studio:t.canUseStudio,can_use_partner:t.canUsePartner,is_authenticator_totp_enabled:t.isAuthenticatorTotpEnabled,is_email_otp_enabled:t.isEmailOtpEnabled,can_remix_clientpiece:t.canRemixClientPiece,can_remix_video_script:t.canRemixVideoScript,can_use_assistant:t.canUseAssistant,can_use_question_answer:t.canUseQuestionAnswer,can_call_hedwig:t.canCallHedwig,can_use_composer:t.canUseComposer},{password:s}=t;s&&s.length>0&&(a.password=s);const o=new FormData;Object.keys(a).forEach(h=>{const u=a[h];o.append(h,u)});const l=`${Cn}api/users/${e}/`,c=Ee(i,Xn);return Ne.patch(l,o,c).then(h=>{r({type:A4,payload:h.data})})},ere=(e,t,r)=>(i,a)=>{const s={name:t.orgName,organization_type:t.orgType,geography_zipcode:t.zipCode,geography_city:t.city,geography_state:t.state,aum:t.aum,website:t.website,disclosure_text:t.disclosures,logo:t.logo,license_type:t.licenseType,license_status:t.status,provider_organization:t.hasProvider==="true"&&t.provider||null,license_start_date:t.licenseStartDate?Qt(t.licenseStartDate).utc().format("YYYY-MM-DD HH:mm"):null,license_end_date:t.licenseEndDate?Qt(t.licenseEndDate).utc().format("YYYY-MM-DD HH:mm"):null,billing_type:t.billingType,billing_system:t.billingSystem,billing_system_user_id:t.billingSystemUserId,provided_by_website:t.providedByWebsite,provided_by_logo:t.providedByLogo,engage_domain_whitelist:JSON.stringify(t.engageDomainWhitelist)||[],engage_permissions:t.engagePermissions,engage_subdomain:t.engageSubdomain,studio_permissions:t.studioPermissions,two_factor_auth_permissions:t.twoFactorAuthPermissions,hedwig_permissions:t.hedwigPermissions,chartbook_permissions:t.chartbookPermissions,composer_permissions:t.composerPermissions,relationship_manager:t.hasProvider==="true"&&t.relationshipManagerId||null},o=new FormData;Object.keys(s).forEach(h=>{const u=s[h];o.append(h,u)}),r&&o.append("default_provider_relationship_manager",t.defaultManagerId||null);const l=`${Cn}api/orgs/${e}/`,c=Ee(a,Xn);return Ne.patch(l,o,c).then(h=>(i({type:M4,payload:h.data}),h.data))},$w=e=>(t,r)=>{const i={name:e.orgName,organization_type:e.orgType,geography_city:e.city,geography_zipcode:e.zipCode,geography_state:e.state,organization_crd:e.firmCrd||"",aum:e.aum,website:e.website,disclosure_text:e.disclosures,logo:e.logo,license_type:e.licenseType,license_status:e.status,provider_organization:e.hasProvider==="true"&&e.provider||null,license_start_date:e.licenseStartDate?Qt(e.licenseStartDate).utc().format("YYYY-MM-DD HH:mm"):null,license_end_date:e.licenseEndDate?Qt(e.licenseEndDate).utc().format("YYYY-MM-DD HH:mm"):null,billing_type:e.billingType||null,billing_system:e.billingSystem||null,billing_system_user_id:e.billingSystemUserId||null,engage_subdomain:e.engageSubdomain||null,engage_permissions:e.engagePermissions||"Disabled",engage_domain_whitelist:JSON.stringify(e.engageDomainWhitelist)||[],studio_permissions:e.studioPermissions||"Disabled",partner_permissions:e.partnerPermissions||"Disabled",partner_stub:e.partnerStub,two_factor_auth_permissions:e.twoFactorAuthPermissions||"Any Required",hedwig_permissions:e.hedwigPermissions,chartbook_permissions:e.chartbookPermissions,composer_permissions:e.composerPermissions,relationship_manager:e.hasProvider==="true"&&e.relationshipManagerId||null},a=new FormData;
13Object.keys(i).forEach(c=>{const h=i[c];a.append(c,h)});const s=`${Cn}api/orgs/`,o=Ee(r,Xn);return Ne.post(s,a,o).then(c=>t({type:I4,payload:c.data}))},tre=e=>(t,r)=>{const i=r().auth.user.id;return Ne.patch(`${Cn}api/users/${i}/relationshipmanagers/${e}/`,{status:"inactive"},Ee(r)).then(a=>{t({type:a3,payload:a.data})})},nre=e=>(t,r)=>{const i=r().auth.user.id;return Ne.patch(`${Cn}api/users/${i}/relationshipmanagers/${e}/`,{status:"active"},Ee(r)).then(a=>{t({type:s3,payload:a.data})})},rre=(e,t)=>(r,i)=>{const a=i().auth.user.id;return Ne.patch(`${Cn}api/users/${a}/preapprovals/${e}/`,{relationship_manager:t},Ee(i)).then(s=>{r({type:Z4,payload:s.data})})},ire=e=>(t,r)=>{const i=r().auth.user.id;return Ne.patch(`${Cn}api/users/${i}/preapprovals/${e}/`,{invite_status:"inactive"},Ee(r)).then(a=>{t({type:l3,payload:a.data})})},are=e=>(t,r)=>{const i=r().auth.user.id;return Ne.patch(`${Cn}api/users/${i}/preapprovals/${e}/`,{invite_status:"active"},Ee(r)).then(a=>{t({type:o3,payload:a.data})})},sre=e=>(t,r)=>Ne.patch(`${Cn}api/users/${e}/`,{account_status:"inactive"},Ee(r)).then(i=>{t({type:h3,payload:i.data})}),ore=e=>(t,r)=>Ne.patch(`${Cn}api/users/${e}/`,{account_status:"active"},Ee(r)).then(i=>{t({type:u3,payload:i.data})}),lre=e=>(t,r)=>Ne.patch(`${Cn}api/orgs/${e}/`,{organization_status:"inactive"},Ee(r)).then(i=>{t({type:d3,payload:i.data})}),cre=e=>(t,r)=>Ne.patch(`${Cn}api/orgs/${e}/`,{organization_status:"active"},Ee(r)).then(i=>{t({type:c3,payload:i.data})}),dre=e=>(t,r)=>{t({type:K4});const i={first_name:e.firstName,middle_name:e.middleName||void 0,last_name:e.lastName,firm_name:e.firmName,advisor_zipcode:e.zipcode||void 0},a=new FormData;
13Object.keys(i).forEach(l=>{const c=i[l];a.append(l,c)});const s=`${Cn}api/inbounds/verify/`,o=Ee(r);return Ne.post(s,a,o).then(l=>(t({type:X4,payload:l.data}),l),l=>(t({type:Q4}),l.message!==Ue&&t(he({serverError:"There was an issue fetching results"})),Promise.reject(l)))},ure=()=>(e,t)=>{e({type:Y4})},hre=e=>(t,r)=>{const i={first_name:e.firstName,middle_name:e.middleName||void 0,last_name:e.lastName,firm_name:e.firmName,geography_zipcode:e.zipcode||void 0,email:e.email||void 0,website:e.website||void 0,verification_status:"pending"},a=`${Cn}api/inbounds/`,s=Ee(r);return Ne.post(a,i,s).then(o=>(t({type:wD,payload:o.data}),o),o=>(o.message!==Ue&&t(he({serverError:"There was an issue creating the inbound"})),Promise.reject(o)))},LA=(e,t)=>(r,i)=>{const a={first_name:t.firstName,middle_name:t.middleName||void 0,last_name:t.lastName,firm_name:t.firmName,geography_zipcode:t.zipcode||void 0,email:t.email||void 0,advisor_crd:t.advisorCrd||void 0,firm_crd:t.firmCrd||void 0,aum:t.aum||void 0,website:t.website||void 0,verification_status:t.verificationStatus||void 0,verification_reason:t.verificationReason||void 0,verified_by:i().auth.user.id},s=`${Cn}api/inbounds/${e}/`,o=Ee(i);return Ne.patch(s,a,o).then(l=>(r({type:wD,payload:l.data}),l),l=>(l.message!==Ue&&r(he({serverError:"There was an issue updating the inbound"})),Promise.reject(l)))},FA=e=>(t,r)=>Ne.patch(`${Cn}api/inbounds/${e}/`,{verification_status:"user created"},Ee(r)).then(i=>t({type:w4,payload:i.data}),i=>(i.message!==Ue&&t(he({serverError:"There was an issue updating the inbound"})),Promise.reject(a=>a))),pre=e=>(t,r)=>Ne.post(`${Cn}api/orgs/${e}/chartupdate/`,{},Ee(r)).then(i=>{t(he({alertMessage:"This organization's charts are being reprocessed"}))},i=>{i.message!==Ue&&t(he({serverError:"There was an issue reprocessing this organization's charts"}))}),fre=e=>(t,r)=>{t({type:n3});const i=`${Cn}api/users/${e}
13/preapprovals/`;return Ne.get(i,Ee(r)).then(a=>t({type:r3,payload:a.data}),a=>t({type:i3}))},mre=e=>(t,r)=>{t({type:L4});const i=`${Cn}api/users/${e}/preapprovalorgs/`;return Ne.get(i,Ee(r)).then(a=>t({type:F4,payload:a.data}),a=>t({type:U4}))},gre=(e,t,r,i,a)=>(s,o)=>{const l={organization_name:r,organization_type:e.orgType,license_type:e.licenseType,provide_engage:e.provideEngage,provide_studio:e.provideStudio,provide_hedwig:e.provideHedwig,email:e.email,first_name:e.firstName,last_name:e.lastName,inviter_org_id:e.inviter},c=new FormData;Object.keys(l).forEach(d=>{const p=l[d];c.append(d,p)}),i&&c.append("preapproval_org_id",i),a&&c.append("relationship_manager",a);const h=`${Cn}api/users/${t}/preapprovals/`,u=Ee(o,Xn);return Ne.post(h,c,u).then(d=>(s({type:$4,payload:d.data}),s(he({alertMessage:"Preapproval has been successfully created"})),d),d=>(d.message!==Ue&&s(he({serverError:"There was an error creating this preapproval"})),d.response))},vre=(e,t)=>(r,i)=>{r({type:B4});const a=`${Cn}api/users/${e}/preapprovals/${t}/`;return Ne.get(a,Ee(i)).then(s=>(r({type:q4,payload:s.data}),s.data),s=>{r({type:V4})})},bre=(e,t,r)=>(i,a)=>{const s={organization_type:r.orgType,license_type:r.licenseType,provide_engage:r.provideEngage,provide_studio:r.provideStudio,provide_hedwig:r.provideHedwig,relationship_manager:r.relationshipManager},o=new FormData;Object.keys(s).forEach(h=>{const u=s[h];o.append(h,u)});const l=`${Cn}api/users/${e}/preapprovalorgs/${t}/`,c=Ee(a,Xn);return Ne.patch(l,o,c).then(h=>(i({type:e3,payload:h.data}),i(he({alertMessage:"Preapproval organization has been successfully updated"})),h.data),h=>{h.message!==Ue&&i(he({serverError:"There was an error updating this preapproval organization"}))})},yre=(e,t,r)=>(i,a)=>{const s={first_name:t.firstName,last_name:t.lastName},o=new FormData;Object.keys(s).forEach(h=>{const u=s[h];o.append(h,u)});const l=`${Cn}api/users/${e}/preapprovalusers/${r}/`,c=Ee(a,Xn);return Ne.patch(l,o,c).then(h=>{i({type:J4,payload:h.data}),i(he({alertMessage:"Preapproval user has been successfully updated"}))},h=>{h.message!==Ue&&i(he({serverError:"There was an error updating this preapproval user"}))})},Gf=e=>(t,r)=>{t({type:y4});const i=`${Cn}api/users/${e}/relationshipmanagers/`;return Ne.get(i,Ee(r)).then(a=>t({type:x4,payload:a.data}),a=>t({type:j4}))},xre=(e,t,r)=>(i,a)=>{const s={email:e.email,first_name:e.firstName,last_name:e.lastName,phone_number:e.phoneNumber,title:e.jobTitle},o=new FormData;Object.keys(s).forEach(h=>{const u=s[h];o.append(h,u)}),r&&o.append("company",r);const l=`${Cn}api/users/${t}/relationshipmanagers/`,c=Ee(a,Xn);return Ne.post(l,o,c).then(h=>(i({type:z4,payload:h.data}),i(he({alertMessage:"Relationship manager has been successfully created"})),h),h=>(h.message!==Ue&&i(he({serverError:"There was an error creating this relationship manager"})),h.response))},jre=(e,t)=>(r,i)=>{r({type:H4});const a=`${Cn}api/users/${e}/relationshipmanagers/${t}/`;return Ne.get(a,Ee(i)).then(s=>(r({type:G4,payload:s.data}),s.data),s=>{r({type:W4})})},wre=(e,t,r)=>(i,a)=>{const s={first_name:t.firstName,last_name:t.lastName,email:t.email,phone_number:t.phoneNumber,title:t.jobTitle},o=new FormData;Object.keys(s).forEach(h=>{const u=s[h];o.append(h,u)});const l=`${Cn}api/users/${e}/relationshipmanagers/${r}/`,c=Ee(a,Xn);return Ne.patch(l,o,c).then(h=>{i({type:t3,payload:h.data}),i(he({alertMessage:"Relationship manager has been successfully updated"}))},h=>{h.message!==Ue&&i(he({serverError:"There was an error updating this relationship manager"}))})};var Zn={},Sre=function(t){var r={};return t.shadows.forEach(function(i,a){r["elevation".concat(a)]={boxShadow:i}}),Z({root:{backgroundColor:t.palette.background.paper,color:t.palette.text.primary,transition:t.transitions.create("box-shadow")},rounded:{borderRadius:t.shape.borderRadius},outlined:{border:"1px solid ".concat(t.palette.divider)}},r)},_re=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.component,o=s===void 0?"div":s,l=t.square,c=l===void 0?!1:l,h=t.elevation,u=h===void 0?1:h,d=t.variant,p=d===void 0?"elevation":d,f=Be(t,["classes","className","component","square","elevation","variant"]);return y.createElement(o,Z({className:$e(i.root,a,p==="outlined"?i.outlined:i["elevation".concat(u)],!c&&i.roun
13ded),ref:r},f))});const ca=Ye(Sre,{name:"MuiPaper"})(_re),Cre=Object.freeze(Object.defineProperty({__proto__:null,default:ca},Symbol.toStringTag,{value:"Module"})),Nre=Pn(Cre),Ere=Pn(bte);var UA=y.createContext(),Tre=function(t){return{root:{display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":Z({},t.typography.body2,{padding:t.spacing(2),color:t.palette.text.secondary,textAlign:"left",captionSide:"bottom"})},stickyHeader:{borderCollapse:"separate"}}},hE="table",kre=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.component,o=s===void 0?hE:s,l=t.padding,c=l===void 0?"normal":l,h=t.size,u=h===void 0?"medium":h,d=t.stickyHeader,p=d===void 0?!1:d,f=Be(t,["classes","className","component","padding","size","stickyHeader"]),m=y.useMemo(function(){return{padding:c,size:u,stickyHeader:p}},[c,u,p]);return y.createElement(UA.Provider,{value:m},y.createElement(o,Z({role:o===hE?null:"table",ref:r,className:$e(i.root,a,p&&i.stickyHeader)},f)))});const BA=Ye(Tre,{name:"MuiTable"})(kre),Pre=Object.freeze(Object.defineProperty({__proto__:null,default:BA},Symbol.toStringTag,{value:"Module"})),Ire=Pn(Pre);var ey={exports:{}};var pE;function Dre(){return pE||(pE=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var s="",o=0;o<arguments.length;o++){var l=arguments[o];l&&(s=a(s,i(l)))}return s}function i(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return r.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var l in s)t.call(s,l)&&s[l]&&(o=a(o,l));return o}function a(s,o){return o?s?s+" "+o:s+o:s}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(ey)),ey.exports}var ty,fE;function Rre(){if(fE)return ty;fE=1;var e=9007199254740991,t="[object Arguments]",r="[object Function]",i="[object GeneratorFunction]",a=/^(?:0|[1-9]\d*)$/;function s(B,L,A){switch(A.length){case 0:return B.call(L);case 1:return B.call(L,A[0]);case 2:return B.call(L,A[0],A[1]);case 3:return B.call(L,A[0],A[1],A[2])}return B.apply(L,A)}function o(B,L){for(var A=-1,R=Array(B);++A<B;)R[A]=L(A);return R}function l(B,L){return function(A){return B(L(A))}}var c=Object.prototype,h=c.hasOwnProperty,u=c.toString,d=c.propertyIsEnumerable,p=l(Object.keys,Object),f=Math.max;function m(B,L){var A=P(B)||E(B)?o(B.length,String):[],R=A.length,F=!!R;for(var q in B)h.call(B,q)&&!(F&&(q=="length"||w(q,R)))&&A.push(q);return A}function g(B,L,A){var R=B[L];(!(h.call(B,L)&&C(R,A))||A===void 0&&!(L in B))&&(B[L]=A)}function x(B){if(!_(B))return p(B);var L=[];for(var A in Object(B))h.call(B,A)&&A!="constructor"&&L.push(A);return L}function v(B,L){return L=f(L===void 0?B.length-1:L,0),function(){for(var A=arguments,R=-1,F=f(A.length-L,0),q=Array(F);++R<F;)q[R]=A[L+R];R=-1;for(var V=Array(L+1);++R<L;)V[R]=A[R];return V[L]=q,s(B,this,V)}}function b(B,L,A,R){A||(A={});for(var F=-1,q=L.length;++F<q;){var V=L[F],X=R?R(A[V],B[V],V,A,B):void 0;g(A,V,X===void 0?B[V]:X)}return A}function j(B){return v(function(L,A){var R=-1,F=A.length,q=F>1?A[F-1]:void 0,V=F>2?A[2]:void 0;for(q=B.length>3&&typeof q=="function"?(F--,q):void 0,V&&S(A[0],A[1],V)&&(q=F<3?void 0:q,F=1),L=Object(L);++R<F;){var X=A[R];X&&B(L,X,R,q)}return L})}function w(B,L){return L=L??e,!!L&&(typeof B=="number"||a.test(B))&&B>-1&&B%1==0&&B<L}function S(B,L,A){if(!D(A))return!1;var R=typeof L;return(R=="number"?T(A)&&w(L,A.length):R=="string"&&L in A)?C(A[L],B):!1}function _(B){var L=B&&B.constructor,A=typeof L=="function"&&L.prototype||c;return B===A}function C(B,L){return B===L||B!==B&&L!==L}function E(B){return N(B)&&h.call(B,"callee")&&(!d.call(B,"callee")||u.call(B)==t)}var P=Array.isArray;function T(B){return B!=null&&I(B.length)&&!k(B)}function N(B){return O(B)&&T(B)}function k(B){var L=D(B)?u.call(B):"";return L==r||L==i}function I(B){return typeof B=="number"&&B>-1&&B%1==0&&B<=e}function D(B){var L=typeof B;return!!B&&(L=="object"||L=="function")}function O(B){return!!B&&typeof B=="object"}var $=j(function(B,L,A,R){b(L,U(L),B,R)});function U(B){return T(B)?m(B):x(B)}return ty=$,ty}var _d={exports:{}};_d.exports;var mE;function Ore(){return mE||(mE=1,(function(e,t){var r=200,i="__lodash_hash_undefined__",a=9007199254740991,s="[object Arguments]",o="[object Array]",l="[object Boolean]",c="[object Date]",h="[object Error]",u="[object Function]",d="[object GeneratorFunction]",p="[object Map]",f="[object Number]",m="[object Object]",g="[object Promise]",x="[object RegExp]",v="[object Set]",b="[object String]",j="[object Symbol]",w="[object WeakMap]",S="[object ArrayBuffer]",_="[object DataView]",C="[object Float32Array]",E="[object Float64Array
13]",P="[object Int8Array]",T="[object Int16Array]",N="[object Int32Array]",k="[object Uint8Array]",I="[object Uint8ClampedArray]",D="[object Uint16Array]",O="[object Uint32Array]",$=/[\\^$.*+?()[\]{}|]/g,U=/\w*$/,B=/^\[object .+?Constructor\]$/,L=/^(?:0|[1-9]\d*)$/,A={};A[s]=A[o]=A[S]=A[_]=A[l]=A[c]=A[C]=A[E]=A[P]=A[T]=A[N]=A[p]=A[f]=A[m]=A[x]=A[v]=A[b]=A[j]=A[k]=A[I]=A[D]=A[O]=!0,A[h]=A[u]=A[w]=!1;var R=typeof Lr=="object"&&Lr&&Lr.Object===Object&&Lr,F=typeof self=="object"&&self&&self.Object===Object&&self,q=R||F||Function("return this")(),V=t&&!t.nodeType&&t,X=V&&!0&&e&&!e.nodeType&&e,M=X&&X.exports===V;function W(ue,J){return ue.set(J[0],J[1]),ue}function K(ue,J){return ue.add(J),ue}function z(ue,J){for(var de=-1,Te=ue?ue.length:0;++de<Te&&J(ue[de],de,ue)!==!1;);return ue}function Y(ue,J){for(var de=-1,Te=J.length,it=ue.length;++de<Te;)ue[it+de]=J[de];return ue}function ie(ue,J,de,Te){for(var it=-1,Ft=ue?ue.length:0;++it<Ft;)de=J(de,ue[it],it,ue);return de}function ne(ue,J){for(var de=-1,Te=Array(ue);++de<ue;)Te[de]=J(de);return Te}function ve(ue,J){return ue?.[J]}function pe(ue){var J=!1;if(ue!=null&&typeof ue.toString!="function")try{J=!!(ue+"")}catch{}return J}function be(ue){var J=-1,de=Array(ue.size);return ue.forEach(function(Te,it){de[++J]=[it,Te]}),de}function ye(ue,J){return function(de){return ue(J(de))}}function ke(ue){var J=-1,de=Array(ue.size);return ue.forEach(function(Te){de[++J]=Te}),de}var fe=Array.prototype,se=Function.prototype,ge=Object.prototype,De=q["__core-js_shared__"],ae=(function(){var ue=/[^.]+$/.exec(De&&De.keys&&De.keys.IE_PROTO||"");return ue?"Symbol(src)_1."+ue:""})(),Q=se.toString,ee=ge.hasOwnProperty,oe=ge.toString,Pe=RegExp("^"+Q.call(ee).replace($,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fe=M?q.Buffer:void 0,Ie=q.Symbol,Re=q.Uint8Array,Ve=ye(Object.getPrototypeOf,Object),Xe=Object.create,et=ge.propertyIsEnumerable,rt=fe.splice,bt=Object.getOwnPropertySymbols,Qe=Fe?Fe.isBuffer:void 0,tt=ye(Object.keys,Object),We=_e(q,"DataView"),pt=_e(q,"Map"),Et=_e(q,"Promise"),Ot=_e(q,"Set"),kt=_e(q,"WeakMap"),Pt=_e(Object,"create"),Ut=ft(We),Nn=ft(pt),$t=ft(Et),pn=ft(Ot),nn=ft(kt),Rn=Ie?Ie.prototype:void 0,fn=Rn?Rn.valueOf:void 0;function ht(ue){var J=-1,de=ue?ue.length:0;for(this.clear();++J<de;){var Te=ue[J];this.set(Te[0],Te[1])}}function jt(){this.__data__=Pt?Pt(null):{}}function sn(ue){return this.has(ue)&&delete this.__data__[ue]}function rn(ue){var J=this.__data__;if(Pt){var de=J[ue];return de===i?void 0:de}return ee.call(J,ue)?J[ue]:void 0}function yt(ue){var J=this.__data__;return Pt?J[ue]!==void 0:ee.call(J,ue)}function Wt(ue,J){var de=this.__data__;return de[ue]=Pt&&J===void 0?i:J,this}ht.prototype.clear=jt,ht.prototype.delete=sn,ht.prototype.get=rn,ht.prototype.has=yt,ht.prototype.set=Wt;function Lt(ue){var J=-1,de=ue?ue.length:0;for(this.clear();++J<de;){var Te=ue[J];this.set(Te[0],Te[1])}}function qr(){this.__data__=[]}function Gn(ue){var J=this.__data__,de=fr(J,ue);if(de<0)return!1;var Te=J.length-1;return de==Te?J.pop():rt.call(J,de,1),!0}function Mr(ue){var J=this.__data__,de=fr(J,ue);return de<0?void 0:J[de][1]}function ai(ue){return fr(this.__data__,ue)>-1}function tr(ue,J){var de=this.__data__,Te=fr(de,ue);return Te<0?de.push([ue,J]):de[Te][1]=J,this}Lt.prototype.clear=qr,Lt.prototype.delete=Gn,Lt.prototype.get=Mr,Lt.prototype.has=ai,Lt.prototype.set=tr;function sr(ue){var J=-1,de=ue?ue.length:0;for(this.clear();++J<de;){var Te=ue[J];this.set(Te[0],Te[1])}}function Vr(){this.__data__={hash:new ht,map:new(pt||Lt),string:new ht}}function En(ue){return je(this,ue).delete(ue)}function Hi(ue){return je(this,ue).get(ue)}function Gi(ue){return je(this,ue).has(ue)}function zr(ue,J){return je(this,ue).set(ue,J),this}sr.prototype.clear=Vr,sr.prototype.delete=En,sr.prototype.get=Hi,sr.prototype.has=Gi,sr.prototype.set=zr;function pr(ue){this.__data__=new Lt(ue)}function Wi(){this.__data__=new Lt}function or(ue){return this.__data__.delete(ue)}function Ri(ue){return this.__data__.get(ue)}function Ya(ue){return this.__data__.has(ue)}function si(ue,J){var de=this.__data__;if(de instanceof Lt){var Te=de.__data__;
vendor: 4,339 bytes, line 13
13if(!pt||Te.length<r-1)return Te.push([ue,J]),this;de=this.__data__=new sr(Te)}return de.set(ue,J),this}pr.prototype.clear=Wi,pr.prototype.delete=or,pr.prototype.get=Ri,pr.prototype.has=Ya,pr.prototype.set=si;function ua(ue,J){var de=Ht(ue)||At(ue)?ne(ue.length,String):[],Te=de.length,it=!!Te;for(var Ft in ue)ee.call(ue,Ft)&&!(it&&(Ft=="length"||He(Ft,Te)))&&de.push(Ft);return de}function ha(ue,J,de){var Te=ue[J];(!(ee.call(ue,J)&&Dt(Te,de))||de===void 0&&!(J in ue))&&(ue[J]=de)}function fr(ue,J){for(var de=ue.length;de--;)if(Dt(ue[de][0],J))return de;return-1}function Ka(ue,J){return ue&&G(J,$i(J),ue)}function Oi(ue,J,de,Te,it,Ft,an){var Xt;if(Te&&(Xt=Ft?Te(ue,it,Ft,an):Te(ue)),Xt!==void 0)return Xt;if(!Qn(ue))return ue;var ln=Ht(ue);if(ln){if(Xt=Ce(ue),!J)return ce(ue,Xt)}else{var xn=xe(ue),rr=xn==u||xn==d;if(Yt(ue))return pi(ue,J);if(xn==m||xn==s||rr&&!Ft){if(pe(ue))return Ft?ue:{};if(Xt=Oe(rr?{}:ue),!J)return re(ue,Ka(Xt,ue))}else{if(!A[xn])return Ft?ue:{};Xt=ze(ue,xn,Oi,J)}}an||(an=new pr);var mr=an.get(ue);if(mr)return mr;if(an.set(ue,Xt),!ln)var Ta=de?H(ue):$i(ue);return z(Ta||ue,function(ka,Ki){Ta&&(Ki=ka,ka=ue[Ki]),ha(Xt,Ki,Oi(ka,J,de,Te,Ki,ue,an))}),Xt}function Yi(ue){return Qn(ue)?Xe(ue):{}}function _a(ue,J,de){var Te=J(ue);return Ht(ue)?Te:Y(Te,de(ue))}function Xr(ue){return oe.call(ue)}function Ai(ue){if(!Qn(ue)||ct(ue))return!1;var J=Kt(ue)||pe(ue)?Pe:B;return J.test(ft(ue))}function Xa(ue){if(!nt(ue))return tt(ue);var J=[];for(var de in Object(ue))ee.call(ue,de)&&de!="constructor"&&J.push(de);return J}function pi(ue,J){if(J)return ue.slice();var de=new ue.constructor(ue.length);return ue.copy(de),de}function Er(ue){var J=new ue.constructor(ue.byteLength);return new Re(J).set(new Re(ue)),J}function Ca(ue,J){var de=J?Er(ue.buffer):ue.buffer;return new ue.constructor(de,ue.byteOffset,ue.byteLength)}function Qa(ue,J,de){var Te=J?de(be(ue),!0):be(ue);return ie(Te,W,new ue.constructor)}function Na(ue){var J=new ue.constructor(ue.source,U.exec(ue));return J.lastIndex=ue.lastIndex,J}function Mi(ue,J,de){var Te=J?de(ke(ue),!0):ke(ue);return ie(Te,K,new ue.constructor)}function pa(ue){return fn?Object(fn.call(ue)):{}}function Le(ue,J){var de=J?Er(ue.buffer):ue.buffer;return new ue.constructor(de,ue.byteOffset,ue.length)}function ce(ue,J){var de=-1,Te=ue.length;for(J||(J=Array(Te));++de<Te;)J[de]=ue[de];return J}function G(ue,J,de,Te){de||(de={});for(var it=-1,Ft=J.length;++it<Ft;){var an=J[it],Xt=void 0;ha(de,an,Xt===void 0?ue[an]:Xt)}return de}function re(ue,J){return G(ue,we(ue),J)}function H(ue){return _a(ue,$i,we)}function je(ue,J){var de=ue.__data__;return Je(J)?de[typeof J=="string"?"string":"hash"]:de.map}function _e(ue,J){var de=ve(ue,J);return Ai(de)?de:void 0}var we=bt?ye(bt,Object):Ea,xe=Xr;(We&&xe(new We(new ArrayBuffer(1)))!=_||pt&&xe(new pt)!=p||Et&&xe(Et.resolve())!=g||Ot&&xe(new Ot)!=v||kt&&xe(new kt)!=w)&&(xe=function(ue){var J=oe.call(ue),de=J==m?ue.constructor:void 0,Te=de?ft(de):void 0;if(Te)switch(Te){case Ut:return _;case Nn:return p;case $t:return g;case pn:return v;case nn:return w}return J});function Ce(ue){var J=ue.length,de=ue.constructor(J);return J&&typeof ue[0]=="string"&&ee.call(ue,"index")&&(de.index=ue.index,de.input=ue.input),de}function Oe(ue){return typeof ue.constructor=="function"&&!nt(ue)?Yi(Ve(ue)):{}}function ze(ue,J,de,Te){var it=ue.constructor;switch(J){case S:return Er(ue);case l:case c:return new it(+ue);case _:return Ca(ue,Te);case C:case E:case P:case T:case N:case k:case I:case D:case O:return Le(ue,Te);case p:return Qa(ue,Te,de);case f:case b:return new it(ue);case x:return Na(ue);case v:return Mi(ue,Te,de);case j:return pa(ue)}}function He(ue,J){return J=J??a,!!J&&(typeof ue=="number"||L.test(ue))&&ue>-1&&ue%1==0&&ue<J}function Je(ue){var J=typeof ue;return J=="string"||J=="number"||J=="symbol"||J=="boolean"?ue!=="__proto__":ue===null}function ct(ue){return!!ae&&ae in ue}function nt(ue){var J=ue&&ue.constructor,de=typeof J=="function"&&J.prototype||ge;return ue===de}function ft(ue){if(ue!=null){try{return Q.call(ue)}catch{}try{return ue+""}catch{}}return""}function lt(ue){return Oi(ue,!0,!0)}function Dt(ue,J){return ue===J||ue!==ue&&J!==J}function At(ue){return It(ue)&&ee.call(ue,"callee")&&(!et.call(ue,"callee")||oe.call(ue)==s)}var Ht=Array.isArray;function On(ue){return ue!=null&&nr(ue.length)&&!Kt(ue)}
13function It(ue){return Vn(ue)&&On(ue)}var Yt=Qe||Fn;function Kt(ue){var J=Qn(ue)?oe.call(ue):"";return J==u||J==d}function nr(ue){return typeof ue=="number"&&ue>-1&&ue%1==0&&ue<=a}function Qn(ue){var J=typeof ue;return!!ue&&(J=="object"||J=="function")}function Vn(ue){return!!ue&&typeof ue=="object"}function $i(ue){return On(ue)?ua(ue):Xa(ue)}function Ea(){return[]}function Fn(){return!1}e.exports=lt})(_d,_d.exports)),_d.exports}var Cd={exports:{}};Cd.exports;var gE;function Are(){return gE||(gE=1,(function(e,t){var r=200,i="Expected a function",a="__lodash_hash_undefined__",s=1,o=2,l=1/0,c=9007199254740991,h=17976931348623157e292,u=NaN,d="[object Arguments]",p="[object Array]",f="[object Boolean]",m="[object Date]",g="[object Error]",x="[object Function]",v="[object GeneratorFunction]",b="[object Map]",j="[object Number]",w="[object Object]",S="[object Promise]",_="[object RegExp]",C="[object Set]",E="[object String]",P="[object Symbol]",T="[object WeakMap]",N="[object ArrayBuffer]",k="[object DataView]",I="[object Float32Array]",D="[object Float64Array]",O="[object Int8Array]",$="[object Int16Array]",U="[object Int32Array]",B="[object Uint8Array]",L="[object Uint8ClampedArray]",A="[object Uint16Array]",R="[object Uint32Array]",F=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,q=/^\w*$/,V=/^\./,X=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,M=/[\\^$.*+?()[\]{}|]/g,W=/^\s+|\s+$/g,K=/\\(\\)?/g,z=/^[-+]0x[0-9a-f]+$/i,Y=/^0b[01]+$/i,ie=/^\[object .+?Constructor\]$/,ne=/^0o[0-7]+$/i,ve=/^(?:0|[1-9]\d*)$/,pe={};pe[I]=pe[D]=pe[O]=pe[$]=pe[U]=pe[B]=pe[L]=pe[A]=pe[R]=!0,pe[d]=pe[p]=pe[N]=pe[f]=pe[k]=pe[m]=pe[g]=pe[x]=pe[b]=pe[j]=pe[w]=pe[_]=pe[C]=pe[E]=pe[T]=!1;var be=parseInt,ye=typeof Lr=="object"&&Lr&&Lr.Object===Object&&Lr,ke=typeof self=="object"&&self&&self.Object===Object&&self,fe=ye||ke||Function("return this")(),se=t&&!t.nodeType&&t,ge=se&&!0&&e&&!e.nodeType&&e,De=ge&&ge.exports===se,ae=De&&ye.process,Q=(function(){try{return ae&&ae.binding("util")}catch{}})(),ee=Q&&Q.isTypedArray;function oe(te,Se){for(var qe=-1,at=te?te.length:0;++qe<at;)if(Se(te[qe],qe,te))return!0;return!1}function Pe(te,Se,qe,at){for(var Bt=te.length,St=qe+-1;++St<Bt;)if(Se(te[St],St,te))return St;return-1}function Fe(te){return function(Se){return Se?.[te]}}function Ie(te,Se){for(var qe=-1,at=Array(te);++qe<te;)at[qe]=Se(qe);return at}function Re(te){return function(Se){return te(Se)}}function Ve(te,Se){return te?.[Se]}function Xe(te){var Se=!1;if(te!=null&&typeof te.toString!="function")try{Se=!!(te+"")}catch{}return Se}function et(te){var Se=-1,qe=Array(te.size);return te.forEach(function(at,Bt){qe[++Se]=[Bt,at]}),qe}function rt(te,Se){return function(qe){return te(Se(qe))}}function bt(te){var Se=-1,qe=Array(te.size);return te.forEach(function(at){qe[++Se]=at}),qe}var Qe=Array.prototype,tt=Function.prototype,We=Object.prototype,pt=fe["__core-js_shared__"],Et=(function(){var te=/[^.]+$/.exec(pt&&pt.keys&&pt.keys.IE_PROTO||"");return te?"Symbol(src)_1."+te:""})(),Ot=tt.toString,kt=We.hasOwnProperty,Pt=We.toString,Ut=RegExp("^"+Ot.call(kt).replace(M,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Nn=fe.Symbol,$t=fe.Uint8Array,pn=We.propertyIsEnumerable,nn=Qe.splice,Rn=rt(Object.keys,Object),fn=Math.max,ht=Yt(fe,"DataView"),jt=Yt(fe,"Map"),sn=Yt(fe,"Promise"),rn=Yt(fe,"Set"),yt=Yt(fe,"WeakMap"),Wt=Yt(Object,"create"),Lt=it(ht),qr=it(jt),Gn=it(sn),Mr=it(rn),ai=it(yt),tr=Nn?Nn.prototype:void 0,sr=tr?tr.valueOf:void 0,Vr=tr?tr.toString:void 0;function En(te){var Se=-1,qe=te?te.length:0;for(this.clear();++Se<qe;){var at=te[Se];this.set(at[0],at[1])}}function Hi(){this.__data__=Wt?Wt(null):{}}function Gi(te){return this.has(te)&&delete this.__data__[te]}function zr(te){var Se=this.__data__;if(Wt){var qe=Se[te];return qe===a?void 0:qe}return kt.call(Se,te)?Se[te]:void 0}function pr(te){var Se=this.__data__;return Wt?Se[te]!==void 0:kt.call(Se,te)}function Wi(te,Se){var qe=this.__data__;return qe[te]=Wt&&Se===void 0?a:Se,this}En.prototype.clear=Hi,En.prototype.delete=Gi,En.prototype.get=zr,En.prototype.has=pr,En.prototype.set=Wi;function or(te){var Se=-1,qe=te?te.length:0;for(this.clear();++Se<qe;){var at=te[Se];this.set(at[0],at[1])}}function Ri(){this.__data__=[]}function Ya(te){var Se=this.__data__,qe=ce(Se,te);if(qe<0)return!1;var at=Se.length-1;return qe==at?Se.pop():nn.call(Se,qe,1),!0}function si(te){var Se=this.__data__,qe=ce(Se,te);return qe<0?void 0:Se[qe][1]}function ua(te){return ce(this.__data__,te)>-1}function ha(te,Se){var qe=this.__data__,at=ce(qe,te);return at<0?qe.push([te,Se]):qe[at][1]=Se,this}or.prototype.clear=Ri,or.prototype.delete=Ya,or.prototype.get=si,or.prototype.has=ua,or.prototype.set=ha;function fr(te){var Se=-1,qe=te?te.length:0;for(this.clear();++Se<qe;){var at=te[Se];this.set(at[0],at[1])}}function Ka(){this.__data__={hash:new En,map:new(jt||or),string:new En}}function Oi(te){return On(this,te).delete(te)}function Yi(te){return On(this,te).get(te)}function _a(te){return On(this,te).has(te)}function Xr(te,Se){return On(this,te).set(te,Se),this}fr.prototype.clear=Ka,fr.prototype.delete=Oi,fr.prototype.get=Yi,fr.prototype.has=_a,fr.prototype.set=Xr;function Ai(te){var Se=-1,qe=te?te.length:0;for(this.__data__=new fr;++Se<qe;)this.add(te[Se])}function Xa(te){return this.__data__.set(te,a),this}function pi(te){return this.__data__.has(te)}Ai.prototype.add=Ai.prototype.push=Xa,Ai.prototype.has=pi;function Er(te){this.__data__=new or(te)}function Ca(){this.__data__=new or}function Qa(te){return this.__data__.delete(te)}function Na(te){return this.__data__.get(te)}function Mi(te){return this.__data__.has(te)}function pa(te,Se){var qe=this.__data__;if(qe instanceof or){var at=qe.__data__;if(!jt||at.length<r-1)return at.push([te,Se]),this;qe=this.__data__=new fr(at)}return qe.set(te,Se),this}Er.prototype.clear=Ca,Er.prototype.delete=Qa,Er.prototype.get=Na,Er.prototype.has=Mi,Er.prototype.set=pa;function Le(te,Se){var qe=rr(te)||xn(te)?Ie(te.length,String):[],at=qe.length,Bt=!!at;for(var St in te)kt.call(te,St)&&!(Bt&&(St=="length"||Qn(St,at)))&&qe.push(St);return qe}function ce(te,Se){for(var qe=te.length;qe--;)if(ln(te[qe][0],Se))return qe;return-1}function G(te,Se){Se=Vn(Se,te)?[Se]:ft(Se);for(var qe=0,at=Se.length;te!=null&&qe<at;)te=te[Te(Se[qe++])];return qe&&qe==at?te:void 0}function re(te){return Pt.call(te)}function H(te,Se){return te!=null&&Se in Object(te)}function je(te,Se,qe,at,Bt){return te===Se?!0:te==null||Se==null||!Za(te)&&!Bu(Se)?te!==te&&Se!==Se:_e(te,Se,je,qe,at,Bt)}function _e(te,Se,qe,at,Bt,St){var cn=rr(te),gr=rr(Se),Tr=p,Qr=p;cn||(Tr=Kt(te),Tr=Tr==d?w:Tr),gr||(Qr=Kt(Se),Qr=Qr==d?w:Qr);var fi=Tr==w&&!Xe(te),mi=Qr==w&&!Xe(Se),oi=Tr==Qr;if(oi&&!fi)return St||(St=new Er),cn||GF(te)?Dt(te,Se,qe,at,Bt,St):At(te,Se,Tr,qe,at,Bt,St);if(!(Bt&o)){var Xi=fi&&kt.call(te,"__wrapped__"),Qi=mi&&kt.call(Se,"__wrapped__");
13if(Xi||Qi){var Cs=Xi?te.value():te,Ja=Qi?Se.value():Se;return St||(St=new Er),qe(Cs,Ja,at,Bt,St)}}return oi?(St||(St=new Er),Ht(te,Se,qe,at,Bt,St)):!1}function we(te,Se,qe,at){var Bt=qe.length,St=Bt;if(te==null)return!St;for(te=Object(te);Bt--;){var cn=qe[Bt];if(cn[2]?cn[1]!==te[cn[0]]:!(cn[0]in te))return!1}for(;++Bt<St;){cn=qe[Bt];var gr=cn[0],Tr=te[gr],Qr=cn[1];if(cn[2]){if(Tr===void 0&&!(gr in te))return!1}else{var fi=new Er,mi;if(!(mi===void 0?je(Qr,Tr,at,s|o,fi):mi))return!1}}return!0}function xe(te){if(!Za(te)||Ea(te))return!1;var Se=ka(te)||Xe(te)?Ut:ie;return Se.test(it(te))}function Ce(te){return Bu(te)&&Ki(te.length)&&!!pe[Pt.call(te)]}function Oe(te){return typeof te=="function"?te:te==null?JF:typeof te=="object"?rr(te)?Je(te[0],te[1]):He(te):e5(te)}function ze(te){if(!Fn(te))return Rn(te);var Se=[];for(var qe in Object(te))kt.call(te,qe)&&qe!="constructor"&&Se.push(qe);return Se}function He(te){var Se=It(te);return Se.length==1&&Se[0][2]?J(Se[0][0],Se[0][1]):function(qe){return qe===te||we(qe,te,Se)}}function Je(te,Se){return Vn(te)&&ue(Se)?J(Te(te),Se):function(qe){var at=QF(qe,te);return at===void 0&&at===Se?ZF(qe,te):je(Se,at,void 0,s|o)}}function ct(te){return function(Se){return G(Se,te)}}function nt(te){if(typeof te=="string")return te;if(qu(te))return Vr?Vr.call(te):"";var Se=te+"";return Se=="0"&&1/te==-l?"-0":Se}function ft(te){return rr(te)?te:de(te)}function lt(te){return function(Se,qe,at){var Bt=Object(Se);if(!mr(Se)){var St=Oe(qe);Se=Vu(Se),qe=function(gr){return St(Bt[gr],gr,Bt)}}var cn=te(Se,qe,at);return cn>-1?Bt[St?Se[cn]:cn]:void 0}}function Dt(te,Se,qe,at,Bt,St){var cn=Bt&o,gr=te.length,Tr=Se.length;if(gr!=Tr&&!(cn&&Tr>gr))return!1;var Qr=St.get(te);if(Qr&&St.get(Se))return Qr==Se;var fi=-1,mi=!0,oi=Bt&s?new Ai:void 0;for(St.set(te,Se),St.set(Se,te);++fi<gr;){var Xi=te[fi],Qi=Se[fi];if(at)var Cs=cn?at(Qi,Xi,fi,Se,te,St):at(Xi,Qi,fi,te,Se,St);if(Cs!==void 0){if(Cs)continue;mi=!1;break}if(oi){if(!oe(Se,function(Ja,oo){if(!oi.has(oo)&&(Xi===Ja||qe(Xi,Ja,at,Bt,St)))return oi.add(oo)})){mi=!1;break}}else if(!(Xi===Qi||qe(Xi,Qi,at,Bt,St))){mi=!1;break}}return St.delete(te),St.delete(Se),mi}function At(te,Se,qe,at,Bt,St,cn){switch(qe){case k:if(te.byteLength!=Se.byteLength||te.byteOffset!=Se.byteOffset)return!1;te=te.buffer,Se=Se.buffer;case N:return!(te.byteLength!=Se.byteLength||!at(new $t(te),new $t(Se)));case f:case m:case j:return ln(+te,+Se);case g:return te.name==Se.name&&te.message==Se.message;case _:case E:return te==Se+"";case b:var gr=et;case C:var Tr=St&o;if(gr||(gr=bt),te.size!=Se.size&&!Tr)return!1;var Qr=cn.get(te);if(Qr)return Qr==Se;St|=s,cn.set(te,Se);var fi=Dt(gr(te),gr(Se),at,Bt,St,cn);return cn.delete(te),fi;case P:if(sr)return sr.call(te)==sr.call(Se)}return!1}function Ht(te,Se,qe,at,Bt,St){var cn=Bt&o,gr=Vu(te),Tr=gr.length,Qr=Vu(Se),fi=Qr.length;if(Tr!=fi&&!cn)return!1;for(var mi=Tr;mi--;){var oi=gr[mi];if(!(cn?oi in Se:kt.call(Se,oi)))return!1}var Xi=St.get(te);if(Xi&&St.get(Se))return Xi==Se;var Qi=!0;St.set(te,Se),St.set(Se,te);for(var Cs=cn;++mi<Tr;){oi=gr[mi];var Ja=te[oi],oo=Se[oi];if(at)var bS=cn?at(oo,Ja,oi,Se,te,St):at(Ja,oo,oi,te,Se,St);if(!(bS===void 0?Ja===oo||qe(Ja,oo,at,Bt,St):bS)){Qi=!1;break}Cs||(Cs=oi=="constructor")}if(Qi&&!Cs){var zu=te.constructor,Hu=Se.constructor;zu!=Hu&&"constructor"in te&&"constructor"in Se&&!(typeof zu=="function"&&zu instanceof zu&&typeof Hu=="function"&&Hu instanceof Hu)&&(Qi=!1)}return St.delete(te),St.delete(Se),Qi}function On(te,Se){var qe=te.__data__;return $i(Se)?qe[typeof Se=="string"?"string":"hash"]:qe.map}function It(te){for(var Se=Vu(te),qe=Se.length;qe--;){var at=Se[qe],Bt=te[at];Se[qe]=[at,Bt,ue(Bt)]}return Se}function Yt(te,Se){var qe=Ve(te,Se);return xe(qe)?qe:void 0}var Kt=re;(ht&&Kt(new ht(new ArrayBuffer(1)))!=k||jt&&Kt(new jt)!=b||sn&&Kt(sn.resolve())!=S||rn&&Kt(new rn)!=C||yt&&Kt(new yt)!=T)&&(Kt=function(te){var Se=Pt.call(te),qe=Se==w?te.constructor:void 0,at=qe?it(qe):void 0;if(at)switch(at){case Lt:return k;case qr:return b;case Gn:return S;case Mr:return C;case ai:return T}return Se});function nr(te,Se,qe){Se=Vn(Se,te)?[Se]:ft(Se);for(var at,Bt=-1,cn=Se.length;++Bt<cn;){var St=Te(Se[Bt]);if(!(at=te!=null&&qe(te,St)))break;te=te[St]}if(at)return at;var cn=te?te.length:0;return!!cn&&Ki(cn)&&Qn(St,cn)&&(rr(te)||xn(te))}function Qn(te,Se){return Se=Se??c,!!Se&&(typeof te=="number"||ve.test(te))&&te>-1&&te%1==0&&te<Se}function Vn(te,Se){if(rr(te))return!1;var qe=typeof te;return qe=="number"||qe=="symbol"||qe=="boolean"||te==null||qu(te)?!0:q.test(te)||!F.test(te)||Se!=null&&te in Object(Se)}function $i(te){var Se=typeof te;return Se=="string"||Se=="number"||Se=="symbol"||Se=="boolean"?te!=="__proto__":te===null}function Ea(te){return!!Et&&Et in te}function Fn(te){var Se=te&&te.constructor,qe=typeof Se=="function"&&Se.prototype||We;return te===qe}function ue(te){return te===te&&!Za(te)}function J(te,Se){return function(qe){return qe==null?!1:qe[te]===Se&&(Se!==void 0||te in Object(qe))}}var de=Xt(function(te){te=XF(te);var Se=[];return V.test(te)&&Se.push(""),te.replace(X,function(qe,at,Bt,St){Se.push(Bt?St.replace(K,"$1"):at||qe)}),Se});function Te(te){if(typeof te=="string"||qu(te))return te;var Se=te+"";return Se=="0"&&1/te==-l?"-0":Se}function it(te){if(te!=null){try{return Ot.call(te)}catch{}try{return te+""}catch{}}return""}function Ft(te,Se,qe){var at=te?te.length:0;if(!at)return-1;var Bt=qe==null?0:YF(qe);return Bt<0&&(Bt=fn(at+Bt,0)),Pe(te,Oe(Se),Bt)}var an=lt(Ft);function Xt(te,Se){if(typeof te!="function"||Se&&typeof Se!="function")throw new TypeError(i);var qe=function(){var at=arguments,Bt=Se?Se.apply(this,at):at[0],St=qe.cache;if(St.has(Bt))return St.get(Bt);var cn=te.apply(this,at);return qe.cache=St.set(Bt,cn),cn};return qe.cache=new(Xt.Cache||fr),qe}Xt.Cache=fr;function ln(te,Se){return te===Se||te!==te&&Se!==Se}
13function xn(te){return Ta(te)&&kt.call(te,"callee")&&(!pn.call(te,"callee")||Pt.call(te)==d)}var rr=Array.isArray;function mr(te){return te!=null&&Ki(te.length)&&!ka(te)}function Ta(te){return Bu(te)&&mr(te)}function ka(te){var Se=Za(te)?Pt.call(te):"";return Se==x||Se==v}function Ki(te){return typeof te=="number"&&te>-1&&te%1==0&&te<=c}function Za(te){var Se=typeof te;return!!te&&(Se=="object"||Se=="function")}function Bu(te){return!!te&&typeof te=="object"}function qu(te){return typeof te=="symbol"||Bu(te)&&Pt.call(te)==P}var GF=ee?Re(ee):Ce;function WF(te){if(!te)return te===0?te:0;if(te=KF(te),te===l||te===-l){var Se=te<0?-1:1;return Se*h}return te===te?te:0}function YF(te){var Se=WF(te),qe=Se%1;return Se===Se?qe?Se-qe:Se:0}function KF(te){if(typeof te=="number")return te;if(qu(te))return u;if(Za(te)){var Se=typeof te.valueOf=="function"?te.valueOf():te;te=Za(Se)?Se+"":Se}if(typeof te!="string")return te===0?te:+te;te=te.replace(W,"");var qe=Y.test(te);return qe||ne.test(te)?be(te.slice(2),qe?2:8):z.test(te)?u:+te}function XF(te){return te==null?"":nt(te)}function QF(te,Se,qe){var at=te==null?void 0:G(te,Se);return at===void 0?qe:at}function ZF(te,Se){return te!=null&&nr(te,Se,H)}function Vu(te){return mr(te)?Le(te):ze(te)}function JF(te){return te}function e5(te){return Vn(te)?Fe(Te(te)):ct(te)}e.exports=an})(Cd,Cd.exports)),Cd.exports}var ny,vE;function Mre(){if(vE)return ny;vE=1;function e(t){return t===void 0}return ny=e,ny}var Nd={exports:{}};Nd.exports;var bE;function $re(){return bE||(bE=1,(function(e,t){var r=200,i="__lodash_hash_undefined__",a=800,s=16,o=9007199254740991,l="[object Arguments]",c="[object Array]",h="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",p="[object Error]",f="[object Function]",m="[object GeneratorFunction]",g="[object Map]",x="[object Number]",v="[object Null]",b="[object Object]",j="[object Proxy]",w="[object RegExp]",S="[object Set]",_="[object String]",C="[object Undefined]",E="[object WeakMap]",P="[object ArrayBuffer]",T="[object DataView]",N="[object Float32Array]",k="[object Float64Array]",I="[object Int8Array]",D="[object Int16Array]",O="[object Int32Array]",$="[object Uint8Array]",U="[object Uint8ClampedArray]",B="[object Uint16Array]",L="[object Uint32Array]",A=/[\\^$.*+?()[\]{}|]/g,R=/^\[object .+?Constructor\]$/,F=/^(?:0|[1-9]\d*)$/,q={};q[N]=q[k]=q[I]=q[D]=q[O]=q[$]=q[U]=q[B]=q[L]=!0,q[l]=q[c]=q[P]=q[u]=q[T]=q[d]=q[p]=q[f]=q[g]=q[x]=q[b]=q[w]=q[S]=q[_]=q[E]=!1;var V=typeof Lr=="object"&&Lr&&Lr.Object===Object&&Lr,X=typeof self=="object"&&self&&self.Object===Object&&self,M=V||X||Function("return this")(),W=t&&!t.nodeType&&t,K=W&&!0&&e&&!e.nodeType&&e,z=K&&K.exports===W,Y=z&&V.process,ie=(function(){try{var J=K&&K.require&&K.require("util").types;return J||Y&&Y.binding&&Y.binding("util")}catch{}})(),ne=ie&&ie.isTypedArray;function ve(J,de,Te){switch(Te.length){case 0:return J.call(de);case 1:return J.call(de,Te[0]);case 2:return J.call(de,Te[0],Te[1]);case 3:return J.call(de,Te[0],Te[1],Te[2])}return J.apply(de,Te)}function pe(J,de){for(var Te=-1,it=Array(J);++Te<J;)it[Te]=de(Te);return it}function be(J){return function(de){return J(de)}}function ye(J,de){return J?.[de]}function ke(J,de){return function(Te){return J(de(Te))}}var fe=Array.prototype,se=Function.prototype,ge=Object.prototype,De=M["__core-js_shared__"],ae=se.toString,Q=ge.hasOwnProperty,ee=(function(){var J=/[^.]+$/.exec(De&&De.keys&&De.keys.IE_PROTO||"");return J?"Symbol(src)_1."+J:""})(),oe=ge.toString,Pe=ae.call(Object),Fe=RegExp("^"+ae.call(Q).replace(A,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ie=z?M.Buffer:void 0,Re=M.Symbol,Ve=M.Uint8Array;Ie&&Ie.allocUnsafe;var Xe=ke(Object.getPrototypeOf,Object),et=Object.create,rt=ge.propertyIsEnumerable,bt=fe.splice,Qe=Re?Re.toStringTag:void 0,tt=(function(){try{var J=pa(Object,"defineProperty");return J({},"",{}),J}catch{}})(),We=Ie?Ie.isBuffer:void 0,pt=Math.max,Et=Date.now,Ot=pa(M,"Map"),kt=pa(Object,"create"),Pt=(function(){function J(){}return function(de){if(!It(de))return{};if(et)return et(de);J.prototype=de;var Te=new J;return J.prototype=void 0,Te}})();function Ut(J){var de=-1,Te=J==null?0:J.length;for(this.clear();++de<Te;){var it=J[de];this.set(it[0],it[1])}}function Nn(){this.__data__=kt?kt(null):{},this.size=0}function $t(J){var de=this.has(J)&&delete this.__data__[J];return this.size-=de?1:0,de}function pn(J){var de=this.__data__;if(kt){var Te=de[J];return Te===i?void 0:Te}
vendor: 5,521 bytes, line 13
13return Q.call(de,J)?de[J]:void 0}function nn(J){var de=this.__data__;return kt?de[J]!==void 0:Q.call(de,J)}function Rn(J,de){var Te=this.__data__;return this.size+=this.has(J)?0:1,Te[J]=kt&&de===void 0?i:de,this}Ut.prototype.clear=Nn,Ut.prototype.delete=$t,Ut.prototype.get=pn,Ut.prototype.has=nn,Ut.prototype.set=Rn;function fn(J){var de=-1,Te=J==null?0:J.length;for(this.clear();++de<Te;){var it=J[de];this.set(it[0],it[1])}}function ht(){this.__data__=[],this.size=0}function jt(J){var de=this.__data__,Te=or(de,J);if(Te<0)return!1;var it=de.length-1;return Te==it?de.pop():bt.call(de,Te,1),--this.size,!0}function sn(J){var de=this.__data__,Te=or(de,J);return Te<0?void 0:de[Te][1]}function rn(J){return or(this.__data__,J)>-1}function yt(J,de){var Te=this.__data__,it=or(Te,J);return it<0?(++this.size,Te.push([J,de])):Te[it][1]=de,this}fn.prototype.clear=ht,fn.prototype.delete=jt,fn.prototype.get=sn,fn.prototype.has=rn,fn.prototype.set=yt;function Wt(J){var de=-1,Te=J==null?0:J.length;for(this.clear();++de<Te;){var it=J[de];this.set(it[0],it[1])}}function Lt(){this.size=0,this.__data__={hash:new Ut,map:new(Ot||fn),string:new Ut}}function qr(J){var de=Mi(this,J).delete(J);return this.size-=de?1:0,de}function Gn(J){return Mi(this,J).get(J)}function Mr(J){return Mi(this,J).has(J)}function ai(J,de){var Te=Mi(this,J),it=Te.size;return Te.set(J,de),this.size+=Te.size==it?0:1,this}Wt.prototype.clear=Lt,Wt.prototype.delete=qr,Wt.prototype.get=Gn,Wt.prototype.has=Mr,Wt.prototype.set=ai;function tr(J){var de=this.__data__=new fn(J);this.size=de.size}function sr(){this.__data__=new fn,this.size=0}function Vr(J){var de=this.__data__,Te=de.delete(J);return this.size=de.size,Te}function En(J){return this.__data__.get(J)}function Hi(J){return this.__data__.has(J)}function Gi(J,de){var Te=this.__data__;if(Te instanceof fn){var it=Te.__data__;if(!Ot||it.length<r-1)return it.push([J,de]),this.size=++Te.size,this;Te=this.__data__=new Wt(it)}return Te.set(J,de),this.size=Te.size,this}tr.prototype.clear=sr,tr.prototype.delete=Vr,tr.prototype.get=En,tr.prototype.has=Hi,tr.prototype.set=Gi;function zr(J,de){var Te=ft(J),it=!Te&&nt(J),Ft=!Te&&!it&&At(J),an=!Te&&!it&&!Ft&&nr(J),Xt=Te||it||Ft||an,ln=Xt?pe(J.length,String):[],xn=ln.length;for(var rr in J)Xt&&(rr=="length"||Ft&&(rr=="offset"||rr=="parent")||an&&(rr=="buffer"||rr=="byteLength"||rr=="byteOffset")||G(rr,xn))||ln.push(rr);return ln}function pr(J,de,Te){(Te!==void 0&&!ct(J[de],Te)||Te===void 0&&!(de in J))&&Ri(J,de,Te)}function Wi(J,de,Te){var it=J[de];(!(Q.call(J,de)&&ct(it,Te))||Te===void 0&&!(de in J))&&Ri(J,de,Te)}function or(J,de){for(var Te=J.length;Te--;)if(ct(J[Te][0],de))return Te;return-1}function Ri(J,de,Te){de=="__proto__"&&tt?tt(J,de,{configurable:!0,enumerable:!0,value:Te,writable:!0}):J[de]=Te}var Ya=Na();function si(J){return J==null?J===void 0?C:v:Qe&&Qe in Object(J)?Le(J):xe(J)}function ua(J){return Yt(J)&&si(J)==l}function ha(J){if(!It(J)||je(J))return!1;var de=Ht(J)?Fe:R;return de.test(Je(J))}function fr(J){return Yt(J)&&On(J.length)&&!!q[si(J)]}function Ka(J){if(!It(J))return we(J);var de=_e(J),Te=[];for(var it in J)it=="constructor"&&(de||!Q.call(J,it))||Te.push(it);return Te}function Oi(J,de,Te,it,Ft){J!==de&&Ya(de,function(an,Xt){if(Ft||(Ft=new tr),It(an))Yi(J,de,Xt,Te,Oi,it,Ft);else{var ln=it?it(Oe(J,Xt),an,Xt+"",J,de,Ft):void 0;ln===void 0&&(ln=an),pr(J,Xt,ln)}},Vn)}function Yi(J,de,Te,it,Ft,an,Xt){var ln=Oe(J,Te),xn=Oe(de,Te),rr=Xt.get(xn);if(rr){pr(J,Te,rr);return}var mr=an?an(ln,xn,Te+"",J,de,Xt):void 0,Ta=mr===void 0;if(Ta){var ka=ft(xn),Ki=!ka&&At(xn),Za=!ka&&!Ki&&nr(xn);mr=xn,ka||Ki||Za?ft(ln)?mr=ln:Dt(ln)?mr=Er(ln):Ki?(Ta=!1,mr=Ai(xn)):Za?(Ta=!1,mr=pi(xn)):mr=[]:Kt(xn)||nt(xn)?(mr=ln,nt(ln)?mr=Qn(ln):(!It(ln)||Ht(ln))&&(mr=ce(xn))):Ta=!1}Ta&&(Xt.set(xn,mr),Ft(mr,xn,it,an,Xt),Xt.delete(xn)),pr(J,Te,mr)}function _a(J,de){return ze(Ce(J,de,Fn),J+"")}var Xr=tt?function(J,de){return tt(J,"toString",{configurable:!0,enumerable:!1,value:Ea(de),writable:!0})}:Fn;function Ai(J,de){return J.slice()}function Xa(J){var de=new J.constructor(J.byteLength);return new Ve(de).set(new Ve(J)),de}function pi(J,de){var Te=Xa(J.buffer);return new J.constructor(Te,J.byteOffset,J.length)}function Er(J,de){var Te=-1,it=J.length;for(de||(de=Array(it));++Te<it;)de[Te]=J[Te];return de}function Ca(J,de,Te,it){var Ft=!Te;Te||(Te={});for(var an=-1,Xt=de.length;++an<Xt;){var ln=de[an],xn=void 0;xn===void 0&&(xn=J[ln]),Ft?Ri(Te,ln,xn):Wi(Te,ln,xn)}return Te}function Qa(J){return _a(function(de,Te){var it=-1,Ft=Te.length,an=Ft>1?Te[Ft-1]:void 0,Xt=Ft>2?Te[2]:void 0;for(an=J.length>3&&typeof an=="function"?(Ft--,an):void 0,Xt&&re(Te[0],Te[1],Xt)&&(an=Ft<3?void 0:an,Ft=1),de=Object(de);++it<Ft;){var ln=Te[it];ln&&J(de,ln,it,an)}return de})}function Na(J){return function(de,Te,it){for(var Ft=-1,an=Object(de),Xt=it(de),ln=Xt.length;ln--;){var xn=Xt[++Ft];if(Te(an[xn],xn,an)===!1)break}return de}}function Mi(J,de){var Te=J.__data__;return H(de)?Te[typeof de=="string"?"string":"hash"]:Te.map}function pa(J,de){var Te=ye(J,de);return ha(Te)?Te:void 0}function Le(J){var de=Q.call(J,Qe),Te=J[Qe];try{J[Qe]=void 0;var it=!0}catch{}var Ft=oe.call(J);return it&&(de?J[Qe]=Te:delete J[Qe]),Ft}function ce(J){return typeof J.constructor=="function"&&!_e(J)?Pt(Xe(J)):{}}function G(J,de){var Te=typeof J;return de=de??o,!!de&&(Te=="number"||Te!="symbol"&&F.test(J))&&J>-1&&J%1==0&&J<de}function re(J,de,Te){if(!It(Te))return!1;var it=typeof de;return(it=="number"?lt(Te)&&G(de,Te.length):it=="string"&&de in Te)?ct
13(Te[de],J):!1}function H(J){var de=typeof J;return de=="string"||de=="number"||de=="symbol"||de=="boolean"?J!=="__proto__":J===null}function je(J){return!!ee&&ee in J}function _e(J){var de=J&&J.constructor,Te=typeof de=="function"&&de.prototype||ge;return J===Te}function we(J){var de=[];if(J!=null)for(var Te in Object(J))de.push(Te);return de}function xe(J){return oe.call(J)}function Ce(J,de,Te){return de=pt(de===void 0?J.length-1:de,0),function(){for(var it=arguments,Ft=-1,an=pt(it.length-de,0),Xt=Array(an);++Ft<an;)Xt[Ft]=it[de+Ft];Ft=-1;for(var ln=Array(de+1);++Ft<de;)ln[Ft]=it[Ft];return ln[de]=Te(Xt),ve(J,this,ln)}}function Oe(J,de){if(!(de==="constructor"&&typeof J[de]=="function")&&de!="__proto__")return J[de]}var ze=He(Xr);function He(J){var de=0,Te=0;return function(){var it=Et(),Ft=s-(it-Te);if(Te=it,Ft>0){if(++de>=a)return arguments[0]}else de=0;return J.apply(void 0,arguments)}}function Je(J){if(J!=null){try{return ae.call(J)}catch{}try{return J+""}catch{}}return""}function ct(J,de){return J===de||J!==J&&de!==de}var nt=ua((function(){return arguments})())?ua:function(J){return Yt(J)&&Q.call(J,"callee")&&!rt.call(J,"callee")},ft=Array.isArray;function lt(J){return J!=null&&On(J.length)&&!Ht(J)}function Dt(J){return Yt(J)&&lt(J)}var At=We||ue;function Ht(J){if(!It(J))return!1;var de=si(J);return de==f||de==m||de==h||de==j}function On(J){return typeof J=="number"&&J>-1&&J%1==0&&J<=o}function It(J){var de=typeof J;return J!=null&&(de=="object"||de=="function")}function Yt(J){return J!=null&&typeof J=="object"}function Kt(J){if(!Yt(J)||si(J)!=b)return!1;var de=Xe(J);if(de===null)return!0;var Te=Q.call(de,"constructor")&&de.constructor;return typeof Te=="function"&&Te instanceof Te&&ae.call(Te)==Pe}var nr=ne?be(ne):fr;function Qn(J){return Ca(J,Vn(J))}function Vn(J){return lt(J)?zr(J):Ka(J)}var $i=Qa(function(J,de,Te){Oi(J,de,Te)});function Ea(J){return function(){return J}}function Fn(J){return J}function ue(){return!1}e.exports=$i})(Nd,Nd.exports)),Nd.exports}var Lre=function(t){return{root:{margin:0},body2:t.typography.body2,body1:t.typography.body1,caption:t.typography.caption,button:t.typography.button,h1:t.typography.h1,h2:t.typography.h2,h3:t.typography.h3,h4:t.typography.h4,h5:t.typography.h5,h6:t.typography.h6,subtitle1:t.typography.subtitle1,subtitle2:t.typography.subtitle2,overline:t.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:t.palette.primary.main},colorSecondary:{color:t.palette.secondary.main},colorTextPrimary:{color:t.palette.text.primary},colorTextSecondary:{color:t.palette.text.secondary},colorError:{color:t.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}},yE={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},Fre=y.forwardRef(function(t,r){var i=t.align,a=i===void 0?"inherit":i,s=t.classes,o=t.className,l=t.color,c=l===void 0?"initial":l,h=t.component,u=t.display,d=u===void 0?"initial":u,p=t.gutterBottom,f=p===void 0?!1:p,m=t.noWrap,g=m===void 0?!1:m,x=t.paragraph,v=x===void 0?!1:x,b=t.variant,j=b===void 0?"body1":b,w=t.variantMapping,S=w===void 0?yE:w,_=Be(t,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),C=h||(v?"p":S[j]||yE[j])||"span";return y.createElement(C,Z({className:$e(s.root,o,j!=="inherit"&&s[j],c!=="initial"&&s["color".concat(ut(c))],g&&s.noWrap,f&&s.gutterBottom,v&&s.paragraph,a!=="inherit"&&s["align".concat(ut(a))],d!=="initial"&&s["display".concat(ut(d))]),ref:r},_))});const Dr=Ye(Lre,{name:"MuiTypography"})(Fre),Ure=Object.freeze(Object.defineProperty({__proto__:null,default:Dr},Symbol.toStringTag,{value:"Module"})),Bre=Pn(Ure);var wu=y.createContext(),qre={root:{display:"table-row-group"}},Vre={variant:"body"},xE="tbody",zre=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.component,o=s===void 0?xE:s,l=Be(t,["classes","className","component"]);return y.createElement(wu.Provider,{value:Vre},y.createElement(o,Z({className:$e(i.root,a),ref:r,role:o===xE?null:"rowgroup"},l)))});const qA=Ye(qre,{name:"MuiTableBody"})(zre),Hre=Object.freeze(Object.defineProperty({__proto__:null,default:qA},Symbol.toStringTag,{value:"Module"})),Gre=Pn(Hre);var Wre=function(t){return{root:Z({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:`1px solid
14    `.concat(t.palette.type==="light"?zo(tn(t.palette.divider,1),.88):Vo(tn(t.palette.divider,1),.68)),textAlign:"left",padding:16}),head:{color:t.palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},body:{color:t.palette.text.primary},footer:{color:t.palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)},sizeSmall:{padding:"6px 24px 6px 16px","&:last-child":{paddingRight:16},"&$paddingCheckbox":{width:24,padding:"0 12px 0 16px","&:last-child":{paddingLeft:12,paddingRight:16},"& > *":{padding:0}}},paddingCheckbox:{width:48,padding:"0 0 0 4px","&:last-child":{paddingLeft:0,paddingRight:4}},paddingNone:{padding:0,"&:last-child":{padding:0}}
14,alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right",flexDirection:"row-reverse"},alignJustify:{textAlign:"justify"},stickyHeader:{position:"sticky",top:0,left:0,zIndex:2,backgroundColor:t.palette.background.default}}},Yre=y.forwardRef(function(t,r){var i=t.align,a=i===void 0?"inherit":i,s=t.classes,o=t.className,l=t.component,c=t.padding,h=t.scope,u=t.size,d=t.sortDirection,p=t.variant,f=Be(t,["align","classes","className","component","padding","scope","size","sortDirection","variant"]),m=y.useContext(UA),g=y.useContext(wu),x=g&&g.variant==="head",v,b;l?(b=l,v=x?"columnheader":"cell"):b=x?"th":"td";var j=h;!j&&x&&(j="col");var w=c||(m&&m.padding?m.padding:"normal"),S=u||(m&&m.size?m.size:"medium"),_=p||g&&g.variant,C=null;return d&&(C=d==="asc"?"ascending":"descending"),y.createElement(b,Z({ref:r,className:$e(s.root,s[_],o,a!=="inherit"&&s["align".concat(ut(a))],w!=="normal"&&s["padding".concat(ut(w))],S!=="medium"&&s["size".concat(ut(S))],_==="head"&&m&&m.stickyHeader&&s.stickyHeader),"aria-sort":C,role:v,scope:j},f))});const Kp=Ye(Wre,{name:"MuiTableCell"})(Yre),Kre=Object.freeze(Object.defineProperty({__proto__:null,default:Kp},Symbol.toStringTag,{value:"Module"})),Xre=Pn(Kre);var Qre=function(t){return{root:{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,"&$hover:hover":{backgroundColor:t.palette.action.hover},"&$selected, &$selected:hover":{backgroundColor:tn(t.palette.secondary.main,t.palette.action.selectedOpacity)}},selected:{},hover:{},head:{},footer:{}}},jE="tr",Zre=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.component,o=s===void 0?jE:s,l=t.hover,c=l===void 0?!1:l,h=t.selected,u=h===void 0?!1:h,d=Be(t,["classes","className","component","hover","selected"]),p=y.useContext(wu);return y.createElement(o,Z({ref:r,className:$e(i.root,a,p&&{head:i.head,footer:i.footer}[p.variant],c&&i.hover,u&&i.selected),role:o===jE?null:"row"},d))});const VA=Ye(Qre,{name:"MuiTableRow"})(Zre),Jre=Object.freeze(Object.defineProperty({__proto__:null,default:VA},Symbol.toStringTag,{value:"Module"})),eie=Pn(Jre);var Su=y.createContext();function zA(){return y.useContext(Su)}function xs(){return y.useContext(Su)}var tie=function(t){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:t.palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{backgroundColor:tn(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:t.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:t.palette.primary.main,"&:hover":{backgroundColor:tn(t.palette.primary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:t.palette.secondary.main,"&:hover":{backgroundColor:tn(t.palette.secondary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:t.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}},nie=y.forwardRef(function(t,r){var i=t.edge,a=i===void 0?!1:i,s=t.children,o=t.classes,l=t.className,c=t.color,h=c===void 0?"default":c,u=t.disabled,d=u===void 0?!1:u,p=t.disableFocusRipple,f=p===void 0?!1:p,m=t.size,g=m===void 0?"medium":m,x=Be(t,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return y.createElement(ni,Z({className:$e(o.root,l,h!=="default"&&o["color".concat(ut(h))],d&&o.disabled,g==="small"&&o["size".concat(ut(g))],{start:o.edgeStart,end:o.edgeEnd}[a]),centerRipple:!0,focusRipple:!f,disabled:d,ref:r},x),y.createElement("span",{className:o.label},s))});const Oo=Ye(tie,{name:"MuiIconButton"})(nie),rie=Object.freeze(Object.defineProperty({__proto__:null,default:Oo},Symbol.toStringTag,{value:"Module"}));var iie={root:{padding:9},checked:{},disabled:{},input:{cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}}
14,aie=y.forwardRef(function(t,r){var i=t.autoFocus,a=t.checked,s=t.checkedIcon,o=t.classes,l=t.className,c=t.defaultChecked,h=t.disabled,u=t.icon,d=t.id,p=t.inputProps,f=t.inputRef,m=t.name,g=t.onBlur,x=t.onChange,v=t.onFocus,b=t.readOnly,j=t.required,w=t.tabIndex,S=t.type,_=t.value,C=Be(t,["autoFocus","checked","checkedIcon","classes","className","defaultChecked","disabled","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"]),E=vs({controlled:a,default:!!c,name:"SwitchBase",state:"checked"}),P=Ci(E,2),T=P[0],N=P[1],k=xs(),I=function(L){v&&v(L),k&&k.onFocus&&k.onFocus(L)},D=function(L){g&&g(L),k&&k.onBlur&&k.onBlur(L)},O=function(L){var A=L.target.checked;N(A),x&&x(L,A)},$=h;k&&typeof $>"u"&&($=k.disabled);var U=S==="checkbox"||S==="radio";return y.createElement(Oo,Z({component:"span",className:$e(o.root,l,T&&o.checked,$&&o.disabled),disabled:$,tabIndex:null,role:void 0,onFocus:I,onBlur:D,ref:r},C),y.createElement("input",Z({autoFocus:i,checked:a,defaultChecked:c,className:o.input,disabled:$,id:U&&d,name:m,onChange:O,readOnly:b,ref:f,required:j,tabIndex:w,type:S,value:_},p)),T?s:u)});const Lw=Ye(iie,{name:"PrivateSwitchBase"})(aie),sie=ar(y.createElement("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})),oie=ar(y.createElement("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})),lie=ar(y.createElement("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}));var cie=function(t){return{root:{color:t.palette.text.secondary},checked:{},disabled:{},indeterminate:{},colorPrimary:{"&$checked":{color:t.palette.primary.main,"&:hover":{backgroundColor:tn(t.palette.primary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:t.palette.action.disabled}},colorSecondary:{"&$checked":{color:t.palette.secondary.main,"&:hover":{backgroundColor:tn(t.palette.secondary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:t.palette.action.disabled}}}},die=y.createElement(oie,null),uie=y.createElement(sie,null),hie=y.createElement(lie,null),pie=y.forwardRef(function(t,r){var i=t.checkedIcon,a=i===void 0?die:i,s=t.classes,o=t.color,l=o===void 0?"secondary":o,c=t.icon,h=c===void 0?uie:c,u=t.indeterminate,d=u===void 0?!1:u,p=t.indeterminateIcon,f=p===void 0?hie:p,m=t.inputProps,g=t.size,x=g===void 0?"medium":g,v=Be(t,["checkedIcon","classes","color","icon","indeterminate","indeterminateIcon","inputProps","size"]),b=d?f:h,j=d?f:a;return y.createElement(Lw,Z({type:"checkbox",classes:{root:$e(s.root,s["color".concat(ut(l))],d&&s.indeterminate),checked:s.checked,disabled:s.disabled},color:l,inputProps:Z({"data-indeterminate":d},m),icon:y.cloneElement(b,{fontSize:b.props.fontSize===void 0&&x==="small"?x:b.props.fontSize}),checkedIcon:y.cloneElement(j,{fontSize:j.props.fontSize===void 0&&x==="small"?x:j.props.fontSize}),ref:r},v))});const HA=Ye(cie,{name:"MuiCheckbox"})(pie),fie=Object.freeze(Object.defineProperty({__proto__:null,default:HA},Symbol.toStringTag,{value:"Module"})),mie=Pn(fie),gie=Pn(rie);var Sc={},wE;function GA(){if(wE)return Sc;wE=1;var e=vn(),t=bn();Object.defineProperty(Sc,"__esModule",{value:!0}),Sc.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight");return Sc.default=a,Sc}const vie=ar(y.createElement("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}));var bie=function(t){var r=t.palette.type==="light"?t.palette.grey[300]:t.palette.grey[700],i=tn(t.palette.text.primary,.26);return{root:{fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:t.palette.getContrastText(r),backgroundColor:r,borderRadius:32/2,whiteSpace:"nowrap",transition:t.transitions.create(["background-color","box-shadow"]),cursor:"default",outline:0,textDecoration:"none",border:"none",padding:0,verticalAlign:"middle",boxSizing:"border-box","&$disabled":{opacity:.5,pointerEvents:"none"},"& $avatar":{marginLeft:5,marginRight:-6,width:24,height:24,color:t.palette.type==="light"?t.palette.grey[700]:t.palette.grey[300],fontSize:t.typography.pxToRem(12)},"& $avatarColorPrimary":{color:t.palette.primary.contrastText,backgroundColor:t.palette.primary.dark}
14,"& $avatarColorSecondary":{color:t.palette.secondary.contrastText,backgroundColor:t.palette.secondary.dark},"& $avatarSmall":{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:t.typography.pxToRem(10)}},sizeSmall:{height:24},colorPrimary:{backgroundColor:t.palette.primary.main,color:t.palette.primary.contrastText},colorSecondary:{backgroundColor:t.palette.secondary.main,color:t.palette.secondary.contrastText},disabled:{},clickable:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover, &:focus":{backgroundColor:Ia(r,.08)},"&:active":{boxShadow:t.shadows[1]}},clickableColorPrimary:{"&:hover, &:focus":{backgroundColor:Ia(t.palette.primary.main,.08)}},clickableColorSecondary:{"&:hover, &:focus":{backgroundColor:Ia(t.palette.secondary.main,.08)}},deletable:{"&:focus":{backgroundColor:Ia(r,.08)}},deletableColorPrimary:{"&:focus":{backgroundColor:Ia(t.palette.primary.main,.2)}},deletableColorSecondary:{"&:focus":{backgroundColor:Ia(t.palette.secondary.main,.2)}},outlined:{backgroundColor:"transparent",border:"1px solid ".concat(t.palette.type==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:tn(t.palette.text.primary,t.palette.action.hoverOpacity)},"& $avatar":{marginLeft:4},"& $avatarSmall":{marginLeft:2},"& $icon":{marginLeft:4},"& $iconSmall":{marginLeft:2},"& $deleteIcon":{marginRight:5},"& $deleteIconSmall":{marginRight:3}},outlinedPrimary:{color:t.palette.primary.main,border:"1px solid ".concat(t.palette.primary.main),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:tn(t.palette.primary.main,t.palette.action.hoverOpacity)}},outlinedSecondary:{color:t.palette.secondary.main,border:"1px solid ".concat(t.palette.secondary.main),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:tn(t.palette.secondary.main,t.palette.action.hoverOpacity)}},avatar:{},avatarSmall:{},avatarColorPrimary:{},avatarColorSecondary:{},icon:{color:t.palette.type==="light"?t.palette.grey[700]:t.palette.grey[300],marginLeft:5,marginRight:-6},iconSmall:{width:18,height:18,marginLeft:4,marginRight:-4},iconColorPrimary:{color:"inherit"},iconColorSecondary:{color:"inherit"},label:{overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},labelSmall:{paddingLeft:8,paddingRight:8},deleteIcon:{WebkitTapHighlightColor:"transparent",color:i,height:22,width:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:tn(i,.4)}},deleteIconSmall:{height:16,width:16,marginRight:4,marginLeft:-4},deleteIconColorPrimary:{color:tn(t.palette.primary.contrastText,.7),"&:hover, &:active":{color:t.palette.primary.contrastText}},deleteIconColorSecondary:{color:tn(t.palette.secondary.contrastText,.7),"&:hover, &:active":{color:t.palette.secondary.contrastText}},deleteIconOutlinedColorPrimary:{color:tn(t.palette.primary.main,.7),"&:hover, &:active":{color:t.palette.primary.main}},deleteIconOutlinedColorSecondary:{color:tn(t.palette.secondary.main,.7),"&:hover, &:active":{color:t.palette.secondary.main}}}};function SE(e){return e.key==="Backspace"||e.key==="Delete"}var yie=y.forwardRef(function(t,r){var i=t.avatar,a=t.classes,s=t.className,o=t.clickable,l=t.color,c=l===void 0?"default":l,h=t.component,u=t.deleteIcon,d=t.disabled,p=d===void 0?!1:d,f=t.icon,m=t.label,g=t.onClick,x=t.onDelete,v=t.onKeyDown,b=t.onKeyUp,j=t.size,w=j===void 0?"medium":j,S=t.variant,_=S===void 0?"default":S,C=Be(t,["avatar","classes","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant"]),E=y.useRef(null),P=mn(E,r),T=function(F){F.stopPropagation(),x&&x(F)},N=function(F){F.currentTarget===F.target&&SE(F)&&F.preventDefault(),v&&v(F)},k=function(F){F.currentTarget===F.target&&(x&&SE(F)?x(F):F.key==="Escape"&&E.current&&E.current.blur()),b&&b(F)},I=o!==!1&&g?!0:o,D=w==="small",O=h||(I?ni:"div"),$=O===ni?{component:"div"}:{},U=null;if(x){var B=$e(c!=="default"&&(_==="default"?a["deleteIconColor".concat(ut(c))]:a["deleteIconOutlinedColor".concat(ut(c))]),D&&a.deleteIconSmall);U=u&&y.isValidElement(u)?y.cloneElement(u,{className:$e(u.props.className,a.deleteIcon,B),onClick:T}):y.createElement(vie,{className:$e(a.deleteIcon,B),onClick:T})}var L=null;i&&y.isValidElement(i)&&(L=y.cloneElement(i,{className:$e(a.avatar,i.props.className,D&&a.avatarSmall,c!=="default"&&a["avatarColor".concat(ut(c))])}));var A=null;return f&&y.isValidElement(f)&&(A=y.cloneElement(f,{className:$e(a.icon,f.props.className,D&&a.iconSmall,c!=="default"&&a["iconColor".concat(ut(c))])})),y.createElement(O,Z({role:I||x?"button":void 0,className:$e(a.root,s,c!=="default"&&[a["color".concat(ut(c))],I&&a["clickableColor".concat(ut(c))],x&&a["deletableColor".concat(ut(c))]],_!=="default"&&[a.outlined,{primary:a.outlinedPrimary,secondary:a.outlinedSecondary}[c]],p&&a.disabled,D&&a.sizeSmall,I&&a.clickable,x&&a.deletable),"aria-disabled":p?!0:void 0,tabIndex:I||x?0:void 0,onClick:g,onKeyDown:N,onKeyUp:k,ref:P},$,C),L||A,y.createElement("span",{className:$e(a.label,D&&a.labelSmall)},m),U)});const WA=Ye(bie,{name:"MuiChip"})(yie),xie=Object.freeze(Object.defineProperty({__proto__:null,default:WA},Symbol.toStringTag,{value:"Module"})),jie=Pn(xie);var wie={root:{display:"table-header-group"}},Sie={variant:"head"},_E="thead",_ie=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.component,o=s===void 0?_E:s,l=Be(t,["classes","className","component"]);return y.createElement(wu.Provider,{value:Sie},y.createElement(o,Z({className:$e(i.root,a),ref:r,role:o===_E?null:"rowgroup"},l)))});const YA=Ye(wie,{name:"MuiTableHead"})(_ie),Cie=Object.freeze(Object.defineProperty({__proto__:null,default:YA},Symbol.toStringTag,{value:"Module"})),Nie=Pn(Cie),Eie=ar(y.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}));var Tie=function(t){return{root:{cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:t.palette.text.secondary},"&:hover":{color:t.palette.text.secondary,"& $icon":{opacity:.5}},"&$active":{color:t.palette.text.primary,"&& $icon":{opacity:1,color:t.palette.text.secondary}}},active:{},icon:{fontSize:18,marginRight:4,marginLeft:4,opacity:0,transition:t.transitions.create(["opacity","transform"],{duration:t.transitions.duration.shorter}),userSelect:"none"},iconDirectionDesc:{transform:"rotate(0deg)"},iconDirectionAsc:{transform:"rotate(180deg)"}}},kie=y.forwardRef(function(t,r){var i=t.active,a=i===void 0?!1:i,s=t.children,o=t.classes,l=t.className,c=t.direction,h=c===void 0?"asc":c,u=t.hideSortIcon,d=u===void 0?!1:u,p=t.IconComponent,f=p===void 0?Eie:p,m=Be(t,["active","children","classes","className","direction","hideSortIcon","IconComponent"]);return y.createElement(ni,Z({className:$e(o.root,l,a&&o.active),component:"span",disableRipple:!0,ref:r},m),s,d&&!a?null:y.createElement(f,{className:$e(o.icon,o["iconDirection".concat(ut(h))])}))});const KA=Ye(Tie,{name:"MuiTableSortLabel"})(kie),Pie=Object.freeze(Object.defineProperty({__proto__:null,default:KA},Symbol.toStringTag,{value:"Module"})),Iie=Pn(Pie),Die=Pn(yJ);var _c={},CE;function Rie(){if(CE)return _c;CE=1;var e=vn(),t=bn();Object.defineProperty(_c,"__esModule",{value:!0}),_c.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59
14-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}),"Help");return _c.default=a,_c}var Oie={root:{display:"table-footer-group"}},Aie={variant:"footer"},NE="tfoot",Mie=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.component,o=s===void 0?NE:s,l=Be(t,["classes","className","component"]);return y.createElement(wu.Provider,{value:Aie},y.createElement(o,Z({className:$e(i.root,a),ref:r,role:o===NE?null:"rowgroup"},l)))});const XA=Ye(Oie,{name:"MuiTableFooter"})(Mie),$ie=Object.freeze(Object.defineProperty({__proto__:null,default:XA},Symbol.toStringTag,{value:"Module"})),Lie=Pn($ie);function nc(e){var t=e.props,r=e.states,i=e.muiFormControl;return r.reduce(function(a,s){return a[s]=t[s],i&&typeof t[s]>"u"&&(a[s]=i[s]),a},{})}function nh(e,t){return parseInt(e[t],10)||0}var Fie=typeof window<"u"?y.useLayoutEffect:y.useEffect,Uie={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}},Ra=y.forwardRef(function(t,r){var i=t.onChange,a=t.rows,s=t.rowsMax,o=t.rowsMin,l=t.maxRows,c=t.minRows,h=c===void 0?1:c,u=t.style,d=t.value,p=Be(t,["onChange","rows","rowsMax","rowsMin","maxRows","minRows","style","value"]),f=l||s,m=a||o||h,g=y.useRef(d!=null),x=g.current,v=y.useRef(null),b=mn(r,v),j=y.useRef(null),w=y.useRef(0),S=y.useState({}),_=S[0],C=S[1],E=y.useCallback(function(){var T=v.current,N=window.getComputedStyle(T),k=j.current;k.style.width=N.width,k.value=T.value||t.placeholder||"x",k.value.slice(-1)===`
15`&&(k.value+=" ");var I=N["box-sizing"],D=nh(N,"padding-bottom")+nh(N,"padding-top"),O=nh(N,"border-bottom-width")+nh(N,"border-top-width"),$=k.scrollHeight-D;k.value="x";var U=k.scrollHeight-D,B=$;m&&(B=Math.max(Number(m)*U,B)),f&&(B=Math.min(Number(f)*U,B)),B=Math.max(B,U);var L=B+(I==="border-box"?D+O:0),A=Math.abs(B-$)<=1;C(function(R){return w.current<20&&(L>0&&Math.abs((R.outerHeightStyle||0)-L)>1||R.overflow!==A)?(w.current+=1,{overflow:A,outerHeightStyle:L}):R})},[f,m,t.placeholder]);y.useEffect(function(){var T=La(function(){w.current=0,E()});return window.addEventListener("resize",T),function(){T.clear(),window.removeEventListener("resize",T)}},[E]),Fie(function(){E()}),y.useEffect(function(){w.current=0},[d]);var P=function(N){w.current=0,x||E(),i&&i(N)};return y.createElement(y.Fragment,null,y.createElement("textarea",Z({value:d,onChange:P,ref:b,rows:m,style:Z({height:_.outerHeightStyle,overflow:_.overflow?"hidden":null},u)},p)),y.createElement("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:j,tabIndex:-1,style:Z({},Uie.shadow,u)}))});function EE(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Fw(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return e&&(EE(e.value)&&e.value!==""||t&&EE(e.defaultValue)&&e.defaultValue!=="")}function Bie(e){return e.startAdornment}var qie=function(t){var r=t.palette.type==="light",i={color:"currentColor",opacity:r?.42:.5,transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})},a={opacity:"0 !important"},s={opacity:r?.42:.5};return{"@global":{"@keyframes mui-auto-fill":{},"@keyframes mui-auto-fill-cancel":{}},root:Z({},t.typography.body1,{color:t.palette.text.primary,lineHeight:"1.1876em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center","&$disabled":{color:t.palette.text.disabled,cursor:"default"}}),formControl:{},focused:{},disabled:{},adornedStart:{},adornedEnd:{},error:{},marginDense:{},multiline:{padding:"".concat(6,"px 0 ").concat(7,"px"),"&$marginDense":{paddingTop:3}},colorSecondary:{},fullWidth:{width:"100%"},input:{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"".concat(6,"px 0 ").concat(7,"px"),border:0,boxSizing:"content-box",background:"none",height:"1.1876em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{"-webkit-appearance":"none"},"label[data-shrink=false] + $formControl &":{"&::-webkit-input-placeholder":a,"&::-moz-placeholder":a,"&:-ms-input-placeholder":a,"&::-ms-input-placeholder":a,"&:focus::-webkit-input-placeholder":s,"&:focus::-moz-placeholder":s,"&:focus:-ms-input-placeholder":s,"&:focus::-ms-input-placeholder":s},"&$disabled":{opacity:1},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},inputMarginDense:{paddingTop:3},inputMultiline:{height:"auto",resize:"none",padding:0},inputTypeSearch:{"-moz-appearance":"textfield","-webkit-appearance":"textfield"},inputAdornedStart:{},inputAdornedEnd:{},inputHiddenLabel:{}}},Vie=typeof window>"u"?y.useEffect:y.useLayoutEffect,zie=y.forwardRef(function(t,r){var i=t["aria-describedby"],a=t.autoComplete,s=t.autoF
15ocus,o=t.classes,l=t.className;t.color;var c=t.defaultValue,h=t.disabled,u=t.endAdornment;t.error;var d=t.fullWidth,p=d===void 0?!1:d,f=t.id,m=t.inputComponent,g=m===void 0?"input":m,x=t.inputProps,v=x===void 0?{}:x,b=t.inputRef;t.margin;var j=t.multiline,w=j===void 0?!1:j,S=t.name,_=t.onBlur,C=t.onChange,E=t.onClick,P=t.onFocus,T=t.onKeyDown,N=t.onKeyUp,k=t.placeholder,I=t.readOnly,D=t.renderSuffix,O=t.rows,$=t.rowsMax,U=t.rowsMin,B=t.maxRows,L=t.minRows,A=t.startAdornment,R=t.type,F=R===void 0?"text":R,q=t.value,V=Be(t,["aria-describedby","autoComplete","autoFocus","classes","className","color","defaultValue","disabled","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","rowsMax","rowsMin","maxRows","minRows","startAdornment","type","value"]),X=v.value!=null?v.value:q,M=y.useRef(X!=null),W=M.current,K=y.useRef(),z=y.useCallback(function(Ie){},[]),Y=mn(v.ref,z),ie=mn(b,Y),ne=mn(K,ie),ve=y.useState(!1),pe=ve[0],be=ve[1],ye=zA(),ke=nc({props:t,muiFormControl:ye,states:["color","disabled","error","hiddenLabel","margin","required","filled"]});ke.focused=ye?ye.focused:pe,y.useEffect(function(){!ye&&h&&pe&&(be(!1),_&&_())},[ye,h,pe,_]);var fe=ye&&ye.onFilled,se=ye&&ye.onEmpty,ge=y.useCallback(function(Ie){Fw(Ie)?fe&&fe():se&&se()},[fe,se]);Vie(function(){W&&ge({value:X})},[X,ge,W]);var De=function(Re){if(ke.disabled){Re.stopPropagation();return}P&&P(Re),v.onFocus&&v.onFocus(Re),ye&&ye.onFocus?ye.onFocus(Re):be(!0)},ae=function(Re){_&&_(Re),v.onBlur&&v.onBlur(Re),ye&&ye.onBlur?ye.onBlur(Re):be(!1)},Q=function(Re){if(!W){var Ve=Re.target||K.current;if(Ve==null)throw new Error(Po(1));ge({value:Ve.value})}for(var Xe=arguments.length,et=new Array(Xe>1?Xe-1:0),rt=1;rt<Xe;rt++)et[rt-1]=arguments[rt];v.onChange&&v.onChange.apply(v,[Re].concat(et)),C&&C.apply(void 0,[Re].concat(et))};y.useEffect(function(){ge(K.current)},[]);var ee=function(Re){K.current&&Re.currentTarget===Re.target&&K.current.focus(),E&&E(Re)},oe=g,Pe=Z({},v,{ref:ne});typeof oe!="string"?Pe=Z({inputRef:ne,type:F},Pe,{ref:null}):w?O&&!B&&!L&&!$&&!U?oe="textarea":(Pe=Z({minRows:O||L,rowsMax:$,maxRows:B},Pe),oe=Ra):Pe=Z({type:F},Pe);var Fe=function(Re){ge(Re.animationName==="mui-auto-fill-cancel"?K.current:{value:"x"})};return y.useEffect(function(){ye&&ye.setAdornedStart(!!A)},[ye,A]),y.createElement("div",Z({className:$e(o.root,o["color".concat(ut(ke.color||"primary"))],l,ke.disabled&&o.disabled,ke.error&&o.error,p&&o.fullWidth,ke.focused&&o.focused,ye&&o.formControl,w&&o.multiline,A&&o.adornedStart,u&&o.adornedEnd,ke.margin==="dense"&&o.marginDense),onClick:ee,ref:r},V),A,y.createElement(Su.Provider,{value:null},y.createElement(oe,Z({"aria-invalid":ke.error,"aria-describedby":i,autoComplete:a,autoFocus:s,defaultValue:c,disabled:ke.disabled,id:f,onAnimationStart:Fe,name:S,placeholder:k,readOnly:I,required:ke.required,rows:O,value:X,onKeyDown:T,onKeyUp:N},Pe,{className:$e(o.input,v.className,ke.disabled&&o.disabled,w&&o.inputMultiline,ke.hiddenLabel&&o.inputHiddenLabel,A&&o.inputAdornedStart,u&&o.inputAdornedEnd,F==="search"&&o.inputTypeSearch,ke.margin==="dense"&&o.inputMarginDense),onBlur:ae,onChange:Q,onFocus:De}))),u,D?D(Z({},ke,{startAdornment:A})):null)});const _u=Ye(qie,{name:"MuiInputBase"})(zie);var No=y.createContext({}),Hie=function(t){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:t.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:t.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(t.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:t.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}},Gie=typeof window>"u"?y.useEffect:y.useLayoutEffect,Wie=y.forwardRef(function(t,r){var i=t.alignItems,a=i===void 0?"center":i,s=t.autoF
15ocus,o=s===void 0?!1:s,l=t.button,c=l===void 0?!1:l,h=t.children,u=t.classes,d=t.className,p=t.component,f=t.ContainerComponent,m=f===void 0?"li":f,g=t.ContainerProps;g=g===void 0?{}:g;var x=g.className,v=Be(g,["className"]),b=t.dense,j=b===void 0?!1:b,w=t.disabled,S=w===void 0?!1:w,_=t.disableGutters,C=_===void 0?!1:_,E=t.divider,P=E===void 0?!1:E,T=t.focusVisibleClassName,N=t.selected,k=N===void 0?!1:N,I=Be(t,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),D=y.useContext(No),O={dense:j||D.dense||!1,alignItems:a},$=y.useRef(null);Gie(function(){o&&$.current&&$.current.focus()},[o]);var U=y.Children.toArray(h),B=U.length&&ls(U[U.length-1],["ListItemSecondaryAction"]),L=y.useCallback(function(q){$.current=Fr.findDOMNode(q)},[]),A=mn(L,r),R=Z({className:$e(u.root,d,O.dense&&u.dense,!C&&u.gutters,P&&u.divider,S&&u.disabled,c&&u.button,a!=="center"&&u.alignItemsFlexStart,B&&u.secondaryAction,k&&u.selected),disabled:S},I),F=p||"li";return c&&(R.component=p||"div",R.focusVisibleClassName=$e(u.focusVisible,T),F=ni),B?(F=!R.component&&!p?"div":F,m==="li"&&(F==="li"?F="div":R.component==="li"&&(R.component="div")),y.createElement(No.Provider,{value:O},y.createElement(m,Z({className:$e(u.container,x),ref:A},v),y.createElement(F,R,U),U.pop()))):y.createElement(No.Provider,{value:O},y.createElement(F,Z({ref:A},R),U))});const QA=Ye(Hie,{name:"MuiListItem"})(Wie);var Yie=function(t){return{root:Z({},t.typography.body1,Ct({minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",width:"auto",overflow:"hidden",whiteSpace:"nowrap"},t.breakpoints.up("sm"),{minHeight:"auto"})),gutters:{},selected:{},dense:Z({},t.typography.body2,{minHeight:"auto"})}},Kie=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.component,o=s===void 0?"li":s,l=t.disableGutters,c=l===void 0?!1:l,h=t.ListItemClasses,u=t.role,d=u===void 0?"menuitem":u,p=t.selected,f=t.tabIndex,m=Be(t,["classes","className","component","disableGutters","ListItemClasses","role","selected","tabIndex"]),g;return t.disabled||(g=f!==void 0?f:-1),y.createElement(QA,Z({button:!0,role:d,tabIndex:g,component:o,selected:p,disableGutters:c,classes:Z({dense:i.dense},h),className:$e(i.root,a,p&&i.selected,!c&&i.gutters),ref:r},m))});const ei=Ye(Yie,{name:"MuiMenuItem"})(Kie),Xie=Object.freeze(Object.defineProperty({__proto__:null,default:ei},Symbol.toStringTag,{value:"Module"}));function ZA(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}function Qie(e){var t=Ir(e);return t.body===e?du(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Od(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function TE(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function kE(e,t,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[],a=arguments.length>4?arguments[4]:void 0,s=[t,r].concat(xr(i)),o=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,function(l){l.nodeType===1&&s.indexOf(l)===-1&&o.indexOf(l.tagName)===-1&&Od(l,a)})}function ry(e,t){var r=-1;return e.some(function(i,a){return t(i)?(r=a,!0):!1}),r}function Zie(e,t){var r=[],i=[],a=e.container,s;if(!t.disableScrollLock){if(Qie(a)){var o=ZA();r.push({value:a.style.paddingRight,key:"padding-right",el:a}),a.style["padding-right"]="".concat(TE(a)+o,"px"),s=Ir(a).querySelectorAll(".mui-fixed"),[].forEach.call(s,function(u){i.push(u.style.paddingRight),u.style.paddingRight="".concat(TE(u)+o,"px")})}var l=a.parentElement,c=l.nodeName==="HTML"&&window.getComputedStyle(l)["overflow-y"]==="scroll"?l:a;r.push({value:c.style.overflow,key:"overflow",el:c}),c.style.overflow="hidden"}var h=function(){s&&[].forEach.call(s,function(d,p){i[p]?d.style.paddingRight=i[p]:d.style.removeProperty("padding-right")}),r.forEach(function(d){var p=d.value,f=d.el,m=d.key;p?f.style.setProperty(m,p):f.style.removeProperty(m)})};return h}function Jie(e){var t=[];return[].forEach.call(e.children,function(r){r.getAttribute&&r.getAttribute("aria-hidden")==="true"&&t.push(r)}),t}var JA=(function(){function e(){la(this,e),this.modals=[],this.containers=[]}return Pi(e,[{key:"add",value:function(r,i){var a=this.modals.indexOf(r);if(a!==-1)return a;a=this.modals.length,this.modals.push(r),r.modalRef&&Od(r.modalRef,!1);var s=Jie(i);kE(i,r.mountNode,r.modalRef,s,!0);var o=ry(this.containers,function(l){return l.container===i});return o!==-1?(this.containers[o].modals.push(r),a):(this.containers.push({modals:[r],container:i,restore:null,hiddenSiblingNodes:s}),a)}},{key:"mount",value:function(r,i){var a=ry(this.containers,function(o){return o.modals.indexOf(r)!==-1}),s=this.containers[a];s.restore||(s.restore=Zie(s,i))}},{key:"remove",value:function(r){var i=this.modals.indexOf(r);if(i===-1)return i;var a=ry(this.containers,function(l){return l.modals.indexOf(r)!==-1}),s=this.containers[a];if(s.modals.splice(s.modals.indexOf(r),1),this.modals.splice(i,1),s.modals.length===0)s.restore&&s.restore(
15),r.modalRef&&Od(r.modalRef,!0),kE(s.container,r.mountNode,r.modalRef,s.hiddenSiblingNodes,!1),this.containers.splice(a,1);else{var o=s.modals[s.modals.length-1];o.modalRef&&Od(o.modalRef,!1)}return i}},{key:"isTopModal",value:function(r){return this.modals.length>0&&this.modals[this.modals.length-1]===r}}]),e})();function e2(e){var t=e.children,r=e.disableAutoFocus,i=r===void 0?!1:r,a=e.disableEnforceFocus,s=a===void 0?!1:a,o=e.disableRestoreFocus,l=o===void 0?!1:o,c=e.getDoc,h=e.isEnabled,u=e.open,d=y.useRef(),p=y.useRef(null),f=y.useRef(null),m=y.useRef(),g=y.useRef(null),x=y.useCallback(function(j){g.current=Fr.findDOMNode(j)},[]),v=mn(t.ref,x),b=y.useRef();return y.useEffect(function(){b.current=u},[u]),!b.current&&u&&typeof window<"u"&&(m.current=c().activeElement),y.useEffect(function(){if(u){var j=Ir(g.current);!i&&g.current&&!g.current.contains(j.activeElement)&&(g.current.hasAttribute("tabIndex")||g.current.setAttribute("tabIndex",-1),g.current.focus());var w=function(){var E=g.current;if(E!==null){if(!j.hasFocus()||s||!h()||d.current){d.current=!1;return}g.current&&!g.current.contains(j.activeElement)&&g.current.focus()}},S=function(E){s||!h()||E.keyCode!==9||j.activeElement===g.current&&(d.current=!0,E.shiftKey?f.current.focus():p.current.focus())};j.addEventListener("focus",w,!0),j.addEventListener("keydown",S,!0);var _=setInterval(function(){w()},50);return function(){clearInterval(_),j.removeEventListener("focus",w,!0),j.removeEventListener("keydown",S,!0),l||(m.current&&m.current.focus&&m.current.focus(),m.current=null)}}},[i,s,l,h,u]),y.createElement(y.Fragment,null,y.createElement("div",{tabIndex:0,ref:p,"data-test":"sentinelStart"}),y.cloneElement(t,{ref:v}),y.createElement("div",{tabIndex:0,ref:f,"data-test":"sentinelEnd"}))}var PE={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},eae=y.forwardRef(function(t,r){var i=t.invisible,a=i===void 0?!1:i,s=t.open,o=Be(t,["invisible","open"]);return s?y.createElement("div",Z({"aria-hidden":!0,ref:r},o,{style:Z({},PE.root,a?PE.invisible:{},o.style)})):null});function tae(e){return e=typeof e=="function"?e():e,Fr.findDOMNode(e)}function nae(e){return e.children?e.children.props.hasOwnProperty("in"):!1}var rae=new JA,iae=function(t){return{root:{position:"fixed",zIndex:t.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}},Wf=y.forwardRef(function(t,r){var i=Qs(),a=au({name:"MuiModal",props:Z({},t),theme:i}),s=a.BackdropComponent,o=s===void 0?eae:s,l=a.BackdropProps,c=a.children,h=a.closeAfterTransition,u=h===void 0?!1:h,d=a.container,p=a.disableAutoFocus,f=p===void 0?!1:p,m=a.disableBackdropClick,g=m===void 0?!1:m,x=a.disableEnforceFocus,v=x===void 0?!1:x,b=a.disableEscapeKeyDown,j=b===void 0?!1:b,w=a.disablePortal,S=w===void 0?!1:w,_=a.disableRestoreFocus,C=_===void 0?!1:_,E=a.disableScrollLock,P=E===void 0?!1:E,T=a.hideBackdrop,N=T===void 0?!1:T,k=a.keepMounted,I=k===void 0?!1:k,D=a.manager,O=D===void 0?rae:D,$=a.onBackdropClick,U=a.onClose,B=a.onEscapeKeyDown,L=a.onRendered,A=a.open,R=Be(a,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),F=y.useState(!0),q=F[0],V=F[1],X=y.useRef({}),M=y.useRef(null),W=y.useRef(null),K=mn(W,r),z=nae(a),Y=function(){return Ir(M.current)},ie=function(){return X.current.modalRef=W.current,X.current.mountNode=M.current,X.current},ne=function(){O.mount(ie(),{disableScrollLock:P}),W.current.scrollTop=0},ve=Un(function(){var Q=tae(d)||Y().body;O.add(ie(),Q),W.current&&ne()}),pe=y.useCallback(function(){return O.isTopModal(ie())},[O]),be=Un(function(Q){M.current=Q,Q&&(L&&L(),A&&pe()?ne():Od(W.current,!0))}),ye=y.useCallback(function(){O.remove(ie())},[O]);if(y.useEffect(function(){return function(){ye()}},[ye]),y.useEffect(function(){A?ve():(!z||!u)&&ye()},[A,ye,z,u,ve]),!I&&!A&&(!z||q))return null;var ke=function(){V(!1)},fe=function(){V(!0),u&&ye()},se=function(ee){ee.target===ee.currentTarget&&($&&$(ee),!g&&U&&U(ee,"backdropClick"))},ge=function(ee){ee.key!=="Escape"||!pe()||(B&&B(ee),j||(ee.stopPropagation(),U&&U(ee,"escapeKeyDown")))},De=iae(i||{zIndex:TR}),ae={};return c.props.tabIndex===void 0&&(ae.tabIndex=c.props.tabIndex||"-1"),z&&(ae.onEnter=Ma(ke,c.props.onEnter),ae.onExited=Ma(fe,c.props.onExited)),y.createElement(Tw,{ref:be,container:d,disablePortal:S},y.createElement("div",Z({ref:K,onKeyDown:ge,role:"presentation"},R,{style:Z({},De.root,!A&&q?De.hidden:{},R.style)}),N?null:y.createElement(o,Z({open:A,onClick:se},l)),y.createElement(e2,{disableEnforceFocus:v,disableAutoFocus:f,disableRestoreFocus:C,getDoc:Y,isEnabled:pe,open:A},y.cloneElement(c,ae))))});function IE(e,t){var r=0;return typeof t=="number"?r=t:t==="center"?r=e.height/2:t==="bottom"&&(r=e.height),r}function DE(e,t){var r=0;return typeof t=="number"?r=t:t==="center"?r=e.width/2:t==="right"&&(r=e.width),r}function RE(e){return[e.horizontal,e.vertical].map(function(t){return typeof t=="number"?"".concat(t,"px"):t}).join(" ")}function aae(e,t){for(var r=t,i=0;r&&r!==e;)r=r.parentElement,i+=r.scrollTop;return i}function iy(e){return typeof e=="function"?e():e}var sae={root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},oae=y.forwardRef(function(t,r){var i=t.action,a=t.anchorEl,s=t.anchorOrigin,o=s===void 0?{vertical:"top",horizontal:"left"}:s,l=t.anchorPosition,c=t.anchorReference,h=c===void 0?"anchorEl":c,u=t.children,d=t.classes,p=t.className,f=t.container,m=t.elevation,g=m===void 0?8:m,x=t.getContentAnchorEl,v=t.marginThreshold,b=v===void 0?16:v,j=t.onEnter,w=t.onEntered,S=t.onEntering,_=t.onExit,C=t.onExited,E=t.onExiting,P=t.open,T=t.PaperProps,N=T===void 0?{}:T,k=t.transformOrigin,I=k===void 0?{vertical:"top",horizontal:"left"}:k,D=t.TransitionComponent,O=D===void 0?ec:D,$=t.transitionDuration,U=$===void 0?"auto":$,B=t.TransitionProps,L=B===void 0?{}:B,A=Be(t,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","o
15pen","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),R=y.useRef(),F=y.useCallback(function(ie){if(h==="anchorPosition")return l;var ne=iy(a),ve=ne&&ne.nodeType===1?ne:Ir(R.current).body,pe=ve.getBoundingClientRect(),be=ie===0?o.vertical:"center";return{top:pe.top+IE(pe,be),left:pe.left+DE(pe,o.horizontal)}},[a,o.horizontal,o.vertical,l,h]),q=y.useCallback(function(ie){var ne=0;if(x&&h==="anchorEl"){var ve=x(ie);if(ve&&ie.contains(ve)){var pe=aae(ie,ve);ne=ve.offsetTop+ve.clientHeight/2-pe||0}}return ne},[o.vertical,h,x]),V=y.useCallback(function(ie){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return{vertical:IE(ie,I.vertical)+ne,horizontal:DE(ie,I.horizontal)}},[I.horizontal,I.vertical]),X=y.useCallback(function(ie){var ne=q(ie),ve={width:ie.offsetWidth,height:ie.offsetHeight},pe=V(ve,ne);if(h==="none")return{top:null,left:null,transformOrigin:RE(pe)};var be=F(ne),ye=be.top-pe.vertical,ke=be.left-pe.horizontal,fe=ye+ve.height,se=ke+ve.width,ge=du(iy(a)),De=ge.innerHeight-b,ae=ge.innerWidth-b;if(ye<b){var Q=ye-b;ye-=Q,pe.vertical+=Q}else if(fe>De){var ee=fe-De;ye-=ee,pe.vertical+=ee}if(ke<b){var oe=ke-b;ke-=oe,pe.horizontal+=oe}else if(se>ae){var Pe=se-ae;ke-=Pe,pe.horizontal+=Pe}return{top:"".concat(Math.round(ye),"px"),left:"".concat(Math.round(ke),"px"),transformOrigin:RE(pe)}},[a,h,F,q,V,b]),M=y.useCallback(function(){var ie=R.current;if(ie){var ne=X(ie);ne.top!==null&&(ie.style.top=ne.top),ne.left!==null&&(ie.style.left=ne.left),ie.style.transformOrigin=ne.transformOrigin}},[X]),W=function(ne,ve){S&&S(ne,ve),M()},K=y.useCallback(function(ie){R.current=Fr.findDOMNode(ie)},[]);y.useEffect(function(){P&&M()}),y.useImperativeHandle(i,function(){return P?{updatePosition:function(){M()}}:null},[P,M]),y.useEffect(function(){if(P){var ie=La(function(){M()});return window.addEventListener("resize",ie),function(){ie.clear(),window.removeEventListener("resize",ie)}}},[P,M]);var z=U;U==="auto"&&!O.muiSupportAuto&&(z=void 0);var Y=f||(a?Ir(iy(a)).body:void 0);return y.createElement(Wf,Z({container:Y,open:P,ref:r,BackdropProps:{invisible:!0},className:$e(d.root,p)},A),y.createElement(O,Z({appear:!0,in:P,onEnter:j,onEntered:w,onExit:_,onExited:C,onExiting:E,timeout:z},L,{onEntering:Ma(W,L.onEntering)}),y.createElement(ca,Z({elevation:g,ref:K},N,{className:$e(d.paper,N.className)}),u)))});const Uw=Ye(sae,{name:"MuiPopover"})(oae),lae=Object.freeze(Object.defineProperty({__proto__:null,default:Uw},Symbol.toStringTag,{value:"Module"}));var cae={root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},dae=y.forwardRef(function(t,r){var i=t.children,a=t.classes,s=t.className,o=t.component,l=o===void 0?"ul":o,c=t.dense,h=c===void 0?!1:c,u=t.disablePadding,d=u===void 0?!1:u,p=t.subheader,f=Be(t,["children","classes","className","component","dense","disablePadding","subheader"]),m=y.useMemo(function(){return{dense:h}},[h]);return y.createElement(No.Provider,{value:m},y.createElement(l,Z({className:$e(a.root,s,h&&a.dense,!d&&a.padding,p&&a.subheader),ref:r},f),p,i))});const t2=Ye(cae,{name:"MuiList"})(dae);function ay(e,t,r){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:r?null:e.firstChild}function OE(e,t,r){return e===t?r?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:r?null:e.lastChild}function n2(e,t){if(t===void 0)return!0;var r=e.innerText;return r===void 0&&(r=e.textContent),r=r.trim().toLowerCase(),r.length===0?!1:t.repeating?r[0]===t.keys[0]:r.indexOf(t.keys.join(""))===0}function Cc(e,t,r,i,a,s){for(var o=!1,l=a(e,t,t?r:!1);l;){if(l===e.firstChild){if(o)return;o=!0}var c=i?!1:l.disabled||l.getAttribute("aria-disabled")==="true";if(!l.hasAttribute("tabindex")||!n2(l,s)||c)l=a(e,l,r);else{l.focus();return}}}var uae=typeof window>"u"?y.useEffect:y.useLayoutEffect,r2=y.forwardRef(function(t,r){var i=t.actions,a=t.autoFocus,s=a===void 0?!1:a,o=t.autoFocusItem,l=o===void 0?!1:o,c=t.children,h=t.className,u=t.disabledItemsFocusable,d=u===void 0?!1:u,p=t.disableListWrap,f=p===void 0?!1:p,m=t.onKeyDown,g=t.variant,x=g===void 0?"selectedMenu":g,v=Be(t,["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"]),b=y.useRef(null),j=y.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});uae(function(){s&&b.current.focus()},[s]),y.useImperativeHandle(i,function(){return{adjustStyleForScrollbar:function(T,N){var k=!b.current.style.width;if(T.clientHeight<b.current.clientHeight&&k){var I="".concat(ZA(),"px");b.current.style[N.direction==="rtl"?"paddingLeft":"paddingRight"]=I,b.current.style.width="calc(100% + ".concat(I,")")}return b.current}}},[]);
15var w=function(T){var N=b.current,k=T.key,I=Ir(N).activeElement;if(k==="ArrowDown")T.preventDefault(),Cc(N,I,f,d,ay);else if(k==="ArrowUp")T.preventDefault(),Cc(N,I,f,d,OE);else if(k==="Home")T.preventDefault(),Cc(N,null,f,d,ay);else if(k==="End")T.preventDefault(),Cc(N,null,f,d,OE);else if(k.length===1){var D=j.current,O=k.toLowerCase(),$=performance.now();D.keys.length>0&&($-D.lastTime>500?(D.keys=[],D.repeating=!0,D.previousKeyMatched=!0):D.repeating&&O!==D.keys[0]&&(D.repeating=!1)),D.lastTime=$,D.keys.push(O);var U=I&&!D.repeating&&n2(I,D);D.previousKeyMatched&&(U||Cc(N,I,!1,d,ay,D))?T.preventDefault():D.previousKeyMatched=!1}m&&m(T)},S=y.useCallback(function(P){b.current=Fr.findDOMNode(P)},[]),_=mn(S,r),C=-1;y.Children.forEach(c,function(P,T){y.isValidElement(P)&&(P.props.disabled||(x==="selectedMenu"&&P.props.selected||C===-1)&&(C=T))});var E=y.Children.map(c,function(P,T){if(T===C){var N={};return l&&(N.autoFocus=!0),P.props.tabIndex===void 0&&x==="selectedMenu"&&(N.tabIndex=0),y.cloneElement(P,N)}return P});return y.createElement(t2,Z({role:"menu",ref:_,className:h,onKeyDown:w,tabIndex:s?0:-1},v),E)}),AE={vertical:"top",horizontal:"right"},ME={vertical:"top",horizontal:"left"},hae={paper:{maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"},list:{outline:0}},pae=y.forwardRef(function(t,r){var i=t.autoFocus,a=i===void 0?!0:i,s=t.children,o=t.classes,l=t.disableAutoFocusItem,c=l===void 0?!1:l,h=t.MenuListProps,u=h===void 0?{}:h,d=t.onClose,p=t.onEntering,f=t.open,m=t.PaperProps,g=m===void 0?{}:m,x=t.PopoverClasses,v=t.transitionDuration,b=v===void 0?"auto":v,j=t.TransitionProps;j=j===void 0?{}:j;var w=j.onEntering,S=Be(j,["onEntering"]),_=t.variant,C=_===void 0?"selectedMenu":_,E=Be(t,["autoFocus","children","classes","disableAutoFocusItem","MenuListProps","onClose","onEntering","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"]),P=Or(),T=a&&!c&&f,N=y.useRef(null),k=y.useRef(null),I=function(){return k.current},D=function(L,A){N.current&&N.current.adjustStyleForScrollbar(L,P),p&&p(L,A),w&&w(L,A)},O=function(L){L.key==="Tab"&&(L.preventDefault(),d&&d(L,"tabKeyDown"))},$=-1;y.Children.map(s,function(B,L){y.isValidElement(B)&&(B.props.disabled||(C!=="menu"&&B.props.selected||$===-1)&&($=L))});var U=y.Children.map(s,function(B,L){return L===$?y.cloneElement(B,{ref:function(R){k.current=Fr.findDOMNode(R),Bi(B.ref,R)}}):B});return y.createElement(Uw,Z({getContentAnchorEl:I,classes:x,onClose:d,TransitionProps:Z({onEntering:D},S),anchorOrigin:P.direction==="rtl"?AE:ME,transformOrigin:P.direction==="rtl"?AE:ME,PaperProps:Z({},g,{classes:Z({},g.classes,{root:o.paper})}),open:f,ref:r,transitionDuration:b},E),y.createElement(r2,Z({onKeyDown:O,actions:N,autoFocus:a&&($===-1||c),autoFocusItem:T,variant:C},u,{className:$e(o.list,u.className)}),U))});const i2=Ye(hae,{name:"MuiMenu"})(pae);function $E(e,t){return To(t)==="object"&&t!==null?e===t:String(e)===String(t)}function fae(e){return e==null||typeof e=="string"&&!e.trim()}var mae=y.forwardRef(function(t,r){var i=t["aria-label"],a=t.autoFocus,s=t.autoWidth,o=t.children,l=t.classes,c=t.className,h=t.defaultValue,u=t.disabled,d=t.displayEmpty,p=t.IconComponent,f=t.inputRef,m=t.labelId,g=t.MenuProps,x=g===void 0?{}:g,v=t.multiple,b=t.name,j=t.onBlur,w=t.onChange,S=t.onClose,_=t.onFocus,C=t.onOpen,E=t.open,P=t.readOnly,T=t.renderValue,N=t.SelectDisplayProps,k=N===void 0?{}:N,I=t.tabIndex;t.type;var D=t.value,O=t.variant,$=O===void 0?"standard":O,U=Be(t,["aria-label","autoFocus","autoWidth","children","classes","className","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"]),B=vs({controlled:D,default:h,name:"Select"}),L=Ci(B,2),A=L[0],R=L[1],F=y.useRef(null),q=y.useState(null),V=q[0],X=q[1],M=y.useRef(E!=null),W=M.current,K=y.useState(),z=K[0],Y=K[1],ie=y.useState(!1),ne=ie[0],ve=ie[1],pe=mn(r,f);y.useImperativeHandle(pe,function(){return{focus:function(){V.focus()},node:F.current,value:A}},[V,A]),y.useEffect(function(){a&&V&&V.focus()}
15,[a,V]),y.useEffect(function(){if(V){var et=Ir(V).getElementById(m);if(et){var rt=function(){getSelection().isCollapsed&&V.focus()};return et.addEventListener("click",rt),function(){et.removeEventListener("click",rt)}}}},[m,V]);var be=function(rt,bt){rt?C&&C(bt):S&&S(bt),W||(Y(s?null:V.clientWidth),ve(rt))},ye=function(rt){rt.button===0&&(rt.preventDefault(),V.focus(),be(!0,rt))},ke=function(rt){be(!1,rt)},fe=y.Children.toArray(o),se=function(rt){var bt=fe.map(function(tt){return tt.props.value}).indexOf(rt.target.value);if(bt!==-1){var Qe=fe[bt];R(Qe.props.value),w&&w(rt,Qe)}},ge=function(rt){return function(bt){v||be(!1,bt);var Qe;if(v){Qe=Array.isArray(A)?A.slice():[];var tt=A.indexOf(rt.props.value);tt===-1?Qe.push(rt.props.value):Qe.splice(tt,1)}else Qe=rt.props.value;rt.props.onClick&&rt.props.onClick(bt),A!==Qe&&(R(Qe),w&&(bt.persist(),Object.defineProperty(bt,"target",{writable:!0,value:{value:Qe,name:b}}),w(bt,rt)))}},De=function(rt){if(!P){var bt=[" ","ArrowUp","ArrowDown","Enter"];bt.indexOf(rt.key)!==-1&&(rt.preventDefault(),be(!0,rt))}},ae=V!==null&&(W?E:ne),Q=function(rt){!ae&&j&&(rt.persist(),Object.defineProperty(rt,"target",{writable:!0,value:{value:A,name:b}}),j(rt))};delete U["aria-invalid"];var ee,oe,Pe=[],Fe=!1;(Fw({value:A})||d)&&(T?ee=T(A):Fe=!0);var Ie=fe.map(function(et){if(!y.isValidElement(et))return null;var rt;if(v){if(!Array.isArray(A))throw new Error(Po(2));rt=A.some(function(bt){return $E(bt,et.props.value)}),rt&&Fe&&Pe.push(et.props.children)}else rt=$E(A,et.props.value),rt&&Fe&&(oe=et.props.children);return y.cloneElement(et,{"aria-selected":rt?"true":void 0,onClick:ge(et),onKeyUp:function(Qe){Qe.key===" "&&Qe.preventDefault(),et.props.onKeyUp&&et.props.onKeyUp(Qe)},role:"option",selected:rt,value:void 0,"data-value":et.props.value})});Fe&&(ee=v?Pe.join(", "):oe);var Re=z;!s&&W&&V&&(Re=V.clientWidth);var Ve;typeof I<"u"?Ve=I:Ve=u?null:0;var Xe=k.id||(b?"mui-component-select-".concat(b):void 0);return y.createElement(y.Fragment,null,y.createElement("div",Z({className:$e(l.root,l.select,l.selectMenu,l[$],c,u&&l.disabled),ref:X,tabIndex:Ve,role:"button","aria-disabled":u?"true":void 0,"aria-expanded":ae?"true":void 0,"aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[m,Xe].filter(Boolean).join(" ")||void 0,onKeyDown:De,onMouseDown:u||P?null:ye,onBlur:Q,onFocus:_},k,{id:Xe}),fae(ee)?y.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}}):ee),y.createElement("input",Z({value:Array.isArray(A)?A.join(","):A,name:b,ref:F,"aria-hidden":!0,onChange:se,tabIndex:-1,className:l.nativeInput,autoFocus:a},U)),y.createElement(p,{className:$e(l.icon,l["icon".concat(ut($))],ae&&l.iconOpen,u&&l.disabled)}),y.createElement(i2,Z({id:"menu-".concat(b||""),anchorEl:V,open:ae,onClose:ke},x,{MenuListProps:Z({"aria-labelledby":m,role:"listbox",disableListWrap:!0},x.MenuListProps),PaperProps:Z({},x.PaperProps,{style:Z({minWidth:Re},x.PaperProps!=null?x.PaperProps.style:null)})}),Ie))});const a2=ar(y.createElement("path",{d:"M7 10l5 5 5-5z"}));var gae=function(t){var r=t.palette.type==="light",i=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return{root:{position:"relative"},formControl:{"label + &":{marginTop:16}},focused:{},disabled:{},colorSecondary:{"&$underline:after":{borderBottomColor:t.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(t.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:t.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(i),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):before":{borderBottom:"2px solid ".concat(t.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(i)}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{},marginDense:{},multiline:{},fullWidth:{},input:{},inputMarginDense:{},inputMultiline:{},inputTypeSearch:{}}
15},s2=y.forwardRef(function(t,r){var i=t.disableUnderline,a=t.classes,s=t.fullWidth,o=s===void 0?!1:s,l=t.inputComponent,c=l===void 0?"input":l,h=t.multiline,u=h===void 0?!1:h,d=t.type,p=d===void 0?"text":d,f=Be(t,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return y.createElement(_u,Z({classes:Z({},a,{root:$e(a.root,!i&&a.underline),underline:null}),fullWidth:o,inputComponent:c,multiline:u,ref:r,type:p},f))});s2.muiName="Input";const Cu=Ye(gae,{name:"MuiInput"})(s2),vae=Object.freeze(Object.defineProperty({__proto__:null,default:Cu},Symbol.toStringTag,{value:"Module"}));var o2=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.disabled,o=t.IconComponent,l=t.inputRef,c=t.variant,h=c===void 0?"standard":c,u=Be(t,["classes","className","disabled","IconComponent","inputRef","variant"]);return y.createElement(y.Fragment,null,y.createElement("select",Z({className:$e(i.root,i.select,i[h],a,s&&i.disabled),disabled:s,ref:l||r},u)),t.multiple?null:y.createElement(o,{className:$e(i.icon,i["icon".concat(ut(h))],s&&i.disabled)}))}),l2=function(t){return{root:{},select:{"-moz-appearance":"none","-webkit-appearance":"none",userSelect:"none",borderRadius:0,minWidth:16,cursor:"pointer","&:focus":{backgroundColor:t.palette.type==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)",borderRadius:0},"&::-ms-expand":{display:"none"},"&$disabled":{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:t.palette.background.paper},"&&":{paddingRight:24}},filled:{"&&":{paddingRight:32}},outlined:{borderRadius:t.shape.borderRadius,"&&":{paddingRight:32}},selectMenu:{height:"auto",minHeight:"1.1876em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},disabled:{},icon:{position:"absolute",right:0,top:"calc(50% - 12px)",pointerEvents:"none",color:t.palette.action.active,"&$disabled":{color:t.palette.action.disabled}},iconOpen:{transform:"rotate(180deg)"},iconFilled:{right:7},iconOutlined:{right:7},nativeInput:{bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%"}}},bae=y.createElement(Cu,null),c2=y.forwardRef(function(t,r){var i=t.children,a=t.classes,s=t.IconComponent,o=s===void 0?a2:s,l=t.input,c=l===void 0?bae:l,h=t.inputProps;t.variant;var u=Be(t,["children","classes","IconComponent","input","inputProps","variant"]),d=xs(),p=nc({props:t,muiFormControl:d,states:["variant"]});return y.cloneElement(c,Z({inputComponent:o2,inputProps:Z({children:i,classes:a,IconComponent:o,variant:p.variant,type:void 0},h,c?c.props.inputProps:{}),ref:r},u))});c2.muiName="Select";const yae=Ye(l2,{name:"MuiNativeSelect"})(c2);var xae=function(t){var r=t.palette.type==="light",i=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",a=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)";return{root:{position:"relative",backgroundColor:a,borderTopLeftRadius:t.shape.borderRadius,borderTopRightRadius:t.shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:r?"rgba(0, 0, 0, 0.13)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:a}},"&$focused":{backgroundColor:r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)"},"&$disabled":{backgroundColor:r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"}},colorSecondary:{"&$underline:after":{borderBottomColor:t.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(t.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:t.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(i),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:before":{borderBottom:"1px solid ".concat(t.palette.text.primary)},"&$disabled:before":{borderBottomStyle:"dotted"}},focused:{},disabled:{},adornedStart:{paddingLeft:12},adornedEnd:{paddingRight:12},error:{},marginDense:{},multiline:{padding:"27px 12px 10px","&$marginDense":{paddingTop:23,paddingBottom:6}},input:{padding:"27px 12px 10px","&:-webkit-autofill":{WebkitBoxShadow:t.palette.type==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.type==="light"?null:"#fff",caretColor:t.palette.type==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},inputMarginDense:{paddingTop:23,paddingBottom:6},inputHiddenLabel:{paddingTop:18,paddingBottom:19,"&$inputMarginDense":{paddingTop:10,paddingBottom:11}},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}},d2=y.forwardRef(function(t,r){var i=t.disableUnderline,a=t.classes,s=t.fullWidth,o=s===void 0?!1:s,l=t.inputComponent,c=l===void 0?"input":l,h=t.multiline,u=h===void 0?!1:h,d=t.type,p=d===void 0?"text":d,f=Be(t,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return y.createElement(_u,Z({classes:Z({},a,{root:$e(a.root,!i&&a.underline),underline:null}),fullWidth:o,inputComponent:c,multiline:u,ref:r,type:p},f))});d2.muiName="Input";const Bw=Ye(xae,{name:"MuiFilledInput"})(d2);var jae=function(t){return{root:{position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden"},legend:{textAlign:"left",padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},legendLabelled:{display:"block",width:"auto",textAlign:"left",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),"& > span":{paddingLeft:5,paddingRight:5,display:"inline-block"}},legendNotched:{maxWidth:1e3,transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})}}},wae=y.forwardRef(function(t,r){t.children;var i=t.classes,a=t.className,s=t.label,o=t.labelWidth,l=t.notched,c=t.style,h=Be(t,["children","classes","className","label","labelWidth","notched","style"]),u=Or(),d=u.direction==="rtl"?"right":"left";if(s!==void 0)return y.createElement("fieldset",Z({"aria-hidden":!0,
15className:$e(i.root,a),ref:r,style:c},h),y.createElement("legend",{className:$e(i.legendLabelled,l&&i.legendNotched)},s?y.createElement("span",null,s):y.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}})));var p=o>0?o*.75+8:.01;return y.createElement("fieldset",Z({"aria-hidden":!0,style:Z(Ct({},"padding".concat(ut(d)),8),c),className:$e(i.root,a),ref:r},h),y.createElement("legend",{className:i.legend,style:{width:l?p:.01}},y.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}})))});const Sae=Ye(jae,{name:"PrivateNotchedOutline"})(wae);var _ae=function(t){var r=t.palette.type==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{root:{position:"relative",borderRadius:t.shape.borderRadius,"&:hover $notchedOutline":{borderColor:t.palette.text.primary},"@media (hover: none)":{"&:hover $notchedOutline":{borderColor:r}},"&$focused $notchedOutline":{borderColor:t.palette.primary.main,borderWidth:2},"&$error $notchedOutline":{borderColor:t.palette.error.main},"&$disabled $notchedOutline":{borderColor:t.palette.action.disabled}},colorSecondary:{"&$focused $notchedOutline":{borderColor:t.palette.secondary.main}},focused:{},disabled:{},adornedStart:{paddingLeft:14},adornedEnd:{paddingRight:14},error:{},marginDense:{},multiline:{padding:"18.5px 14px","&$marginDense":{paddingTop:10.5,paddingBottom:10.5}},notchedOutline:{borderColor:r},input:{padding:"18.5px 14px","&:-webkit-autofill":{WebkitBoxShadow:t.palette.type==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.type==="light"?null:"#fff",caretColor:t.palette.type==="light"?null:"#fff",borderRadius:"inherit"}},inputMarginDense:{paddingTop:10.5,paddingBottom:10.5},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}},u2=y.forwardRef(function(t,r){var i=t.classes,a=t.fullWidth,s=a===void 0?!1:a,o=t.inputComponent,l=o===void 0?"input":o,c=t.label,h=t.labelWidth,u=h===void 0?0:h,d=t.multiline,p=d===void 0?!1:d,f=t.notched,m=t.type,g=m===void 0?"text":m,x=Be(t,["classes","fullWidth","inputComponent","label","labelWidth","multiline","notched","type"]);return y.createElement(_u,Z({renderSuffix:function(b){return y.createElement(Sae,{className:i.notchedOutline,label:c,labelWidth:u,notched:typeof f<"u"?f:!!(b.startAdornment||b.filled||b.focused)})},classes:Z({},i,{root:$e(i.root,i.underline),notchedOutline:null}),fullWidth:s,inputComponent:l,multiline:p,ref:r,type:g},x))});u2.muiName="Input";const qw=Ye(_ae,{name:"MuiOutlinedInput"})(u2);var Cae=l2,Nae=y.createElement(Cu,null),Eae=y.createElement(Bw,null),h2=y.forwardRef(function e(t,r){var i=t.autoWidth,a=i===void 0?!1:i,s=t.children,o=t.classes,l=t.displayEmpty,c=l===void 0?!1:l,h=t.IconComponent,u=h===void 0?a2:h,d=t.id,p=t.input,f=t.inputProps,m=t.label,g=t.labelId,x=t.labelWidth,v=x===void 0?0:x,b=t.MenuProps,j=t.multiple,w=j===void 0?!1:j,S=t.native,_=S===void 0?!1:S,C=t.onClose,E=t.onOpen,P=t.open,T=t.renderValue,N=t.SelectDisplayProps,k=t.variant,I=k===void 0?"standard":k,D=Be(t,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","label","labelId","labelWidth","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"]),O=_?o2:mae,$=xs(),U=nc({props:t,muiFormControl:$,states:["variant"]}),B=U.variant||I,L=p||{standard:Nae,outlined:y.createElement(qw,{label:m,labelWidth:v}),filled:Eae}[B];return y.cloneElement(L,Z({inputComponent:O,inputProps:Z({children:s,IconComponent:u,variant:B,type:void 0,multiple:w},_?{id:d}:{autoWidth:a,displayEmpty:c,labelId:g,MenuProps:b,onClose:C,onOpen:E,open:P,renderValue:T,SelectDisplayProps:Z({id:d},N)},f,{classes:f?Xj({baseClasses:o,newClasses:f.classes,Component:e}):o},p?p.props.inputProps:{}),ref:r},D))});h2.muiName="Select";const no=Ye(Cae,{name:"MuiSelect"})(h2),Tae=Object.freeze(Object.defineProperty({__proto__:null,default:no},Symbol.toStringTag,{value:"Module"}));var kae=function(t){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:Ct({paddingLeft:t.spacing(2),paddingRight:t.spacing(2)},t.breakpoints.up("sm"),{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}),regular:t.mixins.toolbar,dense:{minHeight:48}}},Pae=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.component,o=s===void 0?"div":s,l=t.disableGutters,c=l===void 0?!1:l,h=t.variant,u=h===void 0?"regular":h,d=Be(t,["classes","className","component","disableGutters","variant"]);
15return y.createElement(o,Z({className:$e(i.root,i[u],a,!c&&i.gutters),ref:r},d))});const Vw=Ye(kae,{name:"MuiToolbar"})(Pae),Iae=Object.freeze(Object.defineProperty({__proto__:null,default:Vw},Symbol.toStringTag,{value:"Module"}));var Dae=y.createElement(Dw,null),Rae=y.createElement(Iw,null),Oae=y.createElement(Iw,null),Aae=y.createElement(Dw,null),Mae=y.forwardRef(function(t,r){var i=t.backIconButtonProps,a=t.count,s=t.nextIconButtonProps,o=t.onChangePage,l=o===void 0?function(){}:o,c=t.onPageChange,h=c===void 0?function(){}:c,u=t.page,d=t.rowsPerPage,p=Be(t,["backIconButtonProps","count","nextIconButtonProps","onChangePage","onPageChange","page","rowsPerPage"]),f=Or(),m=function(v){l(v,u-1),h(v,u-1)},g=function(v){l(v,u+1),h(v,u+1)};return y.createElement("div",Z({ref:r},p),y.createElement(Oo,Z({onClick:m,disabled:u===0,color:"inherit"},i),f.direction==="rtl"?Dae:Rae),y.createElement(Oo,Z({onClick:g,disabled:a!==-1?u>=Math.ceil(a/d)-1:!1,color:"inherit"},s),f.direction==="rtl"?Oae:Aae))}),$ae=function(t){return{root:{color:t.palette.text.primary,fontSize:t.typography.pxToRem(14),overflow:"auto","&:last-child":{padding:0}},toolbar:{minHeight:52,paddingRight:2},spacer:{flex:"1 1 100%"},caption:{flexShrink:0},selectRoot:{marginRight:32,marginLeft:8},select:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"},selectIcon:{},input:{color:"inherit",fontSize:"inherit",flexShrink:0},menuItem:{},actions:{flexShrink:0,marginLeft:20}}},Lae=function(t){var r=t.from,i=t.to,a=t.count;return"".concat(r,"-").concat(i," of ").concat(a!==-1?a:"more than ".concat(i))},Fae=[10,25,50,100],Uae=y.forwardRef(function(t,r){var i=t.ActionsComponent,a=i===void 0?Mae:i,s=t.backIconButtonProps,o=t.backIconButtonText,l=o===void 0?"Previous page":o,c=t.classes,h=t.className,u=t.colSpan,d=t.component,p=d===void 0?Kp:d,f=t.count,m=t.labelDisplayedRows,g=m===void 0?Lae:m,x=t.labelRowsPerPage,v=x===void 0?"Rows per page:":x,b=t.nextIconButtonProps,j=t.nextIconButtonText,w=j===void 0?"Next page":j,S=t.onChangePage,_=t.onPageChange,C=t.onChangeRowsPerPage,E=t.onRowsPerPageChange,P=t.page,T=t.rowsPerPage,N=t.rowsPerPageOptions,k=N===void 0?Fae:N,I=t.SelectProps,D=I===void 0?{}:I,O=Be(t,["ActionsComponent","backIconButtonProps","backIconButtonText","classes","className","colSpan","component","count","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","nextIconButtonText","onChangePage","onPageChange","onChangeRowsPerPage","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps"]),$=C||E,U;(p===Kp||p==="td")&&(U=u||1e3);var B=Rl(),L=Rl(),A=D.native?"option":ei;return y.createElement(p,Z({className:$e(c.root,h),colSpan:U,ref:r},O),y.createElement(Vw,{className:c.toolbar},y.createElement("div",{className:c.spacer}),k.length>1&&y.createElement(Dr,{color:"inherit",variant:"body2",className:c.caption,id:L},v),k.length>1&&y.createElement(no,Z({classes:{select:c.select,icon:c.selectIcon},input:y.createElement(_u,{className:$e(c.input,c.selectRoot)}),value:T,onChange:$,id:B,labelId:L},D),k.map(function(R){return y.createElement(A,{className:c.menuItem,key:R.value?R.value:R,value:R.value?R.value:R},R.label?R.label:R)})),y.createElement(Dr,{color:"inherit",variant:"body2",className:c.caption},g({from:f===0?0:P*T+1,to:f!==-1?Math.min(f,(P+1)*T):(P+1)*T,count:f===-1?-1:f,page:P})),y.createElement(a,{className:c.actions,backIconButtonProps:Z({title:l,"aria-label":l},s),count:f,nextIconButtonProps:Z({title:w,"aria-label":w},b),onChangePage:S,onPageChange:_,page:P,rowsPerPage:T})))});const p2=Ye($ae,{name:"MuiTablePagination"})(Uae),Bae=Object.freeze(Object.defineProperty({__proto__:null,default:p2},Symbol.toStringTag,{value:"Module"})),qae=Pn(Bae),Vae=Pn(Iae),zae=Pn(lae);var Hae={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Gae={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",A100:"#b388ff",A200:"#7c4dff",A400:"#651fff",A700:"#6200ea"},Wae={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Yae={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",A100:"#84ffff",A200:"#18ffff",A400:"#00e5ff",A700:"#00b8d4"},Kae={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5"},Xae={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",A100:"#ccff90",A200:"#b2ff59",A400:"#76ff03",A700:"#64dd17"},Qae={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",A100:"#f4ff81",A200:"#eeff41",A400:"#c6ff00",A700:"#aeea00"},Zae={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",A100:"#ffff8d",A200:"#ffff00",A400:"#ffea00",A700:"#ffd600"},Jae={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",A100:"#ffe57f",A200:"#ffd740",A400:"#ffc400",A700:"#ffab00"},ese={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",A100:"#ff9e80",A200:"#ff6e40",A400:"#ff3d00",A700:"#dd2c00"}
15,tse={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723",A100:"#d7ccc8",A200:"#bcaaa4",A400:"#8d6e63",A700:"#5d4037"},nse={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64"};const rse=Object.freeze(Object.defineProperty({__proto__:null,amber:Jae,blue:bp,blueGrey:nse,brown:tse,common:Vd,cyan:Yae,deepOrange:ese,deepPurple:Gae,green:yp,grey:Ef,indigo:fp,lightBlue:Wae,lightGreen:Xae,lime:Qae,orange:vp,pink:mp,purple:Hae,red:gp,teal:Kae,yellow:Zae},Symbol.toStringTag,{value:"Module"}));function f2(e){return _R(e)||hR(e)||Yj(e)||CR()}var ise=function(t){return{root:{height:0,overflow:"hidden",transition:t.transitions.create("height")},entered:{height:"auto",overflow:"visible"},hidden:{visibility:"hidden"},wrapper:{display:"flex"},wrapperInner:{width:"100%"}}},m2=y.forwardRef(function(t,r){var i=t.children,a=t.classes,s=t.className,o=t.collapsedHeight,l=t.collapsedSize,c=l===void 0?"0px":l,h=t.component,u=h===void 0?"div":h,d=t.disableStrictModeCompat,p=d===void 0?!1:d,f=t.in,m=t.onEnter,g=t.onEntered,x=t.onEntering,v=t.onExit,b=t.onExited,j=t.onExiting,w=t.style,S=t.timeout,_=S===void 0?Rr.standard:S,C=t.TransitionComponent,E=C===void 0?ru:C,P=Be(t,["children","classes","className","collapsedHeight","collapsedSize","component","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),T=Or(),N=y.useRef(),k=y.useRef(null),I=y.useRef(),D=typeof(o||c)=="number"?"".concat(o||c,"px"):o||c;y.useEffect(function(){return function(){clearTimeout(N.current)}},[]);var O=T.unstable_strictMode&&!p,$=y.useRef(null),U=mn(r,O?$:void 0),B=function(W){return function(K,z){if(W){var Y=O?[$.current,K]:[K,z],ie=Ci(Y,2),ne=ie[0],ve=ie[1];ve===void 0?W(ne):W(ne,ve)}}},L=B(function(M,W){M.style.height=D,m&&m(M,W)}),A=B(function(M,W){var K=k.current?k.current.clientHeight:0,z=ja({style:w,timeout:_},{mode:"enter"}),Y=z.duration;if(_==="auto"){var ie=T.transitions.getAutoHeightDuration(K);M.style.transitionDuration="".concat(ie,"ms"),I.current=ie}else M.style.transitionDuration=typeof Y=="string"?Y:"".concat(Y,"ms");M.style.height="".concat(K,"px"),x&&x(M,W)}),R=B(function(M,W){M.style.height="auto",g&&g(M,W)}),F=B(function(M){var W=k.current?k.current.clientHeight:0;M.style.height="".concat(W,"px"),v&&v(M)}),q=B(b),V=B(function(M){var W=k.current?k.current.clientHeight:0,K=ja({style:w,timeout:_},{mode:"exit"}),z=K.duration;if(_==="auto"){var Y=T.transitions.getAutoHeightDuration(W);M.style.transitionDuration="".concat(Y,"ms"),I.current=Y}else M.style.transitionDuration=typeof z=="string"?z:"".concat(z,"ms");M.style.height=D,j&&j(M)}),X=function(W,K){var z=O?W:K;_==="auto"&&(N.current=setTimeout(z,I.current||0))};return y.createElement(E,Z({in:f,onEnter:L,onEntered:R,onEntering:A,onExit:F,onExited:q,onExiting:V,addEndListener:X,nodeRef:O?$:void 0,timeout:_==="auto"?null:_},P),function(M,W){return y.createElement(u,Z({className:$e(a.root,a.container,s,{entered:a.entered,exited:!f&&D==="0px"&&a.hidden}[M]),style:Z({minHeight:D},w),ref:U},W),y.createElement("div",{className:a.wrapper,ref:k},y.createElement("div",{className:a.wrapperInner},i)))})});m2.muiSupportAuto=!0;const Yf=Ye(ise,{name:"MuiCollapse"})(m2);var g2=y.createContext({}),ase=function(t){var r={duration:t.transitions.duration.shortest};return{root:{position:"relative",transition:t.transitions.create(["margin"],r),"&:before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:t.palette.divider,transition:t.transitions.create(["opacity","background-color"],r)},"&:first-child":{"&:before":{display:"none"}},"&$expanded":{margin:"16px 0","&:first-child":{marginTop:0},"&:last-child":{marginBottom:0},"&:before":{opacity:0}
15},"&$expanded + &":{"&:before":{display:"none"}},"&$disabled":{backgroundColor:t.palette.action.disabledBackground}},rounded:{borderRadius:0,"&:first-child":{borderTopLeftRadius:t.shape.borderRadius,borderTopRightRadius:t.shape.borderRadius},"&:last-child":{borderBottomLeftRadius:t.shape.borderRadius,borderBottomRightRadius:t.shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}},expanded:{},disabled:{}}},sse=y.forwardRef(function(t,r){var i=t.children,a=t.classes,s=t.className,o=t.defaultExpanded,l=o===void 0?!1:o,c=t.disabled,h=c===void 0?!1:c,u=t.expanded,d=t.onChange,p=t.square,f=p===void 0?!1:p,m=t.TransitionComponent,g=m===void 0?Yf:m,x=t.TransitionProps,v=Be(t,["children","classes","className","defaultExpanded","disabled","expanded","onChange","square","TransitionComponent","TransitionProps"]),b=vs({controlled:u,default:l,name:"Accordion",state:"expanded"}),j=Ci(b,2),w=j[0],S=j[1],_=y.useCallback(function(k){S(!w),d&&d(k,!w)},[w,d,S]),C=y.Children.toArray(i),E=f2(C),P=E[0],T=E.slice(1),N=y.useMemo(function(){return{expanded:w,disabled:h,toggle:_}},[w,h,_]);return y.createElement(ca,Z({className:$e(a.root,s,w&&a.expanded,h&&a.disabled,!f&&a.rounded),ref:r,square:f},v),y.createElement(g2.Provider,{value:N},P),y.createElement(g,Z({in:w,timeout:"auto"},x),y.createElement("div",{"aria-labelledby":P.props.id,id:P.props["aria-controls"],role:"region"},T)))});const ose=Ye(ase,{name:"MuiAccordion"})(sse);var lse={root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end"},spacing:{"& > :not(:first-child)":{marginLeft:8}}},cse=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.disableSpacing,o=s===void 0?!1:s,l=Be(t,["classes","className","disableSpacing"]);return y.createElement("div",Z({className:$e(i.root,a,!o&&i.spacing),ref:r},l))});const dse=Ye(lse,{name:"MuiAccordionActions"})(cse);var use=function(t){return{root:{display:"flex",padding:t.spacing(1,2,2)}}},hse=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=Be(t,["classes","className"]);return y.createElement("div",Z({className:$e(i.root,a),ref:r},s))});const pse=Ye(use,{name:"MuiAccordionDetails"})(hse);var fse=function(t){var r={duration:t.transitions.duration.shortest};return{root:{display:"flex",minHeight:48,transition:t.transitions.create(["min-height","background-color"],r),padding:t.spacing(0,2),"&:hover:not($disabled)":{cursor:"pointer"},"&$expanded":{minHeight:64},"&$focused, &$focusVisible":{backgroundColor:t.palette.action.focus},"&$disabled":{opacity:t.palette.action.disabledOpacity}},expanded:{},focused:{},focusVisible:{},disabled:{},content:{display:"flex",flexGrow:1,transition:t.transitions.create(["margin"],r),margin:"12px 0","&$expanded":{margin:"20px 0"}},expandIcon:{transform:"rotate(0deg)",transition:t.transitions.create("transform",r),"&:hover":{backgroundColor:"transparent"},"&$expanded":{transform:"rotate(180deg)"}}}},mse=y.forwardRef(function(t,r){var i=t.children,a=t.classes,s=t.className,o=t.expandIcon,l=t.focusVisibleClassName,c=t.IconButtonProps,h=c===void 0?{}:c,u=t.onClick,d=Be(t,["children","classes","className","expandIcon","focusVisibleClassName","IconButtonProps","onClick"]),p=y.useContext(g2),f=p.disabled,m=f===void 0?!1:f,g=p.expanded,x=p.toggle,v=function(j){x&&x(j),u&&u(j)};return y.createElement(ni,Z({focusRipple:!1,disableRipple:!0,disabled:m,component:"div","aria-expanded":g,className:$e(a.root,s,m&&a.disabled,g&&a.expanded),focusVisibleClassName:$e(a.focusVisible,a.focused,l),onClick:v,ref:r},d),y.createElement("div",{className:$e(a.content,g&&a.expanded)},i),o&&y.createElement(Oo,Z({className:$e(a.expandIcon,g&&a.expanded),edge:"end",component:"div",tabIndex:null,role:null,"aria-hidden":!0},h),o))});const gse=Ye(fse,{name:"MuiAccordionSummary"})(mse);var vse=function(t){var r=t.palette.type==="light"?t.palette.grey[100]:t.palette.grey[900];return{root:{display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",zIndex:t.zIndex.appBar,flexShrink:0},positionFixed:{position:"fixed",top:0,left:"auto",right:0,"@media print":{position:"absolute"}},positionAbsolute:{position:"absolute",top:0,left:"auto",right:0},positionSticky:{position:"sticky",top:0,left:"auto",right:0},positionStatic:{position:"static"},positionRelative:{position:"relative"},colorDefault:{backgroundColor:r,color:t.palette.getContrastText(r)},colorPrimary:{backgroundColor:t.palette.primary.main,color:t.palette.primary.contrastText},colorSecondary:{backgroundColor:t.palette.secondary.main,color:t.palette.secondary.c
15ontrastText},colorInherit:{color:"inherit"},colorTransparent:{backgroundColor:"transparent",color:"inherit"}}},bse=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.color,o=s===void 0?"primary":s,l=t.position,c=l===void 0?"fixed":l,h=Be(t,["classes","className","color","position"]);return y.createElement(ca,Z({square:!0,component:"header",elevation:4,className:$e(i.root,i["position".concat(ut(c))],i["color".concat(ut(o))],a,c==="fixed"&&"mui-fixed"),ref:r},h))});const yse=Ye(vse,{name:"MuiAppBar"})(bse),xse=ar(y.createElement("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}));var jse=function(t){return{root:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},colorDefault:{color:t.palette.background.default,backgroundColor:t.palette.type==="light"?t.palette.grey[400]:t.palette.grey[600]},circle:{},circular:{},rounded:{borderRadius:t.shape.borderRadius},square:{borderRadius:0},img:{width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4},fallback:{width:"75%",height:"75%"}}};function wse(e){var t=e.src,r=e.srcSet,i=y.useState(!1),a=i[0],s=i[1];return y.useEffect(function(){if(!(!t&&!r)){s(!1);var o=!0,l=new Image;return l.src=t,l.srcSet=r,l.onload=function(){o&&s("loaded")},l.onerror=function(){o&&s("error")},function(){o=!1}}},[t,r]),a}var Sse=y.forwardRef(function(t,r){var i=t.alt,a=t.children,s=t.classes,o=t.className,l=t.component,c=l===void 0?"div":l,h=t.imgProps,u=t.sizes,d=t.src,p=t.srcSet,f=t.variant,m=f===void 0?"circular":f,g=Be(t,["alt","children","classes","className","component","imgProps","sizes","src","srcSet","variant"]),x=null,v=wse({src:d,srcSet:p}),b=d||p,j=b&&v!=="error";return j?x=y.createElement("img",Z({alt:i,src:d,srcSet:p,sizes:u,className:s.img},h)):a!=null?x=a:b&&i?x=i[0]:x=y.createElement(xse,{className:s.fallback}),y.createElement(c,Z({className:$e(s.root,s.system,s[m],o,!j&&s.colorDefault),ref:r},g),x)});const _se=Ye(jse,{name:"MuiAvatar"})(Sse);var Cse={entering:{opacity:1},entered:{opacity:1}},Nse={enter:Rr.enteringScreen,exit:Rr.leavingScreen},zw=y.forwardRef(function(t,r){var i=t.children,a=t.disableStrictModeCompat,s=a===void 0?!1:a,o=t.in,l=t.onEnter,c=t.onEntered,h=t.onEntering,u=t.onExit,d=t.onExited,p=t.onExiting,f=t.style,m=t.TransitionComponent,g=m===void 0?ru:m,x=t.timeout,v=x===void 0?Nse:x,b=Be(t,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","TransitionComponent","timeout"]),j=Or(),w=j.unstable_strictMode&&!s,S=y.useRef(null),_=mn(i.ref,r),C=mn(w?S:void 0,_),E=function($){return function(U,B){if($){var L=w?[S.current,U]:[U,B],A=Ci(L,2),R=A[0],F=A[1];F===void 0?$(R):$(R,F)}}},P=E(h),T=E(function(O,$){Uf(O);var U=ja({style:f,timeout:v},{mode:"enter"});O.style.webkitTransition=j.transitions.create("opacity",U),O.style.transition=j.transitions.create("opacity",U),l&&l(O,$)}),N=E(c),k=E(p),I=E(function(O){var $=ja({style:f,timeout:v},{mode:"exit"});O.style.webkitTransition=j.transitions.create("opacity",$),O.style.transition=j.transitions.create("opacity",$),u&&u(O)}),D=E(d);return y.createElement(g,Z({appear:!0,in:o,nodeRef:w?S:void 0,onEnter:T,onEntered:N,onEntering:P,onExit:I,onExited:D,onExiting:k,timeout:v},b),function(O,$){return y.cloneElement(i,Z({style:Z({opacity:0,visibility:O==="exited"&&!o?"hidden":void 0},Cse[O],f,i.props.style),ref:C},$))})}),Ese={root:{zIndex:-1,position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},Tse=y.forwardRef(function(t,r){var i=t.children,a=t.classes,s=t.className,o=t.invisible,l=o===void 0?!1:o,c=t.open,h=t.transitionDuration,u=t.TransitionComponent,d=u===void 0?zw:u,p=Be(t,["children","classes","className","invisible","open","transitionDuration","TransitionComponent"]);return y.createElement(d,Z({in:c,timeout:h},p),y.createElement("div",{className:$e(a.root,s,l&&a.invisible),"aria-hidden":!0,ref:r},i))});const Hw=Ye(Ese,{name:"MuiBackdrop"})(Tse);var sy=10,oy=4,kse=function(t){return{root:{position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0},badge:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(12),minWidth:sy*2,lineHeight:1,padding:"0 6px",height:sy*2,borderRadius:sy,zIndex:1,transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.enteringScreen})},colorPrimary:{backgroundColor:t.palette.primary.main,color:t.palette.primary.contrastText},colorSecondary:{backgroundColor:t.palette.secondary.main,color:t.palette.secondary.c
15ontrastText},colorError:{backgroundColor:t.palette.error.main,color:t.palette.error.contrastText},dot:{borderRadius:oy,height:oy*2,minWidth:oy*2,padding:0},anchorOriginTopRightRectangle:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%","&$invisible":{transform:"scale(0) translate(50%, -50%)"}},anchorOriginTopRightRectangular:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%","&$invisible":{transform:"scale(0) translate(50%, -50%)"}},anchorOriginBottomRightRectangle:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%","&$invisible":{transform:"scale(0) translate(50%, 50%)"}},anchorOriginBottomRightRectangular:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%","&$invisible":{transform:"scale(0) translate(50%, 50%)"}},anchorOriginTopLeftRectangle:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%","&$invisible":{transform:"scale(0) translate(-50%, -50%)"}},anchorOriginTopLeftRectangular:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%","&$invisible":{transform:"scale(0) translate(-50%, -50%)"}},anchorOriginBottomLeftRectangle:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%","&$invisible":{transform:"scale(0) translate(-50%, 50%)"}},anchorOriginBottomLeftRectangular:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%","&$invisible":{transform:"scale(0) translate(-50%, 50%)"}},anchorOriginTopRightCircle:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%","&$invisible":{transform:"scale(0) translate(50%, -50%)"}},anchorOriginTopRightCircular:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%","&$invisible":{transform:"scale(0) translate(50%, -50%)"}},anchorOriginBottomRightCircle:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%","&$invisible":{transform:"scale(0) translate(50%, 50%)"}},anchorOriginBottomRightCircular:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%","&$invisible":{transform:"scale(0) translate(50%, 50%)"}},anchorOriginTopLeftCircle:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%","&$invisible":{transform:"scale(0) translate(-50%, -50%)"}},anchorOriginTopLeftCircular:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%","&$invisible":{transform:"scale(0) translate(-50%, -50%)"}},anchorOriginBottomLeftCircle:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%","&$invisible":{transform:"scale(0) translate(-50%, 50%)"}},anchorOriginBottomLeftCircular:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%","&$invisible":{transform:"scale(0) translate(-50%, 50%)"}},invisible:{transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.leavingScreen})}}},Pse=y.forwardRef(function(t,r){var i=t.anchorOrigin,a=i===void 0?{vertical:"top",horizontal:"right"}:i,s=t.badgeContent,o=t.children,l=t.classes,c=t.className,h=t.color,u=h===void 0?"default":h,d=t.component,p=d===void 0?"span":d,f=t.invisible,m=t.max,g=m===void 0?99:m,x=t.overlap,v=x===void 0?"rectangle":x,b=t.showZero,j=b===void 0?!1:b,w=t.variant,S=w===void 0?"standard":w,_=Be(t,["anchorOrigin","badgeContent","children","classes","className","color","component","invisible","max","overlap","showZero","variant"]),C=f;f==null&&(s===0&&!j||s==null&&S!=="dot")&&(C=!0);var E="";return S!=="dot"&&(E=s>g?"".concat(g,"+"):s),y.createElement(p,Z({className:$e(l.root,c),ref:r},_),o,y.createElement("span",{className:$e(l.badge,l["".concat(a.horizontal).concat(ut(a.vertical),"}")],l["anchorOrigin".concat(ut(a.vertical)).concat(ut(a.horizontal)).concat(ut(v))],u!=="default"&&l["color".concat(ut(u))],C&&l.invisible,S==="dot"&&l.dot)},E))});const Ise=Ye(kse,{name:"MuiBadge"})(Pse);var Dse=function(t){return{root:{display:"flex",justifyContent:"center",height:56,backgroundColor:t.palette.background.paper}}},Rse=y.forwardRef(function(t,r){var i=t.children,a=t.classes,s=t.className,o=t.component,l=o===void 0?"div":o,c=t.onChange,h=t.showLabels,u=h===void 0?!1:h,d=t.value,p=Be(t,["children","classes","className","component","onChange","showLabels","value"]);return y.createElement(l,Z({className:$e(a.root,s),ref:r},p),y.Children.map(i,function(f,m){if(!y.isValidElement(f))return null;var g=f.props.value===void 0?m:f.props.value;return y.cloneElement(f,{selected:g===d,showLabel:f.props.showLabel!==void 0?f.props.showLabel:u,value:g,onChange:c})}))});
15const Ose=Ye(Dse,{name:"MuiBottomNavigation"})(Rse);var Ase=function(t){return{root:{transition:t.transitions.create(["color","padding-top"],{duration:t.transitions.duration.short}),padding:"6px 12px 8px",minWidth:80,maxWidth:168,color:t.palette.text.secondary,flex:"1","&$iconOnly":{paddingTop:16},"&$selected":{paddingTop:6,color:t.palette.primary.main}},selected:{},iconOnly:{},wrapper:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"100%",flexDirection:"column"},label:{fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(12),opacity:1,transition:"font-size 0.2s, opacity 0.2s",transitionDelay:"0.1s","&$iconOnly":{opacity:0,transitionDelay:"0s"},"&$selected":{fontSize:t.typography.pxToRem(14)}}}},Mse=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.icon,o=t.label,l=t.onChange,c=t.onClick,h=t.selected,u=t.showLabel,d=t.value,p=Be(t,["classes","className","icon","label","onChange","onClick","selected","showLabel","value"]),f=function(g){l&&l(g,d),c&&c(g)};return y.createElement(ni,Z({ref:r,className:$e(i.root,a,h?i.selected:!u&&i.iconOnly),focusRipple:!0,onClick:f},p),y.createElement("span",{className:i.wrapper},s,y.createElement("span",{className:$e(i.label,h?i.selected:!u&&i.iconOnly)},o)))});const $se=Ye(Ase,{name:"MuiBottomNavigationAction"})(Mse);var v2=sH(gs(aH,pH,EH,UH,XH,VH,QH,a8,rw,x8)),Lse=Pw("div")(v2,{name:"MuiBox"});const Fse=ar(y.createElement("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}));var Use=function(t){return{root:{display:"flex",marginLeft:t.spacing(.5),marginRight:t.spacing(.5),backgroundColor:t.palette.grey[100],color:t.palette.grey[700],borderRadius:2,cursor:"pointer","&:hover, &:focus":{backgroundColor:t.palette.grey[200]},"&:active":{boxShadow:t.shadows[0],backgroundColor:Ia(t.palette.grey[200],.12)}},icon:{width:24,height:16}}};function Bse(e){var t=e.classes,r=Be(e,["classes"]);return y.createElement(ni,Z({component:"li",className:t.root,focusRipple:!0},r),y.createElement(Fse,{className:t.icon}))}const qse=Ye(Use,{name:"PrivateBreadcrumbCollapsed"})(Bse);var Vse={root:{},ol:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"},li:{},separator:{display:"flex",userSelect:"none",marginLeft:8,marginRight:8}};function zse(e,t,r){return e.reduce(function(i,a,s){return s<e.length-1?i=i.concat(a,y.createElement("li",{"aria-hidden":!0,key:"separator-".concat(s),className:t},r)):i.push(a),i},[])}var Hse=y.forwardRef(function(t,r){var i=t.children,a=t.classes,s=t.className,o=t.component,l=o===void 0?"nav":o,c=t.expandText,h=c===void 0?"Show path":c,u=t.itemsAfterCollapse,d=u===void 0?1:u,p=t.itemsBeforeCollapse,f=p===void 0?1:p,m=t.maxItems,g=m===void 0?8:m,x=t.separator,v=x===void 0?"/":x,b=Be(t,["children","classes","className","component","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"]),j=y.useState(!1),w=j[0],S=j[1],_=function(P){var T=function(k){S(!0);var I=k.currentTarget.parentNode.querySelector("a[href],button,[tabindex]");I&&I.focus()};return f+d>=P.length?P:[].concat(xr(P.slice(0,f)),[y.createElement(qse,{"aria-label":h,key:"ellipsis",onClick:T})],xr(P.slice(P.length-d,P.length)))},C=y.Children.toArray(i).filter(function(E){return y.isValidElement(E)}).map(function(E,P){return y.createElement("li",{className:a.li,key:"child-".concat(P)},E)});return y.createElement(Dr,Z({ref:r,component:l,color:"textSecondary",className:$e(a.root,s)},b),y.createElement("ol",{className:a.ol},zse(w||g&&C.length<=g?C:_(C),a.separator,v)))});const Gse=Ye(Vse,{name:"MuiBreadcrumbs"})(Hse);var Wse=function(t){return{root:Z({},t.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:t.shape.borderRadius,color:t.palette.text.primary,transition:t.transitions.create(["background-color","box-shadow","border"],{duration:t.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:tn(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:t.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:t.palette.primary.main,"&:hover":{backgroundColor:tn(t.palette.primary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:t.palette.secondary.main,"&:hover":{backgroundColor:tn(t.palette.secondary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat(t.palette.type==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(t.palette.action.disabledBackgroun
vendor: 6,853 bytes, line 15
15d)}},outlinedPrimary:{color:t.palette.primary.main,border:"1px solid ".concat(tn(t.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(t.palette.primary.main),backgroundColor:tn(t.palette.primary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:t.palette.secondary.main,border:"1px solid ".concat(tn(t.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(t.palette.secondary.main),backgroundColor:tn(t.palette.secondary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(t.palette.action.disabled)}},contained:{color:t.palette.getContrastText(t.palette.grey[300]),backgroundColor:t.palette.grey[300],boxShadow:t.shadows[2],"&:hover":{backgroundColor:t.palette.grey.A100,boxShadow:t.shadows[4],"@media (hover: none)":{boxShadow:t.shadows[2],backgroundColor:t.palette.grey[300]},"&$disabled":{backgroundColor:t.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:t.shadows[6]},"&:active":{boxShadow:t.shadows[8]},"&$disabled":{color:t.palette.action.disabled,boxShadow:t.shadows[0],backgroundColor:t.palette.action.disabledBackground}},containedPrimary:{color:t.palette.primary.contrastText,backgroundColor:t.palette.primary.main,"&:hover":{backgroundColor:t.palette.primary.dark,"@media (hover: none)":{backgroundColor:t.palette.primary.main}}},containedSecondary:{color:t.palette.secondary.contrastText,backgroundColor:t.palette.secondary.main,"&:hover":{backgroundColor:t.palette.secondary.dark,"@media (hover: none)":{backgroundColor:t.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}},Yse=y.forwardRef(function(t,r){var i=t.children,a=t.classes,s=t.className,o=t.color,l=o===void 0?"default":o,c=t.component,h=c===void 0?"button":c,u=t.disabled,d=u===void 0?!1:u,p=t.disableElevation,f=p===void 0?!1:p,m=t.disableFocusRipple,g=m===void 0?!1:m,x=t.endIcon,v=t.focusVisibleClassName,b=t.fullWidth,j=b===void 0?!1:b,w=t.size,S=w===void 0?"medium":w,_=t.startIcon,C=t.type,E=C===void 0?"button":C,P=t.variant,T=P===void 0?"text":P,N=Be(t,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),k=_&&y.createElement("span",{className:$e(a.startIcon,a["iconSize".concat(ut(S))])},_),I=x&&y.createElement("span",{className:$e(a.endIcon,a["iconSize".concat(ut(S))])},x);return y.createElement(ni,Z({className:$e(a.root,a[T],s,l==="inherit"?a.colorInherit:l!=="default"&&a["".concat(T).concat(ut(l))],S!=="medium"&&[a["".concat(T,"Size").concat(ut(S))],a["size".concat(ut(S))]],f&&a.disableElevation,d&&a.disabled,j&&a.fullWidth),component:h,disabled:d,focusRipple:!g,focusVisibleClassName:$e(a.focusVisible,v),ref:r,type:E},N),y.createElement("span",{className:a.label},k,i,I))});const Gw=Ye(Wse,{name:"MuiButton"})(Yse),Kse=Object.freeze(Object.defineProperty({__proto__:null,default:Gw},Symbol.toStringTag,{value:"Module"}));Gw.styles;var Xse=function(t){return{root:{display:"inline-flex",borderRadius:t.shape.borderRadius},contained:{boxShadow:t.shadows[2]},disableElevation:{boxShadow:"none"},disabled:{},fullWidth:{width:"100%"},vertical:{flexDirection:"column"},grouped:{minWidth:40},groupedHorizontal:{"&:not(:first-child)":{borderTopLeftRadius:0,borderBottomLeftRadius:0},"&:not(:last-child)":{borderTopRightRadius:0,borderBottomRightRadius:0}},groupedVertical:{"&:not(:first-child)":{borderTopRightRadius:0,borderTopLeftRadius:0},"&:not(:last-child)":{borderBottomRightRadius:0,borderBottomLeftRadius:0}},groupedText:{},groupedTextHorizontal:{"&:not(:last-child)":{borderRight:"1px solid ".concat(t.palette.type==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)")}},groupedTextVertical:{"&:not(:last-child)":{borderBottom:"1px solid ".concat(t.palette.type==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)")}},groupedTextPrimary:{"&:not(:last-child)":{borderColor:tn(t.palette.primary.main,.5)}},groupedTextSecondary:{"&:not(:last-child)":{borderColor:tn(t.palette.secondary.main,.5)}},groupedOutlined:{},groupedOutlinedHorizontal:{"&:not(:first-child)":{marginLeft:-1},"&:not(:last-child)":{borderRightColor:"transparent"}},groupedOutlinedVertical:{"&:not(:first-child)":{marginTop:-1},"&:not(:last-child)":{borderBottomColor:"transparent"}},groupedOutlinedPrimary:{"&:hover":{borderColor:t.palette.primary.main}},groupedOutlinedSecondary:{"&:hover":{borderColor:t.palette.secondary.main}},groupedContained:{boxShadow:"none"},groupedContainedHorizontal:{"&:not(:last-child)":{borderRight:"1px solid ".concat(t.palette.grey[400]),"&$disabled":{borderRight:"1px solid ".concat(t.palette.action.disabled)}}},groupedContainedVertical:{"&:not(:last-child)":{borderBottom:"1px solid ".concat(t.palette.grey[400]),"&$disabled":{borderBottom:"1px solid ".concat(t.palette.action.disabled)}}},groupedContainedPrimary:{"&:not(:last-child)":{borderColor:t.palette.primary.dark}},groupedContainedSecondary:{"&:not(:last-child)":{borderColor:t.palette.secondary.dark}}}},Qse=y.forwardRef(function(t,r){var i=t.children,a=t.classes,s=t.className,o=t.color,l=o===void 0?"default":o,c=t.component,h=c===void 0?"div":c,u=t.disabled,d=u===void 0?!1:u,p=t.disableElevation,f=p===void 0?!1:p,m=t.disableFocusRipple,g=m===void 0?!1:m,x=t.disableRipple,v=x===void 0?!1:x,b=t.fullWidth,j=b===void 0?!1:b,w=t.orientation,S=w===void 0?"horizontal":w,_=t.size,C=_===void 0?"medium":_,E=t.variant,P=E===void 0?"outlined":E,T=Be(t,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","disableRipple","fullWidth","orientation","size","variant"]),N=$e(a.grouped,a["grouped".concat(ut(S))],a["grouped".concat(ut(P))],a["grouped".concat(ut(P)).c
15oncat(ut(S))],a["grouped".concat(ut(P)).concat(l!=="default"?ut(l):"")],d&&a.disabled);return y.createElement(h,Z({role:"group",className:$e(a.root,s,j&&a.fullWidth,f&&a.disableElevation,P==="contained"&&a.contained,S==="vertical"&&a.vertical),ref:r},T),y.Children.map(i,function(k){return y.isValidElement(k)?y.cloneElement(k,{className:$e(N,k.props.className),color:k.props.color||l,disabled:k.props.disabled||d,disableElevation:k.props.disableElevation||f,disableFocusRipple:g,disableRipple:v,fullWidth:j,size:k.props.size||C,variant:k.props.variant||P}):null}))});const Zse=Ye(Xse,{name:"MuiButtonGroup"})(Qse);var Jse={root:{overflow:"hidden"}},eoe=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.raised,o=s===void 0?!1:s,l=Be(t,["classes","className","raised"]);return y.createElement(ca,Z({className:$e(i.root,a),elevation:o?8:1,ref:r},l))});const toe=Ye(Jse,{name:"MuiCard"})(eoe);var noe=function(t){return{root:{display:"block",textAlign:"inherit",width:"100%","&:hover $focusHighlight":{opacity:t.palette.action.hoverOpacity},"&$focusVisible $focusHighlight":{opacity:.12}},focusVisible:{},focusHighlight:{overflow:"hidden",pointerEvents:"none",position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:"inherit",opacity:0,backgroundColor:"currentcolor",transition:t.transitions.create("opacity",{duration:t.transitions.duration.short})}}},roe=y.forwardRef(function(t,r){var i=t.children,a=t.classes,s=t.className,o=t.focusVisibleClassName,l=Be(t,["children","classes","className","focusVisibleClassName"]);return y.createElement(ni,Z({className:$e(a.root,s),focusVisibleClassName:$e(o,a.focusVisible),ref:r},l),i,y.createElement("span",{className:a.focusHighlight}))});const ioe=Ye(noe,{name:"MuiCardActionArea"})(roe);var aoe={root:{display:"flex",alignItems:"center",padding:8},spacing:{"& > :not(:first-child)":{marginLeft:8}}},soe=y.forwardRef(function(t,r){var i=t.disableSpacing,a=i===void 0?!1:i,s=t.classes,o=t.className,l=Be(t,["disableSpacing","classes","className"]);return y.createElement("div",Z({className:$e(s.root,o,!a&&s.spacing),ref:r},l))});const ooe=Ye(aoe,{name:"MuiCardActions"})(soe);var loe={root:{padding:16,"&:last-child":{paddingBottom:24}}},coe=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.component,o=s===void 0?"div":s,l=Be(t,["classes","className","component"]);return y.createElement(o,Z({className:$e(i.root,a),ref:r},l))});const doe=Ye(loe,{name:"MuiCardContent"})(coe);var uoe={root:{display:"flex",alignItems:"center",padding:16},avatar:{flex:"0 0 auto",marginRight:16},action:{flex:"0 0 auto",alignSelf:"flex-start",marginTop:-8,marginRight:-8},content:{flex:"1 1 auto"},title:{},subheader:{}},hoe=y.forwardRef(function(t,r){var i=t.action,a=t.avatar,s=t.classes,o=t.className,l=t.component,c=l===void 0?"div":l,h=t.disableTypography,u=h===void 0?!1:h,d=t.subheader,p=t.subheaderTypographyProps,f=t.title,m=t.titleTypographyProps,g=Be(t,["action","avatar","classes","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"]),x=f;x!=null&&x.type!==Dr&&!u&&(x=y.createElement(Dr,Z({variant:a?"body2":"h5",className:s.title,component:"span",display:"block"},m),x));var v=d;return v!=null&&v.type!==Dr&&!u&&(v=y.createElement(Dr,Z({variant:a?"body2":"body1",className:s.subheader,color:"textSecondary",component:"span",display:"block"},p),v)),y.createElement(c,Z({className:$e(s.root,o),ref:r},g),a&&y.createElement("div",{className:s.avatar},a),y.createElement("div",{className:s.content},x,v),i&&y.createElement("div",{className:s.action},i))});const poe=Ye(uoe,{name:"MuiCardHeader"})(hoe);var foe={root:{display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"},media:{width:"100%"},img:{objectFit:"cover"}},moe=["video","audio","picture","iframe","img"],goe=y.forwardRef(function(t,r){var i=t.children,a=t.classes,s=t.className,o=t.component,l=o===void 0?"div":o,c=t.image,h=t.src,u=t.style,d=Be(t,["children","classes","className","component","image","src","style"]),p=moe.indexOf(l)!==-1,f=!p&&c?Z({backgroundImage:'url("'.concat(c,'")')},u):u;return y.createElement(l,Z({className:$e(a.root,s,p&&a.media,"picture img".indexOf(l)!==-1&&a.img),ref:r,style:f,src:p?c||h:void 0},d),i)});const voe=Ye(foe,{name:"MuiCardMedia"})(goe);function LE(e){return e.substring(2).toLowerCase()}function boe(e){return document.documentElement.clientWidth<e.clientX||document.documentElement.clientHeight<e.clientY}function b2(e){var t=e.children,r=e.disableReactTree,i=r===void 0?!1:r,a=e.mouseEvent,s=a===void 0?"onClick":a,o=e.onClickAway,l=e.touchEvent,c=l===void 0?"onTouchEnd":l,h=y.useRef(!1),u=y.useRef(null),d=y.useRef(!1),p=y.useRef(!1);y.useEffect(function(){return setTimeout(function(){d.current=!0},0),function(){d.current=!1}},[]);var f=y.useCallback(function(b){u.current=Fr.findDOMNode(b)},[]),m=mn(t.ref,f),g=Un(function(b){var j=p.current;
15if(p.current=!1,!(!d.current||!u.current||boe(b))){if(h.current){h.current=!1;return}var w;if(b.composedPath)w=b.composedPath().indexOf(u.current)>-1;else{var S=Ir(u.current);w=!S.documentElement.contains(b.target)||u.current.contains(b.target)}!w&&(i||!j)&&o(b)}}),x=function(j){return function(w){p.current=!0;var S=t.props[j];S&&S(w)}},v={ref:m};return c!==!1&&(v[c]=x(c)),y.useEffect(function(){if(c!==!1){var b=LE(c),j=Ir(u.current),w=function(){h.current=!0};return j.addEventListener(b,g),j.addEventListener("touchmove",w),function(){j.removeEventListener(b,g),j.removeEventListener("touchmove",w)}}},[g,c]),s!==!1&&(v[s]=x(s)),y.useEffect(function(){if(s!==!1){var b=LE(s),j=Ir(u.current);return j.addEventListener(b,g),function(){j.removeEventListener(b,g)}}},[g,s]),y.createElement(y.Fragment,null,y.cloneElement(t,v))}var yoe=function(t){return{root:Ct({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",paddingLeft:t.spacing(2),paddingRight:t.spacing(2),display:"block"},t.breakpoints.up("sm"),{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}),disableGutters:{paddingLeft:0,paddingRight:0},fixed:Object.keys(t.breakpoints.values).reduce(function(r,i){var a=t.breakpoints.values[i];return a!==0&&(r[t.breakpoints.up(i)]={maxWidth:a}),r},{}),maxWidthXs:Ct({},t.breakpoints.up("xs"),{maxWidth:Math.max(t.breakpoints.values.xs,444)}),maxWidthSm:Ct({},t.breakpoints.up("sm"),{maxWidth:t.breakpoints.values.sm}),maxWidthMd:Ct({},t.breakpoints.up("md"),{maxWidth:t.breakpoints.values.md}),maxWidthLg:Ct({},t.breakpoints.up("lg"),{maxWidth:t.breakpoints.values.lg}),maxWidthXl:Ct({},t.breakpoints.up("xl"),{maxWidth:t.breakpoints.values.xl})}},xoe=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.component,o=s===void 0?"div":s,l=t.disableGutters,c=l===void 0?!1:l,h=t.fixed,u=h===void 0?!1:h,d=t.maxWidth,p=d===void 0?"lg":d,f=Be(t,["classes","className","component","disableGutters","fixed","maxWidth"]);return y.createElement(o,Z({className:$e(i.root,a,u&&i.fixed,c&&i.disableGutters,p!==!1&&i["maxWidth".concat(ut(String(p)))]),ref:r},f))});const joe=Ye(yoe,{name:"MuiContainer"})(xoe);var woe={WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box"},Soe=function(t){return Z({color:t.palette.text.primary},t.typography.body2,{backgroundColor:t.palette.background.default,"@media print":{backgroundColor:t.palette.common.white}})},_oe=function(t){return{"@global":{html:woe,"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:t.typography.fontWeightBold},body:Z({margin:0},Soe(t),{"&::backdrop":{backgroundColor:t.palette.background.default}})}}};function Coe(e){var t=e.children,r=t===void 0?null:t;return e.classes,y.createElement(y.Fragment,null,r)}const Noe=Ye(_oe,{name:"MuiCssBaseline"})(Coe);var Eoe=function(t){return{root:{"@media print":{position:"absolute !important"}},scrollPaper:{display:"flex",justifyContent:"center",alignItems:"center"},scrollBody:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}},container:{height:"100%","@media print":{height:"auto"},outline:0},paper:{margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},paperScrollPaper:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},paperScrollBody:{display:"inline-block",verticalAlign:"middle",textAlign:"left"},paperWidthFalse:{maxWidth:"calc(100% - 64px)"},paperWidthXs:{maxWidth:Math.max(t.breakpoints.values.xs,444),"&$paperScrollBody":Ct({},t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+64),{maxWidth:"calc(100% - 64px)"})},paperWidthSm:{maxWidth:t.breakpoints.values.sm,"&$paperScrollBody":Ct({},t.breakpoints.down(t.breakpoints.values.sm+64),{maxWidth:"calc(100% - 64px)"})},paperWidthMd:{maxWidth:t.breakpoints.values.md,"&$paperScrollBody":Ct({},t.breakpoints.down(t.breakpoints.values.md+64),{maxWidth:"calc(100% - 64px)"})},paperWidthLg:{maxWidth:t.breakpoints.values.lg,"&$paperScrollBody":Ct({},t.breakpoints.down(t.breakpoints.values.lg+64),{maxWidth:"calc(100% - 64px)"})},paperWidthXl:{maxWidth:t.breakpoints.values.xl,"&$paperScrollBody":Ct({},t.breakpoints.down(t.breakpoints.values.xl+64),{maxWidth:"calc(100% - 64px)"})},paperFullWidth:{width:"calc(100% - 64px)"},paperFullScreen:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,"&$paperScrollBody":{margin:0,maxWidth:"100%"}}}},Toe={enter:Rr.enteringScreen,exit:Rr.leavingScreen},koe=y.forwardRef(function(t,r){var i=t.BackdropProps,a=t.children,s=t.classes,o=t.className,l=t.disableBackdropClick,c=l===void 0?!1:l,h=t.disableEscapeKeyDown,u=h===void 0?!1:h,d=t.fullScreen,p=d===void 0?!1:d,f=t.fullWidth,m=f===void 0?!1:f,g=t.maxWidth,x=g===void 0?"sm":g,v=t.onBackdropClick,b=t.onClose,j=t.onEnter,w=t.onEntered,S=t.onEntering,_=t.onEscapeKeyDown,C=t.onExit,E=t.onExited,P=t.onExiting,T=t.open,N=t.PaperComponent,k=N===void 0?ca:N,I=t.PaperProps,D=I===void 0?{}:I,O=t.scroll,$=O===void 0?"paper":O,U=t.TransitionComponent,B=U===void 0?zw:U,L=t.transitionDuration,A=L===void 0?Toe:L,R=t.TransitionProps,F=t["aria-describedby"],q=t["aria-labelledby"],V=Be(t,["BackdropProps","children","classes","className","disableBackdropClick","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","onEnter","onEntered","onEntering","onEscapeKeyDown","onExit","onExited","onExiting","o
15pen","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps","aria-describedby","aria-labelledby"]),X=y.useRef(),M=function(z){X.current=z.target},W=function(z){z.target===z.currentTarget&&z.target===X.current&&(X.current=null,v&&v(z),!c&&b&&b(z,"backdropClick"))};return y.createElement(Wf,Z({className:$e(s.root,o),BackdropComponent:Hw,BackdropProps:Z({transitionDuration:A},i),closeAfterTransition:!0},c?{disableBackdropClick:c}:{},{disableEscapeKeyDown:u,onEscapeKeyDown:_,onClose:b,open:T,ref:r},V),y.createElement(B,Z({appear:!0,in:T,timeout:A,onEnter:j,onEntering:S,onEntered:w,onExit:C,onExiting:P,onExited:E,role:"none presentation"},R),y.createElement("div",{className:$e(s.container,s["scroll".concat(ut($))]),onMouseUp:W,onMouseDown:M},y.createElement(k,Z({elevation:24,role:"dialog","aria-describedby":F,"aria-labelledby":q},D,{className:$e(s.paper,s["paperScroll".concat(ut($))],s["paperWidth".concat(ut(String(x)))],D.className,p&&s.paperFullScreen,m&&s.paperFullWidth)}),a))))});const Poe=Ye(Eoe,{name:"MuiDialog"})(koe);var Ioe={root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},spacing:{"& > :not(:first-child)":{marginLeft:8}}},Doe=y.forwardRef(function(t,r){var i=t.disableSpacing,a=i===void 0?!1:i,s=t.classes,o=t.className,l=Be(t,["disableSpacing","classes","className"]);return y.createElement("div",Z({className:$e(s.root,o,!a&&s.spacing),ref:r},l))});const Roe=Ye(Ioe,{name:"MuiDialogActions"})(Doe);var Ooe=function(t){return{root:{flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"8px 24px","&:first-child":{paddingTop:20}},dividers:{padding:"16px 24px",borderTop:"1px solid ".concat(t.palette.divider),borderBottom:"1px solid ".concat(t.palette.divider)}}},Aoe=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.dividers,o=s===void 0?!1:s,l=Be(t,["classes","className","dividers"]);return y.createElement("div",Z({className:$e(i.root,a,o&&i.dividers),ref:r},l))});const Moe=Ye(Ooe,{name:"MuiDialogContent"})(Aoe);var $oe={root:{marginBottom:12}},Loe=y.forwardRef(function(t,r){return y.createElement(Dr,Z({component:"p",variant:"body1",color:"textSecondary",ref:r},t))});const Foe=Ye($oe,{name:"MuiDialogContentText"})(Loe);var Uoe={root:{margin:0,padding:"16px 24px",flex:"0 0 auto"}},Boe=y.forwardRef(function(t,r){var i=t.children,a=t.classes,s=t.className,o=t.disableTypography,l=o===void 0?!1:o,c=Be(t,["children","classes","className","disableTypography"]);return y.createElement("div",Z({className:$e(a.root,s),ref:r},c),l?i:y.createElement(Dr,{component:"h2",variant:"h6"},i))});const qoe=Ye(Uoe,{name:"MuiDialogTitle"})(Boe);var Voe=function(t){return{root:{height:1,margin:0,border:"none",flexShrink:0,backgroundColor:t.palette.divider},absolute:{position:"absolute",bottom:0,left:0,width:"100%"},inset:{marginLeft:72},light:{backgroundColor:tn(t.palette.divider,.08)},middle:{marginLeft:t.spacing(2),marginRight:t.spacing(2)},vertical:{height:"100%",width:1},flexItem:{alignSelf:"stretch",height:"auto"}}},zoe=y.forwardRef(function(t,r){var i=t.absolute,a=i===void 0?!1:i,s=t.classes,o=t.className,l=t.component,c=l===void 0?"hr":l,h=t.flexItem,u=h===void 0?!1:h,d=t.light,p=d===void 0?!1:d,f=t.orientation,m=f===void 0?"horizontal":f,g=t.role,x=g===void 0?c!=="hr"?"separator":void 0:g,v=t.variant,b=v===void 0?"fullWidth":v,j=Be(t,["absolute","classes","className","component","flexItem","light","orientation","role","variant"]);return y.createElement(c,Z({className:$e(s.root,o,b!=="fullWidth"&&s[b],a&&s.absolute,u&&s.flexItem,p&&s.light,m==="vertical"&&s.vertical),role:x,ref:r},j))});const Hoe=Ye(Voe,{name:"MuiDivider"})(zoe);function Goe(e,t){var r=t.getBoundingClientRect(),i;if(t.fakeTransform)i=t.fakeTransform;else{var a=window.getComputedStyle(t);i=a.getPropertyValue("-webkit-transform")||a.getPropertyValue("transform")}var s=0,o=0;if(i&&i!=="none"&&typeof i=="string"){var l=i.split("(")[1].split(")")[0].split(",");s=parseInt(l[4],10),o=parseInt(l[5],10)}return e==="left"?"translateX(".concat(window.innerWidth,"px) translateX(").concat(s-r.left,"px)"):e==="right"?"translateX(-".concat(r.left+r.
15width-s,"px)"):e==="up"?"translateY(".concat(window.innerHeight,"px) translateY(").concat(o-r.top,"px)"):"translateY(-".concat(r.top+r.height-o,"px)")}function rh(e,t){var r=Goe(e,t);r&&(t.style.webkitTransform=r,t.style.transform=r)}var Woe={enter:Rr.enteringScreen,exit:Rr.leavingScreen},y2=y.forwardRef(function(t,r){var i=t.children,a=t.direction,s=a===void 0?"down":a,o=t.in,l=t.onEnter,c=t.onEntered,h=t.onEntering,u=t.onExit,d=t.onExited,p=t.onExiting,f=t.style,m=t.timeout,g=m===void 0?Woe:m,x=t.TransitionComponent,v=x===void 0?ru:x,b=Be(t,["children","direction","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),j=Or(),w=y.useRef(null),S=y.useCallback(function($){w.current=Fr.findDOMNode($)},[]),_=mn(i.ref,S),C=mn(_,r),E=function(U){return function(B){U&&(B===void 0?U(w.current):U(w.current,B))}},P=E(function($,U){rh(s,$),Uf($),l&&l($,U)}),T=E(function($,U){var B=ja({timeout:g,style:f},{mode:"enter"});$.style.webkitTransition=j.transitions.create("-webkit-transform",Z({},B,{easing:j.transitions.easing.easeOut})),$.style.transition=j.transitions.create("transform",Z({},B,{easing:j.transitions.easing.easeOut})),$.style.webkitTransform="none",$.style.transform="none",h&&h($,U)}),N=E(c),k=E(p),I=E(function($){var U=ja({timeout:g,style:f},{mode:"exit"});$.style.webkitTransition=j.transitions.create("-webkit-transform",Z({},U,{easing:j.transitions.easing.sharp})),$.style.transition=j.transitions.create("transform",Z({},U,{easing:j.transitions.easing.sharp})),rh(s,$),u&&u($)}),D=E(function($){$.style.webkitTransition="",$.style.transition="",d&&d($)}),O=y.useCallback(function(){w.current&&rh(s,w.current)},[s]);return y.useEffect(function(){if(!(o||s==="down"||s==="right")){var $=La(function(){w.current&&rh(s,w.current)});return window.addEventListener("resize",$),function(){$.clear(),window.removeEventListener("resize",$)}}},[s,o]),y.useEffect(function(){o||O()},[o,O]),y.createElement(v,Z({nodeRef:w,onEnter:P,onEntered:N,onEntering:T,onExit:I,onExited:D,onExiting:k,appear:!0,in:o,timeout:g},b),function($,U){return y.cloneElement(i,Z({ref:C,style:Z({visibility:$==="exited"&&!o?"hidden":void 0},f,i.props.style)},U))})}),Yoe=function(t){return{root:{},docked:{flex:"0 0 auto"},paper:{overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:t.zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},paperAnchorLeft:{left:0,right:"auto"},paperAnchorRight:{left:"auto",right:0},paperAnchorTop:{top:0,left:0,bottom:"auto",right:0,height:"auto",maxHeight:"100%"},paperAnchorBottom:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},paperAnchorDockedLeft:{borderRight:"1px solid ".concat(t.palette.divider)},paperAnchorDockedTop:{borderBottom:"1px solid ".concat(t.palette.divider)},paperAnchorDockedRight:{borderLeft:"1px solid ".concat(t.palette.divider)},paperAnchorDockedBottom:{borderTop:"1px solid ".concat(t.palette.divider)},modal:{}}},x2={left:"right",right:"left",top:"down",bottom:"up"};function Nl(e){return["left","right"].indexOf(e)!==-1}function Ed(e,t){return e.direction==="rtl"&&Nl(t)?x2[t]:t}var Koe={enter:Rr.enteringScreen,exit:Rr.leavingScreen},Xoe=y.forwardRef(function(t,r){var i=t.anchor,a=i===void 0?"left":i,s=t.BackdropProps,o=t.children,l=t.classes,c=t.className,h=t.elevation,u=h===void 0?16:h,d=t.ModalProps;d=d===void 0?{}:d;var p=d.BackdropProps,f=Be(d,["BackdropProps"]),m=t.onClose,g=t.open,x=g===void 0?!1:g,v=t.PaperProps,b=v===void 0?{}:v,j=t.SlideProps,w=t.TransitionComponent,S=w===void 0?y2:w,_=t.transitionDuration,C=_===void 0?Koe:_,E=t.variant,P=E===void 0?"temporary":E,T=Be(t,["anchor","BackdropProps","children","classes","className","elevation","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"]),N=Or(),k=y.useRef(!1);y.useEffect(function(){k.current=!0},[]);var I=Ed(N,a),D=y.createElement(ca,Z({elevation:P==="temporary"?u:0,square:!0},b,{className:$e(l.paper,l["paperAnchor".concat(ut(I))],b.className,P!=="temporary"&&l["paperAnchorDocked".concat(ut(I))])}),o);if(P==="permanent")return y.createElement("div",Z({className:$e(l.root,l.docked,c),ref:r},T),D);var O=y.createElement(S,Z({in:x,direction:x2[I],timeout:C,appear:k.current},j),D);return P==="persistent"?y.createElement("div",Z({className:$e(l.root,l.docked,c),ref:r}
15,T),O):y.createElement(Wf,Z({BackdropProps:Z({},s,p,{transitionDuration:C}),BackdropComponent:Hw,className:$e(l.root,l.modal,c),open:x,onClose:m,ref:r},T,f),O)});const j2=Ye(Yoe,{name:"MuiDrawer",flip:!1})(Xoe);var w2=y.createContext({}),Qoe=function(t){var r={duration:t.transitions.duration.shortest};return{root:{position:"relative",transition:t.transitions.create(["margin"],r),"&:before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:t.palette.divider,transition:t.transitions.create(["opacity","background-color"],r)},"&:first-child":{"&:before":{display:"none"}},"&$expanded":{margin:"16px 0","&:first-child":{marginTop:0},"&:last-child":{marginBottom:0},"&:before":{opacity:0}},"&$expanded + &":{"&:before":{display:"none"}},"&$disabled":{backgroundColor:t.palette.action.disabledBackground}},rounded:{borderRadius:0,"&:first-child":{borderTopLeftRadius:t.shape.borderRadius,borderTopRightRadius:t.shape.borderRadius},"&:last-child":{borderBottomLeftRadius:t.shape.borderRadius,borderBottomRightRadius:t.shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}},expanded:{},disabled:{}}},Zoe=y.forwardRef(function(t,r){var i=t.children,a=t.classes,s=t.className,o=t.defaultExpanded,l=o===void 0?!1:o,c=t.disabled,h=c===void 0?!1:c,u=t.expanded,d=t.onChange,p=t.square,f=p===void 0?!1:p,m=t.TransitionComponent,g=m===void 0?Yf:m,x=t.TransitionProps,v=Be(t,["children","classes","className","defaultExpanded","disabled","expanded","onChange","square","TransitionComponent","TransitionProps"]),b=vs({controlled:u,default:l,name:"ExpansionPanel",state:"expanded"}),j=Ci(b,2),w=j[0],S=j[1],_=y.useCallback(function(k){S(!w),d&&d(k,!w)},[w,d,S]),C=y.Children.toArray(i),E=f2(C),P=E[0],T=E.slice(1),N=y.useMemo(function(){return{expanded:w,disabled:h,toggle:_}},[w,h,_]);return y.createElement(ca,Z({className:$e(a.root,s,w&&a.expanded,h&&a.disabled,!f&&a.rounded),ref:r,square:f},v),y.createElement(w2.Provider,{value:N},P),y.createElement(g,Z({in:w,timeout:"auto"},x),y.createElement("div",{"aria-labelledby":P.props.id,id:P.props["aria-controls"],role:"region"},T)))});const Joe=Ye(Qoe,{name:"MuiExpansionPanel"})(Zoe);var ele={root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end"},spacing:{"& > :not(:first-child)":{marginLeft:8}}},tle=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.disableSpacing,o=s===void 0?!1:s,l=Be(t,["classes","className","disableSpacing"]);return y.createElement("div",Z({className:$e(i.root,a,!o&&i.spacing),ref:r},l))});const nle=Ye(ele,{name:"MuiExpansionPanelActions"})(tle);var rle=function(t){return{root:{display:"flex",padding:t.spacing(1,2,2)}}},ile=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=Be(t,["classes","className"]);return y.createElement("div",Z({className:$e(i.root,a),ref:r},s))});const ale=Ye(rle,{name:"MuiExpansionPanelDetails"})(ile);var sle=function(t){var r={duration:t.transitions.duration.shortest};return{root:{display:"flex",minHeight:48,transition:t.transitions.create(["min-height","background-color"],r),padding:t.spacing(0,2),"&:hover:not($disabled)":{cursor:"pointer"},"&$expanded":{minHeight:64},"&$focused":{backgroundColor:t.palette.action.focus},"&$disabled":{opacity:t.palette.action.disabledOpacity}},expanded:{},focused:{},disabled:{},content:{display:"flex",flexGrow:1,transition:t.transitions.create(["margin"],r),margin:"12px 0","&$expanded":{margin:"20px 0"}},expandIcon:{transform:"rotate(0deg)",transition:t.transitions.create("transform",r),"&:hover":{backgroundColor:"transparent"},"&$expanded":{transform:"rotate(180deg)"}}}},ole=y.forwardRef(function(t,r){var i=t.children,a=t.classes,s=t.className,o=t.expandIcon,l=t.IconButtonProps,c=t.onBlur,h=t.onClick,u=t.onFocusVisible,d=Be(t,["children","classes","className","expandIcon","IconButtonProps","onBlur","onClick","onFocusVisible"]),p=y.useState(!1),f=p[0],m=p[1],g=function(E){m(!0),u&&u(E)},x=function(E){m(!1),c&&c(E)},v=y.useContext(w2),b=v.disabled,j=b===void 0?!1:b,w=v.expanded,S=v.toggle,_=function(E){S&&S(E),h&&h(E)};
vendor: 1,934 bytes, line 15
15return y.createElement(ni,Z({focusRipple:!1,disableRipple:!0,disabled:j,component:"div","aria-expanded":w,className:$e(a.root,s,j&&a.disabled,w&&a.expanded,f&&a.focused),onFocusVisible:g,onBlur:x,onClick:_,ref:r},d),y.createElement("div",{className:$e(a.content,w&&a.expanded)},i),o&&y.createElement(Oo,Z({className:$e(a.expandIcon,w&&a.expanded),edge:"end",component:"div",tabIndex:null,role:null,"aria-hidden":!0},l),o))});const lle=Ye(sle,{name:"MuiExpansionPanelSummary"})(ole);var cle=function(t){return{root:Z({},t.typography.button,{boxSizing:"border-box",minHeight:36,transition:t.transitions.create(["background-color","box-shadow","border"],{duration:t.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,boxShadow:t.shadows[6],"&:active":{boxShadow:t.shadows[12]},color:t.palette.getContrastText(t.palette.grey[300]),backgroundColor:t.palette.grey[300],"&:hover":{backgroundColor:t.palette.grey.A100,"@media (hover: none)":{backgroundColor:t.palette.grey[300]},"&$disabled":{backgroundColor:t.palette.action.disabledBackground},textDecoration:"none"},"&$focusVisible":{boxShadow:t.shadows[6]},"&$disabled":{color:t.palette.action.disabled,boxShadow:t.shadows[0],backgroundColor:t.palette.action.disabledBackground}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},primary:{color:t.palette.primary.contrastText,backgroundColor:t.palette.primary.main,"&:hover":{backgroundColor:t.palette.primary.dark,"@media (hover: none)":{backgroundColor:t.palette.primary.main}}},secondary:{color:t.palette.secondary.contrastText,backgroundColor:t.palette.secondary.main,"&:hover":{backgroundColor:t.palette.secondary.dark,"@media (hover: none)":{backgroundColor:t.palette.secondary.main}}},extended:{borderRadius:48/2,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48,"&$sizeSmall":{width:"auto",padding:"0 8px",borderRadius:34/2,minWidth:34,he
15ight:34},"&$sizeMedium":{width:"auto",padding:"0 16px",borderRadius:40/2,minWidth:40,height:40}},focusVisible:{},disabled:{},colorInherit:{color:"inherit"},sizeSmall:{width:40,height:40},sizeMedium:{width:48,height:48}}},dle=y.forwardRef(function(t,r){var i=t.children,a=t.classes,s=t.className,o=t.color,l=o===void 0?"default":o,c=t.component,h=c===void 0?"button":c,u=t.disabled,d=u===void 0?!1:u,p=t.disableFocusRipple,f=p===void 0?!1:p,m=t.focusVisibleClassName,g=t.size,x=g===void 0?"large":g,v=t.variant,b=v===void 0?"circular":v,j=Be(t,["children","classes","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"]);return y.createElement(ni,Z({className:$e(a.root,s,x!=="large"&&a["size".concat(ut(x))],d&&a.disabled,b==="extended"&&a.extended,{primary:a.primary,secondary:a.secondary,inherit:a.colorInherit}[l]),component:h,disabled:d,focusRipple:!f,focusVisibleClassName:$e(a.focusVisible,m),ref:r},j),y.createElement("span",{className:a.label},i))});const ule=Ye(cle,{name:"MuiFab"})(dle);var hle={root:{display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},marginNormal:{marginTop:16,marginBottom:8},marginDense:{marginTop:8,marginBottom:4},fullWidth:{width:"100%"}},ple=y.forwardRef(function(t,r){var i=t.children,a=t.classes,s=t.className,o=t.color,l=o===void 0?"primary":o,c=t.component,h=c===void 0?"div":c,u=t.disabled,d=u===void 0?!1:u,p=t.error,f=p===void 0?!1:p,m=t.fullWidth,g=m===void 0?!1:m,x=t.focused,v=t.hiddenLabel,b=v===void 0?!1:v,j=t.margin,w=j===void 0?"none":j,S=t.required,_=S===void 0?!1:S,C=t.size,E=t.variant,P=E===void 0?"standard":E,T=Be(t,["children","classes","className","color","component","disabled","error","fullWidth","focused","hiddenLabel","margin","required","size","variant"]),N=y.useState(function(){var X=!1;return i&&y.Children.forEach(i,function(M){if(ls(M,["Input","Select"])){var W=ls(M,["Select"])?M.props.input:M;W&&Bie(W.props)&&(X=!0)}}),X}),k=N[0],I=N[1],D=y.useState(function(){var X=!1;return i&&y.Children.forEach(i,function(M){ls(M,["Input","Select"])&&Fw(M.props,!0)&&(X=!0)}),X}),O=D[0],$=D[1],U=y.useState(!1),B=U[0],L=U[1],A=x!==void 0?x:B;d&&A&&L(!1);var R,F=y.useCallback(function(){$(!0)},[]),q=y.useCallback(function(){$(!1)},[]),V={adornedStart:k,setAdornedStart:I,color:l,disabled:d,error:f,filled:O,focused:A,fullWidth:g,hiddenLabel:b,margin:(C==="small"?"dense":void 0)||w,onBlur:function(){L(!1)},onEmpty:q,onFilled:F,onFocus:function(){L(!0)},registerEffect:R,required:_,variant:P};return y.createElement(Su.Provider,{value:V},y.createElement(h,Z({className:$e(a.root,s,w!=="none"&&a["margin".concat(ut(w))],g&&a.fullWidth),ref:r},T),i))});const Ww=Ye(hle,{name:"MuiFormControl"})(ple),fle=Object.freeze(Object.defineProperty({__proto__:null,default:Ww,useFormControl:xs},Symbol.toStringTag,{value:"Module"}));var mle=function(t){return{root:{display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,"&$disabled":{cursor:"default"}},labelPlacementStart:{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},labelPlacementTop:{flexDirection:"column-reverse",marginLeft:16},labelPlacementBottom:{flexDirection:"column",marginLeft:16},disabled:{},label:{"&$disabled":{color:t.palette.text.disabled}}}},gle=y.forwardRef(function(t,r){t.checked;var i=t.classes,a=t.className,s=t.control,o=t.disabled;t.inputRef;var l=t.label,c=t.labelPlacement,h=c===void 0?"end":c;t.name,t.onChange,t.value;var u=Be(t,["checked","classes","className","control","disabled","inputRef","label","labelPlacement","name","onChange","value"]),d=xs(),p=o;typeof p>"u"&&typeof s.props.disabled<"u"&&(p=s.props.disabled),typeof p>"u"&&d&&(p=d.disabled);var f={disabled:p};return["checked","name","onChange","value","inputRef"].forEach(function(m){typeof s.props[m]>"u"&&typeof t[m]<"u"&&(f[m]=t[m])}),y.createElement("label",Z({className:$e(i.root,a,h!=="end"&&i["labelPlacement".concat(ut(h))],p&&i.disabled),ref:r},u),y.cloneElement(s,f),y.createElement(Dr,{component:"span",className:$e(i.label,p&&i.disabled)},l))});
15const S2=Ye(mle,{name:"MuiFormControlLabel"})(gle),vle=Object.freeze(Object.defineProperty({__proto__:null,default:S2},Symbol.toStringTag,{value:"Module"}));var ble={root:{display:"flex",flexDirection:"column",flexWrap:"wrap"},row:{flexDirection:"row"}},yle=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.row,o=s===void 0?!1:s,l=Be(t,["classes","className","row"]);return y.createElement("div",Z({className:$e(i.root,a,o&&i.row),ref:r},l))});const Yw=Ye(ble,{name:"MuiFormGroup"})(yle),xle=Object.freeze(Object.defineProperty({__proto__:null,default:Yw},Symbol.toStringTag,{value:"Module"}));var jle=function(t){return{root:Z({color:t.palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,margin:0,"&$disabled":{color:t.palette.text.disabled},"&$error":{color:t.palette.error.main}}),error:{},disabled:{},marginDense:{marginTop:4},contained:{marginLeft:14,marginRight:14},focused:{},filled:{},required:{}}},wle=y.forwardRef(function(t,r){var i=t.children,a=t.classes,s=t.className,o=t.component,l=o===void 0?"p":o;t.disabled,t.error,t.filled,t.focused,t.margin,t.required,t.variant;var c=Be(t,["children","classes","className","component","disabled","error","filled","focused","margin","required","variant"]),h=xs(),u=nc({props:t,muiFormControl:h,states:["variant","margin","disabled","error","filled","focused","required"]});return y.createElement(l,Z({className:$e(a.root,(u.variant==="filled"||u.variant==="outlined")&&a.contained,s,u.disabled&&a.disabled,u.error&&a.error,u.filled&&a.filled,u.focused&&a.focused,u.required&&a.required,u.margin==="dense"&&a.marginDense),ref:r},c),i===" "?y.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}}):i)});const _2=Ye(jle,{name:"MuiFormHelperText"})(wle);var Sle=function(t){return{root:Z({color:t.palette.text.secondary},t.typography.body1,{lineHeight:1,padding:0,"&$focused":{color:t.palette.primary.main},"&$disabled":{color:t.palette.text.disabled},"&$error":{color:t.palette.error.main}}),colorSecondary:{"&$focused":{color:t.palette.secondary.main}},focused:{},disabled:{},error:{},filled:{},required:{},asterisk:{"&$error":{color:t.palette.error.main}}}},_le=y.forwardRef(function(t,r){var i=t.children,a=t.classes,s=t.className;t.color;var o=t.component,l=o===void 0?"label":o;t.disabled,t.error,t.filled,t.focused,t.required;var c=Be(t,["children","classes","className","color","component","disabled","error","filled","focused","required"]),h=xs(),u=nc({props:t,muiFormControl:h,states:["color","required","focused","disabled","error","filled"]});return y.createElement(l,Z({className:$e(a.root,a["color".concat(ut(u.color||"primary"))],s,u.disabled&&a.disabled,u.error&&a.error,u.filled&&a.filled,u.focused&&a.focused,u.required&&a.required),ref:r},c),i,u.required&&y.createElement("span",{"aria-hidden":!0,className:$e(a.asterisk,u.error&&a.error)}," ","*"))});const C2=Ye(Sle,{name:"MuiFormLabel"})(_le);var Cle=[0,1,2,3,4,5,6,7,8,9,10],Nle=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12];function Ele(e,t,r){var i={};Nle.forEach(function(a){var s="grid-".concat(r,"-").concat(a);if(a===!0){i[s]={flexBasis:0,flexGrow:1,maxWidth:"100%"};return}if(a==="auto"){i[s]={flexBasis:"auto",flexGrow:0,maxWidth:"none"};return}var o="".concat(Math.round(a/12*1e8)/1e6,"%");i[s]={flexBasis:o,flexGrow:0,maxWidth:o}}),r==="xs"?Z(e,i):e[t.breakpoints.up(r)]=i}function ly(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,r=parseFloat(e);return"".concat(r/t).concat(String(e).replace(String(r),"")||"px")}function Tle(e,t){var r={};return Cle.forEach(function(i){var a=e.spacing(i);a!==0&&(r["spacing-".concat(t,"-").concat(i)]={margin:"-".concat(ly(a,2)),width:"calc(100% + ".concat(ly(a),")"),"& > $item":{padding:ly(a,2)}})}),r}var kle=function(t){return Z({root:{},container:{boxSizing:"border-box",display:"flex",flexWrap:"wrap",width:"100%"},item:{boxSizing:"border-box",margin:"0"},zeroMinWidth:{minWidth:0},"direction-xs-column":{flexDirection:"column"},"direction-xs-column-reverse":{flexDirection:"column-reverse"},"direction-xs-row-reverse":{flexDirection:"row-reverse"},"wrap-xs-nowrap":{flexWrap:"nowrap"},"wrap-xs-wrap-reverse":{flexWrap:"wrap-reverse"},"align-items-xs-center":{alignItems:"center"},"align-items-xs-flex-start":{alignItems:"flex-start"},"align-items-xs-flex-end":{alignItems:"flex-end"},"align-items-xs-baseline":{alignItems:"baseline"},"align-content-xs-center":{alignContent:"center"},"align-content-xs-flex-start":{alignContent:"flex-start"},"align-content-xs-flex-end":{alignContent:"flex-end"},"align-content-xs-space-between":{alignContent:"space-between"},"align-content-xs-space-around":{alignContent:"space-around"},"justify-content-xs-center":{justifyContent:"center"},"justify-content-xs-flex-end":{justifyContent:"flex-end"},"justify-content-xs-space-between":{justifyContent:"space-between"},"justify-content-xs-space-around":{justifyContent:"space-around"},"justify-content-xs-space-evenly":{justifyContent:"space-evenly"}},Tle(t,"xs"),t.breakpoints.keys.reduce(function(r,i){return Ele(r,t,i),r},{}))},Ple=y.forwardRef(function(t,r){var i=t.alignContent,a=i===void 0?"stretch":i,s=t.alignItems,o=s===void 0?"stretch":s,l=t.classes,c=t.className,h=t.component,u=h===void 0?"div":h,d=t.container,p=d===void 0?!1:d,f=t.direction,m=f===void 0?"row":f,g=t.item,x=g===void 0?!1:g,v=t.justify,b=t.justifyContent,j=b===void 0?"flex-start":b,w=t.lg,S=w===void 0?!1:w,_=t.md,C=_===void 0?!1:_,E=t.sm,P=E===void 0?!1:E,T=t.spacing,N=T===void 0?0:T,k=t.wrap,I=k===void 0?"wrap":k,D=t.xl,O=D===void 0?!1:D,$=t.xs,U=$===void 0?!1:$,B=t.zeroMinWidth,L=B===void 0?!1:B,A=Be(t,["alignContent","alignItems","classes","className","component","container","direction","item","justify","justifyContent","lg","md","sm","spacing","wrap","xl","xs","zeroMinWidth"]),R=$e(l.root,c,p&&[l.container,N!==0&&l["spacing-xs-".concat(String(N))]],x&&l.item,L&&l.zeroMinWidth,m!=="row"&&l["direction-xs-".concat(String(m))],I!=="wrap"&&l["wrap-xs-".concat(String(I))],o!=="stretch"&&l["align-items-xs-".concat(String(o))],a!=="stretch"&&l["align-content-xs-".concat(String(a))],(v||j)!=="flex-start"&&l["justify-content-xs-".concat(String(v||j))],U!==!1&&l["grid-xs-".concat(String(U))],P!==!1&&l["grid-sm-".concat(String(P))],C!==!1&&l["grid-md-".concat(String(C))],S!==!1&&l["grid-lg-".concat(String(S))],O!==!1&&l["grid-xl-".concat(String(O))]);return y.createElement(u,Z({className:R,ref:r},A))}),Ile=Ye(kle,{name:"MuiGrid"})(Ple),Dle={root:{display:"flex",flexWrap:"wrap",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch"}},Rle=y.forwardRef(function(t,r){var i=t.cellHeight,a=i===void 0?180:i,s=t.children,o=t.classes,l=t.className,c=t.cols,h=c===void 0?2:c,u=t.component,d=u===void 0?"ul":u,p=t.spacing,f=p===void 0?4:p,m=t.style,g=Be(t,["cellHeight","children","classes","className","cols","component","spacing","style"]);return y.createElement(d,Z({className:$e(o.root,l),ref:r,style:Z({margin:-f/2},m)},g),y.Children.map(s,function(x){if(!y.isValidElement(x))return null;var v=x.props.cols||1,b=x.props.rows||1;return y.cloneElement(x,{style:Z({width:"".concat(100/h*v,"%"),height:a==="auto"?"auto":a*b+f,padding:f/2},x.props.style)})}))});const Ole=Ye(Dle,{name:"MuiGridList"})(Rle);var Ale={root:{boxSizing:"border-box",flexShrink:0},tile:{position:"relative",display:"block",height:"100%",overflow:"hidden"},imgFullHeight:{height:"100%",transform:"translateX(-50%)",position:"relative",left:"50%"},imgFullWidth:{width:"100%",position:"relative",transform:"translateY(-50%)",to
15p:"50%"}},$x=function(t,r){if(!(!t||!t.complete))if(t.width/t.height>t.parentElement.offsetWidth/t.parentElement.offsetHeight){var i,a;(i=t.classList).remove.apply(i,xr(r.imgFullWidth.split(" "))),(a=t.classList).add.apply(a,xr(r.imgFullHeight.split(" ")))}else{var s,o;(s=t.classList).remove.apply(s,xr(r.imgFullHeight.split(" "))),(o=t.classList).add.apply(o,xr(r.imgFullWidth.split(" ")))}};function Mle(e,t){e&&(e.complete?$x(e,t):e.addEventListener("load",function(){$x(e,t)}))}var $le=y.forwardRef(function(t,r){var i=t.children,a=t.classes,s=t.className;t.cols;var o=t.component,l=o===void 0?"li":o;t.rows;var c=Be(t,["children","classes","className","cols","component","rows"]),h=y.useRef(null);return y.useEffect(function(){Mle(h.current,a)}),y.useEffect(function(){var u=La(function(){$x(h.current,a)});return window.addEventListener("resize",u),function(){u.clear(),window.removeEventListener("resize",u)}},[a]),y.createElement(l,Z({className:$e(a.root,s),ref:r},c),y.createElement("div",{className:a.tile},y.Children.map(i,function(u){return y.isValidElement(u)?u.type==="img"||ls(u,["Image"])?y.cloneElement(u,{ref:h}):u:null})))});const Lle=Ye(Ale,{name:"MuiGridListTile"})($le);var Fle=function(t){return{root:{position:"absolute",left:0,right:0,height:48,background:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",fontFamily:t.typography.fontFamily},titlePositionBottom:{bottom:0},titlePositionTop:{top:0},rootSubtitle:{height:68},titleWrap:{flexGrow:1,marginLeft:16,marginRight:16,color:t.palette.common.white,overflow:"hidden"},titleWrapActionPosLeft:{marginLeft:0},titleWrapActionPosRight:{marginRight:0},title:{fontSize:t.typography.pxToRem(16),lineHeight:"24px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},subtitle:{fontSize:t.typography.pxToRem(12),lineHeight:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},actionIcon:{},actionIconActionPosLeft:{order:-1}}},Ule=y.forwardRef(function(t,r){var i=t.actionIcon,a=t.actionPosition,s=a===void 0?"right":a,o=t.classes,l=t.className,c=t.subtitle,h=t.title,u=t.titlePosition,d=u===void 0?"bottom":u,p=Be(t,["actionIcon","actionPosition","classes","className","subtitle","title","titlePosition"]),f=i&&s;return y.createElement("div",Z({className:$e(o.root,l,d==="top"?o.titlePositionTop:o.titlePositionBottom,c&&o.rootSubtitle),ref:r},p),y.createElement("div",{className:$e(o.titleWrap,{left:o.titleWrapActionPosLeft,right:o.titleWrapActionPosRight}[f])},y.createElement("div",{className:o.title},h),c?y.createElement("div",{className:o.subtitle},c):null),i?y.createElement("div",{className:$e(o.actionIcon,f==="left"&&o.actionIconActionPosLeft)},i):null)});const Ble=Ye(Fle,{name:"MuiGridListTileBar"})(Ule);function N2(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=Qs(),i=au({theme:r,name:"MuiUseMediaQuery",props:{}}),a=typeof e=="function"?e(r):e;a=a.replace(/^@media( ?)/m,"");var s=typeof window<"u"&&typeof window.matchMedia<"u",o=Z({},i,t),l=o.defaultMatches,c=l===void 0?!1:l,h=o.matchMedia,u=h===void 0?s?window.matchMedia:null:h,d=o.noSsr,p=d===void 0?!1:d,f=o.ssrMatchMedia,m=f===void 0?null:f,g=y.useState(function(){return p&&s?u(a).matches:m?m(a).matches:c}),x=g[0],v=g[1];return y.useEffect(function(){var b=!0;if(s){var j=u(a),w=function(){b&&v(j.matches)};return w(),j.addListener(w),function(){b=!1,j.removeListener(w)}}},[a,u,s]),x}var E2=function(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return i?Jr.indexOf(t)<=Jr.indexOf(r):Jr.indexOf(t)<Jr.indexOf(r)},Kw=function(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return i?Jr.indexOf(r)<=Jr.indexOf(t):Jr.indexOf(r)<Jr.indexOf(t)},qle=typeof window>"u"?y.useEffect:y.useLayoutEffect,Xw=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return function(r){var i=t.withTheme,a=i===void 0?!1:i,s=t.noSSR,o=s===void 0?!1:s,l=t.initialWidth;function c(h){var u=Or(),d=h.theme||u,p=au({theme:d,name:"MuiWithWidth",props:Z({},h)}),f=p.initialWidth,m=p.width,g=Be(p,["initialWidth","width"]),x=y.useState(!1),v=x[0],b=x[1];qle(function(){b(!0)},[]);var j=d.breakpoints.keys.slice().reverse(),w=j.reduce(function(_,C){var E=N2(d.breakpoints.up(C));return!_&&E?C:_}
15,null),S=Z({width:m||(v||o?w:void 0)||f||l},a?{theme:d}:{},g);return S.width===void 0?null:y.createElement(r,S)}return zl(c,r),c}};function T2(e){var t=e.children,r=e.only,i=e.width,a=Or(),s=!0;if(r)if(Array.isArray(r))for(var o=0;o<r.length;o+=1){var l=r[o];if(i===l){s=!1;break}}else r&&i===r&&(s=!1);if(s)for(var c=0;c<a.breakpoints.keys.length;c+=1){var h=a.breakpoints.keys[c],u=e["".concat(h,"Up")],d=e["".concat(h,"Down")];if(u&&E2(h,i)||d&&Kw(h,i)){s=!1;break}}return s?t:null}T2.propTypes={children:Nt.node,className:Nt.string,implementation:Nt.oneOf(["js","css"]),initialWidth:Nt.oneOf(["xs","sm","md","lg","xl"]),lgDown:Nt.bool,lgUp:Nt.bool,mdDown:Nt.bool,mdUp:Nt.bool,only:Nt.oneOfType([Nt.oneOf(["xs","sm","md","lg","xl"]),Nt.arrayOf(Nt.oneOf(["xs","sm","md","lg","xl"]))]),smDown:Nt.bool,smUp:Nt.bool,width:Nt.string.isRequired,xlDown:Nt.bool,xlUp:Nt.bool,xsDown:Nt.bool,xsUp:Nt.bool};const Vle=Xw()(T2);var zle=function(t){var r={display:"none"};return t.breakpoints.keys.reduce(function(i,a){return i["only".concat(ut(a))]=Ct({},t.breakpoints.only(a),r),i["".concat(a,"Up")]=Ct({},t.breakpoints.up(a),r),i["".concat(a,"Down")]=Ct({},t.breakpoints.down(a),r),i},{})};function Hle(e){var t=e.children,r=e.classes,i=e.className,a=e.only;Be(e,["children","classes","className","only"]);var s=Or(),o=[];i&&o.push(i);for(var l=0;l<s.breakpoints.keys.length;l+=1){var c=s.breakpoints.keys[l],h=e["".concat(c,"Up")],u=e["".concat(c,"Down")];h&&o.push(r["".concat(c,"Up")]),u&&o.push(r["".concat(c,"Down")])}if(a){var d=Array.isArray(a)?a:[a];d.forEach(function(p){o.push(r["only".concat(ut(p))])})}return y.createElement("div",{className:o.join(" ")},t)}const Gle=Ye(zle,{name:"PrivateHiddenCss"})(Hle);function Wle(e){var t=e.implementation,r=t===void 0?"js":t,i=e.lgDown,a=i===void 0?!1:i,s=e.lgUp,o=s===void 0?!1:s,l=e.mdDown,c=l===void 0?!1:l,h=e.mdUp,u=h===void 0?!1:h,d=e.smDown,p=d===void 0?!1:d,f=e.smUp,m=f===void 0?!1:f,g=e.xlDown,x=g===void 0?!1:g,v=e.xlUp,b=v===void 0?!1:v,j=e.xsDown,w=j===void 0?!1:j,S=e.xsUp,_=S===void 0?!1:S,C=Be(e,["implementation","lgDown","lgUp","mdDown","mdUp","smDown","smUp","xlDown","xlUp","xsDown","xsUp"]);return r==="js"?y.createElement(Vle,Z({lgDown:a,lgUp:o,mdDown:c,mdUp:u,smDown:p,smUp:m,xlDown:x,xlUp:b,xsDown:w,xsUp:_},C)):y.createElement(Gle,Z({lgDown:a,lgUp:o,mdDown:c,mdUp:u,smDown:p,smUp:m,xlDown:x,xlUp:b,xsDown:w,xsUp:_},C))}var Yle=function(t){return{root:{userSelect:"none",fontSize:t.typography.pxToRem(24),width:"1em",height:"1em",overflow:"hidden",flexShrink:0},colorPrimary:{color:t.palette.primary.main},colorSecondary:{color:t.palette.secondary.main},colorAction:{color:t.palette.action.active},colorError:{color:t.palette.error.main},colorDisabled:{color:t.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:t.typography.pxToRem(20)},fontSizeLarge:{fontSize:t.typography.pxToRem(36)}}},k2=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.color,o=s===void 0?"inherit":s,l=t.component,c=l===void 0?"span":l,h=t.fontSize,u=h===void 0?"medium":h,d=Be(t,["classes","className","color","component","fontSize"]);return y.createElement(c,Z({className:$e("material-icons",i.root,a,o!=="inherit"&&i["color".concat(ut(o))],u!=="default"&&u!=="medium"&&i["fontSize".concat(ut(u))]),"aria-hidden":!0,ref:r},d))});k2.muiName="Icon";const Kle=Ye(Yle,{name:"MuiIcon"})(k2);var Xle={root:{display:"flex",flexWrap:"wrap",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch"}},Qle=y.forwardRef(function(t,r){var i=t.cellHeight,a=t.children,s=t.classes,o=t.className,l=t.cols,c=l===void 0?2:l,h=t.component,u=h===void 0?"ul":h,d=t.gap,p=d===void 0?4:d,f=t.rowHeight,m=f===void 0?180:f,g=t.spacing,x=t.style,v=Be(t,["cellHeight","children","classes","className","cols","component","gap","rowHeight","spacing","style"]),b=g||p,j=i||m;return y.createElement(u,Z({className:$e(s.root,o),ref:r,style:Z({margin:-b/2},x)},v),y.Children.map(a,function(w){if(!y.isValidElement(w))return null;var S=w.props.cols||1,_=w.props.rows||1;return y.cloneElement(w,{style:Z({width:"".concat(100/c*S,"%"),height:j==="auto"?"auto":j*_+b,padding:b/2},w.props.style)})}))});const Zle=Ye(Xle,{name:"MuiImageList"})(Qle);var Jle={root:{boxSizing:"border-box",flexShrink:0},item:{position:"relative",display:"block",height:"100%",overflow:"hidden"},imgFullHeight:{height:"100%",transform:"translateX(-50%)",position:"relative",left:"50%"},imgFullWidth:{width:"100%",position:"relative",transform:"translateY(-50%)",to
15p:"50%"}},Lx=function(t,r){if(!(!t||!t.complete))if(t.width/t.height>t.parentElement.offsetWidth/t.parentElement.offsetHeight){var i,a;(i=t.classList).remove.apply(i,xr(r.imgFullWidth.split(" "))),(a=t.classList).add.apply(a,xr(r.imgFullHeight.split(" ")))}else{var s,o;(s=t.classList).remove.apply(s,xr(r.imgFullHeight.split(" "))),(o=t.classList).add.apply(o,xr(r.imgFullWidth.split(" ")))}};function ece(e,t){e&&(e.complete?Lx(e,t):e.addEventListener("load",function(){Lx(e,t)}))}var tce=y.forwardRef(function(t,r){var i=t.children,a=t.classes,s=t.className;t.cols;var o=t.component,l=o===void 0?"li":o;t.rows;var c=Be(t,["children","classes","className","cols","component","rows"]),h=y.useRef(null);return y.useEffect(function(){ece(h.current,a)}),y.useEffect(function(){var u=La(function(){Lx(h.current,a)});return window.addEventListener("resize",u),function(){u.clear(),window.removeEventListener("resize",u)}},[a]),y.createElement(l,Z({className:$e(a.root,s),ref:r},c),y.createElement("div",{className:a.item},y.Children.map(i,function(u){return y.isValidElement(u)?u.type==="img"||ls(u,["Image"])?y.cloneElement(u,{ref:h}):u:null})))});const nce=Ye(Jle,{name:"MuiImageListItem"})(tce);var rce=function(t){return{root:{position:"absolute",left:0,right:0,height:48,background:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",fontFamily:t.typography.fontFamily},positionBottom:{bottom:0},positionTop:{top:0},rootSubtitle:{height:68},titleWrap:{flexGrow:1,marginLeft:16,marginRight:16,color:t.palette.common.white,overflow:"hidden"},titleWrapActionPosLeft:{marginLeft:0},titleWrapActionPosRight:{marginRight:0},title:{fontSize:t.typography.pxToRem(16),lineHeight:"24px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},subtitle:{fontSize:t.typography.pxToRem(12),lineHeight:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},actionIcon:{},actionIconActionPosLeft:{order:-1}}},ice=y.forwardRef(function(t,r){var i=t.actionIcon,a=t.actionPosition,s=a===void 0?"right":a,o=t.classes,l=t.className,c=t.subtitle,h=t.title,u=t.position,d=u===void 0?"bottom":u,p=t.titlePosition,f=Be(t,["actionIcon","actionPosition","classes","className","subtitle","title","position","titlePosition"]),m=p||d,g=i&&s;return y.createElement("div",Z({className:$e(o.root,l,c&&o.rootSubtitle,{bottom:o.positionBottom,top:o.positionTop}[m]),ref:r},f),y.createElement("div",{className:$e(o.titleWrap,{left:o.titleWrapActionPosLeft,right:o.titleWrapActionPosRight}[g])},y.createElement("div",{className:o.title},h),c?y.createElement("div",{className:o.subtitle},c):null),i?y.createElement("div",{className:$e(o.actionIcon,g==="left"&&o.actionIconActionPosLeft)},i):null)});const ace=Ye(rce,{name:"MuiImageListItemBar"})(ice);var sce={root:{display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap"},filled:{"&$positionStart:not($hiddenLabel)":{marginTop:16}},positionStart:{marginRight:8},positionEnd:{marginLeft:8},disablePointerEvents:{pointerEvents:"none"},hiddenLabel:{},marginDense:{}},oce=y.forwardRef(function(t,r){var i=t.children,a=t.classes,s=t.className,o=t.component,l=o===void 0?"div":o,c=t.disablePointerEvents,h=c===void 0?!1:c,u=t.disableTypography,d=u===void 0?!1:u,p=t.position,f=t.variant,m=Be(t,["children","classes","className","component","disablePointerEvents","disableTypography","position","variant"]),g=zA()||{},x=f;return f&&g.variant,g&&!x&&(x=g.variant),y.createElement(Su.Provider,{value:null},y.createElement(l,Z({className:$e(a.root,s,p==="end"?a.positionEnd:a.positionStart,h&&a.disablePointerEvents,g.hiddenLabel&&a.hiddenLabel,x==="filled"&&a.filled,g.margin==="dense"&&a.marginDense),ref:r},m),typeof i=="string"&&!d?y.createElement(Dr,{color:"textSecondary"},i):i))});const lce=Ye(sce,{name:"MuiInputAdornment"})(oce);var cce=function(t){return{root:{display:"block",transformOrigin:"top left"},focused:{},disabled:{},error:{},required:{},asterisk:{},formControl:{position:"absolute",left:0,top:0,transform:"translate(0, 24px) scale(1)"},marginDense:{transform:"translate(0, 21px) scale(1)"},shrink:{transform:"translate(0, 1.5px) scale(0.75)",transformOrigin:"top left"},animated:{transition:t.transitions.create(["color","transform"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},filled:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 20px) scale(1)","&$marginDense":{transform:"translate(12px, 17px) scale(1)"},"&$shrink":{transform:"translate(12px, 10px) scale(0.75)","&$marginDense":{transform:"translate(12px, 7
15px) scale(0.75)"}}},outlined:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 20px) scale(1)","&$marginDense":{transform:"translate(14px, 12px) scale(1)"},"&$shrink":{transform:"translate(14px, -6px) scale(0.75)"}}}},dce=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.disableAnimation,o=s===void 0?!1:s;t.margin;var l=t.shrink;t.variant;var c=Be(t,["classes","className","disableAnimation","margin","shrink","variant"]),h=xs(),u=l;typeof u>"u"&&h&&(u=h.filled||h.focused||h.adornedStart);var d=nc({props:t,muiFormControl:h,states:["margin","variant"]});return y.createElement(C2,Z({"data-shrink":u,className:$e(i.root,a,h&&i.formControl,!o&&i.animated,u&&i.shrink,d.margin==="dense"&&i.marginDense,{filled:i.filled,outlined:i.outlined}[d.variant]),classes:{focused:i.focused,disabled:i.disabled,error:i.error,required:i.required,asterisk:i.asterisk},ref:r},c))});const Qw=Ye(cce,{name:"MuiInputLabel"})(dce),uce=Object.freeze(Object.defineProperty({__proto__:null,default:Qw},Symbol.toStringTag,{value:"Module"}));var cy=4,hce=function(t){var r=function(o){return t.palette.type==="light"?zo(o,.62):Vo(o,.5)},i=r(t.palette.primary.main),a=r(t.palette.secondary.main);return{root:{position:"relative",overflow:"hidden",height:4,"@media print":{colorAdjust:"exact"}},colorPrimary:{backgroundColor:i},colorSecondary:{backgroundColor:a},determinate:{},indeterminate:{},buffer:{backgroundColor:"transparent"},query:{transform:"rotate(180deg)"},dashed:{position:"absolute",marginTop:0,height:"100%",width:"100%",animation:"$buffer 3s infinite linear"},dashedColorPrimary:{backgroundImage:"radial-gradient(".concat(i," 0%, ").concat(i," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0 -23px"},dashedColorSecondary:{backgroundImage:"radial-gradient(".concat(a," 0%, ").concat(a," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0 -23px"},bar:{width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},barColorPrimary:{backgroundColor:t.palette.primary.main},barColorSecondary:{backgroundColor:t.palette.secondary.main},bar1Indeterminate:{width:"auto",animation:"$indeterminate1 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite"},bar1Determinate:{transition:"transform .".concat(cy,"s linear")},bar1Buffer:{zIndex:1,transition:"transform .".concat(cy,"s linear")},bar2Indeterminate:{width:"auto",animation:"$indeterminate2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite"},bar2Buffer:{transition:"transform .".concat(cy,"s linear")},"@keyframes indeterminate1":{"0%":{left:"-35%",right:"100%"},"60%":{left:"100%",right:"-90%"},"100%":{left:"100%",right:"-90%"}},"@keyframes indeterminate2":{"0%":{left:"-200%",right:"100%"},"60%":{left:"107%",right:"-8%"},"100%":{left:"107%",right:"-8%"}},"@keyframes buffer":{"0%":{opacity:1,backgroundPosition:"0 -23px"},"50%":{opacity:0,backgroundPosition:"0 -23px"},"100%":{opacity:1,backgroundPosition:"-200px -23px"}}}},pce=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.color,o=s===void 0?"primary":s,l=t.value,c=t.valueBuffer,h=t.variant,u=h===void 0?"indeterminate":h,d=Be(t,["classes","className","color","value","valueBuffer","variant"]),p=Or(),f={},m={bar1:{},bar2:{}};if((u==="determinate"||u==="buffer")&&l!==void 0){f["aria-valuenow"]=Math.round(l),f["aria-valuemin"]=0,f["aria-valuemax"]=100;var g=l-100;p.direction==="rtl"&&(g=-g),m.bar1.transform="translateX(".concat(g,"%)")}if(u==="buffer"&&c!==void 0){var x=(c||0)-100;p.direction==="rtl"&&(x=-x),m.bar2.transform="translateX(".concat(x,"%)")}return y.createElement("div",Z({className:$e(i.root,i["color".concat(ut(o))],a,{determinate:i.determinate,indeterminate:i.indeterminate,buffer:i.buffer,query:i.query}[u]),role:"progressbar"},f,{ref:r},d),u==="buffer"?y.createElement("div",{className:$e(i.dashed,i["dashedColor".concat(ut(o))])}
15):null,y.createElement("div",{className:$e(i.bar,i["barColor".concat(ut(o))],(u==="indeterminate"||u==="query")&&i.bar1Indeterminate,{determinate:i.bar1Determinate,buffer:i.bar1Buffer}[u]),style:m.bar1}),u==="determinate"?null:y.createElement("div",{className:$e(i.bar,(u==="indeterminate"||u==="query")&&i.bar2Indeterminate,u==="buffer"?[i["color".concat(ut(o))],i.bar2Buffer]:i["barColor".concat(ut(o))]),style:m.bar2}))});const P2=Ye(hce,{name:"MuiLinearProgress"})(pce);var fce={root:{},underlineNone:{textDecoration:"none"},underlineHover:{textDecoration:"none","&:hover":{textDecoration:"underline"}},underlineAlways:{textDecoration:"underline"},button:{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none","&::-moz-focus-inner":{borderStyle:"none"},"&$focusVisible":{outline:"auto"}},focusVisible:{}},mce=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.color,o=s===void 0?"primary":s,l=t.component,c=l===void 0?"a":l,h=t.onBlur,u=t.onFocus,d=t.TypographyClasses,p=t.underline,f=p===void 0?"hover":p,m=t.variant,g=m===void 0?"inherit":m,x=Be(t,["classes","className","color","component","onBlur","onFocus","TypographyClasses","underline","variant"]),v=Zl(),b=v.isFocusVisible,j=v.onBlurVisible,w=v.ref,S=y.useState(!1),_=S[0],C=S[1],E=mn(r,w),P=function(k){_&&(j(),C(!1)),h&&h(k)},T=function(k){b(k)&&C(!0),u&&u(k)};return y.createElement(Dr,Z({className:$e(i.root,i["underline".concat(ut(f))],a,_&&i.focusVisible,c==="button"&&i.button),classes:d,color:o,component:c,onBlur:P,onFocus:T,ref:E,variant:g},x))});const gce=Ye(fce,{name:"MuiLink"})(mce);var vce={root:{minWidth:56,flexShrink:0},alignItemsFlexStart:{marginTop:8}},bce=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=Be(t,["classes","className"]),o=y.useContext(No);return y.createElement("div",Z({className:$e(i.root,a,o.alignItems==="flex-start"&&i.alignItemsFlexStart),ref:r},s))});const yce=Ye(vce,{name:"MuiListItemAvatar"})(bce);var xce=function(t){return{root:{minWidth:56,color:t.palette.action.active,flexShrink:0,display:"inline-flex"},alignItemsFlexStart:{marginTop:8}}},jce=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=Be(t,["classes","className"]),o=y.useContext(No);return y.createElement("div",Z({className:$e(i.root,a,o.alignItems==="flex-start"&&i.alignItemsFlexStart),ref:r},s))});const wce=Ye(xce,{name:"MuiListItemIcon"})(jce);var Sce={root:{position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"}},I2=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=Be(t,["classes","className"]);return y.createElement("div",Z({className:$e(i.root,a),ref:r},s))});I2.muiName="ListItemSecondaryAction";const _ce=Ye(Sce,{name:"MuiListItemSecondaryAction"})(I2);var Cce={root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},Nce=y.forwardRef(function(t,r){var i=t.children,a=t.classes,s=t.className,o=t.disableTypography,l=o===void 0?!1:o,c=t.inset,h=c===void 0?!1:c,u=t.primary,d=t.primaryTypographyProps,p=t.secondary,f=t.secondaryTypographyProps,m=Be(t,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),g=y.useContext(No),x=g.dense,v=u??i;v!=null&&v.type!==Dr&&!l&&(v=y.createElement(Dr,Z({variant:x?"body2":"body1",className:a.primary,component:"span",display:"block"},d),v));var b=p;return b!=null&&b.type!==Dr&&!l&&(b=y.createElement(Dr,Z({variant:"body2",className:a.secondary,color:"textSecondary",display:"block"},f),b)),y.createElement("div",Z({className:$e(a.root,s,x&&a.dense,h&&a.inset,v&&b&&a.multiline),ref:r},m),v,b)});const D2=Ye(Cce,{name:"MuiListItemText"})(Nce),Ece=Object.freeze(Object.defineProperty({__proto__:null,default:D2},Symbol.toStringTag,{value:"Module"}));var Tce=function(t){return{root:{boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:t.palette.text.secondary,fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(14)},colorPrimary:{color:t.palette.primary.main},colorInherit:{color:"inherit"},gutters:{paddingLeft:16,paddingRight:16},inset:{paddingLeft:72},sticky:{position:"sticky",top:0,zIndex:1,backgroundColor:"inherit"}}},kce=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.color,o=s===void 0?"default":s,l=t.component,c=l===void 0?"li":l,h=t.disableGutters,u=h===void 0?!1:h,d=t.disableSticky,p=d===void 0?!1:d,f=t.inset,m=f===void 0?!1:f,g=Be(t,["classes","className","color","component","disableGutters","disableSticky","inset"]);return y.createElement(c,Z({className:$e(i.root,a,o!=="default"&&i["color".concat(ut(o))],m&&i.inset,!p&&i.sticky,!u&&i.gutters),ref:r},g))});const Pce=Ye(Tce,{name:"MuiListSubheader"})(kce);var Ice=function(t){return{root:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",background:t.palette.background.default,padding:8},positionBottom:{position:"fixed",bottom:0,left:0,right:0,zIndex:t.zIndex.mobileStepper},positionTop:{position:"fixed",top:0,left:0,right:0,zIndex:t.zIndex.mobileStepper},positionStatic:{},dots:{display:"flex",flexDirection:"row"},dot:{backgroundColor:t.palette.action.disabled,borderRadius:"50%",width:8,height:8,margin:"0 2px"},dotActive:{backgroundColor:t.palette.primary.main},progress:{width:"50%"}}},Dce=y.forwardRef(function(t,r){var i=t.activeStep,a=i===void 0?0:i,s=t.backButton,o=t.classes,l=t.className,c=t.LinearProgressProps,h=t.nextButton,u=t.position,d=u===void 0?"bottom":u,p=t.steps,f=t.variant,m=f===void 0?"dots":f,g=Be(t,["activeStep","backButton","classes","className","LinearProgressProps","nextButton","position","steps","variant"]);
15return y.createElement(ca,Z({square:!0,elevation:0,className:$e(o.root,o["position".concat(ut(d))],l),ref:r},g),s,m==="text"&&y.createElement(y.Fragment,null,a+1," / ",p),m==="dots"&&y.createElement("div",{className:o.dots},xr(new Array(p)).map(function(x,v){return y.createElement("div",{key:v,className:$e(o.dot,v===a&&o.dotActive)})})),m==="progress"&&y.createElement(P2,Z({className:o.progress,variant:"determinate",value:Math.ceil(a/(p-1)*100)},c)),h)});const Rce=Ye(Ice,{name:"MuiMobileStepper"})(Dce);var Oce=typeof window<"u"?y.useLayoutEffect:y.useEffect;function R2(e){var t=e.children,r=e.defer,i=r===void 0?!1:r,a=e.fallback,s=a===void 0?null:a,o=y.useState(!1),l=o[0],c=o[1];return Oce(function(){i||c(!0)},[i]),y.useEffect(function(){i&&c(!0)},[i]),y.createElement(y.Fragment,null,l?t:s)}const Ace=ar(y.createElement("path",{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-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),Mce=ar(y.createElement("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}));var $ce=function(t){return{root:{position:"relative",display:"flex","&$checked $layer":{transform:"scale(1)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeOut,duration:t.transitions.duration.shortest})}},layer:{left:0,position:"absolute",transform:"scale(0)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeIn,duration:t.transitions.duration.shortest})},checked:{}}};function Lce(e){var t=e.checked,r=e.classes,i=e.fontSize;return y.createElement("div",{className:$e(r.root,t&&r.checked)},y.createElement(Ace,{fontSize:i}),y.createElement(Mce,{fontSize:i,className:r.layer}))}const O2=Ye($ce,{name:"PrivateRadioButtonIcon"})(Lce);var A2=y.createContext();function M2(){return y.useContext(A2)}var Fce=function(t){return{root:{color:t.palette.text.secondary},checked:{},disabled:{},colorPrimary:{"&$checked":{color:t.palette.primary.main,"&:hover":{backgroundColor:tn(t.palette.primary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:t.palette.action.disabled}},colorSecondary:{"&$checked":{color:t.palette.secondary.main,"&:hover":{backgroundColor:tn(t.palette.secondary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:t.palette.action.disabled}}}},Uce=y.createElement(O2,{checked:!0}),Bce=y.createElement(O2,null),qce=y.forwardRef(function(t,r){var i=t.checked,a=t.classes,s=t.color,o=s===void 0?"secondary":s,l=t.name,c=t.onChange,h=t.size,u=h===void 0?"medium":h,d=Be(t,["checked","classes","color","name","onChange","size"]),p=M2(),f=i,m=Ma(c,p&&p.onChange),g=l;return p&&(typeof f>"u"&&(f=p.value===t.value),typeof g>"u"&&(g=p.name)),y.createElement(Lw,Z({color:o,type:"radio",icon:y.cloneElement(Bce,{fontSize:u==="small"?"small":"medium"}),checkedIcon:y.cloneElement(Uce,{fontSize:u==="small"?"small":"medium"}),classes:{root:$e(a.root,a["color".concat(ut(o))]),checked:a.checked,disabled:a.disabled},name:g,checked:f,onChange:m,ref:r},d))});const Vce=Ye(Fce,{name:"MuiRadio"})(qce);var zce=y.forwardRef(function(t,r){var i=t.actions,a=t.children,s=t.name,o=t.value,l=t.onChange,c=Be(t,["actions","children","name","value","onChange"]),h=y.useRef(null),u=vs({controlled:o,default:t.defaultValue,name:"RadioGroup"}),d=Ci(u,2),p=d[0],f=d[1];y.useImperativeHandle(i,function(){return{focus:function(){var b=h.current.querySelector("input:not(:disabled):checked");b||(b=h.current.querySelector("input:not(:disabled)")),b&&b.focus()}}},[]);var m=mn(r,h),g=function(b){f(b.target.value),l&&l(b,b.target.value)},x=Rl(s);return y.createElement(A2.Provider,{value:{name:x,onChange:g,value:p}},y.createElement(Yw,Z({role:"radiogroup",ref:m},c),a))});function Ha(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f3(e,t)}function js(e,t){if(t&&(To(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ud(e)}function wr(e){return wr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},wr(e)}function Hce(e){var t=Gce();return function(){var i=wr(e),a;if(t){var s=wr(this).constructor;a=Reflect.construct(i,arguments,s)}else a=i.apply(this,arguments);return js(this,a)}}
15function Gce(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var Wce=(function(e){Ha(r,e);var t=Hce(r);function r(){return la(this,r),t.apply(this,arguments)}return Pi(r,[{key:"componentDidMount",value:function(){this.ref=Fr.findDOMNode(this),Bi(this.props.rootRef,this.ref)}},{key:"componentDidUpdate",value:function(a){var s=Fr.findDOMNode(this);(a.rootRef!==this.props.rootRef||this.ref!==s)&&(a.rootRef!==this.props.rootRef&&Bi(a.rootRef,null),this.ref=s,Bi(this.props.rootRef,this.ref))}},{key:"componentWillUnmount",value:function(){this.ref=null,Bi(this.props.rootRef,null)}},{key:"render",value:function(){return this.props.children}}]),r})(y.Component),Yce=function(t){return{thumb:{"&$open":{"& $offset":{transform:"scale(1) translateY(-10px)"}}},open:{},offset:Z({zIndex:1},t.typography.body2,{fontSize:t.typography.pxToRem(12),lineHeight:1.2,transition:t.transitions.create(["transform"],{duration:t.transitions.duration.shortest}),top:-34,transformOrigin:"bottom center",transform:"scale(0)",position:"absolute"}),circle:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,borderRadius:"50% 50% 50% 0",backgroundColor:"currentColor",transform:"rotate(-45deg)"},label:{color:t.palette.primary.contrastText,transform:"rotate(45deg)"}}};function Kce(e){var t=e.children,r=e.classes,i=e.className,a=e.open,s=e.value,o=e.valueLabelDisplay;return o==="off"?t:y.cloneElement(t,{className:$e(t.props.className,(a||o==="on")&&r.open,r.thumb)},y.createElement("span",{className:$e(r.offset,i)},y.createElement("span",{className:r.circle},y.createElement("span",{className:r.label},s))))}
15const Xce=Ye(Yce,{name:"PrivateValueLabel"})(Kce);function dy(e,t){return e-t}function uy(e,t,r){return Math.min(Math.max(t,e),r)}function FE(e,t){var r=e.reduce(function(a,s,o){var l=Math.abs(t-s);return a===null||l<a.distance||l===a.distance?{distance:l,index:o}:a},null),i=r.index;return i}function ih(e,t){if(t.current!==void 0&&e.changedTouches){for(var r=0;r<e.changedTouches.length;r+=1){var i=e.changedTouches[r];if(i.identifier===t.current)return{x:i.clientX,y:i.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function ah(e,t,r){return(e-t)*100/(r-t)}function Qce(e,t,r){return(r-t)*e+t}function Zce(e){if(Math.abs(e)<1){var t=e.toExponential().split("e-"),r=t[0].split(".")[1];return(r?r.length:0)+parseInt(t[1],10)}var i=e.toString().split(".")[1];return i?i.length:0}function UE(e,t,r){var i=Math.round((e-r)/t)*t+r;return Number(i.toFixed(Zce(t)))}function BE(e){var t=e.values,r=e.source,i=e.newValue,a=e.index;if(t[a]===i)return r;var s=t.slice();return s[a]=i,s}function sh(e){var t=e.sliderRef,r=e.activeIndex,i=e.setActive;(!t.current.contains(document.activeElement)||Number(document.activeElement.getAttribute("data-index"))!==r)&&t.current.querySelector('[role="slider"][data-index="'.concat(r,'"]')).focus(),i&&i(r)}var oh={horizontal:{offset:function(t){return{left:"".concat(t,"%")}},leap:function(t){return{width:"".concat(t,"%")}}},"horizontal-reverse":{offset:function(t){return{right:"".concat(t,"%")}},leap:function(t){return{width:"".concat(t,"%")}}},vertical:{offset:function(t){return{bottom:"".concat(t,"%")}},leap:function(t){return{height:"".concat(t,"%")}}}},qE=function(t){return t},Jce=function(t){return{root:{height:2,width:"100%",boxSizing:"content-box",padding:"13px 0",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:t.palette.primary.main,WebkitTapHighlightColor:"transparent","&$disabled":{pointerEvents:"none",cursor:"default",color:t.palette.grey[400]},"&$vertical":{width:2,height:"100%",padding:"0 13px"},"@media (pointer: coarse)":{padding:"20px 0","&$vertical":{padding:"0 20px"}},"@media print":{colorAdjust:"exact"}},colorPrimary:{},colorSecondary:{color:t.palette.secondary.main},marked:{marginBottom:20,"&$vertical":{marginBottom:"auto",marginRight:20}},vertical:{},disabled:{},rail:{display:"block",position:"absolute",width:"100%",height:2,borderRadius:1,backgroundColor:"currentColor",opacity:.38,"$vertical &":{height:"100%",width:2}},track:{display:"block",position:"absolute",height:2,borderRadius:1,backgroundColor:"currentColor","$vertical &":{width:2}},trackFalse:{"& $track":{display:"none"}},trackInverted:{"& $track":{backgroundColor:t.palette.type==="light"?zo(t.palette.primary.main,.62):Vo(t.palette.primary.main,.5)},"& $rail":{opacity:1}},thumb:{position:"absolute",width:12,height:12,marginLeft:-6,marginTop:-5,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:t.transitions.create(["box-shadow"],{duration:t.transitions.duration.shortest}),"&::after":{position:"absolute",content:'""',borderRadius:"50%",left:-15,top:-15,right:-15,bottom:-15},"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(tn(t.palette.primary.main,.16)),"@media (hover: none)":{boxShadow:"none"}},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(tn(t.palette.primary.main,.16))},"&$disabled":{width:8,height:8,marginLeft:-4,marginTop:-3,"&:hover":{boxShadow:"none"}},"$vertical &":{marginLeft:-5,marginBottom:-6},"$vertical &$disabled":{marginLeft:-3,marginBottom:-4}},thumbColorPrimary:{},thumbColorSecondary:{"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(tn(t.palette.secondary.main,.16))},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(tn(t.palette.secondary.main,.16))}},active:{},focusVisible:{},valueLabel:{left:"calc(-50% - 4px)"},mark:{position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},markActive:{backgroundColor:t.palette.background.paper,opacity:.8},markLabel:Z({},t.typography.body2,{color:t.palette.text.secondary,position:"absolute",top:26,transform:"translateX(-50%)",whiteSpace:"nowrap","$vertical &":{top:"auto",left:26,transform:"translateY(50%)"},"@media (pointer: coarse)":{top:40,"$vertical &":{left:31}}}),markLabelActive:{color:t.palette.text.primary}}},ede=y.forwardRef(function(t,r){var i=t["aria-label"],a=t["aria-labelledby"],s=t["aria-valuetext"],o=t.classes,l=t.className,c=t.color,h=c===void 0?"primary":c,u=t.component,d=u===void 0?"span":u,p=t.defaultValue,f=t.disabled,m=f===void 0?!1:f,g=t.getAriaLabel,x=t.getAriaValueText,v=t.marks,b=v===void 0?!1:v,j=t.max,w=j===void 0?100:j,S=t.min,_=S===void 0?0:S,C=t.name,E=t.onChange,P=t.onChangeCommitted,T=t.onMouseDown,N=t.orientation,k=N===void 0?"horizontal":N,I=t.scale,D=I===void 0?qE:I,O=t.step,$=O===void 0?1:O,U=t.ThumbComponent,B=U===void 0?"span":U,L=t.track,A=L===void 0?"normal":L,R=t.value,F=t.ValueLabelComponent,q=F===void 0?Xce:F,V=t.valueLabelDisplay,X=V===void 0?"off":V,M=t.valueLabelFormat,W=M===void 0?qE:M,K=Be(t,["aria-label","aria-labelledby","aria-valuetext","classes","className","color","component","defaultValue","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","onMouseDown","orientation","scale","step","ThumbComponent","track","value","ValueLabelComponent","valueLabelDisplay","valueLabelFormat"]),z=Or(),Y=y.useRef(),ie=y.useState(-1),ne=ie[0],ve=ie[1],pe=y.useState(-1),be=pe[0],ye=pe[1],
15ke=vs({controlled:R,default:p,name:"Slider"}),fe=Ci(ke,2),se=fe[0],ge=fe[1],De=Array.isArray(se),ae=De?se.slice().sort(dy):[se];ae=ae.map(function(ht){return uy(ht,_,w)});var Q=b===!0&&$!==null?xr(Array(Math.floor((w-_)/$)+1)).map(function(ht,jt){return{value:_+$*jt}}):b||[],ee=Zl(),oe=ee.isFocusVisible,Pe=ee.onBlurVisible,Fe=ee.ref,Ie=y.useState(-1),Re=Ie[0],Ve=Ie[1],Xe=y.useRef(),et=mn(Fe,Xe),rt=mn(r,et),bt=Un(function(ht){var jt=Number(ht.currentTarget.getAttribute("data-index"));oe(ht)&&Ve(jt),ye(jt)}),Qe=Un(function(){Re!==-1&&(Ve(-1),Pe()),ye(-1)}),tt=Un(function(ht){var jt=Number(ht.currentTarget.getAttribute("data-index"));ye(jt)}),We=Un(function(){ye(-1)}),pt=z.direction==="rtl",Et=Un(function(ht){var jt=Number(ht.currentTarget.getAttribute("data-index")),sn=ae[jt],rn=(w-_)/10,yt=Q.map(function(ai){return ai.value}),Wt=yt.indexOf(sn),Lt,qr=pt?"ArrowLeft":"ArrowRight",Gn=pt?"ArrowRight":"ArrowLeft";switch(ht.key){case"Home":Lt=_;break;case"End":Lt=w;break;case"PageUp":$&&(Lt=sn+rn);break;case"PageDown":$&&(Lt=sn-rn);break;case qr:case"ArrowUp":$?Lt=sn+$:Lt=yt[Wt+1]||yt[yt.length-1];break;case Gn:case"ArrowDown":$?Lt=sn-$:Lt=yt[Wt-1]||yt[0];break;default:return}if(ht.preventDefault(),$&&(Lt=UE(Lt,$,_)),Lt=uy(Lt,_,w),De){var Mr=Lt;Lt=BE({values:ae,source:se,newValue:Lt,index:jt}).sort(dy),sh({sliderRef:Xe,activeIndex:Lt.indexOf(Mr)})}ge(Lt),Ve(jt),E&&E(ht,Lt),P&&P(ht,Lt)}),Ot=y.useRef(),kt=k;pt&&k!=="vertical"&&(kt+="-reverse");var Pt=function(jt){var sn=jt.finger,rn=jt.move,yt=rn===void 0?!1:rn,Wt=jt.values,Lt=jt.source,qr=Xe.current,Gn=qr.getBoundingClientRect(),Mr=Gn.width,ai=Gn.height,tr=Gn.bottom,sr=Gn.left,Vr;kt.indexOf("vertical")===0?Vr=(tr-sn.y)/ai:Vr=(sn.x-sr)/Mr,kt.indexOf("-reverse")!==-1&&(Vr=1-Vr);var En;if(En=Qce(Vr,_,w),$)En=UE(En,$,_);else{var Hi=Q.map(function(Wi){return Wi.value}),Gi=FE(Hi,En);En=Hi[Gi]}En=uy(En,_,w);var zr=0;if(De){yt?zr=Ot.current:zr=FE(Wt,En);var pr=En;En=BE({values:Wt,source:Lt,newValue:En,index:zr}).sort(dy),zr=En.indexOf(pr),Ot.current=zr}return{newValue:En,activeIndex:zr}},Ut=Un(function(ht){var jt=ih(ht,Y);if(jt){var sn=Pt({finger:jt,move:!0,values:ae,source:se}),rn=sn.newValue,yt=sn.activeIndex;sh({sliderRef:Xe,activeIndex:yt,setActive:ve}),ge(rn),E&&E(ht,rn)}}),Nn=Un(function(ht){var jt=ih(ht,Y);if(jt){var sn=Pt({finger:jt,values:ae,source:se}),rn=sn.newValue;ve(-1),ht.type==="touchend"&&ye(-1),P&&P(ht,rn),Y.current=void 0;var yt=Ir(Xe.current);yt.removeEventListener("mousemove",Ut),yt.removeEventListener("mouseup",Nn),yt.removeEventListener("touchmove",Ut),yt.removeEventListener("touchend",Nn)}}),$t=Un(function(ht){ht.preventDefault();var jt=ht.changedTouches[0];jt!=null&&(Y.current=jt.identifier);var sn=ih(ht,Y),rn=Pt({finger:sn,values:ae,source:se}),yt=rn.newValue,Wt=rn.activeIndex;sh({sliderRef:Xe,activeIndex:Wt,setActive:ve}),ge(yt),E&&E(ht,yt);var Lt=Ir(Xe.current);Lt.addEventListener("touchmove",Ut),Lt.addEventListener("touchend",Nn)});y.useEffect(function(){var ht=Xe.current;ht.addEventListener("touchstart",$t);var jt=Ir(ht);return function(){ht.removeEventListener("touchstart",$t),jt.removeEventListener("mousemove",Ut),jt.removeEventListener("mouseup",Nn),jt.removeEventListener("touchmove",Ut),jt.removeEventListener("touchend",Nn)}},[Nn,Ut,$t]);var pn=Un(function(ht){T&&T(ht),ht.preventDefault();var jt=ih(ht,Y),sn=Pt({finger:jt,values:ae,source:se}),rn=sn.newValue,yt=sn.activeIndex;sh({sliderRef:Xe,activeIndex:yt,setActive:ve}),ge(rn),E&&E(ht,rn);var Wt=Ir(Xe.current);Wt.addEventListener("mousemove",Ut),Wt.addEventListener("mouseup",Nn)}),nn=ah(De?ae[0]:_,_,w),Rn=ah(ae[ae.length-1],_,w)-nn,fn=Z({},oh[kt].offset(nn),oh[kt].leap(Rn));return y.createElement(d,Z({ref:rt,className:$e(o.root,o["color".concat(ut(h))],l,m&&o.disabled,Q.length>0&&Q.some(function(ht){return ht.label})&&o.marked,A===!1&&o.trackFalse,k==="vertical"&&o.vertical,A==="inverted"&&o.trackInverted),onMouseDown:pn},K),y.createElement("span",{className:o.rail}),y.createElement("span",{className:o.track,style:fn}),y.createElement("input",{value:ae.join(","),name:C,type:"hidden"}),Q.map(function(ht,jt){var sn=ah(ht.value,_,w),rn=oh[kt].offset(sn),yt;return A===!1?yt=ae.indexOf(ht.value)!==-1:yt=A==="normal"&&(De?ht.value>=ae[0]&&ht.value<=ae[ae.length-1]:ht.value<=ae[0])||A==="inverted"&&(De?ht.value<=ae[0]||ht.value>=ae[ae.length-1]:ht.value>=ae[0]),y.createElement(y.Fragment,{key:ht.value},y.createElement("span",{style:rn,"data-index":jt,className:$e(o.mark,yt&&o.markActive)}),ht.label!=null?y.createElement("span",{"aria-hidden":!0,"data-index":jt,style:rn,className:$e(o.markLabel,yt&&o.markLabelActive)},ht.label):null)}
15),ae.map(function(ht,jt){var sn=ah(ht,_,w),rn=oh[kt].offset(sn);return y.createElement(q,{key:jt,valueLabelFormat:W,valueLabelDisplay:X,className:o.valueLabel,value:typeof W=="function"?W(D(ht),jt):W,index:jt,open:be===jt||ne===jt||X==="on",disabled:m},y.createElement(B,{className:$e(o.thumb,o["thumbColor".concat(ut(h))],ne===jt&&o.active,m&&o.disabled,Re===jt&&o.focusVisible),tabIndex:m?null:0,role:"slider",style:rn,"data-index":jt,"aria-label":g?g(jt):i,"aria-labelledby":a,"aria-orientation":k,"aria-valuemax":D(w),"aria-valuemin":D(_),"aria-valuenow":D(ht),"aria-valuetext":x?x(D(ht),jt):s,onKeyDown:Et,onFocus:bt,onBlur:Qe,onMouseOver:tt,onMouseLeave:We}))}))});const tde=Ye(Jce,{name:"MuiSlider"})(ede);var nde=function(t){var r=t.palette.type==="light"?.8:.98,i=Ia(t.palette.background.default,r);return{root:Z({},t.typography.body2,Ct({color:t.palette.getContrastText(i),backgroundColor:i,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:t.shape.borderRadius,flexGrow:1},t.breakpoints.up("sm"),{flexGrow:"initial",minWidth:288})),message:{padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}}},rde=y.forwardRef(function(t,r){var i=t.action,a=t.classes,s=t.className,o=t.message,l=t.role,c=l===void 0?"alert":l,h=Be(t,["action","classes","className","message","role"]);return y.createElement(ca,Z({role:c,square:!0,elevation:6,className:$e(a.root,s),ref:r},h),y.createElement("div",{className:a.message},o),i?y.createElement("div",{className:a.action},i):null)});const $2=Ye(nde,{name:"MuiSnackbarContent"})(rde);var ide=function(t){var r={top:8},i={bottom:8},a={justifyContent:"flex-end"},s={justifyContent:"flex-start"},o={top:24},l={bottom:24},c={right:24},h={left:24},u={left:"50%",right:"auto",transform:"translateX(-50%)"};return{root:{zIndex:t.zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},anchorOriginTopCenter:Z({},r,Ct({},t.breakpoints.up("sm"),Z({},o,u))),anchorOriginBottomCenter:Z({},i,Ct({},t.breakpoints.up("sm"),Z({},l,u))),anchorOriginTopRight:Z({},r,a,Ct({},t.breakpoints.up("sm"),Z({left:"auto"},o,c))),anchorOriginBottomRight:Z({},i,a,Ct({},t.breakpoints.up("sm"),Z({left:"auto"},l,c))),anchorOriginTopLeft:Z({},r,s,Ct({},t.breakpoints.up("sm"),Z({right:"auto"},o,h))),anchorOriginBottomLeft:Z({},i,s,Ct({},t.breakpoints.up("sm"),Z({right:"auto"},l,h)))}},ade=y.forwardRef(function(t,r){var i=t.action,a=t.anchorOrigin;a=a===void 0?{vertical:"bottom",horizontal:"center"}:a;var s=a.vertical,o=a.horizontal,l=t.autoHideDuration,c=l===void 0?null:l,h=t.children,u=t.classes,d=t.className,p=t.ClickAwayListenerProps,f=t.ContentProps,m=t.disableWindowBlurListener,g=m===void 0?!1:m,x=t.message,v=t.onClose,b=t.onEnter,j=t.onEntered,w=t.onEntering,S=t.onExit,_=t.onExited,C=t.onExiting,E=t.onMouseEnter,P=t.onMouseLeave,T=t.open,N=t.resumeHideDuration,k=t.TransitionComponent,I=k===void 0?ec:k,D=t.transitionDuration,O=D===void 0?{enter:Rr.enteringScreen,exit:Rr.leavingScreen}:D,$=t.TransitionProps,U=Be(t,["action","anchorOrigin","autoHideDuration","children","classes","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onClose","onEnter","onEntered","onEntering","onExit","onExited","onExiting","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"]),B=y.useRef(),L=y.useState(!0),A=L[0],R=L[1],F=Un(function(){v&&v.apply(void 0,arguments)}),q=Un(function(ie){!v||ie==null||(clearTimeout(B.current),B.current=setTimeout(function(){F(null,"timeout")},ie))});y.useEffect(function(){return T&&q(c),function(){clearTimeout(B.current)}},[T,c,q]);var V=function(){clearTimeout(B.current)},X=y.useCallback(function(){c!=null&&q(N??c*.5)},[c,N,q]),M=function(ne){E&&E(ne),V()},W=function(ne){P&&P(ne),X()},K=function(ne){v&&v(ne,"clickaway")},z=function(){R(!0)},Y=function(){R(!1)};return y.useEffect(function(){if(!g&&T)return window.addEventListener("focus",X),window.addEventListener("blur",V),function(){window.removeEventListener("focus",X),window.removeEventListener("blur",V)}},[g,X,T]),!T&&A?null:y.createElement(b2,Z({onClickAway:K},p),y.createElement("div",Z({className:$e(u.root,u["anchorOrigin".concat(ut(s)).concat(ut(o))],d),onMouseEnter:M,onMouseLeave:W,ref:r},U),y.createElement(I,Z({appear:!0,in:T,onEnter:Ma(Y,b),onEntered:j,onEntering:w,onExit:S,onExited:Ma(z,_),onExiting:C,timeout:O,direction:s==="top"?"down":"up"},$),h||y.createElement($2,Z({message:x,action:i},f)))))});const sde=Ye(ide,{flip:!1,name:"MuiSnackbar"})(ade);var ode={root:{},horizontal:{paddingLeft:8,paddingRight:8},vertical:{},alternativeLabel:{flex:1,position:"relative"},completed:{}},lde=y.forwardRef(function(t,r){var i=t.active,a=i===void 0?!1:i,s=t.alternativeLabel,o=t.children,l=t.classes,c=t.className,h=t.completed,u=h===void 0?!1:h,d=t.connector,p=t.disabled,f=p===void 0?!1:p,m=t.expanded,g=m===void 0?!1:m,x=t.index,v=t.last,b=t.orientation,j=Be(t,["active","alternativeLabel","children","classes","className","completed","connector","disabled","expanded","index","last","orientation"]),w=d?y.cloneElement(d,{orientation:b,alternativeLabel:s,index:x,active:a,completed:u,disabled:f}):null,S=y.createElement("div",Z({className:$e(l.root,l[b],c,s&&l.alternativeLabel,u&&l.completed),ref:r}
15,j),w&&s&&x!==0?w:null,y.Children.map(o,function(_){return y.isValidElement(_)?y.cloneElement(_,Z({active:a,alternativeLabel:s,completed:u,disabled:f,expanded:g,last:v,icon:x+1,orientation:b},_.props)):null}));return w&&!s&&x!==0?y.createElement(y.Fragment,null,w,S):S});const cde=Ye(ode,{name:"MuiStep"})(lde),dde=ar(y.createElement("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"})),ude=ar(y.createElement("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}));var hde=function(t){return{root:{display:"block",color:t.palette.text.disabled,"&$completed":{color:t.palette.primary.main},"&$active":{color:t.palette.primary.main},"&$error":{color:t.palette.error.main}},text:{fill:t.palette.primary.contrastText,fontSize:t.typography.caption.fontSize,fontFamily:t.typography.fontFamily},active:{},completed:{},error:{}}},pde=y.createElement("circle",{cx:"12",cy:"12",r:"12"}),fde=y.forwardRef(function(t,r){var i=t.completed,a=i===void 0?!1:i,s=t.icon,o=t.active,l=o===void 0?!1:o,c=t.error,h=c===void 0?!1:c,u=t.classes;if(typeof s=="number"||typeof s=="string"){var d=$e(u.root,l&&u.active,h&&u.error,a&&u.completed);return h?y.createElement(ude,{className:d,ref:r}):a?y.createElement(dde,{className:d,ref:r}):y.createElement(Lp,{className:d,ref:r},pde,y.createElement("text",{className:u.text,x:"12",y:"16",textAnchor:"middle"},s))}return s});const L2=Ye(hde,{name:"MuiStepIcon"})(fde);var mde=function(t){return{root:{display:"flex",alignItems:"center","&$alternativeLabel":{flexDirection:"column"},"&$disabled":{cursor:"default"}},horizontal:{},vertical:{},label:{color:t.palette.text.secondary,"&$active":{color:t.palette.text.primary,fontWeight:500},"&$completed":{color:t.palette.text.primary,fontWeight:500},"&$alternativeLabel":{textAlign:"center",marginTop:16},"&$error":{color:t.palette.error.main}},active:{},completed:{},error:{},disabled:{},iconContainer:{flexShrink:0,display:"flex",paddingRight:8,"&$alternativeLabel":{paddingRight:0}},alternativeLabel:{},labelContainer:{width:"100%"}}},F2=y.forwardRef(function(t,r){var i=t.active,a=i===void 0?!1:i,s=t.alternativeLabel,o=s===void 0?!1:s,l=t.children,c=t.classes,h=t.className,u=t.completed,d=u===void 0?!1:u,p=t.disabled,f=p===void 0?!1:p,m=t.error,g=m===void 0?!1:m;t.expanded;var x=t.icon;t.last;var v=t.optional,b=t.orientation,j=b===void 0?"horizontal":b,w=t.StepIconComponent,S=t.StepIconProps,_=Be(t,["active","alternativeLabel","children","classes","className","completed","disabled","error","expanded","icon","last","optional","orientation","StepIconComponent","StepIconProps"]),C=w;return x&&!C&&(C=L2),y.createElement("span",Z({className:$e(c.root,c[j],h,f&&c.disabled,o&&c.alternativeLabel,g&&c.error),ref:r},_),x||C?y.createElement("span",{className:$e(c.iconContainer,o&&c.alternativeLabel)},y.createElement(C,Z({completed:d,active:a,error:g,icon:x},S))):null,y.createElement("span",{className:c.labelContainer},l?y.createElement(Dr,{variant:"body2",component:"span",display:"block",className:$e(c.label,o&&c.alternativeLabel,d&&c.completed,a&&c.active,g&&c.error)},l):null,v))});F2.muiName="StepLabel";const U2=Ye(mde,{name:"MuiStepLabel"})(F2);var gde={root:{width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},horizontal:{},vertical:{justifyContent:"flex-start",padding:"8px",margin:"-8px"},touchRipple:{color:"rgba(0, 0, 0, 0.3)"}},vde=y.forwardRef(function(t,r){var i=t.active,a=t.alternativeLabel,s=t.children,o=t.classes,l=t.className,c=t.completed,h=t.disabled;t.expanded;var u=t.icon;t.last;var d=t.optional,p=t.orientation,f=Be(t,["active","alternativeLabel","children","classes","className","completed","disabled","expanded","icon","last","optional","orientation"]),m={active:i,alternativeLabel:a,completed:c,disabled:h,icon:u,optional:d,orientation:p},g=ls(s,["StepLabel"])?y.cloneElement(s,m):y.createElement(U2,m,s);return y.createElement(ni,Z({focusRipple:!0,disabled:h,TouchRippleProps:{className:o.touchRipple},className:$e(o.root,o[p],l),ref:r},f),g)});const bde=Ye(gde,{name:"MuiStepButton"})(vde);var yde=function(t){return{root:{flex:"1 1 auto"},horizontal:{},vertical:{marginLeft:12,padding:"0 0 8px"},alternativeLabel:{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"},active:{},completed:{},disabled:{},line:{display:"block",borderColor:t.palette.type==="light"?t.palette.grey[400]:t.palette.grey[600]},lineHorizontal:{borderTopStyle:"solid",borderTopWidth:1},lineVertical:{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24}}},xde=y.forwardRef(function(t,r){var i=t.active,a=t.alternativeLabel,s=a===void 0?!1:a,o=t.classes,l=t.className,c=t.completed,h=t.disabled;t.index;var u=t.orientation,d=u===void 0?"horizontal":u,p=Be(t,["active","alternativeLabel","classes","className","completed","disabled","index","orientation"]);return y.createElement("div",Z({className:$e(o.root,o[d],l,s&&o.alternativeLabel,i&&o.active,c&&o.completed,h&&o.disabled),ref:r},p),y.createElement("span",{className:$e(o.line,{horizontal:o.lineHorizontal,vertical:o.lineVertical}[d])}))});const B2=Ye(yde,{name:"MuiStepConnector"})(xde);var jde=function(t){return{root:{marginTop:8,marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:"1px solid ".concat(t.palette.type==="light"?t.palette.grey[400]:t.palette.grey[600])},last:{borderLeft:"none"},transition:{}}},wde=y.forwardRef(function(t,r){var i=t.active;t.alternativeLabel;var a=t.children,s=t.classes,o=t.className;t.completed;var l=t.expanded,c=t.last;t.optional,t.orientation;var h=t.TransitionComponent,u=h===void 0?Yf:h,d=t.transitionDuration,p=d===void 0?"auto":d,f=t.TransitionProps,m=Be(t,["active","alternativeLabel","children","classes","className","completed","expanded","last","o
15ptional","orientation","TransitionComponent","transitionDuration","TransitionProps"]),g=p;return p==="auto"&&!u.muiSupportAuto&&(g=void 0),y.createElement("div",Z({className:$e(s.root,o,c&&s.last),ref:r},m),y.createElement(u,Z({in:i||l,className:s.transition,timeout:g,unmountOnExit:!0},f),a))});const Sde=Ye(jde,{name:"MuiStepContent"})(wde);var _de={root:{display:"flex",padding:24},horizontal:{flexDirection:"row",alignItems:"center"},vertical:{flexDirection:"column"},alternativeLabel:{alignItems:"flex-start"}},Cde=y.createElement(B2,null),Nde=y.forwardRef(function(t,r){var i=t.activeStep,a=i===void 0?0:i,s=t.alternativeLabel,o=s===void 0?!1:s,l=t.children,c=t.classes,h=t.className,u=t.connector,d=u===void 0?Cde:u,p=t.nonLinear,f=p===void 0?!1:p,m=t.orientation,g=m===void 0?"horizontal":m,x=Be(t,["activeStep","alternativeLabel","children","classes","className","connector","nonLinear","orientation"]),v=y.isValidElement(d)?y.cloneElement(d,{orientation:g}):null,b=y.Children.toArray(l),j=b.map(function(w,S){var _={index:S,active:!1,completed:!1,disabled:!1};return a===S?_.active=!0:!f&&a>S?_.completed=!0:!f&&a<S&&(_.disabled=!0),y.cloneElement(w,Z({alternativeLabel:o,connector:v,last:S+1===b.length,orientation:g},_,w.props))});return y.createElement(ca,Z({square:!0,elevation:0,className:$e(c.root,c[g],h,o&&c.alternativeLabel),ref:r},x),j)});const Ede=Ye(_de,{name:"MuiStepper"})(Nde);var Tde=function(t){return{root:{position:"fixed",top:0,left:0,bottom:0,zIndex:t.zIndex.drawer-1},anchorLeft:{right:"auto"},anchorRight:{left:"auto",right:0},anchorTop:{bottom:"auto",right:0},anchorBottom:{top:"auto",bottom:0,right:0}}},kde=y.forwardRef(function(t,r){var i=t.anchor,a=t.classes,s=t.className,o=t.width,l=Be(t,["anchor","classes","className","width"]);return y.createElement("div",Z({className:$e(a.root,a["anchor".concat(ut(i))],s),ref:r,style:Ct({},Nl(i)?"width":"height",o)},l))});const Pde=Ye(Tde,{name:"PrivateSwipeArea"})(kde);var lh=3,es=null;function hy(e,t){return e==="right"?document.body.offsetWidth-t[0].pageX:t[0].pageX}function py(e,t){return e==="bottom"?window.innerHeight-t[0].clientY:t[0].clientY}function Nc(e,t){return e?t.clientWidth:t.clientHeight}function VE(e,t,r,i){return Math.min(Math.max(r?t-e:i+t-e,0),i)}function Ide(e,t){for(var r=[];e&&e!==t;){var i=window.getComputedStyle(e);i.getPropertyValue("position")==="absolute"||i.getPropertyValue("overflow-x")==="hidden"?r=[]:(e.clientWidth>0&&e.scrollWidth>e.clientWidth||e.clientHeight>0&&e.scrollHeight>e.clientHeight)&&r.push(e),e=e.parentElement}return r}function Dde(e){var t=e.domTreeShapes,r=e.start,i=e.current,a=e.anchor,s={scrollPosition:{x:"scrollLeft",y:"scrollTop"},scrollLength:{x:"scrollWidth",y:"scrollHeight"},clientLength:{x:"clientWidth",y:"clientHeight"}};return t.some(function(o){var l=i>=r;(a==="top"||a==="left")&&(l=!l);var c=a==="left"||a==="right"?"x":"y",h=o[s.scrollPosition[c]],u=h>0,d=h+o[s.clientLength[c]]<o[s.scrollLength[c]];return l&&d||!l&&u?o:null})}var Rde=typeof navigator<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent),Ode={enter:Rr.enteringScreen,exit:Rr.leavingScreen},Ade=typeof window<"u"?y.useLayoutEffect:y.useEffect,Mde=y.forwardRef(function(t,r){var i=Or(),a=au({name:"MuiSwipeableDrawer",props:Z({},t),theme:i}),s=a.anchor,o=s===void 0?"left":s,l=a.disableBackdropTransition,c=l===void 0?!1:l,h=a.disableDiscovery,u=h===void 0?!1:h,d=a.disableSwipeToOpen,p=d===void 0?Rde:d,f=a.hideBackdrop,m=a.hysteresis,g=m===void 0?.52:m,x=a.minFlingVelocity,v=x===void 0?450:x,b=a.ModalProps;b=b===void 0?{}:b;var j=b.BackdropProps,w=Be(b,["BackdropProps"]),S=a.onClose,_=a.onOpen,C=a.open,E=a.PaperProps,P=E===void 0?{}:E,T=a.SwipeAreaProps,N=a.swipeAreaWidth,k=N===void 0?20:N,I=a.transitionDuration,D=I===void 0?Ode:I,O=a.variant,$=O===void 0?"temporary":O,U=Be(a,["anchor","disableBackdropTransition","disableDiscovery","disableSwipeToOpen","hideBackdrop","hysteresis","minFlingVelocity","ModalProps","onClose","onOpen","open","PaperProps","SwipeAreaProps","swipeAreaWidth","transitionDuration","variant"]),B=y.useState(!1),L=B[0],A=B[1],R=y.useRef({isSwiping:null}),F=y.useRef(),q=y.useRef(),V=y.useRef(),X=y.useRef(!1),M=y.useRef();Ade(function(){M.current=null},[C]);var W=y.useCallback(function(ne){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},pe=ve.mode,be=pe===void 0?null:pe,ye=ve.changeTransition,ke=ye===void 0?!0:ye,fe=Ed(i,o),se=["right","bottom"].indexOf(fe)!==-1?1:-1,ge=Nl(o),De=ge?"translate(".concat(se*ne,"px, 0)"):"translate(0, ".concat(se*ne,"px)"),ae=V.current.style;ae.webkitTransform=De,ae.transform=De;var Q="";if(be&&(Q=i.transitions.create("all",ja({timeout:D},{mode:be}))),ke&&(ae.webkitTransition=Q,ae.transition=Q),!c&&!f){var ee=q.current.style;ee.opacity=1-ne/Nc(ge,V.current),ke&&(ee.webkitTransition=Q,ee.transition=Q)}},[o,c,f,i,D]),K=Un(function(ne){if(X.current){if(es=null,X.current=!1,A(!1),!R.current.isSwiping){R.current.isSwiping=null;return}R.current.isSwiping=null;
15var ve=Ed(i,o),pe=Nl(o),be;pe?be=hy(ve,ne.changedTouches):be=py(ve,ne.changedTouches);var ye=pe?R.current.startX:R.current.startY,ke=Nc(pe,V.current),fe=VE(be,ye,C,ke),se=fe/ke;if(Math.abs(R.current.velocity)>v&&(M.current=Math.abs((ke-fe)/R.current.velocity)*1e3),C){R.current.velocity>v||se>g?S():W(0,{mode:"exit"});return}R.current.velocity<-v||1-se>g?_():W(Nc(pe,V.current),{mode:"enter"})}}),z=Un(function(ne){if(!(!V.current||!X.current)&&!(es!=null&&es!==R.current)){var ve=Ed(i,o),pe=Nl(o),be=hy(ve,ne.touches),ye=py(ve,ne.touches);if(C&&V.current.contains(ne.target)&&es==null){var ke=Ide(ne.target,V.current),fe=Dde({domTreeShapes:ke,start:pe?R.current.startX:R.current.startY,current:pe?be:ye,anchor:o});if(fe){es=fe;return}es=R.current}if(R.current.isSwiping==null){var se=Math.abs(be-R.current.startX),ge=Math.abs(ye-R.current.startY);se>ge&&ne.cancelable&&ne.preventDefault();var De=pe?se>ge&&se>lh:ge>se&&ge>lh;if(De===!0||(pe?ge>lh:se>lh)){if(R.current.isSwiping=De,!De){K(ne);return}R.current.startX=be,R.current.startY=ye,!u&&!C&&(pe?R.current.startX-=k:R.current.startY-=k)}}if(R.current.isSwiping){var ae=Nc(pe,V.current),Q=pe?R.current.startX:R.current.startY;C&&!R.current.paperHit&&(Q=Math.min(Q,ae));var ee=VE(pe?be:ye,Q,C,ae);if(C)if(R.current.paperHit)ee===0&&(R.current.startX=be,R.current.startY=ye);else{var oe=pe?be<ae:ye<ae;if(oe)R.current.paperHit=!0,R.current.startX=be,R.current.startY=ye;else return}R.current.lastTranslate===null&&(R.current.lastTranslate=ee,R.current.lastTime=performance.now()+1);var Pe=(ee-R.current.lastTranslate)/(performance.now()-R.current.lastTime)*1e3;R.current.velocity=R.current.velocity*.4+Pe*.6,R.current.lastTranslate=ee,R.current.lastTime=performance.now(),ne.cancelable&&ne.preventDefault(),W(ee)}}}),Y=Un(function(ne){if(!ne.defaultPrevented&&!ne.muiHandled&&!(C&&!q.current.contains(ne.target)&&!V.current.contains(ne.target))){var ve=Ed(i,o),pe=Nl(o),be=hy(ve,ne.touches),ye=py(ve,ne.touches);if(!C){if(p||ne.target!==F.current)return;if(pe){if(be>k)return}else if(ye>k)return}ne.muiHandled=!0,es=null,R.current.startX=be,R.current.startY=ye,A(!0),!C&&V.current&&W(Nc(pe,V.current)+(u?20:-k),{changeTransition:!1}),R.current.velocity=0,R.current.lastTime=null,R.current.lastTranslate=null,R.current.paperHit=!1,X.current=!0}});y.useEffect(function(){if($==="temporary"){var ne=Ir(V.current);return ne.addEventListener("touchstart",Y),ne.addEventListener("touchmove",z,{passive:!1}),ne.addEventListener("touchend",K),function(){ne.removeEventListener("touchstart",Y),ne.removeEventListener("touchmove",z,{passive:!1}),ne.removeEventListener("touchend",K)}}},[$,Y,z,K]),y.useEffect(function(){return function(){es===R.current&&(es=null)}},[]),y.useEffect(function(){C||A(!1)},[C]);var ie=y.useCallback(function(ne){q.current=Fr.findDOMNode(ne)},[]);return y.createElement(y.Fragment,null,y.createElement(j2,Z({open:$==="temporary"&&L?!0:C,variant:$,ModalProps:Z({BackdropProps:Z({},j,{ref:ie})},w),PaperProps:Z({},P,{style:Z({pointerEvents:$==="temporary"&&!C?"none":""},P.style),ref:V}),anchor:o,transitionDuration:M.current||D,onClose:S,ref:r},U)),!p&&$==="temporary"&&y.createElement(R2,null,y.createElement(Pde,Z({anchor:o,ref:F,width:k},T))))}),$de=function(t){return{root:{display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},edgeStart:{marginLeft:-8},edgeEnd:{marginRight:-8},switchBase:{position:"absolute",top:0,left:0,zIndex:1,color:t.palette.type==="light"?t.palette.grey[50]:t.palette.grey[400],transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),"&$checked":{transform:"translateX(20px)"},"&$disabled":{color:t.palette.type==="light"?t.palette.grey[400]:t.palette.grey[800]},"&$checked + $track":{opacity:.5},"&$disabled + $track":{opacity:t.palette.type==="light"?.12:.1}},colorPrimary:{"&$checked":{color:t.palette.primary.main,"&:hover":{backgroundColor:tn(t.palette.primary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:t.palette.type==="light"?t.palette.grey[400]:t.palette.grey[800]},"&$checked + $track":{backgroundColor:t.palette.primary.main},"&$disabled + $track":{backgroundColor:t.palette.type==="light"?t.palette.common.black:t.palette.common.white}},colorSecondary:{"&$checked":{color:t.palette.secondary.main,"&:hover":{backgroundColor:tn(t.palette.secondary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:t.palette.type==="light"?t.palette.grey[400]:t.palette.grey[800]},"&$checked + $track":{backgroundColor:t.palette.secondary.main},"&$disabled + $track":{backgroundColor:t.palette.type==="light"?t.palette.common.black:t.palette.common.white}},sizeSmall:{width:40,height:24,padding:7,"& $thumb":{width:16,height:16},"& $switchBase":{padding:4,"&$checked":{transform:"translateX(16px)"}}},checked:{},disabled:{},input:{left:"-100%",width:"300%"},thumb:{boxShadow:t.shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}
15,track:{height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.palette.type==="light"?t.palette.common.black:t.palette.common.white,opacity:t.palette.type==="light"?.38:.3}}},Lde=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.color,o=s===void 0?"secondary":s,l=t.edge,c=l===void 0?!1:l,h=t.size,u=h===void 0?"medium":h,d=Be(t,["classes","className","color","edge","size"]),p=y.createElement("span",{className:i.thumb});return y.createElement("span",{className:$e(i.root,a,{start:i.edgeStart,end:i.edgeEnd}[c],u==="small"&&i["size".concat(ut(u))])},y.createElement(Lw,Z({type:"checkbox",icon:p,checkedIcon:p,classes:{root:$e(i.switchBase,i["color".concat(ut(o))]),input:i.input,checked:i.checked,disabled:i.disabled},ref:r},d)),y.createElement("span",{className:i.track}))});const Fde=Ye($de,{name:"MuiSwitch"})(Lde);var Ude={root:{width:"100%",overflowX:"auto"}},Bde=y.forwardRef(function(t,r){var i=t.classes,a=t.className,s=t.component,o=s===void 0?"div":s,l=Be(t,["classes","className","component"]);return y.createElement(o,Z({ref:r,className:$e(i.root,a)},l))});const qde=Ye(Ude,{name:"MuiTableContainer"})(Bde);var Vde={standard:Cu,filled:Bw,outlined:qw},zde={root:{}},Hde=y.forwardRef(function(t,r){var i=t.autoComplete,a=t.autoFocus,s=a===void 0?!1:a,o=t.children,l=t.classes,c=t.className,h=t.color,u=h===void 0?"primary":h,d=t.defaultValue,p=t.disabled,f=p===void 0?!1:p,m=t.error,g=m===void 0?!1:m,x=t.FormHelperTextProps,v=t.fullWidth,b=v===void 0?!1:v,j=t.helperText,w=t.hiddenLabel,S=t.id,_=t.InputLabelProps,C=t.inputProps,E=t.InputProps,P=t.inputRef,T=t.label,N=t.multiline,k=N===void 0?!1:N,I=t.name,D=t.onBlur,O=t.onChange,$=t.onFocus,U=t.placeholder,B=t.required,L=B===void 0?!1:B,A=t.rows,R=t.rowsMax,F=t.maxRows,q=t.minRows,V=t.select,X=V===void 0?!1:V,M=t.SelectProps,W=t.type,K=t.value,z=t.variant,Y=z===void 0?"standard":z,ie=Be(t,["autoComplete","autoFocus","children","classes","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","hiddenLabel","id","InputLabelProps","inputProps","InputProps","inputRef","label","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","rowsMax","maxRows","minRows","select","SelectProps","type","value","variant"]),ne={};if(Y==="outlined"&&(_&&typeof _.shrink<"u"&&(ne.notched=_.shrink),T)){var ve,pe=(ve=_?.required)!==null&&ve!==void 0?ve:L;ne.label=y.createElement(y.Fragment,null,T,pe&&" *")}X&&((!M||!M.native)&&(ne.id=void 0),ne["aria-describedby"]=void 0);var be=j&&S?"".concat(S,"-helper-text"):void 0,ye=T&&S?"".concat(S,"-label"):void 0,ke=Vde[Y],fe=y.createElement(ke,Z({"aria-describedby":be,autoComplete:i,autoFocus:s,defaultValue:d,fullWidth:b,multiline:k,name:I,rows:A,rowsMax:R,maxRows:F,minRows:q,type:W,value:K,id:S,inputRef:P,onBlur:D,onChange:O,onFocus:$,placeholder:U,inputProps:C},ne,E));return y.createElement(Ww,Z({className:$e(l.root,c),disabled:f,error:g,fullWidth:b,hiddenLabel:w,ref:r,required:L,color:u,variant:Y},ie),T&&y.createElement(Qw,Z({htmlFor:S,id:ye},_),T),X?y.createElement(no,Z({"aria-describedby":be,id:S,labelId:ye,value:K,input:fe},M),o):fe,j&&y.createElement(_2,Z({id:be},x),j))});const q2=Ye(zde,{name:"MuiTextField"})(Hde),Gde=Object.freeze(Object.defineProperty({__proto__:null,default:q2},Symbol.toStringTag,{value:"Module"}));function Wde(e,t){var r=t.disableHysteresis,i=r===void 0?!1:r,a=t.threshold,s=a===void 0?100:a,o=t.target,l=e.current;return o&&(e.current=o.pageYOffset!==void 0?o.pageYOffset:o.scrollTop),!i&&l!==void 0&&e.current<l?!1:e.current>s}var Yde=typeof window<"u"?window:null;function Kde(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.getTrigger,r=t===void 0?Wde:t,i=e.target,a=i===void 0?Yde:i,s=Be(e,["getTrigger","target"]),o=y.useRef(),l=y.useState(function(){return r(o,s)}),c=l[0],h=l[1];return y.useEffect(function(){var u=function(){h(r(o,Z({target:a},s)))};return u(),a.addEventListener("scroll",u),function(){a.removeEventListener("scroll",u)}},[a,r,JSON.stringify(s)]),c}var Xde=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return function(r){var i=t.breakpoint,a=i===void 0?"sm":i;function s(o){return y.createElement(r,Z({fullScreen:Kw(a,o.width)},o))}return Xw()(s)}},Qde={entering:{transform:"none"},entered:{transform:"none"}},Zde={enter:Rr.enteringScreen,exit:Rr.leavingScreen},Jde=y.forwardRef(function(t,r){var i=t.children,a=t.disableStrictModeCompat,s=a===void 0?!1:a,o=t.in,l=t.onEnter,c=t.onEntered,h=t.onEntering,u=t.onExit,d=t.onExited,p=t.onExiting,f=t.style,m=t.timeout,g=m===void 0?Zde:m,x=t.TransitionComponent,v=x===void 0?ru:x,b=Be(t,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),j=Or(),w=j.unstable_strictMode&&!s,S=y.useRef(null),_=mn(i.ref,r),C=mn(w?S:void 0,_),E=function($){return function(U,B){if($){var L=w?[S.current,U]:[U,B],A=Ci(L,2),R=A[0],F=A[1];F===void 0?$(R):$(R,F)}}},P=E(h),T=E(function(O,$){Uf(O);var U=ja({style:f,timeout:g},{mode:"enter"});O.style.webkitTransition=j.transitions.create("transform",U),O.style.transition=j.transitions.create("transform",U),l&&l(O,$)}),N=E(c),k=E(p),I=E(function(O){var $=ja({style:f,timeout:g},{mode:"exit"});O.style.webkitTransition=j.transitions.create("transform",$),O.style.transition=j.transitions.create("transform",$),u&&u(O)}),D=E(d);return y.createElement(v,Z({appear:!0,in:o,nodeRef:w?S:void 0,onEnter:T,onEntered:N,onEntering:P,onExit:I,onExited:D,onExiting:k,timeout:g},b),function(O,$){return y.cloneElement(i,Z({style:Z({transform:"scale(0)",visibility:O==="exited"&&!o?"hidden":void 0},Qde[O],f,i.props.style),ref:C},$))})});const eue=Object.freeze(Object.defineProperty({__proto__:null,Accordion:ose,AccordionActions:dse,AccordionDetail
15s:pse,AccordionSummary:gse,AppBar:yse,Avatar:_se,Backdrop:Hw,Badge:Ise,BottomNavigation:Ose,BottomNavigationAction:$se,Box:Lse,Breadcrumbs:Gse,Button:Gw,ButtonBase:ni,ButtonGroup:Zse,Card:toe,CardActionArea:ioe,CardActions:ooe,CardContent:doe,CardHeader:poe,CardMedia:voe,Checkbox:HA,Chip:WA,CircularProgress:ur,ClickAwayListener:b2,Collapse:Yf,Container:joe,CssBaseline:Noe,Dialog:Poe,DialogActions:Roe,DialogContent:Moe,DialogContentText:Foe,DialogTitle:qoe,Divider:Hoe,Drawer:j2,ExpansionPanel:Joe,ExpansionPanelActions:nle,ExpansionPanelDetails:ale,ExpansionPanelSummary:lle,Fab:ule,Fade:zw,FilledInput:Bw,FormControl:Ww,FormControlLabel:S2,FormGroup:Yw,FormHelperText:_2,FormLabel:C2,Grid:Ile,GridList:Ole,GridListTile:Lle,GridListTileBar:Ble,Grow:ec,Hidden:Wle,Icon:Kle,IconButton:Oo,ImageList:Zle,ImageListItem:nce,ImageListItemBar:ace,Input:Cu,InputAdornment:lce,InputBase:_u,InputLabel:Qw,LinearProgress:P2,Link:gce,List:t2,ListItem:QA,ListItemAvatar:yce,ListItemIcon:wce,ListItemSecondaryAction:_ce,ListItemText:D2,ListSubheader:Pce,Menu:i2,MenuItem:ei,MenuList:r2,MobileStepper:Rce,Modal:Wf,ModalManager:JA,MuiThemeProvider:qd,NativeSelect:yae,NoSsr:R2,OutlinedInput:qw,Paper:ca,Popover:Uw,Popper:fA,Portal:Tw,Radio:Vce,RadioGroup:zce,RootRef:Wce,Select:no,ServerStyleSheets:bR,Slide:y2,Slider:tde,Snackbar:sde,SnackbarContent:$2,Step:cde,StepButton:bde,StepConnector:B2,StepContent:Sde,StepIcon:L2,StepLabel:U2,Stepper:Ede,StylesProvider:Qj,SvgIcon:Lp,SwipeableDrawer:Mde,Switch:Fde,Tab:os,TabScrollButton:TA,Table:BA,TableBody:qA,TableCell:Kp,TableContainer:qde,TableFooter:XA,TableHead:YA,TablePagination:p2,TableRow:VA,TableSortLabel:KA,Tabs:zf,TextField:q2,TextareaAutosize:Ra,ThemeProvider:qd,Toolbar:Vw,Tooltip:Ke,Typography:Dr,Unstable_TrapFocus:e2,Zoom:Jde,alpha:tn,capitalize:ut,colors:rse,createChainedFunction:Ma,createGenerateClassName:_f,createMuiTheme:iw,createStyles:SA,createSvgIcon:ar,createTheme:lu,darken:Vo,debounce:La,decomposeColor:$a,deprecatedPropType:PR,duration:Rr,easing:$p,emphasize:Ia,fade:jR,getContrastRatio:nw,getLuminance:zd,hexToRgb:ew,hslToRgb:tw,isMuiElement:ls,isWidthDown:Kw,isWidthUp:E2,jssPreset:Nf,lighten:zo,makeStyles:_A,ownerDocument:Ir,ownerWindow:du,recomposeColor:Ql,requirePropFactory:IR,responsiveFontSizes:CA,rgbToHex:xR,setRef:Bi,styleFunction:v2,styled:Pw,unstable_createMuiStrictModeTheme:wA,unstable_useId:Rl,unsupportedProp:DR,useControlled:vs,useEventCallback:Un,useForkRef:mn,useFormControl:xs,useIsF
15ocusVisible:Zl,useMediaQuery:N2,useRadioGroup:M2,useScrollTrigger:Kde,useTheme:Or,withMobileDialog:Xde,withStyles:Ye,withTheme:NA,withWidth:Xw},Symbol.toStringTag,{value:"Module"})),tue=Pn(eue),nue=Pn(Kse),rue=Pn(fle),iue=Pn(vle),aue=Pn(xle),sue=Pn(vae),oue=Pn(uce),lue=Pn(Ece),cue=Pn(Xie),due=Pn(Tae),uue=Pn(TZ),hue=Pn(Gde);var Ec={},zE;function pue(){if(zE)return Ec;zE=1;var e=vn(),t=bn();Object.defineProperty(Ec,"__esModule",{value:!0}),Ec.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");return Ec.default=a,Ec}var Tc={},HE;function fue(){if(HE)return Tc;HE=1;var e=vn(),t=bn();Object.defineProperty(Tc,"__esModule",{value:!0}),Tc.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");return Tc.default=a,Tc}var kc={},GE;function mue(){if(GE)return kc;GE=1;var e=vn(),t=bn();Object.defineProperty(kc,"__esModule",{value:!0}),kc.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{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"}),"CloudDownload");return kc.default=a,kc}var Pc={},WE;function gue(){if(WE)return Pc;WE=1;var e=vn(),t=bn();Object.defineProperty(Pc,"__esModule",{value:!0}),Pc.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"}),"Print");return Pc.default=a,Pc}var Ic={},YE;function vue(){if(YE)return Ic;YE=1;var e=vn(),t=bn();Object.defineProperty(Ic,"__esModule",{value:!0}),Ic.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M10 18h5V5h-5v13zm-6 0h5V5H4v13zM16 5v13h5V5h-5z"}),"ViewColumn");return Ic.default=a,Ic}var Dc={},KE;function bue(){if(KE)return Dc;KE=1;var e=vn(),t=bn();Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList");return Dc.default=a,Dc}var Np={exports:{}},yue=Np.exports,XE;function xue(){return XE||(XE=1,(function(e,t){(function(r,i){e.exports=i(Rt(),vj())})(typeof self<"u"?self:yue,(function(r,i){return(function(){var a={328:function(c,h,u){Object.defineProperty(h,"__esModule",{value:!0}),h.PrintContextConsumer=h.PrintContext=void 0;var d=u(496),p=Object.prototype.hasOwnProperty.call(d,"createContext");h.PrintContext=p?d.createContext({}):null,h.PrintContextConsumer=h.PrintContext?h.PrintContext.Consumer:function(){return null}},428:function(c,h,u){Object.defineProperty(h,"__esModule",{value:!0}),h.ReactToPrint=void 0;var d=u(316),p=u(496),f=u(190),m=u(328),g=u(940),x=(function(v){function b(){var j=v.apply(this,d.__spreadArray([],d.__read(arguments),!1))||this;return j.startPrint=function(w){var S=j.props,_=S.onAfterPrint,C=S.onPrintError,E=S.print,P=S.documentTitle;setTimeout((function(){var T,N;if(w.contentWindow)if(w.contentWindow.focus(),E)E(w).then((function(){return _?.()})).then((function(){return j.handleRemoveIframe()})).catch((function(D){C?C("print",D):j.logMessages(["An error was thrown by the specified `print` function"])}));else{if(w.contentWindow.print){var k=(N=(T=w.contentDocument)===null||T===void 0?void 0:T.title)!==null&&N!==void 0?N:"",I=w.ownerDocument.title;P&&(w.ownerDocument.title=P,w.contentDocument&&(w.contentDocument.title=P)),w.contentWindow.print(),P&&(w.ownerDocument.title=I,w.contentDocument&&(w.contentDocument.title=k))}else j.logMessages(["Printing for this browser is not currently possible: the browser does not have a `print` method available for iframes."]);_?.(),j.handleRemoveIframe()}else j.logMessages(["Printing failed because the `contentWindow` of the print iframe did not load. This is possibly an error with `react-to-
15print`. Please file an issue: https://github.com/gregnb/react-to-print/issues/"])}),500)},j.triggerPrint=function(w){var S=j.props,_=S.onBeforePrint,C=S.onPrintError;if(_){var E=_();E&&typeof E.then=="function"?E.then((function(){j.startPrint(w)})).catch((function(P){C&&C("onBeforePrint",P)})):j.startPrint(w)}else j.startPrint(w)},j.handlePrint=function(w){var S=j.props,_=S.bodyClass,C=S.content,E=S.copyStyles,P=S.fonts,T=S.pageStyle,N=S.nonce,k=typeof w=="function"?w():null;if(k&&typeof C=="function"&&j.logMessages(['"react-to-print" received a `content` prop and a content param passed the callback return by `useReactToPrint. The `content` prop will be ignored.'],"warning"),k||typeof C!="function"||(k=C()),k!==void 0)if(k!==null){var I=document.createElement("iframe");I.width="".concat(document.documentElement.clientWidth,"px"),I.height="".concat(document.documentElement.clientHeight,"px"),I.style.position="absolute",I.style.top="-".concat(document.documentElement.clientHeight+100,"px"),I.style.left="-".concat(document.documentElement.clientWidth+100,"px"),I.id="printWindow",I.srcdoc="<!DOCTYPE html>";var D=(0,f.findDOMNode)(k);if(D){var O=D.cloneNode(!0),$=O instanceof Text,U=document.querySelectorAll("link[rel~='stylesheet'], link[as='style']"),B=$?[]:O.querySelectorAll("img"),L=$?[]:O.querySelectorAll("video"),A=P?P.length:0;j.numResourcesToLoad=U.length+B.length+L.length+A,j.resourcesLoaded=[],j.resourcesErrored=[];var R=function(F,q){j.resourcesLoaded.includes(F)?j.logMessages(["Tried to mark a resource that has already been handled",F],"debug"):(q?(j.logMessages(d.__spreadArray(['"react-to-print" was unable to load a resource but will continue attempting to print the page'],d.__read(q),!1)),j.resourcesErrored.push(F)):j.resourcesLoaded.push(F),j.resourcesLoaded.length+j.resourcesErrored.length===j.numResourcesToLoad&&j.triggerPrint(I))};I.onload=function(){var F,q,V,X;I.onload=null;var M=I.contentDocument||((q=I.contentWindow)===null||q===void 0?void 0:q.document);if(M){M.body.appendChild(O),P&&(!((V=I.contentDocument)===null||V===void 0)&&V.fonts&&(!((X=I.contentWindow)===null||X===void 0)&&X.FontFace)?P.forEach((function(Ie){var Re=new FontFace(Ie.family,Ie.source,{weight:Ie.weight,style:Ie.style});I.contentDocument.fonts.add(Re),Re.loaded.then((function(){R(Re)})).catch((function(Ve){R(Re,["Failed loading the font:",Re,"Load error:",Ve])}))})):(P.forEach((function(Ie){return R(Ie)})),j.logMessages(['"react-to-print" is not able to load custom fonts because the browser does not support the FontFace API but will continue attempting to print the page'])));var W=typeof T=="function"?T():T;if(typeof W!="string")j.logMessages(['"react-to-print" expected a "string" from `pageStyle` but received "'.concat(typeof W,'". Styles from `pageStyle` will not be applied.')]);else{var K=M.createElement("style");N&&(K.setAttribute("nonce",N),M.head.setAttribute("nonce",N)),K.appendChild(M.createTextNode(W)),M.head.appendChild(K)}if(_&&(F=M.body.classList).add.apply(F,d.__spreadArray([],d.__read(_.split(" ")),!1)),!$){for(var z=$?[]:D.querySelectorAll("canvas"),Y=M.querySelectorAll("canvas"),ie=0;ie<z.length;++ie){var ne=z[ie],ve=Y[ie].getContext("2d");ve&&ve.drawImage(ne,0,0)}var pe=function(Ie){var Re=B[Ie],Ve=Re.getAttribute("src");if(Ve){var Xe=new Image;Xe.onload=function(){return R(Re)},Xe.onerror=function(et,rt,bt,Qe,tt){return R(Re,["Error loading <img>",Re,"Error",tt])},Xe.src=Ve}else R(Re,['Found an <img> tag with an empty "src" attribute. This prevents pre-loading it. The <img> is:',Re])};for(ie=0;ie<B.length;ie++)pe(ie);var be=function(Ie){var Re=L[Ie];Re.preload="auto";var Ve=Re.getAttribute("poster");if(Ve){var Xe=new Image;Xe.onload=function(){return R(Re)},Xe.onerror=function(et,rt,bt,Qe,tt){return R(Re,["Error loading video poster",Ve,"for video",Re,"Error:",tt])},Xe.src=Ve}else Re.readyState>=2?R(Re):(Re.onloadeddata=function(){return R(Re)},Re.onerror=function(et,rt,bt,Qe,tt){return R(Re,["Error loading video",Re,"Error",tt])},Re.onstalled=function(){return R(Re,["Loading video stalled, skipping",Re])})};for(ie=0;ie<L.length;ie++)be(ie);var ye="input",ke=D.querySelectorAll(ye),fe=M.querySelectorAll(ye);for(ie=0;ie<ke.length;ie++)fe[ie].value=ke[ie].value;var se="input[type=checkbox],input[type=radio]",ge=D.querySelectorAll(se),De=M.querySelectorAll(se);for(ie=0;ie<ge.length;ie++)De[ie].checked=ge[ie].checked;var ae="select",Q=D.querySelectorAll(ae),ee=M.querySelectorAll(ae);for(ie=0;ie<Q.length;ie++)ee[ie].value=Q[ie].value}if(E)for(var oe=document.querySelectorAll("style, link[rel~='stylesheet'], link[as='style']"),Pe=function(Ie,Re){var Ve=oe[Ie];if(Ve.tagName.toLowerCase()==="style"){var Xe=M.createElement(Ve.tagName),et=Ve.sheet;if(et){var rt="";try{for(var bt=et.cssRules.length,Qe=0;Qe<bt;++Qe)typeof et.cssRules[Qe].cssText=="string"&&(rt+="".concat(et.cssRules[Qe].cssText,`\r
16`))}catch{j.logMessages(["A stylesheet could not be accessed. This is likely due to the stylesheet having cross-origin imports, and many browsers block script access to cross-origin stylesheets. See https://github.com/gregnb/react-to-
16print/issues/429 for details. You may be able to load the sheet by both marking the stylesheet with the cross `crossorigin` attribute, and setting the `Access-Control-Allow-Origin` header on the server serving the stylesheet. Alternatively, host the stylesheet on your domain to avoid this issue entirely.",Ve],"warning")}Xe.setAttribute("id","react-to-print-".concat(Ie)),N&&Xe.setAttribute("nonce",N),Xe.appendChild(M.createTextNode(rt)),M.head.appendChild(Xe)}}else if(Ve.getAttribute("href"))if(Ve.hasAttribute("disabled"))j.logMessages(["`react-to-print` encountered a <link> tag with a `disabled` attribute and will ignore it. Note that the `disabled` attribute is deprecated, and some browsers ignore it. You should stop using it. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-disabled. The <link> is:",Ve],"warning"),R(Ve);else{for(var tt=M.createElement(Ve.tagName),We=(Qe=0,Ve.attributes.length);Qe<We;++Qe){var pt=Ve.attributes[Qe];pt&&tt.setAttribute(pt.nodeName,pt.nodeValue||"")}tt.onload=function(){return R(tt)},tt.onerror=function(Et,Ot,kt,Pt,Ut){return R(tt,["Failed to load",tt,"Error:",Ut])},N&&tt.setAttribute("nonce",N),M.head.appendChild(tt)}else j.logMessages(["`react-to-print` encountered a <link> tag with an empty `href` attribute. In addition to being invalid HTML, this can cause problems in many browsers, and so the <link> was not loaded. The <link> is:",Ve],"warning"),R(Ve)},Fe=(ie=0,oe.length);ie<Fe;++ie)Pe(ie)}j.numResourcesToLoad!==0&&E||j.triggerPrint(I)},j.handleRemoveIframe(!0),document.body.appendChild(I)}else j.logMessages(['"react-to-print" could not locate the DOM node corresponding with the `content` prop'])}else j.logMessages(['There is nothing to print because the "content" prop returned "null". Please ensure "content" is renderable before allowing "react-to-print" to be called.']);else j.logMessages(["To print a functional component ensure it is wrapped with `React.forwardRef`, and ensure the forwarded ref is used. See the README for an example: https://github.com/gregnb/react-to-print#examples"])},j.handleRemoveIframe=function(w){var S=j.props.removeAfterPrint;if(w||S){var _=document.getElementById("printWindow");_&&document.body.removeChild(_)}},j.logMessages=function(w,S){S===void 0&&(S="error"),j.props.suppressErrors},j}return d.__extends(b,v),b.prototype.handleClick=function(j,w){var S=this,_=this.props,C=_.onBeforeGetContent,E=_.onPrintError;if(C){var P=C();P&&typeof P.then=="function"?P.then((function(){return S.handlePrint(w)})).catch((function(T){E&&E("onBeforeGetContent",T)})):this.handlePrint(w)}else this.handlePrint(w)},b.prototype.render=function(){var j=this.props,w=j.children,S=j.trigger;if(S)return p.cloneElement(S(),{onClick:this.handleClick.bind(this)});if(!m.PrintContext)return this.logMessages(['"react-to-print" requires React ^16.3.0 to be able to use "PrintContext"']),null;var _={handlePrint:this.handleClick.bind(this)};return p.createElement(m.PrintContext.Provider,{value:_},w)},b.defaultProps=g.defaultProps,b})(p.Component);h.ReactToPrint=x},940:function(c,h){Object.defineProperty(h,"__esModule",{value:!0}),h.defaultProps=void 0,h.defaultProps={copyStyles:!0,pageStyle:`
17        @page {
18            /* Remove browser default header (title) and footer (url) */
19            margin: 0;
20        }
21        @media print {
22            body {
23                /* Tell browsers to print background colors */
24                -webkit-print-color-adjust: exact; /* Chrome/Safari/Edge/Opera */
25                color-adjust: exact; /* Firefox */
26            }
27        }
28    `,removeAfterPrint:!1,suppressErrors:!1}},892:function(c,h,u){Object.defineProperty(h,"__esModule",{value:!0}),h.useReactToPrint=void 0;var d=u(316),p=u(496),f=u(428),m=u(940),g=u(860),x=Object.prototype.hasOwnProperty.call(p,"useMemo")&&Object.prototype.hasOwnProperty.call(p,"useCallback");h.useReactToPrint=function(v){if(!x)return v.suppressErrors,function(){throw new Error('"react-to-print" requires React ^16.8.0 to be able to use "useReactToPrint"')};var b=p.useMemo((function(){return new f.ReactToPrint(d.__assign(d.__assign({},m.defaultProps),v))}),[v]);return p.useCallback((function(j,w){return(0,g.wrapCallbackWithArgs)(b,b.handleClick,w)(j)}),[b])}},860:function(c,h,u){Object.defineProperty(h,"__esModule",{value:!0}),h.wrapCallbackWithArgs=void 0;var d=u(316);h.wrapCallbackWithArgs=function(p,f){for(var m=[],g=2;g<arguments.length;g++)m[g-2]=arguments[g];return function(){for(var x=[],v=0;v<arguments.length;v++)x[v]=arguments[v];return f.apply(p,d.__spreadArray(d.__spreadArray([],d.__read(x),!1),d.__read(m),!1))}}},496:function(c){c.exports=r},190:function(c){c.exports=i},316:function(c,h,u){u.r(h),u.d(h,{__addDisposableResource:function(){return M},__assign:function(){return f},__asyncDelegator:function(){return U},__asyncGenerator:function(){return $},__asyncValues:function(){return B},__await:function(){return O},__awaiter:function(){return _},__classPrivateFieldGet:function(){return q},__classPrivateFieldIn:function(){return X},__classPrivateFieldSet:function(){return V},__createBinding:function(){return E},__decorate:function(){return g},__disposeResources:function(){return K},__esDecorate:function(){return v},__exportStar:function(){return P},__extends:function(){return p},__generator:function(){return C},__importDefault:function(){return F},__importStar:function(){return R}
28,__makeTemplateObject:function(){return L},__metadata:function(){return S},__param:function(){return x},__propKey:function(){return j},__read:function(){return N},__rest:function(){return m},__runInitializers:function(){return b},__setFunctionName:function(){return w},__spread:function(){return k},__spreadArray:function(){return D},__spreadArrays:function(){return I},__values:function(){return T}});var d=function(z,Y){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ie,ne){ie.__proto__=ne}||function(ie,ne){for(var ve in ne)Object.prototype.hasOwnProperty.call(ne,ve)&&(ie[ve]=ne[ve])},d(z,Y)};function p(z,Y){if(typeof Y!="function"&&Y!==null)throw new TypeError("Class extends value "+String(Y)+" is not a constructor or null");function ie(){this.constructor=z}d(z,Y),z.prototype=Y===null?Object.create(Y):(ie.prototype=Y.prototype,new ie)}var f=function(){return f=Object.assign||function(z){for(var Y,ie=1,ne=arguments.length;ie<ne;ie++)for(var ve in Y=arguments[ie])Object.prototype.hasOwnProperty.call(Y,ve)&&(z[ve]=Y[ve]);return z},f.apply(this,arguments)};function m(z,Y){var ie={};for(var ne in z)Object.prototype.hasOwnProperty.call(z,ne)&&Y.indexOf(ne)<0&&(ie[ne]=z[ne]);if(z!=null&&typeof Object.getOwnPropertySymbols=="function"){var ve=0;for(ne=Object.getOwnPropertySymbols(z);ve<ne.length;ve++)Y.indexOf(ne[ve])<0&&Object.prototype.propertyIsEnumerable.call(z,ne[ve])&&(ie[ne[ve]]=z[ne[ve]])}return ie}function g(z,Y,ie,ne){var ve,pe=arguments.length,be=pe<3?Y:ne===null?ne=Object.getOwnPropertyDescriptor(Y,ie):ne;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")be=Reflect.decorate(z,Y,ie,ne);else for(var ye=z.length-1;ye>=0;ye--)(ve=z[ye])&&(be=(pe<3?ve(be):pe>3?ve(Y,ie,be):ve(Y,ie))||be);return pe>3&&be&&Object.defineProperty(Y,ie,be),be}function x(z,Y){return function(ie,ne){Y(ie,ne,z)}}function v(z,Y,ie,ne,ve,pe){function be(Pe){if(Pe!==void 0&&typeof Pe!="function")throw new TypeError("Function expected");return Pe}for(var ye,ke=ne.kind,fe=ke==="getter"?"get":ke==="setter"?"set":"value",se=!Y&&z?ne.static?z:z.prototype:null,ge=Y||(se?Object.getOwnPropertyDescriptor(se,ne.name):{}),De=!1,ae=ie.length-1;ae>=0;ae--){var Q={};for(var ee in ne)Q[ee]=ee==="access"?{}:ne[ee];for(var ee in ne.access)Q.access[ee]=ne.access[ee];Q.addInitializer=function(Pe){if(De)throw new TypeError("Cannot add initializers after decoration has completed");pe.push(be(Pe||null))};var oe=(0,ie[ae])(ke==="accessor"?{get:ge.get,set:ge.set}:ge[fe],Q);if(ke==="accessor"){if(oe===void 0)continue;if(oe===null||typeof oe!="object")throw new TypeError("Object expected");(ye=be(oe.get))&&(ge.get=ye),(ye=be(oe.set))&&(ge.set=ye),(ye=be(oe.init))&&ve.unshift(ye)}else(ye=be(oe))&&(ke==="field"?ve.unshift(ye):ge[fe]=ye)}se&&Object.defineProperty(se,ne.name,ge),De=!0}function b(z,Y,ie){for(var ne=arguments.length>2,ve=0;ve<Y.length;ve++)ie=ne?Y[ve].call(z,ie):Y[ve].call(z);return ne?ie:void 0}function j(z){return typeof z=="symbol"?z:"".concat(z)}function w(z,Y,ie){return typeof Y=="symbol"&&(Y=Y.description?"[".concat(Y.description,"]"):""),Object.defineProperty(z,"name",{configurable:!0,value:ie?"".concat(ie," ",Y):Y})}function S(z,Y){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(z,Y)}function _(z,Y,ie,ne){return new(ie||(ie=Promise))((function(ve,pe){function be(fe){try{ke(ne.next(fe))}catch(se){pe(se)}}function ye(fe){try{ke(ne.throw(fe))}catch(se){pe(se)}}function ke(fe){var se;fe.done?ve(fe.value):(se=fe.value,se instanceof ie?se:new ie((function(ge){ge(se)}))).then(be,ye)}ke((ne=ne.apply(z,Y||[])).next())}))}function C(z,Y){var ie,ne,ve,pe,be={label:0,sent:function(){if(1&ve[0])throw ve[1];return ve[1]},trys:[],ops:[]};return pe={next:ye(0),throw:ye(1),return:ye(2)},typeof Symbol=="function"&&(pe[Symbol.iterator]=function(){return this}),pe;function ye(ke){return function(fe){return(function(se){if(ie)throw new TypeError("Generator is already executing.");for(;pe&&(pe=0,se[0]&&(be=0)),be;)try{if(ie=1,ne&&(ve=2&se[0]?ne.return:se[0]?ne.throw||((ve=ne.return)&&ve.call(ne),0):ne.next)&&!(ve=ve.call(ne,se[1])).done)return ve;switch(ne=0,ve&&(se=[2&se[0],ve.value]),se[0]){case 0:case 1:ve=se;break;case 4:return be.label++,{value:se[1],done:!1};case 5:be.label++,ne=se[1],se=[0];continue;case 7:se=be.ops.pop(),be.trys.pop();continue;default:if(!((ve=(ve=be.trys).length>0&&ve[ve.length-1])||se[0]!==6&&se[0]!==2)){be=0;continue}if(se[0]===3&&(!ve||se[1]>ve[0]&&se[1]<ve[3])){be.label=se[1];break}if(se[0]===6&&be.label<ve[1]){be.label=ve[1],ve=se;break}if(ve&&be.label<ve[2]){be.label=ve[2],be.ops.push(se);break}ve[2]&&be.ops.pop(),be.trys.pop();continue}
28se=Y.call(z,be)}catch(ge){se=[6,ge],ne=0}finally{ie=ve=0}if(5&se[0])throw se[1];return{value:se[0]?se[1]:void 0,done:!0}})([ke,fe])}}}var E=Object.create?function(z,Y,ie,ne){ne===void 0&&(ne=ie);var ve=Object.getOwnPropertyDescriptor(Y,ie);ve&&!("get"in ve?!Y.__esModule:ve.writable||ve.configurable)||(ve={enumerable:!0,get:function(){return Y[ie]}}),Object.defineProperty(z,ne,ve)}:function(z,Y,ie,ne){ne===void 0&&(ne=ie),z[ne]=Y[ie]};function P(z,Y){for(var ie in z)ie==="default"||Object.prototype.hasOwnProperty.call(Y,ie)||E(Y,z,ie)}function T(z){var Y=typeof Symbol=="function"&&Symbol.iterator,ie=Y&&z[Y],ne=0;if(ie)return ie.call(z);if(z&&typeof z.length=="number")return{next:function(){return z&&ne>=z.length&&(z=void 0),{value:z&&z[ne++],done:!z}}};throw new TypeError(Y?"Object is not iterable.":"Symbol.iterator is not defined.")}function N(z,Y){var ie=typeof Symbol=="function"&&z[Symbol.iterator];if(!ie)return z;var ne,ve,pe=ie.call(z),be=[];try{for(;(Y===void 0||Y-- >0)&&!(ne=pe.next()).done;)be.push(ne.value)}catch(ye){ve={error:ye}}finally{try{ne&&!ne.done&&(ie=pe.return)&&ie.call(pe)}finally{if(ve)throw ve.error}}return be}function k(){for(var z=[],Y=0;Y<arguments.length;Y++)z=z.concat(N(arguments[Y]));return z}function I(){for(var z=0,Y=0,ie=arguments.length;Y<ie;Y++)z+=arguments[Y].length;var ne=Array(z),ve=0;for(Y=0;Y<ie;Y++)for(var pe=arguments[Y],be=0,ye=pe.length;be<ye;be++,ve++)ne[ve]=pe[be];return ne}function D(z,Y,ie){if(ie||arguments.length===2)for(var ne,ve=0,pe=Y.length;ve<pe;ve++)!ne&&ve in Y||(ne||(ne=Array.prototype.slice.call(Y,0,ve)),ne[ve]=Y[ve]);return z.concat(ne||Array.prototype.slice.call(Y))}
28function O(z){return this instanceof O?(this.v=z,this):new O(z)}function $(z,Y,ie){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var ne,ve=ie.apply(z,Y||[]),pe=[];return ne={},be("next"),be("throw"),be("return"),ne[Symbol.asyncIterator]=function(){return this},ne;function be(ge){ve[ge]&&(ne[ge]=function(De){return new Promise((function(ae,Q){pe.push([ge,De,ae,Q])>1||ye(ge,De)}))})}function ye(ge,De){try{(ae=ve[ge](De)).value instanceof O?Promise.resolve(ae.value.v).then(ke,fe):se(pe[0][2],ae)}catch(Q){se(pe[0][3],Q)}var ae}function ke(ge){ye("next",ge)}function fe(ge){ye("throw",ge)}function se(ge,De){ge(De),pe.shift(),pe.length&&ye(pe[0][0],pe[0][1])}}function U(z){var Y,ie;return Y={},ne("next"),ne("throw",(function(ve){throw ve})),ne("return"),Y[Symbol.iterator]=function(){return this},Y;function ne(ve,pe){Y[ve]=z[ve]?function(be){return(ie=!ie)?{value:O(z[ve](be)),done:!1}:pe?pe(be):be}:pe}}function B(z){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var Y,ie=z[Symbol.asyncIterator];return ie?ie.call(z):(z=T(z),Y={},ne("next"),ne("throw"),ne("return"),Y[Symbol.asyncIterator]=function(){return this},Y);function ne(ve){Y[ve]=z[ve]&&function(pe){return new Promise((function(be,ye){(function(ke,fe,se,ge){Promise.resolve(ge).then((function(De){ke({value:De,done:se})}),fe)})(be,ye,(pe=z[ve](pe)).done,pe.value)}))}}}function L(z,Y){return Object.defineProperty?Object.defineProperty(z,"raw",{value:Y}):z.raw=Y,z}var A=Object.create?function(z,Y){Object.defineProperty(z,"default",{enumerable:!0,value:Y})}:function(z,Y){z.default=Y};function R(z){if(z&&z.__esModule)return z;var Y={};if(z!=null)for(var ie in z)ie!=="default"&&Object.prototype.hasOwnProperty.call(z,ie)&&E(Y,z,ie);return A(Y,z),Y}function F(z){return z&&z.__esModule?z:{default:z}}function q(z,Y,ie,ne){if(ie==="a"&&!ne)throw new TypeError("Private accessor was defined without a getter");if(typeof Y=="function"?z!==Y||!ne:!Y.has(z))throw new TypeError("Cannot read private member from an object whose class did not declare it");return ie==="m"?ne:ie==="a"?ne.call(z):ne?ne.value:Y.get(z)}function V(z,Y,ie,ne,ve){if(ne==="m")throw new TypeError("Private method is not writable");if(ne==="a"&&!ve)throw new TypeError("Private accessor was defined without a setter");if(typeof Y=="function"?z!==Y||!ve:!Y.has(z))throw new TypeError("Cannot write private member to an object whose class did not declare it");return ne==="a"?ve.call(z,ie):ve?ve.value=ie:Y.set(z,ie),ie}function X(z,Y){if(Y===null||typeof Y!="object"&&typeof Y!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof z=="function"?Y===z:z.has(Y)}function M(z,Y,ie){if(Y!=null){if(typeof Y!="object"&&typeof Y!="function")throw new TypeError("Object expected.");var ne;if(ie){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");ne=Y[Symbol.asyncDispose]}if(ne===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");ne=Y[Symbol.dispose]}if(typeof ne!="function")throw new TypeError("Object not disposable.");z.stack.push({value:Y,dispose:ne,async:ie})}else ie&&z.stack.push({async:!0});return Y}var W=typeof SuppressedError=="function"?SuppressedError:function(z,Y,ie){var ne=new Error(ie);return ne.name="SuppressedError",ne.error=z,ne.suppressed=Y,ne};function K(z){function Y(ie){z.error=z.hasError?new W(ie,z.error,"An error was suppressed during disposal."):ie,z.hasError=!0}return(function ie(){for(;z.stack.length;){var ne=z.stack.pop();try{var ve=ne.dispose&&ne.dispose.call(ne.value);if(ne.async)return Promise.resolve(ve).then(ie,(function(pe){return Y(pe),ie()}))}catch(pe){Y(pe)}}if(z.hasError)throw z.error})()}h.default={__extends:p,__assign:f,__rest:m,__decorate:g,__param:x,__metadata:S,__awaiter:_,__generator:C,__createBinding:E,__exportStar:P,__values:T,__read:N,__spread:k,__spreadArrays:I,__spreadArray:D,__await:O,__asyncGenerator:$,__asyncDelegator:U,__asyncValues:B,__makeTemplateOb
28ject:L,__importStar:R,__importDefault:F,__classPrivateFieldGet:q,__classPrivateFieldSet:V,__classPrivateFieldIn:X,__addDisposableResource:M,__disposeResources:K}}},s={};function o(c){var h=s[c];if(h!==void 0)return h.exports;var u=s[c]={exports:{}};return a[c](u,u.exports,o),u.exports}o.d=function(c,h){for(var u in h)o.o(h,u)&&!o.o(c,u)&&Object.defineProperty(c,u,{enumerable:!0,get:h[u]})},o.o=function(c,h){return Object.prototype.hasOwnProperty.call(c,h)},o.r=function(c){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})};var l={};return(function(){var c=l;Object.defineProperty(c,"__esModule",{value:!0}),c.useReactToPrint=c.ReactToPrint=c.PrintContextConsumer=void 0;var h=o(328);Object.defineProperty(c,"PrintContextConsumer",{enumerable:!0,get:function(){return h.PrintContextConsumer}});var u=o(428);Object.defineProperty(c,"ReactToPrint",{enumerable:!0,get:function(){return u.ReactToPrint}});var d=o(892);Object.defineProperty(c,"useReactToPrint",{enumerable:!0,get:function(){return d.useReactToPrint}});var p=o(428);c.default=p.ReactToPrint})(),l})()}))})(Np)),Np.exports}var Rc={},QE;function jue(){if(QE)return Rc;QE=1;var e=vn(),t=bn();Object.defineProperty(Rc,"__esModule",{value:!0}),Rc.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");return Rc.default=a,Rc}var ZE;function wue(){if(ZE)return Zn;ZE=1;function e(Le){return Le&&typeof Le=="object"&&"default"in Le?Le.default:Le}Object.defineProperty(Zn,"__esModule",{value:!0});var t=e(Nre),r=Ere,i=e(Ire),a=e(Dre()),s=e(Rre()),o=e(Ore()),l=e(Are()),c=e(Mre()),h=e($re());e(SD());var u=Rt(),d=e(u),p=e(Bre),f=e(Gre),m=e(Xre),g=e(eie),x=e(mie),v=e(gie),b=e(GA()),j=e(jie),w=e(Nie),S=vj(),_=e(Iie),C=e(Die),E=e(Rie()),P=e(Lie),T=e(qae),N=e(Vae),k=e(zae),I=tue,D=e(nue),O=e(rue),$=e(iue),U=e(aue),B=e(sue),L=e(oue),A=e(lue),R=e(cue),F=e(due),q=e(uue),V=e(hue),X=e(pue()),M=e(fue()),W=e(mue()),K=e(gue()),z=e(vue()),Y=e(bue()),ie=e(xue()),ne=e(jue()),ve=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Le){return typeof Le}:function(Le){return Le&&typeof Symbol=="function"&&Le.constructor===Symbol&&Le!==Symbol.prototype?"symbol":typeof Le},pe=function(Le,ce){if(!(Le instanceof ce))throw new TypeError("Cannot call a class as a function")},be=(function(){function Le(ce,G){for(var re=0;re<G.length;re++){var H=G[re];H.enumerable=H.enumerable||!1,H.configurable=!0,"value"in H&&(H.writable=!0),Object.defineProperty(ce,H.key,H)}}return function(ce,G,re){return G&&Le(ce.prototype,G),re&&Le(ce,re),ce}})(),ye=function(Le,ce,G){return ce in Le?Object.defineProperty(Le,ce,{value:G,enumerable:!0,configurable:!0,writable:!0}):Le[ce]=G,Le},ke=Object.assign||function(Le){for(var ce=1;ce<arguments.length;ce++){var G=arguments[ce];for(var re in G)Object.prototype.hasOwnProperty.call(G,re)&&(Le[re]=G[re])}return Le},fe=function(Le,ce){if(typeof ce!="function"&&ce!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ce);Le.prototype=Object.create(ce&&ce.prototype,{constructor:{value:Le,enumerable:!1,writable:!0,configurable:!0}}),ce&&(Object.setPrototypeOf?Object.setPrototypeOf(Le,ce):Le.__proto__=ce)},se=function(Le,ce){var G={};for(var re in Le)ce.indexOf(re)>=0||Object.prototype.hasOwnProperty.call(Le,re)&&(G[re]=Le[re]);return G},ge=function(Le,ce){if(!Le)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!ce||typeof ce!="object"&&typeof ce!="function"?Le:ce},De=(function(){return function(Le,ce){if(Array.isArray(Le))return Le;if(Symbol.iterator in Object(Le))return(function(G,re){var H=[],je=!0,_e=!1,we=void 0;try{for(var xe,Ce=G[Symbol.iterator]();!(je=(xe=Ce.next()).done)&&(H.push(xe.value),!re||H.length!==re);je=!0);}catch(Oe){_e=!0,we=Oe}finally{try{!je&&Ce.return&&Ce.return()}finally{if(_e)throw we}}return H})(Le,ce);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),ae=function(Le){if(Array.isArray(Le)){for(var ce=0,G=Array(Le.length);ce<Le.length;ce++)G[ce]=Le[ce];return G}return Array.from(Le)},Q=function(Le){var ce;return{root:{},cellHide:{display:"none"},stackedCommon:ye({},Le.breakpoints.down("sm"),(ce={display:"inline-block",fontSize:"16px",height:"24px",whiteSpace:"nowrap",width:"calc(50% - 80px)"},ye(ce,"whiteSpace","nowrap"),ye(ce,"&:last-child",{borderBottom:"none"}),ye(ce,"&:nth-last-child(2)",{borderBottom:"none"}),ce)),cellStackedSmall:ye({},Le.breakpoints.down("sm"),{width:"50%"}),responsiveStackedSmall:ye({},Le.breakpoints.down("sm"),{width:"50%"})}},ee=(function(Le){function ce(){var G,re,H;pe(this,ce);for(var je=arguments.length,_e=Array(je),we=0;we<je;we++)_e[we]=arguments[we];return re=H=ge(this,(G=ce.__proto__||Object.getPrototypeOf(ce)).call.apply(G,[this].concat(_e))),H.handleClick=function(xe){var Ce=H.props,Oe=Ce.colIndex,ze=Ce.options,He=Ce.children,Je=Ce.dataIndex,ct=Ce.rowIndex;ze.onCellClick&&ze.onCellClick(He,{colIndex:Oe,rowIndex:ct,dataIndex:Je,event:xe})},ge(H,re)}return fe(ce,Le),be(ce,[{key:"render",value:function(){var G,re,H=this.props,je=H.children,_e=H.classes,we=(H.colIndex,H.columnHeader),xe=H.options,Ce=(H.dataIndex,H.rowIndex,H.className),Oe=H.print,ze=se(H,["children","classes","colIndex","columnHeader","options","dataIndex","rowIndex","className","print"]);return[d.createElement(m,{key:1,className:a((G={},ye(G,_e.root,!0),ye(G,_e.cellHide,!0),ye(G,_e.stackedCommon,xe.responsive==="stacked"||xe.responsive==="stackedFullWidth"),ye(G,_e.cellStackedSmall,xe.responsive==="stacked"||xe.responsive==="stackedFullWidth"&&(xe.setTableProps().padding==="none"||xe.setTableProps().size==="small")),ye(G,"datatables-noprint",!Oe),G),Ce)},we),d.createElement(m,ke({key:2,onClick:this.handleClick,className:a((re={},ye(re,_e.root,!0),ye(re,_e.stackedCommon,xe.responsive==="stacked"||xe.responsive==="stackedFullWidth"),ye(re,_e.responsiveStackedSmall,xe.responsive==="stacked"||xe.responsive==="stackedFullWidth"&&(xe.setTableProps().padding==="none"||xe.setTableProps().size==="small")),ye(re,"datatables-noprint",!Oe),re),Ce)},ze),je)]}}]),ce})(d.Component),oe=r.withStyles(Q,{name:"MUIDataTableBodyCell"})(ee),Pe=function(Le){return{root:{},hover:{}
28,hoverCursor:{cursor:"pointer"},responsiveStacked:ye({},Le.breakpoints.down("sm"),{border:"solid 2px rgba(0, 0, 0, 0.15)"})}},Fe=(function(Le){function ce(){return pe(this,ce),ge(this,(ce.__proto__||Object.getPrototypeOf(ce)).apply(this,arguments))}return fe(ce,Le),be(ce,[{key:"render",value:function(){var G,re=this.props,H=re.classes,je=re.options,_e=re.rowSelected,we=re.onClick,xe=re.className,Ce=se(re,["classes","options","rowSelected","onClick","className"]);return d.createElement(g,ke({hover:!!je.rowHover,onClick:we,className:a((G={},ye(G,H.root,!0),ye(G,H.hover,je.rowHover),ye(G,H.hoverCursor,je.selectableRowsOnClick||je.expandableRowsOnClick),ye(G,H.responsiveStacked,je.responsive==="stacked"||je.responsive==="stackedFullWidth"),G),xe),selected:_e},Ce),this.props.children)}}]),ce})(d.Component),Ie=r.withStyles(Pe,{name:"MUIDataTableBodyRow"})(Fe),Re=function(Le){return{root:{},fixedHeader:{position:"sticky",top:"0px",left:"0px",zIndex:100},fixedHeaderCommon:{position:"sticky",zIndex:100,backgroundColor:Le.palette.background.paper},fixedHeaderXAxis:{left:"0px"},fixedHeaderYAxis:{top:"0px"},icon:{cursor:"pointer",transition:"transform 0.25s"},expanded:{transform:"rotate(90deg)"},hide:{visibility:"hidden"},headerCell:{zIndex:110,backgroundColor:Le.palette.background.paper},expandDisabled:{},checkboxRoot:{},checked:{},disabled:{}}},Ve=(function(Le){function ce(){return pe(this,ce),ge(this,(ce.__proto__||Object.getPrototypeOf(ce)).apply(this,arguments))}return fe(ce,Le),be(ce,[{key:"render",value:function(){var G,re,H=this.props,je=H.classes,_e=H.fixedHeader,we=H.fixedHeaderOptions,xe=H.isHeaderCell,Ce=H.expandableOn,Oe=H.selectableOn,ze=H.isRowExpanded,He=H.onExpand,Je=H.isRowSelectable,ct=H.selectableRowsHeader,nt=H.hideExpandButton,ft=se(H,["classes","fixedHeader","fixedHeaderOptions","isHeaderCell","expandableOn","selectableOn","isRowExpanded","onExpand","isRowSelectable","selectableRowsHeader","hideExpandButton"]),lt=void 0;if(!Ce&&Oe==="none")return!1;_e&&(lt=je.fixedHeader),we&&(lt=je.fixedHeaderCommon,we.xAxis&&(lt+=" "+je.fixedHeaderXAxis),we.yAxis&&(lt+=" "+je.fixedHeaderYAxis));var Dt=a((ye(G={},je.root,!0),ye(G,lt,!0),ye(G,je.headerCell,xe),G)),At=a(ye({},je.expandDisabled,nt)),Ht=a((ye(re={},je.icon,!0),ye(re,je.hide,xe),ye(re,je.expanded,ze),re));return d.createElement(m,{className:Dt,padding:"checkbox"},d.createElement("div",{style:{display:"flex",alignItems:"center"}},Ce&&d.createElement(v,{onClick:He,disabled:xe,className:At},d.createElement(b,{id:"expandable-button",className:Ht})),Oe!=="none"&&(!xe||Oe==="multiple"&&ct!==!1?d.createElement(x,ke({classes:{root:je.checkboxRoot,checked:je.checked,disabled:je.disabled},color:"primary",disabled:!Je},ft)):null)))}}]),ce})(d.Component);Ve.defaultProps={isHeaderCell:!1,isRowExpanded:!1,expandableOn:!1,selectableOn:"none"};var Xe=r.withStyles(Re,{name:"MUIDataTableSelectCell"})(Ve);function et(Le){return Le.reduce(function(ce,G){return ce[G.dataIndex]=!0,ce},{})}function rt(Le){return typeof Le=="string"?Le.replace(/^\+|^\-|^\=|^\@/g,"'$&"):Le}function bt(Le,ce,G){var re=Le<=ce?1:Math.ceil(Le/ce);return G>=re?re-1:G}function Qe(){return Intl?new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}).compare:function(Le,ce){return Le.localeCompare(ce)}}function tt(Le){return function(ce,G){var re=ce.data===null||ce.data===void 0?"":ce.data,H=G.data===null||G.data===void 0?"":G.data;return(typeof re.localeCompare=="function"?re.localeCompare(H):re-H)*(Le==="asc"?1:-1)}}function We(Le,ce,G){var re=function(xe){return typeof xe=="string"?xe.replace(/\"/g,'""'):xe},H=function(xe){return xe.reduce(function(Ce,Oe){return Oe.download?Ce+'"'+rt(re(Oe.label||Oe.name))+'"'+G.downloadOptions.separator:Ce},"").slice(0,-1)+`\r
29`},je=H(Le),_e=function(xe){return xe.length?xe.reduce(function(Ce,Oe){return Ce+'"'+Oe.data.filter(function(ze,He){return Le[He].download}).map(function(ze){return rt(re(ze))}).join('"'+G.downloadOptions.separator+'"')+`"\r
30`},"").trim():""},we=_e(ce);return G.onDownload?G.onDownload(H,_e,Le,ce):(""+je+we).trim()}function pt(Le,ce){var G=new Blob([Le],{type:"text/csv"});if(navigator&&navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(G,ce);else{var re="data:text/csv;charset=utf-8,"+Le,H=window.URL||window.webkitURL,je=H.createObjectURL===void 0?re:H.createObjectURL(G),_e=document.createElement("a");_e.setAttribute("href",je),_e.setAttribute("download",ce),document.body.appendChild(_e),_e.click(),document.body.removeChild(_e)}}function Et(Le,ce,G,re){var H=We(Le,ce,G);G.onDownload&&H===!1||re(H,G.downloadOptions.filename)}var Ot={root:{},emptyTitle:{textAlign:"center"}},kt=(function(Le){function ce(){var G,re,H;pe(this,ce);for(var je=arguments.length,_e=Array(je),we=0;we<je;we++)_e[we]=arguments[we];return re=H=ge(this,(G=ce.__proto__||Object.getPrototypeOf(ce)).call.apply(G,[this].concat(_e))),H.handleRowSelect=function(xe,Ce){var Oe=!(!Ce||!Ce.nativeEvent)&&Ce.nativeEvent.shiftKey,ze=[],He=H.props.previousSelectedRow;if(Oe&&He&&He.index<H.props.data.length){var Je=He.index,ct=o(H.props.selectedRows),nt=H.props.data[xe.index].dataIndex;ct.data.filter(function(lt){return lt.dataIndex===nt}).length===0&&(ct.data.push({index:xe.index,dataIndex:nt}),ct.lookup[nt]=!0);for(var ft=function(){var lt=H.props.data[Je].dataIndex;if(H.isRowSelectable(lt,ct)){var Dt={index:Je,dataIndex:lt};ct.data.filter(function(At){return At.dataIndex===lt}).length===0&&(ct.data.push(Dt),ct.lookup[lt]=!0),ze.push(Dt)}Je=xe.index>Je?Je+1:Je-1};Je!==xe.index;)ft()}H.props.selectRowUpdate("cell",xe,ze)},H.handleRowClick=function(xe,Ce,Oe){if(Oe.target.id==="expandable-button"||Oe.target.nodeName==="path"&&Oe.target.parentNode.id==="expandable-button")H.props.options.onRowClick&&H.props.options.onRowClick(xe,Ce,Oe);else if(!Oe.target.id||!Oe.target.id.startsWith("MUIDataTableSelectCell")){if(H.props.options.selectableRowsOnClick&&H.props.options.selectableRows!=="none"&&H.isRowSelectable(Ce.dataIndex,H.props.selectedRows)){var ze={index:Ce.rowIndex,dataIndex:Ce.dataIndex};H.handleRowSelect(ze,Oe)}if(H.props.options.expandableRowsOnClick&&H.props.options.expandableRows&&H.isRowExpandable(Ce.dataIndex,H.props.expandedRows)){var He={index:Ce.rowIndex,dataIndex:Ce.dataIndex};H.props.toggleExpandRow(He)}H.props.options.selectableRowsOnClick||H.props.options.onRowClick&&H.props.options.onRowClick(xe,Ce,Oe)}
30},ge(H,re)}return fe(ce,Le),be(ce,[{key:"buildRows",value:function(){var G=this.props,re=G.data,H=G.page,je=G.rowsPerPage,_e=G.count;if(this.props.options.serverSide)return re.length?re:null;var we=[],xe=bt(_e,je,H),Ce=xe===0?0:xe*je,Oe=Math.min(_e,(xe+1)*je);H>xe;for(var ze=Ce;ze<_e&&ze<Oe;ze++)re[ze]!==void 0&&we.push(re[ze]);return we.length?we:null}},{key:"getRowIndex",value:function(G){var re=this.props,H=re.page,je=re.rowsPerPage;return re.options.serverSide?G:(H===0?0:H*je)+G}},{key:"isRowSelected",value:function(G){var re=this.props.selectedRows;return!(!re.lookup||!re.lookup[G])}},{key:"isRowExpanded",value:function(G){var re=this.props.expandedRows;return!(!re.lookup||!re.lookup[G])}},{key:"isRowSelectable",value:function(G,re){var H=this.props.options;return re=re||this.props.selectedRows,!H.isRowSelectable||H.isRowSelectable(G,re)}},{key:"isRowExpandable",value:function(G){var re=this.props,H=re.options,je=re.expandedRows;return!H.isRowExpandable||H.isRowExpandable(G,je)}},{key:"render",value:function(){var G=this,re=this.props,H=re.classes,je=re.columns,_e=re.toggleExpandRow,we=re.options,xe=this.buildRows(),Ce=je.filter(function(Oe){return Oe.display==="true"}).length;return d.createElement(f,null,xe&&xe.length>0?xe.map(function(Oe,ze){var He=Oe.data,Je=Oe.dataIndex;return we.customRowRender?we.customRowRender(He,Je,ze):d.createElement(d.Fragment,{key:ze},d.createElement(Ie,ke({},we.setRowProps?we.setRowProps(He,Je):{},{options:we,rowSelected:we.selectableRows!=="none"&&G.isRowSelected(Je),onClick:G.handleRowClick.bind(null,He,{rowIndex:ze,dataIndex:Je}),"data-testid":"MUIDataTableBodyRow-"+Je,id:"MUIDataTableBodyRow-"+Je}),d.createElement(Xe,{onChange:G.handleRowSelect.bind(null,{index:G.getRowIndex(ze),dataIndex:Je}),onExpand:_e.bind(null,{index:G.getRowIndex(ze),dataIndex:Je}),fixedHeader:we.fixedHeader,fixedHeaderOptions:we.fixedHeaderOptions,checked:G.isRowSelected(Je),expandableOn:we.expandableRows,hideExpandButton:!G.isRowExpandable(Je)&&we.expandableRows,selectableOn:we.selectableRows,isRowExpanded:G.isRowExpanded(Je),isRowSelectable:G.isRowSelectable(Je),id:"MUIDataTableSelectCell-"+Je}),He.map(function(ct,nt){return je[nt].display==="true"&&d.createElement(oe,ke({},je[nt].setCellProps?je[nt].setCellProps(ct,Je,nt):{},{"data-testid":"MuiDataTableBodyCell-"+nt+"-"+ze,dataIndex:Je,rowIndex:ze,colIndex:nt,columnHeader:je[nt].label,print:je[nt].print,options:we,key:nt}),ct)})),G.isRowExpanded(Je)&&we.renderExpandableRow(He,{rowIndex:ze,dataIndex:Je}))}):d.createElement(Ie,{options:we},d.createElement(oe,{colSpan:we.selectableRows!=="none"||we.expandableRows?Ce+1:Ce,options:we,colIndex:0,rowIndex:0},d.createElement(p,{variant:"subtitle1",className:H.emptyTitle},we.textLabels.body.noMatch))))}}]),ce})(d.Component);kt.defaultProps={toggleExpandRow:function(){}};var Pt=r.withStyles(Ot,{name:"MUIDataTableBody"})(kt),Ut={root:{display:"flex",justifyContent:"left",flexWrap:"wrap",margin:"0px 16px 0px 16px"},chip:{margin:"8px 8px 0px 0px"}},Nn=(function(Le){function ce(){return pe(this,ce),ge(this,(ce.__proto__||Object.getPrototypeOf(ce)).apply(this,arguments))}return fe(ce,Le),be(ce,[{key:"render",value:function(){var G=this.props,re=G.classes,H=G.filterList,je=G.filterUpdate,_e=G.filterListRenderers,we=G.columnNames,xe=G.serverSideFilterList,Ce=G.customFilterListUpdate,Oe=this.props.options.serverSide,ze=function(Je,ct,nt,ft,lt){var Dt=void 0;return Dt=lt?Ce[ct]?"custom":"chip":we[ct].filterType,d.createElement(j,{label:Je,key:nt,onDelete:je.bind(null,ct,ft[nt]||[],we[ct].name,Dt,Ce[ct]),className:re.chip})},He=function(Je){return Je.map(function(ct,nt){if(we[nt].filterType==="custom"&&Je[nt].length){var ft=_e[nt](ct);if(ft)return Array.isArray(ft)?ft.map(function(lt,Dt){return ze(lt,nt,Dt,ct,!0)}):ze(ft,nt,nt,ct,!1)}return ct.map(function(lt,Dt){return(function(At,Ht,On){return d.createElement(j,{label:_e[At](Ht),key:On,onDelete:je.bind(null,At,Ht,we[At].name,"chip"),className:re.chip})})(nt,lt,Dt)})})};return d.createElement("div",{className:re.root},He(Oe?xe:H))}}]),ce})(d.Component),$t=r.withStyles(Ut,{name:"MUIDataTableFilterList"})(Nn),pn=function(Le){return{root:{},fixedHeader:{position:"sticky",top:"0px",left:"0px",zIndex:100,backgroundColor:Le.palette.background.paper},fixedHeaderCommon:{position:"sticky",zIndex:100,backgroundColor:Le.palette.background.paper},fixedHeaderXAxis:{left:"0px"},fixedHeaderYAxis:{top:"0px"},tooltip:{cursor:"pointer"}
30,mypopper:{"&[data-x-out-of-boundaries]":{display:"none"}},data:{display:"inline-block"},sortAction:{display:"flex",verticalAlign:"top",cursor:"pointer"},sortLabelRoot:{height:"10px"},sortActive:{color:Le.palette.text.primary},toolButton:{display:"flex",outline:"none",cursor:"pointer"},hintIconAlone:{marginTop:"-3px",marginLeft:"3px"},hintIconWithSortIcon:{marginTop:"-3px"}}},nn=(function(Le){function ce(){var G,re,H;pe(this,ce);for(var je=arguments.length,_e=Array(je),we=0;we<je;we++)_e[we]=arguments[we];return re=H=ge(this,(G=ce.__proto__||Object.getPrototypeOf(ce)).call.apply(G,[this].concat(_e))),H.handleKeyboardSortinput=function(xe){return xe.key==="Enter"&&H.props.toggleSort(H.props.index),!1},H.handleSortClick=function(){H.props.toggleSort(H.props.index)},ge(H,re)}return fe(ce,Le),be(ce,[{key:"render",value:function(){var G,re,H=this.props,je=H.children,_e=H.classes,we=H.options,xe=H.sortDirection,Ce=H.sort,Oe=H.hint,ze=H.print,He=H.column,Je=H.cellHeaderProps,ct=Je===void 0?{}:Je,nt=ct.className,ft=se(ct,["className"]),lt=xe!=="none"&&xe!==void 0,Dt=xe!=="none"&&xe,At=void 0,Ht=ke({classes:{root:_e.sortLabelRoot},active:lt,hideSortIcon:!0},Dt?{direction:xe}:{});we.fixedHeader&&(At=_e.fixedHeader),we.fixedHeaderOptions&&(At=_e.fixedHeaderCommon,we.fixedHeaderOptions.xAxis&&(At+=" "+_e.fixedHeaderXAxis),we.fixedHeaderOptions.yAxis&&(At+=" "+_e.fixedHeaderYAxis));var On=a((ye(G={},_e.root,!0),ye(G,At,!0),ye(G,"datatables-noprint",!ze),ye(G,nt,nt),G));return d.createElement(m,ke({className:On,scope:"col",sortDirection:Dt},ft),we.sort&&Ce?d.createElement("span",{role:"button",onKeyUp:this.handleKeyboardSortinput,onClick:this.handleSortClick,className:_e.toolButton,tabIndex:0},d.createElement(C,{title:we.textLabels.body.columnHeaderTooltip?we.textLabels.body.columnHeaderTooltip(He):we.textLabels.body.toolTip,placement:"bottom-start",classes:{tooltip:_e.tooltip,popper:_e.mypopper}},d.createElement("div",{className:_e.sortAction},d.createElement("div",{className:a((re={},ye(re,_e.data,!0),ye(re,_e.sortActive,lt),re))},je),d.createElement("div",{className:_e.sortAction},d.createElement(_,Ht)))),Oe&&d.createElement(C,{title:Oe},d.createElement(E,{className:lt?_e.hintIconWithSortIcon:_e.hintIconAlone,fontSize:"small"}))):d.createElement("div",{className:Oe?_e.sortAction:null},je,Oe&&d.createElement(C,{title:Oe,placement:"bottom-end",classes:{tooltip:_e.tooltip,popper:_e.mypopper},enterDelay:300},d.createElement(E,{className:_e.hintIconAlone,fontSize:"small"}))))}}]),ce})(d.Component),Rn=r.withStyles(pn,{name:"MUIDataTableHeadCell"})(nn),fn={root:{}},ht=(function(Le){function ce(){return pe(this,ce),ge(this,(ce.__proto__||Object.getPrototypeOf(ce)).apply(this,arguments))}return fe(ce,Le),be(ce,[{key:"render",value:function(){var G=this.props.classes;return d.createElement(g,{className:a(ye({},G.root,!0))},this.props.children)}}]),ce})(d.Component),jt=r.withStyles(fn,{name:"MUIDataTableHeadRow"})(ht),sn=function(Le){return{main:{},responsiveStacked:ye({},Le.breakpoints.down("sm"),{display:"none"})}},rn=(function(Le){function ce(){var G,re,H;pe(this,ce);for(var je=arguments.length,_e=Array(je),we=0;we<je;we++)_e[we]=arguments[we];return re=H=ge(this,(G=ce.__proto__||Object.getPrototypeOf(ce)).call.apply(G,[this].concat(_e))),H.handleToggleColumn=function(xe){H.props.toggleSort(xe)},H.handleRowSelect=function(){H.props.selectRowUpdate("head",null)},ge(H,re)}return fe(ce,Le),be(ce,[{key:"componentDidMount",value:function(){this.props.handleHeadUpdateRef(this.handleUpdateCheck)}},{key:"render",value:function(){var G,re=this,H=this.props,je=H.classes,_e=H.columns,we=H.count,xe=H.options,Ce=H.data,Oe=H.setCellRef,ze=H.selectedRows,He=ze&&ze.data.length||0,Je=He>0&&He<we,ct=He===we;if(xe.disableToolbarSelect===!0)if(ct){for(var nt=0;nt<Ce.length;nt++)if(!ze.lookup[Ce[nt].dataIndex]){ct=!1,Je=!0;break}}else He>we&&(Je=!0);return d.createElement(w,{className:a((G={},ye(G,je.responsiveStacked,xe.responsive==="stacked"||xe.responsive==="stackedFullWidth"),ye(G,je.main,!0),G))},d.createElement(jt,null,d.createElement(Xe,{ref:function(ft){return Oe(0,S.findDOMNode(ft))},onChange:this.handleRowSelect.bind(null),indeterminate:Je,checked:ct,isHeaderCell:!0,expandableO
30n:xe.expandableRows,selectableOn:xe.selectableRows,fixedHeader:xe.fixedHeader,fixedHeaderOptions:xe.fixedHeaderOptions,selectableRowsHeader:xe.selectableRowsHeader,isRowSelectable:!0}),_e.map(function(ft,lt){return ft.display==="true"&&(ft.customHeadRender?ft.customHeadRender(ke({index:lt},ft),re.handleToggleColumn):d.createElement(Rn,{cellHeaderProps:_e[lt].setCellHeaderProps?_e[lt].setCellHeaderProps(ke({index:lt},ft)):{},key:lt,index:lt,type:"cell",ref:function(Dt){return Oe(lt+1,S.findDOMNode(Dt))},sort:ft.sort,sortDirection:ft.sortDirection,toggleSort:re.handleToggleColumn,hint:ft.hint,print:ft.print,options:xe,column:ft},ft.label))})))}}]),ce})(d.Component),yt=r.withStyles(sn,{name:"MUIDataTableHead"})(rn),Wt={root:{"&:last-child":{padding:"0px 24px 0px 24px"}},toolbar:{},selectRoot:{},"@media screen and (max-width: 400px)":{toolbar:{"& span:nth-child(2)":{display:"none"}},selectRoot:{marginRight:"8px"}}},Lt=(function(Le){function ce(){var G,re,H;pe(this,ce);for(var je=arguments.length,_e=Array(je),we=0;we<je;we++)_e[we]=arguments[we];return re=H=ge(this,(G=ce.__proto__||Object.getPrototypeOf(ce)).call.apply(G,[this].concat(_e))),H.handleRowChange=function(xe){H.props.changeRowsPerPage(xe.target.value)},H.handlePageChange=function(xe,Ce){H.props.changePage(Ce)},ge(H,re)}return fe(ce,Le),be(ce,[{key:"render",value:function(){var G=this.props,re=G.count,H=G.classes,je=G.options,_e=G.rowsPerPage,we=G.page,xe=je.textLabels.pagination;return d.createElement(P,null,d.createElement(g,null,d.createElement(T,{className:H.root,classes:{caption:H.caption,toolbar:H.toolbar,selectRoot:H.selectRoot},count:re,rowsPerPage:_e,page:bt(re,_e,we),labelRowsPerPage:xe.rowsPerPage,labelDisplayedRows:function(Ce){var Oe=Ce.from,ze=Ce.to,He=Ce.count;return Oe+"-"+ze+" "+xe.displayRows+" "+He},backIconButtonProps:{id:"pagination-back","data-testid":"pagination-back","aria-label":xe.previous},nextIconButtonProps:{id:"pagination-next","data-testid":"pagination-next","aria-label":xe.next},SelectProps:{id:"pagination-input",SelectDisplayProps:{id:"pagination-rows","data-testid":"pagination-rows"},MenuProps:{id:"pagination-menu","data-testid":"pagination-menu",MenuListProps:{id:"pagination-menu-list","data-testid":"pagination-menu-list"}}},rowsPerPageOptions:je.rowsPerPageOptions,onChangePage:this.handlePageChange,onChangeRowsPerPage:this.handleRowChange})))}}]),ce})(d.Component),qr=r.withStyles(Wt,{name:"MUIDataTablePagination"})(Lt),Gn=(function(Le){function ce(){return pe(this,ce),ge(this,(ce.__proto__||Object.getPrototypeOf(ce)).apply(this,arguments))}return fe(ce,Le),be(ce,[{key:"render",value:function(){var G=this.props,re=G.options,H=G.rowCount,je=G.page,_e=G.rowsPerPage,we=G.changeRowsPerPage,xe=G.changePage;return d.createElement(i,null,re.customFooter?re.customFooter(H,je,_e,we,xe,re.textLabels.pagination):re.pagination&&d.createElement(qr,{count:H,page:je,rowsPerPage:_e,changeRowsPerPage:we,changePage:xe,component:"div",options:re}))}}]),ce})(d.Component),Mr={root:{position:"absolute"},resizer:{position:"absolute",width:"1px",height:"100%",left:"100px",cursor:"ew-resize",border:"0.1px solid rgba(224, 224, 224, 1)"}},ai=(function(Le){function ce(){var G,re,H;pe(this,ce);for(var je=arguments.length,_e=Array(je),we=0;we<je;we++)_e[we]=arguments[we];return re=H=ge(this,(G=ce.__proto__||Object.getPrototypeOf(ce)).call.apply(G,[this].concat(_e))),H.state={resizeCoords:{},priorPosition:{},startPosition:0,tableWidth:"100%",tableHeight:"100%"},H.handleResize=function(){window.innerWidth!==H.windowWidth&&(H.windowWidth=window.innerWidth,H.setDividers())},H.setCellRefs=function(xe,Ce){H.cellsRef=xe,H.tableRef=Ce,H.setDividers()},H.setDividers=function(){var xe=S.findDOMNode(H.tableRef).getBoundingClientRect(),Ce=xe.width,Oe=xe.height,ze=H.state,He=ze.priorPosition,Je=ze.resizeCoords;Object.entries(H.cellsRef).forEach(function(ct){var nt=De(ct,2),ft=nt[0],lt=nt[1];if(lt){var Dt=lt.getBoundingClientRect(),At=window.getComputedStyle(lt,null),Ht=Je[ft]!==void 0?Je[ft].left:void 0,On=He[ft]||0,It=Dt.left+lt.offsetWidth-parseInt(At.paddingLeft)/2;Ht!==On&&(Je[ft]={left:It},He[ft]=It)}}),H.setState({tableWidth:Ce,tableHeight:Oe,resizeCoords:Je,priorPosition:He},H.updateWidths)},H.updateWidths=function(){var xe=0,Ce=H.state,Oe=Ce.resizeCoords,ze=Ce.tableWidth;Object.entries(Oe).forEach(function(He){var Je=De(He,2),ct=Je[0],nt=Je[1],ft=Number((nt.left-xe)/ze*100).toFixed(2);xe=nt.left;var lt=H.cellsRef[ct];lt&&(lt.style.width=ft+"%")})},H.onResizeStart=function(xe,Ce){H.setState({isResize:!0,id:xe,startPosition:Ce.clientX})},H.onResizeMove=function(xe,Ce){var Oe=H.state,ze=Oe.startPosition,He=Oe.isResize,Je=Oe.resizeCoords;if(He){var ct=ze-(ze-Ce.clientX),nt=ke({},Je[xe],{left:ct}),ft=ke({},Je,ye({},xe,nt));H.setState({resizeCoords:ft},H.updateWidths)}},H.onResizeEnd=function(xe,Ce){H.setState({isResize:!1,id:null})},ge(H,re)}
30return fe(ce,Le),be(ce,[{key:"componentDidMount",value:function(){var G=this;this.windowWidth=null,this.props.setResizeable(this.setCellRefs),this.props.updateDividers(function(){return G.setState({updateCoords:!0},function(){return G.updateWidths})}),window.addEventListener("resize",this.handleResize,!1)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.handleResize,!1)}},{key:"render",value:function(){var G=this,re=this.props.classes,H=this.state,je=H.id,_e=H.isResize,we=H.resizeCoords,xe=H.tableWidth,Ce=H.tableHeight;return d.createElement("div",{className:re.root,style:{width:xe}},Object.entries(we).map(function(Oe){var ze=De(Oe,2),He=ze[0],Je=ze[1];return d.createElement("div",{"aria-hidden":"true",key:He,onMouseMove:G.onResizeMove.bind(null,He),onMouseUp:G.onResizeEnd.bind(null,He),style:{width:_e&&je==He?xe:"auto",position:"absolute",height:Ce,zIndex:1e3}},d.createElement("div",{"aria-hidden":"true",onMouseDown:G.onResizeStart.bind(null,He),className:re.resizer,style:{left:Je.left}}))}))}}]),ce})(d.Component),tr=r.withStyles(Mr,{name:"MUIDataTableResize"})(ai),sr=(function(Le){function ce(){var G,re,H;pe(this,ce);for(var je=arguments.length,_e=Array(je),we=0;we<je;we++)_e[we]=arguments[we];return re=H=ge(this,(G=ce.__proto__||Object.getPrototypeOf(ce)).call.apply(G,[this].concat(_e))),H.state={open:!1},H.handleClick=function(){H.anchorEl=S.findDOMNode(H.anchorEl),H.setState({open:!0})},H.handleRequestClose=function(xe){H.setState({open:!1},xe&&typeof xe=="function"?xe():function(){})},H.handleOnExit=function(){H.props.refExit&&H.props.refExit()},ge(H,re)}return fe(ce,Le),be(ce,[{key:"UNSAFE_componentWillMount",value:function(){this.anchorEl=null}},{key:"componentDidMount",value:function(){this.props.refClose&&this.props.refClose(this.handleRequestClose)}},{key:"componentDidUpdate",value:function(G,re){this.state.open===!0&&(this.anchorEl=S.findDOMNode(this.anchorEl),this.popoverActions.updatePosition())}},{key:"render",value:function(){var G=this,re=this.props,H=(re.className,re.placement,re.trigger),je=(re.refExit,re.content),_e=se(re,["className","placement","trigger","refExit","content"]),we=d.cloneElement(d.createElement("span",null,H),{key:"content",ref:function(xe){return G.anchorEl=xe},onClick:function(){H.props.onClick&&H.props.onClick(),G.handleClick()}});return d.createElement(d.Fragment,null,d.createElement(k,ke({action:function(xe){return G.popoverActions=xe},elevation:2,open:this.state.open,onClose:this.handleRequestClose,onExited:this.handleOnExit,anchorEl:this.anchorEl,ref:function(xe){return G.popoverEl},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},_e),je),we)}}]),ce})(d.Component),Vr=function(Le){return{root:{backgroundColor:Le.palette.background.default,padding:"24px 24px 36px 24px",fontFamily:"Roboto"},header:{flex:"0 0 auto",marginBottom:"16px",width:"100%",display:"flex",justifyContent:"space-between"},title:{display:"inline-block",marginLeft:"7px",color:Le.palette.text.primary,fontSize:"14px",fontWeight:500},noMargin:{marginLeft:"0px"},reset:{alignSelf:"left"},resetLink:{marginLeft:"16px",fontSize:"12px",cursor:"pointer"},filtersSelected:{alignSelf:"right"},checkboxListTitle:{marginLeft:"7px",marginBottom:"8px",fontSize:"14px",color:Le.palette.text.secondary,textAlign:"left",fontWeight:500},checkboxFormGroup:{marginTop:"8px"},checkboxFormControl:{margin:"0px"},checkboxFormControlLabel:{fontSize:"15px",marginLeft:"8px",color:Le.palette.text.primary},checkboxIcon:{width:"32px",height:"32px"},checkbox:{"&$checked":{color:Le.palette.primary.main}},checked:{},gridListTile:{marginTop:"16px"}}},En=(function(Le){function ce(){var G,re,H;pe(this,ce);for(var je=arguments.length,_e=Array(je),we=0;we<je;we++)_e[we]=arguments[we];return re=H=ge(this,(G=ce.__proto__||Object.getPrototypeOf(ce)).call.apply(G,[this].concat(_e))),H.handleCheckboxChange=function(xe,Ce,Oe){H.props.onFilterUpdate(xe,Ce,Oe,"checkbox")},H.handleDropdownChange=function(xe,Ce,Oe){var ze=H.props.options.textLabels.filter.all,He=xe.target.value===ze?[]:[xe.target.value];H.props.onFilterUpdate(Ce,He,Oe,"dropdown")},H.handleMultiselectChange=function(xe,Ce,Oe){H.props.onFilterUpdate(xe,Ce,Oe,"multiselect")},H.handleTextFieldChange=function(xe,Ce,Oe){H.props.onFilterUpdate(Ce,xe.target.value,Oe,"textField")},H.handleCustomChange=function(xe,Ce,Oe){H.props.onFilterUpdate(Ce,xe,Oe.name,Oe.filterType)},ge(H,re)}return fe(ce,Le),be(ce,[{key:"renderCheckbox",value:function(G,re){var H=this,je=this.props,_e=je.classes,we=je.filterData,xe=je.filterList;return d.createElement(I.GridListTile,{key:re,cols:2},d.createElement(U,null,d.createElement(I.Grid,{item:!0,xs:12},d.createElement(p,{variant:"body2",className:_e.checkboxListTitle},G.label)),d.createElement(I.Grid,{container:!0},we[re].map(function(Ce,Oe){return d.createElement(I.Grid,{item:!0,key:Oe},d.createElement($,{key:Oe,classes:{root:_e.checkboxFormControl,label:_e.checkboxFormControl
30Label},control:d.createElement(x,{className:_e.checkboxIcon,onChange:H.handleCheckboxChange.bind(null,re,Ce,G.name),checked:xe[re].indexOf(Ce)>=0,classes:{root:_e.checkbox,checked:_e.checked},value:Ce!=null?Ce.toString():""}),label:Ce}))}))))}},{key:"renderSelect",value:function(G,re){var H=this,je=this.props,_e=je.classes,we=je.filterData,xe=je.filterList,Ce=je.options.textLabels.filter;return d.createElement(I.GridListTile,{key:re,cols:1,classes:{tile:_e.gridListTile}},d.createElement(O,{key:re,fullWidth:!0},d.createElement(L,{htmlFor:G.name},G.label),d.createElement(F,{fullWidth:!0,value:xe[re].length?xe[re].toString():Ce.all,name:G.name,onChange:function(Oe){return H.handleDropdownChange(Oe,re,G.name)},input:d.createElement(B,{name:G.name,id:G.name})},d.createElement(R,{value:Ce.all,key:0},Ce.all),we[re].map(function(Oe,ze){return d.createElement(R,{value:Oe,key:ze+1},Oe!=null?Oe.toString():"")}))))}},{key:"renderTextField",value:function(G,re){var H=this,je=this.props,_e=je.classes,we=je.filterList;return d.createElement(I.GridListTile,{key:re,cols:1,classes:{tile:_e.gridListTile}},d.createElement(O,{key:re,fullWidth:!0},d.createElement(I.TextField,{fullWidth:!0,label:G.label,value:we[re].toString()||"",onChange:function(xe){return H.handleTextFieldChange(xe,re,G.name)}})))}},{key:"renderMultiselect",value:function(G,re){var H=this,je=this.props,_e=je.classes,we=je.filterData,xe=je.filterList;return d.createElement(I.GridListTile,{key:re,cols:1,classes:{tile:_e.gridListTile}},d.createElement(O,{key:re,fullWidth:!0},d.createElement(L,{htmlFor:G.name},G.label),d.createElement(F,{multiple:!0,fullWidth:!0,value:xe[re]||[],renderValue:function(Ce){return Ce.join(", ")},name:G.name,onChange:function(Ce){return H.handleMultiselectChange(re,Ce.target.value,G.name)},input:d.createElement(B,{name:G.name,id:G.name})},we[re].map(function(Ce,Oe){return d.createElement(R,{value:Ce,key:Oe+1},d.createElement(x,{checked:xe[re].indexOf(Ce)>=0,value:Ce!=null?Ce.toString():"",className:_e.checkboxIcon,classes:{root:_e.checkbox,checked:_e.checked}}),d.createElement(A,{primary:Ce}))}))))}},{key:"renderCustomField",value:function(G,re){var H=this.props,je=H.classes,_e=H.filterList,we=H.options,xe=G.filterOptions&&G.filterOptions.display||we.filterOptions&&we.filterOptions.display;if(xe)return d.createElement(I.GridListTile,{key:re,cols:1,classes:{tile:je.gridListTile}},d.createElement(O,{key:re,fullWidth:!0},xe(_e,this.handleCustomChange,re,G)))}},{key:"render",value:function(){var G=this,re=this.props,H=re.classes,je=re.columns,_e=re.options,we=re.onFilterReset,xe=re.customFooter,Ce=re.filterList,Oe=_e.textLabels.filter,ze=je.filter(function(He){return He.filter}).length===1?1:2;return d.createElement("div",{className:H.root},d.createElement("div",{className:H.header},d.createElement("div",{className:H.reset},d.createElement(p,{variant:"body2",className:a(ye({},H.title,!0))},Oe.title),d.createElement(D,{color:"primary",className:H.resetLink,tabIndex:0,"aria-label":Oe.reset,"data-testid":"filterReset-button",onClick:we},Oe.reset)),d.createElement("div",{className:H.filtersSelected})),d.createElement(I.GridList,{cellHeight:"auto",cols:ze,spacing:34},je.map(function(He,Je){if(He.filter){var ct=He.filterType||_e.filterType;return ct==="checkbox"?G.renderCheckbox(He,Je):ct==="multiselect"?G.renderMultiselect(He,Je):ct==="textField"?G.renderTextField(He,Je):ct==="custom"?G.renderCustomField(He,Je):G.renderSelect(He,Je)}})),xe?xe(Ce):"")}}]),ce})(d.Component),Hi=r.withStyles(Vr,{name:"MUIDataTableFilter"})(En),Gi=function(Le){return{root:{padding:"16px 24px 16px 24px",fontFamily:"Roboto"},title:{marginLeft:"-7px",fontSize:"14px",color:Le.palette.text.secondary,textAlign:"left",fontWeight:500},formGroup:{marginTop:"8px"},formControl:{},checkbox:{padding:"0px",width:"32px",height:"32px"},checkboxRoot:{"&$checked":{color:Le.palette.primary.main}},checked:{},label:{fontSize:"15px",marginLeft:"8px",color:Le.palette.text.primary}}},zr=(function(Le){function ce(){var G,re,H;pe(this,ce);for(var je=arguments.length,_e=Array(je),we=0;we<je;we++)_e[we]=arguments[we];return re=H=ge(this,(G=ce.__proto__||Object.getPrototypeOf(ce)).call.apply(G,[this].concat(_e))),H.handleColChange=function(xe){H.props.onColumnUpdate(xe)},ge(H,re)}return fe(ce,Le),be(ce,[{key:"render",value:function(){var G=this,re=this.props,H=re.classes,je=re.columns,_e=re.options.textLabels.viewColumns;return d.createElement(O,{component:"fieldset",className:H.root,"aria-label":_e.titleAria},d.createElement(p,{variant:"caption",className:H.title},_e.title),d.createElement(U,{className:H.formGroup}
30,je.map(function(we,xe){return we.display!=="excluded"&&we.viewColumns!==!1&&d.createElement($,{key:xe,classes:{root:H.formControl,label:H.label},control:d.createElement(x,{className:H.checkbox,classes:{root:H.checkboxRoot,checked:H.checked},onChange:G.handleColChange.bind(null,xe),checked:we.display==="true",value:we.name}),label:we.label})})))}}]),ce})(d.Component),pr=r.withStyles(Gi,{name:"MUIDataTableViewCol"})(zr),Wi=function(Le){return{main:{display:"flex",flex:"1 0 auto"},searchIcon:{color:Le.palette.text.secondary,marginTop:"10px",marginRight:"8px"},searchText:{flex:"0.8 0"},clearIcon:{"&:hover":{color:Le.palette.error.main}}}},or=(function(Le){function ce(){var G,re,H;pe(this,ce);for(var je=arguments.length,_e=Array(je),we=0;we<je;we++)_e[we]=arguments[we];return re=H=ge(this,(G=ce.__proto__||Object.getPrototypeOf(ce)).call.apply(G,[this].concat(_e))),H.handleTextChange=function(xe){H.props.onSearch(xe.target.value)},H.onKeyDown=function(xe){xe.keyCode===27&&H.props.onHide()},ge(H,re)}return fe(ce,Le),be(ce,[{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.onKeyDown,!1)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.onKeyDown,!1)}},{key:"render",value:function(){var G=this,re=this.props,H=re.classes,je=re.options,_e=re.onHide,we=re.searchText;return d.createElement(q,{appear:!0,in:!0,timeout:300},d.createElement("div",{className:H.main,ref:function(xe){return G.rootRef=xe}},d.createElement(X,{className:H.searchIcon}),d.createElement(V,{className:H.searchText,autoFocus:!0,InputProps:{"data-test-id":je.textLabels.toolbar.search},inputProps:{"aria-label":je.textLabels.toolbar.search},value:we||"",onChange:this.handleTextChange,fullWidth:!0,inputRef:function(xe){return G.searchField=xe},placeholder:je.searchPlaceholder}),d.createElement(v,{className:H.clearIcon,onClick:_e},d.createElement(M,null))))}}]),ce})(d.Component),Ri=r.withStyles(Wi,{name:"MUIDataTableSearch"})(or),Ya=function(Le){var ce;return ce={root:{},fullWidthRoot:{},left:{flex:"1 1 auto"},fullWidthLeft:{flex:"1 1 auto"},actions:{flex:"1 1 auto",textAlign:"right"},fullWidthActions:{flex:"1 1 auto",textAlign:"right"},titleRoot:{},titleText:{},fullWidthTitleText:{textAlign:"left"},icon:{"&:hover":{color:Le.palette.primary.main}},iconActive:{color:Le.palette.primary.main},filterPaper:{maxWidth:"50%"},searchIcon:{display:"inline-flex",marginTop:"10px",marginRight:"8px"}},ye(ce,Le.breakpoints.down("sm"),{titleRoot:{},titleText:{fontSize:"16px"},spacer:{display:"none"},left:{padding:"8px 0px"},actions:{textAlign:"right"}}),ye(ce,Le.breakpoints.down("xs"),{root:{display:"block"},left:{padding:"8px 0px 0px 0px"},titleText:{textAlign:"center"},actions:{textAlign:"center"}}),ye(ce,"@media screen and (max-width: 480px)",{}),ce},si="scrollFullHeightFullWidth",ua=(function(Le){function ce(){var G,re,H;pe(this,ce);for(var je=arguments.length,_e=Array(je),we=0;we<je;we++)_e[we]=arguments[we];return re=H=ge(this,(G=ce.__proto__||Object.getPrototypeOf(ce)).call.apply(G,[this].concat(_e))),H.state={iconActive:null,showSearch:!!(H.props.searchText||H.props.options.searchText||H.props.options.searchOpen),searchText:H.props.searchText||null},H.handleCSVDownload=function(){var xe=H.props,Ce=xe.data,Oe=xe.displayData,ze=xe.columns,He=xe.options,Je=o(Ce),ct=ze;He.downloadOptions&&He.downloadOptions.filterOptions&&(He.downloadOptions.filterOptions.useDisplayedRowsOnly&&(Je=Oe.map(function(nt,ft){var lt=-1;return nt.index=ft,{data:nt.data.map(function(Dt){return lt+=1,(Dt===void 0?"undefined":ve(Dt))!=="object"||Dt===null||Array.isArray(Dt)?Dt:l(Ce,function(At){return At.index===nt.dataIndex}).data[lt]})}})),He.downloadOptions.filterOptions.useDisplayedColumnsOnly&&(ct=ze.filter(function(nt,ft){return nt.display==="true"}),Je=Je.map(function(nt){return nt.data=nt.data.filter(function(ft,lt){return ze[lt].display==="true"}),nt}))),Et(ct,Je,He,pt)},H.setActiveIcon=function(xe){H.setState(function(Ce){return{showSearch:H.isSearchShown(xe),iconActive:xe,prevIconActive:Ce.iconActive}},function(){var Ce=H.state,Oe=Ce.iconActive,ze=Ce.prevIconActive;Oe==="filter"&&(H.props.setTableAction("onFilterDialogOpen"),H.props.options.onFilterDialogOpen&&H.props.options.onFilterDialogOpen()),Oe===void 0&&ze==="filter"&&(H.props.setTableAction("onFilterDialogClose"),H.props.options.onFilterDialogClose&&H.props.options.onFilterDialogClose())})},H.isSearchShown=function(xe){var Ce=!1;
30if(H.state.showSearch)if(H.state.searchText)Ce=!0;else{var Oe=H.props.options.onSearchClose;H.props.setTableAction("onSearchClose"),Oe&&Oe(),Ce=!1}else xe==="search"&&(Ce=H.showSearch());return Ce},H.getActiveIcon=function(xe,Ce){var Oe=H.state.iconActive===Ce;if(Ce==="search"){var ze=H.state,He=ze.showSearch,Je=ze.searchText;Oe=Oe||He||Je}return Oe?xe.iconActive:xe.icon},H.showSearch=function(){return H.props.setTableAction("onSearchOpen"),H.props.options.onSearchOpen&&H.props.options.onSearchOpen(),!0},H.hideSearch=function(){var xe=H.props.options.onSearchClose;H.props.setTableAction("onSearchClose"),xe&&xe(),H.props.searchClose(),H.setState(function(){return{iconActive:null,showSearch:!1,searchText:null}}),H.searchButton.focus()},H.handleSearch=function(xe){H.setState({searchText:xe}),H.props.searchTextUpdate(xe)},H.handleSearchIconClick=function(){var xe=H.state,Ce=xe.showSearch,Oe=xe.searchText;Ce&&!Oe?H.hideSearch():H.setActiveIcon("search")},ge(H,re)}return fe(ce,Le),be(ce,[{key:"componentDidUpdate",value:function(G){this.props.searchText!==G.searchText&&this.setState({searchText:this.props.searchText})}},{key:"render",value:function(){var G=this,re=this.props,H=re.data,je=re.options,_e=re.classes,we=re.columns,xe=re.filterData,Ce=re.filterList,Oe=re.filterUpdate,ze=re.resetFilters,He=re.toggleViewColumn,Je=re.title,ct=(re.tableRef,je.textLabels.toolbar),nt=ct.search,ft=ct.downloadCsv,lt=ct.print,Dt=ct.viewColumns,At=ct.filterTable,Ht=this.state,On=Ht.showSearch,It=Ht.searchText;return d.createElement(N,{className:je.responsive!==si?_e.root:_e.fullWidthRoot,role:"toolbar","aria-label":"Table Toolbar"},d.createElement("div",{className:je.responsive!==si?_e.left:_e.fullWidthLeft},On===!0?je.customSearchRender?je.customSearchRender(It,this.handleSearch,this.hideSearch,je):d.createElement(Ri,{searchText:It,onSearch:this.handleSearch,onHide:this.hideSearch,options:je}):typeof Je!="string"?Je:d.createElement("div",{className:_e.titleRoot,"aria-hidden":"true"},d.createElement(p,{variant:"h6",className:je.responsive!==si?_e.titleText:_e.fullWidthTitleText},Je))),d.createElement("div",{className:je.responsive!==si?_e.actions:_e.fullWidthActions},je.search&&d.createElement(C,{title:nt,disableFocusListener:!0},d.createElement(v,{"aria-label":nt,"data-testid":nt+"-iconButton",buttonRef:function(Yt){return G.searchButton=Yt},classes:{root:this.getActiveIcon(_e,"search")},onClick:this.handleSearchIconClick},d.createElement(X,null))),je.download&&d.createElement(C,{title:ft},d.createElement(v,{"data-testid":ft+"-iconButton","aria-label":ft,classes:{root:_e.icon},onClick:this.handleCSVDownload},d.createElement(W,null))),je.print&&d.createElement("span",null,d.createElement(ie,{trigger:function(){return d.createElement("span",null,d.createElement(C,{title:lt},d.createElement(v,{"data-testid":lt+"-iconButton","aria-label":lt,classes:{root:_e.icon}},d.createElement(K,null))))},content:function(){return G.props.tableRef()}})),je.viewColumns&&d.createElement(sr,{refExit:this.setActiveIcon.bind(null),trigger:d.createElement(C,{title:Dt,disableFocusListener:!0},d.createElement(v,{"data-testid":Dt+"-iconButton","aria-label":Dt,classes:{root:this.getActiveIcon(_e,"viewcolumns")},onClick:this.setActiveIcon.bind(null,"viewcolumns")},d.createElement(z,null))),content:d.createElement(pr,{data:H,columns:we,options:je,onColumnUpdate:He})}),je.filter&&d.createElement(sr,{refExit:this.setActiveIcon.bind(null),classes:{paper:_e.filterPaper},trigger:d.createElement(C,{title:At,disableFocusListener:!0},d.createElement(v,{"data-testid":At+"-iconButton","aria-label":At,classes:{root:this.getActiveIcon(_e,"filter")},onClick:this.setActiveIcon.bind(null,"filter")},d.createElement(Y,null))),content:d.createElement(Hi,{customFooter:je.customFilterDialogFooter,columns:we,options:je,filterList:Ce,filterData:xe,onFilterUpdate:Oe,onFilterReset:ze})}),je.customToolbar&&je.customToolbar()))}}]),ce})(d.Component),ha=r.withStyles(Ya,{name:"MUIDataTableToolbar"})(ua),fr=function(Le){return{root:{backgroundColor:Le.palette.background.default,flex:"1 1 100%",display:"flex",position:"relative",zIndex:120,justifyContent:"space-between",alignItems:"center",paddingTop:typeof Le.spacing=="function"?Le.spacing(1):Le.spacing.unit,paddingBottom:typeof Le.spacing=="function"?Le.spacing(1):Le.spacing.unit},title:{paddingLeft:"26px"},iconButton:{marginRight:"24px"},deleteIcon:{}}},Ka=(function(Le){function ce(){var G,re,H;pe(this,ce);for(var je=arguments.length,_e=Array(je),we=0;we<je;we++)_e[we]=arguments[we];return re=H=ge(this,(G=ce.__proto__||Object.getPrototypeOf(ce)).call.apply(G,[this].concat(_e))),H.handleCustomSelectedRows=function(xe){if(!Array.isArray(xe))throw new TypeError(`"selectedRows" must be an "array", but it's "`+(xe===void 0?"undefined":ve(xe))+'"');if(xe.some(function(Oe){return typeof Oe!="number"}))throw new TypeError('Array "selectedRows" must contain only numbers');var Ce=H.props.options;if(xe.length>1&&Ce.selectableRows==="single")throw new Error('Can not select more than one row when "selectableRows" is "single"');H.props.selectRowUpdate("custom",xe)},ge(H,re)}return fe(ce,Le),be(ce,[{key:"render",value:function(){var G=this.props,re=G.classes,H=G.onRowsDelete,je=G.selectedRows,_e=G.options,we=G.displayData,xe=_e.textLabels.selectedRows;return d.createElement(t,{className:re.root},d.createElement("div",null,d.createElement(p,{variant:"subtitle1",className:re.title},je.data.length," ",xe.text)),_e.customToolbarSelect?_e.customToolbarSelect(je,we,this.handleCustomSelectedRows):d.createElement(C,{title:xe.delete},d.createElement(v,{className:re.iconButton,onClick:H,"aria-label":xe.deleteAria},d.createElement(ne,{className:re.deleteIcon}))))}}]),ce})(d.Component),Oi=r.withStyles(fr,{name:"MUIDataTableToolbarSelect"})(Ka),Yi=function(){return{body:{noMatch:"Sorry, no matching records foun
30d",toolTip:"Sort"},pagination:{next:"Next Page",previous:"Previous Page",rowsPerPage:"Rows per page:",displayRows:"of"},toolbar:{search:"Search",downloadCsv:"Download CSV",print:"Print",viewColumns:"View Columns",filterTable:"Filter Table"},filter:{all:"All",title:"FILTERS",reset:"RESET"},viewColumns:{title:"Show Columns",titleAria:"Show/Hide Table Columns"},selectedRows:{text:"row(s) selected",delete:"Delete",deleteAria:"Delete Selected Rows"}}},_a=function(Le){return{root:{},paper:{},paperResponsiveScrollFullHeightFullWidth:{position:"absolute"},tableRoot:{outline:"none"},responsiveScroll:{overflowX:"auto",overflow:"auto",height:"100%"},responsiveScrollMaxHeight:{overflowX:"auto",overflow:"auto",height:"100%"},responsiveScrollFullHeight:{height:"100%"},responsiveStacked:ye({overflowX:"auto",overflow:"auto"},Le.breakpoints.down("sm"),{overflowX:"hidden",overflow:"hidden"}),responsiveStackedFullWidth:{},caption:{position:"absolute",left:"-3000px"},liveAnnounce:{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"},"@global":{"@media print":{".datatables-noprint":{display:"none"}}}}},Xr={INITIAL:1,UPDATE:2},Ai=["title","filter","search","print","download","viewColumns","customToolbar"],Xa=function(Le,ce){return Le.title=ce,!c(l(Ai,function(G){return Le[G]}))},pi=(function(Le){function ce(){pe(this,ce);var G=ge(this,(ce.__proto__||Object.getPrototypeOf(ce)).call(this));return G.state={announceText:null,activeColumn:null,data:[],displayData:[],page:0,rowsPerPage:0,count:0,columns:[],filterData:[],filterList:[],selectedRows:{data:[],lookup:{}},previousSelectedRow:null,expandedRows:{data:[],lookup:{}},showResponsive:!1,searchText:null},G.getDefaultOptions=function(){return{responsive:"stacked",filterType:"dropdown",pagination:!0,textLabels:Yi(),serverSideFilterList:[],expandableRows:!1,expandableRowsOnClick:!1,resizableColumns:!1,selectableRows:"multiple",selectableRowsOnClick:!1,selectableRowsHeader:!0,caseSensitive:!1,disableToolbarSelect:!1,serverSide:!1,rowHover:!0,elevation:4,rowsPerPage:10,rowsPerPageOptions:[10,15,100],filter:!0,fixedHeaderOptions:{xAxis:!0,yAxis:!0},sortFilterList:!0,sort:!0,search:!0,print:!0,viewColumns:!0,download:!0,downloadOptions:{filename:"tableDownload.csv",separator:","},setTableProps:function(){return{}}}},G.handleOptionDeprecation=function(){typeof G.options.selectableRows=="boolean"&&(G.options.selectableRows=G.options.selectableRows?"multiple":"none"),["scrollMaxHeight","scrollFullHeight","stacked","stackedFullWidth","scrollFullHeightFullWidth"].indexOf(G.options.responsive),G.options.responsive,G.options.fixedHeader===!1||G.options.fixedHeader,G.props.columns.map(function(re){re.options&&re.options.customFilterListRender})},G.setTableAction=function(re){typeof G.options.onTableChange=="function"&&G.options.onTableChange(re,G.state)},G.setTableInit=function(re){typeof G.options.onTableInit=="function"&&G.options.onTableInit(re,G.state)},G.setHeadCellRef=function(re,H){G.headCellRefs[re]=H},G.getTableContentRef=function(){return G.tableContent.current},G.buildColumns=function(re,H){var je=[],_e=[],we=[],xe=!1;return re.forEach(function(Ce,Oe){var ze={display:"true",empty:!1,filter:!0,sort:!0,print:!0,searchable:!0,download:!0,viewColumns:!0,sortDirection:"none"},He=ke({},Ce.options);(Ce===void 0?"undefined":ve(Ce))==="object"?(He&&(He.display!==void 0&&(He.display=He.display.toString()),He.sortDirection===null&&(He.sortDirection="none"),He.sortDirection!==void 0&&He.sortDirection!=="none"&&(xe?He.sortDirection="none":xe=!0)),He.display===void 0&&H[Oe]&&H[Oe].name===Ce.name&&H[Oe].display&&(He.display=H[Oe].display),He.sortDirection===void 0&&H[Oe]&&H[Oe].name===Ce.name&&H[Oe].sortDirection&&(He.sortDirection=H[Oe].sortDirection),ze=ke({name:Ce.name,label:Ce.label?Ce.label:Ce.name},ze,He)):(H[Oe]&&H[Oe].display&&(He.display=H[Oe].display),H[Oe]&&H[Oe].sortDirection&&(He.sortDirection=H[Oe].sortDirection),ze=ke({},ze,He,{name:Ce,label:Ce})),je.push(ze),_e[Oe]=[],we[Oe]=[]}),{columns:je,filterData:_e,filterList:we}},G.transformData=function(re,H){var je=Array.isArray(H[0])?H.map(function(_e){var we=-1;return re.map(function(xe){return xe.empty||we++,xe.empty?void 0:_e[we]})}):H.map(function(_e){return re.map(function(we){return xe=_e,we.name.split(".").reduce(function(Ce,Oe){return Ce?Ce[Oe]:void 0},xe);var xe})});return je.filter(function(_e){return _e.filter(function(we){return(we===void 0?"undefined":ve(we))==="object"&&we!==null&&!Array.isArray(we)}).length>0}).length,je},G.hasSearchText=function(re,H,je){var _e=re.toString(),we=H.toString();return je||(we=we.toLowerCase(),_e=_e.toLowerCase()),_e.indexOf(we)>=0},G.updateDataCol=function(re,H,je){G.setState(function(_e){var we=o(_e.data),xe=o(_e.filterData),Ce=G.getTableMeta(re,H,re,_e.columns[H],_e.data,_e),Oe=_e.columns[H].customBodyRender(je,Ce),ze=d.isValidElement(Oe)&&Oe.props.value?Oe.props.value:_e.data[re][H],He=xe[H].indexOf(ze);if(xe[H].splice(He,1,ze),we[re].data[H]=je,G.options.sortFilterList){var Je=Qe();xe[H].sort(Je)}return{data:we,filterData:xe,displayData:G.getDisplayData(_e.columns,we,_e.filterList,_e.searchText)}})},G.getTableMeta=function(re,H,je,_e,we,xe){return xe.columns,xe.data,xe.displayData,xe.filterData,{rowIndex:re,columnIndex:H,columnData:_e,rowData:je,tableData:we,tableState:se(xe,["columns","data","displayData","filterData"])}},G.toggleViewColumn=function(re){G.setState(function(H){var je=o(H.columns);return je[re].display=je[re].display==="true"?"false":"true",{columns:je}},function(){G.setTableAction("columnViewChange"),G.options.onColumnViewChange&&G.options.onColumnViewChange(G.state.columns[re].name,G.state.columns[re].display==="true"?"add":"remove")})},G.toggleSortColumn=function(re){G.setState(function(H){for(var je=o(H.columns),_e=H.data,we=je[re].sortDirection==="desc"?"asc":"desc",xe=0;xe<je.length;xe++)je[xe].sortDirection=re!==xe?"none":we;var Ce=G.getSortDirection(je[re]),Oe={columns:je,announceText:"Table now sorted by "+je[re].name+" : "+Ce,activeColumn:re};if(G.options.serverSide)Oe=ke({},Oe,{data:H.data,displayData:H.displayData,selectedRows:H.selectedRows});else{var ze=G.sortTable(_e,re,we);Oe=ke({},Oe,{data:ze.data,displayData:G.getDisplayData(je,ze.data,H.filterList,H.searchText),selectedRows:ze.selectedRows,previousSelectedRow:null})}return Oe},function(){G.setTableAction("sort"),G.options.onColumnSortChange&&G.options.onColumnSortChange(G.state.columns[re].name,G.getSortDirection(G.state.columns[re]))})},G.changeRowsPerPage=function(re){var H=G.options.count||G.state.displayData.length;G.setState(function(){return{rowsPerPage:re,page:bt(H,re,G.state.page)}},function(){G.setTableAction("changeRowsPerPage"),G.options.onChangeRowsPerPage&&G.options.onChangeRowsPerPage(G.state.rowsPerPage)})},G.changePage=function(re){G.setState(function(){return{page:re}},function(){G.setTableAction("changePage"),G.options.onChangePage&&G.options.onChangePage(G.state.page)})},G.searchClose=function(){G.setState(function(re){return{searchText:null,displayData:G.options.serverSide?re.displayData:G.getDisplayData(re.columns,re.data,re.filterList,null)}},function(){G.setTableAction("search"),G.options.onSearchChange&&G.options.onSearchChange(G.state.searchText)})},G.searchTextUpdate=function(re){G.setState(function(H){return{searchText:re&&re.length?re:null,page:0,displayData:G.options.serverSide?H.displayData:G.getDisplayData(H.columns,H.data,H.filterList,re)}},function(){G.setTableAction("search"),G.options.onSearchChange&&G.options.onSearchChange(G.state.searchText)})},G.resetFilters=function(){G.setState(function(re){var H=re.columns.map(function(){return[]});return{filterList:H,displayData:G.options.serverSide?re.displayData:G.getDisplayData(re.columns,re.data,H,re.searchText)}},function(){G.setTableAction("resetFilters"),G.options.onFilterChange&&G.options.onFilterChange(null,G.state.filterList,"reset")})},G.filterUpdate=function(re,H,je,_e,we){G.setState(function(xe){var Ce=xe.filterList.slice(0),Oe=Ce[re].indexOf(H);switch(_e){case"checkbox":case"chip":Oe>=0?Ce[re].splice(Oe,1):Ce[re].push(H);break;case"multiselect":Ce[re]=H===""?[]:H;break;case"dropdown":Ce[re]=H;break;
30case"custom":we?Ce=we(Ce,Oe,re):Ce[re]=H;break;default:Ce[re]=Oe>=0||H===""?[]:[H]}return{page:0,filterList:Ce,displayData:G.options.serverSide?xe.displayData:G.getDisplayData(xe.columns,xe.data,Ce,xe.searchText),previousSelectedRow:null}},function(){G.setTableAction("filterChange"),G.options.onFilterChange&&G.options.onFilterChange(je,G.state.filterList,_e)})},G.selectRowDelete=function(){var re=G.state,H=re.selectedRows,je=re.data,_e=re.filterList,we=et(H.data),xe=je.filter(function(Ce){var Oe=Ce.index;return!we[Oe]});G.options.onRowsDelete&&G.options.onRowsDelete(H)===!1||G.setTableData({columns:G.props.columns,data:xe,options:{filterList:_e}},Xr.UPDATE,!0,function(){G.setTableAction("rowDelete")})},G.toggleExpandRow=function(re){for(var H=re.dataIndex,je=G.options.isRowExpandable,_e=G.state.expandedRows,we=[].concat(ae(_e.data)),xe=!1,Ce=!1,Oe=[],ze=0;ze<we.length;ze++)if(we[ze].dataIndex===H){xe=!0;break}xe?(je&&je(H,_e)||!je)&&(Oe=we.splice(ze,1),Ce=!0):je&&je(H,_e)?we.push(re):je||we.push(re),G.setState({curExpandedRows:Ce?Oe:[re],expandedRows:{lookup:et(we),data:we}},function(){G.setTableAction("expandRow"),G.options.onRowsExpand&&G.options.onRowsExpand(G.state.curExpandedRows,G.state.expandedRows.data)})},G.selectRowUpdate=function(re,H){var je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],_e=G.options.selectableRows;if(_e!=="none"){if(re==="head"){var we=G.options.isRowSelectable;G.setState(function(ze){var He=ze.displayData,Je=ze.selectedRows,ct=ze.selectedRows.data.length,nt=ct===He.length||ct<He.length&&ct>0,ft=He.reduce(function(Ht,On,It){return(!we||we(He[It].dataIndex,Je))&&Ht.push({index:It,dataIndex:He[It].dataIndex}),Ht},[]),lt=[].concat(ae(ft)),Dt=et(lt);if(G.options.disableToolbarSelect===!0)if(ct>He.length)nt=!0;else for(var At=0;At<He.length;At++)Dt[He[At].dataIndex]||(nt=!0);return nt&&(lt=ze.selectedRows.data.filter(function(Ht){var On=Ht.dataIndex;return!Dt[On]}),Dt=et(lt)),{curSelectedRows:lt,selectedRows:{data:lt,lookup:Dt},previousSelectedRow:null}},function(){G.setTableAction("rowsSelect"),G.options.onRowsSelect&&G.options.onRowsSelect(G.state.curSelectedRows,G.state.selectedRows.data)})}else if(re==="cell")G.setState(function(ze){for(var He=H.dataIndex,Je=[].concat(ae(ze.selectedRows.data)),ct=-1,nt=0;nt<Je.length;nt++)if(Je[nt].dataIndex===He){ct=nt;break}if(ct>=0){if(Je.splice(ct,1),je.length>0)for(var ft=et(je),lt=Je.length-1;lt>=0;lt--)ft[Je[lt].dataIndex]&&Je.splice(lt,1)}else if(_e==="single")Je=[H];else if(Je.push(H),je.length>0){var Dt=et(Je);je.forEach(function(At){Dt[At.dataIndex]||Je.push(At)})}return{selectedRows:{lookup:et(Je),data:Je},previousSelectedRow:H}},function(){G.setTableAction("rowsSelect"),G.options.onRowsSelect&&G.options.onRowsSelect([H],G.state.selectedRows.data)});else if(re==="custom"){var xe=G.state.displayData,Ce=H.map(function(ze){return{index:ze,dataIndex:xe[ze].dataIndex}}),Oe=et(Ce);G.setState({selectedRows:{data:Ce,lookup:Oe},previousSelectedRow:null},function(){G.setTableAction("rowsSelect"),G.options.onRowsSelect&&G.options.onRowsSelect(G.state.selectedRows.data,G.state.selectedRows.data)})}}},G.tableRef=!1,G.tableContent=d.createRef(),G.headCellRefs={},G.setHeadResizeable=function(){},G.updateDividers=function(){},G}return fe(ce,Le),be(ce,[{key:"UNSAFE_componentWillMount",value:function(){this.initializeTable(this.props)}},{key:"componentDidMount",value:function(){this.setHeadResizeable(this.headCellRefs,this.tableRef),this.props.options.searchText&&!this.props.options.serverSide&&this.setState({page:0})}},{key:"componentDidUpdate",value:function(G){var re=this;if(this.props.data!==G.data||this.props.columns!==G.columns||this.props.options!==G.options){this.updateOptions(this.options,this.props);var H=this.props.data!==G.data;this.props.data&&G.data&&(H=H&&this.props.data.length===G.data.length),this.setTableData(this.props,Xr.INITIAL,H,function(){re.setTableAction("propsUpdate")})}this.props.options.searchText===G.options.searchText||this.props.options.serverSide||this.setState({page:0}),this.options.resizableColumns&&(this.setHeadResizeable(this.headCellRefs,this.tableRef),this.updateDividers())}},{key:"updateOptions",value:function(G,re){this.options=s(G,re.options,function(H,je,_e){if(_e==="textLabels"||_e==="downloadOptions")return h(H,je)}),this.handleOptionDeprecation()}},{key:"initializeTable",value:function(G){var re=this;this.mergeDefaultOptions(G),this.setTableOptions(),this.setTableData(G,Xr.INITIAL,!0,function(){re.setTableInit("tableInitialized")})}},{key:"mergeDefaultOptions",value:function(G){var re=this.getDefaultOptions();this.updateOptions(re,this.props)}},{key:"validateOptions",value:function(G){if(G.serverSide&&G.onTableChange===void 0)throw Error("onTableChange callback must be provided when using serverSide option");if(G.expandableRows&&G.renderExpandableRow===void 0)throw Error("renderExpandableRow must be provided when using expandableRows option");this.props.options.filterList}},{key:"setTableOptions",value:function(){var G=this,re=["rowsPerPage","page","rowsSelected","rowsPerPageOptions"].reduce(function(H,je){return G.options[je]!==void 0&&(H[je]=G.options[je]),H},{});this.validateOptions(re),this.setState(re)}},{key:"setTableData",value:function(G,re,H){var je=this,_e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:function(){},we=[],xe=this.buildColumns(G.columns,this.state.columns),Ce=xe.columns,Oe=xe.filterData,ze=xe.filterList,He=null,Je="none",ct=void 0,nt=re===Xr.INITIAL?this.transformData(Ce,G.data):G.data,ft=re===Xr.INITIAL?this.options.searchText:null;this.options.searchText===void 0&&this.state.searchText!==void 0&&(ft=this.state.searchText),Ce.forEach(function(It,Yt){for(var Kt=0;Kt<nt.length;Kt++){var nr=re===Xr.INITIAL?nt[Kt][Yt]:nt[Kt].data[Yt];if(we[Kt]===void 0&&we.push({index:re===Xr.INITIAL?Kt:nt[Kt].index,data:re===Xr.INITIAL?nt[Kt]:nt[Kt].data}),typeof It.customBodyRender=="function"){var Qn=we[Kt].data;ct=je.getTableMeta(Kt,Yt,Qn,It,nt,je.state);var Vn=It.customBodyRender(nr,ct);d.isValidElement(Vn)&&Vn.props.value?nr=Vn.props.value:typeof Vn=="str
30ing"&&(nr=Vn)}Oe[Yt].indexOf(nr)<0&&!Array.isArray(nr)?Oe[Yt].push(nr):Array.isArray(nr)&&nr.forEach(function(Ea){Oe[Yt].indexOf(Ea)<0&&Oe[Yt].push(Ea)})}if(It.filterOptions&&(Array.isArray(It.filterOptions)?Oe[Yt]=o(It.filterOptions):Array.isArray(It.filterOptions.names)&&(Oe[Yt]=o(It.filterOptions.names))),It.filterList?ze[Yt]=o(It.filterList):je.state.filterList&&je.state.filterList[Yt]&&je.state.filterList[Yt].length>0&&(ze[Yt]=o(je.state.filterList[Yt])),je.options.sortFilterList){var $i=Qe();Oe[Yt].sort($i)}It.sortDirection!=="none"&&(He=Yt,Je=It.sortDirection)});var lt={data:[],lookup:{}},Dt={data:[],lookup:{}};{if(this.options.rowsSelected&&this.options.rowsSelected.length&&this.options.selectableRows==="multiple")this.options.rowsSelected.forEach(function(It){for(var Yt=It,Kt=0;Kt<je.state.displayData.length;Kt++)if(je.state.displayData[Kt].dataIndex===It){Yt=Kt;break}lt.data.push({index:Yt,dataIndex:It}),lt.lookup[It]=!0});else if(this.options.rowsSelected&&this.options.rowsSelected.length===1&&this.options.selectableRows==="single"){for(var At=this.options.rowsSelected[0],Ht=0;Ht<this.state.displayData.length;Ht++)if(this.state.displayData[Ht].dataIndex===this.options.rowsSelected[0]){At=Ht;break}lt.data.push({index:At,dataIndex:this.options.rowsSelected[0]}),lt.lookup[this.options.rowsSelected[0]]=!0}else this.options.rowsSelected&&this.options.rowsSelected.length>1&&this.options.selectableRows==="single"||this.options.rowsSelected===void 0&&H===!1&&this.state.selectedRows&&(lt=Object.assign({},this.state.selectedRows));this.options.rowsExpanded&&this.options.rowsExpanded.length&&this.options.expandableRows?this.options.rowsExpanded.forEach(function(It){for(var Yt=It,Kt=0;Kt<je.state.displayData.length;Kt++)if(je.state.displayData[Kt].dataIndex===It){Yt=Kt;break}Dt.data.push({index:Yt,dataIndex:It}),Dt.lookup[It]=!0}):this.options.rowsExpanded===void 0&&H===!1&&this.state.expandedRows&&(Dt=Object.assign({},this.state.expandedRows))}if(!this.options.serverSide&&He!==null){var On=this.sortTable(we,He,Je);we=On.data}this.setState({columns:Ce,filterData:Oe,filterList:ze,searchText:ft,selectedRows:lt,expandedRows:Dt,count:this.options.count,data:we,displayData:this.getDisplayData(Ce,we,ze,ft,ct)},_e)}},{key:"computeDisplayRow",value:function(G,re,H,je,_e,we,xe){for(var Ce=this,Oe=!1,ze=!1,He=[],Je=function(lt){var Dt=re[lt],At=re[lt],Ht=G[lt];if(Ht.customBodyRender){var On=Ce.getTableMeta(H,lt,re,Ht,we,ke({},Ce.state,{filterList:je,searchText:_e})),It=Ht.customBodyRender(At,On,Ce.updateDataCol.bind(null,H,lt));Dt=It,At=typeof It!="string"&&It?It.props&&It.props.value?It.props.value:At:It}He.push(Dt);var Yt=At==null?"":At.toString(),Kt=je[lt],nr=xe.caseSensitive,Qn=Ht.filterType||xe.filterType;(Kt.length||Qn==="custom")&&(Ht.filterOptions&&Ht.filterOptions.logic?Ht.filterOptions.logic(At,Kt)&&(Oe=!0):Qn!=="textField"||Ce.hasSearchText(Yt,Kt,nr)?Qn!=="textField"&&Array.isArray(At)===!1&&Kt.indexOf(At)<0?Oe=!0:Qn!=="textField"&&Array.isArray(At)&&(Kt.every(function(Vn){return At.indexOf(Vn)>=0})||(Oe=!0)):Oe=!0),_e&&Ce.hasSearchText(Yt,_e,nr)&&Ht.display!=="false"&&Ht.searchable&&(ze=!0)},ct=0;ct<re.length;ct++)Je(ct);var nt=this.props.options.customSearch;if(_e&&nt){var ft=nt(_e,re,G);typeof ft!="boolean"||(ze=ft)}return xe.serverSide?He:Oe||_e&&!ze?null:He}},{key:"getDisplayData",value:function(G,re,H,je,_e){for(var we=[],xe=_e?_e.tableData:this.props.data,Ce=0;Ce<re.length;Ce++){var Oe=re[Ce].data,ze=this.computeDisplayRow(G,Oe,Ce,H,je,xe,this.options);ze&&we.push({data:ze,dataIndex:re[Ce].index})}return we}},{key:"getSortDirection",value:function(G){return G.sortDirection==="asc"?"ascending":"descending"}},{key:"getTableProps",value:function(){var G=this.props.classes,re=this.options.setTableProps();return re.className=a(G.tableRoot,re.className),re}},{key:"sortTable",value:function(G,re,H){var je=this,_e=this.options.customSort?this.options.customSort(G,re,H||"desc"):G,we=_e.map(function(He,Je){return{data:He.data[re],rowData:He.data,position:Je,rowSelected:!!je.state.selectedRows.lookup[He.index]}});
30this.options.customSort||we.sort(tt(H));for(var xe=[],Ce=[],Oe=0;Oe<we.length;Oe++){var ze=we[Oe];xe.push(_e[ze.position]),ze.rowSelected&&Ce.push({index:Oe,dataIndex:_e[ze.position].index})}return{data:xe,selectedRows:{lookup:et(Ce),data:Ce}}}},{key:"render",value:function(){var G=this,re=this.props,H=re.classes,je=re.className,_e=re.title,we=this.state,xe=we.announceText,Ce=we.activeColumn,Oe=we.data,ze=we.displayData,He=we.columns,Je=we.page,ct=we.filterData,nt=we.filterList,ft=we.selectedRows,lt=we.previousSelectedRow,Dt=we.expandedRows,At=we.searchText,Ht=(we.serverSideFilterList,this.state.count||ze.length),On=this.options.pagination?this.state.rowsPerPage:ze.length,It=Xa(this.options,_e),Yt=He.map(function(Fn){return{name:Fn.name,filterType:Fn.filterType||G.options.filterType}}),Kt=this.options.responsive,nr=H.paper+" "+je,Qn=void 0,Vn=void 0;switch(Kt){case"scroll":Vn=H.responsiveScroll,Qn="499px";break;case"scrollMaxHeight":Vn=H.responsiveScrollMaxHeight,Qn="499px";break;case"scrollFullHeight":Vn=H.responsiveScrollFullHeight,Qn="none";break;case"scrollFullHeightFullWidth":Vn=H.responsiveScrollFullHeight,nr=H.paperResponsiveScrollFullHeightFullWidth+" "+je;break;case"stacked":Vn=H.responsiveStacked,Qn="none";break;case"stackedFullWidth":Vn=H.responsiveStackedFullWidth,nr=H.paperResponsiveScrollFullHeightFullWidth+" "+je,Qn="none"}var $i=this.options.setTableProps?this.options.setTableProps():{},Ea=a(H.tableRoot,$i.className);return delete $i.className,d.createElement(t,{elevation:this.options.elevation,ref:this.tableContent,className:nr},ft.data.length&&this.options.disableToolbarSelect!==!0?d.createElement(Oi,{options:this.options,selectedRows:ft,onRowsDelete:this.selectRowDelete,displayData:ze,selectRowUpdate:this.selectRowUpdate}):It&&d.createElement(ha,{columns:He,displayData:ze,data:Oe,filterData:ct,filterList:nt,filterUpdate:this.filterUpdate,options:this.options,resetFilters:this.resetFilters,searchText:At,searchTextUpdate:this.searchTextUpdate,searchClose:this.searchClose,tableRef:this.getTableContentRef,title:_e,toggleViewColumn:this.toggleViewColumn,setTableAction:this.setTableAction}),d.createElement($t,{options:this.options,serverSideFilterList:this.props.options.serverSideFilterList||[],filterListRenderers:He.map(function(Fn){return Fn.customFilterListOptions&&Fn.customFilterListOptions.render?Fn.customFilterListOptions.render:Fn.customFilterListRender?Fn.customFilterListRender:function(ue){return ue}}),customFilterListUpdate:He.map(function(Fn){return Fn.customFilterListOptions&&Fn.customFilterListOptions.update?Fn.customFilterListOptions.update:null}),filterList:nt,filterUpdate:this.filterUpdate,columnNames:Yt}),d.createElement("div",{style:{position:"relative",maxHeight:Qn},className:Vn},this.options.resizableColumns&&d.createElement(tr,{key:Ht,updateDividers:function(Fn){return G.updateDividers=Fn},setResizeable:function(Fn){return G.setHeadResizeable=Fn}}),d.createElement(i,ke({ref:function(Fn){return G.tableRef=Fn},tabIndex:"0",role:"grid",className:Ea},$i),d.createElement("caption",{className:H.caption},_e),d.createElement(yt,{columns:He,activeColumn:Ce,data:ze,count:Ht,page:Je,rowsPerPage:On,handleHeadUpdateRef:function(Fn){return G.updateToolbarSelect=Fn},selectedRows:ft,selectRowUpdate:this.selectRowUpdate,toggleSort:this.toggleSortColumn,setCellRef:this.setHeadCellRef,options:this.options}),d.createElement(Pt,{data:ze,count:Ht,columns:He,page:Je,rowsPerPage:On,selectedRows:ft,selectRowUpdate:this.selectRowUpdate,previousSelectedRow:lt,expandedRows:Dt,toggleExpandRow:this.toggleExpandRow,options:this.options,filterList:nt}))),d.createElement(Gn,{options:this.options,page:Je,rowCount:Ht,rowsPerPage:On,changeRowsPerPage:this.changeRowsPerPage,changePage:this.changePage}),d.createElement("div",{className:H.liveAnnounce,"aria-live":"polite"},xe))}}]),ce})(d.Component);pi.defaultProps={title:"",options:{},data:[],columns:[]};var Er=r.withStyles(_a,{name:"MUIDataTable"})(pi);function Ca(Le,ce,G){var re;return function(){var H=this,je=arguments;clearTimeout(re),re=setTimeout(function(){re=null,Le.apply(H,je)},ce)}}var Qa=function(Le){return{main:{display:"flex",flex:"1 0 auto"},searchIcon:{color:Le.palette.text.secondary,marginTop:"10px",marginRight:"8px"},searchText:{flex:"0.8 0"},clearIcon:{"&:hover":{color:Le.palette.error.main}}}},Na=(function(Le){function ce(){var G,re,H;pe(this,ce);for(var je=arguments.length,_e=Array(je),we=0;we<je;we++)_e[we]=arguments[we];return re=H=ge(this,(G=ce.__proto__||Object.getPrototypeOf(ce)).call.apply(G,[this].concat(_e))),H.handleTextChangeWrapper=function(xe){return function(Ce){xe(Ce.target.value)}}
30,H.onKeyDown=function(xe){xe.keyCode===27&&H.props.onHide()},ge(H,re)}return fe(ce,Le),be(ce,[{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.onKeyDown,!1)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.onKeyDown,!1)}},{key:"render",value:function(){var G=this,re=this.props,H=re.classes,je=re.options,_e=re.onHide,we=re.searchText,xe=Ca(function(Ce){G.props.onSearch(Ce)},re.debounceWait);return d.createElement(q,{appear:!0,in:!0,timeout:300},d.createElement("div",{className:H.main},d.createElement(X,{className:H.searchIcon}),d.createElement(V,{className:H.searchText,autoFocus:!0,InputProps:{"data-test-id":je.textLabels.toolbar.search,"aria-label":je.textLabels.toolbar.search},defaultValue:we,onChange:this.handleTextChangeWrapper(xe),fullWidth:!0,inputRef:function(Ce){return G.searchField=Ce},placeholder:je.searchPlaceholder}),d.createElement(v,{className:H.clearIcon,onClick:_e},d.createElement(M,null))))}}]),ce})(d.Component),Mi=r.withStyles(Qa,{name:"MUIDataTableSearch"})(Na);function pa(){var Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:200;return function(ce,G,re,H){return d.createElement(Mi,{searchText:ce,onSearch:G,onHide:re,options:H,debounceWait:Le})}}return Zn.default=Er,Zn.Popover=sr,Zn.TableBodyCell=oe,Zn.TableBody=Pt,Zn.TableBodyRow=Ie,Zn.TableFilter=Hi,Zn.TableFilterList=$t,Zn.TableFooter=Gn,Zn.TableHeadCell=Rn,Zn.TableHead=yt,Zn.TableHeadRow=jt,Zn.TablePagination=qr,Zn.TableResize=tr,Zn.TableSearch=Ri,Zn.TableSelectCell=Xe,Zn.TableToolbar=ha,Zn.TableToolbarSelect=Oi,Zn.TableViewCol=pr,Zn.debounceSearchRender=pa,Zn.DebounceTableSearch=Mi,Zn}var Sue=wue();const _ue=Zt(Sue);function Cue({linkClass:e,to:t,buttonText:r,buttonClass:i,diagnosticId:a}){return n.jsx(Ze,{className:e,to:t,children:n.jsx("button",{type:"button","diagnostic-id":a,className:i,children:r})})}function ps({title:e,data:t,columns:r,options:i,showLinkBtn:a,linkBtnText:s,linkBtnTo:o,linkBtnDiagId:l,refreshAction:c}){return n.jsxs(n.Fragment,{children:[a&&n.jsx(Cue,{linkClass:"invite-user",to:o,buttonText:s,buttonClass:"btn btn-primary",diagnosticId:l}),c&&n.jsx("i",{className:"material-icons refresh-icon",onClick:c,children:"refresh"}),n.jsx(qd,{theme:zte(),children:n.jsx(_ue,{title:e,data:t,columns:r,options:i})})]})}class Nue extends y.Component{componentDidMount(){this.props.getOrgs()}render(){const t={filterType:"dropdown",responsive:window.outerWidth>960?"stacked":"scrollMaxHeight",download:!1,print:!1,selectableRows:"none",rowsPerPage:20,rowsPerPageOptions:[20,50,100]},r=["Org ID","Organization Name","Active Users",{name:"License End Date",options:{customBodyRender:(i,a,s)=>i?Qt(i).format("MMM DD[,] YYYY"):"--"}},"License Status","License Type","Website",{name:"",options:{filter:!1,sort:!1,empty:!0,customBodyRender:(i,a,s)=>n.jsx(Ze,{to:`/admin/orgs/${a.rowData[0]}`,children:n.jsx("i",{className:"material-icons",children:"edit"})})}}];if(this.props.orgs){const a=this.props.orgs.map((s,o)=>[s.id,s.name,s.user_count===0?"":s.user_count,s.license_end_date,s.license_status,s.license_type?.name,s.website]);return n.jsx(ps,{title:"All Organizations",data:a,columns:r,options:t,showLinkBtn:!0,linkBtnText:"Create Organization",linkBtnTo:"/admin/orgs/new",linkBtnDiagId:"org-new-btn",refreshAction:this.props.getOrgs})}else return n.jsx(ps,{title:"All Organizations",data:[],columns:r,options:t,showLinkBtn:!0,linkBtnText:"Create Organization",linkBtnTo:"/admin/orgs/new",linkBtnDiagId:"org-new-btn",refreshAction:this.props.getOrgs})}}const Eue=e=>({user:e.auth.user,orgs:e.admin.organizations}),Tue=Jt(le(Eue,{getOrgs:Zo})(Nue));class kue extends y.Component{componentDidMount(){this.props.getAllUsers()}render(){const t={filterType:"dropdown",responsive:window.outerWidth>960?"stacked":"scrollMaxHeight",download:!1,print:!1,selectableRows:"none",rowsPerPage:20,rowsPerPageOptions:[20,50,100]},r=["User ID","Name","Email","Company",{name:"License End Date",options:{customBodyRender:(i,a,s)=>i?Qt(i).format("MMM DD[,] YYYY"):"--"}},"License Status","License Type",{name:"Last Login",options:{customBodyRender:(i,a,s)=>i?Qt(i).format("MMM DD[,] YYYY"):"--"}},{name:"",options:{filter:!1,sort:!1,empty:!0,customBodyRender:(i,a,s)=>n.jsx(Ze,{to:`/admin/users/${a.rowData[0]}`,children:n.jsx("i",{className:"material-icons",children:"edit"})})}}];if(this.props.allUsers){const a=this.props.allUsers.map(s=>[s.id,`${s.first_name} ${s.last_name}`,s.email,s.company?.name,s.company?.license_end_date,s.company?.license_status,s.company?.license_type?.name,s.last_active_datetime]);return n.jsx(ps,{title:"All Users",data:a,columns:r,options:t,showLinkBtn:!0,linkBtnText:"Create User",linkBtnTo:{pathname:"/admin/users/new",state:{fromUsers:!0}},linkBtnDiagId:"user-new-btn",refreshAction:this.props.getAllUsers})}else return n.jsx(ps,{title:"All Users",data:[],columns:r,options:t,showLinkBtn:!0,linkBtnText:"Create User",linkBtnTo:{pathname:"/admin/users/new",state:{fromUsers:!0}},linkBtnDiagId:"user-new-btn",refreshAction:this.props.getAllUsers})}}const Pue=e=>({user:e.auth.user,allUsers:e.admin.users}),Iue=Jt(le(Pue,{getAllUsers:Hf})(kue));function Due(e){const{getAllPreapprovals:t,user:r,preapprovals:i}=e,a=()=>{t(r.id)};y.useEffect(()=>{a()},[]);const s=i?i.map(c=>[c.id,`${c.first_name} ${c.last_name}`,c.email,c.organization_name,c.status,c.create_datetime]):[],o={filterType:"dropdown",responsive:window.outerWidth>960?"stacked":"scrollMaxHeight",download:!1,print:!1,selectableRows:"none",rowsPerPage:20,rowsPerPageOptions:[20,50,100]},l=["Preapproval ID","Name","Email","Company",{name:"Status",options:{setCellProps:()=>({className:"preapproval-status"})}},{name:"Created Date",options:{customBodyRender:(c,h,u)=>c?Qt(c).format("MMM DD[,] YYYY"):"--"}},{name:"",options:{filter:!1,sort:!1,empty:!0,customBodyRender:(c,h,u)=>
30n.jsx(Ze,{to:`/admin/preapprovals/${h.rowData[0]}`,children:n.jsx("i",{className:"material-icons",children:"edit"})})}}];return n.jsx(ps,{title:"All Active Preapprovals",data:s,columns:l,options:o,showLinkBtn:!0,linkBtnText:"Create Preapproval",linkBtnTo:"/admin/preapprovals/new",linkBtnDiagId:"preapproval-new-btn",refreshAction:a})}const Rue=e=>({user:e.auth&&e.auth.user,preapprovals:e.admin&&e.admin.preapprovals}),Oue=Jt(le(Rue,{getAllPreapprovals:fre})(Due));function Aue(e){const{getAllRelationshipManagers:t,user:r,relationshipManagers:i}=e,a=()=>{t(r.id)};y.useEffect(()=>{a()},[]);const s=i?i.map(c=>[c.id,`${c.first_name} ${c.last_name}`,c.email,c.company?.name,c.status]):[],o={filterType:"dropdown",responsive:window.outerWidth>960?"stacked":"scrollMaxHeight",download:!1,print:!1,selectableRows:"none",rowsPerPage:20,rowsPerPageOptions:[20,50,100]},l=["ID","Name","Email","Company",{name:"Status",options:{setCellProps:()=>({className:"relationship-manager-status"})}},{name:"",options:{filter:!1,sort:!1,empty:!0,customBodyRender:(c,h,u)=>n.jsx(Ze,{to:`/admin/relationshipmanagers/${h.rowData[0]}`,children:n.jsx("i",{className:"material-icons",children:"edit"})})}}];return n.jsx(ps,{title:"All Relationship Managers",data:s,columns:l,options:o,showLinkBtn:!0,linkBtnText:"Add Manager",linkBtnTo:"/admin/relationshipmanagers/new",linkBtnDiagId:"relationship-manager-new-btn",refreshAction:a})}const Mue=e=>({user:e.auth&&e.auth.user,relationshipManagers:e.admin&&e.admin.relationshipManagers}),$ue=Jt(le(Mue,{getAllRelationshipManagers:Gf})(Aue));class Lue extends y.Component{constructor(){super(...arguments),this.state={menuChoice:0},this.getMenuChoice=t=>{this.setState({menuChoice:t})}}componentDidMount(){switch(Ni.parse(this.props.location.search).view){case"orgs":this.setState({menuChoice:1});break;case"preapprovals":this.setState({menuChoice:2});break;case"relationshipmanagers":this.setState({menuChoice:3});break;default:this.setState({menuChoice:0})}}render(){const{isAuthenticated:t}=this.props.auth;return t?n.jsxs("div",{className:"container",children:[n.jsx("h3",{children:"Clearnomics Admin"}),n.jsx("div",{className:"row",children:n.jsx(Xne,{handleChoice:this.getMenuChoice,value:this.state.menuChoice})}),n.jsx("div",{className:"row fadeTransition admin-users-table",style:{display:this.state.menuChoice===0?"block":"none"},children:n.jsx(Iue,{})}),n.jsx("div",{className:"row fadeTransition admin-orgs-table",style:{display:this.state.menuChoice===1?"block":"none"},children:n.jsx(Tue,{})}),n.jsx("div",{className:"row fadeTransition preapproval-admin-table",style:{display:this.state.menuChoice===2?"block":"none"},children:n.jsx(Oue,{})}),n.jsx("div",{className:"row fadeTransition relationship-manager-admin-table",style:{display:this.state.menuChoice===3?"block":"none"},children:n.jsx($ue,{})})]}):null}}const Fue=e=>({auth:e.auth}),Uue=le(Fue,{})(Lue);var Oc={},JE;function Bue(){if(JE)return Oc;JE=1;var e=vn(),t=bn();Object.defineProperty(Oc,"__esModule",{value:!0}),Oc.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"KeyboardArrowLeft");return Oc.default=a,Oc}var que=Bue();const ir=Zt(que);var eT=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Vue(e,t){return!!(e===t||eT(e)&&eT(t))}function zue(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!Vue(e[r],t[r]))return!1;return!0}function jr(e,t){t===void 0&&(t=zue);var r,i=[],a,s=!1;function o(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return s&&r===this&&t(l,i)||(a=e.apply(this,l),s=!0,r=this,i=l),a}return o}function Hue(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function Gue(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}var Wue=(function(){function e(r){this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.before=null}var t=e.prototype;return t.insert=function(i){if(this.ctr%(this.isSpeedy?65e3:1)===0){var a=Gue(this),s;this.tags.length===0?s=this.before:s=this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(a,s),this.tags.push(a)}var o=this.tags[this.tags.length-1];if(this.isSpeedy){var l=Hue(o);
vendor: 15,062 bytes, line 30
30try{var c=i.charCodeAt(1)===105&&i.charCodeAt(0)===64;l.insertRule(i,c?0:l.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(i));this.ctr++},t.flush=function(){this.tags.forEach(function(i){return i.parentNode.removeChild(i)}),this.tags=[],this.ctr=0},e})();function Yue(e){function t(F,q,V,X,M){for(var W=0,K=0,z=0,Y=0,ie,ne,ve=0,pe=0,be,ye=be=ie=0,ke=0,fe=0,se=0,ge=0,De=V.length,ae=De-1,Q,ee="",oe="",Pe="",Fe="",Ie;ke<De;){if(ne=V.charCodeAt(ke),ke===ae&&K+Y+z+W!==0&&(K!==0&&(ne=K===47?10:47),Y=z=W=0,De++,ae++),K+Y+z+W===0){if(ke===ae&&(0<fe&&(ee=ee.replace(p,"")),0<ee.trim().length)){switch(ne){case 32:case 9:case 59:case 13:case 10:break;default:ee+=V.charAt(ke)}ne=59}switch(ne){case 123:for(ee=ee.trim(),ie=ee.charCodeAt(0),be=1,ge=++ke;ke<De;){switch(ne=V.charCodeAt(ke)){case 123:be++;break;case 125:be--;break;case 47:switch(ne=V.charCodeAt(ke+1)){case 42:case 47:e:{for(ye=ke+1;ye<ae;++ye)switch(V.charCodeAt(ye)){case 47:if(ne===42&&V.charCodeAt(ye-1)===42&&ke+2!==ye){ke=ye+1;break e}break;case 10:if(ne===47){ke=ye+1;break e}}ke=ye}}break;case 91:ne++;case 40:ne++;case 34:case 39:for(;ke++<ae&&V.charCodeAt(ke)!==ne;);}if(be===0)break;ke++}switch(be=V.substring(ge,ke),ie===0&&(ie=(ee=ee.replace(d,"").trim()).charCodeAt(0)),ie){case 64:switch(0<fe&&(ee=ee.replace(p,"")),ne=ee.charCodeAt(1),ne){case 100:case 109:case 115:case 45:fe=q;break;default:fe=$}if(be=t(q,fe,be,ne,M+1),ge=be.length,0<B&&(fe=r($,ee,se),Ie=l(3,be,fe,q,I,k,ge,ne,M,X),ee=fe.join(""),Ie!==void 0&&(ge=(be=Ie.trim()).length)===0&&(ne=0,be="")),0<ge)switch(ne){case 115:ee=ee.replace(_,o);case 100:case 109:case 45:be=ee+"{"+be+"}";break;case 107:ee=ee.replace(b,"$1 $2"),be=ee+"{"+be+"}",be=O===1||O===2&&s("@"+be,3)?"@-webkit-"+be+"@"+be:"@"+be;break;default:be=ee+be,X===112&&(be=(oe+=be,""))}else be="";break;default:be=t(q,r(q,ee,se),be,X,M+1)}Pe+=be,be=se=fe=ye=ie=0,ee="",ne=V.charCodeAt(++ke);break;case 125:case 59:if(ee=(0<fe?ee.replace(p,""):ee).trim(),1<(ge=ee.length))switch(ye===0&&(ie=ee.charCodeAt(0),ie===45||96<ie&&123>ie)&&(ge=(ee=ee.replace(" ",":")).length),0<B&&(Ie=l(1,ee,q,F,I,k,oe.length,X,M,X))!==void 0&&(ge=(ee=Ie.trim()).length)===0&&(ee="\0\0"),ie=ee.charCodeAt(0),ne=ee.charCodeAt(1),ie){case 0:break;case 64:if(ne===105||ne===99){Fe+=ee+V.charAt(ke);break}default:ee.charCodeAt(ge-1)!==58&&(oe+=a(ee,ie,ne,ee.charCodeAt(2)))}se=fe=ye=ie=0,ee="",ne=V.charCodeAt(++ke)}}switch(ne){case 13:case 10:K===47?K=0:1+ie===0&&X!==107&&0<ee.length&&(fe=1,ee+="\0"),0<B*A&&l(0,ee,q,F,I,k,oe.length,X,M,X),k=1,I++;break;case 59:case 125:if(K+Y+z+W===0){k++;break}default:switch(k++,Q=V.charAt(ke),ne){case 9:case 32:if(Y+W+K===0)switch(ve){case 44:case 58:case 9:case 32:Q="";break;default:ne!==32&&(Q=" ")}break;case 0:Q="\\0";break;case 12:Q="\\f";break;case 11:Q="\\v";break;case 38:Y+K+W===0&&(fe=se=1,Q="\f"+Q);break;case 108:if(Y+K+W+D===0&&0<ye)switch(ke-ye){case 2:ve===112&&V.charCodeAt(ke-3)===58&&(D=ve);case 8:pe===111&&(D=pe)}break;case 58:Y+K+W===0&&(ye=ke);break;case 44:K+z+Y+W===0&&(fe=1,Q+="\r");break;case 34:case 39:K===0&&(Y=Y===ne?0:Y===0?ne:Y);break;case 91:Y+K+z===0&&W++;break;case 93:Y+K+z===0&&W--;break;case 41:Y+K+W===0&&z--;break;case 40:Y+K+W===0&&(ie===0&&(2*ve+3*pe===533||(ie=1)),z++);break;case 64:K+z+Y+W+ye+be===0&&(be=1);break;case 42:case 47:if(!(0<Y+W+z))switch(K){case 0:switch(2*ne+3*V.charCodeAt(ke+1)){case 235:K=47;break;case 220:ge=ke,K=42}break;case 42:ne===47&&ve===42&&ge+2!==ke&&(V.charCodeAt(ge+2)===33&&(oe+=V.substring(ge,ke+1)),Q="",K=0)}}K===0&&(ee+=Q)}pe=ve,ve=ne,ke++}if(ge=oe.length,0<ge){if(fe=q,0<B&&(Ie=l(2,oe,fe,F,I,k,ge,X,M,X),Ie!==void 0&&(oe=Ie).length===0))return Fe+oe+Pe;if(oe=fe.join(",")+"{"+oe+"}",O*D!==0){switch(O!==2||s(oe,2)||(D=0),D){case 111:oe=oe.replace(w,":-moz-$1")+oe;break;case 112:oe=oe.replace(j,"::-webkit-input-$1")+oe.replace(j,"::-moz-$1")+oe.replace(j,":-ms-input-$1")+oe}D=0}}return Fe+oe+Pe}function r(F,q,V){var X=q.trim().split(x);q=X;var M=X.length,W=F.length;switch(W){case 0:case 1:var K=0;for(F=W===0?"":F[0]+" ";K<M;++K)q[K]=i(F,q[K],V).trim();break;default:var z=K=0;for(q=[];K<M;++K)for(var Y=0;Y<W;++Y)q[z++]=i(F[Y]+" ",X[K],V).trim()}return q}function i(F,q,V){var X=q.charCodeAt(0);switch(33>X&&(X=(q=q.trim()).charCodeAt(0)),X){case 38:return q.replace(v,"$1"+F.trim());case 58:return F.trim()+q.replace(v,"$1"+F.trim());default:if(0<1*V&&0<q.indexOf("\f"))return q.replace(v,(F.charCodeAt(0)===58?"":"$1")+F.trim())}return F+q}function a(F,q,V,X){var M=F+";",W=2*q+3*V+4*X;if(W===944){F=M.indexOf(":",9)+1;var K=M.substring(F,M.length-1).trim();return K=M.substring(0,F).trim()+K+";",O===1||O===2&&s(K,1)?"-webkit-"+K+K:K}if(O===0||O===2&&!s(M,1))return M;switch(W){case 1015:return M.charCodeAt(10)===97?"-webkit-"+M+M:M;case 951:return M.charCodeAt(3)===116?"-webkit-"+M+M:M;case 963:return M.charCodeAt(5)===110?"-webkit-"+M+M:M;case 1009:if(M.charCodeAt(4)!==100)break;case 969:case 942:return"-webkit-"+M+M;case 978:return"-webkit-"+M+"-moz-"+M+M;case 1019:case 983:return"-webkit-"+M+"-moz-"+M+"-ms-"+M+M;case 883:if(M.charCodeAt(8)===45)return"-webkit-"+M+M;if(0<M.indexOf("image-set(",11))return M.replace(N,"$1-webkit-$2")+M;break;case 932:if(M.charCodeAt(4)===45)switch(M.charCodeAt(5)){case 103:return"-webkit-box-"+M.replace("-grow","")+"-webkit-"+M+"-ms-"+M.replace("grow","positive")+M;case 115:return"-webkit-"+M+"-ms-"+M.replace("shrink","negative")+M;case 98:return"-webkit-"+M+"-ms-"+M.replace("basis","preferred-size")+M}return"-webkit-"+M+"-ms-"+M+M;case 964:return"-webkit-"+M+"-ms-flex-"+M+M;case 1023:if(M.charCodeAt(8)!==99)break;return K=M.substring(M.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),"-webkit-box-pack"+K+"-webkit-"+M+"-ms-flex-pack"+K+M;case 1005:return m.test(M)?M.replace(f,":-webkit-")+M.replace(f,":-moz-")+M:M;case 1e3:switch(K=M.substring(13).trim(),q=K.indexOf("-")+1,K.charCodeAt(0)+K.charCodeAt(q)){case 226:K=M.replace(S,"tb");break;case 232:K=M.replace(S,"tb-rl");break;case 220:K=M.replace(S,"lr");break;default:return M}return"-webkit-"+M+"-ms-"+K+M;case 1017:if(M.indexOf("sticky",9)===-1)break;case 975:switch(q=(M=F).length-10,K=(M.charCodeAt(q)===33?M.substring(0,q):M).substring(F.indexOf(":",7)+1).trim(),W=K.charCodeAt(0)+(K.charCodeAt(7)|0)){case 203:if(111>K.charCodeAt(8))break;case 115:M=M.replace(K,"-webkit-"+K)+";"+M;break;case 207:case 102:M=M.replace(K,"-webkit-"+(102<W?"inline-":"")+"box")+";"+M.replace(K,"-webkit-"+K)+";"+M.replace(K,"-ms-"+K+"box")+";"+M}return M+";";case 938:if(M.charCodeAt(5)===45)switch(M.charCodeAt(6)){case 105:return K=M.replace("-items",""),"-webkit-"+M+"-webkit-box-"+K+"-ms-flex-"+K+M;case 115:return"-webkit-"+M+"-ms-flex-item-"+M.replace(E,"")+M;default:return"-webkit-"+M+"-ms-flex-line-pack"+M.replace("align-content","").replace(E,"")+M}break;case 973:case 989:if(M.charCodeAt(3)!==45||M.charCodeAt(4)===122)break;case 931:case 953:if(T.test(F)===!0)return(K=F.substring(F.indexOf(":")+1)).charCodeAt(0)===115?a(F.replace("stretch","fill-available"),q,V,X).replace(":fill-available",":stretch"):M.replace(K,"-webkit-"+K)+M.replace(K,"-moz-"+K.replace("fill-",""))+M;break;case 962:if(M="-webkit-"+M+(M.charCodeAt(5)===102?"-ms-"+M:"")+M,V+X===211&&M.charCodeAt(13)===105&&0<M.indexOf("transform",10))return M.substring(0,M.indexOf(";",27)+1).replace(g,"$1-webkit-$2")+M}return M}function s(F,q){var V=F.indexOf(q===1?":":"{"),X=F.substring(0,q!==3?V:10);return V=F.substring(V+1,F.length-1),L(q!==2?X:X.replace(P,"$1"),V,q)}function o(F,q){var V=a(q,q.charCodeAt(0),q.charCodeAt(1),q.charCodeAt(2));return V!==q+";"?V.replace(C," or ($1)").substring(4):"("+q+")"}function l(F,q,V,X,M,W,K,z,Y,ie){for(var ne=0,ve=q,pe;ne<B;++ne)switch(pe=U[ne].call(u,F,ve,V,X,M,W,K,z,Y,ie)){case void 0:case!1:case!0:case null:break;default:ve=pe}if(ve!==q)return ve}function c(F){switch(F){case void 0:case null:B=U.length=0;break;default:if(typeof F=="function")U[B++]=F;else if(typeof F=="object")for(var q=0,V=F.length;q<V;++q)c(F[q]);else A=!!F|0}return c}function h(F){return F=F.prefix,F!==void 0&&(L=null,F?typeof F!="function"?O=1:(O=2,L=F):O=0),h}function u(F,q){var V=F;if(33>V.charCodeAt(0)&&(V=V.trim()),R=V,V=[R],0<B){var X=l(-1,q,V,V,I,k,0,0,0,0);X!==void 0&&typeof X=="string"&&(q=X)}var M=t($,V,q,0,0);return 0<B&&(X=l(-2,M,V,V,I,k,M.length,0,0,0),X!==void 0&&(M=X)),R="",D=0,k=I=1,M}var d=/^\0+/g,p=/[\0\r\f]/g,f=/: */g,m=/zoo|gra/,g=/([,: ])(transform)/g,x=/,\r+?/g,v=/([\t\r\n ])*\f?&/g,b=/@(k\w+)\s*(\S*)\s*/,j=/::(place)/g,w=/:(read-only)/g,S=/[svh]\w+-[tblr]{2}/,_=/\(\s*(.*)\s*\)/g,C=/([\s\S]*?);/g,E=/-self|flex-/g,P=/[^]*?(:[rp][el]a[\w-]+)[^]*/,T=/stretch|:\s*\w+\-(?:conte|avail)/,N=/([^-])(image-set\()/,k=1,I=1,D=0,O=1,$=[],U=[],B=0,L=null,A=0,R="";return u.use=c,u.set=h,e!==void 0&&h(e),u}var Fx="/*|*/",Kue=Fx+"}";function Xue(e){e&&Xp.current.insert(e+"}")}var Xp={current:null},Que=function(t,r,i,a,s,o,l,c,h,u){switch(t){case 1:{switch(r.charCodeAt(0)){case 64:return Xp.current.insert(r+";"),"";case 108:if(r.charCodeAt(2)===98)return""}break}case 2:{if(c===0)return r+Fx;break}case 3:switch(c){case 102:case 112:return Xp.current.insert(i[0]+r),"";default:return r+(u===0?Fx:"")}case-2:r.split(Kue).forEach(Xue)}},Zue=function(t){t===void 0&&(t={});var r=t.key||"css",i;t.prefix!==void 0&&(i={prefix:t.prefix});var a=new Yue(i),s={},o;{o=t.container||document.head;var l=document.querySelectorAll("style[data-emotion-"+r+"]");Array.prototype.forEach.call(l,function(u){var d=u.getAttribute("data-emotion-"+r);d.split(" ").forEach(function(p){s[p]=!0}),u.parentNode!==o&&o.appendChild(u)})}var c;a.use(t.stylisPlugins)(Que),c=function(d,p,f,m){var g=p.name;Xp.current=f,a(d,p.styles),m&&(h.inserted[g]=!0)};var h={key:r,sheet:new Wue({key:r,container:o,nonce:t.nonce,speedy:t.speedy}),nonce:t.nonce,inserted:s,registered:{},insert:c};return h},Jue=!0;function V2(e,t,r){var i="";return r.split(" ").forEach(function(a){e[a]!==void 0?t.push(e[a]):i+=a+" "}),i}var z2=function(t,r,i){var a=t.key+"-"+r.name;if((i===!1||Jue===!1)&&t.registered[a]===void 0&&(t.registered[a]=r.styles),t.inserted[r.name]===void 0){var s=r;do t.insert("."+a,s,t.sheet,!0),s=s.next;while(s!==void 0)}};function ehe(e){for(var t=0,r,i=0,a=e.length;a>=4;++i,a-=4)r=e.charCodeAt(i)&255|(e.charCodeAt(++i)&255)<<8|(e.charCodeAt(++i)&255)<<16|(e.charCodeAt(++i)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(i+2)&255)<<16;case 2:t^=(e.charCodeAt(i+1)&255)<<8;case 1:t^=e.charCodeAt(i)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var the={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function nhe(e){var t={};return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var rhe=/[A-Z]|^ms/g,ihe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,H2=function(t){return t.charCodeAt(1)===45},tT=function(t){return t!=null&&typeof t!="boolean"},fy=nhe(function(e){return H2(e)?e:e.replace(rhe,"-$&").toLowerCase()}),nT=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(ihe,function(i,a,s){return Os={name:a,styles:s,next:Os},a})}return the[t]!==1&&!H2(t)&&typeof r=="number"&&r!==0?r+"px":r};function Qp(e,t,r,i){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return Os={name:r.name,styles:r.styles,next:Os},r.name;if(r.styles!==void 0){var a=r.next;if(a!==void 0)for(;a!==void 0;)Os={name:a.name,styles:a.styles,next:Os},a=a.next;var s=r.styles+";";return s}return ahe(e,t,r)}}if(t==null)return r;var o=t[r];return o!==void 0&&!i?o:r}function ahe(e,t,r){var i="";if(Array.isArray(r))for(var a=0;a<r.length;a++)i+=Qp(e,t,r[a],!1);else for(var s in r){var o=r[s];if(typeof o!="object")t!=null&&t[o]!==void 0?i+=s+"{"+t[o]+"}":tT(o)&&(i+=fy(s)+":"+nT(s,o)+";");else if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var l=0;l<o.length;l++)tT(o[l])&&(i+=fy(s)+":"+nT(s,o[l])+";");else{var c=Qp(e,t,o,!1);switch(s){case"animation":case"animationName":{i+=fy(s)+":"+c+";";break}default:i+=s+"{"+c+"}"}}}return i}var rT=/label:\s*([^\s;\n{]+)\s*;/g,Os,Zw=function(t,r,i){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var a=!0,s="";Os=void 0;var o=t[0];o==null||o.raw===void 0?(a=!1,s+=Qp(i,r,o,!1)):s+=o[0];for(var l=1;l<t.length;l++)s+=Qp(i,r,t[l],s.charCodeAt(s.length-1)===46),a&&(s+=o[l]);rT.lastIndex=0;for(var c="",h;(h=rT.exec(s))!==null;)c+="-"+h[1];var u=ehe(s)+c;return{name:u,styles:s,next:Os}},Jw=Object.prototype.hasOwnProperty,G2=y.createContext(typeof HTMLElement<"u"?Zue():null),W2=y.createContext({});G2.Provider;var Y2=function(t){var r=function(a,s){return y.createElement(G2.Consumer,null,function(o){return t(a,o,s)})};return y.forwardRef(r)},Ux="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",she=function(t,r){var i={};for(var a in r)Jw.call(r,a)&&(i[a]=r[a]);return i[Ux]=t,i},ohe=function(){return null},iT=function(t,r,i,a){var s=i===null?r.css:r.css(i);typeof s=="string"&&t.registered[s]!==void 0&&(s=t.registered[s]);var o=r[Ux],l=[s],c="";typeof r.className=="string"?c=V2(t.registered,l,r.className):r.className!=null&&(c=r.className+" ");var h=Zw(l);z2(t,h,typeof o=="string"),c+=t.key+"-"+h.name;var u={};for(var d in r)Jw.call(r,d)&&d!=="css"&&d!==Ux&&(u[d]=r[d]);u.ref=a,u.className=c;var p=y.createElement(o,u),f=y.createElement(ohe,null);return y.createElement(y.Fragment,null,f,p)},lhe=Y2(function(e,t,r){return typeof e.css=="function"?y.createElement(W2.Consumer,null,function(i){return iT(t,e,i,r)}):iT(t,e,null,r)});function e0(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Zw(t)}var Vt=function(t,r){var i=arguments;if(r==null||!Jw.call(r,"css"))return y.createElement.apply(void 0,i);var a=i.length,s=new Array(a);s[0]=lhe,s[1]=she(t,r);for(var o=2;o<a;o++)s[o]=i[o];return y.createElement.apply(null,s)},che=function(){var t=e0.apply(void 0,arguments),r="animation-"+t.name;return{name:r,styles:"@keyframes "+r+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},dhe=function e(t){for(var r=t.length,i=0,a="";i<r;i++){var s=t[i];if(s!=null){var o=void 0;switch(typeof s){case"boolean":break;case"object":{if(Array.isArray(s))o=e(s);else{o="";for(var l in s)s[l]&&l&&(o&&(o+=" "),o+=l)}break}default:o=s}
vendor: 11,220 bytes, line 30
30o&&(a&&(a+=" "),a+=o)}}return a};function uhe(e,t,r){var i=[],a=V2(e,i,r);return i.length<2?r:a+t(i)}var hhe=function(){return null},phe=Y2(function(e,t){return y.createElement(W2.Consumer,null,function(r){var i=function(){for(var h=arguments.length,u=new Array(h),d=0;d<h;d++)u[d]=arguments[d];var p=Zw(u,t.registered);return z2(t,p,!1),t.key+"-"+p.name},a=function(){for(var h=arguments.length,u=new Array(h),d=0;d<h;d++)u[d]=arguments[d];return uhe(t.registered,i,dhe(u))},s={css:i,cx:a,theme:r},o=e.children(s),l=y.createElement(hhe,null);return y.createElement(y.Fragment,null,l,o)})});function fhe(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var ch={},aT;function mhe(){if(aT)return ch;aT=1,Object.defineProperty(ch,"__esModule",{value:!0});var e=Object.assign||function(b){for(var j=1;j<arguments.length;j++){var w=arguments[j];for(var S in w)Object.prototype.hasOwnProperty.call(w,S)&&(b[S]=w[S])}return b},t=(function(){function b(j,w){for(var S=0;S<w.length;S++){var _=w[S];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(j,_.key,_)}}return function(j,w,S){return w&&b(j.prototype,w),S&&b(j,S),j}})(),r=Rt(),i=o(r),a=SD(),s=o(a);function o(b){return b&&b.__esModule?b:{default:b}}function l(b,j){var w={};for(var S in b)j.indexOf(S)>=0||Object.prototype.hasOwnProperty.call(b,S)&&(w[S]=b[S]);return w}function c(b,j){if(!(b instanceof j))throw new TypeError("Cannot call a class as a function")}function h(b,j){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j&&(typeof j=="object"||typeof j=="function")?j:b}function u(b,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof j);b.prototype=Object.create(j&&j.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),j&&(Object.setPrototypeOf?Object.setPrototypeOf(b,j):b.__proto__=j)}var d={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},p=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],f=function(j){return p.forEach(function(w){return delete j[w]}),j},m=function(j,w){w.style.fontSize=j.fontSize,w.style.fontFamily=j.fontFamily,w.style.fontWeight=j.fontWeight,w.style.fontStyle=j.fontStyle,w.style.letterSpacing=j.letterSpacing,w.style.textTransform=j.textTransform},g=typeof window<"u"&&window.navigator?/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent):!1,x=function(){return g?"_"+Math.random().toString(36).substr(2,12):void 0},v=(function(b){u(j,b),t(j,null,[{key:"getDerivedStateFromProps",value:function(S,_){var C=S.id;return C!==_.prevId?{inputId:C||x(),prevId:C}:null}}]);function j(w){c(this,j);var S=h(this,(j.__proto__||Object.getPrototypeOf(j)).call(this,w));return S.inputRef=function(_){S.input=_,typeof S.props.inputRef=="function"&&S.props.inputRef(_)},S.placeHolderSizerRef=function(_){S.placeHolderSizer=_},S.sizerRef=function(_){S.sizer=_},S.state={inputWidth:w.minWidth,inputId:w.id||x(),prevId:w.id},S}return t(j,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"componentDidUpdate",value:function(S,_){_.inputWidth!==this.state.inputWidth&&typeof this.props.onAutosize=="function"&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(!(!this.mounted||!window.getComputedStyle)){var S=this.input&&window.getComputedStyle(this.input);S&&(m(S,this.sizer),this.placeHolderSizer&&m(S,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(!(!this.mounted||!this.sizer||typeof this.sizer.scrollWidth>"u")){var S=void 0;this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?S=Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:S=this.sizer.scrollWidth+2;var _=this.props.type==="number"&&this.props.extraWidth===void 0?16:parseInt(this.props.extraWidth)||0;S+=_,S<this.props.minWidth&&(S=this.props.minWidth),S!==this.state.inputWidth&&this.setState({inputWidth:S})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var S=this.props.injectStyles;return g&&S?i.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var S=[this.props.defaultValue,this.props.value,""].reduce(function(P,T){return P??T}),_=e({},this.props.style);_.display||(_.display="inline-block");var C=e({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),E=l(this.props,[]);return f(E),E.className=this.props.inputClassName,E.id=this.state.inputId,E.style=C,i.default.createElement("div",{className:this.props.className,style:_},this.renderStyles(),i.default.createElement("input",e({},E,{ref:this.inputRef})),i.default.createElement("div",{ref:this.sizerRef,style:d},S),this.props.placeholder?i.default.createElement("div",{ref:this.placeHolderSizerRef,style:d},this.props.placeholder):null)}}]),j})(r.Component);return v.propTypes={className:s.default.string,defaultValue:s.default.any,extraWidth:s.default.oneOfType([s.default.number,s.default.string]),id:s.default.string,injectStyles:s.default.bool,inputClassName:s.default.string,inputRef:s.default.func,inputStyle:s.default.object,minWidth:s.default.oneOfType([s.default.number,s.default.string]),onAutosize:s.default.func,onChange:s.default.func,placeholder:s.default.string,placeholderIsMinWidth:s.default.bool,style:s.default.object,value:s.default.any},v.defaultProps={minWidth:1,injectStyles:!0},ch.default=v,ch}var ghe=mhe();const vhe=Zt(ghe);var K2=function(){};function bhe(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function yhe(e,t,r){var i=[r];if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&i.push("".concat(bhe(e,a)));return i.filter(function(s){return s}).map(function(s){return String(s).trim()}).join(" ")}var Zp=function(t){return Array.isArray(t)?t.filter(Boolean):To(t)==="object"&&t!==null?[t]:[]};function t0(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function X2(e){return t0(e)?window.pageYOffset:e.scrollTop}function Jp(e,t){if(t0(e)){window.scrollTo(0,t);return}e.scrollTop=t}function xhe(e){var t=getComputedStyle(e),r=t.position==="absolute",i=/(auto|scroll)/,a=document.documentElement;if(t.position==="fixed")return a;for(var s=e;s=s.parentElement;)if(t=getComputedStyle(s),!(r&&t.position==="static")&&i.test(t.overflow+t.overflowY+t.overflowX))return s;return a}function jhe(e,t,r,i){return r*((e=e/i-1)*e*e+1)+t}function dh(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:K2,a=X2(e),s=t-a,o=10,l=0;function c(){l+=o;var h=jhe(l,a,s,r);Jp(e,h),l<r?window.requestAnimationFrame(c):i(e)}c()}function whe(e,t){var r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=t.offsetHeight/3;i.bottom+a>r.bottom?Jp(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+a,e.scrollHeight)):i.top-a<r.top&&Jp(e,Math.max(t.offsetTop-a,0))}function She(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function sT(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function _he(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}function oT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,i)}return r}function lT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oT(Object(r),!0).forEach(function(i){Ct(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oT(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Q2(e){var t=Che();return function(){var i=wr(e),a;if(t){var s=wr(this).constructor;a=Reflect.construct(i,arguments,s)}else a=i.apply(this,arguments);return js(this,a)}}function Che(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Nhe(e){var t=e.maxHeight,r=e.menuEl,i=e.minHeight,a=e.placement,s=e.shouldScroll,o=e.isFixedPosition,l=e.theme,c=l.spacing,h=xhe(r),u={placement:"bottom",maxHeight:t};if(!r||!r.offsetParent)return u;var d=h.getBoundingClientRect(),p=d.height,f=r.getBoundingClientRect(),m=f.bottom,g=f.height,x=f.top,v=r.offsetParent.getBoundingClientRect(),b=v.top,j=window.innerHeight,w=X2(h),S=parseInt(getComputedStyle(r).marginBottom,10),_=parseInt(getComputedStyle(r).marginTop,10),C=b-_,E=j-x,P=C+w,T=p-w-x,N=m-j+w+S,k=w+x-_,I=160;switch(a){case"auto":case"bottom":if(E>=g)return{placement:"bottom",maxHeight:t};if(T>=g&&!o)return s&&dh(h,N,I),{placement:"bottom",maxHeight:t};if(!o&&T>=i||o&&E>=i){s&&dh(h,N,I);var D=o?E-S:T-S;return{placement:"bottom",maxHeight:D}}if(a==="auto"||o){var O=t,$=o?C:P;return $>=i&&(O=Math.min($-S-c.controlHeight,t)),{placement:"top",maxHeight:O}}if(a==="bottom")return Jp(h,N),{placement:"bottom",maxHeight:t};break;case"top":if(C>=g)return{placement:"top",maxHeight:t};if(P>=g&&!o)return s&&dh(h,k,I),{placement:"top",maxHeight:t};if(!o&&P>=i||o&&C>=i){var U=t;return(!o&&P>=i||o&&C>=i)&&(U=o?C-_:P-_),s&&dh(h,k,I),{placement:"top",maxHeight:U}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(a,'".'))}return u}function Ehe(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var Bx=function(t){return t==="auto"?"bottom":t},The=function(t){var r,i=t.placement,a=t.theme,s=a.borderRadius,o=a.spacing,l=a.colors;return r={label:"menu"},Ct(r,Ehe(i),"100%"),Ct(r,"backgroundColor",l.neutral0),Ct(r,"borderRadius",s),Ct(r,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),Ct(r,"marginBottom",o.menuGutter),Ct(r,"marginTop",o.menuGutter),Ct(r,"position","absolute"),Ct(r,"width","100%"),Ct(r,"zIndex",1),r},Z2=y.createContext({getPortalPlacement:null}),J2=(function(e){Ha(r,e);var t=Q2(r);function r(){var i;la(this,r);for(var a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];return i=t.call.apply(t,[this].concat(s)),i.state={maxHeight:i.props.maxMenuHeight,placement:null},i.getPlacement=function(l){var c=i.props,h=c.minMenuHeight,u=c.maxMenuHeight,d=c.menuPlacement,p=c.menuPosition,f=c.menuShouldScrollIntoView,m=c.theme;if(l){var g=p==="fixed",x=f&&!g,v=Nhe({maxHeight:u,menuEl:l,minHeight:h,placement:d,shouldScroll:x,isFixedPosition:g,theme:m}),b=i.context.getPortalPlacement;b&&b(v),i.setState(v)}}
30,i.getUpdatedProps=function(){var l=i.props.menuPlacement,c=i.state.placement||Bx(l);return lT(lT({},i.props),{},{placement:c,maxHeight:i.state.maxHeight})},i}return Pi(r,[{key:"render",value:function(){var a=this.props.children;return a({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),r})(y.Component);J2.contextType=Z2;var khe=function(t){var r=t.children,i=t.className,a=t.cx,s=t.getStyles,o=t.innerRef,l=t.innerProps;return Vt("div",Z({css:s("menu",t),className:a({menu:!0},i)},l,{ref:o}),r)},Phe=function(t){var r=t.maxHeight,i=t.theme.spacing.baseUnit;return{maxHeight:r,overflowY:"auto",paddingBottom:i,paddingTop:i,position:"relative",WebkitOverflowScrolling:"touch"}},Ihe=function(t){var r=t.children,i=t.className,a=t.cx,s=t.getStyles,o=t.isMulti,l=t.innerRef,c=t.innerProps;return Vt("div",Z({css:s("menuList",t),className:a({"menu-list":!0,"menu-list--is-multi":o},i),ref:l},c),r)},eM=function(t){var r=t.theme,i=r.spacing.baseUnit,a=r.colors;return{color:a.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px"),textAlign:"center"}},Dhe=eM,Rhe=eM,tM=function(t){var r=t.children,i=t.className,a=t.cx,s=t.getStyles,o=t.innerProps;return Vt("div",Z({css:s("noOptionsMessage",t),className:a({"menu-notice":!0,"menu-notice--no-options":!0},i)},o),r)};tM.defaultProps={children:"No options"};var nM=function(t){var r=t.children,i=t.className,a=t.cx,s=t.getStyles,o=t.innerProps;return Vt("div",Z({css:s("loadingMessage",t),className:a({"menu-notice":!0,"menu-notice--loading":!0},i)},o),r)};nM.defaultProps={children:"Loading..."};var Ohe=function(t){var r=t.rect,i=t.offset,a=t.position;return{left:r.left,position:a,top:i,width:r.width,zIndex:1}},Ahe=(function(e){Ha(r,e);var t=Q2(r);function r(){var i;la(this,r);for(var a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];return i=t.call.apply(t,[this].concat(s)),i.state={placement:null},i.getPortalPlacement=function(l){var c=l.placement,h=Bx(i.props.menuPlacement);c!==h&&i.setState({placement:c})},i}return Pi(r,[{key:"render",value:function(){var a=this.props,s=a.appendTo,o=a.children,l=a.controlElement,c=a.menuPlacement,h=a.menuPosition,u=a.getStyles,d=h==="fixed";if(!s&&!d||!l)return null;var p=this.state.placement||Bx(c),f=She(l),m=d?0:window.pageYOffset,g=f[p]+m,x={offset:g,position:h,rect:f},v=Vt("div",{css:u("menuPortal",x)},o);return Vt(Z2.Provider,{value:{getPortalPlacement:this.getPortalPlacement}},s?Fr.createPortal(v,s):v)}}]),r})(y.Component),cT=Array.isArray,dT=Object.keys,Mhe=Object.prototype.hasOwnProperty;function qx(e,t){if(e===t)return!0;if(e&&t&&To(e)=="object"&&To(t)=="object"){var r=cT(e),i=cT(t),a,s,o;if(r&&i){if(s=e.length,s!=t.length)return!1;for(a=s;a--!==0;)if(!qx(e[a],t[a]))return!1;return!0}if(r!=i)return!1;var l=e instanceof Date,c=t instanceof Date;if(l!=c)return!1;if(l&&c)return e.getTime()==t.getTime();var h=e instanceof RegExp,u=t instanceof RegExp;if(h!=u)return!1;if(h&&u)return e.toString()==t.toString();var d=dT(e);if(s=d.length,s!==dT(t).length)return!1;for(a=s;a--!==0;)if(!Mhe.call(t,d[a]))return!1;for(a=s;a--!==0;)if(o=d[a],!(o==="_owner"&&e.$$typeof)&&!qx(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}function $he(e,t){try{return qx(e,t)}catch(r){if(r.message&&r.message.match(/stack|recursion/i))return!1;throw r}}var Lhe=function(t){var r=t.isDisabled,i=t.isRtl;return{label:"container",direction:i?"rtl":null,pointerEvents:r?"none":null,position:"relative"}},Fhe=function(t){var r=t.children,i=t.className,a=t.cx,s=t.getStyles,o=t.innerProps,l=t.isDisabled,c=t.isRtl;return Vt("div",Z({css:s("container",t),className:a({"--is-disabled":l,"--is-rtl":c},i)},o),r)},Uhe=function(t){var r=t.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}},Bhe=function(t){var r=t.children,i=t.className,a=t.cx,s=t.isMulti,o=t.getStyles,l=t.hasValue;return Vt("div",{css:o("valueContainer",t),className:a({"value-container":!0,"value-container--is-multi":s,"value-container--has-value":l},i)},r)},qhe=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},Vhe=function(t){var r=t.children,i=t.className,a=t.cx,s=t.getStyles;return Vt("div",{css:s("indicatorsContainer",t),className:a({indicators:!0},i)},r)};function rM(){var e=fhe([`
31  0%, 80%, 100% { opacity: 0; }
32  40% { opacity: 1; }
33`]);return rM=function(){return e},e}var zhe={name:"19bqh2r",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;"},iM=function(t){var r=t.size,i=Be(t,["size"]);return Vt("svg",Z({height:r,width:r,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:zhe},i))},n0=function(t){return Vt(iM,Z({size:20},t),Vt("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},aM=function(t){return Vt(iM,Z({size:20},t),Vt("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},sM=function(t){var r=t.isFocused,i=t.theme,a=i.spacing.baseUnit,s=i.colors;return{label:"indicatorContainer",color:r?s.neutral60:s.neutral20,display:"flex",padding:a*2,transition:"color 150ms",":hover":{color:r?s.neutral80:s.neutral40}}},Hhe=sM,Ghe=function(t){var r=t.children,i=t.className,a=t.cx,s=t.getStyles,o=t.innerProps;return Vt("div",Z({},o,{css:s("dropdownIndicator",t),className:a({indicator:!0,"dropdown-indicator":!0},i)}),r||Vt(aM,null))},Whe=sM,Yhe=function(t){var r=t.children,i=t.className,a=t.cx,s=t.getStyles,o=t.innerProps;return Vt("div",Z({},o,{css:s("clearIndicator",t),className:a({indicator:!0,"clear-indicator":!0},i)}),r||Vt(n0,null))},Khe=function(t){var r=t.isDisabled,i=t.theme,a=i.spacing.baseUnit,s=i.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:r?s.neutral10:s.neutral20,marginBottom:a*2,marginTop:a*2,width:1}},Xhe=function(t){var r=t.className,i=t.cx,a=t.getStyles,s=t.innerProps;return Vt("span",Z({},s,{css:a("indicatorSeparator",t),className:i({"indicator-separator":!0},r)}))},Qhe=che(rM()),Zhe=function(t){var r=t.isFocused,i=t.size,a=t.theme,s=a.colors,o=a.spacing.baseUnit;return{label:"loadingIndicator",color:r?s.neutral60:s.neutral20,display:"flex",padding:o*2,transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"}},my=function(t){var r=t.delay,i=t.offset;return Vt("span",{css:e0({animation:"".concat(Qhe," 1s ease-in-out ").concat(r,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:i?"1em":null,height:"1em",verticalAlign:"top",width:"1em"},"")})},oM=function(t){var r=t.className,i=t.cx,a=t.getStyles,s=t.innerProps,o=t.isRtl;return Vt("div",Z({},s,{css:a("loadingIndicator",t),className:i({indicator:!0,"loading-indicator":!0},r)}),Vt(my,{delay:0,offset:o}),Vt(my,{delay:160,offset:!0}),Vt(my,{delay:320,offset:!o}))};oM.defaultProps={size:4};var Jhe=function(t){var r=t.isDisabled,i=t.isFocused,a=t.theme,s=a.colors,o=a.borderRadius,l=a.spacing;return{label:"control",alignItems:"center",backgroundColor:r?s.neutral5:s.neutral0,borderColor:r?s.neutral10:i?s.primary:s.neutral20,borderRadius:o,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(s.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:i?s.primary:s.neutral30}}}
vendor: 9,610 bytes, line 33
33,epe=function(t){var r=t.children,i=t.cx,a=t.getStyles,s=t.className,o=t.isDisabled,l=t.isFocused,c=t.innerRef,h=t.innerProps,u=t.menuIsOpen;return Vt("div",Z({ref:c,css:a("control",t),className:i({control:!0,"control--is-disabled":o,"control--is-focused":l,"control--menu-is-open":u},s)},h),r)};function uT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,i)}return r}function tpe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uT(Object(r),!0).forEach(function(i){Ct(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uT(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}var npe=function(t){var r=t.theme.spacing;return{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},rpe=function(t){var r=t.children,i=t.className,a=t.cx,s=t.getStyles,o=t.Heading,l=t.headingProps,c=t.label,h=t.theme,u=t.selectProps;return Vt("div",{css:s("group",t),className:a({group:!0},i)},Vt(o,Z({},l,{selectProps:u,theme:h,getStyles:s,cx:a}),c),Vt("div",null,r))},ipe=function(t){var r=t.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:r.baseUnit*3,paddingRight:r.baseUnit*3,textTransform:"uppercase"}},ape=function(t){var r=t.className,i=t.cx,a=t.getStyles,s=t.theme;t.selectProps;var o=Be(t,["className","cx","getStyles","theme","selectProps"]);return Vt("div",Z({css:a("groupHeading",tpe({theme:s},o)),className:i({"group-heading":!0},r)},o))};function hT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,i)}return r}function spe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hT(Object(r),!0).forEach(function(i){Ct(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hT(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}var ope=function(t){var r=t.isDisabled,i=t.theme,a=i.spacing,s=i.colors;return{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,visibility:r?"hidden":"visible",color:s.neutral80}},lpe=function(t){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:t?0:1,outline:0,padding:0,color:"inherit"}},cpe=function(t){var r=t.className,i=t.cx,a=t.getStyles,s=t.innerRef,o=t.isHidden,l=t.isDisabled,c=t.theme;t.selectProps;var h=Be(t,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme","selectProps"]);return Vt("div",{css:a("input",spe({theme:c},h))},Vt(vhe,Z({className:i({input:!0},r),inputRef:s,inputStyle:lpe(o),disabled:l},h)))};function pT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,i)}return r}function gy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pT(Object(r),!0).forEach(function(i){Ct(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pT(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}var dpe=function(t){var r=t.theme,i=r.spacing,a=r.borderRadius,s=r.colors;return{label:"multiValue",backgroundColor:s.neutral10,borderRadius:a/2,display:"flex",margin:i.baseUnit/2,minWidth:0}},upe=function(t){var r=t.theme,i=r.borderRadius,a=r.colors,s=t.cropWithEllipsis;return{borderRadius:i/2,color:a.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:s?"ellipsis":null,whiteSpace:"nowrap"}},hpe=function(t){var r=t.theme,i=r.spacing,a=r.borderRadius,s=r.colors,o=t.isFocused;return{alignItems:"center",borderRadius:a/2,backgroundColor:o&&s.dangerLight,display:"flex",paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:s.dangerLight,color:s.danger}}},lM=function(t){var r=t.children,i=t.innerProps;return Vt("div",i,r)},ppe=lM,fpe=lM;function mpe(e){var t=e.children,r=e.innerProps;return Vt("div",r,t||Vt(n0,{size:14}))}var cM=function(t){var r=t.children,i=t.className,a=t.components,s=t.cx,o=t.data,l=t.getStyles,c=t.innerProps,h=t.isDisabled,u=t.removeProps,d=t.selectProps,p=a.Container,f=a.Label,m=a.Remove;return Vt(phe,null,function(g){var x=g.css,v=g.cx;return Vt(p,{data:o,innerProps:gy(gy({},c),{},{className:v(x(l("multiValue",t)),s({"multi-value":!0,"multi-value--is-disabled":h},i))}),selectProps:d},Vt(f,{data:o,innerProps:{className:v(x(l("multiValueLabel",t)),s({"multi-value__label":!0},i))},selectProps:d},r),Vt(m,{data:o,innerProps:gy({className:v(x(l("multiValueRemove",t)),s({"multi-value__remove":!0},i))},u),selectProps:d}))})};cM.defaultProps={cropWithEllipsis:!0};var gpe=function(t){var r=t.isDisabled,i=t.isFocused,a=t.isSelected,s=t.theme,o=s.spacing,l=s.colors;return{label:"option",backgroundColor:a?l.primary:i?l.primary25:"transparent",color:r?l.neutral20:a?l.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(o.baseUnit*2,"px ").concat(o.baseUnit*3,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!r&&(a?l.primary:l.primary50)}}},vpe=function(t){var r=t.children,i=t.className,a=t.cx,s=t.getStyles,o=t.isDisabled,l=t.isFocused,c=t.isSelected,h=t.innerRef,u=t.innerProps;return Vt("div",Z({css:s("option",t),className:a({option:!0,"option--is-disabled":o,"option--is-focused":l,"option--is-selected":c},i),ref:h},u),r)},bpe=function(t){var r=t.theme,i=r.spacing,a=r.colors;return{label:"placeholder",color:a.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},ype=function(t){var r=t.children,i=t.className,a=t.cx,s=t.getStyles,o=t.innerProps;return Vt("div",Z({css:s("placeholder",t),className:a({placeholder:!0},i)},o),r)},xpe=function(t){var r=t.isDisabled,i=t.theme,a=i.spacing,s=i.colors;return{label:"singleValue",color:r?s.neutral40:s.neutral80,marginLeft:a.baseUnit/2,marginRight:a.baseUnit/2,maxWidth:"calc(100% - ".concat(a.baseUnit*2,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},jpe=function(t){var r=t.children,i=t.className,a=t.cx,s=t.getStyles,o=t.isDisabled,l=t.innerProps;return Vt("div",Z({css:s("singleValue",t),className:a({"single-value":!0,"single-value--is-disabled":o},i)},l),r)};function fT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,i)}return r}function mT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fT(Object(r),!0).forEach(function(i){Ct(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fT(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}var wpe={ClearIndicator:Yhe,Control:epe,DropdownIndicator:Ghe,DownChevron:aM,CrossIcon:n0,Group:rpe,GroupHeading:ape,IndicatorsContainer:Vhe,IndicatorSeparator:Xhe,Input:cpe,LoadingIndicator:oM,Menu:khe,MenuList:Ihe,MenuPortal:Ahe,LoadingMessage:nM,NoOptionsMessage:tM,MultiValue:cM,MultiValueContainer:ppe,MultiValueLabel:fpe,MultiValueRemove:mpe,Option:vpe,Placeholder:ype,SelectContainer:Fhe,SingleValue:jpe,ValueContainer:Bhe},Spe=function(t){return mT(mT({},wpe),t.components)},Vx=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Æ¢"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"È¢"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲá¹
33¶á¹´É„"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"Æ£"},{base:"ou",letters:"È£"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],_pe=new RegExp("["+Vx.map(function(e){return e.letters}).join("")+"]","g"),dM={};for(var vy=0;vy<Vx.length;vy++)for(var by=Vx[vy],yy=0;yy<by.letters.length;yy++)dM[by.letters[yy]]=by.base;var gT=function(t){return t.replace(_pe,function(r){return dM[r]})};function vT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,i)}return r}function Cpe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vT(Object(r),!0).forEach(function(i){Ct(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vT(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}var bT=function(t){return t.replace(/^\s+|\s+$/g,"")},Npe=function(t){return"".concat(t.label," ").concat(t.value)},Epe=function(t){return function(r,i){var a=Cpe({ignoreCase:!0,ignoreAccents:!0,stringify:Npe,trim:!0,matchFrom:"any"},t),s=a.ignoreCase,o=a.ignoreAccents,l=a.stringify,c=a.trim,h=a.matchFrom,u=c?bT(i):i,d=c?bT(l(r)):l(r);return s&&(u=u.toLowerCase(),d=d.toLowerCase()),o&&(u=gT(u),d=gT(d)),h==="start"?d.substr(0,u.length)===u:d.indexOf(u)>-1}},Tpe={name:"1laao21-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;"},kpe=function(t){return Vt("span",Z({css:Tpe},t))};function Ppe(e){e.in,e.out,e.onExited,e.appear,e.enter,e.exit;var t=e.innerRef;e.emotion;var r=Be(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]);return Vt("input",Z({ref:t},r,{css:e0({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"},"")}))}function Ipe(e){var t=Dpe();return function(){var i=wr(e),a;if(t){var s=wr(this).constructor;a=Reflect.construct(i,arguments,s)}else a=i.apply(this,arguments);return js(this,a)}}function Dpe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var uM=(function(e){Ha(r,e);var t=Ipe(r);function r(){return la(this,r),t.apply(this,arguments)}
33return Pi(r,[{key:"componentDidMount",value:function(){this.props.innerRef(Fr.findDOMNode(this))}},{key:"componentWillUnmount",value:function(){this.props.innerRef(null)}},{key:"render",value:function(){return this.props.children}}]),r})(y.Component),yT=["boxSizing","height","overflow","paddingRight","position"],xT={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function jT(e){e.preventDefault()}function wT(e){e.stopPropagation()}function ST(){var e=this.scrollTop,t=this.scrollHeight,r=e+this.offsetHeight;e===0?this.scrollTop=1:r===t&&(this.scrollTop=e-1)}function _T(){return"ontouchstart"in window||navigator.maxTouchPoints}function Rpe(e){var t=Ope();return function(){var i=wr(e),a;if(t){var s=wr(this).constructor;a=Reflect.construct(i,arguments,s)}else a=i.apply(this,arguments);return js(this,a)}}function Ope(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var CT=!!(window.document&&window.document.createElement),Ac=0,hM=(function(e){Ha(r,e);var t=Rpe(r);function r(){var i;la(this,r);for(var a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];return i=t.call.apply(t,[this].concat(s)),i.originalStyles={},i.listenerOptions={capture:!1,passive:!1},i}return Pi(r,[{key:"componentDidMount",value:function(){var a=this;if(CT){var s=this.props,o=s.accountForScrollbars,l=s.touchScrollTarget,c=document.body,h=c&&c.style;if(o&&yT.forEach(function(f){var m=h&&h[f];a.originalStyles[f]=m}),o&&Ac<1){var u=parseInt(this.originalStyles.paddingRight,10)||0,d=document.body?document.body.clientWidth:0,p=window.innerWidth-d+u||0;Object.keys(xT).forEach(function(f){var m=xT[f];h&&(h[f]=m)}),h&&(h.paddingRight="".concat(p,"px"))}c&&_T()&&(c.addEventListener("touchmove",jT,this.listenerOptions),l&&(l.addEventListener("touchstart",ST,this.listenerOptions),l.addEventListener("touchmove",wT,this.listenerOptions))),Ac+=1}}},{key:"componentWillUnmount",value:function(){var a=this;if(CT){var s=this.props,o=s.accountForScrollbars,l=s.touchScrollTarget,c=document.body,h=c&&c.style;Ac=Math.max(Ac-1,0),o&&Ac<1&&yT.forEach(function(u){var d=a.originalStyles[u];h&&(h[u]=d)}),c&&_T()&&(c.removeEventListener("touchmove",jT,this.listenerOptions),l&&(l.removeEventListener("touchstart",ST,this.listenerOptions),l.removeEventListener("touchmove",wT,this.listenerOptions)))}}},{key:"render",value:function(){return null}}]),r})(y.Component);hM.defaultProps={accountForScrollbars:!0};function Ape(e){var t=Mpe();return function(){var i=wr(e),a;if(t){var s=wr(this).constructor;a=Reflect.construct(i,arguments,s)}else a=i.apply(this,arguments);return js(this,a)}}function Mpe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var $pe={name:"1dsbpcp",styles:"position:fixed;left:0;bottom:0;right:0;top:0;"},Lpe=(function(e){Ha(r,e);var t=Ape(r);function r(){var i;la(this,r);for(var a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];return i=t.call.apply(t,[this].concat(s)),i.state={touchScrollTarget:null},i.getScrollTarget=function(l){l!==i.state.touchScrollTarget&&i.setState({touchScrollTarget:l})},i.blurSelectInput=function(){document.activeElement&&document.activeElement.blur()},i}return Pi(r,[{key:"render",value:function(){var a=this.props,s=a.children,o=a.isEnabled,l=this.state.touchScrollTarget;return o?Vt("div",null,Vt("div",{onClick:this.blurSelectInput,css:$pe}),Vt(uM,{innerRef:this.getScrollTarget},s),l?Vt(hM,{touchScrollTarget:l}):null):s}}]),r})(y.PureComponent);function Fpe(e){var t=Upe();return function(){var i=wr(e),a;if(t){var s=wr(this).constructor;a=Reflect.construct(i,arguments,s)}else a=i.apply(this,arguments);return js(this,a)}}function Upe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var Bpe=(function(e){Ha(r,e);var t=Fpe(r);function r(){var i;la(this,r);for(var a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];return i=t.call.apply(t,[this].concat(s)),i.isBottom=!1,i.isTop=!1,i.scrollTarget=void 0,i.touchStart=void 0,i.cancelScroll=function(l){l.preventDefault(),l.stopPropagation()},i.handleEventDelta=function(l,c){var h=i.props,u=h.onBottomArrive,d=
33h.onBottomLeave,p=h.onTopArrive,f=h.onTopLeave,m=i.scrollTarget,g=m.scrollTop,x=m.scrollHeight,v=m.clientHeight,b=i.scrollTarget,j=c>0,w=x-v-g,S=!1;w>c&&i.isBottom&&(d&&d(l),i.isBottom=!1),j&&i.isTop&&(f&&f(l),i.isTop=!1),j&&c>w?(u&&!i.isBottom&&u(l),b.scrollTop=x,S=!0,i.isBottom=!0):!j&&-c>g&&(p&&!i.isTop&&p(l),b.scrollTop=0,S=!0,i.isTop=!0),S&&i.cancelScroll(l)},i.onWheel=function(l){i.handleEventDelta(l,l.deltaY)},i.onTouchStart=function(l){i.touchStart=l.changedTouches[0].clientY},i.onTouchMove=function(l){var c=i.touchStart-l.changedTouches[0].clientY;i.handleEventDelta(l,c)},i.getScrollTarget=function(l){i.scrollTarget=l},i}return Pi(r,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(a){a&&(typeof a.addEventListener=="function"&&a.addEventListener("wheel",this.onWheel,!1),typeof a.addEventListener=="function"&&a.addEventListener("touchstart",this.onTouchStart,!1),typeof a.addEventListener=="function"&&a.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(a){a&&(typeof a.removeEventListener=="function"&&a.removeEventListener("wheel",this.onWheel,!1),typeof a.removeEventListener=="function"&&a.removeEventListener("touchstart",this.onTouchStart,!1),typeof a.removeEventListener=="function"&&a.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return Me.createElement(uM,{innerRef:this.getScrollTarget},this.props.children)}}]),r})(y.Component);function qpe(e){var t=e.isEnabled,r=t===void 0?!0:t,i=Be(e,["isEnabled"]);return r?Me.createElement(Bpe,i):i.children}var Vpe=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.isSearchable,a=r.isMulti,s=r.label,o=r.isDisabled,l=r.tabSelectsValue;switch(t){case"menu":return"Use Up and Down to choose options".concat(o?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(l?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(s||"Select"," is focused ").concat(i?",type to refine list":"",", press Down to open the menu, ").concat(a?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value"}},zpe=function(t,r){var i=r.value,a=r.isDisabled;if(i)switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"select-option":return a?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.")}},Hpe=function(t){var r=t.focusedValue,i=t.getOptionLabel,a=t.selectValue;return"value ".concat(i(r)," focused, ").concat(a.indexOf(r)+1," of ").concat(a.length,".")},Gpe=function(t){var r=t.focusedOption,i=t.getOptionLabel,a=t.options;return"option ".concat(i(r)," focused").concat(r.isDisabled?" disabled":"",", ").concat(a.indexOf(r)+1," of ").concat(a.length,".")},Wpe=function(t){var r=t.inputValue,i=t.screenReaderMessage;return"".concat(i).concat(r?" for search term "+r:"",".")},Ype=function(t){return t.label},Kpe=function(t){return t.label},Xpe=function(t){return t.value},pM=function(t){return!!t.isDisabled},Qpe={clearIndicator:Whe,container:Lhe,control:Jhe,dropdownIndicator:Hhe,group:npe,groupHeading:ipe,indicatorsContainer:qhe,indicatorSeparator:Khe,input:ope,loadingIndicator:Zhe,loadingMessage:Rhe,menu:The,menuList:Phe,menuPortal:Ohe,multiValue:dpe,multiValueLabel:upe,multiValueRemove:hpe,noOptionsMessage:Dhe,option:gpe,placeholder:bpe,singleValue:xpe,valueContainer:Uhe},Zpe={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},Jpe=4,fM=4,efe=38,tfe=fM*2,nfe={baseUnit:fM,controlHeight:efe,menuGutter:tfe},xy={borderRadius:Jpe,colors:Zpe,spacing:nfe};function NT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,i)}return r}function ol(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
33t%2?NT(Object(r),!0).forEach(function(i){Ct(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):NT(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function rfe(e){var t=ife();return function(){var i=wr(e),a;if(t){var s=wr(this).constructor;a=Reflect.construct(i,arguments,s)}else a=i.apply(this,arguments);return js(this,a)}}function ife(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var afe={backspaceRemovesValue:!0,blurInputOnSelect:sT(),captureMenuScroll:!sT(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:Epe(),formatGroupLabel:Ype,getOptionLabel:Kpe,getOptionValue:Xpe,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:pM,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!_he(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var r=t.count;return"".concat(r," result").concat(r!==1?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0},sfe=1,r0=(function(e){Ha(r,e);var t=rfe(r);function r(i){var a;la(this,r),a=t.call(this,i),a.state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},a.blockOptionHover=!1,a.isComposing=!1,a.clearFocusValueOnUpdate=!1,a.commonProps=void 0,a.components=void 0,a.hasGroups=!1,a.initialTouchX=0,a.initialTouchY=0,a.inputIsHiddenAfterUpdate=void 0,a.instancePrefix="",a.openAfterFocus=!1,a.scrollToFocusedOptionOnUpdate=!1,a.userIsDragging=void 0,a.controlRef=null,a.getControlRef=function(c){a.controlRef=c},a.focusedOptionRef=null,a.getFocusedOptionRef=function(c){a.focusedOptionRef=c},a.menuListRef=null,a.getMenuListRef=function(c){a.menuListRef=c},a.inputRef=null,a.getInputRef=function(c){a.inputRef=c},a.cacheComponents=function(c){a.components=Spe({components:c})},a.focus=a.focusInput,a.blur=a.blurInput,a.onChange=function(c,h){var u=a.props,d=u.onChange,p=u.name;d(c,ol(ol({},h),{},{name:p}))},a.setValue=function(c){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"set-value",u=arguments.length>2?arguments[2]:void 0,d=a.props,p=d.closeMenuOnSelect,f=d.isMulti;a.onInputChange("",{action:"set-value"}),p&&(a.inputIsHiddenAfterUpdate=!f,a.onMenuClose()),a.clearFocusValueOnUpdate=!0,a.onChange(c,{action:h,option:u})},a.selectOption=function(c){var h=a.props,u=h.blurInputOnSelect,d=h.isMulti,p=a.state.selectValue;if(d)if(a.isOptionSelected(c,p)){var f=a.getOptionValue(c);a.setValue(p.filter(function(m){return a.getOptionValue(m)!==f}),"deselect-option",c),a.announceAriaLiveSelection({event:"deselect-option",context:{value:a.getOptionLabel(c)}})}else a.isOptionDisabled(c,p)?a.announceAriaLiveSelection({event:"select-option",context:{value:a.getOptionLabel(c),isDisabled:!0}}):(a.setValue([].concat(xr(p),[c]),"select-option",c),a.announceAriaLiveSelection({event:"select-option",context:{value:a.getOptionLabel(c)}}));else a.isOptionDisabled(c,p)?a.announceAriaLiveSelection({event:"select-option",context:{value:a.getOptionLabel(c),isDisabled:!0}}):(a.setValue(c,"select-option"),a.announceAriaLiveSelection({event:"select-option",context:{value:a.getOptionLabel(c)}}));u&&a.blurInput()},a.removeValue=function(c){var h=a.state.selectValue,u=a.getOptionValue(c),d=h.filter(function(p){return a.getOptionValue(p)!==u});a.onChange(d.length?d:null,{action:"remove-value",removedValue:c}),a.announceAriaLiveSelection({event:"remove-value",context:{value:c?a.getOptionLabel(c):""}}),a.focusInput()},a.clearValue=function(){a.onChange(null,{action:"clear"})},a.popValue=function(){var c=a.state.selectValue,h=c[c.length-1],u=c.slice(0,c.length-1);a.announceAriaLiveSelection({event:"pop-value",context:{value:h?a.getOptionLabel(h):""}}),a.onChange(u.length?u:null,{action:"pop-value",removedValue:h})},a.getValue=function(){return a.state.selectValue},a.cx=function(){for(var c=arguments.length,h=new Array(c),u=0;u<c;u++)h[u]=arguments[u];return yhe.apply(void 0,[a.props.classNamePrefix].concat(h))},a.getOptionLabel=function(c){return a.props.getOptionLabel(c)},a.getOptionValue=function(c){return a.props.getOptionValue(c)},a.getStyles=function(c,h){var u=Qpe[c](h);u.boxSizing="border-box";var d=a.props.styles[c];return d?d(u,h):u},a.getElementId=function(c){return"".concat(a.instancePrefix,"-").concat(c)},a.getActiveDescendentId=function(){var c=a.props.menuIsOpen,h=a.state,u=h.menuOptions,d=h.focusedOption;if(!(!d||!c)){var p=u.focusable.indexOf(d),f=u.render[p];return f&&f.key}},a.announceAriaLiveSelection=function(c){var h=c.event,u=c.context;a.setState({ariaLiveSelection:zpe(h,u)})},a.announceAriaLiveContext=function(c){var h=c.event,u=c.context;a.setState({ariaLiveContext:Vpe(h,ol(ol({},u),{},{label:a.props["aria-label"]}))})},a.onMenuMouseDown=function(c){c.button===0&&(c.stopPropagation(),c.preventDefault(),a.focusInput())},a.onMenuMouseMove=function(c){a.blockOptionHover=!1},a.onControlMouseDown=function(c){var h=a.props.openMenuOnClick;a.state.isFocused?a.props.menuIsOpen?c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&a.onMenuClose():h&&a.openMenu("first"):(h&&(a.openAfterFocus=!0),a.focusInput()),c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&c.preventDefault()},a.onDropdownIndicatorMouseDown=function(c){if(!(c&&c.type==="mousedown"&&c.button!==0)&&!a.props.isDisabled){var h=a.props,u=h.isMulti,d=h.menuIsOpen;a.focusInput(),d?(a.inputIsHiddenAfterUpdate=!u,a.onMenuClose()):a.openMenu("first"),c.preventDefault(),c.stopPropagation()}},a.onClearIndicatorMouseDown=function(c){c&&c.type==="mousedown"&&c.button!==0||(a.clearValue(),c.stopPropagation(),a.openAfterFocus=!1,c.type==="touchend"?a.focusInput():setTimeout(function(){return a.focusInput()}))},a.onScroll=function(c){typeof a.props.closeMenuOnScroll=="boolean"?c.target instanceof HTMLElement&&t0(c.target)&&a.props.onMenuClose():typeof a.props.closeMenuOnScroll=="function"&&a.props.closeMenuOnScroll(c)&&a.props.onMenuClose()},a.onCompositionStart=function(){a.isComposing=!0},a.onCompositionEnd=function(){a.isComposing=!1},a.onTouchStart=function(c){var h=c.touches,u=h&&h.item(0);u&&(a.initialTouchX=u.clientX,a.initialTouchY=u.clientY,a.userIsDragging=!1)},a.onTouchMove=function(c){var h=c.touches,u=h&&h.item(0);if(u){var d=Math.abs(u.clientX-a.initialTouchX),p=Math.abs(u.clientY-a.initialTouchY),f=5;a.userIsDragging=d>f||p>f}},a.onTouchEnd=function(c){a.userIsDragging||(a.controlRef&&!a.controlRef.contains(c.target)&&a.menuListRef&&!a.menuListRef.contains(c.target)&&a.blurInput(),a.initialTouchX=0,a.initialTouchY=0)},a.onControlTouchEnd=function(c){a.userIsDragging||a.onControlMouseDown(c)},a.onClearIndicatorTouchEnd=function(c){a.userIsDragging||a.onClearIndicatorMouseDown(c)},a.onDropdownIndicatorTouchEnd=function(c){a.userIsDragging||a.onDropdownIndicatorMouseDown(c)},a.handleInputChange=function(c){var h=c.currentTarget.value;a.inputIsHiddenAfterUpdate=!1,a.onInputChange(h,{action:"input-change"}),a.props.menuIsOpen||a.onMenuOpen()},a.onInputFocus=function(c){var h=a.props,u=h.isSearchable,d=h.isMulti;a.props.onFocus&&a.props.onFocus(c),a.inputIsHiddenAfterUpdate=!1,a.announceAriaLiveContext({event:"input",context:{isSearchable:u,isMulti:d}}),a.setState({isFocused:!0}),(a.openAfterFocus||a.props.openMenuOnFocus)&&a.openMenu("first"),a.openAfterFocus=!1},a.onInputBlur=function(c){if(a.menuListRef&&a.menuListRef.contains(document.activeElement)){a.inputRef.focus();return}a.props.onBlur&&a.props.onBlur(c),a.onInputChange("",{action:"input-blur"}),a.onMenuClose(),a.setState({focusedValue:null,isFocused:!1})},a.onOptionHover=function(c){a.blockOptionHover||a.state.focusedOption===c||a.setState({focusedOption:c})},a.shouldHideSelectedOptions=function(){var c=a.props,h=c.hideSelectedOptions,u=c.isMulti;return h===void 0?u:h},a.onKeyDown=function(c){var h=a.props,u=h.isMulti,d=h.backspaceRemovesValue,p=h.escapeClearsValue,f=h.inputValue,m=h.isClearable,g=h.isDisabled,x=h.menuIsOpen,v=h.onKeyDown,b=h.tabSelectsValue,j=h.openMenuOnFocus,w=a.state,S=w.focusedOption,_=w.focusedValue,C=w.selectValue;if(!g&&!(typeof v=="function"&&(v(c),c.defaultPrevented))){switch(a.blockOptionHover=!0,c.key){case"ArrowLeft":if(!u||f)return;a.focusValue("previous");break;case"ArrowRight":if(!u||f)return;a.focusValue("next");break;case"Delete":case"Backspace":if(f)return;if(_)a.removeValue(_);else{if(!d)return;u?a.popValue():m&&a.clearValue()}break;
33case"Tab":if(a.isComposing||c.shiftKey||!x||!b||!S||j&&a.isOptionSelected(S,C))return;a.selectOption(S);break;case"Enter":if(c.keyCode===229)break;if(x){if(!S||a.isComposing)return;a.selectOption(S);break}return;case"Escape":x?(a.inputIsHiddenAfterUpdate=!1,a.onInputChange("",{action:"menu-close"}),a.onMenuClose()):m&&p&&a.clearValue();break;case" ":if(f)return;if(!x){a.openMenu("first");break}if(!S)return;a.selectOption(S);break;case"ArrowUp":x?a.focusOption("up"):a.openMenu("last");break;case"ArrowDown":x?a.focusOption("down"):a.openMenu("first");break;case"PageUp":if(!x)return;a.focusOption("pageup");break;case"PageDown":if(!x)return;a.focusOption("pagedown");break;case"Home":if(!x)return;a.focusOption("first");break;case"End":if(!x)return;a.focusOption("last");break;default:return}c.preventDefault()}},a.buildMenuOptions=function(c,h){var u=c.inputValue,d=u===void 0?"":u,p=c.options,f=function(g,x){var v=a.isOptionDisabled(g,h),b=a.isOptionSelected(g,h),j=a.getOptionLabel(g),w=a.getOptionValue(g);if(!(a.shouldHideSelectedOptions()&&b||!a.filterOption({label:j,value:w,data:g},d))){var S=v?void 0:function(){return a.onOptionHover(g)},_=v?void 0:function(){return a.selectOption(g)},C="".concat(a.getElementId("option"),"-").concat(x);return{innerProps:{id:C,onClick:_,onMouseMove:S,onMouseOver:S,tabIndex:-1},data:g,isDisabled:v,isSelected:b,key:C,label:j,type:"option",value:w}}};return p.reduce(function(m,g,x){if(g.options){a.hasGroups||(a.hasGroups=!0);var v=g.options,b=v.map(function(S,_){var C=f(S,"".concat(x,"-").concat(_));return C&&m.focusable.push(S),C}).filter(Boolean);if(b.length){var j="".concat(a.getElementId("group"),"-").concat(x);m.render.push({type:"group",key:j,data:g,options:b})}}else{var w=f(g,"".concat(x));w&&(m.render.push(w),m.focusable.push(g))}return m},{render:[],focusable:[]})};var s=i.value;a.cacheComponents=jr(a.cacheComponents,$he).bind(Ud(a)),a.cacheComponents(i.components),a.instancePrefix="react-select-"+(a.props.instanceId||++sfe);var o=Zp(s);a.buildMenuOptions=jr(a.buildMenuOptions,function(c,h){var u=c,d=Ci(u,2),p=d[0],f=d[1],m=h,g=Ci(m,2),x=g[0],v=g[1];return f===v&&p.inputValue===x.inputValue&&p.options===x.options}).bind(Ud(a));var l=i.menuIsOpen?a.buildMenuOptions(i,o):{render:[],focusable:[]};return a.state.menuOptions=l,a.state.selectValue=o,a}return Pi(r,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"UNSAFE_componentWillReceiveProps",value:function(a){var s=this.props,o=s.options,l=s.value,c=s.menuIsOpen,h=s.inputValue;if(this.cacheComponents(a.components),a.value!==l||a.options!==o||a.menuIsOpen!==c||a.inputValue!==h){var u=Zp(a.value),d=a.menuIsOpen?this.buildMenuOptions(a,u):{render:[],focusable:[]},p=this.getNextFocusedValue(u),f=this.getNextFocusedOption(d.focusable);this.setState({menuOptions:d,selectValue:u,focusedOption:f,focusedValue:p})}this.inputIsHiddenAfterUpdate!=null&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(a){var s=this.props,o=s.isDisabled,l=s.menuIsOpen,c=this.state.isFocused;(c&&!o&&a.isDisabled||c&&l&&!a.menuIsOpen)&&this.focusInput(),c&&o&&!a.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(whe(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){var a=this.props,s=a.isSearchable,o=a.isMulti;this.announceAriaLiveContext({event:"input",context:{isSearchable:s,isMulti:o}}),this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(a,s){this.props.onInputChange(a,s)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(a){var s=this,o=this.state,l=o.selectValue,c=o.isFocused,h=this.buildMenuOptions(this.props,l),u=this.props,d=u.isMulti,p=u.tabSelectsValue,f=a==="first"?0:h.focusable.length-1;if(!d){var m=h.focusable.indexOf(l[0]);m>-1&&(f=m)}this.scrollToFocusedOptionOnUpdate=!(c&&this.menuListRef),this.inputIsHiddenAfterUpdate=!1,this.setState({menuOptions:h,focusedValue:null,focusedOption:h.focusable[f]},function(){s.onMenuOpen(),s.announceAriaLiveContext({event:"menu",context:{tabSelectsValue:p}})})}},{key:"focusValue",value:function(a){var s=this.props,o=s.isMulti,l=s.isSearchable,c=this.state,h=c.selectValue,u=c.focusedValue;if(o){this.setState({focusedOption:null});var d=h.indexOf(u);u||(d=-1,this.announceAriaLiveContext({event:"value"}));var p=h.length-1,f=-1;if(h.length){switch(a){case"previous":d===0?f=0:d===-1?f=p:f=d-1;break;case"next":d>-1&&d<p&&(f=d+1);break}f===-1&&this.announceAriaLiveContext({event:"input",context:{isSearchable:l,isMulti:o}}),this.setState({inputIsHidden:f!==-1,focusedValue:h[f]})}}}},{key:"focusOption",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",s=this.props,o=s.pageSize,l=s.tabSelectsValue,c=this.state,h=c.focusedOption,u=c.menuOptions,d=u.focusable;if(d.length){var p=0,f=d.indexOf(h);h||(f=-1,this.announceAriaLiveContext({event:"menu",context:{tabSelectsValue:l}})),a==="up"?p=f>0?f-1:d.length-1:a==="down"?p=(f+1)%d.length:a==="pageup"?(p=f-o,p<0&&(p=0)):a==="pagedown"?(p=f+o,p>d.length-1&&(p=d.length-1)):a==="last"&&(p=d.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:d[p],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:pM(d[p]),tabSelectsValue:l}})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(xy):ol(ol({},xy),this.props.theme):xy}},{key:"getCommonProps",value:function(){var a=this.clearValue,s=this.cx,o=this.getStyles,l=this.getValue,c=this.setValue,h=this.selectOption,u=this.props,d=u.isMulti,p=u.isRtl,f=u.options,m=this.hasValue();return{cx:s,clearValue:a,getStyles:o,getValue:l,hasValue:m,isMulti:d,isRtl:p,options:f,selectOption:h,setValue:c,selectProps:u,theme:this.getTheme()}}}
33,{key:"getNextFocusedValue",value:function(a){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var s=this.state,o=s.focusedValue,l=s.selectValue,c=l.indexOf(o);if(c>-1){var h=a.indexOf(o);if(h>-1)return o;if(c<a.length)return a[c]}return null}},{key:"getNextFocusedOption",value:function(a){var s=this.state.focusedOption;return s&&a.indexOf(s)>-1?s:a[0]}},{key:"hasValue",value:function(){var a=this.state.selectValue;return a.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var a=this.props,s=a.isClearable,o=a.isMulti;return s===void 0?o:s}},{key:"isOptionDisabled",value:function(a,s){return typeof this.props.isOptionDisabled=="function"?this.props.isOptionDisabled(a,s):!1}},{key:"isOptionSelected",value:function(a,s){var o=this;if(s.indexOf(a)>-1)return!0;if(typeof this.props.isOptionSelected=="function")return this.props.isOptionSelected(a,s);var l=this.getOptionValue(a);return s.some(function(c){return o.getOptionValue(c)===l})}},{key:"filterOption",value:function(a,s){return this.props.filterOption?this.props.filterOption(a,s):!0}},{key:"formatOptionLabel",value:function(a,s){if(typeof this.props.formatOptionLabel=="function"){var o=this.props.inputValue,l=this.state.selectValue;return this.props.formatOptionLabel(a,{context:s,inputValue:o,selectValue:l})}else return this.getOptionLabel(a)}},{key:"formatGroupLabel",value:function(a){return this.props.formatGroupLabel(a)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"constructAriaLiveMessage",value:function(){var a=this.state,s=a.ariaLiveContext,o=a.selectValue,l=a.focusedValue,c=a.focusedOption,h=this.props,u=h.options,d=h.menuIsOpen,p=h.inputValue,f=h.screenReaderStatus,m=l?Hpe({focusedValue:l,getOptionLabel:this.getOptionLabel,selectValue:o}):"",g=c&&d?Gpe({focusedOption:c,getOptionLabel:this.getOptionLabel,options:u}):"",x=Wpe({inputValue:p,screenReaderMessage:f({count:this.countOptions()})});return"".concat(m," ").concat(g," ").concat(x," ").concat(s)}},{key:"renderInput",value:function(){var a=this.props,s=a.isDisabled,o=a.isSearchable,l=a.inputId,c=a.inputValue,h=a.tabIndex,u=a.form,d=this.components.Input,p=this.state.inputIsHidden,f=l||this.getElementId("input"),m={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};if(!o)return Me.createElement(Ppe,Z({id:f,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:K2,onFocus:this.onInputFocus,readOnly:!0,disabled:s,tabIndex:h,form:u,value:""},m));var g=this.commonProps,x=g.cx,v=g.theme,b=g.selectProps;return Me.createElement(d,Z({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:x,getStyles:this.getStyles,id:f,innerRef:this.getInputRef,isDisabled:s,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,selectProps:b,spellCheck:"false",tabIndex:h,form:u,theme:v,type:"text",value:c},m))}},{key:"renderPlaceholderOrValue",value:function(){var a=this,s=this.components,o=s.MultiValue,l=s.MultiValueContainer,c=s.MultiValueLabel,h=s.MultiValueRemove,u=s.SingleValue,d=s.Placeholder,p=this.commonProps,f=this.props,m=f.controlShouldRenderValue,g=f.isDisabled,x=f.isMulti,v=f.inputValue,b=f.placeholder,j=this.state,w=j.selectValue,S=j.focusedValue,_=j.isFocused;if(!this.hasValue()||!m)return v?null:Me.createElement(d,Z({},p,{key:"placeholder",isDisabled:g,isFocused:_}),b);if(x){var C=w.map(function(P,T){var N=P===S;return Me.createElement(o,Z({},p,{components:{Container:l,Label:c,Remove:h},isFocused:N,isDisabled:g,key:"".concat(a.getOptionValue(P)).concat(T),index:T,removeProps:{onClick:function(){return a.removeValue(P)},onTouchEnd:function(){return a.removeValue(P)},onMouseDown:function(I){I.preventDefault(),I.stopPropagation()}},data:P}),a.formatOptionLabel(P,"value"))});return C}if(v)return null;var E=w[0];return Me.createElement(u,Z({},p,{data:E,isDisabled:g}),this.formatOptionLabel(E,"value"))}},{key:"renderClearIndicator",value:function(){var a=this.components.ClearIndicator,s=this.commonProps,o=this.props,l=o.isDisabled,c=o.isLoading,h=this.state.isFocused;if(!this.isClearable()||!a||l||!this.hasValue()||c)return null;var u={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return Me.createElement(a,Z({},s,{innerProps:u,isFocused:h}))}},{key:"renderLoadingIndicator",value:function(){var a=this.components.LoadingIndicator,s=this.commonProps,o=this.props,l=o.isDisabled,c=o.isLoading,h=this.state.isFocused;if(!a||!c)return null;var u={"aria-hidden":"true"};return Me.createElement(a,Z({},s,{innerProps:u,isDisabled:l,isFocused:h}))}},{key:"renderIndicatorSeparator",value:function(){var a=this.components,s=a.DropdownIndicator,o=a.IndicatorSeparator;if(!s||!o)return null;var l=this.commonProps,c=this.props.isDisabled,h=this.state.isFocused;return Me.createElement(o,Z({},l,{isDisabled:c,isFocused:h}))}},{key:"renderDropdownIndicator",value:function(){var a=this.components.DropdownIndicator;if(!a)return null;var s=this.commonProps,o=this.props.isDisabled,l=this.state.isFocused,c={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return Me.createElement(a,Z({},s,{innerProps:c,isDisabled:o,isFocused:l}))}},{key:"renderMenu",value:function(){var a=this,s=this.components,o=s.Group,l=s.GroupHeading,c=s.Menu,h=s.MenuList,u=s.MenuPortal,d=s.LoadingMessage,p=s.NoOptionsMessage,f=s.Option,m=this.commonProps,g=this.state,x=g.focusedOption,v=g.menuOptions,b=this.props,j=b.captureMenuScroll,w=b.inputValue,S=b.isLoading,_=b.loadingMessage,C=b.minMenuHeight,E=b.maxMenuHeight,P=b.menuIsOpen,T=b.menuPlacement,N=b.menuPosition,k=b.menuPortalTarget,I=b.menuShouldBlockScroll,D=b.menuShouldScrollIntoView,O=b.noOptionsMessage,$=b.onMenuScrollToTop,U=b.onMenuScrollToBottom;if(!P)return null;var B=function(X){var M=x===X.data;return X.innerRef=M?a.getFocusedOptionRef:void 0,Me.createElement(f,Z({},m,X,{isFocused:M}),a.formatOptionLabel(X.data,"menu"))},L;if(this.hasOptions())L=v.render.map(function(V){if(V.type==="group"){V.type;var X=Be(V,["type"]),M="".concat(V.key,"-heading");return Me.createElement(o,Z({},m,X,{Heading:l,headingProps:{id:M,data:V.data},label:a.formatGroupLabel(V.data)}),V.options.map(function(W){return B(W)}))}else if(V.type==="option")return B(V)});else if(S){var A=_({inputValue:w});if(A===null)return null;L=Me.createElement(d,m,A)}else{var R=O({inputValue:w});if(R===null)return null;L=Me.createElement(p,m,R)}var F={minMenuHeight:C,maxMenuHeight:E,menuPlacement:T,menuPosition:N,menuShouldScrollIntoView:D},q=Me.createElement(J2,Z({},m,F),function(V){var X=V.ref,M=V.placerProps,W=M.placement,K=M.maxHeight;return Me.createElement(c,Z({},m,F,{innerRef:X,innerProps:{onMouseDown:a.onMenuMouseDown,onMouseMove:a.onMenuMouseMove},isLoading:S,placement:W}),Me.createElement(qpe,{isEnabled:j,onTopArrive:$,onBottomArrive:U},Me.createElement(Lpe,{isEnabled:I},Me.createElement(h,Z({},m,{innerRef:a.getMenuListRef,isLoading:S,maxHeight:K}),L))))});return k||N==="fixed"?Me.createElement(u,Z({},m,{appendTo:k,controlElement:this.controlRef,menuPlacement:T,menuPosition:N}),q):q}},{key:"renderFormField",value:function(){var a=this,s=this.props,o=s.delimiter,l=s.isDisabled,c=s.isMulti,h=s.name,u=this.state.selectValue;if(!(!h||l))if(c)if(o){var d=u.map(function(m){return a.getOptionValue(m)}).join(o);return Me.createElement("input",{name:h,type:"hidden",value:d})}else{var p=u.length>0?u.map(function(m,g){return Me.createElement("input",{key:"i-".concat(g),name:h,type:"hidden",value:a.getOptionValue(m)})}):Me.createElement("input",{name:h,type:"hidden"});return Me.createElement("div",null,p)}else{var f=u[0]?this.getOptionValue(u[0]):"";return Me.createElement("input",{name:h,type:"hidden",value:f})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?Me.createElement(kpe,{"aria-live":"polite"},Me.createElement("span",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),Me.createElement("span",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var a=this.components,s=a.Control,o=a.IndicatorsContainer,l=a.SelectContainer,c=a.ValueContainer,h=this.props,u=h.className,d=
33h.id,p=h.isDisabled,f=h.menuIsOpen,m=this.state.isFocused,g=this.commonProps=this.getCommonProps();return Me.createElement(l,Z({},g,{className:u,innerProps:{id:d,onKeyDown:this.onKeyDown},isDisabled:p,isFocused:m}),this.renderLiveRegion(),Me.createElement(s,Z({},g,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:p,isFocused:m,menuIsOpen:f}),Me.createElement(c,Z({},g,{isDisabled:p}),this.renderPlaceholderOrValue(),this.renderInput()),Me.createElement(o,Z({},g,{isDisabled:p}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),r})(y.Component);r0.defaultProps=afe;function ofe(e){var t=lfe();return function(){var i=wr(e),a;if(t){var s=wr(this).constructor;a=Reflect.construct(i,arguments,s)}else a=i.apply(this,arguments);return js(this,a)}}function lfe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var cfe={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},mM=function(t){var r,i;return i=r=(function(a){Ha(o,a);var s=ofe(o);function o(){var l;la(this,o);for(var c=arguments.length,h=new Array(c),u=0;u<c;u++)h[u]=arguments[u];return l=s.call.apply(s,[this].concat(h)),l.select=void 0,l.state={inputValue:l.props.inputValue!==void 0?l.props.inputValue:l.props.defaultInputValue,menuIsOpen:l.props.menuIsOpen!==void 0?l.props.menuIsOpen:l.props.defaultMenuIsOpen,value:l.props.value!==void 0?l.props.value:l.props.defaultValue},l.onChange=function(d,p){l.callProp("onChange",d,p),l.setState({value:d})},l.onInputChange=function(d,p){var f=l.callProp("onInputChange",d,p);l.setState({inputValue:f!==void 0?f:d})},l.onMenuOpen=function(){l.callProp("onMenuOpen"),l.setState({menuIsOpen:!0})},l.onMenuClose=function(){l.callProp("onMenuClose"),l.setState({menuIsOpen:!1})},l}return Pi(o,[{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"getProp",value:function(c){return this.props[c]!==void 0?this.props[c]:this.state[c]}},{key:"callProp",value:function(c){if(typeof this.props[c]=="function"){for(var h,u=arguments.length,d=new Array(u>1?u-1:0),p=1;p<u;p++)d[p-1]=arguments[p];return(h=this.props)[c].apply(h,d)}}},{key:"render",value:function(){var c=this,h=this.props;h.defaultInputValue,h.defaultMenuIsOpen,h.defaultValue;var u=Be(h,["defaultInputValue","defaultMenuIsOpen","defaultValue"]);return Me.createElement(t,Z({},u,{ref:function(p){c.select=p},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")}))}}]),o})(y.Component),r.defaultProps=cfe,i},dfe=mM(r0);function ufe(e){var t=hfe();return function(){var i=wr(e),a;if(t){var s=wr(this).constructor;a=Reflect.construct(i,arguments,s)}else a=i.apply(this,arguments);return js(this,a)}}function hfe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function ET(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,i)}return r}function pfe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ET(Object(r),!0).forEach(function(i){Ct(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ET(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}var TT=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0,i=String(t).toLowerCase(),a=String(r.value).toLowerCase(),s=String(r.label).toLowerCase();return a===i||s===i},ffe={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,r,i){return!(!t||r.some(function(a){return TT(t,a)})||i.some(function(a){return TT(t,a)}))},getNewOptionData:function(t,r){return{label:r,value:t,__isNew__:!0}}},mfe=pfe({allowCreateWhileLoading:!1,createOptionPosition:"last"},ffe),gfe=function(t){var r,i;return i=r=(function(a){Ha(o,a);
33var s=ufe(o);function o(l){var c;la(this,o),c=s.call(this,l),c.select=void 0,c.onChange=function(u,d){var p=c.props,f=p.getNewOptionData,m=p.inputValue,g=p.isMulti,x=p.onChange,v=p.onCreateOption,b=p.value,j=p.name;if(d.action!=="select-option")return x(u,d);var w=c.state.newOption,S=Array.isArray(u)?u:[u];if(S[S.length-1]===w){if(v)v(m);else{var _=f(m,m),C={action:"create-option",name:j};x(g?[].concat(xr(Zp(b)),[_]):_,C)}return}x(u,d)};var h=l.options||[];return c.state={newOption:void 0,options:h},c}return Pi(o,[{key:"UNSAFE_componentWillReceiveProps",value:function(c){var h=c.allowCreateWhileLoading,u=c.createOptionPosition,d=c.formatCreateLabel,p=c.getNewOptionData,f=c.inputValue,m=c.isLoading,g=c.isValidNewOption,x=c.value,v=c.options||[],b=this.state.newOption;g(f,Zp(x),v)?b=p(f,d(f)):b=void 0,this.setState({newOption:b,options:(h||!m)&&b?u==="first"?[b].concat(xr(v)):[].concat(xr(v),[b]):v})}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"render",value:function(){var c=this,h=this.state.options;return Me.createElement(t,Z({},this.props,{ref:function(d){c.select=d},options:h,onChange:this.onChange}))}}]),o})(y.Component),r.defaultProps=mfe,i},vfe=gfe(r0),bfe=mM(vfe);class Si extends y.Component{constructor(){super(...arguments),this.state={selectedOption:this.props.value||null},this.handleChange=(t,r)=>{let i;switch(this.props.isProviderField?this.props.isUserFormProvider?i="company.provider":this.props.isManagerField?i="relationshipManagerId":this.props.isDefaultManagerField?i="defaultManagerId":this.props.isUserManagerField?i="company.relationshipManagerId":i="provider":this.props.isInviterField?i="inviter":i="orgName",this.setState({selectedOption:t?t.value:null}),r.action){case"clear":return this.props.handleSelection(!1),(this.props.placeholder==="Company"||this.props.placeholder==="Relationship Manager")&&this.props.setFieldValue(i,""),this.props.changeOption(null);case"create-option":return this.props.handleSelection(t.value),this.props.setFieldValue(i,t.value),this.props.changeOption(null);default:return this.props.handleSelection(!0),(this.props.placeholder==="Company"||this.props.placeholder==="Relationship Manager")&&this.props.setFieldValue(i,t.value),this.props.changeOption(t.value)}}}componentDidUpdate(t){this.props.value!==t.value&&this.setState({selectedOption:this.props.value})}render(){const t=(this.props.opts||[]).map(i=>({label:this.props.placeholder==="Company"?i.name:i.email,value:i.id})),r={singleValue:i=>(i.color="rgba(0,0,0,0.87)",i.fontSize="16px",i.fontWeight="600",i)};return this.props.placeholder==="Company"||this.props.placeholder==="Relationship Manager"?n.jsx(bfe,{name:this.props.field.name,value:t.filter(i=>i.value===this.state.selectedOption)[0],onChange:this.handleChange,options:t,isClearable:!0,placeholder:this.props.placeholder,blurInputOnSelect:!0,className:"creatable",classNamePrefix:"creatable",styles:r}):n.jsx(dfe,{name:this.props.field.name,value:t.filter(i=>i.value===this.state.selectedOption)[0],onChange:this.handleChange,options:t,placeholder:this.props.placeholder,blurInputOnSelect:!0,className:"creatable",classNamePrefix:"creatable",styles:r})}}var Ep={exports:{}},yfe=Ep.exports,kT;function xfe(){return kT||(kT=1,(function(e,t){(function(r,i){e.exports=i()})(yfe,(function(){var r="minute",i=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(s,o,l){var c=o.prototype;l.utc=function(g){var x={date:g,utc:!0,args:arguments};return new o(x)},c.utc=function(g){var x=l(this.toDate(),{locale:this.$L,utc:!0});return g?x.add(this.utcOffset(),r):x},c.local=function(){return l(this.toDate(),{locale:this.$L,utc:!1})};var h=c.parse;c.parse=function(g){g.utc&&(this.$u=!0),this.$utils().u(g.$offset)||(this.$offset=g.$offset),h.call(this,g)};var u=c.init;c.init=function(){if(this.$u){var g=this.$d;this.$y=g.getUTCFullYear(),this.$M=g.getUTCMonth(),this.$D=g.getUTCDate(),this.$W=g.getUTCDay(),this.$H=g.getUTCHours(),this.$m=g.getUTCMinutes(),this.$s=g.getUTCSeconds(),this.$ms=g.getUTCMilliseconds()}else u.call(this)};var d=c.utcOffset;c.utcOffset=function(g,x){var v=this.$utils().u;if(v(g))return this.$u?0:v(this.$offset)?d.call(this):this.$offset;if(typeof g=="string"&&(g=(function(S){S===void 0&&(S="");var _=S.match(i);if(!_)return null;var C=(""+_[0]).match(a)||["-",0,0],E=C[0],P=60*+C[1]+ +C[2];return P===0?0:E==="+"?P:-P})(g),g===null))return this;var b=Math.abs(g)<=16?60*g:g;if(b===0)return this.utc(x);var j=this.clone();if(x)return j.$offset=b,j.$u=!1,j;var w=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(j=this.local().add(b+w,r)).$offset=b,j.$x.$localOffset=w,j};var p=c.format;c.format=function(g){var x=g||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return p.call(this,x)},c.valueOf=function(){var g=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*g},c.isUTC=function(){return!!this.$u},c.toISOString=function(){return this.toDate().toISOString()},c.toString=function(){return this.toDate().toUTCString()};var f=c.toDate;c.toDate=function(g){return g==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var m=c.diff;c.diff=function(g,x,v){if(g&&this.$u===g.$u)return m.call(this,g,x,v);var b=this.local(),j=l(g).local();return m.call(b,j,x,v)}}}))})(Ep)),Ep.exports}var jfe=xfe();const wfe=Zt(jfe);Qt.extend(MA);Qt.extend(AA);Qt.extend(wfe);const Ul=({setFieldValue:e,name:t,errors:r,touched:i,values:a})=>{const[s,o]=y.useState(!0),l=Pm(a,t),c=l?Qt(l).format("YYYY-MM-DDTHH:mm"):"",h=d=>{const p=d.target.value;if(!p){e(t,""),o(!0);return}const f=Qt(p);f.isValid()?(o(!0),e(t,f.format("YYYY-MM-DDTHH:mm:ss"))):(o(!1),e(t,l))},u=Pm(r,t)&&Pm(i,t);return n.jsxs(n.Fragment,{children:[!s&&n.jsx("div",{className:"input-feedback",children:"Invalid date, please enter a new date"}),n.jsx(me,{name:t,type:"hidden"}),n.jsx("input",{type:"datetime-local",id:t,className:u?"text-input error":"text-input",value:c,onChange:h}),l&&n.jsx("i",{className:"material-icons",id:"clear-datepicker","diagnostic-id":"date-clear-btn",onClick:()=>{e(t,""),o(!0)},children:"close"})]})},Ao=(e,t,r,i,a,s)=>n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:t}),r[e]&&i[e]&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:r[e]}),n.jsx(me,{type:"text",name:e,id:e,"diagnostic-id":s,placeholder:t,className:r[e]&&i[e]?"text-input error":"",disabled:a})]},e),zx=(e,t,r)=>n.jsxs("div",{children:[n.jsx("label",{children:t}),n.jsx("input",{disabled:!0,value:r[e]||""})]},e),PT=(e,t,r,i,a)=>n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:t}),r.company&&i.company&&r.company[e]&&i.company[e]&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:r.company[e]}),n.jsx(me,{type:"text",name:`company.${e}`,id:e,placeholder:t,value:a.company[e]||"",className:r.company&&i.company&&r.company[e]&&i.company[e]?"text-input error":""})]},e);function gM({orgs:e,orgName:t,selectedOrg:r,picture:i,setPic:a,errors:s,touched:o,setFieldValue:l,setFieldError:c,handleChange:h,values:u,isSubmitting:d,handleSelection:p,changeOption:f,showDisabledFields:m,currentOrg:g,isCreateOrg:x,options:v,setOptions:b,dropDownOptions:j,...w}){const{aumOnKeyDown:S,aumOnFocus:_,aumOnBlur:C}=_D(l,"aum",u),{Partner:E,Community:P,Advisor:T,Enterprise:N,SponsoredCommunity:k}=Br,I=(D,O)=>{const $=[...j.filter(U=>U.value===D),...j.filter(U=>U.value!==D)];b($),D===T||D===E||D===N?(O("studioPermissions","Advisor"),O("engagePermissions","Advisor"),O("composerPermissions","Advisor"),O("chartbookPermissions","Advisor"),O("hedwigPermissions","Advisor")):D===k?(O("composerPermissions","Sponsored-Community"),O("chartbookPermissions","Sponsored-Community"),O("hedwigPermissions","Community"),O("studioPermissions","Disabled"),O("engagePermissions","Disabled")):(O("composerPermissions","Community"),O("chartbookPermissions","Community"),O("hedwigPermissions","Community"),O("studioPermissions","Disabled"),O("engagePermissions","Disabled"))};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Organization Name*"}),n.jsx(me,{component:Si,id:"orgName",name:"orgName",handleSelection:p,placeholder:"Company",value:t,changeOption:f,setFieldValue:l,opts:t?[...e,{name:t,id:t}]:e},d)]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Organization Type*"}),s.orgType&&o.orgType&&n.jsx("div",{className:"input-feedback",children:s.orgType}),n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"orgType","diagnostic-id":"org-type-select",required:!0,children:[n.jsx("option",{className:"disabled-option",hidden:!0,disabled:!0,value:"",children:"Select an organization type"}
33),n.jsx("option",{value:"Advisor",children:"Advisor"}),n.jsx("option",{value:"Enterprise",children:"Enterprise"})]}),n.jsx(dt,{icon:Mt})]})]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"License Status*"}),s.status&&o.status&&n.jsx("div",{className:"input-feedback",children:s.status}),n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"status","diagnostic-id":"license-status-select",required:!0,children:[n.jsx("option",{className:"disabled-option",hidden:!0,disabled:!0,value:"",children:"Select an license status"}),n.jsx("option",{value:"Active",children:"Active"}),n.jsx("option",{value:"Trial",children:"Trial"}),n.jsx("option",{value:"Trial Ended",children:"Trial Ended"}),n.jsx("option",{value:"Canceled",children:"Canceled"})]}),n.jsx(dt,{icon:Mt})]})]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"License Type*"}),s.licenseType&&o.licenseType&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:s.licenseType}),n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"licenseType","diagnostic-id":"license-type-select",required:!0,onChange:D=>{const O=D.target.value;l("licenseType",O),I(O,l)},children:[n.jsx("option",{className:"disabled-option",hidden:!0,disabled:!0,value:"",children:"Select an organization type"}),n.jsx("option",{value:"Advisor",children:"Advisor"}),n.jsx("option",{value:"Partner",children:"Partner"}),n.jsx("option",{value:"Enterprise",children:"Enterprise"}),n.jsx("option",{value:"Community",children:"Community"}),n.jsx("option",{value:"Sponsored-Community",children:"Sponsored Community"})]}),n.jsx(dt,{icon:Mt})]})]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"License Start Date"}),n.jsx(Ul,{setFieldValue:l,name:"licenseStartDate",errors:s,touched:o,values:u})," "]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"License End Date"}),n.jsx(Ul,{setFieldValue:l,name:"licenseEndDate",errors:s,touched:o,values:u})," "]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsxs("label",{children:["AUM (Millions) -"," ",n.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://www.adviserinfo.sec.gov/",children:"IAPD LOOK UP"})]}),s.aum&&o.aum&&n.jsx("div",{className:"input-feedback",children:s.aum}),n.jsx(me,{type:"text",name:"aum",id:"aum",placeholder:"AUM","diagnostic-id":"aum-input",onKeyDown:S,onFocus:_,onBlur:C,className:s.aum&&o.aum?"text-input error":""})]}),[["zipCode","Zip Code","zip-code-input"],["city","City","city-input"],["state","State/Region","state-input"],["website","Organization Website","website-input"]].map(D=>Ao(D[0],D[1],s,o,!1,D[2])),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Billing Type*"}),s.billingType&&o.billingType&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:s.billingType}),n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"billingType","diagnostic-id":"billing-type-select",required:!0,children:[n.jsx("option",{value:"Automated",children:"Automated"}),n.jsx("option",{value:"Invoice",children:"Invoice"}),n.jsx("option",{value:"Provider",children:"Provider"})]}),n.jsx(dt,{icon:Mt})]})]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Billing System*"}),s.billingSystem&&o.billingSystem&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:s.billingSystem}),n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"billingSystem","diagnostic-id":"billing-system-select",required:!0,children:[n.jsx("option",{value:"Stripe",children:"Stripe"}),n.jsx("option",{value:"Quickbooks",children:"Quickbooks"})]}),n.jsx(dt,{icon:Mt})]})]}),[["billingSystemUserId","Billing System ID","billing-system-user-id-input"]].map(D=>Ao(D[0],D[1],s,o,!1,D[2])),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Credit Card Last 4"}),n.jsx(me,{type:"text",name:"billingLast4",id:"billingLast4",placeholder:"",disabled:!0})]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"CC Expiration Month"}),n.jsx(me,{type:"text",name:"billingExpMonth",id:"billingExpMonth",placeholder:"",disabled:!0})]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"CC Expiration Year"}),n.jsx(me,{type:"text",name:"billingExpYear",id:"billingExpYear",placeholder:"",disabled:!0})]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Billing Email"}),n.jsx(me,{type:"text",name:"billingEmail",id:"billingEmail",placeholder:"",disabled:!0})]}),m&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Organization ID"}),n.jsx("input",{type:"text",name:"id",id:"id",disabled:!0,value:g.id||""})]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Organization Status"}),n.jsx("input",{type:"text",name:"status",id:"status","diagnostic-id":"org-status-input",disabled:!0,value:g.organization_status&&g.organization_status.toUpperCase()||""})]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Org Created"}),n.jsx("input",{type:"text",name:"creation",id:"creation",disabled:!0,value:Qt(g.create_datetime).local().format("MMMM DD, YYYY")})]})]}),n.jsxs("div",{className:"user-detail-container image-upload",children:[n.jsx("label",{className:"file-label",children:"Organization Logo"}),s.logo&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:s.logo}
33),n.jsx("input",{id:"logo","diagnostic-id":"org-logo-input",name:"logo",type:"file",alt:"organization-picture",accept:"image/png,image/x-png,image/jpeg",value:i?i.name:"",onChange:D=>{qs(D.currentTarget.files[0],s,a,u,c,null,"logo",l)}}),i&&n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",className:"btn-cancel",onClick:()=>{qs(null,s,a,u,c,null,"logo",l)},children:"Clear"}),n.jsx("div",{id:"logo-pic",children:n.jsx("img",{alt:"logo","diagnostic-id":"org-logo-img",src:i})})]})]}),n.jsxs("div",{className:"disclosures-container",children:[n.jsx("label",{children:"Organization Disclosures"}),n.jsx(me,{id:"disclosures",name:"disclosures",placeholder:"Company disclosures",onChange:h,value:u.disclosures,component:Ra})]}),x&&n.jsxs(n.Fragment,{children:[u.licenseType===E&&n.jsxs("div",{className:"partner-settings-form",children:[n.jsx("h5",{children:"Partner Settings"}),n.jsxs("div",{className:"partner-settings-group",children:[n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Enable partner capabilities for this organization*"}),n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"partnerPermissions",children:[n.jsx("option",{value:"Disabled",children:"Disabled"}),n.jsx("option",{value:"Standard",children:"Standard"})]}),n.jsx(dt,{icon:Mt})]})]}),u.partnerPermissions!=="Disabled"&&n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Partner Stub*"}),n.jsx(me,{name:"partnerStub",placeholder:"Partner stub",onChange:h,"diagnostic-id":"partner-stub-input"}
33),o.partnerStub&&s.partnerStub&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:s.partnerStub})]})]})]}),n.jsxs("div",{className:"engage-settings-form",children:[n.jsx("h5",{children:"Engage Settings"}),n.jsxs("div",{className:"engage-settings-group",children:[n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Enable Engage for this organization*"}),n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"engagePermissions",children:[n.jsx("option",{value:"Disabled",children:"Disabled"}),n.jsx("option",{value:"Trial",children:"Trial"}),n.jsx("option",{value:"Advisor",children:"Advisor"}),n.jsx("option",{value:"Marketing",children:"Marketing"})]}),n.jsx(dt,{icon:Mt})]})]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Company Engage Subdomain*"}),n.jsx(me,{name:"engageSubdomain",placeholder:"Company Engage Subdomain",onChange:h,maxLength:"50","diagnostic-id":"engage-subdomain-input"}),o.engageSubdomain&&s.engageSubdomain&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:s.engageSubdomain}),n.jsx("div",{className:"subdomain-preview","diagnostic-id":"subdomain-preview",children:`URL preview: https://${u.engageSubdomain||""}.advisorlibrary.com`})]})]}),n.jsx("div",{children:"Domain whitelist:"}),typeof s.engageDomainWhitelist=="string"?n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:s.engageDomainWhitelist}):null,n.jsx(fu,{name:"engageDomainWhitelist",render:D=>n.jsxs("div",{className:"domain-whitelist-container",children:[u?.engageDomainWhitelist?.map((O,$)=>n.jsxs("div",{className:"domain-whitelist",children:[n.jsx(me,{name:`engageDomainWhitelist.${$}`,"diagnostic-id":`engage-domain-whitelist-${$}`}),n.jsx("i",{className:"material-icons",onClick:()=>D.remove($),children:"close"})]},$)),n.jsxs("button",{type:"button",className:"btn-primary-icon-text add-domain-btn",onClick:()=>D.push(""),children:[n.jsx("i",{className:"material-icons",children:"add"}),"Add a domain"]})]})})]}),n.jsxs("div",{className:"settings-form-container",children:[n.jsxs("div",{className:"settings-form-grp",children:[n.jsxs("div",{className:"form-header-label",children:[n.jsx("h5",{children:"Two-Factor Authentication Settings"}),n.jsx("label",{children:"Select authentication method for this organization*"})]}),n.jsx("div",{className:"user-detail-container",children:n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"twoFactorAuthPermissions",children:[n.jsx("option",{value:"Any Required",children:"Email OTP or Authenticator App"}),n.jsx("option",{value:"TOTP Only",children:"Authenticator App Only"}),n.jsx("option",{value:"OTP Only",children:"OTP Only"}),n.jsx("option",{value:"Not Required",children:"Not Required"})]}),n.jsx(dt,{icon:Mt})]})})]}),n.jsxs("div",{className:"settings-form-grp",children:[n.jsxs("div",{className:"form-header-label",children:[n.jsx("h5",{children:"Hedwig Settings"}),n.jsx("label",{children:"Enable Hedwig for this organization.*"})]}),n.jsx("div",{className:"user-detail-container",children:n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"hedwigPermissions",children:[v.map(D=>n.jsx("option",{value:D.value,children:D.value},D.value)),n.jsx("option",{value:"Disabled",children:"Disabled"})]}),n.jsx(dt,{icon:Mt})]})})]}),n.jsxs("div",{className:"settings-form-grp",children:[n.jsxs("div",{className:"form-header-label",children:[n.jsx("h5",{children:"Chartbook Settings"}),n.jsx("label",{children:"Enable Chartbook for this organization.*"})]}),n.jsx("div",{className:"user-detail-container",children:n.jsxs("div",{className:"dropdown-container",children:[n.jsx(me,{component:"select",name:"chartbookPermissions",children:v.map(D=>n.jsx("option",{value:D.value,children:D.value},D.value))}),n.jsx(dt,{icon:Mt})]})})]}),n.jsxs("div",{className:"settings-form-grp",children:[n.jsxs("div",{className:"form-header-label",children:[n.jsx("h5",{children:"Composer Settings"}),n.jsx("label",{children:"Enable Composer for this organization.*"})]}),n.jsx("div",{className:"user-detail-container",children:n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"composerPermissions",children:[v.map(D=>n.jsx("option",{value:D.value,children:D.value},D.value)),n.jsx("option",{value:"Disabled",children:"Disabled"})]}),n.jsx(dt,{icon:Mt})]})})]}),n.jsxs("div",{className:"settings-form-grp",children:[n.jsxs("div",{className:"form-header-label",children:[n.jsx("h5",{children:"Studio Settings"}),n.jsx("label",{children:"Enable Studio for this organization. Engage must be enabled for Studio to function*"})]}),n.jsx("div",{className:"user-detail-container",children:n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"studioPermissions",children:[n.jsx("option",{value:"Disabled",children:"Disabled"}),n.jsx("option",{value:"Trial",children:"Trial"}
33),n.jsx("option",{value:"Advisor",children:"Advisor"}),n.jsx("option",{value:"Compliance",children:"Compliance"}),n.jsx("option",{value:"Marketing",children:"Marketing"})]}),n.jsx(dt,{icon:Mt})]})})]})]})]})]})}function Sfe({validationSchema:e,initialValues:t,selectedOrg:r,setOrg:i,setOrgId:a,picture:s,setPic:o,providerId:l,changeProviderOption:c,managerId:h,setManagerId:u,...d}){const p=[{value:"Advisor"},{value:"Community"},{value:"Sponsored-Community"}],[f,m]=y.useState(p),g=d.orgs.filter(v=>v.can_provide),x=d.relationshipManagers.filter(v=>v.company?.id===l&&v.status==="active");return n.jsxs("div",{className:"container",children:[n.jsx("div",{className:"back-link-wrapper",children:n.jsxs(Ze,{to:{pathname:"/admin",search:"?view=orgs"},className:"back-link",children:[n.jsx(ir,{}),n.jsx("span",{children:"Back to Organizations"})]})}),n.jsx(gt,{validationSchema:e,initialValues:t,onSubmit:(v,{setSubmitting:b,setErrors:j,resetForm:w})=>{d.createOrg(v).then(()=>{d.createMessage({alertMessage:"Organization has been successfully created"}),w(),o(null),c(null),u(null)},S=>{d.createMessage({errorMessage:"There was an error creating this organization"}),b(!1)})},children:({values:v,errors:b,touched:j,handleChange:w,isSubmitting:S,setFieldValue:_,dirty:C,setFieldError:E})=>{const P={selectedOrg:r,setOrg:i,setOrgId:a,picture:s,setPic:o,...d};return n.jsx("div",{className:"create-user-wrapper",children:n.jsx(vt,{autoComplete:"off",children:n.jsxs("div",{className:"user-details",children:[n.jsx("h5",{children:"Create Organization"}),n.jsxs("div",{id:"user-details-container",children:[n.jsx(gM,{...P,orgName:d.orgName,orgs:d.orgs,isSubmitting:S,handleSelection:i,changeOption:a,errors:b,touched:j,setFieldValue:_,setFieldError:E,handleChange:w,values:v,isCreateOrg:!0,options:f,setOptions:m,dropDownOptions:p}),n.jsxs("div",{className:"select-provider-form",children:[n.jsx("h5",{children:"Service Provider Settings"}),n.jsx("div",{children:"Select a provider for this company*"}),n.jsx(me,{component:mt,name:"hasProvider",id:"false",label:"None"}),n.jsx(me,{component:mt,name:"hasProvider",id:"true",label:"Select a provider"})]}),v.hasProvider==="true"&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Access Provided By"}),n.jsx(me,{component:Si,name:"provider",handleSelection:T=>null,changeOption:c,placeholder:"Company",value:l||void 0,setFieldValue:_,opts:g,isProviderField:!0})," "]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Provided License Type"}),n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"providedType",children:[n.jsx("option",{value:"Advisor",children:"Advisor"}),n.jsx("option",{value:"Enterprise",children:"Enterprise"})]}),n.jsx(dt,{icon:Mt})]})]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Select Relationship Manager"}),n.jsx(me,{component:Si,name:"relationshipManagerId",handleSelection:T=>null,changeOption:u,placeholder:"Relationship Manager",value:h||void 0,setFieldValue:_,opts:x,isProviderField:!0,isManagerField:!0})," "]})]}),n.jsx("div",{className:"row",children:n.jsxs("div",{className:"form-group",style:{textAlign:"right",padding:"20px"},children:[n.jsx("button",{type:"button",className:"btn-cancel",onClick:()=>d.history.push("/admin?view=orgs"),children:"CANCEL"}),n.jsx("button",{type:"submit",disabled:!C||!!Object.keys(b).length||!r||S,"diagnostic-id":"org-create-btn",className:"btn btn-primary",children:"CREATE"})]})})]})]})})})}})]})}function _fe(e){const{currentOrg:t,relationshipManagers:r}=e,i=a=>{e.history.push(`/admin/relationshipmanagers/${a}`)};if(t&&r){const a=t.name,s=r.filter(h=>h.company?.id===t?.id),o=["Id","First","Last","E-mail","Job Title","Status",{name:"",options:{filter:!1,sort:!1,empty:!0,customBodyRender:(h,u,d)=>n.jsx("i",{className:"material-icons",onClick:()=>{i(u.rowData[0])},children:"edit"})}}],l=s.map(h=>[h.id,h.first_name,h.last_name,h.email,h.title,h.status]),c={filterType:"dropdown",responsive:"scrollMaxHeight",download:!1,print:!1,selectableRows:"none"};return n.jsx("div",{className:"org-detail-users-container relationship-manager",children:n.jsx(ps,{title:a+" Relationship Managers",data:l,columns:o,options:c,showLinkBtn:!0,linkBtnText:"Add Manager",linkBtnTo:{pathname:"/admin/relationshipmanagers/new",state:{orgId:t.id}},linkBtnDiagId:"manager-add-btn"})})}else return null}const Cfe=e=>({orgs:e.admin.organizations,relationshipManagers:e.admin&&e.admin.relationshipManagers}),Nfe=Jt(le(Cfe,{})(_fe));class Efe extends y.Component{constructor(t){super(t),this.handleEdit=r=>{this.props.history.push({pathname:`/admin/users/${r}`})},t.getAllCompanyUsers(t.companyId)}componentDidUpdate(t){this.props.companyId!==t.companyId&&this.props.getAllCompanyUsers(this.props.companyId)}
33render(){if(this.props.companyUsers&&this.props.orgs){const t=this.props.orgs.filter(c=>c.id===this.props.companyId)[0],r=t&&t.name,i=this.props.companyUsers,a=this,s=["User Id","First","Last","E-mail","Role","Status","Last Login",{name:"",options:{filter:!1,sort:!1,empty:!0,customBodyRender:(c,h,u)=>n.jsx("i",{className:"material-icons",onClick:()=>{a.handleEdit(h.rowData[0])},children:"edit"})}}],o=i.map(c=>[c.id,c.first_name,c.last_name,c.email,c.account_role[0]?.name,c.account_status,Qt(c.last_active_datetime).format("MM/DD/YYYY h:MMa")]),l={filterType:"dropdown",responsive:"scrollMaxHeight",download:!1,print:!1,selectableRows:"none"};return n.jsx("div",{className:"org-detail-users-container",children:n.jsx(ps,{title:r+" Users",data:o,columns:s,options:l,showLinkBtn:!0,linkBtnText:"Add User",linkBtnTo:{pathname:"/admin/users/new",state:{orgId:this.props.companyId}},linkBtnDiagId:"user-add-btn"})})}else return null}}const Tfe=e=>({orgs:e.admin.organizations,companyUsers:e.admin.companyUsers}),kfe=Jt(le(Tfe,{getAllCompanyUsers:Zne})(Efe));class Pfe extends y.Component{constructor(){super(...arguments),this.handleEdit=t=>{this.props.history.push({pathname:`/admin/orgs/${t}`})}}render(){const t=this.props.orgs.filter(l=>l.id===this.props.companyId)[0],r=t&&t.name,i=this,a=["Org Id","Organization Name","Active Users","License Type",{name:"",options:{filter:!1,sort:!1,empty:!0,customBodyRender:(l,c,h)=>n.jsx("i",{className:"material-icons",onClick:()=>{i.handleEdit(c.rowData[0])},children:"edit"})}}],s=this.props.orgs.slice(0,5).map(l=>[l.id,l.name,l.user_count===0?"":l.user_count,l.license_type?.name??""]),o={filterType:"dropdown",responsive:"scrollMaxHeight",download:!1,print:!1,selectableRows:"none"};return n.jsx("div",{className:"org-provider-orgs-container",children:n.jsx(ps,{title:r+" Users",data:s,columns:a,options:o,showLinkBtn:!0,linkBtnText:"Add Organization",linkBtnTo:"/admin/orgs/new",linkBtnDiagId:"user-add-btn"})})}}const Ife=e=>({orgs:e.admin.organizations});Jt(le(Ife,{})(Pfe));const Dfe=({setModal:e,reprocessCharts:t,orgId:r})=>n.jsx(ot,{setModal:e,children:n.jsxs("div",{className:"delete-modal-container",children:[n.jsx("h5",{children:"Reprocess this Company's Charts?"}),n.jsx("p",{children:"This will reprocess all of the charts and chartbooks for this company. Are you sure you want to proceed?"}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel",onClick:()=>e(!1),children:"Cancel"}),n.jsx("button",{type:"button",className:"btn-danger",onClick:()=>t(r).then(()=>e(!1)),children:"Reprocess"})]})]})}),Rfe=e=>({}),Ofe=le(Rfe,{reprocessCharts:pre})(Dfe);function Afe({validationSchema:e,initialValues:t,companyId:r,selectedOrg:i,handleSelection:a,changeOption:s,currentOrg:o,picture:l,setPic:c,modal:h,setModal:u,providerId:d,changeProviderOption:p,providerLogo:f,setProviderLogo:m,managerId:g,setManagerId:x,defaultManagerId:v,setDefaultManagerId:b,...j}){const w=j.orgs.filter(T=>T.can_provide),S=(j.relationshipManagers||[]).filter(T=>(T.company?.id===d||T.company?.id===o?.id)&&T.status==="active"),{Partner:_}=Br,C=[{value:"Advisor"},{value:"Community"},{value:"Sponsored-Community"}],[E,P]=y.useState(C);return n.jsxs("div",{className:"container",children:[n.jsx("div",{className:"back-link-wrapper",children:n.jsxs(Ze,{to:{pathname:"/admin",search:"?view=orgs"},className:"back-link",children:[n.jsx(ir,{}),n.jsx("span",{children:"Back to Organizations"})]})}),n.jsx(gt,{enableReinitialize:!0,validationSchema:e,initialValues:t,onSubmit:(T,{setSubmitting:N,resetForm:k})=>{T.aum=!T.aum||typeof T.aum=="number"?T.aum:parseInt(T.aum.split(",").join("")),j.updateOrg(r,T,o?.can_provide).then(I=>{j.createMessage({alertMessage:"Organization has been successfully updated"}),k(T)},I=>{I.response.data.detail?j.createMessage({errorMessage:I.response.data.detail}):j.createMessage({errorMessage:"There was an error updating this organization"}),N(!1)})},children:({values:T,errors:N,touched:k,isSubmitting:I,setFieldValue:D,handleChange:O,dirty:$,setFieldError:U})=>{const B={selectedOrg:i,picture:l,setPic:c,providerLogo:f,setProviderLogo:m,...j};return n.jsxs("div",{className:"create-user-wrapper",children:[n.jsx(vt,{autoComplete:"off",children:n.jsxs("div",{className:"user-details",children:[n.jsx("h5",{children:"Select Organization"}),n.jsxs("div",{id:"user-details-container",children:[n.jsx(gM,{...B,orgName:j.orgName,orgs:j.orgs,isSubmitting:I,handleSelection:a,changeOption:s,errors:N,touched:k,setFieldValue:D,setFieldError:U,handleChange:O,currentOrg:o,showDisabledFields:!0,values:T,options:E,setOptions:P,dropDownOptions:C}),n.jsx(kfe,{companyId:r}),o.can_provide&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"user-detail-container image-upload",id:"provider-detail-container",children:[n.jsx("h5",{className:"file-label",children:"Provider Display Details"}),n.jsx("div",{children:"Provided By Logo"}),N.providedByLogo&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:N.providedByLogo}),n.jsx("input",{id:"providedByLogo","diagnostic-id":"provider-logo-input",n
33ame:"providedByLogo",type:"file",alt:"provider-logo-picture",accept:"image/png,image/x-png,image/jpeg",value:f?f.name:"",onChange:L=>{qs(L.currentTarget.files[0],N,m,T,U,null,"providedByLogo",D)}}),f&&n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"provider-logo-clear-btn",onClick:()=>{qs(null,N,m,T,U,null,"providedByLogo",D)},children:"Clear"}),n.jsx("div",{id:"provider-logo-pic",children:n.jsx("img",{alt:"provider-logo","diagnostic-id":"provider-org-logo-img",src:f})})]})]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("div",{children:"Provided By Website Link"}),n.jsx(me,{type:"text",name:"providedByWebsite",id:"providedByWebsite","diagnostic-id":"providedByWebsite"})]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("div",{children:"Select Default Relationship Manager"}),n.jsx(me,{component:Si,name:"defaultManagerId",handleSelection:L=>null,changeOption:b,placeholder:"Relationship Manager",value:v||void 0,setFieldValue:D,opts:S,isProviderField:!0,isDefaultManagerField:!0})," "]}),n.jsx(Nfe,{currentOrg:o})]}),T.licenseType===_&&n.jsxs("div",{className:"partner-settings-form",children:[n.jsx("h5",{children:"Partner Settings"}),n.jsxs("div",{className:"partner-settings-group",children:[n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Enable partner capabilities for this organization*"}),n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"partnerPermissions",disabled:!0,children:[n.jsx("option",{value:"Disabled",children:"Disabled"}),n.jsx("option",{value:"Standard",children:"Standard"})]}),n.jsx(dt,{icon:Mt})]})]}),T.partnerPermissions!=="Disabled"&&n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Partner Stub*"}),n.jsx(me,{name:"partnerStub",placeholder:"Partner stub",onChange:O,"diagnostic-id":"partner-stub-input",disabled:!0}),k.partnerStub&&N.partnerStub&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:N.partnerStub})]})]})]}),n.jsxs("div",{className:"settings-form-container",children:[n.jsxs("div",{className:"settings-form-grp",children:[n.jsxs("div",{className:"form-header-label",children:[n.jsx("h5",{children:"Two-Factor Authentication Settings"}),n.jsx("label",{children:"Select authentication method for this organization*"})]}),n.jsx("div",{className:"user-detail-container",children:n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"twoFactorAuthPermissions",children:[n.jsx("option",{value:"Any Required",children:"Email OTP or Authenticator App"}),n.jsx("option",{value:"TOTP Only",children:"Authenticator App Only"}),n.jsx("option",{value:"OTP Only",children:"OTP Only"}),n.jsx("option",{value:"Not Required",children:"Not Required"})]}),n.jsx(dt,{icon:Mt})]})})]}),n.jsxs("div",{className:"settings-form-grp",children:[n.jsxs("div",{className:"form-header-label",children:[n.jsx("h5",{children:"Hedwig Settings"}),n.jsx("label",{children:"Enable Hedwig for this organization.*"})]}),n.jsx("div",{className:"user-detail-container",children:n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"hedwigPermissions",children:[E.map(L=>n.jsx("option",{value:L.value,children:L.value},L.value)),n.jsx("option",{value:"Disabled",children:"Disabled"})]}),n.jsx(dt,{icon:Mt})]})})]}),n.jsxs("div",{className:"settings-form-grp",children:[n.jsxs("div",{className:"form-header-label",children:[n.jsx("h5",{children:"Chartbook Settings"}),n.jsx("label",{children:"Enable Chartbook for this organization.*"})]}),n.jsx("div",{className:"user-detail-container",children:n.jsxs("div",{className:"dropdown-container",children:[n.jsx(me,{component:"select",name:"chartbookPermissions",children:E.map(L=>n.jsx("option",{value:L.value,children:L.value},L.value))}),n.jsx(dt,{icon:Mt})]})})]}),n.jsxs("div",{className:"settings-form-grp",children:[n.jsxs("div",{className:"form-header-label",children:[n.jsx("h5",{children:"Composer Settings"}),n.jsx("label",{children:"Enable Composer for this organization.*"})]}),n.jsx("div",{className:"user-detail-container",children:n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"composerPermissions",children:[E.map(L=>n.jsx("option",{value:L.value,children:L.value},L.value)),n.jsx("option",{value:"Disabled",children:"Disabled"})]}),n.jsx(dt,{icon:Mt})]})})]}),n.jsxs("div",{className:"settings-form-grp",children:[n.jsxs("div",{className:"form-header-label",children:[n.jsx("h5",{children:"Studio Settings"}),n.jsx("label",{children:"Enable Studio for this organization. Engage must be enabled for Studio to function*"})]}),n.jsx("div",{className:"user-detail-container",children:n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"studioPermissions",children:[n.jsx("option",{value:"Disabled",children:"Disabled"}),n.jsx("option",{value:"Trial",children:"Trial"}
33),n.jsx("option",{value:"Advisor",children:"Advisor"}),n.jsx("option",{value:"Compliance",children:"Compliance"}),n.jsx("option",{value:"Marketing",children:"Marketing"})]}),n.jsx(dt,{icon:Mt})]})})]})]}),n.jsxs("div",{className:"engage-settings-form",children:[n.jsx("h5",{children:"Engage Settings"}),n.jsxs("div",{className:"engage-settings-group",children:[n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Enable Engage for this organization*"}),n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"engagePermissions",children:[n.jsx("option",{value:"Disabled",children:"Disabled"}),n.jsx("option",{value:"Trial",children:"Trial"}),n.jsx("option",{value:"Advisor",children:"Advisor"}),n.jsx("option",{value:"Marketing",children:"Marketing"})]}),n.jsx(dt,{icon:Mt})]})]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Company Engage Subdomain*"}),n.jsx(me,{name:"engageSubdomain","diagnostic-id":"engage-subdomain-input",placeholder:"Company Engage Subdomain",onChange:O}),N.engageSubdomain&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:N.engageSubdomain}),n.jsx("div",{className:"subdomain-preview","diagnostic-id":"subdomain-preview",children:`URL preview: https://${T.engageSubdomain}.advisorlibrary.com`})]})]}),n.jsx("div",{children:"Domain whitelist:"}),typeof N.engageDomainWhitelist=="string"?n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:N.engageDomainWhitelist}):null,n.jsx(fu,{name:"engageDomainWhitelist",render:L=>n.jsxs("div",{className:"domain-whitelist-container",children:[T?.engageDomainWhitelist?.map((A,R)=>n.jsxs("div",{className:"domain-whitelist",children:[n.jsx(me,{name:`engageDomainWhitelist.${R}`}),n.jsx("i",{className:"material-icons",onClick:()=>L.remove(R),children:"close"})]},R)),n.jsxs("button",{type:"button",className:"btn-primary-icon-text add-domain-btn",onClick:()=>L.push(""),children:[n.jsx("i",{className:"material-icons",children:"add"}),"Add a domain"]})]})})]}),n.jsxs("div",{className:"select-provider-form",children:[n.jsx("h5",{children:"Service Provider Settings"}),n.jsx("div",{children:"Select a provider for this company*"}),n.jsx(me,{component:mt,name:"hasProvider",id:"false",label:"None"}),n.jsx(me,{component:mt,name:"hasProvider",id:"true",label:"Select a provider"})]}),T.hasProvider==="true"&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Access Provided By"}),n.jsx(me,{component:Si,name:"provider",handleSelection:L=>null,changeOption:p,placeholder:"Company",isProviderField:!0,value:d||void 0,setFieldValue:D,opts:w})," "]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Provided License Type"}),n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"providedType",children:[n.jsx("option",{value:"Advisor",children:"Advisor"}),n.jsx("option",{value:"Enterprise",children:"Enterprise"})]}),n.jsx(dt,{icon:Mt})]})]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Select Relationship Manager"}),n.jsx(me,{component:Si,name:"relationshipManagerId",handleSelection:L=>null,changeOption:x,placeholder:"Relationship Manager",value:g||void 0,setFieldValue:D,opts:S,isProviderField:!0,isManagerField:!0})," "]})]}),n.jsxs("div",{className:"reprocess-org-container",children:[n.jsx("h5",{children:"Reprocess Company Charts"}),n.jsx("button",{type:"button",className:"btn-danger",onClick:()=>{u(!0)},children:"Reprocess Charts"})]}),n.jsx("div",{className:"row",children:n.jsxs("div",{className:"form-group",style:{textAlign:"right",padding:"20px"},children:[n.jsx("button",{type:"button",className:"btn-cancel",children:"CANCEL"}),n.jsx("button",{type:"submit",disabled:!$||!!Object.keys(N).length||!i||I,"diagnostic-id":"org-update-btn",className:"btn btn-primary",children:"Update"})]})})]})]})}),h&&n.jsx(Ofe,{setModal:u,orgId:r})]})}})]})}const Mfe=_t().shape({orgName:Ae().required("Please find or create an organization").max(100,"Organization name is too long"),orgType:Ae().required("Please pick an organization type"),licenseType:Ae().required("Please pick a license type"),zipCode:Ae().max(100,"Zip code is too long"),city:Ae().max(100,"City is too long"),state:Ae().max(100,"State is too long"),website:Ae().url("Invalid url").max(100,"Website is too long"),status:Ae().required("Please pick an organization status"),provider:Yd().test("is-selected","Please select a Provider",function(e){return this.parent.hasProvider!=="true"||!!e}),engageSubdomain:Ae().required("Please enter a subdomain value").max(50,"Subdomain is too long")});function $fe(e){const t=e.orgId||Number(e.match.params.id),[r,i]=y.useState(t),[a,s]=y.useState(null),[o,l]=y.useState(!0),[c,h]=y.useState(!1),u=y.useMemo(()=>e.orgs&&r?e.orgs.filter(w=>w.id===Number(r))[0]||{}:{},[e.orgs,r]),d=u.provider_organization&&u.provider_organization.has_provider&&(e.orgs||[]).filter(w=>w.id===u.provider_organization.id)[0],[p,f]=y.useState(d?d.id:void 0),[m,g]=y.useState(u.relationship_manager?u.relationship_manager.id:null),[x,v]=y.useState(u.default_provider_relationship_manager?u.default_provider_relationship_manager.id:null),[b,j]=y.useState(null);if(y.useEffect(()=>{let w;e.orgs?w=Promise.resolve():w=e.getOrgs(),w.then(()=>{e.getOrg(r).then(S=>{(!S||!S.id)&&e.history.push("/admin?view=orgs")})}),e.relationshipManagers||e.getAllRelationshipManagers(e.user.id)},[r]),y.useEffect(()=>{const w=u.provider_organization&&u.provider_organization.has_provider&&(e.orgs||[]).filter(S=>S.id===u.provider_organization.id)[0];f(w?w.id:void 0),g(u?.relationship_manager?.id),v(u?.default_provider_relationship_manager?.id),s(u?.logo_url),j(u?.provided_by_logo_url)},[u]),r){if(!e.orgs||!u)return null;const w={orgName:u.name||"",zipCode:u.geography_zipcode||"",city:u.geography_city||"",state:u.geography_state||"",website:u.website||"",aum:u.aum?Number(u.aum).toLocaleStr
33ing("en"):"",orgType:u.organization_type||"",licenseType:u.license_type&&u.license_type.name||"",status:u.license_status||"",disclosures:u.disclosure_text||"",logo:u.logo_url,licenseStartDate:u.license_start_date?Qt(u.license_start_date).local().format("YYYY-MM-DDTHH:mm:ss"):"",licenseEndDate:u.license_end_date?Qt(u.license_end_date).local().format("YYYY-MM-DDTHH:mm:ss"):"",hasProvider:u.provider_organization&&u.provider_organization.has_provider?"true":"false",provider:u.provider_organization&&u.provider_organization.id,providedType:u.providedType||"Starter",billingType:u.billing_type||"Automated",billingSystem:u.billing_system||"Stripe",billingSystemUserId:u.billing_system_user_id||"",billingLast4:u.billing_last4||"",billingExpMonth:u.billing_expiration_month||"",billingExpYear:u.billing_expiration_year||"",billingEmail:u.billing_email||"",providedByWebsite:u.provided_by_website||"",providedByLogo:u.provided_by_logo_url,engageDomainWhitelist:u.engage_domain_whitelist,engagePermissions:u.engage_permissions&&u.engage_permissions.name||"",engageSubdomain:u.engage_subdomain||"",studioPermissions:u.studio_permissions&&u.studio_permissions.name||"",partnerPermissions:u.partner_permissions&&u.partner_permissions.name||"Disabled",partnerStub:u.partner_stub||"",twoFactorAuthPermissions:u.two_factor_auth_permissions&&u.two_factor_auth_permissions.name||"Any Required",hedwigPermissions:u.hedwig_permissions&&u.hedwig_permissions.name||"",chartbookPermissions:u.chartbook_permissions&&u.chartbook_permissions.name||"",composerPermissions:u.composer_permissions&&u.composer_permissions.name||"",relationshipManagerId:u.relationship_manager&&u.relationship_manager.id,defaultManagerId:u.default_provider_relationship_manager&&u.default_provider_relationship_manager.id},S={validationSchema:Mfe,initialValues:w,companyId:r,selectedOrg:o,handleSelection:l,changeOption:i,currentOrg:u,picture:a,setPic:s,modal:c,setModal:h,providerId:p,changeProviderOption:f,providerLogo:b,setProviderLogo:j,managerId:m,setManagerId:g,defaultManagerId:x,setDefaultManagerId:v,...e};return n.jsx(Afe,{...S,orgName:w.orgName})}else return n.jsx(bM,{orgName:o||""})}const Lfe=e=>({orgs:e.admin.organizations,relationshipManagers:e.admin&&e.admin.relationshipManagers,user:e.auth&&e.auth.user}),vM=le(Lfe,{updateOrg:ere,getOrgs:Zo,createMessage:he,getOrg:Mw,getAllRelationshipManagers:Gf})(Jt($fe)),Ffe=_t().shape({orgName:Ae().required("Please find or create an organization").max(100,"Organization name is too long"),orgType:Ae().required("Please pick an organization type"),zipCode:Ae().max(100,"Zip code is too long"),city:Ae().max(100,"City is too long"),state:Ae().max(100,"State is too long"),website:Ae().url("Invalid url").max(100,"Website is too long"),status:Ae().required("Please pick an organization status"),provider:Yd().test("is-selected","Please select a Provider",function(e){return this.parent.hasProvider!=="true"||!!e}),engageSubdomain:Ae().required("Please enter a subdomain value").max(50,"Subdomain is too long"),partnerPermissions:Ae(),partnerStub:Ae().when("partnerPermissions",{is:e=>e!=="Disabled",then:Ae().required("Please enter a stub value").max(50,"Stub is too long"),otherwise:Ae().notRequired()})});function Ufe(e){const[t,r]=y.useState(!1),[i,a]=y.useState(null),[s,o]=y.useState(null),[l,c]=y.useState(null),[h,u]=y.useState(null);y.useEffect(()=>{e.orgs||e.getOrgs(),e.relationshipManagers||e.getAllRelationshipManagers(e.user.id)},[]),y.useEffect(()=>{i||e.orgName?r(!0):r(!1)},[i,e.orgName]);const d=Qt().format("YYYY-MM-DDTHH:mm:ss"),p=Qt().add(1,"weeks").format("YYYY-MM-DDTHH:mm:ss"),f={orgName:e.orgName||"",orgType:"",zipCode:"",city:"",state:"",website:"",disclosures:"",status:"",licenseType:"",aum:"",logo:"",licenseStartDate:d,licenseEndDate:p,hasProvider:"false",provider:0,providedType:"Advisor",engageSubdomain:"",partnerPermissions:"Disabled",partnerStub:"",twoFactorAuthPermissions:"Any Required",relationshipManagerId:0};if(!e.orgs)return null;if(i)return n.jsx(vM,{orgId:i});{const m={validationSchema:Ffe,initialValues:f,selectedOrg:t,setOrg:r,orgId:i,setOrgId:a,picture:s,setPic:o,providerId:l,changeProviderOption:c,managerId:h,setManagerId:u,...e};return n.jsx(Sfe,{...m})}}const Bfe=e=>({orgs:e.admin.organizations,relationshipManagers:e.admin&&e.admin.relationshipManagers,user:e.auth&&e.auth.user}
33),bM=le(Bfe,{createOrg:$w,getOrgs:Zo,createMessage:he,getAllRelationshipManagers:Gf})(Jt(Ufe));function yM(e){const{values:t,errors:r,touched:i,setFieldError:a,setFieldValue:s,isUpdatePreapproval:o,preapproval:l}=e;return n.jsxs(n.Fragment,{children:[n.jsx("h5",{children:"Preapproval User Details"}),n.jsxs("div",{id:"user-details-container",children:[n.jsxs("div",{className:"user-email-container",children:[n.jsx("label",{children:"Email address*"}),r.email&&i.email&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:r.email}),n.jsx(me,{type:"email",name:"email",id:"email","diagnostic-id":"email-input",placeholder:"Email address",className:r.email&&i.email?"text-input error":"","data-lpignore":"true",disabled:o})]}),[["firstName","First Name*","first-name-input"],["lastName","Last Name*","last-name-input"]].map(c=>Ao(c[0],c[1],r,i,l?.status==="used",c[2]))]})]})}function qfe(e){const{initialValues:t,validationSchema:r,preapprovalOrganizations:i,handleSubmit:a,orgs:s,inviterOrgId:o,setInviterOrgId:l,relationshipManagerId:c,setRelationshipManagerId:h,preapprovalRelationshipManagers:u}=e,d={history:e.history,location:e.location,match:e.match},p=s.filter(m=>m.can_invite),f=u.filter(m=>m&&m.company&&m.company.id===o&&m.status==="active");return n.jsxs("div",{className:"container",children:[n.jsx("div",{className:"back-link-wrapper",children:n.jsxs(Ze,{to:{pathname:"/admin",search:"?view=preapprovals"},className:"back-link",children:[n.jsx(ir,{}),n.jsx("span",{children:"Back to Preapprovals"})]})}),n.jsx(gt,{validationSchema:r,initialValues:t,enableReinitialize:!0,onSubmit:(m,{setSubmitting:g,setFieldError:x,resetForm:v,setFieldValue:b})=>{a(m,g,x,v,b)},children:({values:m,errors:g,touched:x,isSubmitting:v,setFieldValue:b,dirty:j,handleChange:w,setFieldError:S,setSubmitting:_,resetForm:C,setErrors:E})=>{const{setOrg:P,setOrgId:T,currentOrg:N,selectedOrg:k,orgId:I,setRelationshipManagerId:D,relationshipManagerId:O}=e;return n.jsx("div",{className:"create-user-wrapper",children:n.jsxs(vt,{autoComplete:"off",children:[n.jsxs("div",{className:"select-org preapproval",children:[n.jsx("h5",{children:"Select Preapproval Organization"}),n.jsxs("div",{className:"org-selector-dropdown",children:[n.jsx("label",{children:"Preapproval Organization Name*"}),n.jsx(me,{component:Si,name:"orgName",placeholder:"Company",handleSelection:P,changeOption:T,value:N.id,setFieldValue:b,opts:N.id?i:[...i,{name:k,id:I}]})]}),I&&n.jsxs(n.Fragment,{children:[[["organization_type","Preapproval Organization Type"]].map($=>zx($[0],$[1],N)),n.jsxs("div",{children:[n.jsx("label",{children:"Preapproval License Type"}),n.jsx("input",{value:N.license_type&&N.license_type||"",disabled:!0})]}),m.licenseType==="Advisor"&&n.jsxs("div",{className:"permissions-settings-container",children:[n.jsxs("div",{className:"company-settings-grp",children:[n.jsx("h5",{children:"Hedwig Settings"}),n.jsxs("div",{className:"company-settings-label-btns",children:[n.jsx("div",{className:"company-settings-subheader",children:"Provide Hedwig for this organization"}),n.jsxs("div",{className:"company-settings-radio-btns",children:[n.jsx(me,{component:mt,name:"provideHedwig",id:"true",label:"On",disabled:!0}),n.jsx(me,{component:mt,name:"provideHedwig",id:"false",label:"Off",disabled:!0})]})]})]}),n.jsxs("div",{className:"company-settings-grp",children:[n.jsx("h5",{children:"Engage Settings"}),n.jsxs("div",{className:"company-settings-label-btns",children:[n.jsx("div",{className:"company-settings-subheader",children:"Provide Engage for this organization"}),n.jsxs("div",{className:"company-settings-radio-btns",children:[n.jsx(me,{component:mt,name:"provideEngage",id:"true",label:"On",disabled:!0}),n.jsx(me,{component:mt,name:"provideEngage",id:"false",label:"Off",disabled:!0})]})]})]}),n.jsxs("div",{className:"company-settings-grp",children:[n.jsx("h5",{children:"Studio Settings"}),n.jsxs("div",{className:"company-settings-label-btns",children:[n.jsx("div",{className:"company-settings-subheader",children:"Provide Studio for this organization. Engage must be enabled for Studio to function"}),n.jsxs("div",{className:"company-settings-radio-btns",children:[n.jsx(me,{component:mt,name:"provideStudio",id:"true",label:"On",disabled:!0}),n.jsx(me,{component:mt,name:"provideStudio",id:"false",label:"Off",disabled:!0})]})]})]})]})]}),k&&!I&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Preapproval Organization Type*"}),g.orgType&&x.orgType&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:g.orgType}),n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"orgType","diagnostic-id":"org-type-select",required:!0,children:[n.jsx("option",{className:"disabled-option",hidden:!0,disabled:!0,value:"",children:"Select an organization type"}
33),n.jsx("option",{value:"Advisor",children:"Advisor"})]}),n.jsx(dt,{icon:Mt})]})]}),n.jsxs("div",{className:"user-detail-container preapproval",children:[n.jsx("label",{children:"Preapproval License Type*"}),g.licenseType&&x.licenseType&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:g.licenseType}),n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"licenseType","diagnostic-id":"license-type-select",required:!0,onChange:$=>{const U=$.target.value;b("licenseType",U)},children:[n.jsx("option",{className:"disabled-option",hidden:!0,disabled:!0,value:"",children:"Select a license type"}),n.jsx("option",{value:"Advisor",children:"Advisor"}),n.jsx("option",{value:"Community",children:"Community"}),n.jsx("option",{value:"Sponsored-Community",children:"Sponsored Community"})]}),n.jsx(dt,{icon:Mt})]})]}),m.licenseType==="Advisor"&&n.jsxs("div",{className:"permissions-settings-container",children:[n.jsxs("div",{className:"company-settings-grp",children:[n.jsx("h5",{children:"Hedwig Settings"}),n.jsxs("div",{className:"company-settings-label-btns",children:[n.jsx("div",{className:"company-settings-subheader",children:"Provide Hedwig for this organization"}),n.jsxs("div",{className:"company-settings-radio-btns",children:[n.jsx(me,{component:mt,name:"provideHedwig",id:"true",label:"On"}),n.jsx(me,{component:mt,name:"provideHedwig",id:"false",label:"Off"})]})]})]}),n.jsxs("div",{className:"company-settings-grp",children:[n.jsx("h5",{children:"Engage Settings"}),n.jsxs("div",{className:"company-settings-label-btns",children:[n.jsx("div",{className:"company-settings-subheader",children:"Provide Engage for this organization"}),n.jsxs("div",{className:"company-settings-radio-btns",children:[n.jsx(me,{component:mt,name:"provideEngage",id:"true",label:"On"}),n.jsx(me,{component:mt,name:"provideEngage",id:"false",label:"Off"})]})]})]}),n.jsxs("div",{className:"company-settings-grp",children:[n.jsx("h5",{children:"Studio Settings"}),n.jsxs("div",{className:"company-settings-label-btns",children:[n.jsx("div",{className:"company-settings-subheader",children:"Provide Studio for this organization. Engage must be enabled for Studio to function"}),n.jsxs("div",{className:"company-settings-radio-btns",children:[n.jsx(me,{component:mt,name:"provideStudio",id:"true",label:"On"}),n.jsx(me,{component:mt,name:"provideStudio",id:"false",label:"Off"})]})]})]})]})]})]}),n.jsx("div",{className:"user-details preapproval",children:n.jsx(yM,{...d,values:m,errors:g,touched:x,setFieldError:S,setFieldValue:b})}),n.jsxs("div",{className:"select-inviter-org-form",children:[n.jsx("h5",{children:"Inviter Org Settings"}),n.jsx("div",{children:"Select an inviter organization for this preapproval*"}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx(me,{component:Si,name:"inviter",handleSelection:$=>null,changeOption:l,placeholder:"Company",isInviterField:!0,value:o||void 0,setFieldValue:b,opts:p,required:!0})," "]}),n.jsx("div",{children:"Select a relationship manager"}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx(me,{component:Si,name:"relationshipmanager",handleSelection:$=>null,changeOption:D,placeholder:"Relationship Manager",value:O||void 0,setFieldValue:b,opts:f})," "]}),n.jsxs("div",{className:"form-group create-and-review",style:{textAlign:"right",padding:"20px"},children:[n.jsx("button",{type:"button",className:"btn-cancel",onClick:()=>e.history.push("/admin?view=preapprovals"),children:"CANCEL"}),n.jsx("button",{type:"submit",disabled:!j||!!Object.keys(g).length||!k||v,"diagnostic-id":"user-create-btn",className:"btn btn-primary",children:"CREATE"})]})]})]})})}})]})}const Vfe=e=>({preapprovalOrganizations:e.admin&&e.admin.preapprovalOrganizations,preapprovalRelationshipManagers:e.admin&&e.admin.relationshipManagers}),zfe=le(Vfe,{})(Jt(qfe));function Hfe(e){const{getPreapprovalOrgs:t,user:r,preapprovalOrganizations:i,createPreapproval:a,history:s,getOrgs:o,orgs:l,preapprovalRelationshipManagers:c}=e,[h,u]=y.useState(void 0),[d,p]=y.useState(void 0),[f,m]=y.useState(1),[g,x]=y.useState(void 0);if(y.useEffect(()=>{l||o(),t(r.id)},[]),y.useEffect(()=>{p(d||null)},[d]),!i)return null;const v=d?i.filter(_=>_.id===d)[0]:{},b={email:"",firstName:"",lastName:"",orgName:v.name||"",orgType:v.organization_type||"",licenseType:v.license_type||"",provideEngage:v.provide_engage||!1,provideStudio:v.provide_studio||!1,provideHedwig:v.provide_hedwig||!1,inviter:1},j=_t().shape({firstName:Ae().required("Please enter a first name").max(100,"Name is too long"),lastName:Ae().required("Please enter a last name").max(100,"Name is too long"),email:Ae().email("Please enter a valid email").required("Please enter an email address").max(100,"Email is too long"),provideEngage:cr(),provideStudio:cr(),provideHedwig:cr()}),S={initialValues:b,validationSchema:j,currentOrg:v,setOrg:u,setOrgId:p,selectedOrg:h,orgId:d,handleSubmit:(_,C,E,P,T)=>{const N=v.id,k=N?v.name:h;a(_,r.id,k,N,g).then(I=>
33{I.status===200?s.push(`/admin/preapprovals/${I.data.id}/`):E("email",I.data.detail),C(!1)})},inviterOrgId:f,setInviterOrgId:m,relationshipManagerId:g,setRelationshipManagerId:x,orgs:l,preapprovalRelationshipManagers:c};return n.jsx(zfe,{...S})}const Gfe=e=>({user:e.auth&&e.auth.user,preapprovalOrganizations:e.admin&&e.admin.preapprovalOrganizations,orgs:e.admin.organizations,preapprovalRelationshipManagers:e.admin.preapprovalRelationshipManagers}),Wfe=le(Gfe,{getPreapprovalOrgs:mre,createPreapproval:gre,getOrgs:Zo})(Hfe);function xM(e){const{values:t,errors:r,touched:i,setFieldError:a,setFieldValue:s}=e;return n.jsxs(n.Fragment,{children:[n.jsx("h5",{children:"Relationship Manager Details"}),n.jsxs("div",{id:"user-details-container",children:[n.jsxs("div",{className:"user-email-container",children:[n.jsx("label",{children:"Email address*"}),r.email&&i.email&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:r.email}),n.jsx(me,{type:"email",name:"email",id:"email","diagnostic-id":"email-input",placeholder:"Email address",className:r.email&&i.email?"text-input error":"","data-lpignore":"true"})]}),[["firstName","First Name*","first-name-input"],["lastName","Last Name*","last-name-input"],["phoneNumber","Phone Number","phone-number-input"],["jobTitle","Job Title","job-title-input"]].map(o=>Ao(o[0],o[1],r,i,!1,o[2]))]})]})}function Yfe(e){const{initialValues:t,validationSchema:r,handleSubmit:i,orgs:a,currentOrg:s}=e,o={history:e.history,location:e.location,match:e.match},l=a.filter(c=>c.can_provide);return n.jsxs("div",{className:"container",children:[n.jsx("div",{className:"back-link-wrapper",children:n.jsxs(Ze,{to:{pathname:"/admin",search:"?view=relationshipmanagers"},className:"back-link",children:[n.jsx(ir,{}),n.jsx("span",{children:"Back to Relationship Managers"})]})}),n.jsx(gt,{validationSchema:r,initialValues:t,enableReinitialize:!0,onSubmit:(c,{setSubmitting:h,setFieldError:u,resetForm:d,setFieldValue:p})=>{i(c,h,u,d,p)},children:({values:c,errors:h,touched:u,isSubmitting:d,setFieldValue:p,dirty:f,handleChange:m,setFieldError:g,setSubmitting:x,resetForm:v,setErrors:b})=>{const{setOrg:j,setOrgId:w,selectedOrg:S,orgId:_}=e;return n.jsx("div",{className:"create-user-wrapper",children:n.jsxs(vt,{autoComplete:"off",children:[n.jsxs("div",{className:"select-org relationship-manager",children:[n.jsx("h5",{children:"Select Provider Organization"}),n.jsxs("div",{className:"org-selector-dropdown",children:[n.jsx("label",{children:"Provider Organization Name*"}),n.jsx(me,{component:Si,name:"orgName",placeholder:"Company",handleSelection:j,changeOption:w,setFieldValue:p,value:s.id,opts:l})]})]}),n.jsx("div",{className:"user-details relationship-manager",children:n.jsx(xM,{...o,values:c,errors:h,touched:u,setFieldError:g,setFieldValue:p})}),n.jsxs("div",{className:"form-group create-and-review",style:{textAlign:"right",padding:"20px"},children:[n.jsx("button",{type:"button",className:"btn-cancel",onClick:()=>e.history.push("/admin?view=relationshipmanagers"),children:"CANCEL"}),n.jsx("button",{type:"submit",disabled:!f||!!Object.keys(h).length||!S||d,"diagnostic-id":"user-create-btn",className:"btn btn-primary",children:"CREATE"})]})]})})}})]})}const Kfe=e=>({}),Xfe=le(Kfe,{})(Jt(Yfe));function Qfe(e){const{user:t,createRelationshipManager:r,history:i,getOrgs:a,orgs:s}=e,{state:o}=e.location,[l,c]=y.useState(o&&o.orgId),[h,u]=y.useState(o?o.orgId:e.orgId);if(y.useEffect(()=>{s||a()},[]),y.useEffect(()=>{u(h||null)},[h]),!s)return null;const d=h?s.filter(x=>x.id===h)[0]:{},p={email:"",firstName:"",lastName:"",phoneNumber:"",jobTitle:""},f=_t().shape({firstName:Ae().required("Please enter a first name").max(100,"Name is too long"),lastName:Ae().required("Please enter a last name").max(100,"Name is too long"),email:Ae().email("Please enter a valid email").required("Please enter an email address").max(100,"Email is too long"),phoneNumber:Ae().max(100,"Phone number is too long"),jobTitle:Ae()}),g={initialValues:p,validationSchema:f,setOrg:c,setOrgId:u,selectedOrg:l,orgId:h,handleSubmit:(x,v,b,j,w)=>{const S=d.id;r(x,t.id,S).then(_=>{_.status===200?i.push(`/admin/relationshipmanagers/${_.data.id}/`):b("email",_.data.detail),v(!1)})},orgs:s,currentOrg:d};return n.jsx(Xfe,{...g})}const Zfe=e=>({user:e.auth&&e.auth.user,orgs:e.admin.organizations}),Jfe=le(Zfe,{createRelationshipManager:xre,getOrgs:Zo})(Qfe);function jM({userId:e,currentUser:t,changeUserId:r,handleSelection:i,picture:a,setPic:s,newPassword:o,setNewPassword:l,values:c,errors:h,touched:u,setFieldError:d,setFieldValue:p,isUpdateUser:f,...m}){const{Partner:g}=Br;return n.jsxs(n.Fragment,{children:[n.jsx("h5",{children:"User Details"}),n.jsxs("div",{id:"user-details-container",children:[f?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Email Address"}),n.jsx(me,{component:Si,name:"email",handleSelection:i,clearable:!1,
33changeOption:r,placeholder:"User email",value:c.userId,opts:m.users})]}),n.jsxs("div",{className:"user-detail-container",id:"user-org-link",children:[n.jsx("label",{children:"Organization"}),n.jsx(Ze,{"diagnostic-id":"user-org-link",to:{pathname:`../orgs/${c.company.id}`},children:n.jsx("input",{type:"text",name:"orgName",id:"orgName",placeholder:"Company",value:c.company.name||"",readOnly:!0})})]})]}):n.jsxs("div",{className:"user-email-container",children:[n.jsx("label",{children:"Email address*"}),h.email&&u.email&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:h.email}),n.jsx(me,{type:"email",name:"email",id:"email","diagnostic-id":"email-input",placeholder:"Email address",className:h.email&&u.email?"text-input error":"","data-lpignore":"true"})]}),[["firstName","First Name*","first-name-input"],["lastName","Last Name*","last-name-input"],["professionalCredentials","Certifications/Credentials","profile-credentials-input"],["corporateTitle","Job Title","profile-job-title-input"]].map(x=>Ao(x[0],x[1],h,u,!1,x[2])),n.jsxs("div",{className:"user-detail-container image-upload",children:[n.jsx("label",{className:"file-label",children:"Profile Picture"}),h.profile&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:h.profile}),n.jsx("input",{id:"profile","diagnostic-id":"user-profilepic-input",name:"profile",type:"file",alt:"profile picture",accept:"image/png,image/x-png,image/jpeg",value:a?a.fileName:"",onChange:x=>{qs(x.currentTarget.files[0],h,s,c,d,t&&t.profile_picture_url||null,"profile",p)}}),(a||c.profile)&&n.jsxs(n.Fragment,{children:[a&&n.jsx("button",{type:"button",className:"btn-cancel",onClick:()=>{qs(null,h,s,c,d,t&&t.profile_picture_url||null,"profile",p)},children:"Clear"}),n.jsx("div",{id:"profile-pic",children:n.jsx("img",{"diagnostic-id":"user-profilepic-img",alt:"profile",src:a||c.profile})})]})]}),n.jsxs("div",{className:"user-detail-container password-generate",children:[n.jsx("h5",{children:"Set Password"}),f?o?n.jsxs("div",{className:"password-form",children:[n.jsx("label",{children:"New Password"}),h.password&&u.password&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:h.password}),n.jsxs("div",{className:"new-password",children:[n.jsx(me,{type:"text",name:"password",id:"password",className:h.password&&u.password?"text-input error":"","data-lpignore":"true"}),n.jsx("button",{type:"button",className:"btn-secondary",onClick:()=>l(!1),children:"Cancel"})]})]}):n.jsx("button",{type:"button",className:"btn-secondary","diagnostic-id":"generate-password-btn",onClick:()=>l(!0),children:"Generate New Password"}):n.jsxs("div",{className:"password-form",children:[n.jsx("label",{children:"New Password*"}),h.password&&u.password&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:h.password}),n.jsxs("div",{className:"new-password",children:[n.jsx(me,{type:"text",name:"password",id:"password",className:h.password&&u.password?"text-input error":"","data-lpignore":"true"}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>{bj("password"),m.createMessage({alertMessage:"Password has been copied to clipboard"})},children:"Copy"})]})]})]})]}),f&&n.jsxs("div",{className:"user-detail-container two-factor-authentication",children:[n.jsx("h5",{children:"Two-Factor Authentication Settings"}),n.jsx("div",{className:"two-factor-authentication-subheader",children:"Two-Factor authentication methods may only be disabled. Users must enable and set up each authentication method."}),n.jsxs("div",{className:"two-factor-toggle-container",children:[n.jsxs("div",{className:"two-factor-toggle-wrapper",children:[n.jsx("div",{className:"toggle-msg",children:"Enable one-time passcode for this user"}),n.jsx("div",{className:"two-factor-toggle",children:n.jsxs("div",{className:"onoffswitch",children:[n.jsx("input",{type:"checkbox",id:"isEmailOtpEnabled","diagnostic-id":"one-time-passcode-toggle",name:"isEmailOtpEnabled",className:"onoffswitch-checkbox",onChange:x=>{const v=x.target.checked;p("isEmailOtpEnabled",v)},disabled:!c.isEmailOtpEnabled,checked:c.isEmailOtpEnabled}),n.jsxs("label",{className:"onoffswitch-label",htmlFor:"isEmailOtpEnabled",children:[n.jsx("span",{className:"onoffswitch-inner"}),n.jsx("span",{className:"onoffswitch-switch"})]})]})})]}),n.jsxs("div",{className:"two-factor-toggle-wrapper",children:[n.jsx("div",{className:"toggle-msg",children:"Enable authenticator app for this user"}),n.jsx("div",{className:"two-factor-toggle",children:n.jsxs("div",{className:"onoffswitch",children:[n.jsx("input",{type:"checkbox",id:"isAuthenticatorTotpEnabled","diagnostic-id":"authenticator-app-toggle",name:"isAuthenticatorTotpEnabled",className:"onoffswitch-checkbox",onChange:x=>
33{const v=x.target.checked;p("isAuthenticatorTotpEnabled",v)},disabled:!c.isAuthenticatorTotpEnabled,checked:c.isAuthenticatorTotpEnabled}),n.jsxs("label",{className:"onoffswitch-label",htmlFor:"isAuthenticatorTotpEnabled",children:[n.jsx("span",{className:"onoffswitch-inner"}),n.jsx("span",{className:"onoffswitch-switch"})]})]})})]})]})]}),n.jsxs("div",{className:"account-details",children:[n.jsx("h5",{children:"Account Details"}),n.jsxs("div",{id:"user-details-container",children:[n.jsxs("div",{className:"account-detail-container",children:[n.jsx("label",{children:"Access Start Date"}),n.jsx(Ul,{setFieldValue:p,name:"accessStartDate",errors:h,touched:u,values:c})]}),n.jsxs("div",{className:"account-detail-container",children:[n.jsx("label",{children:"Access End Date"}),n.jsx(Ul,{setFieldValue:p,name:"accessEndDate",errors:h,touched:u,values:c})]})]}),n.jsxs("div",{className:"account-detail-container account-role-dropdown",children:[n.jsx("label",{children:"Account Role*"}),h.accountRole&&u.accountRole&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:h.accountRole}),n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",id:"accountRole","diagnostic-id":"account-role-select",name:"accountRole",required:!0,children:[n.jsx("option",{value:"User",children:"User"}),n.jsx("option",{value:"Admin",children:"Admin"}),f&&n.jsx("option",{value:"CLAdmin",disabled:!0,children:"CLAdmin"})]}),n.jsx(dt,{icon:Mt})]})]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Is a Billing Contact*"}),n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",id:"isBillingContact","diagnostic-id":"",name:"isBillingContact",required:!0,children:[n.jsx("option",{value:"false",children:"No"}),n.jsx("option",{value:"true",children:"Yes"})]}),n.jsx(dt,{icon:Mt})]})]}),!f&&n.jsx(n.Fragment,{children:n.jsxs("div",{className:"user-settings-container",children:[n.jsxs("div",{className:"user-settings-grp",children:[n.jsx("h5",{children:"Composer Settings"}),n.jsxs("div",{className:"user-settings-label-btns",children:[n.jsx("div",{className:"user-settings-subheader",children:"Enable Composer for this user"}),n.jsxs("div",{className:"user-settings-radio-btns",children:[n.jsx(me,{component:mt,name:"canUseComposer",id:"true",label:"On"}),n.jsx(me,{component:mt,name:"canUseComposer",id:"false",label:"Off"})]})]})]}),n.jsxs("div",{className:"user-settings-grp",children:[n.jsx("h5",{children:"Engage Settings"}),n.jsxs("div",{className:"user-settings-label-btns",children:[n.jsx("div",{className:"user-settings-subheader",children:"Enable Engage for this user*"}),n.jsxs("div",{className:"user-settings-radio-btns",children:[n.jsx(me,{component:mt,name:"canUseEngage",id:"true",label:"On"}),n.jsx(me,{component:mt,name:"canUseEngage",id:"false",label:"Off"})]})]})]}),n.jsxs("div",{className:"user-settings-grp",children:[n.jsx("h5",{children:"Studio Settings"}),n.jsxs("div",{className:"user-settings-label-btns",children:[n.jsx("div",{className:"user-settings-subheader",children:"Enable Studio for this user. Engage must be enabled for Studio to function"}),n.jsxs("div",{className:"user-settings-radio-btns",children:[n.jsx(me,{component:mt,name:"canUseStudio",id:"true",label:"On"}),n.jsx(me,{component:mt,name:"canUseStudio",id:"false",label:"Off"})]})]})]}),n.jsxs("div",{className:"user-settings-grp",children:[n.jsx("h5",{children:"Remix Settings"}),n.jsxs("div",{className:"remix-settings-grp",children:[n.jsxs("div",{className:"user-settings-label-btns",children:[n.jsx("div",{className:"user-settings-subheader",children:"Enable Composer Remix for this user"}),n.jsxs("div",{className:"user-settings-radio-btns",children:[n.jsx(me,{component:mt,name:"canRemixClientPiece",id:"true",label:"On"}),n.jsx(me,{component:mt,name:"canRemixClientPiece",id:"false",label:"Off"})]})]}),n.jsxs("div",{className:"user-settings-label-btns",children:[n.jsx("div",{className:"user-settings-subheader",children:"Enable Video Script Remix for this user"}),n.jsxs("div",{className:"user-settings-radio-btns",children:[n.jsx(me,{component:mt,name:"canRemixVideoScript",id:"true",label:"On"}),n.jsx(me,{component:mt,name:"canRemixVideoScript",id:"false",label:"Off"})]})]})]})]}),n.jsxs("div",{className:"user-settings-grp",children:[n.jsx("h5",{children:"Assistant Settings"}),n.jsxs("div",{className:"user-settings-label-btns",children:[n.jsx("div",{className:"user-settings-subheader",children:"Enable Clearnomics Assistant for this user"}),n.jsxs("div",{className:"user-settings-radio-btns",children:[n.jsx(me,{component:mt,name:"canUseAssistant",id:"true",label:"On"}),n.jsx(me,{component:mt,name:"canUseAssistant",id:"false",label:"Off"})]})]})]}),n.jsxs("div",{className:"user-settings-grp",children:[n.jsx("h5",{children:"Q&A Settings"}),n.jsxs("div",{className:"user-settings-label-btns",children:[n.jsx("div",{className:"user-settings-subheader",children:"Enable Q&A for this user"}),n.jsxs("div",{className:"user-settings-radio-btns",children:[n.jsx(me,{component:mt,name:"canUseQuestionAnswer",id:"true",label:"On"}),n.jsx(me,{component:mt,name:"canUseQuestionAnswer",id:"false",label:"Off"})]})]})]}),(c.company.licenseType===g||c.company.licenseType.name===g)&&n.jsxs("div",{className:"user-settings-grp",children:[n.jsx("h5",{children:"Partner Settings"}),n.jsxs("div",{className:"user-settings-label-btns",children:[n.jsx("div",{className:"user-settings-subheader",children:"Enable partner capabilities for this user"}),n.jsxs("div",{className:"user-settings-radio-btns",children:[n.jsx(me,{component:mt,name:"canUsePartner",id:"true",label:"On"}),n.jsx(me,{component:mt,name:"canUsePartner",id:"false",label:"Off"})]})]})]})]})}),f&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"account-detail-container",children:[n.jsx("label",{children:"User ID"}),n.jsx("input",{disabled:!0,value:t&&t.id?t.id:""})]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Account Created"}),n.jsx(me,{type:"text",name:"accountCreated",id:"accountCreated",placeholder:"--",disabled:!0})]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Account Status"}),n.jsx(me,{type:"text",name:"accountStatus",id:"accountStatus","diagnostic-id":"account-status-input",placeholder:"--",disabled:!0})]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Has Accepted Terms"}),n.jsx(me,{type:"text",name:"hasAcceptedTerms",id:"hasAcceptedTerms",placeholder:"--",disabled:!0})]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Last Login"}
33),n.jsx(me,{type:"text",name:"lastLogin",id:"lastLogin",placeholder:"--",disabled:!0})]}),n.jsxs("div",{className:"user-settings-container",children:[n.jsxs("div",{className:"user-settings-grp",children:[n.jsx("h5",{children:"Hedwig Settings"}),n.jsxs("div",{className:"user-settings-label-btns",children:[n.jsx("div",{className:"user-settings-subheader",children:"Enable Hedwig for this user"}),n.jsxs("div",{className:"user-settings-radio-btns",children:[n.jsx(me,{component:mt,name:"canCallHedwig",id:"true",label:"On"}),n.jsx(me,{component:mt,name:"canCallHedwig",id:"false",label:"Off"})]})]})]}),n.jsxs("div",{className:"user-settings-grp",children:[n.jsx("h5",{children:"Composer Settings"}),n.jsxs("div",{className:"user-settings-label-btns",children:[n.jsx("div",{className:"user-settings-subheader",children:"Enable Composer for this user"}),n.jsxs("div",{className:"user-settings-radio-btns",children:[n.jsx(me,{component:mt,name:"canUseComposer",id:"true",label:"On"}),n.jsx(me,{component:mt,name:"canUseComposer",id:"false",label:"Off"})]})]})]}),n.jsxs("div",{className:"user-settings-grp",children:[n.jsx("h5",{children:"Engage Settings"}),n.jsxs("div",{className:"user-settings-label-btns",children:[n.jsx("div",{className:"user-settings-subheader",children:"Enable Engage for this user"}),n.jsxs("div",{className:"user-settings-radio-btns",children:[n.jsx(me,{component:mt,name:"canUseEngage",id:"true",label:"On"}),n.jsx(me,{component:mt,name:"canUseEngage",id:"false",label:"Off"})]})]})]}),n.jsxs("div",{className:"user-settings-grp",children:[n.jsx("h5",{children:"Studio Settings"}),n.jsxs("div",{className:"user-settings-label-btns",children:[n.jsx("div",{className:"user-settings-subheader",children:"Enable Studio for this user. Engage must be enabled for Studio to function"}),n.jsxs("div",{className:"user-settings-radio-btns",children:[n.jsx(me,{component:mt,name:"canUseStudio",id:"true",label:"On"}),n.jsx(me,{component:mt,name:"canUseStudio",id:"false",label:"Off"})]})]})]}),n.jsxs("div",{className:"user-settings-grp",children:[n.jsx("h5",{children:"Remix Settings"}),n.jsxs("div",{className:"remix-settings-grp",children:[n.jsxs("div",{className:"user-settings-label-btns",children:[n.jsx("div",{className:"user-settings-subheader",children:"Enable Composer Remix for this user"}),n.jsxs("div",{className:"user-settings-radio-btns",children:[n.jsx(me,{component:mt,name:"canRemixClientPiece",id:"true",label:"On"}),n.jsx(me,{component:mt,name:"canRemixClientPiece",id:"false",label:"Off"})]})]}),n.jsxs("div",{className:"user-settings-label-btns",children:[n.jsx("div",{className:"user-settings-subheader",children:"Enable Video Script Remix for this user"}),n.jsxs("div",{className:"user-settings-radio-btns",children:[n.jsx(me,{component:mt,name:"canRemixVideoScript",id:"true",label:"On"}),n.jsx(me,{component:mt,name:"canRemixVideoScript",id:"false",label:"Off"})]})]})]})]}),n.jsxs("div",{className:"user-settings-grp",children:[n.jsx("h5",{children:"Assistant Settings"}),n.jsxs("div",{className:"user-settings-label-btns",children:[n.jsx("div",{className:"user-settings-subheader",children:"Enable Clearnomics Assistant for this user"}),n.jsxs("div",{className:"user-settings-radio-btns",children:[n.jsx(me,{component:mt,name:"canUseAssistant",id:"true",label:"On"}),n.jsx(me,{component:mt,name:"canUseAssistant",id:"false",label:"Off"})]})]})]}),n.jsxs("div",{className:"user-settings-grp",children:[n.jsx("h5",{children:"Q&A Settings"}),n.jsxs("div",{className:"user-settings-label-btns",children:[n.jsx("div",{className:"user-settings-subheader",children:"Enable Q&A for this user"}),n.jsxs("div",{className:"user-settings-radio-btns",children:[n.jsx(me,{component:mt,name:"canUseQuestionAnswer",id:"true",label:"On"}),n.jsx(me,{component:mt,name:"canUseQuestionAnswer",id:"false",label:"Off"})]})]})]}),n.jsxs("div",{className:"user-settings-grp",children:[n.jsx("h5",{children:"Partner Settings"}),n.jsxs("div",{className:"user-settings-label-btns",children:[n.jsx("div",{className:"user-settings-subheader",children:"Enable partner capabilities for this user"}),n.jsxs("div",{className:"user-settings-radio-btns",children:[n.jsx(me,{component:mt,name:"canUsePartner",id:"true",label:"On"}),n.jsx(me,{component:mt,name:"canUsePartner",id:"false",label:"Off"})]})]})]})]})]})]})]})}function eme({orgId:e,currentOrg:t,values:r,setFieldValue:i}){return y.useEffect(()=>{e&&(r.company.orgType||i("company.orgType",t.organization_type),r.company.status||i("company.status",t.organization_status),r.company.licenseType||i("company.licenseType",t.license_type?.name))},[e,t?.id]),null}function tme(e){const t={orgId:e.orgId,orgs:e.orgs,createMessage:e.createMessage,userCreated:e.userCreated,currentOrg:e.currentOrg,setPic:e.setPic,setOrgId:e.setOrgId,setOrg:e.setOrg,selectedOrg:e.selectedOrg,orgPic:e.orgPic,setOrgPic:e.setOrgPic,picture:e.picture,handleCancel:e.handleCancel,inboundValues:e.inboundValues,history:e.history,location:e.location,match:e.match},{providerId:r,changeProviderOption:i,setManagerId:a,managerId:s}=e,{Partner:o,Community:l,Advisor:c,Enterprise:h,SponsoredCommunity:u}=Br,d=[{value:"Advisor"},{value:"Community"},{value:"Sponsored-Community"}],[p,f]=y.useState(d),m=e.orgs.filter(v=>v.can_provide),g=e.relationshipManagers.filter(v=>v.company?.id===r&&v.status==="active"),x=(v,b)=>{const j=[...d.filter(w=>w.value===v),...d.filter(w=>w.value!==v)];f(j),v===c||v===o||v===h?(b("company.studioPermissions","Advisor"),b("company.engagePermissions","Advisor"),b("company.composerPermissions","Advisor"),b("company.chartbookPermissions","Advisor"),b("company.hedwigPermissions","Advisor")):v===u?(b("company.composerPermissions","Sponsored-Community"),b("company.chartbookPermissions","Sponsored-Community"),b("company.hedwigPermissions","Community"),b("company.studioPermissions","Disabled"),b("company.engagePermissions","Disabled")):(b("company.composerPermissions","Community"),b("company.chartbookPermissions","Community"),b("company.hedwigPermissions","Community"),b("company.studioPermissions","Disabled"),b("company.engagePermissions","Disabled"))};return n.jsxs("div",{className:"container",children:[n.jsx("div",{className:"back-link-wrapper",children:n.jsxs(Ze,{to:{pathname:"/admin",search:"?view=users"},className:"back-link",children:[n.jsx(ir,{}),n.jsx("span",{children:"Back to Users"})]})}),n.jsx(gt,{validationSchema:e.orgId?e.validationSchemaExistingOrg:e.validationSchema,initialValues:e.initialValues,onSubmit:(v,{setSubmitting:b,setErrors:j,resetForm:w,setFieldValue:S})=>{e.handleSubmit(v,b,j,w,S,!1)},children:({values:v,errors:b,touched:j,isSubmitting:w,setFieldValue:S,dirty:_,handleChange:C,setFieldError:E,setSubmitting:P,resetForm:T,setErrors:N})=>{const{aumOnKeyDown:k,aumOnFocus:I,aumOnBlur:D}
33=_D(S,"company.aum",v),{setOrg:O,setOrgId:$,inboundValues:U,currentOrg:B,selectedOrg:L,orgId:A,orgPic:R,setOrgPic:F,handleSubmit:q}=e;return n.jsx("div",{className:"create-user-wrapper",children:n.jsxs(vt,{autoComplete:"off",children:[n.jsxs("div",{className:"select-org",children:[n.jsx("h5",{children:"Select Organization"}),n.jsxs("div",{className:"org-selector-dropdown",children:[n.jsx("label",{children:"Organization Name*"}),n.jsx(me,{component:Si,name:"company.orgName",placeholder:"Company",handleSelection:O,changeOption:$,value:U.firm_name||B.id,setFieldValue:S,opts:B.id?e.orgs:[...e.orgs,{name:L,id:L}]})]}),A&&n.jsxs(n.Fragment,{children:[n.jsx(eme,{orgId:A,currentOrg:B,values:v,setFieldValue:S}),[["organization_type","Organization Type"],["license_status","License Status"]].map(V=>zx(V[0],V[1],B)),n.jsxs("div",{children:[n.jsx("label",{children:"License Type"}),n.jsx("input",{value:B.license_type&&B.license_type.name||"",disabled:!0})]}),n.jsxs("div",{children:[n.jsx("label",{children:"License Start Date"}),n.jsx("input",{disabled:!0,value:B.license_start_date?Qt(B.license_start_date).local().format("MM/DD/YY HH:mm A"):""})]}),n.jsxs("div",{children:[n.jsx("label",{children:"License End Date"}),n.jsx("input",{disabled:!0,value:B.license_end_date?Qt(B.license_end_date).local().format("MM/DD/YY hh:mm A"):""})]}),n.jsxs("div",{children:[n.jsxs("label",{children:["AUM -"," ",n.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://www.adviserinfo.sec.gov/",children:"IAPD LOOK UP"})]}),n.jsx("input",{value:Number(B.aum).toLocaleString("en")||"",disabled:!0})]}),[["geography_zipcode","Zip/Postal Code"],["geography_city","City"],["geography_state","State/Region"],["website","Website"]].map(V=>zx(V[0],V[1],B)),n.jsx("label",{id:"org-logo",children:"Organization Logo"}),n.jsx("span",{children:n.jsx("img",{alt:"organization-logo",src:B.logo_url})}),n.jsxs("div",{className:"disclosures-container",children:[n.jsx("label",{children:"Organization Disclosures"}),n.jsx(me,{name:"disclosures",component:Ra,value:B.disclosure_text||"",disabled:!0})]})]}),L&&!A&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Organization Type*"}),b.company&&j.company&&b.company.orgType&&j.company.orgType&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:b.company.orgType}),n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"company.orgType","diagnostic-id":"org-type-select",required:!0,children:[n.jsx("option",{className:"disabled-option",hidden:!0,disabled:!0,value:"",children:"Select an organization type"}),n.jsx("option",{value:"Advisor",children:"Advisor"}),n.jsx("option",{value:"Enterprise",children:"Enterprise"})]}),n.jsx(dt,{icon:Mt})]})]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"License Status*"}),b.company&&j.company&&b.company.status&&j.company.status&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:b.company.status}),n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"company.status","diagnostic-id":"license-status-select",required:!0,children:[n.jsx("option",{className:"disabled-option",hidden:!0,disabled:!0,value:"",children:"Select a license status"}),n.jsx("option",{value:"Active",children:"Active"}),n.jsx("option",{value:"Trial",children:"Trial"}),n.jsx("option",{value:"Trial Ended",children:"Trial Ended"}),n.jsx("option",{value:"Canceled",children:"Canceled"})]}),n.jsx(dt,{icon:Mt})]})]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"License Type*"}),b.company&&j.company&&b.company.licenseType&&j.company.licenseType&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:b.company.licenseType}),n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"company.licenseType","diagnostic-id":"license-type-select",required:!0,onChange:V=>{const X=V.target.value;S("company.licenseType",X),x(X,S)},children:[n.jsx("option",{className:"disabled-option",hidden:!0,disabled:!0,value:"",children:"Select a license type"}
33),n.jsx("option",{value:"Advisor",children:"Advisor"}),n.jsx("option",{value:"Partner",children:"Partner"}),n.jsx("option",{value:"Enterprise",children:"Enterprise"}),n.jsx("option",{value:"Community",children:"Community"}),n.jsx("option",{value:"Sponsored-Community",children:"Sponsored Community"})]}),n.jsx(dt,{icon:Mt})]})]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"License Start Date"}),n.jsx(Ul,{setFieldValue:S,name:"company.licenseStartDate",errors:b,touched:j,values:v})]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"License End Date"}),n.jsx(Ul,{setFieldValue:S,name:"company.licenseEndDate",errors:b,touched:j,values:v})]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsxs("label",{children:["AUM -"," ",n.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://www.adviserinfo.sec.gov/",children:"IAPD LOOK UP"})]}),b.company&&j.company&&b.company.aum&&j.company.aum&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:b.company.aum}),n.jsx(me,{type:"text",name:"company.aum",id:"aum","diagnostic-id":"aum-input",placeholder:"AUM",onKeyDown:k,onFocus:I,onBlur:D,className:b.company&&j.company&&b.company.aum&&j.company.aum?"text-input error":""})]}),[["zipCode","Zip Code"],["city","City"],["state","State/Region"],["website","Organization Website"]].map(V=>PT(V[0],V[1],b,j,v)),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Billing Type"}),n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"billingType","diagnostic-id":"billing-type-select",children:[n.jsx("option",{value:"Automated",children:"Automated"}),n.jsx("option",{value:"Invoice",children:"Invoice"}),n.jsx("option",{value:"Provider",children:"Provider"})]}),n.jsx(dt,{icon:Mt})]})]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Billing System"}),n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"billingSystem","diagnostic-id":"billing-system-select",children:[n.jsx("option",{value:"Stripe",children:"Stripe"}),n.jsx("option",{value:"Quickbooks",children:"Quickbooks"})]}),n.jsx(dt,{icon:Mt})]})]}),[["billingSystemUserId","Billing System ID","billing-system-user-id-input"]].map(V=>PT(V[0],V[1],b,j,v)),n.jsxs("div",{className:"user-detail-container image-upload",children:[n.jsx("label",{className:"file-label",children:"Organization Logo"}),b.company&&b.company.logo&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:b.company.logo}),n.jsx("input",{type:"file",id:"company.logo","diagnostic-id":"org-logo-input",alt:"organization-picture",accept:"image/png,image/x-png,image/gif,image/jpeg",value:R?R.name:"",onChange:V=>{qs(V.currentTarget.files[0],b,F,v,E,null,"company.logo",S)}}),R&&n.jsxs(n.Fragment,{children:[n.jsx("button",{className:"btn-cancel",onClick:()=>{qs(null,b,F,v,E,null,"company.logo",S)},children:"Clear"}),n.jsx("div",{id:"orgPic-pic",children:n.jsx("img",{alt:"orgPic",src:R})})]})]}),n.jsxs("div",{className:"disclosures-container",children:[n.jsx("label",{children:"Organization Disclosures"}),b.company&&j.company&&b.company.disclosures&&j.company.disclosures&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:b.company.disclosures}),n.jsx(me,{id:"company.disclosures",name:"company.disclosures",placeholder:"Company disclosures",onChange:C,component:Ra})]}),v.company.licenseType===o&&n.jsxs("div",{className:"partner-settings-form",children:[n.jsx("h5",{children:"Partner Settings"}),n.jsxs("div",{className:"partner-settings-group",children:[n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Enable partner capabilities for this organization*"}),n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"company.partnerPermissions",children:[n.jsx("option",{value:"Disabled",children:"Disabled"}),n.jsx("option",{value:"Standard",children:"Standard"})]}),n.jsx(dt,{icon:Mt})]})]}),v.company.partnerPermissions!=="Disabled"&&n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Partner Stub*"}
33),n.jsx(me,{name:"company.partnerStub",placeholder:"Partner stub",onChange:C,"diagnostic-id":"partner-stub-input"}),j.company?.partnerStub&&b.company?.partnerStub&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:b.company?.partnerStub})]})]})]}),n.jsxs("div",{className:"engage-settings-form",children:[n.jsx("h5",{children:"Engage Settings"}),n.jsxs("div",{className:"engage-settings-group",children:[n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Enable Engage for this organization*"}),n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"company.engagePermissions",children:[n.jsx("option",{value:"Disabled",children:"Disabled"}),n.jsx("option",{value:"Trial",children:"Trial"}),n.jsx("option",{value:"Advisor",children:"Advisor"}),n.jsx("option",{value:"Marketing",children:"Marketing"})]}),n.jsx(dt,{icon:Mt})]})]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Company Engage Subdomain*"}),n.jsx(me,{name:"company.engageSubdomain",placeholder:"Company Engage Subdomain",onChange:C,"diagnostic-id":"engage-subdomain-input"}),j.company?.engageSubdomain&&b.company?.engageSubdomain&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:b.company?.engageSubdomain}),n.jsx("div",{className:"subdomain-preview","diagnostic-id":"subdomain-preview",children:`URL preview: https://${v.company.engageSubdomain}.advisorlibrary.com`})]})]}),n.jsx("div",{children:"Domain whitelist:"}),typeof b.company&&j.company&&b.company?.engageDomainWhitelist&&b.company?.engageDomainWhitelist==="string"?n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:b.company?.engageDomainWhitelist}):null,n.jsx(fu,{name:"company.engageDomainWhitelist",render:V=>n.jsxs("div",{className:"domain-whitelist-container",children:[v.company?.engageDomainWhitelist?.map((X,M)=>n.jsxs("div",{className:"domain-whitelist",children:[n.jsx(me,{name:`company.engageDomainWhitelist.${M}`}),n.jsx("i",{className:"material-icons",onClick:()=>V.remove(M),children:"close"})]},M)),n.jsxs("button",{type:"button",className:"btn-primary-icon-text add-domain-btn",onClick:()=>V.push(""),children:[n.jsx("i",{className:"material-icons",children:"add"}),"Add a domain"]})]})})]}),n.jsxs("div",{className:"settings-form-container",children:[n.jsxs("div",{className:"settings-form-grp",children:[n.jsxs("div",{className:"form-header-label",children:[n.jsx("h5",{children:"Two-Factor Authentication Settings"}),n.jsx("label",{children:"Select authentication method for this organization*"})]}),n.jsx("div",{className:"user-detail-container",children:n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"company.twoFactorAuthPermissions",children:[n.jsx("option",{value:"Any Required",children:"Email OTP or Authenticator App"}),n.jsx("option",{value:"TOTP Only",children:"Authenticator App Only"}),n.jsx("option",{value:"OTP Only",children:"OTP Only"}),n.jsx("option",{value:"Not Required",children:"Not Required"})]}),n.jsx(dt,{icon:Mt})]})})]}),n.jsxs("div",{className:"settings-form-grp",children:[n.jsxs("div",{className:"form-header-label",children:[n.jsx("h5",{children:"Hedwig Settings"}),n.jsx("label",{children:"Enable Hedwig for this organization.*"})]}),n.jsx("div",{className:"user-detail-container",children:n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"company.hedwigPermissions",children:[p.map(V=>n.jsx("option",{value:V.value,children:V.value},V.value)),n.jsx("option",{value:"Disabled",children:"Disabled"})]}),n.jsx(dt,{icon:Mt})]})})]}),n.jsxs("div",{className:"settings-form-grp",children:[n.jsxs("div",{className:"form-header-label",children:[n.jsx("h5",{children:"Chartbook Settings"}),n.jsx("label",{children:"Enable Chartbook for this organization.*"})]}),n.jsx("div",{className:"user-detail-container",children:n.jsxs("div",{className:"dropdown-container",children:[n.jsx(me,{component:"select",name:"company.chartbookPermissions",children:p.map(V=>n.jsx("option",{value:V.value,children:V.value},V.value))}),n.jsx(dt,{icon:Mt})]})})]}),n.jsxs("div",{className:"settings-form-grp",children:[n.jsxs("div",{className:"form-header-label",children:[n.jsx("h5",{children:"Composer Settings"}),n.jsx("label",{children:"Enable Composer for this organization.*"})]}),n.jsx("div",{className:"user-detail-container",children:n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"company.composerPermissions",children:[p.map(V=>n.jsx("option",{value:V.value,children:V.value},V.value)),n.jsx("option",{value:"Disabled",children:"Disabled"})]}),n.jsx(dt,{icon:Mt})]})})]}),n.jsxs("div",{className:"settings-form-grp",children:[n.jsxs("div",{className:"form-header-label",children:[n.jsx("h5",{children:"Studio Settings"}),n.jsx("label",{children:"Enable Studio for this organization. Engage must be enabled for Studio to function*"})]}),n.jsx("div",{className:"user-detail-container",children:n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"company.studioPermissions",children:[n.jsx("option",{value:"Disabled",children:"Disabled"}),n.jsx("option",{value:"Trial",children:"Trial"}
33),n.jsx("option",{value:"Advisor",children:"Advisor"}),n.jsx("option",{value:"Compliance",children:"Compliance"}),n.jsx("option",{value:"Marketing",children:"Marketing"})]}),n.jsx(dt,{icon:Mt})]})})]})]}),n.jsxs("div",{className:"select-provider-form",children:[n.jsx("h5",{children:"Service Provider Settings"}),n.jsx("div",{children:"Select a provider for this company*"}),n.jsx(me,{component:mt,name:"company.hasProvider",id:"false",label:"None"}),n.jsx(me,{component:mt,name:"company.hasProvider",id:"true",label:"Select a provider"})]}),v.company&&v.company.hasProvider==="true"&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Access Provided By"}),n.jsx(me,{component:Si,name:"company.provider",handleSelection:V=>null,changeOption:i,placeholder:"Company",isProviderField:!0,isUserFormProvider:!0,value:r||void 0,setFieldValue:S,opts:m})," "]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Provided License Type"}),n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{component:"select",name:"company.providedType",children:[n.jsx("option",{value:"Advisor",children:"Advisor"}),n.jsx("option",{value:"Enterprise",children:"Enterprise"})]}),n.jsx(dt,{icon:Mt})]})]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Select Relationship Manager"}),n.jsx(me,{component:Si,name:"company.relationshipManagerId",handleSelection:V=>null,changeOption:a,placeholder:"Relationship Manager",value:s||void 0,setFieldValue:S,opts:g,isProviderField:!0,isUserManagerField:!0})," "]})]})]})]}),n.jsxs("div",{className:"user-details",children:[n.jsx(jM,{...t,values:v,errors:b,touched:j,setFieldError:E,setFieldValue:S}),n.jsxs("div",{className:"form-group create-and-review",style:{textAlign:"right",padding:"20px"},children:[n.jsx("button",{type:"button",className:"btn-cancel",onClick:()=>e.history.push("/admin"),children:"CANCEL"}),n.jsx("button",{type:"submit",disabled:!_||!!Object.keys(b).length||!L||w,"diagnostic-id":"user-create-btn",className:"btn btn-primary",children:"CREATE"}),n.jsxs("button",{type:"button",className:"btn btn-primary",onClick:()=>q(v,P,N,T,S,!0),disabled:!_||!!Object.keys(b).length||!L||w,children:[" ","CREATE & REVIEW"," "]})]})]})]})})}})]})}const nme=e=>({orgs:e.admin.organizations}),rme=le(nme,{createOrg:$w,createUser:$A,getAllUsers:Hf,getOrgs:Zo,getOrg:Mw,createMessage:he,userCreated:FA})(Jt(tme)),ime=Qt().format("YYYY-MM-DDTHH:mm:ss"),ame=Qt().add(1,"weeks").format("YYYY-MM-DDTHH:mm:ss");function sme(e){const{state:t}=e.location||{},[r,i]=y.useState(t&&(t.orgId||t.inbound&&t.inbound.firm_name)),[a,s]=y.useState(t?t.orgId:e.orgId),[o,l]=y.useState(null),[c,h]=y.useState(null),[u,d]=y.useState(null),[p,f]=y.useState(null),m=t&&t.inbound||{};if(y.useEffect(()=>{e.orgs||e.getOrgs()},[]),y.useEffect(()=>{s(a||null),a&&e.getOrg(a),e.relationshipManagers||e.getAllRelationshipManagers(e.user.id)},[a]),!e.orgs)return null;const g=a?e.orgs.filter(_=>_.id===a)[0]||{}:{},x={email:m.email||"",firstName:m.first_name||"",lastName:m.last_name||"",professionalCredentials:"",corporateTitle:"",advisorCrd:m.advisor_crd||"",accountRole:"User",orgName:m.firm_name||"",profile:"",accessStartDate:"",accessEndDate:"",company:{orgName:m.firm_name||"",licenseType:"",orgType:"",aum:m.aum&&Number(m.aum).toLocaleString("en")||"",firmCrd:m.firm_crd||"",zipCode:m.geography_zipcode||"",city:"",licenseStartDate:ime,licenseEndDate:ame,state:"",website:m.website||"",disclosures:"",logo:"",status:"",hasProvider:"false",provider:0,billingType:"",billingSystem:"",billingSystemUserId:"",engagePermissions:"",engageDomainWhitelist:[],engageSubdomain:"",studioPermissions:"",partnerPermissions:"Disabled",partnerStub:"",twoFactorAuthPermissions:"Any Required",hedwigPermissions:"",chartbookPermissions:"",composerPermissions:"",relationshipManagerId:0},canUseEngage:!1,canUseStudio:!1,canUsePartner:!1,password:CD(16),canRemixClientPiece:!0,canRemixVideoScript:!0,canUseAssistant:!0,canUseQuestionAnswer:!0,canUseComposer:!0},v=_t().shape({firstName:Ae().required("Please enter a first name").max(100,"Name is too long"),lastName:Ae().required("Please enter a last name").max(100,"Name is too long"),email:Ae().email("Please enter a valid email").required("Please enter an email address").max(100,"Email is too long"),password:Ae().required("Please enter a password").min(6,"Password is too short (minimum 6 characters)").max(100,"Password is too long"),accountRole:Ae().required("Please select an account role"),professionalCredentials:Ae().nullable().max(100,"Credentials is too long"),corporateTitle:Ae().nullable().max(100,"Job title is too long"),company:_t().shape({zipCode:Ae().nullable().max(100,"Zip code is too long"),city:Ae().nullable().max(100,"City is too long"),state:Ae().nullable().max(100,"State is too long"),website:Ae().url("Invalid url").nullable().max(100,"Website is too long"),billingType:Ae(),billingSystem:Ae(),billingSystemUserId:Ae
33(),provider:Yd().test("is-selected","Please select a Provider",function(_){return this.parent.hasProvider!=="true"||!!_}),engageSubdomain:Ae().required("Please enter a subdomain value").max(50,"Subdomain is too long"),partnerPermissions:Ae(),partnerStub:Ae().when("partnerPermissions",{is:_=>_!=="Disabled",then:Ae().required("Please enter a stub value").max(50,"Stub is too long"),otherwise:Ae().notRequired()})})}),b=_t().shape({firstName:Ae().required("Please enter a first name").max(100,"Name is too long"),lastName:Ae().required("Please enter a last name").max(100,"Name is too long"),email:Ae().email("Please enter a valid email").required("Please enter an email address").max(100,"Email is too long"),password:Ae().required("Please enter a password").min(6,"Password is too short (minimum 6 characters)").max(100,"Password is too long"),accountRole:Ae().required("Please select an account role"),professionalCredentials:Ae().nullable().max(100,"Credentials is too long"),corporateTitle:Ae().nullable().max(100,"Job title is too long"),company:_t().shape({zipCode:Ae().nullable().max(100,"Zip code is too long"),city:Ae().nullable().max(100,"City is too long"),state:Ae().nullable().max(100,"State is too long"),website:Ae().url("Invalid url").nullable().max(100,"Website is too long"),billingType:Ae(),billingSystem:Ae(),billingSystemUserId:Ae(),provider:Yd().test("is-selected","Please select a Provider",function(_){return this.parent.hasProvider!=="true"||!!_})})}),S={initialValues:x,validationSchema:v,validationSchemaExistingOrg:b,currentOrg:g,setPic:l,setOrgId:s,setOrg:i,orgId:a,selectedOrg:r,handleSubmit:(_,C,E,P,T,N)=>{const k=g.id,{company:I,orgName:D,...O}=_;k||(I.orgName=D),k||(_.company.aum=!_.company.aum||typeof _.company.aum=="number"?_.company.aum:parseInt(_.company.aum.split(",").join("")));const $=U=>{e.createUser({orgId:U,...O}).then(B=>{m.id&&e.userCreated(m.id);const L=O.password;if(bj("password"),e.createMessage({alertMessage:"User has been successfully created"}),P(),l(null),N)return e.history.push({pathname:"/admin/userverify",state:{user:B.data.user,tempPassword:L}});e.location&&t&&t.fromUsers&&e.history.push("/admin?view=users")},B=>{e.createMessage({errorMessage:"There was an error creating this user"}),E(B.response.data),C(!1)})};k?$(k):e.createOrg(I).then(U=>{s(U.payload.id),e.createMessage({alertMessage:"Organization has been successfully created"}),$(U.payload.id)},U=>{e.createMessage({errorMessage:"There was an error creating this organization"}),C(!1)})},orgPic:c,setOrgPic:h,picture:o,handleCancel:()=>{e.history.push("/admin")},inboundValues:m,providerId:u,changeProviderOption:d,managerId:p,setManagerId:f,...e};return n.jsx(rme,{...S})}const ome=e=>({orgs:e.admin.organizations,relationshipManagers:e.admin&&e.admin.relationshipManagers,user:e.auth&&e.auth.user}),lme=le(ome,{createOrg:$w,createUser:$A,getAllUsers:Hf,getOrgs:Zo,getOrg:Mw,createMessage:he,userCreated:FA,getAllRelationshipManagers:Gf})(sme);function cme(e){const t=e.org?e.org.organization_status==="active":e.user?e.user.account_status==="active":e.preapproval?e.preapproval.status==="active":e.relationshipManager?e.relationshipManager.status==="active":null,r=e.org?t?e.inactivateOrg:e.activateOrg:e.user?t?e.inactivateUser:e.activateUser:e.preapproval?t?e.inactivatePreapproval:e.activatePreapproval:e.relationshipManager?t?e.inactivateManager:e.activateManager:null;return n.jsx(ot,{setModal:e.setModal,children:n.jsxs("div",{className:`modal-container ${e.entity}-status-modal`,children:[n.jsx("h5",{children:e.entity==="preapproval"?`${t?"Inactivate":"Activate"} this preapproval?`:`Set ${e.name} to ${t?"Inactive":"Active"}?`}),e.entity==="preapproval"?n.jsxs("p",{children:["This will ",t?"inactivate":"activate"," the invitation URL"]}):n.jsxs("p",{children:["This action will set this ",e.entity,"'s status to"," ",t?"inactive":"active",", meaning they will",t?" no longer":""," be able to log in."]}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel",onClick:()=>e.setModal(!1),children:"CANCEL"}),n.jsxs("button",{type:"button",className:`btn btn-primary ${t?"inactivate":"activate"}`,"diagnostic-id":"modal-primary-btn",onClick:()=>r(e.org?e.org.id:e.user?e.user.id:e.preapproval?e.preapproval.id:e.relationshipManager?e.relationshipManager.id:null).then(()=>{e.createMessage({alertMessage:`The ${e.entity} has been set to ${t?"inactive":"active"}`}),e.setModal(!1)},i=>{e.createMessage({errorMessage:`There was an error updating this ${e.entity}`}),e.setModal(!1)}),children:[t?"Inactivate":"Activate"," ",e.entity]})]})]})})}const dme=e=>({}),i0=le(dme,{inactivateUser:sre,activateUser:ore,inactivateOrg:lre,activateOrg:cre,createMessage:he,inactivatePreapproval:ire,activatePreapproval:are,activateManager:nre,inactivateManager:tre})(cme);function ume(e){const{validationSchema:t,initialValues:r,preapproval:i,createMessage:a,updatePreapprovalOrg:s,user:o,updatePreapprovalUser:l,updatePreapproval:c,preapprovalRelationshipManagers:h}=e,[u,d]=y.useState(!1),p={history:e.history,location:e.location,match:e.match},f=h.filter(m=>m&&m.company&&i&&m.company.id===i.inviter_organization_id&&m.status==="active");return n.jsxs("div",{className:"container",children:[n.jsx("div",{className:"back-link-wrapper",children:n.jsxs(Ze,{to:{pathname:"/admin",search:"?view=preapprovals"},className:"back-link",children:[n.jsx(ir,{}),n.jsx("span",{children:"Back to Preapprovals"})]})}),n.jsx(gt,{enableReinitialize:!0,validationSchema:t,initialValues:r,onSubmit:(m,{setSubmitting:g})=>{l(o.id,m,i.preapproval_user.id).then(x=>{g(!1)})},children:({values:m,errors:g,touched:x,isSubmitting:v,setFieldValue:b,handleChange:j,dirty:w,setFieldError:S})=>n.jsxs("div",{className:"create-user-wrapper preapproval",children:[n.jsxs(vt,{autoComplete:"off",children:[i&&i.status==="used"?n.jsx(n.Fragment,{}):n.jsx("button",{type:"button",className:"btn preapproval-action-btn",id:`${i&&i.status==="active"?"in":""}activate-entity`,"diagnostic-id":`preapproval-${i&&i.status==="active"?"in":""}activate-btn`,onClick:()=>d(!0),children:i&&i.status==="active"?"Inactivate Preapproval":"Activate Preapproval"}),n.jsx("button",{type:"button",className:"btn btn-primary create-new-btn",onClick:()=>
33e.history.push("/admin/preapprovals/new"),children:"Create Preapproval"}),n.jsxs("div",{className:"user-details",children:[n.jsx("h5",{className:"preapproval-details-header",children:"Preapproval Details"}),n.jsxs("div",{id:"user-details-container",children:[n.jsxs("div",{className:"user-detail-container invitations",children:[n.jsx("h5",{children:"Invitation URL"}),n.jsx(Ke,{title:i.status==="inactive"?"Activate the preapproval to copy the link":"",placement:"top",children:n.jsxs("div",{className:"preapproval-invitation-grp",children:[n.jsx("div",{className:`code-snippet-container ${i.status}`,children:n.jsx("code",{id:"code-snippet-url","diagnostic-id":"code-snippet-url",children:n.jsx("div",{id:"snippet-text-url","diagnostic-id":"snippet-text-url",children:i.invitation_url})})}),n.jsx("button",{className:"btn-secondary",type:"button","diagnostic-id":"invitation-url-copy-btn",onClick:()=>(a({alertMessage:"Invitation link has been copied to the clipboard"}),Hl("snippet-text-url")),disabled:i.status==="inactive"||i.status==="used",children:"Copy Link"})]})}),n.jsx("h5",{children:"Inviter Organization"}),n.jsx("div",{className:"user-detail-container preapproval",children:n.jsx(me,{placeholder:"Company",value:i.inviter_organization,disabled:!0})})]}),n.jsxs("div",{className:"user-details preapproval-user-details",children:[n.jsx(yM,{...p,values:m,errors:g,touched:x,setFieldError:S,setFieldValue:b,isUpdatePreapproval:!0,preapproval:i}),n.jsx("div",{className:"form-group create-and-review",style:{textAlign:"right",padding:"20px 0"},children:n.jsx("button",{type:"submit",disabled:!w||!!Object.keys(g).length||v,"diagnostic-id":"user-create-btn",className:"btn btn-primary",children:"SAVE USER DETAILS"})})]})]})]})]}),u&&n.jsx(i0,{entity:"preapproval",name:m.email,setModal:d,preapproval:i})]})}),n.jsx("div",{className:"preapproval-org-details",children:n.jsx(gt,{enableReinitialize:!0,validationSchema:t,initialValues:{...r,relationshipManager:i?.relationship_manager?.id||""},onSubmit:(m,{setSubmitting:g})=>{s(o.id,i.preapproval_user.preapproval_org.id,m).then(x=>{g(!1)})},children:({values:m,errors:g,touched:x,isSubmitting:v,setFieldValue:b,handleChange:j,dirty:w,setFieldError:S,handleSubmit:_})=>n.jsxs("div",{className:"create-user-wrapper preapproval",children:[n.jsxs("div",{id:"user-details-container",className:"preapproval-org-details",children:[n.jsx("h5",{children:"Preapproval Organization Details"}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Preapproval Organization Name*"}),n.jsx(me,{id:"orgName",name:"orgName",value:m.orgName,disabled:!0},v)]}),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Preapproval Organization Type*"}),g.orgType&&x.orgType&&n.jsx("div",{className:"input-feedback",children:g.orgType}),n.jsxs("div",{className:`dropdown-container ${i.status}`,children:[n.jsxs(me,{component:"select",name:"orgType","diagnostic-id":"org-type-select",required:!0,disabled:i.status==="used",children:[n.jsx("option",{className:"disabled-option",hidden:!0,disabled:!0,value:"",children:"Select an organization type"}),n.jsx("option",{value:"Advisor",children:"Advisor"})]}),n.jsx(dt,{icon:Mt})]})]}),n.jsxs("div",{className:"user-detail-container preapproval",children:[n.jsx("label",{children:"Preapproval License Type*"}),g.licenseType&&x.licenseType&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:g.licenseType}),n.jsxs("div",{className:`dropdown-container ${i.status}`,children:[n.jsxs(me,{component:"select",name:"licenseType","diagnostic-id":"license-type-select",required:!0,onChange:C=>{const E=C.target.value;b("licenseType",E)},disabled:i.status==="used",children:[n.jsx("option",{className:"disabled-option",hidden:!0,disabled:!0,value:"",children:"Select an organization type"}),n.jsx("option",{value:"Advisor",children:"Advisor"}),n.jsx("option",{value:"Community",children:"Community"}),n.jsx("option",{value:"Sponsored-Community",children:"Sponsored Community"})]}),n.jsx(dt,{icon:Mt})]})]}),m.licenseType==="Advisor"&&n.jsxs("div",{className:"permissions-settings-container",children:[n.jsxs("div",{className:"company-settings-grp",children:[n.jsx("h5",{children:"Hedwig Settings"}),n.jsxs("div",{className:"company-settings-label-btns",children:[n.jsx("div",{className:"company-settings-subheader",children:"Provide Hedwig for this organization"}),n.jsxs("div",{className:"company-settings-radio-btns",children:[n.jsx(me,{component:mt,name:"provideHedwig",id:"true",label:"On",disabled:i.status==="used"}),n.jsx(me,{component:mt,name:"provideHedwig",id:"false",label:"Off",disabled:i.status==="used"})]})]})]}),n.jsxs("div",{className:"company-settings-grp",children:[n.jsx("h5",{children:"Engage Settings"}),n.jsxs("div",{className:"company-settings-label-btns",children:[n.jsx("div",{className:"company-settings-subheader",children:"Provide Engage for this organization"}),n.jsxs("div",{className:"company-settings-radio-btns",children:[n.jsx(me,{component:mt,name:"provideEngage",id:"true",label:"On",disabled:i.status==="used"}),n.jsx(me,{component:mt,name:"provideEngage",id:"false",label:"Off",disabled:i.status==="used"})]})]})]}),n.jsxs("div",{className:"company-settings-grp",children:[n.jsx("h5",{children:"Studio Settings"}),n.jsxs("div",{className:"company-settings-label-btns",children:[n.jsx("div",{className:"company-settings-subheader",children:"Provide Studio for this organization. Engage must be enabled for Studio to function"}),n.jsxs("div",{className:"company-settings-radio-btns",children:[n.jsx(me,{component:mt,name:"provideStudio",id:"true",label:"On",disabled:i.status==="used"}),n.jsx(me,{component:mt,name:"provideStudio",id:"false",label:"Off",disabled:i.status==="used"})]})]})]})]})]}),n.jsx("div",{className:"form-group create-and-review",style:{textAlign:"right",padding:"20px 0"},children:n.jsx("button",{type:"submit",disabled:!w||!!Object.keys(g).length||v,"diagnostic-id":"user-create-btn",className:"btn btn-primary",onClick:C=>{C.preventDefault(),_()},children:"SAVE"})})]})})}),i&&i.preapproval_user&&i.preapproval_user.preapproval_org&&(i.preapproval_user.preapproval_org.license_type==="Sponsored-Community"||i.preapproval_user.preapproval_org.license_type==="Advisor")&&n.jsx("div",{className:"preapproval-org-details",children:n.jsx(gt,{enableReinitialize:!0,initialValues:{relationshipManager:i?.relationship_manager?.id||""},onSubmit:(m,{setSubmitting:g})=>{c(i.id,m.relationshipManager).then(x=>{g(!1),a({alertMessage:"Relationship manager updated successfully"})})},children:({values:m,errors:g,touched:x,isSubmitting:v,setFieldValue:b,handleChange:j,dirty:w})=>n.jsx("div",{className:"create-user-wrapper preapproval",children:n.jsx(vt,{autoComplete:"off",children:n.jsxs("div",{id:"relationship-manager-container",children:[n.jsx("h5",{children:"Relationship Manager Details"}),n.jsxs("div",{className:"user-detail-container preapproval",children:[n.jsx("label",{children:"Relationship Manager"}),g.relationshipManager&&x.relationshipManager&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:g.relationshipManager}),n.jsxs("div",{className:`dropdown-container ${i.status}`,children:[n.jsxs(me,{component:"select",name:"relationshipManager","diagnostic-id":"relationship-manager-select",onChange:S=>{const _=S.target.value;b("relationshipManager",_)},disabled:i.status==="used",children:[n.jsx("option",{value:"",children:"Select a relationship manager"}),f&&f.length>0?f.map(S=>S&&S.id?n.jsxs("option",{value:S.id,children:[S.first_name," ",S.last_name]},S.id):null):n.jsx("option",{value:"",disabled:!0,children:"No relationship managers available"})]}),n.jsx(dt,{icon:Mt})]})]}),n.jsx("div",{className:"form-group",style:{textAlign:"right",padding:"20px 0"},children:n.jsx("button",{type:"submit",disabled:!w||v,"diagnostic-id":"update-relationship-manager-btn",className:"btn btn-primary",children:"UPDATE"})})]})})})})})]})}const hme=e=>({preapprovalRelationshipManagers:e.admin&&e.admin.relationshipManagers}),pme=le(hme,{createMessage:he,updatePreapprovalOrg:bre,updatePreapprovalUser:yre,updatePreapproval:rre})(ume);function fme(e){const{preapprovalOrganizations:t,user:r,getPreapproval:i,preapproval:a}=e,s=e.match.params.id,[o,l]=y.useState(s);if(y.useEffect(()=>{(!a||a.id!==s)&&i(r.id,o).then(d=>
33{d?e.history.push(`/admin/preapprovals/${s}`):e.history.push("/admin?view=preapprovals")})},[]),!a)return null;const c={email:a.preapproval_user.email,firstName:a.preapproval_user.first_name,lastName:a.preapproval_user.last_name,orgName:a.preapproval_user.preapproval_org.organization_name,orgType:a.preapproval_user.preapproval_org.organization_type,licenseType:a.preapproval_user.preapproval_org.license_type,provideEngage:a.preapproval_user.preapproval_org.provide_engage,provideStudio:a.preapproval_user.preapproval_org.provide_studio,provideHedwig:a.preapproval_user.preapproval_org.provide_hedwig},h=_t().shape({firstName:Ae().required("Please enter a first name").max(100,"Name is too long"),lastName:Ae().required("Please enter a last name").max(100,"Name is too long"),provideEngage:cr(),provideStudio:cr(),provideHedwig:cr()}),u={initialValues:c,validationSchema:h,...e};return n.jsx(pme,{...u})}const mme=e=>({preapprovalOrganizations:e.admin.preapprovalOrganizations,user:e.auth&&e.auth.user,preapproval:e.admin&&e.admin.preapproval}),gme=le(mme,{getPreapproval:vre})(Jt(fme));function vme(e){const{validationSchema:t,initialValues:r,relationshipManager:i,user:a,updateRelationshipManager:s}=e,[o,l]=y.useState(!1),c={history:e.history,location:e.location,match:e.match};return n.jsxs("div",{className:"container",children:[n.jsx("div",{className:"back-link-wrapper",children:n.jsxs(Ze,{to:{pathname:"/admin",search:"?view=relationshipmanagers"},className:"back-link",children:[n.jsx(ir,{}),n.jsx("span",{children:"Back to Relationship Managers"})]})}),n.jsx(gt,{enableReinitialize:!0,validationSchema:t,initialValues:r,onSubmit:(h,{setSubmitting:u})=>{s(a.id,h,i.id).then(d=>{u(!1)})},children:({values:h,errors:u,touched:d,isSubmitting:p,setFieldValue:f,handleChange:m,dirty:g,setFieldError:x})=>n.jsxs("div",{className:"create-user-wrapper relationship-manager",children:[n.jsxs(vt,{autoComplete:"off",children:[n.jsx("button",{type:"button",className:"btn action-btn",id:`${i&&i.status==="active"?"in":""}activate-entity`,"diagnostic-id":`relationship-manager-${i&&i.status==="active"?"in":""}activate-btn`,onClick:()=>l(!0),children:i&&i.status==="active"?"Inactivate":"Activate"}),n.jsx("button",{type:"button",className:"btn btn-primary create-new-btn",onClick:()=>e.history.push("/admin/relationshipmanagers/new"),children:"Add Manager"}),n.jsxs("div",{className:"user-details",children:[n.jsx("h5",{className:"relationship-manager-details-header",children:"Relationship Manager Details"}),n.jsxs("div",{id:"user-details-container",children:[n.jsxs("div",{className:"user-detail-container relationship-manager-details-container",children:[n.jsx("h5",{children:"Organization"}),n.jsx("div",{className:"user-detail-container relationship-manager",children:n.jsx(me,{placeholder:"Company",value:i.company.name,disabled:!0})})]}),n.jsxs("div",{className:"user-details relationship-manager-details",children:[n.jsx(xM,{...c,values:h,errors:u,touched:d,setFieldError:x,setFieldValue:f,isUpdateRelationshipManager:!0,relationshipManager:i}),n.jsx("div",{className:"form-group create-and-review",style:{textAlign:"right",padding:"20px 0"},children:n.jsx("button",{type:"submit",disabled:!g||!!Object.keys(u).length||p,"diagnostic-id":"user-create-btn",className:"btn btn-primary",children:"SAVE"})})]})]})]})]}),o&&n.jsx(i0,{entity:"manager",name:h.email,setModal:l,relationshipManager:i})]})})]})}const bme=e=>({}),yme=le(bme,{updateRelationshipManager:wre})(vme);function xme(e){const{relationshipManager:t,user:r,getRelationshipManager:i}=e,a=e.match.params.id,[s,o]=y.useState(a);if(y.useEffect(()=>{(!t||t.id!==a)&&i(r.id,s).then(u=>{u?e.history.push(`/admin/relationshipmanagers/${s}`):e.history.push("/admin?view=relationshipmanagers")})},[]),!t)return null;const l={email:t.email,firstName:t.first_name,lastName:t.last_name,phoneNumber:t.phone_number||"",jobTitle:t.title||""},c=_t().shape({firstName:Ae().required("Please enter a first name").max(100,"Name is too long"),lastName:Ae().required("Please enter a last name").max(100,"Name is too long"),email:Ae().email("Please enter a valid email").required("Please enter an email address").max(100,"Email is too long"),phoneNumber:Ae().max(100,"Phone number is too long"),jobTitle:Ae()}),h={initialValues:l,validationSchema:c,...e};return n.jsx(yme,{...h})}const jme=e=>({user:e.auth&&e.auth.user,relationshipManager:e.admin&&e.admin.relationshipManager}),wme=le(jme,{getRelationshipManager:jre})(Jt(xme));function Sme({validationSchema:e,initialValues:t,userId:r,currentUser:i,changeUserId:a,handleSelection:s,picture:o,setPic:l,newPassword:c,setNewPassword:h,modal:u,setModal:d,selectedUser:p,...f}){const m={userId:r,currentUser:i,changeUserId:a,handleSelection:s,picture:o,setPic:l,newPassword:c,setNewPassword:h,selectedUser:p,...f};return n.jsxs("div",{className:"container",children:[n.jsx("div",{className:"back-link-wrapper",children:n.jsxs(Ze,{to:{pathname:"/admin",search:"?view=users"},className:"back-link",children:[n.jsx(ir,{}),n.jsx("span",{children:"Back to Users"})]})}),n.jsx(gt,{enableReinitialize:!0,validationSchema:e,initialValues:t,onSubmit:(g,{setSubmitting:x,resetForm:v})=>{f.updateUser(r,g).then(()=>{f.createMessage({alertMessage:"User has been successfully updated"}),v({values:g})},b=>{f.createMessage({errorMessage:"There was an error updating this user"}),x(!1)})},children:({values:g,errors:x,touched:v,isSubmitting:b,dirty:j,setFieldValue:w,setFieldError:S})=>n.jsxs("div",{className:"create-user-wrapper",children:[n.jsxs(vt,{autoComplete:"off",children:[n.jsx("button",{type:"button",className:"btn",id:"mock-user","diagnostic-id":"impersonate-user-btn",onClick:()=>{f.impersonateUser(r).then(()=>{f.history.push("/insights")})},disabled:!(i&&i.account_status==="active"),children:"Log in as User"}),n.jsxs("div",{className:"user-details",children:[n.jsx(jM,{...m,values:g,errors:x,touched:v,setFieldError:S,setFieldValue:w,isUpdateUser:!0}),n.jsx("h5",{className:"manage-user-header-text",children:"Manage User"}),n.jsxs("button",{type:"button",className:"btn",id:`${i&&i.account_status==="active"?"in":""}activate-entity`,"diagnostic-id":`user-${i&&i.account_status==="active"?"in":""}activate-btn`,onClick:()=>d(!0),children:[i&&i.account_status==="active"?"Inactivate":"Reactivate"," ","User"]}
33),n.jsxs("div",{className:"form-group",style:{textAlign:"right",padding:"20px"},children:[n.jsx("button",{type:"button",className:"btn-cancel",onClick:()=>f.history.push("/admin"),children:"CANCEL"}),n.jsx("button",{type:"submit",disabled:!g.password&&!j||!!Object.keys(x).length||!p||b,className:"btn btn-primary","diagnostic-id":"user-update-btn",children:"UPDATE"})]})]})]}),u&&n.jsx(i0,{entity:"user",name:g.email,setModal:d,user:i})]})})]})}const _me=_t().shape({firstName:Ae().required("Please enter a first name").max(100,"Name is too long"),lastName:Ae().required("Please enter a last name").max(100,"Name is too long"),email:Ae().email("Please enter a valid email").required("Please enter an email address").max(100,"Email is too long"),password:Ae().min(6,"Password is too short (minimum 6 characters)").max(100,"Password is too long"),accountRole:Ae().required("Please select an account role"),professionalCredentials:Ae().nullable().max(100,"Credentials is too long"),corporateTitle:Ae().nullable().max(100,"Job title is too long"),isBillingContact:cr().required("Please specify if this is a billing contact")});function Cme(e){const t=e.match.params.id,[r,i]=y.useState(t),a=Number(r),s=y.useMemo(()=>e.users&&a?e.users.filter(x=>x.id===a)[0]||{}:{},[e.users,a]),[o,l]=y.useState(!0),[c,h]=y.useState(null),[u,d]=y.useState(!1),[p,f]=y.useState(!1);y.useEffect(()=>{i(r||null),(e.users?(e.users.findIndex(v=>v.id===a)===-1&&e.history.push("/admin?view=users"),Promise.resolve()):e.getAllUsers().then(v=>{v&&v.payload&&v.payload.findIndex(j=>j.id===a)===-1&&e.history.push("/admin?view=users")})).then(()=>{e.getUser(a).then(v=>{if(!v||!v.id){e.history.push("/admin?view=users");return}h(v.profile_picture_url)})})},[r]);let m;if(r){if(!e.users||!s)return null;m={email:s.email?s.email:"",company:s.company?s.company:{},firstName:s.first_name?s.first_name:"",lastName:s.last_name?s.last_name:"",professionalCredentials:s.professional_credentials?s.professional_credentials:"",corporateTitle:s.corporate_title?s.corporate_title:"",userId:s.id,accountCreated:Qt(s.create_datetime).local().format("MMMM DD, YYYY"),accountStatus:s.account_status?s.account_status.toUpperCase():"",lastLogin:Qt(s.last_active_datetime).local().format("M/DD/YYYY, hh:mm A"),hasAcceptedTerms:s.terms_click_accepted?"True":"False",accountRole:s.account_role?s.account_role[0].name:"",accessStartDate:s.access_start_date?Qt(s.access_start_date).local().format("YYYY-MM-DDTHH:mm:ss"):"",accessEndDate:s.access_end_date?Qt(s.access_end_date).local().format("YYYY-MM-DDTHH:mm:ss"):"",profile:s.profile_picture_url,isBillingContact:String(s.is_billing_contact??!1),password:"",canUseEngage:String(s?.can_use_engage??!1),canUseStudio:String(s?.can_use_studio??!1),canUsePartner:String(s?.can_use_partner??!1),isAuthenticatorTotpEnabled:s?.is_authenticator_totp_enabled,isEmailOtpEnabled:s?.is_email_otp_enabled,canRemixClientPiece:String(s?.can_remix_clientpiece??!1),canRemixVideoScript:String(s?.can_remix_video_script??!1),canUseAssistant:String(s?.can_use_assistant??!1),canUseQuestionAnswer:String(s?.can_use_question_answer??!1),canCallHedwig:String(s?.can_call_hedwig??!1),canUseComposer:String(s?.can_use_composer??!1)}}else m={email:"",company:{},firstName:"",lastName:"",professionalCredentials:"",corporateTitle:"",userId:"",accountCreated:"",accountStatus:"",lastLogin:"",numLogins:"",accountType:"",accountRole:"",accessStartDate:"",accessEndDate:"",profile:"",isBillingContact:"",password:"",canUseEngage:!1,canUseStudio:!1,canUsePartner:!1,canUseComposer:!0};u&&(m={...m,password:CD(16)});const g={validationSchema:_me,initialValues:m,userId:r,currentUser:s,handleSelection:l,changeUserId:i,picture:c,setPic:
33h,newPassword:u,setNewPassword:d,modal:p,setModal:f,selectedUser:o,...e};return n.jsx(Sme,{...g})}const Nme=e=>({users:e.admin.users}),Eme=le(Nme,{updateUser:Jne,getAllUsers:Hf,getUser:Qne,impersonateUser:m3,createMessage:he})(Jt(Cme)),Tme=e=>{const t=e.toString().split("");for(let r=t.length-3;r>0;r-=3)t.splice(r,0,",");return`$${t.join("")}`};function kme({results:e,type:t,...r}){const i=l=>{t==="Advisor"?l.advisor_crd===(r.selectedValue&&r.selectedValue.advisor_crd)?r.setValue(null):r.setValue(l):l.firm_crd===(r.selectedValue&&r.selectedValue.firm_crd)?r.setValue(null):r.setValue(l)},a=l=>{r.setManual(~~l.target.value?parseInt(l.target.value):l.target.value)},o=r.manual||r.selectedValue?"confirmed":r.status==="confirmed"?"unconfirmed":r.status;return n.jsxs("div",{className:`${t.toLowerCase()}-verify-container ${o}`,children:[n.jsxs("div",{className:"verification-reason",id:o,children:[r.status==="rejected"&&!(r.manual||r.selectedValue)&&n.jsx("h6",{children:r.reason}),n.jsx("i",{className:"material-icons",id:o,children:o==="confirmed"?"check_circle_outline":o==="rejected"?"highlight_off":"help_outline"})]}),n.jsxs("div",{id:"verify-results",children:[n.jsxs("h4",{children:["Verify ",t]}),n.jsxs("div",{className:"num-results",children:[e.length," Result",e.length!==1&&"s"]}),n.jsxs("h5",{children:["Select an ",t]}),n.jsx("div",{className:"verify-results-container",children:e.length===0?n.jsx("div",{className:"verify-result",id:"no-results",children:n.jsxs("h6",{children:["No ",`${t.toLowerCase()}s`," found."]})}):t==="Advisor"?e.map(l=>n.jsxs("div",{className:`verify-result${r.selectedValue&&r.selectedValue.advisor_crd===l.advisor_crd?" selected":""}`,onClick:()=>i(l),children:[n.jsxs("div",{className:"entity-identity",children:[n.jsx("h6",{children:l.name}),n.jsxs("div",{className:"entity-crd",children:["CRD#"," ",n.jsx("a",{href:`https://adviserinfo.sec.gov/individual/summary/${l.advisor_crd}`,onClick:c=>c.stopPropagation(),target:"_blank",rel:"noopener noreferrer",children:l.advisor_crd})]}),n.jsx("div",{children:l.registration_status})]}),n.jsxs("div",{className:"entity-secondary",children:[n.jsx("b",{children:"Alternate Names:"}),n.jsx("div",{children:l.readable_names})]}),n.jsxs("div",{className:"entity-info",children:[l.firm_name," (CRD#"," ",n.jsx("a",{href:`https://adviserinfo.sec.gov/firm/summary/${l.firm_crd}`,onClick:c=>c.stopPropagation(),target:"_blank",rel:"noopener noreferrer",children:l.firm_crd}),")"]})]},l.advisor_crd)):e.map(l=>n.jsxs("div",{className:`verify-result${r.selectedValue&&r.selectedValue.firm_crd===l.firm_crd?" selected":""}`,onClick:()=>i(l),children:[n.jsxs("div",{className:"entity-identity",children:[n.jsx("h6",{children:l.firm_name}),n.jsxs("div",{className:"entity-crd",children:["CRD#"," ",n.jsx("a",{href:`https://adviserinfo.sec.gov/firm/summary/${l.firm_crd}`,onClick:c=>c.stopPropagation(),target:"_blank",rel:"noopener noreferrer",children:l.firm_crd})]}),n.jsx("div",{children:l.registration_status})]}),n.jsxs("div",{className:"entity-secondary",children:[n.jsx("b",{children:"Address:"}),n.jsx("div",{children:l.address})]}),n.jsxs("div",{className:"entity-info",children:[n.jsxs("div",{children:[n.jsx("b",{children:"AUM:"})," ",Tme(l.aum)]}),n.jsxs("div",{children:[n.jsx("b",{children:"Clients:"})," ",l.num_clients]})]})]},l.firm_crd))}),n.jsxs("div",{className:"manual-verify",children:[n.jsxs("h5",{children:["Or Enter ",t," Details -"," ",n.jsx("a",{href:"https://www.adviserinfo.sec.gov/",target:"_blank",rel:"noopener noreferrer",children:"IAPD Look Up"})]}),n.jsxs("div",{className:"verify-inputs",children:[n.jsxs("div",{className:"verify-input-group",children:[n.jsxs("label",{children:[t," CRD#"]}),r.manual&&~~r.manual===0&&n.jsx("div",{className:"input-feedback",children:"CRD must be an integer value"}),n.jsx("input",{placeholder:"CRD#",className:`verify-input${r.manual?" with-selection":""}`,"diagnostic-id":`${t.toLowerCase()}-crd-input`,value:r.manual?r.manual:"",onChange:a})]}),t==="Firm"&&n.jsxs("div",{className:"verify-input-group",children:[n.jsx("label",{children:"Firm AUM"}),n.jsx("input",{placeholder:"AUM",className:`verify-input${r.manualAum?" with-selection":""}`,"diagnostic-id":"firm-aum-input",value:r.manualAum?r.manualAum:"",onKeyDown:l=>{isNaN(parseInt(l.key))&&l.key!=="Backspace"&&l.key!=="Tab"&&!l.key.includes("Arrow")&&!l.getModifierState("Control")&&!l.getModifierState("Meta")&&l.preventDefault()},onFocus:()=>r.manualAum&&typeof r.manualAum=="string"&&r.setManualAum(Math.floor(r.manualAum.split(",").join(""))),onBlur:()=>
33r.manualAum&&r.setManualAum(Number(r.manualAum).toLocaleString("en")),onChange:l=>r.setManualAum(parseInt(l.target.value))})]})]})]})]})]})}const Pme=(e,t)=>{const r=t.type.toLowerCase();return{results:e.admin.searchResults[r].results,reason:e.admin.searchResults[r].verification_reason,status:e.admin.searchResults[r].verification_status}},IT=le(Pme,{})(kme);function Ime(e){const[t,r]=y.useState(e.results.advisor.verification_status==="confirmed"?e.results.advisor.results[0]:null),[i,a]=y.useState(e.results.firm.verification_status==="confirmed"?e.results.firm.results[0]:null),[s,o]=y.useState(null),[l,c]=y.useState(null),[h,u]=y.useState(null),[d,p]=y.useState(!1),[f,m]=y.useState(""),[g,x]=y.useState(!1);y.useEffect(()=>{m(i&&t?"Verified through Cerebro selections":"")},[i,t]),y.useEffect(()=>{if(e.approvedInbound){const{verification_reason:_,aum:C,advisor_crd:E,firm_crd:P}=e.approvedInbound;m(_);const T=e.results.advisor.results.find(k=>k.advisor_crd===E),N=e.results.firm.results.find(k=>k.firm_crd===P);T?r(T):o(E),N?a(N):c(P),!N&&u(C)}},[]),y.useEffect(()=>{s&&r(null)},[s]),y.useEffect(()=>{(l||h)&&a(null)},[l,h]),y.useEffect(()=>{t&&o(null)},[t]),y.useEffect(()=>{i&&(c(null),u(null))},[i]);const v=()=>{x(!0);const _=e.values;return l?(_.firmCrd=parseInt(l),_.aum=h||null):(_.firmCrd=i?i.firm_crd:null,_.aum=i?i.aum:null),s?_.advisorCrd=parseInt(s):_.advisorCrd=t?t.advisor_crd:null,_.verificationStatus="approved",_.verificationReason=f,_.aum=typeof _.aum=="string"?parseInt(_.aum.split(",").join("")):_.aum,e.updateInbound(e.inboundId,_)},b=()=>{const _=e.values;_.verificationStatus="denied",_.verificationReason=f,e.updateInbound(e.inboundId,_).then(()=>{e.history.push({pathname:"/admin",search:"?view=queue"})})};let j="",w="no-select",S="help_outline";return s?l||i?(j="Advisor details entered manually. No match will be found.",S="remove_circle_outline",w="no-verify"):j="Please select a firm":t?l||i?~~l===t.firm_crd||i&&t.firm_crd===i.firm_crd?(j="The advisor and firm match!",S="check_circle_outline",w="match"):(j="The advisor and firm do not match.",S="highlight_off",w="no-match"):j="Please select a firm":l||i?j="Please select an advisor":j="Please select a firm and an advisor",n.jsxs("div",{className:"verify-form-container",children:[n.jsx(IT,{type:"Advisor",selectedValue:t,setValue:r,manual:s,setManual:o}),n.jsx(IT,{type:"Firm",selectedValue:i,setValue:a,manual:l,setManual:c,manualAum:h,setManualAum:u}),n.jsxs("div",{className:"advisor-firm",id:w,children:[n.jsx("h4",{children:j}),n.jsx("i",{className:"material-icons",children:S})]}),n.jsxs("div",{className:"row verification-reason-container",children:[n.jsx("label",{children:"Verification Reason*"}),n.jsx("input",{placeholder:"Enter a reason","diagnostic-id":"verify-reason-input",value:f,onChange:_=>m(_.target.value)})]}),n.jsx("div",{className:"row",children:n.jsxs("div",{className:"form-group verification-form-btns",style:{textAlign:"right",padding:"20px",marginTop:"24px"},children:[n.jsxs("div",{className:"skip-verification",children:["Approve without verification",n.jsx("input",{type:"checkbox",checked:d&&!((t||s)&&(i||l)),disabled:(t||s)&&(i||l),onChange:()=>p(!d)})]}),n.jsx("button",{className:"btn-cancel","diagnostic-id":"inbound-cancel-btn",type:"button",onClick:()=>{x(!0),e.history.push({pathname:"/admin",search:"?view=queue"})},children:"Cancel"}),n.jsx("button",{className:"btn-danger","diagnostic-id":"inbound-deny-btn",type:"button",disabled:g||!f,onClick:b,children:"Deny"}),n.jsx("button",{className:"btn btn-primary","diagnostic-id":"inbound-approve-btn",type:"button",onClick:()=>v().then(()=>{e.history.push({pathname:"/admin",search:"?view=queue"})},()=>{x(!1)}),disabled:g||!f||!((t||s)&&(i||l)||d),children:"Approve"}),n.jsx("button",{className:"btn btn-primary","diagnostic-id":"inbound-approve-create-btn",type:"button",onClick:()=>v().then(_=>{e.history.push({pathname:"/admin/users/new",state:{inbound:_.data}})},()=>{x(!1)}),disabled:g||!f||!((t||s)&&(i||l)||d),children:"Approve & Create"})]})})]})}const Dme=e=>({results:e.admin.searchResults}),Rme=le(Dme,{updateInbound:LA})(Jt(Ime)),Ome=e=>{const{Approved:t}=g3,r=e.match.params.id,i=r!=="new",a=i&&e.inbounds.filter(m=>m.id===~~r)[0],s=i&&a.verification_status===t,[o,l]=y.useState(null),[c,h]=y.useState(null),u=_t().shape({firstName:Ae().required("Please enter a first name").max(100,"Name is too long"),middleName:Ae().nullable().max(100,"Name is too long"),lastName:Ae().required("Please enter a last name").max(100,"Name is too long"),email:Ae().email("Please enter a valid email").required("Please enter an email address").max(100,"Email is too long"),firmName:Ae().required("Please enter a firm name").max(100,"Name is too long"),website:Ae().url("Invalid url").nullable().max(100,"Website is too long"),zipcode:Ae().nullable().max(100,"Zip code is too long")});y.useEffect(()=>{i&&h(a.id)},[]);const d={firstName:i?a.first_name:"",middleName:i?a.middle_name:"",lastName:i?a.last_name:"",email:i?a.email:"",firmName:i?a.firm_name:"",website:i?a.website:"",zipcode:i?a.geography_zipcode:""};y.useEffect(()=>{s?f(d):e.clearInboundSpinner()},[]);const p=()=>u.isValidSync(d),f=(m,g)=>e.verifyInbound(m).then(x=>{l(!0),g&&g(!1)},x=>{g&&g(!1)});return n.jsxs("div",{className:"container",children:[e.spinner&&n.jsx(Dn,{}),n.jsx("div",{className:"back-link-wrapper",children:n.jsxs(Ze,{to:{pathname:"/admin",search:"?view=queue"},className:"back-link",children:[n.jsx(ir,{}),n.jsx("span",{children:"Back to List"})]})}),n.jsx("div",{className:"create-user-wrapper",children:n.jsx(gt,{enableReinitialize:!0,validationSchema:u,initialValues:d,isInitialValid:p,onSubmit:(m,{setSubmitting:g})=>{i?e.updateInbound(a.id,m).then(()=>{f(m,g)},x=>{g(!1)}):e.createInbound(m).then(x=>{h(x.data.id),f(m,g)},x=>{g(!1)})},children:({values:m,errors:g,touched:x,isSubmitting:v,isValid:b})=>n.jsxs(vt,{autoComplete:"off",children:[n.jsxs("div",{className:"user-details",children:[n.jsx("h5",{children:"Adv
33isor/Firm Verification"}),n.jsxs("div",{id:"user-details-container",children:[[["firstName","First Name*","first-name-input"],["middleName","Middle Name","middle-name-input"],["lastName","Last Name*","last-name-input"],["email","Email Address*","email-input"],["firmName","Firm Name*","firm-name-input"]].map(j=>Ao(j[0],j[1],g,x,!1,j[2])),n.jsxs("div",{className:"user-detail-container",children:[n.jsx("label",{children:"Firm Website"}),g.website&&x.website&&n.jsx("div",{className:"input-feedback",children:g.website}),d.website||o?n.jsx("a",{href:m.website,target:"_blank",rel:"noopener noreferrer",children:n.jsx(me,{type:"text",name:"website",id:"website","diagnostic-id":"website-input",placeholder:"Website",className:g.website&&x.website?"text-input error":"",readOnly:!0})}):n.jsx(me,{type:"text",name:"website",id:"website","diagnostic-id":"website-input",placeholder:"Website",className:g.website&&x.website?"text-input error":""})]}),Ao("zipcode","Zip Code",g,x,!1,"zip-code-input")]})]}),!o&&n.jsx("div",{className:"row",children:n.jsx("div",{className:"form-group",style:{textAlign:"right",padding:"20px"},children:n.jsx("button",{type:"submit",className:"btn-primary btn","diagnostic-id":"inbound-verify-btn",disabled:!b||v,children:"Verify"})})}),o&&n.jsx(Rme,{inboundId:c,values:m,setResults:l,approvedInbound:s&&a})]})})})]})},Ame=e=>({spinner:e.admin.showSpinnerInbound,inbounds:e.admin.inbounds}),Mme=le(Ame,{verifyInbound:dre,createInbound:hre,updateInbound:LA,clearInboundSpinner:ure})(Ome),$me=({showSpinnerUsers:e,showSpinnerOrgs:t,showSpinnerPreapprovals:r,showSpinnerUpgradeRequests:i,showSpinnerRelationshipManager:a})=>{const s=e||t||r||i||a;return n.jsxs(n.Fragment,{children:[s?n.jsx(Dn,{}):null,n.jsxs(us,{children:[n.jsx(jn,{exact:!0,path:"/admin/users/new",component:lme}),n.jsx(jn,{exact:!0,path:"/admin/users/:id",component:Eme}),n.jsx(jn,{exact:!0,path:"/admin/orgs/new",component:bM}),n.jsx(jn,{exact:!0,path:"/admin/orgs/:id",component:vM}
33),n.jsx(jn,{exact:!0,path:"/admin/preapprovals/new",component:Wfe}),n.jsx(jn,{exact:!0,path:"/admin/preapprovals/:id",component:gme}),n.jsx(jn,{exact:!0,path:"/admin/relationshipmanagers/new",component:Jfe}),n.jsx(jn,{exact:!0,path:"/admin/relationshipmanagers/:id",component:wme}),n.jsx(jn,{exact:!0,path:"/admin/verify/:id",component:Mme}),n.jsx(jn,{path:"/admin",component:Uue})]})]})},Lme=e=>({showSpinnerUsers:e.admin.showSpinnerUsers,showSpinnerOrgs:e.admin.showSpinnerOrgs,showSpinnerPreapprovals:e.admin.showSpinnerPreapprovals,showSpinnerUpgradeRequests:e.admin.showSpinnerUpgradeRequests,showSpinnerRelationshipManager:e.admin.showSpinnerRelationshipManager}),Fme=le(Lme,{})($me),Ume=({component:e,auth:t,...r})=>n.jsx(jn,{...r,render:i=>t.user||t.isAuthenticated?t.user.account_role[0].name==="CLAdmin"?n.jsx(e,{...i}):n.jsx(qt,{to:"/chartbooks"}):t.isLoading?n.jsx("div",{className:"container"}):n.jsx(qt,{to:"/login"})}),Bme=e=>({auth:e.auth}),qme=le(Bme)(Ume),{apiAddress:Sr}=Tn,rc=e=>(t,r)=>(t({type:x3}),Ne.get(`${Sr}api/users/${e}/chartbooks/?view=summary&time=${Date.now()}`,Ee(r)).then(i=>(t({type:j3,payload:i.data}),i)).catch(i=>{t({type:w3}),i.message!==Ue&&t(he({serverError:"There was a problem fetching your chartbooks, please try again"}))})),Kf=(e,t)=>(r,i)=>{const a=`${Sr}api/users/${t}/chartbooks/${e}/?time=${Date.now()}`;return r({type:v3}),Ne.get(a,Ee(i)).then(s=>(r({type:b3,payload:s.data}),s)).catch(s=>(r({type:fs}),s.response&&s.response.data&&s.response.data.detail==="Requested chartbook is currently being shared by partner insights"?r(he({serverError:"This chartbook is linked to a partner insight and cannot be edited."})):s.message!==Ue&&r(he({serverError:"There was a problem retrieving this chartbook, please try again"})),Promise.reject(s)))},wM=(e,t)=>(r,i)=>{const a=`${Sr}api/users/${t}/chartbooks/${e}/`;return Ne.delete(a,Ee(i)).then(s=>(r({type:_3,id:e}),r(he({alertMessage:"Chartbook Successfully Deleted"})),s)).catch(s=>{s.message!==Ue&&r(he({serverError:"There was a problem deleting this chartbook, please try again"}))})},a0=(e,t)=>(r,i)=>{const a=`${Sr}api/users/${t}/chartbooks/${e}/`,o={is_favorite:i().chartbooks.items.filter(l=>l.id===e)[0].is_favorite?0:1};return r({type:O3,payload:e}),Ne.patch(a,o,Ee(i))},Ga=(e=[],t,r,i,a)=>(s,o)=>{const l=`${Sr}api/users/${t}/chartbooks/`,c={chart_info_ids:JSON.stringify(e),chart_ids_order:JSON.stringify(e),title:r||"Market Chartbook",chartbookuser:t,tags:i||"",request_id:a};return s({type:yj}),Ne.post(l,c,Ee(o)).then(h=>(s({type:xj,payload:h.data}),s(he({alertMessage:"New Chartbook Created"})),h.data.id),h=>(s({type:fs}),h.message!==Ue&&s(he({serverError:"There was a problem creating this chartbook, please try again"})),Promise.reject(()=>{}))).then(h=>(s({type:S3,payload:h}),h)).then(h=>(setTimeout(()=>{_M()(s)},1e4),h))},Vme=(e,t)=>(r,i)=>{const a=`${Sr}api/users/${e}/chartbooks/`,s={partnerinsight_id:t};return r({type:yj}),Ne.post(a,s,Ee(i)).then(o=>(r({type:xj,payload:o.data}),r(he({alertMessage:"New Chartbook Created"})),o.data.id),o=>(r({type:fs}),o.message!==Ue&&r(he({serverError:"There was a problem creating this chartbook, please try again"})),Promise.reject(()=>{})))},SM=(e,t)=>(r,i)=>{const a=`${Sr}api/users/${e}/chartbooks/`,s={chartbookuser:e,featured_id:t};return r({type:yj}),Ne.post(a,s,Ee(i)).then(o=>(r({type:xj,payload:o.data}),r(he({alertMessage:"New Chartbook Created"})),o.data.id),o=>(r({type:fs}),o.message!==Ue&&r(he({serverError:"There was a problem creating this chartbook, please try again"})),Promise.reject(()=>{})))},_M=()=>e=>{e({type:D3})},zme=(e,t,r,i)=>(a,s)=>{const o=`${Sr}api/users/${t}/chartbooks/${e}/`,l={title:r,tags:i||null,chartbookuser:t,is_user_update:!0};return a({type:ND}),Ne.patch(o,l,Ee(s)).then(c=>{if(c.status===202){a({type:Gl}),a(he({alertMessage:"Your chartbook has been saved and is updating. Please check back shortly."}));return}a({type:ED,payload:c.data}),a(he({alertMessage:"Chartbook Updated"}))}).catch(c=>{a({type:fs}),c.message!==Ue&&a(he({serverError:"There was a problem updating this chartbook, please try again"}))})},Hme=(e,t,r,i,a,s)=>(o,l)=>{const c=`${Sr}api/users/${t}/chartbooks/${e}/notes/${r}/`,h={note1:i,note2:a,note3:s};return o({type:jj}),Ne.patch(c,h,Ee(l)).then(u=>{if(u.status===202){o({type:Gl}),o(he({alertMessage:"Your chartbook has been saved and is updating. Please check back shortly."}));return}o({type:wj,payload:u.data}
33),o(he({alertMessage:"Talking Points Updated"}))}).catch(u=>{u.message!==Ue&&o(he({serverError:"There was a problem updating this chartbook, please try again"}))})},Gme=(e,t,r,i,a,s)=>(o,l)=>{const c=`${Sr}api/users/${t}/chartbooks/${e}/notes/`,h={chartbook:e,chart_info:r,author:t,note1:i,note2:a,note3:s};return o({type:jj}),Ne.post(c,h,Ee(l)).then(u=>{if(u.status===202){o({type:Gl}),o(he({alertMessage:"Your chartbook has been saved and is updating. Please check back shortly."}));return}o({type:wj,payload:u.data}),o(he({alertMessage:"Talking Points Added"}))}).catch(u=>{o({type:fs}),u.message!==Ue&&o(he({serverError:"There was a problem updating this chartbook, please try again"}))})},Wme=(e,t,r)=>(i,a)=>{const s=`${Sr}api/users/${t}/chartbooks/${e}/notes/${r}/`;return i({type:jj}),Ne.delete(s,Ee(a)).then(o=>{if(o.status===202){i({type:Gl}),i(he({alertMessage:"Your chartbook has been saved and is updating. Please check back shortly."}));return}i({type:wj,payload:o.data}),i(he({alertMessage:"Talking Points Updated"}))}).catch(o=>{o.message!==Ue&&i(he({serverError:"There was a problem deleting these talking points, please try again"}))})},Yme=(e,t,r,i)=>(a,s)=>{const o=`${Sr}api/users/${t}/chartbooks/${e}/schedule/${r}/`;return Ne.patch(o,i,Ee(s)).then(l=>{a({type:q3,payload:l.data}),a(he({alertMessage:"Schedule Updated"}))}).catch(l=>{l.message!==Ue&&a(he({serverError:"There was a problem updating your chartbook schedule, please try again"}))})},Kme=()=>(e,t)=>{const r=t().auth.user.company.id,i=`${Sr}api/orgs/${r}/topics/`;return e({type:T3}),Ne.get(i,Ee(t)).then(a=>{e({type:k3,chartbookId:t().chartbooks.item.id,payload:a.data})}).catch(a=>{e({type:P3}),a.message!==Ue&&e(he({serverError:"A problem occurred while retrieving the charts, please try again"}))}),Ne.get(`${Sr}api/orgs/${r}/charts/`,Ee(t)).then(a=>(e({type:I3,chartbookId:t().chartbooks.item.id,payload:a.data}),a)).catch(a=>(a.message!==Ue&&e(he({serverError:"A problem occurred while retrieving the charts, please try again"})),Promise.reject(()=>a)))},CM=e=>(t,r)=>{e&&t({type:R3,id:e})},Xme=e=>(t,r)=>{t({type:B3,payload:e})},Qme=e=>(t,r)=>{t({type:U3,id:e})},Zme=()=>(e,t)=>{e({type:F3})},NM=e=>(t,r)=>{t({type:L3,payload:e})},s0=(e,t,r)=>(i,a)=>{const s=a().chartbooks.item.id,o={chart_ids:JSON.stringify(t),chart_ids_order:JSON.stringify(r),is_user_update:!0},l=`${Sr}api/users/${e}/chartbooks/${s}/`;return i({type:C3}),Ne.patch(l,o,Ee(a)).then(c=>{if(c.status===202){i({type:Gl}),i(he({alertMessage:"Your chartbook has been saved and is updating. Please check back shortly."}));return}i({type:N3}),i(he({alertMessage:"Chartbook Saved"}))}).catch(c=>{i({type:fs}),c.message!==Ue&&i(he({serverError:"There was a problem updating this chartbook, please try again"}))})},Xf=e=>t=>{t({type:Wl,payload:e})},ro=e=>(t,r)=>{t({type:E3,payload:e})},Jme=(e,t,r)=>(i,a)=>{const s=`${Sr}api/users/${t}/chartbooks/${e}/`,o={include_notes:r};return i({type:ND}),Ne.patch(s,o,Ee(a)).then(l=>{if(l.status===202){i({type:Gl}),i(he({alertMessage:"Your chartbook has been saved and is updating. Please check back shortly."}));return}i({type:ED,payload:l.data}),i(he({alertMessage:"Chartbook Updated"}))}).catch(l=>{i({type:fs}),l.message!==Ue&&i(he({serverError:"There was a problem updating this chartbook, please try again"}))})},ege=e=>(t,r)=>{const i=`${Sr}api/users/${e}/themes/layouts/`;return Ne.get(i,Ee(r)).then(a=>{t({type:$3,payload:a.data})})},tge=e=>(t,r)=>{const i=`${Sr}api/users/${e}/themes/designs/`;return Ne.get(i,Ee(r)).then(a=>{t({type:M3,payload:a.data})})},nge=(e,t,r)=>(i,a)=>{const s=`${Sr}api/users/${r}/themes/?layout=${e}&design=${t}`;return Ne.get(s,Ee(a))},rge=(e,t)=>(r,i)=>{const a=`${Sr}api/users/${t}/`,s={chartbook_theme:e};return Ne.patch(a,s,Ee(i)).then(o=>{r({type:A3,payload:o.data.chartbook_theme}),r(he({alertMessage:"Your layout and design have been saved and are updating."}))})},hn=e=>t=>{t({type:y3,payload:e})},ige=({location:e,newChartbook:t,saveChartSelection:r,getChartbooks:i,getChartbook:a,deleteChartbook:s,createMessage:o,history:l})=>{const[c,h]=y.useState(null),[u,d]=y.useState(!1),{state:p}=e;if(y.useEffect(()=>{if(e&&p){d(!0);const x=p.user;t([16],x.id).then(v=>{a(v,x.id).then(b=>{h(b.data),d(!1)})})}},[]),!e||!p)return n.jsx(qt,{to:"/admin?view=users"});const f=()=>{if(e&&p){d(!0);const x=p.user,v=[];return i(x.id).then(b=>(b.data.forEach(j=>{v.push(s(j.id,x.id))}),Promise.all(v)))}},m=p.user,g=p.tempPassword;return n.jsxs("div",{className:"container",children:[u&&n.jsx(Dn,{}),n.jsxs("div",{className:"row admin-wizard-wrapper",children:[n.jsx("div",{className:"wizard-header",children:n.jsxs("h3",{children:["Review Chartbook"," ",n.jsx("i",{className:"material-icons",onClick:()=>{d(!0),a(c.id,m.id).then(x=>{h(x.data),d(!1)})},children:"refresh"})]})}),n.jsx("div",{className:"wizard-preview",children:c&&n.jsxs(n.Fragment,{children:[n.jsx("img",{className:"wizard-preview-img",alt:"chartbook-cover-preview",src:`${c.cover_image_url}?time=${Date.now()}`}),n.jsx("img",{className:"wizard-preview-img",alt:"chartbook-chart-preview",src:c.charts[0]?`${c.charts[0].chart_image_png_url}?time=${Date.now()}`:""})]})}),n.jsxs("div",{className:"wizard-footer",children:[n.jsxs("div",{className:"wizard-links-container",children:[n.jsxs("div",{className:"temp-password-container",children:["Temporary Password:",n.jsx("input",{name:"temp-password",type:"text",readOnly:!0,id:"temp-password",value:g}),n.jsx("i",{className:"material-icons",onClick:()=>{bj("temp-password"),o({alertMessage:"Password has been copied to clipboard"})},children:"file_copy"})]}),n.jsxs("a",{target:"_blank",rel:"noopener noreferrer",href:"https://app.hubspot.com/contacts/",children:["Open Hubspot",n.jsx("i",{className:"material-icons",children:"open_in_new"})]})]}),n.jsxs("div",{className:"form-group",children:[n.jsx("button",{type:"button",className:"btn-cancel",onClick:()=>{f().then(()=>{l.push(`/admin/users/${m.id}`),d(!1)})},children:"EDIT"}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>{f().then(()=>{l.push("/admin/users/new"),d(!1)})},children:"APPROVE"})]})]})]})]})},age=e=>({}),sge=le(age,{newChartbook:Ga,saveChartSelection:s0,getChartbooks:rc,deleteChartbook:wM,getChartbook:Kf,createMessage:he})(ige);function oge({setModal:e,isAuthenticated:t,user:r,reAuthLogin:i,timeLeft:a,createMessage:s,setSnackBar:o}){const l=c=>{c.preventDefault(),e(!1),o(!0)};return t?n.jsx(ot,{setModal:e,children:n.jsxs("div",{className:"reauth-modal-container",children:[n.jsx("h5",{children:"Confirm your password"}),n.jsxs("div",{children:["Your session will automatically expire in ",a,". Please confirm your password to continue working."]}),n.jsx(gt,{initialValues:{password:""},onSubmit:(c,{setSubmitting:h,resetForm:u,setFieldError:d})=>{i(r.id,c.password).then(p=>{p&&(p.status===200?s({alertMessage:"Password successfully confirmed"}):p.status===400&&d("password",p.data.detail?p.data.detail==="No active account found with the given credentials"?"Incorrect password. Please try again.":p.data.detail:"")),h(!1)})},validationSchema:_t().shape({password:Ae().required("Please enter your password")}),children:c=>{const{touched:h,errors:u,dirty:d,isSubmitting:p,handleSubmit:f,setFieldValue:m,values:g}=c;return n.jsxs(vt,{onClick:x=>x.stopPropagation(),children:[n.jsxs("div",{className:"input-field",children:[n.jsx("label",{children:"Password"}),n.jsx(me,{id:"password",name:"password",type:"password",maxLength:"100",className:u.password&&h.password?"text-input error":""}),u.password&&h.password&&n.jsx("div",{className:"input-feedback",children:u.password})]}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel",onClick:l,children:"Hide"}),n.jsx("button",{type:"submit",className:"btn-primary",onClick:f,disabled:!d||!!Object.keys(u).length||p,children:"Continue"})]})]})}})]})}):n.jsx(n.Fragment,{})}const lge=e=>({user:e.auth.user,isAuthenticated:e.auth.isAuthenticated}),cge=le(lge,{reAuthLogin:V3,createMessage:he})(oge);function dge({openModal:e,timeLeft:t}){return n.jsxs("div",{className:"reauth-snackbar",children:[n.jsxs("div",{children:["Your session will automatically expire in ",t,". Enter your password to continue working."]}),n.jsx("button",{className:"btn-primary",onClick:e,children:"Enter Password"})]})}function uge({refreshToken:e,isAuthenticated:t}){const r=e&&xS(e).exp,[i,a]=y.useState(!1),[s,o]=y.useState(null),[l,c]=y.useState(!1),h=()=>r-~~(Date.now()/1e3),u=m=>{const g=~~(m/60),x=m%60;return`${g}:${x<10?`0${x}`:x}`},d=()=>{const m=h();m<0?setTimeout(()=>window.location.reload(),3e3):o(m)};y.useEffect(()=>{const m=e&&xS(e).exp;o(m-~~(Date.now()/1e3)),d();const g=setInterval(d,1e3);return()=>clearInterval(g)},[e]);const p=n.jsx(cge,{setSnackBar:c,setModal:a,timeLeft:u(s)}),f=n.jsx(dge,{openModal:()=>a(!0),timeLeft:u(s)});if(t&&s!==null)return s<300&&!l||i?p:l?f:n.jsx(n.Fragment,{})}const hge=e=>({isAuthenticated:e.auth.isAuthenticated,refreshToken:e.auth.refreshToken}),pge=le(hge,{})(uge);
33function fge(){return n.jsx(xA,{isDisplay:!0})}var Mc={},DT;function mge(){if(DT)return Mc;DT=1;var e=vn(),t=bn();Object.defineProperty(Mc,"__esModule",{value:!0}),Mc.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}),"Collections");return Mc.default=a,Mc}var gge=mge();const vge=Zt(gge);var $c={},RT;function bge(){if(RT)return $c;RT=1;var e=vn(),t=bn();Object.defineProperty($c,"__esModule",{value:!0}),$c.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Create");return $c.default=a,$c}var yge=bge();const xge=Zt(yge),jge={600:"width-12",1280:"width-6",1600:"width-4",1e4:"width-3"},Ls={600:"width-12",992:"width-6",1e4:"width-4"},wge={1024:"width-12",1e4:"width-6"},Qf=e=>({type:z3,payload:e});class Sge extends y.Component{constructor(){super(...arguments),this.handleChange=(t,r)=>{const{choices:i,handleChoice:a,user:s,partnerInsightKey:o,logEvent:l,viewPath:c,isPartnerInsight:h,isCommunity:u}=this.props;i[r].path!==this.props.value&&(a(i[r].path),h&&c!=="preview"&&l(s.id,o,`${u?`communitytoolkit${i[r].path}`:`partner${i[r].path==="commentary"?"clientpiece":i[r].path}`}`,"open-tab")),i[r].id==="cb-viewer"&&this.props.selectSlide(0)}}render(){const{classes:t,value:r,choices:i}=this.props,a=i.findIndex(s=>s.path===r)===-1?0:i.findIndex(s=>s.path===r);return n.jsx(n.Fragment,{children:n.jsx(zf,{classes:{indicator:t.indicator},value:a,onChange:this.handleChange,color:"primary",className:"MuiTabs",variant:"scrollable",scrollButtons:"auto",style:{marginTop:"10px",borderRadius:"2px"},children:i.map(s=>{const{showTab:o,icon:l,path:c,label:h,customTab:u,isCustomTab:d,diagId:p,id:f}=s;return(o===void 0||o)&&n.jsx(os,{icon:l,label:h,"diagnostic-id":p,component:d?u:"button",id:f},c)})})})}}const _ge=Ye(Rw)(Sge),Cge=e=>({user:e.auth.user}),Zf=le(Cge,{selectSlide:Qf,logEvent:_r})(_ge),Nge=e=>{const{progress:t,isAssistant:r}=e;return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"loading-bar",children:[n.jsx("div",{className:"progress-bar",children:n.jsx("div",{className:"progress-bar-fill",style:{width:`${t}%`}})}),n.jsxs("div",{className:"progress-breaks",children:[n.jsx("div",{}),n.jsx("div",{})]})]}),n.jsxs("div",{className:`labels${Math.floor(t)<100/3?" first":Math.floor(t)<100/1.5?" second":" third"}`,children:[n.jsx("span",{className:"analyzing-label",children:r?"Analyzing Request":"Analyzing"}),n.jsx("span",{className:"rewriting-label",children:r?"Selecting Charts":"Rewriting"}),n.jsx("span",{className:"proofreading-label",children:r?"Finalizing Recommendation":"Proofreading"})]})]})},Ege=e=>({}),o0=le(Ege,{})(Nge),Tge=e=>{const{message:t}=e,r=p=>{const f=p.items[0];return n.jsxs(n.Fragment,{children:[n.jsx("span",{children:p.message}),n.jsxs("div",{className:"mira-insights-message",children:[n.jsx("img",{src:f.chart_image_url,alt:""}),f.audio_url&&n.jsx("audio",{controls:!0,controlsList:"nodownload",src:f.audio_url}),n.jsx("p",{children:f.talking_points}),n.jsxs("div",{className:"btn-group",children:[n.jsx("a",{onClick:()=>{e.newChartbook([f.chart_info_id],e.user.id,f.name,"Created using the conversational assistant").then(m=>{e.history.push(`/chartbooks/${m}`),e.setShowMira(!1)})},children:"Create a chartbook"}),n.jsx("a",{href:f.chart_image_url,target:"_blank",rel:"noreferrer",children:"Download Chart"})]})]})]})},i=p=>{const f=p.items[0];return n.jsxs(n.Fragment,{children:[n.jsx("span",{children:p.message}),n.jsxs("div",{className:"mira-chartbook-message",children:[n.jsx("img",{src:f.cover_image_jpg_url,alt:""}),n.jsxs("div",{className:"btn-group",children:[n.jsx("a",{href:f.pdf_url,target:"_blank",rel:"noopener noreferrer",children:"Open PDF"}),n.jsx(Ze,{to:"/chartbooks/"+f.id+"/",onClick:()=>e.setShowMira(!1),children:"Open Chartbook"})]})]})]})},a=p=>{const f=p.items;return n.jsxs(n.Fragment,{children:[n.jsx("span",{children:p.message}),n.jsx("div",{className:"mira-all-chartbooks-message",children:f.map(m=>n.jsxs("div",{className:"mira-chartbook-message",children:[n.jsx("img",{src:m.cover_image_jpg_url,alt:""}),n.jsxs("div",{className:"btn-group",children:[n.jsx("a",{href:m.pdf_url,target:"_blank",rel:"noreferrer",children:"Open PDF"}),n.jsx(Ze,{to:"/chartbooks/"+m.id+"/",onClick:()=>e.setShowMira(!1),children:"Open Chartbook"})]})]},m.id))})]})},s=p=>{const f=p.items;return n.jsxs(n.Fragment,{children:[n.jsx("span",{children:p.message}),n.jsxs("div",{className:"mira-all-featured-message",children:[f.map(m=>n.jsxs("div",{className:"mira-featured-message",children:[n.jsx("img",{src:m.charts[0].chart_image_jpg_url,alt:""}),n.jsx("h5",{children:m.title}),n.jsx("p",{children:m.description}),n.jsx("div",{className:"btn-group",children:n.jsx("a",{onClick:()=>
33{e.newChartbookFromFeatured(e.user.id,m.id).then(g=>{e.history.push(`/chartbooks/${g}`),e.setShowMira(!1)})},children:"Create this chartbook"})})]},m.id)),n.jsx("div",{className:"btn-group",children:n.jsx(Ze,{to:"/featured",onClick:()=>e.setShowMira(!1),children:"Browse All Featured Chartbooks"})})]})]})},o=p=>n.jsxs(n.Fragment,{children:[n.jsx("span",{children:p.message}),n.jsxs("div",{className:"btn-group",children:[n.jsx("a",{onClick:()=>{window.Intercom("show"),e.setShowMira(!1)},children:"Chat with a Person"}),n.jsx("a",{onClick:()=>{window.location.href="mailto:[email protected]",e.setShowMira(!1)},children:"Email a Person"})]})]}),l=p=>n.jsxs(n.Fragment,{children:[n.jsx("span",{children:p.message}),n.jsxs("div",{className:"btn-group",children:[n.jsx(Ze,{to:"/account/",onClick:()=>e.setShowMira(!1),children:"Open Account Page"}),n.jsx("a",{onClick:()=>{window.Intercom("show"),e.setShowMira(!1)},children:"Chat with a Person"}),n.jsx("a",{onClick:()=>{window.location.href="mailto:[email protected]",e.setShowMira(!1)},children:"Email a Person"})]})]}),c=p=>n.jsx("span",{children:p.message}),h=p=>{switch(p.message_type){case as.Insight:return r(p);case as.Chartbook:return i(p);case as.Featured:return s(p);case as.AllChartbooks:return a(p);case as.Fallback:case as.GetHelp:return o(p);case as.Account:return l(p);default:return c(p)}},u=()=>n.jsxs("div",{className:"mira-chat-message",children:[n.jsx("div",{className:"mira-chat-d
33ot-system",children:n.jsx("img",{src:Tn.miraIconUrl,alt:""})}),n.jsx("div",{className:"mira-chat-message-system",children:h(t)})]}),d=()=>n.jsxs("div",{className:"mira-chat-message row-reverse",children:[n.jsx("div",{className:"mira-chat-dot-user",children:n.jsx("div",{className:"mira-chat-dot-user-initial",children:e.user.first_name.charAt(0)})}),n.jsx("div",{className:"mira-chat-message-user",children:n.jsx("span",{children:t.message})})]});return n.jsx(n.Fragment,{children:e.message.author_type===vd.User?d():u()})},kge=e=>({user:e.auth.user}),Pge={setShowMira:Vf,newChartbook:Ga,newChartbookFromFeatured:SM},Ige=le(kge,Pge),Dge=Jt(Ige(Tge)),Rge=e=>n.jsxs("div",{className:"mira-chat-messages",children:[e.messages.map((t,r)=>n.jsx(Dge,{message:t},r)),n.jsx("div",{ref:e.chatEndRef})]}),OT=e=>{const t=y.useRef(null);return y.useEffect(()=>{t.current?.focus()},[]),n.jsx(gt,{initialValues:{message:""},onSubmit:(r,{setSubmitting:i,resetForm:a,setFieldError:s})=>{e.handleSubmit(r.message),a()},validationSchema:_t().shape({message:Ae().required("Please enter a message")}),children:r=>{const{errors:i,dirty:a,isSubmitting:s,handleSubmit:o}=r;return n.jsx(vt,{children:n.jsxs("div",{className:e.showWelcome?"mira-chat-input mira-welcome":"mira-chat-input",children:[n.jsx(me,{name:"message",placeholder:"E.g. Show me insights on inflation",innerRef:t}),n.jsx("div",{className:"mira-chat-input-btn",children:n.jsx("button",{type:"submit",onClick:o,disabled:!a||!!Object.keys(i).length||s||e.disableInput,children:n.jsx(dt,{icon:H3})})})]})})}})},Oge=e=>n.jsx(ot,{setModal:e.setShowMira,disablePreventDefault:!0,children:n.jsxs("div",{className:"mira-chat-window",children:[n.jsx("i",{className:"material-icons",onClick:()=>e.setShowMira(!1),children:"close"}),n.jsx("div",{className:"mira-chat-edge-top"}),e.showWelcome?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"mira-welcome-container",children:[ef,n.jsxs("div",{className:"mira-welcome-message",children:[n.jsxs("span",{children:["Welcome back, ",e.user.first_name]}),n.jsx("span",{children:"How can I help you today?"})]})]}),n.jsx(OT,{showWelcome:e.showWelcome,handleSubmit:e.handleSubmit,disableInput:e.disableInput}),n.jsx("div",{className:"mira-beta-message",children:n.jsx("p",{children:"This digital assistant is in the beta testing stage. It is a natural language interface that is intended to help you find charts, insights and chartbooks quickly and easily. We kindly ask for your patience and feedback as it learns and improves."})})]}):n.jsxs(n.Fragment,{children:[n.jsx(Rge,{messages:e.messages,chatEndRef:e.chatEndRef}),n.jsx(OT,{handleSubmit:e.handleSubmit,disableInput:e.disableInput})]}),n.jsx("div",{className:"mira-chat-edge-bottom"})]})}),ef=n.jsxs("svg",{id:"mira-avatar",width:"148",height:"148",viewBox:"0 0 148 148",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("path",{className:"mira-avatar-halo-darkblue",fillRule:"evenodd",clipRule:"evenodd",d:"M70.0336 131.931C51.3121 132.82 32.4776 125.064 21.238 109.916C10.344 95.2327 10.1611 75.6016 15.1495 57.9584C19.7823 41.5727 31.1861 28.4078 46.3785 20.9971C61.5937 13.5753 78.7596 13.1045 94.5271 19.2387C112.311 26.1576 131.147 36.7786 135.257 55.5749C139.347 74.2815 129.89 104.495 117.5 119C105.902 132.578 87.7689 131.089 70.0336 131.931Z",fill:"url(#paint0_radial)",fillOpacity:"0.5"}),n.jsx("path",{className:"mira-avatar-halo-lightblue",fillRule:"evenodd",clipRule:"evenodd",d:"M74.9807 10.0029C94.3145 9.77958 110.921 22.3399 123.053 37.8976C135.277 53.5726 140.887 73.4975 135.518 92.8489C130.378 111.375 115.559 121.711 98.5 129.5C82.4193 136.842 64.9773 140.693 48.5362 134.259C30.2943 127.12 15.2125 109.186 11.0179 89.5C6.85294 69.9536 16.0373 54.538 28.2371 38.9929C40.2796 23.6482 55.8632 10.2238 74.9807 10.0029Z",fill:"url(#paint1_radial)",fillOpacity:"0.5"}),n.jsx("path",{className:"mira-avatar-halo-mediumblue",fillRule:"evenodd",clipRule:"evenodd",d:"M68.3334 12.1018C87.7238 10.893 106.113 20.5513 118.528 35.4096C131.271 50.6596 138.378 70.7756 133.401 89.9743C128.563 108.641 111.727 120.372 94.311 128.841C76.721 137.394 58.8449 140.035 41.5 131C24.5715 122.182 17.3859 106.191 14.7088 87.3775C12.3675 70.9231 15.7954 54.773 25.4562 41.2118C35.9803 26.4385 50.1608 13.2347 68.3334 12.1018Z",fill:"url(#paint2_radial)",fillOpacity:"0.5"}),n.jsx("path",{className:"mira-avatar-bg-black",fillRule:"evenodd",clipRule:"evenodd",d:"M75.0207 29.0007C94.8038 29.0985 113.482 39.9841 119.731 58.8266C126.112 78.0686 118.645 99.1829 102.205 110.97C86.1661 122.469 64.7698 121.233 48.7371 109.725C32.2944 97.923 24.7202 78.1138 31 58.8267C37.2504 39.63 54.9023 28.9013 75.0207 29.0007Z",fill:"url(#paint3_radial)"}),n.jsx("path",{className:"mira-avatar-logo-cbottom",d:"M97.0537 84.2951C96.7818 84.2992 96.5177 84.3862 96.2965 84.5443C96.0753 84.7024 95.9076 84.9242 95.8158 85.1801V85.1801L95.6734 85.372C91.0375 91.6296 83.8887 95.3804 76.5666 95.4113H76.4428C69.5106 95.4113 63.4449 92.0628 60.084 86.4057C57.9054 88.2625 55.64 90.175 53.3809 92.1185C55.6476 94.8983 58.5136 97.1295 61.7645 98.6451C65.0154 100.161 68.567 100.921 72.1535 100.87C81.9452 100.87 91.6688 95.337 97.2393 86.7089C97.4312 86.4118 97.6293 86.1209 97.8088 85.8177L98.1801 85.1987C98.1269 84.9405 97.9852 84.709 97.7796 84.5441C97.574 84.3791 97.3172 84.2911 97.0537 84.2951V84.2951Z",fill:"white"}
33),n.jsx("path",{className:"mira-avatar-logo-ctop",d:"M99.5975 66.321V66.0734C99.4729 63.8548 98.9574 61.6757 98.0749 59.6364V59.6364C97.3399 57.873 96.3854 56.2093 95.2339 54.6848C93.0986 51.9738 87.3362 46.5147 76.1333 47.0347C61.588 48.0002 49.0853 60.4782 48.1445 75.0729C47.8897 78.7474 48.4476 82.4329 49.7786 85.8673C52.4462 83.3544 55.0396 80.9157 57.4844 78.6813C57.3332 77.4184 57.298 76.1442 57.3792 74.8748C57.6606 71.5999 58.6051 68.4164 60.1554 65.518C61.7058 62.6195 63.8294 60.0667 66.3972 58.0148C66.3972 58.0148 66.5891 57.8353 67.0162 57.4887C70.3892 54.8306 74.2716 52.8926 78.4234 51.7944C81.3946 51.1221 84.4962 51.3154 87.3609 52.3514C87.7075 52.4876 88.0541 52.6361 88.4008 52.8156L88.4936 52.8651C91.3593 54.2949 94.4169 56.9749 96.2242 61.9512C96.3472 62.4043 96.4939 62.8505 96.6637 63.2882L96.7379 63.5234C96.9767 64.2683 97.1507 65.0324 97.2579 65.8073C97.2579 65.9063 97.295 65.993 97.3136 66.0858C97.3033 66.2322 97.3235 66.3792 97.3728 66.5175C97.422 66.6558 97.4994 66.7824 97.6 66.8893C97.7005 66.9963 97.8221 67.0813 97.9571 67.139C98.0921 67.1967 98.2375 67.2259 98.3843 67.2247C98.4804 67.2239 98.576 67.2114 98.6691 67.1875C98.894 67.1557 99.1037 67.0555 99.2697 66.9005C99.4358 66.7455 99.5502 66.5432 99.5975 66.321Z",fill:"white"}),n.jsx("path",{className:"mira-avatar-logo-swoosh",d:"M83.5417 83.0816C82.3596 80.7172 84.3649 73.8593 85.4667 70.0837L85.6647 69.4214C86.2094 67.5646 86.9398 64.1851 85.7019 62.5016C85.4515 62.1668 85.122 61.8993 84.7428 61.7232C84.3637 61.5471 83.9467 61.4679 83.5294 61.4927C81.0536 61.4927 76.9623 63.8942 71.3609 68.6168C57.9979 79.9064 46.0584 92.4833 45.8789 93.3622C45.7984 93.746 45.26 96.556 45.26 96.556L45 98.1343L46.0708 96.8964C50.9666 91.2764 65.1591 80.0735 72.1903 74.5339C73.5581 73.457 74.2761 73.2341 74.6661 73.2341C74.7511 73.2285 74.8363 73.243 74.9148 73.2763C74.9933 73.3096 75.0628 73.3609 75.1179 73.426C75.8606 74.2616 75.514 77.3377 75.1488 80.5934C74.926 82.5678 74.6722 84.8022 74.6289 86.8757C74.5361 90.7565 76.8509 91.5673 78.8068 91.5673C82.2915 91.5673 87.0697 88.9987 89.2856 87.3647C92.3936 84.9199 95.0176 81.916 97.0224 78.5075C84.7363 87.2037 83.5417 83.0816 83.5417 83.0816Z",fill:"#2093C1"}),n.jsxs("defs",{children:[n.jsxs("radialGradient",{id:"paint0_radial",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(74 73.5) rotate(-90) scale(58.5 62)",children:[n.jsx("stop",{stopColor:"#068CED",stopOpacity:"0"}),n.jsx("stop",{offset:"0.869792",stopColor:"#068CED"}),n.jsx("stop",{offset:"1",stopColor:"#005999"})]}),n.jsxs("radialGradient",{id:"paint1_radial",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(75.0178 73.5) rotate(90) scale(63.5 66)",children:[n.jsx("stop",{stopColor:"#8CFFF8",stopOpacity:"0"}),n.jsx("stop",{offset:"0.875",stopColor:"#8CFFF8"}),n.jsx("stop",{offset:"1",stopColor:"#5EEDE4"})]}),n.jsxs("radialGradient",{id:"paint2_radial",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(74.5 76) rotate(90) scale(64 60.5)",children:[n.jsx("stop",{stopColor:"#54C2FF",stopOpacity:"0"}),n.jsx("stop",{offset:"0.921875",stopColor:"#54C2FF"}),n.jsx("stop",{offset:"1",stopColor:"#0096E9"})]}),n.jsxs("radialGradient",{id:"paint3_radial",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(74.5 74) rotate(90) scale(45 47.5)",children:[n.jsx("stop",{offset:"0.864583",stopColor:"#212121"}),n.jsx("stop",{offset:"1",stopOpacity:"0"})]})]})]});function Age(e){const{values:t}=e,[r,i]=y.useState(!1),a=y.useRef(null);y.useEffect(()=>{a.current?.focus()},[]),y.useEffect(()=>{const o=l=>$n(l,r,i);return window.addEventListener("keyup",o),()=>{window.removeEventListener("keyup",o)}},[r]),y.useEffect(()=>{t.request&&!e.isDirty?e.setDirty(!0):!t.request&&e.isDirty&&e.setDirty(!1)},[t.request]);const s=n.jsx(ot,{setModal:i,children:n.jsxs("div",{className:"info-modal-container","data-diagnostic-id":"describe-assistant-info-modal-container",children:[n.jsx("div",{className:"info-modal-header-icon",children:n.jsx("i",{className:"material-symbols-outlined",children:"help_outline"})}),n.jsx("h5",{className:"how-to-header",children:"Describe what you are looking for"}),n.jsx("p",{children:"Please provide a brief overview of the financial topic you would like to address."}),n.jsx("p",{children:"Examples"}),n.jsxs("ul",{children:[n.jsx("li",{children:"I would like to provide a quarterly market update to my clients"}),n.jsx("li",{children:"Three charts on staying invested in volatile markets"}),n.jsx("li",{children:"Please suggest charts on: inflation, jobs, the Fed, stocks and asset allocation"})]}),n.jsx("p",{children:"Your input will help generate relevant content to effectively communicate your financial insights."}),n.jsx("div",{className:"buttons",children:n.jsx("button",{type:"button",className:"btn-cancel","data-diagnostic-id":"modal-cancel-btn",onClick:()=>{i(!1)},children:"CLOSE"})})]})});return n.jsxs("div",{className:"recommend-request-form",children:[n.jsxs("div",{className:"recommend-request-section",children:[n.jsx("h4",{className:"recommend-request-header",children:"Describe the topics you would like to discu
33ss with your clients"}),n.jsxs("button",{type:"button","data-diagnostic-id":"instructions-btn",className:"btn-primary-text btn-icon-text instructions-btn",onClick:()=>i(!0),children:[n.jsx("i",{className:"material-icons help-icon","data-diagnostic-id":"help-icon",children:"help_outline"}),"Instructions"]}),n.jsx(me,{component:"textarea",id:"request","data-diagnostic-id":"request-input",placeholder:"Please enter your description here",name:"request",innerRef:a,maxLength:1e3}),n.jsxs("div",{className:"character-count",children:[1e3-e.values?.request?.length," characters left"]}),e.errors.request&&n.jsx("div",{className:"input-feedback","data-diagnostic-id":"input-feedback",children:e.errors.request})]}),r&&s]})}const Mge=e=>({}),$ge=le(Mge,{})(Age);function Lge(e){const{featuredChart:t,user:r,newChartbook:i,chartModal:a,setChartModal:s,isChartLibrary:o,notes:l,setModalStatus:c,isRecommendedChart:h,isCommunity:u}=e,[d,p]=y.useState(Ys()),[f,m]=y.useState(!1),[g,x]=y.useState(0);if(y.useEffect(()=>{if(a){c(!0),document.body.style.position="fixed",document.body.style.top=`-${d}px`,document.body.style.width="100%";const C=document.querySelector(".nav-wrapper");C.style.paddingLeft="10px",C.style.paddingRight="10px"}},[]),!t)return null;let v=l&&l.filter(C=>C.chart_info===t.chart_info.id)[0];v||(v={note1:null,note2:null,note3:null});const{note1:b,note2:j,note3:w}=v;y.useEffect(()=>{const C=E=>$n(E,a,s,c);return window.addEventListener("keyup",C),()=>{window.removeEventListener("keyup",C)}},[a]);const S=C=>{C.preventDefault();const E=t.chart_info.id;i([E],r.id).then(P=>{c(!1),m(!0),x(P)})};if(f){const C=`chartbooks/${g}`,E=document.body.style.top;document.body.style.position="",document.body.style.top="",document.body.style.width="";const P=document.querySelector(".nav-wrapper");return P.style.paddingRight="",P.style.paddingLeft="",window.scrollTo(0,parseInt(E||"0")*-1),n.jsx(jn,{children:n.jsx(qt,{from:"/insights",to:C})})}const _=t.chart_info?.chart_methodology;return n.jsx(ot,{setModal:e.setChartModal,children:n.jsxs("div",{className:`featured-chartbook-modal-container${t?.aspect_ratio==="16:9"?" size-aspect-16-9":""}`,children:[n.jsxs("div",{className:"chart-image-content-container",children:[n.jsxs("div",{className:`chart-image-container${t?.aspect_ratio==="16:9"?" size-aspect-16-9":""}`,children:[n.jsx("div",{id:"modal-close-btn",children:n.jsx("i",{className:"material-icons",onClick:()=>{e.setChartModal(!1),c(!1)},children:"close"})}),n.jsx("img",{src:t.chart_image_jpg_url,className:"chartbook-modal-image",alt:""})]}),n.jsxs("div",{id:"m-body-container",children:[!h&&n.jsxs("div",{id:"featured-chartbook-download",children:[n.jsx("a",{onClick:C=>Dp(C,t?.chart_image_jpg_url),download:!0,href:t.chart_image_jpg_url,target:"_blank",rel:"noopener noreferrer","diagnostic-id":"chart-download-btn",children:n.jsx("button",{className:"btn-primary-icon download-btn-icon",children:n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"slide-download material-icons",children:"cloud_download"}),"Download Chart"]})})}),!o&&!u&&n.jsx("button",{className:"btn-primary-icon",onClick:S,"diagnostic-id":"create-chartbook-btn",children:n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"material-icons",children:"edit"}),"Create Chartbook"]})})]}),n.jsxs("div",{className:"chart-info-container",children:[n.jsxs("div",{className:"chart-modal-notes",children:[n.jsxs("h5",{children:[n.jsx("i",{className:"material-icons-outlined",children:"speaker_notes"}),"Talking Points"]}),n.jsxs("ul",{className:"note-list",children:[t?.notes?.note1?n.jsx("li",{"diagnostic-id":"chart-notes-1",children:t.notes.note1}):b?n.jsx("li",{"diagnostic-id":"chart-notes-1",children:b}):n.jsx(n.Fragment,{}),t?.notes?.note2?n.jsx("li",{"diagnostic-id":"chart-notes-2",children:t.notes.note2}):j?n.jsx("li",{"diagnostic-id":"chart-notes-2",children:j}):n.jsx(n.Fragment,{}),t?.notes?.note3?n.jsx("li",{"diagnostic-id":"chart-notes-3",children:t.notes.note3}):w?n.jsx("li",{"diagnostic-id":"chart-notes-3",children:w}):n.jsx(n.Fragment,{})]})]}),n.jsxs("div",{className:"chart-methodology",children:[n.jsxs("h5",{children:[n.jsx("i",{className:"material-icons",children:"insights"}),"Methodology"]}),n.jsx("div",{className:"methodology-text",children:_?.methodology_text}),_?.date_range_text&&n.jsx("div",{className:"methodology-date-range-text",children:n.jsxs("em",{children:["Date Range: ",_?.date_range_text]})}),_?.sources_text&&n.jsx("div",{className:"methodology-sources-text",children:n.jsxs("em",{children:["Source: ",_?.sources_text]})})]})]})]})]}),n.jsxs("div",{className:`content-container${t?.aspect_ratio==="16:9"?" size-aspect-16-9":""}`,children:[n.jsxs("div",{className:"content-title-container",children:[n.jsx("i",{id:"modal-close-btn",className:"material-icons",onClick:()=>{e.setChartModal(!1),c(!1)},children:"close"}),n.jsx("div",{id:"info-container",children:n.jsx("div",{id:"title",children:t.chart_info.name})}),!h&&n.jsxs("div",{id:"featured-chartbook-download",children:[n.jsx("a",{onClick:C=>Dp(C,t.chart_image_jpg_url),download:!0,href:t.chart_image_jpg_url,target:"_blank",rel:"noopener noreferrer","diagnostic-id":"chart-download-btn",children:n.jsx("button",{className:"btn-primary-icon download-btn-icon",children:n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"slide-download material-icons",children:"cloud_download"}),"Download Chart"]})})}),!o&&!u&&n.jsx("button",{className:"btn-primary-icon",onClick:S,"diagnostic-id":"create-chartbook-btn",children:n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"material-icons",children:"edit"}),"Create Chartbook"]})})]})]}),n.jsx("div",{id:"body-container",children:n.jsxs("div",{className:"chart-info-container",children:[n.jsxs("div",{className:"chart-modal-notes",children:[n.jsxs("h5",{children:[n.jsx("i",{className:"material-icons-outlined",children:"speaker_notes"}),"Talking Points"]}),n.jsxs("ul",{className:"note-list",children:[t?.notes?.note1?n.jsx("li",{"diagnostic-id":"chart-notes-1",children:t.notes.note1}):b?n.jsx("li",{"diagnostic-id":"chart-notes-1",children:b}):n.jsx(n.Fragment,{}),t?.notes?.note2?n.jsx("li",{"diagnostic-id":"chart-notes-2",children:t.notes.note2}):j?n.jsx("li",{"diagnostic-id":"chart-notes-2",children:j}):n.jsx(n.Fragment,{}),t?.notes?.note3?n.jsx("li",{"diagnostic-id":"chart-notes-3",children:t.notes.note3}):w?n.jsx("li",{"diagnostic-id":"chart-notes-3",children:w}):n.jsx(n.Fragment,{})]})]}),n.jsxs("div",{className:"chart-methodology",children:[n.jsxs("h5",{children:[n.jsx("i",{className:"material-icons",children:"insights"}),"Methodology"]}),n.jsx("div",{className:"methodology-text",children:_?.methodology_text}),_?.date_range_text&&n.jsx("div",{className:"methodology-date-range-text",children:n.jsxs("em",{children:["Date Range: ",_?.date_range_text]})}),_?.sources_text&&n.jsx("div",{className:"methodology-sources-text",children:n.jsxs("em",{children:["Source: ",_?.sources_text]})})]})]})})]})]})})}const Fge=e=>({user:e.auth.user}),Jo=le(Fge,{newChartbook:Ga,setModalStatus:Ii})(Lge);function Uge(e){const{noFade:t,style:r,chart:i,index:a,notes:s,numCharts:o}=e,[l,c]=y.useState(!1),h=e.selectedIds?.includes(i.chart_info.id),u=()=>{let d;h?d=e.selectedIds.filter(p=>p!==i.chart_info.id):d=e.selectedIds.concat(i.chart_info.id),e.setSelectedIds(d)};return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`col${t?"":" fadeTransition"}`,style:r,children:n.jsxs("div",{className:`recommended-chart-card${h?" selected":""}`,"data-diagnostic-id":"recommended-chart-card",children:[n.jsxs("span",{className:"chart-card-title-container",children:[n.jsx("div",{className:"chart-list-title",children:o===1?i.chart_info.name:n.jsxs(n.Fragment,{children:[a+1,". ",i.chart_info.name]})}),n.jsx(Ke,{title:"Check this box to include this chart",placement:"top",children:n.jsxs("label",{className:"include-chart-option-grp",htmlFor:`include-chart-${i.chart_info.id}`,children:[n.jsx("input",{type:"checkbox",name:"include-chart",id:`include-chart-${i.chart_info.id}`,className:"filled-in",onChange:u,checked:h}),n.jsx("span",{className:"include-chart-checkbox","data-diagnostic-id":"include-chart-checkbox"})]})})]}),n.jsx("div",{className:"chart-list-topic",children:i.topic.name}),n.jsxs("div",{className:`card-image-container${i.aspect_ratio==="16:9"?" size-aspect-16-9":""}${h?" selected":""}`,children:[n.jsx("div",{className:"chart-card-placeholder",children:n.jsx("i",{className:"material-icons",children:"description"})}),n.jsx("div",{className:"chart-card-preview-btn","data-diagnostic-id":"chart-card-preview-btn",children:n.jsx("i",{className:"material-icons",children:"zoom_in"})}),n.jsx("div",{className:"card-image",onClick:()=>c(!0),children:i.chart_image_jpg_url?n.jsx("img",{alt:"",src:i.chart_image_jpg_url}):n.jsx("div",{className:"chart-image-placeholder"})})]})]})}),l&&n.jsx(Jo,{featuredChart:i,setChartModal:c,chartModal:l,isRecommendedChart:!0,notes:s})]})}const Bge=e=>({}),qge=le(Bge,{})(Uge);function xi(){return xi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},xi.apply(this,arguments)}function Vge(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var EM={preventDefaultTouchmoveEvent:!1,delta:10,rotationAngle:0,trackMouse:!1,trackTouch:!0},tf={xy:[0,0],swiping:!1,eventData:void 0,start:void 0},zge="Left",Hge="Right",Gge="Up",Wge="Down",Yge="touchstart",Kge="touchmove",Xge="touchend",AT="mousemove",MT="mouseup";
33function Qge(e,t,r,i){return e>t?r>0?zge:Hge:i>0?Gge:Wge}function $T(e,t){if(t===0)return e;var r=Math.PI/180*t,i=e[0]*Math.cos(r)+e[1]*Math.sin(r),a=e[1]*Math.cos(r)-e[0]*Math.sin(r);return[i,a]}function TM(e,t){var r=function(d){d.touches&&d.touches.length>1||e(function(p,f){f.trackMouse&&(document.addEventListener(AT,i),document.addEventListener(MT,o));var m=d.touches?d.touches[0]:d,g=m.clientX,x=m.clientY,v=$T([g,x],f.rotationAngle);return xi({},p,tf,{eventData:{initial:[].concat(v),first:!0},xy:v,start:d.timeStamp||0})})},i=function(d){e(function(p,f){if(!p.xy[0]||!p.xy[1]||d.touches&&d.touches.length>1)return p;var m=d.touches?d.touches[0]:d,g=m.clientX,x=m.clientY,v=$T([g,x],f.rotationAngle),b=v[0],j=v[1],w=p.xy[0]-b,S=p.xy[1]-j,_=Math.abs(w),C=Math.abs(S),E=(d.timeStamp||0)-p.start,P=Math.sqrt(_*_+C*C)/(E||1);if(_<f.delta&&C<f.delta&&!p.swiping)return p;var T=Qge(_,C,w,S),N=xi({},p.eventData,{event:d,absX:_,absY:C,deltaX:w,deltaY:S,velocity:P,dir:T});f.onSwiping&&f.onSwiping(N);var k=!1;return(f.onSwiping||f.onSwiped||f["onSwiped"+T])&&(k=!0),k&&f.preventDefaultTouchmoveEvent&&f.trackTouch&&d.cancelable&&d.preventDefault(),xi({},p,{eventData:xi({},N,{first:!1}),swiping:!0})})},a=function(d){e(function(p,f){var m;return p.swiping&&(m=xi({},p.eventData,{event:d}),f.onSwiped&&f.onSwiped(m),f["onSwiped"+m.dir]&&f["onSwiped"+m.dir](m)),xi({},p,tf,{eventData:m})})},s=function(){document.removeEventListener(AT,i),document.removeEventListener(MT,o)},o=function(d){s(),a(d)},l=function(d){if(d&&d.addEventListener){var p=[[Yge,r],[Kge,i],[Xge,a]];return p.forEach(function(f){var m=f[0],g=f[1];return d.addEventListener(m,g)}),function(){return p.forEach(function(f){var m=f[0],g=f[1];return d.removeEventListener(m,g)})}}},c=function(d){d!==null&&e(function(p,f){if(p.el===d)return p;var m={};return p.el&&p.el!==d&&p.cleanUpTouch&&(p.cleanUpTouch(),m.cleanUpTouch=null),f.trackTouch&&d&&(m.cleanUpTouch=l(d)),xi({},p,{el:d},m)})},h={ref:c};return t.trackMouse&&(h.onMouseDown=r),[h,l]}function kM(e,t,r){var i={};return!t.trackTouch&&e.cleanUpTouch?(e.cleanUpTouch(),i.cleanUpTouch=null):t.trackTouch&&!e.cleanUpTouch&&e.el&&(i.cleanUpTouch=r(e.el)),xi({},e,i)}function io(e){var t=e.trackMouse,r=Me.useRef(xi({},tf,{type:"hook"})),i=Me.useRef();i.current=xi({},EM,e);var a=Me.useMemo(function(){return TM(function(l){return r.current=l(r.current,i.current)},{trackMouse:t})},[t]),s=a[0],o=a[1];return r.current=kM(r.current,i.current,o),s}var PM=(function(e){Vge(t,e);function t(i){var a;return a=e.call(this,i)||this,a._set=function(s){a.transientState=s(a.transientState,a.props)},a.transientState=xi({},tf,{type:"class"}),a}var r=t.prototype;return r.render=function(){var a=this.props,s=a.className,o=a.style,l=a.nodeName,c=l===void 0?"div":l,h=a.innerRef,u=a.children,d=a.trackMouse,p=TM(this._set,{trackMouse:d}),f=p[0],m=p[1];this.transientState=kM(this.transientState,this.props,m);var g=h?function(x){return h(x),f.ref(x)}:f.ref;return Me.createElement(c,xi({},f,{className:s,style:o,ref:g}),u)},t})(Me.PureComponent);PM.propTypes={onSwiped:Nt.func,onSwiping:Nt.func,onSwipedUp:Nt.func,onSwipedRight:Nt.func,onSwipedDown:Nt.func,onSwipedLeft:Nt.func,delta:Nt.number,preventDefaultTouchmoveEvent:Nt.bool,nodeName:Nt.string,trackMouse:Nt.bool,trackTouch:Nt.bool,innerRef:Nt.func,rotationAngle:Nt.number};PM.defaultProps=EM;const LT=()=>window.innerWidth;function ws(){const[e,t]=y.useState(LT());return y.useEffect(()=>{let r=null;const i=()=>{clearTimeout(r),r=setTimeout(()=>t(LT()),150)};return window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}},[]),e}function Zge(e){const{elements:t,active:r,type:i,title:a,numPerPage:s,breakpoints:o}=e,l=ws(),[c,h]=y.useState(0),[u,d]=y.useState(0),[p,f]=y.useState(0),m=i==="paginated-row";y.useEffect(()=>{d(0)},[t.length]);let g;m?l<=600?g=t.length:l<=1280?g=~~((t.length-1)/(s-2))+1:g=t.length:g=~~((t.length-1)/s)+1;const x=()=>{if(!o)return"";const _=Object.keys(o);for(let C=0;C<_.length;C++)if(l<=~~_[C])return o[_[C]]},v=_=>{let C;m?C=document.getElementById("grid-layout-row"):C=document.querySelector(`[data-gridid='${a}']`);let E;return E=C&&C.children&&C.children[0]&&C.children[0].offsetWidth,E*_},b=`${x()}${m?" nowrap":""}`,j=t.map(_=>n.jsx(_.type,{..._.props,style:{transform:`translateX(-${v(u)+p}px)`,transition:p?"none":"transform 0.5s ease"}},_.key)),w=io({onSwipedLeft:()=>u<g-1&&d(u+1),onSwipedRight:()=>u>0&&d(u-1),onSwiping:_=>f(_.deltaX),onSwiped:()=>f(0)}),S=j;return r&&t?n.jsx(n.Fragment,{children:n.jsxs("div",{id:"grid-layout"+(m?"-row":""),className:`${b}${t.length===1?" has-one-chart":t.length===2?" has-two-charts":""}`,"data-gridid":a,...w,children:[S,m&&n.jsx(n.Fragment,{children:t.length===2&&l>=993?n.jsx(n.Fragment,{}):n.jsxs(n.Fragment,{children:[u!==0&&n.jsx("div",{id:"row-pagination-left",children:n.jsx("button",{className:"btn-navigation",onClick:()=>d(u-1),children:n.jsx("i",{className:"material-icons",children:"chevron_left"})})}),u<g-1&&n.jsx("div",{id:"row-pagination-right",children:n.jsx("button",{className:"btn-navigation",onClick:()=>d(u+1),children:n.jsx("i",{className:"material-icons",children:"chevron_right"})})})]})})]})}):n.jsx(n.Fragment,{})}const Jge=e=>({}),eve=le(Jge,{})(Zge),Jf=e=>{const{modal:t,setModal:r}=e;return y.useEffect(()=>{const i=a=>$n(a,t,r);return window.addEventListener("keyup",i),()=>{window.removeEventListener("keyup",i)}},[t]),n.jsx(ot,{setModal:r,children:n.jsxs("div",{className:"error-modal-container","diagnostic-id":"request-limit-reached-modal-container",children:[n.jsx("div",{className:"error-modal-header-icon",children:n.jsx("i",{className:"material-icons",children:"warning"})}),n.jsx("h5",{"diagnostic-id":"request-limit-reached-header",children:"Request Limit Reached"}),n.jsx("p",{className:"request-limit-reached-msg",children:"You’ve reached the maximum number of requests allowed for this period. Please try again in a few minutes or contact us for assistance."}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{className:"btn-cancel",onClick:()=>window.Intercom("show"),children:"Contact Us"}),n.jsx("button",{type:"button",className:"btn-primary limit-reached-close-btn","diagnostic-id":"modal-cancel-btn",onClick:()=>{r(!1)},children:"CLOSE"})]})]})})};function tve(e){const{values:t,errors:r,touched:i,user:a,setFieldError:s,setFieldValue:o,isSubmitting:l}=e,[c,h]=y.useState(null),[u,d]=y.useState(!1),[p,f]=y.useState(!1);y.useEffect(()=>{const x=v=>$n(v,p,f);return window.addEventListener("keyup",x),()=>{window.removeEventListener("keyup",x)}},[p]);const m=(x,v,b,j,w,S)=>{x===void 0?(h(null),u&&d(!1),delete b.uploadedFile,delete v.uploadedFile):W3(x)?x&&x.size>10485760?(h(null),S(`${j}File`,void 0,!1),w(j+"File","That file is larger than 10MB. Please use a smaller file or contact us for help.")):(h(URL.createObjectURL(x)),u&&d(!1),S("uploadedFile",x),delete v.uploadedFile):w(j+"File","File must be a PNG, WEBP, GIF, BMP, JPG/JPEG, PDF, or PPTX file.")};y.useEffect(()=>
33{t.uploadedFile&&!e.isDirty?e.setDirty(!0):!t.uploadedFile&&e.isDirty&&e.setDirty(!1)},[t.uploadedFile]);const g=n.jsx(ot,{setModal:f,children:n.jsxs("div",{className:"info-modal-container","data-diagnostic-id":"upload-assistant-info-modal-container",children:[n.jsx("div",{className:"info-modal-header-icon",children:n.jsx("i",{className:"material-symbols-outlined",children:"help_outline"})}),n.jsx("h5",{className:"how-to-header",children:"Upload a chart image or presentation"}),n.jsx("p",{children:"Upload a chart image or presentation on the topic you would like to address. Chartbook Assistant will find the most relevant charts to help you communicate your financial insights to clients."}),n.jsx("div",{className:"buttons",children:n.jsx("button",{type:"button",className:"btn-cancel","data-diagnostic-id":"modal-cancel-btn",onClick:()=>{f(!1)},children:"CLOSE"})})]})});return n.jsxs("div",{className:"recommend-request-form",children:[n.jsxs("div",{className:"recommend-request-section",children:[n.jsx("h4",{className:"recommend-request-header",children:"Upload an Image or Presentation to Find Similar Charts"}),n.jsxs("button",{type:"button","data-diagnostic-id":"instructions-btn",className:"btn-primary-text btn-icon-text instructions-btn",onClick:()=>f(!0),children:[n.jsx("i",{className:"material-icons help-icon","data-diagnostic-id":"help-icon",children:"help_outline"}),"Instructions"]}),n.jsx("p",{className:"choose-file-msg",children:"To upload a file, drag and drop your file to the area below or select a file. Supported file types include .jpg, .png, .webp, .gif, .bmp, .pdf, and .pptx"}),c&&n.jsx("div",{className:"file-name-label-wrapper",children:n.jsx("label",{className:"file-name-label",htmlFor:"files",children:t.uploadedFile?.name})}),n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`media-upload-grp${c?" has-file":" has-no-file"}`,children:c?n.jsxs(n.Fragment,{children:[t.uploadedFile?.type.includes("image")?n.jsx("div",{className:"image-group",children:n.jsx("img",{src:c,alt:t.uploadedFile?.name||"Uploaded file preview"})}):t.uploadedFile?.type.includes("pdf")?n.jsxs("div",{className:"pdf-ppt-group",children:[n.jsx(dt,{icon:nu}),n.jsx("div",{className:"pdf-ppt-file-name",children:t.uploadedFile?.name})]}):t.uploadedFile?.type.includes("vnd")?n.jsxs("div",{className:"pdf-ppt-group",children:[n.jsx(dt,{icon:Sj}),n.jsx("div",{className:"pdf-ppt-file-name",children:t.uploadedFile?.name})]}):n.jsx(n.Fragment,{}),c&&n.jsx("button",{id:"clear-btn",type:"button",onClick:()=>{m(void 0,r,t,"uploaded",s,o)},children:"Undo"})]}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"media-group-placeholder",children:[n.jsx("div",{className:"upload-file-icons",children:n.jsx("i",{className:"material-icons",children:"upload_file"})}),n.jsx("p",{children:"Drag and drop your file here"})]}),n.jsx("input",{id:"uploadedFile","data-diagnostic-id":"upload-assistant-input",name:"uploadedFile",accept:G3,type:"file",value:c?c.name:"",onChange:x=>{m(x.currentTarget.files[0],r,t,"uploaded",s,o)},className:r.uploadedFile&&i.uploadedFile?"text-input error":"file-path validate"})]})}),r.uploadedFile&&n.jsx("div",{className:"input-feedback","data-diagnostic-id":"input-feedback",children:r.uploadedFile})]})]}),p&&g]})}const nve=e=>({user:e.auth.user}),rve=le(nve,{})(tve),jy={upload:"",describe:"describe"};function ive(e){const{user:t,recommendedCharts:r,modalStatus:i,recommendCharts:a,newChartbook:s,history:o,showSpinner:l,showChartbookSpinner:c,suggestedTitle:h,requestId:u,clearAssistantData:d,getNotes:p,notes:f,getRecommendChartsSummary:m,setAssistantStep:g,step:x}=e,v=2e3,b=5e3,j=["image/jpeg","image/png","image/webp","image/gif","image/bmp"],w=["application/pdf","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation"],[S,_]=y.useState(!1),[C,E]=y.useState(!1),[P,T]=y.useState(!1),[N,k]=y.useState(""),[I,D]=y.useState(""),[O,$]=y.useState(""),[U,B]=y.useState(""),[L,A]=y.useState(0),[R,F]=y.useState(!1),[q,V]=y.useState(null),[X,M]=y.useState(null);y.useEffect(()=>{const se=ge=>$n(ge,C||P,C&&E||P&&T);return window.addEventListener("keyup",se),()=>{window.removeEventListener("keyup",se)}},[C,P]),y.useEffect(()=>{const se=Ni.parse(e.location.search),ge=se.view&&Object.keys(jy).includes(se.view);if(se.view&&!ge){e.history.push("/assistant");return}$(ge?se.view:"")},[e.location.search]);const W=se=>{e.isDirty?window.confirm(ko)&&($(se),e.setDirty(!1),o.push(`/assistant${se?`?view=${se}`:""}`)):($(se),o.push(`/assistant${se?`?view=${se}`:""}`))};y.useEffect(()=>{g(0)},[]),y.useEffect(()=>{p()},[x]),y.useEffect(()=>{x===0&&d()},[x]),y.useEffect(()=>{let se;if(N==="Analyzing Request")return se=setInterval(()=>k("Selecting Charts"),j.includes(U)?v+1e3:v),()=>{clearInterval(se)};if(N==="Selecting Charts")return se=setInterval(()=>k("Finalizing Recommendations"),j.includes(U)?v+1500:v+1e3),()=>{clearInterval(se)}},[N]),y.useEffect(()=>{let se,ge;if(q)return se=setInterval(()=>m(t.id,q).then(De=>{De&&(De.status===200?(De.data.detail==="failed status"?(E(!0),F(!1)):(clearInterval(ge),A(100),setTimeout(()=>{g(1)},b+1)),V(null)):De.status===400&&(F(!1),A(0),V(null)))}),b),setTimeout(()=>{A(10)},100),ge=setInterval(()=>{A(De=>{const ae=100*(1-Math.exp(-.02*(De+1)));return Math.min(100,ae)})},b),()=>{clearInterval(se),clearInterval(ge),setTimeout(()=>{F(!1),A(0)},b+1)}},[q]),y.useEffect(()=>{if(!i){const se=document.body.style.top;document.body.style.position="",document.body.style.top="",document.body.style.width="";const ge=document.querySelector(".nav-wrapper");ge&&(ge.style.paddingRight="",ge.style.paddingLeft=""),window.scrollTo(0,parseInt(se||"0")*-1)}},[i]);const K=r?.map((se,ge)=>se.chart_info.id);y.useEffect(()=>{M(K??null)},[r]);const z=se=>{s(X,t.id,se,"Created using the Clearnomics assistant",u).then(ge=>{o.push(`/chartbooks/${ge}/`)})};let Y=null;const ie=r?r?.map((se,ge)=>n.jsx(qge,{chart:se,index:ge,notes:f,numCharts:r?.length,selectedIds:X,setSelectedIds:M},ge)):[],ne=()=>{g(0)},ve=n.jsx(ot,{setModal:E,children:n.jsxs("div",{className:"error-modal-container","data-diagnostic-id":"error-modal-container",children:[n.jsx("div",{className:"error-modal-header-icon",children:n.jsx("i",{className:"material-icons",children:"error"})}),n.jsx("h5",{"data-diagnostic-id":"error-modal-header",children:"Sorry, we couldn't find the charts you're looking for"}),O==="describe"?n.jsxs(n.Fragment,{children:[n.jsx("p",{children:"We couldn't find charts that fit your description. Please try again using more specific language. Here are some examples:"}),n.jsxs("ul",{children:[n.jsx("li",{children:"I would like to provide a quarterly market update to my clients"}),n.jsx("li",{children:"Three charts on staying invested in volatile markets"}),n.jsx("li",{children:"Please suggest charts on: inflation, jobs, the Fed, stocks and asset allocation"})]})]}):n.jsx("p",{children:"We couldn't find any chart matches. Please try again with another file."}),n.jsx("div",{className:"buttons",children:n.jsx("button",{type:"button",className:"btn-cancel","data-diagnostic-id":"modal-cancel-btn",onClick:()=>{E(!1)},children:"CLOSE"})})]})}),pe=n.jsx(ot,{setModal:_,children:n.jsxs("div",{className:`new-chartbook-modal-container${x===1?" add-title":""}`,children:[n.jsx("i",{className:"material-icons",onClick:()=>_(!1),children:"close"}),n.jsx(gt,{initialValues:{title:h||""},onSubmit:(se,{setSubmitting:ge})=>{e.setDirty(!1);const De=se.title.trim();z(De),ge(!1)},validationSchema:_t().shape({title:Ae().test("is-empty","Title c
33annot be empty",function(se){return!se||!se.split("").every(ge=>ge===" ")})}),children:({values:se,touched:ge,errors:De,isSubmitting:ae})=>n.jsxs(vt,{onClick:Q=>Q.stopPropagation(),children:[n.jsx("h5",{children:"Create a New Chartbook"}),n.jsx("div",{className:"title-label",children:"Use the suggested title or write your own:"}),De.title&&ge.title&&n.jsx("div",{className:"input-feedback","data-diagnostic-id":"input-feedback",children:De.title}),n.jsx(me,{id:"title",name:"title","data-diagnostic-id":"cb-title-input",placeholder:"Market Chartbook",maxLength:50,className:De.title&&ge.title?"text-input-error":"form-control"}),n.jsxs("div",{className:"character-count",children:[50-se.title.length," characters left"]}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","data-diagnostic-id":"modal-cancel-btn",onClick:()=>_(!1),children:"Cancel"}),n.jsx("button",{type:"submit",className:"btn btn-primary","data-diagnostic-id":"modal-primary-btn",disabled:!!Object.keys(De).length||ae,children:"Create"})]})]})})]})}),be=[{path:jy.upload,label:"Chart Match",icon:n.jsx(vge,{}),component:(se,ge,De)=>n.jsx(rve,{...se,isDirty:ge,setDirty:De}),id:"assistant-upload",diagId:"assistant-upload-tab"},{path:jy.describe,label:"Text-To-Charts",icon:n.jsx(xge,{}),component:(se,ge,De)=>n.jsx($ge,{...se,isDirty:ge,setDirty:De}),id:"assistant-describe",diagId:"assistant-describe-tab"}],ye=be[be.findIndex(se=>se.path===O)]||be[0],ke=ye.id,fe=(se,ge,De)=>ye.component(se,ge,De);switch(x){case 0:Y=n.jsxs(n.Fragment,{children:[n.jsxs("div",{id:"assistant-intro",children:[ef,n.jsx("div",{className:"create-chartbook-header",children:"Clearnomics Assistant"})]}),n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"row",children:n.jsx(Zf,{value:O,handleChoice:W,choices:be})}),n.jsx("div",{className:"row fadeTransition",id:ke,children:n.jsx("div",{className:`${O||"upload"}-assistant`,children:n.jsx(gt,{initialValues:O==="describe"?{request:I||""}:{uploadedFile:void 0},enableReinitialize:!0,onSubmit:(se,{setSubmitting:ge,setFieldError:De})=>{j.includes(se.uploadedFile?.type)||se.request?k("Analyzing Request"):w.includes(se.uploadedFile?.type)&&F(!0),B(se.uploadedFile?.type??"");const ae=se.request?.trim();a(t.id,O==="describe"?ae:se.uploadedFile,O==="describe"?"prompt":"upload").then(Q=>{Q&&(Q.status===200?Q.data.detail==="failed status"?(E(!0),F(!1)):(D(se.request),k(""),g(1)):Q.status===202?V(Q.data.callback_id):Q.status===403&&(T(!0),F(!1))),ge(!1)})},validationSchema:_t().shape({request:Ae().test("is-empty","Description cannot be empty",function(se){return!se||!se.split("").every(ge=>ge===" ")})}),children:se=>n.jsxs(vt,{children:[fe(se,e.isDirty,e.setDirty),n.jsx("button",{type:"submit",className:"btn btn-primary-lg btn-primary-icon",disabled:se.isSubmitting||(O==="describe"?!se.values.request:!se.values.uploadedFile)||!!Object.keys(se.errors).length,"data-diagnostic-id":"recommend-request-btn",children:n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"material-icons-outlined",children:"flash_on"}),"RECOMMEND CHARTS"]})})]})})})})]})]});break;case 1:Y=n.jsxs(n.Fragment,{children:[n.jsxs("div",{id:"assistant-intro",children:[ef,n.jsx("div",{className:"create-chartbook-header",children:"Clearnomics Assistant"})]}),n.jsxs("div",{id:"recommended-charts-container",children:[n.jsxs("h4",{className:"suggested-title-header",children:["Suggested chartbook title:"," ",n.jsx("span",{className:"suggested-title",children:h})]}),n.jsx("div",{className:"recommended-charts",children:n.jsx(eve,{breakpoints:Ls,elements:ie,type:"paginated-row",numPerPage:3,active:!0})}),n.jsxs("div",{className:"nav-btn",children:[n.jsx("button",{className:"btn-cancel",onClick:ne,children:"< Back"}),n.jsx(Ke,{title:X?.length===0?"Select one or more charts to create a chartbook":"",placement:"top",children:n.jsx("span",{children:n.jsx("button",{className:"btn btn-primary chartbook-cover","data-diagnostic-id":"create-chartbook-btn",onClick:()=>_(!0),disabled:X?.length===0,children:"Create Chartbook"})})})]}),S&&pe]})]});break}return n.jsxs(n.Fragment,{children:[l&&!R?O==="describe"||j.includes(U)?n.jsx(Dn,{statusMessage:N}):n.jsx(n.Fragment,{}):R?n.jsx("div",{className:"assistant-progress-container",children:n.jsxs("div",{className:"assistant-progress-wrapper",children:[n.jsx("h3",{className:"assistant-progress-header",children:"Working on your request..."}),n.jsx("div",{className:"remixing-subheader",children:"This may take up to a minute"}),n.jsx(o0,{progress:L,isAssistant:!0})]})}):c?n.jsx(Dn,{}):null,n.jsx("div",{className:`container${l||R?" spinner-active":""}`,children:n.jsx("div",{className:"assistant recommend",children:Y})}),C&&ve,P&&n.jsx(Jf,{modal:P,setModal:T})]})}const ave=e=>({user:e.auth.user,recommendedCharts:e.assistant&&e.assistant.charts,modalStatus:e.preferences&&e.preferences.modalStatus,showSpinner:e.assistant&&e.assistant.showSpinner,showChartbookSpinner:e.chartbooks.showSpinner,suggestedTitle:e.assistant&&e.assistant.suggested_title,requestId:e.assistant&&e.assistant.request_id,notes:e.assistant&&e.assistant.notes,step:e.assistant&&e.assistant.step}),sve=Jt(le(ave,{recommendCharts:zJ,newChartbook:Ga,clearAssistantData:GJ,getNotes:HJ,getRecommendChartsSummary:VJ,setAssistantStep:bA})(zt(ive)));function ove(e){return n.jsx("div",{className:`assistant-answer ${e.isSelected?"answer-selected":""}`,onClick:e.handleAnswerClick,children:e.text})}class lve extends y.Component{constructor(){super(...arguments),this.state={stepNumber:0,questionNumber:0,answers:[],finished:!1,modal:!1},this.handleStart=()=>{this.setState({stepNumber:this.state.stepNumber+1}
33)},this.handlePrevious=()=>{this.setState({questionNumber:this.state.questionNumber-1})},this.handleNext=()=>{this.setState({questionNumber:this.state.questionNumber+1})},this.handleSubmit=t=>{this.props.newChartbook(this.state.answers,this.props.user.id,t,"Created using the Clearnomics assistant").then(()=>{this.setState({finished:!0})})},this.handleAnswerClick=t=>{const r=[...this.state.answers],i=r.indexOf(t);i>-1?r.splice(i,1):r.push(t),this.setState({answers:r})},this.isAnswerSelected=t=>this.state.answers.indexOf(t)>-1}componentDidMount(){this.props.getQuestionSet(this.props.user.id)}render(){if(!this.props.questionSet)return null;if(this.state.finished)return n.jsx(jn,{children:n.jsx(qt,{from:"start",to:"/insights?view=chartbooks"})});const t=this.props.chartbooks?.filter(i=>i.content_permissions_level<=this.props.chartbookPermissions.content_permissions_level).length;let r=null;switch(this.state.stepNumber){case 0:r=n.jsx("div",{id:"assistant-intro",children:t>=this.props.maxChartbooks?n.jsxs(n.Fragment,{children:[n.jsxs("div",{children:["Upgrade Your Clearnomics Experience to add more chartbooks"," "]}),n.jsxs("div",{className:"assistant-intro-btn-group",children:[n.jsx("button",{className:"btn btn-primary-lg","diagnostic-id":"assistant-upgrade-btn",type:"button",onClick:()=>this.setState({modal:!0}),children:"REQUEST UPGRADE"}),n.jsx("button",{className:"btn-cancel",onClick:()=>this.props.history.push("/chartbooks"),children:"< BACK TO CHARTBOOKS"})]})]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{children:this.props.chartbooks&&this.props.chartbooks.length?`Welcome back, ${this.props.user.first_name}!`:`Welcome to Clearnomics, ${this.props.user.first_name}!`}),n.jsx("div",{children:"I can help you create a new chartbook."}),n.jsx("button",{onClick:this.handleStart,className:"btn-primary-lg","diagnostic-id":"assistant-start-btn",children:"Let's Get Started"})]})});break;default:if(this.state.questionNumber===this.props.questionSet.questions.length){const i=this.state.answers.length>0;r=n.jsx(gt,{initialValues:{title:""},onSubmit:(a,{setSubmitting:s})=>{const o=a.title.trim();this.handleSubmit(o),s(!1)},validationSchema:_t().shape({title:Ae().test("is-empty","Title cannot be empty",function(a){return!a||!a.split("").every(s=>s===" ")})}),children:({values:a,touched:s,errors:o,isSubmitting:l})=>n.jsxs(vt,{children:[this.props.showSpinner?n.jsx(Dn,{}):null,n.jsxs("div",{id:"assistant-question","diagnostic-id":"assistant-question",children:[i?n.jsxs(n.Fragment,{children:[n.jsx("h4",{children:"Congratulations! Enter a title and click Finish to create your chartbook"}),n.jsxs("div",{className:"assistant-chartbook-title-container",children:[n.jsxs("div",{className:"character-count",children:[50-a.title.length," characters left"]}),n.jsx(me,{id:"title",name:"title","diagnostic-id":"cb-assistant-title-input",placeholder:"Market Chartbook",maxLength:50,className:o.title&&s.title?"text-input-error":"assistant-input-field"}),o.title&&s.title&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:o.title})]})]}):n.jsx("h4",{"diagnostic-id":"assistant-empty-msg",children:"Please select at least one topic to proceed"}),n.jsxs("div",{className:"nav-btn",children:[n.jsx("button",{type:"button",className:i?"btn-cancel":"btn btn-primary",onClick:this.handlePrevious,children:"< Back"}),i&&n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"assistant-finish-btn",disabled:!!Object.keys(o).length||l,children:"Finish"})]})]},999)]})})}else{const i=this.props.questionSet.questions[this.state.questionNumber];r=n.jsxs(n.Fragment,{children:[n.jsxs("div",{id:"assistant-question","diagnostic-id":"assistant-question",children:[this.state.questionNumber===0?n.jsx("h4",{children:"Great. I'll ask you a series of questions to find the best charts."}):"",n.jsx("h4",{children:i.text}),i.answers.map(a=>n.jsx(ove,{handleAnswerClick:()=>this.handleAnswerClick(a.chart.id),text:a.text,isSelected:this.isAnswerSelected(a.chart.id)},a.id))]},i.id),n.jsxs("div",{className:"nav-btn",children:[this.state.questionNumber>=1?n.jsx("button",{className:"btn-cancel",onClick:this.handlePrevious,children:"< Back"}):"",n.jsx("button",{className:"btn btn-primary","diagnostic-id":"assistant-next-btn",onClick:this.handleNext,children:"Next >"})]})]})}}return n.jsxs("div",{className:"container",children:[this.state.modal&&n.jsx(ii,{setModal:i=>this.setState({modal:i}),modal:this.state.modal}),n.jsx("div",{className:"assistant",children:r})]})}}const cve=e=>({questionSet:e.assistant.questionSet,user:e.auth.user,chartbooks:e.chartbooks.items,showSpinner:e.chartbooks.showSpinner,maxChartbooks:e.auth.user&&e.auth.user.company&&e.auth.user.company.chartbook_permissions&&e.auth.user.company.chartbook_permissions.max_chartbooks,chartbookPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.chartbook_permissions}),dve={getQuestionSet:qJ,newChartbook:Ga},uve=le(cve,dve),hve=uve(lve),{apiAddress:Di}=Tn,{chartbookType:IM,clientpieceType:DM,insightsVideoType:RM,partnerInsightType:OM}=Ei,em=()=>(e,t)=>{const r=t().auth.user.company.id;return e({type:Y3}),Ne.get(`${Di}
33api/orgs/${r}/engage/`,Ee(t)).then(i=>(e({type:K3,payload:i.data}),i)).catch(i=>{e({type:X3}),i.message!==Ue&&e(he({serverError:"There was a problem fetching your shared content, please try again"}))})},ic=e=>(t,r)=>(t({type:Q3}),Ne.get(`${Di}api/users/${e}/engage/`,Ee(r)).then(i=>(t({type:Z3,payload:i.data}),i)).catch(i=>{t({type:J3}),i.message!==Ue&&t(he({serverError:"There was a problem fetching your shared content, please try again"}))})),pve=e=>(t,r)=>Ne.get(`${Di}api/users/${e}/engage/?view=summary&time=${Date.now()}`,Ee(r)).then(i=>(t({type:dU,payload:i.data}),i)),l0=(e,t,r,i)=>(a,s)=>{const o=`${Di}api/users/${e}/engage/${r}s/`,l={[`${r}_id`]:t,type:i};return a({type:iU}),Ne.post(o,l,Ee(s)).then(c=>(a({type:aU,payload:c.data}),a(he({alertMessage:"New Shared Content Created"})),c.data),c=>(a({type:TD}),c.message!==Ue&&a(he({serverError:"There was a problem creating this shared content, please try again"})),Promise.reject(()=>{})))},c0=(e,t,r)=>(i,a)=>{const s=`${Di}api/users/${t}/engage/${r}/${e}/`;return i({type:eU}),Ne.get(s,Ee(a)).then(o=>(i({type:tU,payload:o.data}),o)).catch(o=>(i({type:TD}),o.message!==Ue&&i(he({serverError:"There was a problem retrieving this shared content, please try again"})),Promise.reject(o)))},fve=(e,t,r)=>(i,a)=>{const s=`${Di}api/users/${t}/engage/${r}s/${e}/`;let o="",l="";switch(r){case IM:o="Chartbook",l="chartbook";break;case DM:o="Commentary",l="commentary";break;case RM:o="Insights Video",l="insights video";break;case OM:o="Partner Insight",l="partner insight";break}return Ne.delete(s,Ee(a)).then(c=>(i({type:hU,id:e,engageType:r}),i(he({alertMessage:`Shared ${o} Successfully Deleted`})),c)).catch(c=>{c.message!==Ue&&i(he({serverError:`There was a problem deleting this shared ${l}, please try again`}))})},mve=(e,t,r,i)=>(a,s)=>{const o=`${Di}api/users/${t}/engage/${i}s/${e}/`,l={title:r};return a({type:sU}),Ne.patch(o,l,Ee(s)).then(c=>(a({type:oU,payload:c.data}),a(he({alertMessage:"Changes saved. Your shared content is updating."})),c.data)).catch(c=>{c.message!==Ue&&a(he({serverError:"There was a problem updating this shared content. Please try again."}))})},AM=(e,t,r,i)=>(a,s)=>{const o=`${Di}api/users/${t}/engage/${i}s/${e}/`;return Ne.patch(o,r,Ee(s)).then(l=>{a({type:rU,payload:l.data}),a(he({alertMessage:"Settings saved. Your shared content is updating."}))}).catch(l=>{l.message!==Ue&&a(he({serverError:"There was a problem updating your shared content settings, please try again"}))})},ac=(e,t,r)=>(i,a)=>{const s=`${Di}api/users/${e}/engage/${r}s/${t.id}/`,o=t.is_enabled,l={is_enabled:!o};let c="";switch(r){case IM:c="Chartbook";break;case DM:c="Commentary";break;case RM:c="Insights Video";break;case OM:c="Partner Insight";break}const h=o?`Shared ${c} Inactivated`:`Shared ${c} Activated`;return Ne.patch(s,l,Ee(a)).then(u=>(i({type:nU,payload:t.id,engageType:t.type}),i(he({alertMessage:h})),ic(e)(i,a),u)).catch(u=>{u.message!==Ue&&i(he({serverError:"There was a problem updating your shared content, please try again"}))})},gve=e=>(t,r)=>{const i=r().auth.user.company.id;t({type:pU});const a={theme_page_color:e.themeColor,theme_text_color:e.themeTextColor,show_engage_chartbooks:e.includeChartbook,button_contact_text:e.contactText,button_color:e.btnColor,button_text_color:e.btnTextColor,button_action:e.btnAction,contact_custom_url:e.customUrl,hosted_design:e.overlayDesign,contact_email:e.contactEmail,contact_subject:e.contactSubject,company_email:e.companyEmail,company_phone_number:e.phoneNumber,company_contact_website:e.contactWebsite,company_address_line1:e.address1,company_address_line2:e.address2,company_address_city:e.city,company_address_state:e.state,company_address_zipcode:e.zipCode,privacy_policy_url:e.privacyPolicyUrl},s=`${Di}api/orgs/${i}/engage/`,o=Ee(r);return Ne.patch(s,a,o).then(l=>(t({type:fU,payload:l.data}),t(he({alertMessage:"Engage settings saved. Your shared content is updating."})),l.data)).catch(l=>{l.message!==Ue&&t(he({serverError:"There was a problem updating your Engage settings, please try again"}))})},d0=e=>({type:cU,payload:e}),MM=()=>(e,t)=>{const r=t().auth.user.company.id,i=`${Di}api/orgs/${r}/engage/`,a=t().engage.companySettings.is_insights_collection_enabled,s={is_insights_collection_enabled:!a},o=a?"Insights Collection Inactivated":"Insights Collection Activated";return Ne.patch(i,s,Ee(t)).then(l=>(e({type:lU,payload:l.data}),e(he({alertMessage:o})),l)).catch(l=>{l.message!==Ue&&e(he({serverError:"There was a problem updating your insights collection, please try again"}))})},vve=()=>(e,t)=>{const r=t().auth.user.company.id,i=`${Di}api/orgs/${r}/engage/design/`;return Ne.get(i,Ee(t)).then(a=>{e({type:uU,payload:a.data})})},bve=(e,t,r)=>(i,a)=>{const s=`${Di}api/users/${e}/engage/${r}s/${t.id}/email/?share=plaintext`,o={};return Ne.post(s,o,Ee(a))},yve=(e,t,r)=>(i,a)=>{const s=`${Di}api/users/${e}/engage/${r}s/${t.id}/email/`,o={...Ee(a),responseType:"blob"},l={};return Ne.post(s,l,o)},xve=e=>{const{setMaxChartsModal:t,sharedContent:r,toggleSharedItemStatus:i,userId:a,isActive:s,inChartLibrary:o,selectedChartIds:l,chartOrder:c,saveChartSelection:h,isWizard:u,history:d,cbId:p,inCl
33ientPiece:f,setChartLibraryModal:m,fromSharedContentList:g,maxChartsModal:x,sharedContentDisplayType:v,setSelectedTab:b,maxCharts:j}=e,{chartbookType:w,clientpieceType:S}=Ei;y.useEffect(()=>{const C=E=>$n(E,x,t);return window.addEventListener("keyup",C),()=>{window.removeEventListener("keyup",C)}},[x]);const _=C=>{C.preventDefault(),s||(o?h(a,l,c).then(()=>{u&&d.push(`/chartbooks/${p}`)}):f?m(!0):(r.type===w||r.type===S)&&i(a,r,r.type).then(E=>{E.status===200&&!g&&b("1")})),t(!1)};return n.jsx(ot,{setModal:t,children:n.jsxs("div",{className:"max-charts-modal-container","diagnostic-id":"max-charts-modal-container","data-testid":"max-charts-modal-container",children:[n.jsx("h5",{children:"Exceeds Maximum Charts"}),n.jsx("p",{children:`This ${v} contains more than the maximum shareable charts. Only
34          the first ${j} charts will be displayed in the shared ${v}.`}),n.jsx("div",{className:"max-reached-chat-btn","diagnostic-id":"max-reached-chat-btn",onClick:()=>{window.Intercom("show")},children:"Contact us to inquire about sharing additional charts."}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>t(!1),children:"CANCEL"}),n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",onClick:_,children:"Continue"})]})]})})},jve=e=>({userId:e.auth.user&&e.auth.user.id,selectedChartIds:e.chartbooks.item?.selectedChartIds,chartOrder:e.chartbooks.item?.chartOrderNew,cbId:e.chartbooks.item&&e.chartbooks.item.id}),Nu=Jt(le(jve,{toggleSharedItemStatus:ac,saveChartSelection:s0,setChartLibraryFormStatus:Xf})(xve));function wve(e){const{selectedChartIds:t,chartOrder:r,handleCancel:i,isDirty:a,setChartLibraryFormStatus:s,userId:o,cbId:l,isWizard:c,history:h,engagePermissions:u,chartbook:d,maxChartsModal:p,setMa
34xChartsModal:f,canUseEngage:m,maxChartbookCharts:g,isLicenseUpgradable:x,user:v,handleModalAndEvent:b}=e,j=u.max_engage_charts,w=d.numCharts>j;return n.jsx(gt,{initialValues:{},onSubmit:(S,{setSubmitting:_})=>{m&&w&&d.engage_shared?.length>0?f(!0):e.saveChartSelection(o,t,r).then(()=>{s(!1),_(!1),c&&h.push(`/chartbooks/${l}`)})},children:S=>{const{handleSubmit:_,isSubmitting:C}=S;return n.jsx("div",{className:"chart-save-grp",children:n.jsx("form",{onSubmit:_,children:n.jsxs("div",{className:"form-group",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"library-reset-btn",onClick:i,children:"RESET"}),x&&d.numCharts>g?n.jsx(Ke,{interactive:!0,title:n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"upgrade-tooltip-msg",children:["You have selected more than ",g," ","charts for this chartbook. Please remove charts to save your changes or request an upgrade."]}),v.is_upgrade_disabled?n.jsxs("div",{className:"upgrade-submitted-tooltip",children:[n.jsx("i",{className:"material-icons",children:"done"}),"UPGRADE REQUESTED"]}):n.jsxs("button",{onClick:b,className:"upgrade-tooltip-btn",children:[n.jsx("i",{className:"material-icons",children:"open_in_new"}),"UPGRADE"]})]}),placement:"top",children:n.jsx("span",{children:n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"library-save-btn",disabled:!0,children:"SAVE"})})}):n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"library-save-btn",disabled:!a||C&&p,children:"SAVE"})]})})})}})}const Sve=e=>({selectedChartIds:e.chartbooks.item.selectedChartIds,chartOrder:e.chartbooks.item.chartOrderNew,isDirty:e.chartbooks.isDirty,userId:e.auth.user&&e.auth.user.id,cbId:e.chartbooks.item&&e.chartbooks.item.id,chartbook:e.chartbooks.item,engagePermissions:e.auth.user&&e.auth.user.company&&e.auth.user.company.engage_permissions,canUseEngage:e.auth.user&&e.auth.user.can_use_engage,maxChartbookCharts:e.auth.user&&e.auth.user.company&&e.auth.user.company.chartbook_permissions&&e.auth.user.company.chartbook_permissions.max_chartbook_charts,isLicenseUpgradable:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.license_type&&e.auth.user.company.license_type.is_upgradable,user:e.auth.user}),_ve=Jt(le(Sve,{saveChartSelection:s0,setChartLibraryFormStatus:Xf})(wve));class Cve extends y.Component{constructor(t){super(t),this.state={searchTerms:""},this.handleChange=r=>{this.setState({searchTerms:r.target.value},()=>this.props.searchCharts(this.state.searchTerms))},this.handleClose=()=>{this.setState({searchTerms:""},()=>this.props.searchCharts(this.state.searchTerms))},this.props.searchCharts(this.state.searchTerms)}componentDidUpdate(t){this.props.searchTerms!==t.searchTerms&&this.setState({searchTerms:this.props.searchTerms})}render(){const t=this.state.searchTerms&&this.state.searchTerms.length>2;return n.jsx("form",{className:`chart-search${this.props.isWizard?" wizard":""}`,onSubmit:r=>r.preventDefault(),children:n.jsxs("div",{className:"input-field",children:[n.jsx("input",{id:"chart_search","diagnostic-id":"chart-search-input",type:"search",value:this.state.searchTerms,onChange:this.handleChange,className:t?"active":"",required:!0,placeholder:"Search Charts..."}),this.state.searchTerms?n.jsx("i",{className:"material-icons",onClick:this.handleClose,children:"close"}):n.jsx("i",{className:"material-icons prefix",children:"search"})]})})}}const Nve=e=>({searchTerms:e.chartbooks.item&&e.chartbooks.item.searchTerms}),u0=le(Nve,{searchCharts:ro})(Cve);var Li={},ts={},wy={},Sy={},FT;function $M(){return FT||(FT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(e.HandlerRole||(e.HandlerRole={}))})(Sy)),Sy}var uh={},hh={};const Eve=Pn(mU);var ll={},cl={},_y={},ph={},fh={},ns={},UT;function el(){return UT||(UT=1,Object.defineProperty(ns,"__esModule",{value:!0}),ns.INIT_COORDS="dnd-core/INIT_COORDS",ns.BEGIN_DRAG="dnd-core/BEGIN_DRAG",ns.PUBLISH_DRAG_SOURCE="dnd-core/PUBLISH_DRAG_SOURCE",ns.HOVER="dnd-core/HOVER",ns.DROP="dnd-core/DROP",ns.END_DRAG="dnd-core/END_DRAG"),ns}var BT;function Tve(){if(BT)return fh;BT=1,Object.defineProperty(fh,"__esModule",{value:!0});var e=el();function t(r,i){return{type:e.INIT_COORDS,payload:{sourceClientOffset:i||null,clientOffset:r||null}}}return fh.setClientOffset=t,fh}var rs={},qT;function sc(){if(qT)return rs;qT=1,Object.defineProperty(rs,"__esModule",{value:!0});function e(o,l,c){return l.split(".").reduce(function(h,u){return h&&h[u]?h[u]:c||null},o)}rs.get=e;function t(o,l){return o.filter(function(c){return c!==l})}rs.without=t;
34function r(o){return typeof o=="string"}rs.isString=r;function i(o){return typeof o=="object"}rs.isObject=i;function a(o,l){var c=new Map,h=function(d){return c.set(d,c.has(d)?c.get(d)+1:1)};o.forEach(h),l.forEach(h);var u=[];return c.forEach(function(d,p){d===1&&u.push(p)}),u}rs.xor=a;function s(o,l){return o.filter(function(c){return l.indexOf(c)>-1})}return rs.intersection=s,rs}var Cy,VT;function hr(){if(VT)return Cy;VT=1;var e=function(t,r,i,a,s,o,l,c){if(!t){var h;if(r===void 0)h=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[i,a,s,o,l,c],d=0;h=new Error(r.replace(/%s/g,function(){return u[d++]})),h.name="Invariant Violation"}throw h.framesToPop=1,h}};return Cy=e,Cy}var zT;function kve(){if(zT)return ph;zT=1,Object.defineProperty(ph,"__esModule",{value:!0});var e=Tve(),t=sc(),r=hr(),i=el(),a={type:i.INIT_COORDS,payload:{clientOffset:null,sourceClientOffset:null}};function s(u){return function(p,f){p===void 0&&(p=[]),f===void 0&&(f={publishSource:!0});var m=f.publishSource,g=m===void 0?!0:m,x=f.clientOffset,v=f.getSourceClientOffset,b=u.getMonitor(),j=u.getRegistry();u.dispatch(e.setClientOffset(x)),o(p,b,j);var w=h(p,b);if(w===null){u.dispatch(a);return}var S=null;x&&(l(v),S=v(w)),u.dispatch(e.setClientOffset(x,S));var _=j.getSource(w),C=_.beginDrag(b,w);c(C),j.pinSource(w);var E=j.getSourceType(w);return{type:i.BEGIN_DRAG,payload:{itemType:E,item:C,sourceId:w,clientOffset:x||null,sourceClientOffset:S||null,isSourcePublic:!!g}}}}ph.default=s;function o(u,d,p){r(!d.isDragging(),"Cannot call beginDrag while dragging.");for(var f=0,m=u;f<m.length;f++){var g=m[f];r(p.getSource(g),"Expected sourceIds to be registered.")}}function l(u){r(typeof u=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function c(u){r(t.isObject(u),"Item must be an object.")}function h(u,d){for(var p=null,f=u.length-1;f>=0;f--)if(d.canDragSource(u[f])){p=u[f];break}return p}return ph}var mh={},HT;function Pve(){if(HT)return mh;HT=1,Object.defineProperty(mh,"__esModule",{value:!0});var e=el();function t(r){return function(){var a=r.getMonitor();if(a.isDragging())return{type:e.PUBLISH_DRAG_SOURCE}}}return mh.default=t,mh}var gh={},vh={},GT;function LM(){if(GT)return vh;GT=1,Object.defineProperty(vh,"__esModule",{value:!0});function e(t,r){return r===null?t===null:Array.isArray(t)?t.some(function(i){return i===r}):t===r}return vh.default=e,vh}var WT;function Ive(){if(WT)return gh;WT=1,Object.defineProperty(gh,"__esModule",{value:!0});var e=LM(),t=el(),r=hr();function i(c){return function(u,d){var p=(d===void 0?{}:d).clientOffset;a(u);var f=u.slice(0),m=c.getMonitor(),g=c.getRegistry();s(f,m,g);var x=m.getItemType();return o(f,g,x),l(f,m,g),{type:t.HOVER,payload:{targetIds:f,clientOffset:p||null}}}}gh.default=i;function a(c){r(Array.isArray(c),"Expected targetIds to be an array.")}function s(c,h,u){r(h.isDragging(),"Cannot call hover while not dragging."),r(!h.didDrop(),"Cannot call hover after drop.");for(var d=0;d<c.length;d++){var p=c[d];r(c.lastIndexOf(p)===d,"Expected targetIds to be unique in the passed array.");var f=u.getTarget(p);r(f,"Expected targetIds to be registered.")}}function o(c,h,u){for(var d=c.length-1;d>=0;d--){var p=c[d],f=h.getTargetType(p);e.default(f,u)||c.splice(d,1)}}function l(c,h,u){for(var d=0,p=c;d<p.length;d++){var f=p[d],m=u.getTarget(f);m.hover(h,f)}}return gh}var dl={},YT;function Dve(){if(YT)return dl;YT=1;var e=dl&&dl.__assign||function(){return e=Object.assign||function(h){for(var u,d=1,p=arguments.length;d<p;d++){u=arguments[d];for(var f in u)Object.prototype.hasOwnProperty.call(u,f)&&(h[f]=u[f])}return h},e.apply(this,arguments)};Object.defineProperty(dl,"__esModule",{value:!0});var t=el(),r=sc(),i=hr();function a(h){return function(d){d===void 0&&(d={});var p=h.getMonitor(),f=h.getRegistry();s(p);var m=c(p);m.forEach(function(g,x){var v=o(g,x,f,p),b={type:t.DROP,payload:{dropResult:e({},d,v)}};h.dispatch(b)})}}dl.default=a;function s(h){i(h.isDragging(),"Cannot call drop while not dragging."),i(!h.didDrop(),"Cannot call drop twice during one drag operation.")}function o(h,u,d,p){var f=d.getTarget(h),m=f?f.drop(p,h):void 0;return l(m),typeof m>"u"&&(m=u===0?{}:p.getDropResult()),m}function l(h){i(typeof h>"u"||r.isObject(h),"Drop result must either be an object or undefined.")}function c(h){var u=h.getTargetIds().filter(h.canDropOnTarget,h);return u.reverse(),u}return dl}var bh={},KT;function Rve(){if(KT)return bh;KT=1,Object.defineProperty(bh,"__esModule",{value:!0});var e=el(),t=hr();function r(a){return function(){var o=a.getMonitor(),l=a.getRegistry();i(o);var c=o.getSourceId(),h=l.getSource(c,!0);return h.endDrag(o,c),l.unpinSource(),{type:e.END_DRAG}}}bh.default=r;function i(a){t(a.isDragging(),"Cannot call endDrag while not dragging.")}return bh}var XT;function tm(){return XT||(XT=1,(function(e){function t(c){for(var h in c)e.hasOwnProperty(h)||(e[h]=c[h])}
34Object.defineProperty(e,"__esModule",{value:!0});var r=kve(),i=Pve(),a=Ive(),s=Dve(),o=Rve();t(el());function l(c){return{beginDrag:r.default(c),publishDragSource:i.default(c),hover:a.default(c),drop:s.default(c),endDrag:o.default(c)}}e.default=l})(_y)),_y}var Ny={},QT;function FM(){return QT||(QT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.strictEquality=function(i,a){return i===a};function t(i,a){return!i&&!a?!0:!i||!a?!1:i.x===a.x&&i.y===a.y}e.areCoordsEqual=t;function r(i,a,s){if(s===void 0&&(s=e.strictEquality),i.length!==a.length)return!1;for(var o=0;o<i.length;++o)if(!s(i[o],a[o]))return!1;return!0}e.areArraysEqual=r})(Ny)),Ny}var ZT;function Ove(){if(ZT)return cl;ZT=1;var e=cl&&cl.__assign||function(){return e=Object.assign||function(s){for(var o,l=1,c=arguments.length;l<c;l++){o=arguments[l];for(var h in o)Object.prototype.hasOwnProperty.call(o,h)&&(s[h]=o[h])}return s},e.apply(this,arguments)};Object.defineProperty(cl,"__esModule",{value:!0});var t=tm(),r=FM(),i={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function a(s,o){s===void 0&&(s=i);var l=o.payload;switch(o.type){case t.INIT_COORDS:case t.BEGIN_DRAG:return{initialSourceClientOffset:l.sourceClientOffset,initialClientOffset:l.clientOffset,clientOffset:l.clientOffset};case t.HOVER:return r.areCoordsEqual(s.clientOffset,l.clientOffset)?s:e({},s,{clientOffset:l.clientOffset});case t.END_DRAG:case t.DROP:return i;default:return s}}return cl.default=a,cl}var ul={},Ey={},JT;function nm(){return JT||(JT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ADD_SOURCE="dnd-core/ADD_SOURCE",e.ADD_TARGET="dnd-core/ADD_TARGET",e.REMOVE_SOURCE="dnd-core/REMOVE_SOURCE",e.REMOVE_TARGET="dnd-core/REMOVE_TARGET";function t(s){return{type:e.ADD_SOURCE,payload:{sourceId:s}}}e.addSource=t;function r(s){return{type:e.ADD_TARGET,payload:{targetId:s}}}e.addTarget=r;function i(s){return{type:e.REMOVE_SOURCE,payload:{sourceId:s}}}e.removeSource=i;function a(s){return{type:e.REMOVE_TARGET,payload:{targetId:s}}}e.removeTarget=a})(Ey)),Ey}var ek;function Ave(){if(ek)return ul;ek=1;var e=ul&&ul.__assign||function(){return e=Object.assign||function(o){for(var l,c=1,h=arguments.length;c<h;c++){l=arguments[c];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(o[u]=l[u])}return o},e.apply(this,arguments)};Object.defineProperty(ul,"__esModule",{value:!0});var t=tm(),r=nm(),i=sc(),a={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function s(o,l){o===void 0&&(o=a);var c=l.payload;switch(l.type){case t.BEGIN_DRAG:return e({},o,{itemType:c.itemType,item:c.item,sourceId:c.sourceId,isSourcePublic:c.isSourcePublic,dropResult:null,didDrop:!1});case t.PUBLISH_DRAG_SOURCE:return e({},o,{isSourcePublic:!0});case t.HOVER:return e({},o,{targetIds:c.targetIds});case r.REMOVE_TARGET:return o.targetIds.indexOf(c.targetId)===-1?o:e({},o,{targetIds:i.without(o.targetIds,c.targetId)});case t.DROP:return e({},o,{dropResult:c.dropResult,didDrop:!0,targetIds:[]});case t.END_DRAG:return e({},o,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return o}}return ul.default=s,ul}var yh={},tk;function Mve(){if(tk)return yh;tk=1,Object.defineProperty(yh,"__esModule",{value:!0});var e=nm();function t(r,i){switch(r===void 0&&(r=0),i.type){case e.ADD_SOURCE:case e.ADD_TARGET:return r+1;case e.REMOVE_SOURCE:case e.REMOVE_TARGET:return r-1;default:return r}}return yh.default=t,yh}var xh={},Ty={},nk;function UM(){return nk||(nk=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=sc();e.NONE=[],e.ALL=[],e.NONE.__IS_NONE__=!0,e.ALL.__IS_ALL__=!0;function r(i,a){if(i===e.NONE)return!1;if(i===e.ALL||typeof a>"u")return!0;var s=t.intersection(a,i);return s.length>0}e.areDirty=r})(Ty)),Ty}var rk;function $ve(){if(rk)return xh;rk=1,Object.defineProperty(xh,"__esModule",{value:!0});var e=tm(),t=nm(),r=FM(),i=UM(),a=sc();function s(o,l){switch(o===void 0&&(o=i.NONE),l.type){case e.HOVER:break;case t.ADD_SOURCE:case t.ADD_TARGET:case t.REMOVE_TARGET:case t.REMOVE_SOURCE:return i.NONE;case e.BEGIN_DRAG:case e.PUBLISH_DRAG_SOURCE:case e.END_DRAG:case e.DROP:default:return i.ALL}var c=l.payload,h=c.targetIds,u=h===void 0?[]:h,d=c.prevTargetIds,p=d===void 0?[]:d,f=a.xor(u,p),m=f.length>0||!r.areArraysEqual(u,p);if(!m)return i.NONE;var g=p[p.length-1],x=u[u.length-1];return g!==x&&(g&&f.push(g),x&&f.push(x)),f}return xh.default=s,xh}var jh={},ik;function Lve(){if(ik)return jh;ik=1,Object.defineProperty(jh,"__esModule",{value:!0});function e(t){return t===void 0&&(t=0),t+1}return jh.default=e,jh}var ak;function Fve(){if(ak)return ll;ak=1;var e=ll&&ll.__assign||function(){return e=Object.assign||function(c){for(var h,u=1,d=arguments.length;u<d;u++){h=arguments[u];for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(c[p]=h[p])}return c},e.apply(this,arguments)};
34Object.defineProperty(ll,"__esModule",{value:!0});var t=Ove(),r=Ave(),i=Mve(),a=$ve(),s=Lve(),o=sc();function l(c,h){return c===void 0&&(c={}),{dirtyHandlerIds:a.default(c.dirtyHandlerIds,{type:h.type,payload:e({},h.payload,{prevTargetIds:o.get(c,"dragOperation.targetIds",[])})}),dragOffset:t.default(c.dragOffset,h),refCount:i.default(c.refCount,h),dragOperation:r.default(c.dragOperation,h),stateId:s.default(c.stateId)}}return ll.default=l,ll}var wh={},ho={},sk;function Uve(){if(sk)return ho;sk=1,Object.defineProperty(ho,"__esModule",{value:!0});function e(a,s){return{x:a.x+s.x,y:a.y+s.y}}ho.add=e;function t(a,s){return{x:a.x-s.x,y:a.y-s.y}}ho.subtract=t;function r(a){var s=a.clientOffset,o=a.initialClientOffset,l=a.initialSourceClientOffset;return!s||!o||!l?null:t(e(s,l),o)}ho.getSourceClientOffset=r;function i(a){var s=a.clientOffset,o=a.initialClientOffset;return!s||!o?null:t(s,o)}return ho.getDifferenceFromInitialOffset=i,ho}var ok;function Bve(){if(ok)return wh;ok=1,Object.defineProperty(wh,"__esModule",{value:!0});var e=LM(),t=Uve(),r=UM(),i=hr(),a=(function(){function s(o,l){this.store=o,this.registry=l}return s.prototype.subscribeToStateChange=function(o,l){var c=this;l===void 0&&(l={handlerIds:void 0});var h=l.handlerIds;i(typeof o=="function","listener must be a function."),i(typeof h>"u"||Array.isArray(h),"handlerIds, when specified, must be an array of strings.");var u=this.store.getState().stateId,d=function(){var p=c.store.getState(),f=p.stateId;try{var m=f===u||f===u+1&&!r.areDirty(p.dirtyHandlerIds,h);m||o()}finally{u=f}};return this.store.subscribe(d)},s.prototype.subscribeToOffsetChange=function(o){var l=this;i(typeof o=="function","listener must be a function.");var c=this.store.getState().dragOffset,h=function(){var u=l.store.getState().dragOffset;u!==c&&(c=u,o())};return this.store.subscribe(h)},s.prototype.canDragSource=function(o){if(!o)return!1;var l=this.registry.getSource(o);return i(l,"Expected to find a valid source."),this.isDragging()?!1:l.canDrag(this,o)},s.prototype.canDropOnTarget=function(o){if(!o)return!1;var l=this.registry.getTarget(o);if(i(l,"Expected to find a valid target."),!this.isDragging()||this.didDrop())return!1;var c=this.registry.getTargetType(o),h=this.getItemType();return e.default(c,h)&&l.canDrop(this,o)},s.prototype.isDragging=function(){return!!this.getItemType()},s.prototype.isDraggingSource=function(o){if(!o)return!1;var l=this.registry.getSource(o,!0);if(i(l,"Expected to find a valid source."),!this.isDragging()||!this.isSourcePublic())return!1;var c=this.registry.getSourceType(o),h=this.getItemType();return c!==h?!1:l.isDragging(this,o)},s.prototype.isOverTarget=function(o,l){if(l===void 0&&(l={shallow:!1}),!o)return!1;var c=l.shallow;if(!this.isDragging())return!1;var h=this.registry.getTargetType(o),u=this.getItemType();if(u&&!e.default(h,u))return!1;var d=this.getTargetIds();if(!d.length)return!1;var p=d.indexOf(o);return c?p===d.length-1:p>-1},s.prototype.getItemType=function(){return this.store.getState().dragOperation.itemType},s.prototype.getItem=function(){return this.store.getState().dragOperation.item},s.prototype.getSourceId=function(){return this.store.getState().dragOperation.sourceId},s.prototype.getTargetIds=function(){return this.store.getState().dragOperation.targetIds},s.prototype.getDropResult=function(){return this.store.getState().dragOperation.dropResult},s.prototype.didDrop=function(){return this.store.getState().dragOperation.didDrop},s.prototype.isSourcePublic=function(){return this.store.getState().dragOperation.isSourcePublic},s.prototype.getInitialClientOffset=function(){return this.store.getState().dragOffset.initialClientOffset},s.prototype.getInitialSourceClientOffset=function(){return this.store.getState().dragOffset.initialSourceClientOffset},s.prototype.getClientOffset=function(){return this.store.getState().dragOffset.clientOffset},s.prototype.getSourceClientOffset=function(){return t.getSourceClientOffset(this.store.getState().dragOffset)},s.prototype.getDifferenceFromInitialOffset=function(){return t.getDifferenceFromInitialOffset(this.store.getState().dragOffset)},s})();return wh.default=a,wh}var Sh={},_h={},lk;function qve(){if(lk)return _h;lk=1,Object.defineProperty(_h,"__esModule",{value:!0});var e=0;function t(){return e++}return _h.default=t,_h}var hl={},ck;function Vve(){if(ck)return hl;
34ck=1,Object.defineProperty(hl,"__esModule",{value:!0});var e=hr();function t(a){e(typeof a.canDrag=="function","Expected canDrag to be a function."),e(typeof a.beginDrag=="function","Expected beginDrag to be a function."),e(typeof a.endDrag=="function","Expected endDrag to be a function.")}hl.validateSourceContract=t;function r(a){e(typeof a.canDrop=="function","Expected canDrop to be a function."),e(typeof a.hover=="function","Expected hover to be a function."),e(typeof a.drop=="function","Expected beginDrag to be a function.")}hl.validateTargetContract=r;function i(a,s){if(s&&Array.isArray(a)){a.forEach(function(o){return i(o,!1)});return}e(typeof a=="string"||typeof a=="symbol",s?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}return hl.validateType=i,hl}var ky,dk;function zve(){if(dk)return ky;dk=1,ky=e;function e(u){t.length||r(),t[t.length]=u}var t=[],r,i=0,a=1024;function s(){for(;i<t.length;){var u=i;if(i=i+1,t[u].call(),i>a){for(var d=0,p=t.length-i;d<p;d++)t[d]=t[d+i];t.length-=i,i=0}}t.length=0,i=0}var o=typeof Lr<"u"?Lr:self,l=o.MutationObserver||o.WebKitMutationObserver;typeof l=="function"?r=c(s):r=h(s),e.requestFlush=r;function c(u){var d=1,p=new l(u),f=document.createTextNode("");return p.observe(f,{characterData:!0}),function(){d=-d,f.data=d}}function h(u){return function(){var p=setTimeout(m,0),f=setInterval(m,50);function m(){clearTimeout(p),clearInterval(f),u()}}}return e.makeRequestCallFromTimer=h,ky}var Py,uk;function Hve(){if(uk)return Py;uk=1;var e=zve(),t=[],r=[],i=e.makeRequestCallFromTimer(a);function a(){if(r.length)throw r.shift()}Py=s;function s(l){var c;t.length?c=t.pop():c=new o,c.task=l,e(c)}function o(){this.task=null}return o.prototype.call=function(){try{this.task.call()}catch(l){s.onerror?s.onerror(l):(r.push(l),i())}finally{this.task=null,t[t.length]=this}},Py}var hk;function Gve(){if(hk)return Sh;hk=1,Object.defineProperty(Sh,"__esModule",{value:!0});var e=nm(),t=qve(),r=$M(),i=Vve(),a=hr(),s=Hve();function o(u){var d=t.default().toString();switch(u){case r.HandlerRole.SOURCE:return"S"+d;case r.HandlerRole.TARGET:return"T"+d;default:throw new Error("Unknown Handler Role: "+u)}}function l(u){switch(u[0]){case"S":return r.HandlerRole.SOURCE;case"T":return r.HandlerRole.TARGET;default:a(!1,"Cannot parse handler ID: "+u)}}function c(u,d){var p=u.entries(),f=!1;do{var m=p.next(),g=m.done,x=m.value,v=x[1];if(v===d)return!0;f=g}while(!f);return!1}var h=(function(){function u(d){this.store=d,this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null}return u.prototype.addSource=function(d,p){i.validateType(d),i.validateSourceContract(p);var f=this.addHandler(r.HandlerRole.SOURCE,d,p);return this.store.dispatch(e.addSource(f)),f}
34,u.prototype.addTarget=function(d,p){i.validateType(d,!0),i.validateTargetContract(p);var f=this.addHandler(r.HandlerRole.TARGET,d,p);return this.store.dispatch(e.addTarget(f)),f},u.prototype.containsHandler=function(d){return c(this.dragSources,d)||c(this.dropTargets,d)},u.prototype.getSource=function(d,p){p===void 0&&(p=!1),a(this.isSourceId(d),"Expected a valid source ID.");var f=p&&d===this.pinnedSourceId,m=f?this.pinnedSource:this.dragSources.get(d);return m},u.prototype.getTarget=function(d){return a(this.isTargetId(d),"Expected a valid target ID."),this.dropTargets.get(d)},u.prototype.getSourceType=function(d){return a(this.isSourceId(d),"Expected a valid source ID."),this.types.get(d)},u.prototype.getTargetType=function(d){return a(this.isTargetId(d),"Expected a valid target ID."),this.types.get(d)},u.prototype.isSourceId=function(d){var p=l(d);return p===r.HandlerRole.SOURCE},u.prototype.isTargetId=function(d){var p=l(d);return p===r.HandlerRole.TARGET},u.prototype.removeSource=function(d){var p=this;a(this.getSource(d),"Expected an existing source."),this.store.dispatch(e.removeSource(d)),s(function(){p.dragSources.delete(d),p.types.delete(d)})},u.prototype.removeTarget=function(d){a(this.getTarget(d),"Expected an existing target."),this.store.dispatch(e.removeTarget(d)),this.dropTargets.delete(d),this.types.delete(d)},u.prototype.pinSource=function(d){var p=this.getSource(d);a(p,"Expected an existing source."),this.pinnedSourceId=d,this.pinnedSource=p},u.prototype.unpinSource=function(){a(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null},u.prototype.addHandler=function(d,p,f){var m=o(d);return this.types.set(m,p),d===r.HandlerRole.SOURCE?this.dragSources.set(m,f):d===r.HandlerRole.TARGET&&this.dropTargets.set(m,f),m},u})();return Sh.default=h,Sh}var pk;function Wve(){if(pk)return hh;pk=1,Object.defineProperty(hh,"__esModule",{value:!0});var e=Eve,t=Fve(),r=tm(),i=Bve(),a=Gve();function s(l){var c=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return e.createStore(t.default,l&&c&&c({name:"dnd-core",instanceId:"dnd-core"}))}var o=(function(){function l(c,h,u){var d=this;h===void 0&&(h={}),u===void 0&&(u=!1),this.context=h,this.isSetUp=!1,this.handleRefCountChange=function(){var f=d.store.getState().refCount>0;f&&!d.isSetUp?(d.backend.setup(),d.isSetUp=!0):!f&&d.isSetUp&&(d.backend.teardown(),d.isSetUp=!1)};var p=s(u);this.store=p,this.monitor=new i.default(p,new a.default(p)),this.backend=c(this),p.subscribe(this.handleRefCountChange)}return l.prototype.getContext=function(){return this.context},l.prototype.getMonitor=function(){return this.monitor},l.prototype.getBackend=function(){return this.backend},l.prototype.getRegistry=function(){return this.monitor.registry},l.prototype.getActions=function(){var c=this,h=this.store.dispatch;function u(p){return function(){for(var f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];var g=p.apply(c,f);typeof g<"u"&&h(g)}}var d=r.default(this);return Object.keys(d).reduce(function(p,f){var m=d[f];return p[f]=u(m),p},{})},l.prototype.dispatch=function(c){this.store.dispatch(c)},l})();return hh.default=o,hh}var fk;function Yve(){if(fk)return uh;fk=1,Object.defineProperty(uh,"__esModule",{value:!0});var e=Wve();function t(r,i,a){return new e.default(r,i,a)}return uh.createDragDropManager=t,uh}var mk;function Kve(){return mk||(mk=1,(function(e){function t(r){for(var i in r)e.hasOwnProperty(i)||(e[i]=r[i])}Object.defineProperty(e,"__esModule",{value:!0}),t($M()),t(Yve())})(wy)),wy}var Ch={},gk;function rm(){if(gk)return Ch;gk=1,Object.defineProperty(Ch,"__esModule",{value:!0});function e(t,r){}return Ch.default=e,Ch}var Lc={},vk;function h0(){if(vk)return Lc;vk=1,Object.defineProperty(Lc,"__esModule",{value:!0});function e(i){return i&&i.prototype&&typeof i.prototype.render=="function"}function t(i){return i&&i.$$typeof&&i.$$typeof.toString()==="Symbol(react.forward_ref)"}Lc.isRefForwardingComponent=t;function r(i){return e(i)||t(i)}return Lc.isRefable=r,Lc}var bk;function im(){return bk||(bk=1,(function(e){var t=ts&&ts.__extends||(function(){var p=function(f,m){return p=Object.
34setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,x){g.__proto__=x}||function(g,x){for(var v in x)x.hasOwnProperty(v)&&(g[v]=x[v])},p(f,m)};return function(f,m){p(f,m);function g(){this.constructor=f}f.prototype=m===null?Object.create(m):(g.prototype=m.prototype,new g)}})(),r=ts&&ts.__assign||function(){return r=Object.assign||function(p){for(var f,m=1,g=arguments.length;m<g;m++){f=arguments[m];for(var x in f)Object.prototype.hasOwnProperty.call(f,x)&&(p[x]=f[x])}return p},r.apply(this,arguments)},i=ts&&ts.__rest||function(p,f){var m={};for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&f.indexOf(g)<0&&(m[g]=p[g]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function")for(var x=0,g=Object.getOwnPropertySymbols(p);x<g.length;x++)f.indexOf(g[x])<0&&Object.prototype.propertyIsEnumerable.call(p,g[x])&&(m[g[x]]=p[g[x]]);return m};Object.defineProperty(e,"__esModule",{value:!0});var a=Rt(),s=Kve(),o=rm(),l=h0(),c=hr(),h=_j();e.context=a.createContext({dragDropManager:void 0}),e.Consumer=e.context.Consumer,e.Provider=e.context.Provider;function u(p,f,m){return{dragDropManager:s.createDragDropManager(p,f,m)}}e.createChildContext=u,e.DragDropContextProvider=function(p){var f=p.children,m=i(p,["children"]),g="manager"in m?{dragDropManager:m.manager}:u(m.backend,m.context,m.debugMode);return a.createElement(e.Provider,{value:g},f)};function d(p,f,m){o.default("DragDropContext","backend",p);var g=u(p,f,m);
34return function(v){var b=v,j=b.displayName||b.name||"Component",w=(function(S){t(_,S);function _(){var C=S!==null&&S.apply(this,arguments)||this;return C.ref=a.createRef(),C.getManager=function(){return g.dragDropManager},C}return _.prototype.getDecoratedComponentInstance=function(){return c(this.ref.current,"In order to access an instance of the decorated component, it must either be a class component or use React.forwardRef()"),this.ref.current},_.prototype.render=function(){return a.createElement(e.Provider,{value:g},a.createElement(b,r({},this.props,{ref:l.isRefable(b)?this.ref:null})))},_.DecoratedComponent=v,_.displayName="DragDropContext("+j+")",_})(a.Component);return h(w,v)}}e.DragDropContext=d})(ts)),ts}var Es={},pl={},yk;function tl(){if(yk)return pl;yk=1,Object.defineProperty(pl,"__esModule",{value:!0});function e(a){return typeof a=="function"}pl.isFunction=e;function t(){}pl.noop=t;function r(a){return typeof a=="object"&&a!==null}function i(a){if(!r(a))return!1;if(Object.getPrototypeOf(a)===null)return!0;for(var s=a;Object.getPrototypeOf(s)!==null;)s=Object.getPrototypeOf(s);return Object.getPrototypeOf(a)===s}return pl.isPlainObject=i,pl}var Iy,xk;function Eu(){return xk||(xk=1,Iy=function(t,r,i,a){var s=i?i.call(a,t,r):void 0;if(s!==void 0)return!!s;if(t===r)return!0;if(typeof t!="object"||!t||typeof r!="object"||!r)return!1;var o=Object.keys(t),l=Object.keys(r);if(o.length!==l.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(r),h=0;h<o.length;h++){var u=o[h];if(!c(u))return!1;var d=t[u],p=r[u];if(s=i?i.call(a,d,p,u):void 0,s===!1||s===void 0&&d!==p)return!1}return!0}),Iy}var jk;function Xve(){if(jk)return Es;jk=1;var e=Es&&Es.__extends||(function(){var d=function(p,f){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,g){m.__proto__=g}||function(m,g){for(var x in g)g.hasOwnProperty(x)&&(m[x]=g[x])},d(p,f)};return function(p,f){d(p,f);function m(){this.constructor=p}p.prototype=f===null?Object.create(f):(m.prototype=f.prototype,new m)}})(),t=Es&&Es.__assign||function(){return t=Object.assign||function(d){for(var p,f=1,m=arguments.length;f<m;f++){p=arguments[f];for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(d[g]=p[g])}return d},t.apply(this,arguments)};Object.defineProperty(Es,"__esModule",{value:!0});var r=Rt(),i=rm(),a=im(),s=h0(),o=tl(),l=_j(),c=hr(),h=Eu();function u(d,p){return p===void 0&&(p={}),i.default("DragLayer","collect[, options]",d,p),c(typeof d=="function",'Expected "collect" provided as the first argument to DragLayer to be a function that collects props to inject into the component. ',"Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-layer",d),c(o.isPlainObject(p),'Expected "options" provided as the second argument to DragLayer to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-layer',p),function(m){var g=m,x=p.arePropsEqual,v=x===void 0?h:x,b=g.displayName||g.name||"Component",j=(function(w){e(S,w);function S(){var _=w!==null&&w.apply(this,arguments)||this;return _.isCurrentlyMounted=!1,_.ref=r.createRef(),_.handleChange=function(){if(_.isCurrentlyMounted){var C=_.getCurrentState();h(C,_.state)||_.setState(C)}},_}return S.prototype.getDecoratedComponentInstance=function(){return c(this.ref.current,"In order to access an instance of the decorated component, it must either be a class component or use React.forwardRef()"),this.ref.current},S.prototype.shouldComponentUpdate=function(_,C){return!v(_,this.props)||!h(C,this.state)},S.prototype.componentDidMount=function(){this.isCurrentlyMounted=!0,this.handleChange()},S.prototype.componentWillUnmount=function(){this.isCurrentlyMounted=!1,this.unsubscribeFromOffsetChange&&(this.unsubscribeFromOffsetChange(),this.unsubscribeFromOffsetChange=void 0),this.unsubscribeFromStateChange&&(this.unsubscribeFromStateChange(),this.unsubscribeFromStateChange=void 0)},S.prototype.render=function(){var _=this;return r.createElement(a.Consumer,null,function(C){var E=C.dragDropManager;return E===void 0||(_.receiveDragDropManager(E),!_.isCurrentlyMounted)?null:r.createElement(g,t({},_.props,_.state,{ref:s.isRefable(g)?_.ref:null}))})},S.prototype.receiveDragDropManager=function(_){if(this.manager===void 0){this.manager=_,c(typeof _=="object","Could not find the drag and drop manager in the context of %s. Make sure to wrap the top-level component of your app with DragDropContext. Read more: http://react-dnd.github.io/react-dnd/docs/troubleshooting#could-not-find-the-drag-and-drop-manager-in-the-context",b,b);var C=this.manager.getMonitor();this.unsubscribeFromOffsetChange=C.subscribeToOffsetChange(this.handleChange),this.unsubscribeFromStateChange=C.subscribeToStateChange(this.handleChange)}},S.prototype.getCurrentState=function(){if(!this.manager)return{};var _=this.manager.getMonitor();return d(_,this.props)},S.displayName="DragLayer("+b+")",S.DecoratedComponent=m,S})(r.Component);return l(j,m)}}return Es.default=u,Es}var Nh={},Ts={},Dy={},Eh={},wk;function Qve(){if(wk)return Eh;wk=1,Object.defineProperty(Eh,"__esModule",{value:!0});var e=tl(),t=(function(){function r(i){this.isDisposed=!1,this.action=e.isFunction(i)?i:e.noop}return r.isDisposable=function(i){return i&&e.isFunction(i.dispose)},r._fixup=function(i){return r.isDisposable(i)?i:r.empty},r.create=function(i){return new r(i)},r.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)},r.empty={dispose:e.noop},r})();return Eh.Disposable=t,Eh}var Th={},Sk;function Zve(){if(Sk)return Th;Sk=1,Object.defineProperty(Th,"__esModule",{value:!0});var e=(function(){function t(){this.isDisposed=!1}return t.prototype.getDisposable=function(){return this.current},t.prototype.setDisposable=function(r){var i=this.isDisposed;if(!i){var a=this.current;this.current=r,a&&a.dispose()}i&&r&&r.dispose()},t.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var r=this.current;this.current=void 0,r&&r.dispose()}},t})();return Th.SerialDisposable=e,Th}var kh={},_k;function Jve(){if(_k)return kh;_k=1,Object.defineProperty(kh,"__esModule",{value:!0});var e=(function(){function t(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];this.isDisposed=!1,this.disposables=r}
34return t.prototype.add=function(r){this.isDisposed?r.dispose():this.disposables.push(r)},t.prototype.remove=function(r){var i=!1;if(!this.isDisposed){var a=this.disposables.indexOf(r);a!==-1&&(i=!0,this.disposables.splice(a,1),r.dispose())}return i},t.prototype.clear=function(){if(!this.isDisposed){for(var r=this.disposables.length,i=new Array(r),a=0;a<r;a++)i[a]=this.disposables[a];this.disposables=[];for(var a=0;a<r;a++)i[a].dispose()}},t.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var r=this.disposables.length,i=new Array(r),a=0;a<r;a++)i[a]=this.disposables[a];this.disposables=[];for(var a=0;a<r;a++)i[a].dispose()}},t})();return kh.CompositeDisposable=e,kh}var Ck;function ebe(){return Ck||(Ck=1,(function(e){function t(r){for(var i in r)e.hasOwnProperty(i)||(e[i]=r[i])}Object.defineProperty(e,"__esModule",{value:!0}),t(Qve()),t(Zve()),t(Jve())})(Dy)),Dy}var Nk;function BM(){if(Nk)return Ts;Nk=1;var e=Ts&&Ts.__extends||(function(){var u=function(d,p){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,m){f.__proto__=m}||function(f,m){for(var g in m)m.hasOwnProperty(g)&&(f[g]=m[g])},u(d,p)};return function(d,p){u(d,p);function f(){this.constructor=d}d.prototype=p===null?Object.create(p):(f.prototype=p.prototype,new f)}})(),t=Ts&&Ts.__assign||function(){return t=Object.assign||function(u){for(var d,p=1,f=arguments.length;p<f;p++){d=arguments[p];for(var m in d)Object.prototype.hasOwnProperty.call(d,m)&&(u[m]=d[m])}return u},t.apply(this,arguments)};Object.defineProperty(Ts,"__esModule",{value:!0});var r=Rt(),i=im(),a=ebe(),s=h0();tl();var o=hr(),l=_j(),c=Eu();function h(u){var d=u.DecoratedComponent,p=u.createHandler,f=u.createMonitor,m=u.createConnector,g=u.registerHandler,x=u.containerDisplayName,v=u.getType,b=u.collect,j=u.options,w=j.arePropsEqual,S=w===void 0?c:w,_=d,C=d.displayName||d.name||"Component",E=(function(P){e(T,P);function T(N){var k=P.call(this,N)||this;return k.decoratedRef=r.createRef(),k.handleChange=function(){var I=k.getCurrentState();c(I,k.state)||k.setState(I)},k.disposable=new a.SerialDisposable,k.receiveProps(N),k.dispose(),k}return T.prototype.getHandlerId=function(){return this.handlerId},T.prototype.getDecoratedComponentInstance=function(){return o(this.decoratedRef.current,"In order to access an instance of the decorated component, it must either be a class component or use React.forwardRef()"),this.decoratedRef.current},T.prototype.shouldComponentUpdate=function(N,k){return!S(N,this.props)||!c(k,this.state)},T.prototype.componentDidMount=function(){this.disposable=new a.SerialDisposable,this.currentType=void 0,this.receiveProps(this.props),this.handleChange()},T.prototype.componentDidUpdate=function(N){S(this.props,N)||(this.receiveProps(this.props),this.handleChange())},T.prototype.componentWillUnmount=function(){this.dispose()},T.prototype.receiveProps=function(N){this.handler&&(this.handler.receiveProps(N),this.receiveType(v(N)))},T.prototype.receiveType=function(N){if(!(!this.handlerMonitor||!this.manager||!this.handlerConnector)&&N!==this.currentType){this.currentType=N;var k=g(N,this.handler,this.manager),I=k[0],D=k[1];this.handlerId=I,this.handlerMonitor.receiveHandlerId(I),this.handlerConnector.receiveHandlerId(I);var O=this.manager.getMonitor(),$=O.subscribeToStateChange(this.handleChange,{handlerIds:[I]});this.disposable.setDisposable(new a.CompositeDisposable(new a.Disposable($),new a.Disposable(D)))}},T.prototype.dispose=function(){this.disposable.dispose(),this.handlerConnector&&this.handlerConnector.receiveHandlerId(null)},T.prototype.getCurrentState=function(){if(!this.handlerConnector)return{};var N=b(this.handlerConnector.hooks,this.handlerMonitor,this.props);return N},T.prototype.render=function(){var N=this;return r.createElement(i.Consumer,null,function(k){var I=k.dragDropManager;return N.receiveDragDropManager(I),typeof requestAnimationFrame<"u"&&requestAnimationFrame(function(){return N.handlerConnector.reconnect()}),r.createElement(_,t({},N.props,N.getCurrentState(),{ref:s.isRefable(_)?N.decoratedRef:null}))})},T.prototype.receiveDragDropManager=function(N){this.manager===void 0&&(o(N!==void 0,"Could not find the drag and drop manager in the context of %s. Make sure to wrap the top-level component of your app with DragDropContext. Read more: http://react-dnd.github.io/react-dnd/docs/troubleshooting#could-not-find-the-drag-and-drop-manager-in-the-context",C,C),N!==void 0&&(this.manager=N,this.handlerMonitor=f(N),this.handlerConnector=m(N.getBackend()),this.handler=p(this.handlerMonitor,this.decoratedRef)))},T.DecoratedComponent=d,T.displayName=x+"("+C+")",T})(r.Component);return l(E,d)}return Ts.default=h,Ts}var Ph={},Ek;function qM(){if(Ek)return Ph;Ek=1,Object.defineProperty(Ph,"__esModule",{value:!0});function e(t,r,i){var a=i.getRegistry(),s=a.addSource(t,r);return[s,function(){return a.removeSource(s)}]}return Ph.default=e,Ph}var Ih={},Dh={},Tk;
34function VM(){if(Tk)return Dh;Tk=1,Object.defineProperty(Dh,"__esModule",{value:!0});function e(t){var r=t.current;return r==null?null:r.decoratedRef?r.decoratedRef.current:r}return Dh.getDecoratedComponent=e,Dh}var kk;function tbe(){if(kk)return Ih;kk=1,Object.defineProperty(Ih,"__esModule",{value:!0});var e=VM();tl();var t=hr(),r=["canDrag","beginDrag","isDragging","endDrag"],i=["beginDrag"],a=(function(){function o(l,c,h){var u=this;this.spec=l,this.monitor=c,this.ref=h,this.props=null,this.beginDrag=function(){if(u.props){var d=u.spec.beginDrag(u.props,u.monitor,u.ref.current);return d}}}return o.prototype.receiveProps=function(l){this.props=l},o.prototype.canDrag=function(){return this.props?this.spec.canDrag?this.spec.canDrag(this.props,this.monitor):!0:!1},o.prototype.isDragging=function(l,c){return this.props?this.spec.isDragging?this.spec.isDragging(this.props,this.monitor):c===l.getSourceId():!1},o.prototype.endDrag=function(){this.props&&this.spec.endDrag&&this.spec.endDrag(this.props,this.monitor,e.getDecoratedComponent(this.ref))},o})();function s(o){return Object.keys(o).forEach(function(l){t(r.indexOf(l)>-1,'Expected the drag source specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',r.join(", "),l),t(typeof o[l]=="function","Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source",l,l,o[l])}
34),i.forEach(function(l){t(typeof o[l]=="function","Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source",l,l,o[l])}),function(c,h){return new a(o,c,h)}}return Ih.default=s,Ih}var Rh={},Pk;function zM(){if(Pk)return Rh;Pk=1,Object.defineProperty(Rh,"__esModule",{value:!0});var e=hr(),t=!1,r=!1,i=(function(){function a(s){this.sourceId=null,this.internalMonitor=s.getMonitor()}return a.prototype.receiveHandlerId=function(s){this.sourceId=s},a.prototype.getHandlerId=function(){return this.sourceId},a.prototype.canDrag=function(){e(!t,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return t=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{t=!1}},a.prototype.isDragging=function(){if(!this.sourceId)return!1;e(!r,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return r=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{r=!1}},a.prototype.subscribeToStateChange=function(s,o){return this.internalMonitor.subscribeToStateChange(s,o)},a.prototype.isDraggingSource=function(s){return this.internalMonitor.isDraggingSource(s)},a.prototype.isOverTarget=function(s,o){return this.internalMonitor.isOverTarget(s,o)},a.prototype.getTargetIds=function(){return this.internalMonitor.getTargetIds()},a.prototype.isSourcePublic=function(){return this.internalMonitor.isSourcePublic()},a.prototype.getSourceId=function(){return this.internalMonitor.getSourceId()},a.prototype.subscribeToOffsetChange=function(s){return this.internalMonitor.subscribeToOffsetChange(s)},a.prototype.canDragSource=function(s){return this.internalMonitor.canDragSource(s)},a.prototype.canDropOnTarget=function(s){return this.internalMonitor.canDropOnTarget(s)},a.prototype.getItemType=function(){return this.internalMonitor.getItemType()},a.prototype.getItem=function(){return this.internalMonitor.getItem()},a.prototype.getDropResult=function(){return this.internalMonitor.getDropResult()},a.prototype.didDrop=function(){return this.internalMonitor.didDrop()},a.prototype.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},a.prototype.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},a.prototype.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},a.prototype.getClientOffset=function(){return this.internalMonitor.getClientOffset()},a.prototype.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},a})();return Rh.default=i,Rh}var Oh={},Ah={},Mh={},Ik;function nbe(){if(Ik)return Mh;Ik=1,Object.defineProperty(Mh,"__esModule",{value:!0});var e=Rt(),t=hr();function r(a,s){typeof a=="function"?a(s):a.current=s}function i(a,s){var o=a.ref;return t(typeof o!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute"),o?e.cloneElement(a,{ref:function(l){r(s,l),o&&r(o,l)}}):e.cloneElement(a,{ref:s})}return Mh.default=i,Mh}var Dk={},Rk;function rbe(){return Rk||(Rk=1,String.prototype.endsWith||(String.prototype.endsWith=function(e,t){return(t===void 0||t>this.length)&&(t=this.length),this.substring(t-e.length,t)===e})),Dk}var Ok;function HM(){if(Ok)return Ah;Ok=1,Object.defineProperty(Ah,"__esModule",{value:!0});var e=Rt(),t=nbe();rbe();function r(s){if(typeof s.type!="string"){var o=s.type.displayName||s.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+("You can either wrap "+o+" into a <div>, or turn it into a ")+"drag source or a drop target itself.")}}function i(s){return function(o,l){if(o===void 0&&(o=null),l===void 0&&(l=null),!e.isValidElement(o)){var c=o;
34return s(c,l),c}var h=o;r(h);var u=l?function(d){return s(d,l)}:s;return t.default(h,u)}}function a(s){var o={};return Object.keys(s).forEach(function(l){var c=s[l];if(l.endsWith("Ref"))o[l]=s[l];else{var h=i(c);o[l]=function(){return h}}}),o}return Ah.default=a,Ah}var $h={},Ak;function GM(){if(Ak)return $h;Ak=1,Object.defineProperty($h,"__esModule",{value:!0});function e(t){return t!==null&&typeof t=="object"&&t.hasOwnProperty("current")}return $h.isRef=e,$h}var Mk;function WM(){if(Mk)return Oh;Mk=1,Object.defineProperty(Oh,"__esModule",{value:!0});var e=HM(),t=GM(),r=Eu(),i=(function(){function a(s){var o=this;this.backend=s,this.hooks=e.default({dragSource:function(l,c){o.dragSourceOptions=c||null,t.isRef(l)?o.dragSourceRef=l:o.dragSourceNode=l,o.reconnectDragSource()},dragPreview:function(l,c){o.dragPreviewOptions=c||null,t.isRef(l)?o.dragPreviewRef=l:o.dragPreviewNode=l,o.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null}return a.prototype.receiveHandlerId=function(s){this.handlerId!==s&&(this.handlerId=s,this.reconnect())},Object.defineProperty(a.prototype,"connectTarget",{get:function(){return this.dragSource},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"dragSourceOptions",{get:function(){return this.dragSourceOptionsInternal},set:function(s){this.dragSourceOptionsInternal=s},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"dragPreviewOptions",{get:function(){return this.dragPreviewOptionsInternal},set:function(s){this.dragPreviewOptionsInternal=s},enumerable:!0,configurable:!0}),a.prototype.reconnect=function(){this.reconnectDragSource(),this.reconnectDragPreview()},a.prototype.reconnectDragSource=function(){var s=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();s&&this.disconnectDragSource();var o=this.dragSource;if(this.handlerId){if(!o){this.lastConnectedDragSource=o;return}s&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=o,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,o,this.dragSourceOptions))}},a.prototype.reconnectDragPreview=function(){var s=this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();s&&this.disconnectDragPreview();var o=this.dragPreview;!this.handlerId||!o||s&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=o,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,o,this.dragPreviewOptions))},a.prototype.didHandlerIdChange=function(){return this.lastConnectedHandlerId!==this.handlerId},a.prototype.didConnectedDragSourceChange=function(){return this.lastConnectedDragSource!==this.dragSource},a.prototype.didConnectedDragPreviewChange=function(){return this.lastConnectedDragPreview!==this.dragPreview},a.prototype.didDragSourceOptionsChange=function(){return!r(this.lastConnectedDragSourceOptions,this.dragSourceOptions)},a.prototype.didDragPreviewOptionsChange=function(){return!r(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)},a.prototype.disconnectDragSource=function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)},a.prototype.disconnectDragPreview=function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)},Object.defineProperty(a.prototype,"dragSource",{get:function(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"dragPreview",{get:function(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current},enumerable:!0,configurable:!0}),a})();return Oh.default=i,Oh}var Lh={},$k;function YM(){if($k)return Lh;$k=1,Object.defineProperty(Lh,"__esModule",{value:!0});function e(t,r){return typeof t=="string"||typeof t=="symbol"||!!r&&Array.isArray(t)&&t.every(function(i){return e(i,!1)})}return Lh.default=e,Lh}var Lk;function ibe(){if(Lk)return Nh;Lk=1,Object.defineProperty(Nh,"__esModule",{value:!0});var e=rm(),t=BM(),r=qM(),i=tbe(),a=zM(),s=WM(),o=YM(),l=tl(),c=hr();function h(u,d,p,f){f===void 0&&(f={}),e.default("DragSource","type, spec, collect[, options]",u,d,p,f);var m=u;typeof u!="function"&&(c(o.default(u),'Expected "type" provided as the first argument to DragSource to be a string, or a function that returns a string given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',u),m=function(){return u}),c(l.isPlainObject(d),'Expected "spec" provided as the second argument to DragSource to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',d);var g=i.default(d);return c(typeof p=="function",'Expected "collect" provided as the third argument to DragSource to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',p),c(l.isPlainObject(f),'Expected "options" provided as the fourth argument to DragSource to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',p),function(v){return t.default({containerDisplayName:"DragSource",createHandler:g,registerHandler:r.default,createConnector:function(b){return new s.default(b)},createMonitor:function(b){return new a.default(b)},DecoratedComponent:v,getType:m,collect:p,options:f})}}return Nh.default=h,Nh}var Fh={},Uh={},Fk;function KM(){if(Fk)return Uh;Fk=1,Object.defineProperty(Uh,"__esModule",{value:!0});function e(t,r,i){var a=i.getRegistry(),s=a.addTarget(t,r);return[s,function(){return a.removeTarget(s)}]}return Uh.default=e,Uh}var Bh={},Uk;function abe(){if(Uk)return Bh;Uk=1,Object.defineProperty(Bh,"__esModule",{value:!0});var e=VM();tl();var t=hr(),r=["canDrop","hover","drop"],i=(function(){function s(o,l,c){this.spec=o,this.monitor=l,this.ref=c,this.props=null}return s.prototype.receiveProps=function(o){this.props=o},s.prototype.receiveMonitor=function(o){this.monitor=o},s.prototype.canDrop=function(){return this.spec.canDrop?this.spec.canDrop(this.props,this.monitor):!0},s.prototype.hover=function(){this.spec.hover&&this.spec.hover(this.props,this.monitor,e.getDecoratedComponent(this.ref))},s.prototype.drop=function(){if(this.spec.drop){var o=this.spec.drop(this.props,this.monitor,this.ref.current);return o}},s})();
34function a(s){return Object.keys(s).forEach(function(o){t(r.indexOf(o)>-1,'Expected the drop target specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',r.join(", "),o),t(typeof s[o]=="function","Expected %s in the drop target specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target",o,o,s[o])}),function(l,c){return new i(s,l,c)}}return Bh.default=a,Bh}var qh={},Bk;function XM(){if(Bk)return qh;Bk=1,Object.defineProperty(qh,"__esModule",{value:!0});var e=hr(),t=!1,r=(function(){function i(a){this.targetId=null,this.internalMonitor=a.getMonitor()}return i.prototype.receiveHandlerId=function(a){this.targetId=a},i.prototype.getHandlerId=function(){return this.targetId},i.prototype.subscribeToStateChange=function(a,s){return this.internalMonitor.subscribeToStateChange(a,s)},i.prototype.canDrop=function(){if(!this.targetId)return!1;e(!t,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return t=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{t=!1}},i.prototype.isOver=function(a){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,a):!1},i.prototype.getItemType=function(){return this.internalMonitor.getItemType()},i.prototype.getItem=function(){return this.internalMonitor.getItem()},i.prototype.getDropResult=function(){return this.internalMonitor.getDropResult()},i.prototype.didDrop=function(){return this.internalMonitor.didDrop()},i.prototype.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},i.prototype.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},i.prototype.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},i.prototype.getClientOffset=function(){return this.internalMonitor.getClientOffset()},i.prototype.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},i})();return qh.default=r,qh}var Vh={},qk;function QM(){if(qk)return Vh;qk=1,Object.defineProperty(Vh,"__esModule",{value:!0});var e=HM(),t=GM(),r=Eu(),i=(function(){function a(s){var o=this;this.backend=s,this.hooks=e.default({dropTarget:function(l,c){o.dropTargetOptions=c,t.isRef(l)?o.dropTargetRef=l:o.dropTargetNode=l,o.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null}return Object.defineProperty(a.prototype,"connectTarget",{get:function(){return this.dropTarget},enumerable:!0,configurable:!0}),a.prototype.reconnect=function(){var s=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();s&&this.disconnectDropTarget();var o=this.dropTarget;if(this.handlerId){if(!o){this.lastConnectedDropTarget=o;return}s&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=o,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,o,this.dropTargetOptions))}},a.prototype.receiveHandlerId=function(s){s!==this.handlerId&&(this.handlerId=s,this.reconnect())},Object.defineProperty(a.prototype,"dropTargetOptions",{get:function(){return this.dropTargetOptionsInternal},set:function(s){this.dropTargetOptionsInternal=s},enumerable:!0,configurable:!0}),a.prototype.didHandlerIdChange=function(){return this.lastConnectedHandlerId!==this.handlerId},a.prototype.didDropTargetChange=function(){return this.lastConnectedDropTarget!==this.dropTarget},a.prototype.didOptionsChange=function(){return!r(this.lastConnectedDropTargetOptions,this.dropTargetOptions)},a.prototype.disconnectDropTarget=function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)},Object.defineProperty(a.prototype,"dropTarget",{get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current},enumerable:!0,configurable:!0}),a})();return Vh.default=i,Vh}var Vk;function sbe(){if(Vk)return Fh;Vk=1,Object.defineProperty(Fh,"__esModule",{value:!0});var e=rm(),t=BM(),r=KM(),i=abe(),a=YM(),s=XM(),o=QM(),l=tl(),c=hr();function h(u,d,p,f){f===void 0&&(f={}),e.default("DropTarget","type, spec, collect[, options]",u,d,p,f);var m=u;typeof u!="function"&&(c(a.default(u,!0),'Expected "type" provided as the first argument to DropTarget to be a string, an array of str
34ings, or a function that returns either given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',u),m=function(){return u}),c(l.isPlainObject(d),'Expected "spec" provided as the second argument to DropTarget to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',d);var g=i.default(d);return c(typeof p=="function",'Expected "collect" provided as the third argument to DropTarget to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',p),c(l.isPlainObject(f),'Expected "options" provided as the fourth argument to DropTarget to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',p),function(v){return t.default({containerDisplayName:"DropTarget",createHandler:g,registerHandler:r.default,createMonitor:function(b){return new s.default(b)},createConnector:function(b){return new o.default(b)},DecoratedComponent:v,getType:m,collect:p,options:f})}}return Fh.default=h,Fh}var zh={},zk;function obe(){if(zk)return zh;zk=1,Object.defineProperty(zh,"__esModule",{value:!0});var e=Rt(),t=e.memo(function(r){var i=r.connect,a=r.src;if(typeof Image<"u"){var s=new Image;s.src=a,s.onload=function(){return i(s)}}return null});return t.displayName="DragPreviewImage",zh.default=t,zh}var Ry={},Hh={},Gh={},Wh={},Hk;function ZM(){if(Hk)return Wh;Hk=1,Object.defineProperty(Wh,"__esModule",{value:!0});var e=Eu(),t=Rt();function r(i,a,s){var o=t.useState(function(){return a(i)}),l=o[0],c=o[1],h=t.useCallback(function(){var u=a(i);e(l,u)||(c(u),s&&s())},[l,i,s]);return[l,h]}return Wh.useCollector=r,Wh}var Gk;function JM(){if(Gk)return Gh;Gk=1,Object.defineProperty(Gh,"__esModule",{value:!0});var e=Rt(),t=ZM();function r(i,a,s){var o=t.useCollector(i,a,s),l=o[0],c=o[1];return e.useEffect(function(){var u=i.getHandlerId();if(u!=null)return i.subscribeToStateChange(c,{handlerIds:[u]})},[i,c]),l}return Gh.useMonitorOutput=r,Gh}var Fc={},Yh={},Wk;function p0(){if(Wk)return Yh;Wk=1,Object.defineProperty(Yh,"__esModule",{value:!0});var e=Rt(),t=im(),r=hr();function i(){var a=e.useContext(t.context).dragDropManager;return r(a!=null,"Expected drag drop context"),a}return Yh.useDragDropManager=i,Yh}var Yk;function lbe(){if(Yk)return Fc;Yk=1,Object.defineProperty(Fc,"__esModule",{value:!0});var e=Rt(),t=qM(),r=p0(),i=zM(),a=WM(),s=hr();function o(){var c=r.useDragDropManager(),h=e.useMemo(function(){return new i.default(c)},[c]),u=e.useMemo(function(){return new a.default(c.getBackend())},[c]);return[h,u]}Fc.useDragSourceMonitor=o;function l(c,h,u){var d=r.useDragDropManager(),p=e.useMemo(function(){return{beginDrag:function(){var f=c.current,m=f.begin,g=f.item;if(m){var x=m(h);return s(x==null||typeof x=="object","dragSpec.begin() must either return an object, undefined, or null"),x||g||{}}return g||{}},canDrag:function(){return typeof c.current.canDrag=="boolean"?c.current.canDrag:typeof c.current.canDrag=="function"?c.current.canDrag(h):!0},isDragging:function(f,m){var g=c.current.isDragging;return g?g(h):m===f.getSourceId()},endDrag:function(){var f=c.current.end;f&&f(h.getItem(),h),u.reconnect()}}},[]);e.useEffect(function(){var m=t.default(c.current.item.type,p,d),g=m[0],x=m[1];return h.receiveHandlerId(g),u.receiveHandlerId(g),x},[])}return Fc.useDragHandler=l,Fc}var Kk;function cbe(){if(Kk)return Hh;Kk=1,Object.defineProperty(Hh,"__esModule",{value:!0});var e=JM(),t=lbe(),r=Rt(),i=hr();function a(s){var o=r.useRef(s);o.current=s,i(s.item!=null,"item must be defined"),i(s.item.type!=null,"item type must be defined");var l=t.useDragSourceMonitor(),c=l[0],h=l[1];t.useDragHandler(o,c,h);var u=e.useMonitorOutput(c,o.current.collect||(function(){return{}}),function(){return h.reconnect()}),d=r.useMemo(function(){return h.hooks.dragSource()},[h]),p=r.useMemo(function(){return h.hooks.dragPreview()},[h]);return r.useEffect(function(){h.dragSourceOptions=o.current.options||null,h.reconnect()},[h]),r.useEffect(function(){h.dragPreviewOptions=o.current.previewOptions||null,h.reconnect()},[h]),[u,d,p]}return Hh.useDrag=a,Hh}var Kh={},Uc={},Xk;function dbe(){if(Xk)return Uc;Xk=1,Object.defineProperty(Uc,"__esModule",{value:!0});var e=Rt(),t=KM(),r=p0(),i=QM(),a=XM();function s(){var l=r.useDragDropManager(),c=e.useMemo(function(){return new a.default(l)},[l]),h=e.useMemo(function(){return new i.default(l.getBackend())},[l]);return[c,h]}Uc.useDropTargetMonitor=s;function o(l,c,h){var u=r.useDragDropManager(),d=e.useMemo(function(){return{canDrop:function(){var p=l.current.canDrop;return p?p(c.getItem(),c):!0},hover:function(){var p=l.current.hover;p&&p(c.getItem(),c)},drop:function(){var p=l.current.drop;if(p)return p(c.getItem(),c)}}},[c]);e.useEffect(function(){var f=t.default(l.current.accept,d,u),m=f[0],g=f[1];return c.receiveHandlerId(m),h.receiveHandlerId(m),g},[c,h])}return Uc.useDropHandler=o,Uc}var Qk;function ube(){if(Qk)return Kh;Qk=1,Object.defineProperty(Kh,"__esModule",{value:!0});var e=JM(),t=dbe(),r=Rt(),i=hr();function a(s){var o=r.useRef(s);o.current=s,i(s.accept!=null,"accept must be defined");var l=t.useDropTargetMonitor(),c=l[0],h=l[1];t.useDropHandler(o,c,h);var u=e.useMonitorOutput(c,o.current.collect||(function(){return{}}),function(){return h.reconnect()}),d=r.useMemo(function(){return h.hooks.dropTarget()},[h]);return r.useEffect(function(){h.dropTargetOptions=s.options||null,h.reconnect()},[s.options]),[u,d]}return Kh.useDrop=a,Kh}var Xh={},Zk;function hbe(){if(Zk)return Xh;Zk=1,Object.defineProperty(Xh,"__esModule",{value:!0});var e=Rt(),t=p0(),r=ZM();function i(a){var s=t.useDragDropManager(),o=s.getMonitor(),l=r.useCollector(o,a),c=l[0],h=l[1];return e.useEffect(function(){return o.subscribeToOffsetChange(h)}),e.useEffect(function(){return o.subscribeToStateChange(h)}),c}return Xh.useDragLayer=i,Xh}var Jk;function pbe(){return Jk||(Jk=1,(function(e){function t(r){for(var i in r)e.hasOwnProperty(i)||(e[i]=r[i])}
34Object.defineProperty(e,"__esModule",{value:!0}),t(cbe()),t(ube()),t(hbe())})(Ry)),Ry}var eP;function fbe(){if(eP)return Li;eP=1,Object.defineProperty(Li,"__esModule",{value:!0});var e=im();Li.DragDropContext=e.DragDropContext,Li.DragDropContextProvider=e.DragDropContextProvider,Li.DragDropContextConsumer=e.Consumer;var t=Xve();Li.DragLayer=t.default;var r=ibe();Li.DragSource=r.default;var i=sbe();Li.DropTarget=i.default;var a=obe();Li.DragPreviewImage=a.default;var s=pbe();return Li.useDrag=s.useDrag,Li.useDragLayer=s.useDragLayer,Li.useDrop=s.useDrop,Li}var Ss=fbe(),fl={},ml={},Qh={},gl={},tP;function e$(){if(tP)return gl;tP=1,Object.defineProperty(gl,"__esModule",{value:!0});function e(i){var a=null,s=function(){return a==null&&(a=i()),a};return s}gl.memoize=e;function t(i,a){return i.filter(function(s){return s!==a})}gl.without=t;function r(i,a){var s=new Set,o=function(c){return s.add(c)};i.forEach(o),a.forEach(o);var l=[];return s.forEach(function(c){return l.push(c)}),l}return gl.union=r,gl}var nP;function mbe(){if(nP)return Qh;nP=1,Object.defineProperty(Qh,"__esModule",{value:!0});var e=e$(),t=(function(){function r(i){this.entered=[],this.isNodeInDocument=i}return r.prototype.enter=function(i){var a=this,s=this.entered.length,o=function(l){return a.isNodeInDocument(l)&&(!l.contains||l.contains(i))};return this.entered=e.union(this.entered.filter(o),[i]),s===0&&this.entered.length>0},r.prototype.leave=function(i){var a=this.entered.length;return this.entered=e.without(this.entered.filter(this.isNodeInDocument),i),a>0&&this.entered.length===0},r.prototype.reset=function(){this.entered=[]},r})();return Qh.default=t,Qh}var Bc={},rP;function t$(){if(rP)return Bc;rP=1,Object.defineProperty(Bc,"__esModule",{value:!0});var e=e$();return Bc.isFirefox=e.memoize(function(){return/firefox/i.test(navigator.userAgent)}),Bc.isSafari=e.memoize(function(){return!!window.safari}),Bc}var vl={},Zh={},iP;function gbe(){if(iP)return Zh;iP=1,Object.defineProperty(Zh,"__esModule",{value:!0});var e=(function(){function t(r,i){for(var a=r.length,s=[],o=0;o<a;o++)s.push(o);s.sort(function(S,_){return r[S]<r[_]?-1:1});for(var l=[],c=[],h,u,o=0;o<a-1;o++)h=r[o+1]-r[o],u=i[o+1]-i[o],l.push(h),c.push(u/h);for(var d=[c[0]],o=0;o<l.length-1;o++){var p=c[o],f=c[o+1];if(p*f<=0)d.push(0);else{h=l[o];var m=l[o+1],g=h+m;d.push(3*g/((g+m)/p+(g+h)/f))}}d.push(c[c.length-1]);for(var x=[],v=[],b,o=0;o<d.length-1;o++){b=c[o];var j=d[o],w=1/l[o],g=j+d[o+1]-b-b;x.push((b-j-g)*w),v.push(g*w*w)}this.xs=r,this.ys=i,this.c1s=d,this.c2s=x,this.c3s=v}return t.prototype.interpolate=function(r){var i=this,a=i.xs,s=i.ys,o=i.c1s,l=i.c2s,c=i.c3s,h=a.length-1;if(r===a[h])return s[h];for(var u=0,d=c.length-1,p;u<=d;){p=Math.floor(.5*(u+d));var f=a[p];if(f<r)u=p+1;else if(f>r)d=p-1;else return s[p]}h=Math.max(0,d);var m=r-a[h],g=m*m;return s[h]+o[h]*m+l[h]*g+c[h]*m*g},t})();return Zh.default=e,Zh}var aP;function vbe(){if(aP)return vl;
34aP=1,Object.defineProperty(vl,"__esModule",{value:!0});var e=t$(),t=gbe(),r=1;function i(c){var h=c.nodeType===r?c:c.parentElement;if(!h)return null;var u=h.getBoundingClientRect(),d=u.top,p=u.left;return{x:p,y:d}}vl.getNodeClientOffset=i;function a(c){return{x:c.clientX,y:c.clientY}}vl.getEventClientOffset=a;function s(c){return c.nodeName==="IMG"&&(e.isFirefox()||!document.documentElement.contains(c))}function o(c,h,u,d){var p=c?h.width:u,f=c?h.height:d;return e.isSafari()&&c&&(f/=window.devicePixelRatio,p/=window.devicePixelRatio),{dragPreviewWidth:p,dragPreviewHeight:f}}function l(c,h,u,d,p){var f=s(h),m=f?c:h,g=i(m),x={x:u.x-g.x,y:u.y-g.y},v=c.offsetWidth,b=c.offsetHeight,j=d.anchorX,w=d.anchorY,S=o(f,h,v,b),_=S.dragPreviewWidth,C=S.dragPreviewHeight,E=function(){var D=new t.default([0,.5,1],[x.y,x.y/b*C,x.y+C-b]),O=D.interpolate(w);return e.isSafari()&&f&&(O+=(window.devicePixelRatio-1)*C),O},P=function(){var D=new t.default([0,.5,1],[x.x,x.x/v*_,x.x+_-v]);return D.interpolate(j)},T=p.offsetX,N=p.offsetY,k=T===0||T,I=N===0||N;return{x:k?T:P(),y:I?N:E()}}return vl.getDragPreviewOffset=l,vl}var qc={},Jh={},bl={},sP;function f0(){return sP||(sP=1,Object.defineProperty(bl,"__esModule",{value:!0}),bl.FILE="__NATIVE_FILE__",bl.URL="__NATIVE_URL__",bl.TEXT="__NATIVE_TEXT__"),bl}var ep={},oP;function bbe(){if(oP)return ep;oP=1,Object.defineProperty(ep,"__esModule",{value:!0});function e(t,r,i){var a=r.reduce(function(s,o){return s||t.getData(o)},"");return a??i}return ep.getDataFromDataTransfer=e,ep}var lP;function ybe(){if(lP)return Jh;lP=1;var e;Object.defineProperty(Jh,"__esModule",{value:!0});var t=f0(),r=bbe();return Jh.nativeTypesConfig=(e={},e[t.FILE]={exposeProperties:{files:function(i){return Array.prototype.slice.call(i.files)},items:function(i){return i.items}},matchesTypes:["Files"]},e[t.URL]={exposeProperties:{urls:function(i,a){return r.getDataFromDataTransfer(i,a,"").split(`
35`)}}
35,matchesTypes:["Url","text/uri-list"]},e[t.TEXT]={exposeProperties:{text:function(i,a){return r.getDataFromDataTransfer(i,a,"")}},matchesTypes:["Text","text/plain"]},e),Jh}var tp={},cP;function xbe(){if(cP)return tp;cP=1,Object.defineProperty(tp,"__esModule",{value:!0});var e=(function(){function t(r){var i=this;this.config=r,this.item={},Object.keys(this.config.exposeProperties).forEach(function(a){Object.defineProperty(i.item,a,{configurable:!0,enumerable:!0,get:function(){return null}})})}return t.prototype.mutateItemByReadingDataTransfer=function(r){var i=this,a={};r&&Object.keys(this.config.exposeProperties).forEach(function(s){a[s]={value:i.config.exposeProperties[s](r,i.config.matchesTypes)}}),Object.defineProperties(this.item,a)},t.prototype.canDrag=function(){return!0},t.prototype.beginDrag=function(){return this.item},t.prototype.isDragging=function(r,i){return i===r.getSourceId()},t.prototype.endDrag=function(){},t})();return tp.NativeDragSource=e,tp}var dP;function jbe(){if(dP)return qc;dP=1,Object.defineProperty(qc,"__esModule",{value:!0});var e=ybe(),t=xbe();function r(a){return new t.NativeDragSource(e.nativeTypesConfig[a])}qc.createNativeDragSource=r;function i(a){if(!a)return null;var s=Array.prototype.slice.call(a.types||[]);return Object.keys(e.nativeTypesConfig).filter(function(o){var l=e.nativeTypesConfig[o].matchesTypes;return l.some(function(c){return s.indexOf(c)>-1})})[0]||null}return qc.matchNativeItemType=i,qc}var uP;function wbe(){if(uP)return ml;uP=1;var e=ml&&ml.__assign||function(){return e=Object.assign||function(l){for(var c,h=1,u=arguments.length;h<u;h++){c=arguments[h];for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(l[d]=c[d])}return l},e.apply(this,arguments)};Object.defineProperty(ml,"__esModule",{value:!0});var t=mbe(),r=t$(),i=vbe(),a=jbe(),s=f0(),o=(function(){function l(c){var h=this;this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.getSourceClientOffset=function(u){return i.getNodeClientOffset(h.sourceNodes.get(u))},this.endDragNativeItem=function(){h.isDraggingNativeItem()&&(h.actions.endDrag(),h.registry.removeSource(h.currentNativeHandle),h.currentNativeHandle=null,h.currentNativeSource=null)},this.isNodeInDocument=function(u){return!!document&&document.body.contains(u)||!!h.window&&h.window.document.body.contains(u)},this.endDragIfSourceWasRemovedFromDOM=function(){var u=h.currentDragSourceNode;h.isNodeInDocument(u)||h.clearCurrentDragSourceNode()&&h.actions.endDrag()},this.handleTopDragStartCapture=function(){h.clearCurrentDragSourceNode(),h.dragStartSourceIds=[]},this.handleTopDragStart=function(u){var d=h.dragStartSourceIds;h.dragStartSourceIds=null;var p=i.getEventClientOffset(u);h.monitor.isDragging()&&h.actions.endDrag(),h.actions.beginDrag(d||[],{publishSource:!1,getSourceClientOffset:h.getSourceClientOffset,clientOffset:p});var f=u.dataTransfer,m=a.matchNativeItemType(f);if(h.monitor.isDragging()){if(f&&typeof f.setDragImage=="function"){var g=h.monitor.getSourceId(),x=h.sourceNodes.get(g),v=h.sourcePreviewNodes.get(g)||x;if(v){var b=h.getCurrentSourcePreviewNodeOptions(),j=b.anchorX,w=b.anchorY,S=b.offsetX,_=b.offsetY,C={anchorX:j,anchorY:w},E={offsetX:S,offsetY:_},P=i.getDragPreviewOffset(x,v,p,C,E);f.setDragImage(v,P.x,P.y)}}try{f.setData("application/json",{})}catch{}h.setCurrentDragSourceNode(u.target);var T=h.getCurrentSourcePreviewNodeOptions().captureDraggingState;T?h.actions.publishDragSource():setTimeout(function(){return h.actions.publishDragSource()},0)}else if(m)h.beginDragNativeItem(m);else{if(f&&!f.types&&(u.target&&!u.target.hasAttribute||!u.target.hasAttribute("draggable")))return;u.preventDefault()}},this.handleTopDragEndCapture=function(){h.clearCurrentDragSourceNode()&&h.actions.endDrag(
35)},this.handleTopDragEnterCapture=function(u){h.dragEnterTargetIds=[];var d=h.enterLeaveCounter.enter(u.target);if(!(!d||h.monitor.isDragging())){var p=u.dataTransfer,f=a.matchNativeItemType(p);f&&h.beginDragNativeItem(f)}},this.handleTopDragEnter=function(u){var d=h.dragEnterTargetIds;if(h.dragEnterTargetIds=[],!!h.monitor.isDragging()){h.altKeyPressed=u.altKey,r.isFirefox()||h.actions.hover(d,{clientOffset:i.getEventClientOffset(u)});var p=d.some(function(f){return h.monitor.canDropOnTarget(f)});p&&(u.preventDefault(),u.dataTransfer&&(u.dataTransfer.dropEffect=h.getCurrentDropEffect()))}},this.handleTopDragOverCapture=function(){h.dragOverTargetIds=[]},this.handleTopDragOver=function(u){var d=h.dragOverTargetIds;if(h.dragOverTargetIds=[],!h.monitor.isDragging()){u.preventDefault(),u.dataTransfer&&(u.dataTransfer.dropEffect="none");return}h.altKeyPressed=u.altKey,h.actions.hover(d||[],{clientOffset:i.getEventClientOffset(u)});var p=(d||[]).some(function(f){return h.monitor.canDropOnTarget(f)});p?(u.preventDefault(),u.dataTransfer&&(u.dataTransfer.dropEffect=h.getCurrentDropEffect())):h.isDraggingNativeItem()?u.preventDefault():(u.preventDefault(),u.dataTransfer&&(u.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=function(u){h.isDraggingNativeItem()&&u.preventDefault();var d=h.enterLeaveCounter.leave(u.target);d&&h.isDraggingNativeItem()&&h.endDragNativeItem()},this.handleTopDropCapture=function(u){h.dropTargetIds=[],u.preventDefault(),h.isDraggingNativeItem()&&h.currentNativeSource.mutateItemByReadingDataTransfer(u.dataTransfer),h.enterLeaveCounter.reset()},this.handleTopDrop=function(u){var d=h.dropTargetIds;h.dropTargetIds=[],h.actions.hover(d,{clientOffset:i.getEventClientOffset(u)}),h.actions.drop({dropEffect:h.getCurrentDropEffect()}),h.isDraggingNativeItem()?h.endDragNativeItem():h.endDragIfSourceWasRemovedFromDOM()},this.handleSelectStart=function(u){var d=u.target;typeof d.dragDrop=="function"&&(d.tagName==="INPUT"||d.tagName==="SELECT"||d.tagName==="TEXTAREA"||d.isContentEditable||(u.preventDefault(),d.dragDrop()))},this.actions=c.getActions(),this.monitor=c.getMonitor(),this.registry=c.getRegistry(),this.context=c.getContext(),this.enterLeaveCounter=new t.default(this.isNodeInDocument)}return Object.defineProperty(l.prototype,"window",{get:function(){if(this.context&&this.context.window)return this.context.window;if(typeof window<"u")return window},enumerable:!0,configurable:!0}),l.prototype.setup=function(){if(this.window!==void 0){if(this.window.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");this.window.__isReactDndBackendSetUp=!0,this.addEventListeners(this.window)}},l.prototype.teardown=function(){this.window!==void 0&&(this.window.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.window),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&this.window.cancelAnimationFrame(this.asyncEndDragFrameId))},l.prototype.connectDragPreview=function(c,h,u){var d=this;return this.sourcePreviewNodeOptions.set(c,u),this.sourcePreviewNodes.set(c,h),function(){d.sourcePreviewNodes.delete(c),d.sourcePreviewNodeOptions.delete(c)}},l.prototype.connectDragSource=function(c,h,u){var d=this;this.sourceNodes.set(c,h),this.sourceNodeOptions.set(c,u);var p=function(m){return d.handleDragStart(m,c)},f=function(m){return d.handleSelectStart(m)};return h.setAttribute("draggable","true"),h.addEventListener("dragstart",p),h.addEventListener("selectstart",f),function(){d.sourceNodes.delete(c),d.sourceNodeOptions.delete(c),h.removeEventListener("dragstart",p),h.removeEventListener("selectstart",f),h.setAttribute("draggable","false")}},l.prototype.connectDropTarget=function(c,h){var u=this,d=function(m){return u.handleDragEnter(m,c)},p=function(m){return u.handleDragOver(m,c)},f=function(m){return u.handleDrop(m,c)};return h.addEventListener("dragenter",d),h.addEventListener("dragover",p),h.addEventListener("drop",f),function(){h.removeEventListener("dragenter",d),h.removeEventListener("dragover",p),h.removeEventListener("drop",f)}},l.prototype.addEventListeners=function(c){c.addEventListener&&(c.addEventListener("dragstart",this.handleTopDragStart),c.addEventListener("dragstart",this.handleTopDragStartCapture,!0),c.addEventListener("dragend",this.handleTopDragEndCapture,!0),c.addEventListener("dragenter",this.handleTopDragEnter),c.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),c.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),c.addEventListener("dragover",this.handleTopDragOver),c.addEventListener("dragover",this.handleTopDragOverCapture,!0),c.addEventListener("drop",this.handleTopDrop),c.addEventListener("drop",this.handleTopDropCapture,!0))},l.prototype.removeEventListeners=function(c){c.removeEventListener&&(c.removeEventListener("dragstart",this.handleTopDragStart),c.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),c.removeEventListener("dragend",this.handleTopDragEndCapture,!0),c.removeEventListener("dragenter",this.handleTopDragEnter),c.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),c.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),c.removeEventListener("dragover",this.handleTopDragOver),c.removeEventListener("dragover",this.handleTopDragOverCapture,!0),c.removeEventListener("drop",this.handleTopDrop),c.removeEventListener("drop",this.handleTopDropCapture,!0))},l.prototype.getCurrentSourceNodeOptions=function(){var c=this.monitor.getSourceId(),h=this.sourceNodeOptions.get(c);return e({dropEffect:this.altKeyPressed?"copy":"move"},h||{})},l.prototype.getCurrentDropEffect=function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect},l.prototype.getCurrentSourcePreviewNodeOptions=function(){var c=this.monitor.getSourceId(),h=this.sourcePreviewNodeOptions.get(c);
35return e({anchorX:.5,anchorY:.5,captureDraggingState:!1},h||{})},l.prototype.isDraggingNativeItem=function(){var c=this.monitor.getItemType();return Object.keys(s).some(function(h){return s[h]===c})},l.prototype.beginDragNativeItem=function(c){this.clearCurrentDragSourceNode(),this.currentNativeSource=a.createNativeDragSource(c),this.currentNativeHandle=this.registry.addSource(c,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])},l.prototype.setCurrentDragSourceNode=function(c){var h=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=c;var u=1e3;this.mouseMoveTimeoutTimer=setTimeout(function(){return h.window&&h.window.addEventListener("mousemove",h.endDragIfSourceWasRemovedFromDOM,!0)},u)},l.prototype.clearCurrentDragSourceNode=function(){return this.currentDragSourceNode?(this.currentDragSourceNode=null,this.window&&(this.window.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.window.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)),this.mouseMoveTimeoutTimer=null,!0):!1},l.prototype.handleDragStart=function(c,h){this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(h)},l.prototype.handleDragEnter=function(c,h){this.dragEnterTargetIds.unshift(h)},l.prototype.handleDragOver=function(c,h){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(h)},l.prototype.handleDrop=function(c,h){this.dropTargetIds.unshift(h)},l})();return ml.default=o,ml}var np={},hP;function Sbe(){if(hP)return np;hP=1,Object.defineProperty(np,"__esModule",{value:!0});var e;function t(){return e||(e=new Image,e.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),e}return np.default=t,np}var pP;function _be(){if(pP)return fl;pP=1,Object.defineProperty(fl,"__esModule",{value:!0});var e=wbe(),t=Sbe();fl.getEmptyImage=t.default;var r=f0();fl.NativeTypes=r;function i(a){return new e.default(a)}return fl.default=i,fl}var Cbe=_be();const am=Zt(Cbe),{apiAddress:Ar}=Tn,m0=1e5,Nbe=(e,t)=>(r,i)=>Ne.get(`${Ar}api/users/${e}/clientpieces/${t}/?view=summary&method=long-polling&time=${Date.now()}`,Ee(i)).then(a=>(r({type:CU,payload:a.data,clientPieceId:t}),a)),Tu=(e,t)=>(r,i)=>{r({type:gU,cpId:e});const a=`${Ar}api/users/${t}/clientpieces/${e}/`;return Ne.get(a,Ee(i)).then(s=>{r({type:vU,payload:s.data})},s=>{r({type:Yl});const o=!!(s.response&&s.response.data&&s.response.data.detail==="Requested commentary is currently being shared by partner insights");return o?r(he({serverError:"This commentary is linked to a partner insight and cannot be edited."})):s.message!==Ue&&r(he({serverError:"There was a problem retrieving this commentary, please try again"})),Promise.reject({isPartnerInsightLocked:o})})},sm=e=>(t,r)=>(t({type:bU}),Ne.get(`${Ar}api/users/${e}/clientpieces/?view=summary&time=${Date.now()}`,Ee(r)).then(i=>{t({type:yU,payload:i.data})},i=>{t({type:Yl})})),om=(e,t,r)=>(i,a)=>{const s=`${Ar}api/users/${e}/clientpieces/`,o=100;let l;r?.length>o?l=r?.slice(0,o):l=r;const c={title:t||"Client Market Update",clientpieceuser:e,chart_info_ids:JSON.stringify(l)};return i({type:Ej}),Ne.post(s,c,Ee(a)).then(h=>(i({type:Tj,payload:h.data}),i(he({alertMessage:"New Commentary Created"})),h.data.id),h=>(i({type:Yl}),h.message!==Ue&&i(he({serverError:"There was a problem creating this commentary, please try again"})),Promise.reject(()=>{})))},Ebe=(e,t,r,i)=>(a,s)=>{const o=`${Ar}api/users/${e}/clientpieces/${t}/remix/`,l={remix_complexity:r,remix_length:i};return a({type:wU}),Ne.post(o,l,Ee(s)).then(c=>(a({type:SU,payload:c.data}),c),c=>(a({type:_U}),c.message!==Ue&&a(he({serverError:"There was a problem remixing this commentary, please try again"})),c.response))},Tbe=(e,t)=>(r,i)=>{const a=`${Ar}api/users/${e}/clientpieces/${t}/revert/`,s={};return r({type:xU}),Ne.post(a,s,Ee(i)).then(o=>(r({type:jU}),r(he({alertMessage:"Commentary Reverted"})),o),o=>(r({type:Yl}),o.message!==Ue&&r(he({serverError:"There was a problem reverting this commentary, please try again"})),Promise.reject(()=>{})))},g0=(e,t)=>(r,i)=>{const a=`${Ar}api/users/${e}/clientpieces/`,s={partnerinsight_id:t};return r({type:Ej}),Ne.post(a,s,Ee(i)).then(o=>(r({type:Tj,payload:o.data}),r(he({alertMessage:"New Commentary Created"})),o.data.id),o=>(r({type:Yl}),o.message!==Ue&&r(he({serverError:"There was a problem creating this commentary, please try again"})),Promise.reject(()=>{})))},kbe=(e,t)=>
35(r,i)=>{const a=`${Ar}api/users/${e}/clientpieces/`,s={chartbookuser:e,featuredpiece_id:t};return r({type:Ej}),Ne.post(a,s,Ee(i)).then(o=>(r({type:Tj,payload:o.data}),r(he({alertMessage:"New Commentary Created"})),o.data.id),o=>(r({type:Yl}),o.message!==Ue&&r(he({serverError:"There was a problem creating this commentary, please try again"})),Promise.reject(()=>{})))},Pbe=()=>e=>{e({type:$U})},Ibe=(e,t,r)=>(i,a)=>{const s=a().composer.piece.id,o=a().auth.user.id,l=a().composer.piece.sections,c=`${Ar}api/users/${o}/clientpieces/${s}/sections/${e}/`,h={new_index:r};let u=[];const d=Array.from(l),[p]=d.splice(t,1);if(d.splice(r,0,p),t!==r&&r||r===0)return i({type:Im,payload:{sections:d},id:e,cpId:s}),Ne.patch(c,h,Ee(a)).then(f=>(f.status===200&&(u=d,i({type:Im,id:e,payload:{sections:u,data:f.data},cpId:s})),f.data)).catch(f=>{u=l,i({type:Im,payload:{sections:u},id:e,cpId:s}),f.message!==Ue&&i(he({serverError:"There was a problem reordering your sections. Please try again."}))})},ku=(e,t,r,i,a,s,o)=>(l,c)=>{const h=`${Ar}api/users/${e}/clientpieces/${t}/sections/`,u=new FormData,d={content:r||null,chart_id:a||null,type:i};u.append("section_data",JSON.stringify(d)),u.append("index",s||0),o&&u.append("image",o);const p=Ee(c,Xn);if(l({type:TU}),i==="text"&&r.length>m0)l(he({serverError:"This text section is too long. Please shorten it or contact us for assistance."}));else return Ne.post(h,u,p).then(f=>(l({type:kU,payload:f.data,index:s,cpId:t}),f.data)).catch(f=>{f.message!==Ue&&l(he({serverError:"There was a problem adding this section. Please try again."}))}).then(f=>(l({type:PU,payload:f}),f)).then(f=>(setTimeout(()=>{Pbe()(l)},3e3),f))},Dbe=(e,t,r)=>(i,a)=>{const s=`${Ar}api/users/${t}/clientpieces/${r}/sections/${e}/`;return Ne.delete(s,Ee(a)).then(o=>(i({type:RU,id:e}),i(he({alertMessage:"Section Successfully Deleted"})),o)).catch(o=>{o.message!==Ue&&i(he({serverError:"There was a problem deleting this section. Please try again."}))})},n$=(e,t,r)=>(i,a)=>{const s=`${Ar}api/users/${t}/clientpieces/${e}/`,o={disclosures:r,is_user_update:!0};if(i({type:NU}),r.length>m0)i(he({serverError:"Disclosure text is too long. Please shorten it or contact us for assistance."}));else return Ne.patch(s,o,Ee(a)).then(l=>(i({type:EU,payload:l.data}),l.data)).catch(l=>{l.message!==Ue&&i(he({serverError:"There was a problem updating this section. Please try again."}))})},Rbe=(e,t,r,i,a,s)=>(o,l)=>{const c=`${Ar}api/users/${t}/clientpieces/${e}/`,h={header:{title:r,author_name:i,profile_picture:a,author_type:s},is_user_update:!0};return o({type:Cj}),Ne.patch(c,h,Ee(l)).then(u=>(o({type:Nj,payload:u.data,cpId:e}),o(he({alertMessage:"Commentary Updated"})),u.data)).catch(u=>{u.message!==Ue&&o(he({serverError:"There was a problem updating this commentary. Please try again."}))})},Obe=(e,t,r)=>(i,a)=>{const s=`${Ar}api/users/${t}/clientpieces/${e}/`,o={authors:r?JSON.stringify(r):null,is_user_update:!0};return i({type:Cj}),Ne.patch(s,o,Ee(a)).then(l=>(i({type:Nj,payload:l.data,cpId:e}),i(he({alertMessage:"Commentary Updated"})),l.data)).catch(l=>{l.message!==Ue&&i(he({serverError:"There was a problem updating this commentary. Please try again."}))})},r$=(e,t,r)=>(i,a)=>{const s=`${Ar}api/users/${t}/clientpieces/${e}/`,o=new FormData;return o.append("pdf",r),i({type:Cj}),Ne.patch(s,o,Ee(a,Xn)).then(l=>(i({type:Nj,payload:l.data,cpId:e}),i(he({alertMessage:"Commentary Updated"})),l.data)).catch(l=>{l.message!==Ue&&i(he({serverError:"There was a problem updating this commentary. Please try again."}))})},lm=(e,t,r,i,a,s,o,l)=>(c,h)=>{const u=`${Ar}api/users/${e}/clientpieces/${t}/sections/${r}/`,d=new FormData,p={content:i||null,type:a,chart_id:s||null,chart_alignment:o||null};Object.keys(p).forEach(m=>{const g=p[m];d.append(m,g)}),l&&d.append("image",l);const f=Ee(h,Xn);if(c({type:IU}),a==="text"&&i.length>m0)c(he({serverError:"This text section is too long. Please shorten it or contact us for assistance."}));else return Ne.patch(u,d,f).then(m=>(c({type:DU,payload:m.data,id:r,cpId:t}),m.data)).catch(m=>{m.message!==Ue&&c(he({serverError:"There was a problem updating this section. Please try again."}))})},i$=(e,t,r,i)=>(a,s)=>{const o=`${Ar}api/users/${e}/exportclientpiece/`,l={...Ee(s),responseType:"blob"},c={export_type:r||null,clientpiece_id:t,format:i||null};return Ne.post(o,c,l)},Abe=(e,t,r,i)=>(a,s)=>{const o=`${Ar}api/users/${e}/exportclientpiece/`,l={export_type:r||null,clientpiece_id:t,format:i||null};return Ne.post(o,l,Ee(s))},Mbe=e=>(t,r)=>{t({type:MU,payload:e})},$be=()=>(e,t)=>{e({type:AU})},Lbe=(e,t)=>
35(r,i)=>{const a=`${Ar}api/users/${t}/clientpieces/${e}/`;return Ne.delete(a,Ee(i)).then(s=>(r({type:LU,id:e}),r(he({alertMessage:"Commentary Successfully Deleted"})),s)).catch(s=>{s.message!==Ue&&r(he({serverError:"There was a problem deleting this commentary, please try again"}))})},Fbe=e=>(t,r)=>{e&&t({type:OU,id:e})},Ube=e=>t=>{t({type:Wl,payload:e})};var a$=(e=>(e.HelpEditor="help-editor",e.HelpLibrary="libary",e.HelpTalkingPoints="talking-points",e.HelpDisclosures="help-disclosures",e.HelpComposerWorkspace="composer-workspace",e.HelpComposerExport="composer-export",e))(a$||{});const{HelpEditor:s$,HelpLibrary:o$,HelpTalkingPoints:l$,HelpDisclosures:c$,HelpComposerWorkspace:d$,HelpComposerExport:u$}=a$,oc={[s$]:{text:"Rename this chartbook and add helpful tags to stay organized",articleId:"3425989"},[o$]:{text:"Drag and drop the charts below to change the order in which they appear in your chartbook",articleId:"3432985"},[l$]:{text:"Customize how talking points appear on your chart slides",articleId:"3440819"},[c$]:{text:"Enter firm disclosures here. These will automatically be added to all charts and chartbooks.",articleId:"3440696"},[d$]:{text:"Customize this piece by adding or editing text sections and charts. Drag and drop sections to reorder them.",articleId:"6662567"},[u$]:{text:"Export your commentary as a PDF, Word document, or as an HTML file for web use",articleId:"6666434"}},h$=(e,t,r)=>{const{className:i,open:a,onBlur:s,onFocus:o,onMouseLeave:l,onMouseOver:c,anchorEl:h}=r,u={onBlur:s,onFocus:o,onMouseLeave:l,onMouseOver:c};return a&&n.jsx("div",{className:"popover-container",...u,"diagnostic-id":"help-icon-notification",children:n.jsxs("div",{className:`${i} fadeTransition popover-content`,children:[n.jsx("div",{className:"help-icon-caption",children:e}),h.id==="setup-key"?n.jsx(n.Fragment,{}):n.jsx("button",{className:"help-article-btn","diagnostic-id":"help-icon-link",onClick:d=>FU(d,t),children:h.id==="partner-insight-published"?n.jsxs(n.Fragment,{children:[n.jsx("i",{className:"material-symbols-outlined",children:"chat_bubble"}),"Contact us"]}):n.jsxs(n.Fragment,{children:["View Help Article"," ",n.jsx("i",{className:"material-icons",children:"open_in_new"})]})})]})})};function Mo({id:e,helpAttrs:t}){const{text:r,articleId:i}=t;return n.jsx("div",{id:e,className:"help-icon",children:n.jsx(Ke,{title:r,placement:"top",interactive:!0,enterTouchDelay:0,leaveTouchDelay:5e3,PopperComponent:a=>h$(r,i,a),children:n.jsx("i",{className:"material-icons","diagnostic-id":"help-icon",children:"help_outline"})})})}const{apiAddress:Oy}=Tn,lc=e=>(t,r)=>{const i=r().auth.user.company.id,a=`${Oy}api/orgs/${i}/topics/`;return t({type:UU}),Ne.get(a,Ee(r)).then(s=>{t({type:BU,payload:s.data})}).catch(s=>{t({type:jS}),s.message!==Ue&&t(he({serverError:"A problem occurred while retrieving the charts, please try again"}))}),e&&Ne.get(`${Oy}api/orgs/${i}/notes/`,Ee(r)).then(s=>{t({type:qU,payload:s.data})}).catch(s=>{t({type:jS}),s.message!==Ue&&t(he({serverError:"A problem occurred while retrieving the charts, please try again"}))}),Ne.get(`${Oy}api/orgs/${i}/charts/`,Ee(r)).then(s=>(t({type:VU,payload:s.data}),s)).catch(s=>(s.message!==Ue&&t(he({serverError:"A problem occurred while retrieving the charts, please try again"})),Promise.reject(()=>s)))},cm=e=>(t,r)=>{t({type:zU,payload:e})},Bbe=e=>(t,r)=>{e&&t({type:GU,id:e})},p$=e=>(t,r)=>{t({type:QU,payload:e})},qbe=e=>(t,r)=>{t({type:KU,payload:e})},v0=e=>(t,r)=>{t({type:YU,id:e})},f$=()=>(e,t)=>{e({type:WU})},m$=e=>(t,r)=>{t({type:HU,payload:e})},g$=e=>(t,r)=>{t({type:XU,payload:e})},b0=e=>t=>{t({type:Wl,payload:e})};function Vbe(e){const{chart:r,chartIndex:i,isCurrentlySelected:a,isSelected:s,id:o,pos:l,connectDropTarget:c,isOverCurrent:h,selectedChartIds:u,dropResult:d,didDrop:p,chartOrder:f,updateChartOrder:m,user:g}=e,x=r.chart_info,v=s?"selected":"",b=r.is_locked!==!1;y.useEffect(()=>{if(a&&p){const{dragId:S,dropId:_}=d,C=[...f];if(x.id===_){const E=C.indexOf(S),P=C.indexOf(_);C.splice(E,1),C.splice(E<P?P-1:P,0,S)}m(C)}},[p]);const j=()=>{s?e.deselectChart():e.selectChart()},w=n.jsxs("div",{pos:l,id:`${o}`,className:`chart-drop-placeholder ${h&&(s||!b)?` placeholder-show${r.aspect_ratio==="16:9"?" size-aspect-16-9":""}`:""}`,children:[n.jsx("div",{className:e.isDragging?"":"chart-card-background",style:{backgroundColor:x.company?.primary_color?x.company?.primary_color:null}}),n.jsx(Ke,{interactive:!0,classes:{popper:"upgrade-tooltip"},title:b?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"upgrade-tooltip-msg",children:"Upgrade to access this chart"}),g.is_upgrade_disabled?n.jsxs("div",{className:"upgrade-submitted-tooltip",children:[n.jsx("i",{className:"material-icons",children:"done"}),"UPGRADE REQUESTED"]}):n.jsxs("button",{className:"upgrade-tooltip-btn",onClick:e.handleUpgradeAndEventOpen,children:[n.jsx("i",{className:"material-icons",children:"open_in_new"}),"UPGRADE"]})]}):"",placement:"top",children:n.jsxs("div",{className:"chart-card","diagnostic-id":"chart-card",children:[n.jsx("div",{className:"chart-index-container",children:e.isDragging&&(s||!b)&&n.jsx("h1",{children:i})}),s?n.jsx("div",{className:"checkmark","diagnostic-id":"checkmark",children:n.jsx("i",{className:"material-icons",children:"done"})}):b?n.jsx("div",{className:"locked-card",children:n.jsx("i",{className:"material-icons","diagnostic-id":"material-lock-icon",children:"lock"})}):n.jsx(n.Fragment,{}),n.jsxs("div",{className:"chart-card-btn-primary",onClick:!s&&b?void 0:j,children:[n.jsxs("div",{className:"chart-card-title truncate "+v,"diagnostic-id":"chart-card-title-text",children:[x.name,n.jsx("span",{"selected-icon":"✓"})]}),x.company?.logo&&n.jsx("div",{className:"chart-card-logo-container",children:n.jsx("img",{src:x.company?.logo,alt:""})}),n.jsx("div",{className:"chart-card-image",children:n.jsx("img",{alt:"",src:r.chart_thumb_jpg_url})}),n.jsx("div",{className:`chart-card-placeholder${r.aspect_ratio==="16:9"?" size-aspect-16-9":""}`,children:n.jsx("i",{className:"material-icons",children:"insert_chart_outlined"})}),(s||!b)&&n.jsx("div",{className:"chart-card-btn-grp",children:n.jsx("div",{className:"chart-card-btn",children:s?null:n.jsx("i",{className:"material-icons",children:"add_circle"})})})]}),!b&&n.jsxs("div",{className:"chart-card-preview-btn","diagnostic-id":"chart-card-preview-btn",onClick:S=>e.handlePreviewLink?.(r.id)?.(S),children:[n.jsx("i",{className:"material-icons",children:"zoom_in"}),n.jsx("span",{children:"Preview"})]})]})})]});return a?c(w):w}const zbe={canDrop(e,t){return e.chart.is_locked===!1},hover(e,t,r){},drop(e,t,r){return t.didDrop()?void 0:{dragId:t.getItem().id,dropId:e.chart.chart_info.id}}};function Hbe(e,t){return{connectDropTarget:e.dropTarget(),isOver:t.isOver(),isOverCurrent:t.isOver({shallow:!0}),itemType:t.getItemType(),didDrop:t.didDrop(),dropResult:t.getDropResult()}}const Gbe=e=>({selectedChartIds:e.chartlibrary&&e.chartlibrary.selectedChartIds,chartOrder:e.chartlibrary.chartOrderNew,user:e.auth.user}),Wbe=le(Gbe,{updateChartOrder:g$})(Ss.DropTarget("chart",zbe,Hbe)(Vbe));function Ybe(e){const t="&#x2713;";y.useEffect(()=>{if(!e.isChartLibraryModal){const{didDrop:m}=e;if(m){const{id:g,dropResult:x,chartOrder:v}=e,{dragId:b,dropId:j}=x;if(g===j){const w=v.indexOf(b),S=v.indexOf(j);v.splice(w,1),v.splice(w<S?S-1:S,0,b),e.updateChartOrder([...v])}}}},[e.didDrop]);const r=()=>{e.isSelected?e.deselectChart():e.selectChart()},{chart:i,chartIndex:a,user:s}=e,o=i.chart_info,{isSelected:l}=e,c=e.isSelected?"selected":"",h=i.is_locked!==!1,{id:u,pos:d,connectDropTarget:p,isOverCurrent:f}=e;return p(n.jsxs("div",{pos:d,id:`${u}`,className:`chart-drop-placeholder ${f&&(l||!h)?` placeholder-show${i.aspect_ratio==="16:9"?" size-aspect-16-9":""}`:""}`,children:[n.jsx("div",{className:e.isDragging?"":"chart-card-background",style:{backgroundColor:o.company?.primary_color?o.company?.primary_color:null}}),n.jsx(Ke,{interactive:!0,classes:{popper:"upgrade-tooltip"},title:h?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"upgrade-tooltip-msg",children:"Upgrade to access this chart"}),s.is_upgrade_disabled?n.jsxs("div",{className:"upgrade-submitted-tooltip",children:[n.jsx("i",{className:"material-icons",children:"done"}),"UPGRADE REQUESTED"]}):n.jsxs("button",{className:"upgrade-tooltip-btn",onClick:e.handleUpgradeAndEventOpen,children:[n.jsx("i",{className:"material-icons",children:"open_in_new"}),"UPGRADE"]})]}):"",placement:"top",children:n.jsxs("div",{className:"chart-card","diagnostic-id":"chart-card",children:[n.jsx("div",{className:"chart-index-container",children:e.isDragging&&(l||!h)&&n.jsx("h1",{children:a})}),l?n.jsx("div",{className:"checkmark","diagnostic-id":"checkmark",children:n.jsx("i",{className:"material-icons",children:"done"})}):h?n.jsx("div",{className:"locked-card",children:n.jsx("i",{className:"material-icons","diagnostic-id":"material-lock-icon",children:"lock"})}):n.jsx(n.Fragment,{}),n.jsxs("div",{className:"chart-card-btn-primary",onClick:!l&&h?void 0:r,children:[n.jsxs("div",{className:"chart-card-title truncate "+c,"diagnostic-id":"chart-card-title-text",children:[o.name,n.jsx("span",{"selected-icon":t})]}),o.company?.logo&&n.jsx("div",{className:`chart-card-logo-container${h?" locked":""}`,children:n.jsx("img",{src:o.company?.logo,alt:""})}),n.jsx("div",{className:"chart-card-image",children:n.jsx("img",{alt:"",src:i.chart_thumb_jpg_url})}),n.jsx("div",{className:`chart-card-placeholder${i.aspect_ratio==="16:9"?" size-aspect-16-9":""}`,children:n.jsx("i",{className:"material-icons",children:"insert_chart_outlined"})}),(l||!h)&&n.jsx("div",{className:"chart-card-btn-grp",children:n.jsx("div",{className:"chart-card-btn",children:l?null:n.jsx("i",{className:"material-icons",children:"add_circle"})})})]}),!h&&!e.isChartLibraryModal&&n.jsxs("div",{className:"chart-card-preview-btn","diagnostic-id":"chart-card-preview-btn",onClick:e.handlePreviewLink(i.id),children:[n.jsx("i",{className:"material-icons",children:"zoom_in"}),n.jsx("span",{children:"Preview"})]})]})})]}))}const Kbe={canDrop(e,t){return!e.chart.is_locked},hover(e,t,r){},drop(e,t,r){return t.didDrop()?void 0:{dragId:t.getItem().id,dropId:e.id}}};function Xbe(e,t){return{connectDropTarget:e.dropTarget(),isOver:t.isOver(),isOverCurrent:t.isOver({shallow:!0}),itemType:t.getItemType(),didDrop:t.didDrop(),dropResult:t.getDropResult()}}const Qbe=e=>({chartOrder:e.chartbooks.item.chartOrderNew,numCharts:e.chartbooks.item.numCharts,selectedChartIds:e.chartbooks.item.selectedChartIds,user:e.auth.user}),Zbe=le(Qbe,{updateChartOrder:NM})(Ss.DropTarget("chart",Kbe,Xbe)(Ybe));class Jbe extends y.Component{constructor(){super(...arguments),this.state={displayPreview:!1,upgradeModal:!1},this.handlePreviewLink=t=>r=>{!this.props.isChartLibraryModal&&this.setState({displayPreview:!0})},this.handlePreviewClose=()=>{!this.props.isChartLibraryModal&&this.setState({displayPreview:!1})},this.handleUpgradeAndEventOpen=()=>{this.setState({upgradeModal:!0}),this.props.logEvent()},this.handleUpgradeAndEventClose=()=>{this.setState({upgradeModal:!1})}}render(){const{index:t,chart:r,notes:i}=this.props,{connectDragSource:a}=this.props;return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`droppable-chart${r.aspect_ratio==="16:9"?" size-aspect-16-9":""} fadeTransition${this.props.isDragging?" isDragging":""}`,ref:this.props.isChartLibraryApp&&!this.props.isCurrentlySelected?null:a,children:this.props.isChartLibraryApp?y.createElement(Wbe,{...this.props,key:`${t} _before`,id:r.id,handlePreviewLink:this.handlePreviewLink,handleUpgradeAndEventOpen:this.handleUpgradeAndEventOpen}):y.createElement(Zbe,{...this.props,key:`${t} _before`,id:r.id,handlePreviewLink:this.handlePreviewLink,handleUpgradeAndEventOpen:this.handleUpgradeAndEventOpen})}),this.state.displayPreview&&n.jsx(Jo,{featuredChart:r,setChartModal:this.handlePreviewClose,chartModal:this.state.displayPreview,isChartLibrary:!0,notes:i}),this.state.upgradeModal&&n.jsx(ii,{setModal:this.handleUpgradeAndEventClose,modal:this.state.upgradeModal})]})}}const eye={canDrag(e){return!e.chart.is_locked},beginDrag(e,t,r){const i={id:e.isChartLibraryApp?e.chart.chart_info.id:e.chart.id};return e.toggleDrag(),i},isDragging(e,t){return t.getItem().id===e.id},endDrag(e,t,r){e.toggleDrag(),t.didDrop()}};function tye(e,t){return{connectDragSource:e.dragSource()}}const Hx=Ss.DragSource("chart",eye,tye)(Jbe);
35function nye(e){const{isSelectedChartsTopic:t,isFeaturedChartsTopic:r}=e,[i,a]=y.useState(e.testCharts||null),[s,o]=y.useState(""),[l,c]=y.useState(!1),[h,u]=y.useState(null),[d,p]=y.useState(e.testCharts||null),f=()=>{c(!l)},m=()=>{e.searchCharts(""),e.setSearching(!1)},g=()=>{e.deselectClientPieceChart();let _;if(e.clientpiece.sections.length===0?_=null:e.isChartEditing&&e.clientpiece.sections[e.index]&&e.clientpiece.sections[e.index].chart_snapshot&&(_=e.clientpiece.sections[e.index].chart_snapshot.chart_id),u(_),e.selectClientPieceChart(_),t){const C=e.charts.filter(E=>_===E.id);p(C)}else if(r){const C=e.charts.filter(E=>!E.is_locked);p(C)}},x=()=>{const{charts:_}=e.chartbook;e.deselectAllCharts();const C=_.map(E=>E.id);if(e.selectCharts(C),t){const E=e.charts.filter(P=>C.indexOf(P.id)>-1);a(E)}else if(r){const E=e.charts.filter(P=>!P.is_locked);a(E)}e.updateChartOrder(e.chartbook.chart_ids_order)};y.useEffect(()=>{e.isChartsLoaded&&(e.modal?g():x())},[e.modal,e.isChartsLoaded]),y.useEffect(()=>{e.modal?e.clientpiece.selectedChartId||g():e.resetCharts?(x(),e.confirmReset()):e.chartbook.selectedChartIds||x()},[e.modal,e.resetCharts,e.chartbook.selectedChartIds,e.clientpiece?.selectedChartId]),y.useEffect(()=>{let _;e.isSearching&&b&&b.length>2&&(_=e.charts.filter(C=>{const E=e.notes&&e.notes.filter(T=>T.chart_info===C.chart_info.id)[0];return E&&(E.note1?.toLowerCase().includes(b.toLowerCase())||E.note2?.toLowerCase().includes(b.toLowerCase())||E.note3?.toLowerCase().includes(b.toLowerCase()))||Mn(C.chart_info.name.toLowerCase(),b.toLowerCase())}),e.modal?p(_):a(_),o(`Results for: "${b}" - `))},[e.modal,e.chartbook,e.isSearching,e.notes,e.charts]),y.useEffect(()=>{const{isSearching:_,isSelectedChartsTopic:C,isFeaturedChartsTopic:E}=e;if(!_){let P;e.modal?E&&(P=e.charts.filter(T=>!T.is_locked),p(P),o("Featured Charts")):C&&v?(P=e.charts.filter(T=>v.indexOf(T.id)>-1),a(P),o("Selected Charts")):E&&(P=e.charts.filter(T=>!T.is_locked),a(P),o("Featured Charts"))}},[e.isSearching,e.isSelectedChartsTopic,e.chartbook.charts,e.charts,e.modal,e.isFeaturedChartsTopic]),y.useEffect(()=>{let _;const{isSearching:C,isSelectedChartsTopic:E,isFeaturedChartsTopic:P}=e;if(!C&&!E&&!P)if(e.modal){const{selectedTopicId:T}=e.clientpiece;_=e.charts.filter(k=>k.topic.id===T);const N=e.topics.filter(k=>k.id===T);p(_),o(N.length?N[0].name:"")}else{const{selectedTopicId:T}=e.chartbook;_=e.charts.filter(k=>k.topic.id===T);const N=e.topics.filter(k=>k.id===T);a(_),o(N.length?N[0].name:"Selected Charts")}},[e.chartbook,e.chartbook.searchTerms,e.chartbook.selectedTopicId,e.isSearching,e.isSelectedChartsTopic,e.clientpiece?.selectedTopicId,e.isFeaturedChartsTopic]),y.useEffect(()=>{const{selectedChartIds:_,chartOrderInitial:C,chartOrderNew:E}=e.chartbook,P=_&&_.sort((N,k)=>N-k),T=e.chartbook.charts?e.chartbook.charts.map(N=>N.id).sort((N,k)=>N-k):null;if(e.modal){const N=JSON.stringify(h)!==JSON.stringify(e.selectedChartId);N!==!!e.isComposerDirty&&e.setChartLibraryFormStatus(N)}else{const N=C&&JSON.stringify(C)!==JSON.stringify(E)||JSON.stringify(P)!==JSON.stringify(T);N!==!!e.isDirty&&e.setChartLibraryFormStatus(N)}},[e.chartbook,e.modal,e.clientpiece,h]);const{selectedChartIds:v,searchTerms:b}=e.chartbook,{chartOrder:j,isSearching:w}=e,S=oc[o$];if(i&&j&&v&&!e.modal){const _=(C,E)=>{const P=j.indexOf(C.id),T=j.indexOf(E.id);return P===-1||T===-1?0:P<T?-1:P>T?1:0};return i.sort(_),n.jsxs(n.Fragment,{children:[n.jsxs("h6",{className:"chart-browser-topic",children:[s,w?n.jsx("button",{className:"btn-cancel",onClick:m,children:"Clear Search"}):"",n.jsx(Mo,{id:"chart-library-help",helpAttrs:S})]}),n.jsxs("div",{id:"chart-browser-wrapper","diagnostic-id":"chart-browser-wrapper",children:[w&&i.length===0?n.jsxs("div",{id:"chart-search-placeholder",className:"fadeTransition",children:[n.jsx("i",{className:"material-icons",children:"search_off"}),n.jsxs("div",{children:['No results for "',b,'"']}),n.jsx("button",{className:"btn-cancel",onClick:m,children:"Clear Search"})]}):n.jsx(n.Fragment,{}),i.map((C,E)=>n.jsx(Hx,{index:C.id,chartIndex:E+1,chart:C,toggleDrag:f,isDragging:l,isSelected:v.includes(C.id),selectChart:()=>e.selectCharts([C.id]),deselectChart:()=>e.deselectChart(C.id),isChartLibraryModal:e.modal,notes:e.notes,logEvent:()=>e.logEvent(e.user.id,null,"communitycta","open")},C.id))]})]})}else if(d){const _=[...d.filter(C=>!C.is_locked),...d.filter(C=>C.is_locked)];return n.jsxs(n.Fragment,{children:[n.jsxs("h6",{className:"chart-browser-topic",children:[s,w?n.jsx("button",{className:"btn-cancel",onClick:m,children:"Clear Search"}):"",!e.modal&&n.jsx(Mo,{id:"chart-library-help",helpAttrs:S})]}),n.jsxs("div",{id:"chart-browser-wrapper","diagnostic-id":"chart-browser-wrapper",children:[w&&d?.length===0?n.jsxs("div",{id:"chart-search-placeholder",className:"fadeTransition",children:[n.jsx("i",{className:"material-icons",children:"search_off"}),n.jsxs("div",{children:['No results for "',b,'"']}),n.jsx("button",{className:"btn-cancel",onClick:m,children:"Clear Search"})]}):n.jsx(n.Fragment,{}),_.map((C,E)=>n.jsx(Hx,{index:C.id,chartIndex:E+1,chart:C,toggleDrag:f,isDragging:l,isSelected:[e.selectedChartId].includes(C.id),selectChart:()=>e.selectClientPieceChart(C.id),deselectChart:()=>e.deselectChart(C.id),isChartLibraryModal:e.modal,logEvent:()=>e.logEvent(e.user.id,null,"communitycta","open")},C.id))]})]})}return null}const rye=e=>({chartOrder:e.chartbooks.item.chartOrderNew,chartOrderInitial:e.chartbooks.item.chartOrderInitial,isDirty:e.chartbooks.isDirty,isComposerDirty:e.composer.isDirty,notes:e.chartbooks.item.notes,selectedChartIds:e.chartbooks.item.selectedChartIds,selectedChartId:e.composer?.piece?.selectedChartId,user:e.auth&&e.auth.user}),iye=le(rye,{selectCharts:Xme,deselectChart:Qme,deselectAllCharts:Zme,selectClientPieceChart:Mbe,deselectClientPieceChart:$be,updateChartOrder:NM,searchCharts:ro,setChartLibraryFormStatus:Xf,logEvent:_r})(Ss.DragDropContext(am)(nye));function lr(e){const{topic:t,selectTopic:r,isSelected:i,numChartsSelected:a,isLocked:s,prevSelectedTopic:o}=e,l=i?" topic-selected":"",c=s?" topic-locked":"";return n.jsx("div",{className:`topic-card${l+c}${o?" prev-selected-topic":""}`,"diagnostic-id":l?"topic-selected":"topic-card",onClick:h=>{s?h.stopPropagation():r()},children:n.jsxs("div",{className:"topic-name",children:[s&&n.jsx("i",{className:"material-icons","diagnostic-id":"material-lock-icon",children:"lock"}),t.name,!s&&n.jsx("span",{className:"chart-count",children:!e.isChartLibraryModal&&`(${a})`})]})})}
35lr.propTypes={topic:Nt.object.isRequired,isSelected:Nt.bool.isRequired,selectTopic:Nt.func.isRequired,numChartsSelected:Nt.number.isRequired};function aye(e){const[t,r]=y.useState(e.topics),[i,a]=y.useState(!1),{clientpiece:s,index:o,isChartEditing:l,user:c}=e,[h,u]=y.useState(e.selectedCPTopicId),{Community:d,SponsoredCommunity:p}=Br,f=c?.account_permissions?.name===d||c?.account_permissions?.name===p,m=()=>{if(!e.isChartLibraryModal)e.charts&&e.charts.length>0?(e.setSelectedChartsTopic(!0),e.setFeaturedChartsTopic(!1)):!e.selectedTopicId&&t.length>1&&(e.setSelectedChartsTopic(!1),f?e.setFeaturedChartsTopic(!0):e.selectTopic(e.topics[0].id));else{const k=s.sections[o]?.chart_snapshot;l?k.chart_id?(e.setSelectedChartsTopic(!1),e.selectClientPieceTopic(k.topic.id)):e.selectedCPTopicId!==h&&e.selectClientPieceTopic(e.selectedCPTopicId):t.length>1&&(e.setSelectedChartsTopic(!1),f?e.setFeaturedChartsTopic(!0):e.selectClientPieceTopic(e.topics[0].id))}};y.useEffect(()=>{m()},[t,e.isChartLibraryModal]),y.useEffect(()=>{e.resetTopics&&(m(),e.setResetTopics(!1))},[e.resetTopics]),y.useEffect(()=>{r(e.topics)},[e.topics,e.isChartLibraryModal]);const g=k=>{const{isSelectedChartsTopic:I,setSelectedChartsTopic:D,isFeaturedChartsTopic:O,setFeaturedChartsTopic:$}=e;I&&D(!1),O&&$(!1),e.searchCharts(""),e.isChartLibraryModal?e.selectClientPieceTopic(k):e.selectTopic(k)};let x;e.searchTerms&&e.searchTerms.length>2?e.setSearching(!0):(e.isSearching&&e.setSearching(!1),e.isChartLibraryModal?x=e.selectedCPTopicId:x=e.selectedTopicId);const v={};t.map(k=>(v[k.id]=0,null));const{selectedChartIds:b,chartLibrary:j,isSelectedChartsTopic:w,setSelectedChartsTopic:S,isSearching:_,numCharts:C,isChartLibraryModal:E,isFeaturedChartsTopic:P,setFeaturedChartsTopic:T}=e;b&&j.charts&&b.map(I=>{const D=j.charts.filter(O=>O.id===I)[0];return D&&D.topic?D.topic.id:null}).map(I=>v[I]=v[I]+1||0);const N=n.jsx("div",{className:"topic-card upgrade-topic",onClick:k=>k.stopPropagation(),children:n.jsxs("div",{className:"topic-name",children:[n.jsx(Ze,{to:"#",onClick:k=>{k.preventDefault(),a(!0),e.logEvent(e.user.id,null,"communitycta","open")},children:"Upgrade Your Clearnomics Experience"}),n.jsx("div",{children:"to access the full library"})]})});if(t){const k=t.filter($=>$.is_locked===!1),I=t.filter($=>$.is_locked!==!1),D={name:"Selected Charts",description:"",is_locked:!1,display_order:0},O={name:"Featured Charts",description:"",is_locked:!1,display_order:0};return n.jsxs(n.Fragment,{children:[i&&n.jsx(ii,{setModal:a,modal:i}),E?n.jsxs("div",{id:"topic-wrapper",children:[f&&n.jsx(lr,{isLocked:!1,topic:O,selectTopic:()=>{T(!0),S(!1)},isSelected:!_&&P,numChartsSelected:C||0,isChartLibraryModal:E}),k.map(($,U)=>n.jsx(lr,{topic:$,isSelected:!w&&!P&&!_&&x===$.id,selectTopic:()=>g($.id),isLocked:!1,numChartsSelected:v[$.id],isChartLibraryModal:E},$.id)),I.length>0&&N,I.map(($,U)=>n.jsx(lr,{topic:$,isSelected:!w&&!P&&!_&&x===$.id,selectTopic:()=>g($.id),isLocked:!0,numChartsSelected:v[$.id],isChartLibraryModal:E},$.id))]}):n.jsxs("div",{id:"topic-wrapper",children:[n.jsx(lr,{isLocked:!1,topic:D,selectTopic:()=>{S(!0),T(!1)},isSelected:!_&&w,numChartsSelected:C||0}),f&&n.jsx(lr,{isLocked:!1,topic:O,selectTopic:()=>{T(!0),S(!1)},isSelected:!_&&P,numChartsSelected:C||0}),k.map(($,U)=>n.jsx(lr,{topic:$,isSelected:!w&&!P&&!_&&x===$.id,selectTopic:()=>g($.id),isLocked:!1,numChartsSelected:v[$.id]},$.id)),I.length>0&&N,I.map(($,U)=>n.jsx(lr,{topic:$,isSelected:!w&&!P&&!_&&x===$.id,selectTopic:()=>g($.id),isLocked:!0,numChartsSelected:v[$.id]},$.id))]}),n.jsx("div",{id:"m-topic-wrapper",children:n.jsxs(no,{value:w&&D.name||P&&O.name||(x&&!_&&t.filter($=>$.id===x)[0]?t.filter($=>$.id===x)[0].name:""),name:"Topic",children:[!E&&n.jsx(ei,{value:"Selected Charts",children:n.jsx(lr,{isLocked:!1,topic:D,selectTopic:()=>{S(!0),T(!1)},isSelected:!_&&w,numChartsSelected:C||0})}),f&&n.jsx(ei,{value:"Featured Charts",children:n.jsx(lr,{isLocked:!1,topic:O,selectTopic:()=>{T(!0),S(!1)},isSelected:!_&&P,numChartsSelected:C||0,isChartLibraryModal:E})}),k.map(($,U)=>n.jsx(ei,{value:$.name,children:n.jsx(lr,{topic:$,isSelected:!w&&!P&&!_&&x===$.id,isLocked:!1,selectTopic:()=>g($.id),numChartsSelected:v[$.id],isChartLibraryModal:E},$.id)},$.id)),I.length>0&&n.jsx(ei,{value:"Upgrade Your Clearnomics Experience",onClick:void 0,children:N}),I.map(($,U)=>n.jsx(ei,{value:$.name,children:n.jsx(lr,{topic:$,isSelected:!w&&!P&&!_&&x===$.id,isLocked:!0,selectTopic:()=>g($.id),numChartsSelected:v[$.id],isChartLibraryModal:E},$.id)},$.id))]})})]})}return null}const sye=e=>({selectedTopicId:e.chartbooks.item.selectedTopicId,selectedCPTopicId:e.composer?.piece?.selectedTopicId,selectedChartIds:e.chartbooks.item.selectedChartIds,numCharts:e.chartbooks.item.numCharts,searchTerms:e.chartbooks.item.searchTerms,charts:e.chartbooks.item.charts,clientpiece:e.composer.piece,selectedChartId:e.composer?.piece?.selectedChartId,user:e.auth&&e.auth.user}),oye=le(sye,{selectTopic:CM,searchCharts:ro,selectClientPieceTopic:Fbe,logEvent:_r})(aye);function lye(e){const[t,r]=y.useState(!1),[i,a]=y.useState(!1),[s,o]=y.useState(!1),[l,c]=y.useState(!1),{topics:h,charts:u,resetCharts:d,confirmReset:p,isChartsLoaded:f,chartbook:m,modal:g,clientpiece:x,chartLibrary:v,index:b,isChartEditing:j,nestedChartLibrary:w}=e,S={isSelectedChartsTopic:t,setSelectedChartsTopic:r,isSearching:i,setSearching:a,resetTopics:s,setResetTopics:o,isFeaturedChartsTopic:l,setFeaturedChartsTopic:c};return y.useEffect(()=>{!e.chartbook.selectedChartIds&&o(!0),g&&e.chartbook.selectedChartIds&&!e.clientpiece?.selectedChartId&&o(!0)},[e.chartbook.selectedChartIds,g,e.clientpiece?.selectedChartId]),n.jsxs(n.Fragment,{children:[n.jsx("div",{className:g?"col s12 m3 l3":"col s12 m3 wider-l2",children:n.jsx(oye,{topics:h,...S,index:b,isChartLibraryModal:g,isChartEditing:j,chartLibrary:g?v:w})}),n.jsx("div",{className:g?"col s12 m9 l9":"col s12 m9 wider-l9",children:n.jsx(iye,{chartLibrary:g?v:w,chartbook:m,clientpiece:g&&x,charts:u,topics:h,resetCharts:d,confirmReset:p,isChartsLoaded:f,modal:g,...S,index:b,isChartEditing:j})})]})}const cye=e=>({chartbook:e.chartbooks.item,clientpiece:e.composer.piece,chartLibrary:e.chartlibrary,nestedChartLibrary:e.chartbooks.chartLibrary}),v$=le(cye,{selectTopic:CM})(lye);function dye(e){const[t,r]=y.useState(!1),[i,a]=y.useState(!1),[s,o]=y.useState(!1),[l,c]=y.useState(!1),h=!0,u=e.engagePermissions.max_engage_charts;y.useEffect(()=>{e.getCharts().then(()=>{a(!0)})},[]),y.useEffect(()=>{e.setScrim(!1)},[]),y.useEffect(()=>{e.setScrim(e.isDirty)},[e.isDirty]),y.useEffect(()=>
35{if(!e.modalStatus){const m=document.body.style.top;document.body.style.position="",document.body.style.top="",document.body.style.width="";const g=document.querySelector(".nav-wrapper");g.style.paddingRight="",g.style.paddingLeft="",window.scrollTo(0,parseInt(m||"0")*-1)}},[e.modalStatus]);const d=()=>{r(!0)},p=()=>{r(!1)},f=()=>{c(!0),e.logEvent(e.user.id,null,"communitycta","open")};if(e.chartLibrary){const{charts:m,topics:g}=e.chartLibrary,{isWizard:x}=e;return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"row",children:n.jsxs("div",{className:"chart-library-search",children:[n.jsx(u0,{isWizard:x}),n.jsx(_ve,{handleCancel:d,isWizard:e.isWizard,setMaxChartsModal:o,maxChartsModal:s,handleModalAndEvent:f})]})}),e.isLicenseUpgradable&&e.chartbook.numCharts>e.maxChartbookCharts&&n.jsxs("div",{className:"chart-library-warning-banner",children:[n.jsx("i",{className:"material-icons",children:"warning"}),n.jsxs("div",{className:"banner-text",children:["You have selected more than ",e.maxChartbookCharts," charts for this chartbook. Please remove charts to save your changes",e.user.is_upgrade_disabled?n.jsx(n.Fragment,{children:"."}):n.jsxs(n.Fragment,{children:[n.jsx("span",{children:" or"}),n.jsxs("span",{className:"banner-upgrade",onClick:f,children:[" ","request an upgrade."]})]})]})]}),g&&m&&n.jsx("div",{id:"library-wrapper",className:e.isLicenseUpgradable&&e.chartbook.numCharts>e.maxChartbookCharts?"banner":"",children:n.jsx(v$,{...e,charts:m,topics:g,resetCharts:t,confirmReset:p,isChartsLoaded:i})}),s&&n.jsx(Nu,{maxChartsModal:s,setMaxChartsModal:o,inChartLibrary:h,isWizard:e.isWizard,handleCancel:d,sharedContentDisplayType:"chartbook",maxCharts:u}),l&&n.jsx(ii,{setModal:c,modal:l})]})}return null}const uye=e=>({chartbook:e.chartbooks.item,chartLibrary:e.chartbooks.chartLibrary,isDirty:e.chartbooks.isDirty,engagePermissions:e.auth.user&&e.auth.user.company&&e.auth.user.company.engage_permissions,modalStatus:e.preferences&&e.preferences.modalStatus,maxChartbookCharts:e.auth.user&&e.auth.user.company&&e.auth.user.company.chartbook_permissions&&e.auth.user.company.chartbook_permissions.max_chartbook_charts,user:e.auth.user,isLicenseUpgradable:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.license_type&&e.auth.user.company.license_type.is_upgradable}),b$=le(uye,{getCharts:Kme,setScrim:hn,searchCharts:ro,logEvent:_r})(zt(dye));function hye({getChartbook:e,match:t,chartbook:r,userId:i,showSpinner:a,history:s}){const[o,l]=y.useState(!1);return y.useEffect(()=>{const c=t.params.id;!r||r.id!==c?e(c,i).then(()=>{l(!0)},()=>{s.push("/chartbooks")}):l(!0)},[]),n.jsxs(n.Fragment,{children:[a&&n.jsx(Dn,{}),o?n.jsx("div",{className:"container wizard",children:n.jsxs("div",{className:"cb-editor-wrapper",children:[n.jsx("div",{className:"row",id:"chart-select-title-container",children:n.jsxs("div",{className:"col s12 m12 l12",children:[n.jsx("h3",{children:"Select your charts"}),n.jsx("div",{children:"Browse through the topics on the left and click on a chart to include it in your chartbook. Once you’ve finished making your selections click the “Save” button to see your chartbook."})]})}),n.jsx("div",{className:"row",id:"chart-library",children:n.jsx(b$,{isWizard:!0})})]})}):null]})}const pye=e=>({userId:e.auth.user.id,chartbook:e.chartbooks.item,showSpinner:e.chartbooks.showSpinner||e.composer.showSpinner}),fye=le(pye,{getChartbook:Kf})(hye);function mye({active:e}){return n.jsx("div",{id:"scrim","diagnostic-id":e?"active-scrim":"inactive-scrim",className:e?"":"inactive"})}const gye=e=>({active:e.chartbooks.showScrim}),da=le(gye,{})(mye);class vye extends y.Component{constructor(){super(...arguments),this.handleClick=()=>{this.props.selectChart(this.props.id)}}render(){const{isSelected:t}=this.props,r=t?"selected":"",{name:i,thumb_jpg_url:a,thumb_webp_url:s}=this.props.card,{Locked:o}=_n,l=this.props.allowDesign===o;return n.jsx(n.Fragment,{children:n.jsxs("div",{className:"chart-card","diagnostic-id":"design-card",children:[t?n.jsx("div",{className:"checkmark","diagnostic-id":"checkmark",children:n.jsx("i",{className:"material-icons",children:"done"})}):l?n.jsx("div",{className:"locked-card",children:n.jsx("i",{className:"material-icons","diagnostic-id":"material-lock-icon",children:"lock"})}):n.jsx(n.Fragment,{}),n.jsxs("div",{className:"chart-card-btn-primary",onClick:l?void 0:this.handleClick,children:[n.jsxs("div",{className:"chart-card-title truncate "+r,children:[i,n.jsx("span",{"selected-icon":"✓"})]}),n.jsxs("div",{className:"chartbook-layout-card-image",children:[n.jsx("div",{className:"design-card-placeholder",children:n.jsx("i",{className:"material-icons",children:"wallpaper"})}),n.jsxs("picture",{children:[s&&n.jsx("source",{srcSet:encodeURI(s),type:"image/webp",className:"design-card-img"}),n.jsx("img",{alt:"",src:a,className:"design-card-img"})]})]})]})]})})}}
35const bye=e=>({allowDesign:e.auth.user&&e.auth.user.account_permissions&&e.auth.user.account_permissions.allow_design}),yye=le(bye,{})(vye);class fP extends y.Component{constructor(){super(...arguments),this.selectChart=t=>{this.setState({selected:t},()=>{this.props.handleChange(this.props.category,t)})}}render(){if(this.props.cards){const t=this.props.cards.map((r,i)=>{const{id:a,name:s,thumb_jpg_url:o,thumb_webp_url:l}=r;return n.jsx(yye,{id:a,isSelected:this.props.selected===a,selectChart:this.selectChart,card:{name:s,thumb_jpg_url:o,thumb_webp_url:l}},i)});return n.jsx(n.Fragment,{children:n.jsx("div",{className:"card-container",children:t})})}else return null}}class xye extends y.Component{constructor(){super(...arguments),this.state={layout:this.props.currentLayout,design:this.props.currentDesign,spinner:!1}}componentDidMount(){this.props.getLayouts(this.props.userId),this.props.getDesigns(this.props.userId)}handleUpdate(){this.props.setDirty(!1),this.setState({spinner:!0}),this.props.getThemeId(this.state.layout.id,this.state.design.id,this.props.userId).then(t=>{this.props.updateTheme(t.data[0].id,this.props.userId).then(()=>{this.setState({spinner:!1})})})}handleChange(t,r){const i=t+"s";this.setState({[t]:this.props[i][r]});const a="current"+t.charAt(0).toUpperCase()+t.slice(1);this.props.setDirty(r!==this.props[a].id)}handleCancel(){this.setState({layout:this.props.currentLayout,design:this.props.currentDesign}),this.props.setDirty(!1)}render(){const{Locked:t}=_n;return this.props.layouts&&this.props.designs?n.jsxs("div",{id:"designer-wrapper",children:[n.jsxs("div",{className:"designer-header-grp",children:[n.jsx("h4",{children:"Select a Design"}),n.jsxs("div",{className:"design-btns",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"design-cancel-btn",onClick:this.handleCancel.bind(this),disabled:this.state.layout.id===this.props.currentLayout.id&&this.state.design.id===this.props.currentDesign.id,children:"CANCEL"}),this.props.allowDesign===t?n.jsx(Ke,{placement:"top",title:"Upgrade to customize chartbook covers",children:n.jsx("div",{style:{display:"inline",padding:"12px"},children:n.jsxs("button",{type:"button",className:"btn btn-primary","diagnostic-id":"design-update-btn",disabled:!0,children:["UPDATE",n.jsx("i",{className:"material-icons","diagnostic-id":"material-lock-icon",children:"lock"})]})})}):n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"design-update-btn",onClick:this.handleUpdate.bind(this),disabled:this.state.layout.id===this.props.currentLayout.id&&this.state.design.id===this.props.currentDesign.id||this.state.spinner,children:this.state.spinner?n.jsx(ur,{size:"1.25em",thickness:8,variant:"indeterminate"}):"UPDATE"})]})]}),this.props.currentLayout.type==="default"&&n.jsxs("div",{className:"design-section",id:"layout-design","diagnostic-id":"design-layout-section",style:{border:this.props.currentDesign.type==="default"?"":"none"},children:[n.jsx("h5",{children:"Chartbook Cover Layout"}),n.jsx("p",{children:"Select a Layout:"}),n.jsx(fP,{cards:Object.values(this.props.layouts),selected:this.state.layout.id,handleChange:this.handleChange.bind(this),category:"layout"})]}),this.props.currentDesign.type==="default"&&n.jsxs("div",{className:"design-section","diagnostic-id":"design-design-section",style:{},children:[n.jsx("h5",{children:"Chartbook Cover Background"}),n.jsx("p",{children:"Select a Design:"}),n.jsx(fP,{cards:Object.values(this.props.designs),selected:this.state.design.id,handleChange:this.handleChange.bind(this),category:"design"})]})]}):null}}const jye=e=>{const t=e.auth.user.chartbook_theme,r=e.auth.user.company.chartbook_theme;return{userId:e.auth.user&&e.auth.user.id,layouts:e.chartbooks.layouts,designs:e.chartbooks.designs,currentLayout:t.cover_layout?t.cover_layout:r.cover_layout,currentDesign:t.cover_design?t.cover_design:r.cover_design,allowDesign:e.auth.user&&e.auth.user.account_permissions&&e.auth.user.account_permissions.allow_design}},wye=le(jye,{getLayouts:ege,getDesigns:tge,getThemeId:nge,updateTheme:rge,getUser:Ba})(zt(xye));class Sye extends y.Component{render(){const t=oc[c$],{Locked:r}=_n;return n.jsx(n.Fragment,{children:n.jsx("div",{id:"disclosures-wrapper",children:n.jsx(gt,{initialValues:{disclosures:this.props.company.disclosure_text||""},onSubmit:(i,{setSubmitting:a})=>{this.props.editCompanyDisclosures(this.props.company.id,i.disclosures)},enableReinitialize:!0,validationSchema:_t().shape({disclosures:Ae().max(5e3,"Your disclosures are too long. Please shorten it or contact us for assistance.")}),children:i=>{const{touched:a,errors:s,handleReset:o,dirty:l,isSubmitting:c}=i;return l!==this.props.isDirty&&this.props.setDirty(l),n.jsxs(vt,{children:[n.jsxs("div",{className:"disclosures-header-grp",children:[n.jsxs("div",{id:"disclosures-title-grp",children:[n.jsxs("h4",{"diagnostic-id":"disclosures-header-text",children:[this.props.company.name?this.props.company.name:"Custom"," ","Disclosures"]}),n.jsx(Mo,{id:"disclosures-help",helpAttrs:t})]}),n.jsxs("div",{className:"disclosure-btns",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"disclosures-cancel-btn",onClick:o,disabled:!l||c,children:"RESET"}),this.props.allowDisclosures===r?n.jsx(Ke,{title:"Upgrade to change company disclosures",placement:"top",children:n.jsx("div",{style:{display:"inline",padding:"12px"},children:n.jsxs("button",{type:"button",className:"btn btn-primary",disabled:!0,children:["UPDATE",n.jsx("i",{className:"material-icons","diagnostic-id":"material-lock-icon",children:"lock"})]})})}):n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"disclosures-update-btn",disabled:!l||!!Object.keys(s).length||c,children:"UPDATE"})]})]}),n.jsx("p",{className:"subheader",children:"Note: this updates the disclosures for your entire firm"}),n.jsxs("div",{className:"form-group",children:[n.jsx(me,{component:"textarea",id:"disclosures","diagnostic-id":"disclosures-input",placeholder:"",name:"disclosures",className:s.disclosures&&a.disclosures?"text-input error":""}),s.disclosures&&a.disclosures&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:s.disclosures})]})]})}})})})}}const _ye=e=>({company:e.auth.user.company,allowDisclosures:e.auth.user&&e.auth.user.account_permissions&&e.auth.user.account_permissions.allow_disclosures}),Cye=le(_ye,{editCompanyDisclosures:Tee})(zt(Sye));var Vc={},mP;function Nye(){if(mP)return Vc;mP=1;var e=vn(),t=bn();Object.defineProperty(Vc,"__esModule",{value:!0}),Vc.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M12 2l-5.5 9h11L12 2zm0 3.84L13.93 9h-3.87L12 5.84zM17.5 13c-2.49 0-4.5 2.01-4.5 4.5s2.01 4.5 4.5 4.5 4.5-2.01 4.5-4.5-2.01-4.5-4.5-4.5zm0 7c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zM3 21.5h8v-8H3v8zm2-6h4v4H5v-4z"}),"CategoryOutlined");return Vc.default=a,Vc}var Eye=Nye();const Tye=Zt(Eye);var zc={},gP;function kye(){if(gP)return zc;gP=1;var e=vn(),t=bn();Object.defineProperty(zc,"__esModule",{value:!0}),zc.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M20 0H4v2h16V0zM4 24h16v-2H4v2zM20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 2.75c1.24 0 2.25 1.01 2.25 2.25s-1.01 2.25-2.25 2.25S9.75 10.24 9.75 9 10.76 6.75 12 6.75zM17 17H7v-1.5c0-1.67 3.33-2.5 5-2.5s5 .83 5 2.5V17z"}),"Contacts");return zc.default=a,zc}var Pye=kye();const Iye=Zt(Pye);var Hc={},vP;function Dye(){if(vP)return Hc;vP=1;var e=vn(),t=bn();Object.defineProperty(Hc,"__esModule",{value:!0}),Hc.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"}),"Dashboard");return Hc.default=a,Hc}var Rye=Dye();const Gx=Zt(Rye);var Gc={},bP;function Oye(){if(bP)return Gc;bP=1;var e=vn(),t=bn();Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"}),"Description");return Gc.default=a,Gc}var Aye=Oye();const y0=Zt(Aye);var Wc={},yP;function Mye(){if(yP)return Wc;yP=1;var e=vn(),t=bn();Object.defineProperty(Wc,"__esModule",{value:!0}),Wc.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement(r.Fragment,null,r.createElement("path",{d:"M12 3c-.46 0-.93.04-1.4.14-2.76.53-4.96 2.76-5.48 5.52-.48 2.61.48 5.01 2.22 6.56.43.38.66.91.66 1.47V19c0 1.1.9 2 2 2h.28c.35.6.98 1 1.72 1s1.38-.4 1.72-1H14c1.1 0 2-.9 2-2v-2.31c0-.55.22-1.09.64-1.46C18.09 13.95 19 12.08 19 10c0-3.87-3.13-7-7-7zm2 14h-4v-1h4v1zm-4 2v-1h4v1h-4zm5.31-5.26c-.09.08-.16.18-.24.26H8.92c-.08-.09-.15-.19-.24
35-.27-1.32-1.18-1.91-2.94-1.59-4.7.36-1.94 1.96-3.55 3.89-3.93.34-.07.68-.1 1.02-.1 2.76 0 5 2.24 5 5 0 1.43-.61 2.79-1.69 3.74z"}),r.createElement("path",{d:"M11.5 11h1v3h-1z"}),r.createElement("path",{d:"M9.6724 9.5808l.7071-.707 2.1213 2.1212-.7071.7071z"}),r.createElement("path",{d:"M12.2081 11.7123l-.7071-.7071 2.1213-2.1213.7071.707z"})),"EmojiObjectsOutlined");return Wc.default=a,Wc}var $ye=Mye();const Lye=Zt($ye);var Yc={},xP;function Fye(){if(xP)return Yc;xP=1;var e=vn(),t=bn();Object.defineProperty(Yc,"__esModule",{value:!0}),Yc.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4l6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h7zm-1 7h5.5L14 6.5V12z"}),"FileCopy");return Yc.default=a,Yc}var Uye=Fye();const Bye=Zt(Uye);var Kc={},jP;function qye(){if(jP)return Kc;jP=1;var e=vn(),t=bn();Object.defineProperty(Kc,"__esModule",{value:!0}),Kc.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");return Kc.default=a,Kc}var Vye=qye();const zye=Zt(Vye);var Xc={},wP;function Hye(){if(wP)return Xc;wP=1;var e=vn(),t=bn();Object.defineProperty(Xc,"__esModule",{value:!0}),Xc.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M20 18c1.1 0 1.99-.9 1.99-2L22 6c0-1.11-.9-2-2-2H4c-1.11 0-2 .89-2 2v10c0 1.1.89 2 2 2H0v2h24v-2h-4zM4 16V6h16v10.01L4 16zm9-6.87c-3.89.54-5.44 3.2-6 5.87 1.39-1.87 3.22-2.72 6-2.72v2.19l4-3.74L13 7v2.13z"}),"ScreenShareOutlined");return Xc.default=a,Xc}var Gye=Hye();const SP=Zt(Gye);var Qc={},_P;function Wye(){if(_P)return Qc;_P=1;var e=vn(),t=bn();Object.defineProperty(Qc,"__esModule",{value:!0}),Qc.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"}),"Settings");return Qc.default=a,Qc}var Yye=Wye();const CP=Zt(Yye);var Zc={},NP;function Kye(){if(NP)return Zc;NP=1;var e=vn(),t=bn();Object.defineProperty(Zc,"__esModule",{value:!0}),Zc.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M4 4h7V2H4c-1.1 0-2 .9-2 2v7h2V4zm6 9l-4 5h12l-3-4-2.03 2.71L10 13zm7-4.5c0-.83-.67-1.5-1.5-1.5S14 7.67 14 8.5s.67 1.5 1.5 1.5S17 9.33 17 8.5zM20 2h-7v2h7v7h2V4c0-1.1-.9-2-2-2zm0 18h-7v2h7c1.1 0 2-.9 2-2v-7h-2v7zM4 13H2v7c0 1.1.9 2 2 2h7v-2H4v-7z"}),"Wallpaper");return Zc.default=a,Zc}var Xye=Kye();const Qye=Zt(Xye);function Zye({menuChoice:e,setMenuChoice:t,allowDisclosures:r,allowPersonalize:i,allowDesign:a,currentLayout:s,currentDesign:o,location:l,history:c,tabSelected:h,engage:u,cbCount:d,cpCount:p,insightsVideoCount:f,partnerInsightsCount:m,engagePermissions:g,canUseStudio:x,canUseInsightsExplorer:v}){const b=g.max_engage_chartbooks,j=g.max_engage_clientpieces,w=g?.max_engage_insightsvideos,S=g?.max_engage_partner_insights,{Locked:_,Disabled:C,Enabled:E}=_n,{Settings:P,Engage:T,PartnerInsights:N,Spotlight:k}=qa;let I;const D=g?.allow_engage;y.useEffect(()=>{t(I)},[]);let O=[];const $=[{icon:n.jsx(zye,{}),label:"Logo and Profile",key:"personalize",isLocked:i===_,hideTab:i===C,diagId:"personalizer-tab"},{icon:n.jsx(Qye,{}),label:"Chartbook Design",key:"design",isLocked:a===_,hideTab:a===C||s.type!=="default"&&o.type!=="default",diagId:"design-tab"},{icon:n.jsx(y0,{}),label:"Disclosures",key:"disclosures",isLocked:r===_,hideTab:r===C,diagId:"disclosures-tab"}],U=[{icon:n.jsx(Bye,{}),label:"Shared Content",key:"sharedcontent",isLocked:D===_,hideTab:D===C,diagId:"shared-content-tab"},{icon:n.jsx(Gx,{}),label:"Insights Collection",key:"engageinsightspage",isLocked:D===_,hideTab:D===C,diagId:"insights-collection-tab"},{icon:n.jsx(CP,{}),label:"Settings",key:"engagesettings",isLocked:D===_,hideTab:D===C,diagId:"engage-settings-tab"}],B=[{icon:n.jsx(Gx,{}),label:"Spotlight",key:"spotlight",isLocked:!1,hideTab:!1,diagId:"spotlight-tab"},{icon:n.jsx(Lye,{}),label:"Insights",key:"partnerinsights",isLocked:!1,hideTab:!1,diagId:"partner-insights-tab"},{icon:n.jsx(Tye,{}),label:"Solutions",key:"solutions",isLocked:!1,hideTab:!1,diagId:"solutions-tab"},{icon:n.jsx(Iye,{}),label:"Contacts",key:"partnercontacts",isLocked:!1,hideTab:!1,diagId:"contacts-tab"},{icon:n.jsx(CP,{}),label:"Settings",key:"partnersettings",isLocked:!1,hideTab:!1,diagId:"settings-tab"}];switch(h){case P:O=$,I=$.filter(R=>!R.hideTab)[0].key;break;case T:O=U,I="sharedcontent";break;case k:O=B,I="spotlight";break;default:O=[]}y.useEffect(()=>{const R=Ni.parse(l.search),F=R.view&&O.filter(X=>!X.hideTab).map(X=>X.key).includes(R.view),q=R.view&&(R.view===P||O.map(X=>X.key).includes(R.view)),V=F?O.find(X=>X.key===R.view):q&&O.find(X=>!X.hideTab);V?!e&&t(V.key):c.push("/insights")},[]),y.useEffect(()=>{e?h===P?c.push(`/settings?view=${e}`):c.push(`/insights?view=${e}`):c.push("/insights")},[e]);const L=R=>{(h!==T||D!==_&&D!==C)&&t(R)},A=n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"num-shared-group",children:[n.jsxs("div",{className:"content-type-count-label-container",children:[n.jsx("div",{className:"content-type-label",children:"Chartbooks"}),n.jsx("div",{className:"content-count-label","diagnostic-id":"cb-count-label",children:`${d} shared`})]}),n.jsx("div",{className:"content-remaining-label","diagnostic-id":"cb-remaining-label",children:`(${b-d} remaining)`})]}),n.jsxs("div",{className:"num-shared-group",children:[n.jsxs("div",{className:"content-type-count-label-container",children:[n.jsx("div",{className:"content-type-label",children:"Commentaries"}),n.jsx("div",{className:"content-count-label","diagnostic-id":"cp-count-label",children:`${p} shared`})]}),n.jsx("div",{className:"content-remaining-label","diagnostic-id":"cp-remaining-label",children:`(${j-p} remaining)`})]}),x&&n.jsxs("div",{className:"num-shared-group",children:[n.jsxs("div",{className:"content-type-count-label-container",children:[n.jsx("div",{className:"content-type-label",children:"Insights Videos"}),n.jsx("div",{className:"content-count-label","diagnostic-id":"insights-video-count-label",children:`${f} shared`})]}),n.jsx("div",{className:"content-remaining-label","diagnostic-id":"insights-video-remaining-label",children:`(${w-f} remaining)`})]}),v&&n.jsxs("div",{className:"num-shared-group",children:[n.jsxs("div",{className:"content-type-count-label-container",children:[n.jsx("div",{className:"content-type-label",children:"Partner Insights"}),n.jsx("div",{className:"content-count-label","diagnostic-id":"partner-insight-count-label",children:`${m} shared`})]}),n.jsx("div",{className:"content-remaining-label","diagnostic-id":"partner-insight-remaining-label",children:`(${S-m} remaining)`})]})]});
35return n.jsxs(n.Fragment,{children:[n.jsx("div",{id:"drawer-tabs-container",children:O.map(R=>{const{icon:F,label:q,key:V,hideTab:X,isLocked:M,diagId:W}=R;return X?null:n.jsx("div",{className:`drawer-tab${e===V?" active":""}${h===T&&M?" locked":""}`,"diagnostic-id":W,onClick:()=>L(V),children:n.jsxs("div",{className:"drawer-tab-label","diagnostic-id":`${W}-label`,children:[n.jsxs("div",{className:"label-group",children:[F,n.jsx("div",{className:"label-text",children:q})]}),M&&n.jsx("i",{className:"material-icons drawer-lock","diagnostic-id":"material-lock-icon",children:"lock"})]})},V)})}),h===T&&D===E&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"currently-shared-container",children:[n.jsxs("div",{className:"currently-shared-title-group",children:[n.jsx(SP,{}),"Currently Sharing",n.jsx(Ke,{title:"This is the total number of shared insights that are currently live across your company",placement:"top",children:n.jsx("i",{className:"material-icons","diagnostic-id":"help-icon",children:"help_outline"})})]}),A]}),n.jsxs("div",{className:"contact-to-inquire-container",children:[n.jsxs("button",{className:"btn-primary-text",onClick:()=>window.Intercom("show"),children:["Contact us"," "]}),"to inquire about sharing additional content"]})]}),n.jsxs("div",{id:"m-drawer-tabs-container",children:[n.jsx(no,{value:e,name:"Settings",children:O.map(R=>{const{icon:F,label:q,key:V,hideTab:X,isLocked:M}=R;return X?null:n.jsx(ei,{value:V,children:n.jsxs("div",{className:"drawer-tab-dropdown-card",onClick:()=>L(V),children:[n.jsx("div",{className:"drawer-tab-label",children:q}),M&&n.jsx("i",{className:"material-icons drawer-lock",children:"lock"})]})},V)})}),h===T&&D===E&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"m-currently-shared-container",children:[n.jsxs("div",{className:"currently-shared-title-group",children:[n.jsx(SP,{}),"Currently Sharing",n.jsx(Ke,{title:"This is the total number of shared insights that are currently live across your company",placement:"top",children:n.jsx("i",{className:"material-icons","diagnostic-id":"help-icon",children:"help_outline"})})]}),A]}),n.jsxs("div",{className:"m-contact-to-inquire-container",children:[n.jsxs("button",{className:"btn-primary-text",onClick:()=>window.Intercom("show"),children:["Contact us"," "]}),"to inquire about sharing additional content"]})]})]})]})}const Jye=e=>{const t=e.auth.user.chartbook_theme,r=e.auth.user.company.chartbook_theme;return{allowDesign:e.auth.user&&e.auth.user.account_permissions&&e.auth.user.account_permissions.allow_design,allowPersonalize:e.auth.user&&e.auth.user.account_permissions&&e.auth.user.account_permissions.allow_personalize,allowDisclosures:e.auth.user&&e.auth.user.account_permissions&&e.auth.user.account_permissions.allow_disclosures,currentLayout:t.cover_layout?t.cover_layout:r.cover_layout,currentDesign:t.cover_design?t.cover_design:r.cover_design,engage:e.engage,cbCount:e.engage.numSharedChartbooks,cpCount:e.engage.numSharedClientPieces,insightsVideoCount:e.engage.numSharedInsightsVideos,partnerInsightsCount:e.engage.numSharedPartnerInsights,engagePermissions:e.auth.user&&e.auth.user.company&&e.auth.user.company.engage_permissions,canUseStudio:e.auth.user&&e.auth.user.can_use_studio,canUseInsightsExplorer:e.auth&&e.auth.user&&e.auth.user.can_use_insights_explorer}},x0=Jt(le(Jye,{})(Zye)),Eo=({id:e,className:t,diagId:r,acceptedTypes:i,name:a,onChange:s,value:o,disabled:l})=>n.jsx("input",{id:e,"diagnostic-id":r,name:a,type:"file",accept:i,value:o,onChange:s,className:t,disabled:l});class exe extends y.Component{constructor(){super(...arguments),this.state={profile:null,logo:null,isProfileCleared:!1}}componentDidUpdate(){(this.state.profile||this.state.logo||this.state.isProfileCleared)&&!this.props.isDirty?this.props.setDirty(!0):!(this.state.profile||this.state.logo||this.state.isProfileCleared)&&this.props.isDirty&&this.props.setDirty(!1)}render(){const t=this.props.user.id,r=this.state.logo||this.props.user.company.logo_url,i=this.state.profile||this.props.user.profile_picture_url,a=(h,u,d,p,f,m)=>{h===void 0?(this.setState({[p]:null}),p==="logo"?(delete d.logoFile,delete u.logoFile):(this.state.isProfileCleared&&this.setState({isProfileCleared:!1}),delete d.profileFile,delete u.profileFile)):Bo(h)?h&&h.size>1048576?(this.setState({[p]:null}),m(`${p}File`,void 0,!1),f(p+"File","That file is larger than 1MB. Please use a smaller file or contact us for help.")):(this.setState({[p]:URL.createObjectURL(h)}),p==="logo"?(m("logoFile",h),delete u.logoFile):(this.state.isProfileCleared&&this.setState({isProfileCleared:!1}),m("profileFile",h),delete u.profileFile)):f(p+"File","Image must be a PNG or JPG/JPEG file.")},s=(h,u,d)=>{u("profileFile",null),this.setState({isProfileCleared:!0})},{account_permissions:o}=this.props.user,{allow_personalize:l}=o,{Locked:c}=_n;return n.jsx("div",{id:"personalizer-wrapper",children:n.jsx(gt,{initialValues:{logoFile:void 0,profileFile:void 0},onSubmit:(h,{setSubmitting:u})=>{this.props.editUserLogoProfile(t,h.logoFile,h.profileFile,this.state.isProfileCleared).then(this.props.getUser).then(()=>{this.setState({profile:null,logo:null,isProfileCleared:!1})})},enableReinitialize:!0,children:h=>{const{values:u,touched:d,errors:p,setFieldError:f,setFieldValue:m}=h;return n.jsxs(vt,{children:[n.jsx("div",{className:"row",children:n.jsxs("div",{className:"form-group personalize-btns",children:[n.jsx("h4",{children:"Add a Logo and Profile Picture"}),l===c?n.jsx(Ke,{title:"Upgrade to brand and personalize chartbooks",placement:"top",children:n.jsx("div",{style:{display:"inline",padding:"12px"},children:n.jsxs("button",{type:"button",className:"btn btn-primary","diagnostic-id":"personalizer-update-btn",disabled:!0,children:["UPDATE",n.jsx("i",{className:"material-icons","diagnostic-id":"material-lock-icon",children:"lock"})]})})}):n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"personalizer-update-btn",disabled:!this.state.profile&&!this.state.isProfileCleared&&!this.state.logo,children:"UPDATE"})]})}),n.jsx("div",{className:"row",id:"personalizer-top",children:n.jsxs("div",{className:"col s12 m12 l6 personalizer-group",id:"personalizer-left",children:[n.jsx("h5",{children:"Upload a Logo"}),n.jsx("p",{className:"subheader",children:"Note: this updates the logo for your entire firm"}),p.logoFile&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:p.logoFile}),n.jsx("input",{id:"logoFile","diagnostic-id":"personalizer-logo-input",n
35ame:"logoFile",type:"file",accept:"image/png,image/x-png,image/jpeg",value:this.state.logo?this.state.logo.name:"",disabled:l===c,onChange:g=>{a(g.currentTarget.files[0],p,u,"logo",f,m)},className:p.logoFile&&d.logoFile?"text-input error":"file-path validate"}),r&&n.jsxs("div",{className:"img-upload-grp",children:[n.jsx(Eo,{id:"logoFile",diagId:"logo-upload-drag-drop-input",name:"logoFile",acceptedTypes:"image/png,image/x-png,image/jpeg,image/jpg",value:this.state.logo?this.state.logo.name:"",disabled:l===c,onChange:g=>{a(g.currentTarget.files[0],p,u,"logo",f,m)},className:p.logoFile&&d.logoFile?"text-input error":"file-path validate"}),n.jsx("div",{className:"image-group",children:n.jsx("img",{alt:"Logo",src:r})}),this.state.logo&&n.jsx("button",{id:"clear-btn",type:"button",onClick:()=>{a(void 0,p,u,"logo",f,m)},children:"Undo"})]})]})}),n.jsx("div",{className:"row",children:n.jsxs("div",{className:"col s12 m12 l6 personalizer-group",id:"personalizer-bottom",children:[n.jsx("h5",{children:"Upload a Profile Picture"}),n.jsx("p",{className:"subheader",children:"Add a profile picture to your chartbook cover page"}),p.profileFile&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:p.profileFile}),n.jsx("input",{id:"profileFile","diagnostic-id":"personalizer-profilepic-input",placeholder:"",name:"profileFile",type:"file",accept:"image/png,image/x-png,image/jpeg",value:this.state.profile?this.state.profile.name:"",disabled:l===c,onChange:g=>{a(g.currentTarget.files[0],p,u,"profile",f,m)},className:p.profileFile&&d.profileFile?"text-input error":"file-path validate"}),i?n.jsxs("div",{className:"img-upload-grp","diagnostic-id":"profile-pic-img-grp",children:[n.jsx(Eo,{id:"profileFile",diagId:"image-upload-drag-drop-input",name:"profileFile",acceptedTypes:"image/png,image/x-png,image/jpeg,image/jpg",value:this.state.profile?this.state.profile.name:"",disabled:l===c,onChange:g=>{a(g.currentTarget.files[0],p,u,"profile",f,m)},className:p.profileFile&&d.profileFile?"text-input error":"file-path validate"}),n.jsxs("div",{className:"image-group",children:[this.state.isProfileCleared?n.jsx("h6",{className:"cleared-profile-text",children:"Profile Picture Removed"}):n.jsx("img",{alt:"Profile",src:i}),!this.state.isProfileCleared&&this.props.user.profile_picture_url&&!this.state.profile&&n.jsx(Ke,{title:"Clear profile picture",placement:"top",children:n.jsx("div",{className:"clear-picture-container",children:n.jsx("i",{className:"material-icons","diagnostic-id":"profile-pic-clear-btn",onClick:()=>s(u,m),children:"cancel"})})})]}),(this.state.isProfileCleared||this.state.profile)&&n.jsx("button",{id:"clear-btn",type:"button",onClick:()=>a(void 0,p,u,"profile",f,m),children:"Undo"})]}):n.jsxs("div",{className:`img-upload-grp${i?" with-img":" without-img"}`,"diagnostic-id":"profile-pic-img-grp",children:[n.jsxs("div",{className:"image-group-placeholder",children:[n.jsx("i",{className:"material-icons",children:"panorama"}),n.jsx("p",{children:"Drag and drop an image file here, or click to select a file to upload"})]}),n.jsx(Eo,{id:"profileFile",diagId:"image-upload-drag-drop-input",name:"profileFile",acceptedTypes:"image/png,image/x-png,image/jpeg,image/jpg",value:this.state.profile?this.state.profile.name:"",disabled:l===c,onChange:g=>{a(g.currentTarget.files[0],p,u,"profile",f,m)},className:p.profileFile&&d.profileFile?"text-input error":"file-path validate"})]})]})})]})}})})}}const txe=e=>({user:e.auth.user}),nxe=le(txe,{getUser:Ba,editUserLogoProfile:kee})(zt(exe)),rxe={personalize:0,design:1,disclosures:2};function ixe(e){const{setScrim:t,tabSelected:r}=e,[i,a]=y.useState(""),[s,o]=y.useState(!1);y.useEffect(()=>{const h=Ni.parse(e.location.search),u=h.view&&Object.keys(rxe).includes(h.view);h.view&&!u&&e.history.push("/settings"),u&&a(h.view)},[]);const l=h=>{s?window.confirm(ko)&&(a(h),o(!1)):a(h)};y.useEffect(()=>{e.history.push(`/settings${i!=="settings"?`?view=${i}`:""}`)},[i]),y.useEffect(()=>{t(!1)},[]);const c={personalize:n.jsx(nxe,{isDirty:s,setDirty:o}),design:n.jsx(wye,{isDirty:s,setDirty:o}),disclosures:n.jsx(Cye,{isDirty:s,setDirty:o})};return n.jsxs("div",{className:"container",children:[n.jsx("div",{className:"back-link-wrapper to-insights-explorer",children:n.jsxs(Ze,{to:{pathname:"/insights",search:"?view=explorer"},className:"back-link","diagnostic-id":"insights-explorer-back-btn",children:[n.jsx(ir,{}),n.jsx("span",{children:"Back to Insights Explorer"})]})}),n.jsx("h2",{className:"canvas-header",children:"Design"}),n.jsxs("div",{className:"row fadeTransition",id:"settings-wrapper",children:[n.jsx("div",{className:"navigation-drawer",id:"settings-drawer",children:n.jsx(x0,{setMenuChoice:l,menuChoice:i,tabSelected:"settings"})}),n.jsx(da,{}),n.jsx("div",{className:"navigation-body",id:"settings-body",children:c[i]})]})]})}const axe=e=>({}),sxe=le(axe,{setScrim:hn})(ixe),{apiAddress:Gt}=Tn,y$=1e5,{Spotlight:Yr,Solution:Kr,Insight:oxe}=on,{TextSection:nf,Documents:x$,TeamProfile:j$,Highlights:w$,Image:S$,SolutionsGallery:_$,InsightsGallery:C$}=Bn,N$=()=>(e,t)=>{const r=t().auth.user.company.id;return e({type:dB}),Ne.get(`${Gt}api/orgs/${r}/partner/`,Ee(t)).then(i=>(e({type:uB,payload:i.data}),i)).catch(i=>{e({type:hB}),i.message!==Ue&&e(he({serverError:"There was a problem fetching your settings, please try again"}))})},E$=()=>(e,t)=>{const r=t().auth.user.company.id,i=`${Gt}api/orgs/${r}/partner/design/`;return Ne.get(i,Ee(t)).then(a=>{e({type:pB,payload:a.data})})},lxe=e=>(t,r)=>{const i=r().auth.user.company.id;t({type:uq});const a={overlay_design:e.overlayDesign,primary_color:e.primaryColor,text_color:e.textColor},s=`${Gt}api/orgs/${i}/partner/`,o=Ee(r);return Ne.patch(s,a,o).then(l=>(t({type:hq,payload:l.data}),t(he({alertMessage:"Partner settings saved."})),l.data)).catch(l=>{l.message!==Ue&&t(he({serverError:"There was a problem updating your settings, please try again"}))})},T$=e=>(t,r)=>(t({type:eB}),Ne.get(`${Gt}api/users/${e}/solutions/?view=edit`,Ee(r)).then(i=>(t({type:tB,payload:i.data}),i)).catch(i=>{t({type:ri})})),cxe=(e,t,r)=>(i,a)=>{const s=`${Gt}api/users/${t}/${r}s/${e}/`,o=r==="solution"?_q:r==="partner-insight"?Cq:null,l=r==="solution"?"Solution Page":r==="partner-insight"?"Partner Insight":"";return Ne.delete(s,Ee(a)).then(c=>(i({type:o,payload:e}),i(he({alertMessage:`${l} Successfully Deleted`})),c)).catch(c=>{c.message!==Ue&&i(he({serverError:`There was a problem deleting this ${l}, please try again`}))})},dxe=(e,t,r,i,a)=>(s,o)=>{const l=`${Gt}api/users/${e}/solutions/`,c={title:r||"Partner Solution",category:t,tags:a||"",website:i};
35return s({type:FB}),Ne.post(l,c,Ee(o)).then(h=>(s({type:UB,payload:h.data}),s(he({alertMessage:"New Partner Solution Created"})),h.data.page_slug),h=>(s({type:ri}),h.message!==Ue&&s(he({serverError:"There was a problem creating this solution, please try again"})),Promise.reject(()=>{})))},uxe=(e,t,r)=>(i,a)=>{const s=`${Gt}api/users/${t}/${r}/${e}/publish/`,o={},l=r===Yr?"spotlight page":r===Kr?"solution page":"";return i({type:KB}),Ne.post(s,o,Ee(a)).then(c=>(i({type:r===Yr?XB:r===Kr?QB:null,payload:c.data}),i(he({alertMessage:`Your ${l} has been published.`})),c.data)).catch(c=>{i({type:Ti}),c.message!==Ue&&i(he({serverError:`There was a problem publishing your ${l}, please try again`}))})},hxe=(e,t,r)=>(i,a)=>{const s=`${Gt}api/users/${t}/${r}/${e}/`,o={is_enabled:!1},l=r===Yr?"spotlight page":r===Kr?"solution page":"";return i({type:GB}),Ne.patch(s,o,Ee(a)).then(c=>(i({type:r===Yr?WB:r===Kr?YB:null,payload:c.data}),i(he({alertMessage:`Your ${l} has been unpublished.`})),c.data)).catch(c=>{if(i({type:Ti}),c.message!==Ue)return i(he({serverError:`There was a problem unpublishing your ${l}, please try again`}))})},pxe=(e,t)=>(r,i)=>{const a=`${Gt}api/users/${t}/partner-insights/${e}/?view=preview`;return r({type:lB}),Ne.get(a,Ee(i)).then(s=>{r({type:cB,payload:s.data})},s=>(r({type:ID}),s.message!==Ue&&r(he({serverError:"There was a problem retrieving this partner insight page, please try again"})),Promise.reject(()=>{})))},fxe=e=>(t,r)=>{t({type:OB});const i=`${Gt}api/users/${e}/partner-insights/?view=published`;return Ne.get(i,Ee(r)).then(a=>{t({type:AB,payload:a.data})},a=>(t({type:ri}),a.message!==Ue&&t(he({serverError:"There was a problem retrieving your partner insights, please try again"})),Promise.reject(()=>{})))},k$=e=>(t,r)=>(t({type:iB}),Ne.get(`${Gt}api/users/${e}/partner-insights/`,Ee(r)).then(i=>(t({type:aB,payload:i.data}),i)).catch(i=>{t({type:ri})})),mxe=(e,t)=>(r,i)=>{r({type:sB});const a=`${Gt}api/users/${t}/partner-insights/${e}/`;return Ne.get(a,Ee(i)).then(s=>{r({type:oB,payload:s.data})},s=>(r({type:ID}),s.message!==Ue&&r(he({serverError:"There was a problem retrieving this partner insight page, please try again"})),Promise.reject(()=>{})))},gxe=(e,t,r,i)=>(a,s)=>{const o=`${Gt}api/users/${e}/partner-insights/`,l={title:r||"Partner Insight",tags:i||"",partner_insight_type:t||"Advisor"};return a({type:jB}),Ne.post(o,l,Ee(s)).then(c=>(a({type:wB,payload:c.data}),a(he({alertMessage:"New Partner Insight Created"})),c.data.id),c=>(a({type:ri}),c.message!==Ue&&a(he({serverError:"There was a problem creating this partner insight, please try again"})),Promise.reject(()=>{})))},vxe=(e,t,r,i)=>(a,s)=>{const o=`${Gt}api/users/${t}/partner-insights/${e}/`,l={title:r,tags:i||null};return a({type:OD}),Ne.patch(o,l,Ee(s)).then(c=>{a({type:AD,payload:c.data}),a(he({alertMessage:"Partner Insight Updated"}))}).catch(c=>{a({type:ri}),c.message!==Ue&&a(he({serverError:"There was a problem updating this partner insight, please try again"}))})},bxe=(e,t,r)=>(i,a)=>{const s=`${Gt}api/users/${t}/partner-insights/${e}/`,o=new FormData;o.append("preview_image",r),i({type:OD});const l=Ee(a,Xn);return Ne.patch(s,o,l).then(c=>{i({type:AD,payload:c.data}),i(he({alertMessage:"Partner Insight Updated"}))}).catch(c=>(i({type:ri}),c.message!==Ue&&i(he({serverError:"There was a problem updating this partner insight, please try again"})),Promise.reject(c)))},yxe=(e,t,r,i,a)=>(s,o)=>{const l=`${Gt}api/users/${t}/partner-insights/${e}/`,c={[`${r}_id`]:i||null,type:a};return s({type:Ks}),Ne.patch(l,c,Ee(o)).then(h=>{s({type:qo,payload:h.data}),s(he({alertMessage:"Partner Insight Updated"}))}).catch(h=>(s({type:ri}),h.message!==Ue&&s(he({serverError:"There was a problem updating this partner insight, please try again"})),Promise.reject(h)))},xxe=(e,t,r)=>(i,a)=>{const s=`${Gt}api/users/${t}/partner-insights/${e}/`,o={summary_text:r};return i({type:Ks}),Ne.patch(s,o,Ee(a)).then(l=>{i({type:qo,payload:l.data}),i(he({alertMessage:"Your summary text has been saved."}))}).catch(l=>(i({type:ri}),l.message!==Ue&&i(he({serverError:"There was a problem updating the summary text, please try again"})),Promise.reject(l)))},jxe=(e,t,r)=>(i,a)=>{const s=`${Gt}api/users/${t}/partner-insights/${e}/`,o={advisor_notes_text:r};return i({type:Ks}
35),Ne.patch(s,o,Ee(a)).then(l=>(i({type:qo,payload:l.data}),i(he({alertMessage:"Your advisor notes have been saved."})),l.data)).catch(l=>(i({type:ri}),l.message!==Ue&&i(he({serverError:"There was a problem updating the advisor notes, please try again"})),Promise.reject(l)))},wxe=(e,t,r,i)=>(a,s)=>{const o=`${Gt}api/users/${t}/partner-insights/${e}/`,l={[`can_customize_${r}`]:!i};return a({type:Ks}),Ne.patch(o,l,Ee(s)).then(c=>{a({type:qo,payload:c.data}),a(he({alertMessage:"Your change has been saved."}))}).catch(c=>(a({type:ri}),c.message!==Ue&&a(he({serverError:"There was a problem updating the partner insight, please try again"})),Promise.reject(c)))},Sxe=(e,t,r)=>(i,a)=>{const s=`${Gt}api/users/${t}/partner-insights/${e}/`,o={show_chartbook_notes:!r};return i({type:Ks}),Ne.patch(s,o,Ee(a)).then(l=>{i({type:qo,payload:l.data}),i(he({alertMessage:"Your change has been saved."}))}).catch(l=>(i({type:ri}),l.message!==Ue&&i(he({serverError:"There was a problem updating the partner insight, please try again"})),Promise.reject(l)))},_xe=(e,t)=>(r,i)=>{const a=`${Gt}api/users/${t}/partner-insights/${e}/request/`,s={};return r({type:Ks}),Ne.post(a,s,Ee(i)).then(o=>{r({type:fB,payload:o.data}),r(he({alertMessage:"Your partner insight was submitted for review"}))}).catch(o=>(r({type:ri}),o.message!==Ue&&r(he({serverError:"There was a problem publishing your partner insight, please try again"})),Promise.reject(o)))},Cxe=(e,t,r)=>(i,a)=>{const s=`${Gt}api/users/${t}/partner-insights/${e}/`,o={solutions:JSON.stringify(r)};return i({type:Ks}),Ne.patch(s,o,Ee(a)).then(l=>{i({type:qo,payload:l.data}),i(he({alertMessage:"Your related solutions have been updated."}))}).catch(l=>(i({type:ri}),l.message!==Ue&&i(he({serverError:"There was a problem updating the related solutions, please try again"})),Promise.reject(l)))},Nxe=(e,t,r)=>(i,a)=>{const s=`${Gt}api/users/${t}/partner-insights/${e}/`,o={question_answers:JSON.stringify(r)};return i({type:Ks}),Ne.patch(s,o,Ee(a)).then(l=>{i({type:qo,payload:l.data}),i(he({alertMessage:"Your client questions have been updated."}))}).catch(l=>(i({type:ri}),l.message!==Ue&&i(he({serverError:"There was a problem updating the client questions, please try again"})),Promise.reject(l)))},Exe=e=>(t,r)=>{t({type:MB});const i=`${Gt}api/users/${e}/solutions/`;return Ne.get(i,Ee(r)).then(a=>{t({type:$B,payload:a.data})},a=>(t({type:Ti}),a.message!==Ue&&t(he({serverError:"There was a problem retrieving your solutions, please try again"})),Promise.reject(()=>{})))},Txe=(e,t)=>(r,i)=>{r({type:PD});const a=`${Gt}api/users/${t}/solutions/${e}/?view=edit`;return Ne.get(a,Ee(i)).then(s=>{r({type:rB,payload:s.data})},s=>(r({type:Ti}),s.message!==Ue&&r(he({serverError:"There was a problem retrieving this solution page, please try again"})),Promise.reject(()=>{})))},P$=(e,t)=>(r,i)=>{r({type:PD});const a=`${Gt}api/users/${t}/solutions/${e}/`;return Ne.get(a,Ee(i)).then(s=>(r({type:nB,payload:s.data}),s.data),s=>{r({type:Ti}),s.message!==Ue&&r(he({serverError:"This page is unavailable."}))})},kxe=(e,t,r,i,a,s)=>(o,l)=>{const c=`${Gt}api/users/${t}/solutions/${e}/`,h={header:{title:r,website:i,category:a,tags:s||null}};return o({type:BB}),Ne.patch(c,h,Ee(l)).then(u=>{o({type:qB,payload:u.data}),o(he({alertMessage:"Solution Page Updated"}))}).catch(u=>{o({type:ri}),u.message!==Ue&&o(he({serverError:"There was a problem updating this solution page, please try again"}))})},I$=(e,t)=>
35(r,i)=>{r({type:kj});const a=`${Gt}api/users/${t}/spotlight/${e}/?view=edit`;return Ne.get(a,Ee(i)).then(s=>{r({type:JU,payload:s.data})},s=>(r({type:Ti}),s.message!==Ue&&r(he({serverError:"There was a problem retrieving this partner spotlight page, please try again"})),Promise.reject(()=>{})))},D$=(e,t)=>(r,i)=>{r({type:kj});const a=`${Gt}api/users/${t}/spotlight/${e}/`;return Ne.get(a,Ee(i)).then(s=>(r({type:kD,payload:s.data}),s.data),s=>{r({type:Ti})})},Pxe=(e,t)=>(r,i)=>{r({type:kj});const a=`${Gt}api/users/${t}/spotlight/${e}/?view=partner`;return Ne.get(a,Ee(i)).then(s=>(r({type:kD,payload:s.data}),s.data),s=>{r({type:Ti}),s.message!==Ue&&r(he({serverError:"There was a problem retrieving this partner spotlight page, please try again"}))})},Ixe=(e,t,r,i)=>(a,s)=>{const o=`${Gt}api/users/${t}/${r}/${e}/`,l=r===Yr?"description":r===Kr?"solution overview":"",c={description:i};return a({type:ZB}),Ne.patch(o,c,Ee(s)).then(h=>{a({type:r===Yr?JB:r===Kr?eq:null,payload:h.data}),a(he({alertMessage:`Your ${l} has been saved`}))}).catch(h=>{if(a({type:Ti}),h.message!==Ue)return a(he({serverError:`There was a problem updating your ${l}, please try again`}))})},Dxe=(e,t,r)=>(i,a)=>{const s=new FormData;s.append("banner",r);const o=`${Gt}api/users/${t}/spotlight/${e}/`;i({type:kB});const l=Ee(a,Xn);return Ne.patch(o,s,l).then(c=>{i({type:PB,payload:c.data}),i(he({alertMessage:"Your banner has been updated"}))}).catch(c=>(i({type:Ti}),c.message!==Ue&&i(he({serverError:"There was a problem updating your banner. Please contact us for assistance."})),Promise.reject(c)))},Rxe=(e,t,r,i)=>(a,s)=>{const o=`${Gt}api/users/${t}/${r}/${e}/`,l={disclosures:i};return a({type:IB}),Ne.patch(o,l,Ee(s)).then(c=>{a({type:r===Yr?DB:r===Kr?RB:null,payload:c.data}),a(he({alertMessage:"Your disclosures have been saved."}))}).catch(c=>{if(a({type:Ti}),c.message!==Ue)return a(he({serverError:"There was a problem updating your disclosures, please try again"}))})},Oxe=(e,t,r)=>(i,a)=>{const s=`${Gt}api/users/${t}/spotlight/${e}/`,o={company_locations:JSON.stringify(r)};return i({type:oq}),Ne.patch(s,o,Ee(a)).then(l=>{i({type:lq,payload:l.data}),i(he({alertMessage:"Your company locations have been saved."}))}).catch(l=>{if(i({type:Ti}),l.message!==Ue)return i(he({serverError:"There was a problem updating your company locations, please try again"}))})},cc=(e,t,r,i,a,s,o)=>(l,c)=>{const h=`${Gt}api/users/${e}/${a}/${t}/sections/`,u=new FormData,d={type:r,index:i||0};if(Object.keys(d).forEach(f=>{const m=d[f];u.append(f,m)}),o&&u.append("title",o),s&&(r===w$||r===j$||r===_$||r===C$)&&u.append(r,JSON.stringify(s)),s&&(r===S$||r===nf)&&u.append(r,s),s&&r===x$){const f=[];s.forEach(m=>{m.pdf_url?(f.push({label:m.label,type:"pdf",filename:m.pdf_url.name}),u.append(`${r}`,m.pdf_url)):f.push({label:m.label,type:"url",link_url:m.external_document_url})}),u.append(`${r}_info`,JSON.stringify(f))}const p=Ee(c,Xn);if(l({type:NB}),r===nf&&s.length>y$)l(he({serverError:"This text section is too long. Please shorten it or contact us for assistance"}));else return Ne.post(h,u,p).then(f=>(l({type:a===Yr?EB:a===Kr?TB:null,payload:f.data,index:i}),f.data)).catch(f=>{f.message!==Ue&&l(he({serverError:"There was a problem adding this section, please try again"}))})},Axe=(e,t,r,i,a,s)=>(o,l)=>{const c=i===Yr?l().spotlight.partnerSpotlightPage.sections:i===Kr?l().spotlight.solutions.page.sections:null,h=`${Gt}api/users/${e}/${i}/${r}/sections/${t}/`,u=i===Yr?mB:i===Kr?gB:null,d={new_index:s};let p=[];const f=Array.from(c),[m]=f.splice(a,1);if(f.splice(s,0,m),(s||s===0)&&s!==a)return o({type:u,payload:f,id:t}),Ne.patch(h,d,Ee(l)).then(g=>(g.status===200&&(p=f,o({type:u,id:t,payload:p})),g.data)).catch(g=>{p=c,o({type:u,payload:p,id:t}),g.message!==Ue&&o(he({serverError:"There was a problem reordering your sections, please try again"}))})},Mxe=(e,t,r,i)=>(a,s)=>{const o=`${Gt}api/users/${t}/${i}/${r}/sections/${e}/`;return Ne.delete(o,Ee(s)).then(l=>(a({type:i===Yr?cq:i===Kr?dq:null,id:e}),a(he({alertMessage:"Section Successfully Deleted"})),l)).catch(l=>{l.message!==Ue&&a(he({serverError:"There was a problem deleting this section, please try again"}))})},dm=(e,t,r,i,a,s,o)=>(l,c)=>{const h=`${Gt}api/users/${e}/${a}/${t}/sections/${i}/`,u=new FormData;if(u.append("type",r),u.append("title",o||""),s&&(r===w$||r===j$||r===_$||r===C$)&&u.append(r,JSON.stringify(s)),(s||s==="")&&(r===S$||r===nf)&&u.append(r,s),s&&r===x$){const d=[];
35s.forEach(p=>{p.pdf_url&&typeof p.pdf_url=="object"?(d.push({label:p.label,type:"pdf",filename:p.pdf_url.name,id:p.id}),u.append(`${r}`,p.pdf_url)):d.push({label:p.label,type:"url",link_url:p.pdf_url?p.pdf_url:p.external_document_url,id:p.id})}),u.append(`${r}_info`,JSON.stringify(d))}if(l({type:SB}),r===nf&&s.length>y$)l(he({serverError:"This text section is too long. Please shorten it or contact us for assistance."}));else{const d=Ee(c,Xn);return Ne.patch(h,u,d).then(p=>(l({type:a===Yr?_B:a===Kr?CB:null,payload:p.data,id:i}),p.data)).catch(p=>{p.message!==Ue&&l(he({serverError:"There was a problem updating this section. Please try again."}))})}},$xe=e=>(t,r)=>{t({type:VB});const i=`${Gt}api/users/${e}/solution-categories/`;return Ne.get(i,Ee(r)).then(a=>{t({type:zB,payload:a.data})},a=>(t({type:HB}),a.message!==Ue&&t(he({serverError:"There was a problem retrieving the solution categories, please try again"})),Promise.reject(()=>{})))},Lxe=(e,t)=>(r,i)=>{const a=`${Gt}api/users/${e}/partner-contacts/`,s=new FormData,o={first_name:t.firstName,middle_name:t.middleName,last_name:t.lastName,contact_title:t.jobTitle,contact_credentials:t.credentials,email:t.email,phone_number:t.phoneNumber,years_experience:t.yearsOfExperience,profile_picture:t.imageFile};Object.keys(o).forEach(c=>{const h=o[c];s.append(c,h)});const l=Ee(i,Xn);return r({type:jq}),Ne.post(a,s,l).then(c=>(r({type:wq,payload:c.data}),r(he({alertMessage:"New Company Contact Created"})),c.data),c=>(r({type:MD}),c.message!==Ue&&r(he({serverError:"There was a problem creating this company contact, please try again"})),Promise.reject(()=>{})))},Fxe=(e,t,r,i)=>(a,s)=>{const o=`${Gt}api/users/${e}/partner-contacts/${t}/`,l=new FormData,c={first_name:r.firstName,middle_name:r.middleName,last_name:r.lastName,contact_title:r.jobTitle,contact_credentials:r.credentials,email:r.email,phone_number:r.phoneNumber,years_experience:r.yearsOfExperience};i&&l.append("profile_picture",void 0),r.imageFile&&l.append("profile_picture",r.imageFile),Object.keys(c).forEach(u=>{const d=c[u];l.append(u,d)});const h=Ee(s,Xn);return a({type:yq}),Ne.patch(o,l,h).then(u=>(a({type:xq,payload:u.data}),a(he({alertMessage:"Company Contact Updated"})),u.data),u=>(a({type:MD}),u.message!==Ue&&a(he({serverError:"There was a problem updating this company contact, please try again"})),Promise.reject(()=>{})))},Uxe=(e,t)=>(r,i)=>{const a=`${Gt}api/users/${t}/partner-contacts/${e}/`;return Ne.delete(a,Ee(i)).then(s=>(r({type:Sq,id:e}),r(he({alertMessage:"Company Contact Successfully Deleted"})),s)).catch(s=>{s.message!==Ue&&r(he({serverError:"There was a problem deleting this company contact, please try again"}))})},R$=e=>(t,r)=>{t({type:DD});const i=`${Gt}api/users/${e}/partner-contacts/`;return Ne.get(i,Ee(r)).then(a=>{t({type:bB,payload:a.data})},a=>(t({type:RD}),a.message!==Ue&&t(he({serverError:"There was a problem retrieving the company's contacts, please try again"})),Promise.reject(()=>{})))},Bxe=e=>(t,r)=>{t({type:DD});const i=`${Gt}api/users/${e}/partner-contacts/?view=email`;return Ne.get(i,Ee(r)).then(a=>{t({type:vB,payload:a.data})},a=>(t({type:RD}),a.message!==Ue&&t(he({serverError:"There was a problem retrieving the company's contacts, please try again"})),Promise.reject(()=>{})))},qxe=(e,t,r,i,a,s,o)=>(l,c)=>{const h=`${Gt}api/users/${t}/${r}/${e}/`,u={contact_form:{contact_form_type:o,contact_user:o==="user"?i:null,contact_email:o==="email"?s:null,contact_form_title:a}};return l({type:tq}),Ne.patch(h,u,Ee(c)).then(d=>{l({type:r===Yr?nq:r===Kr?rq:null,payload:d.data}),l(he({alertMessage:"Your contact form has been saved."}))}).catch(d=>{if(l({type:Ti}),d.message!==Ue)return l(he({serverError:"There was a problem updating your contact form, please try again"}))})},Vxe=(e,t,r,i,a,s,o,l)=>(c,h)=>{const u=`${Gt}api/users/${e}/${t}/${r}/contact/`,d={full_name:i,email_address:a,company_name:s,phone_number:o,message:l};return c({type:yB}),Ne.post(u,d,Ee(h)).then(p=>{c({type:xB,payload:p.data}),c(he({alertMessage:"Your information has been submitted."}))}).catch(p=>{if(c({type:Ti}),p.message!==Ue)return c(he({serverError:"There was a problem submitting your information, please try again"}))})},j0=(e,t)=>(r,i)=>{r({type:t===Yr?iq:t===Kr?aq:t===oxe?sq:null,payload:e})},Sa=e=>t=>{t({type:Wl,payload:e})},zxe=(e,t)=>(r,i)=>{r({type:t===Yr?pq:t===Kr?fq:null,id:e})},Hxe=e=>(t,r)=>{t({type:e===Yr?vq:e===Kr?bq:null})},Gxe=(e,t)=>(r,i)=>{r({type:t===Yr?mq:t===Kr?gq:null,payload:e})},Pu=e=>(t,r)=>{t({type:ZU,payload:e})},w0=e=>({type:LB,payload:e}),{apiAddress:dn}=Tn,Wxe=e=>(t,r)=>(t({type:xf}),Ne.get(`${dn}api/users/${e}/insightsmedia/?view=podcasts`,Ee(r)).then(i=>(t({type:Dj,payload:i.data}),i)).catch(i=>{t({type:jf}),i.message!==Ue&&t(he({serverError:"There was a problem fetching your insights videos, please try again"}))})),Yxe=(e,t)=>(r,i)=>Ne.get(`${dn}api/users/${e}/scriptremix/${t}/`,Ee(i)).then(a=>(r({type:Tq,payload:a.data}),a)).catch(a=>{if(r({type:vf}),a.message!==Ue)return r(he({serverError:"There was a problem remixing the insights video. Please try again or c
35ontact us for assistance."})),a.response}),Kxe=(e,t)=>(r,i)=>Ne.get(`${dn}api/users/${e}/insightsmedia/${t}/?view=summary&method=long-polling&time=${Date.now()}`,Ee(i)).then(a=>(r({type:kq,payload:a.data}),a)),Xxe=(e,t,r)=>(i,a)=>{const s=`${dn}api/users/${t}/insightsmedia/${e}/`,o={thumbnail_image_type:r};return i({type:bf}),Ne.patch(s,o,Ee(a)).then(l=>(i({type:yf,payload:l.data}),i(he({alertMessage:"Your video thumbnail has been updated"})),l.data)).catch(l=>{i({type:Xs}),l.message!==Ue&&i(he({serverError:"There was a problem updating your video thumbnail. Please try again."}))})},O$=(e,t,r)=>(i,a)=>{const s=new FormData;s.append("custom_media",r);const o=`${dn}api/users/${t}/insightsmedia/${e}/`;i({type:bf});const l=Ee(a,Xn);return Ne.patch(o,s,l).then(c=>(i({type:yf,payload:c.data}),i(he({alertMessage:`Your insights media has been ${r?"uploaded":"deleted"}`})),c)).catch(c=>{i({type:Xs}),c.message!==Ue&&i(he({serverError:`There was a problem ${r?"uploading":"deleting"} your insights media. Please contact us for assistance.`}))})},A$=(e,t,r)=>(i,a)=>{const s=new FormData;s.append("custom_thumbnail_image",r);const o=`${dn}api/users/${t}/insightsmedia/${e}/`;i({type:bf});const l=Ee(a,Xn);return Ne.patch(o,s,l).then(c=>{i({type:yf,payload:c.data}),i(he({alertMessage:`Your thumbnail has been ${r?"uploaded":"deleted"}`}))}).catch(c=>(i({type:Xs}),c.message!==Ue&&i(he({serverError:`There was a problem ${r?"uploading":"deleting"} your thumbnail. Please contact us for assistance.`})),Promise.reject(c)))},Qxe=(e,t,r)=>(i,a)=>{const s=`${dn}api/users/${t}/insightsmedia/${e}/`,o={authors:r?JSON.stringify(r):null,is_user_update:!0};return i({type:LD}),Ne.patch(s,o,Ee(a)).then(l=>(i({type:FD,payload:l.data}),i(he({alertMessage:"Insights Media Updated"})),l.data)).catch(l=>{i({type:Xs}),l.message!==Ue&&i(he({serverError:"There was a problem updating this insights media. Please try again."}))})},Zxe=(e,t,r,i)=>(a,s)=>{const l=`${dn}api/users/${t}/insightsmedia/${e}/`;let c;if(i==="summary"?c={description:r,is_user_update:!0}:i==="disclosures"&&(c={disclosures_text:r,is_user_update:!0}),a({type:bf}),r.length>1e5)a(he({serverError:`${i==="summary"?"Summary":i==="disclosures"?"Disclosures":""} text is too long. Please shorten it or contact us for assistance.`}));else return Ne.patch(l,c,Ee(s)).then(h=>(a({type:yf,payload:h.data}),h.data)).catch(h=>{a({type:Xs}),h.message!==Ue&&a(he({serverError:`There was a problem updating the ${i}. Please try again.`}))})},Jxe=e=>t=>{t({type:Wl,payload:e})},eje=e=>t=>{t({type:Wl,payload:e})},Iu=e=>t=>{t({type:Mq,payload:e})},tje=e=>(t,r)=>{e&&t({type:b6,id:e})},um=e=>(t,r)=>{t({type:Gq,payload:e})},nje=()=>(e,t)=>{e({type:y6})},rje=(e,t)=>(r,i)=>Ne.get(`${dn}api/users/${e}/insightsvideos/${t}/?view=summary&method=long-polling&time=${Date.now()}`,Ee(i)).then(a=>(r({type:Nq,payload:a.data}),a)),ije=(e,t)=>(r,i)=>{const a=`${dn}api/users/${e}/insightsmedia/`,s={title:t||"Market Insights Video/Podcast"};return r({type:a6}),Ne.post(a,s,Ee(i)).then(o=>(r({type:s6,payload:o.data}),r(he({alertMessage:"New Insights Video/Podcast Created"})),o.data.id),o=>(r({type:o6}),o.message!==Ue&&r(he({serverError:"There was a problem creating this insights video/podcast, please try again"})),Promise.reject(()=>{})))},M$=(e,t,r)=>(i,a)=>{const s=a().auth.user.company.studio_permissions.max_insights_video_clips,o=`${dn}api/users/${e}/insightsvideos/`;let l;r?.length>s?l=r?.slice(0,s):l=r;const c={title:t||"Market Insights Video",chart_info_ids:JSON.stringify(l)};return i({type:Pj}),Ne.post(o,c,Ee(a)).then(h=>(i({type:Ij,payload:h.data}),i(he({alertMessage:"New Insights Video Created"})),h.data.id),h=>(i({type:vf}),h.message!==Ue&&i(he({serverError:"There was a problem creating this insights video, please try again"})),Promise.reject(()=>{})))},aje=e=>(t,r)=>(t({type:$D}),Ne.get(`${dn}api/users/${e}/introclips/`,Ee(r)).then(i=>(t({type:Vq,payload:i.data}),i)).catch(i=>{t({type:ms}),i.message!==Ue&&t(he({serverError:"There was a problem fetching the intro clips, please try again"}))})),sje=e=>(t,r)=>(t({type:Wq}),Ne.get(`${dn}api/users/${e}/insightsmedia/`,Ee(r)).then(i=>(t({type:Yq,payload:i.data}),i)).catch(i=>{t({type:Xs}),i.message!==Ue&&t(he({serverError:"There was a problem fetching your insights video/podcast, please try again"}))})),S0=e=>(t,r)=>(t({type:xf}),Ne.get(`${dn}api/users/${e}/insightsvideos/`,Ee(r)).then(i=>(t({type:Kq,payload:i.data}),i)).catch(i=>{t({type:jf})})),oje=(e,t)=>(r,i)=>(r({type:xf}),Ne.get(`${dn}api/users/${e}/insightsvideos/?view=${t}`,Ee(i)).then(a=>(r({type:Dj,payload:a.data}),a)).catch(a=>{r({type:jf}),a.message!==Ue&&r(he({serverError:"There was a problem fetching your insights videos, please try again"}))})),lje=e=>(t,r)=>(t({type:xf}),Ne.get(`${dn}api/users/${e}/engage/insightsvideos/?view=enabled`,Ee(r)).then(i=>(t({type:Dj,payload:i.data}),i)).catch(i=>{t({type:jf}),i.message!==Ue&&t(he({serverError:"There was a problem fetching your insights videos, please try again"}))})),cje=(e,t,r)=>(i,a)=>{const s=`${dn}api/users/${t}/${r==="custom"?"insightsmedia":"insightsvideos"}/${e}/`,o=r==="custom"?g6:v6;return Ne.delete(s,Ee(a)).then(l=>(i({type:o,id:e}),i(he({alertMessage:"Insights Video Successfully Deleted"})),l)).catch(l=>{l.message!==Ue&&i(he({serverError:"There was a problem deleting this insights video, please try again"}))})},dje=(e,t)=>(r,i)=>{r({type:Pq});const a=`${dn}
35api/users/${t}/insightsmedia/${e}/`;return Ne.get(a,Ee(i)).then(s=>{r({type:Iq,payload:s.data})},s=>(r({type:Xs}),s.response&&s.response.data&&s.response.data.detail==="Requested insights video is currently being shared by partner insights"?r(he({serverError:"This insights video is linked to a partner insight and cannot be edited."})):s.message!==Ue&&r(he({serverError:"There was a problem retrieving this insights media, please try again"})),Promise.reject(()=>{})))},_0=(e,t)=>(r,i)=>{r({type:$D});const a=`${dn}api/users/${t}/insightsvideos/${e}/`;return Ne.get(a,Ee(i)).then(s=>{r({type:Eq,payload:s.data})},s=>(r({type:ms}),s.response&&s.response.data&&s.response.data.detail==="Requested insights video is currently being shared by partner insights"?r(he({serverError:"This insights video is linked to a partner insight and cannot be edited."})):s.message!==Ue&&r(he({serverError:"There was a problem retrieving this insights video, please try again"})),Promise.reject(()=>{})))},uje=(e,t,r,i)=>(a,s)=>{const o=`${dn}api/users/${e}/insightsvideos/`,l={partnerinsight_id:t,use_featured_media:r,remix_script:i};return a(i?{type:$q}:{type:Pj}),Ne.post(o,l,Ee(s)).then(c=>(c.status===201?(a({type:Ij,payload:c.data}),a(he({alertMessage:"New Insights Video Created"}))):c.status===202&&a({type:Lq,payload:c.data}),c),c=>{if(a({type:vf}),c.message!==Ue&&a(he({serverError:"There was a problem creating this insights video, please try again"})),c.response&&c.response.data)return c.response})},hje=(e,t,r)=>(i,a)=>{const s=`${dn}api/users/${e}/insightsvideos/`,o={featured_id:t,use_featured_media:r};return i({type:Pj}),Ne.post(s,o,Ee(a)).then(l=>(i({type:Ij,payload:l.data}),i(he({alertMessage:"New Insights Video Created"})),l.data.id),l=>(i({type:vf}),l.message!==Ue&&i(he({serverError:"There was a problem creating this insights video, please try again"})),Promise.reject(()=>{})))},pje=(e,t,r,i,a,s)=>(o,l)=>{const c=`${dn}api/users/${t}/insightsmedia/${e}/`,h={header:{title:r,display_author_name:i,display_profile_picture:a,author_type:s}};return o({type:LD}),Ne.patch(c,h,Ee(l)).then(u=>{o({type:FD,payload:u.data}),o(he({alertMessage:"Insights Media Updated"}))}).catch(u=>{o({type:Xs}),u.message!==Ue&&o(he({serverError:"There was a problem updating this insights media, please try again"}))})},fje=(e,t,r,i)=>(a,s)=>{const o=`${dn}api/users/${t}/insightsvideos/${e}/`,l={header:{title:r,display_author_name:i}};return a({type:Bq}),Ne.patch(o,l,Ee(s)).then(c=>{a({type:qq,payload:c.data}),a(he({alertMessage:"Insights Video Updated"}))}).catch(c=>{a({type:ms}),c.message!==Ue&&a(he({serverError:"There was a problem updating this insights video, please try again"}))})},hm=(e,t,r,i,a)=>(s,o)=>{const l=`${dn}api/users/${e}/insightsvideos/${t}/clips/`,c=o().auth.user.company.studio_permissions.max_insights_video_clips,h=o().studio.insightsVideo.title_clip,u=o().studio.insightsVideo.
35clips.length;let d;h&&(d=u+1);const p={chart_id:i||null,type:r,index:a||0};if(s({type:UD}),d>=c)s(he({serverError:`This video has reached the limit of ${c} clips. To add a new clip, first delete another clip.`}));else return Ne.post(l,p,Ee(o)).then(f=>(s({type:zq,payload:f.data,index:a}),f.data)).catch(f=>{f.message!==Ue&&s(he({serverError:"There was a problem adding this clip, please try again"}))})},mje=(e,t,r)=>(i,a)=>{const s=`${dn}api/users/${t}/insightsvideos/${r}/clips/${e}/`;return Ne.delete(s,Ee(a)).then(o=>(i({type:Jq,id:e}),i(he({alertMessage:"Clip Successfully Deleted"})),o)).catch(o=>{o.message!==Ue&&i(he({serverError:"There was a problem deleting this clip, please try again"}))})},gje=(e,t,r,i)=>(a,s)=>{const o=`${dn}api/users/${t}/insightsvideos/${r}/clips/${e}/`,l={delete_media_clip:i};return Ne.patch(o,l,Ee(s)).then(c=>(a({type:p6,payload:c.data}),a(he({alertMessage:"Clip Recording Successfully Deleted"})),c)).catch(c=>{c.message!==Ue&&a(he({serverError:"There was a problem deleting this clip's recording, please try again"}))})},vje=(e,t,r)=>(i,a)=>{const s=`${dn}api/users/${t}/insightsvideos/${r}/clips/${e}/`;return Ne.delete(s,Ee(a)).then(o=>(i({type:e6,payload:o.data,id:e}),i(he({alertMessage:"Title Clip Successfully Deleted"})),o)).catch(o=>{o.message!==Ue&&i(he({serverError:"There was a problem deleting the title clip, please try again"}))})},bje=(e,t,r,i,a)=>(s,o)=>{const l=`${dn}api/users/${e}/insightsvideos/${t}/clips/`,c=o().auth.user.company.studio_permissions.max_insights_video_clips,h=o().studio.insightsVideo.title_clip,u=o().studio.insightsVideo.
35clips.length;let d;h&&(d=u+1);const p={chart_id:i||null,type:r,index:a||0};if(s({type:UD}),d>=c)s(he({serverError:`This video has reached the limit of ${c} clips. To add a new clip, first delete another clip.`}));else return Ne.post(l,p,Ee(o)).then(f=>(s({type:Hq,payload:f.data,index:a}),f.data)).catch(f=>{f.message!==Ue&&s(he({serverError:"There was a problem adding the title clip, please try again"}))})},yje=(e,t,r,i)=>(a,s)=>{const o=s().studio.insightsVideo.id,l=s().studio.insightsVideo.clips,c=`${dn}api/users/${e}/insightsvideos/${o}/clips/${t}/`,h={new_index:i};let u=[];const d=Array.from(l),[p]=d.splice(r,1);if(d.splice(i,0,p),(i||i===0)&&i!==r)return a({type:Dm,payload:d,id:t}),Ne.patch(c,h,Ee(s)).then(f=>(f.status===200&&(u=d,a({type:Dm,id:t,payload:u,renderStatus:f.data.render_status})),f.data)).catch(f=>{u=l,a({type:Dm,payload:u,id:t}),f.message!==Ue&&a(he({serverError:"There was a problem reordering your clips, please try again"}))})},xje=(e,t,r,i)=>(a,s)=>{const o=`${dn}api/users/${t}/insightsvideos/${e}/clips/${r}/`,l={end_transition:i};return Ne.patch(o,l,Ee(s)).then(c=>{a({type:n6,payload:c.data}),a(he({alertMessage:"Clip Transition Updated"}))}).catch(c=>{a({type:ms}),c.message!==Ue&&a(he({serverError:"There was a problem updating this clip's transition, please try again"}))})},jje=(e,t,r,i)=>(a,s)=>{const o=`${dn}api/users/${t}/insightsvideos/${e}/clips/${r}/`,l={end_transition:i};return Ne.patch(o,l,Ee(s)).then(c=>{a({type:t6,payload:c.data,id:r}),a(he({alertMessage:"Clip Transition Updated"}))}).catch(c=>{a({type:ms}),c.message!==Ue&&a(he({serverError:"There was a problem updating this clip's transition, please try again"}))})},wje=(e,t,r,i,a,s,o)=>(l,c)=>{const h=`${dn}api/users/${t}/insightsvideos/${e}/clips/${r}/`,u=c().auth.user.company.studio_permissions.max_insights_video_clip_duration_seconds,d=Math.round(u/60),p={video_clip:i,camera_location:a,is_camera_on:s,script_text:o},f=new FormData;Object.keys(p).forEach(g=>{const x=p[g];f.append(g,x)});const m=Ee(c,Xn);return l({type:f6}),Ne.patch(h,f,m).then(g=>(l({type:m6,payload:g.data}),l(he({alertMessage:"Insights Video Clip Saved"})),g.data)).catch(g=>{l({type:ms}),g.response&&g.response.data&&g.response.data.detail==="Insights video max duration exceeded"?l(he({serverError:`This clip can't be saved as it would put your insights video over the maximum length of ${d} minutes`})):g.message!==Ue&&l(he({serverError:"There was a problem saving this clip, please try again"}))})},Sje=(e,t,r)=>(i,a)=>{const s=`${dn}api/users/${t}/insightsvideos/${e}/`,o={disclosures_text:r};return i({type:r6}),Ne.patch(s,o,Ee(a)).then(l=>{i({type:i6,payload:l.data}),i(he({alertMessage:"Your disclosures have been saved."}))}).catch(l=>{if(i({type:ms}),l.message!==Ue)return i(he({serverError:"There was a problem updating your disclosures, please try again"}))})},_je=(e,t,r)=>(i,a)=>{const s=`${dn}api/users/${t}/insightsvideos/${e}/`,o={intro_clip:r};return i({type:Xq}),Ne.patch(s,o,Ee(a)).then(l=>(i({type:Qq,payload:l.data}),i(he({alertMessage:"Your intro clip has been saved."})),l)).catch(l=>{if(i({type:ms}),l.message!==Ue)return i(he({serverError:"There was a problem updating your intro clip, please try again"}))})},Cje=(e,t)=>(r,i)=>{const a=`${dn}api/users/${e}/insightsvideos/${t}/`,s={intro_clip:null};return Ne.patch(a,s,Ee(i)).then(o=>(r({type:Zq,payload:o.data}),r(he({alertMessage:"Intro Clip Successfully Deleted"})),o)).catch(o=>{o.message!==Ue&&r(he({serverError:"There was a problem deleting the intro clip, please try again"}))})},Nje=(e,t)=>(r,i)=>{const a=`${dn}api/users/${t}/insightsvideos/${e}/render/`,s={},o=i().auth.user.company.studio_permissions.max_insights_video_duration_seconds,l=Math.round(o/60);return r({type:Fq}),Ne.post(a,s,Ee(i)).then(c=>(r({type:Uq,payload:c.data}),r(he({alertMessage:"Your insights video is rendering. Please check back shortly."})),c.data)).catch(c=>{if(r({type:ms}),c.response&&c.response.data&&c.response.data.detail==="Insights video max duration exceeded")r(he({serverError:`This video is longer than the maximum length of ${l} minutes and can’t be created`}));else if(c.message!==Ue)return r(he({serverError:"There was a problem rendering your insights video, please try again"}))})},Eje=(e,t)=>(r,i)=>{const a=`${dn}
35api/users/${e}/insightsvideos/${t}/download-key/`;return r({type:Rq}),Ne.get(a,Ee(i)).then(s=>(r({type:Oq,payload:s.data}),s),s=>(r({type:Aq}),s.message!==Ue&&r(he({serverError:"There was a problem retrieving this insights video download, please try again"})),Promise.reject(()=>{})))},Tje=e=>(t,r)=>{t({type:h6,payload:e})},kje=e=>(t,r)=>{t({type:u6,payload:e})},Pje=(e,t)=>(r,i)=>{t==="audioinput"&&r({type:l6,payload:e}),t==="videoinput"&&r({type:c6,payload:e}),t==="audiooutput"&&r({type:d6,payload:e})},Ije=()=>(e,t)=>{e({type:Dq})};var Jc={},EP;function Dje(){if(EP)return Jc;EP=1;var e=vn(),t=bn();Object.defineProperty(Jc,"__esModule",{value:!0}),Jc.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M7 11H1v2h6v-2zm2.17-3.24L7.05 5.64 5.64 7.05l2.12 2.12 1.41-1.41zM13 1h-2v6h2V1zm5.36 6.05l-1.41-1.41-2.12 2.12 1.41 1.41 2.12-2.12zM17 11v2h6v-2h-6zm-5-2c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3zm2.83 7.24l2.12 2.12 1.41-1.41-2.12-2.12-1.41 1.41zm-9.19.71l1.41 1.41 2.12-2.12-1.41-1.41-2.12 2.12zM11 23h2v-6h-2v6z"}),"Flare");return Jc.default=a,Jc}var Rje=Dje();const Oje=Zt(Rje);var ed={},TP;function Aje(){if(TP)return ed;TP=1;var e=vn(),t=bn();Object.defineProperty(ed,"__esModule",{value:!0}),ed.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"}),"InsertChart");return ed.default=a,ed}var Mje=Aje();const rf=Zt(Mje);var td={},kP;function $je(){if(kP)return td;kP=1;var e=vn(),t=bn();Object.defineProperty(td,"__esModule",{value:!0}),td.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M21 3H3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h18c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2zm0 16.02H3V4.98h18v14.04zM10 12H8l4-4 4 4h-2v4h-4v-4z"}),"PresentToAll");return td.default=a,td}var Lje=$je();const Fje=Zt(Lje);var nd={},PP;function Uje(){if(PP)return nd;PP=1;var e=vn(),t=bn();Object.defineProperty(nd,"__esModule",{value:!0}),nd.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11l-4 4z"}),"Videocam");return nd.default=a,nd}var Bje=Uje();const $$=Zt(Bje),C0=ar(y.createElement("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"})),qje=ar(y.createElement("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"})),N0=ar(y.createElement("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"})),L$=ar(y.createElement("path",{d:"M7 19h10V4H7v15zm-5-2h4V6H2v11zM18 6v11h4V6h-4z"})),Vje=ar(y.createElement("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"})),E0=ar(y.createElement("path",{d:"M4 11h5V5H4v6zm0 7h5v-6H4v6zm6 0h5v-6h-5v6zm6 0h5v-6h-5v6zm-6-7h5V5h-5v6zm6-6v6h5V5h-5z"})),wn=({hasPermission:e,fallback:t,children:r})=>e?n.jsx(n.Fragment,{children:r}):n.jsx(n.Fragment,{children:t||null});function zje({view:e,changeView:t,changeSearch:r,numResults:i,search:a,getClientPieces:s,newClientPiece:o,userId:l,setModal:c,allowComposer:h,tabSelected:u,composerPermissions:d,clientpieces:p,setUpgradeModal:f,logEvent:m,user:g}){const{Engage:x}=qa,{Insight:v}=on,{Enabled:b}=_n,[j,w]=y.useState(!1),S=()=>{r(""),w(!1)},_=()=>{c(!0)},C=()=>{const N=document.getElementById("chartbook-search");j?N.blur():N.focus(),j&&r(""),w(!j)},E=()=>{f(!0),m(l,null,"communitycta","open")},P=n.jsx("button",{className:"btn-primary",disabled:!0,children:n.jsx(Ke,{interactive:!0,classes:{popper:"upgrade-tooltip"},title:n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"upgrade-tooltip-msg",children:"Upgrade to add more commentaries"}),g.is_upgrade_disabled?n.jsxs("div",{className:"upgrade-submitted-tooltip",children:[n.jsx("i",{className:"material-icons",children:"done"}),"UPGRADE REQUESTED"]}):n.jsxs("button",{onClick:E,className:"upgrade-tooltip-btn",children:[n.jsx("i",{className:"material-icons",children:"open_in_new"}),"UPGRADE"]})]}),placement:"top",children:n.jsxs("div",{className:"locked-new-cp-btn",children:[n.jsx("i",{className:"material-icons","diagnostic-id":"material-lock-icon",children:"lock"}),"New"]})})}),T=p?.filter(N=>N.content_permissions_level<=d.content_permissions_level).length;return n.jsxs("div",{id:"searchbar-container",className:j?a?"input-active active-search":"input-active":"",children:[n.jsxs("div",{id:"search-input-container",children:[n.jsx("form",{autoComplete:"off",onSubmit:N=>{N.preventDefault()},children:n.jsx("input",{type:"search","diagnostic-id":"clientpiece-search-input",placeholder:"Search Commentaries...",onChange:N=>r(N.target.value),className:`${a.length>0?"active":""}`,value:a})}),a?n.jsx("i",{className:"material-icons","diagnostic-id":"clear-search-btn",onClick:S,children:"close"}):n.jsx("i",{className:"material-icons prefix",onClick:C,children:"search"}),a&&n.jsxs("h6",{id:"search-results","diagnostic-id":"search-results-text",children:[i," search results -"," ",n.jsx("button",{className:"btn-cancel",onClick:S,children:"Clear Search"})]})]}),u===x||u===v?n.jsx(n.Fragment,{}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"refresh-icon-container",children:n.jsx(Ke,{title:"Refresh commentaries",placement:"top",children:n.jsx(N0,{onClick:()=>s(l)})})}),n.jsx(wn,{hasPermission:h===b&&d?.max_commentaries>T,fallback:P,children:n.jsxs("button",{className:"btn-primary","diagnostic-id":"cp-new-modal-btn",onClick:_,children:[n.jsx("i",{className:"material-icons",children:"add"}),"New"]})})]})]})}const Hje=e=>({userId:e.auth.user&&e.auth.user.id,allowComposer:e.auth.user&&e.auth.user.company&&e.auth.user.company.composer_permissions&&e.auth.user.company.composer_permissions.allow_composer,composerPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.composer_permissions,clientpieces:e.composer&&e.composer.pieces,user:e.auth.user}),Gje=le(Hje,{getClientPieces:sm,newClientPiece:om,logEvent:_r})(zje),Wje=e=>{const{chartbookType:t,clientpieceType:r,insightsVideoType:i}=Ei;let a="";return e.cbId?a="chartbook?":e.cpId?a="commentary?":e.insightsVideoId?a="insights video?":a="shared content?",y.useEffect(()=>{const s=o=>$n(o,e.modal,e.setModal);return window.addEventListener("keyup",s),()=>{window.removeEventListener("keyup",s)}},[e.modal]),n.jsx(ot,{setModal:e.setModal,children:n.jsxs("div",{className:"delete-modal-container",children:[n.jsx("h5",{children:"Please Confirm"}),e.email!==e.engageAuthor&&e.engageAuthor?n.jsx("p",{children:"This shared content belongs to another user. Are you sure you want to permanently delete this shared content? This will not delete the original content."}):n.jsx("p",{children:`Are you sure you want to permanently delete this ${a}${e.engageId?" This will not delete the original content.":""}`}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>e.setModal(!1),children:"CANCEL"}),n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",onClick:()=>e.cbId?e.deleteChartbook(e.cbId,e.userId):e.cpId?e.deleteClientPiece(e.cpId,e.userId):e.insightsVideoId?e.deleteInsightsVideo(e.insightsVideoId,e.userId,e.insightsVideoType):e.engageId?e.deleteEngageSharedContent(e.engageId,e.userId,e.sharedContent.type).then(()=>{e.sharedContent.type===r?e.getClientPieces(e.userId):e.sharedContent.type===i?e.getInsightsVideos(e.userId):e.sharedContent.type===t&&e.getChartbooks(e.userId)}):null,children:"DELETE"})]})]})})},Yje=e=>({userId:e.auth.user&&e.auth.user.id,email:e.auth.user&&e.auth.user.email}),Du=le(Yje,{deleteChartbook:wM,deleteClientPiece:Lbe,deleteEngageSharedContent:fve,deleteInsightsVideo:cje,getChartbooks:rc,getClientPieces:sm,getInsightsVideos:S0})(Wje),nl=e=>{const{modal:t,setModal:r,contentShared:i,sharedType:a}=e,s=oa();return y.useEffect(()=>{const o=l=>$n(l,t,r);return window.addEventListener("keyup",o),()=>{window.removeEventListener("keyup",o)}},[t]),n.jsx(ot,{setModal:r,children:n.jsxs("div",{className:"shared-content-modal-container","diagnostic-id":"shared-content-modal-container",children:[n.jsx("h5",{"diagnostic-id":"associated-share-content-header",children:"Associated Shared Content"}),n.jsx("p",{children:"Click a title to open that shared content's settings:"}),n.jsx("ul",{className:"associated-content-title",children:i.map((o,l)=>n.jsx("li",{onClick:()=>s.push(`/engage/${a}/${o.id}`),children:n.jsx("div",{className:"shared-content-link","diagnostic-id":`shared-content-link-${l}`,children:o.title})},l))}),n.jsx("div",{className:"buttons",children:n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>{r(!1)},children:"CLOSE"})})]})})},pm=e=>
35{const{modal:t,setModal:r,sharedType:i,originalContent:a}=e,s=oa();return y.useEffect(()=>{const o=l=>$n(l,t,r);return window.addEventListener("keyup",o),()=>{window.removeEventListener("keyup",o)}},[t]),n.jsx(ot,{setModal:r,children:n.jsxs("div",{className:"currently-shared-modal-container","diagnostic-id":"currently-shared-modal-container",children:[n.jsx("h5",{"diagnostic-id":"currently-shared-header",children:`This ${i==="chartbooks"?"Chartbook":i==="commentaries"?"Commentary":"Insights Video"} is Currently Being Shared`}),n.jsx("p",{children:`This ${i==="chartbooks"?"chartbook":i==="commentaries"?"commentary":"insights video"} is currently being shared. Any changes made here will be reflected in the shared content and everywhere it is being shared.`}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>{r(!1)},children:"Cancel"}),n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",onClick:()=>{s.push(`/${i}/${a.id}`)},children:"Continue"})]})]})})},fm=e=>{const{modal:t,setModal:r,contentShared:i,sharedType:a}=e;return y.useEffect(()=>{const s=o=>$n(o,t,r);return window.addEventListener("keyup",s),()=>{window.removeEventListener("keyup",s)}},[t]),n.jsx(ot,{setModal:r,children:n.jsxs("div",{className:"shared-content-delete-modal-container","diagnostic-id":"shared-content-delete-modal-container",children:[n.jsx("h5",{"diagnostic-id":"delete-modal-header",children:`Cannot Delete This ${a==="chartbooks"?"Chartbook":a==="commentaries"?"Commentary":a==="insightsvideos"?"Insights Video":""}`}),a==="chartbooks"?n.jsx("p",{children:"This chartbook is currently being shared with Engage. To delete this chartbook, you must first delete any associated shared content."}):a==="commentaries"?n.jsx("p",{children:"This commentary is currently being shared with Engage. To delete this commentary, you must first delete any associated shared content."}):a==="insightsvideos"?n.jsx("p",{children:"This insights video is currently being shared with Engage. To delete this insights video, you must first delete any associated shared content."}):n.jsx(n.Fragment,{}),n.jsx("p",{children:"Associated Shared Content:"}),n.jsx("ul",{className:"associated-content-title",children:i.map((s,o)=>n.jsx("li",{children:n.jsx(Ze,{to:`engage/${a}/${s.id}`,children:s.title})},o))}),n.jsx("div",{className:"buttons",children:n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>{r(!1)},children:"CLOSE"})})]})})},ao=e=>{const{modal:t,setModal:r,partnerInsightShared:i,sharedType:a}=e,s=y.useCallback(o=>$n(o,t,r),[t]);return y.useEffect(()=>(window.addEventListener("keyup",s),()=>{window.removeEventListener("keyup",s)}),[s]),n.jsx(ot,{setModal:r,children:n.jsxs("div",{className:"shared-content-modal-container","diagnostic-id":"associated-partner-insight-modal-container",children:[n.jsx("h5",{"diagnostic-id":"associated-share-content-header",children:"Associated Shared Partner Insight"}),n.jsx("p",{children:"This content is currently shared with a partner insight that is published or pending review."}),n.jsx("p",{children:"Click a title to preview that partner insight's content:"}),i.map((o,l)=>n.jsx("ul",{onClick:c=>BD(c,`/partnerinsights/${o.id}?view=preview`,a==="commentaries"?"commentary":a==="chartbooks"?"chartbook":a==="insightsvideos"?"insightsvideo":a==="insightspodcasts"?"insightspodcast":a==="clientquestion"?"clientquestion":""),className:"associated-content-title",children:n.jsx("li",{children:n.jsx("div",{className:"shared-content-link","diagnostic-id":`associated-partner-insight-link-${l}`,children:o.title})})},l)),n.jsx("div",{className:"buttons",children:n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>{r(!1)},children:"CLOSE"})})]})})};function Kje(e){const t=e.clientpiece,r="commentaries",{canUsePartner:i,partnerPermissions:a,composerPermissions:s}=e,{allow_partner:o}=a,{Insight:l}=on,{Engage:c}=qa,{NotPublished:h}=ki,[u,d]=y.useState(!1),[p,f]=y.useState(!1),[m,g]=y.useState(!1),[x,v]=y.useState(!1),[b,j]=y.useState(!1),w=e.engage?.userSharedContent,S=t.engage_shared?.map(k=>k.id),_=w?w?.filter(k=>k.is_enabled&&S?.includes(k.id)).length>0:t.engage_shared?.some(k=>k.is_enabled),C=t.partner_insights?.filter(k=>
35k.publish_status!==h).length>0,E=t.preview_chart&&t.preview_chart.chart_snapshot_image_jpg_url,P=()=>{t.engage_shared?.length>0?g(!0):d(!0)},T=()=>{t.engage_shared?.length>0&&_&&v(!0)},N=n.jsxs(n.Fragment,{children:[t.engage_shared?.length>0&&_?n.jsxs("button",{onClick:T,className:"card-btn","diagnostic-id":"cb-open-btn",children:[n.jsx("i",{className:"material-icons",children:"mode_edit"}),n.jsx("span",{children:" Open"})]}):n.jsxs(Ze,{to:{pathname:`/commentaries/${t.id}`},className:"card-btn","diagnostic-id":"cp-open-btn",children:[n.jsx("i",{className:"material-icons",children:"mode_edit"}),n.jsx("span",{children:" Open"})]}),n.jsxs("button",{onClick:P,className:"card-btn-delete","diagnostic-id":"cp-delete-btn",children:[n.jsx("i",{className:"material-icons",children:"delete_forever"}),n.jsx("span",{children:"Delete"})]})]});return n.jsxs("div",{className:"col fadeTransition",children:[n.jsxs("div",{className:`client-piece-card${e.highlight?" newCard":""}${e.isSelected?" selected":""}${t?.content_permissions_level<=s?.content_permissions_level?"":" locked"}`,"diagnostic-id":"cp-card",onClick:e.onClick,children:[t?.content_permissions_level>s?.content_permissions_level&&n.jsx("div",{className:"locked-overlay"}),e.isSelected&&(e.tabSelected===c||e.tabSelected===l)&&n.jsx("div",{className:"checkmark","diagnostic-id":"checkmark",children:n.jsx("i",{className:"material-icons",children:"done"})}),n.jsxs("div",{className:"cp-card-title",children:[n.jsx("div",{className:"cp-card-image",children:E?n.jsx("img",{alt:"",src:E}):n.jsx("i",{className:"material-icons",children:"description"})}),n.jsx("div",{className:`cp-card-placeholder${t.preview_chart&&t.preview_chart.aspect_ratio==="16:9"?" size-aspect-16-9":""}`}),n.jsx("div",{className:"cp-title-text","diagnostic-id":"cp-title-text",children:t.title}),i&&o&&C&&n.jsx("i",{className:"material-icons-outlined shared-with-partner-insights-icon",children:"link"})]}),n.jsxs("div",{className:"cp-card-content",children:[n.jsx("div",{className:"cp-preview-text","diagnostic-id":"cp-preview-text",children:t.preview_text&&t.preview_text}),n.jsxs("div",{className:"card-caption",children:[n.jsxs("div",{className:"card-datetime",children:[t.export_datetime&&t.export_datetime>t.update_datetime?"Exported ":"Edited ",n.jsx(gn,{local:!0,format:"MMM D, YYYY h:mma",children:t.export_datetime&&t.export_datetime>t.update_datetime?t.export_datetime:t.update_datetime})," ",new Date().toLocaleTimeString("en-us",{timeZoneName:"short"}).split(" ")[2]]}),e.tabSelected!==l&&t.engage_shared?.length>0?n.jsx("div",{className:"card-shared-container",children:n.jsx("div",{className:`card-shared-pill ${_?"shared-live":"shared-off"} `,"diagnostic-id":"card-shared-pill",onClick:()=>f(!0),children:_?"Sharing: Live":"Sharing: Off"})}):n.jsx(n.Fragment,{})]})]}),t?.content_permissions_level>e.composerPermissions?.content_permissions_level?n.jsx(Ke,{title:"Upgrade to access locked commentaries",placement:"top",children:n.jsx("div",{className:"locked-card",children:n.jsx("i",{className:"material-icons","diagnostic-id":"material-lock-icon",children:"lock"})})}):n.jsx(n.Fragment,{children:e.tabSelected!==c&&e.tabSelected!==l&&n.jsx("div",{className:"card-btn-grp",children:n.jsx(wn,{hasPermission:i&&o&&C,fallback:N,children:n.jsxs("button",{onClick:()=>j(!0),className:"card-btn","diagnostic-id":"cb-open-btn",children:[n.jsx("i",{className:"material-icons",children:"visibility"}),n.jsx("span",{children:" Preview"})]})})})})]}),u&&n.jsx(Du,{modal:u,setModal:d,cpId:t.id,cbId:null}),m&&n.jsx(fm,{modal:m,setModal:g,contentShared:t.engage_shared,sharedType:r}),p&&n.jsx(nl,{modal:p,setModal:f,contentShared:t.engage_shared,sharedType:r}),x&&n.jsx(pm,{modal:x,setModal:v,sharedType:r,originalContent:t}),b&&n.jsx(ao,{modal:b,setModal:j,partnerInsightShared:t.partner_insights,sharedType:r})]})}const Xje=e=>({userId:e.auth.user&&e.auth.user.id,engage:e.engage,canUsePartner:e.auth&&e.auth.user&&e.auth.user.can_use_partner,partnerPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.partner_permissions,composerPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.composer_permissions}),Qje=le(Xje,{})(Kje);function Zje({elements:e,active:t,type:r,title:i,numPerPage:a,showDescription:s,breakpoints:o,icon:l}){const c=ws(),[h,u]=y.useState(0),[d,p]=y.useState(0),[f,m]=y.useState(0),g=r==="row",x=r==="paginated",v=r==="paginated-row",b=r==="paginated-col";let j;b?c>=600?j=~~((e.length-1)/(a/2))+1:j=e.length:v?c<=600?j=e.length:c<=1280?j=~~((e.length-1)/(a-3))+1:j=e.length:j=~~((e.length-1)/a)+1;const w=d*a,S=e.slice(w,w+a);y.useEffect(()=>{d>=j&&p(d-1)},[d,j]);const _=()=>{const I=Object.keys(o);for(let D=0;D<I.length;D++)if(c<=~~I[D])return o[I[D]]},C=I=>{let D;b?D=document.getElementById("grid-layout"):v?D=document.getElementById("grid-layout-row"):D=document.querySelector(`[data-gridid='${i}']`);let O;return O=D&&D.children&&D.children[0]&&D.children[0].offsetWidth,O*I},E=I=>{const D=document.querySelector(`[data-gridid='${i}']`),O=Array.from(D.children),$=h+(I==="left"?-1:1);for(const U in O)O[U].style.setProperty("--offset",`-${C($)}px`);u($)},P=`${_()}${v?" nowrap":""}`,T=e.map(I=>n.jsx(I.type,{...I.props,style:{transform:`translateX(-${C(d)+f}px)`,transition:f?"none":"transform 0.5s ease"}},I.key)),N=io({onSwipedLeft:()=>d<j-1&&p(d+1),onSwipedRight:()=>d>0&&p(d-1),onSwiping:I=>m(I.deltaX),onSwiped:()=>m(0)}),k=x?S:b||v?T:e;return t&&e?n.jsxs(n.Fragment,{children:[n.jsxs("div",{id:"grid-layout"+(v?"-row":""),className:P,"data-gridid":i,...N,children:[k,(g||v)&&n.jsxs(n.Fragment,{children:[d!==0&&n.jsx("div",{id:"row-pagination-left",children:n.jsx("button",{className:"btn-navigation",onClick:()=>g?E("left"):p(d-1),children:n.jsx("i",{className:"material-icons",children:"chevron_left"})})}),d<j-1&&n.jsx("div",{id:"row-pagination-right",children:n.jsx("button",{className:"btn-navigation",onClick:()=>g?E("right"):p(d+1),children:n.jsx("i",{className:"material-icons",children:"chevron_right"})})})]}),b&&n.jsxs(n.Fragment,{children:[d!==0&&n.jsx("div",{id:"grid-collection-left",children:n.jsx("button",{className:"btn-navigation",onClick:()=>p(d-1),children:n.jsx("i",{className:"material-icons",children:"chevron_left"})})}),d<j-1&&n.jsx("div",{id:"grid-collection-right",children:n.jsx("button",{className:"btn-navigation",onClick:()=>p(d+1),children:n.jsx("i",{className:"material-icons",children:"chevron_right"})})})]})]}),x&&j>1&&n.jsxs("div",{className:"chartbook-page-btns",children:[d>0&&n.jsxs("button",{className:"btn-navigation",onClick:()=>p(d-1),children:["< Previous Page"," "]}),d<j-1&&n.jsx("button",{className:"btn-navigation",onClick:()=>p(d+1),children:"Next Page >"})]})]}):n.jsx(n.Fragment,{})}const Jje=e=>({}),ewe=le(Jje,{})(Zje);class twe extends y.Component{constructor(){super(...arguments),this.handleNewClientPiece=()=>{this.props.changeSearch(""),this.props.setModal(!0)}}render(){const t={marginBottom:"20px"},{Disabled:r,Locked:i,Enabled:a}=_n,s=this.props.clientpieces?.filter(l=>l.content_permissions_level<=this.props.composerPermissions.content_permissions_level).length,o=n.jsx("button",{id:"locked-new-btn","diagnostic-id":"cp-new-lock",disabled:!0,children:n.jsx(Ke,{title:"Upgrade to create a commentary",placement:"top",children:n.jsx("i",{className:"material-icons",style:{padding:"12px"},children:"lock"})})});return n.jsx("div",{className:"col fadeTransition",children:n.jsxs("div",{className:"client-piece-card",id:"card-new",children:[n.jsx("div",{className:"card-title chartbook-title",style:t,children:"New Commentary"}),n.jsx(wn,{hasPermission:this.props.allowComposer===a&&this.props.composerPermissions?.max_commentaries>s,fallback:o,children:n.jsx("button",{id:"card-new-btn","diagnostic-id":"cp-new-btn",onClick:this.handleNewClientPiece,children:n.jsx("i",{className:"material-icons",children:"add"})})})]})})}}const nwe=e=>({userId:e.auth.user&&e.auth.user.id,allowComposer:e.auth.user&&e.auth.user.company&&e.auth.user.company.composer_permissions&&e.auth.user.company.composer_permissions.allow_composer,maxCommentaries:e.auth.user&&e.auth.user.company&&e.auth.user.company.composer_permissions&&e.auth.user.company.composer_permissions.max_commentaries,composerPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.composer_permissions,clientpieces:e.composer&&e.composer.pieces}),rwe=le(nwe,{newClientPiece:om})(twe),iwe=({setModal:e,newClientPiece:t,userId:r,isLicenseUpgradable:i,history:a,c
35anUseFeatured:s,canUseInsightsExplorer:o,getMenuChoice:l})=>{const[c,h]=y.useState(0),u=p=>{t(r,p).then(f=>{a.push(`/commentaries/${f}`)})},d=p=>n.jsxs("button",{disabled:p,type:"button",className:`new-content-modal-btn${p?" locked":""}`,"diagnostic-id":"cp-modal-featured-path-btn",onClick:()=>{o&&l("explorer")},children:[n.jsxs("div",{className:"new-content-modal-header",children:[n.jsx("i",{className:"material-icons",children:p?"lock":"explore"}),n.jsx("h4",{children:"Featured Insights"})]}),n.jsx("div",{children:"Get started quickly with insights on a featured topic or from a recent market update"})]});return n.jsx(ot,{setModal:e,children:n.jsxs("div",{className:`new-content-modal-container${c===1?" add-title":""} `,children:[n.jsx("i",{className:"material-icons",onClick:()=>e(!1),children:"close"}),c===0?n.jsxs(n.Fragment,{children:[n.jsx("h5",{children:"Compose a New Commentary"}),n.jsxs("div",{className:"new-content-modal-btns",children:[s?i?n.jsx(Ke,{title:"Upgrade to access featured commentaries",placement:"top",children:n.jsx("span",{children:d(i)})}):n.jsx(Ze,{to:"/featured",children:d()}):n.jsx(n.Fragment,{}),o&&n.jsx(Ze,{to:{pathname:"/insights",search:"?view=explorer&filter=commentary"},children:d()}),i?n.jsx(Ke,{title:"Upgrade to compose your own commentary",placement:"top",children:n.jsx("span",{children:n.jsxs("button",{type:"button",className:"new-content-modal-btn locked","diagnostic-id":"cp-modal-compose-path-btn",disabled:!0,children:[n.jsxs("div",{className:"new-content-modal-header",children:[n.jsx("i",{className:"material-icons","diagnostic-id":"material-lock-icon",children:"lock"}),n.jsx("h4",{children:"Compose Your Own"})]}),n.jsx("div",{className:"content-description",children:"Add your own language and select specific charts from the Clearnomics library to create your own piece"})]})})}):n.jsxs("button",{type:"button",className:"new-content-modal-btn","diagnostic-id":"cp-modal-compose-path-btn",onClick:()=>h(1),children:[n.jsxs("div",{className:"new-content-modal-header",children:[n.jsx("i",{className:"material-icons",children:"insert_chart"}),n.jsx("h4",{children:"Compose Your Own"})]}),n.jsx("div",{children:"Add your own language and select specific charts from the Clearnomics library to create your own piece"})]})]})]}):n.jsx(gt,{initialValues:{title:""},onSubmit:(p,{setSubmitting:f})=>{const m=p.title.trim();u(m)},validationSchema:_t().shape({title:Ae().test("is-empty","Title cannot be empty",function(p){return!p||!p.split("").every(f=>f===" ")})}),children:({values:p,touched:f,errors:m,isSubmitting:g})=>n.jsxs(vt,{onClick:x=>x.stopPropagation(),children:[n.jsx("h5",{children:"Compose a New Commentary"}),n.jsx("div",{className:"title-label",children:"Title your commentary:"}),m.title&&f.title&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:m.title}),n.jsx(me,{id:"title",name:"title","diagnostic-id":"cp-title-input",placeholder:"Client Market Update",maxLength:160,className:m.title&&f.title?"text-input-error":"form-control"}),n.jsxs("div",{className:"character-count",children:[160-p.title.length," characters left"]}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>e(!1),children:"Cancel"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",disabled:!!Object.keys(m).length||g,children:"Next"})]})]})})]})})},awe=e=>({userId:e.auth.user.id,isLicenseUpgradable:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.license_type&&e.auth.user.company.license_type.is_upgradable,canUseFeatured:e.auth&&e.auth.user&&e.auth.user.can_use_featured,canUseInsightsExplorer:e.auth&&e.auth.user&&e.auth.user.can_use_insights_explorer,partnerType:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.partner_type&&e.auth.user.company.partner_type.type}),swe=Jt(le(awe,{newClientPiece:om})(iwe)),IP={GRID:"grid"};function owe(e){const{Insight:t}=on,{Engage:r}=qa,[i,a]=y.useState(e.view||IP.GRID),[s,o]=y.useState(""),[l,c]=y.useState(!1),[h,u]=y.useState(!1),[d,p]=y.useState(!1),f=e.engagePermissions.max_engage_clientpiece_charts,m=9;y.useEffect(()=>{e.tabSelected===t?(e.getClientPieces(e.userId),e.selectInsightToAdd(e.partnerInsightSelectedId||0)):e.selectSharedContent(0)},[]);const g=e.clientpieces&&s?e.clientpieces.filter(C=>Mn(C.title.toLowerCase(),s.toLowerCase())):e.clientpieces;let x=g&&Object.assign([],g);const v=(C,E)=>C.update_datetime<E.update_datetime&&C.export_datetime<E.update_datetime?1:C.update_datetime>E.update_datetime?-1:C.export_datetime<E.export_datetime?1:C.export_datetime>E.export_datetime||C.export_datetime>E.update_datetime?-1:0;x?.sort(v),x=x&&[...x.filter(C=>C.content_permissions_level<=e.composerPermissions?.content_permissions_level),...x.filter(C=>C.content_permissions_level>e.composerPermissions?.content_permissions_level)];const b=s&&g&&g.length===0,j=g&&g.length===0&&(e.canUseEngage&&e.tabSelected===r||e.tabSelected===t),w=g&&e.partnerInsightSelectedId&&g.filter(C=>C.id===e.partnerInsightSelectedId).length===0,S=C=>()=>{let E;e.tabSelected===t?(E=e.selectedInsight!==C?C:0,e.selectInsightToAdd(E)):e.tabSelected===r&&(E=e.selectedContent!==C?C:0,e.clientpieces.filter(N=>N.id===C)[0].num_charts>f?u(!0):u(!1),e.selectSharedContent(E))},_=g?x.map((C,E)=>n.jsx(Qje,{clientpiece:C,highlight:C.id&&e.newClientPieceId===C.id,tabSelected:e.tabSelected,isSelected:e.tabSelected===t?e.selectedInsight===C.id:e.selectedContent===C.id,onClick:C?.content_permissions_level<=e.composerPermissions?.content_permissions_level?S(C.id):null},C.id||E)):[];return _.length===0&&_.push(n.jsx(rwe,{setModal:c,changeSearch:o},"new-cb")),n.jsxs(n.Fragment,{children:[e.tabSelected===t&&w&&n.jsxs("div",{className:"partner-insight-content-warning-message","diagnostic-id":"partner-insight-content-warning-message",children:[n.jsx("i",{className:"material-icons",children:"warning"}),n.jsx("div",{className:"banner-text","diagnostic-id":"banner-text",children:"The currently selected commentary belongs to another user. Selecting a commentary will replace the existing content."})]}),n.jsxs("div",{id:"cb-grid-wrapper","diagnostic-id":"cp-grid-wrapper",children:[d&&n.jsx(ii,{setModal:p,modal:d}),l&&n.jsx(swe,{setModal:c,getMenuChoice:e.getMenuChoice}),n.jsx(Gje,{view:i,changeView:null,changeSearch:o,numResults:g&&g.length,search:s,setModal:c,tabSelected:e.tabSelected,setUpgradeModal:p}),b?n.jsxs("div",{id:"chartbook-search-placeholder",className:"fadeTransition",children:[n.jsx("i",{className:"material-icons",children:"search_off"}),n.jsxs("div",{children:['No results for "',s,'"']}),n.jsx("button",{className:"btn-cancel",onClick:()=>o(""),children:"Clear Search"})]}):j?n.jsxs("div",{id:"empty-content-placeholder",className:"fadeTransition",children:[n.jsx("i",{className:"material-icons",children:"insert_chart"}),n.jsx("div",{children:"There are no commentaries available for sharing."}),n.jsx("div",{children:"Create a commentary to get started."})]}):n.jsx(n.Fragment,{children:n.jsx(ewe,{type:"paginated",numPerPage:m,breakpoints:Ls,elements:_,active:i===IP.GRID,changeSearch:o})}),h&&e.tabSelected===r&&e.canUseEngage&&n.jsxs("div",{className:"charts-exceed-warning-message","diagnostic-id":"charts-exceed-warning-message",children:[n.jsx("i",{className:"material-icons",children:"warning"}),n.jsx("div",{className:"banner-text","diagnostic-id":"banner-text",children:`This commentary contains more than the maximum shareable charts.
36            Only the first ${f} charts will be displayed in the shared commentary.`})]})]})]})}const lwe=e=>({clientpieces:e.composer.pieces,userId:e.auth.user&&e.auth.user.id,selectedContent:e.engage&&e.engage.selectedContent,engagePermissions:e.auth.user&&e.auth.user.company&&e.auth.user.company.engage_permissions,canUseEngage:e.auth.user&&e.auth.user.can_use_engage,selectedInsight:e.spotlight&&e.spotlight.partnerInsights.selectedInsight,composerPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.composer_permissions}),T0=le(lwe,{selectSharedContent:d0,selectInsightToAdd:w0,getClientPieces:sm})(owe);function cwe({snippet:e,createMessage:t,embedType:r,isActive:i,isInsightsPage:a,sharedContent:s}
36){const{partnerInsightType:o}=Ei;return n.jsxs(n.Fragment,{children:[i?n.jsx("div",{className:`code-snippet-container ${i?"active":"inactive"}`,children:n.jsx("code",{id:`code-snippet-${r}`,"diagnostic-id":`code-snippet-${r}`,children:r==="hosted"||r==="partnerinsight"?n.jsx("a",{href:e,target:"_blank",rel:"noreferrer",onClick:l=>Dp(l,e),children:n.jsx("div",{id:`snippet-text-${r}`,"diagnostic-id":`snippet-text-${r}`,children:e})}):n.jsx("div",{id:`snippet-text-${r}`,"diagnostic-id":`snippet-text-${r}`,children:e})})}):n.jsx(Ke,{title:`${r==="partnerinsight"?"Publish":"Activate"} this ${a?"insights page":r==="partnerinsight"?"partner insight":"shared content"} to use the ${r==="hosted"||r==="partnerinsight"?"link":s?.type===o?"email template":"embed code"}`,placement:"top",children:n.jsx("div",{className:`code-snippet-container ${i?"active":"inactive"}`,children:n.jsx("code",{id:`code-snippet-${r}`,"diagnostic-id":`code-snippet-${r}`,children:e})})}),i?n.jsx("button",{className:"btn-secondary",type:"button","diagnostic-id":`${r}-copy-btn`,disabled:!i,onClick:()=>(t({alertMessage:`${r==="hosted"||r==="partnerinsight"?"Link":"Embed code"} has been copied to the clipboard`}),Hl(`snippet-text-${r}`)),children:r==="hosted"||r==="partnerinsight"?"Copy Link":"Copy HTML"}):n.jsx(Ke,{title:`${r==="partnerinsight"?"Publish":"Activate"} this ${a?"insights page":r==="partnerinsight"?"partner insight":"shared content"} to use the ${r==="hosted"||r==="partnerinsight"?"link":s?.type===o?"email template":"embed code"}`,placement:"top",children:n.jsx("button",{className:`btn-secondary ${i?"":"disabled"}`,type:"button","diagnostic-id":"embed-copy-btn",children:r==="partnerinsight"?"Publish To Copy":"Activate To Copy"})})]})}const dwe=e=>({}),Gs=le(dwe,{createMessage:he})(cwe),uwe=e=>{const{userId:t,toggleSharedItemStatus:r,toggleInsightsCollection:i,setIsActive:a,isActive:s,setToggleModal:o,sharedContent:l,isInsightsPage:c,toggleModal:h,getInsightsVideo:u,insightsVideo:d,isEngageWidget:p}=e,{insightsVideoType:f}=Ei;y.useEffect(()=>{const x=v=>$n(v,h,o);return window.addEventListener("keyup",x),()=>{window.removeEventListener("keyup",x)}},[h]);const m=c?"insights-page":l.type,g=x=>{x.stopPropagation(),x.preventDefault(),s&&(m==="insights-page"?i().then(v=>{v.status===200&&a(!1)}):r(t,l,l.type).then(()=>{p&&m===f&&u(d.id,t)})),o(!1)};return n.jsx(ot,{setModal:o,children:n.jsxs("div",{className:"toggle-status-modal-container","data-testid":"toggle-status-modal-container","diagnostic-id":"toggle-status-modal-container",children:[m==="insights-page"?n.jsxs(n.Fragment,{children:[n.jsx("h5",{children:"Turn Off Company's Insights Collection"}),n.jsx("p",{children:"This will turn off the insights collection for your entire company. Are you sure you want to turn off your company’s insights collection?"})]}):n.jsxs(n.Fragment,{children:[n.jsx("h5",{children:"Turn Off Shared Content"}),n.jsx("p",{children:"This will disable the hosted page and embeds for this shared content. Are you sure you want to turn off this shared content?"})]}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>{o(!1)},children:"CANCEL"}),n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",onClick:g,children:"TURN OFF"})]})]})})},hwe=e=>({userId:e.auth.user&&e.auth.user.id,insightsVideo:e.studio&&e.studio.insightsVideo}),mm=le(hwe,{toggleSharedItemStatus:ac,toggleInsightsCollection:MM,getInsightsVideo:_0})(uwe);function pwe(e){const{companyEngageSettings:t,toggleInsightsCollection:r,getCompanyEngageSettings:i}=e,[a,s]=y.useState(t?.is_insights_collection_enabled),[o,l]=y.useState(!1),c="hosted",h=!0;y.useEffect(()=>{i()},[]);const u=d=>{d.stopPropagation(),d.preventDefault(),t?.is_insights_collection_enabled?l(!0):r().then(p=>{p.status===200&&s(!a)})};return n.jsxs("div",{id:"engage-insights-wrapper",children:[n.jsxs("div",{className:"engage-insights-header-group",children:[n.jsx("h4",{children:"Your Insights Collection"}),n.jsx("div",{className:"embed-toggle-right",onClick:u,children:n.jsxs("div",{className:"onoffswitch",children:[n.jsx("input",{type:"checkbox",id:"engage-insights-page",className:"onoffswitch-checkbox",name:"engage-insights-page",onCh
36ange:()=>s(!a),checked:t?.is_insights_collection_enabled}),n.jsxs("label",{className:"onoffswitch-label",htmlFor:"engage-insights-page","diagnostic-id":"engage-insights-page-toggle",children:[n.jsx("span",{className:"onoffswitch-inner"}),n.jsx("span",{className:"onoffswitch-switch"})]})]})})]}),n.jsx("div",{className:"engage-insights-message",children:"Your insights collection displays all of your firm’s shared content in one place."}),n.jsxs("div",{className:"insights-page-section",id:"insights-page-layout",children:[n.jsx("h4",{children:"Share this link with clients"}),n.jsx("p",{className:"subheader",children:"Share this link to a Clearnomics-hosted insights collection via email, social media, etc."}),n.jsx("div",{className:"content-link-group",children:n.jsx(Gs,{snippet:t?.insights_collection?.hosted_url,embedType:c,isActive:a,isInsightsPage:h})})]}),o&&n.jsx(mm,{toggleModal:o,setToggleModal:l,setIsActive:s,isActive:a,isInsightsPage:h})]})}const fwe=e=>({userId:e.auth.user&&e.auth.user.id,companyEngageSettings:e.engage&&e.engage.companySettings}),mwe=le(fwe,{toggleInsightsCollection:MM,getCompanyEngageSettings:em})(pwe),DP=({field:{name:e,value:t,onChange:r,onBlur:i},id:a,label:s,className:o,diagId:l,disabled:c,...h})=>n.jsxs("div",{className:"radio-button",children:[n.jsx("input",{name:e,id:`${e}-${a}`,type:"radio",value:a,checked:a===t,disabled:c,onChange:r,onBlur:i,"diagnostic-id":l}),n.jsx("label",{"diagnostic-id":`${l}-label`,htmlFor:`${e}-${a}`,children:s})]});function gwe(e){const{companyEngageSettings:t,isDirty:r,setDirty:i,engageDesigns:a}=e,[s,o]=y.useState(t?.hosted_design?.name||""),l=u=>{o(u.target.value)};if(!t||!a)return null;const c={themeColor:t.theme_page_color,themeTextColor:t.theme_text_color,includeChartbook:t.show_engage_chartbooks,contactText:t.button_contact_text,btnColor:t.button_color,btnTextColor:t.button_text_color,btnAction:t.button_action,customUrl:t.contact_custom_url||"",overlayDesign:t?.hosted_design?.name,contactEmail:t.contact_email||"",contactSubject:t.contact_subject||"",companyEmail:t.company_email||"",phoneNumber:t.company_phone_number||"",contactWebsite:t.company_contact_website||"",address1:t.company_address_line1||"",address2:t.company_address_line2||"",city:t.company_address_city||"",state:t.company_address_state||"",zipCode:t.company_address_zipcode||"",privacyPolicyUrl:t.privacy_policy_url||""},h=_t().shape({themeColor:Ae().test("is-hexcode","Please enter a valid hexcode value (i.e. #22ffaa)",u=>{const d="1234567890abcdefABCDEF";return u.length!==4&&u.length!==7||u.slice(0,1)!=="#"?!1:u.slice(1).split("").every(p=>d.includes(p))}),themeTextColor:Ae().test("is-hexcode","Please enter a valid hexcode value (i.e. #22ffaa)",u=>{const d="1234567890abcdefABCDEF";return!u||u.length!==4&&u.length!==7||u.slice(0,1)!=="#"?!1:u.slice(1).split("").every(p=>d.includes(p))}),includeChartbook:cr(),contactText:Ae().required("Please enter button text").max(50,"Button text is too long"),btnColor:Ae().test("is-hexcode","Please enter a valid hexcode value (i.e. #22ffaa)",u=>{const d="1234567890abcdefABCDEF";return u.length!==4&&u.length!==7||u.slice(0,1)!=="#"?!1:u.slice(1).split("").every(p=>d.includes(p))}),btnTextColor:Ae().test("is-hexcode","Please enter a valid hexcode value (i.e. #22ffaa)",u=>{const d="1234567890abcdefABCDEF";return!u||u.length!==4&&u.length!==7||u.slice(0,1)!=="#"?!1:u.slice(1).split("").every(p=>d.includes(p))}),btnAction:Ae(),customUrl:Ae().matches(/^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([-.]{1}[a-z0-9]+)*\.([a-z]+)?(\/.*)?$/,"Please enter a valid URL"),contactEmail:Ae().email("Please enter a valid email address"),companyEmail:Ae().email("Please enter a valid email address"),contactSubject:Ae().max(240,"Email subject is too long"),privacyPolicyUrl:Ae().matches(/^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([-.]{1}[a-z0-9]+)*\.([a-z]+)?(\/.*)?$/,"Please enter a valid URL"),contactWebsite:Ae().matches(/^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([-.]{1}[a-z0-9]+)*\.([a-z]+)?(\/.*)?$/,"Please enter a valid URL")});return n.jsx("div",{id:"engage-settings-wrapper",children:n.jsx(gt,{initialValues:c,onSubmit:(u,{setSubmitting:d})=>{e.updateEngageOrgSettings(u).then(()=>{d(!1)})},validationSchema:h,enableReinitialize:!0,children:u=>{const{values:d,touched:p,errors:f,dirty:m,isSubmitting:g,setFieldValue:x,handleReset:v}=u;return m!==r&&i(m),n.jsxs(vt,{children:[n.jsxs("div",{className:"engage-settings-header-grp",children:[n.jsx("h4",{children:"Engage Settings"}),n.jsxs("div",{className:"engage-settings-btns",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"engage-settings-cancel-btn",onClick:v,disabled:!m||g,children:"CANCEL"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"engage-settings-save-btn",disabled:!m||g,children:"SAVE"})]})]}),n.jsx("div",{className:"engage-settings-message",children:"Customize the look of your hosted pages and add company contact information. These update settings for your entire firm."}),n.jsxs("div",{className:"engage-settings-section",id:"engage-contact-button-settings",children:[n.jsx("h5",{children:"Contact button"}),n.jsxs("div",{className:"engage-settings-form",children:[n.jsxs("div",{className:"col s12 m12 l6",children:[n.jsxs("div",{className:"form-group",children:[n.jsx("label",{children:"Contact Button Text"}),f.contactText&&p.contactText&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:f.contactText}),n.jsxs("div",{className:"character-count",children:[50-d.contactText?.length," characters left"]}),n.jsx(me,{type:"text",name:"contactText",id:"contactText","diagnostic-id":"contact-text-input",maxLength:"50",placeholder:"Contact button text"})]}),n.jsxs("div",{className:"form-group",children:[f.btnColor&&p.btnColor&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:f.btnColor}),n.jsxs("div",{className:"color-input",children:[n.jsx("div",{className:"color-preview",style:{backgroundColor:d.btnColor}}),n.jsx(me,{type:"color",name:"btnColor",id:"btnColor","diagnostic-id":"button-color"}),n.jsx("label",{children:"Button color"})]}),f.btnTextColor&&p.btnTextColor&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:f.btnTextColor}),n.jsxs("div",{className:"color-input",children:[n.jsx("div",{className:"color-preview",style:{backgroundColor:d.btnTextColor}}),n.jsx(me,{type:"color",name:"btnTextColor",id:"btnTextColor","diagnostic-id":"button-text-color"}),n.jsx("label",{children:"Button text color"})]})]})]}),n.jsxs("div",{className:"col s12 m12 l6",children:[n.jsxs("div",{className:"form-group",children:[n.jsx("label",{children:"Clicking the button will:"}),n.jsxs("div",{className:"form-group",children:[n.jsx(me,{component:DP,name:"btnAction",id:"mailto",diagId:"btn-email",label:"Open an email with a pre-filled subject"}),n.jsx(me,{component:DP,name:"btnAction",id:"redirect",diagId:"btn-url",label:"Open a specific URL"})]})]}),n.jsx("div",{className:"form-group",children:d.btnAction==="redirect"?n.jsxs(n.Fragment,{children:[n.jsx("label",{children:"Custom URL"}),f.customUrl&&p.customUrl&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:f.customUrl}),n.jsx(me,{type:"text",name:"customUrl","diagnostic-id":"custom-url-input",maxLength:"240",id:"customUrl",placeholder:"https://www.example.com/contact"})]}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{children:[n.jsx("label",{children:"Contact Email"}),f.contactEmail&&p.contactEmail&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:f.contactEmail}
36),n.jsx(me,{type:"text",name:"contactEmail",id:"contactEmail","diagnostic-id":"contact-email-input",placeholder:"Email",maxLength:"240"})]}),n.jsxs("div",{children:[n.jsx("label",{children:"Subject Line"}),f.contactSubject&&p.contactSubject&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:f.contactSubject}),n.jsx(me,{type:"text",name:"contactSubject",id:"contactSubject","diagnostic-id":"contact-subject-input",placeholder:"Email Subject",maxLength:"240"})]})]})})]})]})]}),n.jsxs("div",{className:"engage-settings-section",id:"engage-hosted-page-settings",children:[n.jsx("h5",{children:"Hosted pages"}),n.jsxs("div",{className:"engage-settings-form",children:[n.jsx("div",{className:"col s12 m12 l6",children:n.jsxs("div",{className:"overlay-design-section",children:[n.jsx("p",{children:"Select a header pattern for your hosted pages:"}),n.jsx("div",{className:"overlay-design-selector",children:Object.values(a).map(b=>n.jsxs("label",{"diagnostic-id":`${b.name}-label`,children:[n.jsx(me,{type:"radio",name:"overlayDesign",id:b.name,value:b.name,onClick:l,checked:s===b.name,"diagnostic-id":b.name}),n.jsxs("div",{className:"overlay-option",children:[s===b.name&&n.jsx("div",{className:"checkmark",children:n.jsx("i",{className:"material-icons",children:"done"})}),n.jsx("img",{className:"overlay-img",src:b.thumb_svg_url!==""?b.thumb_svg_url:void 0,alt:""})]})]},b.id))})]})}),n.jsx("div",{className:"col s12 m12 l6",children:n.jsxs("div",{className:"form-group",children:[f.themeColor&&p.themeColor&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:f.btnColor}),n.jsxs("div",{className:"color-input",children:[n.jsx("div",{className:"color-preview",style:{backgroundColor:d.themeColor}}),n.jsx(me,{type:"color",name:"themeColor",id:"themeColor","diagnostic-id":"theme-color"}),n.jsx("label",{children:"Hosted page theme color"})]}),f.themeTextColor&&p.themeTextColor&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:f.themeTextColor}),n.jsxs("div",{className:"color-input",children:[n.jsx("div",{className:"color-preview",style:{backgroundColor:d.themeTextColor}}),n.jsx(me,{type:"color",name:"themeTextColor",id:"themeTextColor","diagnostic-id":"theme-text-color"}),n.jsx("label",{children:"Hosted page theme text color"})]}),n.jsx("label",{children:"Privacy Policy URL"}),f.privacyPolicyUrl&&p.privacyPolicyUrl&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:f.privacyPolicyUrl}),n.jsx(me,{type:"text",name:"privacyPolicyUrl","diagnostic-id":"privacy-policy-url-input",maxLength:"240",id:"privacyPolicyUrl",placeholder:"https://www.example.com/privacy"})]})})]}),n.jsxs("div",{className:"engage-settings-section",id:"engage-insights-collection-settings",children:[n.jsx("h5",{children:"Insights collection"}),n.jsx("div",{className:"engage-settings-form",children:n.jsx("div",{className:"col s12 m12 l6",children:n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"includeChartbook",id:"includeChartbook",className:"filled-in",onChange:b=>{const j=b.target.checked;x("includeChartbook",j)},"diagnostic-id":"include-chartbook-input",checked:d.includeChartbook}),n.jsx("span",{"diagnostic-id":"include-chartbook-toggle",children:"Include chartbooks in the insights collection"})]})})})]})]}),n.jsxs("div",{className:"engage-settings-section",id:"engage-company-contact-settings",children:[n.jsx("h5",{children:"Company contact information"}),n.jsxs("div",{className:"engage-settings-form",children:[n.jsx("div",{className:"col s12 m12 l6",children:n.jsxs("div",{className:"form-group",children:[n.jsxs("div",{children:[n.jsx("label",{children:"Address (Line 1)"}),n.jsx(me,{type:"text",name:"address1",id:"address1","diagnostic-id":"company-address-line-1-input",placeholder:"Address (Line 1)",maxLength:"50"})]}),n.jsxs("div",{children:[n.jsx("label",{children:"Address (Line 2)"}),n.jsx(me,{type:"text",name:"address2",id:"address2","diagnostic-id":"company-address-line-2-input",placeholder:"Address (Line 2)",maxLength:"50"})]}),n.jsxs("div",{children:[n.jsx("label",{children:"City"}),n.jsx(me,{type:"text",name:"city",id:"city","diagnostic-id":"company-city-input",placeholder:"City",maxLength:"50"})]}),n.jsxs("div",{children:[n.jsx("label",{children:"State"}),n.jsx(me,{type:"text",name:"state",id:"state","diagnostic-id":"company-state-input",placeholder:"State",maxLength:"50"})]}),n.jsxs("div",{children:[n.jsx("label",{children:"Zip Code"}),n.jsx(me,{type:"text",name:"zipCode",id:"zipCode","diagnostic-id":"company-zip-code-input",placeholder:"Zip code",maxLength:"20"})]})]})}),n.jsx("div",{className:"col s12 m12 l6",children:n.jsxs("div",{className:"form-group",children:[n.jsxs("div",{children:[n.jsx("label",{children:"Company Contact Email"}),f.companyEmail&&p.companyEmail&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:f.companyEmail}
36),n.jsx(me,{type:"text",name:"companyEmail",id:"companyEmail","diagnostic-id":"company-contact-email-input",placeholder:"Email address",maxLength:"240"})]}),n.jsxs("div",{children:[n.jsx("label",{children:"Company Contact Phone"}),n.jsx(me,{type:"text",name:"phoneNumber",id:"phoneNumber","diagnostic-id":"company-contact-phone-input",placeholder:"Phone number",maxLength:"30"})]}),n.jsxs("div",{children:[n.jsx("label",{children:"Company Website"}),f.contactWebsite&&p.contactWebsite&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:f.contactWebsite}),n.jsx(me,{type:"text",name:"contactWebsite",id:"contactWebsite","diagnostic-id":"company-contact-website-input",placeholder:"Website",maxLength:"240"})]})]})})]})]})]})}})})}const vwe=e=>({companyEngageSettings:e.engage&&e.engage.companySettings,engageDesigns:e.engage&&e.engage.engageDesigns}),bwe=le(vwe,{getCompanyEngageSettings:em,updateEngageOrgSettings:gve})(zt(gwe));function ywe({view:e,changeView:t,changeSearch:r,numResults:i,search:a,getChartbooks:s,newChartbook:o,userId:l,maxChartbooks:c,setModal:h,tabSelected:u,chartbooks:d,chartbookPermissions:p,setUpgradeModal:f,logEvent:m,user:g}){const{Engage:x}=qa,{Insight:v}=on,[b,j]=y.useState(!1),w=d?.filter(P=>P.content_permissions_level<=p.content_permissions_level).length,S=()=>{r(""),j(!1)},_=()=>{h(!0)},C=()=>{const P=document.getElementById("chartbook-search");b?P?.blur():P?.focus(),b&&r(""),j(!b)},E=()=>{f(!0),m(l,null,"communitycta","open")};return n.jsxs("div",{id:"searchbar-container",className:b?a?"input-active active-search":"input-active":"",children:[n.jsxs("div",{id:"search-input-container",children:[n.jsx("form",{autoComplete:"off",onSubmit:P=>{P.preventDefault()},children:n.jsx("input",{type:"search","diagnostic-id":"chartbook-search-input",placeholder:"Search Chartbooks...",onChange:P=>r(P.target.value),className:`${a.length>0?"active":""}`,value:a})}),a?n.jsx("i",{className:"material-icons","diagnostic-id":"clear-search-btn",onClick:S,children:"close"}):n.jsx("i",{className:"material-icons prefix",onClick:C,children:"search"}),a&&n.jsxs("h6",{id:"search-results","diagnostic-id":"search-results-text",children:[i," search results -"," ",n.jsx("button",{className:"btn-cancel",onClick:S,children:"Clear Search"})]})]}),u===x||u===v?n.jsx(n.Fragment,{}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"refresh-icon-container",children:n.jsx(Ke,{title:"Refresh chartbooks",placement:"top",children:n.jsx(N0,{onClick:()=>s(l)})})}),n.jsxs("div",{className:"view-icons",children:[n.jsx(Ke,{title:"Grid view",placement:"top",children:n.jsx("div",{children:n.jsx(E0,{onClick:()=>t("grid"),className:e==="grid"?"active":"","diagnostic-id":"grid-view-btn"})})}),n.jsx(Ke,{title:"List view",placement:"top",children:n.jsx("div",{children:n.jsx(Vje,{onClick:()=>t("list"),className:e==="list"?"active":"","diagnostic-id":"list-view-btn"})})})]}),c<=w?n.jsx("button",{className:"btn-primary locked-btn",disabled:!0,children:n.jsx(Ke,{interactive:!0,classes:{popper:"upgrade-tooltip"},title:n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"upgrade-tooltip-msg",children:"Upgrade to add more chartbooks"}),g.is_upgrade_disabled?n.jsxs("div",{className:"upgrade-submitted-tooltip",children:[n.jsx("i",{className:"material-icons",children:"done"}),"UPGRADE REQUESTED"]}):n.jsxs("button",{onClick:E,className:"upgrade-tooltip-btn",children:[n.jsx("i",{className:"material-icons",children:"open_in_new"}),"UPGRADE"]})]}),placement:"top",children:n.jsxs("div",{className:"locked-new-cb-btn",children:[n.jsx("i",{className:"material-icons","diagnostic-id":"material-lock-icon",children:"lock"}),"New"]})})}):n.jsxs("button",{className:"btn-primary","diagnostic-id":"cb-new-modal-btn",onClick:_,children:[n.jsx("i",{className:"material-icons",children:"add"}),"New"]})]})]})}const xwe=e=>({userId:e.auth.user&&e.auth.user.id,maxChartbooks:e.auth.user&&e.auth.user.company&&e.auth.user.company.chartbook_permissions&&e.auth.user.company.chartbook_permissions.max_chartbooks,chartbooks:e.chartbooks&&e.chartbooks.items,chartbookPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.chartbook_permissions,user:e.auth.user}),jwe=le(xwe,{getChartbooks:rc,newChartbook:Ga,logEvent:_r})(ywe);function wwe(e){const t=e.chartbook,r=t.charts,{canUsePartner:i,partnerPermissions:a,chartbookPermissions:s}
36=e,{allow_partner:o}=a,{Engage:l}=qa,{Insight:c}=on,{NotPublished:h}=ki,u="chartbooks",d=e.engage?.userSharedContent,p=t.engage_shared?.map($=>$.id),f=d?d?.filter($=>$.is_enabled&&p?.includes($.id)).length>0:t.engage_shared?.some($=>$.is_enabled),m=t.partner_insights?.filter($=>$.publish_status!==h).length>0,[g,x]=y.useState(!1),[v,b]=y.useState(!1),[j,w]=y.useState(!1),[S,_]=y.useState(!1),[C,E]=y.useState(t.is_favorite),[P,T]=y.useState(!1);y.useEffect(()=>{E(t.is_favorite)},[e.chartbook.is_favorite]);let N=t.cover_image_url;r&&r.length>=1&&(N=r[0].chart_image_jpg_url);const k=()=>{E(!C),e.toggleFavorite(t.id,e.userId)},I=()=>{t.engage_shared?.length>0?b(!0):x(!0)},D=()=>{t.engage_shared?.length>0&&f&&w(!0)},O=n.jsxs(n.Fragment,{children:[t.engage_shared?.length>0&&f?n.jsxs("button",{onClick:D,className:"card-btn","diagnostic-id":"cb-open-btn",children:[n.jsx("i",{className:"material-icons",children:"mode_edit"}),n.jsx("span",{children:" Open"})]}):n.jsxs(Ze,{to:{pathname:`/chartbooks/${t.id}`},className:"card-btn","diagnostic-id":"cb-open-btn",children:[n.jsx("i",{className:"material-icons",children:"mode_edit"}),n.jsx("span",{children:" Open"})]}),n.jsxs("button",{onClick:I,className:"card-btn-delete","diagnostic-id":"cb-delete-btn",children:[n.jsx("i",{className:"material-icons",children:"delete_forever"}),n.jsx("span",{children:"Delete"})]})]});return n.jsxs("div",{className:"col fadeTransition",children:[n.jsxs("div",{className:`card${e.highlight?" newCard":""}${e.isSelected?" selected":""}${t?.content_permissions_level<=s?.content_permissions_level?"":" locked"}`,"diagnostic-id":"cb-card",onClick:e.onClick,children:[e.isSelected&&(e.tabSelected===l||e.tabSelected===c)&&n.jsx("div",{className:"checkmark","diagnostic-id":"checkmark",children:n.jsx("i",{className:"material-icons",children:"done"})}),n.jsx("div",{className:"card-content",children:n.jsxs("span",{className:"card-title cb-title-container","diagnostic-id":"cb-title",children:[n.jsxs("div",{className:"cb-title-grp",children:[n.jsx("div",{className:"chartbook-title truncate","diagnostic-id":"cb-title-text",children:t.title}),i&&o&&m&&n.jsx("i",{className:"material-icons",children:"link"})]}),e.tabSelected!==l&&e.tabSelected!==c&&n.jsx(Ke,{title:t?.content_permissions_level<=s?.content_permissions_level?C?"Remove from favorites":"Add to favorites":"Upgrade to access locked chartbooks",placement:"top",children:n.jsx("div",{children:n.jsx(dt,{icon:Rj,className:C?"is-favorite":"","diagnostic-id":C?"remove-favorite-grid-btn":"add-favorite-grid-btn",onClick:()=>t.content_permissions_level<=s?.content_permissions_level&&k()})})})]})}),n.jsx("div",{className:"card-image",children:n.jsx("img",{alt:t.title+" Chartbook",max_height:"100px",src:N})}),n.jsx("div",{className:`chartbook-card-placeholder${t.aspect_ratio==="16:9"?" size-aspect-16-9":""}`}),t?.content_permissions_level>s?.content_permissions_level?n.jsx(Ke,{title:"Upgrade to access locked chartbooks",placement:"top",children:n.jsx("div",{className:"locked-card",children:n.jsx("i",{className:"material-icons","diagnostic-id":"material-lock-icon",children:"lock"})})}):n.jsx(n.Fragment,{children:e.tabSelected!==l&&e.tabSelected!==c&&n.jsx("div",{className:"card-btn-grp",children:n.jsx(wn,{hasPermission:i&&o&&m,fallback:O,children:n.jsxs("button",{className:"card-btn","diagnostic-id":"cb-open-btn",onClick:()=>T(!0),children:[n.jsx("i",{className:"material-icons",children:"visibility"}),n.jsx("span",{children:" Preview"})]})})})}),n.jsxs("div",{className:"card-caption",children:[n.jsxs("div",{className:"card-datetime",children:[n.jsx("div",{className:"card-tagline",children:t.tags}),"Edited"," ",n.jsx(gn,{local:!0,format:"MMM D, YYYY h:mma",children:t.user_update_datetime})," ",new Date().toLocaleTimeString("en-us",{timeZoneName:"short"}).split(" ")[2]]}),t.engage_shared?.length>0?n.jsx("div",{className:"card-shared-container",children:n.jsx("div",{className:`card-shared-pill ${f?"shared-live":"shared-off"}`,"diagnostic-id":"card-shared-pill",onClick:()=>_(!0),children:f?"Sharing: Live":"Sharing: Off"})}):n.jsx(n.Fragment,{})]})]}),g&&n.jsx(Du,{modal:g,setModal:x,cbId:t.id,cpId:null}),v&&n.jsx(fm,{modal:v,setModal:b,contentShared:t.engage_shared,sharedType:u}),S&&n.jsx(nl,{modal:S,setModal:_,contentShared:t.engage_shared,sharedType:u}),j&&n.jsx(pm,{modal:j,setModal:w,sharedType:u,originalContent:t}),P&&n.jsx(ao,{modal:P,setModal:T,partnerInsightShared:t.partner_insights,sharedType:u})]})}const Swe=e=>({userId:e.auth.user&&e.auth.user.id,engage:e.engage,canUsePartner:e.auth&&e.auth.user&&e.auth.user.can_use_partner,partnerPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.partner_permissions,chartbookPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.chartbook_permissions}),_we=le(Swe,{toggleFavorite:a0})(wwe);function Cwe({elements:e,active:t,type:r,title:i,numPerPage:a=9,showDescription:s,breakpoints:o,icon:l}){const c=ws(),[h,u]=y.useState(0),[d,p]=y.useState(0),[f,m]=y.useState(0),g=r==="row",x=r==="paginated",v=r==="paginated-row",b=r==="paginated-col",j=b?c>600?~~((e.length-1)/(a/2))+1:e.length:~~((e.length-1)/a)+1,w=d*a,S=e.slice(w,w+a);y.useEffect(()=>{d>=j&&d>0&&p(d-1)},[j,d]);const _=()=>{const I=Object.keys(o);for(let D=0;D<I.length;D++)if(c<=~~I[D])return o[I[D]]},C=I=>{const D=b?document.getElementById("grid-layout"):document.querySelector(`[data-gridid='${i}']`);return(D&&D.children&&D.children[0]&&D.children[0].offsetWidth)*I},E=I=>{const D=document.querySelector(`[data-gridid='${i}']`);if(!D)return;const O=Array.from(D.children),$=h+(I==="left"?-1:1);for(const U in O)O[U].style.setProperty("--offset",`-${C($)}px`);u($)},P=`${_()}${g?" nowrap":""}`,T=e.map(I=>Me.cloneElement(I,{style:{transform:`translateX(-${C(d)+f}px)`,transition:f?"none":"transform 0.5s ease"}})),N=io({onSwipedLeft:()=>d<j-1&&p(d+1),onSwipedRight:()=>d>0&&p(d-1),onSwiping:I=>m(I.deltaX),onSwiped:()=>m(0)}),k=x||v?S:b?T:e;return t&&e?n.jsxs(n.Fragment,{children:[n.jsxs("div",{id:"grid-layout",className:P,"data-gridid":i,...N,children:[k,(g||v)&&n.jsxs(n.Fragment,{children:[d!==0&&n.jsx("div",{id:"row-pagination-left",children:n.jsx("button",{className:"btn-navigation",onClick:()=>g?E("left"):p(d-1),children:n.jsx("i",{className:"material-icons",children:"chevron_left"})})}),d<j-1&&n.jsx("div",{id:"row-pagination-right",children:n.jsx("button",{className:"btn-navigation",onClick:()=>g?E("right"):p(d+1),children:n.jsx("i",{className:"material-icons",children:"chevron_right"})})})]}),b&&n.jsxs(n.Fragment,{children:[d!==0&&n.jsx("div",{id:"grid-collection-left",children:n.jsx("button",{className:"btn-navigation",onClick:()=>p(d-1),children:n.jsx("i",{className:"material-icons",children:"chevron_left"})})}),d<j-1&&n.jsx("div",{id:"grid-collection-right",children:n.jsx("button",{className:"btn-navigation",onClick:()=>p(d+1),children:n.jsx("i",{className:"material-icons",children:"chevron_right"})})})]})]}),x&&j>1&&n.jsxs("div",{className:"chartbook-page-btns",children:[d>0&&n.jsxs("button",{className:"btn-navigation",onClick:()=>p(d-1),children:["< Previous Page"," "]}),d<j-1&&n.jsx("button",{className:"btn-navigation",onClick:()=>p(d+1),children:"Next Page >"})]})]}):n.jsx(n.Fragment,{})}const Nwe=e=>({newChartbookId:e.chartbooks.newChartbookId}),Ewe=le(Nwe,{})(Cwe);function Twe({sort:e,changeSort:t}){const r=i=>{e[0]!==i?t([i,i==="title"||i==="tags"?"ascending":"descending"]):t([i,e[1]==="descending"?"ascending":"descending"])};return n.jsxs("div",{id:"cblist-header",className:"cblist-row","diagnostic-id":"cblist-header",children:[n.jsx("div",{className:"cblist-column"}),n.jsx("div",{className:"cblist-column"}),n.jsxs("div",{className:"cblist-column",onClick:()=>r("title"),children:["Title",e[0]==="title"&&(e[1]==="descending"?n.jsx("i",{className:"material-icons",children:"arrow_downward"}):n.jsx("i",{className:"material-icons",children:"arrow_upward"}))]}),n.jsxs("div",{className:"cblist-column",onClick:()=>r("tags"),children:["Tags"," ",e[0]==="tags"&&(e[1]==="descending"?n.jsx("i",{className:"material-icons",children:"arrow_downward"}):n.jsx("i",{className:"material-icons",children:"arrow_upward"}))]}),n.jsxs("div",{className:"cblist-column",onClick:()=>r("charts"),children:["Charts"," ",e[0]==="charts"&&(e[1]==="descending"?n.jsx("i",{className:"material-icons",children:"arrow_downward"}):n.jsx("i",{className:"material-icons",children:"arrow_upward"}))]}),n.jsxs("div",{className:"cblist-column",onClick:()=>r("user_update_datetime"),children:["Last Edited"," ",e[0]==="user_update_datetime"&&(e[1]==="descending"?n.jsx("i",{className:"material-icons",children:"arrow_downward"}):n.jsx("i",{className:"material-icons",children:"arrow_upward"}))]}),n.jsx("div",{className:"cblist-column",children:"Sharing"}),n.jsx("div",{className:"cblist-column"})]})}var rd={},RP;function kwe(){if(RP)return rd;RP=1;var e=vn(),t=bn();Object.defineProperty(rd,"__esModule",{value:!0}),rd.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{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-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"}),"Lock");return rd.default=a,rd}var Pwe=kwe();const Iwe=Zt(Pwe);function Dwe({chartbook:e,highlight:t,history:r,toggleFavorite:i,userId:a,allowChartbookPptx:s,engage:o,canUsePartner:l,partnerPermissions:c,chartbookPermissions:h}){const{allow_partner:u}=c,{NotPublished:d}=ki,p="chartbooks",[f,m]=y.useState(e.is_favorite),[g,x]=y.useState(!1),[v,b]=y.useState(!1),[j,w]=y.useState(!1),[S,_]=y.useState(!1),[C,E]=y.useState(!1),[P,T]=y.useState(!1),N=o?.userSharedContent,k=e.engage_shared?.map(M=>M.id),I=N?N?.filter(M=>M.is_enabled&&k?.includes(M.id)).length>0:e.engage_shared?.some(M=>M.is_enabled),D=e.partner_insights?.filter(M=>M.publish_status!==d).length>0;y.useEffect(()=>{m(e.is_favorite)},[e.is_favorite]);const O=M=>{M.stopPropagation(),M.preventDefault(),m(!f),i(e.id,a)},$=M=>{M.preventDefault(),M.stopPropagation(),e.engage_shared?.length>0?E(!0):b(!0)},U=()=>{e.engage_shared?.length>0&&I&&w(!0)},B=e.charts&&e.charts.length?e.charts[0].chart_thumb_jpg_url:e.cover_image_jpg_url,{Locked:L,Disabled:A}=_n,R=s===L,F=s===A,q=n.jsxs("button",{type:"submit",disabled:R||F,children:[(R||F)&&n.jsx("i",{className:"material-icons","diagnostic-id":"material-lock-icon",children:"lock"}),n.jsx(dt,{icon:Sj})]}),V=n.jsxs("div",{className:`cblist-row${t?" cblist-newCard":""}`,"diagnostic-id":"cblist-row",onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),children:[n.jsx("div",{className:"cblist-column",children:n.jsx(Ke,{title:e?.content_permissions_level<=h?.content_permissions_level?f?"Remove from favorites":"Add to favorites":"",placement:"top",children:n.jsx("div",{children:n.jsx(dt,{icon:Rj,className:f?"is-favorite":"","diagnostic-id":f?"remove-favorite-list-btn":"add-favorite-list-btn",onClick:M=>e.content_permissions_level<=h?.content_permissions_level&&O(M)})})})}),n.jsx("div",{className:"cblist-column",children:n.jsx("img",{className:"cblist-thumbnail",src:B,alt:"thumbnail"})}),n.jsx("div",{className:"cblist-column",children:e.title}),n.jsx("div",{className:"cblist-column",children:e.tags||"--"}),n.jsx("div",{className:"cblist-column","diagnostic-id":"cblist-num-charts",children:e.num_charts?e.num_charts:0}),n.jsxs("div",{className:"cblist-column",children:[Qt(e.user_update_datetime).format("MMM D, YYYY h:mma")," ",new Date().toLocaleTimeString("en-us",{timeZoneName:"short"}).split(" ")[2]]}),n.jsxs("div",{className:"cblist-column shared-icons",children:[e.engage_shared?.length>0?n.jsx(Ke,{title:"This chartbook is linked to an Engage shared content.",placement:"top",children:n.jsx("div",{className:"card-s
36hared-container",children:n.jsx("div",{className:`card-shared-pill ${I?"shared-live":"shared-off"}`,"diagnostic-id":"card-shared-pill",onClick:M=>{M.preventDefault(),M.stopPropagation(),T(!0)},children:I?"Live":"Off"})})}):n.jsx(n.Fragment,{}),l&&u&&D&&n.jsx(Ke,{title:"This chartbook is linked to a partner insight.",placement:"top",children:n.jsx("i",{className:"material-icons link-icon",children:"link"})})]}),n.jsxs("div",{className:"cblist-column icons",onClick:M=>M.stopPropagation(),children:[e?.content_permissions_level<=h?.content_permissions_level&&n.jsxs(n.Fragment,{children:[n.jsx("form",{method:"get",target:"_blank",action:e.pdf_url,id:"cblist-pdf-btn","diagnostic-id":"cblist-pdf-btn",children:n.jsx("button",{type:"submit",children:n.jsx(dt,{icon:nu})})}),n.jsx("form",{method:"get",target:"_blank",action:e.pptx_url,id:"cblist-ppt-btn","diagnostic-id":"cblist-ppt-btn",children:R?n.jsx(Ke,{title:"Upgrade to download PowerPoint chartbooks",placement:"top",children:n.jsx("div",{children:q})}):q})]}),e?.content_permissions_level<=h?.content_permissions_level?n.jsx(Ke,{title:l&&u&&D?"This chartbook is currently being shared with a partner insight that is published or pending review and cannot be deleted.":"",placement:"top",children:n.jsx(C0,{onClick:M=>l&&u&&D?null:$(M),className:`delete-icon${l&&u&&D?" disabled":""}`,"diagnostic-id":"cblist-delete-btn"})}):n.jsx(Iwe,{className:"locked-icon","diagnostic-id":"cblist-locked-icon"})]})]}),X=n.jsx(n.Fragment,{children:e.engage_shared?.length>0&&I?n.jsx("div",{onClick:U,children:V}):n.jsx(n.Fragment,{children:e.content_permissions_level<=h?.content_permissions_level?n.jsx(Ze,{to:`chartbooks/${e.id}`,children:V}):n.jsx(Ke,{title:"Upgrade to access locked chartbooks",placement:"top",children:n.jsx("div",{className:"cblist-locked-container",children:V})})})});return n.jsxs(n.Fragment,{children:[n.jsx(wn,{hasPermission:l&&u&&D,fallback:X,children:n.jsx("div",{onClick:()=>_(!0),children:V})}),v&&n.jsx(Du,{modal:v,setModal:b,cbId:e.id,cpId:null}),C&&n.jsx(fm,{modal:C,setModal:E,contentShared:e.engage_shared,sharedType:p}),P&&n.jsx(nl,{modal:P,setModal:T,contentShared:e.engage_shared,sharedType:p}),j&&n.jsx(pm,{modal:j,setModal:w,sharedType:p,originalContent:e}),S&&n.jsx(ao,{modal:S,setModal:_,partnerInsightShared:e.partner_insights,sharedType:p})]})}const Rwe=e=>({userId:e.auth.user&&e.auth.user.id,allowChartbookPptx:e.auth.user&&e.auth.user.company&&e.auth.user.company.chartbook_permissions&&e.auth.user.company.chartbook_permissions.allow_chartbook_pptx,engage:e.engage,canUsePartner:e.auth&&e.auth.user&&e.auth.user.can_use_partner,partnerPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.partner_permissions,chartbookPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.chartbook_permissions}),Owe=le(Rwe,{toggleFavorite:a0})(Jt(Dwe));function Awe(e){const[t,r]=y.useState(e.sort||["user_update_datetime","descending"]),i=h=>{h.preventDefault(),e.changeSearch(""),e.setModal(!0)};y.useEffect(()=>{e.setSortPreference(t)},[t]);const a=e.chartbooks&&e.chartbooks.length===0?{borderTop:"none",borderRadius:"4px"}:{},s=e.chartbooks?.filter(h=>h.content_permissions_level<=e.chartbookPermissions.content_permissions_level).length,o=e.maxChartbooks<=s,l=n.jsxs("div",{id:"cblist-new",className:`cblist-row${o?" locked":""}`,"diagnostic-id":`cblist-new-${o?"lock":"btn"}`,onClick:o?void 0:i,style:a,children:["New Chartbook",n.jsx("i",{className:"material-icons",children:o?"lock":"add_circle"})]}),c=()=>{e.setUpgradeModal(!0),e.logEvent(e.userId,null,"communitycta","open")};return n.jsxs("div",{id:"chartbook-list",className:"fadeTransition"+(e.active?" active":""),children:[e.chartbooks&&e.chartbooks.length>0&&n.jsx(Twe,{changeSort:r,sort:t}),e.chartbooks&&e.chartbooks.map((h,u)=>n.jsx(Owe,{chartbook:h,highlight:h.id&&e.newChartbookId===h.id},h.id||u)),o?n.jsx(Ke,{interactive:!0,classes:{popper:"upgrade-tooltip"},placement:"top",title:n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"upgrade-tooltip-msg",children:"Upgrade to add more chartbooks"}),e.user.is_upgrade_disabled?n.jsxs("div",{className:"upgrade-submitted-tooltip",children:[n.jsx("i",{className:"material-icons",children:"done"}),"UPGRADE REQUESTED"]}):n.jsxs("button",{onClick:c,className:"upgrade-tooltip-btn",children:[n.jsx("i",{className:"material-icons",children:"open_in_new"}),"UPGRADE"]})]}),children:l}):l]})}const Mwe=e=>({newChartbookId:e.chartbooks.newChartbookId,sort:e.preferences.chartbookBrowserSort,userId:e.auth.user&&e.auth.user.id,maxChartbooks:e.auth.user&&e.auth.user.company&&e.auth.user.company.chartbook_permissions&&e.auth.user.company.chartbook_permissions.max_chartbooks,chartbookPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.chartbook_permissions,user:e.auth.user}),$we=le(Mwe,{newChartbook:Ga,setSortPreference:iZ,logEvent:_r})(Awe);class Lwe extends y.Component{constructor(){super(...arguments),this.handleNewChartbook=()=>{this.props.changeSearch(""),this.props.setModal(!0)}}render(){const t={marginBottom:"20px"},r=this.props.chartbooks?.filter(i=>i.content_permissions_level<=this.props.chartbookPermissions.content_permissions_level).length;return n.jsx("div",{className:"col fadeTransition",children:n.jsxs("div",{className:"card",id:"card-new",children:[n.jsx("div",{className:"card-title chartbook-title",style:t,children:"New Chartbook"}),this.props.maxChartbooks<=r?n.jsx("button",{id:"locked-new-btn","diagnostic-id":"cb-new-lock",disabled:!0,children:n.jsx(Ke,{title:"Upgrade to add more chartbooks",placement:"top",children:n.jsx("i",{className:"material-icons",style:{padding:"12px"},children:"lock"})})}):n.jsx("button",{id:"card-new-btn","diagnostic-id":"cb-new-btn",onClick:this.handleNewChartbook,children:n.jsx("i",{className:"material-icons",children:"add"})})]})})}}
36const Fwe=e=>({userId:e.auth.user&&e.auth.user.id,maxChartbooks:e.auth.user&&e.auth.user.company&&e.auth.user.company.chartbook_permissions&&e.auth.user.company.chartbook_permissions.max_chartbooks,chartbooks:e.chartbooks&&e.chartbooks.items,chartbookPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.chartbook_permissions}),Uwe=le(Fwe,{newChartbook:Ga})(Lwe),Bwe=({setModal:e,newChartbook:t,userId:r,isLicenseUpgradable:i,history:a,canUseFeatured:s,canUseInsightsExplorer:o,getMenuChoice:l,partnerType:c,canUseAssistant:h,hedwigPermissions:u,user:d})=>{const[p,f]=y.useState(0),{Disabled:m}=_n,{Community:g,SponsoredCommunity:x}=Br,v=d?.account_permissions.name===g||d?.account_permissions.name===x,b=w=>{t(void 0,r,w).then(S=>{a.push(`/chartbooks/${S}/new/`)})},j=w=>n.jsxs("button",{disabled:w,type:"button",className:`new-cb-modal-btn${w?" locked":""}`,"diagnostic-id":"cb-modal-featured-path-btn",onClick:()=>{o&&l("explorer")},children:[n.jsxs("div",{className:"new-cb-modal-header",children:[n.jsx("i",{className:"material-icons",children:w?"lock":"explore"}),n.jsx("h4",{children:"Featured Insights"})]}),n.jsx("div",{children:"Select from featured insights that address client concerns"})]});return n.jsx(ot,{setModal:e,children:n.jsxs("div",{className:`new-chartbook-modal-container chartbook${p===1?" add-title":""}${u?.allow_use_assistant!==m&&h?" has-assistant-btn":""}`,children:[n.jsx("i",{className:"material-icons",onClick:()=>e(!1),children:"close"}),p===0?n.jsxs(n.Fragment,{children:[n.jsx("h5",{children:"Create a New Chartbook"}),n.jsxs("div",{className:"new-cb-modal-btns",children:[n.jsxs(wn,{hasPermission:u?.allow_use_assistant!==m&&h,children:[n.jsx(Ze,{to:"/start",children:n.jsxs("button",{type:"button",className:"new-cb-modal-btn","diagnostic-id":"cb-modal-start-path-btn",children:[n.jsxs("div",{className:"new-cb-modal-header",children:[n.jsx("i",{className:"material-icons",children:"assistant_navigation"}),n.jsx("h4",{children:"Get Started"})]}),n.jsx("div",{children:"Create a chartbook with just a few clicks"})]})}),n.jsx(Ze,{to:"/assistant",children:n.jsxs("button",{type:"button",className:"new-cb-modal-btn","diagnostic-id":"cb-modal-assistant-path-btn",children:[n.jsxs("div",{className:"new-cb-modal-header",children:[n.jsx("i",{className:"material-icons",children:"flash_on"}),n.jsx("h4",{children:"Use the Assistant"})]}),n.jsx("div",{children:"Describe the topics you would like to discuss with clients and prospects"})]})})]}),s?i?n.jsx(Ke,{title:"Upgrade to access featured chartbooks",placement:"top",children:n.jsx("span",{children:j(i)})}):n.jsx(Ze,{to:"/featured",children:j()}):n.jsx(n.Fragment,{}),o&&!v&&n.jsx(Ze,{to:{pathname:"/insights",search:"?view=explorer&filter=chartbook"},children:j()}),n.jsxs("button",{type:"button",className:"new-cb-modal-btn","diagnostic-id":"cb-modal-library-path-btn",onClick:()=>f(1),children:[n.jsxs("div",{className:"new-cb-modal-header",children:[n.jsx("i",{className:"material-icons",children:"insert_chart"}),n.jsx("h4",{children:"Build Your Own"})]}),n.jsx("div",{children:"Browse the Chart Library and select charts across a wide range of topics"})]})]})]}):n.jsx(gt,{initialValues:{title:""},onSubmit:(w,{setSubmitting:S})=>{const _=w.title.trim();b(_)},validationSchema:_t().shape({title:Ae().test("is-empty","Title cannot be empty",function(w){return!w||!w.split("").every(S=>S===" ")})}),children:({values:w,touched:S,errors:_,isSubmitting:C})=>n.jsxs(vt,{onClick:E=>E.stopPropagation(),children:[n.jsx("h5",{children:"Create a New Chartbook"}),n.jsx("div",{className:"title-label",children:"Give your chartbook a descriptive title:"}),_.title&&S.title&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:_.title}),n.jsx(me,{id:"title",name:"title","diagnostic-id":"cb-title-input",placeholder:"Market Chartbook",maxLength:50,className:_.title&&S.title?"text-input-error":"form-control"}),n.jsxs("div",{className:"character-count",children:[50-w.title.length," characters left"]}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>e(!1),children:"Cancel"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",disabled:!!Object.keys(_).length||C,children:"Next"})]})]})})]})})},qwe=e=>({user:e.auth.user,userId:e.auth.user.id,isLicenseUpgradable:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.license_type&&e.auth.user.company.license_type.is_upgradable,canUseFeatured:e.auth&&e.auth.user&&e.auth.user.can_use_featured,canUseInsightsExplorer:e.auth&&e.auth.user&&e.auth.user.can_use_insights_explorer,partnerType:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.partner_type&&e.auth.user.company.partner_type.type,canUseAssistant:e.auth&&e.auth.user&&e.auth.user.can_use_assistant,hedwigPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.hedwig_permissions}),Vwe=Jt(le(qwe,{newChartbook:Ga})(Bwe)),Ay={GRID:"grid",LIST:"list"};function zwe(e){const{Insight:t}=on,{Engage:r}=qa,[i,a]=y.useState(e.view||Ay.GRID),[s,o]=y.useState(""),[l,c]=y.useState(e.newChartbookId||null),[h,u]=y.useState(!1),[d,p]=y.useState(!1),[f,m]=y.useState(!1),g=e.engagePermissions.max_engage_charts;y.useEffect(()=>{e.newChartbookId&&c(e.newChartbookId)},[e.newChartbookId]),y.useEffect(()=>{e.tabSelected===t&&e.getChartbooks(e.user.id)},[]),y.useEffect(()=>{c(null)},[i]),y.useEffect(()=>{c(null)},[e.sort]),y.useEffect(()=>{e.tabSelected===t?e.selectInsightToAdd(e.partnerInsightSelectedId||0):e.selectSharedContent(0)},[]),y.useEffect(()=>{(e.tabSelected===r||e.tabSelected===t)&&a("grid")},[]);const x=T=>{a(T),e.setChartbookView(e.user.id,T)};let v=e.chartbooks&&s?e.chartbooks.filter(T=>Mn(T.title.toLowerCase(),s.toLowerCase())||T.tags&&Mn(T.tags.toLowerCase(),s.toLowerCase())):e.chartbooks;v=v&&[...v.filter(T=>T.is_favorite),...v.filter(T=>!T.is_favorite)],v=v&&l?[...v.filter(T=>T.id===l),...v.filter(T=>T.id!==l)]:v,v=v&&[...v.filter(T=>T.content_permissions_level<=e.chartbookPermissions?.content_permissions_level),...v.filter(T=>T.content_permissions_level>e.chartbookPermissions?.content_permissions_level)];
36let b=v&&Object.assign([],v);const j=([T,N])=>{b.sort((k,I)=>T==="charts"?N==="ascending"?k.num_charts-I.num_charts:I.num_charts-k.num_charts:T==="user_update_datetime"?N==="ascending"?new Date(k[T]).valueOf()-new Date(I[T]).valueOf():new Date(I[T]).valueOf()-new Date(k[T]).valueOf():N==="ascending"?(k[T]||"")>(I[T]||"")?1:-1:(k[T]||"")<(I[T]||"")?1:-1)};v&&e.sort&&j(e.sort),b=b&&[...b.filter(T=>T.is_favorite),...b.filter(T=>!T.is_favorite)],b=b&&l?[...b.filter(T=>T.id===l),...b.filter(T=>T.id!==l)]:b,b=b&&[...b.filter(T=>T.content_permissions_level<=e.chartbookPermissions?.content_permissions_level),...b.filter(T=>T.content_permissions_level>e.chartbookPermissions?.content_permissions_level)];const w=s&&v&&v.length===0,S=v&&v.length===0&&(e.canUseEngage&&e.tabSelected===r||e.tabSelected===t),_=v&&e.partnerInsightSelectedId&&v.filter(T=>T.id===e.partnerInsightSelectedId).length===0,C=T=>()=>{let N;e.tabSelected===t?(N=e.selectedInsight!==T?T:0,e.selectInsightToAdd(N)):e.tabSelected===r&&(N=e.selectedContent!==T?T:0,e.chartbooks.filter(D=>D.id===T)[0].num_charts>g?p(!0):p(!1),e.selectSharedContent(N))},E=v?v.map((T,N)=>n.jsx(_we,{chartbook:T,highlight:T.id&&e.newChartbookId===T.id,is_favorite:T.is_favorite,tabSelected:e.tabSelected,isSelected:e.tabSelected===t?e.selectedInsight===T.id:e.selectedContent===T.id,onClick:T?.content_permissions_level<=e.chartbookPermissions?.content_permissions_level?C(T.id):null},T.id||N)):[],P=9;return E.length===0&&E.push(n.jsx(Uwe,{setModal:u,changeSearch:o},"new-cb")),n.jsxs(n.Fragment,{children:[e.tabSelected===t&&_&&n.jsxs("div",{className:"partner-insight-content-warning-message","diagnostic-id":"partner-insight-content-warning-message",children:[n.jsx("i",{className:"material-icons",children:"warning"}),n.jsx("div",{className:"banner-text","diagnostic-id":"banner-text",children:"The currently selected chartbook belongs to another user. Selecting a chartbook will replace the existing content."})]}),n.jsxs("div",{id:"cb-grid-wrapper","diagnostic-id":"cb-grid-wrapper",children:[f&&n.jsx(ii,{setModal:m,modal:f}),h&&n.jsx(Vwe,{setModal:u,getMenuChoice:e.getMenuChoice}),n.jsx(jwe,{view:i,changeView:x,changeSearch:o,numResults:v&&v.length,search:s,setModal:u,tabSelected:e.tabSelected,setUpgradeModal:m}),w?n.jsxs("div",{id:"chartbook-search-placeholder",className:"fadeTransition",children:[n.jsx("i",{className:"material-icons",children:"search_off"}),n.jsxs("div",{children:['No results for "',s,'"']}),n.jsx("button",{className:"btn-cancel",onClick:()=>o(""),children:"Clear Search"})]}):S?n.jsxs("div",{id:"empty-content-placeholder",className:"fadeTransition",children:[n.jsx("i",{className:"material-icons",children:"insert_chart"}),n.jsx("div",{children:"There are no chartbooks available for sharing."}),n.jsx("div",{children:"Create a chartbook to get started."})]}):n.jsxs(n.Fragment,{children:[n.jsx(Ewe,{type:"paginated",numPerPage:P,breakpoints:Ls,elements:E,active:i===Ay.GRID,changeSearch:o}),n.jsx($we,{chartbooks:b,active:i===Ay.LIST,changeSearch:o,setModal:u,setUpgradeModal:m})]}),d&&e.tabSelected===r&&e.canUseEngage&&n.jsxs("div",{className:"charts-exceed-warning-message","diagnostic-id":"charts-exceed-warning-message",children:[n.jsx("i",{className:"material-icons",children:"warning"}),n.jsx("div",{className:"banner-text","diagnostic-id":"banner-text",children:`This chartbook contains more than the maximum shareable charts.
37            Only the first ${g} charts will be displayed in the shared chartbook.`})]})]})]})}const Hwe=e=>({chartbooks:e.chartbooks.items,view:e.preferences.chartbookBrowserView,newChartbookId:e.chartbooks.newChartbookId,sort:e.preferences.chartbookBrowserSort,user:e.auth.user,selectedContent:e.engage&&e.engage.selectedContent,engagePermissions:e.auth.user&&e.auth.user.company&&e.auth.user.company.engage_permissions,canUseEngage:e.auth.user&&e.auth.user.can_use_engage,selectedInsight:e.spotlight&&e.spotlight.partnerInsights.selectedInsight,chartbookPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.chartbook_permissions}),k0=le(Hwe,{setChartbookView:rZ,selectSharedContent:d0,selectInsightToAdd:w0,getChartbooks:rc})(zwe);function Gwe(e){const{changeSearch:t,numResults:r,search:i,setModal:a,userId:s,getInsightsVideos:o,tabSelected:l,allowStudio:c}=e,[h,u]=y.useState(!1),{Enabled:d,Disabled:p,Locked:f}=_n,{Engage:m}=qa,{Insight:g}=on,x=()=>{t(""),u(!1)},v=n.jsx("button",{className:"btn-primary",disabled:!0,children:n.jsx(Ke,{title:"Upgrade to create an insights video",placement:"top",children:n.jsxs("div",{className:"locked-new-insights-video-btn",children:[n.jsx("i",{className:"material-icons","diagnostic-id":"material-lock-icon",children:"lock"}),"New"]})})});return n.jsxs("div",{id:"searchbar-container",className:h?i?"input-active active-search":"input-active":"",children:[n.jsxs("div",{id:"search-input-container",children:[n.jsx("form",{autoComplete:"off",onSubmit:b=>{b.preventDefault()},children:n.jsx("input",{type:"search","diagnostic-id":"insights-videos-search-input",placeholder:"Search Insights Videos...",onChange:b=>t(b.target.value),className:`${i.length>0?"active":""}`,value:i})}),i?n.jsx("i",{className:"material-icons","diagnostic-id":"clear-search-btn",onClick:x,children:"close"}):n.jsx("i",{className:"material-icons prefix",children:"search"}),i&&n.jsxs("h6",{id:"search-results","diagnostic-id":"search-results-text",children:[r," search results -"," ",n.jsx("button",{className:"btn-cancel",onClick:x,children:"Clear Search"})]})]}),l===m||l===g?n.jsx(n.Fragment,{}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"refresh-icon-container",children:n.jsx(Ke,{title:"Refresh insights videos",placement:"top",children:n.jsx(N0,{onClick:()=>c===d&&o(s)})})}),n.jsx(wn,{hasPermission:c===d,fallback:v,children:n.jsxs("button",{className:"btn-primary","diagnostic-id":"insights-video-new-modal-btn",onClick:()=>a(!0),children:[n.jsx("i",{className:"material-icons",children:"add"}),"New"]})})]})]})}const Wwe=e=>({userId:e.auth.user&&e.auth.user.id,allowStudio:e.auth.user&&e.auth.user.company.studio_permissions.allow_studio}),Ywe=le(Wwe,{getInsightsVideos:S0})(Gwe);function Kwe(e){const{Insight:t}=on,{Engage:r}=qa,{NotPublished:i}=ki,{insightsVideo:a,tabSelected:s,isSelected:o,canUsePartner:l,partnerPermissions:c}=e,{allow_partner:h}=c,[u,d]=y.useState(!1),[p,f]=y.useState(!1),[m,g]=y.useState(!1),[x,v]=y.useState(!1),[b,j]=y.useState(!1);if(!a)return null;let w="";
37switch(a?.type){case"custom":case"studio":a?.media_type==="video"?w="insightsvideos":a?.media_type==="podcast"?w="insightspodcasts":w="insightsvideos";break}const S=a?.preview_clip,_=e.engage?.userSharedContent,C=a?.engage_shared?.map(I=>I.id),E=_&&_?.filter(I=>I.is_enabled&&C?.includes(I.id)).length>0||a?.engage_shared?.some(I=>I.is_enabled),P=a?.partner_insights?.filter(I=>I.publish_status!==i).length>0,T=()=>{a?.engage_shared?.length>0?f(!0):d(!0)},N=()=>{a?.engage_shared?.length>0&&E&&g(!0)},k=n.jsxs(n.Fragment,{children:[a?.engage_shared?.length>0&&E?n.jsxs("button",{onClick:N,className:"card-btn","diagnostic-id":"insights-video-open-btn",children:[n.jsx("i",{className:"material-icons",children:"mode_edit"}),n.jsx("span",{children:" Open"})]}):n.jsxs(Ze,{to:{pathname:`/${a?.type==="custom"?"insightsmedia":"insightsvideos"}/${a.id}`},className:"card-btn","diagnostic-id":"insights-video-open-btn",children:[n.jsx("i",{className:"material-icons",children:"mode_edit"}),n.jsx("span",{children:" Open"})]}),n.jsxs("button",{onClick:T,className:"card-btn-delete","diagnostic-id":"insights-video-delete-btn",children:[n.jsx("i",{className:"material-icons",children:"delete_forever"}),n.jsx("span",{children:"Delete"})]})]});return n.jsxs("div",{className:"col fadeTransition",children:[n.jsxs("div",{className:`insights-video-card${o?" selected":""}`,"diagnostic-id":"insights-video-card",onClick:e.onClick,children:[o&&(s===r||s===t)&&n.jsx("div",{className:"checkmark","diagnostic-id":"checkmark",children:n.jsx("i",{className:"material-icons",children:"done"})}),n.jsxs("div",{className:"card-content",children:[n.jsxs("div",{className:"insights-video-title-grp",children:[n.jsx("h5",{className:"insights-video-title truncate","diagnostic-id":"insights-video-text-title",children:a.title}),l&&h&&P&&n.jsx("i",{className:"material-icons shared-with-partner-insights-icon",children:"link"})]}),n.jsxs("span",{className:"insights-video-caption-container",children:[n.jsx("div",{className:"card-caption",children:n.jsxs("div",{className:"card-datetime",children:[s===r||s===t||a?.render_datetime>a.update_datetime?"Rendered on ":"Edited ",n.jsx(gn,{local:!0,format:"MMM D, YYYY h:mma",children:s===r||s===t||a?.render_datetime>a.update_datetime?a.render_datetime:a.update_datetime})," ",new Date().toLocaleTimeString("en-us",{timeZoneName:"short"}).split(" ")[2]]})}),a?.engage_shared?.length>0?n.jsx("div",{className:"card-shared-container",children:n.jsx("div",{className:`card-shared-pill ${E?"shared-live":"shared-off"}`,"diagnostic-id":"card-shared-pill",onClick:()=>v(!0),children:E?"Sharing: Live":"Sharing: Off"})}):n.jsx(n.Fragment,{})]})]}),n.jsxs("div",{className:`insights-video-card-placeholder${S&&S.aspect_ratio==="16:9"?" size-aspect-16-9":""}`,children:[n.jsx("i",{className:"material-icons",children:a.type==="custom"&&a.media_type==="podcast"?"mic":"videocam"}),n.jsx("div",{className:"insights-video-card-image",children:S?.chart_snapshot_image_jpg_url?n.jsx("img",{src:S.chart_snapshot_image_jpg_url,alt:""}):S?.title_slide_image_jpg_url?n.jsx("img",{src:S.title_slide_image_jpg_url,alt:""}):S?.thumbnail_image_jpg_url?n.jsx("img",{src:S.thumbnail_image_jpg_url,alt:""}):a?.type==="custom"&&a?.media_type==="video"&&a?.video_thumbnail?n.jsx("img",{src:a?.video_thumbnail,alt:""}):n.jsx(n.Fragment,{})})]}),e.tabSelected!==r&&s!==t&&n.jsx("div",{className:"card-btn-grp",children:n.jsx(wn,{hasPermission:l&&h,fallback:k,children:P?n.jsxs("button",{onClick:()=>j(!0),className:"card-btn","diagnostic-id":"insights-video-open-btn",children:[n.jsx("i",{className:"material-icons",children:"visibility"}),n.jsx("span",{children:" Preview"})]}):k})})]}),u&&n.jsx(Du,{modal:u,setModal:d,insightsVideoId:a.id,insightsVideoType:a.type}),p&&n.jsx(fm,{modal:p,setModal:f,contentShared:a?.engage_shared,sharedType:w}),x&&n.jsx(nl,{modal:x,setModal:v,contentShared:a?.engage_shared,sharedType:w}),m&&n.jsx(pm,{modal:m,setModal:g,sharedType:w,originalContent:a}),b&&n.jsx(ao,{modal:b,setModal:j,partnerInsightShared:a?.partner_insights,sharedType:w})]})}const Xwe=e=>({userId:e.auth.user&&e.auth.user.id,engage:e.engage,canUsePartner:e.auth&&e.auth.user&&e.auth.user.can_use_partner,partnerPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.partner_permissions}),Qwe=le(Xwe,{})(Kwe);function Zwe(e){const{elements:t,active:r,type:i,title:a,numPerPage:s,breakpoints:o,icon:l,changeSearch:c,showDescription:h}=e,u=ws(),[d,p]=y.useState(0),[f,m]=y.useState(0),[g,x]=y.useState(0),v=i==="row",b=i==="paginated",j=i==="paginated-row",w=i==="paginated-col";let S;w?u>=600?S=~~((t.length-1)/(s/2))+1:S=t.length:j?u<=600?S=t.length:u<=1280?S=~~((t.length-1)/(s-3))+1:S=t.length:S=~~((t.length-1)/s)+1;const _=f*s,C=t.slice(_,_+s);f>=S&&m(f-1);const E=()=>{const O=Object.keys(o);for(let $=0;$<O.length;$++)if(u<=~~O[$])return o[O[$]]},P=O=>{let $;w?$=document.getElementById("grid-layout"):j?$=document.getElementById("grid-layout-row"):$=d
37ocument.querySelector(`[data-gridid='${a}']`);let U;return U=$&&$.children&&$.children[0]&&$.children[0].offsetWidth,U*O},T=O=>{const $=document.querySelector(`[data-gridid='${a}']`),U=Array.from($.children),B=d+(O==="left"?-1:1);for(const L in U)U[L].style.setProperty("--offset",`-${P(B)}px`);p(B)},N=`${E()}${j?" nowrap":""}`,k=t.map(O=>n.jsx(O.type,{...O.props,style:{transform:`translateX(-${P(f)+g}px)`,transition:g?"none":"transform 0.5s ease"}},O.key)),I=io({onSwipedLeft:()=>f<S-1&&m(f+1),onSwipedRight:()=>f>0&&m(f-1),onSwiping:O=>x(O.deltaX),onSwiped:()=>x(0)}),D=b?C:w||j?k:t;return r&&t?n.jsxs(n.Fragment,{children:[n.jsxs("div",{id:"grid-layout"+(j?"-row":""),className:N,"data-gridid":a,...I,children:[D,(v||j)&&n.jsxs(n.Fragment,{children:[f!==0&&n.jsx("div",{id:"row-pagination-left",children:n.jsx("button",{className:"btn-navigation",onClick:()=>v?T("left"):m(f-1),children:n.jsx("i",{className:"material-icons",children:"chevron_left"})})}),f<S-1&&n.jsx("div",{id:"row-pagination-right",children:n.jsx("button",{className:"btn-navigation",onClick:()=>v?T("right"):m(f+1),children:n.jsx("i",{className:"material-icons",children:"chevron_right"})})})]}),w&&n.jsxs(n.Fragment,{children:[f!==0&&n.jsx("div",{id:"grid-collection-left",children:n.jsx("button",{className:"btn-navigation",onClick:()=>m(f-1),children:n.jsx("i",{className:"material-icons",children:"chevron_left"})})}),f<S-1&&n.jsx("div",{id:"grid-collection-right",children:n.jsx("button",{className:"btn-navigation",onClick:()=>m(f+1),children:n.jsx("i",{className:"material-icons",children:"chevron_right"})})})]})]}),b&&S>1&&n.jsxs("div",{className:"insights-video-page-btns",children:[f>0&&n.jsxs("button",{className:"btn-navigation",onClick:()=>m(f-1),children:["< Previous Page"," "]}),f<S-1&&n.jsx("button",{className:"btn-navigation",onClick:()=>m(f+1),children:"Next Page >"})]})]}):n.jsx(n.Fragment,{})}function Jwe(e){const{changeSearch:t,setModal:r,studioPermissions:i}=e,{Enabled:a,Disabled:s,Locked:o}=_n,{allow_studio:l}=i,c=()=>{t(""),r(!0)},h={marginBottom:"20px"},u=n.jsx("button",{id:"locked-new-btn","diagnostic-id":"insights-video-new-lock",disabled:!0,children:n.jsx(Ke,{title:"Upgrade to create an insights video ",placement:"top",children:n.jsx("i",{className:"material-icons",style:{padding:"12px"},children:"lock"})})});return n.jsx("div",{className:"col fadeTransition",children:n.jsxs("div",{className:"insights-video-card",id:"card-new",children:[n.jsx("div",{className:"card-title",style:h,children:"New Insights Video"}),n.jsx(wn,{hasPermission:l===a,fallback:u,children:n.jsx("button",{id:"card-new-btn","diagnostic-id":"insights-video-new-btn",onClick:c,children:n.jsx("i",{className:"material-icons",children:"add"})})})]})})}const e0e=e=>({userId:e.auth.user&&e.auth.user.id,studioPermissions:e.auth.user&&e.auth.user.company&&e.auth.user.company.studio_permissions}),t0e=le(e0e,{})(Jwe),n0e=({setModal:e,userId:t,isLicenseUpgradable:r,newInsightsVideo:i,history:a,canUseFeatured:s,canUseInsightsExplorer:o,getMenuChoice:l,partnerType:c,newCustomInsightsMedia:h,canUsePartner:u,partnerPermissions:d})=>{const[p,f]=y.useState(0),m=v=>{i(t,v).then(b=>{a.push(`/insightsvideos/${b}/`)})},g=v=>{h(t,v).then(b=>{a.push(`/insightsmedia/${b}/`)})},x=v=>n.jsxs("button",{disabled:v,type:"button",className:`new-content-modal-btn${v?" locked":""}`,id:"new-insights-video-modal-btn","diagnostic-id":"insights-video-modal-featured-path-btn",onClick:()=>{o&&l("explorer")},children:[n.jsxs("div",{className:"new-content-modal-header insights-video-modal-header",children:[n.jsx("i",{className:"material-icons",children:v?"lock":"explore"}),n.jsx("h4",{children:"Featured Insights"})]}),n.jsx("div",{className:"content-description",children:"Get started quickly with insights on a featured topic or from a recent market update"})]});return n.jsx(ot,{setModal:e,children:n.jsxs("div",{className:`new-content-modal-container${p===1||p===3?" add-title":""}`,children:[n.jsx("i",{className:"material-icons",onClick:()=>e(!1),children:"close"}),p===0?n.jsxs(n.Fragment,{children:[n.jsx("h5",{children:"Create a New Insights Video"}),n.jsxs("div",{className:"new-content-modal-btns",id:"new-insights-video-modal-btns",children:[s?r?n.jsx(Ke,{title:"Upgrade to access featured insights videos",placement:"top",children:n.jsx("span",{children:x(r)})}):n.jsx(Ze,{to:"/featured",children:x()}):n.jsx(n.Fragment,{}),o&&n.jsx(Ze,{to:{pathname:"/insights",search:"?view=explorer&filter=insightsvideo"},children:x()}),n.jsxs("button",{type:"button",className:"new-content-modal-btn",id:"new-insights-video-modal-btn","diagnostic-id":"insights-video-record-path-btn",onClick:()=>f(1),children:[n.jsxs("div",{className:"new-content-modal-header",children:[n.jsx("i",{className:"material-icons",children:"video_call"}),n.jsx("h4",{children:"Record Your Own"})]}),n.jsx("div",{children:"Select charts from the Clearnomics library and record your audio/video to create your own insights video"})]}),n.jsx(wn,{hasPermission:d?.allow_partner&&u,children:n.jsxs("button",{type:"button",className:"new-content-modal-btn",id:"new-insights-video-modal-btn","diagnostic-id":"upload-audio-video-path-btn",onClick:()=>f(3),children:[n.jsxs("div",{className:"new-content-modal-header",children:[n.jsx("i",{className:"material-icons",children:"perm_media"}),n.jsx("h4",{children:"Upload Your Video/Podcast"})]}),n.jsx("div",{children:"Upload your own video or podcast to share with your audience"})]})})]})]}):n.jsx(gt,{initialValues:{title:""},onSubmit:(v,{setSubmitting:b})=>{const j=v.title.trim();p===1?m(j):p===3&&g(j)},validationSchema:_t().shape({title:Ae().test("is-empty","Title c
37annot be empty",function(v){return!v||!v.split("").every(b=>b===" ")})}),children:({values:v,touched:b,errors:j,isSubmitting:w})=>n.jsxs(vt,{onClick:S=>S.stopPropagation(),children:[n.jsx("h5",{children:p===1?"Record a New Insights Video":p===3?"Create a New Insights Video/Podcast":""}),n.jsx("div",{className:"title-label",children:p===1?"Title your insights video:":p===3?"Title your insights video/podcast":""}),j.title&&b.title&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:j.title}),n.jsx(me,{id:"title",name:"title","diagnostic-id":"insights-video-title-input",placeholder:p===1?"Market Insights Video":p===3?"Market Insights Video/Podcast":"",maxLength:50,className:j.title&&b.title?"text-input-error":"form-control"}),n.jsxs("div",{className:"character-count",children:[50-v.title.length," characters left"]}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>e(!1),children:"Cancel"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",disabled:!!Object.keys(j).length||w,children:"Next"})]})]})})]})})},r0e=e=>({userId:e.auth.user.id,isLicenseUpgradable:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.license_type&&e.auth.user.company.license_type.is_upgradable,canUseFeatured:e.auth&&e.auth.user&&e.auth.user.can_use_featured,canUseInsightsExplorer:e.auth&&e.auth.user&&e.auth.user.can_use_insights_explorer,partnerType:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.partner_type&&e.auth.user.company.partner_type.type,canUsePartner:e.auth&&e.auth.user&&e.auth.user.can_use_partner,partnerPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.partner_permissions}),i0e=Jt(le(r0e,{newInsightsVideo:M$,newCustomInsightsMedia:ije})(n0e)),OP={GRID:"grid"};function a0e(e){const{getInsightsVideos:t,userId:r,tabSelected:i,selectSharedContent:a,selectedContent:s,getRenderedInsightsVideos:o,renderedInsightsVideosPodcasts:l,allowEngage:c,user:h,canUseEngage:u,selectInsightToAdd:d,selectedInsight:p,partnerInsightSelectedId:f,getMenuChoice:m,getAllInsightsMedia:g,typeSelected:x,getInsightsMediaPodcasts:v,canUsePartner:b,partnerPermissions:j,insightsToolkitType:w,getEngageEnabledInsightsVideos:S}=e,{Enabled:_,Disabled:C,Locked:E}=_n,{Insight:P}=on,{Engage:T}=qa,{Community:N}=Oj,[k,I]=y.useState(e.view||OP.GRID),[D,O]=y.useState(""),[$,U]=y.useState(!1),B=9,L=e.allInsightsMedia?e.insightsVideos?.concat(e.allInsightsMedia):e.insightsVideos;let A="";switch(y.useEffect(()=>{i===T&&u?o(r,i):i===P?x==="insightsvideo"||x==="engage_insights_video"||x==="advisor_notes_video"?w===N&&x!=="advisor_notes_video"?S(r):o(r,"studio-custom"):x==="insightspodcast"&&v(r):(t(r),j?.allow_partner&&b&&g(r)),i===P?d(f||0):a(0)},[]),x){case"insightsvideo":A="video";break;case"insightspodcast":A="podcast";break;default:A="video";break}const R=i===T&&u||i===P?e.renderedInsightsVideosPodcasts&&D?e.renderedInsightsVideosPodcasts.filter(z=>Mn(z.title.toLowerCase(),D.toLowerCase())):e.renderedInsightsVideosPodcasts:L&&D?L.filter(z=>Mn(z.title.toLowerCase(),D.toLowerCase())):L,F=R&&Object.assign([],R),q=(z,Y)=>z?.update_datetime<Y?.update_datetime?1:z?.update_datetime>Y?.update_datetime?-1:0;F?.sort(q);const V=D&&R&&R.length===0,X=z=>()=>{let Y;i===P?(Y=p!==z?z:0,d(Y)):(Y=s!==z?z:0,a(Y))},M=R&&R.length===0&&(u&&i===T||i===P),W=R&&f&&R.filter(z=>z.id===f).length===0,K=R?F.map(z=>n.jsx(Qwe,{insightsVideo:z,tabSelected:i,isSelected:i===P?p===z?.id:s===z?.id,onClick:X(z?.id)},z?.id)):[];return K.length===0&&K.push(n.jsx(t0e,{setModal:U,changeSearch:O},"new-insights-video")),n.jsxs(n.Fragment,{children:[e.tabSelected===P&&W&&n.jsxs("div",{className:"partner-insight-content-warning-message fadeTransition","diagnostic-id":"partner-insight-content-warning-message",children:[n.jsx("i",{className:"material-icons",children:"warning"}),n.jsx("div",{className:"banner-text","diagnostic-id":"banner-text",children:`The currently selected insights ${A} belongs to another user. Selecting an insights ${A} will replace the existing content.`})]}),n.jsxs("div",{id:"studio-grid-wrapper","diagnostic-id":"studio-grid-wrapper",children:[$&&n.jsx(i0e,{setModal:U,getMenuChoice:m}),n.jsx(Ywe,{changeSearch:O,numResults:R&&R.length,search:D,setModal:U,tabSelected:i}),V?n.jsxs("div",{id:"insights-video-search-placeholder",className:"fadeTransition",children:[n.jsx("i",{className:"material-icons",children:"search_off"}),n.jsxs("div",{children:['No results for "',D,'"']}),n.jsx("button",{className:"btn-cancel",onClick:()=>O(""),children:"Clear Search"})]}):M?n.jsxs("div",{id:"empty-content-placeholder",className:"fadeTransition",children:[n.jsx("i",{className:"material-icons",children:"insert_chart"}),n.jsx("div",{children:`There are no insights ${A} available for sharing.`}),n.jsx("div",{children:`Create an insights ${A} to get started.`})]}):n.jsx(n.Fragment,{children:n.jsx(Zwe,{type:"paginated",numPerPage:B,breakpoints:Ls,elements:K,active:k===OP.GRID,changeSearch:O})})]})]})}const s0e=e=>({insightsVideos:e.studio.insightsVideos,allInsightsMedia:e.studio.allInsightsMedia,userId:e.auth.user&&e.auth.user.id,selectedContent:e.engage&&e.engage.selectedContent,renderedInsightsVideosPodcasts:e.studio&&e.studio.renderedInsightsVideosPodcasts,allowEngage:e.auth.user&&e.auth.user.company&&e.auth.user.company.engage_permissions&&e.auth.user.company.engage_permissions.allow_engage,user:e.auth.user,canUseEngage:e.auth.user&&e.auth.user.can_use_engage,selectedInsight:e.spotlight&&e.spotlight.partnerInsights.selectedInsight,partnerPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.partner_permissions,canUsePartner:e.auth&&e.auth.user&&e.auth.user.can_use_partner}),El=le(s0e,{getInsightsVideos:S0,selectSharedContent:d0,getRenderedInsightsVideos:oje,selectInsightToAdd:w0,getAllInsightsMedia:sje,getInsightsMediaPodcasts:Wxe,getEngageEnabledInsightsVideos:lje})(a0e),o0e=({modal:e,setModal:t,isLicenseUpgradable:r,tabSelected:i,userId:a,selectedContent:s,canUseStudio:o,createNewSharedContent:l,studioPermissions:c,canUseComposer:h,allowComposer:u})=>{const{Disabled:d}=_n,{chartbookType:p,clientpieceType:f,insightsVideoType:m}=Ei,[g,x]=y.useState(0),[v,b]=y.useState(!1),[j,w]=y.useState(0);y.useEffect(()=>{const N=k=>$n(k,e,t);
37return window.addEventListener("keyup",N),()=>{window.removeEventListener("keyup",N)}},[e]);const S=n.jsxs(n.Fragment,{children:[n.jsx("i",{className:"material-icons",onClick:()=>t(!1),children:"close"}),n.jsxs("div",{className:"new-content-modal-btns",children:[r?n.jsx(Ke,{title:"Upgrade to access featured chartbooks",placement:"top",children:n.jsx("span",{children:n.jsxs("button",{disabled:!0,type:"button",className:"new-content-modal-btn locked","diagnostic-id":"cb-modal-new-btn",children:[n.jsxs("div",{className:"new-content-modal-header",children:[n.jsx("i",{className:"material-icons","diagnostic-id":"material-lock-icon",children:"lock"}),n.jsx("h4",{children:"Select a Chartbook"})]}),n.jsx("div",{className:"content-description",children:"Add a live view of a chartbook to your website or create a hosted page with your chartbook that visitors can browse"})]})})}):n.jsxs("button",{type:"button",className:"new-content-modal-btn","diagnostic-id":"cb-modal-new-btn",onClick:()=>x(1),children:[n.jsxs("div",{className:"new-content-modal-header",children:[n.jsx("i",{className:"material-icons",children:"explore"}),n.jsx("h4",{children:"Select a Chartbook"})]}),n.jsx("div",{children:"Add a live view of a chartbook to your website or create a hosted page with your chartbook that visitors can browse"})]}),n.jsx(wn,{hasPermission:u!==d&&h,children:n.jsxs("button",{type:"button",className:"new-content-modal-btn","diagnostic-id":"cp-modal-new-btn",onClick:()=>x(2),children:[n.jsxs("div",{className:"new-content-modal-header",children:[n.jsx("i",{className:"material-icons",children:"insert_chart"}),n.jsx("h4",{children:"Select a Commentary"})]}),n.jsx("div",{children:"Add a live commentary to your website or create a hosted page with written commentary and charts"})]})}),n.jsx(wn,{hasPermission:c?.allow_studio!==d&&o,children:n.jsxs("button",{type:"button",className:"new-content-modal-btn","diagnostic-id":"insights-video-modal-new-btn",onClick:()=>x(3),children:[n.jsxs("div",{className:"new-content-modal-header",children:[n.jsx("i",{className:"material-icons",children:"videocam"}),n.jsx("h4",{children:"Select an Insights Video"})]}),n.jsx("div",{children:"Add a video to your website or create a hosted page with your insights video"})]})})]})]});let _,C="",E="",P;switch(g){case 0:_=n.jsx("h5",{children:"Share your content"}),P=S;break;case 1:_=n.jsx("h5",{children:"Select Chartbook to Share"}),C=p,E=" select-content",P=n.jsx(k0,{tabSelected:i});break;case 2:_=n.jsx("h5",{children:"Select Commentary to Share"}),C=f,E=" select-content",P=n.jsx(T0,{tabSelected:i});break;case 3:_=n.jsx("h5",{children:"Select Insights Video to Share"}),C=m,E=" select-content",P=n.jsx(El,{tabSelected:i});break}const T=(N,k,I)=>{I!==0&&l(N,k,C).then(D=>{b(!0),w(D.id)})};if(v){const k=`engage/${C===f?"commentaries":`${C}s`}/${j}`;return n.jsx(jn,{children:n.jsx(qt,{from:"insights",to:k})})}return n.jsx(ot,{setModal:t,children:n.jsxs("div",{className:`new-content-modal-container${E}`,children:[_,P,(g===1||g===2||g===3)&&n.jsxs("div",{className:"shared-content-btns",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"engage-cancel-btn",onClick:()=>t(!1),children:"Cancel"}),n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"engage-select-btn",onClick:()=>T(a,s,g),disabled:!s,children:"Select"})]})]})})},l0e=e=>({userId:e.auth.user.id,isLicenseUpgradable:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.license_type&&e.auth.user.company.license_type.is_upgradable,selectedContent:e.engage&&e.engage.selectedContent,canUseStudio:e.auth.user&&e.auth.user.can_use_studio,studioPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.studio_permissions,allowComposer:e.auth.user&&e.auth.user.company&&e.auth.user.company.composer_permissions&&e.auth.user.company.composer_permissions.allow_composer,canUseComposer:e.auth.user&&e.auth.user.can_use_composer}),c0e=Jt(le(l0e,{createNewSharedContent:l0})(o0e));function AP(e){const{elements:t,numPerPage:r}=e,[i,a]=y.useState(0),s=~~((t?.length-1)/r)+1,o=i*r,l=t?.slice(o,o+r);return i>=s&&a(i-1),n.jsxs(n.Fragment,{children:[l,s>1&&n.jsxs("div",{className:"shared-content-page-btns",children:[i>0&&n.jsxs("button",{className:"btn-navigation","diagnostic-id":"prev-page-btn",onClick:()=>a(i-1),children:["< Previous Page"," "]}),i<s-1&&n.jsx("button",{className:"btn-navigation","diagnostic-id":"next-page-btn",onClick:()=>a(i+1),children:"Next Page >"})]})]})}var id={},MP;function d0e(){if(MP)return id;MP=1;var e=vn(),t=bn();Object.defineProperty(id,"__esModule",{value:!0}),id.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"Visibility");return id.default=a,id}var u0e=d0e();const h0e=Zt(u0e),p0e=e=>
37{const{maxSharedModal:t,setMaxedModal:r,sharedContentType:i,getSharedContent:a,user:s}=e,{chartbookType:o,clientpieceType:l,insightsVideoType:c,partnerInsightType:h}=Ei;y.useEffect(()=>{const p=f=>$n(f,t,r);return window.addEventListener("keyup",p),()=>{window.removeEventListener("keyup",p)}},[t]),y.useEffect(()=>{a(s.id)},[]);let u="Content",d;switch(i){case o:u="Chartbooks",d=n.jsxs(n.Fragment,{children:[n.jsx("p",{children:"The maximum number of chartbooks has already been shared."}),n.jsx("p",{children:"To share this chartbook, first turn off sharing for another chartbook."})]});break;case l:u="Commentaries",d=n.jsxs(n.Fragment,{children:[n.jsx("p",{children:"The maximum number of commentaries has already been shared."}),n.jsx("p",{children:"To share this commentary, first turn off sharing for another commentary."})]});break;case c:u="Insights Videos",d=n.jsxs(n.Fragment,{children:[n.jsx("p",{children:"The maximum number of insights videos has already been shared."}),n.jsx("p",{children:"To share this insights video, first turn off sharing for another insights video."})]});break;case h:u="Partner Insights",d=n.jsxs(n.Fragment,{children:[n.jsx("p",{children:"The maximum number of partner insights has already been shared."}),n.jsx("p",{children:"To share this partner insight, first turn off sharing for another partner insight."})]});break}return n.jsx(ot,{setModal:r,children:n.jsxs("div",{className:"max-shared-modal-container","data-testid":"max-shared-modal-container","diagnostic-id":"max-shared-modal-container",children:[n.jsx("h5",{children:`Unable to Share Additional ${u}`}),d,n.jsx("div",{className:"max-reached-chat-btn","diagnostic-id":"max-reached-chat-btn",onClick:()=>{window.Intercom("show")},children:"Contact us to inquire about sharing additional content."}),n.jsx("div",{className:"buttons",children:n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>{r(!1)},children:"CLOSE"})})]})})},f0e=e=>({user:e.auth.user}),gm=le(f0e,{getSharedContent:ic})(p0e);function m0e(e){const{sharedContent:t,engage:r,toggleSharedItemStatus:i,userId:a,engagePermissions:s,email:o,displayAnalytics:l,companySettings:c,canUsePartner:h,partnerPermissions:u}=e,[d,p]=y.useState(!1),[f,m]=y.useState(!1),[g,x]=y.useState(!1),[v,b]=y.useState(void 0),[j,w]=y.useState(t.is_enabled),[S,_]=y.useState(!1),[C,E]=y.useState(!1),P=u?.allow_partner,T=t?.partner_insights?.length>0;y.useEffect(()=>{w(t.is_enabled)},[t.is_enabled]);const{chartbookType:N,clientpieceType:k,insightsVideoType:I,partnerInsightType:D}=Ei;let O="",$="";switch(t.type){case k:O="commentary";break;case N:O="chartbook";break;case I:O="insights video";break;case D:O="partner insight",t?.insights_type==="custom"||t?.insights_type==="studio"?$="video":t?.insights_type==="clientpiece"?$="commentary":t?.insights_type==="podcast"?$="podcast":$="";break}const U=r.numSharedChartbooks,B=r.numSharedClientPieces,L=r.numSharedInsightsVideos,A=r.numSharedPartnerInsights,R=s.max_engage_chartbooks,F=s.max_engage_clientpieces,q=s.max_engage_insightsvideos,V=s.max_engage_partner_insights,X=Y=>Y===N&&U<R||Y===k&&B<F||Y===I&&L<q||Y===D&&A<V;let M=!1,W;t.type===N?(W=s.max_engage_charts,M=t.num_charts>W):t.type===k&&(W=s.max_engage_clientpiece_charts,M=t.num_charts>s.max_engage_clientpiece_charts);const K=o===t.author,z=Y=>{if(Y.stopPropagation(),Y.preventDefault(),T)E(!0);else if(j)m(!0);else{if(!X(t.type)){x(!0),b(t.type);return}if(t.type===N){if(M){_(!0);return}}else if(t.type===k&&M){_(!0);return}i(a,t,t.type)}};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"shared-content-card","diagnostic-id":"shared-content-card",children:[n.jsxs("div",{className:"shared-content-title-group",children:[n.jsx(Ze,{to:`engage/${t.type===k?"commentaries":`${t.type}s`}/${t.id}`,"diagnostic-id":"content-link"}),n.jsxs("div",{className:"content-type","diagnostic-id":"content-type",children:[h&&P&&T&&n.jsx("i",{className:"material-icons-outlined shared-with-partner-insights-icon",onClick:()=>E(!0),children:"link"}),`${O}${$?` - ${$}`:""}`]}),n.jsxs("div",{className:"content-title-container",children:[n.jsx("h4",{className:"content-title-text","diagnostic-id":"content-title-text",children:t.title}),M&&n.jsx(Ke,{className:"max-charts-tooltip",title:`This ${O} contains more than the maximum shareable charts. Only the first ${W} charts will be displayed in the shared ${O}.`,placement:"top",children:n.jsx("i",{className:"material-icons","diagnostic-id":"warning-icon",children:"warning"})}),t.include_contact&&(c?.button_action==="redirect"&&!c?.contact_custom_url||c?.button_action==="mailto"&&!c?.contact_email)?n.jsx(Ke,{className:"no-action-tooltip",title:"This shared content includes a contact button with 
37no associated action. Go to Engage Settings to set an email or URL.",placement:"top",children:n.jsx("i",{className:"material-icons","diagnostic-id":"feedback-icon",children:"feedback"})}):n.jsx(n.Fragment,{})]}),!K&&n.jsxs("div",{className:"owner-caption","diagnostic-id":"owner-caption",children:["Owned by ",t.author]}),n.jsxs("div",{className:"card-datetime",children:[t.last_activated_datetime?t.update_datetime>t.last_activated_datetime?"Settings last updated ":"Shared on ":"Settings last updated ",n.jsx(gn,{local:!0,format:"MMM D, YYYY h:mma",children:t.last_activated_datetime?t.update_datetime>t.last_activated_datetime?t.update_datetime:t.last_activated_datetime:t.update_datetime})," ",new Date().toLocaleTimeString("en-us",{timeZoneName:"short"}).split(" ")[2]]})]}),l&&n.jsxs("div",{className:"analytics-group",children:[n.jsx(Ze,{"diagnostic-id":"content-link-analytics",to:`engage/${t.type}s/${t.id}`}),n.jsxs("div",{className:"analytics-views","diagnostic-id":"analytics-views",children:[n.jsx("h4",{className:"analytics-count"}),n.jsx("div",{className:"analytics-label"})]}),n.jsxs("div",{className:"analytics-clicks","diagnostic-id":"analytics-clicks",children:[n.jsx("h4",{className:"analytics-count"}),n.jsx("div",{className:"analytics-label"})]})]}),n.jsx("div",{className:"embed-toggle-right",onClick:Y=>{z(Y)},children:n.jsxs("div",{className:"onoffswitch",children:[n.jsx("input",{type:"checkbox",id:`engage-insights-page-${t.type}-${t.id}`,className:"onoffswitch-checkbox",name:`engage-insights-page-${t.type}-${t.id}`,onChange:()=>w(!j),checked:j}),n.jsxs("label",{className:"onoffswitch-label",htmlFor:`engage-insights-page-${t.type}-${t.id}`,"diagnostic-id":"list-item-toggle",children:[n.jsx("span",{className:"onoffswitch-inner"}),n.jsx("span",{className:"onoffswitch-switch"})]})]})}),T?n.jsx(Ke,{className:"shared-content-preview-btn-tooltip",title:"Preview",placement:"top",children:n.jsx("div",{className:"preview-btn",onClick:Y=>{Y.stopPropagation(),Y.preventDefault(),T?E(!0):p(!0)},children:n.jsx(h0e,{className:"preview-icon","diagnostic-id":"shared-content-preview-btn"})})}):n.jsx(Ke,{className:"shared-content-delete-btn-tooltip",title:"Delete",placement:"top",children:n.jsx("div",{className:"delete-btn",onClick:Y=>{Y.stopPropagation(),Y.preventDefault(),T?E(!0):p(!0)},children:n.jsx(C0,{className:"delete-icon","diagnostic-id":"shared-content-delete-btn"})})})]}),d&&n.jsx(Du,{modal:d,setModal:p,sharedContent:t,engageId:t.id,engageType:t.type,engageAuthor:t.author}),f&&n.jsx(mm,{toggleModal:f,setToggleModal:m,sharedContent:t,setIsActive:w,isActive:j}),g&&n.jsx(gm,{maxSharedModal:g,setMaxedModal:x,sharedContentType:v}),S&&n.jsx(Nu,{maxChartsModal:S,setMaxChartsModal:_,sharedContent:t,isActive:j,sharedContentDisplayType:O,maxCharts:W,fromSharedContentList:!0}),C&&n.jsx(ao,{modal:C,setModal:E,partnerInsightShared:t?.partner_insights,sharedType:"insightsvideos"})]})}const g0e=e=>({userId:e.auth.user&&e.auth.user.id,engage:e.engage,engagePermissions:e.auth.user&&e.auth.user.company&&e.auth.user.company.engage_permissions,email:e.auth.user&&e.auth.user.email,chartbooks:e.chartbooks,displayAnalytics:e.engage&&e.engage.companySettings&&e.engage.companySettings.display_analytics,companySettings:e.engage&&e.engage.companySettings,canUsePartner:e.auth&&e.auth.user&&e.auth.user.can_use_partner,partnerPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.partner_permissions}),$P=le(g0e,{toggleSharedItemStatus:ac})(Jt(m0e));function v0e(e){const{user:t,getSharedContent:r,engage:i,tabSelected:a,allowEngage:s}=e,{Enabled:o,Disabled:l,Locked:c}=_n,h=3,[u,d]=y.useState(!1),[p,f]=y.useState(!1),[m,g]=y.useState(void 0),[x,v]=y.useState(void 0);y.useEffect(()=>{s===o&&t.can_use_engage&&r(t.id),g(i?.userSharedContent),v(i?.companySharedContent)},[]);const b=(E,P)=>{const T=P.map(N=>N.type+N.id);return E.sort((N,k)=>T.indexOf(N.type+N.id)-T.indexOf(k.type+k.id)),E};y.useEffect(()=>{const E=i?.userSharedContent;if(E&&m){const P=b(E,m);g(P)}else E&&g(E)},[i?.userSharedContent]),y.useEffect(()=>{const E=i?.companySharedContent;if(E&&x){const P=b(E,x);v(P)}else E&&v(E)},[i?.companySharedContent]);const j=m?.map(E=>n.jsx($P,{sharedContent:E},E.id+E.type)),w=x?.map(E=>
37n.jsx($P,{sharedContent:E},E.id+E.type)),S=n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"new-shared-content-card upgrade-card","diagnostic-id":"new-shared-content-card",children:n.jsxs("div",{className:"upgrade-message","diagnostic-id":"upgrade-message",children:[n.jsx(Ze,{to:"#",onClick:E=>{E.preventDefault(),f(!0)},children:"Upgrade Your Clearnomics Experience"})," to share content with Clearnomics Engage"]})}),n.jsx(Ke,{title:"Upgrade to create shared content",placement:"top",children:n.jsxs("div",{id:"new-shared-content-btn",className:`new-shared-content-btn${s===c||s===l?" locked":""}`,"diagnostic-id":"new-shared-content-btn",children:["New Shared Content",n.jsx("i",{className:"material-icons","diagnostic-id":"material-lock-icon",children:"lock"})]})})]}),_=n.jsx("button",{className:"btn-primary",disabled:!0,children:n.jsx(Ke,{title:"Upgrade to create shared content",placement:"top",children:n.jsxs("div",{className:"locked-new-shared-content-btn",children:[n.jsx("i",{className:"material-icons","diagnostic-id":"material-lock-icon",children:"lock"}),"New"]})})}),C=n.jsx("div",{className:"new-shared-content-btn-container","diagnostic-id":"new-shared-content-btn-container",children:n.jsx(wn,{hasPermission:s===o,fallback:S,children:n.jsxs("div",{id:"new-shared-content-btn",className:`new-shared-content-btn${s===c||s===l?" locked":""}`,"diagnostic-id":"new-shared-content-card-btn",onClick:()=>d(!0),children:["New Shared Content",n.jsx("i",{className:"material-icons",children:"add_circle"})]})})});return n.jsxs("div",{id:"shared-content-wrapper","diagnostic-id":"shared-content-wrapper",children:[u&&n.jsx(c0e,{modal:u,setModal:d,tabSelected:a}),n.jsxs("div",{className:"shared-content-header",children:[n.jsx("h4",{children:"Your Shared Content"}),n.jsx(wn,{hasPermission:s===o,fallback:_,children:n.jsxs("button",{type:"button",className:"btn btn-primary","diagnostic-id":"new-shared-content-btn",onClick:()=>d(!0),children:[n.jsx("i",{className:"material-icons",children:"add"}),"New"]})})]}),(!m||m?.length===0)&&C,m?.length>0&&n.jsx("div",{className:"shared-content-cards",id:"user-shared-content","diagnostic-id":"user-shared-content",children:n.jsx(AP,{numPerPage:h,elements:j})}),x?.length>0?n.jsxs(n.Fragment,{children:[n.jsx("h4",{id:"company-shared-content-header",children:"Content Shared by Your Colleagues"}),n.jsx("div",{className:"shared-content-cards",id:"company-shared-content","diagnostic-id":"company-shared-content",children:n.jsx(AP,{numPerPage:h,elements:w})})]}):n.jsx(n.Fragment,{}),p&&n.jsx(ii,{setModal:f,modal:p})]})}const b0e=e=>({user:e.auth.user,engage:e.engage,allowEngage:e.auth.user&&e.auth.user.company&&e.auth.user.company.engage_permissions&&e.auth.user.company.engage_permissions.allow_engage}),y0e=le(b0e,{getSharedContent:ic})(v0e);function x0e({setScrim:e,tabSelected:t,getCompanyEngageSettings:r,getEngageDesigns:i,location:a,history:s,user:o,allowEngage:l,getSharedContentSummary:c}){const[h,u]=y.useState(""),[d,p]=y.useState(!1),{Enabled:f}=_n;y.useEffect(()=>{e(!1)},[]);const m=x=>{d?window.confirm(ko)&&(u(x),p(!1)):u(x)};y.useEffect(()=>{let x;return l===f&&o.can_use_engage&&(r(),i(),x=setInterval(()=>c(o.id),3e4)),()=>clearInterval(x)},[]);const g={sharedcontent:n.jsx(y0e,{tabSelected:t}),engageinsightspage:n.jsx(mwe,{}),engagesettings:n.jsx(bwe,{isDirty:d,setDirty:p})};return n.jsxs("div",{className:"row fadeTransition",id:"engage-wrapper",children:[n.jsx("div",{className:"navigation-drawer",id:"engage-drawer",children:n.jsx(x0,{setMenuChoice:m,menuChoice:h,tabSelected:t})}),n.jsx(da,{}),n.jsx("div",{className:"navigation-body",id:"engage-body",children:g[h]})]})}const j0e=e=>({allowEngage:e.auth.user&&e.auth.user.company&&e.auth.user.company.engage_permissions&&e.auth.user.company.engage_permissions.allow_engage,user:e.auth.user}),w0e=Jt(le(j0e,{setScrim:hn,getCompanyEngageSettings:em,getEngageDesigns:vve,getSharedContentSummary:pve})(x0e));var S0e=GA();const Tp=Zt(S0e),{apiAddress:P0}=Tn,_0e=e=>(t,r)=>(t({type:_6}),Ne.get(`${P0}api/users/${e}/insights-explorer/`,Ee(r)).then(i=>{t({type:C6,payload:i.data})},i=>{t({type:qD})}),!0),C0e=(e,t)=>(r,i)=>{r({type:x6});const a=`${P0}api/users/${t}/insights/${e}/`;return Ne.get(a,Ee(i)).then(s=>{r({type:j6,payload:s.data})},s=>(r({type:w6}),s.message!==Ue&&r(he({serverError:"This page is unavailable."})),Promise.reject(()=>{})))},N0e=e=>(t,r)=>Ne.get(`${P0}api/users/${e}/tasks/`,Ee(r)).then(i=>{t({type:S6,payload:i.data})},i=>{t({type:qD})});var My,LP;function E0e(){if(LP)return My;LP=1;var e=ww();function t(r,i){return e(r,i)}return My=t,My}var kp={exports:{}},T0e=kp.exports,FP;function k0e(){return FP||(FP=1,(function(e,t){(function(i,a){e.exports=a()})(typeof self<"u"?self:T0e,function(){return(function(r){var i={};function a(s){if(i[s])return i[s].exports;var o=i[s]={i:s,l:!1,exports:{}};return r[s].call(o.exports,o,o.exports,a),o.l=!0,o.exports}return a.m=r,a.c=i,a.d=function(s,o,l){a.o(s,o)||Object.defineProperty(s,o,{configurable:!1,enumerable:!0,get:l})},a.n=function(s){var o=s&&s.__esModule?function(){return s.default}:function(){return s};return a.d(o,"a",o),o},a.o=function(s,o){return Object.prototype.hasOwnProperty.call(s,o)},a.p="",a(a.s=109)})([(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=a(17),o=a(18),l=a(19),c=a(45),h=a(46),u=a(47),d=a(48),p=a(49),f=a(12),m=a(32),g=a(33),x=a(31),v=a(1),b={Scope:v.Scope,create:v.create,find:v.find,query:v.query,register:v.register,Container:s.default,Format:o.default,Leaf:l.default,Embed:d.default,Scroll:c.default,Block:u.default,Inline:h.default,Text:p.default,Attributor:{Attribute:f.default,Class:m.default,Style:g.default,Store:x.default}};i.default=b}),(function(r,i,a){var s=this&&this.__extends||(function(){var x=Object.
vendor: 97,240 bytes, lines 37-62
37setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,b){v.__proto__=b}||function(v,b){for(var j in b)b.hasOwnProperty(j)&&(v[j]=b[j])};return function(v,b){x(v,b);function j(){this.constructor=v}v.prototype=b===null?Object.create(b):(j.prototype=b.prototype,new j)}})();Object.defineProperty(i,"__esModule",{value:!0});var o=(function(x){s(v,x);function v(b){var j=this;return b="[Parchment] "+b,j=x.call(this,b)||this,j.message=b,j.name=j.constructor.name,j}return v})(Error);i.ParchmentError=o;var l={},c={},h={},u={};i.DATA_KEY="__blot";var d;(function(x){x[x.TYPE=3]="TYPE",x[x.LEVEL=12]="LEVEL",x[x.ATTRIBUTE=13]="ATTRIBUTE",x[x.BLOT=14]="BLOT",x[x.INLINE=7]="INLINE",x[x.BLOCK=11]="BLOCK",x[x.BLOCK_BLOT=10]="BLOCK_BLOT",x[x.INLINE_BLOT=6]="INLINE_BLOT",x[x.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",x[x.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",x[x.ANY=15]="ANY"})(d=i.Scope||(i.Scope={}));function p(x,v){var b=m(x);if(b==null)throw new o("Unable to create "+x+" blot");var j=b,w=x instanceof Node||x.nodeType===Node.TEXT_NODE?x:j.create(v);return new j(w,v)}i.create=p;function f(x,v){return v===void 0&&(v=!1),x==null?null:x[i.DATA_KEY]!=null?x[i.DATA_KEY].blot:v?f(x.parentNode,v):null}i.find=f;function m(x,v){v===void 0&&(v=d.ANY);var b;if(typeof x=="string")b=u[x]||l[x];else if(x instanceof Text||x.nodeType===Node.TEXT_NODE)b=u.text;else if(typeof x=="number")x&d.LEVEL&d.BLOCK?b=u.block:x&d.LEVEL&d.INLINE&&(b=u.inline);else if(x instanceof HTMLElement){var j=(x.getAttribute("class")||"").split(/\s+/);for(var w in j)if(b=c[j[w]],b)break;b=b||h[x.tagName]}return b==null?null:v&d.LEVEL&b.scope&&v&d.TYPE&b.scope?b:null}i.query=m;function g(){for(var x=[],v=0;v<arguments.length;v++)x[v]=arguments[v];if(x.length>1)return x.map(function(w){return g(w)});var b=x[0];if(typeof b.blotName!="string"&&typeof b.attrName!="string")throw new o("Invalid definition");if(b.blotName==="abstract")throw new o("Cannot register abstract class");if(u[b.blotName||b.attrName]=b,typeof b.keyName=="string")l[b.keyName]=b;else if(b.className!=null&&(c[b.className]=b),b.tagName!=null){Array.isArray(b.tagName)?b.tagName=b.tagName.map(function(w){return w.toUpperCase()}):b.tagName=b.tagName.toUpperCase();var j=Array.isArray(b.tagName)?b.tagName:[b.tagName];j.forEach(function(w){(h[w]==null||b.className==null)&&(h[w]=b)})}return b}i.register=g}),(function(r,i,a){var s=a(51),o=a(11),l=a(3),c=a(20),h="\0",u=function(d){Array.isArray(d)?this.ops=d:d!=null&&Array.isArray(d.ops)?this.ops=d.ops:this.ops=[]};u.prototype.insert=function(d,p){var f={};return d.length===0?this:(f.insert=d,p!=null&&typeof p=="object"&&Object.keys(p).length>0&&(f.attributes=p),this.push(f))},u.prototype.delete=function(d){return d<=0?this:this.push({delete:d})},u.prototype.retain=function(d,p){if(d<=0)return this;var f={retain:d};return p!=null&&typeof p=="object"&&Object.keys(p).length>0&&(f.attributes=p),this.push(f)},u.prototype.push=function(d){var p=this.ops.length,f=this.ops[p-1];if(d=l(!0,{},d),typeof f=="object"){if(typeof d.delete=="number"&&typeof f.delete=="number")return this.ops[p-1]={delete:f.delete+d.delete},this;if(typeof f.delete=="number"&&d.insert!=null&&(p-=1,f=this.ops[p-1],typeof f!="object"))return this.ops.unshift(d),this;if(o(d.attributes,f.attributes)){if(typeof d.insert=="string"&&typeof f.insert=="string")return this.ops[p-1]={insert:f.insert+d.insert},typeof d.attributes=="object"&&(this.ops[p-1].attributes=d.attributes),this;if(typeof d.retain=="number"&&typeof f.retain=="number")return this.ops[p-1]={retain:f.retain+d.retain},typeof d.attributes=="object"&&(this.ops[p-1].attributes=d.attributes),this}}return p===this.ops.length?this.ops.push(d):this.ops.splice(p,0,d),this},u.prototype.chop=function(){var d=this.ops[this.ops.length-1];return d&&d.retain&&!d.attributes&&this.ops.pop(),this},u.prototype.filter=function(d){return this.ops.filter(d)},u.prototype.forEach=function(d){this.ops.forEach(d)},u.prototype.map=function(d){return this.ops.map(d)},u.prototype.partition=function(d){var p=[],f=[];return this.forEach(function(m){var g=d(m)?p:f;g.push(m)}),[p,f]},u.prototype.reduce=function(d,p){return this.ops.reduce(d,p)},u.prototype.changeLength=function(){return this.reduce(function(d,p){return p.insert?d+c.length(p):p.delete?d-p.delete:d},0)},u.prototype.length=function(){return this.reduce(function(d,p){return d+c.length(p)},0)},u.prototype.slice=function(d,p){d=d||0,typeof p!="number"&&(p=1/0);for(var f=[],m=c.iterator(this.ops),g=0;g<p&&m.hasNext();){var x;g<d?x=m.next(d-g):(x=m.next(p-g),f.push(x)),g+=c.length(x)}return new u(f)},u.prototype.compose=function(d){var p=c.iterator(this.ops),f=c.iterator(d.ops),m=[],g=f.peek();if(g!=null&&typeof g.retain=="number"&&g.attributes==null){for(var x=g.retain;p.peekType()==="insert"&&p.peekLength()<=x;)x-=p.peekLength(),m.push(p.next());g.retain-x>0&&f.next(g.retain-x)}for(var v=new u(m);p.hasNext()||f.hasNext();)if(f.peekType()==="insert")v.push(f.next());else if(p.peekType()==="delete")v.push(p.next());else{var b=Math.min(p.peekLength(),f.peekLength()),j=p.next(b),w=f.next(b);if(typeof w.retain=="number"){var S={};typeof j.retain=="number"?S.retain=b:S.insert=j.insert;var _=c.attributes.compose(j.attributes,w.attributes,typeof j.retain=="number");if(_&&(S.attributes=_),v.push(S),!f.hasNext()&&o(v.ops[v.ops.length-1],S)){var C=new u(p.rest());return v.concat(C).chop()}}else typeof w.delete=="number"&&typeof j.retain=="number"&&v.push(w)}return v.chop()},u.prototype.concat=function(d){var p=new u(this.ops.slice());return d.ops.length>0&&(p.push(d.ops[0]),p.ops=p.ops.concat(d.ops.slice(1))),p},u.prototype.diff=function(d,p){if(this.ops===d.ops)return new u;var f=[this,d].map(function(b){return b.map(function(j){if(j.insert!=null)return typeof j.insert=="string"?j.insert:h;var w=b===d?"on":"with";throw new Error("diff() called "+w+" non-document")}).join("")}),m=new u,g=s(f[0],f[1],p),x=c.iterator(this.ops),v=c.iterator(d.ops);return g.forEach(function(b){for(var j=b[1].length;j>0;){var w=0;switch(b[0]){case s.INSERT:w=Math.min(v.peekLength(),j),m.push(v.next(w));break;case s.DELETE:w=Math.min(j,x.peekLength()),x.next(w),m.delete(w);break;case s.EQUAL:w=Math.min(x.peekLength(),v.peekLength(),j);var S=x.next(w),_=v.next(w);o(S.insert,_.insert)?m.retain(w,c.attributes.diff(S.attributes,_.attributes)):m.push(_).delete(w);break}j-=w}}),m.chop()},u.prototype.eachLine=function(d,p){p=p||`
38`;for(var f=c.iterator(this.ops),m=new u,g=0;f.hasNext();){if(f.peekType()!=="insert")return;var x=f.peek(),v=c.length(x)-f.peekLength(),b=typeof x.insert=="string"?x.insert.indexOf(p,v)-v:-1;if(b<0)m.push(f.next());else if(b>0)m.push(f.next(b));else{if(d(m,f.next(1).attributes||{},g)===!1)return;g+=1,m=new u}}m.length()>0&&d(m,{},g)},u.prototype.transform=function(d,p){if(p=!!p,typeof d=="number")return this.transformPosition(d,p);for(var f=c.iterator(this.ops),m=c.iterator(d.ops),g=new u;f.hasNext()||m.hasNext();)if(f.peekType()==="insert"&&(p||m.peekType()!=="insert"))g.retain(c.length(f.next()));else if(m.peekType()==="insert")g.push(m.next());else{var x=Math.min(f.peekLength(),m.peekLength()),v=f.next(x),b=m.next(x);if(v.delete)continue;b.delete?g.push(b):g.retain(x,c.attributes.transform(v.attributes,b.attributes,p))}return g.chop()},u.prototype.transformPosition=function(d,p){p=!!p;for(var f=c.iterator(this.ops),m=0;f.hasNext()&&m<=d;){var g=f.peekLength(),x=f.peekType();if(f.next(),x==="delete"){d-=Math.min(g,d-m);continue}else x==="insert"&&(m<d||!p)&&(d+=g);m+=g}return d},r.exports=u}),(function(r,i){var a=Object.prototype.hasOwnProperty,s=Object.prototype.toString,o=Object.defineProperty,l=Object.getOwnPropertyDescriptor,c=function(f){return typeof Array.isArray=="function"?Array.isArray(f):s.call(f)==="[object Array]"},h=function(f){if(!f||s.call(f)!=="[object Object]")return!1;var m=a.call(f,"constructor"),g=f.constructor&&f.constructor.prototype&&a.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!m&&!g)return!1;var x;for(x in f);return typeof x>"u"||a.call(f,x)},u=function(f,m){o&&m.name==="__proto__"?o(f,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):f[m.name]=m.newValue},d=function(f,m){if(m==="__proto__")if(a.call(f,m)){if(l)return l(f,m).value}else return;return f[m]};r.exports=function p(){var f,m,g,x,v,b,j=arguments[0],w=1,S=arguments.length,_=!1;for(typeof j=="boolean"&&(_=j,j=arguments[1]||{},w=2),(j==null||typeof j!="object"&&typeof j!="function")&&(j={});w<S;++w)if(f=arguments[w],f!=null)for(m in f)g=d(j,m),x=d(f,m),j!==x&&(_&&x&&(h(x)||(v=c(x)))?(v?(v=!1,b=g&&c(g)?g:[]):b=g&&h(g)?g:{},u(j,{name:m,newValue:p(_,b,x)})):typeof x<"u"&&u(j,{name:m,newValue:x}));return j}}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0}),i.default=i.BlockEmbed=i.bubbleFormats=void 0;var s=(function(){function N(k,I){for(var D=0;D<I.length;D++){var O=I[D];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(k,O.key,O)}}return function(k,I,D){return I&&N(k.prototype,I),D&&N(k,D),k}})(),o=function N(k,I,D){k===null&&(k=Function.prototype);var O=Object.getOwnPropertyDescriptor(k,I);if(O===void 0){var $=Object.getPrototypeOf(k);return $===null?void 0:N($,I,D)}else{if("value"in O)return O.value;var U=O.get;return U===void 0?void 0:U.call(D)}},l=a(3),c=j(l),h=a(2),u=j(h),d=a(0),p=j(d),f=a(16),m=j(f),g=a(6),x=j(g),v=a(7),b=j(v);function j(N){return N&&N.__esModule?N:{default:N}}function w(N,k){if(!(N instanceof k))throw new TypeError("Cannot call a class as a function")}function S(N,k){if(!N)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k&&(typeof k=="object"||typeof k=="function")?k:N}function _(N,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof k);N.prototype=Object.create(k&&k.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}}),k&&(Object.setPrototypeOf?Object.setPrototypeOf(N,k):N.__proto__=k)}var C=1,E=(function(N){_(k,N);function k(){return w(this,k),S(this,(k.__proto__||Object.getPrototypeOf(k)).apply(this,arguments))}return s(k,[{key:"attach",value:function(){o(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"attach",this).call(this),this.attributes=new p.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new u.default().insert(this.value(),(0,c.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(D,O){var $=p.default.query(D,p.default.Scope.BLOCK_ATTRIBUTE);$!=null&&this.attributes.attribute($,O)}},{key:"formatAt",value:function(D,O,$,U){this.format($,U)}},{key:"insertAt",value:function(D,O,$){if(typeof O=="string"&&O.endsWith(`
39`)){var U=p.default.create(P.blotName);this.parent.insertBefore(U,D===0?this:this.next),U.insertAt(0,O.slice(0,-1))}else o(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"insertAt",this).call(this,D,O,$)}}]),k})(p.default.Embed);E.scope=p.default.Scope.BLOCK_BLOT;var P=(function(N){_(k,N);function k(I){w(this,k);var D=S(this,(k.__proto__||Object.getPrototypeOf(k)).call(this,I));return D.cache={},D}return s(k,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(p.default.Leaf).reduce(function(D,O){return O.length()===0?D:D.insert(O.value(),T(O))},new u.default).insert(`
40`,T(this))),this.cache.delta}},{key:"deleteAt",value:function(D,O){o(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"deleteAt",this).call(this,D,O),this.cache={}}},{key:"formatAt",value:function(D,O,$,U){O<=0||(p.default.query($,p.default.Scope.BLOCK)?D+O===this.length()&&this.format($,U):o(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"formatAt",this).call(this,D,Math.min(O,this.length()-D-1),$,U),this.cache={})}},{key:"insertAt",value:function(D,O,$){if($!=null)return o(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"insertAt",this).call(this,D,O,$);if(O.length!==0){var U=O.split(`
41`),B=U.shift();B.length>0&&(D<this.length()-1||this.children.tail==null?o(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"insertAt",this).call(this,Math.min(D,this.length()-1),B):this.children.tail.insertAt(this.children.tail.length(),B),this.cache={});var L=this;U.reduce(function(A,R){return L=L.split(A,!0),L.insertAt(0,R),R.length},D+B.length)}}},{key:"insertBefore",value:function(D,O){var $=this.children.head;o(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"insertBefore",this).call(this,D,O),$ instanceof m.default&&$.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=o(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"length",this).call(this)+C),this.cache.length}},{key:"moveChildren",value:function(D,O){o(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"moveChildren",this).call(this,D,O),this.cache={}}},{key:"optimize",value:function(D){o(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"optimize",this).call(this,D),this.cache={}}},{key:"path",value:function(D){return o(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"path",this).call(this,D,!0)}},{key:"removeChild",value:function(D){o(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"removeChild",this).call(this,D),this.cache={}}},{key:"split",value:function(D){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(O&&(D===0||D>=this.length()-C)){var $=this.clone();return D===0?(this.parent.insertBefore($,this),this):(this.parent.insertBefore($,this.next),$)}else{var U=o(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"split",this).call(this,D,O);return this.cache={},U}}}]),k})(p.default.Block);P.blotName="block",P.tagName="P",P.defaultChild="break",P.allowedChildren=[x.default,p.default.Embed,b.default];function T(N){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return N==null||(typeof N.formats=="function"&&(k=(0,c.default)(k,N.formats())),N.parent==null||N.parent.blotName=="scroll"||N.parent.statics.scope!==N.statics.scope)?k:T(N.parent,k)}i.bubbleFormats=T,i.BlockEmbed=E,i.default=P}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0}),i.default=i.overload=i.expandConfig=void 0;var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(L){return typeof L}:function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L},o=(function(){function L(A,R){var F=[],q=!0,V=!1,X=void 0;try{for(var M=A[Symbol.iterator](),W;!(q=(W=M.next()).done)&&(F.push(W.value),!(R&&F.length===R));q=!0);}catch(K){V=!0,X=K}finally{try{!q&&M.return&&M.return()}finally{if(V)throw X}}return F}return function(A,R){if(Array.isArray(A))return A;if(Symbol.iterator in Object(A))return L(A,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=(function(){function L(A,R){for(var F=0;F<R.length;F++){var q=R[F];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(A,q.key,q)}}return function(A,R,F){return R&&L(A.prototype,R),F&&L(A,F),A}})();a(50);var c=a(2),h=T(c),u=a(14),d=T(u),p=a(8),f=T(p),m=a(9),g=T(m),x=a(0),v=T(x),b=a(15),j=T(b),w=a(3),S=T(w),_=a(10),C=T(_),E=a(34),P=T(E);function T(L){return L&&L.__esModule?L:{default:L}}function N(L,A,R){return A in L?Object.defineProperty(L,A,{value:R,enumerable:!0,configurable:!0,writable:!0}):L[A]=R,L}function k(L,A){if(!(L instanceof A))throw new TypeError("Cannot call a class as a function")}var I=(0,C.default)("quill"),D=(function(){l(L,null,[{key:"debug",value:function(R){R===!0&&(R="log"),C.default.level(R)}},{key:"find",value:function(R){return R.__quill||v.default.find(R)}},{key:"import",value:function(R){return this.imports[R]==null&&I.error("Cannot import "+R+". Are you sure it was registered?"),this.imports[R]}},{key:"register",value:function(R,F){var q=this,V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof R!="string"){var X=R.attrName||R.blotName;typeof X=="string"?this.register("formats/"+X,R,F):Object.keys(R).forEach(function(M){q.register(M,R[M],F)})}else this.imports[R]!=null&&!V&&I.warn("Overwriting "+R+" with",F),this.imports[R]=F,(R.startsWith("blots/")||R.startsWith("formats/"))&&F.blotName!=="abstract"?v.default.register(F):R.startsWith("modules")&&typeof F.register=="function"&&F.register()}}]);function L(A){var R=this,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(k(this,L),this.options=O(A,F),this.container=this.options.container,this.container==null)return I.error("Invalid Quill container",A);this.options.debug&&L.debug(this.options.debug);var q=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new f.default,this.scroll=v.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new d.default(this.scroll),this.selection=new j.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(f.default.events.EDITOR_CHANGE,function(X){X===f.default.events.TEXT_CHANGE&&R.root.classList.toggle("ql-blank",R.editor.isBlank())}),this.emitter.on(f.default.events.SCROLL_UPDATE,function(X,M){var W=R.selection.lastRange,K=W&&W.length===0?W.index:void 0;$.call(R,function(){return R.editor.update(null,M,K)},X)});var V=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+q+"<p><br></p></div>");this.setContents(V),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return l(L,[{key:"addContainer",value:function(R){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof R=="string"){var q=R;R=document.createElement("div"),R.classList.add(q)}return this.container.insertBefore(R,F),R}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(R,F,q){var V=this,X=U(R,F,q),M=o(X,4);return R=M[0],F=M[1],q=M[3],$.call(this,function(){return V.editor.deleteText(R,F)},q,R,-1*F)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(R),this.container.classList.toggle("ql-disabled",!R)}},{key:"focus",value:function(){var R=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=R,this.scrollIntoView()}},{key:"format",value:function(R,F){var q=this,V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.default.sources.API;return $.call(this,function(){var X=q.getSelection(!0),M=new h.default;if(X==null)return M;if(v.default.query(R,v.default.Scope.BLOCK))M=q.editor.formatLine(X.index,X.length,N({},R,F));else{if(X.length===0)return q.selection.format(R,F),M;M=q.editor.formatText(X.index,X.length,N({},R,F))}return q.setSelection(X,f.default.sources.SILENT),M},V)}},{key:"formatLine",value:function(R,F,q,V,X){var M=this,W=void 0,K=U(R,F,q,V,X),z=o(K,4);return R=z[0],F=z[1],W=z[2],X=z[3],$.call(this,function(){return M.editor.formatLine(R,F,W)},X,R,0)}},{key:"formatText",value:function(R,F,q,V,X){var M=this,W=void 0,K=U(R,F,q,V,X),z=o(K,4);return R=z[0],F=z[1],W=z[2],X=z[3],$.call(this,function(){return M.editor.formatText(R,F,W)},X,R,0)}},{key:"getBounds",value:function(R){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,q=void 0;typeof R=="number"?q=this.selection.getBounds(R,F):q=this.selection.getBounds(R.index,R.length);var V=this.container.getBoundingClientRect();return{bottom:q.bottom-V.top,height:q.height,left:q.left-V.left,right:q.right-V.left,top:q.top-V.top,width:q.width}}},{key:"getContents",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-R,q=U(R,F),V=o(q,2);return R=V[0],F=V[1],this.editor.getContents(R,F)}},{key:"getFormat",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof R=="number"?this.editor.getFormat(R,F):this.editor.getFormat(R.index,R.length)}},{key:"getIndex",value:function(R){return R.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(R){return this.scroll.leaf(R)}},{key:"getLine",value:function(R){return this.scroll.line(R)}},{key:"getLines",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof R!="number"?this.scroll.lines(R.index,R.length):this.scroll.lines(R,F)}},{key:"getModule",value:function(R){return this.theme.modules[R]}},{key:"getSelection",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return R&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-R,q=U(R,F),V=o(q,2);return R=V[0],F=V[1],this.editor.getText(R,F)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(R,F,q){var V=this,X=arguments.length>3&&arguments[3]!==void 0?arguments[3]:L.sources.API;return $.call(this,function(){return V.editor.insertEmbed(R,F,q)},X,R)}},{key:"insertText",value:function(R,F,q,V,X){var M=this,W=void 0,K=U(R,0,q,V,X),z=o(K,4);return R=z[0],W=z[2],X=z[3],$.call(this,function(){return M.editor.insertText(R,F,W)},X,R,F.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(R,F,q){this.clipboard.dangerouslyPasteHTML(R,F,q)}},{key:"removeFormat",value:function(R,F,q){var V=this,X=U(R,F,q),M=o(X,4);return R=M[0],F=M[1],q=M[3],$.call(this,function(){return V.editor.removeFormat(R,F)},q,R)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(R){var F=this,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f.default.sources.API;return $.call(this,function(){R=new h.default(R);var V=F.getLength(),X=F.editor.deleteText(0,V),M=F.editor.applyDelta(R),W=M.ops[M.ops.length-1];W!=null&&typeof W.insert=="string"&&W.insert[W.insert.length-1]===`
42`&&(F.editor.deleteText(F.getLength()-1,1),M.delete(1));var K=X.compose(M);return K},q)}},{key:"setSelection",value:function(R,F,q){if(R==null)this.selection.setRange(null,F||L.sources.API);else{var V=U(R,F,q),X=o(V,4);R=X[0],F=X[1],q=X[3],this.selection.setRange(new b.Range(R,F),q),q!==f.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(R){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f.default.sources.API,q=new h.default().insert(R);return this.setContents(q,F)}},{key:"update",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:f.default.sources.USER,F=this.scroll.update(R);return this.selection.update(R),F}},{key:"updateContents",value:function(R){var F=this,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f.default.sources.API;return $.call(this,function(){return R=new h.default(R),F.editor.applyDelta(R,q)},q,!0)}}]),L})();D.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},D.events=f.default.events,D.sources=f.default.sources,D.version="1.3.7",D.imports={delta:h.default,parchment:v.default,"core/module":g.default,"core/theme":P.default};function O(L,A){if(A=(0,S.default)(!0,{container:L,modules:{clipboard:!0,keyboard:!0,history:!0}},A),!A.theme||A.theme===D.DEFAULTS.theme)A.theme=P.default;else if(A.theme=D.import("themes/"+A.theme),A.theme==null)throw new Error("Invalid theme "+A.theme+". Did you register it?");var R=(0,S.default)(!0,{},A.theme.DEFAULTS);[R,A].forEach(function(V){V.modules=V.modules||{},Object.keys(V.modules).forEach(function(X){V.modules[X]===!0&&(V.modules[X]={})})});var F=Object.keys(R.modules).concat(Object.keys(A.modules)),q=F.reduce(function(V,X){var M=D.import("modules/"+X);return M==null?I.error("Cannot load "+X+" module. Are you sure you registered it?"):V[X]=M.DEFAULTS||{},V},{});return A.modules!=null&&A.modules.toolbar&&A.modules.toolbar.constructor!==Object&&(A.modules.toolbar={container:A.modules.toolbar}),A=(0,S.default)(!0,{},D.DEFAULTS,{modules:q},R,A),["bounds","container","scrollingContainer"].forEach(function(V){typeof A[V]=="string"&&(A[V]=document.querySelector(A[V]))}),A.modules=Object.keys(A.modules).reduce(function(V,X){return A.modules[X]&&(V[X]=A.modules[X]),V},{}),A}function $(L,A,R,F){if(this.options.strict&&!this.isEnabled()&&A===f.default.sources.USER)return new h.default;var q=R==null?null:this.getSelection(),V=this.editor.delta,X=L();if(q!=null&&(R===!0&&(R=q.index),F==null?q=B(q,X,A):F!==0&&(q=B(q,R,F,A)),this.setSelection(q,f.default.sources.SILENT)),X.length()>0){var M,W=[f.default.events.TEXT_CHANGE,X,V,A];if((M=this.emitter).emit.apply(M,[f.default.events.EDITOR_CHANGE].concat(W)),A!==f.default.sources.SILENT){var K;(K=this.emitter).emit.apply(K,W)}}return X}function U(L,A,R,F,q){var V={};return typeof L.index=="number"&&typeof L.length=="number"?typeof A!="number"?(q=F,F=R,R=A,A=L.length,L=L.index):(A=L.length,L=L.index):typeof A!="number"&&(q=F,F=R,R=A,A=0),(typeof R>"u"?"undefined":s(R))==="object"?(V=R,q=F):typeof R=="string"&&(F!=null?V[R]=F:q=R),q=q||f.default.sources.API,[L,A,V,q]}function B(L,A,R,F){if(L==null)return null;var q=void 0,V=void 0;if(A instanceof h.default){var X=[L.index,L.index+L.length].map(function(z){return A.transformPosition(z,F!==f.default.sources.USER)}),M=o(X,2);q=M[0],V=M[1]}else{var W=[L.index,L.index+L.length].map(function(z){return z<A||z===A&&F===f.default.sources.USER?z:R>=0?z+R:Math.max(A,z+R)}),K=o(W,2);q=K[0],V=K[1]}return new b.Range(q,V-q)}i.expandConfig=O,i.overload=U,i.default=D}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=(function(){function x(v,b){for(var j=0;j<b.length;j++){var w=b[j];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(v,w.key,w)}}return function(v,b,j){return b&&x(v.prototype,b),j&&x(v,j),v}})(),o=function x(v,b,j){v===null&&(v=Function.prototype);var w=Object.getOwnPropertyDescriptor(v,b);if(w===void 0){var S=Object.getPrototypeOf(v);return S===null?void 0:x(S,b,j)}else{if("value"in w)return w.value;var _=w.get;return _===void 0?void 0:_.call(j)}},l=a(7),c=d(l),h=a(0),u=d(h);function d(x){return x&&x.__esModule?x:{default:x}}function p(x,v){if(!(x instanceof v))throw new TypeError("Cannot call a class as a function")}function f(x,v){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:x}function m(x,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);x.prototype=Object.create(v&&v.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(x,v):x.__proto__=v)}var g=(function(x){m(v,x);function v(){return p(this,v),f(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return s(v,[{key:"formatAt",value:function(j,w,S,_){if(v.compare(this.statics.blotName,S)<0&&u.default.query(S,u.default.Scope.BLOT)){var C=this.isolate(j,w);_&&C.wrap(S,_)}else o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"formatAt",this).call(this,j,w,S,_)}},{key:"optimize",value:function(j){if(o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"optimize",this).call(this,j),this.parent instanceof v&&v.compare(this.statics.blotName,this.parent.statics.blotName)>0){var w=this.parent.isolate(this.offset(),this.length());this.moveChildren(w),w.wrap(this)}}}],[{key:"compare",value:function(j,w){var S=v.order.indexOf(j),_=v.order.indexOf(w);return S>=0||_>=0?S-_:j===w?0:j<w?-1:1}}]),v})(u.default.Inline);g.allowedChildren=[g,u.default.Embed,c.default],g.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],i.default=g}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=a(0),o=l(s);function l(p){return p&&p.__esModule?p:{default:p}}function c(p,f){if(!(p instanceof f))throw new TypeError("Cannot call a class as a function")}function h(p,f){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:p}function u(p,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);p.prototype=Object.create(f&&f.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(p,f):p.__proto__=f)}var d=(function(p){u(f,p);function f(){return c(this,f),h(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f})(o.default.Text);i.default=d}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=(function(){function b(j,w){for(var S=0;S<w.length;S++){var _=w[S];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(j,_.key,_)}}return function(j,w,S){return w&&b(j.prototype,w),S&&b(j,S),j}})(),o=function b(j,w,S){j===null&&(j=Function.prototype);var _=Object.getOwnPropertyDescriptor(j,w);if(_===void 0){var C=Object.getPrototypeOf(j);return C===null?void 0:b(C,w,S)}else{if("value"in _)return _.value;var E=_.get;return E===void 0?void 0:E.call(S)}},l=a(54),c=d(l),h=a(10),u=d(h);function d(b){return b&&b.__esModule?b:{default:b}}function p(b,j){if(!(b instanceof j))throw new TypeError("Cannot call a class as a function")}function f(b,j){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j&&(typeof j=="object"||typeof j=="function")?j:b}function m(b,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof j);b.prototype=Object.create(j&&j.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),j&&(Object.setPrototypeOf?Object.setPrototypeOf(b,j):b.__proto__=j)}var g=(0,u.default)("quill:events"),x=["selectionchange","mousedown","mouseup","click"];x.forEach(function(b){document.addEventListener(b,function(){for(var j=arguments.length,w=Array(j),S=0;S<j;S++)w[S]=arguments[S];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(_){if(_.__quill&&_.__quill.emitter){var C;(C=_.__quill.emitter).handleDOM.apply(C,w)}})})});var v=(function(b){m(j,b);function j(){p(this,j);var w=f(this,(j.__proto__||Object.getPrototypeOf(j)).call(this));return w.listeners={},w.on("error",g.error),w}return s(j,[{key:"emit",value:function(){g.log.apply(g,arguments),o(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(S){for(var _=arguments.length,C=Array(_>1?_-1:0),E=1;E<_;E++)C[E-1]=arguments[E];(this.listeners[S.type]||[]).forEach(function(P){var T=P.node,N=P.handler;(S.target===T||T.contains(S.target))&&N.apply(void 0,[S].concat(C))})}},{key:"listenDOM",value:function(S,_,C){this.listeners[S]||(this.listeners[S]=[]),this.listeners[S].push({node:_,handler:C})}}]),j})(c.default);v.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},v.sources={API:"api",SILENT:"silent",USER:"user"},i.default=v}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});function s(l,c){if(!(l instanceof c))throw new TypeError("Cannot call a class as a function")}var o=function l(c){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};s(this,l),this.quill=c,this.options=h};o.DEFAULTS={},i.default=o}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=["error","warn","log","info"],o="warn";function l(h){if(s.indexOf(h)<=s.indexOf(o)){for(var u,d=arguments.length,p=Array(d>1?d-1:0),f=1;f<d;f++)p[f-1]=arguments[f];(u=console)[h].apply(u,p)}}function c(h){return s.reduce(function(u,d){return u[d]=l.bind(console,d,h),u},{})}l.level=c.level=function(h){o=h},i.default=c}),(function(r,i,a){var s=Array.prototype.slice,o=a(52),l=a(53),c=r.exports=function(p,f,m){return m||(m={}),p===f?!0:p instanceof Date&&f instanceof Date?p.getTime()===f.getTime():!p||!f||typeof p!="object"&&typeof f!="object"?m.strict?p===f:p==f:d(p,f,m)};function h(p){return p==null}function u(p){return!(!p||typeof p!="object"||typeof p.length!="number"||typeof p.copy!="function"||typeof p.slice!="function"||p.length>0&&typeof p[0]!="number")}function d(p,f,m){var g,x;if(h(p)||h(f)||p.prototype!==f.prototype)return!1;if(l(p))return l(f)?(p=s.call(p),f=s.call(f),c(p,f,m)):!1;if(u(p)){if(!u(f)||p.length!==f.length)return!1;for(g=0;g<p.length;g++)if(p[g]!==f[g])return!1;return!0}try{var v=o(p),b=o(f)}catch{return!1}if(v.length!=b.length)return!1;for(v.sort(),b.sort(),g=v.length-1;g>=0;g--)if(v[g]!=b[g])return!1;for(g=v.length-1;g>=0;g--)if(x=v[g],!c(p[x],f[x],m))return!1;return typeof p==typeof f}}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=a(1),o=(function(){function l(c,h,u){u===void 0&&(u={}),this.attrName=c,this.keyName=h;var d=s.Scope.TYPE&s.Scope.ATTRIBUTE;u.scope!=null?this.scope=u.scope&s.Scope.LEVEL|d:this.scope=s.Scope.ATTRIBUTE,u.whitelist!=null&&(this.whitelist=u.whitelist)}return l.keys=function(c){return[].map.call(c.attributes,function(h){return h.name})},l.prototype.add=function(c,h){return this.canAdd(c,h)?(c.setAttribute(this.keyName,h),!0):!1},l.prototype.canAdd=function(c,h){var u=s.query(c,s.Scope.BLOT&(this.scope|s.Scope.TYPE));return u==null?!1:this.whitelist==null?!0:typeof h=="string"?this.whitelist.indexOf(h.replace(/["']/g,""))>-1:this.whitelist.indexOf(h)>-1},l.prototype.remove=function(c){c.removeAttribute(this.keyName)},l.prototype.value=function(c){var h=c.getAttribute(this.keyName);return this.canAdd(c,h)&&h?h:""},l})();i.default=o}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0}),i.default=i.Code=void 0;var s=(function(){function E(P,T){var N=[],k=!0,I=!1,D=void 0;try{for(var O=P[Symbol.iterator](),$;!(k=($=O.next()).done)&&(N.push($.value),!(T&&N.length===T));k=!0);}catch(U){I=!0,D=U}finally{try{!k&&O.return&&O.return()}finally{if(I)throw D}}return N}return function(P,T){if(Array.isArray(P))return P;if(Symbol.iterator in Object(P))return E(P,T);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=(function(){function E(P,T){for(var N=0;N<T.length;N++){var k=T[N];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(P,k.key,k)}}return function(P,T,N){return T&&E(P.prototype,T),N&&E(P,N),P}})(),l=function E(P,T,N){P===null&&(P=Function.prototype);var k=Object.getOwnPropertyDescriptor(P,T);if(k===void 0){var I=Object.getPrototypeOf(P);return I===null?void 0:E(I,T,N)}else{if("value"in k)return k.value;var D=k.get;return D===void 0?void 0:D.call(N)}},c=a(2),h=b(c),u=a(0),d=b(u),p=a(4),f=b(p),m=a(6),g=b(m),x=a(7),v=b(x);function b(E){return E&&E.__esModule?E:{default:E}}function j(E,P){if(!(E instanceof P))throw new TypeError("Cannot call a class as a function")}function w(E,P){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:E}function S(E,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);E.prototype=Object.create(P&&P.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(E,P):E.__proto__=P)}var _=(function(E){S(P,E);function P(){return j(this,P),w(this,(P.__proto__||Object.getPrototypeOf(P)).apply(this,arguments))}return P})(g.default);_.blotName="code",_.tagName="CODE";var C=(function(E){S(P,E);function P(){return j(this,P),w(this,(P.__proto__||Object.getPrototypeOf(P)).apply(this,arguments))}return o(P,[{key:"delta",value:function(){var N=this,k=this.domNode.textContent;return k.endsWith(`
43`)&&(k=k.slice(0,-1)),k.split(`
44`).reduce(function(I,D){return I.insert(D).insert(`
45`,N.formats())},new h.default)}},{key:"format",value:function(N,k){if(!(N===this.statics.blotName&&k)){var I=this.descendant(v.default,this.length()-1),D=s(I,1),O=D[0];O?.deleteAt(O.length()-1,1),l(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"format",this).call(this,N,k)}}},{key:"formatAt",value:function(N,k,I,D){if(k!==0&&!(d.default.query(I,d.default.Scope.BLOCK)==null||I===this.statics.blotName&&D===this.statics.formats(this.domNode))){var O=this.newlineIndex(N);if(!(O<0||O>=N+k)){var $=this.newlineIndex(N,!0)+1,U=O-$+1,B=this.isolate($,U),L=B.next;B.format(I,D),L instanceof P&&L.formatAt(0,N-$+k-U,I,D)}}}},{key:"insertAt",value:function(N,k,I){if(I==null){var D=this.descendant(v.default,N),O=s(D,2),$=O[0],U=O[1];$.insertAt(U,k)}}},{key:"length",value:function(){var N=this.domNode.textContent.length;return this.domNode.textContent.endsWith(`
46`)?N:N+1}},{key:"newlineIndex",value:function(N){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(k)return this.domNode.textContent.slice(0,N).lastIndexOf(`
47`);var I=this.domNode.textContent.slice(N).indexOf(`
48`);return I>-1?N+I:-1}},{key:"optimize",value:function(N){this.domNode.textContent.endsWith(`
49`)||this.appendChild(d.default.create("text",`
50`)),l(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"optimize",this).call(this,N);var k=this.next;k!=null&&k.prev===this&&k.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===k.statics.formats(k.domNode)&&(k.optimize(N),k.moveChildren(this),k.remove())}},{key:"replace",value:function(N){l(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"replace",this).call(this,N),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(k){var I=d.default.find(k);I==null?k.parentNode.removeChild(k):I instanceof d.default.Embed?I.remove():I.unwrap()})}}],[{key:"create",value:function(N){var k=l(P.__proto__||Object.getPrototypeOf(P),"create",this).call(this,N);return k.setAttribute("spellcheck",!1),k}},{key:"formats",value:function(){return!0}}]),P})(f.default);C.blotName="code-block",C.tagName="PRE",C.TAB="  ",i.Code=_,i.default=C}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(L){return typeof L}:function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L},o=(function(){function L(A,R){var F=[],q=!0,V=!1,X=void 0;try{for(var M=A[Symbol.iterator](),W;!(q=(W=M.next()).done)&&(F.push(W.value),!(R&&F.length===R));q=!0);}catch(K){V=!0,X=K}finally{try{!q&&M.return&&M.return()}finally{if(V)throw X}}return F}return function(A,R){if(Array.isArray(A))return A;if(Symbol.iterator in Object(A))return L(A,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=(function(){function L(A,R){for(var F=0;F<R.length;F++){var q=R[F];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(A,q.key,q)}}return function(A,R,F){return R&&L(A.prototype,R),F&&L(A,F),A}})(),c=a(2),h=k(c),u=a(20),d=k(u),p=a(0),f=k(p),m=a(13),g=k(m),x=a(24),v=k(x),b=a(4),j=k(b),w=a(16),S=k(w),_=a(21),C=k(_),E=a(11),P=k(E),T=a(3),N=k(T);function k(L){return L&&L.__esModule?L:{default:L}}function I(L,A,R){return A in L?Object.defineProperty(L,A,{value:R,enumerable:!0,configurable:!0,writable:!0}):L[A]=R,L}function D(L,A){if(!(L instanceof A))throw new TypeError("Cannot call a class as a function")}var O=/^[ -~]*$/,$=(function(){function L(A){D(this,L),this.scroll=A,this.delta=this.getDelta()}return l(L,[{key:"applyDelta",value:function(R){var F=this,q=!1;this.scroll.update();var V=this.scroll.length();return this.scroll.batchStart(),R=B(R),R.reduce(function(X,M){var W=M.retain||M.delete||M.insert.length||1,K=M.attributes||{};if(M.insert!=null){if(typeof M.insert=="string"){var z=M.insert;z.endsWith(`
51`)&&q&&(q=!1,z=z.slice(0,-1)),X>=V&&!z.endsWith(`
52`)&&(q=!0),F.scroll.insertAt(X,z);var Y=F.scroll.line(X),ie=o(Y,2),ne=ie[0],ve=ie[1],pe=(0,N.default)({},(0,b.bubbleFormats)(ne));if(ne instanceof j.default){var be=ne.descendant(f.default.Leaf,ve),ye=o(be,1),ke=ye[0];pe=(0,N.default)(pe,(0,b.bubbleFormats)(ke))}K=d.default.attributes.diff(pe,K)||{}}else if(s(M.insert)==="object"){var fe=Object.keys(M.insert)[0];if(fe==null)return X;F.scroll.insertAt(X,fe,M.insert[fe])}V+=W}return Object.keys(K).forEach(function(se){F.scroll.formatAt(X,W,se,K[se])}),X+W},0),R.reduce(function(X,M){return typeof M.delete=="number"?(F.scroll.deleteAt(X,M.delete),X):X+(M.retain||M.insert.length||1)},0),this.scroll.batchEnd(),this.update(R)}},{key:"deleteText",value:function(R,F){return this.scroll.deleteAt(R,F),this.update(new h.default().retain(R).delete(F))}},{key:"formatLine",value:function(R,F){var q=this,V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(V).forEach(function(X){if(!(q.scroll.whitelist!=null&&!q.scroll.whitelist[X])){var M=q.scroll.lines(R,Math.max(F,1)),W=F;M.forEach(function(K){var z=K.length();if(!(K instanceof g.default))K.format(X,V[X]);else{var Y=R-K.offset(q.scroll),ie=K.newlineIndex(Y+W)-Y+1;K.formatAt(Y,ie,X,V[X])}W-=z})}}),this.scroll.optimize(),this.update(new h.default().retain(R).retain(F,(0,C.default)(V)))}},{key:"formatText",value:function(R,F){var q=this,V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(V).forEach(function(X){q.scroll.formatAt(R,F,X,V[X])}),this.update(new h.default().retain(R).retain(F,(0,C.default)(V)))}},{key:"getContents",value:function(R,F){return this.delta.slice(R,R+F)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(R,F){return R.concat(F.delta())},new h.default)}},{key:"getFormat",value:function(R){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,q=[],V=[];F===0?this.scroll.path(R).forEach(function(M){var W=o(M,1),K=W[0];K instanceof j.default?q.push(K):K instanceof f.default.Leaf&&V.push(K)}):(q=this.scroll.lines(R,F),V=this.scroll.descendants(f.default.Leaf,R,F));var X=[q,V].map(function(M){if(M.length===0)return{};for(var W=(0,b.bubbleFormats)(M.shift());Object.keys(W).length>0;){var K=M.shift();if(K==null)return W;W=U((0,b.bubbleFormats)(K),W)}return W});return N.default.apply(N.default,X)}},{key:"getText",value:function(R,F){return this.getContents(R,F).filter(function(q){return typeof q.insert=="string"}).map(function(q){return q.insert}).join("")}},{key:"insertEmbed",value:function(R,F,q){return this.scroll.insertAt(R,F,q),this.update(new h.default().retain(R).insert(I({},F,q)))}},{key:"insertText",value:function(R,F){var q=this,V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return F=F.replace(/\r\n/g,`
53`).replace(/\r/g,`
54`),this.scroll.insertAt(R,F),Object.keys(V).forEach(function(X){q.scroll.formatAt(R,F.length,X,V[X])}),this.update(new h.default().retain(R).insert(F,(0,C.default)(V)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var R=this.scroll.children.head;return R.statics.blotName!==j.default.blotName||R.children.length>1?!1:R.children.head instanceof S.default}},{key:"removeFormat",value:function(R,F){var q=this.getText(R,F),V=this.scroll.line(R+F),X=o(V,2),M=X[0],W=X[1],K=0,z=new h.default;M!=null&&(M instanceof g.default?K=M.newlineIndex(W)-W+1:K=M.length()-W,z=M.delta().slice(W,W+K-1).insert(`
55`));var Y=this.getContents(R,F+K),ie=Y.diff(new h.default().insert(q).concat(z)),ne=new h.default().retain(R).concat(ie);return this.applyDelta(ne)}},{key:"update",value:function(R){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,V=this.delta;if(F.length===1&&F[0].type==="characterData"&&F[0].target.data.match(O)&&f.default.find(F[0].target)){var X=f.default.find(F[0].target),M=(0,b.bubbleFormats)(X),W=X.offset(this.scroll),K=F[0].oldValue.replace(v.default.CONTENTS,""),z=new h.default().insert(K),Y=new h.default().insert(X.value()),ie=new h.default().retain(W).concat(z.diff(Y,q));R=ie.reduce(function(ne,ve){return ve.insert?ne.insert(ve.insert,M):ne.push(ve)},new h.default),this.delta=V.compose(R)}else this.delta=this.getDelta(),(!R||!(0,P.default)(V.compose(R),this.delta))&&(R=V.diff(this.delta,q));return R}}]),L})();function U(L,A){return Object.keys(A).reduce(function(R,F){return L[F]==null||(A[F]===L[F]?R[F]=A[F]:Array.isArray(A[F])?A[F].indexOf(L[F])<0&&(R[F]=A[F].concat([L[F]])):R[F]=[A[F],L[F]]),R},{})}function B(L){return L.reduce(function(A,R){if(R.insert===1){var F=(0,C.default)(R.attributes);return delete F.image,A.insert({image:R.attributes.image},F)}if(R.attributes!=null&&(R.attributes.list===!0||R.attributes.bullet===!0)&&(R=(0,C.default)(R),R.attributes.list?R.attributes.list="ordered":(R.attributes.list="bullet",delete R.attributes.bullet)),typeof R.insert=="string"){var q=R.insert.replace(/\r\n/g,`
56`).replace(/\r/g,`
57`);return A.insert(q,R.attributes)}return A.push(R)},new h.default)}i.default=$}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0}),i.default=i.Range=void 0;var s=(function(){function E(P,T){var N=[],k=!0,I=!1,D=void 0;try{for(var O=P[Symbol.iterator](),$;!(k=($=O.next()).done)&&(N.push($.value),!(T&&N.length===T));k=!0);}catch(U){I=!0,D=U}finally{try{!k&&O.return&&O.return()}finally{if(I)throw D}}return N}return function(P,T){if(Array.isArray(P))return P;if(Symbol.iterator in Object(P))return E(P,T);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=(function(){function E(P,T){for(var N=0;N<T.length;N++){var k=T[N];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(P,k.key,k)}}return function(P,T,N){return T&&E(P.prototype,T),N&&E(P,N),P}})(),l=a(0),c=v(l),h=a(21),u=v(h),d=a(11),p=v(d),f=a(8),m=v(f),g=a(10),x=v(g);function v(E){return E&&E.__esModule?E:{default:E}}function b(E){if(Array.isArray(E)){for(var P=0,T=Array(E.length);P<E.length;P++)T[P]=E[P];return T}else return Array.from(E)}function j(E,P){if(!(E instanceof P))throw new TypeError("Cannot call a class as a function")}var w=(0,x.default)("quill:selection"),S=function E(P){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;j(this,E),this.index=P,this.length=T},_=(function(){function E(P,T){var N=this;j(this,E),this.emitter=T,this.scroll=P,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=c.default.create("cursor",this),this.lastRange=this.savedRange=new S(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){N.mouseDown||setTimeout(N.update.bind(N,m.default.sources.USER),1)}),this.emitter.on(m.default.events.EDITOR_CHANGE,function(k,I){k===m.default.events.TEXT_CHANGE&&I.length()>0&&N.update(m.default.sources.SILENT)}),this.emitter.on(m.default.events.SCROLL_BEFORE_UPDATE,function(){if(N.hasFocus()){var k=N.getNativeRange();k!=null&&k.start.node!==N.cursor.textNode&&N.emitter.once(m.default.events.SCROLL_UPDATE,function(){try{N.setNativeRange(k.start.node,k.start.offset,k.end.node,k.end.offset)}catch{}})}}),this.emitter.on(m.default.events.SCROLL_OPTIMIZE,function(k,I){if(I.range){var D=I.range,O=D.startNode,$=D.startOffset,U=D.endNode,B=D.endOffset;N.setNativeRange(O,$,U,B)}}),this.update(m.default.sources.SILENT)}return o(E,[{key:"handleComposition",value:function(){var T=this;this.root.addEventListener("compositionstart",function(){T.composing=!0}),this.root.addEventListener("compositionend",function(){if(T.composing=!1,T.cursor.parent){var N=T.cursor.restore();if(!N)return;setTimeout(function(){T.setNativeRange(N.startNode,N.startOffset,N.endNode,N.endOffset)},1)}})}},{key:"handleDragging",value:function(){var T=this;this.emitter.listenDOM("mousedown",document.body,function(){T.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){T.mouseDown=!1,T.update(m.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(T,N){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[T])){this.scroll.update();var k=this.getNativeRange();if(!(k==null||!k.native.collapsed||c.default.query(T,c.default.Scope.BLOCK))){if(k.start.node!==this.cursor.textNode){var I=c.default.find(k.start.node,!1);if(I==null)return;if(I instanceof c.default.Leaf){var D=I.split(k.start.offset);I.parent.insertBefore(this.cursor,D)}else I.insertBefore(this.cursor,k.start.node);this.cursor.attach()}this.cursor.format(T,N),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(T){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,k=this.scroll.length();T=Math.min(T,k-1),N=Math.min(T+N,k-1)-T;var I=void 0,D=this.scroll.leaf(T),O=s(D,2),$=O[0],U=O[1];if($==null)return null;var B=$.position(U,!0),L=s(B,2);I=L[0],U=L[1];var A=document.createRange();if(N>0){A.setStart(I,U);var R=this.scroll.leaf(T+N),F=s(R,2);if($=F[0],U=F[1],$==null)return null;var q=$.position(U,!0),V=s(q,2);return I=V[0],U=V[1],A.setEnd(I,U),A.getBoundingClientRect()}else{var X="left",M=void 0;return I instanceof Text?(U<I.data.length?(A.setStart(I,U),A.setEnd(I,U+1)):(A.setStart(I,U-1),A.setEnd(I,U),X="right"),M=A.getBoundingClientRect()):(M=$.domNode.getBoundingClientRect(),U>0&&(X="right")),{bottom:M.top+M.height,height:M.height,left:M[X],right:M[X],top:M.top,width:0}}}},{key:"getNativeRange",value:function(){var T=document.getSelection();if(T==null||T.rangeCount<=0)return null;var N=T.getRangeAt(0);if(N==null)return null;var k=this.normalizeNative(N);return w.info("getNativeRange",k),k}},{key:"getRange",value:function(){var T=this.getNativeRange();if(T==null)return[null,null];var N=this.normalizedToRange(T);return[N,T]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(T){var N=this,k=[[T.start.node,T.start.offset]];T.native.collapsed||k.push([T.end.node,T.end.offset]);var I=k.map(function($){var U=s($,2),B=U[0],L=U[1],A=c.default.find(B,!0),R=A.offset(N.scroll);return L===0?R:A instanceof c.default.Container?R+A.length():R+A.index(B,L)}),D=Math.min(Math.max.apply(Math,b(I)),this.scroll.length()-1),O=Math.min.apply(Math,[D].concat(b(I)));return new S(O,D-O)}},{key:"normalizeNative",value:function(T){if(!C(this.root,T.startContainer)||!T.collapsed&&!C(this.root,T.endContainer))return null;var N={start:{node:T.startContainer,offset:T.startOffset},end:{node:T.endContainer,offset:T.endOffset},native:T};return[N.start,N.end].forEach(function(k){for(var I=k.node,D=k.offset;!(I instanceof Text)&&I.childNodes.length>0;)if(I.childNodes.length>D)I=I.childNodes[D],D=0;else if(I.childNodes.length===D)I=I.lastChild,D=I instanceof Text?I.data.length:I.childNodes.length+1;else break;k.node=I,k.offset=D}),N}},{key:"rangeToNative",value:function(T){var N=this,k=T.collapsed?[T.index]:[T.index,T.index+T.length],I=[],D=this.scroll.length();return k.forEach(function(O,$){O=Math.min(D-1,O);var U=void 0,B=N.scroll.leaf(O),L=s(B,2),A=L[0],R=L[1],F=A.position(R,$!==0),q=s(F,2);U=q[0],R=q[1],I.push(U,R)}),I.length<2&&(I=I.concat(I)),I}},{key:"scrollIntoView",value:function(T){var N=this.lastRange;if(N!=null){var k=this.getBounds(N.index,N.length);if(k!=null){var I=this.scroll.length()-1,D=this.scroll.line(Math.min(N.index,I)),O=s(D,1),$=O[0],U=$;if(N.length>0){var B=this.scroll.line(Math.min(N.index+N.length,I)),L=s(B,1);U=L[0]}if(!($==null||U==null)){var A=T.getBoundingClientRect();k.top<A.top?T.scrollTop-=A.top-k.top:k.bottom>A.bottom&&(T.scrollTop+=k.bottom-A.bottom)}}}}},{key:"setNativeRange",value:function(T,N){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:T,I=arguments.length>3&&arguments[3]!==void 0?arguments[3]:N,D=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(w.info("setNativeRange",T,N,k,I),!(T!=null&&(this.root.parentNode==null||T.parentNode==null||k.parentNode==null))){var O=document.getSelection();if(O!=null)if(T!=null){this.hasFocus()||this.root.focus();var $=(this.getNativeRange()||{}).native;if($==null||D||T!==$.startContainer||N!==$.startOffset||k!==$.endContainer||I!==$.endOffset){T.tagName=="BR"&&(N=[].indexOf.call(T.parentNode.childNodes,T),T=T.parentNode),k.tagName=="BR"&&(I=[].indexOf.call(k.parentNode.childNodes,k),k=k.parentNode);var U=document.createRange();U.setStart(T,N),U.setEnd(k,I),O.removeAllRanges(),O.addRange(U)}}else O.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(T){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:m.default.sources.API;if(typeof N=="string"&&(k=N,N=!1),w.info("setRange",T),T!=null){var I=this.rangeToNative(T);this.setNativeRange.apply(this,b(I).concat([N]))}else this.setNativeRange(null);this.update(k)}},{key:"update",value:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m.default.sources.USER,N=this.lastRange,k=this.getRange(),I=s(k,2),D=I[0],O=I[1];if(this.lastRange=D,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,p.default)(N,this.lastRange)){var $;!this.composing&&O!=null&&O.native.collapsed&&O.start.node!==this.cursor.textNode&&this.cursor.restore();var U=[m.default.events.SELECTION_CHANGE,(0,u.default)(this.lastRange),(0,u.default)(N),T];if(($=this.emitter).emit.apply($,[m.default.events.EDITOR_CHANGE].concat(U)),T!==m.default.sources.SILENT){var B;(B=this.emitter).emit.apply(B,U)}}}}]),E})();function C(E,P){try{P.parentNode}catch{return!1}return P instanceof Text&&(P=P.parentNode),E.contains(P)}i.Range=S,i.default=_}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=(function(){function m(g,x){for(var v=0;v<x.length;v++){var b=x[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(g,b.key,b)}}return function(g,x,v){return x&&m(g.prototype,x),v&&m(g,v),g}})(),o=function m(g,x,v){g===null&&(g=Function.prototype);var b=Object.getOwnPropertyDescriptor(g,x);if(b===void 0){var j=Object.getPrototypeOf(g);return j===null?void 0:m(j,x,v)}else{if("value"in b)return b.value;var w=b.get;return w===void 0?void 0:w.call(v)}},l=a(0),c=h(l);function h(m){return m&&m.__esModule?m:{default:m}}function u(m,g){if(!(m instanceof g))throw new TypeError("Cannot call a class as a function")}function d(m,g){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:m}function p(m,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);m.prototype=Object.create(g&&g.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(m,g):m.__proto__=g)}var f=(function(m){p(g,m);function g(){return u(this,g),d(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return s(g,[{key:"insertInto",value:function(v,b){v.children.length===0?o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"insertInto",this).call(this,v,b):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),g})(c.default.Embed);f.blotName="break",f.tagName="BR",i.default=f}),(function(r,i,a){var s=this&&this.__extends||(function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,f){p.__proto__=f}||function(p,f){for(var m in f)f.hasOwnProperty(m)&&(p[m]=f[m])};return function(p,f){d(p,f);function m(){this.constructor=p}p.prototype=f===null?Object.create(f):(m.prototype=f.prototype,new m)}})();Object.defineProperty(i,"__esModule",{value:!0});var o=a(44),l=a(30),c=a(1),h=(function(d){s(p,d);function p(f){var m=d.call(this,f)||this;return m.build(),m}return p.prototype.appendChild=function(f){this.insertBefore(f)},p.prototype.attach=function(){d.prototype.attach.call(this),this.children.forEach(function(f){f.attach()})},p.prototype.build=function(){var f=this;this.children=new o.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(m){try{var g=u(m);f.insertBefore(g,f.children.head||void 0)}catch(x){if(x instanceof c.ParchmentError)return;throw x}})},p.prototype.deleteAt=function(f,m){if(f===0&&m===this.length())return this.remove();this.children.forEachAt(f,m,function(g,x,v){g.deleteAt(x,v)})},p.prototype.descendant=function(f,m){var g=this.children.find(m),x=g[0],v=g[1];return f.blotName==null&&f(x)||f.blotName!=null&&x instanceof f?[x,v]:x instanceof p?x.descendant(f,v):[null,-1]},p.prototype.descendants=function(f,m,g){m===void 0&&(m=0),g===void 0&&(g=Number.MAX_VALUE);var x=[],v=g;return this.children.forEachAt(m,g,function(b,j,w){(f.blotName==null&&f(b)||f.blotName!=null&&b instanceof f)&&x.push(b),b instanceof p&&(x=x.concat(b.descendants(f,j,v))),v-=w}),x},p.prototype.detach=function(){this.children.forEach(function(f){f.detach()}),d.prototype.detach.call(this)},p.prototype.formatAt=function(f,m,g,x){this.children.forEachAt(f,m,function(v,b,j){v.formatAt(b,j,g,x)})},p.prototype.insertAt=function(f,m,g){var x=this.children.find(f),v=x[0],b=x[1];if(v)v.insertAt(b,m,g);else{var j=g==null?c.create("text",m):c.create(m,g);this.appendChild(j)}},p.prototype.insertBefore=function(f,m){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(g){return f instanceof g}))throw new c.ParchmentError("Cannot insert "+f.statics.blotName+" into "+this.statics.blotName);f.insertInto(this,m)},p.prototype.length=function(){return this.children.reduce(function(f,m){return f+m.length()},0)},p.prototype.moveChildren=function(f,m){this.children.forEach(function(g){f.insertBefore(g,m)})},p.prototype.optimize=function(f){if(d.prototype.optimize.call(this,f),this.children.length===0)if(this.statics.defaultChild!=null){var m=c.create(this.statics.defaultChild);this.appendChild(m),m.optimize(f)}else this.remove()},p.prototype.path=function(f,m){m===void 0&&(m=!1);var g=this.children.find(f,m),x=g[0],v=g[1],b=[[this,f]];return x instanceof p?b.concat(x.path(v,m)):(x!=null&&b.push([x,v]),b)},p.prototype.removeChild=function(f){this.children.remove(f)},p.prototype.replace=function(f){f instanceof p&&f.moveChildren(this),d.prototype.replace.call(this,f)},p.prototype.split=function(f,m){if(m===void 0&&(m=!1),!m){if(f===0)return this;if(f===this.length())return this.next}var g=this.clone();return this.parent.insertBefore(g,this.next),this.children.forEachAt(f,this.length(),function(x,v,b){x=x.split(v,m),g.appendChild(x)}),g},p.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},p.prototype.update=function(f,m){var g=this,x=[],v=[];f.forEach(function(b){b.target===g.domNode&&b.type==="childList"&&(x.push.apply(x,b.addedNodes),v.push.apply(v,b.removedNodes))}),v.forEach(function(b){if(!(b.parentNode!=null&&b.tagName!=="IFRAME"&&document.body.compareDocumentPosition(b)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var j=c.find(b);j!=null&&(j.domNode.parentNode==null||j.domNode.parentNode===g.domNode)&&j.detach()}}),x.filter(function(b){return b.parentNode==g.domNode}).sort(function(b,j){return b===j?0:b.compareDocumentPosition(j)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(b){var j=null;b.nextSibling!=null&&(j=c.find(b.nextSibling));var w=u(b);(w.next!=j||w.next==null)&&(w.parent!=null&&w.parent.removeChild(g),g.insertBefore(w,j||void 0))})},p})(l.default);function u(d){var p=c.find(d);if(p==null)try{p=c.create(d)}catch{p=c.create(c.Scope.INLINE),[].slice.call(d.childNodes).forEach(function(m){p.domNode.appendChild(m)}),d.parentNode&&d.parentNode.replaceChild(p.domNode,d),p.attach()}return p}i.default=h}),(function(r,i,a){var s=this&&this.__extends||(function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,f){p.__proto__=f}||function(p,f){for(var m in f)f.hasOwnProperty(m)&&(p[m]=f[m])};return function(p,f){d(p,f);function m(){this.constructor=p}p.prototype=f===null?Object.create(f):(m.prototype=f.prototype,new m)}})();Object.defineProperty(i,"__esModule",{value:!0});var o=a(12),l=a(31),c=a(17),h=a(1),u=(function(d){s(p,d);function p(f){var m=d.call(this,f)||this;return m.attributes=new l.default(m.domNode),m}return p.formats=function(f){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return f.tagName.toLowerCase()},p.prototype.format=function(f,m){var g=h.query(f);g instanceof o.default?this.attributes.attribute(g,m):m&&g!=null&&(f!==this.statics.blotName||this.formats()[f]!==m)&&this.replaceWith(f,m)},p.prototype.formats=function(){var f=this.attributes.values(),m=this.statics.formats(this.domNode);return m!=null&&(f[this.statics.blotName]=m),f},p.prototype.replaceWith=function(f,m){var g=d.prototype.replaceWith.call(this,f,m);return this.attributes.copy(g),g},p.prototype.update=function(f,m){var g=this;d.prototype.update.call(this,f,m),f.some(function(x){return x.target===g.domNode&&x.type==="attributes"})&&this.attributes.build()},p.prototype.wrap=function(f,m){var g=d.prototype.wrap.call(this,f,m);return g instanceof p&&g.statics.scope===this.statics.scope&&this.attributes.move(g),g},p})(c.default);i.default=u}),(function(r,i,a){var s=this&&this.__extends||(function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var p in d)d.hasOwnProperty(p)&&(u[p]=d[p])};return function(u,d){h(u,d);function p(){this.constructor=u}u.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}})();Object.defineProperty(i,"__esModule",{value:!0});var o=a(30),l=a(1),c=(function(h){s(u,h);function u(){return h!==null&&h.apply(this,arguments)||this}return u.value=function(d){return!0},u.prototype.index=function(d,p){return this.domNode===d||this.domNode.compareDocumentPosition(d)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(p,1):-1},u.prototype.position=function(d,p){var f=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return d>0&&(f+=1),[this.parent.domNode,f]},u.prototype.value=function(){var d;return d={},d[this.statics.blotName]=this.statics.value(this.domNode)||!0,d},u.scope=l.Scope.INLINE_BLOT,u})(o.default);i.default=c}),(function(r,i,a){var s=a(11),o=a(3),l={attributes:{compose:function(h,u,d){typeof h!="object"&&(h={}),typeof u!="object"&&(u={});var p=o(!0,{},u);d||(p=Object.keys(p).reduce(function(m,g){return p[g]!=null&&(m[g]=p[g]),m},{}));for(var f in h)h[f]!==void 0&&u[f]===void 0&&(p[f]=h[f]);return Object.keys(p).length>0?p:void 0},diff:function(h,u){typeof h!="object"&&(h={}),typeof u!="object"&&(u={});var d=Object.keys(h).concat(Object.keys(u)).reduce(function(p,f){return s(h[f],u[f])||(p[f]=u[f]===void 0?null:u[f]),p},{});return Object.keys(d).length>0?d:void 0},transform:function(h,u,d){if(typeof h!="object")return u;if(typeof u=="object"){if(!d)return u;var p=Object.keys(u).reduce(function(f,m){return h[m]===void 0&&(f[m]=u[m]),f},{});return Object.keys(p).length>0?p:void 0}}},iterator:function(h){return new c(h)},length:function(h){return typeof h.delete=="number"?h.delete:typeof h.retain=="number"?h.retain:typeof h.insert=="string"?h.insert.length:1}};function c(h){this.ops=h,this.index=0,this.offset=0}c.prototype.hasNext=function(){return this.peekLength()<1/0},c.prototype.next=function(h){h||(h=1/0);var u=this.ops[this.index];if(u){var d=this.offset,p=l.length(u);if(h>=p-d?(h=p-d,this.index+=1,this.offset=0):this.offset+=h,typeof u.delete=="number")return{delete:h};var f={};return u.attributes&&(f.attributes=u.attributes),typeof u.retain=="number"?f.retain=h:typeof u.insert=="string"?f.insert=u.insert.substr(d,h):f.insert=u.insert,f}else return{retain:1/0}},c.prototype.peek=function(){return this.ops[this.index]},c.prototype.peekLength=function(){return this.ops[this.index]?l.length(this.ops[this.index])-this.offset:1/0},c.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},c.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var h=this.offset,u=this.index,d=this.next(),p=this.ops.slice(this.index);return this.offset=h,this.index=u,[d].concat(p)}else return[]},r.exports=l}),(function(r,i){var a=(function(){function s(g,x){return x!=null&&g instanceof x}var o;try{o=Map}catch{o=function(){}}var l;try{l=Set}catch{l=function(){}}var c;try{c=Promise}catch{c=function(){}}function h(g,x,v,b,j){typeof x=="object"&&(v=x.depth,b=x.prototype,j=x.includeNonEnumerable,x=x.circular);var w=[],S=[],_=typeof gc<"u";typeof x>"u"&&(x=!0),typeof v>"u"&&(v=1/0);function C(E,P){if(E===null)return null;if(P===0)return E;var T,N;if(typeof E!="object")return E;if(s(E,o))T=new o;else if(s(E,l))T=new l;else if(s(E,c))T=new c(function(A,R){E.then(function(F){A(C(F,P-1))},function(F){R(C(F,P-1))})});else if(h.__isArray(E))T=[];else if(h.__isRegExp(E))T=new RegExp(E.source,m(E)),E.lastIndex&&(T.lastIndex=E.lastIndex);else if(h.__isDate(E))T=new Date(E.getTime());else{if(_&&gc.isBuffer(E))return gc.allocUnsafe?T=gc.allocUnsafe(E.length):T=new gc(E.length),E.copy(T),T;s(E,Error)?T=Object.create(E):typeof b>"u"?(N=Object.getPrototypeOf(E),T=Object.create(N)):(T=Object.create(b),N=b)}if(x){var k=w.indexOf(E);if(k!=-1)return S[k];w.push(E),S.push(T)}s(E,o)&&E.forEach(function(A,R){var F=C(R,P-1),q=C(A,P-1);T.set(F,q)}),s(E,l)&&E.forEach(function(A){var R=C(A,P-1);T.add(R)});for(var I in E){var D;N&&(D=Object.getOwnPropertyDescriptor(N,I)),!(D&&D.set==null)&&(T[I]=C(E[I],P-1))}if(Object.getOwnPropertySymbols)for(var O=Object.getOwnPropertySymbols(E),I=0;I<O.length;I++){var $=O[I],U=Object.getOwnPropertyDescriptor(E,$);U&&!U.enumerable&&!j||(T[$]=C(E[$],P-1),U.enumerable||Object.defineProperty(T,$,{enumerable:!1}))}if(j)for(var B=Object.getOwnPropertyNames(E),I=0;I<B.length;I++){var L=B[I],U=Object.getOwnPropertyDescriptor(E,L);U&&U.enumerable||(T[L]=C(E[L],P-1),Object.defineProperty(T,L,{enumerable:!1}))}return T}return C(g,v)}h.clonePrototype=function(x){if(x===null)return null;var v=function(){};return v.prototype=x,new v};function u(g){return Object.prototype.toString.call(g)}h.__objToStr=u;function d(g){return typeof g=="object"&&u(g)==="[object Date]"}h.__isDate=d;function p(g){return typeof g=="object"&&u(g)==="[object Array]"}h.__isArray=p;function f(g){return typeof g=="object"&&u(g)==="[object RegExp]"}h.__isRegExp=f;function m(g){var x="";return g.global&&(x+="g"),g.ignoreCase&&(x+="i"),g.multiline&&(x+="m"),x}return h.__getRegExpFlags=m,h})();typeof r=="object"&&r.exports&&(r.exports=a)}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=(function(){function T(N,k){var I=[],D=!0,O=!1,$=void 0;try{for(var U=N[Symbol.iterator](),B;!(D=(B=U.next()).done)&&(I.push(B.value),!(k&&I.length===k));D=!0);}catch(L){O=!0,$=L}finally{try{!D&&U.return&&U.return()}finally{if(O)throw $}}return I}return function(N,k){if(Array.isArray(N))return N;if(Symbol.iterator in Object(N))return T(N,k);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=(function(){function T(N,k){for(var I=0;I<k.length;I++){var D=k[I];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(N,D.key,D)}}return function(N,k,I){return k&&T(N.prototype,k),I&&T(N,I),N}})(),l=function T(N,k,I){N===null&&(N=Function.prototype);var D=Object.getOwnPropertyDescriptor(N,k);if(D===void 0){var O=Object.getPrototypeOf(N);return O===null?void 0:T(O,k,I)}else{if("value"in D)return D.value;var $=D.get;return $===void 0?void 0:$.call(I)}},c=a(0),h=w(c),u=a(8),d=w(u),p=a(4),f=w(p),m=a(16),g=w(m),x=a(13),v=w(x),b=a(25),j=w(b);function w(T){return T&&T.__esModule?T:{default:T}}function S(T,N){if(!(T instanceof N))throw new TypeError("Cannot call a class as a function")}function _(T,N){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N&&(typeof N=="object"||typeof N=="function")?N:T}function C(T,N){if(typeof N!="function"&&N!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof N);T.prototype=Object.create(N&&N.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),N&&(Object.setPrototypeOf?Object.setPrototypeOf(T,N):T.__proto__=N)}function E(T){return T instanceof f.default||T instanceof p.BlockEmbed}var P=(function(T){C(N,T);function N(k,I){S(this,N);var D=_(this,(N.__proto__||Object.getPrototypeOf(N)).call(this,k));return D.emitter=I.emitter,Array.isArray(I.whitelist)&&(D.whitelist=I.whitelist.reduce(function(O,$){return O[$]=!0,O},{})),D.domNode.addEventListener("DOMNodeInserted",function(){}),D.optimize(),D.enable(),D}return o(N,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(I,D){var O=this.line(I),$=s(O,2),U=$[0],B=$[1],L=this.line(I+D),A=s(L,1),R=A[0];if(l(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"deleteAt",this).call(this,I,D),R!=null&&U!==R&&B>0){if(U instanceof p.BlockEmbed||R instanceof p.BlockEmbed){this.optimize();return}if(U instanceof v.default){var F=U.newlineIndex(U.length(),!0);if(F>-1&&(U=U.split(F+1),U===R)){this.optimize();return}}else if(R instanceof v.default){var q=R.newlineIndex(0);q>-1&&R.split(q+1)}var V=R.children.head instanceof g.default?null:R.children.head;U.moveChildren(R,V),U.remove()}this.optimize()}},{key:"enable",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",I)}},{key:"formatAt",value:function(I,D,O,$){this.whitelist!=null&&!this.whitelist[O]||(l(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"formatAt",this).call(this,I,D,O,$),this.optimize())}},{key:"insertAt",value:function(I,D,O){if(!(O!=null&&this.whitelist!=null&&!this.whitelist[D])){if(I>=this.length())if(O==null||h.default.query(D,h.default.Scope.BLOCK)==null){var $=h.default.create(this.statics.defaultChild);this.appendChild($),O==null&&D.endsWith(`
58`)&&(D=D.slice(0,-1)),$.insertAt(0,D,O)}else{var U=h.default.create(D,O);this.appendChild(U)}else l(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"insertAt",this).call(this,I,D,O);this.optimize()}}},{key:"insertBefore",value:function(I,D){if(I.statics.scope===h.default.Scope.INLINE_BLOT){var O=h.default.create(this.statics.defaultChild);O.appendChild(I),I=O}l(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"insertBefore",this).call(this,I,D)}},{key:"leaf",value:function(I){return this.path(I).pop()||[null,-1]}},{key:"line",value:function(I){return I===this.length()?this.line(I-1):this.descendant(E,I)}},{key:"lines",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,O=function $(U,B,L){var A=[],R=L;return U.children.forEachAt(B,L,function(F,q,V){E(F)?A.push(F):F instanceof h.default.Container&&(A=A.concat($(F,q,R))),R-=V}),A};return O(this,I,D)}},{key:"optimize",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(l(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"optimize",this).call(this,I,D),I.length>0&&this.emitter.emit(d.default.events.SCROLL_OPTIMIZE,I,D))}},{key:"path",value:function(I){return l(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"path",this).call(this,I).slice(1)}},{key:"update",value:function(I){if(this.batch!==!0){var D=d.default.sources.USER;typeof I=="string"&&(D=I),Array.isArray(I)||(I=this.observer.takeRecords()),I.length>0&&this.emitter.emit(d.default.events.SCROLL_BEFORE_UPDATE,D,I),l(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"update",this).call(this,I.concat([])),I.length>0&&this.emitter.emit(d.default.events.SCROLL_UPDATE,D,I)}}}]),N})(h.default.Scroll);P.blotName="scroll",P.className="ql-editor",P.tagName="DIV",P.defaultChild="block",P.allowedChildren=[f.default,p.BlockEmbed,j.default],i.default=P}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0}),i.SHORTKEY=i.default=void 0;var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},o=(function(){function M(W,K){var z=[],Y=!0,ie=!1,ne=void 0;try{for(var ve=W[Symbol.iterator](),pe;!(Y=(pe=ve.next()).done)&&(z.push(pe.value),!(K&&z.length===K));Y=!0);}catch(be){ie=!0,ne=be}finally{try{!Y&&ve.return&&ve.return()}finally{if(ie)throw ne}}return z}return function(W,K){if(Array.isArray(W))return W;if(Symbol.iterator in Object(W))return M(W,K);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=(function(){function M(W,K){for(var z=0;z<K.length;z++){var Y=K[z];Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y&&(Y.writable=!0),Object.defineProperty(W,Y.key,Y)}}return function(W,K,z){return K&&M(W.prototype,K),z&&M(W,z),W}})(),c=a(21),h=T(c),u=a(11),d=T(u),p=a(3),f=T(p),m=a(2),g=T(m),x=a(20),v=T(x),b=a(0),j=T(b),w=a(5),S=T(w),_=a(10),C=T(_),E=a(9),P=T(E);function T(M){return M&&M.__esModule?M:{default:M}}function N(M,W,K){return W in M?Object.defineProperty(M,W,{value:K,enumerable:!0,configurable:!0,writable:!0}):M[W]=K,M}function k(M,W){if(!(M instanceof W))throw new TypeError("Cannot call a class as a function")}function I(M,W){if(!M)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return W&&(typeof W=="object"||typeof W=="function")?W:M}function D(M,W){if(typeof W!="function"&&W!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof W);M.prototype=Object.create(W&&W.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}),W&&(Object.setPrototypeOf?Object.setPrototypeOf(M,W):M.__proto__=W)}var O=(0,C.default)("quill:keyboard"),$=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",U=(function(M){D(W,M),l(W,null,[{key:"match",value:function(z,Y){return Y=X(Y),["altKey","ctrlKey","metaKey","shiftKey"].some(function(ie){return!!Y[ie]!==z[ie]&&Y[ie]!==null})?!1:Y.key===(z.which||z.keyCode)}}]);function W(K,z){k(this,W);var Y=I(this,(W.__proto__||Object.getPrototypeOf(W)).call(this,K,z));return Y.bindings={},Object.keys(Y.options.bindings).forEach(function(ie){ie==="list autofill"&&K.scroll.whitelist!=null&&!K.scroll.whitelist.list||Y.options.bindings[ie]&&Y.addBinding(Y.options.bindings[ie])}),Y.addBinding({key:W.keys.ENTER,shiftKey:null},F),Y.addBinding({key:W.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(Y.addBinding({key:W.keys.BACKSPACE},{collapsed:!0},L),Y.addBinding({key:W.keys.DELETE},{collapsed:!0},A)):(Y.addBinding({key:W.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},L),Y.addBinding({key:W.keys.DELETE},{collapsed:!0,suffix:/^.?$/},A)),Y.addBinding({key:W.keys.BACKSPACE},{collapsed:!1},R),Y.addBinding({key:W.keys.DELETE},{collapsed:!1},R),Y.addBinding({key:W.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},L),Y.listen(),Y}return l(W,[{key:"addBinding",value:function(z){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ie=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ne=X(z);if(ne==null||ne.key==null)return O.warn("Attempted to add invalid keyboard binding",ne);typeof Y=="function"&&(Y={handler:Y}),typeof ie=="function"&&(ie={handler:ie}),ne=(0,f.default)(ne,Y,ie),this.bindings[ne.key]=this.bindings[ne.key]||[],this.bindings[ne.key].push(ne)}},{key:"listen",value:function(){var z=this;this.quill.root.addEventListener("keydown",function(Y){if(!Y.defaultPrevented){var ie=Y.which||Y.keyCode,ne=(z.bindings[ie]||[]).filter(function(Ve){return W.match(Y,Ve)});if(ne.length!==0){var ve=z.quill.getSelection();if(!(ve==null||!z.quill.hasFocus())){var pe=z.quill.getLine(ve.index),be=o(pe,2),ye=be[0],ke=be[1],fe=z.quill.getLeaf(ve.index),se=o(fe,2),ge=se[0],De=se[1],ae=ve.length===0?[ge,De]:z.quill.getLeaf(ve.index+ve.length),Q=o(ae,2),ee=Q[0],oe=Q[1],Pe=ge instanceof j.default.Text?ge.value().slice(0,De):"",Fe=ee instanceof j.default.Text?ee.value().slice(oe):"",Ie={collapsed:ve.length===0,empty:ve.length===0&&ye.length()<=1,format:z.quill.getFormat(ve),offset:ke,prefix:Pe,suffix:Fe},Re=ne.some(function(Ve){if(Ve.collapsed!=null&&Ve.collapsed!==Ie.collapsed||Ve.empty!=null&&Ve.empty!==Ie.empty||Ve.offset!=null&&Ve.offset!==Ie.offset)return!1;if(Array.isArray(Ve.format)){if(Ve.format.every(function(Xe){return Ie.format[Xe]==null}))return!1}else if(s(Ve.format)==="object"&&!Object.keys(Ve.format).every(function(Xe){return Ve.format[Xe]===!0?Ie.format[Xe]!=null:Ve.format[Xe]===!1?Ie.format[Xe]==null:(0,d.default)(Ve.format[Xe],Ie.format[Xe])}))return!1;return Ve.prefix!=null&&!Ve.prefix.test(Ie.prefix)||Ve.suffix!=null&&!Ve.suffix.test(Ie.suffix)?!1:Ve.handler.call(z,ve,Ie)!==!0});Re&&Y.preventDefault()}}}})}}]),W})(P.default);U.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},U.DEFAULTS={bindings:{bold:V("bold"),italic:V("italic"),underline:V("underline"),indent:{key:U.keys.TAB,format:["blockquote","indent","list"],handler:function(W,K){if(K.collapsed&&K.offset!==0)return!0;this.quill.format("indent","+1",S.default.sources.USER)}},outdent:{key:U.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(W,K){if(K.collapsed&&K.offset!==0)return!0;this.quill.format("indent","-1",S.default.sources.USER)}},"outdent backspace":{key:U.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(W,K){K.format.indent!=null?this.quill.format("indent","-1",S.default.sources.USER):K.format.list!=null&&this.quill.format("list",!1,S.default.sources.USER)}},"indent code-block":q(!0),"outdent code-block":q(!1),"remove tab":{key:U.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(W){this.quill.deleteText(W.index-1,1,S.default.sources.USER)}},tab:{key:U.keys.TAB,handler:function(W){this.quill.history.cutoff();var K=new g.default().retain(W.index).delete(W.length).insert("	");this.quill.updateContents(K,S.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(W.index+1,S.default.sources.SILENT)}},"list empty enter":{key:U.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(W,K){this.quill.format("list",!1,S.default.sources.USER),K.format.indent&&this.quill.format("indent",!1,S.default.sources.USER)}},"checklist enter":{key:U.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(W){var K=this.quill.getLine(W.index),z=o(K,2),Y=z[0],ie=z[1],ne=(0,f.default)({},Y.formats(),{list:"checked"}),ve=new g.default().retain(W.index).insert(`
59`,ne).retain(Y.length()-ie-1).retain(1,{list:"unchecked"});this.quill.updateContents(ve,S.default.sources.USER),this.quill.setSelection(W.index+1,S.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:U.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(W,K){var z=this.quill.getLine(W.index),Y=o(z,2),ie=Y[0],ne=Y[1],ve=new g.default().retain(W.index).insert(`
60`,K.format).retain(ie.length()-ne-1).retain(1,{header:null});this.quill.updateContents(ve,S.default.sources.USER),this.quill.setSelection(W.index+1,S.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(W,K){var z=K.prefix.length,Y=this.quill.getLine(W.index),ie=o(Y,2),ne=ie[0],ve=ie[1];if(ve>z)return!0;var pe=void 0;switch(K.prefix.trim()){case"[]":case"[ ]":pe="unchecked";break;case"[x]":pe="checked";break;case"-":case"*":pe="bullet";break;default:pe="ordered"}this.quill.insertText(W.index," ",S.default.sources.USER),this.quill.history.cutoff();var be=new g.default().retain(W.index-ve).delete(z+1).retain(ne.length()-2-ve).retain(1,{list:pe});this.quill.updateContents(be,S.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(W.index-z,S.default.sources.SILENT)}},"code exit":{key:U.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(W){var K=this.quill.getLine(W.index),z=o(K,2),Y=z[0],ie=z[1],ne=new g.default().retain(W.index+Y.length()-ie-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(ne,S.default.sources.USER)}},"embed left":B(U.keys.LEFT,!1),"embed left shift":B(U.keys.LEFT,!0),"embed right":B(U.keys.RIGHT,!1),"embed right shift":B(U.keys.RIGHT,!0)}};function B(M,W){var K,z=M===U.keys.LEFT?"prefix":"suffix";return K={key:M,shiftKey:W,altKey:null},N(K,z,/^$/),N(K,"handler",function(ie){var ne=ie.index;M===U.keys.RIGHT&&(ne+=ie.length+1);var ve=this.quill.getLeaf(ne),pe=o(ve,1),be=pe[0];return be instanceof j.default.Embed?(M===U.keys.LEFT?W?this.quill.setSelection(ie.index-1,ie.length+1,S.default.sources.USER):this.quill.setSelection(ie.index-1,S.default.sources.USER):W?this.quill.setSelection(ie.index,ie.length+1,S.default.sources.USER):this.quill.setSelection(ie.index+ie.length+1,S.default.sources.USER),!1):!0}),K}function L(M,W){if(!(M.index===0||this.quill.getLength()<=1)){var K=this.quill.getLine(M.index),z=o(K,1),Y=z[0],ie={};if(W.offset===0){var ne=this.quill.getLine(M.index-1),ve=o(ne,1),pe=ve[0];if(pe!=null&&pe.length()>1){var be=Y.formats(),ye=this.quill.getFormat(M.index-1,1);ie=v.default.attributes.diff(be,ye)||{}}}var ke=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(W.prefix)?2:1;this.quill.deleteText(M.index-ke,ke,S.default.sources.USER),Object.keys(ie).length>0&&this.quill.formatLine(M.index-ke,ke,ie,S.default.sources.USER),this.quill.focus()}}function A(M,W){var K=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(W.suffix)?2:1;if(!(M.index>=this.quill.getLength()-K)){var z={},Y=0,ie=this.quill.getLine(M.index),ne=o(ie,1),ve=ne[0];if(W.offset>=ve.length()-1){var pe=this.quill.getLine(M.index+1),be=o(pe,1),ye=be[0];if(ye){var ke=ve.formats(),fe=this.quill.getFormat(M.index,1);z=v.default.attributes.diff(ke,fe)||{},Y=ye.length()}}this.quill.deleteText(M.index,K,S.default.sources.USER),Object.keys(z).length>0&&this.quill.formatLine(M.index+Y-1,K,z,S.default.sources.USER)}}function R(M){var W=this.quill.getLines(M),K={};if(W.length>1){var z=W[0].formats(),Y=W[W.length-1].formats();K=v.default.attributes.diff(Y,z)||{}}this.quill.deleteText(M,S.default.sources.USER),Object.keys(K).length>0&&this.quill.formatLine(M.index,1,K,S.default.sources.USER),this.quill.setSelection(M.index,S.default.sources.SILENT),this.quill.focus()}function F(M,W){var K=this;M.length>0&&this.quill.scroll.deleteAt(M.index,M.length);var z=Object.keys(W.format).reduce(function(Y,ie){return j.default.query(ie,j.default.Scope.BLOCK)&&!Array.isArray(W.format[ie])&&(Y[ie]=W.format[ie]),Y},{});this.quill.insertText(M.index,`
61`,z,S.default.sources.USER),this.quill.setSelection(M.index+1,S.default.sources.SILENT),this.quill.focus(),Object.keys(W.format).forEach(function(Y){z[Y]==null&&(Array.isArray(W.format[Y])||Y!=="link"&&K.quill.format(Y,W.format[Y],S.default.sources.USER))})}function q(M){return{key:U.keys.TAB,shiftKey:!M,format:{"code-block":!0},handler:function(K){var z=j.default.query("code-block"),Y=K.index,ie=K.length,ne=this.quill.scroll.descendant(z,Y),ve=o(ne,2),pe=ve[0],be=ve[1];if(pe!=null){var ye=this.quill.getIndex(pe),ke=pe.newlineIndex(be,!0)+1,fe=pe.newlineIndex(ye+be+ie),se=pe.domNode.textContent.slice(ke,fe).split(`
62`);be=0,se.forEach(function(ge,De){M?(pe.insertAt(ke+be,z.TAB),be+=z.TAB.length,De===0?Y+=z.TAB.length:ie+=z.TAB.length):ge.startsWith(z.TAB)&&(pe.deleteAt(ke+be,z.TAB.length),be-=z.TAB.length,De===0?Y-=z.TAB.length:ie-=z.TAB.length),be+=ge.length+1}),this.quill.update(S.default.sources.USER),this.quill.setSelection(Y,ie,S.default.sources.SILENT)}}}}function V(M){return{key:M[0].toUpperCase(),shortKey:!0,handler:function(K,z){this.quill.format(M,!z.format[M],S.default.sources.USER)}}}function X(M){if(typeof M=="string"||typeof M=="number")return X({key:M});if((typeof M>"u"?"undefined":s(M))==="object"&&(M=(0,h.default)(M,!1)),typeof M.key=="string")if(U.keys[M.key.toUpperCase()]!=null)M.key=U.keys[M.key.toUpperCase()];else if(M.key.length===1)M.key=M.key.toUpperCase().charCodeAt(0);else return null;return M.shortKey&&(M[$]=M.shortKey,delete M.shortKey),M}i.default=U,i.SHORTKEY=$}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=(function(){function v(b,j){var w=[],S=!0,_=!1,C=void 0;try{for(var E=b[Symbol.iterator](),P;!(S=(P=E.next()).done)&&(w.push(P.value),!(j&&w.length===j));S=!0);}catch(T){_=!0,C=T}finally{try{!S&&E.return&&E.return()}finally{if(_)throw C}}return w}return function(b,j){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return v(b,j);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=function v(b,j,w){b===null&&(b=Function.prototype);var S=Object.getOwnPropertyDescriptor(b,j);if(S===void 0){var _=Object.getPrototypeOf(b);return _===null?void 0:v(_,j,w)}else{if("value"in S)return S.value;var C=S.get;return C===void 0?void 0:C.call(w)}},l=(function(){function v(b,j){for(var w=0;w<j.length;w++){var S=j[w];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(b,S.key,S)}}return function(b,j,w){return j&&v(b.prototype,j),w&&v(b,w),b}})(),c=a(0),h=p(c),u=a(7),d=p(u);function p(v){return v&&v.__esModule?v:{default:v}}function f(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")}function m(v,b){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:v}function g(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);v.prototype=Object.create(b&&b.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(v,b):v.__proto__=b)}var x=(function(v){g(b,v),l(b,null,[{key:"value",value:function(){}}]);function b(j,w){f(this,b);var S=m(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,j));return S.selection=w,S.textNode=document.createTextNode(b.CONTENTS),S.domNode.appendChild(S.textNode),S._length=0,S}return l(b,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(w,S){if(this._length!==0)return o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"format",this).call(this,w,S);for(var _=this,C=0;_!=null&&_.statics.scope!==h.default.Scope.BLOCK_BLOT;)C+=_.offset(_.parent),_=_.parent;_!=null&&(this._length=b.CONTENTS.length,_.optimize(),_.formatAt(C,b.CONTENTS.length,w,S),this._length=0)}},{key:"index",value:function(w,S){return w===this.textNode?0:o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"index",this).call(this,w,S)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var w=this.textNode,S=this.selection.getNativeRange(),_=void 0,C=void 0,E=void 0;if(S!=null&&S.start.node===w&&S.end.node===w){var P=[w,S.start.offset,S.end.offset];_=P[0],C=P[1],E=P[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==b.CONTENTS){var T=this.textNode.data.split(b.CONTENTS).join("");this.next instanceof d.default?(_=this.next.domNode,this.next.insertAt(0,T),this.textNode.data=b.CONTENTS):(this.textNode.data=T,this.parent.insertBefore(h.default.create(this.textNode),this),this.textNode=document.createTextNode(b.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),C!=null){var N=[C,E].map(function(I){return Math.max(0,Math.min(_.data.length,I-1))}),k=s(N,2);return C=k[0],E=k[1],{startNode:_,startOffset:C,endNode:_,endOffset:E}}}}},{key:"update",value:function(w,S){var _=this;if(w.some(function(E){return E.type==="characterData"&&E.target===_.textNode})){var C=this.restore();C&&(S.range=C)}}},{key:"value",value:function(){return""}}]),b})(h.default.Embed);x.blotName="cursor",x.className="ql-cursor",x.tagName="span",x.CONTENTS="\uFEFF",i.default=x}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=a(0),o=h(s),l=a(4),c=h(l);function h(m){return m&&m.__esModule?m:{default:m}}function u(m,g){if(!(m instanceof g))throw new TypeError("Cannot call a class as a function")}function d(m,g){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:m}function p(m,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);m.prototype=Object.create(g&&g.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(m,g):m.__proto__=g)}var f=(function(m){p(g,m);function g(){return u(this,g),d(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return g})(o.default.Container);f.allowedChildren=[c.default,l.BlockEmbed,f],i.default=f}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0}),i.ColorStyle=i.ColorClass=i.ColorAttributor=void 0;var s=(function(){function x(v,b){for(var j=0;j<b.length;j++){var w=b[j];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(v,w.key,w)}}return function(v,b,j){return b&&x(v.prototype,b),j&&x(v,j),v}})(),o=function x(v,b,j){v===null&&(v=Function.prototype);var w=Object.getOwnPropertyDescriptor(v,b);if(w===void 0){var S=Object.getPrototypeOf(v);return S===null?void 0:x(S,b,j)}else{if("value"in w)return w.value;var _=w.get;return _===void 0?void 0:_.call(j)}},l=a(0),c=h(l);function h(x){return x&&x.__esModule?x:{default:x}}function u(x,v){if(!(x instanceof v))throw new TypeError("Cannot call a class as a function")}function d(x,v){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:x}function p(x,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);x.prototype=Object.create(v&&v.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(x,v):x.__proto__=v)}var f=(function(x){p(v,x);function v(){return u(this,v),d(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return s(v,[{key:"value",value:function(j){var w=o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"value",this).call(this,j);return w.startsWith("rgb(")?(w=w.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+w.split(",").map(function(S){return("00"+parseInt(S).toString(16)).slice(-2)}).join("")):w}}]),v})(c.default.Attributor.Style),m=new c.default.Attributor.Class("color","ql-color",{scope:c.default.Scope.INLINE}),g=new f("color","color",{scope:c.default.Scope.INLINE});i.ColorAttributor=f,i.ColorClass=m,i.ColorStyle=g}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0}),i.sanitize=i.default=void 0;var s=(function(){function g(x,v){for(var b=0;b<v.length;b++){var j=v[b];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(x,j.key,j)}}return function(x,v,b){return v&&g(x.prototype,v),b&&g(x,b),x}})(),o=function g(x,v,b){x===null&&(x=Function.prototype);var j=Object.getOwnPropertyDescriptor(x,v);if(j===void 0){var w=Object.getPrototypeOf(x);return w===null?void 0:g(w,v,b)}else{if("value"in j)return j.value;var S=j.get;return S===void 0?void 0:S.call(b)}},l=a(6),c=h(l);function h(g){return g&&g.__esModule?g:{default:g}}function u(g,x){if(!(g instanceof x))throw new TypeError("Cannot call a class as a function")}function d(g,x){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:g}function p(g,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);g.prototype=Object.create(x&&x.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(g,x):g.__proto__=x)}var f=(function(g){p(x,g);function x(){return u(this,x),d(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return s(x,[{key:"format",value:function(b,j){if(b!==this.statics.blotName||!j)return o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"format",this).call(this,b,j);j=this.constructor.sanitize(j),this.domNode.setAttribute("href",j)}}],[{key:"create",value:function(b){var j=o(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,b);return b=this.sanitize(b),j.setAttribute("href",b),j.setAttribute("rel","noopener noreferrer"),j.setAttribute("target","_blank"),j}},{key:"formats",value:function(b){return b.getAttribute("href")}},{key:"sanitize",value:function(b){return m(b,this.PROTOCOL_WHITELIST)?b:this.SANITIZED_URL}}]),x})(c.default);f.blotName="link",f.tagName="A",f.SANITIZED_URL="about:blank",f.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function m(g,x){var v=document.createElement("a");v.href=g;var b=v.href.slice(0,v.href.indexOf(":"));return x.indexOf(b)>-1}i.default=f,i.sanitize=m}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(x){return typeof x}:function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x},o=(function(){function x(v,b){for(var j=0;j<b.length;j++){var w=b[j];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(v,w.key,w)}}return function(v,b,j){return b&&x(v.prototype,b),j&&x(v,j),v}})(),l=a(23),c=d(l),h=a(107),u=d(h);function d(x){return x&&x.__esModule?x:{default:x}}function p(x,v){if(!(x instanceof v))throw new TypeError("Cannot call a class as a function")}var f=0;function m(x,v){x.setAttribute(v,x.getAttribute(v)!=="true")}var g=(function(){function x(v){var b=this;p(this,x),this.select=v,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){b.togglePicker()}),this.label.addEventListener("keydown",function(j){switch(j.keyCode){case c.default.keys.ENTER:b.togglePicker();break;case c.default.keys.ESCAPE:b.escape(),j.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return o(x,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),m(this.label,"aria-expanded"),m(this.options,"aria-hidden")}},{key:"buildItem",value:function(b){var j=this,w=document.createElement("span");return w.tabIndex="0",w.setAttribute("role","button"),w.classList.add("ql-picker-item"),b.hasAttribute("value")&&w.setAttribute("data-value",b.getAttribute("value")),b.textContent&&w.setAttribute("data-label",b.textContent),w.addEventListener("click",function(){j.selectItem(w,!0)}),w.addEventListener("keydown",function(S){switch(S.keyCode){case c.default.keys.ENTER:j.selectItem(w,!0),S.preventDefault();break;case c.default.keys.ESCAPE:j.escape(),S.preventDefault();break}}),w}},{key:"buildLabel",value:function(){var b=document.createElement("span");return b.classList.add("ql-picker-label"),b.innerHTML=u.default,b.tabIndex="0",b.setAttribute("role","button"),b.setAttribute("aria-expanded","fal
62se"),this.container.appendChild(b),b}},{key:"buildOptions",value:function(){var b=this,j=document.createElement("span");j.classList.add("ql-picker-options"),j.setAttribute("aria-hidden","true"),j.tabIndex="-1",j.id="ql-picker-options-"+f,f+=1,this.label.setAttribute("aria-controls",j.id),this.options=j,[].slice.call(this.select.options).forEach(function(w){var S=b.buildItem(w);j.appendChild(S),w.selected===!0&&b.selectItem(S)}),this.container.appendChild(j)}},{key:"buildPicker",value:function(){var b=this;[].slice.call(this.select.attributes).forEach(function(j){b.container.setAttribute(j.name,j.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var b=this;this.close(),setTimeout(function(){return b.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(b){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,w=this.container.querySelector(".ql-selected");if(b!==w&&(w?.classList.remove("ql-selected"),b!=null&&(b.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(b.parentNode.children,b),b.hasAttribute("data-value")?this.label.setAttribute("data-value",b.getAttribute("data-value")):this.label.removeAttribute("data-value"),b.hasAttribute("data-label")?this.label.setAttribute("data-label",b.getAttribute("data-label")):this.label.removeAttribute("data-label"),j))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":s(Event))==="object"){var S=document.createEvent("Event");S.initEvent("change",!0,!0),this.select.dispatchEvent(S)}this.close()}}},{key:"update",value:function(){var b=void 0;if(this.select.selectedIndex>-1){var j=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];b=this.select.options[this.select.selectedIndex],this.selectItem(j)}else this.selectItem(null);var w=b!=null&&b!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",w)}}]),x})();i.default=g}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=a(0),o=O(s),l=a(5),c=O(l),h=a(4),u=O(h),d=a(16),p=O(d),f=a(25),m=O(f),g=a(24),x=O(g),v=a(35),b=O(v),j=a(6),w=O(j),S=a(22),_=O(S),C=a(7),E=O(C),P=a(55),T=O(P),N=a(42),k=O(N),I=a(23),D=O(I);function O($){return $&&$.__esModule?$:{default:$}}c.default.register({"blots/block":u.default,"blots/block/embed":h.BlockEmbed,"blots/break":p.default,"blots/container":m.default,"blots/cursor":x.default,"blots/embed":b.default,"blots/inline":w.default,"blots/scroll":_.default,"blots/text":E.default,"modules/clipboard":T.default,"modules/history":k.default,"modules/keyboard":D.default}),o.default.register(u.default,p.default,x.default,w.default,_.default,E.default),i.default=c.default}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=a(1),o=(function(){function l(c){this.domNode=c,this.domNode[s.DATA_KEY]={blot:this}}return Object.defineProperty(l.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),l.create=function(c){if(this.tagName==null)throw new s.ParchmentError("Blot definition missing tagName");var h;return Array.isArray(this.tagName)?(typeof c=="string"&&(c=c.toUpperCase(),parseInt(c).toString()===c&&(c=parseInt(c))),typeof c=="number"?h=document.createElement(this.tagName[c-1]):this.tagName.indexOf(c)>-1?h=document.createElement(c):h=document.createElement(this.tagName[0])):h=document.createElement(this.tagName),this.className&&h.classList.add(this.className),h},l.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},l.prototype.clone=function(){var c=this.domNode.cloneNode(!1);return s.create(c)},l.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[s.DATA_KEY]},l.prototype.deleteAt=function(c,h){var u=this.isolate(c,h);u.remove()},l.prototype.formatAt=function(c,h,u,d){var p=this.isolate(c,h);if(s.query(u,s.Scope.BLOT)!=null&&d)p.wrap(u,d);else if(s.query(u,s.Scope.ATTRIBUTE)!=null){var f=s.create(this.statics.scope);p.wrap(f),f.format(u,d)}},l.prototype.insertAt=function(c,h,u){var d=u==null?s.create("text",h):s.create(h,u),p=this.split(c);this.parent.insertBefore(d,p)},l.prototype.insertInto=function(c,h){h===void 0&&(h=null),this.parent!=null&&this.parent.children.remove(this);var u=null;
vendor: 95,028 bytes, lines 62-72
62c.children.insertBefore(this,h),h!=null&&(u=h.domNode),(this.domNode.parentNode!=c.domNode||this.domNode.nextSibling!=u)&&c.domNode.insertBefore(this.domNode,u),this.parent=c,this.attach()},l.prototype.isolate=function(c,h){var u=this.split(c);return u.split(h),u},l.prototype.length=function(){return 1},l.prototype.offset=function(c){return c===void 0&&(c=this.parent),this.parent==null||this==c?0:this.parent.children.offset(this)+this.parent.offset(c)},l.prototype.optimize=function(c){this.domNode[s.DATA_KEY]!=null&&delete this.domNode[s.DATA_KEY].mutations},l.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},l.prototype.replace=function(c){c.parent!=null&&(c.parent.insertBefore(this,c.next),c.remove())},l.prototype.replaceWith=function(c,h){var u=typeof c=="string"?s.create(c,h):c;return u.replace(this),u},l.prototype.split=function(c,h){return c===0?this:this.next},l.prototype.update=function(c,h){},l.prototype.wrap=function(c,h){var u=typeof c=="string"?s.create(c,h):c;return this.parent!=null&&this.parent.insertBefore(u,this.next),u.appendChild(this),u},l.blotName="abstract",l})();i.default=o}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=a(12),o=a(32),l=a(33),c=a(1),h=(function(){function u(d){this.attributes={},this.domNode=d,this.build()}return u.prototype.attribute=function(d,p){p?d.add(this.domNode,p)&&(d.value(this.domNode)!=null?this.attributes[d.attrName]=d:delete this.attributes[d.attrName]):(d.remove(this.domNode),delete this.attributes[d.attrName])},u.prototype.build=function(){var d=this;this.attributes={};var p=s.default.keys(this.domNode),f=o.default.keys(this.domNode),m=l.default.keys(this.domNode);p.concat(f).concat(m).forEach(function(g){var x=c.query(g,c.Scope.ATTRIBUTE);x instanceof s.default&&(d.attributes[x.attrName]=x)})},u.prototype.copy=function(d){var p=this;Object.keys(this.attributes).forEach(function(f){var m=p.attributes[f].value(p.domNode);d.format(f,m)})},u.prototype.move=function(d){var p=this;this.copy(d),Object.keys(this.attributes).forEach(function(f){p.attributes[f].remove(p.domNode)}),this.attributes={}},u.prototype.values=function(){var d=this;return Object.keys(this.attributes).reduce(function(p,f){return p[f]=d.attributes[f].value(d.domNode),p},{})},u})();i.default=h}),(function(r,i,a){var s=this&&this.__extends||(function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var p in d)d.hasOwnProperty(p)&&(u[p]=d[p])};return function(u,d){h(u,d);function p(){this.constructor=u}u.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}})();Object.defineProperty(i,"__esModule",{value:!0});var o=a(12);function l(h,u){var d=h.getAttribute("class")||"";return d.split(/\s+/).filter(function(p){return p.indexOf(u+"-")===0})}var c=(function(h){s(u,h);function u(){return h!==null&&h.apply(this,arguments)||this}return u.keys=function(d){return(d.getAttribute("class")||"").split(/\s+/).map(function(p){return p.split("-").slice(0,-1).join("-")})},u.prototype.add=function(d,p){return this.canAdd(d,p)?(this.remove(d),d.classList.add(this.keyName+"-"+p),!0):!1},u.prototype.remove=function(d){var p=l(d,this.keyName);p.forEach(function(f){d.classList.remove(f)}),d.classList.length===0&&d.removeAttribute("class")},u.prototype.value=function(d){var p=l(d,this.keyName)[0]||"",f=p.slice(this.keyName.length+1);return this.canAdd(d,f)?f:""},u})(o.default);i.default=c}),(function(r,i,a){var s=this&&this.__extends||(function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var p in d)d.hasOwnProperty(p)&&(u[p]=d[p])};return function(u,d){h(u,d);function p(){this.constructor=u}u.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}})();Object.defineProperty(i,"__esModule",{value:!0});var o=a(12);function l(h){var u=h.split("-"),d=u.slice(1).map(function(p){return p[0].toUpperCase()+p.slice(1)}).join("");return u[0]+d}var c=(function(h){s(u,h);function u(){return h!==null&&h.apply(this,arguments)||this}return u.keys=function(d){return(d.getAttribute("style")||"").split(";").map(function(p){var f=p.split(":");return f[0].trim()})},u.prototype.add=function(d,p){return this.canAdd(d,p)?(d.style[l(this.keyName)]=p,!0):!1},u.prototype.remove=function(d){d.style[l(this.keyName)]="",d.getAttribute("style")||d.removeAttribute("style")},u.prototype.value=function(d){var p=d.style[l(this.keyName)];return this.canAdd(d,p)?p:""},u})(o.default);i.default=c}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=(function(){function c(h,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,p.key,p)}}return function(h,u,d){return u&&c(h.prototype,u),d&&c(h,d),h}})();function o(c,h){if(!(c instanceof h))throw new TypeError("Cannot call a class as a function")}var l=(function(){function c(h,u){o(this,c),this.quill=h,this.options=u,this.modules={}}return s(c,[{key:"init",value:function(){var u=this;Object.keys(this.options.modules).forEach(function(d){u.modules[d]==null&&u.addModule(d)})}},{key:"addModule",value:function(u){var d=this.quill.constructor.import("modules/"+u);return this.modules[u]=new d(this.quill,this.options.modules[u]||{}),this.modules[u]}}]),c})();l.DEFAULTS={modules:{}},l.themes={default:l},i.default=l}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=(function(){function v(b,j){for(var w=0;w<j.length;w++){var S=j[w];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(b,S.key,S)}}return function(b,j,w){return j&&v(b.prototype,j),w&&v(b,w),b}})(),o=function v(b,j,w){b===null&&(b=Function.prototype);var S=Object.getOwnPropertyDescriptor(b,j);if(S===void 0){var _=Object.getPrototypeOf(b);return _===null?void 0:v(_,j,w)}else{if("value"in S)return S.value;var C=S.get;return C===void 0?void 0:C.call(w)}},l=a(0),c=d(l),h=a(7),u=d(h);function d(v){return v&&v.__esModule?v:{default:v}}function p(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")}function f(v,b){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:v}function m(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);v.prototype=Object.create(b&&b.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(v,b):v.__proto__=b)}var g="\uFEFF",x=(function(v){m(b,v);function b(j){p(this,b);var w=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,j));return w.contentNode=document.createElement("span"),w.contentNode.setAttribute("contenteditable",!1),[].slice.call(w.domNode.childNodes).forEach(function(S){w.contentNode.appendChild(S)}),w.leftGuard=document.createTextNode(g),w.rightGuard=document.createTextNode(g),w.domNode.appendChild(w.leftGuard),w.domNode.appendChild(w.contentNode),w.domNode.appendChild(w.rightGuard),w}return s(b,[{key:"index",value:function(w,S){return w===this.leftGuard?0:w===this.rightGuard?1:o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"index",this).call(this,w,S)}},{key:"restore",value:function(w){var S=void 0,_=void 0,C=w.data.split(g).join("");if(w===this.leftGuard)if(this.prev instanceof u.default){var E=this.prev.length();this.prev.insertAt(E,C),S={startNode:this.prev.domNode,startOffset:E+C.length}}else _=document.createTextNode(C),this.parent.insertBefore(c.default.create(_),this),S={startNode:_,startOffset:C.length};else w===this.rightGuard&&(this.next instanceof u.default?(this.next.insertAt(0,C),S={startNode:this.next.domNode,startOffset:C.length}):(_=document.createTextNode(C),this.parent.insertBefore(c.default.create(_),this.next),S={startNode:_,startOffset:C.length}));return w.data=g,S}},{key:"update",value:function(w,S){var _=this;w.forEach(function(C){if(C.type==="characterData"&&(C.target===_.leftGuard||C.target===_.rightGuard)){var E=_.restore(C.target);E&&(S.range=E)}})}}]),b})(c.default.Embed);i.default=x}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0}),i.AlignStyle=i.AlignClass=i.AlignAttribute=void 0;var s=a(0),o=l(s);function l(p){return p&&p.__esModule?p:{default:p}}var c={scope:o.default.Scope.BLOCK,whitelist:["right","center","justify"]},h=new o.default.Attributor.Attribute("align","align",c),u=new o.default.Attributor.Class("align","ql-align",c),d=new o.default.Attributor.Style("align","text-align",c);i.AlignAttribute=h,i.AlignClass=u,i.AlignStyle=d}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0}),i.BackgroundStyle=i.BackgroundClass=void 0;var s=a(0),o=c(s),l=a(26);function c(d){return d&&d.__esModule?d:{default:d}}var h=new o.default.Attributor.Class("background","ql-bg",{scope:o.default.Scope.INLINE}),u=new l.ColorAttributor("background","background-color",{scope:o.default.Scope.INLINE});i.BackgroundClass=h,i.BackgroundStyle=u}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0}),i.DirectionStyle=i.DirectionClass=i.DirectionAttribute=void 0;var s=a(0),o=l(s);function l(p){return p&&p.__esModule?p:{default:p}}var c={scope:o.default.Scope.BLOCK,whitelist:["rtl"]},h=new o.default.Attributor.Attribute("direction","dir",c),u=new o.default.Attributor.Class("direction","ql-direction",c),d=new o.default.Attributor.Style("direction","direction",c);i.DirectionAttribute=h,i.DirectionClass=u,i.DirectionStyle=d}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0}),i.FontClass=i.FontStyle=void 0;var s=(function(){function v(b,j){for(var w=0;w<j.length;w++){var S=j[w];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(b,S.key,S)}}return function(b,j,w){return j&&v(b.prototype,j),w&&v(b,w),b}})(),o=function v(b,j,w){b===null&&(b=Function.prototype);var S=Object.getOwnPropertyDescriptor(b,j);if(S===void 0){var _=Object.getPrototypeOf(b);return _===null?void 0:v(_,j,w)}else{if("value"in S)return S.value;var C=S.get;return C===void 0?void 0:C.call(w)}},l=a(0),c=h(l);function h(v){return v&&v.__esModule?v:{default:v}}function u(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")}function d(v,b){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:v}function p(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);v.prototype=Object.create(b&&b.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(v,b):v.__proto__=b)}var f={scope:c.default.Scope.INLINE,whitelist:["serif","monospace"]},m=new c.default.Attributor.Class("font","ql-font",f),g=(function(v){p(b,v);function b(){return u(this,b),d(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return s(b,[{key:"value",value:function(w){return o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"value",this).call(this,w).replace(/["']/g,"")}}]),b})(c.default.Attributor.Style),x=new g("font","font-family",f);i.FontStyle=x,i.FontClass=m}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0}),i.SizeStyle=i.SizeClass=void 0;var s=a(0),o=l(s);function l(u){return u&&u.__esModule?u:{default:u}}var c=new o.default.Attributor.Class("size","ql-size",{scope:o.default.Scope.INLINE,whitelist:["small","large","huge"]}),h=new o.default.Attributor.Style("size","font-size",{scope:o.default.Scope.INLINE,whitelist:["10px","18px","32px"]});i.SizeClass=c,i.SizeStyle=h}),(function(r,i,a){r.exports={align:{"":a(76),center:a(77),right:a(78),justify:a(79)},background:a(80),blockquote:a(81),bold:a(82),clean:a(83),code:a(58),"code-block":a(58),color:a(84),direction:{"":a(85),rtl:a(86)},float:{center:a(87),full:a(88),left:a(89),right:a(90)},formula:a(91),header:{1:a(92),2:a(93)},italic:a(94),image:a(95),indent:{"+1":a(96),"-1":a(97)},link:a(98),list:{ordered:a(99),bullet:a(100),check:a(101)},script:{sub:a(102),super:a(103)},strike:a(104),underline:a(105),video:a(106)}}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0}),i.getLastChangeIndex=i.default=void 0;var s=(function(){function j(w,S){for(var _=0;_<S.length;_++){var C=S[_];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(w,C.key,C)}}return function(w,S,_){return S&&j(w.prototype,S),_&&j(w,_),w}})(),o=a(0),l=p(o),c=a(5),h=p(c),u=a(9),d=p(u);function p(j){return j&&j.__esModule?j:{default:j}}function f(j,w){if(!(j instanceof w))throw new TypeError("Cannot call a class as a function")}function m(j,w){if(!j)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:j}function g(j,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);j.prototype=Object.create(w&&w.prototype,{constructor:{value:j,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(j,w):j.__proto__=w)}var x=(function(j){g(w,j);function w(S,_){f(this,w);var C=m(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,S,_));return C.lastRecorded=0,C.ignoreChange=!1,C.clear(),C.quill.on(h.default.events.EDITOR_CHANGE,function(E,P,T,N){E!==h.default.events.TEXT_CHANGE||C.ignoreChange||(!C.options.userOnly||N===h.default.sources.USER?C.record(P,T):C.transform(P))}),C.quill.keyboard.addBinding({key:"Z",shortKey:!0},C.undo.bind(C)),C.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},C.redo.bind(C)),/Win/i.test(navigator.platform)&&C.quill.keyboard.addBinding({key:"Y",shortKey:!0},C.redo.bind(C)),C}return s(w,[{key:"change",value:function(_,C){if(this.stack[_].length!==0){var E=this.stack[_].pop();this.stack[C].push(E),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(E[_],h.default.sources.USER),this.ignoreChange=!1;var P=b(E[_]);this.quill.setSelection(P)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(_,C){if(_.ops.length!==0){this.stack.redo=[];var E=this.quill.getContents().diff(C),P=Date.now();if(this.lastRecorded+this.options.delay>P&&this.stack.undo.length>0){var T=this.stack.undo.pop();E=E.compose(T.undo),_=T.redo.compose(_)}else this.lastRecorded=P;this.stack.undo.push({redo:_,undo:E}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(_){this.stack.undo.forEach(function(C){C.undo=_.transform(C.undo,!0),C.redo=_.transform(C.redo,!0)}),this.stack.redo.forEach(function(C){C.undo=_.transform(C.undo,!0),C.redo=_.transform(C.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),w})(d.default);x.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function v(j){var w=j.ops[j.ops.length-1];return w==null?!1:w.insert!=null?typeof w.insert=="string"&&w.insert.endsWith(`
63`):w.attributes!=null?Object.keys(w.attributes).some(function(S){return l.default.query(S,l.default.Scope.BLOCK)!=null}):!1}function b(j){var w=j.reduce(function(_,C){return _+=C.delete||0,_},0),S=j.length()-w;return v(j)&&(S-=1),S}i.default=x,i.getLastChangeIndex=b}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0}),i.default=i.BaseTooltip=void 0;var s=(function(){function F(q,V){for(var X=0;X<V.length;X++){var M=V[X];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(q,M.key,M)}}return function(q,V,X){return V&&F(q.prototype,V),X&&F(q,X),q}})(),o=function F(q,V,X){q===null&&(q=Function.prototype);var M=Object.getOwnPropertyDescriptor(q,V);if(M===void 0){var W=Object.getPrototypeOf(q);return W===null?void 0:F(W,V,X)}else{if("value"in M)return M.value;var K=M.get;return K===void 0?void 0:K.call(X)}},l=a(3),c=P(l),h=a(2),u=P(h),d=a(8),p=P(d),f=a(23),m=P(f),g=a(34),x=P(g),v=a(59),b=P(v),j=a(60),w=P(j),S=a(28),_=P(S),C=a(61),E=P(C);function P(F){return F&&F.__esModule?F:{default:F}}function T(F,q){if(!(F instanceof q))throw new TypeError("Cannot call a class as a function")}function N(F,q){if(!F)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return q&&(typeof q=="object"||typeof q=="function")?q:F}function k(F,q){if(typeof q!="function"&&q!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof q);F.prototype=Object.create(q&&q.prototype,{constructor:{value:F,enumerable:!1,writable:!0,configurable:!0}}),q&&(Object.setPrototypeOf?Object.setPrototypeOf(F,q):F.__proto__=q)}var I=[!1,"center","right","justify"],D=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],O=[!1,"serif","monospace"],$=["1","2","3",!1],U=["small",!1,"large","huge"],B=(function(F){k(q,F);function q(V,X){T(this,q);var M=N(this,(q.__proto__||Object.getPrototypeOf(q)).call(this,V,X)),W=function K(z){if(!document.body.contains(V.root))return document.body.removeEventListener("click",K);M.tooltip!=null&&!M.tooltip.root.contains(z.target)&&document.activeElement!==M.tooltip.textbox&&!M.quill.hasFocus()&&M.tooltip.hide(),M.pickers!=null&&M.pickers.forEach(function(Y){Y.container.contains(z.target)||Y.close()})};return V.emitter.listenDOM("click",document.body,W),M}return s(q,[{key:"addModule",value:function(X){var M=o(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"addModule",this).call(this,X);return X==="toolbar"&&this.extendToolbar(M),M}},{key:"buildButtons",value:function(X,M){X.forEach(function(W){var K=W.getAttribute("class")||"";K.split(/\s+/).forEach(function(z){if(z.startsWith("ql-")&&(z=z.slice(3),M[z]!=null))if(z==="direction")W.innerHTML=M[z][""]+M[z].rtl;else if(typeof M[z]=="string")W.innerHTML=M[z];else{var Y=W.value||"";Y!=null&&M[z][Y]&&(W.innerHTML=M[z][Y])}})})}},{key:"buildPickers",value:function(X,M){var W=this;this.pickers=X.map(function(z){if(z.classList.contains("ql-align"))return z.querySelector("option")==null&&R(z,I),new w.default(z,M.align);if(z.classList.contains("ql-background")||z.classList.contains("ql-color")){var Y=z.classList.contains("ql-background")?"background":"color";return z.querySelector("option")==null&&R(z,D,Y==="background"?"#ffffff":"#000000"),new b.default(z,M[Y])}else return z.querySelector("option")==null&&(z.classList.contains("ql-font")?R(z,O):z.classList.contains("ql-header")?R(z,$):z.classList.contains("ql-size")&&R(z,U)),new _.default(z)});var K=function(){W.pickers.forEach(function(Y){Y.update()})};this.quill.on(p.default.events.EDITOR_CHANGE,K)}}]),q})(x.default);B.DEFAULTS=(0,c.default)(!0,{},x.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var q=this,V=this.container.querySelector("input.ql-image[type=file]");V==null&&(V=document.createElement("input"),V.setAttribute("type","file"),V.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),V.classList.add("ql-image"),V.addEventListener("change",function(){if(V.files!=null&&V.files[0]!=null){var X=new FileReader;X.onload=function(M){var W=q.quill.getSelection(!0);q.quill.updateContents(new u.default().retain(W.index).delete(W.length).insert({image:M.target.result}),p.default.sources.USER),q.quill.setSelection(W.index+1,p.default.sources.SILENT),V.value=""},X.readAsDataURL(V.files[0])}}),this.container.appendChild(V)),V.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var L=(function(F){k(q,F);function q(V,X){T(this,q);var M=N(this,(q.__proto__||Object.getPrototypeOf(q)).call(this,V,X));return M.textbox=M.root.querySelector('input[type="text"]'),M.listen(),M}return s(q,[{key:"listen",value:function(){var X=this;this.textbox.addEventListener("keydown",function(M){m.default.match(M,"enter")?(X.save(),M.preventDefault()):m.default.match(M,"escape")&&(X.cancel(),M.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),M!=null?this.textbox.value=M:X!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+X)||""),this.root.setAttribute("data-mode",X)}},{key:"restoreFocus",value:function(){var X=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=X}},{key:"save",value:function(){var X=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var M=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",X,p.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",X,p.default.sources.USER)),this.quill.root.scrollTop=M;break}case"video":X=A(X);case"formula":{if(!X)break;var W=this.quill.getSelection(!0);if(W!=null){var K=W.index+W.length;this.quill.insertEmbed(K,this.root.getAttribute("data-mode"),X,p.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(K+1," ",p.default.sources.USER),this.quill.setSelection(K+2,p.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),q})(E.default);function A(F){var q=F.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||F.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return q?(q[1]||"https")+"://www.youtube.com/embed/"+q[2]+"?showinfo=0":(q=F.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(q[1]||"https")+"://player.vimeo.com/video/"+q[2]+"/":F}function R(F,q){var V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;q.forEach(function(X){var M=document.createElement("option");X===V?M.setAttribute("selected","selected"):M.setAttribute("value",X),F.appendChild(M)})}i.BaseTooltip=L,i.default=B}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=(function(){function o(){this.head=this.tail=null,this.length=0}return o.prototype.append=function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];this.insertBefore(l[0],null),l.length>1&&this.append.apply(this,l.slice(1))},o.prototype.contains=function(l){for(var c,h=this.iterator();c=h();)if(c===l)return!0;return!1},o.prototype.insertBefore=function(l,c){l&&(l.next=c,c!=null?(l.prev=c.prev,c.prev!=null&&(c.prev.next=l),c.prev=l,c===this.head&&(this.head=l)):this.tail!=null?(this.tail.next=l,l.prev=this.tail,this.tail=l):(l.prev=null,this.head=this.tail=l),this.length+=1)},o.prototype.offset=function(l){for(var c=0,h=this.head;h!=null;){if(h===l)return c;c+=h.length(),h=h.next}return-1},o.prototype.remove=function(l){this.contains(l)&&(l.prev!=null&&(l.prev.next=l.next),l.next!=null&&(l.next.prev=l.prev),l===this.head&&(this.head=l.next),l===this.tail&&(this.tail=l.prev),this.length-=1)},o.prototype.iterator=function(l){return l===void 0&&(l=this.head),function(){var c=l;return l!=null&&(l=l.next),c}},o.prototype.find=function(l,c){c===void 0&&(c=!1);for(var h,u=this.iterator();h=u();){var d=h.length();if(l<d||c&&l===d&&(h.next==null||h.next.length()!==0))return[h,l];l-=d}return[null,0]},o.prototype.forEach=function(l){for(var c,h=this.iterator();c=h();)l(c)},o.prototype.forEachAt=function(l,c,h){if(!(c<=0))for(var u=this.find(l),d=u[0],p=u[1],f,m=l-p,g=this.iterator(d);(f=g())&&m<l+c;){var x=f.length();l>m?h(f,l-m,Math.min(c,m+x-l)):h(f,0,Math.min(x,l+c-m)),m+=x}},o.prototype.map=function(l){return this.reduce(function(c,h){return c.push(l(h)),c},[])},o.prototype.reduce=function(l,c){for(var h,u=this.iterator();h=u();)c=l(c,h);return c},o})();i.default=s}),(function(r,i,a){var s=this&&this.__extends||(function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,f){p.__proto__=f}||function(p,f){for(var m in f)f.hasOwnProperty(m)&&(p[m]=f[m])};return function(p,f){d(p,f);function m(){this.constructor=p}p.prototype=f===null?Object.create(f):(m.prototype=f.prototype,new m)}})();Object.defineProperty(i,"__esModule",{value:!0});var o=a(17),l=a(1),c={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},h=100,u=(function(d){s(p,d);function p(f){var m=d.call(this,f)||this;return m.scroll=m,m.observer=new MutationObserver(function(g){m.update(g)}),m.observer.observe(m.domNode,c),m.attach(),m}return p.prototype.detach=function(){d.prototype.detach.call(this),this.observer.disconnect()},p.prototype.deleteAt=function(f,m){this.update(),f===0&&m===this.length()?this.children.forEach(function(g){g.remove()}):d.prototype.deleteAt.call(this,f,m)},p.prototype.formatAt=function(f,m,g,x){this.update(),d.prototype.formatAt.call(this,f,m,g,x)},p.prototype.insertAt=function(f,m,g){this.update(),d.prototype.insertAt.call(this,f,m,g)},p.prototype.optimize=function(f,m){var g=this;f===void 0&&(f=[]),m===void 0&&(m={}),d.prototype.optimize.call(this,m);for(var x=[].slice.call(this.observer.takeRecords());x.length>0;)f.push(x.pop());for(var v=function(S,_){_===void 0&&(_=!0),!(S==null||S===g)&&S.domNode.parentNode!=null&&(S.domNode[l.DATA_KEY].mutations==null&&(S.domNode[l.DATA_KEY].mutations=[]),_&&v(S.parent))},b=function(S){S.domNode[l.DATA_KEY]==null||S.domNode[l.DATA_KEY].mutations==null||(S instanceof o.default&&S.children.forEach(b),S.optimize(m))},j=f,w=0;j.length>0;w+=1){if(w>=h)throw new Error("[Parchment] Maximum optimize iterations reached");for(j.forEach(function(S){var _=l.find(S.target,!0);_!=null&&(_.domNode===S.target&&(S.type==="childList"?(v(l.find(S.previousSibling,!1)),[].forEach.call(S.addedNodes,function(C){var E=l.find(C,!1);v(E,!1),E instanceof o.default&&E.children.forEach(function(P){v(P,!1)})})):S.type==="attributes"&&v(_.prev)),v(_))}),this.children.forEach(b),j=[].slice.call(this.observer.takeRecords()),x=j.slice();x.length>0;)f.push(x.pop())}},p.prototype.update=function(f,m){var g=this;m===void 0&&(m={}),f=f||this.observer.takeRecords(),f.map(function(x){var v=l.find(x.target,!0);return v==null?null:v.domNode[l.DATA_KEY].mutations==null?(v.domNode[l.DATA_KEY].mutations=[x],v):(v.domNode[l.DATA_KEY].mutations.push(x),null)}).forEach(function(x){x==null||x===g||x.domNode[l.DATA_KEY]==null||x.update(x.domNode[l.DATA_KEY].mutations||[],m)}),this.domNode[l.DATA_KEY].mutations!=null&&d.prototype.update.call(this,this.domNode[l.DATA_KEY].mutations,m),this.optimize(f,m)},p.blotName="scroll",p.defaultChild="block",p.scope=l.Scope.BLOCK_BLOT,p.tagName="DIV",p})(o.default);i.default=u}),(function(r,i,a){var s=this&&this.__extends||(function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var f in p)p.hasOwnProperty(f)&&(d[f]=p[f])};return function(d,p){u(d,p);function f(){this.constructor=d}d.prototype=p===null?Object.create(p):(f.prototype=p.prototype,new f)}})();Object.defineProperty(i,"__esModule",{value:!0});var o=a(18),l=a(1);function c(u,d){if(Object.keys(u).length!==Object.keys(d).length)return!1;for(var p in u)if(u[p]!==d[p])return!1;return!0}var h=(function(u){s(d,u);function d(){return u!==null&&u.apply(this,arguments)||this}return d.formats=function(p){if(p.tagName!==d.tagName)return u.formats.call(this,p)},d.prototype.format=function(p,f){var m=this;p===this.statics.blotName&&!f?(this.children.forEach(function(g){g instanceof o.default||(g=g.wrap(d.blotName,!0)),m.attributes.copy(g)}),this.unwrap()):u.prototype.format.call(this,p,f)},d.prototype.formatAt=function(p,f,m,g){if(this.formats()[m]!=null||l.query(m,l.Scope.ATTRIBUTE)){var x=this.isolate(p,f);x.format(m,g)}else u.prototype.formatAt.call(this,p,f,m,g)},d.prototype.optimize=function(p){u.prototype.optimize.call(this,p);var f=this.formats();if(Object.keys(f).length===0)return this.unwrap();var m=this.next;m instanceof d&&m.prev===this&&c(f,m.formats())&&(m.moveChildren(this),m.remove())},d.blotName="inline",d.scope=l.Scope.INLINE_BLOT,d.tagName="SPAN",d})(o.default);i.default=h}),(function(r,i,a){var s=this&&this.__extends||(function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var p in d)d.hasOwnProperty(p)&&(u[p]=d[p])};return function(u,d){h(u,d);function p(){this.constructor=u}u.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}})();Object.defineProperty(i,"__esModule",{value:!0});var o=a(18),l=a(1),c=(function(h){s(u,h);function u(){return h!==null&&h.apply(this,arguments)||this}return u.formats=function(d){var p=l.query(u.blotName).tagName;if(d.tagName!==p)return h.formats.call(this,d)},u.prototype.format=function(d,p){l.query(d,l.Scope.BLOCK)!=null&&(d===this.statics.blotName&&!p?this.replaceWith(u.blotName):h.prototype.format.call(this,d,p))},u.prototype.formatAt=function(d,p,f,m){l.query(f,l.Scope.BLOCK)!=null?this.format(f,m):h.prototype.formatAt.call(this,d,p,f,m)},u.prototype.insertAt=function(d,p,f){if(f==null||l.query(p,l.Scope.INLINE)!=null)h.prototype.insertAt.call(this,d,p,f);else{var m=this.split(d),g=l.create(p,f);m.parent.insertBefore(g,m)}},u.prototype.update=function(d,p){navigator.userAgent.match(/Trident/)?this.build():h.prototype.update.call(this,d,p)},u.blotName="block",u.scope=l.Scope.BLOCK_BLOT,u.tagName="P",u})(o.default);i.default=c}),(function(r,i,a){var s=this&&this.__extends||(function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,u){h.__proto__=u}||function(h,u){for(var d in u)u.hasOwnProperty(d)&&(h[d]=u[d])};return function(h,u){c(h,u);function d(){this.constructor=h}h.prototype=u===null?Object.create(u):(d.prototype=u.prototype,new d)}})();Object.defineProperty(i,"__esModule",{value:!0});var o=a(19),l=(function(c){s(h,c);function h(){return c!==null&&c.apply(this,arguments)||this}return h.formats=function(u){},h.prototype.format=function(u,d){c.prototype.formatAt.call(this,0,this.length(),u,d)},h.prototype.formatAt=function(u,d,p,f){u===0&&d===this.length()?this.format(p,f):c.prototype.formatAt.call(this,u,d,p,f)},h.prototype.formats=function(){return this.statics.formats(this.domNode)},h})(o.default);i.default=l}),(function(r,i,a){var s=this&&this.__extends||(function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var p in d)d.hasOwnProperty(p)&&(u[p]=d[p])};return function(u,d){h(u,d);function p(){this.constructor=u}u.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}})();Object.defineProperty(i,"__esModule",{value:!0});var o=a(19),l=a(1),c=(function(h){s(u,h);function u(d){var p=h.call(this,d)||this;return p.text=p.statics.value(p.domNode),p}return u.create=function(d){return document.createTextNode(d)},u.value=function(d){var p=d.data;return p.normalize&&(p=p.normalize()),p},u.prototype.deleteAt=function(d,p){this.domNode.data=this.text=this.text.slice(0,d)+this.text.slice(d+p)},u.prototype.index=function(d,p){return this.domNode===d?p:-1},u.prototype.insertAt=function(d,p,f){f==null?(this.text=this.text.slice(0,d)+p+this.text.slice(d),this.domNode.data=this.text):h.prototype.insertAt.call(this,d,p,f)},u.prototype.length=function(){return this.text.length},u.prototype.optimize=function(d){h.prototype.optimize.call(this,d),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof u&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},u.prototype.position=function(d,p){return[this.domNode,d]},u.prototype.split=function(d,p){if(p===void 0&&(p=!1),!p){if(d===0)return this;if(d===this.length())return this.next}var f=l.create(this.domNode.splitText(d));return this.parent.insertBefore(f,this.next),this.text=this.statics.value(this.domNode),f},u.prototype.update=function(d,p){var f=this;d.some(function(m){return m.type==="characterData"&&m.target===f.domNode})&&(this.text=this.statics.value(this.domNode))},u.prototype.value=function(){return this.text},u.blotName="text",u.scope=l.Scope.INLINE_BLOT,u})(o.default);i.default=c}),(function(r,i,a){var s=document.createElement("div");if(s.classList.toggle("test-class",!1),s.classList.contains("test-class")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(l,c){return arguments.length>1&&!this.contains(l)==!c?c:o.call(this,l)}}String.prototype.startsWith||(String.prototype.startsWith=function(l,c){return c=c||0,this.substr(c,l.length)===l}),String.prototype.endsWith||(String.prototype.endsWith=function(l,c){var h=this.toString();(typeof c!="number"||!isFinite(c)||Math.floor(c)!==c||c>h.length)&&(c=h.length),c-=l.length;var u=h.indexOf(l,c);return u!==-1&&u===c}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(c){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof c!="function")throw new TypeError("predicate must be a function");for(var h=Object(this),u=h.length>>>0,d=arguments[1],p,f=0;f<u;f++)if(p=h[f],c.call(d,p,f,h))return p}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})}),(function(r,i){var a=-1,s=1,o=0;function l(w,S,_){if(w==S)return w?[[o,w]]:[];(_<0||w.length<_)&&(_=null);var C=d(w,S),E=w.substring(0,C);w=w.substring(C),S=S.substring(C),C=p(w,S);var P=w.substring(w.length-C);w=w.substring(0,w.length-C),S=S.substring(0,S.length-C);var T=c(w,S);return E&&T.unshift([o,E]),P&&T.push([o,P]),m(T),_!=null&&(T=v(T,_)),T=b(T),T}function c(w,S){var _;if(!w)return[[s,S]];if(!S)return[[a,w]];var C=w.length>S.length?w:S,E=w.length>S.length?S:w,P=C.indexOf(E);if(P!=-1)return _=[[s,C.substring(0,P)],[o,E],[s,C.substring(P+E.length)]],w.length>S.length&&(_[0][0]=_[2][0]=a),_;if(E.length==1)return[[a,w],[s,S]];var T=f(w,S);if(T){var N=T[0],k=T[1],I=T[2],D=T[3],O=T[4],$=l(N,I),U=l(k,D);return $.concat([[o,O]],U)}return h(w,S)}function h(w,S){for(var _=w.length,C=S.length,E=Math.ceil((_+C)/2),P=E,T=2*E,N=new Array(T),k=new Array(T),I=0;I<T;I++)N[I]=-1,k[I]=-1;N[P+1]=0,k[P+1]=0;for(var D=_-C,O=D%2!=0,$=0,U=0,B=0,L=0,A=0;A<E;A++){for(var R=-A+$;R<=A-U;R+=2){var F=P+R,q;R==-A||R!=A&&N[F-1]<N[F+1]?q=N[F+1]:q=N[F-1]+1;for(var V=q-R;q<_&&V<C&&w.charAt(q)==S.charAt(V);)q++,V++;if(N[F]=q,q>_)U+=2;else if(V>C)$+=2;else if(O){var X=P+D-R;if(X>=0&&X<T&&k[X]!=-1){var M=_-k[X];if(q>=M)return u(w,S,q,V)}}}for(var W=-A+B;W<=A-L;W+=2){var X=P+W,M;W==-A||W!=A&&k[X-1]<k[X+1]?M=k[X+1]:M=k[X-1]+1;for(var K=M-W;M<_&&K<C&&w.charAt(_-M-1)==S.charAt(C-K-1);)M++,K++;if(k[X]=M,M>_)L+=2;else if(K>C)B+=2;else if(!O){var F=P+D-W;if(F>=0&&F<T&&N[F]!=-1){var q=N[F],V=P+q-F;if(M=_-M,q>=M)return u(w,S,q,V)}}}}return[[a,w],[s,S]]}function u(w,S,_,C){var E=w.substring(0,_),P=S.substring(0,C),T=w.substring(_),N=S.substring(C),k=l(E,P),I=l(T,N);return k.concat(I)}function d(w,S){if(!w||!S||w.charAt(0)!=S.charAt(0))return 0;for(var _=0,C=Math.min(w.length,S.length),E=C,P=0;_<E;)w.substring(P,E)==S.substring(P,E)?(_=E,P=_):C=E,E=Math.floor((C-_)/2+_);return E}function p(w,S){if(!w||!S||w.charAt(w.length-1)!=S.charAt(S.length-1))return 0;for(var _=0,C=Math.min(w.length,S.length),E=C,P=0;_<E;)w.substring(w.length-E,w.length-P)==S.substring(S.length-E,S.length-P)?(_=E,P=_):C=E,E=Math.floor((C-_)/2+_);return E}function f(w,S){var _=w.length>S.length?w:S,C=w.length>S.length?S:w;if(_.length<4||C.length*2<_.length)return null;function E(U,B,L){for(var A=U.substring(L,L+Math.floor(U.length/4)),R=-1,F="",q,V,X,M;(R=B.indexOf(A,R+1))!=-1;){var W=d(U.substring(L),B.substring(R)),K=p(U.substring(0,L),B.substring(0,R));F.length<K+W&&(F=B.substring(R-K,R)+B.substring(R,R+W),q=U.substring(0,L-K),V=U.substring(L+W),X=B.substring(0,R-K),M=B.substring(R+W))}return F.length*2>=U.length?[q,V,X,M,F]:null}var P=E(_,C,Math.ceil(_.length/4)),T=E(_,C,Math.ceil(_.length/2)),N;if(!P&&!T)return null;T?P?N=P[4].length>T[4].length?P:T:N=T:N=P;var k,I,D,O;w.length>S.length?(k=N[0],I=N[1],D=N[2],O=N[3]):(D=N[0],O=N[1],k=N[2],I=N[3]);var $=N[4];return[k,I,D,O,$]}function m(w){w.push([o,""]);for(var S=0,_=0,C=0,E="",P="",T;S<w.length;)switch(w[S][0]){case s:C++,P+=w[S][1],S++;break;case a:_++,E+=w[S][1],S++;break;case o:_+C>1?(_!==0&&C!==0&&(T=d(P,E),T!==0&&(S-_-C>0&&w[S-_-C-1][0]==o?w[S-_-C-1][1]+=P.substring(0,T):(w.splice(0,0,[o,P.substring(0,T)]),S++),P=P.substring(T),E=E.substring(T)),T=p(P,E),T!==0&&(w[S][1]=P.substring(P.length-T)+w[S][1],P=P.substring(0,P.length-T),E=E.substring(0,E.length-T))),_===0?w.splice(S-C,_+C,[s,P]):C===0?w.splice(S-_,_+C,[a,E]):w.splice(S-_-C,_+C,[a,E],[s,P]),S=S-_-C+(_?1:0)+(C?1:0)+1):S!==0&&w[S-1][0]==o?(w[S-1][1]+=w[S][1],w.splice(S,1)):S++,C=0,_=0,E="",P="";break}w[w.length-1][1]===""&&w.pop();var N=!1;for(S=1;S<w.length-1;)w[S-1][0]==o&&w[S+1][0]==o&&(w[S][1].substring(w[S][1].length-w[S-1][1].length)==w[S-1][1]?(w[S][1]=w[S-1][1]+w[S][1].substring(0,w[S][1].length-w[S-1][1].length),w[S+1][1]=w[S-1][1]+w[S+1][1],w.splice(S-1,1),N=!0):w[S][1].substring(0,w[S+1][1].length)==w[S+1][1]&&(w[S-1][1]+=w[S+1][1],w[S][1]=w[S][1].substring(w[S+1][1].length)+w[S+1][1],w.splice(S+1,1),N=!0)),S++;N&&m(w)}var g=l;g.INSERT=s,g.DELETE=a,g.EQUAL=o,r.exports=g;function x(w,S){if(S===0)return[o,w];for(var _=0,C=0;C<w.length;C++){var E=w[C];if(E[0]===a||E[0]===o){var P=_+E[1].length;if(S===P)return[C+1,w];if(S<P){w=w.slice();var T=S-_,N=[E[0],E[1].slice(0,T)],k=[E[0],E[1].slice(T)];return w.splice(C,1,N,k),[C+1,w]}else _=P}}throw new Error("cursor_pos is out of bounds!")}function v(w,S){var _=x(w,S),C=_[1],E=_[0],P=C[E],T=C[E+1];if(P==null)return w;if(P[0]!==o)return w;if(T!=null&&P[1]+T[1]===T[1]+P[1])return C.splice(E,2,T,P),j(C,E,2);if(T!=null&&T[1].indexOf(P[1])===0){C.splice(E,2,[T[0],P[1]],[0,P[1]]);var N=T[1].slice(P[1].length);return N.length>0&&C.splice(E+2,0,[T[0],N]),j(C,E,3)}else return w}function b(w){for(var S=!1,_=function(T){return T.charCodeAt(0)>=56320&&T.charCodeAt(0)<=57343},C=function(T){return T.charCodeAt(T.length-1)>=55296&&T.charCodeAt(T.length-1)<=56319},E=2;E<w.length;E+=1)w[E-2][0]===o&&C(w[E-2][1])&&w[E-1][0]===a&&_(w[E-1][1])&&w[E][0]===s&&_(w[E][1])&&(S=!0,w[E-1][1]=w[E-2][1].slice(-1)+w[E-1][1],w[E][1]=w[E-2][1].slice(-1)+w[E][1],w[E-2][1]=w[E-2][1].slice(0,-1));if(!S)return w;for(var P=[],E=0;E<w.length;E+=1)w[E][1].length>0&&P.push(w[E]);return P}function j(w,S,_){for(var C=S+_-1;C>=0&&C>=S-1;C--)if(C+1<w.length){var E=w[C],P=w[C+1];E[0]===P[1]&&w.splice(C,2,[E[0],E[1]+P[1]])}return w}}),(function(r,i){i=r.exports=typeof Object.keys=="function"?Object.keys:a,i.shim=a;function a(s){var o=[];for(var l in s)o.push(l);return o}}),(function(r,i){var a=(function(){return Object.prototype.toString.call(arguments)})()=="[object Arguments]";i=r.exports=a?s:o,i.supported=s;function s(l){return Object.prototype.toString.call(l)=="[object Arguments]"}i.unsupported=o;function o(l){return l&&typeof l=="object"&&typeof l.length=="number"&&Object.prototype.hasOwnProperty.call(l,"callee")&&!Object.prototype.propertyIsEnumerable.call(l,"callee")||!1}}),(function(r,i){var a=Object.prototype.hasOwnProperty,s="~";function o(){}Object.create&&(o.prototype=Object.create(null),new o().__proto__||(s=!1));function l(h,u,d){this.fn=h,this.context=u,this.once=d||!1}function c(){this._events=new o,this._eventsCount=0}c.prototype.eventNames=function(){var u=[],d,p;if(this._eventsCount===0)return u;for(p in d=this._events)a.call(d,p)&&u.push(s?p.slice(1):p);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(d)):u},c.prototype.listeners=function(u,d){var p=s?s+u:u,f=this._events[p];if(d)return!!f;if(!f)return[];if(f.fn)return[f.fn];for(var m=0,g=f.length,x=new Array(g);m<g;m++)x[m]=f[m].fn;return x},c.prototype.emit=function(u,d,p,f,m,g){var x=s?s+u:u;if(!this._events[x])return!1;var v=this._events[x],b=arguments.length,j,w;if(v.fn){switch(v.once&&this.removeListener(u,v.fn,void 0,!0),b){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,d),!0;case 3:return v.fn.call(v.context,d,p),!0;case 4:return v.fn.call(v.context,d,p,f),!0;case 5:return v.fn.call(v.context,d,p,f,m),!0;case 6:return v.fn.call(v.context,d,p,f,m,g),!0}for(w=1,j=new Array(b-1);w<b;w++)j[w-1]=arguments[w];v.fn.apply(v.context,j)}else{var S=v.length,_;for(w=0;w<S;w++)switch(v[w].once&&this.removeListener(u,v[w].fn,void 0,!0),b){case 1:v[w].fn.call(v[w].context);break;case 2:v[w].fn.call(v[w].context,d);break;case 3:v[w].fn.call(v[w].context,d,p);break;case 4:v[w].fn.call(v[w].context,d,p,f);break;default:if(!j)for(_=1,j=new Array(b-1);_<b;_++)j[_-1]=arguments[_];v[w].fn.apply(v[w].context,j)}}return!0},c.prototype.on=function(u,d,p){var f=new l(d,p||this),m=s?s+u:u;return this._events[m]?this._events[m].fn?this._events[m]=[this._events[m],f]:this._events[m].push(f):(this._events[m]=f,this._eventsCount++),this},c.prototype.once=function(u,d,p){var f=new l(d,p||this,!0),m=s?s+u:u;return this._events[m]?this._events[m].fn?this._events[m]=[this._events[m],f]:this._events[m].push(f):(this._events[m]=f,this._eventsCount++),this},c.prototype.removeListener=function(u,d,p,f){var m=s?s+u:u;if(!this._events[m])return this;if(!d)return--this._eventsCount===0?this._events=new o:delete this._events[m],this;var g=this._events[m];if(g.fn)g.fn===d&&(!f||g.once)&&(!p||g.context===p)&&(--this._eventsCount===0?this._events=new o:delete this._events[m]);else{for(var x=0,v=[],b=g.length;x<b;x++)(g[x].fn!==d||f&&!g[x].once||p&&g[x].context!==p)&&v.push(g[x]);v.length?this._events[m]=v.length===1?v[0]:v:--this._eventsCount===0?this._events=new o:delete this._events[m]}return this},c.prototype.removeAllListeners=function(u){var d;return u?(d=s?s+u:u,this._events[d]&&(--this._eventsCount===0?this._events=new o:delete this._events[d])):(this._events=new o,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prototype.setMaxListeners=function(){return this},c.prefixed=s,c.EventEmitter=c,typeof r<"u"&&(r.exports=c)}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0}),i.matchText=i.matchSpacing=i.matchNewline=i.matchBlot=i.matchAttributor=i.default=void 0;var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(fe){return typeof fe}:function(fe){return fe&&typeof Symbol=="function"&&fe.constructor===Symbol&&fe!==Symbol.prototype?"symbol":typeof fe},o=(function(){function fe(se,ge){var De=[],ae=!0,Q=!1,ee=void 0;try{for(var oe=se[Symbol.iterator](),Pe;!(ae=(Pe=oe.next()).done)&&(De.push(Pe.value),!(ge&&De.length===ge));ae=!0);}catch(Fe){Q=!0,ee=Fe}finally{try{!ae&&oe.return&&oe.return()}finally{if(Q)throw ee}}return De}return function(se,ge){if(Array.isArray(se))return se;if(Symbol.iterator in Object(se))return fe(se,ge);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=(function(){function fe(se,ge){for(var De=0;De<ge.length;De++){var ae=ge[De];ae.enumerable=ae.enumerable||!1,ae.configurable=!0,"value"in ae&&(ae.writable=!0),Object.defineProperty(se,ae.key,ae)}}return function(se,ge,De){return ge&&fe(se.prototype,ge),De&&fe(se,De),se}})(),c=a(3),h=k(c),u=a(2),d=k(u),p=a(0),f=k(p),m=a(5),g=k(m),x=a(10),v=k(x),b=a(9),j=k(b),w=a(36),S=a(37),_=a(13),C=k(_),E=a(26),P=a(38),T=a(39),N=a(40);function k(fe){return fe&&fe.__esModule?fe:{default:fe}}function I(fe,se,ge){return se in fe?Object.defineProperty(fe,se,{value:ge,enumerable:!0,configurable:!0,writable:!0}):fe[se]=ge,fe}function D(fe,se){if(!(fe instanceof se))throw new TypeError("Cannot call a class as a function")}function O(fe,se){if(!fe)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return se&&(typeof se=="object"||typeof se=="function")?se:fe}function $(fe,se){if(typeof se!="function"&&se!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof se);fe.prototype=Object.create(se&&se.prototype,{constructor:{value:fe,enumerable:!1,writable:!0,configurable:!0}}),se&&(Object.setPrototypeOf?Object.setPrototypeOf(fe,se):fe.__proto__=se)}var U=(0,v.default)("quill:clipboard"),B="__ql-matcher",L=[[Node.TEXT_NODE,ke],[Node.TEXT_NODE,pe],["br",ie],[Node.ELEMENT_NODE,pe],[Node.ELEMENT_NODE,Y],[Node.ELEMENT_NODE,be],[Node.ELEMENT_NODE,z],[Node.ELEMENT_NODE,ye],["li",ve],["b",K.bind(K,"bold")],["i",K.bind(K,"italic")],["style",ne]],A=[w.AlignAttribute,P.DirectionAttribute].reduce(function(fe,se){return fe[se.keyName]=se,fe},{}),R=[w.AlignStyle,S.BackgroundStyle,E.ColorStyle,P.DirectionStyle,T.FontStyle,N.SizeStyle].reduce(function(fe,se){return fe[se.keyName]=se,fe},{}),F=(function(fe){$(se,fe);function se(ge,De){D(this,se);var ae=O(this,(se.__proto__||Object.getPrototypeOf(se)).call(this,ge,De));return ae.quill.root.addEventListener("paste",ae.onPaste.bind(ae)),ae.container=ae.quill.addContainer("ql-clipboard"),ae.container.setAttribute("contenteditable",!0),ae.container.setAttribute("tabindex",-1),ae.matchers=[],L.concat(ae.options.matchers).forEach(function(Q){var ee=o(Q,2),oe=ee[0],Pe=ee[1];!De.matchVisual&&Pe===be||ae.addMatcher(oe,Pe)}),ae}return l(se,[{key:"addMatcher",value:function(De,ae){this.matchers.push([De,ae])}},{key:"convert",value:function(De){if(typeof De=="string")return this.container.innerHTML=De.replace(/\>\r?\n +\</g,"><"),this.convert();var ae=this.quill.getFormat(this.quill.selection.savedRange.index);if(ae[C.default.blotName]){var Q=this.container.innerText;return this.container.innerHTML="",new d.default().insert(Q,I({},C.default.blotName,ae[C.default.blotName]))}var ee=this.prepareMatching(),oe=o(ee,2),Pe=oe[0],Fe=oe[1],Ie=W(this.container,Pe,Fe);return X(Ie,`
64`)&&Ie.ops[Ie.ops.length-1].attributes==null&&(Ie=Ie.compose(new d.default().retain(Ie.length()-1).delete(1))),U.log("convert",this.container.innerHTML,Ie),this.container.innerHTML="",Ie}},{key:"dangerouslyPasteHTML",value:function(De,ae){var Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:g.default.sources.API;if(typeof De=="string")this.quill.setContents(this.convert(De),ae),this.quill.setSelection(0,g.default.sources.SILENT);else{var ee=this.convert(ae);this.quill.updateContents(new d.default().retain(De).concat(ee),Q),this.quill.setSelection(De+ee.length(),g.default.sources.SILENT)}}},{key:"onPaste",value:function(De){var ae=this;if(!(De.defaultPrevented||!this.quill.isEnabled())){var Q=this.quill.getSelection(),ee=new d.default().retain(Q.index),oe=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(g.default.sources.SILENT),setTimeout(function(){ee=ee.concat(ae.convert()).delete(Q.length),ae.quill.updateContents(ee,g.default.sources.USER),ae.quill.setSelection(ee.length()-Q.length,g.default.sources.SILENT),ae.quill.scrollingContainer.scrollTop=oe,ae.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var De=this,ae=[],Q=[];return this.matchers.forEach(function(ee){var oe=o(ee,2),Pe=oe[0],Fe=oe[1];switch(Pe){case Node.TEXT_NODE:Q.push(Fe);break;case Node.ELEMENT_NODE:ae.push(Fe);break;default:[].forEach.call(De.container.querySelectorAll(Pe),function(Ie){Ie[B]=Ie[B]||[],Ie[B].push(Fe)});break}}),[ae,Q]}}]),se})(j.default);F.DEFAULTS={matchers:[],matchVisual:!0};function q(fe,se,ge){return(typeof se>"u"?"undefined":s(se))==="object"?Object.keys(se).reduce(function(De,ae){return q(De,ae,se[ae])},fe):fe.reduce(function(De,ae){return ae.attributes&&ae.attributes[se]?De.push(ae):De.insert(ae.insert,(0,h.default)({},I({},se,ge),ae.attributes))},new d.default)}function V(fe){if(fe.nodeType!==Node.ELEMENT_NODE)return{};var se="__ql-computed-style";return fe[se]||(fe[se]=window.getComputedStyle(fe))}function X(fe,se){for(var ge="",De=fe.ops.length-1;De>=0&&ge.length<se.length;--De){var ae=fe.ops[De];if(typeof ae.insert!="string")break;ge=ae.insert+ge}return ge.slice(-1*se.length)===se}function M(fe){if(fe.childNodes.length===0)return!1;var se=V(fe);return["block","list-item"].indexOf(se.display)>-1}function W(fe,se,ge){return fe.nodeType===fe.TEXT_NODE?ge.reduce(function(De,ae){return ae(fe,De)},new d.default):fe.nodeType===fe.ELEMENT_NODE?[].reduce.call(fe.childNodes||[],function(De,ae){var Q=W(ae,se,ge);return ae.nodeType===fe.ELEMENT_NODE&&(Q=se.reduce(function(ee,oe){return oe(ae,ee)},Q),Q=(ae[B]||[]).reduce(function(ee,oe){return oe(ae,ee)},Q)),De.concat(Q)},new d.default):new d.default}function K(fe,se,ge){return q(ge,fe,!0)}function z(fe,se){var ge=f.default.Attributor.Attribute.keys(fe),De=f.default.Attributor.Class.keys(fe),ae=f.default.Attributor.Style.keys(fe),Q={};return ge.concat(De).concat(ae).forEach(function(ee){var oe=f.default.query(ee,f.default.Scope.ATTRIBUTE);oe!=null&&(Q[oe.attrName]=oe.value(fe),Q[oe.attrName])||(oe=A[ee],oe!=null&&(oe.attrName===ee||oe.keyName===ee)&&(Q[oe.attrName]=oe.value(fe)||void 0),oe=R[ee],oe!=null&&(oe.attrName===ee||oe.keyName===ee)&&(oe=R[ee],Q[oe.attrName]=oe.value(fe)||void 0))}),Object.keys(Q).length>0&&(se=q(se,Q)),se}function Y(fe,se){var ge=f.default.query(fe);if(ge==null)return se;if(ge.prototype instanceof f.default.Embed){var De={},ae=ge.value(fe);ae!=null&&(De[ge.blotName]=ae,se=new d.default().insert(De,ge.formats(fe)))}else typeof ge.formats=="function"&&(se=q(se,ge.blotName,ge.formats(fe)));return se}function ie(fe,se){return X(se,`
65`)||se.insert(`
66`),se}function ne(){return new d.default}function ve(fe,se){var ge=f.default.query(fe);if(ge==null||ge.blotName!=="list-item"||!X(se,`
67`))return se;for(var De=-1,ae=fe.parentNode;!ae.classList.contains("ql-clipboard");)(f.default.query(ae)||{}).blotName==="list"&&(De+=1),ae=ae.parentNode;return De<=0?se:se.compose(new d.default().retain(se.length()-1).retain(1,{indent:De}))}function pe(fe,se){return X(se,`
68`)||(M(fe)||se.length()>0&&fe.nextSibling&&M(fe.nextSibling))&&se.insert(`
69`),se}function be(fe,se){if(M(fe)&&fe.nextElementSibling!=null&&!X(se,`
70
71`)){var ge=fe.offsetHeight+parseFloat(V(fe).marginTop)+parseFloat(V(fe).marginBottom);fe.nextElementSibling.offsetTop>fe.offsetTop+ge*1.5&&se.insert(`
72`)}return se}function ye(fe,se){var ge={},De=fe.style||{};return De.fontStyle&&V(fe).fontStyle==="italic"&&(ge.italic=!0),De.fontWeight&&(V(fe).fontWeight.startsWith("bold")||parseInt(V(fe).fontWeight)>=700)&&(ge.bold=!0),Object.keys(ge).length>0&&(se=q(se,ge)),parseFloat(De.textIndent||0)>0&&(se=new d.default().insert("	").concat(se)),se}function ke(fe,se){var ge=fe.data;if(fe.parentNode.tagName==="O:P")return se.insert(ge.trim());if(ge.trim().length===0&&fe.parentNode.classList.contains("ql-clipboard"))return se;if(!V(fe.parentNode).whiteSpace.startsWith("pre")){var De=function(Q,ee){return ee=ee.replace(/[^\u00a0]/g,""),ee.length<1&&Q?" ":ee};ge=ge.replace(/\r\n/g," ").replace(/\n/g," "),ge=ge.replace(/\s\s+/g,De.bind(De,!0)),(fe.previousSibling==null&&M(fe.parentNode)||fe.previousSibling!=null&&M(fe.previousSibling))&&(ge=ge.replace(/^\s+/,De.bind(De,!1))),(fe.nextSibling==null&&M(fe.parentNode)||fe.nextSibling!=null&&M(fe.nextSibling))&&(ge=ge.replace(/\s+$/,De.bind(De,!1)))}return se.insert(ge)}i.default=F,i.matchAttributor=z,i.matchBlot=Y,i.matchNewline=pe,i.matchSpacing=be,i.matchText=ke}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=(function(){function m(g,x){for(var v=0;v<x.length;v++){var b=x[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(g,b.key,b)}}return function(g,x,v){return x&&m(g.prototype,x),v&&m(g,v),g}})(),o=function m(g,x,v){g===null&&(g=Function.prototype);var b=Object.getOwnPropertyDescriptor(g,x);if(b===void 0){var j=Object.getPrototypeOf(g);return j===null?void 0:m(j,x,v)}else{if("value"in b)return b.value;var w=b.get;return w===void 0?void 0:w.call(v)}},l=a(6),c=h(l);function h(m){return m&&m.__esModule?m:{default:m}}function u(m,g){if(!(m instanceof g))throw new TypeError("Cannot call a class as a function")}function d(m,g){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:m}function p(m,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);m.prototype=Object.create(g&&g.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(m,g):m.__proto__=g)}var f=(function(m){p(g,m);function g(){return u(this,g),d(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return s(g,[{key:"optimize",value:function(v){o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"optimize",this).call(this,v),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return o(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),g})(c.default);f.blotName="bold",f.tagName=["STRONG","B"],i.default=f}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0}),i.addControls=i.default=void 0;var s=(function(){function N(k,I){var D=[],O=!0,$=!1,U=void 0;try{for(var B=k[Symbol.iterator](),L;!(O=(L=B.next()).done)&&(D.push(L.value),!(I&&D.length===I));O=!0);}catch(A){$=!0,U=A}finally{try{!O&&B.return&&B.return()}finally{if($)throw U}}return D}return function(k,I){if(Array.isArray(k))return k;if(Symbol.iterator in Object(k))return N(k,I);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=(function(){function N(k,I){for(var D=0;D<I.length;D++){var O=I[D];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(k,O.key,O)}}return function(k,I,D){return I&&N(k.prototype,I),D&&N(k,D),k}})(),l=a(2),c=v(l),h=a(0),u=v(h),d=a(5),p=v(d),f=a(10),m=v(f),g=a(9),x=v(g);function v(N){return N&&N.__esModule?N:{default:N}}function b(N,k,I){return k in N?Object.defineProperty(N,k,{value:I,enumerable:!0,configurable:!0,writable:!0}):N[k]=I,N}function j(N,k){if(!(N instanceof k))throw new TypeError("Cannot call a class as a function")}function w(N,k){if(!N)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k&&(typeof k=="object"||typeof k=="function")?k:N}function S(N,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof k);N.prototype=Object.create(k&&k.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}}),k&&(Object.setPrototypeOf?Object.setPrototypeOf(N,k):N.__proto__=k)}var _=(0,m.default)("quill:toolbar"),C=(function(N){S(k,N);function k(I,D){j(this,k);var O=w(this,(k.__proto__||Object.getPrototypeOf(k)).call(this,I,D));if(Array.isArray(O.options.container)){var $=document.createElement("div");P($,O.options.container),I.container.parentNode.insertBefore($,I.container),O.container=$}else typeof O.options.container=="string"?O.container=document.querySelector(O.options.container):O.container=O.options.container;if(!(O.container instanceof HTMLElement)){var U;return U=_.error("Container required for toolbar",O.options),w(O,U)}return O.container.classList.add("ql-toolbar"),O.controls=[],O.handlers={},Object.keys(O.options.handlers).forEach(function(B){O.addHandler(B,O.options.handlers[B])}),[].forEach.call(O.container.querySelectorAll("button, select"),function(B){O.attach(B)}),O.quill.on(p.default.events.EDITOR_CHANGE,function(B,L){B===p.default.events.SELECTION_CHANGE&&O.update(L)}),O.quill.on(p.default.events.SCROLL_OPTIMIZE,function(){var B=O.quill.selection.getRange(),L=s(B,1),A=L[0];O.update(A)}),O}return o(k,[{key:"addHandler",value:function(D,O){this.handlers[D]=O}},{key:"attach",value:function(D){var O=this,$=[].find.call(D.classList,function(B){return B.indexOf("ql-")===0});if($){if($=$.slice(3),D.tagName==="BUTTON"&&D.setAttribute("type","button"),this.handlers[$]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[$]==null){_.warn("ignoring attaching to disabled format",$,D);return}if(u.default.query($)==null){_.warn("ignoring attaching to nonexistent format",$,D);return}}var U=D.tagName==="SELECT"?"change":"click";D.addEventListener(U,function(B){var L=void 0;if(D.tagName==="SELECT"){if(D.selectedIndex<0)return;var A=D.options[D.selectedIndex];A.hasAttribute("selected")?L=!1:L=A.value||!1}else D.classList.contains("ql-active")?L=!1:L=D.value||!D.hasAttribute("value"),B.preventDefault();O.quill.focus();var R=O.quill.selection.getRange(),F=s(R,1),q=F[0];if(O.handlers[$]!=null)O.handlers[$].call(O,L);else if(u.default.query($).prototype instanceof u.default.Embed){if(L=prompt("Enter "+$),!L)return;O.quill.updateContents(new c.default().retain(q.index).delete(q.length).insert(b({},$,L)),p.default.sources.USER)}else O.quill.format($,L,p.default.sources.USER);O.update(q)}),this.controls.push([$,D])}}},{key:"update",value:function(D){var O=D==null?{}:this.quill.getFormat(D);this.controls.forEach(function($){var U=s($,2),B=U[0],L=U[1];if(L.tagName==="SELECT"){var A=void 0;if(D==null)A=null;else if(O[B]==null)A=L.querySelector("option[selected]");else if(!Array.isArray(O[B])){var R=O[B];typeof R=="string"&&(R=R.replace(/\"/g,'\\"')),A=L.querySelector('option[value="'+R+'"]')}A==null?(L.value="",L.selectedIndex=-1):A.selected=!0}else if(D==null)L.classList.remove("ql-active");else if(L.hasAttribute("value")){var F=O[B]===L.getAttribute("value")||O[B]!=null&&O[B].toString()===L.getAttribute("value")||O[B]==null&&!L.getAttribute("value");L.classList.toggle("ql-active",F)}else L.classList.toggle("ql-active",O[B]!=null)})}}]),k})(x.default);C.DEFAULTS={};function E(N,k,I){var D=document.createElement("button");D.setAttribute("type","button"),D.classList.add("ql-"+k),I!=null&&(D.value=I),N.appendChild(D)}function P(N,k){Array.isArray(k[0])||(k=[k]),k.forEach(function(I){var D=document.createElement("span");D.classList.add("ql-formats"),I.forEach(function(O){if(typeof O=="string")E(D,O);else{var $=Object.keys(O)[0],U=O[$];Array.isArray(U)?T(D,$,U):E(D,$,U)}}),N.appendChild(D)})}function T(N,k,I){var D=document.createElement("select");D.classList.add("ql-"+k),I.forEach(function(O){var $=document.createElement("option");O!==!1?$.setAttribute("value",O):$.setAttribute("selected","selected"),D.appendChild($)}),N.appendChild(D)}C.DEFAULTS={container:null,handlers:{clean:function(){var k=this,I=this.quill.getSelection();if(I!=null)if(I.length==0){var D=this.quill.getFormat();Object.keys(D).forEach(function(O){u.default.query(O,u.default.Scope.INLINE)!=null&&k.quill.format(O,!1)})}else this.quill.removeFormat(I,p.default.sources.USER)},direction:function(k){var I=this.quill.getFormat().align;k==="rtl"&&I==null?this.quill.format("align","right",p.default.sources.USER):!k&&I==="right"&&this.quill.format("align",!1,p.default.sources.USER),this.quill.format("direction",k,p.default.sources.USER)},indent:function(k){var I=this.quill.getSelection(),D=this.quill.getFormat(I),O=parseInt(D.indent||0);if(k==="+1"||k==="-1"){var $=k==="+1"?1:-1;D.direction==="rtl"&&($*=-1),this.quill.format("indent",O+$,p.default.sources.USER)}},link:function(k){k===!0&&(k=prompt("Enter link URL:")),this.quill.format("link",k,p.default.sources.USER)},list:function(k){var I=this.quill.getSelection(),D=this.quill.getFormat(I);k==="check"?D.list==="checked"||D.list==="unchecked"?this.quill.format("list",!1,p.default.sources.USER):this.quill.format("list","unchecked",p.default.sources.USER):this.quill.format("list",k,p.default.sources.USER)}}},i.default=C,i.addControls=P}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=(function(){function m(g,x){for(var v=0;v<x.length;v++){var b=x[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(g,b.key,b)}}return function(g,x,v){return x&&m(g.prototype,x),v&&m(g,v),g}})(),o=function m(g,x,v){g===null&&(g=Function.prototype);var b=Object.getOwnPropertyDescriptor(g,x);if(b===void 0){var j=Object.getPrototypeOf(g);return j===null?void 0:m(j,x,v)}else{if("value"in b)return b.value;var w=b.get;return w===void 0?void 0:w.call(v)}},l=a(28),c=h(l);function h(m){return m&&m.__esModule?m:{default:m}}function u(m,g){if(!(m instanceof g))throw new TypeError("Cannot call a class as a function")}function d(m,g){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:m}function p(m,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);m.prototype=Object.create(g&&g.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(m,g):m.__proto__=g)}var f=(function(m){p(g,m);function g(x,v){u(this,g);var b=d(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,x));return b.label.innerHTML=v,b.container.classList.add("ql-color-picker"),[].slice.call(b.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(j){j.classList.add("ql-primary")}),b}return s(g,[{key:"buildItem",value:function(v){var b=o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"buildItem",this).call(this,v);return b.style.backgroundColor=v.getAttribute("value")||"",b}},{key:"selectItem",value:function(v,b){o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"selectItem",this).call(this,v,b);var j=this.label.querySelector(".ql-color-label"),w=v&&v.getAttribute("data-value")||"";j&&(j.tagName==="line"?j.style.stroke=w:j.style.fill=w)}}]),g})(c.default);i.default=f}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=(function(){function m(g,x){for(var v=0;v<x.length;v++){var b=x[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(g,b.key,b)}}return function(g,x,v){return x&&m(g.prototype,x),v&&m(g,v),g}})(),o=function m(g,x,v){g===null&&(g=Function.prototype);var b=Object.getOwnPropertyDescriptor(g,x);if(b===void 0){var j=Object.getPrototypeOf(g);return j===null?void 0:m(j,x,v)}else{if("value"in b)return b.value;var w=b.get;return w===void 0?void 0:w.call(v)}},l=a(28),c=h(l);function h(m){return m&&m.__esModule?m:{default:m}}function u(m,g){if(!(m instanceof g))throw new TypeError("Cannot call a class as a function")}function d(m,g){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:m}function p(m,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);m.prototype=Object.create(g&&g.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(m,g):m.__proto__=g)}var f=(function(m){p(g,m);function g(x,v){u(this,g);var b=d(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,x));return b.container.classList.add("ql-icon-picker"),[].forEach.call(b.container.querySelectorAll(".ql-picker-item"),function(j){j.innerHTML=v[j.getAttribute("data-value")||""]}),b.defaultItem=b.container.querySelector(".ql-selected"),b.selectItem(b.defaultItem),b}return s(g,[{key:"selectItem",value:function(v,b){o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"selectItem",this).call(this,v,b),v=v||this.defaultItem,this.label.innerHTML=v.innerHTML}}]),g})(c.default);i.default=f}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=(function(){function c(h,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,p.key,p)}}return function(h,u,d){return u&&c(h.prototype,u),d&&c(h,d),h}})();function o(c,h){if(!(c instanceof h))throw new TypeError("Cannot call a class as a function")}var l=(function(){function c(h,u){var d=this;o(this,c),this.quill=h,this.boundsContainer=u||document.body,this.root=h.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){d.root.style.marginTop=-1*d.quill.root.scrollTop+"px"}),this.hide()}return s(c,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(u){var d=u.left+u.width/2-this.root.offsetWidth/2,p=u.bottom+this.quill.root.scrollTop;this.root.style.left=d+"px",this.root.style.top=p+"px",this.root.classList.remove("ql-flip");var f=this.boundsContainer.getBoundingClientRect(),m=this.root.getBoundingClientRect(),g=0;if(m.right>f.right&&(g=f.right-m.right,this.root.style.left=d+g+"px"),m.left<f.left&&(g=f.left-m.left,this.root.style.left=d+g+"px"),m.bottom>f.bottom){var x=m.bottom-m.top,v=u.bottom-u.top+x;this.root.style.top=p-v+"px",this.root.classList.add("ql-flip")}return g}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),c})();i.default=l}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=(function(){function T(N,k){var I=[],D=!0,O=!1,$=void 0;try{for(var U=N[Symbol.iterator](),B;!(D=(B=U.next()).done)&&(I.push(B.value),!(k&&I.length===k));D=!0);}catch(L){O=!0,$=L}finally{try{!D&&U.return&&U.return()}finally{if(O)throw $}}return I}return function(N,k){if(Array.isArray(N))return N;if(Symbol.iterator in Object(N))return T(N,k);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=function T(N,k,I){N===null&&(N=Function.prototype);var D=Object.getOwnPropertyDescriptor(N,k);if(D===void 0){var O=Object.getPrototypeOf(N);return O===null?void 0:T(O,k,I)}else{if("value"in D)return D.value;var $=D.get;return $===void 0?void 0:$.call(I)}},l=(function(){function T(N,k){for(var I=0;I<k.length;I++){var D=k[I];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(N,D.key,D)}}return function(N,k,I){return k&&T(N.prototype,k),I&&T(N,I),N}})(),c=a(3),h=j(c),u=a(8),d=j(u),p=a(43),f=j(p),m=a(27),g=j(m),x=a(15),v=a(41),b=j(v);function j(T){return T&&T.__esModule?T:{default:T}}function w(T,N){if(!(T instanceof N))throw new TypeError("Cannot call a class as a function")}function S(T,N){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N&&(typeof N=="object"||typeof N=="function")?N:T}function _(T,N){if(typeof N!="function"&&N!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof N);T.prototype=Object.create(N&&N.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),N&&(Object.setPrototypeOf?Object.setPrototypeOf(T,N):T.__proto__=N)}var C=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],E=(function(T){_(N,T);function N(k,I){w(this,N),I.modules.toolbar!=null&&I.modules.toolbar.container==null&&(I.modules.toolbar.container=C);var D=S(this,(N.__proto__||Object.getPrototypeOf(N)).call(this,k,I));return D.quill.container.classList.add("ql-snow"),D}return l(N,[{key:"extendToolbar",value:function(I){I.container.classList.add("ql-snow"),this.buildButtons([].slice.call(I.container.querySelectorAll("button")),b.default),this.buildPickers([].slice.call(I.container.querySelectorAll("select")),b.default),this.tooltip=new P(this.quill,this.options.bounds),I.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(D,O){I.handlers.link.call(I,!O.format.link)})}}]),N})(f.default);E.DEFAULTS=(0,h.default)(!0,{},f.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(N){if(N){var k=this.quill.getSelection();if(k==null||k.length==0)return;var I=this.quill.getText(k);/^\S+@\S+\.\S+$/.test(I)&&I.indexOf("mailto:")!==0&&(I="mailto:"+I);var D=this.quill.theme.tooltip;D.edit("link",I)}else this.quill.format("link",!1)}}}}});var P=(function(T){_(N,T);function N(k,I){w(this,N);var D=S(this,(N.__proto__||Object.getPrototypeOf(N)).call(this,k,I));return D.preview=D.root.querySelector("a.ql-preview"),D}return l(N,[{key:"listen",value:function(){var I=this;o(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(D){I.root.classList.contains("ql-editing")?I.save():I.edit("link",I.preview.textContent),D.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(D){if(I.linkRange!=null){var O=I.linkRange;I.restoreFocus(),I.quill.formatText(O,"link",!1,d.default.sources.USER),delete I.linkRange}D.preventDefault(),I.hide()}),this.quill.on(d.default.events.SELECTION_CHANGE,function(D,O,$){if(D!=null){if(D.length===0&&$===d.default.sources.USER){var U=I.quill.scroll.descendant(g.default,D.index),B=s(U,2),L=B[0],A=B[1];if(L!=null){I.linkRange=new x.Range(D.index-A,L.length());var R=g.default.formats(L.domNode);I.preview.textContent=R,I.preview.setAttribute("href",R),I.show(),I.position(I.quill.getBounds(I.linkRange));return}}else delete I.linkRange;I.hide()}})}},{key:"show",value:function(){o(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),N})(p.BaseTooltip);P.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),i.default=E}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=a(29),o=ae(s),l=a(36),c=a(38),h=a(64),u=a(65),d=ae(u),p=a(66),f=ae(p),m=a(67),g=ae(m),x=a(37),v=a(26),b=a(39),j=a(40),w=a(56),S=ae(w),_=a(68),C=ae(_),E=a(27),P=ae(E),T=a(69),N=ae(T),k=a(70),I=ae(k),D=a(71),O=ae(D),$=a(72),U=ae($),B=a(73),L=ae(B),A=a(13),R=ae(A),F=a(74),q=ae(F),V=a(75),X=ae(V),M=a(57),W=ae(M),K=a(41),z=ae(K),Y=a(28),ie=ae(Y),ne=a(59),ve=ae(ne),pe=a(60),be=ae(pe),ye=a(61),ke=ae(ye),fe=a(108),se=ae(fe),ge=a(62),De=ae(ge);function ae(Q){return Q&&Q.__esModule?Q:{default:Q}}o.default.register({"attributors/attribute/direction":c.DirectionAttribute,"attributors/class/align":l.AlignClass,"attributors/class/background":x.BackgroundClass,"attributors/class/color":v.ColorClass,"attributors/class/direction":c.DirectionClass,"attributors/class/font":b.FontClass,"attributors/class/size":j.SizeClass,"attributors/style/align":l.AlignStyle,"attributors/style/background":x.BackgroundStyle,"attributors/style/color":v.ColorStyle,"attributors/style/direction":c.DirectionStyle,"attributors/style/font":b.FontStyle,"attributors/style/size":j.SizeStyle},!0),o.default.register({"formats/align":l.AlignClass,"formats/direction":c.DirectionClass,"formats/indent":h.IndentClass,"formats/background":x.BackgroundStyle,"formats/color":v.ColorStyle,"formats/font":b.FontClass,"formats/size":j.SizeClass,"formats/blockquote":d.default,"formats/code-block":R.default,"formats/header":f.default,"formats/list":g.default,"formats/bold":S.default,"formats/code":A.Code,"formats/italic":C.default,"formats/link":P.default,"formats/script":N.default,"formats/strike":I.default,"formats/underline":O.default,"formats/image":U.default,"formats/video":L.default,"formats/list/item":m.ListItem,"modules/formula":q.default,"modules/syntax":X.default,"modules/toolbar":W.default,"themes/bubble":se.default,"themes/snow":De.default,"ui/icons":z.default,"ui/picker":ie.default,"ui/icon-picker":be.default,"ui/color-picker":ve.default,"ui/tooltip":ke.default},!0),i.default=o.default}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0}),i.IndentClass=void 0;var s=(function(){function g(x,v){for(var b=0;b<v.length;b++){var j=v[b];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(x,j.key,j)}}return function(x,v,b){return v&&g(x.prototype,v),b&&g(x,b),x}})(),o=function g(x,v,b){x===null&&(x=Function.prototype);var j=Object.getOwnPropertyDescriptor(x,v);if(j===void 0){var w=Object.getPrototypeOf(x);return w===null?void 0:g(w,v,b)}else{if("value"in j)return j.value;var S=j.get;return S===void 0?void 0:S.call(b)}},l=a(0),c=h(l);function h(g){return g&&g.__esModule?g:{default:g}}function u(g,x){if(!(g instanceof x))throw new TypeError("Cannot call a class as a function")}function d(g,x){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:g}function p(g,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);g.prototype=Object.create(x&&x.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(g,x):g.__proto__=x)}var f=(function(g){p(x,g);function x(){return u(this,x),d(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return s(x,[{key:"add",value:function(b,j){if(j==="+1"||j==="-1"){var w=this.value(b)||0;j=j==="+1"?w+1:w-1}return j===0?(this.remove(b),!0):o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"add",this).call(this,b,j)}},{key:"canAdd",value:function(b,j){return o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"canAdd",this).call(this,b,j)||o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"canAdd",this).call(this,b,parseInt(j))}},{key:"value",value:function(b){return parseInt(o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"value",this).call(this,b))||void 0}}]),x})(c.default.Attributor.Class),m=new f("indent","ql-indent",{scope:c.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});i.IndentClass=m}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=a(4),o=l(s);function l(p){return p&&p.__esModule?p:{default:p}}function c(p,f){if(!(p instanceof f))throw new TypeError("Cannot call a class as a function")}function h(p,f){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:p}function u(p,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);p.prototype=Object.create(f&&f.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(p,f):p.__proto__=f)}var d=(function(p){u(f,p);function f(){return c(this,f),h(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f})(o.default);d.blotName="blockquote",d.tagName="blockquote",i.default=d}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=(function(){function f(m,g){for(var x=0;x<g.length;x++){var v=g[x];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(m,v.key,v)}}return function(m,g,x){return g&&f(m.prototype,g),x&&f(m,x),m}})(),o=a(4),l=c(o);function c(f){return f&&f.__esModule?f:{default:f}}function h(f,m){if(!(f instanceof m))throw new TypeError("Cannot call a class as a function")}function u(f,m){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:f}function d(f,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);f.prototype=Object.create(m&&m.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(f,m):f.__proto__=m)}var p=(function(f){d(m,f);function m(){return h(this,m),u(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return s(m,null,[{key:"formats",value:function(x){return this.tagName.indexOf(x.tagName)+1}}]),m})(l.default);p.blotName="header",p.tagName=["H1","H2","H3","H4","H5","H6"],i.default=p}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0}),i.default=i.ListItem=void 0;var s=(function(){function w(S,_){for(var C=0;C<_.length;C++){var E=_[C];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(S,E.key,E)}}return function(S,_,C){return _&&w(S.prototype,_),C&&w(S,C),S}})(),o=function w(S,_,C){S===null&&(S=Function.prototype);var E=Object.getOwnPropertyDescriptor(S,_);if(E===void 0){var P=Object.getPrototypeOf(S);return P===null?void 0:w(P,_,C)}else{if("value"in E)return E.value;var T=E.get;return T===void 0?void 0:T.call(C)}},l=a(0),c=f(l),h=a(4),u=f(h),d=a(25),p=f(d);function f(w){return w&&w.__esModule?w:{default:w}}function m(w,S,_){return S in w?Object.defineProperty(w,S,{value:_,enumerable:!0,configurable:!0,writable:!0}):w[S]=_,w}function g(w,S){if(!(w instanceof S))throw new TypeError("Cannot call a class as a function")}function x(w,S){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:w}function v(w,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);w.prototype=Object.create(S&&S.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(w,S):w.__proto__=S)}var b=(function(w){v(S,w);function S(){return g(this,S),x(this,(S.__proto__||Object.getPrototypeOf(S)).apply(this,arguments))}return s(S,[{key:"format",value:function(C,E){C===j.blotName&&!E?this.replaceWith(c.default.create(this.statics.scope)):o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"format",this).call(this,C,E)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(C,E){return this.parent.isolate(this.offset(this.parent),this.length()),C===this.parent.statics.blotName?(this.parent.replaceWith(C,E),this):(this.parent.unwrap(),o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"replaceWith",this).call(this,C,E))}}],[{key:"formats",value:function(C){return C.tagName===this.tagName?void 0:o(S.__proto__||Object.getPrototypeOf(S),"formats",this).call(this,C)}}]),S})(u.default);b.blotName="list-item",b.tagName="LI";var j=(function(w){v(S,w),s(S,null,[{key:"create",value:function(C){var E=C==="ordered"?"OL":"UL",P=o(S.__proto__||Object.getPrototypeOf(S),"create",this).call(this,E);return(C==="checked"||C==="unchecked")&&P.setAttribute("data-checked",C==="checked"),P}},{key:"formats",value:function(C){if(C.tagName==="OL")return"ordered";if(C.tagName==="UL")return C.hasAttribute("data-checked")?C.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function S(_){g(this,S);var C=x(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,_)),E=function(T){if(T.target.parentNode===_){var N=C.statics.formats(_),k=c.default.find(T.target);N==="checked"?k.format("list","unchecked"):N==="unchecked"&&k.format("list","checked")}};return _.addEventListener("touchstart",E),_.addEventListener("mousedown",E),C}return s(S,[{key:"format",value:function(C,E){this.children.length>0&&this.children.tail.format(C,E)}},{key:"formats",value:function(){return m({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(C,E){if(C instanceof b)o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"insertBefore",this).call(this,C,E);else{var P=E==null?this.length():E.offset(this),T=this.split(P);T.parent.insertBefore(C,T)}}},{key:"optimize",value:function(C){o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"optimize",this).call(this,C);var E=this.next;E!=null&&E.prev===this&&E.statics.blotName===this.statics.blotName&&E.domNode.tagName===this.domNode.tagName&&E.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(E.moveChildren(this),E.remove())}},{key:"replace",value:function(C){if(C.statics.blotName!==this.statics.blotName){var E=c.default.create(this.statics.defaultChild);C.moveChildren(E),this.appendChild(E)}o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"replace",this).call(this,C)}}]),S})(p.default);j.blotName="list",j.scope=c.default.Scope.BLOCK_BLOT,j.tagName=["OL","UL"],j.defaultChild="list-item",j.allowedChildren=[b],i.ListItem=b,i.default=j}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=a(56),o=l(s);function l(p){return p&&p.__esModule?p:{default:p}}function c(p,f){if(!(p instanceof f))throw new TypeError("Cannot call a class as a function")}function h(p,f){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:p}function u(p,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);p.prototype=Object.create(f&&f.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(p,f):p.__proto__=f)}var d=(function(p){u(f,p);function f(){return c(this,f),h(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f})(o.default);d.blotName="italic",d.tagName=["EM","I"],i.default=d}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=(function(){function m(g,x){for(var v=0;v<x.length;v++){var b=x[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(g,b.key,b)}}return function(g,x,v){return x&&m(g.prototype,x),v&&m(g,v),g}})(),o=function m(g,x,v){g===null&&(g=Function.prototype);var b=Object.getOwnPropertyDescriptor(g,x);if(b===void 0){var j=Object.getPrototypeOf(g);return j===null?void 0:m(j,x,v)}else{if("value"in b)return b.value;var w=b.get;return w===void 0?void 0:w.call(v)}},l=a(6),c=h(l);function h(m){return m&&m.__esModule?m:{default:m}}function u(m,g){if(!(m instanceof g))throw new TypeError("Cannot call a class as a function")}function d(m,g){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:m}function p(m,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);m.prototype=Object.create(g&&g.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(m,g):m.__proto__=g)}var f=(function(m){p(g,m);function g(){return u(this,g),d(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return s(g,null,[{key:"create",value:function(v){return v==="super"?document.createElement("sup"):v==="sub"?document.createElement("sub"):o(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this,v)}},{key:"formats",value:function(v){if(v.tagName==="SUB")return"sub";if(v.tagName==="SUP")return"super"}}]),g})(c.default);f.blotName="script",f.tagName=["SUB","SUP"],i.default=f}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=a(6),o=l(s);function l(p){return p&&p.__esModule?p:{default:p}}function c(p,f){if(!(p instanceof f))throw new TypeError("Cannot call a class as a function")}function h(p,f){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:p}function u(p,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);p.prototype=Object.create(f&&f.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(p,f):p.__proto__=f)}var d=(function(p){u(f,p);function f(){return c(this,f),h(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f})(o.default);d.blotName="strike",d.tagName="S",i.default=d}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=a(6),o=l(s);function l(p){return p&&p.__esModule?p:{default:p}}function c(p,f){if(!(p instanceof f))throw new TypeError("Cannot call a class as a function")}function h(p,f){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:p}function u(p,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);p.prototype=Object.create(f&&f.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(p,f):p.__proto__=f)}var d=(function(p){u(f,p);function f(){return c(this,f),h(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f})(o.default);d.blotName="underline",d.tagName="U",i.default=d}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=(function(){function x(v,b){for(var j=0;j<b.length;j++){var w=b[j];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(v,w.key,w)}}return function(v,b,j){return b&&x(v.prototype,b),j&&x(v,j),v}})(),o=function x(v,b,j){v===null&&(v=Function.prototype);var w=Object.getOwnPropertyDescriptor(v,b);if(w===void 0){var S=Object.getPrototypeOf(v);return S===null?void 0:x(S,b,j)}else{if("value"in w)return w.value;var _=w.get;return _===void 0?void 0:_.call(j)}},l=a(0),c=u(l),h=a(27);function u(x){return x&&x.__esModule?x:{default:x}}function d(x,v){if(!(x instanceof v))throw new TypeError("Cannot call a class as a function")}function p(x,v){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:x}function f(x,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);x.prototype=Object.create(v&&v.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(x,v):x.__proto__=v)}var m=["alt","height","width"],g=(function(x){f(v,x);function v(){return d(this,v),p(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return s(v,[{key:"format",value:function(j,w){m.indexOf(j)>-1?w?this.domNode.setAttribute(j,w):this.domNode.removeAttribute(j):o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"format",this).call(this,j,w)}}],[{key:"create",value:function(j){var w=o(v.__proto__||Object.getPrototypeOf(v),"create",this).call(this,j);return typeof j=="string"&&w.setAttribute("src",this.sanitize(j)),w}},{key:"formats",value:function(j){return m.reduce(function(w,S){return j.hasAttribute(S)&&(w[S]=j.getAttribute(S)),w},{})}},{key:"match",value:function(j){return/\.(jpe?g|gif|png)$/.test(j)||/^data:image\/.+;base64/.test(j)}},{key:"sanitize",value:function(j){return(0,h.sanitize)(j,["http","https","data"])?j:"//:0"}},{key:"value",value:function(j){return j.getAttribute("src")}}]),v})(c.default.Embed);g.blotName="image",g.tagName="IMG",i.default=g}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var s=(function(){function x(v,b){for(var j=0;j<b.length;j++){var w=b[j];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(v,w.key,w)}}return function(v,b,j){return b&&x(v.prototype,b),j&&x(v,j),v}})(),o=function x(v,b,j){v===null&&(v=Function.prototype);var w=Object.getOwnPropertyDescriptor(v,b);if(w===void 0){var S=Object.getPrototypeOf(v);return S===null?void 0:x(S,b,j)}else{if("value"in w)return w.value;var _=w.get;return _===void 0?void 0:_.call(j)}},l=a(4),c=a(27),h=u(c);function u(x){return x&&x.__esModule?x:{default:x}}function d(x,v){if(!(x instanceof v))throw new TypeError("Cannot call a class as a function")}function p(x,v){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:x}function f(x,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);x.prototype=Object.create(v&&v.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(x,v):x.__proto__=v)}var m=["height","width"],g=(function(x){f(v,x);function v(){return d(this,v),p(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return s(v,[{key:"format",value:function(j,w){m.indexOf(j)>-1?w?this.domNode.setAttribute(j,w):this.domNode.removeAttribute(j):o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"format",this).call(this,j,w)}}],[{key:"create",value:function(j){var w=o(v.__proto__||Object.getPrototypeOf(v),"create",this).call(this,j);return w.setAttribute("frameborder","0"),w.setAttribute("allowfullscreen",!0),w.setAttribute("src",this.sanitize(j)),w}},{key:"formats",value:function(j){return m.reduce(function(w,S){return j.hasAttribute(S)&&(w[S]=j.getAttribute(S)),w},{})}},{key:"sanitize",value:function(j){return h.default.sanitize(j)}},{key:"value",value:function(j){return j.getAttribute("src")}}]),v})(l.BlockEmbed);g.blotName="video",g.className="ql-video",g.tagName="IFRAME",i.default=g}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0}),i.default=i.FormulaBlot=void 0;var s=(function(){function j(w,S){for(var _=0;_<S.length;_++){var C=S[_];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(w,C.key,C)}}return function(w,S,_){return S&&j(w.prototype,S),_&&j(w,_),w}})(),o=function j(w,S,_){w===null&&(w=Function.prototype);var C=Object.getOwnPropertyDescriptor(w,S);if(C===void 0){var E=Object.getPrototypeOf(w);return E===null?void 0:j(E,S,_)}else{if("value"in C)return C.value;var P=C.get;return P===void 0?void 0:P.call(_)}},l=a(35),c=f(l),h=a(5),u=f(h),d=a(9),p=f(d);function f(j){return j&&j.__esModule?j:{default:j}}function m(j,w){if(!(j instanceof w))throw new TypeError("Cannot call a class as a function")}function g(j,w){if(!j)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:j}function x(j,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);j.prototype=Object.create(w&&w.prototype,{constructor:{value:j,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(j,w):j.__proto__=w)}var v=(function(j){x(w,j);function w(){return m(this,w),g(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}return s(w,null,[{key:"create",value:function(_){var C=o(w.__proto__||Object.getPrototypeOf(w),"create",this).call(this,_);return typeof _=="string"&&(window.katex.render(_,C,{throwOnError:!1,errorColor:"#f00"}),C.setAttribute("data-value",_)),C}},{key:"value",value:function(_){return _.getAttribute("data-value")}}]),w})(c.default);v.blotName="formula",v.className="ql-formula",v.tagName="SPAN";var b=(function(j){x(w,j),s(w,null,[{key:"register",value:function(){u.default.register(v,!0)}}]);function w(){m(this,w);var S=g(this,(w.__proto__||Object.getPrototypeOf(w)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return S}return w})(p.default);i.FormulaBlot=v,i.default=b}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0}),i.default=i.CodeToken=i.CodeBlock=void 0;var s=(function(){function _(C,E){for(var P=0;P<E.length;P++){var T=E[P];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(C,T.key,T)}}return function(C,E,P){return E&&_(C.prototype,E),P&&_(C,P),C}})(),o=function _(C,E,P){C===null&&(C=Function.prototype);var T=Object.getOwnPropertyDescriptor(C,E);if(T===void 0){var N=Object.getPrototypeOf(C);return N===null?void 0:_(N,E,P)}else{if("value"in T)return T.value;var k=T.get;return k===void 0?void 0:k.call(P)}},l=a(0),c=g(l),h=a(5),u=g(h),d=a(9),p=g(d),f=a(13),m=g(f);function g(_){return _&&_.__esModule?_:{default:_}}function x(_,C){if(!(_ instanceof C))throw new TypeError("Cannot call a class as a function")}function v(_,C){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:_}function b(_,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);_.prototype=Object.create(C&&C.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(_,C):_.__proto__=C)}var j=(function(_){b(C,_);function C(){return x(this,C),v(this,(C.__proto__||Object.getPrototypeOf(C)).apply(this,arguments))}return s(C,[{key:"replaceWith",value:function(P){this.domNode.textContent=this.domNode.textContent,this.attach(),o(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"replaceWith",this).call(this,P)}},{key:"highlight",value:function(P){var T=this.domNode.textContent;this.cachedText!==T&&((T.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=P(T),this.domNode.normalize(),this.attach()),this.cachedText=T)}}]),C})(m.default);j.className="ql-syntax";var w=new c.default.Attributor.Class("token","hljs",{scope:c.default.Scope.INLINE}),S=(function(_){b(C,_),s(C,null,[{key:"register",value:function(){u.default.register(w,!0),u.default.register(j,!0)}}]);function C(E,P){x(this,C);var T=v(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,E,P));if(typeof T.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var N=null;return T.quill.on(u.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(N),N=setTimeout(function(){T.highlight(),N=null},T.options.interval)}),T.highlight(),T}return s(C,[{key:"highlight",value:function(){var P=this;if(!this.quill.selection.composing){this.quill.update(u.default.sources.USER);var T=this.quill.getSelection();this.quill.scroll.descendants(j).forEach(function(N){N.highlight(P.options.highlight)}),this.quill.update(u.default.sources.SILENT),T!=null&&this.quill.setSelection(T,u.default.sources.SILENT)}}}]),C})(p.default);S.DEFAULTS={highlight:(function(){return window.hljs==null?null:function(_){var 
72C=window.hljs.highlightAuto(_);return C.value}})(),interval:1e3},i.CodeBlock=j,i.CodeToken=w,i.default=S}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'}),(function(r,i){r.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line>
72 <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'}),(function(r,i){r.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'}),(function(r,i){r.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'}),(function(r,i){r.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'}),(function(r,i){r.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'}),(function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0}),i.default=i.BubbleTooltip=void 0;var s=function C(E,P,T){E===null&&(E=Function.prototype);var N=Object.getOwnPropertyDescriptor(E,P);if(N===void 0){var k=Object.getPrototypeOf(E);return k===null?void 0:C(k,P,T)}else{if("value"in N)return N.value;var I=N.get;return I===void 0?void 0:I.call(T)}},o=(function(){function C(E,P){for(var T=0;T<P.length;T++){var N=P[T];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(E,N.key,N)}}return function(E,P,T){return P&&C(E.prototype,P),T&&C(E,T),E}})(),l=a(3),c=x(l),h=a(8),u=x(h),d=a(43),p=x(d),f=a(15),m=a(41),g=x(m);function x(C){return C&&C.__esModule?C:{default:C}}
vendor: 10,722 bytes, line 72
72function v(C,E){if(!(C instanceof E))throw new TypeError("Cannot call a class as a function")}function b(C,E){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:C}function j(C,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);C.prototype=Object.create(E&&E.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(C,E):C.__proto__=E)}var w=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],S=(function(C){j(E,C);function E(P,T){v(this,E),T.modules.toolbar!=null&&T.modules.toolbar.container==null&&(T.modules.toolbar.container=w);var N=b(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,P,T));return N.quill.container.classList.add("ql-bubble"),N}return o(E,[{key:"extendToolbar",value:function(T){this.tooltip=new _(this.quill,this.options.bounds),this.tooltip.root.appendChild(T.container),this.buildButtons([].slice.call(T.container.querySelectorAll("button")),g.default),this.buildPickers([].slice.call(T.container.querySelectorAll("select")),g.default)}}]),E})(p.default);S.DEFAULTS=(0,c.default)(!0,{},p.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(E){E?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var _=(function(C){j(E,C);function E(P,T){v(this,E);var N=b(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,P,T));return N.quill.on(u.default.events.EDITOR_CHANGE,function(k,I,D,O){if(k===u.default.events.SELECTION_CHANGE)if(I!=null&&I.length>0&&O===u.default.sources.USER){N.show(),N.root.style.left="0px",N.root.style.width="",N.root.style.width=N.root.offsetWidth+"px";var $=N.quill.getLines(I.index,I.length);if($.length===1)N.position(N.quill.getBounds(I));else{var U=$[$.length-1],B=N.quill.getIndex(U),L=Math.min(U.length()-1,I.index+I.length-B),A=N.quill.getBounds(new f.Range(B,L));N.position(A)}}else document.activeElement!==N.textbox&&N.quill.hasFocus()&&N.hide()}),N}return o(E,[{key:"listen",value:function(){var T=this;s(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){T.root.classList.remove("ql-editing")}),this.quill.on(u.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!T.root.classList.contains("ql-hidden")){var N=T.quill.getSelection();N!=null&&T.position(T.quill.getBounds(N))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(T){var N=s(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"position",this).call(this,T),k=this.root.querySelector(".ql-tooltip-arrow");if(k.style.marginLeft="",N===0)return N;k.style.marginLeft=-1*N-k.offsetWidth/2+"px"}}]),E})(d.BaseTooltip);_.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),i.BubbleTooltip=_,i.default=S}),(function(r,i,a){r.exports=a(63)})]).default})})(kp)),kp.exports}var fa,UP;function P0e(){if(UP)return fa;UP=1;var e=fa&&fa.__extends||(function(){var u=function(d,p){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,m){f.__proto__=m}||function(f,m){for(var g in m)m.hasOwnProperty(g)&&(f[g]=m[g])},u(d,p)};return function(d,p){u(d,p);function f(){this.constructor=d}d.prototype=p===null?Object.create(p):(f.prototype=p.prototype,new f)}})(),t=fa&&fa.__assign||function(){return t=Object.assign||function(u){for(var d,p=1,f=arguments.length;p<f;p++){d=arguments[p];for(var m in d)Object.prototype.hasOwnProperty.call(d,m)&&(u[m]=d[m])}return u},t.apply(this,arguments)},r=fa&&fa.__spreadArrays||function(){for(var u=0,d=0,p=arguments.length;d<p;d++)u+=arguments[d].length;for(var f=Array(u),m=0,d=0;d<p;d++)for(var g=arguments[d],x=0,v=g.length;x<v;x++,m++)f[m]=g[x];return f},i=fa&&fa.__importDefault||function(u){return u&&u.__esModule?u:{default:u}},a=i(Rt()),s=i(vj()),o=i(E0e()),l=i(k0e()),c=(function(u){e(d,u);function d(p){var f=u.call(this,p)||this;f.dirtyProps=["modules","formats","bounds","theme","children"],f.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],f.state={generation:0},f.selection=null,f.onEditorChange=function(g,x,v,b){var j,w,S,_;g==="text-change"?(w=(j=f).onEditorChangeText)===null||w===void 0||w.call(j,f.editor.root.innerHTML,x,b,f.unprivilegedEditor):g==="selection-change"&&((_=(S=f).onEditorChangeSelection)===null||_===void 0||_.call(S,x,b,f.unprivilegedEditor))};var m=f.isControlled()?p.value:p.defaultValue;return f.value=m??"",f}return d.prototype.validateProps=function(p){var f;if(a.default.Children.count(p.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(a.default.Children.count(p.children)){var m=a.default.Children.only(p.children);if(((f=m)===null||f===void 0?void 0:f.type)==="textarea")throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.")}if(this.lastDeltaChangeSet&&p.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")},d.prototype.shouldComponentUpdate=function(p,f){var m=this,g;if(this.validateProps(p),!this.editor||this.state.generation!==f.generation)return!0;if("value"in p){var x=this.getEditorContents(),v=(g=p.value,g??"");this.isEqualValue(v,x)||this.setEditorContents(this.editor,v)}return p.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,p.readOnly),r(this.cleanProps,this.dirtyProps).some(function(b){return!o.default(p[b],m.props[b])})},d.prototype.shouldComponentRegenerate=function(p){var f=this;return this.dirtyProps.some(function(m){return!o.default(p[m],f.props[m])})},d.prototype.componentDidMount=function(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())},d.prototype.componentWillUnmount=function(){this.destroyEditor()},d.prototype.componentDidUpdate=function(p,f){var m=this;if(this.editor&&this.shouldComponentRegenerate(p)){var g=this.editor.getContents(),x=this.editor.getSelection();this.regenerationSnapshot={delta:g,selection:x},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==f.generation){var v=this.regenerationSnapshot,g=v.delta,b=v.selection;delete this.regenerationSnapshot,this.instantiateEditor();var j=this.editor;j.setContents(g),h(function(){return m.setEditorSelection(j,b)})}},d.prototype.instantiateEditor=function(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())},d.prototype.destroyEditor=function(){this.editor&&this.unhookEditor(this.editor)},d.prototype.isControlled=function(){return"value"in this.props},d.prototype.getEditorConfig=function(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,scrollingContainer:this.props.scrollingContainer,tabIndex:this.props.tabIndex,theme:this.props.theme}},d.prototype.getEditor=function(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor},d.prototype.createEditor=function(p,f){var m=new l.default(p,f);return f.tabIndex!=null&&this.setEditorTabIndex(m,f.tabIndex),this.hookEditor(m),m},d.prototype.hookEditor=function(p){this.unprivilegedEditor=this.makeUnprivilegedEditor(p),p.on("editor-change",this.onEditorChange)},d.prototype.unhookEditor=function(p){p.off("editor-change",this.onEditorChange)},d.prototype.getEditorContents=function(){return this.value},d.prototype.getEditorSelection=function(){return this.selection},d.prototype.isDelta=function(p){return p&&p.ops},d.prototype.isEqualValue=function(p,f){return this.isDelta(p)&&this.isDelta(f)?o.default(p.ops,f.ops):o.default(p,f)},d.prototype.setEditorContents=function(p,f){var m=this;this.value=f;var g=this.getEditorSelection();typeof f=="string"?p.setContents(p.clipboard.convert(f)):p.setContents(f),h(function(){return m.setEditorSelection(p,g)})},d.prototype.setEditorSelection=function(p,f){if(this.selection=f,f){var m=p.getLength();f.index=Math.max(0,Math.min(f.index,m-1)),f.length=Math.max(0,Math.min(f.length,m-1-f.index)),p.setSelection(f)}},d.prototype.setEditorTabIndex=function(p,f){var m,g;!((g=(m=p)===null||m===void 0?void 0:m.scroll)===null||g===void 0)&&g.domNode&&(p.scroll.domNode.tabIndex=f)},d.prototype.setEditorReadOnly=function(p,f){f?p.disable():p.enable()},d.prototype.makeUnprivilegedEditor=function(p){var f=p;return{getHTML:function(){return f.root.innerHTML},getLength:f.getLength.bind(f),getText:f.getText.bind(f),getContents:f.getContents.bind(f),getSelection:f.getSelection.bind(f),getBounds:f.getBounds.bind(f)}},d.prototype.getEditingArea=function(){if(!this.editingArea)throw new Error("Instantiating on missing editing area");var p=s.default.findDOMNode(this.editingArea);if(!p)throw new Error("Cannot find element for editing area");if(p.nodeType===3)throw new Error("Editing area cannot be a text node");return p},d.prototype.renderEditingArea=function(){var p=this,f=this.props,m=f.children,g=f.preserveWhitespace,x=this.state.generation,v={key:x,ref:function(b){p.editingArea=b}};return a.default.Children.count(m)?a.default.cloneElement(a.default.Children.only(m),v):g?a.default.createElement("pre",t({},v)):a.default.createElement("div",t({},v))},d.prototype.render=function(){var p;return a.default.createElement("div",{id:this.props.id,style:this.props.style,key:this.state.generation,className:"quill "+(p=this.props.className,p??""),onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())},d.prototype.onEditorChangeText=function(p,f,m,g){var x,v;if(this.editor){var b=this.isDelta(this.value)?g.getContents():g.getHTML();b!==this.getEditorContents()&&(this.lastDeltaChangeSet=f,this.value=b,(v=(x=this.props).onChange)===null||v===void 0||v.call(x,p,f,m,g))}},d.prototype.onEditorChangeSelection=function(p,f,m){var g,x,v,b,j,w;if(this.editor){var S=this.getEditorSelection(),_=!S&&p,C=S&&!p;o.default(p,S)||(this.selection=p,(x=(g=this.props).onChangeSelection)===null||x===void 0||x.call(g,p,f,m),_?(b=(v=this.props).onFocus)===null||b===void 0||b.call(v,p,f,m):C&&((w=(j=this.props).onBlur)===null||w===void 0||w.call(j,S,f,m)))}}
72,d.prototype.focus=function(){this.editor&&this.editor.focus()},d.prototype.blur=function(){this.editor&&(this.selection=null,this.editor.blur())},d.displayName="React Quill",d.Quill=l.default,d.defaultProps={theme:"snow",modules:{},readOnly:!1},d})(a.default.Component);function h(u){Promise.resolve().then(u)}return fa=c,fa}var Fa=P0e();const dc=Zt(Fa),F$={toolbar:[[{header:[1,2,3,4,!1]}],["bold","italic","underline"],[{color:[]}],[{list:"bullet"}],[{align:[]}],[{script:"super"}]],clipboard:{matchVisual:!1},keyboard:{bindings:{"list autofill":null,tab:{key:9,handler:function(){const e=this.quill.getSelection().index;this.quill.insertText(e,"    "),this.quill.setSelection(e+4)}}}}},I0e={toolbar:[[{header:[1,2,3,4,!1]}],["bold","italic","underline"],[{list:"bullet"}],[{align:[]}],[{script:"super"}]],clipboard:{matchVisual:!1},keyboard:{bindings:{"list autofill":null,tab:{key:9,handler:function(){const e=this.quill.getSelection().index;this.quill.insertText(e,"    "),this.quill.setSelection(e+4)}}}}},vm={toolbar:!1},U$=["header","color","bold","italic","underline","align","list","bullet","script"],D0e=Fa.Quill.import("modules/clipboard"),R0e=Fa.Quill.import("delta");class O0e extends D0e{onPaste(t){t.preventDefault();const r=this.quill.getSelection(),i=t.clipboardData.getData("text/plain"),a=new R0e().retain(r.index).delete(r.length).insert(i),s=i.length+r.index,o=0;this.quill.updateContents(a,"silent"),this.quill.setSelection(s,o,"silent")}}Fa.Quill.register("modules/clipboard",O0e,!0);Fa.Quill.register(Fa.Quill.import("attributors/style/direction"),!0);Fa.Quill.register(Fa.Quill.import("attributors/style/align"),!0);Fa.Quill.register(Fa.Quill.import("attributors/style/size"),!0);function A0e(e){const{user:t,showSpinner:r,insights:i,isClientPiece:a,isInsightsVideo:s,newClientPieceFromPartnerInsight:o,insightsId:l,logEvent:c,showcaseInsightsToolkits:h,clientpieces:u,composerPermissions:d,modal:p,setModalStatus:f,isForAdvisor:m}=e,[g,x]=y.useState(0),[v,b]=y.useState(!1),j=Ys(),[w,S]=y.useState(!1),{Safari:_}=Aj,{IOS:C}=Mj,E="partnerinsight",P=ti(h?.advisor_notes_text);y.useEffect(()=>{if(p){f(!0),document.body.style.position="fixed",document.body.style.top=`-${j}px`,document.body.style.width="100%";const B=document.querySelector(".nav-wrapper");B.style.paddingLeft="10px",B.style.paddingRight="10px"}},[]),y.useEffect(()=>{const B=L=>$n(L,p,e.setModal,f);return window.addEventListener("keyup",B),()=>{window.removeEventListener("keyup",B)}},[p]);const T=B=>{B.preventDefault(),o(t.id,l).then(L=>{b(!0),x(L),f(!1)})},N=B=>{B.target.paused?B.target.play():B.target.pause()},k=()=>{c(t.id,h?.insight_key,m?"communitytoolkitadvisornotesvideo":"communityheroengagevideo","play")};if(v){const B=`commentaries/${g}`;return n.jsx(jn,{children:n.jsx(qt,{from:"insights",to:B})})}const I=i?.sections?.map((B,L)=>n.jsx("div",{children:n.jsx(dc,{id:"react-quill-id",readOnly:!0,modules:vm,value:B.content||`<img src=${B.chart_image_jpg_url} />`})},B.id??L)),D=n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"partner-insight-share-wrapper",children:n.jsxs("div",{className:"partner-insight-share-link-grp",children:[n.jsx("h4",{children:"Share this direct link"}),n.jsx("p",{className:"subheader",children:"Share a direct link to this insights video."}),n.jsx("div",{className:"content-link-group",children:n.jsx(Gs,{snippet:i?.hosted_url,embedType:E,isActive:!0})})]})}),n.jsx("div",{className:"insights-video-container",children:i?.rendered_video_url?n.jsx("video",{className:"insights-video",controls:!0,disablePictureInPicture:!0,controlsList:"nodownload",onClick:B=>{$j()===C||Sl().name===_?B.preventDefault():N(B)},src:i?.rendered_video_url,poster:`${i?.video_thumbnail}/?time=${Date.now()}`,onPlay:k}):n.jsx("div",{className:"featured-insights-video-placeholder",children:n.jsx("i",{className:"material-icons",children:"smart_display"})})})]}),O=n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"partner-insight-for-advisors-video-wrapper",children:h?.advisor_notes_video&&n.jsx("video",{onContextMenu:B=>B.preventDefault(),className:"partner-insight-for-advisors-video",src:`${h?.advisor_notes_video?.rendered_video_url}/?time=${Date.now()}`,controls:!0,disablePictureInPicture:!0,controlsList:"nodownload",poster:h?.advisor_notes_video?.video_thumbnail&&`${h?.advisor_notes_video?.video_thumbnail}/?time=${Date.now()}`,onPlay:k})}),h?.advisor_notes_text&&n.jsx("div",{className:"for-advisor-notes",dangerouslySetInnerHTML:{__html:P}})]}),$=u?.filter(B=>B.content_permissions_level<=d.content_permissions_level).length,U=()=>{S(!0),c(t.id,null,"communitycta","open")};return n.jsxs(n.Fragment,{children:[r?n.jsx(Dn,{}):null,n.jsxs(ot,{setModal:e.setModal,children:[n.jsxs("div",{className:`insights-toolkit-modal-container${m?" for-advisors":""}`,children:[n.jsxs("div",{className:`insights-toolkit-title-container${s?" insights-video":""}`,children:[n.jsxs("div",{className:"insights-toolkit-title-left",children:[n.jsx("div",{id:"insights-toolkit-title-name",children:m?"Notes for Advisors":i.title}),!m&&n.jsxs("div",{id:"insights-toolkit-title-date",children:[n.jsx("span",{children:"Updated "}),n.jsx(gn,{local:!0,format:"MMM D, YYYY",children:i.update_datetime})," "]})]}),n.jsxs("div",{className:"insights-toolkit-title-right",children:[n.jsx("i",{id:"modal-close-btn",className:"material-icons",onClick:()=>{f(!1),e.setModal(!1)},children:"close"}),a&&n.jsx(Ke,{interactive:!0,classes:{popper:"disabled-tooltip"},title:$>=d?.max_commentaries?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"upgrade-tooltip-msg",children:"You've reached the maximum number of commentaries you can personalize and share. Please upgrade to create this commentary."}),t.is_upgrade_disabled?n.jsxs("div",{className:"upgrade-submitted-tooltip",children:[n.jsx("i",{className:"material-icons",children:"done"}),"UPGRADE REQUESTED"]}):n.jsxs("button",{onClick:U,className:"upgrade-tooltip-btn",children:[n.jsx("i",{className:"material-icons",children:"open_in_new"}),"UPGRADE"]})]}):"",placement:"top",children:n.jsxs("div",{id:"insights-toolkit-btn",children:[$>=d?.max_commentaries&&n.jsx("i",{className:"material-icons locked-icon",children:"lock"}),n.jsx("button",{className:"btn-primary-icon",onClick:T,disabled:$>=d?.max_commentaries,"diagnostic-id":"toolkit-personalize-and-share-btn",children:n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"material-icons",children:"edit"}
72),"PERSONALIZE & SHARE"]})})]})})]})]}),n.jsx("div",{className:"workspace-container",children:a?I:s?D:m?O:null})]}),w&&n.jsx(ii,{setModal:S,modal:w})]})]})}const M0e=e=>({user:e.auth.user,showSpinner:e.composer.showSpinner,showcaseInsightsToolkits:e.insightsexplorer&&e.insightsexplorer.showcaseInsightsToolkits,clientpieces:e.composer&&e.composer.pieces,composerPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.composer_permissions}),bm=le(M0e,{newClientPieceFromPartnerInsight:g0,logEvent:_r,setModalStatus:Ii})(A0e),{apiAddress:_s}=Tn,$0e=(e,t,r)=>(i,a)=>{const s=`${_s}api/users/${e}/questionanswers/`,o={question:t,include_chart:r};return i({type:R6}),Ne.post(s,o,Ee(a)).then(l=>(i({type:O6,payload:l}),l),l=>{if(i({type:iu}),l.message!==Ue&&l.response&&l.response.status!==403&&i(he({serverError:"There was a problem answering your question, please try again"})),l.response&&l.response.data)return l.response})},L0e=(e,t,r,i)=>(a,s)=>{const o=`${_s}api/users/${t}/questionanswers/${e}/`,l={answer_text:i,save_status:r};return a({type:A6}),Ne.patch(o,l,Ee(s)).then(c=>(a({type:M6,payload:c.data}),a(he({alertMessage:"Your question has been saved"})),c)).catch(c=>{c.message!==Ue&&a(he({serverError:"There was a problem saving this question, please try again."}))})},I0=e=>(t,r)=>(t({type:T6}),Ne.get(`${_s}api/users/${e}/questionanswers/`,Ee(r)).then(i=>(t({type:k6,payload:i.data}),i)).catch(i=>{t({type:iu}),i.message!==Ue&&t(he({serverError:"There was a problem getting your saved questions, please try again"}))})),B$=(e,t)=>(r,i)=>(r({type:N6}),Ne.get(`${_s}api/users/${e}/questionanswers/${t}/`,Ee(i)).then(a=>(r({type:E6,payload:a.data}),a)).catch(a=>{r({type:iu}),a.message!==Ue&&r(he({serverError:"There was a problem getting your saved question, please try again"}))})),F0e=(e,t)=>(r,i)=>{const a=`${_s}api/users/${t}/questionanswers/${e}/`;return Ne.delete(a,Ee(i)).then(s=>(r({type:F6,id:e}),r(he({alertMessage:"Saved Question Successfully Deleted"})),s)).catch(s=>{s.message!==Ue&&r(he({serverError:"There was a problem deleting this question, please try again"}))})},U0e=e=>(t,r)=>(t({type:P6}),Ne.get(`${_s}api/users/${e}/priorityquestions/`,Ee(r)).then(i=>(t({type:I6,payload:i.data}),i)).catch(i=>{t({type:iu}),i.message!==Ue&&t(he({serverError:"There was a problem getting the top questions, please try again"}))})),B0e=(e,t,r,i)=>(a,s)=>{const o=`${_s}api/users/${e}/questionanswers/${t}/export/`,l={...Ee(s),responseType:"blob"},c={type:r||null,answer_text:i};return Ne.post(o,c,l)},q0e=(e,t,r)=>(i,a)=>{const s=`${_s}api/users/${e}/questionanswers/${t}/copychart/`,o={...Ee(a),responseType:"blob"};return Ne.get(s,o)},V0e=()=>e=>{e({type:D6})},z0e=(e,t)=>(r,i)=>{const a=`${_s}api/users/${e}/questionanswers/`,s={question_answer_id:t};return r({type:$6}),Ne.post(a,s,Ee(i)).then(o=>(r({type:L6,payload:o.data}),r(he({alertMessage:"New Client Question Created"})),o.data.id),o=>(r({type:iu}),o.message!==Ue&&r(he({serverError:"There was a problem creating this client question, please try again"})),Promise.reject(()=>{})))};function H0e(e){const{question:t,setModal:r,modalView:i,setModalStatus:a,setCreated:s,setNewItemId:o,newQuestionAnswerFromPartnerInsight:l,userId:c,isTopClientQuestionsModal:h,canUseQuestionAnswer:u,hedwigPermissions:d}=e,{Enabled:p}=_n,f=d?.allow_use_question_answer===p&&u?n.jsx("div",{className:"client-question-btns",children:n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"personalize-client-question-btn",disabled:!i,onClick:()=>{l(c,t.id).then(g=>{s(!0),a(!1),o(g)})},children:"PERSONALIZE & SHARE"})}):n.jsx(n.Fragment,{}),m=n.jsxs("div",{className:"answer-workspace",children:[n.jsxs("div",{className:"answer-container",children:[n.jsx("div",{className:"answer-left",children:n.jsx("div",{className:"answer-header-wrapper",children:n.jsx("div",{className:"answer-text",id:"answerText",children:t.answer_text})})}),t?.chart&&n.jsx("div",{className:"answer-right",children:n.jsx("div",{className:"chart-icon-answer-wrapper",children:n.jsxs("div",{className:`card-image-container${t?.chart.aspect_ratio==="16:9"?" size-aspect-16-9":""}${t?.chart?.is_locked?" locked":""}`,children:[n.jsx("div",{className:"chart-card-placeholder",children:n.jsx("i",{className:"material-icons",children:"description"})}),t?.chart?.is_locked?n.jsx(Ke,{title:"You do not have access to this chart",placement:"top",classes:{popper:"disabled-tooltip"},children:n.jsx("div",{className:"locked-card",children:n.jsx("i",{className:"material-icons","diagnostic-id":"material-lock-icon",children:"lock"})})}):n.jsx("div",{className:"chart-card-preview-btn","diagnostic-id":"chart-card-preview-btn",children:n.jsx("i",{className:"material-icons",children:"zoom_in"})}),n.jsx("div",{className:"card-image",onClick:()=>t?.chart?.is_locked?null:r(!0),children:t?.chart.chart_image_jpg_url?n.jsx("img",{alt:"",src:t?.chart.chart_image_jpg_url}):n.jsx("div",{className:"chart-image-placeholder"})})]})})})]}),!h&&f]});return h?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"top-client-question-modal-header-wrapper",children:[n.jsx("div",{className:"answer-section-header",children:"Client-Friendly Answer"}),f]}),m]}):n.jsx(n.Fragment,{children:m})}const G0e=e=>({userId:e.auth.user&&e.auth.user.id,showSpinner:e.questionanswer&&e.questionanswer.showSpinner,canUseQuestionAnswer:e.auth&&e.auth.user&&e.auth.user.can_use_question_answer,hedwigPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.hedwig_permissions}),q$=le(G0e,{setModalStatus:Ii,newQuestionAnswerFromPartnerInsight:z0e})(H0e);function W0e(e){const{question:t,user:r,modal:i,setModal:a,setModalStatus:s,modalStatus:o}=e,l=Ys(),[c,h]=y.useState(!1),[u,d]=y.useState(!1),[p,f]=y.useState(0),m=oa();return y.useEffect(()=>{i&&s(!0)},[u]),y.useEffect(()=>{if(o){document.body.style.position="fixed",document.body.style.top=`-${l}px`,document.body.style.width="100%";const g=document.querySelector(".nav-wrapper");g.style.paddingLeft="10px",g.style.paddingRight="10px"}},[o]),y.useEffect(()=>{const g=x=>$n(x,i,a,s);return window.addEventListener("keyup",g),()=>{window.removeEventListener("keyup",g)}},[i]),c?n.jsx(jn,{children:n.jsx(qt,{from:"partnerinsights",to:{pathname:"/questions",state:{id:p}}})}):t?n.jsxs(ot,{setModal:a,isTopClientQuestionsModal:!0,children:[n.jsxs("div",{className:"top-client-question-modal-container",children:[n.jsxs("div",{className:"client-question-header","diagnostic-id":"client-question-header",children:[n.jsx("h4",{children:t.question_text}),n.jsx("i",{id:"modal-close-btn",className:"material-icons",onClick:()=>{e.setModal(!1),s(!1),m.push("/insights?view=explorer")},children:"close"})]}),n.jsx(q$,{question:t,setModal:d,modalView:!0,setCreated:h,setNewItemId:f,isTopClientQuestionsModal:!0})]}),u&&n.jsx(Jo,{featuredChart:t?.chart,setChartModal:d,chartModal:u,isRecommendedChart:!0})]}):null}const Y0e=e=>({user:e.auth.user,modalStatus:e.preferences&&e.preferences.modalStatus}),D0=le(Y0e,{setModalStatus:Ii})(W0e),K0e=e=>{const{modal:t,setModal:r,task:i,showcaseInsightsToolkits:a}=e,s=oa(),[o,l]=y.useState(!1);y.useEffect(()=>{const u=d=>$n(d,t,r);return window.addEventListener("keyup",u),()=>{window.removeEventListener("keyup",u)}},[t,r]);const c=u=>{u.preventDefault(),i.frontend_action==="redirect"?s.push(i.frontend_route):i.frontend_action==="open"&&l(!0)};let h;switch(i.frontend_route){case"toolkit-commentary":h=n.jsx(bm,{setModal:r,insights:a?.client_piece,isClientPiece:!0,isInsightsVideo:!1,insightsId:a?.id,modal:t});break;case"client-question":h=n.jsx(D0,{question:a?.client_questions&&a?.client_questions[0],setModal:r,modal:t});break}return o?h:n.jsx(ot,{setModal:r,children:n.jsxs("div",{className:"explore-task-card-modal-container","diagnostic-id":"explore-task-card-modal-container",children:[n.jsx("div",{className:"info-modal-header-icon",children:n.jsx("i",{className:"material-symbols-outlined",children:"quick_reference"})}),n.jsx("h5",{"diagnostic-id":"explore-task-info-header",children:i.title}),n.jsx("p",{children:i?.description}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>{r(!1)},children:"CLOSE"}),n.jsx("button",{className:"btn btn-primary","diagnostic-id":"modal-primary-btn",onClick:c,children:"Continue"})]})]})})};function X0e(e){const{user:t,task:r,showcaseInsightsToolkits:i,noFade:a,style:s,showShortcuts:o,chartbooks:l,chartbookPermissions:c,maxChartbooks:h,logEvent:u}=e,[d,p]=y.useState(!1),[f,m]=y.useState(!1),[g,x]=y.useState(!1);l?.filter(S=>S.content_permissions_level<=c.content_permissions_level).length;let v;switch(r.frontend_route){case"toolkit-commentary":v=n.jsx(bm,{setModal:m,insights:i?.client_piece,isClientPiece:!0,isInsightsVideo:!1,insightsId:i?.id,modal:f});break;case"client-question":v=n.jsx(D0,{question:i?.client_questions&&i?.client_questions[0],setModal:m,modal:f});break}const b=S=>{S.preventDefault(),u(t.id,r.id,"task","open"),o?m(!0):p(!0)},j=()=>{u(t.id,null,"communitycta","open"),x(!0)},w=n.jsxs("div",{className:"task-card-grp truncate",children:[o?r.is_upgrade?n.jsx("span",{className:"material-icons",children:"workspace_premium"}):n.jsx(n.Fragment,{}):n.jsx(n.Fragment,{children:r.is_completed?n.jsx("span",{className:"material-icons task-status-ready-icon",children:"check"}):n.jsx("span",{className:"material-icons task-status-error-icon",children:"error"})}),r.title]});return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`col${a?"":" fadeTransition"}`,style:s,children:o?r.frontend_action==="redirect"?n.jsx(Ze,{to:r.frontend_route,children:n.jsx("div",{className:`explore-task-card${r.is_completed?" completed":" incomplete"}`,"diagnostic-id":"explore-task-card",children:w})}):r.frontend_action==="upgrade"?n.jsx("div",{className:`explore-task-card${r.is_upgrade?" upgrade-shortcut":""}`,"diagnostic-id":"explore-task-card",onClick:j,children:w}):n.jsx("div",{className:`explore-task-card${r.is_completed?" completed":" incomplete"}`,"diagnostic-id":"explore-task-card",onClick:b,children:w}):n.jsx("div",{className:`explore-task-card${r.is_completed?" completed":" incomplete"}`,"diagnostic-id":"explore-task-card",onClick:b,children:w})}),d&&n.jsx(K0e,{modal:d,setModal:p,task:r,showcaseInsightsToolkits:i}),f&&v,g&&n.jsx(ii,{setModal:x,modal:g})]})}const Q0e=e=>({user:e.auth.user,showcaseInsightsToolkits:e.insightsexplorer&&e.insightsexplorer.showcaseInsightsToolkits,chartbookPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.chartbook_permissions,chartbooks:e.chartbooks&&e.chartbooks.items,maxChartbooks:e.auth.user&&e.auth.user.company&&e.auth.user.company.chartbook_permissions&&e.auth.user.company.chartbook_permissions.max_chartbooks}),Z0e=le(Q0e,{logEvent:_r})(X0e);function J0e(e){const{chart:t,user:r,logEvent:i,isCommunity:a}=e,[s,o]=y.useState(!1),l=c=>{c.preventDefault(),o(!0),i(r.id,t.chart_info?.id,a?"communityexplorerchart":"featured-chart","open")};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"insights-explorer-card","diagnostic-id":"featured-chart-card",onClick:l,children:[n.jsxs("div",{className:"featured-chart-header",children:[n.jsx("div",{className:"insights-explorer-card-type",children:"Chart"}),n.jsx("div",{className:"priority-reasoning-container",children:n.jsx("div",{className:`priority-reasoning${t.priority_reason&&" "+t.priority_reason}`,"diagnostic-id":"priority-reasoning",children:t.priority_reason})})]}),n.jsxs("div",{className:"chart-card-image-container",children:[n.jsx("div",{className:"chart-card-image",children:t.chart_image_jpg_url?n.jsx("img",{alt:"",src:t.chart_image_jpg_url}):n.jsx("div",{className:"insights-explorer-image-placeholder"})}),n.jsx("div",{className:"chart-card-title-text",children:t.chart_info.name})]})]}),s&&n.jsx(n.Fragment,{children:n.jsx(Jo,{featuredChart:t,setChartModal:o,chartModal:s,isCommunity:a})})]})}const eSe=e=>({user:e.auth.user}),tSe=le(eSe,{logEvent:_r})(J0e);var ad={},BP;function nSe(){if(BP)return ad;BP=1;var e=vn(),t=bn();Object.defineProperty(ad,"__esModule",{value:!0}),ad.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72h-1.7z"}),"Mic");return ad.default=a,ad}var rSe=nSe();const iSe=Zt(rSe);var sd={},qP;function aSe(){if(qP)return sd;qP=1;var e=vn(),t=bn();Object.defineProperty(sd,"__esModule",{value:!0}),sd.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 14H6v-2h2v2zm0-3H6V9h2v2zm0-3H6V6h2v2zm7 6h-5v-2h5v2zm3-3h-8V9h8v2zm0-3h-8V6h8v2z"}),"SpeakerNotes");return sd.default=a,sd}var sSe=aSe();const oSe=Zt(sSe);function lSe(e){const{currentSlide:t,charts:r}=e;if(!r[t])return n.jsx(n.Fragment,{});const i=r[t].notes,a=i?i.note1:"",s=i?i.note2:"",o=i?i.note3:"";return(a||s||o)&&n.jsxs("div",{className:"chart-notes",children:[n.jsxs("h5",{children:[n.jsx("i",{className:"material-icons-outlined",children:"speaker_notes"}),"Talking Points"]}),n.jsxs("ul",{className:"note-list",children:[a?n.jsx("li",{"diagnostic-id":"chart-notes-1",children:a}):n.jsx(n.Fragment,{}),s?n.jsx("li",{"diagnostic-id":"chart-notes-2",children:s}):n.jsx(n.Fragment,{}),o?n.jsx("li",{"diagnostic-id":"chart-notes-3",children:o}):n.jsx(n.Fragment,{})]})]})}const cSe=e=>({currentSlide:e.slides.currentSlide,user:e.auth.user}
72),dSe=le(cSe,{})(lSe);function uSe(e){return e.chartUrl?n.jsx("div",{className:"chart-download-btn-container",children:n.jsx("a",{href:e.chartUrl,target:"_blank",rel:"noopener noreferrer",children:n.jsx("button",{className:"btn-primary-icon download-btn-icon","diagnostic-id":"chart-download-btn",children:n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"slide-download material-icons",children:"cloud_download"}),"Download Chart"]})})})}):null}function ds(e,t){if(e.length<=t)return e;const r=".:;,/?!- ";let i=t-3;for(;r.includes(e.slice(0,i+1).slice(-1));)i-=1;return e.slice(0,i+1)+"..."}function hSe(e){const{currentSlide:t,charts:r}=e,[i,a]=y.useState(!1),s=u=>{u.key==="Escape"&&i&&a(!1)};y.useEffect(()=>(window.addEventListener("keyup",s),()=>{window.removeEventListener("keyup",s)}),[s]);const o=r[t].chart_info.chart_methodology?.methodology_text,l=r[t].chart_info.chart_methodology?.date_range_text,c=r[t].chart_info.chart_methodology?.sources_text,h=n.jsx(ot,{setModal:a,children:n.jsxs("div",{className:"methodology-modal-container",children:[n.jsx("i",{className:"material-icons",onClick:()=>a(!1),children:"close"}),n.jsxs("h5",{children:[n.jsx("i",{className:"material-icons",children:"insights"}),"Methodology"]}),n.jsx("p",{children:o}),l&&n.jsx("div",{className:"methodology-date-range-text",children:n.jsxs("em",{children:["Date Range: ",l]})}),c&&n.jsx("div",{className:"methodology-sources-text",children:n.jsxs("em",{children:["Source: ",c]})})]})});return n.jsxs(n.Fragment,{children:[o&&n.jsxs("div",{className:"chart-methodology",children:[n.jsxs("h5",{children:[n.jsx("i",{className:"material-icons",children:"insights"}),"Methodology"]}),n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"methodology-text",children:ds(o,220)}),l&&n.jsx("div",{className:"methodology-date-range-text",children:n.jsxs("em",{children:["Date Range: ",l]})}),c&&n.jsx("div",{className:"methodology-sources-text",children:n.jsxs("em",{children:["Source: ",c]})}),n.jsx("button",{className:"btn-primary-text",onClick:()=>a(!0),children:"Read more"})]})]}),i&&n.jsx(n.Fragment,{children:h})]})}const pSe=e=>({currentSlide:e.slides.currentSlide}),fSe=le(pSe,{})(hSe);function mSe({cbId:e,noteId:t,handleCancel:r,setModal:i,deleteChartNotes:a,userId:s}){return n.jsx("div",{className:"fullscreen-container",onClick:o=>{o.preventDefault(),o.target===o.currentTarget&&i(!1)},children:n.jsxs("div",{className:"delete-modal-container",children:[n.jsx("h5",{children:"Please Confirm"}),n.jsx("p",{children:"Are you sure you want to revert the talking points for this slide?"}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel",onClick:()=>i(!1),children:"CANCEL"}),n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",onClick:()=>a(e,s,t).then(()=>r()),children:"REVERT"})]})]})})}const gSe=e=>({userId:e.auth.user&&e.auth.user.id}),vSe=le(gSe,{deleteChartNotes:Wme})(mSe);function bSe(e){const t=e.currentSlide?e.currentSlide:0,r=e.charts[t].chart_info.id,i=e.notes.find(h=>h.chart_info===r),[a,s]=y.useState(!1),o=i?i.id:null,l=i?i.type:null,{User:c}=U6;return n.jsxs(n.Fragment,{children:[n.jsx("span",{children:n.jsx("h4",{children:"Talking Points"})}),n.jsx(gt,{initialValues:{note1:i?i.note1:"",note2:i?i.note2:"",note3:i?i.note3:""},onSubmit:(h,{setSubmitting:u})=>{o&&l===c?e.editChartNotes(e.cbId,e.user.id,o,h.note1,h.note2,h.note3).then(e.handleCancel):e.addChartNotes(e.cbId,e.user.id,r,h.note1,h.note2,h.note3).then(e.handleCancel)},validationSchema:_t().shape({note1:Ae().max(140),note2:Ae().max(140),note3:Ae().max(140)}),enableReinitialize:!0,children:h=>{const{values:u,touched:d,errors:p,dirty:f,isSubmitting:m,handleChange:g}=h;return f!==e.isDirty&&e.setDirty(f),n.jsxs(vt,{style:{marginTop:"15px"},children:[n.jsxs("div",{className:"form-group",children:[n.jsx("label",{children:"Point 1"}),n.jsxs("div",{className:"character-count",children:[140-u.note1.length," characters left"]}),n.jsx(me,{component:Ra,value:u.note1,onChange:g,id:"note1",name:"note1","diagnostic-id":"chartnotes-input-1",maxLength:"140",className:p.note1&&d.note1?"text-input error":"materialize-textarea"})]}),n.jsxs("div",{className:"form-group",children:[n.jsx("label",{children:"Point 2"}),n.jsxs("div",{className:"character-count",children:[140-u.note2.length," characters left"]}),n.jsx(me,{component:Ra,value:u.note2,onChange:g,id:"note2",name:"note2","diagnostic-id":"chartnotes-input-2",maxLength:"140",className:p.note2&&d.note2?"text-input error":"materialize-textarea"})]}),n.jsxs("div",{className:"form-group",children:[n.jsx("label",{children:"Point 3"}),n.jsxs("div",{className:"character-count",children:[140-u.note3.length," characters left"]}),n.jsx(me,{component:Ra,value:u.note3,onChange:g,id:"note3",name:"note3","diagnostic-id":"chartnotes-input-3",maxLength:"140",className:p.note3&&d.note3?"text-input error":"materialize-textarea"})]}),n.jsxs("div",{className:"form-group",style:{textAlign:"right"},children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"cancel-chartnotes-btn",onClick:e.handleCancel,children:"Cancel"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"save-chartnotes-btn",disabled:!f||m,children:"SAVE"})]})]})}}),i&&i.author===e.user.email&&o&&n.jsxs(n.Fragment,{children:[n.jsx("hr",{}),n.jsxs("p",{children:["Revert to original talking points"," ",n.jsx("span",{style:{color:"red"},children:"(warning: your custom notes on this slide will be lost)"})]}),n.jsx("div",{className:"form-group",style:{textAlign:"right"},children:n.jsx("button",{type:"button",className:"btn-danger","diagnostic-id":"revert-chartnotes-btn",onClick:()=>s(!0),children:"REVERT"})}),a&&n.jsx(vSe,{setModal:s,handleCancel:e.handleCancel,cbId:e.cbId,noteId:o})]})]})}const ySe=e=>({cbId:e.chartbooks.item.id,currentSlide:e.slides.currentSlide,user:e.auth.user}),xSe=le(ySe,{editChartNotes:Hme,addChartNotes:Gme})(bSe);function jSe(e){const t=e.chartbook;return n.jsx(gt,{initialValues:{setting:t?.include_notes?`${t.include_notes}`:"0"},onSubmit:(r,{setSubmitting:i})=>{e.editChartbookNotesSettings(t.id,e.userId,r.setting)},enableReinitialize:!0,children:({dirty:r})=>
72n.jsxs(vt,{style:{marginTop:"15px"},children:[n.jsx("p",{style:{fontSize:"16px"},children:"Include these talking points on slides"}),n.jsxs("div",{className:"form-group","diagnostic-id":"chart-notes-settings",role:"radiogroup",children:[n.jsx(me,{component:mt,name:"setting",diagId:"chart-notes-setting",id:"2",label:"Only your custom talking points"}),n.jsx(me,{component:mt,name:"setting",diagId:"chart-notes-setting",id:"1",label:"All talking points"}),n.jsx(me,{component:mt,name:"setting",diagId:"chart-notes-setting",id:"0",label:"None"})]}),n.jsx("div",{className:"form-group",style:{textAlign:"right"},children:n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"update-chartnotes-btn",disabled:!r,children:"Update"})})]})})}const wSe=e=>({chartbook:e.chartbooks.item,userId:e.auth.user&&e.auth.user.id}),SSe=le(wSe,{editChartbookNotesSettings:Jme})(jSe);class _Se extends y.Component{constructor(){super(...arguments),this.state={edit:!1},this.handleEdit=()=>{this.setState({edit:!0}),this.props.setScrim(!0)},this.handleCancel=()=>{this.setState({edit:!1}),this.props.setDirty(!1),this.props.setScrim(!1)}}render(){const{Locked:t,Disabled:r,Enabled:i}=_n,{charts:a,notes:s,showSettingsForm:o,showEdit:l,showAuthorDatetime:c,hideCover:h,helpIcon:u}=this.props,d=this.props.currentSlide?this.props.currentSlide:h?0:-1,{hideTalkingPoints:p,talkingPointsPos:f}=this.props;if(!p&&!h&&d===-1)return n.jsx("div",{"diagnostic-id":"chart-notes-section",id:"chart-notes-container",className:`col ${f==="0"?"s6 m5 l4":f==="1"?"s12 m12 l12":"s12 l4 xl4"}`,children:o?n.jsxs("div",{className:"chart-notes",children:[n.jsx("span",{children:n.jsxs("h5",{children:["Talking Points ",u]})}),n.jsx(SSe,{})]}):n.jsx(n.Fragment,{})});if(h&&d===-1)return n.jsx(n.Fragment,{});if(!a[d])return n.jsx(n.Fragment,{});const m=a[d].chart_info.id,g=s.find(P=>P.chart_info===m),x=g?g.note1:"",v=g?g.note2:"",b=g?g.note3:"",j=g&&g.author?g.author:"Clearnomics",w=g&&g.update_datetime?g.update_datetime:Date.now(),S=(()=>{switch(this.props.permission){case i:return n.jsxs("button",{className:"btn-primary-icon-text",onClick:this.handleEdit,children:[n.jsx("i",{className:"material-icons","diagnostic-id":"edit-chartnotes-btn",children:"edit"}),"Edit"]});case t:return n.jsx(Ke,{title:"Upgrade to customize talking points",placement:"top",children:n.jsxs("div",{className:"chart-notes-lock","diagnostic-id":"chart-notes-lock",children:[n.jsx("i",{className:"material-icons","diagnostic-id":"material-lock-icon",children:"lock"}),"EDIT"]})});case r:default:return n.jsx(n.Fragment,{})}})(),_=this.props.currentSlide>=1?this.props.charts[this.props.currentSlide].chart_image_disclosures_png_url:"",C=n.jsxs("div",{children:[l&&n.jsxs(n.Fragment,{children:[n.jsxs("h5",{children:[n.jsx("i",{className:"material-icons-outlined",children:"speaker_notes"}),"Talking Points"]}),S]}),c&&n.jsx("p",{style:{fontStyle:"italic"},children:n.jsxs("span",{children:["Updated by ",j,n.jsx("br",{}),n.jsx(gn,{local:!0,format:"MMM D, YYYY",children:w})]})}),n.jsxs("ul",{className:"note-list",children:[x?n.jsx("li",{"diagnostic-id":"chart-notes-1",children:x}):n.jsx(n.Fragment,{}),v?n.jsx("li",{"diagnostic-id":"chart-notes-2",children:v}):n.jsx(n.Fragment,{}),b?n.jsx("li",{"diagnostic-id":"chart-notes-3",children:b}):n.jsx(n.Fragment,{})]})]}),E=n.jsx(xSe,{handleCancel:this.handleCancel,charts:a,notes:s,isDirty:this.props.isDirty,setDirty:this.props.setDirty});return p?n.jsx(n.Fragment,{}):n.jsxs("div",{"diagnostic-id":"chart-notes-section",id:"chart-notes-container",className:`col ${f==="0"?"s6 m5 l4":f==="1"?"s12 m12 l12":"s12 l4 xl4"}`,children:[n.jsx(uSe,{chartUrl:_}),n.jsx("div",{className:"chart-notes"+(this.state.edit?" edit":""),children:this.state.edit?E:C}),n.jsx(fSe,{charts:a})]})}}const CSe=e=>({currentSlide:e.slides.currentSlide,user:e.auth.user}),NSe=le(CSe,{setScrim:hn})(zt(_Se));var Fi={fullscreenEnabled:0,fullscreenElement:1,requestFullscreen:2,exitFullscreen:3,fullscreenchange:4,fullscreenerror:5,fullscreen:6},VP=["webkitFullscreenEnabled","webkitFullscreenElement","webkitRequestFullscreen","webkitExitFullscreen","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],zP=["mozFullScreenEnabled","mozFullScreenElement","mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],HP=["msFullscreenEnabled","msFullscreenElement","msRequestFullscreen","msExitFullscreen","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"],gi=typeof window<"u"&&typeof window.document<"u"?window.document:{},Ji="fullscreenEnabled"in gi&&Object.keys(Fi)||VP[0]in gi&&VP||zP[0]in gi&&zP||HP[0]in gi&&HP||[],is={requestFullscreen:function(e){return e[Ji[Fi.requestFullscreen]]()},requestFullscreenFunction:function(e){return e[Ji[Fi.requestFullscreen]]},get exitFullscreen(){return gi[Ji[Fi.exitFullscreen]].bind(gi)},get fullscreenPseudoClass(){return":"+Ji[Fi.fullscreen]},addEventListener:function(e,t,r){return gi.addEventListener(Ji[Fi[e]],t,r)},removeEventListener:function(e,t,r){return gi.removeEventListener(Ji[Fi[e]],t,r)},get fullscreenEnabled(){return!!gi[Ji[Fi.fullscreenEnabled]]},set fullscreenEnabled(e){},get fullscreenElement(){return gi[Ji[Fi.fullscreenElement]]},set fullscreenElement(e){},get onfullscreenchange(){return gi[("on"+Ji[Fi.fullscreenchange]).toLowerCase()]},set onfullscreenchange(e){return gi[("on"+Ji[Fi.fullscreenchange]).toLowerCase()]=e},get onfullscreenerror(){return gi[("on"+Ji[Fi.fullscreenerror]).toLowerCase()]},set onfullscreenerror(e){return gi[("on"+Ji[Fi.fullscreenerror]).toLowerCase()]=e}};function ESe(){var e=y.useState(!1),t=e[0],r=e[1],i=y.useRef(null);y.useEffect(function(){var o=function(){r(is.fullscreenElement===i.current)};return is.addEventListener("fullscreenchange",o),function(){return is.removeEventListener("fullscreenchange",o)}},[]);var a=y.useCallback(function(){if(is.fullscreenElement)return is.exitFullscreen().then(function(){return is.requestFullscreen(i.current)});if(i.current)return is.requestFullscreen(i.current)},[]),s=y.useCallback(function(){return is.fullscreenElement===i.current?is.exitFullscreen():Promise.resolve()},[]);return y.useMemo(function(){return{active:t,enter:a,exit:s,node:i}},[t,a,s])}var TSe=function(t){var r=t.handle,i=t.onChange,a=t.children,s=t.className,o=[];return s&&o.push(s),o.push("fullscreen"),r.active&&o.push("fullscreen-enabled"),y.useEffect(function(){i&&i(r.active,r)},[r.active]),Me.createElement("div",{className:o.join(" "),ref:r.node,style:r.active?{height:"100%",width:"100%"}:void 0},a)};
72function kSe(e){const{selectCharts:t,deselectChart:r,selectedChartIds:i,currentSlide:a,charts:s}=e;if(!s[a])return n.jsx(n.Fragment,{});const o=s[a],l=s[a].chart_info.id,c=i?.includes(l),h=()=>{c?r(l):t([l])};return n.jsxs("div",{className:"chart-library-chart-header-container",children:[n.jsx("h6",{"diagnostic-id":"chart-library-chart-header",children:o.chart_info.name}),n.jsxs("div",{className:"buttons",children:[n.jsx("a",{href:o.chart_image_disclosures_png_url,target:"_blank",rel:"noopener noreferrer",children:n.jsx("button",{type:"button",className:"btn-primary-icon chart-library-download-btn","diagnostic-id":"chart-download-btn",children:n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"material-icons",children:"cloud_download"}),"Download"]})})}),c?n.jsx("button",{type:"button",className:"btn btn-primary-icon delete-btn","diagnostic-id":"remove-chart-primary-btn",onClick:h,children:n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"material-icons",children:"delete_forever"}),"Remove"]})}):n.jsx("button",{type:"button",className:"btn-primary-icon","diagnostic-id":"add-chart-primary-btn",onClick:h,children:n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"material-icons",children:"add"}),"Add"]})})]})]})}const PSe=e=>({selectedChartIds:e.chartlibrary&&e.chartlibrary.selectedChartIds,currentSlide:e.slides.currentSlide}),ISe=le(PSe,{selectCharts:p$,deselectChart:v0})(kSe);function GP(e){const{slidesToShow:t,selectedSlide:r,chartSlides:i,goToSlide:a,hasTransitionClass:s,chartImages:o,selectDisabled:l,numClones:c,chartsToDisplayCheck:h,isChartLibrary:u,selectedChartIds:d}=e,[p,f]=y.useState(0),m=y.useRef(null),g=u?t-1:t-2,x=.6*p;y.useEffect(()=>{let b=null;m.current&&f(m.current.getBoundingClientRect().width);const j=()=>{clearTimeout(b),m.current&&(b=setTimeout(()=>f(m.current.getBoundingClientRect().width),10))};return window.addEventListener("resize",j),()=>{window.removeEventListener("resize",j)}},[m.current]);const v=(b,j)=>n.jsxs("div",{className:`chart-card${r===j?" current-card":""}`,onClick:()=>l?null:a(j),children:[n.jsx("div",{className:`chart-card-title${r===j||d?.includes(b[3].id)?" selected":""}`,children:n.jsx("div",{children:b[3].name})}),d?.includes(b[3].id)?n.jsx("div",{className:"title-checkmark","diagnostic-id":"checkmark",children:n.jsx("i",{className:"material-icons",children:"done"})}):n.jsx(n.Fragment,{}),b[3]?.company?.logo&&n.jsx("div",{className:"chart-card-logo-container",children:n.jsx("img",{src:b[3]?.company?.logo,alt:""})}),n.jsx("div",{className:"carousel-slide-inner",children:n.jsx("img",{"chart-id":b[0],alt:`Chart ID ${b[0]}`,className:"carousel-img chart-img fadeTransition",src:b[1],"diagnostic-id":`chart-img-${j}`})},b[0])]});return n.jsx("div",{className:`carousel-container${s?" transition-carousel":""}${h?"":" sm-carousel-container"}`,style:h?{transform:r<c?`translateX(${(t-r+1)*p-(g*p+x)}px)`:`translateX(-${g*p+x+-1*(t-r+1)*p}px)`}:{transform:"none"},children:i.map((b,j)=>n.jsx("div",{className:`carousel-slide${u?" chart-library fadeTransition":""}`,ref:m,children:u?v(b,j):n.jsx("div",{className:"carousel-slide-inner",onClick:()=>l?null:a(j),children:n.jsx("img",{"chart-id":b[0],alt:`Chart ID ${b[0]}`,className:`carousel-img chart-img${r===j?" selected":""}`,src:b[1],"diagnostic-id":`chart-img-${j}`})},b[0])},j))})}function DSe(e){const{selectedSlide:t,setLeftAndRightDisabled:r,setHasTransitionClass:i,setSelectedSlide:a,leftAndRightDisabled:s,hasTransitionClass:o,handleFullscreen:l,chartSlides:c,slidesToShow:h,selectDisabled:u,setSelectDisabled:d,chartsToDisplayCheck:p,charts:f,numClones:m,previousSlide:g,setPreviousSlide:x}=e,v=350,b=650,j=f.length,w=y.useRef(null),[S,_]=y.useState(0);y.useEffect(()=>{let P=null;w.current&&_(w.current.getBoundingClientRect().width);const T=()=>{clearTimeout(P),w.current&&(P=setTimeout(()=>_(w.current.getBoundingClientRect().width),10))};return window.addEventListener("resize",T),()=>{window.removeEventListener("resize",T)}},[w.current,w.current?.getBoundingClientRect().width]);const C=()=>{const P=t-g;let T;const N=t<m,k=t>=m+j,I=N||k;P>0?T=t:P<0&&(T=c.length-t);const D=m+(T-m)%j;I?(d(!0),r(!0),N?setTimeout(()=>{i(!1),a(c.length-D)},v):k&&setTimeout(()=>{i(!1),a(D)},v)):setTimeout(()=>{i(!0)},v)};y.useEffect(()=>{p?(t-m<j&&t-m>=0&&e.selectSlide(t-m),C()):e.selectSlide(t)},[t,g]),y.useEffect(()=>{s&&setTimeout(()=>{r(!1)},b)},[s]),y.useEffect(()=>{u&&setTimeout(()=>{d(!1)},b)},[u]);const E=()=>"-"+t*S+"px";return n.jsx("div",{className:`slides-container ${o?"transition":""}`,style:{left:E()},ref:w,children:c.map((P,T)=>n.jsx("div",{className:"slide",children:n.jsx("div",{className:"slide-inner",children:n.jsx("img",{"chart-id":P[0],alt:`Chart ID ${P[0]}`,className:`chart-img${l.active?" fullscreen-active":" fullscreen-inactive"}`,src:P[1],"diagnostic-id":`chart-img-${T}`})},P[0])},T))})}const RSe=e=>({currentSlide:e.slides.currentSlide}),OSe=le(RSe,{selectSlide:Qf})(DSe);function ASe(e){const{charts:t,isPartnerInsight:r,isChartLibrary:i,selectedTopicId:a,selectedChartIds:s}=e,o=e.charts.map(X=>
72[X.id,X.chart_image_jpg_url,X.chart_image_disclosures_png_url,i&&X.chart_info]),l=i?3:6,c=e.charts.length>l,h=c?l+1:e.charts.length,u=i?h:h-1,[d,p]=y.useState(c?u:0),[f,m]=y.useState(d),[g,x]=y.useState(o),[v,b]=y.useState(!0),[j,w]=y.useState(!1),[S,_]=y.useState(!1),[C,E]=y.useState(null),{hideTalkingPoints:P,talkingPointsPos:T,hidePreview:N}=e;y.useEffect(()=>{e.selectSlide(0),d===u&&b(!1)},[]),y.useEffect(()=>{i&&(e.selectSlide(0),p(c?u:0))},[c,e.charts.length,e.topicName]),y.useEffect(()=>{if(c){const X=[...o];X.unshift(...o.slice(-1*u)),X.push(...o.slice(0,u)),x(X)}else x(o)},[t,c]);const k=()=>{const X=d;c||d>0?p(d-1):d===0&&p(g.length-1),m(X)},I=()=>{const X=d;c||d<e.charts.length-1?p(d+1):d===e.charts.length-1&&p(0),m(X)},D=X=>{const M=d;p(X%g.length),m(M)},O=X=>{const M=X.touches[0].clientX;E(M)},$=X=>{const M=C;if(M===null)return;const W=X.touches[0].clientX,K=M-W;K>5?I():K<-5&&k(),E(null)},U=ESe(),B=()=>["iPhone Simulator","iPhone"].includes(navigator.platform)||navigator.userAgent.includes("iPhone")&&!navigator.userAgent.includes("iPad"),L=X=>{X==="left"?k():X==="right"&&I()},A=document.getElementsByClassName("fullscreen-enabled"),R=X=>{const M=[39,40],W=[37,38];A.length>0&&(S||(X.type==="keyup"?M.includes(X.which)?L("right"):W.includes(X.which)&&L("left"):X==="left"?L("left"):X==="right"&&L("right")))};y.useEffect(()=>(window.addEventListener("keyup",R),()=>{window.removeEventListener("keyup",R)}),[R]);const F={selectedSlide:d,setLeftAndRightDisabled:_,setHasTransitionClass:b,setSelectedSlide:p,leftAndRightDisabled:S,hasTransitionClass:v,chartSlides:g,goToSlide:D,slidesToShow:h,handleFullscreen:U,chartImages:o,selectDisabled:j,setSelectDisabled:w,numClones:u,chartsToDisplayCheck:c,charts:t,previousSlide:f,setPreviousSlide:m};if(e.charts.length<=e.currentSlide)return null;const q=n.jsxs("div",{className:"slider-and-arrows-container",children:[U.active&&n.jsx("i",{onClick:U.exit,className:"material-icons","diagnostic-id":"fullscreen-close-btn",id:"fullscreen-close",children:"close"}),n.jsx(OSe,{...F}),e.charts.length>1?n.jsxs("div",{id:"arrows-container",children:[n.jsx(dt,{icon:wS,"diagnostic-id":"chart-prev-btn",onClick:()=>S?null:L("left")}),n.jsx(dt,{icon:SS,"diagnostic-id":"chart-next-btn",onClick:()=>S?null:L("right")})]}):n.jsx(n.Fragment,{}),!B()&&!U.active&&n.jsx("button",{className:"fullscreen-icon-container",children:n.jsx(dt,{icon:B6,"diagnostic-id":"fullscreen-open-btn",onClick:U.enter})})]}),V=n.jsxs("div",{className:`carousel${i?" chart-library-carousel fadeTransition":""}`,children:[!N&&i&&n.jsxs(n.Fragment,{children:[n.jsx("div",{id:"nav-slider","diagnostic-id":"chart-slider-preview-carousel",onTouchStart:O,onTouchMove:$,children:n.jsxs("div",{className:"carousel-selector-and-arrows-container",children:[n.jsx(GP,{...F,isChartLibrary:i,selectedChartIds:s}),e.charts.length>1?n.jsxs("div",{id:"selector-arrows-container",children:[n.jsx(dt,{icon:wS,"diagnostic-id":"chart-carousel-prev-btn",onClick:()=>S?null:L("left")}),n.jsx(dt,{icon:SS,"diagnostic-id":"chart-carousel-next-btn",onClick:()=>S?null:L("right")})]}):n.jsx(n.Fragment,{})]})}),n.jsx(ISe,{charts:t})]}),n.jsx(TSe,{handle:U,children:q}),!N&&!i&&n.jsx("div",{id:"nav-slider","diagnostic-id":"chart-slider-preview-carousel",onTouchStart:O,onTouchMove:$,children:n.jsx(GP,{...F})})]});return r?V:n.jsx("div",{className:`col ${P?"s12 m12 l12":T==="0"?"s6 m7 l8":T==="1"||i?"s12 m12 l12":"s12 m12 l8 xl8"}`,style:{position:"relative"},children:V})}const MSe=e=>({currentSlide:e.slides.currentSlide}),V$=le(MSe,{selectSlide:Qf})(ASe);function $Se(e){const{setScrim:t,setDirty:r,isDirty:i,currentSlide:a,selectSlide:s,ChartNotesForm:o,ChartNotesSettings:l,showEdit:c,showAuthorDatetime:h,hideCover:u,hidePreview:d,hideTalkingPoints:p,talkingPointsPos:f,hideDownloadButton:m,isPartnerInsight:g,showNotes:x,chart:v}=e,{Locked:b,Disabled:j,Enabled:w}=_n,S=oc[l$],_=n.jsx(Mo,{id:"talking-points-help",helpAttrs:S}),C=e.user?.account_permissions&&(e.user.account_permissions.allow_talkingpoints===w||e.user.account_permissions.allow_talkingpoints===b),E=e.user?.account_permissions?e.user.account_permissions.allow_talkingpoints:j,P=e.chartbook?.charts?.slice(0)||[v].slice(0),T=e.chartbook?.notes||v?.notes,N={id:0,chart_image_png_url:e.chartbook?.cover_image_url,chart_image_webp_url:e.chartbook?.cover_image_webp_url,chart_image_jpg_url:e.chartbook?.cover_image_jpg_url,chart_info:{}};P&&(P.length===0||P[0].id!==0)&&!e.hideCover&&P.unshift(N);const k={setScrim:t,setDirty:r,isDirty:i,charts:P,currentSlide:a,notes:T,permission:E,ChartNotesForm:o,ChartNotesSettings:l,showSettingsForm:C,showEdit:!0,showAuthorDatetime:!0,hideCover:u,hideTalkingPoints:p,talkingPointsPos:f,helpIcon:_},I={charts:P,selectSlide:s,currentSlide:a,hidePreview:d,hideDownloadButton:m,hideTalkingPoints:p,talkingPointsPos:f};return n.jsxs(n.Fragment,{children:[n.jsx(V$,{...I,isPartnerInsight:g}),g?x?n.jsx(dSe,{charts:P}):n.jsx(n.Fragment,{}):n.jsx(NSe,{...k})]})}const LSe=e=>({user:e.auth.user,currentSlide:e.slides.currentSlide}),z$=le(LSe,{setScrim:hn,selectSlide:Qf})(zt($Se));function H$(e){const{editorItem:t}=e;return n.jsx(n.Fragment,{children:n.jsx("div",{className:"gallery-card-caption solution",children:n.jsxs("div",{className:"gallery-card-caption-left",children:[n.jsx("div",{className:"gallery-card-type",children:"Q&A"}),n.jsx("div",{className:"gallery-card-title-text",children:t?.question_text}),t?.answer_text&&n.jsx("div",{className:"gallery-card-description",children:ds(t?.answer_text,130)}),t?.update_datetime&&n.jsxs("div",{className:"gallery-card-datetime",children:[n.jsx("span",{children:t?.is_edited?"Last edited on "
72:"Asked on "}),n.jsx(gn,{local:!0,format:"MMM D, YYYY h:mma",children:t.update_datetime})," ",new Date().toLocaleTimeString("en-us",{timeZoneName:"short"}).split(" ")[2]]})]})})})}function G$(e){const{editorItem:t,isOnWorkspace:r,partnerPage:i}=e;i?.banner?.overlay_design?.primary_color,i?.banner?.overlay_design?.text_color;const a=t.preview_image_url?t.preview_image_url:t.preview_chart?.chart_image_jpg_url?t.preview_chart.chart_image_jpg_url:"";return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"gallery-card-image-container",children:n.jsx("div",{className:`gallery-card-image${!t.preview_image_url&&t.preview_chart?.aspect_ratio==="16:9"?" size-aspect-16-9":""}`,children:a?n.jsx("img",{alt:"",src:a}):n.jsx("div",{className:"gallery-card-image-placeholder"})})}),n.jsx("div",{className:"gallery-card-placeholder",children:n.jsx("i",{className:"material-icons",children:"insert_chart_outlined"})}),n.jsx("div",{className:"gallery-card-caption partner-insight",children:n.jsxs("div",{className:"gallery-card-caption-left",children:[n.jsx("div",{className:"gallery-card-type",children:"Partner Insights"}),n.jsx("div",{className:"gallery-card-title-text","diagnostic-id":"gallery-card-title-text",children:t.title}),i?.company_logo_url&&n.jsx("div",{className:"gallery-card-logo-container",children:n.jsx("img",{className:"gallery-card-logo",src:i?.company_logo_url,alt:""})})]})})]})}function W$(e){const{editorItem:t}=e;return n.jsx(n.Fragment,{children:n.jsx("div",{className:"gallery-card-caption solution",children:n.jsxs("div",{className:"gallery-card-caption-left",children:[n.jsx("div",{className:"gallery-card-type",children:t.category}),n.jsx("div",{className:"gallery-card-title-text",children:t.title}),n.jsx("div",{className:"gallery-card-description",children:t?.description&&ds(t.description,100)})]})})})}function FSe(e){const{card:t,sectionType:r,isOnWorkspace:i,setPageChoice:a,pageType:s,isView:o,partnerPage:l,partnerInsightView:c,setModalStatus:h,insightsExplorer:u}=e,{InsightsGallery:d,SolutionsGallery:p,TeamProfile:f,ClientQuestions:m}=Bn,{Insight:g,Solution:x,Spotlight:v}=on,[b,j]=y.useState(!1),w=oa(),S=E=>{E.preventDefault(),!o&&s!==g&&s!==v&&a(""),w.push(`/solutions/${t.page_slug}`),h(!1)},_=n.jsx("div",{className:`gallery-card-wrapper${i?` ${r}-workspace-card-wrapper`:` ${r}-viewer-card-wrapper`}`,children:n.jsx("div",{className:`gallery-card${i?` ${r}-workspace-card`:` ${r}-viewer-card`}`,"diagnostic-id":`${r}-card`,children:n.jsx("div",{onClick:i?null:S,className:"gallery-card-link-grp",children:n.jsx(W$,{editorItem:t})})})}),C=n.jsx("div",{className:`gallery-card-wrapper ${r}-viewer-card-wrapper`,children:n.jsx("div",{className:`gallery-card ${r}-viewer-card`,"diagnostic-id":`${r}-card`,children:n.jsx("div",{className:"gallery-card-link-grp",children:n.jsx(H$,{editorItem:t})})})});return n.jsxs(n.Fragment,{children:[b&&n.jsx(Ru,{modalView:b,setModalView:j,viewerId:e.id,partnerInsightView:c,insightsKey:t.insight_key}),r===d?n.jsx("div",{className:`gallery-card-wrapper${i?` ${r}-workspace-card-wrapper`:` ${r}-viewer-card-wrapper`}`,children:n.jsx("div",{className:`gallery-card${i?` ${r}-workspace-card`:` ${r}-viewer-card`}`,"diagnostic-id":`${r}-card`,children:n.jsx("div",{onClick:()=>!i&&j(!0),className:"gallery-card-link-grp",children:n.jsx(G$,{editorItem:t,isOnWorkspace:i,partnerPage:l})})})}):r===p?s===g&&!o?n.jsx("div",{className:"col s12 m6 l4 xl4",children:_}):_:r===m?n.jsx("div",{className:"col s12 m6 l4 xl4",children:C}):n.jsx(n.Fragment,{})]})}const USe=e=>({partnerInsightView:e.spotlight&&e.spotlight.partnerInsights&&e.spotlight.partnerInsights.partnerInsightView,insightsExplorer:e.insightsexplorer}),BSe=le(USe,{setModalStatus:Ii})(FSe);function qSe(e){const{sectionType:t,setPageChoice:r,sectionTitle:i,pageType:a,isOnWorkspace:s,isView:o,partnerPage:l}=e,c=e.cards.map((h,u)=>n.jsx(BSe,{id:h.id,card:h,index:u,sectionType:t,isOnWorkspace:s,setPageChoice:r,pageType:a,isView:o,partnerPage:l},u));return n.jsxs(n.Fragment,{children:[i&&n.jsx("div",{className:"section-title",children:n.jsx("h4",{children:i})}),n.jsx("div",{className:`card-container ${t}`,children:c})]})}const VSe=e=>({pageType:e.spotlight&&e.spotlight.pageType}),Wa=le(VSe,{})(qSe);function zSe(e){const{partnerInsightView:t,isChartView:r}=e,i=t.chartbook,a=t?.chart,s=t.show_chartbook_notes,{SolutionsGallery:o}=Bn;return n.jsxs("div",{className:"partner-insight-workspace-container",children:[n.jsx("div",{className:"workspace-left chartbook-viewer-container",children:n.jsx(z$,{chartbook:i,isPartnerInsight:!0,hideCover:!0,showNotes:s,chart:
72a,hidePreview:r})}),t?.solutions?.length>0&&n.jsxs("div",{className:"workspace-right",children:[n.jsx("div",{className:"related-solutions-header-container",children:n.jsxs("div",{className:"related-solutions-header-title",children:[n.jsx("h6",{className:"related-solutions-partner-name",children:t.partner_company}),n.jsx("h6",{children:"Partner Solutions"})]})}),n.jsx("div",{className:"related-solutions-content-container",children:n.jsx(Wa,{cards:t.solutions,sectionType:o,isOnWorkspace:!1,isView:!0})})]})]})}const HSe=e=>({}),WP=le(HSe,{})(zSe);function GSe(e){const{partnerInsightView:t}=e,r=t.client_piece,{SolutionsGallery:i}=Bn,a=r?.sections?.map((s,o)=>n.jsx("div",{children:n.jsx(dc,{id:"react-quill-id",className:s?.image_url?"has-custom-img":"",readOnly:!0,modules:vm,value:s.content||`<img src=${s.chart_image_jpg_url||s.image_url} alt="" />`})},o));return n.jsxs("div",{className:"partner-insight-workspace-container",children:[n.jsxs("div",{className:"workspace-left",children:[a,n.jsx("div",{className:"disclosures-content",dangerouslySetInnerHTML:{__html:ti(r.disclosures)}})]}),t?.solutions?.length>0&&n.jsxs("div",{className:"workspace-right",children:[n.jsx("div",{className:"related-solutions-header-container",children:n.jsxs("div",{className:"related-solutions-header-title",children:[n.jsx("h6",{className:"related-solutions-partner-name",children:t.partner_company}),n.jsx("h6",{children:"Partner Solutions"})]})}),n.jsx("div",{className:"related-solutions-content-container",children:n.jsx(Wa,{cards:t.solutions,sectionType:i,isOnWorkspace:!1,isView:!0})})]})]})}const WSe=e=>({}),YSe=le(WSe,{})(GSe);function KSe(e){const[t,r]=y.useState(""),[i,a]=y.useState(!1),[s,o]=y.useState(0),[l,c]=y.useState(!1),{partnerInsightView:h,userId:u,viewPath:d,modalView:p,showSpinner:f,setModalStatus:m,modalStatus:g,logEvent:x,scrollY:v,isCommunity:b}=e,j=h.client_questions,{SolutionsGallery:w}=Bn;y.useEffect(()=>{if(p&&!l&&!g&&d!=="preview"){e.setModalStatus(!0),document.body.style.position="fixed",document.body.style.top=`-${v}px`,document.body.style.width="100%";const _=document.querySelector(".nav-wrapper");_.style.paddingLeft="10px",_.style.paddingRight="10px"}},[l,g]);const S=_=>{_.preventDefault(),t===_.currentTarget.id?r(""):(r(_.currentTarget.id),d!=="preview"&&x(u,_.currentTarget.id,b?"communitytoolkitclientquestion":"partnerclientquestion","show-question"))};return i?n.jsx(jn,{children:n.jsx(qt,{from:"partnerinsights",to:{pathname:"/questions",state:{id:s}}})}):n.jsxs(n.Fragment,{children:[f&&n.jsx(Dn,{}),n.jsxs("div",{className:"partner-insight-workspace-container client-questions-workspace",children:[n.jsx("div",{className:"workspace-left",children:j.map((_,C)=>n.jsxs("div",{children:[n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsxs("div",{className:`question-answer-container${t===`${_.id}`?" open":" close"}`,children:[n.jsxs("div",{className:"client-questions-header","diagnostic-id":"client-questions-header",id:`${_.id}`,onClick:S,children:[n.jsx("h5",{children:_.question_text}),n.jsx("i",{className:"material-symbols-outlined chevron-right",children:"chevron_right"})]}),n.jsx(q$,{question:_,setModal:c,modalView:p,setCreated:a,setNewItemId:o})]})})}),l&&t===`${_.id}`&&n.jsx(Jo,{featuredChart:_?.chart,setChartModal:c,chartModal:l,isRecommendedChart:!0})]},C))}),h?.solutions?.length>0&&n.jsxs("div",{className:"workspace-right",children:[n.jsx("div",{className:"related-solutions-header-container",children:n.jsxs("div",{className:"related-solutions-header-title",children:[n.jsx("h6",{className:"related-solutions-partner-name",children:h.partner_company}),n.jsx("h6",{children:"Partner Solutions"})]})}),n.jsx("div",{className:"related-solutions-content-container",children:n.jsx(Wa,{cards:h.solutions,sectionType:w,isOnWorkspace:!1,isView:!0})})]})]})]})}const XSe=e=>({userId:e.auth.user&&e.auth.user.id,showSpinner:e.questionanswer&&e.questionanswer.showSpinner,modalStatus:e.preferences&&e.preferences.modalStatus}),QSe=le(XSe,{setModalStatus:Ii,logEvent:_r})(KSe);function ZSe(e){const{userId:t,setFullViewBtnModal:r,fullViewBtnModal:i,partnerInsightView:a,createNewSharedContent:s,newClientPieceFromPartnerInsight:o,newInsightsVideoFromPartnerInsight:l,setModalView:c,canUseEngage:h,allowEngage:u,menuChoice:d,setModalStatus:p,showCbSpinner:f,showCpSpinner:m,showIvSpinner:g,modalView:x,partnerType:v,progress:b,setProgress:j,isProcessing:w,setIsProcessing:S,remixId:_,setRemixId:C,newVideoId:E,remixVideoCreated:P,viewPath:T,pageType:N,canRemixVideoScript:k,isRemixing:I,hedwigPermissions:D,canUseComposer:O,allowComposer:$,canUseStudio:U,allowStudio:B}=e,[L,A]=y.useState(!1),[R,F]=y.useState(P||!1),[q,V]=y.useState(E||0),[X,M]=y.useState(!1),{clientpieceType:W,insightsVideoType:K,insightsPodcastType:z,commentaryType:Y}=wf,{Enabled:ie}=_n,{Solution:ne,Spotlight:ve}=on,{partnerInsightType:pe}=Ei,be=Q=>{Q.preventDefault(),s(t,a.id,pe,Q.currentTarget.id).then(ee=>
72{A(!0),V(ee.id),p(!1)})},ye=(Q,ee)=>{d===Y?o(t,a.id).then(oe=>{F(!0),V(oe),p(!1)}):d===K&&l(t,a.id,Q,ee).then(oe=>{oe.status===201?(F(!0),V(oe.data.id),p(!1)):oe.status===202?(C(oe.data.remix_request_id),S(!0)):oe.status===403&&M(!0)})};if(L){const Q=`/engage/${pe}s/${q}`;return n.jsx(jn,{children:n.jsx(qt,{from:"partnerinsights",to:Q})})}if(R){const Q=`/${d===Y?"commentaries":`${d}s`}/${q}`;if(d===K){const ee=document.body.style.top;document.body.style.position="",document.body.style.top="",document.body.style.width="";const oe=document.querySelector(".nav-wrapper");oe.style.paddingRight="",oe.style.paddingLeft="",window.scrollTo(0,parseInt(ee||"0")*-1)}return n.jsx(jn,{children:n.jsx(qt,{from:"partnerinsights",to:Q})})}const ke=n.jsxs(n.Fragment,{children:[n.jsx(wn,{hasPermission:u===ie&&h&&a?.partner_content_label_text==="Partner",children:n.jsxs("button",{type:"button",className:"new-partner-insight-modal-btn","diagnostic-id":"partner-insight-engage-btn",onClick:be,id:"clientpiece",children:[n.jsx("div",{className:"new-partner-insight-modal-header",children:n.jsx("h4",{children:"Share with a Custom Message"})}),n.jsx("div",{children:"Share this partner insight with a custom message via Engage."})]})}),n.jsx(wn,{hasPermission:$===ie&&O&&a.can_customize_clientpiece,children:n.jsxs("button",{type:"button",className:"new-partner-insight-modal-btn btn-primary-lg","diagnostic-id":"partner-insight-create-btn",onClick:()=>ye(),children:[n.jsx("div",{className:"new-partner-insight-modal-header",children:n.jsx("h4",{children:"Create in Composer"})}),n.jsx("div",{children:"Create a fully customizable commentary."})]})}),a.client_piece?.attached_pdf_url&&n.jsx("a",{className:"attached-pdf-link",onClick:Q=>{Q.preventDefault(),window.open(a.client_piece.attached_pdf_url,"_blank","noreferrer noopener")},download:!0,children:n.jsxs("button",{type:"button",className:"new-partner-insight-modal-btn btn-primary-lg","diagnostic-id":"partner-insight-pdf-btn",children:[n.jsx("div",{className:"new-partner-insight-modal-header",children:n.jsx("h4",{children:"Download PDF"})}),n.jsx("div",{children:"Download the accompanying PDF for this partner's commentary."})]})})]}),fe=n.jsxs(n.Fragment,{children:[n.jsx(wn,{hasPermission:u===ie&&h&&a?.partner_content_label_text==="Partner",children:n.jsxs("button",{type:"button",className:"new-partner-insight-modal-btn","diagnostic-id":"partner-insight-engage-btn",onClick:be,id:a?.insights_video?.type,children:[n.jsx("div",{className:"new-partner-insight-modal-header",children:n.jsx("h4",{children:"Share with a Custom Message"})}),n.jsx("div",{children:"Share this partner insights video with a custom message via Engage."})]})}),B===ie&&U&&a.can_customize_insightsvideo&&n.jsxs(n.Fragment,{children:[n.jsxs("button",{type:"button",className:"new-partner-insight-modal-btn btn-primary-lg","diagnostic-id":"partner-insight-create-btn",onClick:()=>ye(!0),children:[n.jsxs("div",{className:"new-partner-insight-modal-header",children:[n.jsx("i",{className:"material-icons",children:"explore"}),n.jsx("h4",{children:"Use Featured Audio and Video"})]}),n.jsx("div",{children:"Create a turn-key featured insights video with pre-recorded audio that is customized with your brand."})]}),n.jsxs("button",{type:"button",className:"new-partner-insight-modal-btn btn-primary-lg","diagnostic-id":"partner-insight-record-btn",onClick:()=>ye(!1),children:[n.jsxs("div",{className:"new-partner-insight-modal-header",children:[n.jsx("i",{className:"material-icons",children:"video_call"}),n.jsx("h4",{children:"Record Your Own Audio and Video"})]}),n.jsx("div",{children:"Use the featured charts with your own audio and video."})]}),n.jsx(wn,{hasPermission:a?.partner_content_label_text==="Featured"&&D?.allow_remix_video_script===ie&&k,children:n.jsxs("button",{type:"button",className:"new-partner-insight-modal-btn btn-primary-lg","diagnostic-id":"partner-insight-remix-btn",onClick:()=>ye(!1,!0),children:[n.jsxs("div",{className:"new-partner-insight-modal-header",children:[n.jsx("i",{className:"material-icons",children:"flash_on"}),n.jsx("h4",{children:"Remix Scripts and Record"})]}),n.jsx("div",{children:"Make the scripts your own. Remixing will generate a new title and reword the scripts for each clip."})]})})]})]}),se=n.jsxs("button",{type:"button",className:"new-partner-insight-modal-btn","diagnostic-id":"partner-insight-engage-btn",onClick:be,id:"podcast",children:[n.jsx("div",{className:"new-partner-insight-modal-header",children:n.jsx("h4",{children:"Share with a Custom Message"})}),n.jsx("div",{children:"Share this partner insights podcast with a custom message via Engage."})]});let ge;switch(d){case Y:ge=ke;break;case K:ge=fe;break;case z:ge=se;break}const De=n.jsxs("div",{className:"new-partner-insights-modal-container",children:[n.jsx("i",{className:"material-icons","diagnostic-id":"modal-close-btn",onClick:()=>{i?r(!1):c(!1),p(!1)},children:"close"}),n.jsx("h5",{children:"Select an Option"}),n.jsx("div",{className:"new-partner-insights-selectors",children:ge})]}),ae=f||m||g||I;return n.jsxs(n.Fragment,{children:[ae?x?I||N===ne||N===ve&&(!T||T==="preview")?n.jsx(Dn,{}):null:n.jsx(Dn,{}):null,!x&&ae?n.jsx(Dn,{}):null,X?n.jsx(Jf,{modal:X,setModal:M}):i?n.jsx(ot,{setModal:r,children:De}):De]})}const JSe=e=>({userId:e.auth.user.id,canUseEngage:e.auth&&e.auth.user&&e.auth.user.can_use_engage,allowEngage:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.engage_permissions&&e.auth.user.company.engage_permissions.allow_engage,showCbSpinner:e.chartbooks.showSpinner,showCpSpinner:e.composer.showSpinner,showIvSpinner:e.studio.showCreateSpinner,partnerType:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.partner_type&&e.auth.user.company.partner_type.type,canRemixVideoScript:e.auth&&e.auth.user&&e.auth.user.can_remix_video_script,isRemixing:e.studio.isRemixing,hedwigPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.hedwig_permissions,canUseComposer:e.auth&&e.auth.user&&e.auth.user.can_use_composer,allowComposer:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.composer_permissions&&e.auth.user.company.composer_permissions.allow_composer,canUseStudio:e.auth.user&&e.auth.user.can_use_studio,allowStudio:e.auth.user&&e.auth.user.company&&e.auth.user.company.studio_permissions&&e.auth.user.company.studio_permissions.allow_studio}),Y$=le(JSe,{createNewSharedContent:l0,newClientPieceFromPartnerInsight:g0,newInsightsVideoFromPartnerInsight:uje,setModalStatus:Ii})(ZSe);function e_e(e){const{partnerInsightView:t,logEvent:r,userId:i,viewPath:a}=e,s=t.insights_podcast,{SolutionsGallery:o}=Bn,l=()=>{a!=="preview"&&r(i,t?.insight_key,"partnerinsightspodcast","play")};return n.jsxs("div",{className:"partner-insight-workspace-container",children:[n.jsxs("div",{className:"workspace-left",children:[s.description&&n.jsx("div",{className:"content-description",dangerouslySetInnerHTML:{__html:ti(s.description)}}),n.jsx("div",{className:"partner-insight-insights-podcast-wrapper",children:n.jsx("audio",{src:s.processed_media_url,controls:!0,controlsList:"nodownload",className:"partner-insight-insights-podcast",onPlay:l})}),s.disclosures&&n.jsx("div",{className:"disclosures-content",dangerouslySetInnerHTML:{__html:ti(s.disclosures)}})]}),t.solutions.length>0&&n.jsxs("div",{className:"workspace-right",children:[n.jsx("div",{className:"related-solutions-header-container",children:n.jsxs("div",{className:"related-solutions-header-title",children:[n.jsx("h6",{className:"related-solutions-partner-name",children:t.partner_company}),n.jsx("h6",{children:"Partner Solutions"})]})}),n.jsx("div",{className:"related-solutions-content-container",children:n.jsx(Wa,{cards:t.solutions,sectionType:o,isOnWorkspace:!1,isView:!0})})]})]})}const t_e=e=>({userId:e.auth.user&&e.auth.user.id}),n_e=le(t_e,{logEvent:_r})(e_e);function r_e(e){const{partnerInsightView:t,logEvent:r,userId:i,viewPath:a,isCommunity:s}=e,o=t.insights_video,{SolutionsGallery:l}=Bn,c="partnerinsight";let h,u,d;
72switch(o?.type){case"custom":h=o?.processed_media_url,u=o?.disclosures,d=o?.description;break;case"studio":h=o?.rendered_video_url;break}const p=()=>{a!=="preview"&&r(i,t?.insight_key,s?"communitytoolkitinsightsvideo":"partnerinsightsvideo","play")};return n.jsxs(n.Fragment,{children:[t?.engage_insights_video?.hosted_url&&n.jsx("div",{className:"partner-insight-share-wrapper",children:n.jsxs("div",{className:"partner-insight-share-link-grp",children:[n.jsx("h4",{children:"Share this direct link"}),n.jsx("p",{className:"subheader",children:"Share a direct link to this insights video."}),n.jsx("div",{className:"content-link-group",children:n.jsx(Gs,{snippet:t?.engage_insights_video?.hosted_url,embedType:c,isActive:!0})})]})}),n.jsxs("div",{className:"partner-insight-workspace-container",children:[n.jsxs("div",{className:"workspace-left",children:[d&&n.jsx("div",{className:"content-description",dangerouslySetInnerHTML:{__html:ti(d)}}),n.jsx("div",{className:"partner-insight-insights-video-wrapper",children:n.jsx("video",{onContextMenu:f=>f.preventDefault(),className:"partner-insight-insights-video",src:`${h}/?time=${Date.now()}`,controls:!0,disablePictureInPicture:!0,controlsList:"nodownload",poster:o?.video_thumbnail&&`${o.video_thumbnail}/?time=${Date.now()}`,onPlay:p})}),u&&n.jsx("div",{className:"disclosures-content",dangerouslySetInnerHTML:{__html:ti(u)}})]}),t?.solutions?.length>0&&n.jsxs("div",{className:"workspace-right",children:[n.jsx("div",{className:"related-solutions-header-container",children:n.jsxs("div",{className:"related-solutions-header-title",children:[n.jsx("h6",{className:"related-solutions-partner-name",children:t.partner_company}),n.jsx("h6",{children:"Partner Solutions"})]})}),n.jsx("div",{className:"related-solutions-content-container",children:n.jsx(Wa,{cards:t.solutions,sectionType:l,isOnWorkspace:!1,isView:!0})})]})]})]})}const i_e=e=>({userId:e.auth.user&&e.auth.user.id}),a_e=le(i_e,{logEvent:_r})(r_e);function s_e(e){const{partnerInsightView:t,logEvent:r,userId:i,viewPath:a,isCommunity:s}=e,o=t.advisor_notes_video,{SolutionsGallery:l}=Bn,c=ti(t?.advisor_notes_text),h=()=>{a!=="preview"&&r(i,t?.insight_key,s?"communitytoolkitadvisornotesvideo":"partneradvisornotesvideo","play")};return n.jsx(n.Fragment,{children:n.jsxs("div",{className:"partner-insight-workspace-container",children:[n.jsxs("div",{className:"workspace-left",children:[o&&n.jsx("div",{className:"partner-insight-for-advisors-video-wrapper",children:n.jsx("video",{onContextMenu:u=>u.preventDefault(),className:"partner-insight-for-advisors-video",src:`${o?.rendered_video_url}/?time=${Date.now()}`,controls:!0,disablePictureInPicture:!0,controlsList:"nodownload",poster:o?.video_thumbnail&&`${o.video_thumbnail}/?time=${Date.now()}`,onPlay:h})}),t?.advisor_notes_text&&n.jsx("div",{className:"for-advisor-notes",dangerouslySetInnerHTML:{__html:c}})]}),t?.solutions?.length>0&&n.jsxs("div",{className:"workspace-right",children:[n.jsx("div",{className:"related-solutions-header-container",children:n.jsxs("div",{className:"related-solutions-header-title",children:[n.jsx("h6",{className:"related-solutions-partner-name",children:t.partner_company}),n.jsx("h6",{children:"Partner Solutions"})]})}),n.jsx("div",{className:"related-solutions-content-container",children:n.jsx(Wa,{cards:t.solutions,sectionType:l,isOnWorkspace:!1,isView:!0})})]})]})})}const o_e=e=>({userId:e.auth.user&&e.auth.user.id}),l_e=le(o_e,{logEvent:_r})(s_e);function c_e(e){const{partnerInsightView:t,menuChoice:r,modalView:i,setBtnModal:a,isSharedPublishView:s,userId:o,newChartbookFromPartnerInsight:l,newClientPieceFromPartnerInsight:c,setModalStatus:h,showCbSpinner:u,canUseEngage:d,allowEngage:p,canUseStudio:f,allowStudio:m,progress:g,setProgress:x,isProcessing:v,setIsProcessing:b,remixId:j,setRemixId:w,newVideoId:S,remixVideoCreated:_,progressBar:C,allowComposer:E,canUseComposer:P,clientpieces:T,composerPermissions:N,logEvent:k,user:I}=e,{clientpieceType:D,chartbookType:O,insightsVideoType:$,insightsPodcastType:U,commentaryType:B,clientQuestionType:L,chartType:A}=wf,[R,F]=y.useState(!1),[q,V]=y.useState(_||!1),[X,M]=y.useState(S||0),[W,K]=y.useState(!1),[z,Y]=y.useState(!1),{Enabled:ie}=_n,ne={progress:g,setProgress:x,isProcessing:v,setIsProcessing:b,remixId:j,setRemixId:w,newVideoId:S,remixVideoCreated:_};if(q){const ke=`/${r===B?"commentaries":`${r}s`}/${X}`,fe=document.body.style.top;document.body.style.position="",document.body.style.top="",document.body.style.width="";const se=document.querySelector(".nav-wrapper");return se.style.paddingRight="",se.style.paddingLeft="",window.scrollTo(0,parseInt(fe||"0")*-1),n.jsx(jn,{children:n.jsx(qt,{from:"partnerinsights",to:ke})})}const ve=()=>{K(!0),r===B&&E===ie&&P&&t.partner_content_label_text==="Featured"&&!t.client_piece?.attached_pdf_url?c(o,t.id).then(ke=>{V(!0),M(ke),h(!1),K(!1)}):i?a(!0):F(!0)},pe=T?.filter(ke=>ke.content_permissions_level<=N.content_permissions_level).length,be=!i&&!s||W||pe>=N?.max_commentaries,ye=()=>{Y(!0),k(o,null,"communitycta","open")};return n.jsxs(n.Fragment,{children:[!i&&u?n.jsx(Dn,{}):null,r===B?n.jsx(wn,{hasPermission:E===ie&&P&&t?.can_customize_clientpiece||p===ie&&d&&t?.partner_content_label_text==="Partner"||!!t?.client_piece?.attached_pdf_url,children:n.jsx("div",{className:"partner-insight-view-button-container",children:n.jsx("div",{className:"partner-insight-view-button",children:n.jsx(Ke,{interactive:!0,classes:{popper:"disabled-tooltip"},title:pe>=N?.max_commentaries?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"upgrade-tooltip-msg",children:"You've reached the maximum number of commentaries you can personalize and share. Please upgrade to create this commentary."}),I.is_upgrade_disabled?n.jsxs("div",{className:"upgrade-submitted-tooltip",children:[n.jsx("i",{className:"material-icons",children:"done"}),"UPGRADE REQUESTED"]}):n.jsxs("button",{onClick:ye,className:"upgrade-tooltip-btn",children:[n.jsx("i",{className:"material-icons",children:"open_in_new"}),"UPGRADE"]})]}):"",placement:"top",children:n.jsxs("div",{id:"partner-insight-download",children:[pe>=N?.max_commentaries&&n.jsx("i",{className:"material-icons locked-icon",children:"lock"}),n.jsx("button",{className:"btn-primary-icon","diagnostic-id":"personalize-share-btn",type:"button",onClick:ve,disabled:be,children:n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"material-icons-outlined",children:"picture_as_pdf"}
72),"PERSONALIZE & SHARE"]})})]})})})})}):r===$?n.jsx(wn,{hasPermission:m===ie&&f&&t?.can_customize_insightsvideo||p===ie&&d&&t?.partner_content_label_text==="Partner",children:n.jsx("div",{className:"partner-insight-view-button-container",children:n.jsx("div",{className:"partner-insight-view-button",children:n.jsx("div",{id:"partner-insight-download",children:n.jsx("button",{className:"btn-primary-icon","diagnostic-id":"personalize-share-btn",type:"button",onClick:()=>{i?a(!0):F(!0)},disabled:!i&&!s||W,children:n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"material-icons-outlined",children:"picture_as_pdf"}),"PERSONALIZE & SHARE"]})})})})})}):r===U?n.jsx(wn,{hasPermission:p===ie&&d,children:n.jsx("div",{className:"partner-insight-view-button-container",children:n.jsx("div",{className:"partner-insight-view-button",children:n.jsx("div",{id:"partner-insight-download",children:n.jsx("button",{className:"btn-primary-icon","diagnostic-id":"personalize-share-btn",type:"button",onClick:()=>{i?a(!0):F(!0)},disabled:!i&&!s||W,children:n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"material-icons-outlined",children:"picture_as_pdf"}),"PERSONALIZE & SHARE"]})})})})})}):r===A?n.jsx("div",{className:"partner-insight-view-button-container",children:n.jsx("div",{className:"partner-insight-view-button",children:n.jsx("div",{id:"partner-insight-download",children:n.jsx("a",{onClick:ke=>!i&&!s?null:Dp(ke,t?.chart?.chart_image_jpg_url),download:!0,target:"_blank",rel:"noopener noreferrer","diagnostic-id":"chart-download-btn",children:n.jsx("button",{className:"btn-primary-icon","diagnostic-id":"download-chart-btn",type:"button",disabled:!i&&!s,children:n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"material-icons-outlined",children:"cloud_download"}),"DOWNLOAD CHART"]})})})})})}):r===O?n.jsx("div",{className:"partner-insight-view-button-container",children:n.jsx("div",{className:"partner-insight-view-button",children:n.jsx("div",{id:"partner-insight-download",children:n.jsx("button",{className:"btn-primary-icon","diagnostic-id":"personalize-share-btn",type:"button",onClick:()=>{K(!0),r===O?l(o,t.id).then(ke=>{V(!0),M(ke),h(!1),K(!1)}):i?a(!0):F(!0)},disabled:!i&&!s||W,children:n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"material-icons-outlined",children:"picture_as_pdf"}),"PERSONALIZE & SHARE"]})})})})}):n.jsx(n.Fragment,{}),R?v?C:n.jsx(Y$,{setFullViewBtnModal:F,fullViewBtnModal:R,partnerInsightView:t,menuChoice:r,modalView:i,...ne}):n.jsx(n.Fragment,{}),z&&n.jsx(ii,{setModal:Y,modal:z})]})}const d_e=e=>({userId:e.auth.user.id,showCbSpinner:e.chartbooks.showSpinner,canUseEngage:e.auth&&e.auth.user&&e.auth.user.can_use_engage,allowEngage:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.engage_permissions&&e.auth.user.company.engage_permissions.allow_engage,canUseStudio:e.auth.user&&e.auth.user.can_use_studio,allowStudio:e.auth.user&&e.auth.user.company&&e.auth.user.company.studio_permissions&&e.auth.user.company.studio_permissions.allow_studio,allowComposer:e.auth.user&&e.auth.user.company&&e.auth.user.company.composer_permissions&&e.auth.user.company.composer_permissions.allow_composer,canUseComposer:e.auth.user&&e.auth.user.can_use_composer,clientpieces:e.composer&&e.composer.pieces,composerPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.composer_permissions,user:e.auth.user}),u_e=le(d_e,{newChartbookFromPartnerInsight:Vme,newClientPieceFromPartnerInsight:g0,setModalStatus:Ii,logEvent:_r})(c_e);function h_e(e){const{partnerInsightView:t,menuChoice:r,userId:i,contentToDisplay:a}=e;return a&&a?.authors?.length>0&&n.jsx("div",{className:"partner-insight-view-title-container",children:n.jsxs("div",{className:"partner-insight-view-title-left",children:[n.jsx("div",{className:"title-group",children:n.jsx("div",{className:"partner-insight-title-grp",children:n.jsx("div",{className:"partner-insight-authors",children:a?.authors?.map((s,o)=>n.jsxs("div",{id:"partner-insight-author-grp",children:[n.jsx("div",{className:"author-name-credentials",children:s.author_full_name}),n.jsx("div",{className:"author-job-title",children:s.author_title})]},o))})})}),a?.authors?.length===1&&n.jsx("div",{id:"partner-insight-view-company-name",children:t.partner_company})]})})}const p_e=e=>({userId:e.auth.user.id}),f_e=le(p_e,{})(h_e);function m_e(e){const{partnerInsightView:t,modalView:r,handleClose:i,showSpotlightLink:a,isSharedPublishView:s,setModalStatus:o}=e,l=n.jsx("div",{className:a?"has-spotlight-link":"",id:"partner-insight-header-logo",children:n.jsx("img",{src:t.partner_company_logo_url,alt:""})});return n.jsxs("div",{className:"partner-insight-header-container",children:[n.jsxs("div",{className:"partner-insight-header-left",children:[a?n.jsx(Ze,{to:`/spotlight/${t.partner_stub}`,onClick:()=>o(!1),children:l}):l,n.jsx("div",{className:"partner-insight-title-summary-wrapper",children:n.jsxs("div",{className:"partner-insight-title-summary-grp",children:[n.jsx("div",{id:"partner-insight-title",children:t.title}),t.summary_text&&n.jsx("div",{className:"partner-insight-summary-text",children:t.summary_text}),n.jsxs("div",{id:"partner-insight-view-title-date",children:[n.jsx(gn,{local:!0,format:"MMMM D, YYYY",children:t.publish_datetime||t.update_datetime})," "]})]})})]}),s?n.jsx(n.Fragment,{}):n.jsxs("div",{id:"modal-close-btn","diagnostic-id":"modal-close-btn",className:r?"modal":"full-view",onClick:i,children:[n.jsx("i",{className:"material-icons",children:"close"}),!r&&"CLOSE PREVIEW"]})]})}const g_e=e=>({}),v_e=le(g_e,{setModalStatus:Ii})(m_e),po={advisornote:"advisornotes",commentary:"commentary",chartbook:"chartbook",insightsvideo:"insightsvideo",insightspodcast:"insightspodcast",clientquestion:"clientquestion",chart:"chart"};function b_e(e){const{user:t,getPartnerInsightView:r,partnerInsightView:i,match:a,setPageType:s,modalView:o,setModalView:l,viewerId:c,pageType:h,isInsightsExplorer:u,getExplorerPartnerInsight:d,insightsKey:p,showSpotlightLink:f,setModalStatus:m,showCbSpinner:g,showCpSpinner:x,showIvSpinner:v,selectedFilter:b,getRemixInsightsVideoSummary:j,modalStatus:w}=e,{clientpieceType:S,chartbookType:_,insightsVideoType:C,insightsPodcastType:E,commentaryType:P}=wf,{Community:T,SponsoredCommunity:N}=Br,k=t?.account_permissions?.name===T||t?.account_permissions?.name===N,[I,D]=y.useState(!0),[O,$]=y.useState(""),[U,B]=y.useState(!1),[L,A]=y.useState(Ys()),[R,F]=y.useState(0),[q,V]=y.useState(!1),[X,M]=y.useState(null),[W,K]=y.useState(0),[z,Y]=y.useState(!1),ie={progress:R,setProgress:F,isProcessing:q,setIsProcessing:V,remixId:X,setRemixId:M,newVideoId:W,remixVideoCreated:z},ne=new URLSearchParams(window.location.search).get("view"),ve=oa(),{Insight:pe,Spotlight:be,Solution:ye}=on,ke=a?.path?.includes("/insights");y.useEffect(()=>{if(o){m(!0),document.body.style.position="fixed",document.body.style.top=`-${L}px`,document.body.style.width="100%";const Re=document.querySelector(".nav-wrapper");Re.style.paddingLeft="10px",Re.style.paddingRight="10px"}},[]),y.useEffect(()=>{if(ke&&!w){const Re=document.body.style.top;document.body.style.position="",document.body.style.top="",document.body.style.width="";const Ve=document.querySelector(".nav-wrapper");Ve.style.paddingRight="",Ve.style.paddingLeft="",window.scrollTo(0,parseInt(Re||"0")*-1)}},[w]);const fe=y.useCallback(Re=>{const Ve=Re.key==="Escape";q||Ve&&o&&(l(!1),m(!1))},[q,o]);y.useEffect(()=>(window.addEventListener("keyup",fe),()=>{window.removeEventListener("keyup",fe)}),[fe]);const se=(ke||h===be||h===ye)&&ne!=="preview"?e.insightsExplorer.partnerInsightView:i;y.useEffect(()=>{const Re=a?.params?.id||c;(u||ke||h===be||h===ye)&&ne!=="preview"?d(p||Re,t.id).then(()=>D(!1),()=>
72{ve.push("/insights?view=partnerinsights")}):(!se||se.id!==Re?r(Re,t.id).then(()=>D(!1),()=>{ve.push("/insights?view=partnerinsights")}):D(!1),h!==be&&h!==ye&&s(pe))},[]);const ge=Re=>{$(Re)},ae=[{path:po.advisornote,label:"For Advisors",icon:n.jsx(oSe,{}),component:n.jsx(l_e,{partnerInsightView:se}),id:"partner-insight-for-advisors-viewer",diagId:"for-advisors-viewer-tab",showTab:!!se?.advisor_notes_video||se?.advisor_notes_text},{path:po.commentary,label:"Commentary",icon:n.jsx(y0,{}),component:n.jsx(YSe,{partnerInsightView:se}),id:"partner-insight-cp-viewer",diagId:"cp-viewer-tab",showTab:!!se?.client_piece},{path:po.chartbook,label:"Chartbook",icon:n.jsx(rf,{}),component:n.jsx(WP,{partnerInsightView:se}),id:"partner-insight-cb-viewer",diagId:"cb-viewer-tab",showTab:!!se?.chartbook},{path:po.chart,label:"Chart",icon:n.jsx(rf,{}),component:n.jsx(WP,{partnerInsightView:se,isChartView:!0}),id:"partner-insight-chart-viewer",diagId:"chart-viewer-tab",showTab:!!se?.chart},{path:po.insightsvideo,label:"Insights Video",icon:n.jsx($$,{}),component:n.jsx(a_e,{partnerInsightView:se,viewPath:ne,isCommunity:k}),id:"partner-insight-iv-viewer",diagId:"iv-viewer-tab",showTab:!!se?.insights_video||!!se?.engage_insights_video},{path:po.insightspodcast,label:"Insights Podcast",icon:n.jsx(iSe,{}),component:n.jsx(n_e,{partnerInsightView:se,viewPath:ne}),id:"partner-insight-iv-viewer",diagId:"podcast-viewer-tab",showTab:!!se?.insights_podcast},{path:po.clientquestion,label:"Client Questions",icon:n.jsx(dt,{icon:fj}),component:n.jsx(QSe,{partnerInsightView:se,viewPath:ne,modalView:o,scrollY:L,isCommunity:k}),id:"partner-insight-client-question-viewer",diagId:"client-question-viewer-tab",showTab:se?.client_questions?.length>0}].filter(Re=>Re?Re.showTab:null);y.useEffect(()=>{ne==="preview"&&window.name?($(window.name),window.name=""):$(b&&b!=="all"?b:ae[0]?.path)},[ae[0]?.path,b]);const Q=5e3;y.useEffect(()=>{let Re;if(X){e.setDirty(!0),Re=setInterval(()=>j(t.id,X).then(Xe=>{Xe&&Xe.data&&(Xe.data.id?(K(Xe.data.id),M(null),F(100)):Xe.status===400&&(V(!1),M(null),F(0),e.setDirty(!1)))}),Q),setTimeout(()=>{F(10)},100);const Ve=setInterval(()=>{F(Xe=>{const et=100*(1-Math.exp(-.02*(Xe+1)));return Math.min(100,et)})},Q);return()=>{clearInterval(Re),clearInterval(Ve),setTimeout(()=>{V(!1),m(!1),F(0),Y(!0),e.setDirty(!1)},Q+1)}}},[X]);const ee=ae[ae.findIndex(Re=>Re.path===O)]||ae[0],oe=ee?.id;let Pe=ee?.component;if(!se)return null;const Fe=Re=>{Re.preventDefault(),o?(l(!1),m(!1)):window.close()},Ie=n.jsx("div",{className:"remixing-container",children:n.jsxs("div",{className:"remixing-wrapper",children:[n.jsx("h3",{className:"remixing-header",children:"Remixing your insights video scripts..."}),n.jsx("div",{className:"remixing-subheader",children:"This may take up to a minute"}),n.jsx(o0,{progress:R})]})});return Pe=n.jsx("div",{className:`partner-insight-view-${o?"modal-":""}container`,children:n.jsxs("div",{className:"partner-insight-view-wrapper",children:[n.jsx("div",{className:"row",children:n.jsx(v_e,{partnerInsightView:se,modalView:o,handleClose:Fe,showSpotlightLink:u?f:se.partner_content_label_text==="Partner",isSharedPublishView:ke})}),n.jsxs("div",{className:"row menu-tabs-row",children:[Pe&&n.jsx("div",{className:"menu-tabs-wrapper",children:n.jsx(Zf,{value:O,handleChoice:ge,choices:ae,partnerInsightKey:se?.insight_key,viewPath:ne,isPartnerInsight:!0,isCommunity:k})}),n.jsx(u_e,{partnerInsightView:se,menuChoice:O,modalView:o,setBtnModal:B,isSharedPublishView:ke,...ie,progressBar:Ie})]}),n.jsxs("div",{className:"partner-insight-view-content-container",children:[n.jsx("div",{className:"row partner-insight-view-title-wrapper",children:n.jsx(f_e,{partnerInsightView:se,menuChoice:O,contentToDisplay:O===P?se?.client_piece:O===C?se?.insights_video:O===E?se?.insights_podcast:null})}),n.jsx("div",{className:"row fadeTransition partner-insight-content-viewer",id:oe,children:Pe})]})]})}),!I&&se?o?n.jsx(n.Fragment,{children:q?Ie:n.jsx(ot,{setModal:l,children:U?n.jsx(Y$,{partnerInsightView:se,setModalView:l,menuChoice:O,modalView:o,...ie,viewPath:ne,pageType:h}):n.jsxs(n.Fragment,{children:[g||x||v?n.jsx(Dn,{}):null,Pe]})})}):Pe:n.jsx(Dn,{})}const y_e=e=>({user:e.auth.user,pageType:e.spotlight.pageType,insightsExplorer:e.insightsexplorer,showCbSpinner:e.chartbooks.showSpinner,showCpSpinner:e.composer.showSpinner,showIvSpinner:e.studio.showSpinner,modalStatus:e.preferences&&e.preferences.modalStatus}),Ru=le(y_e,{getPartnerInsightView:pxe,setPageType:Pu,getExplorerPartnerInsight:C0e,setModalStatus:Ii,getRemixInsightsVideoSummary:Yxe})(zt(b_e));
72function x_e(e){const{insight:t,noFade:r,style:i,partnerCompany:a,partnerInsightView:s,setModalStatus:o,selectedFilter:l,isCommunity:c}=e,[h,u]=y.useState(!1);let d="unknown",p;switch(a.partner_content_label_text){case"Featured":d=c?"Community Toolkit":"Insights Toolkit",p=!1;break;case"Partner":d="Partner Insight",p=!0;break}return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`col${r?"":" fadeTransition"}`,style:i,children:n.jsxs("div",{className:"insights-explorer-card","diagnostic-id":"featured-partner-insights-card",onClick:()=>u(!0),children:[n.jsx("div",{className:"card-header",style:{backgroundColor:a.primary_color},children:n.jsx("div",{className:"card-header-left",style:{color:a.text_color},children:n.jsx("div",{className:"insights-explorer-card-type",children:d})})}),n.jsx("div",{className:"featured-partner-insights-card-caption",children:n.jsxs("div",{className:"featured-partner-insights-card-caption-left",children:[n.jsx("div",{className:"featured-partner-insights-title",children:n.jsx("h6",{children:t.title})}),n.jsx("div",{className:"featured-partner-insights-card-description",children:t.summary_text}),n.jsx("div",{className:"featured-partner-insights-datetime",children:n.jsx(gn,{local:!0,format:"MMMM D, YYYY",children:t.publish_datetime})})]})})]})}),h&&n.jsx(Ru,{modalView:h,setModalView:u,isInsightsExplorer:!0,insightsKey:t.insight_key,partnerInsightView:s,showSpotlightLink:p,selectedFilter:l})]})}const j_e=e=>({partnerInsightView:e.insightsexplorer&&e.insightsexplorer.partnerInsightView}),w_e=le(j_e,{setModalStatus:Ii})(x_e);function S_e(e){const{index:t,insights:r,partnerInsightView:i,setModalStatus:a,user:s,showcaseInsightsToolkits:o,isClientPiece:l,isChart:c,isInsightsVideo:h,logEvent:u,isCommunity:d}=e,[p,f]=y.useState(!1);let m="unknown",g;switch(!0){case l:m="communityherocommentary",g=o?.insight_key;break;case c:m="communityherochart",g=o?.chart?.chart_info?.id;break;case h:m="communityheroengagevideo",g=o?.insight_key;break}const x=()=>{f(!0),u(s.id,g,m,"open")},v=n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"card-image-container",children:[n.jsx("div",{className:"insights-explorer-card-placeholder",children:n.jsx("i",{className:"material-icons",children:"description"})}),n.jsx("div",{className:"card-image",children:o.preview_image_url?n.jsx("img",{alt:"",src:o?.preview_image_url}):n.jsx("div",{className:"insights-explorer-image-placeholder"})})]}),n.jsx("div",{className:"card-label-container",children:n.jsx("div",{className:"card-label",children:"Commentary"})}),n.jsx("div",{className:"card-caption",children:n.jsxs("div",{className:"card-caption-left",children:[n.jsxs("div",{className:"title-description-wrapper",children:[n.jsx("div",{className:"insights-explorer-card-title-text hero",children:r?.title}),n.jsx("div",{className:"insights-explorer-card-description-text hero",children:o?.commentary_preview_text})]}),n.jsx("div",{className:"insights-explorer-card-datetime",children:n.jsx(gn,{local:!0,format:"MMMM D, YYYY",children:o?.publish_datetime})})]})})]}),b=n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"insights-explorer-content-container",children:n.jsxs("div",{id:"card-info-container",children:[n.jsx("div",{className:"insights-explorer-card-title-text",children:c?r?.chart_info?.name:r?.title}),n.jsx("div",{className:"insights-explorer-card-datetime",children:n.jsx(gn,{local:!0,format:"MMMM D, YYYY",children:o?.publish_datetime})})]})}),n.jsxs("div",{className:"card-image-container",children:[n.jsx("div",{className:"insights-explorer-card-placeholder",children:n.jsx("i",{className:"material-icons",children:"description"})}),n.jsx("div",{className:"card-image",children:n.jsx("img",{alt:"",src:c?r?.chart_image_jpg_url:h?r?.engage_insights_video:o?.preview_image_url})})]}),n.jsx("div",{className:"card-label-container",children:n.jsx("div",{className:"card-label",children:c?"Chart":h?"Video":"Commentary"})})]}),j=n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"card-header",children:n.jsxs("div",{className:"card-header-left",children:[n.jsx("div",{className:"insights-explorer-card-title-text",children:c?r?.chart_info?.name:r?.title}),n.jsx("div",{className:"insights-explorer-card-datetime",children:n.jsx(gn,{local:!0,format:"MMMM D, YYYY",children:o?.publish_datetime})})]})}),n.jsx("div",{className:"card-label-container",children:n.jsx("div",{className:"card-label",children:c?"Chart":"Video"})}),n.jsxs("div",{className:"card-image-container",children:[n.jsx("div",{className:"insights-explorer-card-placeholder"}),n.jsx("div",{className:"card-image",children:n.jsx("img",{alt:"",src:c?r?.chart_image_jpg_url:r?.video_thumbnail})}),h&&n.jsx("div",{className:"video-icon",children:n.jsx("i",{className:"material-icons insert-chart-icon",children:"smart_display"})})]})]});let w;switch(t){case 0:w=v;break;case 1:w=b;break;default:w=j}return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:`insights-explorer-card-wrapper fadeTransition space-${t}`,children:[n.jsx("div",{className:`insights-explorer-card-background${t===1?" is-second":""}`}),n.jsx("div",{className:`insights-explorer-card space-${t}${t===0?"":r?.chart?.aspect_ratio==="16:9"?" size-aspect-16-9":""}`,"diagnostic-id":`insights-explorer-${t===0?"hero":t===1?"second":""}-card`,onClick:x,children:w})]}),p&&(l||h)&&n.jsx(bm,{setModal:f,insights:r,isClientPiece:l,isInsightsVideo:h,insightsId:o?.id,modal:p}),p&&c&&n.jsx(Jo,{featuredChart:r,setChartModal:f,chartModal:p,isCommunity:d})]})}const __e=e=>({partnerInsightView:e.insightsexplorer&&e.insightsexplorer.partnerInsightView,user:e.auth&&e.auth.user,showcaseInsightsToolkits:e.insightsexplorer&&e.insightsexplorer.showcaseInsightsToolkits}),$y=le(__e,{setModalStatus:Ii,logEvent:_r})(S_e);function C_e(e){const{index:t,insights:r,partnerInsightView:i,setModalStatus:a}=e,[s,o]=y.useState(!1),l=r?.use_preview_image&&r.preview_image_url?r.preview_image_url:r.preview_chart?.chart_image_jpg_url,c=r.partner_company.primary_color;r.partner_company.text_color;const h=r.partner_company.use_primary_color;let u="unknown",d;switch(r.partner_company.partner_content_label_text){case"Featured":u="Insights Toolkit",d=!1;break;case"Partner":u="Partner Insight",d=!0;break}const p=n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"card-image-container",children:[n.jsx("div",{className:"insights-explorer-card-placeholder",children:n.jsx("i",{className:"material-icons",children:"description"})}),n.jsx("div",{className:"card-image",children:l?n.jsx("img",{alt:"",src:l}):n.jsx("div",{className:"insights-explorer-image-placeholder"})})]}),r.partner_company.use_logo&&r.partner_company.logo_url&&n.jsx("div",{className:"card-logo-container",children:n.jsx("img",{src:r.partner_company.logo_url,alt:""})}),n.jsx("div",{className:"card-caption",children:n.jsxs("div",{className:"card-caption-left",children:[n.jsx("div",{className:"insights-explorer-card-type",children:u}),n.jsx("div",{className:"insights-explorer-card-title-text hero",children:r.title}),n.jsx("div",{className:"insights-explorer-card-datetime",children:n.jsx(gn,{local:!0,format:"MMMM D, YYYY",children:r.publish_datetime})})]})})]}),f=n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"insights-explorer-content-container",children:n.jsxs("div",{id:"card-info-container",children:[n.jsx("div",{className:"insights-explorer-card-type",children:u}),n.jsx("div",{className:"insights-explorer-card-title-text",children:r.title}),n.jsx("div",{className:"insights-explorer-card-datetime",children:n.jsx(gn,{local:!0,format:"MMMM D, YYYY",children:r.publish_datetime})})]})}),n.jsxs("div",{className:"card-image-container",children:[n.jsx("div",{className:"insights-explorer-card-placeholder",children:n.jsx("i",{className:"material-icons",children:"description"})}),n.jsx("div",{className:"card-image",children:l?n.jsx("img",{alt:"",src:l}):n.jsx("div",{className:"insights-explorer-image-placeholder"})})]}),r.partner_company.use_logo&&r.partner_company.logo_url&&n.jsx("div",{className:"card-logo-container",children:n.jsx("img",{src:r.partner_company.logo_url,alt:""})})]}),m=n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"card-header",children:n.jsxs("div",{className:"card-header-left",children:[n.jsx("div",{className:"insights-explorer-card-type",children:u}),n.jsx("div",{className:"insights-explorer-card-title-text",children:r.title})]})}),n.jsxs("div",{className:"card-image-container",children:[n.jsx("div",{className:"insights-explorer-card-placeholder",children:n.jsx("i",{className:"material-icons",children:"description"})}),n.jsx("div",{className:"card-image",children:l?n.jsx("img",{alt:"",src:l}):n.jsx("div",{className:"insights-explorer-image-placeholder"})})]}),r.partner_company.use_logo&&r.partner_company.logo_url&&n.jsx("div",{className:"card-logo-container",children:n.jsx("img",{src:r.partner_company.logo_url,alt:""})})]});let g;switch(t){case 0:g=p;break;case 1:g=f;break;default:g=m}return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:`insights-explorer-card-wrapper fadeTransition space-${t}`,children:[n.jsx("div",{className:`insights-explorer-card-background${t===1?" is-second":""}`,style:{backgroundColor:h?c:""}}),n.jsx("div",{className:`insights-explorer-card space-${t}${r.use_preview_image&&r?.preview_image_url?"":r.preview_chart?.aspect_ratio==="16:9"?" size-aspect-16-9":""}`,"diagnostic-id":`insights-explorer-${t===0?"hero":t===1?"second":""}-card`,onClick:()=>o(!0),children:g})]}),s&&n.jsx(Ru,{isInsightsExplorer:!0,insightsKey:r.insight_key,modalView:s,setModalView:o,partnerInsightView:i,showSpotlightLink:d})]})}const N_e=e=>({partnerInsightView:e.insightsexplorer&&e.insightsexplorer.partnerInsightView}),YP=le(N_e,{setModalStatus:Ii})(C_e);function Ly(e){const{elements:t,active:r,type:i,title:a,numPerPage:s,breakpoints:o,isExploreTask:l}=e,c=ws(),[h,u]=y.useState(0),[d,p]=y.useState(0),[f,m]=y.useState(0),g=i==="paginated-row";y.useEffect(()=>{p(0)},[t.length]);let x;g?c<=600?x=t.length:c<=1280?x=~~((t.length-1)/((s||3)-2||1))+1:x=t.length:x=~~((t.length-1)/(s||1))+1;const v=()=>{const C=Object.keys(o);for(let E=0;E<C.length;E++)if(c<=~~C[E])return o[C[E]]},b=C=>{let E;g?E=document.getElementById("grid-layout-row"):E=document.querySelector(`[data-gridid='${a}']`);let P;return P=E&&E.children&&E.children[0]&&E.children[0].offsetWidth,P*C},j=`${v()}${g?" nowrap":""}`,w=t.map(C=>n.jsx(C.type,{...C.props,style:{transform:`translateX(-${b(d)+f}px)`,transition:f?"none":"transform 0.5s ease"}},C.key)),S=io({onSwipedLeft:()=>d<x-1&&p(d+1),onSwipedRight:()=>d>0&&p(d-1),onSwiping:C=>m(C.deltaX),onSwiped:()=>m(0)}),_=w;return r&&t?n.jsx(n.Fragment,{children:n.jsxs("div",{id:"grid-layout"+(g?"-row":""),className:j,"data-gridid":a,...S,children:[_,!l&&g&&(_.length>3||c<=992)&&n.jsxs(n.Fragment,{children:[d!==0&&n.jsx("div",{id:"row-pagination-left",children:n.jsx("button",{className:"btn-navigation",onClick:()=>p(d-1),children:n.jsx("i",{className:"material-icons",children:"chevron_left"})})}),d<x-1&&n.jsx("div",{id:"row-pagination-right",children:n.jsx("button",{className:"btn-navigation",onClick:()=>p(d+1),children:n.jsx("i",{className:"material-icons",children:"chevron_right"})})})]})]})}):n.jsx(n.Fragment,{})}function E_e(e){const{question:t,logEvent:r,user:i,questionIds:a,isCommunity:s,isShowcaseQuestions:o}=e,[l,c]=y.useState(!1),h=qj(),u=new URLSearchParams(h.search),d=oa(),p=u.get("id");y.useEffect(()=>{a&&(a?.includes(Number(p))&&p===t.id.toString()?c(!0):a?.includes(Number(p))||d.push("/insights?view=explorer"))},[a]);const f=m=>{m.preventDefault(),c(!0),r(i.id,t.id,s?o?"communityexplorerquestionanswer":"communityheroquestionanswer":"top-question","open")};return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"insights-explorer-card client-question-card","diagnostic-id":"client-question-card",onClick:f,children:n.jsxs("div",{className:"client-question-wrapper",children:[n.jsx("div",{className:"client-question",children:t.question_text}),n.jsx(Tp,{})]})}),l&&n.jsx(D0,{question:t,setModal:c,modal:l})]})}const T_e=e=>({user:e.auth.user}),KP=le(T_e,{logEvent:_r})(E_e);function k_e(e){const{user:t,getInsightsExplorer:r,partnerCompanies:i,showcaseCharts:a,showcaseInsights:s,modalStatus:o,allowChartExplorer:l,showcaseQuestionAnswers:c,hedwigPermissions:h,canUseQuestionAnswer:u,showcaseInsightsToolkits:d,getTasks:p,tasks:f,numIncompleteTasks:m,setExploreTaskCollapse:g,isCollapsed:x,showWelcomeModal:v,setWelcomeModal:b,numPrevIncompleteTasks:j,logEvent:w,isLicenseUpgradable:S}=e,_=ws(),C=qj(),P=new URLSearchParams(C.search).get("filter"),[T,N]=y.useState(""),[k,I]=y.useState(!1),[D,O]=y.useState(!1),[$,U]=y.useState(!1),[B,L]=y.useState(!1),[A,R]=y.useState(Date.now()),F=y.useRef(null),q=ti(d?.advisor_notes_text),{Disabled:V,Enabled:X}=_n,{Community:M,SponsoredCommunity:W}=Br,K=m===0;y.useEffect(()=>{N(P)},[P]),y.useEffect(()=>{r(t.id),p(t.id)},[t.id]);const z=()=>{U(!0),w(t.id,null,"communitycta","open")},Y=Qe=>{w(t.id,d?.insight_key,Qe?"communitytoolkitadvisornotes":"communitytoolkitadvisornotesvideo",Qe?"open":"play")};y.useEffect(()=>{_<=600&&g(!0)},[]),y.useEffect(()=>{if(!o){const Qe=document.body.style.top;document.body.style.position="",document.body.style.top="",document.body.style.width="";const tt=document.querySelector(".nav-wrapper");tt.style.paddingRight="",tt.style.paddingLeft="",window.scrollTo(0,parseInt(Qe||"0")*-1)}},[o]),y.useEffect(()=>{P&&window.scrollTo(0,0)},[P]);const ie=y.useMemo(()=>c?.map(Qe=>Qe.id),[c]),ne=t?.account_permissions.name===M||t?.account_permissions.name===W;if(!i||!a||(ne?!d:!s))return null;const ve=s&&s[0],be=s?.slice(1,4)?.map((Qe,tt)=>n.jsx(YP,{index:tt+1,insights:Qe},Qe.insight_key)),ye=a.slice(0,4).map((Qe,tt)=>n.jsx(tSe,{chart:Qe,isCommunity:ne},Qe.id)),ke=c?.map((Qe,tt)=>n.jsx(KP,{question:Qe,questionIds:ie,isCommunity:ne,isShowcaseQuestions:!0},Qe.id)),fe=d?.client_questions?.map((Qe,tt)=>n.jsx(KP,{question:Qe,isCommunity:ne},Qe.id)),se=f||[],ge=Object.assign([],se),De=(Qe,tt)=>Qe.is_completed!==tt.is_completed?Qe.is_completed?1:-1:Qe.task_order<tt.task_order?-1:1;ge.sort(De);const ae=[{title:"AI Capabilities",frontend_action:"upgrade",is_upgrade:!0},{title:"Record Your Own Videos",frontend_action:"upgrade",is_upgrade:!0},{title:"Share an Insight",frontend_action:"upgrade",is_upgrade:!0}],ee=(K?ge.filter(Qe=>Qe.is_shortcut).concat(ae):ge).map((Qe,tt)=>n.jsx(Z0e,{task:Qe,showShortcuts:K},Qe.id??tt)),oe=se.length>0?Math.floor((se.length-m)/se.length*100):0,Pe=Qe=>{N(Qe.target.value)},Fe=i.slice().sort((Qe,tt)=>Qe.partner_content_label_text==="Featured"?-1:1),Re=(P?Fe:i)?.map((Qe,tt)=>{let We=Qe.insights;T==="chartbook"?We=Qe.insights.filter(Et=>Et.has_chartbook):T==="commentary"?We=Qe.insights.filter(Et=>Et.has_clientpiece):T==="insightsvideo"?We=Qe.insights.filter(Et=>Et.has_insights_video):T==="insightspodcast"&&(We=Qe.insights.filter(Et=>Et.has_insights_podcast));const pt=We.map((Et,Ot)=>n.jsx(w_e,{partnerCompany:Qe,insight:Et,selectedFilter:T,isCommunity:ne},Et.insight_key));return pt.length>0?n.jsxs("div",{className:"partner-insights",children:[n.jsx("div",{className:"partner-insights-header",children:Qe.logo_url?Qe.partner_content_label_text==="Partner"?n.jsx(Ze,{to:`/spotlight/${Qe.spotlight}`,children:n.jsx("div",{className:"partner-company-logo partner",children:n.jsx("img",{src:Qe.logo_url,alt:""})})}):n.jsx("div",{className:"partner-company-logo",children:n.jsx("img",{src:Qe.logo_url,alt:""})}):n.jsx(n.Fragment,{})}),n.jsx(Ly,{breakpoints:Ls,elements:pt,type:"paginated-row",numPerPage:3,active:!0})]},Qe.id??tt):pt}),Ve=n.jsx(n.Fragment,{children:n.jsxs("div",{id:"insights-explorer-grid-wrapper","diagnostic-id":"all-insights-explorer-grid-wrapper",children:[n.jsx("div",{className:"back-link-wrapper",children:n.jsxs(Ze,{to:{pathname:"/insights",search:"?view=explorer"},className:"back-link","diagnostic-id":"explorer-back-btn",onClick:()=>{N("")},children:[n.jsx(ir,{}),n.jsx("span",{children:"Back to Featured Insights"})]})}),n.jsx("div",{className:"insights-showcase-header",children:n.jsx("h3",{children:"All Insights"})}),ne?n.jsx(n.Fragment,{}):n.jsxs("div",{className:"all-insights-filters-container",children:[n.jsx("div",{className:"all-insights-header",children:"Filter by:"}),n.jsxs("div",{className:"filter-radio-buttons",children:[n.jsxs("div",{className:"radio-button",children:[n.jsx("input",{name:"chartbook",type:"rad
72io",id:"chartbook",value:"chartbook",onChange:Pe,checked:T==="chartbook"}),n.jsx("label",{"diagnostic-id":"chartbook-filter-label",htmlFor:"chartbook",children:"Chartbooks"})]}),n.jsxs("div",{className:"radio-button",children:[n.jsx("input",{name:"commentary",type:"radio",id:"commentary",value:"commentary",onChange:Pe,checked:T==="commentary"}),n.jsx("label",{"diagnostic-id":"clientpiece-filter-label",htmlFor:"commentary",children:"Commentaries"})]}),n.jsxs("div",{className:"radio-button",children:[n.jsx("input",{name:"insightsvideo",type:"radio",id:"insightsvideo",value:"insightsvideo",onChange:Pe,checked:T==="insightsvideo"}),n.jsx("label",{"diagnostic-id":"insightsvideo-filter-label",htmlFor:"insightsvideo",children:"Insights Videos"})]}),n.jsxs("div",{className:"radio-button",children:[n.jsx("input",{name:"insightspodcast",type:"radio",id:"insightspodcast",value:"insightspodcast",onChange:Pe,checked:T==="insightspodcast"}),n.jsx("label",{"diagnostic-id":"insightspodcast-filter-label",htmlFor:"insightspodcast",children:"Insights Podcasts"})]})]}),n.jsx("div",{className:"clear-filter",children:n.jsx("button",{type:"button",className:"btn-primary-text clear-filter-btn","diagnostic-id":"clear-filters-btn",onClick:Pe,children:"Clear Filters"})})]}),n.jsx("div",{className:"insights-explorer-container",children:Re.flat().length===0?n.jsx("div",{className:"partner-insights",children:n.jsxs("div",{id:"insights-explorer-filter-placeholder",className:"fadeTransition",children:[n.jsx("i",{className:"material-icons",children:"search_off"}),n.jsx("div",{className:"no-results-msg",children:"No results found."}),n.jsx("button",{className:"btn-cancel",onClick:()=>N(""),children:"Clear Filters"})]})}):Re})]})}),Xe=n.jsx(ot,{setModal:null,disableClickOutsideCancel:!0,children:n.jsxs("div",{className:"info-modal-container welcome-modal","diagnostic-id":"welcome-modal-container",children:[n.jsx("div",{className:"info-modal-header-icon",children:n.jsx("i",{className:"material-symbols-outlined",children:"diversity_3"})}),n.jsx("h4",{className:"welcome-header",children:"Welcome to"}),n.jsx("div",{className:"welcome-sub",children:"Clearnomics Community Edition"}),n.jsx("p",{className:"welcome-msg",children:"Clearnomics Community is your home for thoughtful client toolkits on markets and the economy. Our platform is designed to enhance your client relationships and win over prospects with clearly communicated insights."}),n.jsxs("ul",{className:"feature-descriptions",children:[n.jsxs("li",{children:[n.jsx("strong",{children:"Chartbooks"})," provide data-driven visualizations that help explain market developments clearly and effectively"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Commentaries"})," offer nuanced analysis of economic events and market movements"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Client Questions"})," address common investor concerns with clear, concise explanations that you can easily share"]})]}),n.jsxs("p",{className:"get-started-description",children:["To get started, click on a task from ",n.jsx("em",{children:"Explore Clearnomics"})," at the top of the page."]}),n.jsx("div",{className:"buttons",children:n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"accept-welcome-btn",onClick:()=>b(!1),children:"Continue"})})]})}),et=n.jsxs("div",{className:`explore-wrapper${x?" close":" open"}`,"diagnostic-id":"explore-task-wrapper",children:[n.jsxs("div",{className:"explore-header",onClick:()=>g(!x),children:[n.jsxs("div",{className:"header-icon-text",children:[n.jsx("h4",{children:"Explore Clearnomics"}),n.jsx("i",{className:"material-symbols-outlined chevron-right",children:"chevron_right"})]}),n.jsxs("div",{className:"explore-progress-container",children:[n.jsxs("div",{className:`explore-percent${m>0?" has-incomplete-task":""}`,children:[f?.length-m," / ",f?.length," Completed"]}),n.jsx("div",{className:"explore-progress-bar",children:n.jsx("div",{style:{width:`${oe}%`}})})]})]}),n.jsx(Ly,{breakpoints:Ls,elements:ee,type:"paginated-row",numPerPage:3,active:!0,isExploreTask:!0})]}),rt=n.jsxs("div",{className:`explore-wrapper shortcuts${x?" close":" open"}`,children:[n.jsx("div",{className:"explore-header",children:n.jsx("h5",{children:"Explore Clearnomics"})}),n.jsx(Ly,{breakpoints:Ls,elements:ee,type:"paginated-row",numPerPage:3,active:!0,isExploreTask:!0}),ee?.length>3&&n.jsx("i",{className:"material-symbols-outlined chevron-right",onClick:()=>g(!x),children:"chevron_right"})]}),bt=n.jsxs("div",{className:"explore-wrapper close setup-completed",children:[n.jsx("i",{className:"material-icons check-icon",children:"check_circle"}),n.jsx("h4",{children:"Congratulations!"}),n.jsx("div",{className:"setup-completed-msg",children:"Your initial setup is complete"}),n.jsx("button",{type:"button",className:"btn btn-primary access-shortcuts","diagnostic-id":"access-shortcuts-btn",onClick:()=>O(!0),children:"Continue"})]});return P?Ve:n.jsxs("div",{id:"insights-explorer-grid-wrapper","diagnostic-id":"insights-explorer-grid-wrapper",children:[v&&Xe,B&&n.jsx(bm,{setModal:L,modal:B,isForAdvisor:!0}),$&&n.jsx(ii,{setModal:U,modal:$}),n.jsxs("div",{className:"insights-explorer-container",children:[ne?K?j>0&&!D?bt:_>600&&rt:et:n.jsx(n.Fragment,{}),(s?.length>0||d)&&n.jsxs("div",{className:`insights-showcase-wrapper${ne?" hero-insights-toolkit":""}`,children:[n.jsx("div",{className:"insights-showcase-header",children:ne?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"hero-insights-toolkit-subheader",children:"Featured Community Toolkit"}),n.jsx("h4",{children:d.title})]}):n.jsx("h4",{children:"Featured Insights"})}),ne&&(d?.advisor_notes_text||d?.advisor_notes_video)&&n.jsx("div",{className:"insights-explorer-for-advisors",children:n.jsxs("div",{className:"for-advisors-wrapper",children:[d?.advisor_notes_text&&n.jsx("div",{className:"for-advisors-card",children:n.jsxs("div",{className:`card-caption${d?.advisor_notes_video?" has-video":""}`,children:[n.jsxs("div",{className:"card-caption-left",children:[n.jsx("div",{className:"title-description-wrapper",children:n.jsx("div",{className:"insights-explorer-card-description-text hero",dangerouslySetInnerHTML:{__html:q}})}),n.jsx("div",{className:"read-more-btn",children:n.jsx("button",{className:"btn-primary-text",onClick:()=>{Y(!0),F.current&&F.current.pause(),L(!0)},children:"Read more"})})]}),n.jsx("div",{className:"card-label-container",children:n.jsx("div",{className:"card-label",children:"For Advisors"})})]})}),d?.advisor_notes_video&&n.jsx("div",{className:`video-container${d?.advisor_notes_text?" with-notes":" without-notes"}`,children:n.jsx("div",{className:"for-advisors-video",children:n.jsx("video",{ref:F,onContextMenu:Qe=>Qe.preventDefault(),className:"partner-insight-for-advisors-video",src:`${d?.advisor_notes_video?.rendered_video_url}/?time=${A}`,controls:!0,disablePictureInPicture:!0,controlsList:"nodownload",poster:d?.advisor_notes_video?.video_thumbnail&&`${d?.advisor_notes_video?.video_thumbnail}/?time=${A}`,onPlay:()=>Y(!1)})})})]})}),n.jsx("div",{className:"insights-explorer-showcase",children:ne?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"insights-explorer-layout-hero",children:n.jsx($y,{index:0,insights:d?.client_piece,isClientPiece:!0,isCommunity:ne})}),n.jsx("div",{className:"insights-explorer-layout",children:n.jsxs(n.Fragment,{children:[d?.chart&&n.jsx($y,{index:d?.engage_insights_video?2:1,insights:d?.chart,isChart:!0,isCommunity:ne}),d?.engage_insights_video&&n.jsx($y,{index:d?.chart?3:1,insights:d?.engage_insights_video,isInsightsVideo:!0,isCommunity:ne}),n.jsx("div",{className:"related-questions-header",children:"Related Client Questions"}),n.jsx("div",{className:"insights-explorer-card-wrapper fadeTransition space-1 top-client-questions-wrapper",children:fe})]})})]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"insights-explorer-layout-hero",children:n.jsx(YP,{index:0,insights:ve})}),n.jsx("div",{className:"insights-explorer-layout",children:be})]})}),n.jsx("div",{className:"view-all-link-wrapper",children:n.jsxs(Ze,{to:{pathname:"/insights",search:"?view=explorer&filter=all"},className:"view-all-link","diagnostic-id":"view-all-insights-btn",children:[n.jsx("span",{"diagnostic-id":"view-more-text",children:ne?"View More Toolkits":"View All"}),n.jsx(Tp,{})]})})]}),ne&&S&&n.jsxs("div",{className:"upgrade-cta","diagnostic-id":"upgrade-cta",children:[n.jsxs("div",{className:"upgrade-cta-header-description",children:[n.jsx("h4",{children:"Upgrade Your Clearnomics Experience"}),n.jsx("div",{className:"cta-description",children:"For many more insights and capabilities to enhance your practice, upgrade to Clearnomics"})]}),n.jsx("div",{className:"button",children:n.jsx("button",{className:"btn btn-primary-lg","diagnostic-id":"upgrade-cta-start-btn",type:"button",onClick:()=>{t.is_upgrade_disabled||z()},disabled:t.is_upgrade_disabled,children:t.is_upgrade_disabled?"UPGRADE REQUESTED":"GET STARTED"})})]}),n.jsxs("div",{className:"featured-charts-client-questions",children:[n.jsxs("div",{className:"top-client-questions-container",children:[n.jsx("div",{className:"top-client-questions-header",children:n.jsxs("h5",{children:["Top Client Questions",n.jsx(Ke,{title:"Here are some of the top market and economic questions clients are asking. Use Clearnomics Q&A to quickly draft a thoughtful, client-friendly answer.",placement:"top",children:n.jsx("i",{className:"material-icons","diagnostic-id":"help-icon",children:"help_outline"})})]})}),n.jsx("div",{className:"top-client-questions",children:ke}),n.jsx(wn,{hasPermission:!!(h?.allow_use_question_answer_ask_question!==V&&u),children:n.jsx("div",{className:"view-all-link-wrapper",children:n.jsxs(Ze,{to:{pathname:"/questions"},className:"view-all-link","diagnostic-id":"ask-your-own-btn",children:[n.jsx("span",{children:"Ask Your Own"}),n.jsx(Tp,{})]})})})]}),a.length>0&&n.jsxs("div",{className:"featured-charts-container",children:[n.jsx("div",{className:"featured-charts-header",children:n.jsx("h5",{children:"Featured Charts"})}),n.jsx("div",{className:"featured-charts",children:ye}),n.jsx(wn,{hasPermission:l===X,children:n.jsx("div",{className:"view-all-link-wrapper",children:n.jsxs(Ze,{to:{pathname:"/chartlibrary"},className:"view-all-link","diagnostic-id":"view-all-charts-btn",children:[n.jsx("span",{children:"Open Chart Library"}),n.jsx(Tp,{})]})})})]})]}),Re]})]})}const P_e=e=>({user:e.auth.user,partnerCompanies:e.insightsexplorer&&e.insightsexplorer.partnerCompanies,showcaseCharts:e.insightsexplorer&&e.insightsexplorer.showcaseCharts,showcaseInsights:e.insightsexplorer&&e.insightsexplorer.showcaseInsights,modalStatus:e.preferences&&e.preferences.modalStatus,allowChartExplorer:e.auth&&e.auth.user&&e.auth.user.account_permissions&&e.auth.user.account_permissions.allow_chart_explorer,showcaseQuestionAnswers:e.insightsexplorer&&e.insightsexplorer.showcaseQuestionAnswers,canUseQuestionAnswer:e.auth&&e.auth.user&&e.auth.user.can_use_question_answer,hedwigPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.hedwig_permissions,showcaseInsightsToolkits:e.insightsexplorer&&e.insightsexplorer.showcaseInsightsToolkits,tasks:e.insightsexplorer&&e.insightsexplorer.tasks,numIncompleteTasks:e.insightsexplorer&&e.insightsexplorer.numIncompleteTasks,isCollapsed:e.preferences&&e.preferences.isCollapsed,showWelcomeModal:e.preferences&&e.preferences.showWelcomeModal,numPrevIncompleteTasks:e.insightsexplorer&&e.insightsexplorer.numPrevIncompleteTasks,isLicenseUpgradable:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.license_type&&e.auth.user.company.license_type.is_upgradable}),I_e={getInsightsExplorer:_0e,getTasks:N0e,setExploreTaskCollapse:oZ,setWelcomeModal:XO,logEvent:_r},D_e=le(P_e,I_e),R_e=D_e(k_e);function O_e(e){const{changeSearch:t,search:r,numResults:i,type:a}=e,[s,o]=y.useState(!1),l=()=>{t(""),o(!1)};return n.jsx("div",{id:"searchbar-container",className:s?r?"input-active active-search":"input-active":"",children:n.jsxs("div",{id:"search-input-container",children:[n.jsx("form",{autoComplete:"off",onSubmit:c=>{c.preventDefault()},children:n.jsx("input",{type:"search","diagnostic-id":"insights-browser-search-input",placeholder:`Search ${a==="contacts"?"Contacts":"Solutions"}...`,onChange:c=>t(c.target.value),className:`${r.length>0?"active":""}`,value:r})}),r?n.jsx("i",{className:"material-icons","diagnostic-id":"clear-search-btn",onClick:l,children:"close"}):n.jsx("i",{className:"material-icons prefix",children:"search"}),r&&n.jsxs("h6",{id:"search-results","diagnostic-id":"search-results-text",children:[i," search results -"," ",n.jsx("button",{className:"btn-cancel",onClick:l,children:"Clear Search"})]})]})})}const A_e=e=>({userId:e.auth.user&&e.auth.user.id}),K$=le(A_e,{})(O_e);function M_e(e){const{sort:t,changeSort:r}=e,i=a=>{r([a,t[1]==="descending"?"ascending":"descending"])};return n.jsxs("div",{id:"contact-list-header",className:"contact-list-row","diagnostic-id":"contact-list-header",children:[n.jsxs("div",{className:"contact-list-column",onClick:()=>i("first_name"),children:["First Name",t[0]==="first_name"&&(t[1]==="descending"?n.jsx("i",{className:"material-icons",children:"arrow_downward"}):n.jsx("i",{className:"material-icons",children:"arrow_upward"}))]}),n.jsxs("div",{className:"contact-list-column",onClick:()=>i("last_name"),children:["Last Name"," ",t[0]==="last_name"&&(t[1]==="descending"?n.jsx("i",{className:"material-icons",children:"arrow_downward"}):n.jsx("i",{className:"material-icons",children:"arrow_upward"}))]}),n.jsxs("div",{className:"contact-list-column",onClick:()=>i("email"),children:["Email"," ",t[0]==="email"&&(t[1]==="descending"?n.jsx("i",{className:"material-icons",children:"arrow_downward"}):n.jsx("i",{className:"material-icons",children:"arrow_upward"}))]}),n.jsxs("div",{className:"contact-list-column",onClick:()=>i("contact_title"),children:["Title"," ",t[0]==="contact_title"&&(t[1]==="descending"?n.jsx("i",{className:"material-icons",children:"arrow_downward"}):n.jsx("i",{className:"material-icons",children:"arrow_upward"}))]}),n.jsx("div",{className:"contact-list-column"})]})}const $_e=(e,t,r,i,a,s,o,l)=>n.jsxs("div",{className:"contact-detail-container",children:[n.jsx("label",{children:t}),n.jsx(me,{type:"text",name:e,id:e,"diagnostic-id":s,placeholder:o,className:r[e]&&i[e]?"text-input error":"",disabled:a,maxLength:l}),r[e]&&i[e]&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:r[e]})]},e),L_e=({dirty:e,isDirty:t,setDirty:r})=>(y.useEffect(()=>{e!==t&&r&&r(e)},[e]),null),F_e=e=>
72{const{userId:t,modal:r,handleCancel:i,newPartnerContact:a,contact:s,setModal:o,editPartnerContact:l,editModal:c}=e,[h,u]=y.useState(null),[d,p]=y.useState(!1);let f;f=h||s?.profile_picture_url;const m=(v,b,j,w,S,_)=>{v===void 0?(u(null),d&&p(!1),_(`${w}File`,null),delete b[`${w}File`]):Bo(v)?v&&v.size>1048576?(u(null),_(`${w}File`,void 0,!1),S(w+"File","That file is larger than 1MB. Please use a smaller file or contact us for help.")):(u(URL.createObjectURL(v)),d&&p(!1),_(`${w}File`,v),delete b[`${w}File`]):S(w+"File","Image must be a PNG or JPG/JPEG file.")},g=(v,b,j)=>{b("imageFile",void 0),p(!0)},x=_t().shape({firstName:Ae().required("Please enter a first name").max(100,"Name is too long"),middleName:Ae().nullable().max(100,"Name is too long"),lastName:Ae().required("Please enter a last name").max(100,"Name is too long"),email:Ae().email("Please enter a valid email").max(240,"Email is too long"),credentials:Ae().nullable().max(100,"Certifications / credentials is too long"),jobTitle:Ae().required("Please enter a job title").max(100,"Job title is too long"),phoneNumber:Ae().nullable().max(30,"Phone number is too long"),years_experience:Ae().nullable().max(10,"Years of experience is too long")});return n.jsx(ot,{setModal:i,disableClickOutsideCancel:!0,children:n.jsxs("div",{className:"partner-contact-modal-container","diagnostic-id":"partner-contact-modal-container",children:[n.jsx("i",{className:"material-icons",onClick:()=>i(),children:"close"}),n.jsx("h5",{className:"create-contact-header",children:`${r?"Create a":"Edit"} Company Contact`}),n.jsx(gt,{initialValues:{imageFile:null,firstName:s?.first_name||"",middleName:s?.middle_name||"",lastName:s?.last_name||"",email:s?.email||"",credentials:s?.contact_credentials||"",jobTitle:s?.contact_title||"",phoneNumber:s?.phone_number||"",yearsOfExperience:s?.years_experience||""},validationSchema:x,onSubmit:(v,{setSubmitting:b})=>{c?l(t,s.id,v,d).then(()=>{u(null),p(!1)}).then(()=>i(!0)):a(t,v).then(()=>{u(null),p(!1)}).then(()=>i(!0))},enableReinitialize:!0,children:({values:v,touched:b,errors:j,dirty:w,isSubmitting:S,setFieldError:_,setFieldValue:C})=>n.jsxs(n.Fragment,{children:[n.jsx(L_e,{dirty:w,isDirty:e.isDirty,setDirty:e.setDirty}),n.jsxs(vt,{onClick:E=>E.stopPropagation(),children:[n.jsxs("div",{className:"form-group",children:[n.jsx("p",{className:"upload-profile-msg",children:"Upload a Profile Picture"}),n.jsx("input",{id:"imageFile","diagnostic-id":"image-input",name:"imageFile",type:"file",accept:"image/png,image/x-png,image/jpeg,image/jpg",value:h?h.name:"",onChange:E=>{m(E.currentTarget.files[0],j,v,"image",_,C)},className:`${j.imageFile&&b.imageFile?"text-input error":"file-path validate"}${h?" image-file":f?" image-link":""}`}),j.imageFile&&n.jsx("div",{className:"input-feedback image-file-input-feedback","diagnostic-id":"input-feedback",children:j.imageFile}),n.jsxs("div",{className:`img-upload-grp${f?" with-img":" without-img"}`,children:[n.jsx(Eo,{id:"imageFile",diagId:"image-upload-drag-drop-input",name:"imageFile",acceptedTypes:"image/png,image/x-png,image/jpeg,image/jpg",value:h?h.name:"",onChange:E=>{m(E.currentTarget.files[0],j,v,"image",_,C)},className:`${j.imageFile&&b.imageFile?"text-input error":"file-path validate"}${h?" image-file":f?" image-link":""}`}),f?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"image-group",children:n.jsxs(n.Fragment,{children:[d?n.jsx("h6",{className:"cleared-profile-text",children:"Profile Picture Removed"}):n.jsx("img",{src:f,alt:"profilePicture"}),!d&&!h&&f&&n.jsx(Ke,{title:"Clear profile picture",placement:"top",children:n.jsx("div",{className:"clear-picture-container",children:n.jsx("i",{className:"material-icons","diagnostic-id":"profile-pic-clear-btn",onClick:()=>g(v,C),children:"cancel"})})})]})}),(d||h)&&n.jsx("button",{id:"clear-btn",type:"button",onClick:()=>{m(void 0,j,v,"image",_,C)},children:"Undo"})]}):n.jsxs("div",{className:"image-group-placeholder",children:[n.jsx("i",{className:"material-icons",children:"panorama"}),n.jsx("p",{children:"Drag and drop an image file here, or click to select a file to upload"})]})]})]}),n.jsx("div",{className:"contact-details-container",children:[["firstName","First Name*","first-name-input","First name",100],["middleName","Middle Name","middle-name-input","Middle name",100],["lastName","Last Name*","last-name-input","Last name",100],["email","Email Address","email-address-input","Email address",240],["credentials","Certifications/Credentials","credentials-input","Certifications/credentials",100],["jobTitle","Job Title*","job-title-input","Job title",100],["phoneNumber","Phone Number","phone-number-input","Phone number",30],["yearsOfExperience","Years of Experience","years-of-ex
72perience-input","Enter a number...",10]].map(E=>$_e(E[0],E[1],j,b,!1,E[2],E[3],E[4]))}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>i(),children:"Cancel"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",disabled:!w||!!Object.keys(j).length||S,children:"Save"})]})]})]})})]})})},U_e=e=>({userId:e.auth.user&&e.auth.user.id}),X$=le(U_e,{newPartnerContact:Lxe,editPartnerContact:Fxe})(F_e);function B_e(e){const{contact:t,history:r,userId:i,isDirty:a,setDirty:s}=e,[o,l]=y.useState(!1),c=h=>{a&&!h?window.confirm("Changes you made may not be saved.")&&(l(!1),s(!1)):(l(!1),s(!1))};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"contact-list-row","diagnostic-id":"contact-list-row",children:[n.jsx("div",{className:"contact-list-column",children:t.first_name}),n.jsx("div",{className:"contact-list-column",children:t.last_name}),n.jsx("div",{className:"contact-list-column",children:t.email}),n.jsx("div",{className:"contact-list-column",children:t.contact_title}),n.jsx("div",{className:"contact-list-column icons",onClick:h=>h.stopPropagation(),children:n.jsx(qje,{className:"material-icons edit-icon","diagnostic-id":"contact-list-edit-btn",onClick:h=>{h.stopPropagation(),h.preventDefault(),l(!0)}})})]}),o&&n.jsx(X$,{editModal:o,setDirty:s,isDirty:a,handleCancel:c,contact:t,setModal:l})]})}const q_e=e=>({userId:e.auth.user&&e.auth.user.id}),V_e=le(q_e,{})(Jt(B_e));function R0(e){const{type:t,numPerPage:r,breakpoints:i,elements:a,active:s,changeSearch:o,title:l}=e,c=ws(),[h,u]=y.useState(0),[d,p]=y.useState(0),[f,m]=y.useState(0),g=t==="paginated",x=t==="paginated-row",v=~~((a.length-1)/r)+1,b=d*r,j=a.slice(b,b+r);d>=v&&p(d-1);const S=`${(()=>{const E=i&&Object.keys(i);for(let P=0;P<E?.length;P++)if(c<=~~E[P])return i[E[P]]})()}${x?" nowrap":""}`,_=io({onSwipedLeft:()=>d<v-1&&p(d+1),onSwipedRight:()=>d>0&&p(d-1),onSwiping:E=>m(E.deltaX),onSwiped:()=>m(0)}),C=g?j:a;return s&&a?n.jsxs(n.Fragment,{children:[n.jsx("div",{id:"grid-layout"+(x?"-row":""),className:S,"data-gridid":l,..._,children:C}),g&&v>1&&n.jsxs("div",{className:"browser-page-btns",children:[d>0&&n.jsxs("button",{className:"btn-navigation",onClick:()=>p(d-1),children:["< Previous Page"," "]}),d<v-1&&n.jsx("button",{className:"btn-navigation",onClick:()=>p(d+1),children:"Next Page >"})]})]}):n.jsx(n.Fragment,{})}function z_e(e){const{changeSearch:t,setModal:r,setContactSortPreference:i,active:a,contacts:s,isDirty:o,setDirty:l}=e,[c,h]=y.useState(e.sort||["update_datetime","descending"]),u=6,d=m=>{m.preventDefault(),t(""),r(!0)};y.useEffect(()=>{i(c)},[c]);const p=n.jsxs("div",{id:"contact-list-new",className:"contact-list-row","diagnostic-id":"contact-list-new-btn",onClick:d,children:["New Contact",n.jsx("i",{className:"material-icons",children:"add_circle"})]}),f=s&&s.length>0?s.map(m=>n.jsx(V_e,{contact:m,isDirty:o,setDirty:l},m.id)):[];return n.jsx("div",{id:"contact-list",className:"fadeTransition"+(a?" active":""),children:s&&s.length>0?n.jsxs(n.Fragment,{children:[n.jsx(M_e,{changeSort:h,sort:c}),n.jsx(R0,{type:"paginated",numPerPage:u,elements:f,active:a})]}):p})}const H_e=e=>({sort:e.preferences.partnerContactSort,userId:e.auth.user&&e.auth.user.id}),G_e=le(H_e,{setContactSortPreference:aZ})(z_e),XP={LIST:"list"};function W_e(e){const{getContacts:t,userId:r,companyContacts:i,sort:a,setDirty:s,isDirty:o}=e,[l,c]=y.useState(e.view||XP.LIST),[h,u]=y.useState(""),[d,p]=y.useState(!1);y.useEffect(()=>{t(r)},[]);const f=i&&h?i.filter(b=>Mn(b.first_name.toLowerCase(),h.toLowerCase())||Mn(b.last_name.toLowerCase(),h.toLowerCase())||b.email&&Mn(b.email.toLowerCase(),h.toLowerCase())||b.contact_title&&Mn(b.contact_title.toLowerCase(),h.toLowerCase())):i,m=f&&Object.assign([],f);f&&a&&(([b,j])=>{m.sort((w,S)=>j==="ascending"?(w[b]||"")>(S[b]||"")?1:-1:(w[b]||"")<(S[b]||"")?1:-1)})(a);const x=h&&f&&f.length===0,v=b=>{o&&!b?window.confirm("Changes you made may not be saved.")&&(p(!1),s(!1)):(p(!1),s(!1))};return n.jsxs("div",{id:"contact-grid-wrapper","diagnostic-id":"contact-grid-wrapper",children:[d&&n.jsx(X$,{modal:d,handleCancel:v,setModal:p,setDirty:s,isDirty:o}),n.jsxs("div",{className:"browser-header-btn-grp",children:[n.jsx("h4",{children:"Company Contacts"}),n.jsxs("button",{className:"btn-primary","diagnostic-id":"company-contact-new-modal-btn",onClick:()=>p(!0),children:[n.jsx("i",{className:"material-icons",children:"add"}),"New"]})]}),n.jsx("div",{className:"company-contact-message",children:"Add company contacts that can be displayed on insights and s
72olutions pages"}),i?.length>0&&n.jsx(K$,{changeSearch:u,numResults:f&&f.length,search:h,type:"contacts"}),x?n.jsxs("div",{id:"insights-browser-search-placeholder",className:"fadeTransition",children:[n.jsx("i",{className:"material-icons",children:"search_off"}),n.jsxs("div",{children:['No results for "',h,'"']}),n.jsx("button",{className:"btn-cancel",onClick:()=>u(""),children:"Clear Search"})]}):n.jsx(G_e,{contacts:m,active:l===XP.LIST,changeSearch:u,setModal:p,setDirty:s,isDirty:o})]})}const Y_e=e=>({userId:e.auth.user&&e.auth.user.id,companyContacts:e.spotlight&&e.spotlight.companyContacts,sort:e.preferences.partnerContactSort}),K_e=le(Y_e,{getContacts:R$})(zt(W_e)),X_e=({dirty:e,isDirty:t,setDirty:r})=>(y.useEffect(()=>{e!==t&&r(e)},[e]),null);function Q_e(e){const{partnerSettings:t,isDirty:r,setDirty:i,partnerDesigns:a,updatePartnerSettings:s,partnerStub:o,getPartnerDesigns:l,getPartnerSettings:c}=e,h={overlayDesign:t?.overlay_design?.name,primaryColor:t?.primary_color,textColor:t?.text_color};y.useEffect(()=>{(!t||!a)&&(c(),l())},[]);const u=_t().shape({primaryColor:Ae().test("is-hexcode","Please enter a valid hexcode value (i.e. #22ffaa)",d=>{const p="1234567890abcdefABCDEF";return!d||d.length!==4&&d.length!==7||d.slice(0,1)!=="#"?!1:d.slice(1).split("").every(f=>p.includes(f))}),textColor:Ae().test("is-hexcode","Please enter a valid hexcode value (i.e. #22ffaa)",d=>{const p="1234567890abcdefABCDEF";return!d||d.length!==4&&d.length!==7||d.slice(0,1)!=="#"?!1:d.slice(1).split("").every(f=>p.includes(f))})});return n.jsx("div",{id:"partner-settings-grid-wrapper","diagnostic-id":"partner-settings-grid-wrapper",children:n.jsx(gt,{initialValues:h,onSubmit:(d,{setSubmitting:p})=>{s(d).then(()=>{p(!1)})},validationSchema:u,enableReinitialize:!0,children:d=>{const{values:p,touched:f,errors:m,dirty:g,isSubmitting:x,setFieldValue:v,handleReset:b,handleChange:j}=d;return n.jsxs(n.Fragment,{children:[n.jsx(X_e,{dirty:g,isDirty:r,setDirty:i}),n.jsxs(vt,{children:[n.jsxs("div",{className:"browser-header-btn-grp",children:[n.jsx("h4",{children:"Partner Settings"}),n.jsxs("div",{className:"partner-settings-btns",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"partner-settings-cancel-btn",onClick:b,disabled:!g||x,children:"CANCEL"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"partner-settings-save-btn",disabled:!g||x,children:"SAVE"})]})]}),n.jsx("div",{className:"partner-settings-message",children:"Customize the look of your partner pages. This updates settings for your entire company."}),n.jsxs("div",{className:"partner-settings-section",children:[n.jsxs("div",{className:"form-group",id:"partner-brand-colors-settings",children:[n.jsx("p",{children:"Brand Colors"}),m.primaryColor&&f.primaryColor&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:m.primaryColor}),n.jsxs("div",{className:"color-input",children:[n.jsx("div",{className:"color-preview",style:{backgroundColor:p.primaryColor}}),n.jsx(me,{type:"color",name:"primaryColor",id:"primaryColor","diagnostic-id":"primary-color"}),n.jsx("label",{children:"Primary brand color"})]}),m.textColor&&f.textColor&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:m.textColor}),n.jsxs("div",{className:"color-input",children:[n.jsx("div",{className:"color-preview",style:{backgroundColor:p.textColor}}),n.jsx(me,{type:"color",name:"textColor",id:"textColor","diagnostic-id":"text-color"}),n.jsx("label",{children:"Brand text color"})]})]}),n.jsxs("div",{className:"overlay-design-section",id:"partner-overlay-design-settings",children:[n.jsx("p",{children:"Select an overlay design for your page header:"}),n.jsx("div",{className:"overlay-design-selector",children:a&&Object.values(a).map(w=>n.jsxs("label",{"diagnostic-id":`${w.name}-label`,children:[n.jsx(me,{type:"radio",name:"overlayDesign",id:w.name,value:w.name,onClick:j,checked:p.overlayDesign===w.name,"diagnostic-id":w.name}),n.jsxs("div",{className:"overlay-option",children:[p.overlayDesign===w.name&&n.jsx("div",{className:"checkmark",children:n.jsx("i",{className:"material-icons",children:"done"})}),n.jsx("img",{className:"overlay-img",src:w.thumb_svg_url!==""?w.thumb_svg_url:void 0,alt:""})]})]},w.id))})]})]})]})]})}})})}const Z_e=e=>
72({userId:e.auth.user&&e.auth.user.id,partnerSettings:e.spotlight&&e.spotlight.partnerSettings,partnerDesigns:e.spotlight&&e.spotlight.partnerDesigns,partnerStub:e.auth&&e.auth.user&&e.auth.user.company.partner_stub}),J_e=le(Z_e,{updatePartnerSettings:lxe,getPartnerDesigns:E$,getPartnerSettings:N$})(zt(Q_e));function eCe(e){const{Insight:t,Solution:r}=on,{setModal:i,pageType:a}=e;let s="unknown";switch(a){case t:s="New Partner Insight";break;case r:s="New Partner Solution";break}return n.jsx("div",{className:"new-insights-btn-container","diagnostic-id":"new-insights-btn-container",children:n.jsxs("div",{id:"new-insights-btn",className:"new-insights-btn","diagnostic-id":"new-insights-card-btn",onClick:()=>i(!0),children:[s,n.jsx("i",{className:"material-icons",children:"add_circle"})]})})}const tCe=e=>({userId:e.auth.user&&e.auth.user.id}),Q$=le(tCe,{})(eCe),nCe=e=>{const{setModal:t,userId:r,modal:i,type:a,isEnabled:s,pageId:o,deletePartnerInsightSolution:l,publishStatus:c,deletePartnerContact:h}=e,{Published:u,Pending:d,NotPublished:p}=ki;let f;switch(a){case"solution":f=n.jsx("p",{children:`${s?"This solution page is currently published.":""} Are you sure you want to permanently delete this solution page? ${s?"This will delete the viewable solution page.":""}`});break;case"partner-insight":f=c===u||c===d?n.jsxs("p",{children:[`This partner insight is currently ${c===u?"published":c===d?"pending approval":""}. You are not able to
73            delete this partner insight. Please contact `,n.jsx("a",{href:"mailto:[email protected]",target:"_blank",rel:"noopener noreferrer",children:"[email protected]"})," ","for assistance."]}):n.jsx("p",{children:"Are you sure you want to permanently delete this partner insight?"});break;case"contacts":f=n.jsx("p",{children:"Are you sure you want to permanently delete this company contact?"});break}const m=y.useCallback(g=>$n(g,i,t),[i]);return y.useEffect(()=>(window.addEventListener("keyup",m),()=>{window.removeEventListener("keyup",m)}),[m]),n.jsx(ot,{setModal:t,children:n.jsxs("div",{className:"delete-modal-container",children:[n.jsx("h5",{children:"Please Confirm"}),f,n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:`btn-cancel${c===u?" published":""}`,"diagnostic-id":"modal-cancel-btn",onClick:()=>t(!1),children:a==="partner-insight"&&(c===u||c===d)?"CLOSE":"CANCEL"}),a==="contacts"&&n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",onClick:()=>h(o,r),children:"DELETE"}),(a==="solution"||a==="partner-insight"&&c===p)&&n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",onClick:()=>l(o,r,a),children:"DELETE"})]})]})})},rCe=e=>({userId:e.auth.user&&e.auth.user.id}),Z$=le(rCe,{deletePartnerInsightSolution:cxe,deletePartnerContact:Uxe})(nCe);function iCe(e){const{insight:t,userId:r}=e,[i,a]=y.useState(!1),{Pending:s,NotPublished:o,Published:l}=ki;let c="unknown";switch(t.publish_status){case s:c="Pending Review";break;case l:c="Published";break;case o:c="Not Published";break}return n.jsxs("div",{className:"col fadeTransition",children:[n.jsxs("div",{className:"partner-insight-card","diagnostic-id":"partner-insight-card",children:[n.jsxs("div",{className:"partner-insight-title-group",children:[n.jsx(Ze,{to:`partnerinsights/${t.id}`,"diagnostic-id":"partner-insight-link"}),n.jsxs("div",{className:"partner-insight-type-status-grp",children:[n.jsx("div",{className:"content-type","diagnostic-id":"content-type",children:`Partner Insight${" - "+t.partner_insight_type}`}),n.jsx("div",{className:`partner-insight-publish-status partner-insight-${t.publish_status}`,children:c})]}),n.jsx("div",{className:"content-title-container",children:n.jsx("h4",{className:"content-title-text","diagnostic-id":"insight-title-text",children:t.title})}),n.jsxs("div",{className:"card-datetime",children:[t.publish_datetime?t.update_datetime>t.publish_datetime?"Last edited ":"Published ":"Last edited ",n.jsx(gn,{local:!0,format:"MMM D, YYYY h:mma",children:t.publish_datetime?t.update_datetime>t.publish_datetime?t.update_datetime:t.publish_datetime:t.update_datetime})," ",new Date().toLocaleTimeString("en-us",{timeZoneName:"short"}).split(" ")[2]]})]}),n.jsx(Ke,{className:"partner-insight-delete-btn-tooltip",title:"Delete",placement:"top",children:n.jsx("div",{className:"delete-btn",onClick:h=>{h.stopPropagation(),h.preventDefault(),a(!0)},children:n.jsx(C0,{className:"delete-icon","diagnostic-id":"partner-insight-delete-btn"})})})]}),i&&n.jsx(Z$,{modal:i,setModal:a,type:t.type,publishStatus:t.publish_status,pageId:t.id})]})}const aCe=e=>({userId:e.auth.user&&e.auth.user.id}),sCe=le(aCe,{})(Jt(iCe)),oCe=e=>{const{modal:t,setModal:r,userId:i,title:a,tags:s,newPartnerInsight:o,edit:l,handleCancel:c,editPartnerInsightPageHeader:h,partnerInsightId:u}=e,d=oa(),p=y.useCallback(g=>$n(g,t||l,r||c),[t,l]);y.useEffect(()=>(window.addEventListener("keyup",p),()=>{window.removeEventListener("keyup",p)}),[p]);const f=(g,x,v)=>{o(i,v,g,x).then(b=>{d.push(`/partnerinsights/${b}`)})},m=g=>{g.preventDefault(),t?r(!1):l&&c()};
73return n.jsx(ot,{setModal:r||c,disableClickOutsideCancel:!0,children:n.jsxs("div",{className:"partner-insight-page-header-modal-container","diagnostic-id":"partner-insight-page-header-modal-container",children:[n.jsx("i",{className:"material-icons",onClick:m,children:"close"}),n.jsx(gt,{initialValues:{title:a||"",tags:s,insightsToolkitType:"Advisor"},onSubmit:(g,{setSubmitting:x})=>{const v=g.title.trim();t?f(v,g.tags,g.insightsToolkitType):l&&h(u,i,v,g.tags).then(()=>c(!0))},validationSchema:_t().shape({title:Ae().test("is-empty","Title cannot be empty",function(g){return!g||!g.split("").every(x=>x===" ")}).max(160)}),children:({values:g,touched:x,errors:v,dirty:b,isSubmitting:j,setFieldValue:w})=>(l&&b!==e.isDirty&&e.setDirty(b),n.jsxs(vt,{onClick:S=>S.stopPropagation(),children:[n.jsxs("div",{className:"form-group",children:[n.jsx("h5",{children:"Partner Insight Title"}),n.jsx("p",{children:"This is the advisor-facing title for your partner insight"}),n.jsx(me,{id:"title",name:"title","diagnostic-id":"partner-insight-page-title-input",placeholder:"Partner Insight",maxLength:160,className:v.title&&x.title?"text-input-error":"form-control"}),v.title&&x.title&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:v.title})]}),!l&&n.jsxs("div",{className:"form-group",children:[n.jsx("h5",{children:"Insights Toolkit Type"}),n.jsx("p",{children:"Select the audience you want to share the partner insights with"}),n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{as:"select",name:"insightsToolkitType",value:g.insightsToolkitType,onChange:S=>w("insightsToolkitType",S.target.value),"diagnostic-id":"insights-toolkit-type-dropdown",children:[n.jsx("option",{value:"Advisor",children:"Advisor"}),n.jsx("option",{value:"Community",children:"Community"})]}),n.jsx(dt,{icon:Mt})]})]}),n.jsxs("div",{className:"form-group",children:[n.jsx("h5",{children:"Tag"}),n.jsx("p",{children:"Add relevant keywords to help users discover your partner insight"}),n.jsx(me,{id:"tags",name:"tags","diagnostic-id":"partner-insight-page-tag-input",placeholder:"e.g. volatility, tech, interest rates...",maxLength:240,className:v.tags&&x.tags?"text-input-error":"form-control"}),v.tags&&x.tags&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:v.tags})]}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:m,children:"Cancel"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",disabled:l&&!b||!!Object.keys(v).length||j,children:"NEXT"})]})]}))})]})})},lCe=e=>({userId:e.auth.user&&e.auth.user.id}),J$=le(lCe,{newPartnerInsight:gxe,editPartnerInsightPageHeader:vxe})(oCe),QP={GRID:"grid"};function cCe(e){const{Insight:t}=on,{userId:r,getPartnerInsights:i,partnerInsights:a}=e,[s,o]=y.useState(e.view||QP.GRID),[l,c]=y.useState(!1),h=6;y.useEffect(()=>{i(r)},[]);const u=a,d=u&&Object.assign([],u),p=(m,g)=>m.update_datetime>g.update_datetime?-1:m.update_datetime<g.update_datetime?1:0;d?.sort(p);const f=u?d.map(m=>n.jsx(sCe,{insight:m},m.id)):[];return f.length===0&&f.push(n.jsx(Q$,{setModal:c,pageType:t},"new-insight")),n.jsxs("div",{id:"partner-insight-grid-wrapper","diagnostic-id":"partner-insight-grid-wrapper",children:[l&&n.jsx(J$,{modal:l,setModal:c}),n.jsxs("div",{className:"browser-header-btn-grp",children:[n.jsx("h4",{children:"Partner Insights"}),n.jsxs("button",{className:"btn-primary","diagnostic-id":"insight-new-modal-btn",onClick:()=>c(!0),children:[n.jsx("i",{className:"material-icons",children:"add"}),"New"]})]}),n.jsx(R0,{type:"paginated",numPerPage:h,elements:f,active:s===QP.GRID})]})}const dCe=e=>({userId:e.auth.user&&e.auth.user.id,partnerInsights:e.spotlight&&e.spotlight.partnerInsights&&e.spotlight.partnerInsights.pages}),uCe=le(dCe,{getPartnerInsights:k$})(cCe),hCe=e=>{const{modal:t,setModal:r,editModal:i,setEditModal:a,solutionPageSlug:s,title:o,category:l,tags:c,website:h,handleCancel:u,userId:d,getSolutionCategories:p,editSolutionPageHeader:f,categories:m,newPartnerSolution:g}=e,x=oa();y.useEffect(()=>{p(d)},[]);const v=(j,w,S,_)=>{g(d,S,j,w,_).then(C=>{x.push(`/solutions/${C}/?view=edit`)})},b=j=>{j.preventDefault(),t?r(!1):i&&u()};
73return n.jsx(ot,{setModal:r||u,disableClickOutsideCancel:!0,children:n.jsxs("div",{className:"solution-page-header-edit-modal-container","diagnostic-id":"solution-page-header-edit-modal-container",children:[n.jsx("i",{className:"material-icons",onClick:b,children:"close"}),t&&n.jsx("h5",{className:"create-solution-header",children:"Create a Solution"}),n.jsx(gt,{initialValues:{title:o||"",website:h||"",category:l,tags:c},onSubmit:(j,{setSubmitting:w})=>{const S=j.title.trim();t?v(S,j.website,j.category||m[0].category,j.tags):i&&f(s,d,S,j.website,j.category,j.tags).then(()=>u(!0))},validationSchema:_t().shape({title:Ae().test("is-empty","Title cannot be empty",function(j){return!j||!j.split("").every(w=>w===" ")}).max(50)}),children:({values:j,touched:w,errors:S,dirty:_,isSubmitting:C,setFieldValue:E})=>(i&&_!==e.isDirty&&e.setDirty(_),n.jsxs(vt,{onClick:P=>P.stopPropagation(),children:[n.jsxs("div",{className:"form-group",children:[n.jsx("h5",{children:"Solutions Name"}),n.jsx("p",{children:"This name will be displayed on the solution page and visible to all users"}),n.jsx(me,{id:"title",name:"title","diagnostic-id":"solution-page-title-input",placeholder:"Partner Solution",maxLength:50,className:S.title&&w.title?"text-input-error":"form-control"}),S.title&&w.title&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:S.title})]}),n.jsxs("div",{className:"form-group",children:[n.jsx("h5",{children:"Solution Website"}),n.jsx("p",{children:"Add a link to a website with additional information on this solution"}),n.jsx(me,{id:"website",name:"website","diagnostic-id":"solution-page-website-input",placeholder:"Enter a website here...",maxLength:240,className:S.website&&w.website?"text-input-error":"form-control"}),S.website&&w.website&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:S.website})]}),n.jsxs("div",{className:"form-group",children:[n.jsx("h5",{children:"Solution Category"}),n.jsx("p",{children:"Select a category"}),n.jsxs("div",{className:"dropdown-container",children:[n.jsx(me,{as:"select",name:"category",value:j.category,onChange:P=>E("category",P.target.value),"diagnostic-id":"solutions-category-dropdown",children:m?.map((P,T)=>n.jsx("option",{value:P.category,children:P.category},T))}),n.jsx(dt,{icon:Mt})]})]}),n.jsxs("div",{className:"form-group",children:[n.jsx("h5",{children:"Solutions Tag"}),n.jsx("p",{children:"Add relevant keywords to help users discover your solution"}),n.jsx(me,{id:"tags",name:"tags","diagnostic-id":"solution-page-tag-input",placeholder:"e.g. volatility, tech, interest rates...",maxLength:80,className:S.tags&&w.tags?"text-input-error":"form-control"}),S.tags&&w.tags&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:S.tags})]}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:b,children:"Cancel"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",disabled:i&&!_||!!Object.keys(S).length||C,children:"Save"})]})]}))})]})})},pCe=e=>({userId:e.auth.user&&e.auth.user.id,categories:e.spotlight&&e.spotlight.solutions&&e.spotlight.solutions.categories}),eL=le(pCe,{getSolutionCategories:$xe,editSolutionPageHeader:kxe,newPartnerSolution:dxe})(hCe);function fCe(e){const{solution:t}=e,[r,i]=y.useState(!1);return n.jsxs("div",{className:"col fadeTransition",children:[n.jsxs("div",{className:"partner-solution-card","diagnostic-id":"partner-solution-card",children:[n.jsxs("div",{className:"solution-card-content",children:[n.jsxs("div",{className:"solution-
73header-container",children:[n.jsx("div",{className:"solution-category",children:t.category}),t.is_enabled&&n.jsx("div",{className:"solution-published-status",children:"Published"})]}),n.jsx("h6",{className:"solution-title truncate","diagnostic-id":"solution-text-title",children:t.title})]}),n.jsxs("div",{className:"solution-caption-container",children:[n.jsx("div",{className:"solution-card-description",children:t?.description&&ds(t?.description,120)}),n.jsx("div",{className:"card-caption",children:n.jsxs("div",{className:"card-datetime",children:[t.publish_datetime&&t.publish_datetime>t.update_datetime?"Published ":"Edited ",n.jsx(gn,{local:!0,format:"MMM D, YYYY h:mma",children:t.publish_datetime&&t.publish_datetime>t.update_datetime?t.publish_datetime:t.update_datetime})," ",new Date().toLocaleTimeString("en-us",{timeZoneName:"short"}).split(" ")[2]]})})]}),n.jsxs("div",{className:"card-btn-grp",children:[n.jsxs(Ze,{to:{pathname:`/solutions/${t.page_slug}`,search:"?view=edit"},className:"card-btn","diagnostic-id":"solution-open-btn",children:[n.jsx("i",{className:"material-icons",children:"mode_edit"}),n.jsx("span",{children:" Open"})]}),n.jsxs("button",{className:"card-btn-delete","diagnostic-id":"solution-delete-btn",onClick:()=>i(!0),children:[n.jsx("i",{className:"material-icons",children:"delete_forever"}),n.jsx("span",{children:"Delete"})]})]})]}),r&&n.jsx(Z$,{modal:r,setModal:i,type:t.type,isEnabled:t.is_enabled,pageId:t.page_slug})]})}const mCe=e=>({userId:e.auth.user&&e.auth.user.id}),gCe=le(mCe,{})(fCe),ZP={GRID:"grid"};function vCe(e){const{Solution:t}=on,{userId:r,getPartnerSolutions:i,partnerSolutions:a}=e,[s,o]=y.useState(e.view||ZP.GRID),[l,c]=y.useState(""),[h,u]=y.useState(!1),d=6;y.useEffect(()=>{i(r)},[]);const p=a&&l?a.filter(v=>Mn(v.title.toLowerCase(),l.toLowerCase())||v.category&&Mn(v.category.toLowerCase(),l.toLowerCase())):a,f=p&&Object.assign([],p),m=(v,b)=>v.update_datetime>b.update_datetime?-1:v.update_datetime<b.update_datetime?1:0;f?.sort(m);const g=l&&p&&p.length===0,x=p?f.map(v=>n.jsx(gCe,{solution:v},v.page_slug)):[];return x.length===0&&x.push(n.jsx(Q$,{setModal:u,pageType:t},"new-solution")),n.jsxs("div",{id:"solution-grid-wrapper","diagnostic-id":"solution-grid-wrapper",children:[h&&n.jsx(eL,{modal:h,setModal:u}),n.jsxs("div",{className:"browser-header-btn-grp",children:[n.jsx("h4",{children:"Partner Solutions"}),n.jsxs("button",{className:"btn-primary","diagnostic-id":"solution-new-modal-btn",onClick:()=>u(!0),children:[n.jsx("i",{className:"material-icons",children:"add"}),"New"]})]}),a?.length>0&&n.jsx(K$,{changeSearch:c,numResults:p&&p.length,search:l}),g?n.jsxs("div",{id:"insights-browser-search-placeholder",className:"fadeTransition",children:[n.jsx("i",{className:"material-icons",children:"search_off"}),n.jsxs("div",{children:['No results for "',l,'"']}),n.jsx("button",{className:"btn-cancel",onClick:()=>c(""),children:"Clear Search"})]}):n.jsx(R0,{type:"paginated",numPerPage:d,breakpoints:wge,elements:x,active:s===ZP.GRID,changeSearch:c})]})}const bCe=e=>({partnerSolutions:e.spotlight&&e.spotlight.solutions.pages,userId:e.auth.user&&e.auth.user.id}),yCe=le(bCe,{getPartnerSolutions:T$})(vCe),xCe=({dirty:e,isDirty:t,setDirty:r})=>(y.useEffect(()=>{e!==t&&r&&r(e)},[e]),null);function jCe(e){const{isDirty:t,setDirty:r,partnerPage:i,pageChoice:a,user:s,submitCallToActionForm:o,pageType:l}=e,{contact_form_title:c,contact_user:h,contact_form_type:u,company_name:d}=i,{Spotlight:p}=on,f={fullName:`${s.first_name||""} ${s.last_name||""}`.trim(),email:s.email||"",phoneNumber:"",companyName:s.company.name||"",message:"I'd like to learn more...",disclosureAccepted:!1},m=_t().shape({fullName:Ae().required("Please enter your full name"),email:Ae().email("Please enter a valid email address").required("Please enter an email address"),phoneNumber:Ae().required("Please enter a phone number"),companyName:Ae().required("Please enter a company name"),message:Ae().max(5e3,"Your message is too long. Please shorten it or contact us for assistance.").required("Please enter a message"),disclosureAccepted:cr().required("The disclosure must be accepted.").oneOf([!0],"The disclosure must be accepted.")}),g=a!==""&&(a==="preview"||a===p);return n.jsxs("div",{className:"spotlight-cta-form",children:[u==="email"?n.jsx("h4",{className:"cta-title",children:c}):n.jsxs("div",{className:"spotlight-cta-header-grp",children:[n.jsx("h4",{className:"cta-title",children:c}),n.jsx("div",{className:"contact-card-image",children:h?.profile_picture_url?n.jsx("img",{src:h?.profile_picture_url,alt:""}):n.jsx("div",{className:"contact-card-image-placeholder"})}),n.jsx("div",{className:"contact-card-caption",children:n.jsxs("div",{className:"advisor-info",children:[n.jsxs("h6",{className:"advisor-name-credentials",children:[h?.first_name+" "+h?.last_name,h?.contact_credentials&&", "+h?.contact_credentials]}),h?.contact_title&&n.jsx("div",{className:"advisor-type",children:h.contact_title})]})})]}),n.jsx(gt,{initialValues:f,onSubmit:(x,{setSubmitting:v,resetForm:b})=>{o(s.id,l,i.page_slug,x.fullName,x.email,x.companyName,x.phoneNumber,x.message).then(()=>{v(!1),b()})},enableReinitialize:!0,validationSchema:m,children:({values:x,setFieldValue:v,touched:b,errors:j,dirty:w,isSubmitting:S})=>n.jsxs(n.Fragment,{children:[n.jsx(xCe,{dirty:w,isDirty:t,setDirty:r}),n.jsx(vt,{children:n.jsxs("div",{className:"cta-form-fields-wrapper",children:[n.jsx("div",{className:"col s12 m12 l6",children:n.jsxs("div",{className:"form-group",children:[n.jsxs("div",{children:[n.jsx("label",{children:"Full Name*"}),n.jsx(me,{type:"text",name:"fullName",id:"fullName","diagnostic-id":"full-name-text-input",maxLength:240,placeholder:"Full name",disabled:g}),j.fullName&&b.fullName&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:j.fullName})]}),n.jsxs("div",{children:[n.jsx("label",{children:"Email Address*"}),n.jsx(me,{type:"text",name:"email",id:"email","diagnostic-id":"email-input",maxLength:240,placeholder:"Email address",disabled:g}),j.email&&b.email&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:j.email})]}),n.jsxs("div",{children:[n.jsx("label",{children:"Phone Number*"}),n.jsx(me,{type:"text",name:"phoneNumber",id:"phoneNumber","diagnostic-id":"phone-number-input",maxLength:30,placeholder:"Phone number",disabled:g}),j.phoneNumber&&b.phoneNumber&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:j.phoneNumber})]}),n.jsxs("div",{children:[n.jsx("label",{children:"Company*"}),n.jsx(me,{type:"text",name:"companyName",id:"companyName","diagnostic-id":"company-name-input",maxLength:240,placeholder:"Company",disabled:g}),j.companyName&&b.companyName&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:j.companyName})]})]})}),n.jsx("div",{className:"col s12 m12 l6",children:n.jsx("div",{className:"form-group",children:n.jsxs("div",{children:[n.jsx("label",{children:"Message*"}
73),n.jsx(me,{component:"textarea",name:"message",id:"message","diagnostic-id":"message-input",maxLength:5e3,placeholder:"How can we help?",disabled:g}),j.message&&b.message&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:j.message})]})})})]})}),n.jsxs("div",{className:"cta-form-btn",children:[n.jsx("div",{className:"accept-disclosure-checkbox",children:n.jsxs("label",{children:[n.jsx(me,{type:"checkbox",name:"disclosureAccepted",id:"disclosureAccepted",className:"filled-in",onChange:_=>{const C=_.target.checked;v("disclosureAccepted",C)},"diagnostic-id":"disclosure-accepted-input",disabled:g}),n.jsxs("span",{"diagnostic-id":"disclosure-accepted-toggle",children:["I understand that clicking submit will send my contact information to ",d]})]})}),n.jsx("button",{type:"submit",className:"btn btn-primary-lg","diagnostic-id":"cta-submit-btn",disabled:!w||!!Object.keys(j).length||S,children:"SUBMIT"})]})]})})]})}const wCe=e=>({userId:e.auth.user.id,user:e.auth&&e.auth.user,pageType:e.spotlight&&e.spotlight.pageType}),SCe=le(wCe,{submitCallToActionForm:Vxe})(zt(jCe));function _Ce(e){const{officeContacts:t,disclosures:r,textColor:i}=e;return n.jsxs(n.Fragment,{children:[t.length>0&&n.jsx("div",{className:"office-contacts-grp",children:t.map((a,s)=>n.jsxs("div",{className:"company-locations-card",children:[n.jsx("h6",{className:"company-region-name",style:{color:i},children:a.name}),n.jsxs("div",{className:"company-address-group",children:[n.jsx("div",{className:"main-address-info",children:a.address_line1}),n.jsx("div",{className:"secondary-address-info",children:a.address_line2}),n.jsxs("div",{className:"geography-location",children:[a.address_city&&`${a.address_city}, `,a.address_state+" "+a.address_zipcode]}),n.jsx("div",{className:"country-name",children:a.address_country})]}),n.jsxs("div",{className:"company-contact-info-group",children:[n.jsx("div",{className:"phone-number",children:a.phone_number}),n.jsx("div",{className:"email-address",children:a.email})]})]},s))}),n.jsx("div",{className:"disclosures-grp",children:n.jsx("div",{className:"disclosures-content",children:r&&r})})]})}function O0(e){const{editorItem:t,isOnWorkspace:r}=e;return n.jsx(n.Fragment,{children:n.jsxs("div",{className:"contact-card-container",children:[n.jsx("div",{className:"contact-card-image",children:t.profile_picture_url?n.jsx("img",{src:t.profile_picture_url,alt:""}):n.jsx("div",{className:"contact-card-image-placeholder"})}),n.jsx("div",{className:"contact-card-caption",children:n.jsxs("div",{className:"advisor-info",children:[n.jsxs("div",{className:"advisor-name-credentials",children:[ds(t.first_name+" "+t.last_name,25),t.contact_credentials&&", "+ds(t.contact_credentials,10)]}),t.email&&!r&&n.jsx("div",{className:"advisor-email",children:t.email}),t.contact_title&&n.jsx("div",{className:"advisor-type",children:r?n.jsx(n.Fragment,{children:t.contact_title}):n.jsx(n.Fragment,{children:ds(t.contact_title,25)})}),t.years_experience&&n.jsxs("div",{className:"advisor-years-experience",children:[t.years_experience," years of experience"]})]})})]})})}function tL(e){const{Spotlight:t}=on,{pageChoice:r}=e;return r==="preview"||r===""||r===t?n.jsx("div",{className:"section-divider",children:n.jsx("hr",{})}):n.jsxs("div",{className:"divider-section-container","diagnostic-id":"divider-section",children:[n.jsx("div",{className:"divider-section-scrim"}),n.jsx("div",{className:"divider-section-line"}),n.jsx("div",{className:"divider-section-text","diagnostic-id":"divider-section-text",children:n.jsx("span",{children:"DIVIDER"})})]})}function nL(e){const{section:t,handleClick:r}=e;return n.jsxs(n.Fragment,{children:[t.title&&n.jsx("div",{className:"section-title",children:n.jsx("h4",{children:t.title})}),n.jsx("div",{className:"document-links-container",children:t.documents?.map((i,a)=>n.jsxs("div",{className:"document-link-grp",onClick:s=>r(s,i.pdf_url||i.external_document_url),children:[n.jsx("span",{className:"material-symbols-outlined",children:i.pdf_url?"file_save":i.external_document_url?"attachment":""}),n.jsx("div",{className:"document-label",children:i.label})]},a))})]})}function rL(e){const{section:t,pageChoice:r}=e,{Spotlight:i}=on,a=t.highlights?.map((s,o)=>n.jsxs("div",{className:"highlight-card",children:[n.jsx("h6",{className:"highlight-label",children:s.label}
73),(r==="preview"||r===""||r===i)&&n.jsx("div",{className:"highlight-label-underline",children:n.jsx("hr",{})}),n.jsx("div",{className:"highlight-description",children:s.description})]},o));return n.jsxs(n.Fragment,{children:[t.title&&n.jsx("div",{className:`section-title ${t.type}`,children:n.jsx("h4",{children:t.title})}),r==="preview"||r===""||r===i?n.jsx("div",{className:"highlight-info",children:a}):a]})}function iL(e){const{imageUrl:t}=e;return n.jsxs("div",{className:"section-content-img","diagnostic-id":"section-content-img",children:[n.jsx("div",{className:"section-img-placeholder"}),n.jsx("div",{className:"content-img-group",children:n.jsx("img",{src:t,alt:""})})]})}function CCe(e){const{section:t,pageChoice:r,setPageChoice:i,partnerPage:a}=e,{InsightsGallery:s,SolutionsGallery:o,TextSection:l,Divider:c,Image:h,Highlights:u,TeamProfile:d,Documents:p}=Bn;let f=null;switch(t.type){case s:f=t.insights_gallery;break;case o:f=t.solutions_gallery;break;case u:f=t.highlights;break;case d:f=t.team_profiles;break;case p:f=t.documents;break}const m=t.team_profiles&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`section-title ${t.type}`,children:n.jsx("h4",{children:t.title})}),n.jsx("div",{className:"preview-team-profiles-group",children:t.team_profiles.map((v,b)=>n.jsx(O0,{editorItem:v,isOnWorkspace:!0},b))})]}),g=(v,b)=>{v.preventDefault(),window.open(b,"_blank","noreferrer")};let x;switch(t.type){case l:x=n.jsx("div",{className:"section-content-text","diagnostic-id":"section-content-text",dangerouslySetInnerHTML:{__html:ti(t.text)}});break;case s:case o:x=n.jsx(Wa,{cards:f,sectionType:t.type,sectionTitle:t.title,setPageChoice:i,isOnWorkspace:!1,partnerPage:a});break;case c:x=n.jsx(tL,{pageChoice:r});break;case h:x=n.jsx(iL,{imageUrl:t.image_url});break;case u:x=n.jsx("div",{className:"preview-highlight-group",children:n.jsx(rL,{section:t,pageChoice:r})});break;case d:x=m;break;case p:x=n.jsx(nL,{section:t,handleClick:g});break}return n.jsx("div",{className:"spotlight-preview-section-wrapper",children:n.jsx("div",{className:"spotlight-preview-section",children:x})})}function NCe(e){const{sections:t,pageChoice:r,setPageChoice:i,partnerPage:a}=e;return n.jsx("div",{className:"spotlight-preview-sections-container",children:t.map((s,o)=>n.jsx(CCe,{section:s,pageChoice:r,setPageChoice:i,partnerPage:a},o))})}function ECe(e){const{setPageChoice:t,partnerPage:r,pageChoice:i,pageType:a}=e,{Spotlight:s,Solution:o}=on,l=r?.banner?.banner_image_url,c=r?.banner?.overlay_design?.thumb_svg_url,h=r?.banner?.overlay_design?.primary_color,u=r?.banner?.overlay_design?.text_color;if(!r)return null;const{company_logo_url:d,company_name:p,description:f,sections:m,office_contacts:g,disclosures:x,category:v,title:b,website:j}=r,w=n.jsxs(n.Fragment,{children:[i&&i!==s?n.jsxs("div",{className:"back-link-wrapper spotlight",children:[n.jsxs(Ze,{to:`/${a}/${r.page_slug}`,className:"back-link","diagnostic-id":"spotlight-back-btn",onClick:()=>t("edit"),children:[n.jsx(ir,{}),n.jsx("span",{children:"Back to Edit"})]}),n.jsxs("div",{className:"print-to-pdf",onClick:()=>window.print(),"diagnostic-id":"print-to-pdf",children:[n.jsx("i",{className:"material-icons-outlined",children:"print"}),"PRINT TO PDF"]})]}):i!==s?n.jsx("div",{className:"back-link-wrapper spotlight",children:n.jsxs(Ze,{to:{pathname:"/insights",search:"?view=explorer"},className:"back-link","diagnostic-id":"spotlight-back-btn",children:[n.jsx(ir,{}),n.jsx("span",{children:"Back to Insights Explorer"})]})}):n.jsx(n.Fragment,{}),n.jsxs("div",{className:`spotlight-preview-wrapper ${a}`,children:[n.jsxs("div",{className:"spotlight-banner-overlay-logo-container",children:[n.jsx("div",{className:"logo-img-grp",children:a===o?n.jsx(Ze,{to:`/${s}/${r.partner_stub}`,"diagnostic-id":"partner-spotlight-redirect",onClick:()=>t(""),children:n.jsx("img",{className:"logo-img",src:d,alt:""})}):n.jsx("img",{className:"logo-img",src:d,alt:""})}),a===s?n.jsx("div",{className:"banner-img-grp",children:l?n.jsx("img",{className:"banner-img",src:l,alt:""}):c&&c!==""?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"spotlight-page-header-wrapper",style:{backgroundColor:h,color:u}}),n.jsx("img",{src:c,alt:"overlay design",className:"overlay-design"})]}):n.jsx(n.Fragment,{})}):a===o?c&&c!==""?n.jsxs("div",{className:"banner-img-grp",children:[n.jsx("img",{src:c,alt:"overlay design",className:"overlay-design"}),n.jsx("div",{className:"solution-page-header-wrapper",style:{backgroundColor:h,color:u},children:n.jsxs("div",{className:"solution-page-header-grp",children:[n.jsx("div",{className:"solution-page-category",children:v}),n.jsx("div",{className:"solution-page-title-name",children:b}),j&&n.jsxs("div",{className:"advisor-company-link",onClick:S=>Ip(S,j),children:[n.jsx("i",{className:"material-icons",children:"open_in_new"}),"Learn more from ",p]})]})})]}):n.jsx("div",{className:"banner-img-grp",children:n.jsx("div",{className:"solution-page-header-wrapper",style:{backgroundColor:h,color:u},children:n.jsxs("div",{className:"solution-page-header-grp",children:[n.jsx("div",{className:"solution-page-category",children:v}),n.jsx("div",{className:"solution-page-title-name",children:b}),j&&n.jsxs("div",{className:"advisor-company-link",onClick:S=>Ip(S,j),children:[n.jsx("i",{className:"material-icons",children:"open_in_new"}),"Learn more from ",p]})]})})}):n.jsx(n.Fragment,{})]}),n.jsxs("div",{className:"spotlight-preview-content-container",children:[n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsxs("div",{className:"spotlight-preview-header",children:[a===s&&n.jsxs("div",{className:"spotlight-title-grp",children:[n.jsx("div",{className:"spotlight-page-type",children:"Partner Spotlight"}),n.jsx("div",{id:"spotlight-title-name",children:p}),j&&n.jsx("div",{className:"advisor-company-link",children:n.jsx("a",{href:j,target:"_blank",rel:"noopener noreferrer",children:j})})]}),f&&n.jsx("div",{className:"spotlight-description-grp",children:n.jsx("div",{className:"spotlight-page-description",dangerouslySetInnerHTML:{__html:ti(f)}})})]})})}),n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(NCe,{sections:m,pageChoice:i,setPageChoice:t,partnerPage:r})})}),n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(SCe,{pageChoice:i,partnerPage:r})})})]}),n.jsx("div",{className:"spotlight-page-footer-container",style:{backgroundColor:h,color:u},children:n.jsx(_Ce,{officeContacts:g,disclosures:x,textColor:u})})]})]});return n.jsx(n.Fragment,{children:w})}const TCe=e=>({userId:e.auth.user&&e.auth.user.id,spotlight:e.spotlight}),A0=le(TCe,{setScrim:hn,getPartnerSpotlightPage:I$})(ECe);function kCe(e){const{userId:t,publishedSpotlightPage:r,modalStatus:i,partner
73Stub:a}=e;return y.useEffect(()=>{if(!i){const s=document.body.style.top;document.body.style.position="",document.body.style.top="",document.body.style.width="";const o=document.querySelector(".nav-wrapper");o.style.paddingRight="",o.style.paddingLeft="",window.scrollTo(0,parseInt(s||"0")*-1)}},[i]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"spotlight-browser-header-container",children:[n.jsx(Ze,{to:{pathname:`/spotlight/${a}`,search:"?view=edit"},className:"btn-primary","diagnostic-id":"edit-spotlight-page-btn",children:"Edit Spotlight Page"}),r&&n.jsxs("div",{className:"card-datetime",children:[r?.publish_datetime&&r?.publish_datetime>r?.update_datetime?"Published ":"Last updated ",n.jsx(gn,{local:!0,format:"MMM D, YYYY h:mma",children:r?.publish_datetime&&r?.publish_datetime>r?.update_datetime?r?.publish_datetime:r?.update_datetime})," ",new Date().toLocaleTimeString("en-us",{timeZoneName:"short"}).split(" ")[2]]})]}),r&&Object.keys(r).length===0?n.jsx("div",{className:"empty-spotlight-wrapper fadeTransition",children:n.jsxs("div",{id:"empty-content-placeholder",children:[n.jsx("i",{className:"material-symbols-outlined",children:"add_notes"}),n.jsx("div",{children:"There is currently no published Spotlight page."}),n.jsx("div",{children:"Edit your Spotlight to get started."}),n.jsx(Ze,{to:{pathname:`/spotlight/${a}`,search:"?view=edit"},className:"spotlight-edit-redirect",children:"EDIT SPOTLIGHT"})]})}):r?n.jsx(A0,{partnerPage:r,pageType:r?.type,pageChoice:"spotlight"}):n.jsx("div",{className:"empty-spotlight-wrapper error-placeholder",children:n.jsxs("div",{id:"empty-content-placeholder",children:[n.jsx("i",{className:"material-symbols-outlined",children:"error"}),n.jsx("div",{children:"Unable to display this page."}),n.jsx("div",{children:"Contact us for assistance."}),n.jsx("div",{className:"contact-us",children:n.jsx("button",{className:"btn-primary",onClick:()=>window.Intercom("show"),children:"Contact Us"})})]})})]})}const PCe=e=>({userId:e.auth.user&&e.auth.user.id,publishedSpotlightPage:e.spotlight&&e.spotlight.publishedSpotlightPage,modalStatus:e.preferences&&e.preferences.modalStatus,partnerStub:e.auth&&e.auth.user&&e.auth.user.company.partner_stub}),ICe=le(PCe,{})(kCe);function DCe({setScrim:e,tabSelected:t,setPageType:r}){const[i,a]=y.useState(""),[s,o]=y.useState(!1),l=h=>{s?window.confirm(ko)&&(a(h),o(!1)):a(h)};y.useEffect(()=>{e(!1)},[]),y.useEffect(()=>{r(i)},[i]);const c={spotlight:n.jsx(ICe,{}),partnerinsights:n.jsx(uCe,{}),solutions:n.jsx(yCe,{}),partnersettings:n.jsx(J_e,{}),partnercontacts:n.jsx(K_e,{})};return n.jsxs("div",{className:"row fadeTransition",id:"partner-insights-wrapper",children:[n.jsx("div",{className:"navigation-drawer",id:"partner-insights-drawer",children:n.jsx(x0,{setMenuChoice:l,menuChoice:i,tabSelected:t})}),n.jsx(da,{}),n.jsx("div",{className:"navigation-body",id:`${i}-body`,children:c[i]})]})}const RCe=e=>({}),OCe=le(RCe,{setScrim:hn,setPageType:Pu})(DCe),Hr={explorer:"explorer",spotlight:"spotlight",chartbooks:"chartbooks",composer:"composer",studio:"studio",engage:"engage"},ACe={all:"all",chartbook:"chartbook",commentary:"commentary",insightsvideo:"insightsvideo",insightspodcast:"insightspodcast"},MCe={q:"q"};class $Ce extends y.Component{constructor(){super(...arguments),this.state={menuChoice:this.props.canUseInsightsExplorer?"explorer":this.props.partnerPermissions.allow_partner&&this.props.canUsePartner?"spotlight":"chartbooks",display:"block",isDirty:!1,modal:!1},this.getMenuChoice=t=>{this.state.isDirty?window.confirm(ko)&&this.setState({menuChoice:t,display:"none",isDirty:!1}):this.setState({menuChoice:t,display:"none"})},this.setDirty=t=>{this.setState({isDirty:t})},this.clearNewChartbookId=()=>{this.props.newChartbookId&&this.props.clearNewChartbookId()}}componentDidMount(){const{allow_engage:t}=this.props.engagePermissions,{Disabled:r}=_n,i=Ni.parse(this.props.location.search),a=["sharedcontent","engageinsightspage","engagesettings"],s=["spotlight","partnerinsights","solutions","partnersettings"],o=i.view&&(Object.keys(Hr).includes(i.view)||a.includes(i.view)||s.includes(i.view)),l=o&&a.includes(i.view),c=o&&s.includes(i.view);i.view&&!o&&this.props.history.push("/insights"),o&&(i.view===Hr.spotlight||c?this.props.partnerPermissions.allow_partner&&this.props.canUsePartner?this.setState({menuChoice:Hr.spotlight}):this.setState({menuChoice:""}):i.view===Hr.engage||l?(this.props.canUseEngage||t!==r)&&this.setState({menuChoice:Hr.engage}):i.view===Hr.explorer?this.props.canUseInsightsExplorer&&this.setState({menuChoice:Hr.explorer}):i.view===Hr.studio?this.props.canUseStudio?this.setState({menuChoice:Hr.studio}):this.setState({menuChoice:""}):this.setState({menuChoice:i.view})),window.addEventListener("beforeunload",this.clearNewChartbookId)}componentWillUnmount(){this.clearNewChartbookId(),window.removeEventListener("beforeunload",this.clearNewChartbookId)}componentDidUpdate(t,r){const i=Ni.parse(this.props.location.search),a=i.view&&Object.keys(Hr).includes(i.view),s=i.filter&&Object.keys(ACe).includes(i.filter),o=i.c&&Object.keys(MCe).includes(i.c)&&i.id;this.state.menuChoice!==r.menuChoice?(this.setState({display:"block"}),this.props.history.push(`/insights${this.state.menuChoice?`?view=${this.state.menuChoice}${this.state.menuChoice===Hr.explorer?s?`&filter=${i.filter}`:o?`&c=${i.c}&id=${i.id}`:"":""}`:this.props.canUseInsightsExplorer?"?view=explorer":"?view=chartbooks"}`)):a&&i.view!==this.state.menuChoice&&this.setState({menuChoice:i.view})}render(){const{user:t,engagePermissions:r,studioPermissions:i,partnerPermissions:a,canUsePartner:s}=this.props,{allow_composer:o}=t.company.composer_permissions,{allow_engage:l}=r,{allow_studio:c}=i,{allow_partner:h}=a,{Disabled:u,Locked:d}=_n,f=[{path:Hr.spotlight,label:"Partner Insights",showTab:h&&s,icon:n.jsx(Oje,{}),component:n.jsx(OCe,{tabSelected:this.state.menuChoice}),diagId:"partner-insights-tab",id:"partner-insights-tab"},{path:Hr.explorer,label:"Insights Explorer",showTab:this.props.canUseInsightsExplorer,icon:n.jsx(Gx,{}),component:n.jsx(R_e,{}),diagId:"insights-explorer-tab",id:"insights-explorer-tab"},{path:Hr.chartbooks,label:"Chartbooks",showTab:!0,icon:n.jsx(rf,{}),component:n.jsx(k0,{tabSelected:this.state.menuChoice,getMenuChoice:this.getMenuChoice}),diagId:"chartbook-tab",id:"chartbook-tab"},{path:Hr.composer,label:"Composer",showTab:o!==u&&t.can_use_composer,icon:n.jsx(y0,{}),component:n.jsx(T0,{tabSelected:this.state.menuChoice,getMenuChoice:this.getMenuChoice}),diagId:"composer-tab",isCustomTab:o===d,customTab:Fy,id:"composer-tab"},{path:Hr.studio,label:"Studio",showTab:c!==u&&t.can_use_studio,icon:n.jsx($$,{}),component:n.jsx(El,{getMenuChoice:this.getMenuChoice}),diagId:"studio-tab",isCustomTab:c===d,customTab:Fy,id:"studio-tab"},{path:Hr.engage,label:"Engage",showTab:l!==u&&t.can_use_engage,icon:n.jsx(Fje,{}),component:n.jsx(w0e,{tabSelected:this.state.menuChoice}),diagId:"engage-tab",isCustomTab:l===d,customTab:Fy,id:"engage-tab"}].filter(v=>v?v.showTab:null),g=(f[f.findIndex(v=>v.path===this.state.menuChoice)]||f[0]).component,x=this.props.relationshipManager?this.props.relationshipManager:this.props.defaultRelationshipManager?this.props.defaultRelationshipManager:null;return n.jsxs("div",{className:`container ${this.state.menuChoice}`,children:[n.jsx("div",{className:"row",children:n.jsx(Zf,{handleChoice:this.getMenuChoice,value:this.state.menuChoice,choices:f})}),n.jsx("div",{className:"row fadeTransition",style:{display:this.state.display},children:g}),this.props.isProvidedBy&&n.jsx("div",{className:"access-provided-by-side-bar-container",children:n.jsxs("div",{className:"side-bar-wrapper",children:[n.jsx("div",{className:"access-provided-by-header",children:"In Partnership with"}),this.props.providedByLogoUrl&&n.jsx("div",{className:"provider-logo-container",children:n.jsx("img",{src:this.props.providedByLogoUrl,alt:"","diagnostic-id":"provider-logo",className:"provider-logo"})}),n.jsx("div",{className:"provider-name",children:this.props.providedByName}),x&&n.jsxs("div",{id:"provider-relationship-info",children:[n.jsx("div",{className:"relationship-header",children:"Your Relationship Manager"}),n.jsxs("div",{id:"partner-info",children:[n.jsx("span",{className:"material-icons",children:"person"}),x.first_name+" "+x.last_name]}),x.phone_number&&n.jsxs("div",{id:"partner-info",children:[n.jsx("span",{className:"material-icons",children:"phone"}),x.phone_number]}),x.email&&n.jsxs("div",{id:"partner-info",children:[n.jsx("span",{className:"material-icons",children:"mail"}),x.email]})]}),n.jsx("div",{className:"contact-btn-container",children:n.jsx("button",{className:"contact-btn","diagnostic-id":"access-provider-btn",onClick:()=>this.setState({modal:!0}),children:"Contact"})})]})}),this.state.modal&&n.jsx(yA,{setModal:v=>this.setState({modal:v}),modal:this.state.modal})]})}}const LCe=e=>{const t=e.auth.user.chartbook_theme,r=e.auth.user.company.chartbook_theme;return{newChartbookId:e.chartbooks.newChartbookId,user:e.auth.user,currentLayout:t.cover_layout?t.cover_layout:r.cover_layout,currentDesign:t.cover_design?t.cover_design:r.cover_design,lastLocation:e.auth.lastLocation,engagePermissions:e.auth.user&&e.auth.user.company&&e.auth.user.company.engage_permissions,studioPermissions:e.auth.user&&e.auth.user.company&&e.auth.user.company.studio_permissions,partnerPermissions:e.auth.user&&e.auth.user.company&&e.auth.user.company.partner_permissions,canUseStudio:e.auth.user&&e.auth.user.can_use_studio,canUseEngage:e.auth.user&&e.auth.user.can_use_engage,canUsePartner:e.auth.user&&e.auth.user.can_use_partner,canUseInsightsExplorer:e.auth&&e.auth.user&&e.auth.user.can_use_insights_explorer,providedByLogoUrl:e.auth.user&&e.auth.user.company&&e.auth.user.company.provider_organization&&e.auth.user.company.provider_organization.provided_by_logo_url,providedByName:e.auth.user&&e.auth.user.company&&e.auth.user.company.provider_organization&&e.auth.user.company.provider_organization.provided_by_name,relationshipManager:e.auth.user&&e.auth.user.company&&e.auth.user.company.relationship_manager,isProvidedBy:e.auth.user&&e.auth.user.company&&e.auth.user.company.provider_organization&&e.auth.user.company.provider_organization.has_provider,defaultRelationshipManager:e.auth.user&&e.auth.user.company&&e.auth.user.company.provider_organization&&e.auth.user.company.provider_organization.relationship_manager}},FCe=Jt(le(LCe,{clearNewChartbookId:_M})($Ce));class Fy extends y.Component{render(){const{className:t,tabIndex:r,role:i,onClick:a,children:s}=this.props,o=this.props["diagnostic-id"];return n.jsxs("button",{className:t,tabIndex:r,type:"button",role:i,onClick:a,"diagnostic-id":o,"aria-selected":this.props["aria-selected"],children:[s,n.jsx("i",{className:"material-icons","diagnostic-id":"material-lock-icon",children:"lock"})]})}}var od={},JP;function UCe(){if(JP)return od;JP=1;var e=vn(),t=bn();Object.defineProperty(od,"__esModule",{value:!0}),od.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4
73V8h16v13z"}),"CalendarToday");return od.default=a,od}var BCe=UCe();const qCe=Zt(BCe);var ld={},eI;function VCe(){if(eI)return ld;eI=1;var e=vn(),t=bn();Object.defineProperty(ld,"__esModule",{value:!0}),ld.default=void 0;var r=t(Rt()),i=e(yn()),a=(0,i.default)(r.createElement("path",{d:"M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9H9V9h10v2zm-4 4H9v-2h6v2zm4-8H9V5h10v2z"}),"LibraryBooks");return ld.default=a,ld}var zCe=VCe();const HCe=Zt(zCe);function GCe(e){const{Locked:t,Disabled:r}=_n,i=e.type==="PPT"&&e.allowChartbookPptx===t,a=e.type==="PPT"&&e.allowChartbookPptx===r;return n.jsxs("button",{type:"submit",className:`download-btn${e.isSpinner?" spinner-btn":""}`,"diagnostic-id":e.type.toLowerCase()+"-download-btn",disabled:i||a,children:[e.isSpinner?n.jsx("div",{id:"spinner-icon-container",children:n.jsx(ur,{size:"1em",thickness:8,variant:"indeterminate",value:e.value})}):n.jsx(dt,{icon:e.icon,size:"lg"})," ",n.jsx("div",{id:"download-btn-text",children:e.type}),(i||a)&&n.jsx("i",{className:"material-icons","diagnostic-id":"material-lock-icon",children:"lock"})]})}const WCe=e=>({allowChartbookPptx:e.auth.user&&e.auth.user.company&&e.auth.user.company.chartbook_permissions&&e.auth.user.company.chartbook_permissions.allow_chartbook_pptx}),Uy=le(WCe,{})(GCe);class YCe extends y.Component{render(){const t=this.props.tags?this.props.tags:"",r=oc[s$];return n.jsx(gt,{initialValues:{title:this.props.title,tags:t},onSubmit:(i,{setSubmitting:a})=>{this.props.editChartbookTitle(this.props.cbId,this.props.userId,i.title,i.tags).then(this.props.handleCancel)},validationSchema:_t().shape({title:Ae().required("Required").test("is-empty","Title cannot be empty",function(i){return i&&!i.split("").every(a=>a===" ")}).max(50)}),children:i=>{const{values:a,touched:s,errors:o,dirty:l,isSubmitting:c}=i;return l!==this.props.isDirty&&this.props.setDirty(l),n.jsxs(vt,{children:[n.jsx(Mo,{id:"editor-header-help",helpAttrs:r}),n.jsxs("div",{className:"form-group",children:[n.jsx("label",{className:"large",children:"Chartbook Title*"}),n.jsxs("div",{className:"character-count",children:[50-a.title.length," characters left"]}),n.jsx(me,{id:"title","diagnostic-id":"header-title-input",name:"title",placeholder:"Chartbook Title",maxLength:"50",className:o.title&&s.title?"text-input error":"form-control"}),o.title&&s.title&&n.jsx("div",{className:"input-feedback",children:o.title})]}),n.jsxs("div",{className:"form-group",children:[n.jsx("label",{className:"large",children:"Tags (hint: insert keywords and other helpful notes here)"}),n.jsxs("div",{className:"character-count",children:[100-a.tags.length," characters left"]}),n.jsx(me,{id:"tags","diagnostic-id":"header-tags-input",name:"tags",placeholder:"Tags",maxLength:"100",className:o.tags&&s.tags?"text-input error":"form-control"}),o.tags&&s.tags&&n.jsx("div",{className:"input-feedback",children:o.tags})]}),n.jsxs("div",{className:"form-group",style:{textAlign:"right",padding:"20px"},children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"header-cancel-btn",onClick:this.props.handleCancel,children:"Cancel"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"header-save-btn",disabled:!l||!!Object.keys(o).length||c,children:"SAVE"})]})]})}})}}const KCe=e=>({userId:e.auth.user&&e.auth.user.id}),XCe=le(KCe,{editChartbookTitle:zme})(YCe);class QCe extends y.Component{constructor(){super(...arguments),this.state={edit:!1,progress:0,isFavorite:this.props.chartbook.is_favorite,associatedSharedContentModal:!1,isAnyEnabled:this.props.chartbook.engage_shared?.some(t=>t.is_enabled)},this.handleEdit=()=>{this.setState({edit:!0}),this.props.setScrim(!0)},this.handleCancel=()=>{this.setState({edit:!1}),this.props.setDirty(!1),this.props.setScrim(!1)},this.handleClick=()=>{this.setState({isFavorite:!this.state.isFavorite}),this.props.toggleFavorite(this.props.chartbook.id,this.props.userId)}}componentDidUpdate(t){if(this.props.finishUpdateTime!==t.finishUpdateTime){const r=Qt
73().valueOf(),i=()=>setTimeout(()=>{this.setState({progress:this.state.progress+1}),this.state.progress>=100?this.setState({progress:0}):i()},(this.props.finishUpdateTime-r)/100);i()}}render(){const{Locked:t}=_n,r=n.jsx("form",{method:"get",target:"_blank","diagnostic-id":"cb-ppt-btn",action:this.props.chartbook.pptx_url,children:n.jsx(Uy,{type:"PPT",icon:Sj})}),i=n.jsxs("div",{className:"cb-title-container",children:[n.jsxs("div",{className:"cb-title-left",children:[n.jsxs("div",{className:"cb-title-edit",children:[n.jsxs("div",{id:"cb-title-name","diagnostic-id":"header-title-text",children:[this.props.chartbook.title,this.props.chartbook.engage_shared?.length>0?n.jsx("div",{className:"card-shared-container",children:n.jsx("div",{"diagnostic-id":"card-shared-pill",className:`card-shared-pill ${this.state.isAnyEnabled?"shared-live":"shared-off"}`,onClick:()=>this.setState({associatedSharedContentModal:!0}),children:this.state.isAnyEnabled?"Sharing: Live":"Sharing: Off"})}):n.jsx(n.Fragment,{})]}),n.jsxs("button",{className:"btn-primary-icon-text","diagnostic-id":"header-edit-btn",onClick:this.handleEdit,children:[n.jsx("i",{className:"material-icons",children:"edit"}),"Edit Title"]})]}),n.jsx("div",{id:"cb-title-tag","diagnostic-id":"header-tag-text",children:this.props.chartbook.tags})]}),n.jsx(Ke,{title:this.state.isFavorite?"Remove from favorites":"Add to favorites",placement:"top",children:n.jsx("div",{className:`fav-chartbook-container${this.state.isFavorite?" is-favorite":""}`,children:n.jsx(dt,{icon:Rj,className:this.state.isFavorite?"is-favorite":"","diagnostic-id":this.state.isFavorite?"remove-favorite-header-btn":"add-favorite-header-btn",onClick:this.handleClick})})}),n.jsxs("div",{className:"cb-title-right",children:[n.jsxs("div",{id:"cb-download",children:[this.state.progress===0?n.jsx("form",{method:"get",target:"_blank","diagnostic-id":"cb-pdf-btn",action:this.props.chartbook.pdf_url,children:n.jsx(Uy,{type:"PDF",icon:nu})}):n.jsx("form",{onSubmit:s=>s.preventDefault(),children:n.jsx(Uy,{type:"PDF",isSpinner:!0,value:this.state.progress})}),this.props.allowChartbookPptx===t?n.jsx(Ke,{title:"Upgrade to download PowerPoint chartbooks",placement:"top",children:r}):r]}),n.jsxs("div",{id:"cb-title-datetime",children:[n.jsx("span",{children:"Last edited "}),n.jsx(gn,{local:!0,format:"MMM D, YYYY h:mma",children:this.props.chartbook.user_update_datetime})," ",new Date().toLocaleTimeString("en-us",{timeZoneName:"short"}).split(" ")[2]]})]})]}),a=n.jsx(XCe,{cbId:this.props.chartbook.id,title:this.props.chartbook.title,tags:this.props.chartbook.tags,handleCancel:this.handleCancel,isDirty:this.props.isDirty,setDirty:this.props.setDirty});return n.jsxs("div",{className:"cb-header"+(this.state.edit?" edit":""),children:[this.state.edit?a:i,this.state.associatedSharedContentModal&&n.jsx(nl,{modal:this.state.associatedSharedContentModal,setModal:s=>this.setState({associatedSharedContentModal:s}),contentShared:this.props.chartbook.engage_shared,sharedType:"chartbooks"})]})}}const ZCe=e=>({finishUpdateTime:e.chartbooks.finishUpdateTime,userId:e.auth.user&&e.auth.user.id,allowChartbookPptx:e.auth.user&&e.auth.user.company&&e.auth.user.company.chartbook_permissions&&e.auth.user.company.chartbook_permissions.allow_chartbook_pptx}),JCe=le(ZCe,{toggleFavorite:a0,setScrim:hn})(zt(QCe));function eNe(e){const t=e.chartbook,r=t.schedule,i=_t().test({test:function(a){const{switch_weekly:s,monday:o,tuesday:l,wednesday:c,thursday:h,friday:u}=a;return s?o||l||c||h||u||this.createError({path:"switch_weekly",message:"You must select at least one day of the week"}):!0}});return n.jsx("div",{id:"schedule-wrapper",children:n.jsx(gt,{initialValues:{switch_daily:r.daily,switch_weekly:r.weekly,monday:r.weekly_monday,tuesday:r.weekly_tuesday,wednesday:r.weekly_wednesday,thursday:r.weekly_thursday,friday:r.weekly_friday,switch_monthly:r.monthly},onSubmit:(a,{setSubmitting:s})=>{const o={daily:a.switch_daily,weekly:a.switch_weekly,weekly_monday:a.monday,weekly_tuesday:a.tuesday,weekly_wednesday:a.wednesday,weekly_thursday:a.thursday,weekly_friday:a.friday,monthly:a.switch_monthly};e.editChartbookSchedule(t.id,e.userId,r.id,o).then(()=>
73e.getChartbook(t.id,e.userId)).then(()=>s(!1))},validationSchema:i,enableReinitialize:!0,children:a=>{const{errors:s,dirty:o,handleReset:l,isSubmitting:c}=a;return n.jsxs(vt,{children:[n.jsxs("div",{className:"row",children:[n.jsxs("div",{className:"col s12 m12 l12 schedule-group",children:[n.jsx("h5",{children:"Daily - delivered each weekday morning"}),n.jsxs("div",{className:"onoffswitch",children:[n.jsx("input",{type:"checkbox",id:"switch_daily","diagnostic-id":"schedule-daily-toggle",name:"switch_daily",className:"onoffswitch-checkbox",onChange:h=>{const u=!!h.target.checked;a.setFieldValue("switch_daily",u)},checked:a.values.switch_daily}),n.jsxs("label",{className:"onoffswitch-label",htmlFor:"switch_daily",children:[n.jsx("span",{className:"onoffswitch-inner"}),n.jsx("span",{className:"onoffswitch-switch"})]})]})]}),n.jsxs("div",{className:"col s12 m12 l12 schedule-group",children:[n.jsx("h5",{children:"Weekly - delivered each selected weekday"}),n.jsxs("div",{className:"onoffswitch",children:[n.jsx("input",{type:"checkbox",id:"switch_weekly","diagnostic-id":"schedule-weekly-toggle",name:"switch_weekly",className:"onoffswitch-checkbox",onChange:h=>{const u=!!h.target.checked;a.setFieldValue("switch_weekly",u)},checked:a.values.switch_weekly}),n.jsxs("label",{className:"onoffswitch-label",htmlFor:"switch_weekly",children:[n.jsx("span",{className:"onoffswitch-inner"}),n.jsx("span",{className:"onoffswitch-switch"})]})]}),n.jsxs("div",{id:"schedule-weekdays",children:[n.jsx("span",{children:"Select Weekdays:"}),n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"monday",value:"true",id:"monday","diagnostic-id":"schedule-monday",className:"filled-in",onChange:h=>{const u=!!h.target.checked;a.setFieldValue("monday",u)},checked:a.values.monday}),n.jsx("span",{children:"Monday"})]}),n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"tuesday",value:"true",id:"tuesday","diagnostic-id":"schedule-tuesday",className:"filled-in",onChange:h=>{const u=!!h.target.checked;a.setFieldValue("tuesday",u)},checked:a.values.tuesday}),n.jsx("span",{children:"Tuesday"})]}),n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"wednesday",value:"true",id:"wednesday","diagnostic-id":"schedule-wednesday",className:"filled-in",onChange:h=>{const u=!!h.target.checked;a.setFieldValue("wednesday",u)},checked:a.values.wednesday}),n.jsx("span",{children:"Wednesday"})]}),n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"thursday",value:"true",id:"thursday","diagnostic-id":"schedule-thursday",className:"filled-in",onChange:h=>{const u=!!h.target.checked;a.setFieldValue("thursday",u)},checked:a.values.thursday}),n.jsx("span",{children:"Thursday"})]}),n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"friday",value:"true",id:"friday","diagnostic-id":"schedule-friday",className:"filled-in",onChange:h=>{const u=!!h.target.checked;a.setFieldValue("friday",u)},checked:a.values.friday}),n.jsx("span",{children:"Friday"})]})]}),s.switch_weekly&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:s.switch_weekly})]}),n.jsxs("div",{className:"col s12 m12 l12 schedule-group last",children:[n.jsx("h5",{children:"Monthly - delivered on the first of each month"}),n.jsxs("div",{className:"onoffswitch",children:[n.jsx("input",{type:"checkbox",id:"switch_monthly","diagnostic-id":"schedule-monthly-toggle",name:"switch_monthly",className:"onoffswitch-checkbox",onChange:h=>{const u=!!h.target.checked;a.setFieldValue("switch_monthly",u)},checked:a.values.switch_monthly}),n.jsxs("label",{className:"onoffswitch-label",htmlFor:"switch_monthly",children:[n.jsx("span",{className:"onoffswitch-inner"}),n.jsx("span",{className:"onoffswitch-switch"})]})]})]}),n.jsx("div",{className:"schedule-group-info",children:"Chartbooks are sent from [email protected]. Please add this address to your Safe Senders list."})]}),n.jsx("div",{className:"row",children:n.jsxs("div",{className:"form-group",style:{textAlign:"right",padding:"20px"},children:[n.jsx("button",{type:"button",className:"btn-cancel",onClick:l,disabled:!o,children:"CANCEL"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"schedule-update-btn",disabled:!!Object.keys(s).length||!o||c,children:"UPDATE"})]})})]})}})})}const tNe=e=>({chartbook:e.chartbooks.item,userId:e.auth.user&&e.auth.user.id}),nNe=le(tNe,{getChartbook:Kf,editChartbookSchedule:Yme})(eNe),rp={viewer:"",library:"library",scheduler:"scheduler"};class rNe extends y.Component{constructor(){super(...arguments),this.state={menuChoice:"",waitForData:!0},this.getMenuChoice=t=>{this.setState({menuChoice:t})},this.resetView=()=>{this.setState({menuChoice:""})}}componentDidMount(){const t=this.props.match.params.id;this.props.setScrim(!1),!this.props.chartbooks||!this.props.chartbooks.item||this.props.chartbooks.item.id!==t?this.props.getChartbook(t,this.props.userId).then(()=>this.setState({waitForData:!1}),()=>{this.props.history.push("/insights?view=chartbooks")}):this.setState({waitForData:!1});const r=Ni.parse(this.props.location.search),i=r.view&&Object.keys(rp).includes(r.view);r.view&&!i&&this.props.history.push(`/chartbooks/${t}`),i&&this.setState({menuChoice:r.view})}componentDidUpdate(t,r){const i=this.props.match.params.id;if(i!==t.match.params.id&&this.props.getChartbook(i,this.props.userId).then(()=>this.setState({waitForData:!1}),()=>{this.props.history.push("/chartbooks")}),t.chartbooks.isUpdating&&!this.props.chartbooks.isUpdating&&this.props.getChartbook(this.props.match.params.id,this.props.userId),this.state.menuChoice!==r.menuChoice){const a=this.props.match.params.id;this.props.history.push(`/chartbooks/${a}${this.state.menuChoice?`?view=${this.state.menuChoice}`:""}`)}}render(){const t=this.props.chartbooks.item,{Community:r,SponsoredCommunity:i}=Br,a=[{path:rp.viewer,label:"Chartbook",icon:n.jsx(HCe,{}),component:n.jsx(z$,{chartbook:t}),id:"cb-viewer",diagId:"cbviewer-tab"},{path:rp.library,label:"Chart Library",icon:n.jsx(rf,{}),component:n.jsx(b$,{}),marginTop:"0px",id:"chart-library",diagId:"library-tab"},{path:rp.scheduler,label:"Schedule",icon:n.jsx(qCe,{}),component:n.jsx(nNe,{}),id:"scheduler",diagId:"scheduler-tab"}],s=a[a.findIndex(h=>h.path===this.state.menuChoice)]||a[0],o=s.id,l=s.marginTop||"20px";
73let c=s.component;return c=n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"back-link-wrapper",children:n.jsxs(Ze,{to:{pathname:"/insights",search:"?view=chartbooks"},className:"back-link","diagnostic-id":"editor-back-btn",children:[n.jsx(ir,{}),n.jsx("span",{children:"Back to Chartbooks"})]})}),n.jsx(da,{}),n.jsxs("div",{className:"cb-editor-wrapper",children:[n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12"})}),n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(JCe,{chartbook:t})})}),n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx("div",{className:"menu-tabs-wrapper",children:n.jsx(Zf,{value:this.state.menuChoice,handleChoice:this.getMenuChoice,choices:a})})})}),n.jsx("div",{className:"row fadeTransition"+(o==="chart-library"&&this.props.isDirty?" dirty":""),id:o,style:{marginTop:l},children:c})]})]}),this.state.waitForData?null:n.jsx("div",{className:"container",children:!this.state.waitForData&&this.props.chartbooks&&this.props.chartbooks.item&&c})}}const iNe=e=>({chartbooks:e.chartbooks,isDirty:e.chartbooks.isDirty,showScrim:e.chartbooks.showScrim,userId:e.auth.user&&e.auth.user.id,chartbookPermissions:e.auth.user&&e.auth.user.company&&e.auth.user.company.chartbook_permissions}),aNe=le(iNe,{getChartbook:Kf,getChartbooks:rc,setScrim:hn})(rNe);class sNe extends y.Component{componentDidMount(){const{Enabled:t}=_n;this.props.resetStudioSpinner(),this.props.getChartbooks(this.props.user.id),this.props.allowComposer===t&&this.props.getClientPieces(this.props.user.id),this.props.allowPartner&&this.props.canUsePartner&&(this.props.getPartnerSpotlight(this.props.partnerStub,this.props.user.id),(!this.props.partnerSettings||!this.props.partnerDesigns)&&(this.props.getPartnerDesigns(),this.props.getPartnerSettings()))}render(){const{showSpinner:t,showSpinnerAuth:r,showCreateSpinner:i,showComposerSpinner:a}=this.props,s=t||r||i||a;return n.jsxs(n.Fragment,{children:[s?n.jsx(Dn,{}):null,n.jsxs(us,{children:[n.jsx(kn,{exact:!0,path:"/insights",component:FCe}),n.jsx(kn,{exact:!0,path:"/chartbooks/:id",component:aNe}),n.jsx(qt,{to:"/insights",from:"/chartbooks",exact:!0})]})]})}}const oNe=e=>({user:e.auth.user,showSpinner:e.chartbooks.showSpinner,showSpinnerAuth:e.auth.showSpinner,showComposerSpinner:e.composer.showSpinner,showCreateSpinner:e.studio.showCreateSpinner,canUsePartner:e.auth&&e.auth.user&&e.auth.user.can_use_partner,allowPartner:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.partner_permissions&&e.auth.user.company.partner_permissions.allow_partner,partnerStub:e.auth&&e.auth.user&&e.auth.user.company.partner_stub,partnerSettings:e.spotlight&&e.spotlight.partnerSettings,partnerDesigns:e.spotlight&&e.spotlight.partnerDesigns,allowComposer:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.composer_permissions&&e.auth.user.company.composer_permissions.allow_composer}),tI=le(oNe,{getChartbooks:rc,getClientPieces:sm,getPartnerSpotlight:Pxe,getPartnerDesigns:E$,getPartnerSettings:N$,resetStudioSpinner:Ije})(sNe);function lNe(e){const{setModal:t,newChartbook:r,newClientPiece:i,newInsightsVideo:a,userId:s,history:o,selectedChartIds:l,chartOrder:c,setChartLibraryFormStatus:h,studioPermissions:u,canUseStudio:d,allowComposer:p}=e,[f,m]=y.useState("options"),[g,x]=y.useState(""),{Enabled:v}=_n,b=u?.max_insights_video_clips,j=l.slice().sort((T,N)=>c.indexOf(T)-c.indexOf(N)),{chartbookType:w,clientpieceType:S,insightsVideoType:_}=q6,C=T=>{r(j,s,T).then(N=>{o.push(`/chartbooks/${N}/`)})},E=T=>{a(s,T,j).then(N=>{o.push(`/insightsvideos/${N}/`)})},P=T=>{i(s,T,j).then(N=>{o.push(`/commentaries/${N}/`)})};return n.jsx(gt,{initialValues:{title:""},onSubmit:(T,{setSubmitting:N})=>{const k=T.title.trim();g===w?C(k):g===S?P(k):g===_&&E(k),h(!1)},validationSchema:_t().shape({title:Ae().test("is-empty","Title cannot be empty",function(T){return!T||!T.split("").every(N=>N===" ")})}),children:({values:T,touched:N,errors:k,isSubmitting:I})=>n.jsx(ot,{setModal:t,children:n.jsxs("div",{className:"create-from-chart-library-modal-container",children:[n.jsx("i",{className:"material-icons",onClick:()=>t(!1),children:"close"}),n.jsx("h5",{children:"Create Your Own"}),n.jsxs(vt,{onClick:D=>D.stopPropagation(),children:[n.jsx("div",{className:"title-label",children:"Give your insight a descriptive title:"}),k.title&&N.title&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:k.title}),n.jsx(me,{id:"title",name:"title","diagnostic-id":"chart-library-create-title-input",placeholder:"Enter your title here...",maxLength:50,className:k.title&&N.title?"text-input-error":"form-control"}),n.jsxs("div",{className:"character-count",children:[50-T.title.length," characters left"]}),n.jsxs("div",{className:"chart-library-modal-btns",children:[n.jsxs("button",{type:"button",className:`chart-library-modal-btn${g===w?" selected":""}`,"diagnostic-id":"new-cb-modal-btn",id:"chartbook",onClick:D=>{x(D.currentTarget.id)},children:[g===w&&n.jsx("div",{className:"checkmark","diagnostic-id":"chart-library-create-checkmark",children:n.jsx("i",{className:"material-icons",children:"done"})}),n.jsxs("div",{className:"chart-library-modal-header",children:[n.jsx("i",{className:"material-icons",children:"insert_chart"}),n.jsx("h4",{children:"Chartbook"})]}),n.jsx("div",{children:"Get started with the selected charts to create your own fully customizable chartbook"})]}),n.jsx(wn,{hasPermission:p===v,children:n.jsxs("button",{type:"button",className:`chart-library-modal-btn${g===S?" selected":""}`,"diagnostic-id":"new-cp-modal-btn",id:"clientpiece",onClick:D=>{x(D.currentTarget.id)},children:[g===S&&n.jsx("div",{className:"checkmark","diagnostic-id":"chart-library-create-checkmark",children:n.jsx("i",{className:"material-icons",children:"done"})}),n.jsxs("div",{className:"chart-library-modal-header",children:[n.jsx("i",{className:"material-icons",children:"insert_chart"}),n.jsx("h4",{children:"Commentary"})]}),n.jsx("div",{children:"Get started with the selected charts and add your own language to create your own commentary"})]})}),n.jsx(wn,{hasPermission:u?.allow_studio===v&&d,children:n.jsxs("button",{type:"button",className:`chart-library-modal-btn${g===_?" selected":""}`,"diagnostic-id":"new-iv-modal-btn",id:"insightsvideo",onClick:D=>{x(D.currentTarget.id)},children:[g===_&&n.jsx("div",{className:"checkmark","diagnostic-id":"chart-library-create-checkmark",children:n.jsx("i",{className:"material-icons",children:"done"})}),n.jsxs("div",{className:"chart-library-modal-header",children:[n.jsx("i",{className:"material-icons",children:"video_call"}),n.jsx("h4",{children:"Insights Video"})]}),n.jsx("div",{children:"Get started with the selected charts and add your audio/video re
73cording to create your own insights video"})]})})]}),g===_&&typeof b=="number"&&l.length>b&&n.jsxs("div",{className:"charts-exceed-warning-message","diagnostic-id":"charts-exceed-warning-message",children:[n.jsx("i",{className:"material-icons",children:"warning"}),n.jsx("div",{className:"banner-text","diagnostic-id":"banner-text",children:`Your selection contains more than the maximum allowed charts for an Insights Video.
74            Only the first ${b} charts will be used.`})]}),g===S&&l.length>100&&n.jsxs("div",{className:"charts-exceed-warning-message","diagnostic-id":"charts-exceed-warning-message",children:[n.jsx("i",{className:"material-icons",children:"warning"}),n.jsx("div",{className:"banner-text","diagnostic-id":"banner-text",children:`Your selection contains more than the maximum allowed charts for a Commentary.
75            Only the first 100 charts will be used.`})]}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>t(!1),children:"Cancel"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",disabled:!!Object.keys(k).length||I||!g,children:"Create"})]})]})]})})})}const cNe=e=>({userId:e.auth&&e.auth.user&&e.auth.user.id,selectedChartIds:e.chartlibrary&&e.chartlibrary.selectedChartIds,chartOrder:e.chartlibrary&&e.chartlibrary.chartOrderNew,studioPermissions:e.auth.user&&e.auth.user.company&&e.auth.user.company.studio_permissions,canUseStudio:e.auth&&e.auth.user&&e.auth.user.can_use_studio,allowComposer:e.auth.user&&e.auth.user.company&&e.auth.user.company.composer_permissions&&e.auth.user.company.composer_permissions.allow_composer}),dNe=Jt(le(cNe,{newChartbook:Ga,newClientPiece:om,newInsightsVideo:M$,setChartLibraryFormStatus:b0})(lNe));function uNe(e){const{searchCharts:t,handleCancel:r,setModal:i,selectedChartIds:a,isChartLibraryModal:s,addChart:o,partnerInsightSelectedId:l,selectedChartId:c}=e,[h,u]=y.useState("");y.useEffect(()=>{t("")},[]),y.useEffect(()=>{u(e.searchTerms)},[e.searchTerms]);const d=m=>{u(m.target.value),t(m.target.value)},p=()=>{u(""),t("")},f=h&&h.length>2;return n.jsxs(n.Fragment,{children:[n.jsx("form",{onSubmit:m=>m.preventDefault(),autoComplete:"off",className:"chart-search",children:n.jsxs("div",{className:"input-field",children:[n.jsx("input",{id:"chart_search","diagnostic-id":"chart-search-input",type:"search",value:h,onChange:d,className:f?"active":"",placeholder:"Search Charts..."}),h?n.jsx("i",{className:"material-icons",onClick:p,children:"close"}):n.jsx("i",{className:"material-icons prefix",children:"search"})]})}),s?n.jsx("div",{className:"chart-library-btns",children:n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"add-insights-select-btn",onClick:o,disabled:!l&&!c||l===c,children:"Select"})}):n.jsxs("div",{className:"chart-library-btns",children:[n.jsx("button",{className:"btn-cancel chart-library-reset-btn",type:"button","diagnostic-id":"chart-library-reset-btn",onClick:r,children:"RESET"}),n.jsx(Ke,{title:"Add a chart to get started",placement:"top",children:n.jsx("span",{children:n.jsx("button",{className:"btn-primary chart-library-create-btn","diagnostic-id":"chart-library-create-btn",type:"button",disabled:a?.length===0,onClick:()=>i(!0),children:"CREATE"})})})]})]})}const hNe=e=>({searchTerms:e.chartlibrary&&e.chartlibrary.searchTerms,selectedChartIds:e.chartlibrary&&e.chartlibrary.selectedChartIds,selectedChartId:e.chartlibrary&&e.chartlibrary.selectedChartId}),aL=le(hNe,{searchCharts:cm})(uNe);function pNe(e){const{charts:t,currentSlide:r,notes:i}=e;if(!t[r])return n.jsx(n.Fragment,{});const a=t[r].chart_info.id,s=i.find(p=>p.chart_info===a),o=s?s.note1:"",l=s?s.note2:"",c=s?s.note3:"",h=t[r].chart_info.chart_methodology?.methodology_text,u=t[r].chart_info.chart_methodology?.date_range_text,d=t[r].chart_info.chart_methodology?.sources_text;return!o&&!l&&!c&&!h?n.jsx(n.Fragment,{}):n.jsxs("div",{className:"col s12 m12 xl12",children:[!o&&!l&&!c?n.jsx(n.Fragment,{}):n.jsxs("div",{className:`chart-notes${h?" has-methodology":""}`,children:[n.jsxs("h5",{children:[n.jsx("i",{className:"material-icons-outlined",children:"speaker_notes"}),"Talking Points"]}),n.jsxs("ul",{className:"note-list",children:[o?n.jsx("li",{"diagnostic-id":"chart-notes-1",children:o}):n.jsx(n.Fragment,{}),l?n.jsx("li",{"diagnostic-id":"chart-notes-2",children:l}):n.jsx(n.Fragment,{}),c?n.jsx("li",{"diagnostic-id":"chart-notes-3",children:c}):n.jsx(n.Fragment,{})]})]}),h?n.jsxs("div",{className:"chart-methodology",children:[n.jsxs("h5",{children:[n.jsx("i",{className:"material-icons",children:"insights"}),"Methodology"]}),n.jsx("div",{className:"methodology-text",children:h}),u&&n.jsx("div",{className:"methodology-date-range-text",children:n.jsxs("em",{children:["Date Range: ",u]})}),d&&n.jsx("div",{className:"methodology-sources-text",children:n.jsxs("em",{children:["Source: ",d]})})]}):n.jsx(n.Fragment,{})]})}const fNe=e=>({currentSlide:e.slides.currentSlide,user:e.auth.user}),mNe=le(fNe,{}
75)(pNe),Ui={GRID:"grid",CAROUSEL:"carousel"};function gNe(e){const{isCurrentlySelected:t,chartLibrary:r,searchCharts:i,isSearching:a,setIsSearching:s,deselectAllChartLibraryCharts:o,selectCharts:l,isChartsLoaded:c,isResetCharts:h,handleReset:u,currentSlide:d,setChartLibraryView:p,chartLibraryView:f,deselectChart:m,setChartLibraryFormStatus:g,isDirty:x}=e,{searchTerms:v,selectedChartIds:b,selectedTopicId:j,notes:w}=r,[S,_]=y.useState(null),[C,E]=y.useState(""),[P,T]=y.useState(!1),N=document.getElementById("chart-browser-wrapper");y.useEffect(()=>{N&&N.scrollTo(0,0)},[f,j]);const k=()=>{T(!P)},I=()=>{i(""),s(!1)},D=()=>{o();const O=r.selectedChartIds??[];if(l(O),t){const $=e.charts.filter(U=>O.indexOf(U.chart_info.id)>-1);_($)}};if(y.useEffect(()=>{c&&D()},[c]),y.useEffect(()=>{h?(D(),u()):b||D()},[h,b]),y.useEffect(()=>{let O;a&&v&&v.length>2&&(O=e.charts.filter($=>{const U=w&&w.filter(L=>L.chart_info===$.chart_info.id)[0];return U&&(U.note1?.toLowerCase().includes(v.toLowerCase())||U.note2?.toLowerCase().includes(v.toLowerCase())||U.note3?.toLowerCase().includes(v.toLowerCase()))||Mn($.chart_info.name.toLowerCase(),v.toLowerCase())}),_(O),E(`Results for: "${v}" - `))},[e.charts,a,w,v]),y.useEffect(()=>{let O;!a&&t&&b&&(O=e.charts.filter($=>b.indexOf($.chart_info.id)>-1),_(O),E("Selected Charts"))},[a,t,e.charts]),y.useEffect(()=>{let O;if(!a&&!t){O=e.charts.filter(U=>U.topic.id===j);const $=e.topics.filter(U=>U.id===j);_(O),E($.length>0?$[0].name:"Selected Charts")}},[v,j,a,t,e.charts?.length]),y.useEffect(()=>{g(b?.length>0)},[b?.length]),S&&b&&e.chartOrder){const O=($,U)=>{const B=e.chartOrder.indexOf($.chart_info.id),L=e.chartOrder.indexOf(U.chart_info.id);return B===-1||L===-1?0:B<L?-1:B>L?1:0};return t&&S.sort(O),n.jsxs(n.Fragment,{children:[n.jsxs("h6",{className:"chart-browser-topic","diagnostic-id":"chart-browser-topic",children:[C,a?n.jsx("button",{className:"btn-cancel",onClick:I,children:"Clear Search"}):"",n.jsxs("div",{className:"chart-library-view-icons",children:[n.jsx(Ke,{title:"Grid view",placement:"top",children:n.jsx("div",{className:"grid-icon","diagnostic-id":"grid-icon",children:n.jsx(E0,{className:f===Ui.GRID?"active":"",onClick:()=>p(Ui.GRID),"diagnostic-id":"chart-library-grid-view-btn"})})}),n.jsx(Ke,{title:"Carousel view",placement:"top",children:n.jsx("div",{className:"carousel-icon","diagnostic-id":"carousel-icon",children:n.jsx(L$,{className:f===Ui.CAROUSEL?"active":"",onClick:()=>p(Ui.CAROUSEL)})})})]})]}),n.jsxs("div",{id:"chart-browser-wrapper","diagnostic-id":"chart-browser-wrapper",children:[S.length===0?a?n.jsxs("div",{id:"chart-search-placeholder",className:"fadeTransition",children:[n.jsx("i",{className:"material-icons",children:"search_off"}),n.jsxs("div",{children:['No results for "',v,'"']}),n.jsx("button",{className:"btn-cancel",onClick:I,children:"Clear Search"})]}):t?n.jsxs("div",{id:"no-charts-selected-placeholder",className:"fadeTransition",children:[n.jsx("i",{className:"material-icons",children:"insert_chart"}),n.jsx("div",{children:"There are no charts selected. Select a chart from one of the topics to get started."})]}):n.jsx(n.Fragment,{}):n.jsx(n.Fragment,{}),f===Ui.CAROUSEL?S.length>0&&n.jsxs(n.Fragment,{children:[n.jsx(V$,{charts:S,isChartLibrary:!0,selectedTopicId:j,selectedChartIds:b,topicName:C}),n.jsx(mNe,{charts:S,notes:w})]}):n.jsx(n.Fragment,{children:S.map(($,U)=>n.jsx(Hx,{index:$.id,chartIndex:U+1,chart:$,toggleDrag:k,isDragging:P,isSelected:b.includes($.chart_info.id),selectChart:()=>l([$.chart_info.id]),deselectChart:()=>m($.chart_info.id),isChartLibraryApp:!0,isCurrentlySelected:t,notes:w},$.id))})]})]})}return null}const vNe=e=>({user:e.auth.user,currentSlide:e.slides.currentSlide,chartLibraryView:e.chartlibrary&&e.chartlibrary.chartLibraryView,chartOrder:e.chartlibrary.chartOrderNew,chartOrderInitial:e.chartlibrary.chartOrderInitial,isDirty:e.chartlibrary&&e.chartlibrary.isDirty}),bNe=le(vNe,{searchCharts:cm,deselectAllChartLibraryCharts:f$,selectCharts:p$,setChartLibraryView:m$,deselectChart:v0,updateChartOrder:g$,setChartLibraryFormStatus:b0})(Ss.DragDropContext(am)(gNe));function yNe(e){const{index:t,chart:r,isSelected:i,selectChart:a,deselectChart:s,chartIndex:o}=e,l=r.chart_info,c=()=>{i?s():a()},h=i?"selected":"",u=r.is_locked!==!1;return n.jsx("div",{className:`chart-library-modal-chart${r.aspect_ratio==="16:9"?" size-aspect-16-9":""} fadeTransition`,children:n.jsx("div",{id:`${r.id}`,children:n.jsxs("div",{className:"chart-card","diagnostic-id":"chart-card",children:[i?n.jsx("div",{className:"checkmark","diagnostic-id":"checkmark",children:n.jsx("i",{className:"material-icons",children:"done"})}):u?n.jsx("div",{className:"locked-card",children:n.jsx("i",{className:"material-icons","diagnostic-id":"material-lock-icon",children:"lock"})}):n.jsx(n.Fragment,{}),n.jsxs("div",{className:"chart-card-btn-primary",onClick:!i&&u?void 0:c,children:[n.jsxs("div",{className:"chart-card-title truncate "+h,"diagnostic-id":"chart-card-title-text",children:[l.name,n.jsx("span",{"selected-icon":"✓"})]}),n.jsx("div",{className:"chart-card-image",children:n.jsx("img",{alt:"",src:r.chart_thumb_jpg_url})}),n.jsx("div",{className:`chart-card-placeholder${r.aspect_ratio==="16:9"?" size-aspect-16-9":""}`,children:n.jsx("i",{className:"material-icons",children:"insert_chart_outlined"})}),(i||!u)&&n.jsx("div",{className:"chart-card-btn-grp",children:n.jsx("div",{className:"chart-card-btn",children:i?null:n.jsx("i",{className:"material-icons",children:"add_circle"})})})]})]})})})}const xNe=e=>({}),jNe=le(xNe,{})(yNe);function wNe(e){const{chartLibrary:t,setIsSearching:r,searchCharts:i,deselectAllChartLibraryCharts:a,isChartsLoaded:s,isSearching:o,selectChart:l,deselectChart:c,partnerInsightSelectedId:h}=e,{searchTerms:u,selectedChartId:d,selectedTopicId:p,notes:f}=t,[m,g]=y.useState(null),[x,v]=y.useState(""),b=()=>{i(""),r(!1)},j=()=>{a(),l(h)};return y.useEffect(()=>{s&&j()},[s]),y.useEffect(()=>{let w;o&&u&&u.length>2&&(w=e.charts.filter(S=>{const _=f&&f.filter(E=>
75E.chart_info===S.chart_info.id)[0];return _&&(_.note1?.toLowerCase().includes(u.toLowerCase())||_.note2?.toLowerCase().includes(u.toLowerCase())||_.note3?.toLowerCase().includes(u.toLowerCase()))||Mn(S.chart_info.name.toLowerCase(),u.toLowerCase())}),g(w),v(`Results for: "${u}" - `))},[e.charts,o,f,u]),y.useEffect(()=>{let w;if(!o){w=e.charts.filter(_=>_.topic.id===p);const S=e.topics.filter(_=>_.id===p);g(w),v(S.length>0?S[0].name:"")}},[u,p,o,e.charts?.length,d]),m?n.jsxs(n.Fragment,{children:[n.jsxs("h6",{className:"chart-browser-topic","diagnostic-id":"chart-browser-topic",children:[x,o?n.jsx("button",{className:"btn-cancel",onClick:b,children:"Clear Search"}):""]}),n.jsxs("div",{id:"chart-browser-wrapper","diagnostic-id":"chart-browser-wrapper",children:[o&&m?.length===0?n.jsxs("div",{id:"chart-search-placeholder",className:"fadeTransition",children:[n.jsx("i",{className:"material-icons",children:"search_off"}),n.jsxs("div",{children:['No results for "',u,'"']}),n.jsx("button",{className:"btn-cancel",onClick:b,children:"Clear Search"})]}):n.jsx(n.Fragment,{}),m.map((w,S)=>n.jsx(jNe,{index:w.id,chartIndex:S+1,chart:w,isSelected:d===w.chart_info.id,selectChart:()=>l(w.chart_info.id),deselectChart:()=>c(w.chart_info.id)},w.id))]})]}):null}const SNe=e=>({user:e.auth.user,isDirty:e.chartlibrary&&e.chartlibrary.isDirty}),_Ne=le(SNe,{searchCharts:cm,selectChart:qbe,deselectChart:v0,setChartLibraryFormStatus:b0,deselectAllChartLibraryCharts:f$})(wNe);function CNe(e){const[t,r]=y.useState(e.topics),[i,a]=y.useState(!1),{selectedChartIds:s,selectedTopicId:o,isCurrentlySelected:l,setIsCurrentlySelected:c,selectTopic:h,resetTopics:u,setResetTopics:d,searchCharts:p,searchTerms:f,setIsSearching:m,isSearching:g,chartLibrary:x,numCharts:v,setChartLibraryView:b,chartLibraryView:j,isChartLibraryModal:w,selectedChartId:S}=e;y.useEffect(()=>{if(w){const N=j;return b(Ui.GRID),()=>{b(N)}}else j||(s&&s.length>0?b(Ui.GRID):b(Ui.CAROUSEL))},[]);const _=()=>{if(s&&s.length>0)c(!0);else if(!o&&t.length>1)c(!1),h(e.topics[0]?.id);else if(S){const N=x?.charts.find(k=>k.chart_info.id===S);h(N?.topic?.id)}};y.useEffect(()=>{_()},[t,x?.charts]),y.useEffect(()=>{u&&(_(),d(!1))},[u]),y.useEffect(()=>{r(e.topics)},[e.topics]);const C=N=>{l&&c(!1),p(""),h(N)};y.useEffect(()=>{!!(f&&f.length>2)?g||m(!0):g&&m(!1)},[f,g,m]);const E=f&&f.length>2?void 0:o,P={};t.map(N=>(P[N.id]=0,null)),s&&x.charts&&s.map(k=>{const I=x.charts.filter(D=>D.chart_info.id===k)[0];return I&&I.topic?I.topic.id:null}).map(k=>P[k]=P[k]+1||0);const T=n.jsx("div",{className:"topic-card upgrade-topic",onClick:N=>N.stopPropagation(),children:n.jsxs("div",{className:"topic-name",children:[n.jsx(Ze,{to:"#",onClick:N=>{N.preventDefault(),a(!0)},children:"Upgrade Your Clearnomics Experience"}),n.jsx("div",{children:"to access the full library"})]})});if(t){const N=t.filter(D=>D.is_locked===!1),k=t.filter(D=>D.is_locked!==!1),I={name:"Selected Charts",description:"",is_locked:!1,display_order:0};return n.jsxs(n.Fragment,{children:[i&&n.jsx(ii,{setModal:a,modal:i}),!w&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`selected-topic-btn${!g&&l?" selected":""}`,"diagnostic-id":"selected-topic-btn",onClick:()=>{g&&p(""),c(!0)},children:n.jsxs("div",{className:"btn-icon-text",children:[n.jsx("i",{className:"material-icons",children:"library_add_check"}),n.jsxs("div",{className:"topics-btn-text","diagnostic-id":"selected-charts-topic-text",children:["Selected Charts (",v,")"]})]})}),n.jsx("div",{className:`all-topics-btn${!l&&!g?" selected":""}`,onClick:()=>{g&&p(""),c(!1),h(o)},children:n.jsxs("div",{className:"btn-icon-text",children:[n.jsx("i",{className:"material-icons",children:"try"}),n.jsx("div",{className:"topics-btn-text",children:"Topics"})]})})]}),n.jsxs("div",{id:"topic-wrapper",children:[N.map((D,O)=>n.jsx(lr,{topic:D,selectTopic:()=>C(D.id),isSelected:!l&&!g&&E===D.id,isLocked:!1,numChartsSelected:P[D.id],prevSelectedTopic:l&&E===D.id},D.id)),k.length>0&&T,k.map((D,O)=>n.jsx(lr,{topic:D,isSelected:!l&&!g&&E===D.id,selectTopic:()=>C(D.id),isLocked:!0,numChartsSelected:P[D.id],prevSelectedTopic:l&&E===D.id},D.id))]}),n.jsxs("div",{id:"m-topic-wrapper",children:[n.jsxs(no,{value:l&&I.name||(E&&!g&&t.filter(D=>D.id===E)[0]?t.filter(D=>D.id===E)[0].name:""),name:"Topic",children:[n.jsx(ei,{value:"Selected Charts",children:n.jsx(lr,{isLocked:!1,topic:I,selectTopic:()=>c(!0),isSelected:!g&&l,numChartsSelected:v||0})}),N.map((D,O)=>n.jsx(ei,{value:D.name,children:n.jsx(lr,{topic:D,isSelected:!l&&!g&&E===D.id,isLocked:!1,selectTopic:()=>C(D.id),numChartsSelected:P[D.id]},D.id)},D.id)),k.length>0&&n.jsx(ei,{value:"Upgrade Your Clearnomics Experience",onClick:void 0,children:T}),k.map((D,O)=>n.jsx(ei,{value:D.name,children:n.jsx(lr,{topic:D,isSelected:!l&&!g&&E===D.id,isLocked:!0,selectTopic:()=>C(D.id),numChartsSelected:P[D.id]},D.id)},D.id))]}),!w&&n.jsxs("div",{className:"chart-library-view-icons",children:[n.jsx(Ke,{title:"Grid view",placement:"top",children:n.jsx("div",{className:"grid-icon",children:n.jsx(E0,{className:j===Ui.GRID?"active":"",onClick:()=>b(Ui.GRID),"diagnostic-id":"chart-library-grid-view-btn"})})}),n.jsx(Ke,{title:"Carousel view",placement:"top",children:n.jsx("div",{className:"carousel-icon",children:n.jsx(L$,{className:j===Ui.CAROUSEL?"active":"",onClick:()=>b(Ui.CAROUSEL)})})})]})]})]})}return null}const NNe=e=>({selectedChartIds:e.chartlibrary&&e.chartlibrary.selectedChartIds,selectedTopicId:e.chartlibrary&&e.chartlibrary.selectedTopicId,searchTerms:e.chartlibrary&&e.chartlibrary.searchTerms,numCharts:e.chartlibrary&&e.chartlibrary.numCharts,chartLibraryView:e.chartlibrary&&e.chartlibrary.chartLibraryView,selectedChartId:e.chartlibrary&&e.chartlibrary.selectedChartId}),ENe=le(NNe,{selectTopic:Bbe,searchCharts:cm,setChartLibraryView:m$})(CNe);function TNe(e){const[t,r]=y.useState(!1),[i,a]=y.useState(!1),[s,o]=y.useState(!1),{topics:l,charts:c,isResetCharts:h,handleReset:u,isChartsLoaded:d,chartLibrary:p,isChartLibraryModal:f,partnerInsightSelectedId:m}=e,g={isCurrentlySelected:t,setIsCurrentlySelected:r,isSearching:i,setIsSearching:a,resetTopics:s,setResetTopics:o},x=!p?.selectedChartIds&&!p?.selectedChartId;return y.useEffect(()=>{x&&o(!0)},[x]),n.jsxs(n.Fragment,{children:[n.jsx("div",{className:f?"col s12 m3 l3":"col s12 m3 wider-l2",children:n.jsx(ENe,{topics:l,...g,chartLibrary:p,isChartLibraryModal:f})}),n.jsx("div",{className:`fadeTransition${f?"col s12 m9 l9":" col s12 m9 wider-l9"}`,children:f?n.jsx(_Ne,{...g,chartLibrary:p,charts:c,topics:l,isResetCharts:h,handleReset:u,isChartsLoaded:d,partnerInsightSelectedId:m}):n.jsx(bNe,{...g,chartLibrary:p,charts:c,topics:l,isResetCharts:h,handleReset:u,isChartsLoaded:d})})]})}const kNe=e=>({chartLibraryView:e.chartlibrary&&e.chartlibrary.chartLibraryView}),sL=le(kNe,{})(TNe);function PNe(e){const{showSpinner:t,showCreateSpinner:r,showComposerSpinner:i,showChartLibrarySpinner:a,getCharts:s,setScrim:o,isDirty:l,chartLibraryView:c}=e,[h,u]=y.useState(!1),[d,p]=y.useState(!1),[f,m]=y.useState(!1);y.useEffect(()=>{window.scrollTo(0,0)},[]),y.useEffect(()=>{s(!0).then(()=>{p(!0)})},[]),y.useEffect(()=>{o(!1)},[]),y.useEffect(()=>{o(e.isDirty)},[l]),y.useEffect(()=>{if(!e.modalStatus){const b=document.body.style.top;document.body.style.position="",document.body.style.top="",document.body.style.width="";const j=document.querySelector(".nav-wrapper");
75j&&(j.style.paddingRight="",j.style.paddingLeft=""),window.scrollTo(0,parseInt(b||"0")*-1)}},[e.modalStatus]);const g=()=>{u(!0)},x=()=>{u(!1)},v=t||r||i||a;if(e.chartLibrary){const{charts:b,topics:j}=e.chartLibrary;return n.jsxs(n.Fragment,{children:[v?n.jsx(Dn,{}):null,n.jsxs("div",{className:"container",children:[n.jsx("div",{className:"back-link-wrapper",children:n.jsxs(Ze,{to:{pathname:"/insights",search:"?view=explorer"},className:"back-link","diagnostic-id":"insights-explorer-back-btn",children:[n.jsx(ir,{}),n.jsx("span",{children:"Back to Insights Explorer"})]})}),n.jsx("div",{id:"chart-library-wrapper","diagnostic-id":"cb-grid-wrapper",children:n.jsxs("div",{className:"row fadeTransition",children:[f&&n.jsx(dNe,{setModal:m}),n.jsx("div",{className:"row",children:n.jsx("div",{className:"chart-library-search",children:n.jsx(aL,{handleCancel:g,setModal:m})})}),j&&b&&n.jsx("div",{id:"library-wrapper",className:c===Ui.CAROUSEL?" carousel":" grid",children:n.jsx(sL,{...e,charts:b,topics:j,isResetCharts:h,handleReset:x,isChartsLoaded:d})})]})})]})]})}return null}const INe=e=>({showSpinner:e.chartbooks.showSpinner,showComposerSpinner:e.composer.showSpinner,showCreateSpinner:e.studio.showCreateSpinner,chartLibrary:e.chartlibrary,isDirty:e.chartlibrary.isDirty,showChartLibrarySpinner:e.chartlibrary.showSpinner,chartLibraryView:e.chartlibrary&&e.chartlibrary.chartLibraryView,modalStatus:e.preferences&&e.preferences.modalStatus}),DNe=le(INe,{getCharts:lc,setScrim:hn})(zt(PNe));function RNe(e){const{cpId:t,title:r,handleCancel:i,setDirty:a,isDirty:s,editClientPieceHeader:o,getClientPiece:l,userId:c,displayProfilePic:h,displayAuthorName:u,canUsePartner:d,allowPartner:p,firstName:f,lastName:m,authorType:g,display:x,setDisplay:v}=e,[b,j]=y.useState(h);return n.jsx(gt,{initialValues:{title:r,authorType:g},onSubmit:(w,{setSubmitting:S})=>{o(t,c,w.title,x,b,w.authorType).then(()=>{if(w.authorType!==g)return l(t,c)}).then(i).then(()=>S(!1))},validationSchema:_t().shape({title:Ae().required("Required").test("is-empty","Title cannot be empty",function(w){return w&&!w.split("").every(S=>S===" ")}).max(160)}),children:w=>{const{values:S,touched:_,errors:C,dirty:E,isSubmitting:P}=w;E!==s&&a(E);const T=n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"author-profile-pic",value:"true",id:"author-profile-pic",className:"filled-in",checked:b,onChange:N=>{j(N.target.checked),w.setFieldValue("author-profile-pic",N.target.value)},disabled:!x||S.authorType!=="default"}),n.jsx("span",{children:"Show author profile picture"})]});return n.jsxs(vt,{children:[n.jsxs("div",{className:"form-group",children:[n.jsx("label",{className:"large",children:"Client Market Update*"}),n.jsxs("div",{className:"character-count",children:[160-S.title.length," characters left"]}),n.jsx(me,{id:"title","diagnostic-id":"header-title-input",name:"title",placeholder:"Client Market Update",maxLength:"160",className:C.title&&_.title?"text-input error":"form-control"}),C.title&&_.title&&n.jsx("div",{className:"input-feedback",children:C.title})]}),n.jsxs("div",{className:"form-group header-options",children:[n.jsx("label",{className:"large",children:"Header Options"}),n.jsxs("label",{className:`author-option-grp${p&&d?" partner-options":""}`,children:[n.jsx("input",{type:"checkbox",name:"author-name",value:"true",id:"author-name",className:"filled-in",checked:x,onChange:N=>{v(N.target.checked),w.setFieldValue("author-name",N.target.checked)}}),n.jsx("span",{className:"author-option-radio-btns",children:"Show author name"})]}),p&&d&&n.jsxs(n.Fragment,{children:[n.jsx(me,{component:mt,name:"authorType",id:"default",label:`Use default author (${f} ${m})`,diagId:"use-default-btn",display:x,showProfile:T}),n.jsx(me,{component:mt,name:"authorType",id:"custom",label:"Use custom or multiple authors",diagId:"use-custom-btn",display:x})]}),(!p||!d)&&S.authorType==="default"&&n.jsxs("label",{className:"default-author-profile-pic-label",children:[n.jsx("input",{type:"checkbox",name:"author-profile-pic",value:"true",id:"author-profile-pic",className:"filled-in",checked:b,onChange:N=>{j(N.target.checked),w.setFieldValue("author-profile-pic",N.target.value)},disabled:!x}),n.jsx("span",{children:"Show author profile picture"})]})]}),n.jsxs("div",{className:"form-group",style:{textAlign:"right",padding:"20px"},children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"header-cancel-btn",onClick:i,children:"Cancel"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"header-save-btn",disabled:!E||!!Object.keys(C).length||P,children:"SAVE"})]})]})}})}const ONe=e=>({userId:e.auth.user&&e.auth.user.id,firstName:e.auth.user.first_name,lastName:e.auth.user.last_name,profilePicture:e.auth.user.profile_picture_url,displayAuthorName:e.composer.piece.author_name,displayProfilePic:e.composer.piece.profile_picture,canUsePartner:e.auth&&e.auth.user&&e.auth.user.can_use_partner,allowPartner:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.partner_permissions&&e.auth.user.company.partner_permissions.allow_partner,authorType:e.composer&&e.composer.piece&&e.composer.piece.author_type}),ANe=le(ONe,{editClientPieceHeader:Rbe,getClientPiece:Tu})(RNe),MNe=e=>{const{setModal:t,modal:r,handleCancel:i,currentAttachedPdf:a,editAccompanyingPdf:s,userId:o,cpId:l,isDirty:c,setDirty:h,clientPieceLimits:u}=e,[d,p]=y.useState(null),f=(m,g,x,v,b)=>{const j=u.pdf_size_limit,w=Math.round(j/(1024*1024));m===void 0?(p(null),delete x.pdfFile,delete g.pdfFile):V6(m)?m&&m.size>j?(p(null),b("pdfFile",void 0,!1),v("pdfFile",`That PDF file is larger than ${w}MB. Please use a smaller file or contact us for help.`)):(p(m),b("pdfFile",m),delete g.pdfFile):v("pdfFile","Must be a PDF file.")};
75return n.jsx(ot,{setModal:t,disableClickOutsideCancel:!0,children:n.jsxs("div",{className:"pdf-upload-modal-container","diagnostic-id":"pdf-upload-modal-container",children:[n.jsx("i",{className:"material-icons",onClick:()=>i(),children:"close"}),n.jsx(gt,{initialValues:{pdfFile:void 0},onSubmit:(m,{setSubmitting:g})=>{s(l,o,m.pdfFile).then(()=>{p(null),g(!1)}).then(()=>i(!0))},children:({values:m,touched:g,errors:x,dirty:v,isSubmitting:b,setFieldError:j,setFieldValue:w})=>(v!==c&&h(v),n.jsxs(vt,{onClick:S=>S.stopPropagation(),children:[n.jsx("h5",{children:"Upload a PDF"}),n.jsx("p",{className:"select-pdf-msg",children:"Upload a PDF to accompany your commentary"}),x.pdfFile&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:x.pdfFile}),n.jsx("input",{id:"pdfFile","diagnostic-id":"composer-pdf-upload-input",name:"pdfFile",type:"file",accept:"application/pdf",onChange:S=>{f(S.currentTarget.files[0],x,m,j,w)},className:x.pdfFile&&g.pdfFile?"text-input error":"file-path validate"}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>i(),children:"Cancel"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",disabled:!d||b,children:"Save"})]})]}))})]})})},$Ne=e=>({userId:e.auth.user&&e.auth.user.id,clientPieceLimits:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.clientpiece_config}),LNe=le($Ne,{editAccompanyingPdf:r$})(MNe);function FNe(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function oL(e,t){var r=y.useState(function(){return{inputs:t,result:e()}})[0],i=y.useRef(!0),a=y.useRef(r),s=i.current||!!(t&&a.current.inputs&&FNe(t,a.current.inputs)),o=s?a.current:{inputs:t,result:e()};return y.useEffect(function(){i.current=!1,a.current=o},[o]),o.result}function UNe(e,t){return oL(function(){return e},t)}var Sn=oL,Tt=UNe,xa=function(t){var r=t.top,i=t.right,a=t.bottom,s=t.left,o=i-s,l=a-r,c={top:r,right:i,bottom:a,left:s,width:o,height:l,x:s,y:r,center:{x:(i+s)/2,y:(a+r)/2}};return c},M0=function(t,r){return{top:t.top-r.top,left:t.left-r.left,bottom:t.bottom+r.bottom,right:t.right+r.right}},nI=function(t,r){return{top:t.top+r.top,left:t.left+r.left,bottom:t.bottom-r.bottom,right:t.right-r.right}},BNe=function(t,r){return{top:t.top+r.y,left:t.left+r.x,bottom:t.bottom+r.y,right:t.right+r.x}},By={top:0,right:0,bottom:0,left:0},$0=function(t){var r=t.borderBox,i=t.margin,a=i===void 0?By:i,s=t.border,o=s===void 0?By:s,l=t.padding,c=l===void 0?By:l,h=xa(M0(r,a)),u=xa(nI(r,o)),d=xa(nI(u,c));return{marginBox:h,borderBox:xa(r),paddingBox:u,contentBox:d,margin:a,border:o,padding:c}},ea=function(t){var r=t.slice(0,-2),i=t.slice(-2);if(i!=="px")return 0;var a=Number(r);return isNaN(a)&&wa(),a},qNe=function(){return{x:window.pageXOffset,y:window.pageYOffset}},af=function(t,r){var i=t.borderBox,a=t.border,s=t.margin,o=t.padding,l=BNe(i,r);return $0({borderBox:l,border:a,margin:s,padding:o})},sf=function(t,r){return r===void 0&&(r=qNe()),af(t,r)},lL=function(t,r){var i={top:ea(r.marginTop),right:ea(r.marginRight),bottom:ea(r.marginBottom),left:ea(r.marginLeft)},a={top:ea(r.paddingTop),right:ea(r.paddingRight),bottom:ea(r.paddingBottom),left:ea(r.paddingLeft)},s={top:ea(r.borderTopWidth),right:ea(r.borderRightWidth),bottom:ea(r.borderBottomWidth),left:ea(r.borderLeftWidth)};return $0({borderBox:t,margin:i,padding:a,border:s})},cL=function(t){var r=t.getBoundingClientRect(),i=window.getComputedStyle(t);return lL(r,i)},Kd=function(t){var r=[],i=null,a=function(){for(var o=arguments.length,l=new Array(o),c=0;c<o;c++)l[c]=arguments[c];r=l,!i&&(i=requestAnimationFrame(function(){i=null,t.apply(void 0,r)}))};return a.cancel=function(){i&&(cancelAnimationFrame(i),i=null)},a};function dL(e,t){}dL.bind(null,"warn");dL.bind(null,"error");function Fs(){}function VNe(e,t){return Z({},e,{},t)}function aa(e,t,r){var i=t.map(function(a){var s=VNe(r,a.options);return e.addEventListener(a.eventName,a.fn,s),function(){e.removeEventListener(a.eventName,a.fn,s)}});
75return function(){i.forEach(function(s){s()})}}var zNe="Invariant failed";function of(e){this.message=e}of.prototype.toString=function(){return this.message};function st(e,t){throw new of(zNe)}var HNe=(function(e){_i(t,e);function t(){for(var i,a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];return i=e.call.apply(e,[this].concat(s))||this,i.callbacks=null,i.unbind=Fs,i.onWindowError=function(l){var c=i.getCallbacks();c.isDragging()&&c.tryAbort();var h=l.error;h instanceof of&&l.preventDefault()},i.getCallbacks=function(){if(!i.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return i.callbacks},i.setCallbacks=function(l){i.callbacks=l},i}var r=t.prototype;return r.componentDidMount=function(){this.unbind=aa(window,[{eventName:"error",fn:this.onWindowError}])},r.componentDidCatch=function(a){if(a instanceof of){this.setState({});return}throw a},r.componentWillUnmount=function(){this.unbind()},r.render=function(){return this.props.children(this.setCallbacks)},t})(Me.Component),GNe=`
76  Press space bar to start a drag.
77  When dragging you can use the arrow keys to move the item around and escape to cancel.
78  Some screen readers may require you to be in focus mode or to use your pass through key
79`,lf=function(t){return t+1},WNe=function(t){return`
80  You have lifted an item in position `+lf(t.source.index)+`
81`},uL=function(t,r){var i=t.droppableId===r.droppableId,a=lf(t.index),s=lf(r.index);return i?`
82      You have moved the item from position `+a+`
83      to position `+s+`
84    `:`
85    You have moved the item from position `+a+`
86    in list `+t.droppableId+`
87    to list `+r.droppableId+`
88    in position `+s+`
89  `},hL=function(t,r,i){var a=r.droppableId===i.droppableId;return a?`
90      The item `+t+`
91      has been combined with `+i.draggableId:`
92      The item `+t+`
93      in list `+r.droppableId+`
94      has been combined with `+i.draggableId+`
95      in list `+i.droppableId+`
96    `},YNe=function(t){var r=t.destination;if(r)return uL(t.source,r);var i=t.combine;return i?hL(t.draggableId,t.source,i):"You are over an area that cannot be dropped on"},rI=function(t){return`
97  The item has returned to its starting position
98  of `+lf(t.index)+`
99`},KNe=function(t){if(t.reason==="CANCEL")return`
100      Movement cancelled.
101      `+rI(t.source)+`
102    `;var r=t.destination,i=t.combine;return r?`
103      You have dropped the item.
104      `+uL(t.source,r)+`
105    `:i?`
106      You have dropped the item.
107      `+hL(t.draggableId,t.source,i)+`
108    `:`
109    The item has been dropped while not over a drop area.
110    `+rI(t.source)+`
111  `},Pp={dragHandleUsageInstructions:GNe,onDragStart:WNe,onDragUpdate:YNe,onDragEnd:KNe},Ur={x:0,y:0},Gr=function(t,r){return{x:t.x+r.x,y:t.y+r.y}},qi=function(t,r){return{x:t.x-r.x,y:t.y-r.y}},Us=function(t,r){return t.x===r.x&&t.y===r.y},uc=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},$o=function(t,r,i){var a;return i===void 0&&(i=0),a={},a[t]=r,a[t==="x"?"y":"x"]=i,a},Xd=function(t,r){return Math.sqrt(Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2))},iI=function(t,r){return Math.min.apply(Math,r.map(function(i){return Xd(t,i)}))},pL=function(t){return function(r){return{x:t(r.x),y:t(r.y)}}},XNe=(function(e,t){var r=xa({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return r.width<=0||r.height<=0?null:r}),Ou=function(t,r){return{top:t.top+r.y,left:t.left+r.x,bottom:t.bottom+r.y,right:t.right+r.x}},aI=function(t){return[{x:t.left,y:t.top},{x:t.right,y:t.top},{x:t.left,y:t.bottom},{x:t.right,y:t.bottom}]},QNe={top:0,right:0,bottom:0,left:0},ZNe=function(t,r){return r?Ou(t,r.scroll.diff.displacement):t},JNe=function(t,r,i){if(i&&i.increasedBy){var a;return Z({},t,(a={},a[r.end]=t[r.end]+i.increasedBy[r.line],a))}return t},e1e=function(t,r){return r&&r.shouldClipSubject?XNe(r.pageMarginBox,t):xa(t)},Bl=(function(e){var t=e.page,r=e.withPlaceholder,i=e.axis,a=e.frame,s=ZNe(t.marginBox,a),o=JNe(s,i,r),l=e1e(o,a);return{page:t,withPlaceholder:r,active:l}}),L0=(function(e,t){e.frame||st();var r=e.frame,i=qi(t,r.scroll.initial),a=uc(i),s=Z({},r,{scroll:{initial:r.scroll.initial,current:t,diff:{value:i,displacement:a},max:r.scroll.max}}),o=Bl({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:s}),l=Z({},e,{frame:s,subject:o});return l});function cf(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function F0(e,t){if(e.findIndex)return e.findIndex(t);for(var r=0;r<e.length;r++)if(t(e[r]))return r;return-1}function so(e,t){if(e.find)return e.find(t);var r=F0(e,t);if(r!==-1)return e[r]}function fL(e){return Array.prototype.slice.call(e)}var mL=jr(function(e){return e.reduce(function(t,r){return t[r.descriptor.id]=r,t},{})}),gL=jr(function(e){return e.reduce(function(t,r){return t[r.descriptor.id]=r,t},{})}),ym=jr(function(e){return cf(e)}),t1e=jr(function(e){return cf(e)}
111),hc=jr(function(e,t){var r=t1e(t).filter(function(i){return e===i.descriptor.droppableId}).sort(function(i,a){return i.descriptor.index-a.descriptor.index});return r});function U0(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function xm(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var jm=jr(function(e,t){return t.filter(function(r){return r.descriptor.id!==e.descriptor.id})}),n1e=(function(e){var t=e.isMovingForward,r=e.draggable,i=e.destination,a=e.insideDestination,s=e.previousImpact;if(!i.isCombineEnabled)return null;var o=U0(s);if(!o)return null;function l(g){var x={type:"COMBINE",combine:{draggableId:g,droppableId:i.descriptor.id}};return Z({},s,{at:x})}var c=s.displaced.all,h=c.length?c[0]:null;if(t)return h?l(h):null;var u=jm(r,a);if(!h){if(!u.length)return null;var d=u[u.length-1];return l(d.descriptor.id)}var p=F0(u,function(g){return g.descriptor.id===h});p===-1&&st();var f=p-1;if(f<0)return null;var m=u[f];return l(m.descriptor.id)}),pc=(function(e,t){return e.descriptor.droppableId===t.descriptor.id}),vL={point:Ur,value:0},Qd={invisible:{},visible:{},all:[]},r1e={displaced:Qd,displacedBy:vL,at:null},sa=(function(e,t){return function(r){return e<=r&&r<=t}}),bL=(function(e){var t=sa(e.top,e.bottom),r=sa(e.left,e.right);return function(i){var a=t(i.top)&&t(i.bottom)&&r(i.left)&&r(i.right);if(a)return!0;var s=t(i.top)||t(i.bottom),o=r(i.left)||r(i.right),l=s&&o;if(l)return!0;var c=i.top<e.top&&i.bottom>e.bottom,h=i.left<e.left&&i.right>e.right,u=c&&h;if(u)return!0;var d=c&&o||h&&s;return d}}),i1e=(function(e){var t=sa(e.top,e.bottom),r=sa(e.left,e.right);return function(i){var a=t(i.top)&&t(i.bottom)&&r(i.left)&&r(i.right);return a}}),B0={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},yL={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},a1e=(function(e){return function(t){var r=sa(t.top,t.bottom),i=sa(t.left,t.right);return function(a){return e===B0?r(a.top)&&r(a.bottom):i(a.left)&&i(a.right)}}}),s1e=function(t,r){var i=r.frame?r.frame.scroll.diff.displacement:Ur;return Ou(t,i)},o1e=function(t,r,i){return r.subject.active?i(r.subject.active)(t):!1},l1e=function(t,r,i){return i(r)(t)},q0=function(t){var r=t.target,i=t.destination,a=t.viewport,s=t.withDroppableDisplacement,o=t.isVisibleThroughFrameFn,l=s?s1e(r,i):r;return o1e(l,i,o)&&l1e(l,a,o)},c1e=function(t){return q0(Z({},t,{isVisibleThroughFrameFn:bL}))},xL=function(t){return q0(Z({},t,{isVisibleThroughFrameFn:i1e}))},d1e=function(t){return q0(Z({},t,{isVisibleThroughFrameFn:a1e(t.destination.axis)}))},u1e=function(t,r,i){if(typeof i=="boolean")return i;if(!r)return!0;var a=r.invisible,s=r.visible;if(a[t])return!1;var o=s[t];return o?o.shouldAnimate:!0};function h1e(e,t){var r=e.page.marginBox,i={top:t.point.y,right:0,bottom:0,left:t.point.x};return xa(M0(r,i))}function Zd(e){var t=e.afterDragging,r=e.destination,i=e.displacedBy,a=e.viewport,s=e.forceShouldAnimate,o=e.last;return t.reduce(function(c,h){var u=h1e(h,i),d=h.descriptor.id;c.all.push(d);var p=c1e({target:u,destination:r,viewport:a,withDroppableDisplacement:!0});if(!p)return c.invisible[h.descriptor.id]=!0,c;var f=u1e(d,o,s),m={draggableId:d,shouldAnimate:f};return c.visible[d]=m,c},{all:[],visible:{},invisible:{}})}function p1e(e,t){if(!e.length)return 0;var r=e[e.length-1].descriptor.index;return t.inHomeList?r:r+1}function sI(e){var t=e.insideDestination,r=e.inHomeList,i=e.displacedBy,a=e.destination,s=p1e(t,{inHomeList:r});return{displaced:Qd,displacedBy:i,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:s}}}}function df(e){var t=e.draggable,r=e.insideDestination,i=e.destination,a=e.viewport,s=e.displacedBy,o=e.last,l=e.index,c=e.forceShouldAnimate,h=pc(t,i);if(l==null)return sI({insideDestination:r,inHomeList:h,displacedBy:s,destination:i});var u=so(r,function(g){return g.descriptor.index===l});if(!u)return sI({insideDestination:r,inHomeList:h,displacedBy:s,destination:i});var d=jm(t,r),p=r.indexOf(u),f=d.slice(p),m=Zd({afterDragging:f,destination:i,displacedBy:s,last:o,viewport:
111a.frame,forceShouldAnimate:c});return{displaced:m,displacedBy:s,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:l}}}}function Ws(e,t){return!!t.effected[e]}var f1e=(function(e){var t=e.isMovingForward,r=e.destination,i=e.draggables,a=e.combine,s=e.afterCritical;if(!r.isCombineEnabled)return null;var o=a.draggableId,l=i[o],c=l.descriptor.index,h=Ws(o,s);return h?t?c:c-1:t?c+1:c}),m1e=(function(e){var t=e.isMovingForward,r=e.isInHomeList,i=e.insideDestination,a=e.location;if(!i.length)return null;var s=a.index,o=t?s+1:s-1,l=i[0].descriptor.index,c=i[i.length-1].descriptor.index,h=r?c:c+1;return o<l||o>h?null:o}),g1e=(function(e){var t=e.isMovingForward,r=e.isInHomeList,i=e.draggable,a=e.draggables,s=e.destination,o=e.insideDestination,l=e.previousImpact,c=e.viewport,h=e.afterCritical,u=l.at;if(u||st(),u.type==="REORDER"){var d=m1e({isMovingForward:t,isInHomeList:r,location:u.destination,insideDestination:o});return d==null?null:df({draggable:i,insideDestination:o,destination:s,viewport:c,last:l.displaced,displacedBy:l.displacedBy,index:d})}var p=f1e({isMovingForward:t,destination:s,displaced:l.displaced,draggables:a,combine:u.combine,afterCritical:h});return p==null?null:df({draggable:i,insideDestination:o,destination:s,viewport:c,last:l.displaced,displacedBy:l.displacedBy,index:p})}),v1e=(function(e){var t=e.displaced,r=e.afterCritical,i=e.combineWith,a=e.displacedBy,s=!!(t.visible[i]||t.invisible[i]);return Ws(i,r)?s?Ur:uc(a.point):s?a.point:Ur}),b1e=(function(e){var t=e.afterCritical,r=e.impact,i=e.draggables,a=xm(r);a||st();var s=a.draggableId,o=i[s].page.borderBox.center,l=v1e({displaced:r.displaced,afterCritical:t,combineWith:s,displacedBy:r.displacedBy});return Gr(o,l)}),jL=function(t,r){return r.margin[t.start]+r.borderBox[t.size]/2},y1e=function(t,r){return r.margin[t.end]+r.borderBox[t.size]/2},V0=function(t,r,i){return r[t.crossAxisStart]+i.margin[t.crossAxisStart]+i.borderBox[t.crossAxisSize]/2},oI=function(t){var r=t.axis,i=t.moveRelativeTo,a=t.isMoving;return $o(r.line,i.marginBox[r.end]+jL(r,a),V0(r,i.marginBox,a))},lI=function(t){var r=t.axis,i=t.moveRelativeTo,a=t.isMoving;return $o(r.line,i.marginBox[r.start]-y1e(r,a),V0(r,i.marginBox,a))},x1e=function(t){var r=t.axis,i=t.moveInto,a=t.isMoving;return $o(r.line,i.contentBox[r.start]+jL(r,a),V0(r,i.contentBox,a))},j1e=(function(e){var t=e.impact,r=e.draggable,i=e.draggables,a=e.droppable,s=e.afterCritical,o=hc(a.descriptor.id,i),l=r.page,c=a.axis;if(!o.length)return x1e({axis:c,moveInto:a.page,isMoving:l});var h=t.displaced,u=t.displacedBy,d=h.all[0];if(d){var p=i[d];if(Ws(d,s))return lI({axis:c,moveRelativeTo:p.page,isMoving:l});var f=af(p.page,u.point);return lI({axis:c,moveRelativeTo:f,isMoving:l})}var m=o[o.length-1];if(m.descriptor.id===r.descriptor.id)return l.borderBox.center;if(Ws(m.descriptor.id,s)){var g=af(m.page,uc(s.displacedBy.point));return oI({axis:c,moveRelativeTo:g,isMoving:l})}return oI({axis:c,moveRelativeTo:m.page,isMoving:l})}),Wx=(function(e,t){var r=e.frame;return r?Gr(t,r.scroll.diff.displacement):t}),w1e=function(t){var r=t.impact,i=t.draggable,a=t.droppable,s=t.draggables,o=t.afterCritical,l=i.page.borderBox.center,c=r.at;return!a||!c?l:c.type==="REORDER"?j1e({impact:r,draggable:i,draggables:s,droppable:a,afterCritical:o}):b1e({impact:r,draggables:s,afterCritical:o})},wm=(function(e){var t=w1e(e),r=e.droppable,i=r?Wx(r,t):t;return i}),wL=(function(e,t){var r=qi(t,e.scroll.initial),i=uc(r),a=xa({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),s={frame:a,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:r,displacement:i}}};return s});function cI(e,t){return e.map(function(r){return t[r]})}function S1e(e,t){for(var r=0;r<t.length;r++){var i=t[r].visible[e];if(i)return i}return null}var _1e=(function(e){var t=e.impact,r=e.viewport,i=e.destination,a=e.draggables,s=e.maxScrollChange,o=wL(r,Gr(r.scroll.current,s)),l=i.frame?L0(i,Gr(i.frame.scroll.current,s)):i,c=t.displaced,h=Zd({afterDragging:cI(c.all,a),destination:i,displacedBy:t.displacedBy,viewport:o.frame,last:c,forceShouldAnimate:!1}),u=Zd({afterDragging:cI(c.all,a),destination:l,displacedBy:t.displacedBy,viewport:r.frame,last:c,forceShouldAnimate:!1}),d={},p={},f=[c,h,u];c.all.forEach(function(g){var x=S1e(g,f);if(x){p[g]=x;return}d[g]=!0});var m=Z({},t,{displaced:{all:c.all,invisible:d,visible:p}});return m}),C1e=(function(e,t){return Gr(e.scroll.diff.displacement,t)}),z0=(function(e){var t=e.pageBorderBoxCenter,r=e.draggable,i=e.viewport,a=C1e(i,t),s=qi(a,r.page.borderBox.center);return Gr(r.client.borderBox.center,s)}),SL=(function(e){var t=e.draggable,r=e.destination,i=e.newPageBorderBoxCenter,a=e.viewport,s=e.withDroppableDisplacement,o=e.onlyOnMainAxis,l=o===void 0?!1:o,c=qi(i,t.page.borderBox.center),h=Ou(t.page.borderBox,c),u={target:h,destination:r,withDroppableDisplacement:s,viewport:
111a};return l?d1e(u):xL(u)}),N1e=(function(e){var t=e.isMovingForward,r=e.draggable,i=e.destination,a=e.draggables,s=e.previousImpact,o=e.viewport,l=e.previousPageBorderBoxCenter,c=e.previousClientSelection,h=e.afterCritical;if(!i.isEnabled)return null;var u=hc(i.descriptor.id,a),d=pc(r,i),p=n1e({isMovingForward:t,draggable:r,destination:i,insideDestination:u,previousImpact:s})||g1e({isMovingForward:t,isInHomeList:d,draggable:r,draggables:a,destination:i,insideDestination:u,previousImpact:s,viewport:o,afterCritical:h});if(!p)return null;var f=wm({impact:p,draggable:r,droppable:i,draggables:a,afterCritical:h}),m=SL({draggable:r,destination:i,newPageBorderBoxCenter:f,viewport:o.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(m){var g=z0({pageBorderBoxCenter:f,draggable:r,viewport:o});return{clientSelection:g,impact:p,scrollJumpRequest:null}}var x=qi(f,l),v=_1e({impact:p,viewport:o,destination:i,draggables:a,maxScrollChange:x});return{clientSelection:c,impact:v,scrollJumpRequest:x}}),ci=function(t){var r=t.subject.active;return r||st(),r},E1e=(function(e){var t=e.isMovingForward,r=e.pageBorderBoxCenter,i=e.source,a=e.droppables,s=e.viewport,o=i.subject.active;if(!o)return null;var l=i.axis,c=sa(o[l.start],o[l.end]),h=ym(a).filter(function(d){return d!==i}).filter(function(d){return d.isEnabled}).filter(function(d){return!!d.subject.active}).filter(function(d){return bL(s.frame)(ci(d))}).filter(function(d){var p=ci(d);return t?o[l.crossAxisEnd]<p[l.crossAxisEnd]:p[l.crossAxisStart]<o[l.crossAxisStart]}).filter(function(d){var p=ci(d),f=sa(p[l.start],p[l.end]);return c(p[l.start])||c(p[l.end])||f(o[l.start])||f(o[l.end])}).sort(function(d,p){var f=ci(d)[l.crossAxisStart],m=ci(p)[l.crossAxisStart];return t?f-m:m-f}).filter(function(d,p,f){return ci(d)[l.crossAxisStart]===ci(f[0])[l.crossAxisStart]});if(!h.length)return null;if(h.length===1)return h[0];var u=h.filter(function(d){var p=sa(ci(d)[l.start],ci(d)[l.end]);return p(r[l.line])});return u.length===1?u[0]:u.length>1?u.sort(function(d,p){return ci(d)[l.start]-ci(p)[l.start]})[0]:h.sort(function(d,p){var f=iI(r,aI(ci(d))),m=iI(r,aI(ci(p)));return f!==m?f-m:ci(d)[l.start]-ci(p)[l.start]})[0]}),dI=function(t,r){var i=t.page.borderBox.center;return Ws(t.descriptor.id,r)?qi(i,r.displacedBy.point):i},T1e=function(t,r){var i=t.page.borderBox;return Ws(t.descriptor.id,r)?Ou(i,uc(r.displacedBy.point)):i},k1e=(function(e){var t=e.pageBorderBoxCenter,r=e.viewport,i=e.destination,a=e.insideDestination,s=e.afterCritical,o=a.filter(function(l){return xL({target:T1e(l,s),destination:i,viewport:r.frame,withDroppableDisplacement:!0})}).sort(function(l,c){var h=Xd(t,Wx(i,dI(l,s))),u=Xd(t,Wx(i,dI(c,s)));return h<u?-1:u<h?1:l.descriptor.index-c.descriptor.index});return o[0]||null}),Au=jr(function(t,r){var i=r[t.line];return{value:i,point:$o(t.line,i)}}),P1e=function(t,r,i){var a=t.axis;if(t.descriptor.mode==="virtual")return $o(a.line,r[a.line]);var s=t.subject.page.contentBox[a.size],o=hc(t.descriptor.id,i),l=o.reduce(function(u,d){return u+d.client.marginBox[a.size]},0),c=l+r[a.line],h=c-s;return h<=0?null:$o(a.line,h)},_L=function(t,r){return Z({},t,{scroll:Z({},t.scroll,{max:r})})},CL=function(t,r,i){var a=t.frame;pc(r,t)&&st(),t.subject.withPlaceholder&&st();var s=Au(t.axis,r.displaceBy).point,o=P1e(t,s,i),l={placeholderSize:s,increasedBy:o,oldFrameMaxScroll:t.frame?t.frame.scroll.max:null};if(!a){var c=Bl({page:t.subject.page,withPlaceholder:l,axis:t.axis,frame:t.frame});return Z({},t,{subject:c})}var h=o?Gr(a.scroll.max,o):a.scroll.max,u=_L(a,h),d=Bl({page:t.subject.page,withPlaceholder:l,axis:t.axis,frame:u});return Z({},t,{subject:d,frame:u})},I1e=function(t){var r=t.subject.withPlaceholder;r||st();var i=t.frame;if(!i){var a=Bl({page:t.subject.page,axis:t.axis,frame:null,withPlaceholder:null});return Z({},t,{subject:a})}var s=r.oldFrameMaxScroll;s||st();var o=_L(i,s),l=Bl({page:t.subject.page,axis:t.axis,frame:o,withPlaceholder:null});return Z({},t,{subject:l,frame:o})},D1e=(function(e){var t=e.previousPageBorderBoxCenter,r=e.moveRelativeTo,i=e.insideDestination,a=e.draggable,s=e.draggables,o=e.destination,l=e.viewport,c=e.afterCritical;if(!r){if(i.length)return null;var h={displaced:Qd,displacedBy:vL,at:{type:"REORDER",destination:{droppableId:o.descriptor.id,index:0}}},u=wm({impact:h,draggable:a,droppable:o,draggables:s,afterCritical:c}),d=pc(a,o)?o:CL(o,a,s),p=SL({draggable:a,destination:d,newPageBorderBoxCenter:u,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return p?h:null}var f=t[o.axis.line]<=r.page.borderBox.center[o.axis.line],m=(function(){var x=r.descriptor.index;return r.descriptor.id===a.descriptor.id||f?x:x+1})(),g=Au(o.axis,a.displaceBy);return df({draggable:a,insideDestination:i,destination:o,viewport:l,displacedBy:g,last:Qd,index:m})}),R1e=(function(e){var t=e.isMovingForward,r=e.previousPageBorderBoxCenter,i=e.draggable,a=e.isOver,s=e.draggables,o=e.droppables,l=e.viewport,c=e.afterCritical,h=E1e({
111isMovingForward:t,pageBorderBoxCenter:r,source:a,droppables:o,viewport:l});if(!h)return null;var u=hc(h.descriptor.id,s),d=k1e({pageBorderBoxCenter:r,viewport:l,destination:h,insideDestination:u,afterCritical:c}),p=D1e({previousPageBorderBoxCenter:r,destination:h,draggable:i,draggables:s,moveRelativeTo:d,insideDestination:u,viewport:l,afterCritical:c});if(!p)return null;var f=wm({impact:p,draggable:i,droppable:h,draggables:s,afterCritical:c}),m=z0({pageBorderBoxCenter:f,draggable:i,viewport:l});return{clientSelection:m,impact:p,scrollJumpRequest:null}}),Vi=(function(e){var t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null}),O1e=function(t,r){var i=Vi(t);return i?r[i]:null},A1e=(function(e){var t=e.state,r=e.type,i=O1e(t.impact,t.dimensions.droppables),a=!!i,s=t.dimensions.droppables[t.critical.droppable.id],o=i||s,l=o.axis.direction,c=l==="vertical"&&(r==="MOVE_UP"||r==="MOVE_DOWN")||l==="horizontal"&&(r==="MOVE_LEFT"||r==="MOVE_RIGHT");if(c&&!a)return null;var h=r==="MOVE_DOWN"||r==="MOVE_RIGHT",u=t.dimensions.draggables[t.critical.draggable.id],d=t.current.page.borderBoxCenter,p=t.dimensions,f=p.draggables,m=p.droppables;return c?N1e({isMovingForward:h,previousPageBorderBoxCenter:d,draggable:u,destination:o,draggables:f,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):R1e({isMovingForward:h,previousPageBorderBoxCenter:d,draggable:u,isOver:o,draggables:f,droppables:m,viewport:t.viewport,afterCritical:t.afterCritical})});function bo(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function NL(e){var t=sa(e.top,e.bottom),r=sa(e.left,e.right);return function(a){return t(a.y)&&r(a.x)}}function M1e(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function $1e(e){var t=e.pageBorderBox,r=e.draggable,i=e.candidates,a=r.page.borderBox.center,s=i.map(function(o){var l=o.axis,c=$o(o.axis.line,t.center[l.line],o.page.borderBox.center[l.crossAxisLine]);return{id:o.descriptor.id,distance:Xd(a,c)}}).sort(function(o,l){return l.distance-o.distance});return s[0]?s[0].id:null}function L1e(e){var t=e.pageBorderBox,r=e.draggable,i=e.droppables,a=ym(i).filter(function(s){if(!s.isEnabled)return!1;var o=s.subject.active;if(!o||!M1e(t,o))return!1;if(NL(o)(t.center))return!0;var l=s.axis,c=o.center[l.crossAxisLine],h=t[l.crossAxisStart],u=t[l.crossAxisEnd],d=sa(o[l.crossAxisStart],o[l.crossAxisEnd]),p=d(h),f=d(u);return!p&&!f?!0:p?h<c:u>c});return a.length?a.length===1?a[0].descriptor.id:$1e({pageBorderBox:t,draggable:r,candidates:a}):null}var EL=function(t,r){return xa(Ou(t,r))},F1e=(function(e,t){var r=e.frame;return r?EL(t,r.scroll.diff.value):t});function TL(e){var t=e.displaced,r=e.id;return!!(t.visible[r]||t.invisible[r])}function U1e(e){var t=e.draggable,r=e.closest,i=e.inHomeList;return r?i&&r.descriptor.index>t.descriptor.index?r.descriptor.index-1:r.descriptor.index:null}var B1e=(function(e){var t=e.pageBorderBoxWithDroppableScroll,r=e.draggable,i=e.destination,a=e.insideDestination,s=e.last,o=e.viewport,l=e.afterCritical,c=i.axis,h=Au(i.axis,r.displaceBy),u=h.value,d=t[c.start],p=t[c.end],f=jm(r,a),m=so(f,function(x){var v=x.descriptor.id,b=x.page.borderBox.center[c.line],j=Ws(v,l),w=TL({displaced:s,id:v});return j?w?p<=b:d<b-u:w?p<=b+u:d<b}),g=U1e({draggable:r,closest:m,inHomeList:pc(r,i)});return df({draggable:r,insideDestination:a,destination:i,viewport:o,last:s,displacedBy:h,index:g})}),q1e=4,V1e=(function(e){var t=e.draggable,r=e.pageBorderBoxWithDroppableScroll,i=e.previousImpact,a=e.destination,s=e.insideDestination,o=e.afterCritical;if(!a.isCombineEnabled)return null;var l=a.axis,c=Au(a.axis,t.displaceBy),h=c.value,u=r[l.start],d=r[l.end],p=jm(t,s),f=so(p,function(g){var x=g.descriptor.id,v=g.page.borderBox,b=v[l.size],j=b/q1e,w=Ws(x,o),S=TL({displaced:i.displaced,id:x});return w?S?d>v[l.start]+j&&d<v[l.end]-j:u>v[l.start]-h+j&&u<v[l.end]-h-j:S?d>v[l.start]+h+j&&d<v[l.end]+h-j:u>v[l.start]+j&&u<v[l.end]-j});if(!f)return null;var m={displacedBy:c,displaced:i.displaced,at:{type:"COMBINE",combine:{draggableId:f.descriptor.id,droppableId:a.descriptor.id}}};return m}),kL=(function(e){var t=e.pageOffset,r=e.draggable,i=e.draggables,a=e.droppables,s=e.previousImpact,o=e.viewport,l=e.afterCritical,c=EL(r.page.borderBox,t),h=L1e({pageBorderBox:c,draggable:r,droppables:a});if(!h)return r1e;var u=a[h],d=hc(u.descriptor.id,i),p=F1e(u,c);return V1e({pageBorderBoxWithDroppableScroll:p,draggable:r,previousImpact:s,destination:u,insideDestination:d,afterCritical:l}
111)||B1e({pageBorderBoxWithDroppableScroll:p,draggable:r,destination:u,insideDestination:d,last:s.displaced,viewport:o,afterCritical:l})}),H0=(function(e,t){var r;return Z({},e,(r={},r[t.descriptor.id]=t,r))}),z1e=function(t){var r=t.previousImpact,i=t.impact,a=t.droppables,s=Vi(r),o=Vi(i);if(!s||s===o)return a;var l=a[s];if(!l.subject.withPlaceholder)return a;var c=I1e(l);return H0(a,c)},H1e=(function(e){var t=e.draggable,r=e.draggables,i=e.droppables,a=e.previousImpact,s=e.impact,o=z1e({previousImpact:a,impact:s,droppables:i}),l=Vi(s);if(!l)return o;var c=i[l];if(pc(t,c)||c.subject.withPlaceholder)return o;var h=CL(c,t,r);return H0(o,h)}),Ad=(function(e){var t=e.state,r=e.clientSelection,i=e.dimensions,a=e.viewport,s=e.impact,o=e.scrollJumpRequest,l=a||t.viewport,c=i||t.dimensions,h=r||t.current.client.selection,u=qi(h,t.initial.client.selection),d={offset:u,selection:h,borderBoxCenter:Gr(t.initial.client.borderBoxCenter,u)},p={selection:Gr(d.selection,l.scroll.current),borderBoxCenter:Gr(d.borderBoxCenter,l.scroll.current),offset:Gr(d.offset,l.scroll.diff.value)},f={client:d,page:p};if(t.phase==="COLLECTING")return Z({phase:"COLLECTING"},t,{dimensions:c,viewport:l,current:f});var m=c.draggables[t.critical.draggable.id],g=s||kL({pageOffset:p.offset,draggable:m,draggables:c.draggables,droppables:c.droppables,previousImpact:t.impact,viewport:l,afterCritical:t.afterCritical}),x=H1e({draggable:m,impact:g,previousImpact:t.impact,draggables:c.draggables,droppables:c.droppables}),v=Z({},t,{current:f,dimensions:{draggables:c.draggables,droppables:x},impact:g,viewport:l,scrollJumpRequest:o||null,forceShouldAnimate:o?!1:null});return v});function G1e(e,t){return e.map(function(r){return t[r]})}var PL=(function(e){var t=e.impact,r=e.viewport,i=e.draggables,a=e.destination,s=e.forceShouldAnimate,o=t.displaced,l=G1e(o.all,i),c=Zd({afterDragging:l,destination:a,displacedBy:t.displacedBy,viewport:r.frame,forceShouldAnimate:s,last:o});return Z({},t,{displaced:c})}),IL=(function(e){var t=e.impact,r=e.draggable,i=e.droppable,a=e.draggables,s=e.viewport,o=e.afterCritical,l=wm({impact:t,draggable:r,draggables:a,droppable:i,afterCritical:o});return z0({pageBorderBoxCenter:l,draggable:r,viewport:s})}),DL=(function(e){var t=e.state,r=e.dimensions,i=e.viewport;t.movementMode!=="SNAP"&&st();var a=t.impact,s=i||t.viewport,o=r||t.dimensions,l=o.draggables,c=o.droppables,h=l[t.critical.draggable.id],u=Vi(a);u||st();var d=c[u],p=PL({impact:a,viewport:s,destination:d,draggables:l}),f=IL({impact:p,draggable:h,droppable:d,draggables:l,viewport:s,afterCritical:t.afterCritical});return Ad({impact:p,clientSelection:f,state:t,dimensions:o,viewport:s})}),W1e=(function(e){return{index:e.index,droppableId:e.droppableId}}),RL=(function(e){var t=e.draggable,r=e.home,i=e.draggables,a=e.viewport,s=Au(r.axis,t.displaceBy),o=hc(r.descriptor.id,i),l=o.indexOf(t);l===-1&&st();var c=o.slice(l+1),h=c.reduce(function(f,m){return f[m.descriptor.id]=!0,f},{}),u={inVirtualList:r.descriptor.mode==="virtual",displacedBy:s,effected:h},d=Zd({afterDragging:c,destination:r,displacedBy:s,last:null,viewport:
111a.frame,forceShouldAnimate:!1}),p={displaced:d,displacedBy:s,at:{type:"REORDER",destination:W1e(t.descriptor)}};return{impact:p,afterCritical:u}}),Y1e=(function(e,t){return{draggables:e.draggables,droppables:H0(e.droppables,t)}}),K1e=(function(e){var t=e.draggable,r=e.offset,i=e.initialWindowScroll,a=af(t.client,r),s=sf(a,i),o=Z({},t,{placeholder:Z({},t.placeholder,{client:a}),client:a,page:s});return o}),X1e=(function(e){var t=e.frame;return t||st(),t}),Q1e=(function(e){var t=e.additions,r=e.updatedDroppables,i=e.viewport,a=i.scroll.diff.value;return t.map(function(s){var o=s.descriptor.droppableId,l=r[o],c=X1e(l),h=c.scroll.diff.value,u=Gr(a,h),d=K1e({draggable:s,offset:u,initialWindowScroll:i.scroll.initial});return d})}),Z1e=(function(e){var t=e.state,r=e.published,i=r.modified.map(function(j){var w=t.dimensions.droppables[j.droppableId],S=L0(w,j.scroll);return S}),a=Z({},t.dimensions.droppables,{},mL(i)),s=gL(Q1e({additions:r.additions,updatedDroppables:a,viewport:t.viewport})),o=Z({},t.dimensions.draggables,{},s);r.removals.forEach(function(j){delete o[j]});var l={droppables:a,draggables:o},c=Vi(t.impact),h=c?l.droppables[c]:null,u=l.draggables[t.critical.draggable.id],d=l.droppables[t.critical.droppable.id],p=RL({draggable:u,home:d,draggables:o,viewport:t.viewport}),f=p.impact,m=p.afterCritical,g=h&&h.isCombineEnabled?t.impact:f,x=kL({pageOffset:t.current.page.offset,draggable:l.draggables[t.critical.draggable.id],draggables:l.draggables,droppables:l.droppables,previousImpact:g,viewport:t.viewport,afterCritical:m}),v=Z({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:x,onLiftImpact:f,dimensions:l,afterCritical:m,forceShouldAnimate:!1});if(t.phase==="COLLECTING")return v;var b=Z({phase:"DROP_PENDING"},v,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1});return b}),Yx=function(t){return t.movementMode==="SNAP"},qy=function(t,r,i){var a=Y1e(t.dimensions,r);return!Yx(t)||i?Ad({state:t,dimensions:a}):DL({state:t,dimensions:a})};function Vy(e){return e.isDragging&&e.movementMode==="SNAP"?Z({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var uI={phase:"IDLE",completed:null,shouldFlush:!1},J1e=(function(e,t){if(e===void 0&&(e=uI),t.type==="FLUSH")return Z({},uI,{shouldFlush:!0});if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&st();var r=t.payload,i=r.critical,a=r.clientSelection,s=r.viewport,o=r.dimensions,l=r.movementMode,c=o.draggables[i.draggable.id],h=o.droppables[i.droppable.id],u={selection:a,borderBoxCenter:c.client.borderBox.center,offset:Ur},d={client:u,page:{selection:Gr(u.selection,s.scroll.initial),borderBoxCenter:Gr(u.selection,s.scroll.initial),offset:Gr(u.selection,s.scroll.diff.value)}},p=ym(o.droppables).every(function(ie){return!ie.isFixedOnPage}),f=RL({draggable:c,home:h,draggables:o.draggables,viewport:s}),m=f.impact,g=f.afterCritical,x={phase:"DRAGGING",isDragging:!0,critical:i,movementMode:l,dimensions:o,initial:d,current:d,isWindowScrollAllowed:p,impact:m,afterCritical:g,onLiftImpact:m,viewport:s,scrollJumpRequest:null,forceShouldAnimate:null};return x}if(t.type==="COLLECTION_STARTING"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&st();var v=Z({phase:"COLLECTING"},e,{phase:"COLLECTING"});return v}if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||st(),Z1e({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;bo(e)||st();var b=t.payload.client;return Us(b,e.current.client.selection)?e:Ad({state:e,clientSelection:b,impact:Yx(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return Vy(e);bo(e)||st();var j=t.payload,w=j.id,S=j.newScroll,_=e.dimensions.droppables[w];if(!_)return e;var C=L0(_,S);return qy(e,C,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;bo(e)||st();var E=t.payload,P=E.id,T=E.isEnabled,N=e.dimensions.droppables[P];N||st(),N.isEnabled===T&&st();var k=Z({},N,{isEnabled:T});return qy(e,k,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;bo(e)||st();
111var I=t.payload,D=I.id,O=I.isCombineEnabled,$=e.dimensions.droppables[D];$||st(),$.isCombineEnabled===O&&st();var U=Z({},$,{isCombineEnabled:O});return qy(e,U,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;bo(e)||st(),e.isWindowScrollAllowed||st();var B=t.payload.newScroll;if(Us(e.viewport.scroll.current,B))return Vy(e);var L=wL(e.viewport,B);return Yx(e)?DL({state:e,viewport:L}):Ad({state:e,viewport:L})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!bo(e))return e;var A=t.payload.maxScroll;if(Us(A,e.viewport.scroll.max))return e;var R=Z({},e.viewport,{scroll:Z({},e.viewport.scroll,{max:A})});return Z({phase:"DRAGGING"},e,{viewport:R})}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&st();var F=A1e({state:e,type:t.type});return F?Ad({state:e,impact:F.impact,clientSelection:F.clientSelection,scrollJumpRequest:F.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){var q=t.payload.reason;e.phase!=="COLLECTING"&&st();var V=Z({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:q});return V}if(t.type==="DROP_ANIMATE"){var X=t.payload,M=X.completed,W=X.dropDuration,K=X.newHomeClientOffset;e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||st();var z={phase:"DROP_ANIMATING",completed:M,dropDuration:W,newHomeClientOffset:K,dimensions:e.dimensions};return z}if(t.type==="DROP_COMPLETE"){var Y=t.payload.completed;return{phase:"IDLE",completed:Y,shouldFlush:!1}}return e}),eEe=function(t){return{type:"BEFORE_INITIAL_CAPTURE",payload:t}},tEe=function(t){return{type:"LIFT",payload:t}},nEe=function(t){return{type:"INITIAL_PUBLISH",payload:t}},rEe=function(t){return{type:"PUBLISH_WHILE_DRAGGING",payload:t}},iEe=function(){return{type:"COLLECTION_STARTING",payload:null}},aEe=function(t){return{type:"UPDATE_DROPPABLE_SCROLL",payload:t}},sEe=function(t){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:t}},oEe=function(t){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:t}},OL=function(t){return{type:"MOVE",payload:t}},lEe=function(t){return{type:"MOVE_BY_WINDOW_SCROLL",payload:t}},cEe=function(t){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:t}},dEe=function(){return{type:"MOVE_UP",payload:null}},uEe=function(){return{type:"MOVE_DOWN",payload:null}},hEe=function(){return{type:"MOVE_RIGHT",payload:null}},pEe=function(){return{type:"MOVE_LEFT",payload:null}},G0=function(){return{type:"FLUSH",payload:null}},fEe=function(t){return{type:"DROP_ANIMATE",payload:t}},W0=function(t){return{type:"DROP_COMPLETE",payload:t}},AL=function(t){return{type:"DROP",payload:t}},mEe=function(t){return{type:"DROP_PENDING",payload:t}},ML=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}},gEe=(function(e){return function(t){var r=t.getState,i=t.dispatch;return function(a){return function(s){if(s.type!=="LIFT"){a(s);return}var o=s.payload,l=o.id,c=o.clientSelection,h=o.movementMode,u=r();u.phase==="DROP_ANIMATING"&&i(W0({completed:u.completed})),r().phase!=="IDLE"&&st(),i(G0()),i(eEe({draggableId:l,movementMode:h}));var d={shouldPublishImmediately:h==="SNAP"},p={draggableId:l,scrollOptions:d},f=e.startPublishing(p),m=f.critical,g=f.dimensions,x=f.viewport;i(nEe({critical:m,dimensions:g,clientSelection:c,movementMode:h,viewport:x}))}}}}),vEe=(function(e){return function(){return function(t){return function(r){r.type==="INITIAL_PUBLISH"&&e.dragging(),r.type==="DROP_ANIMATE"&&e.dropping(r.payload.completed.result.reason),(r.type==="FLUSH"||r.type==="DROP_COMPLETE")&&e.resting(),t(r)}}}}),Y0={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},Jd={opacity:{drop:0,combining:.7},scale:{drop:.75}},K0={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},fo=K0.outOfTheWay+"s "+Y0.outOfTheWay,Md={fluid:"opacity "+fo,snap:"transform "+fo+", opacity "+fo,drop:function(t){var r=t+"s "+Y0.drop;return"transform "+r+", opacity "+r},outOfTheWay:"transform "+fo,placeholder:"height "+fo+", width "+fo+", margin "+fo},hI=function(t){return Us(t,Ur)?null:"translate("+t.x+"px, "+t.y+"px)"},Kx={moveTo:hI,drop:function(t,r){var i=hI(t);return i?r?i+" scale("+Jd.scale.drop+")":i:null}},Xx=K0.minDropTime,$L=K0.maxDropTime,bEe=$L-Xx,pI=1500,yEe=.6,xEe=(function(e){var t=e.current,r=e.destination,i=e.reason,a=Xd(t,r);if(a<=0)return Xx;if(a>=pI)return $L;var s=a/pI,o=Xx+bEe*s,l=i==="CANCEL"?o*yEe:o;return Number(l.toFixed(2))}),jEe=(function(e){var t=e.impact,r=e.draggable,i=e.dimensions,a=e.viewport,s=e.afterCritical,o=i.draggables,l=i.droppables,c=Vi(t),h=c?l[c]:null,u=l[r.descriptor.droppableId],d=IL({impact:t,draggable:r,draggables:o,afterCritical:s,droppable:h||u,viewport:
111a}),p=qi(d,r.client.borderBox.center);return p}),wEe=(function(e){var t=e.draggables,r=e.reason,i=e.lastImpact,a=e.home,s=e.viewport,o=e.onLiftImpact;if(!i.at||r!=="DROP"){var l=PL({draggables:t,impact:o,destination:a,viewport:s,forceShouldAnimate:!0});return{impact:l,didDropInsideDroppable:!1}}if(i.at.type==="REORDER")return{impact:i,didDropInsideDroppable:!0};var c=Z({},i,{displaced:Qd});return{impact:c,didDropInsideDroppable:!0}}),SEe=(function(e){var t=e.getState,r=e.dispatch;return function(i){return function(a){if(a.type!=="DROP"){i(a);return}var s=t(),o=a.payload.reason;if(s.phase==="COLLECTING"){r(mEe({reason:o}));return}if(s.phase!=="IDLE"){var l=s.phase==="DROP_PENDING"&&s.isWaiting;l&&st(),s.phase==="DRAGGING"||s.phase==="DROP_PENDING"||st();var c=s.critical,h=s.dimensions,u=h.draggables[s.critical.draggable.id],d=wEe({reason:o,lastImpact:s.impact,afterCritical:s.afterCritical,onLiftImpact:s.onLiftImpact,home:s.dimensions.droppables[s.critical.droppable.id],viewport:s.viewport,draggables:s.dimensions.draggables}),p=d.impact,f=d.didDropInsideDroppable,m=f?U0(p):null,g=f?xm(p):null,x={index:c.draggable.index,droppableId:c.droppable.id},v={draggableId:u.descriptor.id,type:u.descriptor.type,source:x,reason:o,mode:s.movementMode,destination:m,combine:g},b=jEe({impact:p,draggable:u,dimensions:h,viewport:s.viewport,afterCritical:s.afterCritical}),j={critical:s.critical,afterCritical:s.afterCritical,result:v,impact:p},w=!Us(s.current.client.offset,b)||!!v.combine;if(!w){r(W0({completed:j}));return}var S=xEe({current:s.current.client.offset,destination:b,reason:o}),_={newHomeClientOffset:b,dropDuration:S,completed:j};r(fEe(_))}}}}),LL=(function(){return{x:window.pageXOffset,y:window.pageYOffset}});function _Ee(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(r){r.target!==window&&r.target!==window.document||e()}}}function CEe(e){var t=e.onWindowScroll;function r(){t(LL())}var i=Kd(r),a=_Ee(i),s=Fs;function o(){return s!==Fs}function l(){o()&&st(),s=aa(window,[a])}function c(){o()||st(),i.cancel(),s(),s=Fs}return{start:l,stop:c,isActive:o}}var NEe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},EEe=(function(e){var t=CEe({onWindowScroll:function(i){e.dispatch(lEe({newScroll:i}))}});return function(r){return function(i){!t.isActive()&&i.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&NEe(i)&&t.stop(),r(i)}}}),TEe=(function(e){var t=!1,r=!1,i=setTimeout(function(){r=!0}),a=function(o){t||r||(t=!0,e(o),clearTimeout(i))};return a.wasCalled=function(){return t},a}),kEe=(function(){var e=[],t=function(s){var o=F0(e,function(h){return h.timerId===s});o===-1&&st();var l=e.splice(o,1),c=l[0];c.callback()},r=function(s){var o=setTimeout(function(){return t(o)}),l={timerId:o,callback:s};e.push(l)},i=function(){if(e.length){var s=[].concat(e);e.length=0,s.forEach(function(o){clearTimeout(o.timerId),o.callback()})}};return{add:r,flush:i}}),PEe=function(t,r){return t==null&&r==null?!0:t==null||r==null?!1:t.droppableId===r.droppableId&&t.index===r.index},IEe=function(t,r){return t==null&&r==null?!0:t==null||r==null?!1:t.draggableId===r.draggableId&&t.droppableId===r.droppableId},DEe=function(t,r){if(t===r)return!0;var i=t.draggable.id===r.draggable.id&&t.draggable.droppableId===r.draggable.droppableId&&t.draggable.type===r.draggable.type&&t.draggable.index===r.draggable.index,a=t.droppable.id===r.droppable.id&&t.droppable.type===r.droppable.type;return i&&a},cd=function(t,r){r()},ip=function(t,r){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:r}},zy=function(t,r,i,a){if(!t){i(a(r));return}var s=TEe(i),o={announce:s};t(r,o),s.wasCalled()||i(a(r))},REe=(function(e,t){var r=kEe(),i=null,a=function(p,f){i&&st(),cd("onBeforeCapture",function(){var m=e().onBeforeCapture;if(m){var g={draggableId:p,mode:f};m(g)}})},s=function(p,f){i&&st(),cd("onBeforeDragStart",function(){var m=e().onBeforeDragStart;m&&m(ip(p,f))})},o=function(p,f){i&&st();var m=ip(p,f);i={mode:f,lastCritical:p,lastLocation:m.source,lastCombine:null},r.add(function(){cd("onDragStart",function(){return zy(e().onDragStart,m,t,Pp.onDragStart)})})},l=function(p,f){var m=U0(f),g=xm(f);i||st();var x=!DEe(p,i.lastCritical);x&&(i.lastCritical=p);var v=!PEe(i.lastLocation,m);v&&(i.lastLocation=m);var b=!IEe(i.lastCombine,g);if(b&&(i.lastCombine=g),!(!x&&!v&&!b)){var j=Z({},ip(p,i.mode),{combine:g,destination:m});r.add(function(){cd("onDragUpdate",function(){return zy(e().onDragUpdate,j,t,Pp.onDragUpdate)})})}},c=function(){i||st(),r.flush()},h=function(p){i||st(),i=null,cd("onDragEnd",function(){return zy(e().onDragEnd,p,t,Pp.onDragEnd)})}
111,u=function(){if(i){var p=Z({},ip(i.lastCritical,i.mode),{combine:null,destination:null,reason:"CANCEL"});h(p)}};return{beforeCapture:a,beforeStart:s,start:o,update:l,flush:c,drop:h,abort:u}}),OEe=(function(e,t){var r=REe(e,t);return function(i){return function(a){return function(s){if(s.type==="BEFORE_INITIAL_CAPTURE"){r.beforeCapture(s.payload.draggableId,s.payload.movementMode);return}if(s.type==="INITIAL_PUBLISH"){var o=s.payload.critical;r.beforeStart(o,s.payload.movementMode),a(s),r.start(o,s.payload.movementMode);return}if(s.type==="DROP_COMPLETE"){var l=s.payload.completed.result;r.flush(),a(s),r.drop(l);return}if(a(s),s.type==="FLUSH"){r.abort();return}var c=i.getState();c.phase==="DRAGGING"&&r.update(c.critical,c.impact)}}}}),AEe=(function(e){return function(t){return function(r){if(r.type!=="DROP_ANIMATION_FINISHED"){t(r);return}var i=e.getState();i.phase!=="DROP_ANIMATING"&&st(),e.dispatch(W0({completed:i.completed}))}}}),MEe=(function(e){var t=null,r=null;function i(){r&&(cancelAnimationFrame(r),r=null),t&&(t(),t=null)}
111return function(a){return function(s){if((s.type==="FLUSH"||s.type==="DROP_COMPLETE"||s.type==="DROP_ANIMATION_FINISHED")&&i(),a(s),s.type==="DROP_ANIMATE"){var o={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var c=e.getState();c.phase==="DROP_ANIMATING"&&e.dispatch(ML())}};r=requestAnimationFrame(function(){r=null,t=aa(window,[o])})}}}}),$Ee=(function(e){return function(){return function(t){return function(r){(r.type==="DROP_COMPLETE"||r.type==="FLUSH"||r.type==="DROP_ANIMATE")&&e.stopPublishing(),t(r)}}}}),LEe=(function(e){var t=!1;return function(){return function(r){return function(i){if(i.type==="INITIAL_PUBLISH"){t=!0,e.tryRecordFocus(i.payload.critical.draggable.id),r(i),e.tryRestoreFocusRecorded();return}if(r(i),!!t){if(i.type==="FLUSH"){t=!1,e.tryRestoreFocusRecorded();return}if(i.type==="DROP_COMPLETE"){t=!1;var a=i.payload.completed.result;a.combine&&e.tryShiftRecord(a.draggableId,a.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}}),FEe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},UEe=(function(e){return function(t){return function(r){return function(i){if(FEe(i)){e.stop(),r(i);return}if(i.type==="INITIAL_PUBLISH"){r(i);var a=t.getState();a.phase!=="DRAGGING"&&st(),e.start(a);return}r(i),e.scroll(t.getState())}}}}),BEe=(function(e){return function(t){return function(r){if(t(r),r.type==="PUBLISH_WHILE_DRAGGING"){var i=e.getState();i.phase==="DROP_PENDING"&&(i.isWaiting||e.dispatch(AL({reason:i.reason})))}}}}),qEe=Y6,VEe=(function(e){var t=e.dimensionMarshal,r=e.focusMarshal,i=e.styleMarshal,a=e.getResponders,s=e.announce,o=e.autoScroller;return G6(J1e,qEe(W6(vEe(i),$Ee(t),gEe(t),SEe,AEe,MEe,BEe,UEe(o),EEe,LEe(r),OEe(a,s))))}),Hy=function(){return{additions:{},removals:{},modified:{}}};function zEe(e){var t=e.registry,r=e.callbacks,i=Hy(),a=null,s=function(){a||(r.collectionStarting(),a=requestAnimationFrame(function(){a=null;var u=i,d=u.additions,p=u.removals,f=u.modified,m=Object.keys(d).map(function(v){return t.draggable.getById(v).getDimension(Ur)}).sort(function(v,b){return v.descriptor.index-b.descriptor.index}),g=Object.keys(f).map(function(v){var b=t.droppable.getById(v),j=b.callbacks.getScrollWhileDragging();return{droppableId:v,scroll:j}}),x={additions:m,removals:Object.keys(p),modified:g};i=Hy(),r.publish(x)}))},o=function(u){var d=u.descriptor.id;i.additions[d]=u,i.modified[u.descriptor.droppableId]=!0,i.removals[d]&&delete i.removals[d],s()},l=function(u){var d=u.descriptor;i.removals[d.id]=!0,i.modified[d.droppableId]=!0,i.additions[d.id]&&delete i.additions[d.id],s()},c=function(){a&&(cancelAnimationFrame(a),a=null,i=Hy())};return{add:o,remove:l,stop:c}}var FL=(function(e){var t=e.scrollHeight,r=e.scrollWidth,i=e.height,a=e.width,s=qi({x:r,y:t},{x:a,y:i}),o={x:Math.max(0,s.x),y:Math.max(0,s.y)};return o}
111),UL=(function(){var e=document.documentElement;return e||st(),e}),BL=(function(){var e=UL(),t=FL({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t}),HEe=(function(){var e=LL(),t=BL(),r=e.y,i=e.x,a=UL(),s=a.clientWidth,o=a.clientHeight,l=i+s,c=r+o,h=xa({top:r,left:i,right:l,bottom:c}),u={frame:h,scroll:{initial:e,current:e,max:t,diff:{value:Ur,displacement:Ur}}};return u}),GEe=(function(e){var t=e.critical,r=e.scrollOptions,i=e.registry,a=HEe(),s=a.scroll.current,o=t.droppable,l=i.droppable.getAllByType(o.type).map(function(d){return d.callbacks.getDimensionAndWatchScroll(s,r)}),c=i.draggable.getAllByType(t.draggable.type).map(function(d){return d.getDimension(s)}),h={draggables:gL(c),droppables:mL(l)},u={dimensions:h,critical:t,viewport:a};return u});function fI(e,t,r){if(r.descriptor.id===t.id||r.descriptor.type!==t.type)return!1;var i=e.droppable.getById(r.descriptor.droppableId);return i.descriptor.mode==="virtual"}var WEe=(function(e,t){var r=null,i=zEe({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),a=function(f,m){e.droppable.exists(f)||st(),r&&t.updateDroppableIsEnabled({id:f,isEnabled:m})},s=function(f,m){r&&(e.droppable.exists(f)||st(),t.updateDroppableIsCombineEnabled({id:f,isCombineEnabled:m}))},o=function(f,m){r&&(e.droppable.exists(f)||st(),t.updateDroppableScroll({id:f,newScroll:m}))},l=function(f,m){r&&e.droppable.getById(f).callbacks.scroll(m)},c=function(){if(r){i.stop();var f=r.critical.droppable;e.droppable.getAllByType(f.type).forEach(function(m){return m.callbacks.dragStopped()}),r.unsubscribe(),r=null}},h=function(f){r||st();var m=r.critical.draggable;f.type==="ADDITION"&&fI(e,m,f.value)&&i.add(f.value),f.type==="REMOVAL"&&fI(e,m,f.value)&&i.remove(f.value)},u=function(f){r&&st();var m=e.draggable.getById(f.draggableId),g=e.droppable.getById(m.descriptor.droppableId),x={draggable:m.descriptor,droppable:g.descriptor},v=e.subscribe(h);return r={critical:x,unsubscribe:v},GEe({critical:x,registry:e,scrollOptions:f.scrollOptions})},d={updateDroppableIsEnabled:a,updateDroppableIsCombineEnabled:s,scrollDroppable:l,updateDroppableScroll:o,startPublishing:u,stopPublishing:c};return d}),qL=(function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"}),YEe=(function(e){window.scrollBy(e.x,e.y)}),KEe=jr(function(e){return ym(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),XEe=function(t,r){var i=so(KEe(r),function(a){return a.frame||st(),NL(a.frame.pageMarginBox)(t)});return i},QEe=(function(e){var t=e.center,r=e.destination,i=e.droppables;if(r){var a=i[r];return a.frame?a:null}var s=XEe(t,i);return s}),Bs={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},ZEe=(function(e,t){var r=e[t.size]*Bs.startFromPercentage,i=e[t.size]*Bs.maxScrollAtPercentage,a={startScrollingFrom:r,maxScrollValueAt:i};return a}),VL=(function(e){var t=e.startOfRange,r=e.endOfRange,i=e.current,a=r-t;if(a===0)return 0;var s=i-t,o=s/a;return o}),X0=1,JEe=(function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return Bs.maxPixelScroll;if(e===t.startScrollingFrom)return X0;var r=VL({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),i=1-r,a=Bs.maxPixelScroll*Bs.ease(i);return Math.ceil(a)}),mI=Bs.durationDampening.accelerateAt,gI=Bs.durationDampening.stopDampeningAt,eTe=(function(e,t){var r=t,i=gI,a=Date.now(),s=a-r;if(s>=gI)return e;if(s<mI)return X0;var o=VL({startOfRange:mI,endOfRange:i,current:s}),l=e*Bs.ease(o);return Math.ceil(l)}),vI=(function(e){var t=e.distanceToEdge,r=e.thresholds,i=e.dragStartTime,a=e.shouldUseTimeDampening,s=JEe(t,r);return s===0?0:a?Math.max(eTe(s,i),X0):s}),bI=(function(e){var t=e.container,r=e.distanceToEdges,i=e.dragStartTime,a=e.axis,s=e.shouldUseTimeDampening,o=ZEe(t,a),l=r[a.end]<r[a.start];return l?vI({distanceToEdge:r[a.end],thresholds:o,dragStartTime:i,shouldUseTimeDampening:s}):-1*vI({distanceToEdge:r[a.start],thresholds:o,dragStartTime:i,shouldUseTimeDampening:s})}),tTe=(function(e){var t=e.container,r=e.subject,i=e.proposedScroll,a=r.height>t.height,s=r.width>t.width;return!s&&!a?i:s&&a?null:{x:s?0:i.x,y:a?0:i.y}}),nTe=pL(function(e){return e===0?0:e}),zL=(function(e){var t=e.dragStartTime,r=e.container,i=e.subject,a=e.center,s=e.shouldUseTimeDampening,o={top:a.y-r.top,right:r.right-a.x,bottom:r.bottom-a.y,left:a.x-r.left},l=bI({container:r,distanceToEdges:o,dragStartTime:t,axis:B0,shouldUseTimeDampening:s}),c=bI({container:r,distanceToEdges:o,dragStartTime:t,axis:yL,shouldUseTimeDampening:s}),h=nTe({x:c,y:l});if(Us(h,Ur))return null;var u=tTe({container:r,subject:i,proposedScroll:h});return u?Us(u,Ur)?null:u:null}),rTe=pL(function(e){return e===0?0:e>0?1:-1}),Q0=(function(){var e=function(r,i){return r<0?r:r>i?r-i:0};return function(t){var r=t.current,i=t.max,a=t.change,s=Gr(r,a),o={x:e(s.x,i.x),y:e(s.y,i.y)};return Us(o,Ur)?null:o}})(),HL=function(t){var r=t.max,i=t.current,a=t.change,s={x:Math.max(i.x,r.x),y:Math.max(i.y,r.y)},o=rTe(a),l=Q0({max:s,current:i,change:o});return!l||o.x!==0&&l.x===0||o.y!==0&&l.y===0},Z0=function(t,r){return HL({current:t.scroll.current,max:t.scroll.max,change:r})},iTe=function(t,r){if(!Z0(t,r))return null;var i=t.scroll.max,a=t.scroll.current;return Q0({current:a,max:i,change:r})},J0=function(t,r){var i=t.frame;return i?HL({current:i.scroll.current,max:i.scroll.max,change:r}):!1},aTe=function(t,r){var i=t.frame;return!i||!J0(t,r)?null:Q0({current:i.scroll.current,max:i.scroll.max,change:r})},sTe=(function(e){var t=e.viewport,r=e.subject,i=e.center,a=e.dragStartTime,s=e.shouldUseTimeDampening,o=zL({dragStartTime:a,container:t.frame,subject:r,center:i,shouldUseTimeDampening:s});return o&&Z0(t,o)?o:null}),oTe=(function(e){var t=e.droppable,r=e.subject,i=e.center,a=e.dragStartTime,s=e.shouldUseTimeDampening,o=t.frame;if(!o)return null;var l=zL({dragStartTime:a,container:o.pageMarginBox,subject:r,center:i,shouldUseTimeDampening:s});return l&&J0(t,l)?l:null}),yI=(function(e){var t=e.state,r=e.dragStartTime,i=e.shouldUseTimeDampening,a=e.scrollWindow,s=e.scrollDroppable,o=t.current.page.borderBoxCenter,l=t.dimensions.draggables[t.critical.draggable.id],c=l.page.marginBox;if(t.isWindowScrollAllowed){var h=t.viewport,u=sTe({dragStartTime:r,viewport:h,subject:c,center:o,shouldUseTimeDampening:i});if(u){a(u);return}}var d=QEe({center:o,destination:Vi(t.impact),droppables:t.dimensions.droppables});if(d){var p=oTe({dragStartTime:r,droppable:d,subject:c,center:o,shouldUseTimeDampening:i});p&&s(d.descriptor.id,p)}}),lTe=(function(e){var t=e.scrollWindow,r=e.scrollDroppable,i=Kd(t),a=Kd(r),s=null,o=function(u){s||st();
111var d=s,p=d.shouldUseTimeDampening,f=d.dragStartTime;yI({state:u,scrollWindow:i,scrollDroppable:a,dragStartTime:f,shouldUseTimeDampening:p})},l=function(u){s&&st();var d=Date.now(),p=!1,f=function(){p=!0};yI({state:u,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:f,scrollDroppable:f}),s={dragStartTime:d,shouldUseTimeDampening:p},p&&o(u)},c=function(){s&&(i.cancel(),a.cancel(),s=null)};return{start:l,stop:c,scroll:o}}),cTe=(function(e){var t=e.move,r=e.scrollDroppable,i=e.scrollWindow,a=function(h,u){var d=Gr(h.current.client.selection,u);t({client:d})},s=function(h,u){if(!J0(h,u))return u;var d=aTe(h,u);if(!d)return r(h.descriptor.id,u),null;var p=qi(u,d);r(h.descriptor.id,p);var f=qi(u,p);return f},o=function(h,u,d){if(!h||!Z0(u,d))return d;var p=iTe(u,d);if(!p)return i(d),null;var f=qi(d,p);i(f);var m=qi(d,f);return m},l=function(h){var u=h.scrollJumpRequest;if(u){var d=Vi(h.impact);d||st();var p=s(h.dimensions.droppables[d],u);if(p){var f=h.viewport,m=o(h.isWindowScrollAllowed,f,p);m&&a(h,m)}}};return l}),dTe=(function(e){var t=e.scrollDroppable,r=e.scrollWindow,i=e.move,a=lTe({scrollWindow:r,scrollDroppable:t}),s=cTe({move:i,scrollWindow:r,scrollDroppable:t}),o=function(h){if(h.phase==="DRAGGING"){if(h.movementMode==="FLUID"){a.scroll(h);return}h.scrollJumpRequest&&s(h)}},l={scroll:o,start:a.start,stop:a.stop};return l}),ql="data-rbd",Vl=(function(){var e=ql+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}})(),Qx=(function(){var e=ql+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}})(),uTe=(function(){var e=ql+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}})(),xI={contextId:ql+"-scroll-container-context-id"},hTe=function(t){return function(r){return"["+r+'="'+t+'"]'}},dd=function(t,r){return t.map(function(i){var a=i.styles[r];return a?i.selector+" { "+a+" }":""}).join(" ")},pTe="pointer-events: none;",fTe=(function(e){var t=hTe(e),r=(function(){var l=`
112      cursor: -webkit-grab;
113      cursor: grab;
114    `;return{selector:t(Vl.contextId),styles:{always:`
115          -webkit-touch-callout: none;
116          -webkit-tap-highlight-color: rgba(0,0,0,0);
117          touch-action: manipulation;
118        `,resting:l,dragging:pTe,dropAnimating:l}}})(),i=(function(){var l=`
119      transition: `+Md.outOfTheWay+`;
120    `;return{selector:t(Qx.contextId),styles:{dragging:l,dropAnimating:l,userCancel:l}}})(),a={selector:t(uTe.contextId),styles:{always:"overflow-anchor: none;"}},s={selector:"body",styles:{dragging:`
121        cursor: grabbing;
122        cursor: -webkit-grabbing;
123        user-select: none;
124        -webkit-user-select: none;
125        -moz-user-select: none;
126        -ms-user-select: none;
127        overflow-anchor: none;
128      `}},o=[i,r,a,s];return{always:dd(o,"always"),resting:dd(o,"resting"),dragging:dd(o,"dragging"),dropAnimating:dd(o,"dropAnimating"),userCancel:dd(o,"userCancel")}}),zi=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?y.useLayoutEffect:y.useEffect,Gy=function(){var t=document.querySelector("head");return t||st(),t},jI=function(t){var r=document.createElement("style");return t&&r.setAttribute("nonce",t),r.type="text/css",r};function mTe(e,t){var r=Sn(function(){return fTe(e)},[e]),i=y.useRef(null),a=y.useRef(null),s=Tt(jr(function(d){var p=a.current;p||st(),p.textContent=d}),[]),o=Tt(function(d){var p=i.current;p||st(),p.textContent=d},[]);zi(function(){!i.current&&!a.current||st();var d=jI(t),p=jI(t);return i.current=d,a.current=p,d.setAttribute(ql+"-always",e),p.setAttribute(ql+"-dynamic",e),Gy().appendChild(d),Gy().appendChild(p),o(r.always),s(r.resting),function(){var f=function(g){var x=g.current;x||st(),Gy().removeChild(x),g.current=null};f(i),f(a)}},[t,o,s,r.always,r.resting,e]);var l=Tt(function(){return s(r.dragging)},[s,r.dragging]),c=Tt(function(d){if(d==="DROP"){s(r.dropAnimating);return}s(r.userCancel)},[s,r.dropAnimating,r.userCancel]),h=Tt(function(){a.current&&s(r.resting)},[s,r.resting]),u=Sn(function(){return{dragging:l,dropping:c,resting:h}},[l,c,h]);return u}var GL=(function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window});function Sm(e){return e instanceof GL(e).HTMLElement}function gTe(e,t){var r="["+Vl.contextId+'="'+e+'"]',i=fL(document.querySelectorAll(r));if(!i.length)return null;var a=so(i,function(s){return s.getAttribute(Vl.draggableId)===t});return!a||!Sm(a)?null:a}function vTe(e){var t=y.useRef({}),r=y.useRef(null),i=y.useRef(null),a=y.useRef(!1),s=Tt(function(p,f){var m={id:p,focus:f};return t.current[p]=m,function(){var x=t.current,v=x[p];v!==m&&delete x[p]}},[]),o=Tt(function(p){var f=gTe(e,p);
128f&&f!==document.activeElement&&f.focus()},[e]),l=Tt(function(p,f){r.current===p&&(r.current=f)},[]),c=Tt(function(){i.current||a.current&&(i.current=requestAnimationFrame(function(){i.current=null;var p=r.current;p&&o(p)}))},[o]),h=Tt(function(p){r.current=null;var f=document.activeElement;f&&f.getAttribute(Vl.draggableId)===p&&(r.current=p)},[]);zi(function(){return a.current=!0,function(){a.current=!1;var p=i.current;p&&cancelAnimationFrame(p)}},[]);var u=Sn(function(){return{register:s,tryRecordFocus:h,tryRestoreFocusRecorded:c,tryShiftRecord:l}},[s,h,c,l]);return u}function bTe(){var e={draggables:{},droppables:{}},t=[];function r(d){return t.push(d),function(){var f=t.indexOf(d);f!==-1&&t.splice(f,1)}}function i(d){t.length&&t.forEach(function(p){return p(d)})}function a(d){return e.draggables[d]||null}function s(d){var p=a(d);return p||st(),p}var o={register:function(p){e.draggables[p.descriptor.id]=p,i({type:"ADDITION",value:p})},update:function(p,f){var m=e.draggables[f.descriptor.id];m&&m.uniqueId===p.uniqueId&&(delete e.draggables[f.descriptor.id],e.draggables[p.descriptor.id]=p)},unregister:function(p){var f=p.descriptor.id,m=a(f);m&&p.uniqueId===m.uniqueId&&(delete e.draggables[f],i({type:"REMOVAL",value:p}))},getById:s,findById:a,exists:function(p){return!!a(p)},getAllByType:function(p){return cf(e.draggables).filter(function(f){return f.descriptor.type===p})}};function l(d){return e.droppables[d]||null}function c(d){var p=l(d);return p||st(),p}var h={register:function(p){e.droppables[p.descriptor.id]=p},unregister:function(p){var f=l(p.descriptor.id);f&&p.uniqueId===f.uniqueId&&delete e.droppables[p.descriptor.id]},getById:c,findById:l,exists:function(p){return!!l(p)},getAllByType:function(p){return cf(e.droppables).filter(function(f){return f.descriptor.type===p})}};function u(){e.draggables={},e.droppables={},t.length=0}return{draggable:o,droppable:h,subscribe:r,clean:u}}function yTe(){var e=Sn(bTe,[]);return y.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var eS=Me.createContext(null),uf=(function(){var e=document.body;return e||st(),e}),xTe={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},jTe=function(t){return"rbd-announcement-"+t};function wTe(e){var t=Sn(function(){return jTe(e)},[e]),r=y.useRef(null);y.useEffect(function(){var s=document.createElement("div");return r.current=s,s.id=t,s.setAttribute("aria-live","assertive"),s.setAttribute("aria-atomic","true"),Z(s.style,xTe),uf().appendChild(s),function(){setTimeout(function(){var c=uf();c.contains(s)&&c.removeChild(s),s===r.current&&(r.current=null)})}},[t]);var i=Tt(function(a){var s=r.current;if(s){s.textContent=a;return}},[]);return i}var STe=0,_Te={separator:"::"};function tS(e,t){return t===void 0&&(t=_Te),Sn(function(){return""+e+t.separator+STe++},[t.separator,e])}function CTe(e){var t=e.contextId,r=e.uniqueId;return"rbd-hidden-text-"+t+"-"+r}function NTe(e){var t=e.contextId,r=e.text,i=tS("hidden-text",{separator:"-"}),a=Sn(function(){return CTe({contextId:t,uniqueId:i})},[i,t]);return y.useEffect(function(){var o=document.createElement("div");return o.id=a,o.textContent=r,o.style.display="none",uf().appendChild(o),function(){var c=uf();c.contains(o)&&c.removeChild(o)}},[a,r]),a}var _m=Me.createContext(null);function WL(e){var t=y.useRef(e);return y.useEffect(function(){t.current=e}),t}function ETe(){var e=null;function t(){return!!e}function r(o){return o===e}function i(o){e&&st();var l={abandon:o};return e=l,l}function a(){e||st(),e=null}function s(){e&&(e.abandon(),a())}return{isClaimed:t,isActive:r,claim:i,release:a,tryAbandon:s}}var TTe=9,kTe=13,nS=27,YL=32,PTe=33,ITe=34,DTe=35,RTe=36,OTe=37,ATe=38,MTe=39,$Te=40,ap,LTe=(ap={},ap[kTe]=!0,ap[TTe]=!0,ap),KL=(function(e){LTe[e.keyCode]&&e.preventDefault()}),Cm=(function(){var e="visibilitychange";if(typeof document>"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],r=so(t,function(i){return"on"+i in document});return r||e})(),XL=0,wI=5;function FTe(e,t){return Math.abs(t.x-e.x)>=wI||Math.abs(t.y-e.y)>=wI}var SI={type:"IDLE"};function UTe(e){var t=e.cancel,r=e.completed,i=e.getPhase,a=e.setPhase;return[{eventName:"mousemove",fn:function(o){var l=o.button,c=o.clientX,h=o.clientY;if(l===XL){var u={x:c,y:h},d=i();if(d.type==="DRAGGING"){o.preventDefault(),d.actions.move(u);return}d.type!=="PENDING"&&st();var p=d.point;if(FTe(p,u)){o.preventDefault();var f=d.actions.fluidLift(u);a({type:"DRAGGING",actions:f})}}}},{eventName:"mouseup",fn:function(o){var l=i();if(l.type!=="DRAGGING"){t();return}o.preventDefault(),l.actions.drop({shouldBlockNextClick:!0}),r()}},{eventName:"mousedown",fn:function(o){i().type==="DRAGGING"&&o.preventDefault(),t()}},{eventName:"keydown",fn:function(o){var l=i();if(l.type==="PENDING"){t();return}if(o.keyCode===nS){o.preventDefault(),t();return}KL(o)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){i().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(o){var l=i();if(l.type==="IDLE"&&st(),l.actions.shouldRespectForcePress()){t();return}o.preventDefault()}},{eventName:Cm,fn:t}]}function BTe(e){var t=y.useRef(SI),r=y.useRef(Fs),i=Sn(function(){return{eventName:"mousedown",fn:function(d){if(!d.defaultPrevented&&d.button===XL&&!(d.ctrlKey||d.metaKey||d.shiftKey||d.altKey)){var p=e.findClosestDraggableId(d);if(p){var f=e.tryGetLock(p,o,{sourceEvent:d});if(f){d.preventDefault();var m={x:d.clientX,y:d.clientY};r.current(),h(f,m)}}}}}},[e]),a=Sn(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(d){if(!d.defaultPrevented){var p=e.findClosestDraggableId(d);if(p){var f=e.findOptionsForDraggable(p);f&&(f.shouldRespectForcePress||e.canGetLock(p)&&d.preventDefault())}}}}},[e]),s=Tt(function(){var d={passive:!1,capture:!0};r.current=aa(window,[a,i],d)},[a,i]),o=Tt(function(){var u=t.current;u.type!=="IDLE"&&(t.current=SI,r.current(),s())},[s]),l=Tt(function(){var u=t.current;o(),u.type==="DRAGGING"&&u.actions.cancel({shouldBlockNextClick:!0}),u.type==="PENDING"&&u.actions.abort()},[o]),c=Tt(function(){var d={capture:!0,passive:!1},p=UTe({cancel:l,completed:o,getPhase:function(){return t.current},setPhase:function(m){t.current=m}});r.current=aa(window,p,d)},[l,o]),h=Tt(function(d,p){t.current.type!=="IDLE"&&st(),t.current={type:"PENDING",point:p,actions:d},c()},[c]);zi(function(){return s(),function(){r.current()}},[s])}var yl;function qTe(){}var VTe=(yl={},yl[ITe]=!0,yl[PTe]=!0,yl[RTe]=!0,yl[DTe]=!0,yl);function zTe(e,t){function r(){t(),e.cancel()}function i(){t(),e.drop()}return[{eventName:"keydown",fn:function(s){if(s.keyCode===nS){s.preventDefault(),r();return}if(s.keyCode===YL){s.preventDefault(),i();return}if(s.keyCode===$Te){s.preventDefault(),e.moveDown();return}if(s.keyCode===ATe){s.preventDefault(),e.moveUp();return}if(s.keyCode===MTe){s.preventDefault(),e.moveRight();return}if(s.keyCode===OTe){s.preventDefault(),e.moveLeft();return}if(VTe[s.keyCode]){s.preventDefault();return}KL(s)}},{eventName:"mousedown",fn:r},{eventName:"mouseup",fn:r},{eventName:"click",fn:r},{eventName:"touchstart",fn:r},{eventName:"resize",fn:r},{eventName:"wheel",fn:r,options:{passive:!0}},{eventName:Cm,fn:r}]}function HTe(e){var t=y.useRef(qTe),r=Sn(function(){return{eventName:"keydown",fn:function(s){if(s.defaultPrevented||s.keyCode!==YL)return;var o=e.findClosestDraggableId(s);if(!o)return;var l=e.tryGetLock(o,u,{sourceEvent:s});if(!l)return;s.preventDefault();var c=!0,h=l.snapLift();t.current();function u(){c||st(),c=!1,t.current(),i()}t.current=aa(window,zTe(h,u),{capture:!0,passive:!1})}}},[e]),i=Tt(function(){var s={passive:!1,capture:!0};t.current=aa(window,[r],s)},[r]);zi(function(){return i(),function(){t.current()}},[i])}var Wy={type:"IDLE"},GTe=120,WTe=.15;function YTe(e){var t=e.cancel,r=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(a){a.preventDefault()}}
128,{eventName:"keydown",fn:function(a){if(r().type!=="DRAGGING"){t();return}a.keyCode===nS&&a.preventDefault(),t()}},{eventName:Cm,fn:t}]}function KTe(e){var t=e.cancel,r=e.completed,i=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(s){var o=i();if(o.type!=="DRAGGING"){t();return}o.hasMoved=!0;var l=s.touches[0],c=l.clientX,h=l.clientY,u={x:c,y:h};s.preventDefault(),o.actions.move(u)}},{eventName:"touchend",fn:function(s){var o=i();if(o.type!=="DRAGGING"){t();return}s.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),r()}},{eventName:"touchcancel",fn:function(s){if(i().type!=="DRAGGING"){t();return}s.preventDefault(),t()}},{eventName:"touchforcechange",fn:function(s){var o=i();o.type==="IDLE"&&st();var l=s.touches[0];if(l){var c=l.force>=WTe;if(c){var h=o.actions.shouldRespectForcePress();if(o.type==="PENDING"){h&&t();return}if(h){if(o.hasMoved){s.preventDefault();return}t();return}s.preventDefault()}}}},{eventName:Cm,fn:t}]}function XTe(e){var t=y.useRef(Wy),r=y.useRef(Fs),i=Tt(function(){return t.current},[]),a=Tt(function(f){t.current=f},[]),s=Sn(function(){return{eventName:"touchstart",fn:function(f){if(!f.defaultPrevented){var m=e.findClosestDraggableId(f);if(m){var g=e.tryGetLock(m,l,{sourceEvent:f});if(g){var x=f.touches[0],v=x.clientX,b=x.clientY,j={x:v,y:b};r.current(),d(g,j)}}}}}},[e]),o=Tt(function(){var f={capture:!0,passive:!1};r.current=aa(window,[s],f)},[s]),l=Tt(function(){var p=t.current;p.type!=="IDLE"&&(p.type==="PENDING"&&clearTimeout(p.longPressTimerId),a(Wy),r.current(),o())},[o,a]),c=Tt(function(){var p=t.current;l(),p.type==="DRAGGING"&&p.actions.cancel({shouldBlockNextClick:!0}),p.type==="PENDING"&&p.actions.abort()},[l]),h=Tt(function(){var f={capture:!0,passive:!1},m={cancel:c,completed:l,getPhase:i},g=aa(window,KTe(m),f),x=aa(window,YTe(m),f);r.current=function(){g(),x()}},[c,i,l]),u=Tt(function(){var f=i();f.type!=="PENDING"&&st();var m=f.actions.fluidLift(f.point);a({type:"DRAGGING",actions:m,hasMoved:!1})},[i,a]),d=Tt(function(f,m){i().type!=="IDLE"&&st();var g=setTimeout(u,GTe);a({type:"PENDING",point:m,actions:f,longPressTimerId:g}),h()},[h,i,a,u]);zi(function(){return o(),function(){r.current();var m=i();m.type==="PENDING"&&(clearTimeout(m.longPressTimerId),a(Wy))}},[i,o,a]),zi(function(){var f=aa(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return f},[])}var QTe={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function QL(e,t){if(t==null)return!1;var r=!!QTe[t.tagName.toLowerCase()];if(r)return!0;var i=t.getAttribute("contenteditable");return i==="true"||i===""?!0:t===e?!1:QL(e,t.parentElement)}function ZTe(e,t){var r=t.target;return Sm(r)?QL(e,r):!1}var JTe=(function(e){return xa(e.getBoundingClientRect()).center});function eke(e){return e instanceof GL(e).Element}var tke=(function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],r=so(t,function(i){return i in Element.prototype});return r||e})();function ZL(e,t){return e==null?null:e[tke](t)?e:ZL(e.parentElement,t)}function nke(e,t){return e.closest?e.closest(t):ZL(e,t)}function rke(e){return"["+Vl.contextId+'="'+e+'"]'}function ike(e,t){var r=t.target;if(!eke(r))return null;var i=rke(e),a=nke(r,i);return!a||!Sm(a)?null:a}function ake(e,t){var r=ike(e,t);return r?r.getAttribute(Vl.draggableId):null}function ske(e,t){var r="["+Qx.contextId+'="'+e+'"]',i=fL(document.querySelectorAll(r)),a=so(i,function(s){return s.getAttribute(Qx.id)===t});return!a||!Sm(a)?null:a}function oke(e){e.preventDefault()}function sp(e){var t=e.expected,r=e.phase,i=e.isLockActive;return e.shouldWarn,!(!i()||t!==r)}function JL(e){var t=e.lockAPI,r=e.store,i=e.registry,a=e.draggableId;if(t.isClaimed())return!1;var s=i.draggable.findById(a);return!(!s||!s.options.isEnabled||!qL(r.getState(),a))}function lke(e){var t=e.lockAPI,r=e.contextId,i=e.store,a=e.registry,s=e.draggableId,o=e.forceSensorStop,l=e.sourceEvent,c=JL({lockAPI:t,store:i,registry:a,draggableId:s});if(!c)return null;var h=a.draggable.getById(s),u=ske(r,h.descriptor.id);if(!u||l&&!h.options.canDragInteractiveElements&&ZTe(u,l))return null;var d=t.claim(o||Fs),p="PRE_DRAG";function f(){return h.options.shouldRespectForcePress}function m(){return t.isActive(d)}function g(_,C){sp({expected:_,phase:p,isLockActive:m,shouldWarn:!0})&&i.dispatch(C())}var x=g.bind(null,"DRAGGING");function v(_){function C(){t.release(),p="COMPLETED"}p!=="PRE_DRAG"&&(C(),p!=="PRE_DRAG"&&st()),i.dispatch(tEe(_.liftActionArgs)),p="DRAGGING";function E(P,T){if(T===void 0&&(T={shouldBlockNextClick:!1}),_.cleanup(),T.shouldBlockNextClick){var N=aa(window,[{eventName:"click",fn:oke,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(N)}C(),i.dispatch(AL({reason:P}))}return Z({isActive:function(){return sp({expected:"DRAGGING",phase:p,isLockActive:m,shouldWarn:!1})},shouldRespectForcePress:f,drop:function(T){return E("DROP",T)},cancel:function(T){return E("CANCEL",T)}},_.actions)}function b(_){var C=Kd(function(P){x(function(){return OL({client:P})})}),E=v({liftActionArgs:{id:s,clientSelection:_,movementMode:"FLUID"},cleanup:function(){return C.cancel()},actions:{move:C}});return Z({},E,{move:C})}function j(){var _={moveUp:function(){return x(dEe)},moveRight:function(){return x(hEe)},moveDown:function(){return x(uEe)},moveLeft:function(){return x(pEe)}};return v({liftActionArgs:{id:s,clientSelection:JTe(u),movementMode:"SNAP"}
128,cleanup:Fs,actions:_})}function w(){var _=sp({expected:"PRE_DRAG",phase:p,isLockActive:m,shouldWarn:!0});_&&t.release()}var S={isActive:function(){return sp({expected:"PRE_DRAG",phase:p,isLockActive:m,shouldWarn:!1})},shouldRespectForcePress:f,fluidLift:b,snapLift:j,abort:w};return S}var cke=[BTe,HTe,XTe];function dke(e){var t=e.contextId,r=e.store,i=e.registry,a=e.customSensors,s=e.enableDefaultSensors,o=[].concat(s?cke:[],a||[]),l=y.useState(function(){return ETe()})[0],c=Tt(function(b,j){b.isDragging&&!j.isDragging&&l.tryAbandon()},[l]);zi(function(){var b=r.getState(),j=r.subscribe(function(){var w=r.getState();c(b,w),b=w});return j},[l,r,c]),zi(function(){return l.tryAbandon},[l.tryAbandon]);for(var h=Tt(function(v){return JL({lockAPI:l,registry:i,store:r,draggableId:v})},[l,i,r]),u=Tt(function(v,b,j){return lke({lockAPI:l,registry:i,contextId:t,store:r,draggableId:v,forceSensorStop:b,sourceEvent:j&&j.sourceEvent?j.sourceEvent:null})},[t,l,i,r]),d=Tt(function(v){return ake(t,v)},[t]),p=Tt(function(v){var b=i.draggable.findById(v);return b?b.options:null},[i.draggable]),f=Tt(function(){l.isClaimed()&&(l.tryAbandon(),r.getState().phase!=="IDLE"&&r.dispatch(G0()))},[l,r]),m=Tt(l.isClaimed,[l]),g=Sn(function(){return{canGetLock:h,tryGetLock:u,findClosestDraggableId:d,findOptionsForDraggable:p,tryReleaseLock:f,isLockClaimed:m}},[h,u,d,p,f,m]),x=0;x<o.length;x++)o[x](g)}var uke=function(t){return{onBeforeCapture:t.onBeforeCapture,onBeforeDragStart:t.onBeforeDragStart,onDragStart:t.onDragStart,onDragEnd:t.onDragEnd,onDragUpdate:t.onDragUpdate}};function ud(e){return e.current||st(),e.current}function hke(e){var t=e.contextId,r=e.setCallbacks,i=e.sensors,a=e.nonce,s=e.dragHandleUsageInstructions,o=y.useRef(null),l=WL(e),c=Tt(function(){return uke(l.current)},[l]),h=wTe(t),u=NTe({contextId:t,text:s}),d=mTe(t,a),p=Tt(function(P){ud(o).dispatch(P)},[]),f=Sn(function(){return _S({publishWhileDragging:rEe,updateDroppableScroll:aEe,updateDroppableIsEnabled:sEe,updateDroppableIsCombineEnabled:oEe,collectionStarting:iEe},p)},[p]),m=yTe(),g=Sn(function(){return WEe(m,f)},[m,f]),x=Sn(function(){return dTe(Z({scrollWindow:YEe,scrollDroppable:g.scrollDroppable},_S({move:OL},p)))},[g.scrollDroppable,p]),v=vTe(t),b=Sn(function(){return VEe({announce:h,autoScroller:x,dimensionMarshal:g,focusMarshal:v,getResponders:c,styleMarshal:d})},[h,x,g,v,c,d]);o.current=b;var j=Tt(function(){var P=ud(o),T=P.getState();T.phase!=="IDLE"&&P.dispatch(G0())},[]),w=Tt(function(){var P=ud(o).getState();return P.isDragging||P.phase==="DROP_ANIMATING"},[]),S=Sn(function(){return{isDragging:w,tryAbort:j}},[w,j]);r(S);var _=Tt(function(P){return qL(ud(o).getState(),P)},[]),C=Tt(function(){return bo(ud(o).getState())},[]),E=Sn(function(){return{marshal:g,focus:v,contextId:t,canLift:_,isMovementAllowed:C,dragHandleUsageInstructionsId:u,registry:m}},[t,g,u,v,_,C,m]);return dke({contextId:t,store:b,registry:m,customSensors:i,enableDefaultSensors:e.enableDefaultSensors!==!1}),y.useEffect(function(){return j},[j]),Me.createElement(_m.Provider,{value:E},Me.createElement(z6,{context:eS,store:b},e.children))}var pke=0;function fke(){return Sn(function(){return""+pke++},[])}function Mu(e){var t=fke(),r=e.dragHandleUsageInstructions||Pp.dragHandleUsageInstructions;return Me.createElement(HNe,null,function(i){return Me.createElement(hke,{nonce:e.nonce,contextId:t,setCallbacks:i,dragHandleUsageInstructions:r,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd},e.children)})}var eF=function(t){return function(r){return t===r}},mke=eF("scroll"),gke=eF("auto"),_I=function(t,r){return r(t.overflowX)||r(t.overflowY)},vke=function(t){var r=window.getComputedStyle(t),i={overflowX:r.overflowX,overflowY:r.overflowY};return _I(i,mke)||_I(i,gke)},bke=function(){return!1},yke=function e(t){return t==null?null:t===document.body?bke()?t:null:t===document.documentElement?null:vke(t)?t:e(t.parentElement)},Zx=(function(e){return{x:e.scrollLeft,y:e.scrollTop}}),xke=function e(t){if(!t)return!1;var r=window.getComputedStyle(t);return r.position==="fixed"?!0:e(t.parentElement)},jke=(function(e){var t=yke(e),r=xke(e);return{closestScrollable:t,isFixedOnPage:r}}
128),wke=(function(e){var t=e.descriptor,r=e.isEnabled,i=e.isCombineEnabled,a=e.isFixedOnPage,s=e.direction,o=e.client,l=e.page,c=e.closest,h=(function(){if(!c)return null;var f=c.scrollSize,m=c.client,g=FL({scrollHeight:f.scrollHeight,scrollWidth:f.scrollWidth,height:m.paddingBox.height,width:m.paddingBox.width});return{pageMarginBox:c.page.marginBox,frameClient:m,scrollSize:f,shouldClipSubject:c.shouldClipSubject,scroll:{initial:c.scroll,current:c.scroll,max:g,diff:{value:Ur,displacement:Ur}}}})(),u=s==="vertical"?B0:yL,d=Bl({page:l,withPlaceholder:null,axis:u,frame:h}),p={descriptor:t,isCombineEnabled:i,isFixedOnPage:a,axis:u,isEnabled:r,client:o,page:l,frame:h,subject:d};return p}),Ske=function(t,r){var i=cL(t);if(!r||t!==r)return i;var a=i.paddingBox.top-r.scrollTop,s=i.paddingBox.left-r.scrollLeft,o=a+r.scrollHeight,l=s+r.scrollWidth,c={top:a,right:l,bottom:o,left:s},h=M0(c,i.border),u=$0({borderBox:h,margin:i.margin,border:i.border,padding:i.padding});return u},_ke=(function(e){var t=e.ref,r=e.descriptor,i=e.env,a=e.windowScroll,s=e.direction,o=e.isDropDisabled,l=e.isCombineEnabled,c=e.shouldClipSubject,h=i.closestScrollable,u=Ske(t,h),d=sf(u,a),p=(function(){if(!h)return null;var m=cL(h),g={scrollHeight:h.scrollHeight,scrollWidth:h.scrollWidth};return{client:m,page:sf(m,a),scroll:Zx(h),scrollSize:g,shouldClipSubject:c}}
128)(),f=wke({descriptor:r,isEnabled:!o,isCombineEnabled:l,isFixedOnPage:i.isFixedOnPage,direction:s,client:u,page:d,closest:p});return f}),Cke={passive:!1},Nke={passive:!0},CI=(function(e){return e.shouldPublishImmediately?Cke:Nke});function hf(e){var t=y.useContext(e);return t||st(),t}var op=function(t){return t&&t.env.closestScrollable||null};function Eke(e){var t=y.useRef(null),r=hf(_m),i=tS("droppable"),a=r.registry,s=r.marshal,o=WL(e),l=Sn(function(){return{id:e.droppableId,type:e.type,mode:e.mode}},[e.droppableId,e.mode,e.type]),c=y.useRef(l),h=Sn(function(){return jr(function(w,S){t.current||st();var _={x:w,y:S};s.updateDroppableScroll(l.id,_)})},[l.id,s]),u=Tt(function(){var w=t.current;return!w||!w.env.closestScrollable?Ur:Zx(w.env.closestScrollable)},[]),d=Tt(function(){var w=u();h(w.x,w.y)},[u,h]),p=Sn(function(){return Kd(d)},[d]),f=Tt(function(){var w=t.current,S=op(w);w&&S||st();var _=w.scrollOptions;if(_.shouldPublishImmediately){d();return}p()},[p,d]),m=Tt(function(w,S){t.current&&st();var _=o.current,C=_.getDroppableRef();C||st();var E=jke(C),P={ref:C,descriptor:l,env:E,scrollOptions:S};t.current=P;var T=_ke({ref:C,descriptor:l,env:E,windowScroll:w,direction:_.direction,isDropDisabled:_.isDropDisabled,isCombineEnabled:_.isCombineEnabled,shouldClipSubject:!_.ignoreContainerClipping}),N=E.closestScrollable;return N&&(N.setAttribute(xI.contextId,r.contextId),N.addEventListener("scroll",f,CI(P.scrollOptions))),T},[r.contextId,l,f,o]),g=Tt(function(){var w=t.current,S=op(w);return w&&S||st(),Zx(S)},[]),x=Tt(function(){var w=t.current;w||st();var S=op(w);t.current=null,S&&(p.cancel(),S.removeAttribute(xI.contextId),S.removeEventListener("scroll",f,CI(w.scrollOptions)))},[f,p]),v=Tt(function(w){var S=t.current;S||st();var _=op(S);_||st(),_.scrollTop+=w.y,_.scrollLeft+=w.x},[]),b=Sn(function(){return{getDimensionAndWatchScroll:m,getScrollWhileDragging:g,dragStopped:x,scroll:v}},[x,m,g,v]),j=Sn(function(){return{uniqueId:i,descriptor:l,callbacks:b}},[b,l,i]);zi(function(){return c.current=j.descriptor,a.droppable.register(j),function(){t.current&&x(),a.droppable.unregister(j)}},[b,l,x,j,s,a.droppable]),zi(function(){t.current&&s.updateDroppableIsEnabled(c.current.id,!e.isDropDisabled)},[e.isDropDisabled,s]),zi(function(){t.current&&s.updateDroppableIsCombineEnabled(c.current.id,e.isCombineEnabled)},[e.isCombineEnabled,s])}function Yy(){}var NI={width:0,height:0,margin:QNe},Tke=function(t){var r=t.isAnimatingOpenOnMount,i=t.placeholder,a=t.animate;return r||a==="close"?NI:{height:i.client.borderBox.height,width:i.client.borderBox.width,margin:i.client.margin}},kke=function(t){var r=t.isAnimatingOpenOnMount,i=t.placeholder,a=t.animate,s=Tke({isAnimatingOpenOnMount:r,placeholder:i,animate:a});return{display:i.display,boxSizing:"border-box",width:s.width,height:s.height,marginTop:s.margin.top,marginRight:s.margin.right,marginBottom:s.margin.bottom,marginLeft:s.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:a!=="none"?Md.placeholder:null}};function Pke(e){var t=y.useRef(null),r=Tt(function(){t.current&&(clearTimeout(t.current),t.current=null)},[]),i=e.animate,a=e.onTransitionEnd,s=e.onClose,o=e.contextId,l=y.useState(e.animate==="open"),c=l[0],h=l[1];y.useEffect(function(){return c?i!=="open"?(r(),h(!1),Yy):t.current?Yy:(t.current=setTimeout(function(){t.current=null,h(!1)}),r):Yy},[i,c,r]);var u=Tt(function(p){p.propertyName==="height"&&(a(),i==="close"&&s())},[i,s,a]),d=kke({isAnimatingOpenOnMount:c,animate:e.animate,placeholder:e.placeholder});return Me.createElement(e.placeholder.tagName,{style:d,"data-rbd-placeholder-context-id":o,onTransitionEnd:u,ref:e.innerRef})}var Ike=Me.memo(Pke),rS=Me.createContext(null),Dke=(function(e){_i(t,e);function t(){for(var i,a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];return i=e.call.apply(e,[this].concat(s))||this,i.state={isVisible:!!i.props.on,data:i.props.on,animate:i.props.shouldAnimate&&i.props.on?"open":"none"},i.onClose=function(){i.state.animate==="close"&&i.setState({isVisible:!1})},i}t.getDerivedStateFromProps=function(a,s){return a.shouldAnimate?a.on?{isVisible:!0,data:a.on,animate:"open"}:s.isVisible?{isVisible:!0,data:s.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!a.on,data:a.on,animate:"none"}};var r=t.prototype;return r.render=function(){if(!this.state.isVisible)return null;var a={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(a)},t})(Me.PureComponent),EI={dragging:5e3,dropAnimating:4500},Rke=function(t,r){return r?Md.drop(r.duration):t?Md.snap:Md.fluid}
128,Oke=function(t,r){return t?r?Jd.opacity.drop:Jd.opacity.combining:null},Ake=function(t){return t.forceShouldAnimate!=null?t.forceShouldAnimate:t.mode==="SNAP"};function Mke(e){var t=e.dimension,r=t.client,i=e.offset,a=e.combineWith,s=e.dropping,o=!!a,l=Ake(e),c=!!s,h=c?Kx.drop(i,o):Kx.moveTo(i),u={position:"fixed",top:r.marginBox.top,left:r.marginBox.left,boxSizing:"border-box",width:r.borderBox.width,height:r.borderBox.height,transition:Rke(l,s),transform:h,opacity:Oke(o,c),zIndex:c?EI.dropAnimating:EI.dragging,pointerEvents:"none"};return u}function $ke(e){return{transform:Kx.moveTo(e.offset),transition:e.shouldAnimateDisplacement?null:"none"}}function Lke(e){return e.type==="DRAGGING"?Mke(e):$ke(e)}function Fke(e,t,r){r===void 0&&(r=Ur);var i=window.getComputedStyle(t),a=t.getBoundingClientRect(),s=lL(a,i),o=sf(s,r),l={client:s,tagName:t.tagName.toLowerCase(),display:i.display},c={x:s.marginBox.width,y:s.marginBox.height},h={descriptor:e,placeholder:l,displaceBy:c,client:s,page:o};return h}function Uke(e){var t=tS("draggable"),r=e.descriptor,i=e.registry,a=e.getDraggableRef,s=e.canDragInteractiveElements,o=e.shouldRespectForcePress,l=e.isEnabled,c=Sn(function(){return{canDragInteractiveElements:s,shouldRespectForcePress:o,isEnabled:l}},[s,l,o]),h=Tt(function(f){var m=a();return m||st(),Fke(r,m,f)},[r,a]),u=Sn(function(){return{uniqueId:t,descriptor:r,options:c,getDimension:h}},[r,h,c,t]),d=y.useRef(u),p=y.useRef(!0);zi(function(){return i.draggable.register(d.current),function(){return i.draggable.unregister(d.current)}},[i.draggable]),zi(function(){if(p.current){p.current=!1;return}var f=d.current;d.current=u,i.draggable.update(u,f)},[u,i.draggable])}function Bke(e){e.preventDefault()}function qke(e){var t=y.useRef(null),r=Tt(function(P){t.current=P},[]),i=Tt(function(){return t.current},[]),a=hf(_m),s=a.contextId,o=a.dragHandleUsageInstructionsId,l=a.registry,c=hf(rS),h=c.type,u=c.droppableId,d=Sn(function(){return{id:e.draggableId,index:e.index,type:h,droppableId:u}},[e.draggableId,e.index,h,u]),p=e.children,f=e.draggableId,m=e.isEnabled,g=e.shouldRespectForcePress,x=e.canDragInteractiveElements,v=e.isClone,b=e.mapped,j=e.dropAnimationFinished;if(!v){var w=Sn(function(){return{descriptor:d,registry:l,getDraggableRef:i,canDragInteractiveElements:x,shouldRespectForcePress:g,isEnabled:m}},[d,l,i,x,g,m]);Uke(w)}var S=Sn(function(){return m?{tabIndex:0,role:"button","aria-describedby":o,"data-rbd-drag-handle-draggable-id":f,"data-rbd-drag-handle-context-id":s,draggable:!1,onDragStart:Bke}:null},[s,o,f,m]),_=Tt(function(P){b.type==="DRAGGING"&&b.dropping&&P.propertyName==="transform"&&j()},[j,b]),C=Sn(function(){var P=Lke(b),T=b.type==="DRAGGING"&&b.dropping?_:null,N={innerRef:r,draggableProps:{"data-rbd-draggable-context-id":s,"data-rbd-draggable-id":f,style:P,onTransitionEnd:T},dragHandleProps:S};return N},[s,S,f,b,_,r]),E=Sn(function(){return{draggableId:d.id,type:d.type,source:{index:d.index,droppableId:d.droppableId}}},[d.droppableId,d.id,d.index,d.type]);return p(C,b.snapshot,E)}var tF=(function(e,t){return e===t}),nF=(function(e){var t=e.combine,r=e.destination;return r?r.droppableId:t?t.droppableId:null}),Vke=function(t){return t.combine?t.combine.draggableId:null},zke=function(t){return t.at&&t.at.type==="COMBINE"?t.at.combine.draggableId:null};function Hke(){var e=jr(function(a,s){return{x:a,y:s}}),t=jr(function(a,s,o,l,c){return{isDragging:!0,isClone:s,isDropAnimating:!!c,dropAnimation:c,mode:a,draggingOver:o,combineWith:l,combineTargetFor:null}}),r=jr(function(a,s,o,l,c,h,u){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:c,combineWith:h,mode:s,offset:a,dimension:o,forceShouldAnimate:u,snapshot:t(s,l,c,h,null)}}}),i=function(s,o){if(s.isDragging){if(s.critical.draggable.id!==o.draggableId)return null;var l=s.current.client.offset,c=s.dimensions.draggables[o.draggableId],h=Vi(s.impact),u=zke(s.impact),d=s.forceShouldAnimate;return r(e(l.x,l.y),s.movementMode,c,o.isClone,h,u,d)}if(s.phase==="DROP_ANIMATING"){var p=s.completed;if(p.result.draggableId!==o.draggableId)return null;var f=o.isClone,m=s.dimensions.draggables[o.draggableId],g=p.result,x=g.mode,v=nF(g),b=Vke(g),j=s.dropDuration,w={duration:j,curve:Y0.drop,moveTo:s.newHomeClientOffset,opacity:b?Jd.opacity.drop:null,
128scale:b?Jd.scale.drop:null};return{mapped:{type:"DRAGGING",offset:s.newHomeClientOffset,dimension:m,dropping:w,draggingOver:v,combineWith:b,mode:x,forceShouldAnimate:null,snapshot:t(x,f,v,b,w)}}}return null};return i}function rF(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var Gke={mapped:{type:"SECONDARY",offset:Ur,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:rF(null)}};function Wke(){var e=jr(function(o,l){return{x:o,y:l}}),t=jr(rF),r=jr(function(o,l,c){return l===void 0&&(l=null),{mapped:{type:"SECONDARY",offset:o,combineTargetFor:l,shouldAnimateDisplacement:c,snapshot:t(l)}}}),i=function(l){return l?r(Ur,l,!0):null},a=function(l,c,h,u){var d=h.displaced.visible[l],p=!!(u.inVirtualList&&u.effected[l]),f=xm(h),m=f&&f.draggableId===l?c:null;if(!d){if(!p)return i(m);if(h.displaced.invisible[l])return null;var g=uc(u.displacedBy.point),x=e(g.x,g.y);return r(x,m,!0)}if(p)return i(m);var v=h.displacedBy.point,b=e(v.x,v.y);return r(b,m,d.shouldAnimate)},s=function(l,c){if(l.isDragging)return l.critical.draggable.id===c.draggableId?null:a(c.draggableId,l.critical.draggable.id,l.impact,l.afterCritical);if(l.phase==="DROP_ANIMATING"){var h=l.completed;return h.result.draggableId===c.draggableId?null:a(c.draggableId,h.result.draggableId,h.impact,h.afterCritical)}return null};return s}var Yke=function(){var t=Hke(),r=Wke(),i=function(s,o){return t(s,o)||r(s,o)||Gke};return i},Kke={dropAnimationFinished:ML},Xke=le(Yke,Kke,null,{context:eS,pure:!0,areStatePropsEqual:tF})(qke);function iF(e){var t=hf(rS),r=t.isUsingCloneFor;return r===e.draggableId&&!e.isClone?null:Me.createElement(Xke,e)}function $u(e){var t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,r=!!e.disableInteractiveElementBlocking,i=!!e.shouldRespectForcePress;return Me.createElement(iF,Z({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:r,shouldRespectForcePress:i}))}function Qke(e){var t=y.useContext(_m);t||st();var r=t.contextId,i=t.isMovementAllowed,a=y.useRef(null),s=y.useRef(null),o=e.children,l=e.droppableId,c=e.type,h=e.mode,u=e.direction,d=e.ignoreContainerClipping,p=e.isDropDisabled,f=e.isCombineEnabled,m=e.snapshot,g=e.useClone,x=e.updateViewportMaxScroll,v=e.getContainerForClone,b=Tt(function(){return a.current},[]),j=Tt(function(N){a.current=N},[]);Tt(function(){return s.current},[]);var w=Tt(function(N){s.current=N},[]),S=Tt(function(){i()&&x({maxScroll:BL()})},[i,x]);Eke({droppableId:l,type:c,mode:h,direction:u,isDropDisabled:p,isCombineEnabled:f,ignoreContainerClipping:d,getDroppableRef:b});var _=Me.createElement(Dke,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},function(N){var k=N.onClose,I=N.data,D=N.animate;return Me.createElement(Ike,{placeholder:I,onClose:k,innerRef:w,animate:D,contextId:r,onTransitionEnd:S})}),C=Sn(function(){return{innerRef:j,placeholder:_,droppableProps:{"data-rbd-droppable-id":l,"data-rbd-droppable-context-id":r}}},[r,l,_,j]),E=g?g.dragging.draggableId:null,P=Sn(function(){return{droppableId:l,type:c,isUsingCloneFor:E}},[l,E,c]);function T(){if(!g)return null;var N=g.dragging,k=g.render,I=Me.createElement(iF,{draggableId:N.draggableId,index:N.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(D,O){return k(D,O,N)});return H6.createPortal(I,v())}return Me.createElement(rS.Provider,{value:P},o(C,m),T())}var Ky=function(t,r){return t===r.droppable.type},TI=function(t,r){return r.draggables[t.draggable.id]},Zke=function(){var t={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},r=Z({},t,{shouldAnimatePlaceholder:!1}),i=jr(function(o){return{draggableId:o.id,type:o.type,source:{index:o.index,droppableId:o.droppableId}}}),a=jr(function(o,l,c,h,u,d){var p=u.descriptor.id,f=u.descriptor.droppableId===o;if(f){var m=d?{render:d,dragging:i(u.descriptor)}:null,g={isDraggingOver:c,draggingOverWith:c?p:null,draggingFromThisWith:p,isUsingPlaceholder:!0};return{placeholder:u.placeholder,shouldAnimatePlaceholder:!1,snapshot:g,useClone:m}}if(!l)return r;if(!h)return t;var x={isDraggingOver:c,draggingOverWith:p,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:u.placeholder,shouldAnimatePlaceholder:!0,snapshot:x,useClone:null}}),s=function(l,c){var h=c.droppableId,u=c.type,d=!c.isDropDisabled,p=c.renderClone;if(l.isDragging){var f=l.critical;if(!Ky(u,f))return r;var m=TI(f,l.dimensions),g=Vi(l.impact)===h;return a(h,d,g,g,m,p)}if(l.phase==="DROP_ANIMATING"){var x=l.completed;if(!Ky(u,x.critical))return r;var v=TI(x.critical,l.dimensions);return a(h,d,nF(x.result)===h,Vi(x.impact)===h,v,p)}if(l.phase==="IDLE"&&l.completed&&!l.shouldFlush){var b=l.completed;if(!Ky(u,b.critical))return r;var j=Vi(b.impact)===h,w=!!(b.impact.at&&b.impact.at.type==="COMBINE"),S=b.critical.droppable.
128id===h;return j?w?t:r:S?t:r}return r};return s},Jke={updateViewportMaxScroll:cEe};function ePe(){return document.body||st(),document.body}var tPe={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:ePe},fc=le(Zke,Jke,null,{context:eS,pure:!0,areStatePropsEqual:tF})(Qke);fc.defaultProps=tPe;function nPe(e){const{index:t,isDragging:r,arrayHelpers:i}=e;return n.jsx(n.Fragment,{children:n.jsx($u,{draggableId:(t+1).toString(),index:t,children:(a,s)=>n.jsx("div",{className:`drag-drop-section-editor-wrapper${r?" droppable":""}`,...a.draggableProps,ref:a.innerRef,style:{...a.draggableProps.style},"diagnostic-id":"drag-drop-section-editor-wrapper",children:n.jsxs("div",{className:`drag-drop-section-editor${s.isDragging?" is-dragging":" draggable"}`,id:"drag-drop-section-editor","diagnostic-id":"drag-drop-section-editor",children:[n.jsx("div",{className:"section-editor-drag-handle",...a.dragHandleProps,children:n.jsx("i",{className:"material-icons drag-icon",children:"open_with"})}),n.jsxs("div",{className:"section-editor-group","diagnostic-id":"section-editor-group",children:[n.jsxs("div",{className:"authors-label-group",children:[n.jsx("label",{children:"Author Full Name and Credentials"}),n.jsx("div",{className:"author-info-textarea-wrapper",children:n.jsx(me,{id:"authors-textarea",as:"textarea",name:`authors.${t}.author_full_name`,maxLength:"50",placeholder:"e.g. John Doe, CFA"})})]}),n.jsxs("div",{className:"authors-label-group",children:[n.jsx("label",{children:"Job Title (Optional)"}),n.jsx("div",{className:"author-info-textarea-wrapper",children:n.jsx(me,{id:"authors-textarea",as:"textarea",name:`authors.${t}.author_title`,maxLength:"240",placeholder:"Job Title"})})]})]}),n.jsx("button",{type:"button",onClick:()=>i.remove(t),className:"delete-btn","diagnostic-id":"delete-btn",children:n.jsx("i",{className:"material-icons",children:"delete"})})]})})},t+1)})}const rPe=e=>({userId:e.auth.user&&e.auth.user.id}),iPe=le(rPe,{})(nPe);function aPe(e){const{modal:t,setModal:r,handleCancel:i,authors:a,editAuthors:s,itemId:o,userId:l,title:c,setOrderStatus:h,isWorkspaceDirty:u,isInsightsMedia:d}=e,[p,f]=y.useState(a||[]),[m,g]=y.useState(!1),[x,v]=y.useState(!1),b=()=>{g(!m)},j=async(w,S)=>{w.destination||g(!1);const{source:_,destination:C}=w;b();const E=_?.index,P=C?.index,T=Array.from(S);if((P||P===0)&&P!==E){const[N]=T.splice(E,1);T.splice(P,0,N),f(T),v(JSON.stringify(a||[])!==JSON.stringify(T)),h(JSON.stringify(a||[])!==JSON.stringify(T))}};return n.jsx(ot,{setModal:r,disableClickOutsideCancel:!0,children:n.jsxs("div",{className:"edit-cp-drag-drop-modal-container",children:[n.jsx("i",{className:"material-icons",onClick:()=>i(),children:"close"}),n.jsx("h5",{children:d?"Edit Insights Media Authors":"Edit Commentary Authors"}),n.jsxs("p",{children:["List up to 3 authors for this"," ",d?"insights media.":"commentary."]}),n.jsx(gt,{initialValues:{authors:p},onSubmit:(w,{setSubmitting:S})=>{s(o,l,w.authors).then(()=>{i(!0),S(!1)})},enableReinitialize:!0,children:({values:w,touched:S,errors:_,dirty:C,isSubmitting:E,setFieldError:P,setFieldValue:T})=>{const N=w.authors?.length>0&&w.authors.some((k,I)=>!k.author_full_name);return C!==e.isDirty&&!u&&e.setDirty(C),n.jsxs(vt,{onClick:k=>k.stopPropagation(),children:[n.jsx("div",{className:"section-editor-wrapper",children:n.jsx(Mu,{onDragEnd:k=>j(k,w.authors),onDragStart:()=>g(!0),children:n.jsx(fc,{droppableId:"droppable",children:(k,I)=>n.jsx(fu,{name:"authors",render:D=>n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"droppable-container",...k.droppableProps,ref:k.innerRef,children:[w.authors?.map((O,$)=>n.jsx(iPe,{editorItem:O,isDragging:m,index:$,arrayHelpers:D},$)),k.placeholder]}),n.jsx("div",{id:"add-subsections-group",children:n.jsxs("button",{type:"button",id:"subsection-new",className:"new-subsection-row","diagnostic-id":"subsection-new-btn",onClick:O=>D.push({author_full_name:"",author_title:""}),disabled:w.authors&&w.authors.length>=3,children:[n.jsx("i",{className:"material-icons",children:"add"}),"Add an Author"]})})]})})})})}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>i(),children:"Cancel"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",disabled:!x&&!C||!!Object.keys(_).length||!w.authors||N||E,children:"Save"})]})]})}})]})})}const sPe=e=>({userId:e.auth.user.id,pageType:e.spotlight&&e.spotlight.pageType,partnerPermissions:e.auth&&e.auth.user&&e.auth.user.company.partner_permissions}),aF=le(sPe,{})(aPe);function oPe(e){const[t,r]=y.useState("publication-pdf"),[i,a]=y.useState(!1),[s,o]=y.useState(!1),[l,c]=y.useState(""),[h,u]=y.useState(!0),d=oc[u$],p=n.jsx(Mo,{id:"composer-export-help",helpAttrs:d}),f=x=>{a(!0),e.exportClientPiece(e.userId,e.cpId,[t],"file").then(v=>{const b=v.headers["content-disposition"].split("filename=")[1].slice(1,-1),j=URL.createObjectURL(v.data),w=document.createElement("a");
128w.href=j,w.setAttribute("download",b),document.body.appendChild(w),w.click(),document.body.removeChild(w),URL.revokeObjectURL(j),a(!1),v.status===200&&e.getClientPiece(e.cpId,e.userId).then(()=>{e.createMessage({alertMessage:"Commentary Exported"})}),e.setModal(!1)}).catch(v=>{v.message!==Ue&&e.createMessage({serverError:"There was a problem exporting this commentary, please try again"}),a(!1)})},m=x=>{r(x.target.value)};y.useEffect(()=>{(t==="simple-web-html"||t==="simple-email-html"||t==="simple-minimal-email-html")&&(u(!0),e.copyToClipBoard(e.userId,e.cpId,[t],"plaintext").then(x=>{c(x.data.data),x.status===200&&u(!1)}))},[t]);const g=x=>{o(!0),setTimeout(()=>{navigator.clipboard.writeText(l),o(!1),s||e.createMessage({alertMessage:"Commentary HTML Copied to Clipboard"})},750)};return n.jsx(ot,{setModal:e.setModal,children:n.jsxs("div",{className:"export-modal-container","diagnostic-id":"export-modal",children:[n.jsxs("div",{className:"export-modal-header",children:[n.jsx("h5",{children:"Export Your Commentary"}),p]}),n.jsx("p",{children:"Please select an export format:"}),n.jsx("div",{className:"form-group",children:n.jsxs("div",{className:"dropdown-container",children:[n.jsx(gt,{initialValues:{exportType:""},onSubmit:()=>{},children:x=>n.jsx(vt,{children:n.jsxs(me,{as:"select",name:"exportType",onChange:m,value:t,children:[n.jsx("option",{value:"publication-pdf",children:"Publish a PDF (.pdf)"}),n.jsx("option",{value:"simple-docx",children:"Save as a Word document (.docx)"}),n.jsx("option",{value:"simple-web-html",children:"Save as HTML for the web (.html)"}),n.jsx("option",{value:"simple-email-html",children:"Save as HTML for styled email (.html)"}),n.jsx("option",{value:"simple-minimal-email-html",children:"Save as HTML for unstyled email (.html)"})]})})}),n.jsx(dt,{icon:Mt})]})}),n.jsx("div",{className:"export-message-container",children:t==="publication-pdf"?"*PDF layouts may require finishing touches that Word and html formats don't. Please contact us if we can be of assistance":t==="simple-web-html"||t==="simple-email-html"||t==="simple-minimal-email-html"?n.jsxs("button",{className:"btn-secondary",id:"copy-html-btn",onClick:g,disabled:s||h,children:[s&&n.jsx("div",{id:"spinner-icon-container",children:n.jsx(ur,{size:"1.25em",thickness:8,variant:"indeterminate"})}),s?"":n.jsxs("div",{className:"copy-html-btn-text",children:[n.jsx("i",{className:"material-icons",children:"content_paste"}),"Copy HTML To Clipboard"]})]}):""}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>e.setModal(!1),children:"CANCEL"}),n.jsxs("button",{type:"button",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",onClick:f,disabled:i,children:[i?n.jsx("div",{id:"spinner-icon-container",children:n.jsx(ur,{size:"1.25em",thickness:8,variant:"indeterminate"})}):"",i?"":"EXPORT"]})]})]})})}const lPe=e=>({sections:e.composer.piece.sections,composer:e.composer,userId:e.auth.user&&e.auth.user.id,cpId:e.composer.piece.id}),cPe=le(lPe,{exportClientPiece:i$,createMessage:he,getClientPiece:Tu,copyToClipBoard:Abe})(oPe);function dPe(e){const{setDirty:t,isDirty:r,composerPiece:i,setScrim:a,displayAuthorName:s,firstName:o,lastName:l,professionalCredentials:c,corporateTitle:h,displayProfilePic:u,profilePicture:d,title:p,authorType:f,authors:m,attachedPdfUrl:g,editAccompanyingPdf:x,userId:v,canUsePartner:b,allowPartner:j,isComposerDirty:w,setOrderStatus:S,inEditMode:_,setInEditMode:C,remixClientPiece:E,changeHeader:P,setChangeHeader:T,getClientPiece:N,revertClientPiece:k,editClientPieceAuthor:I,setDismissError:D,isProcessing:O,setIsProcessing:$,setFillBar:U,canRemixClientPiece:B,hedwigPermissions:L,user:A}=e,[R,F]=y.useState(!1),[q,V]=y.useState(!1),[X,M]=y.useState(!1),[W,K]=y.useState(!1),[z,Y]=y.useState(!1),[ie,ne]=y.useState(!1),[ve,pe]=y.useState(!1),[be,ye]=y.useState(!1),[ke,fe]=y.useState(s),[se,ge]=y.useState(!1),[De,ae]=y.useState({complexity:i?.remix_complexity==="default"?100:0,length:i?.remix_length==="default"?100:0}),[Q,ee]=y.useState({complexity:i?.remix_complexity,length:i?.remix_length}),[oe,Pe]=y.useState(!1),[Fe,Ie]=y.useState(!1),[Re,Ve]=y.useState(!1),Xe="commentaries",{Processing:et,Failed:rt}=Lj,{Enabled:bt,Disabled:Qe}=_n,{Community:tt,SponsoredCommunity:We}=Br,pt=A?.account_permissions?.name===tt||A?.account_permissions?.name===We,Et=i.engage_shared?.some(yt=>yt.is_enabled),Ot=oc[d$],kt=n.jsx(Mo,{id:"composer-workspace-help",helpAttrs:Ot}),Pt=()=>{F(!0),a(!0)};y.useEffect(()=>{t(w)},[w]),y.useEffect(()=>(window.addEventListener("keyup",yt=>$n(yt,Fe,Ie)),()=>{window.removeEventListener("keyup",yt=>$n(yt,Fe,Ie))}),[Fe]);const Ut=yt=>
128{const Wt="Changes you made may not be saved.";W?(r||w)&&!yt?(window.confirm(Wt)&&K(!1),S(!1),t(!1)):(K(!1),t(!1)):z?(r||w)&&!yt?(window.confirm(Wt)&&Y(!1),S(!1),t(!1)):(Y(!1),t(!1)):R&&(F(!1),a(!1),t(!1))},Nn=()=>{ye(!1),D(!1),U(!1),ge(!1),E(v,i.id,Q.complexity,Q.length).then(yt=>{yt.status===202?$(!0):yt.status===403&&Pe(!0)})},$t=()=>{k(v,i?.id).then(()=>{pe(!1),C(!1)}).then(()=>{N(i.id,v)})},pn=ie&&n.jsx(ot,{setModal:ne,children:n.jsxs("div",{className:"pdf-upload-modal-container remove-pdf","diagnostic-id":"remove-pdf-modal-container",children:[n.jsx("h5",{children:"Remove PDF"}),n.jsx("p",{className:"remove-pdf-msg",children:"Are you sure you want to remove this PDF?"}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>ne(!1),children:"Cancel"}),n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",onClick:()=>{x(i?.id,v,null).then(()=>ne(!1))},children:"Remove"})]})]})}),nn=ve&&n.jsx(ot,{setModal:ne,children:n.jsxs("div",{className:"make-unique-cp-modal-container revert","diagnostic-id":"revert-cp-modal-container",children:[n.jsx("h5",{children:"Revert Commentary"}),n.jsx("p",{className:"revert-cp-msg",children:"Are you sure you want to revert this commentary to the original?"}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>pe(!1),children:"Cancel"}),n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",onClick:$t,children:"Revert"})]})]})}),Rn=yt=>{const Wt=parseInt(yt.target.value);ae({...De,[yt.target.id]:Wt});const Lt=yt.target.id==="complexity"?"simpler":yt.target.id==="length"?"shorter":"";ee({...Q,[yt.target.id]:Wt>50?"default":Lt})},fn=yt=>{Ve(!0),e.exportClientPiece(v,i.id,["simple-docx"],"file").then(Wt=>{const Lt=Wt.headers["content-disposition"].split("filename=")[1].slice(1,-1),qr=URL.createObjectURL(Wt.data),Gn=document.createElement("a");Gn.href=qr,Gn.setAttribute("download",Lt),document.body.appendChild(Gn),Gn.click(),document.body.removeChild(Gn),URL.revokeObjectURL(qr),Ve(!1),Wt.status===200&&N(i.id,v).then(()=>{e.createMessage({alertMessage:"Commentary Exported"})})}).catch(Wt=>{Wt.message!==Ue&&e.createMessage({serverError:"There was a problem exporting this commentary, please try again"}),Ve(!1)})},ht=be&&n.jsx(ot,{setModal:ye,children:n.jsxs("div",{className:"make-unique-cp-modal-container remix","diagnostic-id":"remix-cp-modal-container",children:[n.jsx("h5",{children:"Remix Commentary"}),n.jsx("p",{className:"remix-cp-msg",children:"Remixing this commentary will reword the title and text"}),n.jsxs("div",{className:"advanced-settings-container",children:[n.jsxs("div",{className:"advanced-settings-header",children:[n.jsx("i",{className:"material-icons",children:"settings"}),"Advanced Settings"]}),n.jsxs(n.Fragment,{children:[n.jsx("p",{children:"Customize the complexity and length of your commentary"}),n.jsxs("div",{className:"setting-wrapper",children:[n.jsx("h5",{children:"Complexity"}),n.jsxs("div",{className:"slider-container",children:[n.jsxs("div",{className:"slider-labels",children:[n.jsx("span",{className:De.complexity<50?"selected":"",children:"Simpler"}),n.jsx("span",{className:De.complexity>=50?"selected":"",children:"Default"})]}),n.jsxs("div",{className:`range-tick-container${De.complexity===0?" hide-left":De.complexity===100?" hide-right":""}`,children:[n.jsx("div",{className:"range-tick left"}),n.jsx("div",{className:"range-tick right"})]}),n.jsx("input",{type:"range",min:"0",max:"100",value:De.complexity,onChange:Rn,className:"slider",step:"1",id:"complexity"})]})]}),n.jsxs("div",{className:"setting-wrapper length",children:[n.jsx("h5",{children:"Length"}),n.jsxs("div",{className:"slider-container",children:[n.jsxs("div",{className:"slider-labels",children:[n.jsx("span",{className:De.length<50?"selected":"",children:"Shorter"}),n.jsx("span",{className:De.length>=50?"selected":"",children:"Default"})]}),n.jsxs("div",{className:`range-tick-container${De.length===0?" hide-left":De.length===100?" hide-right":""}`,children:[n.jsx("div",{className:"range-tick left"}),n.jsx("div",{className:"range-tick right"})]}),n.jsx("input",{type:"range",min:"0",max:"100",value:De.length,onChange:Rn,className:"slider",step:"1",id:"length"})]})]})]})]}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>ye(!1),children:"Cancel"}),n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",onClick:Nn,children:"Remix"})]})]})}),jt=n.jsx(ot,{setModal:Ie,children:n.jsxs("div",{className:"info-modal-container","diagnostic-id":"describe-assistant-info-modal-container",children:[n.jsx("div",{className:"info-modal-header-icon",children:n.jsx("i",{className:"material-symbols-outlined",children:"help_outline"})}),n.jsx("h5",{className:"how-to-header",children:"Remix your commentary"}),n.jsx("p",{children:"Remix creates your own unique commentary. It will generate a fresh title and rephrase the content of the commentary, allowing you to share differentiated insights with your clients and prospects. After remixing, you can personalize and edit the piece further."}),n.jsx("div",{className:"buttons",children:n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>{Ie(!1)},children:"CLOSE"})})]})}),sn=n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"composer-title-container",children:[n.jsxs("div",{className:"composer-title-left",children:[n.jsx("div",{className:"title-group",children:n.jsxs("div",{className:"composer-title-edit",children:[n.jsxs("div",{id:"composer-title-name",children:[p,i.engage_shared?.length>
1280?n.jsx("div",{className:"card-shared-container",children:n.jsx("div",{className:`card-shared-pill ${Et?"shared-live":"shared-off"}`,onClick:()=>M(!0),"diagnostic-id":"card-shared-pill",children:Et?"Sharing: Live":"Sharing: Off"})}):n.jsx(n.Fragment,{}),kt]}),n.jsx(Ke,{title:_?"":"Start editing the commentary to change the title and settings",placement:"top",children:n.jsx("span",{children:n.jsxs("button",{className:"btn-primary-icon-text","diagnostic-id":"header-edit-btn",onClick:Pt,disabled:!_,children:[n.jsx("i",{className:"material-icons",children:"edit"}),"Edit Title and Settings"]})})})]})}),n.jsxs("div",{id:"composer-title-tag",children:[n.jsx("span",{children:i.export_datetime&&i.export_datetime>i.update_datetime?"Last exported ":"Last edited "}),n.jsx(gn,{local:!0,format:"MMM D, YYYY h:mma",children:i.export_datetime&&i.export_datetime>i.update_datetime?i.export_datetime:i.update_datetime})," ",new Date().toLocaleTimeString("en-us",{timeZoneName:"short"}).split(" ")[2]]}),n.jsx(wn,{hasPermission:j&&b,children:g?n.jsxs("div",{id:"composer-pdf-view",children:[n.jsxs("div",{className:"view-pdf-grp",children:[n.jsx("div",{className:"accompany-pdf-msg",children:"Accompanying PDF"}),n.jsx("a",{href:g,target:"_blank",rel:"noopener noreferrer",children:n.jsx("button",{className:"btn btn-primary-icon-text view-pdf-btn","diagnostic-id":"view-composer-pdf-btn",children:"VIEW PDF"})})]}),n.jsx("i",{className:"material-icons",onClick:()=>ne(!0),children:"close"})]}):n.jsx("div",{id:"composer-add-pdf",children:n.jsxs("button",{type:"button",className:"new-pdf-btn","diagnostic-id":"new-pdf-btn",onClick:()=>Y(!0),children:[n.jsx("i",{className:"material-icons",children:"add"}),"Add An Accompanying PDF"]})})})]}),n.jsx("div",{className:"composer-title-right",children:n.jsx("div",{id:"composer-download",children:n.jsx(Ke,{title:i.sections.length===0?"Add content to export this commentary":"",placement:"top",children:n.jsx("div",{children:n.jsx("button",{className:"btn-primary-icon"+(i.sections.length===0?" empty":""),"diagnostic-id":"export-btn",onClick:yt=>{pt?fn():V(!0)},disabled:i.sections.length===0||Re,children:n.jsx("span",{className:"btn-icon-text",children:Re?n.jsx("div",{id:"spinner-icon-container",children:n.jsx(ur,{size:"1.25em",thickness:8,variant:"indeterminate"})}):n.jsxs(n.Fragment,{children:[n.jsx("i",{className:"material-icons-outlined",children:"file_download"}),"EXPORT"]})})})})})})})]}),!ke||!s&&!u?n.jsx(wn,{hasPermission:L?.allow_remix_clientpiece===Qe||!B||!i?.can_remix,children:n.jsx("div",{className:"start-edit-btn",children:n.jsx("div",{id:"composer-start-edit",children:n.jsx("button",{className:`btn-primary-icon${_?" stop-btn":" edit-btn"}`,"diagnostic-id":"start-stop-edit-btn",onClick:()=>C(!_),children:n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"material-icons-outlined",children:"edit"}),_?"STOP EDITING":"START EDITING"]})})})})}):n.jsxs("div",{className:"composer-subheader-container",children:[n.jsx("div",{className:"composer-author-info-container fadeTransition",children:f==="default"?s?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"authored-by-header",children:"Authored by"}),n.jsxs("div",{className:"composer-profile-wrapper",children:[ke&&u&&d&&n.jsx("img",{src:d,alt:""}),s&&n.jsxs("div",{className:"composer-author-name",children:[n.jsx("span",{children:`${o} ${l}${c?", "+c:""}`}),h&&n.jsx("div",{className:"author-job-title",children:h})]})]})]}):n.jsx(n.Fragment,{children:u&&d&&n.jsx("div",{className:"composer-profile-wrapper",children:n.jsx("img",{src:d,alt:""})})}):n.jsx(n.Fragment,{children:s&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"authored-by-header",children:"Authored by"}),n.jsx("div",{className:"composer-profile-wrapper custom",children:m?.map((yt,Wt)=>n.jsxs("div",{className:"composer-author-name",children:[n.jsx("span",{children:yt.author_full_name}),yt.author_title&&n.jsx("div",{className:"author-job-title",children:yt.author_title})]},Wt))}),n.jsxs("button",{className:"btn-primary-icon-text","diagnostic-id":"author-edit-btn",onClick:()=>K(!0),children:[n.jsx("i",{className:"material-symbols-outlined",children:"person_edit"}),(m?.length??0)===0?"Add Authors":"Edit Authors"]})]})})}),n.jsx(wn,{hasPermission:L?.allow_remix_clientpiece===Qe||!B||!i?.can_remix,children:n.jsx("div",{className:"start-edit-btn",children:n.jsx("div",{id:"composer-start-edit",children:n.jsx("button",{className:`btn-primary-icon${_?" stop-btn":" edit-btn"}`,"diagnostic-id":"start-stop-edit-btn",onClick:()=>C(!_),children:n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"material-icons-outlined",children:"edit"}),_?"STOP EDITING":"START EDITING"]})})})})})]}),n.jsx(wn,{hasPermission:L?.allow_remix_clientpiece===bt&&B&&i?.can_remix,children:n.jsx("div",{className:"composer-make-unique-wrapper",children:n.jsxs("div",{className:"composer-make-unique-group",children:[n.jsx("h4",{className:"make-unique-header",children:"Personalize"}),n.jsx("div",{className:"make-unique-text",children:"Make this commentary your own. Remixing will generate a new title and reword the body of the commentary. After remixing you can freely edit the piece."}),n.jsxs("div",{className:"remix-btns",children:[n.jsxs("div",{className:"remix-btn-grp",children:[n.jsxs("div",{className:"remix-revert-btns",children:[n.jsx(Ke,{title:i?.remix_status===et||_||!i?.is_remix_allowed?"Revert to the original commentary to use the remix button":"",placement:"top",children:n.jsx("span",{children:n.jsx("button",{className:"btn btn-primary-icon composer-remix-btn",type:"button","diagnostic-id":"composer-remix-btn",disabled:i?.remix_status===et||_||!i?.is_remix_allowed,onClick:()=>ye(!0),children:n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"material-icons-outlined",children:"flash_on"}),"REMIX"]})})})}),n.jsx("div",{id:"composer-revert",children:n.jsx("button",{className:"btn-primary-icon composer-revert-btn","diagnostic-id":"composer-revert-btn",disabled:i?.is_remix_allowed||i?.remix_status===et||O,onClick:()=>pe(!0),children:n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"material-symbols-outlined",children:"replay"}),"REVERT"]}
128)})})]}),n.jsxs("button",{type:"button","diagnostic-id":"instructions-btn",className:"btn-primary-text btn-icon-text instructions-btn",onClick:()=>Ie(!0),children:[n.jsx("i",{className:"material-icons help-icon","diagnostic-id":"help-icon",children:"help_outline"}),"Instructions"]})]}),n.jsx("div",{className:"start-edit-revert-btns",children:n.jsx("div",{id:"composer-start-edit",children:n.jsx("button",{className:`btn-primary-icon${_?" stop-btn":" edit-btn"}`,"diagnostic-id":"start-stop-edit-btn",onClick:()=>C(!_),disabled:O||i?.remix_status===et,children:n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"material-icons-outlined",children:"edit"}),_?"STOP EDITING":"START EDITING"]})})})})]})]})})})]}),rn=n.jsx(ANe,{cpId:i?.id,title:i?.title,handleCancel:Ut,isDirty:r,setDirty:t,display:ke,setDisplay:fe});return n.jsxs("div",{className:"composer-header"+(R?" edit":""),children:[R?rn:sn,q&&n.jsx(cPe,{setModal:V}),X&&n.jsx(nl,{modal:X,setModal:M,contentShared:i.engage_shared,sharedType:Xe}),W&&n.jsx(aF,{modal:W,setModal:K,handleCancel:Ut,authors:m,itemId:i?.id,title:i?.title,isDirty:r,setDirty:t,editAuthors:I,setOrderStatus:S,isWorkspaceDirty:w}),z&&n.jsx(LNe,{modal:z,setModal:Y,handleCancel:Ut,currentAttachedPdf:i?.attached_pdf_url,cpId:i?.id,isDirty:r,setDirty:t}),pn,nn,ht,oe&&n.jsx(Jf,{modal:oe,setModal:Pe}),Fe&&jt]})}const uPe=e=>({displayAuthorName:e.composer.piece?.author_name,displayProfilePic:e.composer.piece?.profile_picture,firstName:e.auth.user.first_name,lastName:e.auth.user.last_name,professionalCredentials:e.auth.user.professional_credentials,corporateTitle:e.auth.user.corporate_title,profilePicture:e.auth.user.profile_picture_url,title:e.composer.piece?.title,authorType:e.composer&&e.composer.piece&&e.composer.piece.author_type,authors:e.composer&&e.composer.piece&&e.composer.piece.authors,attachedPdfUrl:e.composer&&e.composer.piece&&e.composer.piece.attached_pdf_url,userId:e.auth&&e.auth.user&&e.auth.user.id,canUsePartner:e.auth&&e.auth.user&&e.auth.user.can_use_partner,allowPartner:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.partner_permissions&&e.auth.user.company.partner_permissions.allow_partner,isComposerDirty:e.composer.isDirty,canRemixClientPiece:e.auth&&e.auth.user&&e.auth.user.can_remix_clientpiece,hedwigPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.hedwig_permissions,user:e.auth&&e.auth.user}),hPe=le(uPe,{setScrim:hn,editAccompanyingPdf:r$,setOrderStatus:Ube,remixClientPiece:Ebe,getClientPiece:Tu,revertClientPiece:Tbe,editClientPieceAuthor:Obe,exportClientPiece:i$,createMessage:he})(dPe),pPe=e=>{const{modal:t,setModal:r,handleCancel:i,currentImage:a,addSection:s,userId:o,cpId:l,index:c,editClientPieceSection:h,editModal:u,section:d,clientPieceLimits:p}=e,[f,m]=y.useState(null),g=f||a,x=(v,b,j,w,S,_)=>{const C=p.image_size_limit,E=Math.round(C/(1024*1024));v===void 0?(m(null),delete j.imageFile,delete b.imageFile):Bo(v)?v&&v.size>C?(m(null),_(`${w}File`,void 0,!1),S(w+"File",`That file is larger than ${E}MB. Please use a smaller file or contact us for help.`)):(m(URL.createObjectURL(v)),_(`${w}File`,v),delete b.imageFile):S(w+"File","Image must be a PNG or JPG/JPEG file.")};return n.jsx(ot,{setModal:r,children:n.jsxs("div",{className:"image-upload-modal-container","diagnostic-id":"composer-img-upload-modal-container",children:[n.jsx("i",{className:"material-icons",onClick:i,children:"close"}),n.jsx(gt,{initialValues:{imageFile:void 0},onSubmit:(v,{setSubmitting:b})=>{u?h(o,l,d.id,null,"image",null,null,v.imageFile).then(()=>{i(),b(!1)}):s(o,l,null,"image",null,c,v.imageFile).then(()=>{i(),b(!1)})},enableReinitialize:!0,children:({values:v,touched:b,errors:j,dirty:w,isSubmitting:S,setFieldError:_,setFieldValue:C})=>(w!==e.isDirty&&e.setDirty(w),n.jsxs(vt,{onClick:E=>E.stopPropagation(),children:[n.jsx("h5",{children:"Upload an image"}),n.jsx("p",{className:"choose-image-msg",children:"Choose a .jpg, .jpeg, or .png image"}),j.imageFile&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:j.imageFile}
128),n.jsx("input",{id:"imageFile","diagnostic-id":"image-input",name:"imageFile",type:"file",accept:"image/png,image/x-png,image/jpeg,image/jpg",onChange:E=>{x(E.currentTarget.files[0],j,v,"image",_,C)},className:j.imageFile&&b.imageFile?"text-input error":"file-path validate"}),n.jsxs("div",{className:`img-upload-grp${g?" with-img":" without-img"}`,children:[n.jsx(Eo,{id:"imageFile",diagId:"image-upload-drag-drop-input",name:"imageFile",acceptedTypes:"image/png,image/x-png,image/jpeg,image/jpg",onChange:E=>{x(E.currentTarget.files[0],j,v,"image",_,C)},className:`drag-drop-input${j.imageFile&&b.imageFile?" text-input error":" file-path validate"}`}),g?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"image-group",children:n.jsx("img",{alt:"uploaded-img",src:g})}),f&&n.jsx("button",{id:"clear-btn",type:"button",onClick:()=>{x(void 0,j,v,"image",_,C)},children:"Undo"})]}):n.jsxs("div",{className:"image-group-placeholder",children:[n.jsx("i",{className:"material-icons",children:"panorama"}),n.jsx("p",{children:"Drag and drop an image file here, or click to select a file to upload"})]})]}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:i,children:"Cancel"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",disabled:!f,children:"Save"})]})]}))})]})})},fPe=e=>({userId:e.auth.user&&e.auth.user.id,cpId:e.composer.piece.id,clientPieceLimits:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.clientpiece_config}),iS=le(fPe,{addSection:ku,editClientPieceSection:lm})(pPe);function mPe(e){const{selectedChartId:t,isDirty:r,setChartLibraryFormStatus:i,userId:a,index:s,addSection:o,cpId:l,isChartEditing:c,setIsChartEditing:h,editClientPieceSection:u,sections:d,setModal:p,setSectionEditing:f}=e,m=async g=>{if(c){const v=d[s].id;u(a,l,v,void 0,"chart",t).then(b=>{i(!1),b&&(p(!1),h(!1),f(!1))})}else o(a,l,void 0,"chart",t,s).then(x=>{x&&p(!1)});i(!1)};return n.jsx(gt,{initialValues:{},onSubmit:()=>{},children:g=>{const{handleSubmit:x,isSubmitting:v}=g;return n.jsx("div",{className:"chart-save-grp",children:n.jsx("form",{onSubmit:x,children:n.jsx("div",{className:"buttons",children:n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"library-save-btn",disabled:!r||v,onClick:b=>m(),children:c?"UPDATE CHART":"ADD CHART"})})})})}})}const gPe=e=>({selectedChartId:e.composer.piece.selectedChartId,chartOrder:e.chartbooks.item.chartOrderNew,isDirty:e.chartbooks.isDirty,userId:e.auth.user&&e.auth.user.id,cbId:e.chartbooks.item&&e.chartbooks.item.id,charts:e.composer.chartLibrary&&e.composer.chartLibrary.charts||e.chartbooks.chartLibrary&&e.chartbooks.chartLibrary.charts,sections:e.composer.piece.sections,cpId:e.composer.piece.id}),vPe=Jt(le(gPe,{setChartLibraryFormStatus:Xf,addSection:ku,editClientPieceSection:lm})(mPe));function bPe(e){const[t,r]=y.useState(!1),[i,a]=y.useState(!1);y.useEffect(()=>{a(!0)},[]);const s=()=>{r(!1)};if(e.chartLibrary){const{charts:o,topics:l}=e.chartLibrary,{isWizard:c}=e;return n.jsx(ot,{setModal:e.setModal,children:n.jsxs("div",{className:"chart-lib-modal-container",children:[e.chartToBeUpdated&&e.chartToBeUpdated.length!==0&&n.jsx("div",{className:"chart-date-warning-banner",children:n.jsxs(n.Fragment,{children:[n.jsx("i",{className:"material-icons",children:"warning"}),n.jsxs("div",{className:"banner-text",children:["The currently selected chart is as of"," ",n.jsx(gn,{local:!0,format:"MMM DD, YYYY",children:e.chartToBeUpdated[0].id===e.section?.chart_snapshot.chart_id&&e.section.type==="chart"&&e.section?.chart_snapshot.chart_update_datetime}),". Newly selected charts will reflect the latest available data."]})]})}),n.jsx("i",{className:"material-icons",onClick:()=>e.setModal(!1),children:"close"}),n.jsx("h5",{children:"Select a Chart"}),n.jsx("div",{className:"row",children:n.jsxs("div",{className:"chart-library-search",children:[n.jsx(u0,{isWizard:c}),n.jsx(vPe,{index:e.index,setModal:e.setModal,isChartEditing:e.isChartEditing,setIsChartEditing:e.setIsCh
128artEditing,setSectionEditing:e.setSectionEditing})]})}),l&&o&&n.jsx("div",{id:"library-wrapper",children:n.jsx(v$,{...e,charts:o,topics:l,resetCharts:t,confirmReset:s,isChartsLoaded:i,index:e.index,isChartEditing:e.isChartEditing})})]})})}return null}const yPe=e=>({chartLibrary:e.chartlibrary,isDirty:e.composer.isDirty,userId:e.auth.user.id}),aS=le(yPe,{getCharts:lc,setScrim:hn,searchCharts:ro})(zt(bPe));var Lu=e=>e.type==="checkbox",_o=e=>e instanceof Date,yi=e=>e==null;const sF=e=>typeof e=="object";var dr=e=>!yi(e)&&!Array.isArray(e)&&sF(e)&&!_o(e),xPe=e=>dr(e)&&e.target?Lu(e.target)?e.target.checked:e.target.value:e,jPe=(e,t)=>t.split(".").some((r,i,a)=>!isNaN(Number(r))&&e.has(a.slice(0,i).join("."))),wPe=e=>{const t=e.constructor&&e.constructor.prototype;return dr(t)&&t.hasOwnProperty("isPrototypeOf")},sS=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function kr(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(sS&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(dr(e)&&wPe(e)))return e;const i=r?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(i[a]=kr(e[a]));return i}var Nm=e=>/^\w*$/.test(e),Jn=e=>e===void 0,oS=e=>Array.isArray(e)?e.filter(Boolean):[],lS=e=>oS(e.replace(/["|']|\]/g,"").split(/\.|\[/)),wt=(e,t,r)=>{if(!t||!dr(e))return r;const i=(Nm(t)?[t]:lS(t)).reduce((a,s)=>yi(a)?a:a[s],e);return Jn(i)||i===e?Jn(e[t])?r:e[t]:i},Pa=e=>typeof e=="boolean",ba=e=>typeof e=="function",zn=(e,t,r)=>{let i=-1;const a=Nm(t)?[t]:lS(t),s=a.length,o=s-1;for(;++i<s;){const l=a[i];let c=r;if(i!==o){const h=e[l];c=dr(h)||Array.isArray(h)?h:isNaN(+a[i+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=c,e=e[l]}};const xl={BLUR:"blur",FOCUS_OUT:"focusout",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},ya={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},va={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Xy="form",oF="root",SPe=Me.createContext(null);SPe.displayName="HookFormControlContext";var _Pe=(e,t,r,i=!0)=>{const a={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(a,s,{get:()=>{const o=s;return t._proxyFormState[o]!==ya.all&&(t._proxyFormState[o]=!i||ya.all),e[o]}});return a};const CPe=typeof window<"u"?Me.useLayoutEffect:Me.useEffect;var ui=e=>typeof e=="string",NPe=(e,t,r,i,a)=>ui(e)?(i&&t.watch.add(e),wt(r,e,a)):Array.isArray(e)?e.map(s=>(i&&t.watch.add(s),wt(r,s))):(i&&(t.watchAll=!0),r),Jx=e=>yi(e)||!sF(e);function Rs(e,t,r=new WeakSet){if(Jx(e)||Jx(t))return Object.is(e,t);if(_o(e)&&_o(t))return Object.is(e.getTime(),t.getTime());const i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const s of i){const o=e[s];if(!a.includes(s))return!1;if(s!=="ref"){const l=t[s];if(_o(o)&&_o(l)||(dr(o)||Array.isArray(o))&&(dr(l)||Array.isArray(l))?!Rs(o,l,r):!Object.is(o,l))return!1}}return!0}const EPe=Me.createContext(null);EPe.displayName="HookFormContext";var TPe=(e,t,r,i,a)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[i]:a||!0}}:{},$d=e=>Array.isArray(e)?e:[e],kI=()=>{let e=[];return{get observers(){return e},next:a=>{for(const s of e)s.next&&s.next(a)},subscribe:a=>(e.push(a),{unsubscribe:()=>{e=e.filter(s=>s!==a)}}),unsubscribe:()=>{e=[]}}};function lF(e,t){const r={};for(const i in e)if(e.hasOwnProperty(i)){const a=e[i],s=t[i];if(a&&dr(a)&&s){const o=lF(a,s);dr(o)&&(r[i]=o)}else e[i]&&(r[i]=s)}return r}var di=e=>dr(e)&&!Object.keys(e).length,cS=e=>e.type==="file",pf=e=>{if(!sS)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},cF=e=>e.type==="select-multiple",dS=e=>e.type==="radio",kPe=e=>dS(e)||Lu(e),Qy=e=>pf(e)&&e.isConnected;function PPe(e,t){const r=t.slice(0,-1).length;let i=0;for(;i<r;)e=Jn(e)?i++:e[t[i++]];return e}function IPe(e){for(const t in e)if(e.hasOwnProperty(t)&&!Jn(e[t]))return!1;return!0}function vr(e,t){const r=Array.isArray(t)?t:Nm(t)?[t]:lS(t),i=r.length===1?e:PPe(e,r),a=r.length-1,s=r[a];return i&&delete i[s],a!==0&&(dr(i)&&di(i)||Array.isArray(i)&&IPe(i))&&vr(e,r.slice(0,-1)),e}var DPe=e=>{for(const t in e)if(ba(e[t]))return!0;return!1};function dF(e){return Array.isArray(e)||dr(e)&&!DPe(e)}function ej(e,t={}){for(const r in e){const i=e[r];dF(i)?(t[r]=Array.isArray(i)?[]:{},ej(i,t[r])):Jn(i)||(t[r]=!0)}return t}function Td(e,t,r){r||(r=ej(t));for(const i in e){const a=e[i];if(dF(a))Jn(t)||Jx(r[i])?r[i]=ej(a,Array.isArray(a)?[]:{}):Td(a,yi(t)?{}:t[i],r[i]);else{const s=t[i];r[i]=!Rs(a,s)}}return r}const PI={value:!1,isValid:!1},II={value:!0,isValid:!0};var uF=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Jn(e[0].attributes.value)?Jn(e[0].value)||e[0].value===""?II:{value:e[0].value,isValid:!0}:II:PI}return PI},hF=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:i})=>Jn(e)?e:t?e===""?NaN:e&&+e:r&&ui(e)?new Date(e):i?i(e):e;const DI={isValid:!1,value:null};var pF=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,DI):DI;function RI(e){const t=e.ref;return cS(t)?t.files:dS(t)?pF(e.refs).value:cF(t)?[...t.selectedOptions].map(({value:r})=>r):Lu(t)?uF(e.refs).value:hF(Jn(t.value)?e.ref.value:t.value,e)}var RPe=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,OPe=(e,t,r,i)=>{const a={};for(const s of e){const o=wt(t,s);o&&zn(a,s,o._f)}return{criteriaMode:r,names:[...e],fields:a,shouldUseNativeValidation:i}},ff=e=>e instanceof RegExp,hd=e=>Jn(e)?e:ff(e)?e.source:dr(e)?ff(e.value)?e.value.source:e.value:e,OI=e=>({isOnSubmit:!e||e===ya.onSubmit,isOnBlur:e===ya.onBlur,isOnChange:e===ya.onChange,isOnAll:e===ya.all,isOnTouch:e===ya.onTouched});const AI="AsyncFunction";var APe=e=>!!e&&!!e.validate&&!!(ba(e.validate)&&e.validate.constructor.name===AI||dr(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===AI)),MPe=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),MI=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(i=>e.startsWith(i)&&/^\.\w+/.test(e.slice(i.length))));const Ld=(e,t,r,i)=>{for(const a of r||Object.keys(e)){const s=wt(e,a);if(s){const{_f:o,...l}=s;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],a)&&!i)return!0;
vendor: 4,217 bytes, line 128
128if(o.ref&&t(o.ref,o.name)&&!i)return!0;if(Ld(l,t))break}else if(dr(l)&&Ld(l,t))break}}};function $I(e,t,r){const i=wt(e,r);if(i||Nm(r))return{error:i,name:r};const a=r.split(".");for(;a.length;){const s=a.join("."),o=wt(t,s),l=wt(e,s);if(o&&!Array.isArray(o)&&r!==s)return{name:r};if(l&&l.type)return{name:s,error:l};if(l&&l.root&&l.root.type)return{name:`${s}.root`,error:l.root};a.pop()}return{name:r}}var $Pe=(e,t,r,i)=>{r(e);const{name:a,...s}=e;return di(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(o=>t[o]===(!i||ya.all))},LPe=(e,t,r)=>!e||!t||e===t||$d(e).some(i=>i&&(r?i===t:i.startsWith(t)||t.startsWith(i))),FPe=(e,t,r,i,a)=>a.isOnAll?!1:!r&&a.isOnTouch?!(t||e):(r?i.isOnBlur:a.isOnBlur)?!e:(r?i.isOnChange:a.isOnChange)?e:!0,UPe=(e,t)=>!oS(wt(e,t)).length&&vr(e,t),BPe=(e,t,r)=>{const i=$d(wt(e,r));return zn(i,oF,t[r]),zn(e,r,i),e};function LI(e,t,r="validate"){if(ui(e)||Array.isArray(e)&&e.every(ui)||Pa(e)&&!e)return{type:r,message:ui(e)?e:"",ref:t}}var jl=e=>dr(e)&&!ff(e)?e:{value:e,message:""},FI=async(e,t,r,i,a,s)=>{const{ref:o,refs:l,required:c,maxLength:h,minLength:u,min:d,max:p,pattern:f,validate:m,name:g,valueAsNumber:x,mount:v}=e._f,b=wt(r,g);if(!v||t.has(g))return{};const j=l?l[0]:o,w=k=>{a&&j.reportValidity&&(j.setCustomValidity(Pa(k)?"":k||""),j.reportValidity())},S={},_=dS(o),C=Lu(o),E=_||C,P=(x||cS(o))&&Jn(o.value)&&Jn(b)||pf(o)&&o.value===""||b===""||Array.isArray(b)&&!b.length,T=TPe.bind(null,g,i,S),N=(k,I,D,O=va.maxLength,$=va.minLength)=>{const U=k?I:D;S[g]={type:k?O:$,message:U,ref:o,...T(k?O:$,U)}};if(s?!Array.isArray(b)||!b.length:c&&(!E&&(P||yi(b))||Pa(b)&&!b||C&&!uF(l).isValid||_&&!pF(l).isValid)){const{value:k,message:I}=ui(c)?{value:!!c,message:c}:jl(c);if(k&&(S[g]={type:va.required,message:I,ref:j,...T(va.required,I)},!i))return w(I),S}if(!P&&(!yi(d)||!yi(p))){let k,I;const D=jl(p),O=jl(d);if(!yi(b)&&!isNaN(b)){const $=o.valueAsNumber||b&&+b;yi(D.value)||(k=$>D.value),yi(O.value)||(I=$<O.value)}else{const $=o.valueAsDate||new Date(b),U=A=>new Date(new Date().toDateString()+" "+A),B=o.type=="time",L=o.type=="week";ui(D.value)&&b&&(k=B?U(b)>U(D.value):L?b>D.value:$>new Date(D.value)),ui(O.value)&&b&&(I=B?U(b)<U(O.value):L?b<O.value:$<new Date(O.value))}if((k||I)&&(N(!!k,D.message,O.message,va.max,va.min),!i))return w(S[g].message),S}if((h||u)&&!P&&(ui(b)||s&&Array.isArray(b))){const k=jl(h),I=jl(u),D=!yi(k.value)&&b.length>+k.value,O=!yi(I.value)&&b.length<+I.value;if((D||O)&&(N(D,k.message,I.message),!i))return w(S[g].message),S}if(f&&!P&&ui(b)){const{value:k,message:I}=jl(f);if(ff(k)&&!b.match(k)&&(S[g]={type:va.pattern,message:I,ref:o,...T(va.pattern,I)},!i))return w(I),S}if(m){if(ba(m)){const k=await m(b,r),I=LI(k,j);if(I&&(S[g]={...I,...T(va.validate,I.message)},!i))return w(I.message),S}else if(dr(m)){let k={};for(const I in m){if(!di(k)&&!i)break;const D=LI(await m[I](b,r),j,I);D&&(k={...D,...T(I,D.message)},w(D.message),i&&(S[g]=k))}if(!di(k)&&(S[g]={ref:j,...k},!i))return S}}return w(!0),S};const qPe={mode:ya.onSubmit,reValidateMode:ya.onChange,shouldFocusError:!0};function VPe(e={}){let t={...qPe,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:ba(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},i={},a=dr(t.defaultValues)||dr(t.values)?kr(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:kr(a),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},c,h=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={...u};let p={...d};const f={array:kI(),state:kI()},m=t.criteriaMode===ya.all,g=Q=>ee=>{clearTimeout(h),h=setTimeout(Q,ee)},x=async Q=>{if(!o.keepIsValid&&!t.disabled&&(d.isValid||p.isValid||Q)){let ee;t.resolver?(ee=di((await P()).errors),v()):ee=await k({fields:i,onlyCheckValid:!0,eventType:xl.VALID}),ee!==r.isValid&&f.state.next({isValid:ee})}},v=(Q,ee)=>{!t.disabled&&(d.isValidating||d.validatingFields||p.isValidating||p.validatingFields)&&((Q||Array.from(l.mount)).forEac
vendor: 14,122 bytes, line 128
128h(oe=>{oe&&(ee?zn(r.validatingFields,oe,ee):vr(r.validatingFields,oe))}),f.state.next({validatingFields:r.validatingFields,isValidating:!di(r.validatingFields)}))},b=Q=>{const ee=Td(a,s),oe=RPe(Q);zn(r.dirtyFields,oe,wt(ee,oe))},j=(Q,ee=[],oe,Pe,Fe=!0,Ie=!0)=>{if(Pe&&oe&&!t.disabled){if(o.action=!0,Ie&&Array.isArray(wt(i,Q))){const Re=oe(wt(i,Q),Pe.argA,Pe.argB);Fe&&zn(i,Q,Re)}if(Ie&&Array.isArray(wt(r.errors,Q))){const Re=oe(wt(r.errors,Q),Pe.argA,Pe.argB);Fe&&zn(r.errors,Q,Re),UPe(r.errors,Q)}if((d.touchedFields||p.touchedFields)&&Ie&&Array.isArray(wt(r.touchedFields,Q))){const Re=oe(wt(r.touchedFields,Q),Pe.argA,Pe.argB);Fe&&zn(r.touchedFields,Q,Re)}(d.dirtyFields||p.dirtyFields)&&b(Q),f.state.next({name:Q,isDirty:D(Q,ee),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else zn(s,Q,ee)},w=(Q,ee)=>{zn(r.errors,Q,ee),f.state.next({errors:r.errors})},S=Q=>{r.errors=Q,f.state.next({errors:r.errors,isValid:!1})},_=(Q,ee,oe,Pe)=>{const Fe=wt(i,Q);if(Fe){const Ie=wt(s,Q,Jn(oe)?wt(a,Q):oe);Jn(Ie)||Pe&&Pe.defaultChecked||ee?zn(s,Q,ee?Ie:RI(Fe._f)):U(Q,Ie),o.mount&&!o.action&&x()}},C=(Q,ee,oe,Pe,Fe)=>{let Ie=!1,Re=!1;const Ve={name:Q};if(!t.disabled){if(!oe||Pe){(d.isDirty||p.isDirty)&&(Re=r.isDirty,r.isDirty=Ve.isDirty=D(),Ie=Re!==Ve.isDirty);const Xe=Rs(wt(a,Q),ee);Re=!!wt(r.dirtyFields,Q),Xe?vr(r.dirtyFields,Q):zn(r.dirtyFields,Q,!0),Ve.dirtyFields=r.dirtyFields,Ie=Ie||(d.dirtyFields||p.dirtyFields)&&Re!==!Xe}if(oe){const Xe=wt(r.touchedFields,Q);Xe||(zn(r.touchedFields,Q,oe),Ve.touchedFields=r.touchedFields,Ie=Ie||(d.touchedFields||p.touchedFields)&&Xe!==oe)}Ie&&Fe&&f.state.next(Ve)}return Ie?Ve:{}},E=(Q,ee,oe,Pe)=>{const Fe=wt(r.errors,Q),Ie=(d.isValid||p.isValid)&&Pa(ee)&&r.isValid!==ee;if(t.delayError&&oe?(c=g(()=>w(Q,oe)),c(t.delayError)):(clearTimeout(h),c=null,oe?zn(r.errors,Q,oe):vr(r.errors,Q)),(oe?!Rs(Fe,oe):Fe)||!di(Pe)||Ie){const Re={...Pe,...Ie&&Pa(ee)?{isValid:ee}:{},errors:r.errors,name:Q};r={...r,...Re},f.state.next(Re)}},P=async Q=>(v(Q,!0),await t.resolver(s,t.context,OPe(Q||l.mount,i,t.criteriaMode,t.shouldUseNativeValidation))),T=async Q=>{const{errors:ee}=await P(Q);if(v(Q),Q)for(const oe of Q){const Pe=wt(ee,oe);Pe?zn(r.errors,oe,Pe):vr(r.errors,oe)}else r.errors=ee;return ee},N=async({name:Q,eventType:ee})=>{if(e.validate){const oe=await e.validate({formValues:s,formState:r,name:Q,eventType:ee});if(dr(oe))for(const Pe in oe)oe[Pe]&&M(`${Xy}.${Pe}`,{message:ui(oe.message)?oe.message:"",type:va.validate});else ui(oe)||!oe?M(Xy,{message:oe||"",type:va.validate}):X(Xy);return oe}return!0},k=async({fields:Q,onlyCheckValid:ee,name:oe,eventType:Pe,context:Fe={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(Fe.runRootValidation=!0,!await N({name:oe,eventType:Pe})&&(Fe.valid=!1,ee)))return Fe.valid;for(const Ie in Q){const Re=Q[Ie];if(Re){const{_f:Ve,...Xe}=Re;if(Ve){const et=l.array.has(Ve.name),rt=Re._f&&APe(Re._f);rt&&d.validatingFields&&v([Ve.name],!0);const bt=await FI(Re,l.disabled,s,m,t.shouldUseNativeValidation&&!ee,et);if(rt&&d.validatingFields&&v([Ve.name]),bt[Ve.name]&&(Fe.valid=!1,ee)||(!ee&&(wt(bt,Ve.name)?et?BPe(r.errors,bt,Ve.name):zn(r.errors,Ve.name,bt[Ve.name]):vr(r.errors,Ve.name)),e.shouldUseNativeValidation&&bt[Ve.name]))break}!di(Xe)&&await k({context:Fe,onlyCheckValid:ee,fields:Xe,name:Ie,eventType:Pe})}}return Fe.valid},I=()=>{for(const Q of l.unMount){const ee=wt(i,Q);ee&&(ee._f.refs?ee._f.refs.every(oe=>!Qy(oe)):!Qy(ee._f.ref))&&Y(Q)}l.unMount=new Set},D=(Q,ee)=>!t.disabled&&(Q&&ee&&zn(s,Q,ee),!Rs(q(),a)),O=(Q,ee,oe)=>NPe(Q,l,{...o.mount?s:Jn(ee)?a:ui(Q)?{[Q]:ee}:ee},oe,ee),$=Q=>oS(wt(o.mount?s:a,Q,t.shouldUnregister?wt(a,Q,[]):[])),U=(Q,ee,oe={})=>{const Pe=wt(i,Q);let Fe=ee;if(Pe){const Ie=Pe._f;Ie&&(!Ie.disabled&&zn(s,Q,hF(ee,Ie)),Fe=pf(Ie.ref)&&yi(ee)?"":ee,cF(Ie.ref)?[...Ie.ref.options].forEach(Re=>Re.selected=Fe.includes(Re.value)):Ie.refs?Lu(Ie.ref)?Ie.refs.forEach(Re=>{(!Re.defaultChecked||!Re.disabled)&&(Array.isArray(Fe)?Re.checked=!!Fe.find(Ve=>Ve===Re.value):Re.checked=Fe===Re.value||!!Fe)}):Ie.refs.forEach(Re=>Re.checked=Re.value===Fe):cS(Ie.ref)?Ie.ref.value="":(Ie.ref.value=Fe,Ie.ref.type||f.state.next({name:Q,values:kr(s)})))}(oe.shouldDirty||oe.shouldTouch)&&C(Q,Fe,oe.shouldTouch,oe.shouldDirty,!0),oe.shouldValidate&&F(Q)},B=(Q,ee,oe)=>{for(const Pe in ee){if(!ee.hasOwnProperty(Pe))return;const Fe=ee[Pe],Ie=Q+"."+Pe,Re=wt(i,Ie);(l.array.has(Q)||dr(Fe)||Re&&!Re._f)&&!_o(Fe)?B(Ie,Fe,oe):U(Ie,Fe,oe)}},L=(Q,ee,oe={})=>{const Pe=wt(i,Q),Fe=l.array.has(Q),Ie=kr(ee);zn(s,Q,Ie),Fe?(f.array.next({name:Q,values:kr(s)}),(d.isDirty||d.dirtyFields||p.isDirty||p.dirtyFields)&&oe.shouldDirty&&(b(Q),f.state.next({name:Q,dirtyFields:r.dirtyFields,isDirty:D(Q,Ie)}))):Pe&&!Pe._f&&!yi(Ie)?B(Q,Ie,oe):U(Q,Ie,oe),MI(Q,l)?f.state.next({...r,name:Q,values:kr(s)}):f.state.next({name:o.mount?Q:void 0,values:kr(s)})},A=async Q=>{o.mount=!0;const ee=Q.target;let oe=ee.name,Pe=!0;const Fe=wt(i,oe),Ie=Xe=>{Pe=Number.isNaN(Xe)||_o(Xe)&&isNaN(Xe.getTime())||Rs(Xe,wt(s,oe,Xe))},Re=OI(t.mode),Ve=OI(t.reValidateMode);if(Fe){let Xe,et;const rt=ee.type?RI(Fe._f):xPe(Q),bt=Q.type===xl.BLUR||Q.type===xl.FOCUS_OUT,Qe=!MPe(Fe._f)&&!e.validate&&!t.resolver&&!wt(r.errors,oe)&&!Fe._f.deps||FPe(bt,wt(r.touchedFields,oe),r.isSubmitted,Ve,Re),tt=MI(oe,l,bt);zn(s,oe,rt),bt?(!ee||!ee.readOnly)&&(Fe._f.onBlur&&Fe._f.onBlur(Q),c&&c(0)):Fe._f.onChange&&Fe._f.onChange(Q);const We=C(oe,rt,bt),pt=!di(We)||tt;if(!bt&&f.state.next({name:oe,type:Q.type,values:kr(s)}),Qe)return(d.isValid||p.isValid)&&(t.mode==="onBlur"?bt&&x():bt||x()),pt&&f.state.next({name:oe,...tt?{}:We});if(!t.resolver&&e.validate&&await N({name:oe,eventType:Q.type}),!bt&&tt&&f.state.next({...r}),t.resolver){const{errors:Et}=await P([oe]);if(v([oe]),Ie(rt),Pe){const Ot=$I(r.errors,i,oe),kt=$I(Et,i,Ot.name||oe);Xe=kt.error,oe=kt.name,et=di(Et)}}else v([oe],!0),Xe=(await FI(Fe,l.disabled,s,m,t.shouldUseNativeValidation))[oe],v([oe]),Ie(rt),Pe&&(Xe?et=!1:(d.isValid||p.isValid)&&(et=await k({fields:i,onlyCheckValid:!0,name:oe,eventType:Q.type})));Pe&&(Fe._f.deps&&(!Array.isArray(Fe._f.deps)||Fe._f.deps.length>0)&&F(Fe._f.deps),E(oe,et,Xe,We))}},R=(Q,ee)=>{if(wt(r.errors,ee)&&Q.focus)return Q.focus(),1},F=async(Q,ee={})=>{let oe,Pe;const Fe=$d(Q);if(t.resolver){const Ie=await T(Jn(Q)?Q:Fe);oe=di(Ie),Pe=Q?!Fe.some(Re=>wt(Ie,Re)):oe}else Q?(Pe=(await Promise.all(Fe.map(async Ie=>{const Re=wt(i,Ie);return await k({fields:Re&&Re._f?{[Ie]:Re}:Re,eventType:xl.TRIGGER})}))).every(Boolean),!(!Pe&&!r.isValid)&&x()):Pe=oe=await k({fields:i,name:Q,eventType:xl.TRIGGER});return f.state.next({...!ui(Q)||(d.isValid||p.isValid)&&oe!==r.isValid?{}:{name:Q},...t.resolver||!Q?{isValid:oe}:{},errors:r.errors}),ee.shouldFocus&&!Pe&&Ld(i,R,Q?Fe:l.mount),Pe},q=(Q,ee)=>{let oe={...o.mount?s:a};return ee&&(oe=lF(ee.dirtyFields?r.dirtyFields:r.touchedFields,oe)),Jn(Q)?oe:ui(Q)?wt(oe,Q):Q.map(Pe=>wt(oe,Pe))},V=(Q,ee)=>({invalid:!!wt((ee||r).errors,Q),isDirty:!!wt((ee||r).dirtyFields,Q),error:wt((ee||r).errors,Q),isValidating:!!wt(r.validatingFields,Q),isTouched:!!wt((ee||r).touchedFields,Q)}),X=Q=>{const ee=Q?$d(Q):void 0;ee?.forEach(oe=>vr(r.errors,oe)),ee?ee.forEach(oe=>{f.state.next({name:oe,errors:r.errors})}):f.state.next({errors:{}})},M=(Q,ee,oe)=>{const Pe=(wt(i,Q,{_f:{}})._f||{}).ref,Fe=wt(r.errors,Q)||{},{ref:Ie,message:Re,type:Ve,...Xe}=Fe;zn(r.errors,Q,{...Xe,...ee,ref:Pe}),f.state.next({name:Q,errors:r.errors,isValid:!1}),oe&&oe.shouldFocus&&Pe&&Pe.focus&&Pe.focus()},W=(Q,ee)=>ba(Q)?f.state.subscribe({next:oe=>"values"in oe&&Q(O(void 0,ee),oe)}):O(Q,ee,!0),K=Q=>f.state.subscribe({next:ee=>{LPe(Q.name,ee.name,Q.exact)&&$Pe(ee,Q.formState||d,ge,Q.reRenderRoot)&&Q.callback({values:{...s},...r,...ee,defaultValues:a})}}).unsubscribe,z=Q=>(o.mount=!0,p={...p,...Q.formState},K({...Q,formState:{...u,...Q.formState}})),Y=(Q,ee={})=>{for(const oe of Q?$d(Q):l.mount)l.mount.delete(oe),l.array.delete(oe),ee.keepValue||(vr(i,oe),vr(s,oe)),!ee.keepError&&vr(r.errors,oe),!ee.keepDirty&&vr(r.dirtyFields,oe),!ee.keepTouched&&vr(r.touchedFields,oe),!ee.keepIsValidating&&vr(r.validatingFields,oe),!t.shouldUnregister&&!ee.keepDefaultValue&&vr(a,oe);f.state.next({values:kr(s)}),f.state.next({...r,...ee.keepDirty?{isDirty:D()}:{}}),!ee.keepIsValid&&x()},ie=({disabled:Q,name:ee})=>{if(Pa(Q)&&o.mount||Q||l.disabled.has(ee)){const Fe=l.disabled.has(ee)!==!!Q;Q?l.disabled.add(ee):l.disabled.delete(ee),Fe&&o.mount&&!o.action&&x()}},ne=(Q,ee={})=>{let oe=wt(i,Q);const Pe=Pa(ee.disabled)||Pa(t.disabled),Fe=!l.registerName.has(Q)&&oe&&!oe._f.mount;return zn(i,Q,{...oe||{},_f:{...oe&&oe._f?oe._f:{ref:{name:Q}},name:Q,mount:!0,...ee}}),l.mount.add(Q),oe&&!Fe?ie({disabled:Pa(ee.disabled)?ee.disabled:t.disabled,name:Q}):_(Q,!0,ee.value),{...Pe?{disabled:ee.disabled||t.disabled}:{},...t.progressive?{required:!!ee.required,min:hd(ee.min),max:hd(ee.max),minLength:hd(ee.minLength),maxLength:hd(ee.maxLength),pattern:hd(ee.pattern)}:{},name:Q,onChange:A,onBlur:A,ref:Ie=>{if(Ie){l.registerName.add(Q),ne(Q,ee),l.registerName.delete(Q),oe=wt(i,Q);const Re=Jn(Ie.value)&&Ie.querySelectorAll&&Ie.querySelectorAll("input,select,textarea")[0]||Ie,Ve=kPe(Re),Xe=oe._f.refs||[];if(Ve?Xe.find(et=>et===Re):Re===oe._f.ref)return;zn(i,Q,{_f:{...oe._f,...Ve?{refs:[...Xe.filter(Qy),Re,...Array.isArray(wt(a,Q))?[{}]:[]],ref:{type:Re.type,name:Q}}:{ref:Re}}}),_(Q,!1,void 0,Re)}else oe=wt(i,Q,{}),oe._f&&(oe._f.mount=!1),(t.shouldUnregister||ee.shouldUnregister)&&!(jPe(l.array,Q)&&o.action)&&l.unMount.add(Q)}}},ve=()=>t.shouldFocusError&&Ld(i,R,l.mount),pe=Q=>{Pa(Q)&&(f.state.next({disabled:Q}),Ld(i,(ee,oe)=>{const Pe=wt(i,oe);Pe&&(ee.disabled=Pe._f.disabled||Q,Array.isArray(Pe._f.refs)&&Pe._f.refs.forEach(Fe=>{Fe.disabled=Pe._f.disabled||Q}))},0,!1))},be=(Q,ee)=>async oe=>{let Pe;oe&&(oe.preventDefault&&oe.preventDefault(),oe.persist&&oe.persist());let Fe=kr(s);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:Ie,values:Re}=await P();v(),r.errors=Ie,Fe=kr(Re)}else await k({fields:i,eventType:xl.SUBMIT});if(l.disabled.size)for(const Ie of l.disabled)vr(Fe,Ie);if(vr(r.errors,oF),di(r.errors)){f.state.next({errors:{}});try{await Q(Fe,oe)}catch(Ie){Pe=Ie}}else ee&&await ee({...r.errors},oe),ve(),setTimeout(ve);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:di(r.errors)&&!Pe,submitCount:r.submitCount+1,errors:r.errors}),Pe)throw Pe},ye=(Q,ee={})=>{wt(i,Q)&&(Jn(ee.defaultValue)?L(Q,kr(wt(a,Q))):(L(Q,ee.defaultValue),zn(a,Q,kr(ee.defaultValue))),ee.keepTouched||vr(r.touchedFields,Q),ee.keepDirty||(vr(r.dirtyFields,Q),r.isDirty=ee.defaultValue?D(Q,kr(wt(a,Q))):D()),ee.keepError||(vr(r.errors,Q),d.isValid&&x()),f.state.next({...r}))},ke=(Q,ee={})=>{const oe=Q?kr(Q):a,Pe=kr(oe),Fe=di(Q),Ie=Fe?a:Pe;if(ee.keepDefaultValues||(a=oe),!ee.keepValues){if(ee.keepDirtyValues){const Re=new Set([...l.mount,...Object.keys(Td(a,s))]);for(const Ve of Array.from(Re)){const Xe=wt(r.dirtyFields,Ve),et=wt(s,Ve),rt=wt(Ie,Ve);Xe&&!Jn(et)?zn(Ie,Ve,et):!Xe&&!Jn(rt)&&L(Ve,rt)}}else{if(sS&&Jn(Q))for(const Re of l.mount){const Ve=wt(i,Re);if(Ve&&Ve._f){const Xe=Array.isArray(Ve._f.refs)?Ve._f.refs[0]:Ve._f.ref;if(pf(Xe)){const et=Xe.closest("form");if(et){et.reset();break}}}}if(ee.keepFieldsRef)for(const Re of l.mount)L(Re,wt(Ie,Re));else i={}}s=t.shouldUnregister?ee.keepDefaultValues?kr(a):{}:kr(Ie),f.array.next({values:{...Ie}}),f.state.next({values:{...Ie}})}l={mount:ee.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!d.isValid||!!ee.keepIsValid||!!ee.keepDirtyValues||!t.shouldUnregister&&!di(Ie),o.watch=!!t.shouldUnregister,o.keepIsValid=!!ee.keepIsValid,o.action=!1,ee.keepErrors||(r.errors={}),f.state.next({submitCount:ee.keepSubmitCount?r.submitCount:0,isDirty:Fe?!1:ee.keepDirty?r.isDirty:!!(ee.keepDefaultValues&&!Rs(Q,a)),isSubmitted:ee.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:Fe?{}:ee.keepDirtyValues?ee.keepDefaultValues&&s?Td(a,s):r.dirtyFields:ee.keepDefaultValues&&Q?Td(a,Q):ee.keepDirty?r.dirtyFields:{},touchedFields:ee.keepTouched?r.touchedFields:{},errors:ee.keepErrors?r.errors:{},isSubmitSuccessful:ee.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:a})},fe=(Q,ee)=>ke(ba(Q)?Q(s):Q,{...t.resetOptions,...ee}),se=(Q,ee={})=>{const oe=wt(i,Q),Pe=oe&&oe._f;if(Pe){const Fe=Pe.refs?Pe.refs[0]:Pe.ref;Fe.focus&&setTimeout(()=>{Fe.focus(),ee.shouldSelect&&ba(Fe.select)&&Fe.select()})}},ge=Q=>{r={...r,...Q}},ae={control:{register:ne,unregister:Y,getFieldState:V,handleSubmit:be,setError:M,_subscribe:K,_runSchema:P,_updateIsValidating:v,_focusError:ve,_getWatch:O,_getDirty:D,_setValid:x,_setFieldArray:j,_setDisabledField:ie,_setErrors:S,_getFieldArray:$,_reset:ke,_resetDefaultValues:()=>ba(t.defaultValues)&&t.defaultValues().then(Q=>{fe(Q,t.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:I,_disableForm:pe,_subjects:f,_proxyFormState:d,get _fields(){return i},get _formValues(){return s},get _state(){return o},set _state(Q){o=Q},get _defaultValues(){return a},get _names(){return l},set _names(Q){l=Q},get _formState(){return r},get _options(){return t},set _options(Q){t={...t,...Q}}},subscribe:z,trigger:F,register:ne,handleSubmit:be,watch:W,setValue:L,getValues:q,reset:fe,resetField:ye,clearErrors:X,unregister:Y,setError:M,setFocus:se,getFieldState:V};return{...ae,formControl:ae}}function fF(e={}){const t=Me.useRef(void 0),r=Me.useRef(void 0),[i,a]=Me.useState({isDirty:!1,isValidating:!1,isLoading:ba(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:ba(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:i},e.defaultValues&&!ba(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...l}=VPe(e);t.current={...l,formState:i}}const s=t.current.control;return s._options=e,CPe(()=>{const o=s._subscribe({formState:s._proxyFormState,callback:()=>a({...s._formState}
128),reRenderRoot:!0});return a(l=>({...l,isReady:!0})),s._formState.isReady=!0,o},[s]),Me.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),Me.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),Me.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),Me.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),Me.useEffect(()=>{if(s._proxyFormState.isDirty){const o=s._getDirty();o!==i.isDirty&&s._subjects.state.next({isDirty:o})}},[s,i.isDirty]),Me.useEffect(()=>{var o;e.values&&!Rs(e.values,r.current)?(s._reset(e.values,{keepFieldsRef:!0,...s._options.resetOptions}),!((o=s._options.resetOptions)===null||o===void 0)&&o.keepIsValid||s._setValid(),r.current=e.values,a(l=>({...l}))):s._resetDefaultValues()},[s,e.values]),Me.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),t.current.formState=Me.useMemo(()=>_Pe(i,s),[s,i]),t.current}function zPe(e){const{index:t,userId:r,cpId:i,showQuill:a,setShowQuill:s,isEditing:o,setIsEditing:l,showDisclosures:c,setShowDisclosures:h,setScrim:u,addSection:d,editClientPieceSection:p,sections:f,sectionContent:m,editClientPieceDisclosures:g,setEditedDisclosure:x,composerDisclosure:v,sectionEditing:b,setSectionEditing:j,isInsightsMedia:w,updateInsightsMediaTextSection:S,insightsMedia:_,textToDisplay:C,type:E,isAdvisorNotes:P,partnerInsightId:T,updateAdvisorNotes:N}=e,[k,I]=y.useState(""),[D,O]=y.useState(!0),$=y.useRef(null),{handleSubmit:U,setValue:B,watch:L,register:A}=fF(),R=M=>{e.setDirty(!0),B("content",M),O(!1)};y.useEffect(()=>{A("content")},[A]);const F=L("content");y.useEffect(()=>{(m===F||!w&&v===F)&&(e.setDirty(!1),O(!0))},[F]);const q=async M=>{const W=M.content;let K=Rp.sanitize(W);if(K=K==="<p><br></p>"?"":K,o){const Y=f[t].id,ie=await p(r,i,Y,K,"text",null,null);ie?(l(!1),u(!1),j(!1)):(l(!0),j(!0));const ne=ie?.content;I(ne)}else if(c){const z=await g(i,r,K);if(z){h(!c),u(!1);const Y=z?.disclosures;x(Y)}}else w?await S(_.id,r,K,E)&&(s(!1),u(!1)):P?await N(T,r,K)&&(s(!1),u(!1)):await d(r,i,K,"text",void 0,t)&&(u(!1),s(!1));e.setDirty(!1),O(!1)},V=()=>{e.isDirty&&(window.confirm("Changes you made may not be saved.")?(u(!1),a?s(!1):c?h(!1):(l(!1),j(!1))):a?s(!0):c?h(!0):(l(!0),j(!0)))},X=M=>{M.preventDefault(),e.isDirty?e.isDirty&&u(!0):(u(!1),a?s(!1):c?h(!1):(o||b)&&(l(!1),j(!1))),V()};return y.useEffect(()=>{$.current?.focus?.()},[]),n.jsxs("div",{className:"composer-editor"+(o?" edit":""),id:o?"edit":"",children:[n.jsx(dc,{id:"react-quill-id",modules:P?I0e:F$,formats:U$,theme:"snow",placeholder:w&&E==="disclosures"?"Enter your disclosures here...":"Content goes here...",onChange:R,value:F||m||k&&k||c&&v||(w||P)&&C,ref:$}),n.jsxs("div",{className:"composer-editor-buttons",children:[n.jsx("button",{type:"submit",className:"btn-cancel","diagnostic-id":"editor-cancel-btn",onClick:X,children:"CANCEL"}),n.jsx("button",{disabled:D,type:"submit",className:"btn-primary-sm","diagnostic-id":"editor-save-btn",onClick:U(q),children:"SAVE"})]})]})}const HPe=e=>({sections:e.composer?.piece?.sections,composer:e.composer,userId:e.auth.user&&e.auth.user.id,cpId:e.composer?.piece?.id,composerDisclosure:e.composer?.piece?.disclosures}),mc=le(HPe,{addSection:ku,editClientPieceSection:lm,editClientPieceDisclosures:n$,updateInsightsMediaTextSection:Zxe,updateAdvisorNotes:jxe})(zt(zPe));function GPe(e){const{modal:t,setModal:r,setScrim:i,setSectionEditing:a,isDirty:s,setDirty:o,canUsePartner:l,allowPartner:c,isReadOnly:h}=e,[u,d]=y.useState(!1),[p,f]=y.useState(!1),m=()=>{i(!0),d(!0)},g=()=>{f(!1),o(!1)},x=p&&n.jsx(iS,{modal:p,setModal:f,isDirty:s,setDirty:o,handleCancel:g});return n.jsxs("div",{children:[u?n.jsx(mc,{setShowQuill:d,setScrim:i,showQuill:u}):n.jsx("div",{className:"col fadeTransition new-piece-container",children:n.jsxs("div",{className:"new-client-piece-section",id:"section-new",children:[n.jsx("h4",{children:"Add a section to get started:"}),n.jsxs("div",{className:"button-group",children:[n.jsxs("button",{className:"btn-primary-lg btn-icon-text","diagnostic-id":"add-text-btn",onClick:m,disabled:h,children:[n.jsx("i",{className:"material-icons",children:"edit_note"}),"ADD TEXT"]}),n.jsxs("button",{className:"btn-primary-lg btn-icon-text","diagnostic-id":"add-chart-btn",onClick:()=>r(!0),disabled:h,children:[n.jsx("i",{className:"material-icons",children:"insert_chart"}),"ADD A CHART"]}),c&&l&&n.jsxs("button",{className:"btn-primary-lg btn-icon-text","diagnostic-id":"add-image-btn",onClick:()=>f(!0),disabled:h,children:[n.jsx("i",{className:"material-icons",children:"panorama"}),"ADD AN IMAGE"]})]})]})}
128),t&&n.jsx(aS,{modal:t,setModal:r,setScrim:i,setSectionEditing:a}),x]})}const WPe=e=>({sections:e.composer?.piece?.sections,userId:e.auth.user&&e.auth.user.id,cpId:e.composer.piece.id,canUsePartner:e.auth&&e.auth.user&&e.auth.user.can_use_partner,allowPartner:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.partner_permissions&&e.auth.user.company.partner_permissions.allow_partner}),UI=le(WPe,{setScrim:hn,addSection:ku})(zt(GPe)),YPe=e=>n.jsx(ot,{setModal:e.setDeleteModal,children:n.jsxs("div",{className:"delete-modal-container",children:[n.jsx("h5",{children:"Please Confirm"}),n.jsx("p",{children:"Are you sure you want to permanently delete this section?"}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>{e.setDeleteModal(!1),e.setIsDelete(!1)},children:"CANCEL"}),n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",onClick:e.handleDelete,children:"DELETE"})]})]})}),KPe=e=>({userId:e.auth.user&&e.auth.user.id}),XPe=le(KPe,{})(YPe);function QPe(e){const{sectionContent:t,chartSection:r,sectionBreak:i,index:a,sections:s,userId:o,cpId:l,setScrim:c,editClientPieceSection:h,setIsDelete:u,sectionEditing:d,setSectionEditing:p,chartToBeUpdated:f,section:m,pageBreak:g,imageSection:x}=e,[v,b]=y.useState(!1),[j,w]=y.useState(!1),[S,_]=y.useState(!1),[C,E]=y.useState(s[a]?.chart_alignment),[P,T]=y.useState(e.newSectionId||null),[N,k]=y.useState(!1),[I,D]=y.useState(-1),[O,$]=y.useState(!1);y.useEffect(()=>{e.newSectionId&&T(e.newSectionId)},[e.newSectionId]);const U=e.newSectionId===m?.id,B=ti(t),L=()=>{p(!0),r?(b(!1),_(!0),w(!0)):x?$(!0):(c(!0),b(!0))},A=()=>{const q=s[a].id;e.deleteSection(q,o,l).then(()=>k(!1)),u(!1)},R=()=>{$(!1),e.setDirty(!1)};return y.useEffect(()=>{I!==-1&&h(o,l,I,null,"chart",null,C)},[I,C]),y.useEffect(()=>{j||p(!1)},[j]),y.useEffect(()=>{N||u(!1)},[N]),n.jsx(n.Fragment,{children:v&&d?n.jsx(mc,{index:a,isEditing:v,setIsEditing:b,setScrim:c,sectionContent:t,sectionEditing:d,setSectionEditing:p}):j?n.jsx(aS,{section:m,modal:j,setModal:w,index:a,isChartEditing:S,setIsChartEditing:_,setSectionEditing:p,chartToBeUpdated:f.length!==0&&f}):O?n.jsx(iS,{editModal:O,setModal:$,isDirty:e.isDirty,setDirty:e.setDirty,handleCancel:R,index:a,currentImage:x,section:m}):n.jsxs(n.Fragment,{children:[!i&&!g&&n.jsxs("button",{className:"section-edit-btn",onClick:L,children:[n.jsx("i",{className:"material-icons section-edit-icon",children:"edit"}),"EDIT"]}),r&&n.jsxs("div",{className:"section-align-btns",children:[n.jsx("button",{onClick:()=>{E("align-left"),D(s[a].id)},className:`${C==="align-left"?"selected-alignment":""}`,disabled:C==="align-left",id:"left-align-btn","diagnostic-id":"left-align-btn",children:n.jsx("i",{className:"material-icons-outlined",children:"format_align_left"})}),n.jsx("button",{onClick:()=>{E("align-right"),D(s[a].id)},className:`${C==="align-right"?"selected-alignment":""}`,disabled:C==="align-right",id:"right-align-btn","diagnostic-id":"right-align-btn",children:n.jsx("i",{className:"material-icons-outlined",children:"format_align_right"})})]}),n.jsxs("div",{className:"section-drag-handle",children:[n.jsx("i",{className:"material-icons section-drag-icon",children:"open_with"}),"MOVE SECTION"]}),r?n.jsxs("div",{className:`section-content-chart ${C==="align-left"?"left-align-chart":"right-align-chart"} ${U?" newSection":""} `,id:"alignment","diagnostic-id":"section-content-chart",children:[n.jsx("div",{className:"section-chart-placeholder"}),n.jsxs("div",{className:"chart-img-group",children:[n.jsx("img",{src:r||null,alt:""}),f&&f.length!==0&&n.jsx("div",{className:"chart-date-banner",children:n.jsx(n.Fragment,{children:n.jsxs("span",{children:[n.jsx("i",{className:"material-icons",children:"today"}),"Chart as of"," ",n.jsx(gn,{local:!0,format:"MMM DD, YYYY",children:f[0].id===m.chart_snapshot.chart_id&&m.type==="chart"&&m.chart_snapshot.chart_update_datetime})]})})})]})]}):i||g?n.jsxs("div",{className:"section-break-container","diagnostic-id":"section-break",children:[n.jsx("div",{className:"section-break-scrim"}),n.jsx("div",{className:"section-break-line"}),n.jsx("div",{className:"section-break-text",children:n.jsx("span",{children:g?"PDF PAGE BREAK":"PDF TEXT BREAK"})})]}):t?n.jsx("div",{className:`section-content-text ${U?" newSection":""}`,"diagnostic-id":"section-content-text",dangerouslySetInnerHTML:{__html:B}}):x?n.jsx("div",{className:`composer-image-section${U?" newSection":""}`,children:n.jsx("img",{src:x,alt:""})}):"",n.jsxs("button",{onClick:()=>{k(!0),u(!0)},className:"section-delete-btn","diagnostic-id":"section-delete-btn",children:[n.jsx("i",{className:"material-icons",children:"delete"}
128),"DELETE"]}),N&&n.jsx(XPe,{setDeleteModal:k,handleDelete:A,setIsDelete:u})]})})}const ZPe=e=>({disclosureText:e.auth.user.company.disclosure_text,sections:e.composer?.piece?.sections,userId:e.auth.user&&e.auth.user.id,cpId:e.composer.piece.id,chartLibrary:e.chartlibrary,newSectionId:e.composer.newSectionId}),JPe=le(ZPe,{deleteSection:Dbe,setScrim:hn,editClientPieceSection:lm})(zt(QPe));function eIe(e){const{addSection:t,userId:r,cpId:i,setScrim:a,setSectionEditing:s,composer:o,engagePermissions:l,canUseEngage:c,isDirty:h,setDirty:u,allowPartner:d,canUsePartner:p}=e,[f,m]=y.useState(!1),[g,x]=y.useState(!1),[v,b]=y.useState(!1),[j,w]=y.useState(!1),S=!0,_=o.piece,C=l.max_engage_clientpiece_charts,E=_.num_charts>=C,P=()=>{c&&E&&_.engage_shared?.length>0?b(!0):m(!0)},T=()=>{x(!0),a(!0)},N=()=>{w(!1),u(!1)},k=async U=>{U.preventDefault();const L=Rp.sanitize("<div class='section-break'></div>");await t(r,i,L,"section_break",void 0,e.index)},I=async U=>{U.preventDefault();const L=Rp.sanitize("<div class='page-break'></div>");await t(r,i,L,"page_break",void 0,e.index)},D=f&&n.jsx(aS,{modal:f,setModal:m,index:e.index,isChartsLoaded:e.isChartsLoaded,setSectionEditing:s}),O=v&&n.jsx(Nu,{setMaxChartsModal:b,maxChartsModal:v,inClientPiece:S,setChartLibraryModal:m,sharedContentDisplayType:"commentary",maxCharts:C}),$=j&&n.jsx(iS,{modal:j,setModal:w,isDirty:h,setDirty:u,handleCancel:N,index:e.index});return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"section-tools",children:[n.jsx("div",{className:"section-tool-line",children:n.jsx("hr",{})}),n.jsx("button",{className:"section-tools-menu",children:n.jsx("i",{className:"material-icons",children:"add"})}),n.jsxs("div",{className:"section-tool-btns",children:[n.jsx(Ke,{title:"Add a new section",placement:"top",children:n.jsx("button",{"diagnostic-id":"add-section-text-btn",onClick:T,children:n.jsx("i",{className:"material-icons",children:"edit_note"})})}),n.jsx(Ke,{title:"Add a chart",placement:"top",children:n.jsx("button",{"diagnostic-id":"add-section-chart-btn",onClick:P,children:n.jsx("i",{className:"material-icons",children:"insert_chart"})})}),d&&p&&n.jsx(Ke,{title:"Add an image",placement:"top",children:n.jsx("button",{"diagnostic-id":"add-section-img-btn",onClick:()=>w(!0),children:n.jsx("i",{className:"material-icons",children:"panorama"})})}),n.jsx(Ke,{title:"Add a PDF text break",placement:"top",children:n.jsx("button",{"diagnostic-id":"add-section-break-btn",onClick:k,children:n.jsx("i",{className:"material-icons",children:"align_vertical_top"})})}),n.jsx(Ke,{title:"Add a PDF page break",placement:"top",children:n.jsx("button",{"diagnostic-id":"add-page-break-btn",onClick:I,children:n.jsx("i",{className:"material-icons",children:"insert_page_break"})})})]})]}),D,O,g&&n.jsx(mc,{index:e.index,showQuill:g,setShowQuill:x,isEditing:null,setIsEditing:null,setScrim:a,showDisclosures:null,setShowDisclosures:null,editedDisclosure:null,setEditedDisclosure:null}),$]})}const tIe=e=>({sections:e.composer.piece.sections,composer:e.composer,userId:e.auth.user&&e.auth.user.id,cpId:e.composer.piece.id,engagePermissions:e.auth.user&&e.auth.user.company&&e.auth.user.company.engage_permissions,canUseEngage:e.auth.user&&e.auth.user.can_use_engage,canUsePartner:e.auth&&e.auth.user&&e.auth.user.can_use_partner,allowPartner:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.partner_permissions&&e.auth.user.company.partner_permissions.allow_partner}),BI=le(tIe,{addSection:ku})(zt(eIe));function nIe(e){const{updateSectionOrder:t,sections:r,composerDisclosure:i,isChartsLoaded:a,chartLibrary:s,inEditMode:o,changeHeader:l,setChangeHeader:c,progress:h,setProgress:u,composerPiece:d,dismissError:p,setDismissError:f,getClientPieceSummary:m,userId:g,setIsProcessing:x,isProcessing:v,setFillBar:b,fillBar:j,getClientPiece:w,isRemixing:S}=e,[_,C]=y.useState(!1),[E,P]=y.useState(!1),[T,N]=y.useState(!1),[k,I]=y.useState(!1),[D,O]=y.useState(""),[$,U]=y.useState(!1),[B,L]=y.useState(!1),[A,R]=y.useState(!1),F=s.charts,{Processing:q,Succeeded:V,Failed:X}=Lj,M=ti(i);y.useEffect(()=>{_||E||k||B||A?document.body.classList.add("modal-open"):document.body.classList.remove("modal-open")},[_,E,k,B,A]);const W=5e3;y.useEffect(()=>{x(d?.remix_status===q)},[d?.id]),y.useEffect(()=>{let pe;if(d?.remix_status===q){m(g,d?.id),pe=setInterval(()=>m(g,d?.id),W);const be=new Date().getTime()/1e3,ye=new Date(d?.update_datetime).getTime()/1e3;be-ye>=10?setTimeout(()=>{u(100/3)},100):setTimeout(()=>{u(10)},100);const fe=setInterval(()=>{u(se=>{const ge=100*(1-Math.exp(-.02*(se+1)));return Math.min(100,ge)})},W);return()=>{b(!0),u(100),clearInterval(pe),clearInterval(fe)}}},[d?.remix_status]),y.useEffect(()=>{j&&setTimeout(()=>{c(!0),x(!1),b(!1),u(0)},W+1)},[j]);const K=()=>{N(!T)},z=async pe=>{pe.destination||N(!1);const{source:be,destination:ye}=pe,fe=r[be.index].id;K(),await t(fe,be?.index,ye?.index)},Y=pe=>{pe.preventDefault(),C(!_),e.setScrim(!0)};y.useEffect(()=>{r?.length===0?U(!0):U(!1)},[r?.length]);const ie=()=>{c(!1),w(d.id,g)},ne=n.jsxs(n.Fragment,{children:[n.jsx(Mu,{onDragEnd:z,onDragStart:()=>N(!0),children:n.jsx(fc,{droppableId:"droppable",children:(pe,be)=>n.jsxs("div",{...pe.droppableProps,ref:pe.innerRef,children:[r?.map((ye,ke)=>n.jsxs("div",{children:[!T&&n.jsx(BI,{index:ke,setScrim:e.setScrim,isChartsLoaded:a,setSectionEditing:L}
128),n.jsx($u,{draggableId:ye?.id?ye.id.toString():ke.toString(),index:ke,isDragDisabled:B||A,children:(fe,se)=>n.jsx("div",{className:`composer-section-wrapper ${T?"droppable":""}`,children:n.jsx("div",{className:`composer-section ${se.isDragging?"is-dragging":"draggable"}`,id:"composer-section",ref:fe.innerRef,...fe.draggableProps,...fe.dragHandleProps,style:{...fe.draggableProps.style},children:n.jsx(JPe,{index:ke,section:ye,sectionContent:ye?.content,sectionEditing:B,setSectionEditing:L,isDelete:A,setIsDelete:R,chartSection:ye?.type==="chart"&&ye.chart_snapshot?.chart_snapshot_image_jpg_url,chartToBeUpdated:ye?.type==="chart"&&F.filter(ge=>ge.id===ye.chart_snapshot?.chart_id&&ge.update_datetime>ye.chart_snapshot?.chart_update_datetime),sectionBreak:ye?.type==="section_break"&&ye.content,pageBreak:ye?.type==="page_break"&&ye.content,imageSection:ye?.type==="image"&&ye.image_url,isChartsLoaded:a})})})},ye?.id+1),ke===r.length-1&&!T&&n.jsx(BI,{setScrim:e.setScrim,setSectionEditing:L,isChartsLoaded:a,index:ke<=r.length-1?ke+1:ke})]},ke)),$&&n.jsx(UI,{modal:E,setModal:P,setSectionEditing:L}),pe.placeholder]})})}),_?n.jsx(mc,{isEditing:k,setIsEditing:I,showDisclosures:_,setShowDisclosures:C,editedDisclosure:D,setEditedDisclosure:O,setScrim:e.setScrim,setSectionEditing:L}):n.jsxs("div",{className:"composer-disclosures-wrapper",children:[n.jsxs("button",{onClick:Y,className:"disclosures-edit-btn",children:[n.jsx("i",{className:"material-icons edit-icon",children:"edit"}),"EDIT"]}),n.jsx("div",{className:"disclosures-scrim"}),n.jsx("div",{className:"disclosures-content",dangerouslySetInnerHTML:{__html:!_&&!i?"Enter your disclosures here...":M}})]})]}),ve=n.jsxs(n.Fragment,{children:[r.map((pe,be)=>n.jsx("div",{children:n.jsx(dc,{id:"react-quill-id",readOnly:!0,modules:vm,value:pe?.content||(pe?.chart_snapshot?.chart_snapshot_thumb_jpg_url||pe?.image_url)&&`<img src=${pe?.chart_snapshot?.chart_snapshot_image_jpg_url||pe?.image_url} />`})},be)),$&&n.jsx(UI,{modal:E,setModal:P,setSectionEditing:L,isReadOnly:!0}),M&&n.jsx("div",{className:"composer-disclosures-wrapper",children:n.jsx("div",{className:"disclosures-content",dangerouslySetInnerHTML:{__html:M}})})]});return n.jsx(n.Fragment,{children:n.jsxs("div",{className:`workspace-container${o?"":" composer-read-only"}`,children:[n.jsx("div",{className:"composer-remixing",children:d?.remix_status===V||d?.remix_status===q?v?n.jsxs(n.Fragment,{children:[n.jsx("h3",{className:"remixing-header",children:"Remixing your commentary..."}),n.jsx("div",{className:"remixing-subheader",children:"This may take up to a minute"}),n.jsx(o0,{progress:h})]}):l?n.jsxs(n.Fragment,{children:[n.jsx("h3",{className:"remixing-header",children:"Your commentary has been remixed and is now unique"}),n.jsx("div",{className:"remix-completed","diagnostic-id":"remix-completed",children:n.jsx("span",{children:n.jsx("i",{className:"material-icons",children:"done"})})}),n.jsx("button",{className:"btn btn-primary","diagnostic-id":"view-cp-btn",onClick:ie,children:"View Commentary"})]}):n.jsx(n.Fragment,{}):d?.remix_status===X&&!p&&d?.is_remix_allowed&&!S?n.jsxs("div",{id:"composer-remix-error-placeholder",children:[n.jsx("div",{className:"composer-remix-error-icon",children:n.jsx("i",{className:"material-icons",children:"error"})}),n.jsx("h4",{children:"There was a problem remixing your commentary. Please try again or contact us for assistance."}),n.jsxs("div",{className:"button-group",children:[n.jsx("button",{className:"btn-cancel","diagnostic-id":"cancel-btn",onClick:()=>f(!0),children:"Dismiss"}),n.jsx("button",{className:"btn-primary",onClick:()=>window.Intercom("show"),children:"Contact Us"})]})]}):n.jsx(n.Fragment,{})}),o?ne:ve]})})}const rIe=e=>({selectedChartIds:e.chartbooks?.item?.selectedChartIds,userId:e.auth.user&&e.auth.user.id,cbId:e.chartbooks.item&&e.chartbooks.item.id,charts:e.chartbooks?.chartLibrary?.charts,sections:e.composer.piece?.sections,composerDisclosure:e.composer.piece?.disclosures,chartLibrary:e.chartlibrary,canRemix:e.composer&&e.composer.piece&&e.composer.piece.can_remix,isRemixing:e.composer&&e.composer.piece&&e.composer.piece.isRemixing}
128),iIe=le(rIe,{updateSectionOrder:Ibe,editClientPieceDisclosures:n$,getClientPiece:Tu,getClientPieceSummary:Nbe})(nIe);function aIe(e){const{loadId:t,userId:r,cachedPieceId:i,getClientPiece:a,onError:s}=e,o=i!=null&&i===t,[l,c]=y.useState(()=>!o),[h,u]=y.useState(!1),d=y.useRef(a),p=y.useRef(s),f=y.useRef(i),m=y.useRef(!0),g=y.useRef(null),x=y.useRef(null),v=y.useRef(null);return y.useEffect(()=>{d.current=a,p.current=s},[a,s]),y.useEffect(()=>{f.current=i},[i]),y.useEffect(()=>(m.current=!0,()=>{m.current=!1}),[]),y.useEffect(()=>{const b=g.current;if(!Number.isFinite(t)||!r){g.current=null,x.current=null,v.current=null,c(!1),u(!1);return}const j=`${t}:${r}`;if(g.current=t,x.current===j&&b===t){u(!0),c(!(f.current!=null&&f.current===t));return}x.current=j;const w={};v.current=w;const S=f.current!=null&&f.current===t;c(!S),u(!0),Promise.resolve(d.current(t,r)).then(()=>{v.current===w&&(x.current=null,v.current=null),!(!m.current||g.current!==t)&&(c(!1),u(!1))},_=>{if(v.current===w&&(x.current=null,v.current=null),!m.current||g.current!==t)return;const C=!!(_&&_.isPartnerInsightLocked);c(!1),u(!1),p.current?.(S,C)})},[t,r]),{waitForData:l,isRefreshing:h}}function sIe(e){const{getClientPiece:t,getCharts:r,composer:i,userId:a,setScrim:s,cpId:o,match:l,isRemixing:c}=e,[h,u]=y.useState(!1),[d,p]=y.useState(!1),[f,m]=y.useState(!1),[g,x]=y.useState(!1),[v,b]=y.useState(0),[j,w]=y.useState(!1),[S,_]=y.useState(!1),[C,E]=y.useState(!1),{Processing:P,Succeeded:T,Failed:N}=Lj;y.useEffect(()=>{p(!0),r().then(()=>{u(!0),p(!1)})},[]);const k=Number(l.params.id);y.useEffect(()=>{s(!1)},[l.params.id]);const{waitForData:I,isRefreshing:D}=aIe({loadId:k,userId:a,cachedPieceId:i?.piece?.id,getClientPiece:t,onError:(L,A)=>{(!L||A)&&e.history.push("/insights?view=composer")}}),O=i?.piece,$=O?.remix_status===P||O?.remix_status===N&&O?.is_remix_allowed&&!f&&!c||O?.remix_status===T&&(j||C),U=n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"back-link-wrapper",children:n.jsxs(Ze,{to:{pathname:"/insights",search:"?view=composer"},className:"back-link","diagnostic-id":"composer-back-btn",children:[n.jsx(ir,{}),n.jsx("span",{children:"Back to Composer"})]})}),n.jsx(da,{}),n.jsxs("div",{className:"composer-editor-wrapper",children:[n.jsx("div",{id:"scrim",className:`remix-scrim${$?"":" inactive"}`}),n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(hPe,{composerPiece:O,inEditMode:g,setInEditMode:x,changeHeader:j,setChangeHeader:w,setDismissError:m,setIsProcessing:_,isProcessing:S,setFillBar:E,isDirty:e.isDirty,setDirty:e.setDirty})})}),n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(iIe,{composerPiece:O,cpId:o,setScrim:s,isChartsLoaded:h,inEditMode:g,setInEditMode:x,changeHeader:j,setChangeHeader:w,progress:v,setProgress:b,setDismissError:m,dismissError:f,setIsProcessing:_,isProcessing:S,setFillBar:E,fillBar:C})})})]})]}),B=D&&!I;return n.jsxs(n.Fragment,{children:[d?n.jsx("span",{"diagnostic-id":"composer-chart-library-loading-indicator",children:n.jsx(Dn,{})}):null,c?n.jsx("span",{"diagnostic-id":"composer-remixing-indicator",children:n.jsx(Dn,{})}):null,B?n.jsx("span",{"diagnostic-id":"composer-refresh-on-open-indicator",children:n.jsx("span",{style:{position:"fixed",top:8,right:8,zIndex:1e3,fontSize:"12px",color:"#fff",background:"rgba(20,20,20,0.75)",padding:"2px 8px",borderRadius:"4px",boxShadow:"0 1px 3px rgba(0,0,0,0.35)"},children:"Refreshing…"})}):null,n.jsx("div",{className:"container",children:!I&&i&&i.piece&&i.piece.id===k&&U})]})}const oIe=e=>({composer:e.composer,userId:e.auth.user&&e.auth.user.id,cpId:e.composer.piece&&e.composer.piece.id,isRemixing:e.composer&&e.composer.piece&&e.composer.piece.isRemixing}),lIe=le(oIe,{setScrim:hn,getClientPiece:Tu,getCharts:lc})(zt(sIe));function cIe(e){const{sharedContent:t,selectedTab:r,setSelectedTab:i}=e;return n.jsxs("div",{className:`content-settings-container${r==="3"?" open":" close"}`,children:[n.jsx("div",{className:"content-settings-header","diagnostic-id":"content-analytics-header",id:"3",onClick:a=>i(a.currentTarget.id),children:n.jsxs("h4",{children:[n.jsx("i",{className:"material-icons",children:"insights"}),"Analytics"]})}),n.jsx("div",{className:"content-settings-workspace",children:n.jsxs("div",{className:"content-settings-form",children:[n.jsxs("div",{className:"col s12 m6 l6 title-group",children:[n.jsx("div",{children:"Shared Content Title"}),n.jsx("h6",{className:"truncate",children:t.title})]}),n.jsxs("div",{className:"col s12 m6 l6 date-group",children:[n.jsx("div",{children:"Last Shared Date"}),n.jsxs("div",{className:"last-shared-date",children:[n.jsx(gn,{local:!0,format:"MMM D, YYYY",children:t.create_datetime})," "]})]}),n.jsxs("div",{className:"analytics-group",children:[n.jsx("div",{className:"col s4 analytics-view",children:n.jsxs("div",{className:"analytics-data",children:[n.jsx("h3",{className:"analytics-count",children:"87"}),n.jsx("div",{className:"analytics-label",children:"Views"})]})}),n.jsx("div",{className:"col s4 analytics-click",children:n.jsxs("div",{className:"analytics-data",children:[n.jsx("h3",{className:"analytics-count",children:"3"}),n.jsx("div",{className:"analytics-label",children:"Contact Button Clicks"})]})}),n.jsx("div",{className:"col s4 analytics-time",children:n.jsxs("div",{className:"analytics-data",children:[n.jsx("h3",{className:"analytics-count",children:"2m 30s"}),n.jsx("div",{className:"analytics-label",children:"Average Time on Page"})]})})]}),n.jsxs("div",{className:"last-embedded-location-group",children:[n.jsx("div",{className:"subheader",children:"Last Embedded Location"}),n.jsx("div",{className:"content-link-group",children:"https://www.everestwealth.com/insights/20230424-important-charts"})]})]})})]})}function dIe(e){const{userId:t,sharedContent:r,isDirty:i,setDirty:a,setScrim:s,selectedTab:o,setSelectedTab:l,editEngageSharedContentSettings:c,get
128SharedItem:h}=e,u=5e3,d={personalizedMsg:r.summary_text||""},p=_t().shape({personalizedMsg:Ae().max(5e3,"Personalized message is too long")});return n.jsx("div",{className:`content-settings-container${o==="4"?" open":" close"}${i&&o==="4"?" edit":""}`,children:n.jsx(gt,{initialValues:d,onSubmit:(f,{setSubmitting:m})=>{const g={summary_text:f.personalizedMsg};c(r.id,t,g,r.type).then(()=>{h(r.id,t,`${r.type}s`)}).then(()=>m(!1)),l("1"),s(!1),a(!1)},validationSchema:p,enableReinitialize:!0,children:f=>{const{values:m,touched:g,errors:x,dirty:v,isSubmitting:b,handleReset:j}=f;return o==="4"&&v!==i&&a(v),n.jsxs(vt,{children:[n.jsxs("div",{className:"content-settings-header","diagnostic-id":"personalized-msg-header",id:"4",onClick:w=>l(w.currentTarget.id),children:[n.jsxs("h4",{children:[n.jsx("i",{className:"material-icons",children:"comment"}),"Add a Personalized Message"]}),o==="4"&&n.jsxs("div",{className:"content-settings-btn-group",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"content-settings-cancel-btn",onClick:j,disabled:!v||b,children:"Cancel"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"content-settings-save-btn",disabled:!v||!!Object.keys(x).length||b,children:"Save & Continue"})]})]}),n.jsx(n.Fragment,{children:n.jsxs("div",{className:"content-settings-workspace personalized-message-group",children:[n.jsx("p",{children:"Write a personalized message that will be shown above the shared insight"}),n.jsxs("p",{className:"character-count",children:[u-m.personalizedMsg.length," characters left"]}),n.jsx("div",{className:"content-settings-form",children:n.jsxs("div",{className:"settings-form-section",children:[n.jsx(me,{component:"textarea",id:"personalizedMsg","diagnostic-id":"personalizedMsg-input",placeholder:"Write a message...",name:"personalizedMsg",maxLength:u,className:x.personalizedMsg&&g.personalizedMsg?"text-input error":""}),x.personalizedMsg&&g.personalizedMsg&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:x.personalizedMsg})]})})]})})]})}})})}const uIe=e=>({userId:e.auth.user&&e.auth.user.id,engage:e.engage}),hIe=le(uIe,{setScrim:hn,editEngageSharedContentSettings:AM,getSharedItem:c0})(dIe);function pIe(e){const{userId:t,sharedContent:r,editEngageSharedContentSettings:i,getSharedItem:a,setDirty:s,isDirty:o,setScrim:l,sharedContentDisplayType:c,selectedTab:h,setSelectedTab:u}=e,{chartbookType:d,clientpieceType:p,insightsVideoType:f,partnerInsightType:m}=Ei,g={show_title:r.show_title,show_cover_page:r.show_cover_page,show_carousel:r.show_carousel,show_summary_text:r.show_summary_text,summary_text:r.summary_text||"",show_notes:r.show_notes,include_contact:r.include_contact,show_header:r.show_header,show_author_name:r.show_author_name,show_profile_picture:r.show_profile_picture},x=_t().shape({show_title:cr(),show_cover_page:cr(),show_carousel:cr(),show_summary_text:cr(),summary_text:Ae().max(5e3,"Summary text section is too long"),show_notes:cr(),include_contact:cr(),show_header:cr(),show_author_name:cr(),show_profile_picture:cr()}),v=r?.partner_insights?.length>0;return n.jsx("div",{className:`content-settings-container${h==="2"?" open":" close"}${o&&h==="2"?" edit":""}`,children:n.jsx(gt,{initialValues:g,onSubmit:(b,{setSubmitting:j})=>{const w={show_title:b.show_title,show_cover_page:b.show_cover_page,show_carousel:b.show_carousel,show_summary_text:b.show_summary_text,show_notes:b.show_notes,include_contact:b.include_contact,show_header:b.show_header,show_author_name:b.show_author_name,show_profile_picture:b.show_profile_picture,summary_text:b.summary_text};i(r.id,t,w,r.type).then(()=>{a(r.id,t,`${r.type}s`)}).then(()=>j(!1)),u("1"),l(!1),s(!1)},validationSchema:x,enableReinitialize:!0,children:b=>{const{values:j,touched:w,errors:S,dirty:_,isSubmitting:C,setFieldValue:E,handleChange:P,handleReset:T}=b;return h==="2"&&_!==o&&s(_),n.jsxs(vt,{children:[n.jsxs("div",{className:"content-settings-header","diagnostic-id":"customize-content-header",id:"2",onClick:N=>u(N.currentTarget.id),children:[n.jsxs("h4",{children:[n.jsx("i",{className:"material-icons",children:"settings"}),"Customize Shared Content"]}),h==="2"&&n.jsxs("div",{className:"content-settings-btn-group",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"content-settings-cancel-btn",onClick:T,disabled:!_||C,children:"Cancel"}),n.jsx("button",{type:v?"button":"submit",className:"btn btn-primary","diagnostic-id":"content-settings-save-btn",disabled:v,children:r.type===m?"Save":"Save & Continue"})]})]}),n.jsx(n.Fragment,{children:n.jsxs("div",{className:"content-settings-workspace",children:[n.jsxs("p",{children:["Customize how the ",c," will look on your website."]}),n.jsxs("div",{className:"content-settings-form",children:[r.type===m?n.jsx(n.Fragment,{}):n.jsx("div",{className:"col s12 m6 l6",children:r.type===d?n.jsxs(n.Fragment,{children:[n.jsx("h5",{children:"Chartbook Display"}),n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"show_title",id:"show_title",className:"filled-in",onChange:N=>{const k=N.target.checked;E("show_title",k)},checked:j.show_title}),n.jsx("span",{"diagnostic-id":"show-title-toggle",children:"Show the chartbook title (affects embedded content only)"})]}),n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"show_cover_page",id:"show_cover_page",className:"filled-in",onChange:N=>{const k=N.target.checked;E("show_cover_page",k)},checked:j.show_cover_page}),n.jsx("span",{"diagnostic-id":"show-cover-toggle",children:"Show the chartbook cover page"})]}),n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"show_carousel",id:"show_carousel",className:"filled-in",onChange:N=>{const k=N.target.checked;E("show_carousel",k)},checked:j.show_carousel}),n.jsx("span",{"diagnostic-id":"show-preview-toggle",children:"Show the slide preview carousel"})]}),n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"show_notes",id:"show_notes",className:"filled-in",onChange:N=>{const k=N.target.checked;E("show_notes",k)},checked:j.show_notes}),n.jsx("span",{"diagnostic-id":"show-notes-toggle",children:"Show talking points"})]}),n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"show_summary_text",id:"show_summary_text",className:"filled-in",onChange:N=>{const k=N.target.checked;E("show_summary_text",k)},checked:j.show_summary_text}),n.jsx("span",{"diagnostic-id":"show-summary-toggle",children:"Show summary paragraph"}),n.jsxs("div",{className:"character-count",children:[5e3-j.summary_text.length," characters left"]}),n.jsx(me,{id:"summary_text","diagnostic-id":"summary-text",name:"summary_text",placeholder:"Write a short summary...",onChange:P,value:j.summary_text,component:Ra,disabled:!j.show_summary_text,maxLength:"5000"})]})]}):r.type===p?n.jsxs(n.Fragment,{children:[n.jsx("h5",{children:"Commentary Display"}),n.jsx("div",{className:"settings-section-label",children:"Affects embedded shared content only:"}),n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"show_header",id:"show_header",className:"filled-in",onChange:N=>{const k=N.target.checked;E("show_header",k)},checked:j.show_header}),n.jsxs("span",{"diagnostic-id":"show-header-toggle",children:["Show the header (includes title, date, and author)",n.jsxs("label",{className:"show-author-name-toggle",children:[n.jsx("input",{type:"checkbox",name:"show_author_name",id:"show_author_name",className:"filled-in",onChange:N=>{const k=N.target.checked;E("show_author_name",k)},checked:j.show_author_name,disabled:!j.show_header}),n.jsx("span",{"diagnostic-id":"show-author-toggle",children:"Show author name"})]}),n.jsxs("label",{className:"show-profile-picture-toggle",children:[n.jsx("input",{type:"checkbox",name:"show_profile_picture",id:"show_profile_picture",className:"filled-in",onChange:N=>{const k=N.target.checked;E("show_profile_picture",k)},checked:j.show_profile_picture,disabled:!j.show_header||!j.show_author_name}),n.jsx("span",{"diagnostic-id":"show-profile-toggle",children:"Show author profile picture"})]})]})]})]}):r.type===f?n.jsxs(n.Fragment,{children:[n.jsx("h5",{children:"Insights Video Display"}),n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"show_title",id:"show_title",className:"filled-in",onChange:N=>{const k=N.target.checked;!v&&E("show_title",k)},checked:j.show_title,disabled:v}),n.jsx("span",{"diagnostic-id":"show-title-toggle",children:"Show the insights video title (affects embedded content only)"})]}),n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"show_summary_text",id:"show_summary_text",className:"filled-in",onChange:N=>{const k=N.target.checked;!v&&E("show_summary_text",k)},checked:j.show_summary_text,disabled:v}),n.jsx("span",{"diagnostic-id":"show-summary-toggle",children:"Show summary paragraph"}),n.jsxs("div",{className:"character-count",children:[5e3-j.summary_text.length," characters left"]}),n.jsx(me,{id:"summary_text","diagnostic-id":"summary-text",name:"summary_text",placeholder:"Write a short summary...",onChange:P,value:j.summary_text,component:Ra,disabled:!j.show_summary_text,maxLength:"5000"})]})]}):n.jsx(n.Fragment,{})}),n.jsxs("div",{className:r.type===m?`col s12 m9 l9 ${m}`:"col s12 m6 l6",children:[n.jsx("h5",{children:"Contact information and button"}),n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"include_contact",id:"include_contact",className:"filled-in",onChange:N=>{const k=N.target.checked;!v&&E("include_contact",k)},checked:j.include_contact,disabled:v}),n.jsx("span",{"diagnostic-id":"include-contact-toggle",children:'Include contact information and a "Contact Us" button'})]}),n.jsxs("div",{className:"engage-settings-link",children:["Customize hosted pages and set additional contact settings under"," ",n.jsx(Ze,{"diagnostic-id":"engage-settings-link",to:{pathname:"/insights",search:"?view=engagesettings"},children:"Engage Settings"})]})]})]})]})})]})}})})}const fIe=e=>({userId:e.auth.user&&e.auth.user.id,showSpinner:e.engage.showSpinner}),mIe=le(fIe,{editEngageSharedContentSettings:AM,getSharedItem:c0,setScrim:hn})(pIe);function gIe(e){const{sharedContent:t,isActive:r,setIsActive:i,toggleSharedItemStatus:a,userId:s,engage:o,engagePermissions:l,allowedDomain:c,companySettings:h,sharedContentDisplayType:u,selectedTab:d,setSelectedTab:p,copyToClipBoard:f,createMessage:m,downloadEmailTemplate:g}=e,[x,v]=y.useState(!1),[b,j]=y.useState(!1),[w,S]=y.useState(!1),[_,C]=y.useState(!1),{chartbookType:E,clientpieceType:P,insightsVideoType:T,partnerInsightType:N}=Ei,k="hosted",I="embed",D=o.numSharedChartbooks,O=o.numSharedCl
128ientPieces,$=o.numSharedInsightsVideos,U=l.max_engage_chartbooks,B=l.max_engage_clientpieces,L=l.max_engage_insightsvideos,A=o.numSharedPartnerInsights,R=l.max_engage_partner_insights,F=Y=>Y===E&&D<U||Y===P&&O<B||Y===T&&$<L||Y===N&&A<R;let q=!1,V;t.type===E?(V=l.max_engage_charts,q=t.num_charts>V):t.type===P&&(V=l.max_engage_clientpiece_charts,q=t.num_charts>l.max_engage_clientpiece_charts);const X=Y=>{if(Y.stopPropagation(),Y.preventDefault(),!F(t.type)){v(!0);return}if(t.type===E){if(q){j(!0);return}}else if(t.type===P&&q){j(!0);return}a(s,t,t.type)},[M,W]=y.useState("");y.useEffect(()=>{r&&t.type===N?(S(!0),f(s,t,t.type).then(Y=>{W(Y.data.data),Y.status===200&&S(!1)})):S(!1)},[r,t.summary_text,s,t.type,f]);const K=()=>{S(!0),setTimeout(()=>{navigator.clipboard.writeText(M),S(!1),m({alertMessage:"Shareable HTML Code Copied to Clipboard"})},750)},z=()=>{C(!0),g(s,t,t.type).then(Y=>{const ie=Y.headers["content-disposition"].split("filename=")[1].slice(1,-1),ne=URL.createObjectURL(Y.data),ve=document.createElement("a");ve.href=ne,ve.setAttribute("download",ie),document.body.appendChild(ve),ve.click(),document.body.removeChild(ve),URL.revokeObjectURL(ne),C(!1),Y.status===200&&m({alertMessage:"Shareable HTML Downloaded"})}).catch(Y=>{Y.message!==Ue&&e.createMessage({serverError:"There was a problem downloading this html file, please try again"}),C(!1)})};return n.jsxs("div",{className:`content-settings-container${d==="1"?" open":" close"}`,children:[n.jsxs("div",{className:"content-settings-header","diagnostic-id":"share-with-clients-header",id:"1",onClick:Y=>p(Y.currentTarget.id),children:[n.jsxs("h4",{children:[n.jsx("i",{className:"material-icons",children:"screen_share"}),"Share With Clients"]}),d==="1"?r?n.jsxs("div",{className:"btn-primary-icon-text",children:[n.jsx("i",{className:"material-icons",children:"done"}),"Activated"]}):n.jsx("div",{className:"content-settings-btn-group",children:n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"content-activate-btn",onClick:X,children:"Activate"})}):n.jsx(n.Fragment,{})]}),n.jsx("div",{className:"content-settings-workspace",children:n.jsxs("div",{className:"content-settings-form",children:[n.jsxs("div",{className:"settings-form-section",children:[n.jsx("h4",{children:"Share this link with clients"}),n.jsxs("p",{className:"subheader",children:["Share this link to a Clearnomics-hosted page via email, social media, etc. Customize the look of your hosted pages under"," ",n.jsx(Ze,{"diagnostic-id":"engage-settings-link",to:{pathname:"/insights",search:"?view=engagesettings"},children:"Engage Settings."})]}),n.jsx("div",{className:"content-link-group",children:n.jsx(Gs,{snippet:t.engage_key.hosted_url,embedType:k,isActive:r})}),t.include_contact&&(h?.button_action==="redirect"&&!h?.contact_custom_url||h?.button_action==="mailto"&&!h?.contact_email)?n.jsxs("div",{className:"no-action-warning-message","diagnostic-id":"no-action-warning-message","data-testid":"no-action-warning-message",children:[n.jsx("i",{className:"material-icons",children:"warning"}),n.jsxs("div",{className:"banner-text","diagnostic-id":"banner-text",children:["This shared content includes a contact button with no associated action. Go to"," ",n.jsx(Ze,{to:{pathname:"/insights",search:"?view=engagesettings"},children:"Engage Settings"})," ","to set an email or URL."]})]}):n.jsx(n.Fragment,{})]}),n.jsxs("div",{className:"settings-form-section",children:[n.jsx("h4",{children:t.type===N?"Share this in an email marketing campaign":"Embed on your website using HTML"}),n.jsx("p",{className:"subheader",children:t.type===N?"Use this HTML code with an email template. This functionality is compatible with email platforms that support HTML templates/campaigns. Recommended for advanced users only.":"Copy and paste this code snippet into your website. Recommended for advanced users only."}),t.type===N?n.jsxs("div",{className:"content-link-group content-buttons",children:[n.jsx(Ke,{title:r?"":"Activate this shared content to use the email template",placement:"top",children:n.jsx("span",{className:"email-template-share-buttons",children:n.jsx("button",{type:"button",className:"btn-secondary","diagnostic-id":"copy-html-clipboard-btn",onClick:K,disabled:!r||w,children:w?n.jsx(ur,{size:"1.25em",thickness:8,variant:"indeterminate"}):"Copy HTML to Clipboard"})})}),n.jsx(Ke,{title:r?"":"Activate this shared content to use the email template",placement:"top",children:n.jsx("span",{className:"email-template-share-buttons",children:n.jsx("button",{type:"button",className:"btn-secondary","diagnostic-id":"download-html-file-btn",disabled:!r||_,onClick:z,children:_?n.jsx(ur,{size:"1.25em",thickness:8,variant:"indeterminate"}):"Download HTML File"})})})]}):n.jsx("div",{className:"content-link-group",children:n.jsx(Gs,{snippet:t.engage_key.embed_code_snippet,embedType:I,isActive:r,sharedContent:t})}),t.type!==N?c?.length>0?n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"subheader",id:"allowed-domain-subheader",children:"This shared content may be embedded on these allowed domains:"}),n.jsxs("div",{id:"allowed-domain-list",children:[n.jsx("div",{id:"allowed-domain-header",className:"domain-list-row",children:"Allowed Domains"}),c.map((Y,ie)=>n.jsx("div",{className:"domain-list-row","diagnostic-id":`allowed-domain-${ie}`,children:Y},ie))]}),n.jsxs("div",{className:"modify-domain-contact",children:["To modify allowed domains, please ",n.jsx("span",{onClick:()=>{window.Intercom("show")},children:"contact us."})]})]}):n.jsxs("div",{className:"allowed-domain-warning-message","diagnostic-id":"allowed-domain-warning-message",children:[n.jsx("i",{className:"material-icons",children:"warning"}),n.jsxs("div",{className:"banner-text","diagnostic-id":"banner-text",children:["There are currently no allowed domains set up for your company. This means that embedded shared content will not display properly on your website. To set up an allowed domain, please ",n.jsx("span",{onClick:()=>{window.Intercom("show")},children:"contact us."})]})]}):n.jsx(n.Fragment,{})]})]})}),x&&n.jsx(gm,{maxSharedModal:x,setMaxedModal:v,sharedContentType:t.type}),b&&n.jsx(Nu,{maxChartsModal:b,setMaxChartsModal:j,isActive:r,sharedContent:t,sharedContentDisplayType:u,setSelectedTab:p,maxCharts:V})]})}const vIe=e=>({userId:e.auth.user&&e.auth.user.id,engage:e.engage,engagePermissions:e.auth.user&&e.auth.user.company&&e.auth.user.company.engage_permissions,allowedDomain:e.auth.user&&e.auth.user.company&&e.auth.user.company.engage_domain_whitelist,companySettings:e.engage&&e.engage.companySettings}),bIe=le(vIe,{toggleSharedItemStatus:ac,copyToClipBoard:bve,createMessage:he,downloadEmailTemplate:yve})(gIe);function yIe(e){const{handleCancel:t,setDirty:r,isDirty:i,userId:a,title:s,editEngageSharedItemHeader:o,sharedContent:l,contentType:c}=e,h=160;return n.jsx(gt,{initialValues:{title:s},onSubmit:u=>{o(l.id,a,u.title,c).then(t)},validationSchema:_t().shape({title:Ae().required("Required").test("is-empty","Title c
128annot be empty",function(u){return u&&!u.split("").every(d=>d===" ")}).max(h)}),children:u=>{const{values:d,touched:p,errors:f,dirty:m,isSubmitting:g}=u;return m!==i&&r(m),n.jsxs(vt,{children:[n.jsxs("div",{className:"form-group",children:[n.jsx("label",{className:"large",children:"Shared Content Title*"}),n.jsxs("div",{className:"character-count",children:[h-d.title.length," characters left"]}),n.jsx(me,{id:"title","diagnostic-id":"header-title-input",name:"title",placeholder:"Client Market Update",maxLength:"160",className:f.title&&p.title?"text-input error":"form-control"}),f.title&&p.title&&n.jsx("div",{className:"input-feedback",children:f.title})]}),n.jsxs("div",{className:"form-group",style:{textAlign:"right",paddingTop:"20px"},children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"header-cancel-btn",onClick:t,children:"Cancel"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"header-save-btn",disabled:!m||!!Object.keys(f).length||g,children:"SAVE"})]})]})}})}const xIe=e=>({userId:e.auth.user&&e.auth.user.id,sharedContent:e.engage&&e.engage.sharedContent}),jIe=le(xIe,{editEngageSharedItemHeader:mve})(yIe);function wIe(e){const{setDirty:t,isDirty:r,toggleSharedItemStatus:i,userId:a,isActive:s,setIsActive:o,setScrim:l,email:c,engage:h,engagePermissions:u,companySettings:d,sharedContent:p,sharedContentDisplayType:f,setSelectedTab:m,partnerInsightSharedContentType:g}=e,[x,v]=y.useState(!1),[b,j]=y.useState(!1),[w,S]=y.useState(!1),[_,C]=y.useState(!1),[E,P]=y.useState(!1),{chartbookType:T,clientpieceType:N,insightsVideoType:k,partnerInsightType:I}=Ei,D=oa(),O=c===p.engage_user,$=p?.partner_insights?.length>0;y.useEffect(()=>{o(p?.is_enabled)},[p.is_enabled]);const U=()=>{v(!0),l(!0)},B=()=>{v(!1),t(!1),l(!1)};let L;switch(p.type){case N:L=p.clientpiece;break;case T:L=p.chartbook;break;case k:L=p.insightsvideo;break;case I:L=p.partnerinsight;break}const A=h.numSharedChartbooks,R=h.numSharedClientPieces,F=h.numSharedInsightsVideos,q=u.max_engage_chartbooks,V=u.max_engage_clientpieces,X=u.max_engage_insightsvideos,M=h.numSharedPartnerInsights,W=u.max_engage_partner_insights,K=be=>be===T&&A<q||be===N&&R<V||be===k&&F<X||be===I&&M<W;let z=!1,Y;p.type===T?(Y=u.max_engage_charts,z=p.num_charts>Y):p.type===N&&(Y=u.max_engage_clientpiece_charts,z=p.num_charts>u.max_engage_clientpiece_charts);const ie=be=>{if(be.stopPropagation(),be.preventDefault(),$)P(!0);else if(s)j(!0);else{if(!K(p.type)){S(!0);return}if(p.type===T){if(z){C(!0);return}}else if(p.type===N&&z){C(!0);return}i(a,p,p.type).then(ye=>{ye&&ye.status===200&&m("1")})}},ne=()=>{$?P(!0):D.push(`/${p.type===N?"commentaries":`${p.type}s`}/${L}`)},ve=n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"shared-content-title-container",children:[n.jsx("div",{className:"shared-content-title-left",children:n.jsx("div",{className:"title-group",children:n.jsxs("div",{className:"shared-content-title-edit",children:[n.jsxs("div",{className:"shared-content-type",children:[$&&n.jsx("i",{className:"material-icons-outlined shared-with-partner-insights-icon",onClick:()=>P(!0),children:"link"}),`${f}${g?` - ${g}`:""}`]}),n.jsxs("div",{id:"shared-content-title-name",children:[p.title,p.include_contact&&(d?.button_action==="redirect"&&!d?.contact_custom_url||d?.button_action==="mailto"&&!d?.contact_email)?n.jsx(Ke,{className:"no-action-tooltip",title:"This shared content includes a contact button with no associated action. Go to Engage Settings to set an email or URL.",placement:"top",children:n.jsx("i",{className:"material-icons","diagnostic-id":"feedback-icon",children:"feedback"})}):n.jsx(n.Fragment,{})]}),n.jsxs("button",{className:"btn-primary-icon-text","diagnostic-id":"header-edit-btn",onClick:U,disabled:$,children:[n.jsx("i",{className:"material-icons",children:"edit"}),"Edit Title"]})]})})}),n.jsx("div",{className:"shared-content-title-right",children:n.jsx("div",{className:"embed-toggle-right",onClick:ie,children:n.jsxs("div",{className:"onoffswitch",children:[n.jsx("input",{type:"checkbox",id:"embed-shared-item",className:"onoffswitch-checkbox",name:"embed-shared-item",onCh
128ange:()=>o(!s),checked:p?.is_enabled}),n.jsxs("label",{className:"onoffswitch-label",htmlFor:"embed-shared-item","diagnostic-id":"embed-form-toggle",children:[n.jsx("span",{className:"onoffswitch-inner"}),n.jsx("span",{className:"onoffswitch-switch"})]})]})})})]}),n.jsxs("div",{className:`shared-content-header-tag-group ${p.type}`,children:[O?p.type===I?n.jsx(n.Fragment,{}):n.jsxs("button",{className:"btn-primary-icon-text","diagnostic-id":"open-original-content-btn",onClick:ne,children:[n.jsx("i",{className:"material-icons",children:"open_in_new"}),"Open Original ",f]}):n.jsxs("div",{className:"owner-caption",children:["Owned by ",p.engage_user]}),n.jsxs("div",{id:"shared-content-edit-date",children:[n.jsx("span",{children:p.last_activated_datetime?p.update_datetime>p.last_activated_datetime?"Settings last updated ":"Shared on ":"Settings last updated "}),n.jsx(gn,{local:!0,format:"MMM D, YYYY h:mma",children:p.last_activated_datetime?p.update_datetime>p.last_activated_datetime?p.update_datetime:p.last_activated_datetime:p.update_datetime})," ",new Date().toLocaleTimeString("en-us",{timeZoneName:"short"}).split(" ")[2]]})]})]}),pe=n.jsx(jIe,{contentId:p?.id,contentType:p.type,title:p?.title,handleCancel:B,isDirty:r,setDirty:t});return n.jsxs("div",{className:"shared-content-header"+(x?" edit":""),children:[x?pe:ve,b&&n.jsx(mm,{toggleModal:b,setToggleModal:j,setIsActive:o,isActive:s,sharedContent:p}),w&&n.jsx(gm,{maxSharedModal:w,setMaxedModal:S,sharedContentType:p.type}),_&&n.jsx(Nu,{maxChartsModal:_,setMaxChartsModal:C,isActive:s,sharedContent:p,sharedContentDisplayType:f,setSelectedTab:m,maxCharts:Y}),E&&n.jsx(ao,{modal:E,setModal:P,partnerInsightShared:p?.partner_insights,sharedType:p.type})]})}const SIe=e=>({userId:e.auth.user&&e.auth.user.id,email:e.auth.user&&e.auth.user.email,engage:e.engage,engagePermissions:e.auth.user&&e.auth.user.company&&e.auth.user.company.engage_permissions,companySettings:e.engage&&e.engage.companySettings}),_Ie=le(SIe,{setScrim:hn,toggleSharedItemStatus:ac,getSharedContent:ic})(zt(wIe));function CIe(e){const{engage:t,setScrim:r,match:i,getSharedItem:a,userId:s,isDirty:o,setDirty:l,getSharedContent:c,displayAnalytics:h,getCompanyEngageSettings:u,companySettings:d}=e,p=t?.sharedContent,[f,m]=y.useState(!0),[g,x]=y.useState(p?.is_enabled),[v,b]=y.useState(""),{chartbookType:j,clientpieceType:w,insightsVideoType:S,partnerInsightType:_}=Ei;y.useEffect(()=>{p?.type===_?p?.is_enabled?b("1"):b("4"):b("1")},[p?.type]),y.useEffect(()=>{(!t.userSharedContent||!t.companySharedContent)&&c(s),!d&&u()},[]),y.useEffect(()=>{r(o)},[o]),y.useEffect(()=>{const T=i.params.id,N=i.params.slug;r(!1),!p||p.id!==T?a(T,s,N==="commentaries"?`${w}s`:N).then(()=>m(!1),()=>{e.history.push("/insights?view=sharedcontent")}):m(!1),Ni.parse(e.location.search).view&&e.history.push(`/engage/${N}/${T}`)},[]);let C="",E="";switch(p?.type){case w:C="commentary";break;case j:C="chartbook";break;case S:C="insights video";break;case _:C="partner insight",p?.insights_type==="custom"||p?.insights_type==="studio"?E="video":p?.insights_type==="clientpiece"?E="commentary":p?.insights_type==="podcast"?E="podcast":E="";break}const P=n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"back-link-wrapper",children:n.jsxs(Ze,{to:{pathname:"/insights",search:"?view=engage"},className:"back-link","diagnostic-id":"back-to-engage-link",children:[n.jsx(ir,{}),n.jsx("span",{children:"Back to Engage"})]})}),n.jsx(da,{}),n.jsxs("div",{className:"shared-content-editor-wrapper",children:[n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(_Ie,{isActive:g,setIsActive:x,sharedContent:p,sharedContentDisplayType:C,setSelectedTab:b,partnerInsightSharedContentType:E})})}),p?.type===_&&n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(hIe,{sharedContent:p,isDirty:o,setDirty:l,selectedTab:v,setSelectedTab:b})})}),n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(bIe,{isActive:g,setIsActive:x,isDirty:o,setDirty:l,sharedContent:p,sharedContentDisplayType:C,selectedTab:v,setSelectedTab:b})})}),n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(mIe,{isDirty:o,setDirty:l,sharedContent:p,sharedContentDisplayType:C,selectedTab:v,setSelectedTab:b})})}),h&&n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(cIe,{isActive:g,setIsActive:x,sharedContent:p,selectedTab:v,setSelectedTab:b})})})]})]});return n.jsx("div",{className:"container",children:!f&&p&&P})}const NIe=e=>({engage:e.engage,userId:e.auth.user&&e.auth.user.id,displayAnalytics:e.engage&&e.engage.companySettings&&e.engage.companySettings.display_analytics,companySettings:e.engage&&e.engage.companySettings}),EIe=le(NIe,{getSharedItem:c0,setScrim:hn,getSharedContent:ic,getCompanyEngageSettings:em})(zt(CIe)),{apiAddress:mF}=Tn,TIe=e=>(t,r)=>(t({type:Z6}),Ne.get(`${mF}api/users/${e}/featured/`,Ee(r)).then(i=>{t({type:J6,payload:i.data})},i=>{t({type:eV})}),!0),kIe=(e,t)=>(r,i)=>{r({type:K6});const a=`${mF}api/users/${t}/featuredclientpieces/${e}/`;return Ne.get(a,Ee(i)).then(s=>{r({type:X6,payload:s.data})},s=>(r({type:Q6}),s.message!==Ue&&r(he({serverError:"There was a problem retrieving this commentary, please try again"})),Promise.reject(()=>{})))};function PIe(e){const{featuredCb:t,user:r,newChartbookFromFeatured:i}=e,[a,s]=y.useState(!1),[o,l]=y.useState(0),c=h=>{h.preventDefault();const u=t.id;i(r.id,u).then(d=>{s(!0),l(d)})};if(a){const h=`chartbooks/${o}`;return n.jsx(jn,{children:n.jsx(qt,{from:"featured",to:h})})}return t?n.jsx(ot,{setModal:e.setChartbookModal,children:n.jsxs("div",{className:"featured-chartbook-modal-container",children:[n.jsx("div",{className:"chart-image-container",children:n.jsx("img",{src:t.charts[0].chart_image_jpg_url,className:"chartbook-modal-image",alt:""})}),n.jsxs("div",{className:"content-container",children:[n.jsx("i",{id:"modal-close-btn",className:"material-icons",onClick:()=>e.setChartbookModal(!1),children:"close"}),n.jsxs("div",{id:"info-container",children:[n.jsx("div",{id:"title",children:t.title}),n.jsxs("div",{id:"date",children:[n.jsx("span",{children:"Updated "}),n.jsx(gn,{local:!0,format:"MMM D, YYYY",children:t.date})," "]})]}),n.jsxs("div",{id:"body-container",children:[n.jsx("div",{id:"featured-chartbook-download",children:n.jsx("button",{className:"btn-primary-icon",onClick:c,children:n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"material-icons",children:"edit"}),"USE THIS CHARTBOOK"]})})}),n.jsx("div",{className:"card-description",children:t.description})]})]})]})}):null}const IIe=e=>({user:e.auth.user}),DIe=le(IIe,{newChartbookFromFeatured:SM})(PIe);function RIe(e){const{featuredClientPiece:t,newClientPieceFromFeatured:r,user:i,showSpinner:a}=e,[s,o]=y.useState(0),[l,c]=y.useState(!1),h=u=>{u.preventDefault(),r(i.id,t.id).then(d=>{setTimeout(()=>{c(!0)},1e3),o(d)})};if(l){const u=`commentaries/${s}`;return n.jsx(jn,{children:n.jsx(qt,{from:"featured",to:u})})}return t?n.jsxs(n.Fragment,{children:[a?n.jsx(Dn,{}):null,n.jsx(ot,{setModal:e.setModal,children:n.jsxs("div",{className:"featured-cp-modal-container",children:[n.jsxs("div",{className:"composer-title-container",children:[n.jsxs("div",{className:"composer-title-left",children:[n.jsx("div",{id:"composer-title-name",children:t.title}),n.jsxs("div",{id:"composer-title-date",children:[n.jsx("span",{children:"Updated "}),n.jsx(gn,{local:!0,format:"MMM D, YYYY",children:t.date})," "]})]}),n.jsxs("div",{className:"composer-title-right",children:[n.jsx("i",{id:"modal-close-btn",className:"material-icons",onClick:()=>e.setModal(!1),children:"close"}),n.jsx("div",{id:"composer-download",children:n.jsx("button",{className:"btn-primary-icon",onClick:h,children:n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"material-icons",children:"edit"}),"CREATE IN COMPOSER"]})})})]})]}),n.jsx("div",{className:"workspace-container",children:t.sections.map((u,d)=>n.jsx("div",{children:n.jsx(dc,{id:"react-quill-id",readOnly:!0,modules:vm,value:u.content||`<img src=${u.chart.chart_image_jpg_url} />`})},u.id??d))})]})})]}):null}const OIe=e=>({featuredClientPiece:e.featured.featuredClientPiece,user:e.auth.user,showSpinner:e.composer.showSpinner}),AIe=le(OIe,{newClientPieceFromFeatured:kbe})(RIe);
128function MIe({insights:e,isSelected:t,noFade:r,showDescription:i,style:a,chartbookTheme:s,onClick:o}){const l=e.preview_chart&&e.preview_chart.chart_image_jpg_url;return n.jsx(n.Fragment,{children:n.jsx("div",{className:`col${r?"":" fadeTransition"}${t?" selected":""}`,style:a,onClick:o,children:n.jsx("div",{className:"featured-insights-card-background",children:n.jsxs("div",{className:`featured-insights-card${t?" selected":""}${i?" show-desc":""}${s?.slide_aspect_ratio==="16:9"?" size-aspect-16-9":""}`,children:[n.jsxs("div",{className:"card-image-container",children:[n.jsx("div",{className:"featured-insights-card-placeholder",children:n.jsx("i",{className:"material-icons",children:"description"})}),n.jsxs("div",{className:"card-image",children:[t&&n.jsx("div",{className:"checkmark",children:n.jsx("i",{className:"material-icons",children:"done"})}),l?n.jsx("img",{alt:"",src:l}):n.jsx("div",{className:"featured-insights-image-placeholder"})]})]}),n.jsx("div",{className:"card-caption",children:n.jsxs("div",{className:"card-caption-left",children:[n.jsx("div",{className:"featured-insights-title-text",children:e.title}),n.jsx("div",{className:"card-description",children:ds(e.description,120)}),n.jsx("div",{className:"featured-insights-datetime",children:n.jsx(gn,{local:!0,format:"MMMM D, YYYY",children:e.update_datetime})})]})})]})})})})}const $Ie=e=>{const t=e.auth.user.company,r=t.chartbook_theme,i=e.auth.user.chartbook_theme;return{chartbookTheme:t.organization_type==="Enterprise"&&r||i}},LIe=le($Ie,{})(MIe);function FIe({elements:e,active:t,type:r,title:i,numPerPage:a,showDescription:s,breakpoints:o,icon:l}){const c=ws(),[h,u]=y.useState(0),[d,p]=y.useState(0),[f,m]=y.useState(0),g=r==="row",x=r==="paginated",v=r==="paginated-row",b=r==="paginated-col";let j;b?c>=600?j=~~((e.length-1)/(a/2))+1:j=e.length:v?c<=600?j=e.length:c<=1280?j=~~((e.length-1)/(a-3))+1:j=e.length:j=~~((e.length-1)/(a||1))+1;const w=d*a,S=e.slice(w,w+a);y.useEffect(()=>{d>=j&&p(j>0?j-1:0)},[e.length,j,d]);const _=()=>{const I=Object.keys(o);for(let D=0;D<I.length;D++)if(c<=~~I[D])return o[I[D]]},C=I=>{let D;b?D=document.getElementById("grid-layout"):v?D=document.getElementById("grid-layout-row"):D=document.querySelector(`[data-gridid='${i}']`);let O;return O=D&&D.children&&D.children[0]&&D.children[0].offsetWidth,O*I},E=I=>{const D=document.querySelector(`[data-gridid='${i}']`),O=Array.from(D.children),$=h+(I==="left"?-1:1);for(const U in O)O[U].style.setProperty("--offset",`-${C($)}px`);u($)},P=`${_()}${v?" nowrap":""}`,T=e.map(I=>n.jsx(I.type,{...I.props,style:{transform:`translateX(-${C(d)+f}px)`,transition:f?"none":"transform 0.5s ease"}},I.key)),N=io({onSwipedLeft:()=>d<j-1&&p(d+1),onSwipedRight:()=>d>0&&p(d-1),onSwiping:I=>m(I.deltaX),onSwiped:()=>m(0)}),k=x?S:b||v?T:e;return t&&e?n.jsxs(n.Fragment,{children:[n.jsxs("div",{id:"grid-layout"+(v?"-row":""),className:P,"data-gridid":i,...N,children:[k,(g||v)&&n.jsxs(n.Fragment,{children:[d!==0&&n.jsx("div",{id:"row-pagination-left",children:n.jsx("button",{className:"btn-navigation",onClick:()=>g?E("left"):p(d-1),children:n.jsx("i",{className:"material-icons",children:"chevron_left"})})}),d<j-1&&n.jsx("div",{id:"row-pagination-right",children:n.jsx("button",{className:"btn-navigation",onClick:()=>g?E("right"):p(d+1),children:n.jsx("i",{className:"material-icons",children:"chevron_right"})})})]}),b&&n.jsxs(n.Fragment,{children:[d!==0&&n.jsx("div",{id:"grid-collection-left",children:n.jsx("button",{className:"btn-navigation",onClick:()=>p(d-1),children:n.jsx("i",{className:"material-icons",children:"chevron_left"})})}),d<j-1&&n.jsx("div",{id:"grid-collection-right",children:n.jsx("button",{className:"btn-navigation",onClick:()=>p(d+1),children:n.jsx("i",{className:"material-icons",children:"chevron_right"})})})]})]}),x&&j>1&&n.jsxs("div",{className:"chartbook-page-btns",children:[d>0&&n.jsxs("button",{className:"btn-navigation",onClick:()=>p(d-1),children:["< Previous Page"," "]}),d<j-1&&n.jsx("button",{className:"btn-navigation",onClick:()=>p(d+1),children:"Next Page >"})]})]}):n.jsx(n.Fragment,{})}function UIe(e){const{newInsightsVideoFromFeatured:t,user:r,featuredVideo:i,showCreateSpinner:a}=e,[s,o]=y.useState(0),[l,c]=y.useState(!1),[h,u]=y.useState(0),{Safari:d}=Aj,{IOS:p}=Mj,f=i,m=x=>{const v=f.id;t(r.id,v,x).then(b=>{c(!0),o(b)})};if(l){const x=`insightsvideos/${s}`;return n.jsx(jn,{children:n.jsx(qt,{from:"featured",to:x})})}const g=x=>{x.target.paused?x.target.play():x.target.pause()};return f?n.jsxs(n.Fragment,{children:[a?n.jsx(Dn,{}):null,n.jsx(ot,{setModal:e.setInsightsVideoModal,children:h===0?n.jsxs("div",{className:"featured-insights-video-modal-container",children:[n.jsx("div",{className:"insights-video-container",children:f.rendered_video_url?n.jsx("video",{className:"insights-video",controls:!0,disablePictureInPicture:!0,controlsList:"nodownload",onClick:x=>{$j()===p||Sl().name===d?x.preventDefault():g(x)},src:f.rendered_video_url,poster:`${f.video_thumbnail}/?time=${Date.now()}`}):n.jsx("div",{className:"featured-insights-video-placeholder",children:n.jsx("i",{className:"material-icons",children:"smart_display"})})}),n.jsxs("div",{className:"content-container",children:[n.jsx("i",{id:"modal-close-btn",className:"material-icons",onClick:()=>e.setInsightsVideoModal(!1),children:"close"}),n.jsxs("div",{id:"info-container",children:[n.jsx("div",{id:"title",children:f.title}),n.jsxs("div",{id:"date",children:[n.jsx("span",{children:"Updated "}),n.jsx(gn,{local:!0,format:"MMM D, YYYY",children:f.update_datetime})," "]})]}),n.jsxs("div",{id:"body-container",children:[n.jsx("div",{id:"featured-insights-video-download",children:n.jsx("button",{className:"btn-primary-icon","diagnostic-id":"create-featured-video-btn",onClick:()=>u(1),children:n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"material-icons",children:"edit"}),"CREATE IN STUDIO"]})})}),n.jsx("div",{className:"card-description",children:f.description})]})]})]}):n.jsxs("div",{className:"new-featured-insights-video-modal-container",children:[n.jsx("i",{className:"material-icons",onClick:()=>e.setInsightsVideoModal(!1),children:"close"}),n.jsx("h5",{children:"Featured Insights Video"}),n.jsxs("div",{className:"new-featured-video-modal-btns",children:[n.jsxs("button",{type:"button",className:"new-featured-video-modal-btn btn-primary-lg","diagnostic-id":"featured-video-modal-media-path-btn",onClick:()=>m(!0),children:[n.jsx("div",{className:"new-featured-video-modal-header",children:n.jsx("h4",{children:"Use Featured Audio and Video"})}),n.jsx("div",{children:"Create a turn-key featured insights video with pre-recorded audio that is customized with your brand."})]}),n.jsxs("button",{type:"button",className:"new-featured-video-modal-btn btn-primary-lg","diagnostic-id":"featured-video-modal-no-media-path-btn",onClick:()=>m(!1),children:[n.jsx("div",{className:"new-featured-video-modal-header",children:n.jsx("h4",{children:"Record Your Own Audio and Video"})}),n.jsx("div",{children:"Use the featured charts with your own audio and video."})]})]})]})})]}):null}const BIe=e=>({user:e.auth.user,showCreateSpinner:e.studio.showCreateSpinner}),qIe=le(BIe,{newInsightsVideoFromFeatured:hje})(UIe);function VIe(e){const[t,r]=y.useState(!1),[i,a]=y.useState(0),[s,o]=y.useState(!1),[l,c]=y.useState(!1),[h,u]=y.useState(!1),d=y.useRef(null);y.useEffect(()=>{e.getFeaturedInsights(e.user.id)},[e.user.id]);const p=b=>()=>{a(b),d.current?.classList.remove("fade-out"),setTimeout(()=>{d.current?.classList.add("fade-out")},50)},f=e.chartbooks?.filter(b=>b.content_permissions_level<=e.chartbookPermissions.content_permissions_level).length;if(!e.featuredSet)return null;const m=e.featuredSet.map(b=>n.jsx(LIe,{insights:b,noFade:!0,onClick:p(b.id),isSelected:i===b.id,showDescription:!0,...e},b.id)),g=e.featuredSet.filter(b=>b.id===i)[0],x=b=>{const j=g?.featured_clientpiece?.id;j&&e.getFeaturedClientPiece(j,e.user.id).then(()=>{c(!0)})},v=n.jsx(n.Fragment,{children:n.jsx("div",{className:"assistant",children:f>=e.maxChartbooks?n.jsxs("div",{id:"assistant-intro",children:[n.jsx("div",{children:"Upgrade Your Clearnomics Experience to add more chartbooks"}),n.jsxs("div",{className:"assistant-intro-btn-group",children:[n.jsx("button",{className:"btn btn-primary-lg","diagnostic-id":"assistant-upgrade-btn",type:"button",onClick:()=>r(!0),children:"REQUEST UPGRADE"}),n.jsx("button",{className:"btn-cancel",onClick:()=>e.history.push("/chartbooks"),children:"< BACK TO CHARTBOOKS"})]})]}):n.jsxs("div",{className:"featured-insights-container",children:[e.showSpinner?n.jsx(Dn,{}):null,n.jsx("h4",{children:"Featured Insights Topics"})," ",n.jsx("div",{className:"featured-insights",children:n.jsx(FIe,{breakpoints:jge,elements:m,type:"paginated-row",numPerPage:4,active:!0,showDescription:!0}
128)}),g&&n.jsxs("div",{className:"featured-collection-items",children:[n.jsx("h4",{children:"Select a Featured Insight"}),n.jsxs("div",{className:"row",children:[n.jsx("div",{className:"fade-cover",ref:d}),n.jsx("div",{className:"col s12 m6 l4 xl4",children:n.jsxs("div",{className:"featured-card","diagnostic-id":"chartbook-card",onClick:()=>o(!0),children:[n.jsx("div",{className:"featured-card-type",children:"Featured Chartbook"}),n.jsxs("div",{className:"card-image-container",children:[n.jsx("i",{className:"material-icons",children:"insert_chart"}),n.jsx("div",{className:"featured-item-title",children:n.jsx("h6",{children:g.featured_chartbook?.title})})]})]})}),g.featured_clientpiece&&n.jsx("div",{className:"col s12 m6 l4 xl4",children:n.jsxs("div",{className:"featured-card","diagnostic-id":"client-piece-card",onClick:x,children:[n.jsx("div",{className:"featured-card-type",children:"Featured Commentary"}),n.jsxs("div",{className:"card-image-container",children:[n.jsx("i",{className:"material-icons",children:"description"}),n.jsx("div",{className:"featured-item-title",children:n.jsx("h6",{children:g.featured_clientpiece?.title})})]})]})}),g.featured_insightsvideo&&n.jsx("div",{className:"col s12 m6 l4 xl4",children:n.jsxs("div",{className:"featured-card","diagnostic-id":"insights-video-card",onClick:()=>u(!0),children:[n.jsx("div",{className:"featured-card-type",children:"Featured Insights Video"}),n.jsxs("div",{className:"card-image-container",children:[n.jsx("i",{className:"material-icons",children:"smart_display"}),n.jsx("div",{className:"featured-item-title",children:n.jsx("h6",{children:g.featured_insightsvideo?.title})})]})]})})]})]})]})})});return n.jsxs("div",{className:"container",children:[t&&n.jsx(ii,{setModal:b=>r(b),modal:t}),v,s&&n.jsx(DIe,{featuredCb:g.featured_chartbook,setChartbookModal:o}),l&&n.jsx(AIe,{setModal:c}),h&&n.jsx(qIe,{featuredVideo:g.featured_insightsvideo,setInsightsVideoModal:u})]})}const zIe=e=>({featuredSet:e.featured.featuredSet,user:e.auth.user,showSpinner:e.chartbooks.showSpinner,maxChartbooks:e.auth.user&&e.auth.user.company&&e.auth.user.company.chartbook_permissions&&e.auth.user.company.chartbook_permissions.max_chartbooks,chartbooks:e.chartbooks&&e.chartbooks.items,chartbookPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.chartbook_permissions}),HIe={getFeaturedInsights:TIe,getFeaturedClientPiece:kIe},GIe=le(zIe,HIe),WIe=GIe(VIe),YIe=e=>{const t={};return y.useEffect(()=>{const r=a=>{t[a.key]=!1},i=a=>{t[a.key]=!0,t.Escape&&e.setShowMira(!1)};return document.addEventListener("keyup",r),document.addEventListener("keydown",i),()=>{document.removeEventListener("keyup",r),document.removeEventListener("keydown",i)}},[]),null},KIe=()=>({}),XIe={setShowMira:Vf},QIe=le(KIe,XIe),ZIe=QIe(YIe);function JIe({history:e,lastLocation:t,clearLastLocation:r}){return y.useEffect(()=>{const i=t;i&&r(),i&&e.push(i)},[]),n.jsxs("div",{className:"not-found-container",children:[n.jsx("h2",{children:"Page could not be found"}),n.jsxs("div",{className:"not-found-buttons",children:[n.jsx("button",{onClick:()=>e.push("/insights"),className:"btn btn-primary",children:"Go To Insights"}),n.jsx("button",{onClick:()=>window.location.href="mailto:[email protected]",className:"btn-cancel",children:"Contact Us"})]})]})}const eDe=e=>({lastLocation:e.auth.lastLocation}),tDe=le(eDe,{clearLastLocation:gj})(JIe),nDe=e=>{const[t,r]=y.useState([]),[i,a]=y.useState(!0),[s,o]=y.useState(!1),l=y.useRef(null),c=u=>{const d={message_datetime:new Date,author_type:vd.User,message:u,message_type:as.Text};r([...t,d])},h=()=>{l.current?.scrollIntoView({behavior:"smooth"})};return y.useEffect(()=>{h()},[e.showMira]),y.useEffect(()=>{if(t.length==0)return;i&&a(!1);const u=t[t.length-1];if(u.author_type==vd.User){o(!0);const d={message_datetime:new Date,author_type:vd.Mira,message:"...",message_type:as.Text};r([...t,d]),e.sendMiraMessage(e.user.id,u.message).then(p=>{r([...t.slice(0,-1)]);const f={message_datetime:new Date,author_type:vd.Mira,message:p.message,message_type:p.message_type,items:p.items};r([...t,f]),o(!1)})}h(),setTimeout(()=>h(),1e3),setTimeout(()=>h(),2e3)},[t]),n.jsx(n.Fragment,{children:e.showMira&&n.jsx("div",{className:"container",children:n.jsx("div",{className:"mira",children:n.jsx(Oge,{showWelcome:i,messages:t,setShowMira:e.setShowMira,handleSubmit:c,disableInput:s,chatEndRef:l,user:e.user})})})})},rDe=e=>({user:e.auth.user,showMira:e.mira&&e.mira.showMira}),iDe={initializeMira:YJ,sendMiraMessage:KJ,setShowMira:Vf},aDe=le(rDe,iDe),sDe=aDe(nDe);function oDe(e){const{copyImageToClipboard:t}=e,[r,i]=y.useState("copy"),[a,s]=y.useState(!1),[o,l]=y.useState(null),c=p=>{const f=document.getElementById("answerText")?.textContent;s(!0),e.exportAnswer(e.userId,e.qaId,r,f).then(m=>{const g=m.headers["content-disposition"],x=g?g.split("filename=")[1].replace(/"/g,""):"export",v=URL.createObjectURL(m.data),b=document.createElement("a");b.href=v,b.setAttribute("download",x),document.body.appendChild(b),b.click(),document.body.removeChild(b),URL.revokeObjectURL(v),s(!1),m.status===200&&e.createMessage({alertMessage:"Answer Exported"}),e.setModal(!1)}).catch(m=>{m.message!==Ue&&e.createMessage({serverError:"There was a problem exporting this answer, please try again"}),s(!1)})},h=p=>{i(p.target.value)},u=p=>{p.preventDefault();const f=`Re: ${e.question}`,m=document.getElementById("answerText")?.textContent;window.location.href=tV(f,m)};y.useEffect(()=>{e.questionAnswer?.chart&&t(e.userId,e.questionAnswer.id,"copy-chart").then(p=>{l(p.data)})},[e.questionAnswer.id]);const d=async()=>
128{if(e.questionAnswer?.chart&&o){const p=[new ClipboardItem({[o.type]:o})];await navigator.clipboard.write(p),e.createMessage({alertMessage:"Chart has been copied to the clipboard"})}};return n.jsx(ot,{setModal:e.setModal,children:n.jsxs("div",{className:"export-modal-container","diagnostic-id":"export-modal",children:[n.jsx("div",{className:"export-modal-header",children:n.jsx("h5",{children:"Export Your Answer"})}),n.jsx("p",{children:"Please select an export format:"}),n.jsx("div",{className:"form-group",children:n.jsxs("div",{className:"dropdown-container",children:[n.jsx(gt,{initialValues:{exportType:""},onSubmit:()=>{},children:p=>n.jsx(vt,{children:n.jsxs(me,{as:"select",name:"exportType",onChange:h,value:r,children:[n.jsx("option",{value:"copy",children:"Copy to clipboard"}),n.jsx("option",{value:"docx",children:"Save as a Word document (.docx)"}),n.jsx("option",{value:"mailto",children:"Open answer in an email"})]})})}),n.jsx(dt,{icon:Mt})]})}),r==="mailto"&&n.jsx("div",{className:"export-message-container",children:"*Open in your email app with the subject line and answer pre-filled. To include a chart, copy and paste using the button below."}),n.jsxs("div",{className:`buttons${(r==="copy"||r==="mailto")&&e.questionAnswer?.chart?" with-copy-btn":""}`,children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>e.setModal(!1),children:"CANCEL"}),r==="copy"&&n.jsxs("div",{className:"copy-buttons",children:[e.questionAnswer?.chart&&!e.questionAnswer?.chart?.is_locked&&n.jsx("button",{type:"button",className:"btn btn-primary copy-chart","diagnostic-id":"modal-primary-btn",onClick:d,children:"COPY CHART"}),n.jsx("button",{type:"button",className:"btn btn-primary copy-text","diagnostic-id":"modal-primary-btn",onClick:()=>(e.createMessage({alertMessage:"Answer text has been copied to the clipboard"}),Hl("answerText")),children:"COPY TEXT"})]}),r==="docx"&&n.jsxs("button",{type:"button",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",onClick:c,disabled:a,children:[a?n.jsx("div",{id:"spinner-icon-container",children:n.jsx(ur,{size:"1.25em",thickness:8,variant:"indeterminate"})}):"",a?"":"EXPORT"]}),r==="mailto"&&n.jsxs("div",{className:"mailto-with-copy",children:[e.questionAnswer?.chart&&!e.questionAnswer?.chart?.is_locked&&n.jsx("button",{type:"button",className:"btn btn-primary copy-chart","diagnostic-id":"modal-primary-btn",onClick:d,children:"COPY CHART"}),n.jsxs("button",{type:"button",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",disabled:a,onClick:u,children:[a?n.jsx("div",{id:"spinner-icon-container",children:n.jsx(ur,{size:"1.25em",thickness:8,variant:"indeterminate"})}):"",a?"":"OPEN"]})]})]})]})})}const lDe=e=>({userId:e.auth.user&&e.auth.user.id,qaId:e.questionanswer&&e.questionanswer.item&&e.questionanswer.item.id,answerText:e.questionanswer&&e.questionanswer.item&&e.questionanswer.item.answer_text,question:e.questionanswer&&e.questionanswer.item&&e.questionanswer.item.question_text}),cDe=le(lDe,{createMessage:he,exportAnswer:B0e,copyImageToClipboard:q0e})(oDe);function dDe(e){const{questionAnswer:t,saveQuestion:r,user:i,getSavedQuestions:a,isDirty:s,setDirty:o,savedQuestions:l}=e,[c,h]=y.useState(!1),[u,d]=y.useState(!1),[p,f]=y.useState(!1),m=y.useRef(null),g=l?.filter(S=>S.id===t?.id).length>0,x=l?.filter(S=>S.id===t?.id)[0],v=x?.partner_insights,b=v?.length>0||x?.in_insights_explorer;y.useEffect(()=>{g||o(!0)},[]);let j=null;const w=()=>{m.current&&(clearTimeout(j),m.current.style.height="auto",j=setTimeout(()=>{m.current&&(m.current.style.height=`${2.25+m.current.scrollHeight}px`)},150))};return y.useEffect(()=>(w(),window.addEventListener("resize",w),()=>{window.removeEventListener("resize",w)}),[]),n.jsxs(n.Fragment,{children:[n.jsx(gt,{initialValues:{answerText:t?.answer_text||""},enableReinitialize:!0,onSubmit:(S,{setSubmitting:_,setFieldError:C})=>{const E=S.answerText?.trim();r(t.id,i.id,"saved",E).then(P=>{P.status===200&&a(i.id),_(!1)})},children:S=>{const{values:_,errors:C,dirty:E,isSubmitting:P,setFieldValue:T,handleChange:N}=S;return g&&E!==s&&o(E),n.jsx(vt,{className:"fadeTransition",children:n.jsx("div",{className:"question-answer-section",children:n.jsxs("div",{className:"section-container",children:[n.jsxs("div",{className:"section-header-icon-grp",children:[n.jsx("i",{className:"material-symbols-outlined",children:"quickreply"}),n.jsx("h4",{className:"question-header",children:t?.question_text})]}),n.jsxs("div",{className:"card-caption",children:[n.jsxs("div",{className:"card-datetime",children:[t.is_edited?"E
128dited on ":t?.ask_datetime===t?.update_datetime?"Created on ":"Saved on ",n.jsx(gn,{local:!0,format:"MMM D, YYYY h:mma",children:t.update_datetime})," ",new Date().toLocaleTimeString("en-us",{timeZoneName:"short"}).split(" ")[2]]}),b&&n.jsx(Ke,{title:x?.in_insights_explorer?"Question is shared as a client question on the insights explorer":"",placement:"top",children:n.jsx("i",{className:"material-icons-outlined shared-with-partner-insights-icon",onClick:()=>v?.length>0?f(!0):null,children:"link"})})]}),n.jsxs("div",{className:"answer-container",children:[n.jsx("div",{className:"answer-left",children:n.jsx("div",{className:"answer-header-wrapper",children:n.jsx(me,{innerRef:m,as:"textarea",id:"answerText","diagnostic-id":"answer-input",placeholder:"Your answer goes here...",name:"answerText",className:"answer-input-textarea",value:_.answerText,onChange:N,autoFocus:!0,spellCheck:"false",onFocus:k=>k.currentTarget.setSelectionRange(k.currentTarget.value.length,k.currentTarget.value.length),disabled:b})})}),t?.chart&&n.jsxs("div",{className:"answer-right",children:[n.jsx("div",{className:"chart-icon-answer-wrapper",children:n.jsxs("div",{className:`card-image-container${t?.chart.aspect_ratio==="16:9"?" size-aspect-16-9":""}${t?.chart?.is_locked?" locked":""}`,children:[n.jsx("div",{className:"chart-card-placeholder",children:n.jsx("i",{className:"material-icons",children:"description"})}),t?.chart?.is_locked?n.jsx(Ke,{title:"You do not have access to this chart",placement:"top",children:n.jsx("div",{className:"locked-card",children:n.jsx("i",{className:"material-icons","diagnostic-id":"material-lock-icon",children:"lock"})})}):n.jsx("div",{className:"chart-card-preview-btn","diagnostic-id":"chart-card-preview-btn",children:n.jsx("i",{className:"material-icons",children:"zoom_in"})}),n.jsx("div",{className:"card-image",onClick:()=>t?.chart?.is_locked?null:h(!0),children:t?.chart.chart_image_jpg_url?n.jsx("img",{alt:"",src:t?.chart.chart_image_jpg_url}):n.jsx("div",{className:"chart-image-placeholder"})})]})}),!t?.chart?.is_locked&&n.jsx("div",{className:"download-chart-btn-wrapper",children:n.jsx("span",{className:"download-chart-btn",children:n.jsx("a",{download:!0,href:t?.chart.chart_image_jpg_url,target:"_blank",rel:"noopener noreferrer","diagnostic-id":"chart-download-btn",children:n.jsxs("button",{className:"btn-primary-icon-text",type:"button",children:[n.jsx("i",{className:"material-icons",children:"download"}),"Download"]})})})})]})]}),n.jsxs("div",{className:"save-answer-btn",children:[n.jsx("button",{type:"submit",className:"btn btn-primary save",disabled:P||!!Object.keys(C).length||!_.answerText||g&&_.answerText===t?.answer_text,"diagnostic-id":"save-answer-btn",children:"SAVE"}),n.jsx("button",{type:"button",className:"btn btn-primary export","diagnostic-id":"export-answer-btn",onClick:()=>d(!0),children:"EXPORT"})]})]})})})}}),c&&n.jsx(Jo,{featuredChart:t?.chart,setChartModal:h,chartModal:c,isRecommendedChart:!0}),u&&n.jsx(cDe,{setModal:d,questionAnswer:t}),p&&n.jsx(ao,{modal:p,setModal:f,partnerInsightShared:v,sharedType:"clientquestion"})]})}const uDe=e=>({user:e.auth.user,savedQuestions:e.questionanswer&&e.questionanswer.savedQuestions,showSpinner:e.questionanswer&&e.questionanswer.showSpinner}),hDe=le(uDe,{saveQuestion:L0e,getSavedQuestions:I0})(dDe),pDe=e=>{const{setModal:t,userId:r,modal:i,deleteSavedQuestion:a,questionId:s}=e;return y.useEffect(()=>{const o=l=>$n(l,i,t);return window.addEventListener("keyup",o),()=>window.removeEventListener("keyup",o)},[i,t]),n.jsx(ot,{setModal:t,children:n.jsxs("div",{className:"delete-modal-container",children:[n.jsx("h5",{children:"Please Confirm"}),n.jsx("p",{children:"Are you sure you want to permanently delete this question?"}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>t(!1),children:"CANCEL"}),n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",onClick:()=>a(s,r),children:"DELETE"})]})]})})},fDe=e=>({userId:e.auth.user&&e.auth.user.id}),mDe=le(fDe,{deleteSavedQuestion:F0e})(pDe);function gDe(e){const{question:t,getSavedQuestion:r,userId:i,currentQuestion:a,showSpinner:s,setSelectedQuestion:o,hedwigPermissions:l}=e,[c,h]=y.useState(!1),[u,d]=y.useState(!1),p=t?.partner_insights?.length>0||t?.in_insights_explorer,f=m=>{m.preventDefault(),a?.id!==t?.id&&(e.isDirty?window.confirm("Changes you made may 
128not be saved.")&&r(i,t.id).then(x=>{o(x.data.question_text)}):r(i,t.id).then(x=>{o(x.data.question_text)}))};return n.jsxs("div",{className:"col fadeTransition",children:[n.jsxs("div",{className:`saved-question-card${t.id&&t.id===a?.id?" selected":""}${t?.content_permissions_level<=l?.content_permissions_level?"":" locked"}`,"diagnostic-id":"saved-question-card",children:[t?.content_permissions_level>l?.content_permissions_level&&n.jsx("div",{className:"locked-overlay"}),n.jsx("div",{className:"saved-question-card-content",children:n.jsx("h6",{className:"saved-question-text-title","diagnostic-id":"saved-question-text-title",children:t?.question_text})}),p&&n.jsx(Ke,{title:t?.in_insights_explorer?"Question is shared as a client question on the insights explorer":"",placement:"top",children:n.jsx("i",{className:"material-icons-outlined shared-with-partner-insights-icon",onClick:()=>t?.partner_insights?.length>0?d(!0):null,children:"link"})}),n.jsxs("div",{className:"saved-question-answer-text-container",children:[n.jsx("div",{className:"saved-question-answer-text",children:t?.answer_text&&ds(t?.answer_text,120)}),n.jsx("div",{className:"card-caption",children:n.jsxs("div",{className:"card-datetime",children:[t.is_edited?"Edited on ":"Saved on ",n.jsx(gn,{local:!0,format:"MMM D, YYYY h:mma",children:t.update_datetime})," ",new Date().toLocaleTimeString("en-us",{timeZoneName:"short"}).split(" ")[2]]})})]}),t?.content_permissions_level>l?.content_permissions_level?n.jsx(Ke,{title:"Upgrade to access locked questions",placement:"top",children:n.jsx("div",{className:"locked-card",children:n.jsx("i",{className:"material-icons","diagnostic-id":"material-lock-icon",children:"lock"})})}):n.jsxs("div",{className:"card-btn-grp",children:[n.jsxs("button",{className:"card-btn",type:"button",onClick:f,children:[n.jsx("i",{className:"material-icons",children:"mode_edit"}),n.jsx("span",{children:" View"})]}),p?n.jsx(n.Fragment,{}):n.jsxs("button",{className:"card-btn-delete","diagnostic-id":"question-delete-btn",onClick:()=>h(!0),children:[n.jsx("i",{className:"material-icons",children:"delete_forever"}),n.jsx("span",{children:"Delete"})]})]})]}),c&&n.jsx(mDe,{modal:c,setModal:h,questionId:t.id}),u&&n.jsx(ao,{modal:u,setModal:d,partnerInsightShared:t?.partner_insights,sharedType:"clientquestion"})]})}const vDe=e=>({userId:e.auth.user&&e.auth.user.id,currentQuestion:e.questionanswer&&e.questionanswer.item,showSpinner:e.questionanswer&&e.questionanswer.showSpinner,hedwigPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.hedwig_permissions}),bDe=le(vDe,{getSavedQuestion:B$})(gDe);function yDe(e){const{type:t,numPerPage:r,breakpoints:i,elements:a,active:s,changeSearch:o,title:l}=e,c=ws(),[h,u]=y.useState(0),[d,p]=y.useState(0),[f,m]=y.useState(0),g=t==="paginated",x=t==="paginated-row",v=~~((a.length-1)/r)+1,b=d*r,j=a.slice(b,b+r);y.useEffect(()=>{d>=v&&d>0&&p(d-1)},[v,d]);const S=`${(()=>{const E=i?Object.keys(i):[];for(let P=0;P<E.length;P++)if(c<=~~E[P])return i?i[E[P]]:"";return""})()}${x?" nowrap":""}`,_=io({onSwipedLeft:()=>d<v-1&&p(d+1),onSwipedRight:()=>d>0&&p(d-1),onSwiping:E=>m(E.deltaX),onSwiped:()=>m(0)}),C=g?j:a;return s&&a?n.jsxs(n.Fragment,{children:[n.jsx("div",{id:"grid-layout"+(x?"-row":""),className:S,"data-gridid":l,..._,children:C}),g&&v>1&&n.jsxs("div",{className:"browser-page-btns",children:[d>0&&n.jsxs("button",{className:"btn-navigation",onClick:()=>p(d-1),children:["< Previous Page"," "]}),d<v-1&&n.jsx("button",{className:"btn-navigation",onClick:()=>p(d+1),children:"Next Page >"})]})]}):n.jsx(n.Fragment,{})}const qI={GRID:"grid"};function xDe(e){const{userId:t,savedQuestions:r,setSelectedQuestion:i}=e,[a,s]=y.useState(e.view||qI.GRID),[o,l]=y.useState(""),c=6,h=r&&o?r.filter(f=>Mn(f.question_text.toLowerCase(),o.toLowerCase())||f.answer_text&&Mn(f.answer_text.toLowerCase(),o.toLowerCase())):r,u=h&&Object.assign([],h),d=(f,m)=>f.update_datetime>m.update_datetime?-1:f.update_datetime<m.update_datetime?1:0;u?.sort(d),o&&h&&h.length;const p=h?u.map(f=>n.jsx(bDe,{question:f,isDirty:e.isDirty,setDirty:e.setDirty,setSelectedQuestion:i},f.id)):[];return n.jsx("div",{className:"saved-questions-section",children:n.jsxs("div",{className:"section-container",children:[n.jsxs("div",{className:"section-header-icon-grp",children:[n.jsx("i",{className:"material-symbols-outlined",children:"bookmarks"}),n.jsx("h4",{children:"Saved Client Questions"})]}),n.jsx(yDe,{type:"paginated",numPerPage:c,breakpoints:Ls,elements:p,active:a===qI.GRID,changeSearch:l})]})})}const jDe=e=>({savedQuestions:e.questionanswer&&e.questionanswer.savedQuestions,userId:e.auth.user&&e.auth.user.id}),wDe=le(jDe,{})(xDe);function SDe(e){const{user:t,askQuestion:r,questionAnswer:i,resetQuestionAnswer:a,showSpinner:s,getTopQuestions:o,topQuestions:l,showOpenSpinner:c,updateUserQuestionAndAnswer:h,getSavedQuestions:u,savedQuestions:d,setScrim:p,modalStatus:f,fromPartnerInsight:m,getSavedQuestion:g,allowAskQuestion:x,logEvent:v}=e,{Enabled:b,Disabled:j}=_n,{Community:w,SponsoredCommunity:S}=Br,[_,C]=y.useState(null),[E,P]=y.useState(!1),[T,N]=y.useState(!1),[k,I]=y.useState(!1),[D,O]=y.useState(null),[$,U]=y.useState(!0),[B,L]=y.useState(!1),A=y.useRef(null),R=new Date(i?.ask_datetime),F=`${R.getFullYear()}${R.getMonth()}${R.getDate()}`,q=new Date,V=`${q.getFullYear()}${q.getMonth()}${q.getDate()}`,X=be=>{const ye=l[be].question_text;C(ye)},W=qj().state,K=t?.account_permissions?.name===w||t?.account_permissions?.name===S;y.useEffect(()=>{A.current?.focus()},[]),y.useEffect(()=>{if(!f){const be=document.body.style.top;document.body.style.position="",document.body.style.top="",document.body.style.width="";const ye=document.querySelector(".nav-wrapper");ye&&(ye.style.paddingRight="",ye.style.paddingLeft=""),window.scrollTo(0,parseInt(be||"0")*-1)}},[f]),y.useEffect(()=>{a(),o(t.id),u(t.id),e.setDirty(!1),p(!1)},[]),y.useEffect(()=>{t?.qanda_click_accepted?W?.id&&g(t.id,W.id).then(be=>{C(be.data.question_text),window.history.replaceState({},"")}):K&&W?.id&&g(t.id,W.id).then(be=>{C(be.data.question_text),window.history.replaceState({},"")})},[t?.qanda_click_accepted]),y.useEffect(()=>{const be=ye=>$n(ye,T||E||k,T&&N||E&&P||k&&I||void 0);return window.addEventListener("keyup",be),()=>{window.removeEventListener("keyup",be)}},[T,E,k]);const z=n.jsx(ot,{setModal:P,children:n.jsxs("div",{className:"info-modal-container","diagnostic-id":"q-and-a-help-modal-container",children:[n.jsx("div",{className:"info-modal-header-icon",children:n.jsx("i",{className:"material-symbols-outlined",children:"help_outline"})}),n.jsx("h5",{className:"how-to-header",children:"What is Clearnomics Q&A?"}),n.jsx("p",{children:"Clearnomics Q&A is a simple yet powerful tool to draft tailored, client-friendly answers to market and economic questions. Get started by entering a question or pasting notes on a client concern, and hitting the Submit button."}),n.jsx("p",{children:"Clearnomics Q&A will suggest an answer within a minute. You can copy this for use in client communications, edit the response, and utilize the recommended chart. You can also save the answer for later."}),n.jsx("p",{children:"While Clearnomics Q&A can address a wide variety of frequently asked questions across market and economic topics, it is not perfect and does not know everything. For instance, it may not be designed to address questions about specific events, individual stocks, recent market moves, or detailed financial strategies."}),n.jsx("div",{className:"buttons",children:n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>{P(!1)},children:"CLOSE"})})]})}
128),Y=n.jsx(ot,{setModal:null,disableClickOutsideCancel:!0,children:n.jsxs("div",{className:"info-modal-container","diagnostic-id":"q-and-a-accept-modal-container",children:[n.jsx("div",{className:"info-modal-header-icon",children:n.jsx("i",{className:"material-symbols-outlined",children:"new_releases"})}),n.jsx("h5",{children:"Welcome to Clearnomics Q&A: Create Tailored, Client-Friendly Answers and Insights"}),n.jsx("p",{children:"Clear communication is essential for building trust and delivering value to clients. Clearnomics Q&A is a powerful tool designed to help you draft tailored, easy-to-understand insights that resonate with your clients."}),n.jsx("p",{children:"With Clearnomics Q&A you can:"}),n.jsxs("ul",{children:[n.jsx("li",{children:"Quickly draft client-friendly responses to a wide range of financial questions"}),n.jsx("li",{children:"Enhance your communication with clear, concise explanations of complex financial topics"}),n.jsx("li",{children:"Edit to reflect your style and voice, with the ability to further personalize for a client’s specific concerns"}),n.jsx("li",{children:"Save and build your own curated database of answers to use across clients"})]}),n.jsx("p",{children:"Clearnomics Q&A is your resource for crafting informed, client-friendly responses to your clients' most pressing financial questions. Please note that Clearnomics Q&A is not a chatbot, and while it can't answer every possible question, it is well equipped to handle common client questions relating to markets and the economy."}),n.jsx("div",{className:"buttons",children:n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"accept-q-and-a-btn",onClick:()=>{h(t.id)},children:"Continue"})})]})}),ie=n.jsx(ot,{setModal:N,children:n.jsxs("div",{className:"error-modal-container","diagnostic-id":"error-modal-container",children:[n.jsx("div",{className:"error-modal-header-icon",children:n.jsx("i",{className:"material-icons",children:"error"})}),n.jsx("h5",{"diagnostic-id":"error-modal-header",children:"We were not able to suggest an answer to that question. Please rephrase it and try again, or contact us for assistance."}),n.jsx("p",{children:"Tips:"}),n.jsxs("ul",{children:[n.jsx("li",{children:"Be sure to phrase the topic or question clearly"}),n.jsx("li",{children:"Clearnomics Q&A is designed to answer questions on market and economic topics"}),n.jsx("li",{children:"It may not be able to address specific events, individual stocks, current market moves, detailed financial strategies, etc."})]}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{className:"btn-cancel",onClick:()=>window.Intercom("show"),children:"Contact Us"}),n.jsx("button",{type:"button",className:"btn-primary","diagnostic-id":"modal-cancel-btn",onClick:()=>{N(!1)},children:"CLOSE"})]})]})}),ne=()=>{L(!0),v(t.id,null,"communitycta","open")},ve=n.jsxs("button",{type:"button",className:"btn btn-primary-lg btn-primary-icon",disabled:!0,"diagnostic-id":"submit-question-btn",children:[n.jsx(Ke,{placement:"top",interactive:!0,classes:{popper:"upgrade-tooltip"},title:n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"upgrade-tooltip-msg",children:"Upgrade to ask your own questions"}),t.is_upgrade_disabled?n.jsxs("div",{className:"upgrade-submitted-tooltip",children:[n.jsx("i",{className:"material-icons",children:"done"}),"UPGRADE REQUESTED"]}):n.jsxs("button",{onClick:ne,className:"upgrade-tooltip-btn",children:[n.jsx("i",{className:"material-icons",children:"open_in_new"}),"UPGRADE"]})]}),children:n.jsx("i",{className:"material-icons locked-icon","diagnostic-id":"submit-btn-locked-icon",children:"lock"})}),n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"material-icons-outlined",children:"flash_on"}),"SUBMIT"]})]}),pe=n.jsx(gt,{initialValues:{question:_||"",includeChart:!0},enableReinitialize:!0,onSubmit:(be,{setSubmitting:ye,setFieldError:ke,setFieldValue:fe})=>{const se=be.question?.trim();e.setDirty(!0),p(!0),r(t.id,se,be.includeChart).then(ge=>{ge.status===200?(O(se),U(be.includeChart),ge.data.detail==="failed status"&&(N(!0),O(""))):ge.status===403&&(I(!0),O("")),ye(!1),e.setDirty(!1),p(!1)})},validationSchema:_t().shape({question:Ae().test("is-empty","Description cannot be empty",function(be){return!be||!be.split("").every(ye=>ye===" ")})}),children:be=>{const{values:ye,errors:ke,dirty:fe,isSubmitting:se,setFieldValue:ge}=be;return n.jsx(vt,{children:n.jsxs("div",{className:"question-answer-form-group",children:[n.jsxs("div",{className:"ask-question-input-field",children:[n.jsx(Ke,{placement:"top",
128interactive:!0,classes:{popper:"upgrade-tooltip"},title:x!==b?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"upgrade-tooltip-msg",children:"Upgrade to ask your own questions"}),t.is_upgrade_disabled?n.jsxs("div",{className:"upgrade-submitted-tooltip",children:[n.jsx("i",{className:"material-icons",children:"done"}),"UPGRADE REQUESTED"]}):n.jsxs("button",{onClick:ne,className:"upgrade-tooltip-btn",children:[n.jsx("i",{className:"material-icons",children:"open_in_new"}),"UPGRADE"]})]}):"",children:n.jsxs("div",{children:[x!==b&&n.jsx("i",{className:"material-icons locked-icon","diagnostic-id":"input-locked-icon",children:"lock"}),n.jsx(me,{id:"question","diagnostic-id":"question-input",placeholder:"Please enter the client question here",name:"question",maxLength:150,className:"question-input-area",innerRef:A,disabled:x===j})]})}),x!==j&&ye.question.length>0?n.jsx("i",{className:"material-icons",onClick:()=>{ge("question",""),A?.current?.focus()},children:"close"}):n.jsx(n.Fragment,{})]}),n.jsx(wn,{hasPermission:x===b,children:n.jsx("div",{className:"top-questions-section",children:n.jsx("div",{className:"top-questions-wrapper",children:l?.map((De,ae)=>n.jsx("div",{className:"top-question-pill",children:n.jsx("div",{title:De.question_text,className:"top-question",onClick:()=>{X(ae),ge("question",De.question_text)},children:De.question_text})},ae))})})}),n.jsxs("div",{className:"submit-question-buttons",children:[n.jsx("div",{className:"submit-question-btn",children:n.jsx(wn,{hasPermission:x===b,fallback:ve,children:n.jsx("button",{type:"submit",className:"btn btn-primary-lg btn-primary-icon",disabled:se||!!Object.keys(ke).length||!ye.question||(D===ye.question?$===ye.includeChart:ye.question===i?.question_text&&V===F&&ye.includeChart===!!i?.chart)||T,"diagnostic-id":"submit-question-btn",children:n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"material-icons-outlined",children:"flash_on"}),"SUBMIT"]})})})}),n.jsx(Ke,{title:"If a relevant chart exists, we will recommend it here",placement:"top",children:n.jsxs("label",{className:"include-chart-toggle",children:[n.jsx("input",{type:"checkbox",name:"includeChart",id:"includeChart",className:"filled-in",onChange:De=>{const ae=De.target.checked;ge("includeChart",ae)},"diagnostic-id":"include-chart-input",checked:ye.includeChart,disabled:x===j}),n.jsx("span",{"diagnostic-id":"include-chart-toggle",children:"Include chart"})]})})]})]})})}});return n.jsxs("div",{className:"container q-and-a",children:[n.jsx(da,{}),B&&n.jsx(ii,{setModal:L,modal:B}),E&&z,!K&&!t?.qanda_click_accepted&&Y,T&&ie,k&&n.jsx(Jf,{modal:k,setModal:I}),n.jsxs("h3",{className:"question-answer-header",children:[ef,n.jsx("div",{className:"question-answer-header-icon-text",children:"Clearnomics Q&A"})]}),n.jsx("div",{className:"question-form-container",children:n.jsx("div",{className:"row fadeTransition",children:n.jsxs("div",{className:"col s12 m12 l12",children:[n.jsxs("button",{type:"button","diagnostic-id":"instructions-btn",className:"btn-primary-text btn-icon-text instructions-btn",onClick:()=>P(!0),children:[n.jsx("i",{className:"material-icons help-icon","diagnostic-id":"help-icon",children:"help_outline"}),"What is Q&A?"]}),pe]})})}),s||c?n.jsx("div",{className:"question-answer",children:n.jsx("div",{className:"row fadeTransition",children:n.jsx("div",{className:"col s12 m12 l12 question-answer-section-container",children:n.jsxs("div",{className:"answer-spinner",children:[s&&n.jsx("h4",{children:"Drafting Answer..."}),n.jsx(ur,{size:"5em",thickness:4,variant:"indeterminate"}),s&&n.jsx("div",{className:"answer-spinner-subtitle",children:"This may take up to a minute"})]})})})}):i?n.jsx("div",{className:"question-answer",children:n.jsx("div",{className:"row fadeTransition",children:n.jsx("div",{className:"col s12 m12 l12 question-answer-section-container",children:n.jsx(hDe,{questionAnswer:i,isDirty:e.isDirty,setDirty:e.setDirty})})})}):n.jsx(n.Fragment,{}),d?.length>0&&n.jsx("div",{className:"saved-questions-container",children:n.jsx("div",{className:"row fadeTransition",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(wDe,{isDirty:e.isDirty,setDirty:e.setDirty,setSelectedQuestion:C}
128)})})})]})}const _De=e=>({user:e.auth.user,questionAnswer:e.questionanswer&&e.questionanswer.item,showSpinner:e.questionanswer&&e.questionanswer.showSpinner,topQuestions:e.questionanswer&&e.questionanswer.topQuestions,showOpenSpinner:e.questionanswer&&e.questionanswer.showOpenSpinner,savedQuestions:e.questionanswer&&e.questionanswer.savedQuestions,modalStatus:e.preferences&&e.preferences.modalStatus,allowAskQuestion:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.hedwig_permissions&&e.auth.user.company.hedwig_permissions.allow_use_question_answer_ask_question}),CDe=Jt(le(_De,{askQuestion:$0e,resetQuestionAnswer:V0e,getTopQuestions:U0e,updateUserQuestionAndAnswer:Oee,getSavedQuestions:I0,setScrim:hn,getSavedQuestion:B$,logEvent:_r})(zt(SDe)));function br({children:e,message:t}){return n.jsx(n.Fragment,{children:n.jsx(Ke,{title:t,placement:"top",interactive:!0,enterTouchDelay:0,leaveTouchDelay:5e3,PopperComponent:r=>h$(t,"",r),children:e})})}const{Spotlight:Zy,Solution:Jy,Insight:lp}=on;function NDe(e){const{isEditorDirty:t,userId:r,title:i,sectionType:a,editContactForm:s,selectedContactId:o,handleCancel:l,pageType:c,pageSlug:h,addPageSection:u,index:d,selectedItemIds:p,itemsOrderNew:f,isEditing:m,sectionId:g,editContact:x,editPageSection:v,contactBrowserAction:b,contactEmail:j,handleChange:w,updateRelatedSolutions:S,pageId:_,setDirty:C,setEditorFormStatus:E,isDirty:P,updateClientQuestions:T}=e,N=p?.slice()?.sort((L,A)=>f.indexOf(L)-f.indexOf(A)),{InsightsGallery:k,SolutionsGallery:I,ContactForm:D,TeamProfile:O,ClientQuestions:$}=Bn;let U="unknown",B="unknown";switch(a){case k:case I:U="Enter a title for your gallery...",B="SAVE GALLERY";break;case D:U="Enter a title for your contact form...",B="SAVE";break;case O:U="Enter a title for your team profiles...",B="SAVE";break;case $:B="SAVE";break}return n.jsx(gt,{initialValues:{title:i||"",btnAction:a===D?b:"",contactEmail:a===D&&j?j:""},onSubmit:(L,{setSubmitting:A})=>{m?c===lp?a===I?S(_,r,N).then(()=>l(!0)):a===$&&T(_,r,N).then(()=>l(!0)):v(r,h,a,g,c,N,L.title).then(()=>l(!0)):x?s(h,r,c,o,L.title,L.contactEmail,L.btnAction).then(()=>l(!0)):u(r,h,a,d,c,N,L.title).then(()=>l(!0))},enableReinitialize:!0,validationSchema:_t().shape({title:Ae().max(160)}),children:({values:L,touched:A,errors:R,dirty:F,isSubmitting:q})=>(c!==lp&&F!==P&&!t&&C(F),n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"spotlight-gallery-save",children:n.jsxs(vt,{onClick:V=>V.stopPropagation(),className:"spotlight-gallery-editor-form",children:[c!==lp&&n.jsxs("div",{className:"gallery-section-title-group",children:[n.jsx("div",{className:"input-field",children:n.jsx(me,{id:"title","diagnostic-id":"gallery-section-title-input",name:"title",placeholder:U,maxLength:160,className:R.title&&A.title?"text-input error":"form-control"})}),R.title&&A.title&&n.jsx("div",{className:"input-feedback",children:R.title})]}),n.jsx("div",{className:"gallery-save-grp",children:n.jsx("div",{className:"form-group",children:n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"gallery-save-btn",disabled:a===D?!F&&!t||(L.btnAction==="email"?!L.contactEmail||L.contactEmail?.length===0:!o)||q:c===lp?!F&&!t||q:!F&&!t||N?.length===0||q,children:B})})})]})}),a===D&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"spotlight-gallery-radio-selection",children:n.jsx("div",{className:"gallery-radio-btns-grp",onClick:V=>V.stopPropagation(),children:n.jsxs("div",{className:"form-group",onChange:w,children:[n.jsx(me,{component:mt,name:"btnAction",id:"email",diagId:"btn-action-email",label:"Specify a contact email address"}),n.jsx(me,{component:mt,name:"btnAction",id:"user",diagId:"btn-action-user",label:"Select from a list of your company's contacts"})]})})}),L.btnAction==="email"&&n.jsxs("div",{className:"spotlight-gallery-form-grp",children:[n.jsx("label",{children:"Contact Email"}),n.jsx(me,{type:"text",name:"contactEmail",id:"contactEmail","diagnostic-id":"contact-email-input",placeholder:"Email",maxLength:240}),R.contactEmail&&A.contactEmail&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:R.contactEmail})]})]})]}))})}const EDe=e=>({userId:e.auth.user&&e.auth.user.id,selectedContactId:e.spotlight&&e.spotlight.pageType===Zy?e.spotlight.partnerSpotlightPage.selectedContactId:e.spotlight.pageType===Jy?e.spotlight.solutions.page.selectedContactId:null,pageType:e.spotlight&&e.spotlight.pageType,isEditorDirty:e.spotlight.isDirty,contactBrowserAction:e.spotlight&&e.spotlight.pageType===Zy?e.spotlight.partnerSpotlightPage.contact_form_type:e.spotlight.pageType===Jy?e.spotlight.solutions.page.contact_form_type:null,contactEmail:e.spotlight&&e.spotlight.pageType===Zy&&e.spotlight.partnerSpotlightPage?e.spotlight.partnerSpotlightPage.contact_email:e.spotlight.pageType===Jy&&e.spotlight.solutions.page?e.spotlight.solutions.page.contact_email:""}),gF=le(EDe,{editContactForm:qxe,addPageSection:cc,editPageSection:dm,updateRelatedSolutions:Cxe,setE
128ditorFormStatus:Sa,updateClientQuestions:Nxe})(NDe);function TDe(e){const{id:t,pos:r,connectDropTarget:i,isOverCurrent:a,editorItem:s,editorItemIndex:o,isSelected:l,deselectEditorItem:c,selectEditorItem:h,isDragging:u,sectionType:d,pageType:p,itemsOrderNew:f,updateEditorItemsOrder:m,hedwigPermissions:g}=e,{InsightsGallery:x,SolutionsGallery:v,ContactForm:b,TeamProfile:j,ClientQuestions:w}=Bn;y.useEffect(()=>{if(d===x||d===v||d===j||d===w){const{didDrop:E}=e;if(E){const{id:P,dropResult:T}=e,{dragId:N,dropId:k}=T;if(P===k){const I=f.indexOf(N),D=f.indexOf(k);f.splice(I,1),f.splice(I<D?D-1:D,0,N),m([...f])}}}},[e.didDrop]);const S=()=>{l?c():h()},_=l?" selected":"",C={editorItem:s};return i(n.jsx("div",{pos:r,id:t&&`${t}`,className:`gallery-card-drop-placeholder${a?` gallery-card-placeholder-show${s.aspect_ratio==="16:9"?" size-aspect-16-9":""}`:""}`,children:n.jsx("div",{className:`gallery-card-wrapper ${d}-browser-card-wrapper`,children:n.jsxs("div",{className:`gallery-card ${d}-browser-card${d===w&&s?.content_permissions_level<=g?.content_permissions_level?"":" locked"}`+_,"diagnostic-id":"gallery-card",onClick:S,children:[d===w&&s?.content_permissions_level>g?.content_permissions_level&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"locked-overlay"}),n.jsx(Ke,{title:"Upgrade to access locked questions",placement:"top",children:n.jsx("div",{className:"locked-card",children:n.jsx("i",{className:"material-icons","diagnostic-id":"material-lock-icon",children:"lock"})})})]}),(d===x||d===v||d===j||d===w)&&n.jsx("div",{className:"gallery-card-index-container",children:u&&n.jsx("h1",{children:o})}),l&&n.jsx("div",{className:"checkmark","diagnostic-id":"checkmark",children:n.jsx("i",{className:"material-icons",children:"done"})}),d===x?n.jsx(G$,{...C}):d===v?n.jsx(W$,{...C}):d===b||d===j?n.jsx(O0,{...C}):d===w?n.jsx(H$,{...C}):n.jsx(n.Fragment,{})]})})}))}const kDe={hover(e,t,r){},drop(e,t,r){return t.didDrop()?void 0:{dragId:t.getItem().id,dropId:e.id}}};function PDe(e,t){return{connectDropTarget:e.dropTarget(),isOver:t.isOver(),isOverCurrent:t.isOver({shallow:!0}),itemType:t.getItemType(),didDrop:t.didDrop(),dropResult:t.getDropResult()}}const IDe=e=>({hedwigPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.hedwig_permissions}),DDe=le(IDe,{})(Ss.DropTarget("editorCard",kDe,PDe)(TDe)),{ContactForm:RDe,TeamProfile:vF,InsightsGallery:bF,SolutionsGallery:ODe,ClientQuestions:tj}=Bn;function ADe(e){const{index:t,editorItem:r,connectDragSource:i,sectionType:a,hedwigPermissions:s}=e;let o;switch(a){case vF:case bF:case tj:o=r.id;break;case ODe:o=r.page_slug;break}return n.jsx("div",{className:`droppable-gallery-card${r.aspect_ratio==="16:9"?" size-aspect-16-9":""} fadeTransition${e.isDragging?" isDragging":""}`,ref:a===RDe||a===tj&&r?.content_permissions_level>s?.content_permissions_level?void 0:i,children:y.createElement(DDe,{...e,key:`${t} _before`,id:o})})}const MDe={beginDrag(e,t,r){const i={id:e.sectionType===vF||e.sectionType===bF||e.sectionType===tj?e.editorItem.id:e.editorItem.page_slug};return e.toggleDrag(),i},isDragging(e,t){return t.getItem().id===e.id},endDrag(e,t,r){e.toggleDrag(),t.didDrop()}};function $De(e,t){return{connectDragSource:e.dragSource()}}const LDe=e=>({hedwigPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.hedwig_permissions}),yF=le(LDe,{})(Ss.DragSource("editorCard",MDe,$De)(ADe)),{Spotlight:FDe,Solution:UDe,Insight:BDe}=on;function qDe(e){const{editorItems:t,searchEditor:r,setSearching:i,section:a,partnerItems:s,isSearching:o,searchTerms:l,setEditorFormStatus:c,showSelected:h,sectionType:u,pageType:d,selectedItemIds:p,setSelectedItemIds:f,itemsOrderNew:m,setItemsOrderNew:g,itemsOrderInitial:x,setItemsOrderInitial:v,pageSlug:b,partnerPermissions:j,hedwigPermissions:w}=e,[S,_]=y.useState(null),[C,E]=y.useState(!1),[P,T]=y.useState(""),{InsightsGallery:N,SolutionsGallery:k,TeamProfile:I,ClientQuestions:D}=Bn,O=j.max_insights_per_section,$=j.max_solutions_per_section,U=j.max_team_profiles_per_section,B=5,L=()=>{E(!C)},A=()=>{r("",d),i(!1)},R=M=>M===N&&p.length<O||M===k&&p.length<$||M===I&&p.length<U||M===D&&p.length<B,F=M=>{R(u)&&f(W=>[...W,...M])},q=M=>{const W=p.filter(K=>K!==M);f([...W])},V=M=>{g(M),x.length>0?v(x):v([...M])},X=()=>{let M;t&&(u===I||u===N||u===D?M=t.map(ie=>ie.id):u===k&&(M=t.map(ie=>ie.page_slug)),f(M));let W;s?u===I||u===N||u===D?W=s.map(ie=>ie.id):u===k&&(W=s.map(ie=>ie.page_slug)):W=[];const K=W?.filter(ie=>!M?.includes(ie)),z=M?[...M,...K]:[...K];z&&V(z);let Y;h&&(u===I||u===N||u===D?Y=s.filter(ie=>M?.indexOf(ie.id)>-1):u===k&&(Y=s.filter(ie=>M?.indexOf(ie.page_slug)>-1)),_(Y))};if(y.useEffect(()=>{X()},[s]),y.useEffect(()=>{p||X()},[p]),y.useEffect(()=>{let M;o&&l&&l.length>2&&(M=s.filter(W=>{if(u===I){const K=W.first_name.toLowerCase()+" "+W.last_name.toLowerCase();return Mn(W.first_name.toLowerCase(),l.toLowerCase())||Mn(W.last_name.toLowerCase(),l.toLowerCase())||Mn(K,l.toLowerCase())||Mn(W.email,l.toLowerCase())}else if(u===D)return Mn(W.question_text.toLowerCase(),l.toLowerCase())||Mn(W.answer_text,l.toLowerCase());return Mn(W.title.toLowerCase(),l.toLowerCase())||Mn(W.description,l.toLowerCase())}),_(M),T(`Results for: "${l}" - `))},[a,o,s,l]),y.useEffect(()=>{if(!o){let M;h&&p&&(u===I||u===N||u===D?M=s.filter(W=>p?.indexOf(W.id)>-1):u===k&&(M=s.filter(W=>p?.indexOf(W.page_slug)>-1)),_(M),T(`${u===N?"Selected Partner Insights":u===k?"Selected Partner Solutions":u===I?"Selected Contacts":u===D?"Selected Client Questions":""}`))}},[o,h,s]),y.useEffect(()=>{let M;!o&&!h&&(u===k?M=s?.filter(W=>W.page_slug!==b):(u===I||u===N||u===D)&&(M=s),_(M),T(`${u===N?"All Partner Insights":u===k?"All Partner Solutions":u===I?"All Contacts":u===D?"All Client Questions":""}`))},[a,l,h,o,s]),y.useEffect(()=>{const M=p.length>0?p.sort((z,Y)=>z-Y):null;let W;t?.length>0?u===I||u===N||u===D?W=t.map(z=>z.id).sort((z,Y)=>z-Y):u===k&&(W=t.map(z=>z.page_slug).sort((z,Y)=>z-Y)):W=null;const K=x.length>0&&m.length>0&&JSON.stringify(x)!==JSON.stringify(m)||JSON.stringify(M)!==JSON.stringify(W);K!==!!e.isEditorDirty&&c(K)},[a,p,m]),(s&&s.length===0||S?.length===0)&&!o&&!h)return n.jsx("div",{id:"empty-content-placeholder",className:"fadeTransition",children:u===N?n.jsxs(n.Fragment,{children:[n.jsx("i",{className:"material-icons",children:"batch_prediction"}),n.jsx("h6",{className:"create-redirect-msg",children:"There are no partner insights available. Create and publish a partner insight to get started."}),n.jsx("div",{className:"btn-cancel",children:n.jsx(Ze,{to:{pathname:"/insights",search:"?view=partnerinsights"},className:"partner-create-redirect",children:"CREATE A PARTNER INSIGHT"})})]}):u===k?n.jsxs(n.Fragment,{children:[n.jsx("i",{className:"material-icons",children:"category"}),n.jsx("h6",{className:"create-redirect-msg",children:`There are no partner solutions available. Create and publish ${S?.length===0?"another":"a"} partner solution to get started.`}),n.jsx("div",{className:"btn-cancel",children:n.jsx(Ze,{to:{pathname:"/insights",search:"?view=solutions"},className:"partner-create-redirect",children:"CREATE A PARTNER SOLUTION"})})]}):u===I?n.jsxs(n.Fragment,{children:[n.jsx("i",{className:"material-icons",children:"account_box"}),n.jsx("h6",{className:"create-redirect-msg",children:"There are no company contacts available"})]}):u===D?n.jsxs(n.Fragment,{children:[n.jsx("i",{className:"material-icons",children:"category"}),n.jsx("h6",{className:"create-redirect-msg",children:"There are no saved questions available. Ask and save a question in Q&A to get started."}),n.jsx("div",{className:"btn-cancel",children:n.jsx(Ze,{to:{pathname:"/questions"},className:"partner-create-redirect",children:"ASK A QUESTION"})})]}):n.jsx(n.Fragment,{})});if(S&&m&&p){const M=(W,K)=>{const z=u===I||u===N||u===D?m.indexOf(W.id):u===k?m.indexOf(W.page_slug):null,Y=u===I||u===N||u===D?m.indexOf(K.id):u===k?m.indexOf(K.page_slug):null;return z===-1||Y===-1?0:z<Y?-1:z>Y?1:0};return S.sort(M),n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"gallery-browser-topic-wrapper",children:[n.jsxs("h6",{className:"gallery-browser-topic",children:[P,o?n.jsx("button",{className:"btn-cancel",onClick:A,children:"Clear Search"}):""]}),n.jsx("div",{className:"num-items-selected",children:`${p.length} / ${u===N?O:u===k?$:u===I?U:u===D?B:null} Selected`})]}),n.jsxs("div",{className:u,id:"gallery-browser-wrapper","diagnostic-id":"gallery-browser-wrapper",children:[o&&S.length===0?n.jsxs("div",{id:"spotlight-search-placeholder",className:"fadeTransition",children:[n.jsx("i",{className:"material-icons",children:"search_off"}),n.jsxs("div",{children:['No results for "',l,'"']}),n.jsx("button",{className:"btn-cancel",onClick:A,children:"Clear Search"})]}):n.jsx(n.Fragment,{}),S.map((W,K)=>{const z=u===I||u===N||u===D?W.id:u===k?W.page_slug:null;return n.jsx(yF,{index:W.id,editorItemIndex:K+1,editorItem:W,toggleDrag:L,isDragging:C,isSelected:z&&p?.includes(z),selectEditorItem:()=>u===D?W?.content_permissions_level<=w?.content_permissions_level?F([z]):null:F([z]),deselectEditorItem:()=>u===D?W?.content_permissions_level<=w?.content_permissions_level?q(z):null:q(z),updateEditorItemsOrder:V,itemsOrderNew:m,section:a,sectionType:u,pageType:d},W.id||K)})]})]})}return null}const VDe=e=>({searchTerms:e.spotlight&&e.spotlight.pageType===FDe?e.spotlight.partnerSpotlightPage.searchTerms:e.spotlight.pageType===UDe?e.spotlight.solutions.page.searchTerms:e.spotlight.pageType===BDe?e.spotlight.partnerInsights.page.searchTerms:null,isEditorDirty:e.spotlight.isDirty,pageType:e.spotlight&&e.spotlight.pageType,partnerPermissions:e.auth&&e.auth.user&&e.auth.user.company.partner_permissions,hedwigPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.hedwig_permissions}),zDe=le(VDe,{searchEditor:j0,setEditorFormStatus:Sa})(Ss.DragDropContext(am)(qDe)),{Spotlight:HDe,Solution:GDe,Insight:WDe}=on;function YDe(e){const{searchTerms:t,searchEditor:r,sectionType:i,isSearching:a,setSearching:s,pageType:
128o}=e,[l,c]=y.useState(""),{InsightsGallery:h,SolutionsGallery:u,ContactForm:d,ClientQuestions:p}=Bn;y.useEffect(()=>{r("",o)},[]),y.useEffect(()=>{c(t)},[t]);const f=x=>{c(x.target.value),r(x.target.value,o)},m=()=>{c(""),r("",o)};y.useEffect(()=>{t&&t.length>2?s(!0):a&&s(!1)},[a,t]);const g=l&&l.length>2;return n.jsx("form",{className:"spotlight-search",onSubmit:x=>x.preventDefault(),children:n.jsxs("div",{className:"input-field",children:[n.jsx("input",{id:"spotlight_search","diagnostic-id":"spotlight-search-input",type:"search",value:l||"",onChange:f,className:g?"active":"",required:!0,placeholder:`Search ${i===h?"Partner Insights":i===u?"Partner Solutions":i===d?"contacts...":i===p?"Saved Questions":""}`}),l?n.jsx("i",{className:"material-icons",onClick:m,children:"close"}):n.jsx("i",{className:"material-icons prefix",children:"search"})]})})}const KDe=e=>({searchTerms:e.spotlight&&e.spotlight.pageType===HDe?e.spotlight.partnerSpotlightPage.searchTerms:e.spotlight.pageType===GDe?e.spotlight.solutions.page.searchTerms:e.spotlight.pageType===WDe?e.spotlight.partnerInsights.page.searchTerms:null,pageType:e.spotlight&&e.spotlight.pageType}),xF=le(KDe,{searchEditor:j0})(YDe);function XDe(e){const{isEditing:t,setModal:r,editorItems:i,section:a,setDirty:s,isDirty:o,editorHeader:l,sectionType:c,handleCancel:h,companyContacts:u,pageSlug:d,index:p,isEditorDirty:f,getPublishedSolutions:m,userId:g,publishedSolutions:x,pageId:v,getPublishedPartnerInsights:b,publishedPartnerInsights:j,pageType:w,isRelatedSolutions:S,getSavedQuestions:_,savedQuestions:C}=e,[E,P]=y.useState(!1),[T,N]=y.useState(!1),[k,I]=y.useState([]),[D,O]=y.useState([]),[$,U]=y.useState([]),{InsightsGallery:B,SolutionsGallery:L,TeamProfile:A,ClientQuestions:R}=Bn,{Insight:F}=on;y.useEffect(()=>{c===L?m(g):c===B?b(g):c===R&&_(g)},[]);const q={showSelected:T,setShowSelected:N,isSearching:E,setSearching:P,selectedItemIds:k,setSelectedItemIds:I,itemsOrderNew:D,setItemsOrderNew:O,itemsOrderInitial:$,setItemsOrderInitial:U},V=x?.filter(X=>X.page_slug!==d);return n.jsx(ot,{setModal:r,disableClickOutsideCancel:!0,children:n.jsxs("div",{className:"insights-gallery-editor-modal-container",children:[n.jsx("i",{className:"material-icons",onClick:()=>h(),children:"close"}),n.jsx("h5",{children:l}),c===A&&n.jsx("p",{className:"team-profiles-header-msg",children:"Showcase relevant members of your team on this page"}),w!==F&&n.jsx("div",{className:"spotlight-gallery-header",children:"Section Title"}),n.jsxs("div",{className:"spotlight-gallery-search-save-grp",children:[n.jsx(gF,{title:a?.title,sectionType:c,sectionId:a?.id,handleCancel:h,pageSlug:d,index:p,isEditing:t,...q,pageId:v,setDirty:s,isDirty:o}),(c===L&&V?.length>0||c===B&&j?.length>0||c===A||c===R&&C?.length>0)&&n.jsxs("div",{className:"spotlight-gallery-search",children:[n.jsx(xF,{sectionType:c,isSearching:E,setSearching:P}),n.jsx("div",{className:"show-selected-checkbox",onClick:X=>X.stopPropagation(),children:n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"showSelected",id:"showSelected",className:"filled-in",onChange:X=>{const M=X.target.checked;N(M)},"diagnostic-id":"show-selected-input",checked:T,disabled:E}),n.jsx("span",{"diagnostic-id":"show-selected-toggle",className:E?"disabled":"",children:"Only show selected"})]})})]})]}),n.jsx("div",{id:"gallery-wrapper",children:n.jsx(zDe,{section:a,sectionType:c,editorItems:i,partnerItems:c===B?j:c===L?x:c===A?u:c===R?C:"",...q,pageSlug:d})})]})})}const QDe=e=>({userId:e.auth.user.id,companyContacts:e.spotlight&&e.spotlight.companyContacts,isEditorDirty:e.spotlight.isDirty,publishedSolutions:e.spotlight&&e.spotlight.publishedSolutions,publishedPartnerInsights:e.spotlight&&e.spotlight.publishedPartnerInsights,pageType:e.spotlight&&e.spotlight.pageType,savedQuestions:e.questionanswer&&e.questionanswer.savedQuestions}),Fu=le(QDe,{getPublishedSolutions:Exe,getPublishedPartnerInsights:fxe,getSavedQuestions:I0})(XDe);function ZDe(e){const{setDirty:t,partnerInsight:r,isEditorDirty:i,isDirty:a,setEditorFormStatus:s}=e,{ClientQuestions:o}=Bn,{Published:l,Pending:c}=ki,h="If changes are required for this partner insight, please contact us.",u=r.publish_status===c||r.publish_status===l,[d,p]=y.useState(!1);y.useEffect(()=>{t(i)},[i]);const m={setModal:p,isEditing:d,handleCancel:x=>
128{i&&!x?window.confirm("Changes you made may not be saved.")&&(p(!1),t(!1),s(!1)):(p(!1),t(!1),s(!1))},editorHeader:"Select Client Questions",sectionType:o,editorItems:r?.client_questions||null},g=d&&n.jsx(Fu,{...m,pageId:r.id,setDirty:t,isDirty:a});return n.jsxs("div",{className:"partner-insight-content","diagnostic-id":"client-questions-content",children:[n.jsxs("div",{className:"client-questions-container",children:[n.jsxs("div",{className:"content-header-wrapper",children:[n.jsxs("div",{className:"content-icon-text-grp",children:[n.jsx("i",{className:"material-icons-outlined",children:"post_add"}),n.jsx("h4",{children:"Add Client Questions"})]}),n.jsx(br,{message:u?h:"",children:n.jsx("span",{id:"partner-insight-published",children:n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"add-client-questions-btn",onClick:()=>p(!0),disabled:u,children:r.client_questions.length>0?n.jsxs(n.Fragment,{children:[n.jsx("i",{className:"material-icons add-icon",children:"edit"}),"Edit"]}):n.jsxs(n.Fragment,{children:[n.jsx("i",{className:"material-icons add-icon",children:"add"}),"Add"]})})})})]}),n.jsx("p",{children:"Connect related questions and answers that will be showcased alongside this partner insight"}),r.client_questions.length>0?n.jsx(Wa,{cards:r.client_questions,sectionType:o,isOnWorkspace:!1}):n.jsx(br,{message:u?h:"",children:n.jsx("div",{className:"new-client-questions-btn-container","diagnostic-id":"new-client-questions-btn-container",id:"partner-insight-published",children:n.jsxs("div",{id:"new-client-questions-btn",className:`new-client-questions-btn${u?" locked":""}`,"diagnostic-id":"new-client-questions-card-btn",onClick:()=>u?null:p(!0),children:["Add Client Questions",n.jsx("i",{className:"material-icons",children:"add_circle"})]})})})]}),g]})}const JDe=e=>({userId:e.auth.user&&e.auth.user.id,isEditorDirty:e.spotlight.isDirty}),eRe=le(JDe,{setEditorFormStatus:Sa})(ZDe);function tRe(e){const{getCharts:t,chartLibrary:r,isWizard:i,addChart:a,partnerInsightSelectedId:s}=e,[o,l]=y.useState(!1),[c,h]=y.useState(!1);y.useEffect(()=>{t(!0).then(()=>{h(!0)})},[]);const u=()=>{l(!0)},d=()=>{l(!1)};if(r){const{charts:p,topics:f}=r;return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"row",children:n.jsx("div",{className:"chart-library-search",children:n.jsx(aL,{handleCancel:u,isChartLibraryModal:!0,addChart:a,partnerInsightSelectedId:s})})}),f&&p&&n.jsx("div",{id:"library-wrapper",children:n.jsx(sL,{...e,charts:p,topics:f,isResetCharts:o,handleReset:d,isChartsLoaded:c,isChartLibraryModal:!0,partnerInsightSelectedId:s})})]})}return null}const nRe=e=>({chartLibrary:e.chartlibrary}),rRe=le(nRe,{getCharts:lc})(tRe),iRe=({userId:e,selectedBtn:t,setModal:r,selectedInsight:i,tabSelected:a,addContentToInsight:s,partnerInsightId:o,partnerInsight:l,renderedInsightsVideosPodcasts:c,selectedChartId:h})=>{let u="unknown",d,p,f;const m=x=>{x.preventDefault(),s(o,e,t,i,f).then(()=>r(!1))},g=x=>{x.preventDefault(),s(o,e,"chart_info",h).then(()=>r(!1))};switch(t){case"clientpiece":u="Add a Commentary",p=l?.client_piece?.id,d=n.jsx(T0,{tabSelected:a,partnerInsightSelectedId:p});break;case"chartbook":u="Add a Chartbook",p=l?.chartbook?.id,d=n.jsx(k0,{tabSelected:a,partnerInsightSelectedId:p});break;case"chart":u="Select a Chart",p=l?.chart?.id,d=n.jsx(rRe,{addChart:g,partnerInsightSelectedId:p});break;case"engage_insights_video":u="Add an Insights Video",p=l?.engage_insights_video?.id,f=c?.filter(x=>x.id===i)[0]?.type,d=n.jsx(El,{tabSelected:a,partnerInsightSelectedId:p,typeSelected:t,insightsToolkitType:l?.partner_insight_type});break;case"insightsvideo":u="Add an Insights Video",p=l?.insights_video?.id,f=c?.filter(x=>x.id===i)[0]?.type,d=n.jsx(El,{tabSelected:a,partnerInsightSelectedId:p,typeSelected:t,insightsToolkitType:l?.partner_insight_type});break;case"insightspodcast":u="Add an Insights Podcast",p=l?.insights_podcast?.id,d=n.jsx(El,{tabSelected:a,partnerInsightSelectedId:p,typeSelected:t});break;case"advisor_notes_video":u="Add a Video for Advisors",p=l?.advisor_notes_video?.id,f=c?.filter(x=>x.id===i)[0]?.type,d=n.jsx(El,{tabSelected:a,partnerInsightSelectedId:p,typeSelected:t,insightsToolkitType:l?.partner_insight_type});break}
128return n.jsx(ot,{setModal:r,disableClickOutsideCancel:!0,children:n.jsxs("div",{className:t==="chart"?"chart-lib-modal-container":"new-content-modal-container",children:[t==="chart"&&n.jsx("i",{className:"material-icons",onClick:()=>r(!1),children:"close"}),n.jsx("h5",{"diagnostic-id":"content-type-header",children:u}),d,t!=="chart"&&n.jsxs("div",{className:"add-new-insights-btns",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"add-insights-cancel-btn",onClick:()=>r(!1),children:"Cancel"}),n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"add-insights-select-btn",onClick:m,disabled:!p&&!i||i===p,children:"Select"})]})]})})},aRe=e=>({userId:e.auth.user.id,isLicenseUpgradable:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.license_type&&e.auth.user.company.license_type.is_upgradable,selectedInsight:e.spotlight&&e.spotlight.partnerInsights.selectedInsight,partnerInsightId:e.spotlight&&e.spotlight.partnerInsights&&e.spotlight.partnerInsights.page.id,renderedInsightsVideosPodcasts:e.studio&&e.studio.renderedInsightsVideosPodcasts,selectedChartId:e.chartlibrary&&e.chartlibrary.selectedChartId}),jF=Jt(le(aRe,{addContentToInsight:yxe})(iRe));function sRe(e){const{tabSelected:t,partnerInsight:r,toggleCustomize:i,userId:a,studioPermissions:s,canUseStudio:o,partnerType:l,toggleTalkingPoints:c}=e,[h,u]=y.useState(!1),[d,p]=y.useState(null),[f,m]=y.useState(!1),[g,x]=y.useState(!1),[v,b]=y.useState(""),{Published:j,Pending:w}=ki,{clientpieceType:S,insightsVideoType:_}=wf,{Enabled:C}=_n,{allow_studio:E}=s,{Advisor:P,Community:T}=Oj,N=r.publish_status===j||r.publish_status===w,k=r?.partner_insight_type===T?"col s12 m6 l4 xl4":"col m6 l3 xl3",I="If changes are required for this partner insight, please contact us.",D=A=>{A.preventDefault();const R=A.currentTarget.id;N||(u(!0),p(R))},O=(A,R,F)=>{A.preventDefault(),i(r.id,a,F,R).then(()=>{f&&m(!1)})},$=f&&n.jsx(ot,{setModal:m,children:n.jsxs("div",{className:"allow-customization-modal-container",children:[n.jsx("h5",{children:"Allow Customization of This Content"}),n.jsx("p",{children:"This will allow advisors to customize this content, including making modifications to the text and applying their advisor branding. Are you sure you want to allow customization?"}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>m(!1),children:"Cancel"}),n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",onClick:A=>O(A,v===S?r.can_customize_clientpiece:v===_?r.can_customize_insightsvideo:null,v),children:"Allow"})]})]})}),U=g&&n.jsx(ot,{setModal:x,children:n.jsxs("div",{className:"allow-customization-modal-container",children:[n.jsx("h5",{children:"Show Talking Points and Allow Customization"}),n.jsx("p",{children:"This will show the associated chartbook's talking points alongside each chart in the partner insight and allow advisors to customize the talking points when sharing this chartbook. Are you sure you want to allow customization?"}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>x(!1),children:"Cancel"}),n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",onClick:A=>{c(r.id,a,r.show_chartbook_notes).then(()=>{g&&x(!1)})},children:"Allow"})]})]})}),B=n.jsx(br,{message:N?I:"",children:n.jsx("div",{className:k,id:"partner-insight-published",children:r.chartbook?n.jsxs("div",{className:"partner-insight-content-card",children:[n.jsxs("div",{className:"partner-insight-card-top",children:[n.jsxs("div",{className:"content-header-container",children:[n.jsx("div",{className:"content-type",children:"Chartbook"}),n.jsxs("button",{className:"btn-primary-icon-text","diagnostic-id":"content-edit-btn",id:"chartbook",onClick:D,disabled:N,children:[n.jsx("i",{className:"material-icons",children:"edit"}),"Edit"]})]}),n.jsxs("div",{className:"content-title-img-grp",children:[n.jsx("i",{className:"material-icons insert-chart-icon",children:"insert_chart"}),n.jsx("div",{className:"content-title",children:n.jsx("h6",{children:r.chartbook.title})})]})]}),n.jsxs("div",{className:"partner-insight-card-bottom",children:[n.jsx(Ke,{title:"Chartbooks are always allowed to be customizable",placement:"top",children:n.jsx("div",{className:"allow-customize-checkbox",children:n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"allow-customize",id:"allow-customize",className:"filled-in",defaultChecked:!0,disabled:!0,"diagnostic-id":"chartbook-allow-customize-btn"}),n.jsx("span",{"diagnostic-id":"allow-customize-toggle",children:"Allow advisors to customize this content"})]})})}),n.jsx("div",{className:"allow-customize-checkbox talking-points-checkbox",children:n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"allow-talking-points",id:"allow-talking-points",className:"filled-in","diagnostic-id":"chartbook-allow-talking-points-btn",checked:r.show_chartbook_notes,onChange:A=>
128{r.show_chartbook_notes?c(r.id,a,r.show_chartbook_notes):x(!0)},disabled:N}),n.jsx("span",{"diagnostic-id":"allow-customize-toggle",children:"Show talking points and allow customization"})]})})]})]}):n.jsx("div",{className:"add-content-grp",id:"chartbook",onClick:D,children:n.jsxs("div",{className:`add-content-icon-text${N?" disabled":""}`,children:[n.jsx("i",{className:"material-icons",children:"add"}),n.jsx("div",{className:"add-content-title",children:n.jsx("h6",{children:"Add a Chartbook"})})]})})})}),L=n.jsx(br,{message:N?I:"",children:n.jsx("div",{className:k,id:"partner-insight-published",children:r?.chart?n.jsxs("div",{className:"partner-insight-content-card",children:[n.jsxs("div",{className:"partner-insight-card-top",children:[n.jsxs("div",{className:"content-header-container",children:[n.jsx("div",{className:"content-type",children:"Chart"}),n.jsxs("button",{className:"btn-primary-icon-text","diagnostic-id":"content-edit-btn",id:"chart",onClick:D,disabled:N,children:[n.jsx("i",{className:"material-icons",children:"edit"}),"Edit"]})]}),n.jsxs("div",{className:"content-title-img-grp",children:[n.jsx("i",{className:"material-icons insert-chart-icon",children:"insert_chart"}),n.jsx("div",{className:"content-title",children:n.jsx("h6",{children:r?.chart?.name})})]})]}),n.jsxs("div",{className:"partner-insight-card-bottom",children:[n.jsx(Ke,{title:"Charts are always allowed to be customizable",placement:"top",children:n.jsx("div",{className:"allow-customize-checkbox",children:n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"allow-customize",id:"allow-customize",className:"filled-in",defaultChecked:!0,disabled:!0,"diagnostic-id":"chart-allow-customize-btn"}),n.jsx("span",{"diagnostic-id":"allow-customize-toggle",children:"Allow advisors to customize this content"})]})})}),n.jsx("div",{className:"allow-customize-checkbox talking-points-checkbox",children:n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"allow-talking-points",id:"allow-talking-points",className:"filled-in","diagnostic-id":"chart-allow-talking-points-btn",checked:r.show_chartbook_notes,onChange:A=>{r.show_chartbook_notes?c(r.id,a,r.show_chartbook_notes):x(!0)},disabled:N}),n.jsx("span",{"diagnostic-id":"allow-customize-toggle",children:"Show talking points and allow customization"})]})})]})]}):n.jsx("div",{className:"add-content-grp",id:"chart",onClick:D,children:n.jsxs("div",{className:`add-content-icon-text${N?" disabled":""}`,children:[n.jsx("i",{className:"material-icons",children:"add"}),n.jsx("div",{className:"add-content-title",children:n.jsx("h6",{children:"Add a Chart"})})]})})})});return n.jsxs("div",{className:"partner-insight-content","diagnostic-id":"add-insights-content",children:[n.jsxs("div",{className:"content-container",children:[n.jsx("div",{className:"content-header-wrapper",children:n.jsxs("div",{className:"content-icon-text-grp",children:[n.jsx("i",{className:"material-icons",children:"add_chart"}),n.jsx("h4",{children:"Add Content"})]})}),n.jsx("p",{children:"Select the content for this partner insight"}),n.jsxs("div",{className:"add-content-btns-wrapper",children:[n.jsx(br,{message:N?I:"",children:n.jsx("div",{className:k,id:"partner-insight-published",children:r.client_piece?n.jsxs("div",{className:"partner-insight-content-card",children:[n.jsxs("div",{className:"partner-insight-card-top",children:[n.jsxs("div",{className:"content-header-container",children:[n.jsx("div",{className:"content-type",children:"Commentary"}),n.jsxs("button",{className:"btn-primary-icon-text","diagnostic-id":"content-edit-btn",id:"clientpiece",onClick:D,disabled:N,children:[n.jsx("i",{className:"material-icons",children:"edit"}),"Edit"]})]}),n.jsxs("div",{className:"content-title-img-grp",children:[n.jsx("i",{className:"material-icons insert-chart-icon",children:"description"}),n.jsx("div",{className:"content-title",children:n.jsx("h6",{children:r.client_piece.title})})]})]}),n.jsx("div",{className:"partner-insight-card-bottom",children:n.jsx(Ke,{title:r?.has_clientpiece_custom_images?"This option is unavailable because this commentary uses a custom image":"",placement:"top",children:n.jsx("div",{className:"allow-customize-checkbox",children:n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"allow-customize",id:"clientpiece",className:"filled-in","diagnostic-id":"allow-customize-checkbox",checked:r.can_customize_clientpiece,onCh
128ange:A=>{r.can_customize_clientpiece?O(A,r.can_customize_clientpiece,A.currentTarget.id):(b(A.currentTarget.id),m(!0))},disabled:N||r?.has_clientpiece_custom_images}),n.jsx("span",{"diagnostic-id":"allow-customize-toggle",children:"Allow advisors to customize this content"})]})})})})]}):n.jsx("div",{className:"add-content-grp",id:"clientpiece",onClick:D,children:n.jsxs("div",{className:`add-content-icon-text${N?" disabled":""}`,children:[n.jsx("i",{className:"material-icons",children:"add"}),n.jsx("div",{className:"add-content-title",children:n.jsx("h6",{children:"Add a Commentary"})})]})})})}),n.jsx(wn,{hasPermission:r?.partner_insight_type===P,fallback:L,children:B}),n.jsx(wn,{hasPermission:E===C&&o,children:n.jsxs(n.Fragment,{children:[r?.partner_insight_type===P&&n.jsxs(n.Fragment,{children:[n.jsx(br,{message:N?I:"",children:n.jsx("div",{className:k,id:"partner-insight-published",children:r.insights_video?n.jsxs("div",{className:"partner-insight-content-card",children:[n.jsxs("div",{className:"partner-insight-card-top",children:[n.jsxs("div",{className:"content-header-container",children:[n.jsx("div",{className:"content-type",children:r.insights_video.type==="custom"?"Uploaded Video":"Insights Video"}),n.jsxs("button",{className:"btn-primary-icon-text","diagnostic-id":"content-edit-btn",id:"insightsvideo",onClick:D,disabled:N,children:[n.jsx("i",{className:"material-icons",children:"edit"}),"Edit"]})]}),n.jsxs("div",{className:"content-title-img-grp",children:[n.jsx("i",{className:"material-icons insert-chart-icon",children:"smart_display"}),n.jsx("div",{className:"content-title",children:n.jsx("h6",{children:r.insights_video.title})})]})]}),n.jsx("div",{className:"partner-insight-card-bottom",children:n.jsx(Ke,{title:r?.insights_video.type==="custom"?"This option is unavailable for uploaded videos":"",placement:"top",children:n.jsx("div",{className:"allow-customize-checkbox",children:n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"allow-customize",id:"insightsvideo",className:"filled-in",checked:r.can_customize_insightsvideo,onChange:A=>{r.can_customize_insightsvideo?O(A,r.can_customize_insightsvideo,A.currentTarget.id):(b(A.currentTarget.id),m(!0))},disabled:N||r?.insights_video?.type==="custom"}),n.jsx("span",{"diagnostic-id":"allow-customize-toggle",children:"Allow advisors to customize this content"})]})})})})]}):n.jsx("div",{className:"add-content-grp",id:"insightsvideo",onClick:D,children:n.jsxs("div",{className:`add-content-icon-text${N?" disabled":""}`,children:[n.jsx("i",{className:"material-icons",children:"add"}),n.jsx("div",{className:"add-content-title",children:n.jsx("h6",{children:"Add an Insights Video"})})]})})})}),n.jsx(br,{message:N?I:"",children:n.jsx("div",{className:k,id:"partner-insight-published",children:r.insights_podcast?n.jsxs("div",{className:"partner-insight-content-card",children:[n.jsxs("div",{className:"partner-insight-card-top",children:[n.jsxs("div",{className:"content-header-container",children:[n.jsx("div",{className:"content-type",children:"Insights Podcast"}),n.jsxs("button",{className:"btn-primary-icon-text","diagnostic-id":"content-edit-btn",id:"insightspodcast",onClick:D,disabled:N,children:[n.jsx("i",{className:"material-icons",children:"edit"}),"Edit"]})]}),n.jsxs("div",{className:"content-title-img-grp",children:[n.jsx("i",{className:"material-icons insert-chart-icon",children:"mic"}),n.jsx("div",{className:"content-title",children:n.jsx("h6",{children:r.insights_podcast.title})})]})]}),n.jsx("div",{className:"partner-insight-card-bottom",children:n.jsx(Ke,{title:"This option is unavailable for uploaded podcasts",placement:"top",children:n.jsx("div",{className:"allow-customize-checkbox",children:n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"allow-customize",id:"allow-customize",className:"filled-in",checked:!1,disabled:!0,"diagnostic-id":"insights-podcast-allow-customize-btn"}),n.jsx("span",{"diagnostic-id":"allow-customize-toggle",children:"Allow advisors to customize this content"})]})})})})]}):n.jsx("div",{className:"add-content-grp",id:"insightspodcast",onClick:D,children:n.jsxs("div",{className:`add-content-icon-text${N?" disabled":""}`,children:[n.jsx("i",{className:"material-icons",children:"add"}),n.jsx("div",{className:"add-content-title",children:n.jsx("h6",{children:"Add an Insights Podcast"})})]})})})})]}),r?.partner_insight_type===T&&n.jsx(br,{message:N?I:"",children:n.jsx("div",{className:k,id:"partner-insight-published",children:r.engage_insights_video?n.jsxs("div",{className:"partner-insight-content-card",children:[n.jsxs("div",{className:"partner-insight-card-top",children:[n.jsxs("div",{className:"content-header-container",children:[n.jsx("div",{className:"content-type",children:"Engage Insights Video"}),n.jsxs("button",{className:"btn-primary-icon-text","diagnostic-id":"content-edit-btn",id:"engage_insights_video",onClick:D,disabled:N,children:[n.jsx("i",{className:"material-icons",children:"edit"}),"Edit"]})]}),n.jsxs("div",{className:"content-title-img-grp",children:[n.jsx("i",{className:"material-icons insert-chart-icon",children:"smart_display"}),n.jsx("div",{className:"content-title",children:n.jsx("h6",{children:r.engage_insights_video.title})})]})]}),n.jsx("div",{className:"partner-insight-card-bottom",children:n.jsx(Ke,{title:"This option is unavailable for engage insights videos",placement:"top",children:n.jsx("div",{className:"allow-customize-checkbox",children:n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"allow-customize",id:"engage_insights_video",className:"filled-in",disabled:!0,checked:!1,"diagnostic-id":"engage-insights-video-allow-customize-btn"}),n.jsx("span",{"diagnostic-id":"allow-customize-toggle",children:"Allow advisors to customize this content"})]})})})})]}):n.jsx("div",{className:"add-content-grp",id:"engage_insights_video",onClick:D,children:n.jsxs("div",{className:`add-content-icon-text${N?" disabled":""}`,children:[n.jsx("i",{className:"material-icons",children:"add"}),n.jsx("div",{className:"add-content-title",children:n.jsx("h6",{children:"Add an Insights Video"})})]})})})})]})})]})]}),h&&n.jsx(jF,{selectedBtn:d,setModal:u,tabSelected:t,partnerInsight:r}),$,U]})}const oRe=e=>({userId:e.auth.user.id,studioPermissions:e.auth.user&&e.auth.user.company&&e.auth.user.company.studio_permissions,canUseStudio:e.auth&&e.auth.user&&e.auth.user.can_use_studio,partnerType:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.partner_type&&e.auth.user.company.partner_type.type}),lRe=le(oRe,{toggleCustomize:wxe,toggleTalkingPoints:Sxe})(sRe);function VI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,i)}return r}function wF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
vendor: 35,427 bytes, lines 128-129
128t%2?VI(Object(r),!0).forEach(function(i){hRe(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VI(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function cRe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function SF(e){var t=cRe(e,"string");return typeof t=="symbol"?t:t+""}function nj(e){"@babel/helpers - typeof";return nj=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nj(e)}function dRe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zI(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,SF(i.key),i)}}function uRe(e,t,r){return t&&zI(e.prototype,t),r&&zI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function hRe(e,t,r){return t=SF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _F(e){return pRe(e)||fRe(e)||mRe(e)||gRe()}function pRe(e){if(Array.isArray(e))return rj(e)}function fRe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mRe(e,t){if(e){if(typeof e=="string")return rj(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rj(e,t)}}function rj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}function gRe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
129In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Em=typeof window<"u"&&typeof window.document<"u",Ua=Em?window:{},uS=Em&&Ua.document.documentElement?"ontouchstart"in Ua.document.documentElement:!1,hS=Em?"PointerEvent"in Ua:!1,Yn="cropper",pS="all",CF="crop",NF="move",EF="zoom",mo="e",go="w",wl="s",ks="n",pd="ne",fd="nw",md="se",gd="sw",ij="".concat(Yn,"-crop"),HI="".concat(Yn,"-disabled"),ji="".concat(Yn,"-hidden"),GI="".concat(Yn,"-hide"),vRe="".concat(Yn,"-invisible"),mf="".concat(Yn,"-modal"),aj="".concat(Yn,"-move"),eu="".concat(Yn,"Action"),cp="".concat(Yn,"Preview"),fS="crop",TF="move",kF="none",sj="crop",oj="cropend",lj="cropmove",cj="cropstart",WI="dblclick",bRe=uS?"touchstart":"mousedown",yRe=uS?"touchmove":"mousemove",xRe=uS?"touchend touchcancel":"mouseup",YI=hS?"pointerdown":bRe,KI=hS?"pointermove":yRe,XI=hS?"pointerup pointercancel":xRe,QI="ready",ZI="resize",JI="wheel",dj="zoom",eD="image/jpeg",jRe=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,wRe=/^data:/,SRe=/^data:image\/jpeg;base64,/,_Re=/^img|canvas$/i,PF=200,IF=100,tD={viewMode:0,dragMode:fS,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:PF,minContainerHeight:IF,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},CRe='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',NRe=Number.isNaN||Ua.isNaN;function un(e){return typeof e=="number"&&!NRe(e)}var nD=function(t){return t>0&&t<1/0};function ex(e){return typeof e>"u"}function Lo(e){return nj(e)==="object"&&e!==null}var ERe=Object.prototype.hasOwnProperty;function Tl(e){if(!Lo(e))return!1;try{var t=e.constructor,r=t.prototype;return t&&r&&ERe.call(r,"isPrototypeOf")}catch{return!1}}function vi(e){return typeof e=="function"}var TRe=Array.prototype.slice;function DF(e){return Array.from?Array.from(e):TRe.call(e)}function yr(e,t){return e&&vi(t)&&(Array.isArray(e)||un(e.length)?DF(e).forEach(function(r,i){t.call(e,r,i,e)}):Lo(e)&&Object.keys(e).forEach(function(r){t.call(e,e[r],r,e)})),e}var Kn=Object.assign||function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return Lo(t)&&i.length>0&&i.forEach(function(s){Lo(s)&&Object.keys(s).forEach(function(o){t[o]=s[o]})}),t},kRe=/\.\d*(?:0|9){12}\d*$/;function Pl(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return kRe.test(e)?Math.round(e*t)/t:e}var PRe=/^width|height|left|top|marginLeft|marginTop$/;function As(e,t){var r=e.style;yr(t,function(i,a){PRe.test(a)&&un(i)&&(i="".concat(i,"px")),r[a]=i})}function IRe(e,t){return e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function $r(e,t){if(t){if(un(e.length)){yr(e,function(i){$r(i,t)});return}if(e.classList){e.classList.add(t);return}var r=e.className.trim();r?r.indexOf(t)<0&&(e.className="".concat(r," ").concat(t)):e.className=t}}function Oa(e,t){if(t){if(un(e.length)){yr(e,function(r){Oa(r,t)});return}if(e.classList){e.classList.remove(t);return}e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,""))}}function kl(e,t,r){if(t){if(un(e.length)){yr(e,function(i){kl(i,t,r)});return}r?$r(e,t):Oa(e,t)}}var DRe=/([a-z\d])([A-Z])/g;function mS(e){return e.replace(DRe,"$1-$2").toLowerCase()}function uj(e,t){return Lo(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(mS(t)))}function tu(e,t,r){Lo(r)?e[t]=r:e.dataset?e.dataset[t]=r:e.setAttribute("data-".concat(mS(t)),r)}function RRe(e,t){if(Lo(e[t]))try{delete e[t]}catch{e[t]=void 0}else if(e.dataset)try{delete e.dataset[t]}catch{e.dataset[t]=void 0}else e.removeAttribute("data-".concat(mS(t)))}var RF=/\s\s*/,OF=(function(){var e=!1;if(Em){var t=!1,r=function(){},i=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(s){t=s}});Ua.addEventListener("test",r,i),Ua.removeEventListener("test",r,i)}return e})();function ma(e,t,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=r;t.trim().split(RF).forEach(function(s){if(!OF){var o=e.listeners;o&&o[s]&&o[s][r]&&(a=o[s][r],delete o[s][r],Object.keys(o[s]).length===0&&delete o[s],Object.keys(o).length===0&&delete e.listeners)}e.removeEventListener(s,a,i)})}function na(e,t,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=r;t.trim().split(RF).forEach(function(s){if(i.once&&!OF){var o=e.listeners,l=o===void 0?{}:o;a=function(){delete l[s][r],e.removeEventListener(s,a,i);for(var h=arguments.length,u=new Array(h),d=0;d<h;d++)u[d]=arguments[d];r.apply(e,u)},l[s]||(l[s]={}),l[s][r]&&e.removeEventListener(s,l[s][r],i),l[s][r]=a,e.listeners=l}e.addEventListener(s,a,i)})}function Il(e,t,r){var i;return vi(Event)&&vi(CustomEvent)?i=new CustomEvent(t,{detail:r,bubbles:!0,cancelable:!0}):(i=document.createEvent("CustomEvent"),i.initCustomEvent(t,!0,!0,r)),e.dispatchEvent(i)}function AF(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}var tx=Ua.location,ORe=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function rD(e){var t=e.match(ORe);return t!==null&&(t[1]!==tx.protocol||t[2]!==tx.hostname||t[3]!==tx.port)}function iD(e){var t="timestamp=".concat(new Date().getTime());return e+(e.indexOf("?")===-1?"?":"&")+t}function Fd(e){var t=e.rotate,r=e.scaleX,i=e.scaleY,a=e.translateX,s=e.translateY,o=[];un(a)&&a!==0&&o.push("translateX(".concat(a,"px)")),un(s)&&s!==0&&o.push("translateY(".concat(s,"px)")),un(t)&&t!==0&&o.push("rotate(".concat(t,"deg)")),un(r)&&r!==1&&o.push("scaleX(".concat(r,")")),un(i)&&i!==1&&o.push("scaleY(".concat(i,")"));var l=o.length?o.join(" "):"none";return{WebkitTransform:l,msTransform:l,transform:l}}function ARe(e){var t=wF({},e),r=0;return yr(e,function(i,a){delete t[a],yr(t,function(s){var o=Math.abs(i.startX-s.startX),l=Math.abs(i.startY-s.startY),c=Math.abs(i.endX-s.endX),h=Math.abs(i.endY-s.endY),u=Math.sqrt(o*o+l*l),d=Math.sqrt(c*c+h*h),p=(d-u)/u;Math.abs(p)>Math.abs(r)&&(r=p)})}),r}function dp(e,t){var r=e.pageX,i=e.pageY,a={endX:r,endY:i};return t?a:wF({startX:r,startY:i},a)}function MRe(e){var t=0,r=0,i=0;return yr(e,function(a){var s=a.startX,o=a.startY;t+=s,r+=o,i+=1}),t/=i,r/=i,{pageX:t,pageY:r}}function Ms(e){var t=e.aspectRatio,r=e.height,i=e.width,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",s=nD(i),o=nD(r);if(s&&o){var l=r*t;a==="contain"&&l>i||a==="cover"&&l<i?r=i/t:i=r*t}else s?r=i/t:o&&(i=r*t);return{width:i,height:r}}function $Re(e){var t=e.width,r=e.height,i=e.degree;if(i=Math.abs(i)%180,i===90)return{width:r,height:t};var a=i%90*Math.PI/180,s=Math.sin(a),o=Math.cos(a),l=t*o+r*s,c=t*s+r*o;return i>90?{width:c,height:l}:{width:l,height:c}}function LRe(e,t,r,i){var a=t.aspectRatio,s=t.naturalWidth,o=t.naturalHeight,l=t.rotate,c=l===void 0?0:l,h=t.scaleX,u=h===void 0?1:h,d=t.scaleY,p=d===void 0?1:d,f=r.aspectRatio,m=r.naturalWidth,g=r.naturalHeight,x=i.fillColor,v=x===void 0?"transparent":x,b=i.imageSmoothingEnabled,j=b===void 0?!0:b,w=i.imageSmoothingQuality,S=w===void 0?"low":w,_=i.maxWidth,C=_===void 0?1/0:_,E=i.maxHeight,P=E===void 0?1/0:E,T=i.minWidth,N=T===void 0?0:T,k=i.minHeight,I=k===void 0?0:k,D=document.createElement("canvas"),O=D.getContext("2d"),$=Ms({aspectRatio:f,width:C,height:P}),U=Ms({aspectRatio:f,width:N,height:I},"cover"),B=Math.min($.width,Math.max(U.width,m)),L=Math.min($.height,Math.max(U.height,g)),A=Ms({aspectRatio:a,width:C,height:P}),R=Ms({aspectRatio:a,width:N,height:I},"cover"),F=Math.min(A.width,Math.max(R.width,s)),q=Math.min(A.height,Math.max(R.height,o)),V=[-F/2,-q/2,F,q];return D.width=Pl(B),D.height=Pl(L),O.fillStyle=v,O.fillRect(0,0,B,L),O.save(),O.translate(B/2,L/2),O.rotate(c*Math.PI/180),O.scale(u,p),O.imageSmoothingEnabled=j,O.imageSmoothingQuality=S,O.drawImage.apply(O,[e].concat(_F(V.map(function(X){return Math.floor(Pl(X))})))),O.restore(),D}var MF=String.fromCharCode;function FRe(e,t,r){var i="";r+=t;for(var a=t;a<r;a+=1)i+=MF(e.getUint8(a));return i}var URe=/^data:.*,/;function BRe(e){var t=e.replace(URe,""),r=atob(t),i=new ArrayBuffer(r.length),a=new Uint8Array(i);return yr(a,function(s,o){a[o]=r.charCodeAt(o)}),i}function qRe(e,t){for(var r=[],i=8192,a=new Uint8Array(e);a.length>0;)r.push(MF.apply(null,DF(a.subarray(0,i)))),a=a.subarray(i);return"data:".concat(t,";base64,").concat(btoa(r.join("")))}function VRe(e){var t=new DataView(e),r;try{var i,a,s;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var o=t.byteLength,l=2;l+1<o;){if(t.getUint8(l)===255&&t.getUint8(l+1)===225){a=l;break}l+=1}if(a){var c=a+4,h=a+10;if(FRe(t,c,4)==="Exif"){var u=t.getUint16(h);if(i=u===18761,(i||u===19789)&&t.getUint16(h+2,i)===42){var d=t.getUint32(h+4,i);d>=8&&(s=h+d)}}}if(s){var p=t.getUint16(s,i),f,m;for(m=0;m<p;m+=1)if(f=s+m*12+2,t.getUint16(f,i)===274){f+=8,r=t.getUint16(f,i),t.setUint16(f,1,i);break}}}catch{r=1}return r}function zRe(e){var t=0,r=1,i=1;switch(e){case 2:r=-1;break;case 3:t=-180;break;case 4:i=-1;break;case 5:t=90,i=-1;break;case 6:t=90;break;case 7:t=90,r=-1;break;case 8:t=-90;break}return{rotate:t,scaleX:r,scaleY:i}}var HRe={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,r=this.options,i=this.container,a=this.cropper,s=Number(r.minContainerWidth),o=Number(r.minContainerHeight);$r(a,ji),Oa(t,ji);var l={width:Math.max(i.offsetWidth,s>=0?s:PF),height:Math.max(i.offsetHeight,o>=0?o:IF)};this.containerData=l,As(a,{width:l.width,height:l.height}),$r(t,ji),Oa(a,ji)},initCanvas:function(){var t=this.containerData,r=this.imageData,i=this.options.viewMode,a=Math.abs(r.rotate)%180===90,s=a?r.naturalHeight:r.naturalWidth,o=a?r.naturalWidth:r.naturalHeight,l=s/o,c=t.width,h=t.height;t.height*l>t.width?i===3?c=t.height*l:h=t.width/l:i===3?h=t.width/l:c=t.height*l;var u={aspectRatio:l,naturalWidth:s,naturalHeight:o,width:c,height:h};this.canvasData=u,this.limited=i===1||i===2,this.limitCanvas(!0,!0),u.width=Math.min(Math.max(u.width,u.minWidth),u.maxWidth),u.height=Math.min(Math.max(u.height,u.minHeight),u.maxHeight),u.left=(t.width-u.width)/2,u.top=(t.height-u.height)/2,u.oldLeft=u.left,u.oldTop=u.top,this.initialCanvasData=Kn({},u)},limitCanvas:function(t,r){var i=this.options,a=this.containerData,s=this.canvasData,o=this.cropBoxData,l=i.viewMode,c=s.aspectRatio,h=this.cropped&&o;if(t){var u=Number(i.minCanvasWidth)||0,d=Number(i.minCanvasHeight)||0;l>1?(u=Math.max(u,a.width),d=Math.max(d,a.height),l===3&&(d*c>u?u=d*c:d=u/c)):l>0&&(u?u=Math.max(u,h?o.width:0):d?d=Math.max(d,h?o.height:0):h&&(u=o.width,d=o.height,d*c>u?u=d*c:d=u/c));var p=Ms({aspectRatio:c,width:u,height:d});u=p.width,d=p.height,s.minWidth=u,s.minHeight=d,s.maxWidth=1/0,s.maxHeight=1/0}if(r)if(l>(h?0:1)){var f=a.width-s.width,m=a.height-s.height;s.minLeft=Math.min(0,f),s.minTop=Math.min(0,m),s.maxLeft=Math.max(0,f),s.maxTop=Math.max(0,m),h&&this.limited&&(s.minLeft=Math.min(o.left,o.left+(o.width-s.width)),s.minTop=Math.min(o.top,o.top+(o.height-s.height)),s.maxLeft=o.left,s.maxTop=o.top,l===2&&(s.width>=a.width&&(s.minLeft=Math.min(0,f),s.maxLeft=Math.max(0,f)),s.height>=a.height&&(s.minTop=Math.min(0,m),s.maxTop=Math.max(0,m))))}else s.minLeft=-s.width,s.minTop=-s.height,s.maxLeft=a.width,s.maxTop=a.height},renderCanvas:function(t,r){var i=this.canvasData,a=this.imageData;if(r){var s=$Re({width:a.naturalWidth*Math.abs(a.scaleX||1),height:a.naturalHeight*Math.abs(a.scaleY||1),degree:a.rotate||0}),o=s.width,l=s.height,c=i.width*(o/i.naturalWidth),h=i.height*(l/i.naturalHeight);i.left-=(c-i.width)/2,i.top-=(h-i.height)/2,i.width=c,i.height=h,i.aspectRatio=o/l,i.naturalWidth=o,i.naturalHeight=l,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCanvas(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,As(this.canvas,Kn({width:i.width,height:i.height},Fd({translateX:i.left,translateY:i.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var r=this.canvasData,i=this.imageData,a=i.naturalWidth*(r.width/r.naturalWidth),s=i.naturalHeight*(r.height/r.naturalHeight);Kn(i,{width:a,height:s,left:(r.width-a)/2,top:(r.height-s)/2}),As(this.image,Kn({width:i.width,height:i.height},Fd(Kn({translateX:i.left,translateY:i.top},i)))),t&&this.output()},initCropBox:function(){var t=this.options,r=this.canvasData,i=t.aspectRatio||t.initialAspectRatio,a=Number(t.autoCropArea)||.8,s={width:r.width,height:r.height};i&&(r.height*i>r.width?s.height=s.width/i:s.width=s.height*i),this.cropBoxData=s,this.limitCropBox(!0,!0),s.width=Math.min(Math.max(s.width,s.minWidth),s.maxWidth),s.height=Math.min(Math.max(s.height,s.minHeight),s.maxHeight),s.width=Math.max(s.minWidth,s.width*a),s.height=Math.max(s.minHeight,s.height*a),s.left=r.left+(r.width-s.width)/2,s.top=r.top+(r.height-s.height)/2,s.oldLeft=s.left,s.oldTop=s.top,this.initialCropBoxData=Kn({},s)},limitCropBox:function(t,r){var i=this.options,a=this.containerData,s=this.canvasData,o=this.cropBoxData,l=this.limited,c=i.aspectRatio;if(t){var h=Number(i.minCropBoxWidth)||0,u=Number(i.minCropBoxHeight)||0,d=l?Math.min(a.width,s.width,s.width+s.left,a.width-s.left):a.width,p=l?Math.min(a.height,s.height,s.height+s.top,a.height-s.top):a.height;h=Math.min(h,a.width),u=Math.min(u,a.height),c&&(h&&u?u*c>h?u=h/c:h=u*c:h?u=h/c:u&&(h=u*c),p*c>d?p=d/c:d=p*c),o.minWidth=Math.min(h,d),o.minHeight=Math.min(u,p),o.maxWidth=d,o.maxHeight=p}r&&(l?(o.minLeft=Math.max(0,s.left),o.minTop=Math.max(0,s.top),o.maxLeft=Math.min(a.width,s.left+s.width)-o.width,o.maxTop=Math.min(a.height,s.top+s.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=a.width-o.width,o.maxTop=a.height-o.height))},renderCropBox:function(){var t=this.options,r=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCropBox(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,t.movable&&t.cropBoxMovable&&tu(this.face,eu,i.width>=r.width&&i.height>=r.height?NF:pS),As(this.cropBox,Kn({width:i.width,height:i.height},Fd({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Il(this.element,sj,this.getData())}},GRe={initPreview:function(){var t=this.element,r=this.crossOrigin,i=this.options.preview,a=r?this.crossOriginUrl:this.url,s=t.alt||"The image to preview",o=document.createElement("img");if(r&&(o.crossOrigin=r),o.src=a,o.alt=s,this.viewBox.appendChild(o),this.viewBoxImage=o,!!i){var l=i;typeof i=="string"?l=t.ownerDocument.querySelectorAll(i):i.querySelector&&(l=[i]),this.previews=l,yr(l,function(c){var h=document.createElement("img");tu(c,cp,{width:c.offsetWidth,height:c.offsetHeight,html:c.innerHTML}),r&&(h.crossOrigin=r),h.src=a,h.alt=s,h.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',c.innerHTML="",c.appendChild(h)})}},resetPreview:function(){yr(this.previews,function(t){var r=uj(t,cp);As(t,{width:r.width,height:r.height}),t.innerHTML=r.html,RRe(t,cp)})},preview:function(){var t=this.imageData,r=this.canvasData,i=this.cropBoxData,a=i.width,s=i.height,o=t.width,l=t.height,c=i.left-r.left-t.left,h=i.top-r.top-t.top;!this.cropped||this.disabled||(As(this.viewBoxImage,Kn({width:o,height:l},Fd(Kn({translateX:-c,translateY:-h},t)))),yr(this.previews,function(u){var d=uj(u,cp),p=d.width,f=d.height,m=p,g=f,x=1;a&&(x=p/a,g=s*x),s&&g>f&&(x=f/s,m=a*x,g=f),As(u,{width:m,height:g}),As(u.getElementsByTagName("img")[0],Kn({width:o*x,height:l*x},Fd(Kn({translateX:-c*x,translateY:-h*x},t))))}))}},WRe={bind:function(){var t=this.element,r=this.options,i=this.cropper;vi(r.cropstart)&&na(t,cj,r.cropstart),vi(r.cropmove)&&na(t,lj,r.cropmove),vi(r.cropend)&&na(t,oj,r.cropend),vi(r.crop)&&na(t,sj,r.crop),vi(r.zoom)&&na(t,dj,r.zoom),na(i,YI,this.onCropStart=this.cropStart.bind(this)),r.zoomable&&r.zoomOnWheel&&na(i,JI,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),r.toggleDragModeOnDblclick&&na(i,WI,this.onDblclick=this.dblclick.bind(this)),na(t.ownerDocument,KI,this.onCropMove=this.cropMove.bind(this)),na(t.ownerDocument,XI,this.onCropEnd=this.cropEnd.bind(this)),r.responsive&&na(window,ZI,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,r=this.options,i=this.cropper;vi(r.cropstart)&&ma(t,cj,r.cropstart),vi(r.cropmove)&&ma(t,lj,r.cropmove),vi(r.cropend)&&ma(t,oj,r.cropend),vi(r.crop)&&ma(t,sj,r.crop),vi(r.zoom)&&ma(t,dj,r.zoom),ma(i,YI,this.onCropStart),r.zoomable&&r.zoomOnWheel&&ma(i,JI,this.onWheel,{passive:!1,capture:!0}),r.toggleDragModeOnDblclick&&ma(i,WI,this.onDblclick),ma(t.ownerDocument,KI,this.onCropMove),ma(t.ownerDocument,XI,this.onCropEnd),r.responsive&&ma(window,ZI,this.onResize)}},YRe={resize:function(){if(!this.disabled){var t=this.options,r=this.container,i=this.containerData,a=r.offsetWidth/i.width,s=r.offsetHeight/i.height,o=Math.abs(a-1)>Math.abs(s-1)?a:s;if(o!==1){var l,c;t.restore&&(l=this.getCanvasData(),c=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(yr(l,function(h,u){l[u]=h*o})),this.setCropBoxData(yr(c,function(h,u){c[u]=h*o})))}}},dblclick:function(){this.disabled||this.options.dragMode===kF||this.setDragMode(IRe(this.dragBox,ij)?TF:fS)},wheel:function(t){var r=this,i=Number(this.options.wheelZoomRatio)||.1,a=1;this.disabled||(t.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){r.wheeling=!1},50),t.deltaY?a=t.deltaY>0?1:-1:t.wheelDelta?a=-t.wheelDelta/120:t.detail&&(a=t.detail>0?1:-1),this.zoom(-a*i,t)))},cropStart:function(t){var r=t.buttons,i=t.button;if(!(this.disabled||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(un(r)&&r!==1||un(i)&&i!==0||t.ctrlKey))){var a=this.options,s=this.pointers,o;t.changedTouches?yr(t.changedTouches,function(l){s[l.identifier]=dp(l)}):s[t.pointerId||0]=dp(t),Object.keys(s).length>1&&a.zoomable&&a.zoomOnTouch?o=EF:o=uj(t.target,eu),jRe.test(o)&&Il(this.element,cj,{originalEvent:t,action:o})!==!1&&(t.preventDefault(),this.action=o,this.cropping=!1,o===CF&&(this.cropping=!0,$r(this.dragBox,mf)))}},cropMove:function(t){var r=this.action;if(!(this.disabled||!r)){var i=this.pointers;t.preventDefault(),Il(this.element,lj,{originalEvent:t,action:r})!==!1&&(t.changedTouches?yr(t.changedTouches,function(a){Kn(i[a.identifier]||{},dp(a,!0))}):Kn(i[t.pointerId||0]||{},dp(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var r=this.action,i=this.pointers;t.changedTouches?yr(t.changedTouches,function(a){delete i[a.identifier]}):delete i[t.pointerId||0],r&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,kl(this.dragBox,mf,this.cropped&&this.options.modal)),Il(this.element,oj,{originalEvent:t,action:r}))}}},KRe={change:function(t){var r=this.options,i=this.canvasData,a=this.containerData,s=this.cropBoxData,o=this.pointers,l=this.action,c=r.aspectRatio,h=s.left,u=s.top,d=s.width,p=s.height,f=h+d,m=u+p,g=0,x=0,v=a.width,b=a.height,j=!0,w;!c&&t.shiftKey&&(c=d&&p?d/p:1),this.limited&&(g=s.minLeft,x=s.minTop,v=g+Math.min(a.width,i.width,i.left+i.width),b=x+Math.min(a.height,i.height,i.top+i.height));var S=o[Object.keys(o)[0]],_={x:S.endX-S.startX,y:S.endY-S.startY},C=function(P){switch(P){case mo:f+_.x>v&&(_.x=v-f);break;case go:h+_.x<g&&(_.x=g-h);break;case ks:u+_.y<x&&(_.y=x-u);break;case wl:m+_.y>b&&(_.y=b-m);break}};switch(l){case pS:h+=_.x,u+=_.y;break;case mo:if(_.x>=0&&(f>=v||c&&(u<=x||m>=b))){j=!1;break}C(mo),d+=_.x,d<0&&(l=go,d=-d,h-=d),c&&(p=d/c,u+=(s.height-p)/2);break;case ks:if(_.y<=0&&(u<=x||c&&(h<=g||f>=v))){j=!1;break}C(ks),p-=_.y,u+=_.y,p<0&&(l=wl,p=-p,u-=p),c&&(d=p*c,h+=(s.width-d)/2);break;case go:if(_.x<=0&&(h<=g||c&&(u<=x||m>=b))){j=!1;break}C(go),d-=_.x,h+=_.x,d<0&&(l=mo,d=-d,h-=d),c&&(p=d/c,u+=(s.height-p)/2);break;case wl:if(_.y>=0&&(m>=b||c&&(h<=g||f>=v))){j=!1;break}C(wl),p+=_.y,p<0&&(l=ks,p=-p,u-=p),c&&(d=p*c,h+=(s.width-d)/2);break;case pd:if(c){if(_.y<=0&&(u<=x||f>=v)){j=!1;break}C(ks),p-=_.y,u+=_.y,d=p*c}else C(ks),C(mo),_.x>=0?f<v?d+=_.x:_.y<=0&&u<=x&&(j=!1):d+=_.x,_.y<=0?u>x&&(p-=_.y,u+=_.y):(p-=_.y,u+=_.y);d<0&&p<0?(l=gd,p=-p,d=-d,u-=p,h-=d):d<0?(l=fd,d=-d,h-=d):p<0&&(l=md,p=-p,u-=p);break;case fd:if(c){if(_.y<=0&&(u<=x||h<=g)){j=!1;break}C(ks),p-=_.y,u+=_.y,d=p*c,h+=s.width-d}else C(ks),C(go),_.x<=0?h>g?(d-=_.x,h+=_.x):_.y<=0&&u<=x&&(j=!1):(d-=_.x,h+=_.x),_.y<=0?u>x&&(p-=_.y,u+=_.y):(p-=_.y,u+=_.y);d<0&&p<0?(l=md,p=-p,d=-d,u-=p,h-=d):d<0?(l=pd,d=-d,h-=d):p<0&&(l=gd,p=-p,u-=p);break;case gd:if(c){if(_.x<=0&&(h<=g||m>=b)){j=!1;break}C(go),d-=_.x,h+=_.x,p=d/c}else C(wl),C(go),_.x<=0?h>g?(d-=_.x,h+=_.x):_.y>=0&&m>=b&&(j=!1):(d-=_.x,h+=_.x),_.y>=0?m<b&&(p+=_.y):p+=_.y;d<0&&p<0?(l=pd,p=-p,d=-d,u-=p,h-=d):d<0?(l=md,d=-d,h-=d):p<0&&(l=fd,p=-p,u-=p);break;case md:if(c){if(_.x>=0&&(f>=v||m>=b)){j=!1;break}C(mo),d+=_.x,p=d/c}else C(wl),C(mo),_.x>=0?f<v?d+=_.x:_.y>=0&&m>=b&&(j=!1):d+=_.x,_.y>=0?m<b&&(p+=_.y):p+=_.y;d<0&&p<0?(l=fd,p=-p,d=-d,u-=p,h-=d):d<0?(l=gd,d=-d,h-=d):p<0&&(l=pd,p=-p,u-=p);break;case NF:this.move(_.x,_.y),j=!1;break;case EF:this.zoom(ARe(o),t),j=!1;break;case CF:if(!_.x||!_.y){j=!1;break}w=AF(this.cropper),h=S.startX-w.left,u=S.startY-w.top,d=s.minWidth,p=s.minHeight,_.x>0?l=_.y>0?md:pd:_.x<0&&(h-=d,l=_.y>0?gd:fd),_.y<0&&(u-=p),this.cropped||(Oa(this.cropBox,ji),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}j&&(s.width=d,s.height=p,s.left=h,s.top=u,this.action=l,this.renderCropBox()),yr(o,function(E){E.startX=E.endX,E.startY=E.endY})}},XRe={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&$r(this.dragBox,mf),Oa(this.cropBox,ji),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=Kn({},this.initialImageData),this.canvasData=Kn({},this.initialCanvasData),this.cropBoxData=Kn({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(Kn(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Oa(this.dragBox,mf),$r(this.cropBox,ji)),this},replace:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&t&&(this.isImg&&(this.element.src=t),r?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,yr(this.previews,function(i){i.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,Oa(this.cropper,HI)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,$r(this.cropper,HI)),this},destroy:function(){var t=this.element;return t[Yn]?(t[Yn]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.canvasData,a=i.left,s=i.top;return this.moveTo(ex(t)?t:a+Number(t),ex(r)?r:s+Number(r))},moveTo:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.canvasData,a=!1;return t=Number(t),r=Number(r),this.ready&&!this.disabled&&this.options.movable&&(un(t)&&(i.left=t,a=!0),un(r)&&(i.top=r,a=!0),a&&this.renderCanvas(!0)),this},zoom:function(t,r){var i=this.canvasData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(i.width*t/i.naturalWidth,null,r)},zoomTo:function(t,r,i){var a=this.options,s=this.canvasData,o=s.width,l=s.height,c=s.naturalWidth,h=s.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&a.zoomable){var u=c*t,d=h*t;if(Il(this.element,dj,{ratio:t,oldRatio:o/c,originalEvent:i})===!1)return this;if(i){var p=this.pointers,f=AF(this.cropper),m=p&&Object.keys(p).length?MRe(p):{pageX:i.pageX,pageY:i.pageY};s.left-=(u-o)*((m.pageX-f.left-s.left)/o),s.top-=(d-l)*((m.pageY-f.top-s.top)/l)}else Tl(r)&&un(r.x)&&un(r.y)?(s.left-=(u-o)*((r.x-s.left)/o),s.top-=(d-l)*((r.y-s.top)/l)):(s.left-=(u-o)/2,s.top-=(d-l)/2);s.width=u,s.height=d,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),un(t)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var r=this.imageData.scaleY;return this.scale(t,un(r)?r:1)},scaleY:function(t){var r=this.imageData.scaleX;return this.scale(un(r)?r:1,t)},scale:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.imageData,a=!1;return t=Number(t),r=Number(r),this.ready&&!this.disabled&&this.options.scalable&&(un(t)&&(i.scaleX=t,a=!0),un(r)&&(i.scaleY=r,a=!0),a&&this.renderCanvas(!0,!0)),this},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,r=this.options,i=this.imageData,a=this.canvasData,s=this.cropBoxData,o;if(this.ready&&this.cropped){o={x:s.left-a.left,y:s.top-a.top,width:s.width,height:s.height};var l=i.width/i.naturalWidth;if(yr(o,function(u,d){o[d]=u/l}),t){var c=Math.round(o.y+o.height),h=Math.round(o.x+o.width);o.x=Math.round(o.x),o.y=Math.round(o.y),o.width=h-o.x,o.height=c-o.y}}else o={x:0,y:0,width:0,height:0};return r.rotatable&&(o.rotate=i.rotate||0),r.scalable&&(o.scaleX=i.scaleX||1,o.scaleY=i.scaleY||1),o},setData:function(t){var r=this.options,i=this.imageData,a=this.canvasData,s={};if(this.ready&&!this.disabled&&Tl(t)){var o=!1;r.rotatable&&un(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,o=!0),r.scalable&&(un(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,o=!0),un(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var l=i.width/i.naturalWidth;un(t.x)&&(s.left=t.x*l+a.left),un(t.y)&&(s.top=t.y*l+a.top),un(t.width)&&(s.width=t.width*l),un(t.height)&&(s.height=t.height*l),this.setCropBoxData(s)}return this},getContainerData:function(){return this.ready?Kn({},this.containerData):{}},getImageData:function(){return this.sized?Kn({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,r={};return this.ready&&yr(["left","top","width","height","naturalWidth","naturalHeight"],function(i){r[i]=t[i]}),r},setCanvasData:function(t){var r=this.canvasData,i=r.aspectRatio;return this.ready&&!this.disabled&&Tl(t)&&(un(t.left)&&(r.left=t.left),un(t.top)&&(r.top=t.top),un(t.width)?(r.width=t.width,r.height=t.width/i):un(t.height)&&(r.height=t.height,r.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t=this.cropBoxData,r;return this.ready&&this.cropped&&(r={left:t.left,top:t.top,width:t.width,height:t.height}),r||{}},setCropBoxData:function(t){var r=this.cropBoxData,i=this.options.aspectRatio,a,s;return this.ready&&this.cropped&&!this.disabled&&Tl(t)&&(un(t.left)&&(r.left=t.left),un(t.top)&&(r.top=t.top),un(t.width)&&t.width!==r.width&&(a=!0,r.width=t.width),un(t.height)&&t.height!==r.height&&(s=!0,r.height=t.height),i&&(a?r.height=r.width/i:s&&(r.width=r.height*i)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var r=this.canvasData,i=LRe(this.image,this.imageData,r,t);if(!this.cropped)return i;var a=this.getData(t.rounded),s=a.x,o=a.y,l=a.width,c=a.height,h=i.width/Math.floor(r.naturalWidth);h!==1&&(s*=h,o*=h,l*=h,c*=h);var u=l/c,d=Ms({aspectRatio:u,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),p=Ms({aspectRatio:u,width:t.minWidth||0,height:t.minHeight||0},"cover"),f=Ms({aspectRatio:u,width:t.width||(h!==1?i.width:l),height:t.height||(h!==1?i.height:c)}),m=f.width,g=f.height;m=Math.min(d.width,Math.max(p.width,m)),g=Math.min(d.height,Math.max(p.height,g));var x=document.createElement("canvas"),v=x.getContext("2d");x.width=Pl(m),x.height=Pl(g),v.fillStyle=t.fillColor||"transparent",v.fillRect(0,0,m,g);var b=t.imageSmoothingEnabled,j=b===void 0?!0:b,w=t.imageSmoothingQuality;v.imageSmoothingEnabled=j,w&&(v.imageSmoothingQuality=w);var S=i.width,_=i.height,C=s,E=o,P,T,N,k,I,D;C<=-l||C>S?(C=0,P=0,N=0,I=0):C<=0?(N=-C,C=0,P=Math.min(S,l+C),I=P):C<=S&&(N=0,P=Math.min(l,S-C),I=P),P<=0||E<=-c||E>_?(E=0,T=0,k=0,D=0):E<=0?(k=-E,E=0,T=Math.min(_,c+E),D=T):E<=_&&(k=0,T=Math.min(c,_-E),D=T);var O=[C,E,P,T];if(I>0&&D>0){var $=m/l;O.push(N*$,k*$,I*$,D*$)}return v.drawImage.apply(v,[i].concat(_F(O.map(function(U){return Math.floor(Pl(U))})))),x},setAspectRatio:function(t){var r=this.options;return!this.disabled&&!ex(t)&&(r.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var r=this.options,i=this.dragBox,a=this.face;if(this.ready&&!this.disabled){var s=t===fS,o=r.movable&&t===TF;t=s||o?t:kF,r.dragMode=t,tu(i,eu,t),kl(i,ij,s),kl(i,aj,o),r.cropBoxMovable||(tu(a,eu,t),kl(a,ij,s),kl(a,aj,o))}return this}},QRe=Ua.Cropper,$F=(function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(dRe(this,e),!t||!_Re.test(t.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=t,this.options=Kn({},tD,Tl(r)&&r),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return uRe(e,[{key:"init",value:function(){var r=this.element,i=r.tagName.toLowerCase(),a;if(!r[Yn]){if(r[Yn]=this,i==="img"){if(this.isImg=!0,a=r.getAttribute("src")||"",this.originalUrl=a,!a)return;a=r.src}else i==="canvas"&&window.HTMLCanvasElement&&(a=r.toDataURL());this.load(a)}}},{key:"load",value:function(r){var i=this;if(r){this.url=r,this.imageData={};var a=this.element,s=this.options;if(!s.rotatable&&!s.scalable&&(s.checkOrientation=!1),!s.checkOrientation||!window.ArrayBuffer){this.clone();return}if(wRe.test(r)){SRe.test(r)?this.read(BRe(r)):this.clone();return}var o=new XMLHttpRequest,l=this.clone.bind(this);this.reloading=!0,this.xhr=o,o.onabort=l,o.onerror=l,o.ontimeout=l,o.onprogress=function(){o.getResponseHeader("content-type")!==eD&&o.abort()},o.onload=function(){i.read(o.response)},o.onloadend=function(){i.reloading=!1,i.xhr=null},s.checkCrossOrigin&&rD(r)&&a.crossOrigin&&(r=iD(r)),o.open("GET",r,!0),o.responseType="arraybuffer",o.withCredentials=a.crossOrigin==="use-credentials",o.send()}}},{key:"read",value:function(r){var i=this.options,a=this.imageData,s=VRe(r),o=0,l=1,c=1;if(s>1){this.url=qRe(r,eD);var h=zRe(s);o=h.rotate,l=h.scaleX,c=h.scaleY}i.rotatable&&(a.rotate=o),i.scalable&&(a.scaleX=l,a.scaleY=c),this.clone()}},{key:"clone",value:function(){var r=this.element,i=this.url,a=r.crossOrigin,s=i;this.options.checkCrossOrigin&&rD(i)&&(a||(a="anonymous"),s=iD(i)),this.crossOrigin=a,this.crossOriginUrl=s;var o=document.createElement("img");a&&(o.crossOrigin=a),o.src=s||i,o.alt=r.alt||"The image to crop",this.image=o,o.onload=this.start.bind(this),o.onerror=this.stop.bind(this),$r(o,GI),r.parentNode.insertBefore(o,r.nextSibling)}},{key:"start",value:function(){var r=this,i=this.image;i.onload=null,i.onerror=null,this.sizing=!0;var a=Ua.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(Ua.navigator.userAgent),s=function(h,u){Kn(r.imageData,{naturalWi
129dth:h,naturalHeight:u,aspectRatio:h/u}),r.initialImageData=Kn({},r.imageData),r.sizing=!1,r.sized=!0,r.build()};if(i.naturalWidth&&!a){s(i.naturalWidth,i.naturalHeight);return}var o=document.createElement("img"),l=document.body||document.documentElement;this.sizingImage=o,o.onload=function(){s(o.width,o.height),a||l.removeChild(o)},o.src=i.src,a||(o.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",l.appendChild(o))}},{key:"stop",value:function(){var r=this.image;r.onload=null,r.onerror=null,r.parentNode.removeChild(r),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var r=this.element,i=this.options,a=this.image,s=r.parentNode,o=document.createElement("div");o.innerHTML=CRe;var l=o.querySelector(".".concat(Yn,"-container")),c=l.querySelector(".".concat(Yn,"-canvas")),h=l.querySelector(".".concat(Yn,"-drag-box")),u=l.querySelector(".".concat(Yn,"-crop-box")),d=u.querySelector(".".concat(Yn,"-face"));this.container=s,this.cropper=l,this.canvas=c,this.dragBox=h,this.cropBox=u,this.viewBox=l.querySelector(".".concat(Yn,"-view-box")),this.face=d,c.appendChild(a),$r(r,ji),s.insertBefore(l,r.nextSibling),Oa(a,GI),this.initPreview(),this.bind(),i.initialAspectRatio=Math.max(0,i.initialAspectRatio)||NaN,i.aspectRatio=Math.max(0,i.aspectRatio)||NaN,i.viewMode=Math.max(0,Math.min(3,Math.round(i.viewMode)))||0,$r(u,ji),i.guides||$r(u.getElementsByClassName("".concat(Yn,"-dashed")),ji),i.center||$r(u.getElementsByClassName("".concat(Yn,"-center")),ji),i.background&&$r(l,"".concat(Yn,"-bg")),i.highlight||$r(d,vRe),i.cropBoxMovable&&($r(d,aj),tu(d,eu,pS)),i.cropBoxResizable||($r(u.getElementsByClassName("".concat(Yn,"-line")),ji),$r(u.getElementsByClassName("".concat(Yn,"-point")),ji)),this.render(),this.ready=!0,this.setDragMode(i.dragMode),i.autoCrop&&this.crop(),this.setData(i.data),vi(i.ready)&&na(r,QI,i.ready,{once:!0}),Il(r,QI)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var r=this.cropper.parentNode;r&&r.removeChild(this.cropper),Oa(this.element,ji)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=QRe,e}},{key:"setDefaults",value:function(r){Kn(tD,Tl(r)&&r)}}])})();Kn($F.prototype,HRe,GRe,WRe,YRe,KRe,XRe);var jo=function(){return jo=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},jo.apply(this,arguments)};function nx(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(r[i[a]]=e[i[a]])}return r}var ZRe=["aspectRatio","autoCrop","autoCropArea","background","center","checkCrossOrigin","checkOrientation","cropBoxMovable","cropBoxResizable","data","dragMode","guides","highlight","initialAspectRatio","minCanvasHeight","minCanvasWidth","minContainerHeight","minContainerWidth","minCropBoxHeight","minCropBoxWidth","modal","movable","preview","responsive","restore","rotatable","scalable","toggleDragModeOnDblclick","viewMode","wheelZoomRatio","zoomOnTouch","zoomOnWheel","zoomable","cropstart","cropmove","cropend","crop","zoom","ready"],JRe={opacity:0,maxWidth:"100%"},LF=Me.forwardRef((function(e,t){var r=nx(e,[]),i=r.dragMode,a=i===void 0?"crop":i,s=r.src,o=r.style,l=r.className,c=r.crossOrigin,h=r.scaleX,u=r.scaleY,d=r.enable,p=r.zoomTo,f=r.rotateTo,m=r.alt,g=m===void 0?"picture":m,x=r.ready,v=r.onInitialized,b=nx(r,["dragMode","src","style","className","crossOrigin","scaleX","scaleY","enable","zoomTo","rotateTo","alt","ready","onInitialized"]),j={scaleY:u,scaleX:h,enable:d,zoomTo:p,rotateTo:f},w=(function(){for(var _=[],C=0;C<arguments.length;C++)_[C]=arguments[C];var E=y.useRef(null);return Me.useEffect((function(){_.forEach((function(P){P&&(typeof P=="function"?P(E.current):P.current=E.current)}))}),[_]),E})(t,y.useRef(null));y.useEffect((function(){var _;!((_=w.current)===null||_===void 0)&&_.cropper&&typeof p=="number"&&w.current.cropper.zoomTo(p)}),[r.zoomTo]),y.useEffect((function(){var _;!((_=w.current)===null||_===void 0)&&_.cropper&&s!==void 0&&w.current.cropper.reset().clear().replace(s)}),[s]),y.useEffect((function(){if(w.current!==null){var _=new $F(w.current,jo(jo({dragMode:a},b),{ready:function(C){C.currentTarget!==null&&(function(E,P){P===void 0&&(P={});var T=P.enable,N=T===void 0||T,k=P.scaleX,I=k===void 0?1:k,D=P.scaleY,O=D===void 0?1:D,$=P.zoomTo,U=$===void 0?0:$,B=P.rotateTo;N?E.enable():E.disable(),E.scaleX(I),E.scaleY(O),B!==void 0&&E.rotateTo(B),U>0&&E.zoomTo(U)})(C.currentTarget.cropper,j),x&&x(C)}}));v&&v(_)}return function(){var C,E;(E=(C=w.current)===null||C===void 0?void 0:C.cropper)===null||E===void 0||E.destroy()}}),[w]);var S=(function(_){return ZRe.reduce((function(C,E){var P=C,T=E;return P[T],nx(P,[typeof T=="symbol"?T:T+""])}),_)})(jo(jo({},b),{crossOrigin:c,src:s,alt:g}));return Me.createElement("div",{style:o,className:l},Me.createElement("img",jo({},S,{style:JRe,ref:w})))}));const eOe=e=>{const{openImageUpload:t,setModal:r,currentBanner:i,handleCancel:a,userId:s,editPartnerPageBanner:o,sectionType:l,addPageSection:c,index:h,isEditing:u,currentImage:d,editPageSection:p,section:f,pageType:m,pageSlug:g,pageId:x,currentThumbn
129ail:v,editPartnerInsightThumbnail:b,partnerPermissions:j}=e,{Image:w,BannerImage:S}=Bn,{Insight:_}=on,[C,E]=y.useState(null),P=y.useRef(null),T=()=>{P.current?.cropper};let N;l===w?N=C||d:l===S?N=C||i:m===_&&(N=C||v);const k=(O,$,U,B,L,A)=>{const R=j.partner_image_size_limit;O===void 0?(E(null),delete U.imageFile,delete $.imageFile):Bo(O)?O&&O.size>R?(E(null),A(`${B}File`,void 0,!1),L(B+"File","That file is larger than 5MB. Please use a smaller file or contact us for help.")):(E(URL.createObjectURL(O)),A(`${B}File`,O),delete $.imageFile):L(B+"File","Image must be a PNG or JPG/JPEG file.")},I=(O,$)=>{if(O!=="#"){let U=O.split(","),B=U[0].match(/:(.*?);/)[1],L=atob(U[U.length-1]),A=L.length,R=new Uint8Array(A);for(;A--;)R[A]=L.charCodeAt(A);return new File([R],$,{type:B})}},D=O=>{if(typeof P.current?.cropper<"u"){const $=I(P.current?.cropper.getCroppedCanvas().toDataURL(O.type),O&&O.name);m===_?b(x,s,$).then(()=>{E(null)}).then(()=>a(!0)):l===S&&o(g,s,$).then(()=>{E(null)}).then(()=>a(!0))}};return y.useEffect(()=>{C&&!e.isDirty?e.setDirty(!0):!C&&e.isDirty&&e.setDirty(!1)},[C]),n.jsx(ot,{setModal:r,disableClickOutsideCancel:!0,children:n.jsxs("div",{className:"image-upload-modal-container","diagnostic-id":"spotlight-img-upload-modal-container",children:[n.jsx("i",{className:"material-icons",onClick:()=>a(),children:"close"}),n.jsx(gt,{initialValues:{imageFile:void 0},onSubmit:(O,{setSubmitting:$})=>{l===w?u?p(s,g,w,f.id,m,O.imageFile).then(()=>{E(null)}).then(()=>a(!0)):c(s,g,w,h,m,O.imageFile).then(()=>{E(null)}).then(()=>a(!0)):D(O.imageFile)},enableReinitialize:!0,children:({values:O,touched:$,errors:U,dirty:B,isSubmitting:L,setFieldError:A,setFieldValue:R})=>n.jsxs(vt,{onClick:F=>F.stopPropagation(),children:[n.jsx("h5",{children:l===w?"Upload an image":l===S?"Upload a Banner Image":m===_?"Upload a Thumbnail Image":""}),n.jsx("p",{className:"choose-image-msg",children:l===w?"Choose a .jpg, .jpeg, or .png image":l===S?"Choose a .jpg, .jpeg, or .png image to use as your page banner. The recommended image dimensions are 1920px wide and 420px tall.":m===_?"Choose a .jpg, .jpeg, or .png image to use as the thumbnail for this partner insight. The recommended image dimensions are 600px wide and 450px tall.":""}),U.imageFile&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:U.imageFile}),n.jsx("input",{id:"imageFile","diagnostic-id":"image-input",name:"imageFile",type:"file",accept:"image/png,image/x-png,image/jpeg,image/jpg",value:C?C.name:"",onChange:F=>{k(F.currentTarget.files[0],U,O,"image",A,R)},className:U.imageFile&&$.imageFile?"text-input error":"file-path validate"}),n.jsxs("div",{className:`img-upload-grp${l===w?" image":" cropped-image"}${N?" with-img":" without-img"}`,children:[n.jsx(Eo,{id:"imageFile",diagId:"image-upload-drag-drop-input",name:"imageFile",acceptedTypes:"image/png,image/x-png,image/jpeg,image/jpg",value:C?C.name:"",onChange:F=>{k(F.currentTarget.files[0],U,O,"image",A,R)},className:`drag-drop-input${U.imageFile&&$.imageFile?" text-input error":" file-path validate"}`}),N?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"image-group",children:l===w?n.jsx("img",{alt:"uploaded-img",src:N}):n.jsx(LF,{src:N,aspectRatio:m===_?4/3:4/1,guides:!1,crop:T,ref:P,viewMode:1,minCropBoxHeight:10,minCropBoxWidth:10,background:!1,responsive:!0,autoCropArea:1,zoomable:!1})}),C&&n.jsx("button",{id:"clear-btn",type:"button",onClick:()=>{k(void 0,U,O,"image",A,R)},children:"Undo"})]}):n.jsxs("div",{className:"image-group-placeholder",children:[n.jsx("i",{className:"material-icons",children:"panorama"}),n.jsx("p",{children:"Drag and drop an image file here, or click to select a file to upload"})]})]}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>a(),children:"Cancel"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",disabled:!C,children:"Save"})]})]})})]})})},tOe=e=>({userId:e.auth.user&&e.auth.user.id,pageType:e.spotlight&&e.spotlight.pageType,partnerPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.partner_permissions}),Uu=le(tOe,{editPartnerPageBanner:Dxe,addPageSection:cc,editPageSection:dm,editPartnerInsightThumbnail:bxe})(eOe);function nOe(e){const{setDirty:t,isDirty:r,user:i,partnerInsight:a,publishPartnerInsight:s,match:o,numPublishedPartnerInsights:l,partnerPermissions:c}=e,[h,u]=y.useState(!1),[d,p]=y.useState(!1),[f,m]=y.useState(!1),[g,x]=y.useState(!1),{Pending:v,NotPublished:b,Published:j}=ki,{Community:w}=Oj,S=c.max_published_insights,_=l>=S,C=a.publish_status===v||a.publish_status===j,E="If changes are required for this partner insight, please contact us.";let P;switch(a.publish_status){case v:P=n.jsx("div",{id:"partner-insight-publish-help",className:"help-icon",children:n.jsx(br,{message:E,children:n.jsxs("span",{className:`btn-icon-text ${v}`,id:"partner-insight-published",children:[n.jsx("i",{className:"material-icons",children:"cached"}),"Pending"]})})});break;case b:P=n.jsx("button",{className:"btn-primary-icon publish-insight-btn","diagnostic-id":"publish-partner-insight-btn",onClick:()=>m(!0),children:n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"material-symbols-outlined",children:"two_pager"}),"Submit for Publication"]})});break;case j:P=n.jsx("div",{id:"partner-insight-publish-help",className:"help-icon",children:n.jsx(br,{message:E,children:n.jsxs("span",{className:`btn-icon-text ${j}`,id:"partner-insight-published",children:[n.jsx("i",{className:"material-icons",children:"check"}),"Published"]})})});break}const T=()=>{u(!0)},N=O=>
129{r&&!O?window.confirm("Changes you made may not be saved.")&&(h?u(!1):d&&p(!1),t(!1)):(h?u(!1):d&&p(!1),t(!1))},k=O=>{O.preventDefault(),x(!0),s(a.id,i.id).then(()=>{m(!1),x(!1)})},I=n.jsx(ot,{setModal:m,children:n.jsxs("div",{className:"publish-page-modal-container","diagnostic-id":"publish-page-modal-container",children:[_?n.jsx(n.Fragment,{}):n.jsx("i",{className:"material-icons",onClick:()=>m(!1),children:"close"}),n.jsx("h5",{children:_?"Unable to Publish Additional Partner Insights":"Submit for Review and Publication"}),n.jsx("p",{className:"publish-modal-message",children:_?"The maximum number of partner insights has already been published.":"Submit this partner insight for review and publication across the Clearnomics platform. Please review all insights carefully before submitting - any future changes will require additional review."}),_&&n.jsx("div",{className:"max-reached-chat-btn","diagnostic-id":"max-reached-chat-btn",onClick:()=>{window.Intercom("show")},children:"Contact us to inquire about publishing additional partner insights."}),n.jsx("div",{className:"buttons",children:_?n.jsx("button",{type:"button",className:"btn-cancel max-reached-close-btn","diagnostic-id":"modal-cancel-btn",onClick:()=>m(!1),children:"CLOSE"}):n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>m(!1),children:"CANCEL"}),n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",onClick:k,disabled:g,children:"Submit"})]})})]})}),D=n.jsxs("div",{className:"partner-insight-title-container",children:[n.jsxs("div",{className:"partner-insight-title-left",children:[n.jsx(br,{message:C?E:"",children:n.jsxs("div",{className:"image-group",id:"partner-insight-published","diagnostic-id":"partner-insight-thumbnail-btn",onClick:()=>C?null:p(!0),children:[n.jsx("div",{className:`add-image-placeholder${a.preview_image_url?" has-image":""}`,children:n.jsxs("div",{className:"add-image-icon-text",children:[n.jsx("i",{className:"material-icons-outlined",children:"add_photo_alternate"}),a.preview_image_url?"Edit Thumbnail":"Add Thumbnail"]})}),a.preview_image_url&&n.jsx("img",{src:a.preview_image_url,alt:""})]})}),n.jsx("div",{className:"title-group",children:n.jsxs("div",{className:"partner-insight-title-edit",children:[n.jsx("div",{className:"partner-insight-page-type",children:`Partner Insight${" - "+a?.partner_insight_type}`}),n.jsx("div",{id:"partner-insight-title-name",children:a.title}),n.jsx(br,{message:C?E:"",children:n.jsx("span",{id:"partner-insight-published",children:n.jsxs("button",{className:"btn-primary-icon-text","diagnostic-id":"header-edit-btn",onClick:T,disabled:C,children:[n.jsx("i",{className:"material-icons",children:"edit"}),"Edit Title and Tags"]})})})]})})]}),n.jsxs("div",{className:"partner-insight-title-right",children:[n.jsx("div",{id:"partner-insight-publish","diagnostic-id":"partner-insight-publish",children:P}),n.jsx("div",{className:"partner-insight-page-preview",children:n.jsx("button",{className:"btn btn-primary-icon-text","diagnostic-id":"preview-partner-insight-page-btn",onClick:O=>BD(O,`/partnerinsights/${a.id}?view=preview`),children:"Preview Partner Insight"})}),n.jsxs("div",{id:"partner-insight-title-datetime",children:[n.jsx("span",{children:a.publish_datetime?a.publish_datetime>a.update_datetime?"Settings last updated ":"Published ":"Settings last updated "}),n.jsx(gn,{local:!0,format:"MMM D, YYYY h:mma",children:a.publish_datetime?a.update_datetime>a.publish_datetime?a.update_datetime:a.publish_datetime:a.update_datetime})," ",new Date().toLocaleTimeString("en-us",{timeZoneName:"short"}).split(" ")[2]]})]})]});return n.jsxs("div",{className:"partner-insight-header",children:[a.partner_insight_type===w&&n.jsxs("div",{className:"community-toolkit-info-banner",children:[n.jsx("i",{className:"material-icons",children:"warning"}),n.jsx("div",{className:"banner-text",children:"This partner insight will be shared with Community users."})]}),h&&n.jsx(J$,{edit:h,partnerInsightId:a.id,title:a.title,tags:a.tags,isDirty:r,setDirty:t,handleCancel:N}
129),d&&n.jsx(Uu,{openImageUpload:d,setModal:p,currentThumbnail:a.preview_image_url,isDirty:r,setDirty:t,handleCancel:N,pageId:a.id}),f&&I,D]})}const rOe=e=>({user:e.auth.user,pageType:e.spotlight&&e.spotlight.pageType,numPublishedPartnerInsights:e.spotlight&&e.spotlight.partnerInsights.numPublishedPartnerInsights,partnerPermissions:e.auth&&e.auth.user&&e.auth.user.company.partner_permissions}),iOe=le(rOe,{publishPartnerInsight:_xe})(nOe);function aOe(e){const{setDirty:t,isDirty:r,partnerInsight:i,setScrim:a}=e,[s,o]=y.useState(!1),[l,c]=y.useState(!1),{Insight:h}=on,{Published:u,Pending:d}=ki,p="If changes are required for this partner insight, please contact us.",f=i.publish_status===d||i.publish_status===u,m=g=>{g.preventDefault(),o(!0),a(!0)};return n.jsxs("div",{className:"partner-insight-content","diagnostic-id":"notes-for-advisors-content",children:[n.jsxs("div",{className:"notes-for-advisors-container",children:[n.jsx("div",{className:"content-header-wrapper",children:n.jsxs("div",{className:"content-icon-text-grp",children:[n.jsx("i",{className:"material-icons-outlined",children:"speaker_notes"}),n.jsx("h4",{children:"Notes for Advisors"})]})}),n.jsx("p",{children:"Add a brief note and video to this partner insight for advisors"}),s?n.jsx(mc,{showQuill:s,setShowQuill:o,setScrim:a,isAdvisorNotes:!0,partnerInsightId:i.id,textToDisplay:i.advisor_notes_text}):n.jsx(n.Fragment,{children:i.advisor_notes_text?n.jsx(br,{message:f?p:"",children:n.jsxs("div",{className:"advisor-notes-content-wrapper",children:[n.jsx("div",{className:"advisor-notes-content-scrim"}),n.jsxs("button",{onClick:m,className:"advisor-notes-content-edit-btn",disabled:f,children:[n.jsx("i",{className:"material-icons edit-icon",children:"edit"}),"EDIT"]}),n.jsx("div",{className:"advisor-notes-text-content",dangerouslySetInnerHTML:{__html:ti(i.advisor_notes_text)}})]})}):n.jsx(br,{message:f?p:"",children:n.jsx("div",{className:"notes-for-advisors-btn-container","diagnostic-id":"notes-for-advisors-btn-container",id:"partner-insight-published",children:n.jsxs("div",{id:"add-advisor-notes-btn",className:`add-advisor-notes-btn${f?" locked":""}`,"diagnostic-id":"add-advisor-notes-card-btn",onClick:g=>{f||m(g)},children:["Add Notes For Advisors",n.jsx("i",{className:"material-icons",children:"add_circle"})]})})})}),i?.advisor_notes_video?n.jsx("div",{className:"advisor-notes-video-card",children:n.jsx(br,{message:f?p:"",children:n.jsxs("div",{className:"advisor-notes-title-group",children:[n.jsxs("div",{className:"advisor-notes-header-btn-grp",children:[n.jsx("div",{className:"content-type","diagnostic-id":"content-type",children:"For Advisors - Video"}),n.jsxs("button",{className:"btn-primary-icon-text","diagnostic-id":"content-edit-btn",disabled:f,onClick:()=>c(!0),children:[n.jsx("i",{className:"material-icons",children:"edit"}),"Edit"]})]}),n.jsxs("div",{className:"content-title-container",children:[n.jsx("i",{className:"material-icons smart-display-icon",children:"smart_display"}),n.jsx("h4",{className:"content-title-text","diagnostic-id":"insight-title-text",children:i?.advisor_notes_video?.title})]})]})})}):n.jsx("div",{className:"add-video-btn-container",children:n.jsx(br,{message:f?p:"",children:n.jsx("span",{id:"partner-insight-published",children:n.jsxs("button",{type:"button",className:"btn btn-primary","diagnostic-id":"add-advisor-notes-video-btn",disabled:f,onClick:()=>c(!0),children:[n.jsx("i",{className:"material-icons add-icon",children:"add"}),"Add Video"]})})})})]}),l&&n.jsx(jF,{selectedBtn:"advisor_notes_video",setModal:c,tabSelected:h,partnerInsight:i})]})}const sOe=e=>({userId:e.auth.user&&e.auth.user.id}),oOe=le(sOe,{setScrim:hn})(aOe);function lOe(e){const{setDirty:t,partnerInsight:r,isEditorDirty:i,isDirty:a,setEditorFormStatus:s}=e,{SolutionsGallery:o}=Bn,{Published:l,Pending:c}=ki,h="If changes are required for this partner insight, please contact us.",u=r.publish_status===c||r.publish_status===l,[d,p]=y.useState(!1);y.useEffect(()=>{t(i)},[i]);const m={setModal:p,isEditing:d,handleCancel:x=>
129{i&&!x?window.confirm("Changes you made may not be saved.")&&(p(!1),t(!1),s(!1)):(p(!1),t(!1),s(!1))},editorHeader:"Select Partner Solutions",sectionType:o,editorItems:r?.solutions||null},g=d&&n.jsx(Fu,{...m,pageId:r.id,setDirty:t,isDirty:a});return n.jsxs("div",{className:"partner-insight-content",id:"related-solutions-content","diagnostic-id":"related-solutions-content",children:[n.jsxs("div",{className:"related-solutions-container",children:[n.jsxs("div",{className:"content-header-wrapper",children:[n.jsxs("div",{className:"content-icon-text-grp",children:[n.jsx("i",{className:"material-icons-outlined",children:"category"}),n.jsx("h4",{children:"Related Solutions"})]}),n.jsx(br,{message:u?h:"",children:n.jsx("span",{id:"partner-insight-published",children:n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"add-related-solutions-btn",onClick:()=>p(!0),disabled:u,children:r.solutions.length>0?n.jsxs(n.Fragment,{children:[n.jsx("i",{className:"material-icons add-icon",children:"edit"}),"Edit"]}):n.jsxs(n.Fragment,{children:[n.jsx("i",{className:"material-icons add-icon",children:"add"}),"Add"]})})})})]}),n.jsx("p",{children:"Connect related solutions that will be showcased alongside this partner insight"}),r.solutions.length>0?n.jsx(Wa,{cards:r.solutions,sectionType:o,isOnWorkspace:!1}):n.jsx(br,{message:u?h:"",children:n.jsx("div",{className:"new-related-solutions-btn-container","diagnostic-id":"new-related-solutions-btn-container",id:"partner-insight-published",children:n.jsxs("div",{id:"new-related-solutions-btn",className:`new-related-solutions-btn${u?" locked":""}`,"diagnostic-id":"new-related-solutions-card-btn",onClick:()=>u?null:p(!0),children:["Add Solutions",n.jsx("i",{className:"material-icons",children:"add_circle"})]})})})]}),g]})}const cOe=e=>({userId:e.auth.user&&e.auth.user.id,isEditorDirty:e.spotlight.isDirty}),dOe=le(cOe,{setEditorFormStatus:Sa})(lOe);function uOe(e){const{partnerInsight:t}=e,r="partnerinsight",{Published:i}=ki;return n.jsx("div",{className:"partner-insight-content","diagnostic-id":"partner-insight-share-content",children:n.jsxs("div",{className:"partner-insight-share-content-container",children:[n.jsxs("div",{className:"partner-insight-share-header","diagnostic-id":"partner-insight-share-header",children:[n.jsxs("h4",{children:[n.jsx("i",{className:"material-icons-outlined",children:"screen_share"}),"Share This Partner Insight"]}),t?.publish_status===i&&n.jsxs("div",{className:"btn-primary-icon-text",children:[n.jsx("i",{className:"material-icons",children:"done"}),"Published"]})]}),n.jsxs("div",{className:"partner-insight-share-wrapper",children:[n.jsx("p",{children:"Publishing this partner insight will allow advisors to discover and view the content within Clearnomics."}),n.jsxs("div",{className:"partner-insight-share-link-grp",children:[n.jsx("h4",{children:"Share this direct link"}),n.jsx("p",{className:"subheader",children:"Share a direct link to this partner insight. Viewers will be required to log into Clearnomics to see the partner insight."}),n.jsx("div",{className:"content-link-group",children:n.jsx(Gs,{snippet:`https://app.clearnomics.com/insights/${t.insight_key}`,embedType:r,isActive:t?.publish_status===i})})]})]})]})})}const hOe=e=>({}),pOe=le(hOe,{})(uOe),fOe=({dirty:e,isDirty:t,setDirty:r})=>(y.useEffect(()=>{e!==t&&r(e)},[e]),null),mOe=e=>{const{editModal:t,setEditModal:r,pageSlug:i,pageId:a,userId:s,disclosures:o,summaryText:l,handleCancel:c,editPageDisclosures:h,editSummaryText:u,pageType:d}=e,{Spotlight:p,Solution:f,Insight:m}=on;let g,x,v,b="unknown",j="unknown";switch(d){case p:case f:g=5e3,x={modalText:o||""},v=_t().shape({modalText:Ae().max(5e3,"Your disclosures are too long. Please shorten it or contact us for assistance.")}),b="Edit Disclosures",j="Enter your disclosures here...";break;case m:x={modalText:l||""},g=200,v=_t().shape({modalText:Ae().max(200,"Your summary text is too long. Please shorten it or contact us for assistance.")}),b="Edit Summary Text",j="Write a brief summary of this insight...";break}
129return n.jsx(ot,{setModal:r,disableClickOutsideCancel:!0,children:n.jsxs("div",{className:"spotlight-description-disclosures-modal","diagnostic-id":"spotlight-description-edit-modal-container",children:[n.jsx("i",{className:"material-icons",onClick:()=>{c()},children:"close"}),n.jsx(gt,{initialValues:x,onSubmit:(w,{setSubmitting:S})=>{d===m?u(a,s,w.modalText).then(()=>c(!0)):(d===p||d===f)&&h(i,s,d,w.modalText).then(()=>c(!0))},enableReinitialize:!0,validationSchema:v,children:({values:w,touched:S,errors:_,dirty:C,isSubmitting:E})=>n.jsxs(vt,{onClick:P=>P.stopPropagation(),children:[n.jsx(fOe,{dirty:C,isDirty:e.isDirty,setDirty:e.setDirty}),n.jsx("h5",{children:b}),n.jsxs("div",{className:"form-group",children:[n.jsxs("div",{className:"character-count",children:[g-w.modalText.length," characters left"]}),n.jsx(me,{component:"textarea",id:"modalText","diagnostic-id":"modalText-input",placeholder:j,name:"modalText",maxLength:g,className:_.modalText&&S.modalText?"text-input error":""}),_.modalText&&S.modalText&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:_.modalText})]}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>{c()},children:"Cancel"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",disabled:!!Object.keys(_).length||E||!C,children:"Save"})]})]})})]})})},gOe=e=>({userId:e.auth.user&&e.auth.user.id,pageType:e.spotlight&&e.spotlight.pageType}),FF=le(gOe,{editPageDisclosures:Rxe,editSummaryText:xxe})(mOe);function vOe(e){const{setDirty:t,isDirty:r,partnerInsight:i}=e,[a,s]=y.useState(!1),{Published:o,Pending:l}=ki,c="If changes are required for this partner insight, please contact us.",h=i.publish_status===l||i.publish_status===o,u=d=>{r&&!d?window.confirm("Changes you made may not be saved.")&&(s(!1),t(!1)):(s(!1),t(!1))};return n.jsxs("div",{className:"partner-insight-content","diagnostic-id":"summary-text-content",children:[n.jsxs("div",{className:"summary-text-container",children:[n.jsxs("div",{className:"content-header-wrapper",children:[n.jsxs("div",{className:"content-icon-text-grp",children:[n.jsx("i",{className:"material-icons-outlined",children:"description"}),n.jsx("h4",{children:"Summary Text"})]}),n.jsx(br,{message:h?c:"",children:n.jsx("span",{id:"partner-insight-published",children:n.jsxs("button",{type:"button",className:"btn btn-primary","diagnostic-id":"edit-summary-text-btn",onClick:()=>s(!0),disabled:h,children:[n.jsx("i",{className:"material-icons edit-icon",children:"edit"}),"Edit"]})})})]}),n.jsx("p",{children:"Add a brief summary of this partner insight"}),i.summary_text?n.jsx("p",{children:i.summary_text}):n.jsx(br,{message:h?c:"",children:n.jsx("div",{className:"add-summary-text-btn-container","diagnostic-id":"add-summary-text-btn-container",id:"partner-insight-published",children:n.jsxs("div",{id:"add-summary-text-btn",className:`add-summary-text-btn${h?" locked":""}`,"diagnostic-id":"add-summary-text-card-btn",onClick:()=>h?null:s(!0),children:["Add Summary Text",n.jsx("i",{className:"material-icons",children:"add_circle"})]})})})]}),a&&n.jsx(FF,{editModal:a,setEditModal:s,pageId:i.id,summaryText:i.summary_text,isDirty:r,setDirty:t,handleCancel:u})]})}const bOe=e=>({userId:e.auth.user&&e.auth.user.id}),yOe=le(bOe,{})(vOe),xOe={editor:"",preview:"preview"};function jOe(e){const{spotlight:t,match:r,getPartnerInsight:i,userId:a,setPageType:s,getPartnerInsights:o,modalStatus:l,canUseQuestionAnswer:c,hedwigPermissions:h,setScrim:u}=e,d=t.partnerInsights?.page,[p,f]=y.useState(!0),m=Ni.parse(e.location.search),{Insight:g}=on,{Published:x}=ki,{Disabled:v}=_n;y.useEffect(()=>{t.partnerInsights.pages||o(a)},[]),y.useEffect(()=>{if(m.view==="preview"&&!l){const j=document.body.style.top;document.body.style.position="",document.body.style.top="",document.body.style.width="";const w=document.querySelector(".nav-wrapper");w.style.paddingRight="",w.style.paddingLeft="",window.scrollTo(0,parseInt(j||"0")*-1)}},[l]),y.useEffect(()=>{const j=r.params.id;u(!1),m.view!=="preview"&&(!t.partnerInsights||!t.partnerInsights.page||t.partnerInsights.page.id!==j)?i(j,a).then(()=>f(!1),()=>
129{e.history.push("/insights?view=partnerinsights")}):f(!1),s(g);const w=m.view&&Object.keys(xOe).includes(m.view);m.view&&(w?e.history.push(`/partnerinsights/${j}?view=${m.view}`):e.history.push(`/partnerinsights/${j}`))},[]);const b=n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"back-link-wrapper",children:n.jsxs(Ze,{to:{pathname:"/insights",search:"?view=partnerinsights"},className:"back-link","diagnostic-id":"back-to-partner-insights-link",children:[n.jsx(ir,{}),n.jsx("span",{children:"Back to Partner Insights"})]})}),n.jsx(da,{}),n.jsxs("div",{className:"partner-insight-editor-wrapper",children:[n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(iOe,{partnerInsight:d,match:r,isDirty:e.isDirty,setDirty:e.setDirty})})}),d?.publish_status===x&&n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(pOe,{partnerInsight:d})})}),n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(oOe,{partnerInsight:d,isDirty:e.isDirty,setDirty:e.setDirty})})}),n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(yOe,{partnerInsight:d,isDirty:e.isDirty,setDirty:e.setDirty})})}),n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(lRe,{tabSelected:g,partnerInsight:d})})}),n.jsx(wn,{hasPermission:h?.allow_use_question_answer!==v&&c,children:n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(eRe,{partnerInsight:d,isDirty:e.isDirty,setDirty:e.setDirty})})})}),n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(dOe,{partnerInsight:d,isDirty:e.isDirty,setDirty:e.setDirty})})})]})]});return n.jsx(n.Fragment,{children:m.view==="preview"?n.jsx(Ru,{match:r,partnerInsightView:t?.partnerInsights?.partnerInsightView}):n.jsx("div",{className:"container",children:!p&&t.partnerInsights&&t.partnerInsights.page&&b})})}const wOe=e=>({userId:e.auth.user&&e.auth.user.id,spotlight:e.spotlight,modalStatus:e.preferences&&e.preferences.modalStatus,canUseQuestionAnswer:e.auth&&e.auth.user&&e.auth.user.can_use_question_answer,hedwigPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.hedwig_permissions}),SOe=le(wOe,{setScrim:hn,getPartnerInsight:mxe,setPageType:Pu,getPartnerInsights:k$})(zt(jOe)),{Spotlight:aD,Solution:sD}=on;function _Oe(e){const{contactUser:t,companyContacts:r,showSelected:i,setShowSelected:a,isSearching:s,setSearching:o,searchEditor:l,deselectAllContacts:c,selectContact:h,selectedContactId:u,searchTerms:d,isDirty:p,setEditorFormStatus:f,sectionType:m,deselectContact:g,pageType:x,contactBrowserAction:v}=e,[b,j]=y.useState(null),[w,S]=y.useState(!1),[_,C]=y.useState(""),E=()=>{S(!w)},P=()=>{l("",x),o(!1)},T=()=>{c(x);const N=v==="email"?null:t?.id;h(N,x),j(r)};return y.useEffect(()=>{T()},[]),y.useEffect(()=>{u||T()},[]),y.useEffect(()=>{let N;s&&d&&d.length>2&&(N=r.filter(k=>{const I=k.first_name.toLowerCase()+" "+k.last_name.toLowerCase();return Mn(k.first_name.toLowerCase(),d.toLowerCase())||Mn(k.last_name.toLowerCase(),d.toLowerCase())||Mn(I,d.toLowerCase())||Mn(k.email,d.toLowerCase())}),j(N),C(`Results for: "${d}" - `))},[s,r,d]),y.useEffect(()=>{if(!s){let N;i&&(N=r.filter(k=>k.id===u),j(N),C("Selected Contact"))}},[s,i,r]),y.useEffect(()=>{!s&&!i&&(j(r),C("All Company's Contacts"))},[d,i,s]),y.useEffect(()=>{const N=u?u!==t?.id:!1;N!==!!p&&f(N)},[u,t]),(r&&r.length===0||b?.length===0)&&!s&&!i?n.jsxs("div",{id:"empty-content-placeholder",className:"fadeTransition",children:[n.jsx("i",{className:"material-icons",children:"account_box"}),n.jsx("div",{children:"There are no company contacts available"})]}):b?n.jsxs(n.Fragment,{children:[n.jsxs("h6",{className:"gallery-browser-topic",children:[_,s?n.jsx("button",{className:"btn-cancel",onClick:P,children:"Clear Search"}):""]}),n.jsxs("div",{className:m,id:"gallery-browser-wrapper","diagnostic-id":"gallery-browser-wrapper",children:[s&&b.length===0?n.jsxs("div",{id:"spotlight-search-placeholder",className:"fadeTransition",children:[n.jsx("i",{className:"material-icons",children:"search_off"}),n.jsxs("div",{children:['No results for "',d,'"']}),n.jsx("button",{className:"btn-cancel",onClick:P,children:"Clear Search"})]}):n.jsx(n.Fragment,{}),n.jsx(n.Fragment,{children:b.map((N,k)=>n.jsx(yF,{index:N.id,editorItemIndex:k+1,editorItem:N,toggleDrag:E,isDragging:w,isSelected:u===N.id,selectEditorItem:()=>h(N.id,x),deselectEditorItem:()=>g(N.id,x),sectionType:m},N.id))})]})]}):null}const COe=e=>({searchTerms:e.spotlight&&e.spotlight.pageType===aD?e.spotlight.partnerSpotlightPage.searchTerms:e.spotlight.pageType===sD?e.spotlight.solutions.page.searchTerms:null,isDirty:e.spotlight.isDirty,selectedContactId:e.spotlight&&e.spotlight.pageType===aD?e.spotlight.partnerSpotlightPage.selectedContactId:e.spotlight.pageType===sD?e.spotlight.solutions.page.selectedContactId:null,pageType:e.spotlight&&e.spotlight.pageType}),NOe=le(COe,{searchEditor:j0,setEditorFormStatus:Sa,deselectAllContacts:Hxe,selectContact:Gxe,deselectContact:zxe})(Ss.DragDropContext(am)(_Oe)),{Spotlight:EOe,Solution:TOe}=on;function kOe(e){const{editContactModal:t,setDirty:r,isDirty:i,title:a,c
129ompanyContacts:s,contactUser:o,contactBrowserAction:l,contactEmail:c,handleCancel:h,pageSlug:u}=e,[d,p]=y.useState(!1),[f,m]=y.useState(l),[g,x]=y.useState(!1),{ContactForm:v}=Bn,b=w=>{m(w.target.value)},j={showSelected:g,setShowSelected:x,isSearching:d,setSearching:p};return n.jsx(ot,{setModal:h,disableClickOutsideCancel:!0,children:n.jsxs("div",{className:"spotlight-contact-form-modal-container",children:[n.jsx("i",{className:"material-icons",onClick:()=>h(),children:"close"}),n.jsx("h5",{children:"Contact Form"}),n.jsx("p",{children:"Create a contact form that users can submit to learn more about your company and solutions"}),n.jsx("div",{className:"spotlight-gallery-header",children:"Form Title"}),n.jsxs("div",{className:"spotlight-gallery-search-save-grp",children:[n.jsx(gF,{title:a,isDirty:i,setDirty:r,sectionType:v,handleCancel:h,pageSlug:u,editContact:t,handleChange:b}),f==="user"&&n.jsxs("div",{className:"spotlight-gallery-search",children:[n.jsx(xF,{sectionType:v,isSearching:d,setSearching:p}),n.jsx("div",{className:"show-selected-checkbox",onClick:w=>w.stopPropagation(),children:n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"showSelected",id:"showSelected",className:"filled-in",onChange:w=>{const S=w.target.checked;x(S)},"diagnostic-id":"show-selected-input",checked:g,disabled:d}),n.jsx("span",{"diagnostic-id":"show-selected-toggle",className:d?"disabled":"",children:"Only show selected"})]})})]})]}),f==="user"&&n.jsx("div",{id:"gallery-wrapper",children:n.jsx(NOe,{contactUser:o,companyContacts:s,sectionType:v,contactBrowserAction:l,...j})})]})})}const POe=e=>({userId:e.auth.user.id,companyContacts:e.spotlight&&e.spotlight.contactsWithEmail,contactBrowserAction:e.spotlight&&e.spotlight.pageType===EOe?e.spotlight.partnerSpotlightPage.contact_form_type:e.spotlight.pageType===TOe?e.spotlight.solutions.page.contact_form_type:null}),IOe=le(POe,{})(zt(kOe)),{Spotlight:up,Solution:hp}=on;function DOe(e){const{isDirty:t,setDirty:r,isEditorDirty:i,getContacts:a,userId:s,contactUser:o,contactFormTitle:l,contactEmail:c,pageSlug:h,contactBrowserAction:u,getContactsWithEmail:d,setEditorFormStatus:p}=e,[f,m]=y.useState(!1);y.useEffect(()=>{a(s),d(s)},[]),y.useEffect(()=>{r(i)},[i]);const g=v=>{(t||i)&&!v?window.confirm("Changes you made may not be saved.")&&(m(!1),r(!1),p(!1)):(m(!1),r(!1),p(!1))},x=f&&n.jsx(IOe,{editContactModal:f,title:l,contactUser:o,contactEmail:c,handleCancel:g,pageSlug:h,setDirty:r,isDirty:t});return n.jsxs("div",{className:"fixed-spotlight-sections-container contact-form","diagnostic-id":"spotlight-contact-form-container",children:[n.jsx("div",{className:"spotlight-sections-wrapper",children:n.jsxs("div",{className:"spotlight-section",id:"spotlight-section","diagnostic-id":"spotlight-contact-form-section",children:[n.jsx("div",{className:"spotlight-scrim-overlay"}),n.jsxs("button",{className:"fixed-edit-section-btn",onClick:()=>m(!0),children:[n.jsx("i",{className:"material-icons fixed-section-edit-icon","diagnostic-id":"contact-form-edit-icon",children:"edit"}),o&&Object.keys(o).length>0?"EDIT":"ADD CONTACTS"]}),n.jsxs("div",{className:"section-group","diagnostic-id":"contact-form-section-group",children:[n.jsx("div",{className:"section-header-group",children:n.jsx("div",{className:"section-type-header",children:"Contact Form"})}),n.jsx("div",{className:`contact-form-wrapper${u==="email"&&!c||u==="user"&&o&&Object.keys(o).length===0?" contact-placeholder":""}`,"diagnostic-id":"contact-form-wrapper",children:n.jsx(n.Fragment,{children:n.jsxs("div",{className:"contact-form-group",children:[l&&n.jsx("h4",{className:"contact-form-title",children:l}),u==="user"?o&&Object.keys(o).length>0?n.jsxs(n.Fragment,{children:[o.profile_picture_url&&n.jsx("div",{className:"contact-form-img",children:n.jsx("img",{alt:"",src:o.profile_picture_url})}),n.jsxs("div",{className:"contact-person-info",children:[n.jsxs("h6",{children:[o.first_name+" "+o.last_name,o.contact_credentials&&", "+o.contact_credentials]}),n.jsx("div",{children:o.contact_title})]})]}):n.jsx("div",{className:"empty-contact-message",children:"Customize the contact form..."}):u==="email"?c?n.jsxs(n.Fragment,{children:[n.jsx("h6",{"diagnostic-id":"contact-email-header",children:"Contact Email"}),n.jsx("div",{"diagnostic-id":"contact-email-display",children:c})]}):n.jsx("div",{className:"empty-contact-message",children:"Customize the contact form..."}):n.jsx(n.Fragment,{})]})})})]})]})}),x]})}const ROe=e=>({userId:e.auth.user&&e.auth.user.id,contactUser:e.spotlight&&e.spotlight.pageType===up&&e.spotlight.partnerSpotlightPage?e.spotlight.partnerSpotlightPage.contact_user:e.spotlight.pageType===hp&&e.spotlight.solutions.page?e.spotlight.solutions.page.contact_user:null,contactFormTitle:e.spotlight&&e.spotlight.pageType===up&&e.spotlight.partnerSpotlightPage?e.spotlight.partnerSpotlightPage.contact_form_title:e.spotlight.pageType===hp&&e.spotlight.solutions.page?e.spotlight.solutions.page.contact_form_title:"",contactEmail:e.spotlight&&e.spotlight.pageType===up&&e.spotlight.partnerSpotlightPage?e.spotlight.partnerSpotlightPage.contact_email:e.spotlight.pageType===hp&&e.spotlight.solutions.page?e.spotlight.solutions.page.contact_email:"",contactBrowserAction:e.spotlight&&e.spotlight.pageType===up?e.spotlight.partnerSpotlightPage.contact_form_type:e.spotlight.pageType===hp?e.spotlight.solutions.page.contact_form_type:null,isEditorDirty:e.spotlight.isDirty}),UF=le(ROe,{getContacts:R$,getContactsWithEmail:Bxe,setEditorFormStatus:Sa})(zt(DOe));function OOe(e){const[t,r]=y.useState(!0),i=y.useRef(null),{handleSubmit:a,setValue:s,watch:o,register:l}=fF(),{TextSection:c}=Bn,{Spotlight:h,Solution:u}=on,{isDirty:d,setDirty:p,showTextEditor:f,setShowTextEditor:m,addPageSection:g,userId:x,index:v,isEditing:b,textContent:j,sectionId:w,editPageSection:S,description:_,isDescriptionEdit:C,editPageDescriptionOverview:E,handleCancel:P,pageType:T,editSolutionPageOverview:N,displayText:k,pageSlug:I}=e,D=o("content"),O=B=>{p(!0),s("content",B),r(!1)};y.useEffect(()=>{l("content")},[l]),y.useEffect(()=>{i.current.focus()},[]);const $=async B=>{const L=B.content;let A=Rp.sanitize(L);A=A==="<p><br></p>"?"":A,b?await S(x,I,c,w,T,A)&&P():C?E(I,x,T,A).then(P):f&&await g(x,I,c,v,T,A)&&P()},U=B=>
129{d?window.confirm("Changes you made may not be saved.")?P():m(!0):P()};return n.jsxs("div",{className:"spotlight-editor",id:"",children:[n.jsx(dc,{id:"react-quill-id",modules:F$,formats:U$,theme:"snow",placeholder:C?`Enter your ${k} here...`:"Content goes here...",onChange:O,value:D||j||_,ref:i}),n.jsxs("div",{className:"spotlight-editor-buttons",children:[n.jsx("button",{type:"submit",className:"btn-cancel","diagnostic-id":"editor-cancel-btn",onClick:U,children:"CANCEL"}),n.jsx("button",{disabled:t,type:"submit",className:"btn-primary-sm","diagnostic-id":"editor-save-btn",onClick:a($),children:"SAVE"})]})]})}const AOe=e=>({userId:e.auth.user&&e.auth.user.id,pageType:e.spotlight&&e.spotlight.pageType}),Tm=le(AOe,{addPageSection:cc,editPageSection:dm,editPageDescriptionOverview:Ixe})(zt(OOe));function MOe(e){const{partnerPage:t,setScrim:r,pageType:i}=e,{Spotlight:a,Solution:s}=on,[o,l]=y.useState(!1),c=ti(t?.description),h=()=>{l(!0),r(!0)},u=()=>{l(!1),r(!1)};let d="unknown";switch(i){case a:d="description";break;case s:d="overview";break}return n.jsx("div",{className:"fixed-spotlight-sections-container description","diagnostic-id":"spotlight-desription-container",children:n.jsx("div",{className:"spotlight-sections-wrapper",children:n.jsx("div",{className:"spotlight-section",id:"spotlight-section","diagnostic-id":"spotlight-description-section",children:o?n.jsx(Tm,{setShowTextEditor:l,isDescriptionEdit:o,description:t.description,handleCancel:u,displayText:d,pageSlug:t.page_slug}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"spotlight-scrim-overlay"}),n.jsxs("button",{className:"fixed-edit-section-btn","diagnostic-id":"description-section-edit-btn",onClick:h,children:[n.jsx("i",{className:"material-icons fixed-section-edit-icon","diagnostic-id":"description-section-edit-icon",children:"edit"}),"EDIT"]}),n.jsxs("div",{className:"section-group","diagnostic-id":"description-section-group",children:[n.jsx("div",{className:"section-header-group",children:n.jsx("div",{className:"section-type-header",children:d})}),n.jsx("div",{className:"description-content","diagnostic-id":"description-content",dangerouslySetInnerHTML:{__html:t?.description?c:`Enter your ${d} here...`}})]})]})})})})}const $Oe=e=>({userId:e.auth.user&&e.auth.user.id,pageType:e.spotlight&&e.spotlight.pageType}),BF=le($Oe,{setScrim:hn})(MOe);function LOe(e){const{setDirty:t,isDirty:r,partnerPage:i}=e,[a,s]=y.useState(!1),o=l=>{r&&!l?window.confirm("Changes you made may not be saved.")&&(s(!1),t(!1)):(s(!1),t(!1))};return n.jsxs("div",{className:"fixed-spotlight-sections-container disclosures","diagnostic-id":"spotlight-disclosures-container",children:[n.jsx("div",{className:"spotlight-sections-wrapper",children:n.jsxs("div",{className:"spotlight-section",id:"spotlight-section","diagnostic-id":"spotlight-disclosures-section",children:[n.jsx("div",{className:"spotlight-scrim-overlay"}),n.jsxs("button",{className:"fixed-edit-section-btn","diagnostic-id":"disclosures-section-edit-btn",onClick:()=>s(!0),children:[n.jsx("i",{className:"material-icons fixed-section-edit-icon","diagnostic-id":"disclosures-section-edit-icon",children:"edit"}),"EDIT"]}),n.jsxs("div",{className:"section-group","diagnostic-id":"disclosures-section-group",children:[n.jsx("div",{className:"section-header-group",children:n.jsx("div",{className:"section-type-header",children:"Disclosures"})}),n.jsx("div",{className:"disclosures-content",children:i?.disclosures?i?.disclosures:"Enter your disclosures here..."})]})]})}),a&&n.jsx(FF,{editModal:a,setEditModal:s,pageSlug:i.page_slug,disclosures:i.disclosures,isDirty:r,setDirty:t,handleCancel:o})]})}const FOe=e=>({userId:e.auth.user&&e.auth.user.id}),qF=le(FOe,{})(zt(LOe)),UOe=e=>{const{user:t,publishModal:r,unPublishModal:i,setModal:a,publishPage:s,unPublishPage:o,getPublishedSolutionPage:l,getPublishedPartnerPage:c,pageSlug:h,pageType:u}=e,{Spotlight:d,Solution:p}=on,[f,m]=y.useState(!1),g=y.useCallback(j=>$n(j,r||i,a),[r,i]);y.useEffect(()=>(window.addEventListener("keyup",g),()=>{window.removeEventListener("keyup",g)}),[g]);let x="unknown",v="unknown";switch(u){case d:x="Publish Partner Spotlight Page",v="Publish your latest changes. Once published, your Partner Spotlight will be live and discoverable across the Clearnomics platform.";break;case p:x=r?"Publish Partner Solution":i?"Unpublish Partner Solution":"",v=r?"Publish your latest changes. Once published, you will be able to add the solution to your Partner Spotlight and Partner Insights.":i?"Unpublish this Partner Solution. Once unpublished, this solution will no longer be viewable across the Clearnomics platform, including on Partner Spotlight and Partner Insights.":"";break}const b=()=>{m(!0),r?s(h,t.id,u).then(j=>
129{j&&(u===p?l(h,t.id):u===d&&c(h,t.id),m(!1)),a(!1)}):o(h,t.id,u).then(j=>{j&&a(!1),m(!1)})};return n.jsx(ot,{setModal:a,children:n.jsxs("div",{className:"publish-page-modal-container","diagnostic-id":"publish-page-modal-container",children:[n.jsx("i",{className:"material-icons",onClick:()=>a(!1),children:"close"}),n.jsx("h5",{children:x}),n.jsx("p",{className:"publish-modal-message",children:v}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>a(!1),children:"CANCEL"}),n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",onClick:b,disabled:f,children:r?"Publish":i?"Unpublish":""})]})]})})},BOe=e=>({user:e.auth.user,pageType:e.spotlight&&e.spotlight.pageType}),qOe=le(BOe,{publishPage:uxe,unPublishPage:hxe,getPublishedSolutionPage:P$,getPublishedPartnerPage:D$})(UOe);function VOe(e){const{setDirty:t,isDirty:r,user:i,partnerPage:a,setPageChoice:s,pageType:o,pageChoice:l,numPublishedSolutions:c,partnerPermissions:h}=e,[u,d]=y.useState(!1),[p,f]=y.useState(!1),[m,g]=y.useState(!1),{Spotlight:x,Solution:v}=on,b=h.max_published_solutions;let j="unknown",w="unknown";switch(o){case x:j="Partner Spotlight",w="Preview Spotlight Page";break;case v:j=a.category,w="Preview Solution";break}const S=()=>{d(!0)},_=E=>{r&&!E?window.confirm("Changes you made may not be saved.")&&(d(!1),t(!1)):(d(!1),t(!1))},C=n.jsxs("div",{className:"spotlight-title-container",children:[n.jsx("div",{className:"spotlight-title-left",children:n.jsx("div",{className:"title-group",children:n.jsxs("div",{className:"spotlight-title-edit",children:[n.jsx("div",{className:"spotlight-page-type",children:j}),n.jsx("div",{id:"spotlight-title-name",children:a.title}),o===x?n.jsx("div",{className:"spotlight-header-msg",children:"Customize the look and contents of your Partner Spotlight page"}):o===v?n.jsxs("button",{className:"btn-primary-icon-text","diagnostic-id":"header-edit-btn",onClick:S,children:[n.jsx("i",{className:"material-icons",children:"edit"}),"Edit Solutions Name and Details"]}):n.jsx(n.Fragment,{}),l!==""&&a?.is_enabled&&n.jsxs("div",{className:"spotlight-published-link",onClick:E=>{E.preventDefault(),window.open(`/${o}/${a.page_slug}`)},children:[n.jsx("i",{className:"material-icons",children:"link"}),`clearnomics.com/${o}/${a.page_slug}`]})]})})}),n.jsxs("div",{className:"spotlight-title-right",children:[n.jsxs("div",{id:"spotlight-publish","diagnostic-id":"spotlight-publish",children:[o===v&&a.is_enabled&&n.jsx("button",{className:"btn-secondary unpublish-btn","diagnostic-id":"solution-unpublish-btn",onClick:()=>g(!0),children:n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"material-icons",children:"visibility_off"}),"Unpublish"]})}),n.jsx(Ke,{title:o===v&&c>=b?"Max published solutions reached":a.publish_datetime>a.update_datetime&&a.is_enabled?`Please make a change to republish your ${o} page`:"",placement:"top",children:n.jsx("span",{children:n.jsx("button",{className:"btn-primary-icon","diagnostic-id":"spotlight-publish-btn",onClick:()=>f(!0),disabled:o===v&&c>=b||a.publish_datetime>a.update_datetime&&a.is_enabled,children:n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"material-icons",children:"publish"}),"Publish"]})})})})]}),n.jsx("div",{className:"spotlight-page-preview",children:n.jsx("button",{className:"btn btn-primary-icon-text","diagnostic-id":"preview-spotlight-page-btn",onClick:()=>s("preview"),children:w})}),n.jsxs("div",{id:"spotlight-title-datetime",children:[n.jsx("span",{children:a.publish_datetime&&a.publish_datetime>a.update_datetime?"Last published ":"Last edited "}),n.jsx(gn,{local:!0,format:"MMM D, YYYY h:mma",children:a.publish_datetime&&a.publish_datetime>a.update_datetime?a.publish_datetime:a.update_datetime})," ",new Date().toLocaleTimeString("en-us",{timeZoneName:"short"}).split(" ")[2]]})]})]});return n.jsxs("div",{className:"spotlight-header",children:[u&&n.jsx(eL,{editModal:u,setEditModal:d,solutionPageSlug:a.page_slug,title:a.title,category:a.category,tags:a.tags,website:a.website,isDirty:r,setDirty:t,handleCancel:_}),(p||m)&&n.jsx(qOe,{publishModal:p,unPublishModal:m,setModal:p?f:m?g:null,pageSlug:a.page_slug}),C]})}const zOe=e=>({user:e.auth.user,pageType:e.spotlight&&e.spotlight.pageType,partnerPermissions:e.auth&&e.auth.user&&e.auth.user.company.partner_permissions}),VF=le(zOe,{})(zt(VOe)),ta=({field:{name:e,value:t,onChange:r},id:i,label:a,className:s,diagId:o,...l})=>n.jsx("div",{className:"text-input-wrapper",children:n.jsx("input",{disabled:`${i}
129`=="document-pdf-input",name:e,id:`${i}`,type:"text",value:t,"diagnostic-id":o,onChange:r})});function HOe(e){const{editorItem:t,isDragging:r,index:i,arrayHelpers:a,sectionType:s,handlePdf:o,errors:l}=e,{Highlights:c,CompanyLocations:h,Documents:u}=Bn;return n.jsx(n.Fragment,{children:n.jsx($u,{draggableId:(i+1).toString(),index:i,children:(d,p)=>n.jsx("div",{className:`drag-drop-section-editor-wrapper${r?" droppable":""}`,...d.draggableProps,ref:d.innerRef,style:{...d.draggableProps.style},"diagnostic-id":"drag-drop-section-editor-wrapper",children:n.jsxs("div",{className:`drag-drop-section-editor${p.isDragging?" is-dragging":" draggable"}`,id:"drag-drop-section-editor","diagnostic-id":"drag-drop-section-editor",children:[n.jsx("div",{className:"section-editor-drag-handle",...d.dragHandleProps,children:n.jsx("i",{className:"material-icons drag-icon",children:"open_with"})}),n.jsx("div",{className:`section-editor-group ${s}`,"diagnostic-id":"section-editor-group",children:s===c?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"highlight-label-group",children:[n.jsx("label",{children:"Label"}),n.jsx("div",{className:"highlight-textarea-wrapper",children:n.jsx(me,{id:"highlight-textarea","diagnostic-id":"highlight-label-textarea",as:"textarea",name:`editorItems.${i}.label`,maxLength:"50"})})]}),n.jsxs("div",{className:"highlight-description-group",children:[n.jsx("label",{children:"Description"}),n.jsx("div",{className:"highlight-textarea-wrapper",children:n.jsx(me,{id:"highlight-textarea","diagnostic-id":"highlight-description-textarea",as:"textarea",name:`editorItems.${i}.description`,maxLength:"240"})})]})]}):s===h?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"company-location-left",children:[n.jsxs("div",{className:"location-info-group",children:[n.jsx("label",{children:"Location Name"}),n.jsx(me,{component:ta,name:`editorItems.${i}.name`,id:"location-input",maxLength:"50",diagId:"location-name-input"})]}),n.jsxs("div",{className:"location-info-group",children:[n.jsx("label",{children:"Address (Line 1)"}),n.jsx(me,{component:ta,name:`editorItems.${i}.address_line1`,id:"location-input",maxLength:"50",diagId:"location-address-one-input"})]}),n.jsxs("div",{className:"location-info-group",children:[n.jsx("label",{children:"Address (Line 2)"}),n.jsx(me,{component:ta,name:`editorItems.${i}.address_line2`,id:"location-input",maxLength:"50",diagId:"location-address-two-input"})]}),n.jsxs("div",{className:"location-info-group",children:[n.jsx("label",{children:"City"}),n.jsx(me,{component:ta,name:`editorItems.${i}.address_city`,id:"location-input",maxLength:"50",diagId:"location-city-input"})]}),n.jsxs("div",{className:"location-info-group",children:[n.jsx("label",{children:"State/Region"}),n.jsx(me,{component:ta,name:`editorItems.${i}.address_state`,id:"location-input",maxLength:"50",diagId:"location-state-input"})]})]}),n.jsxs("div",{className:"company-location-right",children:[n.jsxs("div",{className:"location-info-group",children:[n.jsx("label",{children:"Country"}),n.jsx(me,{component:ta,name:`editorItems.${i}.address_country`,id:"location-input",maxLength:"50",diagId:"location-country-input"})]}),n.jsxs("div",{className:"location-info-group",children:[n.jsx("label",{children:"Zip/Postal Code"}),n.jsx(me,{component:ta,name:`editorItems.${i}.address_zipcode`,id:"location-input",maxLength:"20",diagId:"location-zipcode-input"})]}),n.jsxs("div",{className:"location-info-group",children:[n.jsx("label",{children:"Location Contact Email"}),n.jsx(me,{component:ta,name:`editorItems.${i}.email`,id:"location-input",maxLength:"240",diagId:"location-email-input"})]}),n.jsxs("div",{className:"location-info-group",children:[n.jsx("label",{children:"Location Contact Phone Number"}),n.jsx(me,{component:ta,name:`editorItems.${i}.phone_number`,id:"location-input",maxLength:"30",diagId:"location-phone-input"})]})]})]}):s===u?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"document-upload-group",id:"document-upload-group",children:[n.jsx("label",{children:"Document Name"}),n.jsx(me,{component:ta,id:"document-input",name:`editorItems.${i}.label`,diagId:"document-label-input"})]}),n.jsxs("div",{className:"document-upload-group",children:[n.jsxs("div",{className:"icon-text",children:[n.jsx("i",{className:"material-icons",children:"article"}),n.jsx("label",{children:t.pdf_url?"PDF":"Link URL"})]}),t.pdf_url?n.jsxs(n.Fragment,{children:[n.jsx(me,{component:ta,id:"document-pdf-input",n
129ame:t.pdf_url.name?`editorItems.${i}.pdf_url.name`:`editorItems.${i}.pdf_url`}),n.jsx("input",{id:"edited-file-upload",name:"pdfFile",type:"file","diagnostic-id":"upload-pdf-btn",accept:"application/pdf",onChange:o}),Object.keys(l).length>0&&l.editorItems[i]!==void 0&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:l.editorItems[i].pdf_url})]}):n.jsx(me,{component:ta,id:"document-input",name:`editorItems.${i}.external_document_url`,diagId:"document-url-input"})]})]}):n.jsx(n.Fragment,{})}),n.jsx("button",{type:"button",onClick:()=>a.remove(i),className:"delete-btn","diagnostic-id":"delete-btn",children:n.jsx("i",{className:"material-icons",children:"delete"})})]})})},i+1)})}const GOe=e=>({userId:e.auth.user&&e.auth.user.id}),WOe=le(GOe,{setScrim:hn})(HOe);function YOe(e){const{userId:t,setModal:r,isDirty:i,setDirty:a,addPageSection:s,sectionType:o,index:l,handleCancel:c,isEditing:h,editorItems:u,section:d,editPageSection:p,editPartnerPageCompanyLocations:f,pageType:m,pageSlug:g,partnerPermissions:x,setEditorFormStatus:v}=e,{Highlights:b,CompanyLocations:j,Documents:w}=Bn,[S,_]=y.useState(!1),[C,E]=y.useState(u),[P,T]=y.useState(d?.title||""),[N,k]=y.useState(!1),[I,D]=y.useState(!1),O=x.max_documents_per_section,$=x.max_highlights_per_section,U=x.max_office_locations_per_page,B=(K,z,Y,ie,ne,ve)=>{k(!1),ne&&ne[ve]?.pdf_url?ie.replace(ve,{label:K.name,pdf_url:K}):ie.push({label:K.name,pdf_url:K})},L=()=>{_(!S)},A=async(K,z,Y)=>{K.destination||_(!1);const{source:ie,destination:ne}=K;L(),T(Y);const ve=ie?.index,pe=ne?.index,be=Array.from(z);if((pe||pe===0)&&pe!==ve){const[ye]=be.splice(ve,1);be.splice(pe,0,ye),E(be),D(JSON.stringify(u)!==JSON.stringify(be)),v(JSON.stringify(u)!==JSON.stringify(be))}};let R,F="unknown",q="unknown";switch(o){case b:R={label:"",description:""},q="ADD A HIGHLIGHT",F="Add Highlights";break;case j:R={name:"",address_line1:"",address_line2:"",address_city:"",address_state:"",address_country:"",address_zipcode:"",email:"",phone_number:""},F="Company Locations",q="ADD A LOCATION";break;case w:R={label:"",external_document_url:""},F="Upload and Link Documents",q="ADD A DOCUMENT";break}const V=_t().shape({editorItems:jp(_t({description:Ae().required("Please enter a description"),label:Ae().required("Please enter a label")}))}),X=_t().shape({editorItems:jp(_t({name:Ae(),address_line1:Ae(),address_line2:Ae(),address_city:Ae(),address_state:Ae(),address_country:Ae(),address_zipcode:Ae(),email:Ae().email("Please enter a valid email address").notRequired(),phoneNumber:Ae()}))}),M=x.partner_pdf_size_limit,W=_t().shape({editorItems:jp().of(_t({label:Ae().required("Please enter a label"),external_document_url:Ae().when("pdf_url",{is:K=>!K,then:Ae().matches(/^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([-.]{1}[a-z0-9]+)*\.([a-z]+)?(\/.*)?$/,"Invalid url").required("Required"),otherwise:Ae().nullable()}),pdf_url:Px().when({is:K=>h||K!==null,then:Px().test("fileSize","PDF file is larger than 15MB. Please use a smaller file or contact us for help.",K=>!K||typeof K=="string"?!0:K?.size<=M)})}))});return n.jsx(ot,{setModal:r,disableClickOutsideCancel:!0,children:n.jsxs("div",{className:"spotlight-sections-editor-modal-container",children:[n.jsx("i",{className:"material-icons","diagnostic-id":"drag-drop-editor-section-close",onClick:()=>c(),children:"close"}),n.jsx("h5",{children:F}),o===w&&n.jsx("p",{children:"Add a PDF or link to a fact sheet, commentary, or other informational documents"}),o!==j&&n.jsx("div",{className:"section-editor-header",children:"Section Title"}),n.jsx(gt,{initialValues:{title:P,editorItems:C},onSubmit:(K,{setSubmitting:z})=>{h?o===j?f(g,t,K.editorItems).then(()=>c(!0)).then(()=>{z(!1)}):p(t,g,o,d.id,m,K.editorItems,K.title).then(()=>c(!0)).then(()=>{z(!1)}):s(t,g,o,l,m,K.editorItems,K.title).then(()=>c(!0)).then(()=>{z(!1)})},validationSchema:o===b?V:o===w?W:o===j?X:null,enableReinitialize:!0,children:({values:K,touched:z,errors:Y,dirty:ie,isSubmitting:ne,setFieldError:ve,setFieldValue:pe})=>(ie!==i&&a(ie),n.jsxs(vt,{onClick:be=>be.stopPropagation(),children:[o!==j&&n.jsx("div",{className:"row",children:n.jsxs("div",{className:"section-editor-title-wrapper",children:[n.jsx("div",{className:"input-field",children:n.jsx(me,{id:"title","diagnostic-id":"section-editor-title-input",n
129ame:"title",placeholder:"Enter a title for this section...",maxLength:"160",className:Y.title&&z.title?"text-input error":"form-control"})}),Y.title&&z.title&&n.jsx("div",{className:"input-feedback",children:Y.title})]})}),n.jsx("div",{className:`section-editor-wrapper ${o}`,children:n.jsx(Mu,{onDragEnd:be=>A(be,K.editorItems,K.title),onDragStart:()=>_(!0),children:n.jsx(fc,{droppableId:"droppable",children:(be,ye)=>n.jsx(fu,{name:"editorItems",render:ke=>n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"droppable-container",...be.droppableProps,ref:be.innerRef,children:[K.editorItems?.map((fe,se)=>n.jsx(WOe,{errors:Y,editorItem:fe,isDragging:S,index:se,arrayHelpers:ke,sectionType:o,handlePdf:ge=>{B(ge.currentTarget.files[0],ve,pe,ke,K.editorItems,se)}},se)),be.placeholder]}),o===w&&N?n.jsx("div",{className:"document-upload-btns-container",children:n.jsxs("div",{className:"upload-btns",children:[n.jsx("label",{htmlFor:"file-upload",className:"btn btn-primary pdf-file-upload",children:"UPLOAD A PDF"}),n.jsx("input",{id:"file-upload",name:"pdfFile",type:"file","diagnostic-id":"upload-pdf-btn",accept:"application/pdf",onChange:fe=>{B(fe.currentTarget.files[0],ve,pe,ke,K.editorItems,K.editorItems?.length)}}),n.jsx("div",{className:"btn-text",children:"OR"}),n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"link-url-btn",id:"link-url-btn",onClick:fe=>{k(!1),ke.push(R)},children:"Use a URL"})]})}):n.jsx("div",{id:"add-subsections-group",children:n.jsx(Ke,{title:K.editorItems&&(o===w&&K.editorItems.length>=O||o===b&&K.editorItems.length>=$||o===j&&K.editorItems.length>=U)?"Limit reached":"",placement:"top",children:n.jsxs("button",{type:"button",id:"subsection-new",className:"new-subsection-row","diagnostic-id":"subsection-new-btn",onClick:fe=>o===w?k(!0):ke.push(R),disabled:K.editorItems&&(o===w&&K.editorItems.length>=O||o===b&&K.editorItems.length>=$||o===j&&K.editorItems.length>=U),children:[n.jsx("i",{className:"material-icons",children:"add"}),q]})})})]})})})})}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>c(),children:"Cancel"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",disabled:!I&&!ie||!!Object.keys(Y).length||o!==j&&(!K.editorItems||K.editorItems?.length===0)||ne,children:"Save"})]})]}))})]})})}const KOe=e=>({userId:e.auth.user.id,pageType:e.spotlight&&e.spotlight.pageType,partnerPermissions:e.auth&&e.auth.user&&e.auth.user.company.partner_permissions}),km=le(KOe,{addPageSection:cc,editPageSection:dm,editPartnerPageCompanyLocations:Oxe,setEditorFormStatus:Sa})(zt(YOe));function XOe(e){const{userId:t,index:r,setScrim:i,addPageSection:a,setDirty:s,isDirty:o,pageType:l,pageSlug:c,partnerPermissions:h,partnerPage:u,isEditorDirty:d,setEditorFormStatus:p}=e,{Divider:f,InsightsGallery:m,SolutionsGallery:g,Image:x,Highlights:v,Documents:b,TeamProfile:j}=Bn,S=u.numDocumentsSection>=h.max_documents_sections,C=u.numInsightsGallery>=h.max_insights_gallery_sections,P=u.numSolutionsGallery>=h.max_solutions_gallery_sections,[T,N]=y.useState(!1),[k,I]=y.useState(!1),[D,O]=y.useState(!1),[$,U]=y.useState(!1),[B,L]=y.useState(!1),[A,R]=y.useState(!1),[F,q]=y.useState(!1),[V,X]=y.useState(!1),[M,W]=y.useState(!1),K="Changes you made may not be saved.",z=()=>{N(!0),i(!0)},Y=()=>{N(!1),i(!1)},ie=ae=>{o&&!ae?window.confirm(K)&&(I(!1),s(!1)):(I(!1),s(!1))},ne=ae=>{(d||o)&&!ae?window.confirm(K)&&($?U(!1):B&&L(!1),O(!1),s(!1),p(!1)):($?U(!1):B&&L(!1),O(!1),s(!1),p(!1))},ve=ae=>{(d||o)&&!ae?window.confirm(K)&&(F?q(!1):V?X(!1):M&&W(!1),R(!1),s(!1),p(!1)):(F?q(!1):V?X(!1):M&&W(!1),R(!1),s(!1),p(!1))};y.useEffect(()=>{D||(U(!1),L(!1))},[D]),y.useEffect(()=>{A||(q(!1),X(!1),W(!1))},[A]);const pe=T&&n.jsx(Tm,{index:r,showTextEditor:T,setShowTextEditor:N,handleCancel:Y,pageSlug:c}),be=async ae=>{await a(t,c,ae,r,l)},ye=k&&n.jsx(Uu,{openImageUpload:k,setModal:I,sectionType:x,isDirty:o,setDirty:s,handleCancel:ie,index:r,pageSlug:c}),ke=D&&n.jsx(km,{setModal:O,isDirty:o,setDirty:s,sectionType:$?v:B?b:null,index:r,handleCancel:ne,pageSlug:c}),fe=A&&n.jsx(Fu,{setModal:R,modal:A,handleCancel:ve,editorHeader:F?"Team Profiles":V?"Select Partner Solutions":M?"Select Partner Insights":"",sectionType:F?j:V?g:M?m:null,index:r,pageSlug:c,setDirty:s,isDirty:o}),se=n.jsxs("button",{className:"btn-primary-lg btn-icon-text","diagnostic-id":"add-insights-gallery-btn",type:"button",onClick:()=>{R(!0),W(!0)},disabled:C,children:[n.jsx("i",{className:"material-icons",children:"lightbulb"}),"ADD INSIGHTS GALLERY"]}),ge=n.jsxs("button",{className:"btn-primary-lg btn-icon-text","diagnostic-id":"add-documents-btn",type:"button",onClick:()=>{O(!0),L(!0)},disabled:S,children:[n.jsx("i",{className:"material-icons",children:"upload_file"}),"ADD DOCUMENTS"]}),De=n.jsxs("button",{className:"btn-primary-lg btn-icon-text","diagnostic-id":"add-solutions-gallery-btn",type:"button",onClick:()=>{R(!0),X(!0)},disabled:P,children:[n.jsx("i",{className:"material-icons-outlined",children:"category"}),"ADD SOLUTIONS GALLERY"]});return T?pe:n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"spotlight-section-tools",children:n.jsx("div",{className:"spotlight-section-tool-line",children:n.jsx("hr",{})})}),n.jsx("div",{className:"spotlight-section-wrapper sections-buttons",id:"sections-buttons",children:n.jsx("div",{className:"fadeTransition new-spotlight-section-container",children:n.jsxs("div",{className:"new-spotlight-section",id:"section-new",children:[n.jsx("h4",{children:"Add a new section"}),n.jsxs("div",{className:"button-group",children:[n.jsxs("button",{className:"btn-primary-lg btn-icon-text","diagnostic-id":"add-text-section-btn",type:"button",onClick:z,children:[n.jsx("i",{className:"material-icons",children:"edit_note"}),"ADD TEXT"]}),n.jsxs("button",{className:"btn-primary-lg btn-icon-text","diagnostic-id":"add-image-btn",type:"button",onClick:()=>I(!0),children:[n.jsx("i",{className:"material-icons",children:"panorama"}),"ADD AN IMAGE"]}),n.jsx(Ke,{title:C?"Max insights gallery sections reached":"",placement:"top",children:se}),n.jsx(Ke,{title:P?"Max solutions gallery sections reached":"",placement:"top",children:De}),n.jsxs("button",{className:"btn-primary-lg btn-icon-text","diagnostic-id":"add-divider-btn",type:"button",onClick:()=>be(f),children:[n.jsx("i",{className:"material-icons",children:"horizontal_rule"}),"ADD A DIVIDER"]}),n.jsxs("button",{className:"btn-primary-lg btn-icon-text","diagnostic-id":"add-highlights-btn",type:"button",onClick:()=>{O(!0),U(!0)},children:[n.jsx("i",{className:"material-icons",children:"star"}),"ADD HIGHLIGHTS"]}),n.jsx(Ke,{title:S?"Maximum document sections added":"",placement:"top",children:ge}),n.jsxs("button",{className:"btn-primary-lg btn-icon-text","diagnostic-id":"add-team-profile-btn",type:"button",onClick:()=>{R(!0),q(!0)},children:[n.jsx("i",{className:"material-icons",children:"account_box"}),"ADD TEAM PROFILES"]})]})]})})}),ye,ke,fe]})}const QOe=e=>({userId:e.auth.user&&e.auth.user.id,pageType:e.spotlight&&e.spotlight.pageType,partnerPermissions:e.auth&&e.auth.user&&e.auth.user.company.partner_permissions,isEditorDirty:e.spotlight.isDirty}),ZOe=le(QOe,{setScrim:hn,addPageSection:cc,setEditorFormStatus:Sa})(zt(XOe)),JOe=e=>{const{userId:t,setDeleteModal:r,deletePageSection:i,sectionId:a,pageSlug:s,pageType:
129o}=e,l=()=>{i(a,t,s,o),r(!1)};return n.jsx(ot,{setModal:r,children:n.jsxs("div",{className:"delete-modal-container",children:[n.jsx("h5",{children:"Please Confirm"}),n.jsx("p",{children:"Are you sure you want to permanently delete this section?"}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>{r(!1)},children:"CANCEL"}),n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",onClick:l,children:"DELETE"})]})]})})},eAe=e=>({userId:e.auth.user&&e.auth.user.id,pageType:e.spotlight&&e.spotlight.pageType}),tAe=le(eAe,{deletePageSection:Mxe})(JOe);function nAe(e){const{section:t,index:r,isDragging:i,userId:a,setScrim:s,setDirty:o,pageSlug:l,partnerPage:c,isEditorDirty:h,setEditorFormStatus:u}=e,[d,p]=y.useState(!1),[f,m]=y.useState(!1),g=t?.insights_gallery,x=t?.solutions_gallery,{InsightsGallery:v,SolutionsGallery:b,TextSection:j,Divider:w,Image:S,Highlights:_,TeamProfile:C,Documents:E}=Bn;let P="unknown",T="unknown",N=null;switch(t.type){case v:P="Partner Insights Gallery",T="Select Partner Insights",N=g;break;case b:P="Partner Solutions Gallery",T="Select Partner Solutions",N=x;break;case _:P="Highlights",N=t.highlights;break;case C:P="Team Profiles",T="Team Profiles",N=t.team_profiles;break;case E:P="Documents",N=t.documents;break}const k=R=>{R.preventDefault(),p(!0),t.type===j&&s(!0)};y.useEffect(()=>{o(h)},[h]);const D={setModal:p,isEditing:d,editorItems:N,section:t,handleCancel:R=>{t.type===_||t.type===S||t.type===v||t.type===b||t.type===C||t.type===E?(h||e.isDirty)&&!R?window.confirm("Changes you made may not be saved.")&&(p(!1),o(!1),u(!1)):(p(!1),o(!1),u(!1)):(s(!1),p(!1))},sectionType:t.type,pageSlug:l,setShowTextEditor:p},O=d&&(t.type===v||t.type===b||t.type===C)&&n.jsx(Fu,{editorHeader:T,...D,setDirty:o,isDirty:e.isDirty}),$=d&&(t.type===_||t.type===E)&&n.jsx(km,{...D,setDirty:o,isDirty:e.isDirty}),U=d&&t.type===S&&n.jsx(Uu,{currentImage:t.image_url,setDirty:o,isDirty:e.isDirty,...D}),B=n.jsx("div",{className:"section-header-group",children:n.jsx("div",{className:"section-type-header",children:P})}),L=t.team_profiles&&n.jsxs("div",{className:"section-group",children:[B,t.title&&n.jsx("div",{className:`section-title ${t.type}`,children:n.jsx("h4",{children:t.title})}),t.team_profiles.map((R,F)=>n.jsx(O0,{editorItem:R,isOnWorkspace:!0},F))]});let A;switch(t.type){case j:A=d?n.jsx(Tm,{textContent:t.text,sectionId:t.id,...D}):n.jsx("div",{className:"section-content-text","diagnostic-id":"section-content-text",dangerouslySetInnerHTML:{__html:ti(t.text)}});break;case v:case b:A=n.jsxs("div",{className:"section-group","diagnostic-id":"gallery-section",children:[B,n.jsx(Wa,{cards:N,sectionType:t.type,sectionTitle:t.title,isOnWorkspace:!0,partnerPage:c})]});break;case w:A=n.jsx(tL,{});break;case S:A=n.jsx(iL,{imageUrl:t.image_url});break;case _:A=n.jsxs("div",{className:"section-group",children:[B,n.jsx(rL,{section:t})]});break;case C:A=L;break;case E:A=n.jsxs("div",{className:"section-group",children:[B,n.jsx(nL,{section:t})]});break}return n.jsxs(n.Fragment,{children:[n.jsx($u,{draggableId:t.id&&t.id.toString(),index:r,isDragDisabled:d,children:(R,F)=>n.jsx("div",{className:`spotlight-section-wrapper${i?" droppable":""}`,...R.draggableProps,ref:R.innerRef,style:{...R.draggableProps.style},"diagnostic-id":"spotlight-section-wrapper",children:n.jsxs("div",{className:`spotlight-section${F.isDragging?" is-dragging":" draggable"} ${t.type}`,id:"spotlight-section","diagnostic-id":`spotlight-${t.type}-section`,children:[!d&&t.type!==w&&n.jsxs("button",{className:"section-edit-btn",onClick:k,"diagnostic-id":`${t.type}-section-edit-btn`,children:[n.jsx("i",{className:"material-icons section-edit-icon",children:"edit"}),"EDIT"]}),!d&&n.jsxs("div",{className:"section-drag-handle",...R.dragHandleProps,children:[n.jsx("i",{className:"material-icons section-drag-icon",children:"open_with"}),"MOVE SECTION"]}),A,!d&&n.jsxs("button",{onClick:()=>{m(!0)},className:"section-delete-btn","diagnostic-id":"section-delete-btn",children:[n.jsx("i",{className:"material-icons",children:"delete"}
129),"DELETE"]})]})})},t.id&&t.id),O,$,U,f&&n.jsx(tAe,{setDeleteModal:m,sectionId:t.id,pageSlug:l})]})}const rAe=e=>({userId:e.auth.user&&e.auth.user.id,isEditorDirty:e.spotlight.isDirty}),iAe=le(rAe,{setScrim:hn,setEditorFormStatus:Sa})(zt(nAe));function aAe(e){const{setScrim:t,index:r,addPageSection:i,pageSlug:a,userId:s,setDirty:o,isDirty:l,pageType:c,partnerPermissions:h,partnerPage:u,isEditorDirty:d,setEditorFormStatus:p}=e,{Divider:f,InsightsGallery:m,SolutionsGallery:g,Image:x,Highlights:v,Documents:b,TeamProfile:j}=Bn,S=u.numDocumentsSection>=h.max_documents_sections,C=u.numInsightsGallery>=h.max_insights_gallery_sections,P=u.numSolutionsGallery>=h.max_solutions_gallery_sections,{Spotlight:T,Solution:N}=on,[k,I]=y.useState(!1),[D,O]=y.useState(!1),[$,U]=y.useState(!1),[B,L]=y.useState(!1),[A,R]=y.useState(!1),[F,q]=y.useState(!1),[V,X]=y.useState(!1),[M,W]=y.useState(!1),[K,z]=y.useState(!1),Y="Changes you made may not be saved.",ie=()=>{I(!0),t(!0)},ne=()=>{I(!1),t(!1)},ve=ge=>{l&&!ge?window.confirm(Y)&&(O(!1),o(!1)):(O(!1),o(!1))},pe=ge=>{(d||l)&&!ge?window.confirm(Y)&&(B?L(!1):A&&R(!1),U(!1),o(!1),p(!1)):(B?L(!1):A&&R(!1),U(!1),o(!1),p(!1))},be=ge=>{(d||l)&&!ge?window.confirm(Y)&&(V?X(!1):M?W(!1):K&&z(!1),q(!1),o(!1),p(!1)):(V?X(!1):M?W(!1):K&&z(!1),q(!1),o(!1),p(!1))};y.useEffect(()=>{$||(L(!1),R(!1))},[$]),y.useEffect(()=>{F||(X(!1),W(!1),z(!1))},[F]);const ye=k&&n.jsx(Tm,{index:r,showTextEditor:k,setShowTextEditor:I,handleCancel:ne,pageSlug:a}),ke=D&&n.jsx(Uu,{openImageUpload:D,setModal:O,sectionType:x,isDirty:l,setDirty:o,handleCancel:ve,index:r,pageSlug:a}),fe=$&&n.jsx(km,{setModal:U,isDirty:l,setDirty:o,sectionType:B?v:A?b:null,index:r,handleCancel:pe,pageSlug:a}),se=F&&n.jsx(Fu,{setModal:q,modal:F,handleCancel:be,editorHeader:V?"Team Profiles":M?"Select Partner Solutions":K?"Select Partner Insights":"",sectionType:V?j:M?g:K?m:null,index:r,pageSlug:a,setDirty:o,isDirty:l});return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"spotlight-section-tools",children:[n.jsx("div",{className:"spotlight-section-tool-line",children:n.jsx("hr",{})}),n.jsx("button",{className:"spotlight-section-tools-menu",children:n.jsx("i",{className:"material-icons",children:"add"})}),n.jsxs("div",{className:"spotlight-section-tool-btns",children:[n.jsx(Ke,{title:"Add a text section",placement:"top",children:n.jsx("button",{"diagnostic-id":"add-text-section-tool-btn",onClick:ie,children:n.jsx("i",{className:"material-icons",children:"edit_note"})})}),n.jsx(Ke,{title:"Add an image",placement:"top",children:n.jsx("button",{"diagnostic-id":"add-img-section-tool-btn",type:"button",onClick:()=>O(!0),children:n.jsx("i",{className:"material-icons",children:"panorama"})})}),n.jsx(Ke,{title:C?"Max insights gallery sections reached":"Add insights gallery",placement:"top",children:n.jsx("button",{"diagnostic-id":"add-insights-gallery-tool-btn",type:"button",onClick:()=>{q(!0),z(!0)},disabled:C,children:n.jsx("i",{className:"material-icons",children:"lightbulb"})})}),n.jsx(Ke,{title:P?"Max solutions gallery sections reached":"Add solutions gallery",placement:"top",children:n.jsx("button",{"diagnostic-id":"add-solutions-gallery-tool-btn",type:"button",onClick:()=>{q(!0),W(!0)},disabled:P,children:n.jsx("i",{className:"material-icons-outlined",children:"category"})})}),n.jsx(Ke,{title:"Add a divider",placement:"top",children:n.jsx("button",{"diagnostic-id":"add-divider-tool-btn",type:"button",onClick:()=>i(s,a,f,r,c),children:n.jsx("i",{className:"material-icons",children:"horizontal_rule"})})}),n.jsx(Ke,{title:"Add highlights",placement:"top",children:n.jsx("button",{"diagnostic-id":"add-highlights-tool-btn",type:"button",onClick:()=>{U(!0),L(!0)},children:n.jsx("i",{className:"material-icons",children:"star"})})}),n.jsx(Ke,{title:S?"Maximum document sections added":"Add documents",placement:"top",children:n.jsx("button",{"diagnostic-id":"add-documents-tool-btn",type:"button",onClick:()=>{U(!0),R(!0)},disabled:S,children:n.jsx("i",{className:"material-icons",children:"upload_file"})})}),n.jsx(Ke,{title:"Add team profiles",placement:"top",children:n.jsx("button",{"diagnostic-id":"add-team-profiles-tool-btn",type:"button",onClick:()=>{q(!0),X(!0)},children:n.jsx("i",{className:"material-icons",children:"account_box"})})})]})]}),ye,ke,fe,se]})}const sAe=e=>({userId:e.auth.user&&e.auth.user.id,pageType:e.spotlight&&e.spotlight.pageType,partnerPermissions:e.auth&&e.auth.user&&e.auth.user.company.partner_permissions,isEditorDirty:e.spotlight.isDirty}),oAe=le(sAe,{setScrim:hn,addPageSection:cc,setEditorFormStatus:Sa})(zt(aAe));function lAe(e){const{userId:t,partnerPage:r,updatePageSectionsOrder:i,pageType:a}=e,[s,o]=y.useState(!1),l=r.sections,c=()=>{o(!s)},h=async u=>
129{u.destination||o(!1);const{source:d,destination:p}=u,m=l[d.index].id;c(),await i(t,m,r.page_slug,a,d?.index,p?.index)};return n.jsxs("div",{className:"spotlight-sections-container",children:[n.jsx(Mu,{onDragEnd:h,onDragStart:()=>o(!0),children:n.jsx(fc,{droppableId:"droppable",children:(u,d)=>n.jsxs("div",{className:"droppable-container",...u.droppableProps,ref:u.innerRef,children:[l.map((p,f)=>n.jsxs("div",{children:[!s&&n.jsx(oAe,{index:f,pageSlug:r.page_slug,partnerPage:r}),n.jsx(iAe,{section:p,index:f,isDragging:s,pageSlug:r.page_slug,partnerPage:r})]},f)),u.placeholder]})})}),n.jsx(ZOe,{index:l?.length,pageSlug:r.page_slug,partnerPage:r})]})}const cAe=e=>({userId:e.auth.user&&e.auth.user.id,pageType:e.spotlight&&e.spotlight.pageType}),zF=le(cAe,{updatePageSectionsOrder:Axe})(lAe),dAe={edit:"edit",preview:"preview"};function uAe(e){const{spotlight:t,userId:r,setScrim:i,match:a,getSolutionPage:s,solutionPageSlug:o,history:l,setPageType:c,pageType:h,getPublishedSolutionPage:u,getPartnerSolutions:d,numPublishedSolutions:p,partnerPermissions:f,canUsePartner:m,modalStatus:g}=e,x=Ni.parse(e.location.search),[v,b]=y.useState(!0),[j,w]=y.useState(x.view||""),{allow_partner:S}=f,{Solution:_}=on;y.useEffect(()=>{S&&m&&!t.solutions.pages&&d(r)},[]),y.useEffect(()=>{if(!g){const T=document.body.style.top;document.body.style.position="",document.body.style.top="",document.body.style.width="";const N=document.querySelector(".nav-wrapper");N.style.paddingRight="",N.style.paddingLeft="",window.scrollTo(0,parseInt(T||"0")*-1)}},[g]),y.useEffect(()=>{const T=a.params.id;i(!1),(j==="edit"||j==="preview")&&(!t.solutions||!t.solutions.page||t.solutions.page.page_slug!==T)?(s(T,r).then(()=>b(!1),()=>{l.push("/insights?view=spotlight")}),c(_)):j!==""&&b(!1)},[o,t?.solutions?.page?.sections?.length]),y.useEffect(()=>{const T=a.params.id;j===""&&(u(T,r).then(N=>{N?b(!1):l.push("/insights?view=spotlight")}),c(_))},[j,a.params.id]),y.useEffect(()=>{const T=a.params.id,N=Object.keys(dAe).includes(j);N?l.replace(`/solutions/${T}?view=${j}`):l.replace(`/solutions/${T}`),!N&&w("")},[j]);const C=t.solutions?.page,E=t.solutions?.publishedPage;let P=n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"back-link-wrapper",children:n.jsxs(Ze,{to:{pathname:"/insights",search:"?view=solutions"},className:"back-link","diagnostic-id":"spotlight-back-btn",children:[n.jsx(ir,{}),n.jsx("span",{children:"Back to Solutions"})]})}),n.jsx(da,{}),n.jsxs("div",{className:"spotlight-editor-wrapper",children:[n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(VF,{partnerPage:C,setPageChoice:w,numPublishedSolutions:p})})}),n.jsxs("div",{className:"spotlight-workspace-container",children:[n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(BF,{partnerPage:C})})}),n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(zF,{partnerPage:C})})}),n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(UF,{pageSlug:o})})}),n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(qF,{partnerPage:C})})})]})]})]});return P=j===""||j==="preview"&&t.solutions.page?n.jsx(A0,{pageChoice:j,setPageChoice:w,partnerPage:j==="preview"?C:j===""?E:null,pageType:h}):j==="edit"&&t.solutions.page?P:n.jsx(n.Fragment,{}),n.jsxs(n.Fragment,{children:[v?n.jsx(Dn,{}):null,n.jsx("div",{className:"container",children:!v&&t.solutions&&P})]})}const hAe=e=>({userId:e.auth.user&&e.auth.user.id,spotlight:e.spotlight,solutionPageSlug:e.spotlight&&e.spotlight.solutions.page&&e.spotlight.solutions.page.page_slug,pageType:e.spotlight&&e.spotlight.pageType,numPublishedSolutions:e.spotlight&&e.spotlight.solutions&&e.spotlight.solutions.numPublishedSolutions,partnerPermissions:e.auth&&e.auth.user&&e.auth.user.company.partner_permissions,canUsePartner:e.auth.user&&e.auth.user.can_use_partner,modalStatus:e.preferences&&e.preferences.modalStatus}),pAe=le(hAe,{setScrim:hn,getSolutionPage:Txe,setPageType:Pu,getPublishedSolutionPage:P$,getPartnerSolutions:T$})(uAe);function fAe(e){const{BannerImage:t}=Bn,{setDirty:r,isDirty:i,partnerPage:a}=e,[s,o]=y.useState(!1),l=a?.banner?.banner_image_url,c=a?.banner?.overlay_design?.thumb_svg_url,h=u=>
129{i&&!u?window.confirm("Changes you made may not be saved.")&&(o(!1),r(!1)):(o(!1),r(!1))};return n.jsxs("div",{className:"fixed-spotlight-sections-container",children:[n.jsx("div",{className:"spotlight-sections-wrapper",children:n.jsxs("div",{className:"spotlight-section",children:[n.jsx("div",{className:"spotlight-scrim-overlay"}),n.jsxs("div",{className:"fixed-edit-section-btn","diagnostic-id":"banner-img-edit-btn",onClick:()=>o(!0),children:[n.jsx("i",{className:"material-icons fixed-section-edit-icon",children:"edit"}),"EDIT"]}),n.jsxs("div",{className:"section-group",children:[n.jsx("div",{className:"section-header-group",children:n.jsx("div",{className:"section-type-header",children:"Banner Image"})}),n.jsx("div",{className:"section-placeholder"}),n.jsx("div",{className:"banner-img-group",children:l?n.jsx("img",{className:"banner-img",alt:"",src:l}):c&&c!==""?n.jsx("img",{src:c,alt:"overlay design",className:"overlay-design"}):n.jsx(n.Fragment,{})})]})]})}),s&&n.jsx(Uu,{openImageUpload:s,setModal:o,currentBanner:l,isDirty:i,setDirty:r,handleCancel:h,pageSlug:a.page_slug,sectionType:t})]})}const mAe=e=>({userId:e.auth.user&&e.auth.user.id}),gAe=le(mAe,{})(zt(fAe));function vAe(e){const{CompanyLocations:t}=Bn,{setDirty:r,officeContacts:i,pageSlug:a,isDirty:s,setEditorFormStatus:o,isEditorDirty:l}=e,[c,h]=y.useState(!1),u=p=>{(l||s)&&!p?window.confirm("Changes you made may not be saved.")&&(h(!1),o(!1),r(!1)):(h(!1),o(!1),r(!1))},d=c&&n.jsx(km,{isEditing:c,setModal:h,editorItems:i,handleCancel:u,sectionType:t,pageSlug:a,isDirty:s,setDirty:r});return n.jsxs("div",{className:"fixed-spotlight-sections-container company-locations","diagnostic-id":"spotlight-company-locations-container",children:[n.jsx("div",{className:"spotlight-sections-wrapper",children:n.jsxs("div",{className:"spotlight-section",id:"spotlight-section","diagnostic-id":"spotlight-company-locations-section",children:[n.jsx("div",{className:"spotlight-scrim-overlay"}),n.jsxs("button",{className:"fixed-edit-section-btn",onClick:()=>h(!0),children:[n.jsx("i",{className:"material-icons fixed-section-edit-icon","diagnostic-id":"company-locations-edit-icon",children:"edit"}),"EDIT"]}),n.jsxs("div",{className:"section-group","diagnostic-id":"company-locations-section-group",children:[n.jsx("div",{className:"section-header-group",children:n.jsx("div",{className:"section-type-header",children:"Company Locations"})}),n.jsx("div",{className:"company-locations-wrapper","diagnostic-id":"company-locations-wrapper",children:i.length===0?n.jsx("div",{className:"company-locations-placeholder",id:"company-locations-placeholder",children:"Enter your company locations here..."}):i.map((p,f)=>n.jsxs("div",{className:"company-locations-card",id:"company-locations-card",children:[n.jsx("h6",{className:"company-region-name",children:p.name}),n.jsxs("div",{className:"company-address-group",children:[n.jsx("div",{className:"main-address-info",children:p.address_line1}),n.jsx("div",{className:"secondary-address-info",children:p.address_line2}),n.jsxs("div",{className:"geography-location",children:[p.address_city&&`${p.address_city}, `,p.address_state+" "+p.address_zipcode]}),n.jsx("div",{className:"country-name",children:p.address_country})]}),n.jsxs("div",{className:"company-contact-info-group",children:[n.jsx("div",{className:"phone-number",children:p.phone_number}),n.jsx("div",{className:"email-address",children:p.email})]})]},f))})]})]})}),d]})}const bAe=e=>({userId:e.auth.user&&e.auth.user.id,officeContacts:e.spotlight&&e.spotlight.partnerSpotlightPage&&e.spotlight.partnerSpotlightPage.office_contacts,isEditorDirty:e.spotlight.isDirty}),yAe=le(bAe,{setEditorFormStatus:Sa})(zt(vAe)),xAe={edit:"edit",preview:"preview"};function jAe(e){const{spotlight:t,userId:r,setScrim:i,match:a,getPartnerSpotlightPage:s,partnerPageSlug:o,history:l,setPageType:c,pageType:h,getPublishedPartnerPage:u,modalStatus:d}=e,p=Ni.parse(e.location.search),[f,m]=y.useState(!0),[g,x]=y.useState(p.view||""),{Spotlight:v}=on;y.useEffect(()=>{const S=a.params.id;i(!1),(g==="edit"||g==="preview")&&(!t||!t.partnerSpotlightPage||t.partnerSpotlightPage.page_slug)?(s(S,r).then(()=>m(!1),()=>{l.push("/insights?view=spotlight")}),c(v)):m(!1)},[o,t?.partnerSpotlightPage?.banner?.banner_image_url,t?.partnerSpotlightPage?.sections?.length]),y.useEffect(()=>{if(!d){const S=document.body.style.top;document.body.style.position="",document.body.style.top="",document.body.style.width="";const _=document.querySelector(".nav-wrapper");_.style.paddingRight="",_.style.paddingLeft="",window.scrollTo(0,parseInt(S||"0")*-1)}},[d]),y.useEffect(()=>{const S=a.params.id;g===""&&(u(S,r).then(_=>{_?m(!1):l.push("/insights?view=spotlight")}),c(v))},[g,a.params.id]),y.useEffect(()=>{const S=a.params.id,_=Object.keys(xAe).includes(g);_?l.replace(`/spotlight/${S}?view=${g}`):l.replace(`/spotlight/${S}`),!_&&x("")},[g]);const b=t?.partnerSpotlightPage,j=t?.publishedSpotlightPage;let w=n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"back-link-wrapper",children:n.jsxs(Ze,{to:{pathname:"/insights",search:"?view=spotlight"},className:"back-link","diagnostic-id":"spotlight-back-btn",children:[n.jsx(ir,{}),n.jsx("span",{children:"Back to Partner Insights"})]})}),n.jsx(da,{}),n.jsxs("div",{className:"spotlight-editor-wrapper",children:[n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(VF,{partnerPage:b,setPageChoice:x,pageChoice:g})})}),n.jsxs("div",{className:"spotlight-workspace-container",children:[n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(gAe,{partnerPage:b})})}),n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(BF,{partnerPage:b})})}),n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(zF,{partnerPage:b})})}),n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(UF,{pageSlug:o})})}),n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(yAe,{pageSlug:o})})}),n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(qF,{partnerPage:b})})})]})]})]});return w=g===""||g==="preview"&&t.partnerSpotlightPage?n.jsx(A0,{pageChoice:g,setPageChoice:x,partnerPage:g==="preview"?b:g===""?j:null,pageType:h}):g==="edit"&&t.partnerSpotlightPage?w:n.jsx(n.Fragment,{}),n.jsxs(n.Fragment,{children:[f?n.jsx(Dn,{}):null,n.jsx("div",{className:"container",children:!f&&t&&w})]})}const wAe=e=>({userId:e.auth.user&&e.auth.user.id,spotlight:e.spotlight,partnerPageSlug:e.spotlight.partnerSpotlightPage&&e.spotlight.partnerSpotlightPage.page_slug,pageType:e.spotlight&&e.spotlight.pageType,modalStatus:e.preferences&&e.preferences.modalStatus}),SAe=le(wAe,{setScrim:hn,getPartnerSpotlightPage:I$,setPageType:Pu,getPublishedPartnerPage:D$})(jAe),_Ae=e=>{const{user:t,createVideoModal:r,setCreateVideoModal:i,renderInsightsVideo:a,insightsVideoId:s,hasFeaturedAndCustom:o,insightsVideo:l}=e,[c,h]=y.useState(!1),u=y.useCallback(p=>$n(p,r,i),[r]);y.useEffect(()=>(window.addEventListener("keyup",u),()=>{window.removeEventListener("keyup",u)}),[u]);const d=()=>{h(!0),a(s,t.id).then(p=>{p&&i(!1),h(!1)})};return n.jsx(ot,{setModal:i,disableClickOutsideCancel:c,children:n.jsxs("div",{className:"create-video-modal-container","diagnostic-id":"create-video-modal-container",children:[n.jsx("h5",{children:"Create Video"}),n.jsx("p",{children:"Finalize and create your insights video. This process may take a few minutes - we’ll send you an email once your insights video is ready."}),o&&n.jsx("div",{className:"create-video-warning-banner",children:n.jsxs(n.Fragment,{children:[n.jsx("i",{className:"material-icons",children:"warning"}),n.jsx("div",{className:"banner-text",children:"This video uses both featured and custom-recorded audio/video"})]})}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>{i(!1)},children:"CANCEL"}),n.jsxs("button",{type:"button",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",onClick:d,disabled:c,
129children:[c?n.jsx("div",{id:"spinner-icon-container",children:n.jsx(ur,{size:"1.25em",thickness:8,variant:"indeterminate"})}):"",c?"":"CREATE VIDEO"]})]})]})})},CAe=e=>({user:e.auth.user}),NAe=le(CAe,{renderInsightsVideo:Nje})(_Ae),EAe=e=>{const{editModal:t,setEditModal:r,insightsVideoId:i,title:a,handleCancel:s,editInsightsVideoTitle:o,userId:l,displayAuthorName:c,setModalStatus:h}=e,[u,d]=y.useState(Ys());y.useEffect(()=>{h(!0),document.body.style.position="fixed",document.body.style.top=`-${u}px`,document.body.style.width="100%";const f=document.querySelector(".nav-wrapper");f.style.paddingLeft="10px",f.style.paddingRight="10px"},[]);const p=y.useCallback(f=>$n(f,t,r),[t]);return y.useEffect(()=>(window.addEventListener("keyup",p),()=>{window.removeEventListener("keyup",p)}),[p]),n.jsx(ot,{setModal:r,disableClickOutsideCancel:!0,children:n.jsxs("div",{className:"studio-title-edit-modal-container","diagnostic-id":"studio-title-edit-modal-container",children:[n.jsx("i",{className:"material-icons",onClick:()=>{r(!1),h(!1)},children:"close"}),n.jsx(gt,{initialValues:{title:a,displayAuthorName:c},onSubmit:(f,{setSubmitting:m})=>{o(i,l,f.title,f.displayAuthorName).then(s),h(!1)},validationSchema:_t().shape({title:Ae().required("Required").test("is-empty","Title cannot be empty",function(f){return!f||!f.split("").every(m=>m===" ")}).max(50)}),children:({values:f,touched:m,errors:g,dirty:x,isSubmitting:v,setFieldValue:b})=>(x!==e.isDirty&&e.setDirty(x),n.jsxs(vt,{onClick:j=>j.stopPropagation(),children:[n.jsx("h5",{children:"Edit Insights Video Title"}),n.jsx("div",{className:"title-label",children:"Insights video title:"}),n.jsx(me,{id:"title",name:"title","diagnostic-id":"insights-video-title-input",placeholder:"Market Insights Video",maxLength:50,className:g.title&&m.title?"text-input-error":"form-control"}),g.title&&m.title&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:g.title}),n.jsxs("div",{className:"character-count",children:[50-f.title.length," characters left"]}),n.jsx("div",{className:"form-group header-options",children:n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"displayAuthorName",value:"true",id:"displayAuthorName",className:"filled-in",checked:f.displayAuthorName,onChange:j=>{b("displayAuthorName",j.target.checked)}}),n.jsx("span",{children:"Show author name on title clip"})]})}),n.jsx("div",{className:"edit-title-warning-banner",children:n.jsxs(n.Fragment,{children:[n.jsx("i",{className:"material-icons",children:"info"}),n.jsx("div",{className:"banner-text",children:"Updating your title will overwrite your existing title clip. Your new title will not appear on your final insights video until you save and run “Create Video” again."})]})}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>{r(!1),h(!1)},children:"Cancel"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",disabled:!x||!!Object.keys(g).length||v,children:"Save"})]})]}))})]})})},TAe=e=>({userId:e.auth.user&&e.auth.user.id}),kAe=le(TAe,{editInsightsVideoTitle:fje,setModalStatus:Iu})(EAe),{apiAddress:PAe}=Tn,IAe=e=>{const{user:t,setDownloadModal:r,downloadKey:i,studioLicenseType:a}=e,[s,o]=y.useState(!1),l=c=>{c.stopPropagation(),o(!0)};return y.useEffect(()=>{s&&r(!1)},[s]),n.jsx(ot,{setModal:r,children:n.jsxs("div",{className:"download-video-modal-container","diagnostic-id":"download-video-modal-container",children:[n.jsx("i",{className:"material-icons",onClick:()=>r(!1),children:"close"}),n.jsx("h5",{children:"Download Your Insights Video"}),a==="Compliance"&&n.jsx("p",{className:"compliance-download-msg",children:"Your license permits the use of downloaded videos for compliance purposes only. Please contact us if you would like to learn more about upgrading to a marketing license."}),n.jsx("p",{children:"Download your insights video as a file (.mp4)."}),n.jsx("p",{children:"Please be aware that video files can be very large and may take additional time to download. The download duration depends on the length of your video and your internet connection speed."}),n.jsx("form",{onClick:l,method:"get","diagnostic-id":"download-video-btn",action:`${PAe}api/download/${i}/`,target:"_blank",children:n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",children:"Download Now"})})]})})},DAe=e=>({user:e.auth.user,downloadKey:e.studio&&e.studio.insightsVideo&&e.studio.insightsVideo.downloadKey}),RAe=le(DAe,{})(IAe);function OAe(e){const{insightsVideo:t,user:r,canDownload:i,generateVideoDownloadKey:a,studioLicenseType:s}=e,{Succeeded:o,Processing:l}=Kl,c=Object.assign({},t?.title_clip),h=t?.clips.slice(),[u,d]=y.useState(!1),[p,f]=y.useState(!1),[m,g]=y.useState(!1),[x,v]=y.useState(0),[b,j]=y.useState(!1),[w,S]=y.useState(!1),[_,C]=y.useState(!1),E="insightsvideos",P=t.engage_shared?.some(I=>I.is_enabled);Object.keys(c).length>0&&h.push(c),y.useEffect(()=>{const I=h.filter($=>$.is_renderable).length,D=h.map($=>$.clip_author_id),O=new Set(D).size!==1;v(I),j(O)},[x,h,b]);const T=()=>{d(!1),e.setDirty(!1)},N=I=>{I.preventDefault(),a(r.id,t.id).then(D=>{D.status===200&&C(!0)})}
129,k=n.jsxs("div",{className:"studio-title-container",children:[n.jsxs("div",{className:"studio-title-left",children:[n.jsx("div",{className:"title-group",children:n.jsxs("div",{className:"studio-title-edit",children:[n.jsxs("div",{id:"studio-title-name",children:[t.title,t.engage_shared?.length>0?n.jsx("div",{className:"card-shared-container",children:n.jsx("div",{className:`card-shared-pill ${P?"shared-live":"shared-off"}`,onClick:()=>g(!0),"diagnostic-id":"card-shared-pill",children:P?"Sharing: Live":"Sharing: Off"})}):n.jsx(n.Fragment,{})]}),n.jsxs("button",{className:"btn-primary-icon-text","diagnostic-id":"header-edit-btn",onClick:()=>d(!0),children:[n.jsx("i",{className:"material-icons",children:"edit"}),"Edit Video Title"]})]})}),n.jsxs("div",{id:"studio-title-tag",children:[n.jsx("span",{children:t.render_datetime&&t.render_datetime>t.update_datetime?"Last rendered ":"Last edited "}),n.jsx(gn,{local:!0,format:"MMM D, YYYY h:mma",children:t.render_datetime&&t.render_datetime>t.update_datetime?t.render_datetime:t.update_datetime})," ",new Date().toLocaleTimeString("en-us",{timeZoneName:"short"}).split(" ")[2]]})]}),n.jsxs("div",{className:"studio-title-right",children:[n.jsxs("div",{id:"studio-create","diagnostic-id":"studio-create",children:[i?t.rendered_video_url?n.jsx("button",{type:"button",className:"btn btn-primary video-download-btn btn-icon-text","diagnostic-id":"download-key-btn",onClick:N,children:n.jsxs(n.Fragment,{children:[n.jsx("i",{className:"material-icons-outlined",children:"file_download"}),s==="Compliance"?"Compliance":"Download"]})}):n.jsx(Ke,{title:"Create this insights video to download it",placement:"top",children:n.jsx("span",{children:n.jsxs("button",{type:"button",className:`btn btn-primary video-download-btn btn-icon-text${t.rendered_video_url?"":" empty"}`,"diagnostic-id":"disabled-video-download-btn",disabled:!t.rendered_video_url,children:[n.jsx("i",{className:"material-icons-outlined",children:"file_download"}),s==="Compliance"?"Compliance":"Download"]})})}):n.jsx(n.Fragment,{}),n.jsx("button",{className:"btn-primary-icon","diagnostic-id":"create-video-btn",onClick:()=>f(!0),disabled:t.clips.length===0||x!==h.length||t.render_status===o||t.render_status===l,children:n.jsxs("span",{className:"btn-icon-text",children:[n.jsx("i",{className:"material-icons",children:"movie"}),"Create Video"]})})]}),n.jsx("div",{id:"studio-title-clip-status",children:t.clips.length===0?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"material-icons clip-status-error-icon",children:"error"}),n.jsx("div",{className:"studio-title-clip-error-msg",children:"ADD A CLIP TO CREATE VIDEO"})]}):x===h.length?n.jsxs(n.Fragment,{children:[t.render_status===l?n.jsx("span",{className:"material-icons clip-status-ready-icon",children:"cached"}):n.jsx("span",{className:"material-icons clip-status-ready-icon",children:"check"}),n.jsx("div",{className:"studio-title-clip-ready-msg",children:t.render_status===l?"PROCESSING VIDEO":t.render_status===o?"VIDEO IS READY":"ALL CLIPS READY"})]}):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"material-icons clip-status-error-icon",children:"error"}),n.jsxs("div",{className:"studio-title-clip-error-msg ",children:[x,"/",h.length," CLIPS READY"]})]})})]})]});return n.jsxs(n.Fragment,{children:[p&&n.jsx(NAe,{createVideoModal:p,setCreateVideoModal:f,insightsVideoId:t.id,hasFeaturedAndCustom:b,insightsVideo:t}),n.jsxs("div",{className:"studio-header",children:[u&&n.jsx(kAe,{editModal:u,setEditModal:d,insightsVideoId:t.id,title:t.title,isDirty:e.isDirty,setDirty:e.setDirty,handleCancel:T,displayAuthorName:t.display_author_name}),m&&n.jsx(nl,{modal:m,setModal:g,contentShared:t.engage_shared,sharedType:E}),_&&n.jsx(RAe,{setDownloadModal:C,studioLicenseType:s}),k]})]})}const AAe=e=>({user:e.auth.user,canDownload:e.auth.user&&e.auth.user.company.studio_permissions.can_download,studioLicenseType:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.studio_permissions.name}),MAe=le(AAe,{setScrim:hn,generateVideoDownloadKey:Eje})(zt(OAe));function $Ae(e){const{insightsVideo:t,user:r}=e,{Succeeded:i,Processing:a}=Kl;Object.assign({},t?.intro_clip);const s=Object.assign({},t?.title_clip),o=t?.clips.slice(),[l,c]=y.useState(0);return Object.keys(s).length>0&&o.push(s),y.useEffect(()=>{const h=o.filter(u=>u.is_renderable).length;c(h)},[l,o]),n.jsx("div",{className:"insights-video-navigator-container",children:n.jsxs("div",{className:"navigator-wrapper",children:[n.jsx("div",{className:"navigator-header",children:"Insights Video Navigator"}),n.jsx("div",{id:"navigator-status",children:t.clips.length===0?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"material-icons clip-status-error-icon",children:"error"}),n.jsx("div",{className:"navigator-error-msg",children:"ADD A CLIP TO CREATE VIDEO"})]}):l===o.length?n.jsxs(n.Fragment,{children:[t.render_status===a?n.jsx("span",{className:"material-icons clip-status-ready-icon",children:"cached"}):n.jsx("span",{className:"material-icons clip-status-ready-icon",children:"check"}),n.jsx("div",{className:"navigator-ready-msg",children:t.render_status===a?"PROCESSING VIDEO":t.render_status===i?"VIDEO IS READY":"ALL CLIPS READY"})]}):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"material-icons clip-status-error-icon",children:"error"}),n.jsxs("div",{className:"navigator-error-msg ",children:[l,"/",o.length," CLIPS READY"]}
129)]})}),n.jsxs("div",{className:"navigator-clips-grp",children:[t.intro_clip&&n.jsx("div",{className:"insights-video-clip intro-clip",children:n.jsx("a",{href:"#intro-clip",onClick:h=>{h.preventDefault(),document.querySelector("#intro-clip").scrollIntoView({behavior:"smooth"})},children:"Intro Clip"})}),t.title_clip&&n.jsxs("div",{className:"insights-video-clip truncate",children:[t.title_clip.is_renderable?n.jsx("span",{className:"material-icons clip-status-ready-icon",children:"check"}):n.jsx("span",{className:"material-icons clip-status-error-icon",children:"error"}),n.jsxs("a",{href:"#title-clip",onClick:h=>{h.preventDefault(),document.querySelector("#title-clip").scrollIntoView({behavior:"smooth"})},children:["Title: ",t.title]})]}),t.clips.map((h,u)=>n.jsxs("div",{className:"insights-video-clip truncate","diagnostic-id":"insights-video-clip-navigator",children:[h.is_renderable?n.jsx("span",{className:"material-icons clip-status-ready-icon",children:"check"}):n.jsx("span",{className:"material-icons clip-status-error-icon",children:"error"}),n.jsx("a",{href:`#clip-${h.id}`,onClick:d=>{d.preventDefault(),document.querySelector(`#clip-${h.id}`).scrollIntoView({behavior:"smooth"})},children:h.type==="chart-video"?`Chart: ${h?.chart_snapshot?.chart_info?.name}`:"Video-Only Clip"})]},u)),t.disclosures_text&&n.jsx("div",{className:"insights-video-clip disclosures-clip",children:n.jsx("a",{href:"#disclosures-clip",onClick:h=>{h.preventDefault(),document.querySelector("#disclosures-clip").scrollIntoView({behavior:"smooth"})},children:"Disclosures"})})]})]})})}const LAe=e=>({user:e.auth.user}),FAe=le(LAe,{})($Ae);function UAe(e){const{insightsVideo:t,userId:r,toggleSharedItemStatus:i,userSharedContent:a,numSharedInsightsVideos:s,engagePermissions:o,createNewSharedContent:l,getInsightsVideo:c,getSharedContent:h}=e,u=oa(),d="hosted",p="embed",{insightsVideoType:f}=Ei,{ReRenderNeeded:m}=Kl,g=t.engage_shared,[x,v]=y.useState(!1),[b,j]=y.useState(!1),w=o.max_engage_insightsvideos,S=a?.filter(T=>T.id===g[0]?.id&&T.type===f)[0],[_,C]=y.useState(S?.is_enabled);y.useEffect(()=>{g?.length===1&&h(r)},[g?.length]),y.useEffect(()=>{C(S?.is_enabled)},[g?.length,S?.is_enabled]);const E=T=>{T.stopPropagation(),T.preventDefault(),_?j(!0):s>=w?v(!0):i(r,S,S.type).then(N=>{N.status===200&&C(!_)}).then(()=>{c(t.id,r)})},P=T=>{T.preventDefault(),l(r,t.id,f).then(N=>{N&&c(t.id,r)})};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:`insights-video-preview-container${g?.length>0?" engage-shared":""}`,children:[n.jsxs("div",{className:"insights-video-preview-header","diagnostic-id":"insights-video-preview-header",children:[n.jsxs("h4",{children:[n.jsx("i",{className:"material-icons",children:"screen_share"}),"Preview and Share With Engage"]}),g?.length===1?n.jsxs("div",{className:"onoffswitch",onClick:E,children:[n.jsx("input",{type:"checkbox",id:"embed-insights-video",className:"onoffswitch-checkbox",name:"embed-insights-video",onChange:()=>C(!_),checked:!!S?.is_enabled}),n.jsxs("label",{className:"onoffswitch-label",htmlFor:"embed-insights-video","diagnostic-id":"embed-form-toggle",children:[n.jsx("span",{className:"onoffswitch-inner"}),n.jsx("span",{className:"onoffswitch-switch"})]})]}):g?.length===0?n.jsx("div",{className:"insights-video-preview-btn-group",children:n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"insights-video-create-btn",onClick:P,children:"Share with Engage"})}):n.jsx(n.Fragment,{})]}),n.jsxs("div",{className:"rendered-insights-video-container",children:[t.render_status===m&&n.jsxs("div",{className:"rerender-needed-warning-message","diagnostic-id":"rerender-needed-warning-message",children:[n.jsx("i",{className:"material-icons",children:"error"}),n.jsx("div",{className:"banner-text","diagnostic-id":"banner-text",children:"Changes have been made since the last video creation. Click “Create Video” to recreate your insights video with the latest changes."})]}),n.jsx("video",{onContextMenu:T=>T.preventDefault(),className:"rendered-insights-video",src:`${t.rendered_video_url}/?time=${Date.now()}`,controls:!0,disablePictureInPicture:!0,controlsList:"nodownload",poster:t.video_thumbnail&&`${t.video_thumbnail}/?time=${Date.now()}`})]}),g?.length===0||!g?n.jsx(n.Fragment,{}):n.jsx("div",{className:"insights-video-preview-links-wrapper",children:g?.length>1?n.jsx("div",{className:"insights-video-preview-links",children:n.jsxs("div",{className:"preview-link-section",children:[n.jsx("h4",{children:"Associated Shared Content"}),n.jsx("p",{className:"subheader",children:"Click a title to open that shared content’s settings:"}),g.map((T,N)=>n.jsx("ul",{onClick:()=>u.push(`/engage/${f}s/${T.id}`),className:"associated-content-title",children:n.jsx("li",{children:n.jsx("div",{className:"shared-content-link","diagnostic-id":`shared-content-link-${N}`,children:T.title})})},N))]})}):n.jsxs("div",{className:"insights-video-preview-links",children:[n.jsxs("div",{className:"preview-link-section",children:[n.jsx("h4",{children:"Share this link with clients"}),n.jsxs("p",{className:"subheader",children:["Share this link to a Clearnomics-hosted page with your insights video. Customize the look of your hosted pages under"," ",n.jsx(Ze,{"diagnostic-id":"engage-settings-link",to:{pathname:"/insights",search:"?view=engagesettings"},children:"Engage Settings."})]}),n.jsx("div",{className:"content-link-group",children:n.jsx(Gs,{snippet:g[0]?.engage_key.hosted_url,embedType:d,isActive:_})})]}),n.jsxs("div",{className:"preview-link-section",children:[n.jsx("h4",{children:"Embed on your website using HTML"}),n.jsx("p",{className:"subheader",children:"Copy and paste this code snippet into your website. Recommended for advanced users only."}),n.jsx("div",{className:"content-link-group",children:n.jsx(Gs,{snippet:g[0]?.engage_key.embed_code_snippet,embedType:p,isActive:_})})]})]})})]}),b&&n.jsx(mm,{toggleModal:b,setToggleModal:j,setIsActive:C,isActive:_,sharedContent:S,isEngageWidget:!0}),x&&n.jsx(gm,{maxSharedModal:x,setMaxedModal:v,sharedContentType:f})]})}const BAe=e=>({userId:e.auth.user&&e.auth.user.id,userSharedContent:e.engage&&e.engage.userSharedContent,numSharedInsightsVideos:e.engage&&e.engage.numSharedInsightsVideos,engagePermissions:e.auth.user&&e.auth.user.company&&e.auth.user.company.engage_permissions}),qAe=le(BAe,{toggleSharedItemStatus:ac,createNewSharedContent:l0,getInsightsVideo:_0,getSharedContent:ic})(UAe);function VAe({dirty:e,isDirty:t,setDirty:r}){return y.useEffect(()=>{e!==t&&r(e)},[e]),null}function zAe(e){const{setModal:t,titleClip:r,index:i,clips:a,saveInsightsVideoClip:s,insightsVideoId:o,userId:l,isDirty:c,setDirty:h,deleteInsightsVideoClipRecording:u,modal:d,studioPermissions:p,setModalStatus:f,setCameraPositionPreference:m,cameraPosition:g,setClipEditorLayout:x,editorLayout:v,setDevicePreference:b}=e,{Firefox:j,Safari:w}=Aj,{Windows:S}=Mj,[_,C]=y.useState(Ys());y.useEffect(()=>{f(!0),document.body.style.position="fixed",document.body.style.top=`-${_}px`,document.body.style.width="100%";const ce=document.querySelector(".nav-wrapper");ce.style.paddingLeft="10px",ce.style.paddingRight="10px"},[]);const E=p?.insights_video_clip_overtime_seconds,P=p?.max_insights_video_clip_duration_seconds,T=yo(P+E),N=`${T.minutes}:${T.seconds}`,k=yo(P),I=`${k.minutes}:${k.seconds}`,D=5e3,O=Date.now(),$=i===a.length?i-1:i,U=a[$]?a[$]:r;let B="",L="";switch(U?.type){case"title":B=r.title_slide_image_jpg_url,L="Title Clip";break;case"chart-video":L="Chart Clip",B=U?.chart_snapshot.chart_snapshot_image_jpg_url;break;case"video-only":L="Video-Only Clip";break}const A=y.useRef(null),R=y.useRef(null),[F,q]=y.useState(0),[V,X]=y.useState(!1),[M,W]=y.useState(0),[K,z]=y.useState(""),[Y,ie]=y.useState(""),[ne,ve]=y.useState(null),[pe,be]=y.useState(!1),[ye,ke]=y.useState(!1),[fe,se]=y.useState(U.type==="video-only"?"":U?.clip_video_url||!g?U.camera_location:g),[ge,De]=y.useState(!1),[ae,Q]=y.useState(null),[ee,oe]=y.useState(null),[Pe,Fe]=y.useState([]),[Ie,Re]=y.useState(e.audio
129InputDeviceId||""),[Ve,Xe]=y.useState(e.audioOutputDeviceId||""),[et,rt]=y.useState(e.videoInputDeviceId||""),[bt,Qe]=y.useState(""),[tt,We]=y.useState(""),[pt,Et]=y.useState(""),Ot=y.useRef(null),[kt,Pt]=y.useState(!1),[Ut,Nn]=y.useState(!1),[$t,pn]=y.useState(null),[nn,Rn]=y.useState([]),[fn,ht]=y.useState(null),[jt,sn]=y.useState(0),[rn,yt]=y.useState(!1),[Wt,Lt]=y.useState("audio/webm"),[qr,Gn]=y.useState(null),[Mr,ai]=y.useState(!1),[tr,sr]=y.useState(!1),[Vr,En]=y.useState(!1),[Hi,Gi]=y.useState(!1),{videoWebm:zr,videoMP4:pr,audioMP4:Wi,audioWebm:or,none:Ri}=nV;y.useEffect(()=>{!v&&x("side-by-side")},[]);const Ya=ce=>{Gi(!0)},si=ce=>{Gi(!1)};y.useEffect(()=>{if(!A.current)return;const ce=()=>{ai(!1),En(!0)},G=()=>{Vr&&En(!1),ai(!0)},re=()=>{ai(!1),En(!1)},H=A.current;return H.addEventListener("waiting",ce),H.addEventListener("play",G),H.addEventListener("playing",G),H.addEventListener("pause",re),()=>{H.removeEventListener("waiting",ce),H.removeEventListener("play",G),H.removeEventListener("playing",G),H.removeEventListener("pause",re)}},[A.current]);const ua=()=>{A.current&&(Mr?A.current.pause():A.current.paused&&!Mr?A.current.play():Vr&&A.current.load())},ha=ce=>{ce.stopPropagation(),ce.preventDefault(),A.current.pause();const G=U.clip_video_url?U.duration:F,re=Number(ce.target.value);if(re<0||re>100)return;const H=G/100*re,je=A.current.seekable,_e=[];for(let xe=0;xe<je.length;xe++)_e.push([je.start(xe),je.end(xe)]);je.start(0);const we=je.end(0);H>we?A.current.currentTime=we:A.current.currentTime=H,Yi(Math.ceil(H)),sn(re)},fr=ce=>{A.current.paused&&!Mr&&A.current.play()},Ka=ce=>{En(!1);const G=U.clip_video_url?U.duration:F,re=yo(Math.ceil(G));ie(`${re.minutes}:${re.seconds}`),Yi(Math.ceil(A.current?.currentTime));const H=A.current?.currentTime/G*100;G>0&&sn(H)},Oi=()=>{const ce=Math.ceil(U.clip_video_url?U.duration:F),G=yo(ce);ie(`${G.minutes}:${G.seconds}`)},Yi=ce=>{const G=yo(ce);z(`${G.minutes}:${G.seconds}`)};y.useEffect(()=>{(fn||U.clip_video_url)&&Yi(0)},[fn,U.clip_video_url]),y.useEffect(()=>{if(Ut&&!V){const ce=setInterval(()=>{q((Date.now()-ne)/1e3)},1e3);return()=>{clearInterval(ce)}}},[Ut,V]),y.useEffect(()=>{Yi(F)},[F]),y.useEffect(()=>{Ot.current=null,Nn(!1),Rn([]),ht(null),pe?MediaRecorder.isTypeSupported(pr)?Lt(pr):MediaRecorder.isTypeSupported(zr)?Lt(zr):Lt(Ri):MediaRecorder.isTypeSupported(Wi)?Lt(Wi):MediaRecorder.isTypeSupported(or)?Lt(or):Lt(Ri)},[pe,ye]);const _a=ce=>{se(ce.target.value),m(ce.target.value)},Xr=ce=>{const G=ce.target.value,re=ee.find(H=>H.label===G);Et(re.label),rt(re.deviceId),b(re.deviceId,"videoinput")},Ai=ce=>{const G=ce.target.value,re=ae.find(H=>H.label===G);Qe(re.label),Re(re.deviceId),b(re.deviceId,"audioinput")},Xa=ce=>{const G=ce.target.value,re=Pe.find(H=>H.label===G);We(re.label),Xe(re.deviceId),b(re.deviceId,"audiooutput")};y.useEffect(()=>{if(ae){const ce=ae.filter(G=>G.deviceId===e.audioInputDeviceId)[0]?.label;Qe(ce||"")}},[ae]),y.useEffect(()=>{if(Pe){const ce=Pe.filter(G=>G.deviceId===e.audioOutputDeviceId)[0]?.label;We(ce||"")}},[Pe]),y.useEffect(()=>{if(ee){const ce=ee.filter(G=>G.deviceId===e.videoInputDeviceId)[0]?.label;Et(ce||"")}},[ee]);const pi=async ce=>{const G=await navigator.mediaDevices.enumerateDevices();if(ce==="audiooutput"){const H=G.filter(_e=>_e.kind===ce);Fe(H);const je=H.filter(_e=>_e.deviceId===Ve);je.length>0?Xe(je[0].deviceId):Xe(H[0].deviceId)}const re=G.filter(H=>H.kind===ce&&H.deviceId!=="default");return ce==="audioinput"?Q(re):ce==="videoinput"&&oe(re),re};y.useEffect(()=>{$t&&(pi("audioinput"),pi("videoinput"))},[$t]),y.useEffect(()=>{(U?.clip_video_url||fn)&&Sl().name!==w&&navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(ce=>{pi("audiooutput").then(()=>{ce.getTracks().forEach(G=>G.stop())})}).catch(ce=>{})},[U?.clip_video_url,fn]),y.useEffect(()=>{Sl().name!==w&&(U?.clip_video_url||fn)&&A.current?.setSinkId(Ve)},[Ve,U?.clip_video_url,fn]);const Er=async()=>{if($t&&$t.getTracks().forEach(ce=>ce.stop()),"MediaRecorder"in window)try{let ce="";if(pe){const we=await pi("videoinput");if(we.length>0){const xe=we.filter(Ce=>Ce.deviceId===et);xe.length>0?ce=xe[0].deviceId:ce=we[0].deviceId}}let G="";if(pe||ye){const we=await pi("audioinput");if(we.length>0){const xe=we.filter(Ce=>Ce.deviceId===Ie);xe.length>0?G=xe[0].deviceId:G=we[0].deviceId}}const je={audio:{deviceId:G,autoGainControl:!0,sampleRate:48e3,suppressLocalAudioPlayback:!1,noiseSuppression:!0,echoCancellation:!0,channelCount:2},video:pe?{width:1920,height:1080,frameRate:30,deviceId:ce}:!1},_e=await navigator.mediaDevices.getUserMedia(je);Pt(!0),pn(_e)}catch(ce){ce.message==="Permission denied"&&alert("Please go to your settings and allow permissions for your camera and microphone.")}else alert("Microphone or camera access is not supported by your browser.")};y.useEffect(()=>{U?.type==="video-only"&&(U?.clip_video_url?be(!1):be(!0))},[U?.clip_video_url]),y.useEffect(()=>{(pe||ye||ge)&&!rn&&!fn?navigator.mediaDevices.getUserMedia({audio:!0,video:!0}).then(ce=>
129{ce.getTracks().forEach(G=>G.stop()),Er()}).catch(ce=>{}):$t&&$t.getTracks().forEach(ce=>ce.stop())},[rn,ge,pe,ye,Ie,et,fn]);const Ca=async()=>{try{q(0);let ce=3;W(ce),X(!0),Nn(!0),R.current=setInterval(()=>{if(ce-=1,W(ce),ce<=0&&(clearInterval(R.current),X(!1),$t)){const G={videoBitsPerSecond:U?.type==="video-only"?8e6:5e6,audioBitsPerSecond:192e3,mimeType:Wt};Ot.current=new MediaRecorder($t,G),Ot.current.start(),ve(Date.now());const re=[];Ot.current.ondataavailable=H=>{typeof H.data>"u"||H?.data?.size!==0&&re.push(H.data)},Rn(re)}},1e3)}catch(ce){Nn(!1),alert(`An error occured while trying to record: ${ce}`)}},Qa=ce=>{const G=ce;return G.lastModifiedDate=new Date,ce},Na=async()=>{Nn(!1),Pt(!1),clearInterval(R.current),$t&&$t.getTracks().forEach(ce=>{ce.stop()}),Ot.current&&(Ot.current.stop(),Ot.current.onstop=()=>{const ce=new Blob(nn,{type:Wt}),G=URL.createObjectURL(ce),re=Qa(ce);Gn(re),ht(G),Rn([])})};y.useEffect(()=>{K>=N&&Na()},[K]);const Mi=()=>{sn(0),ht(null),Gn(null),U.clip_video_url?u(U?.type==="chart-video"||U?.type==="video-only"?U?.id:r.id,l,o,rn).then(ce=>{yt(!1)}):yt(!1),ie(""),Pt(!0)},pa=y.useMemo(()=>n.jsx("video",{className:`mirror ${fe&&fe}${U?.type==="video-only"?"video-only":""}`,ref:ce=>{ce&&(ce.srcObject=$t)},autoPlay:!0,playsInline:!0,"webkit-playsinline":"true",muted:!0,onContextMenu:ce=>ce.preventDefault()}),[$t,fe,i]),Le=ce=>{ce.preventDefault(),!c&&(!fn||U.clip_video_url)?($t&&$t.getTracks().forEach(re=>re.stop()),t(!1),f(!1)):window.confirm("You have unsaved changes. Are you sure you want to leave?")&&(h(!1),t(!1),f(!1),$t&&$t.getTracks().forEach(re=>re.stop()))};return n.jsx(gt,{initialValues:{videoScript:U?.script_text||"",cameraPosition:U?.type!=="video-only"?U?.camera_location:""},onSubmit:(ce,{setSubmitting:G})=>{sr(!0),s(o,l,U?.type==="chart-video"||U?.type==="video-only"?U?.id:r.id,qr,fe,pe||U?.is_camera_on,ce.videoScript).then(()=>{sr(!1),G(!1)})},validationSchema:_t().shape({videoScript:Ae().max(D)}),enableReinitialize:!0,children:ce=>{const{values:G,touched:re,errors:H,setFieldError:je,setFieldValue:_e,dirty:we,isSubmitting:xe}=ce;return n.jsx(ot,{setModal:t,disableClickOutsideCancel:!0,children:n.jsx("div",{className:`clip-editor-modal-container ${v}`,children:n.jsxs(vt,{onClick:Ce=>Ce.stopPropagation(),children:[n.jsx(VAe,{dirty:we,isDirty:c,setDirty:h}),n.jsxs("div",{className:"clip-editor-header-grp",children:[n.jsx("h6",{className:"clip-type-header",children:L}),n.jsxs("div",{className:"clip-header-icons",children:[n.jsx(Ke,{title:"Side by side",placement:"bottom",children:n.jsx("i",{className:`material-icons${v==="side-by-side"?" active":""}`,onClick:()=>x("side-by-side"),children:"view_array"})}),n.jsx(Ke,{title:"Centered script",placement:"bottom",children:n.jsx("i",{className:`material-icons${v==="stacked"?" active":""}`,onClick:()=>x("stacked"),children:"view_compact"})})]}),n.jsx("div",{className:"clip-editor-save-grp",children:n.jsxs("div",{className:"button-group",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"clip-editor-cancel-btn",onClick:Le,children:"CLOSE"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"clip-editor-save-btn",disabled:(U.clip_video_url||!fn)&&!we&&fe===G.cameraPosition||Ut||Mr||xe,children:"SAVE CLIP"})]})})]}),n.jsxs("div",{className:`row fadeTransition clip-editor-grp ${v}`,children:[n.jsx("div",{className:"clip-editor-controls",children:n.jsx("div",{className:"clip-editor-left",children:n.jsx("div",{className:"clip-record-btns-container",children:(fn||U.clip_video_url)&&!rn&&!tr?n.jsxs(n.Fragment,{children:[n.jsx("h5",{className:"clip-record-header",children:n.jsxs("div",{className:"clip-record-header-icon-text",children:[n.jsx("i",{className:"material-icons",children:"ondemand_video"}),"Play Clip"]})}),n.jsx("div",{className:"media-record-section",children:n.jsxs("button",{type:"button",className:"btn-primary btn-icon-text record-again-btn","diagnostic-id":"record-again-btn",onClick:()=>{yt(!0)},children:[n.jsx("i",{className:"material-icons",children:"settings_backup_restore"}),"Record again"]})}),n.jsx("div",{className:"media-record-section",children:n.jsxs("div",{className:"custom-video-playback-container",children:[n.jsxs("div",{className:"custom-video-playback-btn-bar",children:[n.jsx("button",{onClick:ua,className:"toggle-play-btn","diagnostic-id":"toggle-play-btn",type:"button",children:Mr?n.jsx("i",{className:"material-icons pause-icon",children:"pause"}):n.jsx("i",{className:"material-icons play-icon",children:"play_arrow"})}),n.jsx("input",{className:"playback-progress-bar",type:"range",min:"0",max:"100",value:jt||0,onInput:Ce=>ha(Ce),onPointerUp:fr})]}),n.jsxs("div",{className:"time-elapsed-duration",children:[K,"/",Y]})]})}),(U.is_camera_on||pe)&&U.type!=="video-only"&&n.jsx("div",{className:"media-record-section",children:n.jsxs("div",{className:"camera-position-container",children:[n.jsx("div",{className:"camera-position-header",children:"Camera Position"}),n.jsx("div",{className:"form-group",children:n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{as:"select",name:"cameraPosition",onChange:_a,value:fe,"diagnostic-id":"camera-position-dropdown",children:[n.jsx("option",{value:"bottom-left",children:"Bottom left"}),n.jsx("option",{value:"bottom-right",children:"Bottom right"}),n.jsx("option",{value:"top-left",children:"Top left"}),n.jsx("option",{value:"top-right",children:"Top right"})]}),n.jsx(dt,{icon:Mt})]})})]})}),n.jsx("div",{className:"media-record-section",children:n.jsxs("div",{className:"audio-output-container",children:[n.jsx("div",{className:"audio-output-header",children:"Audio Output"}),n.jsx("div",{className:"form-group",children:n.jsxs("div",{className:"dropdown-container",children:[n.jsx(me,{as:"select",name:"audioOutput",onChange:Xa,value:tt,children:Sl().name===w||$j()===S&&Sl().name===j||Pe.length===0?n.jsx("option",{children:"Default"}):Pe.map((Ce,Oe)=>n.jsx("option",{value:Ce.label,children:Ce.label},Oe))}),n.jsx(dt,{icon:Mt})]})})]})})]}):rn?n.jsxs(n.Fragment,{children:[n.jsx("h5",{className:"clip-record-header",children:"This will delete your existing video. Do you want to proceed?"}),n.jsxs("div",{className:"delete-recording-button-group",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"delete-recording-cancel-btn",onClick:()=>{yt(!1)},children:"CANCEL"}),n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"delete-recording-btn",onClick:Mi,children:"Delete Recording"})]})]}):Ut?n.jsxs(n.Fragment,{children:[n.jsx("h5",{className:"clip-record-header",children:n.jsxs("div",{className:"clip-record-header-icon-text recording",children:[n.jsx("i",{className:"material-icons",children:"fiber_manual_record"}),"Recording..."]})}),n.jsx("div",{className:"media-record-section",children:n.jsxs("button",{type:"button",className:"btn-record-lg btn-icon-text",onClick:Na,disabled:F<2,"diagnostic-id":"stop-recording-btn",children:[n.jsx("i",{className:"material-icons",children:"stop"}),"STOP RECORDING"]})}),n.jsx("div",{className:"media-record-section",children:n.jsxs("div",{className:`recording-time-container${K>
129I?" overtime":""}`,children:[n.jsx("div",{className:"recording-time-header",children:"Recording Time"}),n.jsxs("div",{className:"recording-time-grp",children:[n.jsx("h3",{className:"recording-counter",children:K}),n.jsx("h4",{children:"/"}),n.jsx("div",{className:"recording-limit",children:I})]})]})})]}):tr?n.jsxs(n.Fragment,{children:[n.jsx("h5",{className:"clip-record-header",children:n.jsxs("div",{className:"clip-record-header-icon-text",children:[n.jsx("i",{className:"material-icons spinner-icon",children:"cached"}),"Processing Recording..."]})}),n.jsx("div",{className:"media-record-section",children:n.jsx("h5",{className:"clip-record-header",children:"Your recording is being processed. Please do not close this window."})})]}):n.jsxs(n.Fragment,{children:[n.jsxs("h5",{className:"clip-record-header",children:[n.jsxs("div",{className:"clip-record-header-icon-text",children:[n.jsx("i",{className:"material-icons",children:"record_voice_over"}),pe?"Record Video":ye?"Record Audio":"Audio and Video"]}),U.type!=="video-only"&&(pe||ye)&&n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"back-to-record-options-btn",onClick:()=>{pe?be(!1):ke(!1),De(!1)},children:"Back"})]}),pe?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"media-record-section",children:n.jsx("button",{type:"button",className:"btn-record-lg btn-icon-text",onClick:Ca,disabled:!$t?.active,"diagnostic-id":"start-recording-btn",children:$t?.active?n.jsxs(n.Fragment,{children:[n.jsx("i",{className:"material-icons",children:"fiber_manual_record"}),"START RECORDING"]}):n.jsx(n.Fragment,{children:ee?ee?.length>=1&&!ae?n.jsx("div",{children:"MISSING DEVICES"}):n.jsxs(n.Fragment,{children:[n.jsx("div",{id:"spinner-icon-container",children:n.jsx(ur,{size:"1.25em",thickness:8,variant:"indeterminate"})}),"Camera Loading"]}):n.jsx("div",{children:"NO CAMERA"})})})}),U.type!=="video-only"&&n.jsx("div",{className:"media-record-section",children:n.jsxs("div",{className:"camera-position-container",children:[n.jsx("div",{className:"camera-position-header",children:"Camera Position"}),n.jsx("div",{className:"form-group",children:n.jsxs("div",{className:"dropdown-container",children:[n.jsxs(me,{as:"select",name:"cameraPosition",onChange:_a,value:fe,"diagnostic-id":"pre-record-camera-position-dropdown",children:[n.jsx("option",{value:"bottom-left",children:"Bottom left"}),n.jsx("option",{value:"bottom-right",children:"Bottom right"}),n.jsx("option",{value:"top-left",children:"Top left"}),n.jsx("option",{value:"top-right",children:"Top right"})]}),n.jsx(dt,{icon:Mt})]})})]})}),n.jsx("div",{className:"media-record-section",children:n.jsxs("div",{className:"video-input-container",children:[n.jsx("div",{className:"video-input-header",children:"Camera"}),n.jsx("div",{className:"form-group",children:n.jsxs("div",{className:"dropdown-container",children:[n.jsx(me,{as:"select",name:"videoInput",onChange:Xr,value:pt,children:ee?ee.map((Ce,Oe)=>n.jsx("option",{value:Ce.label,children:Ce.label},Oe)):n.jsx("option",{children:"No camera detected"})}),n.jsx(dt,{icon:Mt})]})})]})}),n.jsx("div",{className:"media-record-section",children:n.jsxs("div",{className:"audio-input-container",children:[n.jsx("div",{className:"audio-input-header",children:"Microphone"}),n.jsx("div",{className:"form-group",children:n.jsxs("div",{className:"dropdown-container",children:[n.jsx(me,{as:"select",name:"audioInput",onChange:Ai,value:bt,children:ae?ae.map((Ce,Oe)=>n.jsx("option",{value:Ce.label,children:Ce.label},Oe)):n.jsx("option",{children:"No microphone detected"})}),n.jsx(dt,{icon:Mt})]})})]})})]}):ye?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"media-record-section",children:n.jsx("button",{type:"button",className:"btn-record-lg btn-icon-text",onClick:Ca,disabled:!kt||!$t?.active,"diagnostic-id":"start-recording-btn",children:$t?.active?n.jsxs(n.Fragment,{children:[n.jsx("i",{className:"material-icons",children:"fiber_manual_record"}),"START RECORDING"]}):n.jsx(n.Fragment,{children:ae?n.jsxs(n.Fragment,{children:[n.jsx("div",{id:"spinner-icon-container",children:n.jsx(ur,{size:"1.25em",thickness:8,variant:"indeterminate"})}),"Microphone Loading"]}):n.jsx("div",{children:"NO MICROPHONE"})})})}),n.jsx("div",{className:"media-record-section",children:n.jsxs("div",{className:"audio-input-container",children:[n.jsx("div",{className:"audio-input-header",children:"Microphone"}),n.jsx("div",{className:"form-group",children:n.jsxs("div",{className:"dropdown-container",children:[n.jsx(me,{as:"select",name:"audioInput",onChange:Ai,value:bt,children:ae?ae.map((Ce,Oe)=>n.jsx("option",{value:Ce.label,children:Ce.label},Oe)):n.jsx("option",{children:"No microphone detected"})}),n.jsx(dt,{icon:Mt})]})})]})})]}):n.jsxs("div",{className:"record-button-group",children:[n.jsxs("button",{type:"button",className:"btn-primary-lg btn-icon-text","diagnostic-id":"clip-editor-record-video-btn",onClick:()=>{be(!0),De(!0)},children:[n.jsx("i",{className:"material-icons",children:"videocam"}),"RECORD VIDEO"]}),n.jsxs("button",{type:"button",className:"btn-primary-lg btn-icon-text","diagnostic-id":"clip-editor-record-audio-btn",onClick:()=>{ke(!0),De(!0)},children:[n.jsx("i",{className:"material-icons",children:"music_note"}),"RECORD AUDIO ONLY"]})]})]})})})}),n.jsxs("div",{className:"video-and-script-grp",children:[n.jsxs("div",{className:"video-context-container",children:[Y>I&&n.jsx("div",{className:"overtime-banner-container",children:n.jsxs("div",{className:"banner-text","diagnostic-id":"banner-text",children:["This clip is longer than the maximum recording length. Your recorded clip is below, but clips should be limited to ",P/60," ","minutes long."]})}),n.jsxs("div",{className:`video-container${Ut&&ye?" recording-audio":Ut?" recording":""} ${U.type}`,children:[tr&&n.jsx("div",{className:"save-clip-spinner-container",children:n.jsx(ur,{size:"8em",thickness:1,variant:"indeterminate",className:"save-clip-spinner"})}),(pe||ye)&&n.jsxs("div",{className:"no-devices-banner-container",children:[ee?.length===0&&n.jsx("div",{className:"no-devices-banner",children:n.jsx("div",{className:"banner-text","diagnostic-id":"no-camera-banner-text",children:"No camera is detected. Please connect a camera and reload this page."})}),ae?.length===0&&n.jsx("div",{className:"no-devices-banner",children:n.jsx("div",{className:"banner-text","diagnostic-id":"no-microphone-banner-text",children:"No microphone is detected. Please connect a microphone and reload this page."})})]}),Ut&&K>I&&n.jsx("div",{className:"overtime-alert-container",children:n.jsxs("div",{className:"overtime-alert-overlay",children:[n.jsx("div",{className:"overtime-alert-scrim"}),n.jsx("div",{className:"overtime-alert-msg",children:"OVERTIME"})]})}),(fn||U.clip_video_url)&&n.jsx("div",{className:"toggle-play-btn-container",children:n.jsx("button",{onClick:ua,className:"toggle-play-btn","diagnostic-id":"big-toggle-play-btn",type:"button",children:Mr?n.jsx("i",{className:"material-icons pause-icon",children:"pause"}):n.jsx("i",{className:"material-icons play-icon",children:"play_arrow"})})}),U?.type!=="video-only"&&n.jsx("img",{className:`clip-playback${U?.type==="title"?" title-clip-img":""}`,src:B,alt:""}),V&&Ut&&n.jsx("div",{className:"recording-countdown-container",children:n.jsx("div",{className:"recording-countdown",children:M})}),kt&&pe&&$t&&!U.clip_video_url?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`live-video-player${Ut?" recording":""} ${U?.type}`,id:"video-player",children:pa}),n.jsx("div",{className:"live-video-player-placeholder"})]}):null,fn||U.clip_video_url?n.jsx("div",{className:`video-player ${U?.type}`,id:"video-player",children:n.jsx("video",{onSeeking:Ya,onSeeked:si,onContextMenu:Ce=>Ce.preventDefault(),ref:A,className:`un-mirror ${fe&&fe}${U?.type==="video-only"?"video-only":""}`,src:U.clip_video_url?U.clip_video_url:fn,poster:U.thumbnail_image_jpg_url&&`${U.thumbnail_image_jpg_url}/?time=${O}`,controlsList:"nodownload nofullscreen",disablePictureInPicture:!0,"webkit-playsinline":"true",playsInl
129ine:!0,onLoadedMetadata:Oi,onTimeUpdate:Ka})}):null]})]}),n.jsx("div",{className:"clip-editor-right",children:n.jsxs("div",{className:"video-script-section",children:[n.jsxs("div",{className:"video-script-title-grp",children:[n.jsxs("h5",{children:[n.jsx("i",{className:"material-icons-outlined",children:"speaker_notes"}),"Video Script"]}),n.jsxs("div",{className:"character-count",children:[D-G.videoScript.length," ","characters left"]})]}),n.jsx(me,{component:"textarea",id:"videoScript","diagnostic-id":"video-script-input",placeholder:"Add a script for this clip...",name:"videoScript",maxLength:D,className:H.videoScript&&re.videoScript?"text-input error":""}),H.videoScript&&re.videoScript&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:H.videoScript})]})})]})]})]})})})}})}const HAe=e=>({userId:e.auth.user&&e.auth.user.id,clips:e.studio&&e.studio.insightsVideo&&e.studio.insightsVideo.clips,titleClip:e.studio&&e.studio.insightsVideo&&e.studio.insightsVideo.title_clip,insightsVideoId:e.studio.insightsVideo&&e.studio.insightsVideo.id,studioPermissions:e.auth.user&&e.auth.user.company&&e.auth.user.company.studio_permissions,cameraPosition:e.studio&&e.studio.cameraPosition,editorLayout:e.studio&&e.studio.editorLayout,audioInputDeviceId:e.studio&&e.studio.audioInputDeviceId,audioOutputDeviceId:e.studio&&e.studio.audioOutputDeviceId,videoInputDeviceId:e.studio&&e.studio.videoInputDeviceId}),Fo=le(HAe,{saveInsightsVideoClip:wje,deleteInsightsVideoClipRecording:gje,setModalStatus:Iu,setCameraPositionPreference:Tje,setClipEditorLayout:kje,setDevicePreference:Pje})(zt(zAe));function GAe(e){const{isDirty:t,setStep:r,selectedChartId:i,addInsightsVideoClip:a,userId:s,insightsVideoId:o,index:l}=e,[c,h]=y.useState(!1),u=async d=>{h(!0),await a(s,o,"chart-video",i,l||void 0)&&(h(!1),r(1))};return n.jsx("div",{className:"chart-save-grp",children:n.jsx("div",{className:"form-group",children:n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"library-save-btn",disabled:!t||c,onClick:u,children:"CREATE CLIP"})})})}const WAe=e=>({isDirty:e.studio.isDirty,userId:e.auth.user&&e.auth.user.id,selectedChartId:e.studio&&e.studio.insightsVideo&&e.studio.insightsVideo.selectedChartId,insightsVideoId:e.studio.insightsVideo&&e.studio.insightsVideo.id}),YAe=Jt(le(WAe,{addInsightsVideoClip:hm})(GAe));function KAe(e){const{index:t,chart:r,isSelected:i,selectChart:a,deselectChart:s,chartIndex:o}=e,l=r.chart_info,c=()=>{i?s():a()},h=i?"selected":"",u=r.is_locked!==!1;return n.jsx("div",{className:`chart-library-modal-chart${r.aspect_ratio==="16:9"?" size-aspect-16-9":""} fadeTransition`,children:n.jsx("div",{id:`${r.id}`,children:n.jsxs("div",{className:"chart-card","diagnostic-id":"chart-card",children:[i?n.jsx("div",{className:"checkmark","diagnostic-id":"checkmark",children:n.jsx("i",{className:"material-icons",children:"done"})}):u?n.jsx("div",{className:"locked-card",children:n.jsx("i",{className:"material-icons","diagnostic-id":"material-lock-icon",children:"lock"})}):n.jsx(n.Fragment,{}),n.jsxs("div",{className:"chart-card-btn-primary",onClick:!i&&u?void 0:c,children:[n.jsxs("div",{className:"chart-card-title truncate "+h,"diagnostic-id":"chart-card-title-text",children:[l.name,n.jsx("span",{"selected-icon":"✓"})]}),n.jsx("div",{className:"chart-card-image",children:n.jsx("img",{alt:"",src:r.chart_thumb_jpg_url})}),n.jsx("div",{className:`chart-card-placeholder${r.aspect_ratio==="16:9"?" size-aspect-16-9":""}`,children:n.jsx("i",{className:"material-icons",children:"insert_chart_outlined"})}),(i||!u)&&n.jsx("div",{className:"chart-card-btn-grp",children:n.jsx("div",{className:"chart-card-btn",children:i?null:n.jsx("i",{className:"material-icons",children:"add_circle"})})})]})]})})})}const XAe=e=>({}),QAe=le(XAe,{})(KAe);function ZAe(e){const[t,r]=y.useState(null),[i,a]=y.useState(""),{modal:s,isDirty:o,selectedChartId:l,setChartLibraryFormStatus:c,insightsVideo:h}=e,{searchTerms:u}=e.chartbook,d=()=>{e.searchCharts(""),e.setSearching(!1)};if(y.useEffect(()=>{e.selectChartClip(null)},[s]),y.useEffect(()=>{let p;e.isSearching&&u&&u.length>2&&(p=e.charts.filter(f=>{const m=e.notes&&e.notes.filter(x=>x.chart_info===f.chart_info.id)[0];return m&&(m.note1.toLowerCase().includes(u.toLowerCase())||m.note2.toLowerCase().includes(u.toLowerCase())||m.note3.toLowerCase().includes(u.toLowerCase()))||Mn(f.chart_info.name.toLowerCase(),u.toLowerCase())}),r(p),a(`Results for: "${u}" - `))},[s,e.chartbook,e.isSearching,e.notes,e.charts]),y.useEffect(()=>{let p;const{isSearching:f}=e;if(!f&&e.modal){p=e.charts.filter(g=>g.topic.id===h?.selectedTopicId);const m=e.topics.filter(g=>g.id===h?.selectedTopicId);r(p),a(m.length?m[0].name:"")}},[e.chartbook,e.chartbook.searchTerms,e.isSearching,h?.selectedTopicId]),y.useEffect(()=>{c(!!e.selectedChartId)},[s,h]),t)return n.jsxs(n.Fragment,{children:[n.jsxs("h6",{className:"chart-browser-topic",children:[i,e.isSearching?n.jsx("button",{className:"btn-cancel",onClick:d,children:"Clear Search"}):""]}),n.jsxs("div",{id:"chart-browser-wrapper","diagnostic-id":"chart-browser-wrapper",children:[e.isSearching&&t?.length===0?n.jsxs("div",{id:"chart-search-placeholder",className:"fadeTransition",children:[n.jsx("i",{className:"material-icons",children:"search_off"}),n.jsxs("div",{children:['No results for "',u,'"']}),n.jsx("button",{className:"btn-cancel",onClick:d,children:"Clear Search"})]}):n.jsx(n.Fragment,{}),t.map((p,f)=>n.jsx(QAe,{index:p.id,chartIndex:f+1,chart:p,isSelected:[e.selectedChartId].includes(p.id),selectChart:()=>e.selectChartClip(p.id),deselectChart:()=>e.deselectChartClip(p.id)},p.id))]})]})}const JAe=e=>({notes:e.chartbooks.item.notes,isDirty:e.studio?.isDirty,selectedChartId:e.studio?.insightsVideo?.selectedChartId}),e2e=le(JAe,{searchCharts:ro,selectChartClip:um,deselectChartClip:nje,setChartLibraryFormStatus:eje})(ZAe);function t2e(e){const{searchTerms:t,searchCharts:r,selectChartClipTopic:i,chartLibrary:a,isSearching:s,setSearching:o,isChartLibraryModal:l}=e,[c,h]=y.useState(e.topics),[u,d]=y.useState(!1),p=()=>{i(e.topics[0].id)};y.useEffect(()=>{p()},[c]),y.useEffect(()=>{h(e.topics)},[e.topics]);const f=v=>{r(""),i(v)};let m;t&&t.length>2?o(!0):(s&&o(!1),m=e.selectedTopicId);const g={};c.map(v=>(g[v.id]=0,null));const x=n.jsx("div",{className:"topic-card upgrade-topic",onClick:v=>v.stopPropagation(),children:n.jsxs("div",{className:"topic-name",children:[n.jsx(Ze,{to:"#",onClick:v=>{v.preventDefault(),d(!0)},children:"Upgrade Your Clearnomics Experience"}),n.jsx("div",{children:"to access the full library"})]})});if(c){const v=c.filter(j=>j.is_locked===!1),b=c.filter(j=>j.is_locked!==!1);return n.jsxs(n.Fragment,{children:[u&&n.jsx(ii,{setModal:d,modal:u}),n.jsxs("div",{id:"topic-wrapper",children:[v.map((j,w)=>n.jsx(lr,{topic:j,isSelected:!s&&m===j.id,selectTopic:()=>f(j.id),isLocked:!1,numChartsSelected:g[j.id],isChartLibraryModal:l},j.id)),b.length>0&&x,b.map((j,w)=>n.jsx(lr,{topic:j,isSelected:!s&&m===j.id,selectTopic:()=>f(j.id),isLocked:!0,numChartsSelected:g[j.id],isChartLibraryModal:l},j.id))]}),n.jsx("div",{id:"m-topic-wrapper",children:n.jsxs(no,{value:m&&!s&&c.filter(j=>j.id===m)[0]?c.filter(j=>j.id===m)[0].name:"",name:"Topic",children:[v.map((j,w)=>n.jsx(ei,{value:j.name,children:n.jsx(lr,{topic:j,isSelected:!s&&m===j.id,isLocked:!1,selectTopic:()=>f(j.id),numChartsSelected:g[j.id],isChartLibraryModal:l},j.id)},j.id)),b.length>0&&n.jsx(ei,{value:"Upgrade Your Clearnomics Experience",onClick:void 0,children:x}),b.map((j,w)=>n.jsx(ei,{value:j.name,children:n.jsx(lr,{topic:j,isSelected:!s&&m===j.id,isLocked:!0,selectTopic:()=>f(j.id),numChartsSelected:g[j.id],isChartLibraryModal:l},j.id)},j.id))]})})]})}return null}const n2e=e=>({searchTerms:e.chartbooks.item.searchTerms,selectedTopicId:e.studio?.insightsVideo?.selectedTopicId}),r2e=le(n2e,{searchCharts:ro,selectChartClipTopic:tje})(t2e);function i2e(e){const[t,r]=y.useState(!1),[i,a]=y.useState(!1),{topics:s,charts:o,resetCharts:l,confirmReset:c,isChartsLoaded:h,modal:u,chartLibrary:d,chartbook:p,insightsVideo:f}=e,m={isSearching:t,setSearching:r,resetTopics:i,setResetTopics:a};return y.useEffect(()=>{f?.selectedChartId&&a(!0)},[f?.selectedChartId]),n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"col s12 m3 l3",children:n.jsx(r2e,{topics:s,...m,chartLibrary:d,isChartLibraryModal:u})}),n.jsx("div",{className:"col s12 m9 l9",children:n.jsx(e2e,{topics:s,charts:o,chartbook:p,insightsVideo:f,modal:u,...m})})]})}const a2e=e=>({chartLibrary:e.chartlibrary,chartbook:e.chartbooks.item,insightsVideo:e.studio?.insightsVideo}),s2e=le(a2e,{})(i2e);function o2e(e){const{getCharts:t,chartLibrary:r,setScrim:i,modal:
129a,setModal:s,isWizard:o,index:l}=e,[c,h]=y.useState(!1),[u,d]=y.useState(!1),{charts:p,topics:f}=r,[m,g]=y.useState(0);y.useEffect(()=>{d(!0)},[]);const x=()=>{h(!1)},v=n.jsxs("div",{className:"chart-lib-modal-container",children:[n.jsx("i",{className:"material-icons",onClick:()=>s(!1),children:"close"}),n.jsx("h5",{children:"Select a Chart"}),n.jsx("div",{className:"row",children:n.jsxs("div",{className:"chart-library-search",children:[n.jsx(u0,{isWizard:o}),n.jsx(YAe,{setStep:g,index:l})]})}),f&&p&&n.jsx("div",{id:"library-wrapper",children:n.jsx(s2e,{...e,charts:p,topics:f,resetCharts:c,confirmReset:x,isChartsLoaded:u})})]});return r?n.jsxs(n.Fragment,{children:[n.jsx(ot,{setModal:s,children:m===0&&v}),m===1&&n.jsx(Fo,{setModal:s,index:l,modal:a})]}):null}const l2e=e=>({chartLibrary:e.chartlibrary,userId:e.auth.user.id}),gS=le(l2e,{getCharts:lc,setScrim:hn,searchCharts:ro})(zt(o2e));function c2e(e){const{selectChartClip:t,index:r,addInsightsVideoClip:i,userId:a,insightsVideoId:s,clips:o}=e,[l,c]=y.useState(!1),[h,u]=y.useState(!1),[d,p]=y.useState(!1);y.useEffect(()=>{t(null)},[h]);const f=()=>{c(!0)},m=async()=>{p(!0),await i(a,s,"video-only",null,r)&&u(!0),p(!1)},g=l&&n.jsx(gS,{modal:l,setModal:c,index:r}),x=h&&n.jsx(Fo,{setModal:u,index:r,modal:h});return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"timeline-tools",children:n.jsx("div",{className:"timeline-tool-line",children:n.jsx("hr",{})})}),n.jsx("div",{className:"studio-clip-wrapper",children:n.jsx("div",{className:"fadeTransition new-insights-video-container",children:n.jsxs("div",{className:"new-insights-video-clip",id:"clip-new",children:[n.jsx("h4",{children:"Add another clip"}),n.jsxs("div",{className:"button-group",children:[n.jsxs("button",{className:"btn-primary-lg btn-icon-text","diagnostic-id":"add-chart-clip-btn",type:"button",onClick:f,children:[n.jsx("i",{className:"material-icons",children:"insert_chart"}),"ADD A CHART CLIP"]}),n.jsxs("button",{className:"btn-primary-lg btn-icon-text","diagnostic-id":"add-video-only-clip-btn",type:"button",onClick:m,disabled:d,children:[n.jsx("i",{className:"material-icons",children:"account_box"}),"ADD A VIDEO-ONLY CLIP"]})]})]})})}),n.jsx("div",{className:"timeline-tools",children:n.jsx("div",{className:"timeline-tool-line",children:n.jsx("hr",{})})}),g,x]})}const d2e=e=>({userId:e.auth.user&&e.auth.user.id,canUseEngage:e.auth.user&&e.auth.user.can_use_engage,insightsVideoId:e.studio.insightsVideo&&e.studio.insightsVideo.id,clips:e.studio.insightsVideo&&e.studio.insightsVideo.
129clips}),u2e=le(d2e,{selectChartClip:um,addInsightsVideoClip:hm})(c2e);function h2e(e){const{clips:t,titleClip:r,selectChartClip:i,addTitleClip:a,insightsVideoId:s,userId:o,addInsightsVideoClip:l}=e,[c,h]=y.useState(!1),[u,d]=y.useState(!1),[p,f]=y.useState(!1),[m,g]=y.useState(!1),[x,v]=y.useState(!1);y.useEffect(()=>{i(null)},[c]);const b=()=>{d(!0)},j=async()=>{g(!0),await a(o,s,"title",null,void 0)&&h(!0),g(!1)},w=async()=>{v(!0),await l(o,s,"video-only",null,void 0)&&f(!0),v(!1)},S=c&&n.jsx(Fo,{setModal:h,modal:c}),_=u&&n.jsx(gS,{modal:u,setModal:d,index:0}),C=p&&n.jsx(Fo,{setModal:f,index:0,modal:p});return n.jsxs(n.Fragment,{children:[!r&&n.jsx("div",{className:"studio-clip-wrapper","diagnostic-id":"add-title-clip-btn-wrapper",children:n.jsx("div",{className:"fadeTransition new-insights-video-container",children:n.jsxs("div",{className:"new-insights-video-clip",id:"clip-new",children:[n.jsx("h4",{children:"Add a title clip"}),n.jsx("div",{className:"button-group",children:n.jsx("button",{className:"btn-primary-lg btn-icon-text","diagnostic-id":"add-title-clip-btn",type:"button",onClick:j,disabled:m,children:m?n.jsx("div",{id:"spinner-icon-container",children:n.jsx(ur,{size:"1.25em",thickness:8,variant:"indeterminate"})}):n.jsxs(n.Fragment,{children:[n.jsx("i",{className:"material-icons",children:"text_fields"}),"ADD A TITLE CLIP"]})})})]})})}),t.length===0&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"timeline-tools",children:n.jsx("div",{className:"timeline-tool-line",children:n.jsx("hr",{})})}),n.jsx("div",{className:"studio-clip-wrapper","diagnostic-id":"add-insights-video-clip-btn-wrapper",children:n.jsx("div",{className:"fadeTransition new-insights-video-container",children:n.jsxs("div",{className:"new-insights-video-clip",id:"clip-new",children:[n.jsx("h4",{children:"Add a clip to get started"}),n.jsxs("div",{className:"button-group",children:[n.jsxs("button",{className:"btn-primary-lg btn-icon-text","diagnostic-id":"add-chart-clip-btn",type:"button",onClick:b,children:[n.jsx("i",{className:"material-icons",children:"insert_chart"}),"ADD A CHART CLIP"]}),n.jsxs("button",{className:"btn-primary-lg btn-icon-text","diagnostic-id":"add-video-only-clip-btn",type:"button",onClick:w,disabled:x,children:[n.jsx("i",{className:"material-icons",children:"account_box"}),"ADD A VIDEO-ONLY CLIP"]})]})]})})}),n.jsx("div",{className:"timeline-tools",children:n.jsx("div",{className:"timeline-tool-line",children:n.jsx("hr",{})})})]}),S,_,C]})}const p2e=e=>({userId:e.auth.user&&e.auth.user.id,insightsVideoId:e.studio.insightsVideo&&e.studio.insightsVideo.id}),f2e=le(p2e,{setScrim:hn,selectChartClip:um,addTitleClip:bje,addInsightsVideoClip:hm})(h2e),m2e=e=>{const{userId:t,setDeleteModal:r,titleClipId:i,insightsVideoId:a,clipId:s,deleteTitleClip:o,deleteInsightsVideoClip:l,introClipId:c,deleteIntroClip:h}=e,u=()=>{i?o(i,t,a):c?h(t,a):l(s,t,a),r(!1)};return n.jsx(ot,{setModal:r,children:n.jsxs("div",{className:"delete-modal-container",children:[n.jsx("h5",{children:"Please Confirm"}),n.jsx("p",{children:"Are you sure you want to permanently delete this clip?"}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>{r(!1)},children:"CANCEL"}),n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",onClick:u,children:"DELETE"})]})]})})},g2e=e=>({userId:e.auth.user&&e.auth.user.id,insightsVideoId:e.studio.insightsVideo&&e.studio.insightsVideo.id}),vS=le(g2e,{deleteTitleClip:vje,deleteInsightsVideoClip:mje,deleteIntroClip:Cje})(m2e);function v2e(e){const{setTransitionModal:t,editTitleClipTransition:r,titleClipId:i,insightsVideoId:a,userId:s,clipType:o,editClipTransition:l,clipId:c}=e,[h,u]=y.useState(e.endTransition),[d,p]=y.useState(!1),f=g=>{u(g.target.value)},m=g=>{p(!0),o==="title"?r(a,s,i,h).then(()=>{t(!1),p(!1)}):l(a,s,c,h).then(()=>{t(!1),p(!1)})};return n.jsx(ot,{setModal:t,children:n.jsxs("div",{className:"transition-modal-container","diagnostic-id":"transition-modal",children:[n.jsx("h5",{children:"Transition Settings"}),n.jsx("p",{children:"Add a transition between your clips"}),n.jsx("p",{children:"Select a transition:"}),n.jsx("div",{className:"form-group",children:n.jsxs("div",{className:"dropdown-container",children:[n.jsxs("select",{name:"endTransition",onChange:f,value:h,"diagnostic-id":"end-transition-select",children:[n.jsx("option",{value:"cross-fade",children:"Cross fade"}),n.jsx("option",{value:"fade-black",children:"Fade to black"}),n.jsx("option",{value:"slide-left",children:"Slide left"}),n.jsx("option",{value:"cover-left",children:"Cover left"}),n.jsx("option",{value:"none",children:"No transition"})]}),n.jsx(dt,{icon:Mt})]})}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>t(!1),children:"CANCEL"}),n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",onClick:m,disabled:d,children:"Save"})]})]})})}const b2e=e=>({userId:e.auth.user&&e.auth.user.id,insightsVideoId:e.studio.insightsVideo&&e.studio.insightsVideo.id}),HF=le(b2e,{editTitleClipTransition:xje,editClipTransition:jje})(v2e);function y2e(e){const{clip:t,index:r,isDragging:i,userId:a}=e,[s,o]=y.useState(!1),[l,c]=y.useState(!1),[h,u]=y.useState(!1),[d,p]=y.useState(""),f=t.type==="chart-video"&&t?.chart_snapshot;y.useEffect(()=>{const x=yo(Math.ceil(t.duration));p(`${x.minutes}:${x.seconds}`)},[t.duration]);let m="";switch(t.end_transition){case"none":m="No Transition";break;case"cross-fade":m="Cross Fade";break;case"fade-black":m="Fade to Black";break;case"slide-left":m="Slide left";break;case"cover-left":m="Cover left";break}const g=h&&n.jsx(Fo,{setModal:u,index:r,modal:h});return n.jsxs(n.Fragment,{children:[n.jsx($u,{draggableId:t.id&&t.id.toString(),index:r,children:(x,v)=>n.jsxs("div",{className:`studio-clip-wrapper${i?" droppable":""}${t.is_renderable?"":" needs-attention"}`,...x.draggableProps,ref:x.innerRef,style:{...x.draggableProps.style},"diagnostic-id":"insights-video-clip-wrapper",children:[n.jsxs("div",{className:`studio-clip ${v.isDragging?"is-dragging":"draggable"} ${t.type}`,id:"studio-clip","diagnostic-id":"insights-video-clip",children:[n.jsxs("button",{className:"clip-edit-btn",onClick:()=>u(!0),"diagnostic-id":"clip-edit-btn",children:[n.jsx("i",{className:"material-icons clip-edit-icon",children:"edit"}),"EDIT"]}),n.jsxs("div",{className:"clip-drag-handle",...x.dragHandleProps,children:[n.jsx("i",{className:"material-icons clip-drag-icon",children:"open_with"}),"DRAG TO MOVE CLIP"]}),n.jsxs("div",{className:"clip-group","diagnostic-id":"chart-video-clip",children:[n.jsxs("div",{className:"clip-header-group",children:[n.jsxs("div",{className:"clip-title",children:[t.is_renderable?n.jsx("i",{className:"material-icons check-mark-icon",children:"check"}):n.jsx("i",{className:"material-icons error-icon",children:"error"}),n.jsxs("div",{className:"clip-info-container",children:[n.jsx("div",{className:"clip-type-title",children:t.type==="chart-video"?"Chart Clip":"Video-Only Clip"}),n.jsx("div",{className:"clip-status-text","diagnostic-id":"insights-video-clip-status-text",children:t.is_renderable?t.clip_author_id===a?"Ready: Saved with custom recording":"Ready: Saved with featured recording":"Needs attention: No recording saved"})]})]}),t.duration!==0&&n.jsx("div",{className:"clip-duration",children:d})]}),n.jsxs("div",{className:"clip-img-group",children:[t.type==="chart-video"&&n.jsx("img",{className:"chart-snapshot-img",src:f?.chart_snapshot_image_jpg_url,alt:""}),t.thumbnail_image_jpg_url?n.jsx("img",{className:`mirror clip-thumbn
129ail-img ${t.type!=="video-only"?t.camera_location:"video-only"}`,src:t.thumbnail_image_jpg_url,alt:""}):t.type==="video-only"?n.jsxs("div",{className:"video-only-clip-placeholder",children:[n.jsx("i",{className:"material-icons",children:"videocam_off"}),n.jsx("h6",{children:"No recording saved"})]}):n.jsx(n.Fragment,{})]})]}),n.jsxs("button",{onClick:()=>{o(!0)},className:"clip-delete-btn","diagnostic-id":"clip-delete-btn",children:[n.jsx("i",{className:"material-icons",children:"delete"}),"DELETE"]})]}),n.jsx("div",{className:"clip-end-transition",children:n.jsxs("button",{type:"button",className:"btn btn-secondary btn-secondary-icon-text clip-transition-btn","diagnostic-id":"clip-transition-btn",onClick:()=>c(!0),children:[n.jsxs("div",{className:"clip-transition-name","diagnostic-id":"clip-transition-name",children:["Transition: ",m]}),n.jsx("i",{className:"material-icons",children:"edit"})]})})]})},t.id&&t.id),s&&n.jsx(vS,{setDeleteModal:o,clipId:t.id}),l&&n.jsx(HF,{setTransitionModal:c,endTransition:t.end_transition,clipType:t.type,clipId:t.id}),g]})}const x2e=e=>({userId:e.auth.user&&e.auth.user.id}),j2e=le(x2e,{})(y2e),w2e=e=>{const{editModal:t,setEditModal:r,insightsVideoId:i,userId:a,disclosures:s,editInsightsVideoDisclosures:o,handleCancel:l,setModalStatus:c}=e,[h,u]=y.useState(Ys());y.useEffect(()=>{c(!0),document.body.style.position="fixed",document.body.style.top=`-${h}px`,document.body.style.width="100%";const f=document.querySelector(".nav-wrapper");f.style.paddingLeft="10px",f.style.paddingRight="10px"},[]);const d=5e3,p=y.useCallback(f=>$n(f,t,r),[t]);return y.useEffect(()=>(window.addEventListener("keyup",p),()=>{window.removeEventListener("keyup",p)}),[p]),n.jsx(ot,{setModal:r,disableClickOutsideCancel:!0,children:n.jsxs("div",{className:"insights-video-disclosures-edit-modal-container","diagnostic-id":"insights-video-disclosures-edit-modal-container",children:[n.jsx("i",{className:"material-icons",onClick:()=>{l(),c(!1)},children:"close"}),n.jsx(gt,{initialValues:{disclosures:s||""},onSubmit:(f,{setSubmitting:m})=>{o(i,a,f.disclosures).then(l),c(!1)},enableReinitialize:!0,validationSchema:_t().shape({disclosures:Ae().max(5e3,"Your disclosures are too long. Please shorten it or contact us for assistance.")}),children:({values:f,touched:m,errors:g,dirty:x,isSubmitting:v})=>(x!==e.isDirty&&e.setDirty(x),n.jsxs(vt,{onClick:b=>b.stopPropagation(),children:[n.jsx("h5",{children:"Edit Insights Video Disclosures"}),n.jsxs("div",{className:"form-group",children:[n.jsxs("div",{className:"character-count",children:[d-f.disclosures.length," characters left"]}),n.jsx(me,{component:"textarea",id:"disclosures","diagnostic-id":"disclosures-input",placeholder:"",name:"disclosures",className:g.disclosures&&m.disclosures?"text-input error":""}),g.disclosures&&m.disclosures&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:g.disclosures})]}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>{l(),c(!1)},children:"Cancel"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",disabled:!!Object.keys(g).length||v||!x,children:"Save"})]})]}))})]})})},S2e=e=>({userId:e.auth.user&&e.auth.user.id}),_2e=le(S2e,{editInsightsVideoDisclosures:Sje,setModalStatus:Iu})(w2e);function C2e(e){const{insightsVideo:t,setDirty:r,isDirty:i}=e,[a,s]=y.useState(!1),o=()=>{s(!1),r(!1)};return n.jsxs("div",{className:"studio-clip-wrapper navigator-reference",id:"disclosures-clip","diagnostic-id":"disclosures-clip-wrapper",children:[n.jsxs("div",{className:"studio-clip",id:"studio-clip",children:[n.jsxs("button",{className:"clip-edit-btn",onClick:()=>s(!0),children:[n.jsx("i",{className:"material-icons clip-edit-icon","diagnostic-id":"disclosures-clip-edit-icon",children:"edit"}),"EDIT"]}),n.jsx("div",{className:"disclosures-scrim"}),n.jsx("div",{className:"disclosures-content",children:t.disclosures_text?t.disclosures_text:"Enter your disclosures here..."})]}),a&&n.jsx(_2e,{editModal:a,setEditModal:s,insightsVideoId:t.id,disclosures:t.disclosures_text,isDirty:i,setDirty:r,handleCancel:o})]})}const N2e=e=>({userId:e.auth.user&&e.auth.user.id,insightsVideo:e.studio&&e.studio.insightsVideo}),E2e=le(N2e,{})(zt(C2e));function T2e(e){const{isSelected:t,card:r,id:i,index:a}=e,s=t?"selected":"",{name:o,thumb_jpg_url:l}=r;return n.jsx(n.Fragment,{children:n.jsxs("div",{className:"chart-card","diagnostic-id":"design-card",children:[t?n.jsx("div",{className:"checkmark","diagnostic-id":"checkmark",children:n.jsx("i",{className:"material-icons",children:"done"})}):n.jsx(n.Fragment,{}),n.jsxs("div",{className:"intro-clip-card-btn-primary",onClick:()=>e.selectIntroClip(a),children:[n.jsxs("div",{className:"chart-card-title truncate "+s,children:[o,n.jsx("span",{"selected-icon":"✓"})]}),n.jsxs("div",{className:"chartbook-layout-card-image",children:[n.jsxs("div",{className:"design-card-placeholder",children:[o==="Title with Music"?n.jsx("i",{className:"material-icons",children:"music_video"}):n.jsx("i",{className:"material-icons",children:"smart_display"}),o==="Title with Music"&&n.jsx("h6",{children:"Title with Music"})]}),n.jsx("picture",{children:l&&n.jsx("img",{alt:"",src:l,className:"design-card-img"})})]})]})]})})}const k2e=e=>({}),P2e=le(k2e,{})(T2e);function I2e(e){const{selected:t,handleChange:r}=e,i=s=>{r(s)},a=e.cards.map((s,o)=>n.jsx(P2e,{id:s.id,isSelected:t===o,selectIntroClip:i,card:s,index:o},o));return n.jsx("div",{className:"card-container",children:a})}function D2e(e){const{setIntroClipEditorModal:t,introClips:r,addIntroClip:i,insightsVideoId:a,userId:s,currentIntroClip:o,introClipEditorModal:l,setModalStatus:c}=e,[h,u]=y.useState(Ys());y.useEffect(()=>{c(!0),document.body.style.position="fixed",document.body.style.top=`-${h}px`,document.body.style.width="100%";const x=document.querySelector(".nav-wrapper");x.style.paddingLeft="10px",x.style.paddingRight="10px"},[]);const[d,p]=y.useState(o?r.find(x=>x.id===o.id):r[0]),f=x=>{p(r[x]),e.setDirty(x!==r.findIndex(v=>v.id===d.id))},m=()=>{i(a,s,d.id).then(x=>{x.status&&(t(!1),c(!1))})},g=()=>{t(!1),c(!1)};
129return n.jsx(ot,{setModal:t,disableClickOutsideCancel:!0,children:n.jsxs("div",{className:"clip-editor-modal-container intro",children:[n.jsxs("div",{className:"clip-editor-header-grp",children:[n.jsx("h6",{className:"clip-type-header",children:"Intro Clip"}),n.jsx("div",{className:"clip-editor-save-grp",children:n.jsxs("div",{className:"button-group",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"clip-editor-cancel-btn",onClick:g,children:"CLOSE"}),n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"clip-editor-save-btn",onClick:m,disabled:!e.isDirty&&o!==null||o?.id===d.id,children:o?"UPDATE INTRO CLIP":"ADD INTRO CLIP"})]})})]}),n.jsxs("div",{className:"row fadeTransition intro-clip-selector-section","diagnostic-id":"intro-clip-selector-section",children:[n.jsxs("div",{className:"col s12 m12 l12 xl8 intro-clip-selector",style:{position:"relative"},children:[n.jsx("h5",{children:"Select an Intro Clip:"}),n.jsx(I2e,{cards:r,selected:e.introClips.findIndex(x=>x.id===d.id),handleChange:f})]}),n.jsx("div",{className:"col s12 l12 xl4",style:{position:"relative"},children:d.name==="Title with Music"?n.jsx(n.Fragment,{}):n.jsx("div",{className:"intro-clip-preview-container",children:n.jsxs("div",{className:"intro-clip-preview-wrapper",children:[n.jsx("div",{className:"clip-editor-header-grp",children:n.jsxs("div",{className:"intro-clip-preview-header",children:["Clip Preview: ",d.name]})}),n.jsx("video",{onContextMenu:x=>x.preventDefault(),className:"intro-clip-preview-video",src:`${d?.preview_url}/?time=${Date.now()}`,poster:d?.thumb_jpg_url&&`${d.thumb_jpg_url}/?time=${Date.now()}`,controlsList:"nodownload",disablePictureInPicture:!0,controls:!0})]})})})]})]})})}const R2e=e=>({userId:e.auth.user.id,introClips:e.studio&&e.studio.insightsVideo&&e.studio.insightsVideo.introClips,insightsVideoId:e.studio.insightsVideo&&e.studio.insightsVideo.id,currentIntroClip:e.studio&&e.studio.insightsVideo&&e.studio.insightsVideo.intro_clip}),O2e=le(R2e,{addIntroClip:_je,setModalStatus:Iu})(zt(D2e));function A2e(e){const{getIntroClips:t,userId:r,introClip:i}=e,[a,s]=y.useState(!1),[o,l]=y.useState(!1);return y.useEffect(()=>{t(r)},[]),n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"studio-clip-wrapper navigator-reference",id:"intro-clip","diagnostic-id":"intro-clip-wrapper",children:i?n.jsxs("div",{className:"studio-clip",id:"studio-clip","diagnostic-id":"studio-intro-clip",children:[n.jsxs("button",{className:"clip-edit-btn",onClick:()=>s(!0),children:[n.jsx("i",{className:"material-icons clip-edit-icon",children:"edit"}),"EDIT"]}),n.jsx("div",{className:"clip-scrim-overlay"}),n.jsxs("div",{className:"clip-group","diagnostic-id":"intro-clip",children:[n.jsx("div",{className:"clip-header-group",children:n.jsxs("div",{className:"clip-title",children:[n.jsx("i",{className:"material-icons check-mark-icon",children:"check"}),n.jsxs("div",{className:"clip-info-container",children:[n.jsx("div",{className:"clip-type-title",children:"Intro Clip"}),n.jsx("div",{className:"clip-status-text",children:"Ready"})]})]})}),n.jsx("div",{className:"clip-placeholder"}),n.jsx("div",{className:"clip-img-group",children:i.name==="Title with Music"?n.jsxs("div",{className:"intro-clip-placeholder",children:[n.jsx("i",{className:"material-icons",children:"music_video"}),n.jsx("h6",{children:"Title with Music"})]}):n.jsx("img",{className:"intro-clip-img",src:i.thumb_jpg_url,alt:""})})]}),n.jsxs("button",{onClick:()=>{l(!0)},className:"clip-delete-btn","diagnostic-id":"clip-delete-btn",children:[n.jsx("i",{className:"material-icons",children:"delete"}),"DELETE"]})]}):n.jsx("div",{className:"fadeTransition new-insights-video-container",children:n.jsxs("div",{className:"new-insights-video-clip",id:"clip-new",children:[n.jsx("h4",{children:"Add an intro clip"}),n.jsx("div",{className:"button-group",children:n.jsxs("button",{className:"btn-primary-lg btn-icon-text","diagnostic-id":"add-intro-clip-btn",type:"button",onClick:()=>s(!0),children:[n.jsx("i",{className:"material-icons",children:"theaters"}),"ADD AN INTRO CLIP"]})})]})})}),n.jsx("div",{className:"timeline-tools",children:n.jsx("div",{className:"timeline-tool-line",children:n.jsx("hr",{})})}),a&&n.jsx(O2e,{setIntroClipEditorModal:s,introClipEditorModal:a}),o&&n.jsx(vS,{setDeleteModal:l,introClipId:i.id})]})}const M2e=e=>({userId:e.auth.user&&e.auth.user.id}),$2e=le(M2e,{getIntroClips:aje})(A2e);function L2e(e){const{clip:t,userId:r}=e,[i,a]=y.useState(!1),[s,o]=y.useState(!1),[l,c]=y.useState(!1),[h,u]=y.useState("");y.useEffect(()=>{const f=yo(Math.ceil(t.duration));u(`${f.minutes}:${f.seconds}`)},[t.duration]);let d="";switch(t.end_transition){case"none":d="No Transition";break;case"cross-fade":d="Cross Fade";break;case"fade-black":d="Fade to Black";break;case"slide-left":d="Slide left";break;case"cover-left":d="Cover left";break}const p=l&&n.jsx(Fo,{setModal:c,modal:l});return n.jsxs("div",{className:"studio-clip-wrapper navigator-reference",id:"title-clip","diagnostic-id":"title-clip-wrapper",children:[n.jsxs("div",{className:"studio-clip",id:"studio-clip","diagnostic-id":"studio-title-clip",children:[n.jsxs("button",{className:"clip-edit-btn","diagnostic-id":"title-clip-edit-btn",onClick:()=>c(!0),children:[n.jsx("i",{className:"material-icons clip-edit-icon",children:"edit"}),"EDIT"]}),n.jsx("div",{className:"clip-scrim-overlay"}),n.jsxs("div",{className:"title-clip-group","diagnostic-id":"title-clip",children:[n.jsxs("div",{className:"clip-header-group",children:[n.jsxs("div",{className:"clip-title",children:[n.jsx("i",{className:"material-icons check-mark-icon",children:"check"}),n.jsxs("div",{className:"clip-info-container",children:[n.jsx("div",{className:"clip-type-title",children:"Title Clip"}),n.jsx("div",{className:"clip-status-text","diagnostic-id":"title-clip-status-text",children:t.clip_author_id===r&&t.clip_video_url?"Ready: saved with custom recording":"Ready"})]})]}),t.duration!==0&&n.jsx("div",{className:"clip-duration",children:h})]}),n.jsx("div",{className:"title-clip-placeholder"}),n.jsxs("div",{className:"clip-img-group",children:[n.jsx("img",{className:"title-clip-img",src:t.title_slide_image_jpg_url,alt:""}),t.thumbnail_image_jpg_url&&n.jsx("img",{className:`mirror clip-thumbn
129ail-img ${t.camera_location&&t.camera_location}`,src:t.thumbnail_image_jpg_url,alt:""})]})]}),n.jsxs("button",{onClick:()=>{a(!0)},className:"clip-delete-btn","diagnostic-id":"clip-delete-btn",children:[n.jsx("i",{className:"material-icons",children:"delete"}),"DELETE"]})]}),n.jsx("div",{className:"clip-end-transition",children:n.jsxs("button",{type:"button",className:"btn btn-secondary btn-secondary-icon-text clip-transition-btn","diagnostic-id":"title-clip-transition-btn",onClick:()=>o(!0),children:[n.jsxs("div",{className:"clip-transition-name","diagnostic-id":"title-clip-transition-name",children:["Transition: ",d]}),n.jsx("i",{className:"material-icons",children:"edit"})]})}),i&&n.jsx(vS,{setDeleteModal:a,titleClipId:t.id}),s&&n.jsx(HF,{setTransitionModal:o,endTransition:t.end_transition,titleClipId:t.id,clipType:t.type}),p]})}const F2e=e=>({userId:e.auth.user&&e.auth.user.id}),U2e=le(F2e,{})(L2e);function B2e(e){const{clip:t,selectChartClip:r,index:i,addInsightsVideoClip:a,userId:s,insightsVideoId:o,clips:l}=e,[c,h]=y.useState(!1),[u,d]=y.useState(!1),[p,f]=y.useState(!1);y.useEffect(()=>{r(null)},[u]);const m=()=>{h(!0)},g=async()=>{f(!0),await a(s,o,"video-only",null,i)&&(f(!1),d(!0))},x=c&&n.jsx(gS,{modal:c,setModal:h,index:i}),v=u&&n.jsx(Fo,{setModal:d,index:i,modal:u});return l.length===0?n.jsx("div",{className:"timeline-tools",children:n.jsx("div",{className:"timeline-tool-line",children:n.jsx("hr",{})})}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"timeline-tools",children:[n.jsx("div",{className:"timeline-tool-line",children:n.jsx("hr",{})}),n.jsx("button",{className:"timeline-tools-menu",children:n.jsx("i",{className:"material-icons",children:"add"})}),n.jsxs("div",{className:"timeline-tool-btns",children:[n.jsx(Ke,{title:"Add a chart clip",placement:"top",children:n.jsx("button",{"diagnostic-id":"timeline-add-chart-clip-btn",onClick:m,children:n.jsx("i",{className:"material-icons",children:"insert_chart"})})}),n.jsx(Ke,{title:"Add a video-only clip",placement:"top",children:n.jsx("button",{"diagnostic-id":"timeline-add-video-only-clip-btn",type:"button",onClick:g,disabled:p,children:n.jsx("i",{className:"material-icons",children:"account_box"})})})]})]}),x,v]})}const q2e=e=>({userId:e.auth.user&&e.auth.user.id,canUseEngage:e.auth.user&&e.auth.user.can_use_engage,insightsVideoId:e.studio.insightsVideo&&e.studio.insightsVideo.id,clips:e.studio.insightsVideo&&e.studio.insightsVideo.
129clips}),V2e=le(q2e,{selectChartClip:um,addInsightsVideoClip:hm})(B2e);function z2e(e){const{insightsVideo:t,userId:r,updateClipsOrder:i,setModalStatus:a,modalStatus:s}=e;y.useEffect(()=>{if(!s){const f=document.body.style.top;document.body.style.position="",document.body.style.top="",document.body.style.width="";const m=document.querySelector(".nav-wrapper");m.style.paddingRight="",m.style.paddingLeft="",window.scrollTo(0,parseInt(f||"0")*-1)}},[s]);const o=t?.title_clip,l=t?.clips,c=t?.intro_clip,[h,u]=y.useState(!1),d=()=>{u(!h)},p=async f=>{f.destination||u(!1);const{source:m,destination:g}=f,v=l[m.index].id;d(),await i(r,v,m?.index,g?.index)};return n.jsxs("div",{className:"studio-timeline-container",children:[n.jsx(Mu,{onDragEnd:p,onDragStart:()=>u(!0),children:n.jsx(fc,{droppableId:"droppable",children:(f,m)=>n.jsxs("div",{className:"droppable-container",...f.droppableProps,ref:f.innerRef,children:[n.jsx($2e,{introClip:c}),o&&n.jsx(U2e,{clip:o}),n.jsx(f2e,{titleClip:o,clips:l}),l?.map((g,x)=>n.jsxs("div",{id:`clip-${g.id}`,className:"navigator-reference",children:[!h&&n.jsx(V2e,{clip:g,index:x}),n.jsx(j2e,{clip:g,index:x,isDragging:h})]},x)),f.placeholder]})})}),l.length>0&&n.jsx(u2e,{index:l.length}),n.jsx(E2e,{})]})}const H2e=e=>({userId:e.auth.user&&e.auth.user.id,modalStatus:e.studio&&e.studio.modalStatus}),G2e=le(H2e,{updateClipsOrder:yje,setModalStatus:Iu})(z2e);function W2e(e){const{userId:t,setScrim:r,match:i,getCharts:a,getInsightsVideo:s,studio:o,insightsVideoId:l,getInsightsVideoSummary:c,showEditTitleSpinner:h}=e,u=3e4,[d,p]=y.useState(!0),[f,m]=y.useState(!1),[g,x]=y.useState(!1),[v,b]=y.useState(!1),[j,w]=y.useState(!1),{Processing:S,Succeeded:_,Failed:C,ReRenderNeeded:E,TimedOut:P}=Kl;y.useEffect(()=>{x(!0),a().then(()=>{m(!0),x(!1)})},[]),y.useEffect(()=>{const k=i.params.id;r(!1),!o||!o.insightsVideo||o.insightsVideo.id!==k?s(k,t).then(()=>p(!1),()=>{e.history.push("/insights?view=studio")}):p(!1),Ni.parse(e.location.search).view&&e.history.push(`/insightsvideos/${k}`)},[l,o?.insightsVideo?.clips?.length,o?.insightsVideo?.title,o?.insightsVideo?.display_author_name]);const T=o?.insightsVideo;y.useEffect(()=>{let k;if(T?.render_status===S)return c(t,l),k=setInterval(()=>c(t,l),u),()=>{b(!0),clearInterval(k)}},[l,T?.render_status]);const N=n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"back-link-wrapper",children:n.jsxs(Ze,{to:{pathname:"/insights",search:"?view=studio"},className:"back-link","diagnostic-id":"studio-back-btn",children:[n.jsx(ir,{}),n.jsx("span",{children:"Back to Studio"})]})}),n.jsx(da,{}),n.jsxs("div",{className:"studio-editor-wrapper",children:[n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(MAe,{insightsVideo:T})})}),n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:v&&T?.render_status===_?n.jsxs("div",{id:"insights-video-preview-placeholder",children:[n.jsx("div",{className:"insights-video-render-icons",children:n.jsx("i",{className:"material-icons check-icon",children:"check_circle"})}),n.jsx("h4",{className:"video-ready-msg",children:"Your video is ready"}),n.jsx("button",{className:"btn btn-primary","diagnostic-id":"view-video-btn",onClick:()=>b(!1),children:"View Video"})]}):T?.render_status===S?n.jsxs("div",{id:"insights-video-preview-placeholder",children:[n.jsxs("div",{className:"insights-video-render-icons",children:[n.jsx("i",{className:"material-icons movie-icon",children:"movie"}),n.jsx("i",{className:"material-icons loading-icon",children:"cached"})]}),n.jsx("h4",{"diagnostic-id":"in-progress-header",children:"Your insights video is being created which may take a few minutes. You can stay on this screen or we’ll also send you an email once it’s ready."})]}):(T?.render_status===C||T?.render_status===P)&&!j?n.jsxs("div",{id:"insights-video-preview-placeholder",children:[n.jsx("div",{className:"insights-video-render-icons",children:n.jsx("i",{className:"material-icons",children:"error"})}),n.jsx("h4",{children:"There was a problem creating your video. Please contact us for assistance."}),n.jsxs("div",{className:"button-group",children:[n.jsx("button",{className:"btn-cancel","diagnostic-id":"cancel-btn",onClick:()=>w(!0),children:"Dismiss"}),n.jsx("button",{className:"btn-primary",onClick:()=>window.Intercom("show"),children:"Contact Us"})]})]}):(T?.render_status===_||T?.render_status===E)&&T.rendered_video_url?n.jsx(qAe,{insightsVideo:T}):n.jsx(n.Fragment,{})})}),n.jsxs("div",{className:"row studio-timeline-workspace-container insights-video",children:[n.jsx("div",{className:"col s12 m3 l3 navigator",children:n.jsx(FAe,{insightsVideo:T})}),n.jsx("div",{className:"col s12 m9 l9",children:n.jsx(G2e,{insightsVideo:T})})]})]})]});return n.jsxs(n.Fragment,{children:[g||h?n.jsx(Dn,{}):null,n.jsx("div",{className:"container",children:!d&&o&&o.insightsVideo&&N})]})}const Y2e=e=>({userId:e.auth.user&&e.auth.user.id,studio:e.studio,insightsVideoId:e.studio.insightsVideo&&e.studio.insightsVideo.id,showEditTitleSpinner:e.studio.showEditTitleSpinner}),K2e=le(Y2e,{setScrim:hn,getCharts:lc,getInsightsVideo:_0,getInsightsVideoSummary:rje})(W2e);function X2e(e){const{imId:t,title:r,setDirty:i,isDirty:a,userId:s,canUsePartner:o,allowPartner:l,firstName:c,lastName:h,authorType:u,authors:d,handleCancel:p,displayAuthorName:f,displayProfilePic:m,editInsightsMediaHeader:g}=e;return n.jsx(gt,{initialValues:{title:r,authorType:u,displayAuthorName:f,displayProfilePic:m},onSubmit:(x,{setSubmitting:v})=>{g(t,s,x.title,x.displayAuthorName,x.displayProfilePic,x.authorType).then(p)},validationSchema:_t().shape({title:Ae().required("Required").test("is-empty","Title c
129annot be empty",function(x){return x&&!x.split("").every(v=>v===" ")}).max(160)}),children:x=>{const{values:v,touched:b,errors:j,dirty:w,isSubmitting:S,setFieldValue:_}=x;w!==a&&i(w);const C=n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",name:"displayProfilePic",id:"displayProfilePic",className:"filled-in",checked:v.displayProfilePic,onChange:E=>{_("displayProfilePic",E.target.checked)},disabled:!v.displayAuthorName||v.authorType!=="default"}),n.jsx("span",{children:"Show author profile picture"})]});return n.jsxs(vt,{children:[n.jsxs("div",{className:"form-group",children:[n.jsx("label",{className:"large",children:"Client Market Update*"}),n.jsxs("div",{className:"character-count",children:[160-v.title.length," characters left"]}),n.jsx(me,{id:"title","diagnostic-id":"header-title-input",name:"title",placeholder:"Client Market Update",maxLength:"160",className:j.title&&b.title?"text-input error":"form-control"}),j.title&&b.title&&n.jsx("div",{className:"input-feedback",children:j.title})]}),n.jsxs("div",{className:"form-group header-options",children:[n.jsx("label",{className:"large",children:"Header Options"}),n.jsxs("label",{className:`author-option-grp${l&&o?" partner-options":""}`,children:[n.jsx("input",{type:"checkbox",name:"displayAuthorName",id:"displayAuthorName",className:"filled-in",checked:v.displayAuthorName,onChange:E=>{_("displayAuthorName",E.target.checked)}}),n.jsx("span",{className:"author-option-radio-btns",children:"Show author name"})]}),l&&o&&n.jsxs(n.Fragment,{children:[n.jsx(me,{component:mt,name:"authorType",id:"default",label:`Use default author (${c} ${h})`,diagId:"use-default-btn",showProfile:C,display:v.displayAuthorName}),n.jsx(me,{component:mt,name:"authorType",id:"custom",label:"Use custom or multiple authors",diagId:"use-custom-btn",display:v.displayAuthorName})]}),(!l||!o)&&v.authorType==="default"&&n.jsxs("label",{className:"default-author-profile-pic-label",children:[n.jsx("input",{type:"checkbox",name:"displayProfilePic",id:"displayProfilePic",className:"filled-in",checked:v.displayProfilePic,onChange:E=>{_("displayProfilePic",E.target.checked)},disabled:!v.displayAuthorName}),n.jsx("span",{children:"Show author profile picture"})]})]}),n.jsxs("div",{className:"form-group",style:{textAlign:"right",padding:"20px"},children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"header-cancel-btn",onClick:p,children:"Cancel"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"header-save-btn",disabled:!w||!!Object.keys(j).length||S,children:"SAVE"})]})]})}})}const Q2e=e=>({userId:e.auth.user&&e.auth.user.id,canUsePartner:e.auth&&e.auth.user&&e.auth.user.can_use_partner,allowPartner:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.partner_permissions&&e.auth.user.company.partner_permissions.allow_partner,firstName:e.auth.user.first_name,lastName:e.auth.user.last_name,authorType:e.studio&&e.studio.insightsMedia&&e.studio.insightsMedia.author_type,authors:e.studio&&e.studio.insightsMedia&&e.studio.insightsMedia.authors,displayAuthorName:e.studio.insightsMedia?.display_author_name,displayProfilePic:e.studio.insightsMedia?.display_profile_picture}),Z2e=le(Q2e,{editInsightsMediaHeader:pje})(X2e);function J2e(e){const{user:t,insightsMedia:r,isDirty:i,setDirty:a,setScrim:s,authorType:o,authors:l,displayAuthorName:c,displayProfilePic:h,firstName:u,lastName:d,professionalCredentials:p,corporateTitle:f,profilePicture:m,isStudioDirty:g,editInsightsMediaAuthor:x,setOrderStatus:v}=e,[b,j]=y.useState(!1),[w,S]=y.useState(!1),_=()=>{j(!0),s(!0)},C=N=>{b?(j(!1),s(!1),a(!1)):w&&((i||g)&&!N?(window.confirm("Changes you made may not be saved.")&&S(!1),v(!1),a(!1)):(S(!1),a(!1)))},E=n.jsx(Z2e,{imId:r?.id,title:r?.title,isDirty:i,setDirty:a,handleCancel:C}),P=n.jsxs("div",{className:"studio-author-info-container fadeTransition",children:[n.jsx("div",{className:"authored-by-header",children:"Authored by"}),o==="default"?n.jsx(n.Fragment,{children:n.jsxs("div",{className:"studio-profile-wrapper",children:[h&&m&&n.jsx("img",{src:m,alt:""}),n.jsxs("div",{className:"studio-author-name",children:[n.jsx("span",{children:`${u} ${d}${p?", "+p:""}`}),f&&n.jsx("div",{className:"author-job-title",children:f})]})]})}):o==="custom"?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"studio-profile-wrapper custom",children:l.map((N,k)=>n.jsxs("div",{className:"studio-author-name",children:[n.jsx("span",{children:N.author_full_name}),N.author_title&&n.jsx("div",{className:"author-job-title",children:N.author_title})]},k))}),n.jsxs("button",{className:"btn-primary-icon-text","diagnostic-id":"author-edit-btn",onClick:()=>S(!0),children:[n.jsx("i",{className:"material-symbols-outlined",children:"person_edit"}),l.length===0?"Add Authors":"Edit Authors"]})]}):n.jsx(n.Fragment,{})]}),T=n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"studio-title-container",children:[n.jsxs("div",{className:"studio-title-left",children:[n.jsx("div",{className:"title-group",children:n.jsxs("div",{className:"studio-title-edit",children:[n.jsx("div",{id:"studio-title-name",children:r.title}),n.jsxs("button",{className:"btn-primary-icon-text","diagnostic-id":"header-edit-btn",onClick:_,children:[n.jsx("i",{className:"material-icons",children:"edit"}),"Edit Video/Podcast Title"]})]})}),n.jsxs("div",{id:"studio-title-tag",children:[n.jsx("span",{children:r.process_datetime&&r.process_datetime>r.update_datetime?"Last processed ":"Last edited "}),n.jsx(gn,{local:!0,format:"MMM D, YYYY h:mma",children:r.process_datetime&&r.process_datetime>r.update_datetime?r.process_datetime:r.update_datetime})," ",new Date().toLocaleTimeString("en-us",{timeZoneName:"short"}).split(" ")[2]]})]}),n.jsx("div",{className:"studio-title-right"})]}),c&&P]});return n.jsxs("div",{className:`studio-header${b?" edit":""}`,children:[b?E:T,w&&n.jsx(aF,{modal:w,setModal:S,handleCancel:C,authors:l,itemId:r?.id,title:r?.t
129itle,isDirty:i,setDirty:a,editAuthors:x,setOrderStatus:v,isWorkspaceDirty:g,isInsightsMedia:!0})]})}const eMe=e=>({user:e.auth.user,authorType:e.studio&&e.studio.insightsMedia&&e.studio.insightsMedia.author_type,authors:e.studio&&e.studio.insightsMedia&&e.studio.insightsMedia.authors,displayAuthorName:e.studio.insightsMedia?.display_author_name,displayProfilePic:e.studio.insightsMedia?.display_profile_picture,firstName:e.auth.user.first_name,lastName:e.auth.user.last_name,professionalCredentials:e.auth.user.professional_credentials,corporateTitle:e.auth.user.corporate_title,profilePicture:e.auth.user.profile_picture_url,isStudioDirty:e.studio.isDirty}),tMe=le(eMe,{setScrim:hn,editInsightsMediaAuthor:Qxe,setOrderStatus:Jxe})(zt(J2e));function nMe(e){const{insightsMedia:t,setScrim:r,userId:i,canUsePartner:a,allowPartner:s,isSummary:o,isDisclosures:l,textToDisplay:c}=e,[h,u]=y.useState(!1),d=f=>{f.preventDefault(),u(!0),r(!0)},p=ti(c);return n.jsx("div",{className:`insights-media-content${l?" disclosures":""}`,"diagnostic-id":l?"disclosures-text-content":o?"summary-text-content":"",children:n.jsxs("div",{className:"insights-media-content-container",children:[n.jsx("div",{className:"content-header-wrapper",children:n.jsxs("div",{className:"content-icon-text-grp",children:[n.jsx("i",{className:"material-icons-outlined",children:l?"description":o?"summarize":""}),n.jsx("h4",{children:l?"Disclosures":o?"Summary":""})]})}),n.jsx("p",{children:l?"Add your company's disclosures here":o?"Add a brief summary of this video or podcast":""}),h?n.jsx(mc,{showQuill:h,setShowQuill:u,setScrim:e.setScrim,insightsMedia:t,isInsightsMedia:!0,textToDisplay:c,type:l?"disclosures":o?"summary":""}):n.jsx(n.Fragment,{children:c?n.jsxs("div",{className:"insights-media-content-wrapper",children:[n.jsx("div",{className:"insights-media-content-scrim"}),n.jsxs("button",{onClick:d,className:"insights-media-content-edit-btn",children:[n.jsx("i",{className:"material-icons edit-icon",children:"edit"}),"EDIT"]}),n.jsx("div",{className:"insights-media-text-content",dangerouslySetInnerHTML:{__html:p}})]}):n.jsx("div",{className:"add-content-text-btn-container","diagnostic-id":`add-${l?"disclosures":o?"summary":""}-text-btn-container`,children:n.jsxs("div",{id:"add-summary-text-btn",className:"add-summary-text-btn","diagnostic-id":`add-${l?"disclosures":o?"summary":""}-text-card-btn`,onClick:d,children:[l?"Add Disclosures":o?"Add Summary Text":"",n.jsx("i",{className:"material-icons",children:"add_circle"})]})})})]})})}const rMe=e=>({userId:e.auth.user&&e.auth.user.id,canUsePartner:e.auth&&e.auth.user&&e.auth.user.can_use_partner,allowPartner:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.partner_permissions&&e.auth.user.company.partner_permissions.allow_partner}),oD=le(rMe,{setScrim:hn})(zt(nMe));function iMe(e){const{currentImage:t,setModal:r,modal:i,userId:a,handleCancel:s,editInsightsMediaThumbnail:o,insightsMediaId:l}=e,[c,h]=y.useState(null),u=y.useRef(null),d=()=>{u.current?.cropper},p=c||t,f=(x,v,b,j,w,S)=>{x===void 0?(h(null),delete b.imageFile,delete v.imageFile):Bo(x)?x&&x.size>1048576*5?(h(null),S(`${j}File`,void 0,!1),w(j+"File","That file is larger than 5MB. Please use a smaller file or contact us for help.")):(h(URL.createObjectURL(x)),S(`${j}File`,x),delete v.imageFile):w(j+"File","Image must be a PNG or JPG/JPEG file.")},m=(x,v)=>{if(x!=="#"){let b=x.split(","),j=b[0].match(/:(.*?);/)[1],w=atob(b[b.length-1]),S=w.length,_=new Uint8Array(S);for(;S--;)_[S]=w.charCodeAt(S);return new File([_],v,{type:j})}},g=x=>{if(typeof u.current?.cropper<"u"){const v=m(u.current?.cropper.getCroppedCanvas().toDataURL(x.type),x&&x.name);o(l,a,v).then(()=>{h(null)}).then(()=>s(!0))}};return y.useEffect(()=>{c&&!e.isDirty?e.setDirty(!0):!c&&e.isDirty&&e.setDirty(!1)},[c]),n.jsx(ot,{setModal:r,disableClickOutsideCancel:!0,children:n.jsxs("div",{className:"image-upload-modal-container","diagnostic-id":"insights-media-thumbn
129ail-upload-modal-container",children:[n.jsx("i",{className:"material-icons",onClick:()=>s(),children:"close"}),n.jsx(gt,{initialValues:{imageFile:void 0},onSubmit:(x,{setSubmitting:v})=>{g(x.imageFile)},enableReinitialize:!0,children:({values:x,touched:v,errors:b,dirty:j,isSubmitting:w,setFieldError:S,setFieldValue:_})=>n.jsxs(vt,{onClick:C=>C.stopPropagation(),children:[n.jsx("h5",{children:"Upload a Thumbnail Image"}),n.jsx("p",{className:"choose-image-msg",children:"Choose a .jpg, .jpeg, or .png image to use as the thumbnail for this video insight. The recommended image dimensions are 600px wide and 450px tall."}),b.imageFile&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:b.imageFile}),n.jsx("input",{id:"imageFile","diagnostic-id":"image-input",name:"imageFile",type:"file",accept:"image/png,image/x-png,image/jpeg,image/jpg",value:c?c.name:"",onChange:C=>{f(C.currentTarget.files[0],b,x,"image",S,_)},className:b.imageFile&&v.imageFile?"text-input error":"file-path validate"}),n.jsxs("div",{className:`img-upload-grp cropped-image${p?" with-img":" without-img"}`,children:[n.jsx(Eo,{id:"imageFile",diagId:"image-upload-drag-drop-input",name:"imageFile",acceptedTypes:"image/png,image/x-png,image/jpeg,image/jpg",value:c?c.name:"",onChange:C=>{f(C.currentTarget.files[0],b,x,"image",S,_)},className:`drag-drop-input${b.imageFile&&v.imageFile?" text-input error":" file-path validate"}`}),p?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"image-group",children:n.jsx(LF,{src:p,aspectRatio:16/9,guides:!1,crop:d,ref:u,viewMode:1,minCropBoxHeight:10,minCropBoxWidth:10,background:!1,responsive:!0,autoCropArea:1,zoomable:!1})}),c&&n.jsx("button",{id:"clear-btn",type:"button",onClick:()=>{f(void 0,b,x,"image",S,_)},children:"Undo"})]}):n.jsxs("div",{className:"image-group-placeholder",children:[n.jsx("i",{className:"material-icons",children:"panorama"}),n.jsx("p",{children:"Drag and drop an image file here, or click to select a file to upload"})]})]}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>s(),children:"Cancel"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",disabled:!c,children:"Save"})]})]})})]})})}const aMe=e=>({userId:e.auth.user&&e.auth.user.id}),sMe=le(aMe,{editInsightsMediaThumbnail:A$})(iMe);function oMe(e){const{insightsMedia:t,updateInsightsMediaThumbnailType:r,user:i,editInsightsMediaThumbnail:a}=e,[s,o]=y.useState(!1),[l,c]=y.useState(!1),h=f=>{e.isDirty&&!f?window.confirm("Changes you made may not be saved.")&&(o(!1),e.setDirty(!1)):(o(!1),e.setDirty(!1))},u=f=>{f.preventDefault();const m=f.currentTarget.id;r(t.id,i.id,m)},d=()=>{a(t.id,i.id,null).then(()=>{c(!1)})},p=l&&n.jsx(ot,{setModal:c,children:n.jsxs("div",{className:"delete-modal-container",children:[n.jsx("h5",{children:"Please Confirm"}),n.jsx("p",{children:"Are you sure you want to permanently delete this thumbnail?"}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>{c(!1)},children:"CANCEL"}),n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",onClick:d,children:"DELETE"})]})]})});return n.jsxs("div",{className:"insights-media-content-container thumbnail",children:[n.jsx("div",{className:"content-header-wrapper",children:n.jsx("div",{className:"content-icon-text-grp",children:n.jsx("h4",{children:"Thumbnail"})})}),n.jsx("p",{children:"Select or upload a picture that shows what’s in your video. A good thumbnail stands out and draws viewers’ attention."}),n.jsxs("div",{className:"thumbnail-img-grp",children:[t.thumbnail_image_jpg_url&&n.jsx("div",{className:"col s12 m6 l3 xl3",children:n.jsx("div",{className:`thumbnail-img default${t.thumbnail_image_type==="default"?" selected":""}`,children:n.jsx("img",{src:t.thumbnail_image_jpg_url,alt:"",onClick:f=>t.thumbnail_image_type!=="default"?u(f):void 0,id:"default"})})}),n.jsx("div",{className:"col s12 m6 l3 xl3",children:n.jsx("div",{className:`thumbnail-img custom${t?.custom_thumbnail_image_url?" has-custom-thumbnail":" has-no-thumbn
129ail"}${t.thumbnail_image_type==="custom"?" selected":""}`,children:t.custom_thumbnail_image_url?n.jsxs(n.Fragment,{children:[n.jsx("img",{id:"custom",src:t.custom_thumbnail_image_url,alt:"",onClick:f=>t.thumbnail_image_type!=="custom"?u(f):void 0}),n.jsx(Ke,{title:"Delete thumbnail",placement:"top",children:n.jsx("div",{className:"clear-picture-container",children:n.jsx("i",{className:"material-icons","diagnostic-id":"profile-pic-clear-btn",onClick:()=>c(!0),children:"cancel"})})})]}):n.jsxs("div",{className:"add-image-icon-text",onClick:()=>o(!0),children:[n.jsx("i",{className:"material-icons-outlined",children:"add_photo_alternate"}),"Upload Thumbnail"]})})})]}),s&&n.jsx(sMe,{currentImage:t.custom_thumbnail_image_url,setModal:o,modal:s,handleCancel:h,isDirty:e.isDirty,setDirty:e.setDirty,insightsMediaId:t.id}),p]})}const lMe=e=>({user:e.auth.user}),cMe=le(lMe,{updateInsightsMediaThumbnailType:Xxe,editInsightsMediaThumbnail:A$})(zt(oMe));function dMe(e){const{modal:t,setModal:r,handleCancel:i,processedUrl:a,updateInsightsMedia:s,insightsMediaId:o,userId:l}=e,[c,h]=y.useState(null),u=c||a,d=(p,f,m,g,x,v)=>{p===void 0?(h(null),delete m.mediaFile,delete f.mediaFile):rV(p)?p&&p.size>5368709120?(h(null),v(`${g}File`,void 0,!1),x(g+"File","That file is larger than 5GB. Please use a smaller file or contact us for help.")):(h(URL.createObjectURL(p)),v(`${g}File`,p),delete f.mediaFile):x(g+"File","That file is not supported. Supported file types include .mp4, .mov, .m4v, and .mp3.")};return y.useEffect(()=>{c&&!e.isDirty?e.setDirty(!0):!c&&e.isDirty&&e.setDirty(!1)},[c]),n.jsx(ot,{setModal:r,disableClickOutsideCancel:!0,children:n.jsxs("div",{className:"media-upload-modal-container","diagnostic-id":"media-upload-modal-container",children:[n.jsx("i",{className:"material-icons",onClick:()=>i(),children:"close"}),n.jsx(gt,{initialValues:{mediaFile:void 0},onSubmit:(p,{setSubmitting:f})=>{s(o,l,p.mediaFile).then(m=>{m&&(h(null),i(!0)),f(!1)})},enableReinitialize:!0,children:({values:p,touched:f,errors:m,dirty:g,isSubmitting:x,setFieldError:v,setFieldValue:b})=>n.jsxs(vt,{onClick:j=>j.stopPropagation(),children:[n.jsx("h5",{children:"Add an Insights Video/Podcast"}),n.jsx("p",{className:"choose-media-msg",children:"To upload a video or podcast, drag and drop your file to the area below. The supported video resolution is 1920 x 1080 pixels. Supported file types include .mp4, .mov, .m4v, and .mp3."}),n.jsx("input",{id:"mediaFile","diagnostic-id":"file-input",name:"mediaFile",type:"file",accept:CS,value:c?c.name:"",onChange:j=>{d(j.currentTarget.files[0],m,p,"media",v,b)},className:`media-choose-input${m.mediaFile&&f.mediaFile?" text-input error":" file-path validate"}${u?" has-file":" has-no-file"}`}),c&&n.jsx("label",{className:"file-name-label",htmlFor:"files",children:p.mediaFile?.name}),n.jsx("div",{className:`media-upload-grp${u?" has-file":" has-no-file"}`,children:u?x?n.jsxs("div",{id:"spinner-icon-container",children:[n.jsx(ur,{size:"4em",thickness:3,variant:"indeterminate"}),n.jsx("div",{className:"media-uploading-text",children:"Your insights media is uploading which may take a few minutes. Please stay on this screen until it’s ready."})]}):n.jsxs(n.Fragment,{children:[p.mediaFile?.type.includes("video")?n.jsx("video",{onContextMenu:j=>j.preventDefault(),className:"uploaded-insights-video",src:u,controls:!0,disablePictureInPicture:!0,controlsList:"nodownload"}):p.mediaFile?.type.includes("audio")?n.jsx("audio",{controls:!0,src:u}):n.jsx(n.Fragment,{}),c&&n.jsx("button",{id:"clear-btn",type:"button",onClick:()=>{d(void 0,m,p,"media",v,b)},children:"Undo"})]}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"media-group-placeholder",children:[n.jsxs("div",{className:"video-audio-icons",children:[n.jsx("i",{className:"material-icons",children:"video_file"}),n.jsx("i",{className:"material-icons",children:"audio_file"})]}),n.jsx("p",{children:"Drag and drop your .mp4, .mov, .m4v, or .mp3 file here, or click to select a file"})]}),n.jsx("input",{id:"mediaFile","diagnostic-id":"media-upload-drag-drop-input",name:"mediaFile",type:"file",accept:CS,value:c?c.name:"",onChange:j=>{d(j.currentTarget.files[0],m,p,"media",v,b)},className:m.mediaFile&&f.mediaFile?"text-input error":"file-path validate"})]})}),m.mediaFile&&n.jsx("div",{className:"input-feedback","diagnostic-id":"input-feedback",children:m.mediaFile}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>i(),disabled:x,children:"Cancel"}),n.jsx("button",{type:"submit",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",disabled:!u||x,children:"Save"})]})]})})]})})}const uMe=e=>({userId:e.auth.user&&e.auth.user.id}),hMe=le(uMe,{updateInsightsMedia:O$})(dMe);function pMe(e){const{insightsMedia:t,updateInsightsMedia:r,userId:i,viewMediaFlag:a,setVie
129wMediaFlag:s}=e,[o,l]=y.useState(!1),[c,h]=y.useState(!1),[u,d]=y.useState(!1),{Processing:p,Succeeded:f,Failed:m,ReRenderNeeded:g,TimedOut:x}=Kl,v=S=>{e.isDirty&&!S?window.confirm("Changes you made may not be saved.")&&(l(!1),e.setDirty(!1)):(l(!1),e.setDirty(!1))},b=o&&n.jsx(hMe,{modal:o,setModal:l,handleCancel:v,processedUrl:t.processed_media_url,insightsMediaId:t.id,isDirty:e.isDirty,setDirty:e.setDirty}),j=()=>{r(t.id,i,null).then(()=>{h(!1)})},w=c&&n.jsx(ot,{setModal:h,children:n.jsxs("div",{className:"delete-modal-container",children:[n.jsx("h5",{children:"Please Confirm"}),n.jsx("p",{children:"Are you sure you want to permanently delete this video/podcast?"}),n.jsxs("div",{className:"buttons",children:[n.jsx("button",{type:"button",className:"btn-cancel","diagnostic-id":"modal-cancel-btn",onClick:()=>{h(!1)},children:"CANCEL"}),n.jsx("button",{type:"button",className:"btn btn-primary","diagnostic-id":"modal-primary-btn",onClick:j,children:"DELETE"})]})]})});return n.jsxs("div",{className:"insights-media-content","diagnostic-id":"insights-media-upload",children:[n.jsxs("div",{className:"insights-media-content-container",children:[n.jsx("div",{className:"content-header-wrapper",children:n.jsxs("div",{className:"content-icon-text-grp",children:[n.jsx("i",{className:"material-icons-outlined",children:"perm_media"}),n.jsx("h4",{children:"Video/Podcast"})]})}),a&&t?.process_status===f?n.jsxs("div",{id:"insights-video-preview-placeholder",children:[n.jsx("div",{className:"insights-video-render-icons",children:n.jsx("i",{className:"material-icons check-icon",children:"check_circle"})}),n.jsx("h4",{className:"video-ready-msg",children:"Your insight is ready"}),n.jsx("button",{className:"btn btn-primary","diagnostic-id":"view-video-btn",onClick:()=>s(!1),children:`View ${t.media_type==="video"?"Video":t.media_type==="podcast"?"Podcast":""}`})]}):t?.process_status===p?n.jsxs("div",{id:"insights-video-preview-placeholder",children:[n.jsxs("div",{className:"insights-video-render-icons",children:[n.jsx("i",{className:"material-icons movie-icon",children:"movie"}),n.jsx("i",{className:"material-icons loading-icon",children:"cached"})]}),n.jsx("h4",{"diagnostic-id":"in-progress-header",children:"Your insights media is processing which may take a few minutes. You can stay on this screen or check back shortly."})]}):(t?.process_status===m||t?.process_status===x)&&!u?n.jsxs("div",{id:"insights-video-preview-placeholder",children:[n.jsx("div",{className:"insights-video-render-icons",children:n.jsx("i",{className:"material-icons",children:"error"})}),n.jsx("h4",{children:"There was a problem creating your media. Please contact us for assistance."}),n.jsxs("div",{className:"button-group",children:[n.jsx("button",{className:"btn-cancel","diagnostic-id":"cancel-btn",onClick:()=>d(!0),children:"Dismiss"}),n.jsx("button",{className:"btn-primary",onClick:()=>window.Intercom("show"),children:"Contact Us"})]})]}):t?.processed_media_url&&t?.process_status===f?n.jsxs("div",{className:"insights-video-preview-container",children:[n.jsxs("div",{className:"insights-video-preview-header",children:[n.jsxs("h4",{children:[n.jsx("i",{className:"material-icons",children:"screen_share"}),t.media_type==="video"?"Video Preview":t.media_type==="podcast"?"Audio Preview":""]}),n.jsx("div",{className:"insights-video-preview-btn-group",children:n.jsxs("button",{type:"button",className:"btn card-btn-delete","diagnostic-id":"insights-media-remove-btn",onClick:()=>h(!0),children:[n.jsx("i",{className:"material-icons",children:"delete_forever"}),n.jsx("span",{children:"Delete"})]})})]}),n.jsx("div",{className:`rendered-insights-video-container${t.media_type==="podcast"?" podcast":""}`,children:t.media_type==="video"?n.jsx("video",{onContextMenu:S=>S.preventDefault(),className:"rendered-insights-video",src:`${t?.processed_media_url}/?time=${Date.now()}`,controls:!0,disablePictureInPicture:!0,controlsList:"nodownload",poster:t.thumbnail_image_type==="default"&&t.thumbnail_image_jpg_url?`${t.thumbnail_image_jpg_url}/?time=${Date.now()}`:t.thumbnail_image_type==="custom"&&t.custom_thumbnail_image_url?`${t.custom_thumbnail_image_url}/?time=${Date.now()}`:""}):t.media_type==="podcast"?n.jsx("audio",{src:t?.processed_media_url,controls:!0,controlsList:"nodownload",className:"uploaded-insights-podcast"}):n.jsx(n.Fragment,{})})]}):n.jsxs(n.Fragment,{children:[n.jsx("p",{children:"Please upload your production-ready video or podcast. The supported video resolution is 1920 x 1080 pixels. Supported file types include .mp4, .mov, .m4v, and .mp3."}),n.jsx("div",{className:"insights-media-upload-btn-container","diagnostic-id":"insights-media-upload-btn-container",children:n.jsxs("div",{id:"insights-media-upload-btn",className:"insights-media-upload-btn","diagnostic-id":"insights-media-upload-card-btn",onClick:()=>l(!0),children:["Add Video/Podcast Content",n.jsx("i",{className:"material-icons",children:"add_circle"})]})})]})]}),t?.processed_media_url&&t.media_type==="video"&&n.jsx(cMe,{insightsMedia:t}),b,w]})}const fMe=e=>({userId:e.auth.user&&e.auth.user.id,canUsePartner:e.auth&&e.auth.user&&e.auth.user.can_use_partner,allowPartner:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.partner_permissions&&e.auth.user.company.partner_permissions.allow_partner}),mMe=le(fMe,{updateInsightsMedia:O$})(zt(pMe));function gMe(e){const{match:t,studio:r,getInsightsMedia:i,userId:a,insightsMediaId:s,setScrim:o,getInsightsMediaSummary:l}=e,{Processing:c}=Kl,[h,u]=y.useState(!0),[d,p]=y.useState(!1),f=3e4,m=r?.insightsMedia;y.useEffect(()=>{const x=t.params.id;o(!1),!r||!r.insightsMedia||r.insightsMedia.id!==x?i(x,a).then(()=>u(!1),()=>{e.history.push("/insights?view=studio")}):u(!1),Ni.parse(e.location.search).view&&e.history.push(`/insightsmedia/${x}`)},[s,r?.insightsMedia?.title,r?.insightsMedia?.display_author_name]),y.useEffect(()=>{let x;if(m?.process_status===c)return l(a,s),x=setInterval(()=>l(a,s),f),()=>{p(!0),clearInterval(x)}},[s,m?.process_status]);const g=n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"back-link-wrapper",children:n.jsxs(Ze,{to:{pathname:"/insights",search:"?view=studio"},className:"back-link","diagnostic-id":"studio-back-btn",children:[n.jsx(ir,{}),n.jsx("span",{children:"Back to Studio"})]})}),n.jsx(da,{}),n.jsxs("div",{className:"studio-editor-wrapper",children:[n.jsx("div",{className:"row",children:n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(tMe,{insightsMedia:m})})}),n.jsxs("div",{className:"row studio-timeline-workspace-container",children:[n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(oD,{insightsMedia:m,isSummary:!0,textToDisplay:m?.description})}),n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(mMe,{insightsMedia:m,viewMediaFlag:d,setVie
129wMediaFlag:p})}),n.jsx("div",{className:"col s12 m12 l12",children:n.jsx(oD,{insightsMedia:m,isDisclosures:!0,textToDisplay:m?.disclosures_text})})]})]})]});return n.jsxs(n.Fragment,{children:[h?n.jsx(Dn,{}):null,n.jsx("div",{className:"container",children:!h&&r&&r.insightsMedia&&g})]})}const vMe=e=>({userId:e.auth.user&&e.auth.user.id,studio:e.studio,insightsMediaId:e.studio.insightsMedia&&e.studio.insightsMedia.id}),bMe=le(vMe,{setScrim:hn,getInsightsMedia:dje,getInsightsMediaSummary:Kxe})(gMe);function yMe({isLicenseUpgradable:e,lastLocation:t,canUseMira:r,canUseFeatured:i,canUseInsightsExplorer:a,allowChartExplorer:s,canUseAssistant:o,canUseQuestionAnswer:l,hedwigPermissions:c,user:h}){const{Enabled:u}=_n,{Community:d,SponsoredCommunity:p}=Br;return n.jsxs(n.Fragment,{children:[n.jsx(pge,{}),n.jsxs(us,{children:[n.jsx(kn,{path:"/terms",component:fge}),n.jsx(kn,{exact:!0,path:"/chartbooks/:id/new/",component:fye}),n.jsx(kn,{exact:!0,path:"/commentaries/:id/",component:lIe}),n.jsx(kn,{exact:!0,path:"/engage/:slug/:id/",component:EIe}),n.jsx(kn,{exact:!0,path:"/insightsvideos/:id",component:K2e}),n.jsx(kn,{exact:!0,path:"/spotlight/:id",component:SAe}),n.jsx(kn,{exact:!0,path:"/solutions/:id",component:pAe}),n.jsx(kn,{exact:!0,path:"/partnerinsights/:id",component:SOe}),n.jsx(kn,{exact:!0,path:"/insights/:id",component:Ru}),n.jsx(kn,{exact:!0,path:"/insightsmedia/:id",component:bMe}),n.jsx(kn,{path:"/insights",component:tI}),n.jsx(kn,{exact:!0,path:"/chartbooks/:id",component:tI}),h?.account_permissions?.name!==d&&h?.account_permissions?.name!==p?n.jsx(kn,{path:"/start",component:hve}):n.jsx(qt,{to:"/insights",from:"/start"}),c?.allow_use_assistant===u&&o?n.jsx(kn,{path:"/assistant",component:sve}):n.jsx(qt,{to:"/insights",from:"/assistant"}),c?.allow_use_question_answer===u&&l?n.jsx(kn,{path:"/questions",component:CDe}):n.jsx(qt,{to:"/insights",from:"/questions"}),s===u?n.jsx(kn,{path:"/chartlibrary",component:DNe}):n.jsx(qt,{to:"/insights",from:"/chartlibrary"}),e||!i?n.jsx(qt,{to:{pathname:"/insights",search:"?view=explorer&filter=all"},from:"/featured"}):n.jsx(kn,{path:"/featured",component:WIe}),n.jsx(kn,{exact:!0,path:"/settings",component:sxe}),n.jsx(kn,{exact:!0,path:"/account",component:Yne}),n.jsx(qt,{to:"/account",from:"/account/*"}),n.jsx(qt,{to:"/insights",from:"/login"}),n.jsx(kn,{exact:!0,path:"/admin/userverify",component:sge}),n.jsx(qme,{path:"/admin",component:Fme}),n.jsx(qt,{to:"/insights",from:"/",exact:!0}),n.jsx(qt,{to:"/insights",from:"/chartbooks",exact:!0}),n.jsx(qt,{to:"/insights",from:"/maintenance",exact:!0}),n.jsx(qt,{to:"/insights",from:"/profile-upload",exact:!0}),n.jsx(kn,{exact:!0,path:"/logout",component:jA}),n.jsx(qt,{to:"/insights",from:"/upgrade"}),n.jsx(qt,{to:"/insights",from:"/acceptterms"}),n.jsx(kn,{path:"*",component:tDe})]}),r&&!e&&n.jsx(sDe,{}),n.jsx(ZIe,{})]})}const xMe=e=>({isLicenseUpgradable:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.license_type&&e.auth.user.company.license_type.is_upgradable,lastLocation:e.auth.lastLocation,canUseMira:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.can_use_mira,canUseFeatured:e.auth&&e.auth.user&&e.auth.user.can_use_featured,canUseInsightsExplorer:e.auth&&e.auth.user&&e.auth.user.can_use_insights_explorer,allowChartExplorer:e.auth&&e.auth.user&&e.auth.user.account_permissions&&e.auth.user.account_permissions.allow_chart_explorer,canUseAssistant:e.auth&&e.auth.user&&e.auth.user.can_use_assistant,canUseQuestionAnswer:e.auth&&e.auth.user&&e.auth.user.can_use_question_answer,hedwigPermissions:e.auth&&e.auth.user&&e.auth.user.company&&e.auth.user.company.hedwig_permissions,user:e.auth.user}),jMe=le(xMe,{})(yMe);function wMe(){return n.jsx(n.Fragment,{})}function SMe({}){return n.jsxs(us,{children:[n.jsx(kn,{path:"/upgrade",component:wMe}),n.jsx(qt,{to:"/upgrade",from:"*"})]})}function _Me({verifyLogin:e,setTokenVerified:t}){return y.useEffect(()=>{e().then(()=>{t(!0)}).catch(()=>{t(!1)})},[]),n.jsx(n.Fragment,{})}const CMe=e=>({}),NMe=le(CMe,{verifyLogin:mD})(_Me);function EMe({user:e,history:t,lastLocation:r,isImpersonating:i,version:a,isAppMinorUpgrade:s,showClickwrap:o,showLogoPage:l}){const[c,h]=y.useState(!1),[u,d]=y.useState(!1),p=Tn.appVersion;return n.jsx(al,{showChildren:c,component:NMe,setTokenVerified:h,children:n.jsx(al,{showChildren:e&&u,setUserLoaded:d,component:Yee,children:n.jsx(al,{showChildrenOnly:!0,showChildren:!s&&!(a&&p!==a),component:SMe,children:n.jsx(al,{showChildrenOnly:!0,showChildren:!l,component:ste,children:n.jsx(al,{showChildrenOnly:!0,showChildren:i||!o,component:qee,children:n.jsx(al,{showChildren:!r,component:Hee,children:n.jsx(kn,{path:"*",component:jMe})})})})})})})}const TMe=e=>({user:e.auth.user,lastLocation:e.auth.lastLocation,isImpersonating:e.auth.isImpersonating,version:e.version.version,isAppMinorUpgrade:e.version.isAppMinorUpgrade,showClickwrap:e.auth.isAuthenticated&&e.auth.user&&!e.auth.user.terms_click_accepted,showLogoPage:e.auth.isAuthenticated&&e.auth.user&&!e.auth.user.is_onboarded&&!e.auth.user.company.is_logo_uploaded}),kMe=le(TMe,{})(EMe);class PMe extends y.Component{render(){const{showSpinnerAuth:t,isUnderMaintenance:r}=this.props;return n.jsx($V,{children:n.jsxs(n.Fragment,{children:[n.jsx(mee,{}),n.jsx(BJ,{}),n.jsx(jee,{}),t?n.jsx(Dn,{}):null,r?n.jsxs(us,{children:[n.jsx(jn,{exact:!0,path:"/maintenance",component:bee}),n.jsx(qt,{to:"/maintenance",from:"*"})]}):n.jsxs(us,{children:[n.jsx(jn,{exact:!0,path:"/login",component:M1}),this.props.isFirstFactorAuthenticated?n.jsx(jn,{exact:!0,path:"/two-factor-authentication",component:LJ}):n.jsx(qt,{to:"/login",from:"/two-factor-authentication"}),n.jsx(jn,{exact:!0,path:"/reset-password",render:i=>n.jsx(M1,{...i,isReset:!0})}),n.jsx(jn,{path:"/reset-password/:key",component:AJ}),n.jsx(jn,{exact:!0,path:"/signup",component:NZ}),n.jsx(jn,{exact:!0,path:"/oidc-authorize",component:VQ}),n.jsx(jn,{exact:!0,path:"/oidc-initiate",component:GQ}),n.jsx(kn,{path:"*",component:kMe})]}),n.jsx(Eee,{})]})})}}const IMe=e=>({isUnderMaintenance:e.maintenance.isUnderMaintenance,showSpinnerAuth:e.auth.showSpinner||e.auth.isLoading,isFirstFactorAuthenticated:e.auth.isFirstFactorAuthenticated}),AMe=le(IMe,{})(PMe);export{PMe as AuthRouter,AMe as default};

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.