1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11860],{4662:(e,t,r)=>{"use strict";r.d(t,{DH:()=>c,PW:()=>o,Yp:()=>d});var n=r(22356),a=r(26708),s=r(35625),i=r(48934);let l="/widget";function o(){return(0,a.I)({queryKey:["widget","getAll"],queryFn:async()=>await n.FH.get(l+"/GetAll"),select:e=>e.data})}function d(){let e=(0,s.jE)();return(0,i.n)({mutationFn:async e=>await n.FH.delete(l+`/RemoveById/${e}`),onSuccess:()=>{e.invalidateQueries({queryKey:["widget"]})}})}function c(){let e=(0,s.jE)();return(0,i.n)({mutationFn:async e=>await n.FH.post(l+"/Save",e),onSuccess:()=>{e.invalidateQueries({queryKey:["widget"]})}})}},9339:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={callServer:function(){return s.callServer},createServerReference:function(){return l.createServerReference},findSourceMapURL:function(){return i.findSourceMapURL}};for(var a in n)Object.defineProperty(t,a,{enumerable:!0,get:n[a]});let s=r(77304),i=r(4060),l=r(77197)},13220:(e,t,r)=>{"use strict";r.d(t,{k5:()=>c});var n=r(12115),a={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},s=n.createContext&&n.createContext(a),i=["attr","size","title"];function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach(function(t){var n,a,s;n=e,a=t,s=r[t],(a=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(a))in n?Object.defineProperty(n,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):n[a]=s}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function c(e){return t=>n.createElement(u,l({attr:d({},e.attr)},t),function e(t){return t&&t.map((t,r)=>n.createElement(t.tag,d({key:r},t.attr),e(t.child)))}(e.child))}function u(e){var t=t=>{var r,{attr:a,size:s,title:o}=e,c=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,i),u=s||t.size||"1em";return t.className&&(r=t.className),e.className&&(r=(r?r+" ":"")+e.className),n.createElement("svg",l({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,a,c,{className:r,style:d(d({color:e.color||t.color},t.style),e.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),o&&n.createElement("title",null,o),e.children)};return void 0!==s?n.createElement(s.Consumer,null,e=>t(e)):t(a)}},15446:(e,t,r)=>{"use strict";r.d(t,{A:()=>x});var n=r(95155),a=r(12115),s=r(47650),i=r(8831),l=r(33423),o=r(53129),d=r(81951);let c={small:"min-h-9 px-3 py-1.5 text-xs",middle:"min-h-10 px-3 py-2 text-sm",large:"min-h-11 px-4 py-2.5 text-sm"};function u(e){return String(e||"").trim().toLowerCase()}function p(e,t){return"slug"===t?e.slug:e.id}function m({language:e,muted:t,compact:r}){return(0,n.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,n.jsx)("span",{className:(0,d.cn)("inline-flex shrink-0 items-center justify-center border border-slate-200 bg-white shadow-sm",r?"h-5 w-7 rounded-[7px]":"h-6 w-8 rounded-md"),children:(0,n.jsx)(i.A,{code:e.flag||"",size:r?18:22,fallback:(0,n.jsx)("span",{className:"text-[10px] text-slate-400",children:"--"})})}),(0,n.jsx)("span",{className:(0,d.cn)("min-w-0 truncate font-iran",t?"text-slate-500":"text-slate-800 dark:text-slate-100"),children:e.title}),(0,n.jsxs)("span",{className:"shrink-0 text-[11px] text-slate-400",children:["(",e.slug,")"]}),!r&&e.isDefault?(0,n.jsx)("span",{className:"shrink-0 rounded-full bg-amber-100 px-2 py-0.5 text-[10px] font-medium text-amber-700",children:"Ù¾ÛØ´âÙØ±Ø¶"}):null,r||!1!==e.isEnabled?null:(0,n.jsx)("span",{className:"shrink-0 rounded-full bg-rose-100 px-2 py-0.5 text-[10px] font-medium text-rose-700",children:"ØºÛØ±ÙعاÙ"})]})}
1function x({value:e,onChange:t,size:r="middle",returnType:i="id",includeDisabled:g=!1,allowedSlugs:f,disabled:h,id:b,compact:y=!1}){let v=l.PW(),j="dark"===(0,o.f)(e=>e.themeMode),[w,N]=(0,a.useState)(!1),[k,S]=(0,a.useState)(""),[C,O]=(0,a.useState)(null),P=(0,a.useRef)(null),E=(0,a.useRef)(null),$=v.data||[],I=(0,a.useMemo)(()=>$.filter(e=>!!g||!1!==e.isEnabled).filter(e=>!f?.length||f.includes(e.slug)).sort((e,t)=>e.isDefault&&!t.isDefault?-1:!e.isDefault&&t.isDefault?1:e.title.localeCompare(t.title,"fa")),[$,f,g]),F=(0,a.useMemo)(()=>$.find(t=>p(t,i)===e),[$,i,e]),M=(0,a.useMemo)(()=>{let e=u(k);return e?I.filter(t=>u(`${t.title} ${t.slug} ${t.flag||""}`).includes(e)):I},[I,k]),A=Number.isFinite(C?.maxHeight)?Math.max(112,Number(C?.maxHeight)-(y?42:54)):y?218:266;(0,a.useEffect)(()=>{if(!w)return;let e=()=>{let e=P.current?.getBoundingClientRect();if(!e)return;let t=Math.max(160,window.innerHeight-e.bottom-6-10);O({left:e.left,top:e.bottom+6,width:e.width,maxHeight:y?Math.min(260,t):Math.min(320,t)})};e();let t=e=>{let t=e.target;P.current?.contains(t)||E.current?.contains(t)||N(!1)};return window.addEventListener("pointerdown",t),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("pointerdown",t),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}},[y,w]);let W=w&&C&&"u">typeof document?(0,s.createPortal)((0,n.jsxs)("div",{ref:E,className:(0,d.cn)("overflow-hidden border shadow-2xl",y?"rounded-[10px]":"rounded-2xl",j?"border-slate-700 bg-slate-900 text-slate-100":"border-slate-200 bg-white text-slate-800"),dir:"rtl",style:{position:"fixed",left:C.left,top:C.top,width:C.width,zIndex:6500},children:[(0,n.jsx)("div",{className:"border-b border-slate-200 p-2 dark:border-slate-700",children:(0,n.jsx)("input",{value:k,onChange:e=>S(e.target.value),placeholder:"جستجÙÛ Ø²Ø¨Ø§Ù...",className:(0,d.cn)("w-full border outline-none transition focus:border-emerald-500 focus:ring-2 focus:ring-emerald-200",y?"rounded-[10px] px-2 py-1 text-[10px]":"rounded-xl px-3 py-2 text-sm",j?"border-slate-700 bg-slate-800 text-slate-100 placeholder:text-slate-500":"border-slate-200 bg-slate-50 text-slate-800")})}),(0,n.jsx)("div",{className:"overflow-y-auto p-1",style:{maxHeight:A},children:M.length?M.map(r=>{let a=p(r,i),s=a===e;return(0,n.jsxs)("button",{type:"button",onClick:()=>{t?.(a),N(!1),S("")},className:(0,d.cn)("flex w-full items-center justify-between gap-3 text-right transition",y?"rounded-[10px] px-2 py-1 text-[10px]":"rounded-xl px-3 py-2",s?"bg-emerald-50 text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-200":"hover:bg-slate-100 dark:hover:bg-slate-800"),children:[(0,n.jsx)(m,{language:r,muted:!s&&!1===r.isEnabled,compact:y}),s?(0,n.jsx)("i",{className:"fas fa-check text-xs text-emerald-500"}):null]},r.id)}):(0,n.jsx)("div",{className:"px-3 py-6 text-center text-xs text-slate-500",children:"زباÙÛ Ù¾ÛØ¯Ø§ ÙØ´Ø¯."})})]}),document.body):null;return(0,n.jsxs)("div",{ref:P,className:"relative w-full font-iran",dir:"rtl",children:[(0,n.jsxs)("button",{id:b,type:"button",disabled:h||v.isLoading,onClick:()=>!h&&N(e=>!e),className:(0,d.cn)("flex w-full cursor-pointer items-center justify-between gap-3 rounded-xl border text-right outline-none transition focus:border-emerald-500 focus:ring-2 focus:ring-emerald-200 disabled:cursor-not-allowed disabled:opacity-70",y?"min-h-6 rounded-[10px] px-2 py-0.5 text-[10px]":c[r],j?"border-slate-700 bg-slate-900 text-slate-100":"border-slate-300 bg-white text-slate-800"),children:[(0,n.jsx)("span",{className:"min-w-0 flex-1",children:F?(0,n.jsx)(m,{language:F,compact:!0}):(0,n.jsx)("span",{className:"text-slate-400",children:v.isLoading?"در ØØ§Ù بارگذارÛ...":"Ø§ÙØªØ®Ø§Ø¨ زباÙ"})}),(0,n.jsx)("i",{className:(0,d.cn)("fas fa-chevron-down text-[11px] text-slate-400 transition",w&&"rotate-180")})]}),W]})}},15508:(e,t,r)=>{"use strict";r.d(t,{M:()=>a});var n=r(12115);function a(e,t="تغÛÛØ±Ø§Øª Ø°Ø®ÛØ±Ù ÙØ´Ø¯Ù Ø¯Ø§Ø±ÛØ¯. ÙØ¨Ù از Ø®Ø±ÙØ¬Ø تغÛÛØ±Ø§Øª را Ø°Ø®ÛØ±Ù Ú©ÙÛØ¯Ø در ØºÛØ± اÛÙ ØµÙØ±Øª Ù
Ù
ک٠است از بÛ٠برÙÙØ¯."){let r=(0,n.useRef)(e),s=(0,n.useRef)(t);(0,n.useEffect)(()=>{r.current=e,s.current=t},[e,t]);let i=(0,n.useCallback)(()=>!r.current||window.confirm(s.current),[]);return(0,n.useEffect)(()=>{let e=e=>{if(r.current)return e.preventDefault(),e.returnValue=s.current,s.current},t=e=>{if(!r.current||e.defaultPrevented||0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=e.target instanceof Element?e.target:null,n=t?.closest("a[href]");if(!n||n.target&&"_self"!==n.target||n.hasAttribute("download"))return;let a=new URL(n.href,window.location.href);a.origin!==window.location.origin||a.href!==window.location.href&&(window.confirm(s.current)||(e.preventDefault(),e.stopPropagation()))};return window.addEventListener("beforeunload",e),document.addEventListener("click",t,!0),()=>{window.removeEventListener("beforeunload",e),document.removeEventListener("click",t,!0)}},[]),{confirmNavigation:i}}},31048:(e,t,r)=>{"use strict";r.d(t,{Jt:()=>g,SQ:()=>o,Yp:()=>u,_i:()=>d,aH:()=>x,o6:()=>c,su:()=>f,xS:()=>m,yK:()=>p});var n=r(22356),a=r(26708),s=r(35625),i=r(48934);let l="/appContainer";function o(e){return(0,a.I)({queryKey:["container","getById",e],queryFn:async()=>await n.FH.get(l+`/GetById/${e}`),select:e=>e.data})}function d(e,t){return(0,a.I)({queryKey:["container","getByTypeAndSlug",e,t],queryFn:async()=>await n.FH.post(l+"/GetAllByTypeAndSlug",{type:e,slug:t}),select:e=>e.data})}function c(e){return(0,a.I)({queryKey:["container","getAllByType",e],queryFn:async()=>await n.FH.get(l+`/GetAllByType/${e}`),select:e=>e.data,staleTime:0})}function u(){var e=(0,s.jE)();return(0,i.n)({mutationFn:async e=>await n.FH.delete(l+`/RemoveById/${e}`),onSuccess:(t,r)=>{e.setQueriesData({queryKey:["container","getAllByType"]},e=>Array.isArray(e)?e.filter(e=>e.id!==r):e),e.setQueriesData({queryKey:["container","getAll"]},e=>Array.isArray(e)?e.filter(e=>
1e.id!==r):e),e.invalidateQueries({queryKey:["container"]})}})}function p(){var e=(0,s.jE)();return(0,i.n)({mutationFn:async e=>await n.FH.post(l+"/Create",e),onSuccess:t=>{let r=t?.data;r?.id&&e.setQueryData(["container","getById",r.id],r),e.invalidateQueries({queryKey:["container"],refetchType:"active"})}})}function m(){var e=(0,s.jE)();return(0,i.n)({mutationFn:async({model:e,allowEmptyContentOverwrite:t=!1})=>await n.FH.put(l+"/update",e,{params:{allowEmptyContentOverwrite:t}}),onSuccess:t=>{let r=t?.data;r?.id&&(e.setQueriesData({queryKey:["container","getAllByType"]},e=>Array.isArray(e)?e.map(e=>e.id===r.id?{...e,...r}:e):e),e.setQueriesData({queryKey:["container","getAll"]},e=>Array.isArray(e)?e.map(e=>e.id===r.id?{...e,...r}:e):e),e.setQueryData(["container","getById",r.id],r)),e.invalidateQueries({queryKey:["container"],refetchType:"active"})}})}function x(e,t=!0){return(0,a.I)({queryKey:["container","revisions",e],queryFn:async()=>{let{data:t}=await n.FH.get(l+`/GetRevisions/${e}`);return t},enabled:t&&!!e,staleTime:0})}function g(){let e=(0,s.jE)();return(0,i.n)({mutationFn:async({containerId:e,revisionId:t})=>{let{data:r}=await n.FH.post(l+`/RestoreRevision/${e}/${t}`);return r},onSuccess:t=>{t?.id&&(e.setQueryData(["container","getById",t.id],t),e.invalidateQueries({queryKey:["container","revisions",t.id]})),e.invalidateQueries({queryKey:["container"],refetchType:"active"})}})}function f(){let e=(0,s.jE)();return(0,i.n)({mutationFn:async e=>{let{data:t}=await n.FH.post(l+"/DuplicateToLanguage",e);return t},onSuccess:()=>{e.invalidateQueries({queryKey:["container"],refetchType:"active"})}})}},33423:(e,t,r)=>{"use strict";r.d(t,{PW:()=>c,SQ:()=>u,Yp:()=>x,xS:()=>m,yK:()=>p});var n=r(26708),a=r(35625),s=r(48934),i=r(22356);let l=["admin-i18n","languages"],o=e=>["admin-i18n","languages",e];function d(e){return e?e.id||e.slug?e:e.language?e.language:e.data?.language?e.data.language:e.data?.id||e.data?.slug?e.data:null:null}let c=()=>(0,n.I)({queryKey:l,queryFn:async()=>{let{data:e}=await i.FH.get("/admin/i18n/languages");return Array.isArray(e)?e:Array.isArray(e?.languages)?e.languages:Array.isArray(e?.data?.languages)?e.data.languages:[]},staleTime:6e5,gcTime:18e5,refetchOnWindowFocus:!1,refetchOnReconnect:!1}),u=e=>(0,n.I)({queryKey:o(e),enabled:!!e,queryFn:async()=>{let{data:t}=await i.FH.get(`/admin/i18n/languages/${e}`),r=d(t);if(!r)throw Error("language payload is invalid");return r},staleTime:6e5,gcTime:18e5,refetchOnWindowFocus:!1,refetchOnReconnect:!1}),p=()=>{let e=(0,a.jE)();return(0,s.n)({mutationFn:async e=>{let{data:t}=await i.FH.post("/admin/i18n/languages",e),r=d(t);if(!r)throw Error("language payload is invalid");return r},onSuccess:()=>{e.invalidateQueries({queryKey:l})}})},m=()=>{let e=(0,a.jE)();return(0,s.n)({mutationFn:async e=>{if(!e.id)throw Error("id is required");let{data:t}=await i.FH.put(`/admin/i18n/languages/${e.id}`,e),r=d(t);if(!r)throw Error("language payload is invalid");return r},onSuccess:(t,r)=>{e.invalidateQueries({queryKey:l}),r.id&&e.invalidateQueries({queryKey:o(r.id)})}})},x=()=>{let e=(0,a.jE)();return(0,s.n)({mutationFn:async e=>(await i.FH.delete(`/admin/i18n/languages/${e}`),!0),onSuccess:()=>{e.invalidateQueries({queryKey:l})}})}},65717:e=>{e.exports={style:{fontFamily:"'iranFont', 'iranFont Fallback'"},className:"__className_7cd1d9"}},80445:(e,t,r)=>{"use strict";function n(e){return"rtl"===e?"/assets/css":"/en/assets/css"}function a(e){return`${n(e)}/style.css`}function s(e){return"rtl"===e?"/assets/js/main.js":"/en/assets/js/main.js"}r.d(t,{MA:()=>n,Q3:()=>s,jk:()=>a}),r(8454)},95415:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>ew});var n=r(95155),a=r(39092),s=r.n(a),i=r(37206),l=r(60180),o=r(12115),d=r(90346),c=r(53129),u=r(80283);function p(e){let t=(0,u.s0)(),r="dark"===(0,c.f)(e=>e.themeMode),a="widgets"===e.id?t.isWidgetsModalOpen:"settings"===e.id?t.isWidgetPropertiesModalOpen:t.selectedSection===e.id;return(0,n.jsxs)("div",{onClick:()=>{if("widgets"===e.id)return void t.setWidgetsModalOpen(!t.isWidgetsModalOpen);if(t.setSection(e.id),"settings"===e.id){if(!t.selectedWidget)return;t.setWidgetPropertiesModalOpen(!t.isWidgetPropertiesModalOpen)}},className:["flex h-5 cursor-pointer items-center justify-center gap-0.5 rounded px-1 font-iran text-[10px] transition-colors",a?r?"text-emerald-300":"text-emerald-700":r?"text-slate-300 hover:text-white":"text-slate-600 hover:text-slate-900"].join(" "),children:[(0,n.jsx)(d.m_,{title:e.title,children:(0,n.jsx)("span",{className:"flex items-center justify-center text-[10px]",children:e.icon})}),(0,n.jsx)("span",{children:e.title})]})}let m=[{key:"desktop",title:"دسکتاپ",icon:(0,n.jsx)(l.zl,{className:"text-[13px]"})},{key:"tablet",title:"ØªØ¨ÙØª",icon:(0,n.jsx)(l.pL,{className:"text-[13px]"})},{key:"mobile",title:"Ù
ÙØ¨Ø§ÛÙ",icon:(0,n.jsx)(l.jH,{className:"text-[13px]"})}];function x(){let e=(0,u.s0)(e=>e.setResponsiveSelected),t=(0,u.s0)(e=>e.responsiveSelected),r="dark"===(0,c.f)(e=>e.themeMode);return(0,n.jsx)("div",{className:["flex h-6 shrink-0 items-center justify-center gap-0.5 rounded-md border px-0.5",r?"border-slate-700 bg-slate-900/70":"border-slate-200 bg-white"].join(" "),children:m.map(a=>(0,n.jsx)(d.m_,{title:a.title,children:(0,n.jsx)("button",{type:"button",onClick:()=>e(a.key),"aria-pressed":t===a.key,className:["inline-flex h-5 min-w-[22px] items-center justify-center overflow-hidden rounded px-1 transition-colors duration-150 cursor-pointer focus:outline-none focus:ring-2 focus:ring-emerald-400/40",t===a.key?r?"text-emerald-300":"text-emerald-700":r?"text-slate-300 hover:text-white":"text-slate-600 hover:text-slate-900"].join(" "),children:a.icon})},a.key))})}var g=r(42799),f=r(72635),h=r(15446),b=r(4662);function y(e){return"function"==typeof structuredClone?structuredClone(e):JSON.parse(JSON.stringify(e))}function v({node:e}){let t=(0,u.sr)(t=>t.pageProperties?.language?.id||e.languageId||""),r=b.DH(),[a,s]=(0,o.useState)(!1),[i]=d.lV.useForm();return(0,o.useEffect)(()=>{a&&i.setFieldsValue({title:e.title,languageId:t})},[t,i,e.title,a]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.aF,{open:a,footer:null,destroyOnHidden:!0,onCancel:()=>s(!1),className:"font-iran text-xs",title:"Ø°Ø®ÛØ±Ù در کتابخاÙ٠بÙÙÚ©âÙØ§",children:(0,n.jsxs)(d.lV,{form:i,layout:"vertical",dir:"rtl",onFinish:t=>{let n="u">typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():`${Date.now()}-${Math.random().toString(16).slice(2)}`,a={...e,id:n,parentId:void 0,title:t.title.trim(),languageId:t.languageId,category:"saved",icon:null,defaultProps:y(e.defaultProps||{}),children:y(Array.isArray(e.children)?e.children:[])};r.mutate(a,{onSuccess:()=>{s(!1),i.resetFields()}})},autoComplete:"off",children:[(0,n.jsx)("div",{className:"mb-4 rounded-xl border border-emerald-200 bg-emerald-50 px-3 py-2 text-xs leading-6 text-emerald-800",children:"ÛÚ© ÙØ³Ø®Ù Ù
ستÙ٠از اÛÙ ÙÛØ¬Øª ٠تÙ
اÙ
ÙØ±Ø²ÙØ¯Ø§Ù Ø¢Ù Ø°Ø®ÛØ±Ù Ù
ÛâØ´ÙØ¯. ØµÙØÙ Ø¬Ø§Ø±Û ØªØºÛÛØ± ÙÙ
ÛâÚ©ÙØ¯."}),(0,n.jsx)(d.lV.Item,{label:"عÙÙØ§Ù بÙÙÚ©",name:"title",rules:[{required:!0,message:"عÙÙØ§Ù بÙÙÚ© را ÙØ§Ø±Ø¯ Ú©ÙÛØ¯."},{max:120,message:"عÙÙØ§Ù ÙØ¨Ø§Ûد Ø¨ÛØ´ØªØ± از Û±Û²Û° ÙÙÛØ³Ù باشد."}],children:(0,n.jsx)(d.pd,{maxLength:120})}),(0,n.jsx)(d.lV.Item,{label:"زباÙ",name:"languageId",rules:[{required:!0,message:"زبا٠بÙÙÚ© را Ø§ÙØªØ®Ø§Ø¨ Ú©ÙÛØ¯."}],children:(0,n.jsx)(h.A,{size:"middle"})}),r.isError?(0,n.jsx)("div",{className:"mb-3 rounded-xl border border-rose-200 bg-rose-50 px-3 py-2 text-xs text-rose-700",children:"Ø°Ø®ÛØ±Ù بÙÙÚ© Ø§ÙØ¬Ø§Ù
ÙØ´Ø¯. Ø§ØªØµØ§Ù Ù Ø¯Ø³ØªØ±Ø³Û Ù
Ø¯ÛØ±Ûت ÙÛØ¬ØªâÙØ§ را Ø¨Ø±Ø±Ø³Û Ú©ÙÛØ¯."}):null,(0,n.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,n.jsx)(d.$n,{type:"default",onClick:()=>s(!1),children:"Ø§ÙØµØ±Ø§Ù"}),(0,n.jsx)(d.$n,{htmlType:"submit",type:"primary",disabled:r.isPending,children:r.isPending?(0,n.jsx)(d.tK,{size:"small"}):"Ø°Ø®ÛØ±Ù بÙÙÚ©"})]})]})}),(0,n.jsx)("button",{type:"button",onClick:()=>s(!0),className:"flex h-5 w-5 items-center justify-center rounded transition-colors hover:bg-emerald-50 hover:text-emerald-700",title:"Ø°Ø®ÛØ±Ù در کتابخاÙ٠بÙÙÚ©âÙØ§","aria-label":"Ø°Ø®ÛØ±Ù در کتابخاÙ٠بÙÙÚ©âÙØ§",children:r.isPending?(0,n.jsx)(d.tK,{size:"small"}):(0,n.jsx)(f.In,{icon:"mdi:content-save-plus-outline",className:"text-xs"})})]})}var j=r(10253),w=r(92318);function N(){let e=(0,u.sr)(),t=(0,u.s0)(),r=(0,u.s0)(e=>e.selectedWidget),a=(0,u.s0)(e=>e.widgetClipboard),s=(0,u.s0)(e=>e.movingWidgetId),i=(0,u.sr)(e=>e.getNodeById),o="dark"===(0,c.f)(e=>e.themeMode),p=["flex h-5 w-5 items-center justify-center rounded transition-colors disabled:cursor-not-allowed disabled:opacity-35",o?"hover:bg-slate-800":"hover:bg-slate-100"].join(" ");if(!r)return(0,n.jsx)("div",{className:["flex h-6 items-center gap-1 rounded-md border px-1.5 font-iran text-[10px]",o?"border-slate-700 bg-slate-900/70 text-slate-400":"border-slate-200 bg-white text-slate-500"].join(" "),children:(0,n.jsx)("span",{children:"ÛÚ© ÙÛØ¬Øª را Ø§ÙØªØ®Ø§Ø¨ Ú©ÙÛØ¯"})});let m=r?.type===g.x.grid&&!!r.defaultProps?.isRootLayout,x=e.findParentId(r.id),f=x?e.getNodeById(x)?.children||[]:e.nodes,h=f.findIndex(e=>e.id===r.id),b=!m&&h>-1&&h<f.length-1,y=a?.sourceId===r.id?a.mode:void 0,N=s===r.id,k=(0,j.M)(r,i),S=(0,w.Yp)(r);return(0,n.jsxs)("div",{className:["flex h-6 items-center gap-0.5 rounded-md border px-1",o?"border-slate-700 bg-slate-900/70 text-slate-100":"border-slate-200 bg-white text-slate-800"].join(" "),children:[(0,n.jsx)("div",{className:"min-w-0 max-w-[110px] px-1 font-iran",children:(0,n.jsx)("div",{className:"truncate text-[10px] font-semibold",children:k})}),m?null:(0,n.jsx)("button",{type:"button",disabled:!(!m&&h>0),onClick:()=>e.moveNodeByStep(r.id,-1),className:p,title:"Ø§ÙØªÙØ§Ù Ø¨Ù Ø¨Ø§ÙØ§ØªØ±","aria-label":"Ø§ÙØªÙØ§Ù Ø¨Ù Ø¨Ø§ÙØ§ØªØ±",children:(0,n.jsx)(l.lu,{})}),m?null:(0,n.jsx)("button",{type:"button",disabled:!b,onClick:()=>e.moveNodeByStep(r.id,1),className:p,title:"Ø§ÙØªÙا٠ب٠پاÛÛÙâØªØ±","aria-label":"Ø§ÙØªÙا٠ب٠پاÛÛÙâØªØ±",children:(0,n.jsx)(l.Ax,{})}),m?null:(0,n.jsx)("button",{type:"button",onClick:()=>{N?t.clearCanvasIntent():t.startMovingWidget(r.id),t.setWidgetsModalOpen(!0)},className:[p,N?o?"bg-amber-500/15 text-amber-200":"bg-amber-50 text-amber-700":""].join(" "),title:N?"در Ø§ÙØªØ¸Ø§Ø± Ø§ÙØªØ®Ø§Ø¨ Ù
ÙØµØ¯":"Ø§ÙØªÙا٠ب٠بخش دÛگر","aria-label":N?"در Ø§ÙØªØ¸Ø§Ø± Ø§ÙØªØ®Ø§Ø¨ Ù
ÙØµØ¯":"Ø§ÙØªÙا٠ب٠بخش دÛگر",children:(0,n.jsx)(l.qw,{})}),m?null:(0,n.jsx)("button",{type:"button",onClick:()=>t.setWidgetClipboard(r.id,"copy"),className:[p,"copy"===y?o?"bg-emerald-500/15 text-emerald-200":"bg-emerald-50 text-emerald-700":""].join(" "),title:"Ú©Ù¾Û","aria-label":"Ú©Ù¾Û",children:(0,n.jsx)(l.wq,{})}),m?null:(0,n.jsx)("button",{type:"button",onClick:()=>t.setWidgetClipboard(r.id,"cut"),className:[p,"cut"===y?o?"bg-amber-500/15 text-amber-200":"bg-amber-50 text-amber-700":""].join(" "),title:"برش","aria-label":"برش",children:(0,n.jsx)(l.p9,{})}),m?null:(0,n.jsx)("button",{type:"button",onClick:()=>{let n=e.duplicateNode(r.id);t.setWidget(n),t.setSection("settings"),t.setWidgetPropertiesAnchor(void 0),t.setWidgetPropertiesModalOpen(!0)},className:p,title:"ØªÚ©Ø«ÛØ±","aria-label":"ØªÚ©Ø«ÛØ±",children:(0,n.jsx)(l.wq,{})}),m?null:(0,n.jsx)(v,{node:r}),m?null:(0,n.jsx)("button",{type:"button",onClick:()=>{m||e.updateNode(r.id,{defaultProps:(0,w.AC)(r,!S)})},className:[p,!S?o?"bg-amber-500/15 text-amber-200 hover:bg-amber-500/20":"bg-
1amber-50 text-amber-700 hover:bg-amber-100":""].join(" "),title:S?"Ù
Ø®ÙÛ Ú©Ø±Ø¯Ù ÙÛØ¬Øª در Ø®Ø±ÙØ¬Û Ø³Ø§ÛØª":"ÙÙ
Ø§ÛØ´ Ø¯ÙØ¨Ø§Ø±Ù ÙÛØ¬Øª در Ø®Ø±ÙØ¬Û Ø³Ø§ÛØª","aria-label":S?"Ù
Ø®ÙÛ Ú©Ø±Ø¯Ù ÙÛØ¬Øª در Ø®Ø±ÙØ¬Û Ø³Ø§ÛØª":"ÙÙ
Ø§ÛØ´ Ø¯ÙØ¨Ø§Ø±Ù ÙÛØ¬Øª در Ø®Ø±ÙØ¬Û Ø³Ø§ÛØª","aria-pressed":!S,children:S?(0,n.jsx)(l.Om,{}):(0,n.jsx)(l.LC,{})}),(0,n.jsx)("button",{type:"button",onClick:e=>{let r=e.currentTarget.getBoundingClientRect();t.setSection("settings"),t.setWidgetPropertiesAnchor({right:r.right,top:r.bottom+8}),t.setWidgetPropertiesModalOpen(!0)},className:p,title:m?"ØªÙØ¸ÛÙ
ات ÚÛØ¯Ù
ا٠اصÙÛ":"ØªÙØ¸ÛÙ
ات ÙÛØ¬Øª","aria-label":m?"ØªÙØ¸ÛÙ
ات ÚÛØ¯Ù
ا٠اصÙÛ":"ØªÙØ¸ÛÙ
ات ÙÛØ¬Øª",children:(0,n.jsx)(l.JO,{})}),m?null:(0,n.jsx)("button",{type:"button",onClick:()=>{m||d.aF.confirm({title:"ØØ°Ù ÙÛØ¬Øª",content:(0,n.jsxs)("div",{dir:"rtl",className:"space-y-2 font-iran text-right",children:[(0,n.jsx)("p",{className:"m-0 text-sm text-slate-700 dark:text-slate-200",children:"Ø¢ÛØ§ از ØØ°Ù اÛÙ ÙÛØ¬Øª از ØµÙØÙ Ø§Ø·Ù
ÛÙØ§Ù Ø¯Ø§Ø±ÛØ¯Ø"}),(0,n.jsxs)("div",{className:"rounded-xl border border-slate-200 bg-slate-50 px-3 py-2 text-xs text-slate-600 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-300",children:["عÙÙØ§Ù ÙÛØ¬Øª:",(0,n.jsx)("span",{className:"mx-1 font-semibold text-slate-900 dark:text-white",children:k})]})]}),okText:"ØØ°Ù ÙÛØ¬Øª",cancelText:"Ø§ÙØµØ±Ø§Ù",okButtonProps:{danger:!0},onOk:()=>{e.removeNode(r.id),a?.sourceId===r.id&&t.clearWidgetClipboard(),t.clearSelection(),t.setWidgetPropertiesModalOpen(!1),t.setWidgetPropertiesAnchor(void 0),t.clearCanvasIntent()}})},className:[p,o?"text-rose-300 hover:bg-rose-500/10":"text-rose-600 hover:bg-rose-50"].join(" "),title:"ØØ°Ù","aria-label":"ØØ°Ù",children:(0,n.jsx)(l.ze,{})})]})}var k=r(73321),S=r(31048),C=r(33423),O=r(57605),P=r(41152),E=r(35493),$=r(5844),I=r(82842);let{TextArea:F}=d.pd,M="dabacms-page-creator";function A(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function W(e){return e===O.p.header||e===O.p.footer||e===O.p.page}function L(e){window.setTimeout(()=>{let t=document.getElementById(e);if(!t)return;if(t.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"}),t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLButtonElement)return void t.focus();let r=t.querySelector('input, textarea, button, [tabindex]:not([tabindex="-1"])');r?.focus()},140)}function T(e,t){let r=e?.response?.data;if("string"==typeof r&&r.trim())return r;if(r&&"object"==typeof r){let e=r.detail;if("string"==typeof e&&e.trim())return e;let t=r.message;if("string"==typeof t&&t.trim())return t}return t}function H(e=[]){return JSON.parse(JSON.stringify(e||[]))}function R(e){if(Array.isArray(e))return e.reduce((e,t)=>e+R(t),0);if(!A(e))return 0;let t=!0===(A(e.defaultProps)?e.defaultProps:{}).isRootLayout;return 1*(("string"==typeof e.id||"string"==typeof e.type||"number"==typeof e.type)&&!t)+R(e.children)}function K(e){return!!(e&&e.type===g.x.grid&&e.defaultProps?.isRootLayout)}function D(e=[]){let t=(0,$.d)(H(e));return 1===t.length&&K(t[0])?H(t[0].children||[]):H(t)}function q(e,t){return t===O.p.header||t===O.p.footer?(0,$.q)(e):e}function B(e){if(!A(e))throw Error("ساختار ÙØ§ÛÙ Ù
عتبر ÙÛØ³Øª.");if(e.source===M){if(1!==e.schemaVersion)throw Error("ÙØ³Ø®Ù ÙØ§Û٠با اÛÙ ÙÛØ±Ø§Ûشگر سازگار ÙÛØ³Øª.");if(!W(e.mode))throw Error("ÙÙØ¹ Ù
ØØªÙØ§Û ÙØ§ÛÙ Ù
عتبر ÙÛØ³Øª.");if(!A(e.pageProperties))throw Error("ØªÙØ¸ÛÙ
ات ØµÙØÙ Ø¯Ø± ÙØ§ÛÙ Ù
عتبر ÙÛØ³Øª.");if(!Array.isArray(e.nodes))throw Error("ساختار ابزارکâÙØ§Û ÙØ§ÛÙ Ù
عتبر ÙÛØ³Øª.");return{source:M,schemaVersion:1,exportedAt:"string"==typeof e.exportedAt?e.exportedAt:new Date().toISOString(),mode:e.mode,pageProperties:e.pageProperties,nodes:D(e.nodes)}}if(W(e.type)&&Array.isArray(e.children))return{source:M,schemaVersion:1,exportedAt:new Date().toISOString(),mode:e.type,pageProperties:A(e.property)?e.property:{},nodes:D(e.children)};throw Error("ÙØ§ÛÙ JSON Ù
Ø±Ø¨ÙØ· Ø¨Ù Ø®Ø±ÙØ¬Û Ù
عتبر ØµÙØÙâØ³Ø§Ø² ÙÛØ³Øª.")}function _(){let[e,t]=d.iU.useMessage(),r=(0,u.sr)(),a=(0,u.s0)(),s=(0,c.f)(e=>e.themeMode),i=S.yK(),p=S.xS(),m=S.Jt(),x=S.su(),g=C.PW(),f=(0,k.useRouter)(),h=(0,k.useSearchParams)(),b=(0,k.useParams)(),y=(0,o.useRef)(null),[v,j]=(0,o.useState)(!1),[w,N]=(0,o.useState)(!1),[W,_]=(0,o.useState)(!1),[J,Q]=(0,o.useState)("import"),[z,G]=(0,o.useState)(""),[U,V]=(0,o.useState)(),Y=b?.id?.toString()||"",[X,Z]=(0,o.useState)(Y),ee=S.aH(X,w&&"edit"===a.formStatus);(0,o.useEffect)(()=>{Z(Y)},[Y]);let et=r.pageProperties?.title?.trim(),er=r.pageProperties?.link?.trim(),en=r.pageProperties?.languageId?.trim()||r.pageProperties?.language?.id?.trim()||"",ea=!!en,es=i.isPending||p.isPending,ei=x.isPending,el="dark"===s,eo=(0,P.GQ)(a.mode),ed="edit"===a.formStatus,ec=Array.isArray(g.data)?g.data:[],eu=ed&&!!X&&ea,ep=r.pageProperties?.language?.slug?.trim()||ec.find(e=>e.id===en)?.slug?.trim()||"",em=h?.get("admindebug")==="1"?"?admindebug=1":"",ex=a.mode===O.p.page&&ep&&er?`${(0,I.cO)(ep,er)}${em}`:"",eg=a.mode===O.p.page&&!!ex,ef=ec.filter(e=>!1!==e.isEnabled&&e.id!==en).map(e=>({value:e.id,label:`${e.title} (${e.slug})`})),eh=["!h-5 !px-1.5 !py-0 rounded font-iran text-[9px] leading-none transition-colors [&_.ant-btn-icon]:!me-0.5 [&_.anticon]:!text-[10px]",el?"border border-slate-700 bg-slate-900 text-slate-200 hover:!bg-slate-800 hover:!text-white":"border border-slate-200 bg-white text-slate-700 hover:!bg-slate-50 hover:!text-slate-900"].join(" "),eb=["!h-5 !px-1.5 !py-0 rounded font-iran text-[9px] font-medium leading-none shadow-sm transition-colors [&_.ant-btn-icon]:!me-0.5 [&_.anticon]:!text-[10px]",el?"border border-emerald-500 bg-emerald-500 text-slate-950 hover:!bg-emerald-400 hover:!text-slate-950":"border border-emerald-600 bg-emerald-600 text-white hover:!bg-emerald-700 hover:!text-white"].join(" "),ey=e=>`${eo.editBaseRoute}/${e}`,ev=(0,o.useMemo)(()=>({source:M,schemaVersion:1,exportedAt:new Date().toISOString(),mode:a.mode,pageProperties:(0,P.cG)(a.mode,{...r.pageProperties||{},title:et,languageId:en}),nodes:q(D(r.nodes||[]),a.mode)}),[a.mode,r.nodes,r.pageProperties,et,en]),ej=(0,o.useMemo)(()=>JSON.stringify(ev,null,2),[ev]),ew=(0,o.useMemo)(()=>{let e=z.trim();if(!e)return null;try{let t=B(JSON.parse(e)),r=(0,P.GQ)(t.mode);return{ok:!0,document:t,modeLabel:r.singular,title:t.pageProperties?.title?.trim()||"بدÙ٠عÙÙØ§Ù",nodeCount:Array.isArray(t.nodes)?t.nodes.length:0}}catch(e){return{ok:!1,error:e instanceof Error?e.message:"ÙØ§ÛÙ JSON Ù
1Ø§Ø¨Ù Ø®ÙØ§Ùد٠ÙÛØ³Øª."}}},[z]),eN=t=>{if(!(et?ea?a.mode!==O.p.page||!!er||(e.error("آدرس ØµÙØÙ (Slug) را ÙØ§Ø±Ø¯ Ú©ÙÛØ¯."),L("page-property-link"),!1):(e.error("زبا٠اÛ٠بخش Ø¨Ø§ÛØ¯ Ø§ÙØªØ®Ø§Ø¨ Ø´ÙØ¯."),L("page-property-language"),!1):(e.error("عÙÙØ§Ù را ÙØ§Ø±Ø¯ Ú©ÙÛØ¯."),L("page-property-title"),!1)))return;let n=a.formStatus||"add",s={property:(0,P.cG)(a.mode,{...r.pageProperties||{},title:et,languageId:en}),children:function(e=[]){return H((0,$.d)(e))}(r.nodes||[]),type:a.mode,id:"add"===n?"u">typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():`container-${Date.now()}-${Math.random().toString(36).slice(2,10)}`:X,languageId:en};if("add"===n)return void i.mutate(s,{onSuccess:n=>{let s=n?.data;if(r.clearHistory(),e.success(`${eo.singular} با Ù
ÙÙÙÛØª Ø°Ø®ÛØ±Ù شد.`),t?.openPreview&&ex&&window.open(ex,"_blank","noopener,noreferrer"),s?.id){Z(s.id),a.setFormStatus("edit"),window.history.replaceState(window.history.state,"",ey(s.id));return}e.warning(`${eo.singular} Ø°Ø®ÛØ±Ù Ø´Ø¯Ø Ø§Ù
ا Ø´ÙØ§Ø³Ù Ù
ÙØ±Ø¯ Ø¨Ø±Ø§Û ØªØºÛÛØ± Ù
Ø³ÛØ± Ø¯Ø±ÛØ§Ùت ÙØ´Ø¯.`)},onError:t=>{e.error(T(t,`Ø°Ø®ÛØ±Ù ${eo.singular} Ø§ÙØ¬Ø§Ù
ÙØ´Ø¯.`))}});let l=R(s.children),o=(n=!1)=>{p.mutate({model:s,allowEmptyContentOverwrite:n},{onSuccess:n=>{let a=n?.data,s=R(a?.children);a&&s===l?(r.clearHistory(),e.success(`تغÛÛØ±Ø§Øª ${eo.singular} Ø°Ø®ÛØ±Ù شد Ù ÙØ³Ø®Ù ÙØ¨ÙÛ ÙØ§Ø¨Ù Ø¨Ø§Ø²ÛØ§Ø¨Û است.`),t?.openPreview&&ex&&window.open(ex,"_blank","noopener,noreferrer")):e.error("پاسخ Ø°Ø®ÛØ±Ù با ساختار ارساÙâØ´Ø¯Ù Ûکسا٠ÙÛØ³ØªØ Ø¨Ø±Ø§Û Ø¬ÙÙÚ¯ÛØ±Û از Ø§Ø²âØ¯Ø³ØªâØ±ÙØªÙ Ù
ØØªÙØ§Ø ØµÙØÙ Ø±Ø§ باز ÙÚ¯Ù Ø¯Ø§Ø±ÛØ¯ Ù Ø¯ÙØ¨Ø§Ø±Ù Ø¨Ø±Ø±Ø³Û Ú©ÙÛØ¯.")},onError:t=>{let r;!n&&(r=t?.response,r?.status===409&&A(r.data)&&"EMPTY_CONTENT_OVERWRITE_BLOCKED"===r.data.code)?d.aF.confirm({centered:!0,className:"font-iran",title:"ÙØ´Ø¯Ø§Ø± ØØ°Ù کاÙ
Ù Ù
ØØªÙØ§Û ØµÙØÙ",okText:"بÙÙØ ØµÙØÙ Ø¹Ù
دا٠خاÙÛ Ø´ÙØ¯",cancelText:"Ø§ÙØµØ±Ø§Ù Ù ØÙظ Ù
ØØªÙا",okButtonProps:{danger:!0},content:"ÙØ³Ø®Ù Ø°Ø®ÛØ±ÙâØ´Ø¯Ù Ø§ÛÙ ØµÙØÙ Ø¯Ø§Ø±Ø§Û ÙÛØ¬Øª Ø§Ø³ØªØ Ø§Ù
ا بÙÙ
ÙØ¹ÙÛ ÙÛÚ ÙÛØ¬ØªÛ ÙØ¯Ø§Ø±Ø¯. Ø°Ø®ÛØ±Ù Ø¹Ø§Ø¯Û Ù
تÙÙ٠شد تا Ù
ØØªÙØ§Û ØµÙØÙ ÙØ§Ø®ÙØ§Ø³ØªÙ ØØ°Ù ÙØ´Ùد.",onOk:()=>o(!0)}):e.error(T(t,`بÙâØ±ÙØ²Ø±Ø³Ø§ÙÛ ${eo.singular} Ø§ÙØ¬Ø§Ù
ÙØ´Ø¯.`))}})};o()},ek=async()=>{try{await navigator.clipboard.writeText(ej),e.success("Ø®Ø±ÙØ¬Û JSON Ú©Ù¾Û Ø´Ø¯.")}catch{e.error("Ú©Ù¾Û Ø®Ø±ÙØ¬Û JSON Ø§ÙØ¬Ø§Ù
ÙØ´Ø¯.")}},eS=async t=>{let r=t.target.files?.[0];if(r)try{let t=await r.text();G(t),Q("import"),e.success(`ÙØ§ÛÙ "${r.name}" Ø¨Ø§Ø±Ú¯Ø°Ø§Ø±Û Ø´Ø¯.`)}catch{e.error("Ø®ÙØ§ÙØ¯Ù ÙØ§ÛÙ JSON Ø§ÙØ¬Ø§Ù
ÙØ´Ø¯.")}finally{t.target.value=""}};return(0,n.jsxs)(n.Fragment,{children:[t,(0,n.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5 whitespace-nowrap",children:[(0,n.jsx)(d.$n,{icon:(0,n.jsx)(l.KF,{}),onClick:()=>_(!0),className:eh,children:"درÙÙâØ±ÛØ²Û / برÙÙâØ±ÛØ²Û"}),(0,n.jsx)(d.$n,{icon:(0,n.jsx)(l.L8,{}),disabled:!ed||!X,onClick:()=>N(!0),className:eh,children:"ÙØ³Ø®ÙâÙØ§"}),(0,n.jsx)(d.m_,{title:eg?"Ø°Ø®ÛØ±Ù Ù ÙÙ
Ø§ÛØ´ Ø®Ø±ÙØ¬Û ÙØ§ÙØ¹Û ØµÙØÙ":"Ø¨Ø±Ø§Û Ù¾ÛØ´âÙÙ
Ø§ÛØ´Ø زبا٠٠آدرس ØµÙØÙ Ø¨Ø§ÛØ¯ Ù
شخص Ø¨Ø§Ø´ÙØ¯",children:(0,n.jsx)(d.$n,{icon:(0,n.jsx)(l.Om,{}),disabled:!eg,onClick:()=>{er&&ep?eN({openPreview:!0}):e.error("Ø¨Ø±Ø§Û Ù¾ÛØ´âÙÙ
Ø§ÛØ´Ø زبا٠٠آدرس ØµÙØÙ Ø¨Ø§ÛØ¯ Ù
شخص Ø¨Ø§Ø´ÙØ¯.")},className:eh,children:"Ù¾ÛØ´âÙÙ
Ø§ÛØ´"})}),(0,n.jsx)(d.$n,{icon:(0,n.jsx)(l.wq,{}),disabled:!eu,onClick:()=>j(!0),className:eh,children:"Ú©Ù¾Û"}),(0,n.jsx)(d.$n,{type:"primary",icon:(0,n.jsx)(l.yl,{}),onClick:()=>eN(),loading:es,className:eb,children:"Ø°Ø®ÛØ±Ù"})]}),(0,n.jsxs)(d.aF,{open:w,onCancel:()=>{m.isPending||N(!1)},footer:null,destroyOnHidden:!0,centered:!0,width:620,className:"font-iran",title:"ÙØ³Ø®ÙâÙØ§Û ÙØ§Ø¨Ù Ø¨Ø§Ø²ÛØ§Ø¨Û",children:[(0,n.jsx)(d.Fc,{type:"info",showIcon:!0,className:"mb-4",message:"Ù¾ÛØ´ از ÙØ± ÙÛØ±Ø§ÛØ´Ø ÙØ³Ø®Ù ÙØ¨ÙÛ Ø¨ÙâØµÙØ±Øª Ø®ÙØ¯Ú©Ø§Ø± ÙÚ¯ÙØ¯Ø§Ø±Û Ù
ÛâØ´ÙØ¯.",description:"ØØ¯Ø§Ú©Ø«Ø± Û²Ûµ ÙØ³Ø®Ù آخر ÙØ± ØµÙØÙØ ÙØ¯Ø± ÛØ§ ÙÙØªØ± در Ø³Ø±ÙØ± ÙÚ¯ÙØ¯Ø§Ø±Û Ø®ÙØ§Ùد شد."}),ee.isLoading?(0,n.jsx)("div",{className:"py-10 text-center text-sm text-slate-500",children:"در ØØ§Ù Ø¯Ø±ÛØ§Ùت ÙØ³Ø®ÙâÙØ§..."}):ee.isError?(0,n.jsx)(d.Fc,{type:"error",showIcon:!0,message:"Ø¯Ø±ÛØ§Ùت ÙØ³Ø®ÙâÙØ§ Ø§ÙØ¬Ø§Ù
ÙØ´Ø¯",description:T(ee.error,"اÙ
Ú©Ø§Ù Ø¯Ø±ÛØ§Ùت ØªØ§Ø±ÛØ®ÚÙ Ø°Ø®ÛØ±Ù ÙØ¬Ùد ÙØ¯Ø§Ø±Ø¯.")}):ee.data?.length?(0,n.jsx)("div",{className:"max-h-[420px] space-y-2 overflow-y-auto pe-1",children:ee.data.map((t,r)=>{var a;let s;return(0,n.jsxs)("div",{className:"flex flex-col gap-3 rounded-xl border border-slate-200 bg-white p-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsxs)("div",{className:"text-sm font-semibold text-slate-800",children:["ÙØ³Ø®Ù ",ee.data.length-r]}),(0,n.jsxs)("div",{className:"mt-1 text-xs text-slate-500",children:[Number.isNaN((s=new Date(a=t.createdAtUtc)).getTime())?a:new Intl.DateTimeFormat("fa-IR",{dateStyle:"medium",timeStyle:"short"}
1).format(s)," \xb7 ",t.nodeCount.toLocaleString("fa-IR")," گر٠Ù
ØØªÙاÛÛ"]})]}),(0,n.jsx)(d.$n,{size:"small",disabled:m.isPending,loading:m.isPending&&m.variables?.revisionId===t.id,onClick:()=>{var r;return r=t.id,void(X&&d.aF.confirm({centered:!0,className:"font-iran",title:"Ø¨Ø§Ø²ÛØ§Ø¨Û ÙØ³Ø®Ù ÙØ¨ÙÛ",okText:"Ø¨Ø§Ø²ÛØ§Ø¨Û ÙØ³Ø®Ù",cancelText:"Ø§ÙØµØ±Ø§Ù",content:"ساختار ÙØ¹ÙÛ Ø§Ø¨ØªØ¯Ø§ بÙâØ¹ÙÙØ§Ù ÛÚ© ÙØ³Ø®Ù Ø¬Ø¯ÛØ¯ ÙÚ¯ÙØ¯Ø§Ø±Û Ù
ÛâØ´ÙØ¯ ٠سپس ÙØ³Ø®Ù Ø§ÙØªØ®Ø§Ø¨âشد٠جاÛگزÛÙ Ø¢Ù Ø®ÙØ§Ùد شد.",onOk:async()=>{try{await m.mutateAsync({containerId:X,revisionId:r}),e.success("ÙØ³Ø®Ù Ø§ÙØªØ®Ø§Ø¨âØ´Ø¯Ù Ø¨Ø§Ø²ÛØ§Ø¨Û شد."),N(!1),window.location.reload()}catch(t){e.error(T(t,"Ø¨Ø§Ø²ÛØ§Ø¨Û ÙØ³Ø®Ù Ø§ÙØ¬Ø§Ù
ÙØ´Ø¯."))}}}))},children:"Ø¨Ø§Ø²ÛØ§Ø¨Û"})]},t.id)})}):(0,n.jsx)("div",{className:"rounded-xl border border-dashed border-slate-300 px-4 py-8 text-center text-sm text-slate-500",children:"ÙÙÙØ² ÙØ³Ø®Ù ÙØ¨ÙÛ Ø«Ø¨Øª ÙØ´Ø¯Ù Ø§Ø³ØªØ Ø¨Ø§ Ø°Ø®ÛØ±Ù Ø¨Ø¹Ø¯ÛØ ÙØ³Ø®Ù ÙØ¹ÙÛ Ø¨Ù ØªØ§Ø±ÛØ®Ú٠اضاÙÙ Ù
ÛâØ´ÙØ¯."})]}),(0,n.jsxs)(d.aF,{open:W,onCancel:()=>{_(!1),Q("import")},footer:null,destroyOnHidden:!0,centered:!0,width:880,className:"font-iran",title:"درÙÙâØ±ÛØ²Û / برÙÙâØ±ÛØ²Û",children:[(0,n.jsx)("input",{ref:y,type:"file",accept:".json,application/json",onChange:eS,className:"hidden"}),(0,n.jsx)(d.tU,{activeKey:J,onChange:e=>Q(e),destroyOnHidden:!1,className:"font-iran",items:[{key:"import",label:"درÙÙâØ±ÛØ²Û",children:(0,n.jsxs)("div",{className:"space-y-4 pt-2",children:[(0,n.jsx)(d.Fc,{type:"warning",showIcon:!0,message:"درÙÙâØ±ÛØ²ÛØ Ù
ØØªÙØ§Û ÙØ¹ÙÛ Ø¨ÙÙ
را جاÛگزÛÙ Ù
ÛâÚ©ÙØ¯.",description:"ÛÚ© ÙØ§ÛÙ JSON Ø§ÙØªØ®Ø§Ø¨ Ú©ÙÛØ¯Ø Ø®ÙØ§ØµÙ Ù Ø§Ø¹ØªØ¨Ø§Ø±Ø³ÙØ¬Û آ٠را ببÛÙÛØ¯ ٠سپس آ٠را رÙÛ Ø¨ÙÙ
اعÙ
ا٠کÙÛØ¯."}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)(d.$n,{onClick:()=>{y.current?.click()},children:"Ø§ÙØªØ®Ø§Ø¨ ÙØ§ÛÙ JSON"}),(0,n.jsx)(d.$n,{onClick:()=>{let t,s=z.trim();if(!s)return void e.error("ابتدا ÛÚ© ÙØ§ÛÙ JSON Ø§ÙØªØ®Ø§Ø¨ Ú©ÙÛØ¯ ÛØ§ Ù
ØØªÙØ§Û JSON را اÛÙØ¬Ø§ ÙØ±Ø§Ø± دÙÛØ¯.");try{t=B(JSON.parse(s))}catch(t){e.error(t instanceof Error?t.message:"ÙØ§ÛÙ JSON Ù
عتبر ÙÛØ³Øª.");return}d.aF.confirm({centered:!0,className:"font-iran",title:"تأÛÛØ¯ Ø¨Ø§Ø²ÛØ§Ø¨Û",okText:"Ø¨Ø§Ø²ÛØ§Ø¨Û",cancelText:"Ø§ÙØµØ±Ø§Ù",content:(0,n.jsxs)("div",{className:"space-y-2 pt-2 text-sm leading-7 text-slate-600",children:[(0,n.jsx)("p",{className:"mb-0",children:"با Ø¨Ø§Ø²ÛØ§Ø¨Û اÛÙ ÙØ§ÛÙØ ساختار بÙÙ
Ù ØªÙØ¸ÛÙ
ات ÙØ¹ÙÛ Ø¨Ø§ دادÙâÙØ§Û JSON Ø§ÙØªØ®Ø§Ø¨âشد٠جاÛگزÛÙ Ù
ÛâØ´ÙØ¯."}),(0,n.jsx)("p",{className:"mb-0",children:"بعد از Ø¨Ø§Ø²ÛØ§Ø¨ÛØ ÙÛÙÚ© تصاÙÛØ±Ø دادÙâÙØ§Û Ø²ÙØ¯ÙØ Ø§Ø±Ø¬Ø§Ø¹Ø§Øª Ù
ÙÙ Ù ÙØ§Ø¨Ø³ØªÚ¯ÛâÙØ§Û سÙ
ت Ø³Ø±ÙØ± را Ø¨Ø±Ø±Ø³Û Ú©ÙÛØ¯."})]}),onOk:()=>(t=>{let n=a.mode;if(t.mode!==n){let r=(0,P.GQ)(t.mode),a=(0,P.GQ)(n);e.error(`اÛÙ ÙØ§ÛÙ Ø¨Ø±Ø§Û "${r.singular}" ساخت٠شد٠٠داخ٠"${a.singular}" ÙØ§Ø¨Ù Ø¨Ø§Ø²ÛØ§Ø¨Û ÙÛØ³Øª.`);return}let s=r.pageProperties,i=(0,P.cG)(n,{...t.pageProperties||{},id:s?.id||t.pageProperties?.id,languageId:s?.languageId||t.pageProperties?.languageId,language:s?.language||t.pageProperties?.language});r.replaceState({pageProperties:i,nodes:function(e=[],t,r=[]){let n=r.find(K),a=n?H([n])[0]:(0,E.lV)(t===O.p.header?(0,E.rd)("header"):t===O.p.footer?(0,E.rd)("footer"):(0,E.rd)("page")),s=q(H(e),t).map(e=>({...e,parentId:a.id}));return(0,$.d)([{...a,children:s,defaultProps:{...a.defaultProps||{},isRootLayout:!0,columns:1,flexDirection:"flex-col",keepInSingleRow:!1,itemLayouts:s.reduce((e,t)=>(e[t.id]={span:12,basis:100,grow:0},e),{})}}])}(Array.isArray(t.nodes)?t.nodes:[],n,r.nodes||[])}),a.clearSelection(),a.setSection("settings"),a.setWidgetsModalOpen(!1),a.setWidgetPropertiesModalOpen(!1),_(!1),Q("import"),G(""),e.success("Ø§Ø·ÙØ§Ø¹Ø§Øª ØµÙØÙ Ø¨Ø§ Ù
ÙÙÙÛØª Ø¨Ø§Ø²ÛØ§Ø¨Û شد.")})(t)})},type:"primary",icon:(0,n.jsx)(l.hW,{}),children:"Ø§Ø¹ØªØ¨Ø§Ø±Ø³ÙØ¬Û ٠درÙÙâØ±ÛØ²Û"})]}),(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("label",{className:"block text-sm font-medium text-slate-700",children:"Ù
ØØªÙØ§Û JSON"}),(0,n.jsx)(F,{value:z,onChange:e=>G(e.target.value),rows:16,dir:"ltr",className:"font-mono text-xs",placeholder:"ÙØ§ÛÙ JSON را Ø§ÙØªØ®Ø§Ø¨ Ú©ÙÛØ¯ ÛØ§ Ù
ØØªÙØ§Û Ø¢Ù Ø±Ø§ اÛÙØ¬Ø§ ÙØ±Ø§Ø± دÙÛØ¯..."})]}),ew?ew.ok?(0,n.jsx)(d.Fc,{type:"success",showIcon:!0,message:"ÙØ§ÛÙ Ù
عتبر است",description:`ÙÙØ¹ Ù
ØØªÙا: ${ew.modeLabel} | عÙÙØ§Ù: ${ew.title} | تعداد گرÙâÙØ§Û Ø±ÛØ´Ù: ${ew.nodeCount}`}):(0,n.jsx)(d.Fc,{type:"error",showIcon:!0,message:"اÙ
کا٠درÙÙâØ±ÛØ²Û اÛÙ ÙØ§ÛÙ ÙØ¬Ùد ÙØ¯Ø§Ø±Ø¯",description:ew.error}):null]})},{key:"export",label:"برÙÙâØ±ÛØ²Û",children:(0,n.jsxs)("div",{className:"space-y-4 pt-2",children:[(0,n.jsx)(d.Fc,{type:"info",showIcon:!0,message:"Ø®Ø±ÙØ¬Û Ø§Ø³ØªØ§ÙØ¯Ø§Ø±Ø¯ JSON",description:"از اÛÙ Ø®Ø±ÙØ¬Û Ø¨Ø±Ø§Û Ø§ÙØªÙØ§Ù Ø³Ø§Ø®ØªØ§Ø±Ø ØªÙØ¸ÛÙ
ات Ù ÙÛØ¬ØªâÙØ§Û ØµÙØÙâØ³Ø§Ø² Ø§Ø³ØªÙØ§Ø¯Ù Ú©ÙÛØ¯ ٠آ٠را در پرÙÚÙ Ù
ÙØµØ¯ از تب درÙÙâØ±ÛØ²Û Ø¨Ø§Ø²ÛØ§Ø¨Û Ú©ÙÛØ¯."}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)(d.$n,{icon:(0,n.jsx)(l.wq,{}),onClick:ek,children:"Ú©Ù¾Û JSON"}),(0,n.jsx)(d.$n,{onClick:()=>{var e;let t,r,n;e=`${(et||eo.singular).trim().replace(/[\\/:*?"<>|]+/g,"-").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")||"page"}-export.json`,t=new Blob([ej],{type:"application/json;charset=utf-8"}),r=URL.createObjectURL(t),(n=document.createElement("a")).href=r,n.download=e,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(r)},children:"داÙÙÙØ¯ ÙØ§ÛÙ JSON"})]}),(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("label",{className:"block text-sm font-medium text-slate-700",children:"Ø®Ø±ÙØ¬Û JSON"}),(0,n.jsx)(F,{value:ej,readOnly:!0,rows:16,dir:"ltr",className:"font-mono text-xs"})]})]})}]})]}),(0,n.jsx)(d.aF,{open:v,onCancel:()=>{ei||(j(!1),V(void 0))},onOk:()=>{X&&ed?U?x.mutate({sourceId:X,targetLanguageId:U},{onSuccess:t=>{e.success(`${eo.singular} در Ø²Ø¨Ø§Ù Ø¬Ø¯ÛØ¯ ساخت٠شد.`),j(!1),V(void 0),f.push(ey(t.id))},onError:t=>{e.error(T(t,"Ú©Ù¾Û Ø¨Ù Ø²Ø¨Ø§Ù Ø¯Ûگر Ø§ÙØ¬Ø§Ù
ÙØ´Ø¯."))}}):e.error("زبا٠Ù
ÙØµØ¯ را Ø§ÙØªØ®Ø§Ø¨ Ú©ÙÛØ¯."):e.info("ابتدا اÛÙ Ù
ÙØ±Ø¯ را ÛÚ© بار Ø°Ø®ÛØ±Ù Ú©ÙÛØ¯Ø سپس از ÙØ§Ø¨ÙÛØª Ú©Ù¾Û Ø¨Ù Ø²Ø¨Ø§Ù Ø¯Ûگر Ø§Ø³ØªÙØ§Ø¯Ù Ú©ÙÛØ¯.")},okText:ei?"در ØØ§Ù Ú©Ù¾Û...":"Ø§ÛØ¬Ø§Ø¯ ÙØ³Ø®Ù زباÙÛ",cancelText:"Ø§ÙØµØ±Ø§Ù",confirmLoading:ei,destroyOnHidden:!0,centered:!0,className:"font-iran",title:`Ú©Ù¾Û ${eo.singular} ب٠زبا٠دÛگر`,children:(0,n.jsxs)("div",{className:"space-y-4 font-iran",children:[(0,n.jsxs)("p",{className:"mb-0 text-sm leading-7 text-slate-500",children:["Ø³Ø§Ø®ØªØ§Ø±Ø Ø§Ø¨Ø²Ø§Ø±Ú©âÙØ§ Ù ØªÙØ¸ÛÙ
ات اÛÙ ",eo.singular," ب٠زبا٠Ù
ÙØµØ¯ Ú©Ù¾Û Ù
ÛâØ´ÙØ¯ ٠بعد Ù
ÛâØªÙØ§ÙÛØ¯ Ù
تÙâÙØ§ را Ø¨Ø±Ø§Û Ù
1Ù
ا٠زبا٠ÙÛØ±Ø§ÛØ´ Ú©ÙÛØ¯."]}),(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("label",{className:"block text-sm font-medium text-slate-700",children:"زبا٠Ù
ÙØµØ¯"}),(0,n.jsx)(d.l6,{value:U,onChange:V,options:ef,placeholder:"ÛÚ© زبا٠دÛگر را Ø§ÙØªØ®Ø§Ø¨ Ú©ÙÛØ¯",className:"w-full"})]})]})})]})}function J({mode:e,formStatus:t}){let r=(0,c.f)(e=>e.themeMode),a=e===O.p.header?"ÙØ¯Ø±":e===O.p.footer?"ÙÙØªØ±":"ØµÙØÙ";return(0,n.jsx)("div",{className:"flex min-w-0 items-center gap-1 font-iran leading-tight",children:(0,n.jsxs)("div",{className:`truncate text-[10px] font-semibold ${"dark"===r?"text-slate-100":"text-slate-800"}`,children:["edit"===t?"ÙÛØ±Ø§ÛØ´":"Ø¬Ø¯ÛØ¯"," ",a]})})}let Q=u.Jb.BEHMALT,z=[{value:u.Jb.BEHMALT,label:"Ù¾ÙØ³ØªÙ عÙ
ÙÙ
Û"}];function G(){let e=(0,u.s0)(e=>e.theme),t=(0,u.s0)(e=>e.setThemeType),r="dark"===(0,c.f)(e=>e.themeMode);return(0,n.jsxs)("div",{className:"jsx-de90df318beec6cb "+(["flex h-6 shrink-0 items-center rounded-md border px-0",r?"border-slate-700 bg-slate-900/70 text-slate-200":"border-slate-200 bg-white text-slate-700"].join(" ")||""),children:[(0,n.jsx)(d.l6,{value:e??Q,direction:"rtl",popupMatchSelectWidth:!1,popupClassName:"pc-theme-select-popup",listHeight:112,title:"اÛÙ Ø§ÙØªØ®Ø§Ø¨ ÙÙØ· رÙÛ Ù¾ÛØ´âÙÙ
Ø§ÛØ´ ØµÙØÙâØ³Ø§Ø² اثر Ù
Ûâگذارد Ù ØªÙØ¸ÛÙ
ات اصÙÛ ÙØ§Ùب را تغÛÛØ± ÙÙ
ÛâØ¯ÙØ¯.",className:["!h-5 !min-h-5 min-w-[86px] !rounded !border-0 !bg-transparent !px-1 !pe-5 !text-[10px] !leading-5 !shadow-none",r?"text-slate-200":"text-slate-700"].join(" "),onChange:e=>{t(e)},options:z}),(0,n.jsx)(s(),{id:"de90df318beec6cb",children:".pc-theme-select-popup{min-width:116px!important;border-radius:8px!important;box-shadow:0 10px 24px rgba(15,23,42,.14)!important}.pc-theme-select-popup>div{padding:2px!important}.pc-theme-select-popup button{min-height:20px!important;height:20px!important;padding:2px 8px!important;border-radius:6px!important;font-size:10px!important;line-height:16px!important;gap:4px!important}"})]})}function U({onOpenPageProperties:e,showPagePropertiesButton:t=!0,workspaceTabs:r}){let a=(0,u.s0)(),s=(0,u.sr)(),i="dark"===(0,c.f)(e=>e.themeMode),o=s.pageProperties?.title?.trim()||"بدÙ٠عÙÙØ§Ù",m=(0,u.s0)(e=>e.widgetClipboard),g=(0,u.s0)(e=>e.canvasZoom),f=(0,u.s0)(e=>e.setCanvasZoom),h=(0,u.s0)(e=>e.resetCanvasZoom),b=m?.mode==="cut"?"کات Ø´Ø¯Ø Ù
ÙØµØ¯ را Ø§ÙØªØ®Ø§Ø¨ Ú©ÙÛØ¯":m?.mode==="copy"?"Ú©Ù¾Û Ø¯Ø± Ø§ÙØªØ¸Ø§Ø± ÚØ³Ø¨Ø§ÙدÙ":"",y=["sticky top-0 z-20 w-full border-b px-1.5 py-0.5",i?"border-slate-700 text-slate-100":"border-slate-300 text-slate-800"].join(" "),v=["flex h-5 w-5 shrink-0 cursor-pointer items-center justify-center rounded transition-colors disabled:cursor-not-allowed disabled:opacity-40",i?"text-slate-300 hover:text-white":"text-slate-600 hover:text-slate-900"].join(" "),j=["flex h-5 shrink-0 cursor-pointer items-center justify-center gap-0.5 rounded px-1 font-iran text-[10px] transition-colors",i?"text-slate-300 hover:text-white":"text-slate-600 hover:text-slate-900"].join(" "),w=["flex h-5 w-5 shrink-0 items-center justify-center rounded transition-colors disabled:cursor-not-allowed disabled:opacity-35",i?"text-slate-300 hover:bg-slate-800 hover:text-white":"text-slate-600 hover:bg-slate-100 hover:text-slate-900"].join(" ");return(0,n.jsx)("div",{className:y,children:(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)("div",{className:"min-w-0 flex-1 overflow-x-auto overflow-y-hidden",children:(0,n.jsxs)("div",{className:"flex min-w-max items-center gap-1 whitespace-nowrap",children:[(0,n.jsx)(J,{mode:a.mode,formStatus:a.formStatus}),(0,n.jsx)("div",{className:`hidden max-w-[160px] min-w-0 font-iran text-[10px] lg:block ${i?"text-slate-400":"text-slate-500"}`,children:(0,n.jsx)("span",{className:"truncate",children:o})}),t?(0,n.jsxs)("button",{type:"button",onClick:e,className:j,children:[(0,n.jsx)(l.y9,{className:"text-[10px]"}),(0,n.jsx)("span",{children:"ÙÛÚÚ¯ÛâÙØ§"})]}):null,r?(0,n.jsx)("div",{className:["flex h-6 items-center gap-0.5 rounded-md border px-0.5 font-iran",i?"border-slate-700 bg-slate-900/70":"border-slate-200 bg-white"].join(" "),children:[{key:"settings",label:r.labels.settings},{key:"content",label:r.labels.content}].map(e=>{let t=r.active===e.key;return(0,n.jsx)("button",{type:"button",onClick:()=>r.onChange(e.key),className:["h-5 rounded px-1.5 text-[10px] transition-colors",t?i?"bg-slate-700 text-white":"bg-slate-900 text-white":i?"text-slate-400 hover:bg-slate-800 hover:text-white":"text-slate-500 hover:bg-slate-100 hover:text-slate-900"].join(" "),children:e.label},e.key)})}):null,(0,n.jsx)(p,{title:"ابزارکâÙØ§",selectedSection:a.selectedSection,id:"widgets",icon:(0,n.jsx)(l.gZ,{className:"text-[10px]"})}),(0,n.jsxs)("div",{className:["flex h-6 items-center gap-0.5 rounded-md border px-0.5",i?"border-slate-700 bg-slate-900/70":"border-slate-200 bg-white"].join(" "),children:[(0,n.jsx)(d.m_,{title:"بازگرداÙÛ ØªØºÛÛØ± بعدÛ",children:(0,n.jsx)("button",{type:"button",onClick:s.redo,disabled:!s.canRedo,className:v,children:(0,n.jsx)(l.zY,{className:"text-[15px]"})})}),(0,n.jsx)(d.m_,{title:"بازگشت ب٠تغÛÛØ± ÙØ¨ÙÛ",children:(0,n.jsx)("button",{type:"button",onClick:s.undo,disabled:!s.canUndo,className:v,children:(0,n.jsx)(l.Xr,{className:"text-[15px]"})})})]}),(0,n.jsx)(x,{}),(0,n.jsxs)("div",{className:["flex h-6 items-center gap-0.5 rounded-md border px-0.5",i?"border-slate-700 bg-slate-900/70":"border-slate-200 bg-white"].join(" "),title:"Ctrl + اسکرÙÙ Ø¨Ø±Ø§Û Ø²ÙÙ
بÙÙ
",children:[(0,n.jsx)("button",{type:"button",onClick:()=>f(e=>e-5),disabled:g<=u.s8,className:w,"aria-label":"Ú©ÙÚÚ© کرد٠بÙÙ
",children:(0,n.jsx)("span",{className:"text-[13px] leading-none",children:"-"})}),(0,n.jsxs)("button",{type:"button",onClick:h,className:["h-5 min-w-[34px] rounded px-0.5 font-iran text-[9px] font-semibold transition-colors",i?"text-slate-200 hover:bg-slate-800":"text-slate-700 hover:bg-slate-100"].join(" "),"aria-label":"بازگرداÙÛ Ø²ÙÙ
ب٠100 درصد",children:[g,"%"]}),(0,n.jsx)("button",{type:"button",onClick:()=>f(e=>e+5),disabled:g>=u.yA,className:w,"aria-label":"بزرگ کرد٠بÙÙ
",children:(0,n.jsx)(l.bW,{className:"text-[11px]"})})]}),(0,n.jsx)(G,{}),m?(0,n.jsxs)("div",{className:["flex h-5 items-center gap-0.5 rounded px-1 font-iran text-[10px]",i?"bg-slate-800/90 text-slate-100":"bg-slate-100 text-slate-700"].join(" "),children:[(0,n.jsx)("span",{children:b}),(0,n.jsx)(d.m_,{title:"cut"===m.mode?"ÙØºÙ کات ٠بازگرداÙÛ":"پاک کرد٠کپÛ",children:(0,n.jsx)("button",{type:"button",onClick:()=>a.clearWidgetClipboard(),className:v,children:(0,n.jsx)(l.r$,{className:"text-[10px]"})})})]}):null,r?.active==="content"?(0,n.jsx)(N,{}):null]})}),(0,n.jsx)("div",{className:"shrink-0",children:(0,n.jsx)(_,{})})]})})}var V=r(57742),Y=r(15508),X=r(65725),Z=r(80445);let ee=["bootstrap.min.css","all-fontawesome.min.css","animate.min.css","magnific-popup.min.css","owl.carousel.min.css","nice-select.min.css","style.css"];function et({direction:e}){let[t,r]=(0,o.useState)(""),a=(0,o.useMemo)(()=>(0,Z.MA)(e===X.h.RTL?"rtl":"ltr"),[e]);return((0,o.useEffect)(()=>{let e=!0;return er[a]&&r(er[a]),(async()=>{try{let t=await Promise.all(ee.map(async e=>{var t;let r=`${a}/${e}`,n=await fetch(r,{cache:"force-cache"}),s=(t=await n.text(),t.replace(/url\((['"]?)(?!data:|https?:|\/)([^'")]+)\1\)/g,(e,t,r)=>`url(${t}${a}/${r}${t})`));
1return function(e,t=".pc-scope"){return(e=(e=e.replace(/^\uFEFF/,"").replace(/@charset\s+["'][^"']+["'];?/gi,"").replace(/\/\*#\s*sourceMappingURL=.*?\*\//gi,"").replace(/\/\*[\s\S]*?\*\//g,"")).replace(/(^|[\s,{]):host([\s,{])/g,`$1${t}$2`).replace(/(^|[\s,{])html([\s,{])/g,`$1${t}$2`).replace(/(^|[\s,{])body([\s,{])/g,`$1${t}$2`).replace(/(^|[\s,{]):root([\s,{])/g,`$1${t}$2`)).replace(/(^|})\s*([^@{}][^{]+)\{/g,(e,r,n)=>{let a=n.split(",").map(e=>{let r=e?.trim();return!r||r.startsWith(t)?r:`${t} ${r}`}).join(", ");return`${r} ${a}{`})}(s,".pc-scope")}));if(!e)return;let n=t.join("\n\n");er[a]=n,r(n)}catch{if(!e)return;r("")}})(),()=>{e=!1}},[a]),t)?(0,n.jsx)("style",{"data-scoped-template":"true",children:t}):null}let er={};var en=r(15112),ea=r(36508),es=r(37075),ei=r(22356),el=r(95998),eo=r(18808),ed=r(77721),ec=r(35699);function eu(e){if(null==e||""===e)return;if("number"==typeof e)return`${e}rem`;let t=e.trim();if(t)return/^-?\d+(\.\d+)?$/.test(t)?`${t}rem`:t}function ep(e){if(null!=e&&""!==e)return"number"==typeof e?String(e):e.trim()||void 0}var em=r(94245),ex=r(10352);let eg={desktop:{wrapper:"w-full",canvas:"w-full max-w-full"},tablet:{wrapper:"w-full px-2 md:px-3",canvas:"w-full max-w-[834px]"},mobile:{wrapper:"w-full px-2 md:px-3",canvas:"w-full max-w-[430px]"}},ef=["content_paragraph","section_grid","multimedia_image","content_button"];function eh({page:e}){var t,r,a;let s=(0,u.sr)(e=>e.nodes),i=(0,u.sr)(),l=(0,u.s0)(),d=(0,u.s0)(e=>e.responsiveSelected),c=(0,u.s0)(e=>e.canvasZoom),p=(0,u.s0)(e=>e.selectedWidgetId),m=(0,u.s0)(e=>e.setCanvasZoom),x=(0,u.s0)(e=>e.mode),f=(0,u.s0)(e=>e.theme),h=(0,u.s0)(e=>e.movingWidgetId),b=(0,u.s0)(e=>e.paletteWidget),y=(0,el.m)(e=>e.roles),v=(0,el.m)(e=>e.featureKeys),{data:w}=em._9(),N=eg[d],k=(0,o.useRef)(null),[S,C]=(0,o.useState)(null),[P,$]=(0,o.useState)(e?.language??null),I=i.pageProperties?.languageId,F=i.pageProperties?.language??e?.language??null;(0,o.useEffect)(()=>{F?$(F):I||$(null)},[F,I]),(0,o.useEffect)(()=>{let e=!0;return(async()=>{try{let t=ei.FH.get("/Home/GetTemplate").then(e=>e.data).catch(()=>null),r=(async()=>{if(I)try{let{data:e}=await ei.FH.get(`/admin/i18n/languages/${encodeURIComponent(I)}`);return e}catch{}try{let e=await ei.FH.get("/Home/GetLanguagesAll"),t=Array.isArray(e.data)?e.data:[];return t.find(e=>e.isDefault&&!1!==e.isEnabled)||t.find(e=>!1!==e.isEnabled)||t[0]||null}catch{return null}})(),[n,a]=await Promise.all([t,r]);if(!e)return;C(n??null),$(a??F??null)}catch{if(!e)return;C(null),$(F??null)}})(),()=>{e=!1}},[F,I]),(0,o.useEffect)(()=>{let e=k.current;if(!e)return;let t=e=>{(e.ctrlKey||e.metaKey)&&(e.preventDefault(),m(t=>t+(e.deltaY>0?-1:1)))};return e.addEventListener("wheel",t,{passive:!1}),()=>{e.removeEventListener("wheel",t)}},[m]);let M=i.pageProperties?.styles?.borderWidth,A=f??S?.theme??u.Jb.BEHMALT,W=(0,o.useMemo)(()=>S?{...S,primaryFont:(0,ed.az)(S.primaryFont),secondaryFont:(0,ed.az)(S.secondaryFont)}:null,[S]),L=(0,ed.n9)(S,A),T=!s||0===s.length,H=(0,o.useMemo)(()=>(0,es.rO)(s),[s]),R=(0,o.useMemo)(()=>(0,ec.f0)((0,eo.pc)(j.Gx,y,v),w),[v,y,w]),K="desktop"===d&&(x===O.p.header||x===O.p.footer),D=A===u.Jb.BEHMALT,q=F??P,B=q?.direction===X.h.LTR?X.h.LTR:X.h.RTL,_=s.some(e=>e.type===g.x.grid&&!!e.defaultProps?.isRootLayout),J=s.find(e=>e.type===g.x.grid&&!!e.defaultProps?.isRootLayout),Q=(0,o.useMemo)(()=>{var e;let t;return{borderWidth:M,minHeight:280,fontFamily:D?W?.primaryFont||"var(--font-primary, sans-serif)":void 0,...L,...(e=i.pageProperties,!(t=e?.layout)?{}:Object.fromEntries(Object.entries({flexDirection:t.flexDirection,flexWrap:t.flexWrap,justifyContent:t.justifyContent,alignItems:t.alignItems,alignContent:t.alignContent,gap:eu(t.gap),rowGap:eu(t.rowGap),columnGap:eu(t.columnGap),position:t.position,top:ep(t.top),right:ep(t.right),bottom:ep(t.bottom),left:ep(t.left),zIndex:t.zIndex,width:ep(t.width),height:ep(t.height),minWidth:ep(t.minWidth),maxWidth:ep(t.maxWidth),minHeight:ep(t.minHeight),maxHeight:ep(t.maxHeight),overflowX:t.overflowX,overflowY:t.overflowY,display:t.display,visibility:t.visibility,margin:ep(t.margin),padding:ep(t.padding),borderRadius:ep(t.borderRadius),opacity:t.opacity}).filter(([,e])=>null!=e)))}},[M,i.pageProperties,W?.primaryFont,D,L]),z=(0,o.useMemo)(()=>ef.map(e=>R.find(t=>
1t.key===e)).filter(Boolean),[R]),G=[D?"home-3":"","box-border min-h-full w-full",K?"":"px-5 py-4 md:px-6 md:py-5"].filter(Boolean).join(" "),U=(0,n.jsx)("div",{"data-template-color-scope":"true",className:[D?"pc-scope":"",K?"w-full max-w-none":N.canvas,K?"flex min-h-full w-full flex-col gap-0 overflow-x-hidden transition-all duration-300 ease-out":"mx-auto flex min-h-full w-full flex-col gap-0 overflow-visible transition-all duration-300 ease-out","desktop"!==d?"border border-gray-300 bg-white shadow-lg dark:border-slate-700 dark:bg-slate-900":K?"bg-transparent":"bg-gray-100 dark:bg-slate-900/60",(t=i.pageProperties,r=void 0,a=K?"w-full max-w-none":void 0,[r,t?.classes,a].filter(Boolean).join(" ").trim())].join(" "),style:Q,"aria-label":"Page canvas",children:(0,n.jsxs)("div",{className:G,children:[J?(0,n.jsx)("div",{className:"mb-3 flex items-center justify-end",children:(0,n.jsx)("button",{type:"button",onClick:()=>{l.setWidget(J),l.setSection("settings"),l.setSidebarStatus(!0)},className:["rounded-full border px-3 py-1.5 text-xs font-semibold shadow-sm transition",p===J.id?"border-emerald-500 bg-emerald-50 text-emerald-700":"border-slate-200 bg-white text-slate-700 hover:border-emerald-300 hover:text-emerald-700 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-100 dark:hover:border-emerald-400 dark:hover:text-emerald-200"].join(" "),children:"ØªÙØ¸ÛÙ
ات Ú©Ø§ÙØªÛÙØ± اصÙÛ ØµÙØÙ"})}):null,_||T?null:(0,n.jsxs)("div",{className:["mb-3 rounded-2xl border border-dashed px-4 py-3 text-xs leading-6 font-iran",D?"border-[rgba(5,50,98,0.18)] bg-white/80 text-[#053262]":"border-slate-300 bg-white text-slate-600"].join(" "),children:["اÛÙ ØµÙØÙ Ø¨Ø§ ساختار ÙØ¯ÛÙ
Û Ø¨Ø§Ø² شد٠است. Ø¨Ø±Ø§Û ÚÛØ¯Ù
ا٠دÙÛÙâØªØ±Ø ÛÚ© Ú©Ø§ÙØªÛÙØ± پاÛÙ Ø¨Ø³Ø§Ø²ÛØ¯ تا ساختار بÙÙ
Ù Ø±ÙØ¯Ø± ÙÙØ§ÛÛ Ø¨Ø§ ÙÙ
Û
1کسا٠بÙ
اÙÙØ¯.",b||h?(0,n.jsx)("button",{type:"button",onClick:()=>{if(b){let e=i.addNode(b);l.clearCanvasIntent(),l.setWidget(e),l.setSection("settings");return}h&&(i.moveNode(h),l.clearCanvasIntent(),l.setWidget(h),l.setSection("settings"))},className:"mr-3 rounded-full bg-slate-900 px-4 py-1.5 text-white transition hover:bg-slate-700",children:b?"Ø§ÙØ²ÙØ¯Ù Ø¨Ù Ø§ÙØªÙØ§Û ØµÙØÙ":"Ø§ÙØªÙØ§Ù Ø¨Ù Ø§ÙØªÙØ§Û ØµÙØÙ"}):null]}),T?(0,n.jsxs)("div",{className:"flex min-h-[320px] w-full flex-col items-center justify-center rounded-2xl border border-dashed px-6 py-8 text-center border-slate-300 bg-white/80 dark:border-slate-700 dark:bg-slate-900/70",children:[(0,n.jsx)("div",{className:"mb-3 text-base font-semibold text-slate-800 dark:text-slate-100",children:"ØµÙØÙ ÙÙÙØ² ساختار ÙØ¯Ø§Ø±Ø¯"}),(0,n.jsx)("p",{className:"mb-6 max-w-xl text-sm leading-7 text-slate-500 dark:text-slate-400",children:"Ø¨Ø±Ø§Û Ø´Ø±ÙØ¹Ø ÛÚ© Ú©Ø§ÙØªÛÙØ± پاÛÙ Ø¨Ø³Ø§Ø²ÛØ¯ تا ÙØ± ÙÛØ¬Øª داخ٠ساختار Û±Û² ستÙÙÙ Ø®ÙØ¯Ø´ ÙØ±Ø§Ø± Ø¨Ú¯ÛØ±Ø¯ ٠آÙÚ٠رÙÛ Ø¨ÙÙ
Ù
ÛâØ¨ÛÙÛØ¯ با Ø±ÙØ¯Ø± ÙÙØ§ÛÛ Ûکسا٠بÙ
Ø§ÙØ¯."}),(0,n.jsxs)("div",{className:"mb-4 flex flex-wrap items-center justify-center gap-2",children:[(0,n.jsx)("button",{type:"button",onClick:()=>{let e=x===O.p.header?(0,E.rd)("header"):x===O.p.footer?(0,E.rd)("footer"):(0,E.rd)("page"),t=i.addNode((0,E.lV)(e));l.clearCanvasIntent(),l.setWidget(t),l.setSection("settings")},className:"rounded-full bg-emerald-600 px-5 py-2.5 text-sm text-white transition hover:bg-emerald-500",children:"ساخت Ú©Ø§ÙØªÛÙØ± پاÛÙ"}),(0,n.jsx)("button",{type:"button",onClick:()=>{l.setWidgetsModalOpen(!0)},className:"rounded-full border border-slate-300 bg-white px-5 py-2.5 text-sm text-slate-700 transition hover:border-emerald-300 hover:text-emerald-700",children:"باز کرد٠ÙÙØ±Ø³Øª ابزارکâÙØ§"})]}),(0,n.jsx)("div",{className:"flex flex-wrap items-center justify-center gap-2",children:z.map(e=>(0,n.jsx)("button",{type:"button",onClick:()=>(e=>{let t=R.find(t=>t.key===e);if(!t)return;let r=i.addNode(t);l.clearCanvasIntent(),l.setWidget(r),l.setSection("settings")})(e.key),className:"rounded-full border border-slate-200 bg-white px-4 py-2 text-sm text-slate-700 transition hover:border-emerald-300 hover:text-emerald-700",children:e.title},e.key))})]}):null,(0,n.jsx)("div",{className:"min-w-0",children:(s||[]).map(t=>(0,n.jsx)(ex.default,{page:e,widget:t,language:q,theme:A,template:W},t.id))})]})}),V=(0,n.jsxs)(en.default,{className:"template-theme-scope min-h-full w-full transition-colors duration-300",defaultMode:H?.mode||"light",persistInBrowser:!1,themeClassName:(0,ea.Y7)(A).cssClassName,darkThemeClassName:(0,ea.Y7)(A).darkCssClassName,children:[D?(0,n.jsx)(et,{direction:B}):null,U]});return(0,n.jsx)("div",{ref:k,className:`editor-scroll h-full overflow-auto ${N.wrapper}`,children:(0,n.jsx)("div",{className:"flex min-h-full w-full justify-center px-8 py-8 md:px-10 md:py-10",children:(0,n.jsx)("div",{className:"w-full origin-top transition-transform duration-150 ease-out",style:{transform:`scale(${c/100})`,transformOrigin:"top center"},children:V})})})}let eb=(0,n.jsx)("div",{className:"flex min-h-[220px] w-full items-center justify-center px-4 py-8",children:(0,n.jsx)("span",{className:"flex h-9 w-9 items-center justify-center rounded-full border border-[#008060]/20 bg-[#008060]/10 text-[#008060]",children:(0,n.jsx)(l.NK,{className:"animate-spin text-[18px]"})})}),ey=(0,i.default)(()=>r.e(25709).then(r.bind(r,25709)),{loadableGenerated:{webpack:()=>[25709]},ssr:!1,loading:()=>eb}),ev=(0,i.default)(()=>r.e(3124).then(r.bind(r,3124)),{loadableGenerated:{webpack:()=>[3124]},ssr:!1,loading:()=>eb}),ej=(0,i.default)(()=>r.e(38951).then(r.bind(r,38951)),{loadableGenerated:{webpack:()=>[38951]},ssr:!1,loading:()=>eb});function ew({initialPagePropertiesOpen:e=!1,workspaceMode:t="default",workspaceLabels:r}){let a=(0,u.s0)(e=>e.clearCanvasIntent),i=(0,u.s0)(e=>e.selectedWidget),d=(0,u.s0)(e=>e.paletteWidget),p=(0,u.s0)(e=>e.movingWidgetId),m=(0,u.s0)(e=>e.isWidgetsModalOpen),x=(0,u.s0)(e=>e.isWidgetPropertiesModalOpen),f=(0,u.s0)(e=>e.setWidgetsModalOpen),h=(0,u.s0)(e=>e.setWidgetPropertiesModalOpen),b=(0,u.s0)(e=>
1e.workspaceTab),y=(0,u.s0)(e=>e.setWorkspaceMode),v=(0,u.s0)(e=>e.setWorkspaceTab),w=(0,u.sr)(e=>e.getNodeById),N=(0,u.sr)(e=>e.nodes),k=(0,u.sr)(e=>e.undo),S=(0,u.sr)(e=>e.redo),C=(0,u.sr)(e=>e.canUndo),O=(0,u.sr)(e=>e.pageProperties),[P,E]=(0,o.useState)(e),[$,I]=(0,o.useState)(360),F=(0,o.useRef)(null),M="dark"===(0,c.f)(e=>e.themeMode),A="tabs"===t;(0,Y.M)(C);let W=(0,o.useMemo)(()=>({settings:r?.settings||"ØªÙØ¸ÛÙ
ات ØµÙØÙ",content:r?.content||"Ù
ØØªÙØ§Û ØµÙØÙ"}),[r]),L=(0,o.useMemo)(()=>{if(p){let e=w(p);return e?`در ØØ§Ù Ø§ÙØªÙا٠\xab${(0,j.M)(e)}\xbb. Ù
ÙØµØ¯ را رÙÛ ØµÙØÙ Ø§ÙØªØ®Ø§Ø¨ Ú©ÙÛØ¯.`:null}if(d){var e;let t,r;return 0===(e=N||[],t=0,(r=e=>{e.forEach(e=>{e.type===g.x.grid_item&&(t+=1),Array.isArray(e.children)&&e.children.length>0&&r(e.children)})})(e),t)&&d.type!==g.x.grid_item?"ابتدا ÛÚ© Ú©Ø§ÙØªÛÙØ± ٠ستÙ٠اضاÙÙ Ú©ÙÛØ¯ تا جاÛÚ¯Ø§Ù ÙØ±Ø§Ø±Ú¯ÛØ±Û ÙÛØ¬ØªâÙØ§ Ø³Ø§Ø®ØªÙ Ø´ÙØ¯.":`ÙÛØ¬Øª \xab${d.title}\xbb Ø¢Ù
ادÙâÛ Ø§ÙØ²Ùد٠است. رÙÛ ÛÚ©Û Ø§Ø² ستÙÙâÙØ§Û ØµÙØÙ Ú©ÙÛÚ© Ú©ÙÛØ¯.`}return null},[w,p,N,d]);(0,o.useEffect)(()=>{y(t)},[y,t]),(0,o.useEffect)(()=>{E(e)},[e]),(0,o.useEffect)(()=>{A&&"settings"===b&&(a(),h(!1))},[a,h,A,b]),(0,o.useEffect)(()=>{let e=e=>{let t=e.target,r=t?.tagName?.toLowerCase();if("input"===r||"textarea"===r||"select"===r||t?.isContentEditable)return;if("Escape"===e.key){a(),f(!1),h(!1),E(!1);return}if(!(e.ctrlKey||e.metaKey)||e.altKey)return;let n=e.key.toLowerCase();if("z"===n){e.preventDefault(),e.shiftKey?S():k();return}"y"===n&&(e.preventDefault(),S())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[a,S,h,f,k]),(0,o.useEffect)(()=>{if(!x)return;let e=e=>{let t=F.current;t&&I(Math.min(Math.max(320,t.originWidth-(e.clientX-t.startX)),Math.max(320,Math.min(520,window.innerWidth-420))))},t=()=>{F.current=null};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),window.addEventListener("pointercancel",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t),window.removeEventListener("pointercancel",t)}},[x]);let T=(0,n.jsxs)("div",{className:["flex items-center justify-between gap-1.5 border-b px-2.5 py-2 select-none",M?"border-slate-700 bg-slate-900 text-slate-100":"border-slate-200 bg-white text-slate-900"].join(" "),children:[(0,n.jsx)("div",{className:"min-w-0 font-iran",children:(0,n.jsx)("div",{className:"truncate text-[11px] font-semibold leading-4",children:i?(0,j.M)(i,w):"ØªÙØ¸ÛÙ
ات ابزارک"})}),(0,n.jsx)("div",{className:"flex items-center gap-1",children:(0,n.jsx)("button",{type:"button",onClick:()=>h(!1),className:["flex h-6 w-6 shrink-0 items-center justify-center rounded-md transition-colors",M?"text-slate-400 hover:bg-slate-800 hover:text-white":"text-slate-500 hover:bg-slate-100 hover:text-slate-900"].join(" "),"aria-label":"Ø¨Ø³ØªÙ ØªÙØ¸ÛÙ
ات ابزارک",title:"بستÙ",children:(0,n.jsx)(l.r$,{})})})]}),H=(0,n.jsx)(ev,{});return(0,n.jsxs)("div",{className:"jsx-10317c816cbf8e6d "+(["flex h-full w-full flex-col items-stretch justify-start transition-colors",M?"bg-slate-900 text-slate-100":"bg-gray-100 text-slate-900"].join(" ")||""),children:[(0,n.jsx)(U,{onOpenPageProperties:()=>{A?v("settings"):E(!0)},showPagePropertiesButton:!A,workspaceTabs:A?{active:b,labels:W,onChange:v}:void 0}),A?null:(0,n.jsx)(V.A,{open:P,onClose:()=>E(!1),width:820,title:(0,n.jsx)("span",{className:"jsx-10317c816cbf8e6d font-iran",children:"ÙÛÚÚ¯ÛâÙØ§Û ØµÙØÙ"}),bodyClassName:"h-[72vh] overflow-x-auto overflow-y-auto p-3 text-right",draggable:!0,children:(0,n.jsx)(ey,{})}),(0,n.jsx)(V.A,{open:m,onClose:()=>f(!1),width:980,title:(0,n.jsx)("span",{className:"jsx-10317c816cbf8e6d font-iran",children:"ÙÙØ±Ø³Øª ابزارکâÙØ§"}),bodyClassName:"!h-[72vh] max-h-[calc(100vh-9rem)] !overflow-hidden !p-0 text-right",children:(0,n.jsx)(ej,{})}),(0,n.jsxs)("div",{className:"jsx-10317c816cbf8e6d relative flex h-full min-h-0 w-full flex-row-reverse overflow-hidden",children:[x&&i?(0,n.jsxs)("aside",{style:{width:$},className:"jsx-10317c816cbf8e6d "+(["relative z-20 flex min-h-0 shrink-0 flex-col overflow-hidden border-s shadow-xl transition-[width,background-color,border-color,box-shadow] duration-200 ease-out",M?"border-slate-700 bg-slate-900 text-slate-100":"border-slate-200 bg-white text-slate-900","animate-[pc-property-panel-slide_180ms_cubic-bezier(0.2,0.8,0.2,1)]"].join(" ")||""),children:[(0,n.jsx)("button",{type:"button","aria-label":"تغÛÛØ± عرض Ù¾ÙÙ ØªÙØ¸ÛÙ
ات",title:"تغÛÛØ± عرض Ù¾ÙÙ",onPointerDown:e=>
1{e.preventDefault(),F.current={startX:e.clientX,originWidth:$}},className:"jsx-10317c816cbf8e6d absolute inset-y-0 left-0 z-20 w-1.5 cursor-ew-resize transition-colors hover:bg-emerald-500/30"}),T,(0,n.jsx)("div",{className:"jsx-10317c816cbf8e6d min-h-0 flex-1 overflow-hidden text-[11px] leading-5",children:H})]}):null,(0,n.jsx)("div",{className:"jsx-10317c816cbf8e6d min-h-0 min-w-0 flex-1 overflow-y-auto",children:(0,n.jsxs)("div",{className:"jsx-10317c816cbf8e6d "+(["min-h-full min-w-0 flex-1",M?"bg-slate-900":"bg-white"].join(" ")||""),children:[L?(0,n.jsx)("div",{className:"jsx-10317c816cbf8e6d "+(["border-b px-4 py-2 text-xs font-iran",M?"border-slate-700 bg-slate-950 text-emerald-200":"border-emerald-100 bg-emerald-50 text-emerald-700"].join(" ")||""),children:L}):null,A&&"settings"===b?(0,n.jsx)("div",{className:"jsx-10317c816cbf8e6d h-full",children:(0,n.jsx)(ey,{})}):O?(0,n.jsx)(eh,{page:O}):null]})})]}),(0,n.jsx)(s(),{id:"10317c816cbf8e6d",children:"@keyframes pc-property-panel-slide{from{opacity:0;transform:translatex(14px)}to{opacity:1;transform:translatex(0)}}"})]})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.