PageSourceSearch

https://app.teleskop.ro/build/assets/index-YJb0-X_p.js

js teleskop.ro collected 2026-10-01 14:09:23 UTC 8,214 bytes, 5 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d3db8a4a-2d61-5f1e-a14b-255962debde8")}catch(e){}}();
3import{j as e,M as u,B as f,h as n,S as j,D as g,L as k}from"./heroUI-B_ljU1QU.js";import{a as c,u as b}from"./i18n-B1Tl-FS8.js";import{c as y,b as v,i as S,P as w,A,t as p,D as E}from"./App-NouI1Fy-.js";import{a as L,f as R}from"./dateFormats-TP-18fiU.js";import{P as _}from"./PageHeader-gutvdt0U.js";import{D as H}from"./DrawerShare-DWffkBr7.js";import{T as I}from"./triangle-alert-yCytgbHH.js";import{P as B}from"./plus-BtuFysVt.js";import{T as M}from"./Icon-Bn1Of1X8.js";import"./excalidraw-ClE5B34E.js";import"./app-CNhMxvwe.js";import"./utils-Ck-GfcmJ.js";import"./EmbedSnippet-ESlrhsZR.js";import"./SidePanel-uFYaj6EA.js";import"./ShareSuccess-Bt_3nuE0.js";import"./file-text-D_rPaBmV.js";import"./check-CwC0fwRx.js";import"./arrow-up-right-DPds2Qak.js";const F=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],q=y("ellipsis",F);const $=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],V=y("pencil-line",$);const G=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],O=y("share-2",G),W=r=>{const{fetchApi:t,isLoading:a,responseApi:i}=v({url:"/user/drawings",method:"GET"});c.useEffect(()=>{i?.success&&r({type:"drawings",payload:i.drawings})},[i,r]);function s(){t()}return{responseApi:i,isLoadingDrawings:a,getDrawings:s}},U=(r,t)=>{const{fetchApi:a,isLoading:i,responseApi:s}=v({url:`/user/drawing/${r}`,method:"DELETE",noToast:!1}),l=c.useRef(t);l.current=t;const d=c.useRef(null);return c.useEffect(()=>{s?.success&&d.current!==s&&(d.current=s,l.current?.())},[s]),{deleteDrawing:a,isDeleting:i,deleteResponse:s}},T=({board:r,isOpen:t,onOpenChange:a,onDeleted:i})=>{const{t:s}=b(),{addNotification:l}=S(),d=c.useRef(null),{deleteDrawing:h,isDeleting:m}=U(r?.uuid,()=>{const x=d.current;d.current=null,x&&(i(x),a(!1),l({title:s("boards.delete.deletedMessage"),settings:{type:"success",duration:2e3}}))});return e.jsx(u.Backdrop,{isOpen:t,onOpenChange:a,children:e.jsx(u.Container,{children:e.jsxs(u.Dialog,{className:"sm:max-w-[400px]",children:[e.jsx(u.CloseTrigger,{}),e.jsxs(u.Header,{children:[e.jsx(u.Icon,{className:"bg-danger-soft text-danger-soft-foreground",children:e.jsx(I,{className:"size-5","aria-hidden":"true"})}),e.jsx(u.Heading,{children:s("boards.delete.title")})]}),e.jsx(u.Body,{children:e.jsx("p",{children:s("boards.delete.description",{title:r?.title??""})})}),e.jsxs(u.Footer,{children:[e.jsx(f,{variant:"secondary",onPress:()=>a(!1),isDisabled:m,children:s("boards.delete.cancel")}),e.jsx(f,{variant:"danger",onPress:()=>{r?.uuid&&(d.current=r,h())},isDisabled:m,isPending:m,children:s("boards.delete.confirm")})]})]})})})};T.propTypes={board:w.object,isOpen:w.bool.isRequired,onOpenChange:w.func.isRequired,onDeleted:w.func.isRequired};const J="/build/assets/drawing-pen-2EySIVzH.png",K=({board:r,onOpen:t,title:a})=>{const[i,s]=c.useState(!1),{t:l}=b();return!r.preview_image||i?e.jsx("button",{type:"button",onClick:t,"aria-label":l("boards.openBoard",{title:a}),className:"flex aspect-[16/10] w-full cursor-pointer items-center justify-center bg-gradient-to-br from-[#eef2ff] via-[#f5f3ff] to-[#ecfeff]",children:e.jsx("span",{className:"grid size-14 place-items-center rounded-2xl bg-white text-[#444ce7] shadow-sm",children:e.jsx(V,{className:"size-6","aria-hidden":"true"})})}):e.jsx("button",{type:"button",onClick:t,"aria-label":l("boards.openBoard",{title:a}),className:"block aspect-[16/10] w-full cursor-pointer overflow-hidden bg-surface-tertiary",children:e.jsx("img",{className:"h-full w-full object-cover transition-transform duration-300 ease-out group-hover:scale-[1.03]",src:r.preview_image,alt:"",loading:"lazy",onError:()=>s(!0)})})},Q=({board:r,onOpen:t,onShare:a,onDelete:i})=>{const{t:s}=b();return e.jsxs(n,{className:"flex flex-col overflow-hidden",children:[e.jsx(K,{board:r,onOpen:t,title:r.title}),e.jsxs(n.Header,{className:"gap-1 pb-0",children:[e.jsx(n.Title,{className:"truncate",children:r.title}),e.jsxs(n.Description,{children:[s("boards.previewBox.lastUpdated"),": ",L(r.updated_at)," ",R(r.updated_at)]})]}),e.jsxs(n.Footer,{className:"mt-auto flex items-center justify-between gap-2",children:[e.jsx(f,{className:"min-w-28 flex-1 sm:flex-none",onPress:t,children:s("globals.open")}),e.jsxs(g,{children:[e.jsx(f,{isIconOnly:!0,size:"sm",variant:"tertiary","aria-label":s("boards.cardActions",{title:r.title}),children:e.jsx(q,{className:"size-4","aria-hidden":"true"})}),e.jsx(g.Popover,{children:e.jsxs(g.Menu,{"aria-label":s("boards.cardActions",{title:r.title}),onAction:l=>{l==="share"&&a(),l==="delete"&&i()},children:[e.jsxs(g.Item,{id:"share",textValue:s("globals.share"),children:[e.jsx(O,{className:"size-4 shrink-0 text-muted","aria-hidden":"true"}),e.jsx(k,{children:s("globals.share")})]}),e.jsxs(g.Item,{id:"delete",textValue:s("boards.delete.confirm"),variant:"danger",children:[e.jsx(M,{className:"size-4 shrink-0 text-danger","aria-hidden":"true"}),e.jsx(k,{children:s("boards.delete.confirm")})]})]})})]})]})]})},X=()=>e.jsxs(n,{children:[e.jsx(j,{className:"aspect-[16/10] w-full rounded-xl"}),e.jsxs(n.Header,{className:"gap-2 pb-0",children:[e.jsx(j,{className:"h-5 w-3/4 rounded-md"}
3),e.jsx(j,{className:"h-4 w-1/2 rounded-md"})]}),e.jsx(n.Footer,{children:e.jsx(j,{className:"h-10 w-full rounded-xl sm:w-28"})})]}),he=({location:r,navigate:t})=>{const{state:a,dispatch:i}=A(),[s,l]=c.useState(null),[d,h]=c.useState(null),{getDrawings:m,isLoadingDrawings:x,responseApi:N}=W(i),D=c.useCallback(()=>{a.drawings.length===0&&!x&&!N&&m()},[a.drawings.length,x,N,m]);c.useEffect(()=>{D()},[D]);const z=c.useCallback(o=>t(`/board/${o.uuid}/update`),[t]),P=c.useCallback(o=>{o?.uuid&&(i({type:"deleteDrawing",payload:o.uuid}),l(null))},[i]);return e.jsxs("div",{className:"relative mx-auto flex w-full flex-col justify-center",children:[e.jsx("div",{className:"relative mx-auto w-full bg-surface",children:e.jsx("div",{className:"w-full pb-8",children:e.jsx(_,{title:p("boards.title"),description:p("boards.description"),actions:a.drawings.length>0&&!x?e.jsxs(f,{onPress:()=>t("/board/create"),className:"w-full sm:w-auto",children:[e.jsx(B,{className:"size-4","aria-hidden":"true"}),p("boards.createNewBoard")]}):null})})}),a.drawings.length===0&&!x?e.jsx(n,{className:"my-5 w-full",children:e.jsxs(n.Content,{className:"flex flex-col items-center gap-5 px-5 py-12 text-center sm:px-10 sm:py-16",children:[e.jsx("img",{src:J,alt:"",className:"size-24 object-contain"}),e.jsxs(n.Header,{className:"items-center gap-2 p-0",children:[e.jsx(n.Title,{className:"text-xl sm:text-2xl",children:p("boards.noBoards.title")}),e.jsx(n.Description,{className:"max-w-xl text-sm leading-6 sm:text-base",children:p("boards.noBoards.description")})]}),e.jsx(n.Footer,{className:"p-0",children:e.jsxs(f,{onPress:()=>t("/board/create"),children:[e.jsx(B,{className:"size-4","aria-hidden":"true"}),p("boards.createNewBoard")]})})]})}):e.jsx("div",{className:"mx-auto my-5 grid w-full grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4",children:x?new Array(6).fill(0).map((o,C)=>e.jsx(X,{},C)):a.drawings.map(o=>e.jsx(Q,{board:o,onOpen:()=>z(o),onShare:()=>h(o),onDelete:()=>l(o)},o.uuid))}),e.jsx(T,{board:s,isOpen:s!==null,onOpenChange:o=>{o||l(null)},onDeleted:P}),d&&e.jsx(E,{location:r.pathname,opened:d!==null,handleClose:()=>h(null),drawStyle:{maxWidth:"580px"},children:e.jsx(H,{handleClose:()=>h(null),board:{drawerId:d.uuid}})})]})};export{he as default};
4
5//# debugId=d3db8a4a-2d61-5f1e-a14b-255962debde8

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.