3 lines
13 KiB
JavaScript
3 lines
13 KiB
JavaScript
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HeadingBlock-DZAeIVzd.js","assets/SearchModal-YI3bdWA9.js","assets/_plugin-vue_export-helper-DlAUqK2U.js","assets/app-lT3z3TR3.js","assets/app-CUj9x2C4.css","assets/SearchModal-XsSd7Wc_.css","assets/ParagraphBlock-_EhfXk9v.js","assets/ParagraphBlock-DFLxgZzs.css","assets/ClientImageSlider-CGZZYYI8.js","assets/v3-B5UP5GZw.js","assets/ImageBlock-cPU_Sbw4.js","assets/FormBlock-CjbQ7Xd1.css","assets/FileBlock-BU1S9yFx.js","assets/PersonBlock-MXpsfzV_.js","assets/PersonBlock-BcupJ_c5.css","assets/StepperBlock-DhPHG4yx.js","assets/StepperBlock-DNUyIEMk.css","assets/VideoBlock-BcEyk91j.js","assets/TabBlock-D5WxkhbC.js","assets/PageTabBuilder-CXLfoCo_.js","assets/PostListBlock-Vo9iG3Sb.js","assets/PostItemBlock-CHcUpQ-i.js","assets/PageItemBlock-D7WemCTX.js","assets/FormBlock-C_74keKQ.js","assets/FormBuilder-C25m8kmA.js","assets/FormBuilder-BDwIWzAo.css","assets/PageResourceList-DR-wDUVY.js"])))=>i.map(i=>d[i]);
|
||
import{f as L,r as x,o as a,c,e as y,F as f,d as E,g as S,_ as s,i as w,b as i,a as _,w as g,p as k,j as h,t as p,l as v,n as T,T as B}from"./app-lT3z3TR3.js";import{P as I}from"./PageSkeleton-BoZKiMn9.js";import{_ as b}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{B as P,s as N}from"./SearchModal-YI3bdWA9.js";const D={name:"PageBuilder",components:{PageSkeleton:I},data(){return{loading:!0}},methods:{async loadAllComponents(){const e=Object.values({heading:()=>s(()=>import("./HeadingBlock-DZAeIVzd.js"),__vite__mapDeps([0,1,2,3,4,5])),paragraph:()=>s(()=>import("./ParagraphBlock-_EhfXk9v.js"),__vite__mapDeps([6,1,2,3,4,5,7])),images:()=>s(()=>import("./ClientImageSlider-CGZZYYI8.js"),__vite__mapDeps([8,9,3,4,2])),image:()=>s(()=>import("./ImageBlock-cPU_Sbw4.js"),__vite__mapDeps([10,1,2,3,4,5,9,11])),files:()=>s(()=>import("./FileBlock-BU1S9yFx.js"),__vite__mapDeps([12,1,2,3,4,5,9,11])),person:()=>s(()=>import("./PersonBlock-MXpsfzV_.js"),__vite__mapDeps([13,1,2,3,4,5,9,14])),stepper:()=>s(()=>import("./StepperBlock-DhPHG4yx.js"),__vite__mapDeps([15,1,2,3,4,5,9,16])),video:()=>s(()=>import("./VideoBlock-BcEyk91j.js"),__vite__mapDeps([17,1,2,3,4,5,9])),tabs:()=>s(()=>import("./TabBlock-D5WxkhbC.js"),__vite__mapDeps([18,1,2,3,4,5,19,0,6,7,8,9,10,11,12,13,14,15,16,17,20])),postsList:()=>s(()=>import("./PostListBlock-Vo9iG3Sb.js"),__vite__mapDeps([20,1,2,3,4,5,11])),postItem:()=>s(()=>import("./PostItemBlock-CHcUpQ-i.js"),__vite__mapDeps([21,1,2,3,4,5,11])),pageItem:()=>s(()=>import("./PageItemBlock-D7WemCTX.js"),__vite__mapDeps([22,1,2,3,4,5])),customForm:()=>s(()=>import("./FormBlock-C_74keKQ.js"),__vite__mapDeps([23,1,2,3,4,5,9,24,25,11])),pageResourceList:()=>s(()=>import("./PageResourceList-DR-wDUVY.js"),__vite__mapDeps([26,1,2,3,4,5,9,24,25,11]))}).map(o=>o());await Promise.all(e),this.loading=!1},getComponent(t){return L({heading:()=>s(()=>import("./HeadingBlock-DZAeIVzd.js"),__vite__mapDeps([0,1,2,3,4,5])),paragraph:()=>s(()=>import("./ParagraphBlock-_EhfXk9v.js"),__vite__mapDeps([6,1,2,3,4,5,7])),images:()=>s(()=>import("./ClientImageSlider-CGZZYYI8.js"),__vite__mapDeps([8,9,3,4,2])),image:()=>s(()=>import("./ImageBlock-cPU_Sbw4.js"),__vite__mapDeps([10,1,2,3,4,5,9,11])),files:()=>s(()=>import("./FileBlock-BU1S9yFx.js"),__vite__mapDeps([12,1,2,3,4,5,9,11])),person:()=>s(()=>import("./PersonBlock-MXpsfzV_.js"),__vite__mapDeps([13,1,2,3,4,5,9,14])),stepper:()=>s(()=>import("./StepperBlock-DhPHG4yx.js"),__vite__mapDeps([15,1,2,3,4,5,9,16])),video:()=>s(()=>import("./VideoBlock-BcEyk91j.js"),__vite__mapDeps([17,1,2,3,4,5,9])),tabs:()=>s(()=>import("./TabBlock-D5WxkhbC.js"),__vite__mapDeps([18,1,2,3,4,5,19,0,6,7,8,9,10,11,12,13,14,15,16,17,20])),postsList:()=>s(()=>import("./PostListBlock-Vo9iG3Sb.js"),__vite__mapDeps([20,1,2,3,4,5,11])),postItem:()=>s(()=>import("./PostItemBlock-CHcUpQ-i.js"),__vite__mapDeps([21,1,2,3,4,5,11])),pageItem:()=>s(()=>import("./PageItemBlock-D7WemCTX.js"),__vite__mapDeps([22,1,2,3,4,5])),customForm:()=>s(()=>import("./FormBlock-C_74keKQ.js"),__vite__mapDeps([23,1,2,3,4,5,9,24,25,11])),pageResourceList:()=>s(()=>import("./PageResourceList-DR-wDUVY.js"),__vite__mapDeps([26,1,2,3,4,5,9,24,25,11]))}[t]||null)}},props:{blocks:{type:Array,required:!0}},async created(){await this.loadAllComponents()}},A={key:1};function R(t,e,o,u,l,n){const r=x("PageSkeleton");return a(),c("div",null,[l.loading?(a(),y(r,{key:0})):(a(),c("div",A,[(a(!0),c(f,null,E(o.blocks,(d,m)=>(a(),y(S(n.getComponent(d.type)),{key:m,block:d},null,8,["block"]))),128))]))])}const ce=b(D,[["render",R]]),V={name:"PageBreadcrumbs",components:{BaseIcon:P,Link:w},data(){return{}},methods:{textLimit(t,e){if(t.length>e){let o;return o=t.substring(0,e),o+"..."}return t},isMobileDevice(){return window.innerWidth<1024},handleSectionClick(t){this.isMobileDevice()?this.toggleMobileNavSection(t):this.toggleDesktopNavSection(t)},handleSubSectionClick(t,e){this.isMobileDevice()?this.toggleMobileNavSubSection(t,e):this.toggleDesktopNavSubSection(t,e)},highlightNavItem(t){t.classList.add("animate-pulse"),setTimeout(()=>{t.classList.remove("animate-pulse")},4e3)},openMobileNavMenu(){document.getElementById("open-mobile-btn").click()},toggleMobileNavSubSection(t,e){this.openMobileNavMenu();const o=document.getElementById("open-mobile-nav"),u=o.querySelector("#nav-section-accordion-"+t.data.slug),l=o.querySelector("#nav-section-accordion-btn-"+t.data.slug);u.classList.contains("active")||l.click();const n=o.querySelector("#nav-sub-section-accordion-"+e.data.slug),r=o.querySelector("#nav-sub-section-accordion-btn-"+e.data.slug);n.classList.contains("active")&&r.click(),this.highlightNavItem(n)},toggleMobileNavSection(t){const e=document.getElementById("open-mobile-nav"),o=e.querySelector("#nav-section-accordion-"+t.data.slug),u=e.querySelector("#nav-section-accordion-btn-"+t.data.slug);o.classList.contains("active")&&u.click(),this.openMobileNavMenu(),this.highlightNavItem(o)},toggleDesktopNavSubSection(t,e){const o=document.getElementById("desktop-nav"),u=o.querySelector("#nav-sub-section-title-"+e.data.slug);o.querySelector("#nav-section-btn-"+t.data.slug).click(),this.highlightNavItem(u)},toggleDesktopNavSection(t){const e=document.getElementById("desktop-nav");e.querySelector("#nav-section-menu-"+t.data.slug),e.querySelector("#nav-section-btn-"+t.data.slug).click()}},props:{breadcrumbs:{type:Object},pageTitle:{type:String}}},O={class:"flex justify-between pb-4 items-center"},C={class:"flex w-full sm:items-center gap-x-5 sm:gap-x-3"},M={class:"grow"},q={class:"grid sm:flex sm:justify-between sm:items-center gap-2"},$={key:0,class:"flex items-center whitespace-normal min-w-0 flex-wrap gap-y-2","aria-label":"Breadcrumb"},j={class:"text-sm"},z={key:0,class:"text-sm"},F={key:1,class:"text-sm"},H={class:"text-sm"},Y={key:1,class:"flex items-center whitespace-nowrap min-w-0 flex-wrap","aria-label":"Breadcrumb"},W={class:"text-sm"},G={class:"text-sm"};function J(t,e,o,u,l,n){const r=x("BaseIcon"),d=x("Link");return a(),c("div",O,[i("div",C,[i("div",M,[i("div",q,[o.breadcrumbs?(a(),c("ol",$,[i("li",j,[_(d,{href:t.route("index"),class:"flex items-center text-gray-500 hover:text-blue-600"},{default:g(()=>[_(r,{class:"size-5",name:"home"})]),_:1},8,["href"])]),o.breadcrumbs.mainSection?(a(),c("li",z,[i("span",{class:"flex items-center text-gray-500 hover:text-primaryBlue cursor-pointer",onClick:e[0]||(e[0]=k(m=>n.handleSectionClick(this.breadcrumbs.mainSection),["prevent"]))},[e[2]||(e[2]=i("svg",{class:"flex-shrink-0 mx-2 overflow-visible h-2.5 w-2.5 text-gray-400",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[i("path",{d:"M5 1L10.6869 7.16086C10.8637 7.35239 10.8637 7.64761 10.6869 7.83914L5 14",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)),h(" "+p(n.textLimit(this.breadcrumbs.mainSection.data.title,25)),1)])])):v("",!0),o.breadcrumbs.subSection?(a(),c("li",F,[i("span",{class:"flex items-center text-gray-500 hover:text-primaryBlue cursor-pointer",onClick:e[1]||(e[1]=k(m=>n.handleSubSectionClick(this.breadcrumbs.mainSection,this.breadcrumbs.subSection),["prevent"]))},[e[3]||(e[3]=i("svg",{class:"flex-shrink-0 mx-2 overflow-visible h-2.5 w-2.5 text-gray-400",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[i("path",{d:"M5 1L10.6869 7.16086C10.8637 7.35239 10.8637 7.64761 10.6869 7.83914L5 14",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)),h(" "+p(n.textLimit(this.breadcrumbs.subSection.data.title,25)),1)])])):v("",!0),i("li",H,[_(d,{href:t.route("page.view",this.breadcrumbs.page.data.path),class:"flex items-center text-gray-500 hover:text-primaryBlue"},{default:g(()=>[e[4]||(e[4]=i("svg",{class:"flex-shrink-0 mx-2 overflow-visible h-2.5 w-2.5 text-gray-400",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[i("path",{d:"M5 1L10.6869 7.16086C10.8637 7.35239 10.8637 7.64761 10.6869 7.83914L5 14",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)),h(" "+p(n.textLimit(this.breadcrumbs.page.data.title,25)),1)]),_:1},8,["href"])])])):v("",!0),o.breadcrumbs?v("",!0):(a(),c("ol",Y,[i("li",W,[_(d,{href:t.route("index"),class:"flex items-center text-gray-500 hover:text-blue-600"},{default:g(()=>[_(r,{class:"size-5",name:"home"})]),_:1},8,["href"])]),i("li",G,[_(d,{href:t.route("page.view",this.breadcrumbs.page.data.path),class:"flex items-center text-gray-500 hover:text-primaryBlue"},{default:g(()=>[e[5]||(e[5]=i("svg",{class:"flex-shrink-0 mx-2 overflow-visible h-2.5 w-2.5 text-gray-400",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[i("path",{d:"M5 1L10.6869 7.16086C10.8637 7.35239 10.8637 7.64761 10.6869 7.83914L5 14",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)),h(" "+p(n.textLimit(this.breadcrumbs.page.data.title,25)),1)]),_:1},8,["href"])])]))])])])])}const de=b(V,[["render",J]]),K={name:"PageTitle",components:{Link:w},data(){return{}},methods:{textLimit(t,e){if(t.length>e){let o;return o=t.substring(0,e),o+"..."}return t}},props:{header:{type:String}}},Q={class:"space-y-3"},U={class:"text-2xl mb-10 font-bold md:text-3xl"};function X(t,e,o,u,l,n){return a(),c("div",Q,[i("h1",U,p(o.header),1)])}const ue=b(K,[["render",X]]),Z={name:"PageNavigateLinks",components:{Link:w},data(){return{currentNavSection:null,scrollTop:!1}},methods:{textLimit(t,e){if(t.length>e){let o;return o=t.substring(0,e),o+"..."}return t},generateSlug(t){return N(t,{lower:!0,strict:!0,locale:"ru"})},onScroll(t){const e=window.scrollY;this.scrollTop=e>100;const o=document.querySelectorAll("h2"),u=document.querySelector("#visor");let l=null;const n=u.getBoundingClientRect();if(n.top>window.scrollY){this.currentNavSection=null,l=null;return}for(let r=0;r<o.length;r++){const d=o[r],m=d.getBoundingClientRect();if(m.top>=0&&m.bottom<=window.innerHeight&&m.bottom>=n.top&&m.top<=n.bottom){d!==l&&(this.currentNavSection=d.id,l=d);break}}},scrollToTop(){window.scrollTo(0,0)}},mounted(){window.addEventListener("scroll",this.onScroll)},unmounted(){window.removeEventListener("scroll",this.onScroll)},props:{headerNavs:{type:Array}}},ee={class:"order-last hidden w-56 shrink-0 lg:block"},te={key:0,class:"sticky top-[100px] h-[calc(100vh-121px)]"},oe={class:"styled-scrollbar max-h-[70vh] space-y-1.5 overflow-y-auto py-2 text-sm"},se=["href"];function ie(t,e,o,u,l,n){return a(),c(f,null,[e[3]||(e[3]=i("div",{class:"w-full h-[67px] fixed pointer-events-none",id:"visor"},null,-1)),i("nav",ee,[o.headerNavs.length>0?(a(),c("div",te,[e[2]||(e[2]=i("div",{class:"text-gray-1000 mb-2 text-md font-medium"},"На этой странице",-1)),i("ul",oe,[(a(!0),c(f,null,E(o.headerNavs,r=>(a(),c("li",{class:"anchor-li",key:r.id},[i("a",{class:T([{"translate-x-2 text-primaryBlue":l.currentNavSection===n.generateSlug(r.text),"bg-transperant text-gray-600 hover:text-gray-900":l.currentNavSection!==n.generateSlug(r.text)},"duration-150 block py-1 px-2 leading-[1.6] rounded-md"]),href:"#"+n.generateSlug(r.text)},p(r.text),11,se)]))),128)),_(B,{name:"fade"},{default:g(()=>[l.scrollTop?(a(),c("li",{key:0,class:"anchor-li flex items-center py-2 border-t",onClick:e[0]||(e[0]=k((...r)=>n.scrollToTop&&n.scrollToTop(...r),["prevent"]))},e[1]||(e[1]=[i("button",{class:"bg-transperant text-gray-600 cursor-pointer hover:text-gray-900 duration-300 block px-2 leading-[1.6] rounded-md"},"К началу",-1),i("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-[17px] text-gray-600"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 11.25l-3-3m0 0l-3 3m3-3v7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)]))):v("",!0)]),_:1})])])):v("",!0)])],64)}const me=b(Z,[["render",ie]]);export{me as P,ue as a,de as b,ce as c};
|