PageSourceSearch

https://eagleandchildyork.co.uk/wp-content/themes/lbp-master/dist/scripts/main_34cc7092.js

js eagleandchildyork.co.uk collected 2026-09-28 13:39:21 UTC 858,474 bytes, 65 lines download raw bytes

vendor: 6,522 bytes, lines 1-15
1!function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},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="/wp-content/themes/lbp-master/dist/",r(r.s=3)}([function(t,e){t.exports=jQuery},function(t,e){(function(e){t.exports=e}).call(e,{})},function(t,e,r){(function(e){/* flatpickr v4.6.3, @license MIT */var r;r=function(){"use strict";
2/*! *****************************************************************************
3    Copyright (c) Microsoft Corporation. All rights reserved.
4    Licensed under the Apache License, Version 2.0 (the "License"); you may not use
5    this file except in compliance with the License. You may obtain a copy of the
6    License at http://www.apache.org/licenses/LICENSE-2.0
7
8    THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
9    KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
10    WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
11    MERCHANTABLITY OR NON-INFRINGEMENT.
12
13    See the Apache Version 2.0 License for specific language governing permissions
14    and limitations under the License.
15    ***************************************************************************** */var t=function(){return(t=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},r=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],n={_disable:[],_enable:[],allowInput:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enable:[],enableSeconds:!1,enableTime:!1,errorHandler:function(t){return"undefined"!=typeof console&&void 0},getWeek:function(t){var e=new Date(t.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var r=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-r.getTime())/864e5-3+(r.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},i={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(t){var e=t%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},o=function(t){return("0"+t).slice(-2)},a=function(t){return!0===t?1:0};function s(t,e,r){var n;return void 0===r&&(r=!1),function(){var i=this,o=arguments;null!==n&&clearTimeout(n),n=window.setTimeout(function(){n=null,r||t.apply(i,o)},e),r&&!n&&t.apply(i,o)}}var l=function(t){return t instanceof Array?t:[t]};function u(t,e,r){if(!0===r)return t.classList.add(e);t.classList.remove(e)}function c(t,e,r){var n=window.document.createElement(t);return e=e||"",r=r||"",n.className=e,void 0!==r&&(n.textContent=r),n}function p(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function h(t,e){var r=c("div","numInputWrapper"),n=c("input","numInput "+t),i=c("span","arrowUp"),o=c("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?n.type="number":(n.type="text",n.pattern="\\d*"),void 0!==e)for(var a in e)n.setAttribute(a,e[a]);return r.appendChild(n),r.appendChild(i),r.appendChild(o),r}var f=function(){},d=function(t,e,r){return r.months[e?"shorthand":"longhand"][t]},m={D:f,F:function(t,e,r){t.setMonth(r.months.longhand.indexOf(e))},G:function(t,e){t.setHours(parseFloat(e))},H:function(t,e){t.setHours(parseFloat(e))},J:function(t,e){t.setDate(parseFloat(e))},K:function(t,e,r){t.setHours(t.getHours()%12+12*a(new RegExp(r.amPM[1],"i").test(e)))},M:function(t,e,r){t.setMonth(r.months.shorthand.indexOf(e))},S:function(t,e){t.setSeconds(parseFloat(e))},U:function(t,e){return new Date(1e3*parseFloat(e))},W:function(t,e,r){var n=parseInt(e),i=new Date(t.getFullYear(),0,2+7*(n-1),0,0,0,0);return i.setDate(i.getDate()-i.getDay()+r.firstDayOfWeek),i},Y:function(t,e){t.setFullYear(parseFloat(e))},Z:function(t,e){return new Date(e)},d:function(t,e){t.setDate(parseFloat(e))},h:function(t,e){t.setHours(parseFloat(e))},i:function(t,e){t.setMinutes(parseFloat(e))},j:function(t,e){t.setDate(parseFloat(e))},l:f,m:function(t,e){t.setMonth(parseFloat(e)-1)},n:function(t,e){t.setMonth(parseFloat(e)-1)},s:function(t,e){t.setSeconds(parseFloat(e))},u:function(t,e){return new Date(parseFloat(e))},w:f,y:function(t,e){t.setFullYear(2e3+parseFloat(e))}},g={D:"(\\w+)",F:"(\\w+)",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"(\\w+)",S:"(\\d\\d|\\d)",U:"(.+)",W:"
15(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"(\\w+)",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},y={Z:function(t){return t.toISOString()},D:function(t,e,r){return e.weekdays.shorthand[y.w(t,e,r)]},F:function(t,e,r){return d(y.n(t,e,r)-1,!1,e)},G:function(t,e,r){return o(y.h(t,e,r))},H:function(t){return o(t.getHours())},J:function(t,e){return void 0!==e.ordinal?t.getDate()+e.ordinal(t.getDate()):t.getDate()},K:function(t,e){return e.amPM[a(t.getHours()>11)]},M:function(t,e){return d(t.getMonth(),!0,e)},S:function(t){return o(t.getSeconds())},U:function(t){return t.getTime()/1e3},W:function(t,e,r){return r.getWeek(t)},Y:function(t){return t.getFullYear()},d:function(t){return o(t.getDate())},h:function(t){return t.getHours()%12?t.getHours()%12:12},i:function(t){return o(t.getMinutes())},j:function(t){return t.getDate()},l:function(t,e){return e.weekdays.longhand[t.getDay()]},m:function(t){return o(t.getMonth()+1)},n:function(t){return t.getMonth()+1},s:function(t){return t.getSeconds()},u:function(t){return t.getTime()},w:function(t){return t.getDay()},y:function(t){return String(t.getFullYear()).substring(2)}},v=function(t){var e=t.config,r=void 0===e?n:e,o=t.l10n,a=void 0===o?i:o;return function(t,e,n){var i=n||a;return void 0!==r.formatDate?r.formatDate(t,e,i):e.split("").map(function(e,n,o){return y[e]&&"\\"!==o[n-1]?y[e](t,i,r):"\\"!==e?e:""}).join("")}},_=function(t){var e=t.config,r=void 0===e?n:e,o=t.l10n,a=void 0===o?i:o;return function(t,e,i,o){if(0===t||t){var s,l=o||a,u=t;if(t instanceof Date)s=new Date(t.getTime());else if("string"!=typeof t&&void 0!==t.toFixed)s=new Date(t);else if("string"==typeof t){var c=e||(r||n).dateFormat,p=String(t).trim();if("today"===p)s=new Date,i=!0;else if(/Z$/.test(p)||/GMT$/.test(p))s=new Date(t);else if(r&&r.parseDate)s=r.parseDate(t,c);else{s=r&&r.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var h=void 0,f=[],d=0,y=0,v="";d<c.length;d++){var _=c[d],x="\\"===_,b="\\"===c[d-1]||x;if(g[_]&&!b){v+=g[_];var w=new RegExp(v).exec(t);w&&(h=!0)&&f["Y"!==_?"push":"unshift"]({fn:m[_],val:w[++y]})}else x||(v+=".");f.forEach(function(t){var e=t.fn,r=t.val;return s=e(s,r,l)||s})}s=h?s:void 0}}if(s instanceof Date&&!isNaN(s.getTime()))return!0===i&&s.setHours(0,0,0,0),s;r.errorHandler(new Error("Invalid date provided: "+u))}}};function x(t,e,r){return void 0===r&&(r=!0),!1!==r?new Date(t.getTime()).setHours(0,0,0,0)-new Date(e.getTime()).setHours(0,0,0,0):t.getTime()-e.getTime()}var b=function(t,e,r){return t>Math.min(e,r)&&t<Math.max(e,r)},w={DAY:864e5};"function"!=typeof Object.assign&&(Object.assign=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(!t)throw TypeError("Cannot convert undefined or null to object");for(var n=function(e){e&&Object.keys(e).forEach(function(r){return t[r]=e[r]})},i=0,o=e;i<o.length;i++){n(o[i])}return t});var E=300;function T(e,f){var m={config:t({},n,C.defaultConfig),l10n:i};function y(t){return t.bind(m)}function T(){var t=m.config;!1===t.weekNumbers&&1===t.showMonths||!0!==t.noCalendar&&window.requestAnimationFrame(function(){if(void 0!==m.calendarContainer&&(m.calendarContainer.style.visibility="hidden",m.calendarContainer.style.display="block"),void 0!==m.daysContainer){var e=(m.days.offsetWidth+1)*t.showMonths;m.daysContainer.style.width=e+"px",m.calendarContainer.style.width=e+(void 0!==m.weekWrapper?m.weekWrapper.offsetWidth:0)+"px",m.calendarContainer.style.removeProperty("visibility"),m.calendarContainer.style.removeProperty("display")}})}function S(t){0===m.selectedDates.length&&it(),void 0!==t&&"blur"!==t.type&&function(t){t.preventDefault();var e="keydown"===t.type,r=t.target;void 0!==m.amPM&&t.target===m.amPM&&(m.amPM.textContent=m.l10n.amPM[a(m.amPM.textContent===m.l10n.amPM[0])]);var n=parseFloat(r.getAttribute("min")),i=parseFloat(r.getAttribute("max")),s=parseFloat(r.getAttribute("step")),l=parseInt(r.value,10),u=t.delta||(e?38===t.which?1:-1:0),c=l+s*u;if(void 0!==r.value&&2===r.value.length){var p=r===m.hourElement,h=r===m.minuteElement;c<n?(c=i+c+a(!p)+(a(p)&&a(!m.amPM)),h&&B(void 0,-1,m.hourElement)):c>i&&(c=r===m.hourElement?c-i-a(!m.amPM):n,h&&B(void 0,1,m.hourElement)),m.amPM&&p&&(1===s?c+l===23:Math.abs(c-l)>s)&&(m.amPM.textContent=m.l10n.amPM[a(m.amPM.textContent===m.l10n.amPM[0])]),r.value=o(c)}}(t);var e=m._input.value;A(),_t(),m._input.value!==e&&m._debouncedChange()}function A(){if(void 0!==m.hourElement&&void 0!==m.minuteElement){var t,e,r=(parseInt(m.hourElement.value.slice(-2),10)||0)%24,n=(parseInt(m.minuteElement.value,10)||0)%60,i=void 0!==m.secondElement?(parseInt(m.secondElement.value,10)||0)%60:0;void 0!==m.amPM&&(t=r,e=m.amPM.textContent,r=t%12+12*a(e===m.l10n.amPM[1]));var o=void 0!==m.config.minTime||m.config.minDate&&m.minDateHasTime&&m.latestSelectedDateObj&&0===x(m.latestSelectedDateObj,m.config.minDate,!0);if(void 0!==m.config.maxTime||m.config.maxDate&&m.maxDateHasTime&&m.latestSelectedDateObj&&0===x(m.latestSelectedDateObj,m.config.maxDate,!0)){var s=void 0!==m.config.maxTime?m.config.maxTime:m.config.maxDate;(r=Math.min(r,s.getHours()))===s.getHours()&&(n=Math.min(n,s.getMinutes())),n===s.getMinutes()&&(i=Math.min(i,s.getSeconds()))}if(o){var l=void 0!==m.config.minTime?m.config.minTime:m.config.minDate;(r=Math.max(r,l.getHours()))===l.getHours()&&(n=Math.max(n,l.getMinutes())),n===l.getMinutes()&&(i=Math.max(i,l.getSeconds()))}k(r,n,i)}}function I(t){var e=t||m.latestSelectedDateObj;e&&k(e.getHours(),e.getMinutes(),e.getSeconds())}function D(){var t=m.config.defaultHour,e=m.config.defaultMinute,r=m.config.defaultSeconds;if(void 0!==m.config.minDate){var n=m.config.minDate.getHours(),i=m.config.minDate.getMinutes();(t=Math.max(t,n))===n&&(e=Math.max(i,e)),t===n&&e===i&&(r=m.config.minDate.getSeconds())}if(void 0!==m.config.maxDate){var o=m.config.maxDate.getHours(),a=m.config.maxDate.getMinutes();(t=Math.min(t,o))===o&&(e=Math.min(a,e)),t===o&&e===a&&(r=m.config.maxDate.getSeconds())}k(t,e,r)}function k(t,e,r){void 0!==m.latestSelectedDateObj&&m.latestSelectedDateObj.setHours(t%24,e,r||0,0),m.hourElement&&m.minuteElement&&!m.isMobile&&(m.hourElement.value=o(m.config.time_24hr?t:(12+t)%12+12*a(t%12==0)),m.minuteElement.value=o(e),void 0!==m.amPM&&(m.amPM.textContent=m.l10n.amPM[a(t>=12)]),void 0!==m.secondElement&&(m.secondElement.value=o(r)))}function M(t){var e=parseInt(t.target.value)+(t.delta||0);(e/1e3>1||"Enter"===t.key&&!/[^\d]/.test(e.toString()))&&Q(e)}function P(t,e,r,n){return e instanceof Array?e.forEach(function(e){return P(t,e,r,n)}):t instanceof Array?t.forEach(function(t){return P(t,e,r,n)}):(t.addEventListener(e,r,n),void m._handlers.push({element:t,event:e,handler:r,options:n}))}function z(t){return function(e){1===e.which&&t(e)}}function L(){dt("onChange")}function O(t,e){var r=void 0!==t?m.parseDate(t):m.latestSelectedDateObj||(m.config.minDate&&m.config.minDate>m.now?m.config.minDate:m.config.maxDate&&m.config.maxDate<m.now?m.config.maxDate:m.now),n=m.currentYear,i=m.currentMonth;try{void 0!==r&&(m.currentYear=r.getFullYear(),m.currentMonth=r.getMonth())}catch(t){t.message="Invalid date supplied: "+r,m.config.errorHandler(t)}e&&m.currentYear!==n&&(dt("onYearChange"),H()),!e||m.currentYear===n&&m.currentMonth===i||dt("onMonthChange"),m.redraw()}function R(t){~t.target.className.indexOf("arrow")&&B(t,t.target.classList.contains("arrowUp")?1:-1)}function B(t,e,r){var n=t&&t.target,i=r||n&&n.parentNode&&n.parentNode.firstChild,o=mt("increment");o.delta=e,i&&i.dispatchEvent(o)}function F(t,e,r,n){var i=$(e,!0),o=c("span","flatpickr-day "+t,e.getDate().toString());return o.dateObj=e,o.$i=n,o.setAttribute("aria-label",m.formatDate(e,m.config.ariaDateFormat)),-1===t.indexOf("hidden")&&0===x(e,m.now)&&(m.todayDateElem=o,o.classList.add("today"),o.setAttribute("aria-current","date")),i?(o.tabIndex=-1,gt(e)&&(o.classList.add("selected"),m.selectedDateElem=o,"range"===m.config.mode&&(u(o,"startRange",m.selectedDates[0]&&0===x(e,m.selectedDates[0],!0)),u(o,"endRange",m.selectedDates[1]&&0===x(e,m.selectedDates[1],!0)),"nextMonthDay"===t&&o.classList.add("inRange")))):o.classList.add("flatpickr-disabled"),"range"===m.config.mode&&function(t){return!("range"!==m.config.mode||m.selectedDates.length<2)&&x(t,m.selectedDates[0])>=0&&x(t,m.selectedDates[1])<=0}(e)&&!gt(e)&&o.classList.add("inRange"),m.weekNumbers&&1===m.config.showMonths&&"prevMonthDay"!==t&&r%7==1&&m.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+m.config.getWeek(e)+"</span>"),dt("onDayCreate",o),o}function N(t){t.focus(),"range"===m.config.mode&&rt(t)}function U(t){for(var e=t>0?0:m.config.showMonths-1,r=t>0?m.config.showMonths:-1,n=e;n!=r;n+=t)for(var i=m.daysContainer.children[n],o=t>0?0:i.children.length-1,a=t>0?i.children.length:-1,s=o;s!=a;s+=t){var l=i.children[s];if(-1===l.className.indexOf("hidden")&&$(l.dateObj))return l}}function V(t,e){var r=tt(document.activeElement||document.body),n=void 0!==t?t:r?document.activeElement:void 0!==m.selectedDateElem&&tt(m.selectedDateElem)?m.selectedDateElem:void 0!==m.todayDateElem&&tt(m.todayDateElem)?m.todayDateElem:U(e>0?1:-1);return void 0===n?m._input.focus():r?void function(t,e){for(var r=-1===t.className.indexOf("Month")?t.dateObj.getMonth():m.currentMonth,n=e>0?m.config.showMonths:-1,i=e>0?1:-1,o=r-m.currentMonth;o!=n;o+=i)for(var a=m.daysContainer.children[o],s=r-m.currentMonth===o?t.$i+e:e<0?a.children.length-1:0,l=a.children.length,u=s;u>=0&&u<l&&u!=(e>0?l:-1);u+=i){var c=a.children[u];if(-1===c.className.indexOf("hidden")&&$(c.dateObj)&&Math.abs(t.$i-u)>=Math.abs(e))return N(c)}m.changeMonth(i),V(U(i),0)}(n,e):N(n)}function j(t,e){for(var r=(new Date(t,e,1).getDay()-m.l10n.firstDayOfWeek+7)%7,n=m.utils.getDaysInMonth((e-1+12)%12),i=m.utils.getDaysInMonth(e),o=window.document.createDocumentFragment(),a=m.config.showMonths>1,s=a?"prevMonthDay hidden":"prevMonthDay",l=a?"nextMonthDay hidden":"nextMonthDay",u=n+1-r,p=0;u<=n;u++,p++)o.appendChild(F(s,new Date(t,e-1,u),u,p));for(u=1;u<=i;u++,p++)o.appendChild(F("",new Date(t,e,u),u,p));for(var h=i+1;h<=42-r&&(1===m.config.showMonths||p%7!=0);h++,p++)o.appendChild(F(l,new Date(t,e+1,h%i),h,p));var f=c("div","dayContainer");return f.appendChild(o),f}function q(){if(void 0!==m.daysContainer){p(m.daysContainer),m.weekNumbers&&p(m.weekNumbers);for(var t=document.createDocumentFragment(),e=0;e<m.config.showMonths;e++){var r=new Date(m.currentYear,m.currentMonth,1);r.setMonth(m.currentMonth+e),t.appendChild(j(r.getFullYear(),r.getMonth()))}m.daysContainer.appendChild(t),m.days=m.daysContainer.firstChild,"range"===m.config.mode&&1===m.selectedDates.length&&rt()}}function H(){if(!(m.config.showMonths>1||"dropdown"!==m.config.monthSelectorType)){var t=function(t){return!(void 0!==m.config.minDate&&m.currentYear===m.config.minDate.getFullYear()&&t<m.config.minDate.getMonth())&&!(void 0!==m.config.maxDate&&m.currentYear===m.config.maxDate.getFullYear()&&t>m.config.maxDate.getMonth())};m.monthsDropdownContainer.tabIndex=-1,m.monthsDropdownContainer.innerHTML="";for(var e=0;e<12;e++)if(t(e)){var r=c("option","flatpickr-monthDropdown-month");r.value=new Date(m.currentYear,e).getMonth().toString(),r.textContent=d(e,m.config.shorthandCurrentMonth,m.l10n),r.tabIndex=-1,m.currentMonth===e&&(r.selected=!0),m.monthsDropdownContainer.appendChild(r)}}}function G(){var t,e=c("div","flatpickr-month"),r=window.document.createDocumentFragment();m.config.showMonths>1||"static"===m.config.monthSelectorType?t=c("span","cur-month"):(m.monthsDropdownContainer=c("select","flatpickr-monthDropdown-months"),P(m.monthsDropdownContainer,"change",function(t){var e=t.target,r=parseInt(e.value,10);m.changeMonth(r-m.currentMonth),dt("onMonthChange")}),H(),t=m.monthsDropdownContainer);var n=h("cur-year",{tabindex:"-1"}),i=n.getElementsByTagName("input")[0];i.setAttribute("aria-label",m.l10n.yearAriaLabel),m.config.minDate&&i.setAttribute("min",m.config.minDate.getFullYear().toString()),m.config.maxDate&&(i.setAttribute("max",m.config.maxDate.getFullYear().toString()),i.disabled=!!m.config.minDate&&m.config.minDate.getFullYear()===m.config.maxDate.getFullYear());var o=c("div","flatpickr-current-month");return o.appendChild(t),o.appendChild(n),r.appendChild(o),e.appendChild(r),{container:e,yearElement:i,monthElement:t}}function W(){p(m.monthNav),m.monthNav.appendChild(m.prevMonthNav),m.config.showMonths&&(m.yearElements=[],m.monthElements=[]);for(var t=m.config.showMonths;t--;
vendor: 12,583 bytes, line 15
15){var e=G();m.yearElements.push(e.yearElement),m.monthElements.push(e.monthElement),m.monthNav.appendChild(e.container)}m.monthNav.appendChild(m.nextMonthNav)}function Z(){m.weekdayContainer?p(m.weekdayContainer):m.weekdayContainer=c("div","flatpickr-weekdays");for(var t=m.config.showMonths;t--;){var e=c("div","flatpickr-weekdaycontainer");m.weekdayContainer.appendChild(e)}return X(),m.weekdayContainer}function X(){if(m.weekdayContainer){var t=m.l10n.firstDayOfWeek,e=m.l10n.weekdays.shorthand.slice();t>0&&t<e.length&&(e=e.splice(t,e.length).concat(e.splice(0,t)));for(var r=m.config.showMonths;r--;)m.weekdayContainer.children[r].innerHTML="\n      <span class='flatpickr-weekday'>\n        "+e.join("</span><span class='flatpickr-weekday'>")+"\n      </span>\n      "}}function Y(t,e){void 0===e&&(e=!0);var r=e?t:t-m.currentMonth;r<0&&!0===m._hidePrevMonthArrow||r>0&&!0===m._hideNextMonthArrow||(m.currentMonth+=r,(m.currentMonth<0||m.currentMonth>11)&&(m.currentYear+=m.currentMonth>11?1:-1,m.currentMonth=(m.currentMonth+12)%12,dt("onYearChange"),H()),q(),dt("onMonthChange"),yt())}function K(t){return!(!m.config.appendTo||!m.config.appendTo.contains(t))||m.calendarContainer.contains(t)}function J(t){if(m.isOpen&&!m.config.inline){var e="function"==typeof(a=t).composedPath?a.composedPath()[0]:a.target,r=K(e),n=e===m.input||e===m.altInput||m.element.contains(e)||t.path&&t.path.indexOf&&(~t.path.indexOf(m.input)||~t.path.indexOf(m.altInput)),i="blur"===t.type?n&&t.relatedTarget&&!K(t.relatedTarget):!n&&!r&&!K(t.relatedTarget),o=!m.config.ignoredFocusElements.some(function(t){return t.contains(e)});i&&o&&(void 0!==m.timeContainer&&void 0!==m.minuteElement&&void 0!==m.hourElement&&S(),m.close(),"range"===m.config.mode&&1===m.selectedDates.length&&(m.clear(!1),m.redraw()))}var a}function Q(t){if(!(!t||m.config.minDate&&t<m.config.minDate.getFullYear()||m.config.maxDate&&t>m.config.maxDate.getFullYear())){var e=t,r=m.currentYear!==e;m.currentYear=e||m.currentYear,m.config.maxDate&&m.currentYear===m.config.maxDate.getFullYear()?m.currentMonth=Math.min(m.config.maxDate.getMonth(),m.currentMonth):m.config.minDate&&m.currentYear===m.config.minDate.getFullYear()&&(m.currentMonth=Math.max(m.config.minDate.getMonth(),m.currentMonth)),r&&(m.redraw(),dt("onYearChange"),H())}}function $(t,e){void 0===e&&(e=!0);var r=m.parseDate(t,void 0,e);if(m.config.minDate&&r&&x(r,m.config.minDate,void 0!==e?e:!m.minDateHasTime)<0||m.config.maxDate&&r&&x(r,m.config.maxDate,void 0!==e?e:!m.maxDateHasTime)>0)return!1;if(0===m.config.enable.length&&0===m.config.disable.length)return!0;if(void 0===r)return!1;for(var n=m.config.enable.length>0,i=n?m.config.enable:m.config.disable,o=0,a=void 0;o<i.length;o++){if("function"==typeof(a=i[o])&&a(r))return n;if(a instanceof Date&&void 0!==r&&a.getTime()===r.getTime())return n;if("string"==typeof a&&void 0!==r){var s=m.parseDate(a,void 0,!0);return s&&s.getTime()===r.getTime()?n:!n}if("object"==typeof a&&void 0!==r&&a.from&&a.to&&r.getTime()>=a.from.getTime()&&r.getTime()<=a.to.getTime())return n}return!n}function tt(t){return void 0!==m.daysContainer&&(-1===t.className.indexOf("hidden")&&m.daysContainer.contains(t))}function et(t){var e=t.target===m._input,r=m.config.allowInput,n=m.isOpen&&(!r||!e),i=m.config.inline&&e&&!r;if(13===t.keyCode&&e){if(r)return m.setDate(m._input.value,!0,t.target===m.altInput?m.config.altFormat:m.config.dateFormat),t.target.blur();m.open()}else if(K(t.target)||n||i){var o=!!m.timeContainer&&m.timeContainer.contains(t.target);switch(t.keyCode){case 13:o?(t.preventDefault(),S(),ut()):ct(t);break;case 27:t.preventDefault(),ut();break;case 8:case 46:e&&!m.config.allowInput&&(t.preventDefault(),m.clear());break;case 37:case 39:if(o||e)m.hourElement&&m.hourElement.focus();else if(t.preventDefault(),void 0!==m.daysContainer&&(!1===r||document.activeElement&&tt(document.activeElement))){var a=39===t.keyCode?1:-1;t.ctrlKey?(t.stopPropagation(),Y(a),V(U(1),0)):V(void 0,a)}break;case 38:case 40:t.preventDefault();var s=40===t.keyCode?1:-1;m.daysContainer&&void 0!==t.target.$i||t.target===m.input||t.target===m.altInput?t.ctrlKey?(t.stopPropagation(),Q(m.currentYear-s),V(U(1),0)):o||V(void 0,7*s):t.target===m.currentYearElement?Q(m.currentYear-s):m.config.enableTime&&(!o&&m.hourElement&&m.hourElement.focus(),S(t),m._debouncedChange());break;case 9:if(o){var l=[m.hourElement,m.minuteElement,m.secondElement,m.amPM].concat(m.pluginElements).filter(function(t){return t}),u=l.indexOf(t.target);if(-1!==u){var c=l[u+(t.shiftKey?-1:1)];t.preventDefault(),(c||m._input).focus()}}else!m.config.noCalendar&&m.daysContainer&&m.daysContainer.contains(t.target)&&t.shiftKey&&(t.preventDefault(),m._input.focus())}}if(void 0!==m.amPM&&t.target===m.amPM)switch(t.key){case m.l10n.amPM[0].charAt(0):case m.l10n.amPM[0].charAt(0).toLowerCase():m.amPM.textContent=m.l10n.amPM[0],A(),_t();break;case m.l10n.amPM[1].charAt(0):case m.l10n.amPM[1].charAt(0).toLowerCase():m.amPM.textContent=m.l10n.amPM[1],A(),_t()}(e||K(t.target))&&dt("onKeyDown",t)}function rt(t){if(1===m.selectedDates.length&&(!t||t.classList.contains("flatpickr-day")&&!t.classList.contains("flatpickr-disabled"))){for(var e=t?t.dateObj.getTime():m.days.firstElementChild.dateObj.getTime(),r=m.parseDate(m.selectedDates[0],void 0,!0).getTime(),n=Math.min(e,m.selectedDates[0].getTime()),i=Math.max(e,m.selectedDates[0].getTime()),o=!1,a=0,s=0,l=n;l<i;l+=w.DAY)$(new Date(l),!0)||(o=o||l>n&&l<i,l<r&&(!a||l>a)?a=l:l>r&&(!s||l<s)&&(s=l));for(var u=0;u<m.config.showMonths;u++)for(var c=m.daysContainer.children[u],p=function(n,i){var l=c.children[n],u=l.dateObj.getTime(),p=a>0&&u<a||s>0&&u>s;return p?(l.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(t){l.classList.remove(t)}),"continue"):o&&!p?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(t){l.classList.remove(t)}),void(void 0!==t&&(t.classList.add(e<=m.selectedDates[0].getTime()?"startRange":"endRange"),r<e&&u===r?l.classList.add("startRange"):r>e&&u===r&&l.classList.add("endRange"),u>=a&&(0===s||u<=s)&&b(u,r,e)&&l.classList.add("inRange"))))},h=0,f=c.children.length;h<f;h++)p(h)}}function nt(){!m.isOpen||m.config.static||m.config.inline||st()}function it(){m.setDate(void 0!==m.config.minDate?new Date(m.config.minDate.getTime()):new Date,!0),D(),_t()}function ot(t){return function(e){var r=m.config["_"+t+"Date"]=m.parseDate(e,m.config.dateFormat),n=m.config["_"+("min"===t?"max":"min")+"Date"];void 0!==r&&(m["min"===t?"minDateHasTime":"maxDateHasTime"]=r.getHours()>0||r.getMinutes()>0||r.getSeconds()>0),m.selectedDates&&(m.selectedDates=m.selectedDates.filter(function(t){return $(t)}),m.selectedDates.length||"min"!==t||I(r),_t()),m.daysContainer&&(lt(),void 0!==r?m.currentYearElement[t]=r.getFullYear().toString():m.currentYearElement.removeAttribute(t),m.currentYearElement.disabled=!!n&&void 0!==r&&n.getFullYear()===r.getFullYear())}}function at(){"object"!=typeof m.config.locale&&void 0===C.l10ns[m.config.locale]&&m.config.errorHandler(new Error("flatpickr: invalid locale "+m.config.locale)),m.l10n=t({},C.l10ns.default,"object"==typeof m.config.locale?m.config.locale:"default"!==m.config.locale?C.l10ns[m.config.locale]:void 0),g.K="("+m.l10n.amPM[0]+"|"+m.l10n.amPM[1]+"|"+m.l10n.amPM[0].toLowerCase()+"|"+m.l10n.amPM[1].toLowerCase()+")",void 0===t({},f,JSON.parse(JSON.stringify(e.dataset||{}))).time_24hr&&void 0===C.defaultConfig.time_24hr&&(m.config.time_24hr=m.l10n.time_24hr),m.formatDate=v(m),m.parseDate=_({config:m.config,l10n:m.l10n})}function st(t){if(void 0!==m.calendarContainer){dt("onPreCalendarPosition");var e=t||m._positionElement,r=Array.prototype.reduce.call(m.calendarContainer.children,function(t,e){return t+e.offsetHeight},0),n=m.calendarContainer.offsetWidth,i=m.config.position.split(" "),o=i[0],a=i.length>1?i[1]:null,s=e.getBoundingClientRect(),l=window.innerHeight-s.bottom,c="above"===o||"below"!==o&&l<r&&s.top>r,p=window.pageYOffset+s.top+(c?-r-2:e.offsetHeight+2);if(u(m.calendarContainer,"arrowTop",!c),u(m.calendarContainer,"arrowBottom",c),!m.config.inline){var h=window.pageXOffset+s.left-(null!=a&&"center"===a?(n-s.width)/2:0),f=window.document.body.offsetWidth-(window.pageXOffset+s.right),d=h+n>window.document.body.offsetWidth,g=f+n>window.document.body.offsetWidth;if(u(m.calendarContainer,"rightMost",d),!m.config.static)if(m.calendarContainer.style.top=p+"px",d)if(g){var y=document.styleSheets[0];if(void 0===y)return;var v=window.document.body.offsetWidth,_=Math.max(0,v/2-n/2),x=y.cssRules.length,b="{left:"+s.left+"px;right:auto;}";u(m.calendarContainer,"rightMost",!1),u(m.calendarContainer,"centerMost",!0),y.insertRule(".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after"+b,x),m.calendarContainer.style.left=_+"px",m.calendarContainer.style.right="auto"}else m.calendarContainer.style.left="auto",m.calendarContainer.style.right=f+"px";else m.calendarContainer.style.left=h+"px",m.calendarContainer.style.right="auto"}}}function lt(){m.config.noCalendar||m.isMobile||(yt(),q())}function ut(){m._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(m.close,0):m.close()}function ct(t){t.preventDefault(),t.stopPropagation();var e=function t(e,r){return r(e)?e:e.parentNode?t(e.parentNode,r):void 0}(t.target,function(t){return t.classList&&t.classList.contains("flatpickr-day")&&!t.classList.contains("flatpickr-disabled")&&!t.classList.contains("notAllowed")});if(void 0!==e){var r=e,n=m.latestSelectedDateObj=new Date(r.dateObj.getTime()),i=(n.getMonth()<m.currentMonth||n.getMonth()>m.currentMonth+m.config.showMonths-1)&&"range"!==m.config.mode;if(m.selectedDateElem=r,"single"===m.config.mode)m.selectedDates=[n];else if("multiple"===m.config.mode){var o=gt(n);o?m.selectedDates.splice(parseInt(o),1):m.selectedDates.push(n)}else"range"===m.config.mode&&(2===m.selectedDates.length&&m.clear(!1,!1),m.latestSelectedDateObj=n,m.selectedDates.push(n),0!==x(n,m.selectedDates[0],!0)&&m.selectedDates.sort(function(t,e){return t.getTime()-e.getTime()}));if(A(),i){var a=m.currentYear!==n.getFullYear();m.currentYear=n.getFullYear(),m.currentMonth=n.getMonth(),a&&(dt("onYearChange"),H()),dt("onMonthChange")}if(yt(),q(),_t(),m.config.enableTime&&setTimeout(function(){return m.showTimeInput=!0},50),i||"range"===m.config.mode||1!==m.config.showMonths?void 0!==m.selectedDateElem&&void 0===m.hourElement&&m.selectedDateElem&&m.selectedDateElem.focus():N(r),void 0!==m.hourElement&&void 0!==m.hourElement&&m.hourElement.focus(),m.config.closeOnSelect){var s="single"===m.config.mode&&!m.config.enableTime,l="range"===m.config.mode&&2===m.selectedDates.length&&!m.config.enableTime;(s||l)&&ut()}L()}}m.parseDate=_({config:m.config,l10n:m.l10n}),m._handlers=[],m.pluginElements=[],m.loadedPlugins=[],m._bind=P,m._setHoursFromDate=I,m._positionCalendar=st,m.changeMonth=Y,m.changeYear=Q,m.clear=function(t,e){void 0===t&&(t=!0);void 0===e&&(e=!0);m.input.value="",void 0!==m.altInput&&(m.altInput.value="");void 0!==m.mobileInput&&(m.mobileInput.value="");m.selectedDates=[],m.latestSelectedDateObj=void 0,!0===e&&(m.currentYear=m._initialDate.getFullYear(),m.currentMonth=m._initialDate.getMonth());m.showTimeInput=!1,!0===m.config.enableTime&&D();m.redraw(),t&&dt("onChange")},m.close=function(){m.isOpen=!1,m.isMobile||(void 0!==m.calendarContainer&&m.calendarContainer.classList.remove("open"),void 0!==m._input&&m._input.classList.remove("active"));dt("onClose")},m._createElement=c,m.destroy=function(){void 0!==m.config&&dt("onDestroy");for(var t=m._handlers.length;t--;){var e=m._handlers[t];e.element.removeEventListener(e.event,e.handler,e.options)}if(m._handlers=[],m.mobileInput)m.mobileInput.parentNode&&m.mobileInput.parentNode.removeChild(m.mobileInput),m.mobileInput=void 0;else if(m.calendarContainer&&m.calendarContainer.parentNode)if(m.config.static&&m.calendarContainer.parentNode){var r=m.calendarContainer.parentNode;if(r.lastChild&&r.removeChild(r.lastChild),r.parentNode){for(;r.firstChild;)r.parentNode.insertBefore(r.firstChild,r);r.parentNode.removeChild(r)}}else m.calendarContainer.parentNode.removeChild(m.calendarContainer);m.altInput&&(m.input.type="text",m.altInput.parentNode&&m.altInput.parentNode.removeChild(m.altInput),delete m.altInput);m.input&&(m.input.type=m.input._type,m.input.classList.remove("flatpickr-input"),m.input.removeAttribute("readonly"),m.input.value="");["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","
15isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(t){try{delete m[t]}catch(t){}})},m.isEnabled=$,m.jumpToDate=O,m.open=function(t,e){void 0===e&&(e=m._positionElement);if(!0===m.isMobile)return t&&(t.preventDefault(),t.target&&t.target.blur()),void 0!==m.mobileInput&&(m.mobileInput.focus(),m.mobileInput.click()),void dt("onOpen");if(m._input.disabled||m.config.inline)return;var r=m.isOpen;m.isOpen=!0,r||(m.calendarContainer.classList.add("open"),m._input.classList.add("active"),dt("onOpen"),st(e));!0===m.config.enableTime&&!0===m.config.noCalendar&&(0===m.selectedDates.length&&it(),!1!==m.config.allowInput||void 0!==t&&m.timeContainer.contains(t.relatedTarget)||setTimeout(function(){return m.hourElement.select()},50))},m.redraw=lt,m.set=function(t,e){if(null!==t&&"object"==typeof t)for(var n in Object.assign(m.config,t),t)void 0!==pt[n]&&pt[n].forEach(function(t){return t()});else m.config[t]=e,void 0!==pt[t]?pt[t].forEach(function(t){return t()}):r.indexOf(t)>-1&&(m.config[t]=l(e));m.redraw(),_t(!1)},m.setDate=function(t,e,r){void 0===e&&(e=!1);void 0===r&&(r=m.config.dateFormat);if(0!==t&&!t||t instanceof Array&&0===t.length)return m.clear(e);ht(t,r),m.showTimeInput=m.selectedDates.length>0,m.latestSelectedDateObj=m.selectedDates[m.selectedDates.length-1],m.redraw(),O(),I(),0===m.selectedDates.length&&m.clear(!1);_t(e),e&&dt("onChange")},m.toggle=function(t){if(!0===m.isOpen)return m.close();m.open(t)};var pt={locale:[at,X],showMonths:[W,T,Z],minDate:[O],maxDate:[O]};function ht(t,e){var r=[];if(t instanceof Array)r=t.map(function(t){return m.parseDate(t,e)});else if(t instanceof Date||"number"==typeof t)r=[m.parseDate(t,e)];else if("string"==typeof t)switch(m.config.mode){case"single":case"time":r=[m.parseDate(t,e)];break;case"multiple":r=t.split(m.config.conjunction).map(function(t){return m.parseDate(t,e)});break;case"range":r=t.split(m.l10n.rangeSeparator).map(function(t){return m.parseDate(t,e)})}else m.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(t)));m.selectedDates=r.filter(function(t){return t instanceof Date&&$(t,!1)}),"range"===m.config.mode&&m.selectedDates.sort(function(t,e){return t.getTime()-e.getTime()})}function ft(t){return t.slice().map(function(t){return"string"==typeof t||"number"==typeof t||t instanceof Date?m.parseDate(t,void 0,!0):t&&"object"==typeof t&&t.from&&t.to?{from:m.parseDate(t.from,void 0),to:m.parseDate(t.to,void 0)}:t}).filter(function(t){return t})}function dt(t,e){if(void 0!==m.config){var r=m.config[t];if(void 0!==r&&r.length>0)for(var n=0;r[n]&&n<r.length;n++)r[n](m.selectedDates,m.input.value,m,e);"onChange"===t&&(m.input.dispatchEvent(mt("change")),m.input.dispatchEvent(mt("input")))}}function mt(t){var e=document.createEvent("Event");return e.initEvent(t,!0,!0),e}function gt(t){for(var e=0;e<m.selectedDates.length;e++)if(0===x(m.selectedDates[e],t))return""+e;return!1}function yt(){m.config.noCalendar||m.isMobile||!m.monthNav||(m.yearElements.forEach(function(t,e){var r=new Date(m.currentYear,m.currentMonth,1);r.setMonth(m.currentMonth+e),m.config.showMonths>1||"static"===m.config.monthSelectorType?m.monthElements[e].textContent=d(r.getMonth(),m.config.shorthandCurrentMonth,m.l10n)+" ":m.monthsDropdownContainer.value=r.getMonth().toString(),t.value=r.getFullYear().toString()}),m._hidePrevMonthArrow=void 0!==m.config.minDate&&(m.currentYear===m.config.minDate.getFullYear()?m.currentMonth<=m.config.minDate.getMonth():m.currentYear<m.config.minDate.getFullYear()),m._hideNextMonthArrow=void 0!==m.config.maxDate&&(m.currentYear===m.config.maxDate.getFullYear()?m.currentMonth+1>m.config.maxDate.getMonth():m.currentYear>m.config.maxDate.getFullYear()))}function vt(t){return m.selectedDates.map(function(e){return m.formatDate(e,t)}).filter(function(t,e,r){return"range"!==m.config.mode||m.config.enableTime||r.indexOf(t)===e}).join("range"!==m.config.mode?m.config.conjunction:m.l10n.rangeSeparator)}function _t(t){void 0===t&&(t=!0),void 0!==m.mobileInput&&m.mobileFormatStr&&(m.mobileInput.value=void 0!==m.latestSelectedDateObj?m.formatDate(m.latestSelectedDateObj,m.mobileFormatStr):""),m.input.value=vt(m.config.dateFormat),void 0!==m.altInput&&(m.altInput.value=vt(m.config.altFormat)),!1!==t&&dt("onValueUpdate")}function xt(t){var e=m.prevMonthNav.contains(t.target),r=m.nextMonthNav.contains(t.target);e||r?Y(e?-1:1):m.yearElements.indexOf(t.target)>=0?t.target.select():t.target.classList.contains("arrowUp")?m.changeYear(m.currentYear+1):t.target.classList.contains("arrowDown")&&m.changeYear(m.currentYear-1)}return function(){m.element=m.input=e,m.isOpen=!1,function(){var i=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],o=t({},f,JSON.parse(JSON.stringify(e.dataset||{}))),a={};m.config.parseDate=o.parseDate,m.config.formatDate=o.formatDate,Object.defineProperty(m.config,"enable",{get:function(){return m.config._enable},set:function(t){m.config._enable=ft(t)}}),Object.defineProperty(m.config,"disable",{get:function(){return m.config._disable},set:function(t){m.config._disable=ft(t)}});var s="time"===o.mode;if(!o.dateFormat&&(o.enableTime||s)){var u=C.defaultConfig.dateFormat||n.dateFormat;a.dateFormat=o.noCalendar||s?"H:i"+(o.enableSeconds?":S":""):u+" H:i"+(o.enableSeconds?":S":"")}if(o.altInput&&(o.enableTime||s)&&!o.altFormat){var c=C.defaultConfig.altFormat||n.altFormat;a.altFormat=o.noCalendar||s?"h:i"+(o.enableSeconds?":S K":" K"):c+" h:i"+(o.enableSeconds?":S":"")+" K"}o.altInputClass||(m.config.altInputClass=m.input.className+" "+m.config.altInputClass),Ob
vendor: 10,014 bytes, line 15
15ject.defineProperty(m.config,"minDate",{get:function(){return m.config._minDate},set:ot("min")}),Object.defineProperty(m.config,"maxDate",{get:function(){return m.config._maxDate},set:ot("max")});var p=function(t){return function(e){m.config["min"===t?"_minTime":"_maxTime"]=m.parseDate(e,"H:i:S")}};Object.defineProperty(m.config,"minTime",{get:function(){return m.config._minTime},set:p("min")}),Object.defineProperty(m.config,"maxTime",{get:function(){return m.config._maxTime},set:p("max")}),"time"===o.mode&&(m.config.noCalendar=!0,m.config.enableTime=!0),Object.assign(m.config,a,o);for(var h=0;h<i.length;h++)m.config[i[h]]=!0===m.config[i[h]]||"true"===m.config[i[h]];r.filter(function(t){return void 0!==m.config[t]}).forEach(function(t){m.config[t]=l(m.config[t]||[]).map(y)}),m.isMobile=!m.config.disableMobile&&!m.config.inline&&"single"===m.config.mode&&!m.config.disable.length&&!m.config.enable.length&&!m.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var h=0;h<m.config.plugins.length;h++){var d=m.config.plugins[h](m)||{};for(var g in d)r.indexOf(g)>-1?m.config[g]=l(d[g]).map(y).concat(m.config[g]):void 0===o[g]&&(m.config[g]=d[g])}dt("onParseConfig")}(),at(),m.input=m.config.wrap?e.querySelector("[data-input]"):e,m.input?(m.input._type=m.input.type,m.input.type="text",m.input.classList.add("flatpickr-input"),m._input=m.input,m.config.altInput&&(m.altInput=c(m.input.nodeName,m.config.altInputClass),m._input=m.altInput,m.altInput.placeholder=m.input.placeholder,m.altInput.disabled=m.input.disabled,m.altInput.required=m.input.required,m.altInput.tabIndex=m.input.tabIndex,m.altInput.type="text",m.input.setAttribute("type","hidden"),!m.config.static&&m.input.parentNode&&m.input.parentNode.insertBefore(m.altInput,m.input.nextSibling)),m.config.allowInput||m._input.setAttribute("readonly","readonly"),m._positionElement=m.config.positionElement||m._input):m.config.errorHandler(new Error("Invalid input element specified")),function(){m.selectedDates=[],m.now=m.parseDate(m.config.now)||new Date;var t=m.config.defaultDate||("INPUT"!==m.input.nodeName&&"TEXTAREA"!==m.input.nodeName||!m.input.placeholder||m.input.value!==m.input.placeholder?m.input.value:null);t&&ht(t,m.config.dateFormat),m._initialDate=m.selectedDates.length>0?m.selectedDates[0]:m.config.minDate&&m.config.minDate.getTime()>m.now.getTime()?m.config.minDate:m.config.maxDate&&m.config.maxDate.getTime()<m.now.getTime()?m.config.maxDate:m.now,m.currentYear=m._initialDate.getFullYear(),m.currentMonth=m._initialDate.getMonth(),m.selectedDates.length>0&&(m.latestSelectedDateObj=m.selectedDates[0]),void 0!==m.config.minTime&&(m.config.minTime=m.parseDate(m.config.minTime,"H:i")),void 0!==m.config.maxTime&&(m.config.maxTime=m.parseDate(m.config.maxTime,"H:i")),m.minDateHasTime=!!m.config.minDate&&(m.config.minDate.getHours()>0||m.config.minDate.getMinutes()>0||m.config.minDate.getSeconds()>0),m.maxDateHasTime=!!m.config.maxDate&&(m.config.maxDate.getHours()>0||m.config.maxDate.getMinutes()>0||m.config.maxDate.getSeconds()>0),Object.defineProperty(m,"showTimeInput",{get:function(){return m._showTimeInput},set:function(t){m._showTimeInput=t,m.calendarContainer&&u(m.calendarContainer,"showTimeInput",t),m.isOpen&&st()}})}(),m.utils={getDaysInMonth:function(t,e){return void 0===t&&(t=m.currentMonth),void 0===e&&(e=m.currentYear),1===t&&(e%4==0&&e%100!=0||e%400==0)?29:m.l10n.daysInMonth[t]}},m.isMobile||function(){var t=window.document.createDocumentFragment();if(m.calendarContainer=c("div","flatpickr-calendar"),m.calendarContainer.tabIndex=-1,!m.config.noCalendar){if(t.appendChild((m.monthNav=c("div","flatpickr-months"),m.yearElements=[],m.monthElements=[],m.prevMonthNav=c("span","flatpickr-prev-month"),m.prevMonthNav.innerHTML=m.config.prevArrow,m.nextMonthNav=c("span","flatpickr-next-month"),m.nextMonthNav.innerHTML=m.config.nextArrow,W(),Object.defineProperty(m,"_hidePrevMonthArrow",{get:function(){return m.__hidePrevMonthArrow},set:function(t){m.__hidePrevMonthArrow!==t&&(u(m.prevMonthNav,"flatpickr-disabled",t),m.__hidePrevMonthArrow=t)}}),Object.defineProperty(m,"_hideNextMonthArrow",{get:function(){return m.__hideNextMonthArrow},set:function(t){m.__hideNextMonthArrow!==t&&(u(m.nextMonthNav,"flatpickr-disabled",t),m.__hideNextMonthArrow=t)}}),m.currentYearElement=m.yearElements[0],yt(),m.monthNav)),m.innerContainer=c("div","flatpickr-innerContainer"),m.config.weekNumbers){var e=function(){m.calendarContainer.classList.add("hasWeeks");var t=c("div","flatpickr-weekwrapper");t.appendChild(c("span","flatpickr-weekday",m.l10n.weekAbbreviation));var e=c("div","flatpickr-weeks");return t.appendChild(e),{weekWrapper:t,weekNumbers:e}}(),r=e.weekWrapper,n=e.weekNumbers;m.innerContainer.appendChild(r),m.weekNumbers=n,m.weekWrapper=r}m.rContainer=c("div","flatpickr-rContainer"),m.rContainer.appendChild(Z()),m.daysContainer||(m.daysContainer=c("div","flatpickr-days"),m.daysContainer.tabIndex=-1),q(),m.rContainer.appendChild(m.daysContainer),m.innerContainer.appendChild(m.rContainer),t.appendChild(m.innerContainer)}m.config.enableTime&&t.appendChild(function(){m.calendarContainer.classList.add("hasTime"),m.config.noCalendar&&m.calendarContainer.classList.add("noCalendar"),m.timeContainer=c("div","flatpickr-time"),m.timeContainer.tabIndex=-1;var t=c("span","flatpickr-time-separator",":"),e=h("flatpickr-hour",{"aria-label":m.l10n.hourAriaLabel});m.hourElement=e.getElementsByTagName("input")[0];var r=h("flatpickr-minute",{"aria-label":m.l10n.minuteAriaLabel});if(m.minuteElement=r.getElementsByTagName("input")[0],m.hourElement.tabIndex=m.minuteElement.tabIndex=-1,m.hourElement.value=o(m.latestSelectedDateObj?m.latestSelectedDateObj.getHours():m.config.time_24hr?m.config.defaultHour:function(t){switch(t%24){case 0:case 12:return 12;default:return t%12}}(m.config.defaultHour)),m.minuteElement.value=o(m.latestSelectedDateObj?m.latestSelectedDateObj.getMinutes():m.config.defaultMinute),m.hourElement.setAttribute("step",m.config.hourIncrement.toString()),m.minuteElement.setAttribute("step",m.config.minuteIncrement.toString()),m.hourElement.setAttribute("min",m.config.time_24hr?"0":"1"),m.hourElement.setAttribute("max",m.config.time_24hr?"23":"12"),m.minuteElement.setAttribute("min","0"),m.minuteElement.setAttribute("max","59"),m.timeContainer.appendChild(e),m.timeContainer.appendChild(t),m.timeContainer.appendChild(r),m.config.time_24hr&&m.timeContainer.classList.add("time24hr"),m.config.enableSeconds){m.timeContainer.classList.add("hasSeconds");var n=h("flatpickr-second");m.secondElement=n.getElementsByTagName("input")[0],m.secondElement.value=o(m.latestSelectedDateObj?m.latestSelectedDateObj.getSeconds():m.config.defaultSeconds),m.secondElement.setAttribute("step",m.minuteElement.getAttribute("step")),m.secondElement.setAttribute("min","0"),m.secondElement.setAttribute("max","59"),m.timeContainer.appendChild(c("span","flatpickr-time-separator",":")),m.timeContainer.appendChild(n)}return m.config.time_24hr||(m.amPM=c("span","flatpickr-am-pm",m.l10n.amPM[a((m.latestSelectedDateObj?m.hourElement.value:m.config.defaultHour)>11)]),m.amPM.title=m.l10n.toggleTitle,m.amPM.tabIndex=-1,m.timeContainer.appendChild(m.amPM)),m.timeContainer}()),u(m.calendarContainer,"rangeMode","range"===m.config.mode),u(m.calendarContainer,"animate",!0===m.config.animate),u(m.calendarContainer,"multiMonth",m.config.showMonths>1),m.calendarContainer.appendChild(t);var i=void 0!==m.config.appendTo&&void 0!==m.config.appendTo.nodeType;if((m.config.inline||m.config.static)&&(m.calendarContainer.classList.add(m.config.inline?"inline":"static"),m.config.inline&&(!i&&m.element.parentNode?m.element.parentNode.insertBefore(m.calendarContainer,m._input.nextSibling):void 0!==m.config.appendTo&&m.config.appendTo.appendChild(m.calendarContainer)),m.config.static)){var s=c("div","flatpickr-wrapper");m.element.parentNode&&m.element.parentNode.insertBefore(s,m.element),s.appendChild(m.element),m.altInput&&s.appendChild(m.altInput),s.appendChild(m.calendarContainer)}m.config.static||m.config.inline||(void 0!==m.config.appendTo?m.config.appendTo:window.document.body).appendChild(m.calendarContainer)}(),function(){if(m.config.wrap&&["open","close","toggle","clear"].forEach(function(t){Array.prototype.forEach.call(m.element.querySelectorAll("[data-"+t+"]"),function(e){return P(e,"click",m[t])})}),m.isMobile)!function(){var t=m.config.enableTime?m.config.noCalendar?"time":"datetime-local":"date";m.mobileInput=c("input",m.input.className+" flatpickr-mobile"),m.mobileInput.step=m.input.getAttribute("step")||"any",m.mobileInput.tabIndex=1,m.mobileInput.type=t,m.mobileInput.disabled=m.input.disabled,m.mobileInput.required=m.input.required,m.mobileInput.placeholder=m.input.placeholder,m.mobileFormatStr="datetime-local"===t?"Y-m-d\\TH:i:S":"date"===t?"Y-m-d":"H:i:S",m.selectedDates.length>0&&(m.mobileInput.defaultValue=m.mobileInput.value=m.formatDate(m.selectedDates[0],m.mobileFormatStr)),m.config.minDate&&(m.mobileInput.min=m.formatDate(m.config.minDate,"Y-m-d")),m.config.maxDate&&(m.mobileInput.max=m.formatDate(m.config.maxDate,"Y-m-d")),m.input.type="hidden",void 0!==m.altInput&&(m.altInput.type="hidden");try{m.input.parentNode&&m.input.parentNode.insertBefore(m.mobileInput,m.input.nextSibling)}catch(t){}P(m.mobileInput,"change",function(t){m.setDate(t.target.value,!1,m.mobileFormatStr),dt("onChange"),dt("onClose")})}();else{var t=s(nt,50);m._debouncedChange=s(L,E),m.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&P(m.daysContainer,"mouseover",function(t){"range"===m.config.mode&&rt(t.target)}),P(window.document.body,"keydown",et),m.config.inline||m.config.static||P(window,"resize",t),void 0!==window.ontouchstart?P(window.document,"touchstart",J):P(window.document,"mousedown",z(J)),P(window.document,"focus",J,{capture:!0}),!0===m.config.clickOpens&&(P(m._input,"focus",m.open),P(m._input,"mousedown",z(m.open))),void 0!==m.daysContainer&&(P(m.monthNav,"mousedown",z(
15xt)),P(m.monthNav,["keyup","increment"],M),P(m.daysContainer,"mousedown",z(ct))),void 0!==m.timeContainer&&void 0!==m.minuteElement&&void 0!==m.hourElement&&(P(m.timeContainer,["increment"],S),P(m.timeContainer,"blur",S,{capture:!0}),P(m.timeContainer,"mousedown",z(R)),P([m.hourElement,m.minuteElement],["focus","click"],function(t){return t.target.select()}),void 0!==m.secondElement&&P(m.secondElement,"focus",function(){return m.secondElement&&m.secondElement.select()}),void 0!==m.amPM&&P(m.amPM,"mousedown",z(function(t){S(t),L()})))}}(),(m.selectedDates.length||m.config.noCalendar)&&(m.config.enableTime&&I(m.config.noCalendar?m.latestSelectedDateObj||m.config.minDate:void 0),_t(!1)),T(),m.showTimeInput=m.selectedDates.length>0||m.config.noCalendar;var i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!m.isMobile&&i&&st(),dt("onReady")}(),m}function S(t,e){for(var r=Array.prototype.slice.call(t).filter(function(t){return t instanceof HTMLElement}),n=[],i=0;i<r.length;i++){var o=r[i];try{if(null!==o.getAttribute("data-fp-omit"))continue;void 0!==o._flatpickr&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=T(o,e||{}),n.push(o._flatpickr)}catch(t){}}return 1===n.length?n[0]:n}"undefined"!=typeof HTMLElement&&"undefined"!=typeof HTMLCollection&&"undefined"!=typeof NodeList&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(t){return S(this,t)},HTMLElement.prototype.flatpickr=function(t){return S([this],t)}
15);var C=function(t,e){return"string"==typeof t?S(window.document.querySelectorAll(t),e):t instanceof Node?S([t],e):S(t,e)};return C.defaultConfig={},C.l10ns={en:t({},i),default:t({},i)},C.localize=function(e){C.l10ns.default=t({},C.l10ns.default,e)},C.setDefaults=function(e){C.defaultConfig=t({},C.defaultConfig,e)},C.parseDate=_({}),C.formatDate=v({}),C.compareDates=x,void 0!==e&&void 0!==e.fn&&(e.fn.flatpickr=function(t){return S(this,t)}),Date.prototype.fp_incr=function(t){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof t?parseInt(t,10):t))},"undefined"!=typeof window&&(window.flatpickr=C),C},t.exports=r()}).call(e,r(0))},function(t,e,r){r(4),t.exports=r(24)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t,e){var n,i,o=r(0),a=(r.n(o),r(5),r(9)),s=(r.n(a),r(10),r(2)),l=r.n(s),u=r(11),c=r(13),p=r(20),h=r(21),f=r(22),d=r.n(f),m=r(23),g=(r.n(m),new u.a({common:c.a,home:p.a,cancelBooking:h.a}));t(document).ready(function(){return g.loadEvents()});var y=d.a.BaseTransition.extend({start:function(){e(".close-sidebar").addClass("hide").removeClass("active"),e(".open-sidebar").removeClass("hide"),e("body").addClass("transition-out"),e(".sidebar").removeClass("open"),e("header").removeClass("open-mob"),Promise.all([this.newContainerLoading,this.slideUp()]).then(this.finish.bind(this))},slideUp:function(){return new Promise(function(t){e("#transition").removeClass("fade-in").addClass("slide-up"),e("body").addClass("transition-out"),e("body").removeClass("loaded"),setTimeout(function(){window.scrollTo(0,0),t()},50)})},finish:function(){e("body").attr("class",n+" transition-out"),e("header").removeClass("nav-up"),g.loadEvents(),i?(setTimeout(function(){e("html, body").animate({scrollTop:e("#"+i).offset().top},0)},500),setTimeout(function(){e("#transition").addClass("fade-in").removeClass("slide-up"),e("body").addClass("transition-in")},50),setTimeout(function(){e("body").removeClass("transition-in")},200)):(e("#transition").addClass("fade-in").removeClass("slide-up"),e("body").addClass("transition-in"),e("body").removeClass("transition-out"),setTimeout(function(){var t,r;e("body").removeClass("transition-in"),e("body").addClass("loaded"),t=e(window).height(),r=e(window).scrollTop(),e(".lazyloaded, .load-in, .fade-in, .block").each(function(){var n=e(this).offset().top;n<t+r&&(e(this).hasClass("show")||e(this).addClass("show"))})},50)),this.done()}});d.a.Pjax.getTransition=function(){return y},d.a.Pjax.Dom.wrapperId="wrapper",d.a.Pjax.Dom.containerClass="content",d.a.Dispatcher.on("initStateChange",function(){}),d.a.Dispatcher.on("linkClicked",function(t){i=!!t.dataset.anchor&&t.dataset.anchor});var v=d.a.Pjax.Dom.parseResponse;function _(t){return t<10?"0"+t.toString():t.toString()}d.a.Pjax.Dom.parseResponse=function(t){var r,i;return t=t.replace(/(<\/?)body( .+?)?>/gi,"$1notbody$2>",t),r=e(t).find("nav"),i=e(r).attr("class"),e("nav").attr("class",i),n=e(t).filter("notbody").attr("class"),v.apply(d.a.Pjax.Dom,arguments)},d.a.Pjax.start(),l()(".calendar",{inline:!0,minDate:"today",onChange:function(t){var r=new Date(t);e("body").find("#rtb-date").val(r.getFullYear()+"-"+_(r.getMonth()+1)+"-"+_(r.getDate())),e("body").find(".date-text").html(r.getDate()+" "+["January","February","March","April","May","June","July","August","September","October","November","December"][r.getMonth()])}}),e("body").on("click",".mob-trigger",function(){e("body").hasClass("nav-open")?(e("body").removeClass("disable-scroll nav-open"),e("body").find(".navmenu--mobile").removeClass("open"),e(this).removeClass("active")):(e("body").addClass("disable-scroll nav-open"),e("body").find(".navmenu--mobile").addClass("open"),e(this).addClass("active"))}),e(".navmenu--mobile").find(".menu-item").each(function(){e(this).find("a").on("click",function(){e("body").hasClass("nav-open")&&(e("body").removeClass("disable-scroll nav-open"),e(".navmenu--mobile").removeClass("open"),e(".mob-trigger").removeClass("active"))})})}.call(e,r(0),r(0))},function(t,e,r){"use strict";var n=r(6);r.n(n)},function(t,e,r){(function(t,e,r){"use strict";function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t){for(var e=arguments,r=1;r<arguments.length;r++){var n=null!=e[r]?e[r]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}
15))),i.forEach(function(e){o(t,e,n[e])})}return t}e=e&&e.hasOwnProperty("default")?e.default:e,r=r&&r.hasOwnProperty("default")?r.default:r;var s="transitionend";function l(t){var r=this,n=!1;return e(this).one(u.TRANSITION_END,function(){n=!0}),setTimeout(function(){n||u.triggerTransitionEnd(r)},t),this}var u={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var r=t.getAttribute("href");e=r&&"#"!==r?r.trim():""}try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var r=e(t).css("transition-duration"),n=e(t).css("transition-delay"),i=parseFloat(r),o=parseFloat(n);return i||o?(r=r.split(",")[0],n=n.split(",")[0],1e3*(parseFloat(r)+parseFloat(n))):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){e(t).trigger(s)},supportsTransitionEnd:function(){return Boolean(s)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,r){for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)){var i=r[n],o=e[n],a=o&&u.isElement(o)?"element":(s=o,{}.toString.call(s).match(/\s([a-z]+)/i)[1].toLowerCase());if(!new RegExp(i).test(a))throw new Error(t.toUpperCase()+': Option "'+n+'" provided type "'+a+'" but expected type "'+i+'".')}var s},findShadowRoot:function(t){if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){var e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?u.findShadowRoot(t.parentNode):null}};e.fn.emulateTransitionEnd=l,e.event.special[u.TRANSITION_END]={bindType:s,delegateType:s,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var c=e.fn.alert,p={CLOSE:"close.bs.alert",CLOSED:"closed.bs.alert",CLICK_DATA_API:"click.bs.alert.data-api"},h="alert",f="fade",d="show",m=function(){function t(t){this._element=t}var r=t.prototype;return r.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},r.dispose=function(){e.removeData(this._element,"bs.alert"),this._element=null},r._getRootElement=function(t){var r=u.getSelectorFromElement(t),n=!1;return r&&(n=document.querySelector(r)),n||(n=e(t).closest("."+h)[0]),n},r._triggerCloseEvent=function(t){var r=e.Event(p.CLOSE);return e(t).trigger(r),r},r._removeElement=function(t){var r=this;if(e(t).removeClass(d),e(t).hasClass(f)){var n=u.getTransitionDurationFromElement(t);e(t).one(u.TRANSITION_END,function(e){return r._destroyElement(t,e)}).emulateTransitionEnd(n)}else this._destroyElement(t)},r._destroyElement=function(t){e(t).detach().trigger(p.CLOSED).remove()},t._jQueryInterface=function(r){return this.each(function(){var n=e(this),i=n.data("bs.alert");i||(i=new t(this),n.data("bs.alert",i)),"close"===r&&i[r](this)})},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},i(t,null,[{key:"VERSION",get:function(){return"4.3.1"}}]),t}();e(document).on(p.CLICK_DATA_API,'[data-dismiss="alert"]',m._handleDismiss(new m)),e.fn.alert=m._jQueryInterface,e.fn.alert.Constructor=m,e.fn.alert.noConflict=function(){return e.fn.alert=c,m._jQueryInterface};var g=e.fn.button,y="active",v="btn",_="focus",x='[data-toggle^="button"]',b='[data-toggle="buttons"]',w='input:not([type="hidden"])',E=".active",T=".btn",S={CLICK_DATA_API:"click.bs.button.data-api",FOCUS_BLUR_DATA_API:"focus.bs.button.data-api blur.bs.button.data-api"},C=function(){function t(t){this._element=t}var r=t.prototype;return r.toggle=function(){var t=!0,r=!0,n=e(this._element).closest(b)[0];if(n){var i=this._element.querySelector(w);if(i){if("radio"===i.type)if(i.checked&&this._element.classList.contains(y))t=!1;else{var o=n.querySelector(E);o&&e(o).removeClass(y)}if(t){if(i.hasAttribute("disabled")||n.hasAttribute("disabled")||i.classList.contains("disabled")||n.classList.contains("disabled"))return;i.checked=!this._element.classList.contains(y),e(i).trigger("change")}i.focus(),r=!1}}r&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(y)),t&&e(this._element).toggleClass(y)}
15,r.dispose=function(){e.removeData(this._element,"bs.button"),this._element=null},t._jQueryInterface=function(r){return this.each(function(){var n=e(this).data("bs.button");n||(n=new t(this),e(this).data("bs.button",n)),"toggle"===r&&n[r]()})},i(t,null,[{key:"VERSION",get:function(){return"4.3.1"}}]),t}();e(document).on(S.CLICK_DATA_API,x,function(t){t.preventDefault();var r=t.target;e(r).hasClass(v)||(r=e(r).closest(T)),C._jQueryInterface.call(e(r),"toggle")}).on(S.FOCUS_BLUR_DATA_API,x,function(t){var r=e(t.target).closest(T)[0];e(r).toggleClass(_,/^focus(in)?$/.test(t.type))}),e.fn.button=C._jQueryInterface,e.fn.button.Constructor=C,e.fn.button.noConflict=function(){return e.fn.button=g,C._jQueryInterface};var A="carousel",I=".bs.carousel",D=e.fn[A],k={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},M={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},P="next",z="prev",L="left",O="right",R={SLIDE:"slide.bs.carousel",SLID:"slid.bs.carousel",KEYDOWN:"keydown.bs.carousel",MOUSEENTER:"mouseenter.bs.carousel",MOUSELEAVE:"mouseleave.bs.carousel",TOUC
15HSTART:"touchstart.bs.carousel",TOUCHMOVE:"touchmove.bs.carousel",TOUCHEND:"touchend.bs.carousel",POINTERDOWN:"pointerdown.bs.carousel",POINTERUP:"pointerup.bs.carousel",DRAG_START:"dragstart.bs.carousel",LOAD_DATA_API:"load.bs.carousel.data-api",CLICK_DATA_API:"click.bs.carousel.data-api"},B="carousel",F="active",N="slide",U="carousel-item-right",V="carousel-item-left",j="carousel-item-next",q="carousel-item-prev",H="pointer-event",G={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",ITEM_IMG:".carousel-item img",NEXT_PREV:".carousel-item-next, .carousel-item-prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},W={TOUCH:"touch",PEN:"pen"},Z=function(){function t(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._element=t,this._indicatorsElement=this._element.querySelector(G.INDICATORS),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var r=t.prototype;return r.next=function(){this._isSliding||this._slide(P)},r.nextWhenVisible=function(){!document.hidden&&e(this._element).is(":visible")&&"hidden"!==e(this._element).css("visibility")&&this.next()},r.prev=function(){this._isSliding||this._slide(z)},r.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(G.NEXT_PREV)&&(u.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},r.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},r.to=function(t){var r=this;this._activeElement=this._element.querySelector(G.ACTIVE_ITEM);var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)e(this._element).one(R.SLID,function(){return r.to(t)});else{if(n===t)return this.pause(),void this.cycle();var i=t>n?P:z;this._slide(i,this._items[t])}},r.dispose=function(){e(this._element).off(I),e.removeData(this._element,"bs.carousel"),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},r._getConfig=function(t){return t=a({},k,t),u.typeCheckConfig(A,t,M),t},r._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;e>0&&this.prev(),e<0&&this.next()}},r._addEventListeners=function(){var t=this;this._config.keyboard&&e(this._element).on(R.KEYDOWN,function(e){return t._keydown(e)}),"hover"===this._config.pause&&e(this._element).on(R.MOUSEENTER,function(e){return t.pause(e)}).on(R.MOUSELEAVE,function(e){return t.cycle(e)}),this._config.touch&&this._addTouchEventListeners()},r._addTouchEventListeners=function(){var t=this;if(this._touchSupported){var r=function(e){t._pointerEvent&&W[e.originalEvent.pointerType.toUpperCase()]?t.touchStartX=e.originalEvent.clientX:t._pointerEvent||(t.touchStartX=e.originalEvent.touches[0].clientX)},n=function(e){t._pointerEvent&&W[e.originalEvent.pointerType.toUpperCase()]&&(t.touchDeltaX=e.originalEvent.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout(function(e){return t.cycle(e)},500+t._config.interval))};e(this._element.querySelectorAll(G.ITEM_IMG)).on(R.DRAG_START,function(t){return t.preventDefault()}),this._pointerEvent?(e(this._element).on(R.POINTERDOWN,function(t){return r(t)}),e(this._element).on(R.POINTERUP,function(t){return n(t)}),this._element.classList.add(H)):(e(this._element).on(R.TOUCHSTART,function(t){return r(t)}),e(this._element).on(R.TOUCHMOVE,function(e){return function(e){e.originalEvent.touches&&e.originalEvent.touches.length>1?t.touchDeltaX=0:t.touchDeltaX=e.originalEvent.touches[0].clientX-t.touchStartX}(e)}),e(this._element).on(R.TOUCHEND,function(t){return n(t)}))}},r._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},r._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(G.ITEM)):[],this._items.indexOf(t)},r._getItemByDirection=function(t,e){var r=t===P,n=t===z,i=this._getItemIndex(e),o=this._items.length-1;if((n&&0===i||r&&i===o)&&!this._config.wrap)return e;var a=(i+(t===z?-1:1))%this._items.length;return-1===a?this._items[this._items.length-1]:this._items[a]},r._triggerSlideEvent=function(t,r){var n=this._getItemIndex(t),i=this._getItemIndex(this._element.querySelector(G.ACTIVE_ITEM)),o=e.Event(R.SLIDE,{relatedTarget:t,direction:r,from:i,to:n});return e(this._element).trigger(o),o},r._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var r=[].slice.call(this._indicatorsElement.querySelectorAll(G.ACTIVE));e(r).removeClass(F);var n=this._indicatorsElement.children[this._getItemIndex(t)];n&&e(n).addClass(F)}},r._slide=function(t,r){var n,i,o,a=this,s=this._element.querySelector(G.ACTIVE_ITEM),l=this._getItemIndex(s),c=r||s&&this._getItemByDirection(t,s),p=this._getItemIndex(c),h=Boolean(this._interval);if(t===P?(n=V,i=j,o=L):(n=U,i=q,o=O),c&&e(c).hasClass(F))this._isSliding=!1;else if(!this._triggerSlideEvent(c,o).isDefaultPrevented()&&s&&c){this._isSliding=!0,h&&this.pause(),this._setActiveIndicatorElement(c);var f=e.Event(R.SLID,{relatedTarget:c,direction:o,from:l,to:p});if(e(this._element).hasClass(N)){e(c).addClass(i),u.reflow(c),e(s).addClass(n),e(c).addClass(n);var d=parseInt(c.getAttribute("data-interval"),10);d?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=d):this._config.interval=this._config.defaultInterval||this._config.interval;var m=u.getTransitionDurationFromElement(s);e(s).one(u.TRANSITION_END,function(){e(c).removeClass(n+" "+i).addClass(F),e(s).removeClass(F+" "+i+" "+n),a._isSliding=!1,setTimeout(function(){return e(a._element).trigger(f)},0)}).emulateTransitionEnd(m)}else e(s).removeClass(F),e(c).addClass(F),this._isSliding=!1,e(this._element).trigger(f);h&&this.cycle()}},t._jQueryInterface=function(r){return this.each(function(){var n=e(this).data("bs.carousel"),i=a({},k,e(this).data());"object"==typeof r&&(i=a({},i,r));var o="string"==typeof r?r:i.slide;if(n||(n=new t(this,i),e(this).data("bs.carousel",n)),"number"==typeof r)n.to(r);else if("string"==typeof o){if(void 0===n[o])throw new TypeError('No method n
15amed "'+o+'"');n[o]()}else i.interval&&i.ride&&(n.pause(),n.cycle())})},t._dataApiClickHandler=function(r){var n=u.getSelectorFromElement(this);if(n){var i=e(n)[0];if(i&&e(i).hasClass(B)){var o=a({},e(i).data(),e(this).data()),s=this.getAttribute("data-slide-to");s&&(o.interval=!1),t._jQueryInterface.call(e(i),o),s&&e(i).data("bs.carousel").to(s),r.preventDefault()}}},i(t,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return k}}]),t}();e(document).on(R.CLICK_DATA_API,G.DATA_SLIDE,Z._dataApiClickHandler),e(window).on(R.LOAD_DATA_API,function(){for(var t=[].slice.call(document.querySelectorAll(G.DATA_RIDE)),r=0,n=t.length;r<n;r++){var i=e(t[r]);Z._jQueryInterface.call(i,i.data())}}),e.fn[A]=Z._jQueryInterface,e.fn[A].Constructor=Z,e.fn[A].noConflict=function(){return e.fn[A]=D,Z._jQueryInterface};var X="collapse",Y=e.fn[X],K={toggle:!0,parent:""},J={toggle:"boolean",parent:"(string|element)"},Q={SHOW:"show.bs.collapse",SHOWN:"shown.bs.collapse",HIDE:"hide.bs.collapse",HIDDEN:"hidden.bs.collapse",CLICK_DATA_API:"click.bs.collapse.data-api"},$="show",tt="collapse",et="collapsing",rt="collapsed",nt="width",it="height",ot={ACTIVES:".show, .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},at=function(){function t(t,e){this._isTransitioning=!1,this._element=t,this._config=this._getConfig(e),this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'));for(var r=[].slice.call(document.querySelectorAll(ot.DATA_TOGGLE)),n=0,i=r.length;n<i;n++){var o=r[n],a=u.getSelectorFromElement(o),s=[].slice.call(document.querySelectorAll(a)).filter(function(e){return e===t});null!==a&&s.length>0&&(this._selector=a,this._triggerArray.push(o))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var r=t.prototype;return r.toggle=function(){e(this._element).hasClass($)?this.hide():this.show()},r.show=function(){var r,n,i=this;if(!this._isTransitioning&&!e(this._element).hasClass($)&&(this._parent&&0===(r=[].slice.call(this._parent.querySelectorAll(ot.ACTIVES)).filter(function(t){return"string"==typeof i._config.parent?t.getAttribute("data-parent")===i._config.parent:t.classList.contains(tt)})).length&&(r=null),!(r&&(n=e(r).not(this._selector).data("bs.collapse"))&&n._isTransitioning))){var o=e.Event(Q.SHOW);if(e(this._element).trigger(o),!o.isDefaultPrevented()){r&&(t._jQueryInterface.call(e(r).not(this._selector),"hide"),n||e(r).data("bs.collapse",null));var a=this._getDimension();e(this._element).removeClass(tt).addClass(et),this._element.style[a]=0,this._triggerArray.length&&e(this._triggerArray).removeClass(rt).attr("aria-expanded",!0),this.setTransitioning(!0);var s="scroll"+(a[0].toUpperCase()+a.slice(1)),l=u.getTransitionDurationFromElement(this._element);e(this._element).one(u.TRANSITION_END,function(){e(i._element).removeClass(et).addClass(tt).addClass($),i._element.style[a]="",i.setTransitioning(!1),e(i._element).trigger(Q.SHOWN)}).emulateTransitionEnd(l),this._element.style[a]=this._element[s]+"px"}}},r.hide=function(){var t=this;if(!this._isTransitioning&&e(this._element).hasClass($)){var r=e.Event(Q.HIDE);if(e(this._element).trigger(r),!r.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",u.reflow(this._element),e(this._element).addClass(et).removeClass(tt).removeClass($);var i=this._triggerArray.length;if(i>0)for(var o=0;o<i;o++){var a=this._triggerArray[o],s=u.getSelectorFromElement(a);if(null!==s)e([].slice.call(document.querySelectorAll(s))).hasClass($)||e(a).addClass(rt).attr("aria-expanded",!1)}this.setTransitioning(!0);this._element.style[n]="";var l=u.getTransitionDurationFromElement(this._element);e(this._element).one(u.TRANSITION_END,function(){t.setTransitioning(!1),e(t._element).removeClass(et).addClass(tt).trigger(Q.HIDDEN)}).emulateTransitionEnd(l)}}},r.setTransitioning=function(t){this._isTransitioning=t}
15,r.dispose=function(){e.removeData(this._element,"bs.collapse"),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},r._getConfig=function(t){return(t=a({},K,t)).toggle=Boolean(t.toggle),u.typeCheckConfig(X,t,J),t},r._getDimension=function(){return e(this._element).hasClass(nt)?nt:it},r._getParent=function(){var r,n=this;u.isElement(this._config.parent)?(r=this._config.parent,void 0!==this._config.parent.jquery&&(r=this._config.parent[0])):r=document.querySelector(this._config.parent);var i='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',o=[].slice.call(r.querySelectorAll(i));return e(o).each(function(e,r){n._addAriaAndCollapsedClass(t._getTargetFromElement(r),[r])}),r},r._addAriaAndCollapsedClass=function(t,r){var n=e(t).hasClass($);r.length&&e(r).toggleClass(rt,!n).attr("aria-expanded",n)},t._getTargetFromElement=function(t){var e=u.getSelectorFromElement(t);return e?document.querySelector(e):null},t._jQueryInterface=function(r){return this.each(function(){var n=e(this),i=n.data("bs.collapse"),o=a({},K,n.data(),"object"==typeof r&&r?r:{});if(!i&&o.toggle&&/show|hide/.test(r)&&(o.toggle=!1),i||(i=new t(this,o),n.data("bs.collapse",i)),"string"==typeof r){if(void 0===i[r])throw new TypeError('No method named "'+r+'"');i[r]()}})},i(t,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return K}}]),t}();e(document).on(Q.CLICK_DATA_API,ot.DATA_TOGGLE,function(t){"A"===t.currentTarget.tagName&&t.preventDefault();var r=e(this),n=u.getSelectorFromElement(this),i=[].slice.call(document.querySelectorAll(n));e(i).each(function(){var t=e(this),n=t.data("bs.collapse")?"toggle":r.data();at._jQueryInterface.call(t,n)})}),e.fn[X]=at._jQueryInterface,e.fn[X].Constructor=at,e.fn[X].noConflict=function(){return e.fn[X]=Y,at._jQueryInterface};var st="dropdown",lt=e.fn[st],ut=new RegExp("38|40|27"),ct={HIDE:"hide.bs.dropdown",HIDDEN:"hidden.bs.dropdown",SHOW:"show.bs.dropdown",SHOWN:"shown.bs.dropdown",CLICK:"click.bs.dropdown",CLICK_DATA_API:"click.bs.dropdown.data-api",KEYDOWN_DATA_API:"keydown.bs.dropdown.data-api",KEYUP_DATA_API:"keyup.bs.dropdown.data-api"},pt="disabled",ht="show",ft="dropup",dt="dropright",mt="dropleft",gt="dropdown-menu-right",yt="position-static",vt='[data-toggle="dropdown"]',_t=".dropdown form",xt=".dropdown-menu",bt=".navbar-nav",wt=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",Et="top-start",Tt="top-end",St="bottom-start",Ct="bottom-end",At="right-start",It="left-start",Dt={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic"},kt={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string"},Mt=function(){function t(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var n=t.prototype;return n.toggle=function(){if(!this._element.disabled&&!e(this._element).hasClass(pt)){var n=t._getParentFromElement(this._element),i=e(this._menu).hasClass(ht);if(t._clearMenus(),!i){var o={relatedTarget:this._element},a=e.Event(ct.SHOW,o);if(e(n).trigger(a),!a.isDefaultPrevented()){if(!this._inNavbar){if(void 0===r)throw new TypeError("Bootstrap's dropdowns require Popper.js (https://popper.js.org/)");var s=this._element;"parent"===this._config.reference?s=n:u.isElement(this._config.reference)&&(s=this._config.reference,void 0!==this._config.reference.jquery&&(s=this._config.reference[0])),"scrollParent"!==this._config.boundary&&e(n).addClass(yt),this._popper=new r(s,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===e(n).closest(bt).length&&e(document.body).children().on("mouseover",null,e.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),e(this._menu).toggleClass(ht),e(n).toggleClass(ht).trigger(e.Event(ct.SHOWN,o))}}}},n.show=function(){if(!(this._element.disabled||e(this._element).hasClass(pt)||e(this._menu).hasClass(ht))){var r={relatedTarget:this._element},n=e.Event(ct.SHOW,r),i=t._getParentFromElement(this._element);e(i).trigger(n),n.isDefaultPrevented()||(e(this._menu).toggleClass(ht),e(i).toggleClass(ht).trigger(e.Event(ct.SHOWN,r)))}},n.hide=function(){if(!this._element.disabled&&!e(this._element).hasClass(pt)&&e(this._menu).hasClass(ht)){var r={relatedTarget:this._element},n=e.Event(ct.HIDE,r),i=t._getParentFromElement(this._element);e(i).trigger(n),n.isDefaultPrevented()||(e(this._menu).toggleClass(ht),e(i).toggleClass(ht).trigger(e.Event(ct.HIDDEN,r)))}}
15,n.dispose=function(){e.removeData(this._element,"bs.dropdown"),e(this._element).off(".bs.dropdown"),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},n.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},n._addEventListeners=function(){var t=this;e(this._element).on(ct.CLICK,function(e){e.preventDefault(),e.stopPropagation(),t.toggle()})},n._getConfig=function(t){return t=a({},this.constructor.Default,e(this._element).data(),t),u.typeCheckConfig(st,t,this.constructor.DefaultType),t},n._getMenuElement=function(){if(!this._menu){var e=t._getParentFromElement(this._element);e&&(this._menu=e.querySelector(xt))}return this._menu},n._getPlacement=function(){var t=e(this._element.parentNode),r=St;return t.hasClass(ft)?(r=Et,e(this._menu).hasClass(gt)&&(r=Tt)):t.hasClass(dt)?r=At:t.hasClass(mt)?r=It:e(this._menu).hasClass(gt)&&(r=Ct),r},n._detectNavbar=function(){return e(this._element).closest(".navbar").length>0},n._getOffset=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=a({},e.offsets,t._config.offset(e.offsets,t._element)||{}),e}:e.offset=this._config.offset,e},n._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),t},t._jQueryInterface=function(r){return this.each(function(){var n=e(this).data("bs.dropdown");if(n||(n=new t(this,"object"==typeof r?r:null),e(this).data("bs.dropdown",n)),"string"==typeof r){if(void 0===n[r])throw new TypeError('No method named "'+r+'"');n[r]()}})},t._clearMenus=function(r){if(!r||3!==r.which&&("keyup"!==r.type||9===r.which))for(var n=[].slice.call(document.querySelectorAll(vt)),i=0,o=n.length;i<o;i++){var a=t._getParentFromElement(n[i]),s=e(n[i]).data("bs.dropdown"),l={relatedTarget:n[i]};if(r&&"click"===r.type&&(l.clickEvent=r),s){var u=s._menu;if(e(a).hasClass(ht)&&!(r&&("click"===r.type&&/input|textarea/i.test(r.target.tagName)||"keyup"===r.type&&9===r.which)&&e.contains(a,r.target))){var c=e.Event(ct.HIDE,l);e(a).trigger(c),c.isDefaultPrevented()||("ontouchstart"in document.documentElement&&e(document.body).children().off("mouseover",null,e.noop),n[i].setAttribute("aria-expanded","false"),e(u).removeClass(ht),e(a).removeClass(ht).trigger(e.Event(ct.HIDDEN,l)))}}}},t._getParentFromElement=function(t){var e,r=u.getSelectorFromElement(t);return r&&(e=document.querySelector(r)),e||t.parentNode},t._dataApiKeydownHandler=function(r){if((/input|textarea/i.test(r.target.tagName)?!(32===r.which||27!==r.which&&(40!==r.which&&38!==r.which||e(r.target).closest(xt).length)):ut.test(r.which))&&
15(r.preventDefault(),r.stopPropagation(),!this.disabled&&!e(this).hasClass(pt))){var n=t._getParentFromElement(this),i=e(n).hasClass(ht);if(i&&(!i||27!==r.which&&32!==r.which)){var o=[].slice.call(n.querySelectorAll(wt));if(0!==o.length){var a=o.indexOf(r.target);38===r.which&&a>0&&a--,40===r.which&&a<o.length-1&&a++,a<0&&(a=0),o[a].focus()}}else{if(27===r.which){var s=n.querySelector(vt);e(s).trigger("focus")}e(this).trigger("click")}}},i(t,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return Dt}},{key:"DefaultType",get:function(){return kt}}]),t}();e(document).on(ct.KEYDOWN_DATA_API,vt,Mt._dataApiKeydownHandler).on(ct.KEYDOWN_DATA_API,xt,Mt._dataApiKeydownHandler).on(ct.CLICK_DATA_API+" "+ct.KEYUP_DATA_API,Mt._clearMenus).on(ct.CLICK_DATA_API,vt,function(t){t.preventDefault(),t.stopPropagation(),Mt._jQueryInterface.call(e(this),"toggle")}).on(ct.CLICK_DATA_API,_t,function(t){t.stopPropagation()}),e.fn[st]=Mt._jQueryInterface,e.fn[st].Constructor=Mt,e.fn[st].noConflict=function(){return e.fn[st]=lt,Mt._jQueryInterface};var Pt=e.fn.modal,zt={backdrop:!0,keyboard:!0,focus:!0,show:!0},Lt={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},Ot={HIDE:"hide.bs.modal",HIDDEN:"hidden.bs.modal",SHOW:"show.bs.modal",SHOWN:"shown.bs.modal",FOCUSIN:"focusin.bs.modal",RESIZE:"resize.bs.modal",CLICK_DISMISS:"click.dismiss.bs.modal",KEYDOWN_DISMISS:"keydown.dismiss.bs.modal",MOUSEUP_DISMISS:"mouseup.dismiss.bs.modal",MOUSEDOWN_DISMISS:"mousedown.dismiss.bs.modal",CLICK_DATA_API:"click.bs.modal.data-api"},Rt="modal-dialog-scrollable",Bt="modal-scrollbar-measure",Ft="modal-backdrop",Nt="modal-open",Ut="fade",Vt="show",jt={DIALOG:".modal-dialog",MODAL_BODY:".modal-body",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top"},qt=function(){function t(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=t.querySelector(jt.DIALOG),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0}var r=t.prototype;return r.toggle=function(t){return this._isShown?this.hide():this.show(t)},r.show=function(t){var r=this;if(!this._isShown&&!this._isTransitioning){e(this._element).hasClass(Ut)&&(this._isTransitioning=!0);var n=e.Event(Ot.SHOW,{relatedTarget:t});e(this._element).trigger(n),this._isShown||n.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),e(this._element).on(Ot.CLICK_DISMISS,jt.DATA_DISMISS,function(t){return r.hide(t)}),e(this._dialog).on(Ot.MOUSEDOWN_DISMISS,function(){e(r._element).one(Ot.MOUSEUP_DISMISS,function(t){e(t.target).is(r._element)&&(r._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return r._showElement(t)}))}},r.hide=function(t){var r=this;if(t&&t.preventDefault(),this._isShown&&!this._isTransitioning){var n=e.Event(Ot.HIDE);if(e(this._element).trigger(n),this._isShown&&!n.isDefaultPrevented()){this._isShown=!1;var i=e(this._element).hasClass(Ut);if(i&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),e(document).off(Ot.FOCUSIN),e(this._element).removeClass(Vt),e(this._element).off(Ot.CLICK_DISMISS),e(this._dialog).off(Ot.MOUSEDOWN_DISMISS),i){var o=u.getTransitionDurationFromElement(this._element);e(this._element).one(u.TRANSITION_END,function(t){return r._hideModal(t)}).emulateTransitionEnd(o)}else this._hideModal()}}},r.dispose=function(){[window,this._element,this._dialog].forEach(function(t){return e(t).off(".bs.modal")}),e(document).off(Ot.FOCUSIN),e.removeData(this._element,"bs.modal"),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},r.handleUpdate=function(){this._adjustDialog()},r._getConfig=function(t){return t=a({},zt,t),u.typeCheckConfig("modal",t,Lt),t},r._showElement=function(t){var r=this,n=e(this._element).hasClass(Ut);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),e(this._dialog).hasClass(Rt)?this._dialog.querySelector(jt.MODAL_BODY).scrollTop=0:this._element.scrollTop=0,n&&u.reflow(this._element),e(this._element).addClass(Vt),this._config.focus&&this._enforceFocus();var i=e.Event(Ot.SHOWN,{relatedTarget:t}),o=function(){r._config.focus&&r._element.focus(),r._isTransitioning=!1,e(r._element).trigger(i)};if(n){var a=u.getTransitionDurationFromElement(this._dialog);e(this._dialog).one(u.TRANSITION_END,o).emulateTransitionEnd(a)}else o()},r._enforceFocus=function(){var t=this;e(document).off(Ot.FOCUSIN).on(Ot.FOCUSIN,function(r){document!==r.target&&t._element!==r.target&&0===e(t._element).has(r.target).length&&t._element.focus()})},r._setEscapeEvent=function(){var t=this;this._isShown&&this._config.keyboard?e(this._element).on(Ot.KEYDOWN_DISMISS,function(e){27===e.which&&(e.preventDefault(),t.hide())}):this._isShown||e(this._element).off(Ot.KEYDOWN_DISMISS)},r._setResizeEvent=function(){var t=this;this._isShown?e(window).on(Ot.RESIZE,function(e){return t.handleUpdate(e)}):e(window).off(Ot.RESIZE)},r._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._isTransitioning=!1,this._showBackdrop(function(){e(document.body).removeClass(Nt),t._resetAdjustments(),t._resetScrollbar(),e(t._element).trigger(Ot.HIDDEN)})},r._removeBackdrop=function(){this._backdrop&&(e(this._backdrop).remove(),this._backdrop=null)},r._showBackdrop=function(t){var r=this,n=e(this._element).hasClass(Ut)?Ut:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className=Ft,n&&this._backdrop.classList.add(n),e(this._backdrop).appendTo(document.body),e(this._element).on(Ot.CLICK_DISMISS,function(t){r._ignoreBackdropClick?r._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===r._config.backdrop?r._element.focus():r.hide())}),n&&u.reflow(this._backdrop),e(this._backdrop).addClass(Vt),!t)return;if(!n)return void t();var i=u.getTransitionDurationFromElement(this._backdrop);e(this._backdrop).one(u.TRANSITION_END,t).emulateTransitionEnd(i)}else if(!this._isShown&&this._backdrop){e(this._backdrop).removeClass(Vt);var o=function(){r._removeBackdrop(),t&&t()};if(e(this._element).hasClass(Ut)){var a=u.getTransitionDurationFromElement(this._backdrop);e(this._backdrop).one(u.TRANSITION_END,o).emulateTransitionEnd(a)}else o()}else t&&t()},r._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},r._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},r._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},r._setScrollbar=function(){var t=this;if(this._isBodyOverflowing){var r=[].slice.call(document.querySelectorAll(jt.FIXED_CONTENT)),n=[].slice.call(document.querySelectorAll(jt.STICKY_CONTENT));e(r).each(function(r,n){var i=n.style.paddingRight,o=e(n).css("padding-right");e(n).data("padding-right",i).css("padding-right",parseFloat(o)+t._scrollbarWidth+"px")}),e(n).each(function(r,n){var i=n.style.marginRight,o=e(n).css("margin-right");e(n).data("margin-right",i).css("margin-right",parseFloat(o)-t._scrollbarWidth+"px")});var i=document.body.style.paddingRight,o=e(document.body).css("padding-right");e(document.body).data("padding-right",i).css("padding-right",parseFloat(o)+this._scrollbarWidth+"px")}e(document.body).addClass(Nt)},r._resetScrollbar=function(){var t=[].slice.call(document.querySelectorAll(jt.FIXED_CONTENT));e(t).each(function(t,r){var n=e(r).data("padding-right");e(r).removeData("padding-right"),r.style.paddingRight=n||""});var r=[].slice.call(document.querySelectorAll(""+jt.STICKY_CONTENT));e(r).each(function(t,r){var n=e(r).data("margin-right");void 0!==n&&e(r).css("margin-right",n).removeData("margin-right")});var n=e(document.body).data("padding-right");e(document.body).removeData("padding-right"),document.body.style.paddingRight=n||""},r._getScrollbarWidth=function(){var t=document.createElement("div");t.className=Bt,document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},t._jQueryInterface=function(r,n){return this.each(function(){var i=e(this).data("bs.modal"),o=a({},zt,e(this).data(),"object"==typeof r&&r?r:{});if(i||(i=new t(this,o),e(this).data("bs.modal",i)),"string"==typeof r){if(void 0===i[r])throw new TypeError('No method n
15amed "'+r+'"');i[r](n)}else o.show&&i.show(n)})},i(t,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return zt}}]),t}();e(document).on(Ot.CLICK_DATA_API,jt.DATA_TOGGLE,function(t){var r,n=this,i=u.getSelectorFromElement(this);i&&(r=document.querySelector(i));var o=e(r).data("bs.modal")?"toggle":a({},e(r).data(),e(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var s=e(r).one(Ot.SHOW,function(t){t.isDefaultPrevented()||s.one(Ot.HIDDEN,function(){e(n).is(":visible")&&n.focus()})});qt._jQueryInterface.call(e(r),o,this)}),e.fn.modal=qt._jQueryInterface,e.fn.modal.Constructor=qt,e.fn.modal.noConflict=function(){return e.fn.modal=Pt,qt._jQueryInterface};var Ht=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],Gt={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Wt=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,Zt=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function Xt(t,e,r){if(0===t.length)return t;if(r&&"function"==typeof r)return r(t);for(var n=(new window.DOMParser).parseFromString(t,"text/html"),i=Object.keys(e),o=[].slice.call(n.body.querySelectorAll("*")),a=function(t,r){var n=o[t],a=n.nodeName.toLowerCase();if(-1===i.indexOf(n.nodeName.toLowerCase()))return n.parentNode.removeChild(n),"continue";var s=[].slice.call(n.attributes),l=[].concat(e["*"]||[],e[a]||[]);s.forEach(function(t){(function(t,e){var r=t.nodeName.toLowerCase();if(-1!==e.indexOf(r))return-1===Ht.indexOf(r)||Boolean(t.nodeValue.match(Wt)||t.nodeValue.match(Zt));for(var n=e.filter(function(t){return t instanceof RegExp}),i=0,o=n.length;i<o;i++)if(r.match(n[i]))return!0;return!1})(t,l)||n.removeAttribute(t.nodeName)})},s=0,l=o.length;s<l;s++)a(s);return n.body.innerHTML}var Yt="tooltip",Kt=e.fn.tooltip,Jt=new RegExp("(^|\\s)bs-tooltip\\S+","g"),Qt=["sanitize","whiteList","sanitizeFn"],$t={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object"},te={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},ee={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:Gt},re="show",ne="out",ie={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},oe="fade",ae="show",se=".tooltip-inner",le=".arrow",ue="hover",ce="focus",pe="click",he="manual",fe=function(){function t(t,e){if(void 0===r)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var n=t.prototype;return n.enable=function(){this._isEnabled=!0},n.disable=function(){this._isEnabled=!1},n.toggleEnabled=function(){this._isEnabled=!this._isEnabled},n.toggle=function(t){if(this._isEnabled)if(t){var r=this.constructor.DATA_KEY,n=e(t.currentTarget).data(r);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(r,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(e(this.getTipElement()).hasClass(ae))return void this._leave(null,this);this._enter(null,this)}},n.dispose=function(){clearTimeout(this._timeout),e.removeData(this.element,this.constructor.DATA_KEY),e(this.element).off(this.constructor.EVENT_KEY),e(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&e(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,null!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},n.show=function(){var t=this;if("none"===e(this.element).css("display"))throw new Error("Please use show on visible elements");var n=e.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){e(this.element).trigger(n);var i=u.findShadowRoot(this.element),o=e.contains(null!==i?i:this.element.ownerDocument.documentElement,this.element);if(n.isDefaultPrevented()||!o)return;var a=this.getTipElement(),s=u.getUID(this.constructor.NAME);a.setAttribute("id",s),this.element.setAttribute("aria-describedby",s),this.setContent(),this.config.animation&&e(a).addClass(oe);var l="function"==typeof this.config.placement?this.config.placement.call(this,a,this.element):this.config.placement,c=this._getAttachment(l);this.addAttachmentClass(c);var p=this._getContainer();e(a).data(this.constructor.DATA_KEY,this),e.contains(this.element.ownerDocument.documentElement,this.tip)||e(a).appendTo(p),e(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new r(this.element,a,{placement:c,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:le}
15,preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(e){e.originalPlacement!==e.placement&&t._handlePopperPlacementChange(e)},onUpdate:function(e){return t._handlePopperPlacementChange(e)}}),e(a).addClass(ae),"ontouchstart"in document.documentElement&&e(document.body).children().on("mouseover",null,e.noop);var h=function(){t.config.animation&&t._fixTransition();var r=t._hoverState;t._hoverState=null,e(t.element).trigger(t.constructor.Event.SHOWN),r===ne&&t._leave(null,t)};if(e(this.tip).hasClass(oe)){var f=u.getTransitionDurationFromElement(this.tip);e(this.tip).one(u.TRANSITION_END,h).emulateTransitionEnd(f)}else h()}},n.hide=function(t){var r=this,n=this.getTipElement(),i=e.Event(this.constructor.Event.HIDE),o=function(){r._hoverState!==re&&n.parentNode&&n.parentNode.removeChild(n),r._cleanTipClass(),r.element.removeAttribute("aria-describedby"),e(r.element).trigger(r.constructor.Event.HIDDEN),null!==r._popper&&r._popper.destroy(),t&&t()};if(e(this.element).trigger(i),!i.isDefaultPrevented()){if(e(n).removeClass(ae),"ontouchstart"in document.documentElement&&e(document.body).children().off("mouseover",null,e.noop),this._activeTrigger[pe]=!1,this._activeTrigger[ce]=!1,this._activeTrigger[ue]=!1,e(this.tip).hasClass(oe)){var a=u.getTransitionDurationFromElement(n);e(n).one(u.TRANSITION_END,o).emulateTransitionEnd(a)}else o();this._hoverState=""}},n.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},n.isWithContent=function(){return Boolean(this.getTitle())},n.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-tooltip-"+t)},n.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},n.setContent=function(){var t=this.getTipElement();this.setElementContent(e(t.querySelectorAll(se)),this.getTitle()),e(t).removeClass(oe+" "+ae)},n.setElementContent=function(t,r){"object"!=typeof r||!r.nodeType&&!r.jquery?this.config.html?(this.config.sanitize&&(r=Xt(r,this.config.whiteList,this.config.sanitizeFn)),t.html(r)):t.text(r):this.config.html?e(r).parent().is(t)||t.empty().append(r):t.text(e(r).text())},n.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},n._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=a({},e.offsets,t.config.offset(e.offsets,t.element)||{}),e}:e.offset=this.config.offset,e},n._getContainer=function(){return!1===this.config.container?document.body:u.isElement(this.config.container)?e(this.config.container):e(document).find(this.config.container)},n._getAttachment=function(t){return te[t.toUpperCase()]},n._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach(function(r){if("click"===r)e(t.element).on(t.constructor.Event.CLICK,t.config.selector,function(e){return t.toggle(e)});else if(r!==he){var n=r===ue?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,i=r===ue?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;e(t.element).on(n,t.config.selector,function(e){return t._enter(e)}).on(i,t.config.selector,function(e){return t._leave(e)})}}),e(this.element).closest(".modal").on("hide.bs.modal",function(){t.element&&t.hide()}),this.config.selector?this.config=a({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},n._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},n._enter=function(t,r){var n=this.constructor.DATA_KEY;(r=r||e(t.currentTarget).data(n))||(r=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(n,r)),t&&(r._activeTrigger["focusin"===t.type?ce:ue]=!0),e(r.getTipElement()).hasClass(ae)||r._hoverState===re?r._hoverState=re:(clearTimeout(r._timeout),r._hoverState=re,r.config.delay&&r.config.delay.show?r._timeout=setTimeout(function(){r._hoverState===re&&r.show()},r.config.delay.show):r.show())},n._leave=function(t,r){var n=this.constructor.DATA_KEY;(r=r||e(t.currentTarget).data(n))||(r=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(n,r)),t&&(r._activeTrigger["focusout"===t.type?ce:ue]=!1),r._isWithActiveTrigger()||(clearTimeout(r._timeout),r._hoverState=ne,r.config.delay&&r.config.delay.hide?r._timeout=setTimeout(function(){r._hoverState===ne&&r.hide()},r.config.delay.hide):r.hide())},n._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},n._getConfig=function(t){var r=e(this.element).data();return Object.keys(r).forEach(function(t){-1!==Qt.indexOf(t)&&delete r[t]}),"number"==typeof(t=a({},this.constructor.Default,r,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),u.typeCheckConfig(Yt,t,this.constructor.DefaultType),t.sanitize&&(t.template=Xt(t.template,t.whiteList,t.sanitizeFn)),t},n._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},n._cleanTipClass=function(){var t=e(this.getTipElement()),r=t.attr("class").match(Jt);null!==r&&r.length&&t.removeClass(r.join(""))},n._handlePopperPlacementChange=function(t){var e=t.instance;this.tip=e.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},n._fixTransition=function(){var t=this.getTipElement(),r=this.config.animation;null===t.getAttribute("x-placement")&&(e(t).removeClass(oe),this.config.animation=!1,this.hide(),this.show(),this.config.animation=r)},t._jQueryInterface=function(r){return this.each(function(){var n=e(this).data("bs.tooltip"),i="object"==typeof r&&r;if((n||!/dispose|hide/.test(r))&&(n||(n=new t(this,i),e(this).data("bs.tooltip",n)),"string"==typeof r)){if(void 0===n[r])throw new TypeError('No method n
15amed "'+r+'"');n[r]()}})},i(t,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return ee}},{key:"NAME",get:function(){return Yt}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return ie}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return $t}}]),t}();e.fn.tooltip=fe._jQueryInterface,e.fn.tooltip.Constructor=fe,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=Kt,fe._jQueryInterface};var de="popover",me=e.fn.popover,ge=new RegExp("(^|\\s)bs-popover\\S+","g"),ye=a({},fe.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),ve=a({},fe.DefaultType,{content:"(string|element|function)"}),_e="fade",xe="show",be=".popover-header",we=".popover-body",Ee={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},Te=function(t){var r,n;function o(){return t.apply(this,arguments)||this}n=t,(r=o).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n;var a=o.prototype;return a.isWithContent=function(){return this.getTitle()||this._getContent()},a.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-popover-"+t)},a.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},a.setContent=function(){var t=e(this.getTipElement());this.setElementContent(t.find(be),this.getTitle());var r=this._getContent();"function"==typeof r&&(r=r.call(this.element)),this.setElementContent(t.find(we),r),t.removeClass(_e+" "+xe)},a._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},a._cleanTipClass=function(){var t=e(this.getTipElement()),r=t.attr("class").match(ge);null!==r&&r.length>0&&t.removeClass(r.join(""))},o._jQueryInterface=function(t){return this.each(function(){var r=e(this).data("bs.popover"),n="object"==typeof t?t:null;if((r||!/dispose|hide/.test(t))&&(r||(r=new o(this,n),e(this).data("bs.popover",r)),"string"==typeof t)){if(void 0===r[t])throw new TypeError('No method named "'+t+'"');r[t]()}})},i(o,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return ye}},{key:"NAME",get:function(){return de}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return Ee}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return ve}}]),o}(fe);e.fn.popover=Te._jQueryInterface,e.fn.popover.Constructor=Te,e.fn.popover.noConflict=function(){return e.fn.popover=me,Te._jQueryInterface};var Se="scrollspy",Ce=e.fn[Se],Ae={offset:10,method:"auto",target:""},Ie={offset:"number",method:"string",target:"(string|element)"},De={ACTIVATE:"activate.bs.scrollspy",SCROLL:"scroll.bs.scrollspy",LOAD_DATA_API:"load.bs.scrollspy.data-api"},ke="dropdown-item",Me="active",Pe={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",NAV_ITEMS:".nav-item",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},ze="offset",Le="position",Oe=function(){function t(t,r){var n=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(r),this._selector=this._config.target+" "+Pe.NAV_LINKS+","+this._config.target+" "+Pe.LIST_ITEMS+","+this._config.target+" "+Pe.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,e(this._scrollElement).on(De.SCROLL,function(t){return n._process(t)}),this.refresh(),this._process()}
15var r=t.prototype;return r.refresh=function(){var t=this,r=this._scrollElement===this._scrollElement.window?ze:Le,n="auto"===this._config.method?r:this._config.method,i=n===Le?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map(function(t){var r,o=u.getSelectorFromElement(t);if(o&&(r=document.querySelector(o)),r){var a=r.getBoundingClientRect();if(a.width||a.height)return[e(r)[n]().top+i,o]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(e){t._offsets.push(e[0]),t._targets.push(e[1])})},r.dispose=function(){e.removeData(this._element,"bs.scrollspy"),e(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},r._getConfig=function(t){if("string"!=typeof(t=a({},Ae,"object"==typeof t&&t?t:{})).target){var r=e(t.target).attr("id");r||(r=u.getUID(Se),e(t.target).attr("id",r)),t.target="#"+r}return u.typeCheckConfig(Se,t,Ie),t},r._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},r._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},r._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},r._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),r=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=r){var n=this._targets[this._targets.length-1];this._activeTarget!==n&&this._activate(n)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var i=this._offsets.length;i--;){this._activeTarget!==this._targets[i]&&t>=this._offsets[i]&&(void 0===this._offsets[i+1]||t<this._offsets[i+1])&&this._activate(this._targets[i])}}},r._activate=function(t){this._activeTarget=t,this._clear();var r=this._selector.split(",").map(function(e){return e+'[data-target="'+t+'"],'+e+'[href="'+t+'"]'}),n=e([].slice.call(document.querySelectorAll(r.join(","))));n.hasClass(ke)?(n.closest(Pe.DROPDOWN).find(Pe.DROPDOWN_TOGGLE).addClass(Me),n.addClass(Me)):(n.addClass(Me),n.parents(Pe.NAV_LIST_GROUP).prev(Pe.NAV_LINKS+", "+Pe.LIST_ITEMS).addClass(Me),n.parents(Pe.NAV_LIST_GROUP).prev(Pe.NAV_ITEMS).children(Pe.NAV_LINKS).addClass(Me)),e(this._scrollElement).trigger(De.ACTIVATE,{relatedTarget:t})},r._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter(function(t){return t.classList.contains(Me)}).forEach(function(t){return t.classList.remove(Me)})},t._jQueryInterface=function(r){return this.each(function(){var n=e(this).data("bs.scrollspy");if(n||(n=new t(this,"object"==typeof r&&r),e(this).data("bs.scrollspy",n)),"string"==typeof r){if(void 0===n[r])throw new TypeError('No method named "'+r+'"');n[r]()}})},i(t,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return Ae}}]),t}();e(window).on(De.LOAD_DATA_API,function(){for(var t=[].slice.call(document.querySelectorAll(Pe.DATA_SPY)),r=t.length;r--;){var n=e(t[r]);Oe._jQueryInterface.call(n,n.data())}}),e.fn[Se]=Oe._jQueryInterface,e.fn[Se].Constructor=Oe,e.fn[Se].noConflict=function(){return e.fn[Se]=Ce,Oe._jQueryInterface};var Re=e.fn.tab,Be={HIDE:"hide.bs.tab",HIDDEN:"hidden.bs.tab",SHOW:"show.bs.tab",SHOWN:"shown.bs.tab",CLICK_DATA_API:"click.bs.tab.data-api"},Fe="dropdown-menu",Ne="active",Ue="disabled",Ve="fade",je="show",qe=".dropdown",He=".nav, .list-group",Ge=".active",We="> li > .active",Ze='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',Xe=".dropdown-toggle",Ye="> .dropdown-menu .active",Ke=function(){function t(t){this._element=t}var r=t.prototype;return r.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&e(this._element).hasClass(Ne)||e(this._element).hasClass(Ue))){var r,n,i=e(this._element).closest(He)[0],o=u.getSelectorFromElement(this._element);if(i){var a="UL"===i.nodeName||"OL"===i.nodeName?We:Ge;n=(n=e.makeArray(e(i).find(a)))[n.length-1]}var s=e.Event(Be.HIDE,{relatedTarget:this._element}),l=e.Event(Be.SHOW,{relatedTarget:n});if(n&&e(n).trigger(s),e(this._element).trigger(l),!l.isDefaultPrevented()&&!s.isDefaultPrevented()){o&&(r=document.querySelector(o)),this._activate(this._element,i);var c=function(){var r=e.Event(Be.HIDDEN,{relatedTarget:t._element}),i=e.Event(Be.SHOWN,{relatedTarget:n});e(n).trigger(r),e(t._element).trigger(i)};r?this._activate(r,r.parentNode,c):c()}}}
15,r.dispose=function(){e.removeData(this._element,"bs.tab"),this._element=null},r._activate=function(t,r,n){var i=this,o=(!r||"UL"!==r.nodeName&&"OL"!==r.nodeName?e(r).children(Ge):e(r).find(We))[0],a=n&&o&&e(o).hasClass(Ve),s=function(){return i._transitionComplete(t,o,n)};if(o&&a){var l=u.getTransitionDurationFromElement(o);e(o).removeClass(je).one(u.TRANSITION_END,s).emulateTransitionEnd(l)}else s()},r._transitionComplete=function(t,r,n){if(r){e(r).removeClass(Ne);var i=e(r.parentNode).find(Ye)[0];i&&e(i).removeClass(Ne),"tab"===r.getAttribute("role")&&r.setAttribute("aria-selected",!1)}if(e(t).addClass(Ne),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),u.reflow(t),t.classList.contains(Ve)&&t.classList.add(je),t.parentNode&&e(t.parentNode).hasClass(Fe)){var o=e(t).closest(qe)[0];if(o){var a=[].slice.call(o.querySelectorAll(Xe));e(a).addClass(Ne)}t.setAttribute("aria-expanded",!0)}n&&n()},t._jQueryInterface=function(r){return this.each(function(){var n=e(this),i=n.data("bs.tab");if(i||(i=new t(this),n.data("bs.tab",i)),"string"==typeof r){if(void 0===i[r])throw new TypeError('No method named "'+r+'"');i[r]()}})},i(t,null,[{key:"VERSION",get:function(){return"4.3.1"}}]),t}();e(document).on(Be.CLICK_DATA_API,Ze,function(t){t.preventDefault(),Ke._jQueryInterface.call(e(this),"show")}),e.fn.tab=Ke._jQueryInterface,e.fn.tab.Constructor=Ke,e.fn.tab.noConflict=function(){return e.fn.tab=Re,Ke._jQueryInterface};var Je=e.fn.toast,Qe={CLICK_DISMISS:"click.dismiss.bs.toast",HIDE:"hide.bs.toast",HIDDEN:"hidden.bs.toast",SHOW:"show.bs.toast",SHOWN:"shown.bs.toast"},$e="fade",tr="hide",er="show",rr="showing",nr={animation:"boolean",autohide:"boolean",delay:"number"},ir={animation:!0,autohide:!0,delay:500},or='[data-dismiss="toast"]',ar=function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var r=t.prototype;return r.show=function(){var t=this;e(this._element).trigger(Qe.SHOW),this._config.animation&&this._element.classList.add($e);var r=function(){t._element.classList.remove(rr),t._element.classList.add(er),e(t._element).trigger(Qe.SHOWN),t._config.autohide&&t.hide()};if(this._element.classList.remove(tr),this._element.classList.add(rr),this._config.animation){var n=u.getTransitionDurationFromElement(this._element);e(this._element).one(u.TRANSITION_END,r).emulateTransitionEnd(n)}else r()},r.hide=function(t){var r=this;this._element.classList.contains(er)&&(e(this._element).trigger(Qe.HIDE),t?this._close():this._timeout=setTimeout(function(){r._close()},this._config.delay))},r.dispose=function(){clearTimeout(this._timeout),this._timeout=null,this._element.classList.contains(er)&&this._element.classList.remove(er),e(this._element).off(Qe.CLICK_DISMISS),e.removeData(this._element,"bs.toast"),this._element=null,this._config=null},r._getConfig=function(t){return t=a({},ir,e(this._element).data(),"object"==typeof t&&t?t:{}),u.typeCheckConfig("toast",t,this.constructor.DefaultType),t},r._setListeners=function(){var t=this;e(this._element).on(Qe.CLICK_DISMISS,or,function(){return t.hide(!0)})},r._close=function(){var t=this,r=function(){t._element.classList.add(tr),e(t._element).trigger(Qe.HIDDEN)};if(this._element.classList.remove(er),this._config.animation){var n=u.getTransitionDurationFromElement(this._element);e(this._element).one(u.TRANSITION_END,r).emulateTransitionEnd(n)}else r()},t._jQueryInterface=function(r){return this.each(function(){var n=e(this),i=n.data("bs.toast");if(i||(i=new t(this,"object"==typeof r&&r),n.data("bs.toast",i)),"string"==typeof r){if(void 0===i[r])throw new TypeError('No method named "'+r+'"');i[r](this)}})},i(t,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"DefaultType",get:function(){return nr}},{key:"Default",get:function(){return ir}}]),t}();e.fn.toast=ar._jQueryInterface,e.fn.toast.Constructor=ar,e.fn.toast.noConflict=function(){return e.fn.toast=Je,ar._jQueryInterface},function(){if(void 0===e)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(),t.Util=u,t.Alert=m,t.Button=C,t.Carousel=Z,t.Collapse=at,t.Dropdown=Mt,t.Modal=qt,t.Popover=Te,t.Scrollspy=Oe,t.Tab=Ke,t.Toast=ar,t.Tooltip=fe,Object.defineProperty(t,"__esMo
vendor: 8,990 bytes, lines 15-40
15dule",{value:!0})})(e,r(0),r(7))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){
16/**!
17 * @fileOverview Kickass library to create and place poppers near their reference elements.
18 * @version 1.16.1
19 * @license
20 * Copyright (c) 2016 Federico Zivolo and contributors
21 *
22 * Permission is hereby granted, free of charge, to any person obtaining a copy
23 * of this software and associated documentation files (the "Software"), to deal
24 * in the Software without restriction, including without limitation the rights
25 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
26 * copies of the Software, and to permit persons to whom the Software is
27 * furnished to do so, subject to the following conditions:
28 *
29 * The above copyright notice and this permission notice shall be included in all
30 * copies or substantial portions of the Software.
31 *
32 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
33 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
34 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
35 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
36 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
37 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
38 * SOFTWARE.
39 */
40var r="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,n=function(){for(var t=["Edge","Trident","Firefox"],e=0;e<t.length;e+=1)if(r&&navigator.userAgent.indexOf(t[e])>=0)return 1;return 0}();var i=r&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then(function(){e=!1,t()}))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout(function(){e=!1,t()},n))}};function o(t){return t&&"[object Function]"==={}.toString.call(t)}function a(t,e){if(1!==t.nodeType)return[];var r=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?r[e]:r}function s(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function l(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=a(t),r=e.overflow,n=e.overflowX,i=e.overflowY;return/(auto|scroll|overlay)/.test(r+i+n)?t:l(s(t))}function u(t){return t&&t.referenceNode?t.referenceNode:t}var c=r&&!(!window.MSInputMethodContext||!document.documentMode),p=r&&/MSIE 10/.test(navigator.userAgent);function h(t){return 11===t?c:10===t?p:c||p}function f(t){if(!t)return document.documentElement;for(var e=h(10)?document.body:null,r=t.offsetParent||null;r===e&&t.nextElementSibling;)r=(t=t.nextElementSibling).offsetParent;var n=r&&r.nodeName;return n&&"BODY"!==n&&"HTML"!==n?-1!==["TH","TD","TABLE"].indexOf(r.nodeName)&&"static"===a(r,"position")?f(r):r:t?t.ownerDocument.documentElement:document.documentElement}function d(t){return null!==t.parentNode?d(t.parentNode):t}function m(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var r=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,n=r?t:e,i=r?e:t,o=document.createRange();o.setStart(n,0),o.setEnd(i,0);var a,s,l=o.commonAncestorContainer;if(t!==l&&e!==l||n.contains(i))return"BODY"===(s=(a=l).nodeName)||"HTML"!==s&&f(a.firstElementChild)!==a?f(l):l;var u=d(t);return u.host?m(u.host,e):m(t,d(e).host)}function g(t){var e="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",r=t.nodeName;if("BODY"===r||"HTML"===r){var n=t.ownerDocument.documentElement;return(t.ownerDocument.scrollingElement||n)[e]}return t[e]}function y(t,e){var r="x"===e?"Left":"Top",n="Left"===r?"Right":"Bottom";return parseFloat(t["border"+r+"Width"])+parseFloat(t["border"+n+"Width"])}function v(t,e,r,n){return Math.max(e["offset"+t],e["scroll"+t],r["client"+t],r["offset"+t],r["scroll"+t],h(10)?parseInt(r["offset"+t])+parseInt(n["margin"+("Height"===t?"Top":"Left")])+parseInt(n["margin"+("Height"===t?"Bottom":"Right")]):0)}function _(t){var e=t.body,r=t.documentElement,n=h(10)&&getComputedStyle(r);return{height:v("Height",e,r,n),width:v("Width",e,r,n)}}var x=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},b=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),w=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},E=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};function T(t){return E({},t,{right:t.left+t.width,bottom:t.top+t.height})}function S(t){var e={};try{if(h(10)){e=t.getBoundingClientRect();var r=g(t,"top"),n=g(t,"left");e.top+=r,e.left+=n,e.bottom+=r,e.right+=n}else e=t.getBoundingClientRect()}catch(t){}var i={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},o="HTML"===t.nodeName?_(t.ownerDocument):{},s=o.width||t.clientWidth||i.width,l=o.height||t.clientHeight||i.height,u=t.offsetWidth-s,c=t.offsetHeight-l;if(u||c){var p=a(t);u-=y(p,"x"),c-=y(p,"y"),i.width-=u,i.height-=c}return T(i)}function C(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=h(10),i="HTML"===e.nodeName,o=S(t),s=S(e),u=l(t),c=a(e),p=parseFloat(c.borderTopWidth),f=parseFloat(c.borderLeftWidth);r&&i&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var d=T({top:o.top-s.top-p,left:o.left-s.left-f,width:o.width,height:o.height});if(d.marginTop=0,d.marginLeft=0,!n&&i){var m=parseFloat(c.marginTop),y=parseFloat(c.marginLeft);d.top-=p-m,d.bottom-=p-m,d.left-=f-y,d.right-=f-y,d.marginTop=m,d.marginLeft=y}return(n&&!r?e.contains(u):e===u&&"BODY"!==u.nodeName)&&(d=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=g(e,"top"),i=g(e,"left"),o=r?-1:1;return t.top+=n*o,t.bottom+=n*o,t.left+=i*o,t.right+=i*o,t}(d,e)),d}function A(t){if(!t||!t.parentElement||h())return document.documentElement;for(var e=t.parentElement;e&&"none"===a(e,"transform");)e=e.parentElement;return e||document.documentElement}function I(t,e,r,n){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},c=i?A(t):m(t,u(e));if("viewport"===n)o=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t.ownerDocument.documentElement,n=C(t,r),i=Math.max(r.clientWidth,window.innerWidth||0),o=Math.max(r.clientHeight,window.innerHeight||0),a=e?0:g(r),s=e?0:g(r,"left");return T({top:a-n.top+n.marginTop,left:s-n.left+n.marginLeft,width:i,height:o})}(c,i);else{var p=void 0;"scrollParent"===n?"BODY"===(p=l(s(e))).nodeName&&(p=t.ownerDocument.documentElement):p="window"===n?t.ownerDocument.documentElement:n;var h=C(p,c,i);if("HTML"!==p.nodeName||function t(e){var r=e.nodeName;if("BODY"===r||"HTML"===r)return!1;if("fixed"===a(e,"position"))return!0;var n=s(e);return!!n&&t(n)}(c))o=h;else{var f=_(t.ownerDocument),d=f.height,y=f.width;o.top+=h.top-h.marginTop,o.bottom=d+h.top,o.left+=h.left-h.marginLeft,o.right=y+h.left}}var v="number"==typeof(r=r||0);return o.left+=v?r:r.left||0,o.top+=v?r:r.top||0,o.right-=v?r:r.right||0,o.bottom-=v?r:r.bottom||0,o}function D(t,e,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var a=I(r,n,o,i),s={top:{width:a.width,height:e.top-a.top},right:{width:a.right-e.right,height:a.height},bottom:{width:a.width,height:a.bottom-e.bottom},left:{width:e.left-a.left,height:a.height}},l=Object.keys(s).map(function(t){return E({key:t},s[t],{area:(e=s[t],e.width*e.height)});var e}).sort(function(t,e){return e.area-t.area}),u=l.filter(function(t){var e=t.width,n=t.height;return e>=r.clientWidth&&n>=r.clientHeight}),c=u.length>0?u[0].key:l[0].key,p=t.split("-")[1];return c+(p?"-"+p:"")}function k(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return C(r,n?A(e):m(e,u(r)),n)}function M(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),r=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),n=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+n,height:t.offsetHeight+r}}function P(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,function(t){return e[t]})}function z(t,e,r){r=r.split("-")[0];var n=M(t),i={width:n.width,height:n.height},o=-1!==["right","left"].indexOf(r),a=o?"top":"left",s=o?"left":"top",l=o?"height":"width",u=o?"width":"height";return i[a]=e[a]+e[l]/2-n[l]/2,i[s]=r===s?e[s]-n[u]:e[P(s)],i}function L(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function O(t,e,r){return(void 0===r?t:t.slice(0,function(t,e,r){if(Array.prototype.findIndex)return t.findIndex(function(t){return t[e]===r});var n=L(t,function(t){return t[e]===r});return t.indexOf(n)}
vendor: 9,029 bytes, line 40
40(t,"name",r))).forEach(function(t){t.function;var r=t.function||t.fn;t.enabled&&o(r)&&(e.offsets.popper=T(e.offsets.popper),e.offsets.reference=T(e.offsets.reference),e=r(e,t))}),e}function R(t,e){return t.some(function(t){var r=t.name;return t.enabled&&r===e})}function B(t){for(var e=[!1,"ms","Webkit","Moz","O"],r=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<e.length;n++){var i=e[n],o=i?""+i+r:t;if(void 0!==document.body.style[o])return o}return null}function F(t){var e=t.ownerDocument;return e?e.defaultView:window}function N(t,e,r,n){r.updateBound=n,F(t).addEventListener("resize",r.updateBound,{passive:!0});var i=l(t);return function t(e,r,n,i){var o="BODY"===e.nodeName,a=o?e.ownerDocument.defaultView:e;a.addEventListener(r,n,{passive:!0}),o||t(l(a.parentNode),r,n,i),i.push(a)}(i,"scroll",r.updateBound,r.scrollParents),r.scrollElement=i,r.eventsEnabled=!0,r}function U(){var t,e;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(t=this.reference,e=this.state,F(t).removeEventListener("resize",e.updateBound),e.scrollParents.forEach(function(t){t.removeEventListener("scroll",e.updateBound)}),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e))}function V(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function j(t,e){Object.keys(e).forEach(function(r){var n="";-1!==["width","height","top","right","bottom","left"].indexOf(r)&&V(e[r])&&(n="px"),t.style[r]=e[r]+n})}var q=r&&/Firefox/i.test(navigator.userAgent);function H(t,e,r){var n=L(t,function(t){return t.name===e}),i=!!n&&t.some(function(t){return t.name===r&&t.enabled&&t.order<n.order});if(!i);return i}var G=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],W=G.slice(3);function Z(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=W.indexOf(t),n=W.slice(r+1).concat(W.slice(0,r));return e?n.reverse():n}var X={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function Y(t,e,r,n){var i=[0,0],o=-1!==["right","left"].indexOf(n),a=t.split(/(\+|\-)/).map(function(t){return t.trim()}),s=a.indexOf(L(a,function(t){return-1!==t.search(/,|\s/)}));a[s]&&a[s].indexOf(",");var l=/\s*,\s*|\s+/,u=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return(u=u.map(function(t,n){var i=(1===n?!o:o)?"height":"width",a=!1;return t.reduce(function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,a=!0,t):a?(t[t.length-1]+=e,a=!1,t):t.concat(e)},[]).map(function(t){return function(t,e,r,n){var i=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return t;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=r;break;case"%":case"%r":default:s=n}return T(s)[e]/100*o}if("vh"===a||"vw"===a)return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o;return o}(t,i,e,r)})})).forEach(function(t,e){t.forEach(function(r,n){V(r)&&(i[e]+=r*("-"===t[n-1]?-1:1))})}),i}var K={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,r=e.split("-")[0],n=e.split("-")[1];if(n){var i=t.offsets,o=i.reference,a=i.popper,s=-1!==["bottom","top"].indexOf(r),l=s?"left":"top",u=s?"width":"height",c={start:w({},l,o[l]),end:w({},l,o[l]+o[u]-a[u])};t.offsets.popper=E({},a,c[n])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var r=e.offset,n=t.placement,i=t.offsets,o=i.popper,a=i.reference,s=n.split("-")[0],l=void 0;return l=V(+r)?[+r,0]:Y(r,o,a,s),"left"===s?(o.top+=l[0],o.left-=l[1]):"right"===s?(o.top+=l[0],o.left+=l[1]):"top"===s?(o.left+=l[0],o.top-=l[1]):"bottom"===s&&(o.left+=l[0],o.top+=l[1]),t.popper=o,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var r=e.boundariesElement||f(t.instance.popper);t.instance.reference===r&&(r=f(r));var n=B("transform"),i=t.instance.popper.style,o=i.top,a=i.left,s=i[n];i.top="",i.left="",i[n]="";var l=I(t.instance.popper,t.instance.reference,e.padding,r,t.positionFixed);i.top=o,i.left=a,i[n]=s,e.boundaries=l;var u=e.priority,c=t.offsets.popper,p={primary:function(t){var r=c[t];return c[t]<l[t]&&!e.escapeWithReference&&(r=Math.max(c[t],l[t])),w({},t,r)},secondary:function(t){var r="right"===t?"left":"top",n=c[r];return c[t]>l[t]&&!e.escapeWithReference&&(n=Math.min(c[r],l[t]-("right"===t?c.width:c.height))),w({},r,n)}};return u.forEach(function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";c=E({},c,p[e](t))}),t.offsets.popper=c,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,r=e.popper,n=e.reference,i=t.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",l=a?"left":"top",u=a?"width":"height";return r[s]<o(n[l])&&(t.offsets.popper[l]=o(n[l])-r[u]),r[l]>o(n[s])&&(t.offsets.popper[l]=o(n[s])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var r;if(!H(t.instance.modifiers,"arrow","keepTogether"))return t;var n=e.element;if("string"==typeof n){if(!(n=t.instance.popper.querySelector(n)))return t}else if(!t.instance.popper.contains(n))return t;var i=t.placement.split("-")[0],o=t.offsets,s=o.popper,l=o.reference,u=-1!==["left","right"].indexOf(i),c=u?"height":"width",p=u?"Top":"Left",h=p.toLowerCase(),f=u?"left":"top",d=u?"bottom":"right",m=M(n)[c];l[d]-m<s[h]&&(t.offsets.popper[h]-=s[h]-(l[d]-m)),l[h]+m>s[d]&&(t.offsets.popper[h]+=l[h]+m-s[d]),t.offsets.popper=T(t.offsets.popper);var g=l[h]+l[c]/2-m/2,y=a(t.instance.popper),v=parseFloat(y["margin"+p]),_=parseFloat(y["border"+p+"Width"]),x=g-t.offsets.popper[h]-v-_;return x=Math.max(Math.min(s[c]-m,x),0),t.arrowElement=n,t.offsets.arrow=(w(r={},h,Math.round(x)),w(r,f,""),r),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(R(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var r=I(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),n=t.placement.split("-")[0],i=P(n),o=t.placement.split("-")[1]||"",a=[];switch(e.behavior){case X.FLIP:a=[n,i];break;case X.CLOCKWISE:a=Z(n);break;case X.COUNTERCLOCKWISE:a=Z(n,!0);break;default:a=e.behavior}return a.forEach(function(s,l){if(n!==s||a.length===l+1)return t;n=t.placement.split("-")[0],i=P(n);var u=t.offsets.popper,c=t.offsets.reference,p=Math.floor,h="left"===n&&p(u.right)>p(c.left)||"right"===n&&p(u.left)<p(c.right)||"top"===n&&p(u.bottom)>p(c.top)||"bottom"===n&&p(u.top)<p(c.bottom),f=p(u.left)<p(r.left),d=p(u.right)>p(r.right),m=p(u.top)<p(r.top),g=p(u.bottom)>p(r.bottom),y="left"===n&&f||"right"===n&&d||"top"===n&&m||"bottom"===n&&g,v=-1!==["top","bottom"].indexOf(n),_=!!e.flipVariations&&(v&&"start"===o&&f||v&&"end"===o&&d||!v&&"start"===o&&m||!v&&"end"===o&&g),x=!!e.flipVariationsByContent&&(v&&"start"===o&&d||v&&"end"===o&&f||!v&&"start"===o&&g||!v&&"end"===o&&m),b=_||x;(h||y||b)&&(t.flipped=!0,(h||y)&&(n=a[l+1]),b&&(o=function(t){return"end"===t?"start":"start"===t?"end":t}(o)),t.placement=n+(o?"-"+o:""),t.offsets.popper=E({},t.offsets.popper,z(t.instance.popper,t.offsets.reference,t.placement)),t=O(t.instance.modifiers,t,"flip"))}),t},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,r=e.split("-")[0],n=t.offsets,i=n.popper,o=n.reference,a=-1!==["left","right"].indexOf(r),s=-1===["top","left"].indexOf(r);return i[a?"left":"top"]=o[r]-(s?i[a?"width":"height"]:0),t.placement=P(e),t.offsets.popper=T(i),t}},hide:{order:800,enabled:!0,fn:function(t){if(!H(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,r=L(t.instance.modifiers,function(t){return"preventOverflow"===t.name}).boundaries;if(e.bottom<r.top||e.left>r.right||e.top>r.bottom||e.right<r.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}},computeStyle:{order:850,enabled:!0,fn:function(t,e){var r=e.x,n=e.y,i=t.offsets.popper,o=L(t.instance.modifiers,function(t){return"applyStyle"===t.name}).gpuAcceleration,a=void 0!==o?o:e.gpuAcceleration,s=f(t.instance.popper),l=S(s),u={position:i.position},c=function(t,e){var r=t.offsets,n=r.popper,i=r.reference,o=Math.round,a=Math.floor,s=function(t){return t},l=o(i.width),u=o(n.width),c=-1!==["left","right"].indexOf(t.placement),p=-1!==t.placement.indexOf("-"),h=e?c||p||l%2==u%2?o:a:s,f=e?o:s;return{left:h(l%2==1&&u%2==1&&!p&&e?n.left-1:n.left),top:f(n.top),bottom:f(n.bottom),right:h(n.right)}}(t,window.devicePixelRatio<2||!q),p="bottom"===r?"top":"bottom",h="right"===n?"left":"right",d=B("transform"),m=void 0,g=void 0;if(g="bottom"===p?"HTML"===s.nodeName?-s.clientHeight+c.bottom:-l.he
vendor: 4,338 bytes, line 40
40ight+c.bottom:c.top,m="right"===h?"HTML"===s.nodeName?-s.clientWidth+c.right:-l.width+c.right:c.left,a&&d)u[d]="translate3d("+m+"px, "+g+"px, 0)",u[p]=0,u[h]=0,u.willChange="transform";else{var y="bottom"===p?-1:1,v="right"===h?-1:1;u[p]=g*y,u[h]=m*v,u.willChange=p+", "+h}var _={"x-placement":t.placement};return t.attributes=E({},_,t.attributes),t.styles=E({},u,t.styles),t.arrowStyles=E({},t.offsets.arrow,t.arrowStyles),t},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(t){var e,r;return j(t.instance.popper,t.styles),e=t.instance.popper,r=t.attributes,Object.keys(r).forEach(function(t){!1!==r[t]?e.setAttribute(t,r[t]):e.removeAttribute(t)}),t.arrowElement&&Object.keys(t.arrowStyles).length&&j(t.arrowElement,t.arrowStyles),t},onLoad:function(t,e,r,n,i){var o=k(i,e,t,r.positionFixed),a=D(r.placement,o,e,t,r.modifiers.flip.boundariesElement,r.modifiers.flip.padding);return e.setAttribute("x-placement",a),j(e,{position:r.positionFixed?"fixed":"absolute"}),r},gpuAcceleration:void 0}}},J=function(){function t(e,r){var n=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};x(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=i(this.update.bind(this)),this.options=E({},t.Defaults,a),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=r&&r.jquery?r[0]:r,this.options.modifiers={},Object.keys(E({},t.Defaults.modifiers,a.modifiers)).forEach(function(e){n.options.modifiers[e]=E({},t.Defaults.modifiers[e]||{},a.modifiers?a.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(t){return E({name:t},n.options.modifiers[t])}).sort(function(t,e){return t.order-e.order}),this.modifiers.forEach(function(t){t.enabled&&o(t.onLoad)&&t.onLoad(n.reference,n.popper,n.options,t,n.state)}),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return b(t,[{key:"update",value:function(){return function(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=k(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=D(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=z(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=O(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}.call(this)}},{key:"destroy",value:function(){return function(){return this.state.isDestroyed=!0,R(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[B("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}.call(this)}},{key:"enableEventListeners",value:function(){return function(){this.state.eventsEnabled||(this.state=N(this.reference,this.options,this.state,this.scheduleUpdate))}.call(this)}},{key:"disableEventListeners",value:function(){return U.call(this)}}]),t}();J.Utils=("undefined"!=typeof window?window:t).PopperUtils,J.placements=G,J.Defaults=K,e.default=J}.call(e,r(8))},function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){(function(n){var i,o,a,s;s=function(t){var e="left",r="right",n="up",i="down",o="in",a="out",s="none",l="auto",u="swipe",c="pinch",p="tap",h="doubletap",f="longtap",d="horizontal",m="vertical",g="all",y=10,v="start",_="move",x="end",b="cancel",w="ontouchstart"in window,E=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled,T=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,S="TouchSwipe";t.fn.swipe=function(C){var A=t(this),I=A.data(S);if(I&&"string"==typeof C){if(I[C])return I[C].apply(this,Array.prototype.slice.call(arguments,1
40));t.error("Method "+C+" does not exist on jQuery.swipe")}else if(I&&"object"==typeof C)I.option.apply(this,arguments);else if(!(I||"object"!=typeof C&&C))return function(C){!C||void 0!==C.allowPageScroll||void 0===C.swipe&&void 0===C.swipeStatus||(C.allowPageScroll=s);void 0!==C.click&&void 0===C.tap&&(C.tap=C.click);C||(C={});return C=t.extend({},t.fn.swipe.defaults,C),this.each(function(){var A=t(this),I=A.data(S);I||(I=new function(C,A){var A=t.extend({},A),I=w||T||!A.fallbackToMouseEvents,D=I?T?E?"MSPointerDown":"pointerdown":"touchstart":"mousedown",k=I?T?E?"MSPointerMove":"pointermove":"touchmove":"mousemove",M=I?T?E?"MSPointerUp":"pointerup":"touchend":"mouseup",P=I?null:"mouseleave",z=T?E?"MSPointerCancel":"pointercancel":"touchcancel",L=0,O=null,R=0,B=0,F=0,N=1,U=0,V=0,j=null,q=t(C),H="start",G=0,W={},Z=0,X=0,Y=0,K=0,J=0,Q=null,$=null;try{q.bind(D,tt),q.bind(z,nt)}catch(e){t.error("events not supported "+D+","+z+" on jQuery.swipe")}function tt(o){if(!0!==q.data(S+"_intouch")&&!(t(o.target).closest(A.excludedElements,q).length>0)){var a,s=o.originalEvent?o.originalEvent:o,l=s.touches,u=l?l[0]:s;return H=v,l?G=l.length:!1!==A.preventDefaultEvents&&o.preventDefault(),L=0,O=null,V=null,R=0,B=0,F=0,N=1,U=0,j=function(){var t={};return t[e]=Dt(e),t[r]=Dt(r),t[n]=Dt(n),t[i]=Dt(i),t}(),Et(),Ct(0,u),!l||G===A.fingers||A.fingers===g||ft()?(Z=Pt(),2==G&&(Ct(1,l[1]),B=F=Mt(W[0].start,W[1].start)),(A.swipeStatus||A.pinchStatus)&&(a=st(s,H))):a=!1,!1===a?(st(s,H=b),a):(A.hold&&($=setTimeout(t.proxy(function(){q.trigger("hold",[s.target]),A.hold&&(a=A.hold.call(q,s,s.target))},this),A.longTapThreshold)),St(!0),null)}}function et(u){var c=u.originalEvent?u.originalEvent:u;if(H!==x&&H!==b&&!Tt()){var p,h=c.touches,f=h?h[0]:c,y=At(f);if(X=Pt(),h&&(G=h.length),A.hold&&clearTimeout($),H=_,2==G&&(0==B?(Ct(1,h[1]),B=F=Mt(W[0].start,W[1].start)):(At(h[1]),F=Mt(W[0].end,W[1].end),W[0].end,W[1].end,V=N<1?a:o),N=function(t,e){return(e/t*1).toFixed(2)}(B,F),U=Math.abs(B-F)),G===A.fingers||A.fingers===g||!h||ft()){if(O=function(t,o){var a=function(t,e){var r=t.x-e.x,n=e.y-t.y,i=Math.atan2(n,r),o=Math.round(180*i/Math.PI);return o<0&&(o=360-Math.abs(o)),o}(t,o);return a<=45&&a>=0?e:a<=360&&a>=315?e:a>=135&&a<=225?r:a>45&&a<135?i:n}(y.start,y.end),function(t,o){if(!1!==A.preventDefaultEvents)if(A.allowPageScroll===s)t.preventDefault();else{var a=A.allowPageScroll===l;switch(o){case e:(A.swipeLeft&&a||!a&&A.allowPageScroll!=d)&&t.preventDefault();break;case r:(A.swipeRight&&a||!a&&A.allowPageScroll!=d)&&t.preventDefault();break;case n:(A.swipeUp&&a||!a&&A.allowPageScroll!=m)&&t.preventDefault();break;case i:(A.swipeDown&&a||!a&&A.allowPageScroll!=m)&&t.preventDefault()}}}(u,O),L=function(t,e){return Math.round(Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)))}(y.start,y.end),R=kt(),function(t,e){e=Math.max(e,It(t)),j[t].distance=e}(O,L),(A.swipeStatus||A.pinchStatus)&&(p=st(c,H)),!A.triggerOnTouchEnd||A.triggerOnTouchLeave){var v=!0;if(A.triggerOnTouchLeave){var w=function(e){var r=(e=t(e)).offset();return{left:r.left,right:r.left+e.outerWidth(),top:r.top,bottom:r.top+e.outerHeight()}}(this);v=function(t,e){return t.x>e.left&&t.x<e.right&&t.y>e.top&&t.y<e.bottom}(y.end,w)}!A.triggerOnTouchEnd&&v?H=at(_):A.triggerOnTouchLeave&&!v&&(H=at(x)),H!=b&&H!=x||st(c,H)}}else st(c,H=b);!1===p&&st(c,H=b)}}function rt(t){var e=t.originalEvent?t.originalEvent:t,r=e.touches;if(r){if(r.length&&!Tt())return Y=Pt(),K=event.touches.length+1,!0;if(r.length&&Tt())return!0}return Tt()&&(G=K),X=Pt(),R=kt(),ct()||!ut()?st(e,H=b):A.triggerOnTouchEnd||0==A.triggerOnTouchEnd&&H===_?(!1!==A.preventDefaultEvents&&t.preventDefault(),st(e,H=x)):!A.triggerOnTouchEnd&&xt()?lt(e,H=x,p):H===_&&st(e,H=b),St(!1),null}function nt(){G=0,X=0,Z=0,B=0,F=0,N=1,Et(),St(!1)}function it(t){var e=t.originalEvent?t.originalEvent:t;A.triggerOnTouchLeave&&(H=at(x),st(e,H))}function ot(){q.unbind(D,tt),q.unbind(z,nt),q.unbind(k,et),q.unbind(M,rt),P&&q.unbind(P,it),St(!1)}function at(t){var e=t,r=pt(),n=ut(),i=ct();return!r||i?e=b:!n||t!=_||A.triggerOnTouchEnd&&!A.triggerOnTouchLeave?!n&&t==x&&A.triggerOnTouchLeave&&(e=b):e=x,e}function st(t,e){var r,n=t.touches;return yt()&&gt()||dt()&&ft()?(yt()&&gt()&&(r=lt(t,e,u)),dt()&&ft()&&!1!==r&&(r=lt(t,e,c))):wt(
40)&&bt()&&!1!==r?r=lt(t,e,h):R>A.longTapThreshold&&L<y&&A.longTap&&!1!==r?r=lt(t,e,f):1!==G&&w||!(isNaN(L)||L<A.threshold)||!xt()||!1===r||(r=lt(t,e,p)),e===b&&(gt()&&(r=lt(t,e,u)),ft()&&(r=lt(t,e,c)),nt()),e===x&&(n&&n.length||nt()),r}function lt(s,l,d){var m;if(d==u){if(q.trigger("swipeStatus",[l,O||null,L||0,R||0,G,W]),A.swipeStatus&&!1===(m=A.swipeStatus.call(q,s,l,O||null,L||0,R||0,G,W)))return!1;if(l==x&&mt()){if(q.trigger("swipe",[O,L,R,G,W]),A.swipe&&!1===(m=A.swipe.call(q,s,O,L,R,G,W)))return!1;switch(O){case e:q.trigger("swipeLeft",[O,L,R,G,W]),A.swipeLeft&&(m=A.swipeLeft.call(q,s,O,L,R,G,W));break;case r:q.trigger("swipeRight",[O,L,R,G,W]),A.swipeRight&&(m=A.swipeRight.call(q,s,O,L,R,G,W));break;case n:q.trigger("swipeUp",[O,L,R,G,W]),A.swipeUp&&(m=A.swipeUp.call(q,s,O,L,R,G,W));break;case i:q.trigger("swipeDown",[O,L,R,G,W]),A.swipeDown&&(m=A.swipeDown.call(q,s,O,L,R,G,W))}}}if(d==c){if(q.trigger("pinchStatus",[l,V||null,U||0,R||0,G,N,W]),A.pinchStatus&&!1===(m=A.pinchStatus.call(q,s,l,V||null,U||0,R||0,G,N,W)))return!1;if(l==x&&ht())switch(V){case o:q.trigger("pinchIn",[V||null,U||0,R||0,G,N,W]),A.pinchIn&&(m=A.pinchIn.call(q,s,V||null,U||0,R||0,G,N,W));break;case a:q.trigger("pinchOut",[V||null,U||0,R||0,G,N,W]),A.pinchOut&&(m=A.pinchOut.call(q,s,V||null,U||0,R||0,G,N,W))}}return d==p?l!==b&&l!==x||(clearTimeout(Q),clearTimeout($),bt()&&!wt()?(J=Pt(),Q=setTimeout(t.proxy(function(){J=null,q.trigger("tap",[s.target]),A.tap&&(m=A.tap.call(q,s,s.target))},this),A.doubleTapThreshold)):(J=null,q.trigger("tap",[s.target]),A.tap&&(m=A.tap.call(q,s,s.target)))):d==h?l!==b&&l!==x||(clearTimeout(Q),J=null,q.trigger("doubletap",[s.target]),A.doubleTap&&(m=A.doubleTap.call(q,s,s.target))):d==f&&(l!==b&&l!==x||(clearTimeout(Q),J=null,q.trigger("longtap",[s.target]),A.longTap&&(m=A.longTap.call(q,s,s.target)))),m}function ut(){var t=!0;return null!==A.threshold&&(t=L>=A.threshold),t}function ct(){var t=!1;return null!==A.cancelThreshold&&null!==O&&(t=It(O)-L>=A.cancelThreshold),t}function pt(){return!(A.maxTimeThreshold&&R>=A.maxTimeThreshold)}function ht(){var t=vt(),e=_t(),r=null===A.pinchThreshold||U>=A.pinchThreshold;return t&&e&&r}function ft(){return!!(A.pinchStatus||A.pinchIn||A.pinchOut)}function dt(){return!(!ht()||!ft())}function mt(){var t=pt(),e=ut(),r=vt(),n=_t(),i=ct(),o=!i&&n&&r&&e&&t;return o}function gt(){return!!(A.swipe||A.swipeStatus||A.swipeLeft||A.swipeRight||A.swipeUp||A.swipeDown)}function yt(){return!(!mt()||!gt())}function vt(){return G===A.fingers||A.fingers===g||!w}function _t(){return 0!==W[0].end.x}function xt(){return!!A.tap}function bt(){return!!A.doubleTap}function wt(){if(null==J)return!1;var t=Pt();return bt()&&t-J<=A.doubleTapThreshold}function Et(){Y=0,K=0}function Tt(){var t=!1;if(Y){var e=Pt()-Y;e<=A.fingerReleaseThreshold&&(t=!0)}return t}function St(t){!0===t?(q.bind(k,et),q.bind(M,rt),P&&q.bind(P,it)):(q.unbind(k,et,!1),q.unbind(M,rt,!1),P&&q.unbind(P,it,!1)),q.data(S+"_intouch",!0===t)}function Ct(t,e){var r={start:{x:0,y:0},end:{x:0,y:0}};return r.start.x=r.end.x=e.pageX||e.clientX,r.start.y=r.end.y=e.pageY||e.clientY,W[t]=r,r}function At(t){var e=void 0!==t.identifier?t.identifier:0,r=function(t){return W[t]||null}(e);return null===r&&(r=Ct(e,t)),r.end.x=t.pageX||t.clientX,r.end.y=t.pageY||t.clientY,r}function It(t){if(j[t])return j[t].distance}function Dt(t){return{direction:t,distance:0}}function kt(){return X-Z}function Mt(t,e){var r=Math.abs(t.x-e.x),n=Math.abs(t.y-e.y);return Math.round(Math.sqrt(r*r+n*n))}function Pt(){var t=new Date;return t.getTime()}this.enable=function(){return q.bind(D,tt),q.bind(z,nt),q},this.disable=function(){return ot(),q},this.destroy=function(){ot(),q.data(S,null),q=null},this.option=function(e,r){if("object"==typeof e)A=t.extend(A,e);else if(void 0!==A[e]){if(void 0===r)return A[e];A[e]=r}else{if(!e)return A;t.error("Option "+e+" does not exist on jQuery.swipe.options")}return null}}(this,C),A.data(S,I))})}.apply(this,arguments);return A},t.fn.swipe.version="1.6.12",t.fn.swipe.defaults={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:"label, button, input, select, textarea, a, .noSwipe",preventDefaultEvents:!1},t.fn.swipe.phases={PHASE_START:v,PHASE_MOVE:_,PHASE_END:x,PHASE_CANCEL:b},t.fn.swipe.directions={LEFT:e,RIGHT:r,UP:n,DOWN:i,IN:o,OUT:a},t.fn.swipe.pageScroll={NONE:s,HORIZONTAL:d,VERTICAL:m,AUTO:l},t.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,ALL:g}},r(1)&&r(1).jQuery?(o=[r(0)],void 0===(a="function"==typeof(i=s)?i.apply(e,o):i)||(t.exports=a)):s(n)}).call(e,r(0))},function(t,e,r){"use strict";(function(t,e){var n=r(2),i=r.n(n),o=this,a=!1;t(document).ready(function(){t("body").hasClass("single-bars")&&(a=t("#site-helper-title").data("title")).length>0&&t("#rtb-venue").val(a)}),i()(".sidebar-calendar",{inline:!0,minDate:"today",onChange:function(e){var r=new Date(e);r.setHours(12),t("#rtb-date").val(r.toISOString().split("T")[0]).trigger("change"),t(".date-text").html(r.getDate()+" "+p(r.getMonth())),t(".sidebar-calendar-wrap").removeClass("open"),t(".invert-of-cal").removeClass("open")}}),t("#booking form input, #booking form select").on("change",function(){!function(){var e=new Date(t("#rtb-date").val()).toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"});t(".current-state").html("Booking for "+t("#rtb-party").val()+" people on "+e),t("#rtb-time").val()&&t(".current-state").append(" at "+t("#rtb-time option:selected").text());t(".current-state").css("padding","5px")}()}),t("#rtb-venue").on("change",function(){l()}),t("#rtb-date").on("change",function(){var e=new Date(t(o).val());t(".date-text").html(e.getDate()+" "+p(e.getMonth())),6==e.getDay()&&(sunday=!0)});var s=!1;function l(){var e=t("#rtb-date").val(),r=t("#rtb-venue").val();t("#next-1").css("display","none"),t.ajax({method:"POST",url:ajaxurl,data:{action:"check_guests",date:e,venue:r}}).done(function(e){var r=e;if(200!=(e=JSON.parse(e)).StatusCode)c(r),t("p.error").css("display","block");else{var n,i=e.Data.sessions[0].minPartySize,o=e.Data.sessions[0].maxPartySize;for(t("#rtb-party").html(""),n=0;n<=o;n++)if(i<=n){var a="people";1==n&&(a="person"),t("#rtb-party").append(t("<option>",{value:n,text:n+" "+a}))}t("#next-1").css("display","inline-block"),t("p.error").css("display","none")}}).fail(function(t){c(t)})}function u(){t("#sidebar-calendar-wrap").removeClass("open"),t(".page-counter").css("opacity","1"),t("#page-no").html(t("#booking .active").not(".done").data("page")),t("#booking .active").not(".done").data("page")>1&&t("#booking .active").not(".done").data("page")<4?t(".back-sidebar").addClass("can-go-back"):t(".back-sidebar").removeClass("can-go-back")}function c(t){t=t.replace("null{","{"),t=JSON.parse(t)}function p(t){return["January","February","March","April","May","June","July","August","September","October","November","December"][t]}t("#booking form").on("submit",function(e){if(e.preventDefault(),!0!==s){s=!0,t(".booking-submit").prop("disabled",!0).addClass("disabled").text("Loading...");var r=t(this).find("#rtb-party").val(),n=t(this).find("#rtb-date").val(),i=t(this).find("#rtb-time").val().split("---")[0],o=(parseInt(i.split(":")[0]),t(this).find("#rtb-name").val()),a=t(this).find("#rtb-last-name").val(),l=t(this).find("#rtb-email").val(),u=t(this).find("#rtb-phone").val(),p=t("input[name=rtb-menu]:checked").val(),h=t(this).find("#rtb-message").val(),f=t(this).find("#rtb-time").val().split("---")[1],d=t("#booking form").find("#rtb-venue").val(),m=t("input[name=rtb-consent]:checked").val();t.ajax({method:"POST",url:"/wp-admin/admin-ajax.php",data:{action:"request_booking",date:n,time:i,session:f,people:r,firstname:o,lastname:a,email:l,phone:u,message:h,venue:d,menu:p,consent:m,consentText:t
40("#email-consent-text").text()}}).done(function(e){s=!1,t(".booking-submit").prop("disabled",!1).removeClass("disabled").text("Complete Booking");var o=e;201!=JSON.parse(e).StatusCode?(t(".error").css("display","block"),c(o)):(1==r?r="1 Person":r+=" People",t(".error").css("display","none"),n=(n=new Date(n)).toDateString(),t(".page-counter").css("opacity","0"),t(".fin-people").html(r),t(".fin-date").html(n),t(".fin-time").html(i),t(".back-sidebar").removeClass("can-go-back"),t(".page-3").addClass("done"),t(".page-4").addClass("active"))})}}),t("body").on("click",".booking-trigger",function(e){t("body").hasClass("no-booking")||(e.preventDefault(),t(this).hasClass("open")||(t(".book-title").text("Book With Us"),t("#booking,#booking-before").addClass("open"),t("body").addClass("sidebar-open"),e.stopPropagation()),t("body").hasClass("nav-open")&&(t("body").removeClass("disable-scroll nav-open"),t(".navmenu--mobile").removeClass("open"),t(".mob-trigger").removeClass("active")),l())}),t("body").on("click","#toggle-ph",function(e){t("body").hasClass("no-booking")||(e.preventDefault(),t(this).hasClass("open")||(t(".book-title").text("Enquire Now!"),t("#booking,#booking-before").addClass("open"),t("body").addClass("sidebar-open"),e.stopPropagation()),t("body").hasClass("nav-open")&&(t("body").removeClass("disable-scroll nav-open"),t(".navmenu--mobile").removeClass("open"),t(".mob-trigger").removeClass("active")),l())}),t(".date-text").on("click",function(){t(window).width()>767?(t(".sidebar-calendar-wrap").toggleClass("open"),t(".invert-of-cal").toggleClass("open")):t("#rtb-date").focus()}),t("#booking, #private-hire").on("click",function(t){t.stopPropagation()}),t("body, #close-booking, #return-to-site").on("click",function(){if(t("body").hasClass("sidebar-open")){t(".current-state").html("").css("padding","0px"),t("body").removeClass("sidebar-open"),t("#booking,#booking-before").removeClass("open"),t("#booking-news").removeClass("open"),t(".page-1").removeClass("done"),t(".page-2, .page-3, .page-4").removeClass("done").removeClass("active"),u(),t("#booking input, #booking textarea").val("");var e=new Date;t("#rtb-date").val(e.toISOString().split("T")[0]),t("#rtb-time").replaceOptions([])}}),t("body, #close-private-hire, #return-to-site").on("click",function(){t("body").hasClass("sidebar-open")&&(t("body").removeClass("sidebar-open"),t("#private-hire,#private-hire-before").removeClass("open"),u(),t("#private-hire input, #private-hire textarea").val(""))}),t("#next-1").on("click",function(){t(".page-1").addClass("done"),t(".page-2").addClass("active"),u(),function(){t(".unavailable--text").remove(),t(".checking-text").removeClass("hidden"),t(".time-text").addClass("hidden"),t("#next-2").css("display","none"),t("p.error").css("display","none");var e=t("#booking form").find("#rtb-date").val();e=new Date(e);var r=t("#booking form").find("#rtb-party").val(),n=t("#booking form").find("#rtb-venue").val(),i=e.toISOString().split("T")[0];t.ajax({method:"POST",url:"/wp-admin/admin-ajax.php",data:{action:"check_availability",date:i,adults:r,venue:n}}).done(function(e){t("p.error").css("display","none");var r=JSON.parse(e);t(".checking-text").addClass("hidden"),t(".time-text").removeClass("hidden");var n=t("#rtb-time"),i=[];r.Breakfast.forEach(function(t){t.available&&i.push({text:t.time,value:t.time+"---Breakfast"})}),r.Lunch.forEach(function(t){t.available&&i.push({text:t.time,value:t.time+"---Lunch"})}),r.Dinner.forEach(function(t){t.available&&i.push({text:t.time,value:t.time+"---Dinner"})}),0==i.length?(i.push({text:"Unavailable",value:""}),n.replaceOptions(i),t("#next-2").css("display","none"),t("<div />",{class:"unavailable--text",html:[t("<small />",{class:"m-top-1 m-bottom-1",css:{display:"block"},text:"Looks like that date isn't currently available to book, you can email us to find out more"}),t("<a />",{class:"btn btn--secondary btn--medium",href:"/contact/#contact",text:"Email Us"})]}).appendTo(".page-2")):(n.replaceOptions(i),t("#next-2").css("display","inline-block"),t(".unavailable--text").remove())})}()}),t("#next-2").on("click",function(){t(".page-2").addClass("done"),t(".page-3").addClass("active"),u(),function(){var e=t("#booking form").find("#rtb-date").val(),r=t("#rtb-time").val().split("---")[0];e=new Date(e);var n=t("#booking form").find("#rtb-party").val(),i=t("#booking form").find("#rtb-venue").val(),o=e.toISOString().split("T")[0]+"T"+r;t("#rtb-menu .radios").html(""),t("#rtb-menu").hide(),t.ajax({method:"POST",url:"/wp-admin/admin-ajax.php",data:{action:"check_menus",date:o,adults:n,venue:i}}).done(function(e){var r=JSON.parse(e);
40if(200!=r.StatusCode)return t("p.error").css("display","block"),void c(e);r.Data.length&&(r.Data.forEach(function(e,r){t("#rtb-menu .radios").append('<div class="rg">\n\t\t\t\t\t\t<input type="radio" name="rtb-menu" id="rtb-menu-'+e.menuId+'" value="'+e.menuId+'" '+(0===r?"required":"")+'>\n\t\t\t\t\t\t<label for="rtb-menu-'+e.menuId+'">'+e.description+"</label>\n\t\t\t\t\t</div>")}),t("#rtb-menu").show())})}()}),t(".back-sidebar").on("click",function(){var e=t("#booking .active").not(".done").data("page"),r=e-1;t(".page-"+e).removeClass("active"),t(".page-"+r).removeClass("done"),u(),t("#rtb-time").val("checking for times...")}),function(t,e){t.fn.replaceOptions=function(e){var r,n;this.empty(),r=this,t.each(e,function(e,i){n=t("<option></option>").attr("value",i.value).text(i.text),r.append(n)})}}(e,window)}).call(e,r(0),r(0))},function(t,e,r){"use strict";var n=r(12),i=function(t){this.routes=t};i.prototype.fire=function(t,e,r){void 0===e&&(e="init"),document.dispatchEvent(new CustomEvent("routed",{bubbles:!0,detail:{route:t,fn:e}}));var n=""!==t&&this.routes[t]&&"function"==typeof this.routes[t][e];n&&this.routes[t][e](r)},i.prototype.loadEvents=function(){var t=this;this.fire("common"),document.body.className.toLowerCase().replace(/-/g,"_").split(/\s+/).map(n.a).forEach(function(e){t.fire(e),t.fire(e,"finalize")}),this.fire("common","finalize")},e.a=i},function(t,e,r){"use strict";e.a=function(t){return""+t.charAt(0).toLowerCase()+t.replace(/[\W_]/g,"|").split("|").map(function(t){return""+t.charAt(0).toUpperCase()+t.slice(1)}).join("").slice(1)}},function(t,e,r){"use strict";(function(t){var n=r(14),i=(r.n(n),r(15)),o=(r.n(i),r(16)),a=r.n(o),s=r(17),l=(r.n(s),r(18)),u=(r.n(l),r(19));r.n(u);e.a={init:function(){var e=t(".main-nav"),r=0,n=0,i=0;if(c(),h(),t("body").find("#map").length>0){var o=t("body").find("#map"),s=o.data("lat"),l=o.data("lng");a.a.accessToken="pk.eyJ1IjoibGJwdWJzIiwiYSI6ImNqdjI1cTkwYTFrczkzem0yOWpzdGQ5c3oifQ.-3SZxwvAB-H9tjxYtALgQw";var u=new a.a.Map({container:"map",style:"mapbox://styles/mapbox/light-v9",center:[l,s],zoom:15,scrollZoom:!1}).addControl(new a.a.NavigationControl);new a.a.Marker({color:"#7ea8af",element:document.getElementById("map-marker")}).setLngLat([l,s]).addTo(u)}function c(){var e=t(window).height(),r=t(window).scrollTop();t("body").find(".lazyloaded, .load-in, .fade-in, .block").each(function(){t(this).offset().top<e+r&&(t(this).hasClass("show")||t(this).addClass("show"))})}function p(t){e.css("transform","translateY(-"+t+"px)")}function h(){t(window).width()>=992?t("body").find(".hero--100").css("height",t(window).height()+15+"px"):t(window).width()>=768?t("body").find(".hero--100").css("height",t(window).height()+15+"px"):t("body").find(".hero--100").css("height",t(window).height()+50+"px")}t(document).on("resize",function(){h()}),document.addEventListener("scroll",function(){var o=t(window).scrollTop(),a=o-r;r=o,c(),e.hasClass("nav--transparent")&&t(window).scrollTop()>t(window).height()-e.height()||!e.hasClass("nav--transparent")&&t(window).scrollTop()>50?e.addClass("nav--small").addClass("nav--show-bg"):e.removeClass("nav--small").removeClass("nav--show-bg"),t(".hero").first().length>0&&t(".hero").find(".will-fade").each(function(){r>t(this).offset().top-e.height()-50?t(this).addClass("fade-out"):r<t(this).offset().top-e.height()-100&&t(this).removeClass("fade-out")}),t(window).width()>768?function(t){var r=e.height()+20;if(e.hasClass("nav--small")){var i=n+t;i>=r?i=r:i<=0&&(i=0),n=i,p(i)}else p(0),n=0}(a):function(){var e=window.pageYOffset||document.documentElement.scrollTop;e<t("body").find(".hero").height()?p(0):p(e>i?100:0);i=e<=0?0:e}()},{passive:!0}),document.addEventListener("touchmove",function(e){t("body").hasClass("disable-scroll")&&e.preventDefault()},{passive:!1}),function(){var e=!!window.opr&&!!opr.addons||!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0,r=(/constructor/i.test(window.HTMLElement)||(n=!window.safari||"undefined"!=typeof safari&&safari.pushNotification,n.toString()),!!document.documentMode);!r&&window.StyleMedia,(!!window.chrome&&(!!window.chrome.webstore||!!window.chrome.runtime)||e)&&window.CSS;var n;r&&t("body").addClass("warning-ie")}();var f=window.location.hash;function d(e){t("html, body").animate({scrollTop:t(e).offset().top-150},800,function(){})}f.length>0&&setTimeout(function(){d(f)},500),t("body").on("click","a",function(e){var r=t(this).prop("hash");t(r).length>0&&(e.preventDefault(),d(r))}),t("body").on("click",".scroll-down",function(){t("html, body").animate({scrollTop:t(window).height()},800)}),t("body").on("click",".mob-trigger.__force-show",function(){t(this).toggleClass("active")})},finalize:function(){}}}).call(e,r(0))},function(t,e,r){var n;
41/*! picturefill - v3.0.2 - 2016-02-12
42 * https://scottjehl.github.io/picturefill/
43 * Copyright (c) 2016 https://github.com/scottjehl/picturefill/blob/master/Authors.txt; Licensed MIT
44 */
45/*! Gecko-Picture - v1.0
46 * https://github.com/scottjehl/picturefill/tree/3.0/src/plugins/gecko-picture
47 * Firefox's early picture implementation (prior to FF41) is static and does
48 * not react to viewport changes. This tiny module fixes this.
49 */
50/*! picturefill - v3.0.2 - 2016-02-12
51 * https://scottjehl.github.io/picturefill/
52 * Copyright (c) 2016 https://github.com/scottjehl/picturefill/blob/master/Authors.txt; Licensed MIT
53 */
54/*! Gecko-Picture - v1.0
55 * https://github.com/scottjehl/picturefill/tree/3.0/src/plugins/gecko-picture
56 * Firefox's early picture implementation (prior to FF41) is static and does
57 * not react to viewport changes. This tiny module fixes this.
58 */
59!function(t){var e,r,n,i,o,a,s,l=navigator.userAgent;t.HTMLPictureElement&&/ecko/.test(l)&&l.match(/rv\:(\d+)/)&&RegExp.$1<45&&addEventListener("resize",(r=document.createElement("source"),n=function(t){var e,n,i=t.parentNode;"PICTURE"===i.nodeName.toUpperCase()?(e=r.cloneNode(),i.insertBefore(e,i.firstElementChild),setTimeout(function(){i.removeChild(e)})):(!t._pfLastSize||t.offsetWidth>t._pfLastSize)&&(t._pfLastSize=t.offsetWidth,n=t.sizes,t.sizes+=",100vw",setTimeout(function(){t.sizes=n}))},i=function(){var t,e=document.querySelectorAll("picture > img, img[srcset][sizes]");for(t=0;t<e.length;t++)n(e[t])},o=function(){clearTimeout(e),e=setTimeout(i,99)},a=t.matchMedia&&matchMedia("(orientation: landscape)"),s=function(){o(),a&&a.addListener&&a.addListener(o)},r.srcset="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",/^[c|i]|d$/.test(document.readyState||"")?
vendor: 5,190 bytes, lines 59-65
59s():document.addEventListener("DOMContentLoaded",s),o))}(window),
60/*! Picturefill - v3.0.2
61 * http://scottjehl.github.io/picturefill
62 * Copyright (c) 2015 https://github.com/scottjehl/picturefill/blob/master/Authors.txt;
63 *  License: MIT
64 */
65function(i,o,a){"use strict";var s,l,u;o.createElement("picture");var c={},p=!1,h=function(){},f=o.createElement("img"),d=f.getAttribute,m=f.setAttribute,g=f.removeAttribute,y=o.documentElement,v={},_={algorithm:""},x=navigator.userAgent,b=/rident/.test(x)||/ecko/.test(x)&&x.match(/rv\:(\d+)/)&&RegExp.$1>35,w="currentSrc",E=/\s+\+?\d+(e\d+)?w/,T=/(\([^)]+\))?\s*(.+)/,S=i.picturefillCFG,C="font-size:100%!important;",A=!0,I={},D={},k=i.devicePixelRatio,M={px:1,in:96},P=o.createElement("a"),z=!1,L=/^[ \t\n\r\u000c]+/,O=/^[, \t\n\r\u000c]+/,R=/^[^ \t\n\r\u000c]+/,B=/[,]+$/,F=/^\d+$/,N=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,U=function(t,e,r,n){t.addEventListener?t.addEventListener(e,r,n||!1):t.attachEvent&&t.attachEvent("on"+e,r)},V=function(t){var e={};return function(r){return r in e||(e[r]=t(r)),e[r]}};function j(t){return" "===t||"\t"===t||"\n"===t||"\f"===t||"\r"===t}var q,H,G,W,Z,X,Y,K,J,Q,$,tt,et,rt,nt,it,ot=(q=/^([\d\.]+)(em|vw|px)$/,H=V(function(t){return"return "+function(){for(var t=arguments,e=0,r=t[0];++e in t;)r=r.replace(t[e],t[++e]);return r}((t||"").toLowerCase(),/\band\b/g,"&&",/,/g,"||",/min-([a-z-\s]+):/g,"e.$1>=",/max-([a-z-\s]+):/g,"e.$1<=",/calc([^)]+)/g,"($1)",/(\d+[\.]*[\d]*)([a-z]+)/g,"($1 * e.$2)",/^(?!(e.[a-z]|[0-9\.&=|><\+\-\*\(\)\/])).*/gi,"")+";"}),function(t,e){var r;if(!(t in I))if(I[t]=!1,e&&(r=t.match(q)))I[t]=r[1]*M[r[2]];else try{I[t]=new Function("e",H(t))(M)}catch(t){}return I[t]}),at=function(t,e){return t.w?(t.cWidth=c.calcListLength(e||"100vw"),t.res=t.w/t.cWidth):t.res=t.d,t},st=function(t){if(p){var e,r,n,i=t||{};if(i.elements&&1===i.elements.nodeType&&("IMG"===i.elements.nodeName.toUpperCase()?i.elements=[i.elements]:(i.context=i.elements,i.elements=null)),n=(e=i.elements||c.qsa(i.context||o,i.reevaluate||i.reselect?c.sel:c.selShort)).length){for(c.setupRun(i),z=!0,r=0;r<n;r++)c.fillImg(e[r],i);c.teardownRun(i)}}};function lt(t,e){return t.res-e.res}function ut(t,e){var r,n,i;if(t&&e)for(i=c.parseSet(e),t=c.makeUrl(t),r=0;r<i.length;r++)if(t===c.makeUrl(i[r].url)){n=i[r];break}return n}i.console&&console.warn,w in f||(w="src"),v["image/jpeg"]=!0,v["image/gif"]=!0,v["image/png"]=!0,v["image/svg+xml"]=o.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1"),c.ns=("pf"+(new Date).getTime()).substr(0,9),c.supSrcset="srcset"in f,c.supSizes="sizes"in f,c.supPicture=!!i.HTMLPictureElement,c.supSrcset&&c.supPicture&&!c.supSizes&&(G=o.createElement("img"),f.srcset="data:,a",G.src="data:,a",c.supSrcset=f.complete===G.complete,c.supPicture=c.supSrcset&&c.supPicture),c.supSrcset&&!c.supSizes?(W="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Z=o.createElement("img"),X=function(){2===Z.width&&(c.supSizes=!0),l=c.supSrcset&&!c.supSizes,p=!0,setTimeout(st)},Z.onload=X,Z.onerror=X,Z.setAttribute("sizes","9px"),Z.srcset=W+" 1w,data:image/gif;base64,R0lGODlhAgABAPAAAP///wAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw== 9w",Z.src=W):p=!0,c.selShort="picture>img,img[srcset]",c.sel=c.selShort,c.cfg=_,c.DPR=k||1,c.u=M,c.types=v,c.setSize=h,c.makeUrl=V(function(t){return P.href=t,P.href}),c.qsa=function(t,e){return"querySelector"in t?t.querySelectorAll(e):[]},c.matchesMedia=function(){return i.matchMedia&&(matchMedia("(min-width: 0.1em)")||{}).matches?c.matchesMedia=function(t){return!t||matchMedia(t).matches}:c.matchesMedia=c.mMQ,c.matchesMedia.apply(this,arguments)},c.mMQ=function(t){return!t||ot(t)},c.calcLength=function(t){var e=ot(t,!0)||!1;return e<0&&(e=!1),e},c.supportsType=function(t){return!t||v[t]},c.parseSize=V(function(t){var e=(t||"").match(T);return{media:e&&e[1],length:e&&e[2]}}),c.parseSet=function(t){return t.cands||(t.cands=function(t,e){function r(e){var r,n=e.exec(t.substring(u));if(n)return r=n[0],u+=r.length,r}var n,i,o,a,s,l=t.length,u=0,c=[];function p(){var t,r,o,a,s,l,u,p,h,f=!1,d={};for(a=0;a<i.length;a++)l=(s=i[a])[s.length-1],u=s.substring(0,s.length-1),p=parseInt(u,10),h=parseFloat(u),F.test(u)&&"w"===l?((t||r)&&(f=!0),0===p?f=!0:t=p):N.test(u)&&"x"===l?((t||r||o)&&(f=!0),h<0?f=!0:r=h):F.test(u)&&"h"===l?((o||r)&&(f=!0),0===p?f=!0:o=p):f=!0;f||(d.url=n,t&&(d.w=t),r&&(d.d=r),o&&(d.h=o),o||r||t||(d.d=1),1===d.d&&(e.has1x=!0),d.set=e,c.push(d))}function h(){for(r(L),o="",a="in descriptor";;){if(s=t.charAt(u),"in descriptor"===a)if(j(s))o&&(i.push(o),o="",a="after descriptor");else{if(","===s)return u+=1,o&&i.push(o),void p();if("("===s)o+=s,a="in parens";else{if(""===s)return o&&i.push(o),void p();o+=s}}else if("in parens"===a)if(")"===s)o+=s,a="in descriptor";else{if(""===s)return i.push(o),void p();o+=s}else if("after descriptor"===a)if(j(s));else{if(""===s)return void p();a="in descriptor",u-=1}u+=1}}for(;;){if(r(O),u>=l)return c;n=r(R),i=[],","===n.slice(-1)?(n=n.replace(B,""),p()):h()}}(t.srcset,t)),t.cands},c.getEmValue=function(){var t;if(!s&&(t=o.body)){var e=o.createElement("div"),r=y.style.cssText,n=t.style.cssText;e.style.cssText="position:absolute;
65left:0;visibility:hidden;display:block;padding:0;border:none;font-size:1em;width:1em;overflow:hidden;clip:rect(0px, 0px, 0px, 0px)",y.style.cssText=C,t.style.cssText=C,t.appendChild(e),s=e.offsetWidth,t.removeChild(e),s=parseFloat(s,10),y.style.cssText=r,t.style.cssText=n}return s||16},c.calcListLength=function(t){if(!(t in D)||_.uT){var e=c.calcLength(function(t){var e,r,n,i,o,a,s,l=/^(?:[+-]?[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?(?:ch|cm|em|ex|in|mm|pc|pt|px|rem|vh|vmin|vmax|vw)$/i,u=/^calc\((?:[0-9a-z \.\+\-\*\/\(\)]+)\)$/i;for(n=(r=function(t){var e,r="",n=[],i=[],o=0,a=0,s=!1;function l(){r&&(n.push(r),r="")}function u(){n[0]&&(i.push(n),n=[])}for(;;){if(""===(e=t.charAt(a)))return l(),u(),i;if(s){if("*"===e&&"/"===t[a+1]){s=!1,a+=2,l();continue}a+=1}else{if(j(e)){if(t.charAt(a-1)&&j(t.charAt(a-1))||!r){a+=1;continue}if(0===o){l(),a+=1;continue}e=" "}else if("("===e)o+=1;else if(")"===e)o-=1;else{if(","===e){l(),u(),a+=1;continue}if("/"===e&&"*"===t.charAt(a+1)){s=!0,a+=2;continue}}r+=e,a+=1}}}(t)).length,e=0;e<n;e++)if(o=(i=r[e])[i.length-1],s=o,l.test(s)&&parseFloat(s)>=0||u.test(s)||"0"===s||"-0"===s||"+0"===s){if(a=o,i.pop(),0===i.length)return a;if(i=i.join(" "),c.matchesMedia(i))return a}return"100vw"}(t));D[t]=e||M.width}return D[t]},c.setRes=function(t){var e;if(t)for(var r=0,n=(e=c.parseSet(t)).length;r<n;r++)at(e[r],t.sizes);return e},c.setRes.res=at,c.applySetCandidate=function(t,e){if(t.length){var r,n,i,o,a,s,l,u,p,h,f,d,m,g,y,v,x=e[c.ns],E=c.DPR;if(s=x.curSrc||e[w],(l=x.curCan||function(t,e,r){var n;return!r&&e&&(r=(r=t[c.ns].sets)&&r[r.length-1]),(n=ut(e,r))&&(e=c.makeUrl(e),t[c.ns].curSrc=e,t[c.ns].curCan=n,n.res||at(n,n.set.sizes)),n}(e,s,t[0].set))&&l.set===t[0].set&&((p=b&&!e.complete&&l.res-.1>E)||(l.cached=!0,l.res>=E&&(a=l))),!a)for(t.sort(lt),a=t[(o=t.length)-1],n=0;n<o;n++)if((r=t[n]).res>=E){a=t[i=n-1]&&(p||s!==c.makeUrl(r.url))&&(h=t[i].res,f=r.res,d=E,m=t[i].cached,g=void 0,y=void 0,v=void 0,"saveData"===_.algorithm?h>2.7?v=d+1:(y=(f-d)*(g=Math.pow(h-.6,1.5)),m&&(y+=.1*g),v=h+y):v=d>1?Math.sqrt(h*f):h,v>d)?t[i]:r;break}a&&(u=c.makeUrl(a.url),x.curSrc=u,x.curCan=a,u!==s&&c.setSrc(e,a),c.setSize(e))}},c.setSrc=function(t,e){var r;t.src=e.url,"image/svg+xml"===e.set.type&&(r=t.style.width,t.style.width=t.offsetWidth+1+"px",t.offsetWidth+1&&(t.style.width=r))},c.getSet=function(t){var e,r,n,i=!1,o=t[c.ns].sets;for(e=0;e<o.length&&!i;e++)if((r=o[e]).srcset&&c.matchesMedia(r.media)&&(n=c.supportsType(r.type))){"pending"===n&&(r=n),i=r;break}return i},c.parseSets=function(t,e,r){var n,i,o,a,s=e&&"PICTURE"===e.nodeName.toUpperCase(),u=t[c.ns];(void 0===u.src||r.src)&&(u.src=d.call(t,"src"),u.src?m.call(t,"data-pfsrc",u.src):g.call(t,"data-pfsrc")),(void 0===u.srcset||r.srcset||!c.supSrcset||t.srcset)&&(n=d.call(t,"srcset"),u.srcset=n,a=!0),u.sets=[],s&&(u.pic=!0,function(t,e){var r,n,i,o,a=t.getElementsByTagName("source");for(r=0,n=a.length;r<n;r++)(i=a[r])[c.ns]=!0,(o=i.getAttribute("srcset"))&&e.push({srcset:o,media:i.getAttribute("media"),type:i.getAttribute("type"),sizes:i.getAttribute("sizes")})}(e,u.sets)),u.srcset?(i={srcset:u.srcset,sizes:d.call(t,"sizes")},u.sets.push(i),(o=(l||u.src)&&E.test(u.srcset||""))||!u.src||ut(u.src,i)||i.has1x||(i.srcset+=", "+u.src,i.cands.push({url:u.src,d:1,set:i}))):u.src&&u.sets.push({srcset:u.src,sizes:null}),u.curCan=null,u.curSrc=void 0,u.supported=!(s||i&&!c.supSrcset||o&&!c.supSizes),a&&c.supSrcset&&!u.supported&&(n?(m.call(t,"data-pfsrcset",n),t.srcset=""):g.call(t,"data-pfsrcset")),u.supported&&!u.srcset&&(!u.src&&t.src||t.src!==c.makeUrl(u.src))&&(null===u.src?t.removeAttribute("src"):t.src=u.src),u.parsed=!0},c.fillImg=function(t,e){var r,n,i,o,a,s=e.reselect||e.reevaluate;(t[c.ns]||(t[c.ns]={}),r=t[c.ns],s||r.evaled!==u)&&(r.parsed&&!e.reevaluate||c.parseSets(t,t.parentNode,e),r.supported?r.evaled=u:(n=t,o=c.getSet(n),a=!1,"pending"!==o&&(a=u,o&&(i=c.setRes(o),c.applySetCandidate(i,n))),n[c.ns].evaled=a))},c.setupRun=function(){z&&!A&&k===i.devicePixelRatio||(A=!1,k=i.devicePixelRatio,I={},D={},c.DPR=k||1,M.width=Math.max(i.innerWidth||0,y.clientWidth),M.height=Math.max(i.innerHeight||0,y.clientHeight),M.vw=M.width/100,M.vh=M.height/100,u=[M.height,M.width,k].join("-"),M.em=c.getEmValue(),M.rem=M.em)},c.supPicture?(st=h,c.fillImg=h):(et=i.attachEvent?/d$|^c/:/d$|^c|^i/,rt=function(){var t=o.readyState||"";nt=setTimeout(rt,"loading"===t?200:999),o.body&&(c.fillImgs(),(Y=Y||et.test(t))&&clearTimeout(nt))},nt=setTimeout(rt,o.body?9:99),it=y.clientHeight,U(i,"resize",(K=function(){A=Math.max(i.innerWidth||0,y.clientWidth)!==M.width||y.clientHeight!==it,it=y.clientHeight,A&&c.fillImgs()},J=99,tt=function(){var t=new Date-$;t<J?Q=setTimeout(tt,J-t):(Q=null,K())},function(){$=new Date,Q||(Q=setTimeout(tt,J))})),U(o,"readystatechange",rt)),c.picturefill=st,c.fillImgs=st,c.teardownRun=h,st._=c,i.picturefillCFG={pf:c,push:function(t){var e=t.shift();"function"==typeof c[e]?c[e].apply(c,t):(_[e]=t[0],z&&c.fillImgs({reselect:!0}))}};for(;S&&S.length;)i.picturefillCFG.push(S.shift());i.picturefill=st,"object"==typeof t&&"object"==typeof t.exports?t.exports=st:void 0===(n=function(){return st}.call(e,r,e,t))||(t.exports=n),c.supPicture||(v["image/webp"]=function(t,e){var r=new i.Image;return r.onerror=function(){v[t]=!1,st()},r.onload=function(){v[t]=1===r.width,st()},r.src=e,"pending"}("image/webp","data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA=="))}(window,document)},function(t,e){!function(e,r){var n=function(t,e){"use strict";if(!e.getElementsByClassName)return;var r,n,i=e.documentElement,o=t.Date,a=t.HTMLPictureElement,s=t.addEventListener,l=t.setTimeout,u=t.requestAnimationFrame||l,c=t.requestIdleCallback,p=/^picture$/i,h=["load","error","lazyincluded","_lazyloaded"],f={},d=Array.prototype.forEach,m=function(t,e){return f[e]||(f[e]=new RegExp("(\\s|^)"+e+"(\\s|$)")),f[e].test(t.getAttribute("class")||"")&&f[e]},g=function(t,e){m(t,e)||t.setAttribute("class",(t.getAttribute("class")||"").trim()+" "+e)},y=function(t,e){var r;(r=m(t,e))&&t.setAttribute("class",(t.getAttribute("class")||"").replace(r," "))},v=function(t,e,r){var n=r?"addEventListener":"removeEventListener";r&&v(t,e),h.forEach(function(r){t[n](r,e)})},_=function(t,n,i,o,a){var s=e.createEvent("Event");
65return i||(i={}),i.instance=r,s.initEvent(n,!o,!a),s.detail=i,t.dispatchEvent(s),s},x=function(e,r){var i;!a&&(i=t.picturefill||n.pf)?(r&&r.src&&!e.getAttribute("srcset")&&e.setAttribute("srcset",r.src),i({reevaluate:!0,elements:[e]})):r&&r.src&&(e.src=r.src)},b=function(t,e){return(getComputedStyle(t,null)||{})[e]},w=function(t,e,r){for(r=r||t.offsetWidth;r<n.minSize&&e&&!t._lazysizesWidth;)r=e.offsetWidth,e=e.parentNode;return r},E=(I=[],D=[],k=I,M=function(){var t=k;for(k=I.length?D:I,C=!0,A=!1;t.length;)t.shift()();C=!1},P=function(t,r){C&&!r?t.apply(this,arguments):(k.push(t),A||(A=!0,(e.hidden?l:u)(M)))},P._lsFlush=M,P),T=function(t,e){return e?function(){E(t)}:function(){var e=this,r=arguments;E(function(){t.apply(e,r)})}},S=function(t){var e,r,n=function(){e=null,t()},i=function(){var t=o.now()-r;t<99?l(i,99-t):(c||n)(n)};return function(){r=o.now(),e||(e=l(i,99))}};var C,A,I,D,k,M,P;!function(){var e,r={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(e in n=t.lazySizesConfig||t.lazysizesConfig||{},r)e in n||(n[e]=r[e]);t.lazySizesConfig=n,l(function(){n.init&&O()})}();var z=function(){var a,u,h,f,w,C,A,I,D,k,M,P,z,O,R,B,F,N,U,V=/^img$/i,j=/^iframe$/i,q="onscroll"in t&&!/(gle|ing)bot/.test(navigator.userAgent),H=0,G=0,W=-1,Z=function(t){G--,(!t||G<0||!t.target)&&(G=0)},X=function(t){return null==P&&(P="hidden"==b(e.body,"visibility")),P||"hidden"!=b(t.parentNode,"visibility")&&"hidden"!=b(t,"visibility")},Y=function(t,r){var n,o=t,a=X(t);for(I-=r,M+=r,D-=r,k+=r;a&&(o=o.offsetParent)&&o!=e.body&&o!=i;)(a=(b(o,"opacity")||1)>0)&&"visible"!=b(o,"overflow")&&(n=o.getBoundingClientRect(),a=k>n.left&&D<n.right&&M>n.top-1&&I<n.bottom+1);return a},K=function(){var t,o,s,l,c,p,h,d,m,g,y,v,_=r.elements;if((f=n.loadMode)&&G<8&&(t=_.length)){for(o=0,W++,g=!n.expand||n.expand<1?i.clientHeight>500&&i.clientWidth>500?500:370:n.expand,r._defEx=g,y=g*n.expFactor,v=n.hFac,P=null,H<y&&G<1&&W>2&&f>2&&!e.hidden?(H=y,W=0):H=f>1&&W>1&&G<6?g:0;o<t;o++)if(_[o]&&!_[o]._lazyRace)if(q)if((d=_[o].getAttribute("data-expand"))&&(p=1*d)||(p=H),m!==p&&(C=innerWidth+p*v,A=innerHeight+p,h=-1*p,m=p),s=_[o].getBoundingClientRect(),(M=s.bottom)>=h&&(I=s.top)<=A&&(k=s.right)>=h*v&&(D=s.left)<=C&&(M||k||D||I)&&(n.loadHidden||X(_[o]))&&(u&&G<3&&!d&&(f<3||W<4)||Y(_[o],p))){if(nt(_[o]),c=!0,G>9)break}else!c&&u&&!l&&G<4&&W<4&&f>2&&(a[0]||n.preloadAfterLoad)&&(a[0]||!d&&(M||k||D||I||"auto"!=_[o].getAttribute(n.sizesAttr)))&&(l=a[0]||_[o]);else nt(_[o]);l&&!c&&nt(l)}},J=(z=K,R=0,B=n.throttleDelay,F=n.ricTimeout,N=function(){O=!1,R=o.now(),z()},U=c&&F>49?function(){c(N,{timeout:F}),F!==n.ricTimeout&&(F=n.ricTimeout)}:T(function(){l(N)},!0),function(t){var e;(t=!0===t)&&(F=33),O||(O=!0,(e=B-(o.now()-R))<0&&(e=0),t||e<9?U():l(U,e))}),Q=function(t){var e=t.target;e._lazyCache?delete e._lazyCache:(Z(t),g(e,n.loadedClass),y(e,n.loadingClass),v(e,tt),_(e,"lazyloaded"))},$=T(Q),tt=function(t){$({target:t.target})},et=function(t){var e,r=t.getAttribute(n.srcsetAttr);(e=n.customMedia[t.getAttribute("data-media")||t.getAttribute("media")])&&t.setAttribute("media",e),r&&t.setAttribute("srcset",r)},rt=T(function(t,e,r,i,o){var a,s,u,c,f,m;(f=_(t,"lazybeforeunveil",e)).defaultPrevented||(i&&(r?g(t,n.autosizesClass):t.setAttribute("sizes",i)),s=t.getAttribute(n.srcsetAttr),a=t.getAttribute(n.srcAttr),o&&(u=t.parentNode,c=u&&p.test(u.nodeName||"")),m=e.firesLoad||"src"in t&&(s||a||c),f={target:t},g(t,n.loadingClass),m&&(clearTimeout(h),h=l(Z,2500),v(t,tt,!0)),c&&d.call(u.getElementsByTagName("source"),et),s?t.setAttribute("srcset",s):a&&!c&&(j.test(t.nodeName)?function(t,e){try{t.contentWindow.location.replace(e)}catch(r){t.src=e}}(t,a):t.src=a),o&&(s||c)&&x(t,{src:a})),t._lazyRace&&delete t._lazyRace,y(t,n.lazyClass),E(function(){var e=t.complete&&t.naturalWidth>1;m&&!e||(e&&g(t,"ls-is-cached"),Q(f),t._lazyCache=!0,l(function(){"_lazyCache"in t&&delete t._lazyCache},9))},!0)}
65),nt=function(t){var e,r=V.test(t.nodeName),i=r&&(t.getAttribute(n.sizesAttr)||t.getAttribute("sizes")),o="auto"==i;(!o&&u||!r||!t.getAttribute("src")&&!t.srcset||t.complete||m(t,n.errorClass)||!m(t,n.lazyClass))&&(e=_(t,"lazyunveilread").detail,o&&L.updateElem(t,!0,t.offsetWidth),t._lazyRace=!0,G++,rt(t,e,o,i,r))},it=function(){if(!u)if(o.now()-w<999)l(it,999);else{var t=S(function(){n.loadMode=3,J()});u=!0,n.loadMode=3,J(),s("scroll",function(){3==n.loadMode&&(n.loadMode=2),t()},!0)}};return{_:function(){w=o.now(),r.elements=e.getElementsByClassName(n.lazyClass),a=e.getElementsByClassName(n.lazyClass+" "+n.preloadClass),s("scroll",J,!0),s("resize",J,!0),t.MutationObserver?new MutationObserver(J).observe(i,{childList:!0,subtree:!0,attributes:!0}):(i.addEventListener("DOMNodeInserted",J,!0),i.addEventListener("DOMAttrModified",J,!0),setInterval(J,999)),s("hashchange",J,!0),["focus","mouseover","click","load","transitionend","animationend","webkitAnimationEnd"].forEach(function(t){e.addEventListener(t,J,!0)}),/d$|^c/.test(e.readyState)?it():(s("load",it),e.addEventListener("DOMContentLoaded",J),l(it,2e4)),r.elements.length?(K(),E._lsFlush()):J()},checkElems:J,unveil:nt}}(),L=(B=T(function(t,e,r,n){var i,o,a;if(t._lazysizesWidth=n,n+="px",t.setAttribute("sizes",n),p.test(e.nodeName||""))for(i=e.getElementsByTagName("source"),o=0,a=i.length;o<a;o++)i[o].setAttribute("sizes",n);r.detail.dataAttr||x(t,r.detail)}),F=function(t,e,r){var n,i=t.parentNode;i&&(r=w(t,i,r),(n=_(t,"lazybeforesizes",{width:r,dataAttr:!!e})).defaultPrevented||(r=n.detail.width)&&r!==t._lazysizesWidth&&B(t,i,n,r))},N=S(function(){var t,e=R.length;if(e)for(t=0;t<e;t++)F(R[t])}),{_:function(){R=e.getElementsByClassName(n.autosizesClass),s("resize",N)},checkElems:N,updateElem:F}),O=function(){O.i||(O.i=!0,L._(),z._())};var R,B,F,N;return r={cfg:n,autoSizer:L,loader:z,init:O,uP:x,aC:g,rC:y,hC:m,fire:_,gW:w,rAF:E}}(e,e.document);e.lazySizes=n,"object"==typeof t&&t.exports&&(t.exports=n)}(window)},function(t,e,r){var n;n=function(){"use strict";var t,e,r;function n(n,i){if(t)if(e){var o="var sharedChunk = {}; ("+t+")(sharedChunk); ("+e+")(sharedChunk);",a={};t(a),(r=i(a)).workerUrl=window.URL.createObjectURL(new Blob([o],{type:"text/javascript"}))}else e=i;else t=i}return n(0,function(t){function e(t,e){return t(e={exports:{}},e.exports),e.exports}var r=n;function n(t,e,r,n){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=r,this.p2y=n}n.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},n.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},n.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},n.prototype.solveCurveX=function(t,e){var r,n,i,o,a;for(void 0===e&&(e=1e-6),i=t,a=0;a<8;a++){if(o=this.sampleCurveX(i)-t,Math.abs(o)<e)return i;var s=this.sampleCurveDerivativeX(i);if(Math.abs(s)<1e-6)break;i-=o/s}if((i=t)<(r=0))return r;if(i>(n=1))return n;for(;r<n;){if(o=this.sampleCurveX(i),Math.abs(o-t)<e)return i;t>o?r=i:n=i,i=.5*(n-r)+r}return i},n.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var i=o;function o(t,e){this.x=t,this.y=e}function a(t,e){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(var r=0;r<t.length;r++)if(!a(t[r],e[r]))return!1;return!0}if("object"==typeof t&&null!==t&&null!==e){if("object"!=typeof e)return!1;if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(!a(t[n],e[n]))return!1;return!0}return t===e}function s(t,e,n,i){var o=new r(t,e,n,i);return function(t){return o.solve(t)}}o.prototype={clone:function(){return new o(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)}
vendor: 4,318 bytes, line 65
65,rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),r=Math.sin(t),n=e*this.x-r*this.y,i=r*this.x+e*this.y;return this.x=n,this.y=i,this},_rotateAround:function(t,e){var r=Math.cos(t),n=Math.sin(t),i=e.x+r*(this.x-e.x)-n*(this.y-e.y),o=e.y+n*(this.x-e.x)+r*(this.y-e.y);return this.x=i,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},o.convert=function(t){return t instanceof o?t:Array.isArray(t)?new o(t[0],t[1]):t};var l=s(.25,.1,.25,1);function u(t,e,r){return Math.min(r,Math.max(e,t))}function c(t,e,r){var n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i}function p(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n<i.length;n+=1){var o=i[n];for(var a in o)t[a]=o[a]}return t}var h=1;function f(){return h++}function d(){return function t(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function m(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function g(t,e){t.forEach(function(t){e[t]&&(e[t]=e[t].bind(e))})}function y(t,e){return-1!==t.indexOf(e,t.length-e.length)}function v(t,e,r){var n={};for(var i in t)n[i]=e.call(r||this,t[i],i,t);return n}function _(t,e,r){var n={};for(var i in t)e.call(r||this,t[i],i,t)&&(n[i]=t[i]);return n}function x(t){return Array.isArray(t)?t.map(x):"object"==typeof t&&t?v(t,x):t}var b={};function w(t){b[t]||(b[t]=!0)}function E(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}function T(t){for(var e=0,r=0,n=t.length,i=n-1,o=void 0,a=void 0;r<n;i=r++)o=t[r],e+=((a=t[i]).x-o.x)*(o.y+a.y);return e}function S(t){try{var e=self[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch(t){return!1}}var C,A,I=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),D=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,k=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,M={now:I,frame:function(t){var e=D(t);return{cancel:function(){return k(e)}}},getImageData:function(t){var e=self.document.createElement("canvas"),r=e.getContext("2d");if(!r)throw new Error("failed to create canvas 2d context");return e.width=t.width,e.height=t.height,r.drawImage(t,0,0,t.width,t.height),r.getImageData(0,0,t.width,t.height)},resolveURL:function(t){var e=self.document.createElement("a");return e.href=t,e.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio}},P={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":0===this.API_URL.indexOf("https://api.mapbox.com")?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16}
65,z={supported:!1,testSupport:function(t){!L&&A&&(O?R(t):C=t)}},L=!1,O=!1;function R(t){var e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,A),t.isContextLost())return;z.supported=!0}catch(t){}t.deleteTexture(e),L=!0}self.document&&((A=self.document.createElement("img")).onload=function(){C&&R(C),C=null,O=!0},A.onerror=function(){L=!0,C=null},A.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var B="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes";function F(t,e){var r=W(P.API_URL);if(t.protocol=r.protocol,t.authority=r.authority,"/"!==r.path&&(t.path=""+r.path+t.path),!P.REQUIRE_ACCESS_TOKEN)return Z(t);if(!(e=e||P.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+B);if("s"===e[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+B);return t.params.push("access_token="+e),Z(t)}function N(t){return 0===t.indexOf("mapbox:")}var U=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function V(t){return U.test(t)}var j=/(\.(png|jpg)\d*)(?=$)/,q=/\.[\w]+$/,H=function(t){var e=W(t);if(!e.path.match(/(^\/v4\/)/)||!e.path.match(q))return t;var r="mapbox://tiles/";r+=e.path.replace("/v4/","");var n=e.params.filter(function(t){return!t.match(/^access_token=/)});return n.length&&(r+="?"+n.join("&")),r},G=/^(\w+):\/\/([^\/?]*)(\/[^?]+)?\??(.+)?/;function W(t){var e=t.match(G);if(!e)throw new Error("Unable to parse URL object");return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}function Z(t){var e=t.params.length?"?"+t.params.join("&"):"";return t.protocol+"://"+t.authority+t.path+e}function X(t){if(!t)return null;var e,r=t.split(".");if(!r||3!==r.length)return null;try{return JSON.parse((e=r[1],decodeURIComponent(self.atob(e).split("").map(function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)}).join(""))))}catch(t){return null}}var Y=function(t){this.type=t,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};Y.prototype.getStorageKey=function(t){var e,r=X(P.ACCESS_TOKEN),n="";return r&&r.u?(e=r.u,n=self.btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(t,e){return String.fromCharCode(Number("0x"+e))}))):n=P.ACCESS_TOKEN||"",t?"mapbox.eventData."+t+":"+n:"mapbox.eventData:"+n},Y.prototype.fetchEventData=function(){var t=S("localStorage"),e=this.getStorageKey(),r=this.getStorageKey("uuid");if(t)try{var n=self.localStorage.getItem(e);n&&(this.eventData=JSON.parse(n));var i=self.localStorage.getItem(r);i&&(this.anonId=i)}catch(t){w("Unable to read from LocalStorage")}},Y.prototype.saveEventData=function(){var t=S("localStorage"),e=this.getStorageKey(),r=this.getStorageKey("uuid");if(t)try{self.localStorage.setItem(r,this.anonId),Object.keys(this.eventData).length>=1&&self.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){w("Unable to write to LocalStorage")}},Y.prototype.processRequests=function(){},Y.prototype.postEvent=function(t,e,r){var n=this;if(P.EVENTS_URL){var i=W(P.EVENTS_URL);i.params.push("access_token="+(P.ACCESS_TOKEN||""));var o={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"0.53.1",userId:this.anonId},a=e?p(o,e):o,s={url:Z(i),headers:{"Content-Type":"text/plain"},body:JSON.stringify([a])};this.pendingRequest=ut(s,function(t){n.pendingRequest=null,r(t),n.saveEventData(),n.processRequests()})}},Y.prototype.queueRequest=function(t){this.queue.push(t),this.processRequests()};var K=function(t){function e(){t.call(this,"map.load"),this.success={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postMapLoadEvent=function(t,e){P.EVENTS_URL&&P.ACCESS_TOKEN&&Array.isArray(t)&&t.some(function(t){return N(t)||V(t)})&&this.queueRequest({id:e,timestamp:Date.now()})},e.prototype.processRequests=function(){var t=this;if(!this.pendingRequest&&0!==this.queue.length){var e=this.queue.shift(),r=e.id,n=e.timestamp;r&&this.success[r]||(this.anonId||this.fetchEventData(),m(this.anonId)||(this.anonId=d()),this.postEvent(n,{},function(e){e||r&&(t.success[r]=!0)}))}},e}(Y),J=new(function(t){function e(){t.call(this,"appUserTurnstile")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postTurnstileEvent=function(t){P.EVENTS_URL&&P.ACCESS_TOKEN&&Array.isArray(t)&&t.some(function(t){return N(t)||V(t)})&&this.queueRequest(Date.now())},e.prototype.processRequests=function(){var t=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var e=X(P.ACCESS_TOKEN),r=e?e.u:P.ACCESS_TOKEN,n=r!==this.eventData.tokenU;m(this.anonId)||(this.anonId=d(),n=!0);var i=this.queue.shift();if(this.eventData.lastSuccess){var o=new Date(this.eventData.lastSuccess),a=new Date(i),s=(i-this.eventData.lastSuccess)/864e5;n=n||s>=1||s<-1||o.getDate()!==a.getDate()}else n=!0;if(!n)return this.processRequests();this.postEvent(i,{"enabled.telemetry":!1},function(e){e||(t.eventData.lastSuccess=i,t.eventData.tokenU=r)})}},e}(Y)),Q=J.postTurnstileEvent.bind(J),$=new K,tt=$.postMapLoadEvent.bind($),et={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(et);var rt=function(t){function e(e,r,n){401===r&&V(n)&&(e+=": you may have provided an invali
65d Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),t.call(this,e),this.status=r,this.url=n,this.name=this.constructor.name,this.message=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},e}(Error);function nt(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}var it,ot,at=nt()?function(){return self.worker&&self.worker.referrer}:function(){var t=self.location.origin;if(t&&"null"!==t&&"file://"!==t)return t+self.location.pathname},st=function(t,e){if(!/^file:/.test(t.url)){if(self.fetch&&self.Request&&self.AbortController)return function(t,e){var r=new self.AbortController,n=new self.Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,referrer:at(),signal:r.signal});return"json"===t.type&&n.headers.set("Accept","application/json"),self.fetch(n).then(function(r){r.ok?r[t.type||"text"]().then(function(t){e(null,t,r.headers.get("Cache-Control"),r.headers.get("Expires"))}).catch(function(t){return e(new Error(t.message))}):e(new rt(r.statusText,r.status,t.url))}).catch(function(t){20!==t.code&&e(new Error(t.message))}),{cancel:function(){return r.abort()}}}(t,e);if(nt()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e)}return function(t,e){var r=new self.XMLHttpRequest;for(var n in r.open(t.method||"GET",t.url,!0),"arrayBuffer"===t.type&&(r.responseType="arraybuffer"),t.headers)r.setRequestHeader(n,t.headers[n]);return"json"===t.type&&r.setRequestHeader("Accept","application/json"),r.withCredentials="include"===t.credentials,r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){if((r.status>=200&&r.status<300||0===r.status)&&null!==r.response){var n=r.response;if("json"===t.type)try{n=JSON.parse(r.response)}catch(t){return e(t)}e(null,n,r.getResponseHeader("Cache-Control"),r.getResponseHeader("Expires"))}else e(new rt(r.statusText,r.status,t.url))},r.send(t.body),{cancel:function(){return r.abort()}}}(t,e)},lt=function(t,e){return st(p(t,{type:"arrayBuffer"}),e)},ut=function(t,e){return st(p(t,{method:"POST"}),e)};it=[],ot=0;var ct=function(t,e){if(ot>=P.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:t,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return it.push(r),r}ot++;var n=!1,i=function(){if(!n)for(n=!0,ot--;it.length&&ot<P.MAX_PARALLEL_IMAGE_REQUESTS;){var t=it.shift(),e=t.requestParameters,r=t.callback;t.cancelled||(t.cancel=ct(e,r).cancel)}},o=lt(t,function(t,r,n,o){if(i(),t)e(t);else if(r){var a=new self.Image,s=self.URL||self.webkitURL;a.onload=function(){e(null,a),s.revokeObjectURL(a.src)},a.onerror=function(){return e(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var l=new self.Blob([new Uint8Array(r)],{type:"image/png"});a.cacheControl=n,a.expires=o,a.src=r.byteLength?s.createObjectURL(l):"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="}});return{cancel:function(){o.cancel(),i()}}};function pt(t,e,r){r[t]&&-1!==r[t].indexOf(e)||(r[t]=r[t]||[],r[t].push(e))}function ht(t,e,r){if(r&&r[t]){var n=r[t].indexOf(e);-1!==n&&r[t].splice(n,1)}}var ft=function(t,e){void 0===e&&(e={}),p(this,e),this.type=t},dt=function(t){function e(e,r){void 0===r&&(r={}),t.call(this,"error",p({error:e},r))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ft),mt=function(){};mt.prototype.on=function(t,e){return this._listeners=this._listeners||{},pt(t,e,this._listeners),this},mt.prototype.off=function(t,e){return ht(t,e,this._listeners),ht(t,e,this._oneTimeListeners),this},mt.prototype.once=function(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},pt(t,e,this._oneTimeListeners),this},mt.prototype.fire=function(t,e){"string"==typeof t&&(t=new ft(t,e||{}));var r=t.type;if(this.listens(r)){t.target=this;for(var n=0,i=this._listeners&&this._listeners[r]?this._listeners[r].slice():[];n<i.length;n+=1)i[n].call(this,t);for(var o=0,a=this._oneTimeListeners&&this._oneTimeListeners[r]?this._oneTimeListeners[r].slice():[];o<a.length;o+=1){var s=a[o];ht(r,s,this._oneTimeListeners),s.call(this,t)}var l=this._eventedParent;l&&(p(t,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),l.fire(t))}return this},mt.prototype.listens=function(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},mt.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var gt={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"}
vendor: 6,739 bytes, line 65
65,bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"string",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"}
vendor: 12,704 bytes, line 65
65,"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:22,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}
vendor: 6,712 bytes, line 65
65,"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}
vendor: 19,097 bytes, line 65
65,"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}}},yt=function(t,e,r,n){this.message=(t?t+": ":"")+r,n&&(this.identifier=n),null!=e&&e.__line__&&(this.line=e.__line__)};function vt(t){var e=t.key,r=t.value;return r?[new yt(e,r,"constants have been deprecated as of v8")]:[]}function _t(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n<i.length;n+=1){var o=i[n];for(var a in o)t[a]=o[a]}return t}function xt(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function bt(t){return Array.isArray(t)?t.map(bt):xt(t)}var wt=function(t){function e(e,r){t.call(this,r),this.message=r,this.key=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),Et=function(t,e){void 0===e&&(e=[]),this.parent=t,this.bindings={};for(var r=0,n=e;r<n.length;r+=1){var i=n[r],o=i[0],a=i[1];this.bindings[o]=a}};Et.prototype.concat=function(t){return new Et(this,t)},Et.prototype.get=function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(t+" not found in scope.")},Et.prototype.has=function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)};var Tt={kind:"null"},St={kind:"number"},Ct={kind:"string"},At={kind:"boolean"},It={kind:"color"},Dt={kind:"object"},kt={kind:"value"},Mt={kind:"collator"},Pt={kind:"formatted"};function zt(t,e){return{kind:"array",itemType:t,N:e}}function Lt(t){if("array"===t.kind){var e=Lt(t.itemType);return"number"==typeof t.N?"array<"+e+", "+t.N+">":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var Ot=[Tt,St,Ct,At,It,Pt,Dt,zt(kt)];function Rt(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!Rt(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(var r=0,n=Ot;r<n.length;r+=1)if(!Rt(n[r],e))return null}return"Expected "+Lt(t)+" but found "+Lt(e)+" instead."}var Bt=e(function(t,e){var r={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function n(t){return(t=Math.round(t))<0?0:t>255?255:t}function i(t){return t<0?0:t>1?1:t}function o(t){return"%"===t[t.length-1]?n(parseFloat(t)/100*255):n(parseInt(t))}function a(t){return"%"===t[t.length-1]?i(parseFloat(t)/100):i(parseFloat(t))}function s(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}try{e.parseCSSColor=function(t){var e,i=t.replace(/ /g,"").toLowerCase();if(i in r)return r[i].slice();if("#"===i[0])return 4===i.length?(e=parseInt(i.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===i.length&&(e=parseInt(i.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var l=i.indexOf("("),u=i.indexOf(")");if(-1!==l&&u+1===i.length){var c=i.substr(0,l),p=i.substr(l+1,u-(l+1)).split(","),h=1;switch(c){case"rgba":if(4!==p.length)return null;h=a(p.pop());case"rgb":return 3!==p.length?null:[o(p[0]),o(p[1]),o(p[2]),h];case"hsla":if(4!==p.length)return null;h=a(p.pop());case"hsl":if(3!==p.length)return null;var f=(parseFloat(p[0])%360+360)%360/360,d=a(p[1]),m=a(p[2]),g=m<=.5?m*(d+1):m+d-m*d,y=2*m-g;return[n(255*s(y,g,f+1/3)),n(255*s(y,g,f)),n(255*s(y,g,f-1/3)),h];default:return null}}return null}}catch(t){}}).parseCSSColor,Ft=function(t,e,r,n){void 0===n&&(n=1),this.r=t,this.g=e,this.b=r,this.a=n};Ft.parse=function(t){if(t){if(t instanceof Ft)return t;if("string"==typeof t){var e=Bt(t);if(e)return new Ft(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},Ft.prototype.toString=function(){var t=this.toArray(),e=t[0],r=t[1],n=t[2],i=t[3];return"rgba("+Math.round(e)+","+Math.round(r)+","+Math.round(n)+","+i+")"},Ft.prototype.toArray=function(){var t=this.r,e=this.g,r=this.b,n=this.a;return 0===n?[0,0,0,0]:[255*t/n,255*e/n,255*r/n,n]},Ft.black=new Ft(0,0,0,1),Ft.white=new Ft(1,1,1,1),Ft.transparent=new Ft(0,0,0,0),Ft.red=new Ft(1,0,0,1);var Nt=function(t,e,r){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Nt.prototype.compare=function(t,e){return this.collator.compare(t,e)},Nt.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Ut=function(t,e,r){this.text=t,this.scale=e,this.fontStack=r},Vt=function(t){this.sections=t};function jt(t,e,r,n){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[t,e,r,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[t,e,r,n]:[t,e,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function qt(t){if(null===t)return Tt;if("string"==typeof t)return Ct;if("boolean"==typeof t)return At;if("number"==typeof t)return St;if(t instanceof Ft)return It;if(t instanceof Nt)return Mt;if(t instanceof Vt)return Pt;if(Array.isArray(t)){for(var e,r=t.length,n=0,i=t;n<i.length;n+=1){var o=qt(i[n]);if(e){if(e===o)continue;e=kt;break}e=o}return zt(e||kt,r)}return Dt}function Ht(t){var e=typeof t;return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof Ft||t instanceof Vt?t.toString():JSON.stringify(t)}Vt.fromString=function(t){return new Vt([new Ut(t,null,null)])},Vt.prototype.toString=function(){return this.sections.map(function(t){return t.text}).join("")},Vt.prototype.serialize=function(){for(var t=["format"],e=0,r=this.sections;e<r.length;e+=1){var n=r[e];t.push(n.text);var i={};n.fontStack&&(i["text-font"]=["literal",n.fontStack.split(",")]),n.scale&&(i["font-scale"]=n.scale),t.push(i)}return t};var Gt=function(t,e){this.type=t,this.value=e};Gt.parse=function(t,e){if(2!==t.length)return e.error("'literal' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(!function t(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof Ft)return!0;if(e instanceof Nt)return!0;if(e instanceof Vt)return!0;if(Array.isArray(e)){for(var r=0,n=e;r<n.length;r+=1)if(!t(n[r]))return!1;return!0}if("object"==typeof e){for(var i in e)if(!t(e[i]))return!1;return!0}return!1}(t[1]))return e.error("invalid value");var r=t[1],n=qt(r),i=e.expectedType;return"array"!==n.kind||0!==n.N||!i||"array"!==i.kind||"number"==typeof i.N&&0!==i.N||(n=i),new Gt(n,r)},Gt.prototype.evaluate=function(){return this.value},Gt.prototype.eachChild=function(){},Gt.prototype.possibleOutputs=function(){return[this.value]},Gt.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof Ft?["rgba"].concat(this.value.toArray()):this.value instanceof Vt?this.value.serialize():this.value};var Wt=function(t){this.name="ExpressionEvaluationError",this.message=t};Wt.prototype.toJSON=function(){return this.message};var Zt={string:Ct,number:St,boolean:At,object:Dt},Xt=function(t,e){this.type=t,this.args=e};Xt.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r,n=1,i=t[0];if("array"===i){var o,a;if(t.length>2){var s=t[1];if("string"!=typeof s||!(s in Zt)||"object"===s)return e.error('The item type argument of "array" must be one of string, number, boolean',1);o=Zt[s],n++}else o=kt;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);a=t[2],n++}r=zt(o,a)}else r=Zt[i];for(var l=[];n<t.length;n++){var u=e.parse(t[n],n,kt);if(!u)return null;l.push(u)}return new Xt(r,l)},Xt.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var r=this.args[e].evaluate(t);if(!Rt(this.type,qt(r)))return r;if(e===this.args.length-1)throw new Wt("Expected value to be of type "+Lt(this.type)+", but found "+Lt(qt(r))+" instead.")}return null},Xt.prototype.eachChild=function(t){this.args.forEach(t)},Xt.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}))},Xt.prototype.serialize=function(){var t=this.type,e=[t.kind];if("array"===t.kind){var r=t.itemType;if("string"===r.kind||"number"===r.kind||"boolean"===r.kind){e.push(r.kind);var n=t.N;("number"==typeof n||this.args.length>1)&&e.push(n)}}return e.concat(this.args.map(function(t){return t.serialize()}))};var Yt=function(t){this.type=Pt,this.sections=t};Yt.parse=function(t,e){if(t.length<3)return e.error("Expected at least two arguments.");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");for(var r=[],n=1;n<t.length-1;n+=2){var i=e.parse(t[n],1,kt);if(!i)return null;var o=i.type.kind;if("string"!==o&&"value"!==o&&"null"!==o)return e.error("Formatted text type must be 'string', 'value', or 'null'.");var a=t[n+1];if("object"!=typeof a||Array.isArray(a))return e.error("Format options argument must be an object.");var s=null;if(a["font-scale"]&&!(s=e.parse(a["font-scale"],1,St)))return null;var l=null;if(a["text-font"]&&!(l=e.parse(a["text-font"],1,zt(Ct))))return null;r.push({text:i,scale:s,font:l})}return new Yt(r)},Yt.prototype.evaluate=function(t){return new Vt(this.sections.map(function(e){return new Ut(Ht(e.text.evaluate(t)),e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null)}))},Yt.prototype.eachChild=function(t){for(var e=0,r=this.sections;e<r.length;e+=1){var n=r[e];t(n.text),n.scale&&t(n.scale),n.font&&t(n.font)}},Yt.prototype.possibleOutputs=function(){return[void 0]},Yt.prototype.serialize=function(){for(var t=["format"],e=0,r=this.sections;e<r.length;e+=1){var n=r[e];t.push(n.text.serialize());var i={};n.scale&&(i["font-scale"]=n.scale.serialize()),n.font&&(i["text-font"]=n.font.serialize()),t.push(i)}return t};var Kt={"to-boolean":At,"to-color":It,"to-number":St,"to-string":Ct},Jt=function(t,e){this.type=t,this.args=e};Jt.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[0];if(("to-boolean"===r||"to-string"===r)&&2!==t.length)return e.error("Expected one argument.");for(var n=Kt[r],i=[],o=1;o<t.length;o++){var a=e.parse(t[o],o,kt);if(!a)return null;i.push(a)}return new Jt(n,i)},Jt.prototype.evaluate=function(t){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(t));if("color"===this.type.kind){for(var e,r,n=0,i=this.args;n<i.length;n+=1){if(r=null,(e=i[n].evaluate(t))instanceof Ft)return e;if("string"==typeof e){var o=t.parseColor(e);if(o)return o}else if(Array.isArray(e)&&!(r=e.length<3||e.length>4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":jt(e[0],e[1],e[2],e[3])))return new Ft(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new Wt(r||"Could not parse color from value '"+("string"==typeof e?e:JSON.stringify(e))+"'")}if("number"===this.type.kind){for(var a=null,s=0,l=this.args;s<l.length;s+=1){if(null===(a=l[s].evaluate(t)))return 0;var u=Number(a);if(!isNaN(u))return u}throw new Wt("Could not convert "+JSON.stringify(a)+" to number.")}return"formatted"===this.type.kind?Vt.fromString(Ht(this.args[0].evaluate(t))):Ht(this.args[0].evaluate(t))},Jt.prototype.eachChild=function(t){this.args.forEach(t)},Jt.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}))},Jt.prototype.serialize=function(){if("formatted"===this.type.kind)return new Yt([{text:this.args[0],scale:null,font:null}]).serialize();var t=["to-"+this.type.kind];return this.eachChild(function(e){t.push(e.serialize())}),t};var Qt=["Unknown","Point","LineString","Polygon"],$t=function(){this.globals=null,this.feature=null,this.featureState=null,this._parseColorCache={}};$t.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},$t.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?Qt[this.feature.type]:this.feature.type:null},$t.prototype.properties=function(){return this.feature&&this.feature.properties||{}},$t.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=Ft.parse(t)),e};var te=function(t,e,r,n){this.name=t,this.type=e,this._evaluate=r,this.args=n};te.prototype.evaluate=function(t){return this._evaluate(t,this.args)}
vendor: 25,016 bytes, line 65
65,te.prototype.eachChild=function(t){this.args.forEach(t)},te.prototype.possibleOutputs=function(){return[void 0]},te.prototype.serialize=function(){return[this.name].concat(this.args.map(function(t){return t.serialize()}))},te.parse=function(t,e){var r,n=t[0],i=te.definitions[n];if(!i)return e.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0);for(var o=Array.isArray(i)?i[0]:i.type,a=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,s=a.filter(function(e){var r=e[0];return!Array.isArray(r)||r.length===t.length-1}),l=null,u=0,c=s;u<c.length;u+=1){var p=c[u],h=p[0],f=p[1];l=new ae(e.registry,e.path,null,e.scope);for(var d=[],m=!1,g=1;g<t.length;g++){var y=t[g],v=Array.isArray(h)?h[g-1]:h.type,_=l.parse(y,1+d.length,v);if(!_){m=!0;break}d.push(_)}if(!m)if(Array.isArray(h)&&h.length!==d.length)l.error("Expected "+h.length+" arguments, but found "+d.length+" instead.");else{for(var x=0;x<d.length;x++){var b=Array.isArray(h)?h[x]:h.type,w=d[x];l.concat(x+1).checkSubtype(b,w.type)}if(0===l.errors.length)return new te(n,o,f,d)}}if(1===s.length)(r=e.errors).push.apply(r,l.errors);else{for(var E=(s.length?s:a).map(function(t){var e;return e=t[0],Array.isArray(e)?"("+e.map(Lt).join(", ")+")":"("+Lt(e.type)+"...)"}).join(" | "),T=[],S=1;S<t.length;S++){var C=e.parse(t[S],1+T.length);if(!C)return null;T.push(Lt(C.type))}e.error("Expected arguments of type "+E+", but found ("+T.join(", ")+") instead.")}return null},te.register=function(t,e){for(var r in te.definitions=e,e)t[r]=te};var ee=function(t,e,r){this.type=Mt,this.locale=r,this.caseSensitive=t,this.diacriticSensitive=e};function re(t){if(t instanceof te){if("get"===t.name&&1===t.args.length)return!1;if("feature-state"===t.name)return!1;if("has"===t.name&&1===t.args.length)return!1;if("properties"===t.name||"geometry-type"===t.name||"id"===t.name)return!1;if(/^filter-/.test(t.name))return!1}var e=!0;return t.eachChild(function(t){e&&!re(t)&&(e=!1)}),e}function ne(t){if(t instanceof te&&"feature-state"===t.name)return!1;var e=!0;return t.eachChild(function(t){e&&!ne(t)&&(e=!1)}),e}function ie(t,e){if(t instanceof te&&e.indexOf(t.name)>=0)return!1;var r=!0;return t.eachChild(function(t){r&&!ie(t,e)&&(r=!1)}),r}ee.parse=function(t,e){if(2!==t.length)return e.error("Expected one argument.");var r=t[1];if("object"!=typeof r||Array.isArray(r))return e.error("Collator options argument must be an object.");var n=e.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,At);if(!n)return null;var i=e.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,At);if(!i)return null;var o=null;return r.locale&&!(o=e.parse(r.locale,1,Ct))?null:new ee(n,i,o)},ee.prototype.evaluate=function(t){return new Nt(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},ee.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},ee.prototype.possibleOutputs=function(){return[void 0]},ee.prototype.serialize=function(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]};var oe=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};oe.parse=function(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");var r=t[1];return e.scope.has(r)?new oe(r,e.scope.get(r)):e.error('Unknown variable "'+r+'". Make sure "'+r+'" has been bound in an enclosing "let" expression before using it.',1)},oe.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},oe.prototype.eachChild=function(){},oe.prototype.possibleOutputs=function(){return[void 0]},oe.prototype.serialize=function(){return["var",this.name]};var ae=function(t,e,r,n,i){void 0===e&&(e=[]),void 0===n&&(n=new Et),void 0===i&&(i=[]),this.registry=t,this.path=e,this.key=e.map(function(t){return"["+t+"]"}).join(""),this.scope=n,this.errors=i,this.expectedType=r};function se(t,e){for(var r,n,i=0,o=t.length-1,a=0;i<=o;){if(r=t[a=Math.floor((i+o)/2)],n=t[a+1],e===r||e>r&&e<n)return a;if(r<e)i=a+1;else{if(!(r>e))throw new Wt("Input is not a number.");o=a-1}}return Math.max(a-1,0)}ae.prototype.parse=function(t,e,r,n,i){return void 0===i&&(i={}),e?this.concat(e,r,n)._parse(t,i):this._parse(t,i)},ae.prototype._parse=function(t,e){function r(t,e,r){return"assert"===r?new Xt(e,[t]):"coerce"===r?new Jt(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=t[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var i=this.registry[n];if(i){var o=i.parse(t,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=r(o,a,e.typeAnnotation||"coerce");else o=r(o,a,e.typeAnnotation||"assert")}if(!(o instanceof Gt)&&function t(e){if(e instanceof oe)return t(e.boundExpression);if(e instanceof te&&"error"===e.name)return!1;if(e instanceof ee)return!1;var r=e instanceof Jt||e instanceof Xt,n=!0;return e.eachChild(function(e){n=r?n&&t(e):n&&e instanceof Gt}),!!n&&(re(e)&&ie(e,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]))}(o)){var l=new $t;try{o=new Gt(o.type,o.evaluate(l))}catch(t){return this.error(t.message),null}}return o}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof t+" instead.")},ae.prototype.concat=function(t,e,r){var n="number"==typeof t?this.path.concat(t):this.path,i=r?this.scope.concat(r):this.scope;return new ae(this.registry,n,e||null,i,this.errors)},ae.prototype.error=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];var n=""+this.key+e.map(function(t){return"["+t+"]"}).join("");this.errors.push(new wt(n,t))},ae.prototype.checkSubtype=function(t,e){var r=Rt(t,e);return r&&this.error(r),r};var le=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,i=r;n<i.length;n+=1){var o=i[n],a=o[0],s=o[1];this.labels.push(a),this.outputs.push(s)}};function ue(t,e,r){return t*(1-r)+e*r}le.parse=function(t,e){var r=t[1],n=t.slice(2);if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(r=e.parse(r,1,St)))return null;var i=[],o=null;e.expectedType&&"value"!==e.expectedType.kind&&(o=e.expectedType),n.unshift(-1/0);for(var a=0;a<n.length;a+=2){var s=n[a],l=n[a+1],u=a+1,c=a+2;if("number"!=typeof s)return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',u);if(i.length&&i[i.length-1][0]>=s)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',u);var p=e.parse(l,c,o);if(!p)return null;o=o||p.type,i.push([s,p])}return new le(o,r,i)},le.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;return n>=e[i-1]?r[i-1].evaluate(t):r[se(e,n)].evaluate(t)},le.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1)t(r[e])},le.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()}))},le.prototype.serialize=function(){for(var t=["step",this.input.serialize()],e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var ce=Object.freeze({number:ue,color:function(t,e,r){return new Ft(ue(t.r,e.r,r),ue(t.g,e.g,r),ue(t.b,e.b,r),ue(t.a,e.a,r))},array:function(t,e,r){return t.map(function(t,n){return ue(t,e[n],r)})}}),pe=.95047,he=1,fe=1.08883,de=4/29,me=6/29,ge=3*me*me,ye=me*me*me,ve=Math.PI/180,_e=180/Math.PI;function xe(t){return t>ye?Math.pow(t,1/3):t/ge+de}function be(t){return t>me?t*t*t:ge*(t-de)}function we(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ee(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Te(t){var e=Ee(t.r),r=Ee(t.g),n=Ee(t.b),i=xe((.4124564*e+.3575761*r+.1804375*n)/pe),o=xe((.2126729*e+.7151522*r+.072175*n)/he);return{l:116*o-16,a:500*(i-o),b:200*(o-xe((.0193339*e+.119192*r+.9503041*n)/fe)),alpha:t.a}}function Se(t){var e=(t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,n=isNaN(t.b)?e:e-t.b/200;return e=he*be(e),r=pe*be(r),n=fe*be(n),new Ft(we(3.2404542*r-1.5371385*e-.4985314*n),we(-.969266*r+1.8760108*e+.041556*n),we(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}var Ce={forward:Te,reverse:Se,interpolate:function(t,e,r){return{l:ue(t.l,e.l,r),a:ue(t.a,e.a,r),b:ue(t.b,e.b,r),alpha:ue(t.alpha,e.alpha,r)}}},Ae={forward:function(t){var e=Te(t),r=e.l,n=e.a,i=e.b,o=Math.atan2(i,n)*_e;return{h:o<0?o+360:o,c:Math.sqrt(n*n+i*i),l:r,alpha:t.a}},reverse:function(t){var e=t.h*ve,r=t.c;return Se({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:function(t,e,r){var n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}(t.h,e.h,r),c:ue(t.c,e.c,r),l:ue(t.l,e.l,r),alpha:ue(t.alpha,e.alpha,r)}}},Ie=Object.freeze({lab:Ce,hcl:Ae}),De=function(t,e,r,n,i){this.type=t,this.operator=e,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var o=0,a=i;o<a.length;o+=1){var s=a[o],l=s[0],u=s[1];this.labels.push(l),this.outputs.push(u)}};function ke(t,e,r,n){var i=n-r,o=t-r;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}De.interpolationFactor=function(t,e,n,i){var o=0;if("exponential"===t.name)o=ke(e,t.base,n,i);else if("linear"===t.name)o=ke(e,1,n,i);else if("cubic-bezier"===t.name){var a=t.controlPoints;o=new r(a[0],a[1],a[2],a[3]).solve(ke(e,1,n,i))}return o},De.parse=function(t,e){var r=t[0],n=t[1],i=t[2],o=t.slice(3);if(!Array.isArray(n)||0===n.length)return e.error("Expected an interpolation type expression.",1);if("linear"===n[0])n={name:"linear"};else if("exponential"===n[0]){var a=n[1];if("number"!=typeof a)return e.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:a}}else{if("cubic-bezier"!==n[0])return e.error("Unknown interpolation type "+String(n[0]),1,0);var s=n.slice(1);if(4!==s.length||s.some(function(t){return"number"!=typeof t||t<0||t>1}))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(i=e.parse(i,2,St)))return null;var l=[],u=null;"interpolate-hcl"===r||"interpolate-lab"===r?u=It:e.expectedType&&"value"!==e.expectedType.kind&&(u=e.expectedType);for(var c=0;c<o.length;c+=2){var p=o[c],h=o[c+1],f=c+3,d=c+4;if("number"!=typeof p)return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',f);if(l.length&&l[l.length-1][0]>=p)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var m=e.parse(h,d,u);if(!m)return null;u=u||m.type,l.push([p,m])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new De(u,r,n,i,l):e.error("Type "+Lt(u)+" is not interpolatable.")},De.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;if(n>=e[i-1])return r[i-1].evaluate(t);var o=se(e,n),a=e[o],s=e[o+1],l=De.interpolationFactor(this.interpolation,n,a,s),u=r[o].evaluate(t),c=r[o+1].evaluate(t);return"interpolate"===this.operator?ce[this.type.kind.toLowerCase()](u,c,l):"interpolate-hcl"===this.operator?Ae.reverse(Ae.interpolate(Ae.forward(u),Ae.forward(c),l)):Ce.reverse(Ce.interpolate(Ce.forward(u),Ce.forward(c),l))},De.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1)t(r[e])},De.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()}))},De.prototype.serialize=function(){var t;t="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var e=[this.operator,t,this.input.serialize()],r=0;r<this.labels.length;r++)e.push(this.labels[r],this.outputs[r].serialize());return e};var Me=function(t,e){this.type=t,this.args=e};Me.parse=function(t,e){if(t.length<2)return e.error("Expectected at least one argument.");var r=null,n=e.expectedType;n&&"value"!==n.kind&&(r=n);for(var i=[],o=0,a=t.slice(1);o<a.length;o+=1){var s=a[o],l=e.parse(s,1+i.length,r,void 0,{typeAnnotation:"omit"});if(!l)return null;r=r||l.type,i.push(l)}var u=n&&i.some(function(t){return Rt(n,t.type)});return new Me(u?kt:r,i)},Me.prototype.evaluate=function(t){for(var e=null,r=0,n=this.args;r<n.length&&null===(e=n[r].evaluate(t));r+=1);return e},Me.prototype.eachChild=function(t){this.args.forEach(t)},Me.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}))},Me.prototype.serialize=function(){var t=["coalesce"];return this.eachChild(function(e){t.push(e.serialize())}),t};var Pe=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};Pe.prototype.evaluate=function(t){return this.result.evaluate(t)},Pe.prototype.eachChild=function(t){for(var e=0,r=this.bindings;e<r.length;e+=1)t(r[e][1]);t(this.result)},Pe.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found "+(t.length-1)+" instead.");for(var r=[],n=1;n<t.length-1;n+=2){var i=t[n];if("string"!=typeof i)return e.error("Expected string, but found "+typeof i+" instead.",n);if(/[^a-zA-Z0-9_]/.test(i))return e.error("Variable names must contain only alphanumeric characters or '_'.",n);var o=e.parse(t[n+1],n+1);if(!o)return null;r.push([i,o])}var a=e.parse(t[t.length-1],t.length-1,e.expectedType,r);return a?new Pe(r,a):null},Pe.prototype.possibleOutputs=function(){return this.result.possibleOutputs()},Pe.prototype.serialize=function(){for(var t=["let"],e=0,r=this.bindings;e<r.length;e+=1){var n=r[e],i=n[0],o=n[1];t.push(i,o.serialize())}return t.push(this.result.serialize()),t};var ze=function(t,e,r){this.type=t,this.index=e,this.input=r};ze.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,St),n=e.parse(t[2],2,zt(e.expectedType||kt));if(!r||!n)return null;var i=n.type;return new ze(i.itemType,r,n)},ze.prototype.evaluate=function(t){var e=this.index.evaluate(t),r=this.input.evaluate(t);if(e<0)throw new Wt("Array index out of bounds: "+e+" < 0.");if(e>=r.length)throw new Wt("Array index out of bounds: "+e+" > "+(r.length-1)+".");if(e!==Math.floor(e))throw new Wt("Array index must be an integer, but found "+e+" instead.");return r[e]},ze.prototype.eachChild=function(t){t(this.index),t(this.input)},ze.prototype.possibleOutputs=function(){return[void 0]},ze.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Le=function(t,e,r,n,i,o){this.inputType=t,this.type=e,this.input=r,this.cases=n,this.outputs=i,this.otherwise=o};Le.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return e.error("Expected an even number of arguments.");var r,n;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);for(var i={},o=[],a=2;a<t.length-1;a+=2){var s=t[a],l=t[a+1];Array.isArray(s)||(s=[s]);var u=e.concat(a);if(0===s.length)return u.error("Expected at least one branch label.");for(var c=0,p=s;c<p.length;c+=1){var h=p[c];if("number"!=typeof h&&"string"!=typeof h)return u.error("Branch labels must be numbers or strings.");if("number"==typeof h&&Math.abs(h)>Number.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof h&&Math.floor(h)!==h)return u.error("Numeric branch labels must be integer values.");if(r){if(u.checkSubtype(r,qt(h)))return null}else r=qt(h);if(void 0!==i[String(h)])return u.error("Branch labels must be unique.");i[String(h)]=o.length}var f=e.parse(l,a,n);if(!f)return null;n=n||f.type,o.push(f)}var d=e.parse(t[1],1,kt);if(!d)return null;var m=e.parse(t[t.length-1],t.length-1,n);return m?"value"!==d.type.kind&&e.concat(1).checkSubtype(r,d.type)?null:new Le(r,n,d,i,o,m):null},Le.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(qt(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},Le.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},Le.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()})).concat(this.otherwise.possibleOutputs())},Le.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],r=[],n={},i=0,o=Object.keys(this.cases).sort();i<o.length;i+=1){var a=o[i];void 0===(p=n[this.cases[a]])?(n[this.cases[a]]=r.length,r.push([this.cases[a],[a]])):r[p][1].push(a)}for(var s=function(e){return"number"===t.inputType.kind?Number(e):e},l=0,u=r;l<u.length;l+=1){var c=u[l],p=c[0],h=c[1];1===h.length?e.push(s(h[0])):e.push(h.map(s)),e.push(this.outputs[outputIndex$1].serialize())}return e.push(this.otherwise.serialize()),e};var Oe=function(t,e,r){this.type=t,this.branches=e,this.otherwise=r};function Re(t,e){return"=="===t||"!="===t?"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind:"string"===e.kind||"number"===e.kind||"value"===e.kind}function Be(t,e,r,n){return 0===n.compare(e,r)}function Fe(t,e,r){var n="=="!==t&&"!="!==t;return function(){function i(t,e,r){this.type=At,this.lhs=t,this.rhs=e,this.collator=r,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}return i.parse=function(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");var r=t[0],o=e.parse(t[1],1,kt);if(!o)return null;if(!Re(r,o.type))return e.concat(1).error('"'+r+"\" comparisons are not supported for type '"+Lt(o.type)+"'.");var a=e.parse(t[2],2,kt);if(!a)return null;if(!Re(r,a.type))return e.concat(2).error('"'+r+"\" comparisons are not supported for type '"+Lt(a.type)+"'.");if(o.type.kind!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error("Cannot compare types '"+Lt(o.type)+"' and '"+Lt(a.type)+"'.");n&&("value"===o.type.kind&&"value"!==a.type.kind?o=new Xt(a.type,[o]):"value"!==o.type.kind&&"value"===a.type.kind&&(a=new Xt(o.type,[a])));var s=null;if(4===t.length){if("string"!==o.type.kind&&"string"!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error("Cannot use collator to compare non-string types.");if(!(s=e.parse(t[3],3,Mt)))return null}return new i(o,a,s)},i.prototype.evaluate=function(i){var o=this.lhs.evaluate(i),a=this.rhs.evaluate(i);if(n&&this.hasUntypedArgument){var s=qt(o),l=qt(a);if(s.kind!==l.kind||"string"!==s.kind&&"number"!==s.kind)throw new Wt('Expected arguments for "'+t+'" to be (string, string) or (number, number), but found ('+s.kind+", "+l.kind+") instead.")}if(this.collator&&!n&&this.hasUntypedArgument){var u=qt(o),c=qt(a);if("string"!==u.kind||"string"!==c.kind)return e(i,o,a)}return this.collator?r(i,o,a,this.collator.evaluate(i)):e(i,o,a)},i.prototype.eachChild=function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)},i.prototype.possibleOutputs=function(){return[!0,!1]},i.prototype.serialize=function(){var e=[t];return this.eachChild(function(t){e.push(t.serialize())}),e},i}()}Oe.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found only "+(t.length-1)+".");if(t.length%2!=0)return e.error("Expected an odd number of arguments.");var r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);for(var n=[],i=1;i<t.length-1;i+=2){var o=e.parse(t[i],i,At);if(!o)return null;var a=e.parse(t[i+1],i+1,r);if(!a)return null;n.push([o,a]),r=r||a.type}var s=e.parse(t[t.length-1],t.length-1,r);return s?new Oe(r,n,s):null},Oe.prototype.evaluate=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var n=r[e],i=n[0],o=n[1];if(i.evaluate(t))return o.evaluate(t)}return this.otherwise.evaluate(t)},Oe.prototype.eachChild=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var n=r[e],i=n[0],o=n[1];t(i),t(o)}t(this.otherwise)},Oe.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.branches.map(function(t){return t[0],t[1].possibleOutputs()})).concat(this.otherwise.possibleOutputs())},Oe.prototype.serialize=function(){var t=["case"];return this.eachChild(function(e){t.push(e.serialize())}),t};var Ne=Fe("==",function(t,e,r){return e===r},Be),Ue=Fe("!=",function(t,e,r){return e!==r},function(t,e,r,n){return!Be(0,e,r,n)}),Ve=Fe("<",function(t,e,r){return e<r},function(t,e,r,n){return n.compare(e,r)<0}),je=Fe(">",function(t,e,r){return e>r},function(t,e,r,n){return n.compare(e,r)>0}),qe=Fe("<=",function(t,e,r){return e<=r},function(t,e,r,n){return n.compare(e,r)<=0}),He=Fe(">=",function(t,e,r){return e>=r},function(t,e,r,n){return n.compare(e,r)>=0}),Ge=function(t,e,r,n,i){this.type=Ct,this.number=t,this.locale=e,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i};Ge.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var r=e.parse(t[1],1,St);if(!r)return null;var n=t[2];if("object"!=typeof n||Array.isArray(n))return e.error("NumberFormat options argument must be an object.");var i=null;if(n.locale&&!(i=e.parse(n.locale,1,Ct)))return null;var o=null;if(n.currency&&!(o=e.parse(n.currency,1,Ct)))return null;var a=null;if(n["min-fraction-digits"]&&!(a=e.parse(n["min-fraction-digits"],1,St)))return null;var s=null;return n["max-fraction-digits"]&&!(s=e.parse(n["max-fraction-digits"],1,St))?null:new Ge(r,i,o,a,s)},Ge.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},Ge.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},Ge.prototype.possibleOutputs=function(){return[void 0]},Ge.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]};var We=function(t){this.type=St,this.input=t};We.parse=function(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?e.error("Expected argument of type string or array, but found "+Lt(r.type)+" instead."):new We(r):null},We.prototype.evaluate=function(t){var e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new Wt("Expected value to be of type string or array, but found "+Lt(qt(e))+" instead.")},We.prototype.eachChild=function(t){t(this.input)},We.prototype.possibleOutputs=function(){return[void 0]},We.prototype.serialize=function(){var t=["length"];return this.eachChild(function(e){t.push(e.serialize())}),t};var Ze={"==":Ne,"!=":Ue,">":je,"<":Ve,">=":He,"<=":qe,array:Xt,at:ze,boolean:Xt,case:Oe,coalesce:Me,collator:ee,format:Yt,interpolate:De,"interpolate-hcl":De,"
65interpolate-lab":De,length:We,let:Pe,literal:Gt,match:Le,number:Xt,"number-format":Ge,object:Xt,step:le,string:Xt,"to-boolean":Jt,"to-color":Jt,"to-number":Jt,"to-string":Jt,var:oe};function Xe(t,e){var r=e[0],n=e[1],i=e[2],o=e[3];r=r.evaluate(t),n=n.evaluate(t),i=i.evaluate(t);var a=o?o.evaluate(t):1,s=jt(r,n,i,a);if(s)throw new Wt(s);return new Ft(r/255*a,n/255*a,i/255*a,a)}function Ye(t,e){return t in e}function Ke(t,e){var r=e[t];return void 0===r?null:r}function Je(t){return{type:t}}function Qe(t){return{result:"success",value:t}}function $e(t){return{result:"error",value:t}}function tr(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function er(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function rr(t){return!!t.expression&&t.expression.interpolated}function nr(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function ir(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function or(t){return t}function ar(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function sr(t,e,r,n,i){return ar(typeof r===i?n[r]:void 0,t.default,e.default)}function lr(t,e,r){if("number"!==nr(r))return ar(t.default,e.default);var n=t.stops.length;if(1===n)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[n-1][0])return t.stops[n-1][1];var i=pr(t.stops,r);return t.stops[i][1]}function ur(t,e,r){var n=void 0!==t.base?t.base:1;if("number"!==nr(r))return ar(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];var o=pr(t.stops,r),a=function(t,e,r,n){var i=n-r,o=t-r;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}(r,n,t.stops[o][0],t.stops[o+1][0]),s=t.stops[o][1],l=t.stops[o+1][1],u=ce[e.type]||or;if(t.colorSpace&&"rgb"!==t.colorSpace){var c=Ie[t.colorSpace];u=function(t,e){return c.reverse(c.interpolate(c.forward(t),c.forward(e),a))}}return"function"==typeof s.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r=s.evaluate.apply(void 0,t),n=l.evaluate.apply(void 0,t);if(void 0!==r&&void 0!==n)return u(r,n,a)}}:u(s,l,a)}function cr(t,e,r){return"color"===e.type?r=Ft.parse(r):"formatted"===e.type?r=Vt.fromString(r.toString()):nr(r)===e.type||"enum"===e.type&&e.values[r]||(r=void 0),ar(r,t.default,e.default)}function pr(t,e){for(var r,n,i=0,o=t.length-1,a=0;i<=o;){if(r=t[a=Math.floor((i+o)/2)][0],n=t[a+1][0],e===r||e>r&&e<n)return a;r<e?i=a+1:r>e&&(o=a-1)}return Math.max(a-1,0)}te.register(Ze,{error:[{kind:"error"},[Ct],function(t,e){var r=e[0];throw new Wt(r.evaluate(t))}],typeof:[Ct,[kt],function(t,e){return Lt(qt(e[0].evaluate(t)))}],"to-rgba":[zt(St,4),[It],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[It,[St,St,St],Xe],rgba:[It,[St,St,St,St],Xe],has:{type:At,overloads:[[[Ct],function(t,e){return Ye(e[0].evaluate(t),t.properties())}],[[Ct,Dt],function(t,e){var r=e[0],n=e[1];return Ye(r.evaluate(t),n.evaluate(t))}]]},get:{type:kt,overloads:[[[Ct],function(t,e){return Ke(e[0].evaluate(t),t.properties())}],[[Ct,Dt],function(t,e){var r=e[0],n=e[1];return Ke(r.evaluate(t),n.evaluate(t))}]]},"feature-state":[kt,[Ct],function(t,e){return Ke(e[0].evaluate(t),t.featureState||{})}],properties:[Dt,[],function(t){return t.properties()}],"geometry-type":[Ct,[],function(t){return t.geometryType()}],id:[kt,[],function(t){return t.id()}],zoom:[St,[],function(t){return t.globals.zoom}],"heatmap-density":[St,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[St,[],function(t){return t.globals.lineProgress||0}],accumulated:[kt,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[St,Je(St),function(t,e){for(var r=0,n=0,i=e;n<i.length;n+=1)r+=i[n].evaluate(t);return r}],"*":[St,Je(St),function(t,e){for(var r=1,n=0,i=e;n<i.length;n+=1)r*=i[n].evaluate(t);return r}],"-":{type:St,overloads:[[[St,St],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)-n.evaluate(t)}],[[St],function(t,e){return-e[0].evaluate(t)}]]},"/":[St,[St,St],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)/n.evaluate(t)}],"%":[St,[St,St],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)%n.evaluate(t)}],ln2:[St,[],function(){return Math.LN2}],pi:[St,[],function(){return Math.PI}],e:[St,[],function(){return Math.E}],"^":[St,[St,St],function(t,e){var r=e[0],n=e[1];return Math.pow(r.evaluate(t),n.evaluate(t))}],sqrt:[St,[St],function(t,e){var r=e[0];return Math.sqrt(r.evaluate(t))}],log10:[St,[St],function(t,e){var r=e[0];return Math.log(r.evaluate(t))/Math.LN10}],ln:[St,[St],function(t,e){var r=e[0];return Math.log(r.evaluate(t))}],log2:[St,[St],function(t,e){var r=e[0];return Math.log(r.evaluate(t))/Math.LN2}],sin:[St,[St],function(t,e){var r=e[0];return Math.sin(r.evaluate(t))}],cos:[St,[St],function(t,e){var r=e[0];return Math.cos(r.evaluate(t))}],tan:[St,[St],function(t,e){var r=e[0];return Math.tan(r.evaluate(t))}],asin:[St,[St],function(t,e){var r=e[0];return Math.asin(r.evaluate(t))}],acos:[St,[St],function(t,e){var r=e[0];return Math.acos(r.evaluate(t))}],atan:[St,[St],function(t,e){var r=e[0];return Math.atan(r.evaluate(t))}],min:[St,Je(St),function(t,e){return Math.min.apply(Math,e.map(function(e){return e.evaluate(t)}))}],max:[St,Je(St),function(t,e){return Math.max.apply(Math,e.map(function(e){return e.evaluate(t)}))}],abs:[St,[St],function(t,e){var r=e[0];return Math.abs(r.evaluate(t))}],round:[St,[St],function(t,e){var r=e[0].evaluate(t);return r<0?-Math.round(-r):Math.round(r)}],floor:[St,[St],function(t,e){var r=e[0];return Math.floor(r.evaluate(t))}],ceil:[St,[St],function(t,e){var r=e[0];return Math.ceil(r.evaluate(t))}],"filter-==":[At,[Ct,kt],function(t,e){var r=e[0],n=e[1];return t.properties()[r.value]===n.value}],"filter-id-==":[At,[kt],function(t,e){var r=e[0];return t.id()===r.value}],"filter-type-==":[At,[Ct],function(t,e){var r=e[0];return t.geometryType()===r.value}],"filter-<":[At,[Ct,kt],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],o=n.value;return typeof i==typeof o&&i<o}],"filter-id-<":[At,[kt],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<i}],"filter->":[At,[Ct,kt],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],o=n.value;return typeof i==typeof o&&i>o}],"filter-id->":[At,[kt],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>i}],"filter-<=":[At,[Ct,kt],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],o=n.value;return typeof i==typeof o&&i<=o}],"filter-id-<=":[At,[kt],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<=i}],"filter->=":[At,[Ct,kt],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],o=n.value;return typeof i==typeof o&&i>=o}],"filter-id->=":[At,[kt],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>=i}],"filter-has":[At,[kt],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[At,[],function(t){return null!==t.id()}],"filter-type-in":[At,[zt(Ct)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[At,[zt(kt)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[At,[Ct,zt(kt)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[At,[Ct,zt(kt)],function(t,e){var r=e[0],n=e[1];return function(t,e,r,n){for(;r<=n;){var i=r+n>>1;if(e[i]===t)return!0;e[i]>t?n=i-1:r=i+1}return!1}(t.properties()[r.value],n.value,0,n.value.length-1)}],all:{type:At,overloads:[[[At,At],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)&&n.evaluate(t)}],[Je(At),function(t,e){for(var r=0,n=e;r<n.length;r+=1)if(!n[r].evaluate(t))return!1;return!0}]]},any:{type:At,overloads:[[[At,At],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)||n.evaluate(t)}],[Je(At),function(t,e){for(var r=0,n=e;r<n.length;r+=1)if(n[r].evaluate(t))return!0;return!1}]]},"!":[At,[At],function(t,e){return!e[0].evaluate(t)}],"is-supported-script":[At,[Ct],function(t,e){var r=e[0],n=t.globals&&t.globals.isSupportedScript;return!n||n(r.evaluate(t))}],upcase:[Ct,[Ct],function(t,e){return e[0].evaluate(t).toUpperCase()}],downcase:[Ct,[Ct],function(t,e){return e[0].evaluate(t).toLowerCase()}],concat:[Ct,Je(kt),function(t,e){return e.map(function(e){return Ht(e.evaluate(t))}).join("")}],"resolved-locale":[Ct,[Mt],function(t,e){return e[0].evaluate(t).resolvedLocale()}]});var hr=function(t,e){var r;this.expression=t,this._warningHistory={},this._evaluator=new $t,this._defaultValue=e?"color"===(r=e).type&&ir(r.default)?new Ft(0,0,0,0):"color"===r.type?Ft.parse(r.default)||null:void 0===r.default?null:r.default:null,this._enumValues=e&&"enum"===e.type?e.values:null};function fr(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in Ze}function dr(t,e){var r=new ae(Ze,[],e?function(t){var e={color:It,string:Ct,number:St,enum:Ct,boolean:At,formatted:Pt};return"array"===t.type?zt(e[t.value]||kt,t.length):e[t.type]}(e):void 0),n=r.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return n?Qe(new hr(n,e)):$e(r.errors)}hr.prototype.evaluateWithoutErrorHandling=function(t,e,r){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this.expression.evaluate(this._evaluator)},hr.prototype.evaluate=function(t,e,r){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null;try{var n=this.expression.evaluate(this._evaluator);if(null==n)return this._defaultValue;if(this._enumValues&&!(n in this._enumValues))throw new Wt("Expected value to be one of "+Object.keys(this._enumValues).map(function(t){return JSON.stringify(t)}).join(", ")+", but found "+JSON.stringify(n)+" instead.");return n}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0),this._defaultValue}};var mr=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!ne(e.expression)};mr.prototype.evaluateWithoutErrorHandling=function(t,e,r){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r)},mr.prototype.evaluate=function(t,e,r){return this._styleExpression.evaluate(t,e,r)};var gr=function(t,e,r){this.kind=t,this.zoomStops=r.labels,this._styleExpression=e,this.isStateDependent="camera"!==t&&!ne(e.expression),r instanceof De&&(this._interpolationType=r.interpolation)};function yr(t,e){if("error"===(t=dr(t,e)).result)return t;var r=t.value.expression,n=re(r);if(!n&&!tr(e))return $e([new wt("","data expressions not supported")]);var i=ie(r,["zoom"]);if(!i&&!er(e))return $e([new wt("","zoom expressions not supported")]);var o=function t(e){var r=null;if(e instanceof Pe)r=t(e.result);else if(e instanceof Me)for(var n=0,i=e.args;n<i.length;n+=1){var o=i[n];if(r=t(o))break}else(e instanceof le||e instanceof De)&&e.input instanceof te&&"zoom"===e.input.name&&(r=e);return r instanceof wt?r:(e.eachChild(function(e){var n=t(e);n instanceof wt?r=n:!r&&n?r=new wt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):r&&n&&r!==n&&(r=new wt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),r)}(r);return o||i?o instanceof wt?$e([o]):o instanceof De&&!rr(e)?$e([new wt("",'"interpolate" expressions cannot be used with this property')]):Qe(o?new gr(n?"camera":"composite",t.value,o):new mr(n?"constant":"source",t.value)):$e([new wt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}gr.prototype.evaluateWithoutErrorHandling=function(t,e,r){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r)},gr.prototype.evaluate=function(t,e,r){return this._styleExpression.evaluate(t,e,r)},gr.prototype.interpolationFactor=function(t,e,r){return this._interpolationType?De.interpolationFactor(this._interpolationType,t,e,r):0};var vr=function(t,e){this._parameters=t,this._specification=e,_t(this,function t(e,r){var n,i,o,a="color"===r.type,s=e.stops&&"object"==typeof e.stops[0][0],l=s||void 0!==e.property,u=s||!l,c=e.type||(rr(r)?"exponential":"interval");
vendor: 8,371 bytes, line 65
65if(a&&((e=_t({},e)).stops&&(e.stops=e.stops.map(function(t){return[t[0],Ft.parse(t[1])]})),e.default?e.default=Ft.parse(e.default):e.default=Ft.parse(r.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!Ie[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);if("exponential"===c)n=ur;else if("interval"===c)n=lr;else if("categorical"===c){n=sr,i=Object.create(null);for(var p=0,h=e.stops;p<h.length;p+=1){var f=h[p];i[f[0]]=f[1]}o=typeof e.stops[0][0]}else{if("identity"!==c)throw new Error('Unknown function type "'+c+'"');n=cr}if(s){for(var d={},m=[],g=0;g<e.stops.length;g++){var y=e.stops[g],v=y[0].zoom;void 0===d[v]&&(d[v]={zoom:v,type:e.type,property:e.property,default:e.default,stops:[]},m.push(v)),d[v].stops.push([y[0].value,y[1]])}for(var _=[],x=0,b=m;x<b.length;x+=1){var w=b[x];_.push([d[w].zoom,t(d[w],r)])}return{kind:"composite",interpolationFactor:De.interpolationFactor.bind(void 0,{name:"linear"}),zoomStops:_.map(function(t){return t[0]}),evaluate:function(t,n){var i=t.zoom;return ur({stops:_,base:e.base},r,i).evaluate(i,n)}}}return u?{kind:"camera",interpolationFactor:"exponential"===c?De.interpolationFactor.bind(void 0,{name:"exponential",base:void 0!==e.base?e.base:1}):function(){return 0},zoomStops:e.stops.map(function(t){return t[0]}),evaluate:function(t){var a=t.zoom;return n(e,r,a,i,o)}}:{kind:"source",evaluate:function(t,a){var s=a&&a.properties?a.properties[e.property]:void 0;return void 0===s?ar(e.default,r.default):n(e,r,s,i,o)}}}(this._parameters,this._specification))};function _r(t,e){if(ir(t))return new vr(t,e);if(fr(t)){var r=yr(t,e);if("error"===r.result)throw new Error(r.value.map(function(t){return t.key+": "+t.message}).join(", "));return r.value}var n=t;return"string"==typeof t&&"color"===e.type&&(n=Ft.parse(t)),{kind:"constant",evaluate:function(){return n}}}function xr(t){var e=t.key,r=t.value,n=t.valueSpec||{},i=t.objectElementValidators||{},o=t.style,a=t.styleSpec,s=[],l=nr(r);if("object"!==l)return[new yt(e,r,"object expected, "+l+" found")];for(var u in r){var c=u.split(".")[0],p=n[c]||n["*"],h=void 0;if(i[c])h=i[c];else if(n[c])h=Hr;else if(i["*"])h=i["*"];else{if(!n["*"]){s.push(new yt(e,r[u],'unknown property "'+u+'"'));continue}h=Hr}s=s.concat(h({key:(e?e+".":e)+u,value:r[u],valueSpec:p,style:o,styleSpec:a,object:r,objectKey:u},r))}for(var f in n)i[f]||n[f].required&&void 0===n[f].default&&void 0===r[f]&&s.push(new yt(e,r,'missing required property "'+f+'"'));return s}function br(t){var e=t.value,r=t.valueSpec,n=t.style,i=t.styleSpec,o=t.key,a=t.arrayElementValidator||Hr;if("array"!==nr(e))return[new yt(o,e,"array expected, "+nr(e)+" found")];if(r.length&&e.length!==r.length)return[new yt(o,e,"array length "+r.length+" expected, length "+e.length+" found")];if(r["min-length"]&&e.length<r["min-length"])return[new yt(o,e,"array length at least "+r["min-length"]+" expected, length "+e.length+" found")];var s={type:r.value};i.$version<7&&(s.function=r.function),"object"===nr(r.value)&&(s=r.value);for(var l=[],u=0;u<e.length;u++)l=l.concat(a({array:e,arrayIndex:u,value:e[u],valueSpec:s,style:n,styleSpec:i,key:o+"["+u+"]"}));return l}function wr(t){var e=t.key,r=t.value,n=t.valueSpec,i=nr(r);return"number"!==i?[new yt(e,r,"number expected, "+i+" found")]:"minimum"in n&&r<n.minimum?[new yt(e,r,r+" is less than the minimum value "+n.minimum)]:"maximum"in n&&r>n.maximum?[new yt(e,r,r+" is greater than the maximum value "+n.maximum)]:[]}function Er(t){var e,r,n,i=t.valueSpec,o=xt(t.value.type),a={},s="categorical"!==o&&void 0===t.value.property,l=!s,u="array"===nr(t.value.stops)&&"array"===nr(t.value.stops[0])&&"object"===nr(t.value.stops[0][0]),c=xr({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===o)return[new yt(t.key,t.value,'identity function may not have a "stops" property')];var e=[],r=t.value;return e=e.concat(br({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:p})),"array"===nr(r)&&0===r.length&&e.push(new yt(t.key,r,"array must have at least one stop")),e},default:function(t){return Hr({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===o&&s&&c.push(new yt(t.key,t.value,'missing required property "property"')),"identity"===o||t.value.stops||c.push(new yt(t.key,t.value,'missing required property "stops"')),"exponential"===o&&t.valueSpec.expression&&!rr(t.valueSpec)&&c.push(new yt(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!tr(t.valueSpec)?c.push(new yt(t.key,t.value,"property functions not supported")):s&&!er(t.valueSpec)&&c.push(new yt(t.key,t.value,"zoom functions not supported"))),"categorical"!==o&&!u||void 0!==t.value.property||c.push(new yt(t.key,t.value,'"property" property is required')),c;function p(t){var e=[],o=t.value,s=t.key;if("array"!==nr(o))return[new yt(s,o,"array expected, "+nr(o)+" found")];if(2!==o.length)return[new yt(s,o,"array length 2 expected, length "+o.length+" found")];if(u){if("object"!==nr(o[0]))return[new yt(s,o,"object expected, "+nr(o[0])+" found")];if(void 0===o[0].zoom)return[new yt(s,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new yt(s,o,"object stop key must have value")];if(n&&n>xt(o[0].zoom))return[new yt(s,o[0].zoom,"stop zoom values must appear in ascending order")];xt(o[0].zoom)!==n&&(n=xt(o[0].zoom),r=void 0,a={}),e=e.concat(xr({key:s+"[0]",value:o[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:wr,value:h}}))}else e=e.concat(h({key:s+"[0]",value:o[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},o));return fr(bt(o[1]))?e.concat([new yt(s+"[1]",o[1],"expressions are not allowed in function stops.")]):e.concat(Hr({key:s+"[1]",value:o[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function h(t,n){var s=nr(t.value),l=xt(t.value),u=null!==t.value?t.value:n;if(e){if(s!==e)return[new yt(t.key,u,s+" stop domain type must match previous stop domain type "+e)]}else e=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new yt(t.key,u,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==o){var c="number expected, "+s+" found";return tr(i)&&void 0===o&&(c+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new yt(t.key,u,c)]}return"categorical"!==o||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==o&&"number"===s&&void 0!==r&&l<r?[new yt(t.key,u,"stop domain values must appear in ascending order")]:(r=l,"categorical"===o&&l in a?[new yt(t.key,u,"stop domain values must be unique")]:(a[l]=!0,[])):[new yt(t.key,u,"integer expected, found "+l)]}}function Tr(t){var e=("property"===t.expressionContext?yr:dr)(bt(t.value),t.valueSpec);if("error"===e.result)return e.value.map(function(e){return new yt(""+t.key+e.key,t.value,e.message)});var r=e.value.expression||e.value._styleExpression.expression;if("property"===t.expressionContext&&"text-font"===t.propertyKey&&-1!==r.possibleOutputs().indexOf(void 0))return[new yt(t.key,t.value,'Invalid data expression for "'+t.propertyKey+'". Output values must be contained as literals within the expression.')];if("property"===t.expressionContext&&"layout"===t.propertyType&&!ne(r))return[new yt(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===t.expressionContext&&!ne(r))return[new yt(t.key,t.value,'"feature-state" data expressions are not supported with filters.')];if(t.expressionContext&&0===t.expressionContext.indexOf("cluster")){if(!ie(r,["zoom","feature-state"]))return[new yt(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===t.expressionContext&&!re(r))return[new yt(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Sr(t){var e=t.key,r=t.value,n=t.valueSpec,i=[];return Array.isArray(n.values)?-1===n.values.indexOf(xt(r))&&i.push(new yt(e,r,"expected one of ["+n.values.join(", ")+"], "+JSON.stringify(r)+" found")):-1===Object.keys(n.values).indexOf(xt(r))&&i.push(new yt(e,r,"expected one of ["+Object.keys(n.values).join(", ")+"], "+JSON.stringify(r)+" found")),i}function Cr(t){if(!0===t||!1===t)return!0;
vendor: 5,053 bytes, line 65
65if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(var e=0,r=t.slice(1);e<r.length;e+=1){var n=r[e];if(!Cr(n)&&"boolean"!=typeof n)return!1}return!0;default:return!0}}vr.deserialize=function(t){return new vr(t._parameters,t._specification)},vr.serialize=function(t){return{_parameters:t._parameters,_specification:t._specification}};var Ar={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Ir(t){if(null==t)return function(){return!0};Cr(t)||(t=kr(t));var e=dr(t,Ar);if("error"===e.result)throw new Error(e.value.map(function(t){return t.key+": "+t.message}).join(", "));return function(t,r){return e.value.evaluate(t,r)}}function Dr(t,e){return t<e?-1:t>e?1:0}function kr(t){if(!t)return!0;var e,r=t[0];return t.length<=1?"any"!==r:"=="===r?Mr(t[1],t[2],"=="):"!="===r?Lr(Mr(t[1],t[2],"==")):"<"===r||">"===r||"<="===r||">="===r?Mr(t[1],t[2],r):"any"===r?(e=t.slice(1),["any"].concat(e.map(kr))):"all"===r?["all"].concat(t.slice(1).map(kr)):"none"===r?["all"].concat(t.slice(1).map(kr).map(Lr)):"in"===r?Pr(t[1],t.slice(2)):"!in"===r?Lr(Pr(t[1],t.slice(2))):"has"===r?zr(t[1]):"!has"!==r||Lr(zr(t[1]))}function Mr(t,e,r){switch(t){case"$type":return["filter-type-"+r,e];case"$id":return["filter-id-"+r,e];default:return["filter-"+r,t,e]}}function Pr(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(function(t){return typeof t!=typeof e[0]})?["filter-in-large",t,["literal",e.sort(Dr)]]:["filter-in-small",t,["literal",e]]}}function zr(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function Lr(t){return["!",t]}function Or(t){return Cr(bt(t.value))?Tr(_t({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var r=e.value,n=e.key;if("array"!==nr(r))return[new yt(n,r,"array expected, "+nr(r)+" found")];var i,o=e.styleSpec,a=[];if(r.length<1)return[new yt(n,r,"filter array must have at least 1 element")];switch(a=a.concat(Sr({key:n+"[0]",value:r[0],valueSpec:o.filter_operator,style:e.style,styleSpec:e.styleSpec})),xt(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&"$type"===xt(r[1])&&a.push(new yt(n,r,'"$type" cannot be use with operator "'+r[0]+'"'));case"==":case"!=":3!==r.length&&a.push(new yt(n,r,'filter array for operator "'+r[0]+'" must have 3 elements'));case"in":case"!in":r.length>=2&&"string"!==(i=nr(r[1]))&&a.push(new yt(n+"[1]",r[1],"string expected, "+i+" found"));for(var s=2;s<r.length;s++)i=nr(r[s]),"$type"===xt(r[1])?a=a.concat(Sr({key:n+"["+s+"]",value:r[s],valueSpec:o.geometry_type,style:e.style,styleSpec:e.styleSpec})):"string"!==i&&"number"!==i&&"boolean"!==i&&a.push(new yt(n+"["+s+"]",r[s],"string, number, or boolean expected, "+i+" found"));break;case"any":case"all":case"none":for(var l=1;l<r.length;l++)a=a.concat(t({key:n+"["+l+"]",value:r[l],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":i=nr(r[1]),2!==r.length?a.push(new yt(n,r,'filter array for "'+r[0]+'" operator must have 2 elements')):"string"!==i&&a.push(new yt(n+"[1]",r[1],"string expected, "+i+" found"))}return a}(t)}function Rr(t,e){var r=t.key,n=t.style,i=t.styleSpec,o=t.value,a=t.objectKey,s=i[e+"_"+t.layerType];if(!s)return[];var l=a.match(/^(.*)-transition$/);if("paint"===e&&l&&s[l[1]]&&s[l[1]].transition)return Hr({key:r,value:o,valueSpec:i.transition,style:n,styleSpec:i});var u,c=t.valueSpec||s[a];if(!c)return[new yt(r,o,'unknown property "'+a+'"')];if("string"===nr(o)&&tr(c)&&!c.tokens&&(u=/^{([^}]+)}$/.exec(o)))return[new yt(r,o,'"'+a+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(u[1])+" }`.")];var p=[];return"symbol"===t.layerType&&("text-field"===a&&n&&!n.glyphs&&p.push(new yt(r,o,'use of "text-field" requires a style "glyphs" property')),"text-font"===a&&ir(bt(o))&&"identity"===xt(o.type)&&p.push(new yt(r,o,'"text-font" does not support identity functions'))),p.concat(Hr({key:t.key,value:o,valueSpec:c,style:n,styleSpec:i,expressionContext:"property",propertyType:e,propertyKey:a}))}function Br(t){return Rr(t,"paint")}function Fr(t){return Rr(t,"layout")}function Nr(t){var e=[],r=t.value,n=t.key,i=t.style,o=t.styleSpec;r.type||r.ref||e.push(new yt(n,r,'either "type" or "ref" is required'));var a,s=xt(r.type),l=xt(r.ref);if(r.id)for(var u=xt(r.id),c=0;c<t.arrayIndex;c++){var p=i.layers[c];xt(p.id)===u&&e.push(new yt(n,r.id,'duplicate layer id "'+r.id+'", previously used at line '+p.id.__line__))}if("ref"in r)["type","source","source-layer","filter","layout"].forEach(function(t){t in r&&e.push(new yt(n,r[t],'"'+t+'" is prohibited for ref layers'))}
vendor: 3,070 bytes, line 65
65),i.layers.forEach(function(t){xt(t.id)===l&&(a=t)}),a?a.ref?e.push(new yt(n,r.ref,"ref cannot reference another ref layer")):s=xt(a.type):e.push(new yt(n,r.ref,'ref layer "'+l+'" not found'));else if("background"!==s)if(r.source){var h=i.sources&&i.sources[r.source],f=h&&xt(h.type);h?"vector"===f&&"raster"===s?e.push(new yt(n,r.source,'layer "'+r.id+'" requires a raster source')):"raster"===f&&"raster"!==s?e.push(new yt(n,r.source,'layer "'+r.id+'" requires a vector source')):"vector"!==f||r["source-layer"]?"raster-dem"===f&&"hillshade"!==s?e.push(new yt(n,r.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==s||!r.paint||!r.paint["line-gradient"]||"geojson"===f&&h.lineMetrics||e.push(new yt(n,r,'layer "'+r.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):e.push(new yt(n,r,'layer "'+r.id+'" must specify a "source-layer"')):e.push(new yt(n,r.source,'source "'+r.source+'" not found'))}else e.push(new yt(n,r,'missing required property "source"'));return e=e.concat(xr({key:n,value:r,valueSpec:o.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return Hr({key:n+".type",value:r.type,valueSpec:o.layer.type,style:t.style,styleSpec:t.styleSpec,object:r,objectKey:"type"})},filter:Or,layout:function(t){return xr({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return Fr(_t({layerType:s},t))}}})},paint:function(t){return xr({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return Br(_t({layerType:s},t))}}})}}}))}function Ur(t){var e=t.value,r=t.key,n=t.styleSpec,i=t.style;if(!e.type)return[new yt(r,e,'"type" is required')];var o,a=xt(e.type);switch(a){case"vector":case"raster":case"raster-dem":if(o=xr({key:r,value:e,valueSpec:n["source_"+a.replace("-","_")],style:t.style,styleSpec:n}),"url"in e)for(var s in e)["type","url","tileSize"].indexOf(s)<0&&o.push(new yt(r+"."+s,e[s],'a source with a "url" property may not include a "'+s+'" property'));return o;case"geojson":if(o=xr({key:r,value:e,valueSpec:n.source_geojson,style:i,styleSpec:n}),e.cluster)for(var l in e.clusterProperties){var u=e.clusterProperties[l],c=u[0],p=u[1],h="string"==typeof c?[c,["accumulated"],["get",l]]:c;o.push.apply(o,Tr({key:r+"."+l+".map",value:p,expressionContext:"cluster-map"})),o.push.apply(o,Tr({key:r+"."+l+".reduce",value:h,expressionContext:"cluster-reduce"}))}return o;case"video":return xr({key:r,value:e,valueSpec:n.source_video,style:i,styleSpec:n});case"image":return xr({key:r,value:e,valueSpec:n.source_image,style:i,styleSpec:n});case"canvas":return[new yt(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Sr({key:r+".type",value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:i,styleSpec:n})}}function Vr(t){var e=t.value,r=t.styleSpec,n=r.light,i=t.style,o=[],a=nr(e);
vendor: 8,871 bytes, line 65
65if(void 0===e)return o;if("object"!==a)return o.concat([new yt("light",e,"object expected, "+a+" found")]);for(var s in e){var l=s.match(/^(.*)-transition$/);o=l&&n[l[1]]&&n[l[1]].transition?o.concat(Hr({key:s,value:e[s],valueSpec:r.transition,style:i,styleSpec:r})):n[s]?o.concat(Hr({key:s,value:e[s],valueSpec:n[s],style:i,styleSpec:r})):o.concat([new yt(s,e[s],'unknown property "'+s+'"')])}return o}function jr(t){var e=t.value,r=t.key,n=nr(e);return"string"!==n?[new yt(r,e,"string expected, "+n+" found")]:[]}var qr={"*":function(){return[]},array:br,boolean:function(t){var e=t.value,r=t.key,n=nr(e);return"boolean"!==n?[new yt(r,e,"boolean expected, "+n+" found")]:[]},number:wr,color:function(t){var e=t.key,r=t.value,n=nr(r);return"string"!==n?[new yt(e,r,"color expected, "+n+" found")]:null===Bt(r)?[new yt(e,r,'color expected, "'+r+'" found')]:[]},constants:vt,enum:Sr,filter:Or,function:Er,layer:Nr,object:xr,source:Ur,light:Vr,string:jr,formatted:function(t){return 0===jr(t).length?[]:Tr(t)}};function Hr(t){var e=t.value,r=t.valueSpec,n=t.styleSpec;return r.expression&&ir(xt(e))?Er(t):r.expression&&fr(bt(e))?Tr(t):r.type&&qr[r.type]?qr[r.type](t):xr(_t({},t,{valueSpec:r.type?n[r.type]:r}))}function Gr(t){var e=t.value,r=t.key,n=jr(t);return n.length?n:(-1===e.indexOf("{fontstack}")&&n.push(new yt(r,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&n.push(new yt(r,e,'"glyphs" url must include a "{range}" token')),n)}function Wr(t,e){e=e||gt;var r=[];return r=r.concat(Hr({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:Gr,"*":function(){return[]}}})),t.constants&&(r=r.concat(vt({key:"constants",value:t.constants,style:t,styleSpec:e}))),Zr(r)}function Zr(t){return[].concat(t).sort(function(t,e){return t.line-e.line})}function Xr(t){return function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return Zr(t.apply(this,e))}}Wr.source=Xr(Ur),Wr.light=Xr(Vr),Wr.layer=Xr(Nr),Wr.filter=Xr(Or),Wr.paintProperty=Xr(Br),Wr.layoutProperty=Xr(Fr);var Yr=Wr,Kr=Wr.light,Jr=Wr.paintProperty,Qr=Wr.layoutProperty;function $r(t,e){var r=!1;if(e&&e.length)for(var n=0,i=e;n<i.length;n+=1){var o=i[n];t.fire(new dt(new Error(o.message))),r=!0}return r}var tn=rn,en=3;function rn(t,e,r){var n=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var i=new Int32Array(this.arrayBuffer);t=i[0],e=i[1],r=i[2],this.d=e+2*r;for(var o=0;o<this.d*this.d;o++){var a=i[en+o],s=i[en+o+1];n.push(a===s?null:i.subarray(a,s))}var l=i[en+n.length],u=i[en+n.length+1];this.keys=i.subarray(l,u),this.bboxes=i.subarray(u),this.insert=this._insertReadonly}else{this.d=e+2*r;for(var c=0;c<this.d*this.d;c++)n.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=r,this.scale=e/t,this.uid=0;var p=r/e*t;this.min=-p,this.max=t+p}rn.prototype.insert=function(t,e,r,n,i){this._forEachCell(e,r,n,i,this._insertCell,this.uid++),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)},rn.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},rn.prototype._insertCell=function(t,e,r,n,i,o){this.cells[i].push(o)},rn.prototype.query=function(t,e,r,n,i){var o=this.min,a=this.max;if(t<=o&&e<=o&&a<=r&&a<=n&&!i)return Array.prototype.slice.call(this.keys);var s=[];return this._forEachCell(t,e,r,n,this._queryCell,s,{},i),s},rn.prototype._queryCell=function(t,e,r,n,i,o,a,s){var l=this.cells[i];if(null!==l)for(var u=this.keys,c=this.bboxes,p=0;p<l.length;p++){var h=l[p];if(void 0===a[h]){var f=4*h;(s?s(c[f+0],c[f+1],c[f+2],c[f+3]):t<=c[f+2]&&e<=c[f+3]&&r>=c[f+0]&&n>=c[f+1])?(a[h]=!0,o.push(u[h])):a[h]=!1}}},rn.prototype._forEachCell=function(t,e,r,n,i,o,a,s){for(var l=this._convertToCellCoord(t),u=this._convertToCellCoord(e),c=this._convertToCellCoord(r),p=this._convertToCellCoord(n),h=l;h<=c;h++)for(var f=u;f<=p;f++){var d=this.d*f+h;if((!s||s(this._convertFromCellCoord(h),this._convertFromCellCoord(f),this._convertFromCellCoord(h+1),this._convertFromCellCoord(f+1)))&&i.call(this,t,e,r,n,d,o,a,s))return}},rn.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},rn.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},rn.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=en+this.cells.length+1+1,r=0,n=0;n<this.cells.length;n++)r+=this.cells[n].length;var i=new Int32Array(e+r+this.keys.length+this.bboxes.length);i[0]=this.extent,i[1]=this.n,i[2]=this.padding;for(var o=e,a=0;a<t.length;a++){var s=t[a];i[en+a]=o,i.set(s,o),o+=s.length}return i[en+t.length]=o,i.set(this.keys,o),o+=this.keys.length,i[en+t.length+1]=o,i.set(this.bboxes,o),o+=this.bboxes.length,i.buffer};var nn=self.ImageData,on={};function an(t,e,r){void 0===r&&(r={}),Object.defineProperty(e,"_classRegistryKey",{value:t,writeable:!1}),on[t]={klass:e,omit:r.omit||[],shallow:r.shallow||[]}}for(var sn in an("Object",Object),tn.serialize=function(t,e){var r=t.toArrayBuffer();return e&&e.push(r),{buffer:r}},tn.deserialize=function(t){return new tn(t.buffer)},an("Grid",tn),an("Color",Ft),an("Error",Error),an("StylePropertyFunction",vr),an("StyleExpression",hr,{omit:["_evaluator"]}),an("ZoomDependentExpression",gr),an("ZoomConstantExpression",mr),an("CompoundExpression",te,{omit:["_evaluate"]}),Ze)Ze[sn]._classRegistryKey||an("Expression_"+sn,Ze[sn]);function ln(t,e){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp)return t;if(t instanceof ArrayBuffer)return e&&e.push(t),t;if(ArrayBuffer.isView(t)){var r=t;return e&&e.push(r.buffer),r}if(t instanceof nn)return e&&e.push(t.data.buffer),t;if(Array.isArray(t)){for(var n=[],i=0,o=t;i<o.length;i+=1){var a=o[i];n.push(ln(a,e))}return n}if("object"==typeof t){var s=t.constructor,l=s._classRegistryKey;if(!l)throw new Error("can't serialize object of unregistered class");var u=s.serialize?s.serialize(t,e):{};if(!s.serialize){for(var c in t)if(t.hasOwnProperty(c)&&!(on[l].omit.indexOf(c)>=0)){var p=t[c];u[c]=on[l].shallow.indexOf(c)>=0?p:ln(p,e)}t instanceof Error&&(u.message=t.message)}if(u.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==l&&(u.$name=l),u}throw new Error("can't serialize object of type "+typeof t)}function un(t){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||t instanceof ArrayBuffer||ArrayBuffer.isView(t)||t instanceof nn)return t;if(Array.isArray(t))return t.map(un);if("object"==typeof t){var e=t.$name||"Object",r=on[e].klass;if(!r)throw new Error("can't deserialize unregistered class "+e);if(r.deserialize)return r.deserialize(t);for(var n=Object.create(r.prototype),i=0,o=Object.keys(t);i<o.length;i+=1){var a=o[i];if("$name"!==a){var s=t[a];n[a]=on[e].shallow.indexOf(a)>=0?s:un(s)}}return n}throw new Error("can't deserialize object of type "+typeof t)}var cn=function(){this.first=!0};cn.prototype.update=function(t,e){var r=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=e):this.lastFloorZoom<r&&(this.lastIntegerZoom=r,this.lastIntegerZoomTime=e),t!==this.lastZoom&&(this.lastZoom=t,this.lastFloorZoom=r,!0))};var pn={"Latin-1 Supplement":function(t){return t>=128&&t<=255},Arabic:function(t){return t>=1536&&t<=1791},"Arabic Supplement":function(t){return t>=1872&&t<=1919},"Arabic Extended-A":function(t){return t>=2208&&t<=2303},"Hangul Jamo":function(t){return t>=4352&&t<=4607},"Unified Canadian Aboriginal Syllabics":function(t){return t>=5120&&t<=5759},Khmer:function(t){return t>=6016&&t<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(t){return t>=6320&&t<=6399},"General Punctuation":function(t){return t>=8192&&t<=8303},"Letterlike Symbols":function(t){return t>=8448&&t<=8527},"Number Forms":function(t){return t>=8528&&t<=8591},"Miscellaneous Technical":function(t){return t>=8960&&t<=9215},"Control Pictures":function(t){return t>=9216&&t<=9279},"Optical Character Recognition":function(t){return t>=9280&&t<=9311},"Enclosed Alphanumerics":function(t){return t>=9312&&t<=9471},"Geometric Shapes":function(t){return t>=9632&&t<=9727},"Miscellaneous Symbols":function(t){return t>=9728&&t<=9983},"Miscellaneous Symbols and Arrows":function(t){return t>=11008&&t<=11263},"CJK Radicals Supplement":function(t){return t>=11904&&t<=12031},"Kangxi Radicals":function(t){return t>=12032&&t<=12255},"Ideographic Description Characters":function(t){return t>=12272&&t<=12287}
vendor: 6,030 bytes, line 65
65,"CJK Symbols and Punctuation":function(t){return t>=12288&&t<=12351},Hiragana:function(t){return t>=12352&&t<=12447},Katakana:function(t){return t>=12448&&t<=12543},Bopomofo:function(t){return t>=12544&&t<=12591},"Hangul Compatibility Jamo":function(t){return t>=12592&&t<=12687},Kanbun:function(t){return t>=12688&&t<=12703},"Bopomofo Extended":function(t){return t>=12704&&t<=12735},"CJK Strokes":function(t){return t>=12736&&t<=12783},"Katakana Phonetic Extensions":function(t){return t>=12784&&t<=12799},"Enclosed CJK Letters and Months":function(t){return t>=12800&&t<=13055},"CJK Compatibility":function(t){return t>=13056&&t<=13311},"CJK Unified Ideographs Extension A":function(t){return t>=13312&&t<=19903},"Yijing Hexagram Symbols":function(t){return t>=19904&&t<=19967},"CJK Unified Ideographs":function(t){return t>=19968&&t<=40959},"Yi Syllables":function(t){return t>=40960&&t<=42127},"Yi Radicals":function(t){return t>=42128&&t<=42191},"Hangul Jamo Extended-A":function(t){return t>=43360&&t<=43391},"Hangul Syllables":function(t){return t>=44032&&t<=55215},"Hangul Jamo Extended-B":function(t){return t>=55216&&t<=55295},"Private Use Area":function(t){return t>=57344&&t<=63743},"CJK Compatibility Ideographs":function(t){return t>=63744&&t<=64255},"Arabic Presentation Forms-A":function(t){return t>=64336&&t<=65023},"Vertical Forms":function(t){return t>=65040&&t<=65055},"CJK Compatibility Forms":function(t){return t>=65072&&t<=65103},"Small Form Variants":function(t){return t>=65104&&t<=65135},"Arabic Presentation Forms-B":function(t){return t>=65136&&t<=65279},"Halfwidth and Fullwidth Forms":function(t){return t>=65280&&t<=65519}};function hn(t){for(var e=0,r=t;e<r.length;e+=1)if(dn(r[e].charCodeAt(0)))return!0;return!1}function fn(t){return!(pn.Arabic(t)||pn["Arabic Supplement"](t)||pn["Arabic Extended-A"](t)||pn["Arabic Presentation Forms-A"](t)||pn["Arabic Presentation Forms-B"](t))}function dn(t){return!!(746===t||747===t||!(t<4352)&&(pn["Bopomofo Extended"](t)||pn.Bopomofo(t)||pn["CJK Compatibility Forms"](t)&&!(t>=65097&&t<=65103)||pn["CJK Compatibility Ideographs"](t)||pn["CJK Compatibility"](t)||pn["CJK Radicals Supplement"](t)||pn["CJK Strokes"](t)||!(!pn["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||pn["CJK Unified Ideographs Extension A"](t)||pn["CJK Unified Ideographs"](t)||pn["Enclosed CJK Letters and Months"](t)||pn["Hangul Compatibility Jamo"](t)||pn["Hangul Jamo Extended-A"](t)||pn["Hangul Jamo Extended-B"](t)||pn["Hangul Jamo"](t)||pn["Hangul Syllables"](t)||pn.Hiragana(t)||pn["Ideographic Description Characters"](t)||pn.Kanbun(t)||pn["Kangxi Radicals"](t)||pn["Katakana Phonetic Extensions"](t)||pn.Katakana(t)&&12540!==t||!(!pn["Halfwidth and Fullwidth Forms"](t)||65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||!(!pn["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||pn["Unified Canadian Aboriginal Syllabics"](t)||pn["Unified Canadian Aboriginal Syllabics Extended"](t)||pn["Vertical Forms"](t)||pn["Yijing Hexagram Symbols"](t)||pn["Yi Syllables"](t)||pn["Yi Radicals"](t)))}function mn(t){return!(dn(t)||function(t){return!!(pn["Latin-1 Supplement"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||pn["General Punctuation"](t)&&(8214===t||8224===t||8225===t||8240===t||8241===t||8251===t||8252===t||8258===t||8263===t||8264===t||8265===t||8273===t)||pn["Letterlike Symbols"](t)||pn["Number Forms"](t)||pn["Miscellaneous Technical"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||9003===t||t>=9085&&t<=9114||t>=9150&&t<=9165||9167===t||t>=9169&&t<=9179||t>=9186&&t<=9215)||pn["Control Pictures"](t)&&9251!==t||pn["Optical Character Recognition"](t)||pn["Enclosed Alphanumerics"](t)||pn["Geometric Shapes"](t)||pn["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||pn["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||pn["CJK Symbols and Punctuation"](t)||pn.Katakana(t)||pn["Private Use Area"](t)||pn["CJK Compatibility Forms"](t)||pn["Small Form Variants"](t)||pn["Halfwidth and Fullwidth Forms"](t)||8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)}(t))}function gn(t,e){return!(!e&&(t>=1424&&t<=2303||pn["Arabic Presentation Forms-A"](t)||pn["Arabic Presentation Forms-B"](t))||t>=2304&&t<=3583||t>=3840&&t<=4255||pn.Khmer(t))}var yn,vn=!1,_n=null,xn=!1,bn=new mt,wn={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return xn||null!=wn.applyArabicShaping}},En=function(t,e){this.zoom=t,e?(this.now=e.now,this.fadeDuration=e.fadeDuration,this.zoomHistory=e.zoomHistory,this.transition=e.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new cn,this.transition={})};En.prototype.isSupportedScript=function(t){return function(t,e){for(var r=0,n=t;r<n.length;r+=1)if(!gn(n[r].charCodeAt(0),e))return!1;return!0}(t,wn.isLoaded())},En.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},En.prototype.getCrossfadeParameters=function(){var t=this.zoom,e=t-Math.floor(t),r=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*e}};var Tn=function(t,e){this.property=t,this.value=e,this.expression=_r(void 0===e?t.specification.default:e,t.specification)};Tn.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Tn.prototype.possiblyEvaluate=function(t){return this.property.possiblyEvaluate(this,t)};var Sn=function(t){this.property=t,this.value=new Tn(t,void 0)};Sn.prototype.transitioned=function(t,e){return new An(this.property,this.value,e,p({},t.transition,this.transition),t.now)},Sn.prototype.untransitioned=function(){return new An(this.property,this.value,
vendor: 7,852 bytes, line 65
65null,{},0)};var Cn=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};Cn.prototype.getValue=function(t){return x(this._values[t].value.value)},Cn.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Sn(this._values[t].property)),this._values[t].value=new Tn(this._values[t].property,null===e?void 0:x(e))},Cn.prototype.getTransition=function(t){return x(this._values[t].transition)},Cn.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Sn(this._values[t].property)),this._values[t].transition=x(e)||void 0},Cn.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);e<r.length;e+=1){var n=r[e],i=this.getValue(n);void 0!==i&&(t[n]=i);var o=this.getTransition(n);void 0!==o&&(t[n+"-transition"]=o)}return t},Cn.prototype.transitioned=function(t,e){for(var r=new In(this._properties),n=0,i=Object.keys(this._values);n<i.length;n+=1){var o=i[n];r._values[o]=this._values[o].transitioned(t,e._values[o])}return r},Cn.prototype.untransitioned=function(){for(var t=new In(this._properties),e=0,r=Object.keys(this._values);e<r.length;e+=1){var n=r[e];t._values[n]=this._values[n].untransitioned()}return t};var An=function(t,e,r,n,i){this.property=t,this.value=e,this.begin=i+n.delay||0,this.end=this.begin+n.duration||0,t.specification.transition&&(n.delay||n.duration)&&(this.prior=r)};An.prototype.possiblyEvaluate=function(t){var e=t.now||0,r=this.value.possiblyEvaluate(t),n=this.prior;if(n){if(e>this.end)return this.prior=null,r;if(this.value.isDataDriven())return this.prior=null,r;if(e<this.begin)return n.possiblyEvaluate(t);var i=(e-this.begin)/(this.end-this.begin);return this.property.interpolate(n.possiblyEvaluate(t),r,function(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}(i))}return r};var In=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};In.prototype.possiblyEvaluate=function(t){for(var e=new Mn(this._properties),r=0,n=Object.keys(this._values);r<n.length;r+=1){var i=n[r];e._values[i]=this._values[i].possiblyEvaluate(t)}return e},In.prototype.hasTransition=function(){for(var t=0,e=Object.keys(this._values);t<e.length;t+=1){var r=e[t];if(this._values[r].prior)return!0}return!1};var Dn=function(t){this._properties=t,this._values=Object.create(t.defaultPropertyValues)};Dn.prototype.getValue=function(t){return x(this._values[t].value)},Dn.prototype.setValue=function(t,e){this._values[t]=new Tn(this._values[t].property,null===e?void 0:x(e))},Dn.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);e<r.length;e+=1){var n=r[e],i=this.getValue(n);void 0!==i&&(t[n]=i)}return t},Dn.prototype.possiblyEvaluate=function(t){for(var e=new Mn(this._properties),r=0,n=Object.keys(this._values);r<n.length;r+=1){var i=n[r];e._values[i]=this._values[i].possiblyEvaluate(t)}return e};var kn=function(t,e,r){this.property=t,this.value=e,this.parameters=r};kn.prototype.isConstant=function(){return"constant"===this.value.kind},kn.prototype.constantOr=function(t){return"constant"===this.value.kind?this.value.value:t},kn.prototype.evaluate=function(t,e){return this.property.evaluate(this.value,this.parameters,t,e)};var Mn=function(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)};Mn.prototype.get=function(t){return this._values[t]};var Pn=function(t){this.specification=t};Pn.prototype.possiblyEvaluate=function(t,e){return t.expression.evaluate(e)},Pn.prototype.interpolate=function(t,e,r){var n=ce[this.specification.type];return n?n(t,e,r):t};var zn=function(t){this.specification=t};zn.prototype.possiblyEvaluate=function(t,e){return"constant"===t.expression.kind||"camera"===t.expression.kind?new kn(this,{kind:"constant",value:t.expression.evaluate(e)},e):new kn(this,t.expression,e)},zn.prototype.interpolate=function(t,e,r){if("constant"!==t.value.kind||"constant"!==e.value.kind)return t;if(void 0===t.value.value||void 0===e.value.value)return new kn(this,{kind:"constant",value:void 0},t.parameters);var n=ce[this.specification.type];return n?new kn(this,{kind:"constant",value:n(t.value.value,e.value.value,r)},t.parameters):t},zn.prototype.evaluate=function(t,e,r,n){return"constant"===t.kind?t.value:t.evaluate(e,r,n)};var Ln=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.possiblyEvaluate=function(t,e){if(void 0===t.value)return new kn(this,{kind:"constant",value:void 0},e);if("constant"===t.expression.kind){var r=t.expression.evaluate(e),n=this._calculate(r,r,r,e);return new kn(this,{kind:"constant",value:n},e)}if("camera"===t.expression.kind){var i=this._calculate(t.expression.evaluate({zoom:e.zoom-1}),t.expression.evaluate({zoom:e.zoom}),t.expression.evaluate({zoom:e.zoom+1}),e);return new kn(this,{kind:"constant",value:i},e)}return new kn(this,t.expression,e)},e.prototype.evaluate=function(t,e,r,n){if("source"===t.kind){var i=t.evaluate(e,r,n);return this._calculate(i,i,i,e)}return"composite"===t.kind?this._calculate(t.evaluate({zoom:Math.floor(e.zoom)-1},r,n),t.evaluate({zoom:Math.floor(e.zoom)},r,n),t.evaluate({zoom:Math.floor(e.zoom)+1},r,n),e):t.value},e.prototype._calculate=function(t,e,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},e.prototype.interpolate=function(t){return t},e}(zn),On=function(t){this.specification=t};On.prototype.possiblyEvaluate=function(t,e){if(void 0!==t.value){if("constant"===t.expression.kind){var r=t.expression.evaluate(e);return this._calculate(r,r,r,e)}return this._calculate(t.expression.evaluate(new En(Math.floor(e.zoom-1),e)),t.expression.evaluate(new En(Math.floor(e.zoom),e)),t.expression.evaluate(new En(Math.floor(e.zoom+1),e)),e)}},On.prototype._calculate=function(t,e,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},On.prototype.interpolate=function(t){return t};var Rn=function(t){this.specification=t};Rn.prototype.possiblyEvaluate=function(t,e){return!!t.expression.evaluate(e)},Rn.prototype.interpolate=function(){return!1};var Bn=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},t){var r=t[e],n=this.defaultPropertyValues[e]=new Tn(r,void 0),i=this.defaultTransitionablePropertyValues[e]=new Sn(r);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=n.possiblyEvaluate({})}};an("DataDrivenProperty",zn),an("DataConstantProperty",Pn),an("CrossFadedDataDrivenProperty",Ln),an("CrossFadedProperty",On),an("ColorRampProperty",Rn);var Fn=function(t){function e(e,r){if(t.call(this),this.id=e.id,this.type=e.type,this.visibility="visible",this._featureFilter=function(){return!0},"custom"!==e.type&&(e=e,this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),r.layout&&(this._unevaluatedLayout=new Dn(r.layout)),r.paint)){for(var n in this._transitionablePaint=new Cn(r.paint),e.paint)this.setPaintProperty(n,e.paint[n],{validate:!1});for(var i in e.layout)this.setLayoutProperty(i,e.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned()}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},e.prototype.getLayoutProperty=function(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)},e.prototype.setLayoutProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e){var n="layers."+this.id+".layout."+t;
65if(this._validate(Qr,n,t,e,r))return}"visibility"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility="none"===e?e:"visible"},e.prototype.getPaintProperty=function(t){return y(t,"-transition")?this._transitionablePaint.getTransition(t.slice(0,-"-transition".length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e){var n="layers."+this.id+".paint."+t;if(this._validate(Jr,n,t,e,r))return!1}if(y(t,"-transition"))return this._transitionablePaint.setTransition(t.slice(0,-"-transition".length),e||void 0),!1;var i=this._transitionablePaint._values[t],o="cross-faded-data-driven"===i.property.specification["property-type"]&&!i.value.value&&e,a=this._transitionablePaint._values[t].value.isDataDriven();this._transitionablePaint.setValue(t,e);var s=this._transitionablePaint._values[t].value.isDataDriven();return this._handleSpecialPaintPropertyUpdate(t),s||a||o},e.prototype._handleSpecialPaintPropertyUpdate=function(t){},e.prototype.isHidden=function(t){return!!(this.minzoom&&t<this.minzoom)||!!(this.maxzoom&&t>=this.maxzoom)||"none"===this.visibility},e.prototype.updateTransitions=function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)},e.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},e.prototype.recalculate=function(t){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t)),this.paint=this._transitioningPaint.possiblyEvaluate(t)}
vendor: 16,384 bytes, line 65
65,e.prototype.serialize=function(){var t={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return"none"===this.visibility&&(t.layout=t.layout||{},t.layout.visibility="none"),_(t,function(t,e){return!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)})},e.prototype._validate=function(t,e,r,n,i){return void 0===i&&(i={}),(!i||!1!==i.validate)&&$r(this,t.call(Yr,{key:e,layerType:this.type,objectKey:r,value:n,styleSpec:gt,style:{glyphs:!0,sprite:!0}}))},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e.prototype.isStateDependent=function(){for(var t in this.paint._values){var e=this.paint.get(t);if(e instanceof kn&&tr(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1},e}(mt),Nn={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Un=function(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Vn=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function jn(t,e){void 0===e&&(e=1);var r=0,n=0;return{members:t.map(function(t){var i,o=(i=t.type,Nn[i].BYTES_PER_ELEMENT),a=r=qn(r,Math.max(e,o)),s=t.components||1;return n=Math.max(n,o),r+=o*s,{name:t.name,type:t.type,components:s,offset:a}}),size:qn(r,Math.max(n,e)),alignment:e}}function qn(t,e){return Math.ceil(t/e)*e}Vn.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},Vn.deserialize=function(t){var e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e},Vn.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Vn.prototype.clear=function(){this.length=0},Vn.prototype.resize=function(t){this.reserve(t),this.length=t},Vn.prototype.reserve=function(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},Vn.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Hn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.int16[n+0]=e,this.int16[n+1]=r,t},e}(Vn);Hn.prototype.bytesPerElement=4,an("StructArrayLayout2i4",Hn);var Gn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var o=4*t;return this.int16[o+0]=e,this.int16[o+1]=r,this.int16[o+2]=n,this.int16[o+3]=i,t},e}(Vn);Gn.prototype.bytesPerElement=8,an("StructArrayLayout4i8",Gn);var Wn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n,i,o)},e.prototype.emplace=function(t,e,r,n,i,o,a){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=o,this.int16[s+5]=a,t},e}(Vn);Wn.prototype.bytesPerElement=12,an("StructArrayLayout2i4i12",Wn);var Zn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,o,a,s){var l=this.length;return this.resize(l+1),this.emplace(l,t,e,r,n,i,o,a,s)},e.prototype.emplace=function(t,e,r,n,i,o,a,s,l){var u=6*t,c=12*t;return this.int16[u+0]=e,this.int16[u+1]=r,this.int16[u+2]=n,this.int16[u+3]=i,this.uint8[c+8]=o,this.uint8[c+9]=a,this.uint8[c+10]=s,this.uint8[c+11]=l,t},e}(Vn);Zn.prototype.bytesPerElement=12,an("StructArrayLayout4i4ub12",Zn);var Xn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,o,a,s){var l=this.length;return this.resize(l+1),this.emplace(l,t,e,r,n,i,o,a,s)},e.prototype.emplace=function(t,e,r,n,i,o,a,s,l){var u=8*t;return this.uint16[u+0]=e,this.uint16[u+1]=r,this.uint16[u+2]=n,this.uint16[u+3]=i,this.uint16[u+4]=o,this.uint16[u+5]=a,this.uint16[u+6]=s,this.uint16[u+7]=l,t},e}(Vn);Xn.prototype.bytesPerElement=16,an("StructArrayLayout8ui16",Xn);var Yn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,o,a,s){var l=this.length;return this.resize(l+1),this.emplace(l,t,e,r,n,i,o,a,s)},e.prototype.emplace=function(t,e,r,n,i,o,a,s,l){var u=8*t;return this.int16[u+0]=e,this.int16[u+1]=r,this.int16[u+2]=n,this.int16[u+3]=i,this.uint16[u+4]=o,this.uint16[u+5]=a,this.uint16[u+6]=s,this.uint16[u+7]=l,t},e}(Vn);Yn.prototype.bytesPerElement=16,an("StructArrayLayout4i4ui16",Yn);var Kn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.float32[i+0]=e,this.float32[i+1]=r,this.float32[i+2]=n,t},e}(Vn);Kn.prototype.bytesPerElement=12,an("StructArrayLayout3f12",Kn);var Jn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.uint32[r+0]=e,t},e}(Vn);Jn.prototype.bytesPerElement=4,an("StructArrayLayout1ul4",Jn);var Qn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,o,a,s,l,u,c){var p=this.length;return this.resize(p+1),this.emplace(p,t,e,r,n,i,o,a,s,l,u,c)},e.prototype.emplace=function(t,e,r,n,i,o,a,s,l,u,c,p){var h=12*t,f=6*t;return this.int16[h+0]=e,this.int16[h+1]=r,this.int16[h+2]=n,this.int16[h+3]=i,this.int16[h+4]=o,this.int16[h+5]=a,this.uint32[f+3]=s,this.uint16[h+8]=l,this.uint16[h+9]=u,this.int16[h+10]=c,this.int16[h+11]=p,t},e}(Vn);Qn.prototype.bytesPerElement=24,an("StructArrayLayout6i1ul2ui2i24",Qn);var $n=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n,i,o)},e.prototype.emplace=function(t,e,r,n,i,o,a){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=o,this.int16[s+5]=a,t},e}(Vn);$n.prototype.bytesPerElement=12,an("StructArrayLayout2i2i2i12",$n);var ti=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=4*t;return this.uint8[n+0]=e,this.uint8[n+1]=r,t},e}(Vn);ti.prototype.bytesPerElement=4,an("StructArrayLayout2ub4",ti);var ei=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,o,a,s,l,u,c,p,h,f){var d=this.length;return this.resize(d+1),this.emplace(d,t,e,r,n,i,o,a,s,l,u,c,p,h,f)},e.prototype.emplace=function(t,e,r,n,i,o,a,s,l,u,c,p,h,f,d){var m=20*t,g=10*t,y=40*t;return this.int16[m+0]=e,this.int16[m+1]=r,this.uint16[m+2]=n,this.uint16[m+3]=i,this.uint32[g+2]=o,this.uint32[g+3]=a,this.uint32[g+4]=s,this.uint16[m+10]=l,this.uint16[m+11]=u,this.uint16[m+12]=c,this.float32[g+7]=p,this.float32[g+8]=h,this.uint8[y+36]=f,this.uint8[y+37]=d,t},e}(Vn);ei.prototype.bytesPerElement=40,an("StructArrayLayout2i2ui3ul3ui2f2ub40",ei);var ri=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,o,a,s,l,u,c,p,h,f){var d=this.length;return this.resize(d+1),this.emplace(d,t,e,r,n,i,o,a,s,l,u,c,p,h,f)},e.prototype.emplace=function(t,e,r,n,i,o,a,s,l,u,c,p,h,f,d){var m=16*t,g=8*t;return this.int16[m+0]=e,this.int16[m+1]=r,this.int16[m+2]=n,this.int16[m+3]=i,this.uint16[m+4]=o,this.uint16[m+5]=a,this.uint16[m+6]=s,this.uint16[m+7]=l,this.uint16[m+8]=u,this.uint16[m+9]=c,this.uint16[m+10]=p,this.uint16[m+11]=h,this.uint16[m+12]=f,this.uint32[g+7]=d,t},e}(Vn);ri.prototype.bytesPerElement=32,an("StructArrayLayout4i9ui1ul32",ri);var ni=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.float32[r+0]=e,t},e}(Vn);ni.prototype.bytesPerElement=4,an("StructArrayLayout1f4",ni);var ii=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.int16[i+0]=e,this.int16[i+1]=r,this.int16[i+2]=n,t},e}(Vn);ii.prototype.bytesPerElement=6,an("StructArrayLayout3i6",ii);var oi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=2*t,o=4*t;return this.uint32[i+0]=e,this.uint16[o+2]=r,this.uint16[o+3]=n,t},e}(Vn);oi.prototype.bytesPerElement=8,an("StructArrayLayout1ul2ui8",oi);var ai=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.uint16[i+0]=e,this.uint16[i+1]=r,this.uint16[i+2]=n,t},e}(Vn);ai.prototype.bytesPerElement=6,an("StructArrayLayout3ui6",ai);var si=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.uint16[n+0]=e,this.uint16[n+1]=r,t},e}(Vn);si.prototype.bytesPerElement=4,an("StructArrayLayout2ui4",si);var li=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.uint16[r+0]=e,t},e}(Vn);li.prototype.bytesPerElement=2,an("StructArrayLayout1ui2",li);var ui=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.float32[n+0]=e,this.float32[n+1]=r,t},e}(Vn);ui.prototype.bytesPerElement=8,an("StructArrayLayout2f8",ui);var ci=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var o=4*t;return this.float32[o+0]=e,this.float32[o+1]=r,this.float32[o+2]=n,this.float32[o+3]=i,t},e}(Vn);ci.prototype.bytesPerElement=16,an("StructArrayLayout4f16",ci);var pi=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:
vendor: 12,221 bytes, line 65
65{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorPointY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.x1.set=function(t){this._structArray.int16[this._pos2+2]=t},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.y1.set=function(t){this._structArray.int16[this._pos2+3]=t},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.x2.set=function(t){this._structArray.int16[this._pos2+4]=t},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.y2.set=function(t){this._structArray.int16[this._pos2+5]=t},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+8]=t},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t},r.radius.get=function(){return this._structArray.int16[this._pos2+10]},r.radius.set=function(t){this._structArray.int16[this._pos2+10]=t},r.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},r.signedDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+11]=t},r.anchorPoint.get=function(){return new i(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(Un);pi.prototype.size=24;var hi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new pi(this,t)},e}(Qn);an("CollisionBoxArray",hi);var fi=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},hidden:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.glyphStartIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.numGlyphs.set=function(t){this._structArray.uint16[this._pos2+3]=t},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.vertexStartIndex.set=function(t){this._structArray.uint32[this._pos4+2]=t},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineStartIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.lineLength.set=function(t){this._structArray.uint32[this._pos4+4]=t},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.segment.set=function(t){this._structArray.uint16[this._pos2+10]=t},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.lowerSize.set=function(t){this._structArray.uint16[this._pos2+11]=t},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.upperSize.set=function(t){this._structArray.uint16[this._pos2+12]=t},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetX.set=function(t){this._structArray.float32[this._pos4+7]=t},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.lineOffsetY.set=function(t){this._structArray.float32[this._pos4+8]=t},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.writingMode.set=function(t){this._structArray.uint8[this._pos1+36]=t},r.hidden.get=function(){return this._structArray.uint8[this._pos1+37]},r.hidden.set=function(t){this._structArray.uint8[this._pos1+37]=t},Object.defineProperties(e.prototype,r),e}(Un);fi.prototype.size=40;var di=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new fi(this,t)},e}(ei);an("PlacedSymbolArray",di);var mi=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},horizontalPlacedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},crossTileID:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.horizontalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.horizontalPlacedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+2]=t},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.verticalPlacedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+3]=t},r.key.get=function(){return this._structArray.uint16[this._pos2+4]},r.key.set=function(t){this._structArray.uint16[this._pos2+4]=t},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+5]},r.textBoxStartIndex.set=function(t){this._structArray.uint16[this._pos2+5]=t},r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+6]},r.textBoxEndIndex.set=function(t){this._structArray.uint16[this._pos2+6]=t},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+7]},r.iconBoxStartIndex.set=function(t){this._structArray.uint16[this._pos2+7]=t},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.iconBoxEndIndex.set=function(t){this._structArray.uint16[this._pos2+8]=t},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.featureIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t},r.numGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+10]},r.numGlyphVertices.set=function(t){this._structArray.uint16[this._pos2+10]=t},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+11]},r.numVerticalGlyphVertices.set=function(t){this._structArray.uint16[this._pos2+11]=t},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+12]},r.numIconVertices.set=function(t){this._structArray.uint16[this._pos2+12]=t},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+7]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+7]=t},Object.defineProperties(e.prototype,r),e}(Un);mi.prototype.size=32;var gi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new mi(this,t)},e}(ri);an("SymbolInstanceArray",gi);var yi=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={offsetX:{configurable:!0}};return r.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},r.offsetX.set=function(t){this._structArray.float32[this._pos4+0]=t},Object.defineProperties(e.prototype,r),e}(Un);yi.prototype.size=4;var vi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getoffsetX=function(t){return this.float32[1*t+0]},e.prototype.get=function(t){return new yi(this,t)},e}(ni);an("GlyphOffsetArray",vi);var _i=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return r.x.get=function(){return this._structArray.int16[this._pos2+0]},r.x.set=function(t){this._structArray.int16[this._pos2+0]=t},r.y.get=function(){return this._structArray.int16[this._pos2+1]},r.y.set=function(t){this._structArray.int16[this._pos2+1]=t},r.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},r.tileUnitDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+2]=t},Object.defineProperties(e.prototype,r),e}(Un);_i.prototype.size=6;var xi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getx=function(t){return this.int16[3*t+0]},e.prototype.gety=function(t){return this.int16[3*t+1]},e.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},e.prototype.get=function(t){return new _i(this,t)},e}(ii);an("SymbolLineVertexArray",xi);var bi=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+0]=t},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+3]=t},Object.defineProperties(e.prototype,r),e}(Un);bi.prototype.size=8;var wi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new bi(this,t)},e}(oi);an("FeatureIndexArray",wi);var Ei=jn([{name:"a_pos",components:2,type:"Int16"}],4),Ti=Ei.members,Si=(Ei.size,Ei.alignment,function(t){void 0===t&&(t=[]),this.segments=t});function Ci(t,e){return 256*(t=u(Math.floor(t),0,255))+u(Math.floor(e),0,255)}Si.prototype.prepareSegment=function(t,e,r,n){var i=this.segments[this.segments.length-1];return t>Si.MAX_VERTEX_ARRAY_LENGTH&&w("Max vertices per segment is "+Si.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+t),(!i||i.vertexLength+t>Si.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==n)&&(i={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(i.sortKey=n),this.segments.push(i)),i},Si.prototype.get=function(){return this.segments},Si.prototype.destroy=function(){for(var t=0,e=this.segments;t<e.length;t+=1){var r=e[t];for(var n in r.vaos)r.vaos[n].destroy()}},Si.simpleSegment=function(t,e,r,n){return new Si([{vertexOffset:t,primitiveOffset:e,vertexLength:r,primitiveLength:n,vaos:{},sortKey:0}])},Si.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,an("SegmentVector",Si);var Ai=function(){this.ids=[],this.positions=[],this.indexed=!1}
vendor: 23,176 bytes, line 65
65;function Ii(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}Ai.prototype.add=function(t,e,r,n){this.ids.push(t),this.positions.push(e,r,n)},Ai.prototype.getPositions=function(t){for(var e=0,r=this.ids.length-1;e<r;){var n=e+r>>1;this.ids[n]>=t?r=n:e=n+1}for(var i=[];this.ids[e]===t;){var o=this.positions[3*e],a=this.positions[3*e+1],s=this.positions[3*e+2];i.push({index:o,start:a,end:s}),e++}return i},Ai.serialize=function(t,e){var r=new Float64Array(t.ids),n=new Uint32Array(t.positions);return function t(e,r,n,i){if(!(n>=i)){for(var o=e[n+i>>1],a=n-1,s=i+1;;){do{a++}while(e[a]<o);do{s--}while(e[s]>o);if(a>=s)break;Ii(e,a,s),Ii(r,3*a,3*s),Ii(r,3*a+1,3*s+1),Ii(r,3*a+2,3*s+2)}t(e,r,n,s),t(e,r,s+1,i)}}(r,n,0,r.length-1),e.push(r.buffer,n.buffer),{ids:r,positions:n}},Ai.deserialize=function(t){var e=new Ai;return e.ids=t.ids,e.positions=t.positions,e.indexed=!0,e},an("FeaturePositionMap",Ai);var Di=function(t,e){this.gl=t.gl,this.location=e},ki=function(t){function e(e,r){t.call(this,e,r),this.current=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1i(this.location,t))},e}(Di),Mi=function(t){function e(e,r){t.call(this,e,r),this.current=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))},e}(Di),Pi=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]||(this.current=t,this.gl.uniform2f(this.location,t[0],t[1]))},e}(Di),zi=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]||(this.current=t,this.gl.uniform3f(this.location,t[0],t[1],t[2]))},e}(Di),Li=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]&&t[3]===this.current[3]||(this.current=t,this.gl.uniform4f(this.location,t[0],t[1],t[2],t[3]))},e}(Di),Oi=function(t){function e(e,r){t.call(this,e,r),this.current=Ft.transparent}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t.r===this.current.r&&t.g===this.current.g&&t.b===this.current.b&&t.a===this.current.a||(this.current=t,this.gl.uniform4f(this.location,t.r,t.g,t.b,t.a))},e}(Di),Ri=new Float32Array(16),Bi=function(t){function e(e,r){t.call(this,e,r),this.current=Ri}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(t[12]!==this.current[12]||t[0]!==this.current[0])return this.current=t,void this.gl.uniformMatrix4fv(this.location,!1,t);for(var e=1;e<16;e++)if(t[e]!==this.current[e]){this.current=t,this.gl.uniformMatrix4fv(this.location,!1,t);break}},e}(Di);function Fi(t){return[Ci(255*t.r,255*t.g),Ci(255*t.b,255*t.a)]}var Ni=function(t,e,r){this.value=t,this.names=e,this.uniformNames=this.names.map(function(t){return"u_"+t}),this.type=r,this.maxValue=-1/0};Ni.prototype.defines=function(){return this.names.map(function(t){return"#define HAS_UNIFORM_u_"+t})},Ni.prototype.setConstantPatternPositions=function(){},Ni.prototype.populatePaintArray=function(){},Ni.prototype.updatePaintArray=function(){},Ni.prototype.upload=function(){},Ni.prototype.destroy=function(){},Ni.prototype.setUniforms=function(t,e,r,n){e.set(n.constantOr(this.value))},Ni.prototype.getBinding=function(t,e){return"color"===this.type?new Oi(t,e):new Mi(t,e)},Ni.serialize=function(t){var e=t.value,r=t.names,n=t.type;return{value:ln(e),names:r,type:n}},Ni.deserialize=function(t){var e=t.value,r=t.names,n=t.type;return new Ni(un(e),r,n)};var Ui=function(t,e,r){this.value=t,this.names=e,this.uniformNames=this.names.map(function(t){return"u_"+t}),this.type=r,this.maxValue=-1/0,this.patternPositions={patternTo:null,patternFrom:null}};Ui.prototype.defines=function(){return this.names.map(function(t){return"#define HAS_UNIFORM_u_"+t})},Ui.prototype.populatePaintArray=function(){},Ui.prototype.updatePaintArray=function(){},Ui.prototype.upload=function(){},Ui.prototype.destroy=function(){},Ui.prototype.setConstantPatternPositions=function(t,e){this.patternPositions.patternTo=t.tlbr,this.patternPositions.patternFrom=e.tlbr},Ui.prototype.setUniforms=function(t,e,r,n,i){var o=this.patternPositions;"u_pattern_to"===i&&o.patternTo&&e.set(o.patternTo),"u_pattern_from"===i&&o.patternFrom&&e.set(o.patternFrom)},Ui.prototype.getBinding=function(t,e){return new Li(t,e)};var Vi=function(t,e,r,n){this.expression=t,this.names=e,this.type=r,this.uniformNames=this.names.map(function(t){return"a_"+t}),this.maxValue=-1/0,this.paintVertexAttributes=e.map(function(t){return{name:"a_"+t,type:"Float32",components:"color"===r?2:1,offset:0}}),this.paintVertexArray=new n};Vi.prototype.defines=function(){return[]},Vi.prototype.setConstantPatternPositions=function(){},Vi.prototype.populatePaintArray=function(t,e){var r=this.paintVertexArray,n=r.length;r.reserve(t);var i=this.expression.evaluate(new En(0),e,{});if("color"===this.type)for(var o=Fi(i),a=n;a<t;a++)r.emplaceBack(o[0],o[1]);else{for(var s=n;s<t;s++)r.emplaceBack(i);this.maxValue=Math.max(this.maxValue,i)}},Vi.prototype.updatePaintArray=function(t,e,r,n){var i=this.paintVertexArray,o=this.expression.evaluate({zoom:0},r,n);if("color"===this.type)for(var a=Fi(o),s=t;s<e;s++)i.emplace(s,a[0],a[1]);else{for(var l=t;l<e;l++)i.emplace(l,o);this.maxValue=Math.max(this.maxValue,o)}},Vi.prototype.upload=function(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Vi.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Vi.prototype.setUniforms=function(t,e){e.set(0)},Vi.prototype.getBinding=function(t,e){return new Mi(t,e)};var ji=function(t,e,r,n,i,o){this.expression=t,this.names=e,this.uniformNames=this.names.map(function(t){return"a_"+t+"_t"}),this.type=r,this.useIntegerZoom=n,this.zoom=i,this.maxValue=-1/0;var a=o;this.paintVertexAttributes=e.map(function(t){return{name:"a_"+t,type:"Float32",components:"color"===r?4:2,offset:0}}),this.paintVertexArray=new a};ji.prototype.defines=function(){return[]},ji.prototype.setConstantPatternPositions=function(){},ji.prototype.populatePaintArray=function(t,e){var r=this.paintVertexArray,n=r.length;r.reserve(t);var i=this.expression.evaluate(new En(this.zoom),e,{}),o=this.expression.evaluate(new En(this.zoom+1),e,{});if("color"===this.type)for(var a=Fi(i),s=Fi(o),l=n;l<t;l++)r.emplaceBack(a[0],a[1],s[0],s[1]);else{for(var u=n;u<t;u++)r.emplaceBack(i,o);this.maxValue=Math.max(this.maxValue,i,o)}},ji.prototype.updatePaintArray=function(t,e,r,n){var i=this.paintVertexArray,o=this.expression.evaluate({zoom:this.zoom},r,n),a=this.expression.evaluate({zoom:this.zoom+1},r,n);if("color"===this.type)for(var s=Fi(o),l=Fi(a),u=t;u<e;u++)i.emplace(u,s[0],s[1],l[0],l[1]);else{for(var c=t;c<e;c++)i.emplace(c,o,a);this.maxValue=Math.max(this.maxValue,o,a)}},ji.prototype.upload=function(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},ji.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},ji.prototype.interpolationFactor=function(t){return this.useIntegerZoom?this.expression.interpolationFactor(Math.floor(t),this.zoom,this.zoom+1):this.expression.interpolationFactor(t,this.zoom,this.zoom+1)},ji.prototype.setUniforms=function(t,e,r){e.set(this.interpolationFactor(r.zoom))},ji.prototype.getBinding=function(t,e){return new Mi(t,e)};var qi=function(t,e,r,n,i,o,a){this.expression=t,this.names=e,this.type=r,this.uniformNames=this.names.map(function(t){return"a_"+t+"_t"}),this.useIntegerZoom=n,this.zoom=i,this.maxValue=-1/0,this.layerId=a,this.paintVertexAttributes=e.map(function(t){return{name:"a_"+t,type:"Uint16",components:4,offset:0}}),this.zoomInPaintVertexArray=new o,this.zoomOutPaintVertexArray=new o};qi.prototype.defines=function(){return[]},qi.prototype.setConstantPatternPositions=function(){},qi.prototype.populatePaintArray=function(t,e,r){var n=this.zoomInPaintVertexArray,i=this.zoomOutPaintVertexArray,o=this.layerId,a=n.length;if(n.reserve(t),i.reserve(t),r&&e.patterns&&e.patterns[o]){var s=e.patterns[o],l=s.min,u=s.mid,c=s.max,p=r[l],h=r[u],f=r[c];if(!p||!h||!f)return;for(var d=a;d<t;d++)n.emplaceBack(h.tl[0],h.tl[1],h.br[0],h.br[1],p.tl[0],p.tl[1],p.br[0],p.br[1]),i.emplaceBack(h.tl[0],h.tl[1],h.br[0],h.br[1],f.tl[0],f.tl[1],f.br[0],f.br[1])}},qi.prototype.updatePaintArray=function(t,e,r,n,i){var o=this.zoomInPaintVertexArray,a=this.zoomOutPaintVertexArray,s=this.layerId;if(i&&r.patterns&&r.patterns[s]){var l=r.patterns[s],u=l.min,c=l.mid,p=l.max,h=i[u],f=i[c],d=i[p];if(!h||!f||!d)return;for(var m=t;m<e;m++)o.emplace(m,f.tl[0],f.tl[1],f.br[0],f.br[1],h.tl[0],h.tl[1],h.br[0],h.br[1]),a.emplace(m,f.tl[0],f.tl[1],f.br[0],f.br[1],d.tl[0],d.tl[1],d.br[0],d.br[1])}},qi.prototype.upload=function(t){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=t.createVertexBuffer(this.zoomInPaintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=t.createVertexBuffer(this.zoomOutPaintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},qi.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()},qi.prototype.setUniforms=function(t,e){e.set(0)},qi.prototype.getBinding=function(t,e){return new Mi(t,e)};var Hi=function(){this.binders={},this.cacheKey="",this._buffers=[],this._featureMap=new Ai,this._bufferOffset=0};Hi.createDynamic=function(t,e,r){var n=new Hi,i=[];for(var o in t.paint._values)if(r(o)){var a=t.paint.get(o);if(a instanceof kn&&tr(a.property.specification)){var s=Wi(o,t.type),l=a.property.specification.type,u=a.property.useIntegerZoom;if("cross-faded"===a.property.specification["property-type"]||"cross-faded-data-driven"===a.property.specification["property-type"])if("constant"===a.value.kind)n.binders[o]=new Ui(a.value.value,s,l),i.push("/u_"+o);else{var c=Zi(o,l,"source");n.binders[o]=new qi(a.value,s,l,u,e,c,t.id),i.push("/a_"+o)}else if("constant"===a.value.kind)n.binders[o]=new Ni(a.value.value,s,l),i.push("/u_"+o);else if("source"===a.value.kind){var p=Zi(o,l,"source");n.binders[o]=new Vi(a.value,s,l,p),i.push("/a_"+o)}else{var h=Zi(o,l,"composite");n.binders[o]=new ji(a.value,s,l,u,e,h),i.push("/z_"+o)}}}return n.cacheKey=i.sort().join(""),n},Hi.prototype.populatePaintArrays=function(t,e,r,n){for(var i in this.binders)this.binders[i].populatePaintArray(t,e,n);void 0!==e.id&&this._featureMap.add(+e.id,r,this._bufferOffset,t),this._bufferOffset=t},Hi.prototype.setConstantPatternPositions=function(t,e){for(var r in this.binders)this.binders[r].setConstantPatternPositions(t,e)},Hi.prototype.updatePaintArrays=function(t,e,r,n){var i=!1;for(var o in t)for(var a=0,s=this._featureMap.getPositions(+o);a<s.length;a+=1){var l=s[a],u=e.feature(l.index);for(var c in this.binders){var p=this.binders[c];if(!(p instanceof Ni||p instanceof Ui)&&!0===p.expression.isStateDependent){var h=r.paint.get(c);p.expression=h.value,p.updatePaintArray(l.start,l.end,u,t[o],n),i=!0}}}return i},Hi.prototype.defines=function(){var t=[];for(var e in this.binders)t.push.apply(t,this.binders[e].defines());return t},Hi.prototype.getPaintVertexBuffers=function(){return this._buffers},Hi.prototype.getUniforms=function(t,e){var r={};for(var n in this.binders)for(var i=this.binders[n],o=0,a=i.uniformNames;o<a.length;o+=1){var s=a[o];r[s]=i.getBinding(t,e[s])}return r},Hi.prototype.setUniforms=function(t,e,r,n){for(var i in this.binders)for(var o=this.binders[i],a=0,s=o.uniformNames;a<s.length;a+=1){var l=s[a];o.setUniforms(t,e[l],n,r.get(i),l)}},Hi.prototype.updatePatternPaintBuffers=function(t){var e=[];for(var r in this.binders){var n=this.binders[r];if(n instanceof qi){var i=2===t.fromScale?n.zoomInPaintVertexBuffer:n.zoomOutPaintVertexBuffer;i&&e.push(i)}else(n instanceof Vi||n instanceof ji)&&n.paintVertexBuffer&&e.push(n.paintVertexBuffer)}this._buffers=e},Hi.prototype.upload=function(t){for(var e in this.binders)this.binders[e].upload(t);var r=[];for(var n in this.binders){var i=this.binders[n];(i instanceof Vi||i instanceof ji)&&i.paintVertexBuffer&&r.push(i.paintVertexBuffer)}this._buffers=r},Hi.prototype.destroy=function(){for(var t in this.binders)this.binders[t].destroy()};var Gi=function(t,e,r,n){void 0===n&&(n=function(){return!0}),this.programConfigurations={};for(var i=0,o=e;i<o.length;i+=1){var a=o[i];this.programConfigurations[a.id]=Hi.createDynamic(a,r,n),this.programConfigurations[a.id].layoutAttributes=t}this.needsUpload=!1};function Wi(t,e){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from"],"fill-pattern":["pattern_to","pattern_from"],"fill-extrusion-pattern":["pattern_to","pattern_from"]}[t]||[t.replace(e+"-","").replace(/-/g,"_")]}function Zi(t,e,r){var n={color:{source:ui,composite:ci},number:{source:ni,composite:ui}},i=function(t){return{"line-pattern":{source:Xn,composite:Xn},"fill-pattern":{source:Xn,composite:Xn},"fill-extrusion-pattern":{source:Xn,composite:Xn}}[t]}(t);return i&&i[r]||n[e][r]}Gi.prototype.populatePaintArrays=function(t,e,r,n){for(var i in this.programConfigurations)this.programConfigurations[i].populatePaintArrays(t,e,r,n);this.needsUpload=!0},Gi.prototype.updatePaintArrays=function(t,e,r,n){for(var i=0,o=r;i<o.length;i+=1){var a=o[i];this.needsUpload=this.programConfigurations[a.id].updatePaintArrays(t,e,a,n)||this.needsUpload}},Gi.prototype.get=function(t){return this.programConfigurations[t]},Gi.prototype.upload=function(t){if(this.needsUpload){for(var e in this.programConfigurations)this.programConfigurations[e].upload(t);this.needsUpload=!1}},Gi.prototype.destroy=function(){for(var t in this.programConfigurations)this.programConfigurations[t].destroy()},an("ConstantBinder",Ni),an("CrossFadedConstantBinder",Ui),an("SourceExpressionBinder",Vi),an("CrossFadedCompositeBinder",qi),an("CompositeExpressionBinder",ji),an("ProgramConfiguration",Hi,{omit:["_buffers"]}),an("ProgramConfigurationSet",Gi);var Xi=8192,Yi=(16,{min:-1*Math.pow(2,15),max:Math.pow(2,15)-1});function Ki(t){for(var e=Xi/t.extent,r=t.loadGeometry(),n=0;n<r.length;n++)for(var i=r[n],o=0;o<i.length;o++){var a=i[o];a.x=Math.round(a.x*e),a.y=Math.round(a.y*e),(a.x<Yi.min||a.x>Yi.max||a.y<Yi.min||a.y>Yi.max)&&w("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function Ji(t,e,r,n,i){t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)}var Qi=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Hn,this.indexArray=new ai,this.segments=new Si,this.programConfigurations=new Gi(Ti,t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};function $i(t,e){for(var r=0;r<t.length;r++)if(lo(e,t[r]))return!0;for(var n=0;n<e.length;n++)if(lo(t,e[n]))return!0;return!!no(t,e)}function to(t,e,r){return!!lo(t,e)||!!oo(e,t,r)}function eo(t,e){if(1===t.length)return so(e,t[0]);for(var r=0;r<e.length;r++)for(var n=e[r],i=0;i<n.length;i++)if(lo(t,n[i]))return!0;for(var o=0;o<t.length;o++)if(so(e,t[o]))return!0;for(var a=0;a<e.length;a++)if(no(t,e[a]))return!0;return!1}function ro(t,e,r){if(t.length>1){if(no(t,e))return!0;for(var n=0;n<e.length;n++)if(oo(e[n],t,r))return!0}for(var i=0;i<t.length;i++)if(oo(t[i],e,r))return!0;return!1}function no(t,e){if(0===t.length||0===e.length)return!1;for(var r=0;r<t.length-1;r++)for(var n=t[r],i=t[r+1],o=0;o<e.length-1;o++)if(io(n,i,e[o],e[o+1]))return!0;return!1}function io(t,e,r,n){return E(t,r,n)!==E(e,r,n)&&E(t,e,r)!==E(t,e,n)}function oo(t,e,r){var n=r*r;if(1===e.length)return t.distSqr(e[0])<n;for(var i=1;i<e.length;i++)if(ao(t,e[i-1],e[i])<n)return!0;return!1}function ao(t,e,r){var n=e.distSqr(r);if(0===n)return t.distSqr(e);var i=((t.x-e.x)*(r.x-e.x)+(t.y-e.y)*(r.y-e.y))/n;return i<0?t.distSqr(e):i>1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))}function so(t,e){for(var r,n,i,o=!1,a=0;a<t.length;a++)for(var s=0,l=(r=t[a]).length-1;s<r.length;l=s++)n=r[s],i=r[l],n.y>e.y!=i.y>e.y&&e.x<(i.x-n.x)*(e.y-n.y)/(i.y-n.y)+n.x&&(o=!o);return o}function lo(t,e){for(var r=!1,n=0,i=t.length-1;n<t.length;i=n++){var o=t[n],a=t[i];o.y>e.y!=a.y>e.y&&e.x<(a.x-o.x)*(e.y-o.y)/(a.y-o.y)+o.x&&(r=!r)}return r}function uo(t,e,r){var n=r[0],i=r[2];if(t.x<n.x&&e.x<n.x||t.x>i.x&&e.x>i.x||t.y<n.y&&e.y<n.y||t.y>i.y&&e.y>i.y)return!1;var o=E(t,e,r[0]);return o!==E(t,e,r[1])||o!==E(t,e,r[2])||o!==E(t,e,r[3])}function co(t,e,r){var n=e.paint.get(t).value;return"constant"===n.kind?n.value:r.programConfigurations.get(e.id).binders[t].maxValue}function po(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function ho(t,e,r,n,o){if(!e[0]&&!e[1])return t;var a=i.convert(e)._mult(o);"viewport"===r&&a._rotate(-n);for(var s=[],l=0;l<t.length;l++){var u=t[l];s.push(u.sub(a))}return s}Qi.prototype.populate=function(t,e){for(var r=0,n=t;r<n.length;r+=1){var i=n[r],o=i.feature,a=i.index,s=i.sourceLayerIndex;if(this.layers[0]._featureFilter(new En(this.zoom),o)){var l=Ki(o);this.addFeature(o,l,a),e.featureIndex.insert(o,l,a,s,this.index)}}},Qi.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},Qi.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Qi.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Qi.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Ti),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},Qi.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Qi.prototype.addFeature=function(t,e,r){for(var n=0,i=e;n<i.length;n+=1)for(var o=0,a=i[n];o<a.length;o+=1){var s=a[o],l=s.x,u=s.y;if(!(l<0||l>=Xi||u<0||u>=Xi)){var c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),p=c.vertexLength;Ji(this.layoutVertexArray,l,u,-1,-1),Ji(this.layoutVertexArray,l,u,1,-1),Ji(this.layoutVertexArray,l,u,1,1),Ji(this.layoutVertexArray,l,u,-1,1),this.indexArray.emplaceBack(p,p+1,p+2),this.indexArray.emplaceBack(p,p+3,p+2),c.vertexLength+=4,c.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{})},an("CircleBucket",Qi,{omit:["layers"]});var fo={paint:new Bn({"circle-radius":new zn(gt.paint_circle["circle-radius"]),"circle-color":new zn(gt.paint_circle["circle-color"]),"circle-blur":new zn(gt.paint_circle["circle-blur"]),"circle-opacity":new zn(gt.paint_circle["circle-opacity"]),"circle-translate":new Pn(gt.paint_circle["circle-translate"]),"circle-translate-anchor":new Pn(gt.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Pn(gt.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Pn(gt.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new zn(gt.paint_circle["circle-stroke-width"]),"circle-stroke-color":new zn(gt.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new zn(gt.paint_circle["circle-stroke-opacity"])})},mo="undefined"!=typeof Float32Array?Float32Array:Array;function go(){var t=new mo(9);return mo!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function yo(){var t=new mo(3);return mo!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function vo(t,e,r){var n=new mo(3);return n[0]=t,n[1]=e,n[2]=r,n}Math.PI;function _o(t,e,r){var n=e[0],i=e[1],o=e[2],a=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*o+r[12]*a,t[1]=r[1]*n+r[5]*i+r[9]*o+r[13]*a,t[2]=r[2]*n+r[6]*i+r[10]*o+r[14]*a,t[3]=r[3]*n+r[7]*i+r[11]*o+r[15]*a,t}function xo(){var t=new mo(4);return mo!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}yo(),function(){var t;t=new mo(4),mo!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0)}();yo(),vo(1,0,0),vo(0,1,0),xo(),xo(),go(),function(){var t;t=new mo(2),mo!=Float32Array&&(t[0]=0,t[1]=0)}();var bo=function(t){function e(e){t.call(this,e,fo)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new Qi(t)},e.prototype.queryRadius=function(t){var e=t;return co("circle-radius",this,e)+co("circle-stroke-width",this,e)+po(this.paint.get("circle-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,o,a,s){for(var l=ho(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),o.angle,a),u=this.paint.get("circle-radius").evaluate(e,r)+this.paint.get("circle-stroke-width").evaluate(e,r),c="map"===this.paint.get("circle-pitch-alignment"),p=c?l:function(t,e){return l.map(function(t){return wo(t,e)})}(0,s),h=c?u*a:u,f=0,d=n;f<d.length;f+=1)for(var m=0,g=d[f];m<g.length;m+=1){var y=g[m],v=c?y:wo(y,s),_=h,x=_o([],[y.x,y.y,0,1],s);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?_*=x[3]/o.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(_*=o.cameraToCenterDistance/x[3]),to(p,v,_))return!0}return!1},e}(Fn);function wo(t,e){var r=_o([],[t.x,t.y,0,1],e);return new i(r[0]/r[3],r[1]/r[3])}var Eo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Qi);function To(t,e,r,n){var i=e.width,o=e.height;if(n){if(n.length!==i*o*r)throw new RangeError("mismatched image size")}else n=new Uint8Array(i*o*r);return t.width=i,t.height=o,t.data=n,t}
vendor: 5,044 bytes, line 65
65function So(t,e,r){var n=e.width,i=e.height;if(n!==t.width||i!==t.height){var o=To({},{width:n,height:i},r);Co(t,o,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,n),height:Math.min(t.height,i)},r),t.width=n,t.height=i,t.data=o.data}}function Co(t,e,r,n,i,o){if(0===i.width||0===i.height)return e;if(i.width>t.width||i.height>t.height||r.x>t.width-i.width||r.y>t.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>e.width||i.height>e.height||n.x>e.width-i.width||n.y>e.height-i.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=t.data,s=e.data,l=0;l<i.height;l++)for(var u=((r.y+l)*t.width+r.x)*o,c=((n.y+l)*e.width+n.x)*o,p=0;p<i.width*o;p++)s[c+p]=a[u+p];return e}an("HeatmapBucket",Eo,{omit:["layers"]});var Ao=function(t,e){To(this,t,1,e)};Ao.prototype.resize=function(t){So(this,t,1)},Ao.prototype.clone=function(){return new Ao({width:this.width,height:this.height},new Uint8Array(this.data))},Ao.copy=function(t,e,r,n,i){Co(t,e,r,n,i,1)};var Io=function(t,e){To(this,t,4,e)};Io.prototype.resize=function(t){So(this,t,4)},Io.prototype.clone=function(){return new Io({width:this.width,height:this.height},new Uint8Array(this.data))},Io.copy=function(t,e,r,n,i){Co(t,e,r,n,i,4)},an("AlphaImage",Ao),an("RGBAImage",Io);var Do={paint:new Bn({"heatmap-radius":new zn(gt.paint_heatmap["heatmap-radius"]),"heatmap-weight":new zn(gt.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Pn(gt.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Rn(gt.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Pn(gt.paint_heatmap["heatmap-opacity"])})};function ko(t,e){for(var r=new Uint8Array(1024),n={},i=0,o=0;i<256;i++,o+=4){n[e]=i/255;var a=t.evaluate(n);r[o+0]=Math.floor(255*a.r/a.a),r[o+1]=Math.floor(255*a.g/a.a),r[o+2]=Math.floor(255*a.b/a.a),r[o+3]=Math.floor(255*a.a)}return new Io({width:256,height:1},r)}var Mo=function(t){function e(e){t.call(this,e,Do),this._updateColorRamp()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new Eo(t)},e.prototype._handleSpecialPaintPropertyUpdate=function(t){"heatmap-color"===t&&this._updateColorRamp()},e.prototype._updateColorRamp=function(){var t=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=ko(t,"heatmapDensity"),this.colorRampTexture=null},e.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility},e}(Fn),Po={paint:new Bn({"hillshade-illumination-direction":new Pn(gt.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new Pn(gt.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Pn(gt.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Pn(gt.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Pn(gt.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Pn(gt.paint_hillshade["hillshade-accent-color"])})},zo=function(t){function e(e){t.call(this,e,Po)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility},e}(Fn),Lo=jn([{name:"a_pos",components:2,type:"Int16"}],4),Oo=Lo.members,Ro=(Lo.size,Lo.alignment,Fo),Bo=Fo;function Fo(t,e,r){r=r||2;var n,i,o,a,s,l,u,c=e&&e.length,p=c?e[0]*r:t.length,h=No(t,0,p,r,!0),f=[];if(!h||h.next===h.prev)return f;if(c&&(h=function(t,e,r,n){var i,o,a,s=[];for(i=0,o=e.length;i<o;i++)(a=No(t,e[i]*n,i<o-1?e[i+1]*n:t.length,n,!1))===a.next&&(a.steiner=!0),s.push(Yo(a));for(s.sort(Wo),i=0;i<s.length;i++)Zo(s[i],r),r=Uo(r,r.next);return r}(t,e,h,r)),t.length>80*r){n=o=t[0],i=a=t[1];for(var d=r;d<p;d+=r)(s=t[d])<n&&(n=s),(l=t[d+1])<i&&(i=l),s>o&&(o=s),l>a&&(a=l);u=0!==(u=Math.max(o-n,a-i))?1/u:0}return Vo(h,f,r,n,i,u),f}function No(t,e,r,n,i){var o,a;if(i===aa(t,e,r,n)>0)for(o=e;o<r;o+=n)a=na(o,t[o],t[o+1],a);else for(o=r-n;o>=e;o-=n)a=na(o,t[o],t[o+1],a);return a&&$o(a,a.next)&&(ia(a),a=a.next),a}function Uo(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!$o(n,n.next)&&0!==Qo(n.prev,n,n.next))n=n.next;else{if(ia(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function Vo(t,e,r,n,i,o,a){if(t){!a&&o&&function(t,e,r,n){var i=t;do{null===i.z&&(i.z=Xo(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,o,a,s,l,u=1;do{for(r=t,t=null,o=null,a=0;r;){for(a++,n=r,s=0,e=0;e<u&&(s++,n=n.nextZ);e++);for(l=u;s>0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;r=n}o.nextZ=null,u*=2}while(a>1)}(i)}(t,n,i,o);for(var s,l,u=t;t.prev!==t.next;
vendor: 2,943 bytes, line 65
65)if(s=t.prev,l=t.next,o?qo(t,n,i,o):jo(t))e.push(s.i/r),e.push(t.i/r),e.push(l.i/r),ia(t),t=l.next,u=l.next;else if((t=l)===u){a?1===a?Vo(t=Ho(t,e,r),e,r,n,i,o,2):2===a&&Go(t,e,r,n,i,o):Vo(Uo(t),e,r,n,i,o,1);break}}}function jo(t){var e=t.prev,r=t,n=t.next;if(Qo(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Ko(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&Qo(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function qo(t,e,r,n){var i=t.prev,o=t,a=t.next;if(Qo(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,l=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,u=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,c=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,p=Xo(s,l,e,r,n),h=Xo(u,c,e,r,n),f=t.prevZ,d=t.nextZ;f&&f.z>=p&&d&&d.z<=h;){if(f!==t.prev&&f!==t.next&&Ko(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Qo(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,d!==t.prev&&d!==t.next&&Ko(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Qo(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;f&&f.z>=p;){if(f!==t.prev&&f!==t.next&&Ko(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Qo(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;d&&d.z<=h;){if(d!==t.prev&&d!==t.next&&Ko(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Qo(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function Ho(t,e,r){var n=t;do{var i=n.prev,o=n.next.next;!$o(i,o)&&ta(i,n,n.next,o)&&ea(i,o)&&ea(o,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(o.i/r),ia(n),ia(n.next),n=t=o),n=n.next}while(n!==t);return n}function Go(t,e,r,n,i,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Jo(a,s)){var l=ra(a,s);return a=Uo(a,a.next),l=Uo(l,l.next),Vo(a,e,r,n,i,o),void Vo(l,e,r,n,i,o)}s=s.next}a=a.next}while(a!==t)}function Wo(t,e){return t.x-e.x}function Zo(t,e){if(e=function(t,e){var r,n=e,i=t.x,o=t.y,a=-1/0;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){var s=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>a){if(a=s,s===i){if(o===n.y)return n;if(o===n.next.y)return n.next}r=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!r)return null;if(i===a)return r.prev;var l,u=r,c=r.x,p=r.y,h=1/0;for(n=r.next;n!==u;)i>=n.x&&n.x>=c&&i!==n.x&&Ko(o<p?i:a,o,c,p,o<p?a:i,o,n.x,n.y)&&((l=Math.abs(o-n.y)/(i-n.x))<h||l===h&&n.x>r.x)&&ea(n,t)&&(r=n,h=l),n=n.next;return r}(t,e)){var r=ra(e,t);Uo(r,r.next)}}function Xo(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Yo(t){var e=t,r=t;do{(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next}while(e!==t);return r}function Ko(t,e,r,n,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(n-s)-(r-a)*(e-s)>=0&&(r-a)*(o-s)-(i-a)*(n-s)>=0}function Jo(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&ta(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&ea(t,e)&&ea(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{r.y>o!=r.next.y>
vendor: 20,917 bytes, line 65
65o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)}function Qo(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function $o(t,e){return t.x===e.x&&t.y===e.y}function ta(t,e,r,n){return!!($o(t,e)&&$o(r,n)||$o(t,n)&&$o(r,e))||Qo(t,e,r)>0!=Qo(t,e,n)>0&&Qo(r,n,t)>0!=Qo(r,n,e)>0}function ea(t,e){return Qo(t.prev,t,t.next)<0?Qo(t,e,t.next)>=0&&Qo(t,t.prev,e)>=0:Qo(t,e,t.prev)<0||Qo(t,t.next,e)<0}function ra(t,e){var r=new oa(t.i,t.x,t.y),n=new oa(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function na(t,e,r,n){var i=new oa(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function ia(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function oa(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function aa(t,e,r,n){for(var i=0,o=e,a=r-n;o<r;o+=n)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}function sa(t,e,r,n,i){!function t(e,r,n,i,o){for(;i>n;){if(i-n>600){var a=i-n+1,s=r-n+1,l=Math.log(a),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(a-u)/a)*(s-a/2<0?-1:1);t(e,r,Math.max(n,Math.floor(r-s*u/a+c)),Math.min(i,Math.floor(r+(a-s)*u/a+c)),o)}var p=e[r],h=n,f=i;for(la(e,n,r),o(e[i],p)>0&&la(e,n,i);h<f;){for(la(e,h,f),h++,f--;o(e[h],p)<0;)h++;for(;o(e[f],p)>0;)f--}0===o(e[n],p)?la(e,n,f):la(e,++f,i),f<=r&&(n=f+1),r<=f&&(i=f-1)}}(t,e,r||0,n||t.length-1,i||ua)}function la(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function ua(t,e){return t<e?-1:t>e?1:0}function ca(t,e){var r=t.length;if(r<=1)return[t];for(var n,i,o=[],a=0;a<r;a++){var s=T(t[a]);0!==s&&(t[a].area=Math.abs(s),void 0===i&&(i=s<0),i===s<0?(n&&o.push(n),n=[t[a]]):n.push(t[a]))}if(n&&o.push(n),e>1)for(var l=0;l<o.length;l++)o[l].length<=e||(sa(o[l],e,1,o[l].length-1,pa),o[l]=o[l].slice(0,e));return o}function pa(t,e){return e.area-t.area}function ha(t,e,r){for(var n=r.patternDependencies,i=!1,o=0,a=e;o<a.length;o+=1){var s=a[o].paint.get(t+"-pattern");s.isConstant()||(i=!0);var l=s.constantOr(null);l&&(i=!0,n[l.to]=!0,n[l.from]=!0)}return i}function fa(t,e,r,n,i){for(var o=i.patternDependencies,a=0,s=e;a<s.length;a+=1){var l=s[a],u=l.paint.get(t+"-pattern").value;if("constant"!==u.kind){var c=u.evaluate({zoom:n-1},r,{}),p=u.evaluate({zoom:n},r,{}),h=u.evaluate({zoom:n+1},r,{});o[c]=!0,o[p]=!0,o[h]=!0,r.patterns[l.id]={min:c,mid:p,max:h}}}return r}Fo.deviation=function(t,e,r,n){var i=e&&e.length,o=i?e[0]*r:t.length,a=Math.abs(aa(t,0,o,r));if(i)for(var s=0,l=e.length;s<l;s++){var u=e[s]*r,c=s<l-1?e[s+1]*r:t.length;a-=Math.abs(aa(t,u,c,r))}var p=0;for(s=0;s<n.length;s+=3){var h=n[s]*r,f=n[s+1]*r,d=n[s+2]*r;p+=Math.abs((t[h]-t[d])*(t[f+1]-t[h+1])-(t[h]-t[f])*(t[d+1]-t[h+1]))}return 0===a&&0===p?0:Math.abs((p-a)/a)},Fo.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var a=0;a<e;a++)r.vertices.push(t[i][o][a]);i>0&&(n+=t[i-1].length,r.holes.push(n))}return r},Ro.default=Bo;var da=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Hn,this.indexArray=new ai,this.indexArray2=new si,this.programConfigurations=new Gi(Oo,t.layers,t.zoom),this.segments=new Si,this.segments2=new Si,this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};da.prototype.populate=function(t,e){this.features=[],this.hasPattern=ha("fill",this.layers,e);for(var r=0,n=t;r<n.length;r+=1){var i=n[r],o=i.feature,a=i.index,s=i.sourceLayerIndex;if(this.layers[0]._featureFilter(new En(this.zoom),o)){var l=Ki(o),u={sourceLayerIndex:s,index:a,geometry:l,properties:o.properties,type:o.type,patterns:{}};void 0!==o.id&&(u.id=o.id),this.hasPattern?this.features.push(fa("fill",this.layers,u,this.zoom,e)):this.addFeature(u,l,a,{}),e.featureIndex.insert(o,l,a,s,this.index)}}},da.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},da.prototype.addFeatures=function(t,e){for(var r=0,n=this.features;r<n.length;r+=1){var i=n[r],o=i.geometry;this.addFeature(i,o,i.index,e)}},da.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},da.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},da.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Oo),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),this.uploaded=!0},da.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},da.prototype.addFeature=function(t,e,r,n){for(var i=0,o=ca(e,500);i<o.length;i+=1){for(var a=o[i],s=0,l=0,u=a;l<u.length;l+=1)s+=u[l].length;for(var c=this.segments.prepareSegment(s,this.layoutVertexArray,this.indexArray),p=c.vertexLength,h=[],f=[],d=0,m=a;d<m.length;d+=1){var g=m[d];if(0!==g.length){g!==a[0]&&f.push(h.length/2);var y=this.segments2.prepareSegment(g.length,this.layoutVertexArray,this.indexArray2),v=y.vertexLength;this.layoutVertexArray.emplaceBack(g[0].x,g[0].y),this.indexArray2.emplaceBack(v+g.length-1,v),h.push(g[0].x),h.push(g[0].y);for(var _=1;_<g.length;_++)this.layoutVertexArray.emplaceBack(g[_].x,g[_].y),this.indexArray2.emplaceBack(v+_-1,v+_),h.push(g[_].x),h.push(g[_].y);y.vertexLength+=g.length,y.primitiveLength+=g.length}}for(var x=Ro(h,f),b=0;b<x.length;b+=3)this.indexArray.emplaceBack(p+x[b],p+x[b+1],p+x[b+2]);c.vertexLength+=s,c.primitiveLength+=x.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,n)},an("FillBucket",da,{omit:["layers","features"]});var ma={paint:new Bn({"fill-antialias":new Pn(gt.paint_fill["fill-antialias"]),"fill-opacity":new zn(gt.paint_fill["fill-opacity"]),"fill-color":new zn(gt.paint_fill["fill-color"]),"fill-outline-color":new zn(gt.paint_fill["fill-outline-color"]),"fill-translate":new Pn(gt.paint_fill["fill-translate"]),"fill-translate-anchor":new Pn(gt.paint_fill["fill-translate-anchor"]),"fill-pattern":new Ln(gt.paint_fill["fill-pattern"])})},ga=function(t){function e(e){t.call(this,e,ma)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e);var r=this.paint._values["fill-outline-color"];"constant"===r.value.kind&&void 0===r.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},e.prototype.createBucket=function(t){return new da(t)},e.prototype.queryRadius=function(){return po(this.paint.get("fill-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,o,a){return eo(ho(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),o.angle,a),n)},e}(Fn),ya=jn([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),va=ya.members,_a=(ya.size,ya.alignment,Math.pow(2,13));function xa(t,e,r,n,i,o,a,s){t.emplaceBack(e,r,2*Math.floor(n*_a)+a,i*_a*2,o*_a*2,Math.round(s))}var ba=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Wn,this.indexArray=new ai,this.programConfigurations=new Gi(va,t.layers,t.zoom),this.segments=new Si,this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};function wa(t,e){return t.x===e.x&&(t.x<0||t.x>Xi)||t.y===e.y&&(t.y<0||t.y>Xi)}function Ea(t){return t.every(function(t){return t.x<0})||t.every(function(t){return t.x>Xi})||t.every(function(t){return t.y<0})||t.every(function(t){return t.y>Xi})}ba.prototype.populate=function(t,e){this.features=[],this.hasPattern=ha("fill-extrusion",this.layers,e);for(var r=0,n=t;r<n.length;r+=1){var i=n[r],o=i.feature,a=i.index,s=i.sourceLayerIndex;if(this.layers[0]._featureFilter(new En(this.zoom),o)){var l=Ki(o),u={sourceLayerIndex:s,index:a,geometry:l,properties:o.properties,type:o.type,patterns:{}};void 0!==o.id&&(u.id=o.id),this.hasPattern?this.features.push(fa("fill-extrusion",this.layers,u,this.zoom,e)):this.addFeature(u,l,a,{}),e.featureIndex.insert(o,l,a,s,this.index,!0)}}},ba.prototype.addFeatures=function(t,e){for(var r=0,n=this.features;r<n.length;r+=1){var i=n[r],o=i.geometry;this.addFeature(i,o,i.index,e)}},ba.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},ba.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},ba.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},ba.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,va),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},ba.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},ba.prototype.addFeature=function(t,e,r,n){for(var i=0,o=ca(e,500);i<o.length;i+=1){for(var a=o[i],s=0,l=0,u=a;l<u.length;l+=1)s+=u[l].length;for(var c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),p=0,h=a;p<h.length;p+=1){var f=h[p];if(0!==f.length&&!Ea(f))for(var d=0,m=0;m<f.length;m++){var g=f[m];if(m>=1){var y=f[m-1];if(!wa(g,y)){c.vertexLength+4>Si.MAX_VERTEX_ARRAY_LENGTH&&(c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var v=g.sub(y)._perp()._unit(),_=y.dist(g);d+_>32768&&(d=0),xa(this.layoutVertexArray,g.x,g.y,v.x,v.y,0,0,d),xa(this.layoutVertexArray,g.x,g.y,v.x,v.y,0,1,d),d+=_,xa(this.layoutVertexArray,y.x,y.y,v.x,v.y,0,0,d),xa(this.layoutVertexArray,y.x,y.y,v.x,v.y,0,1,d);var x=c.vertexLength;this.indexArray.emplaceBack(x,x+2,x+1),this.indexArray.emplaceBack(x+1,x+2,x+3),c.vertexLength+=4,c.primitiveLength+=2}}}}c.vertexLength+s>Si.MAX_VERTEX_ARRAY_LENGTH&&(c=this.segments.prepareSegment(s,this.layoutVertexArray,this.indexArray));for(var b=[],w=[],E=c.vertexLength,T=0,S=a;T<S.length;T+=1){var C=S[T];if(0!==C.length){C!==a[0]&&w.push(b.length/2);for(var A=0;A<C.length;A++){var I=C[A];xa(this.layoutVertexArray,I.x,I.y,0,0,1,1,0),b.push(I.x),b.push(I.y)}}}for(var D=Ro(b,w),k=0;k<D.length;k+=3)this.indexArray.emplaceBack(E+D[k],E+D[k+2],E+D[k+1]);c.primitiveLength+=D.length/3,c.vertexLength+=s}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,n)},an("FillExtrusionBucket",ba,{omit:["layers","features"]});var Ta={paint:new Bn({"fill-extrusion-opacity":new Pn(gt["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new zn(gt["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Pn(gt["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Pn(gt["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Ln(gt["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new zn(gt["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new zn(gt["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Pn(gt["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})},Sa=function(t){function e(e){t.call(this,e,Ta)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new ba(t)},e.prototype.queryRadius=function(){return po(this.paint.get("fill-extrusion-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,o,a,s,l){var u=ho(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),a.angle,s),c=this.paint.get("fill-extrusion-height").evaluate(e,r),p=this.paint.get("fill-extrusion-base").evaluate(e,r),h=function(t,e,r,n){for(var o=[],a=0,s=t;a<s.length;a+=1){var l=s[a],u=[l.x,l.y,0,1];_o(u,u,e),o.push(new i(u[0]/u[3],u[1]/u[3]))}return o}(u,l),f=function(t,e,r,n){for(var o=[],a=[],s=n[8]*e,l=n[9]*e,u=n[10]*e,c=n[11]*e,p=n[8]*r,h=n[9]*r,f=n[10]*r,d=n[11]*r,m=0,g=t;m<g.length;m+=1){for(var y=[],v=[],_=0,x=g[m];_<x.length;_+=1){var b=x[_],w=b.x,E=b.y,T=n[0]*w+n[4]*E+n[12],S=n[1]*w+n[5]*E+n[13],C=n[2]*w+n[6]*E+n[14],A=n[3]*w+n[7]*E+n[15],I=C+u,D=A+c,k=T+p,M=S+h,P=C+f,z=A+d,L=new i((T+s)/D,(S+l)/D);L.z=I/D,y.push(L);var O=new i(k/z,M/z);O.z=P/z,v.push(O)}o.push(y),a.push(v)}return[o,a]}(n,p,c,l);return function(t,e,r){var n=1/0;eo(r,e)&&(n=Aa(r,e[0]));for(var i=0;i<e.length;i++)for(var o=e[i],a=t[i],s=0;s<o.length-1;s++){var l=o[s],u=o[s+1],c=a[s],p=[l,u,a[s+1],c,l];$i(r,p)&&(n=Math.min(n,Aa(r,p)))}return n!==1/0&&n}(f[0],f[1],h)},e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("fill-extrusion-opacity")&&"none"!==this.visibility},e.prototype.resize=function(){this.viewportFrame&&(this.viewportFrame.destroy(),this.viewportFrame=null)},e}(Fn);function Ca(t,e){return t.x*e.x+t.y*e.y}function Aa(t,e){if(1===t.length){var r=e[0],n=e[1],i=e[3],o=t[0],a=n.sub(r),s=i.sub(r),l=o.sub(r),u=Ca(a,a),c=Ca(a,s),p=Ca(s,s),h=Ca(l,a),f=Ca(l,s),d=u*p-c*c,m=(p*h-c*f)/d,g=(u*f-c*h)/d,y=1-m-g;return r.z*y+n.z*m+i.z*g}for(var v=1/0,_=0,x=e;_<x.length;_+=1){var b=x[_];v=Math.min(v,b.z)}return v}var Ia=jn([{name:"a_pos_normal",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),Da=Ia.members,ka=(Ia.size,Ia.alignment,Ma);function Ma(t,e,r,n,i){this.properties={},this.extent=r,this.type=0,this._pbf=t,this._geometry=-1,this._keys=n,this._values=i,t.readFields(Pa,this,e)}function Pa(t,e,r){1==t?e.id=r.readVarint():2==t?function(t,e){for(var r=t.readVarint()+t.pos;t.pos<r;){var n=e._keys[t.readVarint()],i=e._values[t.readVarint()];e.properties[n]=i}}(r,e):3==t?e.type=r.readVarint():4==t&&(e._geometry=r.pos)}function za(t){for(var e,r,n=0,i=0,o=t.length,a=o-1;i<o;a=i++)e=t[i],n+=((r=t[a]).x-e.x)*(e.y+r.y);return n}Ma.types=["Unknown","Point","LineString","Polygon"],Ma.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,r=t.readVarint()+t.pos,n=1,o=0,a=0,s=0,l=[];t.pos<r;){if(o<=0){var u=t.readVarint();n=7&u,o=u>>3}if(o--,1===n||2===n)a+=t.readSVarint(),s+=t.readSVarint(),1===n&&(e&&l.push(e),e=[]),e.push(new i(a,s));else{if(7!==n)throw new Error("unknown command "+n);e&&e.push(e[0].clone())}}return e&&l.push(e),l},Ma.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,n=0,i=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;t.pos<e;){if(n<=0){var c=t.readVarint();r=7&c,n=c>>3}if(n--,1===r||2===r)(i+=t.readSVarint())<a&&(a=i),i>s&&(s=i),(o+=t.readSVarint())<l&&(l=o),o>u&&(u=o);else if(7!==r)throw new Error("unknown command "+r)}return[a,l,s,u]},Ma.prototype.toGeoJSON=function(t,e,r){var n,i,o=this.extent*Math.pow(2,r),a=this.extent*t,s=this.extent*e,l=this.loadGeometry(),u=Ma.types[this.type];function c(t){for(var e=0;e<t.length;e++){var r=t[e],n=180-360*(r.y+s)/o;t[e]=[360*(r.x+a)/o-180,360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90]}}switch(this.type){case 1:var p=[];for(n=0;n<l.length;n++)p[n]=l[n][0];c(l=p);break;case 2:for(n=0;n<l.length;n++)c(l[n]);break;case 3:for(l=function(t){var e=t.length;if(e<=1)return[t];for(var r,n,i=[],o=0;o<e;o++){var a=za(t[o]);0!==a&&(void 0===n&&(n=a<0),n===a<0?(r&&i.push(r),r=[t[o]]):r.push(t[o]))}return r&&i.push(r),i}(l),n=0;n<l.length;n++)for(i=0;i<l[n].length;i++)c(l[n][i])}1===l.length?l=l[0]:u="Multi"+u;var h={type:"Feature",geometry:{type:u,coordinates:l},properties:this.properties};return"id"in this&&(h.id=this.id),h};var La=Oa;function Oa(t,e){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(Ra,this,e),this.length=this._features.length}function Ra(t,e,r){15===t?e.version=r.readVarint():1===t?e.name=r.readString():5===t?e.extent=r.readVarint():2===t?e._features.push(r.pos):3===t?e._keys.push(r.readString()):4===t&&e._values.push(function(t){for(var e=null,r=t.readVarint()+t.pos;t.pos<r;){var n=t.readVarint()>>3;e=1===n?t.readString():2===n?t.readFloat():3===n?t.readDouble():4===n?t.readVarint64():5===n?t.readVarint():6===n?t.readSVarint():7===n?t.readBoolean():null}return e}(r))}function Ba(t,e,r){if(3===t){var n=new La(r,r.readVarint()+r.pos);n.length&&(e[n.name]=n)}}Oa.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new ka(this._pbf,e,this.extent,this._keys,this._values)};var Fa={VectorTile:function(t,e){this.layers=t.readFields(Ba,{},e)},VectorTileFeature:ka,VectorTileLayer:La},Na=Fa.VectorTileFeature.types,Ua=63,Va=Math.cos(Math.PI/180*37.5),ja=.5,qa=Math.pow(2,14)/ja;function Ha(t,e,r,n,i,o,a){t.emplaceBack(e.x,e.y,n?1:0,i?1:-1,Math.round(Ua*r.x)+128,Math.round(Ua*r.y)+128,1+(0===o?0:o<0?-1:1)|(a*ja&63)<<2,a*ja>>6)}var Ga=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.features=[],this.hasPattern=!1,this.layoutVertexArray=new Zn,this.indexArray=new ai,this.programConfigurations=new Gi(Da,t.layers,t.zoom),this.segments=new Si,this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};function Wa(t,e){return(t/e.tileTotal*(e.end-e.start)+e.start)*(qa-1)}Ga.prototype.populate=function(t,e){this.features=[],this.hasPattern=ha("line",this.layers,e);for(var r=0,n=t;r<n.length;r+=1){var i=n[r],o=i.feature,a=i.index,s=i.sourceLayerIndex;if(this.layers[0]._featureFilter(new En(this.zoom),o)){var l=Ki(o),u={sourceLayerIndex:s,index:a,geometry:l,properties:o.properties,type:o.type,patterns:{}};void 0!==o.id&&(u.id=o.id),this.hasPattern?this.features.push(fa("line",this.layers,u,this.zoom,e)):this.addFeature(u,l,a,{}),e.featureIndex.insert(o,l,a,s,this.index)}}},Ga.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},Ga.prototype.addFeatures=function(t,e){for(var r=0,n=this.features;r<n.length;r+=1){var i=n[r],o=i.geometry;this.addFeature(i,o,i.index,e)}},Ga.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Ga.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Ga.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Da),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},Ga.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Ga.prototype.addFeature=function(t,e,r,n){for(var i=this.layers[0].layout,o=i.get("line-join").evaluate(t,{}),a=i.get("line-cap"),s=i.get("line-miter-limit"),l=i.get("line-round-limit"),u=0,c=e;u<c.length;u+=1){var p=c[u];this.addLine(p,t,o,a,s,l,r,n)}},Ga.prototype.addLine=function(t,e,r,n,i,o,a,s){var l=null;e.properties&&e.properties.hasOwnProperty("mapbox_clip_start")&&e.properties.hasOwnProperty("mapbox_clip_end")&&(l={start:e.properties.mapbox_clip_start,end:e.properties.mapbox_clip_end,tileTotal:void 0});for(var u="Polygon"===Na[e.type],c=t.length;c>=2&&t[c-1].equals(t[c-2]);)c--;for(var p=0;p<c-1&&t[p].equals(t[p+1]);)p++;if(!(c<(u?3:2))){l&&(l.tileTotal=function(t,e,r){for(var n,i,o=0,a=p;a<r-1;a++)n=t[a],i=t[a+1],o+=n.dist(i);return o}(t,0,c)),"bevel"===r&&(i=1.05);var h=Xi/(512*this.overscaling)*15,f=t[p],d=this.segments.prepareSegment(10*c,this.layoutVertexArray,this.indexArray);this.distance=0;var m,g,y,v=n,_=u?"butt":n,x=!0,b=void 0,w=void 0,E=void 0,T=void 0;this.e1=this.e2=this.e3=-1,u&&(m=t[c-2],T=f.sub(m)._unit()._perp());for(var S=p;S<c;S++)if(!(w=u&&S===c-1?t[p+1]:t[S+1])||!t[S].equals(w)){T&&(E=T),m&&(b=m),m=t[S],T=w?w.sub(m)._unit()._perp():E;var C=(E=E||T).add(T);0===C.x&&0===C.y||C._unit();var A=C.x*T.x+C.y*T.y,I=0!==A?1/A:1/0,D=A<Va&&b&&w;if(D&&S>p){var k=m.dist(b);if(k>2*h){var M=m.sub(m.sub(b)._mult(h/k)._round());this.distance+=M.dist(b),this.addCurrentVertex(M,this.distance,E.mult(1),0,0,!1,d,l),b=M}}var P=b&&w,z=P?r:w?v:_;if(P&&"round"===z&&(I<o?z="miter":I<=2&&(z="fakeround")),"miter"
65===z&&I>i&&(z="bevel"),"bevel"===z&&(I>2&&(z="flipbevel"),I<i&&(z="miter")),b&&(this.distance+=m.dist(b)),"miter"===z)C._mult(I),this.addCurrentVertex(m,this.distance,C,0,0,!1,d,l);else if("flipbevel"===z){if(I>100)C=T.clone().mult(-1);else{var L=E.x*T.y-E.y*T.x>0?-1:1,O=I*E.add(T).mag()/E.sub(T).mag();C._perp()._mult(O*L)}this.addCurrentVertex(m,this.distance,C,0,0,!1,d,l),this.addCurrentVertex(m,this.distance,C.mult(-1),0,0,!1,d,l)}else if("bevel"===z||"fakeround"===z){var R=E.x*T.y-E.y*T.x>0,B=-Math.sqrt(I*I-1);if(R?(y=0,g=B):(g=0,y=B),x||this.addCurrentVertex(m,this.distance,E,g,y,!1,d,l),"fakeround"===z){for(var F=Math.floor(8*(.5-(A-.5))),N=void 0,U=0;U<F;U++)N=T.mult((U+1)/(F+1))._add(E)._unit(),this.addPieSliceVertex(m,this.distance,N,R,d,l);this.addPieSliceVertex(m,this.distance,C,R,d,l);for(var V=F-1;V>=0;V--)N=E.mult((V+1)/(F+1))._add(T)._unit(),this.addPieSliceVertex(m,this.distance,N,R,d,l)}w&&this.addCurrentVertex(m,this.distance,T,-g,-y,!1,d,l)}else"butt"===z?(x||this.addCurrentVertex(m,this.distance,E,0,0,!1,d,l),w&&this.addCurrentVertex(m,this.distance,T,0,0,!1,d,l)):"square"===z?(x||(this.addCurrentVertex(m,this.distance,E,1,1,!1,d,l),this.e1=this.e2=-1),w&&this.addCurrentVertex(m,this.distance,T,-1,-1,!1,d,l)):"round"===z&&(x||(this.addCurrentVertex(m,this.distance,E,0,0,!1,d,l),this.addCurrentVertex(m,this.distance,E,1,1,!0,d,l),this.e1=this.e2=-1),w&&(this.addCurrentVertex(m,this.distance,T,-1,-1,!0,d,l),this.addCurrentVertex(m,this.distance,T,0,0,!1,d,l)));if(D&&S<c-1){var j=m.dist(w);if(j>2*h){var q=m.add(w.sub(m)._mult(h/j)._round());this.distance+=q.dist(m),this.addCurrentVertex(q,this.distance,T.mult(1),0,0,!1,d,l),m=q}}x=!1}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,a,s)}},Ga.prototype.addCurrentVertex=function(t,e,r,n,i,o,a,s){var l,u=this.layoutVertexArray,c=this.indexArray;s&&(e=Wa(e,s)),l=r.clone(),n&&l._sub(r.perp()._mult(n)),Ha(u,t,l,o,!1,n,e),this.e3=a.vertexLength++,this.e1>=0&&this.e2>=0&&(c.emplaceBack(this.e1,this.e2,this.e3),a.primitiveLength++),this.e1=this.e2,this.e2=this.e3,l=r.mult(-1),i&&l._sub(r.perp()._mult(i)),Ha(u,t,l,o,!0,-i,e),this.e3=a.vertexLength++,this.e1>=0&&this.e2>=0&&(c.emplaceBack(this.e1,this.e2,this.e3),a.primitiveLength++),this.e1=this.e2,this.e2=this.e3,e>qa/2&&!s&&(this.distance=0,this.addCurrentVertex(t,this.distance,r,n,i,o,a))},Ga.prototype.addPieSliceVertex=function(t,e,r,n,i,o){r=r.mult(n?-1:1);var a=this.layoutVertexArray,s=this.indexArray;o&&(e=Wa(e,o)),Ha(a,t,r,!1,n,0,e),this.e3=i.vertexLength++,this.e1>=0&&this.e2>=0&&(s.emplaceBack(this.e1,this.e2,this.e3),i.primitiveLength++),n?this.e2=this.e3:this.e1=this.e3},an("LineBucket",Ga,{omit:["layers","features"]});var Za=new Bn({"line-cap":new Pn(gt.layout_line["line-cap"]),"line-join":new zn(gt.layout_line["line-join"]),"line-miter-limit":new Pn(gt.layout_line["line-miter-limit"]),"line-round-limit":new Pn(gt.layout_line["line-round-limit"])}),Xa={paint:new Bn({"line-opacity":new zn(gt.paint_line["line-opacity"]),"line-color":new zn(gt.paint_line["line-color"]),"line-translate":new Pn(gt.paint_line["line-translate"]),"line-translate-anchor":new Pn(gt.paint_line["line-translate-anchor"]),"line-width":new zn(gt.paint_line["line-width"]),"line-gap-width":new zn(gt.paint_line["line-gap-width"]),"line-offset":new zn(gt.paint_line["line-offset"]),"line-blur":new zn(gt.paint_line["line-blur"]),"line-dasharray":new On(gt.paint_line["line-dasharray"]),"line-pattern":new Ln(gt.paint_line["line-pattern"]),"line-gradient":new Rn(gt.paint_line["line-gradient"])}),layout:Za},Ya=new(function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.possiblyEvaluate=function(e,r){return r=new En(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),t.prototype.possiblyEvaluate.call(this,e,r)},e.prototype.evaluate=function(e,r,n,i){return r=p({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,n,i)},e}(zn))(Xa.paint.properties["line-width"].specification);Ya.useIntegerZoom=!0;var Ka=function(t){function e(e){t.call(this,e,Xa)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._handleSpecialPaintPropertyUpdate=function(t){"line-gradient"===t&&this._updateGradient()},e.prototype._updateGradient=function(){var t=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=ko(t,"lineProgress"),this.gradientTexture=null},e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),this.paint._values["line-floorwidth"]=Ya.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)},e.prototype.createBucket=function(t){return new Ga(t)},e.prototype.queryRadius=function(t){var e=t,r=Ja(co("line-width",this,e),co("line-gap-width",this,e)),n=co("line-offset",this,e);return r/2+Math.abs(n)+po(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,o,a,s){var l=ho(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),a.angle,s),u=s/2*Ja(this.paint.get("line-width").evaluate(e,r),this.paint.get("line-gap-width").evaluate(e,r)),c=this.paint.get("line-offset").evaluate(e,r);return c&&(n=function(t,e){for(var r=[],n=new i(0,0),o=0;o<t.length;o++){for(var a=t[o],s=[],l=0;l<a.length;l++){var u=a[l-1],c=a[l],p=a[l+1],h=0===l?n:c.sub(u)._unit()._perp(),f=l===a.length-1?n:p.sub(c)._unit()._perp(),d=h._add(f)._unit(),m=d.x*f.x+d.y*f.y;d._mult(1/m),s.push(d._mult(e)._add(c))}r.push(s)}return r}(n,c*s)),function(t,e,r){for(var n=0;n<e.length;n++){var i=e[n];if(t.length>=3)for(var o=0;o<i.length;o++)if(lo(t,i[o]))return!0;
vendor: 13,771 bytes, line 65
65if(ro(t,i,r))return!0}return!1}(l,n,u)},e}(Fn);function Ja(t,e){return e>0?e+2*t:t}var Qa=jn([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"}]),$a=jn([{name:"a_projected_pos",components:3,type:"Float32"}],4),ts=(jn([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),jn([{name:"a_placed",components:2,type:"Uint8"}],4)),es=(jn([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"radius"},{type:"Int16",name:"signedDistanceFromAnchor"}]),jn([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),rs=jn([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4);function ns(t,e,r){return t.sections.forEach(function(t){t.text=function(t,e,r){var n=e.layout.get("text-transform").evaluate(r,{});return"uppercase"===n?t=t.toLocaleUpperCase():"lowercase"===n&&(t=t.toLocaleLowerCase()),wn.applyArabicShaping&&(t=wn.applyArabicShaping(t)),t}(t.text,e,r)}),t}jn([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"hidden"}]),jn([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"horizontalPlacedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint32",name:"crossTileID"}]),jn([{type:"Float32",name:"offsetX"}]),jn([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var is={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},os=function(t){function e(e,r,n,i){t.call(this,e,r),this.angle=n,void 0!==i&&(this.segment=i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.x,this.y,this.angle,this.segment)},e}(i);an("Anchor",os);function as(t,e){var r=e.expression;if("constant"===r.kind)return{functionType:"constant",layoutSize:r.evaluate(new En(t+1))};if("source"===r.kind)return{functionType:"source"};for(var n=r.zoomStops,i=0;i<n.length&&n[i]<=t;)i++;for(var o=i=Math.max(0,i-1);o<n.length&&n[o]<t+1;)o++;o=Math.min(n.length-1,o);var a={min:n[i],max:n[o]};return"composite"===r.kind?{functionType:"composite",zoomRange:a,propertyValue:e.value}:{functionType:"camera",layoutSize:r.evaluate(new En(t+1)),zoomRange:a,sizeRange:{min:r.evaluate(new En(a.min)),max:r.evaluate(new En(a.max))},propertyValue:e.value}}var ss=Fa.VectorTileFeature.types,ls=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function us(t,e,r,n,i,o,a,s){t.emplaceBack(e,r,Math.round(32*n),Math.round(32*i),o,a,s?s[0]:0,s?s[1]:0)}function cs(t,e,r){t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r)}var ps=function(t){this.layoutVertexArray=new Yn,this.indexArray=new ai,this.programConfigurations=t,this.segments=new Si,this.dynamicLayoutVertexArray=new Kn,this.opacityVertexArray=new Jn,this.placedSymbolArray=new di};ps.prototype.upload=function(t,e,r,n){r&&(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Qa.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,$a.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,ls,!0),this.opacityVertexBuffer.itemSize=1),(r||n)&&this.programConfigurations.upload(t)},ps.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},an("SymbolBuffers",ps);var hs=function(t,e,r){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new r,this.segments=new Si,this.collisionVertexArray=new ti};hs.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,ts.members,!0)},hs.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},an("CollisionBuffers",hs);var fs=function(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasPattern=!1;var e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=as(this.zoom,e["text-size"]),this.iconSizeData=as(this.zoom,e["icon-size"]);var r=this.layers[0].layout,n=r.get("symbol-sort-key"),i=r.get("symbol-z-order");this.sortFeaturesByKey="viewport-y"!==i&&void 0!==n.constantOr(1);var o="viewport-y"===i||"auto"===i&&!this.sortFeaturesByKey;this.sortFeaturesByY=o&&(r.get("text-allow-overlap")||r.get("icon-allow-overlap")||r.get("text-ignore-placement")||r.get("icon-ignore-placement")),this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id}),this.sourceID=t.sourceID};fs.prototype.createArrays=function(){this.text=new ps(new Gi(Qa.members,this.layers,this.zoom,function(t){return/^text/.test(t)})),this.icon=new ps(new Gi(Qa.members,this.layers,this.zoom,function(t){return/^icon/.test(t)})),this.collisionBox=new hs($n,es.members,si),this.collisionCircle=new hs($n,rs.members,ai),this.glyphOffsetArray=new vi,this.lineVertexArray=new xi,this.symbolInstances=new gi},fs.prototype.calculateGlyphDependencies=function(t,e,r,n){for(var i=0;i<t.length;i++)if(e[t.charCodeAt(i)]=!0,r&&n){var o=is[t.charAt(i)];o&&(e[o.charCodeAt(0)]=!0)}},fs.prototype.populate=function(t,e){var r=this.layers[0],n=r.layout,i=n.get("text-font"),o=n.get("text-field"),a=n.get("icon-image"),s=("constant"!==o.value.kind||o.value.value.toString().length>0)&&("constant"!==i.value.kind||i.value.value.length>0),l="constant"!==a.value.kind||a.value.value&&a.value.value.length>0,u=n.get("symbol-sort-key");if(this.features=[],s||l){for(var c=e.iconDependencies,p=e.glyphDependencies,h=new En(this.zoom),f=0,d=t;f<d.length;f+=1){var m=d[f],g=m.feature,y=m.index,v=m.sourceLayerIndex;if(r._featureFilter(h,g)){var _=void 0;if(s){var x=r.getValueAndResolveTokens("text-field",g);_=ns(x instanceof Vt?x:Vt.fromString(x),r,g)}var b=void 0;if(l&&(b=r.getValueAndResolveTokens("icon-image",g)),_||b){var w=this.sortFeaturesByKey?u.evaluate(g,{}):void 0,E={text:_,icon:b,index:y,sourceLayerIndex:v,geometry:Ki(g),properties:g.properties,type:ss[g.type],sortKey:w};if(void 0!==g.id&&(E.id=g.id),this.features.push(E),b&&(c[b]=!0),_)for(var T=i.evaluate(g,{}).join(","),S="map"===n.get("text-rotation-alignment")&&"point"!==n.get("symbol-placement"),C=0,A=_.sections;C<A.length;C+=1){var I=A[C],D=hn(_.toString()),k=I.fontStack||T,M=p[k]=p[k]||{};this.calculateGlyphDependencies(I.text,M,S,D)}}}}"line"===n.get("symbol-placement")&&(this.features=function(t){var e={},r={},n=[],i=0;function o(e){n.push(t[e]),i++}function a(t,e,i){var o=r[t];return delete r[t],r[e]=o,n[o].geometry[0].pop(),n[o].geometry[0]=n[o].geometry[0].concat(i[0]),o}function s(t,r,i){var o=e[r];return delete e[r],e[t]=o,n[o].geometry[0].shift(),n[o].geometry[0]=i[0].concat(n[o].geometry[0]),o}function l(t,e,r){var n=r?e[0][e[0].length-1]:e[0][0];return t+":"+n.x+":"+n.y}for(var u=0;u<t.length;u++){var c=t[u],p=c.geometry,h=c.text?c.text.toString():null;if(h){var f=l(h,p),d=l(h,p,!0);if(f in r&&d in e&&r[f]!==e[d]){var m=s(f,d,p),g=a(f,d,n[m].geometry);delete e[f],delete r[d],r[l(h,n[g].geometry,!0)]=g,n[m].geometry=null}else f in r?a(f,d,p):d in e?s(f,d,p):(o(u),e[f]=i-1,r[d]=i-1)}else o(u)}return n.filter(function(t){return t.geometry})}(this.features)),this.sortFeaturesByKey&&this.features.sort(function(t,e){return t.sortKey-e.sortKey})}},fs.prototype.update=function(t,e,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,e,this.layers,r),this.icon.programConfigurations.updatePaintArrays(t,e,this.layers,r))},fs.prototype.isEmpty=function(){return 0===this.symbolInstances.length},fs.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},fs.prototype.upload=function(t){this.uploaded||(this.collisionBox.upload(t),this.collisionCircle.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},fs.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.collisionBox.destroy(),this.collisionCircle.destroy()},fs.prototype.addToLineVertexArray=function(t,e){var r=this.lineVertexArray.length;if(void 0!==t.segment){for(var n=t.dist(e[t.segment+1]),i=t.dist(e[t.segment]),o={},a=t.segment+1;a<e.length;a++)o[a]={x:e[a].x,y:e[a].y,tileUnitDistanceFromAnchor:n},a<e.length-1&&(n+=e[a+1].dist(e[a]));for(var s=t.segment||0;s>=0;s--)o[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:i},s>0&&(i+=e[s-1].dist(e[s]));for(var l=0;l<e.length;l++){var u=o[l];this.lineVertexArray.emplaceBack(u.x,u.y,u.tileUnitDistanceFromAnchor)}}return{lineStartIndex:r,lineLength:this.lineVertexArray.length-r}},fs.prototype.addSymbols=function(t,e,r,n,i,o,a,s,l,u){for(var c=t.indexArray,p=t.layoutVertexArray,h=t.dynamicLayoutVertexArray,f=t.segments.prepareSegment(4*e.length,t.layoutVertexArray,t.indexArray,o.sortKey),d=this.glyphOffsetArray.length,m=f.vertexLength,g=0,y=e;g<y.length;g+=1){var v=y[g],_=v.tl,x=v.tr,b=v.bl,w=v.br,E=v.tex,T=f.vertexLength,S=v.glyphOffset[1];us(p,s.x,s.y,_.x,S+_.y,E.x,E.y,r),us(p,s.x,s.y,x.x,S+x.y,E.x+E.w,E.y,r),us(p,s.x,s.y,b.x,S+b.y,E.x,E.y+E.h,r),us(p,s.x,s.y,w.x,S+w.y,E.x+E.w,E.y+E.h,r),cs(h,s,0),c.emplaceBack(T,T+1,T+2),c.emplaceBack(T+1,T+2,T+3),f.vertexLength+=4,f.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(v.glyphOffset[0])}t.placedSymbolArray.emplaceBack(s.x,s.y,d,this.glyphOffsetArray.length-d,m,l,u,s.segment,r?r[0]:0,r?r[1]:0,n[0],n[1],a,!1),t.programConfigurations.populatePaintArrays(t.layoutVertexArray.length,o,o.index,{})},fs.prototype._addCollisionDebugVertex=function(t,e,r,n,i,o){return e.emplaceBack(0,0),t.emplaceBack(r.x,r.y,n,i,Math.round(o.x),Math.round(o.y))},fs.prototype.addCollisionDebugVertices=function(t,e,r,n,o,a,s,l){var u=o.segments.prepareSegment(4,o.layoutVertexArray,o.indexArray),c=u.vertexLength,p=o.layoutVertexArray,h=o.collisionVertexArray,f=s.anchorX,d=s.anchorY;if(this._addCollisionDebugVertex(p,h,a,f,d,new i(t,e)),this._addCollisionDebugVertex(p,h,a,f,d,new i(r,e)),this._addCollisionDebugVertex(p,h,a,f,d,new i(r,n)),this._addCollisionDebugVertex(p,h,a,f,d,new i(t,n)),u.vertexLength+=4,l){var m=o.indexArray;m.emplaceBack(c,c+1,c+2),m.emplaceBack(c,c+2,c+3),u.primitiveLength+=2}else{var g=o.indexArray;g.emplaceBack(c,c+1),g.emplaceBack(c+1,c+2),g.emplaceBack(c+2,c+3),g.emplaceBack(c+3,c),u.primitiveLength+=4}},fs.prototype.addDebugCollisionBoxes=function(t,e,r){for(var n=t;n<e;n++){var i=this.collisionBoxArray.get(n),o=i.x1,a=i.y1,s=i.x2,l=i.y2,u=i.radius>0;this.addCollisionDebugVertices(o,a,s,l,u?this.collisionCircle:this.collisionBox,i.anchorPoint,r,u)}},fs.prototype.generateCollisionDebugBuffers=function(){for(var t=0;t<this.symbolInstances.length;t++){var e=this.symbolInstances.get(t);this.addDebugCollisionBoxes(e.textBoxStartIndex,e.textBoxEndIndex,e),this.addDebugCollisionBoxes(e.iconBoxStartIndex,e.iconBoxEndIndex,e)}},fs.prototype._deserializeCollisionBoxesForSymbol=function(t,e,r,n,i){for(var o={},a=e;a<r;a++){var s=t.get(a);if(0===s.radius){o.textBox={x1:s.x1,y1:s.y1,x2:s.x2,y2:s.y2,anchorPointX:s.anchorPointX,anchorPointY:s.anch
65orPointY},o.textFeatureIndex=s.featureIndex;break}o.textCircles||(o.textCircles=[],o.textFeatureIndex=s.featureIndex),o.textCircles.push(s.anchorPointX,s.anchorPointY,s.radius,s.signedDistanceFromAnchor,1)}for(var l=n;l<i;l++){var u=t.get(l);if(0===u.radius){o.iconBox={x1:u.x1,y1:u.y1,x2:u.x2,y2:u.y2,anchorPointX:u.anchorPointX,anchorPointY:u.anchorPointY},o.iconFeatureIndex=u.featureIndex;break}}return o},fs.prototype.deserializeCollisionBoxes=function(t){this.collisionArrays=[];for(var e=0;e<this.symbolInstances.length;e++){var r=this.symbolInstances.get(e);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(t,r.textBoxStartIndex,r.textBoxEndIndex,r.iconBoxStartIndex,r.iconBoxEndIndex))}},fs.prototype.hasTextData=function(){return this.text.segments.get().length>0},fs.prototype.hasIconData=function(){return this.icon.segments.get().length>0},fs.prototype.hasCollisionBoxData=function(){return this.collisionBox.segments.get().length>0},fs.prototype.hasCollisionCircleData=function(){return this.collisionCircle.segments.get().length>0},fs.prototype.addIndicesForPlacedTextSymbol=function(t){for(var e=this.text.placedSymbolArray.get(t),r=e.vertexStartIndex+4*e.numGlyphs,n=e.vertexStartIndex;n<r;n+=4)this.text.indexArray.emplaceBack(n,n+1,n+2),this.text.indexArray.emplaceBack(n+1,n+2,n+3)},fs.prototype.sortFeatures=function(t){if(this.sortFeaturesByY&&this.sortedAngle!==t&&(this.sortedAngle=t,!(this.text.segments.get().length>1||this.icon.segments.get().length>1))){for(var e=[],r=0;r<this.symbolInstances.length;r++)e.push(r);for(var n=Math.sin(t),i=Math.cos(t),o=[],a=[],s=0;s<this.symbolInstances.length;s++){var l=this.symbolInstances.get(s);o.push(0|Math.round(n*l.anchorX+i*l.anchorY)),a.push(l.featureIndex)}e.sort(function(t,e){return o[t]-o[e]||a[e]-a[t]}),this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var u=0,c=e;u<c.length;u+=1){var p=c[u],h=this.symbolInstances.get(p);this.featureSortOrder.push(h.featureIndex),h.horizontalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedTextSymbol(h.horizontalPlacedTextSymbolIndex),h.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedTextSymbol(h.verticalPlacedTextSymbolIndex);var f=this.icon.placedSymbolArray.get(p);if(f.numGlyphs){var d=f.vertexStartIndex;this.icon.indexArray.emplaceBack(d,d+1,d+2),this.icon.indexArray.emplaceBack(d+1,d+2,d+3)}}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},an("SymbolBucket",fs,{omit:["layers","collisionBoxArray","features","compareText"]}),fs.MAX_GLYPHS=65535,fs.addDynamicAttributes=cs;var ds=new Bn({"symbol-placement":new Pn(gt.layout_symbol["symbol-placement"]),"symbol-spacing":new Pn(gt.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Pn(gt.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new zn(gt.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Pn(gt.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Pn(gt.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Pn(gt.layout_symbol["icon-ignore-placement"]),"icon-optional":new Pn(gt.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Pn(gt.layout_symbol["icon-rotation-alignment"]),"icon-size":new zn(gt.layout_symbol["icon-size"]),"icon-text-fit":new Pn(gt.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Pn(gt.layout_symbol["icon-text-fit-padding"]),"icon-image":new zn(gt.layout_symbol["icon-image"]),"icon-rotate":new zn(gt.layout_symbol["icon-rotate"]),"icon-padding":new Pn(gt.layout_symbol["icon-padding"]),"icon-keep-upright":new Pn(gt.layout_symbol["icon-keep-upright"]),"icon-offset":new zn(gt.layout_symbol["icon-offset"]),"icon-anchor":new zn(gt.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Pn(gt.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Pn(gt.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Pn(gt.layout_symbol["text-rotation-alignment"]),"text-field":new zn(gt.layout_symbol["text-field"]),"text-font":new zn(gt.layout_symbol["text-font"]),"text-size":new zn(gt.layout_symbol["text-size"]),"text-max-width":new zn(gt.layout_symbol["text-max-width"]),"text-line-height":new Pn(gt.layout_symbol["text-line-height"]),"text-letter-spacing":new zn(gt.layout_symbol["text-letter-spacing"]),"text-justify":new zn(gt.layout_symbol["text-justify"]),"text-anchor":new zn(gt.layout_symbol["text-anchor"]),"text-max-angle":new Pn(gt.layout_symbol["text-max-angle"]),"text-rotate":new zn(gt.layout_symbol["text-rotate"]),"text-padding":new Pn(gt.layout_symbol["text-padding"]),"text-keep-upright":new Pn(gt.layout_symbol["text-keep-upright"]),"text-transform":new zn(gt.layout_symbol["text-transform"]),"text-offset":new zn(gt.layout_symbol["text-offset"]),"text-allow-overlap":new Pn(gt.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Pn(gt.layout_symbol["text-ignore-placement"]),"text-optional":new P
vendor: 4,499 bytes, line 65
65n(gt.layout_symbol["text-optional"])}),ms={paint:new Bn({"icon-opacity":new zn(gt.paint_symbol["icon-opacity"]),"icon-color":new zn(gt.paint_symbol["icon-color"]),"icon-halo-color":new zn(gt.paint_symbol["icon-halo-color"]),"icon-halo-width":new zn(gt.paint_symbol["icon-halo-width"]),"icon-halo-blur":new zn(gt.paint_symbol["icon-halo-blur"]),"icon-translate":new Pn(gt.paint_symbol["icon-translate"]),"icon-translate-anchor":new Pn(gt.paint_symbol["icon-translate-anchor"]),"text-opacity":new zn(gt.paint_symbol["text-opacity"]),"text-color":new zn(gt.paint_symbol["text-color"]),"text-halo-color":new zn(gt.paint_symbol["text-halo-color"]),"text-halo-width":new zn(gt.paint_symbol["text-halo-width"]),"text-halo-blur":new zn(gt.paint_symbol["text-halo-blur"]),"text-translate":new Pn(gt.paint_symbol["text-translate"]),"text-translate-anchor":new Pn(gt.paint_symbol["text-translate-anchor"])}),layout:ds},gs=function(t){function e(e){t.call(this,e,ms)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment"))},e.prototype.getValueAndResolveTokens=function(t,e){var r,n=this.layout.get(t).evaluate(e,{}),i=this._unevaluatedLayout._values[t];return i.isDataDriven()||fr(i.value)?n:(r=e.properties,n.replace(/{([^{}]+)}/g,function(t,e){return e in r?String(r[e]):""}))},e.prototype.createBucket=function(t){return new fs(t)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e}(Fn),ys={paint:new Bn({"background-color":new Pn(gt.paint_background["background-color"]),"background-pattern":new On(gt.paint_background["background-pattern"]),"background-opacity":new Pn(gt.paint_background["background-opacity"])})},vs=function(t){function e(e){t.call(this,e,ys)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Fn),_s={paint:new Bn({"raster-opacity":new Pn(gt.paint_raster["raster-opacity"]),"raster-hue-rotate":new Pn(gt.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Pn(gt.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Pn(gt.paint_raster["raster-brightness-max"]),"raster-saturation":new Pn(gt.paint_raster["raster-saturation"]),"raster-contrast":new Pn(gt.paint_raster["raster-contrast"]),"raster-resampling":new Pn(gt.paint_raster["raster-resampling"]),"raster-fade-duration":new Pn(gt.paint_raster["raster-fade-duration"])})},xs=function(t){function e(e){t.call(this,e,_s)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Fn),bs=function(t){function e(e){t.call(this,e,{}),this.implementation=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.hasOffscreenPass=function(){return void 0!==this.implementation.prerender||"3d"===this.implementation.renderingMode},e.prototype.recalculate=function(){},e.prototype.updateTransitions=function(){},e.prototype.hasTransition=function(){},e.prototype.serialize=function(){},e.prototype.resize=function(){this.viewportFrame&&(this.viewportFrame.destroy(),this.viewportFrame=null)},e.prototype.onAdd=function(t){this.implementation.onAdd&&this.implementation.onAdd(t,t.painter.context.gl)},e.prototype.onRemove=function(t){this.implementation.onRemove&&this.implementation.onRemove(t)},e}(Fn),ws={circle:bo,heatmap:Mo,hillshade:zo,fill:ga,"fill-extrusion":Sa,line:Ka,symbol:gs,background:vs,raster:xs};function Es(t){for(var e=0,r=0,n=0,i=t;n<i.length;n+=1){var o=i[n];e+=o.w*o.h,r=Math.max(r,o.w)}t.sort(function(t,e){return e.h-t.h});for(var a=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(e/.95)),r),h:1/0}],s=0,l=0,u=0,c=t;u<c.length;u+=1)for(var p=c[u],h=a.length-1;h>=0;h--){var f=a[h];if(!(p.w>f.w||p.h>
vendor: 5,249 bytes, line 65
65f.h)){if(p.x=f.x,p.y=f.y,l=Math.max(l,p.y+p.h),s=Math.max(s,p.x+p.w),p.w===f.w&&p.h===f.h){var d=a.pop();h<a.length&&(a[h]=d)}else p.h===f.h?(f.x+=p.w,f.w-=p.w):p.w===f.w?(f.y+=p.h,f.h-=p.h):(a.push({x:f.x+p.w,y:f.y,w:f.w-p.w,h:p.h}),f.y+=p.h,f.h-=p.h);break}}return{w:s,h:l,fill:e/(s*l)||0}}var Ts=function(t,e){var r=e.pixelRatio;this.paddedRect=t,this.pixelRatio=r},Ss={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};Ss.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},Ss.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},Ss.tlbr.get=function(){return this.tl.concat(this.br)},Ss.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(Ts.prototype,Ss);var Cs=function(t,e){var r={},n={},i=[];for(var o in t){var a=t[o],s={x:0,y:0,w:a.data.width+2,h:a.data.height+2};i.push(s),r[o]=new Ts(s,a)}for(var l in e){var u=e[l],c={x:0,y:0,w:u.data.width+2,h:u.data.height+2};i.push(c),n[l]=new Ts(c,u)}var p=Es(i),h=p.w,f=p.h,d=new Io({width:h||1,height:f||1});for(var m in t){var g=t[m],y=r[m].paddedRect;Io.copy(g.data,d,{x:0,y:0},{x:y.x+1,y:y.y+1},g.data)}for(var v in e){var _=e[v],x=n[v].paddedRect,b=x.x+1,w=x.y+1,E=_.data.width,T=_.data.height;Io.copy(_.data,d,{x:0,y:0},{x:b,y:w},_.data),Io.copy(_.data,d,{x:0,y:T-1},{x:b,y:w-1},{width:E,height:1}),Io.copy(_.data,d,{x:0,y:0},{x:b,y:w+T},{width:E,height:1}),Io.copy(_.data,d,{x:E-1,y:0},{x:b-1,y:w},{width:1,height:T}),Io.copy(_.data,d,{x:0,y:0},{x:b+E,y:w},{width:1,height:T})}this.image=d,this.iconPositions=r,this.patternPositions=n};an("ImagePosition",Ts),an("ImageAtlas",Cs);var As=self.HTMLImageElement,Is=self.HTMLCanvasElement,Ds=self.HTMLVideoElement,ks=self.ImageData,Ms=function(t,e,r,n){this.context=t,this.format=r,this.texture=t.gl.createTexture(),this.update(e,n)};Ms.prototype.update=function(t,e){var r=t.width,n=t.height,i=!this.size||this.size[0]!==r||this.size[1]!==n,o=this.context,a=o.gl;this.useMipmap=Boolean(e&&e.useMipmap),a.bindTexture(a.TEXTURE_2D,this.texture),o.pixelStoreUnpackFlipY.set(!1),o.pixelStoreUnpack.set(1),o.pixelStoreUnpackPremultiplyAlpha.set(this.format===a.RGBA&&(!e||!1!==e.premultiply)),i?(this.size=[r,n],t instanceof As||t instanceof Is||t instanceof Ds||t instanceof ks?a.texImage2D(a.TEXTURE_2D,0,this.format,this.format,a.UNSIGNED_BYTE,t):a.texImage2D(a.TEXTURE_2D,0,this.format,r,n,0,this.format,a.UNSIGNED_BYTE,t.data)):t instanceof As||t instanceof Is||t instanceof Ds||t instanceof ks?a.texSubImage2D(a.TEXTURE_2D,0,0,0,a.RGBA,a.UNSIGNED_BYTE,t):a.texSubImage2D(a.TEXTURE_2D,0,0,0,r,n,a.RGBA,a.UNSIGNED_BYTE,t.data),this.useMipmap&&this.isSizePowerOfTwo()&&a.generateMipmap(a.TEXTURE_2D)},Ms.prototype.bind=function(t,e,r){var n=this.context.gl;n.bindTexture(n.TEXTURE_2D,this.texture),r!==n.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(r=n.LINEAR),t!==this.filter&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,t),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,r||t),this.filter=t),e!==this.wrap&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,e),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,e),this.wrap=e)},Ms.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},Ms.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};var Ps=function(t,e,r,n,i){var o,a,s=8*i-n-1,l=(1<<s)-1,u=l>>1,c=-7,p=r?i-1:0,h=r?-1:1,f=t[e+p];for(p+=h,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+t[e+p],p+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+t[e+p],p+=h,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)},zs=function(t,e,r,n,i,o){var a,s,l,u=8*o-i-1,c=(1<<u)-1,p=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,d=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+p>=1?h/l:h*Math.pow(2,1-p))*l>=2&&(a++,l/=2),a+p>=c?(s=0,a=c):a+p>=1?(s=(e*l-1)*Math.pow(2,i),a+=p):(s=e*Math.pow(2,p-1)*Math.pow(2,i),a=0));i>=8;t[r+f]=255&s,f+=d,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;t[r+f]=255&a,f+=d,a/=256,u-=8);t[r+f-d]|=128*m},Ls=Os;function Os(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}function Rs(t){return t.type===Os.Bytes?t.readVarint()+t.pos:t.pos+1}function Bs(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function Fs(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.ceil(Math.log(e)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=t;i--)r.buf[i+n]=r.buf[i]}function Ns(t,e){for(var r=0;r<t.length;r++)e.writeVarint(t[r])}function Us(t,e){for(var r=0;r<t.length;r++)e.writeSVarint(t[r])}function Vs(t,e){for(var r=0;r<t.length;r++)e.writeFloat(t[r])}function js(t,e){for(var r=0;r<t.length;r++)e.writeDouble(t[r])}function qs(t,e){for(var r=0;r<t.length;r++)e.writeBoolean(t[r])}function Hs(t,e){for(var r=0;r<t.length;r++)e.writeFixed32(t[r])}function Gs(t,e){for(var r=0;r<t.length;r++)e.writeSFixed32(t[r])}function Ws(t,e){for(var r=0;r<t.length;
vendor: 4,113 bytes, line 65
65r++)e.writeFixed64(t[r])}function Zs(t,e){for(var r=0;r<t.length;r++)e.writeSFixed64(t[r])}function Xs(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function Ys(t,e,r){t[r]=e,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function Ks(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}Os.Varint=0,Os.Fixed64=1,Os.Bytes=2,Os.Fixed32=5,Os.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos<r;){var n=this.readVarint(),i=n>>3,o=this.pos;this.type=7&n,t(i,e,this),this.pos===o&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=Xs(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=Ks(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=Xs(this.buf,this.pos)+4294967296*Xs(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=Xs(this.buf,this.pos)+4294967296*Ks(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=Ps(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=Ps(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,n=this.buf;return e=127&(r=n[this.pos++]),r<128?e:(e|=(127&(r=n[this.pos++]))<<7,r<128?e:(e|=(127&(r=n[this.pos++]))<<14,r<128?e:(e|=(127&(r=n[this.pos++]))<<21,r<128?e:function(t,e,r){var n,i,o=r.buf;if(n=(112&(i=o[r.pos++]))>>4,i<128)return Bs(t,n,e);if(n|=(127&(i=o[r.pos++]))<<3,i<128)return Bs(t,n,e);if(n|=(127&(i=o[r.pos++]))<<10,i<128)return Bs(t,n,e);if(n|=(127&(i=o[r.pos++]))<<17,i<128)return Bs(t,n,e);if(n|=(127&(i=o[r.pos++]))<<24,i<128)return Bs(t,n,e);if(n|=(1&(i=o[r.pos++]))<<31,i<128)return Bs(t,n,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(r=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=function(t,e,r){for(var n="",i=e;i<r;){var o,a,s,l=t[i],u=null,c=l>239?4:l>223?3:l>191?2:1;if(i+c>r)break;1===c?l<128&&(u=l):2===c?128==(192&(o=t[i+1]))&&(u=(31&l)<<6|63&o)<=127&&(u=null):3===c?(o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&((u=(15&l)<<12|(63&o)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,c=1):u>65535&&(u-=65536,n+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),n+=String.fromCharCode(u),i+=c}return n}(this.buf,this.pos,t);return this.pos=t,e},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){var r=Rs(this);for(t=t||[];this.pos<r;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){var e=Rs(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){var e=Rs(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){var e=Rs(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){var e=Rs(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){var e=Rs(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){var e=Rs(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){var e=Rs(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){var e=Rs(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===Os.Varint)for(;this.buf[this.pos++]>127;);else if(e===Os.Bytes)this.pos=this.readVarint()+this.pos;else if(e===Os.Fixed32)this.pos+=4;else{if(e!==Os.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;
65if(e!==this.length){var r=new Uint8Array(e);r.set(this.buf),this.buf=r,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),Ys(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),Ys(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),Ys(this.buf,-1&t,this.pos),Ys(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),Ys(this.buf,-1&t,this.pos),Ys(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var r,n;if(t>=0?(r=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,n=n+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos]=127&t}(r,0,e),function(t,e){var r=(7&t)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var n,i,o=0;o<e.length;o++){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){n>56319||o+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):i=n;continue}if(n<56320){t[r++]=239,t[r++]=191,t[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&(t[r++]=239,t[r++]=191,t[r++]=189,i=null);n<128?t[r++]=n:(n<2048?t[r++]=n>>6|192:(n<65536?t[r++]=n>>12|224:(t[r++]=n>>18|240,t[r++]=n>>12&63|128),t[r++]=n>>6&63|128),t[r++]=63&n|128)}return r}(this.buf,t,this.pos);var r=this.pos-e;r>=128&&Fs(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),zs(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),zs(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r<e;r++)this.buf[this.pos++]=t[r]},writeRawMessage:function(t,e){this.pos++;var r=this.pos;t(e,this);var n=this.pos-r;n>=128&&Fs(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,Os.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){this.writeMessage(t,Ns,e)},writePackedSVarint:function(t,e){this.writeMessage(t,Us,e)},writePackedBoolean:function(t,e){this.writeMessage(t,qs,e)},writePackedFloat:function(t,e){this.writeMessage(t,Vs,e)},writePackedDouble:function(t,e){this.writeMessage(t,js,e)},writePackedFixed32:function(t,e){this.writeMessage(t,Hs,e)},writePackedSFixed32:function(t,e){this.writeMessage(t,Gs,e)},writePackedFixed64:function(t,e){this.writeMessage(t,Ws,e)},writePackedSFixed64:function(t,e){this.writeMessage(t,Zs,e)},writeBytesField:function(t,e){this.writeTag(t,Os.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,Os.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,Os.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,Os.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,Os.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,Os.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,Os.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,Os.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,Os.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,Os.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var Js=3;function Qs(t,e,r){1===t&&r.readMessage($s,e)}function $s(t,e,r){if(3===t){var n=r.readMessage(tl,{}),i=n.id,o=n.bitmap,a=n.width,s=n.height,l=n.left,u=n.top,c=n.advance;e.push({id:i,bitmap:new Ao({width:a+2*Js,height:s+2*Js},o),metrics:{width:a,height:s,left:l,top:u,advance:c}})}}function tl(t,e,r){1===t?e.id=r.readVarint():2===t?e.bitmap=r.readBytes():3===t?e.width=r.readVarint():4===t?e.height=r.readVarint():5===t?e.left=r.readSVarint():6===t?e.top=r.readSVarint():7===t&&(e.advance=r.readVarint())}var el=Js,rl=function(t,e,r){this.target=t,this.parent=e,this.mapId=r,this.callbacks={},this.callbackID=0,g(["receive"],this),this.target.addEventListener("message",this.receive,!1)};function nl(t,e,r){var n=2*Math.PI*6378137/256/Math.pow(2,r);return[t*n-2*Math.PI*6378137/2,e*n-2*Math.PI*6378137/2]}rl.prototype.send=function(t,e,r,n){var i=this,o=r?this.mapId+":"+this.callbackID++:null;r&&(this.callbacks[o]=r);var a=[];if(this.target.postMessage({targetMapId:n,sourceMapId:this.mapId,type:t,id:String(o),data:ln(e,a)},a),r)return{cancel:function(){return i.target.postMessage({targetMapId:n,sourceMapId:i.mapId,type:"<cancel>",id:String(o)})}}},rl.prototype.receive=function(t){var e,r=this,n=t.data,i=n.id;if(!n.targetMapId||this.mapId===n.targetMapId){var o=function(t,e){delete r.callbacks[i];var n=[];r.target.postMessage({sourceMapId:r.mapId,type:"<response>",id:String(i),error:t?ln(t):null,data:ln(e,n)},n)};if("<response>"===n.type||"<cancel>"===n.type)e=this.callbacks[n.id],delete this.callbacks[n.id],e&&n.error?e(un(n.error)):e&&e(null,un(n.data));else if(void 0!==n.id&&this.parent[n.type]){this.callbacks[n.id]=null;var a=this.parent[n.type](n.sourceMapId,un(n.data),o);a&&null===this.callbacks[n.id]&&(this.callbacks[n.id]=a)}else if(void 0!==n.id&&this.parent.getWorkerSource){var s=n.type.split("."),l=un(n.data);this.parent.getWorkerSource(n.sourceMapId,s[0],l.source)[s[1]](l,o)}else this.parent[n.type](un(n.data))}},rl.prototype.remove=function(){this.target.removeEventListener("message",this.receive,!1)};
vendor: 5,611 bytes, line 65
65var il=function(t,e){t&&(e?this.setSouthWest(t).setNorthEast(e):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))};il.prototype.setNorthEast=function(t){return this._ne=t instanceof ol?new ol(t.lng,t.lat):ol.convert(t),this},il.prototype.setSouthWest=function(t){return this._sw=t instanceof ol?new ol(t.lng,t.lat):ol.convert(t),this},il.prototype.extend=function(t){var e,r,n=this._sw,i=this._ne;if(t instanceof ol)e=t,r=t;else{if(!(t instanceof il))return Array.isArray(t)?t.every(Array.isArray)?this.extend(il.convert(t)):this.extend(ol.convert(t)):this;if(e=t._sw,r=t._ne,!e||!r)return this}return n||i?(n.lng=Math.min(e.lng,n.lng),n.lat=Math.min(e.lat,n.lat),i.lng=Math.max(r.lng,i.lng),i.lat=Math.max(r.lat,i.lat)):(this._sw=new ol(e.lng,e.lat),this._ne=new ol(r.lng,r.lat)),this},il.prototype.getCenter=function(){return new ol((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},il.prototype.getSouthWest=function(){return this._sw},il.prototype.getNorthEast=function(){return this._ne},il.prototype.getNorthWest=function(){return new ol(this.getWest(),this.getNorth())},il.prototype.getSouthEast=function(){return new ol(this.getEast(),this.getSouth())},il.prototype.getWest=function(){return this._sw.lng},il.prototype.getSouth=function(){return this._sw.lat},il.prototype.getEast=function(){return this._ne.lng},il.prototype.getNorth=function(){return this._ne.lat},il.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},il.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},il.prototype.isEmpty=function(){return!(this._sw&&this._ne)},il.convert=function(t){return!t||t instanceof il?t:new il(t)};var ol=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid LngLat object: ("+t+", "+e+")");if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};function al(t){return 2*Math.PI*6378137*Math.cos(t*Math.PI/180)}function sl(t){return(180+t)/360}function ll(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function ul(t,e){return t/al(e)}function cl(t){var e=180-360*t;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}ol.prototype.wrap=function(){return new ol(c(this.lng,-180,180),this.lat)},ol.prototype.toArray=function(){return[this.lng,this.lat]},ol.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},ol.prototype.toBounds=function(t){void 0===t&&(t=0);var e=360*t/40075017,r=e/Math.cos(Math.PI/180*this.lat);return new il(new ol(this.lng-r,this.lat-e),new ol(this.lng+r,this.lat+e))},ol.convert=function(t){if(t instanceof ol)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new ol(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new ol(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")};var pl=function(t,e,r){void 0===r&&(r=0),this.x=+t,this.y=+e,this.z=+r};pl.fromLngLat=function(t,e){void 0===e&&(e=0);var r=ol.convert(t);return new pl(sl(r.lng),ll(r.lat),ul(e,r.lat))},pl.prototype.toLngLat=function(){return new ol(360*this.x-180,cl(this.y))},pl.prototype.toAltitude=function(){return this.z*al(cl(this.y))};var hl=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=ml(0,t,e,r)};hl.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},hl.prototype.url=function(t,e){var r,n,i,o,a,s=(r=this.x,n=this.y,i=this.z,o=nl(256*r,256*(n=Math.pow(2,i)-n-1),i),a=nl(256*(r+1),256*(n+1),i),o[0]+","+o[1]+","+a[0]+","+a[1]),l=function(t,e,r){for(var n,i="",o=t;o>0;o--)i+=(e&(n=1<<o-1)?1:0)+(r&n?2:0);return i}(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String("tms"===e?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",l).replace("{bbox-epsg-3857}",s)},hl.prototype.getTilePoint=function(t){var e=Math.pow(2,this.z);return new i((t.x*e-this.x)*Xi,(t.y*e-this.y)*Xi)};var fl=function(t,e){this.wrap=t,this.canonical=e,this.key=ml(t,e.z,e.x,e.y)},dl=function(t,e,r,n,i){this.overscaledZ=t,this.wrap=e,this.canonical=new hl(r,+n,+i),this.key=ml(e,t,n,i)};function ml(t,e,r,n){(t*=2)<0&&(t=-1*t-1);var i=1<<e;return 32*(i*i*t+i*n+r)+e}dl.prototype.equals=function(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)},dl.prototype.scaledTo=function(t){var e=this.canonical.z-t;return t>this.canonical.z?new dl(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new dl(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},dl.prototype.isChildOf=function(t){if(t.wrap!==this.wrap)return!1;var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ<this.overscaledZ&&t.canonical.x===this.canonical.x>>e&&t.canonical.y===this.canonical.y>>e},dl.prototype.children=function(t){if(this.overscaledZ>=t)return[new dl(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var e=this.canonical.z+1,r=2*this.canonical.x,n=2*this.canonical.y;return[new dl(e,this.wrap,e,r,n),new dl(e,this.wrap,e,r+1,n),new dl(e,this.wrap,e,r,n+1),new dl(e,this.wrap,e,r+1,n+1)]},dl.prototype.isLessThan=function(t){return this.wrap<t.wrap||!(this.wrap>t.wrap)&&(this.overscaledZ<t.overscaledZ||!(this.overscaledZ>
65t.overscaledZ)&&(this.canonical.x<t.canonical.x||!(this.canonical.x>t.canonical.x)&&this.canonical.y<t.canonical.y))},dl.prototype.wrapped=function(){return new dl(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},dl.prototype.unwrapTo=function(t){return new dl(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)},dl.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},dl.prototype.toUnwrapped=function(){return new fl(this.wrap,this.canonical)},dl.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},dl.prototype.getTilePoint=function(t){return this.canonical.getTilePoint(new pl(t.x-this.wrap,t.y))},an("CanonicalTileID",hl),an("OverscaledTileID",dl,{omit:["posMatrix"]});var gl=function(t,e,r){if(this.uid=t,e.height!==e.width)throw new RangeError("DEM tiles must be square");if(r&&"mapbox"!==r&&"terrarium"!==r)return w('"'+r+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');var n=this.dim=e.height;this.stride=this.dim+2,this.data=new Int32Array(this.stride*this.stride);for(var i=e.data,o="terrarium"===r?this._unpackTerrarium:this._unpackMapbox,a=0;a<n;a++)for(var s=0;s<n;s++){var l=4*(a*n+s);this.set(s,a,o(i[l],i[l+1],i[l+2]))}for(var u=0;u<n;u++)this.set(-1,u,this.get(0,u)),this.set(n,u,this.get(n-1,u)),this.set(u,-1,this.get(u,0)),this.set(u,n,this.get(u,n-1));this.set(-1,-1,this.get(0,0)),this.set(n,-1,this.get(n-1,0)),this.set(-1,n,this.get(0,n-1)),this.set(n,n,this.get(n-1,n-1))};gl.prototype.set=function(t,e,r){this.data[this._idx(t,e)]=r+65536},gl.prototype.get=function(t,e){return this.data[this._idx(t,e)]-65536},gl.prototype._idx=function(t,e){if(t<-1||t>=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(e+1)*this.stride+(t+1)},gl.prototype._unpackMapbox=function(t,e,r){return(256*t*256+256*e+r)/10-1e4},gl.prototype._unpackTerrarium=function(t,e,r){return 256*t+e+r/256-32768},gl.prototype.getPixels=function(){return new Io({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},gl.prototype.backfillBorder=function(t,e,r){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");var n=e*this.dim,i=e*this.dim+this.dim,o=r*this.dim,a=r*this.dim+this.dim;switch(e){case-1:n=i-1;break;case 1:i=n+1}switch(r){case-1:o=a-1;break;case 1:a=o+1}for(var s=-e*this.dim,l=-r*this.dim,u=o;u<a;u++)for(var c=n;c<i;c++)this.set(c,u,t.get(c+s,u+l))},an("DEMData",gl);var yl=jn([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),vl=function(t){this._stringToNumber={},this._numberToString=[];for(var e=0;e<t.length;e++){var r=t[e];this._stringToNumber[r]=e,this._numberToString[e]=r}};vl.prototype.encode=function(t){return this._stringToNumber[t]},vl.prototype.decode=function(t){return this._numberToString[t]};var _l=function(t,e,r,n){this.type="Feature",this._vectorTileFeature=t,t._z=e,t._x=r,t._y=n,this.properties=t.properties,null!=t.id&&(this.id=t.id)},xl={geometry:{configurable:!0}};xl.geometry.get=function(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},xl.geometry.set=function(t){this._geometry=t},_l.prototype.toJSON=function(){var t={geometry:this.geometry};for(var e in this)"_geometry"!==e&&"_vectorTileFeature"!==e&&(t[e]=this[e]);return t},Object.defineProperties(_l.prototype,xl);var bl=function(){this.state={},this.stateChanges={},this.deletedStates={}};bl.prototype.updateState=function(t,e,r){var n=String(e);if(this.stateChanges[t]=this.stateChanges[t]||{},this.stateChanges[t][n]=this.stateChanges[t][n]||{},p(this.stateChanges[t][n],r),null===this.deletedStates[t])for(var i in this.deletedStates[t]={},this.state[t])i!==n&&(this.deletedStates[t][i]=null);else if(this.deletedStates[t]&&null===this.deletedStates[t][n])for(var o in this.deletedStates[t][n]={},this.state[t][n])r[o]||(this.deletedStates[t][n][o]=null);else for(var a in r)this.deletedStates[t]&&this.deletedStates[t][n]&&null===this.deletedStates[t][n][a]&&delete this.deletedStates[t][n][a]},bl.prototype.removeFeatureState=function(t,e,r){if(null!==this.deletedStates[t]){var n=String(e);if(this.deletedStates[t]=this.deletedStates[t]||{},r&&e)null!==this.deletedStates[t][n]&&(this.deletedStates[t][n]=this.deletedStates[t][n]||{},this.deletedStates[t][n][r]=null);else if(e)if(this.stateChanges[t]&&this.stateChanges[t][n])for(r in this.deletedStates[t][n]={},this.stateChanges[t][n])this.deletedStates[t][n][r]=null;else this.deletedStates[t][n]=null;else this.deletedStates[t]=null}},bl.prototype.getState=function(t,e){var r=String(e),n=this.state[t]||{},i=this.stateChanges[t]||{},o=p({},n[r],i[r]);if(null===this.deletedStates[t])return{};if(this.deletedStates[t]){var a=this.deletedStates[t][e];if(null===a)return{};for(var s in a)delete o[s]}return o},bl.prototype.initializeTileState=function(t,e){t.setFeatureState(this.state,e)},bl.prototype.coalesceChanges=function(t,e){var r={};for(var n in this.stateChanges){this.state[n]=this.state[n]||{};var i={};for(var o in this.stateChanges[n])this.state[n][o]||(this.state[n][o]={}),p(this.state[n][o],this.stateChanges[n][o]),i[o]=this.state[n][o];r[n]=i}for(var a in this.deletedStates){this.state[a]=this.state[a]||{};var s={};if(null===this.deletedStates[a]){for(var l in this.state[a])s[l]={};this.state[a]={}}else for(var u in this.deletedStates[a]){if(null===this.deletedStates[a][u])this.state[a][u]={};else for(var c=0,h=Object.keys(this.deletedStates[a][u]);c<h.length;c+=1){var f=h[c];delete this.state[a][u][f]}s[u]=this.state[a][u]}r[a]=r[a]||{},p(r[a],s)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(r).length)for(var d in t)t[d].setFeatureState(r,e)};var wl=function(t,e,r){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=e||new tn(Xi,16,0),this.grid3D=new tn(Xi,16,0),this.featureIndexArray=r||new wi};function El(t){for(var e=1/0,r=1/0,n=-1/0,i=-1/0,o=0,a=t;o<a.length;o+=1){var s=a[o];e=Math.min(e,s.x),r=Math.min(r,s.y),n=Math.max(n,s.x),i=Math.max(i,s.y)}return{minX:e,minY:r,maxX:n,maxY:i}}function Tl(t,e){return e-t}wl.prototype.insert=function(t,e,r,n,i,o){var a=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,n,i);for(var s=o?this.grid3D:this.grid,l=0;l<e.length;l++){for(var u=e[l],c=[1/0,1/0,-1/0,-1/0],p=0;p<u.length;p++){var h=u[p];c[0]=Math.min(c[0],h.x),c[1]=Math.min(c[1],h.y),c[2]=Math.max(c[2],h.x),c[3]=Math.max(c[3],h.y)}c[0]<Xi&&c[1]<Xi&&c[2]>=0&&c[3]>
vendor: 5,584 bytes, line 65
65=0&&s.insert(a,c[0],c[1],c[2],c[3])}},wl.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Fa.VectorTile(new Ls(this.rawTileData)).layers,this.sourceLayerCoder=new vl(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},wl.prototype.query=function(t,e,r){var n=this;this.loadVTLayers();for(var o=t.params||{},a=Xi/t.tileSize/t.scale,s=Ir(o.filter),l=t.queryGeometry,u=t.queryPadding*a,c=El(l),p=this.grid.query(c.minX-u,c.minY-u,c.maxX+u,c.maxY+u),h=El(t.cameraQueryGeometry),f=0,d=this.grid3D.query(h.minX-u,h.minY-u,h.maxX+u,h.maxY+u,function(e,r,n,o){return function(t,e,r,n,o){for(var a=0,s=t;a<s.length;a+=1){var l=s[a];if(e<=l.x&&r<=l.y&&n>=l.x&&o>=l.y)return!0}var u=[new i(e,r),new i(e,o),new i(n,o),new i(n,r)];if(t.length>2)for(var c=0,p=u;c<p.length;c+=1)if(lo(t,p[c]))return!0;for(var h=0;h<t.length-1;h++)if(uo(t[h],t[h+1],u))return!0;return!1}(t.cameraQueryGeometry,e-u,r-u,n+u,o+u)});f<d.length;f+=1){var m=d[f];p.push(m)}p.sort(Tl);for(var g,y={},v=function(i){var u=p[i];if(u!==g){g=u;var c=n.featureIndexArray.get(u),h=null;n.loadMatchingFeature(y,c.bucketIndex,c.sourceLayerIndex,c.featureIndex,s,o.layers,e,function(e,i){h||(h=Ki(e));var o={};return e.id&&(o=r.getState(i.sourceLayer||"_geojsonTileLayer",e.id)),i.queryIntersectsFeature(l,e,o,h,n.z,t.transform,a,t.pixelPosMatrix)})}},_=0;_<p.length;_++)v(_);return y},wl.prototype.loadMatchingFeature=function(t,e,r,n,i,o,a,s){var l=this.bucketLayerIDs[e];if(!o||function(t,e){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])>=0)return!0;return!1}(o,l)){var u=this.sourceLayerCoder.decode(r),c=this.vtLayers[u].feature(n);if(i(new En(this.tileID.overscaledZ),c))for(var p=0;p<l.length;p++){var h=l[p];if(!(o&&o.indexOf(h)<0)){var f=a[h];if(f){var d=!s||s(c,f);if(d){var m=new _l(c,this.z,this.x,this.y);m.layer=f.serialize();var g=t[h];void 0===g&&(g=t[h]=[]),g.push({featureIndex:n,feature:m,intersectionZ:d})}}}}}},wl.prototype.lookupSymbolFeatures=function(t,e,r,n,i,o){var a={};this.loadVTLayers();for(var s=Ir(n),l=0,u=t;l<u.length;l+=1){var c=u[l];this.loadMatchingFeature(a,e,r,c,s,i,o)}return a},wl.prototype.hasLayer=function(t){for(var e=0,r=this.bucketLayerIDs;e<r.length;e+=1)for(var n=0,i=r[e];n<i.length;n+=1)if(t===i[n])return!0;return!1},an("FeatureIndex",wl,{omit:["rawTileData","sourceLayerCoder"]});var Sl=function(t,e){this.tileID=t,this.uid=f(),this.uses=0,this.tileSize=e,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.expiredRequestCount=0,this.state="loading"};Sl.prototype.registerFadeDuration=function(t){var e=t+this.timeAdded;e<M.now()||this.fadeEndTime&&e<this.fadeEndTime||(this.fadeEndTime=e)},Sl.prototype.wasRequested=function(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state},Sl.prototype.loadVectorData=function(t,e,r){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",t){for(var n in t.featureIndex&&(this.latestFeatureIndex=t.featureIndex,t.rawTileData?(this.latestRawTileData=t.rawTileData,this.latestFeatureIndex.rawTileData=t.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=t.collisionBoxArray,this.buckets=function(t,e){var r={};if(!e)return r;for(var n=function(){var t=o[i],n=t.layerIds.map(function(t){return e.getLayer(t)}).filter(Boolean);if(0!==n.length){t.layers=n,t.stateDependentLayerIds&&(t.stateDependentLayers=t.stateDependentLayerIds.map(function(t){return n.filter(function(e){return e.id===t})[0]}));for(var a=0,s=n;a<s.length;a+=1){var l=s[a];r[l.id]=t}}},i=0,o=t;i<o.length;i+=1)n();return r}(t.buckets,e.style),this.hasSymbolBuckets=!1,this.buckets){var i=this.buckets[n];if(i instanceof fs){if(this.hasSymbolBuckets=!0,!r)break;i.justReloaded=!0}}for(var o in this.queryPadding=0,this.buckets){var a=this.buckets[o];this.queryPadding=Math.max(this.queryPadding,e.style.getLayer(o).queryRadius(a))}t.imageAtlas&&(this.imageAtlas=t.imageAtlas),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage)}else this.collisionBoxArray=new hi},Sl.prototype.unloadVectorData=function(){for(var t in this.buckets)this.buckets[t].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"},Sl.prototype.unloadDEMData=function(){this.dem=null,this.neighboringTiles=null,this.state="unloaded"},Sl.prototype.getBucket=function(t){return this.buckets[t.id]},Sl.prototype.upload=function(t){for(var e in this.buckets){var r=this.buckets[e];r.uploadPending()&&r.upload(t)}var n=t.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Ms(t,this.imageAtlas.image,n.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Ms(t,this.glyphAtlasImage,n.ALPHA),this.glyphAtlasImage=null)},Sl.prototype.queryRenderedFeatures=function(t,e,r,n,i,o,a,s,l){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:r,cameraQueryGeometry:n,scale:i,tileSize:this.tileSize,pixelPosMatrix:l,transform:a,params:o,queryPadding:this.queryPadding*s},t,e):{}},Sl.prototype.querySourceFeatures=function(t,e){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData){var r=this.latestFeatureIndex.loadVTLayers(),n=e?e.sourceLayer:"",i=r._geojsonTileLayer||r[n];if(i)for(var o=Ir(e&&e.filter),a=this.tileID.canonical,s=a.z,l=a.x,u=a.y,c={z:s,x:l,y:u},p=0;p<i.length;p++){var h=i.feature(p);
65if(o(new En(this.tileID.overscaledZ),h)){var f=new _l(h,s,l,u);f.tile=c,t.push(f)}}}},Sl.prototype.clearMask=function(){this.segments&&(this.segments.destroy(),delete this.segments),this.maskedBoundsBuffer&&(this.maskedBoundsBuffer.destroy(),delete this.maskedBoundsBuffer),this.maskedIndexBuffer&&(this.maskedIndexBuffer.destroy(),delete this.maskedIndexBuffer)},Sl.prototype.setMask=function(t,e){if(!a(this.mask,t)&&(this.mask=t,this.clearMask(),!a(t,{0:!0}))){var r=new Gn,n=new ai;this.segments=new Si,this.segments.prepareSegment(0,r,n);for(var o=Object.keys(t),s=0;s<o.length;s++){var l=t[o[s]],u=Xi>>l.z,c=new i(l.x*u,l.y*u),p=new i(c.x+u,c.y+u),h=this.segments.prepareSegment(4,r,n);r.emplaceBack(c.x,c.y,c.x,c.y),r.emplaceBack(p.x,c.y,p.x,c.y),r.emplaceBack(c.x,p.y,c.x,p.y),r.emplaceBack(p.x,p.y,p.x,p.y);var f=h.vertexLength;n.emplaceBack(f,f+1,f+2),n.emplaceBack(f+1,f+2,f+3),h.vertexLength+=4,h.primitiveLength+=2}this.maskedBoundsBuffer=e.createVertexBuffer(r,yl.members),this.maskedIndexBuffer=e.createIndexBuffer(n)}},Sl.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},Sl.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},Sl.prototype.setExpiryData=function(t){var e=this.expirationTime;if(t.cacheControl){var r=function(t){var e={};if(t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(t,r,n,i){var o=n||i;return e[r]=!o||o.toLowerCase(),""}),e["max-age"]){var r=parseInt(e["max-age"],10);isNaN(r)?delete e["max-age"]:e["max-age"]=r}return e}(t.cacheControl);r["max-age"]&&(this.expirationTime=Date.now()+1e3*r["max-age"])}else t.expires&&(this.expirationTime=new Date(t.expires).getTime());if(this.expirationTime){var n=Date.now(),i=!1;if(this.expirationTime>n)i=!1;else if(e)if(this.expirationTime<e)i=!0;else{var o=this.expirationTime-e;o?this.expirationTime=n+Math.max(o,3e4):i=!0}else i=!0;i?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},Sl.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)},Sl.prototype.setFeatureState=function(t,e){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData&&0!==Object.keys(t).length){var r=this.latestFeatureIndex.loadVTLayers();for(var n in this.buckets){var i=this.buckets[n],o=i.layers[0].sourceLayer||"_geojsonTileLayer",a=r[o],s=t[o];a&&s&&0!==Object.keys(s).length&&(i.update(s,a,this.imageAtlas&&this.imageAtlas.patternPositions||{}),e&&e.style&&(this.queryPadding=Math.max(this.queryPadding,e.style.getLayer(n).queryRadius(i))))}}},Sl.prototype.holdingForFade=function(){return void 0!==this.symbolFadeHoldUntil},Sl.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<M.now()},Sl.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},Sl.prototype.setHoldDuration=function(t){this.symbolFadeHoldUntil=M.now()+t};var Cl={horizontal:1,vertical:2,horizontalOnly:3},Al=function(){this.text="",this.sectionIndex=[],this.sections=[]};Al.fromFeature=function(t,e){for(var r=new Al,n=0;n<t.sections.length;n++){var i=t.sections[n];r.sections.push({scale:i.scale||1,fontStack:i.fontStack||e}),r.text+=i.text;for(var o=0;o<i.text.length;o++)r.sectionIndex.push(n)}return r},Al.prototype.length=function(){return this.text.length},Al.prototype.getSection=function(t){return this.sections[this.sectionIndex[t]]},Al.prototype.getCharCode=function(t){return this.text.charCodeAt(t)},Al.prototype.verticalizePunctuation=function(){this.text=function(t){for(var e="",r=0;r<t.length;r++){var n=t.charCodeAt(r+1)||null,i=t.charCodeAt(r-1)||null;n&&mn(n)&&!is[t[r+1]]||i&&mn(i)&&!is[t[r-1]]||!is[t[r]]?e+=t[r]:e+=is[t[r]]}return e}(this.text)},Al.prototype.trim=function(){for(var t=0,e=0;e<this.text.length&&Il[this.text.charCodeAt(e)];e++)t++;for(var r=this.text.length,n=this.text.length-1;n>=0&&n>=t&&Il[this.text.charCodeAt(n)];n--)r--;this.text=this.text.substring(t,r),this.sectionIndex=this.sectionIndex.slice(t,r)},Al.prototype.substring=function(t,e){var r=new Al;return r.text=this.text.substring(t,e),r.sectionIndex=this.sectionIndex.slice(t,e),r.sections=this.sections,r},Al.prototype.toString=function(){return this.text},Al.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce(function(e,r){return Math.max(e,t.sections[r].scale)},0)};var Il={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Dl={};function kl(t,e,r,n){var i=Math.pow(t-e,2);return n?t<e?i/2:2*i:i+Math.abs(r)*r}function Ml(t,e){var r=0;return 10===t&&(r-=1e4),40!==t&&65288!==t||(r+=50),41!==e&&65289!==e||(r+=50),r}function Pl(t,e,r,n,i,o){for(var a=null,s=kl(e,r,i,o),l=0,u=n;l<u.length;l+=1){var c=u[l],p=kl(e-c.x,r,i,o)+c.badness;p<=s&&(a=c,s=p)}return{index:t,x:e,priorBreak:a,badness:s}}function zl(t,e,r,n){if(!r)return[];if(!t)return[];for(var i,o=[],a=function(t,e,r,n){for(var i=0,o=0;o<t.length();o++){var a=t.getSection(o),s=n[a.fontStack],l=s&&s[t.getCharCode(o)];l&&(i+=l.metrics.advance*a.scale+e)}return i/Math.max(1,Math.ceil(i/r))}(t,e,r,n),s=0,l=0;l<t.length();l++){var u=t.getSection(l),c=t.getCharCode(l),p=n[u.fontStack],h=p&&p[c];h&&!Il[c]&&(s+=h.metrics.advance*u.scale+e),l<t.length()-1&&(Dl[c]||!((i=c)<11904)&&(pn["Bopomofo Extended"](i)||pn.Bopomofo(i)||pn["CJK Compatibility Forms"](i)||pn["CJK Compatibility Ideographs"](i)||pn["CJK Compatibility"](i)||pn["CJK Radicals Supplement"](i)||pn["CJK Strokes"](i)||pn["CJK Symbols and Punctuation"](i)||pn["CJK Unified Ideographs Extension A"](i)||pn["CJK Unified Ideographs"](i)||pn["Enclosed CJK Letters and Months"](i)||pn["Halfwidth and Fullwidth Forms"](i)||pn.Hiragana(i)||pn["Ideographic Description Characters"](i)||pn["Kangxi Radicals"](i)||pn["Katakana Phonet
65ic Extensions"](i)||pn.Katakana(i)||pn["Vertical Forms"](i)||pn["Yi Radicals"](i)||pn["Yi Syllables"](i)))&&o.push(Pl(l+1,s,a,o,Ml(c,t.getCharCode(l+1)),!1))}return function t(e){return e?t(e.priorBreak).concat(e.index):[]}(Pl(t.length(),s,a,o,0,!0))}function Ll(t){var e=.5,r=.5;switch(t){case"right":case"top-right":case"bottom-right":e=1;break;case"left":case"top-left":case"bottom-left":e=0}switch(t){case"bottom":case"bottom-right":case"bottom-left":r=1;break;case"top":case"top-right":case"top-left":r=0}return{horizontalAlign:e,verticalAlign:r}}function Ol(t,e,r,n,i){if(i){var o=t[n],a=e[o.fontStack],s=a&&a[o.glyph];if(s)for(var l=s.metrics.advance*o.scale,u=(t[n].x+l)*i,c=r;c<=n;c++)t[c].x-=u}}Dl[10]=!0,Dl[32]=!0,Dl[38]=!0,Dl[40]=!0,Dl[41]=!0,Dl[43]=!0,Dl[45]=!0,Dl[47]=!0,Dl[173]=!0,Dl[183]=!0,Dl[8203]=!0,Dl[8208]=!0,Dl[8211]=!0,Dl[8231]=!0,t.createCommonjsModule=e,t.window=self,t.Point=i,t.browser=M,t.getJSON=function(t,e){return st(p(t,{type:"json"}),e)},t.normalizeSpriteURL=function(t,e,r,n){var i=W(t);return N(t)?(i.path="/styles/v1"+i.path+"/sprite"+e+r,F(i,n)):(i.path+=""+e+r,Z(i))},t.ResourceType=et,t.getImage=ct,t.RGBAImage=Io,t.ImagePosition=Ts,t.Texture=Ms,t.potpack=Es,t.normalizeGlyphsURL=function(t,e){if(!N(t))return t;var r=W(t);return r.path="/fonts/v1"+r.path,F(r,e)},t.getArrayBuffer=lt,t.parseGlyphPBF=function(t){return new Ls(t).readFields(Qs,[])},t.asyncAll=function(t,e,r){if(!t.length)return r(null,[]);var n=t.length,i=new Array(t.length),o=null;t.forEach(function(t,a){e(t,function(t,e){t&&(o=t),i[a]=e,0==--n&&r(o,i)})})},t.isChar=pn,t.AlphaImage=Ao,t.Properties=Bn,t.DataConstantProperty=Pn,t.styleSpec=gt,t.validateLight=Kr,t.endsWith=y,t.emitValidationErrors=$r,t.validateStyle=Yr,t.extend=p,t.Evented=mt,t.sphericalToCartesian=function(t){var e=t[0],r=t[1],n=t[2];return r+=90,r*=Math.PI/180,n*=Math.PI/180,{x:e*Math.cos(r)*Math.sin(n),y:e*Math.sin(r)*Math.sin(n),z:e*Math.cos(n)}},t.number=ue,t.Transitionable=Cn,t.warnOnce=w,t.uniqueId=f,t.Actor=rl,t.normalizeSourceURL=function(t,e){if(!N(t))return t;var r=W(t);return r.path="/v4/"+r.authority+".json",r.params.push("secure"),F(r,e)},t.pick=function(t,e){for(var r={},n=0;n<e.length;n++){var i=e[n];i in t&&(r[i]=t[i])}return r},t.canonicalizeTileset=function(t,e){if(!N(e))return t.tiles||[];for(var r=[],n=0,i=t.tiles;n<i.length;n+=1){var o=i[n],a=H(o);r.push(a)}return r},t.LngLatBounds=il,t.mercatorXfromLng=sl,t.mercatorYfromLat=ll,t.Event=ft,t.ErrorEvent=dt,t.postTurnstileEvent=Q,t.postMapLoadEvent=tt,t.normalizeTileURL=function(t,e,r){if(!e||!N(e))return t;var n=W(t),i=M.devicePixelRatio>=2||512===r?"@2x":"",o=z.supported?".webp":"$1";return n.path=n.path.replace(j,""+i+o),n.path="/v4"+n.path,F(n)},t.OverscaledTileID=dl,t.EXTENT=Xi,t.MercatorCoordinate=pl,t.CanonicalTileID=hl,t.StructArrayLayout4i8=Gn,t.rasterBoundsAttributes=yl,t.SegmentVector=Si,t.getVideo=function(t,e){var r,n,i=self.document.createElement("video");i.muted=!0,i.onloadstart=function(){e(null,i)};for(var o=0;o<t.length;o++){var a=self.document.createElement("source");r=t[o],n=void 0,(n=self.document.createElement("a")).href=r,(n.protocol!==self.document.location.protocol||n.host!==self.document.location.host)&&(i.crossOrigin="Anonymous"),a.src=t[o],i.appendChild(a)}return{cancel:function(){}}},t.ValidationError=yt,t.bindAll=g,t.multiply=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],p=e[8],h=e[9],f=e[10],d=e[11],m=e[12],g=e[13],y=e[14],v=e[15],_=r[0],x=r[1],b=r[2],w=r[3];return t[0]=_*n+x*s+b*p+w*m,t[1]=_*i+x*l+b*h+w*g,t[2]=_*o+x*u+b*f+w*y,t[3]=_*a+x*c+b*d+w*v,_=r[4],x=r[5],b=r[6],w=r[7],t[4]=_*n+x*s+b*p+w*m,t[5]=_*i+x*l+b*h+w*g,t[6]=_*o+x*u+b*f+w*y,t[7]=_*a+x*c+b*d+w*v,_=r[8],x=r[9],b=r[10],w=r[11],t[8]=_*n+x*s+b*p+w*m,t[9]=_*i+x*l+b*h+w*g,t[10]=_*o+x*u+b*f+w*y,t[11]=_*a+x*c+b*d+w*v,_=r[12],x=r[13],b=r[14],w=r[15],t[12]=_*n+x*s+b*p+w*m,t[13]=_*i+x*l+b*h+w*g,t[14]=_*o+x*u+b*f+w*y,t[15]=_*a+x*c+b*d+w*v,t},t.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},t.translate=function(t,e,r){var n,i,o,a,s,l,u,c,p,h,f,d,m=r[0],g=r[1],y=r[2];return e===t?(t[12]=e[0]*m+e[4]*g+e[8]*y+e[12],t[13]=e[1]*m+e[5]*g+e[9]*y+e[13],t[14]=e[2]*m+e[6]*g+e[10]*y+e[14],t[15]=e[3]*m+e[7]*g+e[11]*y+e[15]):(n=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],p=e[8],h=e[9],f=e[10],d=e[11],t[0]=n,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=u,t[7]=c,t[8]=p,t[9]=h,t[10]=f,t[11]=d,t[12]=n*m+s*g+p*y+e[12],t[13]=i*m+l*g
65+h*y+e[13],t[14]=o*m+u*g+f*y+e[14],t[15]=a*m+c*g+d*y+e[15]),t},t.scale=function(t,e,r){var n=r[0],i=r[1],o=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},t.Color=Ft,t.isEqual=a,t.keysDifference=function(t,e){var r=[];for(var n in t)n in e||r.push(n);return r},t.Tile=Sl,t.SourceFeatureState=bl,t.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],t.rotateZ=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[0],a=e[1],s=e[2],l=e[3],u=e[4],c=e[5],p=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+u*n,t[1]=a*i+c*n,t[2]=s*i+p*n,t[3]=l*i+h*n,t[4]=u*i-o*n,t[5]=c*i-a*n,t[6]=p*i-s*n,t[7]=h*i-l*n,t},t.evaluateSizeForZoom=function(t,e,r){if("constant"===t.functionType)return{uSizeT:0,uSize:t.layoutSize};if("source"===t.functionType)return{uSizeT:0,uSize:0};if("camera"===t.functionType){var n=t.propertyValue,i=t.zoomRange,o=t.sizeRange,a=u(_r(n,r.specification).interpolationFactor(e,i.min,i.max),0,1);return{uSizeT:0,uSize:o.min+a*(o.max-o.min)}}var s=t.propertyValue,l=t.zoomRange;return{uSizeT:u(_r(s,r.specification).interpolationFactor(e,l.min,l.max),0,1),uSize:0}},t.WritingMode=Cl,t.transformMat4=_o,t.evaluateSizeForFeature=function(t,e,r){var n=e;return"source"===t.functionType?r.lowerSize/256:"composite"===t.functionType?ue(r.lowerSize/256,r.upperSize/256,n.uSizeT):n.uSize},t.addDynamicAttributes=cs,t.properties=ms,t.polygonIntersectsPolygon=$i,t.isMapboxURL=N,t.normalizeStyleURL=function(t,e){if(!N(t))return t;var r=W(t);return r.path="/styles/v1"+r.path,F(r,e)},t.createStyleLayer=function(t){return"custom"===t.type?new bs(t):new ws[t.type](t)},t.clone=x,t.validateCustomStyleLayer=function(t){var e=[],r=t.id;return void 0===r&&e.push({message:"layers."+r+': missing required property "id"'}),void 0===t.render&&e.push({message:"layers."+r+': missing required method "render"'}),t.renderingMode&&"2d"!==t.renderingMode&&"3d"!==t.renderingMode&&e.push({message:"layers."+r+': property "renderingMode" must be either "2d" or "3d"'}),e},t.filterObject=_,t.mapObject=v,t.evented=bn,t.makeRequest=st,t.registerForPluginAvailability=function(t){return _n?t({pluginURL:_n,completionCallback:yn}):bn.once("pluginAvailable",t),t},t.ZoomHistory=cn,t.getReferrer=at,t.createLayout=jn,t.UniformMatrix4f=Bi,t.Uniform3f=zi,t.Uniform1f=Mi,t.Uniform1i=ki,t.Uniform2f=Pi,t.Uniform4f=Li,t.create=go,t.fromRotation=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=-r,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},t.transformMat3=function(t,e,r){var n=e[0],i=e[1],o=e[2];return t[0]=n*r[0]+i*r[3]+o*r[6],t[1]=n*r[1]+i*r[4]+o*r[7],t[2]=n*r[2]+i*r[5]+o*r[8],t},t.create$1=function(){var t=new mo(16);return mo!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},t.ortho=function(t,e,r,n,i,o,a){var s=1/(e-r),l=1/(n-i),u=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(a+o)*u,t[15]=1,t},t.UniformColor=Oi,t.clamp=u,t.StructArrayLayout2i4=Hn,t.StructArrayLayout2ui4=si,t.ProgramConfiguration=Hi,t.StructArrayLayout1ui2=li,t.StructArrayLayout3ui6=ai,t.wrap=c,t.create$2=function(){var t=new mo(4);return mo!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.rotate=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=n*l+o*s,t[1]=i*l+a*s,t[2]=n*-s+o*l,t[3]=i*-s+a*l,t},t.LngLat=ol,t.UnwrappedTileID=fl,t.perspective=function(t,e,r,n,i){var o,a=1/Math.tan(e/2);return t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(n-i),t[10]=(i+n)*o,t[14]=2*i*n*o):(t[10]=-1,t[14]=-2*n),t},t.rotateX=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[4],a=e[5],s=e[6],l=e[7],u=e[8],c=e[9],p=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+u*n,t[5]=a*i+c*n,t[6]=s*i+p*n,t[7]=l*i+h*n,t[8]=u*i-o*n,t[9]=c*i-a*n,t[10]=p*i-s*n,t[11]=h*i-l*n,t},t.mercatorZfromAltitude=ul,t.invert=function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],p=e[9],h=e[10],f=e[11],d=e[12],m=e[13],g=e[14],y=e[15],v=r*s-n*a,_=r*l-i*a,x=r*u-o*a,b=n*l-i*s,w=n*u-o*s,E=i*u-o*l,T=c*m-p*d,S=c*g-h*d,C=c*y-f*d,A=p*g-h*m,I=p*y-f*m,D=h*y-f*g,k=v*D-_*I+x*A+b*C-w*S+E*T;return k?(k=1/k,t[0]=(s*D-l*I+u*A)*k,t[1]=(i*I-n*D-o*A)*k,t[2]=(m*E-g*w+y*b)*k,t[3]=(h*w-p*E-f*b)*k,t[4]=(l*C-a*D-u*S)*k,t[5]=(r*D-i*C+o*S)*k,t[6]=(g*x-d*E-y*_)*k,t[7]=(c*E-h*x+f*_)*k,t[8]=(a*I-s*C+u*T)*k,t[9]=(n*C-r*I-o*T)*k,t[10]=(d*w-m*x+y*v)*k,t[11]=(p*x-c*w-f*v)*k,t[12]=(s*S-a*A-l*T)*k,t[13]=(r*A-n*S+i*T)*k,t[14]=(m*_-d*b-g*v)*k,t[15]=(c*b-p*_+h*v)*k,t):null},t.ease=l,t.bezier=s,t.config=P,t.webpSupported=z,t.EvaluationParameters=En,t.version="0.53.1",t.setRTLTextPlugin=function(t,e){if(vn)throw new Error("setRTLTextPlugin cannot be called multiple times.");vn=!0,_n=M.resolveURL(t),yn=function(t){t?(vn=!1,_n=null,e&&e(t)):xn=!0},bn.fire(new ft("pluginAvailable",{pluginURL:_n,completionCallback:yn}))},t.featureFilter=Ir,t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.Anchor=os,t.GLYPH_PBF_BORDER=el,t.distToSegmentSquared=ao,t.allowsLetterSpacing=function(t){for(var e=0,r=t;e<r.length;e+=1)if(!fn(r[e].charCodeAt(0)))return!1;return!0},t.shapeText=function(t,e,r,n,i,o,a,s,l,u,c){var p=Al.fromFeature(t,r);c===Cl.vertical&&p.verticalizePunctuation();var h,f=[],d={positionedGlyphs:f,text:p,top:l[1],bottom:l[1],left:l[0],right:l[0],writingMode:c},m=wn.processBidirectionalText,g=wn.processStyledBidirectionalText;if(m&&1===p.sections.length){h=[];for(var y=0,v=m(p.toString(),zl(p,s,n,e));y<v.length;y+=1){var _=v[y],x=new Al;x.text=_,x.sections=p.sections;for(var b=0;b<_.length;b++)x.sectionIndex.push(0);h.push(x)}}else if(g){h=[];for(var w=0,E=g(p.text,p.sectionIndex,zl(p,s,n,e));w<E.length;w+=1){var T=E[w],S=new Al;S.text=T[0],S.sectionIndex=T[1],S.sections=p.sections,h.push(S)}}else h=function(t,e){for(var r=[],n=t.text,i=0,o=0,a=e;o<a.length;o+=1){var s=a[o];r.push(t.substring(i,s)),i=s}return i<n.length&&r.push(t.substring(i,n.length)),r}(p,zl(p,s,n,e));return function(t,e,r,n,i,o,a,s,l){for(var u=0,c=-17,p=0,h=t.positionedGlyphs,f="right"===o?1:"left"===o?0:.5,d=0,m=r;d<m.length;d+=1){var g=m[d];g.trim();var y=g.getMaxScale();if(g.length()){for(var v=h.length,_=0;_<g.length();_++){var x=g.getSection(_),b=g.getCharCode(_),w=24*(y-x.scale),E=e[x.fontStack],T=E&&E[b];T&&(dn(b)&&a!==Cl.horizontal?(h.push({glyph:b,x:u,y:w,vertical:!0,scale:x.scale,fontStack:x.fontStack}),u+=l*x.scale+s):(h.push({glyph:b,x:u,y:c+w,vertical:!1,scale:x.scale,fontStack:x.fontStack}),u+=T.metrics.advance*x.scale+s))}if(h.length!==v){var S=u-s;p=Math.max(S,p),Ol(h,e,v,h.length-1,f)}u=0,c+=n*y}else c+=n}var C=Ll(i),A=C.horizontalAlign,I=C.verticalAlign;!function(t,e,r,n,i,o,a){for(var s=(e-r)*i,l=(-n*a+.5)*o,u=0;u<t.length;u++)t[u].x+=s,t[u].y+=l}(h,f,A,I,p,n,r.length);var D=c- -17;t.top+=-I*D,t.bottom=t.top+D,t.left+=-A*p,t.right=t.left+p}(d,e,h,i,o,a,c,s,u),!!f.length&&(d.text=d.text.toString(),d)},t.allowsVerticalWritingMode=hn,t.shapeIcon=function(t,e,r){var n=Ll(r),i=n.horizontalAlign,o=n.verticalAlign,a=e[0],s=e[1],l=a-t.displaySize[0]*i,u=l+t.displaySize[0],c=s-t.displaySize[1]*o;return{image:t,top:c,bottom:c+t.displaySize[1],left:l,right:u}},t.classifyRings=ca,t.SIZE_PACK_FACTOR=256,t.SymbolBucket=fs,t.register=an,t.CollisionBoxArray=hi,t.DictionaryCoder=vl,t.FeatureIndex=wl,t.ImageAtlas=Cs,t.LineBucket=Ga,t.FillBucket=da,t.FillExtrusionBucket=ba,t.mvt=Fa,t.Protobuf=Ls,t.DEMData=gl,t.vectorTile=Fa,t.Point$1=i,t.pbf=Ls,t.createExpression=dr,t.plugin=wn}),n(0,function(t){function e(t){var r=typeof t;if("number"===r||"boolean"===r||"string"===r||null==t)return JSON.stringify(t);if(Array.isArray(t)){for(var n="[",i=0,o=t;i<o.length;i+=1)n+=e(o[i])+",";return n+"]"}for(var a=Object.keys(t).sort(),s="{",l=0;l<a.length;l++)s+=JSON.stringify(a[l])+":"+e(t[a[l]])+",";return s+"}"}function r(r){for(var n="",i=0,o=t.refProperties;i<o.length;i+=1)n+="/"+e(r[o[i]]);return n}var n=function(t){t&&this.replace(t)};function i(t,e,r,n,i){if(void 0===e.segment)return!0;for(var o=e,a=e.segment+1,s=0;s>-r/2;){if(--a<0)return!1;s-=t[a].dist(o),o=t[a]}s+=t[a].dist(t[a+1]),a++;for(var l=[],u=0;s<r/2;){var c=t[a-1],p=t[a],h=t[a+1];if(!h)return!1;var f=c.angleTo(p)-p.angleTo(h);for(f=Math.abs((f+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:s,angleDelta:f}),u+=f;s-l[0].distance>n;)u-=l.shift().angleDelta;if(u>i)return!1;a++,s+=p.dist(h)}return!0}function o(t){for(var e=0,r=0;r<t.length-1;r++)e+=t[r].dist(t[r+1]);return e}function a(t,e,r){return t?.6*e*r:0}function s(t,e){return Math.max(t?t.right-t.left:0,e?e.right-e.left:0)}function l(e,r,n,l,u,c){for(var p=a(n,u,c),h=s(n,l)*c,f=0,d=o(e)/2,m=0;m<e.length-1;m++){var g=e[m],y=e[m+1],v=g.dist(y);if(f+v>d){var _=(d-f)/v,x=t.number(g.x,y.x,_),b=t.number(g.y,y.y,_),w=new t.Anchor(x,b,y.angleTo(g),m);return w._round(),!p||i(e,w,h,p,r)?w:void 0}f+=v}}function u(e,r,n,l,u,c,p,h,f){var d=a(l,c,p),m=s(l,u),g=m*p,y=0===e[0].x||e[0].x===f||0===e[0].y||e[0].y===f;return r-g<r/4&&(r=g+r/4),function e(r,n,a,s,l,u,c,p,h){for(var f=u/2,d=o(r),m=0,g=n-a,y=[],v=0;v<r.length-1;v++){for(var _=r[v],x=r[v+1],b=_.dist(x),w=x.angleTo(_);g+a<m+b;){var E=((g+=a)-m)/b,T=t.number(_.x,x.x,E),S=t.number(_.y,x.y,E);if(T>=0&&T<h&&S>=0&&S<h&&g-f>=0&&g+f<=d){var C=new t.Anchor(T,S,w,v);C._round(),s&&!i(r,C,u,s,l)||y.push(C)}}m+=b}return p||y.length||c||(y=e(r,m/2,a,s,l,u,c,!0,h)),y}(e,y?r/2*h%r:(m/2+2*c)*p*h%r,r,d,n,g,y,!1,f)}n.prototype.replace=function(t){this._layerConfigs={},this._layers={},this.update(t,[])},n.prototype.update=function(e,n){for(var i=this,o=0,a=e;o<a.length;o+=1){var s=a[o];this._layerConfigs[s.id]=s;var l=this._layers[s.id]=t.createStyleLayer(s);l._featureFilter=t.featureFilter(l.filter)}for(var u=0,c=n;u<c.length;u+=1){var p=c[u];delete this._layerConfigs[p],delete this._layers[p]}this.familiesBySource={};for(var h=0,f=function(t){for(var e={},n=0;n<t.length;n++){var i=r(t[n]),o=e[i];o||(o=e[i]=[]),o.push(t[n])}var a=[];for(var s in e)a.push(e[s]);return a}(t.values(this._layerConfigs));h<f.length;h+=1){var d=f[h].map(function(t){return i._layers[t.id]}),m=d[0];if("none"!==m.visibility){var g=m.source||"",y=this.familiesBySource[g];
vendor: 6,286 bytes, line 65
65y||(y=this.familiesBySource[g]={});var v=m.sourceLayer||"_geojsonTileLayer",_=y[v];_||(_=y[v]=[]),_.push(d)}}};var c=function(e,r,n,i,o,a,s,l,u,c,p,h){var f=s.top*l-u,d=s.bottom*l+u,m=s.left*l-u,g=s.right*l+u;if(this.boxStartIndex=e.length,c){var y=d-f,v=g-m;y>0&&(y=Math.max(10*l,y),this._addLineCollisionCircles(e,r,n,n.segment,v,y,i,o,a,p))}else{if(h){var _=new t.Point(m,f),x=new t.Point(g,f),b=new t.Point(m,d),w=new t.Point(g,d),E=h*Math.PI/180;_._rotate(E),x._rotate(E),b._rotate(E),w._rotate(E),m=Math.min(_.x,x.x,b.x,w.x),g=Math.max(_.x,x.x,b.x,w.x),f=Math.min(_.y,x.y,b.y,w.y),d=Math.max(_.y,x.y,b.y,w.y)}e.emplaceBack(n.x,n.y,m,f,g,d,i,o,a,0,0)}this.boxEndIndex=e.length};c.prototype._addLineCollisionCircles=function(t,e,r,n,i,o,a,s,l,u){var c=o/2,p=Math.floor(i/c)||1,h=1+.4*Math.log(u)/Math.LN2,f=Math.floor(p*h/2),d=-o/2,m=r,g=n+1,y=d,v=-i/2,_=v-i/4;do{if(--g<0){if(y>v)return;g=0;break}y-=e[g].dist(m),m=e[g]}while(y>_);for(var x=e[g].dist(e[g+1]),b=-f;b<p+f;b++){var w=b*c,E=v+w;if(w<0&&(E+=w),w>i&&(E+=w-i),!(E<y)){for(;y+x<E;){if(y+=x,++g+1>=e.length)return;x=e[g].dist(e[g+1])}var T=E-y,S=e[g],C=e[g+1].sub(S)._unit()._mult(T)._add(S)._round(),A=Math.abs(E-d)<c?0:.8*(E-d);t.emplaceBack(C.x,C.y,-o/2,-o/2,o/2,o/2,a,s,l,o/2,A)}}};var p=function(t,e){if(void 0===t&&(t=[]),void 0===e&&(e=h),this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function h(t,e){return t<e?-1:t>e?1:0}function f(e,r,n){void 0===r&&(r=1),void 0===n&&(n=!1);for(var i=1/0,o=1/0,a=-1/0,s=-1/0,l=e[0],u=0;u<l.length;u++){var c=l[u];(!u||c.x<i)&&(i=c.x),(!u||c.y<o)&&(o=c.y),(!u||c.x>a)&&(a=c.x),(!u||c.y>s)&&(s=c.y)}var h=a-i,f=s-o,g=Math.min(h,f),y=g/2,v=new p([],d);if(0===g)return new t.Point(i,o);for(var _=i;_<a;_+=g)for(var x=o;x<s;x+=g)v.push(new m(_+y,x+y,y,e));var b=function(t){for(var e=0,r=0,n=0,i=t[0],o=0,a=i.length,s=a-1;o<a;s=o++){var l=i[o],u=i[s],c=l.x*u.y-u.x*l.y;r+=(l.x+u.x)*c,n+=(l.y+u.y)*c,e+=3*c}return new m(r/e,n/e,0,t)}(e);for(v.length;v.length;){var w=v.pop();(w.d>b.d||!b.d)&&(b=w),w.max-b.d<=r||(y=w.h/2,v.push(new m(w.p.x-y,w.p.y-y,y,e)),v.push(new m(w.p.x+y,w.p.y-y,y,e)),v.push(new m(w.p.x-y,w.p.y+y,y,e)),v.push(new m(w.p.x+y,w.p.y+y,y,e)),4)}return b.p}function d(t,e){return e.max-t.max}function m(e,r,n,i){this.p=new t.Point(e,r),this.h=n,this.d=function(e,r){for(var n=!1,i=1/0,o=0;o<r.length;o++)for(var a=r[o],s=0,l=a.length,u=l-1;s<l;u=s++){var c=a[s],p=a[u];c.y>e.y!=p.y>e.y&&e.x<(p.x-c.x)*(e.y-c.y)/(p.y-c.y)+c.x&&(n=!n),i=Math.min(i,t.distToSegmentSquared(e,c,p))}return(n?1:-1)*Math.sqrt(i)}(this.p,i),this.max=this.d+this.h*Math.SQRT2}p.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},p.prototype.pop=function(){if(0!==this.length){var t=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),t}},p.prototype.peek=function(){return this.data[0]},p.prototype._up=function(t){for(var e=this.data,r=this.compare,n=e[t];t>0;){var i=t-1>>1,o=e[i];if(r(n,o)>=0)break;e[t]=o,t=i}e[t]=n},p.prototype._down=function(t){for(var e=this.data,r=this.compare,n=this.length>>1,i=e[t];t<n;){var o=1+(t<<1),a=e[o],s=o+1;if(s<this.length&&r(e[s],a)<0&&(o=s,a=e[s]),r(a,i)>=0)break;e[t]=a,t=o}e[t]=i};var g=t.createCommonjsModule(function(t){t.exports=function(t,e){var r,n,i,o,a,s,l,u;for(r=3&t.length,n=t.length-r,i=e,a=3432918353,s=461845907,u=0;u<n;)l=255&t.charCodeAt(u)|(255&t.charCodeAt(++u))<<8|(255&t.charCodeAt(++u))<<16|(255&t.charCodeAt(++u))<<24,++u,i=27492+(65535&(o=5*(65535&(i=(i^=l=(65535&(l=(l=(65535&l)*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&t.charCodeAt(u+2))<<16;case 2:l^=(255&t.charCodeAt(u+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&t.charCodeAt(u)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return i^=t.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0}}),y=g,v=g,_=t.createCommonjsModule(function(t){t.exports=function(t,e){for(var r,n=t.length,i=e^n,o=0;n>=4;)r=1540483477*(65535&(r=255&t.charCodeAt(o)|(255&t.charCodeAt(++o))<<8|(255&t.charCodeAt(++o))<<16|(255&t.charCodeAt(++o))<<24))+((1540483477*(r>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:i^=(255&t.charCodeAt(o+2))<<16;case 2:i^=(255&t.charCodeAt(o+1))<<8;case 1:i=1540483477*(65535&(i^=255&t.charCodeAt(o)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}});function x(e,r,n,i,o,a){e.createArrays();var s=512*e.overscaling;e.tilePixelRatio=t.EXTENT/s,e.compareText={},e.iconsNeedLinear=!1;var l=e.layers[0].layout,u=e.layers[0]._unevaluatedLayout._values,c={};if("composite"===e.textSizeData.functionType){var p=e.textSizeData.zoomRange,h=p.min,f=p.max;c.compositeTextSizes=[u["text-size"].possiblyEvaluate(new t.EvaluationParameters(h)),u["text-size"].possiblyEvaluate(new t.EvaluationParameters(f))]}if("composite"===e.iconSizeData.functionType){var d=e.iconSizeData.zoomRange,m=d.min,g=d.max;c.compositeIconSizes=[u["icon-size"].possiblyEvaluate(new t.EvaluationParameters(m)),u["icon-size"].possiblyEvaluate(new t.EvaluationParameters(g))]}c.layoutTextSize=u["text-size"].possiblyEvaluate(new t.EvaluationParameters(e.zoom+1)),c.layoutIconSize=u["icon-size"].possiblyEvaluate(new t.EvaluationParameters(e.zoom+1)),c.textMaxSize=u["text-size"].possiblyEvaluate(new t.EvaluationParameters(18));for(var y=24*l.get("text-line-height"),v="map"===l.get("text-rotation-alignment")&&"point"!==l.get("symbol-placement"),_=l.get("text-keep-upright"),x=0,w=e.features;x<w.length;x+=1){var E=w[x],T=l.get("text-font").evaluate(E,{}).join(","),S=n,C={},A=E.text;if(A){var I=A.toString(),D=l.get("text-offset").evaluate(E,{}).map(function(t){return 24*t}),k=24*l.get("text-letter-spacing").evaluate(E,{}),M=t.allowsLetterSpacing(I)?k:0,P=l.get("text-anchor").evaluate(E,{}
65),z=l.get("text-justify").evaluate(E,{}),L="point"===l.get("symbol-placement")?24*l.get("text-max-width").evaluate(E,{}):0;C.horizontal=t.shapeText(A,r,T,L,y,P,z,M,D,24,t.WritingMode.horizontal),t.allowsVerticalWritingMode(I)&&v&&_&&(C.vertical=t.shapeText(A,r,T,L,y,P,z,M,D,24,t.WritingMode.vertical))}var O=void 0;if(E.icon){var R=i[E.icon];R&&(O=t.shapeIcon(o[E.icon],l.get("icon-offset").evaluate(E,{}),l.get("icon-anchor").evaluate(E,{})),void 0===e.sdfIcons?e.sdfIcons=R.sdf:e.sdfIcons!==R.sdf&&t.warnOnce("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),R.pixelRatio!==e.pixelRatio?e.iconsNeedLinear=!0:0!==l.get("icon-rotate").constantOr(1)&&(e.iconsNeedLinear=!0))}(C.horizontal||O)&&b(e,E,C,O,S,c)}a&&e.generateCollisionDebugBuffers()}function b(e,r,n,i,o,a){var s=a.layoutTextSize.evaluate(r,{}),p=a.layoutIconSize.evaluate(r,{}),h=a.textMaxSize.evaluate(r,{});void 0===h&&(h=s);var d=e.layers[0].layout,m=d.get("text-offset").evaluate(r,{}),g=d.get("icon-offset").evaluate(r,{}),v=s/24,_=e.tilePixelRatio*v,x=e.tilePixelRatio*h/24,b=e.tilePixelRatio*p,S=e.tilePixelRatio*d.get("symbol-spacing"),C=d.get("text-padding")*e.tilePixelRatio,A=d.get("icon-padding")*e.tilePixelRatio,I=d.get("text-max-angle")/180*Math.PI,D="map"===d.get("text-rotation-alignment")&&"point"!==d.get("symbol-placement"),k="map"===d.get("icon-rotation-alignment")&&"point"!==d.get("symbol-placement"),M=d.get("symbol-placement"),P=S/2,z=function(s,l){l.x<0||l.x>=t.EXTENT||l.y<0||l.y>=t.EXTENT||function(e,r,n,i,o,a,s,l,u,p,h,f,d,m,g,v,_,x,b,T,S){var C,A,I=e.addToLineVertexArray(r,n),D=0,k=0,M=0,P=y(i.horizontal?i.horizontal.text:""),z=[];if(i.horizontal){var L=a.layout.get("text-rotate").evaluate(b,{});C=new c(s,n,r,l,u,p,i.horizontal,h,f,d,e.overscaling,L),k+=E(e,r,i.horizontal,a,d,b,m,I,i.vertical?t.WritingMode.horizontal:t.WritingMode.horizontalOnly,z,T,S),i.vertical&&(M+=E(e,r,i.vertical,a,d,b,m,I,t.WritingMode.vertical,z,T,S))}var O=C?C.boxStartIndex:e.collisionBoxArray.length,R=C?C.boxEndIndex:e.collisionBoxArray.length;if(o){var B=function(e,r,n,i,o,a){var s,l,u,c,p=r.image,h=n.layout,f=r.top-1/p.pixelRatio,d=r.left-1/p.pixelRatio,m=r.bottom+1/p.pixelRatio,g=r.right+1/p.pixelRatio;if("none"!==h.get("icon-text-fit")&&o){var y=g-d,v=m-f,_=h.get("text-size").evaluate(a,{})/24,x=o.left*_,b=o.right*_,w=o.top*_,E=b-x,T=o.bottom*_-w,S=h.get("icon-text-fit-padding")[0],C=h.get("icon-text-fit-padding")[1],A=h.get("icon-text-fit-padding")[2],I=h.get("icon-text-fit-padding")[3],D="width"===h.get("icon-text-fit")?.5*(T-v):0,k="height"===h.get("icon-text-fit")?.5*(E-y):0,M="width"===h.get("icon-text-fit")||"both"===h.get("icon-text-fit")?E:y,P="height"===h.get("icon-text-fit")||"both"===h.get("icon-text-fit")?T:v;s=new t.Point(x+k-I,w+D-S),l=new t.Point(x+k+C+M,w+D-S),u=new t.Point(x+k+C+M,w+D+A+P),c=new t.Point(x+k-I,w+D+A+P)}else s=new t.Point(d,f),l=new t.Point(g,f),u=new t.Point(g,m),c=new t.Point(d,m);var z=n.layout.get("icon-rotate").evaluate(a,{})*Math.PI/180;if(z){var L=Math.sin(z),O=Math.cos(z),R=[O,-L,L,O];s._matMult(R),l._matMult(R),c._matMult(R),u._matMult(R)}return[{tl:s,tr:l,bl:c,br:u,tex:p.paddedRect,writingMode:void 0,glyphOffset:[0,0]}]}(0,o,a,0,i.horizontal,b),F=a.layout.get("icon-rotate").evaluate(b,{});A=new c(s,n,r,l,u,p,o,g,v,!1,e.overscaling,F),D=4*B.length;var N=e.iconSizeData,U=null;"source"===N.functionType?(U=[t.SIZE_PACK_FACTOR*a.layout.get("icon-size").evaluate(b,{})])[0]>w&&t.warnOnce(e.layerIds[0]+': Value for "icon-size" is >= 256. Reduce your "icon-size".'):"composite"===N.functionType&&((U=[t.SIZE_PACK_FACTOR*S.compositeIconSizes[0].evaluate(b,{}),t.SIZE_PACK_FACTOR*S.compositeIconSizes[1].evaluate(b,{})])[0]>w||U[1]>w)&&t.warnOnce(e.layerIds[0]+': Value for "icon-size" is >= 256. Reduce your "icon-size".'),e.addSymbols(e.icon,B,U,x,_,b,!1,r,I.lineStartIndex,I.lineLength)}var V=A?A.boxStartIndex:e.collisionBoxArray.length,j=A?A.boxEndIndex:e.collisionBoxArray.length;e.glyphOffsetArray.length>=t.SymbolBucket.MAX_GLYPHS&&t.warnOnce("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),e.symbolInstances.emplaceBack(r.x,r.y,z.length>0?z[0]:-1,z.length>1?z[1]:-1,P,O,R,V,j,l,k,M,D,0)}(e,l,s,n,i,e.layers[0],e.collisionBoxArray,r.index,r.sourceLayerIndex,e.index,_,C,D,m,b,A,k,g,r,o,a)};if("line"===M)for(var L=0,O=function(e,r,n,i,o){for(var a=[],s=0;s<e.length;s++)for(var l=e[s],u=void 0,c=0;c<l.length-1;c++){var p=l[c],h=l[c+1];p.x<0&&h.x<0||(p.x<0?p=new t.Point(0,p.y+(h.y-p.y)*((0-p.x)/(h.x-p.x)))._round():h.x<0&&(h=new t.Point(0,p.y+(h.y-p.y)*((0-p.x)/(h.x-p.x)))._round()),p.y<0&&h.y<0||(p.y<0?p=new t.Point(p.x+(h.x-p.x)*((0-p.y)/(h.y-p.y)),0)._round():h.y<0&&(h=new t.Point(p.x+(h.x-p.x)*((0-p.y)/(h.y-p.y)),0)._round()),p.x>=i&&h.x>=i||(p.x>=i?p=new t.Point(i,p.y+(h.y-p.y)*((i-p.x)/(h.x-p.x)))._round():h.x>=i&&(h=new t.Point(i,p.y+(h.y-p.y)*((i-p.x)/(h.x-p.x)))._round()),p.y>=o&&h.y>=o||(p.y>=o?p=new t.Point(p.x+(h.x-p.x)*((o-p.y)/(h.y-p.y)),o)._round():h.y>=o&&(h=new t.Point(p.x+(h.x-p.x)*((o-p.y)/(h.y-p.y)),o)._round()),u&&p.equals(u[u.length-1])||(u=[p],a.push(u)),u.push(h)))))}return a}(r.geometry,0,0,t.EXTENT,t.EXTENT);L<O.length;L+=1)for(var R=O[L],B=0,F=u(R,S,I,n.vertical||n.horizontal,i,24,x,e.overscaling,t.EXTENT);B<F.length;B+=1){var N=F[B],U=n.horizontal;U&&T(e,U.text,P,N)||z(R,N)}else if("line-center"===M)for(var V=0,j=r.geometry;V<j.length;V+=1){var q=j[V];if(q.length>1){var H=l(q,I,n.vertical||n.horizontal,i,24,x);H&&z(q,H)}}else if("Polygon"===r.type)for(var G=0,W=t.classifyRings(r.geometry,0);G<W.length;G+=1){var Z=W[G],X=f(Z,16);z(Z[0],new t.Anchor(X.x,X.y,0))}else if("LineString"===r.type)for(var Y=0,K=r.geometry;Y<K.length;Y+=1){var J=K[Y];z(J,new t.Anchor(J[0].x,J[0].y,0))}else if("Point"===r.type)for(var Q=0,$=r.geometry;Q<$.length;Q+=1)for(var tt=0,et=$[Q];tt<et.length;tt+=1){var rt=et[tt];z([rt],new t.Anchor(rt.x,rt.y,0))}}y.murmur3=v,y.murmur2=_;var w=65535;function E(e,r,n,i,o,a,s,l,u,c,p,h){var f=function(e,r,n,i,o,a){for(var s=n.layout.get("text-rotate").evaluate(o,{})*Math.PI/180,l=n.layout.get("text-offset").evaluate(o,{}).map(function(t){return 24*t}),u=r.positionedGlyphs,c=[],p=0;p<u.length;p++){var h=u[p],f=a[h.fontStack],d=f&&f[h.glyph];if(d){var m=d.rect;if(m){var g=t.GLYPH_PBF_BORDER+1,y=d.metrics.advance*h.scale/2,v=i?[h.x+y,h.y]:[0,0],_=i?[0,0]:[h.x+y+l[0],h.y+l[1]],x=(d.metrics.left-g)*h.scale-y+_[0],b=(-d.metrics.top-g)*h.scale+_[1],w=x+m.w*h.scale,E=b+m.h*h.scale,T=new t.Point(x,b),S=new t.Point(w,b),C=new t.Point(x,E),A=new t.Point(w,E);if(i&&h.vertical){var I=new t.Point(-y,y),D=-Math.PI/2,k=new t.Point(5,0);
65T._rotateAround(D,I)._add(k),S._rotateAround(D,I)._add(k),C._rotateAround(D,I)._add(k),A._rotateAround(D,I)._add(k)}if(s){var M=Math.sin(s),P=Math.cos(s),z=[P,-M,M,P];T._matMult(z),S._matMult(z),C._matMult(z),A._matMult(z)}c.push({tl:T,tr:S,bl:C,br:A,tex:m,writingMode:r.writingMode,glyphOffset:v})}}}return c}(0,n,i,o,a,p),d=e.textSizeData,m=null;return"source"===d.functionType?(m=[t.SIZE_PACK_FACTOR*i.layout.get("text-size").evaluate(a,{})])[0]>w&&t.warnOnce(e.layerIds[0]+': Value for "text-size" is >= 256. Reduce your "text-size".'):"composite"===d.functionType&&((m=[t.SIZE_PACK_FACTOR*h.compositeTextSizes[0].evaluate(a,{}),t.SIZE_PACK_FACTOR*h.compositeTextSizes[1].evaluate(a,{})])[0]>w||m[1]>w)&&t.warnOnce(e.layerIds[0]+': Value for "text-size" is >= 256. Reduce your "text-size".'),e.addSymbols(e.text,f,m,s,o,a,u,r,l.lineStartIndex,l.lineLength),c.push(e.text.placedSymbolArray.length-1),4*f.length}function T(t,e,r,n){var i=t.compareText;if(e in i){for(var o=i[e],a=o.length-1;a>=0;a--)if(n.dist(o[a])<r)return!0}else i[e]=[];return i[e].push(n),!1}var S=function(e){var r={},n=[];for(var i in e){var o=e[i],a=r[i]={};for(var s in o){var l=o[+s];if(l&&0!==l.bitmap.width&&0!==l.bitmap.height){var u={x:0,y:0,w:l.bitmap.width+2,h:l.bitmap.height+2};n.push(u),a[s]={rect:u,metrics:l.metrics}}}}var c=t.potpack(n),p=c.w,h=c.h,f=new t.AlphaImage({width:p||1,height:h||1});for(var d in e){var m=e[d];for(var g in m){var y=m[+g];if(y&&0!==y.bitmap.width&&0!==y.bitmap.height){var v=r[d][g].rect;t.AlphaImage.copy(y.bitmap,f,{x:0,y:0},{x:v.x+1,y:v.y+1},y.bitmap)}}}this.image=f,this.positions=r};t.register("GlyphAtlas",S);var C=function(e){this.tileID=new t.OverscaledTileID(e.tileID.overscaledZ,e.tileID.wrap,e.tileID.canonical.z,e.tileID.canonical.x,e.tileID.canonical.y),this.uid=e.uid,this.zoom=e.zoom,this.pixelRatio=e.pixelRatio,this.tileSize=e.tileSize,this.source=e.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=e.showCollisionBoxes,this.collectResourceTiming=!!e.collectResourceTiming,this.returnDependencies=!!e.returnDependencies};function A(e,r){for(var n=new t.EvaluationParameters(r),i=0,o=e;i<o.length;i+=1)o[i].recalculate(n)}C.prototype.parse=function(e,r,n,i){var o=this;this.status="parsing",this.data=e,this.collisionBoxArray=new t.CollisionBoxArray;var a=new t.DictionaryCoder(Object.keys(e.layers).sort()),s=new t.FeatureIndex(this.tileID);s.bucketLayerIDs=[];var l,u,c,p,h={},f={featureIndex:s,iconDependencies:{},patternDependencies:{},glyphDependencies:{}},d=r.familiesBySource[this.source];for(var m in d){var g=e.layers[m];if(g){1===g.version&&t.warnOnce('Vector tile source "'+this.source+'" layer "'+m+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var y=a.encode(m),v=[],_=0;_<g.length;_++){var b=g.feature(_);v.push({feature:b,index:_,sourceLayerIndex:y})}for(var w=0,E=d[m];w<E.length;w+=1){var T=E[w],C=T[0];C.minzoom&&this.zoom<Math.floor(C.minzoom)||C.maxzoom&&this.zoom>=C.maxzoom||"none"!==C.visibility&&(A(T,this.zoom),(h[C.id]=C.createBucket({index:s.bucketLayerIDs.length,layers:T,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:y,sourceID:this.source})).populate(v,f),s.bucketLayerIDs.push(T.map(function(t){return t.id})))}}}var I=t.mapObject(f.glyphDependencies,function(t){return Object.keys(t).map(Number)});Object.keys(I).length?n.send("getGlyphs",{uid:this.uid,stacks:I},function(t,e){l||(l=t,u=e,M.call(o))}):u={};var D=Object.keys(f.iconDependencies);D.length?n.send("getImages",{icons:D},function(t,e){l||(l=t,c=e,M.call(o))}):c={};var k=Object.keys(f.patternDependencies);function M(){if(l)return i(l);if(u&&c&&p){var e=new S(u),r=new t.ImageAtlas(c,p);for(var n in h){var o=h[n];o instanceof t.SymbolBucket?(A(o.layers,this.zoom),x(o,u,e.positions,c,r.iconPositions,this.showCollisionBoxes)):o.hasPattern&&(o instanceof t.LineBucket||o instanceof t.FillBucket||o instanceof t.FillExtrusionBucket)&&(A(o.layers,this.zoom),o.addFeatures(f,r.patternPositions))}this.status="done",i(null,{buckets:t.values(h).filter(function(t){return!t.isEmpty()}),featureIndex:s,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:r,glyphMap:this.returnDependencies?u:null,iconMap:this.returnDependencies?c:null,glyphPositions:this.returnDependencies?e.positions:null})}}k.length?n.send("getImages",{icons:k},function(t,e){l||(l=t,p=e,M.call(o))}):p={},M.call(this)};var I="undefined"!=typeof performance,D={getEntriesByName:function(t){return!!(I&&performance&&performance.getEntriesByName)&&performance.getEntriesByName(t)},mark:function(t){return!!(I&&performance&&performance.mark)&&performance.mark(t)},measure:function(t,e,r){return!!(I&&performance&&performance.measure)&&performance.measure(t,e,r)},clearMarks:function(t){return!!(I&&performance&&performance.clearMarks)&&performance.clearMarks(t)},clearMeasures:function(t){return!!(I&&performance&&performance.clearMeasures)&&performance.clearMeasures(t)}},k=function(t){this._marks={start:[t.url,"start"].join("#"),end:[t.url,"end"].join("#"),measure:t.url.toString()},D.mark(this._marks.start)};function M(e,r){var n=t.getArrayBuffer(e.request,function(e,n,i,o){e?r(e):n&&r(null,{vectorTile:new t.mvt.VectorTile(new t.Protobuf(n)),rawData:n,cacheControl:i,expires:o})});return function(){n.cancel(),r()}}k.prototype.finish=function(){D.mark(this._marks.end);var t=D.getEntriesByName(this._marks.measure);return 0===t.length&&(D.measure(this._marks.measure,this._marks.start,this._marks.end),t=D.getEntriesByName(this._marks.measure),D.clearMarks(this._marks.start),D.clearMarks(this._marks.end),D.clearMeasures(this._marks.measure)),t},D.Performance=k;var P=function(t,e,r){this.actor=t,this.layerIndex=e,this.loadVectorData=r||M,this.loading={},this.loaded={}};P.prototype.loadTile=function(e,r){var n=this,i=e.uid;this.loading||(this.loading={});var o=!!(e&&e.request&&e.request.collectResourceTiming)&&new D.Performance(e.request),a=this.loading[i]=new C(e);a.abort=this.loadVectorData(e,function(e,s){if(delete n.loading[i],e||!s)return a.status="done",n.loaded[i]=a,r(e);var l=s.rawData,u={};s.expires&&(u.expires=s.expires),s.cacheControl&&(u.cacheControl=s.cacheControl);var c={};if(o){var p=o.finish();p&&(c.resourceTiming=JSON.parse(JSON.stringify(p)))}a.vectorTile=s.vectorTile,a.parse(s.vectorTile,n.layerIndex,n.actor,function(e,n){if(e||!n)return r(e);r(null,t.extend({rawTileData:l.slice(0)},n,u,c))}),n.loaded=n.loaded||{},n.loaded[i]=a})},P.prototype.reloadTile=function(t,e){var r=this.loaded,n=t.uid,i=this;if(r&&r[n]){var o=r[n];o.showCollisionBoxes=t.showCollisionBoxes;var a=function(t,r){var n=o.reloadCallback;n&&(delete o.reloadCallback,o.parse(o.vectorTile,i.layerIndex,i.actor,n)),e(t,r)};"parsing"===o.status?o.reloadCallback=a:"done"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.actor,a):a())}},P.prototype.abortTile=function(t,e){var r=this.loading,n=t.uid;r&&r[n]&&r[n].abort&&(r[n].abort(),delete r[n]),e()},P.prototype.removeTile=function(t,e){var r=this.loaded,n=t.uid;r&&r[n]&&delete r[n],e()};var z=function(){this.loaded={}};z.prototype.loadTile=function(e,r){var n=e.uid,i=e.encoding,o=e.rawImageData,a=new t.DEMData(n,o,i);this.loaded=this.loaded||{},this.loaded[n]=a,r(null,a)},z.prototype.removeTile=function(t){var e=this.loaded,r=t.uid;e&&e[r]&&delete e[r]};var L={RADIUS:6378137,FLATTENING:1/298.257223563,POLAR_RADIUS:6356752.3142};function O(t){var e=0;if(t&&t.length>0){e+=Math.abs(R(t[0]));for(var r=1;r<t.length;r++)e-=Math.abs(R(t[r]))}return e}function R(t){var e,r,n,i,o,a,s=0,l=t.length;if(l>2){for(a=0;a<l;a++)a===l-2?(n=l-2,i=l-1,o=0):a===l-1?(n=l-1,i=0,o=1):(n=a,i=a+1,o=a+2),e=t[n],r=t[i],s+=(B(t[o][0])-B(e[0]))*Math.sin(B(r[1]));s=s*L.RADIUS*L.RADIUS/2}return s}function B(t){return t*Math.PI/180}var F={geometry:function t(e){var r,n=0;switch(e.type){case"Polygon":return O(e.coordinates);case"MultiPolygon":for(r=0;r<e.coordinates.length;r++)n+=O(e.coordinates[r]);return n;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0;case"GeometryCollection":for(r=0;r<e.geometries.length;r++)n+=t(e.geometries[r]);return n}},ring:R};function N(t,e){return function(r){return t(r,e)}}function U(t,e){e=!!e,t[0]=V(t[0],e);for(var r=1;r<t.length;r++)t[r]=V(t[r],!e);return t}function V(t,e){return function(t){return F.ring(t)>=0}(t)===e?t:t.reverse()}var j=t.mvt.VectorTileFeature.prototype.toGeoJSON,q=function(e){this._feature=e,this.extent=t.EXTENT,this.type=e.type,this.properties=e.tags,"id"in e&&!isNaN(e.id)&&(this.id=p
vendor: 4,809 bytes, line 65
65arseInt(e.id,10))};q.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],r=0,n=this._feature.geometry;r<n.length;r+=1){var i=n[r];e.push([new t.Point(i[0],i[1])])}return e}for(var o=[],a=0,s=this._feature.geometry;a<s.length;a+=1){for(var l=[],u=0,c=s[a];u<c.length;u+=1){var p=c[u];l.push(new t.Point(p[0],p[1]))}o.push(l)}return o},q.prototype.toGeoJSON=function(t,e,r){return j.call(this,t,e,r)};var H=function(e){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=t.EXTENT,this.length=e.length,this._features=e};H.prototype.feature=function(t){return new q(this._features[t])};var G=t.vectorTile.VectorTileFeature,W=Z;function Z(t,e){this.options=e||{},this.features=t,this.length=t.length}function X(t,e){this.id="number"==typeof t.id?t.id:void 0,this.type=t.type,this.rawGeometry=1===t.type?[t.geometry]:t.geometry,this.properties=t.tags,this.extent=e||4096}Z.prototype.feature=function(t){return new X(this.features[t],this.options.extent)},X.prototype.loadGeometry=function(){var e=this.rawGeometry;this.geometry=[];for(var r=0;r<e.length;r++){for(var n=e[r],i=[],o=0;o<n.length;o++)i.push(new t.Point$1(n[o][0],n[o][1]));this.geometry.push(i)}return this.geometry},X.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var t=this.geometry,e=1/0,r=-1/0,n=1/0,i=-1/0,o=0;o<t.length;o++)for(var a=t[o],s=0;s<a.length;s++){var l=a[s];e=Math.min(e,l.x),r=Math.max(r,l.x),n=Math.min(n,l.y),i=Math.max(i,l.y)}return[e,n,r,i]},X.prototype.toGeoJSON=G.prototype.toGeoJSON;var Y=Q,K=Q,J=W;function Q(e){var r=new t.pbf;return function(t,e){for(var r in t.layers)e.writeMessage(3,$,t.layers[r])}(e,r),r.finish()}function $(t,e){var r;e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||""),e.writeVarintField(5,t.extent||4096);var n={keys:[],values:[],keycache:{},valuecache:{}};for(r=0;r<t.length;r++)n.feature=t.feature(r),e.writeMessage(2,tt,n);var i=n.keys;for(r=0;r<i.length;r++)e.writeStringField(3,i[r]);var o=n.values;for(r=0;r<o.length;r++)e.writeMessage(4,ot,o[r])}function tt(t,e){var r=t.feature;void 0!==r.id&&e.writeVarintField(1,r.id),e.writeMessage(2,et,t),e.writeVarintField(3,r.type),e.writeMessage(4,it,r)}function et(t,e){var r=t.feature,n=t.keys,i=t.values,o=t.keycache,a=t.valuecache;for(var s in r.properties){var l=o[s];void 0===l&&(n.push(s),l=n.length-1,o[s]=l),e.writeVarint(l);var u=r.properties[s],c=typeof u;"string"!==c&&"boolean"!==c&&"number"!==c&&(u=JSON.stringify(u));var p=c+":"+u,h=a[p];void 0===h&&(i.push(u),h=i.length-1,a[p]=h),e.writeVarint(h)}}function rt(t,e){return(e<<3)+(7&t)}function nt(t){return t<<1^t>>31}function it(t,e){for(var r=t.loadGeometry(),n=t.type,i=0,o=0,a=r.length,s=0;s<a;s++){var l=r[s],u=1;1===n&&(u=l.length),e.writeVarint(rt(1,u));for(var c=3===n?l.length-1:l.length,p=0;p<c;p++){1===p&&1!==n&&e.writeVarint(rt(2,c-1));var h=l[p].x-i,f=l[p].y-o;e.writeVarint(nt(h)),e.writeVarint(nt(f)),i+=h,o+=f}3===n&&e.writeVarint(rt(7,1))}}function ot(t,e){var r=typeof t;"string"===r?e.writeStringField(1,t):"boolean"===r?e.writeBooleanField(7,t):"number"===r&&(t%1!=0?e.writeDoubleField(3,t):t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t))}function at(t,e,r,n){st(t,r,n),st(e,2*r,2*n),st(e,2*r+1,2*n+1)}function st(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function lt(t,e,r,n){var i=t-r,o=e-n;return i*i+o*o}Y.fromVectorTileJs=K,Y.fromGeojsonVt=function(t,e){e=e||{};var r={};for(var n in t)r[n]=new W(t[n].features,e),r[n].name=n,r[n].version=e.version,r[n].extent=e.extent;return Q({layers:r})},Y.GeoJSONWrapper=J;var ut=function(t){return t[0]},ct=function(t){return t[1]},pt=function(t,e,r,n,i){void 0===e&&(e=ut),void 0===r&&(r=ct),void 0===n&&(n=64),void 0===i&&(i=Float64Array),this.nodeSize=n,this.points=t;for(var o=t.length<65536?Uint16Array:Uint32Array,a=this.ids=new o(t.length),s=this.coords=new i(2*t.length),l=0;l<t.length;l++)a[l]=l,s[2*l]=e(t[l]),s[2*l+1]=r(t[l]);!function t(e,r,n,i,o,a){if(!(o-i<=n)){var s=i+o>>1;!function t(e,r,n,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,l=n-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),p=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);t(e,r,n,Math.max(i,Math.floor(n-l*c/s+p)),Math.min(o,Math.floor(n+(s-l)*c/s+p)),a)}var h=r[2*n+a],f=i,d=o;for(at(e,r,i,n),r[2*o+a]>h&&at(e,r,i,o);f<d;){for(at(e,r,f,d),f++,d--;r[2*f+a]<h;)f++;for(;r[2*d+a]>h;)d--}r[2*i+a]===h?at(e,r,i,d):at(e,r,++d,o),d<=n&&(i=d+1),n<=d&&(o=d-1)}}(e,r,s,i,o,a%2),t(e,r,n,i,s-1,a+1),t(e,r,n,s+1,o,a+1)}}(a,s,n,0,a.length-1,0)};pt.prototype.range=function(t,e,r,n){return function(t,e,r,n,i,o,a){for(var s,l,u=[0,t.length-1,0],c=[];u.length;){var p=u.pop(),h=u.pop(),f=u.pop();if(h-f<=a)for(var d=f;d<=h;d++)s=e[2*d],l=e[2*d+1],s>=r&&s<=i&&l>=n&&l<=o&&c.push(t[d]);else{var m=Math.floor((f+h)/2);s=e[2*m],l=e[2*m+1],s>=r&&s<=i&&l>=n&&l<=o&&c.push(t[m]);var g=(p+1)%2;
vendor: 4,074 bytes, line 65
65(0===p?r<=s:n<=l)&&(u.push(f),u.push(m-1),u.push(g)),(0===p?i>=s:o>=l)&&(u.push(m+1),u.push(h),u.push(g))}}return c}(this.ids,this.coords,t,e,r,n,this.nodeSize)},pt.prototype.within=function(t,e,r){return function(t,e,r,n,i,o){for(var a=[0,t.length-1,0],s=[],l=i*i;a.length;){var u=a.pop(),c=a.pop(),p=a.pop();if(c-p<=o)for(var h=p;h<=c;h++)lt(e[2*h],e[2*h+1],r,n)<=l&&s.push(t[h]);else{var f=Math.floor((p+c)/2),d=e[2*f],m=e[2*f+1];lt(d,m,r,n)<=l&&s.push(t[f]);var g=(u+1)%2;(0===u?r-i<=d:n-i<=m)&&(a.push(p),a.push(f-1),a.push(g)),(0===u?r+i>=d:n+i>=m)&&(a.push(f+1),a.push(c),a.push(g))}}return s}(this.ids,this.coords,t,e,r,this.nodeSize)};var ht={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,map:function(t){return t}},ft=function(t){this.options=xt(Object.create(ht),t),this.trees=new Array(this.options.maxZoom+1)};function dt(t,e,r,n,i){return{x:t,y:e,zoom:1/0,id:r,parentId:-1,numPoints:n,properties:i}}function mt(t,e){var r=t.geometry.coordinates,n=r[0],i=r[1];return{x:vt(n),y:_t(i),zoom:1/0,index:e,parentId:-1}}function gt(t){return{type:"Feature",id:t.id,properties:yt(t),geometry:{type:"Point",coordinates:[(n=t.x,360*(n-.5)),(e=t.y,r=(180-360*e)*Math.PI/180,360*Math.atan(Math.exp(r))/Math.PI-90)]}};var e,r,n}function yt(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return xt(xt({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function vt(t){return t/360+.5}function _t(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function xt(t,e){for(var r in e)t[r]=e[r];return t}function bt(t){return t.x}function wt(t){return t.y}function Et(t,e,r,n,i,o){var a=i-r,s=o-n;if(0!==a||0!==s){var l=((t-r)*a+(e-n)*s)/(a*a+s*s);l>1?(r=i,n=o):l>0&&(r+=a*l,n+=s*l)}return(a=t-r)*a+(s=e-n)*s}function Tt(t,e,r,n){var i={id:void 0===t?null:t,type:e,geometry:r,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(t){var e=t.geometry,r=t.type;if("Point"===r||"MultiPoint"===r||"LineString"===r)St(t,e);else if("Polygon"===r||"MultiLineString"===r)for(var n=0;n<e.length;n++)St(t,e[n]);else if("MultiPolygon"===r)for(n=0;n<e.length;n++)for(var i=0;i<e[n].length;i++)St(t,e[n][i])}(i),i}function St(t,e){for(var r=0;r<e.length;r+=3)t.minX=Math.min(t.minX,e[r]),t.minY=Math.min(t.minY,e[r+1]),t.maxX=Math.max(t.maxX,e[r]),t.maxY=Math.max(t.maxY,e[r+1])}function Ct(t,e,r,n){if(e.geometry){var i=e.geometry.coordinates,o=e.geometry.type,a=Math.pow(r.tolerance/((1<<r.maxZoom)*r.extent),2),s=[],l=e.id;if(r.promoteId?l=e.properties[r.promoteId]:r.generateId&&(l=n||0),"Point"===o)At(i,s);else if("MultiPoint"===o)for(var u=0;u<i.length;u++)At(i[u],s);else if("LineString"===o)It(i,s,a,!1);else if("MultiLineString"===o){if(r.lineMetrics){for(u=0;u<i.length;u++)s=[],It(i[u],s,a,!1),t.push(Tt(l,"LineString",s,e.properties));return}Dt(i,s,a,!1)}else if("Polygon"===o)Dt(i,s,a,!0);else{if("MultiPolygon"!==o){if("GeometryCollection"===o){for(u=0;u<e.geometry.geometries.length;u++)Ct(t,{id:l,geometry:e.geometry.geometries[u],properties:e.properties},r,n);return}throw new Error("Input data is not a valid GeoJSON object.")}for(u=0;u<i.length;u++){var c=[];Dt(i[u],c,a,!0),s.push(c)}}t.push(Tt(l,o,s,e.properties))}}function At(t,e){e.push(kt(t[0])),e.push(Mt(t[1])),e.push(0)}function It(t,e,r,n){for(var i,o,a=0,s=0;s<t.length;s++){var l=kt(t[s][0]),u=Mt(t[s][1]);e.push(l),e.push(u),e.push(0),s>0&&(a+=n?(i*u-l*o)/2:Math.sqrt(Math.pow(l-i,2)+Math.pow(u-o,2))),i=l,o=u}var c=e.length-3;e[2]=1,function t(e,r,n,i){for(var o,a=i,s=n-r>>1,l=n-r,u=e[r],c=e[r+1],p=e[n],h=e[n+1],f=r+3;f<n;f+=3){var d=Et(e[f],e[f+1],u,c,p,h);if(d>a)o=f,a=d;else if(d===a){var m=Math.abs(f-s);m<l&&(o=f,l=m)}}a>i&&(o-r>3&&t(e,r,o,i),e[o+2]=a,n-o>3&&t(e,o,n,i))}(e,0,c,r),e[c+2]=1,e.size=Math.abs(a),e.start=0,e.end=e.size}function Dt(t,e,r,n){for(var i=0;i<t.length;i++){var o=[];It(t[i],o,r,n),e.push(o)}}function kt(t){return t/360+.5}function Mt(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}
vendor: 4,582 bytes, line 65
65function Pt(t,e,r,n,i,o,a,s){if(n/=e,o>=(r/=e)&&a<n)return t;if(a<r||o>=n)return null;for(var l=[],u=0;u<t.length;u++){var c=t[u],p=c.geometry,h=c.type,f=0===i?c.minX:c.minY,d=0===i?c.maxX:c.maxY;if(f>=r&&d<n)l.push(c);else if(!(d<r||f>=n)){var m=[];if("Point"===h||"MultiPoint"===h)zt(p,m,r,n,i);else if("LineString"===h)Lt(p,m,r,n,i,!1,s.lineMetrics);else if("MultiLineString"===h)Rt(p,m,r,n,i,!1);else if("Polygon"===h)Rt(p,m,r,n,i,!0);else if("MultiPolygon"===h)for(var g=0;g<p.length;g++){var y=[];Rt(p[g],y,r,n,i,!0),y.length&&m.push(y)}if(m.length){if(s.lineMetrics&&"LineString"===h){for(g=0;g<m.length;g++)l.push(Tt(c.id,h,m[g],c.tags));continue}"LineString"!==h&&"MultiLineString"!==h||(1===m.length?(h="LineString",m=m[0]):h="MultiLineString"),"Point"!==h&&"MultiPoint"!==h||(h=3===m.length?"Point":"MultiPoint"),l.push(Tt(c.id,h,m,c.tags))}}}return l.length?l:null}function zt(t,e,r,n,i){for(var o=0;o<t.length;o+=3){var a=t[o+i];a>=r&&a<=n&&(e.push(t[o]),e.push(t[o+1]),e.push(t[o+2]))}}function Lt(t,e,r,n,i,o,a){for(var s,l,u=Ot(t),c=0===i?Ft:Nt,p=t.start,h=0;h<t.length-3;h+=3){var f=t[h],d=t[h+1],m=t[h+2],g=t[h+3],y=t[h+4],v=0===i?f:d,_=0===i?g:y,x=!1;a&&(s=Math.sqrt(Math.pow(f-g,2)+Math.pow(d-y,2))),v<r?_>r&&(l=c(u,f,d,g,y,r),a&&(u.start=p+s*l)):v>n?_<n&&(l=c(u,f,d,g,y,n),a&&(u.start=p+s*l)):Bt(u,f,d,m),_<r&&v>=r&&(l=c(u,f,d,g,y,r),x=!0),_>n&&v<=n&&(l=c(u,f,d,g,y,n),x=!0),!o&&x&&(a&&(u.end=p+s*l),e.push(u),u=Ot(t)),a&&(p+=s)}var b=t.length-3;f=t[b],d=t[b+1],m=t[b+2],(v=0===i?f:d)>=r&&v<=n&&Bt(u,f,d,m),b=u.length-3,o&&b>=3&&(u[b]!==u[0]||u[b+1]!==u[1])&&Bt(u,u[0],u[1],u[2]),u.length&&e.push(u)}function Ot(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function Rt(t,e,r,n,i,o){for(var a=0;a<t.length;a++)Lt(t[a],e,r,n,i,o,!1)}function Bt(t,e,r,n){t.push(e),t.push(r),t.push(n)}function Ft(t,e,r,n,i,o){var a=(o-e)/(n-e);return t.push(o),t.push(r+(i-r)*a),t.push(1),a}function Nt(t,e,r,n,i,o){var a=(o-r)/(i-r);return t.push(e+(n-e)*a),t.push(o),t.push(1),a}function Ut(t,e){for(var r=[],n=0;n<t.length;n++){var i,o=t[n],a=o.type;if("Point"===a||"MultiPoint"===a||"LineString"===a)i=Vt(o.geometry,e);else if("MultiLineString"===a||"Polygon"===a){i=[];for(var s=0;s<o.geometry.length;s++)i.push(Vt(o.geometry[s],e))}else if("MultiPolygon"===a)for(i=[],s=0;s<o.geometry.length;s++){for(var l=[],u=0;u<o.geometry[s].length;u++)l.push(Vt(o.geometry[s][u],e));i.push(l)}r.push(Tt(o.id,a,i,o.tags))}return r}function Vt(t,e){var r=[];r.size=t.size,void 0!==t.start&&(r.start=t.start,r.end=t.end);for(var n=0;n<t.length;n+=3)r.push(t[n]+e,t[n+1],t[n+2]);return r}function jt(t,e){if(t.transformed)return t;var r,n,i,o=1<<t.z,a=t.x,s=t.y;for(r=0;r<t.features.length;r++){var l=t.features[r],u=l.geometry,c=l.type;if(l.geometry=[],1===c)for(n=0;n<u.length;n+=2)l.geometry.push(qt(u[n],u[n+1],e,o,a,s));else for(n=0;n<u.length;n++){var p=[];for(i=0;i<u[n].length;i+=2)p.push(qt(u[n][i],u[n][i+1],e,o,a,s));l.geometry.push(p)}}return t.transformed=!0,t}function qt(t,e,r,n,i,o){return[Math.round(r*(t*n-i)),Math.round(r*(e*n-o))]}function Ht(t,e,r,n,i){for(var o=e===i.maxZoom?0:i.tolerance/((1<<e)*i.extent),a={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:n,z:e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},s=0;s<t.length;s++){a.numFeatures++,Gt(a,t[s],o,i);var l=t[s].minX,u=t[s].minY,c=t[s].maxX,p=t[s].maxY;l<a.minX&&(a.minX=l),u<a.minY&&(a.minY=u),c>a.maxX&&(a.maxX=c),p>a.maxY&&(a.maxY=p)}return a}function Gt(t,e,r,n){var i=e.geometry,o=e.type,a=[];if("Point"===o||"MultiPoint"===o)for(var s=0;s<i.length;s+=3)a.push(i[s]),a.push(i[s+1]),t.numPoints++,t.numSimplified++;else if("LineString"===o)Wt(a,i,t,r,!1,!1);else if("MultiLineString"===o||"Polygon"===o)for(s=0;s<i.length;s++)Wt(a,i[s],t,r,"Polygon"===o,0===s);else if("MultiPolygon"===o)for(var l=0;l<i.length;l++){var u=i[l];for(s=0;s<u.length;s++)Wt(a,u[s],t,r,!0,0===s)}if(a.length){var c=e.tags||null;if("LineString"===o&&n.lineMetrics){for(var p in c={},e.tags)c[p]=e.tags[p];c.mapbox_clip_start=i.start/i.size,c.mapbox_clip_end=i.end/i.size}var h={geometry:a,type:"Polygon"===o||"MultiPolygon"===o?3:"LineString"===o||"MultiLineString"===o?2:1,tags:c};null!==e.id&&(h.id=e.id),t.features.push(h)}}function Wt(t,e,r,n,i,o){var a=n*n;if(n>0&&e.size<(i?a:n))r.numPoints+=e.length/3;else{for(var s=[],l=0;l<e.length;l+=3)(0===n||e[l+2]>a)&&(r.numSimplified++,s.push(e[l]),s.push(e[l+1])),r.numPoints++;i&&function(t,e){for(var r=0,n=0,i=t.length,o=i-2;n<i;o=n,n+=2)r+=(t[n]-t[o])*(t[n+1]+t[o+1]);if(r>0===e)for(n=0,i=t.length;n<i/2;n+=2){var a=t[n],s=t[n+1];
vendor: 10,743 bytes, line 65
65t[n]=t[i-2-n],t[n+1]=t[i-1-n],t[i-2-n]=a,t[i-1-n]=s}}(s,o),t.push(s)}}function Zt(t,e){var r=(e=this.options=function(t,e){for(var r in e)t[r]=e[r];return t}(Object.create(this.options),e)).debug;if(e.maxZoom<0||e.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw new Error("promoteId and generateId cannot be used together.");var n=function(t,e){var r=[];if("FeatureCollection"===t.type)for(var n=0;n<t.features.length;n++)Ct(r,t.features[n],e,n);else"Feature"===t.type?Ct(r,t,e):Ct(r,{geometry:t},e);return r}(t,e);this.tiles={},this.tileCoords=[],r&&(this.stats={},this.total=0),(n=function(t,e){var r=e.buffer/e.extent,n=t,i=Pt(t,1,-1-r,r,0,-1,2,e),o=Pt(t,1,1-r,2+r,0,-1,2,e);return(i||o)&&(n=Pt(t,1,-r,1+r,0,-1,2,e)||[],i&&(n=Ut(i,1).concat(n)),o&&(n=n.concat(Ut(o,-1)))),n}(n,e)).length&&this.splitTile(n,0,0,0),r&&n.length}function Xt(t,e,r){return 32*((1<<t)*r+e)+t}function Yt(t,e){var r=t.tileID.canonical;if(!this._geoJSONIndex)return e(null,null);var n=this._geoJSONIndex.getTile(r.z,r.x,r.y);if(!n)return e(null,null);var i=new H(n.features),o=Y(i);0===o.byteOffset&&o.byteLength===o.buffer.byteLength||(o=new Uint8Array(o)),e(null,{vectorTile:i,rawData:o.buffer})}ft.prototype.load=function(t){var e=this.options,r=(e.log,e.minZoom),n=e.maxZoom,i=e.nodeSize;t.length;this.points=t;for(var o=[],a=0;a<t.length;a++)t[a].geometry&&o.push(mt(t[a],a));this.trees[n+1]=new pt(o,bt,wt,i,Float32Array);for(var s=n;s>=r;s--){Date.now();o=this._cluster(o,s),this.trees[s]=new pt(o,bt,wt,i,Float32Array)}return this},ft.prototype.getClusters=function(t,e){var r=((t[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,t[1])),i=180===t[2]?180:((t[2]+180)%360+360)%360-180,o=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,i=180;else if(r>i){var a=this.getClusters([r,n,180,o],e),s=this.getClusters([-180,n,i,o],e);return a.concat(s)}for(var l=this.trees[this._limitZoom(e)],u=[],c=0,p=l.range(vt(r),_t(o),vt(i),_t(n));c<p.length;c+=1){var h=p[c],f=l.points[h];u.push(f.numPoints?gt(f):this.points[f.index])}return u},ft.prototype.getChildren=function(t){var e=t>>5,r=t%32,n="No cluster with the specified id.",i=this.trees[r];if(!i)throw new Error(n);var o=i.points[e];if(!o)throw new Error(n);for(var a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),s=[],l=0,u=i.within(o.x,o.y,a);l<u.length;l+=1){var c=u[l],p=i.points[c];p.parentId===t&&s.push(p.numPoints?gt(p):this.points[p.index])}if(0===s.length)throw new Error(n);return s},ft.prototype.getLeaves=function(t,e,r){e=e||10,r=r||0;var n=[];return this._appendLeaves(n,t,e,r,0),n},ft.prototype.getTile=function(t,e,r){var n=this.trees[this._limitZoom(t)],i=Math.pow(2,t),o=this.options,a=o.extent,s=o.radius/a,l=(r-s)/i,u=(r+1+s)/i,c={features:[]};return this._addTileFeatures(n.range((e-s)/i,l,(e+1+s)/i,u),n.points,e,r,i,c),0===e&&this._addTileFeatures(n.range(1-s/i,l,1,u),n.points,i,r,i,c),e===i-1&&this._addTileFeatures(n.range(0,l,s/i,u),n.points,-1,r,i,c),c.features.length?c:null},ft.prototype.getClusterExpansionZoom=function(t){for(var e=t%32-1;e<=this.options.maxZoom;){var r=this.getChildren(t);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e},ft.prototype._appendLeaves=function(t,e,r,n,i){for(var o=0,a=this.getChildren(e);o<a.length;o+=1){var s=a[o],l=s.properties;if(l&&l.cluster?i+l.point_count<=n?i+=l.point_count:i=this._appendLeaves(t,l.cluster_id,r,n,i):i<n?i++:t.push(s),t.length===r)break}return i},ft.prototype._addTileFeatures=function(t,e,r,n,i,o){for(var a=0,s=t;a<s.length;a+=1){var l=e[s[a]],u={type:1,geometry:[[Math.round(this.options.extent*(l.x*i-r)),Math.round(this.options.extent*(l.y*i-n))]],tags:l.numPoints?yt(l):this.points[l.index].properties},c=l.numPoints?l.id:this.points[l.index].id;void 0!==c&&(u.id=c),o.features.push(u)}},ft.prototype._limitZoom=function(t){return Math.max(this.options.minZoom,Math.min(t,this.options.maxZoom+1))},ft.prototype._cluster=function(t,e){for(var r=[],n=this.options,i=n.radius,o=n.extent,a=n.reduce,s=i/(o*Math.pow(2,e)),l=0;l<t.length;l++){var u=t[l];if(!(u.zoom<=e)){u.zoom=e;for(var c=this.trees[e+1],p=c.within(u.x,u.y,s),h=u.numPoints||1,f=u.x*h,d=u.y*h,m=a?this._map(u,!0):null,g=(l<<5)+(e+1),y=0,v=p;y<v.length;y+=1){var _=v[y],x=c.points[_];if(!(x.zoom<=e)){x.zoom=e;var b=x.numPoints||1;f+=x.x*b,d+=x.y*b,h+=b,x.parentId=g,a&&a(m,this._map(x))}}1===h?r.push(u):(u.parentId=g,r.push(dt(f/h,d/h,g,h,m)))}}return r},ft.prototype._map=function(t,e){if(t.numPoints)return e?xt({},t.properties):t.properties;var r=this.points[t.index].properties,n=this.options.map(r);return e&&n===r?xt({},n):n},Zt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Zt.prototype.splitTile=function(t,e,r,n,i,o,a){for(var s=[t,e,r,n],l=this.options,u=l.debug;s.length;){n=s.pop(),r=s.pop(),e=s.pop(),t=s.pop();var c=1<<e,p=Xt(e,r,n),h=this.tiles[p];if(!h&&(h=this.tiles[p]=Ht(t,e,r,n,l),this.tileCoords.push({z:e,x:r,y:n}),u)){var f="z"+e;this.stats[f]=(this.stats[f]||0)+1,this.total++}if(h.source=t,i){if(e===l.maxZoom||e===i)continue;var d=1<<i-e;if(r!==Math.floor(o/d)||n!==Math.floor(a/d))continue}else if(e===l.indexMaxZoom||h.numPoints<=l.indexMaxPoints)continue;if(h.source=null,0!==t.length){var m,g,y,v,_,x,b=.5*l.buffer/l.extent,w=.5-b,E=.5+b,T=1+b;m=g=y=v=null,_=Pt(t,c,r-b,r+E,0,h.minX,h.maxX,l),x=Pt(t,c,r+w,r+T,0,h.minX,h.maxX,l),t=null,_&&(m=Pt(_,c,n-b,n+E,1,h.minY,h.maxY,l),g=Pt(_,c,n+w,n+T,1,h.minY,h.maxY,l),_=null),x&&(y=Pt(x,c,n-b,n+E,1,h.minY,h.maxY,l),v=Pt(x,c,n+w,n+T,1,h.minY,h.maxY,l),x=null),s.push(m||[],e+1,2*r,2*n),s.push(g||[],e+1,2*r,2*n+1),s.push(y||[],e+1,2*r+1,2*n),s.push(v||[],e+1,2*r+1,2*n+1)}}},Zt.prototype.getTile=function(t,e,r){var n=this.options,i=n.extent;n.debug;if(t<0||t>24)return null;var o=1<<t,a=Xt(t,e=(e%o+o)%o,r);if(this.tiles[a])return jt(this.tiles[a],i);for(var s,l=t,u=e,c=r;!s&&l>0;)l--,u=Math.floor(u/2),c=Math.floor(c/2),s=this.tiles[Xt(l,u,c)];return s&&s.source?(this.splitTile(s.source,l,u,c,t,e,r),this.tiles[a]?jt(this.tiles[a],i):null):null};var Kt=function(e){function r(t,r,n){e.call(this,t,r,Yt),n&&(this.loadGeoJSON=n)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.loadData=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=e,this._pendingLoadDataParams=t,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},r.prototype._loadData=function(){var e=this;if(this._pendingCallback&&this._pendingLoadDataParams){var r=this._pendingCallback,n=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var i=!!(n&&n.request&&n.request.collectResourceTiming)&&new D.Performance(n.request);this.loadGeoJSON(n,function(o,a){if(o||!a)return r(o);if("object"!=typeof a)return r(new Error("Input data is not a valid GeoJSON object."));!function t(e,r){switch(e&&e.type||null){case"FeatureCollection":return e.features=e.features.map(N(t,r)),e;case"GeometryCollection":return e.geometries=e.geometries.map(N(t,r)),e;case"Feature":return e.geometry=t(e.geometry,r),e;case"Polygon":case"MultiPolygon":return function(t,e){return"Polygon"===t.type?t.coordinates=U(t.coordinates,e):"MultiPolygon"===t.type&&(t.coordinates=t.coordinates.map(N(U,e))),t}(e,r);default:return e}}(a,!0);try{e._geoJSONIndex=n.cluster?new ft(function(e){var r=e.superclusterOptions,n=e.clusterProperties;if(!n||!r)return r;for(var i={},o={},a={accumulated:null,zoom:0},s={properties:null},l=Object.keys(n),u=0,c=l;u<c.length;u+=1){var p=c[u],h=n[p],f=h[0],d=h[1],m=t.createExpression(d),g=t.createExpression("string"==typeof f?[f,["accumulated"],["get",p]]:f);i[p]=m.value,o[p]=g.value}return r.map=function(t){s.properties=t;for(var e={},r=0,n=l;r<n.length;r+=1){var o=n[r];e[o]=i[o].evaluate(a,s)}return e},r.reduce=function(t,e){s.properties=e;for(var r=0,n=l;r<n.length;r+=1){var i=n[r];a.accumulated=t[i],t[i]=o[i].evaluate(a,s)}},r}(n)).load(a.features):new Zt(a,n.geojsonVtOptions)}catch(o){return r(o)}e.loaded={};var s={};if(i){var l=i.finish();l&&(s.resourceTiming={},s.resourceTiming[n.source]=JSON.parse(JSON.stringify(l)))}r(null,s)})}},r.prototype.coalesce=function(){"Coalescing"===this._state?this._state="Idle":"NeedsLoadData"===this._state&&(this._state="Coalescing",this._loadData())},r.prototype.reloadTile=function(t,r){var n=this.loaded,i=t.uid;return n&&n[i]?e.prototype.reloadTile.call(this,t,r):this.loadTile(t,r)},r.prototype.loadGeoJSON=function(e,r){if(e.request)t.getJSON(e.request,r);else{if("string"!=typeof e.data)return r(new Error("Input data is not a valid GeoJSON object."));try{return r(null,JSON.parse(e.data))}catch(t){return r(new Error("Input data is not a valid GeoJSON object."))}}},r.prototype.removeSource=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),e()},r.prototype.getClusterExpansionZoom=function(t,e){e(null,this._geoJSONIndex.getClusterExpansionZoom(t.clusterId))},r.prototype.getClusterChildren=function(t,e){e(null,this._geoJSONIndex.getChildren(t.clusterId))},r.prototype.getClusterLeaves=function(t,e){e(null,this._geoJSONIndex.getLeaves(t.clusterId,t.limit,t.offset))},r}(P),Jt=function(e){var r=this;this.self=e,this.actor=new t.Actor(e,this),this.layerIndexes={},this.workerSourceTypes={vector:P,geojson:Kt},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(t,e){if(r.workerSourceTypes[t])throw new Error('Worker source with name "'+t+'" already registered.');r.workerSourceTypes[t]=e},this.self.registerRTLTextPlugin=function(e){if(t.plugin.isLoaded())throw new Error("RTL text plugin already registered.");t.plugin.applyArabicShaping=e.applyArabicShaping,t.plugin.processBidirectionalText=e.processBidirectionalText,t.plugin.processStyledBidirectionalText=e.processStyledBidirectionalText}};return Jt.prototype.setReferrer=function(t,e){this.referrer=e},Jt.prototype.setLayers=function(t,e,r){this.getLayerIndex(t).replace(e),r()},Jt.prototype.updateLayers=function(t,e,r){this.getLayerIndex(t).update(e.layers,e.removedIds),r()},Jt.prototype.loadTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).loadTile(e,r)},Jt.prototype.loadDEMTile=function(t,e,r){this.getDEMWorkerSource(t,e.source).loadTile(e,r)},Jt.prototype.reloadTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).reloadTile(e,r)},Jt.prototype.abortTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).abortTile(e,r)},Jt.prototype.removeTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).removeTile(e,r)},Jt.prototype.removeDEMTile=function(t,e){this.getDEMWorkerSource(t,e.
vendor: 8,454 bytes, line 65
65source).removeTile(e)},Jt.prototype.removeSource=function(t,e,r){if(this.workerSources[t]&&this.workerSources[t][e.type]&&this.workerSources[t][e.type][e.source]){var n=this.workerSources[t][e.type][e.source];delete this.workerSources[t][e.type][e.source],void 0!==n.removeSource?n.removeSource(e,r):r()}},Jt.prototype.loadWorkerSource=function(t,e,r){try{this.self.importScripts(e.url),r()}catch(t){r(t.toString())}},Jt.prototype.loadRTLTextPlugin=function(e,r,n){try{t.plugin.isLoaded()||(this.self.importScripts(r),n(t.plugin.isLoaded()?null:new Error("RTL Text Plugin failed to import scripts from "+r)))}catch(t){n(t.toString())}},Jt.prototype.getLayerIndex=function(t){var e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new n),e},Jt.prototype.getWorkerSource=function(t,e,r){var n=this;if(this.workerSources[t]||(this.workerSources[t]={}),this.workerSources[t][e]||(this.workerSources[t][e]={}),!this.workerSources[t][e][r]){var i={send:function(e,r,i){n.actor.send(e,r,i,t)}};this.workerSources[t][e][r]=new this.workerSourceTypes[e](i,this.getLayerIndex(t))}return this.workerSources[t][e][r]},Jt.prototype.getDEMWorkerSource=function(t,e){return this.demWorkerSources[t]||(this.demWorkerSources[t]={}),this.demWorkerSources[t][e]||(this.demWorkerSources[t][e]=new z),this.demWorkerSources[t][e]},"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope&&(self.worker=new Jt(self)),Jt}),n(0,function(t){var e=t.createCommonjsModule(function(t){function e(t){return!!("undefined"!=typeof window&&"undefined"!=typeof document&&Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray&&Function.prototype&&Function.prototype.bind&&Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions&&"JSON"in window&&"parse"in JSON&&"stringify"in JSON&&function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var t,e,r=new Blob([""],{type:"text/javascript"}),n=URL.createObjectURL(r);try{e=new Worker(n),t=!0}catch(e){t=!1}return e&&e.terminate(),URL.revokeObjectURL(n),t}()&&"Uint8ClampedArray"in window&&ArrayBuffer.isView&&function(t){return void 0===r[t]&&(r[t]=function(t){var r=document.createElement("canvas"),n=Object.create(e.webGLContextAttributes);return n.failIfMajorPerformanceCaveat=t,r.probablySupportsContext?r.probablySupportsContext("webgl",n)||r.probablySupportsContext("experimental-webgl",n):r.supportsContext?r.supportsContext("webgl",n)||r.supportsContext("experimental-webgl",n):r.getContext("webgl",n)||r.getContext("experimental-webgl",n)}(t)),r[t]}(t&&t.failIfMajorPerformanceCaveat))}t.exports?t.exports=e:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=e);var r={};e.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}),r={create:function(e,r,n){var i=t.window.document.createElement(e);return r&&(i.className=r),n&&n.appendChild(i),i},createNS:function(e,r){return t.window.document.createElementNS(e,r)}},n=t.window.document?t.window.document.documentElement.style:null;function i(t){if(!n)return null;for(var e=0;e<t.length;e++)if(t[e]in n)return t[e];return t[0]}var o,a=i(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);r.disableDrag=function(){n&&a&&(o=n[a],n[a]="none")},r.enableDrag=function(){n&&a&&(n[a]=o)};var s=i(["transform","WebkitTransform"]);r.setTransform=function(t,e){t.style[s]=e};var l=!1;try{var u=Object.defineProperty({},"passive",{get:function(){l=!0}});t.window.addEventListener("test",u,u),t.window.removeEventListener("test",u,u)}catch(t){l=!1}r.addEventListener=function(t,e,r,n){void 0===n&&(n={}),"passive"in n&&l?t.addEventListener(e,r,n):t.addEventListener(e,r,n.capture)},r.removeEventListener=function(t,e,r,n){void 0===n&&(n={}),"passive"in n&&l?t.removeEventListener(e,r,n):t.removeEventListener(e,r,n.capture)};var c=function(e){e.preventDefault(),e.stopPropagation(),t.window.removeEventListener("click",c,!0)};r.suppressClick=function(){t.window.addEventListener("click",c,!0),t.window.setTimeout(function(){t.window.removeEventListener("click",c,!0)},0)},r.mousePos=function(e,r){var n=e.getBoundingClientRect();return r=r.touches?r.touches[0]:r,new t.Point(r.clientX-n.left-e.clientLeft,r.clientY-n.top-e.clientTop)},r.touchPos=function(e,r){for(var n=e.getBoundingClientRect(),i=[],o="touchend"===r.type?r.changedTouches:r.touches,a=0;a<o.length;a++)i.push(new t.Point(o[a].clientX-n.left-e.clientLeft,o[a].clientY-n.top-e.clientTop));return i},r.mouseButton=function(e){return void 0!==t.window.InstallTrigger&&2===e.button&&e.ctrlKey&&t.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:e.button},r.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var p=function(){this.images={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0};p.prototype.isLoaded=function(){return this.loaded},p.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t,t)){for(var e=0,r=this.requestors;e<r.length;e+=1){var n=r[e],i=n.ids,o=n.callback;this._notify(i,o)}this.requestors=[]}},p.prototype.getImage=function(t){return this.images[t]},p.prototype.addImage=function(t,e){this.images[t]=e},p.prototype.removeImage=function(t){delete this.images[t],delete this.patterns[t]},p.prototype.listImages=function(){return Object.keys(this.images)},p.prototype.getImages=function(t,e){var r=!0;if(!this.isLoaded())for(var n=0,i=t;n<i.length;n+=1){var o=i[n];this.images[o]||(r=!1)}this.isLoaded()||r?this._notify(t,e):this.requestors.push({ids:t,callback:e})},p.prototype._notify=function(t,e){for(var r={},n=0,i=t;n<i.length;n+=1){var o=i[n],a=this.images[o];a&&(r[o]={data:a.data.clone(),pixelRatio:a.pixelRatio,sdf:a.sdf})}e(null,r)},p.prototype.getPixelSize=function(){var t=this.atlasImage;return{width:t.width,height:t.height}},p.prototype.getPattern=function(e){var r=this.patterns[e];if(r)return r.position;var n=this.getImage(e);if(!n)return null;var i={w:n.data.width+2,h:n.data.height+2,x:0,y:0},o=new t.ImagePosition(i,n);return this.patterns[e]={bin:i,position:o},this._updatePatternAtlas(),o},p.prototype.bind=function(e){var r=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new t.Texture(e,this.atlasImage,r.RGBA),this.atlasTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)},p.prototype._updatePatternAtlas=function(){var e=[];for(var r in this.patterns)e.push(this.patterns[r].bin);var n=t.potpack(e),i=n.w,o=n.h,a=this.atlasImage;for(var s in a.resize({width:i||1,height:o||1}),this.patterns){var l=this.patterns[s].bin,u=l.x+1,c=l.y+1,p=this.images[s].data,h=p.width,f=p.height;t.RGBAImage.copy(p,a,{x:0,y:0},{x:u,y:c},{width:h,height:f}),t.RGBAImage.copy(p,a,{x:0,y:f-1},{x:u,y:c-1},{width:h,height:1}),t.RGBAImage.copy(p,a,{x:0,y:0},{x:u,y:c+f},{width:h,height:1}),t.RGBAImage.copy(p,a,{x:h-1,y:0},{x:u-1,y:c},{width:1,height:f}),t.RGBAImage.copy(p,a,{x:0,y:0},{x:u+h,y:c},{width:1,height:f})}this.dirty=!0};var h=d,f=1e20;function d(t,e,r,n,i,o){this.fontSize=t||24,this.buffer=void 0===e?3:e,this.cutoff=n||.25,this.fontFamily=i||"sans-serif",this.fontWeight=o||"normal",this.radius=r||8;var a=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=a,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(a*a),this.gridInner=new Float64Array(a*a),this.f=new Float64Array(a),this.d=new Float64Array(a),this.z=new Float64Array(a+1),this.v=new Int16Array(a),this.middle=Math.round(a/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function m(t,e,r,n,i,o,a){for(var s=0;s<e;s++){for(var l=0;l<r;l++)n[l]=t[l*e+s];for(g(n,i,o,a,r),l=0;l<r;l++)t[l*e+s]=i[l]}for(l=0;l<r;l++){for(s=0;s<e;s++)n[s]=t[l*e+s];for(g(n,i,o,a,e),s=0;s<e;s++)t[l*e+s]=Math.sqrt(i[s])}}function g(t,e,r,n,i){r[0]=0,n[0]=-f,n[1]=+f;for(var o=1,a=0;o<i;o++){for(var s=(t[o]+o*o-(t[r[a]]+r[a]*r[a]))/(2*o-2*r[a]);s<=n[a];
65)a--,s=(t[o]+o*o-(t[r[a]]+r[a]*r[a]))/(2*o-2*r[a]);r[++a]=o,n[a]=s,n[a+1]=+f}for(o=0,a=0;o<i;o++){for(;n[a+1]<o;)a++;e[o]=(o-r[a])*(o-r[a])+t[r[a]]}}d.prototype.draw=function(t){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(t,this.buffer,this.middle);for(var e=this.ctx.getImageData(0,0,this.size,this.size),r=new Uint8ClampedArray(this.size*this.size),n=0;n<this.size*this.size;n++){var i=e.data[4*n+3]/255;this.gridOuter[n]=1===i?0:0===i?f:Math.pow(Math.max(0,.5-i),2),this.gridInner[n]=1===i?f:0===i?0:Math.pow(Math.max(0,i-.5),2)}for(m(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),m(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),n=0;n<this.size*this.size;n++){var o=this.gridOuter[n]-this.gridInner[n];r[n]=Math.max(0,Math.min(255,Math.round(255-255*(o/this.radius+this.cutoff))))}return r};var y=function(t,e){this.requestTransform=t,this.localIdeographFontFamily=e,this.entries={}};y.prototype.setURL=function(t){this.url=t},y.prototype.getGlyphs=function(e,r){var n=this,i=[];for(var o in e)for(var a=0,s=e[o];a<s.length;a+=1){var l=s[a];i.push({stack:o,id:l})}t.asyncAll(i,function(t,e){var r=t.stack,i=t.id,o=n.entries[r];o||(o=n.entries[r]={glyphs:{},requests:{}});var a=o.glyphs[i];if(void 0===a)if(a=n._tinySDF(o,r,i))e(null,{stack:r,id:i,glyph:a});else{var s=Math.floor(i/256);if(256*s>65535)e(new Error("glyphs > 65535 not supported"));else{var l=o.requests[s];l||(l=o.requests[s]=[],y.loadGlyphRange(r,s,n.url,n.requestTransform,function(t,e){if(e)for(var r in e)o.glyphs[+r]=e[+r];for(var n=0,i=l;n<i.length;n+=1)(0,i[n])(t,e);delete o.requests[s]})),l.push(function(t,n){t?e(t):n&&e(null,{stack:r,id:i,glyph:n[i]||null})})}}else e(null,{stack:r,id:i,glyph:a})},function(t,e){if(t)r(t);else if(e){for(var n={},i=0,o=e;i<o.length;i+=1){var a=o[i],s=a.stack,l=a.id,u=a.glyph;(n[s]||(n[s]={}))[l]=u&&{id:u.id,bitmap:u.bitmap.clone(),metrics:u.metrics}}r(null,n)}})},y.prototype._tinySDF=function(e,r,n){var i=this.localIdeographFontFamily;if(i&&(t.isChar["CJK Unified Ideographs"](n)||t.isChar["Hangul Syllables"](n))){var o=e.tinySDF;if(!o){var a="400";/bold/i.test(r)?a="900":/medium/i.test(r)?a="500":/light/i.test(r)&&(a="200"),o=e.tinySDF=new y.TinySDF(24,3,8,.25,i,a)}return{id:n,bitmap:new t.AlphaImage({width:30,height:30},o.draw(String.fromCharCode(n))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},y.loadGlyphRange=function(e,r,n,i,o){var a=256*r,s=a+255,l=i(t.normalizeGlyphsURL(n).replace("{fontstack}",e).replace("{range}",a+"-"+s),t.ResourceType.Glyphs);t.getArrayBuffer(l,function(e,r){if(e)o(e);else if(r){for(var n={},i=0,a=t.parseGlyphPBF(r);i<a.length;i+=1){var s=a[i];n[s.id]=s}o(null,n)}})},y.TinySDF=h;var v=function(){this.specification=t.styleSpec.light.position};v.prototype.possiblyEvaluate=function(e,r){return t.sphericalToCartesian(e.expression.evaluate(r))},v.prototype.interpolate=function(e,r,n){return{x:t.number(e.x,r.x,n),y:t.number(e.y,r.y,n),z:t.number(e.z,r.z,n)}};var _=new t.Properties({anchor:new t.DataConstantProperty(t.styleSpec.light.anchor),position:new v,color:new t.DataConstantProperty(t.styleSpec.light.color),intensity:new t.DataConstantProperty(t.styleSpec.light.intensity)}),x=function(e){function r(r){e.call(this),this._transitionable=new t.Transitionable(_),this.setLight(r),this._transitioning=this._transitionable.untransitioned()}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getLight=function(){return this._transitionable.serialize()},r.prototype.setLight=function(e,r){if(void 0===r&&(r={}),!this._validate(t.validateLight,e,r))for(var n in e){var i=e[n];t.endsWith(n,"-transition")?this._transitionable.setTransition(n.slice(0,-"-transition".length),i):this._transitionable.setValue(n,i)}},r.prototype.updateTransitions=function(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)},r.prototype.hasTransition=function(){return this._transitioning.hasTransition()},r.prototype.recalculate=function(t){this.properties=this._transitioning.possiblyEvaluate(t)},r.prototype._validate=function(e,r,n){return(!n||!1!==n.validate)&&t.emitValidationErrors(this,e.call(t.validateStyle,t.extend({value:r,style:{glyphs:!0,sprite:!0},styleSpec:t.styleSpec})))},r}(t.Evented),b=function(t,e){this.width=t,this.height=e,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}};b.prototype.getDash=function(t,e){var r=t.join(",")+String(e);return this.positions[r]||(this.positions[r]=this.addDash(t,e)),this.positions[r]},b.prototype.addDash=function(e,r){var n=r?7:0,i=2*n+1;if(this.nextRow+i>this.height)return t.warnOnce("LineAtlas out of space"),null;for(var o=0,a=0;a<e.length;a++)o+=e[a];for(var s=this.width/o,l=s/2,u=e.length%2==1,c=-n;c<=n;c++)for(var p=this.nextRow+n+c,h=this.width*p,f=u?-e[e.length-1]:0,d=e[0],m=1,g=0;g<this.width;g++){for(;d<g/s;
65)f=d,d+=e[m],u&&m===e.length-1&&(d+=e[0]),m++;var y=Math.abs(g-f*s),v=Math.abs(g-d*s),_=Math.min(y,v),x=m%2==1,b=void 0;if(r){var w=n?c/n*(l+1):0;if(x){var E=l-Math.abs(w);b=Math.sqrt(_*_+E*E)}else b=l-Math.sqrt(_*_+w*w)}else b=(x?1:-1)*_;this.data[3+4*(h+g)]=Math.max(0,Math.min(255,b+128))}var T={y:(this.nextRow+n+.5)/this.height,height:2*n/this.height,width:o};return this.nextRow+=i,this.dirty=!0,T},b.prototype.bind=function(t){var e=t.gl;this.texture?(e.bindTexture(e.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.width,this.height,e.RGBA,e.UNSIGNED_BYTE,this.data))):(this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,this.width,this.height,0,e.RGBA,e.UNSIGNED_BYTE,this.data))};var w=function e(r,n){this.workerPool=r,this.actors=[],this.currentActor=0,this.id=t.uniqueId();for(var i=this.workerPool.acquire(this.id),o=0;o<i.length;o++){var a=i[o],s=new e.Actor(a,n,this.id);s.name="Worker "+o,this.actors.push(s)}};function E(e,r,n){var i=function(r,i){if(r)return n(r);if(i){var o=t.pick(i,["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds"]);i.vector_layers&&(o.vectorLayers=i.vector_layers,o.vectorLayerIds=o.vectorLayers.map(function(t){return t.id})),e.url&&(o.tiles=t.canonicalizeTileset(o,e.url)),n(null,o)}};return e.url?t.getJSON(r(t.normalizeSourceURL(e.url),t.ResourceType.Source),i):t.browser.frame(function(){return i(null,e)})}w.prototype.broadcast=function(e,r,n){n=n||function(){},t.asyncAll(this.actors,function(t,n){t.send(e,r,n)},n)},w.prototype.send=function(t,e,r,n){return("number"!=typeof n||isNaN(n))&&(n=this.currentActor=(this.currentActor+1)%this.actors.length),this.actors[n].send(t,e,r),n},w.prototype.remove=function(){this.actors.forEach(function(t){t.remove()}),this.actors=[],this.workerPool.release(this.id)},w.Actor=t.Actor;var T=function(e,r,n){this.bounds=t.LngLatBounds.convert(this.validateBounds(e)),this.minzoom=r||0,this.maxzoom=n||24};T.prototype.validateBounds=function(t){return Array.isArray(t)&&4===t.length?[Math.max(-180,t[0]),Math.max(-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]},T.prototype.contains=function(e){var r=Math.pow(2,e.z),n=Math.floor(t.mercatorXfromLng(this.bounds.getWest())*r),i=Math.floor(t.mercatorYfromLat(this.bounds.getNorth())*r),o=Math.ceil(t.mercatorXfromLng(this.bounds.getEast())*r),a=Math.ceil(t.mercatorYfromLat(this.bounds.getSouth())*r);return e.x>=n&&e.x<o&&e.y>=i&&e.y<a};var S=function(e){function r(r,n,i,o){if(e.call(this),this.id=r,this.dispatcher=i,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,t.extend(this,t.pick(n,["url","scheme","tileSize"])),this._options=t.extend({type:"vector"},n),this._collectResourceTiming=n.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(o)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=E(this._options,this.map._transformRequest,function(r,n){e._tileJSONRequest=null,r?e.fire(new t.ErrorEvent(r)):n&&(t.extend(e,n),n.bounds&&(e.tileBounds=new T(n.bounds,e.minzoom,e.maxzoom)),t.postTurnstileEvent(n.tiles),t.postMapLoadEvent(n.tiles,e.map._getMapId()),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))})},r.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},r.prototype.serialize=function(){return t.extend({},this._options)},r.prototype.loadTile=function(e,r){var n=t.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme),this.url),i={request:this.map._transformRequest(n,t.ResourceType.Tile),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.t
vendor: 6,074 bytes, line 65
65ype,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes};function o(t,n){return e.aborted?r(null):t&&404!==t.status?r(t):(n&&n.resourceTiming&&(e.resourceTiming=n.resourceTiming),this.map._refreshExpiredTiles&&n&&e.setExpiryData(n),e.loadVectorData(n,this.map.painter),r(null),void(e.reloadCallback&&(this.loadTile(e,e.reloadCallback),e.reloadCallback=null)))}i.request.collectResourceTiming=this._collectResourceTiming,void 0===e.workerID||"expired"===e.state?e.workerID=this.dispatcher.send("loadTile",i,o.bind(this)):"loading"===e.state?e.reloadCallback=r:this.dispatcher.send("reloadTile",i,o.bind(this),e.workerID)},r.prototype.abortTile=function(t){this.dispatcher.send("abortTile",{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send("removeTile",{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)},r.prototype.hasTransition=function(){return!1},r}(t.Evented),C=function(e){function r(r,n,i,o){e.call(this),this.id=r,this.dispatcher=i,this.setEventedParent(o),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=t.extend({},n),t.extend(this,t.pick(n,["url","scheme","tileSize"]))}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=E(this._options,this.map._transformRequest,function(r,n){e._tileJSONRequest=null,r?e.fire(new t.ErrorEvent(r)):n&&(t.extend(e,n),n.bounds&&(e.tileBounds=new T(n.bounds,e.minzoom,e.maxzoom)),t.postTurnstileEvent(n.tiles),t.postMapLoadEvent(n.tiles,e.map._getMapId()),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))})},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},r.prototype.serialize=function(){return t.extend({},this._options)},r.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},r.prototype.loadTile=function(e,r){var n=this,i=t.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);e.request=t.getImage(this.map._transformRequest(i,t.ResourceType.Tile),function(i,o){if(delete e.request,e.aborted)e.state="unloaded",r(null);else if(i)e.state="errored",r(i);else if(o){n.map._refreshExpiredTiles&&e.setExpiryData(o),delete o.cacheControl,delete o.expires;var a=n.map.painter.context,s=a.gl;e.texture=n.map.painter.getTileTexture(o.width),e.texture?e.texture.update(o,{useMipmap:!0}):(e.texture=new t.Texture(a,o,s.RGBA,{useMipmap:!0}),e.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),a.extTextureFilterAnisotropic&&s.texParameterf(s.TEXTURE_2D,a.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,a.extTextureFilterAnisotropicMax)),e.state="loaded",r(null)}})},r.prototype.abortTile=function(t,e){t.request&&(t.request.cancel(),delete t.request),e()},r.prototype.unloadTile=function(t,e){t.texture&&this.map.painter.saveTileTexture(t.texture),e()},r.prototype.hasTransition=function(){return!1},r}(t.Evented),A=function(e){function r(r,n,i,o){e.call(this,r,n,i,o),this.type="raster-dem",this.maxzoom=22,this._options=t.extend({},n),this.encoding=n.encoding||"mapbox"}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},r.prototype.loadTile=function(e,r){var n=t.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);e.request=t.getImage(this.map._transformRequest(n,t.ResourceType.Tile),function(n,i){if(delete e.request,e.aborted)e.state="unloaded",r(null);else if(n)e.state="errored",r(n);else if(i){this.map._refreshExpiredTiles&&e.setExpiryData(i),delete i.cacheControl,delete i.expires;var o=t.browser.getImageData(i),a={uid:e.uid,coord:e.tileID,source:this.id,rawImageData:o,encoding:this.encoding};e.workerID&&"expired"!==e.state||(e.workerID=this.dispatcher.send("loadDEMTile",a,function(t,n){t&&(e.state="errored",r(t)),n&&(e.dem=n,e.needsHillshadePrepare=!0,e.state="loaded",r(null))}.bind(this)))}}.bind(this)),e.neighboringTiles=this._getNeighboringTiles(e.tileID)},r.prototype._getNeighboringTiles=function(e){var r=e.canonical,n=Math.pow(2,r.z),i=(r.x-1+n)%n,o=0===r.x?e.wrap-1:e.wrap,a=(r.x+1+n)%n,s=r.x+1===n?e.wrap+1:e.wrap,l={};return l[new t.OverscaledTileID(e.overscaledZ,o,r.z,i,r.y).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,a,r.y).key]={backfilled:!1},r.y>0&&(l[new t.OverscaledTileID(e.overscaledZ,o,r.z,i,r.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,a,r.y-1).key]={backfilled:!1}),r.y+1<n&&(l[new t.OverscaledTileID(e.overscaledZ,o,r.z,i,r.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,r.z,r.x,r.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,a,r.y+1).key]={backfilled:!1}),l},r.prototype.unloadTile=function(t){t.demTexture&&this.map.painter.saveTileTexture(t.demTexture),t.fbo&&(t.fbo.destroy(),delete t.fbo),t.dem&&delete t.dem,delete t.neighboringTiles,t.state="unloaded",this.dispatcher.send("removeDEMTile",{uid:t.uid,source:this.id},void 0,t.workerID)},r}(C),I=function(e){function r(r,n,i,o){e.call(this),this.id=r,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this.dispatcher=i,this.setEventedParent(o),this._data=n.data,this._options=t.extend({},n),this._collectResourceTiming=n.collectResourceTiming,this._resourceTiming=[],void 0!==n.maxzoom&&(this.maxzoom=n.maxzoom),n.type&&(this.t
65ype=n.type),n.attribution&&(this.attribution=n.attribution);var a=t.EXTENT/this.tileSize;this.workerOptions=t.extend({source:this.id,cluster:n.cluster||!1,geojsonVtOptions:{buffer:(void 0!==n.buffer?n.buffer:128)*a,tolerance:(void 0!==n.tolerance?n.tolerance:.375)*a,extent:t.EXTENT,maxZoom:this.maxzoom,lineMetrics:n.lineMetrics||!1,generateId:n.generateId||!1},superclusterOptions:{maxZoom:void 0!==n.clusterMaxZoom?Math.min(n.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,extent:t.EXTENT,radius:(n.clusterRadius||50)*a,log:!1},clusterProperties:n.clusterProperties},n.workerOptions)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(r){if(r)e.fire(new t.ErrorEvent(r));else{var n={dataType:"source",sourceDataType:"metadata"};e._collectResourceTiming&&e._resourceTiming&&e._resourceTiming.length>0&&(n.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new t.Event("data",n))}})},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setData=function(e){var r=this;return this._data=e,this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(e){if(e)r.fire(new t.ErrorEvent(e));else{var n={dataType:"source",sourceDataType:"content"};r._collectResourceTiming&&r._resourceTiming&&r._resourceTiming.length>0&&(n.resourceTiming=r._resourceTiming,r._resourceTiming=[]),r.fire(new t.Event("data",n))}}),this},r.prototype.getClusterExpansionZoom=function(t,e){return this.dispatcher.send("geojson.getClusterExpansionZoom",{clusterId:t,source:this.id},e,this.workerID),this},r.prototype.getClusterChildren=function(t,e){return this.dispatcher.send("geojson.getClusterChildren",{clusterId:t,source:this.id},e,this.workerID),this},r.prototype.getClusterLeaves=function(t,e,r,n){return this.dispatcher.send("geojson.getClusterLeaves",{source:this.id,clusterId:t,limit:e,offset:r},n,this.workerID),this},r.prototype._updateWorkerData=function(e){var r=this,n=t.extend({},this.workerOptions),i=this._data;"string"==typeof i?(n.request=this.map._transformRequest(t.browser.resolveURL(i),t.ResourceType.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(i),this.workerID=this.dispatcher.send(this.type+".loadData",n,function(t,i){r._removed||i&&i.abandoned||(r._loaded=!0,i&&i.resourceTiming&&i.resourceTiming[r.id]&&(r._resourceTiming=i.resourceTiming[r.id].slice(0)),r.dispatcher.send(r.type+".coalesce",{source:n.source},null,r.workerID),e(t))},this.workerID)},r.prototype.loadTile=function(e,r){var n=this,i=void 0===e.workerID?"loadTile":"reloadTile",o={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes};e.workerID=this.dispatcher.send(i,o,function(t,o){return e.unloadVectorData(),e.aborted?r(null):t?r(t):(e.loadVectorData(o,n.map.painter,"reloadTile"===i),r(null))},this.workerID)},r.prototype.abortTile=function(t){t.aborted=!0},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send("removeTile",{uid:t.uid,type:this.t
vendor: 5,537 bytes, line 65
65ype,source:this.id},null,t.workerID)},r.prototype.onRemove=function(){this._removed=!0,this.dispatcher.send("removeSource",{type:this.type,source:this.id},null,this.workerID)},r.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(t.Evented),D=function(e){function r(t,r,n,i){e.call(this),this.id=t,this.dispatcher=n,this.coordinates=r.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this.setEventedParent(i),this.options=r}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(e,r){var n=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this.url=this.options.url,t.getImage(this.map._transformRequest(this.url,t.ResourceType.Image),function(i,o){i?n.fire(new t.ErrorEvent(i)):o&&(n.image=o,e&&(n.coordinates=e),r&&r(),n._finishLoading())})},r.prototype.updateImage=function(t){var e=this;return this.image&&t.url?(this.options.url=t.url,this.load(t.coordinates,function(){e.texture=null}),this):this},r.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setCoordinates=function(e){var r=this;this.coordinates=e;var n=e.map(t.MercatorCoordinate.fromLngLat);this.tileID=function(e){for(var r=1/0,n=1/0,i=-1/0,o=-1/0,a=0,s=e;a<s.length;a+=1){var l=s[a];r=Math.min(r,l.x),n=Math.min(n,l.y),i=Math.max(i,l.x),o=Math.max(o,l.y)}var u=i-r,c=o-n,p=Math.max(u,c),h=Math.max(0,Math.floor(-Math.log(p)/Math.LN2)),f=Math.pow(2,h);return new t.CanonicalTileID(h,Math.floor((r+i)/2*f),Math.floor((n+o)/2*f))}(n),this.minzoom=this.maxzoom=this.tileID.z;var i=n.map(function(t){return r.tileID.getTilePoint(t)._round()});return this._boundsArray=new t.StructArrayLayout4i8,this._boundsArray.emplaceBack(i[0].x,i[0].y,0,0),this._boundsArray.emplaceBack(i[1].x,i[1].y,t.EXTENT,0),this._boundsArray.emplaceBack(i[3].x,i[3].y,0,t.EXTENT),this._boundsArray.emplaceBack(i[2].x,i[2].y,t.EXTENT,t.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})),this},r.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var e=this.map.painter.context,r=e.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,t.rasterBoundsAttributes.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new t.Texture(e,this.image,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[n];"loaded"!==i.state&&(i.state="loaded",i.texture=this.texture)}}},r.prototype.loadTile=function(t,e){this.tileID&&this.tileID.equals(t.tileID.canonical)?(this.tiles[String(t.tileID.wrap)]=t,t.buckets={},e(null)):(t.state="errored",e(null))},r.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return!1},r}(t.Evented),k={vector:S,raster:C,"raster-dem":A,geojson:I,video:function(e){function r(t,r,n,i){e.call(this,t,r,n,i),this.roundZoom=!0,this.type="video",this.options=r}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this,r=this.options;this.urls=[];for(var n=0,i=r.urls;n<i.length;n+=1){var o=i[n];this.urls.push(this.map._transformRequest(o,t.ResourceType.Source).url)}t.getVideo(this.urls,function(r,n){r?e.fire(new t.ErrorEvent(r)):n&&(e.video=n,e.video.loop=!0,e.video.addEventListener("playing",function(){e.map.triggerRepaint()}),e.map&&e.video.play(),e._finishLoading())})},r.prototype.getVideo=function(){return this.video},r.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},r.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var e=this.map.painter.context,r=e.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,t.rasterBoundsAttributes.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(e,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[n];"loaded"!==i.state&&(i.state="loaded",i.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this.video&&!this.video.paused},r}(D),image:D,canvas:function(e){function r(r,n,i,o){e.call(this,r,n,i,o),n.coordinates?Array.isArray(n.coordinates)&&4===n.coordinates.length&&!n.coordinates.some(function(t){return!Array.isArray(t)||2!==t.length||t.some(function(t){return"number"!=typeof t})})||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'missing required property "coordinates"'))),n.animate&&"boolean"!=typeof n.animate&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'o
65ptional "animate" property must be a boolean value'))),n.canvas?"string"==typeof n.canvas||n.canvas instanceof t.window.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'missing required property "canvas"'))),this.options=n,this.animate=void 0===n.animate||n.animate}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing=!1},this._finishLoading())},r.prototype.getCanvas=function(){return this.canvas},r.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()},r.prototype.onRemove=function(){this.pause()},r.prototype.prepare=function(){var e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var r=this.map.painter.context,n=r.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,t.rasterBoundsAttributes.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(r,this.canvas,n.RGBA,{premultiply:!0}),this.tiles){var o=this.tiles[i];"loaded"!==o.state&&(o.state="loaded",o.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this._playing},r.prototype._hasInvalidDimensions=function(){for(var t=0,e=[this.canvas.width,this.canvas.height];t<e.length;t+=1){var r=e[t];if(isNaN(r)||r<=0)return!0}return!1},r}(D)},M=function(e,r,n,i){var o=new k[r.type](e,r,n,i);if(o.id!==e)throw new Error("Expected Source id to be "+e+" instead of "+o.id);return t.bindAll(["load","abort","unload","serialize","prepare"],o),o};function P(e,r){var n=t.identity([]);return t.translate(n,n,[1,1,0]),t.scale(n,n,[.5*e.width,.5*e.height,1]),t.multiply(n,n,e.calculatePosMatrix(r.toUnwrapped()))}function z(t,e,r,n,i){var o=function(t,e,r){if(t)for(var n=0,i=t;n<i.length;n+=1){var o=e[i[n]];if(o&&o.source===r&&"fill-extrusion"===o.type)return!0}else for(var a in e){var s=e[a];if(s.source===r&&"fill-extrusion"===s.type)return!0}return!1}(n&&n.layers,e,t.id),a=i.maxPitchScaleFactor(),s=t.tilesIn(r,a,o);s.sort(L);for(var l=[],u=0,c=s;u<c.length;u+=1){var p=c[u];l.push({wrappedTileID:p.tileID.wrapped().key,queryResults:p.tile.queryRenderedFeatures(e,t._state,p.queryGeometry,p.cameraQueryGeometry,p.scale,n,i,a,P(t.transform,p.tileID))})}var h=function(t){for(var e={},r={},n=0,i=t;n<i.length;n+=1){var o=i[n],a=o.queryResults,s=o.wrappedTileID,l=r[s]=r[s]||{};for(var u in a)for(var c=a[u],p=l[u]=l[u]||{},h=e[u]=e[u]||[],f=0,d=c;f<d.length;f+=1){var m=d[f];p[m.featureIndex]||(p[m.featureIndex]=!0,h.push(m))}}return e}(l);for(var f in h)h[f].forEach(function(e){var r=e.feature,n=t.getFeatureState(r.layer["source-layer"],r.id);r.source=r.layer.source,r.layer["source-layer"]&&(r.sourceLayer=r.layer["source-layer"]),r.state=n});return h}function L(t,e){var r=t.tileID,n=e.tileID;return r.overscaledZ-n.overscaledZ||r.canonical.y-n.canonical.y||r.wrap-n.wrap||r.canonical.x-n.canonical.x}var O=function(t,e){this.max=t,this.onRemove=e,this.reset()};O.prototype.reset=function(){for(var t in this.data)for(var e=0,r=this.data[t];e<r.length;e+=1){var n=r[e];n.timeout&&clearTimeout(n.timeout),this.onRemove(n.value)}return this.data={},this.order=[],this},O.prototype.add=function(t,e,r){var n=this,i=t.wrapped().key;void 0===this.data[i]&&(this.data[i]=[]);var o={value:e,timeout:void 0};if(void 0!==r&&(o.timeout=setTimeout(function(){n.remove(t,o)},r)),this.data[i].push(o),this.order.push(i),this.order.length>this.max){var a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a)}return this},O.prototype.has=function(t){return t.wrapped().key in this.data},O.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},O.prototype._getAndRemoveByKey=function(t){var e=this.data[t].shift();return e.timeout&&clearTimeout(e.timeout),0===this.data[t].length&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),e.value},O.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},O.prototype.remove=function(t,e){if(!this.has(t))return this;var r=t.wrapped().key,n=void 0===e?0:this.data[r].indexOf(e),i=this.data[r][n];return this.data[r].splice(n,1),i.timeout&&clearTimeout(i.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(i.value),this.order.splice(this.order.indexOf(r),1),this},O.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this};var R=function(t,e,r){this.context=t;var n=t.gl;this.buffer=n.createBuffer(),this.dynamicDraw=Boolean(r),this.context.unbindVAO(),t.bindElementBuffer.set(this.buffer),n.bufferData(n.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};R.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},R.prototype.updateData=function(t){var e=this.context.gl;this.context.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)},R.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)};var B={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},F=function(t,e,r,n){this.length=e.length,this.attributes=r,this.itemSize=e.bytesPerElement,this.dynamicDraw=n,this.context=t;var i=t.gl;this.buffer=i.createBuffer(),t.bindVertexBuffer.set(this.buffer),i.bufferData(i.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};F.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},F.prototype.updateData=function(t){var e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)},F.prototype.enableAttributes=function(t,e){for(var r=0;r<this.attributes.length;r++){var n=this.attributes[r],i=e.attributes[n.name];void 0!==i&&t.enableVertexAttribArray(i)}},F.prototype.setVertexAttribPointers=function(t,e,r){for(var n=0;n<this.attributes.length;n++){var i=this.attributes[n],o=e.attributes[i.name];void 0!==o&&t.vertexAttribPointer(o,i.components,t[B[i.type]],!1,this.itemSize,i.offset+this.itemSize*(r||0))}},F.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)};var N=function(t){this.gl=t.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};N.prototype.get=function(){return this.current},N.prototype.set=function(t){},N.prototype.getDefault=function(){return this.default},N.prototype.setDefault=function(){this.set(this.default)};var U=function(e){function r(){e.apply(this,arguments)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getDefault=function(){return t.Color.transparent},r.prototype.set=function(t){var e=this.current;(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.clearColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)},r}(N),V=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return 1},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.clearDepth(t),this.current=t,this.dirty=!1)},e}(N),j=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return 0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.clearStencil(t),this.current=t,this.dirty=!1)},e}(N),q=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return[!0,
vendor: 10,683 bytes, line 65
65!0,!0,!0]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||this.dirty)&&(this.gl.colorMask(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)},e}(N),H=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.depthMask(t),this.current=t,this.dirty=!1)},e}(N),G=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return 255},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.stencilMask(t),this.current=t,this.dirty=!1)},e}(N),W=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},e.prototype.set=function(t){var e=this.current;(t.func!==e.func||t.ref!==e.ref||t.mask!==e.mask||this.dirty)&&(this.gl.stencilFunc(t.func,t.ref,t.mask),this.current=t,this.dirty=!1)},e}(N),Z=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){var t=this.gl;return[t.KEEP,t.KEEP,t.KEEP]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||this.dirty)&&(this.gl.stencilOp(t[0],t[1],t[2]),this.current=t,this.dirty=!1)},e}(N),X=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this.current=t,this.dirty=!1}},e}(N),Y=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return[0,1]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||this.dirty)&&(this.gl.depthRange(t[0],t[1]),this.current=t,this.dirty=!1)},e}(N),K=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this.current=t,this.dirty=!1}},e}(N),J=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.LESS},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.depthFunc(t),this.current=t,this.dirty=!1)},e}(N),Q=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.BLEND):e.disable(e.BLEND),this.current=t,this.dirty=!1}},e}(N),$=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){var t=this.gl;return[t.ONE,t.ZERO]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||this.dirty)&&(this.gl.blendFunc(t[0],t[1]),this.current=t,this.dirty=!1)},e}(N),tt=function(e){function r(){e.apply(this,arguments)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getDefault=function(){return t.Color.transparent},r.prototype.set=function(t){var e=this.current;(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.blendColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)},r}(N),et=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.FUNC_ADD},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.blendEquation(t),this.current=t,this.dirty=!1)},e}(N),rt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),this.current=t,this.dirty=!1}},e}(N),nt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.BACK},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.cullFace(t),this.current=t,this.dirty=!1)},e}(N),it=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.CCW},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.frontFace(t),this.current=t,this.dirty=!1)},e}(N),ot=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.useProgram(t),this.current=t,this.dirty=!1)},e}(N),at=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.TEXTURE0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.activeTexture(t),this.current=t,this.dirty=!1)},e}(N),st=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){var t=this.gl;return[0,0,t.drawingBufferWidth,t.drawingBufferHeight]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||this.dirty)&&(this.gl.viewport(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)},e}(N),lt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,t),this.current=t,this.dirty=!1}},e}(N),ut=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindRenderbuffer(e.RENDERBUFFER,t),this.current=t,this.dirty=!1}},e}(N),ct=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindTexture(e.TEXTURE_2D,t),this.current=t,this.dirty=!1}},e}(N),pt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindBuffer(e.ARRAY_BUFFER,t),this.current=t,this.dirty=!1}},e}(N),ht=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){var e=this.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.current=t,this.dirty=!1},e}(N),ft=function(t){function e(e){t.call(this,e),this.vao=e.extVertexArrayObject}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){this.vao&&(t!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(t),this.current=t,this.dirty=!1)},e}(N),dt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return 4},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_ALIGNMENT,t),this.current=t,this.dirty=!1}},e}(N),mt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t),this.current=t,this.dirty=!1}},e}(N),gt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t),this.current=t,this.dirty=!1}},e}(N),yt=function(t){function e(e,r){t.call(this,e),this.context=e,this.parent=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e}(N),vt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setDirty=function(){this.dirty=!0},e.prototype.set=function(t){if(t!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var e=this.gl;e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),this.current=t,this.dirty=!1}},e}(yt),_t=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(t!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var e=this.gl;e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t),this.current=t,this.dirty=!1}},e}(yt),xt=function(t,e,r){this.context=t,this.width=e,this.height=r;var n=t.gl,i=this.framebuffer=n.createFramebuffer();
vendor: 19,203 bytes, line 65
65this.colorAttachment=new vt(t,i),this.depthAttachment=new _t(t,i)};xt.prototype.destroy=function(){var t=this.context.gl,e=this.colorAttachment.get();e&&t.deleteTexture(e);var r=this.depthAttachment.get();r&&t.deleteRenderbuffer(r),t.deleteFramebuffer(this.framebuffer)};var bt=function(t,e,r){this.func=t,this.mask=e,this.range=r};bt.ReadOnly=!1,bt.ReadWrite=!0,bt.disabled=new bt(519,bt.ReadOnly,[0,1]);var wt=function(t,e,r,n,i,o){this.test=t,this.ref=e,this.mask=r,this.fail=n,this.depthFail=i,this.pass=o};wt.disabled=new wt({func:519,mask:0},0,0,7680,7680,7680);var Et=function(t,e,r){this.blendFunction=t,this.blendColor=e,this.mask=r};Et.disabled=new Et(Et.Replace=[1,0],t.Color.transparent,[!1,!1,!1,!1]),Et.unblended=new Et(Et.Replace,t.Color.transparent,[!0,!0,!0,!0]),Et.alphaBlended=new Et([1,771],t.Color.transparent,[!0,!0,!0,!0]);var Tt=function(t,e,r){this.enable=t,this.mode=e,this.frontFace=r};Tt.disabled=new Tt(!1,1029,2305),Tt.backCCW=new Tt(!0,1029,2305);var St=function(t){this.gl=t,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new U(this),this.clearDepth=new V(this),this.clearStencil=new j(this),this.colorMask=new q(this),this.depthMask=new H(this),this.stencilMask=new G(this),this.stencilFunc=new W(this),this.stencilOp=new Z(this),this.stencilTest=new X(this),this.depthRange=new Y(this),this.depthTest=new K(this),this.depthFunc=new J(this),this.blend=new Q(this),this.blendFunc=new $(this),this.blendColor=new tt(this),this.blendEquation=new et(this),this.cullFace=new rt(this),this.cullFaceSide=new nt(this),this.frontFace=new it(this),this.program=new ot(this),this.activeTexture=new at(this),this.viewport=new st(this),this.bindFramebuffer=new lt(this),this.bindRenderbuffer=new ut(this),this.bindTexture=new ct(this),this.bindVertexBuffer=new pt(this),this.bindElementBuffer=new ht(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new ft(this),this.pixelStoreUnpack=new dt(this),this.pixelStoreUnpackPremultiplyAlpha=new mt(this),this.pixelStoreUnpackFlipY=new gt(this),this.extTextureFilterAnisotropic=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=t.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&t.getExtension("OES_texture_half_float_linear")};St.prototype.setDirty=function(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0},St.prototype.createIndexBuffer=function(t,e){return new R(this,t,e)},St.prototype.createVertexBuffer=function(t,e,r){return new F(this,t,e,r)},St.prototype.createRenderbuffer=function(t,e,r){var n=this.gl,i=n.createRenderbuffer();return this.bindRenderbuffer.set(i),n.renderbufferStorage(n.RENDERBUFFER,t,e,r),this.bindRenderbuffer.set(null),i},St.prototype.createFramebuffer=function(t,e){return new xt(this,t,e)},St.prototype.clear=function(t){var e=t.color,r=t.depth,n=this.gl,i=0;e&&(i|=n.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==r&&(i|=n.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(r),this.depthMask.set(!0)),n.clear(i)},St.prototype.setCullFace=function(t){!1===t.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(t.mode),this.frontFace.set(t.frontFace))},St.prototype.setDepthMode=function(t){t.func!==this.gl.ALWAYS||t.mask?(this.depthTest.set(!0),this.depthFunc.set(t.func),this.depthMask.set(t.mask),this.depthRange.set(t.range)):this.depthTest.set(!1)},St.prototype.setStencilMode=function(t){t.test.func!==this.gl.ALWAYS||t.mask?(this.stencilTest.set(!0),this.stencilMask.set(t.mask),this.stencilOp.set([t.fail,t.depthFail,t.pass]),this.stencilFunc.set({func:t.test.func,ref:t.ref,mask:t.test.mask})):this.stencilTest.set(!1)},St.prototype.setColorMode=function(e){t.isEqual(e.blendFunction,Et.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)},St.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var Ct=function(e){function r(r,n,i){var o=this;e.call(this),this.id=r,this.dispatcher=i,this.on("data",function(t){"source"===t.dataType&&"metadata"===t.sourceDataType&&(o._sourceLoaded=!0),o._sourceLoaded&&!o._paused&&"source"===t.dataType&&"content"===t.sourceDataType&&(o.reload(),o.transform&&o.update(o.transform))}),this.on("error",function(){o._sourceErrored=!0}),this._source=M(r,n,i,this),this._tiles={},this._cache=new O(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._coveredTiles={},this._state=new t.SourceFeatureState}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.onAdd=function(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(t)},r.prototype.onRemove=function(t){this._source&&this._source.onRemove&&this._source.onRemove(t)},r.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;for(var t in this._tiles){var e=this._tiles[t];if("loaded"!==e.state&&"errored"!==e.state)return!1}return!0},r.prototype.getSource=function(){return this._source},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){if(this._paused){var t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform)}},r.prototype._loadTile=function(t,e){return this._source.loadTile(t,e)},r.prototype._unloadTile=function(t){if(this._source.unloadTile)return this._source.unloadTile(t,function(){})},r.prototype._abortTile=function(t){if(this._source.abortTile)return this._source.abortTile(t,function(){})},r.prototype.serialize=function(){return this._source.serialize()},r.prototype.prepare=function(t){for(var e in this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null),this._tiles)this._tiles[e].upload(t)},r.prototype.getIds=function(){return Object.keys(this._tiles).map(Number).sort(At)},r.prototype.getRenderableIds=function(e){var r=this,n=[];for(var i in this._tiles)this._isIdRenderable(+i,e)&&n.push(+i);return e?n.sort(function(e,n){var i=r._tiles[e].tileID,o=r._tiles[n].tileID,a=new t.Point(i.canonical.x,i.canonical.y)._rotate(r.transform.angle),s=new t.Point(o.canonical.x,o.canonical.y)._rotate(r.transform.angle);return i.overscaledZ-o.overscaledZ||s.y-a.y||s.x-a.x}):n.sort(At)},r.prototype.hasRenderableParent=function(t){var e=this.findLoadedParent(t,0);return!!e&&this._isIdRenderable(e.tileID.key)},r.prototype._isIdRenderable=function(t,e){return this._tiles[t]&&this._tiles[t].hasData()&&!this._coveredTiles[t]&&(e||!this._tiles[t].holdingForFade())},r.prototype.reload=function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var t in this._cache.reset(),this._tiles)"errored"!==this._tiles[t].state&&this._reloadTile(t,"reloading")},r.prototype._reloadTile=function(t,e){var r=this._tiles[t];r&&("loading"!==r.state&&(r.state=e),this._loadTile(r,this._tileLoaded.bind(this,r,t,e)))},r.prototype._tileLoaded=function(e,r,n,i){if(i)return e.state="errored",void(404!==i.status?this._source.fire(new t.ErrorEvent(i,{tile:e})):this.update(this.transform));e.timeAdded=t.browser.now(),"expired"===n&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(r,e),"raster-dem"===this.getSource().type&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),this._source.fire(new t.Event("data",{dataType:"source",tile:e,coord:e.tileID}))},r.prototype._backfillDEM=function(t){for(var e=this.getRenderableIds(),r=0;r<e.length;r++){var n=e[r];if(t.neighboringTiles&&t.neighboringTiles[n]){var i=this.getTileByID(n);o(t,i),o(i,t)}}function o(t,e){t.needsHillshadePrepare=!0;var r=e.tileID.canonical.x-t.tileID.canonical.x,n=e.tileID.canonical.y-t.tileID.canonical.y,i=Math.pow(2,t.tileID.canonical.z),o=e.tileID.key;0===r&&0===n||Math.abs(n)>1||(Math.abs(r)>1&&(1===Math.abs(r+i)?r+=i:1===Math.abs(r-i)&&(r-=i)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,r,n),t.neighboringTiles&&t.neighboringTiles[o]&&(t.neighboringTiles[o].backfilled=!0)))}},r.prototype.getTile=function(t){return this.getTileByID(t.key)},r.prototype.getTileByID=function(t){return this._tiles[t]},r.prototype.getZoom=function(t){return t.zoom+t.scaleZoom(t.tileSize/this._source.tileSize)},r.prototype._retainLoadedChildren=function(t,e,r,n){for(var i in this._tiles){var o=this._tiles[i];if(!(n[i]||!o.hasData()||o.tileID.overscaledZ<=e||o.tileID.overscaledZ>r)){for(var a=o.tileID;o&&o.tileID.overscaledZ>e+1;){var s=o.tileID.scaledTo(o.tileID.overscaledZ-1);(o=this._tiles[s.key])&&o.hasData()&&(a=s)}for(var l=a;l.overscaledZ>e;)if(t[(l=l.scaledTo(l.overscaledZ-1)).key]){n[a.key]=a;break}}}},r.prototype.findLoadedParent=function(t,e){for(var r=t.overscaledZ-1;r>=e;r--){var n=t.scaledTo(r);if(!n)return;var i=String(n.key),o=this._tiles[i];if(o&&o.hasData())return o;if(this._cache.has(n))return this._cache.get(n)}},r.prototype.updateCacheSize=function(t){var e=(Math.ceil(t.width/this._source.tileSize)+1)*(Math.ceil(t.height/this._source.tileSize)+1),r=Math.floor(5*e),n="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._cache.setMaxSize(n)},r.prototype.handleWrapJump=function(t){var e=(t-(void 0===this._prevLng?t:this._prevLng))/360,r=Math.round(e);if(this._prevLng=t,r){var n={};for(var i in this._tiles){var o=this._tiles[i];o.tileID=o.tileID.unwrapTo(o.tileID.wrap+r),n[o.tileID.key]=o}for(var a in this._tiles=n,this._timers)clearTimeout(this._timers[a]),delete this._timers[a];for(var s in this._tiles){var l=this._tiles[s];this._setTileReloadTimer(s,l)}}},r.prototype.update=function(e){var n=this;if(this.transform=e,this._sourceLoaded&&!this._paused){var i;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?i=e.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(e){return new t.OverscaledTileID(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)}):(i=e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(i=i.filter(function(t){return n._source.hasTile(t)}))):i=[];var o=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(e)),a=Math.max(o-r.maxOverzooming,this._source.minzoom),s=Math.max(o+r.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(i,o);if(It(this._source.type)){for(var u={},c={},p=0,h=Object.keys(l);p<h.length;p+=1){var f=h[p],d=l[f],m=this._tiles[f];if(m&&!(m.fadeEndTime&&m.fadeEndTime<=t.browser.now())){var g=this.findLoadedParent(d,a);g&&(this._addTile(g.tileID),u[g.tileID.key]=g.tileID),c[f]=d}}for(var y in this._retainLoadedChildren(c,o,s,l),u)l[y]||(this._coveredTiles[y]=!0,l[y]=u[y])}for(var v in l)this._tiles[v].clearFadeHold();for(var _=0,x=t.keysDifference(this._tiles,l);_<x.length;_+=1){var b=x[_],w=this._tiles[b];w.hasSymbolBuckets&&!w.holdingForFade()?w.setHoldDuration(this.map._fadeDuration):w.hasSymbolBuckets&&!w.symbolFadeFinished()||this._removeTile(b)}}},r.prototype.releaseSymbolFadeTiles=function(){for(var t in this._tiles)this._tiles[t].holdingForFade()&&this._removeTile(t)},r.prototype._updateRetainedTiles=function(t,e){for(var n={},i={},o=Math.max(e-r.maxOverzooming,this._source.minzoom),a=Math.max(e+r.maxUnderzooming,this._source.minzoom),s={},l=0,u=t;l<u.length;l+=1){var c=u[l],p=this._addTile(c);n[c.key]=c,p.hasData()||e<this._source.maxzoom&&(s[c.key]=c)}this._retainLoadedChildren(s,e,a,n);for(var h=0,f=t;h<f.length;h+=1){var d=f[h],m=this._tiles[d.key];if(!m.hasData()){if(e+1>this._source.maxzoom){var g=d.children(this._source.maxzoom)[0],y=this.getTile(g);if(y&&y.hasData()){n[g.key]=g;continue}}else{var v=d.children(this._source.maxzoom);if(n[v[0].key]&&n[v[1].key]&&n[v[2].key]&&n[v[3].key])continue}for(var _=m.wasRequested(),x=d.overscaledZ-1;x>=o;--x){var b=d.scaledTo(x);if(i[b.key])break;if(i[b.key]=!0,!(m=this.getTile(b))&&_&&(m=this._addTile(b)),m&&(n[b.key]=b,_=m.wasRequested(),m.hasData()))break}}}return n},r.prototype._addTile=function(e){var r=this._tiles[e.key];if(r)return r;(r=this._cache.getAndRemove(e))&&(this._setTileReloadTimer(e.key,r),r.tileID=e,this._state.initializeTileState(r,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,r)));var n=Boolean(r);return n||(r=new t.Tile(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(r,this._tileLoaded.bind(this,r,e.key,r.state))),r?(r.uses++,this._tiles[e.key]=r,n||this._source.fire(new t.Event("dataloading",{tile:r,coord:r.tileID,dataType:"source"})),r):null},r.prototype._setTileReloadTimer=function(t,e){var r=this;t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);var n=e.getExpiryTimeout();n&&(this._timers[t]=setTimeout(function(){r._reloadTile(t,"expired"),delete r._timers[t]},n))},r.prototype._removeTile=function(t){var e=this._tiles[t];e&&(e.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),e.uses>0||(e.hasData()?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))},r.prototype.clearTiles=function(){for(var t in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(t);this._cache.reset()},r.prototype.tilesIn=function(e,r,n){var i=this,o=[],a=this.transform;if(!a)return o;for(var s=n?a.getCameraQueryGeometry(e):e,l=e.map(function(t){return a.pointCoordinate(t)}),u=s.map(function(t){return a.pointCoordinate(t)}),c=this.getIds(),p=1/0,h=1/0,f=-1/0,d=-1/0,m=0,g=u;m<g.length;m+=1){var y=g[m];p=Math.min(p,y.x),h=Math.min(h,y.y),f=Math.max(f,y.x),d=Math.max(d,y.y)}for(var v=function(e){var n=i._tiles[c[e]];if(!n.holdingForFade()){var s=n.tileID,m=Math.pow(2,a.zoom-n.tileID.overscaledZ),g=r*n.queryPadding*t.EXTENT/n.tileSize/m,y=[s.getTilePoint(new t.MercatorCoordinate(p,h)),s.getTilePoint(new t.MercatorCoordinate(f,d))];if(y[0].x-g<t.EXTENT&&y[0].y-g<t.EXTENT&&y[1].x+g>=0&&y[1].y+g>=0){var v=l.map(function(t){return s.getTilePoint(t)}),_=u.map(function(t){return s.getTilePoint(t)});o.push({tile:n,tileID:s,queryGeometry:v,cameraQueryGeometry:_,scale:m})}}},_=0;_<c.length;_++)v(_);return o},r.prototype.getVisibleCoordinates=function(t){for(var e=this,r=this.getRenderableIds(t).map(function(t){return e._tiles[t].tileID}),n=0,i=r;n<i.length;n+=1){var o=i[n];o.posMatrix=this.transform.calculatePosMatrix(o.toUnwrapped())}return r},r.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(It(this._source.type))for(var e in this._tiles){var r=this._tiles[e];if(void 0!==r.fadeEndTime&&r.fadeEndTime>=t.browser.now())return!0}return!1},r.prototype.setFeatureState=function(t,e,r){t=t||"_geojsonTileLayer",this._state.updateState(t,e,r)},r.prototype.removeFeatureState=function(t,e,r){t=t||"_geojsonTileLayer",this._state.removeFeatureState(t,e,r)},r.prototype.getFeatureState=function(t,e){return t=t||"_geojsonTileLayer",this._state.getState(t,e)},r}(t.Evented);function At(t,e){return t%32-e%32||e-t}function It(t){return"raster"===t||"image"===t||"video"===t}function Dt(){return new t.window.Worker(Xn.workerUrl)}Ct.maxOverzooming=10,Ct.maxUnderzooming=3;var kt=function(){this.active={}};kt.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length<kt.workerCount;)this.workers.push(new Dt);return this.active[t]=!0,this.workers.slice()},kt.prototype.release=function(t){delete this.active[t],0===Object.keys(this.active).length&&(this.workers.forEach(function(t){t.terminate()}),this.workers=null)};var Mt,Pt=Math.floor(t.browser.hardwareConcurrency/2);function zt(e,r){var n={};for(var i in e)"ref"!==i&&(n[i]=e[i]);return t.refProperties.forEach(function(t){t in r&&(n[t]=r[t])}),n}function Lt(t){t=t.slice();for(var e=Object.create(null),r=0;r<t.length;r++)e[t[r].id]=t[r];for(var n=0;n<t.length;n++)"ref"in t[n]&&(t[n]=zt(t[n],e[t[n].ref]));return t}kt.workerCount=Math.max(Math.min(Pt,6),1);var Ot={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};function Rt(t,e,r){r.push({command:Ot.addSource,args:[t,e[t]]})}function Bt(t,e,r){e.push({command:Ot.removeSource,args:[t]}),r[t]=!0}function Ft(t,e,r,n){Bt(t,r,n),Rt(t,e,r)}function Nt(e,r,n){var i;for(i in e[n])if(e[n].hasOwnProperty(i)&&"data"!==i&&!t.isEqual(e[n][i],r[n][i]))return!1;for(i in r[n])if(r[n].hasOwnProperty(i)&&"data"!==i&&!t.isEqual(e[n][i],r[n][i]))return!1;return!0}function Ut(e,r,n,i,o,a){var s;for(s in r=r||{},e=e||{})e.hasOwnProperty(s)&&(t.isEqual(e[s],r[s])||n.push({command:a,args:[i,s,r[s],o]}));for(s in r)r.hasOwnProperty(s)&&!e.hasOwnProperty(s)&&(t.isEqual(e[s],r[s])||n.push({command:a,args:[i,s,r[s],o]}))}function Vt(t){return t.id}function jt(t,e){return t[e.id]=e,t}var qt=function(t,e,r){var n=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(t/r),this.yCellCount=Math.ceil(e/r);for(var o=0;o<this.xCellCount*this.yCellCount;o++)n.push([]),i.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=t,this.height=e,this.xScale=this.xCellCount/t,this.yScale=this.yCellCount/e,this.boxUid=0,this.circleUid=0};qt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},qt.prototype.insert=function(t,e,r,n,i){this._forEachCell(e,r,n,i,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)}
vendor: 1,125 bytes, line 65
65,qt.prototype.insertCircle=function(t,e,r,n){this._forEachCell(e-n,r-n,e+n,r+n,this._insertCircleCell,this.circleUid++),this.circleKeys.push(t),this.circles.push(e),this.circles.push(r),this.circles.push(n)},qt.prototype._insertBoxCell=function(t,e,r,n,i,o){this.boxCells[i].push(o)},qt.prototype._insertCircleCell=function(t,e,r,n,i,o){this.circleCells[i].push(o)},qt.prototype._query=function(t,e,r,n,i,o){if(r<0||t>this.width||n<0||e>this.height)return!i&&[];var a=[];if(t<=0&&e<=0&&this.width<=r&&this.height<=n){if(i)return!0;for(var s=0;s<this.boxKeys.length;s++)a.push({key:this.boxKeys[s],x1:this.bboxes[4*s],y1:this.bboxes[4*s+1],x2:this.bboxes[4*s+2],y2:this.bboxes[4*s+3]});for(var l=0;l<this.circleKeys.length;l++){var u=this.circles[3*l],c=this.circles[3*l+1],p=this.circles[3*l+2];a.push({key:this.circleKeys[l],x1:u-p,y1:c-p,x2:u+p,y2:c+p})}return o?a.filter(o):a}var h={hitTest:i,seenUids:{box:{},circle:{}}};return this._forEachCell(t,e,r,n,this._queryCell,a,h,o),i?a.length>0:a},qt.prototype._queryCircle=function(t,e,r,n,i){var o=t-r,a=t+r,s=e-r,l=e+r;if(a<0||o>this.width||l<0||s>this.height)return!n&&[];
vendor: 5,275 bytes, line 65
65var u=[],c={hitTest:n,circle:{x:t,y:e,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(o,s,a,l,this._queryCellCircle,u,c,i),n?u.length>0:u},qt.prototype.query=function(t,e,r,n,i){return this._query(t,e,r,n,!1,i)},qt.prototype.hitTest=function(t,e,r,n,i){return this._query(t,e,r,n,!0,i)},qt.prototype.hitTestCircle=function(t,e,r,n){return this._queryCircle(t,e,r,!0,n)},qt.prototype._queryCell=function(t,e,r,n,i,o,a,s){var l=a.seenUids,u=this.boxCells[i];if(null!==u)for(var c=this.bboxes,p=0,h=u;p<h.length;p+=1){var f=h[p];if(!l.box[f]){l.box[f]=!0;var d=4*f;if(t<=c[d+2]&&e<=c[d+3]&&r>=c[d+0]&&n>=c[d+1]&&(!s||s(this.boxKeys[f]))){if(a.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[f],x1:c[d],y1:c[d+1],x2:c[d+2],y2:c[d+3]})}}}var m=this.circleCells[i];if(null!==m)for(var g=this.circles,y=0,v=m;y<v.length;y+=1){var _=v[y];if(!l.circle[_]){l.circle[_]=!0;var x=3*_;if(this._circleAndRectCollide(g[x],g[x+1],g[x+2],t,e,r,n)&&(!s||s(this.circleKeys[_]))){if(a.hitTest)return o.push(!0),!0;var b=g[x],w=g[x+1],E=g[x+2];o.push({key:this.circleKeys[_],x1:b-E,y1:w-E,x2:b+E,y2:w+E})}}}},qt.prototype._queryCellCircle=function(t,e,r,n,i,o,a,s){var l=a.circle,u=a.seenUids,c=this.boxCells[i];if(null!==c)for(var p=this.bboxes,h=0,f=c;h<f.length;h+=1){var d=f[h];if(!u.box[d]){u.box[d]=!0;var m=4*d;if(this._circleAndRectCollide(l.x,l.y,l.radius,p[m+0],p[m+1],p[m+2],p[m+3])&&(!s||s(this.boxKeys[d])))return o.push(!0),!0}}var g=this.circleCells[i];if(null!==g)for(var y=this.circles,v=0,_=g;v<_.length;v+=1){var x=_[v];if(!u.circle[x]){u.circle[x]=!0;var b=3*x;if(this._circlesCollide(y[b],y[b+1],y[b+2],l.x,l.y,l.radius)&&(!s||s(this.circleKeys[x])))return o.push(!0),!0}}},qt.prototype._forEachCell=function(t,e,r,n,i,o,a,s){for(var l=this._convertToXCellCoord(t),u=this._convertToYCellCoord(e),c=this._convertToXCellCoord(r),p=this._convertToYCellCoord(n),h=l;h<=c;h++)for(var f=u;f<=p;f++){var d=this.xCellCount*f+h;if(i.call(this,t,e,r,n,d,o,a,s))return}},qt.prototype._convertToXCellCoord=function(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))},qt.prototype._convertToYCellCoord=function(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))},qt.prototype._circlesCollide=function(t,e,r,n,i,o){var a=n-t,s=i-e,l=r+o;return l*l>a*a+s*s},qt.prototype._circleAndRectCollide=function(t,e,r,n,i,o,a){var s=(o-n)/2,l=Math.abs(t-(n+s));if(l>s+r)return!1;var u=(a-i)/2,c=Math.abs(e-(i+u));if(c>u+r)return!1;if(l<=s||c<=u)return!0;var p=l-s,h=c-u;return p*p+h*h<=r*r};var Ht=t.properties.layout;function Gt(e,r,n,i,o){var a=t.identity(new Float32Array(16));return r?(t.identity(a),t.scale(a,a,[1/o,1/o,1]),n||t.rotateZ(a,a,i.angle)):(t.scale(a,a,[i.width/2,-i.height/2,1]),t.translate(a,a,[1,-1,0]),t.multiply(a,a,e)),a}function Wt(e,r,n,i,o){var a=t.identity(new Float32Array(16));return r?(t.multiply(a,a,e),t.scale(a,a,[o,o,1]),n||t.rotateZ(a,a,-i.angle)):(t.scale(a,a,[1,-1,1]),t.translate(a,a,[-1,-1,0]),t.scale(a,a,[2/i.width,2/i.height,1])),a}function Zt(e,r){var n=[e.x,e.y,0,1];ne(n,n,r);var i=n[3];return{point:new t.Point(n[0]/i,n[1]/i),signedDistanceFromCamera:i}}function Xt(t,e){var r=t[0]/t[3],n=t[1]/t[3];return r>=-e[0]&&r<=e[0]&&n>=-e[1]&&n<=e[1]}function Yt(e,r,n,i,o,a,s,l){var u=i?e.textSizeData:e.iconSizeData,c=t.evaluateSizeForZoom(u,n.transform.zoom,Ht.properties[i?"text-size":"icon-size"]),p=[256/n.width*2+1,256/n.height*2+1],h=i?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;h.clear();for(var f=e.lineVertexArray,d=i?e.text.placedSymbolArray:e.icon.placedSymbolArray,m=n.transform.width/n.transform.height,g=!1,y=0;y<d.length;y++){var v=d.get(y);if(v.hidden||v.writingMode===t.WritingMode.vertical&&!g)re(v.numGlyphs,h);else{g=!1;var _=[v.anchorX,v.anchorY,0,1];if(t.transformMat4(_,_,r),Xt(_,p)){var x=.5+_[3]/n.transform.cameraToCenterDistance*.5,b=t.evaluateSizeForFeature(u,c,v),w=s?b*x:b/x,E=new t.Point(v.anchorX,v.anchorY),T=Zt(E,o).point,S={},C=Qt(v,w,!1,l,r,o,a,e.glyphOffsetArray,f,h,T,E,S,m);g=C.useVertical,(C.notEnoughRoom||g||C.needsFlipping&&Qt(v,w,!0,l,r,o,a,e.glyphOffsetArray,f,h,T,E,S,m).notEnoughRoom)&&re(v.numGlyphs,h)}else re(v.numGlyphs,h)}}i?e.text.dynamicLayoutVertexBuffer.updateData(h):e.icon.dynamicLayoutVertexBuffer.updateData(h)}function Kt(t,e,r,n,i,o,a,s,l,u,c,p){var h=s.glyphStartIndex+s.numGlyphs,f=s.lineStartIndex,d=s.lineStartIndex+s.lineLength,m=e.getoffsetX(s.glyphStartIndex),g=e.getoffsetX(h-1),y=te(t*m,r,n,i,o,a,s.segment,f,d,l,u,c,p);if(!y)return null;var v=te(t*g,r,n,i,o,a,s.segment,f,d,l,u,c,p);return v?{first:y,last:v}:null}function Jt(e,r,n,i){return e===t.WritingMode.horizontal&&Math.abs(n.y-r.y)>Math.abs(n.x-r.x)*i?{useVertical:!0}:(e===t.WritingMode.vertical?r.y<n.y:r.x>n.x)?{needsFlipping:!0}:null}function Qt(e,r,n,i,o,a,s,l,u,c,p,h,f,d){var m,g=r/24,y=e.lineOffsetX*r,v=e.lineOffsetY*r;if(e.numGlyphs>1){var _=e.glyphStartIndex+e.numGlyphs,x=e.lineStartIndex,b=e.lineStartIndex+e.lineLength,w=Kt(g,l,y,v,n,p,h,e,u,a,f,!1);if(!w)return{notEnoughRoom:!0};var E=Zt(w.first.point,s).point,T=Zt(w.last.point,s).point;if(i&&!n){var S=Jt(e.writingMode,E,T,d);if(S)return S}m=[w.first];for(var C=e.glyphStartIndex+1;C<_-1;C++)m.push(te(g*l.getoffsetX(C),y,v,n,p,h,e.segment,x,b,u,a,f,!1));m.push(w.last)}
vendor: 4,783 bytes, line 65
65else{if(i&&!n){var A=Zt(h,o).point,I=e.lineStartIndex+e.segment+1,D=new t.Point(u.getx(I),u.gety(I)),k=Zt(D,o),M=k.signedDistanceFromCamera>0?k.point:$t(h,D,A,1,o),P=Jt(e.writingMode,A,M,d);if(P)return P}var z=te(g*l.getoffsetX(e.glyphStartIndex),y,v,n,p,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,u,a,f,!1);if(!z)return{notEnoughRoom:!0};m=[z]}for(var L=0,O=m;L<O.length;L+=1){var R=O[L];t.addDynamicAttributes(c,R.point,R.angle)}return{}}function $t(t,e,r,n,i){var o=Zt(t.add(t.sub(e)._unit()),i).point,a=r.sub(o);return r.add(a._mult(n/a.mag()))}function te(e,r,n,i,o,a,s,l,u,c,p,h,f){var d=i?e-r:e+r,m=d>0?1:-1,g=0;i&&(m*=-1,g=Math.PI),m<0&&(g+=Math.PI);for(var y=m>0?l+s:l+s+1,v=y,_=o,x=o,b=0,w=0,E=Math.abs(d);b+w<=E;){if((y+=m)<l||y>=u)return null;if(x=_,void 0===(_=h[y])){var T=new t.Point(c.getx(y),c.gety(y)),S=Zt(T,p);if(S.signedDistanceFromCamera>0)_=h[y]=S.point;else{var C=y-m;_=$t(0===b?a:new t.Point(c.getx(C),c.gety(C)),T,x,E-b+1,p)}}b+=w,w=x.dist(_)}var A=(E-b)/w,I=_.sub(x),D=I.mult(A)._add(x);return D._add(I._unit()._perp()._mult(n*m)),{point:D,angle:g+Math.atan2(_.y-x.y,_.x-x.x),tileDistance:f?{prevTileDistance:y-m===v?0:c.gettileUnitDistanceFromAnchor(y-m),lastSegmentViewportDistance:E-b}:null}}var ee=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function re(t,e){for(var r=0;r<t;r++){var n=e.length;e.resize(n+4),e.float32.set(ee,3*n)}}function ne(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[4]*i+r[12],t[1]=r[1]*n+r[5]*i+r[13],t[3]=r[3]*n+r[7]*i+r[15],t}var ie=function(t,e,r){void 0===e&&(e=new qt(t.width+200,t.height+200,25)),void 0===r&&(r=new qt(t.width+200,t.height+200,25)),this.transform=t,this.grid=e,this.ignoredGrid=r,this.pitchfactor=Math.cos(t._pitch)*t.cameraToCenterDistance,this.screenRightBoundary=t.width+100,this.screenBottomBoundary=t.height+100,this.gridRightBoundary=t.width+200,this.gridBottomBoundary=t.height+200};function oe(t,e,r){t[e+4]=r?1:0}function ae(e,r,n){return r*(t.EXTENT/(e.tileSize*Math.pow(2,n-e.tileID.overscaledZ)))}ie.prototype.placeCollisionBox=function(t,e,r,n,i){var o=this.projectAndGetPerspectiveRatio(n,t.anchorPointX,t.anchorPointY),a=r*o.perspectiveRatio,s=t.x1*a+o.point.x,l=t.y1*a+o.point.y,u=t.x2*a+o.point.x,c=t.y2*a+o.point.y;return!this.isInsideGrid(s,l,u,c)||!e&&this.grid.hitTest(s,l,u,c,i)?{box:[],offscreen:!1}:{box:[s,l,u,c],offscreen:this.isOffscreen(s,l,u,c)}},ie.prototype.approximateTileDistance=function(t,e,r,n,i){var o=i?1:n/this.pitchfactor,a=t.lastSegmentViewportDistance*r;return t.prevTileDistance+a+(o-1)*a*Math.abs(Math.sin(e))},ie.prototype.placeCollisionCircles=function(e,r,n,i,o,a,s,l,u,c,p,h,f){var d=[],m=this.projectAnchor(u,o.anchorX,o.anchorY),g=l/24,y=o.lineOffsetX*l,v=o.lineOffsetY*l,_=new t.Point(o.anchorX,o.anchorY),x=Kt(g,s,y,v,!1,Zt(_,c).point,_,o,a,c,{},!0),b=!1,w=!1,E=!0,T=m.perspectiveRatio*i,S=1/(i*n),C=0,A=0;x&&(C=this.approximateTileDistance(x.first.tileDistance,x.first.angle,S,m.cameraDistance,h),A=this.approximateTileDistance(x.last.tileDistance,x.last.angle,S,m.cameraDistance,h));for(var I=0;I<e.length;I+=5){var D=e[I],k=e[I+1],M=e[I+2],P=e[I+3];if(!x||P<-C||P>A)oe(e,I,!1);else{var z=this.projectPoint(u,D,k),L=M*T;if(d.length>0){var O=z.x-d[d.length-4],R=z.y-d[d.length-3];if(L*L*2>O*O+R*R&&I+8<e.length){var B=e[I+8];if(B>-C&&B<A){oe(e,I,!1);continue}}}var F=I/5;d.push(z.x,z.y,L,F),oe(e,I,!0);var N=z.x-L,U=z.y-L,V=z.x+L,j=z.y+L;if(E=E&&this.isOffscreen(N,U,V,j),w=w||this.isInsideGrid(N,U,V,j),!r&&this.grid.hitTestCircle(z.x,z.y,L,f)){if(!p)return{circles:[],offscreen:!1};b=!0}}}return{circles:b||!w?[]:d,offscreen:E}},ie.prototype.queryRenderedSymbols=function(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};for(var r=[],n=1/0,i=1/0,o=-1/0,a=-1/0,s=0,l=e;s<l.length;s+=1){var u=l[s],c=new t.Point(u.x+100,u.y+100);n=Math.min(n,c.x),i=Math.min(i,c.y),o=Math.max(o,c.x),a=Math.max(a,c.y),r.push(c)}for(var p={},h={},f=0,d=this.grid.query(n,i,o,a).concat(this.ignoredGrid.query(n,i,o,a));f<d.length;f+=1){var m=d[f],g=m.key;if(void 0===p[g.bucketInstanceId]&&(p[g.bucketInstanceId]={}),!p[g.bucketInstanceId][g.featureIndex]){var y=[new t.Point(m.x1,m.y1),new t.Point(m.x2,m.y1),new t.Point(m.x2,m.y2),new t.Point(m.x1,m.y2)];t.polygonIntersectsPolygon(r,y)&&(p[g.bucketInstanceId][g.featureIndex]=!0,void 0===h[g.bucketInstanceId]&&(h[g.bucketInstanceId]=[]),h[g.bucketInstanceId].push(g.featureIndex))}}return h},ie.prototype.insertCollisionBox=function(t,e,r,n,i){var o={bucketInstanceId:r,featureIndex:n,collisionGroupID:i};(e?this.ignoredGrid:this.grid).insert(o,t[0],t[1],t[2],t[3])},ie.prototype.insertCollisionCircles=function(t,e,r,n,i){for(var o=e?this.ignoredGrid:this.grid,a={bucketInstanceId:r,featureIndex:n,collisionGroupID:i},s=0;s<t.length;
65s+=4)o.insertCircle(a,t[s],t[s+1],t[s+2])},ie.prototype.projectAnchor=function(t,e,r){var n=[e,r,0,1];return ne(n,n,t),{perspectiveRatio:.5+this.transform.cameraToCenterDistance/n[3]*.5,cameraDistance:n[3]}},ie.prototype.projectPoint=function(e,r,n){var i=[r,n,0,1];return ne(i,i,e),new t.Point((i[0]/i[3]+1)/2*this.transform.width+100,(-i[1]/i[3]+1)/2*this.transform.height+100)},ie.prototype.projectAndGetPerspectiveRatio=function(e,r,n){var i=[r,n,0,1];return ne(i,i,e),{point:new t.Point((i[0]/i[3]+1)/2*this.transform.width+100,(-i[1]/i[3]+1)/2*this.transform.height+100),perspectiveRatio:.5+this.transform.cameraToCenterDistance/i[3]*.5}},ie.prototype.isOffscreen=function(t,e,r,n){return r<100||t>=this.screenRightBoundary||n<100||e>this.screenBottomBoundary},ie.prototype.isInsideGrid=function(t,e,r,n){return r>=0&&t<this.gridRightBoundary&&n>=0&&e<this.gridBottomBoundary};var se=function(t,e,r,n){this.opacity=t?Math.max(0,Math.min(1,t.opacity+(t.placed?e:-e))):n&&r?1:0,this.placed=r};se.prototype.isHidden=function(){return 0===this.opacity&&!this.placed};var le=function(t,e,r,n,i){this.text=new se(t?t.text:null,e,r,i),this.icon=new se(t?t.icon:null,e,n,i)};le.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var ue=function(t,e,r){this.text=t,this.icon=e,this.skipFade=r},ce=function(t){this.crossSourceCollisions=t,this.maxGroupID=0,this.collisionGroups={}};ce.prototype.get=function(t){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[t]){var e=++this.maxGroupID;this.collisionGroups[t]={ID:e,predicate:function(t){return t.collisionGroupID===e}}}return this.collisionGroups[t]};var pe=function(t,e,r){this.transform=t.clone(),this.collisionIndex=new ie(this.transform),this.placements={},this.opacities={},this.stale=!1,this.commitTime=0,this.fadeDuration=e,this.retainedQueryData={},this.collisionGroups=new ce(r)};function he(t,e,r){t.emplaceBack(e?1:0,r?1:0),t.emplaceBack(e?1:0,r?1:0),t.emplaceBack(e?1:0,r?1:0),t.emplaceBack(e?1:0,r?1:0)}pe.prototype.placeLayerTile=function(e,r,n,i){var o=r.getBucket(e),a=r.latestFeatureIndex;if(o&&a&&e.id===o.layerIds[0]){var s=r.collisionBoxArray,l=o.layers[0].layout,u=Math.pow(2,this.transform.zoom-r.tileID.overscaledZ),c=r.tileSize/t.EXTENT,p=this.transform.calculatePosMatrix(r.tileID.toUnwrapped()),h=Gt(p,"map"===l.get("text-pitch-alignment"),"map"===l.get("text-rotation-alignment"),this.transform,ae(r,1,this.transform.zoom)),f=Gt(p,"map"===l.get("icon-pitch-alignment"),"map"===l.get("icon-rotation-alignment"),this.transform,ae(r,1,this.transform.zoom));this.retainedQueryData[o.bucketInstanceId]=new function(t,e,r,n,i){this.bucketInstanceId=t,this.featureIndex=e,this.sourceLayerIndex=r,this.bucketIndex=n,this.tileID=i}(o.bucketInstanceId,a,o.sourceLayerIndex,o.index,r.tileID),this.placeLayerBucket(o,p,h,f,u,c,n,r.holdingForFade(),i,s)}},pe.prototype.placeLayerBucket=function(e,r,n,i,o,a,s,l,u,c){var p=e.layers[0].layout,h=t.evaluateSizeForZoom(e.textSizeData,this.transform.zoom,t.properties.layout.properties["text-size"]),f=p.get("text-optional"),d=p.get("icon-optional"),m=p.get("text-allow-overlap"),g=p.get("icon-allow-overlap"),y=m&&(g||!e.hasIconData()||d),v=g&&(m||!e.hasTextData()||f),_=this.collisionGroups.get(e.sourceID);!e.collisionArrays&&c&&e.deserializeCollisionBoxes(c);for(var x=0;x<e.symbolInstances.length;x++){var b=e.symbolInstances.get(x);if(!u[b.crossTileID]){if(l){this.placements[b.crossTileID]=new ue(!1,!1,!1);continue}var w=!1,E=!1,T=!0,S=null,C=null,A=null,I=0,D=0,k=e.collisionArrays[x];
65k.textFeatureIndex&&(I=k.textFeatureIndex),k.textBox&&(w=(S=this.collisionIndex.placeCollisionBox(k.textBox,p.get("text-allow-overlap"),a,r,_.predicate)).box.length>0,T=T&&S.offscreen);var M=k.textCircles;if(M){var P=e.text.placedSymbolArray.get(b.horizontalPlacedTextSymbolIndex),z=t.evaluateSizeForFeature(e.textSizeData,h,P);C=this.collisionIndex.placeCollisionCircles(M,p.get("text-allow-overlap"),o,a,P,e.lineVertexArray,e.glyphOffsetArray,z,r,n,s,"map"===p.get("text-pitch-alignment"),_.predicate),w=p.get("text-allow-overlap")||C.circles.length>0,T=T&&C.offscreen}k.iconFeatureIndex&&(D=k.iconFeatureIndex),k.iconBox&&(E=(A=this.collisionIndex.placeCollisionBox(k.iconBox,p.get("icon-allow-overlap"),a,r,_.predicate)).box.length>0,T=T&&A.offscreen);var L=f||0===b.numGlyphVertices&&0===b.numVerticalGlyphVertices,O=d||0===b.numIconVertices;L||O?O?L||(E=E&&w):w=E&&w:E=w=E&&w,w&&S&&this.collisionIndex.insertCollisionBox(S.box,p.get("text-ignore-placement"),e.bucketInstanceId,I,_.ID),E&&A&&this.collisionIndex.insertCollisionBox(A.box,p.get("icon-ignore-placement"),e.bucketInstanceId,D,_.ID),w&&C&&this.collisionIndex.insertCollisionCircles(C.circles,p.get("text-ignore-placement"),e.bucketInstanceId,I,_.ID),this.placements[b.crossTileID]=new ue(w||y,E||v,T||e.justReloaded),u[b.crossTileID]=!0}}e.justReloaded=!1},pe.prototype.commit=function(t,e){this.commitTime=e;var r=!1,n=t&&0!==this.fadeDuration?(this.commitTime-t.commitTime)/this.fadeDuration:1,i=t?t.opacities:{};for(var o in this.placements){var a=this.placements[o],s=i[o];s?(this.opacities[o]=new le(s,n,a.text,a.icon),r=r||a.text!==s.text.placed||a.icon!==s.icon.placed):(this.opacities[o]=new le(null,n,a.text,a.icon,a.skipFade),r=r||a.text||a.icon)}for(var l in i){var u=i[l];if(!this.opacities[l]){var c=new le(u,n,!1,!1);c.isHidden()||(this.opacities[l]=c,r=r||u.text.placed||u.icon.placed)}}r?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)},pe.prototype.updateLayerOpacities=function(t,e){for(var r={},n=0,i=e;n<i.length;n+=1){var o=i[n],a=o.getBucket(t);a&&o.latestFeatureIndex&&t.id===a.layerIds[0]&&this.updateBucketOpacities(a,r,o.collisionBoxArray)}},pe.prototype.updateBucketOpacities=function(t,e,r){t.hasTextData()&&t.text.opacityVertexArray.clear(),t.hasIconData()&&t.icon.opacityVertexArray.clear(),t.hasCollisionBoxData()&&t.collisionBox.collisionVertexArray.clear(),t.hasCollisionCircleData()&&t.collisionCircle.collisionVertexArray.clear();var n=t.layers[0].layout,i=new le(null,0,!1,!1,!0),o=n.get("text-allow-overlap"),a=n.get("icon-allow-overlap"),s=new le(null,0,o&&(a||!t.hasIconData()||n.get("icon-optional")),a&&(o||!t.hasTextData()||n.get("text-optional")),!0);!t.collisionArrays&&r&&(t.hasCollisionBoxData()||t.hasCollisionCircleData())&&t.deserializeCollisionBoxes(r);for(var l=0;l<t.symbolInstances.length;l++){var u=t.symbolInstances.get(l),c=e[u.crossTileID],p=this.opacities[u.crossTileID];c?p=i:p||(p=s,this.opacities[u.crossTileID]=p),e[u.crossTileID]=!0;var h=u.numGlyphVertices>0||u.numVerticalGlyphVertices>0,f=u.numIconVertices>0;if(h){for(var d=xe(p.text),m=(u.numGlyphVertices+u.numVerticalGlyphVertices)/4,g=0;g<m;g++)t.text.opacityVertexArray.emplaceBack(d);t.text.placedSymbolArray.get(u.horizontalPlacedTextSymbolIndex).hidden=p.text.isHidden(),u.verticalPlacedTextSymbolIndex>=0&&(t.text.placedSymbolArray.get(u.verticalPlacedTextSymbolIndex).hidden=p.text.isHidden())}if(f){for(var y=xe(p.icon),v=0;v<u.numIconVertices/4;v++)t.icon.opacityVertexArray.emplaceBack(y);t.icon.placedSymbolArray.get(l).hidden=p.icon.isHidden()}if(t.hasCollisionBoxData()||t.hasCollisionCircleData()){var _=t.collisionArrays[l];if(_){_.textBox&&he(t.collisionBox.collisionVertexArray,p.text.placed,!1),_.iconBox&&he(t.collisionBox.collisionVertexArray,p.icon.placed,!1);var x=_.textCircles;if(x&&t.hasCollisionCircleData())for(var b=0;b<x.length;b+=5){var w=c||0===x[b+4];he(t.collisionCircle.collisionVertexArray,p.text.placed,w)}}}}t.sortFeatures(this.transform.angle),this.retainedQueryData[t.bucketInstanceId]&&(this.retainedQueryData[t.bucketInstanceId].featureSortOrder=t.featureSortOrder),t.hasTextData()&&t.text.opacityVertexBuffer&&t.text.opacityVertexBuffer.updateData(t.text.opacityVertexArray),t.hasIconData()&&t.icon.opacityVertexBuffer&&t.icon.opacityVertexBuffer.updateData(t.icon.opacityVertexArray),t.hasCollisionBoxData()&&t.collisionBox.collisionVertexBuffer&&t.collisionBox.collisionVertexBuffer.updateData(t.collisionBox.collisionVertexArray),t.hasCollisionCircleData()&&t.collisionCircle.collisionVertexBuffer&&t.collisionCircle.collisionVertexBuffer.updateData(t.collisionCircle.collisionVertexArray)},pe.prototype.symbolFadeChange=function(t){return 0===this.fadeDuration?1:(t-this.commitTime)/this.fadeDuration},pe.prototype.hasTransitions=function(t){return this.stale||t-this.lastPlacementChangeTime<this.fadeDuration},pe.prototype.stillRecent=function(t){return this.commitTime+this.fadeDuration>t},pe.prototype.setStale=function(){this.stale=!0};var fe=Math.pow(2,25),de=Math.pow(2,24),me=Math.pow(2,17),ge=Math.pow(2,16),ye=Math.pow(2,9),ve=Math.pow(2,8),_e=Math.pow(2,1);function xe(t){if(0===t.opacity&&!t.placed)return 0;if(1===t.opacity&&t.placed)return 4294967295;var e=t.placed?1:0,r=Math.floor(127*t.opacity);return r*fe+e*de+r*me+e*ge+r*ye+e*ve+r*_e+e}var be=function(){this._currentTileIndex=0,this._seenCrossTileIDs={}};be.prototype.continuePlacement=function(t,e,r,n,i){for(;this._currentTileIndex<t.length;){var o=t[this._currentTileIndex];if(e.placeLayerTile(n,o,r,this._seenCrossTileIDs),this._currentTileIndex++,i())return!0}};var we=function(t,e,r,n,i,o){this.placement=new pe(t,i,o),this._currentPlacementIndex=e.length-1,this._forceFullPlacement=r,this._showCollisionBoxes=n,this._done=!1};we.prototype.isDone=function(){return this._done},we.prototype.continuePlacement=function(e,r,n){for(var i=this,o=t.browser.now(),a=function(){var e=t.browser.now()-o;return!i._forceFullPlacement&&e>2};this._currentPlacementIndex>=0;){var s=r[e[this._currentPlacementIndex]],l=this.placement.collisionIndex.transform.zoom;if("symbol"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(this._inProgressLayer||(this._inProgressLayer=new be),this._inProgressLayer.continuePlacement(n[s.source],this.placement,this._showCollisionBoxes,s,a))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},we.prototype.commit=function(t,e){return this.placement.commit(t,e),this.placement};var Ee=512/t.EXTENT/2,Te=function(t,e,r){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var n=0;n<e.length;n++){var i=e.get(n),o=i.key;
vendor: 5,952 bytes, line 65
65this.indexedSymbolInstances[o]||(this.indexedSymbolInstances[o]=[]),this.indexedSymbolInstances[o].push({crossTileID:i.crossTileID,coord:this.getScaledCoordinates(i,t)})}};Te.prototype.getScaledCoordinates=function(e,r){var n=r.canonical.z-this.tileID.canonical.z,i=Ee/Math.pow(2,n);return{x:Math.floor((r.canonical.x*t.EXTENT+e.anchorX)*i),y:Math.floor((r.canonical.y*t.EXTENT+e.anchorY)*i)}},Te.prototype.findMatches=function(t,e,r){for(var n=this.tileID.canonical.z<e.canonical.z?1:Math.pow(2,this.tileID.canonical.z-e.canonical.z),i=0;i<t.length;i++){var o=t.get(i);if(!o.crossTileID){var a=this.indexedSymbolInstances[o.key];if(a)for(var s=this.getScaledCoordinates(o,e),l=0,u=a;l<u.length;l+=1){var c=u[l];if(Math.abs(c.coord.x-s.x)<=n&&Math.abs(c.coord.y-s.y)<=n&&!r[c.crossTileID]){r[c.crossTileID]=!0,o.crossTileID=c.crossTileID;break}}}}};var Se=function(){this.maxCrossTileID=0};Se.prototype.generate=function(){return++this.maxCrossTileID};var Ce=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};Ce.prototype.handleWrapJump=function(t){var e=Math.round((t-this.lng)/360);if(0!==e)for(var r in this.indexes){var n=this.indexes[r],i={};for(var o in n){var a=n[o];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+e),i[a.tileID.key]=a}this.indexes[r]=i}this.lng=t},Ce.prototype.addBucket=function(t,e,r){if(this.indexes[t.overscaledZ]&&this.indexes[t.overscaledZ][t.key]){if(this.indexes[t.overscaledZ][t.key].bucketInstanceId===e.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(t.overscaledZ,this.indexes[t.overscaledZ][t.key])}for(var n=0;n<e.symbolInstances.length;n++)e.symbolInstances.get(n).crossTileID=0;this.usedCrossTileIDs[t.overscaledZ]||(this.usedCrossTileIDs[t.overscaledZ]={});var i=this.usedCrossTileIDs[t.overscaledZ];for(var o in this.indexes){var a=this.indexes[o];if(Number(o)>t.overscaledZ)for(var s in a){var l=a[s];l.tileID.isChildOf(t)&&l.findMatches(e.symbolInstances,t,i)}else{var u=a[t.scaledTo(Number(o)).key];u&&u.findMatches(e.symbolInstances,t,i)}}for(var c=0;c<e.symbolInstances.length;c++){var p=e.symbolInstances.get(c);p.crossTileID||(p.crossTileID=r.generate(),i[p.crossTileID]=!0)}return void 0===this.indexes[t.overscaledZ]&&(this.indexes[t.overscaledZ]={}),this.indexes[t.overscaledZ][t.key]=new Te(t,e.symbolInstances,e.bucketInstanceId),!0},Ce.prototype.removeBucketCrossTileIDs=function(t,e){for(var r in e.indexedSymbolInstances)for(var n=0,i=e.indexedSymbolInstances[r];n<i.length;n+=1){var o=i[n];delete this.usedCrossTileIDs[t][o.crossTileID]}},Ce.prototype.removeStaleBuckets=function(t){var e=!1;for(var r in this.indexes){var n=this.indexes[r];for(var i in n)t[n[i].bucketInstanceId]||(this.removeBucketCrossTileIDs(r,n[i]),delete n[i],e=!0)}return e};var Ae=function(){this.layerIndexes={},this.crossTileIDs=new Se,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};Ae.prototype.addLayer=function(t,e,r){var n=this.layerIndexes[t.id];void 0===n&&(n=this.layerIndexes[t.id]=new Ce);var i=!1,o={};n.handleWrapJump(r);for(var a=0,s=e;a<s.length;a+=1){var l=s[a],u=l.getBucket(t);u&&t.id===u.layerIds[0]&&(u.bucketInstanceId||(u.bucketInstanceId=++this.maxBucketInstanceId),n.addBucket(l.tileID,u,this.crossTileIDs)&&(i=!0),o[u.bucketInstanceId]=!0)}return n.removeStaleBuckets(o)&&(i=!0),i},Ae.prototype.pruneUnusedLayers=function(t){var e={};for(var r in t.forEach(function(t){e[t]=!0}),this.layerIndexes)e[r]||delete this.layerIndexes[r]};var Ie=function(e,r){return t.emitValidationErrors(e,r&&r.filter(function(t){return"source.canvas"!==t.identifier}))},De=t.pick(Ot,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),ke=t.pick(Ot,["setCenter","setZoom","setBearing","setPitch"]),Me=function(e){function r(n,i){var o=this;void 0===i&&(i={}),e.call(this),this.map=n,this.dispatcher=new w((Mt||(Mt=new kt),Mt),this),this.imageManager=new p,this.glyphManager=new y(n._transformRequest,i.localIdeographFontFamily),this.lineAtlas=new b(256,512),this.crossTileSymbolIndex=new Ae,this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.ZoomHistory,this._loaded=!1,this._resetUpdates(),this.dispatcher.broadcast("setReferrer",t.getReferrer());var a=this;this._rtlTextPluginCallback=r.registerForPluginAvailability(function(t){for(var e in a.dispatcher.broadcast("loadRTLTextPlugin",t.pluginURL,t.completionCallback),a.sourceCaches)a.sourceCaches[e].reload()}),this.on("data",function(t){if("source"===t.dataType&&"metadata"===t.sourceDataType){var e=o.sourceCaches[t.sourceId];if(e){var r=e.getSource();if(r&&r.vectorLayerIds)for(var n in o._layers){var i=o._layers[n];i.source===r.id&&o._validateLayer(i)}}}})}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.loadURL=function(e,r){var n=this;void 0===r&&(r={}),this.fire(new t.Event("dataloading",{dataType:"style"}));var i="boolean"==typeof r.validate?r.validate:!t.isMapboxURL(e);e=t.normalizeStyleURL(e,r.accessToken);var o=this.map._transformRequest(e,t.ResourceType.Style);this._request=t.getJSON(o,function(e,r){n._request=null,e?n.fire(new t.ErrorEvent(e)):r&&n._load(r,i)})},r.prototype.loadJSON=function(e,r){var n=this;void 0===r&&(r={}),this.fire(new t.Event("dataloading",{dataType:"style"})),this._request=t.browser.frame(function(){n._request=null,n._load(e,!1!==r.validate)})},r.prototype._load=function(e,r){var n=this;if(!r||!Ie(this,t.validateStyle(e))){for(var i in this._loaded=!0,this.stylesheet=e,e.sources)this.addSource(i,e.sources[i],{validate:!1});e.sprite?this._spriteRequest=function(e,r,n){var i,o,a,s=t.browser.devicePixelRatio>1?"@2x":"",l=t.getJSON(r(t.normalizeSpriteURL(e,s,".json"),t.ResourceType.SpriteJSON),function(t,e){l=null,a||(a=t,i=e,c())}),u=t.getImage(r(t.normalizeSpriteURL(e,s,".png"),t.ResourceType.SpriteImage),function(t,e){u=null,a||(a=t,o=e,c())});function c(){if(a)n(a);
65else if(i&&o){var e=t.browser.getImageData(o),r={};for(var s in i){var l=i[s],u=l.width,c=l.height,p=l.x,h=l.y,f=l.sdf,d=l.pixelRatio,m=new t.RGBAImage({width:u,height:c});t.RGBAImage.copy(e,m,{x:p,y:h},{x:0,y:0},{width:u,height:c}),r[s]={data:m,pixelRatio:d,sdf:f}}n(null,r)}}return{cancel:function(){l&&(l.cancel(),l=null),u&&(u.cancel(),u=null)}}}(e.sprite,this.map._transformRequest,function(e,r){if(n._spriteRequest=null,e)n.fire(new t.ErrorEvent(e));else if(r)for(var i in r)n.imageManager.addImage(i,r[i]);n.imageManager.setLoaded(!0),n.fire(new t.Event("data",{dataType:"style"}))}):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var o=Lt(this.stylesheet.layers);this._order=o.map(function(t){return t.id}),this._layers={};for(var a=0,s=o;a<s.length;a+=1){var l=s[a];(l=t.createStyleLayer(l)).setEventedParent(this,{layer:{id:l.id}}),this._layers[l.id]=l}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new x(this.stylesheet.light),this.fire(new t.Event("data",{dataType:"style"})),this.fire(new t.Event("style.load"))}},r.prototype._validateLayer=function(e){var r=this.sourceCaches[e.source];if(r){var n=e.sourceLayer;if(n){var i=r.getSource();
vendor: 7,857 bytes, line 65
65("geojson"===i.type||i.vectorLayerIds&&-1===i.vectorLayerIds.indexOf(n))&&this.fire(new t.ErrorEvent(new Error('Source layer "'+n+'" does not exist on source "'+i.id+'" as specified by style layer "'+e.id+'"')))}}},r.prototype.loaded=function(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var t in this.sourceCaches)if(!this.sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()},r.prototype._serializeLayers=function(t){for(var e=[],r=0,n=t;r<n.length;r+=1){var i=n[r],o=this._layers[i];"custom"!==o.type&&e.push(o.serialize())}return e},r.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var t in this.sourceCaches)if(this.sourceCaches[t].hasTransition())return!0;for(var e in this._layers)if(this._layers[e].hasTransition())return!0;return!1},r.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},r.prototype.update=function(e){if(this._loaded){var r=this._changed;if(this._changed){var n=Object.keys(this._updatedLayers),i=Object.keys(this._removedLayers);for(var o in(n.length||i.length)&&this._updateWorkerLayers(n,i),this._updatedSources){var a=this._updatedSources[o];"reload"===a?this._reloadSource(o):"clear"===a&&this._clearSource(o)}for(var s in this._updatedPaintProps)this._layers[s].updateTransitions(e);this.light.updateTransitions(e),this._resetUpdates()}for(var l in this.sourceCaches)this.sourceCaches[l].used=!1;for(var u=0,c=this._order;u<c.length;u+=1){var p=c[u],h=this._layers[p];h.recalculate(e),!h.isHidden(e.zoom)&&h.source&&(this.sourceCaches[h.source].used=!0)}this.light.recalculate(e),this.z=e.zoom,r&&this.fire(new t.Event("data",{dataType:"style"}))}},r.prototype._updateWorkerLayers=function(t,e){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(t),removedIds:e})},r.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={}},r.prototype.setState=function(e){var r=this;if(this._checkLoaded(),Ie(this,t.validateStyle(e)))return!1;(e=t.clone(e)).layers=Lt(e.layers);var n=function(e,r){if(!e)return[{command:Ot.setStyle,args:[r]}];var n=[];try{if(!t.isEqual(e.version,r.version))return[{command:Ot.setStyle,args:[r]}];t.isEqual(e.center,r.center)||n.push({command:Ot.setCenter,args:[r.center]}),t.isEqual(e.zoom,r.zoom)||n.push({command:Ot.setZoom,args:[r.zoom]}),t.isEqual(e.bearing,r.bearing)||n.push({command:Ot.setBearing,args:[r.bearing]}),t.isEqual(e.pitch,r.pitch)||n.push({command:Ot.setPitch,args:[r.pitch]}),t.isEqual(e.sprite,r.sprite)||n.push({command:Ot.setSprite,args:[r.sprite]}),t.isEqual(e.glyphs,r.glyphs)||n.push({command:Ot.setGlyphs,args:[r.glyphs]}),t.isEqual(e.transition,r.transition)||n.push({command:Ot.setTransition,args:[r.transition]}),t.isEqual(e.light,r.light)||n.push({command:Ot.setLight,args:[r.light]});var i={},o=[];!function(e,r,n,i){var o;for(o in r=r||{},e=e||{})e.hasOwnProperty(o)&&(r.hasOwnProperty(o)||Bt(o,n,i));for(o in r)r.hasOwnProperty(o)&&(e.hasOwnProperty(o)?t.isEqual(e[o],r[o])||("geojson"===e[o].type&&"geojson"===r[o].type&&Nt(e,r,o)?n.push({command:Ot.setGeoJSONSourceData,args:[o,r[o].data]}):Ft(o,r,n,i)):Rt(o,r,n))}(e.sources,r.sources,o,i);var a=[];e.layers&&e.layers.forEach(function(t){i[t.source]?n.push({command:Ot.removeLayer,args:[t.id]}):a.push(t)}),n=n.concat(o),function(e,r,n){r=r||[];var i,o,a,s,l,u,c,p=(e=e||[]).map(Vt),h=r.map(Vt),f=e.reduce(jt,{}),d=r.reduce(jt,{}),m=p.slice(),g=Object.create(null);for(i=0,o=0;i<p.length;i++)a=p[i],d.hasOwnProperty(a)?o++:(n.push({command:Ot.removeLayer,args:[a]}),m.splice(m.indexOf(a,o),1));for(i=0,o=0;i<h.length;i++)a=h[h.length-1-i],m[m.length-1-i]!==a&&(f.hasOwnProperty(a)?(n.push({command:Ot.removeLayer,args:[a]}),m.splice(m.lastIndexOf(a,m.length-o),1)):o++,u=m[m.length-i],n.push({command:Ot.addLayer,args:[d[a],u]}),m.splice(m.length-i,0,a),g[a]=!0);for(i=0;i<h.length;i++)if(s=f[a=h[i]],l=d[a],!g[a]&&!t.isEqual(s,l))if(t.isEqual(s.source,l.source)&&t.isEqual(s["source-layer"],l["source-layer"])&&t.isEqual(s.type,l.type)){for(c in Ut(s.layout,l.layout,n,a,null,Ot.setLayoutProperty),Ut(s.paint,l.paint,n,a,null,Ot.setPaintProperty),t.isEqual(s.filter,l.filter)||n.push({command:Ot.setFilter,args:[a,l.filter]}),t.isEqual(s.minzoom,l.minzoom)&&t.isEqual(s.maxzoom,l.maxzoom)||n.push({command:Ot.setLayerZoomRange,args:[a,l.minzoom,l.maxzoom]}),s)s.hasOwnProperty(c)&&"layout"!==c&&"paint"!==c&&"filter"!==c&&"metadata"!==c&&"minzoom"!==c&&"maxzoom"!==c&&(0===c.indexOf("paint.")?Ut(s[c],l[c],n,a,c.slice(6),Ot.setPaintProperty):t.isEqual(s[c],l[c])||n.push({command:Ot.setLayerProperty,args:[a,c,l[c]]}));for(c in l)l.hasOwnProperty(c)&&!s.hasOwnProperty(c)&&"layout"!==c&&"paint"!==c&&"filter"!==c&&"metadata"!==c&&"minzoom"!==c&&"maxzoom"!==c&&(0===c.indexOf("paint.")?Ut(s[c],l[c],n,a,c.slice(6),Ot.setPaintProperty):t.isEqual(s[c],l[c])||n.push({command:Ot.setLayerProperty,args:[a,c,l[c]]}))}else n.push({command:Ot.removeLayer,args:[a]}),u=m[m.lastIndexOf(a)+1],n.push({command:Ot.addLayer,args:[l,u]})}(a,r.layers,n)}catch(t){n=[{command:Ot.setStyle,args:[r]}]}return n}(this.serialize(),e).filter(function(t){return!(t.command in ke)});if(0===n.length)return!1;var i=n.filter(function(t){return!(t.command in De)});if(i.length>0)throw new Error("Unimplemented: "+i.map(function(t){return t.command}).join(", ")+".");return n.forEach(function(t){"setTransition"!==t.command&&r[t.command].apply(r,t.args)}),this.stylesheet=e,!0},r.prototype.addImage=function(e,r){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(e,r),this.fire(new t.Event("data",{dataType:"style"}))},r.prototype.getImage=function(t){return this.imageManager.getImage(t)},r.prototype.removeImage=function(e){if(!this.getImage(e))return this.fire(new t.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(e),this.fire(new t.Event("data",{dataType:"style"}))},r.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},r.prototype.addSource=function(e,r,n){var i=this;if(void 0===n&&(n={}),this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error("There is already a source with this ID");if(!r.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(r).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(r.type)>=0&&this._validate(t.validateStyle.source,"sources."+e,r,null,n))){this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);var o=this.sourceCaches[e]=new Ct(e,r,this.dispatcher);o.style=this,o.setEventedParent(this,function(){return{isSourceLoaded:i.loaded(),source:o.serialize(),sourceId:e}}),o.onAdd(this.map),this._changed=!0}},r.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error("There is no source with this ID");for(var r in this._layers)if(this._layers[r].source===e)return this.fire(new t.ErrorEvent(new Error('Source "'+e+'" cannot be removed while layer "'+r+'" is using it.')));var n=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],n.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),n.setEventedParent(null),n.clearTiles(),n.onRemove&&n.onRemove(this.map),this._changed=!0},r.prototype.setGeoJSONSourceData=function(t,e){this._checkLoaded(),this.sourceCaches[t].getSource().setData(e),this._changed=!0},r.prototype.getSource=function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()},r.prototype.addLayer=function(e,r,n){void 0===n&&(n={}),this._checkLoaded();var i=e.id;if(this.getLayer(i))this.fire(new t.ErrorEvent(new Error('Layer with i
65d "'+i+'" already exists on this map')));else{var o;if("custom"===e.type){if(Ie(this,t.validateCustomStyleLayer(e)))return;o=t.createStyleLayer(e)}else{if("object"==typeof e.source&&(this.addSource(i,e.source),e=t.clone(e),e=t.extend(e,{source:i})),this._validate(t.validateStyle.layer,"layers."+i,e,{arrayIndex:-1},n))return;o=t.createStyleLayer(e),this._validateLayer(o),o.setEventedParent(this,{layer:{id:i}})}var a=r?this._order.indexOf(r):this._order.length;if(r&&-1===a)this.fire(new t.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.')));else{if(this._order.splice(a,0,i),this._layerOrderChanged=!0,this._layers[i]=o,this._removedLayers[i]&&o.source&&"custom"!==o.type){var s=this._removedLayers[i];delete this._removedLayers[i],s.type!==o.type?this._updatedSources[o.source]="clear":(this._updatedSources[o.source]="reload",this.sourceCaches[o.source].pause())}this._updateLayer(o),o.onAdd&&o.onAdd(this.map)}}},r.prototype.moveLayer=function(e,r){if(this._checkLoaded(),this._changed=!0,this._layers[e]){if(e!==r){var n=this._order.indexOf(e);this._order.splice(n,1);var i=r?this._order.indexOf(r):this._order.length;
65r&&-1===i?this.fire(new t.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.'))):(this._order.splice(i,0,e),this._layerOrderChanged=!0)}}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be moved.")))},r.prototype.removeLayer=function(e){this._checkLoaded();var r=this._layers[e];if(r){r.setEventedParent(null);var n=this._order.indexOf(e);this._order.splice(n,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=r,delete this._layers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],r.onRemove&&r.onRemove(this.map)}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be removed.")))},r.prototype.getLayer=function(t){return this._layers[t]},r.prototype.setLayerZoomRange=function(e,r,n){this._checkLoaded();var i=this.getLayer(e);i?i.minzoom===r&&i.maxzoom===n||(null!=r&&(i.minzoom=r),null!=n&&(i.maxzoom=n),this._updateLayer(i)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot have zoom extent.")))},r.prototype.setFilter=function(e,r,n){void 0===n&&(n={}),this._checkLoaded();var i=this.getLayer(e);if(i){if(!t.isEqual(i.filter,r))return null==r?(i.filter=void 0,void this._updateLayer(i)):void(this._validate(t.validateStyle.filter,"layers."+i.id+".filter",r,null,n)||(i.filter=t.clone(r),this._updateLayer(i)))}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be filtered.")))},r.prototype.getFilter=function(e){return t.clone(this.getLayer(e).filter)},r.prototype.setLayoutProperty=function(e,r,n,i){void 0===i&&(i={}),this._checkLoaded();var o=this.getLayer(e);o?t.isEqual(o.getLayoutProperty(r),n)||(o.setLayoutProperty(r,n,i),this._updateLayer(o)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getLayoutProperty=function(e,r){var n=this.getLayer(e);if(n)return n.getLayoutProperty(r);this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style.")))},r.prototype.setPaintProperty=function(e,r,n,i){void 0===i&&(i={}),this._checkLoaded();var o=this.getLayer(e);o?t.isEqual(o.getPaintProperty(r),n)||(o.setPaintProperty(r,n,i)&&this._updateLayer(o),this._changed=!0,this._updatedPaintProps[e]=!0):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getPaintProperty=function(t,e){return this.getLayer(t).getPaintProperty(e)},r.prototype.setFeatureState=function(e,r){this._checkLoaded();var n=e.source,i=e.sourceLayer,o=this.sourceCaches[n],a=parseInt(e.id,10);if(void 0!==o){var s=o.getSource().type;"geojson"===s&&i?this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==s||i?isNaN(a)||a<0?this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided and non-negative."))):o.setFeatureState(i,a,r):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},r.prototype.removeFeatureState=function(e,r){this._checkLoaded();var n=e.source,i=this.sourceCaches[n];if(void 0!==i){var o=i.getSource().type,a="vector"===o?e.sourceLayer:void 0,s=parseInt(e.id,10);"vector"!==o||a?e.id&&isNaN(s)||s<0?this.fire(new t.ErrorEvent(new Error("The feature id parameter must be non-negative."))):!r||e.id?i.removeFeatureState(a,s,r):this.fire(new t.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},r.prototype.getFeatureState=function(e){this._checkLoaded();var r=e.source,n=e.sourceLayer,i=this.sourceCaches[r],o=parseInt(e.id,10);if(void 0!==i)if("vector"!==i.getSource().type||n){if(!(isNaN(o)||o<0))return i.getFeatureState(n,o);this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided and non-negative.")))}else this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));else this.fire(new t.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},r.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},r.prototype.serialize=function(){return t.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:t.mapObject(this.sourceCaches,function(t){return t.serialize()}),layers:this._serializeLayers(this._order)},function(t){return void 0!==t})},r.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause()),this._changed=!0},r.prototype._flattenAndSortRenderedFeatures=function(t){for(var e=this,r=function(t){return"fill-extrusion"===e._layers[t].type},n={},i=[],o=this._order.length-1;o>=0;o--){var a=this._order[o];if(r(a)){n[a]=o;for(var s=0,l=t;s<l.length;s+=1){var u=l[s][a];if(u)for(var c=0,p=u;c<p.length;c+=1){var h=p[c];i.push(h)}}}}i.sort(function(t,e){return e.intersectionZ-t.intersectionZ});for(var f=[],d=this._order.length-1;d>=0;d--){var m=this._order[d];if(r(m))for(var g=i.length-1;g>=0;g--){var y=i[g].feature;if(n[y.layer.id]<d)break;f.push(y),i.pop()}else for(var v=0,_=t;v<_.length;v+=1){var x=_[v][m];if(x)for(var b=0,w=x;b<w.length;b+=1){var E=w[b];f.push(E.feature)}}}return f},r.prototype.queryRenderedFeatures=function(e,r,n){r&&r.filter&&this._val
vendor: 5,069 bytes, line 65
65idate(t.validateStyle.filter,"queryRenderedFeatures.filter",r.filter);var i={};if(r&&r.layers){if(!Array.isArray(r.layers))return this.fire(new t.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var o=0,a=r.layers;o<a.length;o+=1){var s=a[o],l=this._layers[s];if(!l)return this.fire(new t.ErrorEvent(new Error("The layer '"+s+"' does not exist in the map's style and cannot be queried for features."))),[];i[l.source]=!0}}var u=[];for(var c in this.sourceCaches)r.layers&&!i[c]||u.push(z(this.sourceCaches[c],this._layers,e,r,n));return this.placement&&u.push(function(t,e,r,n,i,o){for(var a={},s=i.queryRenderedSymbols(r),l=[],u=0,c=Object.keys(s).map(Number);u<c.length;u+=1){var p=c[u];l.push(o[p])}l.sort(L);for(var h=function(){var e=d[f],r=e.featureIndex.lookupSymbolFeatures(s[e.bucketInstanceId],e.bucketIndex,e.sourceLayerIndex,n.filter,n.layers,t);for(var i in r){var o=a[i]=a[i]||[],l=r[i];l.sort(function(t,r){var n=e.featureSortOrder;if(n){var i=n.indexOf(t.featureIndex);return n.indexOf(r.featureIndex)-i}return r.featureIndex-t.featureIndex});for(var u=0,c=l;u<c.length;u+=1){var p=c[u];o.push(p)}}},f=0,d=l;f<d.length;f+=1)h();var m=function(r){a[r].forEach(function(n){var i=n.feature,o=t[r],a=e[o.source].getFeatureState(i.layer["source-layer"],i.id);i.source=i.layer.source,i.layer["source-layer"]&&(i.sourceLayer=i.layer["source-layer"]),i.state=a})};for(var g in a)m(g);return a}(this._layers,this.sourceCaches,e,r,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(u)},r.prototype.querySourceFeatures=function(e,r){r&&r.filter&&this._validate(t.validateStyle.filter,"querySourceFeatures.filter",r.filter);var n=this.sourceCaches[e];return n?function(t,e){for(var r=t.getRenderableIds().map(function(e){return t.getTileByID(e)}),n=[],i={},o=0;o<r.length;o++){var a=r[o],s=a.tileID.canonical.key;i[s]||(i[s]=!0,a.querySourceFeatures(n,e))}return n}(n,r):[]},r.prototype.addSourceType=function(t,e,n){return r.getSourceType(t)?n(new Error('A source type called "'+t+'" already exists.')):(r.setSourceType(t,e),e.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:t,url:e.workerSourceURL},n):n(null,null))},r.prototype.getLight=function(){return this.light.getLight()},r.prototype.setLight=function(e,r){void 0===r&&(r={}),this._checkLoaded();var n=this.light.getLight(),i=!1;for(var o in e)if(!t.isEqual(e[o],n[o])){i=!0;break}if(i){var a={now:t.browser.now(),transition:t.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,r),this.light.updateTransitions(a)}},r.prototype._validate=function(e,r,n,i,o){return void 0===o&&(o={}),(!o||!1!==o.validate)&&Ie(this,e.call(t.validateStyle,t.extend({key:r,style:this.serialize(),value:n,styleSpec:t.styleSpec},i)))},r.prototype._remove=function(){for(var e in this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),t.evented.off("pluginAvailable",this._rtlTextPluginCallback),this.sourceCaches)this.sourceCaches[e].clearTiles();this.dispatcher.remove()},r.prototype._clearSource=function(t){this.sourceCaches[t].clearTiles()},r.prototype._reloadSource=function(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload()},r.prototype._updateSources=function(t){for(var e in this.sourceCaches)this.sourceCaches[e].update(t)},r.prototype._generateCollisionBoxes=function(){for(var t in this.sourceCaches)this._reloadSource(t)},r.prototype._updatePlacement=function(e,r,n,i){for(var o=!1,a=!1,s={},l=0,u=this._order;l<u.length;l+=1){var c=u[l],p=this._layers[c];if("symbol"===p.type){if(!s[p.source]){var h=this.sourceCaches[p.source];s[p.source]=h.getRenderableIds(!0).map(function(t){return h.getTileByID(t)}).sort(function(t,e){return e.tileID.overscaledZ-t.tileID.overscaledZ||(t.tileID.isLessThan(e.tileID)?-1:1)})}var f=this.crossTileSymbolIndex.addLayer(p,s[p.source],e.center.lng);o=o||f}}this.crossTileSymbolIndex.pruneUnusedLayers(this._order);var d=this._layerOrderChanged||0===n;if((d||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(t.browser.now()))&&(this.pauseablePlacement=new we(e,this._order,d,r,n,i),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,s),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(this.placement,t.browser.now()),a=!0),o&&this.pauseablePlacement.placement.setStale()),a||o)for(var m=0,g=this._order;m<g.length;m+=1){var y=g[m],v=this._layers[y];"symbol"===v.type&&this.placement.updateLayerOpacities(v,s[v.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(t.browser.now())},r.prototype._releaseSymbolFadeTiles=function(){for(var t in this.sourceCaches)this.sourceCaches[t].releaseSymbolFadeTiles()},r.prototype.getImages=function(t,e,r){this.imageManager.getImages(e.icons,r)},r.prototype.getGlyphs=function(t,e,r){this.glyphManager.getGlyphs(e.stacks,r)}
65,r.prototype.getResource=function(e,r,n){return t.makeRequest(r,n)},r}(t.Evented);Me.getSourceType=function(t){return k[t]},Me.setSourceType=function(t,e){k[t]=e},Me.registerForPluginAvailability=t.registerForPluginAvailability;var Pe=t.createLayout([{name:"a_pos",type:"Int16",components:2}]),ze=or("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}"),Le=or("uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Oe=or("uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),Re=or("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvarying vec3 v_data;void main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius
65/(radius+stroke_width));gl_FragColor=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvarying vec3 v_data;void main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,0,1);} else {gl_Position=u_matrix*vec4(circle_center,0,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/DEVICE_PIXEL_RATIO/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}"),Be=or("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Fe=or("#pragma mapbox: define highp float weight\nuniform highp float u_intensity;varying vec2 v_extrude;\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nuniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;const highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}"),Ne=or("uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),Ue=or("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=a_extrude*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),Ve=or("uniform float u_overscale_factor;varying float v_placed;varying float v_notUsed;varying float v_radius;varying vec2 v_extrude;varying vec2 v_extrude_scale;void main() {float alpha=0.5;vec4 color=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {color=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {color*=.2;}float extrude_scale_length=length(v_extrude_scale);float extrude_length=length(v_extrude)*extrude_scale_length;float stroke_width=15.0*extrude_scale_length/u_overscale_factor;float radius=v_radius*extrude_scale_length;float distance_to_edge=abs(extrude_length-radius);float opacity_t=smoothstep(-stroke_width,0.0,-distance_to_edge);gl_FragColor=opacity_t*color;}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;varying float v_radius;varying vec2 v_extrude;varying vec2 v_extrude_scale;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);highp float padding_factor=1.2;gl_Position.xy+=a_extrude*u_extrude_scale*padding_factor*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;v_radius=abs(a_extrude.y);v_extrude=a_extrude*padding_factor;v_extrude_scale=u_extrude_scale*u_camera_to_center_distance*collision_perspective_ratio;}"),je=or("uniform highp vec4 u_color;void main() {gl_FragColor=u_color;}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),qe=or("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),He=or("#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvarying vec2 v_pos;void main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),Ge=or("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec4 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),We=or("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec4 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileZoomRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),Ze=or("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);}"),Xe=or("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec4 u_scale;uniform float u_vertical_gradient;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel
65_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));}"),Ye=or("uniform sampler2D u_image;uniform float u_opacity;varying vec2 v_pos;void main() {gl_FragColor=texture2D(u_image,v_pos)*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),Ke=or("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;return (data.r+data.g*256.0+data.b*256.0*256.0)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),Je=or("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),Qe=or("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvarying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;void main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/DEVICE_PIXEL_RATIO)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define ANTIALIASING 1.0/DEVICE_PIXEL_RATIO/2.0\n#define scale 0.015873016\nattribute vec4 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_gl_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nvec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=a_pos_normal.xy;mediump vec2 normal=a_pos_normal.zw;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_gl_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),$e=or("#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nuniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp float v_lineprogress;void main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/DEVICE_PIXEL_RATIO)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define MAX_LINE_DISTANCE 32767.0\n#define ANTIALIASING 1.0/DEVICE_PIXEL_RATIO/2.0\n#define scale 0.015873016\nattribute vec4 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_gl_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nvec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;vec2 pos=a_pos_normal.xy;mediump vec2 normal=a_pos_normal.zw;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_gl_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),tr=or("uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec4 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileZoomRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/DEVICE_PIXEL_RATIO)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x,1.0);float x_b=mod(v_linesofar/pattern_size_b.x,1.0);float y_a=0.5+(v_normal.y*clamp(v_width2.s,0.0,(pattern_size_a.y+2.0)/2.0)/pattern_size_a.y);float y_b=0.5+(v_normal.y*clamp(v_width2.s,0.0,(pattern_size_b.y+2.0)/2.0)/pattern_size_b.y);vec2 pos_a=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,vec2(x_a,y_a));vec2 pos_b=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,vec2(x_b,y_b));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\n#define ANTIALIASING 1.0/DEVICE_PIXEL_RATIO/2.0\nattribute vec4 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_gl_units_to_pixels;uniform mediump float u_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=a_pos_normal.xy;mediump vec2 normal=a_pos_normal.zw;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_gl_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);}"),er=or("uniform sampler2D u_image;uniform float u_sdfgamma;
65uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/DEVICE_PIXEL_RATIO)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\n#define ANTIALIASING 1.0/DEVICE_PIXEL_RATIO/2.0\nattribute vec4 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_gl_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nvec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=a_pos_normal.xy;mediump vec2 normal=a_pos_normal.zw;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_gl_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}"),rr=or("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),nr=or("uniform sampler2D u_texture;\n#pragma mapbox: define lowp float opacity\nvarying vec2 v_tex;varying float v_fade_opacity;void main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;\n#pragma mapbox: define lowp float opacity\nuniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_gl_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;void main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size[0],a_size[1],u_size_t)/256.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size[0]/256.0;} else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {size=u_size;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_gl_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}"),ir=or("#define SDF_PX 8.0\n#define EDGE_GAMMA 0.105/DEVICE_PIXEL_RATIO\nuniform bool u_is_halo;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nuniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;void main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nuniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_gl_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;void main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size[0],a_size[1],u_size_t)/256.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size[0]/256.0;} else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {size=u_size;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_gl_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=vec2(tex.x,tex.y);v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}");
vendor: 4,671 bytes, line 65
65function or(t,e){var r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,n={};return{fragmentSource:t=t.replace(r,function(t,e,r,i,o){return n[o]=!0,"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nvarying "+r+" "+i+" "+o+";\n#else\nuniform "+r+" "+i+" u_"+o+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+o+"\n    "+r+" "+i+" "+o+" = u_"+o+";\n#endif\n"}),vertexSource:e=e.replace(r,function(t,e,r,i,o){var a="float"===i?"vec2":"vec4",s=o.match(/color/)?"color":a;return n[o]?"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float a_"+o+"_t;\nattribute "+r+" "+a+" a_"+o+";\nvarying "+r+" "+i+" "+o+";\n#else\nuniform "+r+" "+i+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n    "+o+" = a_"+o+";\n#else\n    "+r+" "+i+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n    "+o+" = unpack_mix_"+s+"(a_"+o+", a_"+o+"_t);\n#else\n    "+r+" "+i+" "+o+" = u_"+o+";\n#endif\n":"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float a_"+o+"_t;\nattribute "+r+" "+a+" a_"+o+";\n#else\nuniform "+r+" "+i+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n    "+r+" "+i+" "+o+" = a_"+o+";\n#else\n    "+r+" "+i+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n    "+r+" "+i+" "+o+" = unpack_mix_"+s+"(a_"+o+", a_"+o+"_t);\n#else\n    "+r+" "+i+" "+o+" = u_"+o+";\n#endif\n"})}}var ar=Object.freeze({prelude:ze,background:Le,backgroundPattern:Oe,circle:Re,clippingMask:Be,heatmap:Fe,heatmapTexture:Ne,collisionBox:Ue,collisionCircle:Ve,debug:je,fill:qe,fillOutline:He,fillOutlinePattern:Ge,fillPattern:We,fillExtrusion:Ze,fillExtrusionPattern:Xe,extrusionTexture:Ye,hillshadePrepare:Ke,hillshade:Je,line:Qe,lineGradient:$e,linePattern:tr,lineSDF:er,raster:rr,symbolIcon:nr,symbolSDF:ir}),sr=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};sr.prototype.bind=function(t,e,r,n,i,o,a,s){this.context=t;for(var l=this.boundPaintVertexBuffers.length!==n.length,u=0;!l&&u<n.length;u++)this.boundPaintVertexBuffers[u]!==n[u]&&(l=!0);var c=!this.vao||this.boundProgram!==e||this.boundLayoutVertexBuffer!==r||l||this.boundIndexBuffer!==i||this.boundVertexOffset!==o||this.boundDynamicVertexBuffer!==a||this.boundDynamicVertexBuffer2!==s;!t.extVertexArrayObject||c?this.freshBind(e,r,n,i,o,a,s):(t.bindVertexArrayOES.set(this.vao),a&&a.bind(),i&&i.dynamicDraw&&i.bind(),s&&s.bind())},sr.prototype.freshBind=function(t,e,r,n,i,o,a){var s,l=t.numAttributes,u=this.context,c=u.gl;if(u.extVertexArrayObject)this.vao&&this.destroy(),this.vao=u.extVertexArrayObject.createVertexArrayOES(),u.bindVertexArrayOES.set(this.vao),s=0,this.boundProgram=t,this.boundLayoutVertexBuffer=e,this.boundPaintVertexBuffers=r,this.boundIndexBuffer=n,this.boundVertexOffset=i,this.boundDynamicVertexBuffer=o,this.boundDynamicVertexBuffer2=a;else{s=u.currentNumAttributes||0;for(var p=l;p<s;p++)c.disableVertexAttribArray(p)}e.enableAttributes(c,t);for(var h=0,f=r;h<f.length;h+=1)f[h].enableAttributes(c,t);o&&o.enableAttributes(c,t),a&&a.enableAttributes(c,t),e.bind(),e.setVertexAttribPointers(c,t,i);for(var d=0,m=r;d<m.length;d+=1){var g=m[d];g.bind(),g.setVertexAttribPointers(c,t,i)}o&&(o.bind(),o.setVertexAttribPointers(c,t,i)),n&&n.bind(),a&&(a.bind(),a.setVertexAttribPointers(c,t,i)),u.currentNumAttributes=l},sr.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var lr=function(e,r,n,i,o){var a=e.gl;this.program=a.createProgram();var s=n.defines().concat("#define DEVICE_PIXEL_RATIO "+t.browser.devicePixelRatio.toFixed(1));o&&s.push("#define OVERDRAW_INSPECTOR;");var l=s.concat(ze.fragmentSource,r.fragmentSource).join("\n"),u=s.concat(ze.vertexSource,r.vertexSource).join("\n"),c=a.createShader(a.FRAGMENT_SHADER);a.shaderSource(c,l),a.compileShader(c),a.attachShader(this.program,c);var p=a.createShader(a.VERTEX_SHADER);a.shaderSource(p,u),a.compileShader(p),a.attachShader(this.program,p);for(var h=n.layoutAttributes||[],f=0;f<h.length;f++)a.bindAttribLocation(this.program,f,h[f].name);a.linkProgram(this.program),this.numAttributes=a.getProgramParameter(this.program,a.ACTIVE_ATTRIBUTES),this.attributes={};for(var d={},m=0;m<this.numAttributes;m++){var g=a.getActiveAttrib(this.program,m);g&&(this.attributes[g.name]=a.getAttribLocation(this.program,g.name))}for(var y=a.getProgramParameter(this.program,a.ACTIVE_UNIFORMS),v=0;v<y;v++){var _=a.getActiveUniform(this.program,v);_&&(d[_.name]=a.getUniformLocation(this.program,_.name))}this.fixedUniforms=i(e,d),this.binderUniforms=n.getUniforms(e,d)};
vendor: 13,267 bytes, line 65
65function ur(e,r,n){var i=1/ae(n,1,r.transform.tileZoom),o=Math.pow(2,n.tileID.overscaledZ),a=n.tileSize*Math.pow(2,r.transform.tileZoom)/o,s=a*(n.tileID.canonical.x+n.tileID.wrap*o),l=a*n.tileID.canonical.y;return{u_image:0,u_texsize:n.imageAtlasTexture.size,u_scale:[t.browser.devicePixelRatio,i,e.fromScale,e.toScale],u_fade:e.t,u_pixel_coord_upper:[s>>16,l>>16],u_pixel_coord_lower:[65535&s,65535&l]}}lr.prototype.draw=function(t,e,r,n,i,o,a,s,l,u,c,p,h,f,d,m){var g,y=t.gl;for(var v in t.program.set(this.program),t.setDepthMode(r),t.setStencilMode(n),t.setColorMode(i),t.setCullFace(o),this.fixedUniforms)this.fixedUniforms[v].set(a[v]);f&&f.setUniforms(t,this.binderUniforms,p,{zoom:h});for(var _=(g={},g[y.LINES]=2,g[y.TRIANGLES]=3,g[y.LINE_STRIP]=1,g)[e],x=0,b=c.get();x<b.length;x+=1){var w=b[x],E=w.vaos||(w.vaos={});(E[s]||(E[s]=new sr)).bind(t,this,l,f?f.getPaintVertexBuffers():[],u,w.vertexOffset,d,m),y.drawElements(e,w.primitiveLength*_,y.UNSIGNED_SHORT,w.primitiveOffset*_*2)}};var cr=function(e,r,n){var i=r.style.light,o=i.properties.get("position"),a=[o.x,o.y,o.z],s=t.create();"viewport"===i.properties.get("anchor")&&t.fromRotation(s,-r.transform.angle),t.transformMat3(a,a,s);var l=i.properties.get("color");return{u_matrix:e,u_lightpos:a,u_lightintensity:i.properties.get("intensity"),u_lightcolor:[l.r,l.g,l.b],u_vertical_gradient:+n}},pr=function(e,r,n,i,o,a){return t.extend(cr(e,r,n),ur(o,r,a),{u_height_factor:-Math.pow(2,i.overscaledZ)/a.tileSize/8})},hr=function(e,r,n){var i=t.create$1();t.ortho(i,0,e.width,e.height,0,0,1);var o=e.context.gl;return{u_matrix:i,u_world:[o.drawingBufferWidth,o.drawingBufferHeight],u_image:n,u_opacity:r}},fr=function(t){return{u_matrix:t}},dr=function(e,r,n,i){return t.extend(fr(e),ur(n,r,i))},mr=function(t,e){return{u_matrix:t,u_world:e}},gr=function(e,r,n,i,o){return t.extend(dr(e,r,n,i),{u_world:o})},yr=function(t,e,r,n){var i,o,a=t.transform;if("map"===n.paint.get("circle-pitch-alignment")){var s=ae(r,1,a.zoom);i=!0,o=[s,s]}else i=!1,o=a.pixelsToGLUnits;return{u_camera_to_center_distance:a.cameraToCenterDistance,u_scale_with_map:+("map"===n.paint.get("circle-pitch-scale")),u_matrix:t.translatePosMatrix(e.posMatrix,r,n.paint.get("circle-translate"),n.paint.get("circle-translate-anchor")),u_pitch_with_map:+i,u_extrude_scale:o}},vr=function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f(e,r.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_overscale_factor:new t.Uniform1f(e,r.u_overscale_factor)}},_r=function(t,e,r){var n=ae(r,1,e.zoom),i=Math.pow(2,e.zoom-r.tileID.overscaledZ),o=r.tileID.overscaleFactor();return{u_matrix:t,u_camera_to_center_distance:e.cameraToCenterDistance,u_pixels_to_tile_units:n,u_extrude_scale:[e.pixelsToGLUnits[0]/(n*i),e.pixelsToGLUnits[1]/(n*i)],u_overscale_factor:o}},xr=function(t,e){return{u_matrix:t,u_color:e}},br=function(t){return{u_matrix:t}},wr=function(t,e,r,n){return{u_matrix:t,u_extrude_scale:ae(e,1,r),u_intensity:n}},Er=function(t,e,r){var n=r.paint.get("hillshade-shadow-color"),i=r.paint.get("hillshade-highlight-color"),o=r.paint.get("hillshade-accent-color"),a=r.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===r.paint.get("hillshade-illumination-anchor")&&(a-=t.transform.angle);var s=!t.options.moving;return{u_matrix:t.transform.calculatePosMatrix(e.tileID.toUnwrapped(),s),u_image:0,u_latrange:Sr(t,e.tileID),u_light:[r.paint.get("hillshade-exaggeration"),a],u_shadow:n,u_highlight:i,u_accent:o}},Tr=function(e,r){var n=e.dem.stride,i=t.create$1();return t.ortho(i,0,t.EXTENT,-t.EXTENT,0,0,1),t.translate(i,i,[0,-t.EXTENT,0]),{u_matrix:i,u_image:1,u_dimension:[n,n],u_zoom:e.tileID.overscaledZ,u_maxzoom:r}};function Sr(e,r){var n=Math.pow(2,r.canonical.z),i=r.canonical.y;return[new t.MercatorCoordinate(0,i/n).toLngLat().lat,new t.MercatorCoordinate(0,(i+1)/n).toLngLat().lat]}var Cr=function(t,e,r){var n=t.transform;return{u_matrix:Mr(t,e,r),u_ratio:1/ae(e,1,n.zoom),u_gl_units_to_pixels:[1/n.pixelsToGLUnits[0],1/n.pixelsToGLUnits[1]]}},Ar=function(e,r,n){return t.extend(Cr(e,r,n),{u_image:0})},Ir=function(e,r,n,i){var o=e.transform,a=kr(r,o);return{u_matrix:Mr(e,r,n),u_texsize:r.imageAtlasTexture.size,u_ratio:1/ae(r,1,o.zoom),u_image:0,u_scale:[t.browser.devicePixelRatio,a,i.fromScale,i.toScale],u_fade:i.t,u_gl_units_to_pixels:[1/o.pixelsToGLUnits[0],1/o.pixelsToGLUnits[1]]}},Dr=function(e,r,n,i,o){var a=e.transform,s=e.lineAtlas,l=kr(r,a),u="round"===n.layout.get("line-cap"),c=s.getDash(i.from,u),p=s.getDash(i.to,u),h=c.width*o.fromScale,f=p.width*o.toScale;return t.extend(Cr(e,r,n),{u_patternscale_a:[l/h,-c.height/2],u_patternscale_b:[l/f,-p.height/2],u_sdfgamma:s.width/(256*Math.min(h,f)*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:c.y,u_tex_y_b:p.y,u_mix:o.t})};function kr(t,e){return 1/ae(t,1,e.tileZoom)}function Mr(t,e,r){return t.translatePosMatrix(e.tileID.posMatrix,e,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}var Pr=function(t,e,r,n,i){return{u_matrix:t,u_tl_parent:e,u_scale_parent:r,u_buffer_scale:1,u_fade_t:n.mix,u_opacity:n.opacity*i.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:i.paint.get("raster-brightness-min"),u_brightness_high:i.paint.get("raster-brightness-max"),u_saturation_factor:(a=i.paint.get("raster-saturation"),a>0?1-1/(1.001-a):-a),u_contrast_factor:(o=i.paint.get("raster-contrast"),o>0?1/(1-o):1+o),u_spin_weights:function(t){t*=Math.PI/180;var e=Math.sin(t),r=Math.cos(t);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}(i.paint.get("raster-hue-rotate"))};var o,a};var zr=function(t,e,r,n,i,o,a,s,l,u){var c=i.transform;return{u_is_size_zoom_constant:+("constant"===t||"source"===t),u_is_size_feature_constant:+("constant"===t||"camera"===t),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:c.cameraToCenterDistance,u_pitch:c.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:c.width/c.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:o,u_label_plane_matrix:a,u_gl_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+n,u_texsize:u,u_texture:0}},Lr=function(e,r,n,i,o,a,s,l,u,c,p){var h=o.transform;return t.extend(zr(e,r,n,i,o,a,s,l,u,c),{u_gamma_scale:i?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_is_halo:+p})},Or=function(t,e,r){return{u_matrix:t,u_opacity:e,u_color:r}},Rr=function(e,r,n,i,o,a){return t.extend(function(t,e,r,n){var i=r.imageManager.getPattern(t.from),o=r.imageManager.getPattern(t.to),a=r.imageManager.getPixelSize(),s=a.width,l=a.height,u=Math.pow(2,n.tileID.overscaledZ),c=n.tileSize*Math.pow(2,r.transform.tileZoom)/u,p=c*(n.tileID.canonical.x+n.tileID.wrap*u),h=c*n.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:o.tl,u_pattern_br_b:o.br,u_texsize:[s,l],u_mix:e.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:o.displaySize,u_scale_a:e.fromScale,u_scale_b:e.toScale,u_tile_units_to_pixels:1/ae(n,1,r.transform.tileZoom),u_pixel_coord_upper:[p>>16,h>>16],u_pixel_coord_lower:[65535&p,65535&h]}}(i,a,n,o),{u_matrix:e,u_opacity:r})},Br={fillExtrusion:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient)}},fillExtrusionPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_height_factor:new t.Uniform1f(e,r.u_height_factor),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform4f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},extrusionTexture:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fill:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},fillPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform4f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},fillOutline:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world)}},fillOutlinePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform4f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},circle:function(e,r){return{u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(e,r.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},collisionBox:vr,collisionCircle:vr,debug:function(e,r){return{u_color:new t.UniformColor(e,r.u_color),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},clippingMask:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmap:function(e,r){return{u_extrude_scale:new t.Uniform1f(e,r.u_extrude_scale),u_intensity:new t.Uniform1f(e,r.u_intensity),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmapTexture:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_color_ramp:new t.Uniform1i(e,r.u_color_ramp),u_opacity:new t.Uniform1f(e,r.u_opacity)}},hillshade:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_latrange:new t.Uniform2f(e,r.u_latrange),u_light:new t.Uniform2f(e,r.u_light),u_shadow:new t.UniformColor(e,r.u_shadow),u_highlight:new t.UniformColor(e,r.u_highlight),u_accent:new t.UniformColor(e,r.u_accent)}},hillshadePrepare:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_dimension:new t.Uniform2f(e,r.u_dimension),u_zoom:new t.Uniform1f(e,r.u_zoom),u_maxzoom:new t.Uniform1f(e,r.u_maxzoom)}},line:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_gl_units_to_pixels:new t.Uniform2f(e,r.u_gl_units_to_pixels)}},lineGradient:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_gl_units_to_pixels:new t.Uniform2f(e,r.u_gl_units_to_pixels),u_image:new t.Uniform1i(e,r.u_image)}},linePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_texsize:new t.Uniform2f(e,r.u_texsize),u_ratio:new t.Uniform1f(e,r.u_ratio),u_image:new t.Uniform1i(e,r.u_image),u_gl_units_to_pixels:new t.Uniform2f(e,r.u_gl_units_to_pixels),u_scale:new t.Uniform4f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},lineSDF:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_gl_units_to_pixels:new t.Uniform2f(e,r.u_gl_units_to_pixels),u_patternscale_a:new t.Uniform2f(e,r.u_patternscale_a),u_patternscale_b:new t.Uniform2f(e,r.u_patternscale_b),u_sdfgamma:new t.Uniform1f(e,r.u_sdfgamma),u_image:new t.Uniform1i(e,r.u_image),u_tex_y_a:new t.Uniform1f(e,r.u_tex_y_a),u_tex_y_b:new t.Uniform1f(e,r.u_tex_y_b),u_mix:new t.Uniform1f(e,r.u_mix)}},raster:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_tl_parent:new t.Uniform2f(e,r.u_tl_parent),u_scale_parent:new t.Uniform1f(e,r.u_scale_parent),u_buffer_scale:new t.Uniform1f(e,r.u_buffer_scale),u_fade_t:new t.Uniform1f(e,r.u_fade_t),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image0:new t.Uniform1i(e,r.u_image0),u_image1:new t.Uniform1i(e,r.u_image1),u_brightness_low:new t.Uniform1f(e,r.u_brightness_low),u_brightness_high:new t.Uniform1f(e,r.u_brightness_high),u_saturation_factor:new t.Uniform1f(e,r.u_saturation_factor),u_contrast_factor:new t.Uniform1f(e,r.u_contrast_factor),u_spin_weights:new t.Uniform3f(e,r.u_spin_weights)}},symbolIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix
65),u_gl_coord_matrix:new t.UniformMatrix4f(e,r.u_gl_coord_matrix),u_is_text:new t.Uniform1f(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture)}},symbolSDF:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_gl_coord_matrix:new t.UniformMatrix4f(e,r.u_gl_coord_matrix),u_is_text:new t.Uniform1f(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_is_halo:new t.Uniform1f(e,r.u_is_halo)}},background:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_color:new t.UniformColor(e,r.u_color)}},backgroundPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image:new t.Uniform1i(e,r.u_image),u_pattern_tl_a:new t.Uniform2f(e,r.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(e,r.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(e,r.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(e,r.u_pattern_br_b),u_texsize:new t.Uniform2f(e,r.u_texsize),u_mix:new t.Uniform1f(e,r.u_mix),u_pattern_size_a:new t.Uniform2f(e,r.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(e,r.u_pattern_size_b),u_scale_a:new t.Uniform1f(e,r.u_scale_a),u_scale_b:new t.Uniform1f(e,r.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(e,r.u_tile_units_to_pixels)}}};function Fr(e,r){for(var n=e.sort(function(t,e){return t.tileID.isLessThan(e.tileID)?-1:e.tileID.isLessThan(t.tileID)?1:0}),i=0;i<n.length;i++){var o={},a=n[i],s=n.slice(i+1);Nr(a.tileID.wrapped(),a.tileID,s,new t.OverscaledTileID(0,a.tileID.wrap+1,0,0,0),o),a.setMask(o,r)}}function Nr(e,r,n,i,o){for(var a=0;a<n.length;a++){var s=n[a];if(i.isLessThan(s.tileID))break;if(r.key===s.tileID.key)return;if(s.tileID.isChildOf(r)){for(var l=r.children(1/0),u=0;u<l.length;u++)Nr(e,l[u],n.slice(a),i,o);return}}var c=r.overscaledZ-e.overscaledZ,p=new t.CanonicalTileID(c,r.canonical.x-(e.canonical.x<<c),r.canonical.y-(e.canonical.y<<c));o[p.key]=o[p.key]||p}function Ur(t,e,r,n,i){for(var o=t.context,a=o.gl,s=i?t.useProgram("collisionCircle"):t.useProgram("collisionBox"),l=0;l<n.length;l++){var u=n[l],c=e.getTile(u),p=c.getBucket(r);if(p){var h=i?p.collisionCircle:p.collisionBox;h&&s.draw(o,i?a.TRIANGLES:a.LINES,bt.disabled,wt.disabled,t.colorModeForRenderPass(),Tt.disabled,_r(u.posMatrix,t.transform,c),r.id,h.layoutVertexBuffer,h.indexBuffer,h.segments,null,t.transform.zoom,null,null,h.collisionVertexBuffer)}}}var Vr=t.identity(new Float32Array(16)),jr=t.properties.layout;function qr(e,r,n,i,o,a,s,l,u,c,p,h){for(var f,d,m=e.context,g=m.gl,y=e.transform,v="map"===l,_="map"===u,x=v&&"point"!==n.layout.get("symbol-placement"),b=v&&!_&&!x,w=void 0!==n.layout.get("symbol-sort-key").constantOr(1),E=e.depthModeForSublayer(0,bt.ReadOnly),T=[],S=0,C=i;S<C.length;S+=1){var A=C[S],I=r.getTile(A),D=I.getBucket(n);if(D){var k=o?D.text:D.icon;if(k&&k.segments.get().length){var M=k.programConfigurations.get(n.id),P=o||D.sdfIcons,z=o?D.textSizeData:D.iconSizeData;f||(f=e.useProgram(P?"symbolSDF":"symbolIcon",M),d=t.evaluateSizeForZoom(z,y.zoom,jr.properties[o?"text-size":"icon-size"])),m.activeTexture.set(g.TEXTURE0);var L=void 0,O=void 0,R=void 0;if(o)O=I.glyphAtlasTexture,R=g.LINEAR,L=I.glyphAtlasTexture.size;else{var B=1!==n.layout.get("icon-size").constantOr(0)||D.iconsNeedLinear,F=_||0!==y.pitch;O=I.imageAtlasTexture,R=P||e.options.rotating||e.options.zooming||B||F?g.LINEAR:g.NEAREST,L=I.imageAtlasTexture.size}var N=ae(I,1,e.transform.zoom),U=Gt(A.posMatrix,_,v,e.transform,N),V=Wt(A.posMatrix,_,v,e.transform,N);x&&Yt(D,A.posMatrix,e,o,U,V,_,c);var j=e.translatePosMatrix(A.posMatrix,I,a,s),q=x?Vr:U,H=e.translatePosMatrix(V,I,a,s,!0),G=P&&0!==n.paint.get(o?"text-halo-width":"icon-halo-width").constantOr(1),W={program:f,buffers:k,uniformValues:P?Lr(z.functionType,d,b,_,e,j,q,H,o,L,!0):zr(z.functionType,d,b,_,e,j,q,H,o,L),atlasTexture:O,atlasInterpolation:R,isSDF:P,hasHalo:G};if(w)for(var Z=0,X=k.segments.get();Z<X.length;Z+=1){var Y=X[Z];T.push({segments:new t.SegmentVector([Y]),sortKey:Y.sortKey,state:W})}else T.push({segments:k.segments,sortKey:0,state:W})}}}w&&T.sort(function(t,e){return t.sortKey-e.sortKey});for(var K=0,J=T;K<J.length;K+=1){var Q=J[K],$=Q.state;if($.atlasTexture.bind($.atlasInterpolation,g.CLAMP_TO_EDGE),$.isSDF){var tt=$.uniformValues;
65$.hasHalo&&(tt.u_is_halo=1,Hr($.buffers,Q.segments,n,e,$.program,E,p,h,tt)),tt.u_is_halo=0}Hr($.buffers,Q.segments,n,e,$.program,E,p,h,$.uniformValues)}}function Hr(t,e,r,n,i,o,a,s,l){var u=n.context,c=u.gl;i.draw(u,c.TRIANGLES,o,a,s,Tt.disabled,l,r.id,t.layoutVertexBuffer,t.indexBuffer,e,r.paint,n.transform.zoom,t.programConfigurations.get(r.id),t.dynamicLayoutVertexBuffer,t.opacityVertexBuffer)}function Gr(t,e,r,n,i,o,a){var s,l,u,c,p,h=t.context.gl,f=r.paint.get("fill-pattern"),d=f&&f.constantOr(1),m=r.getCrossfadeParameters();a?(l=d&&!r.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",s=h.LINES):(l=d?"fillPattern":"fill",s=h.TRIANGLES);for(var g=0,y=n;g<y.length;g+=1){var v=y[g],_=e.getTile(v);if(!d||_.patternsLoaded()){var x=_.getBucket(r);if(x){var b=x.programConfigurations.get(r.id),w=t.useProgram(l,b);d&&(t.context.activeTexture.set(h.TEXTURE0),_.imageAtlasTexture.bind(h.LINEAR,h.CLAMP_TO_EDGE),b.updatePatternPaintBuffers(m));var E=f.constantOr(null);if(E&&_.imageAtlas){var T=_.imageAtlas.patternPositions[E.to],S=_.imageAtlas.patternPositions[E.from];T&&S&&b.setConstantPatternPositions(T,S)}var C=t.translatePosMatrix(v.posMatrix,_,r.paint.get("fill-translate"),r.paint.get("fill-translate-anchor"));if(a){c=x.indexBuffer2,p=x.segments2;var A=[h.drawingBufferWidth,h.drawingBufferHeight];u="fillOutlinePattern"===l&&d?gr(C,t,m,_,A):mr(C,A)}else c=x.indexBuffer,p=x.segments,u=d?dr(C,t,m,_):fr(C);w.draw(t.context,s,i,t.stencilModeForClipping(v),o,Tt.disabled,u,r.id,x.layoutVertexBuffer,c,p,r.paint,t.transform.zoom,b)}}}}function Wr(e,r){var n=e.context,i=n.gl,o=r.viewportFrame;if(e.depthRboNeedsClear&&e.setupOffscreenDepthRenderbuffer(),!o){var a=new t.Texture(n,{width:e.width,height:e.height,data:null},i.RGBA);a.bind(i.LINEAR,i.CLAMP_TO_EDGE),(o=r.viewportFrame=n.createFramebuffer(e.width,e.height)).colorAttachment.set(a.texture)}n.bindFramebuffer.set(o.framebuffer),o.depthAttachment.set(e.depthRbo),e.depthRboNeedsClear&&(n.clear({depth:1}),e.depthRboNeedsClear=!1),n.clear({color:t.Color.transparent}),n.setStencilMode(wt.disabled),n.setDepthMode(new bt(i.LEQUAL,bt.ReadWrite,[0,1])),n.setColorMode(e.colorModeForRenderPass())}function Zr(t,e,r){var n=e.viewportFrame;if(n){var i=t.context,o=i.gl;i.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,n.colorAttachment.get()),t.useProgram("extrusionTexture").draw(i,o.TRIANGLES,bt.disabled,wt.disabled,t.colorModeForRenderPass(),Tt.disabled,hr(t,r,0),e.id,t.viewportBuffer,t.quadTriangleIndexBuffer,t.viewportSegments,e.paint,t.transform.zoom)}}function Xr(t,e,r,n,i,o){var a=t.context,s=a.gl,l=e.fbo;if(l){var u=t.useProgram("hillshade");a.activeTexture.set(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,l.colorAttachment.get());var c=Er(t,e,r);e.maskedBoundsBuffer&&e.maskedIndexBuffer&&e.segments?u.draw(a,s.TRIANGLES,n,i,o,Tt.disabled,c,r.id,e.maskedBoundsBuffer,e.maskedIndexBuffer,e.segments):u.draw(a,s.TRIANGLES,n,i,o,Tt.disabled,c,r.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments)}}function Yr(e,r,n,i,o,a,s){var l=e.context,u=l.gl;if(r.dem&&r.dem.data){var c=r.dem.dim,p=r.dem.stride,h=r.dem.getPixels();if(l.activeTexture.set(u.TEXTURE1),l.pixelStoreUnpackPremultiplyAlpha.set(!1),r.demTexture=r.demTexture||e.getTileTexture(p),r.demTexture){var f=r.demTexture;f.update(h,{premultiply:!1}),f.bind(u.NEAREST,u.CLAMP_TO_EDGE)}else r.demTexture=new t.Texture(l,h,u.RGBA,{premultiply:!1}),r.demTexture.bind(u.NEAREST,u.CLAMP_TO_EDGE);l.activeTexture.set(u.TEXTURE0);var d=r.fbo;if(!d){var m=new t.Texture(l,{width:c,height:c,data:null},u.RGBA);m.bind(u.LINEAR,u.CLAMP_TO_EDGE),(d=r.fbo=l.createFramebuffer(c,c)).colorAttachment.set(m.texture)}l.bindFramebuffer.set(d.framebuffer),l.viewport.set([0,0,c,c]),e.useProgram("hillshadePrepare").draw(l,u.TRIANGLES,o,a,s,Tt.disabled,Tr(r,i),n.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments),r.needsHillshadePrepare=!1}}function Kr(e,r,n,i,o){var a=i.paint.get("raster-fade-duration");if(a>0){var s=t.browser.now(),l=(s-e.timeAdded)/a,u=r?(s-r.timeAdded)/a:-1,c=n.getSource(),p=o.coveringZoomLevel({tileSize:c.tileSize,roundZoom:c.roundZoom}),h=!r||Math.abs(r.tileID.overscaledZ-p)>Math.abs(e.tileID.overscaledZ-p),f=h&&e.refreshedUponExpiration?1:t.clamp(h?l:1-u,0,1);return e.refreshedUponExpiration&&l>
65=1&&(e.refreshedUponExpiration=!1),r?{opacity:1,mix:1-f}:{opacity:f,mix:0}}return{opacity:1,mix:0}}function Jr(e,r,n){var i=e.context,o=i.gl,a=n.posMatrix,s=e.useProgram("debug"),l=bt.disabled,u=wt.disabled,c=e.colorModeForRenderPass(),p="$debug";s.draw(i,o.LINE_STRIP,l,u,c,Tt.disabled,xr(a,t.Color.red),p,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);for(var h=function(t,e,r,n){n=n||1;var i,o,a,s,l,u,c,p,h=[];for(i=0,o=t.length;i<o;i++)if(l=Qr[t[i]]){for(p=null,a=0,s=l[1].length;a<s;a+=2)-1===l[1][a]&&-1===l[1][a+1]?p=null:(u=e+l[1][a]*n,c=200-l[1][a+1]*n,p&&h.push(p.x,p.y,u,c),p={x:u,y:c});e+=l[0]*n}return h}(n.toString(),50,0,5),f=new t.StructArrayLayout2i4,d=new t.StructArrayLayout2ui4,m=0;m<h.length;m+=2)f.emplaceBack(h[m],h[m+1]),d.emplaceBack(m,m+1);for(var g=i.createVertexBuffer(f,Pe.members),y=i.createIndexBuffer(d),v=t.SegmentVector.simpleSegment(0,0,f.length/2,f.length/2),_=r.getTile(n).tileSize,x=t.EXTENT/(Math.pow(2,e.transform.zoom-n.overscaledZ)*_),b=[[-1,-1],[-1,1],[1,-1],[1,1]],w=0;w<b.length;w++){var E=b[w];s.draw(i,o.LINES,l,u,c,Tt.disabled,xr(t.translate([],a,[x*E[0],x*E[1],0]),t.Color.white),p,g,y,v)}s.draw(i,o.LINES,l,u,c,Tt.disabled,xr(a,t.Color.black),p,g,y,v)}var Qr={" ":[16,[]],"!":[10,[5,21,5,7,-1,-1,5,2,4,1,5,0,6,1,5,2]],'"':[16,[4,21,4,14,-1,-1,12,21,12,14]],"#":[21,[11,25,4,-7,-1,-1,17,25,10,-7,-1,-1,4,12,18,12,-1,-1,3,6,17,6]],$:[20,[8,25,8,-4,-1,-1,12,25,12,-4,-1,-1,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],"%":[24,[21,21,3,0,-1,-1,8,21,10,19,10,17,9,15,7,14,5,14,3,16,3,18,4,20,6,21,8,21,10,20,13,19,16,19,19,20,21,21,-1,-1,17,7,15,6,14,4,14,2,16,0,18,0,20,1,21,3,21,5,19,7,17,7]],"&":[26,[23,12,23,13,22,14,21,14,20,13,19,11,17,6,15,3,13,1,11,0,7,0,5,1,4,2,3,4,3,6,4,8,5,9,12,13,13,14,14,16,14,18,13,20,11,21,9,20,8,18,8,16,9,13,11,10,16,3,18,1,20,0,22,0,23,1,23,2]],"'":[10,[5,19,4,20,5,21,6,20,6,18,5,16,4,15]],"(":[14,[11,25,9,23,7,20,5,16,4,11,4,7,5,2,7,-2,9,-5,11,-7]],")":[14,[3,25,5,23,7,20,9,16,10,11,10,7,9,2,7,-2,5,-5,3,-7]],"*":[16,[8,21,8,9,-1,-1,3,18,13,12,-1,-1,13,18,3,12]],"+":[26,[13,18,13,0,-1,-1,4,9,22,9]],",":[10,[6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"-":[26,[4,9,22,9]],".":[10,[5,2,4,1,5,0,6,1,5,2]],"/":[22,[20,25,2,-7]],0:[20,[9,21,6,20,4,17,3,12,3,9,4,4,6,1,9,0,11,0,14,1,16,4,17,9,17,12,16,17,14,20,11,21,9,21]],1:[20,[6,17,8,18,11,21,11,0]],2:[20,[4,16,4,17,5,19,6,20,8,21,12,21,14,20,15,19,16,17,16,15,15,13,13,10,3,0,17,0]],3:[20,[5,21,16,21,10,13,13,13,15,12,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],4:[20,[13,21,3,7,18,7,-1,-1,13,21,13,0]],5:[20,[15,21,5,21,4,12,5,13,8,14,11,14,14,13,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],6:[20,[16,18,15,20,12,21,10,21,7,20,5,17,4,12,4,7,5,3,7,1,10,0,11,0,14,1,16,3,17,6,17,7,16,10,14,12,11,13,10,13,7,12,5,10,4,7]],7:[20,[17,21,7,0,-1,-1,3,21,17,21]],8:[20,[8,21,5,20,4,18,4,16,5,14,7,13,11,12,14,11,16,9,17,7,17,4,16,2,15,1,12,0,8,0,5,1,4,2,3,4,3,7,4,9,6,11,9,12,13,13,15,14,16,16,16,18,15,20,12,21,8,21]],9:[20,[16,14,15,11,13,9,10,8,9,8,6,9,4,11,3,14,3,15,4,18,6,20,9,21,10,21,13,20,15,18,16,14,16,9,15,4,13,1,10,0,8,0,5,1,4,3]],":":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,5,2,4,1,5,0,6,1,5,2]],";":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"<":[24,[20,18,4,9,20,0]],"=":[26,[4,12,22,12,-1,-1,4,6,22,6]],">":[24,[4,18,20,9,4,0]],"?":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],"@":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],"[":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,
6511,25,-1,-1,4,-7,11,-7]],"\\":[14,[0,21,14,-3]],"]":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],"^":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],"`":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],"{":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],"|":[8,[4,25,4,-7]],"}":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],"~":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]},$r={symbol:function(t,e,r,n){if("translucent"===t.renderPass){var i=wt.disabled,o=t.colorModeForRenderPass();0!==r.paint.get("icon-opacity").constantOr(1)&&qr(t,e,r,n,!1,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),r.layout.get("icon-rotation-alignment"),r.layout.get("icon-pitch-alignment"),r.layout.get("icon-keep-upright"),i,o),0!==r.paint.get("text-opacity").constantOr(1)&&qr(t,e,r,n,!0,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),r.layout.get("text-keep-upright"),i,o),e.map.showCollisionBoxes&&function(t,e,r,n){Ur(t,e,r,n,!1),Ur(t,e,r,n,!0)}(t,e,r,n)}},circle:function(t,e,r,n){if("translucent"===t.renderPass){var i=r.paint.get("circle-opacity"),o=r.paint.get("circle-stroke-width"),a=r.paint.get("circle-stroke-opacity");if(0!==i.constantOr(1)||0!==o.constantOr(1)&&0!==a.constantOr(1))for(var s=t.context,l=s.gl,u=t.depthModeForSublayer(0,bt.ReadOnly),c=wt.disabled,p=t.colorModeForRenderPass(),h=0;h<n.length;h++){var f=n[h],d=e.getTile(f),m=d.getBucket(r);if(m){var g=m.programConfigurations.get(r.id);t.useProgram("circle",g).draw(s,l.TRIANGLES,u,c,p,Tt.disabled,yr(t,f,d,r),r.id,m.layoutVertexBuffer,m.indexBuffer,m.segments,r.paint,t.transform.zoom,g)}}}},heatmap:function(e,r,n,i){if(0!==n.paint.get("heatmap-opacity"))if("offscreen"===e.renderPass){var o=e.context,a=o.gl,s=e.depthModeForSublayer(0,bt.ReadOnly),l=wt.disabled,u=new Et([a.ONE,a.ONE],t.Color.transparent,[!0,!0,!0,!0]);!function(t,e,r){var n=t.gl;t.activeTexture.set(n.TEXTURE1),t.viewport.set([0,0,e.width/4,e.height/4]);var i=r.heatmapFbo;if(i)n.bindTexture(n.TEXTURE_2D,i.colorAttachment.get()),t.bindFramebuffer.set(i.framebuffer);else{var o=n.createTexture();n.bindTexture(n.TEXTURE_2D,o),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.L
65INEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.LINEAR),function t(e,r,n,i){var o=e.gl;o.texImage2D(o.TEXTURE_2D,0,o.RGBA,r.width/4,r.height/4,0,o.RGBA,e.extTextureHalfFloat?e.extTextureHalfFloat.HALF_FLOAT_OES:o.UNSIGNED_BYTE,null),i.colorAttachment.set(n),e.extTextureHalfFloat&&o.checkFramebufferStatus(o.FRAMEBUFFER)!==o.FRAMEBUFFER_COMPLETE&&(e.extTextureHalfFloat=null,i.colorAttachment.setDirty(),t(e,r,n,i))}(t,e,o,i=r.heatmapFbo=t.createFramebuffer(e.width/4,e.height/4))}}(o,e,n),o.clear({color:t.Color.transparent});for(var c=0;c<i.length;c++){var p=i[c];if(!r.hasRenderableParent(p)){var h=r.getTile(p),f=h.getBucket(n);if(f){var d=f.programConfigurations.get(n.id),m=e.useProgram("heatmap",d),g=e.transform.zoom;m.draw(o,a.TRIANGLES,s,l,u,Tt.disabled,wr(p.posMatrix,h,g,n.paint.get("heatmap-intensity")),n.id,f.layoutVertexBuffer,f.indexBuffer,f.segments,n.paint,e.transform.zoom,d)}}}o.viewport.set([0,0,e.width,e.height])}else"translucent"===e.renderPass&&(e.context.setColorMode(e.colorModeForRenderPass()),function(e,r){var n=e.context,i=n.gl,o=r.heatmapFbo;if(o){n.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,o.colorAttachment.get()),n.activeTexture.set(i.TEXTURE1);var a=r.colorRampTexture;a||(a=r.colorRampTexture=new t.Texture(n,r.colorRamp,i.RGBA)),a.bind(i.LINEAR,i.CLAMP_TO_EDGE),e.useProgram("heatmapTexture").draw(n,i.TRIANGLES,bt.disabled,wt.disabled,e.colorModeForRenderPass(),Tt.disabled,function(e,r,n,i){var o=t.create$1();t.ortho(o,0,e.width,e.height,0,0,1);var a=e.context.gl;return{u_matrix:o,u_world:[a.drawingBufferWidth,a.drawingBufferHeight],u_image:n,u_color_ramp:i,u_opacity:r.paint.get("heatmap-opacity")}}(e,r,0,1),r.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,r.paint,e.transform.zoom)}}(e,n))},line:function(e,r,n,i){if("translucent"===e.renderPass){var o=n.paint.get("line-opacity"),a=n.paint.get("line-width");if(0!==o.constantOr(1)&&0!==a.constantOr(1)){var s=e.depthModeForSublayer(0,bt.ReadOnly),l=e.colorModeForRenderPass(),u=n.paint.get("line-dasharray"),c=n.paint.get("line-pattern"),p=c.constantOr(1),h=n.paint.get("line-gradient"),f=n.getCrossfadeParameters(),d=u?"lineSDF":p?"linePattern":h?"lineGradient":"line",m=e.context,g=m.gl,y=!0;if(h){m.activeTexture.set(g.TEXTURE0);var v=n.gradientTexture;if(!n.gradient)return;v||(v=n.gradientTexture=new t.Texture(m,n.gradient,g.RGBA)),v.bind(g.LINEAR,g.CLAMP_TO_EDGE)}for(var _=0,x=i;_<x.length;_+=1){var b=x[_],w=r.getTile(b);if(!p||w.patternsLoaded()){var E=w.getBucket(n);if(E){var T=E.programConfigurations.get(n.id),S=e.context.program.get(),C=e.useProgram(d,T),A=y||C.program!==S,I=c.constantOr(null);if(I&&w.imageAtlas){var D=w.imageAtlas.patternPositions[I.to],k=w.imageAtlas.patternPositions[I.from];D&&k&&T.setConstantPatternPositions(D,k)}var M=u?Dr(e,w,n,u,f):p?Ir(e,w,n,f):h?Ar(e,w,n):Cr(e,w,n);u&&(A||e.lineAtlas.dirty)?(m.activeTexture.set(g.TEXTURE0),e.lineAtlas.bind(m)):p&&(m.activeTexture.set(g.TEXTURE0),w.imageAtlasTexture.bind(g.LINEAR,g.CLAMP_TO_EDGE),T.updatePatternPaintBuffers(f)),C.draw(m,g.TRIANGLES,s,e.stencilModeForClipping(b),l,Tt.disabled,M,n.id,E.layoutVertexBuffer,E.indexBuffer,E.segments,n.paint,e.transform.zoom,T),y=!1}}}}}},fill:function(e,r,n,i){var o=n.paint.get("fill-color"),a=n.paint.get("fill-opacity");if(0!==a.constantOr(1)){var s=e.colorModeForRenderPass(),l=n.paint.get("fill-pattern").constantOr(1)||1!==o.constantOr(t.Color.transparent).a||1!==a.constantOr(0)?"translucent":"opaque";if(e.renderPass===l)Gr(e,r,n,i,e.depthModeForSublayer(1,"opaque"===e.renderPass?bt.ReadWrite:bt.ReadOnly),s,!1);if("translucent"===e.renderPass&&n.paint.get("fill-antialias"))Gr(e,r,n,i,e.depthModeForSublayer(n.getPaintProperty("fill-outline-color")?2:0,bt.ReadOnly),s,!0)}},"fill-extrusion":function(t,e,r,n){if(0!==r.paint.get("fill-extrusion-opacity"))if("offscreen"===t.renderPass){Wr(t,r),function(t,e,r,n,i,o,a){for(var s=t.context,l=s.gl,u=r.paint.get("fill-extrusion-pattern"),c=u.constantOr(1),p=r.getCrossfadeParameters(),h=0,f=n;h<f.length;h+=1){var d=f[h],m=e.getTile(d),g=m.getBucket(r);if(g){var y=g.programConfigurations.get(r.id),v=t.useProgram(c?"fillExtrusionPattern":"fillExtrusion",y);c&&(t.context.activeTexture.set(l.TEXTURE0),m.imageAtlasTexture.bind(l.LINEAR,l.CLAMP_TO_EDGE),y.updatePatternPaintBuffers(p));var _=u.constantOr(null);if(_&&m.imageAtlas){var x=m.imageAtlas.patternPositions[_.to],b=m.imageAtlas.patternPositions[_.from];x&&b&&y.setConstantPatternPositions(x,b)}var w=t.translatePosMatrix(d.posMatrix,m,r.paint.get("fill-extrusion-translate"),r.paint.get("fill-extrusion-translate-anchor")),E=r.paint.get("fill-extrusion-vertical-gradient"),T=c?pr(w,t,E,d,p,m):cr(w,t,E);v.draw(s,s.gl.TRIANGLES,i,o,a,Tt.backCCW,T,r.id,g.layoutVertexBuffer,g.indexBuffer,g.segments,r.paint,t.transform.zoom,y)}}}(t,e,r,n,new bt(t.context.gl.LEQUAL,bt.ReadWrite,[0,1]),wt.disabled,t.colorModeForRenderPass())}else"translucent"===t.renderPass&&Zr(t,r,r.paint.get("fill-extrusion-opacity"))},hillshade:function(t,e,r,n){if("offscreen"===t.renderPass||"translucent"===t.renderPass){for(var i=t.context,o=e.getSource().maxzoom,a=t.depthModeForSublayer(0,bt.ReadOnly),s=wt.disabled,l=t.colorModeForRenderPass(),u=0,c=n;u<c.length;u+=1){var p=c[u],h=e.getTile(p);h.needsHillshadePrepare&&"offscreen"===t.renderPass?Yr(t,h,r,o,a,s,l):"translucent"===t.renderPass&&Xr(t,h,r,a,s,l)}i.viewport.set([0,0,t.width,t.height])}},raster:function(t,e,r,n){if("translucent"===t.renderPass&&0!==r.paint.get("raster-opacity"))for(var i=t.context,o=i.gl,a=e.getSource(),s=t.useProgram("raster"),l=wt.disabled,u=t.colorModeForRenderPass(),c=n.length&&n[0].overscaledZ,p=!t.options.moving,h=0,f=n;h<f.length;h+=1){var d=f[h],m=t.depthModeForSublayer(d.overscaledZ-c,1===r.paint.get("raster-opacity")?bt.ReadWrite:bt.ReadOnly,o.LESS),g=e.getTile(d),y=t.transform.calculatePosMatrix(d.toUnwrapped(),p);g.registerFadeDuration(r.paint.get("raster-fade-duration"));var v=e.findLoadedParent(d,0),_=Kr(g,v,e,r,t.transform),x=void 0,b=void 0,w="nearest"===r.paint.get("raster-resampling")?o.NEAREST:o.LINEAR;i.activeTexture.set(o.TEXTURE0),g.texture.bind(w,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),i.activeTexture.set(o.TEXTURE1),v?(v.texture.bind(w,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),x=Math.pow(2,v.tileID.overscaledZ-g.tileID.overscaledZ
65),b=[g.tileID.canonical.x*x%1,g.tileID.canonical.y*x%1]):g.texture.bind(w,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST);var E=Pr(y,b||[0,0],x||1,_,r);a instanceof D?s.draw(i,o.TRIANGLES,m,l,u,Tt.disabled,E,r.id,a.boundsBuffer,t.quadTriangleIndexBuffer,a.boundsSegments):g.maskedBoundsBuffer&&g.maskedIndexBuffer&&g.segments?s.draw(i,o.TRIANGLES,m,l,u,Tt.disabled,E,r.id,g.maskedBoundsBuffer,g.maskedIndexBuffer,g.segments,r.paint,t.transform.zoom):s.draw(i,o.TRIANGLES,m,l,u,Tt.disabled,E,r.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments)}},background:function(t,e,r){var n=r.paint.get("background-color"),i=r.paint.get("background-opacity");if(0!==i){var o=t.context,a=o.gl,s=t.transform,l=s.tileSize,u=r.paint.get("background-pattern");if(!t.isPatternMissing(u)){var c=u||1!==n.a||1!==i?"translucent":"opaque";if(t.renderPass===c){var p=wt.disabled,h=t.depthModeForSublayer(0,"opaque"===c?bt.ReadWrite:bt.ReadOnly),f=t.colorModeForRenderPass(),d=t.useProgram(u?"backgroundPattern":"background"),m=s.coveringTiles({tileSize:l});u&&(o.activeTexture.set(a.TEXTURE0),t.imageManager.bind(t.context));for(var g=r.getCrossfadeParameters(),y=0,v=m;y<v.length;y+=1){var _=v[y],x=t.transform.calculatePosMatrix(_.toUnwrapped()),b=u?Rr(x,i,t,u,{tileID:_,tileSize:l},g):Or(x,i,n);d.draw(o,a.TRIANGLES,h,p,f,Tt.disabled,b,r.id,t.tileExtentBuffer,t.quadTriangleIndexBuffer,t.tileExtentSegments)}}}}},debug:function(t,e,r){for(var n=0;n<r.length;n++)Jr(t,e,r[n])},custom:function(t,e,r){var n=t.context,i=r.implementation;if("offscreen"===t.renderPass){var o=i.prerender;o&&(t.setCustomLayerDefaults(),o.call(i,n.gl,t.transform.customLayerMatrix()),n.setDirty(),t.setBaseState()),"3d"===i.renderingMode&&(t.setCustomLayerDefaults(),Wr(t,r),i.render(n.gl,t.transform.customLayerMatrix()),n.setDirty(),t.setBaseState())}else if("translucent"===t.renderPass)if("3d"===i.renderingMode)Zr(t,r,1);else{t.setCustomLayerDefaults(),n.setColorMode(t.colorModeForRenderPass()),n.setStencilMode(wt.disabled);var a=t.depthModeForSublayer(0,bt.ReadOnly);n.setDepthMode(a),i.render(n.gl,t.transform.customLayerMatrix()),n.setDirty(),t.setBaseState(),n.bindFramebuffer.set(null)}}},tn=function(e,r){this.context=new St(e),this.transform=r,this._tileTextures={},this.setup(),this.numSublayers=Ct.maxUnderzooming+Ct.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.depthRboNeedsClear=!0,this.emptyProgramConfiguration=new t.ProgramConfiguration,this.crossTileSymbolIndex=new Ae};function en(t,e){if(t.y>e.y){var r=t;t=e,e=r}return{x0:t.x,y0:t.y,x1:e.x,y1:e.y,dx:e.x-t.x,dy:e.y-t.y}}function rn(t,e,r,n,i){var o=Math.max(r,Math.floor(e.y0)),a=Math.min(n,Math.ceil(e.y1));if(t.x0===e.x0&&t.y0===e.y0?t.x0+e.dy/t.dy*t.dx<e.x1:t.x1-e.dy/t.dy*t.dx<e.x0){var s=t;t=e,e=s}for(var l=t.dx/t.dy,u=e.dx/e.dy,c=t.dx>0,p=e.dx<0,h=o;h<a;h++){var f=l*Math.max(0,Math.min(t.dy,h+c-t.y0))+t.x0,d=u*Math.max(0,Math.min(e.dy,h+p-e.y0))+e.x0;i(Math.floor(d),Math.ceil(f),h)}}function nn(t,e,r,n,i,o){var a,s=en(t,e),l=en(e,r),u=en(r,t);s.dy>l.dy&&(a=s,s=l,l=a),s.dy>u.dy&&(a=s,s=u,u=a),l.dy>u.dy&&(a=l,l=u,u=a),s.dy&&rn(u,s,n,i,o),l.dy&&rn(u,l,n,i,o)}tn.prototype.resize=function(e,r){var n=this.context.gl;if(this.width=e*t.browser.devicePixelRatio,this.height=r*t.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var i=0,o=this.style._order;i<o.length;i+=1){var a=o[i];this.style._layers[a].resize()}this.depthRbo&&(n.deleteRenderbuffer(this.depthRbo),this.depthRbo=null)},tn.prototype.setup=function(){var e=this.context,r=new t.StructArrayLayout2i4;r.emplaceBack(0,0),r.emplaceBack(t.EXTENT,0),r.emplaceBack(0,t.EXTENT),r.emplaceBack(t.EXTENT,t.EXTENT),this.tileExtentBuffer=e.createVertexBuffer(r,Pe.members),this.tileExtentSegments=t.SegmentVector.simpleSegment(0,0,4,2);var n=new t.StructArrayLayout2i4;n.emplaceBack(0,0),n.emplaceBack(t.EXTENT,0),n.emplaceBack(0,t.EXTENT),n.emplaceBack(t.EXTENT,t.EXTENT),this.debugBuffer=e.createVertexBuffer(n,Pe.members),this.debugSegments=t.SegmentVector.simpleSegment(0,0,4,5);var i=new t.StructArrayLayout4i8;i.emplaceBack(0,0,0,0),i.emplaceBack(t.EXTENT,0,t.EXTENT,0),i.emplaceBack(0,t.EXTENT,0,t.EXTENT),i.emplaceBack(t.EXTENT,t.EXTENT,t.EXTENT,t.EXTENT),this.rasterBoundsBuffer=e.createVertexBuffer(i,t.rasterBoundsAttributes.members),this.rasterBoundsSegments=t.SegmentVector.simpleSegment(0,0,4,2);var o=new t.StructArrayLayout2i4;
vendor: 2,919 bytes, line 65
65o.emplaceBack(0,0),o.emplaceBack(1,0),o.emplaceBack(0,1),o.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(o,Pe.members),this.viewportSegments=t.SegmentVector.simpleSegment(0,0,4,2);var a=new t.StructArrayLayout1ui2;a.emplaceBack(0),a.emplaceBack(1),a.emplaceBack(3),a.emplaceBack(2),a.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(a);var s=new t.StructArrayLayout3ui6;s.emplaceBack(0,1,2),s.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(s);var l=this.context.gl;this.stencilClearMode=new wt({func:l.ALWAYS,mask:0},0,255,l.ZERO,l.ZERO,l.ZERO)},tn.prototype.clearStencil=function(){var e=this.context,r=e.gl,n=t.create$1();t.ortho(n,0,this.width,this.height,0,0,1),t.scale(n,n,[r.drawingBufferWidth,r.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(e,r.TRIANGLES,bt.disabled,this.stencilClearMode,Et.disabled,Tt.disabled,br(n),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},tn.prototype._renderTileClippingMasks=function(t){var e=this.context,r=e.gl;e.setColorMode(Et.disabled),e.setDepthMode(bt.disabled);var n=this.useProgram("clippingMask"),i=1;this._tileClippingMaskIDs={};for(var o=0,a=t;o<a.length;o+=1){var s=a[o],l=this._tileClippingMaskIDs[s.key]=i++;n.draw(e,r.TRIANGLES,bt.disabled,new wt({func:r.ALWAYS,mask:0},l,255,r.KEEP,r.KEEP,r.REPLACE),Et.disabled,Tt.disabled,br(s.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}},tn.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new wt({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},tn.prototype.colorModeForRenderPass=function(){var e=this.context.gl;return this._showOverdrawInspector?new Et([e.CONSTANT_COLOR,e.ONE],new t.Color(1/8,1/8,1/8,0),[!0,!0,!0,!0]):"opaque"===this.renderPass?Et.unblended:Et.alphaBlended},tn.prototype.depthModeForSublayer=function(t,e,r){var n=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon;return new bt(r||this.context.gl.LEQUAL,e,[n,n])},tn.prototype.render=function(e,r){this.style=e,this.options=r,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(t.browser.now());var n=this.style._order,i=this.style.sourceCaches;for(var o in i){var a=i[o];a.used&&a.prepare(this.context)}var s,l={},u={},c={};for(var p in i){var h=i[p];l[p]=h.getVisibleCoordinates(),u[p]=l[p].slice().reverse(),c[p]=h.getVisibleCoordinates(!0).reverse()}for(var f in i){var d=i[f],m=d.getSource();if("raster"===m.type||"raster-dem"===m.type){for(var g=[],y=0,v=l[f];y<v.length;y+=1){var _=v[y];g.push(d.getTile(_))}Fr(g,this.context)}}this.renderPass="offscreen",this.depthRboNeedsClear=!0;for(var x=0,b=n;x<b.length;x+=1){var w=b[x],E=this.style._layers[w];if(E.hasOffscreenPass()&&!E.isHidden(this.transform.zoom)){var T=u[E.source];
65("custom"===E.type||T.length)&&this.renderLayer(this,i[E.source],E,T)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:r.showOverdrawInspector?t.Color.black:t.Color.transparent,depth:1}),this._showOverdrawInspector=r.showOverdrawInspector,this.depthRange=(e._order.length+2)*this.numSublayers*this.depthEpsilon,this.renderPass="opaque",this.currentLayer=n.length-1;this.currentLayer>=0;this.currentLayer--){var S=this.style._layers[n[this.currentLayer]],C=i[S.source],A=l[S.source];S.source!==s&&C&&(this.clearStencil(),C.getSource().isTileClipped&&this._renderTileClippingMasks(A)),this.renderLayer(this,C,S,A),s=S.source}for(this.renderPass="translucent",this.currentLayer=0,s=null;this.currentLayer<n.length;this.currentLayer++){var I=this.style._layers[n[this.currentLayer]],D=i[I.source],k=("symbol"===I.type?c:u)[I.source];I.source!==s&&D&&(this.clearStencil(),D.getSource().isTileClipped&&this._renderTileClippingMasks(l[I.source])),this.renderLayer(this,D,I,k),s=I.source}if(this.options.showTileBoundaries)for(var M in i){$r.debug(this,i[M],l[M]);break}this.setCustomLayerDefaults()},tn.prototype.setupOffscreenDepthRenderbuffer=function(){var t=this.context;this.depthRbo||(this.depthRbo=t.createRenderbuffer(t.gl.DEPTH_COMPONENT16,this.width,this.height))},tn.prototype.renderLayer=function(t,e,r,n){r.isHidden(this.transform.zoom)||("background"===r.type||"custom"===r.type||n.length)&&(this.id=r.id,$r[r.type](t,e,r,n))},tn.prototype.translatePosMatrix=function(e,r,n,i,o){if(!n[0]&&!n[1])return e;var a=o?"map"===i?this.transform.angle:0:"viewport"===i?-this.transform.angle:0;if(a){var s=Math.sin(a),l=Math.cos(a);n=[n[0]*l-n[1]*s,n[0]*s+n[1]*l]}var u=[o?n[0]:ae(r,n[0],this.transform.zoom),o?n[1]:ae(r,n[1],this.transform.zoom),0],c=new Float32Array(16);return t.translate(c,e,u),c},tn.prototype.saveTileTexture=function(t){var e=this._tileTextures[t.size[0]];e?e.push(t):this._tileTextures[t.size[0]]=[t]},tn.prototype.getTileTexture=function(t){var e=this._tileTextures[t];return e&&e.length>0?e.pop():null},tn.prototype.isPatternMissing=function(t){if(!t)return!1;var e=this.imageManager.getPattern(t.from),r=this.imageManager.getPattern(t.to);return!e||!r},tn.prototype.useProgram=function(t,e){void 0===e&&(e=this.emptyProgramConfiguration),this.cache=this.cache||{};var r=""+t+(e.cacheKey||"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[r]||(this.cache[r]=new lr(this.context,ar[t],e,Br[t],this._showOverdrawInspector)),this.cache[r]},tn.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},tn.prototype.setBaseState=function(){var t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)};var on=function(e,r,n){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===n||n,this._minZoom=e||0,this._maxZoom=r||22,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._posMatrixCache={},this._alignedPosMatrixCache={}},an={minZoom:{configurable:!0},maxZoom:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerPoint:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};on.prototype.clone=function(){var t=new on(this._minZoom,this._maxZoom,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._calcMatrices(),t},an.minZoom.get=function(){return this._minZoom},an.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},an.maxZoom.get=function(){return this._maxZoom},an.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},an.renderWorldCopies.get=function(){return this._renderWorldCopies},an.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},an.worldSize.get=function(){return this.tileSize*this.scale},an.centerPoint.get=function(){return this.size._div(2)},an.size.get=function(){return new t.Point(this.width,this.height)},an.bearing.get=function(){return-this.angle/Math.PI*180}
vendor: 10,645 bytes, line 65
65,an.bearing.set=function(e){var r=-t.wrap(e,-180,180)*Math.PI/180;this.angle!==r&&(this._unmodified=!1,this.angle=r,this._calcMatrices(),this.rotationMatrix=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},an.pitch.get=function(){return this._pitch/Math.PI*180},an.pitch.set=function(e){var r=t.clamp(e,0,60)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},an.fov.get=function(){return this._fov/Math.PI*180},an.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},an.zoom.get=function(){return this._zoom},an.zoom.set=function(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._constrain(),this._calcMatrices())},an.center.get=function(){return this._center},an.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},on.prototype.coveringZoomLevel=function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},on.prototype.getVisibleUnwrappedCoordinates=function(e){var r=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var n=this.pointCoordinate(new t.Point(0,0)),i=this.pointCoordinate(new t.Point(this.width,0)),o=this.pointCoordinate(new t.Point(this.width,this.height)),a=this.pointCoordinate(new t.Point(0,this.height)),s=Math.floor(Math.min(n.x,i.x,o.x,a.x)),l=Math.floor(Math.max(n.x,i.x,o.x,a.x)),u=s-1;u<=l+1;u++)0!==u&&r.push(new t.UnwrappedTileID(u,e));return r},on.prototype.coveringTiles=function(e){var r=this.coveringZoomLevel(e),n=r;if(void 0!==e.minzoom&&r<e.minzoom)return[];void 0!==e.maxzoom&&r>e.maxzoom&&(r=e.maxzoom);var i=t.MercatorCoordinate.fromLngLat(this.center),o=Math.pow(2,r),a=new t.Point(o*i.x-.5,o*i.y-.5);return function(e,r,n,i){void 0===i&&(i=!0);var o=1<<e,a={};function s(r,s,l){var u,c,p,h;if(l>=0&&l<=o)for(u=r;u<s;u++)c=Math.floor(u/o),p=(u%o+o)%o,0!==c&&!0!==i||(h=new t.OverscaledTileID(n,c,e,p,l),a[h.key]=h)}var l=r.map(function(e){return new t.Point(e.x,e.y)._mult(o)});return nn(l[0],l[1],l[2],0,o,s),nn(l[2],l[3],l[0],0,o,s),Object.keys(a).map(function(t){return a[t]})}(r,[this.pointCoordinate(new t.Point(0,0)),this.pointCoordinate(new t.Point(this.width,0)),this.pointCoordinate(new t.Point(this.width,this.height)),this.pointCoordinate(new t.Point(0,this.height))],e.reparseOverscaled?n:r,this._renderWorldCopies).sort(function(t,e){return a.dist(t.canonical)-a.dist(e.canonical)})},on.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},an.unmodified.get=function(){return this._unmodified},on.prototype.zoomScale=function(t){return Math.pow(2,t)},on.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},on.prototype.project=function(e){var r=t.clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng(e.lng)*this.worldSize,t.mercatorYfromLat(r)*this.worldSize)},on.prototype.unproject=function(e){return new t.MercatorCoordinate(e.x/this.worldSize,e.y/this.worldSize).toLngLat()},an.point.get=function(){return this.project(this.center)},on.prototype.setLocationAtPoint=function(e,r){var n=this.pointCoordinate(r),i=this.pointCoordinate(this.centerPoint),o=this.locationCoordinate(e),a=new t.MercatorCoordinate(o.x-(n.x-i.x),o.y-(n.y-i.y));this.center=this.coordinateLocation(a),this._renderWorldCopies&&(this.center=this.center.wrap())},on.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},on.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},on.prototype.locationCoordinate=function(e){return t.MercatorCoordinate.fromLngLat(e)},on.prototype.coordinateLocation=function(t){return t.toLngLat()},on.prototype.pointCoordinate=function(e){var r=[e.x,e.y,0,1],n=[e.x,e.y,1,1];t.transformMat4(r,r,this.pixelMatrixInverse),t.transformMat4(n,n,this.pixelMatrixInverse);var i=r[3],o=n[3],a=r[0]/i,s=n[0]/o,l=r[1]/i,u=n[1]/o,c=r[2]/i,p=n[2]/o,h=c===p?0:(0-c)/(p-c);return new t.MercatorCoordinate(t.number(a,s,h)/this.worldSize,t.number(l,u,h)/this.worldSize)},on.prototype.coordinatePoint=function(e){var r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix),new t.Point(r[0]/r[3],r[1]/r[3])},on.prototype.getBounds=function(){return(new t.LngLatBounds).extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},on.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},on.prototype.setMaxBounds=function(t){t?(this.lngRange=[t.getWest(),t.getEast()],this.latRange=[t.getSouth(),t.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},on.prototype.calculatePosMatrix=function(e,r){void 0===r&&(r=!1);var n=e.key,i=r?this._alignedPosMatrixCache:this._posMatrixCache;if(i[n])return i[n];var o=e.canonical,a=this.worldSize/this.zoomScale(o.z),s=o.x+Math.pow(2,o.z)*e.wrap,l=t.identity(new Float64Array(16));return t.translate(l,l,[s*a,o.y*a,0]),t.scale(l,l,[a/t.EXTENT,a/t.EXTENT,1]),t.multiply(l,r?this.alignedProjMatrix:this.projMatrix,l),i[n]=new Float32Array(l),i[n]},on.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},on.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var e,r,n,i,o=-90,a=90,s=-180,l=180,u=this.size,c=this._unmodified;if(this.latRange){var p=this.latRange;o=t.mercatorYfromLat(p[1])*this.worldSize,e=(a=t.mercatorYfromLat(p[0])*this.worldSize)-o<u.y?u.y/(a-o):0}if(this.lngRange){var h=this.lngRange;s=t.mercatorXfromLng(h[0])*this.worldSize,r=(l=t.mercatorXfromLng(h[1])*this.worldSize)-s<u.x?u.x/(l-s):0}var f=this.point,d=Math.max(r||0,e||0);if(d)return this.center=this.unproject(new t.Point(r?(l+s)/2:f.x,e?(a+o)/2:f.y)),this.zoom+=this.scaleZoom(d),this._unmodified=c,void(this._constraining=!1);if(this.latRange){var m=f.y,g=u.y/2;m-g<o&&(i=o+g),m+g>a&&(i=a-g)}if(this.lngRange){var y=f.x,v=u.x/2;y-v<s&&(n=s+v),y+v>l&&(n=l-v)}void 0===n&&void 0===i||(this.center=this.unproject(new t.Point(void 0!==n?n:f.x,void 0!==i?i:f.y))),this._unmodified=c,this._constraining=!1}},on.prototype._calcMatrices=function(){if(this.height){this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var e=this._fov/2,r=Math.PI/2+this._pitch,n=Math.sin(e)*this.cameraToCenterDistance/Math.sin(Math.PI-r-e),i=this.point,o=i.x,a=i.y,s=1.01*(Math.cos(Math.PI/2-this._pitch)*n+this.cameraToCenterDistance),l=new Float64Array(16);t.perspective(l,this._fov,this.width/this.height,1,s),t.scale(l,l,[1,-1,1]),t.translate(l,l,[0,0,-this.cameraToCenterDistance]),t.rotateX(l,l,this._pitch),t.rotateZ(l,l,this.angle),t.translate(l,l,[-o,-a,0]),this.mercatorMatrix=t.scale([],l,[this.worldSize,this.worldSize,this.worldSize]),t.scale(l,l,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=l;var u=this.width%2/2,c=this.height%2/2,p=Math.cos(this.angle),h=Math.sin(this.angle),f=o-Math.round(o)+p*u+h*c,d=a-Math.round(a)+p*c+h*u,m=new Float64Array(l);if(t.translate(m,m,[f>.5?f-1:f,d>.5?d-1:d,0]),this.alignedProjMatrix=m,l=t.create$1(),t.scale(l,l,[this.width/2,-this.height/2,1]),t.translate(l,l,[1,-1,0]),this.pixelMatrix=t.multiply(new Float64Array(16),l,this.projMatrix),!(l=t.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=l,this._posMatrixCache={},this._alignedPosMatrixCache={}}},on.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.Point(0,0)),r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},on.prototype.getCameraPoint=function(){var e=this._pitch,r=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,r))},on.prototype.getCameraQueryGeometry=function(e){var r=this.getCameraPoint();if(1===e.length)return[e[0],r];for(var n=r.x,i=r.y,o=r.x,a=r.y,s=0,l=e;s<l.length;s+=1){var u=l[s];n=Math.min(n,u.x),i=Math.min(i,u.y),o=Math.max(o,u.x),a=Math.max(a,u.y)}return[new t.Point(n,i),new t.Point(o,i),new t.Point(o,a),new t.Point(n,a),new t.Point(n,i)]},Object.defineProperties(on.prototype,an);var sn=function(){var e,r,n,i;t.bindAll(["_onHashChange","_updateHash"],this),this._updateHash=(e=this._updateHashUnthrottled.bind(this),300,r=!1,n=0,i=function(){n=0,r&&(e(),n=setTimeout(i,300),r=!1)},function(){return r=!0,n||i(),n})};sn.prototype.addTo=function(e){return this._map=e,t.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},sn.prototype.remove=function(){return t.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},sn.prototype.getHashString=function(t){var e=this._map.getCenter(),r=Math.round(100*this._map.getZoom())/100,n=Math.ceil((r*Math.LN2+Math.log(512/360/.5))/Math.LN10),i=Math.pow(10,n),o=Math.round(e.lng*i)/i,a=Math.round(e.lat*i)/i,s=this._map.getBearing(),l=this._map.getPitch(),u="";return u+=t?"#/"+o+"/"+a+"/"+r:"#"+r+"/"+a+"/"+o,(s||l)&&(u+="/"+Math.round(10*s)/10),l&&(u+="/"+Math.round(l)),u},sn.prototype._onHashChange=function(){var e=t.window.location.hash.replace("#","").split("/");return e.length>=3&&(this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:+(e[3]||0),pitch:+(e[4]||0)}),!0)},sn.prototype._updateHashUnthrottled=function(){var e=this.getHashString();try{t.window.history.replaceState(t.window.history.state,"",e)}catch(t){}};var ln=function(e){function n(n,i,o,a){void 0===a&&(a={});var s=r.mousePos(i.getCanvasContainer(),o),l=i.unproject(s);e.call(this,n,t.extend({point:s,lngLat:l,originalEvent:o},a)),this._defaultPrevented=!1,this.target=i}e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n;var i={defaultPrevented:{configurable:!0}};return n.prototype.preventDefault=function(){this._defaultPrevented=!0},i.defaultPrevented.get=function(){return this._defaultPrevented}
vendor: 2,252 bytes, line 65
65,Object.defineProperties(n.prototype,i),n}(t.Event),un=function(e){function n(n,i,o){var a=r.touchPos(i.getCanvasContainer(),o),s=a.map(function(t){return i.unproject(t)}),l=a.reduce(function(t,e,r,n){return t.add(e.div(n.length))},new t.Point(0,0)),u=i.unproject(l);e.call(this,n,{points:a,point:l,lngLats:s,lngLat:u,originalEvent:o}),this._defaultPrevented=!1}e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n;var i={defaultPrevented:{configurable:!0}};return n.prototype.preventDefault=function(){this._defaultPrevented=!0},i.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(n.prototype,i),n}(t.Event),cn=function(t){function e(e,r,n){t.call(this,e,{originalEvent:n}),this._defaultPrevented=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={defaultPrevented:{configurable:!0}};return e.prototype.preventDefault=function(){this._defaultPrevented=!0},r.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(e.prototype,r),e}(t.Event),pn=function(e){this._map=e,this._el=e.getCanvasContainer(),this._delta=0,t.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};pn.prototype.isEnabled=function(){return!!this._enabled},pn.prototype.isActive=function(){return!!this._active},pn.prototype.isZooming=function(){return!!this._zooming},pn.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},pn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},pn.prototype.onWheel=function(e){if(this.isEnabled()){var r=e.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,n=t.browser.now(),i=n-(this._lastWheelEventTime||0);this._lastWheelEventTime=n,0!==r&&r%4.000244140625==0?this._type="wheel":0!==r&&Math.abs(r)<4?this._type="trackpad":i>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(i*r)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),e.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=e,this._delta-=r,this.isActive()||this._start(e)),e.preventDefault()}}
vendor: 5,432 bytes, line 65
65,pn.prototype._onTimeout=function(t){this._type="wheel",this._delta-=this._lastValue,this.isActive()||this._start(t)},pn.prototype._start=function(e){if(this._delta){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),this._active=!0,this._zooming=!0,this._map.fire(new t.Event("movestart",{originalEvent:e})),this._map.fire(new t.Event("zoomstart",{originalEvent:e})),this._finishTimeout&&clearTimeout(this._finishTimeout);var n=r.mousePos(this._el,e);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(n)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame))}},pn.prototype._onScrollFrame=function(){var e=this;if(this._frameId=null,this.isActive()){var r=this._map.transform;if(0!==this._delta){var n="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?1/450:.01,i=2/(1+Math.exp(-Math.abs(this._delta*n)));this._delta<0&&0!==i&&(i=1/i);var o="number"==typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(o*i))),"wheel"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var a="number"==typeof this._targetZoom?this._targetZoom:r.zoom,s=this._startZoom,l=this._easing,u=!1;if("wheel"===this._type&&s&&l){var c=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),p=l(c);r.zoom=t.number(s,a,p),c<1?this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame)):u=!0}else r.zoom=a,u=!0;r.setLocationAtPoint(this._around,this._aroundPoint),this._map.fire(new t.Event("move",{originalEvent:this._lastWheelEvent})),this._map.fire(new t.Event("zoom",{originalEvent:this._lastWheelEvent})),u&&(this._active=!1,this._finishTimeout=setTimeout(function(){e._zooming=!1,e._map.fire(new t.Event("zoomend",{originalEvent:e._lastWheelEvent})),e._map.fire(new t.Event("moveend",{originalEvent:e._lastWheelEvent})),delete e._targetZoom},200))}},pn.prototype._smoothOutEasing=function(e){var r=t.ease;if(this._prevEase){var n=this._prevEase,i=(t.browser.now()-n.start)/n.duration,o=n.easing(i+.01)-n.easing(i),a=.27/Math.sqrt(o*o+1e-4)*.01,s=Math.sqrt(.0729-a*a);r=t.bezier(a,s,.25,1)}return this._prevEase={start:t.browser.now(),duration:e,easing:r},r};var hn=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=r.clickTolerance||1,t.bindAll(["_onMouseMove","_onMouseUp","_onKeyDown"],this)};hn.prototype.isEnabled=function(){return!!this._enabled},hn.prototype.isActive=function(){return!!this._active},hn.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},hn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},hn.prototype.onMouseDown=function(e){this.isEnabled()&&e.shiftKey&&0===e.button&&(t.window.document.addEventListener("mousemove",this._onMouseMove,!1),t.window.document.addEventListener("keydown",this._onKeyDown,!1),t.window.document.addEventListener("mouseup",this._onMouseUp,!1),r.disableDrag(),this._startPos=this._lastPos=r.mousePos(this._el,e),this._active=!0)},hn.prototype._onMouseMove=function(t){var e=r.mousePos(this._el,t);if(!(this._lastPos.equals(e)||!this._box&&e.dist(this._startPos)<this._clickTolerance)){var n=this._startPos;this._lastPos=e,this._box||(this._box=r.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",t));var i=Math.min(n.x,e.x),o=Math.max(n.x,e.x),a=Math.min(n.y,e.y),s=Math.max(n.y,e.y);r.setTransform(this._box,"translate("+i+"px,"+a+"px)"),this._box.style.width=o-i+"px",this._box.style.height=s-a+"px"}},hn.prototype._onMouseUp=function(e){if(0===e.button){var n=this._startPos,i=r.mousePos(this._el,e);this._finish(),r.suppressClick(),n.x===i.x&&n.y===i.y?this._fireEvent("boxzoomcancel",e):this._map.fitScreenCoordinates(n,i,this._map.getBearing(),{linear:!0}).fire(new t.Event("boxzoomend",{originalEvent:e}))}},hn.prototype._onKeyDown=function(t){27===t.keyCode&&(this._finish(),this._fireEvent("boxzoomcancel",t))},hn.prototype._finish=function(){this._active=!1,t.window.document.removeEventListener("mousemove",this._onMouseMove,!1),t.window.document.removeEventListener("keydown",this._onKeyDown,!1),t.window.document.removeEventListener("mouseup",this._onMouseUp,!1),this._container.classList.remove("mapboxgl-crosshair"),this._box&&(r.remove(this._box),this._box=null),r.enableDrag(),delete this._startPos,delete this._lastPos},hn.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,{originalEvent:r}))};var fn=t.bezier(0,0,.25,1),dn=function(e,r){this._map=e,this._el=r.element||e.getCanvasContainer(),this._state="disabled",this._button=r.button||"right",this._bearingSnap=r.bearingSnap||0,this._pitchWithRotate=!1!==r.pitchWithRotate,t.bindAll(["onMouseDown","_onMouseMove","_onMouseUp","_onBlur","_onDragFrame"],this)};dn.prototype.isEnabled=function(){return"disabled"!==this._state},dn.prototype.isActive=function(){return"active"===this._state},dn.prototype.enable=function(){this.isEnabled()||(this._state="enabled")},dn.prototype.disable=function(){if(this.isEnabled())switch(this._state){case"active":this._state="disabled",this._unbind(),this._deactivate(),this._fireEvent("rotateend"),this._pitchWithRotate&&this._fireEvent("pitchend"),this._fireEvent("moveend");break;
vendor: 9,911 bytes, line 65
65case"pending":this._state="disabled",this._unbind();break;default:this._state="disabled"}},dn.prototype.onMouseDown=function(e){if("enabled"===this._state){if("right"===this._button){if(this._eventButton=r.mouseButton(e),this._eventButton!==(e.ctrlKey?0:2))return}else{if(e.ctrlKey||0!==r.mouseButton(e))return;this._eventButton=0}r.disableDrag(),t.window.document.addEventListener("mousemove",this._onMouseMove,{capture:!0}),t.window.document.addEventListener("mouseup",this._onMouseUp),t.window.addEventListener("blur",this._onBlur),this._state="pending",this._inertia=[[t.browser.now(),this._map.getBearing()]],this._startPos=this._lastPos=r.mousePos(this._el,e),this._center=this._map.transform.centerPoint,e.preventDefault()}},dn.prototype._onMouseMove=function(t){var e=r.mousePos(this._el,t);this._lastPos.equals(e)||(this._lastMoveEvent=t,this._lastPos=e,"pending"===this._state&&(this._state="active",this._fireEvent("rotatestart",t),this._fireEvent("movestart",t),this._pitchWithRotate&&this._fireEvent("pitchstart",t)),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onDragFrame)))},dn.prototype._onDragFrame=function(){this._frameId=null;var e=this._lastMoveEvent;if(e){var r=this._map.transform,n=this._startPos,i=this._lastPos,o=.8*(n.x-i.x),a=-.5*(n.y-i.y),s=r.bearing-o,l=r.pitch-a,u=this._inertia,c=u[u.length-1];this._drainInertiaBuffer(),u.push([t.browser.now(),this._map._normalizeBearing(s,c[1])]),r.bearing=s,this._pitchWithRotate&&(this._fireEvent("pitch",e),r.pitch=l),this._fireEvent("rotate",e),this._fireEvent("move",e),delete this._lastMoveEvent,this._startPos=this._lastPos}},dn.prototype._onMouseUp=function(t){if(r.mouseButton(t)===this._eventButton)switch(this._state){case"active":this._state="enabled",r.suppressClick(),this._unbind(),this._deactivate(),this._inertialRotate(t);break;case"pending":this._state="enabled",this._unbind()}},dn.prototype._onBlur=function(t){switch(this._state){case"active":this._state="enabled",this._unbind(),this._deactivate(),this._fireEvent("rotateend",t),this._pitchWithRotate&&this._fireEvent("pitchend",t),this._fireEvent("moveend",t);break;case"pending":this._state="enabled",this._unbind()}},dn.prototype._unbind=function(){t.window.document.removeEventListener("mousemove",this._onMouseMove,{capture:!0}),t.window.document.removeEventListener("mouseup",this._onMouseUp),t.window.removeEventListener("blur",this._onBlur),r.enableDrag()},dn.prototype._deactivate=function(){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._lastMoveEvent,delete this._startPos,delete this._lastPos},dn.prototype._inertialRotate=function(t){var e=this;this._fireEvent("rotateend",t),this._drainInertiaBuffer();var r=this._map,n=r.getBearing(),i=this._inertia,o=function(){Math.abs(n)<e._bearingSnap?r.resetNorth({noMoveStart:!0},{originalEvent:t}):e._fireEvent("moveend",t),e._pitchWithRotate&&e._fireEvent("pitchend",t)};if(i.length<2)o();else{var a=i[0],s=i[i.length-1],l=i[i.length-2],u=r._normalizeBearing(n,l[1]),c=s[1]-a[1],p=c<0?-1:1,h=(s[0]-a[0])/1e3;if(0!==c&&0!==h){var f=Math.abs(c*(.25/h));f>180&&(f=180);var d=f/180;u+=p*f*(d/2),Math.abs(r._normalizeBearing(u,0))<this._bearingSnap&&(u=r._normalizeBearing(0,u)),r.rotateTo(u,{duration:1e3*d,easing:fn,noMoveStart:!0},{originalEvent:t})}else o()}},dn.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,r?{originalEvent:r}:{}))},dn.prototype._drainInertiaBuffer=function(){for(var e=this._inertia,r=t.browser.now();e.length>0&&r-e[0][0]>160;)e.shift()};var mn=t.bezier(0,0,.3,1),gn=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._state="disabled",this._clickTolerance=r.clickTolerance||1,t.bindAll(["_onMove","_onMouseUp","_onTouchEnd","_onBlur","_onDragFrame"],this)};gn.prototype.isEnabled=function(){return"disabled"!==this._state},gn.prototype.isActive=function(){return"active"===this._state},gn.prototype.enable=function(){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-drag-pan"),this._state="enabled")},gn.prototype.disable=function(){if(this.isEnabled())switch(this._el.classList.remove("mapboxgl-touch-drag-pan"),this._state){case"active":this._state="disabled",this._unbind(),this._deactivate(),this._fireEvent("dragend"),this._fireEvent("moveend");break;case"pending":this._state="disabled",this._unbind();break;default:this._state="disabled"}},gn.prototype.onMouseDown=function(e){"enabled"===this._state&&(e.ctrlKey||0!==r.mouseButton(e)||(r.addEventListener(t.window.document,"mousemove",this._onMove,{capture:!0}),r.addEventListener(t.window.document,"mouseup",this._onMouseUp),this._start(e)))},gn.prototype.onTouchStart=function(e){"enabled"===this._state&&(e.touches.length>1||(r.addEventListener(t.window.document,"touchmove",this._onMove,{capture:!0,passive:!1}),r.addEventListener(t.window.document,"touchend",this._onTouchEnd),this._start(e)))},gn.prototype._start=function(e){t.window.addEventListener("blur",this._onBlur),this._state="pending",this._startPos=this._mouseDownPos=this._lastPos=r.mousePos(this._el,e),this._inertia=[[t.browser.now(),this._startPos]]},gn.prototype._onMove=function(e){e.preventDefault();var n=r.mousePos(this._el,e);this._lastPos.equals(n)||"pending"===this._state&&n.dist(this._mouseDownPos)<this._clickTolerance||(this._lastMoveEvent=e,this._lastPos=n,this._drainInertiaBuffer(),this._inertia.push([t.browser.now(),this._lastPos]),"pending"===this._state&&(this._state="active",this._fireEvent("dragstart",e),this._fireEvent("movestart",e)),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onDragFrame)))},gn.prototype._onDragFrame=function(){this._frameId=null;var t=this._lastMoveEvent;if(t){var e=this._map.transform;e.setLocationAtPoint(e.pointLocation(this._startPos),this._lastPos),this._fireEvent("drag",t),this._fireEvent("move",t),this._startPos=this._lastPos,delete this._lastMoveEvent}},gn.prototype._onMouseUp=function(t){if(0===r.mouseButton(t))switch(this._state){case"active":this._state="enabled",r.suppressClick(),this._unbind(),this._deactivate(),this._inertialPan(t);break;case"pending":this._state="enabled",this._unbind()}},gn.prototype._onTouchEnd=function(t){switch(this._state){case"active":this._state="enabled",this._unbind(),this._deactivate(),this._inertialPan(t);break;case"pending":this._state="enabled",this._unbind()}},gn.prototype._onBlur=function(t){switch(this._state){case"active":this._state="enabled",this._unbind(),this._deactivate(),this._fireEvent("dragend",t),this._fireEvent("moveend",t);break;case"pending":this._state="enabled",this._unbind()}},gn.prototype._unbind=function(){r.removeEventListener(t.window.document,"touchmove",this._onMove,{capture:!0,passive:!1}),r.removeEventListener(t.window.document,"touchend",this._onTouchEnd),r.removeEventListener(t.window.document,"mousemove",this._onMove,{capture:!0}),r.removeEventListener(t.window.document,"mouseup",this._onMouseUp),r.removeEventListener(t.window,"blur",this._onBlur)},gn.prototype._deactivate=function(){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._lastMoveEvent,delete this._startPos,delete this._mouseDownPos,delete this._lastPos},gn.prototype._inertialPan=function(t){this._fireEvent("dragend",t),this._drainInertiaBuffer();var e=this._inertia;if(e.length<2)this._fireEvent("moveend",t);else{var r=e[e.length-1],n=e[0],i=r[1].sub(n[1]),o=(r[0]-n[0])/1e3;if(0===o||r[1].equals(n[1]))this._fireEvent("moveend",t);else{var a=i.mult(.3/o),s=a.mag();s>1400&&(s=1400,a._unit()._mult(s));var l=s/750,u=a.mult(-l/2);this._map.panBy(u,{duration:1e3*l,easing:mn,noMoveStart:!0},{originalEvent:t})}}},gn.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,r?{originalEvent:r}:{}))},gn.prototype._drainInertiaBuffer=function(){for(var e=this._inertia,r=t.browser.now();e.length>0&&r-e[0][0]>160;)e.shift()};var yn=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll(["_onKeyDown"],this)};function vn(t){return t*(2-t)}yn.prototype.isEnabled=function(){return!!this._enabled},yn.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener("keydown",this._onKeyDown,!1),this._enabled=!0)},yn.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener("keydown",this._onKeyDown),this._enabled=!1)},yn.prototype._onKeyDown=function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=0,r=0,n=0,i=0,o=0;switch(t.keyCode){case 61:case 107:case 171:case 187:e=1;break;case 189:case 109:case 173:e=-1;break;case 37:t.shiftKey?r=-1:(t.preventDefault(),i=-1);break;case 39:t.shiftKey?r=1:(t.preventDefault(),i=1);break;case 38:t.shiftKey?n=1:(t.preventDefault(),o=-1);break;case 40:t.shiftKey?n=-1:(o=1,t.preventDefault());break;default:return}var a=this._map,s=a.getZoom(),l={duration:300,delayEndEvents:500,easing:vn,zoom:e?Math.round(s)+e*(t.shiftKey?2:1):s,bearing:a.getBearing()+15*r,pitch:a.getPitch()+10*n,offset:[100*-i,100*-o],center:a.getCenter()};a.easeTo(l,{originalEvent:t})}};var _n=function(e){this._map=e,t.bindAll(["_onDblClick","_onZoomEnd"],this)};_n.prototype.isEnabled=function(){return!!this._enabled},_n.prototype.isActive=function(){return!!this._active},_n.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},_n.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},_n.prototype.onTouchStart=function(t){var e=this;this.isEnabled()&&(t.points.length>1||(this._tapped?(clearTimeout(this._tapped),this._tapped=null,this._zoom(t)):this._tapped=setTimeout(function(){e._tapped=null},300)))},_n.prototype.onDblClick=function(t){this.isEnabled()&&(t.originalEvent.preventDefault(),this._zoom(t))},_n.prototype._zoom=function(t){this._active=!0,this._map.on("zoomend",this._onZoomEnd),this._map.zoomTo(this._map.getZoom()+(t.originalEvent.shiftKey?-1:1),{around:t.lngLat},t)},_n.prototype._onZoomEnd=function(){this._active=!1,this._map.off("zoomend",this._onZoomEnd)};
vendor: 10,450 bytes, line 65
65var xn=t.bezier(0,0,.15,1),bn=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll(["_onMove","_onEnd","_onTouchFrame"],this)};bn.prototype.isEnabled=function(){return!!this._enabled},bn.prototype.enable=function(t){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-zoom-rotate"),this._enabled=!0,this._aroundCenter=!!t&&"center"===t.around)},bn.prototype.disable=function(){this.isEnabled()&&(this._el.classList.remove("mapboxgl-touch-zoom-rotate"),this._enabled=!1)},bn.prototype.disableRotation=function(){this._rotationDisabled=!0},bn.prototype.enableRotation=function(){this._rotationDisabled=!1},bn.prototype.onStart=function(e){if(this.isEnabled()&&2===e.touches.length){var n=r.mousePos(this._el,e.touches[0]),i=r.mousePos(this._el,e.touches[1]),o=n.add(i).div(2);this._startVec=n.sub(i),this._startAround=this._map.transform.pointLocation(o),this._gestureIntent=void 0,this._inertia=[],r.addEventListener(t.window.document,"touchmove",this._onMove,{passive:!1}),r.addEventListener(t.window.document,"touchend",this._onEnd)}},bn.prototype._getTouchEventData=function(t){var e=r.mousePos(this._el,t.touches[0]),n=r.mousePos(this._el,t.touches[1]),i=e.sub(n);return{vec:i,center:e.add(n).div(2),scale:i.mag()/this._startVec.mag(),bearing:this._rotationDisabled?0:180*i.angleWith(this._startVec)/Math.PI}},bn.prototype._onMove=function(e){if(2===e.touches.length){var r=this._getTouchEventData(e),n=r.vec,i=r.scale,o=r.bearing;if(!this._gestureIntent){var a=this._rotationDisabled&&1!==i||Math.abs(1-i)>.15;Math.abs(o)>10?this._gestureIntent="rotate":a&&(this._gestureIntent="zoom"),this._gestureIntent&&(this._map.fire(new t.Event(this._gestureIntent+"start",{originalEvent:e})),this._map.fire(new t.Event("movestart",{originalEvent:e})),this._startVec=n)}this._lastTouchEvent=e,this._frameId||(this._frameId=this._map._requestRenderFrame(this._onTouchFrame)),e.preventDefault()}},bn.prototype._onTouchFrame=function(){this._frameId=null;var e=this._gestureIntent;if(e){var r=this._map.transform;this._startScale||(this._startScale=r.scale,this._startBearing=r.bearing);var n=this._getTouchEventData(this._lastTouchEvent),i=n.center,o=n.bearing,a=n.scale,s=r.pointLocation(i),l=r.locationPoint(s);"rotate"===e&&(r.bearing=this._startBearing+o),r.zoom=r.scaleZoom(this._startScale*a),r.setLocationAtPoint(this._startAround,l),this._map.fire(new t.Event(e,{originalEvent:this._lastTouchEvent})),this._map.fire(new t.Event("move",{originalEvent:this._lastTouchEvent})),this._drainInertiaBuffer(),this._inertia.push([t.browser.now(),a,i])}},bn.prototype._onEnd=function(e){r.removeEventListener(t.window.document,"touchmove",this._onMove,{passive:!1}),r.removeEventListener(t.window.document,"touchend",this._onEnd);var n=this._gestureIntent,i=this._startScale;if(this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._gestureIntent,delete this._startScale,delete this._startBearing,delete this._lastTouchEvent,n){this._map.fire(new t.Event(n+"end",{originalEvent:e})),this._drainInertiaBuffer();var o=this._inertia,a=this._map;if(o.length<2)a.snapToNorth({},{originalEvent:e});else{var s=o[o.length-1],l=o[0],u=a.transform.scaleZoom(i*s[1]),c=a.transform.scaleZoom(i*l[1]),p=u-c,h=(s[0]-l[0])/1e3,f=s[2];if(0!==h&&u!==c){var d=.15*p/h;Math.abs(d)>2.5&&(d=d>0?2.5:-2.5);var m=1e3*Math.abs(d/(12*.15)),g=u+d*m/2e3;g<0&&(g=0),a.easeTo({zoom:g,duration:m,easing:xn,around:this._aroundCenter?a.getCenter():a.unproject(f),noMoveStart:!0},{originalEvent:e})}else a.snapToNorth({},{originalEvent:e})}}},bn.prototype._drainInertiaBuffer=function(){for(var e=this._inertia,r=t.browser.now();e.length>2&&r-e[0][0]>160;)e.shift()};var wn={scrollZoom:pn,boxZoom:hn,dragRotate:dn,dragPan:gn,keyboard:yn,doubleClickZoom:_n,touchZoomRotate:bn},En=function(e){function r(r,n){e.call(this),this._moving=!1,this._zooming=!1,this.transform=r,this._bearingSnap=n.bearingSnap,t.bindAll(["_renderFrameCallback"],this)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getCenter=function(){return this.transform.center},r.prototype.setCenter=function(t,e){return this.jumpTo({center:t},e)},r.prototype.panBy=function(e,r,n){return e=t.Point.convert(e).mult(-1),this.panTo(this.transform.center,t.extend({offset:e},r),n)},r.prototype.panTo=function(e,r,n){return this.easeTo(t.extend({center:e},r),n)},r.prototype.getZoom=function(){return this.transform.zoom},r.prototype.setZoom=function(t,e){return this.jumpTo({zoom:t},e),this},r.prototype.zoomTo=function(e,r,n){return this.easeTo(t.extend({zoom:e},r),n)},r.prototype.zoomIn=function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},r.prototype.zoomOut=function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},r.prototype.getBearing=function(){return this.transform.bearing},r.prototype.setBearing=function(t,e){return this.jumpTo({bearing:t},e),this},r.prototype.rotateTo=function(e,r,n){return this.easeTo(t.extend({bearing:e},r),n)},r.prototype.resetNorth=function(e,r){return this.rotateTo(0,t.extend({duration:1e3},e),r),this},r.prototype.snapToNorth=function(t,e){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(t,e):this},r.prototype.getPitch=function(){return this.transform.pitch},r.prototype.setPitch=function(t,e){return this.jumpTo({pitch:t},e),this},r.prototype.cameraForBounds=function(e,r){return e=t.LngLatBounds.convert(e),this._cameraForBoxAndBearing(e.getNorthWest(),e.getSouthEast(),0,r)},r.prototype._cameraForBoxAndBearing=function(e,r,n,i){if("number"==typeof(i=t.extend({padding:{top:0,bottom:0,right:0,left:0},offset:[0,0],maxZoom:this.transform.maxZoom},i)).padding){var o=i.padding;i.padding={top:o,bottom:o,right:o,left:o}}if(t.isEqual(Object.keys(i.padding).sort(function(t,e){return t<e?-1:t>e?1:0}),["bottom","left","right","top"])){var a=this.transform,s=a.project(t.LngLat.convert(e)),l=a.project(t.LngLat.convert(r)),u=s.rotate(-n*Math.PI/180),c=l.rotate(-n*Math.PI/180),p=new t.Point(Math.max(u.x,c.x),Math.max(u.y,c.y)),h=new t.Point(Math.min(u.x,c.x),Math.min(u.y,c.y)),f=p.sub(h),d=(a.width-i.padding.left-i.padding.right)/f.x,m=(a.height-i.padding.top-i.padding.bottom)/f.y;if(!(m<0||d<0)){var g=Math.min(a.scaleZoom(a.scale*Math.min(d,m)),i.maxZoom),y=t.Point.convert(i.offset),v=(i.padding.left-i.padding.right)/2,_=(i.padding.top-i.padding.bottom)/2,x=new t.Point(y.x+v,y.y+_).mult(a.scale/a.zoomScale(g));return{center:a.unproject(s.add(l).div(2).sub(x)),zoom:g,bearing:n}}t.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}else t.warnOnce("options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'")},r.prototype.fitBounds=function(t,e,r){return this._fitInternal(this.cameraForBounds(t,e),e,r)},r.prototype.fitScreenCoordinates=function(e,r,n,i,o){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(t.Point.convert(e)),this.transform.pointLocation(t.Point.convert(r)),n,i),i,o)},r.prototype._fitInternal=function(e,r,n){return e?(r=t.extend(e,r)).linear?this.easeTo(r,n):this.flyTo(r,n):this},r.prototype.jumpTo=function(e,r){this.stop();var n=this.transform,i=!1,o=!1,a=!1;return"zoom"in e&&n.zoom!==+e.zoom&&(i=!0,n.zoom=+e.zoom),void 0!==e.center&&(n.center=t.LngLat.convert(e.center)),"bearing"in e&&n.bearing!==+e.bearing&&(o=!0,n.bearing=+e.bearing),"pitch"in e&&n.pitch!==+e.pitch&&(a=!0,n.pitch=+e.pitch),this.fire(new t.Event("movestart",r)).fire(new t.Event("move",r)),i&&this.fire(new t.Event("zoomstart",r)).fire(new t.Event("zoom",r)).fire(new t.Event("zoomend",r)),o&&this.fire(new t.Event("rotatestart",r)).fire(new t.Event("rotate",r)).fire(new t.Event("rotateend",r)),a&&this.fire(new t.Event("pitchstart",r)).fire(new t.Event("pitch",r)).fire(new t.Event("pitchend",r)),this.fire(new t.Event("moveend",r))},r.prototype.easeTo=function(e,r){var n=this;this.stop(),!1===(e=t.extend({offset:[0,0],duration:500,easing:t.ease},e)).animate&&(e.duration=0);var i=this.transform,o=this.getZoom(),a=this.getBearing(),s=this.getPitch(),l="zoom"in e?+e.zoom:o,u="bearing"in e?this._normalizeBearing(e.bearing,a):a,c="pitch"in e?+e.pitch:s,p=i.centerPoint.add(t.Point.convert(e.offset)),h=i.pointLocation(p),f=t.LngLat.convert(e.center||h);this._normalizeCenter(f);var d,m,g=i.project(h),y=i.project(f).sub(g),v=i.zoomScale(l-o);return e.around&&(d=t.LngLat.convert(e.around),m=i.locationPoint(d)),this._zooming=l!==o,this._rotating=a!==u,this._pitching=c!==s,this._prepareEase(r,e.noMoveStart),clearTimeout(this._easeEndTimeoutID),this._ease(function(e){if(n._zooming&&(i.zoom=t.number(o,l,e)),n._rotating&&(i.bearing=t.number(a,u,e)),n._pitching&&(i.pitch=t.number(s,c,e)),d)i.setLocationAtPoint(d,m);else{var h=i.zoomScale(i.zoom-o),f=l>o?Math.min(2,v):Math.max(.5,v),_=Math.pow(f,1-e),x=i.unproject(g.add(y.mult(e*_)).mult(h));i.setLocationAtPoint(i.renderWorldCopies?x.wrap():x,p)}n._fireMoveEvents(r)},function(){e.delayEndEvents?n._easeEndTimeoutID=setTimeout(function(){return n._afterEase(r)},e.delayEndEvents):n._afterEase(r)},e),this},r.prototype._prepareEase=function(e,r){this._moving=!0,r||this.fire(new t.Event("movestart",e)),this._zooming&&this.fire(new t.Event("zoomstart",e)),this._rotating&&this.fire(new t.Event("rotatestart",e)),this._pitching&&this.fire(new t.Event("pitchstart",e))},r.prototype._fireMoveEvents=function(e){this.fire(new t.Event("move",e)),this._zooming&&this.fire(new t.Event("zoom",e)),this._rotating&&this.fire(new t.Event("rotate",e)),this._pitching&&this.fire(new t.Event("pitch",e))},r.prototype._afterEase=function(e){var r=this._zooming,n=this._rotating,i=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,r&&this.fire(new t.Event("zoomend",e)),n&&this.fire(new t.Event("rotateend",e)),i&&this.fire(new t.Event("pitchend",e)),this.fire(new t.Event("moveend",e))},r.prototype.flyTo=function(e,r){var n=this;this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var i=this.transform,o=this.getZoom(),a=this.getBearing(),s=this.getPitch(),l="zoom"in e?t.clamp(+e.zoom,i.minZoom,i.maxZoom):o,u="bearing"in e?this._normalizeBearing(e.bearing,a):a,c="pitch"in e?+e.pitch:s,p=i.zoomScale(l-o),h=i.centerPoint.add(t.Point.convert(e.offset)),f=i.pointLocation(h),d=t.LngLat.convert(e.center||f);this._normalizeCenter(d);var m=i.project(f),g=i.project(d).sub(m),y=e.curve,v=Math.max(i.width,i.height),_=v/p,x=g.mag();
vendor: 5,078 bytes, line 65
65if("minZoom"in e){var b=t.clamp(Math.min(e.minZoom,o,l),i.minZoom,i.maxZoom),w=v/i.zoomScale(b-o);y=Math.sqrt(w/x*2)}var E=y*y;function T(t){var e=(_*_-v*v+(t?-1:1)*E*E*x*x)/(2*(t?_:v)*E*x);return Math.log(Math.sqrt(e*e+1)-e)}function S(t){return(Math.exp(t)-Math.exp(-t))/2}function C(t){return(Math.exp(t)+Math.exp(-t))/2}var A=T(0),I=function(t){return C(A)/C(A+y*t)},D=function(t){return v*((C(A)*(S(e=A+y*t)/C(e))-S(A))/E)/x;var e},k=(T(1)-A)/y;if(Math.abs(x)<1e-6||!isFinite(k)){if(Math.abs(v-_)<1e-6)return this.easeTo(e,r);var M=_<v?-1:1;k=Math.abs(Math.log(_/v))/y,D=function(){return 0},I=function(t){return Math.exp(M*y*t)}}if("duration"in e)e.duration=+e.duration;else{var P="screenSpeed"in e?+e.screenSpeed/y:+e.speed;e.duration=1e3*k/P}return e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=a!==u,this._pitching=c!==s,this._prepareEase(r,!1),this._ease(function(e){var p=e*k,f=1/I(p);i.zoom=1===e?l:o+i.scaleZoom(f),n._rotating&&(i.bearing=t.number(a,u,e)),n._pitching&&(i.pitch=t.number(s,c,e));var y=1===e?d:i.unproject(m.add(g.mult(D(p))).mult(f));i.setLocationAtPoint(i.renderWorldCopies?y.wrap():y,h),n._fireMoveEvents(r)},function(){return n._afterEase(r)},e),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var t=this._onEaseEnd;delete this._onEaseEnd,t.call(this)}return this},r.prototype._ease=function(e,r,n){!1===n.animate||0===n.duration?(e(1),r()):(this._easeStart=t.browser.now(),this._easeOptions=n,this._onEaseFrame=e,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var e=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},r.prototype._normalizeBearing=function(e,r){e=t.wrap(e,-180,180);var n=Math.abs(e-r);return Math.abs(e-360-r)<n&&(e-=360),Math.abs(e+360-r)<n&&(e+=360),e},r.prototype._normalizeCenter=function(t){var e=this.transform;if(e.renderWorldCopies&&!e.lngRange){var r=t.lng-e.center.lng;t.lng+=r>180?-360:r<-180?360:0}},r}(t.Evented),Tn=function(e){void 0===e&&(e={}),this.options=e,t.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};Tn.prototype.getDefaultPosition=function(){return"bottom-right"},Tn.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=r.create("div","mapboxgl-ctrl-attrib-inner",this._container),e&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===e&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Tn.prototype.onRemove=function(){r.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0},Tn.prototype._updateEditLink=function(){var e=this._editLink;e||(e=this._editLink=this._container.querySelector(".mapbox-improve-map"));var r=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:t.config.ACCESS_TOKEN}];if(e){var n=r.reduce(function(t,e,n){return e.value&&(t+=e.key+"="+e.value+(n<r.length-1?"&":"")),t},"?");e.href=t.config.FEEDBACK_URL+"/"+n+(this._map._hash?this._map._hash.getHashString(!0):"")}},Tn.prototype._updateData=function(t){!t||"metadata"!==t.sourceDataType&&"style"!==t.dataType||(this._updateAttributions(),this._updateEditLink())},Tn.prototype._updateAttributions=function(){if(this._map.style){var t=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?t=t.concat(this.options.customAttribution.map(function(t){return"string"!=typeof t?"":t})):"string"==typeof this.options.customAttribution&&t.push(this.options.customAttribution)),this._map.style.stylesheet){var e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}var r=this._map.style.sourceCaches;for(var n in r){var i=r[n];if(i.used){var o=i.getSource();o.attribution&&t.indexOf(o.attribution)<0&&t.push(o.attribution)}}t.sort(function(t,e){return t.length-e.length}),(t=t.filter(function(e,r){for(var n=r+1;n<t.length;n++)if(t[n].indexOf(e)>=0)return!1;return!0})).length?(this._innerContainer.innerHTML=t.join(" | "),this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null}},Tn.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};
65var Sn=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};Sn.prototype.onAdd=function(t){this._map=t,this._container=r.create("div","mapboxgl-ctrl");var e=r.create("a","mapboxgl-ctrl-logo");return e.target="_blank",e.href="https://www.mapbox.com/",e.setAttribute("aria-label","Mapbox logo"),e.setAttribute("rel","noopener"),this._container.appendChild(e),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Sn.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Sn.prototype.getDefaultPosition=function(){return"bottom-left"},Sn.prototype._updateLogo=function(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},Sn.prototype._logoRequired=function(){if(this._map.style){var t=this._map.style.sourceCaches;for(var e in t)if(t[e].getSource().mapbox_logo)return!0;return!1}},Sn.prototype._updateCompact=function(){var t=this._container.children;if(t.length){var e=t[0];this._map.getCanvasContainer().offsetWidth<250?e.classList.add("mapboxgl-compact"):e.classList.remove("mapboxgl-compact")}};var Cn=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Cn.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},Cn.prototype.remove=function(t){for(var e=this._currentlyRunning,r=0,n=e?this._queue.concat(e):this._queue;r<n.length;r+=1){var i=n[r];if(i.id===t)return void(i.cancelled=!0)}},Cn.prototype.run=function(){var t=this._currentlyRunning=this._queue;this._queue=[];for(var e=0,r=t;e<r.length;e+=1){var n=r[e];if(!n.cancelled&&(n.callback(),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},Cn.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var An=t.window.HTMLImageElement,In=t.window.HTMLElement,Dn={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:0,maxZoom:22,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,bearingSnap:7,clickTolerance:3,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,transformRequest:null,fadeDuration:300,crossSourceCollisions:!0},kn=function(n){function i(e){var i=this;if(null!=(e=t.extend({},Dn,e)).minZoom&&null!=e.maxZoom&&e.minZoom>e.maxZoom)throw new Error("maxZoom must be greater than minZoom");var o=new on(e.minZoom,e.maxZoom,e.renderWorldCopies);n.call(this,o,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossSourceCollisions=e.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new Cn,this._controls=[],this._mapId=t.uniqueId();var a=e.transformRequest;if(this._transformRequest=a?function(t,e){return a(t,e)||{url:t}}:function(t){return{url:t}},"string"==typeof e.container){if(this._container=t.window.document.getElementById(e.container),!this._container)throw new Error("Container '"+e.container+"' not found.")}else{if(!(e.container instanceof In))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=e.container}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return i._update(!1)}),this.on("moveend",function(){return i._update(!1)}),this.on("zoom",function(){return i._update(!0)}),void 0!==t.window&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1)),function(t,e){var n=t.getCanvasContainer(),i=null,o=!1,a=null;for(var s in wn)t[s]=new wn[s](t,e),e.interactive&&e[s]&&t[s].enable(e[s]);r.addEventListener(n,"mouseout",function(e){t.fire(new ln("mouseout",t,e))}),r.addEventListener(n,"mousedown",function(i){o=!0,a=r.mousePos(n,i);var s=new ln("mousedown",t,i);t.fire(s),s.defaultPrevented||(e.interactive&&!t.doubleClickZoom.isActive()&&t.stop(),t.boxZoom.onMouseDown(i),t.boxZoom.isActive()||t.dragPan.isActive()||t.dragRotate.onMouseDown(i),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onMouseDown(i))}),r.addEventListener(n,"mouseup",function(e){var r=t.dragRotate.isActive();i&&!r&&t.fire(new ln("contextmenu",t,i)),i=null,o=!1,t.fire(new ln("mouseup",t,e))}),r.addEventListener(n,"mousemove",function(e){if(!t.dragPan.isActive()&&!t.dragRotate.isActive()){for(var r=e.target;r&&r!==n;)r=r.parentNode;r===n&&t.fire(new ln("mousemove",t,e))}}),r.addEventListener(n,"mouseover",function(e){for(var r=e.target;r&&r!==n;)r=r.parentNode;r===n&&t.fire(new ln("mouseover",t,e))}),r.addEventListener(n,"touchstart",function(r){var n=new un("touchstart",t,r);t.fire(n),n.defaultPrevented||(e.interactive&&t.stop(),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onTouchStart(r),t.touchZoomRotate.onStart(r),t.doubleClickZoom.onTouchStart(n))},{passive:!1}),r.addEventListener(n,"touchmove",function(e){t.fire(new un("touchmove",t,e))},{passive:!1}),r.addEventListener(n,"touchend",function(e){t.fire(new un("touchend",t,e))}),r.addEventListener(n,"touchcancel",function(e){t.fire(new un("touchcancel",t,e))}),r.addEventListener(n,"click",function(i){var o=r.mousePos(n,i);(o.equals(a)||o.dist(a)<e.clickTolerance)&&t.fire(new ln("click",t,i))}),r.addEventListener(n,"dblclick",function(e){var r=new ln("dblclick",t,e);t.fire(r),r.defaultPrevented||t.doubleClickZoom.onDblClick(r)}
65),r.addEventListener(n,"contextmenu",function(e){var r=t.dragRotate.isActive();o||r?o&&(i=e):t.fire(new ln("contextmenu",t,e)),(t.dragRotate.isEnabled()||t.listens("contextmenu"))&&e.preventDefault()}),r.addEventListener(n,"wheel",function(r){e.interactive&&t.stop();var n=new cn("wheel",t,r);t.fire(n),n.defaultPrevented||t.scrollZoom.onWheel(r)},{passive:!1})}(this,e),this._hash=e.hash&&(new sn).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(this.resize(),this.fitBounds(e.bounds,t.extend({},e.fitBoundsOptions,{duration:0})))),this.resize(),e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new Tn({customAttribution:e.customAttribution})),this.addControl(new Sn,e.logoPosition),this.on("style.load",function(){i.transform.unmodified&&i.jumpTo(i.style.stylesheet)}),this.on("data",function(e){i._update("style"===e.dataType),i.fire(new t.Event(e.dataType+"data",e))}),this.on("dataloading",function(e){i.fire(new t.Event(e.dataType+"dataloading",e))})}n&&(i.__proto__=n),i.prototype=Object.create(n&&n.prototype),i.prototype.constructor=i;var o={showTileBoundaries:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0}};return i.prototype._getMapId=function(){return this._mapId},i.prototype.addControl=function(e,r){if(void 0===r&&e.getDefaultPosition&&(r=e.getDefaultPosition()),void 0===r&&(r="top-right"),!e||!e.onAdd)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var n=e.onAdd(this);this._controls.push(e);var i=this._controlPositions[r];return-1!==r.indexOf("bottom")?i.insertBefore(n,i.firstChild):i.appendChild(n),this},i.prototype.removeControl=function(e){if(!e||!e.onRemove)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var r=this._controls.indexOf(e);return r>-1&&this._controls.splice(r,1),e.onRemove(this),this},i.prototype.resize=function(e){var r=this._containerDimensions(),n=r[0],i=r[1];return this._resizeCanvas(n,i),this.transform.resize(n,i),this.painter.resize(n,i),this.fire(new t.Event("movestart",e)).fire(new t.Event("move",e)).fire(new t.Event("resize",e)).fire(new t.Event("moveend",e)),this},i.prototype.getBounds=function(){return this.transform.getBounds()},i.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},i.prototype.setMaxBounds=function(e){return this.transform.setMaxBounds(t.LngLatBounds.convert(e)),this._update()},i.prototype.setMinZoom=function(t){if((t=null==t?0:t)>=0&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()<t&&this.setZoom(t),this;throw new Error("minZoom must be between 0 and the current maxZoom, inclusive")},i.prototype.getMinZoom=function(){return this.transform.minZoom},i.prototype.setMaxZoom=function(t){if((t=null==t?22:t)>=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be greater than the current minZoom")},i.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},i.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},i.prototype.getMaxZoom=function(){return this.transform.maxZoom},i.prototype.project=function(e){return this.transform.locationPoint(t.LngLat.convert(e))},i.prototype.unproject=function(e){return this.transform.pointLocation(t.Point.convert(e))},i.prototype.isMoving=function(){return this._moving||this.dragPan.isActive()||this.dragRotate.isActive()||this.scrollZoom.isActive()},i.prototype.isZooming=function(){return this._zooming||this.scrollZoom.isZooming()},i.prototype.isRotating=function(){return this._rotating||this.dragRotate.isActive()},i.prototype.on=function(t,e,r){var i=this;if(void 0===r)return n.prototype.on.call(this,t,e);var o=function(){var n;
vendor: 7,002 bytes, line 65
65if("mouseenter"===t||"mouseover"===t){var o=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){var a=i.getLayer(e)?i.queryRenderedFeatures(n.point,{layers:[e]}):[];a.length?o||(o=!0,r.call(i,new ln(t,i,n.originalEvent,{features:a}))):o=!1},mouseout:function(){o=!1}}}}if("mouseleave"===t||"mouseout"===t){var a=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){(i.getLayer(e)?i.queryRenderedFeatures(n.point,{layers:[e]}):[]).length?a=!0:a&&(a=!1,r.call(i,new ln(t,i,n.originalEvent)))},mouseout:function(e){a&&(a=!1,r.call(i,new ln(t,i,e.originalEvent)))}}}}return{layer:e,listener:r,delegates:(n={},n[t]=function(t){var n=i.getLayer(e)?i.queryRenderedFeatures(t.point,{layers:[e]}):[];n.length&&(t.features=n,r.call(i,t),delete t.features)},n)}}();for(var a in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(o),o.delegates)this.on(a,o.delegates[a]);return this},i.prototype.off=function(t,e,r){if(void 0===r)return n.prototype.off.call(this,t,e);if(this._delegatedListeners&&this._delegatedListeners[t])for(var i=this._delegatedListeners[t],o=0;o<i.length;o++){var a=i[o];if(a.layer===e&&a.listener===r){for(var s in a.delegates)this.off(s,a.delegates[s]);return i.splice(o,1),this}}return this},i.prototype.queryRenderedFeatures=function(e,r){if(!this.style)return[];var n;if(void 0!==r||void 0===e||e instanceof t.Point||Array.isArray(e)||(r=e,e=void 0),r=r||{},(e=e||[[0,0],[this.transform.width,this.transform.height]])instanceof t.Point||"number"==typeof e[0])n=[t.Point.convert(e)];else{var i=t.Point.convert(e[0]),o=t.Point.convert(e[1]);n=[i,new t.Point(o.x,i.y),o,new t.Point(i.x,o.y),i]}return this.style.queryRenderedFeatures(n,r,this.transform)},i.prototype.querySourceFeatures=function(t,e){return this.style.querySourceFeatures(t,e)},i.prototype.setStyle=function(t,e){return(!e||!1!==e.diff&&!e.localIdeographFontFamily)&&this.style&&t?(this._diffStyle(t,e),this):this._updateStyle(t,e)},i.prototype._updateStyle=function(t,e){return this.style&&(this.style.setEventedParent(null),this.style._remove()),t?(this.style=new Me(this,e||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof t?this.style.loadURL(t):this.style.loadJSON(t),this):(delete this.style,this)},i.prototype._diffStyle=function(e,r){var n=this;if("string"==typeof e){var i=t.normalizeStyleURL(e),o=this._transformRequest(i,t.ResourceType.Style);t.getJSON(o,function(e,i){e?n.fire(new t.ErrorEvent(e)):i&&n._updateDiff(i,r)})}else"object"==typeof e&&this._updateDiff(e,r)},i.prototype._updateDiff=function(e,r){try{this.style.setState(e)&&this._update(!0)}catch(n){t.warnOnce("Unable to perform style diff: "+(n.message||n.error||n)+".  Rebuilding the style from scratch."),this._updateStyle(e,r)}},i.prototype.getStyle=function(){if(this.style)return this.style.serialize()},i.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():t.warnOnce("There is no style added to the map.")},i.prototype.addSource=function(t,e){return this.style.addSource(t,e),this._update(!0)},i.prototype.isSourceLoaded=function(e){var r=this.style&&this.style.sourceCaches[e];if(void 0!==r)return r.loaded();this.fire(new t.ErrorEvent(new Error("There is no source with ID '"+e+"'")))},i.prototype.areTilesLoaded=function(){var t=this.style&&this.style.sourceCaches;for(var e in t){var r=t[e]._tiles;for(var n in r){var i=r[n];if("loaded"!==i.state&&"errored"!==i.state)return!1}}return!0},i.prototype.addSourceType=function(t,e,r){return this.style.addSourceType(t,e,r)},i.prototype.removeSource=function(t){return this.style.removeSource(t),this._update(!0)},i.prototype.getSource=function(t){return this.style.getSource(t)},i.prototype.addImage=function(e,r,n){void 0===n&&(n={});var i=n.pixelRatio;void 0===i&&(i=1);var o=n.sdf;if(void 0===o&&(o=!1),r instanceof An){var a=t.browser.getImageData(r),s=a.width,l=a.height,u=a.data;this.style.addImage(e,{data:new t.RGBAImage({width:s,height:l},u),pixelRatio:i,sdf:o})}else{if(void 0===r.width||void 0===r.height)return this.fire(new t.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));var c=r.width,p=r.height,h=r.data;this.style.addImage(e,{data:new t.RGBAImage({width:c,height:p},new Uint8Array(h)),pixelRatio:i,sdf:o})}},i.prototype.hasImage=function(e){return e?!!this.style.getImage(e):(this.fire(new t.ErrorEvent(new Error("Missing required image id"))),!1)},i.prototype.removeImage=function(t){this.style.removeImage(t)},i.prototype.loadImage=function(e,r){t.getImage(this._transformRequest(e,t.ResourceType.Image),r)},i.prototype.listImages=function(){return this.style.listImages()},i.prototype.addLayer=function(t,e){return this.style.addLayer(t,e),this._update(!0)},i.prototype.moveLayer=function(t,e){return this.style.moveLayer(t,e),this._update(!0)},i.prototype.removeLayer=function(t){return this.style.removeLayer(t),this._update(!0)},i.prototype.getLayer=function(t){return this.style.getLayer(t)},i.prototype.setFilter=function(t,e,r){return void 0===r&&(r={}),this.style.setFilter(t,e,r),this._update(!0)},i.prototype.setLayerZoomRange=function(t,e,r){return this.style.setLayerZoomRange(t,e,r),this._update(!0)},i.prototype.getFilter=function(t){return this.style.getFilter(t)},i.prototype.setPaintProperty=function(t,e,r,n){return void 0===n&&(n={}),this.style.setPaintProperty(t,e,r,n),this._update(!0)},i.prototype.getPaintProperty=function(t,e){return this.style.getPaintProperty(t,e)},i.prototype.setLayoutProperty=function(t,e,r,n){return void 0===n&&(n={}),this.style.setLayoutProperty(t,e,r,n),this._update(!0)},i.prototype.getLayoutProperty=function(t,e){return this.style.getLayoutProperty(t,e)},i.prototype.setLight=function(t,e){return void 0===e&&(e={}),this.style.setLight(t,e),this._update(!0)},i.prototype.getLight=function(){return this.style.getLight()},i.prototype.setFeatureState=function(t,e){return this.style.setFeatureState(t,e),this._update()},i.prototype.removeFeatureState=function(t,e){return this.style.removeFeatureState(t,e),this._update()},i.prototype.getFeatureState=function(t){return this.style.getFeatureState(t)},i.prototype.getContainer=function(){return this._container},i.prototype.getCanvasContainer=function(){return this._canvasContainer},i.prototype.getCanvas=function(){return this._canvas},i.prototype._containerDimensions=function(){var t=0,e=0;return this._container&&(t=this._container.clientWidth||400,e=this._container.clientHeight||300),[t,e]},i.prototype._detectMissingCSS=function(){"rgb(250, 128, 114)"!==t.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")&&t.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described 
65in https://www.mapbox.com/mapbox-gl-js/api/.")},i.prototype._setupContainer=function(){var t=this._container;t.classList.add("mapboxgl-map"),(this._missingCSSCanary=r.create("div","mapboxgl-canary",t)).style.visibility="hidden",this._detectMissingCSS();var e=this._canvasContainer=r.create("div","mapboxgl-canvas-container",t);this._interactive&&e.classList.add("mapboxgl-interactive"),this._canvas=r.create("canvas","mapboxgl-canvas",e),this._canvas.style.position="absolute",this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map");var n=this._containerDimensions();this._resizeCanvas(n[0],n[1]);var i=this._controlContainer=r.create("div","mapboxgl-control-container",t),o=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(t){o[t]=r.create("div","mapboxgl-ctrl-"+t,i)})},i.prototype._resizeCanvas=function(e,r){var n=t.window.devicePixelRatio||1;this._canvas.width=n*e,this._canvas.height=n*r,this._canvas.style.width=e+"px",this._canvas.style.height=r+"px"},i.prototype._setupPainter=function(){var r=t.extend({failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer},e.webGLContextAttributes),n=this._canvas.getContext("webgl",r)||this._canvas.getContext("experimental-webgl",r);n?(this.painter=new tn(n,this.transform),t.webpSupported.testSupport(n)):this.fire(new t.ErrorEvent(new Error("Failed to initialize WebGL")))},i.prototype._contextLost=function(e){e.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new t.Event("webglcontextlost",{originalEvent:e}))},i.prototype._contextRestored=function(e){this._setupPainter(),this.resize(),this._update(),this.fire(new t.Event("webglcontextrestored",{originalEvent:e}))},i.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},i.prototype._update=function(t){return this.style?(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this.triggerRepaint(),this):this},i.prototype._requestRenderFrame=function(t){return this._update(),this._renderTaskQueue.add(t)},i.prototype._cancelRenderFrame=function(t){this._renderTaskQueue.remove(t)},i.prototype._render=function(){this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run();var e=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var r=this.transform.zoom,n=t.browser.now();this.style.zoomHistory.update(r,n);var i=new t.EvaluationParameters(r,{now:n,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),o=i.crossFadingFactor();1===o&&o===this._crossFadingFactor||(e=!0,this._crossFadingFactor=o),this.style.update(i)}return this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration}),this.fire(new t.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new t.Event("load"))),this.style&&(this.style.hasTransitions()||e)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this._sourcesDirty||this._repaint||this._styleDirty||this._placementDirty?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.Event("idle")),this},i.prototype.remove=function(){this._hash&&this._hash.remove();for(var e=0,r=this._controls;e<r.length;e+=1)r[e].onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.setStyle(null),void 0!==t.window&&(t.window.removeEventListener("resize",this._onWindowResize,!1),t.window.removeEventListener("online",this._onWindowOnline,!1));var n=this.painter.context.gl.getExtension("WEBGL_lose_context");n&&n.loseContext(),Mn(this._canvasContainer),Mn(this._controlContainer),Mn(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this.fire(new t.Event("remove"))},i.prototype.triggerRepaint=function(){var e=this;this.style&&!this._frame&&(this._frame=t.browser.frame(function(){e._frame=null,e._render()}))},i.prototype._onWindowOnline=function(){this._update()},i.prototype._onWindowResize=function(){this._trackResize&&this.resize()._update()},o.showTileBoundaries.get=function(){return!!this._showTileBoundaries},o.showTileBoundaries.set=function(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},o.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},o.showCollisionBoxes.set=function(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,t?this.style._generateCollisionBoxes():this._update())},o.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},o.showOverdrawInspector.set=function(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},o.repaint.get=function(){return!!this._repaint},o.repaint.set=function(t){this._repaint!==t&&(this._repaint=t,this.triggerRepaint())},o.vertices.get=function(){return!!this._vertices}
vendor: 8,441 bytes, line 65
65,o.vertices.set=function(t){this._vertices=t,this._update()},Object.defineProperties(i.prototype,o),i}(En);function Mn(t){t.parentNode&&t.parentNode.removeChild(t)}var Pn={showCompass:!0,showZoom:!0},zn=function(e){var n=this;this.options=t.extend({},Pn,e),this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(t){return t.preventDefault()}),this.options.showZoom&&(this._zoomInButton=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-in","Zoom in",function(){return n._map.zoomIn()}),this._zoomOutButton=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-out","Zoom out",function(){return n._map.zoomOut()})),this.options.showCompass&&(t.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-compass","Reset bearing to north",function(){return n._map.resetNorth()}),this._compassArrow=r.create("span","mapboxgl-ctrl-compass-arrow",this._compass))};function Ln(e,r,n){if(e=new t.LngLat(e.lng,e.lat),r){var i=new t.LngLat(e.lng-360,e.lat),o=new t.LngLat(e.lng+360,e.lat),a=n.locationPoint(e).distSqr(r);n.locationPoint(i).distSqr(r)<a?e=i:n.locationPoint(o).distSqr(r)<a&&(e=o)}for(;Math.abs(e.lng-n.center.lng)>180;){var s=n.locationPoint(e);if(s.x>=0&&s.y>=0&&s.x<=n.width&&s.y<=n.height)break;e.lng>n.center.lng?e.lng-=360:e.lng+=360}return e}zn.prototype._rotateCompassArrow=function(){var t="rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassArrow.style.transform=t},zn.prototype.onAdd=function(t){return this._map=t,this.options.showCompass&&(this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new dn(t,{button:"left",element:this._compass}),r.addEventListener(this._compass,"mousedown",this._handler.onMouseDown),this._handler.enable()),this._container},zn.prototype.onRemove=function(){r.remove(this._container),this.options.showCompass&&(this._map.off("rotate",this._rotateCompassArrow),r.removeEventListener(this._compass,"mousedown",this._handler.onMouseDown),this._handler.disable(),delete this._handler),delete this._map},zn.prototype._createButton=function(t,e,n){var i=r.create("button",t,this._container);return i.type="button",i.title=e,i.setAttribute("aria-label",e),i.addEventListener("click",n),i};var On={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Rn(t,e,r){var n=t.classList;for(var i in On)n.remove("mapboxgl-"+r+"-anchor-"+i);n.add("mapboxgl-"+r+"-anchor-"+e)}var Bn,Fn=function(e){function n(n,i){if(e.call(this),(n instanceof t.window.HTMLElement||i)&&(n=t.extend({element:n},i)),t.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick"],this),this._anchor=n&&n.anchor||"center",this._color=n&&n.color||"#3FB1CE",this._draggable=n&&n.draggable||!1,this._state="inactive",n&&n.element)this._element=n.element,this._offset=t.Point.convert(n&&n.offset||[0,0]);else{this._defaultMarker=!0,this._element=r.create("div");var o=r.createNS("http://www.w3.org/2000/svg","svg");o.setAttributeNS(null,"height","41px"),o.setAttributeNS(null,"width","27px"),o.setAttributeNS(null,"viewBox","0 0 27 41");var a=r.createNS("http://www.w3.org/2000/svg","g");a.setAttributeNS(null,"stroke","none"),a.setAttributeNS(null,"stroke-width","1"),a.setAttributeNS(null,"fill","none"),a.setAttributeNS(null,"fill-rule","evenodd");var s=r.createNS("http://www.w3.org/2000/svg","g");s.setAttributeNS(null,"fill-rule","nonzero");var l=r.createNS("http://www.w3.org/2000/svg","g");l.setAttributeNS(null,"transform","translate(3.0, 29.0)"),l.setAttributeNS(null,"fill","#000000");for(var u=0,c=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];u<c.length;u+=1){var p=c[u],h=r.createNS("http://www.w3.org/2000/svg","ellipse");h.setAttributeNS(null,"opacity","0.04"),h.setAttributeNS(null,"cx","10.5"),h.setAttributeNS(null,"cy","5.80029008"),h.setAttributeNS(null,"rx",p.rx),h.setAttributeNS(null,"ry",p.ry),l.appendChild(h)}var f=r.createNS("http://www.w3.org/2000/svg","g");f.setAttributeNS(null,"fill",this._color);var d=r.createNS("http://www.w3.org/2000/svg","path");d.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),f.appendChild(d);var m=r.createNS("http://www.w3.org/2000/svg","g");m.setAttributeNS(null,"opacity","0.25"),m.setAttributeNS(null,"fill","#000000");var g=r.createNS("http://www.w3.org/2000/svg","path");g.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),m.appendChild(g);var y=r.createNS("http://www.w3.org/2000/svg","g");y.setAttributeNS(null,"transform","translate(6.0, 7.0)"),y.setAttributeNS(null,"fill","#FFFFFF");var v=r.createNS("http://www.w3.org/2000/svg","g");v.setAttributeNS(null,"transform","translate(8.0, 8.0)");var _=r.createNS("http://www.w3.org/2000/svg","circle");_.setAttributeNS(null,"fill","#000000"),_.setAttributeNS(null,"opacity","0.25"),_.setAttributeNS(null,"cx","5.5"),_.setAttributeNS(null,"cy","5.5"),_.setAttributeNS(null,"r","5.4999962");var x=r.createNS("http://www.w3.org/2000/svg","circle");x.setAttributeNS(null,"fill","#FFFFFF"),x.setAttributeNS(null,"cx","5.5"),x.setAttributeNS(null,"cy","5.5"),x.setAttributeNS(null,"r","5.4999962"),v.appendChild(_),v.appendChild(x),s.appendChild(l),s.appendChild(f),s.appendChild(m),s.appendChild(y),s.appendChild(v),o.appendChild(s),this._element.appendChild(o),this._offset=t.Point.convert(n&&n.offset||[0,-14])}this._element.classList.add("mapboxgl-marker"),this._popup=null}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.addTo=function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on("move",this._update),t.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},n.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),delete this._map),r.remove(this._element),this._popup&&this._popup.remove(),this},n.prototype.getLngLat=function(){return this._lngLat},n.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},n.prototype.getElement=function(){return this._element},n.prototype.setPopup=function(t){if(this._popup&&(this._popup.remove(),this._popup=null),t){if(!("offset"in t.options)){var e=Math.sqrt(Math.pow(13.5,2)/2);t.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[e,-1*(24.6+e)],"bottom-right":[-e,-1*(24.6+e)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=t,this._lngLat&&this._popup.setLngLat(this._lngLat)}return this},n.prototype._onMapClick=function(t){var e=t.originalEvent.target,r=this._element;this._popup&&(e===r||r.contains(e))&&this.togglePopup()},n.prototype.getPopup=function(){return this._popup},n.prototype.togglePopup=function(){var t=this._popup;return t?(t.isOpen()?t.remove():t.addTo(this._map),this):this},n.prototype._update=function(t){this._map&&(this._map.transform.renderWorldCopies&&
vendor: 4,149 bytes, line 65
65(this._lngLat=Ln(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset),t&&"moveend"!==t.type||(this._pos=this._pos.round()),r.setTransform(this._element,On[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px)"),Rn(this._element,this._anchor,"marker"))},n.prototype.getOffset=function(){return this._offset},n.prototype.setOffset=function(e){return this._offset=t.Point.convert(e),this._update(),this},n.prototype._onMove=function(e){this._pos=e.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new t.Event("dragstart"))),this.fire(new t.Event("drag"))},n.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new t.Event("dragend")),this._state="inactive"},n.prototype._addDragHandler=function(t){this._element.contains(t.originalEvent.target)&&(t.preventDefault(),this._positionDelta=t.point.sub(this._pos).add(this._offset),this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},n.prototype.setDraggable=function(t){return this._draggable=!!t,this._map&&(t?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},n.prototype.isDraggable=function(){return this._draggable},n}(t.Evented),Nn={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showUserLocation:!0},Un=function(e){function n(r){e.call(this),this.options=t.extend({},Nn,r),t.bindAll(["_onSuccess","_onError","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.onAdd=function(e){var n;return this._map=e,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),n=this._setupUI,void 0!==Bn?n(Bn):void 0!==t.window.navigator.permissions?t.window.navigator.permissions.query({name:"geolocation"}).then(function(t){Bn="denied"!==t.state,n(Bn)}):(Bn=!!t.window.navigator.geolocation,n(Bn)),this._container},n.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),r.remove(this._container),this._map=void 0},n.prototype._onSuccess=function(e){if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("geolocate",e)),this._finish()},n.prototype._updateCamera=function(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude),n=e.coords.accuracy;this._map.fitBounds(r.toBounds(n),this.options.fitBoundsOptions,{geolocateSource:!0})},n.prototype._updateMarker=function(t){t?this._userLocationDotMarker.setLngLat([t.co
65ords.longitude,t.coords.latitude]).addTo(this._map):this._userLocationDotMarker.remove()},n.prototype._onError=function(e){if(this.options.trackUserLocation)if(1===e.code)this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),void 0!==this._geolocationWatchID&&this._clearWatch();else switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("error",e)),this._finish()},n.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},n.prototype._setupUI=function(e){var n=this;!1!==e?(this._container.addEventListener("contextmenu",function(t){return t.preventDefault()}),this._geolocateButton=r.create("button","mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate",this._container),this._geolocateButton.type="button",this._geolocateButton.setAttribute("aria-label","Geolocate"),this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Fn(this._dotElement),this.options.trackUserLocation&&(this._watchState="OFF")),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(e){e.geolocateSource||"ACTIVE_LOCK"!==n._watchState||(n._watchState="BACKGROUND",n._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),n._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),n.fire(new t.Event("trackuserlocationend")))})):t.warnOnce("Geolocation support is not available, the GeolocateControl will not be visible.")},n.prototype.trigger=function(){if(!this._setup)return t.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new t.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;
65case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}"OFF"===this._watchState&&void 0!==this._geolocationWatchID?this._clearWatch():void 0===this._geolocationWatchID&&(this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,this.options.positionOptions))}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},n.prototype._clearWatch=function(){t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},n}(t.Evented),Vn={maxWidth:100,unit:"metric"},jn=function(e){this.options=t.extend({},Vn,e),t.bindAll(["_onMove","setUnit"],this)};function qn(t,e,r){var n,i,o,a,s,l,u=r&&r.maxWidth||100,c=t._container.clientHeight/2,p=(n=t.unproject([0,c]),i=t.unproject([u,c]),o=Math.PI/180,a=n.lat*o,s=i.lat*o,l=Math.sin(a)*Math.sin(s)+Math.cos(a)*Math.cos(s)*Math.cos((i.lng-n.lng)*o),6371e3*Math.acos(Math.min(l,1)));if(r&&"imperial"===r.unit){var h=3.2808*p;h>5280?Hn(e,u,h/5280,"mi"):Hn(e,u,h,"ft")}else r&&"nautical"===r.unit?Hn(e,u,p/1852,"nm"):Hn(e,u,p,"m")}function Hn(t,e,r,n){var i,o,a,s=(i=r,(o=Math.pow(10,(""+Math.floor(i)).length-1))*(a=(a=i/o)>=10?10:a>=5?5:a>=3?3:a>=2?2:a>=1?1:function(t){var e=Math.pow(10,Math.ceil(-Math.log(t)/Math.LN10));return Math.round(t*e)/e}(a))),l=s/r;"m"===n&&s>=1e3&&(s/=1e3,n="km"),t.style.width=e*l+"px",t.innerHTML=s+n}jn.prototype.getDefaultPosition=function(){return"bottom-left"},jn.prototype._onMove=function(){qn(this._map,this._container,this.options)},jn.prototype.onAdd=function(t){return this._map=t,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},jn.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},jn.prototype.setUnit=function(t){this.options.unit=t,qn(this._map,this._container,this.options)};var Gn=function(e){this._fullscreen=!1,e&&e.container&&(e.container instanceof t.window.HTMLElement?this._container=e.container:t.warnOnce("Full screen control 'container' must be a DOM element.")),t.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in t.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in t.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in t.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in t.window.document&&(this._fullscreenchange="MSFullscreenChange"),this._className="mapboxgl-ctrl"};Gn.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div",this._className+" mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Gn.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Gn.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Gn.prototype._setupUI=function(){var e=this._fullscreenButton=r.create("button",this._className+"-icon "+this._className+"-fullscreen",this._controlContainer);e.setAttribute("aria-label","Toggle fullscreen"),e.type="button",this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Gn.prototype._isFullscreen=function(){return this._fullscreen},Gn.prototype._changeIcon=function(){(t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(this._className+"-shrink"),this._fullscreenButton.classList.toggle(this._className+"-fullscreen"))},Gn.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Wn={closeButton:!0,closeOnClick:!0,className:""},Zn=function(e){function n(r){e.call(this),this.options=t.extend(Object.create(Wn),r),t.bindAll(["_update","_onClickClose","remove"],this)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.addTo=function(e){return this._map=e,this._map.on("move",this._update),this.options.closeOnClick&&this._map.on("click",this._onClickClose),this._map.on("remove",this.remove),this._update(),this.fire(new t.Event("open")),this},n.prototype.isOpen=function(){return!!this._map},n.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("click",this._onClickClose),this._map.off("remove",this.remove),delete this._map),this.fire(new t.Event("close")),this},n.prototype.getLngLat=function(){return this._lngLat}
vendor: 3,289 bytes, line 65
65,n.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._update(),this},n.prototype.setText=function(e){return this.setDOMContent(t.window.document.createTextNode(e))},n.prototype.setHTML=function(e){var r,n=t.window.document.createDocumentFragment(),i=t.window.document.createElement("body");for(i.innerHTML=e;r=i.firstChild;)n.appendChild(r);return this.setDOMContent(n)},n.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},n.prototype._createContent=function(){this._content&&r.remove(this._content),this._content=r.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=r.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClickClose))},n.prototype._update=function(){var e=this;if(this._map&&this._lngLat&&this._content){this._container||(this._container=r.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=r.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(t){return e._container.classList.add(t)})),this._map.transform.renderWorldCopies&&(this._lngLat=Ln(this._lngLat,this._pos,this._map.transform));var n=this._pos=this._map.project(this._lngLat),i=this.options.anchor,o=function e(r){if(r){if("number"==typeof r){var n=Math.round(Math.sqrt(.5*Math.pow(r,2)));return{center:new t.Point(0,0),top:new t.Point(0,r),"top-left":new t.Point(n,n),"top-right":new t.Point(-n,n),bottom:new t.Point(0,-r),"bottom-left":new t.Point(n,-n),"bottom-right":new t.Point(-n,-n),left:new t.Point(r,0),right:new t.Point(-r,0)}}if(r instanceof t.Point||Array.isArray(r)){var i=t.Point.convert(r);return{center:i,top:i,"top-left":i,"top-right":i,bottom:i,"bottom-left":i,"bottom-right":i,left:i,right:i}}return{center:t.Point.convert(r.center||[0,0]),top:t.Point.convert(r.top||[0,0]),"top-left":t.Point.convert(r["top-left"]||[0,0]),"top-right":t.Point.convert(r["top-right"]||[0,0]),bottom:t.Point.convert(r.bottom||[0,0]),"bottom-left":t.Point.convert(r["bottom-left"]||[0,0]),"bottom-right":t.Point.convert(r["bottom-right"]||[0,0]),left:t.Point.convert(r.left||[0,0]),right:t.Point.convert(r.right||[0,0])}}return e(new t.Point(0,0))}(this.options.offset);if(!i){var a,s=this._container.offsetWidth,l=this._container.offsetHeight;a=n.y+o.bottom.y<l?["top"]:n.y>this._map.transform.height-l?["bottom"]:[],n.x<s/2?a.push("left"):n.x>this._map.transform.width-s/2&&a.push("right"),i=0===a.length?"bottom":a.join("-")}var u=n.add(o[i]).round();r.setTransform(this._container,On[i]+" translate("+u.x+"px,"+u.y+"px)"),Rn(this._container,i,"popup")}},n.prototype._onClickClose=function(){this.remove()},n}(t.Evented),Xn={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,Map:kn,NavigationControl:zn,GeolocateControl:Un,AttributionControl:Tn,ScaleControl:jn,FullscreenControl:Gn,Popup:Zn,Marker:Fn,Style:Me,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.
65Evented,config:t.config,get accessToken(){return t.config.ACCESS_TOKEN},set accessToken(e){t.config.ACCESS_TOKEN=e},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(e){t.config.API_URL=e},get workerCount(){return kt.workerCount},set workerCount(t){kt.workerCount=t},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(e){t.config.MAX_PARALLEL_IMAGE_REQUESTS=e},workerUrl:""};return Xn}),r},t.exports=n()},function(t,e,r){(function(t){var e,r=3e3;function n(){e=setTimeout(function(){t(".section-carousel").each(function(){i(function(t,e){void 0===t&&(t=1);var r=e.find(".carousel-control").length,n=t+1;n>r&&(n=1);return n}(t(this).find(".carousel-control.active").data("target"),t(this)),t(this))}),n()},r)}function i(t,e){e.find(".carousel-item.old").removeClass("old"),e.find(".carousel-control.active").removeClass("active"),e.find('.carousel-control[data-target="'+t+'"]').addClass("active"),e.find(".carousel-item.active").removeClass("active").addClass("old"),e.find('.carousel-item[data-pos="'+t+'"]').addClass("active")}t(".carousel-control").on("click",function(){clearTimeout(e),i(t(this).data("target"),t(this).parent().parent()),n()}),n()}).call(e,r(0))},function(t,e,r){(function(t){var e,r,n,i,o=t("body").find(".gallery-item").length+1-3,a=1,s=t("body").find(".gallery-track"),l=t("body").find(".gallery-wrap");function u(){t(window).width()>=768?(r=t(window).width()/3,i=2):(r=t(window).width(),i=0)}function c(){l.swipe({swipe:function(e,r,n,i,o,a){"left"==r&&t("body").find(".next-gallery").trigger("click"),"right"==r&&t("body").find(".prev-gallery").trigger("click")},threshold:75})}setTimeout(function(){u(),c()},500),t("#wrapper").bind("DOMSubtreeModified",function(){o=t("body").find(".gallery-item").length+1-3,s=t("body").find(".gallery-track"),l=t("body").find(".gallery-wrap"),u(),c()}),t("body").on("click",".next-gallery",function(){(e=a+1)>o&&(e=1),n=t(window).width()>768?r*(e-1)+(2*e-i):r*(e-1),s.css("transform","translateX(-"+n+"px)"),a=e}),t("body").on("click",".prev-gallery",function(){0==(e=a-1)&&(e=o),n=t(window).width()>768?r*(e-1)+(2*e-i):r*(e-1),s.css("transform","translateX(-"+n+"px)"),a=e})}).call(e,r(0))},function(t,e,r){(function(t){var e,r,n,i,o,a=t("body").find(".wo-item").length+1-4,s=1,l=t("body").find(".wo-track"),u=t("body").find(".wo-wrap"),c=0;function p(){u.addClass("found"),o=t(window).width()>=768?u.width()/4-11.66:u.width(),t("body").find(".wo-item").each(function(){t(this).css("width",o+"px")}),u.css("height",t(".wo-item").outerHeight()+"px"),t(window).width()>=768?(r=t("body").find(".wo-item").first().outerWidth(),i=15,c=4):(r=u.width(),i=15,c=1)}function h(){var e=s-1+c,r=s-2,n=0;t("body").find(".wo-item").each(function(){r<n&&n<e?t(this).removeClass("off-canvas"):t(this).addClass("off-canvas"),n++})}function f(){u.swipe({swipe:function(e,r,n,i,o,a){"left"==r&&t("body").find(".next-wo").trigger("click"),"right"==r&&t("body").find(".prev-wo").trigger("click")},threshold:75})}setTimeout(function(){p(),h(),f()},500),t("#wrapper").bind("DOMSubtreeModified",function(){a=t("body").find(".wo-item").length+1-4,l=t("body").find(".wo-track"),u=t("body").find(".wo-wrap"),p(),h(),f()}),t(window).on("resize",function(){p()}),t("body").on("click",".next-wo",function(){(e=s+1)>a&&(e=1),n=(r+i)*(e-1),l.css("transform","translateX(-"+n+"px)"),s=e,h(),l.removeClass("block"),u.removeClass("block")}),t("body").on("click",".prev-wo",function(){0==(e=s-1)&&(e=a),n=(r+i)*(e-1),l.css("transform","translateX(-"+n+"px)"),s=e,h()})}).call(e,r(0))},function(t,e,r){"use strict";e.a={init:function(){},finalize:function(){}}},function(t,e,r){"use strict";(function(t){e.a={init:function(){t(document).ready(function(){t.ajax({method:"POST",url:"/wp-admin/admin-ajax.php",data:{action:"delete_booking",ref:t("#ref-id").data("ref")}}).done(function(e){200!=(e=JSON.parse(e)).StatusCode?t(".cancel-info h1").html("An error has occured - Error:"+e.StatusCode+" - "+e.Message):t(".cancel-info h1").html("Your booking has successfully been cancelled.")}).fail(function(){t(".cancel-info h1").html("An error has occured")})})}}}).call(e,r(0))},function(t,e,r){var n;n=function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}return r.m=t,r.c=e,r.p="http://localhost:8080/dist",r(0)}([function(t,e,r){"function"!=typeof Promise&&(window.Promise=r(1));var n={version:"1.0.0",BaseTransition:r(4),BaseView:r(6),BaseCache:r(8),Dispatcher:r(7),HistoryManager:r(9),Pjax:r(10),Prefetch:r(13),Utils:r(5)};t.exports=n},function(t,e,r){(function(e){!function(r){var n=setTimeout;function i(){}var o="function"==typeof e&&e||function(t){n(t,0)},a=function(t){"undefined"!=typeof console&&console};function s(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],h(t,this)}function l(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,o(function(){var r=1===t._state?e.onFulfilled:e.onRejected;if(null!==r){var n;try{n=r(t._value)}catch(t){return void c(e.promise,t)}u(e.promise,n)}else(1===t._state?u:c)(e.promise,t._value)})):t._deferreds.push(e)}function u(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var r=e.then;if(e instanceof s)return t._state=3,t._value=e,void p(t);if("function"==typeof r)return void h((n=r,i=e,function(){n.apply(i,arguments)}),t)}t._state=1,t._value=e,p(t)}catch(e){c(t,e)}var n,i}function c(t,e){t._state=2,t._value=e,p(t)}function p(t){2===t._state&&0===t._deferreds.length&&o(function(){t._handled||a(t._value)});for(var e=0,r=t._deferreds.length;e<r;e++)l(t,t._deferreds[e]);t._deferreds=null}function h(t,e){var r=!1;try{t(function(t){r||(r=!0,u(e,t))},function(t){r||(r=!0,c(e,t))})}catch(t){if(r)return;r=!0,c(e,t)}}s.prototype.catch=function(t){return this.then(null,t)},s.prototype.then=function(t,e){var r=new this.constructor(i);return l(this,new function(t,e,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=r}(t,e,r)),r},s.all=function(t){var e=Array.prototype.slice.call(t);return new s(function(t,r){if(0===e.length)return t([]);var n=e.length;
vendor: 5,473 bytes, line 65
65function i(o,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(t){i(o,t)},r)}e[o]=a,0==--n&&t(e)}catch(t){r(t)}}for(var o=0;o<e.length;o++)i(o,e[o])})},s.resolve=function(t){return t&&"object"==typeof t&&t.constructor===s?t:new s(function(e){e(t)})},s.reject=function(t){return new s(function(e,r){r(t)})},s.race=function(t){return new s(function(e,r){for(var n=0,i=t.length;n<i;n++)t[n].then(e,r)})},s._setImmediateFn=function(t){o=t},s._setUnhandledRejectionFn=function(t){a=t},void 0!==t&&t.exports?t.exports=s:r.Promise||(r.Promise=s)}(this)}).call(e,r(2).setImmediate)},function(t,e,r){(function(t,n){var i=r(3).nextTick,o=Function.prototype.apply,a=Array.prototype.slice,s={},l=0;function u(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new u(o.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new u(o.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t.close()},u.prototype.unref=u.prototype.ref=function(){},u.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},e.setImmediate="function"==typeof t?t:function(t){var r=l++,n=!(arguments.length<2)&&a.call(arguments,1);return s[r]=!0,i(function(){s[r]&&(n?t.apply(null,n):t.call(null),e.clearImmediate(r))}),r},e.clearImmediate="function"==typeof n?n:function(t){delete s[t]}}).call(e,r(2).setImmediate,r(2).clearImmediate)},function(t,e){var r,n,i=t.exports={};!function(){try{r=setTimeout}catch(t){r=function(){throw new Error("setTimeout is not defined")}}try{n=clearTimeout}catch(t){n=function(){throw new Error("clearTimeout is not defined")}}}();var o,a=[],s=!1,l=-1;function u(){s&&o&&(s=!1,o.length?a=o.concat(a):l=-1,a.length&&c())}function c(){if(!s){var t=r(u);s=!0;for(var e=a.length;e;){for(o=a,a=[];++l<e;)o&&o[l].run();l=-1,e=a.length}o=null,s=!1,n(t)}}function p(t,e){this.fun=t,this.array=e}function h(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];a.push(new p(t,e)),1!==a.length||s||r(c,0)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,r){var n=r(5),i={oldContainer:void 0,newContainer:void 0,newContainerLoading:void 0,extend:function(t){return n.extend(this,t)},init:function(t,e){var r=this;return this.oldContainer=t,this._newContainerPromise=e,this.deferred=n.deferred(),this.newContainerReady=n.deferred(),this.newContainerLoading=this.newContainerReady.promise,this.start(),this._newContainerPromise.then(function(t){r.newContainer=t,r.newContainerReady.resolve()}),this.deferred.promise},done:function(){this.oldContainer.parentNode.removeChild(this.oldContainer),this.newContainer.style.visibility="visible",this.deferred.resolve()},start:function(){}};t.exports=i},function(t,e){var r={getCurrentUrl:function(){return window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search},cleanLink:function(t){return t.replace(/#.*/,"")},xhrTimeout:5e3,xhr:function(t){var e=this.deferred(),r=new XMLHttpRequest;return r.onreadystatechange=function(){if(4===r.readyState)return 200===r.status?e.resolve(r.responseText):e.reject(new Error("xhr: HTTP code is not 200"))},r.ontimeout=function(){return e.reject(new Error("xhr: Timeout exceeded"))},r.open("GET",t),r.timeout=this.xhrTimeout,r.setRequestHeader("x-barba","yes"),r.send(),e.promise},extend:function(t,e){var r=Object.create(t);for(var n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);return r},deferred:function(){return new function(){this.resolve=null,this.reject=null,this.promise=new Promise(function(t,e){this.resolve=t,this.reject=e}.bind(this))}},getPort:function(t){var e=void 0!==t?t:window.location.port,r=window.location.protocol;return""!=e?parseInt(e):"http:"===r?80:"https:"===r?443:void 0}};t.exports=r},function(t,e,r){var n=r(7),i=r(5),o={namespace:null,extend:function(t){return i.extend(this,t)},init:function(){var t=this;n.on("initStateChange",function(e,r){r&&r.namespace===t.namespace&&t.onLeave()}),n.on("newPageReady",function(e,r,n){t.container=n,e.namespace===t.namespace&&t.onEnter()}),n.on("transitionCompleted",function(e,r){e.namespace===t.namespace&&t.onEnterCompleted(),r&&r.namespace===t.namespace&&t.onLeaveCompleted()})},onEnter:function(){},onEnterCompleted:function(){},onLeave:function(){},onLeaveCompleted:function(){}};t.exports=o},function(t,e){var r={events:{},on:function(t,e){this.events[t]=this.events[t]||[],this.events[t].push(e)},off:function(t,e){t in this.events!=!1&&this.events[t].splice(this.events[t].indexOf(e),1)},trigger:function(t){if(t in this.events!=!1)for(var e=0;e<this.events[t].length;e++)this.events[t][e].apply(this,Array.prototype.slice.call(arguments,1
65))}};t.exports=r},function(t,e,r){var n=r(5),i={data:{},extend:function(t){return n.extend(this,t)},set:function(t,e){this.data[t]=e},get:function(t){return this.data[t]},reset:function(){this.data={}}};t.exports=i},function(t,e){var r={history:[],add:function(t,e){e||(e=void 0),this.history.push({url:t,namespace:e})},currentStatus:function(){return this.history[this.history.length-1]},prevStatus:function(){var t=this.history;return t.length<2?null:t[t.length-2]}};t.exports=r},function(t,e,r){var n=r(5),i=r(7),o=r(11),a=r(8),s=r(9),l={Dom:r(12),History:s,Cache:a,cacheEnabled:!0,transitionProgress:!1,ignoreClassLink:"no-barba",start:function(){this.init()},init:function(){var t=this.Dom.getContainer();this.Dom.getWrapper().setAttribute("aria-live","polite"),this.History.add(this.getCurrentUrl(),this.Dom.getNamespace(t)),i.trigger("initStateChange",this.History.currentStatus()),i.trigger("newPageReady",this.History.currentStatus(),{},t,this.Dom.currentHTML),i.trigger("transitionCompleted",this.History.currentStatus()),this.bindEvents()},bindEvents:function(){document.addEventListener("click",this.onLinkClick.bind(this)),window.addEventListener("popstate",this.onStateChange.bind(this))},getCurrentUrl:function(){return n.cleanLink(n.getCurrentUrl())},goTo:function(t){window.history.pushState(null,null,t),this.onStateChange()},forceGoTo:function(t){window.location=t},load:function(t){var e,r=n.deferred(),i=this;return(e=this.Cache.get(t))||(e=n.xhr(t),this.Cache.set(t,e)),e.then(function(t){var e=i.Dom.parseResponse(t);i.Dom.putContainer(e),i.cacheEnabled||i.Cache.reset(),r.resolve(e)},function(){i.forceGoTo(t),r.reject()}),r.promise},getHref:function(t){if(t)return t.getAttribute&&"string"==typeof t.getAttribute("xlink:href")?t.getAttribute("xlink:href"):"string"==typeof t.href?t.href:void 0},onLinkClick:function(t){for(var e=t.target;e&&!this.getHref(e);)e=e.parentNode;if(this.preventCheck(t,e)){t.stopPropagation(),t.preventDefault(),i.trigger("linkClicked",e,t);var r=this.getHref(e);this.goTo(r)}},preventCheck:function(t,e){if(!window.history.pushState)return!1;var r=this.getHref(e);return!(!e||!r)&&(!(t.which>1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)&&((!e.target||"_blank"!==e.target)&&(window.location.protocol===e.protocol&&window.location.hostname===e.hostname&&(n.getPort()===n.getPort(e.port)&&(!(r.indexOf("#")>-1)&&((!e.getAttribute||"string"!=typeof e.getAttribute("download"))&&(n.cleanLink(r)!=n.cleanLink(location.href)&&!e.classList.contains(this.ignoreClassLink))))))))},getTransition:function(){return o},onStateChange:function(){var t=this.getCurrentUrl();if(this.transitionProgress&&this.forceGoTo(t),this.History.currentStatus().url===t)return!1;this.History.add(t);var e=this.load(t),r=Object.create(this.getTransition());this.transitionProgress=!0,i.trigger("initStateChange",this.History.currentStatus(),this.History.prevStatus());var n=r.init(this.Dom.getContainer(),e);e.then(this.onNewContainerLoaded.bind(this)),n.then(this.onTransitionEnd.bind(this))},onNewContainerLoaded:function(t){this.History.currentStatus().namespace=this.Dom.getNamespace(t),i.trigger("newPageReady",this.History.currentStatus(),this.History.prevStatus(),t,this.Dom.currentHTML)},onTransitionEnd:function(){this.transitionProgress=!1,i.trigger("transitionCompleted",this.History.currentStatus(),this.History.prevStatus())}};t.exports=l},function(t,e,r){var n=r(4).extend({start:function(){this.newContainerLoading.then(this.finish.bind(this))},finish:function(){document.body.scrollTop=0,this.done()}});t.exports=n},function(t,e){var r={dataNamespace:"namespace",wrapperId:"barba-wrapper",containerClass:"barba-container",currentHTML:document.documentElement.innerHTML,parseResponse:function(t){this.currentHTML=t;var e=document.createElement("div");e.innerHTML=t;var r=e.querySelector("title");return r&&(document.title=r.textContent),this.getContainer(e)},getWrapper:function(){var t=document.getElementById(this.wrapperId);if(!t)throw new Error("Barba.js: wrapper not found!");return t},getContainer:function(t){if(t||(t=document.body),!t)throw new Error("Barba.js: DOM not ready!");var e=this.parseContainer(t);if(e&&e.jquery&&(e=e[0]),!e)throw new Error("Barba.js: no container found");return e},getNamespace:function(t){return t&&t.dataset?t.dataset[this.dataNamespace]:t?t.getAttribute("data-"+this.dataNamespace):null},putContainer:function(t){t.style.visibility="hidden",this.getWrapper().appendChild(t)},parseContainer:function(t){return t.querySelector("."+this.containerClass)}};t.exports=r},function(t,e,r){var n=r(5),i=r(10),o={ignoreClassLink:"no-barba-prefetch",init:function(){if(!window.history.pushState)return!1;document.body.addEventListener("mouseover",this.onLinkEnter.bind(this)),document.body.addEventListener("touchstart",this.onLinkEnter.bind(this))},onLinkEnter:function(t){for(var e=t.target;e&&!i.getHref(e);)e=e.parentNode;if(e&&!e.classList.contains(this.ignoreClassLink)){var r=i.getHref(e);if(i.preventCheck(t,e)&&!i.Cache.get(r)){var o=n.xhr(r);i.Cache.set(r,o)}}}};t.exports=o}])},t.exports=n()},function(t,e,r){(function(t){var e=t("<div />").addClass("hidden-loader").css({"max-height":0,overflow:"hidden"});t("html").append(e),t("body").on("mouseover",".preload",function(){var e=t(this);e.removeClass("preload"),t(this).attr("href")||(e=e.find("a")),t.get(e.attr("href"),function(e){var r=t(e).find("main.main");t(r).find(".lazyload, .load-in, .fade-in").each(function(){t(this).hasClass("show")||t(this).addClass("show").attr("src",t(this).data("src")).attr("data-src",t(this).data("data-src"))}),t(".hidden-loader").html(r)})})}).call(e,r(0))},function(t,e){}]);

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