1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8cbbf626-d795-4ea1-91be-7cd331a59d6b",e._sentryDebugIdIdentifier="sentry-dbid-8cbbf626-d795-4ea1-91be-7cd331a59d6b")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1418],{91418:(e,t,a)=>{a.r(t),a.d(t,{default:()=>d});var n=a(95155),l=a(12115),r=a(56303),o=a(27122),i=a(95820);async function s(e,t){let a=await fetch(e),n=await a.blob(),l=await createImageBitmap(n,{imageOrientation:"from-image"}),r=document.createElement("canvas");r.width=512,r.height=512;let o=r.getContext("2d");if(!o)throw Error("Canvas 2D context unavailable");o.imageSmoothingQuality="high",o.drawImage(l,t.x,t.y,t.width,t.height,0,0,512,512),"close"in l&&l.close();let i=(e,t)=>new Promise(a=>r.toBlob(e=>a(e),e,t)),s=await i("image/webp",.82);if(s&&"image/webp"===s.type)return s;let c=await i("image/jpeg",.85);if(!c)throw Error("Image encoding failed");return c}var c=a(33731);function d(e){let{imageSrc:t,onCancel:a,onSave:d}=e,[u,f]=(0,l.useState)({x:0,y:0}),[m,b]=(0,l.useState)(1),[p,h]=(0,l.useState)(null),[g,y]=(0,l.useState)(!1),x=(0,l.useRef)(null),v=(0,l.useRef)(null),w=(0,l.useCallback)((e,t)=>h(t),[]);(0,l.useEffect)(()=>(v.current="undefined"!=typeof document?document.activeElement:null,()=>{var e,t;return null==(t=v.current)||null==(e=t.focus)?void 0:e.call(t)}),[]);let k=(0,l.useCallback)(e=>{x.current=e,null==e||e.focus()},[]);(0,l.useEffect)(()=>{let e=e=>{if("Escape"===e.key){if(g)return;e.preventDefault(),e.stopImmediatePropagation(),a();return}if("Tab"===e.key&&x.current){let t=x.current.querySelectorAll('button:not([disabled]), [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(0===t.length)return;let a=t[0],n=t[t.length-1];e.shiftKey&&document.activeElement===a?(e.preventDefault(),n.focus()):e.shiftKey||document.activeElement!==n||(e.preventDefault(),a.focus())}};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[a,g]);let C=async()=>{if(p){y(!0);try{let e=await s(t,p);await d(e)}catch(e){o.Cp(e,{tags:{component:"avatar-crop",phase:"encode"}}),c.notify.error("Couldn't prepare that image: ".concat(e instanceof Error?e.message:"please try another"))}finally{y(!1)}}};return(0,n.jsx)(i.Z,{children:(0,n.jsx)("div",{role:"dialog","aria-modal":"true","aria-labelledby":"avatar-crop-title",className:"fixed inset-0 z-[10000] flex items-center justify-center bg-black/50 p-4",onClick:e=>{e.target!==e.currentTarget||g||a()},children:(0,n.jsxs)("div",{ref:k,tabIndex:-1,className:"w-full bg-white rounded-2xl shadow-xl p-5 outline-none",style:{maxWidth:420},onClick:e=>e.stopPropagation(),children:[(0,n.jsx)("h3",{id:"avatar-crop-title",className:"text-[15px] font-semibold mb-3",style:{color:"var(--text-strong)"},children:"Adjust your photo"}),(0,n.jsx)("div",{className:"relative w-full overflow-hidden rounded-xl bg-black/80",style:{height:280},children:(0,n.jsx)(r.Ay,{image:t,crop:u,zoom:m,aspect:1,cropShape:"round",showGrid:!1,onCropChange:f,onZoomChange:b,onCropComplete:w})}),(0,n.jsx)("label",{htmlFor:"avatar-zoom",className:"block text-[12px] mt-4 mb-1",style:{color:"var(--text-muted)"},children:"Zoom"}),(0,n.jsx)("input",{id:"avatar-zoom",type:"range",min:1,max:3,step:.01,value:m,"aria-label":"Zoom",onChange:e=>b(Number(e.target.value)),className:"w-full"}),(0,n.jsxs)("div",{className:"flex justify-end gap-2 mt-5",children:[(0,n.jsx)("button",{type:"button",onClick:a,disabled:g,className:"px-4 py-2 rounded-lg text-[13px] hover:bg-black/5 disabled:opacity-50",style:{color:"var(--text-muted)"},children:"Cancel"}),(0,n.jsx)("button",{type:"button",onClick:C,disabled:g||!p,className:"px-4 py-2 rounded-lg text-[13px] font-medium text-white disabled:opacity-50",style:{background:"var(--accent-color)"},children:g?"Savingâ¦":"Save"})]})]})})})}},95820:(e,t,a)=>{a.d(t,{Z:()=>r});var n=a(12115),l=a(47650);function r(e){let{children:t}
1=e,[a,r]=(0,n.useState)(!1);return((0,n.useEffect)(()=>(r(!0),()=>r(!1)),[]),a)?(0,l.createPortal)(t,document.body):null}}}]);
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.