@local-logic/sdks-app 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index-legacy.0a642cb5.js +1 -0
- package/dist/assets/index-legacy.4e44eb64.js +1 -0
- package/dist/assets/index-legacy.7f6983e2.js +1 -0
- package/dist/assets/index-legacy.919f470f.js +1 -0
- package/dist/assets/{index-legacy.e333988e.js → index-legacy.95ccb44a.js} +14 -14
- package/dist/assets/index-legacy.c9e59904.js +23 -0
- package/dist/assets/index-legacy.fc3fe26b.js +1 -0
- package/dist/assets/{index.d89a7cee.js → index.1bb375cb.js} +13 -13
- package/dist/assets/index.621fb294.js +149 -0
- package/dist/assets/index.795111c8.js +1 -0
- package/dist/assets/index.7a7d9dc0.js +1 -0
- package/dist/assets/index.937af76a.js +247 -0
- package/dist/assets/{index.3eec99ca.js → index.9af49ac7.js} +151 -151
- package/dist/assets/index.f59985f7.js +35 -0
- package/dist/assets/{useIsMobile-legacy.7fb572d8.js → useIsMobile-legacy.ed5dee46.js} +1 -1
- package/dist/assets/{useIsMobile.b5e8d9ad.js → useIsMobile.456ed35b.js} +1 -1
- package/dist/assets/useQuery-legacy.97f1ad62.js +1 -0
- package/dist/assets/useQuery.83f2b67b.js +9 -0
- package/dist/index.html +2 -2
- package/dist/types/context/languageProvider/data-explorer/locales/en/index.d.ts.map +1 -1
- package/dist/types/context/languageProvider/data-explorer/locales/en/index.js +1 -0
- package/dist/types/context/languageProvider/data-explorer/locales/en/index.js.map +1 -1
- package/dist/types/context/languageProvider/data-explorer/locales/fr/index.d.ts.map +1 -1
- package/dist/types/context/languageProvider/data-explorer/locales/fr/index.js +1 -0
- package/dist/types/context/languageProvider/data-explorer/locales/fr/index.js.map +1 -1
- package/dist/types/context/languageProvider/data-explorer/types.d.ts +1 -1
- package/dist/types/context/languageProvider/data-explorer/types.d.ts.map +1 -1
- package/dist/types/context/languageProvider/index.d.ts +2 -2
- package/dist/types/context/languageProvider/index.d.ts.map +1 -1
- package/dist/types/sdks/DataExplorer/components/DataTable/index.d.ts +4 -0
- package/dist/types/sdks/DataExplorer/components/DataTable/index.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/{Table → DataTable}/index.js +2 -2
- package/dist/types/sdks/DataExplorer/components/DataTable/index.js.map +1 -0
- package/dist/types/sdks/DataExplorer/components/DataTable/styles.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/DataTable/styles.js.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Export/index.d.ts.map +1 -1
- package/dist/types/sdks/DataExplorer/components/Export/index.js +7 -11
- package/dist/types/sdks/DataExplorer/components/Export/index.js.map +1 -1
- package/dist/types/sdks/DataExplorer/components/Filters/index.d.ts +4 -0
- package/dist/types/sdks/DataExplorer/components/Filters/index.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Filters/index.js +51 -0
- package/dist/types/sdks/DataExplorer/components/Filters/index.js.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Filters/styles.d.ts +6 -0
- package/dist/types/sdks/DataExplorer/components/Filters/styles.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Filters/styles.js +12 -0
- package/dist/types/sdks/DataExplorer/components/Filters/styles.js.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Section/index.d.ts +2 -4
- package/dist/types/sdks/DataExplorer/components/Section/index.d.ts.map +1 -1
- package/dist/types/sdks/DataExplorer/components/Section/index.js +6 -18
- package/dist/types/sdks/DataExplorer/components/Section/index.js.map +1 -1
- package/dist/types/sdks/DataExplorer/context.d.ts +1 -5
- package/dist/types/sdks/DataExplorer/context.d.ts.map +1 -1
- package/dist/types/sdks/DataExplorer/context.js +1 -5
- package/dist/types/sdks/DataExplorer/context.js.map +1 -1
- package/dist/types/sdks/DataExplorer/index.d.ts.map +1 -1
- package/dist/types/sdks/DataExplorer/index.js +10 -67
- package/dist/types/sdks/DataExplorer/index.js.map +1 -1
- package/dist/types/sdks/DataExplorer/styles.d.ts +3 -2
- package/dist/types/sdks/DataExplorer/styles.d.ts.map +1 -1
- package/dist/types/sdks/DataExplorer/styles.js +17 -7
- package/dist/types/sdks/DataExplorer/styles.js.map +1 -1
- package/package.json +1 -1
- package/dist/assets/index-legacy.5b5c89be.js +0 -1
- package/dist/assets/index-legacy.6f7be327.js +0 -1
- package/dist/assets/index-legacy.873d2f5f.js +0 -1
- package/dist/assets/index-legacy.8b48df8f.js +0 -1
- package/dist/assets/index-legacy.a2e5122a.js +0 -23
- package/dist/assets/index-legacy.b4a1ea09.js +0 -1
- package/dist/assets/index.1b34a15d.js +0 -35
- package/dist/assets/index.24661964.js +0 -247
- package/dist/assets/index.3039bacf.js +0 -161
- package/dist/assets/index.77b51154.js +0 -1
- package/dist/assets/index.aae000f4.js +0 -1
- package/dist/assets/keyFactory-legacy.782b8549.js +0 -1
- package/dist/assets/keyFactory.e1cd5707.js +0 -1
- package/dist/assets/useQuery-legacy.7e93cb2c.js +0 -1
- package/dist/assets/useQuery.19a6ca1c.js +0 -9
- package/dist/types/sdks/DataExplorer/components/Table/index.d.ts +0 -4
- package/dist/types/sdks/DataExplorer/components/Table/index.d.ts.map +0 -1
- package/dist/types/sdks/DataExplorer/components/Table/index.js.map +0 -1
- package/dist/types/sdks/DataExplorer/components/Table/styles.d.ts.map +0 -1
- package/dist/types/sdks/DataExplorer/components/Table/styles.js.map +0 -1
- /package/dist/types/sdks/DataExplorer/components/{Table → DataTable}/styles.d.ts +0 -0
- /package/dist/types/sdks/DataExplorer/components/{Table → DataTable}/styles.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(){function e(e,o){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);o&&(t=t.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),r.push.apply(r,t)}return r}function o(o){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?e(Object(i),!0).forEach((function(e){r(o,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(i,e))}))}return o}function r(e,o,r){return o in e?Object.defineProperty(e,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[o]=r,e}System.register([],(function(e,r){"use strict";return{execute:function(){e("translations",o(o(o({},{RADIUS:"Radius",LIMIT:"Limit",EXPORT:"Export",SEARCH_MAP:"Search map...",SEARCH_INSIGHTS:"Search insights..."}),{LOCATION:"Location",SCORES:"Scores",POIS:"Points of interest",SCHOOLS:"Schools",DEMOGRAPHICS:"Demographics",PROFILES:"Profiles",TABLE:"Table"}),{LOCATION_TEXT:"Set the location for your data query. Long-press on the map to move the pin.",SCORES_TEXT:"Configure Local Logic Scores for your specified location.",POIS_TEXT:"Configure Local Logic Points of Interest (POIs) for your specified location.",SCHOOLS_TEXT:"Configure Local Logic Schools for your specified location.",DEMOGRAPHICS_TEXT:"Configure Local Logic Demographics for your specified location.",PROFILES_TEXT:"Local Profiles returns qualitative and localized information for your specified location.",TABLE_TEXT:"Table show an excerpt of the data for your specified location."}))}}}))}();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(){var e,t,n,r,o,i,a,l,c,s,u,d,p,f,h,m,v,g,y,b,x,w,C,M,S,k,O,P,L,I,E,A,_,j,z,T,R,N;function G(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Z(e){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Z(e)}function D(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function V(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function H(e,t,n){return t&&V(e.prototype,t),n&&V(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function F(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */F=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(O){l=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof d?t:d,i=Object.create(o.prototype),a=new M(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return k()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=x(a,n);if(l){if(l===u)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=s(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===u)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(e,n,a),i}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(O){return{type:"throw",arg:O}}}e.wrap=c;var u={};function d(){}function p(){}function f(){}var h={};l(h,o,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(S([])));v&&v!==t&&n.call(v,o)&&(h=v);var g=f.prototype=d.prototype=Object.create(h);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function r(o,i,a,l){var c=s(e[o],e,i);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==Z(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,a,l)}),(function(e){r("throw",e,a,l)})):t.resolve(d).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,l)}))}l(c.arg)}var o;this._invoke=function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}}function x(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=s(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,u;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:k}}function k(){return{value:void 0,done:!0}}return p.prototype=f,l(g,"constructor",f),l(f,"constructor",p),p.displayName=l(f,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,l(e,a,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},y(b.prototype),l(b.prototype,i,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new b(c(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(g),l(g,a,"Generator"),l(g,o,(function(){return this})),l(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}function U(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(s){return void n(s)}l.done?t(c):Promise.resolve(c).then(r,o)}function B(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){U(i,r,o,a,l,"next",e)}function l(e){U(i,r,o,a,l,"throw",e)}a(void 0)}))}}function W(e){return function(e){if(Array.isArray(e))return Q(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||q(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Y(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=q(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function K(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(c){l=!0,o=c}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||q(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){if(e){if("string"==typeof e)return Q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Q(e,t):void 0}}function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X(Object(n),!0).forEach((function(t){J(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}System.register(["./index-legacy.0a642cb5.js","./index-legacy.95ccb44a.js","./useIsMobile-legacy.ed5dee46.js","./useQuery-legacy.97f1ad62.js"],(function(V,U){"use strict";var q,Q,X,ee,te,ne,re,oe,ie,ae,le,ce,se,ue,de,pe,fe,he,me,ve,ge,ye,be,xe,we,Ce,Me,Se,ke,Oe,Pe,Le,Ie,Ee,Ae,_e,je,ze,Te,Re,Ne,Ge,Ze,De,Ve,He,Fe,Ue,Be,We,Ye,Ke,qe,Qe,Xe,$e,Je;return{setters:[function(e){q=e.M,Q=e.d,X=e.a,ee=e.$,te=e.b,ne=e.c,re=e.e,oe=e.S,ie=e.f,ae=e.g,le=e.h,ce=e.A,se=e.u,ue=e.i,de=e.m,pe=e.j,fe=e.N,he=e.P},function(e){me=e.R,ve=e.r,ge=e.o,ye=e.j,be=e.M,xe=e.G,we=e.u,Ce=e.a,Me=e.Q,Se=e.s,ke=e.m,Oe=e.C,Pe=e.b,Le=e.c,Ie=e.d,Ee=e.w,Ae=e.I,_e=e.e,je=e.Z,ze=e.X,Te=e.n,Re=e.F,Ne=e.f,Ge=e.K,Ze=e.g,De=e.O,Ve=e.k,He=e.q,Fe=e.J,Ue=e.h,Be=e.L,We=e.i,Ye=e.l,Ke=e.p,qe=e.U,Qe=e.t,Xe=e.v},function(e){$e=e.u},function(e){Je=e.u}],execute:function(){var U=me.createContext({}),et=function(){return ve.exports.useContext(U)},tt=function(e,t){switch(t.type){case"CATEGORY":return $($({},e),{},{activeCategory:t.value});case"SCORE":var n=be.find((function(n){return""===t.value?n.value===e.activeCategory:n.scores.includes(t.value)})).value;return{activeCategory:n,activeScoreByCategory:$($({},e.activeScoreByCategory),{},J({},n,t.value))}}},nt=function(e){var t=e.children,n=window.innerWidth<ge.screenSizes.tablet?{activeCategory:"commute",activeScoreByCategory:{commute:"transit_friendly",amenities:"groceries",character:"quiet",nature:"parks",education:"primary_schools"}}:{activeCategory:"commute",activeScoreByCategory:{commute:"",amenities:"",character:"",nature:"",education:""}},r=K(ve.exports.useReducer(tt,n),2),o=r[0],i=r[1],a=K(ve.exports.useState(),2),l=a[0],c=a[1],s=K(ve.exports.useState(),2),u=s[0],d=s[1],p=K(ve.exports.useState(),2),f=p[0],h=p[1],m=K(ve.exports.useState(),2),v=m[0],g=m[1],y=K(ve.exports.useState(),2),b=y[0],x=y[1],w=K(ve.exports.useState(!1),2),C=w[0],M=w[1],S=o.activeCategory,k=o.activeScoreByCategory[S],O=function(e){i({type:"SCORE",value:e})},P=function(e){i({type:"CATEGORY",value:e})},L=ve.exports.useMemo((function(){return{activeScore:k,setActiveScore:O,activeCategory:S,setActiveCategory:P,activePOI:l,setActivePOI:c,hoveredPOI:u,setHoveredPOI:d,commuteGeojson:f,setCommuteGeojson:h,destination:b,setDestination:x,showCommuteCalculator:C,setShowCommuteCalculator:M,schoolCatchment:v,setSchoolCatchment:g}}),[k,O,S,P,l,c,u,d,f,h,b,x,C,M,v,g]);return ye(U.Provider,{value:L,children:t})};function rt(e,t){if(!e)throw new Error(t)}var ot=0;function it(e){var t=ve.exports.useContext(q).map.getMap(),n=ve.exports.useRef(e),r=K(ve.exports.useState(0),2)[1],o=ve.exports.useMemo((function(){return e.id||"jsx-source-".concat(ot++)}),[]);ve.exports.useEffect((function(){if(t){var e=function(){return r((function(e){return e+1}))};return t.on("styledata",e),e(),function(){var n;if(t.off("styledata",e),t.style&&t.style._loaded&&t.getSource(o)){var r=null===(n=t.getStyle())||void 0===n?void 0:n.layers;if(r){var i,a=Y(r);try{for(a.s();!(i=a.n()).done;){var l=i.value;l.source===o&&t.removeLayer(l.id)}}catch(c){a.e(c)}finally{a.f()}}t.removeSource(o)}}}}),[t]);var i=t&&t.style&&t.getSource(o);return i?function(e,t,n){rt(t.id===n.id,"source id changed"),rt(t.type===n.type,"source type changed");var r="",o=0;for(var i in t)"children"===i||"id"===i||Q(n[i],t[i])||(r=i,o++);if(o){var a=t.type;if("geojson"===a)e.setData(t.data);else if("image"===a)e.updateImage({url:t.url,coordinates:t.coordinates});else if("canvas"!==a&&"video"!==a||1!==o||"coordinates"!==r)if("vector"===a&&"setUrl"in e)switch(r){case"url":e.setUrl(t.url);break;case"tiles":e.setTiles(t.tiles)}else console.warn("Unable to update <Source> prop: ".concat(r));else e.setCoordinates(t.coordinates)}}(i,e,n.current):i=function(e,t,n){if(e.style&&e.style._loaded){var r=$({},n);return delete r.id,delete r.children,e.addSource(t,r),e.getSource(t)}return null}(t,o,e),n.current=e,i&&ve.exports.Children.map(e.children,(function(e){return e&&ve.exports.cloneElement(e,{source:o})}))||null}var at=0;function lt(e){var t=ve.exports.useContext(q).map.getMap(),n=ve.exports.useRef(e),r=K(ve.exports.useState(0),2)[1],o=ve.exports.useMemo((function(){return e.id||"jsx-layer-".concat(at++)}),[]);if(ve.exports.useEffect((function(){if(t){var e=function(){return r((function(e){return e+1}))};return t.on("styledata",e),e(),function(){t.off("styledata",e),t.style&&t.style._loaded&&t.getLayer(o)&&t.removeLayer(o)}}}),[t]),t&&t.style&&t.getLayer(o))try{!function(e,t,n,r){if(rt(n.id===r.id,"layer id changed"),rt(n.type===r.type,"layer type changed"),"custom"!==n.type&&"custom"!==r.type){var o=n.layout,i=void 0===o?{}:o,a=n.paint,l=void 0===a?{}:a,c=n.filter,s=n.minzoom,u=n.maxzoom,d=n.beforeId;if(d!==r.beforeId&&e.moveLayer(t,d),i!==r.layout){var p=r.layout||{};for(var f in i)Q(i[f],p[f])||e.setLayoutProperty(t,f,i[f]);for(var h in p)i.hasOwnProperty(h)||e.setLayoutProperty(t,h,void 0)}if(l!==r.paint){var m=r.paint||{};for(var v in l)Q(l[v],m[v])||e.setPaintProperty(t,v,l[v]);for(var g in m)l.hasOwnProperty(g)||e.setPaintProperty(t,g,void 0)}Q(c,r.filter)||e.setFilter(t,c),s===r.minzoom&&u===r.maxzoom||e.setLayerZoomRange(t,s,u)}}(t,o,e,n.current)}catch(i){console.warn(i)}else!function(e,t,n){if(e.style&&e.style._loaded&&(!("source"in n)||e.getSource(n.source))){var r=$($({},n),{},{id:t});delete r.beforeId,e.addLayer(r,n.beforeId)}}(t,o,e);return n.current=e,null}function ct(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function st(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!ut(e[0])||!ut(e[1]))throw new Error("coordinates must contain numbers");return ct({type:"Point",coordinates:e},t,n)}function ut(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function dt(e,t,n){if(null!==e)for(var r,o,i,a,l,c,s,u,d=0,p=0,f=e.type,h="FeatureCollection"===f,m="Feature"===f,v=h?e.features.length:1,g=0;g<v;g++){l=(u=!!(s=h?e.features[g].geometry:m?e.geometry:e)&&"GeometryCollection"===s.type)?s.geometries.length:1;for(var y=0;y<l;y++){var b=0,x=0;if(null!==(a=u?s.geometries[y]:s)){c=a.coordinates;var w=a.type;switch(d=!n||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===t(c,p,g,b,x))return!1;p++,b++;break;case"LineString":case"MultiPoint":for(r=0;r<c.length;r++){if(!1===t(c[r],p,g,b,x))return!1;p++,"MultiPoint"===w&&b++}"LineString"===w&&b++;break;case"Polygon":case"MultiLineString":for(r=0;r<c.length;r++){for(o=0;o<c[r].length-d;o++){if(!1===t(c[r][o],p,g,b,x))return!1;p++}"MultiLineString"===w&&b++,"Polygon"===w&&x++}"Polygon"===w&&b++;break;case"MultiPolygon":for(r=0;r<c.length;r++){for(x=0,o=0;o<c[r].length;o++){for(i=0;i<c[r][o].length-d;i++){if(!1===t(c[r][o][i],p,g,b,x))return!1;p++}x++}b++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===dt(a.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function pt(e){var t=[1/0,1/0,-1/0,-1/0];return dt(e,(function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])})),t}pt.default=pt;var ft={all:function(){return["pois"]},list:function(e){return[].concat(W(ft.all()),[e])}};function ht(){var e,t=xe().client,n=we().sdkState,r=Ce(n.options,250),o=et().activeScore,i=o?Me[o]:void 0,a=$($({},ve.exports.useMemo((function(){return!(null==r||!r.marker)?r.marker:{lat:null==r?void 0:r.lat,lng:null==r?void 0:r.lng}}),[r])),{},{limit:10,radius:2e3,include:i});return Je(ft.list(a),B(F().mark((function e(){return F().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.getPois(a));case 1:case"end":return e.stop()}}),e)}))),{enabled:!!(a&&null!==(e=a.include)&&void 0!==e&&e.length&&a.lat&&a.lng)})}var mt={all:function(){return["schools"]},list:function(e){return[].concat(W(mt.all()),[e])}};function vt(){var e=xe().client,t=we().sdkState,n=Ce(t.options,250),r=et().activeScore,o="high_schools"===r||"primary_schools"===r,i=$($({},ve.exports.useMemo((function(){return!(null==n||!n.marker)?n.marker:{lat:null==n?void 0:n.lat,lng:null==n?void 0:n.lng}}),[n])),{},{limit:10,radius:2e3,include_catchments:!1});return Je(mt.list(i),B(F().mark((function t(){return F().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.getSchools(i));case 1:case"end":return t.stop()}}),t)}))),{enabled:!!i&&!!i.lat&&!!i.lng&&o})}var gt=me.createContext({}),yt=function(){return ve.exports.useContext(gt)},bt=function(e){var t=e.children,n=e.mapRef,r=e.mapPadding;return ye(gt.Provider,{value:{mapRef:n,mapPadding:r},children:t})};function xt(e,t,n,r,o,i){if(!(o-r<=n)){var a=r+o>>1;wt(e,t,a,r,o,i%2),xt(e,t,n,r,a-1,i+1),xt(e,t,n,a+1,o,i+1)}}function wt(e,t,n,r,o,i){for(;o>r;){if(o-r>600){var a=o-r+1,l=n-r+1,c=Math.log(a),s=.5*Math.exp(2*c/3),u=.5*Math.sqrt(c*s*(a-s)/a)*(l-a/2<0?-1:1);wt(e,t,n,Math.max(r,Math.floor(n-l*s/a+u)),Math.min(o,Math.floor(n+(a-l)*s/a+u)),i)}var d=t[2*n+i],p=r,f=o;for(Ct(e,t,r,n),t[2*o+i]>d&&Ct(e,t,r,o);p<f;){for(Ct(e,t,p,f),p++,f--;t[2*p+i]<d;)p++;for(;t[2*f+i]>d;)f--}t[2*r+i]===d?Ct(e,t,r,f):Ct(e,t,++f,o),f<=n&&(r=f+1),n<=f&&(o=f-1)}}function Ct(e,t,n,r){Mt(e,n,r),Mt(t,2*n,2*r),Mt(t,2*n+1,2*r+1)}function Mt(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function St(e,t,n,r){var o=e-n,i=t-r;return o*o+i*i}var kt,Ot=function(e){return e[0]},Pt=function(e){return e[1]},Lt=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ot,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Pt,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:64,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Float64Array;D(this,e),this.nodeSize=o,this.points=t;for(var a=t.length<65536?Uint16Array:Uint32Array,l=this.ids=new a(t.length),c=this.coords=new i(2*t.length),s=0;s<t.length;s++)l[s]=s,c[2*s]=n(t[s]),c[2*s+1]=r(t[s]);xt(l,c,o,0,l.length-1,0)}return H(e,[{key:"range",value:function(e,t,n,r){return function(e,t,n,r,o,i,a){for(var l,c,s=[0,e.length-1,0],u=[];s.length;){var d=s.pop(),p=s.pop(),f=s.pop();if(p-f<=a)for(var h=f;h<=p;h++)l=t[2*h],c=t[2*h+1],l>=n&&l<=o&&c>=r&&c<=i&&u.push(e[h]);else{var m=Math.floor((f+p)/2);l=t[2*m],c=t[2*m+1],l>=n&&l<=o&&c>=r&&c<=i&&u.push(e[m]);var v=(d+1)%2;(0===d?n<=l:r<=c)&&(s.push(f),s.push(m-1),s.push(v)),(0===d?o>=l:i>=c)&&(s.push(m+1),s.push(p),s.push(v))}}return u}(this.ids,this.coords,e,t,n,r,this.nodeSize)}},{key:"within",value:function(e,t,n){return function(e,t,n,r,o,i){for(var a=[0,e.length-1,0],l=[],c=o*o;a.length;){var s=a.pop(),u=a.pop(),d=a.pop();if(u-d<=i)for(var p=d;p<=u;p++)St(t[2*p],t[2*p+1],n,r)<=c&&l.push(e[p]);else{var f=Math.floor((d+u)/2),h=t[2*f],m=t[2*f+1];St(h,m,n,r)<=c&&l.push(e[f]);var v=(s+1)%2;(0===s?n-o<=h:r-o<=m)&&(a.push(d),a.push(f-1),a.push(v)),(0===s?n+o>=h:r+o>=m)&&(a.push(f+1),a.push(u),a.push(v))}}return l}(this.ids,this.coords,e,t,n,this.nodeSize)}}]),e}(),It={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(e){return e}},Et=Math.fround||(kt=new Float32Array(1),function(e){return kt[0]=+e,kt[0]}),At=function(){function e(t){D(this,e),this.options=Nt(Object.create(It),t),this.trees=new Array(this.options.maxZoom+1)}return H(e,[{key:"load",value:function(e){var t=this.options,n=t.log,r=t.minZoom,o=t.maxZoom,i=t.nodeSize;n&&console.time("total time");var a="prepare ".concat(e.length," points");n&&console.time(a),this.points=e;for(var l,c,s,u,d,p=[],f=0;f<e.length;f++)e[f].geometry&&p.push((l=e[f],c=f,s=void 0,u=void 0,d=void 0,s=K(l.geometry.coordinates,2),u=s[0],d=s[1],{x:Et(Tt(u)),y:Et(Rt(d)),zoom:1/0,index:c,parentId:-1}));this.trees[o+1]=new Lt(p,Gt,Zt,i,Float32Array),n&&console.timeEnd(a);for(var h=o;h>=r;h--){var m=+Date.now();p=this._cluster(p,h),this.trees[h]=new Lt(p,Gt,Zt,i,Float32Array),n&&console.log("z%d: %d clusters in %dms",h,p.length,+Date.now()-m)}return n&&console.timeEnd("total time"),this}},{key:"getClusters",value:function(e,t){var n=((e[0]+180)%360+360)%360-180,r=Math.max(-90,Math.min(90,e[1])),o=180===e[2]?180:((e[2]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,o=180;else if(n>o){var a=this.getClusters([n,r,180,i],t),l=this.getClusters([-180,r,o,i],t);return a.concat(l)}var c,s=this.trees[this._limitZoom(t)],u=[],d=Y(s.range(Tt(n),Rt(i),Tt(o),Rt(r)));try{for(d.s();!(c=d.n()).done;){var p=c.value,f=s.points[p];u.push(f.numPoints?jt(f):this.points[f.index])}}catch(h){d.e(h)}finally{d.f()}return u}},{key:"getChildren",value:function(e){var t=this._getOriginId(e),n=this._getOriginZoom(e),r="No cluster with the specified id.",o=this.trees[n];if(!o)throw new Error(r);var i=o.points[t];if(!i)throw new Error(r);var a,l=this.options.radius/(this.options.extent*Math.pow(2,n-1)),c=[],s=Y(o.within(i.x,i.y,l));try{for(s.s();!(a=s.n()).done;){var u=a.value,d=o.points[u];d.parentId===e&&c.push(d.numPoints?jt(d):this.points[d.index])}}catch(p){s.e(p)}finally{s.f()}if(0===c.length)throw new Error(r);return c}},{key:"getLeaves",value:function(e,t,n){t=t||10,n=n||0;var r=[];return this._appendLeaves(r,e,t,n,0),r}},{key:"getTile",value:function(e,t,n){var r=this.trees[this._limitZoom(e)],o=Math.pow(2,e),i=this.options,a=i.extent,l=i.radius/a,c=(n-l)/o,s=(n+1+l)/o,u={features:[]};return this._addTileFeatures(r.range((t-l)/o,c,(t+1+l)/o,s),r.points,t,n,o,u),0===t&&this._addTileFeatures(r.range(1-l/o,c,1,s),r.points,o,n,o,u),t===o-1&&this._addTileFeatures(r.range(0,c,l/o,s),r.points,-1,n,o,u),u.features.length?u:null}},{key:"getClusterExpansionZoom",value:function(e){for(var t=this._getOriginZoom(e)-1;t<=this.options.maxZoom;){var n=this.getChildren(e);if(t++,1!==n.length)break;e=n[0].properties.cluster_id}return t}},{key:"_appendLeaves",value:function(e,t,n,r,o){var i,a=Y(this.getChildren(t));try{for(a.s();!(i=a.n()).done;){var l=i.value,c=l.properties;if(c&&c.cluster?o+c.point_count<=r?o+=c.point_count:o=this._appendLeaves(e,c.cluster_id,n,r,o):o<r?o++:e.push(l),e.length===n)break}}catch(s){a.e(s)}finally{a.f()}return o}},{key:"_addTileFeatures",value:function(e,t,n,r,o,i){var a,l=Y(e);try{for(l.s();!(a=l.n()).done;){var c=t[a.value],s=c.numPoints,u=void 0,d=void 0,p=void 0;if(s)u=zt(c),d=c.x,p=c.y;else{var f=this.points[c.index];u=f.properties,d=Tt(f.geometry.coordinates[0]),p=Rt(f.geometry.coordinates[1])}var h={type:1,geometry:[[Math.round(this.options.extent*(d*o-n)),Math.round(this.options.extent*(p*o-r))]],tags:u},m=void 0;s?m=c.id:this.options.generateId?m=c.index:this.points[c.index].id&&(m=this.points[c.index].id),void 0!==m&&(h.id=m),i.features.push(h)}}catch(v){l.e(v)}finally{l.f()}}},{key:"_limitZoom",value:function(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}},{key:"_cluster",value:function(e,t){for(var n=[],r=this.options,o=r.radius,i=r.extent,a=r.reduce,l=r.minPoints,c=o/(i*Math.pow(2,t)),s=0;s<e.length;s++){var u=e[s];if(!(u.zoom<=t)){u.zoom=t;var d,p=this.trees[t+1],f=p.within(u.x,u.y,c),h=u.numPoints||1,m=h,v=Y(f);try{for(v.s();!(d=v.n()).done;){var g=d.value,y=p.points[g];y.zoom>t&&(m+=y.numPoints||1)}}catch(_){v.e(_)}finally{v.f()}if(m>h&&m>=l){var b,x=u.x*h,w=u.y*h,C=a&&h>1?this._map(u,!0):null,M=(s<<5)+(t+1)+this.points.length,S=Y(f);try{for(S.s();!(b=S.n()).done;){var k=b.value,O=p.points[k];if(!(O.zoom<=t)){O.zoom=t;var P=O.numPoints||1;x+=O.x*P,w+=O.y*P,O.parentId=M,a&&(C||(C=this._map(u,!0)),a(C,this._map(O)))}}}catch(_){S.e(_)}finally{S.f()}u.parentId=M,n.push(_t(x/m,w/m,M,m,C))}else if(n.push(u),m>1){var L,I=Y(f);try{for(I.s();!(L=I.n()).done;){var E=L.value,A=p.points[E];A.zoom<=t||(A.zoom=t,n.push(A))}}catch(_){I.e(_)}finally{I.f()}}}}return n}},{key:"_getOriginId",value:function(e){return e-this.points.length>>5}},{key:"_getOriginZoom",value:function(e){return(e-this.points.length)%32}},{key:"_map",value:function(e,t){if(e.numPoints)return t?Nt({},e.properties):e.properties;var n=this.points[e.index].properties,r=this.options.map(n);return t&&r===n?Nt({},r):r}}]),e}();function _t(e,t,n,r,o){return{x:Et(e),y:Et(t),zoom:1/0,id:n,parentId:-1,numPoints:r,properties:o}}function jt(e){return{type:"Feature",id:e.id,properties:zt(e),geometry:{type:"Point",coordinates:[(r=e.x,360*(r-.5)),(t=e.y,n=(180-360*t)*Math.PI/180,360*Math.atan(Math.exp(n))/Math.PI-90)]}};var t,n,r}function zt(e){var t=e.numPoints,n=t>=1e4?"".concat(Math.round(t/1e3),"k"):t>=1e3?"".concat(Math.round(t/100)/10,"k"):t;return Nt(Nt({},e.properties),{cluster:!0,cluster_id:e.id,point_count:t,point_count_abbreviated:n})}function Tt(e){return e/360+.5}function Rt(e){var t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function Nt(e,t){for(var n in t)e[n]=t[n];return e}function Gt(e){return e.x}function Zt(e){return e.y}var Dt=Object.prototype.hasOwnProperty;function Vt(e,t,n){var r,o=Y(e.keys());try{for(o.s();!(r=o.n()).done;)if(Ht(n=r.value,t))return n}catch(i){o.e(i)}finally{o.f()}}function Ht(e,t){var n,r,o;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Ht(e[r],t[r]););return-1===r}if(n===Set){if(e.size!==t.size)return!1;var i,a=Y(e);try{for(a.s();!(i=a.n()).done;){if((o=r=i.value)&&"object"===Z(o)&&!(o=Vt(t,o)))return!1;if(!t.has(o))return!1}}catch(s){a.e(s)}finally{a.f()}return!0}if(n===Map){if(e.size!==t.size)return!1;var l,c=Y(e);try{for(c.s();!(l=c.n()).done;){if((o=(r=l.value)[0])&&"object"===Z(o)&&!(o=Vt(t,o)))return!1;if(!Ht(r[1],t.get(o)))return!1}}catch(s){c.e(s)}finally{c.f()}return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return-1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return-1===r}if(!n||"object"===Z(e)){for(n in r=0,e){if(Dt.call(e,n)&&++r&&!Dt.call(t,n))return!1;if(!(n in t)||!Ht(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!=e&&t!=t}function Ft(e,t){return ve.exports.useEffect(e,(n=t,r=ve.exports.useRef(n),o=ve.exports.useRef(0),Ht(n,r.current)||(r.current=n,o.current+=1),ve.exports.useMemo((function(){return r.current}),[o.current])));var n,r,o}var Ut=Se(ke.div)(e||(e=G(["\n border-radius: 50%;\n background: linear-gradient(\n to top,\n ",",\n ","\n );\n color: ",";\n height: ","px;\n width: ","px;\n display: flex;\n justify-content: center;\n align-items: center;\n line-height: 1;\n font-family: ",";\n font-size: ","px;\n border: 2px solid #fff;\n box-shadow: ",";\n cursor: default;\n"])),Oe["--ll-color-primary-variant1"],Oe["--ll-color-primary"],Oe["--ll-color-on-primary"],(function(e){return e.diameter}),(function(e){return e.diameter}),Oe["--ll-font-family"],(function(e){return e.diameter/2.5}),Oe["--ll-shadow-small"]),Bt=Se.ul(t||(t=G(["\n list-style: none;\n padding: 0;\n margin: 0;\n"]))),Wt=Se.li(n||(n=G(["\n font-family: ",";\n padding: ",";\n background-color: ",";\n border-radius: ",";\n border: 1px solid ",";\n cursor: default;\n\n &:not(:last-child) {\n margin-bottom: ",";\n }\n\n &:hover {\n background-color: ",";\n }\n"])),Oe["--ll-font-family"],Oe["--ll-spacing-x-small"],Oe["--ll-color-background"],Oe["--ll-border-radius-small"],Oe["--ll-color-border"],Oe["--ll-spacing-xx-small"],Oe["--ll-color-surface"]),Yt={all:function(){return["commute-calculator"]},list:function(e){return[].concat(W(Yt.all()),[e])}};function Kt(e){var t=e.transportMode,n=e.origin,r=e.destination,o=e.isOpen,i={return:"polyline,summary,typicalDuration",transportMode:t,origin:n,destination:"".concat(null==r?void 0:r.lat,",").concat(null==r?void 0:r.lng),apiKey:"KDL0aAzsbOcv7p53P2ovno2izfDOe93hyzZRrayktbE"};return Je(Yt.list(i),(function(){return fetch("https://router.hereapi.com/v8/routes?"+new URLSearchParams(i)).then((function(e){return e.json()})).then((function(e){return e.routes.length>0&&e.routes[0].sections.length>0?e.routes[0].sections[0]:[]})).catch((function(e){Pe.captureException(e)}))}),{enabled:!!i&&!!r&&!!n&&o})}var qt=function(e){var t,n,r,o,i=e.poi,a=e.poiType,l=e.rect,c=e.activePOI,s=e.hoveredPOI,u=e.isMapMoving,d=e.setActivePOI,p=e.isMobile,f=K(ve.exports.useState(!1),2),h=f[0],m=f[1],v=s===i,g=Le().translations,y=we().sdkState,b=et(),x=b.setCommuteGeojson,w=b.setDestination,C=b.setShowCommuteCalculator,M=b.setSchoolCatchment,S=Kt({destination:{lat:i.lat,lng:i.lng},transportMode:"pedestrian",origin:"".concat(null==y||null===(t=y.options)||void 0===t||null===(n=t.marker)||void 0===n?void 0:n.lat,",").concat(null==y||null===(r=y.options)||void 0===r||null===(o=r.marker)||void 0===o?void 0:o.lng),isOpen:h}).data;ve.exports.useEffect((function(){if(m(c===i),c===i){var e="high_schools"===a||"primary_schools"===a?"school":"poi";Ie.poi.isSchool(i,e)&&null!=i&&i.catchments&&Object.keys((null==i?void 0:i.catchments)||[]).length>0&&M(Ee.formatGeometry.formatGeometry(i.catchments[0].geometry))}}),[c,i]);var k=ve.exports.useMemo((function(){if(null==S||!S.summary||!h)return null;var e=Math.floor(S.summary.typicalDuration/60/60),t=Math.floor(S.summary.typicalDuration/60%60);return 0===e?"".concat(t," ").concat(Ae.pluralize(g.MINUTE,t)):"".concat(e," ").concat(Ae.pluralize(g.HOUR,e)," ").concat(t," ").concat(Ae.pluralize(g.MINUTE,t))}),[S,h]);return ye(X,{latitude:i.lat,longitude:i.lng,style:{zIndex:h?1:0},children:_e(je.Root,{options:{type:a,poi:i,isOpen:!u&&h,isHovered:v,side:"top",size:["rapid_transit_stations"].includes(a)?"medium":"small",collisionPadding:p?{top:l.height+32,bottom:2*ze,left:2*ze,right:2*ze}:{left:l.width+32,right:2*ze,top:2*ze,bottom:2*ze},walkingTime:k,calculateRoute:function(){null!=S&&S.summary&&h&&(w({label:i.name,lat:i.lat,lng:i.lng}),x(Ee.polyline.decode(S.polyline)),C(!0),m(!1))}},onChange:function(e){"open-change"===e.type&&(e.data?setTimeout((function(){d(i)}),0):h&&(d(void 0),M()))},children:[ye(je.Marker,{}),ye(je.Content,{})]})})},Qt={default:{scale:1},hovered:{scale:1.2}},Xt=function(e){var t=e.cluster,n=e.supercluster,r=e.pointsCount,o=e.onClick,i=e.zoom,a=e.activePOI,l=e.hoveredPOI,c=e.setActivePOI,s=e.rect,u=e.isMobile,d=e.isMapMoving,p=K(ve.exports.useState(!1),2),f=p[0],h=p[1],m=20+t.properties.point_count/r*25,v=ve.exports.useMemo((function(){return null==n?void 0:n.getChildren(t.id).map((function(e){return e.properties})).filter((function(e){return!!e}))}),[n,t]),g=null==v?void 0:v.find((function(e){return!!a&&e.poi===a}));return g?ye(qt,{rect:s,poi:g.poi,poiType:g.type,isMobile:u,activePOI:a,hoveredPOI:l,isMapMoving:d,setActivePOI:c}):_e(Te.Root,{open:!d&&f,onOpenChange:function(e){i<=17||h(e)},children:[ye(Te.Trigger,{children:ye(Ut,{diameter:m,onClick:function(){i>17?h(!0):o&&o(t)},variants:Qt,animate:f?"hovered":"default",whileHover:{scale:1.2},transition:ge.transitions.default,children:t.properties.point_count})}),ye(Te.Content,{side:"top",children:ye(Bt,{children:null==v?void 0:v.map((function(e,t){var n;return ye(Wt,{onClick:function(){return c(e.poi)},children:null===(n=e.poi)||void 0===n?void 0:n.name},t)}))})})]})};var $t=me.memo((function(e){var t,n=e.rect,r=e.zoom,o=e.mapRef,i=e.points,a=e.isMobile,l=e.activePOI,c=e.hoveredPOI,s=e.isMapMoving,u=e.setActivePOI,d=null==o||null===(t=o.current)||void 0===t?void 0:t.getMap().getBounds().toArray().flat(),p=function(e){var t=e.points,n=e.bounds,r=e.zoom,o=e.options,i=ve.exports.useRef(),a=ve.exports.useRef(),l=ve.exports.useState([]),c=l[0],s=l[1],u=Math.round(r);return Ft((function(){i.current&&Ht(a.current,t)&&Ht(i.current.options,o)||(i.current=new At(o),i.current.load(t)),n&&s(i.current.getClusters(n,u)),a.current=t}),[t,n,u,o]),{clusters:c,supercluster:i.current}}({points:i,bounds:d,zoom:r,options:{radius:50,maxZoom:30}}),f=p.clusters,h=p.supercluster;return ye(Re,{children:f.map((function(e,t){var d=K(e.geometry.coordinates,2),p=d[0],f=d[1];return function(e){return void 0!==e.properties.cluster}(e)?ye(X,{latitude:f,longitude:p,children:ye(Xt,{rect:n,zoom:r,cluster:e,supercluster:h,pointsCount:i.length,activePOI:l,setActivePOI:u,isMobile:a,isMapMoving:s,hoveredPOI:c,onClick:function(){var t,n=Math.min(h.getClusterExpansionZoom(e.id),20);null===(t=o.current)||void 0===t||t.flyTo({zoom:n,center:[p,f],duration:1e3,essential:!0})}})},"cluster-".concat(e.id)):ye(qt,{rect:n,poi:e.properties.poi,poiType:e.properties.type,isMobile:a,activePOI:l,hoveredPOI:c,isMapMoving:s,setActivePOI:u},t)}))})}));$t.displayName="Markers";var Jt=function(e){return ve.exports.createElement("svg",$({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),ve.exports.createElement("path",{d:"M12 2C8.13 2 5 5.13 5 9C5 14.25 12 22 12 22C12 22 19 14.25 19 9C19 5.13 15.87 2 12 2ZM12 11.5C10.62 11.5 9.5 10.38 9.5 9C9.5 7.62 10.62 6.5 12 6.5C13.38 6.5 14.5 7.62 14.5 9C14.5 10.38 13.38 11.5 12 11.5Z"}))},en=function(e){return ve.exports.createElement("svg",$({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),ve.exports.createElement("path",{d:"M10 20V14H14V20H19V12H22L12 3L2 12H5V20H10Z"}))},tn={all:function(){return["scores"]},list:function(e){return[].concat(W(tn.all()),[e])}};function nn(e){var t=xe().client,n=we().sdkState,r=Ce(n.options,250),o=$($({},ve.exports.useMemo((function(){return!(null==r||!r.marker)?r.marker:{lat:null==r?void 0:r.lat,lng:null==r?void 0:r.lng}}),[r])),{},{geographyLevels:["20","30"],locationScoresRounding:!1,include:e});return Je(tn.list(o),B(F().mark((function e(){return F().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.getScores(o));case 1:case"end":return e.stop()}}),e)}))),{enabled:!!o})}var rn=Se.div(r||(r=G(["\n padding: "," ",";\n background-color: ",";\n display: flex;\n flex-direction: column;\n overflow: hidden;\n flex: 1;\n"])),Oe["--ll-spacing-small"],Oe["--ll-spacing-medium"],Oe["--ll-color-surface"]),on=Se.div(o||(o=G(["\n display: grid;\n grid-template-columns: min-content 1fr;\n grid-gap: ",";\n margin-bottom: ",";\n"])),Oe["--ll-spacing-medium"],Oe["--ll-spacing-medium"]),an=function(){var e,t,n=we().sdkState,r=et(),o=r.activeCategory,i=r.activeScore,a=nn(be.find((function(e){return e.value===o})).scores),l=a.data,c=a.isLoading;return i&&null!=l&&l.location[i]?c?ye("div",{children:"Loading"}):ye(Ne.Root,{options:{score:i,scoresData:l},children:_e(rn,{children:[_e(on,{children:[ye(Ne.Badge,{}),ye(Ne.BarChart,{options:{renderNeighbourhoodAvg:!1,locationIcon:"pin"===(null===(e=n.options)||void 0===e||null===(t=e.marker)||void 0===t?void 0:t.icon)?Jt:en}})]}),ye(Ne.Description,{})]})}):null},ln=Se.div(i||(i=G(["\n display: flex;\n overflow-x: scroll;\n padding: "," ",";\n flex-shrink: 0;\n position: relative;\n"])),Oe["--ll-spacing-x-small"],Oe["--ll-spacing-medium"]),cn=Se.button(a||(a=G(["\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n background: none;\n border: none;\n min-width: 60px;\n padding: 0;\n margin: 0 8px;\n flex-shrink: 0;\n\n &:first-child {\n margin-left: 0;\n }\n\n &:last-child {\n margin-right: 0;\n }\n"]))),sn=Se.div(l||(l=G(["\n position: absolute;\n top: -6px;\n right: 4px;\n border: 2px solid ",";\n border-radius: 6px;\n"])),Oe["--ll-color-background"]),un=Se.div(c||(c=G(["\n flex: 1;\n display: flex;\n align-items: center;\n"]))),dn=Se.div(s||(s=G(["\n margin: 0 2px;\n"]))),pn=function(e){var t=e.category,n=nn(t.scores),r=n.data,o=n.isLoading,i=n.isFetching,a=et(),l=a.activeScore,c=a.setActiveScore,s=a.setActiveCategory;return ye(ln,{children:t.scores.map((function(e){var n=e===l,a=n?"--ll-color-primary":"--ll-color-disabled";return o||i?ye(dn,{children:ye(Ge,{height:"44px",width:"60px"})},e):ye(Ne.Root,{options:{score:e,scoresData:r},children:_e(cn,{onClick:function(){s(t.value),c(e)},children:[ye(Ne.Icon,{options:{color:a,height:28,width:28}}),ye(un,{children:ye(Ne.Title,{options:{variant:"caption1",color:a,lineClamp:1,noMargin:!0,weight:"--ll-font-weight-bold"}})}),ye(sn,{children:ye(Ne.Badge,{options:{variant:"small",isPrimary:n}})})]})},e)}))})},fn=Se.div(u||(u=G(["\n display: flex;\n padding: "," ","\n "," ",";\n"])),Oe["--ll-spacing-x-small"],Oe["--ll-spacing-medium"],Oe["--ll-spacing-xx-small"],Oe["--ll-spacing-medium"]),hn=Se.div(d||(d=G(["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n z-index: 3;\n box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 8px;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n background-color: ",";\n border: 1px solid ",";\n"])),Oe["--ll-color-background"],Oe["--ll-color-border"]),mn=me.forwardRef((function(e,t){var n=et(),r=n.activeCategory,o=n.setActiveCategory;return _e(hn,{ref:t,children:[ye(fn,{children:_e(Ze.Root,{value:r,onValueChange:function(e){return o(e)},children:[ye(Ze.Trigger,{size:"large",children:ye(De.Root,{options:{scoreCategory:r},children:ye(De.Title,{options:{color:"inherit",noMargin:!0,variant:"h6",lineHeight:1}})},r)}),ye(Ze.Content,{children:be.map((function(e){return ye(De.Root,{options:{scoreCategory:e.value},children:ye(Ze.Item,{value:e.value,children:ye(De.Title,{options:{color:"inherit",noMargin:!0,variant:"h6"}})})},e.value)}))})]})}),ye(pn,{category:be.find((function(e){return e.value===r}))}),ye(an,{})]})}));mn.displayName="MobileScores";var vn=Ve({from:{height:0},to:{height:"var(--radix-accordion-content-height)"}}),gn=Ve({from:{height:"var(--radix-accordion-content-height)"},to:{height:0}}),yn=Se(ee)(p||(p=G(["\n margin: 0;\n z-index: 1;\n position: relative;\n margin: 0 calc(-1 * ",");\n padding: 0 ",";\n\n &:hover {\n background-color: ",";\n box-shadow: ",";\n }\n"])),Oe["--ll-spacing-medium"],Oe["--ll-spacing-medium"],Oe["--ll-color-surface"],Oe["--ll-shadow-small"]),bn=Se(te)(f||(f=G(["\n background: none;\n border: none;\n display: flex;\n align-items: center;\n width: 100%;\n padding: "," 0;\n"])),Oe["--ll-spacing-x-small"]),xn=Se(ne)(h||(h=G(["\n background-color: ",";\n position: relative;\n overflow: hidden;\n margin-left: calc(-1 * ",");\n margin-right: calc(-1 * ",');\n\n [data-state="open"] & {\n /* TODO: Re-implement this once StyledComponents is fixed. https://locallogic.atlassian.net/browse/LL22-1107 */\n /* animation: ',' 300ms cubic-bezier(0.87, 0, 0.13, 1); */\n visibility: visible;\n }\n\n [data-state="closed"] & {\n /* TODO: Re-implement this once StyledComponents is fixed. https://locallogic.atlassian.net/browse/LL22-1107 */\n /* animation: '," 300ms cubic-bezier(0.87, 0, 0.13, 1); */\n visibility: hidden;\n }\n"])),Oe["--ll-color-surface"],Oe["--ll-spacing-medium"],Oe["--ll-spacing-medium"],vn,gn),wn=Se.div(m||(m=G(["\n padding: ",";\n border-top: 1px solid ",";\n border-bottom: 1px solid ",";\n"])),Oe["--ll-spacing-medium"],Oe["--ll-color-border"],Oe["--ll-color-border"]),Cn=Se.span(v||(v=G(["\n ","[data-state=open] & {\n transform: rotate(90deg);\n } ;\n"])),bn);Se.div(g||(g=G(["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n"])));var Mn=Se.div(y||(y=G(["\n margin: "," 0;\n"])),Oe["--ll-spacing-small"]),Sn=Se.div(b||(b=G(["\n margin-top: ",";\n &:empty {\n margin: 0;\n }\n"])),Oe["--ll-spacing-large"]),kn=function(e){var t=e.score,n=vt(),r=n.data,o=n.isLoading,i=et(),a=i.activePOI,l=i.setActivePOI,c=i.hoveredPOI,s=i.setHoveredPOI,u=yt(),d=u.mapRef,p=u.mapPadding;return o?ye(Re,{children:W(Array(10)).map((function(e,t){return ye(Mn,{children:ye(Ge,{height:"34px",width:"100%"})},t)}))}):r?ye(He.Root,{options:{type:"school",data:null==r?void 0:r[t],activePOI:a,hoveredPOI:c},onChange:function(e){if("poi-click"===e.type){var t=e.data;l(t);var n,r=window.innerWidth-p.left,o=window.innerWidth/2,i=r/2+p.left-o;if(t)null===(n=d.current)||void 0===n||n.easeTo({zoom:18,center:[t.lng,t.lat],duration:1e3,offset:[i,0]})}"poi-hover"===e.type&&s(e.data)}}):null},On=me.memo((function(e){var t=e.result,n=e.poi,r=et(),o=r.activePOI,i=r.setActivePOI,a=r.hoveredPOI,l=r.setHoveredPOI,c=yt(),s=c.mapRef,u=c.mapPadding;return t.data&&t.data[n]?ye(Fe.Content,{options:{value:n},children:ye(He.Root,{options:{type:"poi",data:t.data[n],activePOI:o,hoveredPOI:a},onChange:function(e){if("poi-click"===e.type){var t=e.data;i(t);var n,r=window.innerWidth-u.left,o=window.innerWidth/2,a=r/2+u.left-o;if(t)null===(n=s.current)||void 0===n||n.flyTo({zoom:18,center:[t.lng,t.lat],duration:1e3,offset:[a,0],essential:!0})}"poi-hover"===e.type&&l(e.data)}})},n):null}));On.displayName="POI";var Pn=me.memo((function(e){var t=e.include,n=ht(),r=null==t?void 0:t.filter((function(e){var t;return((null==n||null===(t=n.data)||void 0===t?void 0:t[e])||[]).length>0}));return n.isLoading&&r.length?ye(Re,{children:W(Array(10)).map((function(e,t){return ye(Mn,{children:ye(Ge,{height:"34px",width:"100%"})},t)}))}):n.data?_e(Fe.Root,{options:{include:r},children:[ye(Fe.Tabs,{}),r.map((function(e){return ye(On,{poi:e,result:n},e)}))]}):null}));Pn.displayName="POIs";var Ln=me.memo((function(e){var t,n,r=e.score,o=e.isLoading,i=e.scoresData,a=we().sdkState,l=r===et().activeScore;return o?ye(Mn,{children:ye(Ge,{height:"34px",width:"100%"},r)}):null!=i&&i.location[r]?ye(re,{value:r,children:_e(Ne.Root,{options:{score:r,scoresData:i},children:[ye(yn,{children:_e(bn,{children:[ye(Cn,{children:ye(Ue,{SVGElement:oe,fill:Oe["--ll-color-on-background-variant1"]})}),ye(Be,{spacing:"--ll-spacing-small"}),ye(Ne.Icon,{}),ye(Be,{spacing:"--ll-spacing-small"}),ye(Ne.Title,{}),ye(Be,{}),ye(Ne.Badge,{options:{isPrimary:l}})]})}),ye(xn,{children:_e(wn,{children:[ye(Ne.Description,{}),ye(Be,{vertical:!0,spacing:"--ll-spacing-small"}),ye(Ne.BarChart,{options:{renderNeighbourhoodAvg:!1,locationIcon:"pin"===(null===(t=a.options)||void 0===t||null===(n=t.marker)||void 0===n?void 0:n.icon)?Jt:en}}),ye(Sn,{children:"high_schools"===r||"primary_schools"===r?ye(kn,{score:r}):ye(Pn,{include:Me[r]})})]})})]})},r):null}));Ln.displayName="Score";var In=Se.div(x||(x=G(["\n padding: "," ",";\n"])),Oe["--ll-spacing-small"],Oe["--ll-spacing-medium"]),En=Se.div(w||(w=G(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"]))),An=me.memo((function(e){var t=e.tabContent,n=nn(t.scores),r=n.data,o=n.isLoading,i=n.isFetching,a=Le().translations;return _e(In,{children:[_e(En,{children:[ye(We.Title,{options:{variant:"h4",noMargin:!0,weight:"--ll-font-weight-medium"}}),i&&!o&&ye(Ye,{size:"small"})]}),ye(Be,{spacing:"--ll-spacing-small",vertical:!0}),!i&&!Object.keys((null==r?void 0:r.location)||{}).length&&ye(Ke,{color:"--ll-color-on-background-variant1",children:a.EMPTY_TEXT}),t.scores.map((function(e){return ye(Ln,{score:e,isLoading:o,scoresData:r},e)}))]})}));An.displayName="ScoreCategory";var _n=me.memo((function(e){var t=e.tabContent,n=et(),r=n.activeScore,o=n.setActiveScore;return ve.exports.useEffect((function(){o(t.scores[0])}),[]),ye(ie,{value:r,onValueChange:function(e){o(e)},type:"single",collapsible:!0,children:ye(An,{tabContent:t})})}));_n.displayName="ScoreCategoryAccordion";var jn=Se.div(C||(C=G(["\n overflow-y: auto;\n"]))),zn=Se.div(M||(M=G(["\n position: absolute;\n top: ",";\n left: ",";\n width: 360px;\n max-height: calc(100% - 2 * ",");\n z-index: 1;\n border-radius: ",";\n box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 8px;\n background-color: #fff;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n background-color: ",";\n border: 1px solid ",";\n"])),Oe["--ll-spacing-medium"],Oe["--ll-spacing-medium"],Oe["--ll-spacing-medium"],Oe["--ll-border-radius-medium"],Oe["--ll-color-background"],Oe["--ll-color-border"]);Se.div(S||(S=G(["\n display: flex;\n justify-content: center;\n padding: ",";\n"])),Oe["--ll-spacing-small"]);var Tn=Se.div(k||(k=G(["\n padding: ",";\n border-bottom: 1px solid ",";\n"])),Oe["--ll-spacing-xx-small"],Oe["--ll-color-border"]),Rn=Se.div(O||(O=G(["\n display: flex;\n justify-content: center;\n padding: ",";\n background-color: ",";\n"])),Oe["--ll-spacing-small"],Oe["--ll-color-background"]),Nn=function(){return ye(Rn,{children:ye(qe.Root,{})})},Gn=me.forwardRef((function(e,t){var n=et(),r=n.activeCategory,o=n.setActiveCategory;return ye(We.Root,{options:{currentTab:r},onChange:function(e){o(e.data)},children:_e(zn,{ref:t,children:[ye(Tn,{children:ye(We.Tabs,{})}),ye(jn,{children:be.map((function(e){return ye(We.Content,{options:{value:e.value},children:ye(_n,{tabContent:e},e.value)},e.value)}))}),ye(Nn,{})]})})}));Gn.displayName="DesktopScores";var Zn=Se.div(P||(P=G(["\n position: relative;\n display: flex;\n flex-direction: column;\n height: 100vh;\n"]))),Dn=function(e){return ve.exports.createElement("svg",$({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),ve.exports.createElement("path",{d:"M22.4275 10.5938L13.4175 1.58383C12.6675 0.833834 11.3475 0.823834 10.5875 1.58383L1.58745 10.5838C0.807453 11.3638 0.807453 12.6238 1.58745 13.4038L10.5875 22.4038C10.9775 22.7938 11.4875 22.9838 11.9975 22.9838C12.5075 22.9838 13.0175 22.7938 13.4075 22.4038L22.3975 13.4138C23.1875 12.6538 23.1975 11.3938 22.4275 10.5938ZM12.0075 20.9938L3.00745 11.9938L12.0075 2.99383L21.0075 11.9938L12.0075 20.9938ZM7.99745 11.0038V15.0038H9.99745V12.0038H13.9975V14.5038L17.4975 11.0038L13.9975 7.50383V10.0038H8.99745C8.44745 10.0038 7.99745 10.4538 7.99745 11.0038Z"}))},Vn=function(e){return ve.exports.createElement("svg",$({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),ve.exports.createElement("path",{d:"M13.5 5.5C14.6 5.5 15.5 4.6 15.5 3.5C15.5 2.4 14.6 1.5 13.5 1.5C12.4 1.5 11.5 2.4 11.5 3.5C11.5 4.6 12.4 5.5 13.5 5.5ZM9.8 8.9L7 23H9.1L10.9 15L13 17V23H15V15.5L12.9 13.5L13.5 10.5C14.8 12 16.8 13 19 13V11C17.1 11 15.5 10 14.7 8.6L13.7 7C13.14 6.11 12.02 5.75 11.05 6.16L6 8.3V13H8V9.6L9.8 8.9Z"}))},Hn=function(e){return ve.exports.createElement("svg",$({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),ve.exports.createElement("path",{d:"M18.92 6.01C18.72 5.42 18.16 5 17.5 5H6.5C5.84 5 5.29 5.42 5.08 6.01L3 12V20C3 20.55 3.45 21 4 21H5C5.55 21 6 20.55 6 20V19H18V20C18 20.55 18.45 21 19 21H20C20.55 21 21 20.55 21 20V12L18.92 6.01ZM6.85 7H17.14L18.22 10.11H5.77L6.85 7ZM19 17H5V12H19V17Z"}),ve.exports.createElement("path",{d:"M7.5 16C8.32843 16 9 15.3284 9 14.5C9 13.6716 8.32843 13 7.5 13C6.67157 13 6 13.6716 6 14.5C6 15.3284 6.67157 16 7.5 16Z"}),ve.exports.createElement("path",{d:"M16.5 16C17.3284 16 18 15.3284 18 14.5C18 13.6716 17.3284 13 16.5 13C15.6716 13 15 13.6716 15 14.5C15 15.3284 15.6716 16 16.5 16Z"}))},Fn=function(e){return ve.exports.createElement("svg",$({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),ve.exports.createElement("path",{d:"M12,2C6.47,2,2,6.47,2,12s4.47,10,10,10s10-4.47,10-10S17.53,2,12,2z M17,15.59L15.59,17L12,13.41L8.41,17L7,15.59 L10.59,12L7,8.41L8.41,7L12,10.59L15.59,7L17,8.41L13.41,12L17,15.59z"}))},Un=Se.div(L||(L=G(["\n max-height: calc(100% - 2 * ",");\n border-radius: ",";\n box-shadow: ",";\n background-color: ",";\n border: 1px solid ",";\n padding: ",";\n"])),Oe["--ll-spacing-medium"],Oe["--ll-border-radius-medium"],Oe["--ll-shadow-small"],Oe["--ll-color-background"],Oe["--ll-color-border"],Oe["--ll-spacing-x-small"]),Bn=Se.div(I||(I=G(["\n display: flex;\n justify-content: space-between;\n align-items: end;\n\n "," {\n // Adjust if text of commute transport mode changes\n width: 52%;\n margin-right: ",";\n }\n"])),ae,Oe["--ll-spacing-x-small"]),Wn=Se.div(E||(E=G(["\n background-color: ",";\n padding: "," "," 0;\n border-radius: ",";\n"])),Oe["--ll-color-surface"],Oe["--ll-spacing-x-small"],Oe["--ll-spacing-small"],Oe["--ll-border-radius-medium"]),Yn=Se(Qe)(A||(A=G(["\n position: absolute;\n right: ",";\n top: ",";\n"])),Oe["--ll-spacing-xx-small"],Oe["--ll-spacing-xx-small"]),Kn=function(e){var t,n,r,o,i=e.className,a=e.onClose,l=we().sdkState,c=et(),s=c.setCommuteGeojson,u=c.destination,d=c.setDestination,p=K(ve.exports.useState("pedestrian"),2),f=p[0],h=p[1],m=$e(),v=Le().translations,g=Kt({destination:u,transportMode:f,origin:"".concat(null==l||null===(t=l.options)||void 0===t||null===(n=t.marker)||void 0===n?void 0:n.lat,",").concat(null==l||null===(r=l.options)||void 0===r||null===(o=r.marker)||void 0===o?void 0:o.lng),isOpen:!0}),y=g.data,b=g.isFetching,x=g.isFetched;ve.exports.useEffect((function(){null!=y&&y.summary&&s(Ee.polyline.decode(y.polyline))}),[y]);var w={pedestrian:[v.WALKING,Vn],car:[v.DRIVING,Hn]},C=ve.exports.useMemo((function(){if(null==y||!y.summary)return null;var e=Math.floor(y.summary.typicalDuration/60/60),t=Math.floor(y.summary.typicalDuration/60%60);return 0===e?"".concat(t," ").concat(Ae.pluralize(v.MINUTE,t)):"".concat(e," ").concat(Ae.pluralize(v.HOUR,e)," ").concat(t," ").concat(Ae.pluralize(v.MINUTE,t))}),[y]),M=ve.exports.useMemo((function(){if(null==y||!y.summary)return null;var e=Math.floor(y.summary.length/1e3);return 0===e?"".concat(y.summary.length," m"):"".concat(e," km")}),[y]);return _e(Un,{className:i,children:[ye(Yn,{size:"medium",color:"neutral",onClick:a,SVGElement:Fn}),_e(Bn,{children:[ye(le,{label:v.CALCULATE_COMMUTE,placeholder:(null==u?void 0:u.label)||v.SEARCH_MAP,renderListAbove:m,renderListAbovePosition:30,onSearch:function(e){d({lat:e.latitude,lng:e.longitude})}}),ye(Ze.Root,{value:f,onValueChange:function(e){h(e)},children:_e(Ze.Trigger,{children:[ye(Ue,{SVGElement:w[f][1],fill:Oe["--ll-color-on-background-variant1"],width:16}),w[f][0],_e(Ze.Content,{children:[ye(Ze.Item,{value:"car",children:v.DRIVING}),ye(Ze.Item,{value:"pedestrian",children:v.WALKING})]})]})})]}),(x||b)&&_e(Re,{children:[ye(Be,{vertical:!0,spacing:"--ll-spacing-x-small"}),ye(ce,{open:!!y,children:b?ye(Ge,{height:"70.4px",width:"100%"}):null!=y&&y.summary?_e(Wn,{children:[ye(Ke,{variant:"h5",children:C}),_e(Ke,{children:[M," – ",v.FAST_ROUTE]})]}):_e(Wn,{children:[ye(Ke,{variant:"h5",children:v.NO_ROUTE}),ye(Ke,{children:v.TRY_SUGGESTION})]})})]})]})},qn=Se.div(_||(_=G(["\n position: absolute;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 3;\n"]))),Qn=Se.div(j||(j=G(["\n position: absolute;\n top: ",";\n right: ",";\n z-index: 3;\n max-width: 356px;\n"])),Oe["--ll-spacing-medium"],Oe["--ll-spacing-medium"]),Xn=Se(Qe)(z||(z=G(["\n box-shadow: ",";\n position: absolute;\n bottom: ",";\n right: ",";\n"])),Oe["--ll-shadow-medium"],Oe["--ll-spacing-medium"],Oe["--ll-spacing-medium"]),$n=Se(Kn)(T||(T=G([""]))),Jn=Se(Kn)(R||(R=G(["\n border-radius: ","\n "," 0 0;\n border: 0;\n"])),Oe["--ll-border-radius-small"],Oe["--ll-border-radius-small"]),er=Se(Xe)(N||(N=G(["\n box-shadow: ",";\n"])),Oe["--ll-shadow-small"]),tr=function(){var e=et(),t=e.setCommuteGeojson,n=e.setDestination,r=e.showCommuteCalculator,o=e.setShowCommuteCalculator,i=Le().translations,a=function(){n(void 0),t(void 0),o(!1)},l=function(){o(!0)};return $e()?ye(Re,{children:r?ye(qn,{children:ye(Jn,{onClose:a})}):ye(Xn,{size:"large",SVGElement:Dn,onClick:l})}):ye(Qn,{children:r?ye($n,{onClose:a}):ye(er,{onClick:l,startAdornment:ye(Dn,{}),children:i.CALCULATE_COMMUTE})})},nr=function(){var e,t,n,r=we(),o=r.sdkState,i=r.setSdkState,a=et(),l=a.activeScore,c=a.activePOI,s=a.setActivePOI,u=a.hoveredPOI,d=a.commuteGeojson,p=a.destination,f=a.schoolCatchment,h=$e(),m=ht(),v=vt(),g="night"===(null==o||null===(e=o.globalOptions)||void 0===e||null===(t=e.appearance)||void 0===t?void 0:t.theme)?"dd191599-2a92-49fc-9a33-e12391753ad5":"600d69cb-288d-445e-9839-3dfe4d76b31a",y={id:"point",type:"line",paint:{"line-width":6,"line-color":getComputedStyle(document.documentElement).getPropertyValue("--ll-color-link")}},b={id:"school",type:"line",source:"schoolCatchment",paint:{"line-width":3,"line-color":getComputedStyle(document.documentElement).getPropertyValue("--ll-color-on-background")}},x=K(ve.exports.useState(!1),2),w=x[0],C=x[1],M=ve.exports.useMemo((function(){var e,t;return"high_schools"!==l&&"primary_schools"!==l||v.isFetching?Me&&l&&Me[l]&&null!==(e=Me[l])&&void 0!==e&&e.length||m.isFetching?m.data:J({},l,[]):J({},l,(null==v||null===(t=v.data)||void 0===t?void 0:t[l])||[])}),[m.data,v.data,l]),S=ve.exports.useMemo((function(){return M?Object.entries(M).map((function(e){var t=K(e,2),n=t[0];return t[1].map((function(e){return st([e.lng,e.lat],{poi:e,type:n})}))})).flat().filter((function(e,t,n){return n.findIndex((function(t){return["lat","lng","name"].every((function(n){return t.properties.poi[n]===e.properties.poi[n]}))}))===t})):[]}),[M]),k=ve.exports.useMemo((function(){var e,t,n,r=(null==o||null===(e=o.options)||void 0===e?void 0:e.marker)&&st([null==o||null===(t=o.options)||void 0===t?void 0:t.marker.lng,null==o||null===(n=o.options)||void 0===n?void 0:n.marker.lat]);return[].concat(W(S),W(r?[r]:[]),W(p?[st([null==p?void 0:p.lng,null==p?void 0:p.lat])]:[]))}),[S,null==o||null===(n=o.options)||void 0===n?void 0:n.marker,p]),O=ve.exports.useRef(),P=K(se(),2),L=P[0],I=P[1],E=ve.exports.useMemo((function(){return{top:25+I.height,bottom:25,left:25,right:25}}),[I.height]),A=ve.exports.useMemo((function(){return{top:50,bottom:50,left:I.width+32+50,right:50}}),[I.width]),_=h?E:A;return ve.exports.useEffect((function(){var e,t;if(k.length&&null!==(e=o.options)&&void 0!==e&&e.marker){var n,r,i,a=K(pt((n=k.map((function(e){var t=e.geometry;return[t.coordinates[1],t.coordinates[0]]})),void 0===i&&(i={}),ct({type:"MultiPoint",coordinates:n},r,i))),4),l=a[0],c=a[1],s=a[2],u=a[3];null==O||null===(t=O.current)||void 0===t||t.fitBounds([[c,l],[u,s]],{maxZoom:17,padding:_,duration:1e3})}}),[k,_,f]),o.options?ye(bt,{mapRef:O,mapPadding:_,children:_e(Zn,{children:[_e(ue,{ref:O,mapLib:de,latitude:o.options.lat,longitude:o.options.lng,zoom:o.options.zoom,pitch:o.options.pitch,bearing:o.options.bearing,style:{flex:1,width:"100vw"},mapStyle:"https://api.maptiler.com/maps/".concat(g,"/style.json?key=","9jNGatuzs05Q1oNlctEs"),onMove:function(e){i($($({},o),{},{options:$($({},o.options),{},{lat:e.viewState.latitude,lng:e.viewState.longitude,zoom:e.viewState.zoom,bearing:e.viewState.bearing,pitch:e.viewState.pitch})}))},cooperativeGestures:o.options.cooperativeGestures,onMoveStart:function(){return C(!0)},onMoveEnd:function(){return C(!1)},attributionControl:!1,children:[ye(pe,{compact:!0,position:h?"bottom-left":"bottom-right"}),ye(fe,{position:h?"top-right":"bottom-right",showCompass:!0,style:{marginTop:h?16+I.height:16,marginRight:16}}),o.options.marker&&ye(he,{marker:o.options.marker}),ye($t,{rect:I,zoom:o.options.zoom,mapRef:O,points:S,isMobile:h,activePOI:c,hoveredPOI:u,isMapMoving:w,setActivePOI:s}),ye(h?mn:Gn,{ref:L}),ye(tr,{}),p&&ye(he,{marker:$({icon:"pin"},p)}),d&&ye(it,{type:"geojson",data:d,children:ye(lt,$({},y))}),f&&ye(it,{type:"geojson",data:f,children:ye(lt,$({},b))})]}),h&&ye(Nn,{})]})}):ye("div",{children:"No options provided."})};V("default",(function(){return ye(nt,{children:ye(nr,{})})}))}}}))}();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}var e,r,n,o,i,a,u;function c(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */c=function(){return e};var e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(P){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof h?e:h,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return _()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=S(a,r);if(u){if(u===d)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(P){return{type:"throw",arg:P}}}e.wrap=s;var d={};function h(){}function p(){}function v(){}var y={};l(y,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(L([])));g&&g!==r&&n.call(g,i)&&(y=g);var b=v.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(e,r){function o(i,a,u,c){var l=f(e[i],e,a);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==t(d)&&n.call(d,"__await")?r.resolve(d.__await).then((function(t){o("next",t,u,c)}),(function(t){o("throw",t,u,c)})):r.resolve(d).then((function(t){s.value=t,u(s)}),(function(t){return o("throw",t,u,c)}))}c(l.arg)}var i;this._invoke=function(t,e){function n(){return new r((function(r,n){o(t,e,r,n)}))}return i=i?i.then(n,n):n()}}function S(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,d;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function L(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:_}}function _(){return{value:void 0,done:!0}}return p.prototype=v,l(b,"constructor",v),l(v,"constructor",p),p.displayName=l(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},e.awrap=function(t){return{__await:t}},w(x.prototype),l(x.prototype,a,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),l(b,u,"Generator"),l(b,i,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=L,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function l(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(l){return void r(l)}u.done?e(c):Promise.resolve(c).then(n,o)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){l(i,n,o,a,u,"next",t)}function u(t){l(i,n,o,a,u,"throw",t)}a(void 0)}))}}function f(t){return function(t){if(Array.isArray(t))return g(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||m(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function h(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function p(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?h(Object(r),!0).forEach((function(e){v(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function v(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function y(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||m(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(t,e){if(t){if("string"==typeof t)return g(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(t,e):void 0}}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}System.register(["./index-legacy.95ccb44a.js","./useIsMobile-legacy.ed5dee46.js","./useQuery-legacy.97f1ad62.js"],(function(t,l){"use strict";var h,v,m,g,b,w,x,S,j,O,E,L,_,P,C,A,M,k;return{setters:[function(t){h=t.R,v=t.r,m=t.a9,g=t.u,b=t.j,w=t.e,x=t.aa,S=t.s,j=t.C,O=t.c,E=t.p,L=t.G,_=t.ab,P=t.o,C=t.l,A=t.U},function(t){M=t.u},function(t){k=t.u}],execute:function(){var l=h.createContext({}),T=function(){return v.exports.useContext(l)},I=function(t){var e,r,n=t.children,o=M(),i=y(v.exports.useState(m[0].value),2),a=i[0],u=i[1],c=g().sdkState,s=y(v.exports.useReducer((function(t,e){return p(p({},t),e)}),{location:{lat:(null===(e=c.options)||void 0===e?void 0:e.lat)||43.661337,lng:(null===(r=c.options)||void 0===r?void 0:r.lng)||-79.401903},demographics:{radius:2500}}),2),f=s[0],d=s[1],h=v.exports.useMemo((function(){return{demographicsState:f,setDemographicsState:d,activeCategory:a,setActiveCategory:u}}),[a,u,f,d]);return b(l.Provider,{value:h,children:w(x.Root,{options:{activeTab:a},onChange:function(t){u(t.data)},children:[b(o?x.Select:x.Tabs,{}),n]})})},G=S.div(e||(e=d(["\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n background-color: ",";\n"])),j["--ll-color-background"]),D=S.div(r||(r=d(["\n overflow-y: auto;\n padding: ",";\n"])),j["--ll-spacing-medium"]),N=function(){var t=O().translations;return b(E,{variant:"h3",weight:"--ll-font-weight-bold",children:t.DEMOGRAPHICS_TITLE})},F=S.div(n||(n=d(["\n margin: "," 0;\n"])),j["--ll-spacing-xx-small"]);S.div(o||(o=d(["\n display: flex;\n padding: "," ","\n "," ",";\n"])),j["--ll-spacing-x-small"],j["--ll-spacing-medium"],j["--ll-spacing-xx-small"],j["--ll-spacing-medium"]);var R=S.div(i||(i=d(["\n height: 40px;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-right: ",";\n"])),j["--ll-spacing-medium"]),z={all:function(){return["demographics"]},list:function(t){return[].concat(f(z.all()),[t])}};var H=function(){var t=T().demographicsState.income;return b(_.AvgIncomeCard,{options:{incomeTypes:(null==t?void 0:t.variables)||[]}})},U=function(){var t=T().demographicsState.population_age;return b(_.PopulationByAgeChart,{options:{labels:(null==t?void 0:t.variables.map((function(t){return t.label})))||[],data:(null==t?void 0:t.variables.map((function(t){return Math.round(100*t.value)})))||[]}})},Y=S.div(a||(a=d(["\n display: flex;\n justify-content: space-between;\n gap: ",";\n\n @media (max-width: ","px) {\n flex-wrap: wrap;\n }\n"])),j["--ll-spacing-medium"],P.screenSizes.tablet),B=function(){var t=T().demographicsState,e=t.housing_tenancy;t.housing_type;return b(Y,{children:b(_.OwnersRentersCard,{options:{datasets:(null==e?void 0:e.variables.map((function(t){return{label:t.label,data:Math.round(100*t.value)}})))||[]}})})},Q=function(){var t=T().demographicsState,e=t.household_composition,r=(t.family_composition,null==e?void 0:e.variables.map((function(t){return p(p({},t),{},{value:Math.round(100*t.value)})})).filter((function(t){return Math.round(100*t.value)>0})));return b(_.HouseholdCompositionCard,{options:{labels:(null==r?void 0:r.map((function(t){return"".concat(t.value,"% ").concat(t.label)})))||[],data:(null==r?void 0:r.map((function(t){return t.value})))||[]}})},$=function(){var t=T().demographicsState.commute_mode,e=null==t?void 0:t.variables.map((function(t){return p(p({},t),{},{value:Math.round(100*t.value)})})).filter((function(t){return Math.round(100*t.value)>0}));return b(_.CommuteModeCard,{options:{labels:(null==e?void 0:e.map((function(t){return"".concat(t.value,"% ").concat(t.label)})))||[],data:(null==e?void 0:e.map((function(t){return t.value})))||[]}})},q=function(){var t=T().demographicsState.education_level;return b(_.EducationLevelChart,{options:{labels:(null==t?void 0:t.variables.map((function(t){return t.label})))||[],data:(null==t?void 0:t.variables.map((function(t){return Math.round(100*t.value)})))||[]}})},J=function(){var t=T().demographicsState.mother_tongue,e=null==t?void 0:t.variables.map((function(t){return p(p({},t),{},{value:Math.round(100*t.value)})})).filter((function(t){return t.value>0}));return b(_.MotherTongueChart,{options:{labels:(null==e?void 0:e.map((function(t){return t.label})))||[],data:(null==e?void 0:e.map((function(t){return t.value})))||[]}})},K=function(){var t,e,r,n,o,i,a=T(),u=a.demographicsState,l=a.activeCategory,f=a.setDemographicsState,d=(t={lat:u.location.lat,lng:u.location.lng,radius:u.demographics.radius},e=t.lat,r=t.lng,n=t.radius,o=L().client,i={lat:e,lng:r,radius:n},k(z.list(i),s(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o.getDemographics(i));case 1:case"end":return t.stop()}}),t)}))),{enabled:!!i})),h=d.data,y=d.isFetching;v.exports.useEffect((function(){!y&&h&&f(p({},h))}),[y]);return b(F,{children:b(x.Content,{options:{value:l},children:function(){if(y)return b(R,{children:b(C,{})});switch(l){case"income":return b(H,{});case"population":return b(U,{});case"housing":return b(B,{});case"household":return b(Q,{});case"commute":return b($,{});case"education":return b(q,{});case"languages":return b(J,{});default:return w("div",{children:[l," tab"]})}}()})})},V=S.div(u||(u=d(["\n padding: ",";\n\n a {\n justify-content: end;\n }\n"])),j["--ll-spacing-small"]),W=function(){return b(V,{children:b(A.Root,{})})};t("default",(function(){return b(I,{children:b(G,{children:w(D,{children:[b(N,{}),b(K,{}),b(W,{})]})})})}))}}}))}();
|