{"version":3,"file":"Process_button.D8f9cc8Y.mjs","names":["getProps","React.forwardRef","addPropertyOverrides","cycleOrder","serializationHash","variantClassNames","transition1","Transition","React.useContext","React.useMemo","humanReadableVariantMap","Variants","React.Fragment","getProps","createLayoutDependency","React.forwardRef","useRef","React.useId","React.useContext","React.useMemo","React.Fragment","React.forwardRef","useRef","React.useId","useRef","useState","useCallback","_Fragment","startTransition","SUPABASE_URL","SUPABASE_ANON_KEY","useRef","useState","useCallback","useMemo","_Fragment","useRef","useState","_Fragment","__exportAll","pe","init_npm_react_18_3_1","ne","init_ssg_sandbox_shims","window","te","x","ie","init_npm_react_dom_18_3_1","l","_e","Ha","oe","p","c","J","init_jsx_runtime","ce","de","MotionConfigContext","LayoutGroup","init_framer_motion_DhsWWWsN","motion","useLocaleInfo","init_framer_BisrWwwE","withCSS","RichText","useVariantState","useComponentViewport","ControlType","useSVGTemplate","addFonts","cx","addPropertyControls","init_SandboxAuth","getOrCreateSandboxSession","trackSandboxEvent","init_SandboxPolicy","init_YuraSandboxAnalytics","markProcessClick","init_SandboxUsage","mask","Base","MotionSVG","SVG","svg","getProps$2","Icon","init_X0cdU3NPF","__esmMin","props","rest","animated","width1","color","restProps","href","className","P_DcoRcrY","JEeZYcamG","style","addPropertyOverrides$1","variants","nextOverrides","variant","overrides","cycleOrder$1","serializationHash$1","variantClassNames$1","transition1$1","Transition$1","humanReadableVariantMap$1","Variants$1","getProps$1","createLayoutDependency$1","Framera9gD_d9TW","init_a9gD_d9TW","config","transition","value","contextValue","todaySOrders2","todaySOrders","fallbackRef","refBinding","ref","defaultLayoutId","layoutDependency","scopingClassNames","layoutId","gestureHandlers","classNames","baseVariant","gestureVariant","zDMAokxMu","oaJWCnlhG","ttyDThvlj_exports","__FramerMetadata__","FramerttyDThvlj","addPropertyOverrides","cycleOrder","serializationHash","variantClassNames","transition1","Transition","humanReadableVariantMap","Variants","getProps","createLayoutDependency","init_ttyDThvlj","\"exports\"","\"default\"","\"type\"","\"name\"","\"slots\"","\"annotations\"","\"framerIntrinsicWidth\"","\"framerIntrinsicHeight\"","\"framerColorSyntax\"","\"framerContractVersion\"","\"framerDisplayContentsDiv\"","\"framerAutoSizeImages\"","\"framerImmutableVariables\"","\"framerComponentViewportWidth\"","\"framerCanvasComponentVariantDetails\"","\"Props\"","\"__FramerMetadata__\"","DrawingCanvas","canvasRef","contextRef","isDrawing","setIsDrawing","lastPointRef","startPointRef","historyRef","redoStackRef","saveTimeoutRef","tempImageDataRef","cursorRef","initialSizeRef","currentTool","setCurrentTool","currentPenColor","setCurrentPenColor","currentPenWidth","setCurrentPenWidth","showGrid","setShowGrid","saveTransparent","setSaveTransparent","isToolDropdownOpen","setIsToolDropdownOpen","isWidthDropdownOpen","setIsWidthDropdownOpen","isExportDropdownOpen","setIsExportDropdownOpen","historyVersion","setHistoryVersion","isCursorVisible","setIsCursorVisible","saveStatus","setSaveStatus","STORAGE_KEY","canvas","context","rect","dpr","savedDrawing","enableAutoSave","img","saveToHistory","resizeObserver","currentDrawing","dataUrl","v","handleSave","tempCanvas","ctx","backgroundColor","link","format","blob","debouncedSave","onDrawingSave","sourceId","error","getPoint","clientX","clientY","drawLine","from","to","drawShape","shapeType","start","end","width","height","radius","startDrawing","point","eraserWidth","draw","stopDrawing","updateCursorPosition","handleMouseDown","handleMouseMove","handleMouseUp","handleMouseLeave","handleMouseEnter","handleTouchStart","handleTouchMove","handleTouchEnd","handleUndo","currentState","previousState","handleRedo","nextState","handleClear","handleKeyDown","getCursorElement","customIcon","enableCustomIcons","customIconSrc","offsetX","offsetY","icon","Icons","toolbarTextColor","getToolIcon","getSrc","prop","tool","penSrc","eraserSrc","lineSrc","rectSrc","circleSrc","availableTools","showToolPen","showToolEraser","showToolLine","showToolRectangle","showToolCircle","getToolName","getToolbarStyle","baseStyle","toolbarFixed","toolbarBackground","toolbarPosition","toolbarAlignment","showDivider","showToolColor","showToolWidth","saveLanguage","showToolbar","panMode","showToolGrid","showToolExport","showToolUndo","showToolRedo","showToolClear","ToolType","init_Drawing_Canvas","\"Pen\"","\"Eraser\"","\"Line\"","\"Rectangle\"","\"Circle\"","enableGrid","customizeToolbar","getPendingWork","globalState","GLOBAL_KEY","trackPendingWork","pending","promise","waitForPendingWork","init_SandboxPendingWork","init_ProcessOrderOverrides","createSandboxOrder","response","SUPABASE_URL$1","SUPABASE_ANON_KEY$1","accessToken","userId","result","prepareImageForUpload","file","url","image","resolve","reject","baseName","uploadOriginalImage","safeName","filePath","orderId","dataUrlToBlob","createCombinedAnnotatedImage","original","annotation","originalUrl","annotationDataUrl","uploadAnnotatedImage","uploadCombinedAnnotatedImage","updateSourceAnnotatedPath","overlayFilePath","combinedFilePath","createSourceRow","fileType","sortOrder","withFileUpload","inputRef","sandboxOrderRef","previews","setPreviews","selectedImageId","setSelectedImageId","previewsRef","selectedImage","item","zoom","setZoom","setPanMode","narrowEditor","setNarrowEditor","tabletEditor","setTabletEditor","workspaceRef","workspaceSize","setWorkspaceSize","previousOverflow","previousBodyBackground","previousRootBackground","onKeyDown","event","updateWidth","workspace","observer","handleDrawingSave","sourceImage","resolvedSourceId","uploadWork","uploadWorkByFileRef","sourceMetaRef","sandboxOrder","ensureSandboxOrder","removedFilesRef","pendingUploadsRef","session","retryOrderId","retryOrder","openPicker","syncInputFiles","input","transfer","files","handleFiles","incoming","combinedFiles","current","currentMap","next","existing","entry","YURA_PENDING_UPLOADS_KEY","trackedUploadWork","startingSortOrder","index","preparationStart","uploadFile","preparationMs","uploadStart","transferMs","sourceRow","deleteResponse","removePreview","removed","id","isArabic","path","dir","lang","topButtonStyle","editorButtonStyle","toolbarOnRight","sideGutter","Component","imageWidth","imageHeight","fit","init_Examples","createProcessOverride","isSubmittingRef","isSubmitting","setIsSubmitting","uploadWarning","setUploadWarning","handleProcess","sourceResponse","SUPABASE_URL","SUPABASE_ANON_KEY","sources","jobId","updateResponse","YURA_PROCESSING_ORDER_KEY","YURA_PROCESSING_JOB_KEY","withProcessOrder","withProcessOrderAR","init_Process_button"],"sources":["https:/framerusercontent.com/modules/y5zazQf4X0NKQR1VNkgE/Wl0nhkJD2n3NzS8fMM2X/X0cdU3NPF.js","https:/framerusercontent.com/modules/BVran8vbRzDUXcdEyIlL/l2Nl1np9z3oCxc9RlpHj/a9gD_d9TW.js","https:/framerusercontent.com/modules/9zm7bj9hqfzoXDfqkKZR/IsaJ1B59NoaTiZKNnNLI/ttyDThvlj.js","https:/framerusercontent.com/modules/pjkPBjMCwElUHOjByweC/NdGOJQbbJNfvBlBQ5fhe/Drawing_Canvas.js","https:/framerusercontent.com/modules/SXpJlvCHveae4cCrd2eo/9wdLupuDXRBW40x54WMm/SandboxPendingWork.js","https:/framerusercontent.com/modules/MAMIOB9plPZoaxkt5kNy/OrpgpWDO1v4kE9Aov4Ne/ProcessOrderOverrides.js","https:/framerusercontent.com/modules/L1u18UAk6GZeUVlJUrwG/07J1EETVWYyehxRinRLc/Examples.js","https:/framerusercontent.com/modules/PXqBJ3GKYIyfE1XTSes9/toDN4Px674uefu48rMKN/Process_button.js"],"sourcesContent":["// Generated by Framer (85eaff3)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,cx,motion,useSVGTemplate,withCSS}from\"framer\";import*as React from\"react\";import{forwardRef}from\"react\";const mask=\"var(--framer-icon-mask)\";const Base=/*#__PURE__*/forwardRef(function(props,ref){return /*#__PURE__*/_jsx(\"svg\",{...props,ref:ref,children:props.children});});const MotionSVG=motion.create(Base);const SVG=/*#__PURE__*/forwardRef((props,ref)=>{const{animated,layoutId,children,...rest}=props;return animated?/*#__PURE__*/_jsx(MotionSVG,{...rest,layoutId:layoutId,ref:ref,children:children}):/*#__PURE__*/_jsx(\"svg\",{...rest,ref:ref,children:children});});const svg='<svg display=\"block\" role=\"presentation\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 0 0 L 0 12\" fill=\"transparent\" height=\"12px\" id=\"eXdasxf_i\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--js9iwy, 2)\" stroke=\"var(--1m973uw, rgb(0,0,0))\" transform=\"translate(12 3)\" width=\"1px\"/><path d=\"M 10 5 L 5 0 L 0 5\" fill=\"transparent\" height=\"5px\" id=\"jE1bso0Bi\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--js9iwy, 2)\" stroke=\"var(--1m973uw, rgb(0,0,0))\" transform=\"translate(7 3)\" width=\"10px\"/><path d=\"M 18 0 L 18 4 C 18 5.105 17.105 6 16 6 L 2 6 C 0.895 6 0 5.105 0 4 L 0 0\" fill=\"transparent\" height=\"6px\" id=\"iOptNcSgd\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--js9iwy, 2)\" stroke=\"var(--1m973uw, rgb(0,0,0))\" transform=\"translate(3 15)\" width=\"18px\"/></svg>';const getProps=({color,height,id,width,width1,...props})=>{return{...props,JEeZYcamG:width1??props.JEeZYcamG??2,P_DcoRcrY:color??props.P_DcoRcrY??\"rgb(0, 0, 0)\"};};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const{style,className,layoutId,variant,P_DcoRcrY,JEeZYcamG,...restProps}=getProps(props);const href=useSVGTemplate(\"3409230887\",svg);return /*#__PURE__*/_jsx(SVG,{...restProps,className:cx(\"framer-Bkop4\",className),layoutId:layoutId,ref:ref,role:\"presentation\",style:{\"--1m973uw\":P_DcoRcrY,\"--js9iwy\":JEeZYcamG,...style},viewBox:\"0 0 24 24\",children:/*#__PURE__*/_jsx(\"use\",{href:href})});});const css=[`.framer-Bkop4 { -webkit-mask: ${mask}; aspect-ratio: 1; display: block; mask: ${mask}; width: 24px; }`];/**\n * This is a generated Framer component.\n * @framerIntrinsicWidth 24\n * @framerIntrinsicHeight 24\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerVariables {\"P_DcoRcrY\":\"color\",\"JEeZYcamG\":\"width1\"}\n * @framerImmutableVariables true\n * @framerVector {\"name\":\"Upload\",\"color\":{\"type\":\"variable\",\"value\":\"1m973uw\"},\"set\":{\"localId\":\"vectorSet/ZsiCCGPvG\",\"id\":\"ZsiCCGPvG\",\"moduleId\":\"Y7SpbVH16cWqMhj75z1M\"}}\n */const Icon=withCSS(Component,css,\"framer-Bkop4\");Icon.displayName=\"Upload\";export default Icon;addPropertyControls(Icon,{P_DcoRcrY:{defaultValue:\"rgb(0, 0, 0)\",hidden:false,title:\"Color\",type:ControlType.Color},JEeZYcamG:{defaultValue:2,displayStepper:true,hidden:false,max:16,min:1,title:\"Width\",type:ControlType.Number}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerImmutableVariables\":\"true\",\"framerIntrinsicWidth\":\"24\",\"framerVector\":\"{\\\"name\\\":\\\"Upload\\\",\\\"color\\\":{\\\"type\\\":\\\"variable\\\",\\\"value\\\":\\\"1m973uw\\\"},\\\"set\\\":{\\\"localId\\\":\\\"vectorSet/ZsiCCGPvG\\\",\\\"id\\\":\\\"ZsiCCGPvG\\\",\\\"moduleId\\\":\\\"Y7SpbVH16cWqMhj75z1M\\\"}}\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerVariables\":\"{\\\"P_DcoRcrY\\\":\\\"color\\\",\\\"JEeZYcamG\\\":\\\"width1\\\"}\",\"framerIntrinsicHeight\":\"24\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// Generated by Framer (e0809aa)\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addFonts,addPropertyControls,ControlType,cx,RichText,useComponentViewport,useLocaleInfo,useVariantState,withCSS}from\"framer\";import{LayoutGroup,motion,MotionConfigContext}from\"framer-motion\";import*as React from\"react\";import{useRef}from\"react\";const cycleOrder=[\"EuDaNUbaq\",\"Dof_xgp7J\"];const serializationHash=\"framer-YXAew\";const variantClassNames={Dof_xgp7J:\"framer-v-n41cnf\",EuDaNUbaq:\"framer-v-3376tr\"};function addPropertyOverrides(overrides,...variants){const nextOverrides={};variants?.forEach(variant=>variant&&Object.assign(nextOverrides,overrides[variant]));return nextOverrides;}const zDMAokxMu=undefined;const oaJWCnlhG=undefined;const transition1={bounce:.2,delay:0,duration:.4,type:\"spring\"};const Transition=({value,children})=>{const config=React.useContext(MotionConfigContext);const transition=value??config.transition;const contextValue=React.useMemo(()=>({...config,transition}),[JSON.stringify(transition)]);return /*#__PURE__*/_jsx(MotionConfigContext.Provider,{value:contextValue,children:children});};const humanReadableVariantMap={\"card-ar\":\"Dof_xgp7J\",\"Card-en\":\"EuDaNUbaq\"};const Variants=motion.create(React.Fragment);const getProps=({height,id,todaySOrders,todaySOrders2,width,...props})=>{return{...props,oaJWCnlhG:todaySOrders2??props.oaJWCnlhG??\"18\",variant:humanReadableVariantMap[props.variant]??props.variant??\"EuDaNUbaq\",zDMAokxMu:todaySOrders??props.zDMAokxMu??\"Today's Orders\"};};const createLayoutDependency=(props,variants)=>{if(props.layoutDependency)return variants.join(\"-\")+props.layoutDependency;return variants.join(\"-\");};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const fallbackRef=useRef(null);const refBinding=ref??fallbackRef;const defaultLayoutId=React.useId();const{activeLocale,setLocale}=useLocaleInfo();const componentViewport=useComponentViewport();const{style,className,layoutId,variant,zDMAokxMu,oaJWCnlhG,...restProps}=getProps(props);const{baseVariant,classNames,clearLoadingGesture,gestureHandlers,gestureVariant,isLoading,setGestureState,setVariant,variants}=useVariantState({cycleOrder,defaultVariant:\"EuDaNUbaq\",ref:refBinding,variant,variantClassNames});const layoutDependency=createLayoutDependency(props,variants);const sharedStyleClassNames=[];const scopingClassNames=cx(serializationHash,...sharedStyleClassNames);return /*#__PURE__*/_jsx(LayoutGroup,{id:layoutId??defaultLayoutId,children:/*#__PURE__*/_jsx(Variants,{animate:variants,initial:false,children:/*#__PURE__*/_jsx(Transition,{value:transition1,children:/*#__PURE__*/_jsxs(motion.div,{...restProps,...gestureHandlers,className:cx(scopingClassNames,\"framer-3376tr\",className,classNames),\"data-border\":true,\"data-framer-name\":\"Card-en\",layoutDependency:layoutDependency,layoutId:\"EuDaNUbaq\",ref:refBinding,style:{\"--border-bottom-width\":\"1px\",\"--border-color\":\"rgb(229, 231, 235)\",\"--border-left-width\":\"1px\",\"--border-right-width\":\"1px\",\"--border-style\":\"solid\",\"--border-top-width\":\"1px\",backgroundColor:\"rgb(255, 255, 255)\",borderBottomLeftRadius:14,borderBottomRightRadius:14,borderTopLeftRadius:14,borderTopRightRadius:14,...style},...addPropertyOverrides({Dof_xgp7J:{\"data-framer-name\":\"card-ar\"}},baseVariant,gestureVariant),children:[/*#__PURE__*/_jsx(RichText,{__fromCanvasComponent:true,children:/*#__PURE__*/_jsx(React.Fragment,{children:/*#__PURE__*/_jsx(motion.p,{dir:\"auto\",style:{\"--font-selector\":\"R0Y7SUJNIFBsZXggU2FucyBBcmFiaWMtNTAw\",\"--framer-font-family\":'\"IBM Plex Sans Arabic\", \"IBM Plex Sans Arabic Placeholder\", sans-serif',\"--framer-font-size\":\"13px\",\"--framer-font-weight\":\"500\",\"--framer-text-color\":\"var(--extracted-r6o4lv, rgb(17, 24, 39))\"},children:\"طلبات اليوم\"})}),className:\"framer-rb9xw1\",\"data-framer-name\":\"Card Label\",fonts:[\"GF;IBM Plex Sans Arabic-500\"],layoutDependency:layoutDependency,layoutId:\"VXa4BxObW\",style:{\"--extracted-r6o4lv\":\"rgb(17, 24, 39)\"},text:zDMAokxMu,verticalAlignment:\"top\",withExternalLayout:true}),/*#__PURE__*/_jsx(RichText,{__fromCanvasComponent:true,children:/*#__PURE__*/_jsx(React.Fragment,{children:/*#__PURE__*/_jsx(motion.p,{dir:\"auto\",style:{\"--font-selector\":\"R0Y7SUJNIFBsZXggU2FucyBBcmFiaWMtNzAw\",\"--framer-font-family\":'\"IBM Plex Sans Arabic\", \"IBM Plex Sans Arabic Placeholder\", sans-serif',\"--framer-font-size\":\"20px\",\"--framer-font-weight\":\"700\",\"--framer-line-height\":\"1em\",\"--framer-text-color\":\"var(--extracted-r6o4lv, rgb(0, 95, 115))\"},children:\"18\"})}),className:\"framer-a5v9h6\",\"data-framer-name\":\"Card Value\",fonts:[\"GF;IBM Plex Sans Arabic-700\"],layoutDependency:layoutDependency,layoutId:\"kWpbhaWaX\",style:{\"--extracted-r6o4lv\":\"rgb(0, 95, 115)\"},text:oaJWCnlhG,verticalAlignment:\"top\",withExternalLayout:true,...addPropertyOverrides({Dof_xgp7J:{children:/*#__PURE__*/_jsx(React.Fragment,{children:/*#__PURE__*/_jsx(motion.p,{dir:\"auto\",style:{\"--font-selector\":\"R0Y7SUJNIFBsZXggU2FucyBBcmFiaWMtNzAw\",\"--framer-font-family\":'\"IBM Plex Sans Arabic\", \"IBM Plex Sans Arabic Placeholder\", sans-serif',\"--framer-font-size\":\"20px\",\"--framer-font-weight\":\"700\",\"--framer-line-height\":\"1em\",\"--framer-text-alignment\":\"end\",\"--framer-text-color\":\"var(--extracted-r6o4lv, rgb(0, 95, 115))\"},children:\"18\"})})}},baseVariant,gestureVariant)})]})})})});});const css=[\".framer-YXAew.framer-17m7067, .framer-YXAew .framer-17m7067 { display: block; }\",\".framer-YXAew.framer-3376tr { align-content: flex-start; align-items: flex-start; display: flex; flex-direction: column; flex-wrap: nowrap; gap: 8px; height: min-content; justify-content: flex-start; overflow: var(--overflow-clip-fallback, clip); padding: 18px; position: relative; width: 360px; will-change: var(--framer-will-change-override, transform); }\",\".framer-YXAew .framer-rb9xw1, .framer-YXAew .framer-a5v9h6 { flex: none; height: auto; position: relative; white-space: pre-wrap; width: 100%; word-break: break-word; word-wrap: break-word; }\",\".framer-YXAew.framer-v-n41cnf.framer-3376tr { align-content: flex-end; align-items: flex-end; }\",'.framer-YXAew[data-border=\"true\"]::after, .framer-YXAew [data-border=\"true\"]::after { content: \"\"; border-width: var(--border-top-width, 0) var(--border-right-width, 0) var(--border-bottom-width, 0) var(--border-left-width, 0); border-color: var(--border-color, none); border-style: var(--border-style, none); width: 100%; height: 100%; position: absolute; box-sizing: border-box; left: 0; top: 0; border-radius: inherit; corner-shape: inherit; pointer-events: none; }'];/**\n * This is a generated Framer component.\n * @framerIntrinsicHeight 80\n * @framerIntrinsicWidth 360\n * @framerCanvasComponentVariantDetails {\"propertyName\":\"variant\",\"data\":{\"default\":{\"layout\":[\"fixed\",\"auto\"]},\"Dof_xgp7J\":{\"layout\":[\"fixed\",\"auto\"]}}}\n * @framerVariables {\"zDMAokxMu\":\"todaySOrders\",\"oaJWCnlhG\":\"todaySOrders2\"}\n * @framerImmutableVariables true\n * @framerDisplayContentsDiv false\n * @framerAutoSizeImages true\n * @framerComponentViewportWidth true\n * @framerColorSyntax true\n */const Framera9gD_d9TW=withCSS(Component,css,\"framer-YXAew\");export default Framera9gD_d9TW;Framera9gD_d9TW.displayName=\"Data Card\";Framera9gD_d9TW.defaultProps={height:80,width:360};addPropertyControls(Framera9gD_d9TW,{variant:{options:[\"EuDaNUbaq\",\"Dof_xgp7J\"],optionTitles:[\"Card-en\",\"card-ar\"],title:\"Variant\",type:ControlType.Enum},zDMAokxMu:{defaultValue:\"Today's Orders\",title:\"Today's Orders\",type:ControlType.String},onzDMAokxMuChange:{changes:\"zDMAokxMu\",type:ControlType.ChangeHandler},oaJWCnlhG:{defaultValue:\"18\",title:\"Today's Orders 2\",type:ControlType.String},onoaJWCnlhGChange:{changes:\"oaJWCnlhG\",type:ControlType.ChangeHandler}});addFonts(Framera9gD_d9TW,[{explicitInter:true,fonts:[{cssFamilyName:\"IBM Plex Sans Arabic\",source:\"google\",style:\"normal\",uiFamilyName:\"IBM Plex Sans Arabic\",url:\"https://fonts.gstatic.com/s/ibmplexsansarabic/v15/Qw3NZRtWPQCuHme67tEYUIx3Kh0PHR9N6YPO_9CWVsVJKxTs.woff2\",weight:\"500\"},{cssFamilyName:\"IBM Plex Sans Arabic\",source:\"google\",style:\"normal\",uiFamilyName:\"IBM Plex Sans Arabic\",url:\"https://fonts.gstatic.com/s/ibmplexsansarabic/v15/Qw3NZRtWPQCuHme67tEYUIx3Kh0PHR9N6YOG-dCWVsVJKxTs.woff2\",weight:\"700\"}]}],{supportsExplicitInterCodegen:true});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Framera9gD_d9TW\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"80\",\"framerDisplayContentsDiv\":\"false\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"360\",\"framerImmutableVariables\":\"true\",\"framerAutoSizeImages\":\"true\",\"framerVariables\":\"{\\\"zDMAokxMu\\\":\\\"todaySOrders\\\",\\\"oaJWCnlhG\\\":\\\"todaySOrders2\\\"}\",\"framerColorSyntax\":\"true\",\"framerComponentViewportWidth\":\"true\",\"framerCanvasComponentVariantDetails\":\"{\\\"propertyName\\\":\\\"variant\\\",\\\"data\\\":{\\\"default\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"auto\\\"]},\\\"Dof_xgp7J\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"auto\\\"]}}}\"}},\"Props\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./a9gD_d9TW.map","// Generated by Framer (e0809aa)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addFonts,addPropertyControls,ControlType,cx,RichText,useComponentViewport,useLocaleInfo,useVariantState,withCSS}from\"framer\";import{LayoutGroup,motion,MotionConfigContext}from\"framer-motion\";import*as React from\"react\";import{useRef}from\"react\";const cycleOrder=[\"hcfHyhza9\",\"iX1FblZty\"];const serializationHash=\"framer-Efub3\";const variantClassNames={hcfHyhza9:\"framer-v-e8kptb\",iX1FblZty:\"framer-v-1t3zp37\"};function addPropertyOverrides(overrides,...variants){const nextOverrides={};variants?.forEach(variant=>variant&&Object.assign(nextOverrides,overrides[variant]));return nextOverrides;}const transition1={bounce:.2,delay:0,duration:.4,type:\"spring\"};const Transition=({value,children})=>{const config=React.useContext(MotionConfigContext);const transition=value??config.transition;const contextValue=React.useMemo(()=>({...config,transition}),[JSON.stringify(transition)]);return /*#__PURE__*/_jsx(MotionConfigContext.Provider,{value:contextValue,children:children});};const humanReadableVariantMap={\"variant-ar\":\"iX1FblZty\",Primary:\"hcfHyhza9\"};const Variants=motion.create(React.Fragment);const getProps=({height,id,width,...props})=>{return{...props,variant:humanReadableVariantMap[props.variant]??props.variant??\"hcfHyhza9\"};};const createLayoutDependency=(props,variants)=>{if(props.layoutDependency)return variants.join(\"-\")+props.layoutDependency;return variants.join(\"-\");};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const fallbackRef=useRef(null);const refBinding=ref??fallbackRef;const defaultLayoutId=React.useId();const{activeLocale,setLocale}=useLocaleInfo();const componentViewport=useComponentViewport();const{style,className,layoutId,variant,...restProps}=getProps(props);const{baseVariant,classNames,clearLoadingGesture,gestureHandlers,gestureVariant,isLoading,setGestureState,setVariant,variants}=useVariantState({cycleOrder,defaultVariant:\"hcfHyhza9\",ref:refBinding,variant,variantClassNames});const layoutDependency=createLayoutDependency(props,variants);const sharedStyleClassNames=[];const scopingClassNames=cx(serializationHash,...sharedStyleClassNames);return /*#__PURE__*/_jsx(LayoutGroup,{id:layoutId??defaultLayoutId,children:/*#__PURE__*/_jsx(Variants,{animate:variants,initial:false,children:/*#__PURE__*/_jsx(Transition,{value:transition1,children:/*#__PURE__*/_jsx(motion.div,{...restProps,...gestureHandlers,className:cx(scopingClassNames,\"framer-e8kptb\",className,classNames),\"data-framer-name\":\"Primary\",layoutDependency:layoutDependency,layoutId:\"hcfHyhza9\",ref:refBinding,style:{backgroundColor:\"rgb(10, 147, 150)\",borderBottomLeftRadius:10,borderBottomRightRadius:10,borderTopLeftRadius:10,borderTopRightRadius:10,...style},...addPropertyOverrides({iX1FblZty:{\"data-framer-name\":\"variant-ar\"}},baseVariant,gestureVariant),children:/*#__PURE__*/_jsx(RichText,{__fromCanvasComponent:true,children:/*#__PURE__*/_jsx(React.Fragment,{children:/*#__PURE__*/_jsx(motion.p,{dir:\"auto\",style:{\"--font-selector\":\"R0Y7SUJNIFBsZXggU2Fucy02MDA=\",\"--framer-font-family\":'\"IBM Plex Sans\", \"IBM Plex Sans Placeholder\", sans-serif',\"--framer-font-size\":\"14px\",\"--framer-font-weight\":\"600\",\"--framer-line-height\":\"1em\",\"--framer-text-color\":\"var(--extracted-r6o4lv, rgb(255, 255, 255))\"},children:\"Try an order — upload screenshots\"})}),className:\"framer-h7rgn1\",\"data-framer-name\":\"Button Label\",fonts:[\"GF;IBM Plex Sans-600\"],layoutDependency:layoutDependency,layoutId:\"wG5WZ_gO1\",style:{\"--extracted-r6o4lv\":\"rgb(255, 255, 255)\"},verticalAlignment:\"top\",withExternalLayout:true,...addPropertyOverrides({iX1FblZty:{children:/*#__PURE__*/_jsx(React.Fragment,{children:/*#__PURE__*/_jsx(motion.p,{dir:\"auto\",style:{\"--font-selector\":\"R0Y7SUJNIFBsZXggU2FucyBBcmFiaWMtNjAw\",\"--framer-font-family\":'\"IBM Plex Sans Arabic\", \"IBM Plex Sans Arabic Placeholder\", sans-serif',\"--framer-font-size\":\"14px\",\"--framer-font-weight\":\"600\",\"--framer-line-height\":\"1em\",\"--framer-text-alignment\":\"end\",\"--framer-text-color\":\"var(--extracted-r6o4lv, rgb(255, 255, 255))\"},children:\"جرّب طلبًا — حمّل لقطات الشاشة\"})}),fonts:[\"GF;IBM Plex Sans Arabic-600\"]}},baseVariant,gestureVariant)})})})})});});const css=[\".framer-Efub3.framer-rge4zr, .framer-Efub3 .framer-rge4zr { display: block; }\",\".framer-Efub3.framer-e8kptb { align-content: center; align-items: center; cursor: pointer; display: flex; flex-direction: row; flex-wrap: nowrap; gap: 10px; height: min-content; justify-content: center; overflow: var(--overflow-clip-fallback, clip); padding: 12px 18px 12px 18px; position: relative; width: min-content; will-change: var(--framer-will-change-override, transform); }\",\".framer-Efub3 .framer-h7rgn1 { flex: none; height: auto; position: relative; white-space: pre; width: auto; }\"];/**\n * This is a generated Framer component.\n * @framerIntrinsicHeight 38\n * @framerIntrinsicWidth 259\n * @framerCanvasComponentVariantDetails {\"propertyName\":\"variant\",\"data\":{\"default\":{\"layout\":[\"auto\",\"auto\"]},\"iX1FblZty\":{\"layout\":[\"auto\",\"auto\"]}}}\n * @framerImmutableVariables true\n * @framerDisplayContentsDiv false\n * @framerAutoSizeImages true\n * @framerComponentViewportWidth true\n * @framerColorSyntax true\n */const FramerttyDThvlj=withCSS(Component,css,\"framer-Efub3\");export default FramerttyDThvlj;FramerttyDThvlj.displayName=\"Primary Button\";FramerttyDThvlj.defaultProps={height:38,width:259};addPropertyControls(FramerttyDThvlj,{variant:{options:[\"hcfHyhza9\",\"iX1FblZty\"],optionTitles:[\"Primary\",\"variant-ar\"],title:\"Variant\",type:ControlType.Enum}});addFonts(FramerttyDThvlj,[{explicitInter:true,fonts:[{cssFamilyName:\"IBM Plex Sans\",source:\"google\",style:\"normal\",uiFamilyName:\"IBM Plex Sans\",url:\"https://fonts.gstatic.com/s/ibmplexsans/v23/zYXGKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1swZSAXcomDVmadSDNF5zBaI5loa26g.woff2\",weight:\"600\"},{cssFamilyName:\"IBM Plex Sans Arabic\",source:\"google\",style:\"normal\",uiFamilyName:\"IBM Plex Sans Arabic\",url:\"https://fonts.gstatic.com/s/ibmplexsansarabic/v15/Qw3NZRtWPQCuHme67tEYUIx3Kh0PHR9N6YPi-NCWVsVJKxTs.woff2\",weight:\"600\"}]}],{supportsExplicitInterCodegen:true});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FramerttyDThvlj\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"259\",\"framerIntrinsicHeight\":\"38\",\"framerColorSyntax\":\"true\",\"framerContractVersion\":\"1\",\"framerDisplayContentsDiv\":\"false\",\"framerAutoSizeImages\":\"true\",\"framerImmutableVariables\":\"true\",\"framerComponentViewportWidth\":\"true\",\"framerCanvasComponentVariantDetails\":\"{\\\"propertyName\\\":\\\"variant\\\",\\\"data\\\":{\\\"default\\\":{\\\"layout\\\":[\\\"auto\\\",\\\"auto\\\"]},\\\"iX1FblZty\\\":{\\\"layout\\\":[\\\"auto\\\",\\\"auto\\\"]}}}\"}},\"Props\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ttyDThvlj.map","// Drawing Canvas component for Framer with mouse/touch support, multiple tools, undo history, and auto-save\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useRef,useEffect,useState,useCallback,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";// Phosphor Icons (SVG paths)\nconst Icons={Pen:/*#__PURE__*/_jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 256 256\",fill:\"currentColor\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152.05A15.89,15.89,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.88,15.88,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z\"})}),Eraser:/*#__PURE__*/_jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"20\",height:\"20\",fill:\"currentColor\",viewBox:\"0 0 256 256\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M225,80.4,183.6,39a24,24,0,0,0-33.94,0L31,157.66a24,24,0,0,0,0,33.94l30.06,30.06A8,8,0,0,0,66.74,224H216a8,8,0,0,0,0-16h-84.7L225,114.34A24,24,0,0,0,225,80.4ZM108.68,208H70.05L42.33,180.28a8,8,0,0,1,0-11.31L96,115.31,148.69,168Zm105-105L160,156.69,107.31,104,161,50.34a8,8,0,0,1,11.32,0l41.38,41.38a8,8,0,0,1,0,11.31Z\"})}),Line:/*#__PURE__*/_jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"20\",height:\"20\",fill:\"currentColor\",viewBox:\"0 0 256 256\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M214.64,41.36a32,32,0,0,0-50.2,38.89L80.25,164.44a32.06,32.06,0,0,0-38.89,4.94h0a32,32,0,1,0,50.2,6.37l84.19-84.19a32,32,0,0,0,38.89-50.2Zm-139.33,162a16,16,0,0,1-22.64-22.64h0a16,16,0,0,1,22.63,0h0A16,16,0,0,1,75.31,203.33Zm128-128a16,16,0,1,1,0-22.63A16,16,0,0,1,203.33,75.3Z\"})}),Rectangle:/*#__PURE__*/_jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"20\",height:\"20\",fill:\"currentColor\",viewBox:\"0 0 256 256\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,160H40V56H216V200Z\"})}),Circle:/*#__PURE__*/_jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 256 256\",fill:\"currentColor\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Z\"})}),Grid:/*#__PURE__*/_jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"20\",height:\"20\",fill:\"currentColor\",viewBox:\"0 0 256 256\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,80H136V56h64ZM120,56v64H56V56ZM56,136h64v64H56Zm144,64H136V136h64v64Z\"})}),Undo:/*#__PURE__*/_jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"20\",height:\"20\",fill:\"currentColor\",viewBox:\"0 0 256 256\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z\"})}),Redo:/*#__PURE__*/_jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"20\",height:\"20\",fill:\"currentColor\",viewBox:\"0 0 256 256\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H184.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z\"})}),Trash:/*#__PURE__*/_jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"20\",height:\"20\",fill:\"currentColor\",viewBox:\"0 0 256 256\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40V48H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z\"})}),Download:/*#__PURE__*/_jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"16\",height:\"16\",fill:\"currentColor\",viewBox:\"0 0 256 256\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z\"})})};var ToolType;(function(ToolType){ToolType[\"Pen\"]=\"pen\";ToolType[\"Eraser\"]=\"eraser\";ToolType[\"Line\"]=\"line\";ToolType[\"Rectangle\"]=\"rect\";ToolType[\"Circle\"]=\"circle\";})(ToolType||(ToolType={}));/**\n * Drawing Canvas\n *\n * @framerIntrinsicWidth 600\n * @framerIntrinsicHeight 400\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */function DrawingCanvas(props){const{sourceId,onDrawingSave,eraserWidth=20,backgroundColor=\"#FFFFFF\",showToolbar=true,customizeToolbar=false,toolbarBackground=\"#F4F6F8\",toolbarTextColor=\"#111827\",toolbarPosition=\"bottom\",toolbarAlignment=\"center\",toolbarFixed=false,panMode=false,enableAutoSave=true,saveLanguage=\"en\",enableCustomIcons=false,showToolPen=true,showToolEraser=true,showToolLine=true,showToolRectangle=true,showToolCircle=true,showToolColor=true,showToolWidth=true,showToolGrid=true,showToolExport=true,showToolUndo=true,showToolRedo=true,showToolClear=true}=props;const canvasRef=useRef(null);const contextRef=useRef(null);const[isDrawing,setIsDrawing]=useState(false);const lastPointRef=useRef({x:0,y:0});const startPointRef=useRef({x:0,y:0});const historyRef=useRef([]);const redoStackRef=useRef([]);const saveTimeoutRef=useRef(null);const tempImageDataRef=useRef(null);const cursorRef=useRef(null);const initialSizeRef=useRef(null);// Add state for user-controlled settings\nconst[currentTool,setCurrentTool]=useState(\"pen\");const[currentPenColor,setCurrentPenColor]=useState(\"#00B8B0\");const[currentPenWidth,setCurrentPenWidth]=useState(4);const[showGrid,setShowGrid]=useState(props.enableGrid);const[saveTransparent,setSaveTransparent]=useState(false);const[isToolDropdownOpen,setIsToolDropdownOpen]=useState(false);const[isWidthDropdownOpen,setIsWidthDropdownOpen]=useState(false);const[isExportDropdownOpen,setIsExportDropdownOpen]=useState(false);const[historyVersion,setHistoryVersion]=useState(0);const[isCursorVisible,setIsCursorVisible]=useState(false);const[saveStatus,setSaveStatus]=useState(\"ready\");const STORAGE_KEY=props.storageKey||\"framer-drawing-canvas\";const MAX_HISTORY=20;const SAVE_DEBOUNCE=1e3;useEffect(()=>{setShowGrid(props.enableGrid);},[props.enableGrid]);useEffect(()=>{const canvas=canvasRef.current;if(!canvas)return;const context=canvas.getContext(\"2d\");if(!context)return;const rect=canvas.getBoundingClientRect();const dpr=Math.min(window.devicePixelRatio,2);// Store initial size if not set\nif(!initialSizeRef.current){initialSizeRef.current={width:rect.width,height:rect.height};}canvas.width=rect.width*dpr;canvas.height=rect.height*dpr;context.scale(dpr,dpr);context.lineCap=\"round\";context.lineJoin=\"round\";contextRef.current=context;const savedDrawing=enableAutoSave&&typeof window!==\"undefined\"?localStorage.getItem(STORAGE_KEY):null;if(savedDrawing){const img=new Image;img.onload=()=>{context.clearRect(0,0,rect.width,rect.height);context.drawImage(img,0,0,rect.width,rect.height);saveToHistory();setSaveStatus(\"saved\");};img.src=savedDrawing;}else{saveToHistory();}return()=>{if(saveTimeoutRef.current){clearTimeout(saveTimeoutRef.current);}};},[]);// Add resize handler to scale existing content\nuseEffect(()=>{const canvas=canvasRef.current;if(!canvas)return;const handleResize=()=>{const context=contextRef.current;if(!context||historyRef.current.length===0)return;const rect=canvas.getBoundingClientRect();const dpr=Math.min(window.devicePixelRatio,2);// Save current drawing\nconst currentDrawing=historyRef.current[historyRef.current.length-1];// Resize canvas\ncanvas.width=rect.width*dpr;canvas.height=rect.height*dpr;context.scale(dpr,dpr);context.lineCap=\"round\";context.lineJoin=\"round\";// Redraw scaled content\nif(currentDrawing){const img=new Image;img.onload=()=>{context.drawImage(img,0,0,rect.width,rect.height);};img.src=currentDrawing;}};const resizeObserver=new ResizeObserver(handleResize);resizeObserver.observe(canvas.parentElement??canvas);return()=>{resizeObserver.disconnect();};},[]);const saveToHistory=useCallback(()=>{const canvas=canvasRef.current;if(!canvas)return;try{const dataUrl=canvas.toDataURL();historyRef.current.push(dataUrl);// Clear redo stack when new action is performed\nredoStackRef.current=[];setHistoryVersion(v=>v+1);if(historyRef.current.length>MAX_HISTORY){historyRef.current.shift();}}catch(e){console.warn(\"Failed to save to history:\",e);}},[]);const redrawCanvas=useCallback(dataUrl=>{const canvas=canvasRef.current;const context=contextRef.current;if(!canvas||!context)return;const rect=canvas.getBoundingClientRect();context.clearRect(0,0,rect.width,rect.height);const img=new Image;img.onload=()=>{context.drawImage(img,0,0,rect.width,rect.height);};img.src=dataUrl;},[]);const handleSave=format=>{const canvas=canvasRef.current;if(!canvas)return;const tempCanvas=document.createElement(\"canvas\");tempCanvas.width=canvas.width;tempCanvas.height=canvas.height;const ctx=tempCanvas.getContext(\"2d\");if(!ctx)return;if(!saveTransparent){ctx.fillStyle=backgroundColor;ctx.fillRect(0,0,tempCanvas.width,tempCanvas.height);}ctx.drawImage(canvas,0,0);const link=document.createElement(\"a\");link.download=`drawing.${format}`;if(format===\"png\"){link.href=tempCanvas.toDataURL(\"image/png\");link.click();}else{const dataUrl=tempCanvas.toDataURL(\"image/png\");const svg=`<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"${canvas.width}\" height=\"${canvas.height}\"><image href=\"${dataUrl}\" width=\"${canvas.width}\" height=\"${canvas.height}\" /></svg>`;const blob=new Blob([svg],{type:\"image/svg+xml\"});link.href=URL.createObjectURL(blob);link.click();}setIsExportDropdownOpen(false);};const debouncedSave=useCallback(()=>{if(!enableAutoSave||typeof window===\"undefined\")return;const canvas=canvasRef.current;if(!canvas)return;setSaveStatus(\"saving\");try{const dataUrl=canvas.toDataURL();localStorage.setItem(STORAGE_KEY,dataUrl);if(onDrawingSave){Promise.resolve(onDrawingSave(dataUrl,sourceId)).catch(error=>{setSaveStatus(\"error\");console.warn(\"Failed to upload annotation:\",error);});}// This confirms local persistence, not a remote upload.\nsetSaveStatus(\"saved\");}catch(e){setSaveStatus(\"error\");console.warn(\"Failed to save canvas:\",e);}},[enableAutoSave,onDrawingSave,sourceId,STORAGE_KEY]);const getPoint=useCallback(e=>{const canvas=canvasRef.current;if(!canvas)return{x:0,y:0};const rect=canvas.getBoundingClientRect();const clientX=\"touches\"in e?e.touches[0].clientX:e.clientX;const clientY=\"touches\"in e?e.touches[0].clientY:e.clientY;return{x:clientX-rect.left,y:clientY-rect.top};},[]);const drawLine=useCallback((from,to)=>{const context=contextRef.current;if(!context)return;context.beginPath();context.moveTo(from.x,from.y);context.lineTo(to.x,to.y);context.stroke();},[]);const drawShape=useCallback((start,end,shapeType)=>{const context=contextRef.current;if(!context)return;if(tempImageDataRef.current){// Restore synchronously so the completed shape is saved.\ncontext.putImageData(tempImageDataRef.current,0,0);context.beginPath();if(shapeType===\"line\"){context.moveTo(start.x,start.y);context.lineTo(end.x,end.y);context.stroke();}else if(shapeType===\"rect\"){const width=end.x-start.x;const height=end.y-start.y;context.strokeRect(start.x,start.y,width,height);}else if(shapeType===\"circle\"){const radius=Math.sqrt(Math.pow(end.x-start.x,2)+Math.pow(end.y-start.y,2));context.arc(start.x,start.y,radius,0,2*Math.PI);context.stroke();}}},[]);const startDrawing=useCallback(e=>{e.preventDefault();const context=contextRef.current;const canvas=canvasRef.current;if(!context||!canvas)return;const point=getPoint(e);startTransition(()=>setIsDrawing(true));if(enableAutoSave)setSaveStatus(\"saving\");lastPointRef.current=point;startPointRef.current=point;if(currentTool===\"eraser\"){context.globalCompositeOperation=\"destination-out\";context.lineWidth=eraserWidth;}else{context.globalCompositeOperation=\"source-over\";context.strokeStyle=currentPenColor;context.lineWidth=currentPenWidth;}if(currentTool===\"pen\"||currentTool===\"eraser\"){context.beginPath();context.moveTo(point.x,point.y);}else{try{tempImageDataRef.current=context.getImageData(0,0,canvas.width,canvas.height);}catch(e){console.warn(\"Failed to save temp image:\",e);}}},[currentTool,currentPenColor,currentPenWidth,eraserWidth,getPoint,enableAutoSave]);const draw=useCallback(e=>{if(!isDrawing)return;e.preventDefault();const point=getPoint(e);// Ensure context settings are correct during draw as well, just in case\nconst context=contextRef.current;if(context){if(currentTool===\"eraser\"){context.globalCompositeOperation=\"destination-out\";context.lineWidth=eraserWidth;}else{context.globalCompositeOperation=\"source-over\";context.strokeStyle=currentPenColor;context.lineWidth=currentPenWidth;}}if(currentTool===\"pen\"||currentTool===\"eraser\"){drawLine(lastPointRef.current,point);lastPointRef.current=point;}else{drawShape(startPointRef.current,point,currentTool);}},[isDrawing,currentTool,getPoint,drawLine,drawShape,eraserWidth,currentPenColor,currentPenWidth]);const stopDrawing=useCallback(()=>{if(!isDrawing)return;startTransition(()=>setIsDrawing(false));const context=contextRef.current;if(context){context.globalCompositeOperation=\"source-over\";}tempImageDataRef.current=null;saveToHistory();debouncedSave();},[isDrawing,saveToHistory,debouncedSave]);const updateCursorPosition=useCallback(e=>{if(!cursorRef.current)return;const point=getPoint(e);cursorRef.current.style.transform=`translate(${point.x}px, ${point.y}px)`;},[getPoint]);useEffect(()=>{const canvas=canvasRef.current;if(!canvas)return;const handleMouseDown=e=>{startDrawing(e);updateCursorPosition(e);};const handleMouseMove=e=>{draw(e);updateCursorPosition(e);};const handleMouseUp=()=>stopDrawing();const handleMouseLeave=()=>{stopDrawing();setIsCursorVisible(false);};const handleMouseEnter=()=>setIsCursorVisible(true);const handleTouchStart=e=>{startDrawing(e);updateCursorPosition(e);setIsCursorVisible(true);};const handleTouchMove=e=>{draw(e);updateCursorPosition(e);};const handleTouchEnd=()=>{stopDrawing();setIsCursorVisible(false);};canvas.addEventListener(\"mousedown\",handleMouseDown);canvas.addEventListener(\"mousemove\",handleMouseMove);canvas.addEventListener(\"mouseup\",handleMouseUp);canvas.addEventListener(\"mouseleave\",handleMouseLeave);canvas.addEventListener(\"mouseenter\",handleMouseEnter);canvas.addEventListener(\"touchstart\",handleTouchStart,{passive:false});canvas.addEventListener(\"touchmove\",handleTouchMove,{passive:false});canvas.addEventListener(\"touchend\",handleTouchEnd);return()=>{canvas.removeEventListener(\"mousedown\",handleMouseDown);canvas.removeEventListener(\"mousemove\",handleMouseMove);canvas.removeEventListener(\"mouseup\",handleMouseUp);canvas.removeEventListener(\"mouseleave\",handleMouseLeave);canvas.removeEventListener(\"mouseenter\",handleMouseEnter);canvas.removeEventListener(\"touchstart\",handleTouchStart);canvas.removeEventListener(\"touchmove\",handleTouchMove);canvas.removeEventListener(\"touchend\",handleTouchEnd);};},[startDrawing,draw,stopDrawing,updateCursorPosition]);const handleUndo=useCallback(()=>{const context=contextRef.current;const canvas=canvasRef.current;if(!context||!canvas||historyRef.current.length<=1)return;// Pop current state and push to redo stack\nconst currentState=historyRef.current.pop();if(currentState){redoStackRef.current.push(currentState);}const previousState=historyRef.current[historyRef.current.length-1];const rect=canvas.getBoundingClientRect();context.clearRect(0,0,rect.width,rect.height);if(previousState){const img=new Image;img.onload=()=>{context.drawImage(img,0,0,rect.width,rect.height);debouncedSave();};img.src=previousState;}else{debouncedSave();}setHistoryVersion(v=>v+1);},[debouncedSave]);const handleRedo=useCallback(()=>{const context=contextRef.current;const canvas=canvasRef.current;if(!context||!canvas||redoStackRef.current.length===0)return;const nextState=redoStackRef.current.pop();if(nextState){historyRef.current.push(nextState);const rect=canvas.getBoundingClientRect();context.clearRect(0,0,rect.width,rect.height);const img=new Image;img.onload=()=>{context.drawImage(img,0,0,rect.width,rect.height);debouncedSave();};img.src=nextState;setHistoryVersion(v=>v+1);}},[debouncedSave]);const handleClear=useCallback(()=>{const context=contextRef.current;const canvas=canvasRef.current;if(!context||!canvas)return;const rect=canvas.getBoundingClientRect();context.clearRect(0,0,rect.width,rect.height);historyRef.current=[];redoStackRef.current=[];saveToHistory();debouncedSave();},[saveToHistory,debouncedSave]);useEffect(()=>{const handleKeyDown=e=>{if((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===\"z\"){e.preventDefault();if(e.shiftKey){handleRedo();}else{handleUndo();}}else if((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===\"y\"){e.preventDefault();handleRedo();}};window.addEventListener(\"keydown\",handleKeyDown);return()=>window.removeEventListener(\"keydown\",handleKeyDown);},[handleUndo,handleRedo]);const getCursorElement=()=>{const iconSize=24;const getCustomIcon=t=>{if(!enableCustomIcons)return undefined;switch(t){case\"pen\":return props.customIconPen;case\"eraser\":return props.customIconEraser;case\"line\":return props.customIconLine;case\"rect\":return props.customIconRect;case\"circle\":return props.customIconCircle;}};const customIcon=getCustomIcon(currentTool);const customIconSrc=typeof customIcon===\"string\"?customIcon:customIcon?.src;let offsetX=-12;let offsetY=-12;if(currentTool===\"pen\"){offsetX=0;offsetY=-24;}const style={width:iconSize,height:iconSize,transform:`translate(${offsetX}px, ${offsetY}px)`,pointerEvents:\"none\"};if(customIconSrc){return /*#__PURE__*/_jsx(\"img\",{src:customIconSrc,style:style,alt:\"\"});}// Use the SVG paths from Icons object but we need to wrap them\n// The Icons object contains JSX elements. We can clone them or wrap them.\n// But Icons.* are defined as 256x256 viewBox. We want 24x24.\nlet icon=null;switch(currentTool){case\"pen\":icon=Icons.Pen;break;case\"eraser\":icon=Icons.Eraser;break;case\"line\":icon=Icons.Line;break;case\"rect\":icon=Icons.Rectangle;break;case\"circle\":icon=Icons.Circle;break;}return /*#__PURE__*/_jsx(\"div\",{style:{...style,color:currentTool===\"eraser\"?toolbarTextColor:currentPenColor},children:icon});};const getToolIcon=tool=>{const iconSize=20;const style={width:iconSize,height:iconSize};const getSrc=prop=>enableCustomIcons&&(typeof prop===\"string\"?prop:prop?.src);switch(tool){case\"pen\":const penSrc=getSrc(props.customIconPen);return penSrc?/*#__PURE__*/_jsx(\"img\",{src:penSrc,style:style,alt:\"Pen\"}):/*#__PURE__*/_jsx(\"div\",{style:style,children:Icons.Pen});case\"eraser\":const eraserSrc=getSrc(props.customIconEraser);return eraserSrc?/*#__PURE__*/_jsx(\"img\",{src:eraserSrc,style:style,alt:\"Eraser\"}):/*#__PURE__*/_jsx(\"div\",{style:style,children:Icons.Eraser});case\"line\":const lineSrc=getSrc(props.customIconLine);return lineSrc?/*#__PURE__*/_jsx(\"img\",{src:lineSrc,style:style,alt:\"Line\"}):/*#__PURE__*/_jsx(\"div\",{style:style,children:Icons.Line});case\"rect\":const rectSrc=getSrc(props.customIconRect);return rectSrc?/*#__PURE__*/_jsx(\"img\",{src:rectSrc,style:style,alt:\"Rectangle\"}):/*#__PURE__*/_jsx(\"div\",{style:style,children:Icons.Rectangle});case\"circle\":const circleSrc=getSrc(props.customIconCircle);return circleSrc?/*#__PURE__*/_jsx(\"img\",{src:circleSrc,style:style,alt:\"Circle\"}):/*#__PURE__*/_jsx(\"div\",{style:style,children:Icons.Circle});}};const availableTools=[showToolPen&&\"pen\",showToolEraser&&\"eraser\",showToolLine&&\"line\",showToolRectangle&&\"rect\",showToolCircle&&\"circle\"].filter(Boolean);// Ensure current tool is valid\nuseEffect(()=>{if(availableTools.length>0&&!availableTools.includes(currentTool)){setCurrentTool(availableTools[0]);}},[availableTools,currentTool]);const getToolName=tool=>{switch(tool){case\"pen\":return\"Pen\";case\"eraser\":return\"Eraser\";case\"line\":return\"Line\";case\"rect\":return\"Rectangle\";case\"circle\":return\"Circle\";}};const getToolbarStyle=()=>{const baseStyle={position:toolbarFixed?\"fixed\":\"absolute\",backgroundColor:toolbarBackground,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",gap:2,padding:\"3px\",borderRadius:16,boxShadow:\"0 6px 18px rgba(15,23,42,0.06)\",zIndex:toolbarFixed?2147483646:10,maxWidth:\"calc(100vw - 32px)\",maxHeight:\"calc(100dvh - 140px)\",flexWrap:\"nowrap\"};const isVertical=toolbarPosition===\"left\"||toolbarPosition===\"right\";if(isVertical){baseStyle.flexDirection=\"column\";baseStyle.width=\"auto\";baseStyle.padding=\"12px 8px\";if(toolbarPosition===\"left\")baseStyle.left=toolbarFixed?\"max(12px, env(safe-area-inset-left))\":24;else baseStyle.right=toolbarFixed?\"max(12px, env(safe-area-inset-right))\":24;if(toolbarAlignment===\"start\")baseStyle.top=24;else if(toolbarAlignment===\"end\")baseStyle.bottom=24;else{baseStyle.top=\"50%\";baseStyle.transform=\"translateY(-50%)\";}}else{baseStyle.height=\"auto\";if(toolbarPosition===\"top\")baseStyle.top=toolbarFixed?\"max(72px, env(safe-area-inset-top))\":24;else baseStyle.bottom=toolbarFixed?\"calc(98px + env(safe-area-inset-bottom))\":8;if(toolbarAlignment===\"start\")baseStyle.left=24;else if(toolbarAlignment===\"end\")baseStyle.right=24;else{baseStyle.left=\"50%\";baseStyle.transform=\"translateX(-50%)\";}}return baseStyle;};// Helper to determine if we should show the divider\nconst showDivider=(showToolPen||showToolEraser||showToolLine||showToolRectangle||showToolCircle)&&(showToolColor||showToolWidth);return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",flexDirection:\"column\",position:\"relative\",backgroundColor:\"transparent\",fontFamily:'\"IBM Plex Sans\", \"IBM Plex Sans Arabic\", sans-serif'},children:[enableAutoSave&&/*#__PURE__*/_jsxs(\"div\",{role:\"status\",\"aria-live\":\"polite\",dir:saveLanguage===\"ar\"?\"rtl\":\"ltr\",title:saveLanguage===\"ar\"?\"تُحفظ العلامات على هذا الجهاز\":\"Drawings are saved on this device\",style:{position:\"absolute\",top:\"max(8px, env(safe-area-inset-top))\",...showToolbar&&(toolbarPosition===\"right\"||toolbarPosition===\"top\"&&toolbarAlignment===\"end\")?{left:\"max(8px, env(safe-area-inset-left))\"}:{right:\"max(8px, env(safe-area-inset-right))\"},zIndex:12,display:\"flex\",alignItems:\"center\",gap:6,maxWidth:\"calc(100% - 16px)\",padding:\"7px 10px\",borderRadius:999,background:\"rgba(255,255,255,0.96)\",color:saveStatus===\"error\"?\"#B42318\":\"#087F83\",border:\"1px solid #D8E3E6\",boxShadow:\"0 2px 8px rgba(15,23,42,0.12)\",fontSize:11,fontWeight:700,lineHeight:1.4,pointerEvents:\"none\"},children:[/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{fontSize:14},children:saveStatus===\"saved\"?\"✓\":saveStatus===\"error\"?\"!\":\"◌\"}),/*#__PURE__*/_jsx(\"span\",{children:saveLanguage===\"ar\"?saveStatus===\"saved\"?\"محفوظ على هذا الجهاز\":saveStatus===\"error\"?\"تعذّر الحفظ\":saveStatus===\"saving\"?\"جارٍ الحفظ…\":\"الحفظ التلقائي مفعّل\":saveStatus===\"saved\"?\"Saved on this device\":saveStatus===\"error\"?\"Save failed\":saveStatus===\"saving\"?\"Saving…\":\"Auto-save on\"})]}),showGrid&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,right:0,bottom:0,pointerEvents:\"none\",backgroundImage:`\n                            linear-gradient(to right, ${props.gridColor} 1px, transparent 1px),\n                            linear-gradient(to bottom, ${props.gridColor} 1px, transparent 1px)\n                        `,backgroundSize:`${props.gridSize}px ${props.gridSize}px`,opacity:.3,zIndex:0}}),/*#__PURE__*/_jsx(\"canvas\",{ref:canvasRef,style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",touchAction:panMode?\"auto\":\"none\",zIndex:1,pointerEvents:panMode?\"none\":\"auto\",cursor:panMode?\"grab\":\"none\",overflow:\"hidden\",borderRadius:\"inherit\"},\"aria-label\":\"Drawing canvas\"}),/*#__PURE__*/_jsx(\"div\",{ref:cursorRef,style:{position:\"absolute\",top:0,left:0,pointerEvents:\"none\",zIndex:9999,display:isCursorVisible?\"block\":\"none\",// We will set content via React state or just render based on currentTool\nwillChange:\"transform\"},children:getCursorElement()}),showToolbar&&/*#__PURE__*/_jsxs(\"div\",{style:getToolbarStyle(),children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:toolbarPosition===\"left\"||toolbarPosition===\"right\"?\"column\":\"row\",alignItems:\"center\",gap:4},children:[availableTools.length>0&&/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\"},children:[/*#__PURE__*/_jsx(\"button\",{onClick:()=>setIsToolDropdownOpen(!isToolDropdownOpen),style:{display:\"flex\",alignItems:\"center\",justifyContent:\"center\",gap:4,padding:0,backgroundColor:\"#E6F4F5\",border:\"none\",borderRadius:12,cursor:\"pointer\",color:toolbarTextColor,fontSize:14,fontWeight:600,minWidth:36,height:36},children:getToolIcon(currentTool)}),isToolDropdownOpen&&/*#__PURE__*/_jsx(_Fragment,{children:/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",bottom:toolbarPosition===\"bottom\"?\"100%\":\"auto\",top:toolbarPosition===\"top\"?\"100%\":\"auto\",left:toolbarPosition===\"left\"?\"100%\":toolbarPosition===\"right\"?\"auto\":\"50%\",right:toolbarPosition===\"right\"?\"100%\":toolbarPosition===\"left\"?\"auto\":\"auto\",transform:toolbarPosition===\"left\"||toolbarPosition===\"right\"?\"none\":\"translateX(-50%)\",marginBottom:toolbarPosition===\"bottom\"?12:0,marginTop:toolbarPosition===\"top\"?12:0,marginLeft:toolbarPosition===\"left\"?12:0,marginRight:toolbarPosition===\"right\"?12:0,backgroundColor:\"#FFFFFF\",border:\"1px solid #E5E7EB\",borderRadius:12,boxShadow:\"0 8px 24px rgba(15,23,42,0.08)\",zIndex:11,minWidth:160,overflow:\"hidden\",padding:4,display:\"flex\",flexDirection:\"column\",gap:2},children:availableTools.map(tool=>/*#__PURE__*/_jsxs(\"button\",{onClick:()=>{startTransition(()=>setCurrentTool(tool));setIsToolDropdownOpen(false);},style:{display:\"flex\",alignItems:\"center\",gap:12,width:\"100%\",padding:\"8px 12px\",border:\"none\",borderRadius:8,background:currentTool===tool?\"#E6F4F5\":\"transparent\",cursor:\"pointer\",textAlign:\"left\",color:toolbarTextColor,fontSize:14,fontWeight:500},children:[getToolIcon(tool),getToolName(tool)]},tool))})})]}),showDivider&&/*#__PURE__*/_jsx(\"div\",{style:{width:toolbarPosition===\"left\"||toolbarPosition===\"right\"?\"100%\":1,height:toolbarPosition===\"left\"||toolbarPosition===\"right\"?1:24,backgroundColor:\"#E5E7EB\",margin:toolbarPosition===\"left\"||toolbarPosition===\"right\"?\"4px 0\":\"0 4px\"}}),currentTool!==\"eraser\"&&/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:toolbarPosition===\"left\"||toolbarPosition===\"right\"?\"column\":\"row\",alignItems:\"center\",gap:12},title:\"Color\",children:[showToolColor&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:24,height:24,borderRadius:\"50%\",backgroundColor:currentPenColor,border:\"2px solid #FFFFFF\",boxShadow:\"0 0 0 1px rgba(10, 147, 150, 0.25), 0 0 6px rgba(0, 184, 176, 0.65), 0 0 14px rgba(148, 210, 189, 0.45)\",cursor:\"pointer\"},title:\"Color\",children:/*#__PURE__*/_jsx(\"input\",{type:\"color\",value:currentPenColor,onChange:e=>startTransition(()=>setCurrentPenColor(e.target.value)),style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",opacity:0,cursor:\"pointer\"}})}),showToolWidth&&/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\"},children:[/*#__PURE__*/_jsx(\"button\",{onClick:()=>setIsWidthDropdownOpen(!isWidthDropdownOpen),style:{display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\",gap:4,backgroundColor:\"#F4F6F8\",padding:0,borderRadius:12,width:36,height:36,border:\"none\",cursor:\"pointer\"},title:\"Stroke Width\",children:/*#__PURE__*/_jsx(\"div\",{style:{width:Math.min(16,Math.max(4,currentPenWidth/1.5)),height:Math.min(16,Math.max(4,currentPenWidth/1.5)),borderRadius:\"50%\",backgroundColor:toolbarTextColor}})}),isWidthDropdownOpen&&/*#__PURE__*/_jsxs(\"div\",{style:{position:\"absolute\",bottom:toolbarPosition===\"bottom\"?\"100%\":\"auto\",top:toolbarPosition===\"top\"?\"100%\":\"auto\",left:toolbarPosition===\"left\"?\"100%\":toolbarPosition===\"right\"?\"auto\":\"50%\",right:toolbarPosition===\"right\"?\"100%\":toolbarPosition===\"left\"?\"auto\":\"auto\",transform:toolbarPosition===\"left\"||toolbarPosition===\"right\"?\"none\":\"translateX(-50%)\",marginBottom:toolbarPosition===\"bottom\"?12:0,marginTop:toolbarPosition===\"top\"?12:0,marginLeft:toolbarPosition===\"left\"?12:0,marginRight:toolbarPosition===\"right\"?12:0,backgroundColor:\"#FFFFFF\",border:\"1px solid #E5E7EB\",borderRadius:12,boxShadow:\"0 8px 24px rgba(15,23,42,0.08)\",zIndex:11,minWidth:160,padding:16,display:\"flex\",flexDirection:\"column\",gap:8,alignItems:\"center\"},children:[/*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",display:\"flex\",justifyContent:\"space-between\",alignItems:\"center\",fontSize:12,color:\"#64748B\",fontWeight:500},children:[/*#__PURE__*/_jsx(\"span\",{children:\"Size\"}),/*#__PURE__*/_jsxs(\"span\",{children:[currentPenWidth,\"px\"]})]}),/*#__PURE__*/_jsx(\"input\",{type:\"range\",min:\"1\",max:\"50\",value:currentPenWidth,onChange:e=>startTransition(()=>setCurrentPenWidth(Number(e.target.value))),style:{width:\"100%\",cursor:\"pointer\",accentColor:\"#0A9396\"}})]})]})]})]}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:toolbarPosition===\"left\"||toolbarPosition===\"right\"?\"column\":\"row\",alignItems:\"center\",gap:8},children:[props.enableGrid&&showToolGrid&&/*#__PURE__*/_jsx(\"button\",{onClick:()=>startTransition(()=>setShowGrid(!showGrid)),style:{padding:0,backgroundColor:showGrid?\"#E6F4F5\":\"transparent\",color:toolbarTextColor,border:\"none\",borderRadius:12,cursor:\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",width:36,height:36},title:\"Toggle Grid\",\"aria-label\":\"Toggle grid\",\"aria-pressed\":showGrid,children:/*#__PURE__*/_jsx(\"div\",{style:{width:20,height:20},children:Icons.Grid})}),showToolExport&&/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\"},children:[/*#__PURE__*/_jsx(\"button\",{onClick:()=>setIsExportDropdownOpen(!isExportDropdownOpen),style:{padding:0,backgroundColor:isExportDropdownOpen?\"#E6F4F5\":\"#F4F6F8\",border:\"none\",borderRadius:12,cursor:\"pointer\",color:toolbarTextColor,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",width:36,height:36},children:/*#__PURE__*/_jsx(\"div\",{style:{width:16,height:16},children:Icons.Download})}),isExportDropdownOpen&&/*#__PURE__*/_jsxs(\"div\",{style:{position:\"absolute\",bottom:toolbarPosition===\"bottom\"?\"100%\":\"auto\",top:toolbarPosition===\"top\"?\"100%\":\"auto\",left:toolbarPosition===\"left\"?\"100%\":toolbarPosition===\"right\"?\"auto\":\"50%\",right:toolbarPosition===\"right\"?\"100%\":toolbarPosition===\"left\"?\"auto\":\"auto\",transform:toolbarPosition===\"left\"||toolbarPosition===\"right\"?\"none\":\"translateX(-50%)\",marginBottom:toolbarPosition===\"bottom\"?12:0,marginTop:toolbarPosition===\"top\"?12:0,marginLeft:toolbarPosition===\"left\"?12:0,marginRight:toolbarPosition===\"right\"?12:0,backgroundColor:\"#FFFFFF\",border:\"1px solid #E5E7EB\",borderRadius:12,boxShadow:\"0 8px 24px rgba(15,23,42,0.08)\",zIndex:11,minWidth:160,overflow:\"hidden\",padding:4,display:\"flex\",flexDirection:\"column\",gap:2},children:[/*#__PURE__*/_jsxs(\"label\",{style:{display:\"flex\",alignItems:\"center\",gap:12,padding:\"8px 12px\",cursor:\"pointer\",fontSize:14,fontWeight:500,color:toolbarTextColor,borderBottom:\"1px solid #E5E7EB\"},children:[/*#__PURE__*/_jsx(\"input\",{type:\"checkbox\",checked:saveTransparent,onChange:e=>setSaveTransparent(e.target.checked),style:{cursor:\"pointer\",accentColor:\"#0A9396\"}}),\"Transparent\"]}),/*#__PURE__*/_jsx(\"button\",{onClick:()=>handleSave(\"png\"),style:{display:\"flex\",alignItems:\"center\",gap:8,width:\"100%\",padding:\"8px 12px\",border:\"none\",background:\"transparent\",cursor:\"pointer\",textAlign:\"left\",color:toolbarTextColor,fontSize:14,fontWeight:500,borderRadius:8},onMouseEnter:e=>e.currentTarget.style.background=\"#E6F4F5\",onMouseLeave:e=>e.currentTarget.style.background=\"transparent\",children:\"Download PNG\"}),/*#__PURE__*/_jsx(\"button\",{onClick:()=>handleSave(\"svg\"),style:{display:\"flex\",alignItems:\"center\",gap:8,width:\"100%\",padding:\"8px 12px\",border:\"none\",background:\"transparent\",cursor:\"pointer\",textAlign:\"left\",color:toolbarTextColor,fontSize:14,fontWeight:500,borderRadius:8},onMouseEnter:e=>e.currentTarget.style.background=\"#E6F4F5\",onMouseLeave:e=>e.currentTarget.style.background=\"transparent\",children:\"Download SVG\"})]})]}),showToolUndo&&/*#__PURE__*/_jsx(\"button\",{onClick:handleUndo,disabled:historyRef.current.length<=1,style:{padding:0,backgroundColor:\"transparent\",border:\"none\",borderRadius:12,cursor:historyRef.current.length<=1?\"not-allowed\":\"pointer\",opacity:historyRef.current.length<=1?.3:1,color:toolbarTextColor,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",width:36,height:36,flexShrink:0},title:\"Undo\",\"aria-label\":\"Undo\",children:/*#__PURE__*/_jsx(\"div\",{style:{width:20,height:20},children:Icons.Undo})}),showToolRedo&&/*#__PURE__*/_jsx(\"button\",{onClick:handleRedo,disabled:redoStackRef.current.length===0,style:{padding:0,backgroundColor:\"transparent\",border:\"none\",borderRadius:12,cursor:redoStackRef.current.length===0?\"not-allowed\":\"pointer\",opacity:redoStackRef.current.length===0?.3:1,color:toolbarTextColor,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",width:36,height:36,flexShrink:0},title:\"Redo\",\"aria-label\":\"Redo\",children:/*#__PURE__*/_jsx(\"div\",{style:{width:20,height:20},children:Icons.Redo})}),showToolClear&&/*#__PURE__*/_jsx(\"button\",{onClick:handleClear,style:{padding:0,backgroundColor:\"transparent\",border:\"none\",borderRadius:12,cursor:\"pointer\",color:\"#D85C5C\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",width:36,height:36,flexShrink:0},title:\"Clear Canvas\",\"aria-label\":\"Clear canvas\",children:/*#__PURE__*/_jsx(\"div\",{style:{width:20,height:20},children:Icons.Trash})})]})]})]});}export default DrawingCanvas;addPropertyControls(DrawingCanvas,{eraserWidth:{type:ControlType.Number,title:\"Eraser Width\",defaultValue:20,min:5,max:50,step:1,displayStepper:true},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},showToolbar:{type:ControlType.Boolean,title:\"Show Toolbar\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},customizeToolbar:{type:ControlType.Boolean,title:\"Customize\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\",hidden:({showToolbar})=>!showToolbar},toolbarBackground:{type:ControlType.Color,title:\"Toolbar Background\",defaultValue:\"#F4F6F8\",hidden:({showToolbar})=>!showToolbar},toolbarTextColor:{type:ControlType.Color,title:\"Toolbar Text\",defaultValue:\"#111827\",hidden:({showToolbar})=>!showToolbar},toolbarPosition:{type:ControlType.Enum,title:\"Position\",options:[\"top\",\"bottom\",\"left\",\"right\"],optionTitles:[\"Top\",\"Bottom\",\"Left\",\"Right\"],defaultValue:\"bottom\",hidden:({showToolbar})=>!showToolbar},toolbarAlignment:{type:ControlType.Enum,title:\"Alignment\",options:[\"start\",\"center\",\"end\"],optionTitles:[\"Start\",\"Center\",\"End\"],defaultValue:\"center\",displaySegmentedControl:true,hidden:({showToolbar})=>!showToolbar},enableGrid:{type:ControlType.Boolean,title:\"Enable Grid\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\"},gridSize:{type:ControlType.Number,title:\"Grid Size\",defaultValue:20,min:10,max:100,step:5,displayStepper:true,hidden:({enableGrid})=>!enableGrid},gridColor:{type:ControlType.Color,title:\"Grid Color\",defaultValue:\"#E5E7EB\",hidden:({enableGrid})=>!enableGrid},enableAutoSave:{type:ControlType.Boolean,title:\"Auto-Save\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},saveLanguage:{type:ControlType.Enum,title:\"Save Language\",options:[\"en\",\"ar\"],optionTitles:[\"English\",\"Arabic\"],defaultValue:\"en\",hidden:({enableAutoSave})=>!enableAutoSave},enableCustomIcons:{type:ControlType.Boolean,title:\"Custom Icons\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\",hidden:({showToolbar})=>!showToolbar},customIconPen:{type:ControlType.ResponsiveImage,title:\"Pen Icon\",hidden:({showToolbar,enableCustomIcons})=>!showToolbar||!enableCustomIcons},customIconEraser:{type:ControlType.ResponsiveImage,title:\"Eraser Icon\",hidden:({showToolbar,enableCustomIcons})=>!showToolbar||!enableCustomIcons},customIconLine:{type:ControlType.ResponsiveImage,title:\"Line Icon\",hidden:({showToolbar,enableCustomIcons})=>!showToolbar||!enableCustomIcons},customIconRect:{type:ControlType.ResponsiveImage,title:\"Rect Icon\",hidden:({showToolbar,enableCustomIcons})=>!showToolbar||!enableCustomIcons},customIconCircle:{type:ControlType.ResponsiveImage,title:\"Circle Icon\",hidden:({showToolbar,enableCustomIcons})=>!showToolbar||!enableCustomIcons},// Tool visibility controls\nshowToolPen:{type:ControlType.Boolean,title:\"Show Pen\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\",hidden:({showToolbar,customizeToolbar})=>!showToolbar||!customizeToolbar},showToolEraser:{type:ControlType.Boolean,title:\"Show Eraser\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\",hidden:({showToolbar,customizeToolbar})=>!showToolbar||!customizeToolbar},showToolLine:{type:ControlType.Boolean,title:\"Show Line\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\",hidden:({showToolbar,customizeToolbar})=>!showToolbar||!customizeToolbar},showToolRectangle:{type:ControlType.Boolean,title:\"Show Rect\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\",hidden:({showToolbar,customizeToolbar})=>!showToolbar||!customizeToolbar},showToolCircle:{type:ControlType.Boolean,title:\"Show Circle\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\",hidden:({showToolbar,customizeToolbar})=>!showToolbar||!customizeToolbar},showToolColor:{type:ControlType.Boolean,title:\"Show Color\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\",hidden:({showToolbar,customizeToolbar})=>!showToolbar||!customizeToolbar},showToolWidth:{type:ControlType.Boolean,title:\"Show Width\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\",hidden:({showToolbar,customizeToolbar})=>!showToolbar||!customizeToolbar},showToolGrid:{type:ControlType.Boolean,title:\"Show Grid\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\",hidden:({showToolbar,customizeToolbar})=>!showToolbar||!customizeToolbar},showToolExport:{type:ControlType.Boolean,title:\"Show Export\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\",hidden:({showToolbar,customizeToolbar})=>!showToolbar||!customizeToolbar},showToolUndo:{type:ControlType.Boolean,title:\"Show Undo\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\",hidden:({showToolbar,customizeToolbar})=>!showToolbar||!customizeToolbar},showToolRedo:{type:ControlType.Boolean,title:\"Show Redo\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\",hidden:({showToolbar,customizeToolbar})=>!showToolbar||!customizeToolbar},showToolClear:{type:ControlType.Boolean,title:\"Show Clear\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\",hidden:({showToolbar,customizeToolbar})=>!showToolbar||!customizeToolbar}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"DrawingCanvas\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"600\",\"framerIntrinsicHeight\":\"400\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Drawing_Canvas.map","const GLOBAL_KEY=\"__yuraSandboxPendingWork\";function getPendingWork(){const globalState=globalThis;if(!globalState[GLOBAL_KEY]){globalState[GLOBAL_KEY]=new Set;}return globalState[GLOBAL_KEY];}export function trackPendingWork(promise){const pending=getPendingWork();pending.add(promise);promise.then(()=>pending.delete(promise),()=>pending.delete(promise));return promise;}export async function waitForPendingWork(){while(true){const pending=Array.from(getPendingWork());if(pending.length===0)return;await Promise.allSettled(pending);}}export function getPendingWorkCount(){return getPendingWork().size;}\nexport const __FramerMetadata__ = {\"exports\":{\"waitForPendingWork\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getPendingWorkCount\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"trackPendingWork\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SandboxPendingWork.map","import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{getOrCreateSandboxSession}from\"https://framerusercontent.com/modules/4mb9AGTRSXbdIOaiSL4d/w5hKxaw3kAFkphDeKqwb/SandboxAuth.js\";import{waitForPendingWork}from\"https://framerusercontent.com/modules/SXpJlvCHveae4cCrd2eo/9wdLupuDXRBW40x54WMm/SandboxPendingWork.js\";import{forwardRef,useRef,useState}from\"react\";import{useIsStaticRenderer}from\"framer\";import{markProcessClick}from\"https://framerusercontent.com/modules/NMDi9kbZ72wqClXRLTyP/mU101vBmg3GRxNs4bvX5/YuraSandboxAnalytics.js\";import{prepareSandboxProcessing,SandboxPolicyError,sandboxLimitMessage}from\"https://framerusercontent.com/modules/1io5AVRO8FtVAoWU5qZe/NrLAtH6DfAmsPp8rfqv2/SandboxPolicy.js\";import{useSandboxAllowance}from\"https://framerusercontent.com/modules/qMam16mby0RNQQPwkgRf/sU3O2J3EteyLMMWhPcjI/SandboxUsage.js\";const SUPABASE_URL=\"https://vrzuhifrrkgviiiepzgw.supabase.co\";const SUPABASE_ANON_KEY=\"sb_publishable_xFNP2vmQ6fyD3MtOo8mMeQ_dTJ60SdH\";const YURA_PROCESSING_ORDER_KEY=\"yura_processing_order_id\";const YURA_PROCESSING_JOB_KEY=\"yura_processing_job_id\";// Keep the existing upload override/export for any layers that use it.\nexport function withFileUpload(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const inputRef=useRef(null);const[fileCount,setFileCount]=useState(0);const handleFiles=event=>{if(event.target.files)setFileCount(event.target.files.length);};return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"input\",{ref:inputRef,type:\"file\",accept:\"image/*\",multiple:true,onChange:handleFiles,style:{display:\"none\"}}),/*#__PURE__*/_jsx(Component,{ref:ref,...props,onTap:()=>inputRef.current?.click(),style:{...props.style,cursor:\"pointer\"}}),fileCount>0&&/*#__PURE__*/_jsxs(\"div\",{style:{position:\"absolute\",bottom:12,left:12,right:12,padding:\"8px 12px\",borderRadius:8,background:\"#000\",color:\"#fff\",fontSize:13,textAlign:\"center\",fontFamily:'\"IBM Plex Sans\", \"IBM Plex Sans Arabic\", sans-serif',pointerEvents:\"none\"},children:[fileCount,\" image\",fileCount!==1?\"s\":\"\",\" selected\"]})]});});}function createProcessOverride(isArabic){return function processOverride(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const isStatic=useIsStaticRenderer();const{allowance,loading,error:allowanceError,refresh}=useSandboxAllowance(!isStatic);const submitting=useRef(false);const[isSubmitting,setIsSubmitting]=useState(false);const[message,setMessage]=useState(\"\");const disabled=isSubmitting||loading||allowanceError||!allowance||allowance.remaining<=0;const uploadMessage=isArabic?\"يرجى رفع صورة واحدة على الأقل قبل معالجة الطلب.\":\"Please upload at least one image before processing the order.\";const handleProcess=async()=>{if(submitting.current||isStatic||typeof window===\"undefined\")return;if(disabled)return;submitting.current=true;setIsSubmitting(true);setMessage(\"\");markProcessClick(isArabic?\"ar\":\"en\");try{await waitForPendingWork();const session=await getOrCreateSandboxSession();if(!session?.access_token||!session?.user?.id)throw new Error(\"UNAUTHORIZED\");const orderId=sessionStorage.getItem(\"yura_current_sandbox_order_id\");if(!orderId){setMessage(uploadMessage);return;}const sourceResponse=await fetch(`${SUPABASE_URL}/rest/v1/sandbox_order_sources?select=id&sandbox_order_id=eq.${encodeURIComponent(orderId)}&is_active_for_processing=eq.true&limit=1`,{headers:{apikey:SUPABASE_ANON_KEY,Authorization:`Bearer ${session.access_token}`}});if(!sourceResponse.ok)throw new Error(\"SOURCE_CHECK_FAILED\");const sources=await sourceResponse.json();if(!Array.isArray(sources)||!sources.length){setMessage(uploadMessage);return;}const jobId=await prepareSandboxProcessing(orderId);sessionStorage.setItem(YURA_PROCESSING_ORDER_KEY,orderId);sessionStorage.setItem(YURA_PROCESSING_JOB_KEY,jobId);window.location.assign(isArabic?\"/processingpage?lang=ar\":\"/processingpage\");}catch(error){const code=error instanceof SandboxPolicyError?error.code:\"START_PROCESSING_FAILED\";setMessage(code===\"NO_IMAGES_TO_PROCESS\"?uploadMessage:[\"SANDBOX_DAILY_LIMIT_REACHED\",\"SANDBOX_BUSY\"].includes(code)?sandboxLimitMessage(code,error instanceof SandboxPolicyError?error.allowance:allowance,isArabic):isArabic?\"تعذّر بدء المعالجة. يرجى المحاولة مجددًا.\":\"Couldn't start processing. Please try again.\");void refresh();}finally{submitting.current=false;setIsSubmitting(false);}};return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Component,{ref:ref,...props,onTap:handleProcess,disabled:disabled,\"aria-disabled\":disabled,\"aria-busy\":isSubmitting||loading,style:{...props.style,cursor:isSubmitting||loading?\"wait\":disabled?\"not-allowed\":\"pointer\",opacity:disabled?.65:1,pointerEvents:disabled?\"none\":\"auto\"}}),message&&/*#__PURE__*/_jsxs(\"div\",{role:\"alert\",dir:isArabic?\"rtl\":\"ltr\",style:{position:\"fixed\",top:60,left:\"50%\",transform:\"translateX(-50%)\",zIndex:9999,width:\"calc(100% - 32px)\",maxWidth:520,boxSizing:\"border-box\",padding:\"10px 14px\",border:\"1px solid #F1C7C7\",borderRadius:10,background:\"#FFF6F6\",color:\"#A33F3F\",fontSize:13,lineHeight:1.6,textAlign:isArabic?\"right\":\"left\",fontFamily:'\"IBM Plex Sans Arabic\", \"IBM Plex Sans\", sans-serif',boxShadow:\"0 8px 24px rgba(15,23,42,0.08)\"},children:[message,/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:()=>setMessage(\"\"),\"aria-label\":isArabic?\"إغلاق\":\"Close\",style:{marginInlineStart:12,border:0,background:\"transparent\",color:\"inherit\",cursor:\"pointer\",font:\"inherit\"},children:\"\\xd7\"})]})]});});};}export function withProcessOrder(Component){return createProcessOverride(false)(Component);}export function withProcessOrderAR(Component){return createProcessOverride(true)(Component);}\nexport const __FramerMetadata__ = {\"exports\":{\"withProcessOrder\":{\"type\":\"reactHoc\",\"name\":\"withProcessOrder\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFileUpload\":{\"type\":\"reactHoc\",\"name\":\"withFileUpload\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withProcessOrderAR\":{\"type\":\"reactHoc\",\"name\":\"withProcessOrderAR\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{forwardRef,startTransition,useCallback,useEffect,useMemo,useRef,useState}from\"react\";import DrawingCanvas from\"https://framerusercontent.com/modules/pjkPBjMCwElUHOjByweC/NdGOJQbbJNfvBlBQ5fhe/Drawing_Canvas.js\";import{createPortal}from\"react-dom\";import{getOrCreateSandboxSession}from\"https://framerusercontent.com/modules/4mb9AGTRSXbdIOaiSL4d/w5hKxaw3kAFkphDeKqwb/SandboxAuth.js\";import{trackPendingWork}from\"https://framerusercontent.com/modules/SXpJlvCHveae4cCrd2eo/9wdLupuDXRBW40x54WMm/SandboxPendingWork.js\";import{trackSandboxEvent}from\"https://framerusercontent.com/modules/NMDi9kbZ72wqClXRLTyP/mU101vBmg3GRxNs4bvX5/YuraSandboxAnalytics.js\";const SUPABASE_URL=\"https://vrzuhifrrkgviiiepzgw.supabase.co\";const SUPABASE_ANON_KEY=\"sb_publishable_xFNP2vmQ6fyD3MtOo8mMeQ_dTJ60SdH\";async function createSandboxOrder(accessToken,userId){const response=await fetch(`${SUPABASE_URL}/rest/v1/sandbox_orders`,{method:\"POST\",headers:{apikey:SUPABASE_ANON_KEY,Authorization:`Bearer ${accessToken}`,\"Content-Type\":\"application/json\",Prefer:\"return=representation\"},body:JSON.stringify({session_id:userId,status:\"processing\"})});const result=await response.json();if(!response.ok){throw new Error(result?.message||\"Failed to create sandbox order\");}return result[0];}// Compress large screenshots without changing their pixel dimensions.\n// Keep the original if JPEG does not save at least 20% or encoding fails.\nasync function prepareImageForUpload(file){if(file.size<1e6||![\"image/png\",\"image/jpeg\",\"image/webp\"].includes(file.type)){console.info(\"yura_image_preparation\",{outcome:\"original\",reason:file.size<1e6?\"small_file\":\"unsupported_type\",sourceBytes:file.size,sourceType:file.type});return file;}const url=URL.createObjectURL(file);try{const image=new Image;await new Promise((resolve,reject)=>{image.onload=()=>resolve();image.onerror=()=>reject(new Error(\"Image decode failed\"));image.src=url;});const width=image.naturalWidth;const height=image.naturalHeight;if(!width||!height||width*height>25e6){console.info(\"yura_image_preparation\",{outcome:\"original\",reason:\"pixel_limit\",width,height,sourceBytes:file.size});return file;}const canvas=document.createElement(\"canvas\");canvas.width=width;canvas.height=height;const context=canvas.getContext(\"2d\");if(!context){console.info(\"yura_image_preparation\",{outcome:\"original\",reason:\"canvas_unavailable\",sourceBytes:file.size});return file;}context.fillStyle=\"#FFFFFF\";context.fillRect(0,0,width,height);context.drawImage(image,0,0);const blob=await new Promise(resolve=>{canvas.toBlob(resolve,\"image/jpeg\",.92);});if(!blob||blob.type!==\"image/jpeg\"||blob.size>=file.size*.8){console.info(\"yura_image_preparation\",{outcome:\"original\",reason:!blob?\"encoding_failed\":blob.type!==\"image/jpeg\"?\"jpeg_unavailable\":\"not_smaller_enough\",sourceBytes:file.size,encodedBytes:blob?.size||0,encodedType:blob?.type||\"\"});return file;}console.info(\"yura_image_preparation\",{outcome:\"jpeg\",sourceBytes:file.size,encodedBytes:blob.size});const baseName=file.name.replace(/\\.[^.]+$/,\"\");return new File([blob],`${baseName}.jpg`,{type:\"image/jpeg\",lastModified:file.lastModified});}catch(error){console.warn(\"yura_image_preparation\",{outcome:\"original\",reason:\"exception\",sourceBytes:file.size,message:error instanceof Error?error.message:String(error)});return file;}finally{URL.revokeObjectURL(url);}}async function uploadOriginalImage(file,accessToken,userId,orderId){const safeName=file.name.replace(/[^a-zA-Z0-9._-]/g,\"_\");const filePath=`${userId}/${orderId}/${crypto.randomUUID()}-${safeName}`;const response=await fetch(`${SUPABASE_URL}/storage/v1/object/sandbox-order-sources/${filePath}`,{method:\"POST\",headers:{apikey:SUPABASE_ANON_KEY,Authorization:`Bearer ${accessToken}`,\"Content-Type\":file.type},body:file});if(!response.ok){const result=await response.text();throw new Error(result||\"Failed to upload original image\");}return filePath;}async function dataUrlToBlob(dataUrl){const response=await fetch(dataUrl);return await response.blob();}async function createCombinedAnnotatedImage(originalUrl,annotationDataUrl){const original=new Image;const annotation=new Image;await Promise.all([new Promise((resolve,reject)=>{original.onload=()=>resolve();original.onerror=()=>reject(new Error(\"Failed to load original image\"));original.src=originalUrl;}),new Promise((resolve,reject)=>{annotation.onload=()=>resolve();annotation.onerror=()=>reject(new Error(\"Failed to load annotation\"));annotation.src=annotationDataUrl;})]);const canvas=document.createElement(\"canvas\");canvas.width=original.naturalWidth;canvas.height=original.naturalHeight;const context=canvas.getContext(\"2d\");if(!context){throw new Error(\"Failed to create combined image\");}context.drawImage(original,0,0,canvas.width,canvas.height);context.drawImage(annotation,0,0,canvas.width,canvas.height);return await new Promise((resolve,reject)=>{canvas.toBlob(blob=>{if(blob)resolve(blob);else reject(new Error(\"Failed to render combined image\"));},\"image/png\");});}async function uploadAnnotatedImage(dataUrl,accessToken,userId,orderId,sourceId){const blob=await dataUrlToBlob(dataUrl);const filePath=`${userId}/${orderId}/annotations/${sourceId}-pre.png`;const response=await fetch(`${SUPABASE_URL}/storage/v1/object/sandbox-order-sources/${filePath}`,{method:\"POST\",headers:{apikey:SUPABASE_ANON_KEY,Authorization:`Bearer ${accessToken}`,\"Content-Type\":\"image/png\",\"x-upsert\":\"true\"},body:blob});if(!response.ok){const result=await response.text();throw new Error(result||\"Failed to upload annotated image\");}return filePath;}async function uploadCombinedAnnotatedImage(blob,accessToken,userId,orderId,sourceId){const filePath=`${userId}/${orderId}/annotated/${sourceId}-pre-rendered.png`;const response=await fetch(`${SUPABASE_URL}/storage/v1/object/sandbox-order-sources/${filePath}`,{method:\"POST\",headers:{apikey:SUPABASE_ANON_KEY,Authorization:`Bearer ${accessToken}`,\"Content-Type\":\"image/png\",\"x-upsert\":\"true\"},body:blob});if(!response.ok){const result=await response.text();throw new Error(result||\"Failed to upload combined annotated image\");}return filePath;}async function updateSourceAnnotatedPath(accessToken,sourceId,overlayFilePath,combinedFilePath){const response=await fetch(`${SUPABASE_URL}/rest/v1/sandbox_order_sources?id=eq.${sourceId}`,{method:\"PATCH\",headers:{apikey:SUPABASE_ANON_KEY,Authorization:`Bearer ${accessToken}`,\"Content-Type\":\"application/json\"},body:JSON.stringify({annotation_overlay_file_path:overlayFilePath,pre_parse_annotated_file_path:combinedFilePath})});if(!response.ok){const result=await response.text();throw new Error(result||\"Failed to update annotation paths\");}}async function createSourceRow(accessToken,orderId,filePath,fileType,sortOrder){const response=await fetch(`${SUPABASE_URL}/rest/v1/sandbox_order_sources`,{method:\"POST\",headers:{apikey:SUPABASE_ANON_KEY,Authorization:`Bearer ${accessToken}`,\"Content-Type\":\"application/json\",Prefer:\"return=representation\"},body:JSON.stringify({sandbox_order_id:orderId,original_file_path:filePath,file_type:fileType,sort_order:sortOrder,parse_status:\"pending\"})});const result=await response.json();if(!response.ok){throw new Error(result?.message||\"Failed to create source row\");}return result[0];}const YURA_PENDING_UPLOADS_KEY=\"yura_pending_uploads\";const editorButtonStyle={minWidth:40,height:40,padding:\"0 6px\",border:\"1px solid #46505A\",borderRadius:9,background:\"transparent\",color:\"#FFFFFF\",fontSize:18,fontWeight:500,fontFamily:'\"IBM Plex Sans\", \"IBM Plex Sans Arabic\", sans-serif',cursor:\"pointer\",flexShrink:0};// Upload container\nexport function withFileUpload(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const inputRef=useRef(null);const sandboxOrderRef=useRef(null);const[previews,setPreviews]=useState([]);const[selectedImageId,setSelectedImageId]=useState(null);const previewsRef=useRef([]);const selectedImage=previews.find(item=>item.id===selectedImageId);const[zoom,setZoom]=useState(1);const[panMode,setPanMode]=useState(false);const[narrowEditor,setNarrowEditor]=useState(false);const[tabletEditor,setTabletEditor]=useState(false);const workspaceRef=useRef(null);const[workspaceSize,setWorkspaceSize]=useState({width:0,height:0});// Keep the editor in the visible viewport even inside a Framer frame.\nuseEffect(()=>{if(!selectedImageId||typeof window===\"undefined\")return;const previousOverflow=document.body.style.overflow;const previousBodyBackground=document.body.style.backgroundColor;const previousRootBackground=document.documentElement.style.backgroundColor;document.body.style.overflow=\"hidden\";document.body.style.backgroundColor=\"#17191F\";document.documentElement.style.backgroundColor=\"#17191F\";document.body.classList.add(\"yura-image-editor-open\");const onKeyDown=event=>{if(event.key===\"Escape\")setSelectedImageId(null);};const updateWidth=()=>{setNarrowEditor(window.innerWidth<700||window.innerHeight<500);setTabletEditor(window.innerWidth>=700&&window.innerWidth<1200&&window.innerHeight>=500);};updateWidth();window.addEventListener(\"resize\",updateWidth);window.addEventListener(\"keydown\",onKeyDown);return()=>{document.body.style.overflow=previousOverflow;document.body.style.backgroundColor=previousBodyBackground;document.documentElement.style.backgroundColor=previousRootBackground;document.body.classList.remove(\"yura-image-editor-open\");window.removeEventListener(\"resize\",updateWidth);window.removeEventListener(\"keydown\",onKeyDown);};},[selectedImageId]);useEffect(()=>{setZoom(1);setPanMode(false);},[selectedImageId]);useEffect(()=>{const workspace=workspaceRef.current;if(!workspace)return;const observer=new ResizeObserver(()=>{setWorkspaceSize({width:workspace.clientWidth,height:workspace.clientHeight});});observer.observe(workspace);return()=>observer.disconnect();},[selectedImageId]);// Keep zoomed content centered; the scroll area itself handles panning.\nuseEffect(()=>{const workspace=workspaceRef.current;if(!workspace||zoom===1)return;workspace.scrollLeft=Math.max(0,(workspace.scrollWidth-workspace.clientWidth)/2);workspace.scrollTop=Math.max(0,(workspace.scrollHeight-workspace.clientHeight)/2);},[zoom,workspaceSize]);const handleDrawingSave=(dataUrl,sourceId)=>{const sourceImage=sourceId?previewsRef.current.find(item=>item.sourceId===sourceId):previewsRef.current.find(item=>item.id===selectedImageId);if(!sourceImage){console.warn(\"Annotation source image not found:\",sourceId);return Promise.resolve();}const annotationWork=(async()=>{let resolvedSourceId=sourceId;if(!resolvedSourceId){const uploadWork=uploadWorkByFileRef.current.get(sourceImage.file);if(uploadWork){await uploadWork;}resolvedSourceId=sourceMetaRef.current.get(sourceImage.file)?.sourceId;}if(!resolvedSourceId){throw new Error(\"Annotation source is not ready after upload completed\");}try{const sandboxOrder=await ensureSandboxOrder();const overlayFilePath=await uploadAnnotatedImage(dataUrl,sandboxOrder.accessToken,sandboxOrder.userId,sandboxOrder.orderId,resolvedSourceId);const combinedBlob=await createCombinedAnnotatedImage(sourceImage.url,dataUrl);const combinedFilePath=await uploadCombinedAnnotatedImage(combinedBlob,sandboxOrder.accessToken,sandboxOrder.userId,sandboxOrder.orderId,resolvedSourceId);await updateSourceAnnotatedPath(sandboxOrder.accessToken,resolvedSourceId,overlayFilePath,combinedFilePath);}catch(error){console.error(\"Failed to save annotation:\",error);throw error;}})();return trackPendingWork(annotationWork);};const removedFilesRef=useRef(new Set);const pendingUploadsRef=useRef(0);const sourceMetaRef=useRef(new Map);const uploadWorkByFileRef=useRef(new Map);const ensureSandboxOrder=async()=>{if(sandboxOrderRef.current){const session=await getOrCreateSandboxSession();const accessToken=session.access_token;const userId=session.user?.id;if(accessToken&&userId&&sandboxOrderRef.current.userId===userId){sandboxOrderRef.current.accessToken=accessToken;return sandboxOrderRef.current;}sandboxOrderRef.current=null;}const session=await getOrCreateSandboxSession();const accessToken=session.access_token;const userId=session.user?.id;if(!accessToken||!userId){throw new Error(\"Sandbox session is missing\");}const retryOrderId=typeof window!==\"undefined\"?new URLSearchParams(window.location.search).get(\"retry_order_id\"):null;if(retryOrderId){const response=await fetch(`${SUPABASE_URL}/rest/v1/sandbox_orders?select=id,status,session_id&id=eq.${encodeURIComponent(retryOrderId)}&limit=1`,{headers:{apikey:SUPABASE_ANON_KEY,Authorization:`Bearer ${accessToken}`}});if(!response.ok){throw new Error(\"Failed to verify retry order\");}const orders=await response.json();const retryOrder=orders?.[0];if(!retryOrder||retryOrder.session_id!==userId||retryOrder.status!==\"failed\"){throw new Error(\"RETRY_ORDER_NOT_AVAILABLE\");}const deactivateResponse=await fetch(`${SUPABASE_URL}/rest/v1/sandbox_order_sources?sandbox_order_id=eq.${encodeURIComponent(retryOrder.id)}&is_active_for_processing=eq.true`,{method:\"PATCH\",headers:{apikey:SUPABASE_ANON_KEY,Authorization:`Bearer ${accessToken}`,\"Content-Type\":\"application/json\"},body:JSON.stringify({is_active_for_processing:false})});if(!deactivateResponse.ok){throw new Error(\"Failed to prepare replacement screenshots\");}const sandboxOrder={orderId:retryOrder.id,accessToken,userId};sandboxOrderRef.current=sandboxOrder;sessionStorage.setItem(\"yura_current_sandbox_order_id\",retryOrder.id);return sandboxOrder;}const order=await createSandboxOrder(accessToken,userId);const sandboxOrder={orderId:order.id,accessToken,userId};sandboxOrderRef.current=sandboxOrder;if(typeof window!==\"undefined\"){sessionStorage.setItem(\"yura_current_sandbox_order_id\",sandboxOrder.orderId);}return sandboxOrder;};const openPicker=useCallback(()=>{inputRef.current?.click();},[]);const syncInputFiles=useCallback(files=>{if(typeof window===\"undefined\")return;const input=inputRef.current;if(!input)return;const transfer=new DataTransfer;files.forEach(file=>transfer.items.add(file));input.files=transfer.files;},[]);const handleFiles=useCallback(async event=>{const files=event.target.files;if(!files)return;const incoming=Array.from(files).filter(file=>file.type.startsWith(\"image/\")).slice(0,Math.max(0,5-previewsRef.current.length));event.target.value=\"\";// Show the images immediately.\nstartTransition(()=>{setPreviews(current=>{const currentFiles=current.map(item=>item.file);const combinedFiles=[...currentFiles,...incoming].slice(0,5);const currentMap=new Map(current.map(item=>[item.file,item]));const next=combinedFiles.map((file,index)=>{const existing=currentMap.get(file);if(existing)return existing;const url=URL.createObjectURL(file);const image=new Image;image.onload=()=>{setPreviews(current=>current.map(item=>item.url===url?{...item,naturalWidth:image.naturalWidth,naturalHeight:image.naturalHeight}:item));};image.src=url;return{id:crypto.randomUUID(),file,url};});current.forEach(item=>{if(!next.some(entry=>entry.id===item.id)){URL.revokeObjectURL(item.url);}});syncInputFiles(combinedFiles);return next;});});// Upload to Supabase after the local preview is already shown.\npendingUploadsRef.current+=incoming.length;sessionStorage.setItem(YURA_PENDING_UPLOADS_KEY,String(pendingUploadsRef.current));const uploadWork=(async()=>{try{const sandboxOrder=await ensureSandboxOrder();const startingSortOrder=previewsRef.current.length;for(let index=0;index<incoming.length;index++){const file=incoming[index];const preparationStart=performance.now();const uploadFile=await prepareImageForUpload(file);const preparationMs=Math.round(performance.now()-preparationStart);const uploadStart=performance.now();const filePath=await uploadOriginalImage(uploadFile,sandboxOrder.accessToken,sandboxOrder.userId,sandboxOrder.orderId);const transferMs=Math.round(performance.now()-uploadStart);console.info(\"yura_upload_timing\",{preparationMs,transferMs,uploadedBytes:uploadFile.size,uploadedType:uploadFile.type});const sourceRow=await createSourceRow(sandboxOrder.accessToken,sandboxOrder.orderId,filePath,uploadFile.type,startingSortOrder+index+1);if(removedFilesRef.current.has(file)){const deleteResponse=await fetch(`${SUPABASE_URL}/rest/v1/sandbox_order_sources?id=eq.${sourceRow.id}`,{method:\"DELETE\",headers:{apikey:SUPABASE_ANON_KEY,Authorization:`Bearer ${sandboxOrder.accessToken}`}});if(!deleteResponse.ok){const result=await deleteResponse.text();throw new Error(result||\"Failed to remove deleted upload source\");}removedFilesRef.current.delete(file);continue;}trackSandboxEvent(\"image_uploaded\",{preparation_ms:preparationMs,transfer_ms:transferMs,original_kb:Math.round(file.size/1024),uploaded_kb:Math.round(uploadFile.size/1024)});sourceMetaRef.current.set(file,{sourceId:sourceRow.id,originalFilePath:filePath});setPreviews(current=>current.map(item=>item.file===file?{...item,sourceId:sourceRow.id,originalFilePath:filePath}:item));}}catch(error){console.error(\"Supabase image upload failed:\",error);throw error;}finally{pendingUploadsRef.current=Math.max(0,pendingUploadsRef.current-incoming.length);sessionStorage.setItem(YURA_PENDING_UPLOADS_KEY,String(pendingUploadsRef.current));}})();const trackedUploadWork=trackPendingWork(uploadWork);incoming.forEach(file=>{uploadWorkByFileRef.current.set(file,trackedUploadWork);});try{await trackedUploadWork;}finally{incoming.forEach(file=>{if(uploadWorkByFileRef.current.get(file)===trackedUploadWork){uploadWorkByFileRef.current.delete(file);}});}},[syncInputFiles]);const removePreview=useCallback(async id=>{const removed=previewsRef.current.find(item=>item.id===id);if(!removed)return;removedFilesRef.current.add(removed.file);try{if(removed.sourceId){const sandboxOrder=await ensureSandboxOrder();const response=await fetch(`${SUPABASE_URL}/rest/v1/sandbox_order_sources?id=eq.${removed.sourceId}`,{method:\"DELETE\",headers:{apikey:SUPABASE_ANON_KEY,Authorization:`Bearer ${sandboxOrder.accessToken}`}});if(!response.ok){const result=await response.text();throw new Error(result||\"Failed to delete source\");}}startTransition(()=>{setPreviews(current=>{const next=current.filter(item=>item.id!==id);URL.revokeObjectURL(removed.url);syncInputFiles(next.map(item=>item.file));return next;});});}catch(error){console.error(\"Failed to remove image:\",error);}},[syncInputFiles]);useEffect(()=>{previewsRef.current=previews;},[previews]);useEffect(()=>{if(typeof window===\"undefined\")return;sessionStorage.removeItem(\"yura_current_sandbox_order_id\");sessionStorage.removeItem(\"yura_processing_order_id\");sessionStorage.removeItem(\"yura_processing_job_id\");sessionStorage.setItem(YURA_PENDING_UPLOADS_KEY,\"0\");sandboxOrderRef.current=null;pendingUploadsRef.current=0;},[]);useEffect(()=>{return()=>{previewsRef.current.forEach(item=>URL.revokeObjectURL(item.url));};},[]);const isArabic=useMemo(()=>{if(typeof window===\"undefined\")return false;const path=window.location.pathname.toLowerCase().replace(/\\/+$/,\"\");if(path.endsWith(\"/sellerdashboarden\")||path.endsWith(\"/sellerdashboard-en\")){return false;}if(path.endsWith(\"/sellerdashboard-ar\")||path.endsWith(\"/sellerdashboardar\")){return true;}const dir=document.documentElement.dir?.toLowerCase()||\"\";const lang=document.documentElement.lang?.toLowerCase()||\"\";return dir===\"rtl\"||lang.startsWith(\"ar\");},[]);const topButtonStyle=narrowEditor?{...editorButtonStyle,minWidth:36,padding:\"0 4px\"}:editorButtonStyle;const toolbarOnRight=isArabic||tabletEditor;const sideGutter=narrowEditor||tabletEditor?72:0;return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"input\",{ref:inputRef,type:\"file\",accept:\"image/*\",multiple:true,onChange:handleFiles,style:{display:\"none\"}}),previews.length===0&&/*#__PURE__*/_jsx(Component,{ref:ref,...props,onTap:openPicker,style:{...props.style,cursor:\"pointer\",background:\"linear-gradient(135deg, rgba(255,255,255,0.82) 0%, rgba(230,244,245,0.58) 55%, rgba(148,210,189,0.28) 100%)\",backdropFilter:\"blur(18px)\",WebkitBackdropFilter:\"blur(18px)\",border:\"1px solid rgba(148, 210, 189, 0.72)\",boxShadow:\"inset 0 1px 0 rgba(255,255,255,0.85), 0 8px 24px rgba(15,23,42,0.05)\"}}),previews.length>0&&!selectedImage&&/*#__PURE__*/_jsxs(\"div\",{style:{marginTop:10,width:\"100%\",maxWidth:\"100%\",minWidth:0,display:\"flex\",flexDirection:\"column\",gap:8,direction:isArabic?\"rtl\":\"ltr\",textAlign:isArabic?\"right\":\"left\"},children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"row\",flexWrap:\"nowrap\",width:\"100%\",maxWidth:\"100%\",minWidth:0,gap:8,justifyContent:\"safe center\",overflowX:\"auto\",overflowY:\"hidden\",WebkitOverflowScrolling:\"touch\",touchAction:\"pan-x\",paddingBottom:4},children:[previews.map(item=>/*#__PURE__*/_jsxs(\"div\",{style:{minWidth:104,width:104,height:164,borderRadius:10,border:\"1px solid #E5E7EB\",background:\"#F4F6F8\",position:\"relative\",overflow:\"hidden\",flexShrink:0},children:[/*#__PURE__*/_jsx(\"button\",{type:\"button\",\"aria-label\":isArabic?\"فتح المعاينة\":\"Open preview\",onClick:()=>setSelectedImageId(item.id),style:{border:\"none\",padding:0,margin:0,width:\"100%\",height:\"100%\",background:\"transparent\",cursor:\"pointer\"},children:/*#__PURE__*/_jsx(\"img\",{src:item.url,alt:\"\",style:{width:\"100%\",height:\"100%\",objectFit:\"cover\"}})}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:()=>removePreview(item.id),\"aria-label\":isArabic?\"إزالة الصورة\":\"Remove image\",style:{position:\"absolute\",top:6,right:isArabic?\"auto\":6,left:isArabic?6:\"auto\",border:\"none\",borderRadius:999,background:\"rgba(0,0,0,0.7)\",color:\"#fff\",fontSize:11,fontFamily:'\"IBM Plex Sans\", \"IBM Plex Sans Arabic\", sans-serif',padding:\"4px 7px\",cursor:\"pointer\"},children:isArabic?\"إزالة\":\"Remove\"})]},item.id)),previews.length<5&&/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:openPicker,\"aria-label\":isArabic?\"إضافة صور أخرى\":\"Add more images\",style:{minWidth:104,width:104,height:164,borderRadius:10,border:\"1px dashed #0A9396\",background:\"#E6F4F5\",color:\"#005F73\",fontSize:12,fontWeight:600,fontFamily:'\"IBM Plex Sans\", \"IBM Plex Sans Arabic\", sans-serif',cursor:\"pointer\",flexShrink:0},children:isArabic?\"إضافة المزيد\":\"Add more\"})]}),/*#__PURE__*/_jsx(\"div\",{style:{fontSize:13,fontFamily:'\"IBM Plex Sans\", \"IBM Plex Sans Arabic\", sans-serif',color:\"#64748B\",textAlign:isArabic?\"right\":\"left\",direction:isArabic?\"rtl\":\"ltr\"},children:isArabic?`عدد الصور التي تم تحميلها: ${previews.length}`:`Images uploaded: ${previews.length}`})]}),selectedImage&&typeof document!==\"undefined\"&&/*#__PURE__*/createPortal(/*#__PURE__*/_jsxs(\"section\",{\"data-yura-image-editor\":\"\",role:\"dialog\",\"aria-modal\":\"true\",\"aria-label\":isArabic?\"محرر الصورة\":\"Image editor\",dir:isArabic?\"rtl\":\"ltr\",style:{position:\"fixed\",inset:0,height:\"100dvh\",width:\"100%\",zIndex:2147483645,display:\"flex\",flexDirection:\"column\",overflow:\"hidden\",overscrollBehavior:\"none\",background:\"#17191F\",color:\"#FFFFFF\",fontFamily:'\"IBM Plex Sans\", \"IBM Plex Sans Arabic\", sans-serif'},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                                body.yura-image-editor-open > :not([data-yura-image-editor]):not(script):not(style) {\n                                    visibility: hidden !important;\n                                }\n                                [data-yura-image-editor] button,\n                                [data-yura-image-editor] span {\n                                    font-family: \"IBM Plex Sans\", \"IBM Plex Sans Arabic\", sans-serif !important;\n                                }\n                            `}),/*#__PURE__*/_jsxs(\"header\",{style:{padding:narrowEditor?\"max(8px, env(safe-area-inset-top)) 8px 8px\":\"max(8px, env(safe-area-inset-top)) 12px 10px\",display:\"flex\",flexDirection:\"row\",alignItems:\"center\",justifyContent:\"space-between\",gap:narrowEditor?4:12,flexShrink:0,borderBottom:\"1px solid #353B42\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",alignItems:\"center\",minWidth:0},children:/*#__PURE__*/_jsxs(\"span\",{style:{fontSize:narrowEditor?11:13,fontWeight:600,whiteSpace:\"nowrap\",overflow:\"hidden\",textOverflow:\"ellipsis\"},children:[isArabic?narrowEditor?\"تحرير\":\"محرر الصورة\":narrowEditor?\"Edit\":\"Image editor\",/*#__PURE__*/_jsxs(\"span\",{style:{opacity:.7,marginInlineStart:narrowEditor?4:8},children:[previews.findIndex(item=>item.id===selectedImage.id)+1,\"/\",previews.length]})]})}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexShrink:0,gap:narrowEditor?4:6,alignItems:\"center\",justifyContent:\"flex-end\"},children:[/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:()=>setZoom(value=>Math.max(1,Math.round((value-.5)*10)/10)),disabled:zoom<=1,\"aria-label\":isArabic?\"تصغير\":\"Zoom out\",style:{...topButtonStyle,opacity:zoom<=1?.45:1},children:\"−\"}),/*#__PURE__*/_jsxs(\"span\",{style:{minWidth:narrowEditor?30:38,textAlign:\"center\",fontSize:narrowEditor?11:12,fontWeight:500},children:[Math.round(zoom*100),\"%\"]}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:()=>setZoom(value=>Math.min(4,Math.round((value+.5)*10)/10)),disabled:zoom>=4,\"aria-label\":isArabic?\"تكبير\":\"Zoom in\",style:{...topButtonStyle,opacity:zoom>=4?.45:1},children:\"+\"}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:()=>setPanMode(value=>!value),\"aria-pressed\":panMode,\"aria-label\":panMode?isArabic?\"التبديل إلى الرسم\":\"Switch to drawing\":isArabic?\"التبديل إلى تحريك الصورة\":\"Switch to panning\",title:panMode?isArabic?\"رسم\":\"Draw\":isArabic?\"تحريك\":\"Pan\",style:{...topButtonStyle,borderColor:panMode?\"#0A9396\":\"#46505A\",color:panMode?\"#79D8D7\":\"#FFFFFF\",display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\"},children:panMode?/*#__PURE__*/_jsx(\"svg\",{\"aria-hidden\":\"true\",width:\"19\",height:\"19\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"1.8\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:/*#__PURE__*/_jsx(\"path\",{d:\"m14 5 5 5M4 20l4.2-.8L20 7.4a2 2 0 0 0-3-3L5.2 16.2 4 20Z\"})}):/*#__PURE__*/_jsx(\"svg\",{\"aria-hidden\":\"true\",width:\"19\",height:\"19\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"1.8\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M12 2v20M2 12h20M9 5l3-3 3 3M9 19l3 3 3-3M5 9l-3 3 3 3M19 9l3 3-3 3\"})})}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:()=>setSelectedImageId(null),\"aria-label\":isArabic?\"إنهاء وإغلاق المحرر\":\"Done and close editor\",style:{...topButtonStyle,borderColor:\"#0A9396\",color:\"#79D8D7\",fontSize:narrowEditor?11:12},children:isArabic?\"تم\":\"Done\"}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:()=>setSelectedImageId(null),\"aria-label\":isArabic?\"إغلاق المحرر\":\"Close editor\",title:isArabic?\"إغلاق\":\"Close\",style:{...topButtonStyle,borderColor:\"#B9565B\",color:\"#F1ADB0\",fontSize:22,lineHeight:1},children:\"\\xd7\"})]})]}),/*#__PURE__*/_jsx(\"div\",{ref:workspaceRef,style:{flex:\"1 1 auto\",minHeight:0,width:\"100%\",overflow:\"auto\",display:\"flex\",alignItems:\"safe center\",justifyContent:\"safe center\",boxSizing:\"border-box\",paddingLeft:toolbarOnRight?0:sideGutter,paddingRight:toolbarOnRight?sideGutter:0,WebkitOverflowScrolling:\"touch\",touchAction:panMode?\"pan-x pan-y\":\"none\"},children:(()=>{const imageWidth=selectedImage.naturalWidth||1e3;const imageHeight=selectedImage.naturalHeight||1e3;const fit=Math.min(Math.max(1,(workspaceSize.width||1)-sideGutter)/imageWidth,(workspaceSize.height||1)/imageHeight);const width=Math.max(1,imageWidth*fit*zoom);const height=Math.max(1,imageHeight*fit*zoom);return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",flex:\"none\",width,height,margin:\"auto\",background:\"#FFFFFF\",boxShadow:\"0 8px 28px rgba(0,0,0,.3)\"},children:[/*#__PURE__*/_jsx(\"img\",{src:selectedImage.url,alt:\"\",draggable:false,style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",objectFit:\"fill\",display:\"block\",userSelect:\"none\"}}),/*#__PURE__*/_jsx(DrawingCanvas,{storageKey:`yura-drawing-${selectedImage.id}`,sourceId:selectedImage.sourceId,onDrawingSave:handleDrawingSave,eraserWidth:20,backgroundColor:\"#FFFFFF\",showToolbar:true,customizeToolbar:true,toolbarBackground:\"#F4F6F8\",toolbarTextColor:\"#111827\",toolbarPosition:toolbarOnRight?\"right\":\"left\",toolbarAlignment:\"center\",toolbarFixed:true,panMode:panMode,enableAutoSave:true,saveLanguage:isArabic?\"ar\":\"en\",enableGrid:false,gridSize:20,gridColor:\"#CCCCCC\",enableCustomIcons:false,showToolPen:true,showToolEraser:false,showToolLine:false,showToolRectangle:false,showToolCircle:false,showToolColor:true,showToolWidth:true,showToolGrid:false,showToolExport:false,showToolUndo:true,showToolRedo:true,showToolClear:true,style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\"}},selectedImage.id)]});})()}),/*#__PURE__*/_jsx(\"nav\",{\"aria-label\":isArabic?\"الصور\":\"Images\",style:{display:\"flex\",flex:\"none\",height:\"calc(84px + env(safe-area-inset-bottom))\",boxSizing:\"border-box\",gap:8,justifyContent:\"safe center\",alignItems:\"center\",overflowX:\"auto\",overflowY:\"hidden\",background:\"#23282E\",borderTop:\"1px solid #3D454D\",padding:\"8px 12px calc(8px + env(safe-area-inset-bottom))\"},children:previews.map(item=>/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:()=>setSelectedImageId(item.id),\"aria-label\":isArabic?\"عرض الصورة\":\"Open image\",\"aria-current\":item.id===selectedImage.id?\"true\":undefined,style:{border:item.id===selectedImage.id?\"2px solid #6AE6DA\":\"2px solid transparent\",padding:0,width:56,height:56,flex:\"none\",background:\"#353943\",borderRadius:8,overflow:\"hidden\",cursor:\"pointer\"},children:/*#__PURE__*/_jsx(\"img\",{src:item.url,alt:\"\",style:{width:\"100%\",height:\"100%\",objectFit:\"cover\"}})},item.id))})]}),document.body)]});});}// Process button\nimport{withProcessOrder as withLimitedProcessOrder,withProcessOrderAR as withLimitedProcessOrderAR}from\"https://framerusercontent.com/modules/MAMIOB9plPZoaxkt5kNy/OrpgpWDO1v4kE9Aov4Ne/ProcessOrderOverrides.js\";export function withProcessOrder(Component){return withLimitedProcessOrder(Component);}export function withProcessOrderAR(Component){return withLimitedProcessOrderAR(Component);}\nexport const __FramerMetadata__ = {\"exports\":{\"withFileUpload\":{\"type\":\"reactHoc\",\"name\":\"withFileUpload\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withProcessOrder\":{\"type\":\"reactHoc\",\"name\":\"withProcessOrder\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withProcessOrderAR\":{\"type\":\"reactHoc\",\"name\":\"withProcessOrderAR\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{getOrCreateSandboxSession}from\"https://framerusercontent.com/modules/4mb9AGTRSXbdIOaiSL4d/w5hKxaw3kAFkphDeKqwb/SandboxAuth.js\";import{waitForPendingWork}from\"https://framerusercontent.com/modules/SXpJlvCHveae4cCrd2eo/9wdLupuDXRBW40x54WMm/SandboxPendingWork.js\";import{forwardRef,useRef,useState}from\"react\";import{markProcessClick}from\"https://framerusercontent.com/modules/NMDi9kbZ72wqClXRLTyP/mU101vBmg3GRxNs4bvX5/YuraSandboxAnalytics.js\";const SUPABASE_URL=\"https://vrzuhifrrkgviiiepzgw.supabase.co\";const SUPABASE_ANON_KEY=\"sb_publishable_xFNP2vmQ6fyD3MtOo8mMeQ_dTJ60SdH\";const YURA_PROCESSING_ORDER_KEY=\"yura_processing_order_id\";const YURA_PROCESSING_JOB_KEY=\"yura_processing_job_id\";// Upload container\nexport function withFileUpload(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const inputRef=useRef(null);const[fileCount,setFileCount]=useState(0);const openPicker=()=>{inputRef.current?.click();};const handleFiles=event=>{const files=event.target.files;if(files){setFileCount(files.length);}};return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"input\",{ref:inputRef,type:\"file\",accept:\"image/*\",multiple:true,onChange:handleFiles,style:{display:\"none\"}}),/*#__PURE__*/_jsx(Component,{ref:ref,...props,onTap:openPicker,style:{...props.style,cursor:\"pointer\"}}),fileCount>0&&/*#__PURE__*/_jsxs(\"div\",{style:{position:\"absolute\",bottom:12,left:12,right:12,padding:\"8px 12px\",borderRadius:8,background:\"#000\",color:\"#fff\",fontSize:13,textAlign:\"center\",fontFamily:'\"IBM Plex Sans\", \"IBM Plex Sans Arabic\", sans-serif',pointerEvents:\"none\"},children:[fileCount,\" image\",fileCount!==1?\"s\":\"\",\" selected\"]})]});});}function createProcessOverride(isArabic){return function processOverride(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const isSubmittingRef=useRef(false);const[isSubmitting,setIsSubmitting]=useState(false);const[uploadWarning,setUploadWarning]=useState(false);const handleProcess=async()=>{if(isSubmittingRef.current)return;if(typeof window===\"undefined\")return;if(isSubmittingRef.current)return;if(typeof window===\"undefined\")return;markProcessClick(isArabic?\"ar\":\"en\");isSubmittingRef.current=true;setIsSubmitting(true);try{await waitForPendingWork();const session=await getOrCreateSandboxSession();const accessToken=session?.access_token;const userId=session?.user?.id;if(!accessToken||!userId){throw new Error(\"Sandbox session is missing\");}const orderId=sessionStorage.getItem(\"yura_current_sandbox_order_id\");if(!orderId){isSubmittingRef.current=false;setIsSubmitting(false);setUploadWarning(true);return;}// Do not allow processing without at least one uploaded image.\nconst sourceResponse=await fetch(`${SUPABASE_URL}/rest/v1/sandbox_order_sources?select=id&sandbox_order_id=eq.${encodeURIComponent(orderId)}&is_active_for_processing=eq.true&limit=1`,{headers:{apikey:SUPABASE_ANON_KEY,Authorization:`Bearer ${accessToken}`}});if(!sourceResponse.ok){throw new Error(\"Failed to verify uploaded images\");}const sources=await sourceResponse.json();if(!Array.isArray(sources)||sources.length===0){isSubmittingRef.current=false;setIsSubmitting(false);setUploadWarning(true);return;}const jobId=crypto.randomUUID();const updateResponse=await fetch(`${SUPABASE_URL}/rest/v1/sandbox_orders?id=eq.${encodeURIComponent(orderId)}&select=id,status,job_id`,{method:\"PATCH\",headers:{apikey:SUPABASE_ANON_KEY,Authorization:`Bearer ${accessToken}`,\"Content-Type\":\"application/json\",Prefer:\"return=representation\"},body:JSON.stringify({status:\"processing\",job_id:jobId})});if(!updateResponse.ok){const result=await updateResponse.text();throw new Error(result||\"Failed to prepare order for processing\");}const updatedOrders=await updateResponse.json();if(!updatedOrders?.length){throw new Error(\"Order was not updated. The current session does not own this order.\");}sessionStorage.setItem(YURA_PROCESSING_ORDER_KEY,orderId);sessionStorage.setItem(YURA_PROCESSING_JOB_KEY,jobId);window.location.assign(isArabic?\"/processingpage?lang=ar\":\"/processingpage\");}catch(error){console.error(\"Failed to start processing:\",error);isSubmittingRef.current=false;setIsSubmitting(false);}};return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Component,{ref:ref,...props,onTap:handleProcess,\"aria-busy\":isSubmitting,style:{...props.style,cursor:isSubmitting?\"wait\":\"pointer\",opacity:isSubmitting?.65:1,pointerEvents:isSubmitting?\"none\":\"auto\"}}),uploadWarning&&/*#__PURE__*/_jsx(\"div\",{dir:isArabic?\"rtl\":\"ltr\",style:{position:\"fixed\",top:60,left:\"50%\",transform:\"translateX(-50%)\",zIndex:9999,width:\"calc(100% - 32px)\",maxWidth:520,boxSizing:\"border-box\",padding:\"10px 14px\",border:\"1px solid #F1C7C7\",borderRadius:10,background:\"#FFF6F6\",color:\"#A33F3F\",fontSize:13,fontWeight:500,textAlign:isArabic?\"right\":\"left\",fontFamily:'\"IBM Plex Sans Arabic\", \"IBM Plex Sans\", sans-serif',boxShadow:\"0 8px 24px rgba(15,23,42,0.08)\"},children:isArabic?\"يرجى رفع صورة واحدة على الأقل قبل معالجة الطلب.\":\"Please upload at least one image before processing the order.\"})]});});};}// English Process button\nexport function withProcessOrder(Component){return createProcessOverride(false)(Component);}// Arabic Process button\nexport function withProcessOrderAR(Component){return createProcessOverride(true)(Component);}\nexport const __FramerMetadata__ = {\"exports\":{\"withProcessOrderAR\":{\"type\":\"reactHoc\",\"name\":\"withProcessOrderAR\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFileUpload\":{\"type\":\"reactHoc\",\"name\":\"withFileUpload\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withProcessOrder\":{\"type\":\"reactHoc\",\"name\":\"withProcessOrder\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"A,ylBACgM,EAAK,0BAAgC,EAAkB,gBAAW,SAAS,EAAM,EAAI,CAAC,MAAoB,gBAAK,MAAM,CAAC,GAAG0F,EAAU,MAAI,SAASA,EAAM,QAAQ,CAAC,CAAE,CAAC,EAAQ,EAAU5B,EAAO,OAAOoB,CAAI,EAAQ,EAAiB,iBAAY,EAAM,IAAM,CAAC,GAAK,CAAC,WAAS,WAAS,WAAS,GAAGS,GAAMD,EAAM,OAAOE,EAAsB,gBAAKT,EAAU,CAAC,GAAGQ,EAAc,WAAa,MAAa,UAAQ,CAAC,EAAe,gBAAK,MAAM,CAAC,GAAGA,EAAS,MAAa,UAAQ,CAAC,CAAE,CAAC,EAAQ,EAAI,+4BAAq5B3F,IAAU,CAAC,QAAM,SAAO,KAAG,QAAM,SAAO,GAAG0F,MAAgB,CAAC,GAAGA,EAAM,UAAUG,GAAQH,EAAM,WAAW,EAAE,UAAUI,GAAOJ,EAAM,WAAW,cAAc,GAS3rD,EAAKzB,EATutDhE,kBAAiB,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