(function() { const apikey = '' const server = { map: 'https://api.longdo.com/map3', vector: 'https://msv.longdo.com', raster: 'https://ms.longdo.com/mmmap/tile.php', tomtom: 'https://mstomtom.longdo.com/mmmap/tile.php', icon: 'https://msv.longdo.com/icons', search: 'https://search.longdo.com/mapsearch/json', address: 'https://api.longdo.com/map/services/address', object: 'https://api.longdo.com/map/services/object', poi: 'https://api.longdo.com/POIService/json', route: 'https://api.longdo.com/RouteService/geojson', transit: 'https://api.longdo.com/RouteServiceTransit/geojson', longdo: 'https://map.longdo.com', camera: 'https://camera.longdo.com', event: 'https://event.longdo.com', usertile: 'https://usertiles.longdo.com', mapg: 'https://maps.googleapis.com/maps/api/js', mapa: 'https://server.arcgisonline.com/ArcGIS/rest/services', maps: 'https://basemap.sphere.gistda.or.th', } const defaultRate = 0 const defaultMap = 'NORMAL' const defaultAttribution = 'Longdo Map - Terms' let defaultHd = undefined window.longdo3 = Object.assign({ objectcount: 0, Server: server, sphereKey: 'test2022' }, window.longdo3) var __webpack_modules__={676:function(t){t.exports=function(){"use strict"; /** * splaytree v3.1.2 * Fast Splay tree for Node and browser * * @author Alexander Milevski * @license MIT * @preserve */ /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */function t(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(t){return function(e){return s([t,e])}}function s(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]e?1:t0))break;if(null===n.right)break;if(r(t,n.right.key)>0&&(s=n.right,n.right=s.left,s.left=n,null===(n=s).right))break;i.right=n,i=n,n=n.right}}return i.right=n.left,a.left=n.right,n.left=o.right,n.right=o.left,n}function o(t,n,o,i){var a=new e(t,n);if(null===o)return a.left=a.right=null,a;var l=i(t,(o=r(t,o,i)).key);return l<0?(a.left=o.left,a.right=o,o.left=null):l>=0&&(a.right=o.right,a.left=o,o.right=null),a}function i(t,e,n){var o=null,i=null;if(e){var a=n((e=r(t,e,n)).key,t);0===a?(o=e.left,i=e.right):a<0?(i=e.right,e.right=null,o=e):(o=e.left,e.left=null,i=e)}return{left:o,right:i}}function a(t,e,n){return null===e?t:(null===t||((e=r(t.key,e,n)).left=t),e)}function l(t,e,n,r,o){if(t){r(e+(n?"└── ":"├── ")+o(t)+"\n");var i=e+(n?" ":"│ ");t.left&&l(t.left,i,!1,r,o),t.right&&l(t.right,i,!0,r,o)}}var s=function(){function s(t){void 0===t&&(t=n),this._root=null,this._size=0,this._comparator=t}return s.prototype.insert=function(t,e){return this._size++,this._root=o(t,e,this._root,this._comparator)},s.prototype.add=function(t,n){var o=new e(t,n);null===this._root&&(o.left=o.right=null,this._size++,this._root=o);var i=this._comparator,a=r(t,this._root,i),l=i(t,a.key);return 0===l?this._root=a:(l<0?(o.left=a.left,o.right=a,a.left=null):l>0&&(o.right=a.right,o.left=a,a.right=null),this._size++,this._root=o),this._root},s.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},s.prototype._remove=function(t,e,n){var o;return null===e?null:0===n(t,(e=r(t,e,n)).key)?(null===e.left?o=e.right:(o=r(t,e.left,n)).right=e.right,this._size--,o):e},s.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=r(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},s.prototype.findStatic=function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(0===r)return e;e=r<0?e.left:e.right}return null},s.prototype.find=function(t){return this._root&&(this._root=r(t,this._root,this._comparator),0!==this._comparator(t,this._root.key))?null:this._root},s.prototype.contains=function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(0===r)return!0;e=r<0?e.left:e.right}return!1},s.prototype.forEach=function(t,e){for(var n=this._root,r=[],o=!1;!o;)null!==n?(r.push(n),n=n.left):0!==r.length?(n=r.pop(),t.call(e,n),n=n.right):o=!0;return this},s.prototype.range=function(t,e,n,r){for(var o=[],i=this._comparator,a=this._root;0!==o.length||a;)if(a)o.push(a),a=a.left;else{if(i((a=o.pop()).key,e)>0)break;if(i(a.key,t)>=0&&n.call(r,a))return this;a=a.right}return this},s.prototype.keys=function(){var t=[];return this.forEach((function(e){var n=e.key;return t.push(n)})),t},s.prototype.values=function(){var t=[];return this.forEach((function(e){var n=e.data;return t.push(n)})),t},s.prototype.min=function(){return this._root?this.minNode(this._root).key:null},s.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},s.prototype.minNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.left;)t=t.left;return t},s.prototype.maxNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.right;)t=t.right;return t},s.prototype.at=function(t){for(var e=this._root,n=!1,r=0,o=[];!n;)if(e)o.push(e),e=e.left;else if(o.length>0){if(e=o.pop(),r===t)return e;r++,e=e.right}else n=!0;return null},s.prototype.next=function(t){var e=this._root,n=null;if(t.right){for(n=t.right;n.left;)n=n.left;return n}for(var r=this._comparator;e;){var o=r(t.key,e.key);if(0===o)break;o<0?(n=e,e=e.left):e=e.right}return n},s.prototype.prev=function(t){var e=this._root,n=null;if(null!==t.left){for(n=t.left;n.right;)n=n.right;return n}for(var r=this._comparator;e;){var o=r(t.key,e.key);if(0===o)break;o<0?e=e.left:(n=e,e=e.right)}return n},s.prototype.clear=function(){return this._root=null,this._size=0,this},s.prototype.toList=function(){return h(this._root)},s.prototype.load=function(t,e,n){void 0===e&&(e=[]),void 0===n&&(n=!1);var r=t.length,o=this._comparator;if(n&&p(t,e,0,r-1,o),null===this._root)this._root=c(t,e,0,r),this._size=r;else{var i=d(this.toList(),u(t,e),o);r=this._size+r,this._root=f({head:i},0,r)}return this},s.prototype.isEmpty=function(){return null===this._root},Object.defineProperty(s.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),s.prototype.toString=function(t){void 0===t&&(t=function(t){return String(t.key)});var e=[];return l(this._root,"",!0,(function(t){return e.push(t)}),t),e.join("")},s.prototype.update=function(t,e,n){var r=this._comparator,l=i(t,this._root,r),s=l.left,c=l.right;r(t,e)<0?c=o(e,n,c,r):s=o(e,n,s,r),this._root=a(s,c,r)},s.prototype.split=function(t){return i(t,this._root,this._comparator)},s.prototype[Symbol.iterator]=function(){var e,n,r;return t(this,(function(t){switch(t.label){case 0:e=this._root,n=[],r=!1,t.label=1;case 1:return r?[3,6]:null===e?[3,2]:(n.push(e),e=e.left,[3,5]);case 2:return 0===n.length?[3,4]:[4,e=n.pop()];case 3:return t.sent(),e=e.right,[3,5];case 4:r=!0,t.label=5;case 5:return[3,1];case 6:return[2]}}))},s}();function c(t,n,r,o){var i=o-r;if(i>0){var a=r+Math.floor(i/2),l=t[a],s=n[a],u=new e(l,s);return u.left=c(t,n,r,a),u.right=c(t,n,a+1,o),u}return null}function u(t,n){for(var r=new e(null,null),o=r,i=0;i0?n=(n=a=a.next=r.pop()).right:o=!0;return a.next=null,i.next}function f(t,e,n){var r=n-e;if(r>0){var o=e+Math.floor(r/2),i=f(t,e,o),a=t.head;return a.left=i,t.head=t.head.next,a.right=f(t,o+1,n),a}return null}function d(t,n,r){for(var o=new e(null,null),i=o,a=t,l=n;null!==a&&null!==l;)r(a.key,l.key)<0?(i.next=a,a=a.next):(i.next=l,l=l.next),i=i.next;return null!==a?i.next=a:null!==l&&(i.next=l),o.next}function p(t,e,n,r,o){if(!(n>=r)){for(var i=t[n+r>>1],a=n-1,l=r+1;;){do{a++}while(o(t[a],i)<0);do{l--}while(o(t[l],i)>0);if(a>=l)break;var s=t[a];t[a]=t[l],t[l]=s,s=e[a],e[a]=e[l],e[l]=s}p(t,e,n,l,o),p(t,e,l+1,r,o)}}const v=(t,e)=>t.ll.x<=e.x&&e.x<=t.ur.x&&t.ll.y<=e.y&&e.y<=t.ur.y,y=(t,e)=>{if(e.ur.x{if(-gc==u>-c?(i=c,c=e[++h]):(i=u,u=r[++f]);let d=0;if(hc==u>-c?(a=c+i,l=i-(a-c),c=e[++h]):(a=u+i,l=i-(a-u),u=r[++f]),i=a,0!==l&&(o[d++]=l);hc==u>-c?(a=i+c,s=a-i,l=i-(a-s)+(c-s),c=e[++h]):(a=i+u,s=a-i,l=i-(a-s)+(u-s),u=r[++f]),i=a,0!==l&&(o[d++]=l);for(;h=G||-B>=G)return B;if(h=t-M,l=t-(M+h)+(h-o),h=n-N,c=n-(N+h)+(h-o),h=e-D,s=e-(D+h)+(h-i),h=r-W,u=r-(W+h)+(h-i),0===l&&0===s&&0===c&&0===u)return B;if(G=j*a+S*Math.abs(B),B+=M*u+W*l-(D*c+N*s),B>=G||-B>=G)return B;w=l*W,f=_*l,d=f-(f-l),p=l-d,f=_*W,v=f-(f-W),y=W-v,x=p*y-(w-d*v-p*v-d*y),k=s*N,f=_*s,d=f-(f-s),p=s-d,f=_*N,v=f-(f-N),y=N-v,L=p*y-(k-d*v-p*v-d*y),g=x-L,h=x-g,F[0]=x-(g+h)+(h-L),m=w+g,h=m-w,b=w-(m-h)+(g-h),g=b-k,h=b-g,F[1]=b-(g+h)+(h-k),O=m+g,h=O-m,F[2]=m-(O-h)+(g-h),F[3]=O;const Z=E(4,R,4,F,C);w=M*u,f=_*M,d=f-(f-M),p=M-d,f=_*u,v=f-(f-u),y=u-v,x=p*y-(w-d*v-p*v-d*y),k=D*c,f=_*D,d=f-(f-D),p=D-d,f=_*c,v=f-(f-c),y=c-v,L=p*y-(k-d*v-p*v-d*y),g=x-L,h=x-g,F[0]=x-(g+h)+(h-L),m=w+g,h=m-w,b=w-(m-h)+(g-h),g=b-k,h=b-g,F[1]=b-(g+h)+(h-k),O=m+g,h=O-m,F[2]=m-(O-h)+(g-h),F[3]=O;const z=E(Z,C,4,F,A);w=l*u,f=_*l,d=f-(f-l),p=l-d,f=_*u,v=f-(f-u),y=u-v,x=p*y-(w-d*v-p*v-d*y),k=s*c,f=_*s,d=f-(f-s),p=s-d,f=_*c,v=f-(f-c),y=c-v,L=p*y-(k-d*v-p*v-d*y),g=x-L,h=x-g,F[0]=x-(g+h)+(h-L),m=w+g,h=m-w,b=w-(m-h)+(g-h),g=b-k,h=b-g,F[1]=b-(g+h)+(h-k),O=m+g,h=O-m,F[2]=m-(O-h)+(g-h),F[3]=O;const H=E(z,A,4,F,I);return I[H-1]}function D(t,e,n,r,o,i){const a=(e-i)*(n-o),l=(t-o)*(r-i),s=a-l,c=Math.abs(a+l);return Math.abs(s)>=M*c?s:-N(t,e,n,r,o,i,c)}const W=(t,e)=>t.x*e.y-t.y*e.x,B=(t,e)=>t.x*e.x+t.y*e.y,G=(t,e,n)=>{const r=D(t.x,t.y,e.x,e.y,n.x,n.y);return r>0?-1:r<0?1:0},Z=t=>Math.sqrt(B(t,t)),z=(t,e,n)=>{const r={x:e.x-t.x,y:e.y-t.y},o={x:n.x-t.x,y:n.y-t.y};return W(o,r)/Z(o)/Z(r)},H=(t,e,n)=>{const r={x:e.x-t.x,y:e.y-t.y},o={x:n.x-t.x,y:n.y-t.y};return B(o,r)/Z(o)/Z(r)},U=(t,e,n)=>0===e.y?null:{x:t.x+e.x/e.y*(n-t.y),y:n},V=(t,e,n)=>0===e.x?null:{x:n,y:t.y+e.y/e.x*(n-t.x)},q=(t,e,n,r)=>{if(0===e.x)return V(n,r,t.x);if(0===r.x)return V(t,e,n.x);if(0===e.y)return U(n,r,t.y);if(0===r.y)return U(t,e,n.y);const o=W(e,r);if(0==o)return null;const i={x:n.x-t.x,y:n.y-t.y},a=W(i,e)/o,l=W(i,r)/o;return{x:(t.x+l*e.x+(n.x+a*r.x))/2,y:(t.y+l*e.y+(n.y+a*r.y))/2}};class ${static compare(t,e){const n=$.comparePoints(t.point,e.point);return 0!==n?n:(t.point!==e.point&&t.link(e),t.isLeft!==e.isLeft?t.isLeft?1:-1:J.compare(t.segment,e.segment))}static comparePoints(t,e){return t.xe.x?1:t.ye.y?1:0}constructor(t,e){void 0===t.events?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}link(t){if(t.point===this.point)throw new Error("Tried to link already linked events");const e=t.point.events;for(let t=0,n=e.length;t{const r=n.otherSE;e.set(n,{sine:z(this.point,t.point,r.point),cosine:H(this.point,t.point,r.point)})};return(t,r)=>{e.has(t)||n(t),e.has(r)||n(r);const{sine:o,cosine:i}=e.get(t),{sine:a,cosine:l}=e.get(r);return o>=0&&a>=0?il?-1:0:o<0&&a<0?il?1:0:ao?1:0}}}let Y=0;class J{static compare(t,e){const n=t.leftSE.point.x,r=e.leftSE.point.x,o=t.rightSE.point.x,i=e.rightSE.point.x;if(ia&&l>s)return-1;const n=t.comparePoint(e.leftSE.point);if(n<0)return 1;if(n>0)return-1;const r=e.comparePoint(t.rightSE.point);return 0!==r?r:-1}if(n>r){if(al&&a>c)return 1;const n=e.comparePoint(t.leftSE.point);if(0!==n)return n;const r=t.comparePoint(e.rightSE.point);return r<0?1:r>0?-1:1}if(al)return 1;if(oi){const n=t.comparePoint(e.rightSE.point);if(n<0)return 1;if(n>0)return-1}if(o!==i){const t=s-a,e=o-n,u=c-l,h=i-r;if(t>e&&uh)return-1}return o>i?1:oc?1:t.ide.id?1:0}constructor(t,e,n,r){this.id=++Y,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=n,this.windings=r}static fromRing(t,e,n){let r,o,i;const a=$.comparePoints(t,e);if(a<0)r=t,o=e,i=1;else{if(!(a>0))throw new Error(`Tried to create degenerate segment at [${t.x}, ${t.y}]`);r=e,o=t,i=-1}const l=new $(r,!0),s=new $(o,!1);return new J(l,s,[n],[i])}replaceRightSE(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:te?t:e}}}vector(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}isAnEndpoint(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}comparePoint(t){if(this.isAnEndpoint(t))return 0;const e=this.leftSE.point,n=this.rightSE.point,r=this.vector();if(e.x===n.x)return t.x===e.x?0:t.x0&&a.swapEvents(),$.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(r.checkForConsuming(),o.checkForConsuming()),e}swapEvents(){const t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let t=0,e=this.windings.length;t0){const t=e;e=n,n=t}if(e.prev===n){const t=e;e=n,n=t}for(let t=0,r=n.rings.length;t1===t.length&&t[0].isSubject;this._isInResult=n(t)!==n(e);break}default:throw new Error(`Unrecognized operation type found ${lt.type}`)}return this._isInResult}}class K{constructor(t,e,n){if(!Array.isArray(t)||0===t.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=n,this.segments=[],"number"!=typeof t[0][0]||"number"!=typeof t[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const r=k.round(t[0][0],t[0][1]);this.bbox={ll:{x:r.x,y:r.y},ur:{x:r.x,y:r.y}};let o=r;for(let e=1,n=t.length;ethis.bbox.ur.x&&(this.bbox.ur.x=n.x),n.y>this.bbox.ur.y&&(this.bbox.ur.y=n.y),o=n)}r.x===o.x&&r.y===o.y||this.segments.push(J.fromRing(o,r,this))}getSweepEvents(){const t=[];for(let e=0,n=this.segments.length;ethis.bbox.ur.x&&(this.bbox.ur.x=n.bbox.ur.x),n.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=n.bbox.ur.y),this.interiorRings.push(n)}this.multiPoly=e}getSweepEvents(){const t=this.exteriorRing.getSweepEvents();for(let e=0,n=this.interiorRings.length;ethis.bbox.ur.x&&(this.bbox.ur.x=n.bbox.ur.x),n.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=n.bbox.ur.y),this.polys.push(n)}this.isSubject=e}getSweepEvents(){const t=[];for(let e=0,n=this.polys.length;e0&&(t=n)}let e=t.segment.prevInResult(),n=e?e.prevInResult():null;for(;;){if(!e)return null;if(!n)return e.ringOut;if(n.ringOut!==e.ringOut)return n.ringOut.enclosingRing()!==e.ringOut?e.ringOut:e.ringOut.enclosingRing();e=n.prevInResult(),n=e?e.prevInResult():null}}}class et{constructor(t){this.exteriorRing=t,t.poly=this,this.interiorRings=[]}addInterior(t){this.interiorRings.push(t),t.poly=this}getGeom(){const t=[this.exteriorRing.getGeom()];if(null===t[0])return null;for(let e=0,n=this.interiorRings.length;e1&&void 0!==arguments[1]?arguments[1]:J.compare;this.queue=t,this.tree=new s(e),this.segments=[]}process(t){const e=t.segment,n=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(e),n;const r=t.isLeft?this.tree.add(e):this.tree.find(e);if(!r)throw new Error(`Unable to find segment #${e.id} [${e.leftSE.point.x}, ${e.leftSE.point.y}] -> [${e.rightSE.point.x}, ${e.rightSE.point.y}] in SweepLine tree.`);let o,i,a=r,l=r;for(;void 0===o;)a=this.tree.prev(a),null===a?o=null:void 0===a.key.consumedBy&&(o=a.key);for(;void 0===i;)l=this.tree.next(l),null===l?i=null:void 0===l.key.consumedBy&&(i=l.key);if(t.isLeft){let r=null;if(o){const t=o.getIntersection(e);if(null!==t&&(e.isAnEndpoint(t)||(r=t),!o.isAnEndpoint(t))){const e=this._splitSafely(o,t);for(let t=0,r=e.length;t0?(this.tree.remove(e),n.push(t)):(this.segments.push(e),e.prev=o)}else{if(o&&i){const t=o.getIntersection(i);if(null!==t){if(!o.isAnEndpoint(t)){const e=this._splitSafely(o,t);for(let t=0,r=e.length;tot)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}const i=new rt(o);let a=o.size,l=o.pop();for(;l;){const t=l.key;if(o.size===a){const e=t.segment;throw new Error(`Unable to pop() ${t.isLeft?"left":"right"} SweepEvent [${t.point.x}, ${t.point.y}] from segment #${e.id} [${e.leftSE.point.x}, ${e.leftSE.point.y}] -> [${e.rightSE.point.x}, ${e.rightSE.point.y}] from queue.`)}if(o.size>ot)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(i.segments.length>it)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");const e=i.process(t);for(let t=0,n=e.length;t1?e-1:0),r=1;r1?e-1:0),r=1;r1?e-1:0),r=1;r1?e-1:0),r=1;r{var e=t&&t.__esModule?()=>t.default:()=>t;return __webpack_require__.d(e,{a:e}),e},__webpack_require__.d=(t,e)=>{for(var n in e)__webpack_require__.o(e,n)&&!__webpack_require__.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var __webpack_exports__={};(()=>{"use strict";function t(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){c=!0,o=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||n(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=n(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var o=0,i=function(){};return{s:i,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,l=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return l=t.done,t},e:function(t){s=!0,a=t},f:function(){try{l||null==r.return||r.return()}finally{if(s)throw a}}}}function n(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=n&&t<=o&&e>=r&&e<=i},isPointCrossLine:function(t,e,n,r,o,i){return r>e!=i>e&&t<(n-o)/(r-i)*(e-i)+o},closestPointOnLine:function(t,e,n,r,o,i){var a=o-n,l=i-r;if(!a&&!l)return{x:n,y:r};var s=((t-n)*a+(e-r)*l)/(a*a+l*l);return s<0?{x:n,y:r}:s>1?{x:o,y:i}:{x:n+s*a,y:r+s*l}},lineIntersectPoint:function(t,e,n,r,o,i,a,l,s){var c=o-t,u=i-e,h=n-t,f=r-e,d=a-o,p=l-i,v=h*p-f*d,y=h*h+f*f;if(v*v>1e-12*y*(d*d+p*p)){var g=(p*c-d*u)/v;if(g<-1e-6||g>1.000001)return null;var m=(f*c-h*u)/v;return m<-1e-6||m>1.000001?null:{x:t+g*h,y:e+g*f,a:g,b:m}}if(s)return null;if((v=c*f-u*h)*v>1e-12*y*(c*c+u*u))return null;var b,w,x,k=(h*c+f*u)/y,L=k+(h*d+f*p)/y;return k1e-6?[b,w]:null:{x:t,y:e,a:0,b:x?0:1}},rotateVector:function(t,e){if(!e)return t;var n=e*o,r=Math.cos(n),i=Math.sin(n);return{x:t.x*r+t.y*i,y:t.y*r-t.x*i}},polylinePivot:function(t){var e="MultiLineString"==t.type?t.coordinates[0]:t.coordinates,n=e.length>>1;if(!n)return e[0];var r=e[n],o=e[n-1];return{lon:(3*r[0]+o[0])/4,lat:(3*r[1]+o[1])/4}},polygonPivot:function(t){for(var e,n=("MultiPolygon"==t.type?t.coordinates[0]:t.coordinates)[0],r=n[0][1],o=r,a=1;e=n[a];++a)e[1]o&&(o=e[1]);for(var l,s=(r+o)/2,c=181,u=null,h=1,f=n[0];l=f,f=n[h];++h){var d=i.lineIntersectPoint(-181,s,181,s,l[0],l[1],f[0],f[1],!0);d&&(d.xr.maxLon&&(r.maxLon=a.maxLon),a.maxLat>r.maxLat&&(r.maxLat=a.maxLat)}return r}for(var l,s=e[0][0],c=e[0][1],u=s,h=c,f=1;l=e[f];++f)l[0]u&&(u=l[0]),l[1]h&&(h=l[1]);return{minLon:s,minLat:c,maxLon:u,maxLat:h}},length:function(t){for(var e,n=t.coordinates,r=0,i=1,a=n[0];e=a,a=n[i];++i){var l=a[1]*o,s=e[1]*o,c=l-s,u=(a[0]-e[0])*o,h=Math.pow(Math.sin(c/2),2)+Math.cos(l)*Math.cos(s)*Math.pow(Math.sin(u/2),2);r+=12742018*Math.atan2(Math.sqrt(h),Math.sqrt(1-h))}return r},area:function(t,n){var r,o=0,i=t.coordinates[0][0][1],a=i,l=e(t.coordinates);try{for(l.s();!(r=l.n()).done;)for(var s,c=r.value,u=1,h=c[0];s=h,h=c[u];++u)o+=s[0]*h[1]-h[0]*s[1],h[1]a&&(a=h[1])}catch(t){l.e(t)}finally{l.f()}if(n)return o/2;var f=(i+a)/2;return o=Math.abs(o)/2*L.longitudeLength(f)*L.latitudeLength(f),o},containsPoint:function(t,n,r){var o,a=!1,l=e(t.coordinates);try{for(l.s();!(o=l.n()).done;)for(var s,c=o.value,u=1,h=c[0];s=h,h=c[u];++u){var f=i.closestPointOnLine(n[0],n[1],s[0],s[1],h[0],h[1]);if(f.x==n[0]&&f.y==n[1])return r;i.isPointCrossLine(n[0],n[1],s[0],s[1],h[0],h[1])&&(a=!a)}}catch(t){l.e(t)}finally{l.f()}return a},minimumDistance:function(n,r,o,a,l,s){if(i.intersects(n,r,o,a))return 0;if("Point"==n.type){if("Point"==r.type)return i.length({coordinates:[n.coordinates,r.coordinates]})-(l||0)-(s||0);var c,u,h=t(n.coordinates,2),f=h[0],d=h[1],p=1<<30,v=e("Polygon"==r.type?r.coordinates:[r.coordinates]);try{for(v.s();!(u=v.n()).done;)for(var y,g=u.value,m=1,b=g[0];y=b,b=g[m];++m){var w=i.closestPointOnLine(f,d,b[0],b[1],y[0],y[1]),x=i.distance(w.x-f,w.y-d);xo)return!1}}catch(t){p.e(t)}finally{p.f()}}}catch(t){f.e(t)}finally{f.f()}return!0}return!1}if("LineString"==n.type){var y=t(n.coordinates,1)[0];if("Point"==r.type){if(a)return!1;var g=n.coordinates.at(-1),m=t(r.coordinates,2),b=m[0],w=m[1];return!(y[0]==b&&y[1]==w||g[0]==b&&g[1]==w)&&i.intersects(r,n)}if("LineString"==r.type){for(var x,k=1,_=r.coordinates[0];x=_,_=r.coordinates[k];++k){for(var S,E=!0,T=1,O=y;S=O,O=n.coordinates[T];++T){var M=i.lineIntersectPoint(O[0],O[1],S[0],S[1],_[0],_[1],x[0],x[1]);if((null==M?void 0:M[0])>=0&&(null==M?void 0:M[1])<=1){E=!1;break}}if(E)return!1}return!0}return!1}if("Point"==r.type){if(a){var P,j=t(r.coordinates,2),R=j[0],C=j[1],A=e(n.coordinates);try{for(A.s();!(P=A.n()).done;)for(var I,F=P.value,N=1,D=F[0];I=D,D=F[N];++N){var W=i.closestPointOnLine(R,C,D[0],D[1],I[0],I[1]);if(i.distance(W.x-R,W.y-C)',cameraMotion:'data:image/svg+xml,',cameraStill:'data:image/svg+xml,',aqi:'data:image/svg+xml,{v}',dpad:'data:image/svg+xml,',searchZoom:'data:image/svg+xml,',routeFirst:'data:image/svg+xml,',route:'data:image/svg+xml,{i}',routeLast:'data:image/svg+xml,',poiAddress:'',poiTel:'',poiOpen:'',poiUrl:'',poiLine:'',poiTag:'',searchG:'',searchK:'',searchL:'',searchT:'',searchW:'',searchY:'',searchZ:''};a.searchX=a.searchW;function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function s(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=u(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){c=!0,o=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||u(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){if(t){if("string"==typeof t)return h(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,e):void 0}}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),j(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:C(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function d(t,e,n,r,o,i,a){try{var l=t[i](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,o)}var p=2147483648/360,v='
',y=[[255,0,255],[0,255,255],[255,0,0],[0,255,0],[0,0,255],[255,102,187],[136,0,255],[68,255,187],[0,136,255],[255,136,0],[136,68,17],[119,136,153]],g=0,m={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255],orange:[255,165,0],transparent:[0,0,0,0]},b={th:[null,"ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],en:[null,"jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"]},w={th:{km:" กม.",m:" ม.",sqkm:" ตร.กม.",sqm:" ตร.ม.",rai:" ไร่",ngan:" งาน",sqwa:" ตร.ว.",min:" นาที",hr:" ชม."},en:{km:" km",m:" m",sqkm:" sq.km",sqm:" sq.m",rai:" rai",ngan:" ngan",sqwa:" sq.wa",min:" min",hr:" hr"}},x={th:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส.","อา."],en:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"]},k={tagCount:0,poiLabel:{th:{obsoleted:"สถานที่นี้ไม่มีแล้ว",unverified:"! ข้อมูลนี้ยังไม่ได้รับการตรวจสอบ",open:"เปิดให้บริการวันนี้",close:"ปิดบริการ",after:"นอกเวลาทำการ",detail:"รายละเอียด",edit:"แก้ไข"},en:{obsoleted:"This place no longer exists",unverified:"! This is unverified data",open:"Open today",close:"Closed",after:"Open at",detail:"detail",edit:"edit"}}};longdo3.MapTheme={poi:k},longdo3.Util={append:function(t,e,n){var r=document.createElement(e);for(var o in n)r[o]=n[o];return t.appendChild(r),r},prepend:function(t,e,n,r){var o=document.createElement(e);for(var i in n)o[i]=n[i];return t.insertBefore(o,r||t.firstChild),o},empty:function(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t},loadStyle:function(t,e){L.append(document.head,"link",{rel:"stylesheet",type:"text/css",media:e||"all",href:t})},loadScript:function(t,e){var n={src:t};if(e){var r=setTimeout(e,1e4,!1);n.onload=function(){clearTimeout(r),e(!0)},n.onerror=function(){clearTimeout(r),e(!1)}}L.append(document.head,"script",n)},getJson:function(t,e){return new Promise((function(n){var r=new XMLHttpRequest;r.onload=r.ontimeout=r.onerror=function(t){n("load"==t.type&&200==t.target.status?t.target.response:null)},r.responseType=e||"json",r.timeout=1e4,r.open("GET",t),r.send()}))},isHD:function(){return null==defaultHd&&(defaultHd=devicePixelRatio>1.2?1:0),defaultHd},normToLat:function(t){return 360*(Math.atan(Math.exp(t*o))-Math.PI/4)/Math.PI},latToNorm:function(t){return Math.log(Math.tan(Math.PI*(.25+t/360)))/o},pointToLocation:function(t){return{lon:t.x/p-180,lat:L.normToLat(180-t.y/p)}},locationToPoint:function(t){return{x:Math.round((t.lon+180)*p),y:Math.round((180-L.latToNorm(t.lat))*p)}},poiPopupOptions:function(t,e,n,r){return{title:n,detail:v,loadDetail:function(n){return(o=f().mark((function o(){var i;return f().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,L.getJson("".concat(t,"/get?id=").concat(e,"&locale=").concat(r,"&key=").concat(apikey));case 2:i=o.sent,L.empty(n),i.data.length&&n.appendChild(L.formatPoi(i.data[0],r));case 5:case"end":return o.stop()}}),o)})),function(){var t=this,e=arguments;return new Promise((function(n,r){var i=o.apply(t,e);function a(t){d(i,n,r,a,l,"next",t)}function l(t){d(i,n,r,a,l,"throw",t)}a(void 0)}))})();var o}}},validateLocation:function(t){return isFinite(t.lon)&&isFinite(t.lat)},sameLocation:function(t,e){return L.isAbsInRange(t.lon-e.lon,1e-6)&&L.isAbsInRange(t.lat-e.lat,1e-6)},longitudeLength:function(t){var e=t*o;return 111412.84*Math.cos(e)+-93.5*Math.cos(3*e)},latitudeLength:function(t){var e=t*o;return 111132.92+-559.82*Math.cos(2*e)+1.175*Math.cos(4*e)},length:function(t,e){return L.formatDistance(i.length(t),e)},area:function(t,e){return L.formatAllArea(i.area(t),e)},isInRange:function(t,e){return t>=e.min&&t<=e.max},isAbsInRange:function(t,e){return t>=-e&&t<=e},bound:function(t,e,n){return tn?n:t},svgIcon:function(t){return"".concat(server.icon,"_svg/").concat(t.substring(0,t.length-3),"svg")},pngIcon:function(t){return"".concat(server.icon,"_4x/").concat(t)},unblankIcon:function(t){return"blank.png"==t?"greydot.png":t},labelIcon:function(t){return{html:'
'.concat(t,"
")}},capFirst:function(t){return t.charAt(0).toUpperCase()+t.slice(1)},formatDate:function(t,e){var n=c(t.split("-"),3),r=n[0],o=n[1],i=n[2];return"".concat(+i," ").concat(b[e][+o]," ").concat(r-1957)},formatTime:function(t){var e=c(t.split(":"),2),n=e[0],r=e[1];return"".concat("T"==n[0]?n.substring(1):n,":").concat(r||"00")},formatDateTimeRange:function(t,e,n){var r=c(t.split(" "),2),o=r[0],i=r[1],a=c(e.split(" "),2),l=a[0],s=a[1],u=L.formatDate(o,n);return i&&(u+=" "+L.formatTime(i)),u+=" -",o!=l&&(u+=" "+L.formatDate(l,n)),s&&(u+=" "+L.formatTime(s)),u},formatInterval:function(t,e){var n=w[e];if(!n)return t;var r=t%60;if(r&&(t+=60-r),t<3600)return t/60+n.min;var o=t%3600;return"".concat(t/3600|0).concat(n.hr).concat(0==o?"":" "+L.formatInterval(o,e))},formatDistance:function(t,e){var n=w[e];return n?t>=1e5?(t/1e3|0).toLocaleString()+n.km:t>=1e4?(t/1e3).toFixed(1)+n.km:t>=1e3?(t/1e3).toFixed(2)+n.km:Math.ceil(t)+n.m:t},formatArea:function(t,e){var n=w[e];return n?t>=1e5?(t/1e6).toLocaleString(void 0,{maximumFractionDigits:t<1e10?1:0})+n.sqkm:(0|t).toLocaleString()+n.sqm:t},formatThaiArea:function(t,e){var n=w[e];if(!n)return t;var r="",o=t/1600|0;o&&(r+=o.toLocaleString()+n.rai);var i=t%1600/400|0;i&&(r+=" "+i+n.ngan);var a=t%400/4|0;return a&&(r+=" "+a+n.sqwa),r},formatAllArea:function(t,e){return e?L.formatArea(t,e)+(t<16e8&&t>=4?"
"+L.formatThaiArea(t,e):""):t},formatPoi:function(t,e,n){var r=k.poiLabel[e],o=document.createDocumentFragment();if(t.obsoleted?L.append(o,"div",{className:"ldmap-poi_warning ldmap-poi_obsoleted",innerHTML:r.obsoleted}):t.verified||L.append(o,"div",{className:"ldmap-poi_warning ldmap-poi_unverified",innerHTML:r.unverified}),t.address&&L.append(o,"div",{className:"ldmap-poi_item ldmap-poi_address",innerHTML:"".concat(a.poiAddress,'
').concat(t.address,"
")}),t.tel&&L.append(o,"div",{className:"ldmap-poi_item ldmap-poi_tel",innerHTML:"".concat(a.poiTel,'
').concat(t.tel,"
")}),t.working_hours){for(var i,l,c=new Date,u=c.toTimeString().substring(0,5),h=x.en[c.getDay()],f=x[e],d=t.working_hours.hours,p=r.close,v="",y=1,g=0;i=d[g],l=x.en[y];++y)i&&i.day==l.toLowerCase()?(++g,v+=''.concat(f[y],"").concat(i.start," - ").concat(i.end,"
"),l==h&&(p="".concat(u>=i.start&&u<=i.end?r.open:r.after," ").concat(i.start," - ").concat(i.end))):v+=''.concat(f[y],"").concat(r.close,"
");var m=L.append(o,"div",{className:"ldmap-poi_item ldmap-poi_open",innerHTML:"".concat(a.poiOpen,'
').concat(p,'
').concat(v).concat(t.working_hours.remark,"
")});m.addEventListener("click",(function(){"ldmap-poi_info_hidden"==m.lastChild.className?(m.children[1].className="ldmap-poi_info_hidden",m.lastChild.className="ldmap-poi_info"):(m.children[1].className="ldmap-poi_info",m.lastChild.className="ldmap-poi_info_hidden")}))}if(t.url&&L.append(o,"div",{className:"ldmap-poi_item ldmap-poi_url",innerHTML:"".concat(a.poiUrl,'")}),t.line){var b,w=s(t.line);try{for(w.s();!(b=w.n()).done;){var _=b.value,S=_.line_id,E=_.line_link;L.append(o,"div",{className:"ldmap-poi_item ldmap-poi_line",innerHTML:"".concat(a.poiLine,'")})}}catch(t){w.e(t)}finally{w.f()}}if(k.tagCount&&t.tag){for(var T=t.tag[0],O=Math.min(t.tag.length,k.tagCount),M=1;MO&&(T+=", ..."),L.append(o,"div",{className:"ldmap-poi_item ldmap-poi_tag",innerHTML:"".concat(a.poiTag,'
').concat(T,"
")})}return n||"poi"!=t.type||L.append(o,"div",{className:"ldmap-poi_menu",innerHTML:'').concat(r.detail,' ').concat(r.edit,' snippet')}),o},colorToRGBAArray:function(t,e,n){if(null==t){if(null===t)return m.transparent;var r=y[g].concat(e);return n&&(g=(g+1)%y.length),r}if(Array.isArray(t))return t;if("#"==t[0])return t.length<4?[0,0,0,255]:t.length<6?[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16),t.length>4?parseInt(t[4]+t[4],16):255]:[parseInt(t[1]+t[2],16),parseInt(t[3]+t[4],16),parseInt(t[5]+t[6],16),t.length>7?parseInt(t[7]+t[8],16):255];t=t.toLowerCase();var o=m[t];if(o)return o;if("r"==t[0]){var i=t.match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(\s*,\s*([\d\.]+)\s*)?/);return i?[parseInt(i[1]),parseInt(i[2]),parseInt(i[3]),i[5]?255*parseFloat(i[5]):255]:[0,0,0,255]}if("h"==t[0]){var a=t.match(/^hsla?\(\s*([\d\.]+)\s*,\s*([\d\.]+)%\s*,\s*([\d\.]+)%(\s*,\s*([\d\.]+)\s*)?/);if(!a)return[0,0,0,255];var l=parseFloat(a[1]),s=parseFloat(a[2])/100,c=parseFloat(a[3])/100,u=s*Math.min(c,1-c),h=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(t+l/30)%12;return 255*(c-u*Math.max(Math.min(e-3,9-e,1),-1))};return[h(0),h(8),h(4),a[5]?255*parseFloat(a[5]):255]}return[0,0,0,255]},fromCoordinate:function(t){return{lon:t[0],lat:t[1]}},toCoordinate:function(t){return[t.lon,t.lat]},toGeoPoint:function(t){return{type:"Point",coordinates:L.toCoordinate(t)}},stringToGeoPoint:function(t){return{type:"Point",coordinates:[parseFloat(t.longitude),parseFloat(t.latitude)]}},geoJSONwithZ:function(t,e){var n=t.coordinates||t;if(isFinite(n[0]))n.push(e);else{var r,o=s(n);try{for(o.s();!(r=o.n()).done;){var i=r.value;L.geoJSONwithZ(i,e)}}catch(t){o.e(t)}finally{o.f()}}},fromLngLat:function(t){return{lon:t.lng,lat:t.lat}},fromLngLatBounds:function(t){return{minLon:t.getWest(),minLat:t.getSouth(),maxLon:t.getEast(),maxLat:t.getNorth()}},toLngLatBounds:function(t){return[t.minLon,t.minLat,t.maxLon,t.maxLat]},toPointLike:function(t){return[t.x,t.y]}};var L=longdo3.Util;function _(t){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_(t)}function S(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return E(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return E(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0&&n.splice(r,1),this}},{key:"fire",value:function(t,e){var n,r=!1,o=S(M(this,C)[t]);try{for(o.s();!(n=o.n()).done;){var i=n.value;r=r||!1===i(e)}}catch(t){o.e(t)}finally{o.f()}return!r}},{key:"pause",value:function(t){return null!=t&&this}},{key:"register",value:function(){return this}}])&&T(e.prototype,n),r&&T(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function I(t,e){if(P)if(j){var n="var sharedChunk = {}; ("+P+")(sharedChunk); ("+j+")(sharedChunk);",r={};P(r),R=e(r),"undefined"!=typeof window&&(R.workerUrl=window.URL.createObjectURL(new Blob([n],{type:"text/javascript"})))}else j=e;else P=e}I(0,(function(t){class e{constructor(t,e){this.start=t,this.end=e,this.points=[],this.append=this.append.bind(this),this.prepend=this.prepend.bind(this)}append(t,e){this.points.push(Math.round(t),Math.round(e))}prepend(t,e){this.points.splice(0,0,Math.round(t),Math.round(e))}lineString(){return this.toArray()}isEmpty(){return this.points.length<2}appendFragment(t){this.points.push(...t.points),this.end=t.end}toArray(){return this.points}}const n=[[],[[[1,2],[0,1]]],[[[2,1],[1,2]]],[[[2,1],[0,1]]],[[[1,0],[2,1]]],[[[1,2],[0,1]],[[1,0],[2,1]]],[[[1,0],[1,2]]],[[[1,0],[0,1]]],[[[0,1],[1,0]]],[[[1,2],[1,0]]],[[[0,1],[1,0]],[[2,1],[1,2]]],[[[2,1],[1,0]]],[[[0,1],[2,1]]],[[[1,2],[2,1]]],[[[0,1],[1,2]]],[]];function r(t,e,n,r){return(e=2*e+r[0])+(n=2*n+r[1])*(t+1)*2}function o(t,e,n){return(e-t)/(n-t)}function i(t,i,a=4096,l=1){if(!t)return{};const s=a/(i.width-1);let c,u,h,f,d,p;const v={},y=new Map,g=new Map;function m(t,e,n){0===t[0]?n(s*(p-1),s*(d-o(h,e,c))):2===t[0]?n(s*p,s*(d-o(f,e,u))):0===t[1]?n(s*(p-o(u,e,c)),s*(d-1)):n(s*(p-o(f,e,h)),s*d)}for(d=1-l;do,a=u>o,l=h>o,s=f>o;for(const c of n[(t?8:0)|(a?4:0)|(s?2:0)|(l?1:0)]){let t=y.get(o);t||y.set(o,t=new Map);let n=g.get(o);n||g.set(o,n=new Map);const a=c[0],l=c[1],s=r(i.width,p,d,a),u=r(i.width,p,d,l);let h,f;if(h=n.get(s))if(n.delete(s),f=t.get(u))if(t.delete(u),h===f){if(m(l,o,h.append),!h.isEmpty()){let t=v[o];t||(v[o]=t=[]),t.push(h.lineString())}}else h.appendFragment(f),n.set(h.end=f.end,h);else m(l,o,h.append),n.set(h.end=u,h);else if(h=t.get(u))t.delete(u),m(a,o,h.prepend),t.set(h.start=s,h);else{const r=new e(s,u);m(a,o,r.append),m(l,o,r.append),t.set(s,r),n.set(u,r)}}}}}for(const[t,e]of y.entries()){let n=null;for(const r of e.values())r.isEmpty()||(null==n&&(n=v[t]||(v[t]=[])),n.push(r.lineString()))}return v}function a(t){const e=Object.entries(t);return e.sort((([t],[e])=>te?1:0)),e}function l(t){return a(t).map((([t,e])=>[t,..."number"==typeof e?[e]:e].join("*"))).join("~")}function s(t){return a(t).map((([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`)).join(",")}let c=null;function u(){return null==c&&(c="undefined"!=typeof OffscreenCanvas&&new OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof createImageBitmap),c||!1}let h=null;function f(t,e,n){let r=()=>{};const o=setTimeout((()=>{r(new Error("timed out")),null==n||n.abort()}),t);d(n,(()=>{r(new Error("aborted")),clearTimeout(o)}));const i=new Promise(((t,e)=>{r=e}));return Promise.race([i,e.finally((()=>clearTimeout(o)))])}function d(t,e){e&&(null==t||t.signal.addEventListener("abort",e))}function p(t){var e;return Boolean(null===(e=null==t?void 0:t.signal)||void 0===e?void 0:e.aborted)}let v,y,g,m,b=0;class w{constructor(t=100){this.size=()=>this.items.size,this.get=(t,e,n)=>{let r=this.items.get(t);if(r)r.lastUsed=++b,r.waiting++;else{const n=new AbortController,o=e(t,n);r={abortController:n,item:o,lastUsed:++b,waiting:1},this.items.set(t,r),this.prune()}const o=this.items,i=r.item.then((t=>t),(e=>(o.delete(t),Promise.reject(e))));let a=!1;return d(n,(()=>{var e;r&&r.abortController&&!a&&(a=!0,--r.waiting<=0&&(null===(e=r.abortController)||void 0===e||e.abort(),o.delete(t)))})),i},this.clear=()=>this.items.clear(),this.maxSize=t,this.items=new Map}prune(){if(this.items.size>this.maxSize){let t,e=1/0;this.items.forEach(((n,r)=>{n.lastUsedr.src="")),L(await new Promise(((e,o)=>{r.onload=()=>{p(n)||e(r),URL.revokeObjectURL(r.src),r.onload=null},r.onerror=()=>o(new Error("Could not load image.")),r.src=t.size?URL.createObjectURL(t):""})),e,g,m)};function L(t,e,n,r){if(n.width=t.width,n.height=t.height,!r)throw new Error("failed to get context");r.drawImage(t,0,0,t.width,t.height);const o=r.getImageData(0,0,t.width,t.height).data;return _(t.width,t.height,e,o)}function _(t,e,n,r){const o="mapbox"===n?(t,e,n)=>.1*(256*t*256+256*e+n)-1e4:(t,e,n)=>256*t+e+n/256-32768,i=new Float32Array(t*e);for(let t=0;t{if(0===t)return this;const r=1<this.get(t+o,e+i)))},this.subsamplePixelCenters=t=>{const e=(t,e,n)=>isNaN(t)?e:isNaN(e)?t:t+(e-t)*n;if(t<=1)return this;const n=.5-1/(2*t);return new S(this.width*t,this.height*t,((r,o)=>{const i=r/t-n,a=o/t-n,l=Math.floor(i),s=Math.floor(a),c=this.get(l,s),u=this.get(l+1,s),h=this.get(l,s+1),f=this.get(l+1,s+1),d=i-l,p=a-s,v=e(c,u,d),y=e(h,f,d);return e(v,y,p)}))},this.averagePixelCentersToGrid=(t=1)=>new S(this.width+1,this.height+1,((e,n)=>{let r=0,o=0,i=0;for(let a=e-t;a1===t?this:new S(this.width,this.height,((e,n)=>this.get(e,n)*t)),this.materialize=(t=2)=>{const e=this.width+2*t,n=new Float32Array(e*(this.height+2*t));let r=0;for(let e=-t;en[(o+t)*e+r+t]))},this.get=n,this.width=t,this.height=e}static fromRawDem(t){return new S(t.width,t.height,((e,n)=>{const r=t.data[n*t.width+e];return o=r,!isNaN(o)&&o>=-12e3&&o<=9e3?r:NaN;var o}))}static combineNeighbors(t){if(9!==t.length)throw new Error("Must include a tile plus 8 neighbors");const e=t[4];if(!e)return;const n=e.width,r=e.height;return new S(n,r,((e,o)=>{let i=0;o<0?o+=r:o */ read:function(t,e,n,r,o){var i,a,l=8*o-r-1,s=(1<>1,u=-7,h=n?o-1:0,f=n?-1:1,d=t[e+h];for(h+=f,i=d&(1<<-u)-1,d>>=-u,u+=l;u>0;i=256*i+t[e+h],h+=f,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=r;u>0;a=256*a+t[e+h],h+=f,u-=8);if(0===i)i=1-c;else{if(i===s)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),i-=c}return(d?-1:1)*a*Math.pow(2,i-r)},write:function(t,e,n,r,o,i){var a,l,s,c=8*i-o-1,u=(1<>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,p=r?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(l=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-a))<1&&(a--,s*=2),(e+=a+h>=1?f/s:f*Math.pow(2,1-h))*s>=2&&(a++,s/=2),a+h>=u?(l=0,a=u):a+h>=1?(l=(e*s-1)*Math.pow(2,o),a+=h):(l=e*Math.pow(2,h-1)*Math.pow(2,o),a=0));o>=8;t[n+d]=255&l,d+=p,l/=256,o-=8);for(a=a<0;t[n+d]=255&a,d+=p,a/=256,c-=8);t[n+d-p]|=128*v}},O=P,M=T;function P(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}P.Varint=0,P.Fixed64=1,P.Bytes=2,P.Fixed32=5;var j=4294967296,R=1/j,C="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function A(t){return t.type===P.Bytes?t.readVarint()+t.pos:t.pos+1}function I(t,e,n){return n?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function F(t,e,n){var r=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));n.realloc(r);for(var o=n.pos-1;o>=t;o--)n.buf[o+r]=n.buf[o]}function N(t,e){for(var n=0;n>>8,t[n+2]=e>>>16,t[n+3]=e>>>24}function $(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}P.prototype={destroy:function(){this.buf=null},readFields:function(t,e,n){for(n=n||this.length;this.pos>3,i=this.pos;this.type=7&r,t(o,e,this),this.pos===i&&this.skip(r)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=V(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=$(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=V(this.buf,this.pos)+V(this.buf,this.pos+4)*j;return this.pos+=8,t},readSFixed64:function(){var t=V(this.buf,this.pos)+$(this.buf,this.pos+4)*j;return this.pos+=8,t},readFloat:function(){var t=M.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=M.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,n,r=this.buf;return e=127&(n=r[this.pos++]),n<128?e:(e|=(127&(n=r[this.pos++]))<<7,n<128?e:(e|=(127&(n=r[this.pos++]))<<14,n<128?e:(e|=(127&(n=r[this.pos++]))<<21,n<128?e:function(t,e,n){var r,o,i=n.buf;if(o=i[n.pos++],r=(112&o)>>4,o<128)return I(t,r,e);if(o=i[n.pos++],r|=(127&o)<<3,o<128)return I(t,r,e);if(o=i[n.pos++],r|=(127&o)<<10,o<128)return I(t,r,e);if(o=i[n.pos++],r|=(127&o)<<17,o<128)return I(t,r,e);if(o=i[n.pos++],r|=(127&o)<<24,o<128)return I(t,r,e);if(o=i[n.pos++],r|=(1&o)<<31,o<128)return I(t,r,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(n=r[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&C?function(t,e,n){return C.decode(t.subarray(e,n))}(this.buf,e,t):function(t,e,n){var r="",o=e;for(;o239?4:s>223?3:s>191?2:1;if(o+u>n)break;1===u?s<128&&(c=s):2===u?128==(192&(i=t[o+1]))&&(c=(31&s)<<6|63&i)<=127&&(c=null):3===u?(i=t[o+1],a=t[o+2],128==(192&i)&&128==(192&a)&&((c=(15&s)<<12|(63&i)<<6|63&a)<=2047||c>=55296&&c<=57343)&&(c=null)):4===u&&(i=t[o+1],a=t[o+2],l=t[o+3],128==(192&i)&&128==(192&a)&&128==(192&l)&&((c=(15&s)<<18|(63&i)<<12|(63&a)<<6|63&l)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,u=1):c>65535&&(c-=65536,r+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),r+=String.fromCharCode(c),o+=u}return r}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==P.Bytes)return t.push(this.readVarint(e));var n=A(this);for(t=t||[];this.pos127;);else if(e===P.Bytes)this.pos=this.readVarint()+this.pos;else if(e===P.Fixed32)this.pos+=4;else{if(e!==P.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e268435455||t<0?function(t,e){var n,r;t>=0?(n=t%4294967296|0,r=t/4294967296|0):(r=~(-t/4294967296),4294967295^(n=~(-t%4294967296))?n=n+1|0:(n=0,r=r+1|0));if(t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,n){n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos]=127&t}(n,0,e),function(t,e){var n=(7&t)<<4;if(e.buf[e.pos++]|=n|((t>>>=3)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;e.buf[e.pos++]=127&t}(r,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,n){for(var r,o,i=0;i55295&&r<57344){if(!o){r>56319||i+1===e.length?(t[n++]=239,t[n++]=191,t[n++]=189):o=r;continue}if(r<56320){t[n++]=239,t[n++]=191,t[n++]=189,o=r;continue}r=o-55296<<10|r-56320|65536,o=null}else o&&(t[n++]=239,t[n++]=191,t[n++]=189,o=null);r<128?t[n++]=r:(r<2048?t[n++]=r>>6|192:(r<65536?t[n++]=r>>12|224:(t[n++]=r>>18|240,t[n++]=r>>12&63|128),t[n++]=r>>6&63|128),t[n++]=63&r|128)}return n}(this.buf,t,this.pos);var n=this.pos-e;n>=128&&F(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeFloat:function(t){this.realloc(4),M.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),M.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var n=0;n=128&&F(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,e,n){this.writeTag(t,P.Bytes),this.writeRawMessage(e,n)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,N,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,D,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,G,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,W,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,B,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,Z,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,z,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,H,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,U,e)},writeBytesField:function(t,e){this.writeTag(t,P.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,P.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,P.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,P.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,P.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,P.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,P.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,P.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,P.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,P.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var Y,J=E(O);function K(t,e){if(!e)throw new Error("pbf undefined");e.writeVarintField(15,2),e.writeStringField(1,t.id||""),e.writeVarintField(5,t.extent||4096);const n={keys:[],values:[],keycache:{},valuecache:{}};for(const r of t.features)n.feature=r,e.writeMessage(2,X,n);for(const t of n.keys)e.writeStringField(3,t);for(const t of n.values)e.writeMessage(4,rt,t)}function X(t,e){const n=t.feature;if(!n||!e)throw new Error;e.writeMessage(2,Q,t),e.writeVarintField(3,n.type),e.writeMessage(4,nt,n)}function Q(t,e){const n=t.feature;if(!n||!e)throw new Error;const r=t.keys,o=t.values,i=t.keycache,a=t.valuecache;for(const t in n.properties){let l=n.properties[t],s=i[t];if(null===l)continue;void 0===s&&(r.push(t),s=r.length-1,i[t]=s),e.writeVarint(s);const c=typeof l;"string"!==c&&"boolean"!==c&&"number"!==c&&(l=JSON.stringify(l));const u=`${c}:${l}`;let h=a[u];void 0===h&&(o.push(l),h=o.length-1,a[u]=h),e.writeVarint(h)}}function tt(t,e){return(e<<3)+(7&t)}function et(t){return t<<1^t>>31}function nt(t,e){if(!e)throw new Error;const n=t.geometry,r=t.type;let o=0,i=0;for(const t of n){let n=1;r===Y.POINT&&(n=t.length/2),e.writeVarint(tt(1,n));const a=t.length/2,l=r===Y.POLYGON?a-1:a;for(let n=0;n{this.markFinish();const e=t=>{const e=this.marks[t]||[],n=Math.max(...e.map((t=>Math.max(...t)))),r=Math.min(...e.map((t=>Math.min(...t))));return Number.isFinite(n)?n-r:void 0},n=e("main")||0,r=e("fetch"),o=e("decode"),i=e("isoline");return{url:t,tilesUsed:this.tilesFetched,origin:this.timeOrigin,marks:this.marks,resources:[...this.resources,...st(this.fetched.map(at))],duration:n,fetch:r,decode:o,process:i,wait:n-(r||0)-(o||0)-(i||0)}},this.error=t=>({...this.finish(t),error:!0}),this.marker=t=>{var e;this.marks[t]||(this.marks[t]=[]);const n=[lt()];return null===(e=this.marks[t])||void 0===e||e.push(n),()=>n.push(lt())},this.useTile=t=>{this.urls.indexOf(t)<0&&(this.urls.push(t),this.tilesFetched++)},this.fetchTile=t=>{this.fetched.indexOf(t)<0&&this.fetched.push(t)},this.addAll=t=>{var e;this.tilesFetched+=t.tilesUsed;const n=t.origin-this.timeOrigin;for(const r in t.marks){const o=r;(this.marks[o]||(this.marks[o]=[])).push(...(null===(e=t.marks[o])||void 0===e?void 0:e.map((t=>t.map((t=>t+n)))))||[])}this.resources.push(...t.resources.map((t=>function(t,e){const n={};for(const r in t)0!==t[r]&&ut.test(r)?n[r]=Number(t[r])+e:n[r]=t[r];return n}(t,n))))},this.markFinish=this.marker(t)}}const ut=/(Start$|End$|^start|^end)/;let ht=0;t.A=class{constructor(t,e,n=2e4){this.callbacks={},this.cancels={},this.dest=t,this.timeoutMs=n,this.dest.onmessage=async({data:t})=>{const n=t;if("cancel"===n.type){const t=this.cancels[n.id];delete this.cancels[n.id],null==t||t.abort()}else if("response"===n.type){const t=this.callbacks[n.id];delete this.callbacks[n.id],t&&t(n.error?new Error(n.error):void 0,n.response,n.timings)}else if("request"===n.type){const t=new ct("worker"),r=e[n.name],o=new AbortController,i=r.apply(r,[...n.args,o,t]),a=`${n.name}_${n.id}`;if(n.id&&i){this.cancels[n.id]=o;try{const e=await i,r=null==e?void 0:e.transferrables;this.postMessage({id:n.id,type:"response",response:e,timings:t.finish(a)},r)}catch(e){this.postMessage({id:n.id,type:"response",error:(null==e?void 0:e.toString())||"error",timings:t.finish(a)})}delete this.cancels[n.id]}}}}postMessage(t,e){this.dest.postMessage(t,e||[])}send(t,e,n,r,...o){const i=++ht,a=new Promise(((n,a)=>{this.postMessage({id:i,type:"request",name:t,args:o},e),this.callbacks[i]=(t,e,o)=>{null==r||r.addAll(o),t?a(t):n(e)}}));return d(n,(()=>{delete this.callbacks[i],this.postMessage({id:i,type:"cancel"})})),f(this.timeoutMs,a,n)}},t.H=S,t.L=class{constructor(t,e,n,r,o){this.loaded=Promise.resolve(),this.decodeImage=k,this.fetchAndParseTile=(t,e,n,r,o)=>{const i=this,a=this.demUrlPattern.replace("{z}",t.toString()).replace("{x}",e.toString()).replace("{y}",n.toString());return null==o||o.useTile(a),this.parsedCache.get(a,(async(r,a)=>{const l=await i.fetchTile(t,e,n,a,o);if(p(a))throw new Error("canceled");const s=i.decodeImage(l.data,i.encoding,a),c=null==o?void 0:o.marker("decode"),u=await s;return null==c||c(),u}),r)},this.tileCache=new w(e),this.parsedCache=new w(e),this.contourCache=new w(e),this.timeoutMs=o,this.demUrlPattern=t,this.encoding=n,this.maxzoom=r}fetchTile(t,e,n,r,o){const i=this.demUrlPattern.replace("{z}",t.toString()).replace("{x}",e.toString()).replace("{y}",n.toString());return null==o||o.useTile(i),this.tileCache.get(i,((t,e)=>{const n={signal:e.signal};null==o||o.fetchTile(i);const r=null==o?void 0:o.marker("fetch");return f(this.timeoutMs,fetch(i,n).then((async t=>{if(null==r||r(),!t.ok)throw new Error(`Bad response: ${t.status} for ${i}`);return{data:await t.blob(),expires:t.headers.get("expires")||void 0,cacheControl:t.headers.get("cache-control")||void 0}})),e)}),r)}async fetchDem(t,e,n,r,o,i){const a=Math.min(t-(r.overzoom||0),this.maxzoom),l=t-a,s=1<{const g=1<=g?void 0:this.fetchDem(t,(n+g)%g,o,r,s,a));const b=await Promise.all(m);let w=S.combineNeighbors(b);if(!w||p(s))return{arrayBuffer:(new Uint8Array).buffer};const x=null==a?void 0:a.marker("isoline");if(w.width>=y)w=w.materialize(2);else for(;w.width{const n=Number(t);return{type:Y.LINESTRING,geometry:e,properties:{[d]:n,[v]:Math.max(...l.map(((t,e)=>n%t==0?e:0)))}}}))}}});return null==x||x(),{arrayBuffer:L.buffer}}),o)}},t.T=ct,t.a=function(t){return Object.fromEntries(t.replace(/^.*\?/,"").split("&").map((t=>{const e=t.split("=").map(decodeURIComponent),n=e[0];let r=e[1];switch(n){case"thresholds":o=r,r=Object.fromEntries(o.split("~").map((t=>t.split("*").map(Number))).map((([t,...e])=>[t,e])));break;case"extent":case"multiplier":case"overzoom":case"buffer":r=Number(r)}var o;return[n,r]})))},t.b=i,t.c=_,t.d=k,t.e=function({thresholds:t,...e}){return a({thresholds:l(t),...e}).map((([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`)).join("&")},t.f=function(t){return t.then((({arrayBuffer:t})=>{const e=function(t){const e=new ArrayBuffer(t.byteLength);return new Uint8Array(e).set(new Uint8Array(t)),e}(t);return{arrayBuffer:e,transferrables:[e]}}))},t.g=function(t,e){const{thresholds:n,...r}=t;let o=[],i=-1/0;return Object.entries(n).forEach((([t,n])=>{const r=Number(t);r<=e&&r>i&&(i=r,o="number"==typeof n?[n]:n)})),{levels:o,...r}},t.p=function(t,e){return t.then((({data:t,...n})=>{let r=t;return e&&(r=new Float32Array(t.length),r.set(t)),{...n,data:r,transferrables:[r.buffer]}}))}})),I(0,(function(t){const e=t=>Promise.reject(new Error(`No manager registered for ${t}`));const n="undefined"!=typeof self?self:"undefined"!=typeof window?window:global;n.actor=new t.A(n,new class{constructor(){this.managers={},this.init=(e,n)=>(this.managers[e.managerId]=new t.L(e.demUrlPattern,e.cacheSize,e.encoding,e.maxzoom,e.timeoutMs),Promise.resolve()),this.fetchTile=(t,n,r,o,i,a)=>{var l;return(null===(l=this.managers[t])||void 0===l?void 0:l.fetchTile(n,r,o,i,a))||e(t)},this.fetchAndParseTile=(n,r,o,i,a,l)=>{var s;return t.p((null===(s=this.managers[n])||void 0===s?void 0:s.fetchAndParseTile(r,o,i,a,l))||e(n),!0)},this.fetchContourTile=(n,r,o,i,a,l,s)=>{var c;return t.f((null===(c=this.managers[n])||void 0===c?void 0:c.fetchContourTile(r,o,i,a,l,s))||e(n))}}})})),I(0,(function(t){const e={workerUrl:""};let n,r=0;class o{constructor(){this.decodeImage=(e,n,r)=>t.p(t.d(e,n,r),!1)}}function i(){if(!n){const r=new Worker(e.workerUrl),i=new o;n=new t.A(r,i)}return n}class a{constructor(t,e,n,o,a,l){this.fetchTile=(t,e,n,r,o)=>this.actor.send("fetchTile",[],r,o,this.managerId,t,e,n),this.fetchAndParseTile=(t,e,n,r,o)=>this.actor.send("fetchAndParseTile",[],r,o,this.managerId,t,e,n),this.fetchContourTile=(t,e,n,r,o,i)=>this.actor.send("fetchContourTile",[],o,i,this.managerId,t,e,n,r);const s=this.managerId=++r;this.actor=l||i(),this.loaded=this.actor.send("init",[],new AbortController,void 0,{cacheSize:e,demUrlPattern:t,encoding:n,maxzoom:o,managerId:s,timeoutMs:a})}}Blob.prototype.arrayBuffer||(Blob.prototype.arrayBuffer=function(){return new Promise(((t,e)=>{const n=new FileReader;n.onload=e=>{var n;return t(null===(n=e.target)||void 0===n?void 0:n.result)},n.onerror=e,n.readAsArrayBuffer(this)}))});const l=t=>(e,n)=>{if(n instanceof AbortController)return t(e,n);{const r=new AbortController;return t(e,r).then((t=>n(void 0,t.data,t.cacheControl,t.expires)),(t=>n(t))),{cancel:()=>r.abort()}}},s=new Set;const c={generateIsolines:t.b,DemSource:class{constructor({url:e,cacheSize:n=100,id:r="dem",encoding:o="terrarium",maxzoom:i=12,worker:c=!0,timeoutMs:u=1e4,actor:h}){this.timingCallbacks=[],this.onTiming=t=>{this.timingCallbacks.push(t)},this.setupMaplibre=t=>{t.addProtocol(this.sharedDemProtocolId,this.sharedDemProtocol),t.addProtocol(this.contourProtocolId,this.contourProtocol)},this.sharedDemProtocolV4=async(e,n)=>{const[r,o,i]=this.parseUrl(e.url),a=new t.T("main");let l;try{const t=await this.manager.fetchTile(r,o,i,n,a);l=a.finish(e.url);return{data:await t.data.arrayBuffer(),cacheControl:t.cacheControl,expires:t.expires}}catch(t){throw l=a.error(e.url),t}finally{this.timingCallbacks.forEach((t=>t(l)))}},this.contourProtocolV4=async(e,n)=>{const r=new t.T("main");let o;try{const[i,a,l]=this.parseUrl(e.url),s=t.a(e.url),c=await this.manager.fetchContourTile(i,a,l,t.g(s,i),n,r);return o=r.finish(e.url),{data:c.arrayBuffer}}catch(t){throw o=r.error(e.url),t}finally{this.timingCallbacks.forEach((t=>t(o)))}},this.contourProtocol=l(this.contourProtocolV4),this.sharedDemProtocol=l(this.sharedDemProtocolV4),this.contourProtocolUrl=e=>`${this.contourProtocolUrlBase}?${t.e(e)}`;let f=r,d=1;for(;s.has(f);)f=r+d++;s.add(f),this.sharedDemProtocolId=`${f}-shared`,this.contourProtocolId=`${f}-contour`,this.sharedDemProtocolUrl=`${this.sharedDemProtocolId}://{z}/{x}/{y}`,this.contourProtocolUrlBase=`${this.contourProtocolId}://{z}/{x}/{y}`;const p=c?a:t.L;this.manager=new p(e,n,o,i,u,h)}getDemTile(t,e,n,r){return this.manager.fetchAndParseTile(t,e,n,r||new AbortController)}parseUrl(t){const[,e,n,r]=/\/\/(\d+)\/(\d+)\/(\d+)/.exec(t)||[];return[Number(e),Number(n),Number(r)]}},HeightTile:t.H,LocalDemManager:t.L,decodeParsedImage:t.c,set workerUrl(t){e.workerUrl=t},get workerUrl(){return e.workerUrl}};return c}));var F=R;function N(t){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},N(t)}function D(t,e){for(var n=0;n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function U(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=",["get","elev"],["match",["zoom"],12,300,100]],paint:{"line-color":!0===e?["match",["get","level"],1,"#BBBBBB","#CCCCCC"]:e,"line-width":["match",["get","level"],1,1,.8]}},l),l="contour",u=h.sharedDemProtocolUrl,n){var f,d=et,p=H(a);try{for(p.s();!(f=p.n()).done;){var v=f.value;if("symbol"==v.type){d=v.id;break}}}catch(t){p.e(t)}finally{p.f()}i.addLayer({id:"label_contour",type:"symbol",source:"contour","source-layer":"contour",maxzoom:rt.labelMaxzoom,filter:["all",[">",["get","level"],0],[">=",["get","elev"],100]],layout:{"text-field":"{elev}","text-font":["OCJ"],"text-size":10,"symbol-placement":"line"},paint:{"text-color":{stops:n.stops||[[12,"#888888"],[13,"#666666"]]},"text-halo-color":n.halo||"#FFFFFF","text-halo-width":.8}},d)}}if(r){var y=X(this,ot).Renderer;y.addSource("dem",{type:"raster-dem",encoding:"terrarium",tiles:[u],maxzoom:rt.sourceMaxzoom}),y.addLayer({id:"hillshade",type:"hillshade",source:"dem",minzoom:4,paint:{"hillshade-exaggeration":!0===r?.15:r}},l)}}}},{key:"language",value:function(t){var e,n=X(this,ot).Renderer,r=H(n.getStyle().layers);try{for(r.s();!(e=r.n()).done;){var o=e.value;if("symbol"==o.type){var i,a=null===(i=o.layout)||void 0===i||null===(i=i["text-field"])||void 0===i?void 0:i[0];if(null==a||"{"==a)continue;var l="coalesce"==a?"en":"th";if(null==t)return l;if(t==l)return this;n.setLayoutProperty(o.id,"text-field","th"==t?"line"==o.layout["symbol-placement"]?["get","name_l"]:["concat",["get","name_e"],["match",["get","name_e"],"","","\n"],["get","name_l"]]:["coalesce",["get","name_e"],["get","name_l"]])}}}catch(t){r.e(t)}finally{r.f()}return null==t?null:this}},{key:"setBase",value:function(t){var e,n,r=this;if(this._base=t,X(this,it).map&&K(this,ct,pt).call(this),null!==(e=(n=t.style).startsWith)&&void 0!==e&&e.call(n,"ext."))return K(this,lt,ft).call(this,t.style),this;var o=X(this,ot),i=o.Ui,a=o.Renderer,l=o.Event;return a.once("styledata",(function(e){return setTimeout((function(e){var n,o=H(r._layerList);try{for(o.s();!(n=o.n()).done;){var s,c=n.value,u=c.beforeId,h=c.layer,f=a.getLayer(u)?u:et;null!==(s=h.style)&&void 0!==s&&s.layers?K(r,at,ht).call(r,f,h.style):h.id&&h.type&&a.addLayer(h,f)}}catch(t){o.e(t)}finally{o.f()}r._setDem(),a.setTerrain(i._setTerrain(e.style.stylesheet)),l.fire("layerChange",t)}),100,e)})).setStyle(t.style||t),this}},{key:"add",value:function(t,e){var n=this,r=X(this,ot).Renderer;if(!r.isStyleLoaded())return setTimeout(this.add.bind(this),100,t,e),this;if(t instanceof Z&&!t.style.layers)return L.getJson(t.style).then((function(r){t.style=r,n.add(t,e)})),this;if(null==e){var o,i,a=null===(o=t.style)||void 0===o||null===(o=o.layers)||void 0===o||null===(o=o[0].metadata)||void 0===o?void 0:o.weight,l=H(r.getStyle().layers);try{for(l.s();!(i=l.n()).done;){var s,c=i.value;if(a>(null===(s=c.metadata)||void 0===s?void 0:s.weight)||"symbol"==c.type){e=c.id;break}}}catch(t){l.e(t)}finally{l.f()}e||(e=et)}else r.getLayer(e)||(e=et);if(t instanceof Z)K(this,at,ht).call(this,e,t.style);else{if(!t.id||!t.type)throw new Error("Not layer");r.addLayer(t,e)}return this._layerList.push({beforeId:e,layer:t}),X(this,ot).Event.fire("layerChange",t),this}},{key:"insert",value:function(t,e){return this.add(e,t)}},{key:"remove",value:function(t){var e,n=X(this,ot).Renderer;if(null!==(e=t.style)&&void 0!==e&&e.layers){var r,o=H(t.style.layers);try{for(o.s();!(r=o.n()).done;){var i=r.value.id;n.removeLayer(i)}}catch(t){o.e(t)}finally{o.f()}for(var a in t.style.sources)n.removeSource(a)}else t.id&&n.removeLayer(t.id);return this._layerList=this._layerList.filter((function(e){return e.layer!=t})),X(this,ot).Event.fire("layerChange",void 0,t),this}},{key:"clear",value:function(){return this._layerList=[],this.setBase(this._base)}},{key:"list",value:function(){return X(this,ot).Renderer.getStyle().layers}},{key:"size",value:function(){return this.list().length}},{key:"contains",value:function(){return!1}},{key:"externalMap",value:function(){if(X(this,it).name){var t=X(this,it).name.slice();return t[0]=X(this,it).map,t}}},{key:"externalOptions",value:function(){}}],n&&V(e.prototype,n),r&&V(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ht(t,e){var n=X(this,ot).Renderer;try{for(var r in e.sources)n.addSource(r,e.sources[r]);var o,i=H(e.layers);try{for(i.s();!(o=i.n()).done;){var a=o.value;n.addLayer(a,t)}}catch(t){i.e(t)}finally{i.f()}}catch(t){}}function ft(t){if(this.setBase(longdo3.Layers.CLEAR),t=t.split("."),X(this,it).name=t,"google"!==t[1])throw new Error("Unsupport map provider");window.google&&google.maps&&google.maps.version[0]>="3"?K(this,st,dt).call(this):L.loadScript("".concat(server.mapg,"?language=").concat(X(this,ot).language(),"&").concat(longdo3.googleQuery),K(this,st,dt).bind(this))}function dt(){var t=X(this,it),e=X(this,ot).placeholder(),n=X(this,ot).Renderer;e.querySelector(".maplibregl-ctrl-bottom-left").classList.add("ldmap-external-bottom"),e.querySelector(".maplibregl-ctrl-bottom-right").classList.add("ldmap-external-bottom"),t.maxPitch=n.getMaxPitch(),t.maxZoom=n.getMaxZoom(),n.setMaxZoom(Math.min(t.maxZoom,nt.ZOOM)),n.setMaxPitch(Math.min(t.maxPitch,nt.PITCH)),t.placeholder=L.prepend(n.getCanvasContainer(),"div",{className:"ldmap-externalmap"}),t.map=new google.maps.Map(t.placeholder,{center:n.getCenter(),zoom:n.getZoom()+1,heading:n.getBearing(),tilt:n.getPitch(),mapId:t.name[2],mapTypeId:t.name[3],disableDefaultUI:!0,disableDoubleClickZoom:!0,draggable:!1,keyboardShortcuts:!1,scrollwheel:!1,isFractionalZoomEnabled:!0}),t.goTo=function(){t.map.moveCamera({center:n.getCenter(),zoom:n.getZoom()+1,heading:n.getBearing(),tilt:n.getPitch()})},n.on("drag",t.goTo).on("move",t.goTo).on("zoom",t.goTo).on("rotate",t.goTo).on("pitch",t.goTo)}function pt(){var t=X(this,it),e=X(this,ot).placeholder(),n=X(this,ot).Renderer;e.querySelector(".maplibregl-ctrl-bottom-left").classList.remove("ldmap-external-bottom"),e.querySelector(".maplibregl-ctrl-bottom-right").classList.remove("ldmap-external-bottom"),n.getCanvasContainer().removeChild(t.placeholder),n.setMaxPitch(t.maxPitch),n.setMaxZoom(t.maxZoom),n.off("drag",t.goTo).off("move",t.goTo).off("zoom",t.goTo).off("rotate",t.goTo).off("pitch",t.goTo),Q(this,it,{})}function vt(t){return vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vt(t)}function yt(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return gt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gt(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function gt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&a.push(!0),a=a.concat(i.map(L.fromCoordinate));return a;default:return this._geojson.geometry}}},{key:"visibleRange",value:function(){return{min:this._geojson.properties.visibleMin,max:this._geojson.properties.visibleMax}}},{key:"active",value:function(){return"collection"in this}},{key:"element",value:function(t){var e;return null==t||null===(e=t.getElement)||void 0===e?void 0:e.call(t)}},{key:"move",value:function(t,e,n){var r;(this._geojson.geometry=t.geometry?t.geometry:t.coordinates?t:Nt(this,Wt,zt).call(this,t),null!=n&&n.setLngLat)&&(e?Nt(this,Bt,Ht).call(this,n,!0===e?150:e):(n.setLngLat(this._geojson.geometry.coordinates),null===(r=this.collection)||void 0===r||r._fireUpdate(this)))}},{key:"shift",value:function(t){return this.move(i.translate(this._geojson.geometry,t))}},{key:"distance",value:function(t,e){return L.formatDistance(Nt(this,Gt,Ut).call(this,i.minimumDistance,t),e)}},{key:"intersects",value:function(t){return Nt(this,Gt,Ut).call(this,i.intersects,t)}},{key:"contains",value:function(t){return Nt(this,Gt,Ut).call(this,i.contains,t)}},{key:"toJSON",value:function(t){return t?void 0:this._geojson}}]),t}();function zt(t){if(!t.length){if(L.validateLocation(t))return L.toGeoPoint(t);throw new Error("Unsupported Geometry")}var e,n=[],r=[],o=yt(t);try{for(o.s();!(e=o.n()).done;){var i=e.value;!0===i||null===i?(n.push(r),r=[]):r.push(L.toCoordinate(i))}}catch(t){o.e(t)}finally{o.f()}return t.isPolygon||n.length?(n.push(r),{type:t.isPolygon?"Polygon":"MultiLineString",coordinates:n}):{type:"LineString",coordinates:r}}function Ht(t,e){var n=document.timeline.currentTime,r=t.getLngLat(),o=r.lng,i=r.lat,a=this._geojson.geometry.coordinates,l=a[0]-o,s=a[1]-i,c=this;requestAnimationFrame((function r(u){var h,f=u-n;if(f>e)return t.setLngLat(a),void(null===(h=c.collection)||void 0===h||h._fireUpdate(c));requestAnimationFrame(r);var d=f/e;t.setLngLat([o+l*d,i+s*d])}))}function Ut(t,e){return t(this._geojson.geometry,L.validateLocation(e)?L.toGeoPoint(e):e._geojson.geometry,this instanceof longdo3.Circle?this.location().radius:void 0,e instanceof longdo3.Circle?e.location().radius:void 0,this._geojson.properties.radius,e._geojson.properties.radius)}var Vt=new WeakMap,qt=new WeakMap,$t=new WeakSet,Yt=function(t){kt(n,t);var e=_t(n);function n(t,r){var o,i,a,l;if(jt(this,n),It(St(l=e.call(this,t)),$t),Tt(St(l),Vt,{writable:!0,value:void 0}),Tt(St(l),qt,{writable:!0,value:void 0}),((r=r||{}).popup||r.detail)&&(Mt(St(l),qt,new te(t,r.popup||r)),Ot(St(l),qt)._marker=St(l),r.clickable=!0),null!==(o=r.icon)&&void 0!==o&&o.html)r.icon.offset&&(r.offset=L.toPointLike(r.icon.offset)),r.rotate&&(r.rotation=r.rotate),r.element=document.createElement("div"),r.element.innerHTML=r.icon.html,r.clickable&&(r.element.className="ldmap-clickable"),r.title&&(r.element.title=r.title),r.weight&&(r.element.style.zIndex=r.weight),Mt(St(l),Vt,r);else{if(r.icon){var s=(L.isHD()||!r.icon.url)&&r.icon.urlHD,c=s||r.icon.url,u=r.icon.offset;r.icon=bt(bt({url:c},r.icon.size),{},{offset:u?Array.isArray(u)?u:L.toPointLike(u):null,hd:s?1:0})}else r.icon=Dt;r.weight&&L.geoJSONwithZ(l._geojson.geometry,r.weight)}return r.visibleMin=(null===(i=r.visibleRange)||void 0===i?void 0:i.min)||B,r.visibleMax=(null===(a=r.visibleRange)||void 0===a?void 0:a.max)||G,l._geojson.properties=r,l._geojson.object=St(l),l}return Ct(n,[{key:"_add",value:function(t){var e=this;if(Ot(this,Vt))return Ot(this,Vt).addTo||(Mt(this,Vt,new maplibregl.Marker(Ot(this,Vt)).setLngLat(this._geojson.geometry.coordinates).on("drag",(function(){return Nt(e,$t,Jt).call(e,"overlayDrag")})).on("dragend",(function(){return Nt(e,$t,Jt).call(e,"overlayDrop")}))),Ot(this,qt)&&Ot(this,Vt).setPopup(Ot(this,qt)._add())),Ot(this,Vt).addTo(t.Renderer).getElement().addEventListener("click",(function(){t._overlayClick=!0,t.Event.fire("overlayClick",e)})),!0;var n=this.collection._markerLayer,r=this._geojson.properties.icon;if(r.width)n.setProps({data:n.props.data.concat(this._geojson)});else{var o=new Image;o.onload=function(){r.width=o.width>>r.hd,r.height=o.height>>r.hd,n.setProps({data:n.props.data.concat(e._geojson)})},o.src=r.url}}},{key:"_remove",value:function(){var t=this;if(Ot(this,Vt))return Ot(this,Vt).remove(),!0;var e=this.collection._markerLayer;e.setProps({data:e.props.data.filter((function(e){return e!=t._geojson}))}),Ot(this,qt)&&this.collection.remove(Ot(this,qt))}},{key:"_setVisibility",value:function(t){this.element().style.display=L.isInRange(t,this.visibleRange())?"block":"none"}},{key:"popup",value:function(){return Ot(this,qt)}},{key:"element",value:function(){return xt(Et(n.prototype),"element",this).call(this,Ot(this,Vt))}},{key:"move",value:function(t,e){var r=!this.render&&e?this._geojson.geometry.coordinates:void 0;if(xt(Et(n.prototype),"move",this).call(this,t,e,Ot(this,Vt)),!Ot(this,Vt)){var o;if(e){!0===e&&(e=150);var i=document.timeline.currentTime,a=this._geojson.geometry.coordinates,l=a[0]-r[0],s=a[1]-r[1],c=this;function h(t){var n,o,u=t-i;if(u>e)return c._geojson.geometry.coordinates=a,void(null===(o=c.collection)||void 0===o||o._updateOverlay(c));requestAnimationFrame(h);var f=u/e;c._geojson.geometry.coordinates=[r[0]+l*f,r[1]+s*f],null===(n=c.collection)||void 0===n||n._updateOverlay(c)}requestAnimationFrame(h)}else{var u;null===(u=this.collection)||void 0===u||u._updateOverlay(this)}null===(o=Ot(this,qt))||void 0===o||o.move(t,e)}return this}},{key:"pop",value:function(t){return this.active()&&Ot(this,qt)&&(null==t||t!=Ot(this,qt).active())&&(Ot(this,Vt)?Ot(this,Vt).togglePopup():Ot(this,qt).active()?this.collection.remove(Ot(this,qt)):this.collection.add(Ot(this,qt))),this}},{key:"update",value:function(t){if(Ot(this,Vt))null!=t.draggable&&Ot(this,Vt).setDraggable(t.draggable),null!=t.rotate&&Ot(this,Vt).setRotation(t.rotate);else{var e,n=this._geojson.properties;for(var r in t)n[r]=t[r];null===(e=this.collection)||void 0===e||e._updateOverlay(this)}return this}}]),n}(Zt);function Jt(t){var e=Ot(this,Vt).getLngLat(),n=e.lng,r=e.lat;this._geojson.geometry.coordinates=[n,r],map.Event.fire(t,this)}longdo3.Marker=Yt;var Kt=new WeakMap,Xt=new WeakMap,Qt=new WeakMap,te=function(t){kt(n,t);var e=_t(n);function n(t,r){var o;if(jt(this,n),Tt(St(o=e.call(this,t)),Qt,{get:ee,set:void 0}),Tt(St(o),Kt,{writable:!0,value:void 0}),Tt(St(o),Xt,{writable:!0,value:void 0}),(r=r||{}).size){var i=r.size.maxWidth||r.size.width;i&&(r.maxWidth=i+"px")}return!1===r.closable&&(r.closeButton=!1),Mt(St(o),Kt,r),Mt(St(o),Xt,{title:r.title,detail:r.detail}),o}return Ct(n,[{key:"_add",value:function(t){var e=this;if(!Ot(this,Kt).addTo){var n=Ot(this,Kt),r=n.loadHtml,o=n.loadDetail,i=Ot(this,Kt).html||!!r&&" ";Mt(this,Kt,new maplibregl.Popup(Ot(this,Kt)).setLngLat(this._geojson.geometry.coordinates).setHTML(i?"":Ot(this,Qt)).on("open",(function(){e.collection||(e.collection=e._marker.collection,e.collection.add(e))})).on("close",(function(){var t;null===(t=e.collection)||void 0===t||t._closePopup(e)}))),i?Ot(this,Kt).on("open",(function(t){var e=t.target.getElement();e.innerHTML=i,null==r||r(e)})):o&&Ot(this,Kt).once("open",(function(t){Ot(e,Xt).element=t.target.getElement().children[1],o(Ot(e,Xt).element.children[1])}))}if(!t)return Ot(this,Kt);Ot(this,Kt).addTo(t.Renderer)}},{key:"_remove",value:function(){Ot(this,Kt).remove()}},{key:"element",value:function(){return xt(Et(n.prototype),"element",this).call(this,Ot(this,Kt))}},{key:"move",value:function(t,e){return xt(Et(n.prototype),"move",this).call(this,t,e,Ot(this,Kt)),this}},{key:"title",value:function(t){if(null==t)return Ot(this,Xt).title;var e,n;(Ot(this,Xt).title=t,Ot(this,Xt).element)?Ot(this,Xt).element.firstChild.innerHTML=t:null===(e=(n=Ot(this,Kt)).setHTML)||void 0===e||e.call(n,Ot(this,Qt));return this}},{key:"detail",value:function(t){if(null==t)return Ot(this,Xt).detail;var e,n;(Ot(this,Xt).detail=t,Ot(this,Xt).element)?Ot(this,Xt).element.children[1].innerHTML=t:null===(e=(n=Ot(this,Kt)).setHTML)||void 0===e||e.call(n,Ot(this,Qt));return this}}]),n}(Zt);function ee(){var t=Ot(this,Xt).title||"";return'
').concat(t,'
').concat(Ot(this,Xt).detail||"","
")}longdo3.Popup=te;var ne,re=__webpack_require__(676),oe=__webpack_require__.n(re);function ie(t){return ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ie(t)}function ae(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){c=!0,o=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||ce(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function le(t,e){Se(t,e),e.add(t)}function se(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function ce(t,e){if(t){if("string"==typeof t)return ue(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ue(t,e):void 0}}function ue(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}("Polygon"==s?c:[c]);try{for(h.s();!(n=h.n()).done;)for(var f,d=n.value,p=1,v=d[0];f=v,v=d[p];++p){var y=i.closestPointOnLine(t[0],t[1],v[0],v[1],f[0],f[1]);if(L.isAbsInRange(t[0]-y.x,u)&&L.isAbsInRange(t[1]-y.y,u))return o.move({type:"Point",coordinates:L.toPointLike(y)}),void this.collection.add(o)}}catch(t){h.e(t)}finally{h.f()}}},{key:"_hidePointer",value:function(){var t,e=this._geojson.properties.pointer;null===(t=e.collection)||void 0===t||t.remove(e)}},{key:"popup",value:function(){return Ee(this,Re)}},{key:"move",value:function(t){var e;if(me(Le(n.prototype),"move",this).call(this,t),null===(e=this.collection)||void 0===e||e._updateOverlay(this),Ee(this,je)){var r,o=this._geojson,i=o.geometry,a=o.properties,l=Ee(this,je).call(this,i);if(Ee(this,Re)){var s=Ee(this,Re).location(),c=s.lon,u=s.lat;Ee(this,Re).move({lon:c+l.lon-a.pivot.lon,lat:u+l.lat-a.pivot.lat})}a.pivot=l,null===(r=a.label)||void 0===r||r.move(l)}return this}},{key:"pop",value:function(t,e){return this.active()&&Ee(this,Re)&&(null==t||t!=Ee(this,Re).active())&&(Ee(this,Re).active()?this.collection.remove(Ee(this,Re)):this.collection.add(this instanceof Ge?Ee(this,Re):Ee(this,Re).move(e||this.pivot()))),this}},{key:"pivot",value:function(){return this._geojson.properties.pivot}},{key:"centroid",value:function(){return i.polylineCentroid(this._geojson.geometry)}},{key:"bound",value:function(){return i.locationBound(this._geojson.geometry)}},{key:"linkEditing",value:function(t){}},{key:"update",value:function(t){var e,n=this._geojson.properties;for(var r in t)n[r]="lineColor"==r||"fillColor"==r?L.colorToRGBAArray(t[r]):t[r];return null===(e=this.collection)||void 0===e||e._updateOverlay(this),this}},{key:"rotate",value:function(t){return this.move(i.rotate(this._geojson.geometry,this.pivot(),t*o))}},{key:"size",value:function(t){return L.length(this._geojson.geometry,t)}}]),n}(Zt);longdo3.Polyline=Ce;var Ae=new WeakSet,Ie=function(t){be(n,t);var e=xe(n);function n(t,r){var o;if(pe(this,n),t.length){for(var a,l=1,s=0,c=t[s];a=t[l],l<=t.length;++l)if(!a||!0===a||null===a){if(L.sameLocation(t[l-1],c)||t.splice(l++,0,fe({},c)),l-s<4)throw new Error("Not enough vertices");c=t[s=++l]}t.isPolygon=!0}return(r=r||{}).fillColor=L.colorToRGBAArray(r.fillColor,100,null!=r.lineColor),null==r.pivot&&(r.pivot=i.polygonPivot),le(ke(o=e.call(this,t,r)),Ae),o}return ye(n,[{key:"centroid",value:function(){return i.polygonCentroid(this._geojson.geometry)}},{key:"size",value:function(t){return L.area(this._geojson.geometry,t)}},{key:"distance",value:function(t,e){return this.contains(t)?0:me(Le(n.prototype),"distance",this).call(this,t,e)}},{key:"union",value:function(t,e){return se(this,Ae,Fe).call(this,oe().union,t,e)}},{key:"intersection",value:function(t,e){return se(this,Ae,Fe).call(this,oe().intersection,t,e)}},{key:"difference",value:function(t,e){return se(this,Ae,Fe).call(this,oe().difference,t,e)}},{key:"split",value:function(t,e){return[this.difference(t,e),this.intersection(t,e)]}}]),n}(Ce);function Fe(t,e,n){var r=t(this._geojson.geometry.coordinates,e._geojson.geometry.coordinates);return r?new ne({type:"Polygon",coordinates:r[0]},n):null}ne=Ie,longdo3.Polygon=Ie;var Ne=new WeakMap,De=new WeakSet,We=function(t){be(n,t);var e=xe(n);function n(t,r,o){var i;return pe(this,n),t.radius&&(o=r,r=t.radius),t.length&&(o=r,r=t[1]||o.radius||1,t=t[0]),(o=o||{}).fillColor=L.colorToRGBAArray(o.fillColor,100,null!=o.lineColor),null==o.pivot&&(o.pivot=function(t){return L.fromCoordinate(t.coordinates)}),le(ke(i=e.call(this,t,o)),De),_e(ke(i),Ne,{writable:!0,value:void 0}),se(ke(i),De,Be).call(ke(i),r||0),i}return ye(n,[{key:"location",value:function(t,e){if(t)return this.move(t,e);var n=L.fromCoordinate(this._geojson.geometry.coordinates);return n.radius=Ee(this,Ne),n}},{key:"move",value:function(t){return me(Le(n.prototype),"move",this).call(this,t),null!=t.radius&&se(this,De,Be).call(this,t.radius),this}},{key:"centroid",value:function(){return L.fromCoordinate(this._geojson.geometry.coordinates)}},{key:"bound",value:function(){var t=ae(this._geojson.geometry.coordinates,2),e=t[0],n=t[1];return{minLon:e-Ee(this,Ne),minLat:n-Ee(this,Ne),maxLon:e+Ee(this,Ne),maxLat:n+Ee(this,Ne)}}},{key:"size",value:function(t){var e=Math.PI*Math.pow(this._geojson.properties.radius,2);return L.formatAllArea(e,t)}},{key:"radius",value:function(t){return L.formatDistance(this._geojson.properties.radius,t)}}]),n}(Ce);function Be(t){Te(this,Ne,t);var e=this._geojson.geometry.coordinates[1];this._geojson.properties.radius=t*(L.longitudeLength(e)+L.latitudeLength(e))/2}longdo3.Circle=We,longdo3.Polycurve=function(){return ye((function t(){pe(this,t)}))}();var Ge=function(t){be(n,t);var e=xe(n);function n(t,r){var o;return pe(this,n),t.length&&(t=t[0]),null==(r=r||{}).pivot&&(r.pivot=function(t){return L.fromCoordinate(t.coordinates)}),(o=e.call(this,t,r))._geojson.properties.radius=0,o}return ye(n,[{key:"centroid",value:function(){return L.fromCoordinate(this._geojson.geometry.coordinates)}},{key:"size",value:function(t){return L.formatDistance(0,t)}}]),n}(Ce);longdo3.Dot=Ge;var Ze,ze,He,Ue,Ve=function(t){be(n,t);var e=xe(n);function n(t,r,o){var i;return pe(this,n),t.length?(i=t,o=r):t.minLon?(i=[{lon:t.minLon,lat:t.minLat},{lon:t.maxLon,lat:t.minLat},{lon:t.maxLon,lat:t.maxLat},{lon:t.minLon,lat:t.maxLat}],o=r):(r.width&&(r={lon:t.lon+r.width,lat:t.lat-r.height}),i=[t,{lon:r.lon,lat:t.lat},r,{lon:t.lon,lat:r.lat}]),e.call(this,i,o)}return ye(n,[{key:"divide",value:function(t,e,n){}}]),n}(Ie);function qe(t){return qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qe(t)}function $e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){c=!0,o=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||fn(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ye(t){return function(t){if(Array.isArray(t))return dn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||fn(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Je(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ke(t,e){for(var n=0;n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function fn(t,e){if(t){if("string"==typeof t)return dn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dn(t,e):void 0}}function dn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n').concat(t.hls_url?''):"",""),a&&l.playVideo(n)}}}var s=new Yt(L.stringToGeoPoint(t),i);s.type="c",s.data=t,o.push(s)};for(i.s();!(r=i.n()).done;)a()}catch(t){i.e(t)}finally{i.f()}this._vdo&&(e.Event.bind("popupClose",this.stopVideo.bind(this)),this._vdo=null),this.overlays=o},playVideo:function(t){var e=this;this._vdo=t.firstChild.firstChild,this._vdo.oncanplay=this._vdo.play;var n=this._vdo.getAttribute("data-video");this._vdo.canPlayType("application/vnd.apple.mpegurl")?this._vdo.src=n:window.Hls?Hls.isSupported()&&(this.hls=new Hls,this.hls.loadSource(n),this.hls.attachMedia(this._vdo)):L.loadScript("https://cdn.jsdelivr.net/npm/hls.js@1.5.4",(function(){e.playVideo(t)}))},stopVideo:function(t){var e,n;"c"==(null===(e=t._marker)||void 0===e?void 0:e.type)&&(null===(n=this._vdo)||void 0===n||n.pause(),this._vdo=null,this.hls&&(this.hls.stopLoad(),delete this.hls))}},events:{url:server.event+"/feed/json",popup:!0,refresh:180,theme:{icon:{size:{width:26,height:26}}},createOverlays:function(t,e){var n=this;this.items=t;var r,o={th:" โดย ",en:" by "},i=e.language(),a="th"==i,l=[],s=hn(t);try{var c=function(){var t=r.value,e="".concat(server.icon,"_event/").concat(t.icon),s={title:a?t.title:t.title_en||t.title,icon:sn({url:e+".png",urlHD:e+"-2x.png"},n.theme.icon),visibleRange:{min:t.showlevel-1,max:G}};n.popup&&(s.popup={title:s.title,loadDetail:function(e){e.innerHTML='
'.concat(L.formatDateTimeRange(t.start,t.stop,i),"
").concat(o[i]).concat(t.contributor,'
').concat(t.images?'
'):"").concat(a?t.description:t.description_en||t.description,"
")}});var c=new Yt(L.stringToGeoPoint(t),s);c.type="e",c.data=t,l.push(c)};for(s.s();!(r=s.n()).done;)c()}catch(t){s.e(t)}finally{s.f()}this.overlays=l}},aqi:{url:"https://air4thai.net/forweb/getAQI_JSON.php",popup:!0,theme:{icon:{size:{width:40,height:40}},color:[,"3bccff","92d050","ffff00","ffa200","f04646"],text:{th:[,"ดีมาก","ดี","ปานกลาง","เริ่มมีผลกระทบต่อสุขภาพ","มีผลกระทบต่อสุขภาพ"],en:[,"Excellent","Satisfactory","Moderate","Unhealthy","Very Unhealthy"]}},createOverlays:function(t,e){var n=this;this.items=t.stations;var r,o=e.language(),i="th"==o,l=[],s=hn(t.stations);try{var c=function(){var t=r.value,e=t.AQILast,s=e.date,c=e.time,u=e.AQI,h=n.theme.color[u.color_id],f=a.aqi.replace("{f}",h).replace("{v}",u.aqi),d={title:i?t.nameTH:t.nameEN,icon:sn({url:f},n.theme.icon)};n.popup&&(d.popup={title:d.title,loadDetail:function(e){e.innerHTML="
".concat(i?t.areaTH:t.areaEN,'
').concat(L.formatDate(s,o)," ").concat(c,'
').concat(this.theme.text[o][u.color_id],"
").concat(u.aqi,"
")}});var p=new Yt({lon:parseFloat(t.long),lat:parseFloat(t.lat)},d);p.type="c",l.push(p)};for(s.s();!(r=s.n()).done;)c()}catch(t){s.e(t)}finally{s.f()}this.overlays=l}},Object:(Ze=new WeakMap,ze=new WeakMap,He=new WeakSet,Ue=new WeakSet,function(){function t(e,n,r){Je(this,t),Qe(this,Ue),Qe(this,He),tn(this,Ze,{writable:!0,value:void 0}),tn(this,ze,{writable:!0,value:void 0}),on(this,Ze,n),on(this,ze,r=r||{}),this.url="".concat(server.object,"?mode=geojson&id=").concat(e.join?e.join(";"):e,"&dataset=").concat(n),this.popup=!0,r.simplify&&(this.url+="&simplify="+r.simplify),r.combine&&(this.url+="&combine="+r.combine),r.ignorefragment&&(this.url+="&ignorefragment="+r.ignorefragment)}return Xe(t,[{key:"createOverlays",value:function(t,e){var n=e.language(),r=n.startsWith("th");this.items=t.features||t;var o,i=[],a=hn(this.items);try{for(a.s();!(o=a.n()).done;){var l=o.value;if(l.geometry){var s=l.geometry.type.endsWith("gon")?Ie:Ce,c=l.properties,u=nn(this,He,vn).call(this,c.id,r?c.name_t:c.name_e,(r?c.desc_t:c.desc_e)||c.name_e,n);u.label===longdo3.ObjectLabel.Title&&(u.label=u.title),null==u.lineWidth&&c.linewidth&&(u.lineWidth=c.linewidth),void 0===u.lineColor&&(u.lineColor=c.linecolor?"#"+c.linecolor:nn(this,Ue,yn).call(this,c).concat(Me)),void 0===u.fillColor&&s==Ie&&(u.fillColor=c.fillcolor?"#"+c.fillcolor:nn(this,Ue,yn).call(this,c).concat(100)),null==u.pivot&&c.centerlong&&(u.pivot={lon:c.centerlong,lat:c.centerlat});var h=new s(l.geometry,u);h.type=rn(this,Ze),i.push(h)}else if("ooi_layer"==l.objecttype){var f,d=hn(l.linearray);try{for(d.s();!(f=d.n()).done;){var p=f.value,v={type:longdo3.LayerType.TMS,url:server.usertile,zoomRange:{min:7,max:G},bound:p.data},y=!1,g={};for(var m in rn(this,ze))"title"==m?(y=!0,g.title=!0===rn(this,ze).title?r?p.name_t:p.name_e:rn(this,ze).title):"detail"==m||"loadDetail"==m||"html"==m||"loadHtml"==m||"size"==m?(y=!0,g[m]=rn(this,ze)[m]):v[m]=rn(this,ze)[m];var b=p.myid,w=new Z("".concat(b[0],"/").concat(b[1]).concat(b[2],"/").concat(b[3]).concat(b[4],"/").concat(b[5]).concat(b[6],"/").concat(b[7]).concat(b[8]),v);if(w.type=rn(this,Ze),i.push(w),y){var x=new te({lon:p.centerlong,lat:p.centerlat},g);x.type=rn(this,Ze),i.push(x)}}}catch(t){d.e(t)}finally{d.f()}}else{var k=nn(this,He,vn).call(this,l.id,r?l.name:l.name_en,l.name_en,n);if(!k.icon||"big"==k.icon){var _=longdo3.MapTheme.tag.icon,S=_[l.iconimagefile]||_.default;"big"==k.icon&&(S.width=parseInt(1.75*S.width),S.height=parseInt(1.75*S.height));var E=longdo3.MapTheme.tag.svg?L.svgIcon:L.pngIcon;k.icon={url:E(l.iconimagefile),size:S}}var T=new Yt(l,k);T.type=rn(this,Ze),i.push(T)}}}catch(t){a.e(t)}finally{a.f()}this.overlays=i}}]),t}())};var gn=new WeakMap,mn=new WeakMap,bn=new WeakMap,wn=new WeakMap,xn=new WeakSet,kn=new WeakSet,Ln=function(){function t(e){var n,r,o;function i(){n&&(n._geojson.properties.pointer&&n._hidePointer(),e.Event.fire("overlayLeave",n),n=null)}function a(t){if(t.picked){var r,o,a=t.object.properties;if(a.title)null===(r=e.Ui.Tooltip)||void 0===r||r.set(a.title,t.x,t.y,500);if(a.clickable)null===(o=e.Ui.Cursor)||void 0===o||o.set("pointer");else if(a.draggable){var l;null===(l=e.Ui.Cursor)||void 0===l||l.set("move")}var s=t.object.object;s==n||"d"==s.type&&s.geometry==n||(i(),n=s,e.Event.fire("overlayHover",n)),a.pointer&&n._showPointer(t.coordinate,e.Renderer.getZoom())}else{var c,u;null===(c=e.Ui.Cursor)||void 0===c||c.set(""),null===(u=e.Ui.Tooltip)||void 0===u||u.set(),i()}}function l(t){var n;e._overlayClick=!0;var r=t.object,o=r.object,i=r.properties;e.Event._fireAsync("overlayClick",o),!i.clickable||null!==(n=o.popup())&&void 0!==n&&n.active()||setTimeout((function(){o.pop(!0,{type:"Point",coordinates:t.coordinate})}),0)}function s(t){var n;if(t.object.properties.draggable){var i=e.Renderer;return o=i.dragPan.isEnabled(),i.dragPan.disable(),i.__deck.tooltip.setTooltip(),r=t,null===(n=e.Ui.Cursor)||void 0===n||n.set("grabbing"),!0}r=null}function c(t){if(r&&t.coordinate){var n={lon:t.coordinate[0]-r.coordinate[0],lat:t.coordinate[1]-r.coordinate[1]},o=t.object.object;return o.shift(n),r=t,e.Event.fire("overlayDrag",o),!0}}function u(){var t;if(r){var n=r.object,i=n.object,a=n.properties;e.Event.fire("overlayDrop",i),r=null,o&&e.Renderer.dragPan.enable(),null===(t=e.Ui.Cursor)||void 0===t||t.set(a.clickable?"pointer":"move")}}Je(this,t),Qe(this,kn),Qe(this,xn),tn(this,gn,{writable:!0,value:void 0}),tn(this,mn,{writable:!0,value:[]}),tn(this,bn,{writable:!0,value:void 0}),tn(this,wn,{writable:!0,value:void 0}),on(this,gn,e),e.Event.bind("ready",function(){var t=this,n=e.Renderer,r=n.getZoom();this._geomLayer=new deck.MapboxLayer({id:"longdo-geom",type:deck.GeoJsonLayer,data:[],pickable:!0,parameters:{depthTest:!1},updateTriggers:{getFilterValue:[r]},getFillColor:function(t){return t.properties.fillColor},getLineColor:function(t){return t.properties.lineColor},getLineWidth:function(t){return t.properties.lineWidth},lineWidthUnits:"pixels",getPointRadius:function(t){return t.properties.radius},extensions:[new deck.DataFilterExtension({filterSize:2}),new deck.PathStyleExtension({dash:!0})],getFilterValue:function(t){return[t.properties.visibleMin,t.properties.visibleMax]},filterRange:[[B,r],[r,G]],getDashArray:function(t){return t.properties.lineStyle},dashJustified:!0,dashGapPickable:!0,onHover:a,onClick:l,onDragStart:s,onDrag:c,onDragEnd:u}),n.addLayer(this._geomLayer),this._markerLayer=new deck.MapboxLayer({id:"longdo-marker",type:deck.GeoJsonLayer,data:[],pointType:"icon",pickable:!0,parameters:{depthTest:!1},getIconSize:function(t){return t.properties.icon.height},getIconAngle:function(t){return-t.properties.rotate},getIconPixelOffset:function(t){return t.properties.icon.offset},extensions:[new deck.DataFilterExtension({filterSize:2})],getFilterValue:function(t){return[t.properties.visibleMin,t.properties.visibleMax]},filterRange:[[B,r],[r,G]],onHover:a,onClick:l,onDragStart:s,onDrag:c,onDragEnd:u}),n.addLayer(this._markerLayer),n.on("styledata",(function(e){for(var r=e.style._order,o=r.length-2;o>=0;--o){var i=r[o];if("custom"!=n.getLayer(i).type)break;if("longdo-geom"==i)return}n.getLayer(t._geomLayer.id)&&n.removeLayer(t._geomLayer.id),n.getLayer(t._markerLayer.id)&&n.removeLayer(t._markerLayer.id),n.addLayer(t._geomLayer).addLayer(t._markerLayer)})).on("zoomend",(function(){var e=t._geomLayer.props,r=t._markerLayer.props;e.filterRange[0][1]=e.filterRange[1][0]=r.filterRange[0][1]=r.filterRange[1][0]=n.getZoom(),t._geomLayer.setProps(e),t._markerLayer.setProps(r)}))}.bind(this)).bind("zoom",nn(this,kn,Sn).bind(this))}return Xe(t,[{key:"_closePopup",value:function(t){t==rn(this,bn)&&(on(this,bn,void 0),rn(this,gn).Event.fire("popupClose",t),delete t.collection)}},{key:"_updateOverlay",value:function(t){var e=t instanceof Yt?this._markerLayer:this._geomLayer;e.setProps({data:Ye(e.props.data)}),this._fireUpdate(t)}},{key:"_fireUpdate",value:function(t){rn(this,gn).Event.fire("overlayUpdate",t)}},{key:"add",value:function(t){if(!(t instanceof Zt))throw new Error("Not overlay");if(!t.active()){t.collection=this,t._add(rn(this,gn))&&(t._setVisibility(rn(this,gn).zoom()),rn(this,mn).push(t)),rn(this,gn).Event._fireAsync("overlayChange",t);var e=t._geojson.properties.label;e&&this.add(e)}return t instanceof te&&t!=rn(this,bn)&&(this.remove(rn(this,bn)),on(this,bn,t)),this}},{key:"remove",value:function(t){if(!(t instanceof Zt))return this;if(t.collection==this){t._remove()&&on(this,mn,rn(this,mn).filter((function(e){return e!=t}))),delete t.collection,rn(this,gn).Event.fire("overlayChange",t);var e=t._geojson.properties.label;e&&this.remove(e)}return this}},{key:"load",value:function(t){var e=this,n=t instanceof longdo3.Overlays.Object?"&key="+apikey:"";return L.getJson(t.url+n).then((function(n){t.overlays&&e.unload(t),t.createOverlays(n,rn(e,gn));var r,o=hn(t.overlays);try{for(o.s();!(r=o.n()).done;){var i=r.value;i instanceof Z?rn(e,gn).Layers.add(i):e.add(i)}}catch(t){o.e(t)}finally{o.f()}t.refresh&&(t.timeout=setTimeout(e.load.bind(e),1e3*t.refresh,t)),rn(e,gn).Event.fire("overlayLoad",n)})),this}},{key:"unload",value:function(t){if(!t.overlays)return this;clearTimeout(t.timeout);var e,n=hn(t.overlays);try{for(n.s();!(e=n.n()).done;){var r=e.value;r instanceof Z?rn(this,gn).Layers.remove(r):this.remove(r)}}catch(t){n.e(t)}finally{n.f()}return delete t.items,delete t.overlays,this}},{key:"clear",value:function(){if(this.size()&&rn(this,gn).Event._fireAsync("overlayChange"),nn(this,xn,_n).call(this,this._geomLayer),nn(this,xn,_n).call(this,this._markerLayer),rn(this,mn).length){var t,e=hn(rn(this,mn));try{for(e.s();!(t=e.n()).done;){var n=t.value;n._remove(),delete n.collection}}catch(t){e.e(t)}finally{e.f()}on(this,mn,[])}return rn(this,bn)&&rn(this,bn)._remove(),this}},{key:"list",value:function(){var t=this._geomLayer.props.data.map((function(t){return t.object})).concat(this._markerLayer.props.data.map((function(t){return t.object}))).concat(rn(this,mn));return rn(this,bn)?t.concat(rn(this,bn)):t}},{key:"size",value:function(){var t=this._geomLayer.props.data.length+this._markerLayer.props.data.length+rn(this,mn).length;return rn(this,bn)?t+1:t}},{key:"floorPlan",value:function(t){}},{key:"drop",value:function(t){var e=(null==t?void 0:t._geojson).properties;if(e&&e.icon){var n=rn(this,gn).bound(),r=(n.maxLon-n.minLon)/20,o=(n.maxLat-n.minLat)/20,a=$e(t._geojson.geometry.coordinates,2),l=a[0],s=a[1];if(!i.isPointInRect(l,s,n.minLon-r,n.minLat-o,n.maxLon+r,n.maxLat+o))return void this.add(t);var c=parseInt(rn(this,gn).placeholder().offsetHeight/50)+1;e.icon.offset[1]-=50*c,this.add(t);var u=document.timeline.currentTime;function h(n){if(n-u>16){if(u=n,!c--)return;e.icon.offset[1]+=50,t.update({icon:e.icon})}requestAnimationFrame(h)}requestAnimationFrame(h)}}},{key:"bounce",value:function(t){var e;if(rn(this,wn)!=t){null===(e=rn(this,wn))||void 0===e||delete e._geojson.properties.bounce,on(this,wn,t);var n=null==t?void 0:t._geojson.properties;if(n&&n.icon){n.bounce=!0;var r=-1,o=0,i=document.timeline.currentTime;function a(e){e-i>16&&(i=e,n.icon.offset[1]+=r,t.update({icon:n.icon}),++o>20&&(o=0,-1==(r=-r)&&!n.bounce))||requestAnimationFrame(a)}requestAnimationFrame(a)}return this}}},{key:"enableAutoClosePopup",value:function(t){return null==t||this}},{key:"enableAutoFocusPopup",value:function(t){return null==t||this}},{key:"enableFloorPlan",value:function(t){}},{key:"enableEditGuide",value:function(t){}},{key:"lastOpenPopup",value:function(){return rn(this,bn)}},{key:"pathAnimation",value:function(t,e,n){var r=rn(this,gn).Event;n=n||1/(2<=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),M(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;M(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:j(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}function On(t,e,n,r,o,i,a){try{var l=t[i](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,o)}function Mn(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){On(i,r,o,a,l,"next",t)}function l(t){On(i,r,o,a,l,"throw",t)}a(void 0)}))}}function Pn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function jn(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function An(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0?Jn(this,vr):Jn(this,yr)>=0?Jn(this,yr)+((null===(t=Jn(this,fr).button)||void 0===t?void 0:t.length)||0):-1}},{key:"dropdownLabel",get:function(){var t;return null===(t=Jn(this,dr))||void 0===t?void 0:t.firstChild.nodeValue},set:function(t){Jn(this,dr)&&(Jn(this,dr).firstChild.nodeValue=t)}},{key:"onAdd",value:function(t){if(Kn(this,hr,t),this._container=document.createElement("div"),this._container.className="maplibregl-ctrl maplibregl-ctrl-group ldmap-menubar",Jn(this,fr).button)for(var e,n=0;e=Jn(this,fr).button[n];++n)e.value||(e.value=e.label),e.element=L.append(this._container,"div",{className:"ldmap-button",innerHTML:e.label,index:n}),e.element.addEventListener("click",Fn(this,mr,Tr).bind(this));if(Jn(this,fr).dropdown){Jn(this,fr).dropdownLabel||(Jn(this,fr).dropdownLabel="• • •"),Kn(this,dr,L.append(this._container,"div",{className:"ldmap-dropdown",innerHTML:Jn(this,fr).dropdownLabel})),Jn(this,dr).addEventListener("click",Fn(this,xr,Pr).bind(this)),Jn(this,dr).addEventListener("mouseover",Fn(this,Sr,Ar).bind(this)),Jn(this,dr).addEventListener("mouseout",Fn(this,_r,Cr).bind(this)),L.append(Jn(this,dr),"span",{className:"ldmap-arrow",textContent:"◢"}),Kn(this,pr,L.append(Jn(this,dr),"div",{className:"ldmap-dropdown-body",onmouseover:Fn(this,Sr,Ar).bind(this)})),Jn(this,pr).addEventListener("mouseout",Fn(this,_r,Cr).bind(this)),Jn(this,pr).style.maxHeight="0px";for(var r,o=0;r=Jn(this,fr).dropdown[o];++o)r.type!=longdo3.ButtonType.Group?r.type!=longdo3.ButtonType.Custom?(r.value||(r.value=r.label),r.element=L.append(Jn(this,pr),"div",{className:"ldmap-option",innerHTML:r.label,index:o}),r.element.addEventListener("click",Fn(this,br,Or).bind(this))):r.element=L.append(Jn(this,pr),"div",{innerHTML:r.label}):r.element=L.append(Jn(this,pr),"div",{className:"ldmap-group",innerHTML:r.label})}return this._container}},{key:"selectIndex",value:function(t){var e;if(t<0)Fn(this,wr,Mr).call(this);else if(t<(null===(e=Jn(this,fr).button)||void 0===e?void 0:e.length))Fn(this,mr,Tr).call(this,{target:Jn(this,fr).button[t].element});else if(Jn(this,fr).dropdown){var n;Fn(this,br,Or).call(this,{target:Jn(this,fr).dropdown[t-((null===(n=Jn(this,fr).button)||void 0===n?void 0:n.length)||0)].element})}return this}}]),n}(lr);function Tr(t){var e,n,r=Fn(this,wr,Mr).call(this);Kn(this,vr,t.target.index);var o=Jn(this,fr).button[Jn(this,vr)];switch(o.type){case longdo3.ButtonType.Toggle:r==o?(Kn(this,vr,-1),o=null):t.target.classList.add("ldmap-item-active");break;case longdo3.ButtonType.Push:t.target.classList.add("ldmap-item-active"),setTimeout((function(){return t.target.classList.remove("ldmap-item-active")}),100),Kn(this,vr,-1);break;case longdo3.ButtonType.Reset:Kn(this,vr,-1),o=null;break;default:t.target.classList.add("ldmap-item-active")}null===(e=(n=Jn(this,fr)).change)||void 0===e||e.call(n,o,r)}function Or(t){var e,n,r=Fn(this,wr,Mr).call(this);Kn(this,yr,t.target.index);var o=Jn(this,fr).dropdown[Jn(this,yr)];o.type==longdo3.ButtonType.Reset?(Kn(this,yr,-1),this.dropdownLabel=Jn(this,fr).dropdownLabel,Jn(this,dr).classList.remove("ldmap-item-active"),o=null):(this.dropdownLabel=o.label,Jn(this,dr).classList.add("ldmap-item-active"),t.target.classList.add("ldmap-option-active")),null===(e=(n=Jn(this,fr)).change)||void 0===e||e.call(n,o,r)}function Mr(){if(Jn(this,vr)>=0){var t=Jn(this,fr).button[Jn(this,vr)];return Kn(this,vr,-1),t.element.classList.remove("ldmap-item-active"),t}if(Jn(this,yr)>=0){var e=Jn(this,fr).dropdown[Jn(this,yr)];return Kn(this,yr,-1),this.dropdownLabel=Jn(this,fr).dropdownLabel,Jn(this,dr).classList.remove("ldmap-item-active"),e.element.classList.remove("ldmap-option-active"),e}return null}function Pr(){"0px"!=Jn(this,pr).style.maxHeight?Fn(this,Lr,Rr).call(this):Fn(this,kr,jr).call(this)}function jr(){Jn(this,dr).classList.add("ldmap-dropdown-open"),Jn(this,pr).style.maxHeight=Math.max(Jn(this,hr).getContainer().offsetHeight-Jn(this,pr).offsetTop-er,nr)+"px"}function Rr(){Jn(this,dr).classList.remove("ldmap-dropdown-open"),Jn(this,pr).style.maxHeight="0px"}function Cr(t){var e,n=null===(e=t.relatedTarget)||void 0===e?void 0:e.className;"ldmap-option"!=n&&"ldmap-group"!=n&&(Fn(this,Sr,Ar).call(this),Kn(this,gr,setTimeout(Fn(this,Lr,Rr).bind(this),1e3)))}function Ar(){Jn(this,gr)&&(clearTimeout(Jn(this,gr)),Kn(this,gr,void 0))}longdo3.MenuBar=Er;var Ir=new WeakMap,Fr=new WeakMap,Nr=new WeakMap,Dr=new WeakMap,Wr=new WeakMap,Br=new WeakSet,Gr=new WeakSet,Zr=function(t){Dn(n,t);var e=Bn(n);function n(t){var r;return Hn(this,n),In(Zn(r=e.call(this)),Gr),In(Zn(r),Br),$n(Zn(r),Ir,{writable:!0,value:void 0}),$n(Zn(r),Fr,{writable:!0,value:void 0}),$n(Zn(r),Nr,{writable:!0,value:void 0}),$n(Zn(r),Dr,{writable:!0,value:void 0}),$n(Zn(r),Wr,{writable:!0,value:void 0}),Kn(Zn(r),Ir,(null==t?void 0:t.tag)||tr),Kn(Zn(r),Fr,null==t?void 0:t.language),r}return Vn(n,[{key:"onAdd",value:function(t){if(!Jn(this,Dr)){var e=t.__longdo;Jn(this,Fr)||Kn(this,Fr,e.language()),Kn(this,Nr,ir.tagPanelLabel[Jn(this,Fr)]),Kn(this,Dr,new longdo3.MenuBar({dropdown:[],dropdownLabel:''.concat(Jn(this,Nr).title,"")})),Jn(this,Dr).onAdd(t),this._container=Jn(this,Dr)._container,this._container.classList.add("ldmap-tagpanel");var n,r=this._container.firstChild,o=r.firstChild,i=Cn(Jn(this,Ir));try{for(i.s();!(n=i.n()).done;){var a=n.value;L.append(o,"img",{src:"".concat(server.icon,"_svg/").concat(a,".svg"),title:L.capFirst(a),alt:a}).addEventListener("click",(function(t){e.Tags.set(t.target.title),t.stopPropagation()}))}}catch(t){i.e(t)}finally{i.f()}Fn(this,Br,zr).call(this,e,r.lastChild)}return this._container}}]),n}(lr);function zr(t,e){return Hr.apply(this,arguments)}function Hr(){return(Hr=Mn(Tn().mark((function t(e,n){var r,o,i,a,l,s,c,u,h,f,d,p,v;return Tn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r="category_name_"+Jn(this,Fr),o="th"==Jn(this,Fr)?"name":"name_en",t.next=4,L.getJson("".concat(server.longdo,"/ws/tag/category/list"));case 4:i=t.sent,a=L.append(n,"div"),l=0,s=Cn(i.data),t.prev=8,s.s();case 10:if((c=s.n()).done){t.next=35;break}u=c.value,4==++l&&((a=L.append(n,"div")).style.display="none",Kn(this,Wr,a),L.append(n,"div",{className:"ldmap-morecategory",innerHTML:Jn(this,Nr).more}).addEventListener("click",Fn(this,Gr,Ur).bind(this))),L.append(a,"div",{className:"ldmap-tagcategory-title",innerHTML:u[r]}),h=Cn(u.icons),t.prev=15,h.s();case 17:if((f=h.n()).done){t.next=25;break}if(d=f.value,p=d[o]){t.next=22;break}return t.abrupt("continue",23);case 22:L.append(a,"img",{src:d.imagefile.replace("_2x","_svg").replace(".png",".svg").replace("/blank.svg","/greydot.svg"),title:p,alt:d.tag}).addEventListener("click",(function(t){return e.Tags.set(t.target.alt)}));case 23:t.next=17;break;case 25:t.next=30;break;case 27:t.prev=27,t.t0=t.catch(15),h.e(t.t0);case 30:return t.prev=30,h.f(),t.finish(30);case 33:t.next=10;break;case 35:t.next=40;break;case 37:t.prev=37,t.t1=t.catch(8),s.e(t.t1);case 40:return t.prev=40,s.f(),t.finish(40);case 43:v=L.append(n,"div",{className:"ldmap-command"}),L.append(v,"span",{className:"ldmap-link",innerHTML:Jn(this,Nr).clear}).addEventListener("click",e.Tags.clear.bind(e.Tags));case 45:case"end":return t.stop()}}),t,this,[[8,37,40,43],[15,27,30,33]])})))).apply(this,arguments)}function Ur(t){t.stopPropagation(),"block"==Jn(this,Wr).style.display?(Jn(this,Wr).style.display="none",t.target.innerHTML=Jn(this,Nr).more):(Jn(this,Wr).style.display="block",t.target.innerHTML=Jn(this,Nr).less),console.log(Jn(this,Wr))}longdo3.TagPanel=Zr;var Vr=new WeakMap,qr=new WeakMap,$r=new WeakMap,Yr=new WeakMap,Jr=new WeakMap,Kr=new WeakSet,Xr=new WeakSet,Qr=function(t){Dn(n,t);var e=Bn(n);function n(t,r){var o;Hn(this,n),In(Zn(o=e.call(this)),Xr),In(Zn(o),Kr),$n(Zn(o),Vr,{writable:!0,value:void 0}),$n(Zn(o),qr,{writable:!0,value:void 0}),$n(Zn(o),$r,{writable:!0,value:"th"}),$n(Zn(o),Yr,{writable:!0,value:void 0}),$n(Zn(o),Jr,{writable:!0,value:!1}),Kn(Zn(o),Vr,t),Kn(Zn(o),qr,{button:[],change:Fn(Zn(o),Kr,to).bind(Zn(o))});var i,a=ir.layerSelectorOptions[Jn(Zn(o),$r)],l=a.button,s=a.dropdown,c=a.more,u=Cn(l);try{for(u.s();!(i=u.n()).done;){var h=i.value;Jn(Zn(o),qr).button.push(jn({},h))}}catch(t){u.e(t)}finally{u.f()}if(r)return Gn(o);Object.assign(Jn(Zn(o),qr),{dropdown:[],dropdownLabel:c});var f,d=Cn(s);try{for(d.s();!(f=d.n()).done;){var p=f.value;Jn(Zn(o),qr).dropdown.push(jn({},p))}}catch(t){d.e(t)}finally{d.f()}return o}return Vn(n,[{key:"onAdd",value:function(t){return Jn(this,Yr)||(Kn(this,Yr,new longdo3.MenuBar(Jn(this,qr))),Jn(this,Yr).onAdd(t),Jn(this,Vr).Event.bind("layerChange",Fn(this,Xr,eo).bind(this)),Fn(this,Xr,eo).call(this),this._container=Jn(this,Yr)._container),this._container}},{key:"language",value:function(t){if(null==t)return Jn(this,$r);Kn(this,$r,t.startsWith("th")?"th":"en");var e=ir.layerSelectorOptions[Jn(this,$r)],n=e.button,r=e.dropdown,o=e.more,i=Jn(this,Yr).selectedIndex;Jn(this,Yr).dropdownLabel=i
'.concat(Jn(this,so)?v:"",'
').concat(c,', ').concat(u,"
"),className:"ldmap-contextmenu"},t.x,t.y);var h=s.el.children[2];h.firstChild.addEventListener("click",(function(){return Fn(r,po,wo).call(r,"".concat(c,", ").concat(u))})),h.children[1].addEventListener("click",(function(){return Fn(r,po,wo).call(r,"".concat(u,", ").concat(c))}));var f=parseInt(i.getZoom());Jn(this,so)&&l.address(e,jn({limit:f<12?"&noaoi=fast&nowater="+(f<7?"":"fast"):""},ir.contextAddressOptions)).then(Fn(this,co,yo).bind(this)),Jn(this,lo)&&f>=12&&server.poi&&l.nearPoi(e,jn({span:.01/(f-11),zoom:f+2,limit:5},ir.contextNearPoiOptions)).then(Fn(this,uo,go).bind(this));var d=document.createElement("div");if(d.className="ldmap-contextmenu_extra",!a.fire("beforeContextmenu",{location:e,add:function(t){t instanceof Element?d.appendChild(t):d.innerHTML+=t}}))return this;d.children.length&&s.el.appendChild(d),Fn(this,fo,bo).call(this),a.fire("contextmenu")}else s.setTooltip();return this}},{key:"enableNearPoi",value:function(t){return null==t?Jn(this,lo):(Kn(this,lo,t),this)}},{key:"enableAddress",value:function(t){return null==t?Jn(this,so):(Kn(this,so,t),this)}}]),t}();function yo(t){var e=Jn(this,io).Renderer.__deck.tooltip.el.children;if(t&&isNaN(t.geocode)){var n="";t.country&&(t.province&&(t.district&&(t.subdistrict&&(n=t.subdistrict+", "),n+=t.district+", "),n+=t.province+", "),t.geocode?n=n.substring(0,n.length-2):n+=t.country),e[1].textContent=n}else if(t&&!t.error){var r,o,i,a,l=Jn(this,io).Search.language();"th"==l?(r=" ",o=t.house_num?t.house_num+" ":"",i="",a=t.moo?"หมู่ที่ "+t.moo+r:""):(r=", ",o="",i=t.house_num?t.house_num+" ":"",a=t.moo?"Moo "+t.moo+r:""),e[1].textContent="".concat(o).concat(t.aoi?t.aoi+r:"").concat(i).concat(t.water?t.water+r:t.road?t.road+r:t.express?t.express+r:"").concat(a).concat(t.subdistrict).concat(r).concat(t.district).concat(r).concat(t.province).concat(t.postcode?" "+t.postcode:""),t.elevation&&(e[2].lastChild.textContent=ir.contextLabel[l].msl+t.elevation.toLocaleString()+w[l].m)}else L.empty(e[1]);Fn(this,fo,bo).call(this)}function go(t){var e=this;if(t.data.length){var n,r=document.createDocumentFragment(),o=Cn(t.data);try{var i=function(){var t=n.value,o=L.append(r,"div",{className:"ldmap-contextmenu_poi"});L.append(o,"img",{src:L.svgIcon(L.unblankIcon(t.icon)),alt:""}),L.append(o,"span",{id:t.id,className:"ldmap-contextmenu_poi ldmap-link",textContent:t.name}).addEventListener("click",(function(){return Fn(e,ho,mo).call(e,t)}))};for(o.s();!(n=o.n()).done;)i()}catch(t){o.e(t)}finally{o.f()}L.append(r,"hr"),L.empty(Jn(this,io).Renderer.__deck.tooltip.el.firstChild).appendChild(r),Fn(this,fo,bo).call(this)}}function mo(t){var e=this,n=Jn(this,io).Search.language(),r=new te(t,L.poiPopupOptions(server.poi,t.id,t.name,n));setTimeout((function(){return Jn(e,io).Overlays.add(r)}),0)}function bo(){var t,e=Jn(this,io).placeholder(),n=e.offsetWidth,r=e.offsetHeight,o=(null===(t=Jn(this,io).Renderer.__deck)||void 0===t?void 0:t.tooltip).el;o.style.left=(Jn(this,ao).x+o.offsetWidth+rr>n?-o.offsetWidth:0)+"px",o.style.top=(Jn(this,ao).y+o.offsetHeight+or>r?-o.offsetHeight:0)+"px"}function wo(t){return xo.apply(this,arguments)}function xo(){return(xo=Mn(Tn().mark((function t(e){var n,r,o;return Tn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=ir.contextLabel[Jn(this,io).Ui.language()],!navigator.clipboard){t.next=7;break}return t.next=4,navigator.clipboard.writeText(e);case 4:null===(r=Jn(this,io).Ui.Toast)||void 0===r||r.set(n.clipboardToast.replace("{s}",e)),t.next=8;break;case 7:null===(o=Jn(this,io).Ui.Toast)||void 0===o||o.set(n.clipboardError);case 8:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}var ko=new WeakMap,Lo=function(){function t(e){Hn(this,t),$n(this,ko,{writable:!0,value:void 0}),Kn(this,ko,L.append(e.placeholder(),"div",{className:"ldmap-toast"}))}return Vn(t,[{key:"set",value:function(t){var e=this;return Jn(this,ko).innerHTML=t,Jn(this,ko).style.bottom=0,setTimeout((function(){Jn(e,ko).style.bottom="-30px"}),2e3),this}}]),t}();function _o(t){return _o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_o(t)}function So(t,e){for(var n=0;n33&&(r=t,o.setZoom(o.getZoom()+e)),n||requestAnimationFrame(i)}function a(){n=!1,r=document.timeline.currentTime+200,requestAnimationFrame(i)}function l(){n=!0}t.addEventListener("mousedown",a),t.addEventListener("touchstart",a),document.addEventListener("mouseup",l),document.addEventListener("touchend",l)}function Do(t){return Do="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Do(t)}function Wo(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Bo(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bo(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Bo(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),M(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;M(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:j(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}function Zo(t,e,n,r,o,i,a){try{var l=t[i](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,o)}function zo(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Zo(i,r,o,a,l,"next",t)}function l(t){Zo(i,r,o,a,l,"throw",t)}a(void 0)}))}}function Ho(t,e){for(var n=0;n'):a["search"+i]||a.searchZ,s=L.append(r,"li",{id:Jo(e,ri)+n,className:"ldsearch-item",innerHTML:l});if("T"!=i&&L.append(s,"img",{className:"ldsearch-zoom",src:a.searchZoom,alt:"",title:Jo(e,ei).zoom}),s.innerHTML+="".concat(t.name,'
').concat(t.address||" ","
"),s.addEventListener("click",$o(e,hi,yi).bind(e)),Jo(e,oi).push(t),!1===Jo(e,ii).icon||"T"==i||("G"==i||"K"==i||"W"==i||"X"==i)&&Xo.showRegion||"L"==i&&Xo.showRoad||"Y"==i&&Xo.showLayer)return 1;u.push(L.toCoordinate(t)),t.marker=new longdo3.Marker(t,Jo(e,li)?{title:t.name,detail:" ",icon:Jo(e,ii).icon,loadDetail:function(n){return n.appendChild(L.formatPoi(t,Jo(e,ti)))}}:{title:t.name,clickable:!0}),t.marker.type="s",Jo(e,Qo).Overlays.add(t.marker)},f=0;c=t.data[f];++f)h(c);o||(L.empty(Jo(this,ni)).appendChild(n),u.length&&Jo(this,Qo).bound(i.locationBound({type:"LineString",coordinates:u}),{maxZoom:Xo.zoomResult}))}}function yi(t){var e=Jo(this,oi)[t.currentTarget.id.substring(Jo(this,ri).length)],n=e.id[0];if("T"!=n){var r=Jo(this,Qo).Renderer,o={center:e};if("ldsearch-zoom"==t.target.className&&r.getZoom()>t,b.height=w.height>>t,i(x)},w.src=m,s=!0}}}Ti(this,Fi)[t]=l;var x=Ti(this,Ni)[l];if(x)x.props.tags.push(e),i=function(t){return t.setProps({data:Ei(o,Gi,qi).call(o,t.props)})};else{var k=Ti(this,Ii),_=k.Renderer,S=k.Event,E=k.Overlays,T=function(t){return Ti(o,Di)&&S.fire("beforeTagPopup",t)&&setTimeout((function(){return E.add(new longdo3.Popup(t,L.poiPopupOptions(a,t.id,t.name,Ti(o,Ai))))}),0)},O=e.label?Ei(this,Wi,Ui).call(this,l,T,e):null;x=Ei(this,Bi,Vi).call(this,l,a,c+1,u+1,T,e),O&&(x.label=O),Ti(this,Ni)[l]=x,i=function(t){return _.addLayer(t)}}return s||i(x),this}},{key:"remove",value:function(t){if("string"==typeof t&&t.includes("|"))return t.split("|").forEach(this.remove),this;var e=Ti(this,Fi)[t];if(e){var n=Ti(this,Ni)[e];if(1==n.props.tags.length)Ei(this,zi,Yi).call(this,n),delete Ti(this,Ni)[e];else{for(var r in n.props.objects)Ti(this,Ii).Overlays.unload(n.props.objects[r]);n.props.objects={},n.props.tags=n.props.tags.filter((function(e){return e.tag!=t})),n.setProps({data:Ei(this,Gi,qi).call(this,n.props)})}delete Ti(this,Fi)[t]}return this}},{key:"clear",value:function(){for(var t in Ti(this,Ni))Ei(this,zi,Yi).call(this,Ti(this,Ni)[t]);return Oi(this,Fi,{}),Oi(this,Ni,{}),this}},{key:"list",value:function(){return Object.keys(Ti(this,Fi))}},{key:"size",value:function(){return this.list().length}},{key:"enablePopup",value:function(t){return null==t?Ti(this,Di):(Oi(this,Di,t),this)}}],n&&xi(e.prototype,n),r&&xi(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ui(t,e,n){var r=this,o=Ti(this,Ii),i=o.Ui,a=o.Renderer,l={source:{type:"geojson",data:{type:"FeatureCollection",features:[]}},layer:{id:t+"-label",type:"symbol",source:t,minzoom:n.label.min,maxzoom:n.label.max+1,filter:["<=",["to-number",["get","zoom"]],["zoom"]],layout:{"text-field":["get","name"],"text-font":["OCJ"],"text-size":12,"text-anchor":["get","anchor"],"text-offset":[1,0],"text-justify":"auto","symbol-sort-key":["get","label"]},paint:Ci.labelPaint},event:{mouseenter:function(){var t;return Ti(r,Di)&&(null===(t=i.Cursor)||void 0===t?void 0:t.set("pointer"))},mouseleave:function(){var t;return null===(t=i.Cursor)||void 0===t?void 0:t.set("")},click:function(t){o._overlayClick=!0,e(t.features[0].properties)}}};return a.addSource(t,l.source).addLayer(l.layer).on("mouseenter",l.layer.id,l.event.mouseenter).on("mouseleave",l.layer.id,l.event.mouseleave).on("click",l.layer.id,l.event.click),l}function Vi(t,e,n,r,o,i){var a=this,l=Ti(this,Ii),s=l.Ui,c=l.Renderer,u={id:t,type:deck.TileLayer,minZoom:n,maxZoom:r,zoomOffset:1,renderSubLayers:function(t){return t.data?t.tags[0].type?new deck.GeoJsonLayer(bi({id:t.id,data:t.data},t.tags[0])):new deck.IconLayer({id:t.id,data:t.data.data,pickable:!0,parameters:{depthTest:!1},getSize:function(t){return Ei(a,Zi,$i).call(a,t,!0)},getPosition:function(e){if(Ci.loadObject){var n=e.id[0];if("G"==n||"Y"==n){if(!t.objects[e.id]){var r=new longdo3.Overlays.Object(e.id,"LONGDO");t.objects[e.id]=r,l.Overlays.load(r)}return}}var o=L.toCoordinate(e);if(e.label){var i=t.label._data;i.features.push({type:"Feature",geometry:{type:"Point",coordinates:o},properties:bi(bi({},e),{},{zoom:t.tile.zoom-1,label:-e.label,anchor:"blank.png"==e.icon?"center":"left"})}),t.label.setData(i)}return o},getIcon:function(t){return Ei(a,Zi,$i).call(a,t)}}):null},source:e,tags:[i],label:c.getSource(t),objects:{},onHover:function(t){if(t.picked){var e,n;if(Ti(a,Di))null===(n=s.Cursor)||void 0===n||n.set("pointer");null===(e=s.Tooltip)||void 0===e||e.set(t.object.name,t.x,t.y,500)}else{var r,o;null===(r=s.Cursor)||void 0===r||r.set(""),null===(o=s.Tooltip)||void 0===o||o.set()}},onClick:function(t){l._overlayClick=!0,o(t.object)}};return"function"==typeof e?u.getTileData=e:i.type?u.getTileData=i.type==longdo3.TagType.WFS?function(t){var e=t.bbox,n=e.west,r=e.south,o=e.east,a=e.north;return L.getJson("".concat(i.source,"?service=WFS&request=GetFeature&version=2.0.0&typeNames=").concat(i.name,"&srsName=EPSG:4326&bbox=").concat(n,",").concat(r,",").concat(o,",").concat(a,",EPSG:4326&outputFormat=").concat(i.outputFormat||"json","&").concat(i.extraQuery||"maxFeatures=1000"))}:i.type==longdo3.TagType.OGC?function(t){var e=t.bbox,n=e.west,r=e.south,o=e.east,a=e.north;return L.getJson("".concat(i.source,"/collections/").concat(i.name,"/items?f=json&bbox=").concat(n,",").concat(r,",").concat(o,",").concat(a,"&").concat(i.extraQuery||""))}:null:u.data=Ei(this,Gi,qi).call(this,u),new deck.MapboxLayer(u)}function qi(t){for(var e="".concat(t.source,"/cluster/{z}/{x}/{y}/").concat(Ti(this,Ai),"?key=").concat(apikey),n=0;n=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),M(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;M(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:j(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}function Xi(t,e,n,r,o,i,a){try{var l=t[i](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,o)}function Qi(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Xi(i,r,o,a,l,"next",t)}function l(t){Xi(i,r,o,a,l,"throw",t)}a(void 0)}))}}function ta(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ea(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function oa(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&ua(this,Va,wl).call(this,n-1),ua(this,$a,kl).call(this,n),this}},{key:"insert",value:function(t,e,n){return t=L.bound(+t,0,fa(this,ja).length),fa(this,ja).splice(t,0,ua(this,Ha,gl).call(this,t,e)),n&&(fa(this,ja)[t].routeMode=n),ua(this,Va,wl).call(this,t+1),ua(this,Ya,Ll).call(this,t),this}},{key:"remove",value:function(t){var e=fa(this,ja).indexOf(t);return e>=0&&this.removeAt(e),this}},{key:"removeAt",value:function(t){return fa(this,ma).Overlays.remove(fa(this,ja)[t]),fa(this,ja).splice(t,1),ua(this,Va,wl).call(this,t?t-1:0),ua(this,Ja,_l).call(this,t),this}},{key:"clearDestination",value:function(){var t,e=ra(fa(this,ja));try{for(e.s();!(t=e.n()).done;){var n=t.value;fa(this,ma).Overlays.remove(n)}}catch(t){e.e(t)}finally{e.f()}return ha(this,ja,[]),this}},{key:"clearPath",value:function(){for(var t=0;tpa?''.concat(L.formatDistance(a.data.fdistance,fa(this,ba))).concat(e.fromroad,""):"").concat(e.depart,'').concat(fa(this,ja)[0].poi||fa(this,wa).origin,"")}).addEventListener("click",ua(this,Ba,dl).bind(this));for(var l,s=0,c=0,u=0;l=fa(this,Ra)[u];++u)if(l.guide){for(var h,f=l.guide.length-1,d=0;h=l.guide[d];++d)if(!(d&&d30?''.concat(h.turn<10?L.formatDistance(h.distance,fa(this,ba)):L.formatInterval(h.interval,fa(this,ba)),"").concat(fa(this,wa).turn[h.turn],' ').concat(h.name,""):h.name)});p.addEventListener("mouseover",ua(this,Ga,pl).bind(this)),p.addEventListener("mouseout",ua(this,Za,vl).bind(this)),p.addEventListener("click",ua(this,za,yl).bind(this))}L.append(i,"li",{id:"".concat(fa(this,La),"d").concat(u+1),className:"ldroute-item ldroute-dest",innerHTML:"".concat(n[9]," ").concat(l.data.tdistance>pa?''.concat(L.formatDistance(l.data.tdistance,fa(this,ba))).concat(e.fromroad,""):"").concat(e.arrive,'').concat(fa(this,ja)[u+1].poi||fa(this,wa).dest+(u+1),"")}).addEventListener("click",ua(this,Ba,dl).bind(this)),s+=l.data.distance,c+=l.data.interval}var v=">"+L.formatInterval(c,fa(this,ba)),y=a.meta.config[0];return y!=longdo3.RouteMode.Cost&&y!=longdo3.RouteMode.Distance||(v=' title="'.concat(fa(this,wa).intervalTip,'"').concat(v,"*")),o.innerHTML=''.concat(L.formatDistance(s,fa(this,ba)),'"),r}},{key:"exportRouteLine",value:function(t){var e,n=[],r=ra(fa(this,Ra));try{for(r.s();!(e=r.n()).done;){var o=e.value.path,i=o.at(-1),a=0;null==i.type&&(n=n.concat(i.location()),a=1);for(var l=0;l"+(410==o?fa(this,wa).guideGone:fa(this,wa).guideError)}),ha(this,Ca,(i=fa(this,Ca),--i)),fa(this,ma).Event.fire("guideError",o),fa(this,ma).Event.fire("pathError",o),e.abrupt("return");case 12:(l=r.data).fdistance>pa&&(l.distance+=l.fdistance),l.tdistance>pa&&(l.distance+=l.tdistance),ua(this,rl,jl).call(this,t,r);case 16:case"end":return e.stop()}}),e,this)}))),h.apply(this,arguments)}}function Ml(t){if(fa(this,ka)){for(;fa(this,ka).firstChild!=fa(this,ka).lastChild;)fa(this,ka).removeChild(fa(this,ka).lastChild);if(t)L.append(fa(this,ka),"div",t);else{var e=this.guide(!0);e&&fa(this,ka).appendChild(e)}}}function Pl(){var t=this;if(fa(this,ka)){var e,n=longdo3.RouteMode,r=longdo3.RouteType,o=fa(this,wa).menu,i=fa(this,wa).menuTip,a=document.createDocumentFragment(),l=L.append(a,"div");L.append(l,"span",{className:"ldroute-menu",innerHTML:o.reverse,title:i.reverse,onclick:this.reverse.bind(this)}),L.append(l,"span",{className:"ldroute-menu",innerHTML:o.clear,title:i.clear,onclick:this.clear.bind(this)}),L.append(l,"span",{className:"ldroute-menu",innerHTML:o.pref,title:i.pref,onclick:function(){return e.style.display="none"==e.style.display?"block":"none"}}),(e=L.append(l,"div",{className:"ldroute-pref"})).style.display="none";var s=L.append(e,"div",{className:"ldroute-pref_right"});fa(this,Ta)==n.Walk?(L.prepend(L.append(s,"label",{innerHTML:o.walk}),"input",{type:"checkbox",checked:fa(this,Oa)&r.Road,onchange:function(e){return t.enableRoute(r.Road,e.target.checked)}}),L.prepend(L.append(s,"label",{innerHTML:o.bus}),"input",{type:"checkbox",checked:fa(this,Oa)&r.Bus,onchange:function(e){return t.enableRoute(r.Bus,e.target.checked)}}),L.prepend(L.append(s,"label",{innerHTML:o.metro}),"input",{type:"checkbox",checked:fa(this,Oa)&r.Metro,onchange:function(e){return t.enableRoute(r.Metro,e.target.checked)}}),L.prepend(L.append(s,"label",{innerHTML:o.rail}),"input",{type:"checkbox",checked:fa(this,Oa)&r.Railway,onchange:function(e){return t.enableRoute(r.Railway,e.target.checked)}}),L.prepend(L.append(s,"label",{innerHTML:o.ferry}),"input",{type:"checkbox",checked:fa(this,Oa)&r.Ferry,onchange:function(e){return t.enableRoute(r.Ferry,e.target.checked)}})):(L.prepend(L.append(s,"label",{innerHTML:o.road}),"input",{type:"checkbox",checked:fa(this,Oa)&r.Road,onchange:function(e){return t.enableRoute(r.Road,e.target.checked)}}),L.prepend(L.append(s,"label",{innerHTML:o.toll}),"input",{type:"checkbox",checked:fa(this,Oa)&r.Tollway,onchange:function(e){return t.enableRoute(r.Tollway,e.target.checked)}}),L.prepend(L.append(s,"label",{innerHTML:o.ferry}),"input",{type:"checkbox",checked:fa(this,Oa)&r.Ferry,onchange:function(e){return t.enableRoute(r.Ferry,e.target.checked)}}));var c="routemode"+fa(this,ma).id(),u=L.append(e,"div",{className:"ldroute-pref_left"});L.prepend(L.append(u,"label",{innerHTML:o.t,title:i.t}),"input",{type:"radio",name:c,checked:fa(this,Ta)==n.Traffic,onchange:function(){return t.mode(n.Traffic)}}),L.prepend(L.append(u,"label",{innerHTML:o.c,title:i.c}),"input",{type:"radio",name:c,checked:fa(this,Ta)==n.Cost,onchange:function(){return t.mode(n.Cost)}}),L.prepend(L.append(u,"label",{innerHTML:o.d,title:i.d}),"input",{type:"radio",name:c,checked:fa(this,Ta)==n.Distance,onchange:function(){return t.mode(n.Distance)}}),server.transit&&L.prepend(L.append(u,"label",{innerHTML:o.w,title:i.w}),"input",{type:"radio",name:c,checked:fa(this,Ta)==n.Walk,onchange:function(){return t.mode(n.Walk)}});var h=L.append(e,"div",{className:"ldroute_pref-bottom"}),f=new Date,d=6e4*f.getTimezoneOffset(),p=new Date(f.getTime()-d).toISOString().substring(0,16);L.append(h,"input",{type:"datetime-local",value:fa(this,Pa)?new Date(1e3*time-d).toISOString().substring(0,16):p,min:p,max:new Date(f.getTime()+2592e6-d).toISOString().substring(0,16),onchange:function(){return t.time(new Date(t.value))}}),L.append(h,"button",{innerHTML:o.reload,onclick:this.search.bind(this)}),L.empty(fa(this,ka)),fa(this,ka).appendChild(a)}}function jl(t,e){var n;if(fa(this,Aa)){var r=fa(this,Aa)==longdo3.RouteLabel.Distance?L.formatDistance(e.data.distance,fa(this,ba)):L.formatInterval(e.data.interval,fa(this,ba));e.label=new Yt(i.polylinePivot(e.features[e.features.length>>1].geometry),{icon:L.labelIcon(r)})}if(e.features){var o,a=[],l=[],s=ra(e.features);try{for(s.s();!(o=s.n()).done;){var c=o.value,u=new Ce(c.geometry,ea({},fa(this,Sa)[ua(this,al,Al).call(this,c.properties.turn)]));u.type="g",u.index=t,l.push(u),a.push(c.properties),delete c.properties}}catch(t){s.e(t)}finally{s.f()}if(fa(this,Sa).destination){var h=e.features[0].geometry.coordinates[0],f=e.features.at(-1).geometry.coordinates.at(-1);l.push(new Ce({type:"LineString",coordinates:[f,fa(this,ja)[t+1]._geojson.geometry.coordinates]},fa(this,Sa).destination)),l.push(new Ce({type:"LineString",coordinates:[fa(this,ja)[t]._geojson.geometry.coordinates,h]},fa(this,Sa).destination))}e.guide=a,e.path=l,delete e.type,delete e.features}fa(this,Ra)[t]=e;for(var d,p=t+2;d=fa(this,Ra)[p];++p)if(d.path){var v,y=ra(d.path);try{for(y.s();!(v=y.n()).done;){v.value.index=p}}catch(t){y.e(t)}finally{y.f()}}ha(this,Ca,(n=fa(this,Ca),--n))||(ua(this,el,Ml).call(this),ua(this,ol,Rl).call(this),fa(this,ma).Event.fire("guideComplete",fa(this,Ra)),fa(this,ma).Event.fire("pathComplete",fa(this,Ra)))}function Rl(){var t,e=fa(this,ma).Overlays,n=ra(fa(this,Ra));try{for(n.s();!(t=n.n()).done;){var r,o=t.value,i=o.path,a=o.label,l=ra(i);try{for(l.s();!(r=l.n()).done;){var s=r.value;e.add(s)}}catch(t){l.e(t)}finally{l.f()}a&&e.add(a)}}catch(t){n.e(t)}finally{n.f()}}function Cl(t){var e=fa(this,Ra)[t]||{},n=e.path,r=e.label;if(n){var o,i=fa(this,ma).Overlays,a=ra(n);try{for(a.s();!(o=a.n()).done;){var l=o.value;i.remove(l)}}catch(t){a.e(t)}finally{a.f()}i.remove(r)}}function Al(t){return t<10?"road":10==t?"air":11==t?"ferry":"rail"}function Il(t){return Il="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Il(t)}function Fl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Nl(t){for(var e=1;e0?!0===t?this.Renderer.zoomIn({animate:e}):this.Renderer.zoomTo(t,{animate:e}):this.Renderer.zoomOut({animate:e}),this)}},{key:"zoomRange",value:function(t){var e;return null==t?{min:this.Renderer.getMinZoom(),max:this.Renderer.getMaxZoom()}:(this.Renderer.getMinZoom()>t.max?this.Renderer.setMinZoom(t.min).setMaxZoom(t.max):this.Renderer.setMaxZoom(t.max).setMinZoom(t.min),null===(e=this.Ui.DPad)||void 0===e||e._repaint(),this.Event.fire("zoomRange",t),this)}},{key:"location",value:function(t,e){var n=this;return null==t?L.fromLngLat(this.Renderer.getCenter()):t==longdo3.LocationMode.Pointer?Hl(this,Jl)?L.fromLngLat(this.Renderer.unproject(L.toPointLike(Hl(this,Jl)))):void 0:isFinite(t.x)&&isFinite(t.y)?L.fromLngLat(this.Renderer.unproject(L.toPointLike(t))):t==longdo3.LocationMode.Geolocation?(navigator.geolocation.getCurrentPosition((function(t){n.Renderer.panTo({lon:t.coords.longitude,lat:t.coords.latitude},{animate:e}),n.Event.fire("geolocation",t)}),(function(t){console.error(t),n.Event.fire("geolocationError",t)})),this):(this.Renderer.panTo(t,{animate:e}),this)}},{key:"bound",value:function(t,e,n){return null==t?L.fromLngLatBounds(this.Renderer.getBounds()):(e=e||{},L.validateLocation(e),!1===n&&(e.maxZoom=this.Renderer.getZoom()),this.Renderer.fitBounds(L.toLngLatBounds(t),e),this)}},{key:"move",value:function(t,e){return this.Renderer.panBy(L.toPointLike(t),{animate:e}),this}},{key:"pinch",value:function(){return this}},{key:"pinchEnd",value:function(){return this}},{key:"language",value:function(t){if(null==t)return this.Ui.language();try{this.Layers.language(t)}catch(t){}return this.Ui.language(t),this.Search.language(t),this.Tags.language(t),this.Route.language(t),this}},{key:"focus",value:function(){return this}},{key:"pageToScreen",value:function(){return{x:0,y:0}}},{key:"loadingTile",value:function(){return 0}},{key:"rotate",value:function(t,e){return null==t?this.Renderer.getBearing():(this.Renderer.rotateTo(t,{animate:e}),this)}},{key:"pitch",value:function(t){return null==t?this.Renderer.getPitch():(this.Renderer.setPitch(t),this)}},{key:"enableFilter",value:function(t){var e=this.placeholder();return null==t?e.style.filter?longdo3.Filter.Dark:e.firstChild.style.filter?longdo3.Filter.Light:longdo3.Filter.None:(e.style.filter=t==longdo3.Filter.Dark?"invert(1) hue-rotate(200deg) brightness(1)":"",e.firstChild.style.filter=t==longdo3.Filter.Light?"grayscale(0.75) saturate(0.75) hue-rotate(30deg) contrast(1.1)":"",this)}},{key:"goTo",value:function(t,e){return!1===e?this.Renderer.jumpTo(t):this.Renderer.easeTo(t),this}}])&&Wl(e.prototype,n),r&&Wl(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function rs(t){(function e(){var n,r,o=this;if(window.maplibregl&&window.deck){var i=!1===t.lastView?$l:ql(this,ts,as).call(this),a=!(null!==(n=t.language)&&void 0!==n&&n.startsWith("th"))&&t.language;this.Layers._base=(null===(r=t.layer)||void 0===r?void 0:r[0])||t.layer||longdo3.Layers[defaultMap];var l=this.Layers._base.style;try{var s,c,u;this.Renderer=new maplibregl.Map(Nl(Nl({container:t.placeholder,style:null!==(s=l.startsWith)&&void 0!==s&&s.call(l,"ext.")?longdo3.Layers.CLEAR.style:l,center:t.location||i,minZoom:(null===(c=t.zoomRange)||void 0===c?void 0:c.min)||0,maxZoom:(null===(u=t.zoomRange)||void 0===u?void 0:u.max)||22,interactive:t.input||!0,maxPitch:85,transformRequest:ql(this,es,ls)},t),{},{zoom:t.zoom||i[2]})),this.Renderer.__longdo=this}catch(e){return t.placeholder.textContent=e,void(e.message.includes("Failed to initialize WebGL")&&longdo3.Util.append(t.placeholder,"div",{className:"error",innerHTML:'Your browser does not support WebGL, visit here for more information.'}))}this.Renderer.once("style.load",(function(e){var n,r;if(a&&o.Layers.language(a),null!==(n=l.startsWith)&&void 0!==n&&n.call(l,"ext.")&&o.Layers.setBase(o.Layers._base),o.zoomRange(t.zoomRange),(null===(r=t.layer)||void 0===r?void 0:r.length)>1)for(var i,s=1;i=t.layer[s];++s)try{o.Layers.add(i)}catch(e){}o.Layers._setDem(),o.Ui._setTerrain(e.style.stylesheet),o.Event.fire("ready")})).on("resize",(function(){return o.Event.fire("resize")})).on("moveend",(function(){return o.Event.fire("location")})).on("zoomend",(function(){return o.Event.fire("zoom")})).on("rotateend",(function(){return o.Event.fire("rotate")})).on("pitch",(function(){var t=o.Renderer.getPitch()-68;o.placeholder().style.background="linear-gradient(".concat("#3464a6, #95b4d3"," ").concat(1.5*t,"%, #fff ").concat(2.5*t,"%)")})).on("pitchend",(function(){return o.Event.fire("pitch")})).on("mousemove",(function(t){Ul(o,Jl,t.point),ql(o,Xl,os).call(o,"mousemove",t)})).on("mouseout",(function(){return Ul(o,Jl,void 0)})).on("click",(function(t){return ql(o,Xl,os).call(o,"click",t)})).on("dblclick",(function(t){return ql(o,Xl,os).call(o,"doubleClick",t)})).on("wheel",(function(t){return o.Event.fire("wheel",{x:t.originalEvent.layerX,y:t.originalEvent.layerY,delta:t.originalEvent.wheelDelta})})).on("drag",(function(){return o.Event.fire("drag")})).on("dragend",(function(){return o.Event.fire("drop")})).on("data",(function(t){return"source"==t.dataType&&o.Event.fire("loadTile",t.sourceId)})).on("idle",!1===t.lastView?function(){return o.Event.fire("idle")}:function(){ql(o,Ql,is).call(o),o.Event.fire("idle")}),document.addEventListener("fullscreenchange",(function(){return o.Event.fire("fullscreen",document.fullscreenElement==o.placeholder())})),this.Ui=new Fo(this,t.ui),a&&this.language(a)}else setTimeout(e.bind(this),100,t)}).bind(this)()}function os(t,e){this._overlayClick&&"mousemove"!=t?delete this._overlayClick:this.Event.fire(t,Nl(Nl({},e.point),{},{lon:e.lngLat.lng,lat:e.lngLat.lat}))}function is(){var t=this.Renderer.getCenter(),e=t.lng,n=t.lat,r=this.Renderer.getZoom();localStorage.setItem("ldmap_center","[".concat(e,",").concat(n,",").concat(r,"]"))}function as(){try{var t=localStorage.getItem("ldmap_center");return JSON.parse(t)||$l}catch(t){}return $l}function ls(t,e){if("Tile"==e&&t.startsWith(server.maps))return{url:"".concat(t).concat(t.includes("?")?"&":"?","key=").concat(longdo3.sphereKey)}}longdo3.Map=ns})();var __webpack_exports__={};longdo3.Util.append(document.head,"style",{type:"text/css",textContent:'@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.maplibregl-map .ldmap-load,.ldsearch-placeholder .ldmap-load,.ldroute-placeholder .ldmap-load{width:30px;height:30px;margin:16px auto;border:5px solid #eee;border-top:5px solid #288fde;border-radius:50%;animation:spin 2s linear infinite}.maplibregl-map a:link,.maplibregl-map a:visited,.maplibregl-map .ldmap-link{color:#069;text-decoration:none;cursor:pointer}.maplibregl-map a:hover,.maplibregl-map a:active,.maplibregl-map .ldmap-link:hover{color:#e80;text-decoration:underline}.maplibregl-map .error{margin:8px;font-size:18px}.maplibregl-marker.ldmap-clickable{cursor:pointer}.maplibregl-marker .ldmap-geomlabel{padding:0 2px;background:#ffc;font-size:10px;font-weight:bold;box-shadow:2px 2px 4px #444;white-space:nowrap;opacity:0.8}.maplibregl-popup .ldmap-popup_title{height:20px;margin:0 0 4px 0;font-size:14px;font-weight:bold;overflow:hidden}.maplibregl-popup .ldmap-popup_detail{min-width:55px;max-height:360px;word-wrap:break-word;overflow-y:auto;line-height:1.3}.maplibregl-popup .ldmap-overlay_info{color:#888;font-size:11px}.maplibregl-popup .ldmap-overlay_image{text-align:center}.maplibregl-popup .ldmap-overlay_description{margin:4px 0}.maplibregl-popup .ldmap-overlay_camera{width:320px;min-height:180px;max-height:240px}.maplibregl-popup .ldmap-overlay_camera_overlay{width:320px}.maplibregl-popup .ldmap-overlay_aqi{margin-top:4px;padding:4px 8px;border-radius:4px;width:125px;height:48px}.maplibregl-popup .ldmap-overlay_aqi div{margin-top:4px;font-size:24px;font-weight:bold;text-align:right}.maplibregl-popup .ldmap-poi_warning{margin:2px 0;border-radius:4px;color:#fff;font-size:10px;text-align:center}.maplibregl-popup .ldmap-poi_unverified{background:#ffa60c}.maplibregl-popup .ldmap-poi_obsoleted{background:#e13209}.maplibregl-popup .ldmap-poi_item svg{margin-top:-4px;float:left}.maplibregl-popup .ldmap-poi_item .ldmap-poi_info{min-height:24px;margin:8px 0 0 32px}.maplibregl-popup .ldmap-poi_open{cursor:pointer}.maplibregl-popup .ldmap-poi_open_more{margin-left:8px;color:#f9844a;user-select:none}.maplibregl-popup .ldmap-poi_dow{width:30px;display:inline-block}.maplibregl-popup .ldmap-poi_info_hidden{display:none}.maplibregl-popup .ldmap-poi_menu{margin:8px 0 0 0;border-top:1px solid #ccc}.maplibregl-canvas-container .ldmap-contextmenu{width:180px;padding:6px!important;box-shadow:2px 2px 6px #888;color:#444!important;background:#fff!important;border-radius:5px}.maplibregl-canvas-container .ldmap-contextmenu .ldmap-load{margin:10px auto}.maplibregl-canvas-container .ldmap-contextmenu .ldmap-link{pointer-events:auto}.maplibregl-canvas-container .ldmap-contextmenu .ldmap-text{cursor:text;overflow:hidden;pointer-events:auto;user-select:all}.maplibregl-canvas-container .ldmap-contextmenu_poi{height:18px;overflow:hidden}.maplibregl-canvas-container .ldmap-contextmenu_poi img{width:14px;margin:0 2px 0 0;vertical-align:middle}.maplibregl-canvas-container .ldmap-contextmenu_location{color:#777}.maplibregl-canvas-container .ldmap-contextmenu_extra{margin-top:8px;padding-top:8px;border-top:1px solid #eee}.maplibregl-canvas-container .ldmap-tooltip{margin:20px 0 0 0;padding:2px 4px!important;font-size:11px}.maplibregl-control-container .ldmap-dpad{width:45px;height:45px;margin:2px 0 0 2px}.maplibregl-control-container .ldmap-dpad .ldmap-goleft{position:absolute;left:2px;top:0;bottom:0;width:16px;height:16px;margin:auto;cursor:pointer}.maplibregl-control-container .ldmap-dpad .ldmap-goright{position:absolute;right:2px;top:0;bottom:0;width:16px;height:16px;margin:auto;cursor:pointer}.maplibregl-control-container .ldmap-dpad .ldmap-goup{position:absolute;left:0;right:0;top:2px;width:16px;height:16px;margin:auto;cursor:pointer}.maplibregl-control-container .ldmap-dpad .ldmap-godown{position:absolute;left:0;right:0;bottom:2px;width:16px;height:16px;margin:auto;cursor:pointer}.maplibregl-control-container .ldmap-dpad .ldmap-zoomlabel{position:absolute;left:0;right:0;top:0;bottom:0;height:18px;margin:auto;color:#288fde;font-weight:bold;text-align:center;user-select:none}.maplibregl-control-container .ldmap-menubar > div{padding:4px 8px;border-right:1px solid #ddd;font-size:11px;display:inline-block;cursor:pointer;user-select:none}.maplibregl-control-container .ldmap-menubar > div:first-child{border-top-left-radius:4px;border-bottom-left-radius:4px}.maplibregl-control-container .ldmap-menubar > div:last-child{border-right:none;border-top-right-radius:4px;border-bottom-right-radius:4px}.maplibregl-control-container .ldmap-menubar .ldmap-dropdown{padding:4px 12px}.maplibregl-control-container .ldmap-menubar .ldmap-dropdown .ldmap-arrow{position:absolute;right:3px;bottom:-2px;color:#288fde;font-size:8px}.maplibregl-control-container .ldmap-menubar .ldmap-dropdown-open .ldmap-arrow{color:#f9844a}.maplibregl-control-container .ldmap-menubar .ldmap-dropdown-body{position:absolute;right:0px;margin-top:6px;color:#000;background:#fff;border-radius:4px;box-shadow:0 1px 6px rgba(0,0,0,0.3);overflow-y:auto}.maplibregl-control-container .ldmap-menubar .ldmap-item-active{background:#2085f3;color:#fff}.maplibregl-control-container .ldmap-menubar .ldmap-item-active .ldmap-arrow{color:#fff}.maplibregl-control-container .ldmap-menubar .ldmap-group{padding:0 12px;background:#ccc;text-align:center}.maplibregl-control-container .ldmap-menubar .ldmap-option{padding:6px 20px 6px 12px;cursor:pointer}.maplibregl-control-container .ldmap-menubar .ldmap-option-active{background:#feb}.maplibregl-control-container .ldmap-tagpanel .ldmap-tagpanel-head img{height:14px;margin:0 2px 0 0;vertical-align:middle}.maplibregl-control-container .ldmap-tagpanel .ldmap-tagcategory-title{margin:4px;font-weight:bold}.maplibregl-control-container .ldmap-tagpanel .ldmap-dropdown-body{width:280px;cursor:auto}.maplibregl-control-container .ldmap-tagpanel .ldmap-dropdown-body img{height:24px;max-width:24px;margin-left:8px;cursor:pointer}.maplibregl-control-container .ldmap-tagpanel .ldmap-morecategory{background:#fff9df;text-align:center;cursor:pointer}.maplibregl-control-container .ldmap-tagpanel .ldmap-command{padding:2px 8px;background:#f3f6f9}@media (hover:hover){.maplibregl-control-container .ldmap-menubar > div:hover,.maplibregl-control-container .ldmap-menubar .ldmap-dropdown-body .ldmap-option:hover{background:#f2f2f2}.maplibregl-control-container .ldmap-menubar .ldmap-item-active:hover{background:#17e}.maplibregl-control-container .ldmap-menubar .ldmap-dropdown-body .ldmap-option-active:hover{background:#f0e0b0}.maplibregl-control-container .ldmap-tagpanel .ldmap-tagpanel-head img:hover{opacity:0.5}}.maplibregl-map .ldmap-toast{position:absolute;left:0;right:0;height:22px;bottom:-30px;width:292px;margin:auto;padding:4px;text-align:center;color:#fff;background:#000;opacity:0.6;border-top-left-radius:4px;border-top-right-radius:4px;transition:bottom.3s}.maplibregl-map .ldmap-crosshair{position:absolute;top:0;bottom:0;left:0;right:0;width:0;height:0;margin:auto;border:1px solid #f00;background:#f00;pointer-events:none}.maplibregl-map .ldmap-externalmap{position:static!important;width:100%;height:100%}.maplibregl-map .ldmap-external-bottom{bottom:18px}.ldsearch-placeholder{min-width:240px}.ldsearch-placeholder .ldsearch-list{margin:0;padding:0;list-style:none;cursor:pointer}.ldsearch-placeholder .ldsearch-item{margin:0;padding:8px 4px 8px 6px;border-bottom:1px solid #ddd;background:#fff;font-size:14px}.ldsearch-placeholder .ldsearch-item:hover{background:#eee}.ldsearch-placeholder .ldsearch-zoom{float:right;margin:0 0 0 2px}.ldsearch-placeholder .ldsearch-icon,.ldsearch-placeholder svg{width:16px;margin:4px 6px 20px 0;float:left}.ldsearch-placeholder .ldsearch-address{margin:2px 0 0 20px;color:#999;font-size:11px}.ldsearch-placeholder .ldsearch-empty{padding:6px 0;color:#888;text-align:center}.ldsearch-placeholder .ldsearch-more{padding:6px 0;text-align:center;color:#fff;background:#59b3f8;cursor:pointer}.ldroute-placeholder{min-width:240px}.ldroute-placeholder .ldroute-error{color:#f00;text-align:center}.ldroute-placeholder .ldroute-menu{width:29%;padding:2%;font-weight:bold;background:#eef;cursor:pointer;text-align:center;display:inline-block}.ldroute-placeholder .ldroute-menu:hover{background:#eff}.ldroute-placeholder .ldroute-pref{padding:8px;background:#eff}.ldroute-placeholder .ldroute-pref_right{float:right;width:50%}.ldroute-placeholder .ldroute-pref_bottom{clear:both}.ldroute-placeholder .ldroute-pref label{display:block}.ldroute-placeholder input[type=datetime-local]{margin:0 8px 0 4px;width:75%}.ldroute-placeholder button{margin:12px 0 4px 0}.ldroute-placeholder .ldroute-info{height:16px;padding:8px;border-bottom:1px solid #ddd;color:#fff;background:#888;font-size:16px}.ldroute-placeholder .ldroute-interval{float:right}.ldroute-placeholder .ldroute-list{margin:0;padding:0;list-style:none}.ldroute-placeholder .ldroute-item{padding:8px 4px 8px 6px;border-bottom:1px solid #ddd;background:#efe}.ldroute-placeholder .ldroute-item:hover{background:#eee;cursor:pointer}.ldroute-placeholder .ldroute-type_air{background:#edf}.ldroute-placeholder .ldroute-type_rail{background:#ffd}.ldroute-placeholder .ldroute-type_ferry{background:#def}.ldroute-placeholder .ldroute-dest{background:#fed!important}.ldroute-placeholder .ldroute-poi{color:#c30}.ldroute-placeholder .ldroute-road{color:#39c}.ldroute-placeholder .ldroute-dist{color:#888;font-size:11px;margin:0 0 0 2px;float:right}.maplibregl-ctrl-top-right .maplibregl-ctrl{clear:none}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background:url(\'data:image/svg+xml,\')}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background:url(\'data:image/svg+xml,\')}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background:url(\'data:image/svg+xml,\')}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background:url(\'data:image/svg+xml,\')}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background:url(\'data:image/svg+xml,\')}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background:url(\'data:image/svg+xml,\')}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url(\'data:image/svg+xml,\')}'});})()