PageSourceSearch

https://bs.enu.kz/_nuxt/CDhr6BDX.js

js enu.kz collected 2026-10-01 10:30:14 UTC 5,282 bytes, 1 lines download raw bytes

1import{_ as ee,K as te,d as ae,u as ne,w as le,c as f,r as _,aa as oe,N as se,X as ie,h as u,i as l,f as re,F as w,t as N,l as g,j as O,C as ue,$ as p,z as V,o as c,s as ce,O as de}from"./DgkDjtrN.js";import{f as ve}from"./jc6m43xI.js";import{u as me}from"./-R6SFMM_.js";const fe={class:"container"},pe={class:"title"},_e=["innerHTML"],ge={class:"masonry"},he=["src","alt","onClick"],be={key:0,class:"masonry-loader"},ye=["src","alt"],ke={key:0,class:"lb-caption__text"},we=["disabled"],Ce={class:"thumbs"},xe=["src","onClick","alt"],Ee={__name:"[id]",async setup(Le){let h,E;const L=te().params.id,{locale:v}=ae(),$=ne().public.smartEnuApi,Q=$.replace(/\/$/,""),{data:m,pending:R}=([h,E]=le(()=>me(`${Q}/web/photoGallery/public/${L}`,{method:"GET",key:`photo-gallery-${L}`},"$yKeE1iELBB")),h=await h,E(),h),Z=f(()=>{if(!m.value)return"";const e=m.value;return v.value==="kz"?e.titleKz:v.value==="ru"?e.titleRu:e.titleEn}),z=f(()=>{if(!m.value)return"";const e=m.value;return v.value==="kz"?e.contentKz:v.value==="ru"?e.contentRu:e.contentEn}),S=f(()=>ce(z.value)),d=f(()=>{var s,n;const e=m.value;if(!e)return[];const t=$+ve,a=[];return(s=e.main_image_file)!=null&&s.filepath&&a.push({url:t+e.main_image_file.filepath,desc:""}),(n=e.files)!=null&&n.length&&a.push(...[...e.files].sort((o,r)=>(o.position??0)-(r.position??0)).map(o=>{var F,H,I,K,M,G,P;const r=(F=o.file)!=null&&F.filepath?t+o.file.filepath:null;if(!r)return null;const Y=v.value==="kz"?o.img_desc_kz||((I=(H=o.file)==null?void 0:H.detail)==null?void 0:I.img_desc_kz)||"":v.value==="ru"?o.img_desc_ru||((M=(K=o.file)==null?void 0:K.detail)==null?void 0:M.img_desc_ru)||"":o.img_desc_en||((P=(G=o.file)==null?void 0:G.detail)==null?void 0:P.img_desc_en)||"";return{url:r,desc:Y}}).filter(Boolean)),a}),b=_(!1),X=f(()=>R.value||!b.value);let T=0;function q(e){return new Promise(t=>{const a=new Image;a.onload=()=>t(),a.onerror=()=>t(),a.src=e})}oe([d,R],async([e,t])=>{const a=++T;if(b.value=!1,!t){if(!e.length){b.value=!0;return}await Promise.all(e.map(s=>q(s.url))),a===T&&(b.value=!0)}},{immediate:!0});const C=f(()=>{var e,t;return((t=(e=d.value)==null?void 0:e[i.value])==null?void 0:t.desc)||""}),y=_(!1),i=_(0),U=_(null),k=_(!1);function B(e){i.value=e,y.value=!0,de(()=>{var t,a;(a=(t=U.value)==null?void 0:t.focus)==null||a.call(t)}),document.body.style.overflow="hidden"}function x(){y.value=!1,document.body.style.overflow=""}function j(){const e=d.value.length;i.value=(i.value-1+e)%e}function A(){const e=d.value.length;i.value=(i.value+1)%e}function J(e){try{const t=new URL(e,window.location.origin),a=t.pathname.split("/").filter(Boolean).pop(),n=t.searchParams.get("filename")||a;return n&&decodeURIComponent(n)||`image-${i.value+1}.jpg`}catch{return`image-${i.value+1}.jpg`}}async function W(){var t,a;const e=(a=(t=d.value)==null?void 0:t[i.value])==null?void 0:a.url;if(!(!e||k.value)){k.value=!0;try{const s=await fetch(e,{method:"GET"});if(!s.ok)throw new Error(`HTTP ${s.status}`);const n=await s.blob(),o=URL.createObjectURL(n),r=document.createElement("a");r.href=o,r.download=J(e),document.body.appendChild(r),r.click(),r.remove(),setTimeout(()=>URL.revokeObjectURL(o),0)}catch{window.open(e,"_blank","noopener,noreferrer")}finally{k.value=!1}}}function D(e){y.value&&(e.key==="Escape"&&x(),e.key==="ArrowLeft"&&j(),e.key==="ArrowRight"&&A())}return se(()=>window.addEventListener("keydown",D)),ie(()=>window.removeEventListener("keydown",D)),(e,t)=>{var a;return c(),u(w,null,[l("div",fe,[re(m)?(c(),u(w,{key:0},[l("div",pe,N(Z.value),1),z.value?(c(),u("div",{key:0,class:"description",innerHTML:S.value},null,8,_e)):g("",!0)],64)):g("",!0),l("div",ge,[(c(!0),u(w,null,O(d.value,(s,n)=>(c(),u("div",{key:n,class:"masonry-item"},[l("img",{src:s.url,alt:`img-${n}`,onClick:o=>B(n)},null,8,he)]))),128)),X.value?(c(),u("div",be,t[1]||(t[1]=[l("img",{src:ue,alt:"Loading..."},null,-1)]))):g("",!0)])]),y.value?(c(),u("div",{key:0,class:"lightbox",onClick:p(x,["self"])},[l("div",{class:"lb-topbar"},[l("button",{class:"icon-btn",onClick:x,"aria-label":"close"},"✕")]),l("button",{class:"nav left",onClick:p(j,["stop"]),"aria-label":"prev"},"‹"),l("div",{class:"lightbox-content",tabindex:"0",ref_key:"lb",ref:U},[l("img",{src:(a=d.value[i.value])==null?void 0:a.url,class:"big",alt:`big-${i.value}`},null,8,ye)],512),l("button",{class:"nav right",onClick:p(A,["stop"]),"aria-label":"next"},"›"),l("div",{class:V(["lb-caption",{"lb-caption--no-text":!C.value}]),onClick:t[0]||(t[0]=p(()=>{},["stop"]))},[C.value?(c(),u("div",ke,N(C.value),1)):g("",!0),l("button",{class:"icon-btn icon-btn--sm",type:"button",disabled:k.value,onClick:p(W,["stop"]),"aria-label":"download",title:"Скачать"},t[2]||(t[2]=[l("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false"},[l("path",{fill:"currentColor",d:"M12 3a1 1 0 0 1 1 1v9.59l2.3-2.3a1 1 0 1 1 1.4 1.42l-4.01 4a1 1 0 0 1-1.4 0l-4.01-4a1 1 0 1 1 1.4-1.42l2.3 2.3V4a1 1 0 0 1 1-1Zm-7 16a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H6a1 1 0 0 1-1-1Z"})],-1)]),8,we)],2),l("div",Ce,[(c(!0),u(w,null,O(d.value,(s,n)=>(c(),u("img",{key:n,src:s.url,class:V({active:n===i.value}),onClick:p(o=>B(n),["stop"]),alt:`thumb-${n}`,loading:"lazy"},null,10,xe))),128))])])):g("",!0)],64)}}},Ue=ee(Ee,[["__scopeId","data-v-a300be14"]]);export{Ue as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.