@opengis/cms 0.0.38 → 0.0.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -247,7 +247,7 @@ About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guid
247
247
  <svg class="w-4 h-4 text-gray-400" fill="currentColor" viewBox="0 0 20 20">
248
248
  <path fill-rule="evenodd" d="M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm12 12H4l4-8 3 6 2-4 3 6z" clip-rule="evenodd" />
249
249
  </svg>
250
- `,h.parentNode.appendChild(g)};return e.onMounted(()=>{var p,h;(h=(p=t.value)==null?void 0:p.filter(g=>typeof g=="object"))==null||h.forEach(g=>g.id?g.id:g.id=Math.random().toString(36).substring(2,15))}),(p,h)=>(e.openBlock(),e.createElementBlock("div",wV,[e.createElementVNode("div",_V,[e.createElementVNode("div",EV,[e.createElementVNode("table",CV,[e.createElementVNode("thead",VV,[e.createElementVNode("tr",NV,[h[4]||(h[4]=e.createElementVNode("th",{class:"h-10 px-2 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] w-12 text-center"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.colModel,g=>(e.openBlock(),e.createElementBlock("th",{key:g.name,class:"h-10 px-2 text-left align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 min-w-[150px]"},e.toDisplayString(g.label||g.title||g.name),1))),128)),e.createElementVNode("th",vV,e.toDisplayString(p.$t("cms.table.actions")),1)])]),e.createElementVNode("tbody",BV,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(g,y)=>(e.openBlock(),e.createElementBlock("tr",{key:g==null?void 0:g.id,class:e.normalizeClass(["border-b data-[state=selected]:bg-muted transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60 cursor-move",{"opacity-50":l.value===g}]),draggable:"true",onDragstart:b=>o(b,g,y),onDragover:b=>s(b),onDrop:b=>u(b,y),onDragenter:b=>i(b,y),onDragleave:h[2]||(h[2]=b=>c(b))},[e.createElementVNode("td",AV,[e.createElementVNode("div",DV,[e.createVNode(e.unref(Qa))])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.colModel,b=>(e.openBlock(),e.createElementBlock("td",{key:b.name,class:"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-slate-600 dark:text-slate-400 text-sm"},[b.type==="Texteditor"?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:g[b.key]||"-"},null,8,MV)):b.type==="File"?(e.openBlock(),e.createElementBlock("div",TV,[Array.isArray(g[b.key])&&g[b.key].length>0?(e.openBlock(),e.createElementBlock("div",LV,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d(g[b.key]),(w,x)=>(e.openBlock(),e.createElementBlock("div",{key:x,class:"relative w-8 h-8 rounded overflow-hidden bg-gray-100 dark:bg-gray-700 flex-shrink-0"},[e.createElementVNode("img",{src:w,alt:`Image ${x+1}`,class:"w-full h-full object-cover",onError:h[0]||(h[0]=k=>f(k))},null,40,$V)]))),128)),m(g[b.key])>0?(e.openBlock(),e.createElementBlock("span",FV," +"+e.toDisplayString(m(g[b.key])),1)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",IV,[...h[5]||(h[5]=[e.createElementVNode("svg",{class:"w-4 h-4 text-gray-400",fill:"currentColor",viewBox:"0 0 20 20"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm12 12H4l4-8 3 6 2-4 3 6z","clip-rule":"evenodd"})],-1)])]))])):(e.openBlock(),e.createElementBlock("span",OV,e.toDisplayString(g[b.key]||"-"),1))]))),128)),e.createElementVNode("td",PV,[e.createVNode(yV,{item:g,colModel:r.colModel,modelValue:t.value,"onUpdate:modelValue":h[1]||(h[1]=b=>t.value=b)},null,8,["item","colModel","modelValue"])])],42,SV))),128)),a.value?(e.openBlock(),e.createElementBlock("tr",RV)):e.createCommentVNode("",!0)])])])]),e.createVNode(xV,{colModel:r.colModel,modelValue:t.value,"onUpdate:modelValue":h[3]||(h[3]=g=>t.value=g)},null,8,["colModel","modelValue"])]))}},Ti="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAACbCAIAAABJbgHoAAAGfklEQVR4Ae3d7W6baBSF0d7/7Q6IDxkzmrHEQU2DHZudWH1XflRHcXNqVnka4tL01+qNAIGwwK/wfusJEFjPyexyuUzTNAxD3/dd1/3z/1vXdX3fD8MwTdPlcoFNoFmBlzJblmWapr7vb10d/9j3/TRNy7I0a+3AmxV4MrPr9TqO43FXnz06juP1em1W3IE3KPBMZvM8b1eGn7V0/P6u6+Z5bpDbIbcp8OXMnv4k9jG8cRzbRHfUrQl8LbNhGD7W8sp7hmFoTdzxNijwhcxOb+zWp9IaPO1aO+RHMzvxWvHjZz9Xj62ddq0d70OZzfP8sY1z3+MVkdbOvKaO935m1+v1xdcVHwmy6zqv8jd15jV1sPczi14u7gt06djUmdfUwd7JbFmWfQnp2T0iTZ187RzsncymaUqntd8/TVM79I60HYE7mT14v+I+lVfmvu+P6W93UQ7eCLyxwMd7d48yu1wurzTz3Mce3Mu/LMs4jt3/b88t91EE0gK383Mcx/1XQEeZffMV4+34D64bb42lmewn8LpA13X7l/SOMgvd9nF8DAc3hXzzFezx8/QogWOB/VdAR5n9yGm9f3K/fZ32DX99dwznUQKPC3Rdt53AR5n9yGm9f3Lbs7wNjx+hn0ngHQS2E/gos596otuT+234qefj1yXwnMB2AsvsOUAfReC+wEOZuWi8D+lnEPhc4KHM3u0lkM8PxyME3lHgocze7QX9d4T0nAh8LvBQZu/219M/8tn1c0OPEDgS2P/V1NFLIO92s9U0TT/y5eKRpccI/Emg67r9/UxHma3r+s2fQPZ/AGyfcLfhlW8O+ScK7yOQEvjtm5Heyeybrxv3fwBsde2HZVnmeZ68EXhjgXme9/cNr+u976Hvn3XuIzcTeE7gzmezdV19k4LnZH0UgU3gfma+5c6GZSDwnMD9zNZ19Q3knsP1UQRuAg9llr503P8DOL8xBP4+gUczW9c1dFPIwb/j/Pu4HVGbAl/ILFGaxto87Vo76q9ldu7Vo2vF1s62Zo/3y5ndXhF58aYn/41gsydcmwf+TGbrur5y39Nv96G06e6omxJ4MrObkf/ivalzxcE+LfBSZtuverlcpmkahqHv++16suu6vu+HYZim6eCbnG5LDAT+VoFzMvtbdRwXgVMEZHYKoyUEjgRkdqTjMQKnCMjsFEZLCBwJyOxIx2METhGQ2SmMlhA4EpDZkY7HCJwiILNTGC0hcCTwX2a3/1/QjwQInCuwlSezc2FtI1ACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhAS2DL7F8r/OP7dtZNpAAAAAElFTkSuQmCC",Li={faq:{schema:{title:{type:"text",label:"Назва",placeholder:"Назва"},show_dots:{type:"switcher",label:"Показувати точки"},show_index:{type:"switcher",conditions:["show_dots","==","true"],label:"Показувати нумерацію"},index_type:{type:"combobox",conditions:["show_index","==","true"],label:"Тип нумерації",options:[{id:"decimal",text:"Десятковий"},{id:"upper-alpha",text:"Латинські великі букви"},{id:"lower-alpha",text:"Латинські маленькі букви"},{id:"upper-roman",text:"Римські великі цифри"},{id:"lower-roman",text:"Римські маленькі цифри"},{id:"upper-cyrillic",text:"Кириличні великі букви"},{id:"lower-cyrillic",text:"Кириличні маленькі букви"}]},openfirst:{type:"switcher",label:"Відкрити перший елемент?"},collapse_mode:{type:"switcher",label:"Не згортати попередній елемент?"},data:{type:"DataTable",colModel:[{key:"title",ua:"Назва",type:"text",required:!0,validators:["required"]},{key:"is_section",type:"Radio",label:"Заповнити секціями",options:[{id:"yes",text:"Так"},{id:"no",text:"Ні"}],required:!0,validators:["required"]},{key:"section",type:"reference",label:"Вкладений контент",placeholder:"Ваш контент",conditions:["is_section","==","yes"],required:!0,validators:["required"]},{key:"body",type:"tiptap-editor",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","no"],required:!0,validators:["required"]}]}}},banner:{schema:{title:{type:"text",label:"Назва",placeholder:"Назва"},image:{type:"file",label:"Зображення",placeholder:"Зображення"}}},photoGrid:{schema:{columns:{type:"number",label:"Кількість колонок",placeholder:"Кількість колонок",default:3},data:{type:"DataTable",colModel:[{key:"image",ua:"Зображення",type:"file"},{key:"caption",ua:"Заголовок",type:"text"}]}}},slider:{schema:{autoplay:{type:"switcher",label:"Автоматичне гортання?",default:!0},autoplaySpeed:{type:"number",label:"Швидкість автоматичного гортання(мс)",placeholder:"Швидкість автоматичного гортання(мс)",default:3e3},show_navigation:{type:"switcher",label:"Показувати кнопки навігації?"},data:{type:"DataTable",colModel:[{key:"title",ua:"Назва",type:"text"},{key:"link",ua:"Посилання",type:"text"},{key:"image",ua:"Зображення",type:"file"},{key:"image_width",ua:"Ширина зображення(px)",type:"number",placeholder:"Ширина зображення"},{key:"image_height",ua:"Висота зображення(px)",type:"number",placeholder:"Висота зображення"},{ua:"Розтягувати по ширині",key:"stretch",type:"switcher"},{key:"target_blank",ua:"Відкривати в новій вкладці?",type:"switcher"}]}}},video:{schema:{file:{type:"file",max_size:50,description:"Максимальний розмір файлу 50MB",label:"Завантажити відео",placeholder:"Завантажити відео"},hidden_gif:{type:"switcher",label:"Сховати GIF"},preview:{type:"file",label:"Прев'ю для відео"},link:{type:"text",label:"Посилання",placeholder:"Посилання"}}},about:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},text:{type:"tiptap-editor",label:"Текст",placeholder:"Текст"},url:{type:"file",label:"Зображення / відео",placeholder:"Посилання"}}},cards:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},data:{type:"DataTable",colModel:[{key:"title",ua:"Назва",type:"text"},{key:"img",ua:"Зображення",type:"file"},{key:"link",ua:"Посилання",type:"text"},{key:"description",ua:"Опис",type:"text"}]}}},usefulLinks:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},data:{type:"DataTable",colModel:[{key:"text",ua:"Назва",type:"text"},{key:"url",ua:"Посилання",type:"text"},{key:"target_blank",ua:"Відкривати в новій вкладці?",type:"switcher"}]}}},team:{schema:{data:{type:"DataTable",colModel:[{key:"avatar",ua:"Аватар",type:"file"},{key:"title",ua:"Ім'я/ПІБ",type:"text"},{key:"description",ua:"Опис",type:"textarea",optional:!0},{key:"position",ua:"Посада",type:"text",tooltip:!0},{key:"email",ua:"Email",type:"text",optional:!0},{key:"tel",ua:"Телефон",type:"text",optional:!0},{key:"schedule",ua:"Графік прийому",type:"text",optional:!0},{key:"isinfo",type:"switcher",label:"Відображати кнопку 'Детальніше'"},{key:"slug",ua:"Slug",type:"text",label:"Унікальний ідентифікатор"}]}}},body:{schema:{background_color:{type:"switcher",label:"Додати білий фон?"},content:{type:"tiptap-editor",label:"Текст",placeholder:"Текст"}}},news:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},buttonText:{type:"text",label:"Текст кнопки",placeholder:"Текст кнопки"},buttonLink:{type:"text",label:"Посилання кнопки",placeholder:"Посилання кнопки"},tag:{type:"select",label:"Тег",placeholder:"Тег",data:"tag_id"},news_list:{type:"select",label:"Список новин",multiple:!0,placeholder:"Список новин",parent:"tag",data:"news_tag_id"}}},form:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},formUrl:{type:"text",label:"Посилання для відправки форми",placeholder:"Посилання"},schema:{label:"Схема форми",type:"DataTable",colModel:[{key:"name",ua:"Name",type:"text",placeholder:"Name"},{key:"label",ua:"Title",type:"text",placeholder:"Title"},{key:"type",ua:"Type",type:"combobox",options:[{text:"Text",id:"text"},{text:"Textarea",id:"textarea"},{text:"switcher",id:"switcher"},{text:"Email",id:"email"},{text:"Mask",id:"mask"},{text:"Number",id:"number"},{text:"Date",id:"date"},{text:"Datetime",id:"datetime"}]},{key:"mask",ua:"Маска",type:"text",conditions:["type","==","mask"],placeholder:"Маска"},{key:"placeholder",ua:"Плейсхолдер",type:"text",placeholder:"Placeholder"},{key:"required",ua:"Required",type:"switcher"}]}}},tabs:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},description:{type:"textarea",label:"Опис",placeholder:"Опис"},history_mode:{type:"switcher",label:"Використовувати історію сторінки?"},data:{type:"DataTable",colModel:[{key:"slug",type:"slug",label:"Slug",parent:"title",placeholder:"Slug"},{key:"title",ua:"Назва",type:"text",required:!0,validators:["required"]},{key:"is_section",type:"Radio",label:"Заповнити секціями",options:[{id:"yes",text:"Так"},{id:"no",text:"Ні"}],required:!0,validators:["required"]},{key:"section",type:"reference",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","yes"],required:!0,validators:["required"]},{key:"body",type:"tiptap-editor",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","no"],required:!0,validators:["required"]}]}}},vertical_tabs:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},history_mode:{type:"switcher",label:"Використовувати історію сторінки?"},data:{type:"DataTable",colModel:[{key:"slug",type:"slug",label:"Slug",parent:"title",placeholder:"Slug"},{key:"title",ua:"Назва",type:"text",required:!0,validators:["required"]},{key:"is_section",type:"Radio",label:"Заповнити секціями",options:[{id:"yes",text:"Так"},{id:"no",text:"Ні"},{id:"slug",text:"Привязати сторінку"}],required:!0,validators:["required"]},{key:"slug",type:"text",label:"Slug",placeholder:"Slug",conditions:["is_section","==","slug"]},{key:"section",type:"reference",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","yes"],required:!0,validators:["required"]},{key:"body",type:"tiptap-editor",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","no"],required:!0,validators:["required"]}]}}},documents:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},icon:{type:"file",label:"Завантажити іконку",placeholder:"Завантажити іконку"},show_icon:{type:"switcher",label:"Показувати іконку?"},documents:{type:"DataTable",colModel:[{key:"title",ua:"Назва",type:"text"},{key:"file",info:"Прев'ю доступно тільки для документів у форматі pdf, html, txt. Інші формати одразу завантажуються.",ua:"Файл",type:"file"}]}}},infoLine:{schema:{divider:{type:"file",label:"Завантажити розподілювач"},speed:{type:"number",label:"Швидкість автоматичного гортання(с)",placeholder:"Швидкість автоматичного гортання(с)",default:20},data:{type:"DataTable",colModel:[{key:"title",ua:"Текст",type:"text"}]}}},interested:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},data:{type:"DataTable",colModel:[{key:"title",ua:"Заголовок",type:"text"},{key:"link",ua:"Посилання",type:"text"},{key:"target_blank",ua:"Відкривати в новій вкладці?",type:"switcher"},{key:"color",ua:"Колір фону",type:"color"}]}}},contact:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},data:{type:"DataTable",colModel:[{key:"type",ua:"Тип",type:"combobox",options:[{id:"email",text:"Email"},{id:"tel",text:"Телефон"},{id:"address",text:"Адреса"}]},{key:"title",ua:"Пошта",type:"text",conditions:["type","==","email"]},{key:"title",ua:"Телефон",type:"text",conditions:["type","==","tel"]},{key:"title",ua:"Адреса",type:"text",conditions:["type","==","address"]},{key:"description",ua:"Опис",type:"text"}]}}},iframe:{schema:{link:{type:"text",label:"Посилання",placeholder:"Посилання"},file:{type:"file",label:"Завантажити файл",placeholder:"Завантажити файл"},height:{type:"text",label:"Висота iframe(px)",placeholder:"Висота iframe(px)"}}}},on=[{text:"reference.faq",id:"faq"},{text:"reference.banner",id:"banner"},{text:"reference.slider",id:"slider"},{text:"reference.photoGrid",id:"photoGrid"},{text:"reference.video",id:"video"},{text:"reference.about",id:"about"},{text:"reference.cards",id:"cards"},{text:"reference.usefulLinks",id:"usefulLinks"},{text:"reference.team",id:"team"},{text:"reference.body",id:"body"},{text:"reference.news",id:"news"},{text:"reference.form",id:"form"},{text:"reference.tabs",id:"tabs"},{text:"reference.vertical_tabs",id:"vertical_tabs"},{text:"reference.documents",id:"documents"},{text:"reference.infoLine",id:"infoLine"},{text:"reference.interested",id:"interested"},{text:"reference.contact",id:"contact"},{text:"reference.iframe",id:"iframe"}],UV={class:"h-full w-full flex flex-col"},jV={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},zV={class:"text-xs font-medium text-gray-600"},HV={key:0,class:"text-xs text-gray-500"},$i={__name:"cards-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",UV,[l[0]||(l[0]=e.createStaticVNode('<div class="flex-1 grid grid-cols-3 gap-1.5"><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div></div>',1)),e.createElementVNode("div",jV,[e.createElementVNode("div",zV,e.toDisplayString(t.$t(r.text)),1),r.count&&r.count>0?(e.openBlock(),e.createElementBlock("div",HV,e.toDisplayString(r.count),1)):e.createCommentVNode("",!0)])]))}},qV={class:"h-full w-full flex flex-col"},KV={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},GV={class:"text-xs font-medium text-gray-600"},WV={key:0,class:"text-xs text-gray-500"},YV={__name:"faq-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",qV,[l[0]||(l[0]=e.createStaticVNode('<div class="h-3 bg-gray-500 rounded mb-2"></div><div class="space-y-1.5 flex-1"><div class="border border-gray-300 rounded p-1"><div class="flex items-center justify-between"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down w-2.5 h-2.5 text-gray-400"><path d="m6 9 6 6 6-6"></path></svg></div></div><div class="border border-gray-300 rounded p-1"><div class="flex items-center justify-between"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down w-2.5 h-2.5 text-gray-400"><path d="m6 9 6 6 6-6"></path></svg></div><div class="mt-1 pt-1 border-t border-gray-200"><div class="space-y-0.5"><div class="h-1 bg-gray-200 rounded"></div><div class="h-1 bg-gray-200 rounded w-5/6"></div><div class="h-1 bg-gray-200 rounded w-4/5"></div></div></div></div><div class="border border-gray-300 rounded p-1"><div class="flex items-center justify-between"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down w-2.5 h-2.5 text-gray-400"><path d="m6 9 6 6 6-6"></path></svg></div></div><div class="border border-gray-300 rounded p-1"><div class="flex items-center justify-between"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down w-2.5 h-2.5 text-gray-400"><path d="m6 9 6 6 6-6"></path></svg></div></div></div>',2)),e.createElementVNode("div",KV,[e.createElementVNode("div",GV,e.toDisplayString(t.$t(r.text)),1),r.count&&r.count>0?(e.openBlock(),e.createElementBlock("div",WV,e.toDisplayString(r.count),1)):e.createCommentVNode("",!0)])]))}},XV={class:"h-full w-full flex flex-col"},ZV={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},QV={class:"text-xs font-medium text-gray-600"},JV={key:0,class:"text-xs text-gray-500"},Fi={__name:"banner-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",XV,[l[0]||(l[0]=e.createStaticVNode('<div class="flex-1 bg-gray-200 rounded relative"><div class="absolute inset-0 flex items-center justify-center"><div class="w-16 h-10 bg-gray-300 rounded"></div></div><div class="absolute bottom-2 left-2"><div class="h-3 bg-gray-400 rounded w-16"></div></div></div>',1)),e.createElementVNode("div",ZV,[e.createElementVNode("div",QV,e.toDisplayString(t.$t(r.text)),1),r.count&&r.count>0?(e.openBlock(),e.createElementBlock("div",JV,e.toDisplayString(r.count),1)):e.createCommentVNode("",!0)])]))}},eN={class:"h-full w-full flex flex-col"},tN={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},rN={class:"text-xs font-medium text-gray-600"},lN={key:0,class:"text-xs text-gray-500"},nN={__name:"form-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",eN,[l[0]||(l[0]=e.createStaticVNode('<div class="h-3 bg-gray-500 rounded mb-2"></div><div class="space-y-1.5 flex-1"><div><div class="h-1.5 bg-gray-300 rounded mb-1 w-1/4"></div><div class="h-5 bg-gray-200 rounded border border-gray-300"></div></div><div><div class="h-1.5 bg-gray-300 rounded mb-1 w-1/3"></div><div class="h-5 bg-gray-200 rounded border border-gray-300"></div></div><div><div class="h-1.5 bg-gray-300 rounded mb-1 w-1/4"></div><div class="h-5 bg-gray-200 rounded border border-gray-300"></div></div><div><div class="h-1.5 bg-gray-300 rounded mb-1 w-1/3"></div><div class="h-8 bg-gray-200 rounded border border-gray-300"></div></div></div><div class="h-6 bg-gray-600 rounded mt-2"></div>',3)),e.createElementVNode("div",tN,[e.createElementVNode("div",rN,e.toDisplayString(t.$t(r.text)),1),r.count&&r.count>0?(e.openBlock(),e.createElementBlock("div",lN,e.toDisplayString(r.count),1)):e.createCommentVNode("",!0)])]))}},aN={class:"h-full w-full flex flex-col"},oN={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},sN={class:"text-xs font-medium text-gray-600"},iN={key:0,class:"text-xs text-gray-500"},Ii={__name:"news-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",aN,[l[0]||(l[0]=e.createStaticVNode('<div class="h-4 bg-gray-400 rounded mb-2"></div><div class="flex gap-2 flex-1"><div class="flex-1 space-y-2"><div class="bg-gray-200 rounded p-1.5"><div class="h-8 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-3/4"></div></div><div class="bg-gray-200 rounded p-1.5"><div class="h-8 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-3/4"></div></div></div><div class="w-20 space-y-1"><div class="border-b border-gray-300 pb-1"><div class="h-1 bg-gray-300 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-4/5"></div></div><div class="border-b border-gray-300 pb-1"><div class="h-1 bg-gray-300 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-4/5"></div></div><div class="border-b border-gray-300 pb-1"><div class="h-1 bg-gray-300 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-4/5"></div></div><div class="border-b border-gray-300 pb-1"><div class="h-1 bg-gray-300 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-4/5"></div></div></div></div>',2)),e.createElementVNode("div",oN,[e.createElementVNode("div",sN,e.toDisplayString(t.$t(r.text)),1),r.count&&r.count>0?(e.openBlock(),e.createElementBlock("div",iN,e.toDisplayString(r.count),1)):e.createCommentVNode("",!0)])]))}},cN={class:"h-full w-full flex flex-col"},dN={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},uN={class:"text-xs font-medium text-gray-600"},mN={key:0,class:"text-xs text-gray-500"},pN={__name:"team-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",cN,[l[0]||(l[0]=e.createStaticVNode('<div class="space-y-2 flex-1"><div class="flex items-start gap-2"><div class="w-8 h-8 bg-gray-300 rounded flex-shrink-0"></div><div class="flex-1 min-w-0"><div class="h-2 bg-gray-400 rounded mb-1 w-2/3"></div><div class="h-1.5 bg-gray-300 rounded mb-1"></div><div class="flex gap-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-phone w-2.5 h-2.5 text-gray-400"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-mail w-2.5 h-2.5 text-gray-400"><rect width="20" height="16" x="2" y="4" rx="2"></rect><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-clock w-2.5 h-2.5 text-gray-400"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></div></div></div><div class="flex items-start gap-2"><div class="w-8 h-8 bg-gray-300 rounded flex-shrink-0"></div><div class="flex-1 min-w-0"><div class="h-2 bg-gray-400 rounded mb-1 w-2/3"></div><div class="h-1.5 bg-gray-300 rounded mb-1"></div><div class="flex gap-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-phone w-2.5 h-2.5 text-gray-400"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-mail w-2.5 h-2.5 text-gray-400"><rect width="20" height="16" x="2" y="4" rx="2"></rect><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-clock w-2.5 h-2.5 text-gray-400"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></div></div></div><div class="flex items-start gap-2"><div class="w-8 h-8 bg-gray-300 rounded flex-shrink-0"></div><div class="flex-1 min-w-0"><div class="h-2 bg-gray-400 rounded mb-1 w-2/3"></div><div class="h-1.5 bg-gray-300 rounded mb-1"></div><div class="flex gap-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-phone w-2.5 h-2.5 text-gray-400"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-mail w-2.5 h-2.5 text-gray-400"><rect width="20" height="16" x="2" y="4" rx="2"></rect><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-clock w-2.5 h-2.5 text-gray-400"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></div></div></div><div class="flex items-start gap-2"><div class="w-8 h-8 bg-gray-300 rounded flex-shrink-0"></div><div class="flex-1 min-w-0"><div class="h-2 bg-gray-400 rounded mb-1 w-2/3"></div><div class="h-1.5 bg-gray-300 rounded mb-1"></div><div class="flex gap-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-phone w-2.5 h-2.5 text-gray-400"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-mail w-2.5 h-2.5 text-gray-400"><rect width="20" height="16" x="2" y="4" rx="2"></rect><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-clock w-2.5 h-2.5 text-gray-400"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></div></div></div></div>',1)),e.createElementVNode("div",dN,[e.createElementVNode("div",uN,e.toDisplayString(t.$t(r.text)),1),r.count&&r.count>0?(e.openBlock(),e.createElementBlock("div",mN,e.toDisplayString(r.count),1)):e.createCommentVNode("",!0)])]))}},fN={class:"h-full w-full flex flex-col"},hN={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},gN={class:"text-xs font-medium text-gray-600"},yN={key:0,class:"text-xs text-gray-500"},Oi={__name:"usefulLinks-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",fN,[l[0]||(l[0]=e.createStaticVNode('<div class="h-4 bg-gray-400 rounded mb-3"></div><div class="grid grid-cols-2 gap-2 flex-1"><div class="space-y-2"><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div></div><div class="space-y-2"><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div></div></div>',2)),e.createElementVNode("div",hN,[e.createElementVNode("div",gN,e.toDisplayString(t.$t(r.text)),1),r.count&&r.count>0?(e.openBlock(),e.createElementBlock("div",yN,e.toDisplayString(r.count),1)):e.createCommentVNode("",!0)])]))}},bN={class:"h-full w-full flex flex-col"},kN={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},xN={class:"text-xs font-medium text-gray-600"},wN={key:0,class:"text-xs text-gray-500"},_N={__name:"video-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",bN,[l[0]||(l[0]=e.createStaticVNode('<div class="flex-1 bg-gray-200 rounded relative"><div class="absolute inset-0 flex items-center justify-center"><div class="w-10 h-10 bg-gray-400 rounded-full flex items-center justify-center"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-play w-5 h-5 text-white ml-0.5"><polygon points="6 3 20 12 6 21 6 3"></polygon></svg></div></div><div class="absolute bottom-1.5 left-1.5 right-1.5"><div class="h-2 bg-gray-400 rounded mb-1"></div><div class="h-2 bg-gray-400 rounded w-3/4"></div></div></div><div class="mt-2 flex items-center gap-2"><div class="w-5 h-5 bg-gray-300 rounded"></div><div class="h-2 bg-gray-300 rounded flex-1"></div></div>',2)),e.createElementVNode("div",kN,[e.createElementVNode("div",xN,e.toDisplayString(t.$t(r.text)),1),r.count&&r.count>0?(e.openBlock(),e.createElementBlock("div",wN,e.toDisplayString(r.count),1)):e.createCommentVNode("",!0)])]))}},EN={class:"h-full w-full flex flex-col"},CN={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},VN={class:"text-xs font-medium text-gray-600"},NN={key:0,class:"text-xs text-gray-500"},vN={__name:"about-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",EN,[l[0]||(l[0]=e.createStaticVNode('<div class="flex flex-1"><div class="flex-1 pr-2"><div class="h-4 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5"><div class="h-2 bg-gray-300 rounded"></div><div class="h-2 bg-gray-300 rounded"></div><div class="h-2 bg-gray-300 rounded w-4/5"></div><div class="h-2 bg-gray-300 rounded"></div><div class="h-2 bg-gray-300 rounded w-3/4"></div><div class="h-2 bg-gray-300 rounded"></div></div></div><div class="w-16 h-20 bg-gray-200 rounded flex items-center justify-center"><div class="w-6 h-6 bg-gray-300 rounded-full"></div></div></div>',1)),e.createElementVNode("div",CN,[e.createElementVNode("div",VN,e.toDisplayString(t.$t(r.text)),1),r.count&&r.count>0?(e.openBlock(),e.createElementBlock("div",NN,e.toDisplayString(r.count),1)):e.createCommentVNode("",!0)])]))}},BN={class:"h-full w-full flex flex-col"},SN={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},AN={class:"text-xs font-medium text-gray-600"},DN={key:0,class:"text-xs text-gray-500"},MN={__name:"slider-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",BN,[l[0]||(l[0]=e.createStaticVNode('<div class="flex-1 bg-gray-200 rounded mb-2 relative"><div class="absolute inset-0 flex items-center justify-center"><div class="w-12 h-8 bg-gray-300 rounded"></div></div><div class="absolute left-1 top-1/2 transform -translate-y-1/2"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-left w-4 h-4 text-gray-400"><path d="m15 18-6-6 6-6"></path></svg></div><div class="absolute right-1 top-1/2 transform -translate-y-1/2"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-right w-4 h-4 text-gray-400"><path d="m9 18 6-6-6-6"></path></svg></div></div><div class="h-3 bg-gray-300 rounded mb-2"></div><div class="h-6 w-20 bg-gray-400 rounded"></div><div class="flex justify-center gap-1 mt-2"><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div></div>',4)),e.createElementVNode("div",SN,[e.createElementVNode("div",AN,e.toDisplayString(t.$t(r.text)),1),r.count&&r.count>0?(e.openBlock(),e.createElementBlock("div",DN,e.toDisplayString(r.count),1)):e.createCommentVNode("",!0)])]))}},TN={class:"h-full flex flex-col"},LN={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},$N={class:"text-xs font-medium text-gray-600"},FN={key:0,class:"text-xs text-gray-500"},IN={__name:"infoLine-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",TN,[l[0]||(l[0]=e.createStaticVNode('<div class="flex-1 bg-gray-200 rounded relative overflow-hidden"><div class="absolute inset-0 flex items-center"><div class="flex gap-8 whitespace-nowrap animate-pulse"><div class="h-3 bg-gray-400 rounded w-32"></div><div class="h-3 bg-gray-300 rounded w-24"></div><div class="h-3 bg-gray-400 rounded w-40"></div><div class="h-3 bg-gray-300 rounded w-28"></div><div class="h-3 bg-gray-400 rounded w-36"></div><div class="h-3 bg-gray-300 rounded w-20"></div></div></div><div class="absolute top-2 left-2 right-2 flex justify-between items-center"><div class="w-2 h-2 bg-gray-500 rounded-full"></div><div class="w-2 h-2 bg-gray-500 rounded-full"></div></div></div>',1)),e.createElementVNode("div",LN,[e.createElementVNode("div",$N,e.toDisplayString(t.$t(r.text)),1),r.count&&r.count>0?(e.openBlock(),e.createElementBlock("div",FN,e.toDisplayString(r.count),1)):e.createCommentVNode("",!0)])]))}},ON={class:"h-full flex flex-col"},PN={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},RN={class:"text-xs font-medium text-gray-600"},UN={key:0,class:"text-xs text-gray-500"},jN={__name:"tabs-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",ON,[l[0]||(l[0]=e.createStaticVNode('<div class="h-2 bg-gray-300 rounded mb-2"></div><div class="flex gap-1 mb-3"><div class="h-4 w-16 bg-gray-400 rounded"></div><div class="h-4 w-16 bg-gray-200 rounded"></div></div><div class="space-y-2 flex-1"><div class="h-2 bg-gray-300 rounded w-5/6"></div><div class="h-2 bg-gray-300 rounded"></div><div class="space-y-1 mt-3"><div class="flex items-center gap-2"><div class="w-2 h-2 bg-gray-400 rounded-full"></div><div class="h-1.5 bg-gray-300 rounded w-20"></div></div><div class="flex items-center gap-2"><div class="w-2 h-2 bg-gray-400 rounded-full"></div><div class="h-1.5 bg-gray-300 rounded w-16"></div></div></div></div>',3)),e.createElementVNode("div",PN,[e.createElementVNode("div",RN,e.toDisplayString(t.$t(r.text)),1),r.count&&r.count>0?(e.openBlock(),e.createElementBlock("div",UN,e.toDisplayString(r.count),1)):e.createCommentVNode("",!0)])]))}},zN={class:"h-full flex flex-col"},HN={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},qN={class:"text-xs font-medium text-gray-600"},KN={key:0,class:"text-xs text-gray-500"},Pi={__name:"documents-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",zN,[l[0]||(l[0]=e.createStaticVNode('<div class="h-4 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5 flex-1"><div class="flex items-center justify-between p-1.5 border-b border-gray-200"><div class="flex items-center gap-2"><div class="w-3 h-3 bg-gray-400 rounded-full"></div><div class="h-2 bg-gray-300 rounded flex-1 w-28"></div></div><div class="flex gap-1.5"><div class="w-3 h-3 bg-gray-200 rounded"></div><div class="w-3 h-3 bg-gray-200 rounded"></div></div></div><div class="flex items-center justify-between p-1.5 border-b border-gray-200"><div class="flex items-center gap-2"><div class="w-3 h-3 bg-gray-400 rounded-full"></div><div class="h-2 bg-gray-300 rounded flex-1 w-28"></div></div><div class="flex gap-1.5"><div class="w-3 h-3 bg-gray-200 rounded"></div><div class="w-3 h-3 bg-gray-200 rounded"></div></div></div><div class="flex items-center justify-between p-1.5 border-b border-gray-200"><div class="flex items-center gap-2"><div class="w-3 h-3 bg-gray-400 rounded-full"></div><div class="h-2 bg-gray-300 rounded flex-1 w-28"></div></div><div class="flex gap-1.5"><div class="w-3 h-3 bg-gray-200 rounded"></div><div class="w-3 h-3 bg-gray-200 rounded"></div></div></div><div class="flex items-center justify-between p-1.5 border-b border-gray-200"><div class="flex items-center gap-2"><div class="w-3 h-3 bg-gray-400 rounded-full"></div><div class="h-2 bg-gray-300 rounded flex-1 w-28"></div></div><div class="flex gap-1.5"><div class="w-3 h-3 bg-gray-200 rounded"></div><div class="w-3 h-3 bg-gray-200 rounded"></div></div></div></div>',2)),e.createElementVNode("div",HN,[e.createElementVNode("div",qN,e.toDisplayString(t.$t(r.text)),1),r.count&&r.count>0?(e.openBlock(),e.createElementBlock("div",KN,e.toDisplayString(r.count),1)):e.createCommentVNode("",!0)])]))}},GN={class:"h-full flex flex-col"},WN={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},YN={class:"text-xs font-medium text-gray-600"},XN={key:0,class:"text-xs text-gray-500"},sn={faq:YV,banner:Fi,slider:MN,video:_N,about:vN,cards:$i,usefulLinks:Oi,team:pN,news:Ii,form:nN,tabs:jN,vertical_tabs:Ii,documents:Pi,infoLine:IN,body:{__name:"body-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",GN,[l[0]||(l[0]=e.createStaticVNode('<div class="grid grid-cols-3 gap-2 flex-1"><div class="flex flex-col"><div class="h-3 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5"><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div></div></div><div class="flex flex-col"><div class="h-3 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5"><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div></div></div><div class="flex flex-col"><div class="h-3 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5"><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div></div></div></div>',1)),e.createElementVNode("div",WN,[e.createElementVNode("div",YN,e.toDisplayString(t.$t(r.text)),1),r.count&&r.count>0?(e.openBlock(),e.createElementBlock("div",XN,e.toDisplayString(r.count),1)):e.createCommentVNode("",!0)])]))}},photoGrid:$i,interested:Oi,contact:Pi,iframe:Fi},ZN={class:"grid grid-cols-1 md:grid-cols-1 lg:grid-cols-2 2xl:grid-cols-3 gap-4"},QN=["onClick"],JN={class:"wireframe-block h-[240px] !p-4 border-2 border-dashed bg-white relative overflow-hidden transition-all rounded-lg shadow-sm border-gray-300 hover:border-gray-400 cursor-pointer"},ev=["src"],tv={__name:"vs-form-reference-choce",props:{modelValue:{type:String,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(r){const t=e.useModel(r,"modelValue");return(l,n)=>(e.openBlock(),e.createElementBlock("div",ZN,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(on),a=>(e.openBlock(),e.createElementBlock("div",{key:a.id,onClick:o=>t.value=a.id,class:"relative"},[e.createElementVNode("div",JN,[e.unref(sn)[a.id]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(sn)[a.id]),{key:0,text:a==null?void 0:a.text,count:(a==null?void 0:a.data)||0},null,8,["text","count"])):(e.openBlock(),e.createElementBlock("img",{key:1,src:e.unref(Ti),alt:"Team collaboration",class:"w-full h-full object-cover"},null,8,ev))])],8,QN))),128))]))}},rv={};function lv(r,t,l,n,a,o){const s=e.resolveComponent("vs-richtext");return e.openBlock(),e.createBlock(s,{class:"w-full"})}const Ta=Wt(rv,[["render",lv]]),nv={class:"flex gap-4"},av={class:"text-sm text-gray-500 dark:text-gray-400 border flex items-center h-10 px-4 rounded-lg w-full"},ov={class:"flex items-center justify-between w-full p-4 border-t border-gray-200 dark:border-gray-700"},sv={__name:"vs-form-reference-add",props:e.mergeModels({title:{type:String,required:!0}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:["update:modelValue"],setup(r){const{t}=Be();De["vs-input-reference"]=La,De["vs-input-tiptap-editor"]=Ta;const l=e.useModel(r,"modelValue"),n=e.ref(!1),a=e.ref({}),o=e.ref(null),s=e.ref({}),i=e.computed(()=>{var u;return((u=Li[o.value])==null?void 0:u.schema)||null}),c=async()=>{if(await a.value.validate()){se({type:"warning",title:t("cms.common.actions.warning"),message:t("cms.builder.editFieldFailed")});return}try{Object.keys(s.value).length!==0&&(l.value=[...l.value||[],{...s.value,id:Math.random().toString(36).substring(2,15),reference_type:o.value}]),n.value=!1,o.value=null,s.value={}}catch(d){console.log(d)}};return e.watch(n,()=>{n.value||(o.value=null,s.value={})}),(u,d)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("button",{type:"button",class:"inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm text-sm font-medium text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-sky-500",onClick:d[0]||(d[0]=m=>n.value=!n.value)},e.toDisplayString(u.$t("cms.builder.create")),1),e.createVNode(e.unref(xs),{visible:n.value,"onUpdate:visible":d[6]||(d[6]=m=>n.value=m),position:"right",closeClickBackdrop:!1,onClose:d[7]||(d[7]=m=>n.value=!1),title:o.value?u.$t("cms.builder."+o.value):u.$t("cms.builder.selectType"),size:"50vw"},{footer:e.withCtx(()=>[e.createElementVNode("div",ov,[e.createElementVNode("button",{onClick:d[5]||(d[5]=m=>n.value=!1),class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100"},e.toDisplayString(u.$t("cms.builder.cancel")),1),e.createElementVNode("button",{onClick:c,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},e.toDisplayString(u.$t("cms.builder.create")),1)])]),default:e.withCtx(()=>{var m;return[o.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",nv,[e.createElementVNode("div",av,[e.createElementVNode("span",null,e.toDisplayString((m=e.unref(on).find(f=>f.id===o.value))==null?void 0:m.text),1)]),e.createElementVNode("button",{class:"py-2.5 px-3 mb-4 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300",onClick:d[2]||(d[2]=f=>o.value=null)},e.toDisplayString(u.$t("cms.builder.changeType")),1)]),i.value?(e.openBlock(),e.createBlock(e.unref(He),{key:o.value,schema:i.value,modelValue:s.value,"onUpdate:modelValue":d[3]||(d[3]=f=>s.value=f),form:a.value,"onUpdate:form":d[4]||(d[4]=f=>a.value=f)},null,8,["schema","modelValue","form"])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(tv,{key:0,modelValue:o.value,"onUpdate:modelValue":d[1]||(d[1]=f=>o.value=f),options:e.unref(on)},null,8,["modelValue","options"]))]}),_:1},8,["visible","title"])]))}},iv={class:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity flex space-x-1 z-10"},cv={class:"flex items-center justify-between w-full p-4 border-t border-gray-200 dark:border-gray-700"},dv={__name:"vs-form-reference-controls",props:e.mergeModels({title:{type:String,required:!0}},{modelValue:{type:Object,default:()=>({})},modelModifiers:{},parent:{type:Array,default:()=>[]},parentModifiers:{}}),emits:["update:modelValue","update:parent"],setup(r){const{t}=Be(),l=e.useModel(r,"modelValue"),n=e.useModel(r,"parent"),a=e.ref(!1),o=e.ref({}),s=e.ref({}),i=e.computed(()=>{var u;return((u=Li[l.value.reference_type])==null?void 0:u.schema)||null});e.watch(a,u=>{u&&(o.value={...l.value})});const c=async()=>{try{if(await s.value.validate()){se({type:"warning",title:t("cms.common.actions.warning"),message:t("cms.builder.editFieldFailed")});return}l.value={...o.value},a.value=!1}catch(u){console.log(u)}};return(u,d)=>(e.openBlock(),e.createElementBlock("div",iv,[e.createElementVNode("button",{onClick:d[0]||(d[0]=m=>a.value=!a.value),class:"p-1.5 bg-white dark:bg-gray-800 rounded shadow-sm hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors border border-gray-200 dark:border-gray-700"},[e.createVNode(e.unref(Nr),{class:"h-4 w-4 text-gray-400"})]),e.createElementVNode("button",{onClick:d[1]||(d[1]=m=>n.value=n.value.filter(f=>f.id!==l.value.id)),class:"p-1.5 bg-white dark:bg-gray-800 rounded shadow-sm hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors border border-gray-200 dark:border-gray-700"},[e.createVNode(e.unref(Ht),{class:"h-4 w-4 text-red-500"})]),e.createVNode(e.unref(xs),{visible:a.value,"onUpdate:visible":d[5]||(d[5]=m=>a.value=m),onClose:d[6]||(d[6]=m=>a.value=!1),title:r.title,width:"50vw"},{footer:e.withCtx(()=>[e.createElementVNode("div",cv,[e.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100",onClick:d[4]||(d[4]=m=>a.value=!1)},e.toDisplayString(u.$t("cms.common.actions.cancel")),1),e.createElementVNode("button",{onClick:c,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},e.toDisplayString(u.$t("cms.common.actions.save")),1)])]),default:e.withCtx(()=>[i.value?(e.openBlock(),e.createBlock(e.unref(He),{key:0,form:s.value,"onUpdate:form":d[2]||(d[2]=m=>s.value=m),schema:i.value,modelValue:o.value,"onUpdate:modelValue":d[3]||(d[3]=m=>o.value=m),class:"-mr-[10px] ml-[10px] mt-[10px]"},null,8,["form","schema","modelValue"])):e.createCommentVNode("",!0)]),_:1},8,["visible","title"])]))}},uv={class:"w-full"},mv={key:0,class:"relative"},pv={class:"group wireframe-block h-[280px] !p-4 border-2 border-dashed bg-white relative overflow-hidden transition-all rounded-lg shadow-sm border-gray-00 hover:border-gray-400 cursor-grab"},fv=["src"],La={__name:"vs-form-reference-list",props:e.mergeModels({reference_type:{type:String,required:!0},title:{type:String,required:!0}},{modelValue:{default:()=>[]},modelModifiers:{}}),emits:["update:modelValue"],setup(r){const t=a=>{var o;return(o=on.find(s=>s.id===a))==null?void 0:o.text},l=e.useModel(r,"modelValue"),n=e.computed({get(){const a=l.value;return a==null?[]:Array.isArray(a)?a:[]},set(a){l.value=Array.isArray(a)?a:[]}});return e.watch(l,a=>{a!=null&&!Array.isArray(a)&&(l.value=[])},{immediate:!0}),(a,o)=>{var s;return e.openBlock(),e.createElementBlock("div",uv,[((s=n.value)==null?void 0:s.length)>0?(e.openBlock(),e.createBlock(e.unref(Da),{key:0,modelValue:n.value,"onUpdate:modelValue":o[1]||(o[1]=i=>n.value=i),"item-key":"id",handle:".drag-handle",class:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-4"},{item:e.withCtx(({element:i,index:c})=>[i!=null&&i.reference_type?(e.openBlock(),e.createElementBlock("div",mv,[e.createElementVNode("div",pv,[(e.openBlock(),e.createElementBlock("div",{key:i.id,class:"absolute top-2 left-2 opacity-0 group-hover:opacity-100 border border-gray-200 dark:border-gray-700 transition-opacity cursor-move z-10 bg-white dark:bg-gray-800 rounded p-1 shadow-sm drag-handle"},[e.createVNode(e.unref(Qa),{class:"h-4 w-4 text-gray-400"})])),e.createVNode(dv,{title:a.$t("cms.builder."+(i==null?void 0:i.reference_type)),modelValue:n.value[c],"onUpdate:modelValue":u=>n.value[c]=u,parent:n.value,"onUpdate:parent":o[0]||(o[0]=u=>n.value=u)},null,8,["title","modelValue","onUpdate:modelValue","parent"]),e.unref(sn)[i==null?void 0:i.reference_type]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(sn)[i==null?void 0:i.reference_type]),{key:0,index:c,text:t(i==null?void 0:i.reference_type),count:Array.isArray(i==null?void 0:i.data)?i.data.length:0},null,8,["index","text","count"])):(e.openBlock(),e.createElementBlock("img",{key:1,src:e.unref(Ti),alt:"Team collaboration",class:"w-full h-full object-cover"},null,8,fv))])])):e.createCommentVNode("",!0)]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),e.createVNode(sv,{class:"mt-4",title:r.title,modelValue:n.value,"onUpdate:modelValue":o[2]||(o[2]=i=>n.value=i)},null,8,["title","modelValue"])])}}};function Ri(r){if(r===0)return"0 Bytes";const t=1024,l=["Bytes","KB","MB","GB","TB"],n=Math.floor(Math.log(r)/Math.log(t));return Number.parseFloat((r/Math.pow(t,n)).toFixed(2))+" "+l[n]}function hv(r){const t=new Date(r);return isNaN(t.getTime())?"":t.toISOString().slice(0,10)}const gv={__name:"TypeTag",props:{type:{type:String,required:!0}},setup(r){const t=new Map([["document","bg-blue-100 text-blue-800 border-blue-200 dark:bg-blue-900/30 dark:text-blue-300 dark:border-blue-700"],["image","bg-green-100 text-green-800 border-green-200 dark:bg-green-900/30 dark:text-green-300 dark:border-green-700"],["video","bg-purple-100 text-purple-800 border-purple-200 dark:bg-purple-900/30 dark:text-purple-300 dark:border-purple-700"]]);return(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors shadow-lg backdrop-blur-sm",e.unref(t).get(r.type)])},e.toDisplayString(r.type),3))}},yv={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 max-h-[calc(100%-130px)] overflow-y-auto px-2 pt-2 pb-5"},bv={key:0,class:"flex flex-col items-center justify-center h-64 text-muted-foreground col-span-full"},kv=["onClick"],xv=["onClick"],wv={class:"truncate font-medium text-slate-800 dark:text-slate-100 mb-2"},_v={class:"text-sm text-slate-500 dark:text-slate-400"},Ev=["onClick"],Cv={class:"p-0"},Vv={class:"aspect-video bg-slate-100 dark:bg-slate-700 rounded-t-lg overflow-hidden relative"},Nv={class:"w-full h-full flex items-center justify-center bg-gradient-to-br from-slate-100 to-slate-200 dark:from-slate-700 dark:to-slate-800"},vv={key:0,class:"relative w-full"},Bv=["src","alt"],Sv={class:"p-4"},Av={class:"flex items-center justify-between mb-2"},Dv={class:"font-medium text-slate-800 dark:text-slate-100 truncate flex-1 mr-2"},Mv={class:"space-y-1 text-sm text-slate-500 dark:text-slate-400"},Tv={class:"flex justify-between"},Lv={class:"flex justify-between"},$v={__name:"MediaGrid",props:{files:{type:Array,required:!0},selectedFile:{type:Object,default:null},selectedFiles:{type:Array,default:()=>[]},isDeleteButton:{type:Boolean,default:!1}},emits:["delete-file","file-click","delete-folder"],setup(r,{emit:t}){Be();const l=r,n=e.ref([]),a=e.ref(null),o=i=>{if(!i)return"";const c=new Date(i);return isNaN(c.getTime())?"":c.toISOString().slice(0,10)},s=()=>{n.value=l.files.sort((i,c)=>i.type==="dir"&&c.type!=="dir"?-1:i.type!=="dir"&&c.type==="dir"?1:0)};return e.onMounted(()=>s()),e.onUpdated(()=>s()),(i,c)=>{var u;return e.openBlock(),e.createElementBlock("div",yv,[((u=r.files)==null?void 0:u.length)===0?(e.openBlock(),e.createElementBlock("div",bv,[e.createVNode(e.unref(Cr),{class:"w-12 h-12 mb-2"}),e.createElementVNode("p",null,e.toDisplayString(i.$t("cms.noFilesInFolder")),1)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,d=>{var m;return e.openBlock(),e.createElementBlock(e.Fragment,{key:d==null?void 0:d.url},[(d==null?void 0:d.type)==="dir"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"p-6 text-center rounded-xl h-[fit-content] relative text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm hover:shadow-xl transition-all duration-200 transform hover:scale-105 cursor-pointer",onClick:f=>i.$emit("file-click",d)},[r.isDeleteButton?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(f=>{a.value=d},["stop"]),class:"absolute top-4 right-4 p-1 border border-gray-300 dark:border-slate-700 rounded-lg cursor-pointer hover:bg-gray-200 dark:hover:bg-slate-700 group"},[e.createVNode(e.unref(Ht),{class:"w-4 h-4 text-gray-500 group-hover:text-red-500"})],8,xv)):e.createCommentVNode("",!0),e.createVNode(e.unref(Za),{class:"w-16 h-16 mx-auto mb-4 text-blue-600"}),e.createElementVNode("h3",wv,e.toDisplayString(d==null?void 0:d.name),1),e.createElementVNode("p",_v,e.toDisplayString(d==null?void 0:d.count)+" "+e.toDisplayString(i.$t("cms.media.files")),1)],8,kv)):(d==null?void 0:d.type)==="file"?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["h-[fit-content] rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm hover:shadow-xl transition-all duration-200 transform hover:scale-105 group cursor-pointer",{"bg-accent text-accent-foreground ring-2 ring-primary":((m=r.selectedFile)==null?void 0:m.url)===(d==null?void 0:d.url)||r.selectedFiles&&r.selectedFiles.some(f=>f.id===d.id)}]),onClick:f=>i.$emit("file-click",d)},[e.createElementVNode("div",Cv,[e.createElementVNode("div",Vv,[e.createElementVNode("div",Nv,[(d==null?void 0:d.filetype)==="image"&&(d!=null&&d.filepath||d!=null&&d.url)?(e.openBlock(),e.createElementBlock("div",vv,[e.createElementVNode("img",{src:d==null?void 0:d.preview,alt:(d==null?void 0:d.alt)||(d==null?void 0:d.filename),class:"object-cover w-full h-full rounded text-xs"},null,8,Bv)])):(e.openBlock(),e.createBlock(e.unref(Hr),{key:1,class:"w-12 h-12 text-gray-500"}))])]),e.createElementVNode("div",Sv,[e.createElementVNode("div",Av,[e.createElementVNode("h3",Dv,e.toDisplayString(d.filename),1),e.createVNode(gv,{type:d==null?void 0:d.filetype},null,8,["type"])]),e.createElementVNode("div",Mv,[e.createElementVNode("div",Tv,[e.createElementVNode("span",null,e.toDisplayString(i.$t("cms.media.size"))+":",1),e.createElementVNode("span",null,e.toDisplayString(e.unref(Ri)(d.filesize)),1)]),e.createElementVNode("div",Lv,[e.createElementVNode("span",null,e.toDisplayString(i.$t("cms.media.uploaded"))+":",1),e.createElementVNode("span",null,e.toDisplayString(o(d.created_at)),1)])])])])],10,Ev)):e.createCommentVNode("",!0)],64)}),128))])}}},Fv={},Iv={"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 16 16",width:"16",height:"16",fill:"currentColor"};function Ov(r,t){return e.openBlock(),e.createElementBlock("svg",Iv,[...t[0]||(t[0]=[e.createElementVNode("path",{d:"M.513 1.513A1.75 1.75 0 0 1 1.75 1h3.5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 0 0 .2.1H 13a1 1 0 0 1 1 1v.5H2.75a.75.75 0 0 0 0 1.5h11.978a1 1 0 0 1 .994 1.117L15 13.25A1.75 1.75 0 0 1 13.25 15H1.75A1.75 1.75 0 0 1 0 13.25V2.75c0-.464.184-.91.513-1.237Z"},null,-1),e.createElementVNode("path",{d:"M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"},null,-1)])])}const Pv=Wt(Fv,[["render",Ov]]),Rv={},Uv={"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 16 16",width:"16",height:"16",fill:"currentColor"};function jv(r,t){return e.openBlock(),e.createElementBlock("svg",Uv,[...t[0]||(t[0]=[e.createElementVNode("path",{d:"M.513 1.513A1.75 1.75 0 0 1 1.75 1h3.5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 0 0 .2.1H 13a1 1 0 0 1 1 1v.5H2.75a.75.75 0 0 0 0 1.5h11.978a1 1 0 0 1 .994 1.117L15 13.25A1.75 1.75 0 0 1 13.25 15H1.75A1.75 1.75 0 0 1 0 13.25V2.75c0-.464.184-.91.513-1.237Z"},null,-1),e.createElementVNode("path",{d:"M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"},null,-1)])])}const zv=Wt(Rv,[["render",jv]]),Hv={key:0,class:"flex flex-col items-center justify-center h-64 text-muted-foreground"},qv={key:1,class:"w-full text-sm caption-bottom"},Kv={class:"[&_tr]:border-b"},Gv={class:"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"},Wv={class:"h-12 px-4 text-left align-middle font-medium text-muted-foreground w-[300px]"},Yv={class:"h-12 px-4 font-medium text-left align-middle text-muted-foreground"},Xv={class:"h-12 px-4 font-medium text-left align-middle text-muted-foreground"},Zv={class:"hidden h-12 px-4 font-medium text-left align-middle text-muted-foreground md:table-cell"},Qv={class:"[&_tr:last-child]:border-0"},Jv=["onClick"],eB={class:"p-4 font-medium align-middle"},tB={class:"flex items-center gap-2"},rB={key:1,class:"relative w-8 h-8"},lB=["src","alt"],nB={class:"truncate max-w-[200px]"},aB={class:"p-4 align-middle"},oB={class:"p-4 align-middle"},sB={class:"hidden p-4 align-middle md:table-cell"},iB={key:0},cB={__name:"MediaList",props:{files:{type:Array,required:!0},selectedFile:{type:Object,default:null},selectedFiles:{type:Array,default:()=>[]}},emits:["file-click","delete-folder"],setup(r,{emit:t}){const{t:l}=Be(),n=e.ref(null),a=t,o=()=>{Jr({title:l("cms.builder.deleteTitle"),message:l("cms.builder.deleteObject"),type:"error",onConfirm:()=>{s()}})},s=()=>{a("delete-folder",n.value)};return(i,c)=>{const u=e.resolveComponent("File");return e.openBlock(),e.createElementBlock("div",null,[r.files.length===0?(e.openBlock(),e.createElementBlock("div",Hv,[e.createVNode(u,{class:"w-12 h-12 mb-2"}),e.createElementVNode("p",null,e.toDisplayString(i.$t("cms.media.noFilesInFolder")),1)])):(e.openBlock(),e.createElementBlock("table",qv,[e.createElementVNode("thead",Kv,[e.createElementVNode("tr",Gv,[e.createElementVNode("th",Wv,e.toDisplayString(i.$t("cms.media.name")),1),e.createElementVNode("th",Yv,e.toDisplayString(i.$t("cms.media.type")),1),e.createElementVNode("th",Xv,e.toDisplayString(i.$t("cms.media.size")),1),e.createElementVNode("th",Zv,e.toDisplayString(i.$t("cms.media.updatedAt")),1),c[0]||(c[0]=e.createElementVNode("th",null,null,-1))])]),e.createElementVNode("tbody",Qv,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.files,d=>{var m,f,p,h,g;return e.openBlock(),e.createElementBlock("tr",{key:d.id,class:e.normalizeClass(["border-b transition-colors hover:bg-blue-200/50 data-[state=selected]:bg-muted cursor-pointer",{"bg-blue-200":((m=n.value)==null?void 0:m.id)===d.id&&((f=n.value)==null?void 0:f.type)===d.type||r.selectedFiles&&r.selectedFiles.some(y=>y.id===d.id&&y.type===d.type)}]),onClick:y=>i.$emit("cms.file-click",d)},[e.createElementVNode("td",eB,[e.createElementVNode("div",tB,[d.type==="dir"?(e.openBlock(),e.createBlock(Pv,{key:0,class:"w-5 h-5 text-blue-500"})):(d==null?void 0:d.filetype)==="image"&&(d!=null&&d.filepath)?(e.openBlock(),e.createElementBlock("div",rB,[e.createElementVNode("img",{src:d==null?void 0:d.preview,alt:(d==null?void 0:d.alt)||(d==null?void 0:d.filename),class:"object-cover w-full h-full rounded"},null,8,lB)])):(d==null?void 0:d.filetype)==="image"?(e.openBlock(),e.createBlock(zv,{key:2,class:"w-5 h-5 text-green-500"})):(e.openBlock(),e.createBlock(u,{key:3,class:"w-5 h-5 text-gray-500"})),e.createElementVNode("span",nB,e.toDisplayString((d==null?void 0:d.filename)||(d==null?void 0:d.name)),1)])]),e.createElementVNode("td",aB,e.toDisplayString((d==null?void 0:d.type)==="dir"?i.$t("cms.media.folder"):((h=(p=d==null?void 0:d.filetype)==null?void 0:p.charAt(0))==null?void 0:h.toUpperCase())+((g=d==null?void 0:d.filetype)==null?void 0:g.slice(1))),1),e.createElementVNode("td",oB,e.toDisplayString((d==null?void 0:d.type)==="dir"?"--":e.unref(Ri)(d==null?void 0:d.filesize)),1),e.createElementVNode("td",sB,e.toDisplayString(d!=null&&d.updated_at?e.unref(hv)(d==null?void 0:d.updated_at):"--"),1),d.type==="dir"?(e.openBlock(),e.createElementBlock("td",iB,[e.createVNode(e.unref(Ht),{class:"w-4 h-4 text-red-500 cursor-pointer",onClick:e.withModifiers(o,["stop"])},null,8,["onClick"])])):e.createCommentVNode("",!0)],10,Jv)}),128))])]))])}}},dB={},uB={xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function mB(r,t){return e.openBlock(),e.createElementBlock("svg",uB,[...t[0]||(t[0]=[e.createElementVNode("path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"},null,-1),e.createElementVNode("polyline",{points:"9 22 9 12 15 12 15 22"},null,-1)])])}const pB=Wt(dB,[["render",mB]]),fB={class:"flex items-center space-x-1"},hB=["onClick"],gB={__name:"MediaBreadcrumb",props:{currentPath:{type:Array,required:!0}},emits:["navigate"],setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",fB,[e.createElementVNode("button",{class:"flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium transition-all duration-200 text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20",onClick:l[0]||(l[0]=n=>t.$emit("navigate",[]))},[e.createVNode(pB,{class:"w-3 h-3"}),e.createTextVNode(" "+e.toDisplayString(t.$t("cms.media.mediaLibrary")),1)]),r.currentPath.length>0?(e.openBlock(),e.createBlock(e.unref(Er),{key:0,class:"w-3 h-3 text-slate-400 dark:text-slate-500"})):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.currentPath,(n,a)=>(e.openBlock(),e.createElementBlock("button",{key:a,class:"flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium transition-all duration-200 text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900/20",onClick:o=>t.$emit("navigate",r.currentPath.slice(0,a+1))},[e.createVNode(e.unref(Za),{class:"w-3 h-3"}),e.createTextVNode(" "+e.toDisplayString(n)+" ",1),a<r.currentPath.length-1?(e.openBlock(),e.createBlock(e.unref(Er),{key:0,class:"w-3 h-3 text-slate-400 dark:text-slate-500"})):e.createCommentVNode("",!0)],8,hB))),128))]))}},yB=["src"],bB={class:"absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity rounded-lg gap-2"},kB=["onClick"],xB=["onClick"],wB=["title"],_B={key:1,class:"relative group"},EB=["src"],CB={class:"absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity rounded-lg gap-2"},VB=["title"],NB={key:2,class:"absolute inset-0 bg-white bg-opacity-75 flex items-center justify-center rounded-lg z-10"},vB={class:"flex flex-col items-center gap-2"},BB={class:"text-xs text-gray-600"},SB=["multiple","disabled"],AB={class:"whitespace-nowrap text-sm"},DB={class:"whitespace-nowrap text-sm"},MB={class:"flex items-center justify-between p-4 border-b"},TB={class:"text-lg font-semibold"},LB={class:"flex items-center justify-between gap-4 p-4 border-b"},$B={class:"relative z-[1] rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm mb-6 p-4 mx-4"},FB={class:"flex items-center justify-between gap-4"},IB={class:"flex items-center gap-4 flex-1"},OB={class:"relative flex-1 max-w-md"},PB=["placeholder"],RB={class:"flex items-center gap-2 relative"},UB={class:"text-xs font-bold"},jB={class:"text-xs font-bold"},zB={key:0,class:"w-full absolute top-full left-1/2 transform -translate-x-1/2 mt-2 z-50 bg-white dark:bg-slate-700 flex flex-col items-start border border-slate-200 dark:border-slate-600 rounded-md shadow-lg"},HB={class:"flex items-center gap-2"},qB={class:"flex flex-col gap-4 overflow-y-auto p-4 flex-1"},KB={class:"p-4 border-t flex items-center justify-between"},GB={key:0,class:"text-sm text-gray-600 dark:text-gray-400"},WB={key:1},YB=["disabled"],Pr={__name:"vs-form-media-select",props:e.mergeModels({multiple:{type:Boolean,default:!1},multi:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(r,{emit:t}){const{t:l}=Be(),n=qe.useRoute(),a=qe.useRouter(),o=e.useModel(r,"modelValue"),s=t,i=r,c=e.computed(()=>i.multiple||i.multi),u=e.ref(null),d=e.computed(()=>o.value||u.value),m=e.computed(()=>{if(!c.value)return[];const U=d.value;return U?Array.isArray(U)?U:[U]:[]}),f=e.computed(()=>d.value?typeof d.value=="object"?d.value.filename||d.value.file_name||d.value.native_file_name||"File":typeof d.value=="string"?d.value.split("cms./").pop()||d.value:"File":""),p=e.ref(!1),h=e.ref(!1),g=e.ref("grid"),y=e.ref([]),b=e.ref([]),w=e.ref([]),x=e.ref(),k=e.ref([]),_=e.ref(null),N=e.ref(!1),V=e.ref(null),P=e.ref(null),$=e.ref({}),M=e.ref(""),D=e.ref(!1),q=e.ref("name"),Q=new Map([["name",l("cms.media.sortBy.name")],["filesize",l("cms.media.sortBy.filesize")]]),R=U=>typeof U=="string"?U:(U==null?void 0:U.filepath)||(U==null?void 0:U.file_path)||U,I=U=>U?typeof U=="string"?U.split("cms./").pop()||U:U.filename||U.file_name||U.native_file_name||"File":"",F=U=>typeof U=="string"?U:(U==null?void 0:U.preview)||`/file/resize?filepath=${R(U)}&h=137&quality=75`,A=()=>{_.value&&_.value.click()},z=()=>{p.value=!p.value,p.value&&ee()},ee=()=>{if(V.value){const U=V.value.getBoundingClientRect();$.value={top:`${U.bottom+10}px`,left:`${U.left+U.width/2}px`,transform:"translateX(-50%)",width:"200px"}}},pe=U=>{var Y;if(U.type==="dir")Ze([...y.value,U.name]);else if(c.value){const re=k.value.findIndex(le=>le.id===U.id);re>=0?k.value.splice(re,1):k.value.push(U)}else x.value=U.id===((Y=x.value)==null?void 0:Y.id)?null:U},Ne=U=>{q.value=U,D.value=!1,b.value=b.value.sort((Y,re)=>{var le;if((Y==null?void 0:Y.type)==="dir")return-1;if(U==="name")return(le=Y==null?void 0:Y.name)==null?void 0:le.localeCompare(re==null?void 0:re.name);if(U==="filesize")return(re==null?void 0:re.filesize)-(Y==null?void 0:Y.filesize)})},Xe=async()=>{try{const U=y.value.join("/"),re=await(await fetch(`/api/cms-media?subdir=${U}${M.value?"&search="+M.value:""}`,{method:"GET"})).json();re.data?(b.value=re.data.map(le=>({...le,id:le.type==="dir"?`dir-${le.name}`:le.id,preview:`/file/resize?filepath=${le.filepath}&h=137&quality=75`})),Ne(q.value)):b.value=[]}catch(U){console.error("Search error:",U),b.value=[]}},Jt=()=>{if(c.value){if(k.value.length>0){const U=Array.isArray(o.value)?[...o.value]:o.value?[o.value]:[],Y=Array.isArray(u.value)?[...u.value]:u.value?[u.value]:[];k.value.forEach(re=>{const le=re.filepath||re.file_path;U.some(ue=>(typeof ue=="string"?ue:(ue==null?void 0:ue.filepath)||(ue==null?void 0:ue.file_path))===le)||(U.push(le),Y.push(re))}),o&&(o.value=U),u.value=Y,s("cms.change",U),k.value=[]}}else if(x.value){const U=x.value.filepath||x.value.file_path;o&&(o.value=U),u.value=x.value,s("cms.change",U),x.value=null}Re()},Re=()=>{h.value=!1},Ze=U=>{y.value=U,w.value=[...w.value,U],x.value=null,c.value&&(k.value=[]),xt()},At=()=>{w.value.length>1&&(w.value.pop(),y.value=w.value[w.value.length-1],x.value=null,c.value&&(k.value=[]),xt())},xt=async()=>{try{const U=y.value.join("/"),re=await(await fetch(`/api/cms-media?subdir=${U}${M.value?"&search="+M.value:""}`,{method:"GET"})).json();re.data?(b.value=re.data.map(le=>({...le,id:le.type==="dir"?`dir-${le.name}`:le.id,preview:`/file/resize?filepath=${le.filepath}&h=137&quality=75`})),Ne(q.value)):b.value=[]}catch(U){console.error("Fetch error:",U),b.value=[]}},Nt=async(U,Y)=>{try{const re=typeof U=="string"?U:R(U);if(await fetch(`/file/delete${re}`),c.value){const le=Array.isArray(o.value)?[...o.value]:[],ue=Array.isArray(u.value)?[...u.value]:[];if(Y!==void 0&&Y>=0)le.splice(Y,1),ue.splice(Y,1);else{const Te=le.findIndex(C=>(typeof C=="string"?C:(C==null?void 0:C.filepath)||(C==null?void 0:C.file_path))===re);Te>=0&&(le.splice(Te,1),ue.splice(Te,1))}o&&(o.value=le.length>0?le:null),u.value=ue.length>0?ue:null,s("cms.change",le.length>0?le:null)}else o&&(o.value=null),u.value=null,s("cms.change",null);return!0}catch(re){return console.error(re),!1}},jt=async U=>{try{const Y=await fetch(`/file/download/files/uploads${U}`),re=await Y.arrayBuffer(),le=Y.headers["content-type"],ue=new TextDecoder("utf-8").decode(re),Te=new Blob([ue],{type:le}),C=document.createElement("cms.a");C.setAttribute("download",U),C.href=window.URL.createObjectURL(Te),C.click()}catch(Y){console.error(Y.message)}},ot=async U=>{if(!U.target.files||U.target.files.length===0)return;const Y=Array.from(U.target.files);console.log("Uploading files:",Y),N.value=!0;try{const re=[];for(const le of Y){const ue=new FormData;ue.append("file",le);const Te=await fetch("/file/upload/uploads?id=1&form=form&table=table",{method:"POST",body:ue});if(!Te.ok)throw new Error(`Upload failed: ${Te.status}`);const C=await Te.json();console.log("Upload result:",C);const v=C.result,H={file_id:v.file_id,file_name:v.file_name,file_path:v.file_path,filepath:v.file_path,format:v.format,size:v.size,entity_id:v.entity_id,dir:v.dir,native_file_name:v.native_file_name,preview:`/file/resize?filepath=${v.file_path}&h=137&quality=75`};re.push(H)}if(c.value){const le=Array.isArray(o.value)?[...o.value]:o.value?[o.value]:[],ue=Array.isArray(u.value)?[...u.value]:u.value?[u.value]:[];re.forEach(Te=>{le.push(Te.file_path),ue.push(Te)}),o&&(o.value=le),u.value=ue,s("cms.change",le)}else{const le=re[0];o&&(o.value=le.file_path),u.value=le,s("cms.change",le.file_path)}p.value=!1}catch(re){console.error("Upload error:",re),alert("cms.Помилка завантаження файлу: "+re.message)}finally{N.value=!1}U.target.value=""};e.watch(h,U=>{U&&xt()}),e.watch(y,U=>{U.length>0?a.push({query:{path:U.join("/")}}):a.push({query:{path:void 0}})});let ct;return e.watch(M,U=>{clearTimeout(ct),ct=setTimeout(()=>{Xe()},500)}),e.watch(o,U=>{var Y,re,le,ue;if(U&&typeof U=="object"){const Te=((Y=x.value)==null?void 0:Y.filepath)||((re=x.value)==null?void 0:re.file_path);U.filepath!==Te&&U.file_path!==Te&&(x.value=null)}else if(U&&typeof U=="string"){const Te=((le=x.value)==null?void 0:le.filepath)||((ue=x.value)==null?void 0:ue.file_path);U!==Te&&(x.value=null)}}),e.onMounted(()=>{var Y,re;y.value=((re=(Y=n.query)==null?void 0:Y.path)==null?void 0:re.split("cms./"))||[],w.value=[[]],o.value||(x.value=null);const U=le=>{var ue;p.value&&!((ue=V.value)!=null&&ue.contains(le.target))&&(p.value=!1),D.value&&P.value&&!P.value.contains(le.target)&&(D.value=!1)};document.addEventListener("click",U)}),(U,Y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e.mergeProps(U.$attrs,{class:"flex gap-4 flex-wrap"}),[c.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(m.value,(re,le)=>(e.openBlock(),e.createElementBlock("div",{key:le,class:"relative group"},[e.createElementVNode("img",{src:F(re),alt:"Selected File",class:"w-32 h-32 object-cover rounded-lg"},null,8,yB),e.createElementVNode("div",bB,[e.createElementVNode("button",{type:"button",onClick:ue=>Nt(re,le),class:"p-2 rounded-full bg-red-500 text-white hover:bg-red-600 transition-colors"},[e.createVNode(e.unref(Ht),{class:"w-4 h-4"})],8,kB),e.createElementVNode("button",{type:"button",onClick:ue=>jt(R(re)),class:"p-2 rounded-full bg-blue-500 text-white hover:bg-blue-600 transition-colors"},[e.createVNode(e.unref(gn),{class:"w-4 h-4"})],8,xB)]),e.createElementVNode("div",{class:"absolute bottom-full left-0 mb-2 px-3 py-1.5 bg-gray-900 text-white text-xs rounded-lg opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-10 max-w-[200px] truncate",title:I(re)},[e.createTextVNode(e.toDisplayString(I(re))+" ",1),Y[12]||(Y[12]=e.createElementVNode("div",{class:"absolute top-full left-4 border-4 border-transparent border-t-gray-900"},null,-1))],8,wB)]))),128)):d.value?(e.openBlock(),e.createElementBlock("div",_B,[e.createElementVNode("img",{src:d.value.preview||d.value,alt:"Selected File",class:"w-32 h-32 object-cover rounded-lg"},null,8,EB),e.createElementVNode("div",CB,[e.createElementVNode("button",{type:"button",onClick:Y[0]||(Y[0]=re=>{var le,ue;return Nt(((le=d.value)==null?void 0:le.filepath)||((ue=d.value)==null?void 0:ue.file_path)||d.value)}),class:"p-2 rounded-full bg-red-500 text-white hover:bg-red-600 transition-colors"},[e.createVNode(e.unref(Ht),{class:"w-4 h-4"})]),e.createElementVNode("button",{type:"button",onClick:Y[1]||(Y[1]=re=>{var le,ue;return jt(((le=d.value)==null?void 0:le.filepath)||((ue=d.value)==null?void 0:ue.file_path)||d.value)}),class:"p-2 rounded-full bg-blue-500 text-white hover:bg-blue-600 transition-colors"},[e.createVNode(e.unref(gn),{class:"w-4 h-4"})])]),e.createElementVNode("div",{class:"absolute bottom-full left-0 mb-2 px-3 py-1.5 bg-gray-900 text-white text-xs rounded-lg opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-10 max-w-[200px] truncate",title:f.value},[e.createTextVNode(e.toDisplayString(f.value)+" ",1),Y[13]||(Y[13]=e.createElementVNode("div",{class:"absolute top-full left-4 border-4 border-transparent border-t-gray-900"},null,-1))],8,VB)])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"triggerButton",ref:V,class:e.normalizeClass(["relative w-32 h-32 flex items-center justify-center border border-dotted border-gray-300 rounded-lg hover:border-blue-500 hover:bg-blue-500/10 hover:cursor-pointer transition-all",{"border-blue-500 bg-blue-500/10":p.value,"opacity-50 cursor-not-allowed":N.value}]),onClick:z},[N.value?(e.openBlock(),e.createBlock(e.unref(bn),{key:0,class:"w-4 h-4 animate-spin text-blue-500"})):(e.openBlock(),e.createBlock(e.unref(zt),{key:1,class:"w-4 h-4"})),N.value?(e.openBlock(),e.createElementBlock("div",NB,[e.createElementVNode("div",vB,[e.createVNode(e.unref(bn),{class:"w-6 h-6 animate-spin text-blue-500"}),e.createElementVNode("span",BB,e.toDisplayString(U.$t("cms.media.uploading")),1)])])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[p.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed bg-white z-50 border border-gray-200 rounded-lg shadow-lg flex flex-col items-center justify-center",style:e.normalizeStyle($.value)},[e.createElementVNode("div",{class:e.normalizeClass(["relative overflow-hidden flex justify-start items-center w-full gap-2 p-4 hover:bg-blue-50 text-blue-700 border hover:border-blue-200 dark:bg-slate-700 dark:text-slate-100 hover:cursor-pointer",{"opacity-50 cursor-not-allowed":N.value}]),onClick:Y[3]||(Y[3]=re=>!N.value&&A())},[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:_,class:"absolute justify-center bottom-0 left-0 w-full opacity-0",onChange:ot,onClick:Y[2]||(Y[2]=e.withModifiers(()=>{},["stop"])),multiple:c.value,disabled:N.value},null,40,SB),N.value?(e.openBlock(),e.createBlock(e.unref(bn),{key:0,class:"w-4 h-4 animate-spin"})):(e.openBlock(),e.createBlock(e.unref(gn),{key:1})),e.createElementVNode("span",AB,e.toDisplayString(N.value?U.$t("cms.media.uploading"):U.$t("cms.media.upload")),1)],2),e.createElementVNode("div",{onClick:Y[4]||(Y[4]=re=>h.value=!0),class:"flex justify-start items-center w-full gap-2 p-4 hover:bg-blue-50 text-blue-700 border hover:border-blue-200 dark:bg-slate-700 dark:text-slate-100 hover:cursor-pointer"},[e.createVNode(e.unref(Vl)),e.createElementVNode("span",DB,e.toDisplayString(U.$t("cms.media.selectFromMedia")),1)])],4)):e.createCommentVNode("",!0)]))],2)],16),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[h.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",onClick:Re},[e.createElementVNode("div",{class:"bg-white rounded-lg shadow-xl max-w-4xl w-full mx-4 max-h-[90vh] flex flex-col",onClick:Y[11]||(Y[11]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",MB,[e.createElementVNode("h3",TB,e.toDisplayString(U.$t("cms.media.selectFiles")),1),e.createElementVNode("button",{onClick:Re,class:"text-gray-400 hover:text-gray-600"},[...Y[14]||(Y[14]=[e.createElementVNode("svg",{class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])]),e.createElementVNode("div",LB,[e.createVNode(gB,{"current-path":y.value,onNavigate:Ze,onNavigateBack:At},null,8,["current-path"])]),e.createElementVNode("div",$B,[e.createElementVNode("div",FB,[e.createElementVNode("div",IB,[e.createElementVNode("div",OB,[e.createVNode(e.unref(wn),{class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-slate-400 dark:text-slate-500"}),e.withDirectives(e.createElementVNode("input",{type:"text",placeholder:U.$t("cms.media.search"),class:"w-full pl-10 pr-4 py-2 text-sm border border-slate-200 dark:border-slate-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-slate-700 text-slate-700 dark:text-slate-200 placeholder-slate-400 dark:placeholder-slate-500","onUpdate:modelValue":Y[5]||(Y[5]=re=>M.value=re)},null,8,PB),[[e.vModelText,M.value]])]),e.createElementVNode("div",RB,[e.createElementVNode("span",UB,e.toDisplayString(U.$t("cms.media.sortBy.title")+": "),1),e.createElementVNode("button",{ref_key:"sortByButton",ref:P,class:"relative z-[1000] inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border shadow-sm h-8 rounded-md px-3 text-xs bg-white border-slate-300 text-slate-700 disabled:pointer-events-none disabled:opacity-50 hover:text-accent-foreground hover:bg-slate-50 dark:bg-slate-700 dark:border-slate-600 dark:text-slate-300 dark:hover:bg-slate-600",onClick:Y[8]||(Y[8]=re=>D.value=!D.value)},[e.createVNode(e.unref(Xa),{class:"w-4 h-4"}),e.createElementVNode("span",jB,e.toDisplayString(e.unref(Q).get(q.value)),1),D.value?(e.openBlock(),e.createElementBlock("div",zB,[e.createElementVNode("span",{class:"text-left text-xs font-bold w-full p-2 hover:bg-slate-100 dark:hover:bg-slate-600 border-b border-slate-200 dark:border-slate-600 cursor-pointer",onClick:Y[6]||(Y[6]=e.withModifiers(re=>Ne("name"),["stop"]))},e.toDisplayString(U.$t("cms.media.sortBy.name")),1),e.createElementVNode("span",{class:"text-left text-xs font-bold w-full p-2 hover:bg-slate-100 dark:hover:bg-slate-600 cursor-pointer",onClick:Y[7]||(Y[7]=e.withModifiers(re=>Ne("filesize"),["stop"]))},e.toDisplayString(U.$t("cms.media.sortBy.filesize")),1)])):e.createCommentVNode("",!0)],512)])]),e.createElementVNode("div",HB,[e.createElementVNode("button",{class:e.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 h-8 px-3 text-xs rounded-md",{"shadow bg-blue-600 hover:bg-blue-700 text-white":g.value==="grid","border shadow-sm hover:text-accent-foreground bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-600":g.value==="list"}]),onClick:Y[9]||(Y[9]=re=>g.value="grid")},[e.createVNode(e.unref(Uc),{class:"w-4 h-4"})],2),e.createElementVNode("button",{class:e.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 h-8 px-3 text-xs rounded-md",{"shadow bg-blue-600 hover:bg-blue-700 text-white":g.value==="list","border shadow-sm hover:text-accent-foreground bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-600":g.value==="grid"}]),onClick:Y[10]||(Y[10]=re=>g.value="list")},[e.createVNode(e.unref(Nl),{class:"w-4 h-4"})],2)])])]),e.createElementVNode("div",qB,[g.value==="grid"?(e.openBlock(),e.createBlock($v,{key:0,files:b.value,"selected-file":c.value?null:x.value,"selected-files":c.value?k.value:[],onFileClick:pe},null,8,["files","selected-file","selected-files"])):(e.openBlock(),e.createBlock(cB,{key:1,files:b.value,"selected-file":c.value?null:x.value,"selected-files":c.value?k.value:[],onFileClick:pe},null,8,["files","selected-file","selected-files"]))]),e.createElementVNode("div",KB,[c.value&&k.value.length>0?(e.openBlock(),e.createElementBlock("div",GB,e.toDisplayString(U.$t("cms.media.selectedFiles",{count:k.value.length})),1)):(e.openBlock(),e.createElementBlock("div",WB)),e.createElementVNode("button",{onClick:Jt,disabled:c.value?k.value.length===0:!x.value,class:"flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium disabled:pointer-events-none disabled:opacity-50 h-9 px-4 py-2 ml-auto bg-blue-600 hover:bg-blue-700 text-white shadow-md hover:shadow-lg transition-all duration-200 transform hover:scale-105"},[e.createVNode(e.unref(zt),{class:"w-4 h-4 mr-2"}),e.createTextVNode(" "+e.toDisplayString(U.$t("cms.common.actions.add")),1)],8,YB)])])])):e.createCommentVNode("",!0)]))],64))}},XB={};function ZB(r,t){const l=e.resolveComponent("vs-richtext-md",!0);return e.openBlock(),e.createBlock(l,{class:"w-full h-[300px]"})}const Ui=Wt(XB,[["render",ZB]]),QB={props:{min:{type:Number},step:{type:Number,default:()=>1},max:{type:Number,default:()=>1/0},modelValue:{type:Number,default:()=>null},label:{type:String,default:()=>""},placeholder:{type:String,default:()=>"0"},disabled:{type:Boolean,default:()=>!1}},data(){return{id:`input-number-${Math.floor(Math.random()*1e3)}`,inputValue:this.modelValue}},watch:{modelValue(r){this.inputValue=r},inputValue(r){this.$emit("update:modelValue",r)}},methods:{validateInput(r){(r.key==="+"||r.key===","||r.key==="."||r.key==="-"&&this.inputValue&&this.inputValue.toString().length>0)&&r.preventDefault()},handleBlur(){let r=parseFloat(this.inputValue);this.$emit("blur"),isNaN(r)?r=this.min:r>this.max?r=this.max:r<this.min&&(r=this.min),this.inputValue=r,this.$emit("update:modelValue",this.inputValue)}}},JB={class:"p-0"},e4=["step","min","max","id","placeholder","disabled"];function t4(r,t,l,n,a,o){return e.openBlock(),e.createElementBlock("div",JB,[e.renderSlot(r.$slots,"label",e.normalizeProps(e.guardReactiveProps({id:a.id}))),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":t[0]||(t[0]=s=>a.inputValue=s),type:"number",onKeydown:t[1]||(t[1]=(...s)=>o.validateInput&&o.validateInput(...s)),onBlur:t[2]||(t[2]=(...s)=>o.handleBlur&&o.handleBlur(...s)),step:l.step,min:l.min,max:l.max,id:a.id,"aria-describedby":"helper-text-explanation",class:e.normalizeClass(["vs-number__input py-2 px-3 block w-full h-[38px] border border-solid border-stone-200 rounded-lg text-sm text-stone-800 placeholder:text-stone-500 focus:z-10 focus:border-1 focus:outline-none focus:border-blue-600 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200 dark:placeholder:text-neutral-500 dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-neutral-600",{"cursor-not-allowed":l.disabled}]),placeholder:l.placeholder,disabled:l.disabled},null,42,e4),[[e.vModelText,a.inputValue]])])}const ji=Wt(QB,[["render",t4]]),zi={__name:"vs-form-reletion-link",props:e.mergeModels({relation:{type:String,required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(r){const t=e.useModel(r,"modelValue"),l=r,n=e.ref([]),a=async()=>{const s=await(await fetch(`/api/cms-suggest/${l.relation}`)).json();n.value=s==null?void 0:s.data};return e.onMounted(a),(o,s)=>{var i;return(i=n.value)!=null&&i.length?(e.openBlock(),e.createBlock(e.unref(ta),{key:0,mode:"combo",modelValue:t.value,"onUpdate:modelValue":s[0]||(s[0]=c=>t.value=c),options:n.value},null,8,["modelValue","options"])):e.createCommentVNode("",!0)}}},r4={monaco:zE,edit:fV,preview:{__name:"vs-builder-preview",props:{data:{},dataModifiers:{},form:{},formModifiers:{}},emits:["update:data","update:form"],setup(r){De["vs-input-custom-datatable"]=Mi,De["vs-input-reference"]=La,De["vs-input-texteditor"]=Ta,De["vs-input-mediaselect"]=Pr,De["vs-input-file"]=Pr,De["vs-input-image"]=Pr,De["vs-input-richtext-md"]=Ui,De["vs-input-integer"]=ji,De["vs-input-relation-link"]=zi;const t=e.ref({}),l=e.useModel(r,"data"),n=e.useModel(r,"form"),a=e.computed(()=>{var o,s;return((s=(o=l.value)==null?void 0:o.columns)==null?void 0:s.map(Ma))||[]});return(o,s)=>{var i;return e.openBlock(),e.createElementBlock("div",{ref_key:"form",ref:n},[((i=a.value)==null?void 0:i.length)>0?(e.openBlock(),e.createBlock(e.unref(He),{key:0,modelValue:t.value,"onUpdate:modelValue":s[0]||(s[0]=c=>t.value=c),schema:a.value},null,8,["modelValue","schema"])):e.createCommentVNode("",!0)],512)}}}},l4={class:"max-w-6xl mx-auto"},n4={class:"flex items-center justify-between mb-6"},a4={class:"mb-2 text-2xl font-semibold text-gray-900"},o4={class:"lowercase"},s4={class:"text-gray-600"},i4={class:"flex items-center gap-2"},c4={class:"w-full"},d4={class:"flex items-center w-full h-10 max-w-md grid-cols-3 p-1 mb-6 bg-white border border-gray-200 rounded-md text-muted-foreground"},u4=["onClick"],m4={key:0,class:"container mx-auto bg-white rounded-md py-4 px-2 bg-opacity-50"},p4={__name:"EditCollectionPage",setup(r){const{t}=Be(),l=e.inject("cms.fetchContentTypes"),n=e.ref("edit"),a=e.ref({yaml:"",data:{columns:[],type:"collection"}}),o=e.ref({}),s=e.ref(""),i=qe.useRoute(),c=qe.useRouter(),u=e.ref(!1),d=e.computed(()=>[{name:t("cms.builder.edit"),id:"edit"},{name:t("cms.builder.preview"),id:"preview"}]),m=async()=>{var p;try{const g=await(await fetch(`/api/cms-type/${i.params.id}`)).json(),y={...g,columns:Array.isArray(g.columns)?g.columns:(p=Object.entries((g==null?void 0:g.columns)||{}))==null?void 0:p.map(([b,w])=>({...w,name:b}))};a.value={...a.value,data:y},s.value=y.title||y.name}catch(h){console.error(h)}finally{u.value=!0}},f=async()=>{var p,h;try{if(await o.value.validate()){se({type:"warning",title:t("cms.common.actions.warning"),message:t("cms.builder.editFieldFailed")});return}const y=await fetch(`/api/cms-type/${i.params.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n.value==="monaco"?(p=a.value)==null?void 0:p.yaml:(h=a.value)==null?void 0:h.data)});c.push("/settings/collections"),l(),se({type:"success",title:t("cms.common.actions.success"),message:t("cms.collections.collectionCreated")})}catch(g){console.error(g),se({type:"error",title:t("cms.common.actions.error"),message:t("cms.collections.collectionCreationFailed")})}};return e.onMounted(()=>{m()}),(p,h)=>{const g=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",l4,[e.createElementVNode("div",n4,[e.createElementVNode("div",null,[e.createElementVNode("h1",a4,[e.createTextVNode(e.toDisplayString(p.$t("cms.builder.editCollection"))+" ",1),e.createElementVNode("span",o4,e.toDisplayString(s.value),1)]),e.createElementVNode("p",s4,e.toDisplayString(p.$t("cms.builder.editContentForYourSite")),1)]),e.createElementVNode("div",i4,[e.createVNode(g,{to:"/settings/collections",class:"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border bg-background hover:text-accent-foreground h-10 px-4 py-2 border-gray-300 text-gray-700 hover:bg-gray-50"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.$t("cms.common.actions.back")),1)]),_:1}),e.createElementVNode("button",{onClick:f,class:"inline-flex items-center justify-center gap-2 whitespace-nowrap text-white rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 text-primary-foreground h-10 px-4 py-2 bg-blue-600 hover:bg-blue-700"},e.toDisplayString(p.$t("cms.common.actions.save")),1)])]),e.createElementVNode("div",c4,[e.createElementVNode("div",d4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,y=>(e.openBlock(),e.createElementBlock("button",{key:y.id,onClick:b=>n.value=y.id,class:e.normalizeClass(["inline-flex flex-1 items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm data-[state=active]:bg-blue-50 data-[state=active]:text-blue-700 data-[state=active]:border-blue-200",y.id===n.value?"bg-blue-50 text-blue-700 border-blue-200":""])},e.toDisplayString(y.name),11,u4))),128))])]),u.value?(e.openBlock(),e.createElementBlock("div",m4,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(r4)[n.value]),{yaml:a.value.yaml,"onUpdate:yaml":h[0]||(h[0]=y=>a.value.yaml=y),data:a.value.data,"onUpdate:data":h[1]||(h[1]=y=>a.value.data=y),form:o.value,"onUpdate:form":h[2]||(h[2]=y=>o.value=y)},null,40,["yaml","data","form"]))])):e.createCommentVNode("",!0)])}}},f4="menu",h4=(r,t)=>{const l=r==null?void 0:r.trim();return l?l===f4?t?t==="create"?{type:"createMenu",collection:l}:{type:"editMenu",collection:l,id:t}:{type:"menu",collection:l}:t?t==="create"?{type:"createArticle",collection:l}:{type:"editArticle",collection:l,id:t}:{type:"articles",collection:l}:{type:"collections"}},g4=[{key:"title",label:"common.title",localization:!0,type:"text"},{key:"description",label:"common.description",localization:!0,type:"text"},{key:"keywords",label:"common.keywords",localization:!0,type:"text"},{key:"meta",label:"common.meta",type:"key-value",ignore:["title","description","keywords"]}],y4={__name:"VsFormTags",props:{modelValue:{default:()=>[]},modelModifiers:{}},emits:["update:modelValue"],setup(r,{expose:t}){const{t:l}=Be(),n=e.useModel(r,"modelValue"),a=e.ref({}),o=e.ref(!1);e.provide("metaParentValue",n);const s=m=>Array.isArray(m)?m.map(f=>typeof f=="object"&&f!==null&&f.id?f.id:f):[],i=async m=>{if(!Array.isArray(m)||m.length===0)return[];try{const p=await(await fetch("/api/tags")).json(),h=(p==null?void 0:p.rows)||[];return m.map(g=>{const y=h.find(b=>b.tag_id===g);return y?{id:y.tag_id,text:y.value,color:y.color}:{id:g,text:"",color:"#ababab"}})}catch(f){return console.error("Error fetching tags:",f),m.map(p=>({id:p,text:"",color:"#ababab"}))}};e.onMounted(async()=>{await e.nextTick(),await e.nextTick(),setTimeout(()=>{var m;if(Array.isArray((m=n.value)==null?void 0:m.tag_list)){const f=s(n.value.tag_list);JSON.stringify(f)!==JSON.stringify(n.value.tag_list)&&(n.value.tag_list=f)}},100)}),e.watch(()=>n.value.tag_list,m=>{if(Array.isArray(m)&&!o.value){const f=s(m);JSON.stringify(f)!==JSON.stringify(m)&&(n.value.tag_list=f)}},{deep:!0}),e.watch(()=>n.value,m=>{if(m&&Array.isArray(m.tag_list)&&!o.value){const f=s(m.tag_list);JSON.stringify(f)!==JSON.stringify(m.tag_list)&&(m.tag_list=f)}},{deep:!0,immediate:!0}),e.watch(()=>{var m;return(m=n.value)==null?void 0:m.tag_list},m=>{Array.isArray(m)&&a.value&&e.nextTick(()=>{a.value&&a.value.setValue&&a.value.setValue("tag_list",m)})},{deep:!0});const c=async m=>{if(m.tag_list&&(m.tag_list=s(m.tag_list),n.value.tag_list=m.tag_list),await a.value.validate()){se({type:"warning",title:l("cms.common.actions.warning"),message:l("cms.builder.editFieldFailed")});return}};t({restoreTagsBeforeSubmit:async()=>{var m;if(o.value=!0,Array.isArray((m=n.value)==null?void 0:m.tag_list)){console.log("Before restore:",n.value.tag_list);const f=await i(n.value.tag_list);console.log("After restore:",f),n.value.tag_list=f}setTimeout(()=>{o.value=!1},2e3)}});const d=e.computed(()=>{var m;return[{key:"tag_list",type:"select",multiple:!0,searchable:!1,placeholder:l("cms.builder.tags"),data:"tag_id",value:((m=n.value)==null?void 0:m.tag_list)||[]}]});return(m,f)=>n.value?(e.openBlock(),e.createBlock(e.unref(He),{key:0,schema:d.value,modelValue:n.value,"onUpdate:modelValue":[f[0]||(f[0]=p=>n.value=p),c]},null,8,["schema","modelValue"])):e.createCommentVNode("",!0)}},b4={class:"flex justify-end mb-4"},k4=["href"],x4=["src"],w4=["src"],_4={key:2,class:"w-full h-[80vh] flex items-center justify-center text-gray-500"},E4={__name:"VsPreview",props:{preview_path:{type:String,default:""},slug:{type:String,default:""}},setup(r){const t=e.ref(""),l=e.ref(""),n=async()=>{var o,s;try{const c=await(await fetch("/api/settings")).json();t.value=((s=(o=c==null?void 0:c.settings)==null?void 0:o.site_info)==null?void 0:s.previewUrl)||"http://ip.local.softpro.ua"}catch(i){console.error("Failed to fetch settings:",i),t.value="http://ip.local.softpro.ua"}},a=async()=>{var o;try{const i=await(await fetch("/user")).json();l.value=(o=i==null?void 0:i.user)==null?void 0:o.draftKey}catch(s){console.error("Failed to fetch user:",s)}};return e.onMounted(()=>{n(),a()}),(o,s)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",b4,[e.createElementVNode("a",{href:`${t.value}/uk/${r.preview_path}${r.slug}${l.value?`?draftKey=${l.value}`:""}`,target:"_blank",class:"inline-flex items-center gap-2 px-3 py-1.5 text-black-600 bg-white border border-blue-200 rounded hover:border-blue-300 hover:bg-blue-50 transition-colors duration-200 font-normal cursor-pointer"},[s[0]||(s[0]=e.createTextVNode(" Переглянути на сайті ",-1)),e.createVNode(e.unref(Pc),{class:"w-4 h-4"})],8,k4)]),t.value&&r.preview_path?(e.openBlock(),e.createElementBlock("iframe",{key:0,src:`${t.value}/uk/${r.preview_path}${r.slug}?hideHeader=true&hideFooter=true`,class:"w-full h-[80vh]"},null,8,x4)):t.value?(e.openBlock(),e.createElementBlock("iframe",{key:1,src:`${t.value}/uk/${r.slug}?hideHeader=true&hideFooter=true`,class:"w-full h-[80vh]"},null,8,w4)):(e.openBlock(),e.createElementBlock("div",_4," Loading preview... "))]))}},C4={class:"space-y-6 max-w-6xl mx-auto relative bg-white"},V4={class:"p-4 sticky top-[-24px] z-10 bg-white dark:bg-slate-800"},N4={class:"flex items-center justify-between"},v4={class:"flex items-center gap-4"},B4={class:"text-2xl font-semibold text-gray-900 dark:text-white"},S4=["href","title"],A4={class:"flex items-center space-x-3"},D4={class:"w-full mt-6 flex items-center justify-between"},M4={class:"flex items-center w-full h-10 max-w-md grid-cols-3 p-1 bg-white border border-gray-200 rounded-md text-muted-foreground"},T4=["onClick"],L4={class:"flex items-center gap-2"},$4={for:"is_pin",class:"text-sm font-medium text-gray-700 dark:text-gray-300 cursor-pointer"},F4={class:"relative"},I4={key:0,class:"w-3 h-3 text-white",fill:"currentColor",viewBox:"0 0 20 20"},O4={class:"container mx-auto bg-white rounded-md pb-4 px-5"},P4={class:"container mx-auto bg-white rounded-md pb-4 px-2"},R4={key:0,class:"container mx-auto bg-white rounded-md pb-4 px-2"},U4={class:"container mx-auto bg-white rounded-md pb-4 px-2"},Hi=e.defineComponent({__name:"contentForm",setup(r){De["vs-input-custom-datatable"]=Mi,De["vs-input-reference"]=La,De["vs-input-texteditor"]=Ta,De["vs-input-mediaselect"]=Pr,De["vs-input-file"]=Pr,De["vs-input-image"]=Pr,De["vs-input-richtext-md"]=Ui,De["vs-input-integer"]=ji,De["vs-input-relation-link"]=zi;const{t,locale:l}=Be(),n=qe.useRouter(),a=qe.useRoute(),o=e.inject("menu",e.ref([])),s=e.ref([]),i=e.ref({}),c=e.ref({}),u=e.ref({}),d=e.ref(""),m=$=>{const M=[];return $.forEach(D=>{if(M.push(D),D.localization){const q={...D,name:D.name+":en",label:D.label+" (en)"};M.push(q)}}),M},f=e.computed(()=>{var $;return($=s.value)==null?void 0:$.map(Ma)}),p=e.computed(()=>(l.value,g4.flatMap($=>{const M={...$,label:t($.label)};if($.localization){const D={...$,key:`${$.key}:en`,label:t($.label)+" (en)"};return[M,D]}return[M]}))),h=e.ref({}),g=e.ref({title:"",status:"draft"}),y=e.computed(()=>{const $=[{id:"content",name:t("cms.builder.content")},{id:"seo",name:t("cms.builder.seo")},{id:"tags",name:t("cms.builder.tags")}];return d.value&&$.push({id:"preview",name:t("cms.builder.preview")}),$}),b=e.ref("content"),w=e.computed(()=>{var M,D,q,Q;const $=((M=a.params)==null?void 0:M.collection)||((D=a.params)==null?void 0:D.id);return((Q=(q=o.value)==null?void 0:q.find(R=>R.id===$))==null?void 0:Q.title)||$}),x=e.computed(()=>{var $,M;return(($=g.value)==null?void 0:$.title)||((M=a.params)!=null&&M.id?t("cms.builder.editCollection"):t("cms.articles.createArticle"))}),k=e.computed(()=>{var q,Q,R;const $=((q=a.params)==null?void 0:q.collection)||((Q=a.params)==null?void 0:Q.id),M=(R=a.params)==null?void 0:R.id,D=[{label:w.value,route:`collections/${$}`}];return M?D.push({label:x.value,route:`collections/${$}/${M}`}):D.push({label:t("cms.articles.createArticle"),route:`collections/${$}/create`}),D}),_=$=>{$==="collections"?n.push("/collections"):n.push(`/${$}`)};e.onMounted(async()=>{var Q,R,I;const $=(Q=a.params)==null?void 0:Q.collection,M=(R=a.params)==null?void 0:R.id,D=$||M,q=$&&M?M:void 0;if(!q){if(!D)return;const A=await(await fetch(`/api/cms/${D}/`)).json();s.value=m(A.columns)}try{if(!q||!D)return;const F=await fetch(`/api/cms/${D}/${q}`);if(!F.ok)throw new Error("Failed to fetch article");const A=await F.json();if(s.value=m(A==null?void 0:A.columns),A!=null&&A.preview_path&&(d.value=A==null?void 0:A.preview_path),A.rows){let z=A.rows;Array.isArray(z)||(z=[z]),g.value=z[0],await e.nextTick(),(I=z[0])!=null&&I.meta?h.value={...z[0].meta}:h.value={title:"",description:"",keywords:"",meta:{}},console.log("Initialized seoData from rows[0]:",h.value)}else g.value=A,await e.nextTick(),A!=null&&A.meta?(h.value={title:A.meta.title||"",description:A.meta.description||"",keywords:A.meta.keywords||"",meta:{...A.meta}},delete h.value.meta.title,delete h.value.meta.description,delete h.value.meta.keywords):h.value={title:"",description:"",keywords:"",meta:{}},console.log("Initialized seoData from data:",h.value)}catch(F){console.error("Error fetching article:",F)}});const N=e.computed({get:()=>{var $;return(($=g.value)==null?void 0:$.is_pin)||!1},set:$=>{g.value&&(g.value.is_pin=$)}}),V=()=>{g.value&&(g.value.is_pin=!g.value.is_pin)};e.watch(h,$=>{console.log("seoData changed:",$)},{deep:!0});const P=async $=>{var I,F,A,z;const M=(I=a.params)==null?void 0:I.collection,D=(F=a.params)==null?void 0:F.id,q=await i.value.validate();if(q){se({title:t("cms.validation"),message:JSON.stringify(q),type:"warning"});return}(A=u.value)!=null&&A.restoreTagsBeforeSubmit&&await u.value.restoreTagsBeforeSubmit();const Q=h.value||{},R={...g.value,meta:{...Q,...Q.meta||{}}};console.log("Payload before submit:",R);try{const ee=await fetch(`/api/cms/${M}/${D||""}`,{method:D?"PUT":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(R)});if(!ee.ok){let pe;try{const Ne=await ee.json();pe=JSON.stringify(Ne,null,2)}catch{pe=await ee.text()}throw new Error(`HTTP ${ee.status}: ${pe}`)}if(!D)try{const pe=await ee.json(),Ne=pe.id||((z=pe.data)==null?void 0:z.id);Ne&&a.name==="createArticle"&&await n.push(`/collections/${M}/${Ne}`)}catch(pe){console.warn("Could not parse response to get ID:",pe)}se({title:t("cms.common.success"),message:t("cms.common.successMessage"),type:"success"})}catch(ee){console.error("Submit error:",ee),se({title:t("cms.common.error"),message:"Помилка збереження",type:"error"})}};return($,M)=>{var D,q,Q,R,I,F,A;return e.openBlock(),e.createElementBlock("div",C4,[e.createElementVNode("div",V4,[e.createVNode(Ys,{items:k.value,onNavigate:_},null,8,["items"]),e.createElementVNode("div",N4,[e.createElementVNode("div",v4,[e.createElementVNode("button",{onClick:M[0]||(M[0]=z=>e.unref(n).back()),class:"p-2 text-gray-500 rounded-full hover:text-gray-900 dark:text-gray-400 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"},[e.createVNode(e.unref(hn),{class:"w-5 h-5"})]),e.createElementVNode("h1",B4,[e.createTextVNode(e.toDisplayString($.$t("cms.builder.editCollection"))+" ",1),e.createElementVNode("span",null,'"'+e.toDisplayString(((D=g.value)==null?void 0:D.type)==="single"?g.value.title:(Q=(q=e.unref(o).value)==null?void 0:q.find(z=>z.id===(e.unref(a).params.collection||e.unref(a).params.id)))==null?void 0:Q.title)+'"',1)]),e.createElementVNode("a",{href:`https://cms.opengis.info/${e.unref(l)}/guides/content/`,target:"_blank",title:$.$t("cms.guide.content")},[e.createVNode(e.unref(er),{class:"w-5 h-5"})],8,S4)]),e.createElementVNode("div",A4,[e.createElementVNode("button",{onClick:P,type:"submit",class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 bg-blue-600 text-white shadow-md transition-all duration-200 transform hover:bg-blue-700 hover:shadow-lg hover:scale-105 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"},[e.createVNode(e.unref(xn),{class:"w-4 h-4 mr-2"}),e.createTextVNode(" "+e.toDisplayString($.$t("cms.builder.save")),1)])])]),e.createElementVNode("div",D4,[e.createElementVNode("div",M4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,z=>(e.openBlock(),e.createElementBlock("button",{key:z.id,onClick:ee=>b.value=z.id,class:e.normalizeClass(["inline-flex flex-1 items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm data-[state=active]:bg-blue-50 data-[state=active]:text-blue-700 data-[state=active]:border-blue-200",z.id===b.value?"bg-blue-50 text-blue-700 border-blue-200":""])},e.toDisplayString(z.name),11,T4))),128))]),e.createElementVNode("div",L4,[e.createElementVNode("label",$4,e.toDisplayString($.$t("cms.collections.pinPublication")),1),e.createElementVNode("div",F4,[e.withDirectives(e.createElementVNode("input",{type:"checkbox",id:"is_pin","onUpdate:modelValue":M[1]||(M[1]=z=>N.value=z),class:"sr-only"},null,512),[[e.vModelCheckbox,N.value]]),e.createElementVNode("div",{class:e.normalizeClass(["w-5 h-5 border-2 rounded transition-all duration-200 cursor-pointer flex items-center justify-center",(R=g.value)!=null&&R.is_pin?"bg-sky-600 border-sky-600":"bg-white border-gray-300 hover:border-sky-400 dark:bg-gray-700 dark:border-gray-600 dark:hover:border-sky-400"]),onClick:V},[(I=g.value)!=null&&I.is_pin?(e.openBlock(),e.createElementBlock("svg",I4,[...M[7]||(M[7]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"},null,-1)])])):e.createCommentVNode("",!0)],2)])])])]),e.withDirectives(e.createElementVNode("div",O4,[(F=s.value)!=null&&F.length?(e.openBlock(),e.createBlock(e.unref(He),{key:0,modelValue:g.value,"onUpdate:modelValue":M[2]||(M[2]=z=>g.value=z),schema:f.value,form:i.value,"onUpdate:form":M[3]||(M[3]=z=>i.value=z)},null,8,["modelValue","schema","form"])):e.createCommentVNode("",!0)],512),[[e.vShow,b.value==="content"]]),e.withDirectives(e.createElementVNode("div",P4,[e.createVNode(e.unref(He),{schema:p.value,values:h.value,"onUpdate:values":M[4]||(M[4]=z=>h.value=z),form:c.value,"onUpdate:form":M[5]||(M[5]=z=>c.value=z)},null,8,["schema","values","form"])],512),[[e.vShow,b.value==="seo"]]),b.value==="tags"?(e.openBlock(),e.createElementBlock("div",R4,[e.createVNode(y4,{ref_key:"tagsForm",ref:u,modelValue:g.value,"onUpdate:modelValue":M[6]||(M[6]=z=>g.value=z)},null,8,["modelValue"])])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("div",U4,[e.createVNode(E4,{slug:(A=g.value)==null?void 0:A.slug,preview_path:d.value},null,8,["slug","preview_path"])],512),[[e.vShow,b.value==="preview"]])])}}}),j4=e.defineAsyncComponent(()=>Promise.resolve().then(()=>nS)),z4=e.defineAsyncComponent(()=>Promise.resolve().then(()=>FA)),H4=e.defineAsyncComponent(()=>Promise.resolve().then(()=>uS)),q4={collections:Qn,articles:Xs,createArticle:Hi,editArticle:Hi,menu:j4,editMenu:z4,createMenu:H4},K4=Qn,G4=r=>q4[r]??K4,W4={key:1,class:"p-4 text-sm text-slate-600 dark:text-slate-300"},Y4=e.defineComponent({__name:"CmsContentWrapper",setup(r){const t=qe.useRoute(),l=e.getCurrentInstance();if(!l)throw new Error("CmsContentWrapper must be used within a component instance");const n=e.computed(()=>{const p=l.appContext.config.globalProperties.$route;if(!p)throw new Error("Vue Router is not registered on the app instance");return p}),a=e.computed(()=>t??n.value),o=e.computed(()=>{var p;return((p=a.value)==null?void 0:p.params)??{}}),s=e.computed(()=>{var p,h;return((p=o.value)==null?void 0:p.collection)??((h=o.value)==null?void 0:h.type)}),i=e.computed(()=>{var p;return(p=o.value)==null?void 0:p.id}),c=e.computed(()=>h4(s.value,i.value)),u=e.computed(()=>G4(c.value.type)),d=e.computed(()=>`${c.value.type}-${c.value.collection??""}-${c.value.id??""}`),m=e.computed(()=>{const{type:p,collection:h,id:g}=c.value,y={...o.value};return s.value?y.collection=s.value:delete y.collection,p==="articles"?y.id=h:p==="createArticle"?delete y.id:p==="editArticle"&&g?y.id=g:delete y.id,y}),f=new Proxy({},{get(p,h,g){const y=a.value;if(!y)return;if(h==="params")return m.value;const b=Reflect.get(y,h,g);return typeof b=="function"?b.bind(y):b},has(p,h){if(h==="params")return!0;const g=a.value;return g?Reflect.has(g,h):!1},ownKeys(){const p=a.value;return p?Reflect.ownKeys(p):["params"]},getOwnPropertyDescriptor(p,h){if(h==="params")return{configurable:!0,enumerable:!0,value:m.value};const g=a.value;if(!g)return;const y=Reflect.getOwnPropertyDescriptor(g,h);if(y)return{...y,configurable:!0}}});return e.provide(qe.routeLocationKey,f),(p,h)=>u.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.value),{key:d.value})):(e.openBlock(),e.createElementBlock("div",W4,e.toDisplayString(p.$t("cms.navigation.collections")),1))}}),X4={class:"space-y-6 max-w-7xl mx-auto"},Z4={class:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between"},Q4={class:"flex items-center gap-2"},J4={class:"text-3xl font-bold text-slate-800 dark:text-slate-100 mb-2"},eS=["href","title"],tS={class:"text-slate-600 dark:text-slate-300"},rS={class:"overflow-hidden bg-white border border-gray-200 rounded-lg shadow-sm dark:bg-gray-800 dark:border-gray-700"},lS={key:0,class:"p-4 border-b border-gray-200 sm:p-6 dark:border-gray-700"},qi=e.defineComponent({__name:"MenuPage",setup(r){const{t,locale:l}=Be({useScope:"global"}),n=qe.useRouter(),a=e.ref(""),o=e.ref([]),s=e.ref([]),i=e.ref(""),c=e.ref([{name:"name",title:t("cms.menu.form.name"),type:"text"},{name:"description",title:t("cms.menu.form.description"),type:"text"},{name:"locale",title:t("cms.menu.form.language"),type:"select",data:[{text:"uk",id:"uk"},{text:"en",id:"en"}]}]),u=async()=>{const g=await(await fetch("/api/cms-menu")).json(),y=g.rows;o.value=y;const b=(g.filters||[]).map(w=>{const{extra:x,title:k,..._}=w;return _});s.value=b},d=h=>{n.push(`/menu/${h==null?void 0:h.menu_id}`)},m=async h=>{try{await fetch(`/api/cms-menu/${h==null?void 0:h.menu_id}`,{method:"DELETE"}),await se({title:t("cms.menu.menuDeleted"),type:"success",message:t("cms.menu.menuDeleted")}),await u()}catch{se({title:t("cms.menu.menuDeleteError"),type:"error",message:t("cms.menu.menuDeleteError")})}},f=(h,g)=>{if(!g)return!0;const y=g.toLowerCase();return c.value.some(b=>{const w=h[b.name];return w&&w.toString().toLowerCase().includes(y)})},p=h=>{const g=Object.entries(h==null?void 0:h.data).filter(([,y])=>y!=null).map(([y,b])=>`${y}=${b}`).join("|");i.value=g};return e.onMounted(u),(h,g)=>{var b;const y=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",X4,[e.createElementVNode("div",Z4,[e.createElementVNode("div",null,[e.createElementVNode("div",Q4,[e.createElementVNode("h1",J4,e.toDisplayString(h.$t("cms.menu.title")),1),e.createElementVNode("a",{href:`https://cms.opengis.info/${e.unref(l)}/guides/menu/`,target:"_blank",title:h.$t("cms.guide.menu")},[e.createVNode(e.unref(er),{class:"w-5 h-5"})],8,eS)]),e.createElementVNode("p",tS,e.toDisplayString(h.$t("cms.menu.description")),1)]),e.createVNode(y,{to:"/menu/create",class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 bg-blue-600 text-white shadow-md transition-all duration-200 transform hover:bg-blue-700 hover:shadow-lg hover:scale-105"},{default:e.withCtx(()=>[e.createVNode(e.unref(zt),{class:"w-4 h-4 mr-2"}),e.createTextVNode(" "+e.toDisplayString(h.$t("cms.menu.menuAdd")),1)]),_:1})]),e.createElementVNode("div",rS,[((b=s.value)==null?void 0:b.length)>0?(e.openBlock(),e.createElementBlock("div",lS,[e.createVNode(e.unref(jl),{schema:s.value,view:"inline",onChange:p},null,8,["schema"])])):e.createCommentVNode("",!0),e.createVNode(Jn,{rows:o.value,columns:c.value,query:a.value,filterFn:f,onEdit:d,onDelete:m},null,8,["rows","columns","query"])])])}}}),nS=Object.freeze(Object.defineProperty({__proto__:null,default:qi},Symbol.toStringTag,{value:"Module"})),aS={class:"space-y-6 max-w-7xl mx-auto"},oS={class:"flex items-center justify-between"},sS={class:"flex items-center gap-4"},iS={class:"text-2xl font-semibold text-gray-900 dark:text-white"},cS={class:"flex items-center space-x-3"},dS={class:"max-w-[1000px]"},Ki=e.defineComponent({__name:"MenuAddPage",setup(r){De["vs-input-monaco-editor"]=Hl;const{t}=Be({useScope:"global"}),l=qe.useRouter(),n=qe.useRoute(),a=e.ref([{key:"name",title:t("cms.menu.form.name"),type:"text",placeholder:t("cms.menu.form.name"),required:!0,validators:["required"]},{key:"description",title:t("cms.menu.form.description"),type:"text",placeholder:t("cms.menu.form.description"),required:!0,validators:["required"]},{key:"locale",title:t("cms.menu.form.language"),type:"select",placeholder:t("cms.menu.form.language"),options:[{text:"Ukrainian",id:"uk"},{text:"English",id:"en"}],required:!0,validators:["required"]},{key:"content",title:t("cms.menu.form.content"),type:"monaco-editor",height:"500px",language:"yaml",theme:"vs-light"}]),o=e.ref({}),s=e.ref({}),i=async()=>{try{if(await s.value.validate()){se({type:"warning",title:t("cms.common.actions.warning"),message:t("cms.menu.createMenuFailed")});return}await fetch("/api/cms-menu",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o.value)}),se({title:t("cms.common.success"),type:"success",message:t("cms.common.successMessage")}),o.value={},l.push("/menu")}catch(c){console.log(c),se({title:t("cms.common.error"),type:"error",message:t("cms.common.errorMessage")})}};return(c,u)=>{var d,m;return e.openBlock(),e.createElementBlock("div",aS,[e.createElementVNode("div",oS,[e.createElementVNode("div",sS,[e.createElementVNode("button",{onClick:u[0]||(u[0]=f=>e.unref(l).back()),class:"p-2 text-gray-500 rounded-full hover:text-gray-900 dark:text-gray-400 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"},[e.createVNode(e.unref(hn),{class:"w-5 h-5"})]),e.createElementVNode("h1",iS,e.toDisplayString(c.$t((m=(d=e.unref(n))==null?void 0:d.meta)==null?void 0:m.title)),1)]),e.createElementVNode("div",cS,[e.createElementVNode("button",{onClick:i,class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 bg-blue-600 text-white shadow-md transition-all duration-200 transform hover:bg-blue-700 hover:shadow-lg hover:scale-105 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"},[e.createVNode(e.unref(xn),{class:"w-4 h-4 mr-2"}),e.createTextVNode(" "+e.toDisplayString(c.$t("cms.common.actions.save")),1)])])]),e.createElementVNode("div",dS,[e.createVNode(e.unref(He),{schema:a.value,modelValue:o.value,"onUpdate:modelValue":u[1]||(u[1]=f=>o.value=f),form:s.value,"onUpdate:form":u[2]||(u[2]=f=>s.value=f)},null,8,["schema","modelValue","form"])])])}}}),uS=Object.freeze(Object.defineProperty({__proto__:null,default:Ki},Symbol.toStringTag,{value:"Module"})),mS={},pS={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function fS(r,t){return e.openBlock(),e.createElementBlock("svg",pS,[...t[0]||(t[0]=[e.createStaticVNode('<circle cx="9" cy="12" r="1"></circle><circle cx="9" cy="5" r="1"></circle><circle cx="9" cy="19" r="1"></circle><circle cx="15" cy="12" r="1"></circle><circle cx="15" cy="5" r="1"></circle><circle cx="15" cy="19" r="1"></circle>',6)])])}const hS=Wt(mS,[["render",fS]]),gS={key:0,class:"p-3 flex items-center gap-x-3 cursor-grab bg-gray-100 border border-gray-300 rounded-lg font-medium text-sm text-gray-800 dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-200"},yS={key:0,class:"text-xs text-gray-500 dark:text-neutral-400 ml-2"},bS={key:1,class:"p-3 flex items-center gap-x-2 bg-gray-100 border border-gray-300 rounded-lg dark:bg-neutral-900 dark:border-neutral-700"},kS={class:"text-sm font-medium text-gray-800 dark:text-neutral-200 shrink-0"},xS=e.defineComponent({__name:"MenuItem",props:{title:{},value:{}},emits:["delete","update:value"],setup(r,{emit:t}){const l=r,n=t,a=e.ref(!1),o=e.ref(""),s=()=>{typeof l.value=="string"&&(o.value=l.value,a.value=!0)},i=()=>{typeof l.value=="string"&&(n("update:value",o.value),a.value=!1)},c=()=>{a.value=!1,o.value=""};return(u,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([{"space-y-1":typeof u.value!="string"},"dark:bg-transparent"])},[a.value?(e.openBlock(),e.createElementBlock("div",bS,[e.createElementVNode("span",kS,e.toDisplayString(u.title)+":",1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":d[1]||(d[1]=m=>o.value=m),onKeyup:[e.withKeys(i,["enter"]),e.withKeys(c,["esc"])],onBlur:i,class:"flex-1 px-2 py-1 text-sm border border-gray-300 rounded dark:bg-neutral-800 dark:border-neutral-600 dark:text-neutral-200 focus:outline-none focus:ring-2 focus:ring-blue-500",type:"text",placeholder:"/link"},null,544),[[e.vModelText,o.value]]),e.createElementVNode("button",{onClick:e.withModifiers(i,["stop"]),class:"shrink-0 p-1 text-green-600 dark:text-green-400 hover:bg-green-50 dark:hover:bg-green-900/20 rounded",title:"Save"},[e.createVNode(e.unref(Fc),{class:"size-4"})]),e.createElementVNode("button",{onClick:e.withModifiers(c,["stop"]),class:"shrink-0 p-1 text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20 rounded",title:"Cancel"},[e.createVNode(e.unref(qc),{class:"size-4"})])])):(e.openBlock(),e.createElementBlock("div",gS,[e.createTextVNode(e.toDisplayString(u.title)+" ",1),typeof u.value=="string"?(e.openBlock(),e.createElementBlock("span",yS,e.toDisplayString(u.value),1)):e.createCommentVNode("",!0),typeof u.value=="string"?(e.openBlock(),e.createBlock(e.unref(kn),{key:1,class:"shrink-0 size-4 ml-auto text-gray-500 dark:text-neutral-500 cursor-pointer hover:text-blue-600 dark:hover:text-blue-400",onClick:e.withModifiers(s,["stop"])})):e.createCommentVNode("",!0),e.createVNode(e.unref(Ht),{class:"shrink-0 size-4 text-gray-500 dark:text-neutral-500 cursor-pointer hover:text-red-600 dark:hover:text-red-400",onClick:d[0]||(d[0]=e.withModifiers(m=>n("delete"),["stop"]))}),e.createVNode(hS,{class:"shrink-0 size-4 cursor-pointer text-gray-500 dark:text-neutral-500"})]))],2))}}),wS={class:"space-y-1"},_S=e.defineComponent({__name:"MenuList",props:{list:{type:Array,default:()=>[]},inside:{type:Boolean,default:!1}},emits:["update:list","delete:item"],setup(r,{emit:t}){const{t:l}=Be({useScope:"global"}),n=r,a=t,o=e.ref([]);e.watch(()=>n.list,d=>{o.value=d?[...d]:[]},{immediate:!0,deep:!0});const s=()=>{a("update:list",o.value)},i=d=>{Jr({title:l("cms.builder.deleteTitle"),message:l("cms.builder.deleteObject"),type:"error",onConfirm:()=>{a("update:list",o.value),a("delete:item",d)}})},c=(d,m)=>{d.value=m,e.nextTick(()=>{o.value=[...o.value],a("update:list",o.value)})},u=(d,m)=>{d.children=m,e.nextTick(()=>{o.value=[...o.value],a("update:list",o.value)})};return(d,m)=>{const f=e.resolveComponent("MenuList",!0);return e.openBlock(),e.createBlock(e.unref(Da),{tag:"ul",list:o.value,group:{name:"nested",pull:!0,put:!0},"item-key":"id",class:e.normalizeClass(["nested-sortable space-y-1",{"ps-5 dark:bg-transparent":r.inside}]),onChange:s,onEnd:s},{item:e.withCtx(({element:p})=>[e.createElementVNode("div",wS,[e.createVNode(xS,{title:p.title,value:p.value,onDelete:h=>i(p),"onUpdate:value":h=>c(p,h)},null,8,["title","value","onDelete","onUpdate:value"]),Array.isArray(p.children)?(e.openBlock(),e.createBlock(f,{key:0,list:p.children,inside:!0,"onUpdate:list":h=>u(p,h),"onDelete:item":i},null,8,["list","onUpdate:list"])):e.createCommentVNode("",!0)])]),_:1},8,["list","class"])}}}),ES={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},CS=e.defineComponent({__name:"AddNewItemInTree",props:{isOpen:{type:Boolean,required:!0},isOpenModifiers:{}},emits:e.mergeModels(["addNewItem"],["update:isOpen"]),setup(r,{emit:t}){const{t:l}=Be({useScope:"global"}),n=e.useModel(r,"isOpen"),a=e.ref({}),o=t,s=e.ref({}),i={title:{type:"text",label:l("cms.menu.form.name"),required:!0,placeholder:l("cms.menu.form.name"),validators:["required"]},value:{type:"text",label:l("cms.menu.form.value"),required:!0,placeholder:l("cms.menu.form.value"),validators:["required"]}},c=async()=>{if(await a.value.validate()){se({type:"warning",title:l("cms.common.actions.warning"),message:l("cms.menu.createMenuFailed")});return}o("addNewItem",s.value),s.value={}};return(u,d)=>(e.openBlock(),e.createBlock(e.unref(Gt),{teleport:"#modal",visible:n.value,title:u.$t("cms.menu.createMenu"),template:"default",closeClickBack:!1,onClose:d[3]||(d[3]=m=>n.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("div",ES,[e.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100",onClick:d[2]||(d[2]=m=>{n.value=!1,s.value={}})},e.toDisplayString(u.$t("cms.common.actions.cancel")),1),e.createElementVNode("button",{onClick:c,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},e.toDisplayString(u.$t("cms.common.actions.save")),1)])]),default:e.withCtx(()=>[e.createVNode(e.unref(He),{form:a.value,"onUpdate:form":d[0]||(d[0]=m=>a.value=m),modelValue:s.value,"onUpdate:modelValue":d[1]||(d[1]=m=>s.value=m),schema:i},null,8,["form","modelValue"])]),_:1},8,["visible","title"]))}}),VS=e.defineComponent({__name:"MenuBody",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(r){De["vs-input-monaco-editor"]=Hl;const{t}=Be({useScope:"global"}),l=e.ref(!1),n=e.ref(null),a=e.useModel(r,"modelValue"),o=e.ref({}),s=async f=>{try{if(await o.value.validate()){se({type:"warning",title:t("cms.common.actions.warning"),message:t("cms.menu.createMenuFailed")});return}l.value=!1,f.id=Math.random().toString(36).substr(2,9),f.children=[],a.value.items.unshift(f)}catch(p){console.log(p)}},i=e.ref([{key:"name",title:t("cms.common.title"),type:"text",placeholder:t("cms.common.title"),required:!0,validators:["required"]},{key:"description",title:t("cms.common.description"),type:"text",placeholder:t("cms.common.description"),required:!0,validators:["required"]},{key:"locale",title:t("cms.menu.form.language"),type:"select",placeholder:t("cms.menu.form.language"),required:!0,options:[{text:"Ukrainian",id:"uk"},{text:"English",id:"en"}],validators:["required"]}]),c=f=>{let p=[];for(const h in f)typeof f[h]=="object"?p.push({title:h,value:"",id:Math.random().toString(36).substr(2,9),children:c(f[h])}):p.push({title:h,value:f[h],id:Math.random().toString(36).substr(2,9),children:[]});return p},u=f=>{a.value.items=f},d=f=>{m(a.value.items,f.id)};function m(f,p){for(let h=f.length-1;h>=0;h--){if(f[h].id===p)return f.splice(h,1),!0;if(f[h].children&&f[h].children.length&&m(f[h].children,p))return!0}return!1}return e.onBeforeMount(()=>{Array.isArray(a.value.items)||(a.value.items=c(a.value.items))}),(f,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(He),{schema:i.value,modelValue:a.value,"onUpdate:modelValue":p[0]||(p[0]=h=>a.value=h),form:o.value,"onUpdate:form":p[1]||(p[1]=h=>o.value=h)},null,8,["schema","modelValue","form"]),e.createElementVNode("button",{onClick:p[2]||(p[2]=h=>l.value=!0),class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium w-min ml-auto my-6 h-9 px-4 py-2 bg-blue-600 text-white shadow-md transition-all duration-200 transform hover:bg-blue-700 hover:shadow-lg hover:scale-105 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"},[e.createVNode(e.unref(zt),{class:"w-4 h-4 mr-2"}),e.createTextVNode(" "+e.toDisplayString(f.$t("cms.menu.createMenu")),1)]),e.createVNode(CS,{isOpen:l.value,"onUpdate:isOpen":p[3]||(p[3]=h=>l.value=h),form:n.value,"onUpdate:form":p[4]||(p[4]=h=>n.value=h),onAddNewItem:s},null,8,["isOpen","form"]),e.createVNode(_S,{class:"px-2",list:a.value.items,"onUpdate:list":u,"onDelete:item":d},null,8,["list"])],64))}});/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function Gi(r){return typeof r>"u"||r===null}function NS(r){return typeof r=="object"&&r!==null}function vS(r){return Array.isArray(r)?r:Gi(r)?[]:[r]}function BS(r,t){var l,n,a,o;if(t)for(o=Object.keys(t),l=0,n=o.length;l<n;l+=1)a=o[l],r[a]=t[a];return r}function SS(r,t){var l="",n;for(n=0;n<t;n+=1)l+=r;return l}function AS(r){return r===0&&Number.NEGATIVE_INFINITY===1/r}var DS=Gi,MS=NS,TS=vS,LS=SS,$S=AS,FS=BS,wr={isNothing:DS,isObject:MS,toArray:TS,repeat:LS,isNegativeZero:$S,extend:FS};function Wi(r,t){var l="",n=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(l+='in "'+r.mark.name+'" '),l+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!t&&r.mark.snippet&&(l+=`
250
+ `,h.parentNode.appendChild(g)};return e.onMounted(()=>{var p,h;(h=(p=t.value)==null?void 0:p.filter(g=>typeof g=="object"))==null||h.forEach(g=>g.id?g.id:g.id=Math.random().toString(36).substring(2,15))}),(p,h)=>(e.openBlock(),e.createElementBlock("div",wV,[e.createElementVNode("div",_V,[e.createElementVNode("div",EV,[e.createElementVNode("table",CV,[e.createElementVNode("thead",VV,[e.createElementVNode("tr",NV,[h[4]||(h[4]=e.createElementVNode("th",{class:"h-10 px-2 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] w-12 text-center"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.colModel,g=>(e.openBlock(),e.createElementBlock("th",{key:g.name,class:"h-10 px-2 text-left align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 min-w-[150px]"},e.toDisplayString(g.label||g.title||g.name),1))),128)),e.createElementVNode("th",vV,e.toDisplayString(p.$t("cms.table.actions")),1)])]),e.createElementVNode("tbody",BV,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(g,y)=>(e.openBlock(),e.createElementBlock("tr",{key:g==null?void 0:g.id,class:e.normalizeClass(["border-b data-[state=selected]:bg-muted transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60 cursor-move",{"opacity-50":l.value===g}]),draggable:"true",onDragstart:b=>o(b,g,y),onDragover:b=>s(b),onDrop:b=>u(b,y),onDragenter:b=>i(b,y),onDragleave:h[2]||(h[2]=b=>c(b))},[e.createElementVNode("td",AV,[e.createElementVNode("div",DV,[e.createVNode(e.unref(Qa))])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.colModel,b=>(e.openBlock(),e.createElementBlock("td",{key:b.name,class:"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-slate-600 dark:text-slate-400 text-sm"},[b.type==="Texteditor"?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:g[b.key]||"-"},null,8,MV)):b.type==="File"?(e.openBlock(),e.createElementBlock("div",TV,[Array.isArray(g[b.key])&&g[b.key].length>0?(e.openBlock(),e.createElementBlock("div",LV,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d(g[b.key]),(w,x)=>(e.openBlock(),e.createElementBlock("div",{key:x,class:"relative w-8 h-8 rounded overflow-hidden bg-gray-100 dark:bg-gray-700 flex-shrink-0"},[e.createElementVNode("img",{src:w,alt:`Image ${x+1}`,class:"w-full h-full object-cover",onError:h[0]||(h[0]=k=>f(k))},null,40,$V)]))),128)),m(g[b.key])>0?(e.openBlock(),e.createElementBlock("span",FV," +"+e.toDisplayString(m(g[b.key])),1)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",IV,[...h[5]||(h[5]=[e.createElementVNode("svg",{class:"w-4 h-4 text-gray-400",fill:"currentColor",viewBox:"0 0 20 20"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm12 12H4l4-8 3 6 2-4 3 6z","clip-rule":"evenodd"})],-1)])]))])):(e.openBlock(),e.createElementBlock("span",OV,e.toDisplayString(g[b.key]||"-"),1))]))),128)),e.createElementVNode("td",PV,[e.createVNode(yV,{item:g,colModel:r.colModel,modelValue:t.value,"onUpdate:modelValue":h[1]||(h[1]=b=>t.value=b)},null,8,["item","colModel","modelValue"])])],42,SV))),128)),a.value?(e.openBlock(),e.createElementBlock("tr",RV)):e.createCommentVNode("",!0)])])])]),e.createVNode(xV,{colModel:r.colModel,modelValue:t.value,"onUpdate:modelValue":h[3]||(h[3]=g=>t.value=g)},null,8,["colModel","modelValue"])]))}},Ti="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAACbCAIAAABJbgHoAAAGfklEQVR4Ae3d7W6baBSF0d7/7Q6IDxkzmrHEQU2DHZudWH1XflRHcXNqVnka4tL01+qNAIGwwK/wfusJEFjPyexyuUzTNAxD3/dd1/3z/1vXdX3fD8MwTdPlcoFNoFmBlzJblmWapr7vb10d/9j3/TRNy7I0a+3AmxV4MrPr9TqO43FXnz06juP1em1W3IE3KPBMZvM8b1eGn7V0/P6u6+Z5bpDbIbcp8OXMnv4k9jG8cRzbRHfUrQl8LbNhGD7W8sp7hmFoTdzxNijwhcxOb+zWp9IaPO1aO+RHMzvxWvHjZz9Xj62ddq0d70OZzfP8sY1z3+MVkdbOvKaO935m1+v1xdcVHwmy6zqv8jd15jV1sPczi14u7gt06djUmdfUwd7JbFmWfQnp2T0iTZ187RzsncymaUqntd8/TVM79I60HYE7mT14v+I+lVfmvu+P6W93UQ7eCLyxwMd7d48yu1wurzTz3Mce3Mu/LMs4jt3/b88t91EE0gK383Mcx/1XQEeZffMV4+34D64bb42lmewn8LpA13X7l/SOMgvd9nF8DAc3hXzzFezx8/QogWOB/VdAR5n9yGm9f3K/fZ32DX99dwznUQKPC3Rdt53AR5n9yGm9f3Lbs7wNjx+hn0ngHQS2E/gos596otuT+234qefj1yXwnMB2AsvsOUAfReC+wEOZuWi8D+lnEPhc4KHM3u0lkM8PxyME3lHgocze7QX9d4T0nAh8LvBQZu/219M/8tn1c0OPEDgS2P/V1NFLIO92s9U0TT/y5eKRpccI/Emg67r9/UxHma3r+s2fQPZ/AGyfcLfhlW8O+ScK7yOQEvjtm5Heyeybrxv3fwBsde2HZVnmeZ68EXhjgXme9/cNr+u976Hvn3XuIzcTeE7gzmezdV19k4LnZH0UgU3gfma+5c6GZSDwnMD9zNZ19Q3knsP1UQRuAg9llr503P8DOL8xBP4+gUczW9c1dFPIwb/j/Pu4HVGbAl/ILFGaxto87Vo76q9ldu7Vo2vF1s62Zo/3y5ndXhF58aYn/41gsydcmwf+TGbrur5y39Nv96G06e6omxJ4MrObkf/ivalzxcE+LfBSZtuverlcpmkahqHv++16suu6vu+HYZim6eCbnG5LDAT+VoFzMvtbdRwXgVMEZHYKoyUEjgRkdqTjMQKnCMjsFEZLCBwJyOxIx2METhGQ2SmMlhA4EpDZkY7HCJwiILNTGC0hcCTwX2a3/1/QjwQInCuwlSezc2FtI1ACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhAS2DL7F8r/OP7dtZNpAAAAAElFTkSuQmCC",Li={faq:{schema:{title:{type:"text",label:"Назва",placeholder:"Назва"},show_dots:{type:"switcher",label:"Показувати точки"},show_index:{type:"switcher",conditions:["show_dots","==","true"],label:"Показувати нумерацію"},index_type:{type:"combobox",conditions:["show_index","==","true"],label:"Тип нумерації",options:[{id:"decimal",text:"Десятковий"},{id:"upper-alpha",text:"Латинські великі букви"},{id:"lower-alpha",text:"Латинські маленькі букви"},{id:"upper-roman",text:"Римські великі цифри"},{id:"lower-roman",text:"Римські маленькі цифри"},{id:"upper-cyrillic",text:"Кириличні великі букви"},{id:"lower-cyrillic",text:"Кириличні маленькі букви"}]},openfirst:{type:"switcher",label:"Відкрити перший елемент?"},collapse_mode:{type:"switcher",label:"Не згортати попередній елемент?"},data:{type:"DataTable",colModel:[{key:"title",ua:"Назва",type:"text",required:!0,validators:["required"]},{key:"is_section",type:"Radio",label:"Заповнити секціями",options:[{id:"yes",text:"Так"},{id:"no",text:"Ні"}],required:!0,validators:["required"]},{key:"section",type:"reference",label:"Вкладений контент",placeholder:"Ваш контент",conditions:["is_section","==","yes"],required:!0,validators:["required"]},{key:"body",type:"tiptap-editor",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","no"],required:!0,validators:["required"]}]}}},banner:{schema:{title:{type:"text",label:"Назва",placeholder:"Назва"},image:{type:"file",label:"Зображення",placeholder:"Зображення"}}},photoGrid:{schema:{columns:{type:"number",label:"Кількість колонок",placeholder:"Кількість колонок",default:3},data:{type:"DataTable",colModel:[{key:"image",ua:"Зображення",type:"file"},{key:"caption",ua:"Заголовок",type:"text"}]}}},slider:{schema:{autoplay:{type:"switcher",label:"Автоматичне гортання?",default:!0},autoplaySpeed:{type:"number",label:"Швидкість автоматичного гортання(мс)",placeholder:"Швидкість автоматичного гортання(мс)",default:3e3},show_navigation:{type:"switcher",label:"Показувати кнопки навігації?"},data:{type:"DataTable",colModel:[{key:"title",ua:"Назва",type:"text"},{key:"link",ua:"Посилання",type:"text"},{key:"image",ua:"Зображення",type:"file"},{key:"image_width",ua:"Ширина зображення(px)",type:"number",placeholder:"Ширина зображення"},{key:"image_height",ua:"Висота зображення(px)",type:"number",placeholder:"Висота зображення"},{ua:"Розтягувати по ширині",key:"stretch",type:"switcher"},{key:"target_blank",ua:"Відкривати в новій вкладці?",type:"switcher"}]}}},video:{schema:{file:{type:"file",max_size:50,description:"Максимальний розмір файлу 50MB",label:"Завантажити відео",placeholder:"Завантажити відео"},hidden_gif:{type:"switcher",label:"Сховати GIF"},preview:{type:"file",label:"Прев'ю для відео"},link:{type:"text",label:"Посилання",placeholder:"Посилання"}}},about:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},text:{type:"tiptap-editor",label:"Текст",placeholder:"Текст"},url:{type:"file",label:"Зображення / відео",placeholder:"Посилання"}}},cards:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},data:{type:"DataTable",colModel:[{key:"title",ua:"Назва",type:"text"},{key:"img",ua:"Зображення",type:"file"},{key:"link",ua:"Посилання",type:"text"},{key:"description",ua:"Опис",type:"text"}]}}},usefulLinks:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},data:{type:"DataTable",colModel:[{key:"text",ua:"Назва",type:"text"},{key:"url",ua:"Посилання",type:"text"},{key:"target_blank",ua:"Відкривати в новій вкладці?",type:"switcher"}]}}},team:{schema:{data:{type:"DataTable",colModel:[{key:"avatar",ua:"Аватар",type:"file"},{key:"title",ua:"Ім'я/ПІБ",type:"text"},{key:"description",ua:"Опис",type:"textarea",optional:!0},{key:"position",ua:"Посада",type:"text",tooltip:!0},{key:"email",ua:"Email",type:"text",optional:!0},{key:"tel",ua:"Телефон",type:"text",optional:!0},{key:"schedule",ua:"Графік прийому",type:"text",optional:!0},{key:"isinfo",type:"switcher",label:"Відображати кнопку 'Детальніше'"},{key:"slug",ua:"Slug",type:"text",label:"Унікальний ідентифікатор"}]}}},body:{schema:{background_color:{type:"switcher",label:"Додати білий фон?"},content:{type:"tiptap-editor",label:"Текст",placeholder:"Текст"}}},news:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},buttonText:{type:"text",label:"Текст кнопки",placeholder:"Текст кнопки"},buttonLink:{type:"text",label:"Посилання кнопки",placeholder:"Посилання кнопки"},tag:{type:"select",label:"Тег",placeholder:"Тег",data:"tag_id"},news_list:{type:"select",label:"Список новин",multiple:!0,placeholder:"Список новин",parent:"tag",data:"news_tag_id"}}},form:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},formUrl:{type:"text",label:"Посилання для відправки форми",placeholder:"Посилання"},schema:{label:"Схема форми",type:"DataTable",colModel:[{key:"name",ua:"Name",type:"text",placeholder:"Name"},{key:"label",ua:"Title",type:"text",placeholder:"Title"},{key:"type",ua:"Type",type:"combobox",options:[{text:"Text",id:"text"},{text:"Textarea",id:"textarea"},{text:"switcher",id:"switcher"},{text:"Email",id:"email"},{text:"Mask",id:"mask"},{text:"Number",id:"number"},{text:"Date",id:"date"},{text:"Datetime",id:"datetime"}]},{key:"mask",ua:"Маска",type:"text",conditions:["type","==","mask"],placeholder:"Маска"},{key:"placeholder",ua:"Плейсхолдер",type:"text",placeholder:"Placeholder"},{key:"required",ua:"Required",type:"switcher"}]}}},tabs:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},description:{type:"textarea",label:"Опис",placeholder:"Опис"},history_mode:{type:"switcher",label:"Використовувати історію сторінки?"},data:{type:"DataTable",colModel:[{key:"slug",type:"slug",label:"Slug",parent:"title",placeholder:"Slug"},{key:"title",ua:"Назва",type:"text",required:!0,validators:["required"]},{key:"is_section",type:"Radio",label:"Заповнити секціями",options:[{id:"yes",text:"Так"},{id:"no",text:"Ні"}],required:!0,validators:["required"]},{key:"section",type:"reference",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","yes"],required:!0,validators:["required"]},{key:"body",type:"tiptap-editor",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","no"],required:!0,validators:["required"]}]}}},vertical_tabs:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},history_mode:{type:"switcher",label:"Використовувати історію сторінки?"},data:{type:"DataTable",colModel:[{key:"slug",type:"slug",label:"Slug",parent:"title",placeholder:"Slug"},{key:"title",ua:"Назва",type:"text",required:!0,validators:["required"]},{key:"is_section",type:"Radio",label:"Заповнити секціями",options:[{id:"yes",text:"Так"},{id:"no",text:"Ні"},{id:"slug",text:"Привязати сторінку"}],required:!0,validators:["required"]},{key:"slug",type:"text",label:"Slug",placeholder:"Slug",conditions:["is_section","==","slug"]},{key:"section",type:"reference",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","yes"],required:!0,validators:["required"]},{key:"body",type:"tiptap-editor",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","no"],required:!0,validators:["required"]}]}}},documents:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},icon:{type:"file",label:"Завантажити іконку",placeholder:"Завантажити іконку"},show_icon:{type:"switcher",label:"Показувати іконку?"},documents:{type:"DataTable",colModel:[{key:"title",ua:"Назва",type:"text"},{key:"file",info:"Прев'ю доступно тільки для документів у форматі pdf, html, txt. Інші формати одразу завантажуються.",ua:"Файл",type:"file"}]}}},infoLine:{schema:{divider:{type:"file",label:"Завантажити розподілювач"},speed:{type:"number",label:"Швидкість автоматичного гортання(с)",placeholder:"Швидкість автоматичного гортання(с)",default:20},data:{type:"DataTable",colModel:[{key:"title",ua:"Текст",type:"text"}]}}},interested:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},data:{type:"DataTable",colModel:[{key:"title",ua:"Заголовок",type:"text"},{key:"link",ua:"Посилання",type:"text"},{key:"target_blank",ua:"Відкривати в новій вкладці?",type:"switcher"},{key:"color",ua:"Колір фону",type:"color"}]}}},contact:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},data:{type:"DataTable",colModel:[{key:"type",ua:"Тип",type:"combobox",options:[{id:"email",text:"Email"},{id:"tel",text:"Телефон"},{id:"address",text:"Адреса"}]},{key:"title",ua:"Пошта",type:"text",conditions:["type","==","email"]},{key:"title",ua:"Телефон",type:"text",conditions:["type","==","tel"]},{key:"title",ua:"Адреса",type:"text",conditions:["type","==","address"]},{key:"description",ua:"Опис",type:"text"}]}}},iframe:{schema:{link:{type:"text",label:"Посилання",placeholder:"Посилання"},file:{type:"file",label:"Завантажити файл",placeholder:"Завантажити файл"},height:{type:"text",label:"Висота iframe(px)",placeholder:"Висота iframe(px)"}}}},on=[{text:"reference.faq",id:"faq"},{text:"reference.banner",id:"banner"},{text:"reference.slider",id:"slider"},{text:"reference.photoGrid",id:"photoGrid"},{text:"reference.video",id:"video"},{text:"reference.about",id:"about"},{text:"reference.cards",id:"cards"},{text:"reference.usefulLinks",id:"usefulLinks"},{text:"reference.team",id:"team"},{text:"reference.body",id:"body"},{text:"reference.news",id:"news"},{text:"reference.form",id:"form"},{text:"reference.tabs",id:"tabs"},{text:"reference.vertical_tabs",id:"vertical_tabs"},{text:"reference.documents",id:"documents"},{text:"reference.infoLine",id:"infoLine"},{text:"reference.interested",id:"interested"},{text:"reference.contact",id:"contact"},{text:"reference.iframe",id:"iframe"}],UV={class:"h-full w-full flex flex-col"},jV={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},zV={class:"text-xs font-medium text-gray-600"},HV={key:0,class:"text-xs text-gray-500"},$i={__name:"cards-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",UV,[l[0]||(l[0]=e.createStaticVNode('<div class="flex-1 grid grid-cols-3 gap-1.5"><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div></div>',1)),e.createElementVNode("div",jV,[e.createElementVNode("div",zV,e.toDisplayString(t.$t(r.text)),1),r.count&&r.count>0?(e.openBlock(),e.createElementBlock("div",HV,e.toDisplayString(r.count),1)):e.createCommentVNode("",!0)])]))}},qV={class:"h-full w-full flex flex-col"},KV={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},GV={class:"text-xs font-medium text-gray-600"},WV={key:0,class:"text-xs text-gray-500"},YV={__name:"faq-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",qV,[l[0]||(l[0]=e.createStaticVNode('<div class="h-3 bg-gray-500 rounded mb-2"></div><div class="space-y-1.5 flex-1"><div class="border border-gray-300 rounded p-1"><div class="flex items-center justify-between"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down w-2.5 h-2.5 text-gray-400"><path d="m6 9 6 6 6-6"></path></svg></div></div><div class="border border-gray-300 rounded p-1"><div class="flex items-center justify-between"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down w-2.5 h-2.5 text-gray-400"><path d="m6 9 6 6 6-6"></path></svg></div><div class="mt-1 pt-1 border-t border-gray-200"><div class="space-y-0.5"><div class="h-1 bg-gray-200 rounded"></div><div class="h-1 bg-gray-200 rounded w-5/6"></div><div class="h-1 bg-gray-200 rounded w-4/5"></div></div></div></div><div class="border border-gray-300 rounded p-1"><div class="flex items-center justify-between"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down w-2.5 h-2.5 text-gray-400"><path d="m6 9 6 6 6-6"></path></svg></div></div><div class="border border-gray-300 rounded p-1"><div class="flex items-center justify-between"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down w-2.5 h-2.5 text-gray-400"><path d="m6 9 6 6 6-6"></path></svg></div></div></div>',2)),e.createElementVNode("div",KV,[e.createElementVNode("div",GV,e.toDisplayString(t.$t(r.text)),1),r.count&&r.count>0?(e.openBlock(),e.createElementBlock("div",WV,e.toDisplayString(r.count),1)):e.createCommentVNode("",!0)])]))}},XV={class:"h-full w-full flex flex-col"},ZV={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},QV={class:"text-xs font-medium text-gray-600"},JV={key:0,class:"text-xs text-gray-500"},Fi={__name:"banner-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",XV,[l[0]||(l[0]=e.createStaticVNode('<div class="flex-1 bg-gray-200 rounded relative"><div class="absolute inset-0 flex items-center justify-center"><div class="w-16 h-10 bg-gray-300 rounded"></div></div><div class="absolute bottom-2 left-2"><div class="h-3 bg-gray-400 rounded w-16"></div></div></div>',1)),e.createElementVNode("div",ZV,[e.createElementVNode("div",QV,e.toDisplayString(t.$t(r.text)),1),r.count&&r.count>0?(e.openBlock(),e.createElementBlock("div",JV,e.toDisplayString(r.count),1)):e.createCommentVNode("",!0)])]))}},eN={class:"h-full w-full flex flex-col"},tN={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},rN={class:"text-xs font-medium text-gray-600"},lN={key:0,class:"text-xs text-gray-500"},nN={__name:"form-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",eN,[l[0]||(l[0]=e.createStaticVNode('<div class="h-3 bg-gray-500 rounded mb-2"></div><div class="space-y-1.5 flex-1"><div><div class="h-1.5 bg-gray-300 rounded mb-1 w-1/4"></div><div class="h-5 bg-gray-200 rounded border border-gray-300"></div></div><div><div class="h-1.5 bg-gray-300 rounded mb-1 w-1/3"></div><div class="h-5 bg-gray-200 rounded border border-gray-300"></div></div><div><div class="h-1.5 bg-gray-300 rounded mb-1 w-1/4"></div><div class="h-5 bg-gray-200 rounded border border-gray-300"></div></div><div><div class="h-1.5 bg-gray-300 rounded mb-1 w-1/3"></div><div class="h-8 bg-gray-200 rounded border border-gray-300"></div></div></div><div class="h-6 bg-gray-600 rounded mt-2"></div>',3)),e.createElementVNode("div",tN,[e.createElementVNode("div",rN,e.toDisplayString(t.$t(r.text)),1),r.count&&r.count>0?(e.openBlock(),e.createElementBlock("div",lN,e.toDisplayString(r.count),1)):e.createCommentVNode("",!0)])]))}},aN={class:"h-full w-full flex flex-col"},oN={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},sN={class:"text-xs font-medium text-gray-600"},iN={key:0,class:"text-xs text-gray-500"},Ii={__name:"news-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",aN,[l[0]||(l[0]=e.createStaticVNode('<div class="h-4 bg-gray-400 rounded mb-2"></div><div class="flex gap-2 flex-1"><div class="flex-1 space-y-2"><div class="bg-gray-200 rounded p-1.5"><div class="h-8 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-3/4"></div></div><div class="bg-gray-200 rounded p-1.5"><div class="h-8 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-3/4"></div></div></div><div class="w-20 space-y-1"><div class="border-b border-gray-300 pb-1"><div class="h-1 bg-gray-300 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-4/5"></div></div><div class="border-b border-gray-300 pb-1"><div class="h-1 bg-gray-300 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-4/5"></div></div><div class="border-b border-gray-300 pb-1"><div class="h-1 bg-gray-300 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-4/5"></div></div><div class="border-b border-gray-300 pb-1"><div class="h-1 bg-gray-300 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-4/5"></div></div></div></div>',2)),e.createElementVNode("div",oN,[e.createElementVNode("div",sN,e.toDisplayString(t.$t(r.text)),1),r.count&&r.count>0?(e.openBlock(),e.createElementBlock("div",iN,e.toDisplayString(r.count),1)):e.createCommentVNode("",!0)])]))}},cN={class:"h-full w-full flex flex-col"},dN={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},uN={class:"text-xs font-medium text-gray-600"},mN={key:0,class:"text-xs text-gray-500"},pN={__name:"team-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",cN,[l[0]||(l[0]=e.createStaticVNode('<div class="space-y-2 flex-1"><div class="flex items-start gap-2"><div class="w-8 h-8 bg-gray-300 rounded flex-shrink-0"></div><div class="flex-1 min-w-0"><div class="h-2 bg-gray-400 rounded mb-1 w-2/3"></div><div class="h-1.5 bg-gray-300 rounded mb-1"></div><div class="flex gap-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-phone w-2.5 h-2.5 text-gray-400"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-mail w-2.5 h-2.5 text-gray-400"><rect width="20" height="16" x="2" y="4" rx="2"></rect><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-clock w-2.5 h-2.5 text-gray-400"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></div></div></div><div class="flex items-start gap-2"><div class="w-8 h-8 bg-gray-300 rounded flex-shrink-0"></div><div class="flex-1 min-w-0"><div class="h-2 bg-gray-400 rounded mb-1 w-2/3"></div><div class="h-1.5 bg-gray-300 rounded mb-1"></div><div class="flex gap-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-phone w-2.5 h-2.5 text-gray-400"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-mail w-2.5 h-2.5 text-gray-400"><rect width="20" height="16" x="2" y="4" rx="2"></rect><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-clock w-2.5 h-2.5 text-gray-400"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></div></div></div><div class="flex items-start gap-2"><div class="w-8 h-8 bg-gray-300 rounded flex-shrink-0"></div><div class="flex-1 min-w-0"><div class="h-2 bg-gray-400 rounded mb-1 w-2/3"></div><div class="h-1.5 bg-gray-300 rounded mb-1"></div><div class="flex gap-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-phone w-2.5 h-2.5 text-gray-400"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-mail w-2.5 h-2.5 text-gray-400"><rect width="20" height="16" x="2" y="4" rx="2"></rect><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-clock w-2.5 h-2.5 text-gray-400"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></div></div></div><div class="flex items-start gap-2"><div class="w-8 h-8 bg-gray-300 rounded flex-shrink-0"></div><div class="flex-1 min-w-0"><div class="h-2 bg-gray-400 rounded mb-1 w-2/3"></div><div class="h-1.5 bg-gray-300 rounded mb-1"></div><div class="flex gap-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-phone w-2.5 h-2.5 text-gray-400"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-mail w-2.5 h-2.5 text-gray-400"><rect width="20" height="16" x="2" y="4" rx="2"></rect><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-clock w-2.5 h-2.5 text-gray-400"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></div></div></div></div>',1)),e.createElementVNode("div",dN,[e.createElementVNode("div",uN,e.toDisplayString(t.$t(r.text)),1),r.count&&r.count>0?(e.openBlock(),e.createElementBlock("div",mN,e.toDisplayString(r.count),1)):e.createCommentVNode("",!0)])]))}},fN={class:"h-full w-full flex flex-col"},hN={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},gN={class:"text-xs font-medium text-gray-600"},yN={key:0,class:"text-xs text-gray-500"},Oi={__name:"usefulLinks-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",fN,[l[0]||(l[0]=e.createStaticVNode('<div class="h-4 bg-gray-400 rounded mb-3"></div><div class="grid grid-cols-2 gap-2 flex-1"><div class="space-y-2"><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div></div><div class="space-y-2"><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div></div></div>',2)),e.createElementVNode("div",hN,[e.createElementVNode("div",gN,e.toDisplayString(t.$t(r.text)),1),r.count&&r.count>0?(e.openBlock(),e.createElementBlock("div",yN,e.toDisplayString(r.count),1)):e.createCommentVNode("",!0)])]))}},bN={class:"h-full w-full flex flex-col"},kN={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},xN={class:"text-xs font-medium text-gray-600"},wN={key:0,class:"text-xs text-gray-500"},_N={__name:"video-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",bN,[l[0]||(l[0]=e.createStaticVNode('<div class="flex-1 bg-gray-200 rounded relative"><div class="absolute inset-0 flex items-center justify-center"><div class="w-10 h-10 bg-gray-400 rounded-full flex items-center justify-center"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-play w-5 h-5 text-white ml-0.5"><polygon points="6 3 20 12 6 21 6 3"></polygon></svg></div></div><div class="absolute bottom-1.5 left-1.5 right-1.5"><div class="h-2 bg-gray-400 rounded mb-1"></div><div class="h-2 bg-gray-400 rounded w-3/4"></div></div></div><div class="mt-2 flex items-center gap-2"><div class="w-5 h-5 bg-gray-300 rounded"></div><div class="h-2 bg-gray-300 rounded flex-1"></div></div>',2)),e.createElementVNode("div",kN,[e.createElementVNode("div",xN,e.toDisplayString(t.$t(r.text)),1),r.count&&r.count>0?(e.openBlock(),e.createElementBlock("div",wN,e.toDisplayString(r.count),1)):e.createCommentVNode("",!0)])]))}},EN={class:"h-full w-full flex flex-col"},CN={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},VN={class:"text-xs font-medium text-gray-600"},NN={key:0,class:"text-xs text-gray-500"},vN={__name:"about-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",EN,[l[0]||(l[0]=e.createStaticVNode('<div class="flex flex-1"><div class="flex-1 pr-2"><div class="h-4 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5"><div class="h-2 bg-gray-300 rounded"></div><div class="h-2 bg-gray-300 rounded"></div><div class="h-2 bg-gray-300 rounded w-4/5"></div><div class="h-2 bg-gray-300 rounded"></div><div class="h-2 bg-gray-300 rounded w-3/4"></div><div class="h-2 bg-gray-300 rounded"></div></div></div><div class="w-16 h-20 bg-gray-200 rounded flex items-center justify-center"><div class="w-6 h-6 bg-gray-300 rounded-full"></div></div></div>',1)),e.createElementVNode("div",CN,[e.createElementVNode("div",VN,e.toDisplayString(t.$t(r.text)),1),r.count&&r.count>0?(e.openBlock(),e.createElementBlock("div",NN,e.toDisplayString(r.count),1)):e.createCommentVNode("",!0)])]))}},BN={class:"h-full w-full flex flex-col"},SN={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},AN={class:"text-xs font-medium text-gray-600"},DN={key:0,class:"text-xs text-gray-500"},MN={__name:"slider-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",BN,[l[0]||(l[0]=e.createStaticVNode('<div class="flex-1 bg-gray-200 rounded mb-2 relative"><div class="absolute inset-0 flex items-center justify-center"><div class="w-12 h-8 bg-gray-300 rounded"></div></div><div class="absolute left-1 top-1/2 transform -translate-y-1/2"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-left w-4 h-4 text-gray-400"><path d="m15 18-6-6 6-6"></path></svg></div><div class="absolute right-1 top-1/2 transform -translate-y-1/2"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-right w-4 h-4 text-gray-400"><path d="m9 18 6-6-6-6"></path></svg></div></div><div class="h-3 bg-gray-300 rounded mb-2"></div><div class="h-6 w-20 bg-gray-400 rounded"></div><div class="flex justify-center gap-1 mt-2"><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div></div>',4)),e.createElementVNode("div",SN,[e.createElementVNode("div",AN,e.toDisplayString(t.$t(r.text)),1),r.count&&r.count>0?(e.openBlock(),e.createElementBlock("div",DN,e.toDisplayString(r.count),1)):e.createCommentVNode("",!0)])]))}},TN={class:"h-full flex flex-col"},LN={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},$N={class:"text-xs font-medium text-gray-600"},FN={key:0,class:"text-xs text-gray-500"},IN={__name:"infoLine-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",TN,[l[0]||(l[0]=e.createStaticVNode('<div class="flex-1 bg-gray-200 rounded relative overflow-hidden"><div class="absolute inset-0 flex items-center"><div class="flex gap-8 whitespace-nowrap animate-pulse"><div class="h-3 bg-gray-400 rounded w-32"></div><div class="h-3 bg-gray-300 rounded w-24"></div><div class="h-3 bg-gray-400 rounded w-40"></div><div class="h-3 bg-gray-300 rounded w-28"></div><div class="h-3 bg-gray-400 rounded w-36"></div><div class="h-3 bg-gray-300 rounded w-20"></div></div></div><div class="absolute top-2 left-2 right-2 flex justify-between items-center"><div class="w-2 h-2 bg-gray-500 rounded-full"></div><div class="w-2 h-2 bg-gray-500 rounded-full"></div></div></div>',1)),e.createElementVNode("div",LN,[e.createElementVNode("div",$N,e.toDisplayString(t.$t(r.text)),1),r.count&&r.count>0?(e.openBlock(),e.createElementBlock("div",FN,e.toDisplayString(r.count),1)):e.createCommentVNode("",!0)])]))}},ON={class:"h-full flex flex-col"},PN={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},RN={class:"text-xs font-medium text-gray-600"},UN={key:0,class:"text-xs text-gray-500"},jN={__name:"tabs-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",ON,[l[0]||(l[0]=e.createStaticVNode('<div class="h-2 bg-gray-300 rounded mb-2"></div><div class="flex gap-1 mb-3"><div class="h-4 w-16 bg-gray-400 rounded"></div><div class="h-4 w-16 bg-gray-200 rounded"></div></div><div class="space-y-2 flex-1"><div class="h-2 bg-gray-300 rounded w-5/6"></div><div class="h-2 bg-gray-300 rounded"></div><div class="space-y-1 mt-3"><div class="flex items-center gap-2"><div class="w-2 h-2 bg-gray-400 rounded-full"></div><div class="h-1.5 bg-gray-300 rounded w-20"></div></div><div class="flex items-center gap-2"><div class="w-2 h-2 bg-gray-400 rounded-full"></div><div class="h-1.5 bg-gray-300 rounded w-16"></div></div></div></div>',3)),e.createElementVNode("div",PN,[e.createElementVNode("div",RN,e.toDisplayString(t.$t(r.text)),1),r.count&&r.count>0?(e.openBlock(),e.createElementBlock("div",UN,e.toDisplayString(r.count),1)):e.createCommentVNode("",!0)])]))}},zN={class:"h-full flex flex-col"},HN={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},qN={class:"text-xs font-medium text-gray-600"},KN={key:0,class:"text-xs text-gray-500"},Pi={__name:"documents-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",zN,[l[0]||(l[0]=e.createStaticVNode('<div class="h-4 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5 flex-1"><div class="flex items-center justify-between p-1.5 border-b border-gray-200"><div class="flex items-center gap-2"><div class="w-3 h-3 bg-gray-400 rounded-full"></div><div class="h-2 bg-gray-300 rounded flex-1 w-28"></div></div><div class="flex gap-1.5"><div class="w-3 h-3 bg-gray-200 rounded"></div><div class="w-3 h-3 bg-gray-200 rounded"></div></div></div><div class="flex items-center justify-between p-1.5 border-b border-gray-200"><div class="flex items-center gap-2"><div class="w-3 h-3 bg-gray-400 rounded-full"></div><div class="h-2 bg-gray-300 rounded flex-1 w-28"></div></div><div class="flex gap-1.5"><div class="w-3 h-3 bg-gray-200 rounded"></div><div class="w-3 h-3 bg-gray-200 rounded"></div></div></div><div class="flex items-center justify-between p-1.5 border-b border-gray-200"><div class="flex items-center gap-2"><div class="w-3 h-3 bg-gray-400 rounded-full"></div><div class="h-2 bg-gray-300 rounded flex-1 w-28"></div></div><div class="flex gap-1.5"><div class="w-3 h-3 bg-gray-200 rounded"></div><div class="w-3 h-3 bg-gray-200 rounded"></div></div></div><div class="flex items-center justify-between p-1.5 border-b border-gray-200"><div class="flex items-center gap-2"><div class="w-3 h-3 bg-gray-400 rounded-full"></div><div class="h-2 bg-gray-300 rounded flex-1 w-28"></div></div><div class="flex gap-1.5"><div class="w-3 h-3 bg-gray-200 rounded"></div><div class="w-3 h-3 bg-gray-200 rounded"></div></div></div></div>',2)),e.createElementVNode("div",HN,[e.createElementVNode("div",qN,e.toDisplayString(t.$t(r.text)),1),r.count&&r.count>0?(e.openBlock(),e.createElementBlock("div",KN,e.toDisplayString(r.count),1)):e.createCommentVNode("",!0)])]))}},GN={class:"h-full flex flex-col"},WN={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},YN={class:"text-xs font-medium text-gray-600"},XN={key:0,class:"text-xs text-gray-500"},sn={faq:YV,banner:Fi,slider:MN,video:_N,about:vN,cards:$i,usefulLinks:Oi,team:pN,news:Ii,form:nN,tabs:jN,vertical_tabs:Ii,documents:Pi,infoLine:IN,body:{__name:"body-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",GN,[l[0]||(l[0]=e.createStaticVNode('<div class="grid grid-cols-3 gap-2 flex-1"><div class="flex flex-col"><div class="h-3 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5"><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div></div></div><div class="flex flex-col"><div class="h-3 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5"><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div></div></div><div class="flex flex-col"><div class="h-3 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5"><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div></div></div></div>',1)),e.createElementVNode("div",WN,[e.createElementVNode("div",YN,e.toDisplayString(t.$t(r.text)),1),r.count&&r.count>0?(e.openBlock(),e.createElementBlock("div",XN,e.toDisplayString(r.count),1)):e.createCommentVNode("",!0)])]))}},photoGrid:$i,interested:Oi,contact:Pi,iframe:Fi},ZN={class:"grid grid-cols-1 md:grid-cols-1 lg:grid-cols-2 2xl:grid-cols-3 gap-4"},QN=["onClick"],JN={class:"wireframe-block h-[240px] !p-4 border-2 border-dashed bg-white relative overflow-hidden transition-all rounded-lg shadow-sm border-gray-300 hover:border-gray-400 cursor-pointer"},ev=["src"],tv={__name:"vs-form-reference-choce",props:{modelValue:{type:String,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(r){const t=e.useModel(r,"modelValue");return(l,n)=>(e.openBlock(),e.createElementBlock("div",ZN,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(on),a=>(e.openBlock(),e.createElementBlock("div",{key:a.id,onClick:o=>t.value=a.id,class:"relative"},[e.createElementVNode("div",JN,[e.unref(sn)[a.id]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(sn)[a.id]),{key:0,text:a==null?void 0:a.text,count:(a==null?void 0:a.data)||0},null,8,["text","count"])):(e.openBlock(),e.createElementBlock("img",{key:1,src:e.unref(Ti),alt:"Team collaboration",class:"w-full h-full object-cover"},null,8,ev))])],8,QN))),128))]))}},rv={};function lv(r,t,l,n,a,o){const s=e.resolveComponent("vs-richtext");return e.openBlock(),e.createBlock(s,{class:"w-full"})}const Ta=Wt(rv,[["render",lv]]),nv={class:"flex gap-4"},av={class:"text-sm text-gray-500 dark:text-gray-400 border flex items-center h-10 px-4 rounded-lg w-full"},ov={class:"flex items-center justify-between w-full p-4 border-t border-gray-200 dark:border-gray-700"},sv={__name:"vs-form-reference-add",props:e.mergeModels({title:{type:String,required:!0}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:["update:modelValue"],setup(r){const{t}=Be();De["vs-input-reference"]=La,De["vs-input-tiptap-editor"]=Ta;const l=e.useModel(r,"modelValue"),n=e.ref(!1),a=e.ref({}),o=e.ref(null),s=e.ref({}),i=e.computed(()=>{var u;return((u=Li[o.value])==null?void 0:u.schema)||null}),c=async()=>{if(await a.value.validate()){se({type:"warning",title:t("cms.common.actions.warning"),message:t("cms.builder.editFieldFailed")});return}try{Object.keys(s.value).length!==0&&(l.value=[...l.value||[],{...s.value,id:Math.random().toString(36).substring(2,15),reference_type:o.value}]),n.value=!1,o.value=null,s.value={}}catch(d){console.log(d)}};return e.watch(n,()=>{n.value||(o.value=null,s.value={})}),(u,d)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("button",{type:"button",class:"inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm text-sm font-medium text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-sky-500",onClick:d[0]||(d[0]=m=>n.value=!n.value)},e.toDisplayString(u.$t("cms.builder.create")),1),e.createVNode(e.unref(xs),{visible:n.value,"onUpdate:visible":d[6]||(d[6]=m=>n.value=m),position:"right",closeClickBackdrop:!1,onClose:d[7]||(d[7]=m=>n.value=!1),title:o.value?u.$t("cms.builder."+o.value):u.$t("cms.builder.selectType"),size:"50vw"},{footer:e.withCtx(()=>[e.createElementVNode("div",ov,[e.createElementVNode("button",{onClick:d[5]||(d[5]=m=>n.value=!1),class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100"},e.toDisplayString(u.$t("cms.builder.cancel")),1),e.createElementVNode("button",{onClick:c,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},e.toDisplayString(u.$t("cms.builder.create")),1)])]),default:e.withCtx(()=>{var m;return[o.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",nv,[e.createElementVNode("div",av,[e.createElementVNode("span",null,e.toDisplayString((m=e.unref(on).find(f=>f.id===o.value))==null?void 0:m.text),1)]),e.createElementVNode("button",{class:"py-2.5 px-3 mb-4 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300",onClick:d[2]||(d[2]=f=>o.value=null)},e.toDisplayString(u.$t("cms.builder.changeType")),1)]),i.value?(e.openBlock(),e.createBlock(e.unref(He),{key:o.value,schema:i.value,modelValue:s.value,"onUpdate:modelValue":d[3]||(d[3]=f=>s.value=f),form:a.value,"onUpdate:form":d[4]||(d[4]=f=>a.value=f)},null,8,["schema","modelValue","form"])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(tv,{key:0,modelValue:o.value,"onUpdate:modelValue":d[1]||(d[1]=f=>o.value=f),options:e.unref(on)},null,8,["modelValue","options"]))]}),_:1},8,["visible","title"])]))}},iv={class:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity flex space-x-1 z-10"},cv={class:"flex items-center justify-between w-full p-4 border-t border-gray-200 dark:border-gray-700"},dv={__name:"vs-form-reference-controls",props:e.mergeModels({title:{type:String,required:!0}},{modelValue:{type:Object,default:()=>({})},modelModifiers:{},parent:{type:Array,default:()=>[]},parentModifiers:{}}),emits:["update:modelValue","update:parent"],setup(r){const{t}=Be(),l=e.useModel(r,"modelValue"),n=e.useModel(r,"parent"),a=e.ref(!1),o=e.ref({}),s=e.ref({}),i=e.computed(()=>{var u;return((u=Li[l.value.reference_type])==null?void 0:u.schema)||null});e.watch(a,u=>{u&&(o.value={...l.value})});const c=async()=>{try{if(await s.value.validate()){se({type:"warning",title:t("cms.common.actions.warning"),message:t("cms.builder.editFieldFailed")});return}l.value={...o.value},a.value=!1}catch(u){console.log(u)}};return(u,d)=>(e.openBlock(),e.createElementBlock("div",iv,[e.createElementVNode("button",{onClick:d[0]||(d[0]=m=>a.value=!a.value),class:"p-1.5 bg-white dark:bg-gray-800 rounded shadow-sm hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors border border-gray-200 dark:border-gray-700"},[e.createVNode(e.unref(Nr),{class:"h-4 w-4 text-gray-400"})]),e.createElementVNode("button",{onClick:d[1]||(d[1]=m=>n.value=n.value.filter(f=>f.id!==l.value.id)),class:"p-1.5 bg-white dark:bg-gray-800 rounded shadow-sm hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors border border-gray-200 dark:border-gray-700"},[e.createVNode(e.unref(Ht),{class:"h-4 w-4 text-red-500"})]),e.createVNode(e.unref(xs),{visible:a.value,"onUpdate:visible":d[5]||(d[5]=m=>a.value=m),onClose:d[6]||(d[6]=m=>a.value=!1),title:r.title,width:"50vw"},{footer:e.withCtx(()=>[e.createElementVNode("div",cv,[e.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100",onClick:d[4]||(d[4]=m=>a.value=!1)},e.toDisplayString(u.$t("cms.common.actions.cancel")),1),e.createElementVNode("button",{onClick:c,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},e.toDisplayString(u.$t("cms.common.actions.save")),1)])]),default:e.withCtx(()=>[i.value?(e.openBlock(),e.createBlock(e.unref(He),{key:0,form:s.value,"onUpdate:form":d[2]||(d[2]=m=>s.value=m),schema:i.value,modelValue:o.value,"onUpdate:modelValue":d[3]||(d[3]=m=>o.value=m),class:"-mr-[10px] ml-[10px] mt-[10px]"},null,8,["form","schema","modelValue"])):e.createCommentVNode("",!0)]),_:1},8,["visible","title"])]))}},uv={class:"w-full"},mv={key:0,class:"relative"},pv={class:"group wireframe-block h-[280px] !p-4 border-2 border-dashed bg-white relative overflow-hidden transition-all rounded-lg shadow-sm border-gray-00 hover:border-gray-400 cursor-grab"},fv=["src"],La={__name:"vs-form-reference-list",props:e.mergeModels({reference_type:{type:String,required:!0},title:{type:String,required:!0}},{modelValue:{default:()=>[]},modelModifiers:{}}),emits:["update:modelValue"],setup(r){const t=a=>{var o;return(o=on.find(s=>s.id===a))==null?void 0:o.text},l=e.useModel(r,"modelValue"),n=e.computed({get(){const a=l.value;return a==null?[]:Array.isArray(a)?a:[]},set(a){l.value=Array.isArray(a)?a:[]}});return e.watch(l,a=>{a!=null&&!Array.isArray(a)&&(l.value=[])},{immediate:!0}),(a,o)=>{var s;return e.openBlock(),e.createElementBlock("div",uv,[((s=n.value)==null?void 0:s.length)>0?(e.openBlock(),e.createBlock(e.unref(Da),{key:0,modelValue:n.value,"onUpdate:modelValue":o[1]||(o[1]=i=>n.value=i),"item-key":"id",handle:".drag-handle",class:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-4"},{item:e.withCtx(({element:i,index:c})=>[i!=null&&i.reference_type?(e.openBlock(),e.createElementBlock("div",mv,[e.createElementVNode("div",pv,[(e.openBlock(),e.createElementBlock("div",{key:i.id,class:"absolute top-2 left-2 opacity-0 group-hover:opacity-100 border border-gray-200 dark:border-gray-700 transition-opacity cursor-move z-10 bg-white dark:bg-gray-800 rounded p-1 shadow-sm drag-handle"},[e.createVNode(e.unref(Qa),{class:"h-4 w-4 text-gray-400"})])),e.createVNode(dv,{title:a.$t("cms.builder."+(i==null?void 0:i.reference_type)),modelValue:n.value[c],"onUpdate:modelValue":u=>n.value[c]=u,parent:n.value,"onUpdate:parent":o[0]||(o[0]=u=>n.value=u)},null,8,["title","modelValue","onUpdate:modelValue","parent"]),e.unref(sn)[i==null?void 0:i.reference_type]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(sn)[i==null?void 0:i.reference_type]),{key:0,index:c,text:t(i==null?void 0:i.reference_type),count:Array.isArray(i==null?void 0:i.data)?i.data.length:0},null,8,["index","text","count"])):(e.openBlock(),e.createElementBlock("img",{key:1,src:e.unref(Ti),alt:"Team collaboration",class:"w-full h-full object-cover"},null,8,fv))])])):e.createCommentVNode("",!0)]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),e.createVNode(sv,{class:"mt-4",title:r.title,modelValue:n.value,"onUpdate:modelValue":o[2]||(o[2]=i=>n.value=i)},null,8,["title","modelValue"])])}}};function Ri(r){if(r===0)return"0 Bytes";const t=1024,l=["Bytes","KB","MB","GB","TB"],n=Math.floor(Math.log(r)/Math.log(t));return Number.parseFloat((r/Math.pow(t,n)).toFixed(2))+" "+l[n]}function hv(r){const t=new Date(r);return isNaN(t.getTime())?"":t.toISOString().slice(0,10)}const gv={__name:"TypeTag",props:{type:{type:String,required:!0}},setup(r){const t=new Map([["document","bg-blue-100 text-blue-800 border-blue-200 dark:bg-blue-900/30 dark:text-blue-300 dark:border-blue-700"],["image","bg-green-100 text-green-800 border-green-200 dark:bg-green-900/30 dark:text-green-300 dark:border-green-700"],["video","bg-purple-100 text-purple-800 border-purple-200 dark:bg-purple-900/30 dark:text-purple-300 dark:border-purple-700"]]);return(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors shadow-lg backdrop-blur-sm",e.unref(t).get(r.type)])},e.toDisplayString(r.type),3))}},yv={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 max-h-[calc(100%-130px)] overflow-y-auto px-2 pt-2 pb-5"},bv={key:0,class:"flex flex-col items-center justify-center h-64 text-muted-foreground col-span-full"},kv=["onClick"],xv=["onClick"],wv={class:"truncate font-medium text-slate-800 dark:text-slate-100 mb-2"},_v={class:"text-sm text-slate-500 dark:text-slate-400"},Ev=["onClick"],Cv={class:"p-0"},Vv={class:"aspect-video bg-slate-100 dark:bg-slate-700 rounded-t-lg overflow-hidden relative"},Nv={class:"w-full h-full flex items-center justify-center bg-gradient-to-br from-slate-100 to-slate-200 dark:from-slate-700 dark:to-slate-800"},vv={key:0,class:"relative w-full"},Bv=["src","alt"],Sv={class:"p-4"},Av={class:"flex items-center justify-between mb-2"},Dv={class:"font-medium text-slate-800 dark:text-slate-100 truncate flex-1 mr-2"},Mv={class:"space-y-1 text-sm text-slate-500 dark:text-slate-400"},Tv={class:"flex justify-between"},Lv={class:"flex justify-between"},$v={__name:"MediaGrid",props:{files:{type:Array,required:!0},selectedFile:{type:Object,default:null},selectedFiles:{type:Array,default:()=>[]},isDeleteButton:{type:Boolean,default:!1}},emits:["delete-file","file-click","delete-folder"],setup(r,{emit:t}){Be();const l=r,n=e.ref([]),a=e.ref(null),o=i=>{if(!i)return"";const c=new Date(i);return isNaN(c.getTime())?"":c.toISOString().slice(0,10)},s=()=>{n.value=l.files.sort((i,c)=>i.type==="dir"&&c.type!=="dir"?-1:i.type!=="dir"&&c.type==="dir"?1:0)};return e.onMounted(()=>s()),e.onUpdated(()=>s()),(i,c)=>{var u;return e.openBlock(),e.createElementBlock("div",yv,[((u=r.files)==null?void 0:u.length)===0?(e.openBlock(),e.createElementBlock("div",bv,[e.createVNode(e.unref(Cr),{class:"w-12 h-12 mb-2"}),e.createElementVNode("p",null,e.toDisplayString(i.$t("cms.noFilesInFolder")),1)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,d=>{var m;return e.openBlock(),e.createElementBlock(e.Fragment,{key:d==null?void 0:d.url},[(d==null?void 0:d.type)==="dir"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"p-6 text-center rounded-xl h-[fit-content] relative text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm hover:shadow-xl transition-all duration-200 transform hover:scale-105 cursor-pointer",onClick:f=>i.$emit("file-click",d)},[r.isDeleteButton?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(f=>{a.value=d},["stop"]),class:"absolute top-4 right-4 p-1 border border-gray-300 dark:border-slate-700 rounded-lg cursor-pointer hover:bg-gray-200 dark:hover:bg-slate-700 group"},[e.createVNode(e.unref(Ht),{class:"w-4 h-4 text-gray-500 group-hover:text-red-500"})],8,xv)):e.createCommentVNode("",!0),e.createVNode(e.unref(Za),{class:"w-16 h-16 mx-auto mb-4 text-blue-600"}),e.createElementVNode("h3",wv,e.toDisplayString(d==null?void 0:d.name),1),e.createElementVNode("p",_v,e.toDisplayString(d==null?void 0:d.count)+" "+e.toDisplayString(i.$t("cms.media.files")),1)],8,kv)):(d==null?void 0:d.type)==="file"?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["h-[fit-content] rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm hover:shadow-xl transition-all duration-200 transform hover:scale-105 group cursor-pointer",{"bg-accent text-accent-foreground ring-2 ring-primary":((m=r.selectedFile)==null?void 0:m.url)===(d==null?void 0:d.url)||r.selectedFiles&&r.selectedFiles.some(f=>f.id===d.id)}]),onClick:f=>i.$emit("file-click",d)},[e.createElementVNode("div",Cv,[e.createElementVNode("div",Vv,[e.createElementVNode("div",Nv,[(d==null?void 0:d.filetype)==="image"&&(d!=null&&d.filepath||d!=null&&d.url)?(e.openBlock(),e.createElementBlock("div",vv,[e.createElementVNode("img",{src:d==null?void 0:d.preview,alt:(d==null?void 0:d.alt)||(d==null?void 0:d.filename),class:"object-cover w-full h-full rounded text-xs"},null,8,Bv)])):(e.openBlock(),e.createBlock(e.unref(Hr),{key:1,class:"w-12 h-12 text-gray-500"}))])]),e.createElementVNode("div",Sv,[e.createElementVNode("div",Av,[e.createElementVNode("h3",Dv,e.toDisplayString(d.filename),1),e.createVNode(gv,{type:d==null?void 0:d.filetype},null,8,["type"])]),e.createElementVNode("div",Mv,[e.createElementVNode("div",Tv,[e.createElementVNode("span",null,e.toDisplayString(i.$t("cms.media.size"))+":",1),e.createElementVNode("span",null,e.toDisplayString(e.unref(Ri)(d.filesize)),1)]),e.createElementVNode("div",Lv,[e.createElementVNode("span",null,e.toDisplayString(i.$t("cms.media.uploaded"))+":",1),e.createElementVNode("span",null,e.toDisplayString(o(d.created_at)),1)])])])])],10,Ev)):e.createCommentVNode("",!0)],64)}),128))])}}},Fv={},Iv={"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 16 16",width:"16",height:"16",fill:"currentColor"};function Ov(r,t){return e.openBlock(),e.createElementBlock("svg",Iv,[...t[0]||(t[0]=[e.createElementVNode("path",{d:"M.513 1.513A1.75 1.75 0 0 1 1.75 1h3.5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 0 0 .2.1H 13a1 1 0 0 1 1 1v.5H2.75a.75.75 0 0 0 0 1.5h11.978a1 1 0 0 1 .994 1.117L15 13.25A1.75 1.75 0 0 1 13.25 15H1.75A1.75 1.75 0 0 1 0 13.25V2.75c0-.464.184-.91.513-1.237Z"},null,-1),e.createElementVNode("path",{d:"M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"},null,-1)])])}const Pv=Wt(Fv,[["render",Ov]]),Rv={},Uv={"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 16 16",width:"16",height:"16",fill:"currentColor"};function jv(r,t){return e.openBlock(),e.createElementBlock("svg",Uv,[...t[0]||(t[0]=[e.createElementVNode("path",{d:"M.513 1.513A1.75 1.75 0 0 1 1.75 1h3.5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 0 0 .2.1H 13a1 1 0 0 1 1 1v.5H2.75a.75.75 0 0 0 0 1.5h11.978a1 1 0 0 1 .994 1.117L15 13.25A1.75 1.75 0 0 1 13.25 15H1.75A1.75 1.75 0 0 1 0 13.25V2.75c0-.464.184-.91.513-1.237Z"},null,-1),e.createElementVNode("path",{d:"M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"},null,-1)])])}const zv=Wt(Rv,[["render",jv]]),Hv={key:0,class:"flex flex-col items-center justify-center h-64 text-muted-foreground"},qv={key:1,class:"w-full text-sm caption-bottom"},Kv={class:"[&_tr]:border-b"},Gv={class:"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"},Wv={class:"h-12 px-4 text-left align-middle font-medium text-muted-foreground w-[300px]"},Yv={class:"h-12 px-4 font-medium text-left align-middle text-muted-foreground"},Xv={class:"h-12 px-4 font-medium text-left align-middle text-muted-foreground"},Zv={class:"hidden h-12 px-4 font-medium text-left align-middle text-muted-foreground md:table-cell"},Qv={class:"[&_tr:last-child]:border-0"},Jv=["onClick"],eB={class:"p-4 font-medium align-middle"},tB={class:"flex items-center gap-2"},rB={key:1,class:"relative w-8 h-8"},lB=["src","alt"],nB={class:"truncate max-w-[200px]"},aB={class:"p-4 align-middle"},oB={class:"p-4 align-middle"},sB={class:"hidden p-4 align-middle md:table-cell"},iB={key:0},cB={__name:"MediaList",props:{files:{type:Array,required:!0},selectedFile:{type:Object,default:null},selectedFiles:{type:Array,default:()=>[]}},emits:["file-click","delete-folder"],setup(r,{emit:t}){const{t:l}=Be(),n=e.ref(null),a=t,o=()=>{Jr({title:l("cms.builder.deleteTitle"),message:l("cms.builder.deleteObject"),type:"error",onConfirm:()=>{s()}})},s=()=>{a("delete-folder",n.value)};return(i,c)=>{const u=e.resolveComponent("File");return e.openBlock(),e.createElementBlock("div",null,[r.files.length===0?(e.openBlock(),e.createElementBlock("div",Hv,[e.createVNode(u,{class:"w-12 h-12 mb-2"}),e.createElementVNode("p",null,e.toDisplayString(i.$t("cms.media.noFilesInFolder")),1)])):(e.openBlock(),e.createElementBlock("table",qv,[e.createElementVNode("thead",Kv,[e.createElementVNode("tr",Gv,[e.createElementVNode("th",Wv,e.toDisplayString(i.$t("cms.media.name")),1),e.createElementVNode("th",Yv,e.toDisplayString(i.$t("cms.media.type")),1),e.createElementVNode("th",Xv,e.toDisplayString(i.$t("cms.media.size")),1),e.createElementVNode("th",Zv,e.toDisplayString(i.$t("cms.media.updatedAt")),1),c[0]||(c[0]=e.createElementVNode("th",null,null,-1))])]),e.createElementVNode("tbody",Qv,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.files,d=>{var m,f,p,h,g;return e.openBlock(),e.createElementBlock("tr",{key:d.id,class:e.normalizeClass(["border-b transition-colors hover:bg-blue-200/50 data-[state=selected]:bg-muted cursor-pointer",{"bg-blue-200":((m=n.value)==null?void 0:m.id)===d.id&&((f=n.value)==null?void 0:f.type)===d.type||r.selectedFiles&&r.selectedFiles.some(y=>y.id===d.id&&y.type===d.type)}]),onClick:y=>i.$emit("cms.file-click",d)},[e.createElementVNode("td",eB,[e.createElementVNode("div",tB,[d.type==="dir"?(e.openBlock(),e.createBlock(Pv,{key:0,class:"w-5 h-5 text-blue-500"})):(d==null?void 0:d.filetype)==="image"&&(d!=null&&d.filepath)?(e.openBlock(),e.createElementBlock("div",rB,[e.createElementVNode("img",{src:d==null?void 0:d.preview,alt:(d==null?void 0:d.alt)||(d==null?void 0:d.filename),class:"object-cover w-full h-full rounded"},null,8,lB)])):(d==null?void 0:d.filetype)==="image"?(e.openBlock(),e.createBlock(zv,{key:2,class:"w-5 h-5 text-green-500"})):(e.openBlock(),e.createBlock(u,{key:3,class:"w-5 h-5 text-gray-500"})),e.createElementVNode("span",nB,e.toDisplayString((d==null?void 0:d.filename)||(d==null?void 0:d.name)),1)])]),e.createElementVNode("td",aB,e.toDisplayString((d==null?void 0:d.type)==="dir"?i.$t("cms.media.folder"):((h=(p=d==null?void 0:d.filetype)==null?void 0:p.charAt(0))==null?void 0:h.toUpperCase())+((g=d==null?void 0:d.filetype)==null?void 0:g.slice(1))),1),e.createElementVNode("td",oB,e.toDisplayString((d==null?void 0:d.type)==="dir"?"--":e.unref(Ri)(d==null?void 0:d.filesize)),1),e.createElementVNode("td",sB,e.toDisplayString(d!=null&&d.updated_at?e.unref(hv)(d==null?void 0:d.updated_at):"--"),1),d.type==="dir"?(e.openBlock(),e.createElementBlock("td",iB,[e.createVNode(e.unref(Ht),{class:"w-4 h-4 text-red-500 cursor-pointer",onClick:e.withModifiers(o,["stop"])},null,8,["onClick"])])):e.createCommentVNode("",!0)],10,Jv)}),128))])]))])}}},dB={},uB={xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function mB(r,t){return e.openBlock(),e.createElementBlock("svg",uB,[...t[0]||(t[0]=[e.createElementVNode("path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"},null,-1),e.createElementVNode("polyline",{points:"9 22 9 12 15 12 15 22"},null,-1)])])}const pB=Wt(dB,[["render",mB]]),fB={class:"flex items-center space-x-1"},hB=["onClick"],gB={__name:"MediaBreadcrumb",props:{currentPath:{type:Array,required:!0}},emits:["navigate"],setup(r){return(t,l)=>(e.openBlock(),e.createElementBlock("div",fB,[e.createElementVNode("button",{class:"flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium transition-all duration-200 text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20",onClick:l[0]||(l[0]=n=>t.$emit("navigate",[]))},[e.createVNode(pB,{class:"w-3 h-3"}),e.createTextVNode(" "+e.toDisplayString(t.$t("cms.media.mediaLibrary")),1)]),r.currentPath.length>0?(e.openBlock(),e.createBlock(e.unref(Er),{key:0,class:"w-3 h-3 text-slate-400 dark:text-slate-500"})):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.currentPath,(n,a)=>(e.openBlock(),e.createElementBlock("button",{key:a,class:"flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium transition-all duration-200 text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900/20",onClick:o=>t.$emit("navigate",r.currentPath.slice(0,a+1))},[e.createVNode(e.unref(Za),{class:"w-3 h-3"}),e.createTextVNode(" "+e.toDisplayString(n)+" ",1),a<r.currentPath.length-1?(e.openBlock(),e.createBlock(e.unref(Er),{key:0,class:"w-3 h-3 text-slate-400 dark:text-slate-500"})):e.createCommentVNode("",!0)],8,hB))),128))]))}},yB=["src"],bB={class:"absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity rounded-lg gap-2"},kB=["onClick"],xB=["onClick"],wB=["title"],_B={key:1,class:"relative group"},EB=["src"],CB={class:"absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity rounded-lg gap-2"},VB=["title"],NB={key:2,class:"absolute inset-0 bg-white bg-opacity-75 flex items-center justify-center rounded-lg z-10"},vB={class:"flex flex-col items-center gap-2"},BB={class:"text-xs text-gray-600"},SB=["multiple","disabled"],AB={class:"whitespace-nowrap text-sm"},DB={class:"whitespace-nowrap text-sm"},MB={class:"flex items-center justify-between p-4 border-b"},TB={class:"text-lg font-semibold"},LB={class:"flex items-center justify-between gap-4 p-4 border-b"},$B={class:"relative z-[1] rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm mb-6 p-4 mx-4"},FB={class:"flex items-center justify-between gap-4"},IB={class:"flex items-center gap-4 flex-1"},OB={class:"relative flex-1 max-w-md"},PB=["placeholder"],RB={class:"flex items-center gap-2 relative"},UB={class:"text-xs font-bold"},jB={class:"text-xs font-bold"},zB={key:0,class:"w-full absolute top-full left-1/2 transform -translate-x-1/2 mt-2 z-50 bg-white dark:bg-slate-700 flex flex-col items-start border border-slate-200 dark:border-slate-600 rounded-md shadow-lg"},HB={class:"flex items-center gap-2"},qB={class:"flex flex-col gap-4 overflow-y-auto p-4 flex-1"},KB={class:"p-4 border-t flex items-center justify-between"},GB={key:0,class:"text-sm text-gray-600 dark:text-gray-400"},WB={key:1},YB=["disabled"],Pr={__name:"vs-form-media-select",props:e.mergeModels({multiple:{type:Boolean,default:!1},multi:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(r,{emit:t}){const{t:l}=Be(),n=qe.useRoute(),a=qe.useRouter(),o=e.useModel(r,"modelValue"),s=t,i=r,c=e.computed(()=>i.multiple||i.multi),u=e.ref(null),d=e.computed(()=>o.value||u.value),m=e.computed(()=>{if(!c.value)return[];const U=d.value;return U?Array.isArray(U)?U:[U]:[]}),f=e.computed(()=>d.value?typeof d.value=="object"?d.value.filename||d.value.file_name||d.value.native_file_name||"File":typeof d.value=="string"?d.value.split("cms./").pop()||d.value:"File":""),p=e.ref(!1),h=e.ref(!1),g=e.ref("grid"),y=e.ref([]),b=e.ref([]),w=e.ref([]),x=e.ref(),k=e.ref([]),_=e.ref(null),N=e.ref(!1),V=e.ref(null),P=e.ref(null),$=e.ref({}),M=e.ref(""),D=e.ref(!1),q=e.ref("name"),Q=new Map([["name",l("cms.media.sortBy.name")],["filesize",l("cms.media.sortBy.filesize")]]),R=U=>typeof U=="string"?U:(U==null?void 0:U.filepath)||(U==null?void 0:U.file_path)||U,I=U=>U?typeof U=="string"?U.split("cms./").pop()||U:U.filename||U.file_name||U.native_file_name||"File":"",F=U=>typeof U=="string"?U:(U==null?void 0:U.preview)||`/file/resize?filepath=${R(U)}&h=137&quality=75`,A=()=>{_.value&&_.value.click()},z=()=>{p.value=!p.value,p.value&&ee()},ee=()=>{if(V.value){const U=V.value.getBoundingClientRect();$.value={top:`${U.bottom+10}px`,left:`${U.left+U.width/2}px`,transform:"translateX(-50%)",width:"200px"}}},pe=U=>{var Y;if(U.type==="dir")Ze([...y.value,U.name]);else if(c.value){const re=k.value.findIndex(le=>le.id===U.id);re>=0?k.value.splice(re,1):k.value.push(U)}else x.value=U.id===((Y=x.value)==null?void 0:Y.id)?null:U},Ne=U=>{q.value=U,D.value=!1,b.value=b.value.sort((Y,re)=>{var le;if((Y==null?void 0:Y.type)==="dir")return-1;if(U==="name")return(le=Y==null?void 0:Y.name)==null?void 0:le.localeCompare(re==null?void 0:re.name);if(U==="filesize")return(re==null?void 0:re.filesize)-(Y==null?void 0:Y.filesize)})},Xe=async()=>{try{const U=y.value.join("/"),re=await(await fetch(`/api/cms-media?subdir=${U}${M.value?"&search="+M.value:""}`,{method:"GET"})).json();re.data?(b.value=re.data.map(le=>({...le,id:le.type==="dir"?`dir-${le.name}`:le.id,preview:`/file/resize?filepath=${le.filepath}&h=137&quality=75`})),Ne(q.value)):b.value=[]}catch(U){console.error("Search error:",U),b.value=[]}},Jt=()=>{if(c.value){if(k.value.length>0){const U=Array.isArray(o.value)?[...o.value]:o.value?[o.value]:[],Y=Array.isArray(u.value)?[...u.value]:u.value?[u.value]:[];k.value.forEach(re=>{const le=re.filepath||re.file_path;U.some(ue=>(typeof ue=="string"?ue:(ue==null?void 0:ue.filepath)||(ue==null?void 0:ue.file_path))===le)||(U.push(le),Y.push(re))}),o&&(o.value=U),u.value=Y,s("cms.change",U),k.value=[]}}else if(x.value){const U=x.value.filepath||x.value.file_path;o&&(o.value=U),u.value=x.value,s("cms.change",U),x.value=null}Re()},Re=()=>{h.value=!1},Ze=U=>{y.value=U,w.value=[...w.value,U],x.value=null,c.value&&(k.value=[]),xt()},At=()=>{w.value.length>1&&(w.value.pop(),y.value=w.value[w.value.length-1],x.value=null,c.value&&(k.value=[]),xt())},xt=async()=>{try{const U=y.value.join("/"),re=await(await fetch(`/api/cms-media?subdir=${U}${M.value?"&search="+M.value:""}`,{method:"GET"})).json();re.data?(b.value=re.data.map(le=>({...le,id:le.type==="dir"?`dir-${le.name}`:le.id,preview:`/file/resize?filepath=${le.filepath}&h=137&quality=75`})),Ne(q.value)):b.value=[]}catch(U){console.error("Fetch error:",U),b.value=[]}},Nt=async(U,Y)=>{try{const re=typeof U=="string"?U:R(U);if(await fetch(`/file/delete${re}`),c.value){const le=Array.isArray(o.value)?[...o.value]:[],ue=Array.isArray(u.value)?[...u.value]:[];if(Y!==void 0&&Y>=0)le.splice(Y,1),ue.splice(Y,1);else{const Te=le.findIndex(C=>(typeof C=="string"?C:(C==null?void 0:C.filepath)||(C==null?void 0:C.file_path))===re);Te>=0&&(le.splice(Te,1),ue.splice(Te,1))}o&&(o.value=le.length>0?le:null),u.value=ue.length>0?ue:null,s("cms.change",le.length>0?le:null)}else o&&(o.value=null),u.value=null,s("cms.change",null);return!0}catch(re){return console.error(re),!1}},jt=async U=>{try{const Y=await fetch(`/file/download/files/uploads${U}`),re=await Y.arrayBuffer(),le=Y.headers["content-type"],ue=new TextDecoder("utf-8").decode(re),Te=new Blob([ue],{type:le}),C=document.createElement("cms.a");C.setAttribute("download",U),C.href=window.URL.createObjectURL(Te),C.click()}catch(Y){console.error(Y.message)}},ot=async U=>{if(!U.target.files||U.target.files.length===0)return;const Y=Array.from(U.target.files);console.log("Uploading files:",Y),N.value=!0;try{const re=[];for(const le of Y){const ue=new FormData;ue.append("file",le);const Te=await fetch("/file/upload/uploads?id=1&form=form&table=table",{method:"POST",body:ue});if(!Te.ok)throw new Error(`Upload failed: ${Te.status}`);const C=await Te.json();console.log("Upload result:",C);const v=C.result,H={file_id:v.file_id,file_name:v.file_name,file_path:v.file_path,filepath:v.file_path,format:v.format,size:v.size,entity_id:v.entity_id,dir:v.dir,native_file_name:v.native_file_name,preview:`/file/resize?filepath=${v.file_path}&h=137&quality=75`};re.push(H)}if(c.value){const le=Array.isArray(o.value)?[...o.value]:o.value?[o.value]:[],ue=Array.isArray(u.value)?[...u.value]:u.value?[u.value]:[];re.forEach(Te=>{le.push(Te.file_path),ue.push(Te)}),o&&(o.value=le),u.value=ue,s("cms.change",le)}else{const le=re[0];o&&(o.value=le.file_path),u.value=le,s("cms.change",le.file_path)}p.value=!1}catch(re){console.error("Upload error:",re),alert("cms.Помилка завантаження файлу: "+re.message)}finally{N.value=!1}U.target.value=""};e.watch(h,U=>{U&&xt()}),e.watch(y,U=>{U.length>0?a.push({query:{path:U.join("/")}}):a.push({query:{path:void 0}})});let ct;return e.watch(M,U=>{clearTimeout(ct),ct=setTimeout(()=>{Xe()},500)}),e.watch(o,U=>{var Y,re,le,ue;if(U&&typeof U=="object"){const Te=((Y=x.value)==null?void 0:Y.filepath)||((re=x.value)==null?void 0:re.file_path);U.filepath!==Te&&U.file_path!==Te&&(x.value=null)}else if(U&&typeof U=="string"){const Te=((le=x.value)==null?void 0:le.filepath)||((ue=x.value)==null?void 0:ue.file_path);U!==Te&&(x.value=null)}}),e.onMounted(()=>{var Y,re;y.value=((re=(Y=n.query)==null?void 0:Y.path)==null?void 0:re.split("cms./"))||[],w.value=[[]],o.value||(x.value=null);const U=le=>{var ue;p.value&&!((ue=V.value)!=null&&ue.contains(le.target))&&(p.value=!1),D.value&&P.value&&!P.value.contains(le.target)&&(D.value=!1)};document.addEventListener("click",U)}),(U,Y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e.mergeProps(U.$attrs,{class:"flex gap-4 flex-wrap"}),[c.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(m.value,(re,le)=>(e.openBlock(),e.createElementBlock("div",{key:le,class:"relative group"},[e.createElementVNode("img",{src:F(re),alt:"Selected File",class:"w-32 h-32 object-cover rounded-lg"},null,8,yB),e.createElementVNode("div",bB,[e.createElementVNode("button",{type:"button",onClick:ue=>Nt(re,le),class:"p-2 rounded-full bg-red-500 text-white hover:bg-red-600 transition-colors"},[e.createVNode(e.unref(Ht),{class:"w-4 h-4"})],8,kB),e.createElementVNode("button",{type:"button",onClick:ue=>jt(R(re)),class:"p-2 rounded-full bg-blue-500 text-white hover:bg-blue-600 transition-colors"},[e.createVNode(e.unref(gn),{class:"w-4 h-4"})],8,xB)]),e.createElementVNode("div",{class:"absolute bottom-full left-0 mb-2 px-3 py-1.5 bg-gray-900 text-white text-xs rounded-lg opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-10 max-w-[200px] truncate",title:I(re)},[e.createTextVNode(e.toDisplayString(I(re))+" ",1),Y[12]||(Y[12]=e.createElementVNode("div",{class:"absolute top-full left-4 border-4 border-transparent border-t-gray-900"},null,-1))],8,wB)]))),128)):d.value?(e.openBlock(),e.createElementBlock("div",_B,[e.createElementVNode("img",{src:d.value.preview||d.value,alt:"Selected File",class:"w-32 h-32 object-cover rounded-lg"},null,8,EB),e.createElementVNode("div",CB,[e.createElementVNode("button",{type:"button",onClick:Y[0]||(Y[0]=re=>{var le,ue;return Nt(((le=d.value)==null?void 0:le.filepath)||((ue=d.value)==null?void 0:ue.file_path)||d.value)}),class:"p-2 rounded-full bg-red-500 text-white hover:bg-red-600 transition-colors"},[e.createVNode(e.unref(Ht),{class:"w-4 h-4"})]),e.createElementVNode("button",{type:"button",onClick:Y[1]||(Y[1]=re=>{var le,ue;return jt(((le=d.value)==null?void 0:le.filepath)||((ue=d.value)==null?void 0:ue.file_path)||d.value)}),class:"p-2 rounded-full bg-blue-500 text-white hover:bg-blue-600 transition-colors"},[e.createVNode(e.unref(gn),{class:"w-4 h-4"})])]),e.createElementVNode("div",{class:"absolute bottom-full left-0 mb-2 px-3 py-1.5 bg-gray-900 text-white text-xs rounded-lg opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-10 max-w-[200px] truncate",title:f.value},[e.createTextVNode(e.toDisplayString(f.value)+" ",1),Y[13]||(Y[13]=e.createElementVNode("div",{class:"absolute top-full left-4 border-4 border-transparent border-t-gray-900"},null,-1))],8,VB)])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"triggerButton",ref:V,class:e.normalizeClass(["relative w-32 h-32 flex items-center justify-center border border-dotted border-gray-300 rounded-lg hover:border-blue-500 hover:bg-blue-500/10 hover:cursor-pointer transition-all",{"border-blue-500 bg-blue-500/10":p.value,"opacity-50 cursor-not-allowed":N.value}]),onClick:z},[N.value?(e.openBlock(),e.createBlock(e.unref(bn),{key:0,class:"w-4 h-4 animate-spin text-blue-500"})):(e.openBlock(),e.createBlock(e.unref(zt),{key:1,class:"w-4 h-4"})),N.value?(e.openBlock(),e.createElementBlock("div",NB,[e.createElementVNode("div",vB,[e.createVNode(e.unref(bn),{class:"w-6 h-6 animate-spin text-blue-500"}),e.createElementVNode("span",BB,e.toDisplayString(U.$t("cms.media.uploading")),1)])])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[p.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed bg-white z-50 border border-gray-200 rounded-lg shadow-lg flex flex-col items-center justify-center",style:e.normalizeStyle($.value)},[e.createElementVNode("div",{class:e.normalizeClass(["relative overflow-hidden flex justify-start items-center w-full gap-2 p-4 hover:bg-blue-50 text-blue-700 border hover:border-blue-200 dark:bg-slate-700 dark:text-slate-100 hover:cursor-pointer",{"opacity-50 cursor-not-allowed":N.value}]),onClick:Y[3]||(Y[3]=re=>!N.value&&A())},[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:_,class:"absolute justify-center bottom-0 left-0 w-full opacity-0",onChange:ot,onClick:Y[2]||(Y[2]=e.withModifiers(()=>{},["stop"])),multiple:c.value,disabled:N.value},null,40,SB),N.value?(e.openBlock(),e.createBlock(e.unref(bn),{key:0,class:"w-4 h-4 animate-spin"})):(e.openBlock(),e.createBlock(e.unref(gn),{key:1})),e.createElementVNode("span",AB,e.toDisplayString(N.value?U.$t("cms.media.uploading"):U.$t("cms.media.upload")),1)],2),e.createElementVNode("div",{onClick:Y[4]||(Y[4]=re=>h.value=!0),class:"flex justify-start items-center w-full gap-2 p-4 hover:bg-blue-50 text-blue-700 border hover:border-blue-200 dark:bg-slate-700 dark:text-slate-100 hover:cursor-pointer"},[e.createVNode(e.unref(Vl)),e.createElementVNode("span",DB,e.toDisplayString(U.$t("cms.media.selectFromMedia")),1)])],4)):e.createCommentVNode("",!0)]))],2)],16),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[h.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",onClick:Re},[e.createElementVNode("div",{class:"bg-white rounded-lg shadow-xl max-w-4xl w-full mx-4 max-h-[90vh] flex flex-col",onClick:Y[11]||(Y[11]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",MB,[e.createElementVNode("h3",TB,e.toDisplayString(U.$t("cms.media.selectFiles")),1),e.createElementVNode("button",{onClick:Re,class:"text-gray-400 hover:text-gray-600"},[...Y[14]||(Y[14]=[e.createElementVNode("svg",{class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])]),e.createElementVNode("div",LB,[e.createVNode(gB,{"current-path":y.value,onNavigate:Ze,onNavigateBack:At},null,8,["current-path"])]),e.createElementVNode("div",$B,[e.createElementVNode("div",FB,[e.createElementVNode("div",IB,[e.createElementVNode("div",OB,[e.createVNode(e.unref(wn),{class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-slate-400 dark:text-slate-500"}),e.withDirectives(e.createElementVNode("input",{type:"text",placeholder:U.$t("cms.media.search"),class:"w-full pl-10 pr-4 py-2 text-sm border border-slate-200 dark:border-slate-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-slate-700 text-slate-700 dark:text-slate-200 placeholder-slate-400 dark:placeholder-slate-500","onUpdate:modelValue":Y[5]||(Y[5]=re=>M.value=re)},null,8,PB),[[e.vModelText,M.value]])]),e.createElementVNode("div",RB,[e.createElementVNode("span",UB,e.toDisplayString(U.$t("cms.media.sortBy.title")+": "),1),e.createElementVNode("button",{ref_key:"sortByButton",ref:P,class:"relative z-[1000] inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border shadow-sm h-8 rounded-md px-3 text-xs bg-white border-slate-300 text-slate-700 disabled:pointer-events-none disabled:opacity-50 hover:text-accent-foreground hover:bg-slate-50 dark:bg-slate-700 dark:border-slate-600 dark:text-slate-300 dark:hover:bg-slate-600",onClick:Y[8]||(Y[8]=re=>D.value=!D.value)},[e.createVNode(e.unref(Xa),{class:"w-4 h-4"}),e.createElementVNode("span",jB,e.toDisplayString(e.unref(Q).get(q.value)),1),D.value?(e.openBlock(),e.createElementBlock("div",zB,[e.createElementVNode("span",{class:"text-left text-xs font-bold w-full p-2 hover:bg-slate-100 dark:hover:bg-slate-600 border-b border-slate-200 dark:border-slate-600 cursor-pointer",onClick:Y[6]||(Y[6]=e.withModifiers(re=>Ne("name"),["stop"]))},e.toDisplayString(U.$t("cms.media.sortBy.name")),1),e.createElementVNode("span",{class:"text-left text-xs font-bold w-full p-2 hover:bg-slate-100 dark:hover:bg-slate-600 cursor-pointer",onClick:Y[7]||(Y[7]=e.withModifiers(re=>Ne("filesize"),["stop"]))},e.toDisplayString(U.$t("cms.media.sortBy.filesize")),1)])):e.createCommentVNode("",!0)],512)])]),e.createElementVNode("div",HB,[e.createElementVNode("button",{class:e.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 h-8 px-3 text-xs rounded-md",{"shadow bg-blue-600 hover:bg-blue-700 text-white":g.value==="grid","border shadow-sm hover:text-accent-foreground bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-600":g.value==="list"}]),onClick:Y[9]||(Y[9]=re=>g.value="grid")},[e.createVNode(e.unref(Uc),{class:"w-4 h-4"})],2),e.createElementVNode("button",{class:e.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 h-8 px-3 text-xs rounded-md",{"shadow bg-blue-600 hover:bg-blue-700 text-white":g.value==="list","border shadow-sm hover:text-accent-foreground bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-600":g.value==="grid"}]),onClick:Y[10]||(Y[10]=re=>g.value="list")},[e.createVNode(e.unref(Nl),{class:"w-4 h-4"})],2)])])]),e.createElementVNode("div",qB,[g.value==="grid"?(e.openBlock(),e.createBlock($v,{key:0,files:b.value,"selected-file":c.value?null:x.value,"selected-files":c.value?k.value:[],onFileClick:pe},null,8,["files","selected-file","selected-files"])):(e.openBlock(),e.createBlock(cB,{key:1,files:b.value,"selected-file":c.value?null:x.value,"selected-files":c.value?k.value:[],onFileClick:pe},null,8,["files","selected-file","selected-files"]))]),e.createElementVNode("div",KB,[c.value&&k.value.length>0?(e.openBlock(),e.createElementBlock("div",GB,e.toDisplayString(U.$t("cms.media.selectedFiles",{count:k.value.length})),1)):(e.openBlock(),e.createElementBlock("div",WB)),e.createElementVNode("button",{onClick:Jt,disabled:c.value?k.value.length===0:!x.value,class:"flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium disabled:pointer-events-none disabled:opacity-50 h-9 px-4 py-2 ml-auto bg-blue-600 hover:bg-blue-700 text-white shadow-md hover:shadow-lg transition-all duration-200 transform hover:scale-105"},[e.createVNode(e.unref(zt),{class:"w-4 h-4 mr-2"}),e.createTextVNode(" "+e.toDisplayString(U.$t("cms.common.actions.add")),1)],8,YB)])])])):e.createCommentVNode("",!0)]))],64))}},XB={};function ZB(r,t){const l=e.resolveComponent("vs-richtext-md",!0);return e.openBlock(),e.createBlock(l,{class:"w-full h-[300px]"})}const Ui=Wt(XB,[["render",ZB]]),QB={props:{min:{type:Number},step:{type:Number,default:()=>1},max:{type:Number,default:()=>1/0},modelValue:{type:Number,default:()=>null},label:{type:String,default:()=>""},placeholder:{type:String,default:()=>"0"},disabled:{type:Boolean,default:()=>!1}},data(){return{id:`input-number-${Math.floor(Math.random()*1e3)}`,inputValue:this.modelValue}},watch:{modelValue(r){this.inputValue=r},inputValue(r){this.$emit("update:modelValue",r)}},methods:{validateInput(r){(r.key==="+"||r.key===","||r.key==="."||r.key==="-"&&this.inputValue&&this.inputValue.toString().length>0)&&r.preventDefault()},handleBlur(){let r=parseFloat(this.inputValue);this.$emit("blur"),isNaN(r)?r=this.min:r>this.max?r=this.max:r<this.min&&(r=this.min),this.inputValue=r,this.$emit("update:modelValue",this.inputValue)}}},JB={class:"p-0"},e4=["step","min","max","id","placeholder","disabled"];function t4(r,t,l,n,a,o){return e.openBlock(),e.createElementBlock("div",JB,[e.renderSlot(r.$slots,"label",e.normalizeProps(e.guardReactiveProps({id:a.id}))),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":t[0]||(t[0]=s=>a.inputValue=s),type:"number",onKeydown:t[1]||(t[1]=(...s)=>o.validateInput&&o.validateInput(...s)),onBlur:t[2]||(t[2]=(...s)=>o.handleBlur&&o.handleBlur(...s)),step:l.step,min:l.min,max:l.max,id:a.id,"aria-describedby":"helper-text-explanation",class:e.normalizeClass(["vs-number__input py-2 px-3 block w-full h-[38px] border border-solid border-stone-200 rounded-lg text-sm text-stone-800 placeholder:text-stone-500 focus:z-10 focus:border-1 focus:outline-none focus:border-blue-600 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200 dark:placeholder:text-neutral-500 dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-neutral-600",{"cursor-not-allowed":l.disabled}]),placeholder:l.placeholder,disabled:l.disabled},null,42,e4),[[e.vModelText,a.inputValue]])])}const ji=Wt(QB,[["render",t4]]),zi={__name:"vs-form-reletion-link",props:e.mergeModels({relation:{type:String,required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(r){const t=e.useModel(r,"modelValue"),l=r,n=e.ref([]),a=async()=>{const s=await(await fetch(`/api/cms-suggest/${l.relation}`)).json();n.value=s==null?void 0:s.data};return e.onMounted(a),(o,s)=>{var i;return(i=n.value)!=null&&i.length?(e.openBlock(),e.createBlock(e.unref(ta),{key:0,mode:"combo",modelValue:t.value,"onUpdate:modelValue":s[0]||(s[0]=c=>t.value=c),options:n.value},null,8,["modelValue","options"])):e.createCommentVNode("",!0)}}},r4={monaco:zE,edit:fV,preview:{__name:"vs-builder-preview",props:{data:{},dataModifiers:{},form:{},formModifiers:{}},emits:["update:data","update:form"],setup(r){De["vs-input-custom-datatable"]=Mi,De["vs-input-reference"]=La,De["vs-input-texteditor"]=Ta,De["vs-input-mediaselect"]=Pr,De["vs-input-file"]=Pr,De["vs-input-image"]=Pr,De["vs-input-richtext-md"]=Ui,De["vs-input-integer"]=ji,De["vs-input-relation-link"]=zi;const t=e.ref({}),l=e.useModel(r,"data"),n=e.useModel(r,"form"),a=e.computed(()=>{var o,s;return((s=(o=l.value)==null?void 0:o.columns)==null?void 0:s.map(Ma))||[]});return(o,s)=>{var i;return e.openBlock(),e.createElementBlock("div",{ref_key:"form",ref:n},[((i=a.value)==null?void 0:i.length)>0?(e.openBlock(),e.createBlock(e.unref(He),{key:0,modelValue:t.value,"onUpdate:modelValue":s[0]||(s[0]=c=>t.value=c),schema:a.value},null,8,["modelValue","schema"])):e.createCommentVNode("",!0)],512)}}}},l4={class:"max-w-6xl mx-auto"},n4={class:"flex items-center justify-between mb-6"},a4={class:"mb-2 text-2xl font-semibold text-gray-900"},o4={class:"lowercase"},s4={class:"text-gray-600"},i4={class:"flex items-center gap-2"},c4={class:"w-full"},d4={class:"flex items-center w-full h-10 max-w-md grid-cols-3 p-1 mb-6 bg-white border border-gray-200 rounded-md text-muted-foreground"},u4=["onClick"],m4={key:0,class:"container mx-auto bg-white rounded-md py-4 px-2 bg-opacity-50"},p4={__name:"EditCollectionPage",setup(r){const{t}=Be(),l=e.inject("cms.fetchContentTypes"),n=e.ref("edit"),a=e.ref({yaml:"",data:{columns:[],type:"collection"}}),o=e.ref({}),s=e.ref(""),i=qe.useRoute(),c=qe.useRouter(),u=e.ref(!1),d=e.computed(()=>[{name:t("cms.builder.edit"),id:"edit"},{name:t("cms.builder.preview"),id:"preview"}]),m=async()=>{var p;try{const g=await(await fetch(`/api/cms-type/${i.params.id}`)).json(),y={...g,columns:Array.isArray(g.columns)?g.columns:(p=Object.entries((g==null?void 0:g.columns)||{}))==null?void 0:p.map(([b,w])=>({...w,name:b}))};a.value={...a.value,data:y},s.value=y.title||y.name}catch(h){console.error(h)}finally{u.value=!0}},f=async()=>{var p,h;try{if(await o.value.validate()){se({type:"warning",title:t("cms.common.actions.warning"),message:t("cms.builder.editFieldFailed")});return}const y=await fetch(`/api/cms-type/${i.params.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n.value==="monaco"?(p=a.value)==null?void 0:p.yaml:(h=a.value)==null?void 0:h.data)});c.push("/settings/collections"),l(),se({type:"success",title:t("cms.common.actions.success"),message:t("cms.collections.collectionCreated")})}catch(g){console.error(g),se({type:"error",title:t("cms.common.actions.error"),message:t("cms.collections.collectionCreationFailed")})}};return e.onMounted(()=>{m()}),(p,h)=>{const g=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",l4,[e.createElementVNode("div",n4,[e.createElementVNode("div",null,[e.createElementVNode("h1",a4,[e.createTextVNode(e.toDisplayString(p.$t("cms.builder.editCollection"))+" ",1),e.createElementVNode("span",o4,e.toDisplayString(s.value),1)]),e.createElementVNode("p",s4,e.toDisplayString(p.$t("cms.builder.editContentForYourSite")),1)]),e.createElementVNode("div",i4,[e.createVNode(g,{to:"/settings/collections",class:"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border bg-background hover:text-accent-foreground h-10 px-4 py-2 border-gray-300 text-gray-700 hover:bg-gray-50"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.$t("cms.common.actions.back")),1)]),_:1}),e.createElementVNode("button",{onClick:f,class:"inline-flex items-center justify-center gap-2 whitespace-nowrap text-white rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 text-primary-foreground h-10 px-4 py-2 bg-blue-600 hover:bg-blue-700"},e.toDisplayString(p.$t("cms.common.actions.save")),1)])]),e.createElementVNode("div",c4,[e.createElementVNode("div",d4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,y=>(e.openBlock(),e.createElementBlock("button",{key:y.id,onClick:b=>n.value=y.id,class:e.normalizeClass(["inline-flex flex-1 items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm data-[state=active]:bg-blue-50 data-[state=active]:text-blue-700 data-[state=active]:border-blue-200",y.id===n.value?"bg-blue-50 text-blue-700 border-blue-200":""])},e.toDisplayString(y.name),11,u4))),128))])]),u.value?(e.openBlock(),e.createElementBlock("div",m4,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(r4)[n.value]),{yaml:a.value.yaml,"onUpdate:yaml":h[0]||(h[0]=y=>a.value.yaml=y),data:a.value.data,"onUpdate:data":h[1]||(h[1]=y=>a.value.data=y),form:o.value,"onUpdate:form":h[2]||(h[2]=y=>o.value=y)},null,40,["yaml","data","form"]))])):e.createCommentVNode("",!0)])}}},f4="menu",h4=(r,t)=>{const l=r==null?void 0:r.trim();return l?l===f4?t?t==="create"?{type:"createMenu",collection:l}:{type:"editMenu",collection:l,id:t}:{type:"menu",collection:l}:t?t==="create"?{type:"createArticle",collection:l}:{type:"editArticle",collection:l,id:t}:{type:"articles",collection:l}:{type:"collections"}},g4=[{key:"title",label:"common.title",localization:!0,type:"text"},{key:"description",label:"common.description",localization:!0,type:"text"},{key:"keywords",label:"common.keywords",localization:!0,type:"text"},{key:"meta",label:"common.meta",type:"key-value",ignore:["title","description","keywords"]}],y4={__name:"VsFormTags",props:{modelValue:{default:()=>[]},modelModifiers:{}},emits:["update:modelValue"],setup(r,{expose:t}){const{t:l}=Be(),n=e.useModel(r,"modelValue"),a=e.ref({}),o=e.ref(!1);e.provide("metaParentValue",n);const s=m=>Array.isArray(m)?m.map(f=>typeof f=="object"&&f!==null&&f.id?f.id:f):[],i=async m=>{if(!Array.isArray(m)||m.length===0)return[];try{const p=await(await fetch("/api/tags")).json(),h=(p==null?void 0:p.rows)||[];return m.map(g=>{const y=h.find(b=>b.tag_id===g);return y?{id:y.tag_id,text:y.value,color:y.color}:{id:g,text:"",color:"#ababab"}})}catch(f){return console.error("Error fetching tags:",f),m.map(p=>({id:p,text:"",color:"#ababab"}))}};e.onMounted(async()=>{await e.nextTick(),await e.nextTick(),setTimeout(()=>{var m;if(Array.isArray((m=n.value)==null?void 0:m.tag_list)){const f=s(n.value.tag_list);JSON.stringify(f)!==JSON.stringify(n.value.tag_list)&&(n.value.tag_list=f)}},100)}),e.watch(()=>n.value.tag_list,m=>{if(Array.isArray(m)&&!o.value){const f=s(m);JSON.stringify(f)!==JSON.stringify(m)&&(n.value.tag_list=f)}},{deep:!0}),e.watch(()=>n.value,m=>{if(m&&Array.isArray(m.tag_list)&&!o.value){const f=s(m.tag_list);JSON.stringify(f)!==JSON.stringify(m.tag_list)&&(m.tag_list=f)}},{deep:!0,immediate:!0}),e.watch(()=>{var m;return(m=n.value)==null?void 0:m.tag_list},m=>{Array.isArray(m)&&a.value&&e.nextTick(()=>{a.value&&a.value.setValue&&a.value.setValue("tag_list",m)})},{deep:!0});const c=async m=>{if(m.tag_list&&(m.tag_list=s(m.tag_list),n.value.tag_list=m.tag_list),await a.value.validate()){se({type:"warning",title:l("cms.common.actions.warning"),message:l("cms.builder.editFieldFailed")});return}};t({restoreTagsBeforeSubmit:async()=>{var m;if(o.value=!0,Array.isArray((m=n.value)==null?void 0:m.tag_list)){console.log("Before restore:",n.value.tag_list);const f=await i(n.value.tag_list);console.log("After restore:",f),n.value.tag_list=f}setTimeout(()=>{o.value=!1},2e3)}});const d=e.computed(()=>{var m;return[{key:"tag_list",type:"select",multiple:!0,searchable:!1,placeholder:l("cms.builder.tags"),data:"tag_id",value:((m=n.value)==null?void 0:m.tag_list)||[]}]});return(m,f)=>n.value?(e.openBlock(),e.createBlock(e.unref(He),{key:0,schema:d.value,modelValue:n.value,"onUpdate:modelValue":[f[0]||(f[0]=p=>n.value=p),c]},null,8,["schema","modelValue"])):e.createCommentVNode("",!0)}},b4={class:"flex justify-end mb-4"},k4=["href"],x4=["src"],w4=["src"],_4={key:2,class:"w-full h-[80vh] flex items-center justify-center text-gray-500"},E4={__name:"VsPreview",props:{preview_path:{type:String,default:""},slug:{type:String,default:""}},setup(r){const t=e.ref(""),l=e.ref(""),n=async()=>{var o,s;try{const c=await(await fetch("/api/settings")).json();t.value=((s=(o=c==null?void 0:c.settings)==null?void 0:o.site_info)==null?void 0:s.previewUrl)||"http://ip.local.softpro.ua"}catch(i){console.error("Failed to fetch settings:",i),t.value="http://ip.local.softpro.ua"}},a=async()=>{var o;try{const i=await(await fetch("/user")).json();l.value=(o=i==null?void 0:i.user)==null?void 0:o.draftKey}catch(s){console.error("Failed to fetch user:",s)}};return e.onMounted(()=>{n(),a()}),(o,s)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",b4,[e.createElementVNode("a",{href:`${t.value}/uk/${r.preview_path}${r.slug}${l.value?`?draftKey=${l.value}`:""}`,target:"_blank",class:"inline-flex items-center gap-2 px-3 py-1.5 text-black-600 bg-white border border-blue-200 rounded hover:border-blue-300 hover:bg-blue-50 transition-colors duration-200 font-normal cursor-pointer"},[s[0]||(s[0]=e.createTextVNode(" Переглянути на сайті ",-1)),e.createVNode(e.unref(Pc),{class:"w-4 h-4"})],8,k4)]),t.value&&r.preview_path?(e.openBlock(),e.createElementBlock("iframe",{key:0,src:`${t.value}/uk/${r.preview_path}${r.slug}?hideHeader=true&hideFooter=true`,class:"w-full h-[80vh]"},null,8,x4)):t.value?(e.openBlock(),e.createElementBlock("iframe",{key:1,src:`${t.value}/uk/${r.slug}?hideHeader=true&hideFooter=true`,class:"w-full h-[80vh]"},null,8,w4)):(e.openBlock(),e.createElementBlock("div",_4," Loading preview... "))]))}},C4={class:"space-y-6 max-w-6xl mx-auto relative bg-white"},V4={class:"p-4 sticky top-[-24px] z-10 bg-white dark:bg-slate-800"},N4={class:"flex items-center justify-between"},v4={class:"flex items-center gap-4"},B4={class:"text-2xl font-semibold text-gray-900 dark:text-white"},S4=["href","title"],A4={class:"flex items-center space-x-3"},D4={class:"w-full mt-6 flex items-center justify-between"},M4={class:"flex items-center w-full h-10 max-w-md grid-cols-3 p-1 bg-white border border-gray-200 rounded-md text-muted-foreground"},T4=["onClick"],L4={class:"flex items-center gap-2"},$4={for:"is_pin",class:"text-sm font-medium text-gray-700 dark:text-gray-300 cursor-pointer"},F4={class:"relative"},I4={key:0,class:"w-3 h-3 text-white",fill:"currentColor",viewBox:"0 0 20 20"},O4={class:"container mx-auto bg-white rounded-md pb-4 px-5"},P4={class:"container mx-auto bg-white rounded-md pb-4 px-2"},R4={key:0,class:"container mx-auto bg-white rounded-md pb-4 px-2"},U4={class:"container mx-auto bg-white rounded-md pb-4 px-2"},Hi=e.defineComponent({__name:"contentForm",setup(r){De["vs-input-custom-datatable"]=Mi,De["vs-input-reference"]=La,De["vs-input-texteditor"]=Ta,De["vs-input-mediaselect"]=Pr,De["vs-input-file"]=Pr,De["vs-input-image"]=Pr,De["vs-input-richtext-md"]=Ui,De["vs-input-integer"]=ji,De["vs-input-relation-link"]=zi;const{t,locale:l}=Be(),n=qe.useRouter(),a=qe.useRoute(),o=e.inject("menu",e.ref([])),s=e.ref([]),i=e.ref({}),c=e.ref({}),u=e.ref({}),d=e.ref(""),m=$=>{const M=[];return $.forEach(D=>{if(M.push(D),D.localization){const q={...D,name:D.name+":en",label:D.label+" (en)"};M.push(q)}}),M},f=e.computed(()=>{var $;return($=s.value)==null?void 0:$.map(Ma)}),p=e.computed(()=>(l.value,g4.flatMap($=>{const M={...$,label:t($.label)};if($.localization){const D={...$,key:`${$.key}:en`,label:t($.label)+" (en)"};return[M,D]}return[M]}))),h=e.ref({}),g=e.ref({title:"",status:"draft"}),y=e.computed(()=>{const $=[{id:"content",name:t("cms.builder.content")},{id:"seo",name:t("cms.builder.seo")},{id:"tags",name:t("cms.builder.tags")}];return d.value&&$.push({id:"preview",name:t("cms.builder.preview")}),$}),b=e.ref("content"),w=e.computed(()=>{var M,D,q,Q;const $=((M=a.params)==null?void 0:M.collection)||((D=a.params)==null?void 0:D.id);return((Q=(q=o.value)==null?void 0:q.find(R=>R.id===$))==null?void 0:Q.title)||$}),x=e.computed(()=>{var $,M;return(($=g.value)==null?void 0:$.title)||((M=a.params)!=null&&M.id?t("cms.builder.editCollection"):t("cms.articles.createArticle"))}),k=e.computed(()=>{var q,Q,R;const $=((q=a.params)==null?void 0:q.collection)||((Q=a.params)==null?void 0:Q.id),M=(R=a.params)==null?void 0:R.id,D=[{label:w.value,route:`collections/${$}`}];return M?D.push({label:x.value,route:`collections/${$}/${M}`}):D.push({label:t("cms.articles.createArticle"),route:`collections/${$}/create`}),D}),_=$=>{$==="collections"?n.push("/collections"):n.push(`/${$}`)};e.onMounted(async()=>{var Q,R,I;const $=(Q=a.params)==null?void 0:Q.collection,M=(R=a.params)==null?void 0:R.id,D=$||M,q=$&&M?M:void 0;if(!q){if(!D)return;const A=await(await fetch(`/api/cms/${D}/`)).json();s.value=m(A.columns)}try{if(!q||!D)return;const F=await fetch(`/api/cms/${D}/${q}`);if(!F.ok)throw new Error("Failed to fetch article");const A=await F.json();if(s.value=m(A==null?void 0:A.columns),A!=null&&A.preview_path&&(d.value=A==null?void 0:A.preview_path),A.rows){let z=A.rows;Array.isArray(z)||(z=[z]),g.value=z[0],await e.nextTick(),(I=z[0])!=null&&I.meta?h.value={...z[0].meta}:h.value={title:"",description:"",keywords:"",meta:{}},console.log("Initialized seoData from rows[0]:",h.value)}else g.value=A,await e.nextTick(),A!=null&&A.meta?(h.value={title:A.meta.title||"",description:A.meta.description||"",keywords:A.meta.keywords||"",meta:{...A.meta}},delete h.value.meta.title,delete h.value.meta.description,delete h.value.meta.keywords):h.value={title:"",description:"",keywords:"",meta:{}},console.log("Initialized seoData from data:",h.value)}catch(F){console.error("Error fetching article:",F)}});const N=e.computed({get:()=>{var $;return(($=g.value)==null?void 0:$.is_pin)||!1},set:$=>{g.value&&(g.value.is_pin=$)}}),V=()=>{g.value&&(g.value.is_pin=!g.value.is_pin)};e.watch(h,$=>{console.log("seoData changed:",$)},{deep:!0});const P=async $=>{var I,F,A,z;const M=(I=a.params)==null?void 0:I.collection,D=(F=a.params)==null?void 0:F.id,q=await i.value.validate();if(q){se({title:t("cms.validation"),message:JSON.stringify(q),type:"warning"});return}(A=u.value)!=null&&A.restoreTagsBeforeSubmit&&await u.value.restoreTagsBeforeSubmit();const Q=h.value||{},R={...g.value,meta:{...Q,...Q.meta||{}}};console.log("Payload before submit:",R);try{const ee=await fetch(`/api/cms/${M}/${D||""}`,{method:D?"PUT":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(R)});if(!ee.ok){let pe;try{const Ne=await ee.json();pe=JSON.stringify(Ne,null,2)}catch{pe=await ee.text()}throw new Error(`HTTP ${ee.status}: ${pe}`)}if(!D)try{const pe=await ee.json(),Ne=pe.id||((z=pe.data)==null?void 0:z.id);Ne&&a.name==="createArticle"&&await n.push(`/collections/${M}/${Ne}`)}catch(pe){console.warn("Could not parse response to get ID:",pe)}se({title:t("cms.common.success"),message:t("cms.common.successMessage"),type:"success"})}catch(ee){console.error("Submit error:",ee),se({title:t("cms.common.error"),message:"Помилка збереження",type:"error"})}};return($,M)=>{var D,q,Q,R,I,F,A;return e.openBlock(),e.createElementBlock("div",C4,[e.createElementVNode("div",V4,[e.createVNode(Ys,{items:k.value,onNavigate:_},null,8,["items"]),e.createElementVNode("div",N4,[e.createElementVNode("div",v4,[e.createElementVNode("button",{onClick:M[0]||(M[0]=z=>e.unref(n).back()),class:"p-2 text-gray-500 rounded-full hover:text-gray-900 dark:text-gray-400 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"},[e.createVNode(e.unref(hn),{class:"w-5 h-5"})]),e.createElementVNode("h1",B4,[e.createTextVNode(e.toDisplayString($.$t("cms.builder.editCollection"))+" ",1),e.createElementVNode("span",null,'"'+e.toDisplayString(((D=g.value)==null?void 0:D.type)==="single"?g.value.title:(Q=(q=e.unref(o).value)==null?void 0:q.find(z=>z.id===(e.unref(a).params.collection||e.unref(a).params.id)))==null?void 0:Q.title)+'"',1)]),e.createElementVNode("a",{href:`https://cms.opengis.info/${e.unref(l)}/guides/content/`,target:"_blank",title:$.$t("cms.guide.content")},[e.createVNode(e.unref(er),{class:"w-5 h-5"})],8,S4)]),e.createElementVNode("div",A4,[e.createElementVNode("button",{onClick:P,type:"submit",class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 bg-blue-600 text-white shadow-md transition-all duration-200 transform hover:bg-blue-700 hover:shadow-lg hover:scale-105 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"},[e.createVNode(e.unref(xn),{class:"w-4 h-4 mr-2"}),e.createTextVNode(" "+e.toDisplayString($.$t("cms.builder.save")),1)])])]),e.createElementVNode("div",D4,[e.createElementVNode("div",M4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,z=>(e.openBlock(),e.createElementBlock("button",{key:z.id,onClick:ee=>b.value=z.id,class:e.normalizeClass(["inline-flex flex-1 items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm data-[state=active]:bg-blue-50 data-[state=active]:text-blue-700 data-[state=active]:border-blue-200",z.id===b.value?"bg-blue-50 text-blue-700 border-blue-200":""])},e.toDisplayString(z.name),11,T4))),128))]),e.createElementVNode("div",L4,[e.createElementVNode("label",$4,e.toDisplayString($.$t("cms.collections.pinPublication")),1),e.createElementVNode("div",F4,[e.withDirectives(e.createElementVNode("input",{type:"checkbox",id:"is_pin","onUpdate:modelValue":M[1]||(M[1]=z=>N.value=z),class:"sr-only"},null,512),[[e.vModelCheckbox,N.value]]),e.createElementVNode("div",{class:e.normalizeClass(["w-5 h-5 border-2 rounded transition-all duration-200 cursor-pointer flex items-center justify-center",(R=g.value)!=null&&R.is_pin?"bg-sky-600 border-sky-600":"bg-white border-gray-300 hover:border-sky-400 dark:bg-gray-700 dark:border-gray-600 dark:hover:border-sky-400"]),onClick:V},[(I=g.value)!=null&&I.is_pin?(e.openBlock(),e.createElementBlock("svg",I4,[...M[7]||(M[7]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"},null,-1)])])):e.createCommentVNode("",!0)],2)])])])]),e.withDirectives(e.createElementVNode("div",O4,[(F=s.value)!=null&&F.length?(e.openBlock(),e.createBlock(e.unref(He),{key:0,modelValue:g.value,"onUpdate:modelValue":M[2]||(M[2]=z=>g.value=z),schema:f.value,form:i.value,"onUpdate:form":M[3]||(M[3]=z=>i.value=z)},null,8,["modelValue","schema","form"])):e.createCommentVNode("",!0)],512),[[e.vShow,b.value==="content"]]),e.withDirectives(e.createElementVNode("div",P4,[e.createVNode(e.unref(He),{schema:p.value,values:h.value,"onUpdate:values":M[4]||(M[4]=z=>h.value=z),form:c.value,"onUpdate:form":M[5]||(M[5]=z=>c.value=z)},null,8,["schema","values","form"])],512),[[e.vShow,b.value==="seo"]]),b.value==="tags"?(e.openBlock(),e.createElementBlock("div",R4,[e.createVNode(y4,{ref_key:"tagsForm",ref:u,modelValue:g.value,"onUpdate:modelValue":M[6]||(M[6]=z=>g.value=z)},null,8,["modelValue"])])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("div",U4,[e.createVNode(E4,{slug:(A=g.value)==null?void 0:A.slug,preview_path:d.value},null,8,["slug","preview_path"])],512),[[e.vShow,b.value==="preview"]])])}}}),j4=e.defineAsyncComponent(()=>Promise.resolve().then(()=>nS)),z4=e.defineAsyncComponent(()=>Promise.resolve().then(()=>FA)),H4=e.defineAsyncComponent(()=>Promise.resolve().then(()=>uS)),q4={collections:Qn,articles:Xs,createArticle:Hi,editArticle:Hi,menu:j4,editMenu:z4,createMenu:H4},K4=Qn,G4=r=>q4[r]??K4,W4={key:1,class:"p-4 text-sm text-slate-600 dark:text-slate-300"},Y4=e.defineComponent({__name:"CmsContentWrapper",setup(r){const t=qe.useRoute(),l=e.getCurrentInstance();if(!l)throw new Error("CmsContentWrapper must be used within a component instance");const n=e.computed(()=>{const p=l.appContext.config.globalProperties.$route;if(!p)throw new Error("Vue Router is not registered on the app instance");return p}),a=e.computed(()=>t??n.value),o=e.computed(()=>{var p;return((p=a.value)==null?void 0:p.params)??{}}),s=e.computed(()=>{var p,h;return((p=o.value)==null?void 0:p.collection)??((h=o.value)==null?void 0:h.type)}),i=e.computed(()=>{var p;return(p=o.value)==null?void 0:p.id}),c=e.computed(()=>h4(s.value,i.value)),u=e.computed(()=>G4(c.value.type)),d=e.computed(()=>`${c.value.type}-${c.value.collection??""}-${c.value.id??""}`),m=e.computed(()=>{const{type:p,collection:h,id:g}=c.value,y={...o.value};return s.value?y.collection=s.value:delete y.collection,p==="articles"?y.id=h:p==="createArticle"?delete y.id:p==="editArticle"&&g?y.id=g:delete y.id,y}),f=new Proxy({},{get(p,h,g){const y=a.value;if(!y)return;if(h==="params")return m.value;const b=Reflect.get(y,h,g);return typeof b=="function"?b.bind(y):b},has(p,h){if(h==="params")return!0;const g=a.value;return g?Reflect.has(g,h):!1},ownKeys(){const p=a.value;return p?Reflect.ownKeys(p):["params"]},getOwnPropertyDescriptor(p,h){if(h==="params")return{configurable:!0,enumerable:!0,value:m.value};const g=a.value;if(!g)return;const y=Reflect.getOwnPropertyDescriptor(g,h);if(y)return{...y,configurable:!0}}});return e.provide(qe.routeLocationKey,f),(p,h)=>u.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.value),{key:d.value})):(e.openBlock(),e.createElementBlock("div",W4,e.toDisplayString(p.$t("cms.navigation.collections")),1))}}),X4={class:"space-y-6 max-w-7xl mx-auto"},Z4={class:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between"},Q4={class:"flex items-center gap-2"},J4={class:"text-3xl font-bold text-slate-800 dark:text-slate-100 mb-2"},eS=["href","title"],tS={class:"text-slate-600 dark:text-slate-300"},rS={class:"overflow-hidden bg-white border border-gray-200 rounded-lg shadow-sm dark:bg-gray-800 dark:border-gray-700"},lS={key:0,class:"p-4 border-b border-gray-200 sm:p-6 dark:border-gray-700"},qi=e.defineComponent({__name:"MenuPage",setup(r){const{t,locale:l}=Be(),n=qe.useRouter(),a=e.ref(""),o=e.ref([]),s=e.ref([]),i=e.ref(""),c=e.ref([{name:"name",title:t("cms.menu.form.name"),type:"text"},{name:"description",title:t("cms.menu.form.description"),type:"text"},{name:"locale",title:t("cms.menu.form.language"),type:"select",data:[{text:"uk",id:"uk"},{text:"en",id:"en"}]}]),u=async()=>{const g=await(await fetch("/api/cms-menu")).json(),y=g.rows;o.value=y;const b=(g.filters||[]).map(w=>{const{extra:x,title:k,..._}=w;return _});s.value=b},d=h=>{n.push(`/menu/${h==null?void 0:h.menu_id}`)},m=async h=>{try{await fetch(`/api/cms-menu/${h==null?void 0:h.menu_id}`,{method:"DELETE"}),await se({title:t("cms.menu.menuDeleted"),type:"success",message:t("cms.menu.menuDeleted")}),await u()}catch{se({title:t("cms.menu.menuDeleteError"),type:"error",message:t("cms.menu.menuDeleteError")})}},f=(h,g)=>{if(!g)return!0;const y=g.toLowerCase();return c.value.some(b=>{const w=h[b.name];return w&&w.toString().toLowerCase().includes(y)})},p=h=>{const g=Object.entries(h==null?void 0:h.data).filter(([,y])=>y!=null).map(([y,b])=>`${y}=${b}`).join("|");i.value=g};return e.onMounted(u),(h,g)=>{var b;const y=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",X4,[e.createElementVNode("div",Z4,[e.createElementVNode("div",null,[e.createElementVNode("div",Q4,[e.createElementVNode("h1",J4,e.toDisplayString(h.$t("cms.menu.title")),1),e.createElementVNode("a",{href:`https://cms.opengis.info/${e.unref(l)}/guides/menu/`,target:"_blank",title:h.$t("cms.guide.menu")},[e.createVNode(e.unref(er),{class:"w-5 h-5"})],8,eS)]),e.createElementVNode("p",tS,e.toDisplayString(h.$t("cms.menu.description")),1)]),e.createVNode(y,{to:"/menu/create",class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 bg-blue-600 text-white shadow-md transition-all duration-200 transform hover:bg-blue-700 hover:shadow-lg hover:scale-105"},{default:e.withCtx(()=>[e.createVNode(e.unref(zt),{class:"w-4 h-4 mr-2"}),e.createTextVNode(" "+e.toDisplayString(h.$t("cms.menu.menuAdd")),1)]),_:1})]),e.createElementVNode("div",rS,[((b=s.value)==null?void 0:b.length)>0?(e.openBlock(),e.createElementBlock("div",lS,[e.createVNode(e.unref(jl),{schema:s.value,view:"inline",onChange:p},null,8,["schema"])])):e.createCommentVNode("",!0),e.createVNode(Jn,{rows:o.value,columns:c.value,query:a.value,filterFn:f,onEdit:d,onDelete:m},null,8,["rows","columns","query"])])])}}}),nS=Object.freeze(Object.defineProperty({__proto__:null,default:qi},Symbol.toStringTag,{value:"Module"})),aS={class:"space-y-6 max-w-7xl mx-auto"},oS={class:"flex items-center justify-between"},sS={class:"flex items-center gap-4"},iS={class:"text-2xl font-semibold text-gray-900 dark:text-white"},cS={class:"flex items-center space-x-3"},dS={class:"max-w-[1000px]"},Ki=e.defineComponent({__name:"MenuAddPage",setup(r){De["vs-input-monaco-editor"]=Hl;const{t}=Be(),l=qe.useRouter(),n=qe.useRoute(),a=e.ref([{key:"name",title:t("cms.menu.form.name"),type:"text",placeholder:t("cms.menu.form.name"),required:!0,validators:["required"]},{key:"description",title:t("cms.menu.form.description"),type:"text",placeholder:t("cms.menu.form.description"),required:!0,validators:["required"]},{key:"locale",title:t("cms.menu.form.language"),type:"select",placeholder:t("cms.menu.form.language"),options:[{text:"Ukrainian",id:"uk"},{text:"English",id:"en"}],required:!0,validators:["required"]},{key:"content",title:t("cms.menu.form.content"),type:"monaco-editor",height:"500px",language:"yaml",theme:"vs-light"}]),o=e.ref({}),s=e.ref({}),i=async()=>{try{if(await s.value.validate()){se({type:"warning",title:t("cms.common.actions.warning"),message:t("cms.menu.createMenuFailed")});return}await fetch("/api/cms-menu",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o.value)}),se({title:t("cms.common.success"),type:"success",message:t("cms.common.successMessage")}),o.value={},l.push("/menu")}catch(c){console.log(c),se({title:t("cms.common.error"),type:"error",message:t("cms.common.errorMessage")})}};return(c,u)=>{var d,m;return e.openBlock(),e.createElementBlock("div",aS,[e.createElementVNode("div",oS,[e.createElementVNode("div",sS,[e.createElementVNode("button",{onClick:u[0]||(u[0]=f=>e.unref(l).back()),class:"p-2 text-gray-500 rounded-full hover:text-gray-900 dark:text-gray-400 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"},[e.createVNode(e.unref(hn),{class:"w-5 h-5"})]),e.createElementVNode("h1",iS,e.toDisplayString(c.$t((m=(d=e.unref(n))==null?void 0:d.meta)==null?void 0:m.title)),1)]),e.createElementVNode("div",cS,[e.createElementVNode("button",{onClick:i,class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 bg-blue-600 text-white shadow-md transition-all duration-200 transform hover:bg-blue-700 hover:shadow-lg hover:scale-105 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"},[e.createVNode(e.unref(xn),{class:"w-4 h-4 mr-2"}),e.createTextVNode(" "+e.toDisplayString(c.$t("cms.common.actions.save")),1)])])]),e.createElementVNode("div",dS,[e.createVNode(e.unref(He),{schema:a.value,modelValue:o.value,"onUpdate:modelValue":u[1]||(u[1]=f=>o.value=f),form:s.value,"onUpdate:form":u[2]||(u[2]=f=>s.value=f)},null,8,["schema","modelValue","form"])])])}}}),uS=Object.freeze(Object.defineProperty({__proto__:null,default:Ki},Symbol.toStringTag,{value:"Module"})),mS={},pS={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function fS(r,t){return e.openBlock(),e.createElementBlock("svg",pS,[...t[0]||(t[0]=[e.createStaticVNode('<circle cx="9" cy="12" r="1"></circle><circle cx="9" cy="5" r="1"></circle><circle cx="9" cy="19" r="1"></circle><circle cx="15" cy="12" r="1"></circle><circle cx="15" cy="5" r="1"></circle><circle cx="15" cy="19" r="1"></circle>',6)])])}const hS=Wt(mS,[["render",fS]]),gS={key:0,class:"p-3 flex items-center gap-x-3 cursor-grab bg-gray-100 border border-gray-300 rounded-lg font-medium text-sm text-gray-800 dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-200"},yS={key:0,class:"text-xs text-gray-500 dark:text-neutral-400 ml-2"},bS={key:1,class:"p-3 flex items-center gap-x-2 bg-gray-100 border border-gray-300 rounded-lg dark:bg-neutral-900 dark:border-neutral-700"},kS={class:"text-sm font-medium text-gray-800 dark:text-neutral-200 shrink-0"},xS=e.defineComponent({__name:"MenuItem",props:{title:{},value:{}},emits:["delete","update:value"],setup(r,{emit:t}){const l=r,n=t,a=e.ref(!1),o=e.ref(""),s=()=>{typeof l.value=="string"&&(o.value=l.value,a.value=!0)},i=()=>{typeof l.value=="string"&&(n("update:value",o.value),a.value=!1)},c=()=>{a.value=!1,o.value=""};return(u,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([{"space-y-1":typeof u.value!="string"},"dark:bg-transparent"])},[a.value?(e.openBlock(),e.createElementBlock("div",bS,[e.createElementVNode("span",kS,e.toDisplayString(u.title)+":",1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":d[1]||(d[1]=m=>o.value=m),onKeyup:[e.withKeys(i,["enter"]),e.withKeys(c,["esc"])],onBlur:i,class:"flex-1 px-2 py-1 text-sm border border-gray-300 rounded dark:bg-neutral-800 dark:border-neutral-600 dark:text-neutral-200 focus:outline-none focus:ring-2 focus:ring-blue-500",type:"text",placeholder:"/link"},null,544),[[e.vModelText,o.value]]),e.createElementVNode("button",{onClick:e.withModifiers(i,["stop"]),class:"shrink-0 p-1 text-green-600 dark:text-green-400 hover:bg-green-50 dark:hover:bg-green-900/20 rounded",title:"Save"},[e.createVNode(e.unref(Fc),{class:"size-4"})]),e.createElementVNode("button",{onClick:e.withModifiers(c,["stop"]),class:"shrink-0 p-1 text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20 rounded",title:"Cancel"},[e.createVNode(e.unref(qc),{class:"size-4"})])])):(e.openBlock(),e.createElementBlock("div",gS,[e.createTextVNode(e.toDisplayString(u.title)+" ",1),typeof u.value=="string"?(e.openBlock(),e.createElementBlock("span",yS,e.toDisplayString(u.value),1)):e.createCommentVNode("",!0),typeof u.value=="string"?(e.openBlock(),e.createBlock(e.unref(kn),{key:1,class:"shrink-0 size-4 ml-auto text-gray-500 dark:text-neutral-500 cursor-pointer hover:text-blue-600 dark:hover:text-blue-400",onClick:e.withModifiers(s,["stop"])})):e.createCommentVNode("",!0),e.createVNode(e.unref(Ht),{class:"shrink-0 size-4 text-gray-500 dark:text-neutral-500 cursor-pointer hover:text-red-600 dark:hover:text-red-400",onClick:d[0]||(d[0]=e.withModifiers(m=>n("delete"),["stop"]))}),e.createVNode(hS,{class:"shrink-0 size-4 cursor-pointer text-gray-500 dark:text-neutral-500"})]))],2))}}),wS={class:"space-y-1"},_S=e.defineComponent({__name:"MenuList",props:{list:{type:Array,default:()=>[]},inside:{type:Boolean,default:!1}},emits:["update:list","delete:item"],setup(r,{emit:t}){const{t:l}=Be(),n=r,a=t,o=e.ref([]);e.watch(()=>n.list,d=>{o.value=d?[...d]:[]},{immediate:!0,deep:!0});const s=()=>{a("update:list",o.value)},i=d=>{Jr({title:l("cms.builder.deleteTitle"),message:l("cms.builder.deleteObject"),type:"error",onConfirm:()=>{a("update:list",o.value),a("delete:item",d)}})},c=(d,m)=>{d.value=m,e.nextTick(()=>{o.value=[...o.value],a("update:list",o.value)})},u=(d,m)=>{d.children=m,e.nextTick(()=>{o.value=[...o.value],a("update:list",o.value)})};return(d,m)=>{const f=e.resolveComponent("MenuList",!0);return e.openBlock(),e.createBlock(e.unref(Da),{tag:"ul",list:o.value,group:{name:"nested",pull:!0,put:!0},"item-key":"id",class:e.normalizeClass(["nested-sortable space-y-1",{"ps-5 dark:bg-transparent":r.inside}]),onChange:s,onEnd:s},{item:e.withCtx(({element:p})=>[e.createElementVNode("div",wS,[e.createVNode(xS,{title:p.title,value:p.value,onDelete:h=>i(p),"onUpdate:value":h=>c(p,h)},null,8,["title","value","onDelete","onUpdate:value"]),Array.isArray(p.children)?(e.openBlock(),e.createBlock(f,{key:0,list:p.children,inside:!0,"onUpdate:list":h=>u(p,h),"onDelete:item":i},null,8,["list","onUpdate:list"])):e.createCommentVNode("",!0)])]),_:1},8,["list","class"])}}}),ES={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},CS=e.defineComponent({__name:"AddNewItemInTree",props:{isOpen:{type:Boolean,required:!0},isOpenModifiers:{}},emits:e.mergeModels(["addNewItem"],["update:isOpen"]),setup(r,{emit:t}){const{t:l}=Be(),n=e.useModel(r,"isOpen"),a=e.ref({}),o=t,s=e.ref({}),i={title:{type:"text",label:l("cms.menu.form.name"),required:!0,placeholder:l("cms.menu.form.name"),validators:["required"]},value:{type:"text",label:l("cms.menu.form.value"),required:!0,placeholder:l("cms.menu.form.value"),validators:["required"]}},c=async()=>{if(await a.value.validate()){se({type:"warning",title:l("cms.common.actions.warning"),message:l("cms.menu.createMenuFailed")});return}o("addNewItem",s.value),s.value={}};return(u,d)=>(e.openBlock(),e.createBlock(e.unref(Gt),{teleport:"#modal",visible:n.value,title:u.$t("cms.menu.createMenu"),template:"default",closeClickBack:!1,onClose:d[3]||(d[3]=m=>n.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("div",ES,[e.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100",onClick:d[2]||(d[2]=m=>{n.value=!1,s.value={}})},e.toDisplayString(u.$t("cms.common.actions.cancel")),1),e.createElementVNode("button",{onClick:c,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},e.toDisplayString(u.$t("cms.common.actions.save")),1)])]),default:e.withCtx(()=>[e.createVNode(e.unref(He),{form:a.value,"onUpdate:form":d[0]||(d[0]=m=>a.value=m),modelValue:s.value,"onUpdate:modelValue":d[1]||(d[1]=m=>s.value=m),schema:i},null,8,["form","modelValue"])]),_:1},8,["visible","title"]))}}),VS=e.defineComponent({__name:"MenuBody",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(r){De["vs-input-monaco-editor"]=Hl;const{t}=Be(),l=e.ref(!1),n=e.ref(null),a=e.useModel(r,"modelValue"),o=e.ref({}),s=async f=>{try{if(await o.value.validate()){se({type:"warning",title:t("cms.common.actions.warning"),message:t("cms.menu.createMenuFailed")});return}l.value=!1,f.id=Math.random().toString(36).substr(2,9),f.children=[],a.value.items.unshift(f)}catch(p){console.log(p)}},i=e.ref([{key:"name",title:t("cms.common.title"),type:"text",placeholder:t("cms.common.title"),required:!0,validators:["required"]},{key:"description",title:t("cms.common.description"),type:"text",placeholder:t("cms.common.description"),required:!0,validators:["required"]},{key:"locale",title:t("cms.menu.form.language"),type:"select",placeholder:t("cms.menu.form.language"),required:!0,options:[{text:"Ukrainian",id:"uk"},{text:"English",id:"en"}],validators:["required"]}]),c=f=>{let p=[];for(const h in f)typeof f[h]=="object"?p.push({title:h,value:"",id:Math.random().toString(36).substr(2,9),children:c(f[h])}):p.push({title:h,value:f[h],id:Math.random().toString(36).substr(2,9),children:[]});return p},u=f=>{a.value.items=f},d=f=>{m(a.value.items,f.id)};function m(f,p){for(let h=f.length-1;h>=0;h--){if(f[h].id===p)return f.splice(h,1),!0;if(f[h].children&&f[h].children.length&&m(f[h].children,p))return!0}return!1}return e.onBeforeMount(()=>{Array.isArray(a.value.items)||(a.value.items=c(a.value.items))}),(f,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(He),{schema:i.value,modelValue:a.value,"onUpdate:modelValue":p[0]||(p[0]=h=>a.value=h),form:o.value,"onUpdate:form":p[1]||(p[1]=h=>o.value=h)},null,8,["schema","modelValue","form"]),e.createElementVNode("button",{onClick:p[2]||(p[2]=h=>l.value=!0),class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium w-min ml-auto my-6 h-9 px-4 py-2 bg-blue-600 text-white shadow-md transition-all duration-200 transform hover:bg-blue-700 hover:shadow-lg hover:scale-105 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"},[e.createVNode(e.unref(zt),{class:"w-4 h-4 mr-2"}),e.createTextVNode(" "+e.toDisplayString(f.$t("cms.menu.createMenu")),1)]),e.createVNode(CS,{isOpen:l.value,"onUpdate:isOpen":p[3]||(p[3]=h=>l.value=h),form:n.value,"onUpdate:form":p[4]||(p[4]=h=>n.value=h),onAddNewItem:s},null,8,["isOpen","form"]),e.createVNode(_S,{class:"px-2",list:a.value.items,"onUpdate:list":u,"onDelete:item":d},null,8,["list"])],64))}});/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function Gi(r){return typeof r>"u"||r===null}function NS(r){return typeof r=="object"&&r!==null}function vS(r){return Array.isArray(r)?r:Gi(r)?[]:[r]}function BS(r,t){var l,n,a,o;if(t)for(o=Object.keys(t),l=0,n=o.length;l<n;l+=1)a=o[l],r[a]=t[a];return r}function SS(r,t){var l="",n;for(n=0;n<t;n+=1)l+=r;return l}function AS(r){return r===0&&Number.NEGATIVE_INFINITY===1/r}var DS=Gi,MS=NS,TS=vS,LS=SS,$S=AS,FS=BS,wr={isNothing:DS,isObject:MS,toArray:TS,repeat:LS,isNegativeZero:$S,extend:FS};function Wi(r,t){var l="",n=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(l+='in "'+r.mark.name+'" '),l+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!t&&r.mark.snippet&&(l+=`
251
251
 
252
252
  `+r.mark.snippet),n+" "+l):n}function ml(r,t){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=t,this.message=Wi(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}ml.prototype=Object.create(Error.prototype),ml.prototype.constructor=ml,ml.prototype.toString=function(t){return this.name+": "+Wi(this,t)};var Vt=ml,IS=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],OS=["scalar","sequence","mapping"];function PS(r){var t={};return r!==null&&Object.keys(r).forEach(function(l){r[l].forEach(function(n){t[String(n)]=l})}),t}function RS(r,t){if(t=t||{},Object.keys(t).forEach(function(l){if(IS.indexOf(l)===-1)throw new Vt('Unknown option "'+l+'" is met in definition of "'+r+'" YAML type.')}),this.options=t,this.tag=r,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(l){return l},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=PS(t.styleAliases||null),OS.indexOf(this.kind)===-1)throw new Vt('Unknown kind "'+this.kind+'" is specified for "'+r+'" YAML type.')}var nt=RS;function Yi(r,t){var l=[];return r[t].forEach(function(n){var a=l.length;l.forEach(function(o,s){o.tag===n.tag&&o.kind===n.kind&&o.multi===n.multi&&(a=s)}),l[a]=n}),l}function US(){var r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,l;function n(a){a.multi?(r.multi[a.kind].push(a),r.multi.fallback.push(a)):r[a.kind][a.tag]=r.fallback[a.tag]=a}for(t=0,l=arguments.length;t<l;t+=1)arguments[t].forEach(n);return r}function $a(r){return this.extend(r)}$a.prototype.extend=function(t){var l=[],n=[];if(t instanceof nt)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(l=l.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new Vt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");l.forEach(function(o){if(!(o instanceof nt))throw new Vt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new Vt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new Vt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(o){if(!(o instanceof nt))throw new Vt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create($a.prototype);return a.implicit=(this.implicit||[]).concat(l),a.explicit=(this.explicit||[]).concat(n),a.compiledImplicit=Yi(a,"implicit"),a.compiledExplicit=Yi(a,"explicit"),a.compiledTypeMap=US(a.compiledImplicit,a.compiledExplicit),a};var jS=$a,zS=new nt("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}}),HS=new nt("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}}),qS=new nt("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}}),KS=new jS({explicit:[zS,HS,qS]});function GS(r){if(r===null)return!0;var t=r.length;return t===1&&r==="~"||t===4&&(r==="null"||r==="Null"||r==="NULL")}function WS(){return null}function YS(r){return r===null}var XS=new nt("tag:yaml.org,2002:null",{kind:"scalar",resolve:GS,construct:WS,predicate:YS,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function ZS(r){if(r===null)return!1;var t=r.length;return t===4&&(r==="true"||r==="True"||r==="TRUE")||t===5&&(r==="false"||r==="False"||r==="FALSE")}function QS(r){return r==="true"||r==="True"||r==="TRUE"}function JS(r){return Object.prototype.toString.call(r)==="[object Boolean]"}var e5=new nt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:ZS,construct:QS,predicate:JS,represent:{lowercase:function(r){return r?"true":"false"},uppercase:function(r){return r?"TRUE":"FALSE"},camelcase:function(r){return r?"True":"False"}},defaultStyle:"lowercase"});function t5(r){return 48<=r&&r<=57||65<=r&&r<=70||97<=r&&r<=102}function r5(r){return 48<=r&&r<=55}function l5(r){return 48<=r&&r<=57}function n5(r){if(r===null)return!1;var t=r.length,l=0,n=!1,a;if(!t)return!1;if(a=r[l],(a==="-"||a==="+")&&(a=r[++l]),a==="0"){if(l+1===t)return!0;if(a=r[++l],a==="b"){for(l++;l<t;l++)if(a=r[l],a!=="_"){if(a!=="0"&&a!=="1")return!1;n=!0}return n&&a!=="_"}if(a==="x"){for(l++;l<t;l++)if(a=r[l],a!=="_"){if(!t5(r.charCodeAt(l)))return!1;n=!0}return n&&a!=="_"}if(a==="o"){for(l++;l<t;l++)if(a=r[l],a!=="_"){if(!r5(r.charCodeAt(l)))return!1;n=!0}return n&&a!=="_"}}if(a==="_")return!1;for(;l<t;l++)if(a=r[l],a!=="_"){if(!l5(r.charCodeAt(l)))return!1;n=!0}return!(!n||a==="_")}function a5(r){var t=r,l=1,n;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),n=t[0],(n==="-"||n==="+")&&(n==="-"&&(l=-1),t=t.slice(1),n=t[0]),t==="0")return 0;if(n==="0"){if(t[1]==="b")return l*parseInt(t.slice(2),2);if(t[1]==="x")return l*parseInt(t.slice(2),16);if(t[1]==="o")return l*parseInt(t.slice(2),8)}return l*parseInt(t,10)}function o5(r){return Object.prototype.toString.call(r)==="[object Number]"&&r%1===0&&!wr.isNegativeZero(r)}var s5=new nt("tag:yaml.org,2002:int",{kind:"scalar",resolve:n5,construct:a5,predicate:o5,represent:{binary:function(r){return r>=0?"0b"+r.toString(2):"-0b"+r.toString(2).slice(1)},octal:function(r){return r>=0?"0o"+r.toString(8):"-0o"+r.toString(8).slice(1)},decimal:function(r){return r.toString(10)},hexadecimal:function(r){return r>=0?"0x"+r.toString(16).toUpperCase():"-0x"+r.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),i5=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function c5(r){return!(r===null||!i5.test(r)||r[r.length-1]==="_")}function d5(r){var t,l;return t=r.replace(/_/g,"").toLowerCase(),l=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?l===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:l*parseFloat(t,10)}var u5=/^[-+]?[0-9]+e/;function m5(r,t){var l;if(isNaN(r))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===r)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===r)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(wr.isNegativeZero(r))return"-0.0";return l=r.toString(10),u5.test(l)?l.replace("e",".e"):l}function p5(r){return Object.prototype.toString.call(r)==="[object Number]"&&(r%1!==0||wr.isNegativeZero(r))}var f5=new nt("tag:yaml.org,2002:float",{kind:"scalar",resolve:c5,construct:d5,predicate:p5,represent:m5,defaultStyle:"lowercase"}),h5=KS.extend({implicit:[XS,e5,s5,f5]}),g5=h5,Xi=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Zi=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function y5(r){return r===null?!1:Xi.exec(r)!==null||Zi.exec(r)!==null}function b5(r){var t,l,n,a,o,s,i,c=0,u=null,d,m,f;if(t=Xi.exec(r),t===null&&(t=Zi.exec(r)),t===null)throw new Error("Date resolve error");if(l=+t[1],n=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(l,n,a));if(o=+t[4],s=+t[5],i=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(d=+t[10],m=+(t[11]||0),u=(d*60+m)*6e4,t[9]==="-"&&(u=-u)),f=new Date(Date.UTC(l,n,a,o,s,i,c)),u&&f.setTime(f.getTime()-u),f}function k5(r){return r.toISOString()}var x5=new nt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:y5,construct:b5,instanceOf:Date,represent:k5});function w5(r){return r==="<<"||r===null}var _5=new nt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:w5}),Fa=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
253
253
  \r`;function E5(r){if(r===null)return!1;var t,l,n=0,a=r.length,o=Fa;for(l=0;l<a;l++)if(t=o.indexOf(r.charAt(l)),!(t>64)){if(t<0)return!1;n+=6}return n%8===0}function C5(r){var t,l,n=r.replace(/[\r\n=]/g,""),a=n.length,o=Fa,s=0,i=[];for(t=0;t<a;t++)t%4===0&&t&&(i.push(s>>16&255),i.push(s>>8&255),i.push(s&255)),s=s<<6|o.indexOf(n.charAt(t));return l=a%4*6,l===0?(i.push(s>>16&255),i.push(s>>8&255),i.push(s&255)):l===18?(i.push(s>>10&255),i.push(s>>2&255)):l===12&&i.push(s>>4&255),new Uint8Array(i)}function V5(r){var t="",l=0,n,a,o=r.length,s=Fa;for(n=0;n<o;n++)n%3===0&&n&&(t+=s[l>>18&63],t+=s[l>>12&63],t+=s[l>>6&63],t+=s[l&63]),l=(l<<8)+r[n];return a=o%3,a===0?(t+=s[l>>18&63],t+=s[l>>12&63],t+=s[l>>6&63],t+=s[l&63]):a===2?(t+=s[l>>10&63],t+=s[l>>4&63],t+=s[l<<2&63],t+=s[64]):a===1&&(t+=s[l>>2&63],t+=s[l<<4&63],t+=s[64],t+=s[64]),t}function N5(r){return Object.prototype.toString.call(r)==="[object Uint8Array]"}var v5=new nt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:E5,construct:C5,predicate:N5,represent:V5}),B5=Object.prototype.hasOwnProperty,S5=Object.prototype.toString;function A5(r){if(r===null)return!0;var t=[],l,n,a,o,s,i=r;for(l=0,n=i.length;l<n;l+=1){if(a=i[l],s=!1,S5.call(a)!=="[object Object]")return!1;for(o in a)if(B5.call(a,o))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}function D5(r){return r!==null?r:[]}var M5=new nt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:A5,construct:D5}),T5=Object.prototype.toString;function L5(r){if(r===null)return!0;var t,l,n,a,o,s=r;for(o=new Array(s.length),t=0,l=s.length;t<l;t+=1){if(n=s[t],T5.call(n)!=="[object Object]"||(a=Object.keys(n),a.length!==1))return!1;o[t]=[a[0],n[a[0]]]}return!0}function $5(r){if(r===null)return[];var t,l,n,a,o,s=r;for(o=new Array(s.length),t=0,l=s.length;t<l;t+=1)n=s[t],a=Object.keys(n),o[t]=[a[0],n[a[0]]];return o}var F5=new nt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:L5,construct:$5}),I5=Object.prototype.hasOwnProperty;function O5(r){if(r===null)return!0;var t,l=r;for(t in l)if(I5.call(l,t)&&l[t]!==null)return!1;return!0}function P5(r){return r!==null?r:{}}var R5=new nt("tag:yaml.org,2002:set",{kind:"mapping",resolve:O5,construct:P5}),U5=g5.extend({implicit:[x5,_5],explicit:[v5,M5,F5,R5]});function Qi(r){return r===48?"\0":r===97?"\x07":r===98?"\b":r===116||r===9?" ":r===110?`
@@ -266,4 +266,4 @@ About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guid
266
266
  `+r.slice(a,o),a=o+1),s=i;return c+=`
267
267
  `,r.length-a>t&&s>a?c+=r.slice(a,s)+`
268
268
  `+r.slice(s+1):c+=r.slice(a),c.slice(1)}function bA(r){for(var t="",l=0,n,a=0;a<r.length;l>=65536?a+=2:a++)l=gl(r,a),n=at[l],!n&&hl(l)?(t+=r[a],l>=65536&&(t+=r[a+1])):t+=n||cA(l);return t}function kA(r,t,l){var n="",a=r.tag,o,s,i;for(o=0,s=l.length;o<s;o+=1)i=l[o],r.replacer&&(i=r.replacer.call(l,String(o),i)),(Qt(r,t,i,!1,!1)||typeof i>"u"&&Qt(r,t,null,!1,!1))&&(n!==""&&(n+=","+(r.condenseFlow?"":" ")),n+=r.dump);r.tag=a,r.dump="["+n+"]"}function gc(r,t,l,n){var a="",o=r.tag,s,i,c;for(s=0,i=l.length;s<i;s+=1)c=l[s],r.replacer&&(c=r.replacer.call(l,String(s),c)),(Qt(r,t+1,c,!0,!0,!1,!0)||typeof c>"u"&&Qt(r,t+1,null,!0,!0,!1,!0))&&((!n||a!=="")&&(a+=Pa(r,t)),r.dump&&pl===r.dump.charCodeAt(0)?a+="-":a+="- ",a+=r.dump);r.tag=o,r.dump=a||"[]"}function xA(r,t,l){var n="",a=r.tag,o=Object.keys(l),s,i,c,u,d;for(s=0,i=o.length;s<i;s+=1)d="",n!==""&&(d+=", "),r.condenseFlow&&(d+='"'),c=o[s],u=l[c],r.replacer&&(u=r.replacer.call(l,c,u)),Qt(r,t,c,!1,!1)&&(r.dump.length>1024&&(d+="? "),d+=r.dump+(r.condenseFlow?'"':"")+":"+(r.condenseFlow?"":" "),Qt(r,t,u,!1,!1)&&(d+=r.dump,n+=d));r.tag=a,r.dump="{"+n+"}"}function wA(r,t,l,n){var a="",o=r.tag,s=Object.keys(l),i,c,u,d,m,f;if(r.sortKeys===!0)s.sort();else if(typeof r.sortKeys=="function")s.sort(r.sortKeys);else if(r.sortKeys)throw new Vt("sortKeys must be a boolean or a function");for(i=0,c=s.length;i<c;i+=1)f="",(!n||a!=="")&&(f+=Pa(r,t)),u=s[i],d=l[u],r.replacer&&(d=r.replacer.call(l,u,d)),Qt(r,t+1,u,!0,!0,!0)&&(m=r.tag!==null&&r.tag!=="?"||r.dump&&r.dump.length>1024,m&&(r.dump&&pl===r.dump.charCodeAt(0)?f+="?":f+="? "),f+=r.dump,m&&(f+=Pa(r,t)),Qt(r,t+1,d,!0,m)&&(r.dump&&pl===r.dump.charCodeAt(0)?f+=":":f+=": ",f+=r.dump,a+=f));r.tag=o,r.dump=a||"{}"}function yc(r,t,l){var n,a,o,s,i,c;for(a=l?r.explicitTypes:r.implicitTypes,o=0,s=a.length;o<s;o+=1)if(i=a[o],(i.instanceOf||i.predicate)&&(!i.instanceOf||typeof t=="object"&&t instanceof i.instanceOf)&&(!i.predicate||i.predicate(t))){if(l?i.multi&&i.representName?r.tag=i.representName(t):r.tag=i.tag:r.tag="?",i.represent){if(c=r.styleMap[i.tag]||i.defaultStyle,Ji.call(i.represent)==="[object Function]")n=i.represent(t,c);else if(ec.call(i.represent,c))n=i.represent[c](t,c);else throw new Vt("!<"+i.tag+'> tag resolver accepts not "'+c+'" style');r.dump=n}return!0}return!1}function Qt(r,t,l,n,a,o,s){r.tag=null,r.dump=l,yc(r,l,!1)||yc(r,l,!0);var i=Ji.call(r.dump),c=n,u;n&&(n=r.flowLevel<0||r.flowLevel>t);var d=i==="[object Object]"||i==="[object Array]",m,f;if(d&&(m=r.duplicates.indexOf(l),f=m!==-1),(r.tag!==null&&r.tag!=="?"||f||r.indent!==2&&t>0)&&(a=!1),f&&r.usedDuplicates[m])r.dump="*ref_"+m;else{if(d&&f&&!r.usedDuplicates[m]&&(r.usedDuplicates[m]=!0),i==="[object Object]")n&&Object.keys(r.dump).length!==0?(wA(r,t,r.dump,a),f&&(r.dump="&ref_"+m+r.dump)):(xA(r,t,r.dump),f&&(r.dump="&ref_"+m+" "+r.dump));else if(i==="[object Array]")n&&r.dump.length!==0?(r.noArrayIndent&&!s&&t>0?gc(r,t-1,r.dump,a):gc(r,t,r.dump,a),f&&(r.dump="&ref_"+m+r.dump)):(kA(r,t,r.dump),f&&(r.dump="&ref_"+m+" "+r.dump));else if(i==="[object String]")r.tag!=="?"&&gA(r,r.dump,t,o,c);else{if(i==="[object Undefined]")return!1;if(r.skipInvalid)return!1;throw new Vt("unacceptable kind of an object to dump "+i)}r.tag!==null&&r.tag!=="?"&&(u=encodeURI(r.tag[0]==="!"?r.tag.slice(1):r.tag).replace(/!/g,"%21"),r.tag[0]==="!"?u="!"+u:u.slice(0,18)==="tag:yaml.org,2002:"?u="!!"+u.slice(18):u="!<"+u+">",r.dump=u+" "+r.dump)}return!0}function _A(r,t){var l=[],n=[],a,o;for(Ua(r,l,n),a=0,o=n.length;a<o;a+=1)t.duplicates.push(l[n[a]]);t.usedDuplicates=new Array(o)}function Ua(r,t,l){var n,a,o;if(r!==null&&typeof r=="object")if(a=t.indexOf(r),a!==-1)l.indexOf(a)===-1&&l.push(a);else if(t.push(r),Array.isArray(r))for(a=0,o=r.length;a<o;a+=1)Ua(r[a],t,l);else for(n=Object.keys(r),a=0,o=n.length;a<o;a+=1)Ua(r[n[a]],t,l)}function EA(r,t){t=t||{};var l=new uA(t);l.noRefs||_A(r,l);var n=r;return l.replacer&&(n=l.replacer.call({"":n},"",n)),Qt(l,0,n,!0,!0)?l.dump+`
269
- `:""}var CA=EA,VA={dump:CA},NA=VA.dump;const vA={class:"space-y-6 max-w-7xl mx-auto"},BA={class:"flex items-center justify-between"},SA={class:"flex items-center gap-4"},AA={class:"flex items-center gap-2"},DA={class:"text-2xl font-semibold text-gray-900 dark:text-white"},MA=["href","title"],TA={class:"flex items-center space-x-3"},LA={key:0,class:"max-w-[1000px] flex flex-col"},$A={class:"flex ml-2 mb-6 w-min border border-gray-200 dark:border-gray-700 rounded-full overflow-hidden"},bc=e.defineComponent({__name:"MenuItemPage",setup(r){De["vs-input-monaco-editor"]=Hl;const{t,locale:l}=Be({useScope:"global"}),n=qe.useRouter(),a=qe.useRoute(),o=e.computed(()=>[{key:"name",title:t("cms.menu.form.name"),type:"text",placeholder:t("cms.menu.form.name"),required:!0,validators:["required"]},{key:"description",title:t("cms.menu.form.description"),type:"text",placeholder:t("cms.menu.form.description"),required:!0,validators:["required"]},{key:"locale",title:t("cms.menu.form.language"),type:"select",placeholder:t("cms.menu.form.language"),options:[{text:"Ukrainian",id:"uk"},{text:"English",id:"en"}],required:!0,validators:["required"]},{key:"content",title:t("cms.menu.form.content"),type:"monaco-editor",height:"500px",language:"yaml",theme:"vs-light"}]),s=e.ref(null),i=e.ref({}),c=e.ref(!1),u=e.ref(!1),d=p=>{const h={};for(const g of p){const{title:y,value:b,children:w}=g;w&&w.length>0?h[y]=d(w):h[y]=b}return h},m=async()=>{let p={...s.value||{}};if(await i.value.validate()){se({type:"warning",title:t("cms.common.actions.warning"),message:t("cms.menu.createMenuFailed")});return}Array.isArray(p.items)&&(p.items=d(p.items),p.content=NA(p.items));try{await fetch(`/api/cms-menu/${a.params.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(p)}),se({title:t("cms.menu.menuUpdated"),type:"success",message:t("cms.menu.menuUpdated")}),n.push("/menu")}catch{se({title:t("cms.menu.menuUpdateError"),type:"error",message:t("cms.menu.menuUpdateError")})}},f=async()=>{try{const h=await(await fetch(`/api/cms-menu/${a.params.id}`)).json();s.value=h,c.value=!0}catch{c.value=!1}};return e.onMounted(f),(p,h)=>(e.openBlock(),e.createElementBlock("div",vA,[e.createElementVNode("div",BA,[e.createElementVNode("div",SA,[e.createElementVNode("button",{onClick:h[0]||(h[0]=g=>e.unref(n).back()),class:"p-2 text-gray-500 rounded-full hover:text-gray-900 dark:text-gray-400 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"},[e.createVNode(e.unref(hn),{class:"w-5 h-5"})]),e.createElementVNode("div",AA,[e.createElementVNode("h1",DA,e.toDisplayString(p.$t("cms.menu.editMenu")),1),e.createElementVNode("a",{href:`https://cms.opengis.info/${e.unref(l)}/guides/menu/`,target:"_blank",title:p.$t("cms.guide.menu")},[e.createVNode(e.unref(er),{class:"w-5 h-5"})],8,MA)])]),e.createElementVNode("div",TA,[e.createElementVNode("button",{onClick:m,class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 bg-blue-600 text-white shadow-md transition-all duration-200 transform hover:bg-blue-700 hover:shadow-lg hover:scale-105 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"},[e.createVNode(e.unref(xn),{class:"w-4 h-4 mr-2"}),e.createTextVNode(" "+e.toDisplayString(p.$t("cms.common.actions.save")),1)])])]),c.value?(e.openBlock(),e.createElementBlock("div",LA,[e.createElementVNode("div",$A,[e.createElementVNode("button",{onClick:h[1]||(h[1]=g=>u.value=!1),class:e.normalizeClass([{"bg-gray-200 text-gray-900 dark:bg-gray-700 dark:text-white":!u.value},"text-gray-500 hover:text-gray-900 dark:hover:text-white hover:bg-gray-200 dark:hover:bg-gray-700 whitespace-nowrap px-5 py-2 w-[200px] text-sm font-medium"])},e.toDisplayString(p.$t("cms.menu.textEditor")),3),e.createElementVNode("button",{onClick:h[2]||(h[2]=g=>u.value=!0),class:e.normalizeClass([{"bg-gray-200 text-gray-900 dark:bg-gray-700 dark:text-white":u.value},"text-gray-500 hover:text-gray-900 dark:hover:text-white hover:bg-gray-200 dark:hover:bg-gray-700 whitespace-nowrap px-5 py-2 w-[200px] text-sm font-medium"])},e.toDisplayString(p.$t("cms.menu.listTree")),3)]),u.value?(e.openBlock(),e.createBlock(VS,{key:0,modelValue:s.value,"onUpdate:modelValue":h[3]||(h[3]=g=>s.value=g)},null,8,["modelValue"])):(e.openBlock(),e.createBlock(e.unref(He),{key:1,schema:o.value,modelValue:s.value,"onUpdate:modelValue":h[4]||(h[4]=g=>s.value=g),form:i.value,"onUpdate:form":h[5]||(h[5]=g=>i.value=g)},null,8,["schema","modelValue","form"]))])):e.createCommentVNode("",!0)]))}}),FA=Object.freeze(Object.defineProperty({__proto__:null,default:bc},Symbol.toStringTag,{value:"Module"})),IA=(r,t)=>{const l=r[t];return l?typeof l=="function"?l():Promise.resolve(l):new Promise((n,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+t)))})},OA=localStorage.locale||navigator.language.split("cms.-")[0]||"uk",jr=pm({legacy:!1,locale:OA,fallbackLocale:"en",datetimeFormats:{en:{short:{year:"numeric",month:"short",day:"numeric"},long:{dateStyle:"full",timeStyle:"short"},time:{hour:"2-digit",minute:"2-digit"}},uk:{short:{year:"numeric",month:"short",day:"numeric"},long:{dateStyle:"full",timeStyle:"short"},time:{hour:"2-digit",minute:"2-digit"}}},numberFormats:{en:{currency:{style:"currency",currency:"USD"},percent:{style:"percent",minimumFractionDigits:0},compact:{notation:"compact"}},uk:{currency:{style:"currency",currency:"UAH"},percent:{style:"percent",minimumFractionDigits:0},compact:{notation:"compact"}}},messages:{}}),ja="en";async function kc(r){return(await IA(Object.assign({"./locales/en.json":()=>Promise.resolve().then(()=>WA),"./locales/uk.json":()=>Promise.resolve().then(()=>YA)}),`./locales/${r}.json`)).default}async function za(r){try{const t=await kc(r);return jr.global.setLocaleMessage(r,t),t}catch(t){if(console.error(`Failed to load locale ${r}:`,t),r!==ja)try{const l=await kc(ja);return jr.global.setLocaleMessage(r,l),l}catch(l){throw console.error(`Failed to load fallback locale ${ja}:`,l),l}throw t}}async function PA(r){await za(r),jr.global.locale.value=r,localStorage.setItem("locale",r),document.documentElement.lang=r,window.dispatchEvent(new CustomEvent("cms.storage",{detail:{key:"locale",oldValue:null,newValue:r}}))}async function RA(){const r=jr.global.locale.value;await za(r),jr.global.locale.value=r,localStorage.setItem("locale",r),document.documentElement.lang=r}async function UA(r){return await za(r)}function jA(r){r.component("Dashboard",Zn)}function ir(r){return typeof r=="string"||r instanceof String}function xc(r){var t;return typeof r=="object"&&r!=null&&(r==null||(t=r.constructor)==null?void 0:t.name)==="Object"}function wc(r,t){return Array.isArray(t)?wc(r,(l,n)=>t.includes(n)):Object.entries(r).reduce((l,n)=>{let[a,o]=n;return t(o,a)&&(l[a]=o),l},{})}const ae={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function _c(r){switch(r){case ae.LEFT:return ae.FORCE_LEFT;case ae.RIGHT:return ae.FORCE_RIGHT;default:return r}}function Ha(r){return r.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function un(r,t){if(t===r)return!0;const l=Array.isArray(t),n=Array.isArray(r);let a;if(l&&n){if(t.length!=r.length)return!1;for(a=0;a<t.length;a++)if(!un(t[a],r[a]))return!1;return!0}if(l!=n)return!1;if(t&&r&&typeof t=="object"&&typeof r=="object"){const o=t instanceof Date,s=r instanceof Date;if(o&&s)return t.getTime()==r.getTime();if(o!=s)return!1;const i=t instanceof RegExp,c=r instanceof RegExp;if(i&&c)return t.toString()==r.toString();if(i!=c)return!1;const u=Object.keys(t);for(a=0;a<u.length;a++)if(!Object.prototype.hasOwnProperty.call(r,u[a]))return!1;for(a=0;a<u.length;a++)if(!un(r[u[a]],t[u[a]]))return!1;return!0}else if(t&&r&&typeof t=="function"&&typeof r=="function")return t.toString()===r.toString();return!1}class zA{constructor(t){for(Object.assign(this,t);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?ae.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?ae.RIGHT:ae.LEFT}}function me(r,t){return new me.InputMask(r,t)}function Ec(r){if(r==null)throw new Error("mask property should be defined");return r instanceof RegExp?me.MaskedRegExp:ir(r)?me.MaskedPattern:r===Date?me.MaskedDate:r===Number?me.MaskedNumber:Array.isArray(r)||r===Array?me.MaskedDynamic:me.Masked&&r.prototype instanceof me.Masked?r:me.Masked&&r instanceof me.Masked?r.constructor:r instanceof Function?me.MaskedFunction:(console.warn("Mask not found for mask",r),me.Masked)}function zr(r){if(!r)throw new Error("Options in not defined");if(me.Masked){if(r.prototype instanceof me.Masked)return{mask:r};const{mask:t=void 0,...l}=r instanceof me.Masked?{mask:r}:xc(r)&&r.mask instanceof me.Masked?r:{};if(t){const n=t.mask;return{...wc(t,(a,o)=>!o.startsWith("_")),mask:t.constructor,_mask:n,...l}}}return xc(r)?{...r}:{mask:r}}function Pt(r){if(me.Masked&&r instanceof me.Masked)return r;const t=zr(r),l=Ec(t.mask);if(!l)throw new Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===l&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new l(t)}me.createMask=Pt;class mn{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch{}return t??this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch{}return t??this.value.length}select(t,l){if(!(t==null||l==null||t===this.selectionStart&&l===this.selectionEnd))try{this._unsafeSelect(t,l)}catch{}}get isActive(){return!1}}me.MaskElement=mn;const Cc=90,HA=89;class yl extends mn{constructor(t){super(),this.input=t,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var t,l,n;return(t=(l=(n=this.input).getRootNode)==null?void 0:l.call(n))!=null?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",t.drop),this.input.addEventListener("click",t.click),this.input.addEventListener("focus",t.focus),this.input.addEventListener("blur",t.commit),this._handlers=t}_onKeydown(t){if(this._handlers.redo&&(t.keyCode===Cc&&t.shiftKey&&(t.metaKey||t.ctrlKey)||t.keyCode===HA&&t.ctrlKey))return t.preventDefault(),this._handlers.redo(t);if(this._handlers.undo&&t.keyCode===Cc&&(t.metaKey||t.ctrlKey))return t.preventDefault(),this._handlers.undo(t);t.isComposing||this._handlers.selectionChange(t)}_onBeforeinput(t){if(t.inputType==="historyUndo"&&this._handlers.undo)return t.preventDefault(),this._handlers.undo(t);if(t.inputType==="historyRedo"&&this._handlers.redo)return t.preventDefault(),this._handlers.redo(t)}_onCompositionEnd(t){this._handlers.input(t)}_onInput(t){t.isComposing||this._handlers.input(t)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}me.HTMLMaskElement=yl;class Vc extends yl{constructor(t){super(t),this.input=t}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,l){this.input.setSelectionRange(t,l)}get value(){return this.input.value}set value(t){this.input.value=t}}me.HTMLMaskElement=yl;class qa extends yl{get _unsafeSelectionStart(){const t=this.rootElement,l=t.getSelection&&t.getSelection(),n=l&&l.anchorOffset,a=l&&l.focusOffset;return a==null||n==null||n<a?n:a}get _unsafeSelectionEnd(){const t=this.rootElement,l=t.getSelection&&t.getSelection(),n=l&&l.anchorOffset,a=l&&l.focusOffset;return a==null||n==null||n>a?n:a}_unsafeSelect(t,l){if(!this.rootElement.createRange)return;const n=this.rootElement.createRange();n.setStart(this.input.firstChild||this.input,t),n.setEnd(this.input.lastChild||this.input,l);const a=this.rootElement,o=a.getSelection&&a.getSelection();o&&(o.removeAllRanges(),o.addRange(n))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}}me.HTMLContenteditableMaskElement=qa;class pn{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(t){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(t),this.states.length>pn.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(t){return this.currentIndex=Math.min(Math.max(this.currentIndex+t,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}pn.MAX_LENGTH=100;class Nc{constructor(t,l){this.el=t instanceof mn?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new qa(t):new Vc(t),this.masked=Pt(l),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new pn,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(t){var l;return t==null||((l=this.masked)==null?void 0:l.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof me.Masked)&&this.masked.constructor===Ec(t)){this.masked.updateOptions({mask:t});return}const l=t instanceof me.Masked?t:Pt({mask:t});l.unmaskedValue=this.masked.unmaskedValue,this.masked=l}get value(){return this._value}set value(t){this.value!==t&&(this.masked.value=t,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){this.unmaskedValue!==t&&(this.masked.unmaskedValue=t,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(t){this.rawInputValue!==t&&(this.masked.rawInputValue=t,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(t){this.masked.typedValueEquals(t)||(this.masked.typedValue=t,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(t,l){const n=this._listeners[t];n&&n.forEach(a=>a(l))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){!this.el||!this.el.isActive||(this.el.select(t,t),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(t){const l=this.masked.unmaskedValue,n=this.masked.value,a=this.masked.rawInputValue,o=this.displayValue,s=this.unmaskedValue!==l||this.value!==n||this._rawInputValue!==a;this._unmaskedValue=l,this._value=n,this._rawInputValue=a,this.el.value!==o&&(this.el.value=o),t==="auto"?this.alignCursor():t!=null&&(this.cursorPos=t),s&&this._fireChangeEvents(),!this._historyChanging&&(s||this.history.isEmpty)&&this.history.push({unmaskedValue:l,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(t){const{mask:l,...n}=t,a=!this.maskEquals(l),o=this.masked.optionsIsChanged(n);a&&(this.mask=l),o&&this.masked.updateOptions(n),(a||o)&&this.updateControl()}updateCursor(t){t!=null&&(this.cursorPos=t,this._delayUpdateCursor(t))}_delayUpdateCursor(t){this._abortUpdateCursor(),this._changingCursorPos=t,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,ae.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(t,l){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(l),this}off(t,l){if(!this._listeners[t])return this;if(!l)return delete this._listeners[t],this;const n=this._listeners[t].indexOf(l);return n>=0&&this._listeners[t].splice(n,1),this}_onInput(t){this._inputEvent=t,this._abortUpdateCursor();const l=new zA({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),n=this.masked.rawInputValue,a=this.masked.splice(l.startChangePos,l.removed.length,l.inserted,l.removeDirection,{input:!0,raw:!0}).offset,o=n===this.masked.rawInputValue?l.removeDirection:ae.NONE;let s=this.masked.nearestInputPos(l.startChangePos+a,o);o!==ae.NONE&&(s=this.masked.nearestInputPos(s,ae.NONE)),this.updateControl(s),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(t){t.preventDefault(),t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(t){t&&(this._historyChanging=!0,this.unmaskedValue=t.unmaskedValue,this.el.select(t.selection.start,t.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}me.InputMask=Nc;class ge{static normalize(t){return Array.isArray(t)?t:[t,new ge]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},t)}aggregate(t){return this.inserted+=t.inserted,this.rawInserted+=t.rawInserted,this.tailShift+=t.tailShift,this.skip=this.skip||t.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(t){return this.inserted===t.inserted&&this.tailShift===t.tailShift&&this.rawInserted===t.rawInserted&&this.skip===t.skip}}me.ChangeDetails=ge;class Rt{constructor(t,l,n){t===void 0&&(t=""),l===void 0&&(l=0),this.value=t,this.from=l,this.stop=n}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||t!=null&&this.from>=t)return"";const l=this.value[0];return this.value=this.value.slice(1),l}shift(){if(!this.value.length)return"";const t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}}class et{constructor(t){this._value="",this._update({...et.DEFAULTS,...t}),this._initialized=!0}updateOptions(t){this.optionsIsChanged(t)&&this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:!0})}resolve(t,l){l===void 0&&(l={input:!0}),this.reset(),this.append(t,l,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){this.format?this.value=this.format(t,this):this.unmaskedValue=String(t)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(t){this.resolve(t,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(t,l){return t}totalInputPositions(t,l){return t===void 0&&(t=0),l===void 0&&(l=this.displayValue.length),Math.min(this.displayValue.length,l-t)}extractInput(t,l,n){return t===void 0&&(t=0),l===void 0&&(l=this.displayValue.length),this.displayValue.slice(t,l)}extractTail(t,l){return t===void 0&&(t=0),l===void 0&&(l=this.displayValue.length),new Rt(this.extractInput(t,l),t)}appendTail(t){return ir(t)&&(t=new Rt(String(t))),t.appendTo(this)}_appendCharRaw(t,l){return t?(this._value+=t,new ge({inserted:t,rawInserted:t})):new ge}_appendChar(t,l,n){l===void 0&&(l={});const a=this.state;let o;if([t,o]=this.doPrepareChar(t,l),t&&(o=o.aggregate(this._appendCharRaw(t,l)),!o.rawInserted&&this.autofix==="pad")){const s=this.state;this.state=a;let i=this.pad(l);const c=this._appendCharRaw(t,l);i=i.aggregate(c),c.rawInserted||i.equals(o)?o=i:this.state=s}if(o.inserted){let s,i=this.doValidate(l)!==!1;if(i&&n!=null){const c=this.state;if(this.overwrite===!0){s=n.state;for(let d=0;d<o.rawInserted.length;++d)n.unshift(this.displayValue.length-o.tailShift)}let u=this.appendTail(n);if(i=u.rawInserted.length===n.toString().length,!(i&&u.inserted)&&this.overwrite==="shift"){this.state=c,s=n.state;for(let d=0;d<o.rawInserted.length;++d)n.shift();u=this.appendTail(n),i=u.rawInserted.length===n.toString().length}i&&u.inserted&&(this.state=c)}i||(o=new ge,this.state=a,n&&s&&(n.state=s))}return o}_appendPlaceholder(){return new ge}_appendEager(){return new ge}append(t,l,n){if(!ir(t))throw new Error("value should be string");const a=ir(n)?new Rt(String(n)):n;l!=null&&l.tail&&(l._beforeTailState=this.state);let o;[t,o]=this.doPrepare(t,l);for(let s=0;s<t.length;++s){const i=this._appendChar(t[s],l,a);if(!i.rawInserted&&!this.doSkipInvalid(t[s],l,a))break;o.aggregate(i)}return(this.eager===!0||this.eager==="append")&&l!=null&&l.input&&t&&o.aggregate(this._appendEager()),a!=null&&(o.tailShift+=this.appendTail(a).tailShift),o}remove(t,l){return t===void 0&&(t=0),l===void 0&&(l=this.displayValue.length),this._value=this.displayValue.slice(0,t)+this.displayValue.slice(l),new ge}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;const l=this.rawInputValue,n=this.value,a=t();return this.rawInputValue=l,this.value&&this.value!==n&&n.indexOf(this.value)===0&&(this.append(n.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,a}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;const l=this.state,n=t(this);return this.state=l,delete this._isolated,n}doSkipInvalid(t,l,n){return!!this.skipInvalid}doPrepare(t,l){return l===void 0&&(l={}),ge.normalize(this.prepare?this.prepare(t,this,l):t)}doPrepareChar(t,l){return l===void 0&&(l={}),ge.normalize(this.prepareChar?this.prepareChar(t,this,l):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){this.commit&&this.commit(this.value,this)}splice(t,l,n,a,o){n===void 0&&(n=""),a===void 0&&(a=ae.NONE),o===void 0&&(o={input:!0});const s=t+l,i=this.extractTail(s),c=this.eager===!0||this.eager==="remove";let u;c&&(a=_c(a),u=this.extractInput(0,s,{raw:!0}));let d=t;const m=new ge;if(a!==ae.NONE&&(d=this.nearestInputPos(t,l>1&&t!==0&&!c?ae.NONE:a),m.tailShift=d-t),m.aggregate(this.remove(d)),c&&a!==ae.NONE&&u===this.rawInputValue)if(a===ae.FORCE_LEFT){let f;for(;u===this.rawInputValue&&(f=this.displayValue.length);)m.aggregate(new ge({tailShift:-1})).aggregate(this.remove(f-1))}else a===ae.FORCE_RIGHT&&i.unshift();return m.aggregate(this.append(n,o,i))}maskEquals(t){return this.mask===t}optionsIsChanged(t){return!un(this,t)}typedValueEquals(t){const l=this.typedValue;return t===l||et.EMPTY_VALUES.includes(t)&&et.EMPTY_VALUES.includes(l)||(this.format?this.format(t,this)===this.format(this.typedValue,this):!1)}pad(t){return new ge}}et.DEFAULTS={skipInvalid:!0},et.EMPTY_VALUES=[void 0,null,""],me.Masked=et;class cr{constructor(t,l){t===void 0&&(t=[]),l===void 0&&(l=0),this.chunks=t,this.from=l}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=ir(t)?new Rt(String(t)):t;const l=this.chunks[this.chunks.length-1],n=l&&(l.stop===t.stop||t.stop==null)&&t.from===l.from+l.toString().length;if(t instanceof Rt)n?l.extend(t.toString()):this.chunks.push(t);else if(t instanceof cr){if(t.stop==null){let a;for(;t.chunks.length&&t.chunks[0].stop==null;)a=t.chunks.shift(),a.from+=t.from,this.extend(a)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof me.MaskedPattern))return new Rt(this.toString()).appendTo(t);const l=new ge;for(let n=0;n<this.chunks.length;++n){const a=this.chunks[n],o=t._mapPosToBlock(t.displayValue.length),s=a.stop;let i;if(s!=null&&(!o||o.index<=s)&&((a instanceof cr||t._stops.indexOf(s)>=0)&&l.aggregate(t._appendPlaceholder(s)),i=a instanceof cr&&t._blocks[s]),i){const c=i.appendTail(a);l.aggregate(c);const u=a.toString().slice(c.rawInserted.length);u&&l.aggregate(t.append(u,{tail:!0}))}else l.aggregate(t.append(a.toString(),{tail:!0}))}return l}get state(){return{chunks:this.chunks.map(t=>t.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){const{chunks:l,...n}=t;Object.assign(this,n),this.chunks=l.map(a=>{const o="chunks"in a?new cr:new Rt;return o.state=a,o})}unshift(t){if(!this.chunks.length||t!=null&&this.from>=t)return"";const l=t!=null?t-this.from:t;let n=0;for(;n<this.chunks.length;){const a=this.chunks[n],o=a.unshift(l);if(a.toString()){if(!o)break;++n}else this.chunks.splice(n,1);if(o)return o}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){const l=this.chunks[t],n=l.shift();if(l.toString()){if(!n)break;--t}else this.chunks.splice(t,1);if(n)return n}return""}}class qA{constructor(t,l){this.masked=t,this._log=[];const{offset:n,index:a}=t._mapPosToBlock(l)||(l<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=n,this.index=a,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){const t=this._log.pop();return t&&(this.state=t),t}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(t){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((l=this.block)==null?void 0:l.displayValue.length)||0){var l;if(t())return this.ok=!0}return this.ok=!1}_pushRight(t){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(t())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,ae.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,ae.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,ae.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,ae.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,ae.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,ae.NONE),!0})}}class Ka{constructor(t){Object.assign(this,t),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(t,l){return t===void 0&&(t=0),l===void 0&&(l=this._value.length),this._value=this._value.slice(0,t)+this._value.slice(l),this._value||(this._isRawInput=!1),new ge}nearestInputPos(t,l){l===void 0&&(l=ae.NONE);const n=0,a=this._value.length;switch(l){case ae.LEFT:case ae.FORCE_LEFT:return n;case ae.NONE:case ae.RIGHT:case ae.FORCE_RIGHT:default:return a}}totalInputPositions(t,l){return t===void 0&&(t=0),l===void 0&&(l=this._value.length),this._isRawInput?l-t:0}extractInput(t,l,n){return t===void 0&&(t=0),l===void 0&&(l=this._value.length),n===void 0&&(n={}),n.raw&&this._isRawInput&&this._value.slice(t,l)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(t,l){if(l===void 0&&(l={}),this.isFilled)return new ge;const n=this.eager===!0||this.eager==="append",a=this.char===t&&(this.isUnmasking||l.input||l.raw)&&(!l.raw||!n)&&!l.tail,o=new ge({inserted:this.char,rawInserted:a?this.char:""});return this._value=this.char,this._isRawInput=a&&(l.raw||l.input),o}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const t=new ge;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new Rt("")}appendTail(t){return ir(t)&&(t=new Rt(String(t))),t.appendTo(this)}append(t,l,n){const a=this._appendChar(t[0],l);return n!=null&&(a.tailShift+=this.appendTail(n).tailShift),a}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=!!t._rawInputValue}pad(t){return this._appendPlaceholder()}}class bl{constructor(t){const{parent:l,isOptional:n,placeholderChar:a,displayChar:o,lazy:s,eager:i,...c}=t;this.masked=Pt(c),Object.assign(this,{parent:l,isOptional:n,placeholderChar:a,displayChar:o,lazy:s,eager:i})}reset(){this.isFilled=!1,this.masked.reset()}remove(t,l){return t===void 0&&(t=0),l===void 0&&(l=this.value.length),t===0&&l>=1?(this.isFilled=!1,this.masked.remove(t,l)):new ge}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(t,l){if(l===void 0&&(l={}),this.isFilled)return new ge;const n=this.masked.state;let a=this.masked._appendChar(t,this.currentMaskFlags(l));return a.inserted&&this.doValidate(l)===!1&&(a=new ge,this.masked.state=n),!a.inserted&&!this.isOptional&&!this.lazy&&!l.input&&(a.inserted=this.placeholderChar),a.skip=!a.inserted&&!this.isOptional,this.isFilled=!!a.inserted,a}append(t,l,n){return this.masked.append(t,this.currentMaskFlags(l),n)}_appendPlaceholder(){return this.isFilled||this.isOptional?new ge:(this.isFilled=!0,new ge({inserted:this.placeholderChar}))}_appendEager(){return new ge}extractTail(t,l){return this.masked.extractTail(t,l)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,l,n){return t===void 0&&(t=0),l===void 0&&(l=this.value.length),this.masked.extractInput(t,l,n)}nearestInputPos(t,l){l===void 0&&(l=ae.NONE);const n=0,a=this.value.length,o=Math.min(Math.max(t,n),a);switch(l){case ae.LEFT:case ae.FORCE_LEFT:return this.isComplete?o:n;case ae.RIGHT:case ae.FORCE_RIGHT:return this.isComplete?o:a;case ae.NONE:default:return o}}totalInputPositions(t,l){return t===void 0&&(t=0),l===void 0&&(l=this.value.length),this.value.slice(t,l).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked,this.isFilled=t.isFilled}currentMaskFlags(t){var l;return{...t,_beforeTailState:(t==null||(l=t._beforeTailState)==null?void 0:l.masked)||(t==null?void 0:t._beforeTailState)}}pad(t){return new ge}}bl.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class vc extends et{updateOptions(t){super.updateOptions(t)}_update(t){const l=t.mask;l&&(t.validate=n=>n.search(l)>=0),super._update(t)}}me.MaskedRegExp=vc;class tt extends et{constructor(t){super({...tt.DEFAULTS,...t,definitions:Object.assign({},bl.DEFAULT_DEFINITIONS,t==null?void 0:t.definitions)})}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions),super._update(t),this._rebuildMask()}_rebuildMask(){const t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const l=this.mask;if(!l||!t)return;let n=!1,a=!1;for(let o=0;o<l.length;++o){if(this.blocks){const u=l.slice(o),d=Object.keys(this.blocks).filter(f=>u.indexOf(f)===0);d.sort((f,p)=>p.length-f.length);const m=d[0];if(m){const{expose:f,repeat:p,...h}=zr(this.blocks[m]),g={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...h,repeat:p,parent:this},y=p!=null?new me.RepeatBlock(g):Pt(g);y&&(this._blocks.push(y),f&&(this.exposeBlock=y),this._maskedBlocks[m]||(this._maskedBlocks[m]=[]),this._maskedBlocks[m].push(this._blocks.length-1)),o+=m.length-1;continue}}let s=l[o],i=s in t;if(s===tt.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(s==="{"||s==="}"){n=!n;continue}if(s==="["||s==="]"){a=!a;continue}if(s===tt.ESCAPE_CHAR){if(++o,s=l[o],!s)break;i=!1}const c=i?new bl({isOptional:a,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...zr(t[s]),parent:this}):new Ka({char:s,eager:this.eager,isUnmasking:n});this._blocks.push(c)}}get state(){return{...super.state,_blocks:this._blocks.map(t=>t.state)}}set state(t){if(!t){this.reset();return}const{_blocks:l,...n}=t;this._blocks.forEach((a,o)=>a.state=l[o]),super.state=n}reset(){super.reset(),this._blocks.forEach(t=>t.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(t=>t.isComplete)}get isFilled(){return this._blocks.every(t=>t.isFilled)}get isFixed(){return this._blocks.every(t=>t.isFixed)}get isOptional(){return this._blocks.every(t=>t.isOptional)}doCommit(){this._blocks.forEach(t=>t.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((t,l)=>t+=l.unmaskedValue,"")}set unmaskedValue(t){if(this.exposeBlock){const l=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t,this.appendTail(l),this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((t,l)=>t+=l.value,"")}set value(t){if(this.exposeBlock){const l=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t,this.appendTail(l),this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){const l=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t,this.appendTail(l),this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce((t,l)=>t+=l.displayValue,"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;const l=new ge;let n=(t=this._mapPosToBlock(this.displayValue.length))==null?void 0:t.index;if(n==null)return l;this._blocks[n].isFilled&&++n;for(let a=n;a<this._blocks.length;++a){const o=this._blocks[a]._appendEager();if(!o.inserted)break;l.aggregate(o)}return l}_appendCharRaw(t,l){l===void 0&&(l={});const n=this._mapPosToBlock(this.displayValue.length),a=new ge;if(!n)return a;for(let s=n.index,i;i=this._blocks[s];++s){var o;const c=i._appendChar(t,{...l,_beforeTailState:(o=l._beforeTailState)==null||(o=o._blocks)==null?void 0:o[s]});if(a.aggregate(c),c.consumed)break}return a}extractTail(t,l){t===void 0&&(t=0),l===void 0&&(l=this.displayValue.length);const n=new cr;return t===l||this._forEachBlocksInRange(t,l,(a,o,s,i)=>{const c=a.extractTail(s,i);c.stop=this._findStopBefore(o),c.from=this._blockStartPos(o),c instanceof cr&&(c.blockIndex=o),n.extend(c)}),n}extractInput(t,l,n){if(t===void 0&&(t=0),l===void 0&&(l=this.displayValue.length),n===void 0&&(n={}),t===l)return"";let a="";return this._forEachBlocksInRange(t,l,(o,s,i,c)=>{a+=o.extractInput(i,c,n)}),a}_findStopBefore(t){let l;for(let n=0;n<this._stops.length;++n){const a=this._stops[n];if(a<=t)l=a;else break}return l}_appendPlaceholder(t){const l=new ge;if(this.lazy&&t==null)return l;const n=this._mapPosToBlock(this.displayValue.length);if(!n)return l;const a=n.index,o=t??this._blocks.length;return this._blocks.slice(a,o).forEach(s=>{if(!s.lazy||t!=null){var i;l.aggregate(s._appendPlaceholder((i=s._blocks)==null?void 0:i.length))}}),l}_mapPosToBlock(t){let l="";for(let n=0;n<this._blocks.length;++n){const a=this._blocks[n],o=l.length;if(l+=a.displayValue,t<=l.length)return{index:n,offset:t-o}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce((l,n)=>l+=n.displayValue.length,0)}_forEachBlocksInRange(t,l,n){l===void 0&&(l=this.displayValue.length);const a=this._mapPosToBlock(t);if(a){const o=this._mapPosToBlock(l),s=o&&a.index===o.index,i=a.offset,c=o&&s?o.offset:this._blocks[a.index].displayValue.length;if(n(this._blocks[a.index],a.index,i,c),o&&!s){for(let u=a.index+1;u<o.index;++u)n(this._blocks[u],u,0,this._blocks[u].displayValue.length);n(this._blocks[o.index],o.index,0,o.offset)}}}remove(t,l){t===void 0&&(t=0),l===void 0&&(l=this.displayValue.length);const n=super.remove(t,l);return this._forEachBlocksInRange(t,l,(a,o,s,i)=>{n.aggregate(a.remove(s,i))}),n}nearestInputPos(t,l){if(l===void 0&&(l=ae.NONE),!this._blocks.length)return 0;const n=new qA(this,t);if(l===ae.NONE)return n.pushRightBeforeInput()||(n.popState(),n.pushLeftBeforeInput())?n.pos:this.displayValue.length;if(l===ae.LEFT||l===ae.FORCE_LEFT){if(l===ae.LEFT){if(n.pushRightBeforeFilled(),n.ok&&n.pos===t)return t;n.popState()}if(n.pushLeftBeforeInput(),n.pushLeftBeforeRequired(),n.pushLeftBeforeFilled(),l===ae.LEFT){if(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.ok&&n.pos<=t||(n.popState(),n.ok&&n.pos<=t))return n.pos;n.popState()}return n.ok?n.pos:l===ae.FORCE_LEFT?0:(n.popState(),n.ok||(n.popState(),n.ok)?n.pos:0)}return l===ae.RIGHT||l===ae.FORCE_RIGHT?(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.pushRightBeforeFilled()?n.pos:l===ae.FORCE_RIGHT?this.displayValue.length:(n.popState(),n.ok||(n.popState(),n.ok)?n.pos:this.nearestInputPos(t,ae.LEFT))):t}totalInputPositions(t,l){t===void 0&&(t=0),l===void 0&&(l=this.displayValue.length);let n=0;return this._forEachBlocksInRange(t,l,(a,o,s,i)=>{n+=a.totalInputPositions(s,i)}),n}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){const l=this._maskedBlocks[t];return l?l.map(n=>this._blocks[n]):[]}pad(t){const l=new ge;return this._forEachBlocksInRange(0,this.displayValue.length,n=>l.aggregate(n.pad(t))),l}}tt.DEFAULTS={...et.DEFAULTS,lazy:!0,placeholderChar:"_"},tt.STOP_CHAR="`",tt.ESCAPE_CHAR="\\",tt.InputDefinition=bl,tt.FixedDefinition=Ka,me.MaskedPattern=tt;class kl extends tt{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{to:l=this.to||0,from:n=this.from||0,maxLength:a=this.maxLength||0,autofix:o=this.autofix,...s}=t;this.to=l,this.from=n,this.maxLength=Math.max(String(l).length,a),this.autofix=o;const i=String(this.from).padStart(this.maxLength,"0"),c=String(this.to).padStart(this.maxLength,"0");let u=0;for(;u<c.length&&c[u]===i[u];)++u;s.mask=c.slice(0,u).replace(/0/g,"\\0")+"0".repeat(this.maxLength-u),super._update(s)}get isComplete(){return super.isComplete&&!!this.value}boundaries(t){let l="",n="";const[,a,o]=t.match(/^(\D*)(\d*)(\D*)/)||[];return o&&(l="0".repeat(a.length)+o,n="9".repeat(a.length)+o),l=l.padEnd(this.maxLength,"0"),n=n.padEnd(this.maxLength,"9"),[l,n]}doPrepareChar(t,l){l===void 0&&(l={});let n;return[t,n]=super.doPrepareChar(t.replace(/\D/g,""),l),t||(n.skip=!this.isComplete),[t,n]}_appendCharRaw(t,l){if(l===void 0&&(l={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(t,l);const n=String(this.from).padStart(this.maxLength,"0"),a=String(this.to).padStart(this.maxLength,"0"),[o,s]=this.boundaries(this.value+t);return Number(s)<this.from?super._appendCharRaw(n[this.value.length],l):Number(o)>this.to?!l.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(n[this.value.length],l).aggregate(this._appendCharRaw(t,l)):super._appendCharRaw(a[this.value.length],l):super._appendCharRaw(t,l)}doValidate(t){const l=this.value;if(l.search(/[^0]/)===-1&&l.length<=this._matchFrom)return!0;const[n,a]=this.boundaries(l);return this.from<=Number(a)&&Number(n)<=this.to&&super.doValidate(t)}pad(t){const l=new ge;if(this.value.length===this.maxLength)return l;const n=this.value,a=this.maxLength-this.value.length;if(a){this.reset();for(let o=0;o<a;++o)l.aggregate(super._appendCharRaw("0",t));n.split("").forEach(o=>this._appendCharRaw(o))}return l}}me.MaskedRange=kl;const KA="d{.}`m{.}`Y";class Ut extends tt{static extractPatternOptions(t){const{mask:l,pattern:n,...a}=t;return{...a,mask:ir(l)?l:n}}constructor(t){super(Ut.extractPatternOptions({...Ut.DEFAULTS,...t}))}updateOptions(t){super.updateOptions(t)}_update(t){const{mask:l,pattern:n,blocks:a,...o}={...Ut.DEFAULTS,...t},s=Object.assign({},Ut.GET_DEFAULT_BLOCKS());t.min&&(s.Y.from=t.min.getFullYear()),t.max&&(s.Y.to=t.max.getFullYear()),t.min&&t.max&&s.Y.from===s.Y.to&&(s.m.from=t.min.getMonth()+1,s.m.to=t.max.getMonth()+1,s.m.from===s.m.to&&(s.d.from=t.min.getDate(),s.d.to=t.max.getDate())),Object.assign(s,this.blocks,a),super._update({...o,mask:ir(l)?l:n,blocks:s})}doValidate(t){const l=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&l!=null&&(this.min==null||this.min<=l)&&(this.max==null||l<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}optionsIsChanged(t){return super.optionsIsChanged(Ut.extractPatternOptions(t))}}Ut.GET_DEFAULT_BLOCKS=()=>({d:{mask:kl,from:1,to:31,maxLength:2},m:{mask:kl,from:1,to:12,maxLength:2},Y:{mask:kl,from:1900,to:9999}}),Ut.DEFAULTS={...tt.DEFAULTS,mask:Date,pattern:KA,format:(r,t)=>{if(!r)return"";const l=String(r.getDate()).padStart(2,"0"),n=String(r.getMonth()+1).padStart(2,"0"),a=r.getFullYear();return[l,n,a].join(".")},parse:(r,t)=>{const[l,n,a]=r.split(".").map(Number);return new Date(a,n-1,l)}},me.MaskedDate=Ut;class xl extends et{constructor(t){super({...xl.DEFAULTS,...t}),this.currentMask=void 0}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),"mask"in t&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(t.mask)?t.mask.map(l=>{const{expose:n,...a}=zr(l),o=Pt({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...a});return n&&(this.exposeMask=o),o}):[])}_appendCharRaw(t,l){l===void 0&&(l={});const n=this._applyDispatch(t,l);return this.currentMask&&n.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(l))),n}_applyDispatch(t,l,n){t===void 0&&(t=""),l===void 0&&(l={}),n===void 0&&(n="");const a=l.tail&&l._beforeTailState!=null?l._beforeTailState._value:this.value,o=this.rawInputValue,s=l.tail&&l._beforeTailState!=null?l._beforeTailState._rawInputValue:o,i=o.slice(s.length),c=this.currentMask,u=new ge,d=c==null?void 0:c.state;return this.currentMask=this.doDispatch(t,{...l},n),this.currentMask&&(this.currentMask!==c?(this.currentMask.reset(),s&&(this.currentMask.append(s,{raw:!0}),u.tailShift=this.currentMask.value.length-a.length),i&&(u.tailShift+=this.currentMask.append(i,{raw:!0,tail:!0}).tailShift)):d&&(this.currentMask.state=d)),u}_appendPlaceholder(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}_appendEager(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendEager()),t}appendTail(t){const l=new ge;return t&&l.aggregate(this._applyDispatch("",{},t)),l.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var l,n;return{...t,_beforeTailState:((l=t._beforeTailState)==null?void 0:l.currentMaskRef)===this.currentMask&&((n=t._beforeTailState)==null?void 0:n.currentMask)||t._beforeTailState}}doDispatch(t,l,n){return l===void 0&&(l={}),n===void 0&&(n=""),this.dispatch(t,this,l,n)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,l){l===void 0&&(l={});let[n,a]=super.doPrepare(t,l);if(this.currentMask){let o;[n,o]=super.doPrepare(n,this.currentMaskFlags(l)),a=a.aggregate(o)}return[n,a]}doPrepareChar(t,l){l===void 0&&(l={});let[n,a]=super.doPrepareChar(t,l);if(this.currentMask){let o;[n,o]=super.doPrepareChar(n,this.currentMaskFlags(l)),a=a.aggregate(o)}return[n,a]}reset(){var t;(t=this.currentMask)==null||t.reset(),this.compiledMasks.forEach(l=>l.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){this.exposeMask?(this.exposeMask.value=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){this.exposeMask?(this.exposeMask.unmaskedValue=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask){this.exposeMask.typedValue=t,this.currentMask=this.exposeMask,this._applyDispatch();return}let l=String(t);this.currentMask&&(this.currentMask.typedValue=t,l=this.currentMask.unmaskedValue),this.unmaskedValue=l}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return!!((t=this.currentMask)!=null&&t.isComplete)}get isFilled(){var t;return!!((t=this.currentMask)!=null&&t.isFilled)}remove(t,l){const n=new ge;return this.currentMask&&n.aggregate(this.currentMask.remove(t,l)).aggregate(this._applyDispatch()),n}get state(){var t;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(l=>l.state),currentMaskRef:this.currentMask,currentMask:(t=this.currentMask)==null?void 0:t.state}}set state(t){const{compiledMasks:l,currentMaskRef:n,currentMask:a,...o}=t;l&&this.compiledMasks.forEach((s,i)=>s.state=l[i]),n!=null&&(this.currentMask=n,this.currentMask.state=a),super.state=o}extractInput(t,l,n){return this.currentMask?this.currentMask.extractInput(t,l,n):""}extractTail(t,l){return this.currentMask?this.currentMask.extractTail(t,l):super.extractTail(t,l)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(t,l){return this.currentMask?this.currentMask.nearestInputPos(t,l):super.nearestInputPos(t,l)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(t){this._autofix=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every((l,n)=>{if(!t[n])return;const{mask:a,...o}=t[n];return un(l,o)&&l.maskEquals(a)}):super.maskEquals(t)}typedValueEquals(t){var l;return!!((l=this.currentMask)!=null&&l.typedValueEquals(t))}}xl.DEFAULTS={...et.DEFAULTS,dispatch:(r,t,l,n)=>{if(!t.compiledMasks.length)return;const a=t.rawInputValue,o=t.compiledMasks.map((s,i)=>{const c=t.currentMask===s,u=c?s.displayValue.length:s.nearestInputPos(s.displayValue.length,ae.FORCE_LEFT);return s.rawInputValue!==a?(s.reset(),s.append(a,{raw:!0})):c||s.remove(u),s.append(r,t.currentMaskFlags(l)),s.appendTail(n),{index:i,weight:s.rawInputValue.length,totalInputPositions:s.totalInputPositions(0,Math.max(u,s.nearestInputPos(s.displayValue.length,ae.FORCE_LEFT)))}});return o.sort((s,i)=>i.weight-s.weight||i.totalInputPositions-s.totalInputPositions),t.compiledMasks[o[0].index]}},me.MaskedDynamic=xl;class wl extends tt{constructor(t){super({...wl.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){const{enum:l,...n}=t;if(l){const a=l.map(i=>i.length),o=Math.min(...a),s=Math.max(...a)-o;n.mask="*".repeat(o),s&&(n.mask+="["+"*".repeat(s)+"]"),this.enum=l}super._update(n)}_appendCharRaw(t,l){l===void 0&&(l={});const n=Math.min(this.nearestInputPos(0,ae.FORCE_RIGHT),this.value.length),a=this.enum.filter(o=>this.matchValue(o,this.unmaskedValue+t,n));if(a.length){a.length===1&&this._forEachBlocksInRange(0,this.value.length,(s,i)=>{const c=a[0][i];i>=this.value.length||c===s.value||(s.reset(),s._appendChar(c,l))});const o=super._appendCharRaw(a[0][this.value.length],l);return a.length===1&&a[0].slice(this.unmaskedValue.length).split("").forEach(s=>o.aggregate(super._appendCharRaw(s))),o}return new ge({skip:!this.isComplete})}extractTail(t,l){return t===void 0&&(t=0),l===void 0&&(l=this.displayValue.length),new Rt("",t)}remove(t,l){if(t===void 0&&(t=0),l===void 0&&(l=this.displayValue.length),t===l)return new ge;const n=Math.min(super.nearestInputPos(0,ae.FORCE_RIGHT),this.value.length);let a;for(a=t;a>=0&&!(this.enum.filter(s=>this.matchValue(s,this.value.slice(n,a),n)).length>1);--a);const o=super.remove(a,l);return o.tailShift+=a-t,o}get isComplete(){return this.enum.indexOf(this.value)>=0}}wl.DEFAULTS={...tt.DEFAULTS,matchValue:(r,t,l)=>r.indexOf(t,l)===l},me.MaskedEnum=wl;class Bc extends et{updateOptions(t){super.updateOptions(t)}_update(t){super._update({...t,validate:t.mask})}}me.MaskedFunction=Bc;var Sc;class pt extends et{constructor(t){super({...pt.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){const t="^"+(this.allowNegative?"[+|\\-]?":""),l="\\d*",n=(this.scale?"("+Ha(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+l+n),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(Ha).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(Ha(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){const l=t.split(this.radix);return l[0]=l[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),l.join(this.radix)}doPrepareChar(t,l){l===void 0&&(l={});const[n,a]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(l.input&&l.raw||!l.input&&!l.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),l);return t&&!n&&(a.skip=!0),n&&!this.allowPositive&&!this.value&&n!=="-"&&a.aggregate(this._appendChar("-")),[n,a]}_separatorsCount(t,l){l===void 0&&(l=!1);let n=0;for(let a=0;a<t;++a)this._value.indexOf(this.thousandsSeparator,a)===a&&(++n,l&&(t+=this.thousandsSeparator.length));return n}_separatorsCountFromSlice(t){return t===void 0&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,l,n){return t===void 0&&(t=0),l===void 0&&(l=this.displayValue.length),[t,l]=this._adjustRangeWithSeparators(t,l),this._removeThousandsSeparators(super.extractInput(t,l,n))}_appendCharRaw(t,l){l===void 0&&(l={});const n=l.tail&&l._beforeTailState?l._beforeTailState._value:this._value,a=this._separatorsCountFromSlice(n);this._value=this._removeThousandsSeparators(this.value);const o=this._value;this._value+=t;const s=this.number;let i=!isNaN(s),c=!1;if(i){let f;this.min!=null&&this.min<0&&this.number<this.min&&(f=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(f=this.max),f!=null&&(this.autofix?(this._value=this.format(f,this).replace(pt.UNMASKED_RADIX,this.radix),c||(c=o===this._value&&!l.tail)):i=!1),i&&(i=!!this._value.match(this._numberRegExp))}let u;i?u=new ge({inserted:this._value.slice(o.length),rawInserted:c?"":t,skip:c}):(this._value=o,u=new ge),this._value=this._insertThousandsSeparators(this._value);const d=l.tail&&l._beforeTailState?l._beforeTailState._value:this._value,m=this._separatorsCountFromSlice(d);return u.tailShift+=(m-a)*this.thousandsSeparator.length,u}_findSeparatorAround(t){if(this.thousandsSeparator){const l=t-this.thousandsSeparator.length+1,n=this.value.indexOf(this.thousandsSeparator,l);if(n<=t)return n}return-1}_adjustRangeWithSeparators(t,l){const n=this._findSeparatorAround(t);n>=0&&(t=n);const a=this._findSeparatorAround(l);return a>=0&&(l=a+this.thousandsSeparator.length),[t,l]}remove(t,l){t===void 0&&(t=0),l===void 0&&(l=this.displayValue.length),[t,l]=this._adjustRangeWithSeparators(t,l);const n=this.value.slice(0,t),a=this.value.slice(l),o=this._separatorsCount(n.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(n+a));const s=this._separatorsCountFromSlice(n);return new ge({tailShift:(s-o)*this.thousandsSeparator.length})}nearestInputPos(t,l){if(!this.thousandsSeparator)return t;switch(l){case ae.NONE:case ae.LEFT:case ae.FORCE_LEFT:{const n=this._findSeparatorAround(t-1);if(n>=0){const a=n+this.thousandsSeparator.length;if(t<a||this.value.length<=a||l===ae.FORCE_LEFT)return n}break}case ae.RIGHT:case ae.FORCE_RIGHT:{const n=this._findSeparatorAround(t);if(n>=0)return n+this.thousandsSeparator.length}}return t}doCommit(){if(this.value){const t=this.number;let l=t;this.min!=null&&(l=Math.max(l,this.min)),this.max!=null&&(l=Math.min(l,this.max)),l!==t&&(this.unmaskedValue=this.format(l,this));let n=this.value;this.normalizeZeros&&(n=this._normalizeZeros(n)),this.padFractionalZeros&&this.scale>0&&(n=this._padFractionalZeros(n)),this._value=n}super.doCommit()}_normalizeZeros(t){const l=this._removeThousandsSeparators(t).split(this.radix);return l[0]=l[0].replace(/^(\D*)(0*)(\d*)/,(n,a,o,s)=>a+s),t.length&&!/\d$/.test(l[0])&&(l[0]=l[0]+"0"),l.length>1&&(l[1]=l[1].replace(/0*$/,""),l[1].length||(l.length=1)),this._insertThousandsSeparators(l.join(this.radix))}_padFractionalZeros(t){if(!t)return t;const l=t.split(this.radix);return l.length<2&&l.push(""),l[1]=l[1].padEnd(this.scale,"0"),l.join(this.radix)}doSkipInvalid(t,l,n){l===void 0&&(l={});const a=this.scale===0&&t!==this.thousandsSeparator&&(t===this.radix||t===pt.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,l,n)&&!a}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,pt.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(pt.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(t){return(super.typedValueEquals(t)||pt.EMPTY_VALUES.includes(t)&&pt.EMPTY_VALUES.includes(this.typedValue))&&!(t===0&&this.value==="")}}Sc=pt,pt.UNMASKED_RADIX=".",pt.EMPTY_VALUES=[...et.EMPTY_VALUES,0],pt.DEFAULTS={...et.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Sc.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:r=>r.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},me.MaskedNumber=pt;const fn={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Ga(r,t,l){t===void 0&&(t=fn.MASKED),l===void 0&&(l=fn.MASKED);const n=Pt(r);return a=>n.runIsolated(o=>(o[t]=a,o[l]))}function Ac(r,t,l,n){return Ga(t,l,n)(r)}me.PIPE_TYPE=fn,me.createPipe=Ga,me.pipe=Ac;class Dc extends tt{get repeatFrom(){var t;return(t=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?t:0}get repeatTo(){var t;return(t=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?t:1/0}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){var l,n,a;const{repeat:o,...s}=zr(t);this._blockOpts=Object.assign({},this._blockOpts,s);const i=Pt(this._blockOpts);this.repeat=(l=(n=o??i.repeat)!=null?n:this.repeat)!=null?l:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((a=this._blocks)==null?void 0:a.length)||0,this.repeatFrom)),blocks:{m:i},eager:i.eager,overwrite:i.overwrite,skipInvalid:i.skipInvalid,lazy:i.lazy,placeholderChar:i.placeholderChar,displayChar:i.displayChar})}_allocateBlock(t){if(t<this._blocks.length)return this._blocks[t];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(Pt(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(t,l){l===void 0&&(l={});const n=new ge;for(let c=(a=(o=this._mapPosToBlock(this.displayValue.length))==null?void 0:o.index)!=null?a:Math.max(this._blocks.length-1,0),u,d;u=(s=this._blocks[c])!=null?s:d=!d&&this._allocateBlock(c);++c){var a,o,s,i;const m=u._appendChar(t,{...l,_beforeTailState:(i=l._beforeTailState)==null||(i=i._blocks)==null?void 0:i[c]});if(m.skip&&d){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(n.aggregate(m),m.consumed)break}return n}_trimEmptyTail(t,l){var n,a;t===void 0&&(t=0);const o=Math.max(((n=this._mapPosToBlock(t))==null?void 0:n.index)||0,this.repeatFrom,0);let s;l!=null&&(s=(a=this._mapPosToBlock(l))==null?void 0:a.index),s==null&&(s=this._blocks.length-1);let i=0;for(let c=s;o<=c&&!this._blocks[c].unmaskedValue;--c,++i);i&&(this._blocks.splice(s-i+1,i),this.mask=this.mask.slice(i))}reset(){super.reset(),this._trimEmptyTail()}remove(t,l){t===void 0&&(t=0),l===void 0&&(l=this.displayValue.length);const n=super.remove(t,l);return this._trimEmptyTail(t,l),n}totalInputPositions(t,l){return t===void 0&&(t=0),l==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(t,l)}get state(){return super.state}set state(t){this._blocks.length=t._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=t}}me.RepeatBlock=Dc;try{globalThis.IMask=me}catch{}const GA=Object.freeze(Object.defineProperty({__proto__:null,ChangeDetails:ge,ChunksTailDetails:cr,DIRECTION:ae,HTMLContenteditableMaskElement:qa,HTMLInputMaskElement:Vc,HTMLMaskElement:yl,InputMask:Nc,MaskElement:mn,Masked:et,MaskedDate:Ut,MaskedDynamic:xl,MaskedEnum:wl,MaskedFunction:Bc,MaskedNumber:pt,MaskedPattern:tt,MaskedRange:kl,MaskedRegExp:vc,PIPE_TYPE:fn,PatternFixedDefinition:Ka,PatternInputDefinition:bl,RepeatBlock:Dc,createMask:Pt,createPipe:Ga,default:me,forceDirection:_c,normalizeOpts:zr,pipe:Ac},Symbol.toStringTag,{value:"Module"})),Mc={reference:{faq:"FAQ",banner:"Banner",slider:"Slider",video:"Video",about:"About",cards:"Cards",usefulLinks:"Useful Links",team:"Team",body:"Body",news:"News",form:"Form",tabs:"Tabs",vertical_tabs:"Vertical Tabs",documents:"Documents",infoLine:"Information Line",interested:"You may be interested",contact:"Contact"},navigation:{editMenu:"Edit Menu",dashboard:"Dashboard",collections:"Collections Structure",articles:"Articles",posts:"Posts",media:"Media",permissions:"Permissions",tags:"Tags",singletons:"Pages",feedback:"Feedback",email:"Пошти користувачів",singletonsMenu:"Menu",menuAdd:"Create Menu",builder:"Collections Structure",back:"Back",settings:"Settings",settingsDescription:"Manage your CMS configuration",singletonsMenuDescription:"Manage your menu.",users:"Users",general:"General",apiKeys:"API Keys",appearance:"Appearance",logs:"Logs"},dashboard:{title:"Dashboard",newCollection:"Create Collection",quickActions:"Quick Actions",views:"views",stats:{totalArticles:"Total Articles",totalMedia:"Total Media",activeUsers:"Active Users",apiRequests:"API Requests",fromLastMonth:"from last month"},collections:{title:"Collections",articles:"Articles",articlesDesc:"Description for articles",posts:"Posts",postsDesc:"Description for posts",products:"Products",productsDesc:"Description for products",categories:"Categories",categoriesDesc:"Description for categories",items:"items",new:"New Collection"},recentArticles:"Recent Articles",recentPosts:"Recent Posts",activeUsers:"Active Users",mediaFiles:"Media Files",createArticle:"Create Article",createPost:"Create Post",uploadMedia:"Upload Media",manageUsers:"Manage Users",feedback:"Feedback",createArticleDescription:"Create a new article for your site",uploadMediaDescription:"Upload media files for your site",manageUsersDescription:"Manage users for your site",viewFeedbackDescription:"View feedback for your site",activityFeed:"Activity Feed",viewAll:"View all",description:"Welcome to the CMS dashboard. You can create, edit, and manage your site's content.",newArticle:"Create Article",totalContent:"Total Content",articlesPostsPages:"Articles, Posts and Pages",monthlyActiveUsers:"Monthly Active Users",imagesVideosDocs:"Images, Videos and Docs",thisMonth:"This Month",newMediaFiles:"New Media Files",gettingStartedWithNextJs14:"Getting Started with Next.js 14",sarahJohnson:"Sarah Johnson",advancedReactPatterns:"Advanced React Patterns",uiUxDesignPrinciples:"UI/UX Design Principles",databaseOptimizationTips:"Database Optimization Tips",mikeChen:"Mike Chen",emmaWilson:"Emma Wilson",alexRodriguez:"Alex Rodriguez",recentContent:"Recent Content"},collections:{title:"Collections",selectCollection:"Select a collection to view its content",createCollection:"New Collection",searchCollections:"Search collections...",entries:"Entries",fields:"Fields",lastModified:"Last Modified",edit:"Edit",delete:"Delete",view:"View",form:{name:"Collection Name",slug:"Slug",description:"Description",fields:"Fields",addField:"Add Field"},dragToBuild:"Drag and drop content blocks here to build your collection structure",collectionCreated:"Collection created successfully",collectionCreationFailed:"Error creating collection",pinPublication:"Pin Publication"},articles:{title:"Articles",createArticle:"Create Article",searchArticles:"Search articles...",showColumns:"Show columns",update:"Update",create:"Create",form:{title:"Title",content:"Content",author:"Author",category:"Category",status:"Status"}},posts:{title:"Posts",createPost:"Create Post",searchPosts:"Search posts...",form:{title:"Title",content:"Content",author:"Author",category:"Category",status:"Status"}},singletons:{title:"Singletons",createSingleton:"Create Singleton",searchSingletons:"Search singletons...",form:{name:"Name",description:"Description",content:"Content",status:"Status"},search:"Search singletons..."},media:{title:"Media Library",description:"Manage your images, documents, and media files.",uploadMedia:"Upload Media",searchMedia:"Search files...",fileInfo:"File Information",preview:"Preview",newFolder:"New Folder",selectFile:"Select a file to view details",fileDetails:"File Details",name:"Name",size:"Size",dimensions:"Dimensions",uploadDate:"Upload Date",author:"Author",tags:"Tags",banner:"Banner",hero:"Hero",homepage:"Homepage",download:"Download",copyPath:"Copy path",copyPathFailed:"Failed to copy path",delete:"Delete",edit:"Edit",share:"Share",moreActions:"More actions",deleteFile:"Delete File",cancel:"Cancel",mediaLibrary:"Media Library",showColumns:"Show columns",update:"Update",create:"Create",createFolder:"Create Folder",files:"files",noFilesInFolder:"No files in this folder",deleteConfirmation:"Are you sure you want to delete this file?",uploaded:"Uploaded",filter:"Filter",search:"Search media files...",uploadingFiles:"Uploading files",uploading:"Uploading...",folder:"Folder",updatedAt:"Updated At",type:"Type",sortBy:{title:"Sort by",name:"File name",filesize:"File size"},upload:"Upload",selectFromMedia:"Select from media",selectedFiles:"Selected files: {count}",selectFiles:"Select files"},tags:{title:"Tags",description:"Manage your tags.",createTag:"Create Tag",editTag:"Edit Tag",searchTags:"Search tags...",form:{name:"Name",description:"Description",color:"Color",created_at:"Created At",count_data:"Count of Used",topic:"Topic"},emptyTitle:"No tags found",emptyDescription:"Create your first tag to get started.",emptyButton:"Create Tag"},feedback:{title:"Feedback",description:"View feedback",table:{number:"№",noFeedback:"No feedback",email:"Email",userName:"Full name",messageText:"Message text",feedbackType:"Type of appeal",phone:"Phone",resumeLink:"Resume link",linkedinLink:"Linkedin link",portfolioLink:"Portfolio link",telegramLink:"Telegram link"}},email:{title:"User mails",description:"View users awaiting feedback",table:{number:"№",date:"Date of shipment",email:"Email"}},emptyData:{title:"No data found",description:"Create your first item to get started.",buttonText:"Create Item"},form:{gen:"Generate",key:"Key",value:"Value",noDataToDisplay:"No data to display",add:"Add"},builder:{manageContentCollections:"Manage content collections",searchCollections:"Search collections...",collections:"Collections",collectionStructure:"Collection Structure",defineFields:"Define the fields and their types for this collection",name:"Name",edit:"Edit",preview:"Preview",type:"Type",content:"Content",seo:"SEO",tags:"Tags",save:"Save",cancel:"Cancel",create:"Create",localization:"Localization",actions:"Actions",noColumnsFound:"No columns found",collectionName:"Collection Name",title:"Title",entries:"Entries",fields:"Fields",status:"Status",lastModified:"Last Modified",editCollection:"Edit collection",editContentForYourSite:"Edit content for your site",deleteObject:"Are you sure you want to delete this object?",editField:"Edit field",deleteTitle:"Delete field",deleteField:"Are you sure you want to delete this field?",scheme:{name:{label:"Name",placeholder:"Name"},title:{label:"Title",placeholder:"Title"},type:{label:"Type",placeholder:"Type",options:{collection:"Collection",single:"Single"}},customTable:{label:"Custom Table"},status:{label:"Status",placeholder:"Status",options:{published:"Published",draft:"Draft",archived:"Archived"}},description:{label:"Description",placeholder:"Description"},preview_path:{label:"Preview path",placeholder:"Preview path",info:"Path to slug for preview"},include_search:{label:"Include in search?",placeholder:"Include in search?"}},required:"Required field",createField:"Create field",selectType:"Select type",createFolder:"Create folder",changeType:"Change type",fieldLabels:{name:"Name",label:"Label",placeholder:"Placeholder",help:"Help",type:"Type",subtype:"Subtype",parent:"Parent",options:"Options",colModel:"ColModel",multiple:"Multiple",api:"API",relation:"Relation",required:"Required",localization:"Localization"},fieldPlaceholders:{name:"Name",label:"Title",placeholder:"Placeholder",help:"Help",type:"Type",subtype:"Subtype",parent:"Parent",options:"Options",colModel:"ColModel",api:"API",relation:"Relation"},fieldOptions:{text:"Text",number:"Number",integer:"Integer",date:"Date",datetime:"Datetime",file:"File",select:"Select",multiselect:"MultiSelect",mediaselect:"MediaSelect",radio:"Radio",boolean:"Boolean",datalist:"Data list",image:"Image",slug:"Slug",richtext:"Rich Text",markdown:"Markdown",reference:"Reference",relation:"Relation",fileList:"Gallery",tags:"Tags"}},menu:{title:"Menu",description:"Manage your menu.",createMenu:"Create Menu",searchMenu:"Search menu...",menuAdd:"Add Menu",editMenu:"Edit Menu",textEditor:"Text Editor",listTree:"List Tree",filter:"Filter",search:"Search menu...",menuCreated:"Menu created",menuCreateError:"Error creating menu",menuUpdated:"Menu updated",menuUpdateError:"Error updating menu",menuDeleted:"Menu deleted",menuDeleteError:"Error deleting menu",form:{name:"Name",description:"Description",content:"Content",status:"Status",value:"Value",language:"Language"}},settings:{title:"Settings",description:"Configure your CMS settings and preferences.",systemStatus:"System Status",siteInformation:"Site Information",siteName:"Site Name",version:"Version",environment:"Environment",security:"Security",localization:"Localization",production:"Production",systemHealth:"System Health",database:"Database",connected:"Connected",cache:"Cache",active:"Active",storage:"Storage",used:"Used",configure:"Configure",successTitle:"Success",successMessage:"Settings saved successfully",errorTitle:"Error",errorMessage:"Error saving settings",generateNewKey:"Generate New Key",apiSecurity:"API Security",general:{general:"General Settings",generalDescription:"Manage your general settings.",url:"URL",language:"Language",languages:"Languages",contacts:"Contacts",showSocialsNumber:"Number of socials to display",mapCoords:"Map coordinates",socials:"Socials",saveChanges:"Save Changes",cancel:"Cancel",notifications:"Notifications",emailNotifications:"Email Notifications",emailNotificationsDescription:"Receive notifications by email",pushNotifications:"Browser Notifications",pushNotificationsDescription:"Browser notifications for important updates",smsNotifications:"SMS Notifications",smsNotificationsDescription:"SMS notifications for critical updates",desktopNotifications:"Desktop Notifications",desktopNotificationsDescription:"Desktop notifications",siteDescription:"Site Description",siteUrl:"Site URL",siteLanguage:"Site Language",siteEmail:"Site Email",sitePhone:"Site Phone",siteAddress:"Site Address",siteName:"Site Name",title:"Title",content:"Content",name:"Name",siteInformation:"Site Information",logoSite:"Site Logo",logoCms:"CMS Logo",imageLogin:"Login Image",logo:"Logo",siteInformationDescription:"Manage your site information."},users:{users:"User Management",usersDescription:"Manage your user management configuration.",userRegistration:"User Registration",allowRegistration:"Allow User Registration",allowRegistrationDescription:"Enable new users to register accounts",emailVerification:"Email Verification Required",emailVerificationDescription:"Require email verification for new accounts",autoApprove:"Auto-approve Users",autoApproveDescription:"Automatically approve new user registrations",defaultRole:"Default User Role"},"api-keys":{apiKeys:"API Keys",apiKeysDescription:"Manage your api keys configuration.",productionApiKey:"Production API Key",developmentApiKey:"Development API Key",generateNewKey:"Generate New Key",apiSecurity:"API Security",rateLimiting:"Rate Limiting",rateLimitingDescription:"Enable API rate limiting protection",corsProtection:"CORS Protection",corsProtectionDescription:"Cross-origin request security",apiLogging:"API Logging",apiLoggingDescription:"Log all API requests and responses"},appearance:{appearance:"Appearance",appearanceDescription:"Manage your appearance settings.",colorTheme:"Color Theme",darkMode:"Dark Mode",darkModeDescription:"Switch to dark theme",compactMode:"Compact Mode",compactModeDescription:"Reduce spacing and padding",animations:"Animations",animationsDescription:"Enable interface animations",themeBlue:"Blue",themeGreen:"Green",themePurple:"Purple"},logs:{title:"Logs",description:"View all your actions in the system",table:{objectId:"Object Identifier",dateTime:"Date and Time of Change",changeType:"Change Type",noLogs:"No user logs found",noLogsDescription:"No user logs found"}},permissions:{title:"Permissions",user:"User",role:"Role",lastActive:"Last Active",actions:"Actions",rolePermissions:"Role Permissions",rolePermissionsDescription:"Permissions assigned to each role in the system.",permission:"Permission",admin:"Admin",editor:"Editor",author:"Author",viewer:"Viewer",customizePermissions:"Customize Permissions",inviteUser:"Invite User",searchUsers:"Search users...",createContent:"Create Content",editContent:"Edit Content",deleteContent:"Delete Content",publishContent:"Publish Content",manageMedia:"Manage Media",manageUsers:"Manage Users",manageSettings:"Manage Settings",remove:"Remove",edit:"Edit",time:{hoursAgo:"{count} hours ago",hourAgo:"1 hour ago",daysAgo:"{count} days ago",dayAgo:"1 day ago",weeksAgo:"{count} weeks ago",weekAgo:"1 week ago",minutesAgo:"{count} minutes ago",minuteAgo:"1 minute ago",justNow:"just now"},roles:{admin:"Admin",editor:"Editor",author:"Author",viewer:"Viewer"}}},block:{type:{heading:"Heading",paragraph:"Paragraph"}},app:{name:"SOFTPRO software package: GIS MBK Kamyansk City TG",tagline:"Do more with less"},nav:{home:"Home",about:"About",profile:"Profile",settings:"Settings",logout:"Log out"},common:{ok:"OK",save:"Save",cancel:"Cancel",close:"Close",delete:"Delete",edit:"Edit",loading:"Loading…",retry:"Retry",title:"Title",description:"Description",keywords:"Keywords",successMessage:"Success",errorMessage:"Error",success:"Success",error:"Error",meta:"Meta",actions:{add:"Add",save:"Save",cancel:"Cancel",edit:"Edit",delete:"Delete",create:"Create",preview:"Preview",search:"Search",filter:"Filter",export:"Export",addField:"Add Field",success:"Success",error:"Error",back:"Back"},status:{published:"Published",draft:"Draft",archived:"Archived"},content:"Content",pagination:{showing:"Showing",to:"to",of:"of",results:"results",previous:"Previous",next:"Next"}},auth:{title:"Sign in",email:"Email",password:"Password",remember:"Remember me",submit:"Sign in",errors:{invalid:"Invalid email or password",required:"{field} is required"}},table:{choose:"Choose columns to display",columns:"Columns",actions:"Actions",search:"Search",export:"Export",exportTitle:"Export table",close:"Close",chooseColumns:"Select columns for export:",selectAll:"Select all",selectCurrent:"Select current",none:"None",chooseFormat:"Choose table format:",time:{weeksAgo:"{count} weeks ago",weekAgo:"1 week ago",daysAgo:"{count} days ago",dayAgo:"1 day ago",hoursAgo:"{count} hours ago",hourAgo:"1 hour ago",minutesAgo:"{count} minutes ago",minuteAgo:"1 minute ago",justNow:"just now"},format:{json:"JSON format",csv:"CSV format",xlsx:"XLSX format"},cancel:"Cancel",download:"Download table"},filter:{search:"Search",more:"Show more",less:"Show less",selected:"selected",clear:"Clear",apply:"Apply",from:"From",to:"To",notfound:"Nothing found",period:"Period",today:"Today",week:"Week",month:"Month",quarter:"Quarter",year:"Year",alltime:"All Time",prev:"Prev",next:"Next"},items:{title:"Items",add:"Add item",count:"No items | One item | {count} items",created:"Item “{name}” has been created",deleted:"Item deleted"},errors:{network:"Network error. Please try again.",notFound:"We couldn't find what you were looking for."},toast:{saved:"Changes saved",copied:"Copied to clipboard"},users:{title:"Users",description:"Manage your users.",createUser:"Create User",editUser:"Edit User",searchUsers:"Search users...",createUserFailed:"Create user failed",createUserSuccess:"User created successfully",editUserFailed:"Edit user failed",editUserSuccess:"User edited successfully",deleteUserSuccess:"User deleted successfully",deleteUserFailed:"User deleted failed",form:{name:"Name",description:"Description",color:"Color",created_at:"Created At",count_data:"Count of Used",topic:"Topic"},emptyTitle:"No users found",emptyDescription:"Create your first user to get started.",emptyButton:"Create User"},fetchContentTypes:"fetchContentTypes",action:"action",delete:"delete","create-folder":"create-folder",formValues:"formValues",metaParentValue:"metaParentValue",blur:"blur","-":"-",noFilesInFolder:"noFilesInFolder",guide:{menu:"Guide for menu",general:"Guide",media:"Guide for media",settings:"Guide for settings",users:"Guide for users",content:"Guide for content",appOverview:"Guide for app overview",collections:"Guide for collections",help:"Help"}},WA=Object.freeze(Object.defineProperty({__proto__:null,cms:Mc,default:{cms:Mc}},Symbol.toStringTag,{value:"Module"})),Tc={reference:{faq:"Акордeон",photoGrid:"Фотогалерея",banner:"Банер",slider:"Слайдер",video:"Відео",about:"Про нас",cards:"Картки",usefulLinks:"Корисні посилання",team:"Команда",body:"Тіло",news:"Новини",form:"Форма",tabs:"Таби",vertical_tabs:"Вертикальні таби",documents:"Документи",infoLine:"Інформаційна лінія",iframe:"Iframe",interested:"Вас може зацікавити",contact:"Контакти"},navigation:{editMenu:"Редагувати меню",dashboard:"Панель керування",collections:"Керування контентом",articles:"Статті",posts:"Дописи",media:"Медіа",permissions:"Дозволи",tags:"Теги",singletons:"Сторінки",singletonsMenu:"Меню",feedback:"Зворотній зв'язок",email:"Пошти користувачів",menuAdd:"Створити меню",builder:"Структура колекцій",back:"Назад",settings:"Налаштування",settingsDescription:"Налаштування вашого сайту",singletonsMenuDescription:"Керування меню.",users:"Користувачі",general:"Основні",apiKeys:"API ключі",appearance:"Вигляд",logs:"Логи"},dashboard:{title:"Панель керування",description:"Вітаємо в панелі керування CMS. Ви можете створювати, редагувати та управляти контентом вашого сайту.",newCollection:"Створити колекцію",quickActions:"Швидкі дії",views:"переглядів",stats:{totalArticles:"Всього статей",totalMedia:"Всього медіа",activeUsers:"Активні користувачі",apiRequests:"API запити",fromLastMonth:"з минулого місяця"},collections:{title:"Колекції",articles:"Статті",articlesDesc:"Опис для статей",posts:"Дописи",postsDesc:"Опис для дописів",products:"Продукти",productsDesc:"Опис для продуктів",categories:"Категорії",categoriesDesc:"Опис для категорій",items:"шт.",new:"Нова колекція"},recentArticles:"Останні статті",recentPosts:"Останні дописи",recentContent:"Останній контент",activityFeed:"Стрічка активності",viewAll:"Показати все",totalContent:"Всього контенту",articlesPostsPages:"Статті, дописи та сторінки",monthlyActiveUsers:"Активних користувачів за місяць",imagesVideosDocs:"Зображення, відео та документи",thisMonth:"Цього місяця",activeUsers:"Активні користувачі",mediaFiles:"Файли медіа",createArticle:"Створити статтю",createPost:"Створити допис",uploadMedia:"Завантажити медіа",createArticleDescription:"Створіть статтю для вашого сайту",uploadMediaDescription:"Завантажте медіа файли для вашого сайту",manageUsersDescription:"Керуйте користувачами вашого сайту",viewFeedbackDescription:"Перегляд зворотнього зв'язку",manageUsers:"Керування користувачами",feedback:"Зворотній зв'язок",newMediaFiles:"Нових файлів медіа",gettingStartedWithNextJs14:"Початок роботи з Next.js 14",sarahJohnson:"Sarah Johnson",advancedReactPatterns:"Підвищені шаблони React",uiUxDesignPrinciples:"Принципи дизайну UI/UX",databaseOptimizationTips:"Поради з оптимізації бази даних",mikeChen:"Mike Chen",emmaWilson:"Emma Wilson",alexRodriguez:"Alex Rodriguez"},collections:{title:"Колекції",selectCollection:"Виберіть колекцію для перегляду її контенту",createCollection:"Створити колекцію",searchCollections:"Пошук колекцій...",entries:"Записи",fields:"Поля",lastModified:"Останнє редагування",edit:"Редагувати",delete:"Видалити",view:"Перегляд",form:{name:"Назва колекції",slug:"Слаг",description:"Опис",fields:"Поля",addField:"Додати поле"},dragToBuild:"Перетягніть блоки контенту сюди, щоб створити структуру колекції",collectionCreated:"Колекція успішно створена",collectionCreationFailed:"Помилка при створенні колекції",pinPublication:"Закріпити публікацію"},articles:{title:"Сторінки",createArticle:"Створити сторінку",searchArticles:"Пошук статей...",showColumns:"Показати колонки",update:"Оновити",create:"Створити",form:{title:"Заголовок",content:"Зміст",author:"Автор",category:"Категорія",status:"Статус"}},posts:{title:"Дописи",createPost:"Створити допис",searchPosts:"Пошук дописів...",form:{title:"Заголовок",content:"Зміст",author:"Автор",category:"Категорія",status:"Статус"}},singletons:{title:"Синглтони",createSingleton:"Створити синглтон",searchSingletons:"Пошук синглтонів...",form:{name:"Назва",description:"Опис",content:"Зміст",status:"Статус"},search:"Пошук синглтонів..."},media:{title:"Медіа бібліотека",description:"Керуйте своїми зображеннями, документами та медіа файлами.",uploadMedia:"Завантажити медіа",searchMedia:"Пошук файлів...",fileInfo:"Інформація про файл",preview:"Перегляд",newFolder:"Нова папка",selectFile:"Виберіть файл для перегляду деталей",fileDetails:"Інформація про файл",name:"Назва",size:"Розмір",dimensions:"Розміри",uploadDate:"Дата завантаження",author:"Автор",tags:"Теги",banner:"Банер",hero:"Герой",homepage:"Головна",download:"Завантажити",copyPath:"Копіювати шлях",copyPathFailed:"Не вдалося скопіювати шлях",delete:"Видалити",edit:"Редагувати",share:"Поділитися",moreActions:"Більше дій",deleteFile:"Ви впевнені, що хочете видалити цей файл?",createFolder:"Створити папку",cancel:"Скасувати",mediaLibrary:"Медіа бібліотека",files:"файлів",noFilesInFolder:"Немає файлів у цій папці",deleteConfirmation:"Ви впевнені, що хочете видалити цей файл?",uploaded:"Завантажено",filter:"Фільтр",search:"Пошук файлів...",uploadingFiles:"Завантаження файлів",uploading:"Завантаження...",folder:"Папка",type:"Тип",updatedAt:"Оновлено",sortBy:{title:"Сортувати за",name:"Назва файлу",filesize:"Розмір файлу"},upload:"Завантажити",selectFromMedia:"Вибрати з медіа",selectFiles:"Вибрати файли",selectedFiles:"Вибрано файлів: {count}"},tags:{title:"Теги",description:"Керування тегами.",createTag:"Створити тег",editTag:"Редагувати тег",searchTags:"Пошук тегів...",form:{name:"Назва",description:"Опис",color:"Колір",slug:"Slug",created_at:"Дата створення",count_data:"Кількість використань",topic:"Тема"},emptyTitle:"Теги не знайдені",emptyDescription:"Створіть свій перший тег, щоб почати.",emptyButton:"Створити тег"},feedback:{title:"Зворотній зв'язок",description:"Переглядайте зворотній зв'язок",table:{number:"№",noFeedback:"Фідбек відсутній",email:"Email",userName:"ПІБ",messageText:"Текст повідомлення",feedbackType:"Тип звернення",cdate:"Дата відгуку",phone:"Телефон",resumeLink:"Посилання на резюме",linkedinLink:"Посилання на лінкедин",portfolioLink:"Посилання на портфоліо",telegramLink:"Посилання на телеграм"}},email:{title:"Пошти користувачів",description:"Переглядайте користувачів, які очікують зворотнього зв'язку",table:{number:"№",date:"Дата відправки",email:"Email"}},emptyData:{title:"Немає даних",description:"Створіть свій перший елемент, щоб почати.",buttonText:"Створити елемент"},form:{gen:"Згенерувати",key:"Ключ",value:"Значення",noDataToDisplay:"Дані для відображення відсутні",add:"Додати"},builder:{faq:"Акордeон",photoGrid:"Фотогалерея",banner:"Банер",slider:"Слайдер",video:"Відео",about:"Про нас",cards:"Картки",usefulLinks:"Корисні посилання",team:"Команда",body:"Тіло",news:"Новини",form:"Форма",tabs:"Таби",vertical_tabs:"Вертикальні таби",documents:"Документи",infoLine:"Інформаційна лінія",iframe:"Iframe",manageContentCollections:"Керування колекціями контенту",searchCollections:"Пошук колекцій...",collections:"Структура колекцій",collectionStructure:"Структура колекції",defineFields:"Визначте поля та їх типи для цієї колекції",name:"Назва",changeType:"Змінити тип",type:"Тип",save:"Зберегти",edit:"Редагувати",content:"Контент",seo:"SEO",tags:"Теги",preview:"Перегляд",collectionName:"Назва колекції",title:"Заголовок",entries:"Записи",fields:"Поля",status:"Статус",lastModified:"Останнє редагування",cancel:"Скасувати",create:"Створити",localization:"Локалізація",actions:"Дії",noColumnsFound:"Немає колонок",editCollection:"Редагувати колекцію",editContentForYourSite:"Редагувати контент для вашого сайту",deleteObject:"Ви впевнені, що хочете видалити цей об'єкт?",editField:"Редагувати поле",deleteTitle:"Видалити поле",deleteField:"Ви впевнені, що хочете видалити це поле?",scheme:{name:{label:"Назва",placeholder:"Назва"},title:{label:"Заголовок",placeholder:"Заголовок"},type:{label:"Тип",placeholder:"Тип",options:{collection:"Колекція",single:"Сторінка"}},customTable:{label:"Власна таблиця"},status:{label:"Статус",placeholder:"Статус",options:{published:"Опубліковано",draft:"Чернетка",archived:"Архівовано"}},description:{label:"Опис",placeholder:"Опис"},preview_path:{label:"Шлях для прев'ю",placeholder:"Шлях для прев'ю",info:"Шлях до slug для прев'ю"},include_search:{label:"Включити в пошук?",placeholder:"Включити в пошук?"}},required:"Обов'язкове поле",createField:"Створити поле",selectType:"Оберіть тип",createFolder:"Створити папку",fieldLabels:{name:"Назва",label:"Мітка",placeholder:"Плейсхолдер",help:"Допомога",type:"Тип",subtype:"Підтип",parent:"Батьківський",data:"ID класифікатора",options:"Опції",colModel:"Модель колонок",multiple:"Множинний",api:"API",relation:"Зв'язок",required:"Обов'язковий",localization:"Локалізація"},fieldPlaceholders:{name:"Назва",label:"Заголовок",placeholder:"Плейсхолдер",help:"Допомога",type:"Тип",subtype:"Підтип",parent:"Батьківський",data:"ID класифікатора",options:"Опції",colModel:"Модель колонок",api:"API",relation:"Зв'язок"},fieldOptions:{text:"Текст",number:"Число",integer:"Ціле число",date:"Дата",datetime:"Дата і час",file:"Файл",select:"Селект",multiselect:"Мультиселект",mediaselect:"Вибір медіа",radio:"Радіо",boolean:"Булевий",datalist:"Дататейбл",image:"Зображення",slug:"Слаг",richtext:"Текстовий редактор",markdown:"Markdown",reference:"Секції",relation:"Зв'язок",fileList:"Мультифайл",tags:"Теги"}},menu:{title:"Меню",description:"Керування меню.",createMenu:"Створити меню",searchMenu:"Пошук меню...",menuAdd:"Додати меню",editMenu:"Редагувати меню",textEditor:"Текстовий редактор",menuCreated:"Меню створено",menuCreateError:"Помилка при створенні меню",menuUpdated:"Меню оновлено",menuUpdateError:"Помилка при оновленні меню",menuDeleted:"Меню видалено",menuDeleteError:"Помилка при видаленні меню",listTree:"Список дерева",filter:"Фільтр",search:"Пошук меню...",form:{name:"Назва",description:"Опис",content:"Зміст",status:"Статус",value:"Значення",language:"Мова"}},settings:{title:"Налаштування",description:"Налаштуйте ваші налаштування CMS та налаштування.",systemStatus:"Статус системи",siteInformation:"Інформація про сайт",logo:"Логотип",siteName:"Назва сайту",version:"Версія",environment:"Середовище",security:"Безпека",localization:"Локалізація",production:"Виробництво",systemHealth:"Здоров'я системи",database:"База даних",connected:"З'єднано",cache:"Кеш",active:"Активний",storage:"Хмарне сховище",used:"Використано",configure:"Налаштувати",successTitle:"Успішно",successMessage:"Налаштування успішно збережено",errorTitle:"Помилка",errorMessage:"Помилка при збереженні налаштувань",generateNewKey:"Згенерувати новий ключ",apiSecurity:"Безпека API",general:{general:"Основні налаштування",generalDescription:"Керуйте вашими загальними налаштуваннями.",url:"URL",language:"Мова",languages:"Мови",contacts:"Контакти",socials:"Соціальні мережі",showSocialsNumber:"Кількість соціальних мереж для відображення",mapCoords:"Координати для відображення на карті",saveChanges:"Зберегти зміни",cancel:"Скасувати",notifications:"Сповіщення",emailNotifications:"Сповіщення по email",emailNotificationsDescription:"Отримувати сповіщення по email",pushNotifications:"Сповіщення в браузері",pushNotificationsDescription:"Сповіщення в браузері для важливих оновлень",smsNotifications:"Сповіщення по SMS",smsNotificationsDescription:"Сповіщення по SMS для критичних оновлень",desktopNotifications:"Сповіщення на комп'ютері",desktopNotificationsDescription:"Сповіщення на комп'ютері",siteName:"Назва сайту",siteDescription:"Опис сайту",siteUrl:"URL сайту",previewUrl:"URL попереднього перегляду",logoSite:"Логотип сайту",logoCms:"Логотип CMS",imageLogin:"Зображення для входу",siteLanguage:"Мова сайту",siteEmail:"Email сайту",sitePhone:"Телефон сайту",siteAddress:"Адреса сайту",siteInformation:"Інформація про сайт",logo:"Логотип",siteInformationDescription:"Керуйте вашою інформацією про сайт.",title:"Заголовок",content:"Контент",name:"Назва соцмережі"},users:{users:"Керування користувачами",usersDescription:"Керуйте налаштуваннями керування користувачами.",userRegistration:"Реєстрація користувачів",allowRegistration:"Дозволити реєстрацію користувачів",allowRegistrationDescription:"Дозволити новим користувачам реєструвати акаунти",emailVerification:"Потрібна верифікація email",emailVerificationDescription:"Вимагати підтвердження email для нових акаунтів",autoApprove:"Автоматичне схвалення користувачів",autoApproveDescription:"Автоматично схвалювати нові реєстрації користувачів",defaultRole:"Роль за замовчуванням"},"api-keys":{apiKeys:"API ключі",apiKeysDescription:"Керуйте налаштуваннями API ключів.",productionApiKey:"Production API ключ",developmentApiKey:"Development API ключ",generateNewKey:"Згенерувати новий ключ",apiSecurity:"Безпека API",rateLimiting:"Обмеження швидкості",rateLimitingDescription:"Увімкнути захист обмеження швидкості API",corsProtection:"Захист CORS",corsProtectionDescription:"Безпека крос-доменних запитів",apiLogging:"Логування API",apiLoggingDescription:"Логувати всі API запити та відповіді"},appearance:{appearance:"Вигляд",appearanceDescription:"Керуйте вашим виглядом та налаштуваннями.",colorTheme:"Кольорова тема",darkMode:"Темний режим",darkModeDescription:"Перемкнути на темну тему",compactMode:"Компактний режим",compactModeDescription:"Зменшити відступи та поля",animations:"Анімації",animationsDescription:"Увімкнути анімації інтерфейсу",themeBlue:"Синя",themeGreen:"Зелена",themePurple:"Фіолетова"},logs:{title:"Логи",description:"Переглядай всі свої дії в системі",table:{number:"№",objectId:"Ідентифікатор об'єкта",dateTime:"Дата та час зміни",changeType:"Тип зміни",noLogs:"Логи користувача відсутні"}},permissions:{title:"Дозволи",user:"Користувач",role:"Роль",lastActive:"Остання активність",actions:"Дії",rolePermissions:"Дозволи ролі",rolePermissionsDescription:"Дозволи, призначені для кожної ролі в системі.",permission:"Дозвіл",admin:"Адміністратор",editor:"Редактор",author:"Автор",viewer:"Переглядач",customizePermissions:"Налаштувати дозволи",inviteUser:"Запросити користувача",searchUsers:"Пошук користувачів...",createContent:"Створити контент",editContent:"Редагувати контент",deleteContent:"Видалити контент",publishContent:"Опублікувати контент",manageMedia:"Керування медіа",manageUsers:"Керування користувачами",manageSettings:"Керування налаштуваннями",remove:"Вилучити",edit:"Редагувати",time:{hoursAgo:"{count} годин тому",hourAgo:"1 година тому",daysAgo:"{count} днів тому",dayAgo:"1 день тому",weeksAgo:"{count} тижнів тому",weekAgo:"1 тиждень тому",minutesAgo:"{count} хвилин тому",minuteAgo:"1 хвилина тому",justNow:"щойно"},roles:{admin:"Адміністратор",editor:"Редактор",author:"Автор",viewer:"Переглядач"}}},block:{type:{heading:"Заголовок",paragraph:"Параграф"}},app:{name:"Програмний комплекс SOFTPRO: ГІС МБК Кам'янської міської ТГ",tagline:"Зробіть більше з меншим"},nav:{home:"Домашній",about:"Про",profile:"Профіль",settings:"Налаштування",logout:"Вихід"},common:{ok:"Добре",save:"Зберегти",cancel:"Скасувати",close:"Закрити",delete:"Вилучити",edit:"Редагувати",loading:"Завантаження…",retry:"Повторити",title:"Назва",description:"Опис",keywords:"Ключові слова",success:"Успіх",error:"Помилка",successMessage:"Успішно",errorMessage:"Помилка",meta:"Мета",content:"Контент",actions:{add:"Додати",save:"Зберегти",cancel:"Скасувати",edit:"Редагувати",delete:"Видалити",create:"Створити",preview:"Перегляд",search:"Пошук",filter:"Фільтр",export:"Експорт",addField:"Додати поле",success:"Успіх",error:"Помилка",back:"Повернутися"},status:{published:"Опубліковано",draft:"Чернетка",archived:"Архівовано"},pagination:{showing:"Показано",to:"по",of:"з",results:"результатів",previous:"Попередня",next:"Наступна"}},auth:{title:"Увійти",email:"Електронна пошта",password:"Пароль",remember:"Пам'ятайте мене",submit:"Увійти",errors:{invalid:"Недійсний електронний лист або пароль",required:"{Поле} потрібно"}},table:{choose:"Оберіть колонки для відображення",columns:"Колонки",actions:"Дії",search:"Пошук",export:"Експорт",exportTitle:"Експорт таблиці",close:"Закрити",chooseColumns:"Виберіть стовпці таблиці для експорту:",selectAll:"Вибрати усі",selectCurrent:"Вибрати поточні",none:"Жодного",chooseFormat:"Виберіть формат таблиці:",cancel:"Скасувати",download:"Завантажити таблицю",time:{weeksAgo:"{count} тижнів тому",weekAgo:"1 тиждень тому",daysAgo:"{count} днів тому",dayAgo:"1 день тому",hoursAgo:"{count} годин тому",hourAgo:"1 година тому",minutesAgo:"{count} хвилин тому",minuteAgo:"1 хвилина тому",justNow:"щойно"},format:{json:"Формат json",csv:"Формат csv",xlsx:"Формат xlsx"}},filter:{search:"Пошук",more:"Показати більше",less:"Показати меньше",selected:"обрано",clear:"Очистити",apply:"Застосувати",from:"Від",period:"Період",today:"Сьогодні",week:"Тиждень",month:"Місяць",quarter:"Квартал",year:"Рік",alltime:"Весь час",prev:"Попередній період",next:"Настпуний період",to:"До",notfound:"Нічого не знайдено"},items:{title:"Предмети",add:"Додати елемент",count:"Немає предметів | ",created:`Елемент "{Ім'я}" створений`,deleted:"Елемент видалено"},errors:{network:"Помилка мережі. ",notFound:"Ми не змогли знайти те, що ви шукали."},toast:{saved:"Збережені зміни",copied:"Скопіювано в буфер обміну"},users:{title:"Користувачі",description:"Керування користувачами.",createUser:"Створити користувача",editUser:"Редагувати користувача",searchUsers:"Пошук користувачів...",createUserFailed:"Створити користувача не вдалося",createUserSuccess:"Користувача створено успішно",editUserFailed:"Редагувати користувача не вдалося",editUserSuccess:"Користувача редаговано успішно",deleteUserSuccess:"Користувача видалено успішно",deleteUserFailed:"Користувача видалено не вдалося",form:{name:"Назва",description:"Опис",color:"Колір",created_at:"Дата створення",count_data:"Кількість використань",topic:"Тема"}},fetchContentTypes:"fetchContentTypes",action:"action",delete:"delete","create-folder":"create-folder",formValues:"formValues",metaParentValue:"metaParentValue",blur:"blur","-":"-",noFilesInFolder:"noFilesInFolder",guide:{menu:"Посібник з меню",general:"Посібник",media:"Посібник з медіа",settings:"Посібник з налаштувань",users:"Посібник з користувачів",content:"Посібник з контенту",appOverview:"Посібник з огляду програми",collections:"Посібник з колекцій",help:"Допомога"}},YA=Object.freeze(Object.defineProperty({__proto__:null,cms:Tc,default:{cms:Tc}},Symbol.toStringTag,{value:"Module"}));Ue.ArticlesPage=Xs,Ue.BuilderPage=UE,Ue.CmsContentWrapper=Y4,Ue.CollectionsPage=Qn,Ue.Dashboard=Zn,Ue.EditCollectionPage=p4,Ue.MenuAddPage=Ki,Ue.MenuItemPage=bc,Ue.MenuPage=qi,Ue.default=Zn,Ue.i18n=jr,Ue.initI18n=RA,Ue.install=jA,Ue.loadLocaleMessages=UA,Ue.setLocale=PA,Object.defineProperties(Ue,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
269
+ `:""}var CA=EA,VA={dump:CA},NA=VA.dump;const vA={class:"space-y-6 max-w-7xl mx-auto"},BA={class:"flex items-center justify-between"},SA={class:"flex items-center gap-4"},AA={class:"flex items-center gap-2"},DA={class:"text-2xl font-semibold text-gray-900 dark:text-white"},MA=["href","title"],TA={class:"flex items-center space-x-3"},LA={key:0,class:"max-w-[1000px] flex flex-col"},$A={class:"flex ml-2 mb-6 w-min border border-gray-200 dark:border-gray-700 rounded-full overflow-hidden"},bc=e.defineComponent({__name:"MenuItemPage",setup(r){De["vs-input-monaco-editor"]=Hl;const{t,locale:l}=Be(),n=qe.useRouter(),a=qe.useRoute(),o=e.computed(()=>[{key:"name",title:t("cms.menu.form.name"),type:"text",placeholder:t("cms.menu.form.name"),required:!0,validators:["required"]},{key:"description",title:t("cms.menu.form.description"),type:"text",placeholder:t("cms.menu.form.description"),required:!0,validators:["required"]},{key:"locale",title:t("cms.menu.form.language"),type:"select",placeholder:t("cms.menu.form.language"),options:[{text:"Ukrainian",id:"uk"},{text:"English",id:"en"}],required:!0,validators:["required"]},{key:"content",title:t("cms.menu.form.content"),type:"monaco-editor",height:"500px",language:"yaml",theme:"vs-light"}]),s=e.ref(null),i=e.ref({}),c=e.ref(!1),u=e.ref(!1),d=p=>{const h={};for(const g of p){const{title:y,value:b,children:w}=g;w&&w.length>0?h[y]=d(w):h[y]=b}return h},m=async()=>{let p={...s.value||{}};if(await i.value.validate()){se({type:"warning",title:t("cms.common.actions.warning"),message:t("cms.menu.createMenuFailed")});return}Array.isArray(p.items)&&(p.items=d(p.items),p.content=NA(p.items));try{await fetch(`/api/cms-menu/${a.params.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(p)}),se({title:t("cms.menu.menuUpdated"),type:"success",message:t("cms.menu.menuUpdated")}),n.push("/menu")}catch{se({title:t("cms.menu.menuUpdateError"),type:"error",message:t("cms.menu.menuUpdateError")})}},f=async()=>{try{const h=await(await fetch(`/api/cms-menu/${a.params.id}`)).json();s.value=h,c.value=!0}catch{c.value=!1}};return e.onMounted(f),(p,h)=>(e.openBlock(),e.createElementBlock("div",vA,[e.createElementVNode("div",BA,[e.createElementVNode("div",SA,[e.createElementVNode("button",{onClick:h[0]||(h[0]=g=>e.unref(n).back()),class:"p-2 text-gray-500 rounded-full hover:text-gray-900 dark:text-gray-400 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"},[e.createVNode(e.unref(hn),{class:"w-5 h-5"})]),e.createElementVNode("div",AA,[e.createElementVNode("h1",DA,e.toDisplayString(p.$t("cms.menu.editMenu")),1),e.createElementVNode("a",{href:`https://cms.opengis.info/${e.unref(l)}/guides/menu/`,target:"_blank",title:p.$t("cms.guide.menu")},[e.createVNode(e.unref(er),{class:"w-5 h-5"})],8,MA)])]),e.createElementVNode("div",TA,[e.createElementVNode("button",{onClick:m,class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 bg-blue-600 text-white shadow-md transition-all duration-200 transform hover:bg-blue-700 hover:shadow-lg hover:scale-105 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"},[e.createVNode(e.unref(xn),{class:"w-4 h-4 mr-2"}),e.createTextVNode(" "+e.toDisplayString(p.$t("cms.common.actions.save")),1)])])]),c.value?(e.openBlock(),e.createElementBlock("div",LA,[e.createElementVNode("div",$A,[e.createElementVNode("button",{onClick:h[1]||(h[1]=g=>u.value=!1),class:e.normalizeClass([{"bg-gray-200 text-gray-900 dark:bg-gray-700 dark:text-white":!u.value},"text-gray-500 hover:text-gray-900 dark:hover:text-white hover:bg-gray-200 dark:hover:bg-gray-700 whitespace-nowrap px-5 py-2 w-[200px] text-sm font-medium"])},e.toDisplayString(p.$t("cms.menu.textEditor")),3),e.createElementVNode("button",{onClick:h[2]||(h[2]=g=>u.value=!0),class:e.normalizeClass([{"bg-gray-200 text-gray-900 dark:bg-gray-700 dark:text-white":u.value},"text-gray-500 hover:text-gray-900 dark:hover:text-white hover:bg-gray-200 dark:hover:bg-gray-700 whitespace-nowrap px-5 py-2 w-[200px] text-sm font-medium"])},e.toDisplayString(p.$t("cms.menu.listTree")),3)]),u.value?(e.openBlock(),e.createBlock(VS,{key:0,modelValue:s.value,"onUpdate:modelValue":h[3]||(h[3]=g=>s.value=g)},null,8,["modelValue"])):(e.openBlock(),e.createBlock(e.unref(He),{key:1,schema:o.value,modelValue:s.value,"onUpdate:modelValue":h[4]||(h[4]=g=>s.value=g),form:i.value,"onUpdate:form":h[5]||(h[5]=g=>i.value=g)},null,8,["schema","modelValue","form"]))])):e.createCommentVNode("",!0)]))}}),FA=Object.freeze(Object.defineProperty({__proto__:null,default:bc},Symbol.toStringTag,{value:"Module"})),IA=(r,t)=>{const l=r[t];return l?typeof l=="function"?l():Promise.resolve(l):new Promise((n,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+t)))})},OA=localStorage.locale||navigator.language.split("cms.-")[0]||"uk",jr=pm({legacy:!1,locale:OA,fallbackLocale:"en",datetimeFormats:{en:{short:{year:"numeric",month:"short",day:"numeric"},long:{dateStyle:"full",timeStyle:"short"},time:{hour:"2-digit",minute:"2-digit"}},uk:{short:{year:"numeric",month:"short",day:"numeric"},long:{dateStyle:"full",timeStyle:"short"},time:{hour:"2-digit",minute:"2-digit"}}},numberFormats:{en:{currency:{style:"currency",currency:"USD"},percent:{style:"percent",minimumFractionDigits:0},compact:{notation:"compact"}},uk:{currency:{style:"currency",currency:"UAH"},percent:{style:"percent",minimumFractionDigits:0},compact:{notation:"compact"}}},messages:{}}),ja="en";async function kc(r){return(await IA(Object.assign({"./locales/en.json":()=>Promise.resolve().then(()=>WA),"./locales/uk.json":()=>Promise.resolve().then(()=>YA)}),`./locales/${r}.json`)).default}async function za(r){try{const t=await kc(r);return jr.global.setLocaleMessage(r,t),t}catch(t){if(console.error(`Failed to load locale ${r}:`,t),r!==ja)try{const l=await kc(ja);return jr.global.setLocaleMessage(r,l),l}catch(l){throw console.error(`Failed to load fallback locale ${ja}:`,l),l}throw t}}async function PA(r){await za(r),jr.global.locale.value=r,localStorage.setItem("locale",r),document.documentElement.lang=r,window.dispatchEvent(new CustomEvent("cms.storage",{detail:{key:"locale",oldValue:null,newValue:r}}))}async function RA(){const r=jr.global.locale.value;await za(r),jr.global.locale.value=r,localStorage.setItem("locale",r),document.documentElement.lang=r}async function UA(r){return await za(r)}function jA(r){r.component("Dashboard",Zn)}function ir(r){return typeof r=="string"||r instanceof String}function xc(r){var t;return typeof r=="object"&&r!=null&&(r==null||(t=r.constructor)==null?void 0:t.name)==="Object"}function wc(r,t){return Array.isArray(t)?wc(r,(l,n)=>t.includes(n)):Object.entries(r).reduce((l,n)=>{let[a,o]=n;return t(o,a)&&(l[a]=o),l},{})}const ae={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function _c(r){switch(r){case ae.LEFT:return ae.FORCE_LEFT;case ae.RIGHT:return ae.FORCE_RIGHT;default:return r}}function Ha(r){return r.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function un(r,t){if(t===r)return!0;const l=Array.isArray(t),n=Array.isArray(r);let a;if(l&&n){if(t.length!=r.length)return!1;for(a=0;a<t.length;a++)if(!un(t[a],r[a]))return!1;return!0}if(l!=n)return!1;if(t&&r&&typeof t=="object"&&typeof r=="object"){const o=t instanceof Date,s=r instanceof Date;if(o&&s)return t.getTime()==r.getTime();if(o!=s)return!1;const i=t instanceof RegExp,c=r instanceof RegExp;if(i&&c)return t.toString()==r.toString();if(i!=c)return!1;const u=Object.keys(t);for(a=0;a<u.length;a++)if(!Object.prototype.hasOwnProperty.call(r,u[a]))return!1;for(a=0;a<u.length;a++)if(!un(r[u[a]],t[u[a]]))return!1;return!0}else if(t&&r&&typeof t=="function"&&typeof r=="function")return t.toString()===r.toString();return!1}class zA{constructor(t){for(Object.assign(this,t);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?ae.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?ae.RIGHT:ae.LEFT}}function me(r,t){return new me.InputMask(r,t)}function Ec(r){if(r==null)throw new Error("mask property should be defined");return r instanceof RegExp?me.MaskedRegExp:ir(r)?me.MaskedPattern:r===Date?me.MaskedDate:r===Number?me.MaskedNumber:Array.isArray(r)||r===Array?me.MaskedDynamic:me.Masked&&r.prototype instanceof me.Masked?r:me.Masked&&r instanceof me.Masked?r.constructor:r instanceof Function?me.MaskedFunction:(console.warn("Mask not found for mask",r),me.Masked)}function zr(r){if(!r)throw new Error("Options in not defined");if(me.Masked){if(r.prototype instanceof me.Masked)return{mask:r};const{mask:t=void 0,...l}=r instanceof me.Masked?{mask:r}:xc(r)&&r.mask instanceof me.Masked?r:{};if(t){const n=t.mask;return{...wc(t,(a,o)=>!o.startsWith("_")),mask:t.constructor,_mask:n,...l}}}return xc(r)?{...r}:{mask:r}}function Pt(r){if(me.Masked&&r instanceof me.Masked)return r;const t=zr(r),l=Ec(t.mask);if(!l)throw new Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===l&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new l(t)}me.createMask=Pt;class mn{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch{}return t??this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch{}return t??this.value.length}select(t,l){if(!(t==null||l==null||t===this.selectionStart&&l===this.selectionEnd))try{this._unsafeSelect(t,l)}catch{}}get isActive(){return!1}}me.MaskElement=mn;const Cc=90,HA=89;class yl extends mn{constructor(t){super(),this.input=t,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var t,l,n;return(t=(l=(n=this.input).getRootNode)==null?void 0:l.call(n))!=null?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",t.drop),this.input.addEventListener("click",t.click),this.input.addEventListener("focus",t.focus),this.input.addEventListener("blur",t.commit),this._handlers=t}_onKeydown(t){if(this._handlers.redo&&(t.keyCode===Cc&&t.shiftKey&&(t.metaKey||t.ctrlKey)||t.keyCode===HA&&t.ctrlKey))return t.preventDefault(),this._handlers.redo(t);if(this._handlers.undo&&t.keyCode===Cc&&(t.metaKey||t.ctrlKey))return t.preventDefault(),this._handlers.undo(t);t.isComposing||this._handlers.selectionChange(t)}_onBeforeinput(t){if(t.inputType==="historyUndo"&&this._handlers.undo)return t.preventDefault(),this._handlers.undo(t);if(t.inputType==="historyRedo"&&this._handlers.redo)return t.preventDefault(),this._handlers.redo(t)}_onCompositionEnd(t){this._handlers.input(t)}_onInput(t){t.isComposing||this._handlers.input(t)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}me.HTMLMaskElement=yl;class Vc extends yl{constructor(t){super(t),this.input=t}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,l){this.input.setSelectionRange(t,l)}get value(){return this.input.value}set value(t){this.input.value=t}}me.HTMLMaskElement=yl;class qa extends yl{get _unsafeSelectionStart(){const t=this.rootElement,l=t.getSelection&&t.getSelection(),n=l&&l.anchorOffset,a=l&&l.focusOffset;return a==null||n==null||n<a?n:a}get _unsafeSelectionEnd(){const t=this.rootElement,l=t.getSelection&&t.getSelection(),n=l&&l.anchorOffset,a=l&&l.focusOffset;return a==null||n==null||n>a?n:a}_unsafeSelect(t,l){if(!this.rootElement.createRange)return;const n=this.rootElement.createRange();n.setStart(this.input.firstChild||this.input,t),n.setEnd(this.input.lastChild||this.input,l);const a=this.rootElement,o=a.getSelection&&a.getSelection();o&&(o.removeAllRanges(),o.addRange(n))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}}me.HTMLContenteditableMaskElement=qa;class pn{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(t){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(t),this.states.length>pn.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(t){return this.currentIndex=Math.min(Math.max(this.currentIndex+t,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}pn.MAX_LENGTH=100;class Nc{constructor(t,l){this.el=t instanceof mn?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new qa(t):new Vc(t),this.masked=Pt(l),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new pn,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(t){var l;return t==null||((l=this.masked)==null?void 0:l.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof me.Masked)&&this.masked.constructor===Ec(t)){this.masked.updateOptions({mask:t});return}const l=t instanceof me.Masked?t:Pt({mask:t});l.unmaskedValue=this.masked.unmaskedValue,this.masked=l}get value(){return this._value}set value(t){this.value!==t&&(this.masked.value=t,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){this.unmaskedValue!==t&&(this.masked.unmaskedValue=t,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(t){this.rawInputValue!==t&&(this.masked.rawInputValue=t,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(t){this.masked.typedValueEquals(t)||(this.masked.typedValue=t,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(t,l){const n=this._listeners[t];n&&n.forEach(a=>a(l))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){!this.el||!this.el.isActive||(this.el.select(t,t),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(t){const l=this.masked.unmaskedValue,n=this.masked.value,a=this.masked.rawInputValue,o=this.displayValue,s=this.unmaskedValue!==l||this.value!==n||this._rawInputValue!==a;this._unmaskedValue=l,this._value=n,this._rawInputValue=a,this.el.value!==o&&(this.el.value=o),t==="auto"?this.alignCursor():t!=null&&(this.cursorPos=t),s&&this._fireChangeEvents(),!this._historyChanging&&(s||this.history.isEmpty)&&this.history.push({unmaskedValue:l,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(t){const{mask:l,...n}=t,a=!this.maskEquals(l),o=this.masked.optionsIsChanged(n);a&&(this.mask=l),o&&this.masked.updateOptions(n),(a||o)&&this.updateControl()}updateCursor(t){t!=null&&(this.cursorPos=t,this._delayUpdateCursor(t))}_delayUpdateCursor(t){this._abortUpdateCursor(),this._changingCursorPos=t,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,ae.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(t,l){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(l),this}off(t,l){if(!this._listeners[t])return this;if(!l)return delete this._listeners[t],this;const n=this._listeners[t].indexOf(l);return n>=0&&this._listeners[t].splice(n,1),this}_onInput(t){this._inputEvent=t,this._abortUpdateCursor();const l=new zA({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),n=this.masked.rawInputValue,a=this.masked.splice(l.startChangePos,l.removed.length,l.inserted,l.removeDirection,{input:!0,raw:!0}).offset,o=n===this.masked.rawInputValue?l.removeDirection:ae.NONE;let s=this.masked.nearestInputPos(l.startChangePos+a,o);o!==ae.NONE&&(s=this.masked.nearestInputPos(s,ae.NONE)),this.updateControl(s),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(t){t.preventDefault(),t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(t){t&&(this._historyChanging=!0,this.unmaskedValue=t.unmaskedValue,this.el.select(t.selection.start,t.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}me.InputMask=Nc;class ge{static normalize(t){return Array.isArray(t)?t:[t,new ge]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},t)}aggregate(t){return this.inserted+=t.inserted,this.rawInserted+=t.rawInserted,this.tailShift+=t.tailShift,this.skip=this.skip||t.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(t){return this.inserted===t.inserted&&this.tailShift===t.tailShift&&this.rawInserted===t.rawInserted&&this.skip===t.skip}}me.ChangeDetails=ge;class Rt{constructor(t,l,n){t===void 0&&(t=""),l===void 0&&(l=0),this.value=t,this.from=l,this.stop=n}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||t!=null&&this.from>=t)return"";const l=this.value[0];return this.value=this.value.slice(1),l}shift(){if(!this.value.length)return"";const t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}}class et{constructor(t){this._value="",this._update({...et.DEFAULTS,...t}),this._initialized=!0}updateOptions(t){this.optionsIsChanged(t)&&this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:!0})}resolve(t,l){l===void 0&&(l={input:!0}),this.reset(),this.append(t,l,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){this.format?this.value=this.format(t,this):this.unmaskedValue=String(t)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(t){this.resolve(t,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(t,l){return t}totalInputPositions(t,l){return t===void 0&&(t=0),l===void 0&&(l=this.displayValue.length),Math.min(this.displayValue.length,l-t)}extractInput(t,l,n){return t===void 0&&(t=0),l===void 0&&(l=this.displayValue.length),this.displayValue.slice(t,l)}extractTail(t,l){return t===void 0&&(t=0),l===void 0&&(l=this.displayValue.length),new Rt(this.extractInput(t,l),t)}appendTail(t){return ir(t)&&(t=new Rt(String(t))),t.appendTo(this)}_appendCharRaw(t,l){return t?(this._value+=t,new ge({inserted:t,rawInserted:t})):new ge}_appendChar(t,l,n){l===void 0&&(l={});const a=this.state;let o;if([t,o]=this.doPrepareChar(t,l),t&&(o=o.aggregate(this._appendCharRaw(t,l)),!o.rawInserted&&this.autofix==="pad")){const s=this.state;this.state=a;let i=this.pad(l);const c=this._appendCharRaw(t,l);i=i.aggregate(c),c.rawInserted||i.equals(o)?o=i:this.state=s}if(o.inserted){let s,i=this.doValidate(l)!==!1;if(i&&n!=null){const c=this.state;if(this.overwrite===!0){s=n.state;for(let d=0;d<o.rawInserted.length;++d)n.unshift(this.displayValue.length-o.tailShift)}let u=this.appendTail(n);if(i=u.rawInserted.length===n.toString().length,!(i&&u.inserted)&&this.overwrite==="shift"){this.state=c,s=n.state;for(let d=0;d<o.rawInserted.length;++d)n.shift();u=this.appendTail(n),i=u.rawInserted.length===n.toString().length}i&&u.inserted&&(this.state=c)}i||(o=new ge,this.state=a,n&&s&&(n.state=s))}return o}_appendPlaceholder(){return new ge}_appendEager(){return new ge}append(t,l,n){if(!ir(t))throw new Error("value should be string");const a=ir(n)?new Rt(String(n)):n;l!=null&&l.tail&&(l._beforeTailState=this.state);let o;[t,o]=this.doPrepare(t,l);for(let s=0;s<t.length;++s){const i=this._appendChar(t[s],l,a);if(!i.rawInserted&&!this.doSkipInvalid(t[s],l,a))break;o.aggregate(i)}return(this.eager===!0||this.eager==="append")&&l!=null&&l.input&&t&&o.aggregate(this._appendEager()),a!=null&&(o.tailShift+=this.appendTail(a).tailShift),o}remove(t,l){return t===void 0&&(t=0),l===void 0&&(l=this.displayValue.length),this._value=this.displayValue.slice(0,t)+this.displayValue.slice(l),new ge}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;const l=this.rawInputValue,n=this.value,a=t();return this.rawInputValue=l,this.value&&this.value!==n&&n.indexOf(this.value)===0&&(this.append(n.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,a}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;const l=this.state,n=t(this);return this.state=l,delete this._isolated,n}doSkipInvalid(t,l,n){return!!this.skipInvalid}doPrepare(t,l){return l===void 0&&(l={}),ge.normalize(this.prepare?this.prepare(t,this,l):t)}doPrepareChar(t,l){return l===void 0&&(l={}),ge.normalize(this.prepareChar?this.prepareChar(t,this,l):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){this.commit&&this.commit(this.value,this)}splice(t,l,n,a,o){n===void 0&&(n=""),a===void 0&&(a=ae.NONE),o===void 0&&(o={input:!0});const s=t+l,i=this.extractTail(s),c=this.eager===!0||this.eager==="remove";let u;c&&(a=_c(a),u=this.extractInput(0,s,{raw:!0}));let d=t;const m=new ge;if(a!==ae.NONE&&(d=this.nearestInputPos(t,l>1&&t!==0&&!c?ae.NONE:a),m.tailShift=d-t),m.aggregate(this.remove(d)),c&&a!==ae.NONE&&u===this.rawInputValue)if(a===ae.FORCE_LEFT){let f;for(;u===this.rawInputValue&&(f=this.displayValue.length);)m.aggregate(new ge({tailShift:-1})).aggregate(this.remove(f-1))}else a===ae.FORCE_RIGHT&&i.unshift();return m.aggregate(this.append(n,o,i))}maskEquals(t){return this.mask===t}optionsIsChanged(t){return!un(this,t)}typedValueEquals(t){const l=this.typedValue;return t===l||et.EMPTY_VALUES.includes(t)&&et.EMPTY_VALUES.includes(l)||(this.format?this.format(t,this)===this.format(this.typedValue,this):!1)}pad(t){return new ge}}et.DEFAULTS={skipInvalid:!0},et.EMPTY_VALUES=[void 0,null,""],me.Masked=et;class cr{constructor(t,l){t===void 0&&(t=[]),l===void 0&&(l=0),this.chunks=t,this.from=l}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=ir(t)?new Rt(String(t)):t;const l=this.chunks[this.chunks.length-1],n=l&&(l.stop===t.stop||t.stop==null)&&t.from===l.from+l.toString().length;if(t instanceof Rt)n?l.extend(t.toString()):this.chunks.push(t);else if(t instanceof cr){if(t.stop==null){let a;for(;t.chunks.length&&t.chunks[0].stop==null;)a=t.chunks.shift(),a.from+=t.from,this.extend(a)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof me.MaskedPattern))return new Rt(this.toString()).appendTo(t);const l=new ge;for(let n=0;n<this.chunks.length;++n){const a=this.chunks[n],o=t._mapPosToBlock(t.displayValue.length),s=a.stop;let i;if(s!=null&&(!o||o.index<=s)&&((a instanceof cr||t._stops.indexOf(s)>=0)&&l.aggregate(t._appendPlaceholder(s)),i=a instanceof cr&&t._blocks[s]),i){const c=i.appendTail(a);l.aggregate(c);const u=a.toString().slice(c.rawInserted.length);u&&l.aggregate(t.append(u,{tail:!0}))}else l.aggregate(t.append(a.toString(),{tail:!0}))}return l}get state(){return{chunks:this.chunks.map(t=>t.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){const{chunks:l,...n}=t;Object.assign(this,n),this.chunks=l.map(a=>{const o="chunks"in a?new cr:new Rt;return o.state=a,o})}unshift(t){if(!this.chunks.length||t!=null&&this.from>=t)return"";const l=t!=null?t-this.from:t;let n=0;for(;n<this.chunks.length;){const a=this.chunks[n],o=a.unshift(l);if(a.toString()){if(!o)break;++n}else this.chunks.splice(n,1);if(o)return o}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){const l=this.chunks[t],n=l.shift();if(l.toString()){if(!n)break;--t}else this.chunks.splice(t,1);if(n)return n}return""}}class qA{constructor(t,l){this.masked=t,this._log=[];const{offset:n,index:a}=t._mapPosToBlock(l)||(l<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=n,this.index=a,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){const t=this._log.pop();return t&&(this.state=t),t}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(t){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((l=this.block)==null?void 0:l.displayValue.length)||0){var l;if(t())return this.ok=!0}return this.ok=!1}_pushRight(t){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(t())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,ae.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,ae.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,ae.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,ae.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,ae.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,ae.NONE),!0})}}class Ka{constructor(t){Object.assign(this,t),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(t,l){return t===void 0&&(t=0),l===void 0&&(l=this._value.length),this._value=this._value.slice(0,t)+this._value.slice(l),this._value||(this._isRawInput=!1),new ge}nearestInputPos(t,l){l===void 0&&(l=ae.NONE);const n=0,a=this._value.length;switch(l){case ae.LEFT:case ae.FORCE_LEFT:return n;case ae.NONE:case ae.RIGHT:case ae.FORCE_RIGHT:default:return a}}totalInputPositions(t,l){return t===void 0&&(t=0),l===void 0&&(l=this._value.length),this._isRawInput?l-t:0}extractInput(t,l,n){return t===void 0&&(t=0),l===void 0&&(l=this._value.length),n===void 0&&(n={}),n.raw&&this._isRawInput&&this._value.slice(t,l)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(t,l){if(l===void 0&&(l={}),this.isFilled)return new ge;const n=this.eager===!0||this.eager==="append",a=this.char===t&&(this.isUnmasking||l.input||l.raw)&&(!l.raw||!n)&&!l.tail,o=new ge({inserted:this.char,rawInserted:a?this.char:""});return this._value=this.char,this._isRawInput=a&&(l.raw||l.input),o}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const t=new ge;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new Rt("")}appendTail(t){return ir(t)&&(t=new Rt(String(t))),t.appendTo(this)}append(t,l,n){const a=this._appendChar(t[0],l);return n!=null&&(a.tailShift+=this.appendTail(n).tailShift),a}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=!!t._rawInputValue}pad(t){return this._appendPlaceholder()}}class bl{constructor(t){const{parent:l,isOptional:n,placeholderChar:a,displayChar:o,lazy:s,eager:i,...c}=t;this.masked=Pt(c),Object.assign(this,{parent:l,isOptional:n,placeholderChar:a,displayChar:o,lazy:s,eager:i})}reset(){this.isFilled=!1,this.masked.reset()}remove(t,l){return t===void 0&&(t=0),l===void 0&&(l=this.value.length),t===0&&l>=1?(this.isFilled=!1,this.masked.remove(t,l)):new ge}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(t,l){if(l===void 0&&(l={}),this.isFilled)return new ge;const n=this.masked.state;let a=this.masked._appendChar(t,this.currentMaskFlags(l));return a.inserted&&this.doValidate(l)===!1&&(a=new ge,this.masked.state=n),!a.inserted&&!this.isOptional&&!this.lazy&&!l.input&&(a.inserted=this.placeholderChar),a.skip=!a.inserted&&!this.isOptional,this.isFilled=!!a.inserted,a}append(t,l,n){return this.masked.append(t,this.currentMaskFlags(l),n)}_appendPlaceholder(){return this.isFilled||this.isOptional?new ge:(this.isFilled=!0,new ge({inserted:this.placeholderChar}))}_appendEager(){return new ge}extractTail(t,l){return this.masked.extractTail(t,l)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,l,n){return t===void 0&&(t=0),l===void 0&&(l=this.value.length),this.masked.extractInput(t,l,n)}nearestInputPos(t,l){l===void 0&&(l=ae.NONE);const n=0,a=this.value.length,o=Math.min(Math.max(t,n),a);switch(l){case ae.LEFT:case ae.FORCE_LEFT:return this.isComplete?o:n;case ae.RIGHT:case ae.FORCE_RIGHT:return this.isComplete?o:a;case ae.NONE:default:return o}}totalInputPositions(t,l){return t===void 0&&(t=0),l===void 0&&(l=this.value.length),this.value.slice(t,l).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked,this.isFilled=t.isFilled}currentMaskFlags(t){var l;return{...t,_beforeTailState:(t==null||(l=t._beforeTailState)==null?void 0:l.masked)||(t==null?void 0:t._beforeTailState)}}pad(t){return new ge}}bl.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class vc extends et{updateOptions(t){super.updateOptions(t)}_update(t){const l=t.mask;l&&(t.validate=n=>n.search(l)>=0),super._update(t)}}me.MaskedRegExp=vc;class tt extends et{constructor(t){super({...tt.DEFAULTS,...t,definitions:Object.assign({},bl.DEFAULT_DEFINITIONS,t==null?void 0:t.definitions)})}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions),super._update(t),this._rebuildMask()}_rebuildMask(){const t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const l=this.mask;if(!l||!t)return;let n=!1,a=!1;for(let o=0;o<l.length;++o){if(this.blocks){const u=l.slice(o),d=Object.keys(this.blocks).filter(f=>u.indexOf(f)===0);d.sort((f,p)=>p.length-f.length);const m=d[0];if(m){const{expose:f,repeat:p,...h}=zr(this.blocks[m]),g={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...h,repeat:p,parent:this},y=p!=null?new me.RepeatBlock(g):Pt(g);y&&(this._blocks.push(y),f&&(this.exposeBlock=y),this._maskedBlocks[m]||(this._maskedBlocks[m]=[]),this._maskedBlocks[m].push(this._blocks.length-1)),o+=m.length-1;continue}}let s=l[o],i=s in t;if(s===tt.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(s==="{"||s==="}"){n=!n;continue}if(s==="["||s==="]"){a=!a;continue}if(s===tt.ESCAPE_CHAR){if(++o,s=l[o],!s)break;i=!1}const c=i?new bl({isOptional:a,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...zr(t[s]),parent:this}):new Ka({char:s,eager:this.eager,isUnmasking:n});this._blocks.push(c)}}get state(){return{...super.state,_blocks:this._blocks.map(t=>t.state)}}set state(t){if(!t){this.reset();return}const{_blocks:l,...n}=t;this._blocks.forEach((a,o)=>a.state=l[o]),super.state=n}reset(){super.reset(),this._blocks.forEach(t=>t.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(t=>t.isComplete)}get isFilled(){return this._blocks.every(t=>t.isFilled)}get isFixed(){return this._blocks.every(t=>t.isFixed)}get isOptional(){return this._blocks.every(t=>t.isOptional)}doCommit(){this._blocks.forEach(t=>t.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((t,l)=>t+=l.unmaskedValue,"")}set unmaskedValue(t){if(this.exposeBlock){const l=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t,this.appendTail(l),this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((t,l)=>t+=l.value,"")}set value(t){if(this.exposeBlock){const l=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t,this.appendTail(l),this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){const l=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t,this.appendTail(l),this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce((t,l)=>t+=l.displayValue,"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;const l=new ge;let n=(t=this._mapPosToBlock(this.displayValue.length))==null?void 0:t.index;if(n==null)return l;this._blocks[n].isFilled&&++n;for(let a=n;a<this._blocks.length;++a){const o=this._blocks[a]._appendEager();if(!o.inserted)break;l.aggregate(o)}return l}_appendCharRaw(t,l){l===void 0&&(l={});const n=this._mapPosToBlock(this.displayValue.length),a=new ge;if(!n)return a;for(let s=n.index,i;i=this._blocks[s];++s){var o;const c=i._appendChar(t,{...l,_beforeTailState:(o=l._beforeTailState)==null||(o=o._blocks)==null?void 0:o[s]});if(a.aggregate(c),c.consumed)break}return a}extractTail(t,l){t===void 0&&(t=0),l===void 0&&(l=this.displayValue.length);const n=new cr;return t===l||this._forEachBlocksInRange(t,l,(a,o,s,i)=>{const c=a.extractTail(s,i);c.stop=this._findStopBefore(o),c.from=this._blockStartPos(o),c instanceof cr&&(c.blockIndex=o),n.extend(c)}),n}extractInput(t,l,n){if(t===void 0&&(t=0),l===void 0&&(l=this.displayValue.length),n===void 0&&(n={}),t===l)return"";let a="";return this._forEachBlocksInRange(t,l,(o,s,i,c)=>{a+=o.extractInput(i,c,n)}),a}_findStopBefore(t){let l;for(let n=0;n<this._stops.length;++n){const a=this._stops[n];if(a<=t)l=a;else break}return l}_appendPlaceholder(t){const l=new ge;if(this.lazy&&t==null)return l;const n=this._mapPosToBlock(this.displayValue.length);if(!n)return l;const a=n.index,o=t??this._blocks.length;return this._blocks.slice(a,o).forEach(s=>{if(!s.lazy||t!=null){var i;l.aggregate(s._appendPlaceholder((i=s._blocks)==null?void 0:i.length))}}),l}_mapPosToBlock(t){let l="";for(let n=0;n<this._blocks.length;++n){const a=this._blocks[n],o=l.length;if(l+=a.displayValue,t<=l.length)return{index:n,offset:t-o}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce((l,n)=>l+=n.displayValue.length,0)}_forEachBlocksInRange(t,l,n){l===void 0&&(l=this.displayValue.length);const a=this._mapPosToBlock(t);if(a){const o=this._mapPosToBlock(l),s=o&&a.index===o.index,i=a.offset,c=o&&s?o.offset:this._blocks[a.index].displayValue.length;if(n(this._blocks[a.index],a.index,i,c),o&&!s){for(let u=a.index+1;u<o.index;++u)n(this._blocks[u],u,0,this._blocks[u].displayValue.length);n(this._blocks[o.index],o.index,0,o.offset)}}}remove(t,l){t===void 0&&(t=0),l===void 0&&(l=this.displayValue.length);const n=super.remove(t,l);return this._forEachBlocksInRange(t,l,(a,o,s,i)=>{n.aggregate(a.remove(s,i))}),n}nearestInputPos(t,l){if(l===void 0&&(l=ae.NONE),!this._blocks.length)return 0;const n=new qA(this,t);if(l===ae.NONE)return n.pushRightBeforeInput()||(n.popState(),n.pushLeftBeforeInput())?n.pos:this.displayValue.length;if(l===ae.LEFT||l===ae.FORCE_LEFT){if(l===ae.LEFT){if(n.pushRightBeforeFilled(),n.ok&&n.pos===t)return t;n.popState()}if(n.pushLeftBeforeInput(),n.pushLeftBeforeRequired(),n.pushLeftBeforeFilled(),l===ae.LEFT){if(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.ok&&n.pos<=t||(n.popState(),n.ok&&n.pos<=t))return n.pos;n.popState()}return n.ok?n.pos:l===ae.FORCE_LEFT?0:(n.popState(),n.ok||(n.popState(),n.ok)?n.pos:0)}return l===ae.RIGHT||l===ae.FORCE_RIGHT?(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.pushRightBeforeFilled()?n.pos:l===ae.FORCE_RIGHT?this.displayValue.length:(n.popState(),n.ok||(n.popState(),n.ok)?n.pos:this.nearestInputPos(t,ae.LEFT))):t}totalInputPositions(t,l){t===void 0&&(t=0),l===void 0&&(l=this.displayValue.length);let n=0;return this._forEachBlocksInRange(t,l,(a,o,s,i)=>{n+=a.totalInputPositions(s,i)}),n}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){const l=this._maskedBlocks[t];return l?l.map(n=>this._blocks[n]):[]}pad(t){const l=new ge;return this._forEachBlocksInRange(0,this.displayValue.length,n=>l.aggregate(n.pad(t))),l}}tt.DEFAULTS={...et.DEFAULTS,lazy:!0,placeholderChar:"_"},tt.STOP_CHAR="`",tt.ESCAPE_CHAR="\\",tt.InputDefinition=bl,tt.FixedDefinition=Ka,me.MaskedPattern=tt;class kl extends tt{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{to:l=this.to||0,from:n=this.from||0,maxLength:a=this.maxLength||0,autofix:o=this.autofix,...s}=t;this.to=l,this.from=n,this.maxLength=Math.max(String(l).length,a),this.autofix=o;const i=String(this.from).padStart(this.maxLength,"0"),c=String(this.to).padStart(this.maxLength,"0");let u=0;for(;u<c.length&&c[u]===i[u];)++u;s.mask=c.slice(0,u).replace(/0/g,"\\0")+"0".repeat(this.maxLength-u),super._update(s)}get isComplete(){return super.isComplete&&!!this.value}boundaries(t){let l="",n="";const[,a,o]=t.match(/^(\D*)(\d*)(\D*)/)||[];return o&&(l="0".repeat(a.length)+o,n="9".repeat(a.length)+o),l=l.padEnd(this.maxLength,"0"),n=n.padEnd(this.maxLength,"9"),[l,n]}doPrepareChar(t,l){l===void 0&&(l={});let n;return[t,n]=super.doPrepareChar(t.replace(/\D/g,""),l),t||(n.skip=!this.isComplete),[t,n]}_appendCharRaw(t,l){if(l===void 0&&(l={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(t,l);const n=String(this.from).padStart(this.maxLength,"0"),a=String(this.to).padStart(this.maxLength,"0"),[o,s]=this.boundaries(this.value+t);return Number(s)<this.from?super._appendCharRaw(n[this.value.length],l):Number(o)>this.to?!l.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(n[this.value.length],l).aggregate(this._appendCharRaw(t,l)):super._appendCharRaw(a[this.value.length],l):super._appendCharRaw(t,l)}doValidate(t){const l=this.value;if(l.search(/[^0]/)===-1&&l.length<=this._matchFrom)return!0;const[n,a]=this.boundaries(l);return this.from<=Number(a)&&Number(n)<=this.to&&super.doValidate(t)}pad(t){const l=new ge;if(this.value.length===this.maxLength)return l;const n=this.value,a=this.maxLength-this.value.length;if(a){this.reset();for(let o=0;o<a;++o)l.aggregate(super._appendCharRaw("0",t));n.split("").forEach(o=>this._appendCharRaw(o))}return l}}me.MaskedRange=kl;const KA="d{.}`m{.}`Y";class Ut extends tt{static extractPatternOptions(t){const{mask:l,pattern:n,...a}=t;return{...a,mask:ir(l)?l:n}}constructor(t){super(Ut.extractPatternOptions({...Ut.DEFAULTS,...t}))}updateOptions(t){super.updateOptions(t)}_update(t){const{mask:l,pattern:n,blocks:a,...o}={...Ut.DEFAULTS,...t},s=Object.assign({},Ut.GET_DEFAULT_BLOCKS());t.min&&(s.Y.from=t.min.getFullYear()),t.max&&(s.Y.to=t.max.getFullYear()),t.min&&t.max&&s.Y.from===s.Y.to&&(s.m.from=t.min.getMonth()+1,s.m.to=t.max.getMonth()+1,s.m.from===s.m.to&&(s.d.from=t.min.getDate(),s.d.to=t.max.getDate())),Object.assign(s,this.blocks,a),super._update({...o,mask:ir(l)?l:n,blocks:s})}doValidate(t){const l=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&l!=null&&(this.min==null||this.min<=l)&&(this.max==null||l<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}optionsIsChanged(t){return super.optionsIsChanged(Ut.extractPatternOptions(t))}}Ut.GET_DEFAULT_BLOCKS=()=>({d:{mask:kl,from:1,to:31,maxLength:2},m:{mask:kl,from:1,to:12,maxLength:2},Y:{mask:kl,from:1900,to:9999}}),Ut.DEFAULTS={...tt.DEFAULTS,mask:Date,pattern:KA,format:(r,t)=>{if(!r)return"";const l=String(r.getDate()).padStart(2,"0"),n=String(r.getMonth()+1).padStart(2,"0"),a=r.getFullYear();return[l,n,a].join(".")},parse:(r,t)=>{const[l,n,a]=r.split(".").map(Number);return new Date(a,n-1,l)}},me.MaskedDate=Ut;class xl extends et{constructor(t){super({...xl.DEFAULTS,...t}),this.currentMask=void 0}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),"mask"in t&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(t.mask)?t.mask.map(l=>{const{expose:n,...a}=zr(l),o=Pt({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...a});return n&&(this.exposeMask=o),o}):[])}_appendCharRaw(t,l){l===void 0&&(l={});const n=this._applyDispatch(t,l);return this.currentMask&&n.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(l))),n}_applyDispatch(t,l,n){t===void 0&&(t=""),l===void 0&&(l={}),n===void 0&&(n="");const a=l.tail&&l._beforeTailState!=null?l._beforeTailState._value:this.value,o=this.rawInputValue,s=l.tail&&l._beforeTailState!=null?l._beforeTailState._rawInputValue:o,i=o.slice(s.length),c=this.currentMask,u=new ge,d=c==null?void 0:c.state;return this.currentMask=this.doDispatch(t,{...l},n),this.currentMask&&(this.currentMask!==c?(this.currentMask.reset(),s&&(this.currentMask.append(s,{raw:!0}),u.tailShift=this.currentMask.value.length-a.length),i&&(u.tailShift+=this.currentMask.append(i,{raw:!0,tail:!0}).tailShift)):d&&(this.currentMask.state=d)),u}_appendPlaceholder(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}_appendEager(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendEager()),t}appendTail(t){const l=new ge;return t&&l.aggregate(this._applyDispatch("",{},t)),l.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var l,n;return{...t,_beforeTailState:((l=t._beforeTailState)==null?void 0:l.currentMaskRef)===this.currentMask&&((n=t._beforeTailState)==null?void 0:n.currentMask)||t._beforeTailState}}doDispatch(t,l,n){return l===void 0&&(l={}),n===void 0&&(n=""),this.dispatch(t,this,l,n)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,l){l===void 0&&(l={});let[n,a]=super.doPrepare(t,l);if(this.currentMask){let o;[n,o]=super.doPrepare(n,this.currentMaskFlags(l)),a=a.aggregate(o)}return[n,a]}doPrepareChar(t,l){l===void 0&&(l={});let[n,a]=super.doPrepareChar(t,l);if(this.currentMask){let o;[n,o]=super.doPrepareChar(n,this.currentMaskFlags(l)),a=a.aggregate(o)}return[n,a]}reset(){var t;(t=this.currentMask)==null||t.reset(),this.compiledMasks.forEach(l=>l.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){this.exposeMask?(this.exposeMask.value=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){this.exposeMask?(this.exposeMask.unmaskedValue=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask){this.exposeMask.typedValue=t,this.currentMask=this.exposeMask,this._applyDispatch();return}let l=String(t);this.currentMask&&(this.currentMask.typedValue=t,l=this.currentMask.unmaskedValue),this.unmaskedValue=l}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return!!((t=this.currentMask)!=null&&t.isComplete)}get isFilled(){var t;return!!((t=this.currentMask)!=null&&t.isFilled)}remove(t,l){const n=new ge;return this.currentMask&&n.aggregate(this.currentMask.remove(t,l)).aggregate(this._applyDispatch()),n}get state(){var t;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(l=>l.state),currentMaskRef:this.currentMask,currentMask:(t=this.currentMask)==null?void 0:t.state}}set state(t){const{compiledMasks:l,currentMaskRef:n,currentMask:a,...o}=t;l&&this.compiledMasks.forEach((s,i)=>s.state=l[i]),n!=null&&(this.currentMask=n,this.currentMask.state=a),super.state=o}extractInput(t,l,n){return this.currentMask?this.currentMask.extractInput(t,l,n):""}extractTail(t,l){return this.currentMask?this.currentMask.extractTail(t,l):super.extractTail(t,l)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(t,l){return this.currentMask?this.currentMask.nearestInputPos(t,l):super.nearestInputPos(t,l)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(t){this._autofix=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every((l,n)=>{if(!t[n])return;const{mask:a,...o}=t[n];return un(l,o)&&l.maskEquals(a)}):super.maskEquals(t)}typedValueEquals(t){var l;return!!((l=this.currentMask)!=null&&l.typedValueEquals(t))}}xl.DEFAULTS={...et.DEFAULTS,dispatch:(r,t,l,n)=>{if(!t.compiledMasks.length)return;const a=t.rawInputValue,o=t.compiledMasks.map((s,i)=>{const c=t.currentMask===s,u=c?s.displayValue.length:s.nearestInputPos(s.displayValue.length,ae.FORCE_LEFT);return s.rawInputValue!==a?(s.reset(),s.append(a,{raw:!0})):c||s.remove(u),s.append(r,t.currentMaskFlags(l)),s.appendTail(n),{index:i,weight:s.rawInputValue.length,totalInputPositions:s.totalInputPositions(0,Math.max(u,s.nearestInputPos(s.displayValue.length,ae.FORCE_LEFT)))}});return o.sort((s,i)=>i.weight-s.weight||i.totalInputPositions-s.totalInputPositions),t.compiledMasks[o[0].index]}},me.MaskedDynamic=xl;class wl extends tt{constructor(t){super({...wl.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){const{enum:l,...n}=t;if(l){const a=l.map(i=>i.length),o=Math.min(...a),s=Math.max(...a)-o;n.mask="*".repeat(o),s&&(n.mask+="["+"*".repeat(s)+"]"),this.enum=l}super._update(n)}_appendCharRaw(t,l){l===void 0&&(l={});const n=Math.min(this.nearestInputPos(0,ae.FORCE_RIGHT),this.value.length),a=this.enum.filter(o=>this.matchValue(o,this.unmaskedValue+t,n));if(a.length){a.length===1&&this._forEachBlocksInRange(0,this.value.length,(s,i)=>{const c=a[0][i];i>=this.value.length||c===s.value||(s.reset(),s._appendChar(c,l))});const o=super._appendCharRaw(a[0][this.value.length],l);return a.length===1&&a[0].slice(this.unmaskedValue.length).split("").forEach(s=>o.aggregate(super._appendCharRaw(s))),o}return new ge({skip:!this.isComplete})}extractTail(t,l){return t===void 0&&(t=0),l===void 0&&(l=this.displayValue.length),new Rt("",t)}remove(t,l){if(t===void 0&&(t=0),l===void 0&&(l=this.displayValue.length),t===l)return new ge;const n=Math.min(super.nearestInputPos(0,ae.FORCE_RIGHT),this.value.length);let a;for(a=t;a>=0&&!(this.enum.filter(s=>this.matchValue(s,this.value.slice(n,a),n)).length>1);--a);const o=super.remove(a,l);return o.tailShift+=a-t,o}get isComplete(){return this.enum.indexOf(this.value)>=0}}wl.DEFAULTS={...tt.DEFAULTS,matchValue:(r,t,l)=>r.indexOf(t,l)===l},me.MaskedEnum=wl;class Bc extends et{updateOptions(t){super.updateOptions(t)}_update(t){super._update({...t,validate:t.mask})}}me.MaskedFunction=Bc;var Sc;class pt extends et{constructor(t){super({...pt.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){const t="^"+(this.allowNegative?"[+|\\-]?":""),l="\\d*",n=(this.scale?"("+Ha(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+l+n),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(Ha).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(Ha(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){const l=t.split(this.radix);return l[0]=l[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),l.join(this.radix)}doPrepareChar(t,l){l===void 0&&(l={});const[n,a]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(l.input&&l.raw||!l.input&&!l.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),l);return t&&!n&&(a.skip=!0),n&&!this.allowPositive&&!this.value&&n!=="-"&&a.aggregate(this._appendChar("-")),[n,a]}_separatorsCount(t,l){l===void 0&&(l=!1);let n=0;for(let a=0;a<t;++a)this._value.indexOf(this.thousandsSeparator,a)===a&&(++n,l&&(t+=this.thousandsSeparator.length));return n}_separatorsCountFromSlice(t){return t===void 0&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,l,n){return t===void 0&&(t=0),l===void 0&&(l=this.displayValue.length),[t,l]=this._adjustRangeWithSeparators(t,l),this._removeThousandsSeparators(super.extractInput(t,l,n))}_appendCharRaw(t,l){l===void 0&&(l={});const n=l.tail&&l._beforeTailState?l._beforeTailState._value:this._value,a=this._separatorsCountFromSlice(n);this._value=this._removeThousandsSeparators(this.value);const o=this._value;this._value+=t;const s=this.number;let i=!isNaN(s),c=!1;if(i){let f;this.min!=null&&this.min<0&&this.number<this.min&&(f=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(f=this.max),f!=null&&(this.autofix?(this._value=this.format(f,this).replace(pt.UNMASKED_RADIX,this.radix),c||(c=o===this._value&&!l.tail)):i=!1),i&&(i=!!this._value.match(this._numberRegExp))}let u;i?u=new ge({inserted:this._value.slice(o.length),rawInserted:c?"":t,skip:c}):(this._value=o,u=new ge),this._value=this._insertThousandsSeparators(this._value);const d=l.tail&&l._beforeTailState?l._beforeTailState._value:this._value,m=this._separatorsCountFromSlice(d);return u.tailShift+=(m-a)*this.thousandsSeparator.length,u}_findSeparatorAround(t){if(this.thousandsSeparator){const l=t-this.thousandsSeparator.length+1,n=this.value.indexOf(this.thousandsSeparator,l);if(n<=t)return n}return-1}_adjustRangeWithSeparators(t,l){const n=this._findSeparatorAround(t);n>=0&&(t=n);const a=this._findSeparatorAround(l);return a>=0&&(l=a+this.thousandsSeparator.length),[t,l]}remove(t,l){t===void 0&&(t=0),l===void 0&&(l=this.displayValue.length),[t,l]=this._adjustRangeWithSeparators(t,l);const n=this.value.slice(0,t),a=this.value.slice(l),o=this._separatorsCount(n.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(n+a));const s=this._separatorsCountFromSlice(n);return new ge({tailShift:(s-o)*this.thousandsSeparator.length})}nearestInputPos(t,l){if(!this.thousandsSeparator)return t;switch(l){case ae.NONE:case ae.LEFT:case ae.FORCE_LEFT:{const n=this._findSeparatorAround(t-1);if(n>=0){const a=n+this.thousandsSeparator.length;if(t<a||this.value.length<=a||l===ae.FORCE_LEFT)return n}break}case ae.RIGHT:case ae.FORCE_RIGHT:{const n=this._findSeparatorAround(t);if(n>=0)return n+this.thousandsSeparator.length}}return t}doCommit(){if(this.value){const t=this.number;let l=t;this.min!=null&&(l=Math.max(l,this.min)),this.max!=null&&(l=Math.min(l,this.max)),l!==t&&(this.unmaskedValue=this.format(l,this));let n=this.value;this.normalizeZeros&&(n=this._normalizeZeros(n)),this.padFractionalZeros&&this.scale>0&&(n=this._padFractionalZeros(n)),this._value=n}super.doCommit()}_normalizeZeros(t){const l=this._removeThousandsSeparators(t).split(this.radix);return l[0]=l[0].replace(/^(\D*)(0*)(\d*)/,(n,a,o,s)=>a+s),t.length&&!/\d$/.test(l[0])&&(l[0]=l[0]+"0"),l.length>1&&(l[1]=l[1].replace(/0*$/,""),l[1].length||(l.length=1)),this._insertThousandsSeparators(l.join(this.radix))}_padFractionalZeros(t){if(!t)return t;const l=t.split(this.radix);return l.length<2&&l.push(""),l[1]=l[1].padEnd(this.scale,"0"),l.join(this.radix)}doSkipInvalid(t,l,n){l===void 0&&(l={});const a=this.scale===0&&t!==this.thousandsSeparator&&(t===this.radix||t===pt.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,l,n)&&!a}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,pt.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(pt.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(t){return(super.typedValueEquals(t)||pt.EMPTY_VALUES.includes(t)&&pt.EMPTY_VALUES.includes(this.typedValue))&&!(t===0&&this.value==="")}}Sc=pt,pt.UNMASKED_RADIX=".",pt.EMPTY_VALUES=[...et.EMPTY_VALUES,0],pt.DEFAULTS={...et.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Sc.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:r=>r.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},me.MaskedNumber=pt;const fn={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Ga(r,t,l){t===void 0&&(t=fn.MASKED),l===void 0&&(l=fn.MASKED);const n=Pt(r);return a=>n.runIsolated(o=>(o[t]=a,o[l]))}function Ac(r,t,l,n){return Ga(t,l,n)(r)}me.PIPE_TYPE=fn,me.createPipe=Ga,me.pipe=Ac;class Dc extends tt{get repeatFrom(){var t;return(t=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?t:0}get repeatTo(){var t;return(t=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?t:1/0}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){var l,n,a;const{repeat:o,...s}=zr(t);this._blockOpts=Object.assign({},this._blockOpts,s);const i=Pt(this._blockOpts);this.repeat=(l=(n=o??i.repeat)!=null?n:this.repeat)!=null?l:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((a=this._blocks)==null?void 0:a.length)||0,this.repeatFrom)),blocks:{m:i},eager:i.eager,overwrite:i.overwrite,skipInvalid:i.skipInvalid,lazy:i.lazy,placeholderChar:i.placeholderChar,displayChar:i.displayChar})}_allocateBlock(t){if(t<this._blocks.length)return this._blocks[t];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(Pt(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(t,l){l===void 0&&(l={});const n=new ge;for(let c=(a=(o=this._mapPosToBlock(this.displayValue.length))==null?void 0:o.index)!=null?a:Math.max(this._blocks.length-1,0),u,d;u=(s=this._blocks[c])!=null?s:d=!d&&this._allocateBlock(c);++c){var a,o,s,i;const m=u._appendChar(t,{...l,_beforeTailState:(i=l._beforeTailState)==null||(i=i._blocks)==null?void 0:i[c]});if(m.skip&&d){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(n.aggregate(m),m.consumed)break}return n}_trimEmptyTail(t,l){var n,a;t===void 0&&(t=0);const o=Math.max(((n=this._mapPosToBlock(t))==null?void 0:n.index)||0,this.repeatFrom,0);let s;l!=null&&(s=(a=this._mapPosToBlock(l))==null?void 0:a.index),s==null&&(s=this._blocks.length-1);let i=0;for(let c=s;o<=c&&!this._blocks[c].unmaskedValue;--c,++i);i&&(this._blocks.splice(s-i+1,i),this.mask=this.mask.slice(i))}reset(){super.reset(),this._trimEmptyTail()}remove(t,l){t===void 0&&(t=0),l===void 0&&(l=this.displayValue.length);const n=super.remove(t,l);return this._trimEmptyTail(t,l),n}totalInputPositions(t,l){return t===void 0&&(t=0),l==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(t,l)}get state(){return super.state}set state(t){this._blocks.length=t._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=t}}me.RepeatBlock=Dc;try{globalThis.IMask=me}catch{}const GA=Object.freeze(Object.defineProperty({__proto__:null,ChangeDetails:ge,ChunksTailDetails:cr,DIRECTION:ae,HTMLContenteditableMaskElement:qa,HTMLInputMaskElement:Vc,HTMLMaskElement:yl,InputMask:Nc,MaskElement:mn,Masked:et,MaskedDate:Ut,MaskedDynamic:xl,MaskedEnum:wl,MaskedFunction:Bc,MaskedNumber:pt,MaskedPattern:tt,MaskedRange:kl,MaskedRegExp:vc,PIPE_TYPE:fn,PatternFixedDefinition:Ka,PatternInputDefinition:bl,RepeatBlock:Dc,createMask:Pt,createPipe:Ga,default:me,forceDirection:_c,normalizeOpts:zr,pipe:Ac},Symbol.toStringTag,{value:"Module"})),Mc={reference:{faq:"FAQ",banner:"Banner",slider:"Slider",video:"Video",about:"About",cards:"Cards",usefulLinks:"Useful Links",team:"Team",body:"Body",news:"News",form:"Form",tabs:"Tabs",vertical_tabs:"Vertical Tabs",documents:"Documents",infoLine:"Information Line",interested:"You may be interested",contact:"Contact"},navigation:{editMenu:"Edit Menu",dashboard:"Dashboard",collections:"Collections Structure",articles:"Articles",posts:"Posts",media:"Media",permissions:"Permissions",tags:"Tags",singletons:"Pages",feedback:"Feedback",email:"Пошти користувачів",singletonsMenu:"Menu",menuAdd:"Create Menu",builder:"Collections Structure",back:"Back",settings:"Settings",settingsDescription:"Manage your CMS configuration",singletonsMenuDescription:"Manage your menu.",users:"Users",general:"General",apiKeys:"API Keys",appearance:"Appearance",logs:"Logs"},dashboard:{title:"Dashboard",newCollection:"Create Collection",quickActions:"Quick Actions",views:"views",stats:{totalArticles:"Total Articles",totalMedia:"Total Media",activeUsers:"Active Users",apiRequests:"API Requests",fromLastMonth:"from last month"},collections:{title:"Collections",articles:"Articles",articlesDesc:"Description for articles",posts:"Posts",postsDesc:"Description for posts",products:"Products",productsDesc:"Description for products",categories:"Categories",categoriesDesc:"Description for categories",items:"items",new:"New Collection"},recentArticles:"Recent Articles",recentPosts:"Recent Posts",activeUsers:"Active Users",mediaFiles:"Media Files",createArticle:"Create Article",createPost:"Create Post",uploadMedia:"Upload Media",manageUsers:"Manage Users",feedback:"Feedback",createArticleDescription:"Create a new article for your site",uploadMediaDescription:"Upload media files for your site",manageUsersDescription:"Manage users for your site",viewFeedbackDescription:"View feedback for your site",activityFeed:"Activity Feed",viewAll:"View all",description:"Welcome to the CMS dashboard. You can create, edit, and manage your site's content.",newArticle:"Create Article",totalContent:"Total Content",articlesPostsPages:"Articles, Posts and Pages",monthlyActiveUsers:"Monthly Active Users",imagesVideosDocs:"Images, Videos and Docs",thisMonth:"This Month",newMediaFiles:"New Media Files",gettingStartedWithNextJs14:"Getting Started with Next.js 14",sarahJohnson:"Sarah Johnson",advancedReactPatterns:"Advanced React Patterns",uiUxDesignPrinciples:"UI/UX Design Principles",databaseOptimizationTips:"Database Optimization Tips",mikeChen:"Mike Chen",emmaWilson:"Emma Wilson",alexRodriguez:"Alex Rodriguez",recentContent:"Recent Content"},collections:{title:"Collections",selectCollection:"Select a collection to view its content",createCollection:"New Collection",searchCollections:"Search collections...",entries:"Entries",fields:"Fields",lastModified:"Last Modified",edit:"Edit",delete:"Delete",view:"View",form:{name:"Collection Name",slug:"Slug",description:"Description",fields:"Fields",addField:"Add Field"},dragToBuild:"Drag and drop content blocks here to build your collection structure",collectionCreated:"Collection created successfully",collectionCreationFailed:"Error creating collection",pinPublication:"Pin Publication"},articles:{title:"Articles",createArticle:"Create Article",searchArticles:"Search articles...",showColumns:"Show columns",update:"Update",create:"Create",form:{title:"Title",content:"Content",author:"Author",category:"Category",status:"Status"}},posts:{title:"Posts",createPost:"Create Post",searchPosts:"Search posts...",form:{title:"Title",content:"Content",author:"Author",category:"Category",status:"Status"}},singletons:{title:"Singletons",createSingleton:"Create Singleton",searchSingletons:"Search singletons...",form:{name:"Name",description:"Description",content:"Content",status:"Status"},search:"Search singletons..."},media:{title:"Media Library",description:"Manage your images, documents, and media files.",uploadMedia:"Upload Media",searchMedia:"Search files...",fileInfo:"File Information",preview:"Preview",newFolder:"New Folder",selectFile:"Select a file to view details",fileDetails:"File Details",name:"Name",size:"Size",dimensions:"Dimensions",uploadDate:"Upload Date",author:"Author",tags:"Tags",banner:"Banner",hero:"Hero",homepage:"Homepage",download:"Download",copyPath:"Copy path",copyPathFailed:"Failed to copy path",delete:"Delete",edit:"Edit",share:"Share",moreActions:"More actions",deleteFile:"Delete File",cancel:"Cancel",mediaLibrary:"Media Library",showColumns:"Show columns",update:"Update",create:"Create",createFolder:"Create Folder",files:"files",noFilesInFolder:"No files in this folder",deleteConfirmation:"Are you sure you want to delete this file?",uploaded:"Uploaded",filter:"Filter",search:"Search media files...",uploadingFiles:"Uploading files",uploading:"Uploading...",folder:"Folder",updatedAt:"Updated At",type:"Type",sortBy:{title:"Sort by",name:"File name",filesize:"File size"},upload:"Upload",selectFromMedia:"Select from media",selectedFiles:"Selected files: {count}",selectFiles:"Select files"},tags:{title:"Tags",description:"Manage your tags.",createTag:"Create Tag",editTag:"Edit Tag",searchTags:"Search tags...",form:{name:"Name",description:"Description",color:"Color",created_at:"Created At",count_data:"Count of Used",topic:"Topic"},emptyTitle:"No tags found",emptyDescription:"Create your first tag to get started.",emptyButton:"Create Tag"},feedback:{title:"Feedback",description:"View feedback",table:{number:"№",noFeedback:"No feedback",email:"Email",userName:"Full name",messageText:"Message text",feedbackType:"Type of appeal",phone:"Phone",resumeLink:"Resume link",linkedinLink:"Linkedin link",portfolioLink:"Portfolio link",telegramLink:"Telegram link"}},email:{title:"User mails",description:"View users awaiting feedback",table:{number:"№",date:"Date of shipment",email:"Email"}},emptyData:{title:"No data found",description:"Create your first item to get started.",buttonText:"Create Item"},form:{gen:"Generate",key:"Key",value:"Value",noDataToDisplay:"No data to display",add:"Add"},builder:{manageContentCollections:"Manage content collections",searchCollections:"Search collections...",collections:"Collections",collectionStructure:"Collection Structure",defineFields:"Define the fields and their types for this collection",name:"Name",edit:"Edit",preview:"Preview",type:"Type",content:"Content",seo:"SEO",tags:"Tags",save:"Save",cancel:"Cancel",create:"Create",localization:"Localization",actions:"Actions",noColumnsFound:"No columns found",collectionName:"Collection Name",title:"Title",entries:"Entries",fields:"Fields",status:"Status",lastModified:"Last Modified",editCollection:"Edit collection",editContentForYourSite:"Edit content for your site",deleteObject:"Are you sure you want to delete this object?",editField:"Edit field",deleteTitle:"Delete field",deleteField:"Are you sure you want to delete this field?",scheme:{name:{label:"Name",placeholder:"Name"},title:{label:"Title",placeholder:"Title"},type:{label:"Type",placeholder:"Type",options:{collection:"Collection",single:"Single"}},customTable:{label:"Custom Table"},status:{label:"Status",placeholder:"Status",options:{published:"Published",draft:"Draft",archived:"Archived"}},description:{label:"Description",placeholder:"Description"},preview_path:{label:"Preview path",placeholder:"Preview path",info:"Path to slug for preview"},include_search:{label:"Include in search?",placeholder:"Include in search?"}},required:"Required field",createField:"Create field",selectType:"Select type",createFolder:"Create folder",changeType:"Change type",fieldLabels:{name:"Name",label:"Label",placeholder:"Placeholder",help:"Help",type:"Type",subtype:"Subtype",parent:"Parent",options:"Options",colModel:"ColModel",multiple:"Multiple",api:"API",relation:"Relation",required:"Required",localization:"Localization"},fieldPlaceholders:{name:"Name",label:"Title",placeholder:"Placeholder",help:"Help",type:"Type",subtype:"Subtype",parent:"Parent",options:"Options",colModel:"ColModel",api:"API",relation:"Relation"},fieldOptions:{text:"Text",number:"Number",integer:"Integer",date:"Date",datetime:"Datetime",file:"File",select:"Select",multiselect:"MultiSelect",mediaselect:"MediaSelect",radio:"Radio",boolean:"Boolean",datalist:"Data list",image:"Image",slug:"Slug",richtext:"Rich Text",markdown:"Markdown",reference:"Reference",relation:"Relation",fileList:"Gallery",tags:"Tags"}},menu:{title:"Menu",description:"Manage your menu.",createMenu:"Create Menu",searchMenu:"Search menu...",menuAdd:"Add Menu",editMenu:"Edit Menu",textEditor:"Text Editor",listTree:"List Tree",filter:"Filter",search:"Search menu...",menuCreated:"Menu created",menuCreateError:"Error creating menu",menuUpdated:"Menu updated",menuUpdateError:"Error updating menu",menuDeleted:"Menu deleted",menuDeleteError:"Error deleting menu",form:{name:"Name",description:"Description",content:"Content",status:"Status",value:"Value",language:"Language"}},settings:{title:"Settings",description:"Configure your CMS settings and preferences.",systemStatus:"System Status",siteInformation:"Site Information",siteName:"Site Name",version:"Version",environment:"Environment",security:"Security",localization:"Localization",production:"Production",systemHealth:"System Health",database:"Database",connected:"Connected",cache:"Cache",active:"Active",storage:"Storage",used:"Used",configure:"Configure",successTitle:"Success",successMessage:"Settings saved successfully",errorTitle:"Error",errorMessage:"Error saving settings",generateNewKey:"Generate New Key",apiSecurity:"API Security",general:{general:"General Settings",generalDescription:"Manage your general settings.",url:"URL",language:"Language",languages:"Languages",contacts:"Contacts",showSocialsNumber:"Number of socials to display",mapCoords:"Map coordinates",socials:"Socials",saveChanges:"Save Changes",cancel:"Cancel",notifications:"Notifications",emailNotifications:"Email Notifications",emailNotificationsDescription:"Receive notifications by email",pushNotifications:"Browser Notifications",pushNotificationsDescription:"Browser notifications for important updates",smsNotifications:"SMS Notifications",smsNotificationsDescription:"SMS notifications for critical updates",desktopNotifications:"Desktop Notifications",desktopNotificationsDescription:"Desktop notifications",siteDescription:"Site Description",siteUrl:"Site URL",siteLanguage:"Site Language",siteEmail:"Site Email",sitePhone:"Site Phone",siteAddress:"Site Address",siteName:"Site Name",title:"Title",content:"Content",name:"Name",siteInformation:"Site Information",logoSite:"Site Logo",logoCms:"CMS Logo",imageLogin:"Login Image",logo:"Logo",siteInformationDescription:"Manage your site information."},users:{users:"User Management",usersDescription:"Manage your user management configuration.",userRegistration:"User Registration",allowRegistration:"Allow User Registration",allowRegistrationDescription:"Enable new users to register accounts",emailVerification:"Email Verification Required",emailVerificationDescription:"Require email verification for new accounts",autoApprove:"Auto-approve Users",autoApproveDescription:"Automatically approve new user registrations",defaultRole:"Default User Role"},"api-keys":{apiKeys:"API Keys",apiKeysDescription:"Manage your api keys configuration.",productionApiKey:"Production API Key",developmentApiKey:"Development API Key",generateNewKey:"Generate New Key",apiSecurity:"API Security",rateLimiting:"Rate Limiting",rateLimitingDescription:"Enable API rate limiting protection",corsProtection:"CORS Protection",corsProtectionDescription:"Cross-origin request security",apiLogging:"API Logging",apiLoggingDescription:"Log all API requests and responses"},appearance:{appearance:"Appearance",appearanceDescription:"Manage your appearance settings.",colorTheme:"Color Theme",darkMode:"Dark Mode",darkModeDescription:"Switch to dark theme",compactMode:"Compact Mode",compactModeDescription:"Reduce spacing and padding",animations:"Animations",animationsDescription:"Enable interface animations",themeBlue:"Blue",themeGreen:"Green",themePurple:"Purple"},logs:{title:"Logs",description:"View all your actions in the system",table:{objectId:"Object Identifier",dateTime:"Date and Time of Change",changeType:"Change Type",noLogs:"No user logs found",noLogsDescription:"No user logs found"}},permissions:{title:"Permissions",user:"User",role:"Role",lastActive:"Last Active",actions:"Actions",rolePermissions:"Role Permissions",rolePermissionsDescription:"Permissions assigned to each role in the system.",permission:"Permission",admin:"Admin",editor:"Editor",author:"Author",viewer:"Viewer",customizePermissions:"Customize Permissions",inviteUser:"Invite User",searchUsers:"Search users...",createContent:"Create Content",editContent:"Edit Content",deleteContent:"Delete Content",publishContent:"Publish Content",manageMedia:"Manage Media",manageUsers:"Manage Users",manageSettings:"Manage Settings",remove:"Remove",edit:"Edit",time:{hoursAgo:"{count} hours ago",hourAgo:"1 hour ago",daysAgo:"{count} days ago",dayAgo:"1 day ago",weeksAgo:"{count} weeks ago",weekAgo:"1 week ago",minutesAgo:"{count} minutes ago",minuteAgo:"1 minute ago",justNow:"just now"},roles:{admin:"Admin",editor:"Editor",author:"Author",viewer:"Viewer"}}},block:{type:{heading:"Heading",paragraph:"Paragraph"}},app:{name:"SOFTPRO software package: GIS MBK Kamyansk City TG",tagline:"Do more with less"},nav:{home:"Home",about:"About",profile:"Profile",settings:"Settings",logout:"Log out"},common:{ok:"OK",save:"Save",cancel:"Cancel",close:"Close",delete:"Delete",edit:"Edit",loading:"Loading…",retry:"Retry",title:"Title",description:"Description",keywords:"Keywords",successMessage:"Success",errorMessage:"Error",success:"Success",error:"Error",meta:"Meta",actions:{add:"Add",save:"Save",cancel:"Cancel",edit:"Edit",delete:"Delete",create:"Create",preview:"Preview",search:"Search",filter:"Filter",export:"Export",addField:"Add Field",success:"Success",error:"Error",back:"Back"},status:{published:"Published",draft:"Draft",archived:"Archived"},content:"Content",pagination:{showing:"Showing",to:"to",of:"of",results:"results",previous:"Previous",next:"Next"}},auth:{title:"Sign in",email:"Email",password:"Password",remember:"Remember me",submit:"Sign in",errors:{invalid:"Invalid email or password",required:"{field} is required"}},table:{choose:"Choose columns to display",columns:"Columns",actions:"Actions",search:"Search",export:"Export",exportTitle:"Export table",close:"Close",chooseColumns:"Select columns for export:",selectAll:"Select all",selectCurrent:"Select current",none:"None",chooseFormat:"Choose table format:",time:{weeksAgo:"{count} weeks ago",weekAgo:"1 week ago",daysAgo:"{count} days ago",dayAgo:"1 day ago",hoursAgo:"{count} hours ago",hourAgo:"1 hour ago",minutesAgo:"{count} minutes ago",minuteAgo:"1 minute ago",justNow:"just now"},format:{json:"JSON format",csv:"CSV format",xlsx:"XLSX format"},cancel:"Cancel",download:"Download table"},filter:{search:"Search",more:"Show more",less:"Show less",selected:"selected",clear:"Clear",apply:"Apply",from:"From",to:"To",notfound:"Nothing found",period:"Period",today:"Today",week:"Week",month:"Month",quarter:"Quarter",year:"Year",alltime:"All Time",prev:"Prev",next:"Next"},items:{title:"Items",add:"Add item",count:"No items | One item | {count} items",created:"Item “{name}” has been created",deleted:"Item deleted"},errors:{network:"Network error. Please try again.",notFound:"We couldn't find what you were looking for."},toast:{saved:"Changes saved",copied:"Copied to clipboard"},users:{title:"Users",description:"Manage your users.",createUser:"Create User",editUser:"Edit User",searchUsers:"Search users...",createUserFailed:"Create user failed",createUserSuccess:"User created successfully",editUserFailed:"Edit user failed",editUserSuccess:"User edited successfully",deleteUserSuccess:"User deleted successfully",deleteUserFailed:"User deleted failed",form:{name:"Name",description:"Description",color:"Color",created_at:"Created At",count_data:"Count of Used",topic:"Topic"},emptyTitle:"No users found",emptyDescription:"Create your first user to get started.",emptyButton:"Create User"},fetchContentTypes:"fetchContentTypes",action:"action",delete:"delete","create-folder":"create-folder",formValues:"formValues",metaParentValue:"metaParentValue",blur:"blur","-":"-",noFilesInFolder:"noFilesInFolder",guide:{menu:"Guide for menu",general:"Guide",media:"Guide for media",settings:"Guide for settings",users:"Guide for users",content:"Guide for content",appOverview:"Guide for app overview",collections:"Guide for collections",help:"Help"}},WA=Object.freeze(Object.defineProperty({__proto__:null,cms:Mc,default:{cms:Mc}},Symbol.toStringTag,{value:"Module"})),Tc={reference:{faq:"Акордeон",photoGrid:"Фотогалерея",banner:"Банер",slider:"Слайдер",video:"Відео",about:"Про нас",cards:"Картки",usefulLinks:"Корисні посилання",team:"Команда",body:"Тіло",news:"Новини",form:"Форма",tabs:"Таби",vertical_tabs:"Вертикальні таби",documents:"Документи",infoLine:"Інформаційна лінія",iframe:"Iframe",interested:"Вас може зацікавити",contact:"Контакти"},navigation:{editMenu:"Редагувати меню",dashboard:"Панель керування",collections:"Керування контентом",articles:"Статті",posts:"Дописи",media:"Медіа",permissions:"Дозволи",tags:"Теги",singletons:"Сторінки",singletonsMenu:"Меню",feedback:"Зворотній зв'язок",email:"Пошти користувачів",menuAdd:"Створити меню",builder:"Структура колекцій",back:"Назад",settings:"Налаштування",settingsDescription:"Налаштування вашого сайту",singletonsMenuDescription:"Керування меню.",users:"Користувачі",general:"Основні",apiKeys:"API ключі",appearance:"Вигляд",logs:"Логи"},dashboard:{title:"Панель керування",description:"Вітаємо в панелі керування CMS. Ви можете створювати, редагувати та управляти контентом вашого сайту.",newCollection:"Створити колекцію",quickActions:"Швидкі дії",views:"переглядів",stats:{totalArticles:"Всього статей",totalMedia:"Всього медіа",activeUsers:"Активні користувачі",apiRequests:"API запити",fromLastMonth:"з минулого місяця"},collections:{title:"Колекції",articles:"Статті",articlesDesc:"Опис для статей",posts:"Дописи",postsDesc:"Опис для дописів",products:"Продукти",productsDesc:"Опис для продуктів",categories:"Категорії",categoriesDesc:"Опис для категорій",items:"шт.",new:"Нова колекція"},recentArticles:"Останні статті",recentPosts:"Останні дописи",recentContent:"Останній контент",activityFeed:"Стрічка активності",viewAll:"Показати все",totalContent:"Всього контенту",articlesPostsPages:"Статті, дописи та сторінки",monthlyActiveUsers:"Активних користувачів за місяць",imagesVideosDocs:"Зображення, відео та документи",thisMonth:"Цього місяця",activeUsers:"Активні користувачі",mediaFiles:"Файли медіа",createArticle:"Створити статтю",createPost:"Створити допис",uploadMedia:"Завантажити медіа",createArticleDescription:"Створіть статтю для вашого сайту",uploadMediaDescription:"Завантажте медіа файли для вашого сайту",manageUsersDescription:"Керуйте користувачами вашого сайту",viewFeedbackDescription:"Перегляд зворотнього зв'язку",manageUsers:"Керування користувачами",feedback:"Зворотній зв'язок",newMediaFiles:"Нових файлів медіа",gettingStartedWithNextJs14:"Початок роботи з Next.js 14",sarahJohnson:"Sarah Johnson",advancedReactPatterns:"Підвищені шаблони React",uiUxDesignPrinciples:"Принципи дизайну UI/UX",databaseOptimizationTips:"Поради з оптимізації бази даних",mikeChen:"Mike Chen",emmaWilson:"Emma Wilson",alexRodriguez:"Alex Rodriguez"},collections:{title:"Колекції",selectCollection:"Виберіть колекцію для перегляду її контенту",createCollection:"Створити колекцію",searchCollections:"Пошук колекцій...",entries:"Записи",fields:"Поля",lastModified:"Останнє редагування",edit:"Редагувати",delete:"Видалити",view:"Перегляд",form:{name:"Назва колекції",slug:"Слаг",description:"Опис",fields:"Поля",addField:"Додати поле"},dragToBuild:"Перетягніть блоки контенту сюди, щоб створити структуру колекції",collectionCreated:"Колекція успішно створена",collectionCreationFailed:"Помилка при створенні колекції",pinPublication:"Закріпити публікацію"},articles:{title:"Сторінки",createArticle:"Створити сторінку",searchArticles:"Пошук статей...",showColumns:"Показати колонки",update:"Оновити",create:"Створити",form:{title:"Заголовок",content:"Зміст",author:"Автор",category:"Категорія",status:"Статус"}},posts:{title:"Дописи",createPost:"Створити допис",searchPosts:"Пошук дописів...",form:{title:"Заголовок",content:"Зміст",author:"Автор",category:"Категорія",status:"Статус"}},singletons:{title:"Синглтони",createSingleton:"Створити синглтон",searchSingletons:"Пошук синглтонів...",form:{name:"Назва",description:"Опис",content:"Зміст",status:"Статус"},search:"Пошук синглтонів..."},media:{title:"Медіа бібліотека",description:"Керуйте своїми зображеннями, документами та медіа файлами.",uploadMedia:"Завантажити медіа",searchMedia:"Пошук файлів...",fileInfo:"Інформація про файл",preview:"Перегляд",newFolder:"Нова папка",selectFile:"Виберіть файл для перегляду деталей",fileDetails:"Інформація про файл",name:"Назва",size:"Розмір",dimensions:"Розміри",uploadDate:"Дата завантаження",author:"Автор",tags:"Теги",banner:"Банер",hero:"Герой",homepage:"Головна",download:"Завантажити",copyPath:"Копіювати шлях",copyPathFailed:"Не вдалося скопіювати шлях",delete:"Видалити",edit:"Редагувати",share:"Поділитися",moreActions:"Більше дій",deleteFile:"Ви впевнені, що хочете видалити цей файл?",createFolder:"Створити папку",cancel:"Скасувати",mediaLibrary:"Медіа бібліотека",files:"файлів",noFilesInFolder:"Немає файлів у цій папці",deleteConfirmation:"Ви впевнені, що хочете видалити цей файл?",uploaded:"Завантажено",filter:"Фільтр",search:"Пошук файлів...",uploadingFiles:"Завантаження файлів",uploading:"Завантаження...",folder:"Папка",type:"Тип",updatedAt:"Оновлено",sortBy:{title:"Сортувати за",name:"Назва файлу",filesize:"Розмір файлу"},upload:"Завантажити",selectFromMedia:"Вибрати з медіа",selectFiles:"Вибрати файли",selectedFiles:"Вибрано файлів: {count}"},tags:{title:"Теги",description:"Керування тегами.",createTag:"Створити тег",editTag:"Редагувати тег",searchTags:"Пошук тегів...",form:{name:"Назва",description:"Опис",color:"Колір",slug:"Slug",created_at:"Дата створення",count_data:"Кількість використань",topic:"Тема"},emptyTitle:"Теги не знайдені",emptyDescription:"Створіть свій перший тег, щоб почати.",emptyButton:"Створити тег"},feedback:{title:"Зворотній зв'язок",description:"Переглядайте зворотній зв'язок",table:{number:"№",noFeedback:"Фідбек відсутній",email:"Email",userName:"ПІБ",messageText:"Текст повідомлення",feedbackType:"Тип звернення",cdate:"Дата відгуку",phone:"Телефон",resumeLink:"Посилання на резюме",linkedinLink:"Посилання на лінкедин",portfolioLink:"Посилання на портфоліо",telegramLink:"Посилання на телеграм"}},email:{title:"Пошти користувачів",description:"Переглядайте користувачів, які очікують зворотнього зв'язку",table:{number:"№",date:"Дата відправки",email:"Email"}},emptyData:{title:"Немає даних",description:"Створіть свій перший елемент, щоб почати.",buttonText:"Створити елемент"},form:{gen:"Згенерувати",key:"Ключ",value:"Значення",noDataToDisplay:"Дані для відображення відсутні",add:"Додати"},builder:{faq:"Акордeон",photoGrid:"Фотогалерея",banner:"Банер",slider:"Слайдер",video:"Відео",about:"Про нас",cards:"Картки",usefulLinks:"Корисні посилання",team:"Команда",body:"Тіло",news:"Новини",form:"Форма",tabs:"Таби",vertical_tabs:"Вертикальні таби",documents:"Документи",infoLine:"Інформаційна лінія",iframe:"Iframe",manageContentCollections:"Керування колекціями контенту",searchCollections:"Пошук колекцій...",collections:"Структура колекцій",collectionStructure:"Структура колекції",defineFields:"Визначте поля та їх типи для цієї колекції",name:"Назва",changeType:"Змінити тип",type:"Тип",save:"Зберегти",edit:"Редагувати",content:"Контент",seo:"SEO",tags:"Теги",preview:"Перегляд",collectionName:"Назва колекції",title:"Заголовок",entries:"Записи",fields:"Поля",status:"Статус",lastModified:"Останнє редагування",cancel:"Скасувати",create:"Створити",localization:"Локалізація",actions:"Дії",noColumnsFound:"Немає колонок",editCollection:"Редагувати колекцію",editContentForYourSite:"Редагувати контент для вашого сайту",deleteObject:"Ви впевнені, що хочете видалити цей об'єкт?",editField:"Редагувати поле",deleteTitle:"Видалити поле",deleteField:"Ви впевнені, що хочете видалити це поле?",scheme:{name:{label:"Назва",placeholder:"Назва"},title:{label:"Заголовок",placeholder:"Заголовок"},type:{label:"Тип",placeholder:"Тип",options:{collection:"Колекція",single:"Сторінка"}},customTable:{label:"Власна таблиця"},status:{label:"Статус",placeholder:"Статус",options:{published:"Опубліковано",draft:"Чернетка",archived:"Архівовано"}},description:{label:"Опис",placeholder:"Опис"},preview_path:{label:"Шлях для прев'ю",placeholder:"Шлях для прев'ю",info:"Шлях до slug для прев'ю"},include_search:{label:"Включити в пошук?",placeholder:"Включити в пошук?"}},required:"Обов'язкове поле",createField:"Створити поле",selectType:"Оберіть тип",createFolder:"Створити папку",fieldLabels:{name:"Назва",label:"Мітка",placeholder:"Плейсхолдер",help:"Допомога",type:"Тип",subtype:"Підтип",parent:"Батьківський",data:"ID класифікатора",options:"Опції",colModel:"Модель колонок",multiple:"Множинний",api:"API",relation:"Зв'язок",required:"Обов'язковий",localization:"Локалізація"},fieldPlaceholders:{name:"Назва",label:"Заголовок",placeholder:"Плейсхолдер",help:"Допомога",type:"Тип",subtype:"Підтип",parent:"Батьківський",data:"ID класифікатора",options:"Опції",colModel:"Модель колонок",api:"API",relation:"Зв'язок"},fieldOptions:{text:"Текст",number:"Число",integer:"Ціле число",date:"Дата",datetime:"Дата і час",file:"Файл",select:"Селект",multiselect:"Мультиселект",mediaselect:"Вибір медіа",radio:"Радіо",boolean:"Булевий",datalist:"Дататейбл",image:"Зображення",slug:"Слаг",richtext:"Текстовий редактор",markdown:"Markdown",reference:"Секції",relation:"Зв'язок",fileList:"Мультифайл",tags:"Теги"}},menu:{title:"Меню",description:"Керування меню.",createMenu:"Створити меню",searchMenu:"Пошук меню...",menuAdd:"Додати меню",editMenu:"Редагувати меню",textEditor:"Текстовий редактор",menuCreated:"Меню створено",menuCreateError:"Помилка при створенні меню",menuUpdated:"Меню оновлено",menuUpdateError:"Помилка при оновленні меню",menuDeleted:"Меню видалено",menuDeleteError:"Помилка при видаленні меню",listTree:"Список дерева",filter:"Фільтр",search:"Пошук меню...",form:{name:"Назва",description:"Опис",content:"Зміст",status:"Статус",value:"Значення",language:"Мова"}},settings:{title:"Налаштування",description:"Налаштуйте ваші налаштування CMS та налаштування.",systemStatus:"Статус системи",siteInformation:"Інформація про сайт",logo:"Логотип",siteName:"Назва сайту",version:"Версія",environment:"Середовище",security:"Безпека",localization:"Локалізація",production:"Виробництво",systemHealth:"Здоров'я системи",database:"База даних",connected:"З'єднано",cache:"Кеш",active:"Активний",storage:"Хмарне сховище",used:"Використано",configure:"Налаштувати",successTitle:"Успішно",successMessage:"Налаштування успішно збережено",errorTitle:"Помилка",errorMessage:"Помилка при збереженні налаштувань",generateNewKey:"Згенерувати новий ключ",apiSecurity:"Безпека API",general:{general:"Основні налаштування",generalDescription:"Керуйте вашими загальними налаштуваннями.",url:"URL",language:"Мова",languages:"Мови",contacts:"Контакти",socials:"Соціальні мережі",showSocialsNumber:"Кількість соціальних мереж для відображення",mapCoords:"Координати для відображення на карті",saveChanges:"Зберегти зміни",cancel:"Скасувати",notifications:"Сповіщення",emailNotifications:"Сповіщення по email",emailNotificationsDescription:"Отримувати сповіщення по email",pushNotifications:"Сповіщення в браузері",pushNotificationsDescription:"Сповіщення в браузері для важливих оновлень",smsNotifications:"Сповіщення по SMS",smsNotificationsDescription:"Сповіщення по SMS для критичних оновлень",desktopNotifications:"Сповіщення на комп'ютері",desktopNotificationsDescription:"Сповіщення на комп'ютері",siteName:"Назва сайту",siteDescription:"Опис сайту",siteUrl:"URL сайту",previewUrl:"URL попереднього перегляду",logoSite:"Логотип сайту",logoCms:"Логотип CMS",imageLogin:"Зображення для входу",siteLanguage:"Мова сайту",siteEmail:"Email сайту",sitePhone:"Телефон сайту",siteAddress:"Адреса сайту",siteInformation:"Інформація про сайт",logo:"Логотип",siteInformationDescription:"Керуйте вашою інформацією про сайт.",title:"Заголовок",content:"Контент",name:"Назва соцмережі"},users:{users:"Керування користувачами",usersDescription:"Керуйте налаштуваннями керування користувачами.",userRegistration:"Реєстрація користувачів",allowRegistration:"Дозволити реєстрацію користувачів",allowRegistrationDescription:"Дозволити новим користувачам реєструвати акаунти",emailVerification:"Потрібна верифікація email",emailVerificationDescription:"Вимагати підтвердження email для нових акаунтів",autoApprove:"Автоматичне схвалення користувачів",autoApproveDescription:"Автоматично схвалювати нові реєстрації користувачів",defaultRole:"Роль за замовчуванням"},"api-keys":{apiKeys:"API ключі",apiKeysDescription:"Керуйте налаштуваннями API ключів.",productionApiKey:"Production API ключ",developmentApiKey:"Development API ключ",generateNewKey:"Згенерувати новий ключ",apiSecurity:"Безпека API",rateLimiting:"Обмеження швидкості",rateLimitingDescription:"Увімкнути захист обмеження швидкості API",corsProtection:"Захист CORS",corsProtectionDescription:"Безпека крос-доменних запитів",apiLogging:"Логування API",apiLoggingDescription:"Логувати всі API запити та відповіді"},appearance:{appearance:"Вигляд",appearanceDescription:"Керуйте вашим виглядом та налаштуваннями.",colorTheme:"Кольорова тема",darkMode:"Темний режим",darkModeDescription:"Перемкнути на темну тему",compactMode:"Компактний режим",compactModeDescription:"Зменшити відступи та поля",animations:"Анімації",animationsDescription:"Увімкнути анімації інтерфейсу",themeBlue:"Синя",themeGreen:"Зелена",themePurple:"Фіолетова"},logs:{title:"Логи",description:"Переглядай всі свої дії в системі",table:{number:"№",objectId:"Ідентифікатор об'єкта",dateTime:"Дата та час зміни",changeType:"Тип зміни",noLogs:"Логи користувача відсутні"}},permissions:{title:"Дозволи",user:"Користувач",role:"Роль",lastActive:"Остання активність",actions:"Дії",rolePermissions:"Дозволи ролі",rolePermissionsDescription:"Дозволи, призначені для кожної ролі в системі.",permission:"Дозвіл",admin:"Адміністратор",editor:"Редактор",author:"Автор",viewer:"Переглядач",customizePermissions:"Налаштувати дозволи",inviteUser:"Запросити користувача",searchUsers:"Пошук користувачів...",createContent:"Створити контент",editContent:"Редагувати контент",deleteContent:"Видалити контент",publishContent:"Опублікувати контент",manageMedia:"Керування медіа",manageUsers:"Керування користувачами",manageSettings:"Керування налаштуваннями",remove:"Вилучити",edit:"Редагувати",time:{hoursAgo:"{count} годин тому",hourAgo:"1 година тому",daysAgo:"{count} днів тому",dayAgo:"1 день тому",weeksAgo:"{count} тижнів тому",weekAgo:"1 тиждень тому",minutesAgo:"{count} хвилин тому",minuteAgo:"1 хвилина тому",justNow:"щойно"},roles:{admin:"Адміністратор",editor:"Редактор",author:"Автор",viewer:"Переглядач"}}},block:{type:{heading:"Заголовок",paragraph:"Параграф"}},app:{name:"Програмний комплекс SOFTPRO: ГІС МБК Кам'янської міської ТГ",tagline:"Зробіть більше з меншим"},nav:{home:"Домашній",about:"Про",profile:"Профіль",settings:"Налаштування",logout:"Вихід"},common:{ok:"Добре",save:"Зберегти",cancel:"Скасувати",close:"Закрити",delete:"Вилучити",edit:"Редагувати",loading:"Завантаження…",retry:"Повторити",title:"Назва",description:"Опис",keywords:"Ключові слова",success:"Успіх",error:"Помилка",successMessage:"Успішно",errorMessage:"Помилка",meta:"Мета",content:"Контент",actions:{add:"Додати",save:"Зберегти",cancel:"Скасувати",edit:"Редагувати",delete:"Видалити",create:"Створити",preview:"Перегляд",search:"Пошук",filter:"Фільтр",export:"Експорт",addField:"Додати поле",success:"Успіх",error:"Помилка",back:"Повернутися"},status:{published:"Опубліковано",draft:"Чернетка",archived:"Архівовано"},pagination:{showing:"Показано",to:"по",of:"з",results:"результатів",previous:"Попередня",next:"Наступна"}},auth:{title:"Увійти",email:"Електронна пошта",password:"Пароль",remember:"Пам'ятайте мене",submit:"Увійти",errors:{invalid:"Недійсний електронний лист або пароль",required:"{Поле} потрібно"}},table:{choose:"Оберіть колонки для відображення",columns:"Колонки",actions:"Дії",search:"Пошук",export:"Експорт",exportTitle:"Експорт таблиці",close:"Закрити",chooseColumns:"Виберіть стовпці таблиці для експорту:",selectAll:"Вибрати усі",selectCurrent:"Вибрати поточні",none:"Жодного",chooseFormat:"Виберіть формат таблиці:",cancel:"Скасувати",download:"Завантажити таблицю",time:{weeksAgo:"{count} тижнів тому",weekAgo:"1 тиждень тому",daysAgo:"{count} днів тому",dayAgo:"1 день тому",hoursAgo:"{count} годин тому",hourAgo:"1 година тому",minutesAgo:"{count} хвилин тому",minuteAgo:"1 хвилина тому",justNow:"щойно"},format:{json:"Формат json",csv:"Формат csv",xlsx:"Формат xlsx"}},filter:{search:"Пошук",more:"Показати більше",less:"Показати меньше",selected:"обрано",clear:"Очистити",apply:"Застосувати",from:"Від",period:"Період",today:"Сьогодні",week:"Тиждень",month:"Місяць",quarter:"Квартал",year:"Рік",alltime:"Весь час",prev:"Попередній період",next:"Настпуний період",to:"До",notfound:"Нічого не знайдено"},items:{title:"Предмети",add:"Додати елемент",count:"Немає предметів | ",created:`Елемент "{Ім'я}" створений`,deleted:"Елемент видалено"},errors:{network:"Помилка мережі. ",notFound:"Ми не змогли знайти те, що ви шукали."},toast:{saved:"Збережені зміни",copied:"Скопіювано в буфер обміну"},users:{title:"Користувачі",description:"Керування користувачами.",createUser:"Створити користувача",editUser:"Редагувати користувача",searchUsers:"Пошук користувачів...",createUserFailed:"Створити користувача не вдалося",createUserSuccess:"Користувача створено успішно",editUserFailed:"Редагувати користувача не вдалося",editUserSuccess:"Користувача редаговано успішно",deleteUserSuccess:"Користувача видалено успішно",deleteUserFailed:"Користувача видалено не вдалося",form:{name:"Назва",description:"Опис",color:"Колір",created_at:"Дата створення",count_data:"Кількість використань",topic:"Тема"}},fetchContentTypes:"fetchContentTypes",action:"action",delete:"delete","create-folder":"create-folder",formValues:"formValues",metaParentValue:"metaParentValue",blur:"blur","-":"-",noFilesInFolder:"noFilesInFolder",guide:{menu:"Посібник з меню",general:"Посібник",media:"Посібник з медіа",settings:"Посібник з налаштувань",users:"Посібник з користувачів",content:"Посібник з контенту",appOverview:"Посібник з огляду програми",collections:"Посібник з колекцій",help:"Допомога"}},YA=Object.freeze(Object.defineProperty({__proto__:null,cms:Tc,default:{cms:Tc}},Symbol.toStringTag,{value:"Module"}));Ue.ArticlesPage=Xs,Ue.BuilderPage=UE,Ue.CmsContentWrapper=Y4,Ue.CollectionsPage=Qn,Ue.Dashboard=Zn,Ue.EditCollectionPage=p4,Ue.MenuAddPage=Ki,Ue.MenuItemPage=bc,Ue.MenuPage=qi,Ue.default=Zn,Ue.i18n=jr,Ue.initI18n=RA,Ue.install=jA,Ue.loadLocaleMessages=UA,Ue.setLocale=PA,Object.defineProperties(Ue,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});