!function(e){functionn(a){if(t[a])returnt[a].exports;varo=t[a]={i:a,l:!1,exports:{}};returne[a].call(o.exports,o,o.exports,n),o.l=!0,o.exports}vart={};n.m=e,n.c=t,n.i=function(e){returne},n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:a})},n.n=function(e){vart=e&&e.__esModule?function(){returne.default}:function(){returne};returnn.d(t,"a",t),t},n.o=function(e,n){returnObject.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s="./client/src/bundles/bundle.js")}({"./client/src/bundles/bundle.js":function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});vara=t(0),o=t.n(a),i=t("./client/src/components/MapboxField/MapboxField.js");o.a.entwine("ss",function(e){e(".cms-edit-form .mapbox").entwine({MapboxField:null,onmatch:function(){this.getMapboxField()||this.setMapboxField(newi.a(this))}}),e('.cms-edit-form [aria-hidden="false"] .mapbox').entwine({onmatch:function(){this._super(),this.getMapboxField().render()}}),e(".cms-edit-form .mapbox:not(.tabset .mapbox)").entwine({onmatch:function(){this._super(),this.getMapboxField().render()}})})},"./client/src/components/MapboxField/MapboxField.js":function(e,n,t){"use strict";functiona(e,n){if(!(einstanceofn))thrownewTypeError("Cannot call a class as a function")}varo=function(){functione(e,n){for(vart=0;t<n.length;t++){vara=n[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"ina&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}returnfunction(n,t,a){returnt&&e(n.prototype,t),a&&e(n,a),n}}(),i=function(){functione(n){a(this,e),this.$container=n,this.rendered=!1}returno(e,[{key:"_getLngLatValue",value:function(){return[this._getLngField().val(),this._getLatField().val()]}},{key:"_setLngLatValue",value:function(e){this._getLngField().val(e[0]).change(),this._getLatField().val(e[1]).change()}},{key:"_getLngField",value:function(){returnthis.$container.find('input[data-mapbox-field="Longitude"]')}},{key:"_getLatField",value:function(){returnthis.$container.find('input[data-mapbox-field="Latitude"]')}},{key:"render",value:function(){varn=this;if(!this.rendered){mapboxgl.accessToken=e._getAccessToken();vart=newmapboxgl.Map({center:this._getLngLatValue(),container:this.$container.find(".mapbox__map").get(0),style:"mapbox://styles/mapbox/basic-v9",zoom:15}),a=newmapboxgl.Marker({draggable:!0}).setLngLat(this._getLngLatValue()).addTo(t);a.on("dragend",function(){n._onMarkerUpdate(a)});varo=newMapboxGeocoder({accessToken:e._getAccessToken()});t.addControl(o),o.on("result",function(e){a.setLngLat(e.result.geometry.coordinates),n._onMarkerUpdate(a)}),t.addControl(newmapboxgl.NavigationControl),this.rendered=!0}}},{key:"_onMarkerUpdate",value:function(e){varn=e.getLngLat();this._setLngLatValue([n.lng,n.lat])}}],[{key:"_getAccessToken",value:function(){returnwindow.mapboxAccessToken}}]),e}();n.a=i},0:function(e,n){e.exports=jQuery}});