PageSourceSearch

https://xroid.ai/_next/static/chunks/6995.70d48a0029f0d83a.js

js xroid.ai collected 2026-10-05 14:50:36 UTC 22,952 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6995],{417251:(e,t,r)=>{r.d(t,{N:()=>o});var n=r(920985);let l=[{name:"Marketing",templates:{Storyboard:()=>r.e(4861).then(r.bind(r,404861)).then(e=>e.default),"4P Marketing Matrix":()=>r.e(61003).then(r.bind(r,661003)).then(e=>e.default),"User Journey Map":()=>r.e(22840).then(r.bind(r,222840)).then(e=>e.default)}},{name:"Project management",templates:{Gantt:()=>r.e(91017).then(r.bind(r,691017)).then(e=>e.default),Kanban:()=>r.e(88089).then(r.bind(r,288089)).then(e=>e.default),"Monthly Calendar":()=>r.e(48540).then(r.bind(r,148540)).then(e=>e.default),Fishbone:()=>r.e(99262).then(r.bind(r,899262)).then(e=>e.default),"Project Planning":()=>r.e(61207).then(r.bind(r,861207)).then(e=>e.default)}},{name:"Brainstorming",templates:{SWOT:()=>r.e(97775).then(r.bind(r,97775)).then(e=>e.default),"5W2H":()=>r.e(71316).then(r.bind(r,871316)).then(e=>e.default),"Flow Chart":()=>r.e(1327).then(r.bind(r,301327)).then(e=>e.default),"Concept Map":()=>r.e(397).then(r.bind(r,100397)).then(e=>e.default),"SMART Principles":()=>r.e(73639).then(r.bind(r,173639)).then(e=>e.default)}},{name:"Presentation",templates:{"Data Analysis":()=>r.e(49175).then(r.bind(r,149175)).then(e=>e.default),"Simple Presentation":()=>r.e(97583).then(r.bind(r,997583)).then(e=>e.default),"Business Proposal":()=>r.e(13193).then(r.bind(r,513193)).then(e=>e.default)}},{name:"Paws and pals",templates:()=>r.e(19166).then(r.bind(r,719166)).then(e=>e.default)}],a=[],i=e=>e.reduce((e,t)=>t?e.concat(t):e,[]),o={list:async e=>{let t=i(await Promise.all(a.map(t=>t.list(e)))),r=l.find(t=>t.name===e);return r?(r.templates instanceof Function?await r.templates():await Promise.all((0,n.HP)(r.templates).map(e=>r.templates[e]()))).concat(t):t},categories:async()=>{let e=i(await Promise.all(a.map(e=>e.categories())));return l.map(e=>e.name).concat(e)},search:async(e,t)=>{let r=i(await Promise.all(a.map(r=>r.search(e,t))));return e=e.trim().toLocaleLowerCase(),await Promise.all(l.map(async l=>{if((!t||t===l.name)&&!(l.templates instanceof Function))return Promise.all((0,n.HP)(l.templates).map(async t=>{if(function(e,t){let r=Array.from({length:e.length+1},()=>Array.from({length:t.length+1},()=>0));for(let n=1;n<=e.length;n++)for(let l=1;l<=t.length;l++)e[n-1]===t[l-1]?r[n][l]=r[n-1][l-1]+1:r[n][l]=Math.max(r[n-1][l],r[n][l-1]);return r[e.length][t.length]}(e,t.toLocaleLowerCase())===e.length){let e=await l.templates[t]();r.push(e)}}))})),r},extend(e){a.includes(e)||a.push(e)}}},437217:(e,t,r)=>{r.r(t),r.d(t,{default:()=>k,polyfillRequestIdleCallback:()=>v});var n=r(695155),l=r(212115),a=r(307352),i=r(666136),o=r(576546),c=r(279575),s=r(202366);r(517686);var u=r(7266),d=r(456461),f=r(58614),p=r(318813),h=r(83391),y=r(658807),g=r(809539),m=r(16419),w=r(186514),x=r(947556),b=r(521543);function v(){"requestIdleCallback"in window||(window.requestIdleCallback=e=>setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>50})},1)),"cancelIdleCallback"in window||(window.cancelIdleCallback=e=>clearTimeout(e))}customElements.get("affine-editor-container")||((0,w.z)(),(0,x.z)()),v();let k=e=>{let{docRef:t,data:r,frameDescriptionsRef:w,imageUrlsRef:x,attachmentUrlsRef:v,mode:k="edgeless",onModeChange:j,handleSaveNote:E,loadingSave:C,theme:N="light",onThemeChange:S}=e,T=(0,l.useRef)(null),A=(0,l.useRef)(null),R=(0,l.useRef)(null),I=(0,l.useRef)(null),M=(0,l.useRef)(null),B=(0,l.useRef)(!0),O
1=(0,u.useTranslations)("common"),P=(0,h.wA)(),L=(0,h.d4)(y.af),z=(0,h.d4)(y.aQ),F=(0,h.d4)(y.$w),D=(0,l.useRef)({}),[U,W]=(0,l.useState)(!1),Y=(0,l.useRef)({}),q=(0,l.useRef)({}),H=(0,l.useRef)({}),[J,$]=(0,l.useState)(k),[Q,_]=(0,l.useState)(()=>{{if(N)return document.documentElement.dataset.theme=N,N;let e="dark"===localStorage.getItem("blocksuite-editor-theme")?"dark":"light";return document.documentElement.dataset.theme=e,e}});(0,l.useEffect)(()=>{N&&(_(N),document.documentElement.dataset.theme=N)},[N]);let G=(0,l.useRef)(J);(0,l.useEffect)(()=>{$(k),G.current=k,R.current&&(R.current.mode=k)},[k]);let K=(0,l.useCallback)(()=>{let e="edgeless"===J?"page":"edgeless";$(e),G.current=e,R.current&&(R.current.mode=e),null==j||j(e)},[J,j]),V=(0,l.useCallback)(()=>{_(e=>{let t="dark"===e?"light":"dark";return localStorage.setItem("blocksuite-editor-theme",t),document.documentElement.dataset.theme=t,null==S||S(t),t})},[S]);(0,l.useEffect)(()=>{G.current=J},[J]),(0,l.useEffect)(()=>{D.current={},(null==w?void 0:w.current)?Y.current={...w.current}:Y.current={},(null==x?void 0:x.current)?q.current={...x.current}:q.current={},(null==v?void 0:v.current)?H.current={...v.current}:H.current={}},[r,x,v]);let X=()=>{let e=new a.S;e.register(c.g);let t=new i.r({id:"notes-collection",schema:e});return t.meta.initialize(),A.current=t,t},Z=(0,l.useCallback)(()=>{let e=t.current,r=A.current;if(!e||!r)return;let n=new Set,l=async t=>{var l;if(n.has(t))return;let a=e.getBlockById(t);if(!a||"affine:image"!==a.flavour&&"affine:attachment"!==a.flavour)return;let i=!1,o=!1,c=async()=>{if(i||o)return;let l="affine:attachment"===a.flavour,c=a.sourceId;if(c){i=!0,n.add(t);try{let t=await r.blobSync.get(c);if(!t)return;let n=l?a.name||"attachment-".concat(Date.now()):"image-".concat(Date.now()),i=new File([t],n,{type:t.type}),u=await (0,b.IL)(i,"notes",!0);l?(H.current[c]=u,v&&(v.current[c]=u)):(q.current[c]=u,x&&(x.current[c]=u));try{e.updateBlock(a,{cloudflareUrl:u})}catch(e){console.warn("Could not update block with cloudflareUrl:",e)}o=!0,s&&s.dispose()}catch(e){console.error("Error uploading file:",e),i=!1}}},s=null===(l=a.propsUpdated)||void 0===l?void 0:l.on(()=>{o||c()});await c()},a=e.slots.yBlockUpdated.on(e=>{let{type:t,id:r}=e;"add"===t&&l(r)});return()=>{null==a||a.dispose()}},[]),ee=async()=>{let e=t.current;if(e)try{if(await e.load(),t.current!==e)return;let r=e.addBlock("affine:page",{title:new o.E("My Notes")});I.current=r;let n=e.addBlock("affine:surface",{},r);M.current=n;let l=e.addBlock("affine:note",{xywh:"[0,0,498,92]",background:"--affine-note-background-white",edgeless:{style:{borderRadius:8,borderSize:4,borderStyle:"none",shadowType:"--affine-note-shadow-box"}}},r);e.addBlock("affine:paragraph",{text:new o.E("New Card")},l),Z();let a=new s.m;a.doc=e,a.mode=G.current,R.current=a,T.current&&(T.current.innerHTML="",T.current.appendChild(a)),setTimeout(()=>en(),100)}catch(e){console.error("Error initializing editor:",e)}},et=async(e,r)=>{W(!0);let n=t.current;if(n)try{if(await n.load(),t.current!==n)return;let l=Object.values(e).find(e=>"affine:page"===e["sys:flavour"]);if(!l){await ee();return}let a={title:l["prop:title"]?new o.E(l["prop:title"]):new o.E},i=n.addBlock("affine:page",a);if(I.current=i,l["sys:children"]&&Array.isArray(l["sys:children"])&&l["sys:children"].length>0)for(let t of l["sys:children"])await er(e,n,t,i,r);Z();let c=new s.m;c.doc=n,c.mode=G.current,R.current=c,T.current&&(T.current.innerHTML="",T.current.appendChild(c)),setTimeout(()=>en(),700)}catch(e){console.error("Error loading editor:",e),await ee()}finally{W(!1)}},er=async(e,t,r,n,l)=>{let a;if(!t||!e||!r)return;let c=e[r];if(!c)return;let{"sys:flavour":s,"sys:children":u,"sys:id":d,...f}=c,p={};if("affine:paragraph"===s)f["prop:text"]&&(p.text=new o.E(f["prop:text"])),f["prop:type"]&&(p.type=f["prop:type"]);else if("affine:image"===s){let e=f["prop:sourceId"],t=null;if(e&&(null==x?void 0:x.current)&&x.current[e]?t=x.current[e]:e&&q.current[e]&&(t=q.current[e]),t&&"string"==typeof t&&""!==t.trim())try{let e=await fetch(t);if(!e.ok)throw Error("Failed to fetch image: ".concat(e.status));let r=await e.blob(),n=await (null==l?void 0:l.blobSync.set(r));p.sourceId=n,n&&(q.current[n]=t),x&&n&&(x.current[n]=t)}catch(e){console.error("Error loading image:",e)}f["prop:xywh"]&&(p.xywh=f["prop:xywh"]),f["prop:width"]&&(p.width=f["prop:width"]),f["prop:height"]&&(p.height=f["prop:height"]),void 0!==f["prop:rotate"]&&(p.rotate=f["prop:rotate"]),f["prop:size"]&&(p.size=f["prop:size"]),f["prop:caption"]&&(p.caption=f["prop:caption"]),f["prop:index"]&&(p.index=f["prop:index"])}else if("affine:list"===s)p.type=f["prop:type"]||"bulleted",p.text=new o.E(f["prop:text"]),p.checked=f["prop:checked"]||!1,p.collapsed=f["prop:collapsed"]||!1;else if("affine:surface"===s);else if("affine:frame"===s)f["prop:title"]&&(p.title=new o.E(f["prop:title"])),f["prop:background"]&&(p.background=f["prop:background"]),f["prop:xywh"]&&(p.xywh=f["prop:xywh"]),f["prop:index"]&&(p.index=f["prop:index"]);
1else if("affine:attachment"===s){Object.keys(f).forEach(e=>{e.startsWith("prop:")&&(p[e.replace("prop:","")]=f[e])});let e=f["prop:sourceId"],t=f["prop:cloudflareUrl"],r=null;if(d&&(null==v?void 0:v.current)&&v.current[d]?r=v.current[d]:d&&H.current[d]&&(r=H.current[d]),!r&&e&&(null==v?void 0:v.current)&&v.current[e]?r=v.current[e]:!r&&e&&H.current[e]&&(r=H.current[e]),!r&&t&&"string"==typeof t&&t.startsWith("http")&&(r=t),r&&"string"==typeof r&&""!==r.trim())try{let t=await fetch(r);if(!t.ok)throw Error("Failed to fetch attachment: ".concat(t.status));let n=await t.blob(),a=await (null==l?void 0:l.blobSync.set(n));p.sourceId=a,p.cloudflareUrl=r,d&&(H.current[d]=r,v&&(v.current[d]=r)),e&&(H.current[e]=r),a&&(H.current[a]=r),v&&(e&&(v.current[e]=r),a&&(v.current[a]=r))}catch(e){}}else Object.keys(f).forEach(e=>{e.startsWith("prop:")&&(p[e.replace("prop:","")]=f[e])});try{a=await t.addBlock(s,p,n),d&&d!==a&&"affine:surface"!==s&&(D.current[d]=a),"affine:frame"===s&&d!==a&&(null==w?void 0:w.current)&&w.current[d]&&(w.current[a]=w.current[d],Y.current[a]=w.current[d],delete w.current[d],delete Y.current[d])}catch(e){console.error("Failed to add block with flavour ".concat(s,":"),e);return}if("affine:surface"===s&&(M.current=a,f["prop:elements"])){let e=f["prop:elements"],r="$blocksuite:internal:native$"===e.type?e.value:e;setTimeout(()=>{var e,n;if(!B.current||!A.current||!t||!t.root)return;let l=t.getBlockById(a);if(!l||"function"!=typeof l.addElement||!l.yBlock||!l.elements)return;let c=0,s=0,u=Object.entries(r),d=u.filter(e=>{let[,t]=e;return(null==t?void 0:t.type)!=="connector"&&(null==t?void 0:t.type)!=="mindmap"&&(null==t?void 0:t.type)!=="group"}),f=u.filter(e=>{let[,t]=e;return(null==t?void 0:t.type)==="group"}),p=u.filter(e=>{let[,t]=e;return(null==t?void 0:t.type)==="connector"}),h=u.filter(e=>{let[,t]=e;return(null==t?void 0:t.type)==="mindmap"}),y=null===(n=l.elements)||void 0===n?void 0:null===(e=n.getValue)||void 0===e?void 0:e.call(n);if(!y)return;let g=e=>{if("string"!=typeof e)return e;let t=e.trim();if(!t||!(t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]")))return e;try{return JSON.parse(t)}catch(t){return e}},m=e=>{if(!e||e instanceof i.r.Y.Text)return e;if(e instanceof o.E)return e.yText;if(Array.isArray(e)){let t=new i.r.Y.Text;return t.applyDelta(e),t}return"string"==typeof e?new i.r.Y.Text(e):e},w=e=>e&&D.current[e]||e,x=e=>{let[t,r]=e;if(B.current)try{var n,a,o;if(!r||"object"!=typeof r||!r.type)return;let e={...r};if(e.id||(e.id=t),e.source&&(e.source=g(e.source)),e.target&&(e.target=g(e.target)),(null===(n=e.source)||void 0===n?void 0:n.id)&&(e.source.id=w(e.source.id)),(null===(a=e.target)||void 0===a?void 0:a.id)&&(e.target.id=w(e.target.id)),e.text&&(e.text=g(e.text)),"string"==typeof e.points)try{e.points=JSON.parse(e.points)}catch(e){}if("brush"===e.type&&e.xywh&&Array.isArray(e.points))try{let[t,r]="string"==typeof e.xywh?JSON.parse(e.xywh):e.xywh;e.points=e.points.map(e=>[e[0]+t,e[1]+r])}catch(e){}if("group"===e.type){if(e.children&&!(e.children instanceof i.r.Y.Map)){let t=new i.r.Y.Map;Object.keys(e.children).forEach(e=>{var r;let n=null!==(r=w(e))&&void 0!==r?r:e;t.set(n,!0)}),e.children=t}void 0===e.title||e.title instanceof i.r.Y.Text||(e.title=new i.r.Y.Text(String(null!==(o=e.title)&&void 0!==o?o:"")))}if("mindmap"===e.type&&e.children)try{let t=new i.r.Y.Map;Object.entries(e.children).forEach(e=>{var r;let[n,l]=e,a=null!==(r=w(n))&&void 0!==r?r:n,i=l.parent?w(l.parent):void 0;t.set(a,{index:l.index,...i?{parent:i}:{}})}),e.children=t}catch(e){}if(B.current&&l&&y)try{if(y.has(t))return;let r=new i.r.Y.Map;r.set("type",e.type),r.set("id",t),Object.entries(e).forEach(t=>{let[n,l]=t;if(void 0!==l){if(("text"===e.type||"shape"===e.type)&&"text"===n){r.set("text",m(l));return}r.set(n,l)}}),y.set(t,r),c++}catch(e){s++}}catch(e){s++}},b=e=>{var r,n;let l=w(null==e?void 0:null===(r=e.source)||void 0===r?void 0:r.id),a=w(null==e?void 0:null===(n=e.target)||void 0===n?void 0:n.id),i=!l||y.has(l)||t.getBlockById(l),o=!a||y.has(a)||t.getBlockById(a);return i&&o},v=e=>Object.keys(e.children||{}).every(e=>{let r=w(e);return!r||y.has(r)||t.getBlockById(r)}),k=e=>Object.keys(e.children||{}).every(e=>{let r=w(e);return!r||y.has(r)||t.getBlockById(r)});t.transact(()=>{d.forEach(x)});let j=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!B.current||!y)return;let n=[];t.transact(()=>
1{e.forEach(e=>{let[t,r]=e;if(!y.has(t)){if(!b(r)){n.push([t,r]);return}x([t,r])}})}),n.length>0&&r<5&&setTimeout(()=>{j(n,r+1)},200)},E=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!B.current||!y)return;let n=[];t.transact(()=>{e.forEach(e=>{let[t,r]=e;if(!y.has(t)){if(!v(r)){n.push([t,r]);return}x([t,r])}})}),n.length>0&&r<5&&setTimeout(()=>{E(n,r+1)},200)},C=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!B.current||!y)return;let n=[];t.transact(()=>{e.forEach(e=>{let[t,r]=e;if(!y.has(t)){if(!k(r)){n.push([t,r]);return}x([t,r])}})}),n.length>0&&r<5&&setTimeout(()=>C(n,r+1),200)};j(p),E(h),C(f)},500)}if(u&&Array.isArray(u)&&u.length>0)for(let r of u)await er(e,t,r,a,l)},en=(0,l.useCallback)(()=>{try{var e,r,n,l;let a=t.current;if(!a)return;null===(r=a.history)||void 0===r||null===(e=r.clear)||void 0===e||e.call(r),null===(l=a.undoManager)||void 0===l||null===(n=l.clear)||void 0===n||n.call(l)}catch(e){}},[]);return(0,l.useEffect)(()=>{if(!T.current)return;let e=()=>{var e;let t=null===(e=T.current)||void 0===e?void 0:e.querySelector("affine-edgeless-root");t&&("false"!==t.getAttribute("contenteditable")&&t.setAttribute("contenteditable","false"),t.querySelectorAll("affine-edgeless-note").forEach(e=>{let t=e.querySelector(".edgeless-note-page-content");t&&"true"!==t.getAttribute("contenteditable")&&t.setAttribute("contenteditable","true")}))},t=new MutationObserver(e);return t.observe(T.current,{subtree:!0,attributes:!0,attributeFilter:["contenteditable"],childList:!0}),e(),()=>t.disconnect()},[T]),(0,l.useEffect)(()=>{if(B.current=!0,T.current)for(;T.current.firstChild;)T.current.removeChild(T.current.firstChild);R.current=null,A.current&&t.current&&(A.current.removeDoc(t.current.id),t.current=null),t.current=null,A.current=null;let e=X(),n=e.createDoc({id:"page0"});return t.current=n,r&&"object"==typeof r&&Object.keys(r).length>0?(n.clear(),et(r,e)):ee(),()=>{if(B.current=!1,T.current)for(;T.current.firstChild;)T.current.removeChild(T.current.firstChild);if(R.current=null,A.current&&t.current){try{A.current.removeDoc(t.current.id)}catch(e){}t.current=null}}},[r]),(0,n.jsxs)("div",{className:"relative h-full w-full shadow-xl transition-all duration-300 ".concat("dark"===Q?"bg-[#141414]":"bg-white"),style:{..."dark"===Q?{"--affine-background-primary-color":"rgb(20, 20, 20)","--affine-edgeless-grid-color":"rgba(49, 49, 49, .35)"}:{}},children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 px-4 py-2 border-b justify-between w-full ".concat("dark"===Q?"border-gray-700 bg-[#1e1e1e]":"border-gray-200 bg-gray-50"," rounded-t-lg"),children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(d.A,{placement:"bottom",overlayClassName:"blocksuite-tooltip",children:(0,n.jsxs)("div",{onClick:()=>P((0,y.VW)()),className:"relative w-[34px] h-8 flex items-center justify-center px-2 rounded-full cursor-pointer transition-colors duration-300 ".concat("dark"===Q?"bg-gray-700":"bg-gray-200 border border-gray-300"),children:[F&&(0,n.jsx)("div",{className:"absolute w-6 h-6 rounded-full bg-white shadow-md transition-all duration-300"}),(0,n.jsx)(g.A,{style:{fontSize:"12px"},className:"z-10 text-base transition-colors duration-300 ".concat(F?"dark"===Q?"text-gray-900":"text-gray-800":"text-[#68737D]")})]})}),(0,n.jsx)(d.A,{title:O("edgeless"===J?"blocksuiteEditor.switchToPage":"blocksuiteEditor.switchToEdgeless"),placement:"bottom",overlayClassName:"blocksuite-tooltip",children:(0,n.jsxs)("div",{onClick:K,className:"relative w-16 h-8 flex items-center justify-between px-2 rounded-full cursor-pointer transition-colors duration-300 ".concat("dark"===Q?"bg-gray-700":"bg-gray-200 border border-gray-300"),children:[(0,n.jsx)("span",{className:"z-10 flex items-center justify-center transition-colors duration-300 ".concat("page"===J?"dark"===Q?"text-gray-900":"text-gray-800":"text-gray-400"),children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),(0,n.jsx)("polyline",{points:"14 2 14 8 20 8"}),(0,n.jsx)("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),(0,n.jsx)("line",{x1:"16",y1:"17",x2:"8",y2:"17"})]})}),(0,n.jsx)("span",{className:"pr-[2px] z-10 flex items-center justify-center transition-colors duration-300 ".concat("edgeless"===J?"dark"===Q?"text-gray-900":"text-gray-800":"text-gray-400"),children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),(0,n.jsx)("line",{x1:"3",y1:"9",x2:"21",y2:"9"})]})}),(0,n.jsx)("div",{className:"absolute w-6 h-6 rounded-full bg-white shadow-md transition-all duration-300 top-[3px]",style:{left:"page"===J?"3px":"35px"}})]})}),(0,n.jsx)(d.A,{title:O("dark"===Q?"blocksuiteEditor.switchToLight":"blocksuiteEditor.switchToDark"),placement:"bottom",overlayClassName:"blocksuite-tooltip",children:(0,n.jsxs)("div",{onClick:V,className:"relative w-16 h-8 flex items-center justify-between px-2 rounded-full cursor-pointer transition-colors duration-300 ".concat("dark"===Q?"bg-gray-700":"bg-gray-200 border border-gray-300"),children:[(0,n.jsx)("span",{className:"z-10 flex items-center justify-center transition-colors duration-300 ".concat("light"===Q?"text-amber-500":"text-gray-400"),children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,n.jsx)("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41
1M17.66 6.34l1.41-1.41"})]})}),(0,n.jsx)("span",{className:"z-10 flex items-center justify-center transition-colors duration-300 ".concat("dark"===Q?"text-yellow-200":"text-gray-400"),children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:(0,n.jsx)("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})})}),(0,n.jsx)("div",{className:"absolute w-6 h-6 rounded-full bg-white shadow-md transition-all duration-300 top-[3px] ".concat("dark"===Q?"left-[35px]":"left-[3px]")})]})})]}),(0,n.jsx)("div",{className:"text-lg font-semibold font-notoSans ".concat("dark"==Q?"text-white":"text-black"),children:L?z||O("untitled"):O("newNote")}),(0,n.jsx)(f.Ay,{className:"!bg-status-ok !text-white border-none font-bold rounded truncate line-clamp-1 hover:opacity-90 transition-all font-notoSans",onClick:()=>E(),loading:C,children:O("saveNote")})]}),U&&(0,n.jsx)("div",{className:"absolute z-[103] w-full h-full text-blue!",children:(0,n.jsxs)("div",{className:"flex flex-col items-center gap-4 justify-center h-full text-[#ff6b35] font-notoSans",children:[(0,n.jsx)(p.A,{indicator:(0,n.jsx)(m.A,{style:{fontSize:40,color:"#ff6b35"},spin:!0})}),"ノートを開いております。少々お待ちください。"]})}),(0,n.jsx)("div",{className:"w-full h-[calc(100%-45px)] flex flex-col relative",children:(0,n.jsx)("div",{ref:T,className:"h-full w-full",style:{minHeight:"400px"}})})]})}},827254:(e,t,r)=>{r.d(t,{$Q:()=>l,OJ:()=>i,Rk:()=>a,Z$:()=>o});var n=r(621230);let l=async e=>{try{return(await n.Ay.post("/cloudflare/presigned-url",e)).data}catch(e){return console.log(e),null}},a=async e=>{try{return(await n.Ay.post("/cloudflare/private-file-url",e)).data}catch(e){return console.log(e),null}},i=async e=>(await n.Ay.get("/cloudflare/stream-download",{params:{url:e},responseType:"blob"})).data,o=async e=>(await n.Ay.get("/cloudflare/stream-download-file",{params:{url:e},responseType:"blob"})).data},757531:(e,t,r)=>{r.d(t,{v:()=>c});var n=function(e){return e.XROID="xroid",e.STUDIO="studio",e.API="api",e}({}),l=function(e){return e.INFO="info",e.ERROR="error",e}({}),a=r(621230);let i=async e=>{try{return(await a.Ay.post("/log",e)).data}catch(e){return console.log(e),null}},o=e=>{try{return JSON.stringify(e,null,2)}catch(t){return String(e)}},c=(e,t)=>{var r;let a=window.location.pathname,c=("string"==typeof t?t:null==t?void 0:t.message)||(null!=t?o(t):"")||"Unknown error";i({service:n.XROID,type:l.ERROR,title:e,message:c,details:o(null!==(r=null==t?void 0:t.stack)&&void 0!==r?r:t),endpoint:a})}},521543:(e,t,r)=>{r.d(t,{IL:()=>c,QM:()=>o});var n=r(361789),l=r(156998),a=r(757531),i=r(827254);let o=async function(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"userFiles",i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],[c,s]=new Date().toISOString().split("T");t=o?(0,l.KR)(n.IG,"".concat(r,"/").concat(c,"/").concat(s,"/").concat(null==e?void 0:e.name)):(0,l.KR)(n.IG,"".concat(r,"/").concat(c,"/").concat(null==e?void 0:e.name));let u=await (0,l.D)(t,e);try{let e=u.ref;if(!i)return await (0,l.qk)(e);{let[t,r]=await Promise.all([(0,l.yb)(e),(0,l.qk)(e)]);return{fullPath:r,fileData:{url:r,type:null==t?void 0:t.type,title:null==t?void 0:t.name}}}}catch(e){throw console.error(e),(0,a.v)("".concat("uploadFile.ts"," - uploadFile Error"),e),e}},c=async function(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];try{let l=await (0,i.$Q)({fileName:e.name,fileType:e.type,folderPath:t,isPublic:r});console.log("Presigned URL response:",l);let{signedUrl:a,publicUrl:o,key:c}=l.data;if(!a)throw Error("Cannot get signed URL");if(!(await fetch(a,{method:"PUT",body:e,headers:{"Content-Type":e.type}})).ok)return"";if(r)return o;{var n;let e=await (0,i.Rk)({key:c});if(null==e?void 0:null===(n=e.data)||void 0===n?void 0:n.signedUrl)return e.data.signedUrl;return console.error("Failed to get private file URL"),c}}catch(e){return console.error("[uploadFileToCloudFlare] Error:",e),""}}}}]);

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.