@mapcreator/api 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see bundle.browser.min.js.LICENSE.txt */
2
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.mapcreator=e():t.mapcreator=e()}(window,(function(){return function(t){var e={};function r(s){if(e[s])return e[s].exports;var n=e[s]={i:s,l:!1,exports:{}};return t[s].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,s){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(r.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(s,n,function(e){return t[e]}.bind(null,n));return s},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=78)}([function(t,e,r){"use strict";async function s(t,e=1,r){t instanceof Promise&&(t=await t);const s=t.data,n=[];e=e||t.page,r=r||t.pageCount,e===t.page&&e++;for(let s=e;s<=r;s++)n.push(t.get(s));const i=await Promise.all(n);return s.concat(...i.map(t=>t.data))}r.r(e),r.d(e,"getPaginatedRange",(function(){return s})),r.d(e,"delay",(function(){return n})),r.d(e,"wrapKyCancelable",(function(){return i})),r.d(e,"makeCancelable",(function(){return a})),r.d(e,"serializeUTCDate",(function(){return o})),r.d(e,"clone",(function(){return u}));const n=t=>new Promise(e=>setTimeout(e,t));function i(t){return(e,r={})=>{if("object"==typeof r&&r.hasOwnProperty("signal"))return t(e,r);const s=new AbortController,n=t(e,{signal:s.signal,...r});return n.cancel=()=>s.abort(),n}}function a(t){const e=new AbortController,r=t(e.signal);return r instanceof Promise&&(r.cancel=()=>e.abort()),r}function o(t){if(!(t instanceof Date))throw new TypeError("Expected date to be of type Date");const e=t=>("00"+t).slice(-Math.max(String(t).length,2));let r=[t.getUTCFullYear(),t.getUTCMonth()+1,t.getUTCDate()].map(e).join("-");return r+=" "+[t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds()].map(e).join(":"),r}function u(t,e=!0){const r=t=>u(t,e);if("object"!=typeof t||null===t)return t;if(Array.isArray(t))return t.map(r);const s={};for(const n of Object.keys(t))!e&&n.startsWith("_")||(s[n]=r(t[n]));return s}},function(t,e,r){"use strict";r.r(e),r.d(e,"isParentOf",(function(){return i})),r.d(e,"getTypeName",(function(){return a})),r.d(e,"mix",(function(){return u})),r.d(e,"hasTrait",(function(){return c}));var s=r(28),n=r(29);function i(t,e){if(null===t||null===e)return!1;t="function"==typeof t?t:t.constructor,e="function"==typeof e?e:e.constructor;do{if(e.name===t.name)return!0;e=Object.getPrototypeOf(e)}while(""!==e.name);return!1}function a(t){return void 0===t?"undefined":(t="function"==typeof t?t:t.constructor).name}function o(t,e){Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e)).forEach(r=>{r.match(/^(?:constructor|initializer|prototype|arguments|caller|name|bind|call|apply|toString|length)$/)||Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})}function u(t,...e){const r=class extends(t||class{}){constructor(...t){super(...t),e.map(t=>t.prototype.initializer).filter(t=>"function"==typeof t).forEach(t=>t.call(this))}};for(const t of e){if(!i(s.default,t))throw new TypeError("Expected mixin to implement Trait for "+t.name);o(r.prototype,t.prototype),o(r,t)}r.__mixins=e;const a=Object(n.fnv32b)(e.map(t=>t.name).join(","));return Object.defineProperty(r,"name",{value:"Cocktail_"+a}),r}function c(t,e){t="function"==typeof t?t:t.constructor;do{if(Array.isArray(t.__mixins)&&t.__mixins.includes(e))return!0;t=Object.getPrototypeOf(t)}while(""!==t.name);return!1}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return a}));var s=r(68),n=r(6),i=r(0);class a extends n.default{constructor(t,e={}){if(super(t,e),this.constructor===a)throw new s.AbstractClassError}_buildCreateData(){this._updateProperties();const t={},e=[].concat(Object.keys(this._properties),Object.keys(this._baseProperties)).filter((t,e,r)=>r.indexOf(t)===e);for(const r of e)t[r]=this._properties[r]||this._baseProperties[r];return delete t.id,t}save(){return this.id?this._update():this._create()}_create(){return Object(i.makeCancelable)(async t=>{const e=this._prepareData(this._buildCreateData()),{data:r}=await this.api.ky.post(this.baseUrl,{json:e,signal:t}).json();return this._properties={},this._baseProperties=r,this._updateProperties(),this})}_update(){return this._updateProperties(),Object(i.makeCancelable)(async t=>{if(0===Object.keys(this._properties).length)return this;const e=this._prepareData(this._properties);return await this.api.ky.patch(this.url,{json:e,signal:t}),Object.assign(this._baseProperties,this._properties),this._properties={},"updated_at"in this._baseProperties&&(this._baseProperties.updated_at=new Date),this})}delete(t=!0){return Object(i.makeCancelable)(async e=>(await this.api.ky.delete(this.url,{signal:e}),t&&(this._baseProperties.deleted_at=new Date),this))}restore(t=!0){return Object(i.makeCancelable)(async e=>{const{data:r}=await this.api.ky.put(this.url,{signal:e}).json(),s=new this.constructor(this.api,r);return t&&(this._properties={},this._baseProperties=r,this._updateProperties()),s})}_prepareData(t){const e={};for(const[r,s]of Object.entries(t))s instanceof Date?e[r]=Object(i.serializeUTCDate)(s):e[r]=s;return e}}},function(t,e,r){"use strict";r.r(e),r.d(e,"Choropleth",(function(){return a})),r.d(e,"Color",(function(){return o.default})),r.d(e,"Contract",(function(){return u.default})),r.d(e,"Dimension",(function(){return c.default})),r.d(e,"DimensionSet",(function(){return l.default})),r.d(e,"Domain",(function(){return h.default})),r.d(e,"Faq",(function(){return d})),r.d(e,"Feature",(function(){return p.default})),r.d(e,"Font",(function(){return g.default})),r.d(e,"FontFamily",(function(){return y.default})),r.d(e,"Highlight",(function(){return b})),r.d(e,"InsetMap",(function(){return m})),r.d(e,"Job",(function(){return _.default})),r.d(e,"JobResult",(function(){return w.default})),r.d(e,"JobRevision",(function(){return v.default})),r.d(e,"JobShare",(function(){return j.default})),r.d(e,"JobType",(function(){return x.default})),r.d(e,"Language",(function(){return O.default})),r.d(e,"Layer",(function(){return k.default})),r.d(e,"LayerFaq",(function(){return E})),r.d(e,"Mapstyle",(function(){return N.default})),r.d(e,"MapstyleSet",(function(){return S.default})),r.d(e,"Message",(function(){return C.default})),r.d(e,"Notification",(function(){return R.default})),r.d(e,"Organisation",(function(){return T.default})),r.d(e,"Permission",(function(){return A.default})),r.d(e,"ProductTour",(function(){return D})),r.d(e,"ProductTourStep",(function(){return $})),r.d(e,"Role",(function(){return F.default})),r.d(e,"Svg",(function(){return M.default})),r.d(e,"SvgSet",(function(){return q.default})),r.d(e,"Tag",(function(){return I.default})),r.d(e,"TagType",(function(){return B})),r.d(e,"User",(function(){return J.default})),r.d(e,"VectorHighlight",(function(){return K})),r.d(e,"VectorChoropleth",(function(){return W})),r.d(e,"base",(function(){return Q}));var s=r(23),n=r(6),i=r(0);class a extends n.default{static get resourceName(){return"choropleths"}getJson(){return Object(i.makeCancelable)(t=>this.api.ky.get(this.url+"/json",{signal:t}).json())}downloadPreview(){return Object(i.makeCancelable)(async t=>{const e=await this.api.ky.get(this.url+"/preview",{signal:t});return s.default.fromResponse(e)})}}var o=r(36),u=r(61),c=r(38),l=r(37),h=r(62),f=r(2);class d extends f.default{static get resourceName(){return"faqs"}}var p=r(39),g=r(41),y=r(40);class b extends n.default{static get resourceName(){return"highlights"}}class m extends n.default{static get resourceName(){return"inset-maps"}getJson(){return Object(i.makeCancelable)(t=>this.api.ky.get(this.url+"/json",{signal:t}).json())}}var _=r(42),w=r(33),v=r(63),j=r(21),x=r(43),O=r(64),k=r(22),P=r(14);class E extends P.default{static get resourceName(){return"layer-faqs"}static get parentKey(){return"layer_group_id"}}var N=r(44),S=r(50),C=r(57),R=r(65),T=r(54),A=r(49),L=r(1),U=r(17);class $ extends(Object(L.mix)(P.default)){static get resourceName(){return"product-tours/steps"}static get parentKey(){return"product_tour_id"}}class D extends(Object(L.mix)(U.default)){static get resourcePath(){return"/product-tours/{id}"}static get resourceName(){return"product-tours"}get _Child(){return $}}var F=r(66),M=r(46),q=r(45),I=r(47);class B extends f.default{static get resourcePath(){return"/tags/types/{id}"}static get resourceName(){return"tag-types"}get tags(){return this._proxyResourceList(I.default,this.url+"/tags")}}var J=r(48);class K extends n.default{static get resourceName(){return"highlights/vector"}}class W extends n.default{static get resourceName(){return"choropleths/vector"}}const Q={CrudBase:f.default,CrudSetBase:U.default,ResourceBase:n.default}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return c}));var s=r(7),n=r(52),i=r(8),a=r(29),o=r(1),u=r(5);class c extends n.EventEmitter{constructor(t={}){super(),c.keys().forEach(t=>this._resolve(t)),this.apply(t)}get page(){return this._resolve("page")}get perPage(){return this._resolve("perPage")}get offset(){return this._resolve("offset")}get search(){return this._resolve("search")}get sort(){return this._resolve("sort")}get deleted(){return this._resolve("deleted")}get extra(){return this._resolve("extra")}set page(t){this._update("page",t)}set perPage(t){this._update("perPage",t)}set offset(t){this._update("offset",t)}set search(t){this._update("search",t)}set sort(t){this._update("sort",t)}set deleted(t){this._update("deleted",t)}set extra(t){this._update("extra",t)}static get page(){return c._page||1}static get perPage(){return c._perPage||Number("12")||12}static get offset(){return c._offset||0}static get maxPerPage(){return c._maxPerPage||50}static get search(){return c._search||{}}static get sort(){return c._sort||[]}static get deleted(){return c._deleted||void 0}static get extra(){return c._extra||{}}static set page(t){c._page=c._validatePage(t)}static set perPage(t){c._perPage=c._validatePerPage(t)}static set offset(t){c._offset=c._validateOffset(t)}static set maxPerPage(t){c._maxPerPage=c._validateMaxPerPage(t)}static set search(t){c._search=c._validateSearch(t)}static set sort(t){c._sort=c._validateSort(t)}static set deleted(t){c._deleted=c._validateDeleted(t)}static set extra(t){c._extra=c._validateExtra(t)}static _validatePage(t){if("number"!=typeof t)throw new TypeError(`Expected page to be of type 'number' instead got '${typeof t}'`);if(t<0)throw new TypeError("Page must be a positive number");if(Number.isNaN(t)||!Number.isFinite(t))throw new TypeError("Page must be a real number");if(Math.round(t)!==t)throw new TypeError("Page must be a natural number");return Math.round(t)}static _validatePerPage(t){if("number"!=typeof t)throw new TypeError(`Expected per page to be of type 'Number' instead got '${Object(o.getTypeName)(t)}'`);if(t<=0)throw new TypeError("Per page must be greater than zero");if(Number.isNaN(t)||!Number.isFinite(t))throw new TypeError("Per page must be a real number");if(Math.round(t)!==t)throw new TypeError("Per page must be a natural number");return t=Math.min(c.maxPerPage,t)}static _validateOffset(t){if("number"!=typeof t)throw new TypeError(`Expected offset to be of type 'Number' instead got '${Object(o.getTypeName)(t)}'`);if(t<0)throw new TypeError("Offset must be a positive number");if(Number.isNaN(t)||!Number.isFinite(t))throw new TypeError("Offset must be a real number");if(Math.round(t)!==t)throw new TypeError("Offset must be a natural number");return t}static _validateMaxPerPage(t){if("number"!=typeof t)throw new TypeError(`Expected page to be of type 'Number' instead got '${Object(o.getTypeName)(t)}'`);if(t<1)throw new TypeError("Value must be greater or equal to 1");return t}static _validateSearch(t){if("object"!=typeof t||Array.isArray(t))throw new TypeError(`Expected value to be of type "Object" got "${Object(o.getTypeName)(t)}"`);const e=t=>"number"==typeof t?t.toString():t;for(let r of Object.keys(t)){if(r=e(r),t[r]=e(t[r]),"string"!=typeof r)throw new TypeError(`Expected key to be of type "String" got "${Object(o.getTypeName)(r)}"`);if(Array.isArray(t[r]))if(t[r].length>0){for(const e of t[r])if(!["string","number","boolean"].includes(typeof e)&&null!==e)throw new TypeError(`Expected query for "${r}" to be of type "String", "Boolean", "Number" or "null" got "${Object(o.getTypeName)(e)}"`)}else delete t[r];else if(null===t[r])delete t[r];else if(!["string","number","boolean"].includes(typeof t[r])&&null!==t[r])throw new TypeError(`Expected query value to be of type "String", "Boolean", "Number", "Array" or "null" got "${Object(o.getTypeName)(t[r])}"`)}return t}static _validateSort(t){if("string"==typeof t)return this._validateSort(t.split(","));if(!(t instanceof Array))throw new TypeError(`Expected sort value to be of type "Array" got "${Object(o.getTypeName)(t)}"`);return t.filter(t=>"string"!=typeof t).forEach(t=>{throw new TypeError(`Expected sort array values to be of type "String" got "${Object(o.getTypeName)(t)}"`)}),t}static _validateDeleted(t){if(void 0===t)return t;if("string"!=typeof t)throw new TypeError(`Expected deleted to be of type "string" got "${Object(o.getTypeName)(t)}". See: DeletedState`);t=t.toLowerCase();const e=i.DeletedState.values();if(!e.includes(t))throw new TypeError(`Expected deleted to be one of ${e.join(", ")}, got ${t}`);return t}static _validateExtra(t){if("object"!=typeof t)throw new TypeError(`Expected extra to be of type 'object', got '${Object(o.getTypeName)(t)}'`);return t}_resolve(t){const e="_"+t;return this[e]||((this||{})[e]=c[t]),this[e]}_update(t,e,r=!1){const n="_"+t;return e=c["_validate"+Object(s.pascal)(t)](e),(this||{})[n]=e,r||(this.emit("change",[{name:t,value:e}]),this.emit("change:"+t,e)),e}encode(){return Object(u.encodeQueryString)(this.toParameterObject())}toObject(){return c.keys().reduce((t,e)=>(t[Object(s.snake)(e)]=this._resolve(e),t),{})}toParameterObject(){const t={};c.keys().forEach(e=>{"extra"!==e&&(t[Object(s.snake)(e)]=this._resolve(e))}),t.sort=t.sort.map(s.snake).map(t=>t.replace(/^_/,"-")).join(","),0===t.offset&&delete t.offset;for(const e of Object.keys(t.search)){const r=e.split(",").map(s.snake).join(",");e!==r&&(t.search[r]=t.search[e],delete t.search[e])}for(const e of Object.keys(t.search))"boolean"==typeof t.search[e]&&(t.search[e]=Number(t.search[e])),null===t.search[e]&&(t.search[e]="");const e=this._resolve("extra");for(const r of Object.keys(e))t[r]=e[r];for(const e of Object.keys(t))void 0===t[e]&&delete t[e];return t}copy(){return new c(this.toObject())}static keys(){return["page","perPage","offset","search","sort","deleted","extra"]}token(){const t=this.toObject();return delete t.page,delete t.per_page,Object(a.hashObject)(t)}static resetDefaults(){for(const t of c.keys())delete c["_"+t]}apply(t){t instanceof c&&(t=t.toObject());const e=[];for(const r of Object.keys(t)){const n=Object(s.camel)(r);"_"!==r[0]&&c.keys().includes(n)&&e.push({name:n,value:this._update(n,t[r],!0)})}this.emit("change",e);for(const{name:t,value:r}of e)this.emit("change:"+t,r);return e}}},function(t,e,r){"use strict";r.r(e),r.d(e,"FormData",(function(){return n})),r.d(e,"encodeQueryString",(function(){return i})),r.d(e,"wrapKyPrefixUrl",(function(){return a}));var s=r(13);const n=Object(s.windowTest)("FormData")?window.FormData:r(77);function i(t){return function t(e,r=[]){return Object.keys(e).sort().map(s=>{const n=r.slice(0);if("object"==typeof e[s]&&null!==e[s])return n.push(s),t(e[s],n);n.push(s);let i="";i+=encodeURIComponent(n.shift()),i+=n.map(t=>`[${encodeURIComponent(t)}]`).join("");const a=e[s];return null!=a&&(i+="="+encodeURIComponent(a)),i}).join("&")}(t).replace(/^&*|&+(?=&)|&*$/g,"")}function a(t,e){return function(r,s){return"string"!=typeof r||/^https?:\/\//.test(r)||(r.startsWith("/")||(r="/"+r),r=e+r),t(r,s)}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return f}));var s=r(7),n=r(11),i=r(26),a=r(18),o=r(69),u=r(29),c=r(1),l=r(0);function h(t){return t.filter((e,r)=>t.findIndex(t=>t===e)===r)}class f extends(Object(c.mix)(null,o.default)){constructor(t,e={}){if(super(),this.constructor===f)throw new n.AbstractClassError;this.api=t,e=Object(l.clone)(e);for(const t of Object.keys(e)){const r=Object(s.snake)(t);Object(s.camel)(r)in this?delete e[t]:(e[r]=this._guessType(r,e[t]),r!==t&&delete e[t])}this._baseProperties=e||{},this._properties={},this._api=t;const r=Object.keys(this._baseProperties);for(const t of r)this._applyProperty(t);r.includes("deleted_at")&&Object.defineProperty(this,"deleted",{enumerable:!0,configurable:!0,get:()=>Boolean(this.deletedAt)}),this._knownFields=Object.keys(this).filter(t=>"_"!==t[0])}get api(){return this._api}set api(t){if(!Object(c.isParentOf)(i.default,t))throw new TypeError("Expected api to be of type Mapcreator or null");this._api=t}static get resourcePath(){return`/${this.resourceName}/{id}`}static get resourceName(){throw new n.AbstractError}static get resourceUrlKey(){return"id"}static get protectedFields(){return["id","created_at","updated_at","deleted_at"]}static get readonly(){return!1}_updateProperties(){let t=Object.keys(this).filter(t=>"_"!==t[0]).filter(t=>!this._knownFields.includes(t));for(const e of t){const t=Object(s.snake)(e);this._properties[t]=this[e],delete this[e],this._applyProperty(t),this._knownFields.push(t)}t=Object.keys(this._baseProperties).filter(t=>!this._knownFields.includes(Object(s.camel)(t)));for(const e of t)this._applyProperty(e),this._knownFields.push(e);this._knownFields=h(this._knownFields)}sanitize(){this._updateProperties(),Object.assign(this._baseProperties,this._properties),this._properties={}}reset(t=null){this._updateProperties(),"string"==typeof t?this.reset([t]):null===t?this._properties={}:Array.isArray(t)&&t.map(String).map(s.snake).forEach(t=>delete this._properties[t])}clone(){this._updateProperties();const t=new this.constructor(this.api,this._baseProperties);for(const e of Object.keys(this._properties))t[e]=this._properties[e];return t}refresh(t=!0){return Object(l.makeCancelable)(async e=>{const{data:r}=await this.api.ky.get(this.url,{signal:e}).json();return t&&(this._properties={},this._baseProperties=r,this._updateProperties()),new this.constructor(this._api,r)})}_applyProperty(t){const e={enumerable:!0,configurable:!0,get:()=>this._properties.hasOwnProperty(t)?this._properties[t]:this._baseProperties[t]};this.constructor.protectedFields.includes(t)||this.constructor.readonly||(e.set=e=>{this._properties[t]=this._guessType(t,e),delete this._url});const r=Object(s.camel)(t);Object.defineProperty(this,r,e)}_guessType(t,e){return t.endsWith("_at")||t.startsWith("date_")?"string"==typeof e?new Date(e.replace(" ","T")):e:/(_|^)id$/.test(t)&&null!==e&&Number.isFinite(Number(e))?Number(e):e}get ownable(){return!1}get url(){if(!this._url){let t=`${this._api.url}${this.constructor.resourcePath}`;t=t.replace(/{(\w+)}/g,(t,e)=>this[Object(s.camel)(e)]),this._url=t}return this._url}get baseUrl(){const t=this.constructor.resourcePath.match(/^(\/[^{]+\b)/)[1];return`${this._api.url}${t}`}get fieldNames(){return h([...Object.keys(this._baseProperties),...Object.keys(this._properties)]).map(s.camel)}toString(){return`${this.constructor.name}(${this[this.resourceUrlKey]})`}toObject(t=!1){this._updateProperties();const e={...this._baseProperties,...this._properties};if(t)for(const t of Object.keys(e)){const r=Object(s.camel)(t);t!==r&&(e[r]=e[t],delete e[t])}return e}_proxyResourceList(t,e=null,r={}){return e||(e=t.resourceName.replace(/s+$/,"")+"s"),"string"!=typeof e||e.startsWith("/")||e.match(/https?:/)||(e=`${this.url}/${e}`),new a.default(this.api,t,e,r)}static(t,e=f,r={}){let s;if("string"==typeof t){s=`${this.url}/${t}`;const r=e.name||"AnonymousResource";t=class extends e{static get resourceName(){return Object.getPrototypeOf(this).resourceName||"anonymous"}static get resourcePath(){return s}},Object.defineProperty(t,"name",{value:`${r}_${Object(u.fnv32b)(s)}`})}if(!Object(c.isParentOf)(f,t))throw new TypeError("Expected Target to be of type String or ResourceBase constructor");return this._proxyResourceList(t,s,r)}}},function(t,e,r){(function(){"use strict";var e=function(t,e){return e=e||"",t.replace(/(^|-)/g,"$1\\u"+e).replace(/,/g,"\\u"+e)},r=e("20-26,28-2F,3A-40,5B-60,7B-7E,A0-BF,D7,F7","00"),s="a-z"+e("DF-F6,F8-FF","00"),n="A-Z"+e("C0-D6,D8-DE","00"),i=function(t,e,i,a){return t=t||r,e=e||s,i=i||n,a=a||"A|An|And|As|At|But|By|En|For|If|In|Of|On|Or|The|To|Vs?\\.?|Via",{capitalize:new RegExp("(^|["+t+"])(["+e+"])","g"),pascal:new RegExp("(^|["+t+"])+(["+e+i+"])","g"),fill:new RegExp("["+t+"]+(.|$)","g"),sentence:new RegExp('(^\\s*|[\\?\\!\\.]+"?\\s+"?|,\\s+")(['+e+"])","g"),improper:new RegExp("\\b("+a+")\\b","g"),relax:new RegExp("([^"+i+"])(["+i+"]*)(["+i+"])(?=[^"+i+"]|$)","g"),upper:new RegExp("^[^"+e+"]+$"),hole:/[^\s]\s[^\s]/,apostrophe:/'/g,room:new RegExp("["+t+"]")}},a=i(),o={re:a,unicodes:e,regexps:i,types:[],up:String.prototype.toUpperCase,low:String.prototype.toLowerCase,cap:function(t){return o.up.call(t.charAt(0))+t.slice(1)},decap:function(t){return o.low.call(t.charAt(0))+t.slice(1)},deapostrophe:function(t){return t.replace(a.apostrophe,"")},fill:function(t,e,r){return null!=e&&(t=t.replace(a.fill,(function(t,r){return r?e+r:""}))),r&&(t=o.deapostrophe(t)),t},prep:function(t,e,r,s){if(t=null==t?"":t+"",!s&&a.upper.test(t)&&(t=o.low.call(t)),!e&&!a.hole.test(t)){var n=o.fill(t," ");a.hole.test(n)&&(t=n)}return r||a.room.test(t)||(t=t.replace(a.relax,o.relax)),t},relax:function(t,e,r,s){return e+" "+(r?r+" ":"")+s}},u={_:o,of:function(t){for(var e=0,r=o.types.length;e<r;e++)if(u[o.types[e]].apply(u,arguments)===t)return o.types[e]},flip:function(t){return t.replace(/\w/g,(function(t){return(t==o.up.call(t)?o.low:o.up).call(t)}))},random:function(t){return t.replace(/\w/g,(function(t){return(Math.round(Math.random())?o.up:o.low).call(t)}))},type:function(t,e){u[t]=e,o.types.push(t)}},c={lower:function(t,e,r){return o.fill(o.low.call(o.prep(t,e)),e,r)},snake:function(t){return u.lower(t,"_",!0)},constant:function(t){return u.upper(t,"_",!0)},camel:function(t){return o.decap(u.pascal(t))},kebab:function(t){return u.lower(t,"-",!0)},upper:function(t,e,r){return o.fill(o.up.call(o.prep(t,e,!1,!0)),e,r)},capital:function(t,e,r){return o.fill(o.prep(t).replace(a.capitalize,(function(t,e,r){return e+o.up.call(r)})),e,r)},header:function(t){return u.capital(t,"-",!0)},pascal:function(t){return o.fill(o.prep(t,!1,!0).replace(a.pascal,(function(t,e,r){return o.up.call(r)})),"",!0)},title:function(t){return u.capital(t).replace(a.improper,(function(t,e,r,s){return r>0&&r<s.lastIndexOf(" ")?o.low.call(t):t}))},sentence:function(t,e,r){return t=u.lower(t).replace(a.sentence,(function(t,e,r){return e+o.up.call(r)})),e&&e.forEach((function(e){t=t.replace(new RegExp("\\b"+u.lower(e)+"\\b","g"),o.cap)})),r&&r.forEach((function(e){t=t.replace(new RegExp("(\\b"+u.lower(e)+"\\. +)(\\w)"),(function(t,e,r){return e+o.low.call(r)}))})),t}};for(var l in c.squish=c.pascal,u.default=u,c)u.type(l,c[l]);var h="function"==typeof h?h:function(){};h(t.exports?t.exports=u:this.Case=u)}).call(this)},function(t,e,r){"use strict";r.r(e),r.d(e,"Enum",(function(){return s.default})),r.d(e,"DeletedState",(function(){return n})),r.d(e,"ResultStatus",(function(){return i})),r.d(e,"JobShareVisibility",(function(){return a}));var s=r(24);const n=new s.default({ALL:"all",BOTH:"all",NONE:"none",ONLY:"only"}),i=new s.default(["queued","processing","completed","canceled","failed"],!0),a=new s.default(["private","organisation","public"],!0)},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return i}));var s=r(60),n=r(28);class i extends n.default{get organisations(){return new s.default(this.api,this)}get ownable(){return!0}}},function(t,e){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}},function(t,e,r){"use strict";r.r(e),r.d(e,"AbstractError",(function(){return s})),r.d(e,"AbstractClassError",(function(){return n})),r.d(e,"AbstractMethodError",(function(){return i}));class s extends Error{constructor(t="Unimplemented"){super(t)}}class n extends s{constructor(){super("Can not make an instance of an abstract class")}}class i extends s{constructor(){super("Can not call an abstract method")}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return i}));var s=r(18),n=r(0);class i extends s.default{constructor(t,e,r){const s=r.resourceName.replace(/s+$/,"");super(t,r,`${e.url}/${s}s`)}sync(t){return this._modifyResourceLink(t,"PATCH")}attach(t){return this._modifyResourceLink(t,"POST")}detach(t){return this._modifyResourceLink(t,"DELETE")}attachAll(){return Object(n.makeCancelable)(async t=>{await this.api.ky.post(this.baseUrl+"/all",{signal:t})})}detachAll(){return Object(n.makeCancelable)(async t=>{await this.api.ky.delete(this.baseUrl+"/all",{signal:t})})}_modifyResourceLink(t,e){Array.isArray(t)||(t=[t]);const r=t.map(t=>i._getKeyValue(t)).map(Number).filter(t=>!Number.isNaN(t));return Object(n.makeCancelable)(async t=>{await this.api.ky(this.baseUrl,{method:e,signal:t,json:{keys:r}})})}static _getKeyValue(t){if(["number","string"].includes(typeof t))return t;const e=t.constructor.resourceUrlKey||"id";if(void 0!==t[e])return t[e];throw new TypeError("Expected items to be of type Array<ResourceBase>, Array<number>, ResourceBase or number}")}}},function(t,e,r){"use strict";function s(){try{return"[object process]"===Object.prototype.toString.call("undefined"==typeof process?0:process)}catch(t){return!1}}function n(t){return"undefined"!=typeof window&&void 0!==window[t]}r.r(e),r.d(e,"isNode",(function(){return s})),r.d(e,"windowTest",(function(){return n}))},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return a}));var s=r(11),n=r(2),i=r(7);class a extends n.default{constructor(t,e={}){if(super(t,e),this.constructor===n.default)throw new s.AbstractClassError}get hasParent(){const t=Object(i.camel)(this.constructor.parentKey);return this.hasOwnProperty(t)}get parentId(){if(this.hasParent){const t=Object(i.camel)(this.constructor.parentKey);return Number(this[t])}}static get parentKey(){return this.resourceName.replace(/s$/,"_set_id")}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return a}));var s=r(5),n=r(18),i=r(0);class a extends n.default{_parseSelector(t){if(""===t||null===t)return{};switch(typeof t){case"number":case"string":return{[this.Target.resourceUrlKey]:t};case"object":return t;default:return{}}}get(t,e=null){return Object(i.makeCancelable)(async r=>{const n={...this._seedData,...this._parseSelector(t)};let i=this.new(n).url;if("string"==typeof e){const t=i.includes("?")?"&":"?";i+=t+Object(s.encodeQueryString)({deleted:e})}const{data:a}=await this.api.ky.get(i,{signal:r}).json();return this.new(a)})}select(t){const e={...this._seedData,...this._parseSelector(t)};return this.new(e)}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return i}));var s=r(20),n=r(5);class i{constructor(t,e="Bearer",r=432e3,s=[]){if(this.scopes=s,this.token=t,this.type=e.toLowerCase().replace(/(\s|^)\w/g,t=>t.toUpperCase()),"number"==typeof r){const t=1e3*r;this.expires=new Date(Date.now()+t)}else{if(!(r instanceof Date))throw new TypeError("Expires not of type Date or Number");this.expires=r}}toString(){return`${this.type} ${this.token}`}toResponseObject(){return{access_token:this.token,token_type:this.type.toLowerCase(),expires_in:this.expires-Date.now(),scope:this.scopes}}toQueryString(){return Object(n.encodeQueryString)(this.toResponseObject())}get expired(){return new Date>this.expires}static get storageName(){return"api_token"}static fromResponseObject(t){"string"==typeof t&&(t=JSON.parse(t));let e=432e3;return void 0!==t.exipires_in?e=Number(t.expires_in):"string"==typeof t.expires&&(e=new Date(t.expires)),new i(t.access_token,t.token_type,e,t.scope||[])}save(t=i.storageName){const e={token:this.token,type:this.type,expires:this.expires.toUTCString(),scopes:this.scopes};s.default.secure.set(t,JSON.stringify(e),this.expires)}static recover(t=i.storageName){const e=s.default.secure.get(t);if(!e)return null;const r=JSON.parse(e),n=new i(r.token,r.type,new Date(r.expires),r.scopes||[]);return n.expired?null:n}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return a}));var s=r(11),n=r(2),i=r(7);class a extends n.default{get items(){const t=this.url+"/items",e={};return e[this.constructor.foreignKeyName]=this.id,this._proxyResourceList(this._Child,t,e)}get _Child(){throw new s.AbstractError}static get foreignKeyName(){if(!this._fk){let t=this.name;t=Object(i.camel)(t),this._fk=t+"Id"}return this._fk}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return l}));var s=r(26),n=r(4),i=r(1),a=r(0);class o{constructor(t,e,r,a,o=null,u=0,c=[]){if(!Object(i.isParentOf)(s.default,t))throw new TypeError("Expected api to be of type Mapcreator");Object(i.isParentOf)(n.default,a)||(a=new n.default(a)),this._api=t,this.route=e,this._Target=r,this._parameters=a,this._pageCount=o,this._rows=u,this._data=c}get api(){return this._api}get route(){return this._route}set route(t){t.startsWith("https://")||t.startsWith("http://")||(t.startsWith("/")||(t="/"+t),t=`${this._api.url}${t}`),this._route=t}get Target(){return this._Target}get parameters(){return this._parameters}set parameters(t){this._parameters=t}get page(){return this.parameters.page}get perPage(){return this.parameters.perPage}get sort(){return this.parameters.sort}set sort(t){this.parameters.sort=t}get deleted(){return this.parameters.deleted}set deleted(t){this.parameters.deleted=t}get pageCount(){return this._pageCount}get data(){return this._data}get rows(){return this._rows}get query(){return this.parameters.search}set query(t){this.parameters.search=t}getPage(t=this.page,e=this.perPage){const r=this.parameters.copy();r.page=t,r.perPage=e;const s=this.route.includes("?")?"&":"?",n=this.route+s+r.encode();return Object(a.makeCancelable)(async e=>{const r=await this.api.ky.get(n,{signal:e}),{data:s}=await r.json(),i=Number(r.headers.get("x-paginate-total")||s.length),a=Number(r.headers.get("x-paginate-pages")||1),u=this.parameters.copy();return u.page=t,new o(this.api,this.route,this.Target,u,a,i,s.map(t=>new this.Target(this.api,t)))})}get hasNext(){return this.page<this.pageCount}get hasPrevious(){return this.page>1}get cacheToken(){return this.parameters.token()}next(){return this.getPage(this.page+1)}previous(){return this.getPage(this.page-1)}}var u=r(59),c=r(6);class l{constructor(t,e,r=null,s={}){if(!Object(i.isParentOf)(c.default,e))throw new TypeError("Target is not a child of ResourceBase");if("function"!=typeof e)throw new TypeError("Target must to be a class not an instance");r&&(this.__baseUrl=r),this._api=t,this._Target=e,this._seedData=s}get baseUrl(){return this.__baseUrl||(this.__baseUrl=this.new().baseUrl),this.__baseUrl}get api(){return this._api}get Target(){return this._Target}new(t={}){return t={...this._seedData,...t},new this.Target(this._api,t)}list(t={}){const e=this._buildResolver(t);return e.getPage(e.page)}lister(t={},e=50){return new u.default(this.api,this.baseUrl,this.Target,t,e,this.Target.resourceUrlKey)}_buildResolver(t={}){const e=typeof t,r=this.baseUrl;if(!["number","object"].includes(e))throw new TypeError(`Expected params to be of type number or object. Got "${e}"`);return"number"===e?this._buildResolver({page:t}):(t instanceof n.default||(t=new n.default(t)),new o(this._api,r,this.Target,t))}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return i}));var s=r(10),n=r.n(s);class i extends Error{constructor(t,e=""){super(e),n()(this,"error",void 0),this.error=String(t)}toString(){let t=this.error;return t.includes("_")&&(t=t.replace("_"," ").replace(/^./,t=>t.toUpperCase())),this.message?`${t}: ${this.message}`:t}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return f}));var s=r(51),n=r(13),i=r(30);class a extends i.default{constructor(t="_m4n_"){super(),this.__prefix=t}get _prefix(){return this.__prefix}static get secure(){return"https:"===window.location.protocol}static get available(){return!Object(n.isNode)()}set(t,e,r=new Date("2050-01-01")){t=encodeURIComponent(this._prefix+t),e=encodeURIComponent(e),r instanceof Date&&(r=r.toUTCString());let s=`${t}=${e}; expires=${r}`;a.secure&&(s+="; secure"),document.cookie=s}get(t){return t=this._prefix+t,this._toObject()[t]}remove(t){this.set(t,"",new Date(1970))}keys(){const t=new RegExp("^"+this._prefix);return Object.keys(this._toObject()).map(e=>e.replace(t,""))}_toObject(){const t={};return document.cookie.split(";").map(t=>t.trim().split("=").map(decodeURIComponent)).filter(t=>t[0].startsWith(this._prefix)).forEach(e=>{t[e[0]]=e[1]}),t}}var o=r(10),u=r.n(o);class c extends i.default{static get available(){return Object(n.isNode)()&&!1}static get secure(){return!0}set(t,e){this.constructor._data[t]=e}get(t){return this.constructor._data[t]}remove(t){delete this.constructor._data[t]}keys(){return Object.keys(this.constructor._data)}}u()(c,"_data",{});var l=r(72);class h extends i.default{static get _prefix(){return"_m4n_"}static get available(){return!Object(n.isNode)()}set(t,e){t=h._prefix+t,window.localStorage.setItem(t,e)}get(t){return t=h._prefix+t,window.localStorage.getItem(t)}remove(t){t=h._prefix+t,window.localStorage.removeItem(t)}keys(){const t=[],e=window.localStorage,r=h._prefix;for(let s=0;s<e.length;s++){let n=e.key(s);n.startsWith(r)&&(n=n.replace(new RegExp("^"+r),""),t.push(n))}return t}}class f extends s.default{static get available(){return[c,h,l.default].filter(t=>t.available)}static get localStorage(){return new h}static get cookies(){return new a}static get file(){return new l.default}static get dummy(){return new c}static get best(){return new this.available[0]}static get secure(){const t=this.available.filter(t=>t.secure)[0];return void 0===t?f.best:new t}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return i}));var s=r(8),n=r(2);class i extends n.default{save(){throw new Error("Unsupported method JobShare::save")}static get visibility(){return s.JobShareVisibility}static get resourcePath(){return"/jobs/shares/{id}"}static get resourceName(){return"shares"}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return o}));var s=r(71),n=r(9),i=r(1),a=r(2);class o extends(Object(i.mix)(a.default,n.default,s.default)){static get resourceName(){return"layers"}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return n}));var s=r(13);class n{constructor(t,e="application/octet-stream",r="Untitled"){this._data=t,this._type=e,this._fileName=r}static async fromResponse(t){const e=await t.arrayBuffer();let r;const s=t.headers.get("content-type");let i;s&&(r=s.split(";")[0].trim());const a=t.headers.get("content-disposition");if(a){const t=/filename[^;=\n]*=((['"])(.*?)\2|([^;\s]*))/i.exec(a);t&&(i=t[3]||t[4])}return new n(e,r,i)}get data(){return this._data}get type(){return this._type}get fileName(){return this._fileName}get size(){return this.data.length}createObjectUrl(){if(Object(s.isNode)())throw new Error("Object urls are not supported by Node");return URL.createObjectURL(this.createBlob())}createBlob(){return new Blob([this.data],{type:this.type})}toDataUri(){return`data:${this.type};base64,${this.toBase64()}`}toBase64(){return function(t){let e="";const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=new Uint8Array(t),n=s.byteLength,i=n%3,a=n-i;let o,u,c,l,h;for(let t=0;t<a;t+=3)h=65536*s[t]|256*s[t+1]|s[t+2],o=(16515072&h)>>18,u=(258048&h)>>12,c=(4032&h)>>6,l=63&h,e+=r[o]+r[u]+r[c]+r[l];return 1===i?(h=s[a],o=(252&h)>>2,u=(3&h)<<4,e+=r[o]+r[u]+"=="):2===i&&(h=256*s[a]|s[a+1],o=(64512&h)>>10,u=(1008&h)>>4,c=(15&h)<<2,e+=r[o]+r[u]+r[c]+"="),e}(this.data)}toString(){return this.data.toString()}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return a}));var s=r(7),n=r(1);class i{get[Symbol.toStringTag](){return this.constructor.name}}class a extends i{constructor(t,e=!1){super();const r=Array.isArray(t);if(e&&!r)throw new TypeError(`Expected enums to be of type "Array" got "${Object(n.getTypeName)(t)}"`);if(r&&e)for(const e of t){const t=Object(s.constant)(e);Object.defineProperty(this,t,{enumerable:!0,value:e})}else if(r)for(const e of t)Object.defineProperty(this,e,{enumerable:!0,value:a._iota});else for(const e of Object.keys(t)){const r={enumerable:!0};"function"==typeof t[e]?r.get=t[e]:r.value=t[e],Object.defineProperty(this,e,r)}Object.freeze(this)}keys(){return Object.keys(this)}values(){return this.keys().map(t=>this[t]).filter((t,e,r)=>r.indexOf(t)===e)}static get _iota(){return a.__iota||(a.__iota=0),a.__iota++}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return h}));var s=r(10),n=r.n(s),i=r(53),a=r(11),o=r(20),u=r(16),c=r(58),l=r(0);class h{constructor(t,e=["*"]){if(n()(this,"token",null),n()(this,"path","/"),n()(this,"host","https://api.mapcreator.io"),this.constructor===h)throw new a.AbstractClassError;this.clientId=String(t),this.scopes=e,this.clientId&&(this.token=u.default.recover())}get authenticated(){return null!==this.token&&!this.token.expired}authenticate(){throw new a.AbstractMethodError}forget(){c.default.clean(),o.default.secure.remove(u.default.storageName),this.token=null}logout(){if(!this.token)return Object(l.makeCancelable)(()=>{});const t=this.host+"/oauth/logout";return Object(l.makeCancelable)(async e=>{await i.default.post(t,{headers:{Accept:"application/json",Authorization:this.token.toString()},signal:e}),this.forget()})}importToken(t,e="Bearer",r=432e3,s=[]){this.token=new u.default(t,e,r,s)}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return O}));var s=r(53),n=r(8),i=r(55),a=r(25),o=r(16),u=r(32),c=r(15),l=r(18),h=r(3),f=r(6),d=r(69),p=r(29);class g{constructor(t="warn"){this.logLevel=t}getLogLevels(){return["debug","info","warn","error","none"]}log(t,e="info"){"none"!==e&&this._shouldLog(e)&&console[e](t)}debug(t){this.log(t,"debug")}info(t){this.log(t,"info")}warn(t){this.log(t,"warn")}error(t){this.log(t,"error")}get logLevel(){return this._logLevel}set logLevel(t){if(t=t.toLowerCase(),!this.getLogLevels().includes(t))throw new TypeError(`Expected one of ${this.getLogLevels().join(", ")}. Got ${t}`);this._logLevel=t}_shouldLog(t){const e=this.getLogLevels();return e.findIndex(e=>e===t)>=e.findIndex(t=>t===this.logLevel)}}var y=r(1),b=r(0),m=r(35),_=r(27),w=r(5),v=r(52),j=r.n(v),x=r(70);class O extends(Object(y.mix)(j.a,d.default)){constructor(t=new i.default,e="https://api.mapcreator.io"){if(super(),"string"==typeof t){const e=t;(t=new i.default).token=new o.default(e,"Bearer",new Date("2100-01-01T01:00:00"),["*"])}this.auth=t,this.host=e,this._logger=new g("warn"),this.wrapKy(b.wrapKyCancelable),this.wrapKy(w.wrapKyPrefixUrl,`${this.host}/${this.version}`)}get version(){return"v1"}get auth(){return this._auth}get logger(){return this._logger}set auth(t){if(!Object(y.isParentOf)(a.default,t))throw new TypeError("auth must be an instance of OAuth");this._auth=t}get authenticated(){return this.auth.authenticated}get host(){return this._host}set host(t){t=t.replace(/\/+$/,""),this._host=t,this.auth.host=t}get url(){return`${this.host}/${this.version}`}saveToken(t){this.auth.token.save(t)}async authenticate(){return await this.auth.authenticate(),this}get ky(){if(this._ky)return this._ky;const t={beforeRequest:[t=>{this.authenticated&&t.headers.set("Authorization",this.auth.token.toString())}],afterResponse:[async(t,e,r)=>{if(429!==r.status)return r;const s=1e3*r.headers.get("x-ratelimit-reset")||500;return await Object(b.delay)(s),this._ky(t)},async(t,e,r)=>{if(r.status<400||r.status>=600)return r;const s=await r.json(),n={data:s,request:t,options:e,response:r};if(s.error.validation_errors)throw new m.default(n);const i=new _.default(n);throw"AuthenticationException"===i.type&&this.emit("error",i),i}]};return this._ky=s.default.create({timeout:3e4,retry:0,headers:{Accept:"application/json","X-No-CDN-Redirect":"true"},hooks:t}),this._ky}wrapKy(t,...e){this._ky=t(this.ky,...e);const r=["get","post","put","patch","head","delete"];for(const t of r)this._ky[t]=(e,r)=>this._ky(e,{...r,method:t})}static(t,e=f.default){if("string"==typeof t){const r=t,s=e.name||"AnonymousResource";t=class extends e{static get resourceName(){return Object.getPrototypeOf(this).resourceName||"anonymous"}static get resourcePath(){return r}},Object.defineProperty(t,"name",{value:`${s}_${Object(p.fnv32b)(r)}`})}if(Object(y.isParentOf)(f.default,t))return new c.default(this,t);throw new TypeError("Expected Target to be of type string and Constructor to be a ResourceBase constructor")}get choropleths(){return new u.default(this,h.Choropleth)}get vectorChoropleths(){return new u.default(this,h.VectorChoropleth)}get colors(){return this.static(h.Color)}get tags(){return this.static(h.Tag)}get tagTypes(){return this.static(h.TagType)}get contracts(){return this.static(h.Contract)}get dimensions(){return this.static(h.Dimension)}get dimensionSets(){return this.static(h.DimensionSet)}get faqs(){return this.static(h.Faq)}get features(){return this.static(h.Feature)}get featuredMaps(){return new l.default(this,h.Job,"/jobs/featured")}get fonts(){return this.static(h.Font)}get fontFamilies(){return this.static(h.FontFamily)}get highlights(){return new u.default(this,h.Highlight)}get vectorHighlights(){return new u.default(this,h.VectorHighlight)}get insetMaps(){return new u.default(this,h.InsetMap)}get jobs(){return this.static(h.Job)}get jobShares(){return this.static(h.JobShare)}get jobTypes(){return this.static(h.JobType)}get languages(){return this.static(h.Language)}get layers(){return this.static(h.Layer)}get layerFaqs(){return this.static(h.LayerFaq)}get layerGroups(){return this.static(x.default)}get mapstyles(){return this.static(h.Mapstyle)}get mapstyleSets(){return this.static(h.MapstyleSet)}get notifications(){return this.static(h.Notification)}get messages(){return this.static(h.Message)}get organisations(){return this.static(h.Organisation)}get permissions(){return this.static(h.Permission)}get productTours(){return this.static(h.ProductTour)}get productTourSteps(){return this.static(h.ProductTourStep)}get roles(){return this.static(h.Role)}get svgs(){return this.static(h.Svg)}get svgSets(){return this.static(h.SvgSet)}get users(){return this.static(h.User)}getSvgSetTypes(){return Object(b.makeCancelable)(async t=>{const{data:e}=await this.ky.get("svgs/sets/types",{signal:t}).json();return new n.Enum(e,!0)})}getFontStyles(){return Object(b.makeCancelable)(async t=>{const{data:e}=await this.ky.get("fonts/styles",{signal:t}).json();return new n.Enum(e,!0)})}logout(){return this.auth.logout()}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return i}));var s=r(10),n=r.n(s);class i extends Error{constructor({options:t,request:e,response:r,data:s}){const{type:a,message:o,trace:u}=s.error;super(o),n()(this,"options",void 0),n()(this,"response",void 0),n()(this,"request",void 0),n()(this,"type",void 0),n()(this,"status",void 0),n()(this,"trace",void 0),this.options=t,this.response=r,this.request=e,this.type=a,this.trace=[],"string"==typeof u&&(this._trace=i._parseTrace(u))}get hasTrace(){return this.trace.length>0}toString(){return`[${this.status}] ${this.type}: ${this.message}`}static _parseTrace(t){const e=/^#(\d+)\s(?:(.*?)\((\d+)\)|(.*?)):\s(.*?)$/gm,r=[];let s;for(;null!==(s=e.exec(t));)s.index===e.lastIndex&&e.lastIndex++,r.push({line:s[3],file:s[2]||s[4],code:s[5]});return r}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return s}));class s{initializer(){}}},function(t,e,r){"use strict";r.r(e),r.d(e,"fnv32b",(function(){return i})),r.d(e,"hashObject",(function(){return a}));var s=r(73),n=r.n(s);function i(t){let e=t.split("").map(t=>t.charCodeAt(0)).reduce((t,e)=>(t^=e)+(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24),2166136261);return e^=e<<3,e+=e>>5,e^=e<<4,e+=e>>17,e^=e<<25,e+=e>>6,("0000000"+(e>>>0).toString(16)).substr(-8)}function a(t){return i(n()(t))}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return n}));var s=r(11);class n{constructor(){if(this.constructor===n)throw new s.AbstractClassError;if(!this.constructor.available)throw new Error(this.constructor.name+" is unavailable")}static get available(){return!1}static get secure(){return!1}set(t,e){throw new s.AbstractMethodError}get(t){throw new s.AbstractMethodError}remove(t){throw new s.AbstractMethodError}clear(){this.keys().map(t=>this.remove(t))}keys(){throw new s.AbstractMethodError}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return s}));class s extends Error{}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return u}));var s=r(31),n=r(4),i=r(56),a=r(15),o=r(0);class u extends a.default{constructor(t,e,r=null,s={},{hasForPoint:n=!0,hasForBoundary:i=!0}={}){super(t,e,r,s),this._hasForPoint=n,this._hasForBoundary=i}get hasForPoint(){return this._hasForPoint}get hasForBoundary(){return this._hasForBoundary}forBoundary({topLeft:t,bottomRight:e},r=n.default.perPage){if(!this.hasForBoundary)throw new s.default(this.Target.name+" does not support the operation forBoundary");const a=new i.GeoBoundary(t,e);if(r>n.default.maxPerPage)throw new TypeError(`Invalid resource limit ${r}, maximum allowed is ${n.default.maxPerPage}`);const u=`${this.new().baseUrl}/for-boundary?per_page=${r}`;return Object(o.makeCancelable)(async t=>{const{data:e}=await this.api.ky.post(u,{json:{boundary:a},signal:t}).json();return e.map(t=>this.new(t))})}forPoint({lat:t,lng:e},r=n.default.perPage){if(!this.hasForPoint)throw new s.default(this.Target.name+" does not support the operation forPoint");const a=new i.GeoPoint(t,e);if(r>n.default.maxPerPage)throw new TypeError(`Invalid resource limit ${r}, maximum allowed is ${n.default.maxPerPage}`);const u=this.new().baseUrl+"/for-point";return Object(o.makeCancelable)(async t=>{const{data:e}=await this.api.ky.post(u,{json:{limit:r,point:a},signal:t}).json();return e.map(t=>this.new(t))})}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return c}));var s=r(23),n=r(6),i=r(4),a=r(5),o=r(8),u=r(0);class c extends n.default{static get resourcePath(){return"/jobs/{job_id}/revisions/{revision}/result"}static get resourceName(){return"job-result"}get job(){return this.api.jobs.get(this.jobId)}get jobRevision(){return this.api.jobs.select(this.jobId).revisions.get(this.id)}get outputUrl(){return this.url+"/output"}downloadOutput(t=i.default.deleted||o.DeletedState.NONE){const e=`${this.outputUrl}?${Object(a.encodeQueryString)({deleted:t})}`;return Object(u.makeCancelable)(async t=>{const r=await this.api.ky.get(e,{signal:t});return s.default.fromResponse(r)})}get outputUrlUrl(){return this.url+"/output-url"}getOutputUrl(t=i.default.deleted||o.DeletedState.NONE){const e=`${this.outputUrlUrl}?${Object(a.encodeQueryString)({deleted:t})}`;return Object(u.makeCancelable)(async t=>{const{data:r}=await this.api.ky.get(e,{signal:t}).json();return r.url})}get logUrl(){return this.url+"/log"}downloadLog(t=i.default.deleted||o.DeletedState.NONE){const e=`${this.logUrl}?${Object(a.encodeQueryString)({deleted:t})}`;return Object(u.makeCancelable)(async t=>{const r=await this.api.ky.get(e,{signal:t});return s.default.fromResponse(r)})}get previewUrl(){return this.url+"/preview"}downloadPreview(t=i.default.deleted||o.DeletedState.NONE){const e=`${this.previewUrl}?${Object(a.encodeQueryString)({deleted:t})}`;return Object(u.makeCancelable)(async t=>{const r=await this.api.ky.get(e,{signal:t});return s.default.fromResponse(r)})}dealWith(t=!0,e=i.default.deleted||o.DeletedState.NONE){const r=(t=Boolean(t))?"POST":"DELETE",s=`${this.url}/deal-with?${Object(a.encodeQueryString)({deleted:e})}`;return Object(u.makeCancelable)(async e=>{await this.api.ky(s,{method:r,signal:e}),this.dealtWith=t})}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return s}));class s extends Error{}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return a}));var s=r(10),n=r.n(s),i=r(27);class a extends i.default{constructor({options:t,request:e,response:r,data:s}){super({options:t,request:e,response:r,data:s}),n()(this,"validationErrors",void 0),n()(this,"schemaErrors",void 0);const i=s.error.schema_errors;this.validationErrors=s.error.validation_errors,this.schemaErrors=Array.isArray(i)?i:[]}get hasSchemaErrors(){return this.schemaErrors.length>0}get messages(){const t=[];for(const e of Object.keys(this.validationErrors))t.push(...this.validationErrors[e]);return t}toString(){return"There were some validation errors: "+this.messages.join(", ")}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return a}));var s=r(2),n=r(9),i=r(1);class a extends(Object(i.mix)(s.default,n.default)){static get resourceName(){return"colors"}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return o}));var s=r(17),n=r(38),i=r(9),a=r(1);class o extends(Object(a.mix)(s.default,i.default)){static get resourcePath(){return"/dimensions/sets/{id}"}static get resourceName(){return"dimension-sets"}get _Child(){return n.default}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return n}));var s=r(14);class n extends s.default{static get resourceName(){return"dimensions"}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return a}));var s=r(2),n=r(9),i=r(1);class a extends(Object(i.mix)(s.default,n.default)){static get resourceName(){return"features"}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return o}));var s=r(9),n=r(1),i=r(17),a=r(41);class o extends(Object(n.mix)(i.default,s.default)){static get resourcePath(){return"/fonts/families/{id}"}static get resourceName(){return"font-families"}get _Child(){return a.default}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return n}));var s=r(14);class n extends s.default{static get resourceName(){return"fonts"}static get parentKey(){return"font_family_id"}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return d}));var s=r(15),n=r(23),i=r(2),a=r(33),o=r(63),u=r(4),c=r(5),l=r(8),h=r(0),f=r(21);class d extends i.default{get results(){return this._proxyResourceList(a.default,this.url+"/results")}get revisions(){const t={jobId:this.id};return new s.default(this.api,o.default,null,t)}static get resourceName(){return"jobs"}get previewUrl(){return this.url+"/preview"}get lastArchiveUrl(){return this.url+"/output"}downloadPreview(t=u.default.deleted||l.DeletedState.NONE){const e=`${this.previewUrl}?${Object(c.encodeQueryString)({deleted:t})}`;return Object(h.makeCancelable)(async t=>{const r=await this.api.ky.get(e,{signal:t});return n.default.fromResponse(r)})}downloadOutput(t=u.default.deleted||l.DeletedState.NONE){const e=`${this.lastArchiveUrl}?${Object(c.encodeQueryString)({deleted:t})}`;return Object(h.makeCancelable)(async t=>{const r=await this.api.ky.get(e,{signal:t});return n.default.fromResponse(r)})}getOutputUrl(t=u.default.deleted||l.DeletedState.NONE){const e=`${this.url}/output-url?${Object(c.encodeQueryString)({deleted:t})}`;return Object(h.makeCancelable)(async t=>{const{data:r}=await this.api.ky.get(e,{signal:t}).json();return r.url})}share(t=f.default.visibility.PRIVATE,e=u.default.deleted||l.DeletedState.NONE){if(t=t.toLowerCase(),!f.default.visibility.values().includes(t))throw new Error(`Unknown visibility '${t}'`);const r=`${this.url}/share?${Object(c.encodeQueryString)({deleted:e})}`;return Object(h.makeCancelable)(async e=>{const{data:s}=await this.api.ky.post(r,{json:{visibility:t},signal:e}).json();return new f.default(this._api,s)})}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return a}));var s=r(2),n=r(9),i=r(1);class a extends(Object(i.mix)(s.default,n.default)){static get resourcePath(){return"/jobs/types/{id}"}static get resourceName(){return"job-types"}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return a}));var s=r(71),n=r(1),i=r(14);class a extends(Object(n.mix)(i.default,s.default)){static get resourceName(){return"mapstyles"}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return o}));var s=r(9),n=r(17),i=r(46),a=r(1);class o extends(Object(a.mix)(n.default,s.default)){static get resourcePath(){return"/svgs/sets/{id}"}static get resourceName(){return"svg-sets"}get _Child(){return i.default}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return n}));var s=r(14);class n extends s.default{static get resourceName(){return"svgs"}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return a}));var s=r(9),n=r(1),i=r(14);class a extends(Object(n.mix)(i.default,s.default)){static get resourceName(){return"tags"}static get parentKey(){return"tag_type_id"}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return E}));var s=r(12),n=r(15),i=r(2),a=r(36),o=r(38),u=r(37),c=r(39),l=r(41),h=r(40),f=r(42),d=r(21),p=r(43),g=r(64),y=r(22),b=r(44),m=r(50),_=r(57),w=r(65),v=r(54),j=r(49),x=r(66),O=r(46),k=r(45),P=r(0);class E extends i.default{static get resourceName(){return"users"}ips(){const t=this.url+"/ips";return Object(P.makeCancelable)(async e=>{const{data:r}=await this.api.ky.get(t,{signal:e}).json();return r.map(t=>t.ip_address)})}organisation(){return new n.default(this.api,v.default).get(this.organisationId)}language(){return new n.default(this.api,g.default).get(this.languageCode)}get notifications(){return this._proxyResourceList(w.default)}messages(){const t=this.url+"/messages";return Object(P.makeCancelable)(async e=>{const{data:r}=await this.api.ky.get(t,{signal:e}).json();return{read:r.read.map(t=>new _.default(this.api,t)),unread:r.unread.map(t=>new _.default(this.api,t))}})}get mapstyleSets(){return this._proxyResourceList(m.default)}get mapstyles(){return this._proxyResourceList(b.default)}get dimensionSets(){return this._proxyResourceList(u.default)}get dimensions(){return this._proxyResourceList(o.default)}get fontFamilies(){return this._proxyResourceList(h.default)}get fonts(){return this._proxyResourceList(l.default)}get svgSets(){return this._proxyResourceList(k.default)}get svgs(){return this._proxyResourceList(O.default)}get colors(){return this._proxyResourceList(a.default)}get jobs(){return this._proxyResourceList(f.default)}get features(){return this._proxyResourceList(c.default)}get layers(){return this._proxyResourceList(y.default)}get jobTypes(){return this._proxyResourceList(p.default)}get jobShares(){return this._proxyResourceList(d.default)}get permissions(){return this._proxyResourceList(j.default)}get roles(){return new s.default(this.api,this,x.default)}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return n}));var s=r(6);class n extends s.default{static get resourceName(){return"permissions"}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return l}));var s=r(9),n=r(1),i=r(17),a=r(44),o=r(15),u=r(14);class c extends u.default{static get resourcePath(){return"/mapstyles/sets/{mapstyle_set_id}/colors/{id}"}static get resourceName(){return"mapstyle-set-colors"}get baseUrl(){return`${this._api.url}/mapstyles/sets/${this.mapstyleSetId}/colors`}}class l extends(Object(n.mix)(i.default,s.default)){static get resourcePath(){return"/mapstyles/sets/{id}"}static get resourceName(){return"mapstyle-sets"}get _Child(){return a.default}get colors(){const t={mapstyleSetId:this.id};return new o.default(this.api,c,null,t)}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return n}));var s=r(34);class n{constructor(){throw new s.default}}},function(t,e,r){"use strict";var s,n="object"==typeof Reflect?Reflect:null,i=n&&"function"==typeof n.apply?n.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};s=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var a=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var u=10;function c(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function h(t,e,r,s){var n,i,a,o;if(c(r),void 0===(i=t._events)?(i=t._events=Object.create(null),t._eventsCount=0):(void 0!==i.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),i=t._events),a=i[e]),void 0===a)a=i[e]=r,++t._eventsCount;else if("function"==typeof a?a=i[e]=s?[r,a]:[a,r]:s?a.unshift(r):a.push(r),(n=l(t))>0&&a.length>n&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=a.length,o=u,console&&console.warn&&console.warn(o)}return t}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(t,e,r){var s={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},n=f.bind(s);return n.listener=r,s.wrapFn=n,n}function p(t,e,r){var s=t._events;if(void 0===s)return[];var n=s[e];return void 0===n?[]:"function"==typeof n?r?[n.listener||n]:[n]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(n):y(n,n.length)}function g(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function y(t,e){for(var r=new Array(e),s=0;s<e;++s)r[s]=t[s];return r}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(t){if("number"!=typeof t||t<0||a(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");u=t}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||a(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var s="error"===t,n=this._events;if(void 0!==n)s=s&&void 0===n.error;else if(!s)return!1;if(s){var a;if(e.length>0&&(a=e[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var u=n[t];if(void 0===u)return!1;if("function"==typeof u)i(u,this,e);else{var c=u.length,l=y(u,c);for(r=0;r<c;++r)i(l[r],this,e)}return!0},o.prototype.addListener=function(t,e){return h(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return h(this,t,e,!0)},o.prototype.once=function(t,e){return c(e),this.on(t,d(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return c(e),this.prependListener(t,d(this,t,e)),this},o.prototype.removeListener=function(t,e){var r,s,n,i,a;if(c(e),void 0===(s=this._events))return this;if(void 0===(r=s[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete s[t],s.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(n=-1,i=r.length-1;i>=0;i--)if(r[i]===e||r[i].listener===e){a=r[i].listener,n=i;break}if(n<0)return this;0===n?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,n),1===r.length&&(s[t]=r[0]),void 0!==s.removeListener&&this.emit("removeListener",t,a||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,r,s;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var n,i=Object.keys(r);for(s=0;s<i.length;++s)"removeListener"!==(n=i[s])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(s=e.length-1;s>=0;s--)this.removeListener(t,e[s]);return this},o.prototype.listeners=function(t){return p(this,t,!0)},o.prototype.rawListeners=function(t){return p(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):g.call(t,e)},o.prototype.listenerCount=g,o.prototype.eventNames=function(){return this._eventsCount>0?s(this._events):[]}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return k}));const s={},n=t=>"undefined"!=typeof self&&self&&t in self?self:"undefined"!=typeof window&&window&&t in window?window:"undefined"!=typeof global&&global&&t in global?global:"undefined"!=typeof globalThis&&globalThis?globalThis:void 0,i=["Headers","Request","Response","ReadableStream","fetch","AbortController","FormData"];for(const t of i)Object.defineProperty(s,t,{get(){const e=n(t),r=e&&e[t];return"function"==typeof r?r.bind(e):r}});const a=t=>null!==t&&"object"==typeof t,o="function"==typeof s.AbortController,u="function"==typeof s.ReadableStream,c="function"==typeof s.FormData,l=(t,e)=>{const r=new s.Headers(t),n=e instanceof s.Headers,i=new s.Headers(e);for(const[t,e]of i)n&&"undefined"===e||void 0===e?r.delete(t):r.set(t,e);return r},h=(...t)=>{let e={},r={};for(const s of t){if(Array.isArray(s))Array.isArray(e)||(e=[]),e=[...e,...s];else if(a(s)){for(let[t,r]of Object.entries(s))a(r)&&Reflect.has(e,t)&&(r=h(e[t],r)),e={...e,[t]:r};a(s.headers)&&(r=l(r,s.headers))}e.headers=r}return e},f=["get","post","put","patch","head","delete"],d={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},p=[413,429,503],g=Symbol("stop");class y extends Error{constructor(t){super(t.statusText||String(0===t.status||t.status?t.status:"Unknown response error")),this.name="HTTPError",this.response=t}}class b extends Error{constructor(t){super("Request timed out"),this.name="TimeoutError",this.request=t}}const m=t=>new Promise(e=>setTimeout(e,t)),_=t=>f.includes(t)?t.toUpperCase():t,w={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:p},v=(t={})=>{if("number"==typeof t)return{...w,limit:t};if(t.methods&&!Array.isArray(t.methods))throw new Error("retry.methods must be an array");if(t.statusCodes&&!Array.isArray(t.statusCodes))throw new Error("retry.statusCodes must be an array");return{...w,...t,afterStatusCodes:p}};class j{constructor(t,e={}){if(this._retryCount=0,this._input=t,this._options={credentials:this._input.credentials||"same-origin",...e,headers:l(this._input.headers,e.headers),hooks:h({beforeRequest:[],beforeRetry:[],afterResponse:[]},e.hooks),method:_(e.method||this._input.method),prefixUrl:String(e.prefixUrl||""),retry:v(e.retry),throwHttpErrors:!1!==e.throwHttpErrors,timeout:void 0===e.timeout?1e4:e.timeout},"string"!=typeof this._input&&!(this._input instanceof URL||this._input instanceof s.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&"string"==typeof this._input){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(o&&(this.abortController=new s.AbortController,this._options.signal&&this._options.signal.addEventListener("abort",()=>{this.abortController.abort()}),this._options.signal=this.abortController.signal),this.request=new s.Request(this._input,this._options),this._options.searchParams){const t=new URL(this.request.url);t.search=new URLSearchParams(this._options.searchParams),!(c&&this._options.body instanceof s.FormData||this._options.body instanceof URLSearchParams)||this._options.headers&&this._options.headers["content-type"]||this.request.headers.delete("content-type"),this.request=new s.Request(new s.Request(t,this.request),this._options)}void 0!==this._options.json&&(this._options.body=JSON.stringify(this._options.json),this.request.headers.set("content-type","application/json"),this.request=new s.Request(this.request,{body:this._options.body}));const r=async()=>{if(this._options.timeout>2147483647)throw new RangeError("The `timeout` option cannot be greater than 2147483647");await m(1);let t=await this._fetch();for(const e of this._options.hooks.afterResponse){const r=await e(this.request,this._options,t.clone());r instanceof s.Response&&(t=r)}if(!t.ok&&this._options.throwHttpErrors)throw new y(t);if(this._options.onDownloadProgress){if("function"!=typeof this._options.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!u)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return this._stream(t.clone(),this._options.onDownloadProgress)}return t},n=this._options.retry.methods.includes(this.request.method.toLowerCase())?this._retry(r):r();for(const[t,e]of Object.entries(d))n[t]=async()=>{this.request.headers.set("accept",this.request.headers.get("accept")||e);const r=(await n).clone();return"json"===t&&204===r.status?"":r[t]()};return n}_calculateRetryDelay(t){if(this._retryCount++,this._retryCount<this._options.retry.limit&&!(t instanceof b)){if(t instanceof y){if(!this._options.retry.statusCodes.includes(t.response.status))return 0;const e=t.response.headers.get("Retry-After");if(e&&this._options.retry.afterStatusCodes.includes(t.response.status)){let t=Number(e);return Number.isNaN(t)?t=Date.parse(e)-Date.now():t*=1e3,void 0!==this._options.retry.maxRetryAfter&&t>this._options.retry.maxRetryAfter?0:t}if(413===t.response.status)return 0}return.3*2**(this._retryCount-1)*1e3}return 0}async _retry(t){try{return await t()}catch(e){const r=Math.min(this._calculateRetryDelay(e),2147483647);if(0!==r&&this._retryCount>0){await m(r);for(const t of this._options.hooks.beforeRetry){if(await t({request:this.request,options:this._options,error:e,response:e.response.clone(),retryCount:this._retryCount})===g)return}return this._retry(t)}if(this._options.throwHttpErrors)throw e}}async _fetch(){for(const t of this._options.hooks.beforeRequest){const e=await t(this.request,this._options);if(e instanceof Request){this.request=e;break}if(e instanceof Response)return e}return!1===this._options.timeout?s.fetch(this.request.clone()):(t=this.request.clone(),e=this._options.timeout,r=this.abortController,new Promise((n,i)=>{const a=setTimeout(()=>{r&&r.abort(),i(new b(t))},e);s.fetch(t).then(n).catch(i).then(()=>{clearTimeout(a)})}));var t,e,r}_stream(t,e){const r=Number(t.headers.get("content-length"))||0;let n=0;return new s.Response(new s.ReadableStream({start(s){const i=t.body.getReader();e&&e({percent:0,transferredBytes:0,totalBytes:r},new Uint8Array),async function t(){const{done:a,value:o}=await i.read();if(a)s.close();else{if(e){n+=o.byteLength;e({percent:0===r?0:n/r,transferredBytes:n,totalBytes:r},o)}s.enqueue(o),t()}}()}}))}}const x=(...t)=>{for(const e of t)if((!a(e)||Array.isArray(e))&&void 0!==e)throw new TypeError("The `options` argument must be an object");return h({},...t)},O=t=>{const e=(e,r)=>new j(e,x(t,r));for(const r of f)e[r]=(e,s)=>new j(e,x(t,s,{method:r}));return e.HTTPError=y,e.TimeoutError=b,e.create=t=>O(x(t)),e.extend=e=>O(x(t,e)),e.stop=g,e};var k=O()},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return j}));var s=r(12),n=r(2),i=r(36),a=r(61),o=r(37),u=r(62),c=r(39),l=r(40),h=r(42),f=r(21),d=r(43),p=r(22),g=r(50),y=r(45),b=r(47),m=r(48),_=r(0),w=r(5),v=r(70);class j extends n.default{static get resourceName(){return"organisations"}get fontFamilies(){return new s.default(this.api,this,l.default)}get dimensionSets(){return new s.default(this.api,this,o.default)}get mapstyleSets(){return new s.default(this.api,this,g.default)}get svgSets(){return new s.default(this.api,this,y.default)}get colors(){return new s.default(this.api,this,i.default)}get tags(){return new s.default(this.api,this,b.default)}get features(){return new s.default(this.api,this,c.default)}get layers(){return new s.default(this.api,this,p.default)}get layerGroups(){return new s.default(this.api,this,v.default)}get jobs(){return this._proxyResourceList(h.default)}get jobTypes(){return new s.default(this.api,this,d.default)}get jobShares(){return this._proxyResourceList(f.default)}get users(){return this._proxyResourceList(m.default)}get contracts(){return this._proxyResourceList(a.default)}get domains(){return this._proxyResourceList(u.default)}getTree(t=null){return Object(_.makeCancelable)(async e=>{let r=this.url+"/tree";if("string"==typeof t){const e=r.includes("?")?"&":"?";r+=e+Object(w.encodeQueryString)({deleted:t})}const{data:s}=await this.api.ky.get(r,{signal:e}).json();return s.map(t=>this._parseTree(t))})}_parseTree(t){const e=new this.constructor(this._api,t);return e.children=e.children.map(t=>this._parseTree(t)),e}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return i}));var s=r(19),n=r(25);class i extends n.default{constructor(t="",e=["*"]){super(t,e)}authenticate(){return new Promise((t,e)=>{this.authenticated?t(this.token):e(new s.default("dummy_error","Attempted authentication using a dummy authenticator"))})}}},function(t,e,r){"use strict";r.r(e),r.d(e,"GeoPoint",(function(){return a})),r.d(e,"GeoBoundary",(function(){return o}));var s=r(10),n=r.n(s),i=r(31);class a{constructor(t,e){this.lat=t,this.lng=e}get lat(){return this._lat}set lat(t){if(t=Number(t),!Number.isFinite(t))throw new i.default("Invalid latitude: "+t);this._lat=Math.min(90,Math.max(-90,t))}get lng(){return this._lng}set lng(t){if(t=Number(t),!Number.isFinite(t))throw new i.default("Invalid longitude: "+t);this._lng=t}toJSON(){return{lat:this.lat,lng:this.lng}}}class o{constructor({lat:t,lng:e},{lat:r,lng:s}){n()(this,"topLeft",void 0),n()(this,"bottomRight",void 0),this.topLeft=new a(t,e),this.bottomRight=new a(r,s)}getCenter(){const t=(this.topLeft.lat+this.bottomRight.lat)/2,e=(this.topLeft.lng+this.bottomRight.lng)/2;return new a(t,e)}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return u}));var s=r(2),n=r(6);class i extends n.default{}var a=r(0),o=r(7);class u extends s.default{static get resourceName(){return"messages"}toObject(t=!1){const e=super.toObject(t);return e.variants=e.variants.map(e=>{if(e instanceof i)return e.toObject(t);const r=t?o.camel:o.snake,s={},n=Object.keys(e);for(const t of n)s[r(t)]=e[t];return s}),e}_guessType(t,e){return"variants"===t?Array.from(e).map(t=>new i(this.api,t)):super._guessType(t,e)}_buildCreateData(){return this.toObject()}_update(){return Object(a.makeCancelable)(async t=>{const e=this.toObject();return await this.api.ky.patch(this.url,{json:e,signal:t}),Object.assign(this._baseProperties,this._properties),this._properties={},"updated_at"in this._baseProperties&&(this._baseProperties.updated_at=new Date),this})}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return a}));var s=r(20),n=r(51);class i extends n.default{static uuid4(){let t=(new Date).getTime();return"undefined"!=typeof performance&&"function"==typeof performance.now&&(t+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:3&r|8).toString(16)})}static nil(){return"0000000-0000-0000-0000-000000000000"}}class a extends n.default{static get prefix(){return"oauth_state_"}static generate(){const t=i.uuid4(),e=a.prefix+t;return s.default.best.set(e,Date.now()),t}static validate(t,e=!0){const r=s.default.best,n=a.prefix+t,i=void 0!==r.get(n);return e&&i&&r.remove(n),i}static clean(){const t=Object.keys(this.list());for(const e of t)s.default.best.remove(a.prefix+e)}static list(){const t=s.default.best;return t.keys().filter(t=>t.startsWith(a.prefix)).map(t=>t.replace(a.prefix,"")).reduce((e,r)=>(e[r]=t.get(r),e),{})}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return l}));var s=r(7),n=r(52),i=r(26),a=r(4),o=r(6),u=r(1),c=r(0);class l extends n.EventEmitter{constructor(t,e,r=o.default,n=null,c=50,l="id"){if(super(),!Object(u.isParentOf)(i.default,t))throw new TypeError("Expected api to be of type Mapcreator");this._api=t,this._Resource=r,this._route=e||new this.Resource(t,{}).baseUrl,this._parameters=new a.default(n||{perPage:a.default.maxPerPage}),this._key=Object(s.snake)(l),this._waiting=!1,this.autoUpdate=!0,this.maxRows=c,this._reset()}get hasMore(){return void 0===this.availableRows||this.availableRows>this.maxRows}get waiting(){return this._waiting}get parameters(){return this._parameters}set parameters(t){this.parameters.apply(t)}get Resource(){return this._Resource}get route(){return this._route}get data(){return this._data}get api(){return this._api}get rowCount(){return this.data.length}get maxRows(){return this._maxRows}set maxRows(t){if(t=Number(t),Number.isNaN(t))throw new TypeError("Expected maxRows to be numeric got "+typeof raw);this._maxRows=t,this.autoUpdate&&this.update()}get availableRows(){return this._availableRows}set autoUpdate(t){t=Boolean(t),this.autoUpdate!==t&&(this._autoUpdate=t,void 0===this._boundUpdate&&(this._boundUpdate=this.update.bind(this)),this.autoUpdate?this.parameters.on("change",this._boundUpdate):this.parameters.off("change",this._boundUpdate))}get autoUpdate(){return this._autoUpdate}_reset(){this._parameterToken=this.parameters.token(),this._realData=[],this._data=[],this._keys=[],delete this._availableRows}async update(){if(!this.waiting){this._waiting=!0;try{if(this._parameterToken!==this.parameters.token()&&this._reset(),this._realData.length<this.maxRows)try{await this._fetchMore()}catch(t){throw this.autoUpdate=!1,this.emit("error",t),t}this.data.length!==this.maxRows&&(this._data=this._realData.slice(0,this.maxRows))}finally{this._waiting=!1}this.emit("update")}}_fetchMore(){const t=this.route.includes("?")?"&":"?",e=this.parameters.copy();e.offset+=this.rowCount;const r=Math.ceil((this.maxRows-this.rowCount)/this.parameters.perPage),s=[];return Object(c.makeCancelable)(async n=>{for(;e.page<=r;e.page++){const r=this.route+t+e.encode(),i=this.api.ky.get(r,{signal:n});s.push(i)}const i=await Promise.all(s);for(const t of i){const{data:r}=await t.json();r.forEach(t=>this.push(t,!1)),this._availableRows=Number(t.headers.get("x-paginate-total"))+e.offset}})}[Symbol.iterator](){return this.data[Symbol.iterator]()}push(t,e=!0){Object(u.isParentOf)(this.Resource,t)||(t=new this.Resource(this.api,t));const r=this._keys.findIndex(e=>e===t[this._key]);r>=0?(this._realData[r]=t,void 0!==this._data[r]&&(this._data[r]=t)):(this._realData.push(t),this._keys.push(t[this._key]),e&&(this.maxRows++,this._data.push(t)))}loadMore(t=this.parameters.perPage){this.maxRows+=t}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return a}));var s=r(1),n=r(18),i=r(0);class a extends n.default{constructor(t,e){super(t,r(54).default,e.url+"/organisations",{}),this._parent=e}get parent(){return this._parent}sync(t){return this._modifyLink(t,"PATCH",this.Target)}attach(t){return this._modifyLink(t,"POST",this.Target)}detach(t){return this._modifyLink(t,"DELETE",this.Target)}attachAll(){return Object(i.makeCancelable)(async t=>{await this.api.ky.post(this.baseUrl+"/all",{signal:t})})}detachAll(){return Object(i.makeCancelable)(async t=>{await this.api.ky.delete(this.baseUrl+"/all",{signal:t})})}_modifyLink(t,e,r,n=null){if(Array.isArray(t)||(t=[t]),!n){n=r.resourceName.replace(/s+$/,"")+"s"}const a=t.map(t=>"number"==typeof t?t:t.id).map(Number);if(!(0===a.filter(t=>!Object(s.isParentOf)(r,t)&&!Number.isFinite(t)).length))throw new TypeError(`Array must contain either Numbers (resource id) or "${r.name}".`);const o=`${this.parent.url}/${n}`;return Object(i.makeCancelable)(async t=>{await this.api.ky(o,{method:e,signal:t,json:{keys:a}})})}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return n}));var s=r(2);class n extends s.default{static get resourceName(){return"contracts"}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return n}));var s=r(2);class n extends s.default{static get resourceName(){return"domains"}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return h}));var s=r(1),n=r(2),i=r(33),a=(r(21),r(22)),o=r(4),u=r(5),c=r(8),l=r(0);class h extends n.default{get baseUrl(){return`${this._api.url}/jobs/${this.jobId}/revisions`}static get resourcePath(){return"/jobs/{job_id}/revisions/{revision}"}static get resourceName(){return"job-revisions"}static get resourceUrlKey(){return"revision"}get layers(){return this._proxyResourceList(a.default)}result(t=o.default.deleted||c.DeletedState.NONE){return Object(l.makeCancelable)(async e=>{const r=`${this.url}/result?${Object(u.encodeQueryString)({deleted:t})}`,{data:s}=await this.api.ky.get(r,{signal:e}).json();return s.jobId=this.jobId,s.revision=this.revision,new i.default(this.api,s)})}get resultProxy(){const t={jobId:this.jobId,revision:this.revision};return new i.default(this.api,t)}save(t={},e=null,r=o.default.deleted||c.DeletedState.NONE){if(e&&e.length>0)if(Object(s.isParentOf)(a.default,e[0]))e=e.map(t=>t.id);else if("number"!=typeof e[0])throw new TypeError("layers property is not of type Array<Layer>, Array<Number> or null");const n={object:JSON.stringify(t),language_code:this.languageCode,mapstyle_set_id:this.mapstyleSetId};e&&(n.layers=e);const i=`${this.baseUrl}?${Object(u.encodeQueryString)({deleted:r})}`;return Object(l.makeCancelable)(async t=>{const{data:e}=await this.api.ky.post(i,{json:n,signal:t}).json();return new h(this.api,e)})}object(t=o.default.deleted||c.DeletedState.NONE){const e=`${this.url}/object?${Object(u.encodeQueryString)({deleted:t})}`;return Object(l.makeCancelable)(async t=>{const{data:r}=await this.api.ky.get(e,{signal:t}).json();return r})}build(t,e=o.default.deleted||c.DeletedState.NONE){const r=`${this.url}/build?${Object(u.encodeQueryString)({deleted:e})}`;return Object(l.makeCancelable)(async e=>{await this.api.ky.post(r,{json:{callback:t},signal:e})})}cancel(t=o.default.deleted||c.DeletedState.NONE){const e=`${this.url}/cancel?${Object(u.encodeQueryString)({deleted:t})}`;return Object(l.makeCancelable)(async t=>{await this.api.ky.post(e,{signal:t})})}clone(t=null,e=o.default.deleted||c.DeletedState.NONE){const r=`${this.url}/clone?${Object(u.encodeQueryString)({deleted:e})}`;return Object(l.makeCancelable)(async e=>{const{data:s}=await this.api.ky.post(r,{json:{title:t},signal:e}).json();return new h(this.api,s)})}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return n}));var s=r(2);class n extends s.default{static get resourceName(){return"languages"}static get resourcePath(){return`/${this.resourceName}/{code}`}toString(){return`${this.constructor.name}(${this.code})`}static get resourceUrlKey(){return"code"}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return n}));var s=r(2);class n extends s.default{static get resourceName(){return"notifications"}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return o}));var s=r(12),n=r(2),i=r(49),a=r(48);class o extends n.default{get permissions(){return new s.default(this.api,this,i.default)}get users(){return new s.default(this.api,this,a.default)}static get resourceName(){return"roles"}}},function(t,e,r){"use strict";r.r(e);var s=r(32);r.d(e,"GeoResourceProxy",(function(){return s.default}));var n=r(60);r.d(e,"OrganisationProxy",(function(){return n.default}));var i=r(12);r.d(e,"OwnedResourceProxy",(function(){return i.default}));var a=r(15);r.d(e,"ResourceProxy",(function(){return a.default}));var o=r(18);r.d(e,"SimpleResourceProxy",(function(){return o.default}))},function(t,e,r){"use strict";r.r(e),r.d(e,"AbstractError",(function(){return s.AbstractError})),r.d(e,"AbstractClassError",(function(){return s.AbstractClassError})),r.d(e,"AbstractMethodError",(function(){return s.AbstractMethodError})),r.d(e,"ApiError",(function(){return n.default})),r.d(e,"ValidationError",(function(){return i.default})),r.d(e,"NodeError",(function(){return a})),r.d(e,"OAuthError",(function(){return o.default})),r.d(e,"StaticClassError",(function(){return u.default})),r.d(e,"GeoError",(function(){return c.default}));var s=r(11),n=r(27),i=r(35);class a extends Error{}var o=r(19),u=r(34),c=r(31)},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return a}));var s=r(6),n=r(1),i=r(28);class a extends i.default{initializer(){const t=this.constructor._injectable||{};for(const e of Object.keys(t)){const{value:r,isProxy:s}=t[e];s?this.injectProxy(e,r):this.inject(e,r)}}static injectProxy(t,e){if(e)void 0===this._injectable&&(this._injectable={}),this._injectable[t]={value:e,isProxy:!0};else for(const e of Object.keys(t))this.inject(e,t[e])}static inject(t,e){if(e)void 0===this._injectable&&(this._injectable={}),this._injectable[t]={value:e,isProxy:!1};else for(const e of Object.keys(t))this.inject(e,t[e])}static uninject(t){void 0!==this._injectable&&delete this._injectable[t]}injectProxy(t,e){if(e)Object(n.isParentOf)(s.default,e)?this._injectProxy(t,e):this._inject(t,e);else for(const e of Object.keys(t))this.injectProxy(e,t[e])}inject(t,e){this._inject(t,e,!1)}uninject(t){const e=Object.getOwnPropertyDescriptor(this,t),r=e.value||e.get||{};if(!r.injected)throw new Error(`Property "${t}" was not injected, can't un-inject`);r.original?Object.defineProperty(this,t,r.original):Object.defineProperty(this,t,{value:void 0,enumerable:!1,writable:!0})}_injectProxy(t,e){t===e.name&&(t=t.replace(/^\w/,t=>t.toLowerCase())+"s");const i=r(9).default;if(Object(n.hasTrait)(e,i)){const s=r(12).default;this._inject(t,(function(){return new s(this.api,this,e)}))}else if(Object(n.isParentOf)(s.default,e)&&this._proxyResourceList)this._inject(t,(function(){return this._proxyResourceList(e)}));else{const s=r(15).default;this._inject(t,(function(){return new s(this,e)}))}}_inject(t,e,r=!0){const s=(...t)=>e.apply(this,t),n=Object.getOwnPropertyDescriptor(this,t);s.injected=!0,n&&(s.original=n),Object.defineProperty(this,t,{enumerable:!1,configurable:!0,[r?"get":"value"]:s})}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return u}));var s=r(9),n=r(1),i=r(22),a=r(17),o=r(67);class u extends(Object(n.mix)(a.default,s.default)){static get resourceName(){return"layer-groups"}get items(){return new o.OwnedResourceProxy(this.api,this,this._Child)}get _Child(){return i.default}}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return h}));var s=r(28),n=r(26),i=r(23),a=r(6),o=r(1),u=r(5),c=r(0);class l{constructor(t,e){if(!Object(o.isParentOf)(n.default,t))throw new TypeError("Expected api to be of type Mapcreator");if(!Object(o.isParentOf)(a.default,e))throw new TypeError("Expected target to be of type ResourceBase");this._api=t,this._target=e}get api(){return this._api}get url(){return this._target.url+"/image"}delete(){return Object(c.makeCancelable)(async t=>{await this.api.ky.delete(this.url,{signal:t})})}download(){return Object(c.makeCancelable)(async t=>{const e=await this.api.ky.get(this.url,{signal:t});return i.default.fromResponse(e)})}upload(t){const e=new u.FormData;e.append("image",t,"image");const r={};return e.getHeaders&&Object.assign(r,e.getHeaders()),Object(c.makeCancelable)(async t=>{await this.api.ky.post(this.url,{headers:r,body:e,signal:t})})}}class h extends s.default{get imageHandler(){return new l(this.api,this)}}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"default",(function(){return FileDriver}));var _utils_node__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(13),_DataStoreContract__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(30);class FileDriver extends _DataStoreContract__WEBPACK_IMPORTED_MODULE_1__.default{constructor(t=".m4n"){super(),this._path=t}get path(){return this._path}set path(t){if("string"!=typeof t)throw new TypeError('Expected "path" value to be of type "string"');this._path=t}static get available(){return Object(_utils_node__WEBPACK_IMPORTED_MODULE_0__.isNode)()}static get secure(){return!0}set(t,e){const r=this._read();r[t]=e,this._write(r)}get(t){return this._read()[t]}remove(t){const e=this._read();delete e[t],this._write(e)}clear(){this._write({})}keys(){return Object.keys(this._read())}_read(){let t;try{t=this._fs.readFileSync(this.path).toString()}catch(e){t="{}"}return t?JSON.parse(t):{}}_write(t){const e=JSON.stringify(t),r=this._fs.openSync(this.path,"w");this._fs.writeSync(r,e),this._fs.closeSync(r)}get _fs(){return this.__fs||(this.__fs=eval('require("fs")')),this.__fs}}},function(t,e,r){var s="undefined"!=typeof JSON?JSON:r(74);t.exports=function(t,e){e||(e={}),"function"==typeof e&&(e={cmp:e});var r=e.space||"";"number"==typeof r&&(r=Array(r+1).join(" "));var a,o="boolean"==typeof e.cycles&&e.cycles,u=e.replacer||function(t,e){return e},c=e.cmp&&(a=e.cmp,function(t){return function(e,r){var s={key:e,value:t[e]},n={key:r,value:t[r]};return a(s,n)}}),l=[];return function t(e,a,h,f){var d=r?"\n"+new Array(f+1).join(r):"",p=r?": ":":";if(h&&h.toJSON&&"function"==typeof h.toJSON&&(h=h.toJSON()),void 0!==(h=u.call(e,a,h))){if("object"!=typeof h||null===h)return s.stringify(h);if(n(h)){for(var g=[],y=0;y<h.length;y++){var b=t(h,y,h[y],f+1)||s.stringify(null);g.push(d+r+b)}return"["+g.join(",")+d+"]"}if(-1!==l.indexOf(h)){if(o)return s.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}l.push(h);var m=i(h).sort(c&&c(h));for(g=[],y=0;y<m.length;y++){var _=t(h,a=m[y],h[a],f+1);if(_){var w=s.stringify(a)+p+_;g.push(d+r+w)}}return l.splice(l.indexOf(h),1),"{"+g.join(",")+d+"}"}}({"":t},"",t,0)};var n=Array.isArray||function(t){return"[object Array]"==={}.toString.call(t)},i=Object.keys||function(t){var e=Object.prototype.hasOwnProperty||function(){return!0},r=[];for(var s in t)e.call(t,s)&&r.push(s);return r}},function(t,e,r){e.parse=r(75),e.stringify=r(76)},function(t,e){var r,s,n,i,a={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},o=function(t){throw{name:"SyntaxError",message:t,at:r,text:n}},u=function(t){return t&&t!==s&&o("Expected '"+t+"' instead of '"+s+"'"),s=n.charAt(r),r+=1,s},c=function(){var t,e="";for("-"===s&&(e="-",u("-"));s>="0"&&s<="9";)e+=s,u();if("."===s)for(e+=".";u()&&s>="0"&&s<="9";)e+=s;if("e"===s||"E"===s)for(e+=s,u(),"-"!==s&&"+"!==s||(e+=s,u());s>="0"&&s<="9";)e+=s,u();if(t=+e,isFinite(t))return t;o("Bad number")},l=function(){var t,e,r,n="";if('"'===s)for(;u();){if('"'===s)return u(),n;if("\\"===s)if(u(),"u"===s){for(r=0,e=0;e<4&&(t=parseInt(u(),16),isFinite(t));e+=1)r=16*r+t;n+=String.fromCharCode(r)}else{if("string"!=typeof a[s])break;n+=a[s]}else n+=s}o("Bad string")},h=function(){for(;s&&s<=" ";)u()};i=function(){switch(h(),s){case"{":return function(){var t,e={};if("{"===s){if(u("{"),h(),"}"===s)return u("}"),e;for(;s;){if(t=l(),h(),u(":"),Object.hasOwnProperty.call(e,t)&&o('Duplicate key "'+t+'"'),e[t]=i(),h(),"}"===s)return u("}"),e;u(","),h()}}o("Bad object")}();case"[":return function(){var t=[];if("["===s){if(u("["),h(),"]"===s)return u("]"),t;for(;s;){if(t.push(i()),h(),"]"===s)return u("]"),t;u(","),h()}}o("Bad array")}();case'"':return l();case"-":return c();default:return s>="0"&&s<="9"?c():function(){switch(s){case"t":return u("t"),u("r"),u("u"),u("e"),!0;case"f":return u("f"),u("a"),u("l"),u("s"),u("e"),!1;case"n":return u("n"),u("u"),u("l"),u("l"),null}o("Unexpected '"+s+"'")}()}},t.exports=function(t,e){var a;return n=t,r=0,s=" ",a=i(),h(),s&&o("Syntax error"),"function"==typeof e?function t(r,s){var n,i,a=r[s];if(a&&"object"==typeof a)for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(void 0!==(i=t(a,n))?a[n]=i:delete a[n]);return e.call(r,s,a)}({"":a},""):a}},function(t,e){var r,s,n,i=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,a={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function o(t){return i.lastIndex=0,i.test(t)?'"'+t.replace(i,(function(t){var e=a[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'}t.exports=function(t,e,i){var a;if(r="",s="","number"==typeof i)for(a=0;a<i;a+=1)s+=" ";else"string"==typeof i&&(s=i);if(n=e,e&&"function"!=typeof e&&("object"!=typeof e||"number"!=typeof e.length))throw new Error("JSON.stringify");return function t(e,i){var a,u,c,l,h,f=r,d=i[e];switch(d&&"object"==typeof d&&"function"==typeof d.toJSON&&(d=d.toJSON(e)),"function"==typeof n&&(d=n.call(i,e,d)),typeof d){case"string":return o(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(r+=s,h=[],"[object Array]"===Object.prototype.toString.apply(d)){for(l=d.length,a=0;a<l;a+=1)h[a]=t(a,d)||"null";return c=0===h.length?"[]":r?"[\n"+r+h.join(",\n"+r)+"\n"+f+"]":"["+h.join(",")+"]",r=f,c}if(n&&"object"==typeof n)for(l=n.length,a=0;a<l;a+=1)"string"==typeof(u=n[a])&&(c=t(u,d))&&h.push(o(u)+(r?": ":":")+c);else for(u in d)Object.prototype.hasOwnProperty.call(d,u)&&(c=t(u,d))&&h.push(o(u)+(r?": ":":")+c);return c=0===h.length?"{}":r?"{\n"+r+h.join(",\n"+r)+"\n"+f+"}":"{"+h.join(",")+"}",r=f,c}}("",{"":t})}},function(t,e){t.exports="object"==typeof self?self.FormData:window.FormData},function(t,e,r){"use strict";r.r(e),r.d(e,"Mapcreator",(function(){return s.default})),r.d(e,"RequestParameters",(function(){return n.default})),r.d(e,"StorageManager",(function(){return i.default})),r.d(e,"Enum",(function(){return a.default})),r.d(e,"DeletedState",(function(){return o.DeletedState})),r.d(e,"ResultStatus",(function(){return o.ResultStatus})),r.d(e,"OAuth",(function(){return u.default})),r.d(e,"OAuthToken",(function(){return c.default})),r.d(e,"ImplicitFlow",(function(){return g})),r.d(e,"ImplicitFlowPopup",(function(){return y})),r.d(e,"PasswordFlow",(function(){return _})),r.d(e,"DummyFlow",(function(){return w.default})),r.d(e,"ApiError",(function(){return v.default})),r.d(e,"AbstractError",(function(){return j.AbstractError})),r.d(e,"AbstractClassError",(function(){return j.AbstractClassError})),r.d(e,"AbstractMethodError",(function(){return j.AbstractMethodError})),r.d(e,"ValidationError",(function(){return x.default})),r.d(e,"StaticClassError",(function(){return O.default})),r.d(e,"resources",(function(){return k})),r.d(e,"helpers",(function(){return m})),r.d(e,"ResourceLister",(function(){return P.default})),r.d(e,"geo",(function(){return E})),r.d(e,"errors",(function(){return N})),r.d(e,"proxies",(function(){return S})),r.d(e,"version",(function(){return C}));var s=r(26),n=r(4),i=r(20),a=r(24),o=r(8),u=r(25),c=r(16),l=r(58),h=r(5),f=r(19),d=r(13),p=r(7);class g extends u.default{constructor(t,e="",r=["*"],s=!0){if(super(t,r),Object(d.isNode)())throw new Error(this.constructor.name+" can't be used under nodejs");if(this.path="/oauth/authorize",this.callbackUrl=e,this.useState=s,this.callbackUrl||(this.callbackUrl=window.location.toString().split("#")[0]),this._anchorParams=["access_token","token_type","expires_in"],this.useState&&this._anchorParams.push("state"),this._anchorContainsOAuthResponse()){const t=this._getOAuthAnchorParams();if(this._cleanAnchorParams(),this.useState&&!l.default.validate(t.state))throw Error("Invalid state in url");this.token=c.default.fromResponseObject(t)}}authenticate(){return new Promise((t,e)=>{if(this.authenticated)t(this.token);else if(this._anchorContainsError()){const t=this._getError();this._cleanAnchorParams(),e(t)}else window.location=this._buildRedirectUrl()})}_buildRedirectUrl(){const t={client_id:this.clientId,redirect_uri:this.callbackUrl,response_type:"token",scope:this.scopes.join(" ")};return this.useState&&(t.state=l.default.generate()),`${this.host+this.path}?${Object(h.encodeQueryString)(t)}`}_getAnchorParams(t=window.location.hash){const e={};t=t.replace(/^#\/?/g,"");for(const r of t.split("&")){const t=r.split("=").map(decodeURIComponent);e[t[0]]=t[1]}return e}_getOAuthAnchorParams(t=this._getAnchorParams()){return Object.keys(t).filter(t=>this._anchorParams.includes(t)).reduce((e,r)=>(e[r]=t[r],e),{})}_cleanAnchorParams(){const t=this._getAnchorParams(),e=this._anchorParams;e.push("state","error");for(const r of e)delete t[r];window.location.hash=Object(h.encodeQueryString)(t)}_anchorContainsOAuthResponse(){const t=Object.keys(this._getOAuthAnchorParams());return this._anchorParams.reduce((e,r)=>e&&t.includes(r),!0)}_anchorContainsError(){return Boolean(this._getAnchorParams().error)}_getError(){if(!this._anchorContainsError())throw Error("No OAuthError found in anchor");const t=this._getAnchorParams();return t.message?new f.default(t.error,t.message):new f.default(t.error,Object(p.title)(t.error))}}class y extends g{constructor(t,e="",r=["*"],s=!1,n="width=800, height=600"){if(super(t,e,r,s),this.windowOptions=n,window.name===y.popupWindowName)throw new Error("We're a flow popup")}static get popupWindowName(){return"m4n_api_auth"}authenticate(){return window.name===y.popupWindowName?new Promise(()=>{}):this.authenticated?new Promise(t=>{t(this.token)}):new Promise((t,e)=>{const r=window.open(this._buildRedirectUrl(),y.popupWindowName,this.windowOptions),s=setInterval(()=>{r.closed&&e(new f.default("window_closed","Pop-up window was closed before data could be extracted"));let n=!1;try{n=!["","about:blank"].includes(r.location.href)}catch(t){}if(n){clearInterval(s);const n=this._getAnchorParams(r.location.hash);r.close(),n.error?e(new f.default(n.error,n.message)):t(this.token=c.default.fromResponseObject(n))}},250)})}}var b=r(53),m=r(0);class _ extends u.default{constructor(t,e,r,s,n=["*"]){super(t,n),this._secret=e,this._username=r,this._password=s,this._path="/oauth/token",Object(d.isNode)()||(console.warn("Using PasswordFlow in the browser is unrecommended"),"https:"!==window.location.protocol&&console.warn("Page was not loaded using https. You're most likely leaking secrets right now"))}get secret(){return this._secret}set secret(t){this._secret=t}get username(){return this._username}set username(t){this._username=t}get password(){return this._password}set password(t){this._password=t}get path(){return this._path}set path(t){this._path=t}authenticate(){const t=this.host+this.path,e={grant_type:"password",client_id:this.clientId,client_secret:this._secret,username:this.username,password:this.password,scope:this.scopes.join(" ")};return Object(m.makeCancelable)(async r=>{const s=await b.default.post(t,{json:e,signal:r}).json();if(s.error)throw new f.default(s.error,s.message);return this.token=c.default.fromResponseObject(s),this.token.scopes=this.scopes,this.token})}}var w=r(55),v=r(27),j=r(11),x=r(35),O=r(34),k=r(3),P=r(59),E=r(56),N=r(68),S=r(67);const C="v3.0.0"}])}));
2
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var s in r)("object"==typeof exports?exports:e)[s]=r[s]}}(self,(function(){return(()=>{var __webpack_modules__=[(e,t,r)=>{"use strict";r.r(t),r.d(t,{isParentOf:()=>i,getTypeName:()=>n,mix:()=>u,hasTrait:()=>c});var s=r(31),a=r(32);function i(e,t){if(null===e||null===t)return!1;e="function"==typeof e?e:e.constructor,t="function"==typeof t?t:t.constructor;do{if(t.name===e.name)return!0;t=Object.getPrototypeOf(t)}while(""!==t.name);return!1}function n(e){return void 0===e?"undefined":(e="function"==typeof e?e:e.constructor).name}function o(e,t){Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)).forEach((r=>{r.match(/^(?:constructor|initializer|prototype|arguments|caller|name|bind|call|apply|toString|length)$/)||Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}function u(e,...t){const r=class extends(e||class{}){constructor(...e){super(...e),t.map((e=>e.prototype.initializer)).filter((e=>"function"==typeof e)).forEach((e=>e.call(this)))}};for(const e of t){if(!i(s.default,e))throw new TypeError(`Expected mixin to implement Trait for ${e.name}`);o(r.prototype,e.prototype),o(r,e)}r.__mixins=t;const n=(0,a.fnv32b)(t.map((e=>e.name)).join(","));return Object.defineProperty(r,"name",{value:`Cocktail_${n}`}),r}function c(e,t){e="function"==typeof e?e:e.constructor;do{if(Array.isArray(e.__mixins)&&e.__mixins.includes(t))return!0;e=Object.getPrototypeOf(e)}while(""!==e.name);return!1}},(e,t,r)=>{"use strict";async function s(e,t=1,r){e instanceof Promise&&(e=await e);const s=e.data,a=[];t=t||e.page,r=r||e.pageCount,t===e.page&&t++;for(let s=t;s<=r;s++)a.push(e.get(s));const i=await Promise.all(a);return s.concat(...i.map((e=>e.data)))}r.r(t),r.d(t,{getPaginatedRange:()=>s,delay:()=>a,wrapKyCancelable:()=>i,makeCancelable:()=>n,serializeUTCDate:()=>o,clone:()=>u});const a=e=>new Promise((t=>setTimeout(t,e)));function i(e){return(t,r={})=>{if("object"==typeof r&&r.hasOwnProperty("signal"))return e(t,r);const s=new AbortController,a=e(t,{signal:s.signal,...r});return a.cancel=()=>s.abort(),a}}function n(e){const t=new AbortController,r=e(t.signal);return r instanceof Promise&&(r.cancel=()=>t.abort()),r}function o(e){if(!(e instanceof Date))throw new TypeError("Expected date to be of type Date");const t=e=>`00${e}`.slice(-Math.max(String(e).length,2));let r=[e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate()].map(t).join("-");return r+=` ${[e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()].map(t).join(":")}`,r}function u(e,t=!0){const r=e=>u(e,t);if("object"!=typeof e||null===e)return e;if(Array.isArray(e))return e.map(r);const s={};for(const a of Object.keys(e))!t&&a.startsWith("_")||(s[a]=r(e[a]));return s}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var s=r(35),a=r(3),i=r(1);class n extends a.default{constructor(e,t={}){if(super(e,t),this.constructor===n)throw new s.AbstractClassError}_buildCreateData(){this._updateProperties();const e={},t=[].concat(Object.keys(this._properties),Object.keys(this._baseProperties)).filter(((e,t,r)=>r.indexOf(e)===t));for(const r of t)e[r]=this._properties[r]||this._baseProperties[r];return delete e.id,e}save(){return this.id?this._update():this._create()}_create(){return(0,i.makeCancelable)((async e=>{const t=this._prepareData(this._buildCreateData()),{data:r}=await this.api.ky.post(this.baseUrl,{json:t,signal:e}).json();return this._properties={},this._baseProperties=r,this._updateProperties(),this}))}_update(){return this._updateProperties(),(0,i.makeCancelable)((async e=>{if(0===Object.keys(this._properties).length)return this;const t=this._prepareData(this._properties);return await this.api.ky.patch(this.url,{json:t,signal:e}),Object.assign(this._baseProperties,this._properties),this._properties={},"updated_at"in this._baseProperties&&(this._baseProperties.updated_at=new Date),this}))}delete(e=!0){return(0,i.makeCancelable)((async t=>(await this.api.ky.delete(this.url,{signal:t}),e&&(this._baseProperties.deleted_at=new Date),this)))}restore(e=!0){return(0,i.makeCancelable)((async t=>{const{data:r}=await this.api.ky.put(this.url,{signal:t}).json(),s=new this.constructor(this.api,r);return e&&(this._properties={},this._baseProperties=r,this._updateProperties()),s}))}_prepareData(e){const t={};for(const[r,s]of Object.entries(e))s instanceof Date?t[r]=(0,i.serializeUTCDate)(s):t[r]=s;return t}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>p});var s=r(4),a=r(21),i=r(16),n=r(14),o=r(65),u=r(32),c=r(0),l=r(1);function h(e){return e.filter(((t,r)=>e.findIndex((e=>e===t))===r))}class p extends((0,c.mix)(null,o.default)){constructor(e,t={}){if(super(),this.constructor===p)throw new a.AbstractClassError;this.api=e,t=(0,l.clone)(t);for(const e of Object.keys(t)){const r=(0,s.snake)(e);(0,s.camel)(r)in this?delete t[e]:(t[r]=this._guessType(r,t[e]),r!==e&&delete t[e])}this._baseProperties=t||{},this._properties={},this._api=e;const r=Object.keys(this._baseProperties);for(const e of r)this._applyProperty(e);r.includes("deleted_at")&&Object.defineProperty(this,"deleted",{enumerable:!0,configurable:!0,get:()=>Boolean(this.deletedAt)}),this._knownFields=Object.keys(this).filter((e=>"_"!==e[0]))}get api(){return this._api}set api(e){if(!(0,c.isParentOf)(i.default,e))throw new TypeError("Expected api to be of type Mapcreator or null");this._api=e}static get resourcePath(){return`/${this.resourceName}/{id}`}static get resourceName(){throw new a.AbstractError}static get resourceUrlKey(){return"id"}static get protectedFields(){return["id","created_at","updated_at","deleted_at"]}static get readonly(){return!1}_updateProperties(){let e=Object.keys(this).filter((e=>"_"!==e[0])).filter((e=>!this._knownFields.includes(e)));for(const t of e){const e=(0,s.snake)(t);this._properties[e]=this[t],delete this[t],this._applyProperty(e),this._knownFields.push(e)}e=Object.keys(this._baseProperties).filter((e=>!this._knownFields.includes((0,s.camel)(e))));for(const t of e)this._applyProperty(t),this._knownFields.push(t);this._knownFields=h(this._knownFields)}sanitize(){this._updateProperties(),Object.assign(this._baseProperties,this._properties),this._properties={}}reset(e=null){this._updateProperties(),"string"==typeof e?this.reset([e]):null===e?this._properties={}:Array.isArray(e)&&e.map(String).map(s.snake).forEach((e=>delete this._properties[e]))}clone(){this._updateProperties();const e=new this.constructor(this.api,this._baseProperties);for(const t of Object.keys(this._properties))e[t]=this._properties[t];return e}refresh(e=!0){return(0,l.makeCancelable)((async t=>{const{data:r}=await this.api.ky.get(this.url,{signal:t}).json();return e&&(this._properties={},this._baseProperties=r,this._updateProperties()),new this.constructor(this._api,r)}))}_applyProperty(e){const t={enumerable:!0,configurable:!0,get:()=>this._properties.hasOwnProperty(e)?this._properties[e]:this._baseProperties[e]};this.constructor.protectedFields.includes(e)||this.constructor.readonly||(t.set=t=>{this._properties[e]=this._guessType(e,t),delete this._url});const r=(0,s.camel)(e);Object.defineProperty(this,r,t)}_guessType(e,t){return e.endsWith("_at")||e.startsWith("date_")?"string"==typeof t?new Date(t.replace(" ","T")):t:/(_|^)id$/.test(e)&&null!==t&&Number.isFinite(Number(t))?Number(t):t}get ownable(){return!1}get url(){if(!this._url){let e=`${this._api.url}${this.constructor.resourcePath}`;e=e.replace(/{(\w+)}/g,((e,t)=>this[(0,s.camel)(t)])),this._url=e}return this._url}get baseUrl(){const e=this.constructor.resourcePath.match(/^(\/[^{]+\b)/)[1];return`${this._api.url}${e}`}get fieldNames(){return h([...Object.keys(this._baseProperties),...Object.keys(this._properties)]).map(s.camel)}toString(){return`${this.constructor.name}(${this[this.resourceUrlKey]})`}toObject(e=!1){this._updateProperties();const t={...this._baseProperties,...this._properties};if(e)for(const e of Object.keys(t)){const r=(0,s.camel)(e);e!==r&&(t[r]=t[e],delete t[e])}return t}_proxyResourceList(e,t=null,r={}){return t||(t=`${e.resourceName.replace(/s+$/,"")}s`),"string"!=typeof t||t.startsWith("/")||t.match(/https?:/)||(t=`${this.url}/${t}`),new n.default(this.api,e,t,r)}static(e,t=p,r={}){let s;if("string"==typeof e){s=`${this.url}/${e}`;const r=t.name||"AnonymousResource";e=class extends t{static get resourceName(){return Object.getPrototypeOf(this).resourceName||"anonymous"}static get resourcePath(){return s}},Object.defineProperty(e,"name",{value:`${r}_${(0,u.fnv32b)(s)}`})}if(!(0,c.isParentOf)(p,e))throw new TypeError("Expected Target to be of type String or ResourceBase constructor");return this._proxyResourceList(e,s,r)}}},function(e){(function(){"use strict";var t=function(e,t){return t=t||"",e.replace(/(^|-)/g,"$1\\u"+t).replace(/,/g,"\\u"+t)},r=t("20-26,28-2F,3A-40,5B-60,7B-7E,A0-BF,D7,F7","00"),s="a-z"+t("DF-F6,F8-FF","00"),a="A-Z"+t("C0-D6,D8-DE","00"),i=function(e,t,i,n){return e=e||r,t=t||s,i=i||a,n=n||"A|An|And|As|At|But|By|En|For|If|In|Of|On|Or|The|To|Vs?\\.?|Via",{capitalize:new RegExp("(^|["+e+"])(["+t+"])","g"),pascal:new RegExp("(^|["+e+"])+(["+t+i+"])","g"),fill:new RegExp("["+e+"]+(.|$)","g"),sentence:new RegExp('(^\\s*|[\\?\\!\\.]+"?\\s+"?|,\\s+")(['+t+"])","g"),improper:new RegExp("\\b("+n+")\\b","g"),relax:new RegExp("([^"+i+"])(["+i+"]*)(["+i+"])(?=[^"+i+"]|$)","g"),upper:new RegExp("^[^"+t+"]+$"),hole:/[^\s]\s[^\s]/,apostrophe:/'/g,room:new RegExp("["+e+"]")}},n=i(),o={re:n,unicodes:t,regexps:i,types:[],up:String.prototype.toUpperCase,low:String.prototype.toLowerCase,cap:function(e){return o.up.call(e.charAt(0))+e.slice(1)},decap:function(e){return o.low.call(e.charAt(0))+e.slice(1)},deapostrophe:function(e){return e.replace(n.apostrophe,"")},fill:function(e,t,r){return null!=t&&(e=e.replace(n.fill,(function(e,r){return r?t+r:""}))),r&&(e=o.deapostrophe(e)),e},prep:function(e,t,r,s){if(e=null==e?"":e+"",!s&&n.upper.test(e)&&(e=o.low.call(e)),!t&&!n.hole.test(e)){var a=o.fill(e," ");n.hole.test(a)&&(e=a)}return r||n.room.test(e)||(e=e.replace(n.relax,o.relax)),e},relax:function(e,t,r,s){return t+" "+(r?r+" ":"")+s}},u={_:o,of:function(e){for(var t=0,r=o.types.length;t<r;t++)if(u[o.types[t]].apply(u,arguments)===e)return o.types[t]},flip:function(e){return e.replace(/\w/g,(function(e){return(e==o.up.call(e)?o.low:o.up).call(e)}))},random:function(e){return e.replace(/\w/g,(function(e){return(Math.round(Math.random())?o.up:o.low).call(e)}))},type:function(e,t){u[e]=t,o.types.push(e)}},c={lower:function(e,t,r){return o.fill(o.low.call(o.prep(e,t)),t,r)},snake:function(e){return u.lower(e,"_",!0)},constant:function(e){return u.upper(e,"_",!0)},camel:function(e){return o.decap(u.pascal(e))},kebab:function(e){return u.lower(e,"-",!0)},upper:function(e,t,r){return o.fill(o.up.call(o.prep(e,t,!1,!0)),t,r)},capital:function(e,t,r){return o.fill(o.prep(e).replace(n.capitalize,(function(e,t,r){return t+o.up.call(r)})),t,r)},header:function(e){return u.capital(e,"-",!0)},pascal:function(e){return o.fill(o.prep(e,!1,!0).replace(n.pascal,(function(e,t,r){return o.up.call(r)})),"",!0)},title:function(e){return u.capital(e).replace(n.improper,(function(e,t,r,s){return r>0&&r<s.lastIndexOf(" ")?o.low.call(e):e}))},sentence:function(e,t,r){return e=u.lower(e).replace(n.sentence,(function(e,t,r){return t+o.up.call(r)})),t&&t.forEach((function(t){e=e.replace(new RegExp("\\b"+u.lower(t)+"\\b","g"),o.cap)})),r&&r.forEach((function(t){e=e.replace(new RegExp("(\\b"+u.lower(t)+"\\. +)(\\w)"),(function(e,t,r){return t+o.low.call(r)}))})),e}};for(var l in c.squish=c.pascal,u.default=u,c)u.type(l,c[l]);var h="function"==typeof h?h:function(){};h(e.exports?e.exports=u:this.Case=u)}).call(this)},(e,t,r)=>{"use strict";r.r(t),r.d(t,{FormData:()=>s,encodeQueryString:()=>i,wrapKyPrefixUrl:()=>n});const s=(0,r(9).windowTest)("FormData")?window.FormData:r(41);function a(e,t=[]){return Object.keys(e).sort().map((r=>{const s=t.slice(0);if("object"==typeof e[r]&&null!==e[r])return s.push(r),a(e[r],s);s.push(r);let i="";i+=encodeURIComponent(s.shift()),i+=s.map((e=>`[${encodeURIComponent(e)}]`)).join("");const n=e[r];return null!=n&&(i+=`=${encodeURIComponent(n)}`),i})).join("&")}function i(e){return a(e).replace(/^&*|&+(?=&)|&*$/g,"")}function n(e,t){return function(r,s){return"string"!=typeof r||/^https?:\/\//.test(r)||(r.startsWith("/")||(r=`/${r}`),r=t+r),e(r,s)}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});var s=r(34),a=r(31);class i extends a.default{get organisations(){return new s.default(this.api,this)}get ownable(){return!0}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{DeletedState:()=>a,Enum:()=>s.default,JobShareVisibility:()=>n,ResultStatus:()=>i});var s=r(11);const a=new s.default({ALL:"all",BOTH:"all",NONE:"none",ONLY:"only"}),i=new s.default(["queued","processing","completed","canceled","failed"],!0),n=new s.default(["private","organisation","public"],!0)},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>c});var s=r(4),a=r(24),i=r(7),n=r(32),o=r(0),u=r(5);class c extends a.EventEmitter{constructor(e={}){super(),c.keys().forEach((e=>this._resolve(e))),this.apply(e)}get page(){return this._resolve("page")}get perPage(){return this._resolve("perPage")}get offset(){return this._resolve("offset")}get search(){return this._resolve("search")}get sort(){return this._resolve("sort")}get deleted(){return this._resolve("deleted")}get extra(){return this._resolve("extra")}set page(e){this._update("page",e)}set perPage(e){this._update("perPage",e)}set offset(e){this._update("offset",e)}set search(e){this._update("search",e)}set sort(e){this._update("sort",e)}set deleted(e){this._update("deleted",e)}set extra(e){this._update("extra",e)}static get page(){return c._page||1}static get perPage(){return c._perPage||Number("12")||12}static get offset(){return c._offset||0}static get maxPerPage(){return c._maxPerPage||50}static get search(){return c._search||{}}static get sort(){return c._sort||[]}static get deleted(){return c._deleted||void 0}static get extra(){return c._extra||{}}static set page(e){c._page=c._validatePage(e)}static set perPage(e){c._perPage=c._validatePerPage(e)}static set offset(e){c._offset=c._validateOffset(e)}static set maxPerPage(e){c._maxPerPage=c._validateMaxPerPage(e)}static set search(e){c._search=c._validateSearch(e)}static set sort(e){c._sort=c._validateSort(e)}static set deleted(e){c._deleted=c._validateDeleted(e)}static set extra(e){c._extra=c._validateExtra(e)}static _validatePage(e){if("number"!=typeof e)throw new TypeError(`Expected page to be of type 'number' instead got '${typeof e}'`);if(e<0)throw new TypeError("Page must be a positive number");if(Number.isNaN(e)||!Number.isFinite(e))throw new TypeError("Page must be a real number");if(Math.round(e)!==e)throw new TypeError("Page must be a natural number");return Math.round(e)}static _validatePerPage(e){if("number"!=typeof e)throw new TypeError(`Expected per page to be of type 'Number' instead got '${(0,o.getTypeName)(e)}'`);if(e<=0)throw new TypeError("Per page must be greater than zero");if(Number.isNaN(e)||!Number.isFinite(e))throw new TypeError("Per page must be a real number");if(Math.round(e)!==e)throw new TypeError("Per page must be a natural number");return e=Math.min(c.maxPerPage,e)}static _validateOffset(e){if("number"!=typeof e)throw new TypeError(`Expected offset to be of type 'Number' instead got '${(0,o.getTypeName)(e)}'`);if(e<0)throw new TypeError("Offset must be a positive number");if(Number.isNaN(e)||!Number.isFinite(e))throw new TypeError("Offset must be a real number");if(Math.round(e)!==e)throw new TypeError("Offset must be a natural number");return e}static _validateMaxPerPage(e){if("number"!=typeof e)throw new TypeError(`Expected page to be of type 'Number' instead got '${(0,o.getTypeName)(e)}'`);if(e<1)throw new TypeError("Value must be greater or equal to 1");return e}static _validateSearch(e){if("object"!=typeof e||Array.isArray(e))throw new TypeError(`Expected value to be of type "Object" got "${(0,o.getTypeName)(e)}"`);const t=e=>"number"==typeof e?e.toString():e;for(let r of Object.keys(e)){if(r=t(r),e[r]=t(e[r]),"string"!=typeof r)throw new TypeError(`Expected key to be of type "String" got "${(0,o.getTypeName)(r)}"`);if(Array.isArray(e[r]))if(e[r].length>0){for(const t of e[r])if(!["string","number","boolean"].includes(typeof t)&&null!==t)throw new TypeError(`Expected query for "${r}" to be of type "String", "Boolean", "Number" or "null" got "${(0,o.getTypeName)(t)}"`)}else delete e[r];else if(null===e[r])delete e[r];else if(!["string","number","boolean"].includes(typeof e[r])&&null!==e[r])throw new TypeError(`Expected query value to be of type "String", "Boolean", "Number", "Array" or "null" got "${(0,o.getTypeName)(e[r])}"`)}return e}static _validateSort(e){if("string"==typeof e)return this._validateSort(e.split(","));if(!(e instanceof Array))throw new TypeError(`Expected sort value to be of type "Array" got "${(0,o.getTypeName)(e)}"`);return e.filter((e=>"string"!=typeof e)).forEach((e=>{throw new TypeError(`Expected sort array values to be of type "String" got "${(0,o.getTypeName)(e)}"`)})),e}static _validateDeleted(e){if(void 0===e)return e;if("string"!=typeof e)throw new TypeError(`Expected deleted to be of type "string" got "${(0,o.getTypeName)(e)}". See: DeletedState`);e=e.toLowerCase();const t=i.DeletedState.values();if(!t.includes(e))throw new TypeError(`Expected deleted to be one of ${t.join(", ")}, got ${e}`);return e}static _validateExtra(e){if("object"!=typeof e)throw new TypeError(`Expected extra to be of type 'object', got '${(0,o.getTypeName)(e)}'`);return e}_resolve(e){const t=`_${e}`;return this[t]||((this||{})[t]=c[e]),this[t]}_update(e,t,r=!1){const a=`_${e}`;return t=c[`_validate${(0,s.pascal)(e)}`](t),(this||{})[a]=t,r||(this.emit("change",[{name:e,value:t}]),this.emit(`change:${e}`,t)),t}encode(){return(0,u.encodeQueryString)(this.toParameterObject())}toObject(){return c.keys().reduce(((e,t)=>(e[(0,s.snake)(t)]=this._resolve(t),e)),{})}toParameterObject(){const e={};c.keys().forEach((t=>{"extra"!==t&&(e[(0,s.snake)(t)]=this._resolve(t))})),e.sort=e.sort.map(s.snake).map((e=>e.replace(/^_/,"-"))).join(","),0===e.offset&&delete e.offset;for(const t of Object.keys(e.search)){const r=t.split(",").map(s.snake).join(",");t!==r&&(e.search[r]=e.search[t],delete e.search[t])}for(const t of Object.keys(e.search))"boolean"==typeof e.search[t]&&(e.search[t]=Number(e.search[t])),null===e.search[t]&&(e.search[t]="");const t=this._resolve("extra");for(const r of Object.keys(t))e[r]=t[r];for(const t of Object.keys(e))void 0===e[t]&&delete e[t];return e}copy(){return new c(this.toObject())}static keys(){return["page","perPage","offset","search","sort","deleted","extra"]}token(){const e=this.toObject();return delete e.page,delete e.per_page,(0,n.hashObject)(e)}static resetDefaults(){for(const e of c.keys())delete c[`_${e}`]}apply(e){e instanceof c&&(e=e.toObject());const t=[];for(const r of Object.keys(e)){const a=(0,s.camel)(r);"_"!==r[0]&&c.keys().includes(a)&&t.push({name:a,value:this._update(a,e[r],!0)})}this.emit("change",t);for(const{name:e,value:r}of t)this.emit(`change:${e}`,r);return t}}},(e,t,r)=>{"use strict";function s(){try{return"[object process]"===Object.prototype.toString.call("undefined"==typeof process?0:process)}catch(e){return!1}}function a(e){return"undefined"!=typeof window&&void 0!==window[e]}r.r(t),r.d(t,{isNode:()=>s,windowTest:()=>a})},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var s=r(21),a=r(2),i=r(4);class n extends a.default{constructor(e,t={}){if(super(e,t),this.constructor===a.default)throw new s.AbstractClassError}get hasParent(){const e=(0,i.camel)(this.constructor.parentKey);return this.hasOwnProperty(e)}get parentId(){if(this.hasParent){const e=(0,i.camel)(this.constructor.parentKey);return Number(this[e])}}static get parentKey(){return this.resourceName.replace(/s$/,"_set_id")}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var s=r(4),a=r(0);class i{get[Symbol.toStringTag](){return this.constructor.name}}class n extends i{constructor(e,t=!1){super();const r=Array.isArray(e);if(t&&!r)throw new TypeError(`Expected enums to be of type "Array" got "${(0,a.getTypeName)(e)}"`);if(r&&t)for(const t of e){const e=(0,s.constant)(t);Object.defineProperty(this,e,{enumerable:!0,value:t})}else if(r)for(const t of e)Object.defineProperty(this,t,{enumerable:!0,value:n._iota});else for(const t of Object.keys(e)){const r={enumerable:!0};"function"==typeof e[t]?r.get=e[t]:r.value=e[t],Object.defineProperty(this,t,r)}Object.freeze(this)}keys(){return Object.keys(this)}values(){return this.keys().map((e=>this[e])).filter(((e,t,r)=>r.indexOf(e)===t))}static get _iota(){return n.__iota||(n.__iota=0),n.__iota++}}},e=>{e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});var s=r(22),a=r(5);class i{constructor(e,t="Bearer",r=432e3,s=[]){if(this.scopes=s,this.token=e,this.type=t.toLowerCase().replace(/(\s|^)\w/g,(e=>e.toUpperCase())),"number"==typeof r){const e=1e3*r;this.expires=new Date(Date.now()+e)}else{if(!(r instanceof Date))throw new TypeError("Expires not of type Date or Number");this.expires=r}}toString(){return`${this.type} ${this.token}`}toResponseObject(){return{access_token:this.token,token_type:this.type.toLowerCase(),expires_in:this.expires-Date.now(),scope:this.scopes}}toQueryString(){return(0,a.encodeQueryString)(this.toResponseObject())}get expired(){return new Date>this.expires}static get storageName(){return"api_token"}static fromResponseObject(e){"string"==typeof e&&(e=JSON.parse(e));let t=432e3;return void 0!==e.exipires_in?t=Number(e.expires_in):"string"==typeof e.expires&&(t=new Date(e.expires)),new i(e.access_token,e.token_type,t,e.scope||[])}save(e=i.storageName){const t={token:this.token,type:this.type,expires:this.expires.toUTCString(),scopes:this.scopes};s.default.secure.set(e,JSON.stringify(t),this.expires)}static recover(e=i.storageName){const t=s.default.secure.get(e);if(!t)return null;const r=JSON.parse(t),a=new i(r.token,r.type,new Date(r.expires),r.scopes||[]);return a.expired?null:a}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>l});var s=r(16),a=r(8),i=r(0),n=r(1);class o{constructor(e,t,r,n,o=null,u=0,c=[]){if(!(0,i.isParentOf)(s.default,e))throw new TypeError("Expected api to be of type Mapcreator");(0,i.isParentOf)(a.default,n)||(n=new a.default(n)),this._api=e,this.route=t,this._Target=r,this._parameters=n,this._pageCount=o,this._rows=u,this._data=c}get api(){return this._api}get route(){return this._route}set route(e){e.startsWith("https://")||e.startsWith("http://")||(e.startsWith("/")||(e=`/${e}`),e=`${this._api.url}${e}`),this._route=e}get Target(){return this._Target}get parameters(){return this._parameters}set parameters(e){this._parameters=e}get page(){return this.parameters.page}get perPage(){return this.parameters.perPage}get sort(){return this.parameters.sort}set sort(e){this.parameters.sort=e}get deleted(){return this.parameters.deleted}set deleted(e){this.parameters.deleted=e}get pageCount(){return this._pageCount}get data(){return this._data}get rows(){return this._rows}get query(){return this.parameters.search}set query(e){this.parameters.search=e}getPage(e=this.page,t=this.perPage){const r=this.parameters.copy();r.page=e,r.perPage=t;const s=this.route.includes("?")?"&":"?",a=this.route+s+r.encode();return(0,n.makeCancelable)((async t=>{const r=await this.api.ky.get(a,{signal:t}),{data:s}=await r.json(),i=Number(r.headers.get("x-paginate-total")||s.length),n=Number(r.headers.get("x-paginate-pages")||1),u=this.parameters.copy();return u.page=e,new o(this.api,this.route,this.Target,u,n,i,s.map((e=>new this.Target(this.api,e))))}))}get hasNext(){return this.page<this.pageCount}get hasPrevious(){return this.page>1}get cacheToken(){return this.parameters.token()}next(){return this.getPage(this.page+1)}previous(){return this.getPage(this.page-1)}}var u=r(77),c=r(3);class l{constructor(e,t,r=null,s={}){if(!(0,i.isParentOf)(c.default,t))throw new TypeError("Target is not a child of ResourceBase");if("function"!=typeof t)throw new TypeError("Target must to be a class not an instance");r&&(this.__baseUrl=r),this._api=e,this._Target=t,this._seedData=s}get baseUrl(){return this.__baseUrl||(this.__baseUrl=this.new().baseUrl),this.__baseUrl}get api(){return this._api}get Target(){return this._Target}new(e={}){return e={...this._seedData,...e},new this.Target(this._api,e)}list(e={}){const t=this._buildResolver(e);return t.getPage(t.page)}lister(e={},t=50){return new u.default(this.api,this.baseUrl,this.Target,e,t,this.Target.resourceUrlKey)}_buildResolver(e={}){const t=typeof e,r=this.baseUrl;if(!["number","object"].includes(t))throw new TypeError(`Expected params to be of type number or object. Got "${t}"`);return"number"===t?this._buildResolver({page:e}):(e instanceof a.default||(e=new a.default(e)),new o(this._api,r,this.Target,e))}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var s=r(21),a=r(2),i=r(4);class n extends a.default{get items(){const e=`${this.url}/items`,t={};return t[this.constructor.foreignKeyName]=this.id,this._proxyResourceList(this._Child,e,t)}get _Child(){throw new s.AbstractError}static get foreignKeyName(){if(!this._fk){let e=this.name;e=(0,i.camel)(e),this._fk=`${e}Id`}return this._fk}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>k});var s=r(30),a=r(7),i=r(76),n=r(18),o=r(13),u=r(43),c=r(19),l=r(14),h=r(37),p=r(3),d=r(65),f=r(32);class g{constructor(e="warn"){this.logLevel=e}getLogLevels(){return["debug","info","warn","error","none"]}log(e,t="info"){"none"!==t&&this._shouldLog(t)&&console[t](e)}debug(e){this.log(e,"debug")}info(e){this.log(e,"info")}warn(e){this.log(e,"warn")}error(e){this.log(e,"error")}get logLevel(){return this._logLevel}set logLevel(e){if(e=e.toLowerCase(),!this.getLogLevels().includes(e))throw new TypeError(`Expected one of ${this.getLogLevels().join(", ")}. Got ${e}`);this._logLevel=e}_shouldLog(e){const t=this.getLogLevels();return t.findIndex((t=>t===e))>=t.findIndex((e=>e===this.logLevel))}}var _=r(0),y=r(1),m=r(78),w=r(66),b=r(5),v=r(24),x=r.n(v);class k extends((0,_.mix)(x(),d.default)){constructor(e=new i.default,t="https://api.mapcreator.io"){if(super(),"string"==typeof e){const t=e;(e=new i.default).token=new o.default(t,"Bearer",new Date("2100-01-01T01:00:00"),["*"])}this.auth=e,this.host=t,this._logger=new g("warn"),this.wrapKy(y.wrapKyCancelable),this.wrapKy(b.wrapKyPrefixUrl,`${this.host}/${this.version}`)}get version(){return"v1"}get auth(){return this._auth}get logger(){return this._logger}set auth(e){if(!(0,_.isParentOf)(n.default,e))throw new TypeError("auth must be an instance of OAuth");this._auth=e}get authenticated(){return this.auth.authenticated}get host(){return this._host}set host(e){e=e.replace(/\/+$/,""),this._host=e,this.auth.host=e}get url(){return`${this.host}/${this.version}`}saveToken(e){this.auth.token.save(e)}async authenticate(){return await this.auth.authenticate(),this}get ky(){var e;if(this._ky)return this._ky;const t={beforeRequest:[e=>{this.authenticated&&e.headers.set("Authorization",this.auth.token.toString())}],afterResponse:[async(e,t,r)=>{if(429!==r.status)return r;const s=1e3*r.headers.get("x-ratelimit-reset")||500;return await(0,y.delay)(s),this._ky(e)},async(e,t,r)=>{if(r.status<400||r.status>=600)return r;const s=await r.json(),a={data:s,request:e,options:t,response:r};if(s.error.validation_errors)throw new m.default(a);const i=new w.default(a);throw"AuthenticationException"===i.type&&this.emit("error",i),i}]};return this._ky=s.default.create({timeout:null!==(e="60000")?e:6e4,retry:0,headers:{Accept:"application/json","X-No-CDN-Redirect":"true"},hooks:t}),this._ky}wrapKy(e,...t){this._ky=e(this.ky,...t);const r=["get","post","put","patch","head","delete"];for(const e of r)this._ky[e]=(t,r)=>this._ky(t,{...r,method:e})}static(e,t=p.default){if("string"==typeof e){const r=e,s=t.name||"AnonymousResource";e=class extends t{static get resourceName(){return Object.getPrototypeOf(this).resourceName||"anonymous"}static get resourcePath(){return r}},Object.defineProperty(e,"name",{value:`${s}_${(0,f.fnv32b)(r)}`})}if((0,_.isParentOf)(p.default,e))return new c.default(this,e);throw new TypeError("Expected Target to be of type string and Constructor to be a ResourceBase constructor")}get choropleths(){return new u.default(this,h.Choropleth)}get vectorChoropleths(){return new u.default(this,h.VectorChoropleth)}get colors(){return this.static(h.Color)}get tags(){return this.static(h.Tag)}get tagTypes(){return this.static(h.TagType)}get contracts(){return this.static(h.Contract)}get dimensions(){return this.static(h.Dimension)}get dimensionSets(){return this.static(h.DimensionSet)}get faqs(){return this.static(h.Faq)}get features(){return this.static(h.Feature)}get featuredMaps(){return new l.default(this,h.Job,"/jobs/featured")}get fonts(){return this.static(h.Font)}get fontFamilies(){return this.static(h.FontFamily)}get highlights(){return new u.default(this,h.Highlight)}get vectorHighlights(){return new u.default(this,h.VectorHighlight)}get insetMaps(){return new u.default(this,h.InsetMap)}get jobs(){return this.static(h.Job)}get jobShares(){return this.static(h.JobShare)}get jobTypes(){return this.static(h.JobType)}get languages(){return this.static(h.Language)}get layers(){return this.static(h.Layer)}get layerFaqs(){return this.static(h.LayerFaq)}get layerGroups(){return this.static(h.LayerGroup)}get mapstyles(){return this.static(h.Mapstyle)}get mapstyleSets(){return this.static(h.MapstyleSet)}get notifications(){return this.static(h.Notification)}get messages(){return this.static(h.Message)}get organisations(){return this.static(h.Organisation)}get permissions(){return this.static(h.Permission)}get productTours(){return this.static(h.ProductTour)}get productTourSteps(){return this.static(h.ProductTourStep)}get roles(){return this.static(h.Role)}get svgs(){return this.static(h.Svg)}get svgSets(){return this.static(h.SvgSet)}get users(){return this.static(h.User)}getSvgSetTypes(){return(0,y.makeCancelable)((async e=>{const{data:t}=await this.ky.get("svgs/sets/types",{signal:e}).json();return new a.Enum(t,!0)}))}getFontStyles(){return(0,y.makeCancelable)((async e=>{const{data:t}=await this.ky.get("fonts/styles",{signal:e}).json();return new a.Enum(t,!0)}))}logout(){return this.auth.logout()}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});var s=r(12),a=r.n(s);class i extends Error{constructor(e,t=""){super(t),a()(this,"error",void 0),this.error=String(e)}toString(){let e=this.error;return e.includes("_")&&(e=e.replace("_"," ").replace(/^./,(e=>e.toUpperCase()))),this.message?`${e}: ${this.message}`:e}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>h});var s=r(12),a=r.n(s),i=r(30),n=r(21),o=r(22),u=r(13),c=r(42),l=r(1);class h{constructor(e,t=["*"]){if(a()(this,"token",null),a()(this,"path","/"),a()(this,"host","https://api.mapcreator.io"),this.constructor===h)throw new n.AbstractClassError;this.clientId=String(e),this.scopes=t,this.clientId&&(this.token=u.default.recover())}get authenticated(){return null!==this.token&&!this.token.expired}authenticate(){throw new n.AbstractMethodError}forget(){c.default.clean(),o.default.secure.remove(u.default.storageName),this.token=null}logout(){if(!this.token)return(0,l.makeCancelable)((()=>{}));const e=`${this.host}/oauth/logout`;return(0,l.makeCancelable)((async t=>{await i.default.post(e,{headers:{Accept:"application/json",Authorization:this.token.toString()},signal:t}),this.forget()}))}importToken(e,t="Bearer",r=432e3,s=[]){this.token=new u.default(e,t,r,s)}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var s=r(5),a=r(14),i=r(1);class n extends a.default{_parseSelector(e){if(""===e||null===e)return{};switch(typeof e){case"number":case"string":return{[this.Target.resourceUrlKey]:e};case"object":return e;default:return{}}}get(e,t=null){return(0,i.makeCancelable)((async r=>{const a={...this._seedData,...this._parseSelector(e)};let i=this.new(a).url;if("string"==typeof t){const e=i.includes("?")?"&":"?";i+=e+(0,s.encodeQueryString)({deleted:t})}const{data:n}=await this.api.ky.get(i,{signal:r}).json();return this.new(n)}))}select(e){const t={...this._seedData,...this._parseSelector(e)};return this.new(t)}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});var s=r(14),a=r(1);class i extends s.default{constructor(e,t,r){const s=r.resourceName.replace(/s+$/,"");super(e,r,`${t.url}/${s}s`)}sync(e){return this._modifyResourceLink(e,"PATCH")}attach(e){return this._modifyResourceLink(e,"POST")}detach(e){return this._modifyResourceLink(e,"DELETE")}attachAll(){return(0,a.makeCancelable)((async e=>{await this.api.ky.post(`${this.baseUrl}/all`,{signal:e})}))}detachAll(){return(0,a.makeCancelable)((async e=>{await this.api.ky.delete(`${this.baseUrl}/all`,{signal:e})}))}_modifyResourceLink(e,t){Array.isArray(e)||(e=[e]);const r=e.map((e=>i._getKeyValue(e))).map(Number).filter((e=>!Number.isNaN(e)));return(0,a.makeCancelable)((async e=>{await this.api.ky(this.baseUrl,{method:t,signal:e,json:{keys:r}})}))}static _getKeyValue(e){if(["number","string"].includes(typeof e))return e;const t=e.constructor.resourceUrlKey||"id";if(void 0!==e[t])return e[t];throw new TypeError("Expected items to be of type Array<ResourceBase>, Array<number>, ResourceBase or number}")}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{AbstractError:()=>s,AbstractClassError:()=>a,AbstractMethodError:()=>i});class s extends Error{constructor(e="Unimplemented"){super(e)}}class a extends s{constructor(){super("Can not make an instance of an abstract class")}}class i extends s{constructor(){super("Can not call an abstract method")}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>p});var s=r(33),a=r(9),i=r(23);class n extends i.default{constructor(e="_m4n_"){super(),this.__prefix=e}get _prefix(){return this.__prefix}static get secure(){return"https:"===window.location.protocol}static get available(){return!(0,a.isNode)()}set(e,t,r=new Date("2050-01-01")){e=encodeURIComponent(this._prefix+e),t=encodeURIComponent(t),r instanceof Date&&(r=r.toUTCString());let s=`${e}=${t}; expires=${r}`;n.secure&&(s+="; secure"),document.cookie=s}get(e){return e=this._prefix+e,this._toObject()[e]}remove(e){this.set(e,"",new Date(1970))}keys(){const e=new RegExp(`^${this._prefix}`);return Object.keys(this._toObject()).map((t=>t.replace(e,"")))}_toObject(){const e={};return document.cookie.split(";").map((e=>e.trim().split("=").map(decodeURIComponent))).filter((e=>e[0].startsWith(this._prefix))).forEach((t=>{e[t[0]]=t[1]})),e}}var o=r(12),u=r.n(o);class c extends i.default{static get available(){return(0,a.isNode)()&&"test"==="MISSING_ENV_VAR".NODE_ENV}static get secure(){return!0}set(e,t){this.constructor._data[e]=t}get(e){return this.constructor._data[e]}remove(e){delete this.constructor._data[e]}keys(){return Object.keys(this.constructor._data)}}u()(c,"_data",{});var l=r(63);class h extends i.default{static get _prefix(){return"_m4n_"}static get available(){return!(0,a.isNode)()}set(e,t){e=h._prefix+e,window.localStorage.setItem(e,t)}get(e){return e=h._prefix+e,window.localStorage.getItem(e)}remove(e){e=h._prefix+e,window.localStorage.removeItem(e)}keys(){const e=[],t=window.localStorage,r=h._prefix;for(let s=0;s<t.length;s++){let a=t.key(s);a.startsWith(r)&&(a=a.replace(new RegExp(`^${r}`),""),e.push(a))}return e}}class p extends s.default{static get available(){return[c,h,l.default].filter((e=>e.available))}static get localStorage(){return new h}static get cookies(){return new n}static get file(){return new l.default}static get dummy(){return new c}static get best(){return new this.available[0]}static get secure(){const e=this.available.filter((e=>e.secure))[0];return void 0===e?p.best:new e}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var s=r(21);class a{constructor(){if(this.constructor===a)throw new s.AbstractClassError;if(!this.constructor.available)throw new Error(`${this.constructor.name} is unavailable`)}static get available(){return!1}static get secure(){return!1}set(e,t){throw new s.AbstractMethodError}get(e){throw new s.AbstractMethodError}remove(e){throw new s.AbstractMethodError}clear(){this.keys().map((e=>this.remove(e)))}keys(){throw new s.AbstractMethodError}}},e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,s=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(r,s){function a(r){e.removeListener(t,i),s(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",a),r([].slice.call(arguments))}g(e,t,i,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&g(e,"error",t,r)}(e,a,{once:!0})}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var n=10;function o(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function c(e,t,r,s){var a,i,n,c;if(o(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),n=i[t]),void 0===n)n=i[t]=r,++e._eventsCount;else if("function"==typeof n?n=i[t]=s?[r,n]:[n,r]:s?n.unshift(r):n.push(r),(a=u(e))>0&&n.length>a&&!n.warned){n.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+n.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=n.length,c=l,console&&console.warn&&console.warn(c)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,r){var s={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},a=l.bind(s);return a.listener=r,s.wrapFn=a,a}function p(e,t,r){var s=e._events;if(void 0===s)return[];var a=s[t];return void 0===a?[]:"function"==typeof a?r?[a.listener||a]:[a]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(a):f(a,a.length)}function d(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function f(e,t){for(var r=new Array(t),s=0;s<t;++s)r[s]=e[s];return r}function g(e,t,r,s){if("function"==typeof e.on)s.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function a(i){s.once&&e.removeEventListener(t,a),r(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return n},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");n=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return u(this)},i.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var a="error"===e,i=this._events;if(void 0!==i)a=a&&void 0===i.error;else if(!a)return!1;if(a){var n;if(t.length>0&&(n=t[0]),n instanceof Error)throw n;var o=new Error("Unhandled error."+(n?" ("+n.message+")":""));throw o.context=n,o}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)s(u,this,t);else{var c=u.length,l=f(u,c);for(r=0;r<c;++r)s(l[r],this,t)}return!0},i.prototype.addListener=function(e,t){return c(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return c(this,e,t,!0)},i.prototype.once=function(e,t){return o(t),this.on(e,h(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return o(t),this.prependListener(e,h(this,e,t)),this},i.prototype.removeListener=function(e,t){var r,s,a,i,n;if(o(t),void 0===(s=this._events))return this;if(void 0===(r=s[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete s[e],s.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(a=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){n=r[i].listener,a=i;break}if(a<0)return this;0===a?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,a),1===r.length&&(s[e]=r[0]),void 0!==s.removeListener&&this.emit("removeListener",e,n||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,r,s;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var a,i=Object.keys(r);for(s=0;s<i.length;++s)"removeListener"!==(a=i[s])&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(s=t.length-1;s>=0;s--)this.removeListener(e,t[s]);return this},i.prototype.listeners=function(e){return p(this,e,!0)},i.prototype.rawListeners=function(e){return p(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},i.prototype.listenerCount=d,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var s=r(9);class a{constructor(e,t="application/octet-stream",r="Untitled"){this._data=e,this._type=t,this._fileName=r}static async fromResponse(e){const t=await e.arrayBuffer();let r;const s=e.headers.get("content-type");let i;s&&(r=s.split(";")[0].trim());const n=e.headers.get("content-disposition");if(n){const e=/filename[^;=\n]*=((['"])(.*?)\2|([^;\s]*))/i.exec(n);e&&(i=e[3]||e[4])}return new a(t,r,i)}get data(){return this._data}get type(){return this._type}get fileName(){return this._fileName}get size(){return this.data.length}createObjectUrl(){if((0,s.isNode)())throw new Error("Object urls are not supported by Node");return URL.createObjectURL(this.createBlob())}createBlob(){return new Blob([this.data],{type:this.type})}toDataUri(){return`data:${this.type};base64,${this.toBase64()}`}toBase64(){return function(e){let t="";const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=new Uint8Array(e),a=s.byteLength,i=a%3,n=a-i;let o,u,c,l,h;for(let e=0;e<n;e+=3)h=65536*s[e]|256*s[e+1]|s[e+2],o=(16515072&h)>>18,u=(258048&h)>>12,c=(4032&h)>>6,l=63&h,t+=r[o]+r[u]+r[c]+r[l];return 1===i?(h=s[n],o=(252&h)>>2,u=(3&h)<<4,t+=`${r[o]+r[u]}==`):2===i&&(h=256*s[n]|s[n+1],o=(64512&h)>>10,u=(1008&h)>>4,c=(15&h)<<2,t+=`${r[o]+r[u]+r[c]}=`),t}(this.data)}toString(){return this.data.toString()}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});var s=r(7),a=r(2);class i extends a.default{save(){throw new Error("Unsupported method JobShare::save")}static get visibility(){return s.JobShareVisibility}static get resourcePath(){return"/jobs/shares/{id}"}static get resourceName(){return"shares"}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>o});var s=r(54),a=r(6),i=r(0),n=r(2);class o extends((0,i.mix)(n.default,a.default,s.default)){static get resourceName(){return"layers"}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>l});var s=r(6),a=r(0),i=r(15),n=r(70),o=r(19),u=r(10);class c extends u.default{static get resourcePath(){return"/mapstyles/sets/{mapstyle_set_id}/colors/{id}"}static get resourceName(){return"mapstyle-set-colors"}get baseUrl(){return`${this._api.url}/mapstyles/sets/${this.mapstyleSetId}/colors`}}class l extends((0,a.mix)(i.default,s.default)){static get resourcePath(){return"/mapstyles/sets/{id}"}static get resourceName(){return"mapstyle-sets"}get _Child(){return n.default}get colors(){const e={mapstyleSetId:this.id};return new o.default(this.api,c,null,e)}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var s=r(6),a=r(0),i=r(10);class n extends((0,a.mix)(i.default,s.default)){static get resourceName(){return"tags"}static get parentKey(){return"tag_type_id"}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>E});const s={},a=e=>"undefined"!=typeof self&&self&&e in self?self:"undefined"!=typeof window&&window&&e in window?window:"undefined"!=typeof global&&global&&e in global?global:"undefined"!=typeof globalThis&&globalThis?globalThis:void 0,i=["Headers","Request","Response","ReadableStream","fetch","AbortController","FormData"];for(const e of i)Object.defineProperty(s,e,{get(){const t=a(e),r=t&&t[e];return"function"==typeof r?r.bind(t):r}});const n=e=>null!==e&&"object"==typeof e,o="function"==typeof s.AbortController,u="function"==typeof s.ReadableStream,c="function"==typeof s.FormData,l=(e,t)=>{const r=new s.Headers(e),a=t instanceof s.Headers,i=new s.Headers(t);for(const[e,t]of i)a&&"undefined"===t||void 0===t?r.delete(e):r.set(e,t);return r},h=(...e)=>{let t={},r={};for(const s of e){if(Array.isArray(s))Array.isArray(t)||(t=[]),t=[...t,...s];else if(n(s)){for(let[e,r]of Object.entries(s))n(r)&&Reflect.has(t,e)&&(r=h(t[e],r)),t={...t,[e]:r};n(s.headers)&&(r=l(r,s.headers))}t.headers=r}return t},p=["get","post","put","patch","head","delete"],d={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},f=[413,429,503],g=Symbol("stop");class _ extends Error{constructor(e){super(e.statusText||String(0===e.status||e.status?e.status:"Unknown response error")),this.name="HTTPError",this.response=e}}class y extends Error{constructor(e){super("Request timed out"),this.name="TimeoutError",this.request=e}}const m=e=>new Promise((t=>setTimeout(t,e))),w=e=>p.includes(e)?e.toUpperCase():e,b={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:f},v=(e={})=>{if("number"==typeof e)return{...b,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");return{...b,...e,afterStatusCodes:f}},x=2147483647;class k{constructor(e,t={}){if(this._retryCount=0,this._input=e,this._options={credentials:this._input.credentials||"same-origin",...t,headers:l(this._input.headers,t.headers),hooks:h({beforeRequest:[],beforeRetry:[],afterResponse:[]},t.hooks),method:w(t.method||this._input.method),prefixUrl:String(t.prefixUrl||""),retry:v(t.retry),throwHttpErrors:!1!==t.throwHttpErrors,timeout:void 0===t.timeout?1e4:t.timeout},"string"!=typeof this._input&&!(this._input instanceof URL||this._input instanceof s.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&"string"==typeof this._input){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(o&&(this.abortController=new s.AbortController,this._options.signal&&this._options.signal.addEventListener("abort",(()=>{this.abortController.abort()})),this._options.signal=this.abortController.signal),this.request=new s.Request(this._input,this._options),this._options.searchParams){const e=new URL(this.request.url);e.search=new URLSearchParams(this._options.searchParams),!(c&&this._options.body instanceof s.FormData||this._options.body instanceof URLSearchParams)||this._options.headers&&this._options.headers["content-type"]||this.request.headers.delete("content-type"),this.request=new s.Request(new s.Request(e,this.request),this._options)}void 0!==this._options.json&&(this._options.body=JSON.stringify(this._options.json),this.request.headers.set("content-type","application/json"),this.request=new s.Request(this.request,{body:this._options.body}));const r=async()=>{if(this._options.timeout>x)throw new RangeError("The `timeout` option cannot be greater than 2147483647");await m(1);let e=await this._fetch();for(const t of this._options.hooks.afterResponse){const r=await t(this.request,this._options,e.clone());r instanceof s.Response&&(e=r)}if(!e.ok&&this._options.throwHttpErrors)throw new _(e);if(this._options.onDownloadProgress){if("function"!=typeof this._options.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!u)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return this._stream(e.clone(),this._options.onDownloadProgress)}return e},a=this._options.retry.methods.includes(this.request.method.toLowerCase())?this._retry(r):r();for(const[e,t]of Object.entries(d))a[e]=async()=>{this.request.headers.set("accept",this.request.headers.get("accept")||t);const r=(await a).clone();return"json"===e&&204===r.status?"":r[e]()};return a}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount<this._options.retry.limit&&!(e instanceof y)){if(e instanceof _){if(!this._options.retry.statusCodes.includes(e.response.status))return 0;const t=e.response.headers.get("Retry-After");if(t&&this._options.retry.afterStatusCodes.includes(e.response.status)){let e=Number(t);return Number.isNaN(e)?e=Date.parse(t)-Date.now():e*=1e3,void 0!==this._options.retry.maxRetryAfter&&e>this._options.retry.maxRetryAfter?0:e}if(413===e.response.status)return 0}return.3*2**(this._retryCount-1)*1e3}return 0}async _retry(e){try{return await e()}catch(t){const r=Math.min(this._calculateRetryDelay(t),x);if(0!==r&&this._retryCount>0){await m(r);for(const e of this._options.hooks.beforeRetry){if(await e({request:this.request,options:this._options,error:t,response:t.response.clone(),retryCount:this._retryCount})===g)return}return this._retry(e)}if(this._options.throwHttpErrors)throw t}}async _fetch(){for(const e of this._options.hooks.beforeRequest){const t=await e(this.request,this._options);if(t instanceof Request){this.request=t;break}if(t instanceof Response)return t}return!1===this._options.timeout?s.fetch(this.request.clone()):(e=this.request.clone(),t=this._options.timeout,r=this.abortController,new Promise(((a,i)=>{const n=setTimeout((()=>{r&&r.abort(),i(new y(e))}),t);s.fetch(e).then(a).catch(i).then((()=>{clearTimeout(n)}))})));var e,t,r}_stream(e,t){const r=Number(e.headers.get("content-length"))||0;let a=0;return new s.Response(new s.ReadableStream({start(s){const i=e.body.getReader();t&&t({percent:0,transferredBytes:0,totalBytes:r},new Uint8Array),async function e(){const{done:n,value:o}=await i.read();if(n)s.close();else{if(t){a+=o.byteLength;t({percent:0===r?0:a/r,transferredBytes:a,totalBytes:r},o)}s.enqueue(o),e()}}()}}))}}const j=(...e)=>{for(const t of e)if((!n(t)||Array.isArray(t))&&void 0!==t)throw new TypeError("The `options` argument must be an object");return h({},...e)},P=e=>{const t=(t,r)=>new k(t,j(e,r));for(const r of p)t[r]=(t,s)=>new k(t,j(e,s,{method:r}));return t.HTTPError=_,t.TimeoutError=y,t.create=e=>P(j(e)),t.extend=t=>P(j(e,t)),t.stop=g,t},E=P()},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});class s{initializer(){}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{fnv32b:()=>i,hashObject:()=>n});var s=r(38),a=r.n(s);function i(e){let t=e.split("").map((e=>e.charCodeAt(0))).reduce(((e,t)=>(e^=t)+(e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24)),2166136261);return t^=t<<3,t+=t>>5,t^=t<<4,t+=t>>17,t^=t<<25,t+=t>>6,`0000000${(t>>>0).toString(16)}`.substr(-8)}function n(e){return i(a()(e))}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var s=r(62);class a{constructor(){throw new s.default}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var s=r(0),a=r(14),i=r(1);class n extends a.default{constructor(e,t){super(e,r(45).default,`${t.url}/organisations`,{}),this._parent=t}get parent(){return this._parent}sync(e){return this._modifyLink(e,"PATCH",this.Target)}attach(e){return this._modifyLink(e,"POST",this.Target)}detach(e){return this._modifyLink(e,"DELETE",this.Target)}attachAll(){return(0,i.makeCancelable)((async e=>{await this.api.ky.post(`${this.baseUrl}/all`,{signal:e})}))}detachAll(){return(0,i.makeCancelable)((async e=>{await this.api.ky.delete(`${this.baseUrl}/all`,{signal:e})}))}_modifyLink(e,t,r,a=null){if(Array.isArray(e)||(e=[e]),!a){a=`${r.resourceName.replace(/s+$/,"")}s`}const n=e.map((e=>"number"==typeof e?e:e.id)).map(Number);if(!(0===n.filter((e=>!(0,s.isParentOf)(r,e)&&!Number.isFinite(e))).length))throw new TypeError(`Array must contain either Numbers (resource id) or "${r.name}".`);const o=`${this.parent.url}/${a}`;return(0,i.makeCancelable)((async e=>{await this.api.ky(o,{method:t,signal:e,json:{keys:n}})}))}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{AbstractClassError:()=>s.AbstractClassError,AbstractError:()=>s.AbstractError,AbstractMethodError:()=>s.AbstractMethodError,ApiError:()=>a.default,GeoError:()=>c.default,NodeError:()=>n,OAuthError:()=>o.default,StaticClassError:()=>u.default,ValidationError:()=>i.default});var s=r(21),a=r(66),i=r(78);class n extends Error{}var o=r(17),u=r(62),c=r(44)},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>u});var s=r(2),a=r(3);class i extends a.default{}var n=r(1),o=r(4);class u extends s.default{static get resourceName(){return"messages"}toObject(e=!1){const t=super.toObject(e);return t.variants=t.variants.map((t=>{if(t instanceof i)return t.toObject(e);const r=e?o.camel:o.snake,s={},a=Object.keys(t);for(const e of a)s[r(e)]=t[e];return s})),t}_guessType(e,t){return"variants"===e?Array.from(t).map((e=>new i(this.api,e))):super._guessType(e,t)}_buildCreateData(){return this.toObject()}_update(){return(0,n.makeCancelable)((async e=>{const t=this.toObject();return await this.api.ky.patch(this.url,{json:t,signal:e}),Object.assign(this._baseProperties,this._properties),this._properties={},"updated_at"in this._baseProperties&&(this._baseProperties.updated_at=new Date),this}))}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{Choropleth:()=>n,Color:()=>o.default,Contract:()=>u.default,Dimension:()=>c.default,DimensionSet:()=>l.default,Domain:()=>h.default,Faq:()=>d,Feature:()=>f.default,Font:()=>g.default,FontFamily:()=>_.default,Highlight:()=>y,InsetMap:()=>m,Job:()=>w.default,JobResult:()=>b.default,JobRevision:()=>v.default,JobShare:()=>x.default,JobType:()=>k.default,Language:()=>j.default,Layer:()=>P.default,LayerFaq:()=>O,LayerGroup:()=>N.default,Mapstyle:()=>S.default,MapstyleSet:()=>C.default,Message:()=>R.default,Notification:()=>T.default,Organisation:()=>$.default,Permission:()=>A.default,ProductTour:()=>q,ProductTourStep:()=>D,Role:()=>F.default,Svg:()=>M.default,SvgSet:()=>I.default,Tag:()=>B.default,TagType:()=>J,User:()=>K.default,VectorChoropleth:()=>Q,VectorHighlight:()=>W,base:()=>H});var s=r(25),a=r(3),i=r(1);class n extends a.default{static get resourceName(){return"choropleths"}getJson(){return(0,i.makeCancelable)((e=>this.api.ky.get(`${this.url}/json`,{signal:e}).json()))}downloadPreview(){return(0,i.makeCancelable)((async e=>{const t=await this.api.ky.get(`${this.url}/preview`,{signal:e});return s.default.fromResponse(t)}))}}var o=r(46),u=r(67),c=r(48),l=r(47),h=r(68),p=r(2);class d extends p.default{static get resourceName(){return"faqs"}}var f=r(49),g=r(51),_=r(50);class y extends a.default{static get resourceName(){return"highlights"}}class m extends a.default{static get resourceName(){return"inset-maps"}getJson(){return(0,i.makeCancelable)((e=>this.api.ky.get(`${this.url}/json`,{signal:e}).json()))}}var w=r(52),b=r(53),v=r(69),x=r(26),k=r(55),j=r(71),P=r(27),E=r(10);class O extends E.default{static get resourceName(){return"layer-faqs"}static get parentKey(){return"layer_group_id"}}var N=r(74),S=r(70),C=r(28),R=r(36),T=r(72),$=r(45),A=r(59),L=r(0),U=r(15);class D extends((0,L.mix)(E.default)){static get resourceName(){return"product-tours/steps"}static get parentKey(){return"product_tour_id"}}class q extends((0,L.mix)(U.default)){static get resourcePath(){return"/product-tours/{id}"}static get resourceName(){return"product-tours"}get _Child(){return D}}var F=r(73),M=r(57),I=r(56),B=r(29);class J extends p.default{static get resourcePath(){return"/tags/types/{id}"}static get resourceName(){return"tag-types"}get tags(){return this._proxyResourceList(B.default,`${this.url}/tags`)}}var K=r(58);class W extends a.default{static get resourceName(){return"highlights/vector"}}class Q extends a.default{static get resourceName(){return"choropleths/vector"}}const H={CrudBase:p.default,CrudSetBase:U.default,ResourceBase:a.default}},(e,t,r)=>{var s="undefined"!=typeof JSON?JSON:r(61);e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r=t.space||"";"number"==typeof r&&(r=Array(r+1).join(" "));var n,o="boolean"==typeof t.cycles&&t.cycles,u=t.replacer||function(e,t){return t},c=t.cmp&&(n=t.cmp,function(e){return function(t,r){var s={key:t,value:e[t]},a={key:r,value:e[r]};return n(s,a)}}),l=[];return function e(t,n,h,p){var d=r?"\n"+new Array(p+1).join(r):"",f=r?": ":":";if(h&&h.toJSON&&"function"==typeof h.toJSON&&(h=h.toJSON()),void 0!==(h=u.call(t,n,h))){if("object"!=typeof h||null===h)return s.stringify(h);if(a(h)){for(var g=[],_=0;_<h.length;_++){var y=e(h,_,h[_],p+1)||s.stringify(null);g.push(d+r+y)}return"["+g.join(",")+d+"]"}if(-1!==l.indexOf(h)){if(o)return s.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}l.push(h);var m=i(h).sort(c&&c(h));for(g=[],_=0;_<m.length;_++){var w=e(h,n=m[_],h[n],p+1);if(w){var b=s.stringify(n)+f+w;g.push(d+r+b)}}return l.splice(l.indexOf(h),1),"{"+g.join(",")+d+"}"}}({"":e},"",e,0)};var a=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},i=Object.keys||function(e){var t=Object.prototype.hasOwnProperty||function(){return!0},r=[];for(var s in e)t.call(e,s)&&r.push(s);return r}},e=>{var t,r,s,a,i={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},n=function(e){throw{name:"SyntaxError",message:e,at:t,text:s}},o=function(e){return e&&e!==r&&n("Expected '"+e+"' instead of '"+r+"'"),r=s.charAt(t),t+=1,r},u=function(){var e,t="";for("-"===r&&(t="-",o("-"));r>="0"&&r<="9";)t+=r,o();if("."===r)for(t+=".";o()&&r>="0"&&r<="9";)t+=r;if("e"===r||"E"===r)for(t+=r,o(),"-"!==r&&"+"!==r||(t+=r,o());r>="0"&&r<="9";)t+=r,o();if(e=+t,isFinite(e))return e;n("Bad number")},c=function(){var e,t,s,a="";if('"'===r)for(;o();){if('"'===r)return o(),a;if("\\"===r)if(o(),"u"===r){for(s=0,t=0;t<4&&(e=parseInt(o(),16),isFinite(e));t+=1)s=16*s+e;a+=String.fromCharCode(s)}else{if("string"!=typeof i[r])break;a+=i[r]}else a+=r}n("Bad string")},l=function(){for(;r&&r<=" ";)o()};a=function(){switch(l(),r){case"{":return function(){var e,t={};if("{"===r){if(o("{"),l(),"}"===r)return o("}"),t;for(;r;){if(e=c(),l(),o(":"),Object.hasOwnProperty.call(t,e)&&n('Duplicate key "'+e+'"'),t[e]=a(),l(),"}"===r)return o("}"),t;o(","),l()}}n("Bad object")}();case"[":return function(){var e=[];if("["===r){if(o("["),l(),"]"===r)return o("]"),e;for(;r;){if(e.push(a()),l(),"]"===r)return o("]"),e;o(","),l()}}n("Bad array")}();case'"':return c();case"-":return u();default:return r>="0"&&r<="9"?u():function(){switch(r){case"t":return o("t"),o("r"),o("u"),o("e"),!0;case"f":return o("f"),o("a"),o("l"),o("s"),o("e"),!1;case"n":return o("n"),o("u"),o("l"),o("l"),null}n("Unexpected '"+r+"'")}()}},e.exports=function(e,i){var o;return s=e,t=0,r=" ",o=a(),l(),r&&n("Syntax error"),"function"==typeof i?function e(t,r){var s,a,n=t[r];if(n&&"object"==typeof n)for(s in n)Object.prototype.hasOwnProperty.call(n,s)&&(void 0!==(a=e(n,s))?n[s]=a:delete n[s]);return i.call(t,r,n)}({"":o},""):o}},e=>{var t,r,s,a=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,i={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function n(e){return a.lastIndex=0,a.test(e)?'"'+e.replace(a,(function(e){var t=i[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function o(e,a){var i,u,c,l,h,p=t,d=a[e];switch(d&&"object"==typeof d&&"function"==typeof d.toJSON&&(d=d.toJSON(e)),"function"==typeof s&&(d=s.call(a,e,d)),typeof d){case"string":return n(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(t+=r,h=[],"[object Array]"===Object.prototype.toString.apply(d)){for(l=d.length,i=0;i<l;i+=1)h[i]=o(i,d)||"null";return c=0===h.length?"[]":t?"[\n"+t+h.join(",\n"+t)+"\n"+p+"]":"["+h.join(",")+"]",t=p,c}if(s&&"object"==typeof s)for(l=s.length,i=0;i<l;i+=1)"string"==typeof(u=s[i])&&(c=o(u,d))&&h.push(n(u)+(t?": ":":")+c);else for(u in d)Object.prototype.hasOwnProperty.call(d,u)&&(c=o(u,d))&&h.push(n(u)+(t?": ":":")+c);return c=0===h.length?"{}":t?"{\n"+t+h.join(",\n"+t)+"\n"+p+"}":"{"+h.join(",")+"}",t=p,c}}e.exports=function(e,a,i){var n;if(t="",r="","number"==typeof i)for(n=0;n<i;n+=1)r+=" ";else"string"==typeof i&&(r=i);if(s=a,a&&"function"!=typeof a&&("object"!=typeof a||"number"!=typeof a.length))throw new Error("JSON.stringify");return o("",{"":e})}},e=>{e.exports="object"==typeof self?self.FormData:window.FormData},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var s=r(22),a=r(33);class i extends a.default{static uuid4(){let e=(new Date).getTime();return"undefined"!=typeof performance&&"function"==typeof performance.now&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{const r=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?r:3&r|8).toString(16)}))}static nil(){return"0000000-0000-0000-0000-000000000000"}}class n extends a.default{static get prefix(){return"oauth_state_"}static generate(){const e=i.uuid4(),t=n.prefix+e;return s.default.best.set(t,Date.now()),e}static validate(e,t=!0){const r=s.default.best,a=n.prefix+e,i=void 0!==r.get(a);return t&&i&&r.remove(a),i}static clean(){const e=Object.keys(this.list());for(const t of e)s.default.best.remove(n.prefix+t)}static list(){const e=s.default.best;return e.keys().filter((e=>e.startsWith(n.prefix))).map((e=>e.replace(n.prefix,""))).reduce(((t,r)=>(t[r]=e.get(r),t)),{})}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>u});var s=r(44),a=r(8),i=r(64),n=r(19),o=r(1);class u extends n.default{constructor(e,t,r=null,s={},{hasForPoint:a=!0,hasForBoundary:i=!0}={}){super(e,t,r,s),this._hasForPoint=a,this._hasForBoundary=i}get hasForPoint(){return this._hasForPoint}get hasForBoundary(){return this._hasForBoundary}forBoundary({topLeft:e,bottomRight:t},r=a.default.perPage){if(!this.hasForBoundary)throw new s.default(`${this.Target.name} does not support the operation forBoundary`);const n=new i.GeoBoundary(e,t);if(r>a.default.maxPerPage)throw new TypeError(`Invalid resource limit ${r}, maximum allowed is ${a.default.maxPerPage}`);const u=`${this.new().baseUrl}/for-boundary?per_page=${r}`;return(0,o.makeCancelable)((async e=>{const{data:t}=await this.api.ky.post(u,{json:{boundary:n},signal:e}).json();return t.map((e=>this.new(e)))}))}forPoint({lat:e,lng:t},r=a.default.perPage){if(!this.hasForPoint)throw new s.default(`${this.Target.name} does not support the operation forPoint`);const n=new i.GeoPoint(e,t);if(r>a.default.maxPerPage)throw new TypeError(`Invalid resource limit ${r}, maximum allowed is ${a.default.maxPerPage}`);const u=`${this.new().baseUrl}/for-point`;return(0,o.makeCancelable)((async e=>{const{data:t}=await this.api.ky.post(u,{json:{limit:r,point:n},signal:e}).json();return t.map((e=>this.new(e)))}))}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});class s extends Error{}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>x});var s=r(20),a=r(2),i=r(46),n=r(67),o=r(47),u=r(68),c=r(49),l=r(50),h=r(52),p=r(26),d=r(55),f=r(27),g=r(28),_=r(56),y=r(29),m=r(58),w=r(1),b=r(5),v=r(74);class x extends a.default{static get resourceName(){return"organisations"}get fontFamilies(){return new s.default(this.api,this,l.default)}get dimensionSets(){return new s.default(this.api,this,o.default)}get mapstyleSets(){return new s.default(this.api,this,g.default)}get svgSets(){return new s.default(this.api,this,_.default)}get colors(){return new s.default(this.api,this,i.default)}get tags(){return new s.default(this.api,this,y.default)}get features(){return new s.default(this.api,this,c.default)}get layers(){return new s.default(this.api,this,f.default)}get layerGroups(){return new s.default(this.api,this,v.default)}get jobs(){return this._proxyResourceList(h.default)}get jobTypes(){return new s.default(this.api,this,d.default)}get jobShares(){return this._proxyResourceList(p.default)}get users(){return this._proxyResourceList(m.default)}get contracts(){return this._proxyResourceList(n.default)}get domains(){return this._proxyResourceList(u.default)}getTree(e=null){return(0,w.makeCancelable)((async t=>{let r=`${this.url}/tree`;if("string"==typeof e){const t=r.includes("?")?"&":"?";r+=t+(0,b.encodeQueryString)({deleted:e})}const{data:s}=await this.api.ky.get(r,{signal:t}).json();return s.map((e=>this._parseTree(e)))}))}_parseTree(e){const t=new this.constructor(this._api,e);return t.children=t.children.map((e=>this._parseTree(e))),t}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var s=r(2),a=r(6),i=r(0);class n extends((0,i.mix)(s.default,a.default)){static get resourceName(){return"colors"}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>o});var s=r(15),a=r(48),i=r(6),n=r(0);class o extends((0,n.mix)(s.default,i.default)){static get resourcePath(){return"/dimensions/sets/{id}"}static get resourceName(){return"dimension-sets"}get _Child(){return a.default}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var s=r(10);class a extends s.default{static get resourceName(){return"dimensions"}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var s=r(2),a=r(6),i=r(0);class n extends((0,i.mix)(s.default,a.default)){static get resourceName(){return"features"}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>o});var s=r(6),a=r(0),i=r(15),n=r(51);class o extends((0,a.mix)(i.default,s.default)){static get resourcePath(){return"/fonts/families/{id}"}static get resourceName(){return"font-families"}get _Child(){return n.default}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var s=r(10);class a extends s.default{static get resourceName(){return"fonts"}static get parentKey(){return"font_family_id"}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>d});var s=r(19),a=r(25),i=r(2),n=r(53),o=r(69),u=r(8),c=r(5),l=r(7),h=r(1),p=r(26);class d extends i.default{get results(){return this._proxyResourceList(n.default,`${this.url}/results`)}get revisions(){const e={jobId:this.id};return new s.default(this.api,o.default,null,e)}static get resourceName(){return"jobs"}get previewUrl(){return`${this.url}/preview`}get lastArchiveUrl(){return`${this.url}/output`}downloadPreview(e=u.default.deleted||l.DeletedState.NONE){const t=`${this.previewUrl}?${(0,c.encodeQueryString)({deleted:e})}`;return(0,h.makeCancelable)((async e=>{const r=await this.api.ky.get(t,{signal:e});return a.default.fromResponse(r)}))}downloadOutput(e=u.default.deleted||l.DeletedState.NONE){const t=`${this.lastArchiveUrl}?${(0,c.encodeQueryString)({deleted:e})}`;return(0,h.makeCancelable)((async e=>{const r=await this.api.ky.get(t,{signal:e});return a.default.fromResponse(r)}))}getOutputUrl(e=u.default.deleted||l.DeletedState.NONE){const t=`${this.url}/output-url?${(0,c.encodeQueryString)({deleted:e})}`;return(0,h.makeCancelable)((async e=>{const{data:r}=await this.api.ky.get(t,{signal:e}).json();return r.url}))}share(e=p.default.visibility.PRIVATE,t=u.default.deleted||l.DeletedState.NONE){if(e=e.toLowerCase(),!p.default.visibility.values().includes(e))throw new Error(`Unknown visibility '${e}'`);const r=`${this.url}/share?${(0,c.encodeQueryString)({deleted:t})}`;return(0,h.makeCancelable)((async t=>{const{data:s}=await this.api.ky.post(r,{json:{visibility:e},signal:t}).json();return new p.default(this._api,s)}))}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>c});var s=r(25),a=r(3),i=r(8),n=r(5),o=r(7),u=r(1);class c extends a.default{static get resourcePath(){return"/jobs/{job_id}/revisions/{revision}/result"}static get resourceName(){return"job-result"}get job(){return this.api.jobs.get(this.jobId)}get jobRevision(){return this.api.jobs.select(this.jobId).revisions.get(this.id)}get outputUrl(){return`${this.url}/output`}downloadOutput(e=i.default.deleted||o.DeletedState.NONE){const t=`${this.outputUrl}?${(0,n.encodeQueryString)({deleted:e})}`;return(0,u.makeCancelable)((async e=>{const r=await this.api.ky.get(t,{signal:e});return s.default.fromResponse(r)}))}get outputUrlUrl(){return`${this.url}/output-url`}getOutputUrl(e=i.default.deleted||o.DeletedState.NONE){const t=`${this.outputUrlUrl}?${(0,n.encodeQueryString)({deleted:e})}`;return(0,u.makeCancelable)((async e=>{const{data:r}=await this.api.ky.get(t,{signal:e}).json();return r.url}))}get logUrl(){return`${this.url}/log`}downloadLog(e=i.default.deleted||o.DeletedState.NONE){const t=`${this.logUrl}?${(0,n.encodeQueryString)({deleted:e})}`;return(0,u.makeCancelable)((async e=>{const r=await this.api.ky.get(t,{signal:e});return s.default.fromResponse(r)}))}get previewUrl(){return`${this.url}/preview`}downloadPreview(e=i.default.deleted||o.DeletedState.NONE){const t=`${this.previewUrl}?${(0,n.encodeQueryString)({deleted:e})}`;return(0,u.makeCancelable)((async e=>{const r=await this.api.ky.get(t,{signal:e});return s.default.fromResponse(r)}))}dealWith(e=!0,t=i.default.deleted||o.DeletedState.NONE){const r=(e=Boolean(e))?"POST":"DELETE",s=`${this.url}/deal-with?${(0,n.encodeQueryString)({deleted:t})}`;return(0,u.makeCancelable)((async t=>{await this.api.ky(s,{method:r,signal:t}),this.dealtWith=e}))}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>h});var s=r(31),a=r(16),i=r(25),n=r(3),o=r(0),u=r(5),c=r(1);class l{constructor(e,t){if(!(0,o.isParentOf)(a.default,e))throw new TypeError("Expected api to be of type Mapcreator");if(!(0,o.isParentOf)(n.default,t))throw new TypeError("Expected target to be of type ResourceBase");this._api=e,this._target=t}get api(){return this._api}get url(){return`${this._target.url}/image`}delete(){return(0,c.makeCancelable)((async e=>{await this.api.ky.delete(this.url,{signal:e})}))}download(){return(0,c.makeCancelable)((async e=>{const t=await this.api.ky.get(this.url,{signal:e});return i.default.fromResponse(t)}))}upload(e){const t=new u.FormData;t.append("image",e,"image");const r={};return t.getHeaders&&Object.assign(r,t.getHeaders()),(0,c.makeCancelable)((async e=>{await this.api.ky.post(this.url,{headers:r,body:t,signal:e})}))}}class h extends s.default{get imageHandler(){return new l(this.api,this)}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var s=r(2),a=r(6),i=r(0);class n extends((0,i.mix)(s.default,a.default)){static get resourcePath(){return"/jobs/types/{id}"}static get resourceName(){return"job-types"}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>o});var s=r(6),a=r(15),i=r(57),n=r(0);class o extends((0,n.mix)(a.default,s.default)){static get resourcePath(){return"/svgs/sets/{id}"}static get resourceName(){return"svg-sets"}get _Child(){return i.default}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var s=r(10);class a extends s.default{static get resourceName(){return"svgs"}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>O});var s=r(20),a=r(19),i=r(2),n=r(46),o=r(48),u=r(47),c=r(49),l=r(51),h=r(50),p=r(52),d=r(26),f=r(55),g=r(71),_=r(27),y=r(70),m=r(28),w=r(36),b=r(72),v=r(45),x=r(59),k=r(73),j=r(57),P=r(56),E=r(1);class O extends i.default{static get resourceName(){return"users"}ips(){const e=`${this.url}/ips`;return(0,E.makeCancelable)((async t=>{const{data:r}=await this.api.ky.get(e,{signal:t}).json();return r.map((e=>e.ip_address))}))}organisation(){return new a.default(this.api,v.default).get(this.organisationId)}language(){return new a.default(this.api,g.default).get(this.languageCode)}get notifications(){return this._proxyResourceList(b.default)}messages(){const e=`${this.url}/messages`;return(0,E.makeCancelable)((async t=>{const{data:r}=await this.api.ky.get(e,{signal:t}).json();return{read:r.read.map((e=>new w.default(this.api,e))),unread:r.unread.map((e=>new w.default(this.api,e)))}}))}get mapstyleSets(){return this._proxyResourceList(m.default)}get mapstyles(){return this._proxyResourceList(y.default)}get dimensionSets(){return this._proxyResourceList(u.default)}get dimensions(){return this._proxyResourceList(o.default)}get fontFamilies(){return this._proxyResourceList(h.default)}get fonts(){return this._proxyResourceList(l.default)}get svgSets(){return this._proxyResourceList(P.default)}get svgs(){return this._proxyResourceList(j.default)}get colors(){return this._proxyResourceList(n.default)}get jobs(){return this._proxyResourceList(p.default)}get features(){return this._proxyResourceList(c.default)}get layers(){return this._proxyResourceList(_.default)}get jobTypes(){return this._proxyResourceList(f.default)}get jobShares(){return this._proxyResourceList(d.default)}get permissions(){return this._proxyResourceList(x.default)}get roles(){return new s.default(this.api,this,k.default)}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var s=r(3);class a extends s.default{static get resourceName(){return"permissions"}}},,(e,t,r)=>{t.parse=r(39),t.stringify=r(40)},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});class s extends Error{}},(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>FileDriver});var _utils_node__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(9),_DataStoreContract__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(23);class FileDriver extends _DataStoreContract__WEBPACK_IMPORTED_MODULE_1__.default{constructor(e=".m4n"){super(),this._path=e}get path(){return this._path}set path(e){if("string"!=typeof e)throw new TypeError('Expected "path" value to be of type "string"');this._path=e}static get available(){return(0,_utils_node__WEBPACK_IMPORTED_MODULE_0__.isNode)()}static get secure(){return!0}set(e,t){const r=this._read();r[e]=t,this._write(r)}get(e){return this._read()[e]}remove(e){const t=this._read();delete t[e],this._write(t)}clear(){this._write({})}keys(){return Object.keys(this._read())}_read(){let e;try{e=this._fs.readFileSync(this.path).toString()}catch(t){e="{}"}return e?JSON.parse(e):{}}_write(e){const t=JSON.stringify(e),r=this._fs.openSync(this.path,"w");this._fs.writeSync(r,t),this._fs.closeSync(r)}get _fs(){return this.__fs||(this.__fs=eval('require("fs")')),this.__fs}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{GeoPoint:()=>n,GeoBoundary:()=>o});var s=r(12),a=r.n(s),i=r(44);class n{constructor(e,t){this.lat=e,this.lng=t}get lat(){return this._lat}set lat(e){if(e=Number(e),!Number.isFinite(e))throw new i.default(`Invalid latitude: ${e}`);this._lat=Math.min(90,Math.max(-90,e))}get lng(){return this._lng}set lng(e){if(e=Number(e),!Number.isFinite(e))throw new i.default(`Invalid longitude: ${e}`);this._lng=e}toJSON(){return{lat:this.lat,lng:this.lng}}}class o{constructor({lat:e,lng:t},{lat:r,lng:s}){a()(this,"topLeft",void 0),a()(this,"bottomRight",void 0),this.topLeft=new n(e,t),this.bottomRight=new n(r,s)}getCenter(){const e=(this.topLeft.lat+this.bottomRight.lat)/2,t=(this.topLeft.lng+this.bottomRight.lng)/2;return new n(e,t)}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var s=r(3),a=r(0),i=r(31);class n extends i.default{initializer(){const e=this.constructor._injectable||{};for(const t of Object.keys(e)){const{value:r,isProxy:s}=e[t];s?this.injectProxy(t,r):this.inject(t,r)}}static injectProxy(e,t){if(t)void 0===this._injectable&&(this._injectable={}),this._injectable[e]={value:t,isProxy:!0};else for(const t of Object.keys(e))this.inject(t,e[t])}static inject(e,t){if(t)void 0===this._injectable&&(this._injectable={}),this._injectable[e]={value:t,isProxy:!1};else for(const t of Object.keys(e))this.inject(t,e[t])}static uninject(e){void 0!==this._injectable&&delete this._injectable[e]}injectProxy(e,t){if(t)(0,a.isParentOf)(s.default,t)?this._injectProxy(e,t):this._inject(e,t);else for(const t of Object.keys(e))this.injectProxy(t,e[t])}inject(e,t){this._inject(e,t,!1)}uninject(e){const t=Object.getOwnPropertyDescriptor(this,e),r=t.value||t.get||{};if(!r.injected)throw new Error(`Property "${e}" was not injected, can't un-inject`);r.original?Object.defineProperty(this,e,r.original):Object.defineProperty(this,e,{value:void 0,enumerable:!1,writable:!0})}_injectProxy(e,t){e===t.name&&(e=`${e.replace(/^\w/,(e=>e.toLowerCase()))}s`);const i=r(6).default;if((0,a.hasTrait)(t,i)){const s=r(20).default;this._inject(e,(function(){return new s(this.api,this,t)}))}else if((0,a.isParentOf)(s.default,t)&&this._proxyResourceList)this._inject(e,(function(){return this._proxyResourceList(t)}));else{const s=r(19).default;this._inject(e,(function(){return new s(this,t)}))}}_inject(e,t,r=!0){const s=(...e)=>t.apply(this,e),a=Object.getOwnPropertyDescriptor(this,e);s.injected=!0,a&&(s.original=a),Object.defineProperty(this,e,{enumerable:!1,configurable:!0,[r?"get":"value"]:s})}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});var s=r(12),a=r.n(s);class i extends Error{constructor({options:e,request:t,response:r,data:s}){const{type:n,message:o,trace:u}=s.error;super(o),a()(this,"options",void 0),a()(this,"response",void 0),a()(this,"request",void 0),a()(this,"type",void 0),a()(this,"status",void 0),a()(this,"trace",void 0),this.options=e,this.response=r,this.request=t,this.type=n,this.trace=[],"string"==typeof u&&(this._trace=i._parseTrace(u))}get hasTrace(){return this.trace.length>0}toString(){return`[${this.status}] ${this.type}: ${this.message}`}static _parseTrace(e){const t=/^#(\d+)\s(?:(.*?)\((\d+)\)|(.*?)):\s(.*?)$/gm,r=[];let s;for(;null!==(s=t.exec(e));)s.index===t.lastIndex&&t.lastIndex++,r.push({line:s[3],file:s[2]||s[4],code:s[5]});return r}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var s=r(2);class a extends s.default{static get resourceName(){return"contracts"}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var s=r(2);class a extends s.default{static get resourceName(){return"domains"}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>h});var s=r(0),a=r(2),i=r(53),n=(r(26),r(27)),o=r(8),u=r(5),c=r(7),l=r(1);class h extends a.default{get baseUrl(){return`${this._api.url}/jobs/${this.jobId}/revisions`}static get resourcePath(){return"/jobs/{job_id}/revisions/{revision}"}static get resourceName(){return"job-revisions"}static get resourceUrlKey(){return"revision"}get layers(){return this._proxyResourceList(n.default)}result(e=o.default.deleted||c.DeletedState.NONE){return(0,l.makeCancelable)((async t=>{const r=`${this.url}/result?${(0,u.encodeQueryString)({deleted:e})}`,{data:s}=await this.api.ky.get(r,{signal:t}).json();return s.jobId=this.jobId,s.revision=this.revision,new i.default(this.api,s)}))}get resultProxy(){const e={jobId:this.jobId,revision:this.revision};return new i.default(this.api,e)}save(e={},t=null,r=o.default.deleted||c.DeletedState.NONE){if(t&&t.length>0)if((0,s.isParentOf)(n.default,t[0]))t=t.map((e=>e.id));else if("number"!=typeof t[0])throw new TypeError("layers property is not of type Array<Layer>, Array<Number> or null");const a={object:JSON.stringify(e),language_code:this.languageCode,mapstyle_set_id:this.mapstyleSetId};t&&(a.layers=t);const i=`${this.baseUrl}?${(0,u.encodeQueryString)({deleted:r})}`;return(0,l.makeCancelable)((async e=>{const{data:t}=await this.api.ky.post(i,{json:a,signal:e}).json();return new h(this.api,t)}))}object(e=o.default.deleted||c.DeletedState.NONE){const t=`${this.url}/object?${(0,u.encodeQueryString)({deleted:e})}`;return(0,l.makeCancelable)((async e=>{const{data:r}=await this.api.ky.get(t,{signal:e}).json();return r}))}build(e,t=o.default.deleted||c.DeletedState.NONE){const r=`${this.url}/build?${(0,u.encodeQueryString)({deleted:t})}`;return(0,l.makeCancelable)((async t=>{await this.api.ky.post(r,{json:{callback:e},signal:t})}))}cancel(e=o.default.deleted||c.DeletedState.NONE){const t=`${this.url}/cancel?${(0,u.encodeQueryString)({deleted:e})}`;return(0,l.makeCancelable)((async e=>{await this.api.ky.post(t,{signal:e})}))}clone(e=null,t=o.default.deleted||c.DeletedState.NONE){const r=`${this.url}/clone?${(0,u.encodeQueryString)({deleted:t})}`;return(0,l.makeCancelable)((async t=>{const{data:s}=await this.api.ky.post(r,{json:{title:e},signal:t}).json();return new h(this.api,s)}))}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var s=r(54),a=r(0),i=r(10);class n extends((0,a.mix)(i.default,s.default)){static get resourceName(){return"mapstyles"}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var s=r(2);class a extends s.default{static get resourceName(){return"languages"}static get resourcePath(){return`/${this.resourceName}/{code}`}toString(){return`${this.constructor.name}(${this.code})`}static get resourceUrlKey(){return"code"}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var s=r(2);class a extends s.default{static get resourceName(){return"notifications"}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>o});var s=r(20),a=r(2),i=r(59),n=r(58);class o extends a.default{get permissions(){return new s.default(this.api,this,i.default)}get users(){return new s.default(this.api,this,n.default)}static get resourceName(){return"roles"}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>u});var s=r(6),a=r(0),i=r(27),n=r(15),o=r(75);class u extends((0,a.mix)(n.default,s.default)){static get resourceName(){return"layer-groups"}get items(){return new o.OwnedResourceProxy(this.api,this,this._Child)}get _Child(){return i.default}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{GeoResourceProxy:()=>s.default,OrganisationProxy:()=>a.default,OwnedResourceProxy:()=>i.default,ResourceProxy:()=>n.default,SimpleResourceProxy:()=>o.default});var s=r(43),a=r(34),i=r(20),n=r(19),o=r(14)},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});var s=r(17),a=r(18);class i extends a.default{constructor(e="",t=["*"]){super(e,t)}authenticate(){return new Promise(((e,t)=>{this.authenticated?e(this.token):t(new s.default("dummy_error","Attempted authentication using a dummy authenticator"))}))}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>l});var s=r(4),a=r(24),i=r(16),n=r(8),o=r(3),u=r(0),c=r(1);class l extends a.EventEmitter{constructor(e,t,r=o.default,a=null,c=50,l="id"){if(super(),!(0,u.isParentOf)(i.default,e))throw new TypeError("Expected api to be of type Mapcreator");this._api=e,this._Resource=r,this._route=t||new this.Resource(e,{}).baseUrl,this._parameters=new n.default(a||{perPage:n.default.maxPerPage}),this._key=(0,s.snake)(l),this._waiting=!1,this.autoUpdate=!0,this.maxRows=c,this._reset()}get hasMore(){return void 0===this.availableRows||this.availableRows>this.maxRows}get waiting(){return this._waiting}get parameters(){return this._parameters}set parameters(e){this.parameters.apply(e)}get Resource(){return this._Resource}get route(){return this._route}get data(){return this._data}get api(){return this._api}get rowCount(){return this.data.length}get maxRows(){return this._maxRows}set maxRows(e){if(e=Number(e),Number.isNaN(e))throw new TypeError("Expected maxRows to be numeric got "+typeof raw);this._maxRows=e,this.autoUpdate&&this.update()}get availableRows(){return this._availableRows}set autoUpdate(e){e=Boolean(e),this.autoUpdate!==e&&(this._autoUpdate=e,void 0===this._boundUpdate&&(this._boundUpdate=this.update.bind(this)),this.autoUpdate?this.parameters.on("change",this._boundUpdate):this.parameters.off("change",this._boundUpdate))}get autoUpdate(){return this._autoUpdate}_reset(){this._parameterToken=this.parameters.token(),this._realData=[],this._data=[],this._keys=[],delete this._availableRows}async update(){if(!this.waiting){this._waiting=!0;try{if(this._parameterToken!==this.parameters.token()&&this._reset(),this._realData.length<this.maxRows)try{await this._fetchMore()}catch(e){throw this.autoUpdate=!1,this.emit("error",e),e}this.data.length!==this.maxRows&&(this._data=this._realData.slice(0,this.maxRows))}finally{this._waiting=!1}this.emit("update")}}_fetchMore(){const e=this.route.includes("?")?"&":"?",t=this.parameters.copy();t.offset+=this.rowCount;const r=Math.ceil((this.maxRows-this.rowCount)/this.parameters.perPage),s=[];return(0,c.makeCancelable)((async a=>{for(;t.page<=r;t.page++){const r=this.route+e+t.encode(),i=this.api.ky.get(r,{signal:a});s.push(i)}const i=await Promise.all(s);for(const e of i){const{data:r}=await e.json();r.forEach((e=>this.push(e,!1))),this._availableRows=Number(e.headers.get("x-paginate-total"))+t.offset}}))}[Symbol.iterator](){return this.data[Symbol.iterator]()}push(e,t=!0){(0,u.isParentOf)(this.Resource,e)||(e=new this.Resource(this.api,e));const r=this._keys.findIndex((t=>t===e[this._key]));r>=0?(this._realData[r]=e,void 0!==this._data[r]&&(this._data[r]=e)):(this._realData.push(e),this._keys.push(e[this._key]),t&&(this.maxRows++,this._data.push(e)))}loadMore(e=this.parameters.perPage){this.maxRows+=e}}},(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var s=r(12),a=r.n(s),i=r(66);class n extends i.default{constructor({options:e,request:t,response:r,data:s}){super({options:e,request:t,response:r,data:s}),a()(this,"validationErrors",void 0),a()(this,"schemaErrors",void 0);const i=s.error.schema_errors;this.validationErrors=s.error.validation_errors,this.schemaErrors=Array.isArray(i)?i:[]}get hasSchemaErrors(){return this.schemaErrors.length>0}get messages(){const e=[];for(const t of Object.keys(this.validationErrors))e.push(...this.validationErrors[t]);return e}toString(){return`There were some validation errors: ${this.messages.join(", ")}`}}}],__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{AbstractClassError:()=>w.AbstractClassError,AbstractError:()=>w.AbstractError,AbstractMethodError:()=>w.AbstractMethodError,ApiError:()=>m.default,DeletedState:()=>a.DeletedState,DummyFlow:()=>y.default,Enum:()=>s.default,ImplicitFlow:()=>p,ImplicitFlowPopup:()=>d,Mapcreator:()=>e.default,OAuth:()=>i.default,OAuthToken:()=>n.default,PasswordFlow:()=>_,RequestParameters:()=>t.default,ResourceLister:()=>k.default,ResultStatus:()=>a.ResultStatus,StaticClassError:()=>v.default,StorageManager:()=>r.default,ValidationError:()=>b.default,errors:()=>P,geo:()=>j,helpers:()=>g,proxies:()=>E,resources:()=>x,version:()=>O});var e=__webpack_require__(16),t=__webpack_require__(8),r=__webpack_require__(22),s=__webpack_require__(11),a=__webpack_require__(7),i=__webpack_require__(18),n=__webpack_require__(13),o=__webpack_require__(42),u=__webpack_require__(5),c=__webpack_require__(17),l=__webpack_require__(9),h=__webpack_require__(4);class p extends i.default{constructor(e,t="",r=["*"],s=!0){if(super(e,r),(0,l.isNode)())throw new Error(`${this.constructor.name} can't be used under nodejs`);if(this.path="/oauth/authorize",this.callbackUrl=t,this.useState=s,this.callbackUrl||(this.callbackUrl=window.location.toString().split("#")[0]),this._anchorParams=["access_token","token_type","expires_in"],this.useState&&this._anchorParams.push("state"),this._anchorContainsOAuthResponse()){const e=this._getOAuthAnchorParams();if(this._cleanAnchorParams(),this.useState&&!o.default.validate(e.state))throw Error("Invalid state in url");this.token=n.default.fromResponseObject(e)}}authenticate(){return new Promise(((e,t)=>{if(this.authenticated)e(this.token);else if(this._anchorContainsError()){const e=this._getError();this._cleanAnchorParams(),t(e)}else window.location=this._buildRedirectUrl()}))}_buildRedirectUrl(){const e={client_id:this.clientId,redirect_uri:this.callbackUrl,response_type:"token",scope:this.scopes.join(" ")};return this.useState&&(e.state=o.default.generate()),`${this.host+this.path}?${(0,u.encodeQueryString)(e)}`}_getAnchorParams(e=window.location.hash){const t={};e=e.replace(/^#\/?/g,"");for(const r of e.split("&")){const e=r.split("=").map(decodeURIComponent);t[e[0]]=e[1]}return t}_getOAuthAnchorParams(e=this._getAnchorParams()){return Object.keys(e).filter((e=>this._anchorParams.includes(e))).reduce(((t,r)=>(t[r]=e[r],t)),{})}_cleanAnchorParams(){const e=this._getAnchorParams(),t=this._anchorParams;t.push("state","error");for(const r of t)delete e[r];window.location.hash=(0,u.encodeQueryString)(e)}_anchorContainsOAuthResponse(){const e=Object.keys(this._getOAuthAnchorParams());return this._anchorParams.reduce(((t,r)=>t&&e.includes(r)),!0)}_anchorContainsError(){return Boolean(this._getAnchorParams().error)}_getError(){if(!this._anchorContainsError())throw Error("No OAuthError found in anchor");const e=this._getAnchorParams();return e.message?new c.default(e.error,e.message):new c.default(e.error,(0,h.title)(e.error))}}class d extends p{constructor(e,t="",r=["*"],s=!1,a="width=800, height=600"){if(super(e,t,r,s),this.windowOptions=a,window.name===d.popupWindowName)throw new Error("We're a flow popup")}static get popupWindowName(){return"m4n_api_auth"}authenticate(){return window.name===d.popupWindowName?new Promise((()=>{})):this.authenticated?new Promise((e=>{e(this.token)})):new Promise(((e,t)=>{const r=window.open(this._buildRedirectUrl(),d.popupWindowName,this.windowOptions),s=setInterval((()=>{r.closed&&t(new c.default("window_closed","Pop-up window was closed before data could be extracted"));let a=!1;try{a=!["","about:blank"].includes(r.location.href)}catch(e){}if(a){clearInterval(s);const a=this._getAnchorParams(r.location.hash);r.close(),a.error?t(new c.default(a.error,a.message)):e(this.token=n.default.fromResponseObject(a))}}),250)}))}}var f=__webpack_require__(30),g=__webpack_require__(1);class _ extends i.default{constructor(e,t,r,s,a=["*"]){super(e,a),this._secret=t,this._username=r,this._password=s,this._path="/oauth/token",(0,l.isNode)()||(console.warn("Using PasswordFlow in the browser is unrecommended"),"https:"!==window.location.protocol&&console.warn("Page was not loaded using https. You're most likely leaking secrets right now"))}get secret(){return this._secret}set secret(e){this._secret=e}get username(){return this._username}set username(e){this._username=e}get password(){return this._password}set password(e){this._password=e}get path(){return this._path}set path(e){this._path=e}authenticate(){const e=this.host+this.path,t={grant_type:"password",client_id:this.clientId,client_secret:this._secret,username:this.username,password:this.password,scope:this.scopes.join(" ")};return(0,g.makeCancelable)((async r=>{const s=await f.default.post(e,{json:t,signal:r}).json();if(s.error)throw new c.default(s.error,s.message);return this.token=n.default.fromResponseObject(s),this.token.scopes=this.scopes,this.token}))}}var y=__webpack_require__(76),m=__webpack_require__(66),w=__webpack_require__(21),b=__webpack_require__(78),v=__webpack_require__(62),x=__webpack_require__(37),k=__webpack_require__(77),j=__webpack_require__(64),P=__webpack_require__(35),E=__webpack_require__(75);const O="v3.1.0"})(),__webpack_exports__})()}));
3
3
  //# sourceMappingURL=bundle.browser.min.js.map
@@ -1,23 +1,23 @@
1
1
  /*!
2
2
  * BSD 3-Clause License
3
- *
3
+ *
4
4
  * Copyright (c) 2020, Mapcreator
5
5
  * All rights reserved.
6
- *
6
+ *
7
7
  * Redistribution and use in source and binary forms, with or without
8
8
  * modification, are permitted provided that the following conditions are met:
9
- *
9
+ *
10
10
  * * Redistributions of source code must retain the above copyright notice, this
11
11
  * list of conditions and the following disclaimer.
12
- *
12
+ *
13
13
  * * Redistributions in binary form must reproduce the above copyright notice,
14
14
  * this list of conditions and the following disclaimer in the documentation
15
15
  * and/or other materials provided with the distribution.
16
- *
16
+ *
17
17
  * * Neither the name of the copyright holder nor the names of its
18
18
  * contributors may be used to endorse or promote products derived from
19
19
  * this software without specific prior written permission.
20
- *
20
+ *
21
21
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22
22
  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23
23
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -28,13 +28,13 @@
28
28
  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29
29
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
30
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
- *
32
- * hash:98130e43e661d32774d4, chunkhash:99a7d3fea150d22f0b4b, name:bundle.browser.min, version:v3.0.0
31
+ *
32
+ * hash:772b3a825d3c167536c3, chunkhash:bc44933cb3352dc71eed, name:bundle.browser.min, version:v3.1.0
33
33
  */
34
34
 
35
35
  /*!
36
36
  * This bundle contains the following packages:
37
- * └─ @mapcreator/api (3.0.0) ── BSD 3-clause "New" or "Revised" License (http://www.opensource.org/licenses/BSD-3-Clause) ── package.json
37
+ * └─ @mapcreator/api (3.1.0) ── BSD 3-clause "New" or "Revised" License (http://www.opensource.org/licenses/BSD-3-Clause) ── package.json
38
38
  * ├─ @babel/runtime (7.10.2) ── MIT License (http://www.opensource.org/licenses/MIT) ── node_modules/@babel/runtime/package.json
39
39
  * │ └─ regenerator-runtime (0.13.5) ── MIT License (http://www.opensource.org/licenses/MIT) ── node_modules/@babel/runtime ~ regenerator-runtime/package.json
40
40
  * ├─ case (1.6.3) ── mit or gpl 3.0 or later ── node_modules/case/package.json
@@ -42,8 +42,8 @@
42
42
  * │ ├─ asynckit (0.4.0) ── MIT License (http://www.opensource.org/licenses/MIT) ── node_modules/asynckit/package.json
43
43
  * │ ├─ combined-stream (1.0.8) ── MIT License (http://www.opensource.org/licenses/MIT) ── node_modules/form-data ~ combined-stream/package.json
44
44
  * │ │ └─ delayed-stream (1.0.0) ── MIT License (http://www.opensource.org/licenses/MIT) ── node_modules/delayed-stream/package.json
45
- * │ └─ mime-types (2.1.20) ── MIT License (http://www.opensource.org/licenses/MIT) ── node_modules/mime-types/package.json
46
- * │ └─ mime-db (1.36.0) ── MIT License (http://www.opensource.org/licenses/MIT) ── node_modules/mime-db/package.json
45
+ * │ └─ mime-types (2.1.34) ── MIT License (http://www.opensource.org/licenses/MIT) ── node_modules/mime-types/package.json
46
+ * │ └─ mime-db (1.51.0) ── MIT License (http://www.opensource.org/licenses/MIT) ── node_modules/mime-db/package.json
47
47
  * ├─ json-stable-stringify (1.0.1) ── MIT License (http://www.opensource.org/licenses/MIT) ── node_modules/json-stable-stringify/package.json
48
48
  * │ └─ jsonify (0.0.0) ── public domain ── node_modules/jsonify/package.json
49
49
  * ├─ ky (0.21.0) ── MIT License (http://www.opensource.org/licenses/MIT) ── node_modules/ky/package.json
@@ -54,7 +54,7 @@
54
54
  * │ ├─ data-uri-to-buffer (3.0.1) ── MIT License (http://www.opensource.org/licenses/MIT) ── node_modules/data-uri-to-buffer/package.json
55
55
  * │ └─ fetch-blob (2.0.1) ── MIT License (http://www.opensource.org/licenses/MIT) ── node_modules/fetch-blob/package.json
56
56
  * └─ mitt (1.2.0) ── MIT License (http://www.opensource.org/licenses/MIT) ── node_modules/mitt/package.json
57
- *
57
+ *
58
58
  */
59
59
 
60
60
  /*! Case - v1.6.2 - 2020-03-24