1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7323],{18742:function(e,t,n){n.d(t,{T:function(){return ej}});var r=n(85893),i=n(67294),o=n(34143),l=n(21808),a=n(11848),s=n(46039),d=n(94046),c=n(84664),u=n(48995),m=n(74541),f=n(96697),p=n(75126),h=n(38645),v=n(8482),g=n(4065),b=n(23905),y=n(72176),x=n(22229),_=n(56022);let w=_.ZP.div.withConfig({componentId:"sc-fa72f9ad-0"})(e=>{let{theme:{colors:t}}=e;return"\n width: 100%;\n box-sizing: border-box;\n color: ".concat(t.text.primary,";\n padding-bottom: 24px;\n @media (max-width: 959px) { padding: 0 16px 24px; }\n button { font: inherit; }\n button:focus-visible { outline: 2px solid ").concat(t.system.primary,"; outline-offset: 3px; }\n")}),C=_.ZP.section.withConfig({componentId:"sc-fa72f9ad-1"})(e=>{let{theme:{colors:t}}=e;return"\n background: linear-gradient(180deg, ".concat(t.system.backgroundPrimaryLight,", ").concat(t.system.surface,");\n border: 1px solid ").concat(t.system.backgroundPrimaryLight,";\n border-radius: 24px;\n box-shadow: 0 1px 2px #00000026;\n padding: 24px;\n display: flex;\n flex-direction: column;\n gap: 24px;\n h2 { margin: 0; font-size: 24px; line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; }\n @media (max-width: 599px) { padding: 20px; h2 { font-size: 22px; } }\n")}),k=_.ZP.div.withConfig({componentId:"sc-fa72f9ad-2"})(e=>{let{theme:{colors:t}}=e;return"\n color: ".concat(t.text.secondary,"; font-size: 14px; line-height: 1.3; margin-bottom: 4px;\n overflow: hidden; text-overflow: ellipsis; white-space: nowrap;\n")}),S=_.ZP.div.withConfig({componentId:"sc-fa72f9ad-3"})(e=>{let{theme:{colors:t}}=e;return"\n color: ".concat(t.text.secondary,"; font-size: 14px; line-height: 1.3; margin-top: 8px;\n strong { color: ").concat(t.text.primary,"; font-weight: 500; }\n")}),j=_.ZP.div.withConfig({componentId:"sc-fa72f9ad-4"})(e=>{let{theme:{colors:t},$due:n}=e;return"\n display: flex; align-items: center; gap: 4px; font-size: 14px; line-height: 1.3;\n color: ".concat(n?t.system.primary:t.text.secondary,";\n")}),D=_.ZP.div.withConfig({componentId:"sc-fa72f9ad-5"})(e=>{let{theme:{colors:t},$hero:n}=e;return"\n height: ".concat(n?6:5,"px; border-radius: 99px; background: ").concat(t.elements.outline,";\n overflow: hidden; display: flex; width: 100%;\n > span { height: 100%; background: ").concat(t.system.primary,"; }\n > span + span { opacity: 0.4; }\n")}),I=_.ZP.button.withConfig({componentId:"sc-fa72f9ad-6"})(e=>{let{theme:{colors:t}}=e;return"\n width: 100%; min-height: 56px; padding: 16px; border: 0; border-radius: 12px;\n background: ".concat(t.system.primary,"; color: ").concat(t.system.onPrimary,";\n box-shadow: inset 0 -5px 0 #0000001f; font-size: 16px !important; font-weight: 600 !important; cursor: pointer;\n &:hover:not(:disabled) { filter: brightness(0.96); }\n &:disabled { opacity: 0.5; cursor: default; }\n")}),T=_.ZP.div.withConfig({componentId:"sc-fa72f9ad-7"})(["display:flex;flex-direction:column;gap:10px;"]),P=_.ZP.h2.withConfig({componentId:"sc-fa72f9ad-8"})(e=>{let{theme:{colors:t}}=e;return"\n margin: 32px 8px 16px; font-size: 14px; line-height: 1.3; font-weight: 500; color: ".concat(t.text.secondary,";\n")}),A=_.ZP.div.withConfig({componentId:"sc-fa72f9ad-9"})(e=>{let{theme:{colors:t}}=e;return"\n background: ".concat(t.system.surface,"; border-radius: 24px; overflow: hidden; padding: 4px 0;\n")}),E=_.ZP.div.withConfig({componentId:"sc-fa72f9ad-10"})(e=>{let{$depth:t}=e;return"\n padding: 16px 24px; margin-left: ".concat(32*Math.min(t,5),"px;\n position: relative; min-width: 0;\n ").concat(t?"border-left: 1px solid #99999b40; margin-right: 12px;":"","\n @media (max-width: 599px) { padding: 16px; margin-left: ").concat(20*Math.min(t,3),"px; }\n")}),L=_.ZP.div.withConfig({componentId:"sc-fa72f9ad-11"})(["display:flex;gap:8px;align-items:center;min-width:0;"]),R=_.ZP.button.withConfig({componentId:"sc-fa72f9ad-12"})(["background:none;border:0;padding:0;color:inherit;cursor:pointer;flex:1;min-width:0;text-align:left;display:flex;flex-direction:column;gap:4px;&:disabled{cursor:default;}"]),M=_.ZP.span.withConfig({componentId:"sc-fa72f9ad-13"})(["font-size:16px;font-weight:500;line-height:1.3;display:block;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]),F=_.ZP.button.withConfig({componentId:"sc-fa72f9ad-14"})(["display:flex;align-items:center;justify-content:center;flex-shrink:0;width:28px;height:28px;background:none;border:0;padding:0;color:inherit;cursor:pointer;"]),Z=_.ZP.div.withConfig({componentId:"sc-fa72f9ad-15"})(["margin-top:8px;padding:0 4px;"]),z=_.ZP.div.withConfig({componentId:"sc-fa72f9ad-16"})(["display:flex;align-items:center;justify-content:space-between;gap:16px;img{width:100px;height:100px;object-fit:contain;}"]);var H=n(70668),B=n(52538),N=n(3208),O=n(92880),K=n(23275),V=n(86180),G=n(26117),U=n(67165),Y=n(76097),q=n(38679);let Q=e=>{let t=Math.max(1,Math.ceil(e/60));return t>=60?p.s.t("Home_Study_HoursMinutes",{hours:Math.floor(t/60),minutes:t%60}):p.s.t("Home_Study_Minutes",{count:t})},W=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(null===e||null===t)return"";let i=new Date(1e3*e),o=new Date(1e3*n),l=Math.round((Date.UTC(i.getFullYear(),i.getMonth(),i.getDate())-Date.UTC(o.getFullYear(),o.getMonth(),o.getDate()))/864e5);return l<=0?p.s.t("Home_Study_At",{count:t,time:i.toLocaleTimeString(p.s.getLocale(),{hour:"numeric",minute:"2-digit"})}):1===l?p.s.t(r?"Home_Study_SummaryTomorrow":"Home_Study_Tomorrow",{count:t}):p.s.t(r?"Home_Study_SummaryInDays":"Home_Study_InDays",{count:t,days:String(l)}
1)},X=e=>{if(null===e.count)return p.s.t("Home_Study_Unknown");let t="completed"===e.state||"empty"===e.state?"Home_Study_Unknown":({first:"Home_Study_Start",continue:"Home_Study_Continue",interrupted:"Home_Study_Resume",waiting:"Home_Study_Wait",ready:"Home_Study_Review"})[e.state];return p.s.t(t,{count:e.count})},J=(e,t)=>{var n,r;return e?"speedLearning"===e.mode?p.s.t("Home_Study_SL",{count:null!==(n=e.cardsToday)&&void 0!==n?n:0}):(null!==(r=e.cardsToday)&&void 0!==r?r:0)>0?p.s.t("Home_Study_Today",{count:e.cardsToday}):W(e.nextCardAppearsAt,e.nextCardAppearsCount,t):""};var $=n(67006);function ee(e){let{deck:t,hero:n=!1}=e,i=(0,$.e)(t);return(0,r.jsxs)(D,{$hero:n,"aria-label":t.name,"aria-valuemax":i.total,"aria-valuemin":0,"aria-valuenow":i.learned,role:"progressbar",children:[(0,r.jsx)("span",{style:{width:"".concat(100*i.learnedFraction,"%")}}),(0,r.jsx)("span",{style:{width:"".concat(100*i.learningFraction,"%")}})]})}function et(e){var t,n;let{deck:i,facts:o,now:l,depth:a,hasChildren:s,isCollapsed:d,isManaging:c=!1,onToggle:u,onPress:m,onMove:f,onDelete:h,onAddSubdeck:v,onArchive:g}=e,b=(0,Y.W)(i),y=(0,q.p)(i.state),x=(0,O.E)({deck:i,nestingLevel:a,areAllActionsExceptDeleteDisabled:y||!!b,onMovePress:f,onDeletePress:h,onAddSubdeckPress:v,onArchivePress:g}),_=0===i.totalCardsCount?p.s.t("Decks_LearningStateHints_EmptyDeck"):J(o,l),w=(null!==(n=null==o?void 0:o.cardsToday)&&void 0!==n?n:0)>0||(null==o?void 0:o.nextCardAppearsAt)!=null&&new Date(1e3*o.nextCardAppearsAt).toDateString()===new Date(1e3*l).toDateString(),C=d?K.p:V.V;return(0,r.jsx)(B.e,{buttons:x,children:(0,r.jsxs)(E,{$depth:a,"data-testid":"home-deck-".concat(i.id),children:[(0,r.jsxs)(L,{children:[s&&(0,r.jsx)(F,{"aria-expanded":!d,"aria-label":i.name,onClick:()=>u("deck-".concat(i.id)),children:(0,r.jsx)(C,{colorToken:"text.secondary",size:20})}),(0,r.jsxs)(R,{disabled:y,onClick:()=>{var e;b?null===(e=H.b.show)||void 0===e||e.call(H.b,{title:b.title,body:b.label}):y||m(i.id)},children:[(0,r.jsx)(M,{children:i.name}),y||b||!_?(0,r.jsx)(N.O,{deck:i}):(0,r.jsxs)(j,{$due:w,children:[i.totalCardsCount>0&&(0,r.jsx)(G.w,{colorToken:w?"system.primary":"text.secondary",size:14}),_]})]}),c&&!(null===(t=x.find(e=>"destructive"===e.type))||void 0===t?void 0:t.isDisabled)&&(0,r.jsx)(F,{"aria-label":p.s.t("DeckInfo_Settings_DeckSection_deleteDeck"),onClick:()=>h(i),children:(0,r.jsx)(U.p,{colorToken:"system.error",size:24})})]}),!y&&0===a&&i.totalCardsCount>i.frozenCardsCount&&(0,r.jsx)(Z,{children:(0,r.jsx)(ee,{deck:i})})]})})}var en=n(12306),er=n(76486),ei=n(74635),eo=n(25646),el=n(91005),ea=n(24722);let es="__home_learned__";function ed(e){var t,n;let{hero:o,deck:l,category:a,now:s}=e,{navigate:d}=(0,el.s0)(),{guardAction:c}=(0,eo.I)(),{loadLearningData:u,isLoadingLearningData:m}=(0,en.q)(null==l?void 0:l.id),v=null!==(t=(0,f.C)(h.UW))&&void 0!==t?t:0,g=W(o.nextCardAppearsAt,o.nextCardAppearsCount,s,!0),b=async()=>{l&&"waiting"!==o.state&&!m&&(await c(l.id,"learn")||u((e,t)=>{if(!er.g.getBool(y.a4.LearningTutorialShown)&&l.algorithmType===ei.B.spacedRepetition){if(v>0)er.g.setBool(y.a4.LearningTutorialShown,!0);else{d(ea.xr.LearnTutorial,{state:{deck:l,data:e,learnStartTimestamp:t}});return}}d(ea.xr.Learn,{state:{deck:l,data:e,learnStartTimestamp:t}})}))};if("completed"===o.state||"empty"===o.state)return(0,r.jsx)(C,{"data-testid":"home-state-".concat(o.state),children:(0,r.jsxs)(z,{children:[(0,r.jsxs)("div",{children:["completed"===o.state&&(0,r.jsx)(k,{children:p.s.t("Home_Study_GreatJob")}),(0,r.jsx)("h2",{children:p.s.t("completed"===o.state?"Home_Study_Completed":"Home_Study_Rest")}),g&&(0,r.jsx)(S,{children:p.s.t("Home_Study_Next",{schedule:g})})]}),"completed"===o.state&&(0,r.jsx)("img",{alt:"",src:"/images/home-completed.gif"})]})});if(!l)return null;let x=(0,$.e)(l),_=p.s.t("Home_Study_Progress",{learned:es,total:x.total});return(0,r.jsxs)(C,{"data-testid":"home-state-".concat(o.state),children:[(0,r.jsxs)("div",{children:[a&&(0,r.jsx)(k,{children:a}),(0,r.jsx)("h2",{children:l.name})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(ee,{hero:!0,deck:l}),(0,r.jsx)(S,{children:x.learned===x.total&&x.total>0?p.s.t("Home_Study_AllLearned"):_.split(es).map((e,t)=>(0,r.jsxs)(i.Fragment,{children:[t>0&&(0,r.jsx)("strong",{children:x.learned}),e]},t))}
1),"waiting"===o.state&&(0,r.jsxs)(j,{$due:!0,children:[(0,r.jsx)(G.w,{colorToken:"system.primary",size:14}),p.s.t("Home_Study_Waiting",{duration:Q((null!==(n=o.nextCardAppearsAt)&&void 0!==n?n:s)-s)})]}),"ready"===o.state&&(0,r.jsx)(j,{$due:!0,children:p.s.t("Home_Study_Ready")}),x.learned===x.total&&g&&(0,r.jsx)(S,{children:p.s.t("Home_Study_Next",{schedule:g})})]}),(0,r.jsx)(I,{"aria-busy":m,disabled:"waiting"===o.state||m,onClick:b,children:X(o)})]})}var ec=n(40105);let eu=e=>{let t=new Map,n=(e,r)=>{e.forEach(e=>{let i=[...r,e.id];t.set(e.id,i),n(e.children,i)})};return n(e.decks,[]),e.folders.forEach(e=>n(e.decks,[])),t};var em=n(78657),ef=n(23409),ep=n.n(ef),eh=n(74013),ev=n.n(eh),eg=n(25154),eb=n.n(eg),ey=n(84336),ex=n.n(ey);ep().extend(eb()),ep().extend(ev());let e_=(e,t)=>{if(!ex()(null==e?void 0:e.dayStartsAt)&&e.dayStartsAt<=t&&e.dayEndsAt>t)return{dayStartsAt:e.dayStartsAt,dayEndsAt:e.dayEndsAt};if(null==e?void 0:e.timeZone){let n=ep().unix(t).tz(e.timeZone).format("YYYY-MM-DD"),r=ep().utc(n).add(1,"day").format("YYYY-MM-DD");return{dayStartsAt:ep().tz(n,e.timeZone).unix(),dayEndsAt:ep().tz(r,e.timeZone).unix()}}let n=new Date(1e3*t);n.setHours(0,0,0,0);let r=new Date(n);return r.setDate(r.getDate()+1),{dayStartsAt:n.getTime()/1e3,dayEndsAt:r.getTime()/1e3}};var ew=n(45455),eC=n.n(ew);let ek=(e,t,n)=>{let r=e.filter(e=>e.eligible),i=r.filter(e=>null===e.cardsToday||e.cardsToday>0),o=e=>[...e].sort((e,t)=>{var n,r;return(null!==(n=t.lastStudiedAt)&&void 0!==n?n:0)-(null!==(r=e.lastStudiedAt)&&void 0!==r?r:0)||Number(e.id)-Number(t.id)})[0],l=(e,t)=>({state:e,deckId:t.id,count:"waiting"===e?t.nextCardAppearsCount:t.cardsToday,nextCardAppearsAt:t.nextCardAppearsAt,nextCardAppearsCount:t.nextCardAppearsCount}),a=i.filter(e=>{var t;return"spacedRepetition"===e.mode&&(null!==(t=e.learntTodayCount)&&void 0!==t?t:0)>0&&null!==e.dueAt}).sort((e,t)=>{var n,r;return(null!==(n=e.dueAt)&&void 0!==n?n:0)-(null!==(r=t.dueAt)&&void 0!==r?r:0)||Number(e.id)-Number(t.id)});if(a[0])return l("ready",a[0]);let s=o(i.filter(e=>e.startedToday));if(s)return l("interrupted",s);let d=o(i.filter(e=>!1!==e.hasHistory));if(d)return l("continue",d);if(eC()(i)){var c,u,m,f;let e=r.filter(e=>"spacedRepetition"===e.mode);if(eC()(e))return null;let i=e.filter(e=>null!==e.nextCardAppearsAt).sort((e,t)=>{var n,r;return(null!==(n=e.nextCardAppearsAt)&&void 0!==n?n:0)-(null!==(r=t.nextCardAppearsAt)&&void 0!==r?r:0)||Number(e.id)-Number(t.id)}),o=i.find(e=>{var r;return(null!==(r=e.learntTodayCount)&&void 0!==r?r:0)>0&&e.nextCardAppearsAt>t&&e.nextCardAppearsAt<n});return o?l("waiting",o):{state:e.some(e=>{var t;return(null!==(t=e.learntTodayCount)&&void 0!==t?t:0)>0})?"completed":"empty",deckId:null,count:null,nextCardAppearsAt:null!==(m=null===(c=i[0])||void 0===c?void 0:c.nextCardAppearsAt)&&void 0!==m?m:null,nextCardAppearsCount:null!==(f=null===(u=i[0])||void 0===u?void 0:u.nextCardAppearsCount)&&void 0!==f?f:null}}let p=[...i].sort((e,t)=>{var n,r;return(null!==(n=e.cardsToday)&&void 0!==n?n:0)-(null!==(r=t.cardsToday)&&void 0!==r?r:0)||Number(e.id)-Number(t.id)})[0];return p?l("first",p):null};var eS=n(45007);function ej(e){let{isManaging:t=!1,folderId:n,onDeckPress:_,onFolderPress:C,onMoveDeck:k,onCreateDeck:S}=e,{askArchiveDeck:j}=(0,c.v)(),D=(0,m.n)(),{decks:I,facts:E,hero:L,now:R,hierarchy:M}=function(){let e=(0,f.C)(v.PP),t=(0,f.C)(e=>e.decks.home),n=(0,f.C)(e=>e.decks.homeReceivedAt),r=(0,f.C)(h.c7),o=(null==t?void 0:t.userId)===r?t:null,l=(0,f.C)(v.gW),a=(0,i.useMemo)(()=>eu(l),[l]),s=(0,eS.I0)(),[d,c]=(0,i.useState)(Date.now),u=o&&n?o.generatedAt-n/1e3:0,m=d/1e3+u,p=(0,i.useMemo)(()=>e_(o,m),[o,m]),g=(0,i.useMemo)(()=>(function(e){var t;let{decks:n,snapshot:r,localActivity:i,now:o,localNow:l=o,dayStartsAt:a=e_(r,o).dayStartsAt,isOffline:s,offlineAvailableDeckIds:d,ancestors:c=new Map,cachedCards:u}=e,m=new Map(n.map(e=>[e.id,e])),f=new Map(null==r?void 0:r.decks.map(e=>[e.id,e])),p=new Map,h=new Set;i.forEach(e=>{var t,n,r,i,s;let d=e.reviewedAt-(l-o),u=null!==(t=e.learntTodayCount)&&void 0!==t?t:d>=a&&d<=o?1:0;u&&h.add(e.deckId);let m=null!==(n=e.cardDeckId)&&void 0!==n?n:e.deckId;for(let e of null!==(r=c.get(m))&&void 0!==r?r:[m]){let t=p.get(e);p.set(e,{latest:Math.max(d,null!==(i=null==t?void 0:t.latest)&&void 0!==i?i:0),today:u+(null!==(s=null==t?void 0:t.today)&&void 0!==s?s:0)})}});let v=new Map;
1null==u||u.forEach(e=>{var t,n,r,i,o,l;for(let a of null!==(t=c.get(e.deckId))&&void 0!==t?t:[e.deckId]){let t=v.get(a),s=Math.min(null!==(n=null==t?void 0:t.nextAt)&&void 0!==n?n:1/0,null!==(r=e.nextAt)&&void 0!==r?r:1/0);v.set(a,{deckId:a,cachedCount:e.cachedCount+(null!==(i=null==t?void 0:t.cachedCount)&&void 0!==i?i:0),available:e.available+(null!==(o=null==t?void 0:t.available)&&void 0!==o?o:0),dueAt:(null==t?void 0:t.dueAt)==null?e.dueAt:Math.min(t.dueAt,null!==(l=e.dueAt)&&void 0!==l?l:1/0),nextAt:Number.isFinite(s)?s:null,nextCount:(e.nextAt===s?e.nextCount:0)+((null==t?void 0:t.nextAt)===s?t.nextCount:0)})}});let g=!!r&&r.dayEndsAt>o&&(null!==(t=r.dayStartsAt)&&void 0!==t?t:-1/0)<=o;return n.map(e=>{var t,n,i,l,a,b,y,x,_,w,C,k,S,j;let D=f.get(e.id),I=p.get(e.id),T=v.get(e.id),P=g&&null!==(t=null==D?void 0:D.learntTodayCount)&&void 0!==t?t:0,A=Math.max(P,null!==(n=null==I?void 0:I.today)&&void 0!==n?n:0),E=e.algorithmType===ei.B.speedLearning,L=E?e.newCardsCount+e.studyAgainCardsCount:e.newCardsCount+e.learningCardsCount+e.graduatedCardsCount,R=E&&0===L&&!A?e.gotItCardsCount:L,M=E?null:e.nextCardAppearsAt,F=null!==(i=null==D?void 0:D.nextCardAppearsCount)&&void 0!==i?i:null,Z=g&&(null==D?void 0:D.nextCardAppearsAt)!=null&&D.nextCardAppearsAt<=o;s||!Z||I||(R=Math.max(R,null!=F?F:0)),s||!r||g||0!==R||(R=null),s&&u&&(R=null!==(l=null==T?void 0:T.available)&&void 0!==l?l:0,M=null!==(a=null==T?void 0:T.nextAt)&&void 0!==a?a:null,F=null!==(b=null==T?void 0:T.nextCount)&&void 0!==b?b:null);let z=null!==(y=c.get(e.id))&&void 0!==y?y:[e.id],H=(!s||!d||d.has(e.id))&&(!s||!u||(null!==(x=null==T?void 0:T.cachedCount)&&void 0!==x?x:0)>0)&&!(0,q.p)(e.state)&&!["disabled","suspended","processingFailed","notesMoving","draft"].includes(e.state)&&!z.some(e=>{var t;let n=m.get(e);return(null===(t=f.get(e))||void 0===t?void 0:t.eligible)===!1||n&&((0,q.p)(n.state)||["disabled","suspended","notesMoving","draft"].includes(n.state))})&&!(0,em.c)(e)&&e.totalCardsCount>e.frozenCardsCount,B=!!I||(null!==(_=null==D?void 0:D.hasHistory)&&void 0!==_?_:null),N=null;return!E&&A>0&&(s&&u?N=null!==(w=null==T?void 0:T.dueAt)&&void 0!==w?w:null:Z?N=D.nextCardAppearsAt:M&&M<=o?N=M:g&&(N=null!==(C=null==D?void 0:D.dueAt)&&void 0!==C?C:null)),{id:e.id,mode:e.algorithmType,eligible:H,cardsToday:0!==R||s&&u||null!==B&&(E||M)?R:null,hasHistory:B,lastStudiedAt:I?Math.max(I.latest,null!==(k=null==D?void 0:D.lastStudiedAt)&&void 0!==k?k:0):null!==(S=null==D?void 0:D.lastStudiedAt)&&void 0!==S?S:null,learntTodayCount:A,startedToday:h.has(e.id)||!!P&&null!==(j=null==D?void 0:D.startedToday)&&void 0!==j&&j,dueAt:N,nextCardAppearsAt:M,nextCardAppearsCount:F}})})({decks:e,snapshot:o,localActivity:[],now:m,...p,isOffline:!1,ancestors:a}),[e,o,m,p,a]),b=(0,i.useMemo)(()=>ek(g,m,p.dayEndsAt),[g,m,p.dayEndsAt]),y=(0,i.useMemo)(()=>new Map(g.map(e=>[e.id,e])),[g]);return(0,i.useEffect)(()=>{c(Date.now())},[o]),(0,i.useEffect)(()=>{let e=()=>{"hidden"!==document.visibilityState&&(c(Date.now()),s((0,ec.Vy)({isSilent:!0})))};return window.addEventListener("focus",e),document.addEventListener("visibilitychange",e),()=>{window.removeEventListener("focus",e),document.removeEventListener("visibilitychange",e)}},[s]),(0,i.useEffect)(()=>{let e=Math.min(p.dayEndsAt,...g.flatMap(e=>e.eligible&&null!==e.nextCardAppearsAt&&e.nextCardAppearsAt>m?[e.nextCardAppearsAt]:[])),t=Math.max(1e3,Math.min(6e4,(e-m)*1e3)),n=window.setTimeout(()=>{"hidden"!==document.visibilityState&&(c(Date.now()),Date.now()/1e3+u>=e&&s((0,ec.Vy)({isSilent:!0})))},t);return()=>window.clearTimeout(n)},[p.dayEndsAt,s,g,m,u]),{decks:e,hero:b,facts:y,now:m,hierarchy:l}}(),F=(0,f.C)(v.Vn),Z=(0,f.C)(g.B5),z=(0,f.C)(h.c7),[H,B]=(0,b.N)(y.a4.HomeCollapsedGroups,{withSubscribe:!0}),N=null==H?void 0:H[String(z)],O=e=>B({...H,[String(z)]:{...N,[e]:!(null==N?void 0:N[e])}}),K=(0,i.useMemo)(()=>(function(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=arguments.length>5?arguments[5]:void 0,l=new Map(e.map(e=>[e.id,e])),a=(e,t)=>{var n,i,o,l,a,s,d,c;return Number((null!==(a=null===(n=r.get(t.id))||void 0===n?void 0:n.cardsToday)&&void 0!==a?a:0)>0)-Number((null!==(s=null===(i=r.get(e.id))||void 0===i?void 0:i.cardsToday)&&void 0!==s?s:0)>0)||(null!==(d=null===(o=r.get(t.id))||void 0===o?void 0:o.lastStudiedAt)&&void 0!==d?d:0)-(null!==(c=null===(l=r.get(e.id))||void 0===l?void 0:l.lastStudiedAt)&&void 0!==c?c:0)||Number(e.id)-Number(t.id)},s=(e,t,n)=>
1{[...e].sort(a).forEach(e=>{var r;let o=l.get(e.id);o&&(n.push({deck:o,depth:t,hasChildren:!!(null===(r=e.children)||void 0===r?void 0:r.length)}),!i["deck-".concat(o.id)]&&e.children&&s(e.children,t+1,n))})},d=[...new Map(t.map(e=>[e.id,e])).values()],c=(o?[]:n).map(e=>({key:"folder-".concat(e.id),folder:e,items:d.filter(t=>{var n;return(null===(n=l.get(t.id))||void 0===n?void 0:n.folderId)===e.id})}));return[...d.filter(e=>{var t,n;return o?(null===(t=l.get(e.id))||void 0===t?void 0:t.folderId)===o:!(null===(n=l.get(e.id))||void 0===n?void 0:n.folderId)}).map(e=>({key:"deck-".concat(e.id),folder:void 0,items:[e]})),...c].map(e=>{let{items:t,...n}=e,i=[];return n.folder||s(t,0,i),{...n,rows:i,available:t.some(e=>{var t,n;return(null!==(n=null===(t=r.get(e.id))||void 0===t?void 0:t.cardsToday)&&void 0!==n?n:0)>0}),lastStudiedAt:Math.max(0,...t.map(e=>{var t,n;return null!==(n=null===(t=r.get(e.id))||void 0===t?void 0:t.lastStudiedAt)&&void 0!==n?n:0}))}}).sort((e,t)=>Number(t.available)-Number(e.available)||t.lastStudiedAt-e.lastStudiedAt)})(I,F,Z,E,N,n),[I,F,Z,E,N,n]),V=(0,u.j)("deck_action"),G=(0,i.useRef)(null),U=(0,i.useRef)(null),Y=e=>{var t;return null===(t=G.current)||void 0===t?void 0:t.show(e)},Q=e=>{var t;return null===(t=U.current)||void 0===t?void 0:t.show(e)},W=e=>C(e.id),X=I.find(e=>e.id===(null==L?void 0:L.deckId)),J=(0,x.L)(null==X?void 0:X.id,{decks:[...M.decks,...M.folders.flatMap(e=>e.decks)],folders:[]}).map(e=>{var t;return null===(t=I.find(t=>t.id===e))||void 0===t?void 0:t.name}).filter(Boolean).join(" ⺠");return(0,r.jsxs)(w,{children:[!n&&L&&(0,r.jsx)(ed,{category:J||void 0,deck:X,hero:L,now:R}),(0,r.jsx)(s.K,{folderId:n}),!n&&(0,r.jsx)(P,{children:p.s.t("Home_Study_MyDecks")}),(0,r.jsx)(T,{children:K.map(e=>(0,r.jsx)(A,{children:e.folder?(0,r.jsx)(d.H,{isLast:!0,folder:e.folder,isReorderModeEnabled:!1,onCreateDeckPress:S,onDeletePress:D,onPress:W,onSettingsPress:Q}):e.rows.map(e=>(0,i.createElement)(et,{...e,facts:E.get(e.deck.id),isCollapsed:!!(null==N?void 0:N["deck-".concat(e.deck.id)]),isManaging:t,key:e.deck.id,now:R,onAddSubdeck:Y,onArchive:j,onDelete:V,onMove:k,onPress:_,onToggle:O}))},e.key))}),(0,r.jsx)(o.g,{}),(0,r.jsx)(l.o,{ref:G}),(0,r.jsx)(a.a,{ref:U})]})}},83821:function(e,t,n){n.d(t,{e:function(){return y}});var r=n(85893),i=n(98805),o=n(38171),l=n(94404),a=n(18635),s=n(67165),d=n(75126),c=n(77460),u=n(67294),m=n(34424),f=n(93294),p=n(8862),h=n(90171),v=n(92564);let g=e=>{let{colors:t,fonts:n}=e;return v.Z.create({container:{backgroundColor:t.system.surface,borderWidth:1,borderColor:t.elements.outline,borderRadius:p.w.L,padding:h.K.Four,gap:h.K.One},frontRow:{flexDirection:"row",alignItems:"flex-start",gap:h.K.Three},frontContent:{flex:1,flexDirection:"row",alignItems:"flex-start"},audioButton:{alignItems:"center",justifyContent:"center",width:20,height:n.paragraph.small.lineHeight+1,borderTopLeftRadius:p.w.XS,backgroundColor:t.system.primary},frontText:{...n.paragraph.small,color:t.text.primary,flexShrink:1},textWithTTS:{minHeight:n.paragraph.small.lineHeight+1,paddingHorizontal:h.K.One,backgroundColor:t.elements.clozeBg,borderBottomWidth:1,borderBottomColor:t.system.primary},backContent:{flexDirection:"row",alignItems:"flex-start"},backText:{...n.paragraph.small,color:t.text.secondary,flexShrink:1},actions:{flexDirection:"row",flexShrink:0,gap:h.K.Five},actionButton:{width:20,height:20}})},b={top:8,right:0,bottom:8,left:8},y=(0,u.memo)(function(e){let{card:t,isReversed:n,isTTSEnabled:p,onDelete:h,onEdit:v,onPlayTTS:y}=e,x=(0,c.y)(g),_=(0,o.le)(t,n),w=(0,u.useCallback)(()=>y(t),[t,y]),C=(0,u.useCallback)(()=>v(t),[t,v]),k=(0,u.useCallback)(()=>h(t),[t,h]);return(0,r.jsxs)(m.Z,{style:x.container,testID:"youtube-import-card-".concat(t.id),children:[(0,r.jsxs)(m.Z,{style:x.frontRow,children:[(0,r.jsxs)(m.Z,{style:x.frontContent,children:[p&&!n&&(0,r.jsx)(f.Z,{accessibilityLabel:"youtube-import-card-audio-".concat(t.id),hitSlop:b,style:x.audioButton,testID:"youtube-import-card-audio-".concat(t.id),onPress:w,children:(0,r.jsx)(l.f,{colorToken:"system.onPrimary",size:14})}),(0,r.jsx)(i.x,{numberOfLines:3,style:[x.frontText,p&&!n&&x.textWithTTS],children:_.front})]}),(0,r.jsxs)(m.Z,{style:x.actions,children:[(0,r.jsx)(f.Z,{accessibilityLabel:d.s.t("Common_Edit"),accessibilityRole:"button",hitSlop:6,style:x.actionButton,testID:"youtube-import-card-".concat(t.id,"-edit"),onPress:C,children:(0,r.jsx)(a.d,{size:20})}),(0,r.jsx)(f.Z,{accessibilityLabel:d.s.t("Common_Delete"),accessibilityRole:"button",hitSlop:6,style:x.actionButton,testID:"youtube-import-card-".concat(t.id,"-delete"),onPress:k,children:(0,r.jsx)(s.p,{size:20})})]})]}),(0,r.jsxs)(m.Z,{style:x.backContent,children:[p&&n&&(0,r.jsx)(f.Z,{accessibilityLabel:"youtube-import-card-audio-".concat(t.id),hitSlop:b,style:x.audioButton,testID:"youtube-import-card-audio-".concat(t.id),onPress:w,children:(0,r.jsx)(l.f,{colorToken:"system.onPrimary",size:14})}),(0,r.jsx)(i.x,{numberOfLines:4,style:[x.backText,p&&n&&x.textWithTTS],children:_.back})]})]})})},72446:function(e,t,n){n.d(t,{T:function(){return ea}});var r=n(85893),i=n(11161),o=n(89147),l=n(55477),a=n(42417),s=n(71690),d=n(98805),c=n(19861),u=n(4064),m=n(94404),f=n(14130),p=n(75126),h=n(77460),v=n(73992),g=n(45455),b=n.n(g),y=n(34291),x=n.n(y),_=n(67294),w=n(34424),C=n(82380),k=n(93294),S=n(8347),j=n(13688),D=n(14956),I=n(70668),T=n(38171),P=n(96697),A=n(38645),E=n(56298),L=n(88888),R=n(45007),M=n(37513);let F=()=>{let e=(0,R.I0)(),t=(0,M.E)(),n=(0,R.v9)(A.V$);return{checkYouTubeGenerationGrant:()=>!!(0,L.aq)({isPremium:t,remainingFreeGenerations:n})||(e((0,E.Qx)({placement:"ai_generate_from_youtube"})),!1),remainingFreeGenerations:n}};var Z=n(72715),z=n(40247),H=n(40105),B=n(4065),N=n(61383),O=n(40091),K=n(1574),V=n(45740),G=n(95877),U=n(91005),Y=n(24722),q=n(5135),Q=n(27881),W=n(65337),X=n(76938),J=n(321),$=n(87716),ee=n(75904);async function et(e){let t=await (0,j.N)(D.e.cancel,e);if(t.error)throw t.error;if(t.response.data.deckId){let e=await (0,j.N)(S.J.deleteDeck,t.response.data.deckId,!0);if(e.error)throw e.error}}let en={deckName:"",deckType:"expression",cardType:"all",difficulty:"all",customPrompt:""};var er=n(23696),ei=n(83821),eo=n(48443),el=n(44070);let ea=(0,_.forwardRef)((e,t)=>{let{folderId:n}=e,g=(0,h.y)(er.k),{flow:y,source:A,sourceUrl:L,visible:ea,options:es,configure:ed,goBack:ec,cancelGeneration:eu,setOptions:em,tts:ef,reversed:ep,toggleTTS:eh,toggleRever
1sed:ev,changeDeckName:eg,deleteCard:eb,edit:ey,playTTS:ex,saving:e_,save:ew,create:eC,editing:ek,closeEdit:eS,front:ej,back:eD,setFront:eI,setBack:eT,saveEdit:eP}=function(e,t){let n=(0,R.I0)(),r=(0,P.C)(B.B5),{navigate:i}=(0,U.s0)(),o=(0,M.E)(),{checkYouTubeGenerationGrant:l}=F(),{ttsPlay:a,ttsStop:s}=(0,Z.I)(),d=function(){let e=(0,R.I0)(),[t,n]=(0,_.useState)(),[r,i]=(0,_.useState)([]),[o,l]=(0,_.useState)(!1),[a,s]=(0,_.useState)(),[d,c]=(0,_.useState)(),[u,m]=(0,_.useState)(!1),[f,p]=(0,_.useState)(),{progress:h,canLeave:v}=(0,W.x)({...a,...d,completed:u}),g=(0,_.useRef)();(0,_.useEffect)(()=>{var e;v&&f&&(null===(e=g.current)||void 0===e||!e.canceled)&&(n(f),l(!1),g.current&&(g.current.running=!1),N.G.getInstance().logEvent("view_import_card_list_screen",{import_type:"youtube",entry_point:"main_screen"}))},[v,f]);let b=(0,_.useRef)((0,J.D)()),y=(0,_.useRef)(""),x=(0,_.useCallback)(()=>{let{current:e}=g;e&&!e.canceled&&(e.canceled=!0,clearTimeout(e.timer),e.generationId&&et(e.generationId).catch(X.F),e.finished||N.G.getInstance().logEvent("card_generation_canceled",{import_type:"youtube",entry_point:"main_screen"}),b.current=(0,J.D)())},[]);(0,_.useEffect)(()=>x,[x]);let w=async(t,r,o)=>{var a;if((null===(a=g.current)||void 0===a?void 0:a.running)&&!g.current.canceled)return;let d=JSON.stringify({youtubeUrl:t,options:o,maxCardsAmount:r.maxCardsAmount});y.current!==d&&(b.current=(0,J.D)()),y.current=d;let u={canceled:!1,running:!0,finished:!1};g.current=u,m(!1),c(void 0),p(void 0),s({startedAt:Date.now(),durationSeconds:r.durationSeconds}),l(!0),n(void 0),N.G.getInstance().logEvent("card_generation_started",{import_type:"youtube",entry_point:"main_screen"});let f=(t,n)=>{if(u.canceled)return;u.running=!1,s(void 0),l(!1);let r=n?(0,$.Hv)(n):(0,$.Ul)(null!=t?t:Error("Generation failed"));u.finished||N.G.getInstance().logEvent("card_generation_failed",{import_type:"youtube",entry_point:"main_screen",reason:n?(0,$.KV)(n):(0,$.qp)(null!=t?t:Error("Generation failed"))}),u.finished=!0,"freeTierUsageLimit"===r?e((0,E.Qx)({placement:"ai_generate_from_youtube"})):(0,Q.T)(r),n&&(b.current=(0,J.D)())},h=async t=>{var n,r,o,a;if(u.generationId=t.generationId,u.canceled){await et(t.generationId);return}if(c({generationModel:t.generationModel,requestedCardsAmount:t.requestedCardsAmount}),"canceled"===t.status){s(void 0),u.running=!1,u.finished=!0,l(!1),b.current=(0,J.D)(),N.G.getInstance().logEvent("card_generation_canceled",{import_type:"youtube",entry_point:"main_screen"});let r=(0,$.Hv)(null===(n=t.error)||void 0===n?void 0:n.code);"freeTierUsageLimit"===r?e((0,E.Qx)({placement:"ai_generate_from_youtube"})):(0,Q.T)(r);return}if("failed"===t.status){f(void 0,null!==(o=null===(r=t.error)||void 0===r?void 0:r.code)&&void 0!==o?o:"generation_failed");return}if("completed"===t.status&&t.deckId){u.finished||N.G.getInstance().logEvent("card_generation_completed",{import_type:"youtube",entry_point:"main_screen"}),u.finished=!0,m(!0);let e=await (0,j.N)(q.g.getNotes,{deckId:t.deckId,limit:100});if(u.canceled)return;if(e.error){f(e.error);return}i((0,ee.EJ)(e.response.data)),p(t);return}u.timer=setTimeout(async()=>{try{let e=await (0,j.N)(D.e.get,t.generationId);e.error?f(e.error):await h(e.response.data)}catch(e){f(e)}},Math.max(500,null!==(a=t.pollAfterMs)&&void 0!==a?a:1500))};try{let e=await (0,j.N)(D.e.create,{requestId:b.current,youtubeUrl:t,deckName:o.deckName.trim(),deckType:o.deckType,cardType:o.cardType,difficulty:"expression"===o.deckType?o.difficulty:void 0,cardsAmount:(0,ee.rq)(r.maxCardsAmount),customPrompt:o.customPrompt.trim()||void 0});e.error?f(e.error):await h(e.response.data)}catch(e){f(e)}};return{generation:t,progress:h,cards:r,setCards:i,isGenerating:o,start:w,reset:()=>{x(),b.current=(0,J.D)(),m(!1),c(void 0),p(void 0),s(void 0),n(void 0),i([]),l(!1)},markSaved:()=>{g.current&&(g.current.canceled=!0)}}}(),[c,u]=(0,_.useState)(!1),[m,f]=(0,_.useState)(),[h,g]=(0,_.useState)(""),[y,x]=(0,_.useState)(en),[w,C]=(0,_.useState)(!1),[k,A]=(0,_.useState)(!1),[L,er]=(0,_.useState)(!1),ei=(0,_.useRef)(!1),[eo,el]=(0,_.useState)(),[ea,es]=(0,_.useState)(""),[ed,ec]=(0,_.useState)("");(0,_.useEffect)(()=>
1{if(!c||!d.isGenerating&&!d.generation)return;let e=e=>{e.preventDefault()};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[c,d.isGenerating,d.generation]);let eu=(e,t)=>{d.reset(),f({url:e,preview:t}),g(e),x({...en,deckName:t.title}),C(!1),u(!0),N.G.getInstance().logEvent("view_youtube_deck_option_screen",{entry_point:"main_screen"})};(0,_.useImperativeHandle)(t,()=>({configure:eu,open:()=>{d.reset(),f(void 0),g(""),u(!0),N.G.getInstance().logEvent("view_add_youtube_link_screen",{entry_point:"main_screen"})}}));let em=()=>{var e;if(ei.current)return;let t=!!d.generation,n=async()=>{var e,n;if(!ei.current){if(null===(e=d.generation)||void 0===e?void 0:e.deckId){ei.current=!0;try{let e=await (0,j.N)(S.J.deleteDeck,d.generation.deckId,!0);if(e.error)throw e.error;d.markSaved()}catch(e){null===(n=I.b.showError)||void 0===n||n.call(I.b,e);return}finally{ei.current=!1}}d.reset(),s(),u(t),el(void 0)}};d.generation||d.isGenerating?null===(e=I.b.confirmDestructive)||void 0===e||e.call(I.b,{title:p.s.t("YouTubeImport_Discard_Title"),body:p.s.t("YouTubeImport_Discard_Body"),submit:{title:p.s.t("YouTubeImport_Discard_Confirm"),onPress:n}}):n()},ef=async()=>{if(!(!d.generation||ei.current||b()(d.cards))&&(0,v.e)(y.deckName)){ei.current=!0,er(!0),s();try{if(e&&d.generation.deckId){let t=await (0,j.N)(S.J.moveDeck,d.generation.deckId,void 0,e);if(t.error)throw t.error}let t=(0,T.YT)(d.cards,w),o=await (0,j.N)(D.e.finalize,{generationId:d.generation.generationId,deckName:y.deckName.trim(),cards:(0,ee.c6)(d.cards,w,k),isTTSEnabled:k,ttsFrontSideLanguage:k?t.front:void 0,ttsBackSideLanguage:k?t.back:void 0});if(o.error)throw o.error;d.markSaved();let{deckId:l}=o.response.data;n((0,z.b)({deckId:l})),n((0,H.G)()),(0,O.QA)("deck_added",{...(0,O.kT)({id:l,name:y.deckName.trim(),folderId:null!=e?e:null,algorithmPreset:V.L.general,sharingEnabled:!1,totalCardsCount:d.cards.length,ttsWholeCardPronunciation:k},r,{entry_point:"main_screen",is_onboarding:!1,source:"ai_youtube"}),num_cards:d.cards.length}),(0,O.SS)("card_added",{deck_id:String(l),entry_point:"main_screen",is_onboarding:!1,num_cards:d.cards.length,source:"ai_youtube"}),K.G.incrementCardsCreated(d.cards.length),u(!1),i(Y.xr.Deck.open(l))}catch(e){var t;null===(t=I.b.showError)||void 0===t||t.call(I.b,e)}finally{ei.current=!1,er(!1)}}},ep=()=>el(void 0);return{goBack:()=>{if(!d.isGenerating&&!ei.current){if(d.generation||!m){em();return}f(void 0),N.G.getInstance().logEvent("view_add_youtube_link_screen",{entry_point:"main_screen"})}},sourceUrl:h,flow:d,source:m,visible:c,options:y,configure:eu,close:em,cancelGeneration:d.reset,setOptions:x,tts:k,reversed:w,toggleTTS:()=>{if(!k&&!o){n((0,E.Qx)({placement:"import_tts"}));return}s(),A(e=>!e)},toggleReversed:()=>{s(),C(e=>!e)},changeDeckName:e=>x(t=>({...t,deckName:e})),deleteCard:e=>{var t;return null===(t=I.b.confirmDestructive)||void 0===t?void 0:t.call(I.b,{title:p.s.t("DeckInfo_Cards_DeleteCardConfirmation_Title"),body:p.s.t("Decks_Delete_body"),submit:{title:p.s.t("Common_Delete"),onPress:()=>d.setCards(t=>t.filter(t=>t.id!==e.id))}})},edit:e=>{let t=(0,T.le)(e,w);es(t.front),ec(t.back),el(e)},playTTS:e=>{let t=(0,T.YT)(d.cards,w);a(w?G.D.back:G.D.front,(0,T.WT)(e),w?t.back:t.front)},saving:L,save:ef,create:()=>{m&&!d.isGenerating&&(0,v.e)(y.deckName)&&(N.G.getInstance().logEvent("click_youtube_deck_option_create_button",{entry_point:"main_screen",deck_type:y.deckType,card_type:y.cardType,has_prompt:!!y.customPrompt.trim(),..."expression"===y.deckType?{difficulty:y.difficulty}:{}}),l()&&(A((0,ee.E4)(y.deckType,o)),d.start(m.url,m.preview,y)))},editing:eo,closeEdit:ep,front:ea,back:ed,setFront:es,setBack:ec,saveEdit:()=>{eo&&d.setCards(e=>e.map(e=>e.id===eo.id?(0,T.Mq)(e,{front:ea,back:ed},w):e)),ep()}}}(n,t),eA=!!y.generation;return(0,r.jsxs)(r.Fragment,{children:[A&&!eA?(0,r.jsx)(el.V,{isBusy:y.isGenerating,isVisible:ea,options:es,preview:A.preview,onBack:ec,onChange:em,onSubmit:eC}):(0,r.jsxs)(i.P,{contentStyle:A?g.bulletin:void 0,isFullHeight:!!A,isHeaderHidden:!!A,isVisible:ea,title:p.s.t(eA?"YouTubeImport_Review_Title":"YouTubeImport_Title"),webSize:A?"full":"medium",onClose:y.isGenerating?x():ec,children:[A&&(0,r.jsx)(o.X,{leftItem:(0,r.jsx)(l.x,{accessibilityLabel:"youtube-import-back",onPress:y.isGenerating?x():ec}),title:p.s.t(eA?"YouTubeImport_Review_Title":"YouTubeImport_Title")}),A?(0,r.jsxs)(w.Z,{"aria-hidden":y.isGenerating,pointerEvents:y.isGenerating?"none":"auto",style:g.root,children:[(0,r.jsx)(C.Z,{contentContainerStyle:g.content,keyboardShouldPersistTaps:"handled",style:g.scroll,children:(0,r.jsxs)(w.Z,{style:g.cards,testID:"youtube-import-review",children:[(0,r.jsx)(s.o,{defaultValue:es.deckName,maxLength:u.T,title:p.s.t("YouTubeImport_DeckName"),onChangeText:eg}),(0,r.jsx)(d.x,{style:g.title,children:p.s.t("YouTubeImport_CardsGenerated",{count:y.cards.length})}),(0,r.jsxs)(w.Z,{style:g.chips,children:[(0,r.jsxs)(k.Z,{accessibilityRole:"button",accessibilityState:{selected:ef},style:[g.chip,ef&&g.selected],testID:"youtube-import-tts",onPress:eh,children:[(0,r.jsx)(m.f,{colorToken:ef?"system.onPrimary":"text.primary",size:20}),(0,r.jsxs)(d.x,{style:[g.chipText,ef&&g.selectedText],children:[p.s.t("PhotoImport_TTS"),ef?" ".concat(p.s.t("Common_On")):""]})]}),(0,r.jsxs)(k.Z,{accessibilityRole:"button",accessibilityState:{selected:ep},style:[g.chip,ep&&g.selected],testID:"youtube-import-reverse",onPress:ev,children:[(0,r.jsx)(f.E,{colorToken:ep?"system.onPrimary":"text.primary",size:20}),(0,r.jsx)(d.x,{style:[g.chipText,ep&&g.selectedText],children:p.s.t("PhotoImport_Reverse")})]})]}),b()(y.cards)&&(0,r.jsx)(d.x,{style:g.secondary,children:p.s.t("YouTubeImport_NoCards")}),y.cards.map(e=>(0,r.jsx)(ei.e,{card:e,isReversed:ep,isTTSEnabled:ef,onDelete:eb,onEdit:ey,onPlayTTS:ex}
1,e.id))]})}),(0,r.jsx)(w.Z,{style:g.footer,children:(0,r.jsx)(a.z,{accessibilityLabel:p.s.t(eA?"PhotoImport_Edit_Save":"YouTubeImport_CreateCards"),containerStyle:g.button,isDisabled:y.isGenerating||!(0,v.e)(es.deckName)||eA&&b()(y.cards),isLoading:e_,testID:eA?"youtube-import-save":"youtube-import-create",title:p.s.t(eA?"PhotoImport_Edit_Save":"YouTubeImport_CreateCards"),onPress:eA?ew:eC})})]}):ea&&(0,r.jsx)(c.R,{entryPoint:"main_screen",initialUrl:L,onNext:ed})]},eA?"review":"settings"),(0,r.jsx)(eo.P,{isVisible:ea&&y.isGenerating,progress:y.progress,shouldPreload:ea&&!!A,onClose:eu}),(0,r.jsx)(i.P,{isVisible:!!ek,title:p.s.t("PhotoImport_Edit_Title"),onClose:eS,children:(0,r.jsxs)(w.Z,{style:g.edit,children:[(0,r.jsx)(s.o,{multiline:!0,defaultValue:ej,testID:"youtube-import-edit-front",title:p.s.t("PhotoImport_Edit_Front"),onChangeText:eI}),(0,r.jsx)(s.o,{multiline:!0,defaultValue:eD,testID:"youtube-import-edit-back",title:p.s.t("PhotoImport_Edit_Back"),onChangeText:eT}),(0,r.jsx)(a.z,{accessibilityLabel:p.s.t("PhotoImport_Edit_Save"),isDisabled:!ej.trim()||!eD.trim(),title:p.s.t("PhotoImport_Edit_Save"),onPress:eP})]},null==ek?void 0:ek.id)})]})});ea.displayName="YouTubeImportFlow"},25646:function(e,t,n){n.d(t,{I:function(){return c}});var r=n(70668),i=n(58850),o=n(67294),l=n(91005),a=n(24722),s=n(74907),d=n(32620);function c(){let e=(0,i.I)(),{navigate:t}=(0,l.s0)(),n="true"===window.sessionStorage.getItem(s.U.guestPurchaseCompleted),c=(0,o.useCallback)(()=>{window.sessionStorage.setItem(s.U.guestGuardReturnTo,"".concat(window.location.pathname).concat(window.location.search))},[]),u=(0,o.useCallback)(()=>{c(),t(a.xr.Login)},[t,c]),m=(0,o.useCallback)(()=>{e&&n?t(a.aw.OnboardingFinishRegistration,{state:{}}):(c(),t(a.xr.Login))},[n,e,t,c]),f=(0,o.useCallback)(async(e,t)=>{var n,i;try{let r;let i=(0,d.jo)();try{r=await (0,d.Xp)(e,t)}catch(o){let n=(0,d.jo)();if(!(o instanceof Error)||"stale_auth"!==o.message||!i||(null==n?void 0:n.ownerId)!==i.ownerId||n.kind!==i.kind)throw o;r=await (0,d.Xp)(e,t)}if(r)return!0;if((null===(n=(0,d.jo)())||void 0===n?void 0:n.kind)==="guest")return m(),!0;return!1}catch(e){return null===(i=r.b.showError)||void 0===i||i.call(r.b,e instanceof Error?e:Error("Please try again.")),!0}},[m]);return{isGuest:e,redirectToLogin:m,redirectToLoginPage:u,guardAction:f}}},68049:function(e,t,n){n.d(t,{Z:function(){return T}});var r=n(85893),i=n(11161),o=n(42417),l=n(71690),a=n(7939),s=n(98805),d=n(77460),c=n(67294),u=n(34424);let m=Array.from({length:10},(e,t)=>t+1);var f=n(90171),p=n(8862),h=n(34489),v=n(92564);let g=e=>{let{colors:t,fonts:n}=e;return v.Z.create({container:{flexDirection:"row",gap:h.Pl?f.K.Two:f.K.One,justifyContent:"space-between",alignItems:"center"},elementContainer:{flex:1,paddingVertical:h.Pl?f.K.Five:f.K.Four,borderRadius:h.Pl?p.w.L:p.w.S,backgroundColor:t.system.backgroundPrimaryLight,alignItems:"center",justifyContent:"center"},elementText:{...n.button.small,color:t.text.primary},activeElementContainer:{backgroundColor:t.system.primary},activeElementText:{color:t.text.onColor}})};function b(e){let{value:t,onValueChange:n,style:i}=e,o=(0,d.y)(g);return(0,r.jsx)(u.Z,{style:[o.container,i],children:m.map(e=>(0,r.jsx)(a.A,{accessibilityLabel:"".concat(e," stars"),style:[o.elementContainer,t===e&&o.activeElementContainer],onPress:()=>n(e),children:(0,r.jsx)(s.x,{style:[o.elementText,t===e&&o.activeElementText],children:e})},e))})}var y=n(70668),x=n(68796),_=n(56631),w=n(75126),C=n(68816),k=n(61383),S=n(45007);let j=()=>{let e=(0,S.I0)(),[t,n]=(0,c.useState)(!1);return{isSubmittingFeedback:t,submitFeedback:(0,c.useCallback)(function(t,r,i){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],l=arguments.length>4?arguments[4]:void 0;n(!0),e((0,C.h)({stars:t,feedbackMessage:i,isSilent:o,type:r,onComplete:e=>{var i,a;n(!1),e?o||null===(i=y.b.showError)||void 0===i||i.call(y.b,e):(k.G.getInstance().logEvent("submit_ai_gen_cards_feedback_form",{stars:t,type:r}),o||null===(a=x.F.show)||void 0===a||a.call(x.F,{subtitle:w.s.t("FeedbackRecievedToast_Subtitle"),icon:_.H,title:w.s.t("FeedbackRecievedToast_Title")}),null==l||l())}}))},[e])}};var D=n(49204);let I=e=>{let{colors:t,fonts:n}=e;return v.Z.create({container:{flexGrow:1,justifyContent:"center",alignItems:"center"},title:{...n.heading.h3,color:t.text.primary,textAlign:"center"},subtitle:{...n.paragraph.medium,color:t.text.secondary,textAlign:"center",marginTop:f.K.Two},stars:{marginTop:f.K.Five,width:"100%",paddingHorizontal:h.Pl?f.K.Two:f.K.Zero},feedbackInputContianer:{alignSelf:"stretch",marginTop:f.K.Five}
1,feedbackInput:{height:137},sendButton:{width:343,marginTop:f.K.Ten}})};function T(e){let{isVisible:t,onClose:n,analyticEventType:a}=e,{submitFeedback:m,isSubmittingFeedback:f}=j(),p=(0,d.y)(I),[h,v]=(0,c.useState)(0),g=(0,c.useRef)(""),y=h>0;return(0,D.F)(t,"view_ai_gen_cards_feedback_form",{type:a}),(0,r.jsx)(i.P,{isVisible:t,webSize:"large",onClose:()=>{y&&m(h,a,void 0,!0),n()},children:(0,r.jsxs)(u.Z,{style:p.container,children:[(0,r.jsx)(s.x,{style:p.title,children:w.s.t("AIAppRating_title")}),(0,r.jsx)(s.x,{style:p.subtitle,children:w.s.t("AIAppRating_subtitle")}),(0,r.jsx)(b,{style:p.stars,value:h,onValueChange:e=>{v(e)}}),y&&(0,r.jsx)(l.o,{autoFocus:!0,multiline:!0,accessibilityLabel:"Feedback",style:p.feedbackInputContianer,textInputStyle:p.feedbackInput,title:w.s.t("AIAppRating_inputTitle"),onChangeText:e=>{g.current=e}}),(0,r.jsx)(o.z,{accessibilityLabel:"Send feedback",containerStyle:p.sendButton,isDisabled:!y,isLoading:f,size:"large",title:w.s.t("AIAppRating_button"),type:"primary",onPress:()=>{m(h,a,g.current,!1,n)}})]})})}},34143:function(e,t,n){n.d(t,{g:function(){return a}});var r=n(85893),i=n(68049),o=n(67294),l=n(91422);function a(){let e=l.L.use.isVisible(),t=l.L.use.hide(),n=l.L.use.show(),a=l.L.use.shouldShowFeedbackForm();return(0,o.useEffect)(()=>{!e&&a&&n()},[e,a,n]),(0,r.jsx)(i.Z,{analyticEventType:"prompt",isVisible:e,onClose:t})}},91422:function(e,t,n){n.d(t,{L:function(){return o}});var r=n(38880);let i=(0,n(31993).U)(e=>({isVisible:!1,show:()=>e({isVisible:!0}),hide:()=>e({isVisible:!1,shouldShowFeedbackForm:!1}),shouldShowFeedbackForm:!1,setShouldShowFeedbackForm:t=>e({shouldShowFeedbackForm:t})})),o=(0,r.N)(i)},58785:function(e,t,n){n.d(t,{D:function(){return r}});let r=24},52538:function(e,t,n){n.d(t,{e:function(){return x}});var r=n(85893),i=n(47174),o=n(51485),l=n(73159),a=n(77460),s=n(67294),d=n(93294),c=n(34424),u=n(90171),m=n(8862),f=n(92564),p=n(8115),h=n(58785);let v=u.K.Four,g=u.K.Six,b=e=>t=>{let{colors:n}=t;return f.Z.create({container:{borderRadius:m.w.S},hovered:{backgroundColor:n.system.onSurfaceHovered},buttonsContainer:{flexDirection:"row",alignItems:"center",position:"absolute",right:p.L+h.D+g+("large"===e?h.D+v:u.K.Zero),height:"100%",gap:v},button:{width:h.D,height:48,justifyContent:"center"}})},y=e=>({...e,accessibilityLabel:e.title,type:e.type});function x(e){let{style:t,children:n,buttons:u,isDragging:m,onHoverIn:f,onHoverOut:p,webMarginRightSize:h}=e,[v,g]=(0,s.useState)(!1),[x,_]=(0,l.O)(!1),w=(0,a.Y)(b,[h]);return(0,r.jsx)(o.Y,{items:u.map(y),onHide:_,onShow:_,children:(0,r.jsxs)(d.Z,{style:[t,w.container,(v||m||x)&&w.hovered],onHoverIn:()=>{g(!0),null==f||f()},onHoverOut:()=>{g(!1),null==p||p()},children:[n,v&&!x&&(0,r.jsx)(c.Z,{style:w.buttonsContainer,children:u.map((e,t)=>{let n=String(t);return(0,r.jsx)(i.n,{accessibilityLabel:"web_deck_cell_actions_button_".concat(t),icon:e.icon,isDisabled:e.isDisabled,style:w.button,onPress:e.onPress},n)})})]})})}},8115:function(e,t,n){n.d(t,{L:function(){return r},v:function(){return i}});let r=n(90171).K.Four,i=250},36113:function(e,t,n){n.d(t,{s:function(){return C}});var r=n(85893),i=n(47174),o=n(7939),l=n(36102),a=n(72811),s=n(98805),d=n(30386),c=n(11512),u=n(68115),m=n(77460),f=n(34489),p=n(67294),h=n(34424),v=n(52538),g=n(8115),b=n(90171),y=n(21682),x=n(92564),_=n(58785);let w=(e,t,n)=>r=>{let{colors:i,fonts:o,isTablet:l}=r;return x.Z.create({container:{flexDirection:"row",alignItems:"center",paddingHorizontal:l?b.K.Two:b.K.Zero,opacity:n?y.D.Nine:y.D.Ten}
1,draggingBackground:{...x.Z.absoluteFill,backgroundColor:i.system.surface,borderColor:i.elements.outline,borderBottomWidth:1},contentContainer:{flex:1,paddingHorizontal:g.L,flexDirection:"row",alignItems:"center",paddingVertical:b.K.Two},moveIconContainer:{marginRight:b.K.Three},metadataContainer:{flexDirection:"column",flex:1,paddingVertical:b.K.One},metadataPadding:{paddingRight:f.Pl?b.K.Seventeen+_.D*t:void 0},title:{...o.heading.h4,color:e?i.text.disabled:i.text.primary,writingDirection:"ltr"},subtitleContainer:{marginTop:b.K.One,flexDirection:"row",opacity:e?y.D.Five:y.D.Ten},rightViewContainer:{marginLeft:b.K.Four,flexDirection:"row",alignItems:"center"},actions:{marginVertical:b.K.Two},separator:{position:"absolute",bottom:b.K.Zero,left:b.K.Zero,right:b.K.Zero}})};function C(e){let{item:t,title:n,renderLeftView:b,renderLeftSpacer:y,renderRightView:x,renderSubtitleView:_,actionButtons:C,onPress:k,onLongPress:S,onHoveredChange:j,isReorderModeEnabled:D,isDragging:I,onDragging:T,isProcessing:P,isDisabled:A,additionalActionsWebRightMargin:E,withSeparator:L}=e,[R,M,F]=(0,u.k)(),Z=(0,m.Y)(w,[A||!1,C.length,I]),z=(L||D)&&!(f.Pl&&I);return(0,p.useEffect)(()=>{null==j||j(R)},[R,j]),(0,r.jsxs)(h.Z,{children:[(0,r.jsx)(v.e,{buttons:D?[]:C,isDragging:I,style:Z.actions,webMarginRightSize:E?"large":"default",onHoverIn:M,onHoverOut:F,children:(0,r.jsxs)(o.A,{accessibilityElementsHidden:!f.Pl&&D,accessibilityLabel:"home_cell",delayLongPress:g.v,importantForAccessibility:!f.Pl&&D?"no-hide-descendants":void 0,isDisabled:A,style:Z.container,onLongPress:()=>{D?null==T||T():S&&(S(),null==T||T())},onPress:()=>{D||null==k||k(t)}
1,children:[I&&!f.Pl&&(0,r.jsx)(h.Z,{style:Z.draggingBackground}),null==y?void 0:y(),(0,r.jsxs)(h.Z,{style:Z.contentContainer,children:[D?(0,r.jsx)(i.n,{accessibilityLabel:"home_cell_move_pointer",hitSlop:20,icon:(0,r.jsx)(d.T,{colorToken:"system.onSurfaceSecondary"}),style:Z.moveIconContainer,onPressIn:T}):null,null==b?void 0:b(),(0,r.jsxs)(h.Z,{style:[Z.metadataContainer,R&&Z.metadataPadding],children:[(0,r.jsx)(s.x,{numberOfLines:1,style:Z.title,children:n}),_&&(0,r.jsx)(h.Z,{style:Z.subtitleContainer,children:_()})]}),(0,r.jsxs)(h.Z,{style:Z.rightViewContainer,children:[null==x?void 0:x(),D?null:P?(0,r.jsx)(l.P,{}):(0,r.jsx)(c.e,{colorToken:"system.onSurfaceDisabled",size:20})]})]})]})}),z&&(0,r.jsx)(a.Z,{style:Z.separator})]})}},1421:function(e,t,n){n.d(t,{X:function(){return m}});var r=n(85893),i=n(7939),o=n(77460);n(67294);var l=n(10070),a=n(47671);let s=(0,a.N)(n(54274)),d=(0,a.N)(n(43272));var c=n(92564);let u=e=>{let{colors:t}=e;return c.Z.create({checkbox:{tintColor:t.elements.outline},checkboxSelected:{tintColor:t.system.primary}})};function m(e){let{isChecked:t,onPress:n}=e,a=(0,o.y)(u);return(0,r.jsx)(i.A,{accessibilityLabel:"checkbox",isDisabled:!n,onPress:n,children:(0,r.jsx)(l.Z,{source:t?d:s,style:t?a.checkboxSelected:a.checkbox})})}},73382:function(e,t,n){n.d(t,{$:function(){return i},v:function(){return r}});let r=60,i=13.1},29264:function(e,t,n){n.d(t,{AJ:function(){return a},VI:function(){return d},eK:function(){return s},kU:function(){return c}});var r=n(73804),i=n(73382);let o=e=>r.filter(t=>t.category===e&&parseFloat(t.added_in)<=i.$&&!t.obsoleted_by),l=e=>r.filter(t=>t.short_names.some(t=>t.toLowerCase().includes(e.toLowerCase()))&&parseFloat(t.added_in)<=i.$&&!t.obsoleted_by),a=e=>String.fromCodePoint(...e.split("-").map(e=>parseInt(e,16))),s=e=>a(e.unified),d=e=>e.sort((e,t)=>e.sort_order-t.sort_order),c=(e,t)=>t?l(t):"[emotion, people]"===e?o("Smileys & Emotion").concat(o("People & Body")):o(e)},70480:function(e,t,n){n.d(t,{U:function(){return c}});var r=n(85893),i=n(61293),o=n(92580),l=n(61383),a=n(67294),s=n(34424),d=n(42677);function c(e){let{isVisible:t,items:n,onClose:c,isVisibleAnalyticsEvent:u,popoverAnchorRef:m,popoverAnchorVerticalOffset:f,popoverContentStyle:p,popoverSize:h,popoverHorizontalAlignment:v,popoverVerticalAlignment:g,popoverShadowToken:b,children:y,childrenContainerStyle:x,cellSize:_="small"}=e,w=(0,a.useRef)(null);(0,a.useEffect)(()=>{t&&u&&l.G.getInstance().logEvent(u)},[t,u]);let C=()=>t?(0,r.jsx)(i.J,{anchorRef:null!=m?m:w.current,anchorVerticalOffset:f,contentStyle:p,horizontalAlignment:v,shadowToken:b,size:h,verticalAlignment:g,onClose:c,children:n.map((e,t)=>{let i=t===n.length-1;return(0,r.jsxs)(s.Z,{children:[(0,r.jsx)(d.J,{cellSize:_,item:e,onPress:c}),!i&&(0,r.jsx)(o.Q,{isMarginEnabled:!1})]},e.accessibilityLabel)})}):null;return y?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.Z,{ref:w,pointerEvents:"box-none",style:x,children:y}),C()]}):C()}},42677:function(e,t,n){n.d(t,{J:function(){return a}});var r=n(85893),i=n(92965),o=n(80728),l=n(67294);function a(e){let{item:t,titleStyle:n,style:a,cellSize:s="large",onPress:d}=e,c={isPressInScaleEnabled:!0,isPressable:!0,isDisabled:t.isDisabled,horizontalLayoutMode:"padding",style:a,titleStyle:[t.titleStyle,n],subtitle:t.subtitle,isSelectable:!0,...t},u=(0,l.useCallback)(()=>{"onPress"in t&&t.onPress(),null==d||d()},[t,d]);return"switch"===t.type?(0,r.jsx)(i.Q,{...c,size:s,value:t.value,onValueChange:t.onValueChange}):(0,r.jsx)(o.b,{...c,isDestructive:"destructive"===t.type,isSelected:t.isSelected,shouldShowDisclosureIndicator:t.shouldShowDisclosureIndicator,size:s,onPress:u})}},38644:function(e,t,n){n.d(t,{M:function(){return m}});var r=n(85893),i=n(17216),o=n(19721),l=n(90171),a=n(54584),s=n(82296),d=n(67294),c=n(70480);let u=n(92564).Z.create({anchor:{position:"absolute",width:1,height:1}}),m=(0,d.forwardRef)(function(e,t){let{items:n,onHide:m,onShow:f}=e,p=(0,a.u)(),[h,v]=(0,d.useState)(),[g,{show:b,hide:y}]=(0,s.O)(!1,f,m),x=(0,d.useRef)("down"),_=(0,d.useRef)("right"),w=(e,t,n)=>{x.current=null!=t?t:"down",_.current=null!=n?n:"right",v(e),b()};return(0,d.useImperativeHandle)(t,()=>({showAtPoint:w})),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.h,{id:"popover_portal",children:(0,r.jsx)(i.e,{ref:p,style:[u.anchor,h]})}),(0,r.jsx)(c.U,{isVisible:g,items:n,popoverAnchorRef:p.current,popoverAnchorVerticalOffset:"up"===x.current?l.K.Four:l.K.Zero,popoverHorizontalAlignment:_.current,popoverSize:"small",popoverVerticalAlignment:x.current,onClose:y})]})})},51485:function(e,t,n){n.d(t,{Y:function(){return a}});var r=n(85893),i=n(67294),o=n(34424),l=n(38644);function a(e){let{items:t,children:n,onHide:a,onShow:s}=e,d=(0,i.useRef)(void 0),c=(0,i.useRef)(null),u=t.map(e=>({...e,..."onPress"in e?{onPress:()=>{let t=d.current&&{x:d.current.x,y:d.current.y};e.onPress(t)}}:void 0}));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.Z,{onContextMenu:e=>{var t;e.preventDefault();let{clientX:n,clientY:r}=e;d.current={y:r,x:n},null===(t=c.current)||void 0===t||t.showAtPoint({top:r,left:n})},children:n}),(0,r.jsx)(l.M,{ref:c,items:u,onHide:a,onShow:s})]})}},21808:function(e,t,n){n.d(t,{o:function(){return _}});var r=n(85893),i=n(38652),o=n(11161),l=n(42417),a=n(71690),s=n(1435),d=n(98805),c=n(4064),u=n(92685),m=n(75126),f=n(95262),p=n(42369),h=n(77460),v=n(73992),g=n(67294),b=n(90171),y=n(92564);let x=e=>{let{fonts:t,colors:n}=e;return y.Z.create({deckName:{...t.paragraph.small,color:n.text.primary},subtitle:{...t.paragraph.small,color:n.text.secondary,marginBottom:b.K.Four},createSubdeckButton:{marginTop:b.K.Four}})},_=(0,i.g)(function(e){let{onClose:t,isVisible:n,data:i}=e,{createDeck:b,isCreatingDeck:y}=(0,u.t)(),[_,w]=(0,g.useState)(""),C=(0,h.y)(x),k=(0,g.useRef)(null),S=(0,v.e)(_);(0,g.useEffect)(()=>{n&&w("")},[n]);let j=()=>{f.s.triggerSelection(),t()},D=()=>{S&&b({parentId:i.id,name:_,location:"subdeck",onSuccess:j})};return(0,r.jsx)(o.P,{isVisible:n,title:m.s.t("Subdeck_new_subdeck_title"),onClose:t,onShow:()=>{var e;null===(e=k.current)||void 0===e||e.focus()},children:(0,r.jsxs)(s.D,{withoutFlex:!0,children:[(0,r.jsxs)(d.x,{numberOfLines:2,style:C.subtitle,children:[m.s.t("Subdeck_add_subdeck_subtitle")," ",(0,r.jsx)(d.x,{style:C.deckName,children:i.name})]}),(0,r.jsx)(a.o,{maxLength:c.T,placeholder:m.s.t("CreationBulletin_Deck_Create_DeckNamePlaceholder"),textInputRef:k,onChangeText:w,onSubmitEditing:D}),(0,r.jsx)(l.z,{accessibilityLabel:"add_subdeck_button",isDisabled:!S,isLoading:y,shortcutType:p.P.Submit,style:C.createSubdeckButton,title:m.s.t("Subdeck_create_subdeck_title"),onPress:D})]})})})},78469:function(e,t,n){n.d(t,{k:function(){return C}});var r=n(85893),i=n(82296),o=n(61383),l=n(21944),a=n(67294),s=n(63547),d=n(38644),c=n(70480),u=n(62098),m=n(19633),f=n(71236),p=n(65831),h=n(11248),v=n(68887),g=n(287),b=n(75126),y=n(34489),x=n(58706);function _(e){let{anchorRef:t,folderId:n,isVisible:i,onClose:o,onCreateDeckPress:l,onGenerateWithAIPress:s,onImportDeckPress:_,onCreateFolderPress:w,onMoveToFolderPress:C,point:k}=e,{hasRootDecks:S}=(0,v.S)(),j=(0,x.Z)().width,D=(0,g.P)("ai_features"),I=(0,a.useRef)(null),T=y.Pl?[{accessibilityLabel:"button_create_new_deck",icon:u.U,title:b.s.t("CreateNewBulletin_CreateDeck_Title"),subtitle:b.s.t("CreateNewBulletin_CreateDeck_Subtitle"),onPress:l,shouldShowDisclosureIndicator:!0},...n?[{accessibilityLabel:"button_import_deck",icon:m._,title:b.s.t("CreateNewBulletin_ImportDeck_Title"),subtitle:b.s.t("CreateNewBulletin_ImportDeck_Subtitle"),onPress:_,shouldShowDisclosureIndicator:!0}]:[],...D?[{accessibilityLabel:"button_generate_with_ai",icon:f.U,title:b.s.t("CreateNewBulletin_GenerateWithAI_Title"),subtitle:b.s.t("CreateNewBulletin_GenerateWithAI_Subtitle"),onPress:s,shouldShowDisclosureIndicator:!0}]:[],...w?[{accessibilityLabel:"button_create_folder",icon:p.D,title:b.s.t("CreateNewBulletin_CreateFolder_Title"),subtitle:b.s.t("CreateNewBulletin_CreateFolder_Subtitle"),onPress:w,shouldShowDisclosureIndicator:!0}]:[],...C&&S?[{accessibilityLabel:"button_move_to_folder",icon:h.t,title:b.s.t("CreateNewBulletin_MoveToFolder_Title"),subtitle:b.s.t("CreateNewBulletin_MoveToFolder_Subtitle"),onPress:C,shouldShowDisclosureIndicator:!0}]:[]]:[{accessibilityLabel:"button_add_manually",icon:u.U,iconSize:32,title:b.s.t("CreateNewBulletin_AddManually_Title"),subtitle:b.s.t("CreateNewBulletin_AddManually_Subtitle"),onPress:l,shouldShowDisclosureIndicator:!0},{accessibilityLabel:"button_import_in_bulk",icon:m._,iconSize:32,title:b.s.t("CreateNewBulletin_ImportInBulk_Title"),subtitle:b.s.t("CreateNewBulletin_ImportInBulk_Subtitle"),onPress:_,shouldShowDisclosureIndicator:!0}];return((0,a.useEffect)(()=>
1{if(k&&i){var e;let t=k.x>j/4*3;null===(e=I.current)||void 0===e||e.showAtPoint({top:k.y,left:k.x},"down",t?"left":"right")}},[k,i,j]),k)?(0,r.jsx)(d.M,{ref:I,items:T,onHide:o}):(0,r.jsx)(c.U,{isVisible:i,items:T,popoverAnchorRef:null==t?void 0:t.current,onClose:o})}var w=n(11848);let C=(0,a.forwardRef)(function(e,t){let{isPresentationEnabled:n=!0,folderId:d,anchorRef:c,initialVisibility:u,onGuestRedirect:m,onDeckCreated:f,onRequestGenerateAIPrompt:p,onPressImportInformation:h,onRequestImportCsv:v,onPressPdf:g,onPressPasteNotes:b,onPressPhoto:y,onPressPhotoSource:x,onPressQuizlet:C,onPressYouTube:k,onMoveToFolderPress:S,location:j}=e,[D,I]=(0,a.useState)(),T=(0,a.useRef)(null),P=(0,a.useRef)(null),A=(0,a.useRef)(null),[E,{show:L,hide:R}]=(0,i.O)(u),M=(0,a.useCallback)(()=>{o.G.getInstance().logEvent("click_add_new_deck"),L()},[L]),F=(0,a.useCallback)(()=>{var e;if(m){R(),m();return}(0,l.c)(R,null===(e=P.current)||void 0===e?void 0:e.show)},[R,m]),Z=(0,a.useCallback)(()=>{var e;(0,l.c)(R,null===(e=A.current)||void 0===e?void 0:e.show)},[R]),z=(0,a.useCallback)(()=>{var e;if(m){R(),m();return}(0,l.c)(R,null===(e=T.current)||void 0===e?void 0:e.show)},[R,m]),H=(0,a.useCallback)(e=>{I(e),M()},[M]),B=(0,a.useCallback)(()=>{R(),I(void 0)},[R]);return(0,a.useImperativeHandle)(t,()=>({showCreateNewBulletin:M,showCreateDeckBulletin:F,showImportDeckBulletin:Z,showCreateFolderBulletin:z,showCreateNewBulletinAtPoint:H}),[M,F,Z,z,H]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(_,{anchorRef:c,folderId:d,isVisible:E,point:D,onClose:B,onCreateDeckPress:F,onGenerateWithAIPress:()=>{(0,l.c)(R,p)},onImportDeckPress:Z,...S?{onMoveToFolderPress:()=>{(0,l.c)(R,S)}}:{onCreateFolderPress:z}}),(0,r.jsx)(s.e,{ref:P,contentMode:"create",folderId:d,location:j,onDeckCreated:f}),(0,r.jsx)(s.e,{ref:A,contentMode:"upload",folderId:d,isPresentationEnabled:n,location:j,onPressCsv:v?()=>{var e;null===(e=A.current)||void 0===e||e.hide(),v()}:void 0,onPressPasteNotes:b?()=>{var e;null===(e=A.current)||void 0===e||e.hide(),b()}:void 0,onPressPdf:g,onPressPhoto:y?()=>{var e;null===(e=A.current)||void 0===e||e.hide(),y()}:void 0,onPressPhotoSource:x?e=>x(e):void 0,onPressQuizlet:C?()=>{var e;null===(e=A.current)||void 0===e||e.hide(),C()}:void 0,onPressYouTube:k?(e,t)=>{var n;null===(n=A.current)||void 0===n||n.hide(),k(e,t)}:void 0,onRequestCreateAndImport:h}),(0,r.jsx)(w.a,{ref:T})]})})},11848:function(e,t,n){n.d(t,{a:function(){return eg}});var r=n(85893),i=n(38652),o=n(17216),l=n(11161),a=n(7939),s=n(42417),d=n(29264),c=n(89147),u=n(75100),m=n(65173),f=n(25973),p=n(61293),h=n(89776),v=n(1435),g=n(90171),b=n(75126),y=n(95262),x=n(34489),_=n(67294),w=n(34424),C=n(43113),k=n(98805),S=n(48479),j=n(77460),D=n(73382),I=n(92564);let T=e=>()=>I.Z.create({container:{flex:1,alignItems:"center"},cell:{width:e,height:e,alignItems:"center",justifyContent:"center"},emoji:{fontSize:e-12,lineHeight:e}});function P(e){let{onEmojiPress:t,searchQuery:n,category:i}=e,[{width:o},l]=(0,S.k)(),[s,c]=(0,_.useState)(),[u,m]=(0,_.useState)(0),[f,p]=(0,_.useState)(6),h=(0,j.Y)(T,[u]),v=(0,_.useRef)(null),g=(0,_.useCallback)(e=>{t(e.unified)},[t]),b=(0,_.useCallback)(()=>{var e;if(!o)return;let t=(0,d.kU)(i,n);c((0,d.VI)(t));let r=Math.floor(o/D.v);m(Math.floor(o/r)),p(r),null===(e=v.current)||void 0===e||e.scrollToOffset({animated:!1,offset:0})},[i,n,o]);(0,_.useEffect)(()=>{b()},[b]);let y=(0,_.useCallback)(e=>{let{item:t}=e;return(0,r.jsx)(a.A,{accessibilityLabel:"button_emoji",style:h.cell,onPress:()=>g(t),children:(0,r.jsx)(k.x,{style:h.emoji,children:(0,d.eK)(t)})})},[g,h]);return(0,r.jsx)(w.Z,{style:h.container,onLayout:l,children:(0,r.jsx)(C.O,{data:s,keyboardShouldPersistTaps:"always",numColumns:f,renderItem:y,scrollRef:v,withRNGH:x.wZ},"emoji-list-".concat(f))})}var A=n(22902),E=n(30665);function L(){return(L=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}function R(){return(R=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}function M(){return(M=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}function F(){return(F=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}function Z(){return(Z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}function z(){return(z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}function H(){return(H=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}let B=(0,E.D)(function(e){return _.createElement("svg",R({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),_.createElement("path",{fill:e.color,fillRule:"evenodd",d:"M18.575 10.495c.974-1.104 2.282-3.607.475-5.473-.633-.654-1.42-1.007-2.275-1.021-1.684-.028-3.055 1.25-3.205 1.395a6 6 0 0 0-1.189-.112c-.55 0-1.055.068-1.522.185l-.079-.07-.003-.003C10.627 5.25 9.257 3.973 7.571 4c-.854.014-1.641.368-2.275 1.022-1.802 1.862-.504 4.357.47 5.465-.675.621-2.25 2.351-1.62 4.537.92 3.196 3.795 3.304 3.988 3.307h.518c.886 1.13 2.401 1.638 3.52 1.638 1.028 0 2.553-.431 3.499-1.638h.518c.203-.003 3.08-.111 3.999-3.307.628-2.181-.939-3.908-1.613-4.53m.63 4.257c-.709 2.465-2.79 2.574-3.016 2.58h-.888c-.27 0-.49.206-.507.466-.738.871-1.92 1.17-2.622 1.17-.686 0-1.853-.288-2.595-1.117v-.009l.002-.01c0-.277-.228-.5-.51-.5h-.915c-.235-.006-2.317-.115-3.027-2.58-.59-2.05 1.46-3.648 1.544-3.713l.255-.194.097-.3c.056-.174 1.424-4.26 5.358-4.26 3.87 0 4.867 4.014 4.907 4.181l.084.351.287.22c.087.067 2.136 1.666 1.547 3.715M7.59 5c-.518.008-1.056.
1197-1.553.71-1.307 1.351-.235 3.142.29 3.854.454-.984 1.509-2.784 3.44-3.704-.428-.333-1.269-.875-2.177-.86m9.169 0c.517.008 1.056.197 1.552.71 1.284 1.326.275 3.075-.259 3.812-.396-1.034-1.354-2.898-3.33-3.767.456-.33 1.22-.768 2.037-.755M12.61 17.166a.32.32 0 0 0 .238.086c.347 0 .362-.328.362-.332l.68.03v.003a1.015 1.015 0 0 1-1.042.966c-.262 0-.5-.09-.68-.25-.181.16-.419.25-.68.25-.649 0-1.02-.497-1.043-.966v-.003l.68-.03c0 .004.015.332.362.332a.32.32 0 0 0 .239-.086c.097-.098.093-.242.093-.242v-.73c-.533-.238-1.153-.921-1.153-1.363 0-.544.561-.544.561-.544H13.1s.561 0 .561.543c0 .44-.612 1.117-1.143 1.36v.734s-.004.144.094.242m2.608-5.88c-.375 0-.68.448-.68 1s.305 1 .68 1 .68-.448.68-1-.304-1-.68-1m-6.803 1c0-.552.305-1 .68-1s.68.448.68 1-.304 1-.68 1c-.375 0-.68-.448-.68-1",clipRule:"evenodd"}))}),N=(0,E.D)(function(e){return _.createElement("svg",M({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),_.createElement("path",{fill:e.color,fillRule:"evenodd",d:"M12.17 6.629S13.396 6 14.322 6c.738.02 1.455.224 2.08.591v5.865a5.2 5.2 0 0 0-2.08-.456c-.87.032-1.724.24-2.505.61a5.4 5.4 0 0 1-2.35.686c-1.733 0-2.427-.988-2.427-.988v-5.66c.001.001.695.61 2.428.61a6.65 6.65 0 0 0 2.702-.629m-5.13-1.32v-.013H6v14h1.04v-5.742s.694.704 2.428.704a6.65 6.65 0 0 0 2.702-.629S13.396 13 14.322 13a5.15 5.15 0 0 1 2.428.629l.693.44v-8l-.693-.44A5.15 5.15 0 0 0 14.322 5c-.87.032-1.724.24-2.505.61a5.4 5.4 0 0 1-2.35.686c-1.732 0-2.425-.986-2.427-.988",clipRule:"evenodd"}))}),O=(0,E.D)(function(e){return _.createElement("svg",F({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),_.createElement("path",{fill:e.color,fillRule:"evenodd",d:"M19.467 13.904c.015.178-.556.383-.556.383l1.089.63s-.154.186-.464.356c.39.31.45.653.45 1.014 0 .445-.171.831-.747 1.192.286.26.568 1.222.568 1.519 0 .508-1.447.996-1.78.996l-.848.001-4.807.004q-.776.
1002-1.485 0l-5.606-.016L4 7.648h5.87l.818-3.289h.001a.475.475 0 0 1 .583-.34l.001-.002.06.02.001.001 3.242 1.107-.307.9-2.784-.952-.635 2.555h1.5l-.297 3.038q.584-.03 1.196-.03c3.59 0 6.512.757 6.512 2.546 0 .216-.076.297-.18.41a1.5 1.5 0 0 0-.188.238l.027.014c.022.009.045.018.047.04M5.049 8.649l1.03 10.349h.608c-.008-.297.345-1.227.631-1.488-.576-.36-.845-.684-.845-1.13 0-.38.103-.898.536-1.22-.539-.186-.628-.565-.283-.667.165-.049.266-.029.347-.012.107.021.177.035.307-.132l-.128-.125c-.363-.354-.565-.55-.565-1.022 0-1.417 1.868-2.184 4.426-2.443l.234-2.11zM19.2 14.994l-5.921 1.96-5.68-1.96zM8.156 18.735c.339.334 1.122.263 1.122.263h8.401s.395-.003.699-.304c.436-.43-.1-1.04-.642-1.04l-4.24-.004h-.01l-4.79-.004c-.554 0-.878.754-.54 1.09M7.67 13.22c-.07-1.167 3.646-1.594 5.58-1.594 1.872 0 5.596.426 5.561 1.594-.009.315-1.298.773-1.298.773H8.996s-1.305-.42-1.327-.773",clipRule:"evenodd"}))}),K=(0,E.D)(function(e){return _.createElement("svg",Z({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),_.createElement("path",{fill:e.color,fillRule:"evenodd",d:"m15.875 4-.024 5.02s-.957-.23-1.621.132c-1.058.578-1.052 1.398-.818 2.033.409 1.113 3.485.576 3.485-1.57V5.322s1.477.734 1.578 2.108c.04.538-.208.973-.408 1.326-.197.348-.35.615-.132.82 0 0 1.242-1.122 1.265-2.195C19.25 4.985 17.497 4 15.876 4M11.65 19.929h-1.255l-.678-.744a3.23 3.23 0 0 1-2.084.794c-1.307 0-2.3-.765-2.3-1.95 0-.88.55-1.422 1.307-1.84q.127-.073.27-.139c-.45-.47-.839-.936-.839-1.55 0-.857.739-1.562 1.772-1.562.973 0 1.771.631 1.771 1.568 0 .842-.664 1.323-1.427 1.725l1.453 1.645a3.5 3.5 0 0 0 .337-1.671v-.258h.888v.288a4.15 4.15 0 0 1-.554 2.305zm5.064-3.46-2.432 3.5-1.237.031 2.734-3.649 2.508-3.395h1.2zm-4.38-8.82h-3v4.018h-1V7.649L5 7.65v-1h7.333zm0-2.992H5v1h7.333zm4.509 13.6c0 .94.509 1.685 1.402 1.685.909 0 1.422-.77 1.422-1.676v-.14c0-.935-.523-1.67-1.412-1.67s-1.412.745-1.412 1.661zm-2.669-1.813c-.893 0-1.402-.745-1.402-1.685v-.138c0-.916.523-1.661 1.412-1.661s1.412.735 1.412 1.67v.139c0 .905-.514 1.675-1.422 1.675m-6.97.297q.104-.058.214-.109l1.717 1.887a2.02 2.02 0 0 1-1.454.528c-.739 0-1.385-.303-1.385-1.091 0-.575.369-.927.908-1.215m.475-1.046h-.001m1.037-1.145c0 .545-.434.843-1.037 1.145-.524-.51-.693-.797-.693-1.14a.84.84 0 0 1 .417-.77.88.88 0 0 1 .89-.002c.275.16.437.455.423.768m8.912 3.615c0-.54.207-.939.632-.939.407 0 .622.377.622.948v.04c0 .576-.234.953-.627.953-.402 0-.627-.386-.627-.962zm-3.439-4.432c-.422 0-.629.397-.629.935v.04c0 .573.225.957.625.957.391 0 .624-.375.624-.949v-.04c0-.568-.216-.943-.62-.943",clipRule:"evenodd"}))}),V=(0,E.D)(function(e){return _.createElement("svg",H({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),_.createElement("path",{fill:e.color,fillRule:"evenodd",d:"M20 12a8 8 0 1 0-16 0 8 8 0 0 0 16 0m-1 0a7 7 0 1 0-14 0 7 7 0 0 0 14 0m-4.582-3c.414 0 .75.448.75 1s-.336 1-.75 1-.75-.448-.75-1 .336-1 .75-1m-3.921 1c0-.553-.335-1-.749-1C9.335 9 9 9.447 9 10s.333 1 .748 1 .749-.447.749-1m1.51 3.676c1.398 0 2.66-.302 3.568-.52.886-.211 1.433-.342 1.433-.03a5 5 0 0 1-10 0c0-.312.546-.181 1.433.03.907.218 2.17.52 3.567.52m3.089.457c-.698.182-1.769.463-3.096.463s-2.397-.28-3.096-.463c-.58-.152-.904-.237-.904-.037 0 1.913 2.908 2 4 2 1.226 0 4-.087 4-2 0-.2-.323-.115-.904.037",clipRule:"evenodd"}))}),G=(0,E.D)(function(e){return _.createElement("svg",L({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),_.createElement("path",{fill:e.color,fillRule:"evenodd",d:"M4 12a8 8 0 1 0 16 0 8 8 0 0 0-16 0m13.563.888-.01-.017 1.343-.31.137.256a7.07 7.07 0 0 1-2.584 4.691l-.544-.138.002-1.996zm-2.33 4.833.045-2.02-1.947-.73-2.359 1.27v1.452l2.92 1.063-.009-.075zm-2.238-5.823v2.547L10.65 15.71 8.2 14.347l-.013-2.717 2.008-1.303zm2.29-1.489-1.915.982-2.788-1.566-.162-2.133 2.808-1.461 2.06 1.298zm.626-2.64-.003 2.496 1.286 2.038 1.63-.434.178-.926a7.06 7.06 0 0 0-1.826-3.774zm-2.934-2.125v-.657A7 7 0 0 0 12 4.92c-1.5 0-2.891.466-4.036 1.262l.26.858h2.071zm-5.414 5.939.013 2.87-1.089 1.09.05.056-.58.092A7.05 7.05 0 0 1 4.919 12c0-.46.044-.912.129-1.348l1.403-.626zM6.355 9.325l-1.091.488a7.1 7.1 0 0 1 2.154-3.211l.22.67zm-.016 6.929.676-.109 1.533 1.753
1-.007.282a7.1 7.1 0 0 1-2.202-1.926m2.818 2.233.006-.184h1.564l1.966.744q-.343.033-.693.033a7.1 7.1 0 0 1-2.843-.593",clipRule:"evenodd"}))}),U=(0,E.D)(function(e){return _.createElement("svg",z({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),_.createElement("path",{fill:e.color,fillRule:"evenodd",d:"M13.334 4h-6v6H4v9h1v-8h3.333V5h5l.002 5h.999V9H19v10h1V8h-5.666V4zm-2.209 6.667h1.75a3.11 3.11 0 0 1 3.125 3v1h1c.368 0 .667.298.667.666V18a.667.667 0 0 1-.667.667V20h-2v-1.333H9V20H7v-1.333A.667.667 0 0 1 6.333 18v-2.667c0-.368.299-.666.667-.666h1v-1a3.11 3.11 0 0 1 3.125-3M6 11.99h1v1H6zM12.333 8h-1v1h1zm-3 0h1v1h-1zM18 9.99h-1v1h1zm-1 2h1v1h-1zM10.333 6l-1-.01V7h1zm1 0h1v1h-1zM15 14.667c0-1.525 0-3-3-3s-3 1.476-3 3zm-6.854.74a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5m8.438.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0M17 17.332v.657H7v-.657h2.5v-.01c0-.184.15-.333.333-.333h4.334c.184 0 .333.149.333.333v.01z",clipRule:"evenodd"}))}),Y=x.Pl?Math.min(376,A.J):"100%",q="[emotion, people]",Q=[{categoryKey:"[emotion, people]",icon:V},{categoryKey:"Animals & Nature",icon:B},{categoryKey:"Food & Drink",icon:O},{categoryKey:"Activities",icon:G},{categoryKey:"Travel & Places",icon:U},{categoryKey:"Objects",icon:K},{categoryKey:"Flags",icon:N}],W=I.Z.create({container:{width:Y,height:344},popoverHeader:{paddingTop:g.K.Two},searchBar:{paddingHorizontal:x.Pl?g.K.Two:g.K.Zero,paddingTop:x.Pl?g.K.Two:g.K.Zero,paddingBottom:g.K.Two},tabContainer:{paddingTop:g.K.Two,paddingHorizontal:x.Pl?g.K.Two:g.K.Zero,flexDirection:"row",justifyContent:"space-between",alignItems:"center"}});function X(e){let{onSelectEmoji:t,isVisible:n,canRemove:i,onClose:o,anchorRef:a}=e,[s,d]=(0,_.useState)(q),[C,k]=(0,_.useState)(""),S=e=>{let{categoryKey:t,icon:n}=e;return(0,r.jsx)(u.h,{accessibilityLabel:"button_emoji_category_".concat(t),icon:n,type:s===t?"secondary":"quietFade",onPress:()=>d(t)},t)};(0,_.useEffect)(()=>{n&&(k(""),d(q))},[n]);let j=e=>{y.s.triggerSelection(),t(e),o()},D=()=>{j()},I=()=>(0,r.jsx)(m.Q,{accessibilityLabel:"button_remove_icon",isDisabled:i,isUnderlined:!1,title:b.s.t("EmojiPicker_Button_RemoveEmoji"),onPress:D}),T=()=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(w.Z,{style:W.container,children:[(0,r.jsx)(h.E,{containerStyle:W.searchBar,isLoading:!1,placeholder:b.s.t("EmojiPicker_Placeholder_SearchEmoji"),size:"small",value:C,onChangeText:k}),(0,r.jsx)(P,{category:s,searchQuery:C,onEmojiPress:j})]}),(0,r.jsx)(w.Z,{style:W.tabContainer,children:Q.map(S)})]});return x.Pl&&a?n?(0,r.jsxs)(p.J,{anchorHorizontalOffset:g.K.Two,anchorRef:a,backgroundType:"surface",horizontalAlignment:"right",verticalAlignment:"center",onClose:o,children:[(0,r.jsx)(c.X,{leftItem:I(),rightItem:(0,r.jsx)(f.P,{accessibilityLabel:"close_emoji_picker_button",onPress:o}),style:W.popoverHeader,title:b.s.t("EmojiPicker_Title_Icon")}),T()]}):null:(0,r.jsx)(l.P,{isVisible:n,leftItem:I(),title:b.s.t("EmojiPicker_Title_Icon"),onClose:o,children:(0,r.jsx)(v.D,{withoutFlex:!0,children:T()})})}var J=n(71690),$=n(72811),ee=n(30756),et=n(4064),en=n(5324),er=n(54584),ei=n(70668),eo=n(68115),el=n(16419),ea=n(61383),es=n(45007);let ed=()=>{let e=(0,es.I0)(),[t,n,r]=(0,eo.k)(!1);return{createOrUpdateFolder:t=>{let{folderId:i,name:o,emojiUtf16:l,color:a,onSuccess:s}=t;n(),e((0,el.Zv)({folderId:i,name:o,color:a,emojiUtf16:l,onComplete:e=>{let{error:t,data:n}=e;if(r(),t){var o;null===(o=ei.b.showError)||void 0===o||o.call(ei.b,t);return}i||ea.G.getInstance().logEvent("folder_added",{color:a,...l?{emoji:l}:{}}),s(n)}}))},isCreatingFolder:t}};var ec=n(82296),eu=n(28574),em=n(89773),ef=n(27648),ep=n(73992),eh=n(8862);let ev=e=>{let{colors:t,fonts:n,isTablet:r}=e;return I.Z.create({iconAndColorsContainer:{gap:g.K.Two,paddingTop:g.K.Five,paddingBottom:g.K.Eight},iconAndColorsTitle:{...n.caption.medium,color:t.text.secondary},iconAndColorsContentContainer:{flexDirection:"row",alignItems:"center",justifyContent:x.Pl||r?"flex-start":"space-between",gap:x.Pl||r?g.K.Three:void 0},menuItem:{width:44,height:44,borderRadius:eh.w.Full},iconContainer:{backgroundColor:t.surface.surface2,alignItems:"center",justifyContent:"center"},icon:{fontSize:24},itemSelected:{borderWidth:2}})},eg=(0,i.g)(function(e){let{data:t,isVisible:n,onClose:i}=e,c=(0,er.u)(),{createOrUpdateFolder:u,isCreatingFolder:m}=ed(),[f,p]=(0,_.useState)(),{colors:h}=(0,em.Fg)(),[g,{show:y,hide:C}]=(0,ec.O)(!1),[S,D]=(0,_.useState)(""),[I,T]=(0,eu.H)("blue","selection"),P=(0,_.useRef)(null),A=(0,j.y)(ev),E=t?b.s.t("CreateFolder_Bulletin_FolderSettings"):b.s.t("CreateNewBulletin_CreateFolder_Title");(0,_.useEffect)(()=>{n&&(D((null==t?void 0:t.name)||""),T((null==t?void 0:t.color)||"blue",!0),p((null==t?void 0:t.emojiUtf16)||void 0))},[null==t?void 0:t.color,null==t?void 0:t.emojiUtf16,null==t?void 0:t.name,n,T]);let L=()=>{i()},R=()=>{u({folderId:null==t?void 0:t.id,name:S,color:I,emojiUtf16:f,onSuccess:L})},M=e=>(0,r.jsx)(a.A,{accessibilityLabel:"button_folder_color_".concat(e),style:[A.menuItem,{backgroundColor:(0,ee.D)(e,h,"background"),borderColor:(0,ee.D)(e,h,"primary")},I===e&&A.itemSelected],onPress:()=>T(e)},e);return(0,r.jsx)(l.P,{isVisible:n,title:E,webSize:"large",onClose:i,onShow:()=>
1{if(x.Pl){var e;null===(e=P.current)||void 0===e||e.focus()}},children:(0,r.jsxs)(v.D,{withoutFlex:!0,children:[(0,r.jsx)(J.o,{autoFocus:!0,defaultValue:null==t?void 0:t.name,maxLength:et.T,placeholder:b.s.t("CreateFolder_Bulletin_FolderName_placeholder"),textInputRef:P,onChangeText:D,onSubmitEditing:R}),(0,r.jsxs)(w.Z,{style:A.iconAndColorsContainer,children:[(0,r.jsx)(k.x,{style:A.iconAndColorsTitle,children:b.s.t("CreateFolder_Bulletin_IconAndColors_title")}),(0,r.jsxs)(w.Z,{style:A.iconAndColorsContentContainer,children:[(0,r.jsx)(o.e,{ref:c,children:(0,r.jsx)(a.A,{accessibilityLabel:"button_folder_icon",style:[A.menuItem,A.iconContainer],onPress:y,children:f?(0,r.jsx)(k.x,{style:A.icon,children:(0,d.AJ)(f)}):(0,r.jsx)(en.R,{color:(0,ee.D)(I,h,"primary")})})}),(0,r.jsx)($.Z,{isFixedHeight:!0,isVertical:!0}),Object.values(ef.D).map(e=>M(e))]})]}),(0,r.jsx)(s.z,{accessibilityLabel:"create_folder_button",isDisabled:!(0,ep.e)(S),isLoading:m,title:t?b.s.t("Common_Save"):b.s.t("Common_Create"),onPress:R}),(0,r.jsx)(X,{anchorRef:c.current,canRemove:!f,isVisible:g,onClose:C,onSelectEmoji:p})]})})})},13254:function(e,t,n){n.d(t,{a:function(){return h}});var r=n(85893),i=n(47174),o=n(33669),l=n(98805),a=n(77460);n(67294);var s=n(34489),d=n(92564);let c=e=>t=>{let{colors:n,fonts:r}=t;return d.Z.create({text:{...r.paragraph.small,color:s.Pl&&"warning"===e?n.colors.orange:n.text.primary}})};function u(e){let{type:t,children:n,style:i}=e,o=(0,a.Y)(c,[t]);return(0,r.jsx)(l.x,{style:[o.text,i],children:n})}var m=n(1638),f=n(82296);let p=d.Z.create({container:{maxWidth:360}});function h(e){let{label:t,title:n}=e,[l,{show:a,hide:s}]=(0,f.O)(),d=(0,r.jsx)(m.s,{colorToken:"system.error"});return(0,r.jsx)(o.P,{content:(0,r.jsx)(u,{type:"info",children:t}),isVisible:l,placement:"bottom",title:n,type:"default",webStyle:p.container,onClose:s,children:(0,r.jsx)(i.n,{accessibilityLabel:"deck_cell_error_icon",icon:d,onPress:a})})}},3208:function(e,t,n){n.d(t,{O:function(){return b}});var r=n(85893),i=n(98805),o=n(12612),l=n(30971),a=n(32456),s=n(87447),d=n(75126),c=n(77460),u=n(74635),m=n(38679),f=n(69776),p=n(79411);n(67294);var h=n(90171),v=n(92564);let g=e=>{let{colors:t,fonts:n}=e;return v.Z.create({grayHint:{...n.caption.medium,color:t.text.secondary},successHint:{...n.caption.medium,color:t.system.success,marginLeft:h.K.One}})};function b(e){let{deck:t}=e,n=(0,a.y)(),h=(0,c.y)(g),v=(0,s.E)(t.id),b=(0,l.o)(t);if((0,m.p)(t.state))return(0,r.jsx)(i.x,{numberOfLines:2,style:h.grayHint,children:d.s.t("Decks_LearningStateHints_PreparingForLearning")});if(t.algorithmType===u.B.spacedRepetition){let e=t.learningCardsCount+t.newCardsCount+t.graduatedCardsCount;return n&&t.offlineModeEnabled&&(null==v?void 0:v.state)&&"success"!==v.state?(0,r.jsx)(i.x,{numberOfLines:2,style:h.grayHint,children:d.s.t("Decks_LearningStateHints_DownloadIncomplete")}
1):0===t.totalCardsCount&&0===t.totalNotStudiedCount&&0===t.totalToReviewCount?(0,r.jsx)(i.x,{numberOfLines:2,style:h.grayHint,children:d.s.t("Decks_LearningStateHints_EmptyDeck")}):n&&!t.isRootDeck&&(null==b?void 0:b.offlineModeEnabled)?(0,r.jsx)(i.x,{numberOfLines:2,style:h.grayHint,children:d.s.t("Decks_LearningStateHints_AvailableOffline")}):t.learntTodayCount===t.toLearnTodayTotalCount?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.q,{colorToken:"system.success",size:16}),(0,r.jsx)(i.x,{numberOfLines:2,style:h.successHint,children:d.s.t("Decks_LearningStateHints_CompletedForToday")})]}):(0,r.jsxs)(i.x,{style:h.grayHint,children:[d.s.t("Decks_LearningStateHints_CardsForToday")," ",e]})}let y=(0,p.h)(t);return y.algorithmType===u.B.speedLearning?0===t.totalCardsCount&&0===y.notStudiedCount&&0===y.notQuiteCount&&0===y.gotItCount?(0,r.jsx)(i.x,{numberOfLines:2,style:h.grayHint,children:d.s.t("Decks_LearningStateHints_EmptyDeck")}):(0,r.jsxs)(i.x,{style:h.grayHint,children:[d.s.t("Decks_LearningStateHints_SpeedLearningCardsToStudy")," ",(0,f.c)(y)]}):null}},92880:function(e,t,n){n.d(t,{E:function(){return p}});var r=n(85893),i=n(98568),o=n(11248),l=n(1559),a=n(67165),s=n(72276),d=n(75126),c=n(8844),u=n(34489),m=n(84046),f=n(67294);let p=e=>{let{deck:t,nestingLevel:n,areAllActionsExceptDeleteDisabled:p,onMovePress:h,onDeletePress:v,onAddSubdeckPress:g,onArchivePress:b}=e;return(0,f.useMemo)(()=>[{icon:u.Pl?(0,r.jsx)(i.d,{colorToken:"system.onSurface"}):i.d,title:d.s.t("DeckInfo_Settings_DeckSection_addSubdeck"),iosIcon:(0,m.Q)(s.pl),onPress:()=>g(t),isDisabled:p||!(0,c.E)(t,"add_subdeck")},{icon:u.Pl?(0,r.jsx)(o.t,{colorToken:"system.onSurface"}):o.t,iosIcon:(0,m.Q)(s.q4),title:d.s.t("DeckInfo_Settings_DeckSection_moveDeck"),onPress:()=>h(t),isDisabled:p||!(0,c.E)(t,"move_deck")},{icon:u.Pl?(0,r.jsx)(l.r,{colorToken:"system.onSurface"}):l.r,iosIcon:(0,m.Q)(s.q1),title:d.s.t("DeckInfo_Settings_DeckSection_archive"),onPress:()=>b(t,"deck_action"),isDisabled:p||!(0,c.E)(t,"archive_deck")},{icon:u.Pl?(0,r.jsx)(a.p,{colorToken:"system.error"}):a.p,iosIcon:(0,m.Q)(s.Uw),title:d.s.t("DeckInfo_Settings_DeckSection_deleteDeck"),onPress:()=>v(t),type:"destructive",isDisabled:!(0,c.E)(t,"delete_deck")&&n>0}],[t,p,n,g,v,h,b])}},46039:function(e,t,n){n.d(t,{K:function(){return E}});var r=n(85893),i=n(7939),o=n(52538),l=n(72811),a=n(98805),s=n(13254),d=n(25425),c=n(67165),u=n(19942),m=n(72276),f=n(75126),p=n(40105),h=n(89773),v=n(77460),g=n(48007),b=n(34489),y=n(84046),x=n(84336),_=n.n(x),w=n(67294),C=n(34424),k=n(48526),S=n(45007),j=n(90171),D=n(92564);let I=e=>{let{isTablet:t,colors:n,fonts:r}=e;return D.Z.create({actionsContainer:{paddingVertical:b.Pl?j.K.Two:void 0},container:{flexDirection:"row",alignItems:"center",paddingHorizontal:t?j.K.Five:j.K.Four,flex:1,justifyContent:"space-between",paddingVertical:j.K.Four},deckName:{flex:1,...r.heading.h4,color:n.text.disabled},rightViewContainer:{marginLeft:j.K.Four,flexDirection:"row",alignItems:"center"},separator:{position:"absolute",bottom:j.K.Zero,left:j.K.Zero,right:j.K.Zero}})};function T(e){let{file:t,progress:n,jobId:x,fileName:j,failure:D,folderId:T,location:P}=e,A=(0,S.I0)(),{colors:E}=(0,h.Fg)(),L=(0,v.y)(I),R=(0,w.useCallback)(()=>{A((0,p.nG)(x))},[A,x]),M=(0,w.useCallback)(()=>{A((0,p.hq)({jobId:x,file:t,folderId:T,location:null!=P?P:"main_screen"}))},[t,A,x,T,P]),F=(0,w.useMemo)(()=>D?[{icon:b.Pl?(0,r.jsx)(d.X,{colorToken:"system.onSurface"}):d.X,iosIcon:(0,y.Q)(m.QK),title:f.s.t("Common_Retry"),onPress:M,disabled:!1},{icon:b.Pl?(0,r.jsx)(c.p,{colorToken:"system.error"}):c.p,iosIcon:(0,y.Q)(m.Uw),title:f.s.t("DeckInfo_Settings_DeckSection_deleteDeck"),onPress:R,type:"destructive",disabled:!1}].filter(e=>!_()(e.onPress)):[],[R,M,D]);return(0,r.jsxs)(C.Z,{style:L.actionsContainer,children:[(0,r.jsx)(o.e,{buttons:F,children:(0,r.jsxs)(C.Z,{style:L.container,children:[(0,r.jsx)(a.x,{numberOfLines:1,style:L.deckName,children:j}),(()=>{if(!D)return(0,r.jsx)(i.A,{accessibilityLabel:"cancel_deck_uploading",style:L.rightViewContainer,onPress:R,children:(0,r.jsx)(k.$,{backgroundColor:E.system.onSurfaceVariant,fill:100*n,lineCap:"round",rotation:0,size:32,tintColor:E.system.success,width:2,children:()=>(0,r.jsx)(u.T,{colorToken:"system.onSurfaceDisabled",size:24})})});let e=f.s.t("Errors_SomethingWentWrong");return D.reason===g.z.tooBig?e=f.s.t("UploadDeckBulletin_Failure_Bodies_tooBig"):D.customMessage&&(e=D.customMessage),(0,r.jsx)(s.a,{label:e,title:f.s.t("Common_Error")})})()]})}),(0,r.jsx)(l.Z,{style:L.separator})]})}var P=n(96697),A=n(8482);function E(e){let{folderId:t}=e;return(0,P.C)(A.Zk).map(e=>e.folderId===t&&(0,r.jsx)(T,{failure:e.failure,file:e.file,fileName:e.fileName,jobId:e.jobId,progress:e.progress},e.jobId))}},58853:function(e,t,n){n.d(t,{Tu:function(){return l},pF:function(){return i},qC:function(){return a},w4:function(){return o}});var r=n(47671);let i=(0,r.N)(n(79016)),o=(0,r.N)(n(54548)),l=(0,r.N)(n(44933)),a=(0,r.N)(n(59600))},74842:function(e,t,n){n.d(t,{w:function(){return _}});var r,i,o=n(85893),l=n(38652),a=n(37027),s=n(70480),d=n(86342),c=n(77744),u=n(75126),m=n(61383),f=n(34489),p=n(67294),h=n(92564),v=n(3860),g=n(58853);function b(){return(b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}var y=function(e){return p.createElement("svg",b({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},e),r||(r=p.createElement("path",{fill:"#8FD4FF",d:"M17.559 2.5H6.793A4.614 4.614 0 0 0 2.18 7.114v10.765a4.614 4.614 0 0 0 4.614 4.613h10.764a4.614 4.614 0 0 0 4.614-4.613V7.114A4.613 4.613 0 0 0 17.558 2.5"})),i||(i=p.createElement("path",{fill:"#007EFA",d:"M11.922 11.489a3.95 3.95 0 0 0-4.09.092l-5.66 3.568v2.73a4.617 4.617 0 0 0 4.614 4.613H17.55a4.617 4.617 0 0 0 4.613-4.613v-.446l-10.25-5.952zM16.79 10.19a2.307 2.307 0 1 0 0-4.614 2.307 2.307 0 0 0 0 4.613"})))};let x=h.Z.create({quizletSubtitle:{maxWidth:227}}),_=(0,l.g)(function(e){let{isVisible:t,onClose:n,anchorRef:r,folderId:i,location:l,onImportPdfPress:p,onImportPhotoPress:h,onImportYouTubePress:b,onImportCsvPress:_,onImportPasteNotesPress:w,onImportQuizletPress:C,onGuestRedirect:k}=e,{hiddenInputRef:S,handleUploadDeckRequest:j}=(0,c.o)(void 0,i,l),D=(e,t)=>()=>{m.G.getInstance().logEvent("tap_import_nudge_dialog",{import_type:e}),t()},I=[...h?[{accessibilityLabel:"button_import_deck_from_photo",icon:(0,o.jsx)(y,{}),title:u.s.t(f.Pl?"ImportDeck_photo_title_web":"ImportDeck_photo_title"),subtitle:u.s.t(f.Pl?"ImportDeck_photo_subtitle_web":"ImportDeck_photo_subtitle"),onPress:D("photo",h),shouldShowDisclosureIndicator:!0}]:[],...b?[{accessibilityLabel:"button_import_deck_from_youtube",icon:(0,o.jsx)(v.Z,{height:24,width:24}),title:u.s.t("UploadDeck_YouTube_Title"),subtitle:u.s.t("UploadDeck_YouTube_Subtitle"),onPress:b,shouldShowDisclosureIndicator:!0}]:[],{accessibilityLabel:"button_import_deck_from_pdf",imageIcon:g.qC,title:u.s.t("ImportDeck_pdf_title"),subtitle:u.s.t("ImportDeck_pdf_subtitle"),onPress:D("pdf",p),shouldShowDisclosureIndicator:!0},{accessibilityLabel:"button_import_deck_from_csv",imageIcon:g.Tu,title:u.s.t("ImportDeck_csv_title"),subtitle:u.s.t("ImportDeck_csv_subtitle"),onPress:D("csv",_),shouldShowDisclosureIndicator:!0},{accessibilityLabel:"button_import_paste_notes",icon:d.N,title:u.s.t("UploadDeck_PasteNotes_Title"),subtitle:u.s.t("UploadDeck_PasteNotes_Subtitle"),onPress:D("paste",w),shouldShowDisclosureIndicator:!0},{accessibilityLabel:"button_import_deck_from_anki",imageIcon:g.pF,title:u.s.t("ImportDeck_anki_title"),subtitle:u.s.t("ImportDeck_anki_subtitle"),onPress:D("anki",null!=k?k:j),shouldShowDisclosureIndicator:!0},{accessibilityLabel:"button_import_deck_from_quizlet",imageIcon:g.w4,title:u.s.t("ImportDeck_quizlet_title"),subtitle:u.s.t("ImportDeck_quizlet_subtitle"),subtitleStyle:x.quizletSubtitle,onPress:D("quizlet",C),shouldShowDisclosureIndicator:!0}];return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.U,{isVisible:t,items:I,popoverAnchorRef:null==r?void 0:r.current,onClose:n}),(0,o.jsx)(a.x,{ref:S,mode:"deck"})]})})},94046:function(e,t,n){n.d(t,{H:function(){return y}});var r=n(85893),i=n(36113),o=n(63933),l=n(67294),a=n(93021),s=n(90171),d=n(8862);let c=n(92564).Z.create({folderIcon:{marginVertical:s.K.Two,marginRight:s.K.Three,borderRadius:d.w.S}});var u=n(30421),m=n(98568),f=n(67165),p=n(72276),h=n(75126),v=n(34489),g=n(84046);let b=e=>{let{folder:t,onSettingsPress:n,onCreateDeckPress:i,onDeletePress:o}=e;return(0,l.useMemo)(()=>[{title:h.s.t("Common_Settings"),icon:v.Pl?(0,r.jsx)(u.e,{colorToken:"system.onSurface"}):u.e,iosIcon:(0,g.Q)(p.bU),onPress:()=>n(t)},{title:h.s.t("Folders_AddDecks"),icon:v.Pl?(0,r.jsx)(m.d,{colorToken:"system.onSurface"}):m.d,iosIcon:(0,g.Q)(p.pl),onPress:e=>{let n=function(e){if(e){if("x"in e&&"y"in e&&"number"==typeof e.x&&"number"==typeof e.y)return{x:e.x,y:e.y};if("clientX"in e&&"clientY"in e&&"number"==typeof e.clientX)return{x:e.clientX,y:e.clientY};if("touches"in e){let t=e.touches[0];if(t&&"number"==typeof t.clientX&&"number"==typeof t.clientY)return{x:t.clientX,y:t.clientY}}if("nativeEvent"in e&&"pageX"in e.nativeEvent&&"pageY"in e.nativeEvent)return{x:e.nativeEvent.pageX,y:e.nativeEvent.pageY}}}(e);i(t.id,n)}},{title:h.s.t("Common_Delete"),icon:v.Pl?(0,r.jsx)(f.p,{colorToken:"system.error"}):f.p,iosIcon:(0,g.Q)(p.Uw),onPress:()=>o(t.id),type:"destructive"}],[n,t,i,o])};function y(e){let{folder:t,isLast:n,onPress:l,onLongPress:s,onSettingsPress:d,onDeletePress:u,onCreateDeckPress:m,...f}=e,p=(0,o.M)(),h=b({folder:t,onSettingsPress:d,onCreateDeckPress:m,onDeletePress:u});return(0,r.jsx)(i.s,{...f,actionButtons:h,item:t,renderLeftView:()=>(0,r.jsx)(a.J,{folder:t,size:p?"small":"default",style:c.folderIcon}),title:t.name,withSeparator:!n,onLongPress:s,onPress:l})}}
1,93021:function(e,t,n){n.d(t,{J:function(){return p}});var r=n(85893),i=n(29264),o=n(98805),l=n(5324),a=n(77460);n(67294);var s=n(34424),d=n(30756),c=n(90171),u=n(8862),m=n(92564);let f=(e,t,n)=>r=>{let{colors:i}=r;return m.Z.create({iconContainer:{marginVertical:c.K.Two,width:"default"===t?48:40,height:"default"===t?48:40,marginRight:c.K.Three,borderRadius:u.w.S,alignItems:"center",justifyContent:"center",...!n&&{backgroundColor:(0,d.D)(e,i,"background")}},icon:{fontSize:"default"===t?26:24}})};function p(e){let{folder:t,size:n="default",withoutBackground:d,style:c}=e,u=(0,a.Y)(f,[t.color,n,d]);return(0,r.jsx)(s.Z,{style:[u.iconContainer,c],children:t.emojiUtf16?(0,r.jsx)(o.x,{style:u.icon,children:(0,i.AJ)(t.emojiUtf16)}):(0,r.jsx)(l.R,{folderColor:t.color})})}},97397:function(e,t,n){n.d(t,{h:function(){return F}});var r=n(85893),i=n(38652),o=n(7364),l=n(42417),a=n(43113),s=n(72811),d=n(1421),c=n(67294),u=n(572);function m(e){let{isSelected:t,isDisabled:n,onPress:i,hierarchyRenderable:o,...l}=e;return(0,r.jsx)(u.R,{...l,hierarchyRenderable:o,isDisabled:n,rightView:(0,r.jsx)(d.X,{isChecked:t,onPress:n?void 0:()=>{null==i||i(o)}}),onPress:i})}var f=n(68887),p=n(92583),h=n(96697),v=n(28574),g=n(75126),b=n(8482),y=n(61383),x=n(77460),_=n(78510),w=n(74672),C=n(7684),k=n(70668),S=n(68796),j=n(68115),D=n(16419),I=n(45007);let T=()=>{let[e,t,n]=(0,j.k)(),r=(0,I.I0)(),i=(e,t)=>{var r,i;n(),e?null===(r=k.b.showError)||void 0===r||r.call(k.b,e):(null===(i=S.F.show)||void 0===i||i.call(S.F,{title:g.s.t("Decks_DeckMovedBadge_title")}),null==t||t())};return{isAssigningDeck:e,assignDeckToFolder:e=>{let{folderId:n,deckIds:o,onSuccess:l}=e;t(),r((0,D.vd)({folderId:n,deckIds:o,onComplete:e=>i(e,l)}))}}};var P=n(90171),A=n(34489),E=n(92564);let L=e=>t=>{let{colors:n}=t;return E.Z.create({container:{backgroundColor:A.iK?n.system.surface:void 0,paddingBottom:e+P.K.Four},button:{paddingHorizontal:P.K.Four,paddingTop:P.K.Four}})},R=(e,t)=>{let n=new Set;return t.deck&&t.deck.children.forEach(t=>{n.add(t.id);let r=e.find(e=>{var n;return(null===(n=e.deck)||void 0===n?void 0:n.id)===t.id});r&&R(e,r).forEach(e=>n.add(e))}),n},M=(e,t)=>{let n=new Set,r=(i,o,l)=>{if(!i.deck)return;let a=i.deck.id;(o||l)&&n.add(a);let s=o||t.has(a);i.deck.children.forEach(t=>{let n=e.find(e=>{var n;return(null===(n=e.deck)||void 0===n?void 0:n.id)===t.id});n&&r(n,s,l)})};return e.forEach(e=>{var t;return r(e,(null===(t=e.deck)||void 0===t?void 0:t.collaboration.state)==="active"&&"owner"!==e.deck.collaboration.role)}),n},F=(0,i.g)(function(e){let{data:t,isVisible:n,onClose:i,onMoveDecksSuccess:d}=e,{isAssigningDeck:u,assignDeckToFolder:k}=T(),{lightHierarchy:S}=(0,f.S)(),j=(0,p.H)(),D=(0,h.C)(b.ah),[I,P]=(0,v.H)(D,"light"),[A,E]=(0,v.H)(new Set,"selection"),F=(0,x.Y)(L,[j.bottom]),Z=(0,c.useMemo)(()=>(0,_.q)([],S.decks,I),[S,I]);(0,c.useEffect)(()=>{n&&(E(new Set,!0),P(D))},[D,n,P,E]);let z=(0,c.useMemo)(()=>M(Z,A),[Z,A]),H=(0,c.useCallback)(e=>{e.deck&&(P(t=>t.filter(t=>t!==e.deck.id)),(0,C.o)())},[P]),B=(0,c.useCallback)(e=>{e.deck&&(P(t=>[...t,e.deck.id]),(0,C.o)())},[P]),N=(0,c.useCallback)(e=>{if(!e.deck)return;let t=e.deck.id,n=R(Z,e);E(e=>{let r=new Set(e);return r.has(t)?(r.delete(t),n.forEach(e=>r.delete(e))):(r.add(t),n.forEach(e=>r.add(e))),r})},[Z,E]),O=(0,c.useCallback)(()=>{y.G.getInstance().logEvent("decks_added_to_folder",{count:A.size}),null==d||d(),i()},[i,d,A.size]),K=(0,c.useCallback)(()=>{t&&k({folderId:t,deckIds:Array.from(A),onSuccess:O})},[k,t,O,A]),V=(0,c.useCallback)(e=>{let{item:t}=e;return t.folder?null:(0,r.jsx)(m,{hierarchyRenderable:t,isDisabled:z.has(t.deck.id),isSelected:A.has(t.deck.id),onCollapse:H,onExpand:B,onPress:N})},[H,z,B,N,A]);return(0,r.jsxs)(o.L,{contentContainerStyle:F.container,isVisible:n,title:g.s.t("MoveToFolderBulletin_title"),onClose:i,children:[(0,r.jsx)(a.O,{ItemSeparatorComponent:s.Z,data:Z,keyExtractor:w.$I,renderItem:V}),(0,r.jsx)(l.z,{accessibilityLabel:"button_move_to_folder",containerStyle:F.button,isDisabled:0===A.size,isLoading:u,title:g.s.t("MoveToFolderBulletin_cta_button"),onPress:K})]})})},65831:function(e,t,n){n.d(t,{D:function(){return l}});var r=n(30665),i=n(67294);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}let l=(0,r.D)(function(e){return i.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),i.createElement("path",{stroke:e.color,strokeLinejoin:"round",strokeWidth:2,d:"M12.293 7.207A1 1 0 0 0 13 7.5h6a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-12a1 1 0 0 1 1-1h5.172a1 1 0 0 1 .707.293z"}),i.createElement("path",{stroke:e.color,strokeLinecap:"round",strokeWidth:2,d:"M12 10.5v6M15 13.5H9"}))})},98568:function(e,t,n){n.d(t,{d:function(){return l}});var r=n(30665),i=n(67294);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}let l=(0,r.D)(function(e){return i.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),i.createElement("path",{fill:e.color,d:"M11 7a1 1 0 1 1 2 0v4h4a1 1 0 1 1 0 2h-4v4a1 1 0 1 1-2 0v-4H7a1 1 0 1 1 0-2h4z"}),i.createElement("path",{fill:e.color,fillRule:"evenodd",d:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8",clipRule:"evenodd"}))})},62098:function(e,t,n){n.d(t,{U:function(){return l}});var r=n(30665),i=n(67294);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}let l=(0,r.D)(function(e){return i.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),i.createElement("path",{fill:e.color,fillRule:"evenodd",d:"m18.456 4.401-4.672-1.265A3.4 3.4 0 0 0 10.5 4H5.75A2.75 2.75 0 0 0 3 6.75v7.75c0 2.346 0 3.518.62 4.326a3 3 0 0 0 .554.554c.808.62 1.98.62 4.326.62.678 0 1.258 0 1.76-.015.409.125.879.252 1.41.396l.082.023c.795.215 1.451.392 1.997.492.567.104 1.103.142 1.646.022a3.97 3.97 0 0 0 2.065-1.192c.376-.41.61-.893.804-1.436.187-.523.36-1.18.572-1.976L20.88 8.6a3.44 3.44 0 0 0-2.425-4.2m-6.92 1.67a1.41 1.41 0 0 1 1.735-1.002l4.673 1.265a1.43 1.43 0 0 1 1.007 1.744l-2.035 7.672c-.224.847-.378 1.423-.533 1.858-.15.423-.275.626-.396.758-.275.3-.635.508-1.033.596-.175.04-.413.045-.855-.036-.454-.083-1.029-.238-1.875-.467s-1.42-.385-1.855-.543c-.423-.153-.626-.278-.758-.4-.3-.277-.51-.64-.6-1.038-.039-.176-.046-.415.033-.857.08-.455.233-1.031.457-1.878z",clipRule:"evenodd"}))})},19633:function(e,t,n){n.d(t,{_:function(){return l}});var r=n(30665),i=n(67294);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}let l=(0,r.D)(function(e){return i.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),i.createElement("path",{fill:e.color,d:"M16.988 10a1 1 0 0 0-1.707-.707L13 11.586V4c0-.542-.448-1-1-1s-1 .453-1 1v7.586L8.695 9.293a1 1 0 0 0-1.414 1.414l4 4c.187.188.454.293.719.293a.97.97 0 0 0 .695-.293l4-4a1 1 0 0 0 .293-.707"}),i.createElement("path",{fill:e.color,d:"M3.879 20.121A3 3 0 0 1 2.999 18v-5c0-.545.449-1 1-1C4.553 12 5 12.455 5 13v5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5c0-.545.448-1 1-1s1 .455 1 1v5a3 3 0 0 1-3 3H6a3 3 0 0 1-2.121-.879"}))})},11248:function(e,t,n){n.d(t,{t:function(){return l}});var r=n(30665),i=n(67294);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}let l=(0,r.D)(function(e){return i.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),i.createElement("path",{fill:e.color,fillRule:"evenodd",d:"M14.293 3.293a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1 0 1.414l-4 4a1 1 0 0 1-1.414-1.414l2.3
11-2.31-7.582-.052a3 3 0 0 0-3.021 3V20a1 1 0 1 1-2 0v-8.069a5 5 0 0 1 5.035-5l7.534.052-2.276-2.276a1 1 0 0 1 0-1.414",clipRule:"evenodd"}))})},26117:function(e,t,n){n.d(t,{w:function(){return l}});var r=n(30665),i=n(67294);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}let l=(0,r.D)(function(e){return i.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),i.createElement("path",{fill:e.color,d:"M11 7a1 1 0 1 1 2 0v5h3a1 1 0 1 1 0 2h-4a1 1 0 0 1-1-1z"}),i.createElement("path",{fill:e.color,fillRule:"evenodd",d:"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10m-2 0a8 8 0 1 1-16 0 8 8 0 0 1 16 0",clipRule:"evenodd"}))})},72276:function(e,t,n){n.d(t,{QK:function(){return o},Uw:function(){return r},bU:function(){return s},pl:function(){return l},q1:function(){return a},q4:function(){return i}});let r=n(91625),i=n(83749),o=n(40994),l=n(37760),a=n(83566),s=n(38496)},48995:function(e,t,n){n.d(t,{j:function(){return g}});var r=n(70668),i=n(75126),o=n(28724),l=n(67294),a=n(96697),s=n(40105),d=n(4065),c=n(40091),u=n(69378),m=n(8844),f=n(45007),p=n(79694);let h=e=>{let t=(0,f.I0)(),n=(0,a.C)(e=>e.library.decksMap),i=(0,a.C)(d.B5),o=(0,p.u)();return(0,l.useCallback)((l,a)=>{var d;let f=(0,m.E)(l,"delete_deck"),p=l.clonedFromLibrary&&l.clonedFromId?null===(d=n[l.clonedFromId])||void 0===d?void 0:d.category:void 0,h=t=>{if(t){var n;null===(n=r.b.showError)||void 0===n||n.call(r.b,t);return}(0,c.QA)("deck_deleted",{...(0,c.kT)(l,i,{deck_category:null!=p?p:void 0,entry_point:e,source:(0,c.OA)(String(l.id),(0,u.RG)(l.source,"manual"))})}),f&&o({deckId:l.id,deckName:l.name}),null==a||a()};t(f?(0,s.$B)({deckId:l.id,shouldTrackRecentlyDeleted:!0,onComplete:h}):(0,s.Vp)({deckId:l.id,onComplete:h}))},[t,i,n,e,o])},v=e=>{let t=(0,o.T)(e);return t&&e.collaboration.count>0?{title:i.s.t("Decks_Delete_title"),body:i.s.t("Alerts_DeleteOwnedSharedDeck_Body",{peopleCount:e.collaboration.count})}:t?e.publicDeck?{title:i.s.t("Decks_Delete_title"),body:i.s.t("Alerts_Delete_HasPublishedDeck_body")}:{title:i.s.t("Decks_Delete_title"),body:i.s.t("RecentlyDeleted_softDeleteConfirmation_body")}:{title:i.s.t("Decks_Delete_title"),body:i.s.t("Alerts_DeleteNotOwnedSharedDeck_Body")}},g=e=>{let t=h(e);return(0,l.useCallback)((e,n)=>{var o;let l=v(e);null===(o=r.b.confirmDestructive)||void 0===o||o.call(r.b,{...l,submit:{title:i.s.t("Common_Delete"),onPress:()=>{t(e,n)}}})},[t])}},79694:function(e,t,n){n.d(t,{u:function(){return f}});var r=n(70668),i=n(68796),o=n(40105),l=n(67294),a=n(45007),s=n(75126);let d=0,c="__ANKIPRO_DECK_NAME__",u=(e,t)=>{let n=e.indexOf(c);if(-1!==n)return{leading:e.slice(0,n),truncatable:t,trailing:e.slice(n+c.length)}},m=e=>{let{deckId:t,deckName:n,onUndo:r,now:i=Date.now()}=e;d+=1;let o=u(s.s.t("RecentlyDeleted_deletedToast",{name:c}),n);return{id:"recently-deleted-".concat(t,"-").concat(i,"-").concat(d),title:s.s.t("RecentlyDeleted_deletedToast",{name:n}),titleParts:o,ctaTitle:s.s.t("Common_Undo"),countdownDuration:5e3,icon:null,timeout:5e3,onCTAPress:()=>r(t)}},f=()=>{let e=(0,a.I0)();return(0,l.useCallback)(t=>{var n;let{deckId:l,deckName:a,archivedDeck:s}=t;null===(n=i.F.show)||void 0===n||n.call(i.F,m({deckId:l,deckName:a,onUndo:t=>{e((0,o.Im)({deckId:t,archivedDeck:s,onComplete:e=>{if(e){var t;null===(t=r.b.showError)||void 0===t||t.call(r.b,e)}}}))}}))},[e])}},74541:function(e,t,n){n.d(t,{n:function(){return f}});var r=n(70668),i=n(68887),o=n(75126),l=n(45455),a=n.n(l),s=n(67294),d=n(68796),c=n(16419),u=n(45007);let m=()=>{let e=(0,u.I0)();return(0,s.useCallback)((t,n,i)=>{e((0,c.WZ)({folderId:t,onComplete:e=>{var l,a;e?null===(l=r.b.showError)||void 0===l||l.call(r.b,e):(null===(a=d.F.show)||void 0===a||a.call(d.F,{id:"recently-deleted-folder-".concat(t,"-").concat(Date.now()),title:o.s.t("RecentlyDeleted_deletedToast",{name:n}),timeout:5e3}),null==i||i())}}))},[e])},f=()=>{let e=m(),{lightHierarchy:t}=(0,i.S)();return(0,s.useCallback)((n,i)=>{var l,s;let d=t.folders.find(e=>e.id===n);if(a()(null==d?void 0:d.decks)){e(n,null!==(s=null==d?void 0:d.name)&&void 0!==s?s:"",i);return}null===(l=r.b.confirmDestructive)||void 0===l||l.call(r.b,{title:o.s.t("Folders_DeleteFolderConfirmation_title"),body:o.s.t("Folders_DeleteFolderConfirmation_body"),submit:{title:o.s.t("Common_Delete"),onPress:()=>{var t;e(n,null!==(t=null==d?void 0:d.name)&&void 0!==t?t:"",i)}}})},[t.folders,e])}},12306:function(e,t,n){n.d(t,{q:function(){return m}});var r=n(70668),i=n(82929),o=n(994),l=n(50879),a=n(61383),s=n(71706),d=n(71864),c=n(67294),u=n(45007);let m=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,u.I0)(),m=(0,i.r)(),[f,p]=(0,c.useState)(!1),h=(0,c.useRef)(void 0),v=(0,c.useRef)(void 0),g=(0,c.useRef)(!1),b=(0,c.useRef)(s.R.getDateUnix()),y=(0,c.useCallback)(()=>{v.current=void 0,h.current=void 0},[]),x=(0,c.useCallback)((t,i)=>{if(!e)return;if(g.current){v.current=t,p(!0);return}if(h.current&&!d.v.isPreloadedLearningDataExpired){t(h.current,b.current),y();return}let o=s.R.getDateUnix();b.current=o,p(!0),n((0,l.y0)({deckId:e,learnStartTimestamp:o,isSilent:!1,onComplete:e=>{var n,l;let{data:s,error:d}=e;null==i||i(),p(!1),d?(a.G.getInstance().logEvent("learning_start_failed",{error:d.message}),null===(n=r.b.showError)||void 0===n||n.call(r.b,d)):null===s.errorType?t(s,o):null===(l=r.b.showSomethingWrong)||void 0===l||l.call(r.b)}}))},[e,n,y]),_=(0,c.useCallback)(t=>{e&&(b.current=s.R.getDateUnix(),n((0,l.y0)({deckId:e,learnStartTimestamp:b.current,onComplete:e=>{let{data:n}=e;g.current=!1,n&&null===n.errorType&&t(n,b.current)}})))},[e,n]);return(0,c.useEffect)(()=>{t&&e&&m&&(g.current=!0,_((e,t)=>{v.current?(v.current(e,t),y()):h.current=e,p(!1)}))},[e,m,y,t,_]),(0,o.b)(()=>{d.v.isPreloadedLearningDataExpired=!1}),{isLoadingLearningData:f,loadLearningData:x}}},87447:function(e,t,n){n.d(t,{E:function(){return c}});var r=n(96697),i=n(87242),o=n(65351),l=n(8604),a=n(67294),s=n(45007);let d={},c=e=>{let t=(0,s.I0)(),[n,c]=(0,a.useState)(d[e]),u=(0,r.C)(i.l4),m=(0,r.C)(i.qp),f=(0,l.$)();return(0,a.useEffect)(()=>{setTimeout(()=>{t((0,o.Pp)({deckId:e,onComplete:t=>{d[e]=t.data,c(t.data)}}))},500)},[e,t,u,m,f]),n}},32456:function(e,t,n){n.d(t,{y:function(){return o}});var r=n(8604),i=n(34489);let o=()=>{let e=(0,r.$)();return!i.Pl&&!e}},58850:function(e,t,n){n.d(t,{I:function(){return o}});var r=n(38645),i=n(96697);let o=()=>(0,i.C)(r.wE)},8604:function(e,t,n){n.d(t,{$:function(){return r}});let r=()=>!0},88888:function(e,t,n){n.d(t,{PX:function(){return l},aq:function(){return s}
1,rW:function(){return a}});var r=n(89319),i=n(84336),o=n.n(i);let l=e=>e===r.D.createdAiYoutube,a=e=>"https://www.youtube.com/watch?v=".concat(e),s=e=>{let{isPremium:t,remainingFreeGenerations:n}=e;return t||o()(n)||n>0}},69776:function(e,t,n){n.d(t,{c:function(){return i}});var r=n(74635);let i=e=>{switch(e.algorithmType){case r.B.spacedRepetition:return e.notStudiedCount+e.toReviewCount;case r.B.speedLearning:{let t=e.notStudiedCount+e.notQuiteCount;if(t>0)return t;return e.gotItCount}}return 0}},79411:function(e,t,n){n.d(t,{h:function(){return i}});var r=n(74635);let i=e=>{if(e.algorithmType===r.B.spacedRepetition){var t,n;return{algorithmType:e.algorithmType,notStudiedCount:e.newCardsCount,learningCardsCount:null!==(t=e.learningTotalCardsCount)&&void 0!==t?t:0,graduatedCardsCount:null!==(n=e.graduatedTotalCardsCount)&&void 0!==n?n:0,toReviewCount:e.learningCardsCount+e.graduatedCardsCount}}return{algorithmType:e.algorithmType,notStudiedCount:e.newCardsCount,notQuiteCount:e.studyAgainCardsCount,gotItCount:e.gotItCardsCount}}},67006:function(e,t,n){n.d(t,{e:function(){return i}});var r=n(74635);let i=e=>{var t,n;let i=Math.max(0,e.totalCardsCount-e.frozenCardsCount),o=Math.min(i,Math.max(0,e.algorithmType===r.B.speedLearning?e.gotItCardsCount:null!==(t=e.graduatedTotalCardsCount)&&void 0!==t?t:0)),l=Math.min(i-o,Math.max(0,e.algorithmType===r.B.speedLearning?e.studyAgainCardsCount:null!==(n=e.learningTotalCardsCount)&&void 0!==n?n:0));return{total:i,learned:o,learning:l,learnedFraction:i?o/i:0,learningFraction:i?l/i:0}}},84046:function(e,t,n){n.d(t,{Q:function(){return i}});var r=n(10070);let i=e=>{if("resolveAssetSource"in r.Z)return r.Z.resolveAssetSource(e)}},21944:function(e,t,n){n.d(t,{c:function(){return o}});var r=n(36393),i=n(34489);let o=(e,t)=>{if(e(),t){if(i.Pl){t();return}setTimeout(t,r.zn)}}},54274:function(e,t,n){n.r(t);var r=n(76586);t.default=new r.Z({uri:n.p+"static/media/CheckboxEmpty.e59e64b4.png","uri@2x":n.p+"static/media/CheckboxEmpty.51c58375.png",width:27,height:27})},43272:function(e,t,n){n.r(t);var r=n(76586);t.default=new r.Z({uri:n.p+"static/media/CheckboxFilled.ef4661ea.png","uri@2x":n.p+"static/media/CheckboxFilled.2a15eeb3.png",width:27,height:27})},79016:function(e,t,n){n.r(t);var r=n(76586);t.default=new r.Z({uri:n.p+"static/media/anki_logo.b81a2dfa.png","uri@2x":n.p+"static/media/anki_logo.ce681f7e.png",width:25,height:24})},44933:function(e,t,n){n.r(t);var r=n(76586);t.default=new r.Z({uri:n.p+"static/media/csv.ce255f28.png","uri@2x":n.p+"static/media/csv.a5e185f3.png",width:24,height:25})},59600:function(e,t,n){n.r(t);var r=n(76586);t.default=new r.Z({uri:n.p+"static/media/pdf.88694cc3.png","uri@2x":n.p+"static/media/pdf.8426aa75.png",width:25,height:24})},54548:function(e,t,n){n.r(t);var r=n(76586);t.default=new r.Z({uri:n.p+"static/media/quizlet_logo.972fd6d4.png","uri@2x":n.p+"static/media/quizlet_logo.088e0080.png",width:24,height:25})},37760:function(e,t,n){n.r(t);var r=n(76586);t.default=new r.Z({uri:n.p+"static/media/AddSubdeck_24.001a830c.png","uri@2x":n.p+"static/media/AddSubdeck_24.4989eb58.png",width:24,height:24})},83566:function(e,t,n){n.r(t);var r=n(76586);t.default=new r.Z({uri:n.p+"static/media/Archive_24.e41ddb14.png","uri@2x":n.p+"static/media/Archive_24.a733feef.png",width:24,height:24})},91625:function(e,t,n){n.r(t);var r=n(76586);t.default=new r.Z({uri:n.p+"static/media/Delete_24.18bdced7.png","uri@2x":n.p+"static/media/Delete_24.e6764432.png",width:24,height:24})},83749:function(e,t,n){n.r(t);var r=n(76586);t.default=new r.Z({uri:n.p+"static/media/Move_24.1207d2a5.png","uri@2x":n.p+"static/media/Move_24.4a206f3b.png",width:24,height:24})},40994:function(e,t,n){n.r(t);var r=n(76586);t.default=new r.Z({uri:n.p+"static/media/Retry_24.ae669d58.png","uri@2x":n.p+"static/media/Retry_24.d42c810d.png",width:24,height:24})},38496:function(e,t,n){n.r(t);var r=n(76586);t.default=new r.Z({uri:n.p+"static/media/Settings_24.9d888858.png","uri@2x":n.p+"static/media/Settings_24.02b6893c.png",width:24,height:24})}}]);
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.