1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[908],{4948:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/notebook",function(){return n(7460)}])},4181:function(e,t,n){"use strict";n.d(t,{Kk:function(){return a},u7:function(){return i}});var r=n(9828),s=n(67);let i=async e=>await (0,r.pl)((0,r.JU)(s.db,"notes",e.id),e),a=async e=>{console.log("getNotes",e);let t=(0,r.IO)((0,r.hJ)(s.db,"notes"),(0,r.ar)("userId","==",e)),n=await (0,r.PL)(t),i=[];return n.forEach(e=>{let t=e.data();i.push(t)}),i}},67:function(e,t,n){"use strict";n.d(t,{db:function(){return u}});var r=n(770),s=n(1259),i=n(9828),a=n(3454);let o={apiKey:"AIzaSyAZaVZC_YCiif8rQOhI_kbZFXSUOvyc_mU",authDomain:"video-notes-stripe.firebaseapp.com",projectId:"video-notes-stripe",storageBucket:"video-notes-stripe.appspot.com",messagingSenderId:"208090300200",appId:"1:208090300200:web:8b2dd3f5e4bd8d5a785a1d",measurementId:a.env.NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID},l=r.Z.initializeApp(o);(0,s.v0)(l);let u=(0,i.ad)(l)},7460:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return N},default:function(){return I}});var r=n(5893),s=n(7294),i=n(5152),a=n.n(i),o=n(4181),l=n(9532);let u=(0,s.createContext)({notebookData:[],currentNoteData:null,setCurrentNoteData:()=>({})}),d=e=>{let{children:t}=e,[n,i]=(0,s.useState)([]),[a,d]=(0,s.useState)(null),{user:c}=(0,l.aF)();return(0,s.useEffect)(()=>{console.log("User",c),c&&(0,o.Kk)(c).then(e=>{console.log(e),i(e)})},[c]),(0,r.jsx)(u.Provider,{value:{notebookData:n,currentNoteData:a,setCurrentNoteData:d},children:t})},c=()=>(0,s.useContext)(u),f=a()(()=>Promise.all([n.e(897),n.e(284),n.e(246)]).then(n.bind(n,4246)),{loadableGenerated:{webpack:()=>[4246]},ssr:!1}),h=()=>{let e=(0,s.useRef)(),{currentNoteData:t}=c(),[n,i]=(0,s.useState)();return(0,s.useEffect)(()=>{t&&(console.log(e.current),i(t.content))},[t]),(0,s.useEffect)(()=>{var t;n&&(console.log(n),null===(t=e.current)||void 0===t||t.render(n))},[n]),(0,r.jsx)("div",{children:(0,r.jsx)(f,{data:n,onChange:i,editorRef:e})})};var p=n(9361),g=n(3214),m=n(820),v=n(532),w=n(7521);let x=e=>{let{notebookData:t,setCurrentNoteData:n}=c(),{handleClose:s}=e,i=t.map((e,t)=>({key:e.id||t,label:e.title||"Untitled"}));return(0,r.jsx)(w.Z,{mode:"inline",defaultSelectedKeys:["1"],style:{height:"100%",borderRight:0},onClick:e=>{n(t.find(t=>t.id===e.key)||t[0]),s()},items:i})},y=e=>{let{children:t}=e,[n,i]=(0,s.useState)(!0),{token:a}=p.Z.useToken(),o=s.useRef(null),l=()=>{i(!0)},u=()=>{i(!1)};return(0,r.jsxs)("div",{ref:o,style:{position:"relative",height:"100%",overflow:"hidden",display:"flex",flexDirection:"row"},className:"my-div",children:[(0,r.jsx)(g.ZP,{type:"primary",onClick:l,icon:(0,r.jsx)(v.Z,{})}),(0,r.jsx)(m.Z,{title:"File Explorer",placement:"left",onClose:u,closable:!1,open:n,getContainer:!1,width:250,children:(0,r.jsx)(x,{handleClose:u})}),(0,r.jsx)("div",{style:{height:"100%",overflow:"auto",margin:"10px",width:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:t})]})};var _=n(67),b=n(2914),E=n(9828);let j=e=>{let{isAuthorized:t,username:n}=e,[r,i]=(0,s.useState)(null),{setUser:a}=(0,l.aF)();if(!t)return;let o=async()=>{try{let e=(0,E.JU)(_.db,"users",n),t=await (0,E.QT)(e);return t.exists()?console.log("Document data:",t.data()):await (0,E.pl)(e,{uid:n,email:n,displayName:"",photoURL:"",emailVerified:""}),{username:n,status:"success",message:"User info saved successfully"}}catch(e){if(e instanceof Error)throw b.ZP.error(e.message),e;throw b.ZP.error("Something went wrong please try again later"),Error("Something went wrong please try again later")}};return t&&!r&&(i(n),a(n),o()),{currentUser:r}};var k=n(1664),C=n.n(k);let S=e=>{let{isAuthorized:t,username:n}=e;return(j({isAuthorized:t,username:n}),t)?(0,r.jsx)(d,{children:(0,r.jsx)(y,{children:(0,r.jsx)(h,{})})}):(0,r.jsxs)("div",{children:["Not Authorized Please ",(0,r.jsx)(C(),{href:"/login",children:"login again"})]})};var N=!0,I=S}},function(e){e.O(0,[16,551,273,242,774,888,179],function(){return e(e.s=4948)}),_N_E=e.O()}]);
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.