PageSourceSearch

https://www.lacartedescolocs.com/packs/5561-edac7d8c8df10f2af2da.js

js lacartedescolocs.com collected 2026-10-06 16:22:09 UTC 21,395 bytes, 1 lines download raw bytes

1(globalThis.webpackChunklacartedescolocs||=[]).push([[5561],{67013(e,t,s){"use strict";s.d(t,{o:()=>n});class r{constructor(){this._worker=new Worker(new URL(s.p+s.u(1781),s.b)),this._seq=0,this._latestSeq=0,this._pending=new Map,this._knownIds=new Set,this._worker.addEventListener("message",this._onMessage.bind(this)),this._worker.addEventListener("error",this._onWorkerError.bind(this))}setFeatures(e,t="high"){const s=++this._seq;this._latestSeq=s;const r=[],o=new Array(e.length);for(let n=0;n<e.length;n++){const s=e[n];o[n]=s.id;const i=`${s.id}|${t}`;this._knownIds.has(i)||(r.push(s),this._knownIds.add(i))}return new Promise((e,n)=>{this._pending.set(s,{resolve:e,reject:n}),this._worker.postMessage({type:"setFeatures",seq:s,lod:t,newFeatures:r,ids:o})})}parseFeatures(e,t="high"){const s=++this._seq;return this._latestSeq=s,new Promise((r,o)=>{this._pending.set(s,{resolve:e=>{const s=e&&Array.isArray(e.v)?e.v:[];for(let r=0;r<s.length;r++){const e=s[r];e&&null!=e.id&&e.g&&this._knownIds.add(`${e.id}|${t}`)}r(e)},reject:o}),this._worker.postMessage({type:"parseFeatures",seq:s,lod:t,arrayBuffer:e},[e])})}clearCache(){this._knownIds.clear();const e=++this._seq;this._worker.postMessage({type:"clearCache",seq:e})}destroy(){for(const{reject:e}of this._pending.values())e(new Error("worker destroyed"));this._pending.clear(),this._knownIds.clear(),this._worker.terminate(),this._worker=null}_onMessage(e){const t=e.data;if(!t||null==t.seq)return;const s=this._pending.get(t.seq);s&&(this._pending.delete(t.seq),"error"!==t.type?"parsed"!==t.type?"features"===t.type&&(t.seq<this._latestSeq?s.resolve({stale:!0}):s.resolve({stale:!1,positions:t.positions,fillIndices:t.fillIndices,lineIndices:t.lineIndices,bboxes:t.bboxes,featureMap:t.featureMap,ids:t.ids})):s.resolve(t.payload):s.reject(new Error(t.message||"worker error")))}_onWorkerError(e){const t=new Error(e.message||"worker fatal error");for(const{reject:s}of this._pending.values())s(t);this._pending.clear()}}let o=null;function n(){return o||(o=new r),o}},26167(e,t,s){"use strict";s.d(t,{J4:()=>i,gt:()=>o,uU:()=>a});const r="high";function o(e){return e<=7?"low":e<=10?"mid":r}const n=new Set(["city","district"]);function i(e,t){return n.has(e)?t:r}function a(e,t){return n.has(e)?i(e,o(t)):`z${Math.round(t)}`}},65265(e,t,s){"use strict";s.d(t,{w:()=>_});s(16632),s(34226),s(9486),s(20456);var r=s(62008),o=s(76400),n=s(35192),i=s(66389),a=s(19498),l=s(42375),h=s(67013);let c=null;function u(){return c||(c=o.Mt.from("\nattribute vec2 aPosition;\nattribute vec4 aColor;\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nvarying vec4 vColor;\nvoid main() {\n  vec3 pos = projectionMatrix * translationMatrix * vec3(aPosition, 1.0
1);\n  gl_Position = vec4(pos.xy, 0.0, 1.0);\n  vColor = aColor;\n}\n","\nprecision mediump float;\nvarying vec4 vColor;\nvoid main() {\n  gl_FragColor = vColor;\n}\n")),c}class _ extends r.Layer{constructor(e={}){if(super(),this._colorFn=e.colorFn||(()=>({fill:3377407,stroke:16777215,alpha:.5,strokeAlpha:.35})),this._onHover=e.onHover||(()=>{}),this._onLeave=e.onLeave||(()=>{}),this._onClick=e.onClick||(()=>{}),!1===e.hoverOutline)this._hoverOutline=null;else{const t=e.hoverOutline||{};this._hoverOutline={color:t.color??16777215,alpha:t.alpha??.95,width:t.width??2.5,fillColor:t.fillColor??16777215,fillAlpha:t.fillAlpha??.1}}this._features=[],this._featureById=new Map,this._visibleIds=null,this._hoveredId=null,this._sharedPositionBuffer=null,this._fillColorBuffer=null,this._strokeColorBuffer=null,this._fillColorArray=null,this._strokeColorArray=null,this._featureMap=null,this._fillMesh=null,this._strokeMesh=null,this._rbush=null,this._workerSeq=0,this._zoomAnimated=!0,this._anchorLatLng=null,this._anchorZoom=null,this._strokesVisible=!0}onAdd(e){this._map=e;const t=e.getSize(),s=r.DomUtil.create("canvas","panoptes-pixi-canvas leaflet-layer leaflet-zoom-animated");return s.width=t.x*(window.devicePixelRatio||1),s.height=t.y*(window.devicePixelRatio||1),s.style.width=t.x+"px",s.style.height=t.y+"px",this._canvas=s,e.getPanes().overlayPane.appendChild(s),this._renderer=new o.A4({view:s,width:t.x,height:t.y,backgroundAlpha:0,antialias:!0,resolution:window.devicePixelRatio||1,autoDensity:!0}),this._stage=new n.mc,this._worldLayer=new n.mc,this._hoverGfx=new i.A1,this._stage.addChild(this._worldLayer,this._hoverGfx),this._worker=(0,h.o)(),this._onMoveEndHandler=this._onMoveOrReset.bind(this),this._onResizeHandler=this._onResize.bind(this),this._onZoomAnimHandler=this._animateZoom.bind(this),e.on("moveend zoomend viewreset",this._onMoveEndHandler),e.on("resize",this._onResizeHandler),e.on("zoomanim",this._onZoomAnimHandler),this._mapMouseMoveHandler=this._handleMapMouseMove.bind(this),this._mapMouseOutHandler=this._handleMapMouseOut.bind(this),this._mapClickHandler=this._handleMapClick.bind(this),e.on("mousemove",this._mapMouseMoveHandler),e.on("mouseout",this._mapMouseOutHandler),e.on("click",this._mapClickHandler),this._syncCanvasPosition(),this._syncWorldTransform(),this._render(),this}onRemove(e){return e.off("moveend zoomend viewreset",this._onMoveEndHandler),e.off("resize",this._onResizeHandler),e.off("zoomanim",this._onZoomAnimHandler),e.off("mousemove",this._mapMouseMoveHandler),e.off("mouseout",this._mapMouseOutHandler),e.off("click",this._mapClickHandler),e.getPanes().overlayPane.removeChild(this._canvas),this._worker=null,this._renderer.destroy(!0),this._canvas=null,this._renderer=null,this._stage=null,this._worldLayer=null,this._fillMesh=null,this._strokeMesh=null,this._sharedPositionBuffer=null,this._fillColorBuffer=null,this._strokeColorBuffer=null,this._rbush=null,this}setFeatures(e,t="high",s={}){const r=this._featureById||new Map;if(s.preserveOnEmpty&&0===e.length&&r.size>0)return;const o=new Map,n=[],i=[];for(let c=0;c<e.length;c++){const s=e[c],a=r.get(s.id);if(a&&a.lod===t){s.meta&&(a.meta=s.meta),o.set(s.id,a);continue}a&&i.push(a);const l=this._geometryToPolygons(s.geometry),h={id:s.id,meta:s.meta||{},polygons:l,bbox:this._bboxOfPolygons(l),lod:t};o.set(s.id,h),n.push(h)}const a=[];for(const[c,u]of r)o.has(c)||a.push(u);for(let c=0;c<i.length;c++)a.push(i[c]);this._features=Array.from(o.values()),this._featureById=o,this._visibleIds=null,this._hoveredId=null;const l=n.length+a.length;if(0===l)return void this._repaint();if(this._rbush&&this._features.length>100&&l<.3*this._features.length?this._rbushDiff(n,a):this._rebuildRBush(),!this._worker)return;const h=++this._workerSeq;this._worker.setFeatures(e,t).then(e=>{e.stale||h!==this._workerSeq||(this._installWorkerBuffers(e),this._repaint())}).catch(e=>{console.error("[panoptes geometry worker]",e)})}setColorFn(e){this._colorFn=e,this._repaint()}repaintColors(){this._repaint()}setVisibleIds(e){this._visibleIds=e,e&&null!=this._hoveredId&&!e.has(this._hoveredId)&&(this._hoveredId=null),this._repaint()}setStrokesVisible(e){this._strokesVisible=!1!==e,this._strokeMesh&&(this._strokeMesh.visible=this._strokesVisible)}clearGeometryCache(){this._worker&&this._worker.clearCache()}_installWorkerBuffers(e){if(!this._worldLayer||!this._renderer)return;this._featureMap=e.featureMap,this._featureIdsFromWorker=e.ids;const t=e.positions.length/2,s=4*t;if(this._tearDownMeshes(),0===t)return;const r=new o.hp(e.positions,!0,!1),n=new o.hp(e.positions,!0,!1);this._fillColorArray=new Uint8Array(s),this._strokeColorArray=new Uint8Array(s),this._fillColorBuffer=new o.hp(this._fillColorArray,!1,!1),this._strokeColorBuffer=new o.hp(this._strokeColorArray,!1,!1);const i=new o.hp(e.fillIndices,!0,!0),l=new o.hp(e.lineIndices,!0,!0),h=(new o.V2).addAttribute("aPosition",r,2,!1,o.QE.FLOAT).addAttribute("aColor",this._fillColorBuffer,4,!0,o.QE.UNSIGNED_BYTE).addIndex(i),c=(new o.V2).addAttribute("aPosition",n,2,!1,o.QE.FLOAT).addAttribute("aColor",this._strokeColorBuffer,4,!0,o.QE.UNSIGNED_BYTE).addIndex(l);this._fillMesh=new a.e(h,u(),o.Uw.for2d(),o._4.TRIANGLES),this._strokeMesh=new a.e(c,u(),o.Uw.for2d(),o._4.LINES),this._strokeMesh.visible=this._strokesVisible,this._worldLayer.addChild(this._fillMesh,this._strokeMesh)}_tearDownMeshes(){this._fillMesh&&(this._worldLayer.removeChild(this._fillMesh),this._fillMesh.geometry.destroy(),this._fillMesh.destroy(),this._fillMesh=null),this._strokeMesh&&(this._worldLayer.removeChild(this._strokeMesh),this._strokeMesh.geometry.destroy(),this._strokeMesh.destroy(),this._strokeMesh=null),this._fillColorBuffer=null,this._strokeColorBuffer=null,this._fillColorArray=null,this._strokeColorArray=null}_repaint(){if(!this._fillMesh||!this._featureMap)return;const e=this._featureMap,t=this._featureIdsFromWorker,s=this._fillColorArray,r=this._strokeColorArray,o=this._visibleIds,n=this._featureById,i=this._colorFn,a=t.length;for(let l=0;l<a;l++){const a=t[l],h=e[2*l],c=e[2*l+1],u=n.get(a);let _=0,d=0,f=0,p=0,m=0,w=0,y=0,v=0;if(!(!u||o&&!o.has(a))){const e=i(u.meta)||{},t=e.fill??3377407,s=e.stroke??16777215;_=t>>16&255,d=t>>8&255,f=255&t,p=Math.max(0,Math.min(255,Math.round(255*(e.alpha??.5)))),m=s>>16&255,w=s>>8&255,y=255&s,v=Math.max(0,Math.min(255,Math.round(255*(e.strokeAlpha??.35))))}const g=4*(h+c);for(let e=4*h;
1e<g;e+=4)s[e]=_,s[e+1]=d,s[e+2]=f,s[e+3]=p,r[e]=m,r[e+1]=w,r[e+2]=y,r[e+3]=v}this._fillColorBuffer.update(),this._strokeColorBuffer.update(),this._render()}_onMoveOrReset(){this._syncCanvasPosition(),this._syncWorldTransform(),this._render()}_onResize(){const e=this._map.getSize();this._canvas.style.width=e.x+"px",this._canvas.style.height=e.y+"px",this._renderer.resize(e.x,e.y),this._syncCanvasPosition(),this._syncWorldTransform(),this._render()}_syncCanvasPosition(){const e=this._map.containerPointToLayerPoint([0,0]);r.DomUtil.setPosition(this._canvas,e)}_syncWorldTransform(){if(!this._worldLayer)return;const e=this._map;this._anchorLatLng=e.containerPointToLatLng([0,0]),this._anchorZoom=e.getZoom();const t=e.project(this._anchorLatLng,this._anchorZoom),s=Math.pow(2,this._anchorZoom-0);this._worldLayer.position.set(-t.x,-t.y),this._worldLayer.scale.set(s)}_animateZoom(e){if(!this._anchorLatLng||null==this._anchorZoom)return;const t=this._map.getZoomScale(e.zoom,this._anchorZoom),s=this._map._latLngToNewLayerPoint(this._anchorLatLng,e.zoom,e.center);r.DomUtil.setTransform(this._canvas,s,t)}_render(){this._renderer&&this._stage&&(this._drawHover(),this._renderer.render(this._stage))}_drawHover(){const e=this._hoverGfx;if(e.clear(),!this._hoveredId)return;const t=this._hoverOutline;if(!t)return;const s=this._featureById.get(this._hoveredId);if(!s)return;const r=t.fillAlpha>0;for(const o of s.polygons){const s=o[0];if(!s||s.length<3)continue;const n=this._projectRingToContainer(s);e.lineStyle({width:t.width,color:t.color,alpha:t.alpha}),r&&e.beginFill(t.fillColor,t.fillAlpha),e.moveTo(n[0].x,n[0].y);for(let t=1;t<n.length;t++)e.lineTo(n[t].x,n[t].y);e.closePath(),r&&e.endFill()}}_projectRingToContainer(e){const t=this._map,s=new Array(e.length);for(let r=0;r<e.length;r++)s[r]=t.latLngToContainerPoint([e[r][1],e[r][0]]);return s}_handleMapMouseMove(e){const t=this._pickAtLatLng(e.latlng),s=e.originalEvent;t?.id!==this._hoveredId?(this._hoveredId=t?t.id:null,this._render(),t?this._onHover(t,s):this._onLeave()):t&&this._onHover(t,s)}_handleMapMouseOut(){this._hoveredId&&(this._hoveredId=null,this._render()),this._onLeave()}_handleMapClick(e){const t=this._pickAtLatLng(e.latlng);t&&this._onClick(t)}_pickAtLatLng(e){if(!this._rbush)return null;const t=e.lng,s=e.lat,r=this._rbush.search({minX:t,minY:s,maxX:t,maxY:s});let o=null,n=1/0;const i=this._visibleIds;for(let a=0;a<r.length;a++){const e=r[a];if(!i||i.has(e.feature.id))for(const r of e.feature.polygons){const i=r[0];if(i&&d(t,s,i)){const t=f(e.feature.bbox);t<n&&(n=t,o=e.feature);break}}}return o}_rebuildRBush(){const e=new Array(this._features.length);for(let t=0;t<this._features.length;t++){const s=this._features[t];e[t]={minX:s.bbox.minLon,minY:s.bbox.minLat,maxX:s.bbox.maxLon,maxY:s.bbox.maxLat,feature:s}}this._rbush=new l.A,this._rbush.load(e)}_rbushDiff(e,t){for(let s=0;s<t.length;s++){const e=t[s];this._rbush.remove({minX:e.bbox.minLon,minY:e.bbox.minLat,maxX:e.bbox.maxLon,maxY:e.bbox.maxLat,feature:e},(e,t)=>e.feature.id===t.feature.id)}for(let s=0;s<e.length;s++){const t=e[s];this._rbush.insert({minX:t.bbox.minLon,minY:t.bbox.minLat,maxX:t.bbox.maxLon,maxY:t.bbox.maxLat,feature:t})}}_geometryToPolygons(e){return e?"Polygon"===e.type?[e.coordinates]:"MultiPolygon"===e.type?e.coordinates:"GeometryCollection"===e.type?(e.geometries||[]).flatMap(e=>this._geometryToPolygons(e)):[]:[]}_bboxOfPolygons(e){let t=1/0,s=1/0,r=-1/0,o=-1/0;for(const n of e)for(const e of n)for(const[n,i]of e)n<t&&(t=n),i<s&&(s=i),n>r&&(r=n),i>o&&(o=i);return{minLon:t,minLat:s,maxLon:r,maxLat:o}}}function d(e,t,s){let r=!1;for(let o=0,n=s.length-1;o<s.length;n=o++){const i=s[o][0],a=s[o][1],l=s[n][0],h=s[n][1];a>t!==h>t&&e<(l-i)*(t-a)/(h-a+1e-12)+i&&(r=!r)}return r}function f(e){return(e.maxLon-e.minLon)*(e.maxLat-e.minLat)}},90218(e,t,s){"use strict";s.d(t,{BP:()=>f,lc:()=>d,z6:()=>_,Sh:()=>w});var r=s(42375);const o="tipis_admin_geom",n="viewport_geometry",i="viewport_envelopes";class a{constructor(){this._db=null,this._openPromise=null,this._envSeq=0}open(){return this._openPromise||(this._openPromise=this._openInternal()),this._openPromise}async _openInternal(){if("undefined"===typeof indexedDB)return console.warn("[viewport-persistence] indexedDB unavailable \u2014 disk cache disabled"),null;try{this._db=await new Promise((e,t)=>
1{const s=indexedDB.open(o,1);s.onupgradeneeded=e=>{const t=e.target.result;if(!t.objectStoreNames.contains(n)){const e=t.createObjectStore(n,{keyPath:["bucketKey","id"]});e.createIndex("by_bucket","bucketKey",{unique:!1}),e.createIndex("by_fetched_at","fetched_at",{unique:!1})}if(!t.objectStoreNames.contains(i)){const e=t.createObjectStore(i,{keyPath:["bucketKey","seq"]});e.createIndex("by_bucket","bucketKey",{unique:!1}),e.createIndex("by_fetched_at","fetched_at",{unique:!1})}},s.onsuccess=()=>e(s.result),s.onerror=()=>t(s.error),s.onblocked=()=>t(new Error("IDB open blocked"))})}catch(e){return console.warn("[viewport-persistence] open failed \u2014 disk cache disabled",e),this._db=null,null}return this._pruneOlderThan(Date.now()-31536e6).catch(e=>{console.warn("[viewport-persistence] prune failed",e)}),this._db}async hydrateAll(){if(await this.open(),!this._db)return new Map;const e=new Map;return await l(this._db,[n],"readonly",t=>{t.objectStore(n).openCursor().onsuccess=t=>{const s=t.target.result;if(!s)return;const r=s.value;let o=e.get(r.bucketKey);o||(o={viewports:new Map,envelopes:[]},e.set(r.bucketKey,o)),o.viewports.set(r.id,r.row),s.continue()}}),await l(this._db,[i],"readonly",t=>{t.objectStore(i).openCursor().onsuccess=t=>{const s=t.target.result;if(!s)return;const r=s.value;let o=e.get(r.bucketKey);o||(o={viewports:new Map,envelopes:[]},e.set(r.bucketKey,o)),o.envelopes.push(r.env),"number"===typeof r.seq&&r.seq>=this._envSeq&&(this._envSeq=r.seq+1),s.continue()}}),e}async saveViewports(e,t){if(await this.open(),!this._db||!t||0===t.length)return;const s=Date.now();try{await l(this._db,[n],"readwrite",r=>{const o=r.objectStore(n);for(let n=0;n<t.length;n++){const r=t[n];r&&null!=r.id&&r.g&&o.put({bucketKey:e,id:r.id,row:r,fetched_at:s})}})}catch(r){console.warn("[viewport-persistence] saveViewports failed",r)}}async saveEnvelope(e,t){if(await this.open(),!this._db||!t)return;const s=this._envSeq++,r=Date.now();try{await l(this._db,[i],"readwrite",o=>{o.objectStore(i).put({bucketKey:e,seq:s,env:t,fetched_at:r})})}catch(o){console.warn("[viewport-persistence] saveEnvelope failed",o)}}async clearBucket(e){if(await this.open(),this._db)try{await Promise.all([this._clearByBucket(n,e),this._clearByBucket(i,e)])}catch(t){console.warn("[viewport-persistence] clearBucket failed",t)}}async clearBucketsByPrefix(e){if(await this.open(),this._db)try{await Promise.all([this._clearByPrefix(n,e),this._clearByPrefix(i,e)])}catch(t){console.warn("[viewport-persistence] clearBucketsByPrefix failed",t)}}async clearBucketEnvelopes(e){if(await this.open(),this._db)try{await this._clearByBucket(i,e)}catch(t){console.warn("[viewport-persistence] clearBucketEnvelopes failed",t)}}async clearAll(){if(await this.open(),this._db)try{await l(this._db,[n,i],"readwrite",e=>{e.objectStore(n).clear(),e.objectStore(i).clear()})}catch(e){console.warn("[viewport-persistence] clearAll failed",e)}}_clearByBucket(e,t){return l(this._db,[e],"readwrite",s=>{const r=s.objectStore(e),o=IDBKeyRange.bound([t],[t,[]]);r.openCursor(o).onsuccess=e=>{const t=e.target.result;t&&(t.delete(),t.continue())}})}_clearByPrefix(e,t){return l(this._db,[e],"readwrite",s=>{s.objectStore(e).index("by_bucket").openCursor().onsuccess=e=>{const s=e.target.result;s&&("string"===typeof s.key&&s.key.startsWith(t)&&s.delete(),s.continue())}})}_pruneOlderThan(e){return l(this._db,[n,i],"readwrite",t=>{for(const s of[n,i]){const r=t.objectStore(s).index("by_fetched_at"),o=IDBKeyRange.upperBound(e,!0);r.openCursor(o).onsuccess=e=>{const t=e.target.result;t&&(t.delete(),t.continue())}}})}}function l(e,t,s,r){return new Promise((o,n)=>{const i=e.transaction(t,s);i.oncomplete=()=>o(),i.onerror=()=>n(i.error),i.onabort=()=>n(i.error||new Error("IDB transaction aborted"));try{r(i)}catch(a){try{i.abort()}catch(l){}n(a)}})}let h=null;function c(){return h||(h=new a),h}var u=s(67013);function _(e,t=.3){const s=(e.maxLon-e.minLon)*t,r=(e.maxLat-e.minLat)*t;return{minLon:e.minLon-s,minLat:e.minLat-r,maxLon:e.maxLon+s,maxLat:e.maxLat+r}}function d(e,t){if(e.maxLat<t.minLat||e.minLat>t.maxLat)return!1;for(const s of[0,-360,360])if(e.maxLon+s>=t.minLon&&e.minLon+s<=t.maxLon)return!0;return!1}const f="tipis-vps:hydrated";class p{constructor(){this._buckets=new Map,this._persistence=function(){try{return"undefined"!==typeof localStorage&&"on"===localStorage.getItem("tipis_admin_geom_idb")}catch(e){return!1}}()?c():null,this._pendingWrites=[],this._persistTimer=null,this._hydratePromise=this._hydrate()}ready(){return this._hydratePromise}async _hydrate(){if(!this._persistence)return void this._emitHydrated(0);let e;try{e=await this._persistence.hydrateAll()}catch(r){return console.warn("[viewport-store] hydrate failed \u2014 starting cold",r),void this._emitHydrated(0)}if(!e||0===e.size)return void this._emitHydrated(0);let t=0,s=0;for(const[o,n]of e){const e=this.getBucket(o);for(const[t,r]of n.viewports)e.viewports.has(t)||(e.viewports.set(t,r),s++);
1for(const t of n.envelopes)e.envelopes.insert(t),e._envQueue.push(t);for(;e._envQueue.length>30;){const t=e._envQueue.shift();e.envelopes.remove(t,(e,t)=>e===t)}t++}this._emitHydrated(s,t)}_emitHydrated(e,t=0){"undefined"!==typeof document&&document.dispatchEvent&&document.dispatchEvent(new CustomEvent(f,{detail:{rowCount:e,bucketCount:t}}))}getBucket(e){let t=this._buckets.get(e);return t||(t={viewports:new Map,envelopes:new r.A,_envQueue:[]},this._buckets.set(e,t)),t}hasBucket(e){return this._buckets.has(e)}viewCoveredByBucket(e,t){if(!e||0===e._envQueue.length)return!1;const s=e.envelopes.search({minX:t.minLon,minY:t.minLat,maxX:t.maxLon,maxY:t.maxLat});for(let r=0;r<s.length;r++){const e=s[r];if(t.minLon>=e.minX&&t.maxLon<=e.maxX&&t.minLat>=e.minY&&t.maxLat<=e.maxY)return!0}return!1}mergeFetched(e,t,s){const r=this.getBucket(e);for(let o=0;o<t.length;o++){const e=t[o];e&&e.g&&r.viewports.set(e.id,e)}if(s){const e={minX:s.minLon,minY:s.minLat,maxX:s.maxLon,maxY:s.maxLat};for(r.envelopes.insert(e),r._envQueue.push(e);r._envQueue.length>30;){const e=r._envQueue.shift();r.envelopes.remove(e,(e,t)=>e===t)}}return this._persistence&&(this._pendingWrites.push({key:e,rows:t,halo:s}),this._schedulePersistFlush()),r}async ingestArrayBuffer(e,t,s,r="high"){const o=(0,u.o)(),n=await o.parseFeatures(t,r),i=n&&Array.isArray(n.v)?n.v:[];return this.mergeFetched(e,i,s),n}_schedulePersistFlush(){if(null!=this._persistTimer)return;const e="function"===typeof requestAnimationFrame?requestAnimationFrame:e=>setTimeout(e,16);this._persistTimer=e(()=>{this._persistTimer=null;
1const e=this._pendingWrites;this._pendingWrites=[];const t=new Map;for(const s of e){let e=t.get(s.key);e||(e={rows:[],halos:[]},t.set(s.key,e)),s.rows&&s.rows.length&&e.rows.push(...s.rows),s.halo&&e.halos.push(s.halo)}for(const[s,r]of t){r.rows.length&&this._persistence.saveViewports(s,r.rows).catch(()=>{});for(const e of r.halos)this._persistence.saveEnvelope(s,e).catch(()=>{})}})}clearBucketEnvelopes(e){const t=this._buckets.get(e);t&&(t.envelopes.clear(),t._envQueue.length=0,this._persistence&&this._persistence.clearBucketEnvelopes(e).catch(()=>{}))}clearBucket(e){const t=this._buckets.get(e);t&&(t.viewports.clear(),t.envelopes.clear(),t._envQueue.length=0),this._persistence&&this._persistence.clearBucket(e).catch(()=>{})}clearBucketsByPrefix(e){for(const t of Array.from(this._buckets.keys()))if(t.startsWith(e)){const e=this._buckets.get(t);e&&(e.viewports.clear(),e.envelopes.clear(),e._envQueue.length=0)}this._persistence&&this._persistence.clearBucketsByPrefix(e).catch(()=>{})}clearAll(){this._buckets.clear(),this._persistence&&this._persistence.clearAll().catch(()=>{})}}let m=null;function w(){return m||(m=new p),m}"undefined"!==typeof window&&(window.__tipisClearAdminGeomIdb=async()=>{try{const e=c();await e.clearAll(),console.log("[tipis] admin geometry IDB cleared")}catch(e){console.warn("[tipis] clear IDB failed",e)}})},42634(){}}]);

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.