PageSourceSearch

https://oobo.ai/_next/static/chunks/8163.2a5f15b91b02ea42.js

js oobo.ai collected 2026-10-05 12:31:55 UTC 2,851 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8163],{58163:(e,t,r)=>{r.r(t),r.d(t,{default:()=>m});var a=r(95155),s=r(12115),n=r(85511),i=r(65229),o=r(71629),l=r(34904),c=r(35299);async function d(e,t){let r=new Image;r.crossOrigin="anonymous",await new Promise((t,a)=>{r.onload=()=>t(),r.onerror=a,r.src=e});let a=document.createElement("canvas"),s=Math.min(Math.min(t.width,t.height),512);a.width=s,a.height=s;let n=a.getContext("2d");if(!n)throw Error("Canvas not supported");return n.drawImage(r,t.x,t.y,t.width,t.height,0,0,s,s),new Promise((e,t)=>{a.toBlob(r=>r?e(r):t(Error("Failed to create blob")),"image/jpeg",.92)})}function m(e){let{imageSrc:t,onCrop:r,onClose:m}=e,[x,h]=(0,s.useState)({x:0,y:0}),[p,u]=(0,s.useState)(1),[b,g]=(0,s.useState)(null),[y,w]=(0,s.useState)(!1),f=(0,s.useCallback)((e,t)=>{g(t)},[]),j=async()=>{if(b){w(!0);try{let e=await d(t,b);await r(e)}finally{w(!1)}}};return(0,a.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:m}),(0,a.jsxs)("div",{className:"relative z-10 bg-white rounded-2xl shadow-2xl w-full max-w-md mx-4 overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-5 py-4 border-b border-border",children:[(0,a.jsx)("h3",{className:"text-base font-semibold text-primary",children:"Crop avatar"}),(0,a.jsx)("button",{type:"button",onClick:m,className:"cursor-pointer p-1.5 rounded-lg text-secondary hover:bg-gray-100 transition",children:(0,a.jsx)(i.A,{className:"h-4 w-4"})})]}),(0,a.jsx)("div",{className:"relative w-full aspect-square bg-gray-950",children:(0,a.jsx)(n.Ay,{image:t,crop:x,zoom:p,aspect:1,cropShape:"round",showGrid:!1,onCropChange:h,onZoomChange:u,onCropComplete:f})}),(0,a.jsxs)("div",{className:"flex items-center gap-3 px-5 py-3 border-t border-border",children:[(0,a.jsx)(o.A,{className:"h-4 w-4 text-secondary shrink-0"}),(0,a.jsx)("input",{type:"range",min:1,max:3,step:.05,value:p,onChange:e=>u(Number(e.target.value)),className:"cursor-pointer flex-1 accent-primary h-1"}),(0,a.jsx)(l.A,{className:"h-4 w-4 text-secondary shrink-0"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-2 px-5 py-4 border-t border-border",children:[(0,a.jsx)("button",{type:"button",onClick:m,disabled:y,className:"cursor-pointer px-4 py-2 rounded-lg text-sm font-medium text-secondary hover:bg-gray-100 transition",children:"Cancel"}),(0,a.jsx)("button",{type:"button",onClick:j,disabled:y||!b,className:"cursor-pointer flex items-center gap-1.5 px-5 py-2 rounded-lg bg-primary text-white text-sm font-semibold hover:bg-primary/90 transition disabled:opacity-50",children:y?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.A,{className:"h-4 w-4 animate-spin"}),"Saving..."]}):"Save"})]})]})]})}}}]);

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.