PageSourceSearch

https://img.demoparty.net/build/maps.556ce883.js

js demoparty.net collected 2026-10-02 04:11:17 UTC 7,782 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[522],{968:(e,t,i)=>{i.r(t),i.d(t,{MapComponent:()=>s});var r=i(4869),n=i(4692),s={init:function(){this.appElements=n(".map"),this.appElements.length>0&&(this.apiKey=this.appElements.first().data("api-key"),window.addEventListener("load",(function(e){setTimeout((function(){s.load()}),1e3)})))},load:function(){var e=this;new r.aH({apiKey:this.apiKey,version:"weekly",libraries:[]}).load().then((function(t){return e.render(t)})).catch((function(e){return console.error("An error occurred while loading Google Maps",e)}))},render:function(e){this.appElements.each((function(t){var i=n(this).get(0),r=n(this).data("display-details"),o=n(this).data("geojson-src"),a=n(this).data("mapstyle-src"),l=n(this).data("filter-continent");a?n.ajax({dataType:"json",url:a,success:function(t){s.showMap(e,i,o,r,t,l)}}):s.showMap(e,i,o,r,[],l)}))},showMap:function(e,t,i,r,o,a){var l=new e.maps.Map(t,{mapTypeId:"roadmap",styles:o,disableDefaultUI:!0,backgroundColor:"hsla(0, 0%, 0%, 0)"});l.data.loadGeoJson(i,null,(function(){var t=s.getBounds(e,l,a);t.isEmpty()&&(t=s.getBounds(e,l)),l.fitBounds(t),l.getZoom()>8&&l.setZoom(8)})),l.data.setStyle((function(t){return{icon:{url:t.getProperty("style.icon.url"),scaledSize:new e.maps.Size(t.getProperty("style.icon.scaledsize"),t.getProperty("style.icon.scaledsize"))},clickable:t.getProperty("style.clickable")}}));var c=null;r&&(l.data.addListener("click",(function(e){var t=e.feature;window.location.href=t.getProperty("link")})),l.data.addListener("mouseover",(function(e){window.clearTimeout(c);var t=e.feature;n(".map-details").html("<b>"+t.getProperty("name")+"</b> "+t.getProperty("description")),c=window.setTimeout((function(){n(".map-details").html("&nbsp;")}),2e3)})))},getBounds:function(e,t,i){var r=new e.maps.LatLngBounds;return t.data.forEach((function(e){var t=e.getGeometry();i&&i!==e.getProperty("data.continent")||t.forEachLatLng((function(e){r.extend(e)}))})),r}}},4869:(e,t,i)=>{function r(e,t,i,r){return new(i||(i=Promise))((function(n,s){function o(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))}function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}i.d(t,{aH:()=>l}),"function"==typeof SuppressedError&&SuppressedError;var s=n((function e(t,i){if(t===i)return!0;if(t&&i&&"object"==typeof t&&"object"==typeof i){if(t.constructor!==i.constructor)return!1;var r,n,s;if(Array.isArray(t)){if((r=t.length)!=i.length)return!1;for(n=r;0!=n--;)if(!e(t[n],i[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===i.source&&t.flags===i.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===i.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===i.toString();if((r=(s=Object.keys(t)).length)!==Object.keys(i).length)return!1;for(n=r;0!=n--;)if(!Object.prototype.hasOwnProperty.call(i,s[n]))return!1;for(n=r;0!=n--;){var o=s[n];if(!e(t[o],i[o]))return!1}return!0}return t!=t&&i!=i}));const o="__googleMapsScriptId";var a;!function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILURE=3]="FAILURE"}(a||(a={}));class l{constructor({apiKey:e,authReferrerPolicy:t,channel:i,client:r,id:n=o,language:a,libraries:c=[],mapIds:h,nonce:d,region:u,retries:p=3,url:g="https://maps.googleapis.com/maps/api/js",version:f}){if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=e,this.authReferrerPolicy=t,this.channel=i,this.client=r,this.id=n||o,this.language=a,this.libraries=c,this.mapIds=h,this.nonce=d,this.region=u,this.retries=p,this.url=g,this.version=f,l.instance){if(!s(this.options,l.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(l.instance.options)}`);return l.instance}l.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?a.FAILURE:this.done?a.SUCCESS:this.loading?a.LOADING:a.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+="?callback=__googleMapsCallback&loading=async",this.apiKey&&(e+=`&key=${this.apiKey}`),this.channel&&(e+=`&channel=${this.channel}`),this.client&&(e+=`&client=${this.client}`),this.libraries.length>0&&(e+=`&libraries=${this.libraries.join(",")}`),this.language&&(e+=`&language=${this.language}`),this.region&&(e+=`&region=${this.region}`),this.version&&(e+=`&v=${this.version}`),this.mapIds&&(e+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(e+=`&auth_referrer_policy=${this.authReferrerPolicy}`),e}deleteScript(){const e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise(((e,t)=>{this.loadCallback((i=>{i?t(i.error):e(window.google)}))}))}importLibrary(e){return this.execute(),google.maps.importLibrary(e)}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){var e,t;if(document.getElementById(this.id))return void this.callback();const i={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};
1Object.keys(i).forEach((e=>!i[e]&&delete i[e])),(null===(t=null===(e=null===window||void 0===window?void 0:window.google)||void 0===e?void 0:e.maps)||void 0===t?void 0:t.importLibrary)||(e=>{let t,i,n,s="The Google Maps JavaScript API",o="google",a="importLibrary",l="__ib__",c=document,h=window;h=h[o]||(h[o]={});const d=h.maps||(h.maps={}),u=new Set,p=new URLSearchParams,g=()=>t||(t=new Promise(((a,h)=>r(this,void 0,void 0,(function*(){var r;for(n in yield i=c.createElement("script"),i.id=this.id,p.set("libraries",[...u]+""),e)p.set(n.replace(/[A-Z]/g,(e=>"_"+e[0].toLowerCase())),e[n]);p.set("callback",o+".maps."+l),i.src=this.url+"?"+p,d[l]=a,i.onerror=()=>t=h(Error(s+" could not load.")),i.nonce=this.nonce||(null===(r=c.querySelector("script[nonce]"))||void 0===r?void 0:r.nonce)||"",c.head.append(i)})))));d[a]?console.warn(s+" only loads once. Ignoring:",e):d[a]=(e,...t)=>u.add(e)&&g().then((()=>d[a](e,...t)))})(i);const n=this.libraries.map((e=>this.importLibrary(e)));n.length||n.push(this.importLibrary("core")),Promise.all(n).then((()=>this.callback()),(e=>{const t=new ErrorEvent("error",{error:e});this.loadErrorCallback(t)}))}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){const e=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${e} ms.`),setTimeout((()=>{this.deleteScript(),this.setScript()}),e)}else this.onerrorEvent=e,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach((e=>{e(this.onerrorEvent)})),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),!this.loading)if(this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version)return console.warn("Google Maps already loaded outside @googlemaps/js-api-loader. This may result in undesirable behavior as options and script parameters may not match."),void this.callback();this.loading=!0,this.setScript()}}}}}]);

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