1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DEwa2gPJ.js","assets/core-Bjnh3KEM.js"])))=>i.map(i=>d[i]); 2import{c as A,p as $,s as V,w as q,r as o,bK as J,j as X,aj as z,ac as Q,M as Z,l as ee,b as E,bI as oe}from"./index-B-XoyWcT.js";import{i as te,e as ne}from"./page-doc-B0JnG26H.js";/** 3 * @license lucide-react v0.475.0 - ISC 4 * 5 * This source code is licensed under the ISC license. 6 * See the LICENSE file in the root directory of this source tree. 7 */const ae=[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M3 15h6",key:"4e2qda"}],["path",{d:"M6 12v6",key:"1u72j0"}]],me=A("FilePlus2",ae);/** 8 * @license lucide-react v0.475.0 - ISC 9 * 10 * This source code is licensed under the ISC license. 11 * See the LICENSE file in the root directory of this source tree. 12 */const se=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],ve=A("Sparkles",se),L="omanote:last-seen-version";function ie(e,n){if(!e.length)return[];if(!n)return e;const s=e.findIndex(i=>i.version===n);return s===-1?e:e.slice(0,s)}function le(){return $(L,V)??null}function O(e){q(L,V,e)}const re=320,R=o.createContext(null),ue=300*1e3,de="https://omanote.com";function ye({children:e}){var g;const[n,s]=o.useState(J),i=o.useRef(((g=n[0])==null?void 0:g.version)??null),[l,r]=o.useState(()=>le()),[a,y]=o.useState(!1),[h,c]=o.useState(!1),[D,b]=o.useState(!1),[P,f]=o.useState([]),u=o.useRef(null),t=n[0]??null,d=o.useMemo(()=>ie(n,l),[n,l]),W=!!t&&t.version===i.current,m=d.length>0,H=Math.max(d.length-1,0),U=!!t&&!D&&(m||h)&&(!a||h),p=()=>{u.current!==null&&(window.clearTimeout(u.current),u.current=null)},B=()=>{if(typeof window>"u")return!0;try{return window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!1}};o.useEffect(()=>{const w=Q(),k=w?de:"",_=async()=>{try{const S=w?(await z(async()=>{const{fetch:K}=await import("./index-DEwa2gPJ.js");return{fetch:K}},__vite__mapDeps([0,1]))).fetch:fetch,N=await S(`${k}/version-latest.json`,{cache:"no-store"});if(!N.ok)return;const I=await N.json();if(!I.version||!i.current||I.version===i.current)return;const M=await S(`${k}/version.json`,{cache:"no-store"});if(!M.ok)return;const v=await M.json();v.version&&v.version!==i.current&&(s(v.versions??[]),b(!1))}catch{}},G=window.setInterval(_,ue),T=()=>{document.visibilityState==="visible"&&_()};return document.addEventListener("visibilitychange",T),()=>{window.clearInterval(G),document.removeEventListener("visibilitychange",T)}},[]),o.useEffect(()=>{!m||!t||typeof Notification>"u"||Notification.permission!=="granted"||new Notification(`New update: ${t.version}`,{body:t.summary||"Check out what's new in omanote!",icon:"/android-chrome-192x192.png"})},[]),o.useEffect(()=>()=>{p()},[]);const C=()=>{if(t){if(p(),f(d.length>0?d:[t]),y(!0),c(!0),O(t.version),r(t.version),B()){c(!1);return}u.current=window.setTimeout(()=>{c(!1),u.current=null},re)}},Y=()=>{p(),y(!1),c(!1),f([])},F=()=>{p(),b(!0),t&&(O(t.version),r(t.version))};return X.jsx(R.Provider,{value:{latestVersion:t,unseenVersions:d,modalVersions:P,extraUpdatesCount:H,hasUpdate:m,isRunningLatest:W,isBannerVisible:U,isModalOpen:a,isTransitioningToModal:h,openModal:C,closeModal:Y,dismissBanner:F},children:e})}function be(){const e=o.useContext(R);if(!e)throw new Error("useUpdate must be used inside UpdateProvider");return e}const j=[{id:"pmf",kind:"single",section:"The honest bit",prompt:"How would you feel if omanote disappeared tomorrow?",options:[{value:"very_disappointed",label:"Very disappointed"},{value:"somewhat_disappointed",label:"Somewhat disappointed"},{value:"not_disappointed",label:"Not disappointed"}]},{id:"blocker",kind:"text",section:"The honest bit",prompt:"What stops you from using omanote every day?",hint:"Optional, but this one is the most useful answer you can give.",placeholder:"Nothing, or⦠it's missing something I need, it's slow on my phoneâ¦"},{id:"frequency",kind:"single",section:"The basics",prompt:"How often do you use omanote?",options:[{value:"daily",label:"Daily"},{value:"few_times_week",label:"A few times a week"},{value:"rarely",label:"Rarely"},{value:"not_at_all",label:"Not at all"}]},{id:"enjoyment",kind:"likert",section:"The basics",prompt:"How are you enjoying omanote?",scaleLabels:{low:"Not much",high:"Love it"}},{id:"devices",kind:"multi",section:"The basics",prompt:"Where do you use omanote?",hint:"Pick all that apply.",options:[{value:"web",label:"In a web browser"},{value:"desktop",label:"Desktop app (Mac / Windows / Linux)"},{value:"android",label:"Android app"},{value:"phone_browser",label:"On my phone's browser"}]},{id:"use_cases",kind:"multi",section:"How you use it",prompt:"What do you use omanote for?",hint:"Pick all that apply.",options:[{value:"dumping_thoughts",label:"Dumping thoughts"},{value:"tasks",label:"Adding tasks / todos"},{value:"links",label:"Saving links"},{value:"planning",label:"Planning my day"},{value:"journaling",label:"Journaling"},{value:"reading",label:"Reading feeds and articles"}],allowOther:!0},{id:"favourite_feature",kind:"multi",section:"How you use it",prompt:"What's your favourite feature?",hint:"Pick as many as you like.",options:[{value:"canvas",label:"The canvas â everything in one place"},{value:"hashtags",label:"Hashtags linking things together"},{value:"quick_capture",label:"Quick capture / composer"},{value:"todos_reminders",label:"Todos and reminders"},{value:"bookmarks_extension",label:"Bookmarks and the browser extension"},{value:"rss_reader",label:"The RSS reader"},{value:"encryption",label:"End-to-end encryption / privacy"}],allowOther:!0},{id:"note_apps",kind:"multi",section:"What else you use",prompt:"What note-taking apps do you use?",hint:"Honest answers help â omanote doesn't have to be the only one.",options:[{value:"notion",label:"Notion"},{value:"obsidian",label:"Obsidian"},{value:"apple_notes",label:"Apple Notes"},{value:"google_keep",label:"Google Keep"},{value:"none",label:"Only omanote"}],allowOther:!0},{id:"todo_apps",kind:"multi",section:"What else you use",prompt:"What todo or task apps do you use?",options:[{value:"todoist",label:"Todoist"},{value:"apple_reminders",label:"Apple Reminders"},{value:"ms_todo",label:"Microsoft To Do"},{value:"google_tasks",label:"Google Tasks"},{value:"none",label:"Only omanote"}],allowOther:!0}
12,{id:"rss_reader",kind:"single",section:"What else you use",prompt:"Do you use an RSS reader?",options:[{value:"yes",label:"Yes"},{value:"no",label:"No"},{value:"unknown",label:"I don't know what that is"}]},{id:"google_calendar",kind:"single",section:"Features you've found",prompt:"Have you synced Google Calendar with omanote?",options:[{value:"yes",label:"Yes"},{value:"no",label:"No"},{value:"unknown",label:"I don't know how to do that"}]},{id:"extension",kind:"single",section:"Features you've found",prompt:"Have you installed the omanote browser extension?",options:[{value:"yes",label:"Yes"},{value:"no",label:"No"},{value:"unknown",label:"I didn't know it existed"}]},{id:"discovery",kind:"single",section:"A bit more",prompt:"How did you hear about omanote?",options:[{value:"founder",label:"Founder himself"},{value:"friend",label:"A friend"},{value:"socials",label:"Found through socials"},{value:"search",label:"Search engine"}],allowOther:!0},{id:"improvement",kind:"text",section:"A bit more",prompt:"What would you improve in omanote?",placeholder:"Anything at all â big rewrites and tiny nitpicks both welcome."},{id:"willingness_to_pay",kind:"single",section:"Wrapping up",prompt:"Would you pay for omanote if there were a paid plan?",hint:"There's no paid plan today. This is just to understand what's worth building.",options:[{value:"yes",label:"Yes"},{value:"depends",label:"Maybe â depends on what's included"},{value:"no",label:"No, I'd only use it while it's free"}]},{id:"recommend",kind:"single",section:"Wrapping up",prompt:"Would you recommend omanote to others?",options:[{value:"yes",label:"Yes"},{value:"no",label:"No"},{value:"already",label:"Already have"}]},{id:"interview",kind:"single",section:"Wrapping up",prompt:"Open to a short chat about how you use omanote?",hint:"If yes, I'll reach out at your account email. No sales pitch, just questions.",options:[{value:"yes",label:"Yes, happy to chat"},{value:"no",label:"No thanks"}]}];j.length;var x;const fe=((x=j.find(e=>e.id==="use_cases"))==null?void 0:x.options)??[],ge=1e3,we=80;function ke(){const{state:e,dispatch:n}=Z(),s=ee();return o.useCallback(()=>{const i=e.pages.find(a=>!a.deletedAt&&!a.icon&&te(a.docJson,a.title));if(i){const a=i.id;typeof document<"u"&&"startViewTransition"in document?document.startViewTransition(()=>E.flushSync(()=>s(`/p/${a}`))):s(`/p/${a}`);return}const l=oe("page"),r=()=>{n({type:"page/create",clientKey:l,dateKey:e.ui.selectedDateKey,docJson:ne(),preview:""}),s(`/p/${l}`)};typeof document<"u"&&"startViewTransition"in document?document.startViewTransition(()=>E.flushSync(r)):r()},[n,s,e.pages,e.ui.selectedDateKey])}export{me as F,fe as O,ve as S,ye as U,be as a,ge as b,we as c,j as d,ke as u};
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.