PageSourceSearch

https://elitnoe.ru/_nuxt/ClaS5T-L.js

js elitnoe.ru collected 2026-09-24 22:59:20 UTC 27,097 bytes, 1 lines download raw bytes

1import{d as P,aT as O,aU as we,a1 as z,r as $,p as Y,Y as I,a0 as W,aV as S,y as T,aW as Ce,aX as re,C as me,V as B,aY as q,a2 as N,aZ as Z,a_ as ye,a$ as ae,b0 as ke,E as X,a3 as G,P as se,b1 as _e,b2 as Oe,b3 as je,aE as Be,ai as Se,b4 as Le,c as J,n as le,j as M,f as D,a as Q,g as V,h as Ye,w as F,b5 as ze,o as E,i as Ve,k as Pe,e as H,t as Ie,N as Fe}from"./eUuGUOoT.js";function Te(e,a){const n={x:0,y:0};return n.x=e.x*a,n.y=e.y*a,n}function Re(e,a){const n={x:0,y:0};return n.x=a(e.x,1),n.y=a(e.y,2),n}function $e(e,a){const n=2**a/2*256;return Te({x:e.x+1,y:1-e.y},n)}function ue(e,a,n){const t=e.toWorldCoordinates(a);return $e(t,n)}function Ae(e,a){const n=2**a/2*256;return{x:e.x/n-1,y:1-e.y/n}}function ge(e,a,n){return Math.max(Math.min(e,n),a)}function Ee(e,a,n){const t=Re(Ae(a,n),(s=>ge(s,-1,.999999999999999)));return e.fromWorldCoordinates(t)}function ve(e,a,n){const t=ue(e,a[0],n),s=ue(e,a[1],n),l=2**n*256,r=[[t.x,t.y],[s.x,s.y]];return t.x>s.x&&(r[0][0]=t.x,r[1][0]=s.x+l),t.y>s.y&&(r[0][1]=s.y,r[1][1]=t.y),r}function We(e,a){return{x:Math.max(e.x-(a?a[1]+a[3]:0),1),y:Math.max(e.y-(a?a[0]+a[2]:0),1)}}function De(e,a,n,t,s){const[[l,r],[x,g]]=ve(e,a,0),c=Math.max(Math.abs(x-l),1e-10),m=Math.max(Math.abs(g-r),1e-10),h=ge(Math.min(Math.log2(n.x/c),Math.log2(n.y/m)),s.min,s.max);return t?Math.floor(h+1e-6):h}function Ge(e,a,n){const[[t,s],[l,r]]=ve(e,a,n);return Ee(e,{x:(t+l)/2,y:(s+r)/2},n)}async function he({bounds:e,map:a,roundZoom:n,comfortZoomLevel:t}){const s=Object.keys(a).find(o=>o.endsWith("CtxMap"));s||O({text:"CtxMap was not found in useYMapsGetCenterAndZoomFromBounds",isInternal:!0});const l=a[s],r=a.zoom,x=await new Promise((o,u)=>{l.forEach((p,{name:C})=>{C==="map"&&o(p)}),u(we({text:"Map item was not found in useYMapsGetCenterAndZoomFromBounds",isInternal:!0}))}),g=Object.keys(x).find(o=>o.endsWith("_context"));g||O({text:"CtxMapKey was not found in useYMapsGetCenterAndZoomFromBounds",isInternal:!0});const c=x[g].map,m=c.projection,h=c.size,f=c.margin,i=c.effectiveZoomRounding==="snap",v=c.zoomRange;let y=De(m,e,We(h,f),i,v);const k=Ge(m,e,y);if(n||t){const o=y;let u=Math[typeof n=="string"?n:"floor"](y);if(n&&(y=u),t){const p=typeof t=="object"?t:{};p.roundStrategy&&(u=Math[p.roundStrategy](o));const C=o-u,L={diff:.5,correction:1,...p};C<L.diff&&(y-=L.correction),y<=r&&(y=o)}}return{zoom:y,center:k}}function xe(e){e.length<2&&O({text:"Invalid parameters in getBoundsFromCoords: you must pass at least two LngLat"});const{minLongitude:a,minLatitude:n,maxLongitude:t,maxLatitude:s}=e.reduce((l,[r,x])=>({minLongitude:Math.min(l.minLongitude,r),minLatitude:Math.min(l.minLatitude,x),maxLongitude:Math.max(l.maxLongitude,r),maxLatitude:Math.max(l.maxLatitude,x)}),{minLongitude:1/0,minLatitude:1/0,maxLongitude:-1/0,maxLatitude:-1/0});return[[a,n],[t,s]]}const ee=e=>e instanceof Date,Ne=e=>Object.keys(e).length===0,ne=e=>e!=null&&typeof e=="object",ce=(e,...a)=>Object.prototype.hasOwnProperty.call(e,...a),te=e=>ne(e)&&Ne(e),Ze=()=>Object.create(null),oe=(e,a)=>{if(e===a)return{};if(!ne(e)||!ne(a))return a;const n=Object.keys(e).reduce((t,s)=>(ce(a,s)||(t[s]=void 0),t),Ze());return ee(e)||ee(a)?e.valueOf()==a.valueOf()?{}:a:Object.keys(a).reduce((t,s)=>{if(!ce(e,s))return t[s]=a[s],t;const l=oe(e[s],a[s]);return te(l)&&!ee(l)&&(te(e[s])||!te(a[s]))||(t[s]=l),t},n)};function ie(){X()||O({text:"injectMap must be only called on runtime.",isInternal:!0});const e=N("map");return(!e||!se(e))&&O({text:"Was not able to inject valid map in injectMap.",isInternal:!0}),e}function Ue(){X()||O({text:"injectLayers must be only called on runtime.",isInternal:!0});const e=N("layers");return(!e||!se(e))&&O({text:"Was not able to inject valid layers in injectLayers.",isInternal:!0}),e}async function He({timeoutCallback:e,waitDuration:a}={}){if(typeof window>"u"&&O({text:"waitTillYmapInit cannot be called on SSR.",isInternal:!0}),!(typeof ymaps3<"u"))return new Promise((n,t)=>{if(typeof ymaps3>"u"){let s;a=typeof a<"u"?a:S.settings.value.mapsScriptWaitDuration,a!==!1&&(s=setTimeout(()=>{e?.(s,!0),t(new S.YandexMapException("Was not able to wait for map initialization in waitTillYmapInit. Ensure that map was initialized. You can change this behavior b
1y using mapsScriptWaitDuration."))},typeof a=="number"?a:5e3),e?.(s,!1)),I(S.isLoaded,()=>{s&&(clearTimeout(s),e?.(s,!0)),S.loadStatus.value==="loaded"?n():t(S.loadError)},{immediate:!0})}else n()})}async function be({map:e,timeoutCallback:a,waitDuration:n}={}){!e&&!X()&&O({text:"onMapInit must be only called on runtime.",isInternal:!0}),typeof window>"u"&&O({text:"waitTillMapInit cannot be called on SSR.",isInternal:!0});const t=e||ie();if(!t.value)return new Promise((s,l)=>{let r;n=typeof n<"u"?n:S.settings.value.mapsRenderWaitDuration,n!==!1&&(r=setTimeout(()=>{a?.(r,!0),l(new S.YandexMapException("Was not able to wait for map initialization in waitTillMapInit. You can change this behavior by using mapsRenderWaitDuration."))},typeof n=="number"?n:5e3),a?.(r,!1));let x;x=I(t,()=>{t.value&&(x?.(),r&&(clearTimeout(r),a?.(r,!0)),s())},{immediate:!0})})}function qe({children:e,isMercator:a,root:n}){n||O({text:"Failed to execute deleteMapChild due to destroyed root",isInternal:!0}),e&&!a?typeof n?.value=="object"&&Array.isArray(n.value)?n.value=n.value.filter(t=>t!==e):n.value?.removeChild(e):n.value&&e&&a&&"update"in n.value&&n.value.update({projection:void 0})}const Ke=P({name:"YandexMap",props:{modelValue:{type:Object,default:null},value:{type:Object,default:null},tag:{type:String,default:"div"},width:{type:String,default:"100%"},height:{type:String,default:"100%"},zIndex:{type:Number,default:0},settings:{type:Object,required:!0},readonlySettings:{type:Boolean,default:!1},realSettingsLocation:{type:Boolean,default:!1},layers:{type:Array,default:(()=>[])},cursorGrab:{type:Boolean,default:!1}},emits:{input(e){return!e||typeof ymaps3>"u"||e instanceof ymaps3.YMap},"update:modelValue"(e){return!e||typeof ymaps3>"u"||e instanceof ymaps3.YMap}},slots:Object,setup(e,{slots:a,emit:n}){const t=z(null),s=z(null),l=z([]),r=z(null),x=z(null),g=z(!1),c=$(0);G("map",t),G("layers",l),G("projection",r),G("needsToHold",c),n("input",null),n("update:modelValue",null);const m=Y(()=>({...e.settings,projection:void 0})),h=async()=>{e.settings.location||O({text:"You must specify location in YandexMap settings"}),t.value&&t.value.destroy();const o=x.value;if(!o)return;const u=m.value;r.value&&(u.projection=r.value),t.value=new ymaps3.YMap(o,u,[...l.value,...e.layers]),n("input",t.value),n("update:modelValue",t.value)};let f,i,v=null;async function y(){await be({map:t,timeoutCallback:(o,u)=>{u?v=null:v=o}}).catch(()=>{}),t.value&&(e.cursorGrab?(f=new ymaps3.YMapListener({onActionStart:o=>{o.type==="drag"&&e.cursorGrab&&s.value?.classList.add("__ymap--grabbing")},onActionEnd:o=>{o.type==="drag"&&s.value?.classList.remove("__ymap--grabbing")}}),t.value.addChild(f)):f&&t.value.removeChild(f))}let k=!1;return I(S.loadStatus,async o=>{if(o==="pending"){k=!0,g.value=!1;return}o!=="loaded"&&!k||(g.value=!0,await W(),c.value&&await new Promise(u=>I(c,()=>{c.value||u()},{immediate:!0})),await h())}),T(async()=>{const o=()=>{i?.();let u=q(m);i=I(m,p=>{if(!t.value)return;const C=q(p);e.realSettingsLocation&&C.location&&("center"in C.location&&"center"in u.location?u.location.center=t.value.center:"bounds"in C.location&&"bounds"in u.location&&(u.location.bounds=t.value.bounds),"zoom"in C.location&&"zoom"in u.location&&(u.location.zoom=t.value.zoom));const L=Object.keys(oe(u,C));if(L.length===0)return;const _={...C};for(const j in _)L.includes(j)||delete _[j];u=C,t.value?.update(_)},{deep:!0})};if(e.readonlySettings||o(),I(()=>e.readonlySettings,u=>{u?o():i?.()}),I(()=>e.cursorGrab,y,{immediate:!0}),await Ce(),!S.isLoaded.value){if(S.settings.value.initializeOn==="onComponentMount")try{await re()}catch(u){console.error("An error occured while initializing Yandex Map with onComponentMount setting"),console.error(u);return}else(S.loadStatus.value==="loading"||S.settings.value.initializeOn==="onPluginInit")&&(S.settings.value.initializeOn==="onPluginInit"&&S.loadStatus.value!=="loading"&&await W(),await re());S.isLoaded.value||O({text:"You have set up <yandex-map> component without initializing Yandex maps. Please check initializeOn setting or call initYmaps manually before registering this component."})}g.value=!0,await W(),c.value&&await new Promise(u=>I(c,()=>{c.value||u()},{immediate:!0})),await h()}),me(()=>{v&&clearTimeout(v),t.value&&t.value.destroy(),t.value=null,n("input",t.value),n("update:modelValue",t.value)}),()=>{const o={class:["__ymap",{"__ymap--grab":e.cursorGrab}],ref:s,style:{width:e.width,height:e.height,"z-index":e.zIndex.toString()}},u=B("div",{class:"__ymap_container",ref:x}),p={class:"__ymap_slots",style:{display:"none"}};return g.value?B(e.tag,o,[u,B("div",p,a.default?.({}))]):B(e.tag,o,[u,B("div",p)])}}});
1async function A({returnOnly:e,willDeleteByHand:a,strictMapRoot:n,requiredImport:t,createFunction:s,settings:l,settingsUpdateIgnoreKeys:r,settingsUpdateFull:x,isLayer:g,isMercator:c,isMapRoot:m,mapRootRef:h,duplicateInit:f}){X()||O({text:"setupMapChildren must be only called on runtime.",isInternal:!0});try{const i=z(),v=N("mapRoot",null),y=N("mapRootInitPromises",null);let k;const o=ie(),u=Ue();let p=null;const C=(_,j)=>{p||(p=new Set),j?p.delete(_):p.add(_)};if(m&&!f&&(G("mapRoot",h||i),k=z([]),G("mapRootInitPromises",k)),!e&&!a&&me(()=>{i.value&&qe({children:i.value,isMercator:c,root:v?.value?v:o}),p?.size&&(p.forEach(_=>clearTimeout(_)),p.clear())}),l){let _=q(l);I(l,j=>{if(!j)return;if(x){console.log(j),i.value&&"update"in i.value&&i.value.update(j);return}const b=Object.keys(oe(_,j));if(b.length===0)return;const d=q(j);for(const R in d)b.includes(R)||delete d[R];const w=r&&(se(r)?r.value:r);w&&_e(d,w),Object.keys(d).length!==0&&(_=q(j),i.value&&"update"in i.value&&i.value.update(d))},{deep:!0})}!g&&!c?(await be({timeoutCallback:C}),o.value||O({text:"map is undefined in setupMapChildren. Please verify that Yandex Maps were initialized successfully and you only use components inside <yandex-map>."})):await He({timeoutCallback:C}),n&&(v?.value||await W(),v?.value||O({text:"mapRoot is undefined in setupMapChildren. Please verify that you are using component inside it's root: for example, don't use Controls outside <yandex-map-controls>."})),m&&(await W(),await Promise.all(k?.value||[]));let L;if(t){const _=t();y?.value&&y.value.push(Promise.resolve(_)),L=await _}return i.value=s(L),!e&&o.value&&!c?(y?.value&&(await Promise.all(y.value),t||await W()),typeof v?.value=="object"&&Array.isArray(v.value)?v.value=[...v.value,i.value]:(v?.value||o.value).addChild(i.value)):g?u.value.push(i.value):c&&o.value&&o.value.update({projection:i.value}),i.value}catch(i){throw console.error("Error during map children loading",i),i}}const Xe=P({name:"YandexMapListener",props:{value:{type:Object,default:null},modelValue:{type:Object,default:null},settings:{type:Object,default:()=>({})}},emits:{input(e){return!0},"update:modelValue"(e){return!0}},slots:Object,setup(e,{slots:a,emit:n}){let t;return T(async()=>{t=await A({createFunction:()=>new ymaps3.YMapListener(e.settings||{}),settings:Y(()=>e.settings)}),n("input",t),n("update:modelValue",t)}),()=>Z(a.default?.({}))}}),Je=P({name:"YandexMapDefaultFeaturesLayer",props:{value:{type:Object,default:null},modelValue:{type:Object,default:null},settings:{type:Object,default:()=>({})}},emits:{input(e){return!0},"update:modelValue"(e){return!0}},slots:Object,setup(e,{slots:a,emit:n}){const t=N("needsToHold");t.value++;let s;return T(async()=>{s=await A({createFunction:()=>new ymaps3.YMapDefaultFeaturesLayer(e.settings||{}),settings:Y(()=>e.settings),isLayer:!0}),n("input",s),n("update:modelValue",s),t.value--}),()=>Z(a.default?.({}))}}),Qe=P({name:"YandexMapDefaultSchemeLayer",props:{value:{type:Object,default:null},modelValue:{type:Object,default:null},settings:{type:Object,default:()=>({})}},emits:{input(e){return!0},"update:modelValue"(e){return!0}},slots:Object,setup(e,{slots:a,emit:n}){const t=N("needsToHold");t.value++;let s;return T(async()=>{s=await A({createFunction:()=>new ymaps3.YMapDefaultSchemeLayer(e.settings||{}),settings:Y(()=>e.settings),isLayer:!0}),n("input",s),n("update:modelValue",s),t.value--}),()=>a.default?.({})}});function et({position:e,containerAttrs:a,wrapperAttrs:n,zeroSizes:t}){const s={class:["__ymap-marker"],style:{}},l={class:["__ymap-marker_wrapper"],style:{}},r=e==="default"||e==="default default";if(e&&!r)if(e.startsWith("translate"))l.style.transform=e;else{let g=0,c=0;const m=e.split(" ");for(let h=0;h<m.length;h++){let f=0;const i=m[h];switch(i){case"top":case"left":f=-100;break;case"top-center":case"left-center":f=-50;break;case"bottom":case"right":f=100;break;case"bottom-center":case"right-center":f=50;break;default:f=0}i.startsWith("left")||i.startsWith("right")?g=f:c=f}l.style.transform=`translate(${g}%, ${c}%)`}(t===!0||t!==!1&&e&&!r)&&(s.style.width="0",s.style.height="0",l.style.transform&&(l.style.width="fit-content"));const x={root:{...a??{}},children:{...n??{}}};for(const[g,c]of Object.entries(x)){const m=g==="root"?s:l;c.class&&(Array.isArray(c.class)||(c.class=[c.class]),c.class=[...m.class,...c.class]),c?.style&&(typeof c.style!="object"||Array.isArray(c.style)?console.warn(`Style property was given in ${g} of marker, but it is not an object. Style of this prop can only be an object, therefore it was ignored.`):c.style={...m.style,...c.style}),Object.assign(m,c)}return{root:s,children:l}}function tt(e){e={...e};const a={position:!0,containerAttrs:!0,wrapperAttrs:!0,zeroSizes:!0};for(const n in a)n in e&&delete e[n];return e}
1const K=P({name:"YandexMapControls",props:{value:{type:Object,default:null},modelValue:{type:Object,default:null},settings:{type:Object,required:!0}},emits:{input(e){return!0},"update:modelValue"(e){return!0}},slots:Object,setup(e,{slots:a,emit:n}){const t=z(null);return T(async()=>{e.settings.position||O({text:"You must specify position in YandexMapControls settings"}),t.value=await A({createFunction:()=>new ymaps3.YMapControls(e.settings),isMapRoot:!0,settings:Y(()=>e.settings)}),n("input",t.value),n("update:modelValue",t.value)}),()=>t.value?Z(a.default?.({})):B("div")}}),nt=P({name:"YandexMapControl",props:{value:{type:Object,default:null},modelValue:{type:Object,default:null},settings:{type:Object,default:()=>({})}},emits:{input(e){return!0},"update:modelValue"(e){return!0}},slots:Object,setup(e,{slots:a,emit:n,attrs:t}){let s;const l=$(null);return T(async()=>{s=await A({createFunction:()=>new ymaps3.YMapControl(e.settings,l.value),settings:Y(()=>e.settings),strictMapRoot:!0}),n("input",s),n("update:modelValue",s)}),()=>ae([B("div",{ref:l,...ke(t)},a.default?.({}))])}}),at=P({name:"YandexMapGeolocationControl",props:{value:{type:Object,default:null},modelValue:{type:Object,default:null},settings:{type:Object,default:()=>({})}},emits:{input(e){return!0},"update:modelValue"(e){return!0}},slots:Object,setup(e,{slots:a,emit:n}){let t;return T(async()=>{t=await A({createFunction:s=>new s.YMapGeolocationControl(e.settings),requiredImport:()=>ymaps3.import("@yandex/[email protected]"),settings:Y(()=>e.settings),strictMapRoot:!0}),n("input",t),n("update:modelValue",t)}),()=>Z(a.default?.({}))}}),st=P({name:"YandexMapZoomControl",props:{value:{type:Object,default:null},modelValue:{type:Object,default:null},settings:{type:Object,default:()=>({})}},emits:{input(e){return!0},"update:modelValue"(e){return!0}},slots:Object,setup(e,{slots:a,emit:n}){let t;return T(async()=>{t=await A({createFunction:s=>new s.YMapZoomControl(e.settings),requiredImport:()=>ymaps3.import("@yandex/[email protected]"),settings:Y(()=>e.settings),strictMapRoot:!0}),n("input",t),n("update:modelValue",t)}),()=>Z(a.default?.({}))}}),ot=P({name:"YandexMapOpenMapsButton",props:{value:{type:Object,default:null},modelValue:{type:Object,default:null},settings:{type:Object,default:()=>({})}},emits:{input(e){return!0},"update:modelValue"(e){return!0}},slots:Object,setup(e,{slots:a,emit:n}){let t;return T(async()=>{t=await A({createFunction:({YMapOpenMapsButton:s})=>new s(e.settings),requiredImport:()=>ymaps3.import("@yandex/ymaps3-controls-extra"),settings:Y(()=>e.settings),strictMapRoot:!0}),n("input",t),n("update:modelValue",t)}),()=>Z(a.default?.({}))}}),de=P({name:"YandexMapClustererCluster",props:{clusterMarkerProps:{type:Object,default:()=>({})},zoomOnClusterClick:{type:[Boolean,Object],default:!1},feature:{type:Object,required:!0}},emits:{trueBounds(e){return e.length===2},updatedBounds(e){return e.length===2},updatedCluster(e){return!0}},slots:Object,setup(e,{slots:a,emit:n}){const t=ie(),s=$(null),l=Y(()=>et({position:e.clusterMarkerProps?.position??"top-center left-center",containerAttrs:e.clusterMarkerProps?.containerAttrs,wrapperAttrs:e.clusterMarkerProps?.wrapperAttrs,zeroSizes:e.clusterMarkerProps?.zeroSizes}));function r(){const g=s.value;if(!g)return;const c=e.feature.element,m=e.feature.clusterer;c.children.length&&c.children.forEach(h=>{try{c.removeChild(h)}catch(f){console.warn("Non-fatal error occurred when updating Map clusterer",f)}});try{c.addChild(new ymaps3.YMapMarker({...tt(e.clusterMarkerProps),coordinates:m.lnglat,onClick:async(h,f)=>{if(e.clusterMarkerProps.onClick?.(h,f),m.features.length>=2){const i=typeof e.zoomOnClusterClick=="object"?e.zoomOnClusterClick:{},v=m.features.map(o=>o.geometry.coordinates),y=xe(v);if(n("trueBounds",y),!e.zoomOnClusterClick)return;const k=i.duration??500;if(i.strategy==="boundsCorrect"){const[[o,u],[p,C]]=y,L=u-C,_=p-o,j=[[o-_,u-L],[p+_,C+L]];n("updatedBounds",j),t.value?.setLocation({bounds:j,duration:k,easing:i.easing})}else{const{center:o,zoom:u}=await he({bounds:y,map:t.value,roundZoom:!0,comfortZoomLevel:!0});t.value?.setLocation({center:o,zoom:u,duration:k,easing:i.easing}),await je(k+50),t.value&&n("updatedBounds",t.value.bounds)}}}},g))}catch(h){console.error(h)}}I(s,r);const x=$(!1);return Oe(()=>{if(!x.value){x.value=!0;return}n("updatedCluster",e.feature.clusterer.clusterId)}),()=>ae([B("div",{...l.value.root,ref:s},[B("div",l.value.children,a.default?.({clusterer:e.feature.clusterer,coordinates:e.feature.clusterer.lnglat,length:e.feature.clusterer.features.length}))])])}}),fe=P({name:"YandexMapClustererClusters",props:{clusterMarkerProps:{type:Object,default:()=>({})},zoomOnClusterClick:{type:[Boolean,Object],default:!1}},emits:{trueBounds(e){return e.length===2},updatedBounds(e){return e.length===2},updatedCluster(e){return!0}},slots:Object,setup(e,{emit:a,slots:n}){const t=N("clusterFeatures");return()=>{let s;return ye()?s=t.value.map(l=>B(de,{props:{clusterMarkerProps:e.clusterMarkerProps,zoomOnClusterClick:e.zoomOnClusterClick,feature:l},on:{trueBounds:r=>a("trueBounds",r),updatedBounds:r=>a("updatedBounds",r),updatedCluster:r=>a("updatedCluster",r)},scopedSlots:{default:r=>B("div",{},[n.default?.(r)])},key:l.clusterer.clusterId})):s=t.value.map(l=>B(de,{clusterMarkerProps:e.clusterMarkerProps,zoomOnClusterClick:e.zoomOnClusterClick,feature:l,onTrueBounds:r=>a("trueBounds",r),onUpdatedBounds:r=>a("updatedBounds",r),onUpdatedCluster:r=>a("updatedCluster",r),key:l.clusterer.clusterId},{default:r=>n.default?.(r)})),ae(s)}}}
1),it=P({name:"YandexMapClusterer",props:{value:{type:Object,default:null},modelValue:{type:Object,default:null},settings:{type:Object,default:()=>({})},clusterMarkerProps:{type:Object,default:()=>({})},gridSize:{type:Number,default:64},zoomOnClusterClick:{type:[Boolean,Object],default:!1}},emits:{input(e){return!0},"update:modelValue"(e){return!0},trueBounds(e){return e.length===2},updatedBounds(e){return e.length===2}},slots:Object,setup(e,{slots:a,emit:n}){const t=z(null),s=z([]),l=z([]),r=$(0),x=Y(()=>l.value.filter(i=>i.clusterer.features.length>1));G("clusterFeatures",x);let g;const c=Y(()=>e.settings.tickTimeout),m=()=>{const i={...e.settings};!i.method&&g&&(i.method=g?.({gridSize:e.gridSize})),c.value&&(i.tickTimeout=c.value);let v=i.marker;v||(v=o=>{const u=s.value.find(p=>p._props.id===o.id);return u||(O({text:`No entity with id ${o.id} (coordinates: ${o.geometry.coordinates.join(", ")}) were found in YandexMapClusterer.`,isInternal:!0,warn:!0}),new ymaps3.YMapMarker({coordinates:o.geometry.coordinates}))});const y=o=>{const u=l.value.find(p=>p.clusterer.lnglat[0]===o[0]&&p.clusterer.lnglat[1]===o[1]);return u?u.element:(O({text:`No element with coordinates of ${o.join(", ")} were found in YandexMapClusterer.`,isInternal:!0,warn:!0}),new ymaps3.YMapMarker({coordinates:o}))};let k=i.features;return k||(k=s.value.map((o,u)=>(o._props.id||o.update({id:Math.random().toString()+Date.now().toString()}),{type:"Feature",id:o._props.id,geometry:{type:"Point",coordinates:o._props.coordinates},properties:"properties"in o._props?o._props.properties:{}}))),i.onRender=o=>{if(o.length<=1&&r.value++,l.value=o.map(u=>(u.clusterId=`cluster-${r.value}-${u.features.map(p=>p.id).join(",")}`,{clusterer:u,element:l.value.find(p=>p.clusterer.clusterId===u.clusterId)?.element||new ymaps3.YMapCollection({})})),e.settings.onRender)return e.settings.onRender(o)},{...i,marker:v,features:k,cluster:y}},h=async()=>{l.value=[],await W(),t.value?.update(m()),t.value?._render()};I(()=>[e.settings,e.gridSize],()=>{h()},{deep:!0});const f=async()=>{t.value=await A({createFunction:({YMapClusterer:i,clusterByGrid:v})=>{g=v;const y=m();return y.features.length>0&&(y.features=[]),new i(y)},requiredImport:()=>ymaps3.import("@yandex/[email protected]"),isMapRoot:!0,mapRootRef:s}),n("input",t.value),n("update:modelValue",t.value)};return I(s,async()=>{await W(),h()}),T(()=>{f()}),()=>t.value?ye()?B("div",[...a.default?.({})||[],B(fe,{props:{clusterMarkerProps:e.clusterMarkerProps,zoomOnClusterClick:e.zoomOnClusterClick},on:{trueBounds:i=>n("trueBounds",i),updatedBounds:i=>n("updatedBounds",i),updatedCluster:()=>r.value++},scopedSlots:{default:i=>B("div",{},[a.cluster?.(i)])}})]):B("div",[...a.default?.({})||[],B(fe,{clusterMarkerProps:e.clusterMarkerProps,zoomOnClusterClick:e.zoomOnClusterClick,onTrueBounds:i=>n("trueBounds",i),onUpdatedBounds:i=>n("updatedBounds",i),onUpdatedCluster:i=>r.value++},{default:i=>a.cluster?.(i)})]):B("div")}}),rt={key:0,class:"yandex-map__overlay"},lt={class:"yandex-map__map"},ut={class:"yandex-map__marker-container yandex-map__marker-container--cluster"},ct={class:"yandex-map__marker-circle"},pe=9,ft=P({__name:"YandexMap",props:{items:{},showOneAsClickable:{type:Boolean},isDefaultMarker:{type:Boolean},showFullscreen:{type:Boolean},showZoomControl:{type:Boolean},showGeolocation:{type:Boolean},showOpenMap:{type:Boolean},isDisabledBehaviors:{type:Boolean},disabledBehaviorsList:{default:()=>[]},mapSettings:{default:()=>({})}},emits:["click-marker","map-updated","inited"],setup(e,{emit:a}){const n=Be(),t=S.settings.value;(!t.apikey||t.apikey==="api-key")&&n.public.yandexMapsApiKey&&(t.apikey=n.public.yandexMapsApiKey);const s=a,l=z(null),r=z(null),x=[37.588144,55.733842],g=$(10),c=$({center:x,zoom:g.value}),m=Y(()=>e.items.reduce((b,d)=>{if(!d.coordinates||!d.coordinates.lat||!d.coordinates.long)return b;const w={type:"Feature",id:String(d.id),geometry:{type:"Point",coordinates:[d.coordinates.long,d.coordinates.lat]},properties:{address:d.address||"",title:d.title||"",count:"count"in d&&d.count?d.count:0}};return[...b,w]},[])),h=async b=>{if(b.length!==0)if(b.length===1){const d=b[0];c.value={center:[d.geometry.coordinates[0],d.geometry.coordinates[1]],zoom:16}}else{const d=xe(b.map(w=>[w.geometry.coordinates[0],w.geometry.coordinates[1]]));if(l.value){const{center:w,zoom:R}=await he({bounds:d,map:l.value,roundZoom:!0,comfortZoomLevel:!0});l.value?.setLocation({center:w,zoom:R})}else c.value={bounds:d,easing:"ease-in-out",duration:500}}},f=$(!1),{lock:i,unlock:v}=Se();function y(){f.value=!f.value,f.value?i():(v(),e.isDisabledBehaviors&&h(m.value))}function k(b){let d=0,w="";return b.forEach(R=>{d+=R.properties.count||0}),d>1&&(w=d<=pe?d.toString():`${pe}+`),w}function o(b,d){return`<svg class="${d?`svg-icon ${d}`:"svg-icon"}">
1<use xlink:href="/_nuxt/spritemap.0858c07a.svg#${b}" /></svg>`}function u(b){const d=m.value.length===1&&!e.showOneAsClickable,w=document.createElement("div");return d?(w.className=e.isDefaultMarker?"yandex-map__marker-container yandex-map__marker-container--default":"yandex-map__marker-container",e.isDefaultMarker?w.innerHTML=`<span class="yandex-map__marker-default">${o("ymap_default","yandex-map__marker-default-icon")}${o("ymap_building","yandex-map__marker-building-icon")}</span>`:w.innerHTML=o("ic_map-pin","yandex-map__marker-icon")):(w.className="yandex-map__marker-container",w.innerHTML=`<span class="yandex-map__marker-circle">${k([b])}</span>`),new ymaps3.YMapMarker({id:b.id,coordinates:b.geometry.coordinates,onClick(){s("click-marker",b)}},w)}const p=Y(()=>{let b=["drag","scrollZoom","pinchZoom","dblClick"];return f.value||(b=e.isDisabledBehaviors?[]:b.filter(d=>!e.disabledBehaviorsList.includes(d))),b}),C=$(!1);let L=null;function _(){L&&clearTimeout(L),j.value&&(L=window.setTimeout(()=>{s("map-updated",l.value)},2e3))}const j=Y(()=>S.isLoaded.value);return Le(j,()=>{C.value||setTimeout(()=>{C.value=!0,s("inited",l.value)},500)}),T(()=>{h(m.value)}),(b,d)=>{const w=Pe,R=Ye,Me=ze;return E(),J("div",{class:le(["yandex-map",{"yandex-map--fullscreen":M(f),"yandex-map--loaded":M(j)}])},[e.isDisabledBehaviors&&!M(f)?(E(),J("div",rt,[V(R,{class:"yandex-map__overlay-fullscreen-button",onClick:y},{icon:F(()=>[V(w,{id:"ic_map-pin",class:"svg-icon--20"})]),default:F(()=>[d[2]||(d[2]=Ve(" На карте ",-1))]),_:1})])):D("",!0),Q("div",lt,[V(Me,null,{default:F(()=>[V(M(Ke),{modelValue:l.value,"onUpdate:modelValue":d[1]||(d[1]=U=>l.value=U),"real-settings-location":"",settings:{location:M(c),copyrightsPosition:"bottom left",behaviors:M(p),...e.mapSettings}},{default:F(()=>[V(M(Qe)),V(M(Je)),M(m).length?(E(),H(M(it),{key:0,modelValue:r.value,"onUpdate:modelValue":d[0]||(d[0]=U=>r.value=U),"zoom-on-cluster-click":"",settings:{features:M(m),marker:u}},{cluster:F(({clusterer:U})=>[Q("div",ut,[Q("div",ct,Ie(k(U.features)),1)])]),_:1},8,["modelValue","settings"])):D("",!0),!e.isDisabledBehaviors||M(f)?(E(),J(Fe,{key:1},[e.showFullscreen?(E(),H(M(K),{key:0,settings:{position:"top right"}},{default:F(()=>[V(M(nt),{settings:{transparent:!0}},{default:F(()=>[V(R,{class:le(["yandex-map__fullscreen-button",{"yandex-map__fullscreen-button--active":M(f)}]),color:"white",onClick:y},{default:F(()=>[V(w,{id:M(f)?"ic_minimize-2":"ic_maximize-2",class:"svg-icon--24"},null,8,["id"])]),_:1},8,["class"])]),_:1})]),_:1})):D("",!0),e.showZoomControl||M(f)?(E(),H(M(K),{key:1,settings:{position:"right"}},{default:F(()=>[V(M(st))]),_:1})):D("",!0),e.showGeolocation?(E(),H(M(K),{key:2,settings:{position:"bottom right"}},{default:F(()=>[V(M(at))]),_:1})):D("",!0),e.showOpenMap?(E(),H(M(K),{key:3,settings:{position:"top left"}},{default:F(()=>[V(M(ot))]),_:1})):D("",!0)],64)):D("",!0),V(M(Xe),{settings:{onUpdate:_}},null,8,["settings"])]),_:1},8,["modelValue","settings"])]),_:1})])],2)}}});export{ft as _};

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.