diff --git a/public/build/assets/About-DPBE0Q2l.js b/public/build/assets/About-r0jCEBny.js similarity index 99% rename from public/build/assets/About-DPBE0Q2l.js rename to public/build/assets/About-r0jCEBny.js index 7a483c40..f18d773b 100644 --- a/public/build/assets/About-DPBE0Q2l.js +++ b/public/build/assets/About-r0jCEBny.js @@ -1 +1 @@ -import{_ as i,a as e}from"./android-BlaF6v8Z.js";import{_ as o}from"./IMG_0556-0A1kBpHu.js";import{n as c}from"./app-DuS6KM7M.js";/* empty css */const l="/build/assets/iphone-BXDqbS6h.png",r="/build/assets/facemask-tag-DTb-EcZv.png",n="/build/assets/facemask-map-BqUpLVXB.png",_="/build/assets/cigbutts-CVuuOzE4.jpg",b="/build/assets/nlbrands-DL1esRqV.png",u="/build/assets/marinelitter-CVAxhBMz.jpg",d="/build/assets/microplastics_oranmore-CI7v0KxT.jpg",m="/build/assets/urban-D96wAs5R.jpg",h="/build/assets/IMG_0554-BicQT55Q.jpg",p="/build/assets/butts-DfH5MkNF.jpg",v="/build/assets/cigbutts_jar-BL7Z4hk3.jpg",g="/build/assets/plastic_bottles-DUxEtUtl.jpg",C={name:"About",methods:{android(){window.open("https://play.google.com/store/apps/details?id=com.geotech.openlittermap","_blank")},ios(){window.open("https://apps.apple.com/us/app/openlittermap/id1475982147","_blank")}}};var f=function(){var t=this,s=t._self._c;return s("div",[s("section",{staticClass:"section"},[s("div",{staticClass:"columns"},[t._m(0),s("div",{staticClass:"column cig-2"},[s("h2",{staticClass:"title is-2",staticStyle:{color:"red","text-align":"center"},attrs:{id:"butts1txt"}},[s("strong",[t._v(t._s(t.$t("home.about.about2")))])])])]),s("br"),s("br"),s("div",{staticClass:"columns"},[s("div",{staticClass:"column is-one-third is-offset-1"},[s("h1",{staticClass:"title is-1",staticStyle:{"text-align":"center"}},[s("strong",[t._v(t._s(t.$t("home.about.about3")))])]),s("br"),s("h1",{staticClass:"subtitle is-3"},[t._v(t._s(t.$t("home.about.about4")))]),s("br"),s("h1",{staticClass:"subtitle is-3"},[t._v(t._s(t.$t("home.about.about5")))]),s("br"),s("p",{staticClass:"subtitle is-3"},[t._v(t._s(t.$t("home.about.about6")))])]),t._m(1)])]),s("section",{staticClass:"hero is-success"},[s("div",{staticClass:"hero-body"},[s("div",{staticClass:"container has-text-centered"},[s("h1",{staticClass:"title"},[s("strong",[t._v(" "+t._s(t.$t("home.about.about7"))+" ")])])]),s("div",{staticClass:"has-text-centered",staticStyle:{"padding-top":"2em"}},[s("router-link",{attrs:{to:"/signup"}},[s("button",{staticClass:"button is-large is-info hov"},[t._v(t._s(t.$t("home.about.about9")))])])],1)])]),s("div",{staticClass:"has-text-centered pt3"},[s("h1",{staticClass:"title is-1"},[t._v("1. "+t._s(t.$t("home.about.about9a")))]),s("img",{attrs:{src:l}})]),s("div",{staticClass:"has-text-centered pt3"},[s("h1",{staticClass:"title is-1"},[t._v("2. "+t._s(t.$t("home.about.about9b")))]),s("img",{attrs:{src:r}})]),s("div",{staticClass:"has-text-centered pt3"},[s("h1",{staticClass:"title is-1"},[t._v("3. "+t._s(t.$t("home.about.about9c")))]),s("img",{attrs:{src:n}})]),s("div",{staticClass:"flex jc pt3"},[s("img",{staticClass:"app-icon",staticStyle:{"margin-right":"1em"},attrs:{src:i},on:{click:t.ios}}),s("img",{staticClass:"app-icon",attrs:{src:e},on:{click:t.android}})]),s("section",[s("div",{staticClass:"columns",staticStyle:{"padding-top":"4em","padding-bottom":"4em"}},[s("div",{staticClass:"column is-one-third is-offset-1",staticStyle:{"padding-left":"2em",margin:"auto"}},[s("h1",{staticClass:"title is-2",staticStyle:{"text-align":"center"}},[s("strong",{staticStyle:{color:"red"}},[t._v(t._s(t.$t("home.about.about10")))])]),s("br"),s("h1",{staticClass:"title is-2",staticStyle:{"text-align":"center"}},[s("strong",{staticStyle:{color:"red"}},[t._v(t._s(t.$t("home.about.about11")))])])]),t._m(2)])]),s("section",{staticClass:"hero is-warning"},[s("div",{staticClass:"hero-body"},[s("div",{staticClass:"container"},[s("h1",{staticClass:"title is-1"},[t._v(" "+t._s(t.$t("home.about.about12"))+" ")]),s("img",{attrs:{src:_}}),s("h1",{staticClass:"title is-1 has-text-right"},[t._v(" "+t._s(t.$t("home.about.about13"))+" ")])])])]),s("div",{staticClass:"hero-body"},[s("div",{staticClass:"container"},[s("div",{staticClass:"tile is-ancestor"},[s("div",{staticClass:"tile is-vertical is-8"},[s("div",{staticClass:"tile"},[s("div",{staticClass:"tile is-parent is-vertical"},[s("article",{staticClass:"tile is-child notification is-primary"},[s("p",{staticClass:"title"},[t._v(t._s(t.$t("home.about.about14"))+" "),s("b",{staticStyle:{color:"black"}},[t._v(t._s(t.$t("home.about.about14a")))])]),s("p",{staticClass:"title",staticStyle:{"padding-bottom":"1em"}},[t._v(t._s(t.$t("home.about.about14b")))]),s("p",{staticClass:"subtitle",staticStyle:{"text-align":"right",color:"red"}},[s("strong",[t._v(t._s(t.$t("home.about.about15")))])])]),s("article",{staticClass:"tile is-child notification is-warning"},[s("p",{staticClass:"title",staticStyle:{"padding-bottom":"1em"}},[t._v(t._s(t.$t("home.about.about16")))]),s("p",{staticClass:"subtitle",staticStyle:{"text-align":"right",color:"red","padding-bottom":"1em"}},[s("b",[t._v(t._s(t.$t("home.about.about17")))])])])]),s("div",{staticClass:"tile is-parent"},[s("article",{staticClass:"tile is-child notification is-info"},[s("p",{staticClass:"title"},[t._v(t._s(t.$t("home.about.about17a")))]),s("p",{staticClass:"subtitle"},[t._v(t._s(t.$t("home.about.about17b")))]),s("a",{attrs:{href:"https://openlittermap.com/world/The%20Netherlands/Zuid-Holland/Wassenaar/map"}},[t._v("https://openlittermap.com/world/The%20Netherlands/Zuid-Holland/Wassenaar/map")]),s("br"),s("br"),s("img",{attrs:{src:b}}),s("br"),s("br"),s("p",{staticClass:"subtitle"},[t._v(t._s(t.$t("home.about.about17c")))]),s("a",{attrs:{href:"https://openlittermap.com/world/The%20Netherlands/Zuid-Holland"}},[t._v("https://openlittermap.com/world/The%20Netherlands/Zuid-Holland")]),s("br")])])]),s("div",{staticClass:"tile is-parent"},[s("article",{staticClass:"tile is-child notification is-danger"},[s("p",{staticClass:"title"},[t._v(t._s(t.$t("home.about.about18")))]),s("p",{staticClass:"subtitle"},[t._v(t._s(t.$t("home.about.about19"))),s("strong",[t._v(t._s(t.$t("home.about.about20")))]),t._v(" "+t._s(t.$t("home.about.about21")))]),s("div",{staticClass:"content"})])])]),s("div",{staticClass:"tile is-parent is-5"},[s("article",{staticClass:"tile is-child is-10 notification is-success"},[s("div",{staticClass:"content"},[s("p",{staticClass:"title"},[t._v(t._s(t.$t("home.about.about22")))]),s("div",{staticClass:"content"},[s("ul",[s("li",[t._v(t._s(t.$t("home.about.about24")))]),s("li",[t._v(t._s(t.$t("home.about.about25")))]),s("li",[t._v(t._s(t.$t("home.about.about26")))]),s("li",[t._v(t._s(t.$t("home.about.about27")))]),s("li",[t._v(t._s(t.$t("home.about.about28")))]),s("li",[t._v(t._s(t.$t("home.about.about29")))]),s("li",[t._v(t._s(t.$t("home.about.about29a")))])])])])])])])])]),s("div",[s("br"),s("h1",{staticClass:"title is-1",staticStyle:{color:"black","text-align":"center"}},[s("strong",[t._v(t._s(t.$t("home.about.about30")))]),t._v(" "),s("strong",{staticStyle:{color:"red"}},[t._v(t._s(t.$t("home.about.about301")))])]),s("br")]),s("div",{staticClass:"container",staticStyle:{"padding-bottom":"5em","text-align":"center"}},[s("img",{attrs:{src:u}}),s("p",{staticStyle:{"padding-bottom":"3em"}},[t._v("Dublin, Ireland.")]),s("h1",{staticClass:"title is-1",staticStyle:{color:"black","text-align":"center"}},[s("strong",{staticStyle:{color:"red"}},[t._v(t._s(t.$t("home.about.about302")))])]),s("img",{attrs:{src:d}}),s("p",[t._v("Microplastics in Oranmore, Co. Galway.")])]),s("div",{staticClass:"container"},[s("h1",{staticClass:"title is-1"},[t._v(" "+t._s(t.$t("home.about.about31"))+" ")]),s("br"),s("br")]),s("img",{staticStyle:{"padding-bottom":"1em"},attrs:{src:m}}),s("p",{staticStyle:{"padding-bottom":"5em","text-align":"center"}},[t._v("Penrose Wharf, Cork City, Ireland (above)")]),s("div",{staticStyle:{"text-align":"center"}},[s("img",{staticStyle:{"padding-bottom":"2em"},attrs:{src:h}}),t._m(3),s("img",{staticStyle:{"padding-bottom":"2em"},attrs:{src:o}}),s("p",{staticStyle:{"padding-bottom":"5em"}},[t._v(t._s(t.$t("home.about.about32")))])]),s("div",{staticClass:"container"},[s("h1",{staticClass:"title is-1 has-text-left"},[t._v(" "+t._s(t.$t("home.about.about33"))+" ")])]),s("br"),s("br"),s("div",{staticClass:"container"},[s("h1",{staticClass:"title is-1 has-text-left"},[t._v(" "+t._s(t.$t("home.about.about34"))+" ")]),s("br"),s("div",{staticClass:"has-text-centered",staticStyle:{"padding-top":"2em"}},[s("form",{attrs:{action:"/signup"}},[s("button",{staticClass:"button is-large is-primary hov"},[t._v(t._s(t.$t("home.about.about35")))])])]),s("br"),s("br")]),t._m(4)])},$=[function(){var a=this,t=a._self._c;return t("div",{staticClass:"column is-one-third is-offset-1",staticStyle:{"text-align":"center"}},[t("img",{attrs:{src:p}})])},function(){var a=this,t=a._self._c;return t("div",{staticClass:"column is-offset-1 butts-img"},[t("img",{staticStyle:{height:"600px"},attrs:{src:v}})])},function(){var a=this,t=a._self._c;return t("div",{staticClass:"column is-one-third is-offset-1",staticStyle:{"padding-top":"4em","padding-bottom":"4em",margin:"auto"}},[t("img",{attrs:{src:g}})])},function(){var a=this,t=a._self._c;return t("p",{staticStyle:{"padding-bottom":"5em","text-align":"center"}},[a._v("Accra, Capital of Ghana, North-Western Coast of Africa "),t("a",{attrs:{href:"https://www.facebook.com/nshorena/posts/1652239435009949"}},[a._v("more photos on facebook")])])},function(){var a=this,t=a._self._c;return t("footer",{staticClass:"footer"},[t("div",{staticClass:"container"},[t("div",{staticClass:"content has-text-centered"},[t("p",[t("strong",[a._v("OpenLitterMap")]),a._v(" by "),t("a",{attrs:{href:"https://ie.linkedin.com/in/seanlynchgis"}},[a._v("Seán Lynch, M.Sc, M.Sc., B.A.")]),t("br")]),t("p",[a._v("info@openlittermap.com")])])])])}],y=c(C,f,$,!1,null,"ced4cfc5");const w=y.exports;export{w as default}; +import{_ as i,a as e}from"./android-BlaF6v8Z.js";import{_ as o}from"./IMG_0556-0A1kBpHu.js";import{n as c}from"./app-BwSojYvl.js";/* empty css */const l="/build/assets/iphone-BXDqbS6h.png",r="/build/assets/facemask-tag-DTb-EcZv.png",n="/build/assets/facemask-map-BqUpLVXB.png",_="/build/assets/cigbutts-CVuuOzE4.jpg",b="/build/assets/nlbrands-DL1esRqV.png",u="/build/assets/marinelitter-CVAxhBMz.jpg",d="/build/assets/microplastics_oranmore-CI7v0KxT.jpg",m="/build/assets/urban-D96wAs5R.jpg",h="/build/assets/IMG_0554-BicQT55Q.jpg",p="/build/assets/butts-DfH5MkNF.jpg",v="/build/assets/cigbutts_jar-BL7Z4hk3.jpg",g="/build/assets/plastic_bottles-DUxEtUtl.jpg",C={name:"About",methods:{android(){window.open("https://play.google.com/store/apps/details?id=com.geotech.openlittermap","_blank")},ios(){window.open("https://apps.apple.com/us/app/openlittermap/id1475982147","_blank")}}};var f=function(){var t=this,s=t._self._c;return s("div",[s("section",{staticClass:"section"},[s("div",{staticClass:"columns"},[t._m(0),s("div",{staticClass:"column cig-2"},[s("h2",{staticClass:"title is-2",staticStyle:{color:"red","text-align":"center"},attrs:{id:"butts1txt"}},[s("strong",[t._v(t._s(t.$t("home.about.about2")))])])])]),s("br"),s("br"),s("div",{staticClass:"columns"},[s("div",{staticClass:"column is-one-third is-offset-1"},[s("h1",{staticClass:"title is-1",staticStyle:{"text-align":"center"}},[s("strong",[t._v(t._s(t.$t("home.about.about3")))])]),s("br"),s("h1",{staticClass:"subtitle is-3"},[t._v(t._s(t.$t("home.about.about4")))]),s("br"),s("h1",{staticClass:"subtitle is-3"},[t._v(t._s(t.$t("home.about.about5")))]),s("br"),s("p",{staticClass:"subtitle is-3"},[t._v(t._s(t.$t("home.about.about6")))])]),t._m(1)])]),s("section",{staticClass:"hero is-success"},[s("div",{staticClass:"hero-body"},[s("div",{staticClass:"container has-text-centered"},[s("h1",{staticClass:"title"},[s("strong",[t._v(" "+t._s(t.$t("home.about.about7"))+" ")])])]),s("div",{staticClass:"has-text-centered",staticStyle:{"padding-top":"2em"}},[s("router-link",{attrs:{to:"/signup"}},[s("button",{staticClass:"button is-large is-info hov"},[t._v(t._s(t.$t("home.about.about9")))])])],1)])]),s("div",{staticClass:"has-text-centered pt3"},[s("h1",{staticClass:"title is-1"},[t._v("1. "+t._s(t.$t("home.about.about9a")))]),s("img",{attrs:{src:l}})]),s("div",{staticClass:"has-text-centered pt3"},[s("h1",{staticClass:"title is-1"},[t._v("2. "+t._s(t.$t("home.about.about9b")))]),s("img",{attrs:{src:r}})]),s("div",{staticClass:"has-text-centered pt3"},[s("h1",{staticClass:"title is-1"},[t._v("3. "+t._s(t.$t("home.about.about9c")))]),s("img",{attrs:{src:n}})]),s("div",{staticClass:"flex jc pt3"},[s("img",{staticClass:"app-icon",staticStyle:{"margin-right":"1em"},attrs:{src:i},on:{click:t.ios}}),s("img",{staticClass:"app-icon",attrs:{src:e},on:{click:t.android}})]),s("section",[s("div",{staticClass:"columns",staticStyle:{"padding-top":"4em","padding-bottom":"4em"}},[s("div",{staticClass:"column is-one-third is-offset-1",staticStyle:{"padding-left":"2em",margin:"auto"}},[s("h1",{staticClass:"title is-2",staticStyle:{"text-align":"center"}},[s("strong",{staticStyle:{color:"red"}},[t._v(t._s(t.$t("home.about.about10")))])]),s("br"),s("h1",{staticClass:"title is-2",staticStyle:{"text-align":"center"}},[s("strong",{staticStyle:{color:"red"}},[t._v(t._s(t.$t("home.about.about11")))])])]),t._m(2)])]),s("section",{staticClass:"hero is-warning"},[s("div",{staticClass:"hero-body"},[s("div",{staticClass:"container"},[s("h1",{staticClass:"title is-1"},[t._v(" "+t._s(t.$t("home.about.about12"))+" ")]),s("img",{attrs:{src:_}}),s("h1",{staticClass:"title is-1 has-text-right"},[t._v(" "+t._s(t.$t("home.about.about13"))+" ")])])])]),s("div",{staticClass:"hero-body"},[s("div",{staticClass:"container"},[s("div",{staticClass:"tile is-ancestor"},[s("div",{staticClass:"tile is-vertical is-8"},[s("div",{staticClass:"tile"},[s("div",{staticClass:"tile is-parent is-vertical"},[s("article",{staticClass:"tile is-child notification is-primary"},[s("p",{staticClass:"title"},[t._v(t._s(t.$t("home.about.about14"))+" "),s("b",{staticStyle:{color:"black"}},[t._v(t._s(t.$t("home.about.about14a")))])]),s("p",{staticClass:"title",staticStyle:{"padding-bottom":"1em"}},[t._v(t._s(t.$t("home.about.about14b")))]),s("p",{staticClass:"subtitle",staticStyle:{"text-align":"right",color:"red"}},[s("strong",[t._v(t._s(t.$t("home.about.about15")))])])]),s("article",{staticClass:"tile is-child notification is-warning"},[s("p",{staticClass:"title",staticStyle:{"padding-bottom":"1em"}},[t._v(t._s(t.$t("home.about.about16")))]),s("p",{staticClass:"subtitle",staticStyle:{"text-align":"right",color:"red","padding-bottom":"1em"}},[s("b",[t._v(t._s(t.$t("home.about.about17")))])])])]),s("div",{staticClass:"tile is-parent"},[s("article",{staticClass:"tile is-child notification is-info"},[s("p",{staticClass:"title"},[t._v(t._s(t.$t("home.about.about17a")))]),s("p",{staticClass:"subtitle"},[t._v(t._s(t.$t("home.about.about17b")))]),s("a",{attrs:{href:"https://openlittermap.com/world/The%20Netherlands/Zuid-Holland/Wassenaar/map"}},[t._v("https://openlittermap.com/world/The%20Netherlands/Zuid-Holland/Wassenaar/map")]),s("br"),s("br"),s("img",{attrs:{src:b}}),s("br"),s("br"),s("p",{staticClass:"subtitle"},[t._v(t._s(t.$t("home.about.about17c")))]),s("a",{attrs:{href:"https://openlittermap.com/world/The%20Netherlands/Zuid-Holland"}},[t._v("https://openlittermap.com/world/The%20Netherlands/Zuid-Holland")]),s("br")])])]),s("div",{staticClass:"tile is-parent"},[s("article",{staticClass:"tile is-child notification is-danger"},[s("p",{staticClass:"title"},[t._v(t._s(t.$t("home.about.about18")))]),s("p",{staticClass:"subtitle"},[t._v(t._s(t.$t("home.about.about19"))),s("strong",[t._v(t._s(t.$t("home.about.about20")))]),t._v(" "+t._s(t.$t("home.about.about21")))]),s("div",{staticClass:"content"})])])]),s("div",{staticClass:"tile is-parent is-5"},[s("article",{staticClass:"tile is-child is-10 notification is-success"},[s("div",{staticClass:"content"},[s("p",{staticClass:"title"},[t._v(t._s(t.$t("home.about.about22")))]),s("div",{staticClass:"content"},[s("ul",[s("li",[t._v(t._s(t.$t("home.about.about24")))]),s("li",[t._v(t._s(t.$t("home.about.about25")))]),s("li",[t._v(t._s(t.$t("home.about.about26")))]),s("li",[t._v(t._s(t.$t("home.about.about27")))]),s("li",[t._v(t._s(t.$t("home.about.about28")))]),s("li",[t._v(t._s(t.$t("home.about.about29")))]),s("li",[t._v(t._s(t.$t("home.about.about29a")))])])])])])])])])]),s("div",[s("br"),s("h1",{staticClass:"title is-1",staticStyle:{color:"black","text-align":"center"}},[s("strong",[t._v(t._s(t.$t("home.about.about30")))]),t._v(" "),s("strong",{staticStyle:{color:"red"}},[t._v(t._s(t.$t("home.about.about301")))])]),s("br")]),s("div",{staticClass:"container",staticStyle:{"padding-bottom":"5em","text-align":"center"}},[s("img",{attrs:{src:u}}),s("p",{staticStyle:{"padding-bottom":"3em"}},[t._v("Dublin, Ireland.")]),s("h1",{staticClass:"title is-1",staticStyle:{color:"black","text-align":"center"}},[s("strong",{staticStyle:{color:"red"}},[t._v(t._s(t.$t("home.about.about302")))])]),s("img",{attrs:{src:d}}),s("p",[t._v("Microplastics in Oranmore, Co. Galway.")])]),s("div",{staticClass:"container"},[s("h1",{staticClass:"title is-1"},[t._v(" "+t._s(t.$t("home.about.about31"))+" ")]),s("br"),s("br")]),s("img",{staticStyle:{"padding-bottom":"1em"},attrs:{src:m}}),s("p",{staticStyle:{"padding-bottom":"5em","text-align":"center"}},[t._v("Penrose Wharf, Cork City, Ireland (above)")]),s("div",{staticStyle:{"text-align":"center"}},[s("img",{staticStyle:{"padding-bottom":"2em"},attrs:{src:h}}),t._m(3),s("img",{staticStyle:{"padding-bottom":"2em"},attrs:{src:o}}),s("p",{staticStyle:{"padding-bottom":"5em"}},[t._v(t._s(t.$t("home.about.about32")))])]),s("div",{staticClass:"container"},[s("h1",{staticClass:"title is-1 has-text-left"},[t._v(" "+t._s(t.$t("home.about.about33"))+" ")])]),s("br"),s("br"),s("div",{staticClass:"container"},[s("h1",{staticClass:"title is-1 has-text-left"},[t._v(" "+t._s(t.$t("home.about.about34"))+" ")]),s("br"),s("div",{staticClass:"has-text-centered",staticStyle:{"padding-top":"2em"}},[s("form",{attrs:{action:"/signup"}},[s("button",{staticClass:"button is-large is-primary hov"},[t._v(t._s(t.$t("home.about.about35")))])])]),s("br"),s("br")]),t._m(4)])},$=[function(){var a=this,t=a._self._c;return t("div",{staticClass:"column is-one-third is-offset-1",staticStyle:{"text-align":"center"}},[t("img",{attrs:{src:p}})])},function(){var a=this,t=a._self._c;return t("div",{staticClass:"column is-offset-1 butts-img"},[t("img",{staticStyle:{height:"600px"},attrs:{src:v}})])},function(){var a=this,t=a._self._c;return t("div",{staticClass:"column is-one-third is-offset-1",staticStyle:{"padding-top":"4em","padding-bottom":"4em",margin:"auto"}},[t("img",{attrs:{src:g}})])},function(){var a=this,t=a._self._c;return t("p",{staticStyle:{"padding-bottom":"5em","text-align":"center"}},[a._v("Accra, Capital of Ghana, North-Western Coast of Africa "),t("a",{attrs:{href:"https://www.facebook.com/nshorena/posts/1652239435009949"}},[a._v("more photos on facebook")])])},function(){var a=this,t=a._self._c;return t("footer",{staticClass:"footer"},[t("div",{staticClass:"container"},[t("div",{staticClass:"content has-text-centered"},[t("p",[t("strong",[a._v("OpenLitterMap")]),a._v(" by "),t("a",{attrs:{href:"https://ie.linkedin.com/in/seanlynchgis"}},[a._v("Seán Lynch, M.Sc, M.Sc., B.A.")]),t("br")]),t("p",[a._v("info@openlittermap.com")])])])])}],y=c(C,f,$,!1,null,"ced4cfc5");const w=y.exports;export{w as default}; diff --git a/public/build/assets/Account-vqCFUWRL.js b/public/build/assets/Account-BQJ9B9OG.js similarity index 96% rename from public/build/assets/Account-vqCFUWRL.js rename to public/build/assets/Account-BQJ9B9OG.js index b848c48f..821a3902 100644 --- a/public/build/assets/Account-vqCFUWRL.js +++ b/public/build/assets/Account-BQJ9B9OG.js @@ -1 +1 @@ -import{n as a}from"./app-DuS6KM7M.js";/* empty css */const o={name:"Account",async created(){await this.$store.dispatch("GET_PLANS")},data(){return{btn:"button is-danger",processing:!1,password:""}},computed:{button(){return this.processing?this.btn+" is-loading":this.btn},errors(){return this.$store.state.user.errors},plans(){return this.$store.state.createaccount.plans}},methods:{clearError(r){this.errors[r]&&this.$store.commit("deleteUserError",r)},getFirstError(r){return this.errors[r][0]},errorExists(r){return this.errors.hasOwnProperty(r)},async submit(){this.processing=!0,await this.$store.dispatch("DELETE_ACCOUNT",this.password),this.processing=!1,this.password=""}}};var n=function(){var t=this,s=t._self._c;return s("div",{staticStyle:{"padding-left":"1em","padding-right":"1em"}},[s("h1",{staticClass:"title is-4"},[t._v(t._s(t.$t("settings.account.delete-account")))]),s("hr"),s("p",[t._v(t._s(t.$t("settings.account.delete-account")))]),s("br"),s("div",{staticClass:"columns"},[s("div",{staticClass:"column is-one-third is-offset-1"},[s("div",{staticClass:"row"},[s("form",{attrs:{method:"POST"},on:{submit:function(e){return e.preventDefault(),t.submit.apply(null,arguments)},keydown:function(e){return t.clearError(e.target.name)}}},[s("label",{attrs:{for:"password"}},[t._v(t._s(t.$t("settings.account.delete-account?")))]),t.errorExists("password")?s("span",{staticClass:"is-danger",domProps:{textContent:t._s(t.getFirstError("password"))}}):t._e(),s("div",{staticClass:"field"},[s("div",{staticClass:"control"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.password,expression:"password"}],staticClass:"input",attrs:{type:"password",name:"password",id:"password",placeholder:"******",required:""},domProps:{value:t.password},on:{input:function(e){e.target.composing||(t.password=e.target.value)}}})])]),s("button",{class:t.button},[t._v(t._s(t.$t("settings.account.enter-password")))])])])])])])},i=[],c=a(o,n,i,!1,null,null);const l=c.exports;export{l as default}; +import{n as a}from"./app-BwSojYvl.js";/* empty css */const o={name:"Account",async created(){await this.$store.dispatch("GET_PLANS")},data(){return{btn:"button is-danger",processing:!1,password:""}},computed:{button(){return this.processing?this.btn+" is-loading":this.btn},errors(){return this.$store.state.user.errors},plans(){return this.$store.state.createaccount.plans}},methods:{clearError(r){this.errors[r]&&this.$store.commit("deleteUserError",r)},getFirstError(r){return this.errors[r][0]},errorExists(r){return this.errors.hasOwnProperty(r)},async submit(){this.processing=!0,await this.$store.dispatch("DELETE_ACCOUNT",this.password),this.processing=!1,this.password=""}}};var n=function(){var t=this,s=t._self._c;return s("div",{staticStyle:{"padding-left":"1em","padding-right":"1em"}},[s("h1",{staticClass:"title is-4"},[t._v(t._s(t.$t("settings.account.delete-account")))]),s("hr"),s("p",[t._v(t._s(t.$t("settings.account.delete-account")))]),s("br"),s("div",{staticClass:"columns"},[s("div",{staticClass:"column is-one-third is-offset-1"},[s("div",{staticClass:"row"},[s("form",{attrs:{method:"POST"},on:{submit:function(e){return e.preventDefault(),t.submit.apply(null,arguments)},keydown:function(e){return t.clearError(e.target.name)}}},[s("label",{attrs:{for:"password"}},[t._v(t._s(t.$t("settings.account.delete-account?")))]),t.errorExists("password")?s("span",{staticClass:"is-danger",domProps:{textContent:t._s(t.getFirstError("password"))}}):t._e(),s("div",{staticClass:"field"},[s("div",{staticClass:"control"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.password,expression:"password"}],staticClass:"input",attrs:{type:"password",name:"password",id:"password",placeholder:"******",required:""},domProps:{value:t.password},on:{input:function(e){e.target.composing||(t.password=e.target.value)}}})])]),s("button",{class:t.button},[t._v(t._s(t.$t("settings.account.enter-password")))])])])])])])},i=[],c=a(o,n,i,!1,null,null);const l=c.exports;export{l as default}; diff --git a/public/build/assets/BaseCharts-C5LiKM-N.js b/public/build/assets/BaseCharts-CrCx08_V.js similarity index 99% rename from public/build/assets/BaseCharts-C5LiKM-N.js rename to public/build/assets/BaseCharts-CrCx08_V.js index 536ca2ee..7da4aee3 100644 --- a/public/build/assets/BaseCharts-C5LiKM-N.js +++ b/public/build/assets/BaseCharts-CrCx08_V.js @@ -1,4 +1,4 @@ -import{d as Zi,c as Ji,g as Qi}from"./app-DuS6KM7M.js";import{m as eo}from"./moment-zH0z38ay.js";var Xr={exports:{}};const to=Zi(eo);/*! +import{d as Zi,c as Ji,g as Qi}from"./app-BwSojYvl.js";import{m as eo}from"./moment-zH0z38ay.js";var Xr={exports:{}};const to=Zi(eo);/*! * Chart.js v2.9.4 * https://www.chartjs.org * (c) 2020 Chart.js Contributors diff --git a/public/build/assets/BoundingBox-DfbRgnL2.js b/public/build/assets/BoundingBox-CL6PBiVq.js similarity index 99% rename from public/build/assets/BoundingBox-DfbRgnL2.js rename to public/build/assets/BoundingBox-CL6PBiVq.js index 07fb3669..ad6ce1f7 100644 --- a/public/build/assets/BoundingBox-DfbRgnL2.js +++ b/public/build/assets/BoundingBox-CL6PBiVq.js @@ -1,4 +1,4 @@ -import{L as H}from"./vue-loading-hzYdSApK.js";/* empty css */import{n as I,g as j,T as P,A as W,C as V}from"./app-DuS6KM7M.js";/* empty css */const G={name:"BrandsBox",computed:{brands:{get(){return this.$store.state.bbox.brands},set(h){this.$store.commit("setBrandsBox",h)}},selectedBrandIndex(){return this.$store.state.bbox.selectedBrandIndex}},methods:{brandClass(h){return this.selectedBrandIndex===h?"is-brand-card selected":"is-brand-card"},isSelected(h){return this.selectedBrandIndex===h?" - selected":""},select(h){this.$store.commit("selectBrandBoxIndex",h)}}};var F=function(){var e=this,r=e._self._c;return r("div",{staticClass:"fit-content",on:{click:function(o){o.stopPropagation()}}},[r("p",{directives:[{name:"show",rawName:"v-show",value:e.brands.length>0,expression:"brands.length > 0"}]},[e._v("Select a brand to add to a box")]),r("p",{directives:[{name:"show",rawName:"v-show",value:e.selectedBrandIndex!==null,expression:"selectedBrandIndex !== null"}],staticClass:"mb1"},[e._v("When a box is selected, click a box to add the brand")]),e._l(e.brands,function(o,v){return r("div",{key:o+v,class:e.brandClass(v),on:{mousedown:function(f){return e.select(v)}}},[e._v(e._s(o)+" "+e._s(e.isSelected(v)))])})],2)},q=[],J=I(G,F,q,!1,null,"420638e6");const O=J.exports,K={name:"Boxes",components:{BrandsBox:O},computed:{boxes(){return this.$store.state.bbox.boxes},boxHidden(){return this.$store.state.bbox.boxes.find(h=>h.hidden)},manyBoxes(){return this.$store.state.bbox.boxes.length>1}},methods:{activateAndCheckBox(h){this.$store.commit("activateBox",h),this.$store.state.bbox.selectedBrandIndex!==null&&this.$store.commit("addSelectedBrandToBox",h)},boxClass(h){return h?"is-box is-active":"is-box"},duplicate(h){this.$store.commit("duplicateBox",h)},getCategories(h){let e=[];return Object.entries(h).map(r=>{Object.keys(r[1]).length>0&&e.push({category:r[0],tags:r[1]})}),e},getCategory(h){return this.$i18n.t("litter.categories."+h)},getTags(h,e){return this.$i18n.t("litter."+h+"."+e)+": 1"},hideInactive(){this.$store.commit("toggleHiddenBoxes")},removeTag(h,e){this.$store.commit("removeBboxTag",{category:h,tag_key:e})},rotate(h){this.$store.commit("rotateBox",h)},showAll(){this.$store.commit("showAllBoxes")},toggleLabel(h){this.$store.commit("toggleBoxLabel",h)}}};var Q=function(){var e=this,r=e._self._c;return r("div",{staticClass:"column is-one-third pl3 pt7"},[r("BrandsBox"),r("button",{directives:[{name:"show",rawName:"v-show",value:e.manyBoxes,expression:"manyBoxes"}],staticClass:"button is-small is-primary mb1",on:{click:function(o){return o.stopPropagation(),e.hideInactive.apply(null,arguments)}}},[e._v("Hide boxes")]),r("button",{directives:[{name:"show",rawName:"v-show",value:e.boxHidden,expression:"boxHidden"}],staticClass:"button is-small is-info mb1",on:{click:e.showAll}},[e._v("Show boxes")]),e._l(e.boxes,function(o,v){return r("div",{key:o.id,class:e.boxClass(o.active),on:{click:function(f){return f.stopPropagation(),e.activateAndCheckBox(o.id)}}},[r("p",{staticClass:"ma"},[e._v("Box: "),r("span",{staticClass:"is-bold"},[e._v(e._s(o.id))])]),r("button",{staticClass:"button is-small duplicate-box",attrs:{disabled:""},on:{click:function(f){return e.duplicate(o.id)}}},[e._v("Todo - Duplicate Box")]),r("button",{staticClass:"button is-small toggle-box",on:{click:function(f){return e.toggleLabel(o.id)}}},[e._v("Toggle Label")]),r("button",{staticClass:"button is-small is-dark rotate-box",on:{click:function(f){return e.rotate(o.id)}}},[e._v("Rotate")]),r("p",[e._v("Left: "+e._s(o.left))]),r("p",[e._v("Top: "+e._s(o.top))]),r("p",[e._v("Width: "+e._s(o.width))]),r("p",{staticClass:"mb1"},[e._v("Height: "+e._s(o.height))]),r("div",{staticClass:"container"},[r("div",{staticClass:"box-categories"},[r("span",{staticClass:"box-category"},[e._v(e._s(e.getCategory(o.category)))]),r("span",{staticClass:"tag is-medium is-info box-label",domProps:{innerHTML:e._s(e.getTags(o.category,o.tag))},on:{click:function(f){return e.removeTag(o.category,o.tag)}}}),o.brand?r("div",[r("p",{staticClass:"box-category"},[e._v("Brand")]),r("span",{staticClass:"tag is-medium is-info box-label w100",domProps:{innerHTML:e._s(e.getTags("brands",o.brand))},on:{click:function(f){return e.removeTag("brands",o.brand)}}})]):e._e()])])])})],2)},Z=[],tt=I(K,Q,Z,!1,null,"754c37be");const et=tt.exports;var Y={exports:{}};(function(h,e){(function(r,o){h.exports=o()})(window,function(){return function(r){function o(f){if(v[f])return v[f].exports;var b=v[f]={i:f,l:!1,exports:{}};return r[f].call(b.exports,b,b.exports,o),b.l=!0,b.exports}var v={};return o.m=r,o.c=v,o.d=function(f,b,_){o.o(f,b)||Object.defineProperty(f,b,{configurable:!1,enumerable:!0,get:_})},o.r=function(f){Object.defineProperty(f,"__esModule",{value:!0})},o.n=function(f){var b=f&&f.__esModule?function(){return f.default}:function(){return f};return o.d(b,"a",b),b},o.o=function(f,b){return Object.prototype.hasOwnProperty.call(f,b)},o.p="",o(o.s=25)}([function(r,o,v){var f=v(11);typeof f=="string"&&(f=[[r.i,f,""]]);var b={};b.transform=void 0,v(3)(f,b),f.locals&&(r.exports=f.locals)},function(r,o,v){function f(b,_,w,x,y,B,T,k){var $=typeof b=="function"?b.options:b;_&&($.render=_,$.staticRenderFns=w,$._compiled=!0),x&&($.functional=!0),B&&($._scopeId="data-v-"+B);var M;if(T?(M=function(S){S=S||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,S||typeof __VUE_SSR_CONTEXT__>"u"||(S=__VUE_SSR_CONTEXT__),y&&y.call(this,S),S&&S._registeredComponents&&S._registeredComponents.add(T)},$._ssrRegister=M):y&&(M=k?function(){y.call(this,this.$root.$options.shadowRoot)}:y),M)if($.functional){$._injectStyles=M;var D=$.render;$.render=function(S,A){return M.call(A),D(S,A)}}else{var z=$.beforeCreate;$.beforeCreate=z?[].concat(z,M):[M]}return{exports:b,options:$}}v.d(o,"a",function(){return f})},function(r,o,v){function f(t){return x(t)||w(t)||_(t)||b()}function b(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +import{L as H}from"./vue-loading-Ck0acTfr.js";/* empty css */import{n as I,g as j,T as P,A as W,C as V}from"./app-BwSojYvl.js";/* empty css */const G={name:"BrandsBox",computed:{brands:{get(){return this.$store.state.bbox.brands},set(h){this.$store.commit("setBrandsBox",h)}},selectedBrandIndex(){return this.$store.state.bbox.selectedBrandIndex}},methods:{brandClass(h){return this.selectedBrandIndex===h?"is-brand-card selected":"is-brand-card"},isSelected(h){return this.selectedBrandIndex===h?" - selected":""},select(h){this.$store.commit("selectBrandBoxIndex",h)}}};var F=function(){var e=this,r=e._self._c;return r("div",{staticClass:"fit-content",on:{click:function(o){o.stopPropagation()}}},[r("p",{directives:[{name:"show",rawName:"v-show",value:e.brands.length>0,expression:"brands.length > 0"}]},[e._v("Select a brand to add to a box")]),r("p",{directives:[{name:"show",rawName:"v-show",value:e.selectedBrandIndex!==null,expression:"selectedBrandIndex !== null"}],staticClass:"mb1"},[e._v("When a box is selected, click a box to add the brand")]),e._l(e.brands,function(o,v){return r("div",{key:o+v,class:e.brandClass(v),on:{mousedown:function(f){return e.select(v)}}},[e._v(e._s(o)+" "+e._s(e.isSelected(v)))])})],2)},q=[],J=I(G,F,q,!1,null,"420638e6");const O=J.exports,K={name:"Boxes",components:{BrandsBox:O},computed:{boxes(){return this.$store.state.bbox.boxes},boxHidden(){return this.$store.state.bbox.boxes.find(h=>h.hidden)},manyBoxes(){return this.$store.state.bbox.boxes.length>1}},methods:{activateAndCheckBox(h){this.$store.commit("activateBox",h),this.$store.state.bbox.selectedBrandIndex!==null&&this.$store.commit("addSelectedBrandToBox",h)},boxClass(h){return h?"is-box is-active":"is-box"},duplicate(h){this.$store.commit("duplicateBox",h)},getCategories(h){let e=[];return Object.entries(h).map(r=>{Object.keys(r[1]).length>0&&e.push({category:r[0],tags:r[1]})}),e},getCategory(h){return this.$i18n.t("litter.categories."+h)},getTags(h,e){return this.$i18n.t("litter."+h+"."+e)+": 1"},hideInactive(){this.$store.commit("toggleHiddenBoxes")},removeTag(h,e){this.$store.commit("removeBboxTag",{category:h,tag_key:e})},rotate(h){this.$store.commit("rotateBox",h)},showAll(){this.$store.commit("showAllBoxes")},toggleLabel(h){this.$store.commit("toggleBoxLabel",h)}}};var Q=function(){var e=this,r=e._self._c;return r("div",{staticClass:"column is-one-third pl3 pt7"},[r("BrandsBox"),r("button",{directives:[{name:"show",rawName:"v-show",value:e.manyBoxes,expression:"manyBoxes"}],staticClass:"button is-small is-primary mb1",on:{click:function(o){return o.stopPropagation(),e.hideInactive.apply(null,arguments)}}},[e._v("Hide boxes")]),r("button",{directives:[{name:"show",rawName:"v-show",value:e.boxHidden,expression:"boxHidden"}],staticClass:"button is-small is-info mb1",on:{click:e.showAll}},[e._v("Show boxes")]),e._l(e.boxes,function(o,v){return r("div",{key:o.id,class:e.boxClass(o.active),on:{click:function(f){return f.stopPropagation(),e.activateAndCheckBox(o.id)}}},[r("p",{staticClass:"ma"},[e._v("Box: "),r("span",{staticClass:"is-bold"},[e._v(e._s(o.id))])]),r("button",{staticClass:"button is-small duplicate-box",attrs:{disabled:""},on:{click:function(f){return e.duplicate(o.id)}}},[e._v("Todo - Duplicate Box")]),r("button",{staticClass:"button is-small toggle-box",on:{click:function(f){return e.toggleLabel(o.id)}}},[e._v("Toggle Label")]),r("button",{staticClass:"button is-small is-dark rotate-box",on:{click:function(f){return e.rotate(o.id)}}},[e._v("Rotate")]),r("p",[e._v("Left: "+e._s(o.left))]),r("p",[e._v("Top: "+e._s(o.top))]),r("p",[e._v("Width: "+e._s(o.width))]),r("p",{staticClass:"mb1"},[e._v("Height: "+e._s(o.height))]),r("div",{staticClass:"container"},[r("div",{staticClass:"box-categories"},[r("span",{staticClass:"box-category"},[e._v(e._s(e.getCategory(o.category)))]),r("span",{staticClass:"tag is-medium is-info box-label",domProps:{innerHTML:e._s(e.getTags(o.category,o.tag))},on:{click:function(f){return e.removeTag(o.category,o.tag)}}}),o.brand?r("div",[r("p",{staticClass:"box-category"},[e._v("Brand")]),r("span",{staticClass:"tag is-medium is-info box-label w100",domProps:{innerHTML:e._s(e.getTags("brands",o.brand))},on:{click:function(f){return e.removeTag("brands",o.brand)}}})]):e._e()])])])})],2)},Z=[],tt=I(K,Q,Z,!1,null,"754c37be");const et=tt.exports;var Y={exports:{}};(function(h,e){(function(r,o){h.exports=o()})(window,function(){return function(r){function o(f){if(v[f])return v[f].exports;var b=v[f]={i:f,l:!1,exports:{}};return r[f].call(b.exports,b,b.exports,o),b.l=!0,b.exports}var v={};return o.m=r,o.c=v,o.d=function(f,b,_){o.o(f,b)||Object.defineProperty(f,b,{configurable:!1,enumerable:!0,get:_})},o.r=function(f){Object.defineProperty(f,"__esModule",{value:!0})},o.n=function(f){var b=f&&f.__esModule?function(){return f.default}:function(){return f};return o.d(b,"a",b),b},o.o=function(f,b){return Object.prototype.hasOwnProperty.call(f,b)},o.p="",o(o.s=25)}([function(r,o,v){var f=v(11);typeof f=="string"&&(f=[[r.i,f,""]]);var b={};b.transform=void 0,v(3)(f,b),f.locals&&(r.exports=f.locals)},function(r,o,v){function f(b,_,w,x,y,B,T,k){var $=typeof b=="function"?b.options:b;_&&($.render=_,$.staticRenderFns=w,$._compiled=!0),x&&($.functional=!0),B&&($._scopeId="data-v-"+B);var M;if(T?(M=function(S){S=S||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,S||typeof __VUE_SSR_CONTEXT__>"u"||(S=__VUE_SSR_CONTEXT__),y&&y.call(this,S),S&&S._registeredComponents&&S._registeredComponents.add(T)},$._ssrRegister=M):y&&(M=k?function(){y.call(this,this.$root.$options.shadowRoot)}:y),M)if($.functional){$._injectStyles=M;var D=$.render;$.render=function(S,A){return M.call(A),D(S,A)}}else{var z=$.beforeCreate;$.beforeCreate=z?[].concat(z,M):[M]}return{exports:b,options:$}}v.d(o,"a",function(){return f})},function(r,o,v){function f(t){return x(t)||w(t)||_(t)||b()}function b(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _(t,s){if(t){if(typeof t=="string")return y(t,s);var a=Object.prototype.toString.call(t).slice(8,-1);return a==="Object"&&t.constructor&&(a=t.constructor.name),a==="Map"||a==="Set"?Array.from(t):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?y(t,s):void 0}}function w(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function x(t){if(Array.isArray(t))return y(t)}function y(t,s){(s==null||s>t.length)&&(s=t.length);for(var a=0,u=new Array(s);a=0}},gridY:{type:Number,default:50,validator:function(t){return t>=0}},parentW:{type:Number,default:0,validator:function(t){return t>=0}},parentH:{type:Number,default:0,validator:function(t){return t>=0}},w:{type:[String,Number],default:200,validator:function(t){return typeof t=="string"?t==="auto":t>=0}},h:{type:[String,Number],default:200,validator:function(t){return typeof t=="string"?t==="auto":t>=0}},minw:{type:Number,default:50,validator:function(t){return t>=0}},minh:{type:Number,default:50,validator:function(t){return t>=0}},x:{type:Number,default:0,validator:function(t){return typeof t=="number"}},y:{type:Number,default:0,validator:function(t){return typeof t=="number"}},z:{type:[String,Number],default:"auto",validator:function(t){return typeof t=="string"?t==="auto":t>=0}},dragHandle:{type:String,default:null},dragCancel:{type:String,default:null},sticks:{type:Array,default:function(){return["tl","tm","tr","mr","br","bm","bl","ml"]}},axis:{type:String,default:"both",validator:function(t){return["x","y","both","none"].indexOf(t)!==-1}},contentClass:{type:String,required:!1,default:""}},data:function(){return{fixAspectRatio:null,active:null,zIndex:null,parentWidth:null,parentHeight:null,left:null,top:null,right:null,bottom:null,minHeight:null}},beforeCreate:function(){this.stickDrag=!1,this.bodyDrag=!1,this.dimensionsBeforeMove={pointerX:0,pointerY:0,x:0,y:0,w:0,h:0},this.limits={left:{min:null,max:null},right:{min:null,max:null},top:{min:null,max:null},bottom:{min:null,max:null}},this.currentStick=null},mounted:function(){var t=this;this.parentElement=this.$el.parentNode,this.parentWidth=this.parentW?this.parentW:this.parentElement.clientWidth,this.parentHeight=this.parentH?this.parentH:this.parentElement.clientHeight,this.left=this.x,this.top=this.y,this.right=this.parentWidth-(this.w==="auto"?this.$refs.container.scrollWidth:this.w)-this.left,this.bottom=this.parentHeight-(this.h==="auto"?this.$refs.container.scrollHeight:this.h)-this.top,this.domEvents=new Map([["mousemove",this.move],["mouseup",this.up],["mouseleave",this.up],["mousedown",this.deselect],["touchmove",this.move],["touchend",this.up],["touchcancel",this.up],["touchstart",this.up]]),B(this.domEvents),this.dragHandle&&f(this.$el.querySelectorAll(this.dragHandle)).forEach(function(s){s.setAttribute("data-drag-handle",t._uid)}),this.dragCancel&&f(this.$el.querySelectorAll(this.dragCancel)).forEach(function(s){s.setAttribute("data-drag-cancel",t._uid)})},beforeDestroy:function(){T(this.domEvents)},methods:{deselect:function(){this.preventActiveBehavior||(this.active=!1)},move:function(t){if(this.stickDrag||this.bodyDrag){t.stopPropagation();var s=t.pageX!==void 0?t.pageX:t.touches[0].pageX,a=t.pageY!==void 0?t.pageY:t.touches[0].pageY,u=this.dimensionsBeforeMove,i={x:(u.pointerX-s)/this.parentScaleX,y:(u.pointerY-a)/this.parentScaleY};if(this.stickDrag&&this.stickMove(i),this.bodyDrag){if(this.axis==="x")i.y=0;else if(this.axis==="y")i.x=0;else if(this.axis==="none")return;this.bodyMove(i)}}},up:function(t){this.stickDrag?this.stickUp(t):this.bodyDrag&&this.bodyUp(t)},bodyDown:function(t){var s=t.target,a=t.button;if(this.preventActiveBehavior||(this.active=!0),(!a||a===0)&&(this.$emit("clicked",t),this.active&&!(this.dragHandle&&s.getAttribute("data-drag-handle")!==this._uid.toString()||this.dragCancel&&s.getAttribute("data-drag-cancel")===this._uid.toString()))){t.stopPropagation!==void 0&&t.stopPropagation(),t.preventDefault!==void 0&&t.preventDefault(),this.isDraggable&&(this.bodyDrag=!0);var u=t.pageX!==void 0?t.pageX:t.touches[0].pageX,i=t.pageY!==void 0?t.pageY:t.touches[0].pageY;this.saveDimensionsBeforeMove({pointerX:u,pointerY:i}),this.parentLimitation&&(this.limits=this.calcDragLimitation())}},bodyMove:function(t){var s=this.dimensionsBeforeMove,a=this.parentWidth,u=this.parentHeight,i=this.gridX,n=this.gridY,c=this.width,m=this.height,l=s.top-t.y,d=s.bottom+t.y,p=s.left-t.x,g=s.right+t.x;if(this.snapToGrid){var C=!0,L=!0,R=l-Math.floor(l/n)*n,E=u-d-Math.floor((u-d)/n)*n,X=p-Math.floor(p/i)*i,U=a-g-Math.floor((a-g)/i)*i;R>n/2&&(R-=n),E>n/2&&(E-=n),X>i/2&&(X-=i),U>i/2&&(U-=i),Math.abs(E)2&&arguments[2]!==void 0&&arguments[2];if(this.isResizable&&this.active||a){this.stickDrag=!0;var u=s.pageX!==void 0?s.pageX:s.touches[0].pageX,i=s.pageY!==void 0?s.pageY:s.touches[0].pageY;this.saveDimensionsBeforeMove({pointerX:u,pointerY:i}),this.currentStick=t,this.limits=this.calcResizeLimits()}},saveDimensionsBeforeMove:function(t){var s=t.pointerX,a=t.pointerY;this.dimensionsBeforeMove.pointerX=s,this.dimensionsBeforeMove.pointerY=a,this.dimensionsBeforeMove.left=this.left,this.dimensionsBeforeMove.right=this.right,this.dimensionsBeforeMove.top=this.top,this.dimensionsBeforeMove.bottom=this.bottom,this.dimensionsBeforeMove.width=this.width,this.dimensionsBeforeMove.height=this.height,this.aspectFactor=this.width/this.height},stickMove:function(t){var s=this.currentStick,a=this.dimensionsBeforeMove,u=this.gridY,i=this.gridX,n=this.snapToGrid,c=this.parentHeight,m=this.parentWidth,l=a.top,d=a.bottom,p=a.left,g=a.right;switch(s[0]){case"b":d=a.bottom+t.y,n&&(d=c-Math.round((c-d)/u)*u);break;case"t":l=a.top-t.y,n&&(l=Math.round(l/u)*u)}switch(s[1]){case"r":g=a.right+t.x,n&&(g=m-Math.round((m-g)/i)*i);break;case"l":p=a.left-t.x,n&&(p=Math.round(p/i)*i)}var C=this.rectCorrectionByLimit({newLeft:p,newRight:g,newTop:l,newBottom:d});if(p=C.newLeft,g=C.newRight,l=C.newTop,d=C.newBottom,this.aspectRatio){var L=this.rectCorrectionByAspectRatio({newLeft:p,newRight:g,newTop:l,newBottom:d});p=L.newLeft,g=L.newRight,l=L.newTop,d=L.newBottom}this.left=p,this.right=g,this.top=l,this.bottom=d,this.$emit("resizing",this.rect)},stickUp:function(){this.stickDrag=!1,this.dimensionsBeforeMove={pointerX:0,pointerY:0,x:0,y:0,w:0,h:0},this.limits={left:{min:null,max:null},right:{min:null,max:null},top:{min:null,max:null},bottom:{min:null,max:null}},this.$emit("resizing",this.rect),this.$emit("resizestop",this.rect)},calcDragLimitation:function(){var t=this.parentWidth,s=this.parentHeight;return{left:{min:0,max:t-this.width},right:{min:0,max:t-this.width},top:{min:0,max:s-this.height},bottom:{min:0,max:s-this.height}}},calcResizeLimits:function(){var t=this.aspectFactor,s=this.width,a=this.height,u=this.bottom,i=this.top,n=this.left,c=this.right,m=this.minh,l=this.minw,d=this.parentLimitation?0:null;this.aspectRatio&&(l/m>t?m=l/t:l=t*m);var p={left:{min:d,max:n+(s-l)},right:{min:d,max:c+(s-l)},top:{min:d,max:i+(a-m)},bottom:{min:d,max:u+(a-m)}};if(this.aspectRatio){var g={left:{min:n-Math.min(i,u)*t*2,max:n+(a-m)/2*t*2},right:{min:c-Math.min(i,u)*t*2,max:c+(a-m)/2*t*2},top:{min:i-Math.min(n,c)/t*2,max:i+(s-l)/2/t*2},bottom:{min:u-Math.min(n,c)/t*2,max:u+(s-l)/2/t*2}};this.currentStick[0]==="m"?(p.left={min:Math.max(p.left.min,g.left.min),max:Math.min(p.left.max,g.left.max)},p.right={min:Math.max(p.right.min,g.right.min),max:Math.min(p.right.max,g.right.max)}):this.currentStick[1]==="m"&&(p.top={min:Math.max(p.top.min,g.top.min),max:Math.min(p.top.max,g.top.max)},p.bottom={min:Math.max(p.bottom.min,g.bottom.min),max:Math.min(p.bottom.max,g.bottom.max)})}return p},sideCorrectionByLimit:function(t,s){var a=s;return t.min!==null&&sl?(p=l*g,m[1]==="l"?s=n-a-p:a=n-s-p):(g=p/l,m[0]==="t"?u=c-i-g:i=c-u-g);return{newLeft:s,newRight:a,newTop:u,newBottom:i}}},computed:{positionStyle:function(){return{top:this.top+"px",left:this.left+"px",zIndex:this.zIndex}},sizeStyle:function(){return{width:this.w=="auto"?"auto":this.width+"px",height:this.h=="auto"?"auto":this.height+"px"}},vdrStick:function(){var t=this;return function(s){var a={width:"".concat(t.stickSize/t.parentScaleX,"px"),height:"".concat(t.stickSize/t.parentScaleY,"px")};return a[M.y[s[0]]]="".concat(t.stickSize/t.parentScaleX/-2,"px"),a[M.x[s[1]]]="".concat(t.stickSize/t.parentScaleX/-2,"px"),a}},width:function(){return this.parentWidth-this.left-this.right},height:function(){return this.parentHeight-this.top-this.bottom},rect:function(){return{left:Math.round(this.left),top:Math.round(this.top),width:Math.round(this.width),height:Math.round(this.height)}}},watch:{active:function(t){t?this.$emit("activated"):this.$emit("deactivated")},isActive:{immediate:!0,handler:function(t){this.active=t}},z:{immediate:!0,handler:function(t){(t>=0||t==="auto")&&(this.zIndex=t)}},x:{handler:function(t,s){var a=this;if(!this.stickDrag&&!this.bodyDrag&&t!==this.left){var u=s-t;this.bodyDown({pageX:this.left,pageY:this.top}),this.bodyMove({x:u,y:0}),this.$nextTick(function(){a.bodyUp()})}}},y:{handler:function(t,s){var a=this;if(!this.stickDrag&&!this.bodyDrag&&t!==this.top){var u=s-t;this.bodyDown({pageX:this.left,pageY:this.top}),this.bodyMove({x:0,y:u}),this.$nextTick(function(){a.bodyUp()})}}},w:{handler:function(t,s){var a=this;if(!this.stickDrag&&!this.bodyDrag&&t!==this.width){var u=s-t;this.stickDown("mr",{pageX:this.right,pageY:this.top+this.height/2},!0),this.stickMove({x:u,y:0}),this.$nextTick(function(){a.stickUp()})}}},h:{handler:function(t,s){var a=this;if(!this.stickDrag&&!this.bodyDrag&&t!==this.height){var u=s-t;this.stickDown("bm",{pageX:this.left+this.width/2,pageY:this.bottom},!0),this.stickMove({x:0,y:u}),this.$nextTick(function(){a.stickUp()})}}},parentW:function(t){this.right=t-this.width-this.left,this.parentWidth=t},parentH:function(t){this.bottom=t-this.height-this.top,this.parentHeight=t}}},z=D,S=(v(12),v(1)),A=Object(S.a)(z,k,$,!1,null,null,null);A.options.__file="src/components/vue-drag-resize.vue",o.a=A.exports},function(r,o,v){function f(i,n){for(var c=0;c=0&&s.splice(n,1)}function x(i){var n=document.createElement("style");return i.attrs.type="text/css",B(n,i.attrs),_(i,n),n}function y(i){var n=document.createElement("link");return i.attrs.type="text/css",i.attrs.rel="stylesheet",B(n,i.attrs),_(i,n),n}function B(i,n){Object.keys(n).forEach(function(c){i.setAttribute(c,n[c])})}function T(i,n){var c,m,l,d;if(n.transform&&i.css){if(!(d=n.transform(i.css)))return function(){};i.css=d}if(n.singleton){var p=t++;c=A||(A=x(n)),m=k.bind(null,c,p,!1),l=k.bind(null,c,p,!0)}else i.sourceMap&&typeof URL=="function"&&typeof URL.createObjectURL=="function"&&typeof URL.revokeObjectURL=="function"&&typeof Blob=="function"&&typeof btoa=="function"?(c=y(n),m=M.bind(null,c,n),l=function(){w(c),c.href&&URL.revokeObjectURL(c.href)}):(c=x(n),m=$.bind(null,c),l=function(){w(c)});return m(i),function(g){if(g){if(g.css===i.css&&g.media===i.media&&g.sourceMap===i.sourceMap)return;m(i=g)}else l()}}function k(i,n,c,m){var l=c?"":m.css;if(i.styleSheet)i.styleSheet.cssText=u(n,l);else{var d=document.createTextNode(l),p=i.childNodes;p[n]&&i.removeChild(p[n]),p.length?i.insertBefore(d,p[n]):i.appendChild(d)}}function $(i,n){var c=n.css,m=n.media;if(m&&i.setAttribute("media",m),i.styleSheet)i.styleSheet.cssText=c;else{for(;i.firstChild;)i.removeChild(i.firstChild);i.appendChild(document.createTextNode(c))}}function M(i,n,c){var m=c.css,l=c.sourceMap,d=n.convertToAbsoluteUrls===void 0&&l;(n.convertToAbsoluteUrls||d)&&(m=a(m)),l&&(m+=` /*# sourceMappingURL=data:application/json;base64,`+btoa(unescape(encodeURIComponent(JSON.stringify(l))))+" */");var p=new Blob([m],{type:"text/css"}),g=i.href;i.href=URL.createObjectURL(p),g&&URL.revokeObjectURL(g)}var D={},z=function(i){var n;return function(){return n===void 0&&(n=i.apply(this,arguments)),n}}(function(){return window&&document&&document.all&&!window.atob}),S=function(i){var n={};return function(c){return n[c]===void 0&&(n[c]=i.call(this,c)),n[c]}}(function(i){return document.querySelector(i)}),A=null,t=0,s=[],a=v(10);r.exports=function(i,n){if(typeof DEBUG<"u"&&DEBUG&&typeof document!="object")throw new Error("The style-loader cannot be used in a non-browser environment");n=n||{},n.attrs=typeof n.attrs=="object"?n.attrs:{},n.singleton||(n.singleton=z()),n.insertInto||(n.insertInto="head"),n.insertAt||(n.insertAt="bottom");var c=b(i,n);return f(c,n),function(m){for(var l=[],d=0;d{await this.getPhotos(),this.processing=!1},500)},toggleAll(){this.$store.commit("selectAllPhotos",this.selectAll)},toggleCalendar(){this.showCalendar=!this.showCalendar}}};var m=function(){var t=this,s=t._self._c;return s("div",{staticClass:"flex mb1 filter-my-photos"},[s("router-link",{attrs:{to:"/tag"}},[s("button",{staticClass:"button is-primary"},[t._v("Tag individually")])]),s("div",{staticClass:"field mb0 pt0"},[s("div",{staticClass:"control has-icons-left"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.filter_by_id,expression:"filter_by_id"}],staticClass:"input w10",attrs:{placeholder:t.$t("common.search-by-id")},domProps:{value:t.filter_by_id},on:{input:[function(o){o.target.composing||(t.filter_by_id=o.target.value)},t.search]}}),s("span",{staticClass:"icon is-small is-left z-index-0"},[s("i",{class:t.spinner})])])]),s("button",{staticClass:"button is-primary select-all-photos",on:{click:t.toggleAll}},[t._v(" "+t._s(t.getSelectAllText)+" ")]),s("div",{class:t.calendar},[s("div",{staticClass:"dropdown-trigger"},[s("button",{staticClass:"button dropdownButtonLeft",on:{click:t.toggleCalendar}},[s("span",[t._v(t._s(t.showCalendarDates))])])]),s("div",{staticClass:"dropdown-menu"},[s("div",{staticClass:"dropdown-content calendar-box"},[s("FunctionalCalendar",{ref:"calendar",attrs:{"day-names":t.$t("common.day-names"),"month-names":t.$t("common.month-names"),"short-month-names":t.$t("common.short-month-names"),"change-month-function":!0,"change-year-function":!0,"is-date-range":!0,"date-format":"yyyy/mm/dd"},on:{selectedDaysCount:t.toggleCalendar},model:{value:t.filter_by_calendar,callback:function(o){t.filter_by_calendar=o},expression:"filter_by_calendar"}})],1)])]),s("div",[s("select",{directives:[{name:"model",rawName:"v-model",value:t.period,expression:"period"}],staticClass:"input",on:{change:[function(o){var a=Array.prototype.filter.call(o.target.options,function(i){return i.selected}).map(function(i){var r="_value"in i?i._value:i.value;return r});t.period=o.target.multiple?a:a[0]},t.getPhotos]}},t._l(t.periods,function(o){return s("option",{domProps:{value:o}},[t._v(t._s(t.getPeriod(o)))])}),0)])],1)},u=[],p=n(h,m,u,!1,null,"a15747e1");const g=p.exports,_={name:"PhotoDetailsPopup",computed:{photo(){const e=this.$store.state.photos.showDetailsPhotoId;return this.$store.state.photos.bulkPaginate.data.find(t=>t.id===e)}},methods:{getCategoryName(e){return this.$i18n.t(`litter.categories.${e}`)},getTagName(e,t){return this.$i18n.t(`litter.${e}.${t}`)},removeTag(e,t){this.$store.commit("removeTagFromPhoto",{photoId:this.photo.id,category:e,tag:t})},clearCustomTag(e){this.$store.commit("removeCustomTagFromPhoto",{photoId:this.photo.id,customTag:e})},togglePickedUp(){this.$store.commit("setPhotoPickedUp",{photoId:this.photo.id,picked_up:!this.photo.picked_up})}}};var f=function(){var t=this,s=t._self._c;return t.photo?s("div",[s("div",[s("div",{staticClass:"top-row"},[s("div",{staticClass:"switch-container"},[s("p",{staticClass:"mr-2"},[s("strong",[t._v(t._s(t.$t("tags.picked-up-title")))])]),s("label",{staticClass:"switch"},[s("input",{attrs:{type:"checkbox"},domProps:{checked:t.photo.picked_up},on:{change:t.togglePickedUp}}),s("span",{staticClass:"slider round"})])])]),s("div",{staticClass:"close-popup",on:{click:function(o){return t.$emit("close")}}},[s("i",{staticClass:"fa fa-times"})])]),t.photo.custom_tags&&t.photo.custom_tags.length||Object.keys(t.photo.tags).length?s("div",{staticClass:"photo-tags-container"},[t.photo.custom_tags&&t.photo.custom_tags.length?s("div",[s("p",{staticClass:"has-text-centered"},[t._v(t._s(t.$t("tags.custom-tags")))]),s("transition-group",{staticClass:"tags-list",attrs:{name:"list",tag:"div"}},t._l(t.photo.custom_tags,function(o){return s("div",{key:o,staticClass:"litter-tag"},[s("span",{staticClass:"close",on:{click:function(a){return a.preventDefault(),a.stopPropagation(),t.clearCustomTag(o)}}},[s("i",{staticClass:"fa fa-times"})]),s("p",{staticClass:"has-text-white"},[t._v(t._s(o))])])}),0)],1):t._e(),s("transition-group",{attrs:{name:"categories",tag:"div"}},t._l(Object.keys(t.photo.tags||{}),function(o){return s("div",{key:o},[s("p",{staticClass:"has-text-centered"},[t._v(t._s(t.getCategoryName(o)))]),s("transition-group",{staticClass:"tags-list",attrs:{name:"list",tag:"div"}},t._l(Object.keys(t.photo.tags[o]),function(a){return s("div",{key:a,staticClass:"litter-tag"},[s("span",{staticClass:"close",on:{click:function(i){return i.preventDefault(),i.stopPropagation(),t.removeTag(o,a)}}},[s("i",{staticClass:"fa fa-times"})]),s("p",{staticClass:"has-text-white"},[t._v(" "+t._s(t.getTagName(o,a))+": "+t._s(t.photo.tags[o][a])+" ")])])}),0)],1)}),0)],1):t._e()]):t._e()},v=[],C=n(_,f,v,!1,null,"c3ddc111");const $=C.exports,b={name:"BulkTag",components:{Loading:c,FilterMyPhotos:g,PhotoDetailsPopup:$},data(){return{processing:!1}},async mounted(){this.$store.commit("resetPhotoState"),await this.$store.dispatch("LOAD_MY_PHOTOS")},computed:{calendar(){return this.showCalendar?"dropdown is-active mr1":"dropdown mr1"},paginate(){return this.$store.state.photos.bulkPaginate},photos(){return this.paginate.data},selectedCount(){return this.$store.state.photos.selectedCount},hasAddedTags(){return this.processing?!1:this.photos.filter(this.photoIsTagged).length}},methods:{addTags(){this.$store.commit("showModal",{type:"AddManyTagsToManyPhotos",title:this.$t("common.add-many-tags")})},async submit(){this.hasAddedTags&&(this.processing=!0,await this.$store.dispatch("BULK_TAG_PHOTOS"),this.processing=!1,setTimeout(()=>{window.location.reload()},2e3))},async applyTags(){if(!this.hasAddedTags)return;this.processing=!0;const e=this.photos.filter(this.photoIsTagged);for(let t in e){Object.entries(e[t].tags??{}).forEach(([o,a])=>{Object.entries(a).forEach(([i,r])=>{this.$store.commit("addTag",{photoId:e[t].id,category:o,tag:i,quantity:r})})});const s=e[t].custom_tags??[];for(const o in s)this.$store.commit("addCustomTag",{photoId:e[t].id,customTag:s[o]})}setTimeout(()=>{this.processing=!1,this.$router.push("/tag")},300)},deletePhotos(){this.$store.commit("showModal",{type:"ConfirmDeleteManyPhotos",title:this.$t("common.confirm-delete")})},togglePhotoDetailsPopup(e){const t=this.showPhotoDetails(e)?null:e.id;this.$store.commit("setPhotoToShowDetails",t)},getDate(e){return d(e).format("LL")},previous(){this.$store.dispatch("PREVIOUS_PHOTOS_PAGE")},next(){this.$store.dispatch("NEXT_PHOTOS_PAGE")},select(e){this.$store.commit("togglePhotoSelected",e)},photoIsTagged(e){var o;const t=e.tags&&Object.keys(e.tags).length,s=(o=e.custom_tags)==null?void 0:o.length;return t||s},showPhotoDetails(e){return this.$store.state.photos.showDetailsPhotoId===e.id}}};var y=function(){var t=this,s=t._self._c;return s("section",{staticClass:"hero fullheight bulk-tag"},[s("loading",{directives:[{name:"show",rawName:"v-show",value:t.processing,expression:"processing"}],attrs:{"is-full-page":!0},model:{value:t.processing,callback:function(o){t.processing=o},expression:"processing"}}),s("FilterMyPhotos"),s("div",{staticClass:"my-photos-grid-container"},t._l(t.photos,function(o){return s("div",{key:o.id,staticClass:"my-grid-photo"},[s("img",{directives:[{name:"img",rawName:"v-img",value:{sourceButton:!0,openOn:"dblclick"},expression:"{sourceButton: true, openOn: 'dblclick'}"}],staticClass:"litter",attrs:{src:o.filename},on:{click:function(a){return t.select(o.id)}}}),o.selected?s("div",{staticClass:"grid-checkmark"},[t._m(0,!0)]):t._e(),t.photoIsTagged(o)?s("div",{staticClass:"grid-tagged tooltip",on:{click:function(a){return a.preventDefault(),a.stopPropagation(),t.togglePhotoDetailsPopup(o)}}},[t._m(1,!0)]):t._e(),s("transition",{attrs:{name:"fade"}},[t.showPhotoDetails(o)?s("div",{staticClass:"photo-tags"},[s("PhotoDetailsPopup",{on:{close:function(a){return t.togglePhotoDetailsPopup(o)}}})],1):t._e()])],1)}),0),s("div",{staticClass:"bottom-actions"},[s("div",{staticClass:"bottom-navigation"},[s("button",{directives:[{name:"show",rawName:"v-show",value:this.paginate.prev_page_url,expression:"this.paginate.prev_page_url"}],staticClass:"button is-medium mr1",on:{click:t.previous}},[t._v(t._s(t.$t("common.previous")))]),s("button",{directives:[{name:"show",rawName:"v-show",value:this.paginate.next_page_url,expression:"this.paginate.next_page_url"}],staticClass:"button is-medium mr1",on:{click:t.next}},[t._v(t._s(t.$t("common.next")))]),s("div",{staticClass:"photos-info"},[t._m(2),s("div",[t._v(t._s(t.$t("profile.dashboard.bulk-tag-dblclick-info")))])])]),s("div",[s("button",{staticClass:"button is-medium is-primary",attrs:{disabled:t.selectedCount===0},on:{click:t.addTags}},[t._v(t._s(t.$t("common.add-tags")))])]),s("div",{staticClass:"bottom-right-actions"},[s("button",{staticClass:"button is-medium is-primary",attrs:{disabled:!t.hasAddedTags},on:{click:t.applyTags}},[t._v("Add and tag one by one")]),s("button",{staticClass:"button is-medium is-primary",attrs:{disabled:!t.hasAddedTags},on:{click:t.submit}},[t._v(t._s(t.$t("common.submit")))])])])],1)},P=[function(){var e=this,t=e._self._c;return t("div",{staticClass:"tag-icon"},[t("i",{staticClass:"fa fa-check"})])},function(){var e=this,t=e._self._c;return t("div",{staticClass:"tag-icon"},[t("span",{staticClass:"tooltip-text is-size-7"},[e._v("View tags")]),t("i",{staticClass:"fa fa-tags"})])},function(){var e=this,t=e._self._c;return t("div",{staticClass:"info-icon"},[t("i",{staticClass:"fa fa-info"})])}],T=n(b,y,P,!1,null,"b14971f8");const I=T.exports;export{I as default}; +import{F as l}from"./FunctionalCalendar-zzBz_PQP.js";import{n}from"./app-BwSojYvl.js";import{L as c}from"./vue-loading-Ck0acTfr.js";/* empty css */import{h as d}from"./moment-zH0z38ay.js";/* empty css */const h={name:"FilterMyPhotos",components:{FunctionalCalendar:l},data(){return{periods:["created_at","datetime"],processing:!1,showCalendar:!1}},computed:{calendar(){return this.showCalendar?"dropdown is-active":"dropdown"},filters(){return this.$store.state.photos.filters},filter_by_calendar:{get(){return this.filters.calendar},set(e){this.$store.commit("filter_photos_calendar",{min:e.dateRange.start,max:e.dateRange.end}),e.dateRange.end&&this.getPhotos()}},filter_by_id:{get(){return this.filters.id},set(e){this.$store.commit("filter_photos",{key:"id",v:e})}},getSelectAllText(){return this.selectAll?this.$t("common.de-select-all"):this.$t("common.select-all")},period:{get(){return this.filters.period},set(e){this.$store.commit("filter_photos",{key:"period",v:e})}},selectAll:{get(){return this.$store.state.photos.selectAll},set(e){this.$store.commit("selectAllPhotos",e)}},showCalendarDates(){return this.filters.dateRange.start&&this.filters.dateRange.end?`${this.filters.dateRange.start} - ${this.filters.dateRange.end}`:this.$t("common.choose-dates")},spinner(){return this.processing?"fa fa-refresh fa-spin":"fa fa-refresh"},verifiedIndex:{get(){return this.filters.verified},set(e){this.$store.commit("filter_photos",{key:"verified",v:e})}}},methods:{getPeriod(e){return e||(e=this.period),this.$t("teams.dashboard.times."+e)},async getPhotos(){await this.$store.dispatch("GET_USERS_FILTERED_PHOTOS")},getVerifiedText(e){return e===0?this.$t("common.not-verified"):this.$t("common.verified")},search(){this.processing=!0,this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(async()=>{await this.getPhotos(),this.processing=!1},500)},toggleAll(){this.$store.commit("selectAllPhotos",this.selectAll)},toggleCalendar(){this.showCalendar=!this.showCalendar}}};var m=function(){var t=this,s=t._self._c;return s("div",{staticClass:"flex mb1 filter-my-photos"},[s("router-link",{attrs:{to:"/tag"}},[s("button",{staticClass:"button is-primary"},[t._v("Tag individually")])]),s("div",{staticClass:"field mb0 pt0"},[s("div",{staticClass:"control has-icons-left"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.filter_by_id,expression:"filter_by_id"}],staticClass:"input w10",attrs:{placeholder:t.$t("common.search-by-id")},domProps:{value:t.filter_by_id},on:{input:[function(o){o.target.composing||(t.filter_by_id=o.target.value)},t.search]}}),s("span",{staticClass:"icon is-small is-left z-index-0"},[s("i",{class:t.spinner})])])]),s("button",{staticClass:"button is-primary select-all-photos",on:{click:t.toggleAll}},[t._v(" "+t._s(t.getSelectAllText)+" ")]),s("div",{class:t.calendar},[s("div",{staticClass:"dropdown-trigger"},[s("button",{staticClass:"button dropdownButtonLeft",on:{click:t.toggleCalendar}},[s("span",[t._v(t._s(t.showCalendarDates))])])]),s("div",{staticClass:"dropdown-menu"},[s("div",{staticClass:"dropdown-content calendar-box"},[s("FunctionalCalendar",{ref:"calendar",attrs:{"day-names":t.$t("common.day-names"),"month-names":t.$t("common.month-names"),"short-month-names":t.$t("common.short-month-names"),"change-month-function":!0,"change-year-function":!0,"is-date-range":!0,"date-format":"yyyy/mm/dd"},on:{selectedDaysCount:t.toggleCalendar},model:{value:t.filter_by_calendar,callback:function(o){t.filter_by_calendar=o},expression:"filter_by_calendar"}})],1)])]),s("div",[s("select",{directives:[{name:"model",rawName:"v-model",value:t.period,expression:"period"}],staticClass:"input",on:{change:[function(o){var a=Array.prototype.filter.call(o.target.options,function(i){return i.selected}).map(function(i){var r="_value"in i?i._value:i.value;return r});t.period=o.target.multiple?a:a[0]},t.getPhotos]}},t._l(t.periods,function(o){return s("option",{domProps:{value:o}},[t._v(t._s(t.getPeriod(o)))])}),0)])],1)},u=[],p=n(h,m,u,!1,null,"a15747e1");const g=p.exports,_={name:"PhotoDetailsPopup",computed:{photo(){const e=this.$store.state.photos.showDetailsPhotoId;return this.$store.state.photos.bulkPaginate.data.find(t=>t.id===e)}},methods:{getCategoryName(e){return this.$i18n.t(`litter.categories.${e}`)},getTagName(e,t){return this.$i18n.t(`litter.${e}.${t}`)},removeTag(e,t){this.$store.commit("removeTagFromPhoto",{photoId:this.photo.id,category:e,tag:t})},clearCustomTag(e){this.$store.commit("removeCustomTagFromPhoto",{photoId:this.photo.id,customTag:e})},togglePickedUp(){this.$store.commit("setPhotoPickedUp",{photoId:this.photo.id,picked_up:!this.photo.picked_up})}}};var f=function(){var t=this,s=t._self._c;return t.photo?s("div",[s("div",[s("div",{staticClass:"top-row"},[s("div",{staticClass:"switch-container"},[s("p",{staticClass:"mr-2"},[s("strong",[t._v(t._s(t.$t("tags.picked-up-title")))])]),s("label",{staticClass:"switch"},[s("input",{attrs:{type:"checkbox"},domProps:{checked:t.photo.picked_up},on:{change:t.togglePickedUp}}),s("span",{staticClass:"slider round"})])])]),s("div",{staticClass:"close-popup",on:{click:function(o){return t.$emit("close")}}},[s("i",{staticClass:"fa fa-times"})])]),t.photo.custom_tags&&t.photo.custom_tags.length||Object.keys(t.photo.tags).length?s("div",{staticClass:"photo-tags-container"},[t.photo.custom_tags&&t.photo.custom_tags.length?s("div",[s("p",{staticClass:"has-text-centered"},[t._v(t._s(t.$t("tags.custom-tags")))]),s("transition-group",{staticClass:"tags-list",attrs:{name:"list",tag:"div"}},t._l(t.photo.custom_tags,function(o){return s("div",{key:o,staticClass:"litter-tag"},[s("span",{staticClass:"close",on:{click:function(a){return a.preventDefault(),a.stopPropagation(),t.clearCustomTag(o)}}},[s("i",{staticClass:"fa fa-times"})]),s("p",{staticClass:"has-text-white"},[t._v(t._s(o))])])}),0)],1):t._e(),s("transition-group",{attrs:{name:"categories",tag:"div"}},t._l(Object.keys(t.photo.tags||{}),function(o){return s("div",{key:o},[s("p",{staticClass:"has-text-centered"},[t._v(t._s(t.getCategoryName(o)))]),s("transition-group",{staticClass:"tags-list",attrs:{name:"list",tag:"div"}},t._l(Object.keys(t.photo.tags[o]),function(a){return s("div",{key:a,staticClass:"litter-tag"},[s("span",{staticClass:"close",on:{click:function(i){return i.preventDefault(),i.stopPropagation(),t.removeTag(o,a)}}},[s("i",{staticClass:"fa fa-times"})]),s("p",{staticClass:"has-text-white"},[t._v(" "+t._s(t.getTagName(o,a))+": "+t._s(t.photo.tags[o][a])+" ")])])}),0)],1)}),0)],1):t._e()]):t._e()},v=[],C=n(_,f,v,!1,null,"c3ddc111");const $=C.exports,b={name:"BulkTag",components:{Loading:c,FilterMyPhotos:g,PhotoDetailsPopup:$},data(){return{processing:!1}},async mounted(){this.$store.commit("resetPhotoState"),await this.$store.dispatch("LOAD_MY_PHOTOS")},computed:{calendar(){return this.showCalendar?"dropdown is-active mr1":"dropdown mr1"},paginate(){return this.$store.state.photos.bulkPaginate},photos(){return this.paginate.data},selectedCount(){return this.$store.state.photos.selectedCount},hasAddedTags(){return this.processing?!1:this.photos.filter(this.photoIsTagged).length}},methods:{addTags(){this.$store.commit("showModal",{type:"AddManyTagsToManyPhotos",title:this.$t("common.add-many-tags")})},async submit(){this.hasAddedTags&&(this.processing=!0,await this.$store.dispatch("BULK_TAG_PHOTOS"),this.processing=!1,setTimeout(()=>{window.location.reload()},2e3))},async applyTags(){if(!this.hasAddedTags)return;this.processing=!0;const e=this.photos.filter(this.photoIsTagged);for(let t in e){Object.entries(e[t].tags??{}).forEach(([o,a])=>{Object.entries(a).forEach(([i,r])=>{this.$store.commit("addTag",{photoId:e[t].id,category:o,tag:i,quantity:r})})});const s=e[t].custom_tags??[];for(const o in s)this.$store.commit("addCustomTag",{photoId:e[t].id,customTag:s[o]})}setTimeout(()=>{this.processing=!1,this.$router.push("/tag")},300)},deletePhotos(){this.$store.commit("showModal",{type:"ConfirmDeleteManyPhotos",title:this.$t("common.confirm-delete")})},togglePhotoDetailsPopup(e){const t=this.showPhotoDetails(e)?null:e.id;this.$store.commit("setPhotoToShowDetails",t)},getDate(e){return d(e).format("LL")},previous(){this.$store.dispatch("PREVIOUS_PHOTOS_PAGE")},next(){this.$store.dispatch("NEXT_PHOTOS_PAGE")},select(e){this.$store.commit("togglePhotoSelected",e)},photoIsTagged(e){var o;const t=e.tags&&Object.keys(e.tags).length,s=(o=e.custom_tags)==null?void 0:o.length;return t||s},showPhotoDetails(e){return this.$store.state.photos.showDetailsPhotoId===e.id}}};var y=function(){var t=this,s=t._self._c;return s("section",{staticClass:"hero fullheight bulk-tag"},[s("loading",{directives:[{name:"show",rawName:"v-show",value:t.processing,expression:"processing"}],attrs:{"is-full-page":!0},model:{value:t.processing,callback:function(o){t.processing=o},expression:"processing"}}),s("FilterMyPhotos"),s("div",{staticClass:"my-photos-grid-container"},t._l(t.photos,function(o){return s("div",{key:o.id,staticClass:"my-grid-photo"},[s("img",{directives:[{name:"img",rawName:"v-img",value:{sourceButton:!0,openOn:"dblclick"},expression:"{sourceButton: true, openOn: 'dblclick'}"}],staticClass:"litter",attrs:{src:o.filename},on:{click:function(a){return t.select(o.id)}}}),o.selected?s("div",{staticClass:"grid-checkmark"},[t._m(0,!0)]):t._e(),t.photoIsTagged(o)?s("div",{staticClass:"grid-tagged tooltip",on:{click:function(a){return a.preventDefault(),a.stopPropagation(),t.togglePhotoDetailsPopup(o)}}},[t._m(1,!0)]):t._e(),s("transition",{attrs:{name:"fade"}},[t.showPhotoDetails(o)?s("div",{staticClass:"photo-tags"},[s("PhotoDetailsPopup",{on:{close:function(a){return t.togglePhotoDetailsPopup(o)}}})],1):t._e()])],1)}),0),s("div",{staticClass:"bottom-actions"},[s("div",{staticClass:"bottom-navigation"},[s("button",{directives:[{name:"show",rawName:"v-show",value:this.paginate.prev_page_url,expression:"this.paginate.prev_page_url"}],staticClass:"button is-medium mr1",on:{click:t.previous}},[t._v(t._s(t.$t("common.previous")))]),s("button",{directives:[{name:"show",rawName:"v-show",value:this.paginate.next_page_url,expression:"this.paginate.next_page_url"}],staticClass:"button is-medium mr1",on:{click:t.next}},[t._v(t._s(t.$t("common.next")))]),s("div",{staticClass:"photos-info"},[t._m(2),s("div",[t._v(t._s(t.$t("profile.dashboard.bulk-tag-dblclick-info")))])])]),s("div",[s("button",{staticClass:"button is-medium is-primary",attrs:{disabled:t.selectedCount===0},on:{click:t.addTags}},[t._v(t._s(t.$t("common.add-tags")))])]),s("div",{staticClass:"bottom-right-actions"},[s("button",{staticClass:"button is-medium is-primary",attrs:{disabled:!t.hasAddedTags},on:{click:t.applyTags}},[t._v("Add and tag one by one")]),s("button",{staticClass:"button is-medium is-primary",attrs:{disabled:!t.hasAddedTags},on:{click:t.submit}},[t._v(t._s(t.$t("common.submit")))])])])],1)},P=[function(){var e=this,t=e._self._c;return t("div",{staticClass:"tag-icon"},[t("i",{staticClass:"fa fa-check"})])},function(){var e=this,t=e._self._c;return t("div",{staticClass:"tag-icon"},[t("span",{staticClass:"tooltip-text is-size-7"},[e._v("View tags")]),t("i",{staticClass:"fa fa-tags"})])},function(){var e=this,t=e._self._c;return t("div",{staticClass:"info-icon"},[t("i",{staticClass:"fa fa-info"})])}],T=n(b,y,P,!1,null,"b14971f8");const I=T.exports;export{I as default}; diff --git a/public/build/assets/Cities-Ds2_3Q4N.js b/public/build/assets/Cities-Cnu1Qb5q.js similarity index 86% rename from public/build/assets/Cities-Ds2_3Q4N.js rename to public/build/assets/Cities-Cnu1Qb5q.js index 108e90d0..4d8b6215 100644 --- a/public/build/assets/Cities-Ds2_3Q4N.js +++ b/public/build/assets/Cities-Cnu1Qb5q.js @@ -1 +1 @@ -import{S as a}from"./SortLocations-DdlBSIC0.js";import{L as o}from"./vue-loading-hzYdSApK.js";/* empty css */import{n as i}from"./app-DuS6KM7M.js";import"./moment-zH0z38ay.js";/* empty css */const e={name:"Cities",async created(){this.loading=!0,await this.$store.dispatch("GET_CITIES",{country:window.location.href.split("/")[4],state:window.location.href.split("/")[5]}),this.loading=!1},components:{SortLocations:a,Loading:o},data(){return{loading:!0}},computed:{countryName(){return this.$store.state.locations.countryName},stateName(){return this.$store.state.locations.stateName}},methods:{goBack(){return this.$store.commit("setLocations",[]),this.$router.push({path:"/world/"+this.countryName})}}};var n=function(){var s=this,t=s._self._c;return t("div",{staticClass:"locations-container"},[t("section",{staticClass:"hero is-info is-medium"},[t("div",{staticClass:"hero-body"},[t("div",{staticClass:"container"},[t("div",{staticClass:"columns"},[t("div",{staticClass:"column is-4"},[t("h1",{staticClass:"title is-1 flex pointer",on:{click:s.goBack}},[t("i",{directives:[{name:"show",rawName:"v-show",value:!s.loading,expression:"!loading"}],staticClass:"fa fa-chevron-left country-back"}),s._v(" "+s._s(s.countryName)+" ")]),t("h1",{staticClass:"subtitle is-3"},[s._v(s._s(s.stateName))])])])])])]),t("sort-locations",{attrs:{locationType:"city"}})],1)},r=[],c=i(e,n,r,!1,null,"8a16333f");const _=c.exports;export{_ as default}; +import{S as a}from"./SortLocations-R8WNss-N.js";import{L as o}from"./vue-loading-Ck0acTfr.js";/* empty css */import{n as i}from"./app-BwSojYvl.js";import"./moment-zH0z38ay.js";/* empty css */const e={name:"Cities",async created(){this.loading=!0,await this.$store.dispatch("GET_CITIES",{country:window.location.href.split("/")[4],state:window.location.href.split("/")[5]}),this.loading=!1},components:{SortLocations:a,Loading:o},data(){return{loading:!0}},computed:{countryName(){return this.$store.state.locations.countryName},stateName(){return this.$store.state.locations.stateName}},methods:{goBack(){return this.$store.commit("setLocations",[]),this.$router.push({path:"/world/"+this.countryName})}}};var n=function(){var s=this,t=s._self._c;return t("div",{staticClass:"locations-container"},[t("section",{staticClass:"hero is-info is-medium"},[t("div",{staticClass:"hero-body"},[t("div",{staticClass:"container"},[t("div",{staticClass:"columns"},[t("div",{staticClass:"column is-4"},[t("h1",{staticClass:"title is-1 flex pointer",on:{click:s.goBack}},[t("i",{directives:[{name:"show",rawName:"v-show",value:!s.loading,expression:"!loading"}],staticClass:"fa fa-chevron-left country-back"}),s._v(" "+s._s(s.countryName)+" ")]),t("h1",{staticClass:"subtitle is-3"},[s._v(s._s(s.stateName))])])])])])]),t("sort-locations",{attrs:{locationType:"city"}})],1)},r=[],c=i(e,n,r,!1,null,"8a16333f");const _=c.exports;export{_ as default}; diff --git a/public/build/assets/CityMapContainer-BhOtMbex.js b/public/build/assets/CityMapContainer-D1JDJV1x.js similarity index 99% rename from public/build/assets/CityMapContainer-BhOtMbex.js rename to public/build/assets/CityMapContainer-D1JDJV1x.js index dabc814a..5a47ae0e 100644 --- a/public/build/assets/CityMapContainer-BhOtMbex.js +++ b/public/build/assets/CityMapContainer-D1JDJV1x.js @@ -1,4 +1,4 @@ -import{L as Ra}from"./vue-loading-hzYdSApK.js";/* empty css */import{L as he,h as Mo}from"./mapHelpers-CSfygYu3.js";import{n as Po,a as ba,l as Ma}from"./app-DuS6KM7M.js";import"./moment-zH0z38ay.js";/* empty css */(function(h){if(typeof exports=="object"&&typeof module<"u")module.exports=h();else if(typeof define=="function"&&define.amd)define([],h);else{var E;typeof window<"u"?E=window:typeof global<"u"?E=global:typeof self<"u"?E=self:E=this,E.turf=h()}})(function(){return function h(E,u,_){function d(c,f){if(!u[c]){if(!E[c]){var p=typeof require=="function"&&require;if(!f&&p)return p(c,!0);if(S)return S(c,!0);var g=new Error("Cannot find module '"+c+"'");throw g.code="MODULE_NOT_FOUND",g}var m=u[c]={exports:{}};E[c][0].call(m.exports,function(N){var y=E[c][1][N];return d(y||N)},m,m.exports,h,E,u,_)}return u[c].exports}for(var S=typeof require=="function"&&require,a=0;a<_.length;a++)d(_[a]);return d}({1:[function(h,E,u){var _=h("@turf/helpers"),d=h("@turf/invariant"),S=h("@turf/meta"),a={isolines:h("@turf/isolines"),convex:h("@turf/convex"),within:h("@turf/within"),concave:h("@turf/concave"),difference:h("@turf/difference"),dissolve:h("@turf/dissolve"),collect:h("@turf/collect"),flip:h("@turf/flip"),simplify:h("@turf/simplify"),bezier:h("@turf/bezier"),tag:h("@turf/tag"),sample:h("@turf/sample"),envelope:h("@turf/envelope"),square:h("@turf/square"),circle:h("@turf/circle"),midpoint:h("@turf/midpoint"),buffer:h("@turf/buffer"),center:h("@turf/center"),centerOfMass:h("@turf/center-of-mass"),centroid:h("@turf/centroid"),combine:h("@turf/combine"),distance:h("@turf/distance"),explode:h("@turf/explode"),bbox:h("@turf/bbox"),tesselate:h("@turf/tesselate"),bboxPolygon:h("@turf/bbox-polygon"),inside:h("@turf/inside"),intersect:h("@turf/intersect"),nearest:h("@turf/nearest"),planepoint:h("@turf/planepoint"),random:h("@turf/random"),tin:h("@turf/tin"),union:h("@turf/union"),bearing:h("@turf/bearing"),destination:h("@turf/destination"),kinks:h("@turf/kinks"),pointOnSurface:h("@turf/point-on-surface"),area:h("@turf/area"),along:h("@turf/along"),lineDistance:h("@turf/line-distance"),lineSlice:h("@turf/line-slice"),lineSliceAlong:h("@turf/line-slice-along"),pointOnLine:h("@turf/point-on-line"),pointGrid:h("@turf/point-grid"),squareGrid:h("@turf/square-grid"),triangleGrid:h("@turf/triangle-grid"),hexGrid:h("@turf/hex-grid"),idw:h("@turf/idw"),truncate:h("@turf/truncate"),flatten:h("@turf/flatten"),lineIntersect:h("@turf/line-intersect"),mask:h("@turf/mask"),lineChunk:h("@turf/line-chunk"),unkinkPolygon:h("@turf/unkink-polygon"),greatCircle:h("@turf/great-circle"),lineSegment:h("@turf/line-segment"),point:_.point,polygon:_.polygon,lineString:_.lineString,multiPoint:_.multiPoint,multiPolygon:_.multiPolygon,multiLineString:_.multiLineString,feature:_.feature,featureCollection:_.featureCollection,geometryCollection:_.geometryCollection,getCoord:d.getCoord,getCoords:d.getCoords,geojsonType:d.geojsonType,featureOf:d.featureOf,collectionOf:d.collectionOf,coordEach:S.coordEach,coordReduce:S.coordReduce,propEach:S.propEach,propReduce:S.propReduce,featureEach:S.featureEach,featureReduce:S.featureReduce,coordAll:S.coordAll,geomEach:S.geomEach,geomReduce:S.geomReduce};E.exports=a},{"@turf/along":2,"@turf/area":12,"@turf/bbox":18,"@turf/bbox-polygon":16,"@turf/bearing":20,"@turf/bezier":22,"@turf/buffer":25,"@turf/center":57,"@turf/center-of-mass":29,"@turf/centroid":61,"@turf/circle":64,"@turf/collect":69,"@turf/combine":76,"@turf/concave":78,"@turf/convex":86,"@turf/destination":105,"@turf/difference":108,"@turf/dissolve":110,"@turf/distance":121,"@turf/envelope":124,"@turf/explode":129,"@turf/flatten":132,"@turf/flip":136,"@turf/great-circle":139,"@turf/helpers":141,"@turf/hex-grid":142,"@turf/idw":147,"@turf/inside":163,"@turf/intersect":165,"@turf/invariant":167,"@turf/isolines":169,"@turf/kinks":192,"@turf/line-chunk":194,"@turf/line-distance":221,"@turf/line-intersect":231,"@turf/line-segment":247,"@turf/line-slice":265,"@turf/line-slice-along":255,"@turf/mask":277,"@turf/meta":286,"@turf/midpoint":287,"@turf/nearest":296,"@turf/planepoint":300,"@turf/point-grid":301,"@turf/point-on-line":308,"@turf/point-on-surface":318,"@turf/random":332,"@turf/sample":334,"@turf/simplify":336,"@turf/square":345,"@turf/square-grid":338,"@turf/tag":349,"@turf/tesselate":352,"@turf/tin":355,"@turf/triangle-grid":357,"@turf/truncate":362,"@turf/union":363,"@turf/unkink-polygon":365,"@turf/within":384}],2:[function(h,E,u){var _=h("@turf/distance"),d=h("@turf/helpers").point,S=h("@turf/bearing"),a=h("@turf/destination");E.exports=function(c,f,p){var g;if(c.type==="Feature")g=c.geometry.coordinates;else if(c.type==="LineString")g=c.coordinates;else throw new Error("input must be a LineString Feature or Geometry");for(var m=0,N=0;N=m&&N===g.length-1);N++)if(m>=f){var y=f-m;if(y){var R=S(g[N],g[N-1])-180,I=a(g[N],y,R,p);return I}else return d(g[N])}else m+=_(g[N],g[N+1],p);return d(g[g.length-1])}},{"@turf/bearing":3,"@turf/destination":5,"@turf/distance":8,"@turf/helpers":11}],3:[function(h,E,u){var _=h("@turf/invariant").getCoord;function d(a,c,f){if(f===!0)return S(a,c);var p=Math.PI/180,g=180/Math.PI,m=_(a),N=_(c),y=p*m[0],R=p*N[0],I=p*m[1],v=p*N[1],M=Math.sin(R-y)*Math.cos(v),T=Math.cos(I)*Math.sin(v)-Math.sin(I)*Math.cos(v)*Math.cos(R-y),w=g*Math.atan2(M,T);return w}function S(a,c){var f=d(c,a);return f=(f+180)%360,f}E.exports=d},{"@turf/invariant":4}],4:[function(h,E,u){function _(p){if(!p)throw new Error("No obj passed");var g=d(p);if(g.length>1&&typeof g[0]=="number"&&typeof g[1]=="number")return g;throw new Error("Coordinate is not a valid Point")}function d(p){if(!p)throw new Error("No obj passed");var g;if(p.length?g=p:p.coordinates?g=p.coordinates:p.geometry&&p.geometry.coordinates&&(g=p.geometry.coordinates),g)return S(g),g;throw new Error("No valid coordinates")}function S(p){if(p.length>1&&typeof p[0]=="number"&&typeof p[1]=="number")return!0;if(p[0].length)return S(p[0]);throw new Error("coordinates must only contain numbers")}function a(p,g,m){if(!g||!m)throw new Error("type and name required");if(!p||p.type!==g)throw new Error("Invalid input to "+m+": must be a "+g+", given "+p.type)}function c(p,g,m){if(!p)throw new Error("No feature passed");if(!m)throw new Error(".featureOf() requires a name");if(!p||p.type!=="Feature"||!p.geometry)throw new Error("Invalid input to "+m+", Feature with geometry required");if(!p.geometry||p.geometry.type!==g)throw new Error("Invalid input to "+m+": must be a "+g+", given "+p.geometry.type)}function f(p,g,m){if(!p)throw new Error("No featureCollection passed");if(!m)throw new Error(".collectionOf() requires a name");if(!p||p.type!=="FeatureCollection")throw new Error("Invalid input to "+m+", FeatureCollection required");for(var N=0;N0){p+=Math.abs(a(f[0]));for(var g=1;g2){for(I=0;Ia[0]&&(S[0]=a[0]),S[1]>a[1]&&(S[1]=a[1]),S[2]d&&(S.push(c),a=f)}return S},_.prototype.vector=function(d){var S=this.pos(d+10),a=this.pos(d-10);return{angle:180*Math.atan2(S.y-a.y,S.x-a.x)/3.14,speed:Math.sqrt((a.x-S.x)*(a.x-S.x)+(a.y-S.y)*(a.y-S.y)+(a.z-S.z)*(a.z-S.z))}},_.prototype.pos=function(d){function S(g,m,N,y,R){var I=function(T){var w=T*T,b=w*T;return[b,3*w*(1-T),3*T*(1-T)*(1-T),(1-T)*(1-T)*(1-T)]},v=I(g),M={x:R.x*v[0]+y.x*v[1]+N.x*v[2]+m.x*v[3],y:R.y*v[0]+y.y*v[1]+N.y*v[2]+m.y*v[3],z:R.z*v[0]+y.z*v[1]+N.z*v[2]+m.z*v[3]};return M}var a=d-this.delay;a<0&&(a=0),a>this.duration&&(a=this.duration-1);var c=a/this.duration;if(c>=1)return this.points[this.length-1];var f=Math.floor((this.points.length-1)*c),p=(this.length-1)*c-f;return S(p,this.points[f],this.controls[f][1],this.controls[f+1][0],this.points[f+1])},E.exports=_},{}],25:[function(h,E,u){var _=h("@turf/helpers"),d=_.featureCollection,S=h("jsts"),a=h("@mapbox/geojson-normalize");E.exports=function(f,p,g){var m=_.distanceToDegrees(p,g),N=a(f),y=a(d(N.features.map(function(R){return c(R,m)})));if(y.features.length>1)return y;if(y.features.length===1)return y.features[0]};function c(f,p){var g=new S.io.GeoJSONReader,m=g.read(f.geometry),N=m.buffer(p),y=new S.io.GeoJSONWriter;return N=y.write(N),{type:"Feature",geometry:N,properties:{}}}},{"@mapbox/geojson-normalize":26,"@turf/helpers":27,jsts:28}],26:[function(h,E,u){E.exports=d;var _={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featurecollection"};function d(S){if(!S||!S.type)return null;var a=_[S.type];if(!a)return null;if(a==="geometry")return{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:S}]};if(a==="feature")return{type:"FeatureCollection",features:[S]};if(a==="featurecollection")return S}},{}],27:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],28:[function(h,E,u){(function(_,d){d(typeof u=="object"&&typeof E<"u"?u:_.jsts=_.jsts||{})})(this,function(_){function d(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])}function S(){}function a(){}function c(){}function f(){}function p(){}function g(){}function m(){}function N(t){this.name="RuntimeException",this.message=t,this.stack=new Error().stack,Error.call(this,t)}function y(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t}function R(){if(arguments.length===0)N.call(this);else if(arguments.length===1){var t=arguments[0];N.call(this,t)}}function I(){}function v(){if(this.x=null,this.y=null,this.z=null,arguments.length===0)v.call(this,0,0);else if(arguments.length===1){var t=arguments[0];v.call(this,t.x,t.y,t.z)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];v.call(this,e,n,v.NULL_ORDINATE)}else if(arguments.length===3){var r=arguments[0],s=arguments[1],o=arguments[2];this.x=r,this.y=s,this.z=o}}function M(){if(this.dimensionsToTest=2,arguments.length===0)M.call(this,2);else if(arguments.length===1){var t=arguments[0];if(t!==2&&t!==3)throw new a;this.dimensionsToTest=t}}function T(){}function w(){}function b(t){this.message=t||""}function P(){}function O(t){this.message=t||""}function D(t){this.message=t||""}function C(){this.array_=[],arguments[0]instanceof w&&this.addAll(arguments[0])}function q(){if(C.apply(this),arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.ensureCapacity(t.length),this.add(t,!0)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.ensureCapacity(e.length),this.add(e,n)}}}function B(){if(this.minx=null,this.maxx=null,this.miny=null,this.maxy=null,arguments.length===0)this.init();else if(arguments.length===1){if(arguments[0]instanceof v){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof B){var e=arguments[0];this.init(e)}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];this.init(n.x,r.x,n.y,r.y)}else if(arguments.length===4){var s=arguments[0],o=arguments[1],l=arguments[2],x=arguments[3];this.init(s,o,l,x)}}function U(){}function W(){U.call(this,"Projective point not representable on the Cartesian plane.")}function L(){}function X(t,e){return t.interfaces_&&t.interfaces_().indexOf(e)>-1}function ot(){}function F(t){this.str=t}function Y(t){this.value=t}function H(){}function z(){if(this.hi=0,this.lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];this.init(t)}else if(arguments[0]instanceof z){var e=arguments[0];this.init(e)}else if(typeof arguments[0]=="string"){var n=arguments[0];z.call(this,z.parse(n))}}else if(arguments.length===2){var r=arguments[0],s=arguments[1];this.init(r,s)}}function J(){}function G(){}function k(){}function j(){if(this.x=null,this.y=null,this.w=null,arguments.length===0)this.x=0,this.y=0,this.w=1;else if(arguments.length===1){var t=arguments[0];this.x=t.x,this.y=t.y,this.w=1}else if(arguments.length===2){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var e=arguments[0],n=arguments[1];this.x=e,this.y=n,this.w=1}else if(arguments[0]instanceof j&&arguments[1]instanceof j){var r=arguments[0],s=arguments[1];this.x=r.y*s.w-s.y*r.w,this.y=s.x*r.w-r.x*s.w,this.w=r.x*s.y-s.x*r.y}else if(arguments[0]instanceof v&&arguments[1]instanceof v){var o=arguments[0],l=arguments[1];this.x=o.y-l.y,this.y=l.x-o.x,this.w=o.x*l.y-l.x*o.y}}else if(arguments.length===3){var x=arguments[0],A=arguments[1],V=arguments[2];this.x=x,this.y=A,this.w=V}else if(arguments.length===4){var Z=arguments[0],K=arguments[1],$=arguments[2],ut=arguments[3],ft=Z.y-K.y,gt=K.x-Z.x,Ot=Z.x*K.y-K.x*Z.y,Xt=$.y-ut.y,Ve=ut.x-$.x,ir=$.x*ut.y-ut.x*$.y;this.x=gt*ir-Ve*Ot,this.y=Xt*Ot-ft*ir,this.w=ft*Ve-Xt*gt}}function rt(){}function it(){}function Q(){this.envelope=null,this.factory=null,this.SRID=null,this.userData=null;var t=arguments[0];this.factory=t,this.SRID=t.getSRID()}function lt(){}function st(){}function ct(){}function vt(){}function Re(){}function Qt(){}function at(){}function Nn(){}function sr(){}function $e(){}function Yt(){}function zt(){}function Rt(){this.array_=[],arguments[0]instanceof w&&this.addAll(arguments[0])}function ke(t){return t==null?fn:t.color}function Et(t){return t==null?null:t.parent}function Oe(t,e){t!==null&&(t.color=e)}function Mr(t){return t==null?null:t.left}function Ni(t){return t==null?null:t.right}function Vt(){this.root_=null,this.size_=0}function or(){}function Ci(){}function Jt(){this.array_=[],arguments[0]instanceof w&&this.addAll(arguments[0])}function _e(){}function tt(){}function tn(){}function zn(){}function xt(){this.geometries=null;var t=arguments[0],e=arguments[1];if(Q.call(this,e),t===null&&(t=[]),Q.hasNullElements(t))throw new a;this.geometries=t}function ce(){var t=arguments[0],e=arguments[1];xt.call(this,t,e)}function pn(){if(this.geom=null,this.geomFact=null,this.bnRule=null,this.endpointMap=null,arguments.length===1){var t=arguments[0];pn.call(this,t,st.MOD2_BOUNDARY_RULE)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.geom=e,this.geomFact=e.getFactory(),this.bnRule=n}}function Ls(){this.count=null}function To(){}function Oo(){}function _o(){}function Ao(){}function Do(){}function Fo(){}function ye(){}function kt(){}function mt(){this.points=null;var t=arguments[0],e=arguments[1];Q.call(this,e),this.init(t)}function wi(){}function At(){this.coordinates=null;var t=arguments[0],e=arguments[1];Q.call(this,e),this.init(t)}function en(){}function Mt(){this.shell=null,this.holes=null;var t=arguments[0],e=arguments[1],n=arguments[2];if(Q.call(this,n),t===null&&(t=this.getFactory().createLinearRing()),e===null&&(e=[]),Q.hasNullElements(e))throw new a;if(t.isEmpty()&&Q.hasNonEmptyElements(e))throw new a;this.shell=t,this.holes=e}function fe(){var t=arguments[0],e=arguments[1];xt.call(this,t,e)}function qt(){if(arguments[0]instanceof v&&arguments[1]instanceof yt){var t=arguments[0],e=arguments[1];qt.call(this,e.getCoordinateSequenceFactory().create(t),e)}else if(X(arguments[0],G)&&arguments[1]instanceof yt){var n=arguments[0],r=arguments[1];mt.call(this,n,r),this.validateConstruction()}}function Zt(){var t=arguments[0],e=arguments[1];xt.call(this,t,e)}function xe(){if(this.factory=null,this.isUserDataCopied=!1,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.factory=t}}}function Si(){}function Rs(){}function bs(){}function Ms(){}function Ee(){if(this.dimension=3,this.coordinates=null,arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];Ee.call(this,t,3)}else if(Number.isInteger(arguments[0])){var e=arguments[0];this.coordinates=new Array(e).fill(null);for(var n=0;n-1}function Vo(t){return this.has(t)?this._values[Ke]:void 0}function ko(t,e){if(this.objectOnly&&e!==Object(e))throw new TypeError("Invalid value used as weak collection key");if(e!==e||e===0)for(Ke=t.length;Ke--&&!qo(t[Ke],e););else Ke=t.indexOf(e);return Ke>-1}function Xo(t){return ko.call(this,this._keys,t)}function Uo(t,e){return this.has(t)?this._values[Ke]=e:this._values[this._keys.push(t)-1]=e,this}function Yo(){(this._keys||0).length=this._values.length=0}function Ho(){return Ps(this._itp,this._keys)}function Wo(){return Ps(this._itp,this._values)}function Zo(){return Ps(this._itp,this._keys,this._values)}function Ps(t,e,n){var r=[0],s=!1;return t.push(r),{next:function(){var o,l=r[0];return!s&&l1,"Node capacity must be greater than 1"),this.nodeCapacity=t}}function Ko(){}function Pi(){}function Dt(){if(arguments.length===0)Dt.call(this,Dt.DEFAULT_NODE_CAPACITY);else if(arguments.length===1){var t=arguments[0];Gt.call(this,t)}}function Ar(){var t=arguments[0];se.call(this,t)}function ue(){}function As(){this.segString=null,this.coord=null,this.segmentIndex=null,this.segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this.segString=t,this.coord=new v(e),this.segmentIndex=n,this.segmentOctant=r,this._isInterior=!e.equals2D(t.getCoordinate(n))}function Ds(){this.nodeMap=new Vt,this.edge=null;var t=arguments[0];this.edge=t}function wo(){this.nodeList=null,this.edge=null,this.nodeIt=null,this.currNode=null,this.nextNode=null,this.currSegIndex=0;var t=arguments[0];this.nodeList=t,this.edge=t.getEdge(),this.nodeIt=t.iterator(),this.readNextNode()}function Fs(){}function Ue(){this.nodeList=new Ds(this),this.pts=null,this.data=null;var t=arguments[0],e=arguments[1];this.pts=t,this.data=e}function Dr(){this.tempEnv1=new B,this.tempEnv2=new B,this.overlapSeg1=new dt,this.overlapSeg2=new dt}function qs(){this.pts=null,this.start=null,this.end=null,this.env=null,this.context=null,this.id=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this.pts=t,this.start=e,this.end=n,this.context=r}function Nt(){}function Ae(){}function Fr(){}function Ti(){if(this.segInt=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.setSegmentIntersector(t)}}}function wn(){if(this.monoChains=new C,this.index=new Dt,this.idCounter=0,this.nodedSegStrings=null,this.nOverlaps=0,arguments.length!==0){if(arguments.length===1){var t=arguments[0];Ti.call(this,t)}}}function qr(){Dr.apply(this),this.si=null;var t=arguments[0];this.si=t}function ge(){if(this.pt=null,arguments.length===1){var t=arguments[0];N.call(this,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];N.call(this,ge.msgWithCoord(e,n)),this.name="TopologyException",this.pt=new v(n)}}function Gr(){}function vn(){this.findAllIntersections=!1,this.isCheckEndSegmentsOnly=!1,this.li=null,this.interiorIntersection=null,this.intSegments=null,this.intersections=new C,this.intersectionCount=0,this.keepIntersections=!0;var t=arguments[0];this.li=t,this.interiorIntersection=null}function Br(){this.li=new Ht,this.segStrings=null,this.findAllIntersections=!1,this.segInt=null,this._isValid=!0;var t=arguments[0];this.segStrings=t}function Yn(){this.nv=null;var t=arguments[0];this.nv=new Br(Yn.toSegmentStrings(t))}function cr(){this.mapOp=null;var t=arguments[0];this.mapOp=t}function et(){}function de(){if(this.location=null,arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];this.init(t.length)}else if(Number.isInteger(arguments[0])){var e=arguments[0];this.init(1),this.location[et.ON]=e}else if(arguments[0]instanceof de){var n=arguments[0];if(this.init(n.location.length),n!==null)for(var r=0;r=0?this.setComputationPrecision(r.getPrecisionModel()):this.setComputationPrecision(s.getPrecisionModel()),this.arg=new Array(2).fill(null),this.arg[0]=new le(0,r,o),this.arg[1]=new le(1,s,o)}}function bn(){this.pts=null,this._orientation=null;var t=arguments[0];this.pts=t,this._orientation=bn.orientation(t)}function Xi(){this.edges=new C,this.ocaMap=new Vt}function ht(){this.ptLocator=new Un,this.geomFact=null,this.resultGeom=null,this.graph=null,this.edgeList=new Xi,this.resultPolyList=new C,this.resultLineList=new C,this.resultPointList=new C;var t=arguments[0],e=arguments[1];Rn.call(this,t,e),this.graph=new He(new dr),this.geomFact=t.getFactory()}function Me(){this.geom=new Array(2).fill(null),this.snapTolerance=null,this.cbr=null;var t=arguments[0],e=arguments[1];this.geom[0]=t,this.geom[1]=e,this.computeSnapTolerance()}function Wt(){this.geom=new Array(2).fill(null);var t=arguments[0],e=arguments[1];this.geom[0]=t,this.geom[1]=e}function Fe(){this.factory=null,this.interiorPoint=null,this.maxWidth=0;var t=arguments[0];this.factory=t.getFactory(),this.add(t)}function pr(){this.poly=null,this.centreY=null,this.hiY=c.MAX_VALUE,this.loY=-c.MAX_VALUE;var t=arguments[0];this.poly=t,this.hiY=t.getEnvelopeInternal().getMaxY(),this.loY=t.getEnvelopeInternal().getMinY(),this.centreY=Fe.avg(this.loY,this.hiY)}function Ui(){this.centroid=null,this.minDistance=c.MAX_VALUE,this.interiorPoint=null;var t=arguments[0];this.centroid=t.getCentroid().getCoordinate(),this.addInterior(t),this.interiorPoint===null&&this.addEndpoints(t)}function Yi(){this.centroid=null,this.minDistance=c.MAX_VALUE,this.interiorPoint=null;var t=arguments[0];this.centroid=t.getCentroid().getCoordinate(),this.add(t)}function Mn(){this.tempEnv1=new B,this.selectedSegment=new dt}function We(){this.items=new C,this.subnode=[null,null]}function ln(){if(this.min=null,this.max=null,arguments.length===0)this.min=0,this.max=0;else if(arguments.length===1){var t=arguments[0];this.init(t.min,t.max)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.init(e,n)}}function jn(){}function Qo(t,e){var n,r,s,o,l={32:{d:127,c:128,b:0,a:0},64:{d:32752,c:0,b:0,a:0}},x={32:8,64:11}[t];if(o||(n=e<0||1/e<0,isFinite(e)||(o=l[t],n&&(o.d+=1<=2;)r++,s/=2;for(;s<1&&r>0;)r--,s*=2;r<=0&&(s/=2)}return r}function Xr(){this.pt=0,this.level=0,this.interval=null;var t=arguments[0];this.computeKey(t)}function yn(){We.apply(this),this.interval=null,this.centre=null,this.level=null;var t=arguments[0],e=arguments[1];this.interval=t,this.level=e,this.centre=(t.getMin()+t.getMax())/2}function Pn(){}function mr(){We.apply(this)}function vr(){this.root=null,this.minExtent=1,this.root=new mr}function Hs(){}function Ur(){this.ring=null,this.tree=null,this.crossings=0,this.interval=new ln;var t=arguments[0];this.ring=t,this.buildIndex()}function Yr(){Mn.apply(this),this.mcp=null,this.p=null;var t=arguments[0],e=arguments[1];this.mcp=t,this.p=e}function pt(){}function Tt(){this.p0=null,this.p1=null,this.p2=null;var t=arguments[0],e=arguments[1],n=arguments[2];this.p0=t,this.p1=e,this.p2=n}function xn(){this.input=null,this.extremalPts=null,this.centre=null,this.radius=0;var t=arguments[0];this.input=t}function ee(){if(this.inputGeom=null,this.isConvex=null,this.convexHullPts=null,this.minBaseSeg=new dt,this.minWidthPt=null,this.minPtIndex=null,this.minWidth=0,arguments.length===1){var t=arguments[0];ee.call(this,t,!1)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.inputGeom=e,this.isConvex=n}}function Tn(){this.inputGeom=null,this.distanceTolerance=null;var t=arguments[0];this.inputGeom=t}function Hr(){oe.apply(this),this.distanceTolerance=null;var t=arguments[0];this.distanceTolerance=t}function hn(){this._orig=null,this._sym=null,this._next=null;var t=arguments[0];this._orig=t}function pe(){this._isMarked=!1;var t=arguments[0];hn.call(this,t)}function yr(){this.vertexMap=new nn}function Hi(){this._isStart=!1;var t=arguments[0];pe.call(this,t)}function Wi(){yr.apply(this)}function Wr(){this.result=null,this.factory=null,this.graph=null,this.lines=new C,this.nodeEdgeStack=new re,this.ringStartEdge=null,this.graph=new Wi}function Ze(){this.items=new C,this.subnode=new Array(4).fill(null)}function Zr(){this.pt=new v,this.level=0,this.env=null;var t=arguments[0];this.computeKey(t)}function En(){Ze.apply(this),this.env=null,this.centrex=null,this.centrey=null,this.level=null;var t=arguments[0],e=arguments[1];this.env=t,this.level=e,this.centrex=(t.getMinX()+t.getMaxX())/2,this.centrey=(t.getMinY()+t.getMaxY())/2}function Kn(){Ze.apply(this)}function On(){this.root=null,this.minExtent=1,this.root=new Kn}function Ws(t){this.geometryFactory=t||new yt}function So(t){this.geometryFactory=t||new yt,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new Ws(this.geometryFactory)}function Lo(){this.parser=new Ws(this.geometryFactory)}function Ro(t){this.geometryFactory=t||new yt,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new Ts(this.geometryFactory)}function Jr(t){return[t.x,t.y]}function bo(t,e){this.geometryFactory=t||new yt,this.ol=e||typeof ol<"u"&&ol}function jr(){if(this.noder=null,this.scaleFactor=null,this.offsetX=null,this.offsetY=null,this.isScaled=!1,arguments.length===2){var t=arguments[0],e=arguments[1];jr.call(this,t,e,0,0)}else if(arguments.length===4){var n=arguments[0],r=arguments[1];this.noder=n,this.scaleFactor=r,this.isScaled=!this.isIntegerPrecision()}}function Kr(){if(this.inputGeom=null,this.isClosedEndpointsInInterior=!0,this.nonSimpleLocation=null,arguments.length===1){var t=arguments[0];this.inputGeom=t}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.inputGeom=e,this.isClosedEndpointsInInterior=!n.isInBoundary(2)}}function Zi(){this.pt=null,this.isClosed=null,this.degree=null;var t=arguments[0];this.pt=t,this.isClosed=!1,this.degree=0}function Ct(){if(this.quadrantSegments=Ct.DEFAULT_QUADRANT_SEGMENTS,this.endCapStyle=Ct.CAP_ROUND,this.joinStyle=Ct.JOIN_ROUND,this.mitreLimit=Ct.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this.simplifyFactor=Ct.DEFAULT_SIMPLIFY_FACTOR,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.setQuadrantSegments(t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.setQuadrantSegments(e),this.setEndCapStyle(n)}else if(arguments.length===4){var r=arguments[0],s=arguments[1],o=arguments[2],l=arguments[3];this.setQuadrantSegments(r),this.setEndCapStyle(s),this.setJoinStyle(o),this.setMitreLimit(l)}}}function Zs(){this.minIndex=-1,this.minCoord=null,this.minDe=null,this.orientedDe=null}function Ji(){this.array_=[]}function Js(){this.finder=null,this.dirEdgeList=new C,this.nodes=new C,this.rightMostCoord=null,this.env=null,this.finder=new Zs}function jt(){this.inputLine=null,this.distanceTol=null,this.isDeleted=null,this.angleOrientation=nt.COUNTERCLOCKWISE;var t=arguments[0];this.inputLine=t}function Qr(){this.ptList=null,this.precisionModel=null,this.minimimVertexDistance=0,this.ptList=new C}function Je(){this.maxCurveSegmentError=0,this.filletAngleQuantum=null,this.closingSegLengthFactor=1,this.segList=null,this.distance=0,this.precisionModel=null,this.bufParams=null,this.li=null,this.s0=null,this.s1=null,this.s2=null,this.seg0=new dt,this.seg1=new dt,this.offset0=new dt,this.offset1=new dt,this.side=0,this._hasNarrowConcaveAngle=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this.precisionModel=t,this.bufParams=e,this.li=new Ht,this.filletAngleQuantum=Math.PI/2/e.getQuadrantSegments(),e.getQuadrantSegments()>=8&&e.getJoinStyle()===Ct.JOIN_ROUND&&(this.closingSegLengthFactor=Je.MAX_CLOSING_SEG_LEN_FACTOR),this.init(n)}function $r(){this.distance=0,this.precisionModel=null,this.bufParams=null;var t=arguments[0],e=arguments[1];this.precisionModel=t,this.bufParams=e}function ji(){this.subgraphs=null,this.seg=new dt,this.cga=new nt;var t=arguments[0];this.subgraphs=t}function Ki(){this.upwardSeg=null,this.leftDepth=null;var t=arguments[0],e=arguments[1];this.upwardSeg=new dt(t),this.leftDepth=e}function js(){this.inputGeom=null,this.distance=null,this.curveBuilder=null,this.curveList=new C;var t=arguments[0],e=arguments[1],n=arguments[2];this.inputGeom=t,this.distance=e,this.curveBuilder=n}function ti(){this._hasIntersection=!1,this.hasProper=!1,this.hasProperInterior=!1,this.hasInterior=!1,this.properIntersectionPoint=null,this.li=null,this.isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var t=arguments[0];this.li=t}function _n(){this.bufParams=null,this.workingPrecisionModel=null,this.workingNoder=null,this.geomFact=null,this.graph=null,this.edgeList=new Xi;var t=arguments[0];this.bufParams=t}function ei(){this.li=new Ht,this.segStrings=null;var t=arguments[0];this.segStrings=t}function xr(){this.li=null,this.pt=null,this.originalPt=null,this.ptScaled=null,this.p0Scaled=null,this.p1Scaled=null,this.scaleFactor=null,this.minx=null,this.maxx=null,this.miny=null,this.maxy=null,this.corner=new Array(4).fill(null),this.safeEnv=null;var t=arguments[0],e=arguments[1],n=arguments[2];if(this.originalPt=t,this.pt=t,this.scaleFactor=e,this.li=n,e<=0)throw new a;e!==1&&(this.pt=new v(this.scale(t.x),this.scale(t.y)),this.p0Scaled=new v,this.p1Scaled=new v),this.initCorners(this.pt)}function Qi(){this.index=null;var t=arguments[0];this.index=t}function ni(){Mn.apply(this),this.hotPixel=null,this.parentEdge=null,this.hotPixelVertexIndex=null,this._isNodeAdded=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this.hotPixel=t,this.parentEdge=e,this.hotPixelVertexIndex=n}function Ks(){this.li=null,this.interiorIntersections=null;var t=arguments[0];this.li=t,this.interiorIntersections=new C}function Qs(){this.pm=null,this.li=null,this.scaleFactor=null,this.noder=null,this.pointSnapper=null,this.nodedSegStrings=null;var t=arguments[0];this.pm=t,this.li=new Ht,this.li.setPrecisionModel(t),this.scaleFactor=t.getScale()}function Kt(){if(this.argGeom=null,this.distance=null,this.bufParams=new Ct,this.resultGeometry=null,this.saveException=null,arguments.length===1){var t=arguments[0];this.argGeom=t}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.argGeom=e,this.bufParams=n}}function Qn(){this.comps=null;var t=arguments[0];this.comps=t}function me(){if(this.component=null,this.segIndex=null,this.pt=null,arguments.length===2){var t=arguments[0],e=arguments[1];me.call(this,t,me.INSIDE_AREA,e)}else if(arguments.length===3){var n=arguments[0],r=arguments[1],s=arguments[2];this.component=n,this.segIndex=r,this.pt=s}}function $n(){this.pts=null;var t=arguments[0];this.pts=t}function ri(){this.locations=null;var t=arguments[0];this.locations=t}function qe(){if(this.geom=null,this.terminateDistance=0,this.ptLocator=new Un,this.minDistanceLocation=null,this.minDistance=c.MAX_VALUE,arguments.length===2){var t=arguments[0],e=arguments[1];qe.call(this,t,e,0)}else if(arguments.length===3){var n=arguments[0],r=arguments[1],s=arguments[2];this.geom=new Array(2).fill(null),this.geom[0]=n,this.geom[1]=r,this.terminateDistance=s}}function $s(){this.factory=null,this.directedEdges=new C,this.coordinates=null;var t=arguments[0];this.factory=t}function Pe(){this._isMarked=!1,this._isVisited=!1,this.data=null}function Ce(){Pe.apply(this),this.parentEdge=null,this.from=null,this.to=null,this.p0=null,this.p1=null,this.sym=null,this.edgeDirection=null,this.quadrant=null,this.angle=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this.from=t,this.to=e,this.edgeDirection=r,this.p0=t.getCoordinate(),this.p1=n;var s=this.p1.x-this.p0.x,o=this.p1.y-this.p0.y;this.quadrant=Nt.quadrant(s,o),this.angle=Math.atan2(o,s)}function ii(){var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];Ce.call(this,t,e,n,r)}function je(){if(Pe.apply(this),this.dirEdge=null,arguments.length!==0){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.setDirectedEdges(t,e)}}}function to(){this.outEdges=new C,this.sorted=!1}function cn(){if(Pe.apply(this),this.pt=null,this.deStar=null,arguments.length===1){var t=arguments[0];cn.call(this,t,new to)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.pt=e,this.deStar=n}}function $i(){je.apply(this),this.line=null;var t=arguments[0];this.line=t}function eo(){this.nodeMap=new Vt}function Er(){this.edges=new Rt,this.dirEdges=new Rt,this.nodeMap=new eo}function ts(){Er.apply(this)}function no(){this.graph=new ts,this.mergedLineStrings=null,this.factory=null,this.edgeStrings=null}function si(){this.edgeRing=null,this.next=null,this.label=-1;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];Ce.call(this,t,e,n,r)}function es(){je.apply(this),this.line=null;var t=arguments[0];this.line=t}function oi(){this.geometryFactory=new yt,this.geomGraph=null,this.disconnectedRingcoord=null;var t=arguments[0];this.geomGraph=t}function ns(){}function ai(){if(this.edgeEnds=new C,arguments.length===1){var t=arguments[0];ai.call(this,null,t)}else if(arguments.length===2){var e=arguments[1];Ye.call(this,e.getEdge(),e.getCoordinate(),e.getDirectedCoordinate(),new Bt(e.getLabel())),this.insert(e)}}function rs(){Zn.apply(this)}function is(){var t=arguments[0],e=arguments[1];an.call(this,t,e)}function ui(){Wn.apply(this)}function ro(){this.nodes=new gr(new ui)}function ss(){this.li=new Ht,this.geomGraph=null,this.nodeGraph=new ro,this.invalidPoint=null;var t=arguments[0];this.geomGraph=t}function io(){this.graph=null,this.rings=new C,this.totalEnv=new B,this.index=null,this.nestedPt=null;var t=arguments[0];this.graph=t}function It(){if(this.errorType=null,this.pt=null,arguments.length===1){var t=arguments[0];It.call(this,t,null)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.errorType=e,n!==null&&(this.pt=n.copy())}}function we(){this.parentGeometry=null,this.isSelfTouchingRingFormingHoleValid=!1,this.validErr=null;var t=arguments[0];this.parentGeometry=t}function Ge(){this.factory=null,this.deList=new C,this.lowestEdge=null,this.ring=null,this.ringPts=null,this.holes=null,this.shell=null,this._isHole=null,this._isProcessed=!1,this._isIncludedSet=!1,this._isIncluded=!1;var t=arguments[0];this.factory=t}function so(){}function Ut(){Er.apply(this),this.factory=null;var t=arguments[0];this.factory=t}function ve(){if(this.lineStringAdder=new os(this),this.graph=null,this.dangles=new C,this.cutEdges=new C,this.invalidRingLines=new C,this.holeList=null,this.shellList=null,this.polyList=null,this.isCheckingRingsValid=!0,this.extractOnlyPolygonal=null,this.geomFactory=null,arguments.length===0)ve.call(this,!1);else if(arguments.length===1){var t=arguments[0];this.extractOnlyPolygonal=t}}function os(){this.p=null;var t=arguments[0];this.p=t}function as(){this.li=new Ht,this.ptLocator=new Un,this.arg=null,this.nodes=new gr(new ui),this.im=null,this.isolatedEdges=new C,this.invalidPoint=null;var t=arguments[0];this.arg=t}function li(){this.rectEnv=null;var t=arguments[0];this.rectEnv=t.getEnvelopeInternal()}function oo(){this.li=new Ht,this.rectEnv=null,this.diagUp0=null,this.diagUp1=null,this.diagDown0=null,this.diagDown1=null;var t=arguments[0];this.rectEnv=t,this.diagUp0=new v(t.getMinX(),t.getMinY()),this.diagUp1=new v(t.getMaxX(),t.getMaxY()),this.diagDown0=new v(t.getMinX(),t.getMaxY()),this.diagDown1=new v(t.getMaxX(),t.getMinY())}function An(){this._isDone=!1}function Ir(){this.rectangle=null,this.rectEnv=null;var t=arguments[0];this.rectangle=t,this.rectEnv=t.getEnvelopeInternal()}function us(){An.apply(this),this.rectEnv=null,this._intersects=!1;var t=arguments[0];this.rectEnv=t}function ls(){An.apply(this),this.rectSeq=null,this.rectEnv=null,this._containsPoint=!1;var t=arguments[0];this.rectSeq=t.getExteriorRing().getCoordinateSequence(),this.rectEnv=t.getEnvelopeInternal()}function hs(){An.apply(this),this.rectEnv=null,this.rectIntersector=null,this.hasIntersection=!1,this.p0=new v,this.p1=new v;var t=arguments[0];this.rectEnv=t.getEnvelopeInternal(),this.rectIntersector=new oo(this.rectEnv)}function wt(){if(this._relate=null,arguments.length===2){var t=arguments[0],e=arguments[1];Rn.call(this,t,e),this._relate=new as(this.arg)}else if(arguments.length===3){var n=arguments[0],r=arguments[1],s=arguments[2];Rn.call(this,n,r,s),this._relate=new as(this.arg)}}function Se(){this.geomFactory=null,this.skipEmpty=!1,this.inputGeoms=null;var t=arguments[0];this.geomFactory=Se.extractFactory(t),this.inputGeoms=t}function hi(){this.pointGeom=null,this.otherGeom=null,this.geomFact=null;var t=arguments[0],e=arguments[1];this.pointGeom=t,this.otherGeom=e,this.geomFact=e.getFactory()}function Dn(){this.sortIndex=-1,this.comps=null;var t=arguments[0],e=arguments[1];this.sortIndex=t,this.comps=e}function Te(){this.inputPolys=null,this.geomFactory=null;var t=arguments[0];this.inputPolys=t,this.inputPolys===null&&(this.inputPolys=new C)}function Fn(){if(this.polygons=new C,this.lines=new C,this.points=new C,this.geomFact=null,arguments.length===1){if(X(arguments[0],w)){var t=arguments[0];this.extract(t)}else if(arguments[0]instanceof Q){var e=arguments[0];this.extract(e)}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];this.geomFact=r,this.extract(n)}}function cs(){xe.CoordinateOperation.apply(this),this.targetPM=null,this.removeCollapsed=!0;var t=arguments[0],e=arguments[1];this.targetPM=t,this.removeCollapsed=e}function tr(){this.targetPM=null,this.removeCollapsed=!0,this.changePrecisionModel=!1,this.isPointwise=!1;var t=arguments[0];this.targetPM=t}function ci(){this.pts=null,this.usePt=null,this.distanceTolerance=null,this.seg=new dt;var t=arguments[0];this.pts=t}function Nr(){this.inputGeom=null,this.distanceTolerance=null,this.isEnsureValidTopology=!0;var t=arguments[0];this.inputGeom=t}function fi(){oe.apply(this),this.isEnsureValidTopology=!0,this.distanceTolerance=null;var t=arguments[0],e=arguments[1];this.isEnsureValidTopology=t,this.distanceTolerance=e}function gi(){if(this.parent=null,this.index=null,arguments.length===2){var t=arguments[0],e=arguments[1];gi.call(this,t,e,null,-1)}else if(arguments.length===4){var n=arguments[0],r=arguments[1],s=arguments[2],o=arguments[3];dt.call(this,n,r),this.parent=s,this.index=o}}function In(){if(this.parentLine=null,this.segs=null,this.resultSegs=new C,this.minimumSize=null,arguments.length===1){var t=arguments[0];In.call(this,t,2)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.parentLine=e,this.minimumSize=n,this.init()}}function Cr(){this.index=new On}function ao(){this.querySeg=null,this.items=new C;var t=arguments[0];this.querySeg=t}function di(){this.li=new Ht,this.inputIndex=new Cr,this.outputIndex=new Cr,this.line=null,this.linePts=null,this.distanceTolerance=0;var t=arguments[0],e=arguments[1];this.inputIndex=t,this.outputIndex=e}function uo(){this.inputIndex=new Cr,this.outputIndex=new Cr,this.distanceTolerance=0}function er(){this.inputGeom=null,this.lineSimplifier=new uo,this.linestringMap=null;var t=arguments[0];this.inputGeom=t}function pi(){oe.apply(this),this.linestringMap=null;var t=arguments[0];this.linestringMap=t}function fs(){this.tps=null;var t=arguments[0];this.tps=t}function wr(){this.seg=null,this.segLen=null,this.splitPt=null,this.minimumLen=0;var t=arguments[0];this.seg=t,this.segLen=t.getLength()}function lo(){}function mi(){}function _t(){}function Lt(){if(this.p=null,arguments.length===1){var t=arguments[0];this.p=new v(t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.p=new v(e,n)}else if(arguments.length===3){var r=arguments[0],s=arguments[1],o=arguments[2];this.p=new v(r,s,o)}}function qn(){this._isOnConstraint=null,this.constraint=null;var t=arguments[0];Lt.call(this,t)}function Ft(){this._rot=null,this.vertex=null,this.next=null,this.data=null}function vi(){this.subdiv=null,this.isUsingTolerance=!1;var t=arguments[0];this.subdiv=t,this.isUsingTolerance=t.getTolerance()>0}function ho(){}function gs(){this.subdiv=null,this.lastEdge=null;var t=arguments[0];this.subdiv=t,this.init()}function Sr(){if(this.seg=null,arguments.length===1){if(typeof arguments[0]=="string"){var t=arguments[0];N.call(this,t)}else if(arguments[0]instanceof dt){var e=arguments[0];N.call(this,"Locate failed to converge (at edge: "+e+"). Possible causes include invalid Subdivision topology or very close sites"),this.seg=new dt(e)}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];N.call(this,Sr.msgWithSpatial(n,r)),this.seg=new dt(r)}}function Lr(){}function Le(){this.visitedKey=0,this.quadEdges=new C,this.startingEdge=null,this.tolerance=null,this.edgeCoincidenceTolerance=null,this.frameVertex=new Array(3).fill(null),this.frameEnv=null,this.locator=null,this.seg=new dt,this.triEdges=new Array(3).fill(null);var t=arguments[0],e=arguments[1];this.tolerance=e,this.edgeCoincidenceTolerance=e/Le.EDGE_COINCIDENCE_TOL_FACTOR,this.createFrame(t),this.startingEdge=this.initSubdiv(),this.locator=new gs(this)}function ds(){}function ps(){this.triList=new C}function ms(){this.triList=new C}function vs(){this.coordList=new q,this.triCoords=new C}function nr(){if(this.ls=null,this.data=null,arguments.length===2){var t=arguments[0],e=arguments[1];this.ls=new dt(t,e)}else if(arguments.length===3){var n=arguments[0],r=arguments[1],s=arguments[2];this.ls=new dt(n,r),this.data=s}else if(arguments.length===6){var o=arguments[0],l=arguments[1],x=arguments[2],A=arguments[3],V=arguments[4],Z=arguments[5];nr.call(this,new v(o,l,x),new v(A,V,Z))}else if(arguments.length===7){var K=arguments[0],$=arguments[1],ut=arguments[2],ft=arguments[3],gt=arguments[4],Ot=arguments[5],Xt=arguments[6];nr.call(this,new v(K,$,ut),new v(ft,gt,Ot),Xt)}}function yi(){}function ys(){if(this.p=null,this.data=null,this.left=null,this.right=null,this.count=null,arguments.length===2){var t=arguments[0],e=arguments[1];this.p=new v(t),this.left=null,this.right=null,this.count=1,this.data=e}else if(arguments.length===3){var n=arguments[0],r=arguments[1],s=arguments[2];this.p=new v(n,r),this.left=null,this.right=null,this.count=1,this.data=s}}function rr(){if(this.root=null,this.numberOfNodes=null,this.tolerance=null,arguments.length===0)rr.call(this,0);else if(arguments.length===1){var t=arguments[0];this.tolerance=t}}function xs(){this.tolerance=null,this.matchNode=null,this.matchDist=0,this.p=null;var t=arguments[0],e=arguments[1];this.p=t,this.tolerance=e}function Gn(){this.initialVertices=null,this.segVertices=null,this.segments=new C,this.subdiv=null,this.incDel=null,this.convexHull=null,this.splitFinder=new mi,this.kdt=null,this.vertexFactory=null,this.computeAreaEnv=null,this.splitPt=null,this.tolerance=null;var t=arguments[0],e=arguments[1];this.initialVertices=new C(t),this.tolerance=e,this.kdt=new rr(e)}function ne(){this.siteCoords=null,this.tolerance=0,this.subdiv=null}function Rr(){this.siteCoords=null,this.constraintLines=null,this.tolerance=0,this.subdiv=null,this.constraintVertexMap=new Vt}function xi(){this.siteCoords=null,this.tolerance=0,this.subdiv=null,this.clipEnv=null,this.diagramEnv=null}function Es(){}"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(t){if(this===void 0||this===null)throw new TypeError(this+" is not an object");var e=Object(this),n=Math.max(Math.min(e.length,9007199254740991),0)||0,r=1 in arguments&&parseInt(Number(arguments[1]),10)||0;r=r<0?Math.max(n+r,0):Math.min(r,n);var s=2 in arguments&&arguments[2]!==void 0?parseInt(Number(arguments[2]),10)||0:n;for(s=s<0?Math.max(n+arguments[2],0):Math.min(s,n);re.x?1:this.ye.y?1:0},clone:function(){try{var t=null;return t}catch(e){if(e instanceof CloneNotSupportedException)return I.shouldNeverReachHere("this shouldn't happen because this class is Cloneable"),null;throw e}finally{}},copy:function(){return new v(this)},toString:function(){return"("+this.x+", "+this.y+", "+this.z+")"},distance3D:function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return Math.sqrt(e*e+n*n+r*r)},distance:function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},hashCode:function(){var t=17;return t=37*t+v.hashCode(this.x),t=37*t+v.hashCode(this.y)},setCoordinate:function(t){this.x=t.x,this.y=t.y,this.z=t.z},interfaces_:function(){return[f,p,m]},getClass:function(){return v}}),v.hashCode=function(){if(arguments.length===1){var t=arguments[0],e=c.doubleToLongBits(t);return Math.trunc(e^e>>>32)}},d(M.prototype,{compare:function(t,e){var n=t,r=e,s=M.compare(n.x,r.x);if(s!==0)return s;var o=M.compare(n.y,r.y);if(o!==0)return o;if(this.dimensionsToTest<=2)return 0;var l=M.compare(n.z,r.z);return l},interfaces_:function(){return[g]},getClass:function(){return M}}),M.compare=function(t,e){return te?1:c.isNaN(t)?c.isNaN(e)?0:-1:c.isNaN(e)?1:0},v.DimensionalComparator=M,v.serialVersionUID=6683108902428367e3,v.NULL_ORDINATE=c.NaN,v.X=0,v.Y=1,v.Z=2,T.prototype.hasNext=function(){},T.prototype.next=function(){},T.prototype.remove=function(){},w.prototype.add=function(){},w.prototype.addAll=function(){},w.prototype.isEmpty=function(){},w.prototype.iterator=function(){},w.prototype.size=function(){},w.prototype.toArray=function(){},w.prototype.remove=function(){},b.prototype=new Error,b.prototype.name="IndexOutOfBoundsException",P.prototype=Object.create(w.prototype),P.prototype.constructor=P,P.prototype.get=function(){},P.prototype.set=function(){},P.prototype.isEmpty=function(){},O.prototype=new Error,O.prototype.name="NoSuchElementException",D.prototype=new Error,D.prototype.name="OperationNotSupported",C.prototype=Object.create(P.prototype),C.prototype.constructor=C,C.prototype.ensureCapacity=function(){},C.prototype.interfaces_=function(){return[P,w]},C.prototype.add=function(t){return arguments.length===1?this.array_.push(t):this.array_.splice(arguments[0],arguments[1]),!0},C.prototype.clear=function(){this.array_=[]},C.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},C.prototype.set=function(t,e){var n=this.array_[t];return this.array_[t]=e,n},C.prototype.iterator=function(){return new Ei(this)},C.prototype.get=function(t){if(t<0||t>=this.size())throw new b;return this.array_[t]},C.prototype.isEmpty=function(){return this.array_.length===0},C.prototype.size=function(){return this.array_.length},C.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e=1){var o=this.get(this.size()-1);if(o.equals2D(r))return null}C.prototype.add.call(this,r)}else if(arguments[0]instanceof Object&&typeof arguments[1]=="boolean"){var l=arguments[0],x=arguments[1];return this.add(l,x),!0}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var A=arguments[0],V=arguments[1],Z=arguments[2];if(Z)for(var K=0;K=0;K--)this.add(A[K],V);return!0}if(typeof arguments[2]=="boolean"&&Number.isInteger(arguments[0])&&arguments[1]instanceof v){var $=arguments[0],ut=arguments[1],ft=arguments[2];if(!ft){var gt=this.size();if(gt>0){if($>0){var Ot=this.get($-1);if(Ot.equals2D(ut))return null}if($ws&&(Ss=-1);for(var K=Cs;K!==ws;K+=Ss)this.add(Ve[K],ir);return!0}},closeRing:function(){this.size()>0&&this.add(new v(this.get(0)),!1)},interfaces_:function(){return[]},getClass:function(){return q}}),q.coordArrayType=new Array(0).fill(null),d(B.prototype,{getArea:function(){return this.getWidth()*this.getHeight()},equals:function(t){if(!(t instanceof B))return!1;var e=t;return this.isNull()?e.isNull():this.maxx===e.getMaxX()&&this.maxy===e.getMaxY()&&this.minx===e.getMinX()&&this.miny===e.getMinY()},intersection:function(t){if(this.isNull()||t.isNull()||!this.intersects(t))return new B;var e=this.minx>t.minx?this.minx:t.minx,n=this.miny>t.miny?this.miny:t.miny,r=this.maxx=this.minx&&e.getMaxX()<=this.maxx&&e.getMinY()>=this.miny&&e.getMaxY()<=this.maxy}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];return!this.isNull()&&n>=this.minx&&n<=this.maxx&&r>=this.miny&&r<=this.maxy}},intersects:function(){if(arguments.length===1){if(arguments[0]instanceof B){var t=arguments[0];return!this.isNull()&&!t.isNull()&&!(t.minx>this.maxx||t.maxxthis.maxy||t.maxythis.maxx||nthis.maxy||rthis.maxx&&(this.maxx=e.maxx),e.minythis.maxy&&(this.maxy=e.maxy))}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];this.isNull()?(this.minx=n,this.maxx=n,this.miny=r,this.maxy=r):(nthis.maxx&&(this.maxx=n),rthis.maxy&&(this.maxy=r))}},minExtent:function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return te.minx?1:this.minye.miny?1:this.maxxe.maxx?1:this.maxye.maxy?1:0},translate:function(t,e){return this.isNull()?null:void this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},toString:function(){return"Env["+this.minx+" : "+this.maxx+", "+this.miny+" : "+this.maxy+"]"},setToNull:function(){this.minx=0,this.maxx=-1,this.miny=0,this.maxy=-1},getHeight:function(){return this.isNull()?0:this.maxy-this.miny},maxExtent:function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},expandBy:function(){if(arguments.length===1){var t=arguments[0];this.expandBy(t,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this.isNull())return null;this.minx-=e,this.maxx+=e,this.miny-=n,this.maxy+=n,(this.minx>this.maxx||this.miny>this.maxy)&&this.setToNull()}},contains:function(){if(arguments.length===1){if(arguments[0]instanceof B){var t=arguments[0];return this.covers(t)}if(arguments[0]instanceof v){var e=arguments[0];return this.covers(e)}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];return this.covers(n,r)}},centre:function(){return this.isNull()?null:new v((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},init:function(){if(arguments.length===0)this.setToNull();else if(arguments.length===1){if(arguments[0]instanceof v){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof B){var e=arguments[0];this.minx=e.minx,this.maxx=e.maxx,this.miny=e.miny,this.maxy=e.maxy}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];this.init(n.x,r.x,n.y,r.y)}else if(arguments.length===4){var s=arguments[0],o=arguments[1],l=arguments[2],x=arguments[3];st.maxx&&(e=this.minx-t.maxx);var n=0;return this.maxyt.maxy&&(n=this.miny-t.maxy),e===0?n:n===0?e:Math.sqrt(e*e+n*n)},hashCode:function(){var t=17;return t=37*t+v.hashCode(this.minx),t=37*t+v.hashCode(this.maxx),t=37*t+v.hashCode(this.miny),t=37*t+v.hashCode(this.maxy)},interfaces_:function(){return[f,m]},getClass:function(){return B}}),B.intersects=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],n=arguments[2];return n.x>=(t.xe.x?t.x:e.x)&&n.y>=(t.ye.y?t.y:e.y)}if(arguments.length===4){var r=arguments[0],s=arguments[1],o=arguments[2],l=arguments[3],x=Math.min(o.x,l.x),A=Math.max(o.x,l.x),V=Math.min(r.x,s.x),Z=Math.max(r.x,s.x);return!(V>A)&&!(ZA)&&!(Zn?n:t}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var r=arguments[0],s=arguments[1],o=arguments[2];return ro?o:r}},ot.wrap=function(t,e){return t<0?e- -t%e:t%e},ot.max=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],n=arguments[2],r=t;return e>r&&(r=e),n>r&&(r=n),r}if(arguments.length===4){var s=arguments[0],o=arguments[1],l=arguments[2],x=arguments[3],r=s;return o>r&&(r=o),l>r&&(r=l),x>r&&(r=x),r}},ot.average=function(t,e){return(t+e)/2},ot.LOG_10=Math.log(10),F.prototype.append=function(t){this.str+=t},F.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},F.prototype.toString=function(t){return this.str},Y.prototype.intValue=function(){return this.value},Y.prototype.compareTo=function(t){return this.valuet?1:0},Y.isNaN=function(t){return Number.isNaN(t)},H.isWhitespace=function(t){return t<=32&&t>=0||t==127},H.toUpperCase=function(t){return t.toUpperCase()},d(z.prototype,{le:function(t){return this.hi9?(Z=!0,K="9"):K="0"+V,l.append(K),n=n.subtract(z.valueOf(V)).multiply(z.TEN),Z&&n.selfAdd(z.TEN);var $=!0,ut=z.magnitude(n.hi);if(ut<0&&Math.abs(ut)>=x-A&&($=!1),!$)break}return e[0]=r,l.toString()},sqr:function(){return this.multiply(this)},doubleValue:function(){return this.hi+this.lo},subtract:function(){if(arguments[0]instanceof z){var t=arguments[0];return this.add(t.negate())}if(typeof arguments[0]=="number"){var e=arguments[0];return this.add(-e)}},equals:function(){if(arguments.length===1){var t=arguments[0];return this.hi===t.hi&&this.lo===t.lo}},isZero:function(){return this.hi===0&&this.lo===0},selfSubtract:function(){if(arguments[0]instanceof z){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t.hi,-t.lo)}if(typeof arguments[0]=="number"){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},getSpecialNumberString:function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},min:function(t){return this.le(t)?this:t},selfDivide:function(){if(arguments.length===1){if(arguments[0]instanceof z){var t=arguments[0];return this.selfDivide(t.hi,t.lo)}if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfDivide(e,0)}}else if(arguments.length===2){var n=arguments[0],r=arguments[1],s=null,o=null,l=null,x=null,A=null,V=null,Z=null,K=null;return A=this.hi/n,V=z.SPLIT*A,s=V-A,K=z.SPLIT*n,s=V-s,o=A-s,l=K-n,Z=A*n,l=K-l,x=n-l,K=s*l-Z+s*x+o*l+o*x,V=(this.hi-Z-K+this.lo-A*r)/n,K=A+V,this.hi=K,this.lo=A-K+V,this}},dump:function(){return"DD<"+this.hi+", "+this.lo+">"},divide:function(){if(arguments[0]instanceof z){var t=arguments[0],e=null,n=null,r=null,s=null,o=null,l=null,x=null,A=null;o=this.hi/t.hi,l=z.SPLIT*o,e=l-o,A=z.SPLIT*t.hi,e=l-e,n=o-e,r=A-t.hi,x=o*t.hi,r=A-r,s=t.hi-r,A=e*r-x+e*s+n*r+n*s,l=(this.hi-x-A+this.lo-o*t.lo)/t.hi,A=o+l;var V=A,Z=o-A+l;return new z(V,Z)}if(typeof arguments[0]=="number"){var K=arguments[0];return c.isNaN(K)?z.createNaN():z.copy(this).selfDivide(K,0)}},ge:function(t){return this.hi>t.hi||this.hi===t.hi&&this.lo>=t.lo},pow:function(t){if(t===0)return z.valueOf(1);var e=new z(this),n=z.valueOf(1),r=Math.abs(t);if(r>1)for(;r>0;)r%2===1&&n.selfMultiply(e),r/=2,r>0&&(e=e.sqr());else n=e;return t<0?n.reciprocal():n},ceil:function(){if(this.isNaN())return z.NaN;var t=Math.ceil(this.hi),e=0;return t===this.hi&&(e=Math.ceil(this.lo)),new z(t,e)},compareTo:function(t){var e=t;return this.hie.hi?1:this.loe.lo?1:0},rint:function(){if(this.isNaN())return this;var t=this.add(.5);return t.floor()},setValue:function(){if(arguments[0]instanceof z){var t=arguments[0];return this.init(t),this}if(typeof arguments[0]=="number"){var e=arguments[0];return this.init(e),this}},max:function(t){return this.ge(t)?this:t},sqrt:function(){if(this.isZero())return z.valueOf(0);if(this.isNegative())return z.NaN;var t=1/Math.sqrt(this.hi),e=this.hi*t,n=z.valueOf(e),r=this.subtract(n.sqr()),s=r.hi*(.5*t);return n.add(s)},selfAdd:function(){if(arguments.length===1){if(arguments[0]instanceof z){var t=arguments[0];return this.selfAdd(t.hi,t.lo)}if(typeof arguments[0]=="number"){var e=arguments[0],n=null,r=null,s=null,o=null,l=null,x=null;return s=this.hi+e,l=s-this.hi,o=s-l,o=e-l+(this.hi-o),x=o+this.lo,n=s+x,r=x+(s-n),this.hi=n+r,this.lo=r+(n-this.hi),this}}else if(arguments.length===2){var A=arguments[0],V=arguments[1],n=null,r=null,Z=null,K=null,s=null,o=null,l=null,x=null;s=this.hi+A,Z=this.lo+V,l=s-this.hi,x=Z-this.lo,o=s-l,K=Z-x,o=A-l+(this.hi-o),K=V-x+(this.lo-K),l=o+Z,n=s+l,r=l+(s-n),l=K+r;var $=n+l,ut=l+(n-$);return this.hi=$,this.lo=ut,this}},selfMultiply:function(){if(arguments.length===1){if(arguments[0]instanceof z){var t=arguments[0];return this.selfMultiply(t.hi,t.lo)}if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfMultiply(e,0)}}else if(arguments.length===2){var n=arguments[0],r=arguments[1],s=null,o=null,l=null,x=null,A=null,V=null;A=z.SPLIT*this.hi,s=A-this.hi,V=z.SPLIT*n,s=A-s,o=this.hi-s,l=V-n,A=this.hi*n,l=V-l,x=n-l,V=s*l-A+s*x+o*l+o*x+(this.hi*r+this.lo*n);var Z=A+V;s=A-Z;var K=V+s;return this.hi=Z,this.lo=K,this}},selfSqr:function(){return this.selfMultiply(this)},floor:function(){if(this.isNaN())return z.NaN;var t=Math.floor(this.hi),e=0;return t===this.hi&&(e=Math.floor(this.lo)),new z(t,e)},negate:function(){return this.isNaN()?this:new z(-this.hi,-this.lo)},clone:function(){try{return null}catch(t){if(t instanceof CloneNotSupportedException)return null;throw t}finally{}},multiply:function(){if(arguments[0]instanceof z){var t=arguments[0];return t.isNaN()?z.createNaN():z.copy(this).selfMultiply(t)}if(typeof arguments[0]=="number"){var e=arguments[0];return c.isNaN(e)?z.createNaN():z.copy(this).selfMultiply(e,0)}},isNaN:function(){return c.isNaN(this.hi)},intValue:function(){return Math.trunc(this.hi)},toString:function(){var t=z.magnitude(this.hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},toStandardNotation:function(){var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),r=e[0]+1,s=n;if(n.charAt(0)===".")s="0"+n;else if(r<0)s="0."+z.stringOfChar("0",-r)+n;else if(n.indexOf(".")===-1){var o=r-n.length,l=z.stringOfChar("0",o);s=n+l+".0"}return this.isNegative()?"-"+s:s},reciprocal:function(){var t=null,e=null,n=null,r=null,s=null,o=null,l=null,x=null;s=1/this.hi,o=z.SPLIT*s,t=o-s,x=z.SPLIT*this.hi,t=o-t,e=s-t,n=x-this.hi,l=s*this.hi,n=x-n,r=this.hi-n,x=t*n-l+t*r+e*n+e*r,o=(1-l-x-s*this.lo)/this.hi;var A=s+o,V=s-A+o;return new z(A,V)},toSciNotation:function(){if(this.isZero())return z.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),r=z.SCI_NOT_EXPONENT_CHAR+e[0];if(n.charAt(0)==="0")throw new IllegalStateException("Found leading zero: "+n);var s="";n.length>1&&(s=n.substring(1));var o=n.charAt(0)+"."+s;return this.isNegative()?"-"+o+r:o+r},abs:function(){return this.isNaN()?z.NaN:this.isNegative()?this.negate():new z(this)},isPositive:function(){return this.hi>0||this.hi===0&&this.lo>0},lt:function(t){return this.hit.hi||this.hi===t.hi&&this.lo>t.lo},isNegative:function(){return this.hi<0||this.hi===0&&this.lo<0},trunc:function(){return this.isNaN()?z.NaN:this.isPositive()?this.floor():this.ceil()},signum:function(){return this.hi>0?1:this.hi<0?-1:this.lo>0?1:this.lo<0?-1:0},interfaces_:function(){return[m,f,p]},getClass:function(){return z}}),z.sqr=function(t){return z.valueOf(t).selfMultiply(t)},z.valueOf=function(){if(typeof arguments[0]=="string"){var t=arguments[0];return z.parse(t)}if(typeof arguments[0]=="number"){var e=arguments[0];return new z(e)}},z.sqrt=function(t){return z.valueOf(t).sqrt()},z.parse=function(t){for(var e=0,n=t.length;H.isWhitespace(t.charAt(e));)e++;var r=!1;if(e=n);){var V=t.charAt(e);if(e++,H.isDigit(V)){var Z=V-"0";o.selfMultiply(z.TEN),o.selfAdd(Z),l++}else{if(V!=="."){if(V==="e"||V==="E"){var K=t.substring(e);try{A=Y.parseInt(K)}catch(gt){throw gt instanceof NumberFormatException?new NumberFormatException("Invalid exponent "+K+" in string "+t):gt}finally{}break}throw new NumberFormatException("Unexpected character '"+V+"' at position "+e+" in string "+t)}x=l}}var $=o,ut=l-x-A;if(ut===0)$=o;else if(ut>0){var ft=z.TEN.pow(ut);$=o.divide(ft)}else if(ut<0){var ft=z.TEN.pow(-ut);$=o.multiply(ft)}return r?$.negate():$},z.createNaN=function(){return new z(c.NaN,c.NaN)},z.copy=function(t){return new z(t)},z.magnitude=function(t){var e=Math.abs(t),n=Math.log(e)/Math.log(10),r=Math.trunc(Math.floor(n)),s=Math.pow(10,r);return 10*s<=e&&(r+=1),r},z.stringOfChar=function(t,e){for(var n=new F,r=0;r0){if(o<=0)return J.signum(l);r=s+o}else{if(!(s<0)||o>=0)return J.signum(l);r=-s-o}var x=J.DP_SAFE_EPSILON*r;return l>=x||-l>=x?J.signum(l):2},J.signum=function(t){return t>0?1:t<0?-1:0},J.DP_SAFE_EPSILON=1e-15,d(G.prototype,{setOrdinate:function(t,e,n){},size:function(){},getOrdinate:function(t,e){},getCoordinate:function(){},getCoordinateCopy:function(t){},getDimension:function(){},getX:function(t){},clone:function(){},expandEnvelope:function(t){},copy:function(){},getY:function(t){},toCoordinateArray:function(){},interfaces_:function(){return[p]},getClass:function(){return G}}),G.X=0,G.Y=1,G.Z=2,G.M=3,k.arraycopy=function(t,e,n,r,s){for(var o=0,l=e;l=m&&N===g.length-1);N++)if(m>=f){var y=f-m;if(y){var R=S(g[N],g[N-1])-180,I=a(g[N],y,R,p);return I}else return d(g[N])}else m+=_(g[N],g[N+1],p);return d(g[g.length-1])}},{"@turf/bearing":3,"@turf/destination":5,"@turf/distance":8,"@turf/helpers":11}],3:[function(h,E,u){var _=h("@turf/invariant").getCoord;function d(a,c,f){if(f===!0)return S(a,c);var p=Math.PI/180,g=180/Math.PI,m=_(a),N=_(c),y=p*m[0],R=p*N[0],I=p*m[1],v=p*N[1],M=Math.sin(R-y)*Math.cos(v),T=Math.cos(I)*Math.sin(v)-Math.sin(I)*Math.cos(v)*Math.cos(R-y),w=g*Math.atan2(M,T);return w}function S(a,c){var f=d(c,a);return f=(f+180)%360,f}E.exports=d},{"@turf/invariant":4}],4:[function(h,E,u){function _(p){if(!p)throw new Error("No obj passed");var g=d(p);if(g.length>1&&typeof g[0]=="number"&&typeof g[1]=="number")return g;throw new Error("Coordinate is not a valid Point")}function d(p){if(!p)throw new Error("No obj passed");var g;if(p.length?g=p:p.coordinates?g=p.coordinates:p.geometry&&p.geometry.coordinates&&(g=p.geometry.coordinates),g)return S(g),g;throw new Error("No valid coordinates")}function S(p){if(p.length>1&&typeof p[0]=="number"&&typeof p[1]=="number")return!0;if(p[0].length)return S(p[0]);throw new Error("coordinates must only contain numbers")}function a(p,g,m){if(!g||!m)throw new Error("type and name required");if(!p||p.type!==g)throw new Error("Invalid input to "+m+": must be a "+g+", given "+p.type)}function c(p,g,m){if(!p)throw new Error("No feature passed");if(!m)throw new Error(".featureOf() requires a name");if(!p||p.type!=="Feature"||!p.geometry)throw new Error("Invalid input to "+m+", Feature with geometry required");if(!p.geometry||p.geometry.type!==g)throw new Error("Invalid input to "+m+": must be a "+g+", given "+p.geometry.type)}function f(p,g,m){if(!p)throw new Error("No featureCollection passed");if(!m)throw new Error(".collectionOf() requires a name");if(!p||p.type!=="FeatureCollection")throw new Error("Invalid input to "+m+", FeatureCollection required");for(var N=0;N0){p+=Math.abs(a(f[0]));for(var g=1;g2){for(I=0;Ia[0]&&(S[0]=a[0]),S[1]>a[1]&&(S[1]=a[1]),S[2]d&&(S.push(c),a=f)}return S},_.prototype.vector=function(d){var S=this.pos(d+10),a=this.pos(d-10);return{angle:180*Math.atan2(S.y-a.y,S.x-a.x)/3.14,speed:Math.sqrt((a.x-S.x)*(a.x-S.x)+(a.y-S.y)*(a.y-S.y)+(a.z-S.z)*(a.z-S.z))}},_.prototype.pos=function(d){function S(g,m,N,y,R){var I=function(T){var w=T*T,b=w*T;return[b,3*w*(1-T),3*T*(1-T)*(1-T),(1-T)*(1-T)*(1-T)]},v=I(g),M={x:R.x*v[0]+y.x*v[1]+N.x*v[2]+m.x*v[3],y:R.y*v[0]+y.y*v[1]+N.y*v[2]+m.y*v[3],z:R.z*v[0]+y.z*v[1]+N.z*v[2]+m.z*v[3]};return M}var a=d-this.delay;a<0&&(a=0),a>this.duration&&(a=this.duration-1);var c=a/this.duration;if(c>=1)return this.points[this.length-1];var f=Math.floor((this.points.length-1)*c),p=(this.length-1)*c-f;return S(p,this.points[f],this.controls[f][1],this.controls[f+1][0],this.points[f+1])},E.exports=_},{}],25:[function(h,E,u){var _=h("@turf/helpers"),d=_.featureCollection,S=h("jsts"),a=h("@mapbox/geojson-normalize");E.exports=function(f,p,g){var m=_.distanceToDegrees(p,g),N=a(f),y=a(d(N.features.map(function(R){return c(R,m)})));if(y.features.length>1)return y;if(y.features.length===1)return y.features[0]};function c(f,p){var g=new S.io.GeoJSONReader,m=g.read(f.geometry),N=m.buffer(p),y=new S.io.GeoJSONWriter;return N=y.write(N),{type:"Feature",geometry:N,properties:{}}}},{"@mapbox/geojson-normalize":26,"@turf/helpers":27,jsts:28}],26:[function(h,E,u){E.exports=d;var _={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featurecollection"};function d(S){if(!S||!S.type)return null;var a=_[S.type];if(!a)return null;if(a==="geometry")return{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:S}]};if(a==="feature")return{type:"FeatureCollection",features:[S]};if(a==="featurecollection")return S}},{}],27:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],28:[function(h,E,u){(function(_,d){d(typeof u=="object"&&typeof E<"u"?u:_.jsts=_.jsts||{})})(this,function(_){function d(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])}function S(){}function a(){}function c(){}function f(){}function p(){}function g(){}function m(){}function N(t){this.name="RuntimeException",this.message=t,this.stack=new Error().stack,Error.call(this,t)}function y(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t}function R(){if(arguments.length===0)N.call(this);else if(arguments.length===1){var t=arguments[0];N.call(this,t)}}function I(){}function v(){if(this.x=null,this.y=null,this.z=null,arguments.length===0)v.call(this,0,0);else if(arguments.length===1){var t=arguments[0];v.call(this,t.x,t.y,t.z)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];v.call(this,e,n,v.NULL_ORDINATE)}else if(arguments.length===3){var r=arguments[0],s=arguments[1],o=arguments[2];this.x=r,this.y=s,this.z=o}}function M(){if(this.dimensionsToTest=2,arguments.length===0)M.call(this,2);else if(arguments.length===1){var t=arguments[0];if(t!==2&&t!==3)throw new a;this.dimensionsToTest=t}}function T(){}function w(){}function b(t){this.message=t||""}function P(){}function O(t){this.message=t||""}function D(t){this.message=t||""}function C(){this.array_=[],arguments[0]instanceof w&&this.addAll(arguments[0])}function q(){if(C.apply(this),arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.ensureCapacity(t.length),this.add(t,!0)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.ensureCapacity(e.length),this.add(e,n)}}}function B(){if(this.minx=null,this.maxx=null,this.miny=null,this.maxy=null,arguments.length===0)this.init();else if(arguments.length===1){if(arguments[0]instanceof v){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof B){var e=arguments[0];this.init(e)}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];this.init(n.x,r.x,n.y,r.y)}else if(arguments.length===4){var s=arguments[0],o=arguments[1],l=arguments[2],x=arguments[3];this.init(s,o,l,x)}}function U(){}function W(){U.call(this,"Projective point not representable on the Cartesian plane.")}function L(){}function X(t,e){return t.interfaces_&&t.interfaces_().indexOf(e)>-1}function ot(){}function F(t){this.str=t}function Y(t){this.value=t}function H(){}function z(){if(this.hi=0,this.lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];this.init(t)}else if(arguments[0]instanceof z){var e=arguments[0];this.init(e)}else if(typeof arguments[0]=="string"){var n=arguments[0];z.call(this,z.parse(n))}}else if(arguments.length===2){var r=arguments[0],s=arguments[1];this.init(r,s)}}function J(){}function G(){}function k(){}function j(){if(this.x=null,this.y=null,this.w=null,arguments.length===0)this.x=0,this.y=0,this.w=1;else if(arguments.length===1){var t=arguments[0];this.x=t.x,this.y=t.y,this.w=1}else if(arguments.length===2){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var e=arguments[0],n=arguments[1];this.x=e,this.y=n,this.w=1}else if(arguments[0]instanceof j&&arguments[1]instanceof j){var r=arguments[0],s=arguments[1];this.x=r.y*s.w-s.y*r.w,this.y=s.x*r.w-r.x*s.w,this.w=r.x*s.y-s.x*r.y}else if(arguments[0]instanceof v&&arguments[1]instanceof v){var o=arguments[0],l=arguments[1];this.x=o.y-l.y,this.y=l.x-o.x,this.w=o.x*l.y-l.x*o.y}}else if(arguments.length===3){var x=arguments[0],A=arguments[1],V=arguments[2];this.x=x,this.y=A,this.w=V}else if(arguments.length===4){var Z=arguments[0],K=arguments[1],$=arguments[2],ut=arguments[3],ft=Z.y-K.y,gt=K.x-Z.x,Ot=Z.x*K.y-K.x*Z.y,Xt=$.y-ut.y,Ve=ut.x-$.x,ir=$.x*ut.y-ut.x*$.y;this.x=gt*ir-Ve*Ot,this.y=Xt*Ot-ft*ir,this.w=ft*Ve-Xt*gt}}function rt(){}function it(){}function Q(){this.envelope=null,this.factory=null,this.SRID=null,this.userData=null;var t=arguments[0];this.factory=t,this.SRID=t.getSRID()}function lt(){}function st(){}function ct(){}function vt(){}function Re(){}function Qt(){}function at(){}function Nn(){}function sr(){}function $e(){}function Yt(){}function zt(){}function Rt(){this.array_=[],arguments[0]instanceof w&&this.addAll(arguments[0])}function ke(t){return t==null?fn:t.color}function Et(t){return t==null?null:t.parent}function Oe(t,e){t!==null&&(t.color=e)}function Mr(t){return t==null?null:t.left}function Ni(t){return t==null?null:t.right}function Vt(){this.root_=null,this.size_=0}function or(){}function Ci(){}function Jt(){this.array_=[],arguments[0]instanceof w&&this.addAll(arguments[0])}function _e(){}function tt(){}function tn(){}function zn(){}function xt(){this.geometries=null;var t=arguments[0],e=arguments[1];if(Q.call(this,e),t===null&&(t=[]),Q.hasNullElements(t))throw new a;this.geometries=t}function ce(){var t=arguments[0],e=arguments[1];xt.call(this,t,e)}function pn(){if(this.geom=null,this.geomFact=null,this.bnRule=null,this.endpointMap=null,arguments.length===1){var t=arguments[0];pn.call(this,t,st.MOD2_BOUNDARY_RULE)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.geom=e,this.geomFact=e.getFactory(),this.bnRule=n}}function Ls(){this.count=null}function To(){}function Oo(){}function _o(){}function Ao(){}function Do(){}function Fo(){}function ye(){}function kt(){}function mt(){this.points=null;var t=arguments[0],e=arguments[1];Q.call(this,e),this.init(t)}function wi(){}function At(){this.coordinates=null;var t=arguments[0],e=arguments[1];Q.call(this,e),this.init(t)}function en(){}function Mt(){this.shell=null,this.holes=null;var t=arguments[0],e=arguments[1],n=arguments[2];if(Q.call(this,n),t===null&&(t=this.getFactory().createLinearRing()),e===null&&(e=[]),Q.hasNullElements(e))throw new a;if(t.isEmpty()&&Q.hasNonEmptyElements(e))throw new a;this.shell=t,this.holes=e}function fe(){var t=arguments[0],e=arguments[1];xt.call(this,t,e)}function qt(){if(arguments[0]instanceof v&&arguments[1]instanceof yt){var t=arguments[0],e=arguments[1];qt.call(this,e.getCoordinateSequenceFactory().create(t),e)}else if(X(arguments[0],G)&&arguments[1]instanceof yt){var n=arguments[0],r=arguments[1];mt.call(this,n,r),this.validateConstruction()}}function Zt(){var t=arguments[0],e=arguments[1];xt.call(this,t,e)}function xe(){if(this.factory=null,this.isUserDataCopied=!1,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.factory=t}}}function Si(){}function Rs(){}function bs(){}function Ms(){}function Ee(){if(this.dimension=3,this.coordinates=null,arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];Ee.call(this,t,3)}else if(Number.isInteger(arguments[0])){var e=arguments[0];this.coordinates=new Array(e).fill(null);for(var n=0;n-1}function Vo(t){return this.has(t)?this._values[Ke]:void 0}function ko(t,e){if(this.objectOnly&&e!==Object(e))throw new TypeError("Invalid value used as weak collection key");if(e!==e||e===0)for(Ke=t.length;Ke--&&!qo(t[Ke],e););else Ke=t.indexOf(e);return Ke>-1}function Xo(t){return ko.call(this,this._keys,t)}function Uo(t,e){return this.has(t)?this._values[Ke]=e:this._values[this._keys.push(t)-1]=e,this}function Yo(){(this._keys||0).length=this._values.length=0}function Ho(){return Ps(this._itp,this._keys)}function Wo(){return Ps(this._itp,this._values)}function Zo(){return Ps(this._itp,this._keys,this._values)}function Ps(t,e,n){var r=[0],s=!1;return t.push(r),{next:function(){var o,l=r[0];return!s&&l1,"Node capacity must be greater than 1"),this.nodeCapacity=t}}function Ko(){}function Pi(){}function Dt(){if(arguments.length===0)Dt.call(this,Dt.DEFAULT_NODE_CAPACITY);else if(arguments.length===1){var t=arguments[0];Gt.call(this,t)}}function Ar(){var t=arguments[0];se.call(this,t)}function ue(){}function As(){this.segString=null,this.coord=null,this.segmentIndex=null,this.segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this.segString=t,this.coord=new v(e),this.segmentIndex=n,this.segmentOctant=r,this._isInterior=!e.equals2D(t.getCoordinate(n))}function Ds(){this.nodeMap=new Vt,this.edge=null;var t=arguments[0];this.edge=t}function wo(){this.nodeList=null,this.edge=null,this.nodeIt=null,this.currNode=null,this.nextNode=null,this.currSegIndex=0;var t=arguments[0];this.nodeList=t,this.edge=t.getEdge(),this.nodeIt=t.iterator(),this.readNextNode()}function Fs(){}function Ue(){this.nodeList=new Ds(this),this.pts=null,this.data=null;var t=arguments[0],e=arguments[1];this.pts=t,this.data=e}function Dr(){this.tempEnv1=new B,this.tempEnv2=new B,this.overlapSeg1=new dt,this.overlapSeg2=new dt}function qs(){this.pts=null,this.start=null,this.end=null,this.env=null,this.context=null,this.id=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this.pts=t,this.start=e,this.end=n,this.context=r}function Nt(){}function Ae(){}function Fr(){}function Ti(){if(this.segInt=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.setSegmentIntersector(t)}}}function wn(){if(this.monoChains=new C,this.index=new Dt,this.idCounter=0,this.nodedSegStrings=null,this.nOverlaps=0,arguments.length!==0){if(arguments.length===1){var t=arguments[0];Ti.call(this,t)}}}function qr(){Dr.apply(this),this.si=null;var t=arguments[0];this.si=t}function ge(){if(this.pt=null,arguments.length===1){var t=arguments[0];N.call(this,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];N.call(this,ge.msgWithCoord(e,n)),this.name="TopologyException",this.pt=new v(n)}}function Gr(){}function vn(){this.findAllIntersections=!1,this.isCheckEndSegmentsOnly=!1,this.li=null,this.interiorIntersection=null,this.intSegments=null,this.intersections=new C,this.intersectionCount=0,this.keepIntersections=!0;var t=arguments[0];this.li=t,this.interiorIntersection=null}function Br(){this.li=new Ht,this.segStrings=null,this.findAllIntersections=!1,this.segInt=null,this._isValid=!0;var t=arguments[0];this.segStrings=t}function Yn(){this.nv=null;var t=arguments[0];this.nv=new Br(Yn.toSegmentStrings(t))}function cr(){this.mapOp=null;var t=arguments[0];this.mapOp=t}function et(){}function de(){if(this.location=null,arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];this.init(t.length)}else if(Number.isInteger(arguments[0])){var e=arguments[0];this.init(1),this.location[et.ON]=e}else if(arguments[0]instanceof de){var n=arguments[0];if(this.init(n.location.length),n!==null)for(var r=0;r=0?this.setComputationPrecision(r.getPrecisionModel()):this.setComputationPrecision(s.getPrecisionModel()),this.arg=new Array(2).fill(null),this.arg[0]=new le(0,r,o),this.arg[1]=new le(1,s,o)}}function bn(){this.pts=null,this._orientation=null;var t=arguments[0];this.pts=t,this._orientation=bn.orientation(t)}function Xi(){this.edges=new C,this.ocaMap=new Vt}function ht(){this.ptLocator=new Un,this.geomFact=null,this.resultGeom=null,this.graph=null,this.edgeList=new Xi,this.resultPolyList=new C,this.resultLineList=new C,this.resultPointList=new C;var t=arguments[0],e=arguments[1];Rn.call(this,t,e),this.graph=new He(new dr),this.geomFact=t.getFactory()}function Me(){this.geom=new Array(2).fill(null),this.snapTolerance=null,this.cbr=null;var t=arguments[0],e=arguments[1];this.geom[0]=t,this.geom[1]=e,this.computeSnapTolerance()}function Wt(){this.geom=new Array(2).fill(null);var t=arguments[0],e=arguments[1];this.geom[0]=t,this.geom[1]=e}function Fe(){this.factory=null,this.interiorPoint=null,this.maxWidth=0;var t=arguments[0];this.factory=t.getFactory(),this.add(t)}function pr(){this.poly=null,this.centreY=null,this.hiY=c.MAX_VALUE,this.loY=-c.MAX_VALUE;var t=arguments[0];this.poly=t,this.hiY=t.getEnvelopeInternal().getMaxY(),this.loY=t.getEnvelopeInternal().getMinY(),this.centreY=Fe.avg(this.loY,this.hiY)}function Ui(){this.centroid=null,this.minDistance=c.MAX_VALUE,this.interiorPoint=null;var t=arguments[0];this.centroid=t.getCentroid().getCoordinate(),this.addInterior(t),this.interiorPoint===null&&this.addEndpoints(t)}function Yi(){this.centroid=null,this.minDistance=c.MAX_VALUE,this.interiorPoint=null;var t=arguments[0];this.centroid=t.getCentroid().getCoordinate(),this.add(t)}function Mn(){this.tempEnv1=new B,this.selectedSegment=new dt}function We(){this.items=new C,this.subnode=[null,null]}function ln(){if(this.min=null,this.max=null,arguments.length===0)this.min=0,this.max=0;else if(arguments.length===1){var t=arguments[0];this.init(t.min,t.max)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.init(e,n)}}function jn(){}function Qo(t,e){var n,r,s,o,l={32:{d:127,c:128,b:0,a:0},64:{d:32752,c:0,b:0,a:0}},x={32:8,64:11}[t];if(o||(n=e<0||1/e<0,isFinite(e)||(o=l[t],n&&(o.d+=1<=2;)r++,s/=2;for(;s<1&&r>0;)r--,s*=2;r<=0&&(s/=2)}return r}function Xr(){this.pt=0,this.level=0,this.interval=null;var t=arguments[0];this.computeKey(t)}function yn(){We.apply(this),this.interval=null,this.centre=null,this.level=null;var t=arguments[0],e=arguments[1];this.interval=t,this.level=e,this.centre=(t.getMin()+t.getMax())/2}function Pn(){}function mr(){We.apply(this)}function vr(){this.root=null,this.minExtent=1,this.root=new mr}function Hs(){}function Ur(){this.ring=null,this.tree=null,this.crossings=0,this.interval=new ln;var t=arguments[0];this.ring=t,this.buildIndex()}function Yr(){Mn.apply(this),this.mcp=null,this.p=null;var t=arguments[0],e=arguments[1];this.mcp=t,this.p=e}function pt(){}function Tt(){this.p0=null,this.p1=null,this.p2=null;var t=arguments[0],e=arguments[1],n=arguments[2];this.p0=t,this.p1=e,this.p2=n}function xn(){this.input=null,this.extremalPts=null,this.centre=null,this.radius=0;var t=arguments[0];this.input=t}function ee(){if(this.inputGeom=null,this.isConvex=null,this.convexHullPts=null,this.minBaseSeg=new dt,this.minWidthPt=null,this.minPtIndex=null,this.minWidth=0,arguments.length===1){var t=arguments[0];ee.call(this,t,!1)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.inputGeom=e,this.isConvex=n}}function Tn(){this.inputGeom=null,this.distanceTolerance=null;var t=arguments[0];this.inputGeom=t}function Hr(){oe.apply(this),this.distanceTolerance=null;var t=arguments[0];this.distanceTolerance=t}function hn(){this._orig=null,this._sym=null,this._next=null;var t=arguments[0];this._orig=t}function pe(){this._isMarked=!1;var t=arguments[0];hn.call(this,t)}function yr(){this.vertexMap=new nn}function Hi(){this._isStart=!1;var t=arguments[0];pe.call(this,t)}function Wi(){yr.apply(this)}function Wr(){this.result=null,this.factory=null,this.graph=null,this.lines=new C,this.nodeEdgeStack=new re,this.ringStartEdge=null,this.graph=new Wi}function Ze(){this.items=new C,this.subnode=new Array(4).fill(null)}function Zr(){this.pt=new v,this.level=0,this.env=null;var t=arguments[0];this.computeKey(t)}function En(){Ze.apply(this),this.env=null,this.centrex=null,this.centrey=null,this.level=null;var t=arguments[0],e=arguments[1];this.env=t,this.level=e,this.centrex=(t.getMinX()+t.getMaxX())/2,this.centrey=(t.getMinY()+t.getMaxY())/2}function Kn(){Ze.apply(this)}function On(){this.root=null,this.minExtent=1,this.root=new Kn}function Ws(t){this.geometryFactory=t||new yt}function So(t){this.geometryFactory=t||new yt,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new Ws(this.geometryFactory)}function Lo(){this.parser=new Ws(this.geometryFactory)}function Ro(t){this.geometryFactory=t||new yt,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new Ts(this.geometryFactory)}function Jr(t){return[t.x,t.y]}function bo(t,e){this.geometryFactory=t||new yt,this.ol=e||typeof ol<"u"&&ol}function jr(){if(this.noder=null,this.scaleFactor=null,this.offsetX=null,this.offsetY=null,this.isScaled=!1,arguments.length===2){var t=arguments[0],e=arguments[1];jr.call(this,t,e,0,0)}else if(arguments.length===4){var n=arguments[0],r=arguments[1];this.noder=n,this.scaleFactor=r,this.isScaled=!this.isIntegerPrecision()}}function Kr(){if(this.inputGeom=null,this.isClosedEndpointsInInterior=!0,this.nonSimpleLocation=null,arguments.length===1){var t=arguments[0];this.inputGeom=t}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.inputGeom=e,this.isClosedEndpointsInInterior=!n.isInBoundary(2)}}function Zi(){this.pt=null,this.isClosed=null,this.degree=null;var t=arguments[0];this.pt=t,this.isClosed=!1,this.degree=0}function Ct(){if(this.quadrantSegments=Ct.DEFAULT_QUADRANT_SEGMENTS,this.endCapStyle=Ct.CAP_ROUND,this.joinStyle=Ct.JOIN_ROUND,this.mitreLimit=Ct.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this.simplifyFactor=Ct.DEFAULT_SIMPLIFY_FACTOR,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.setQuadrantSegments(t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.setQuadrantSegments(e),this.setEndCapStyle(n)}else if(arguments.length===4){var r=arguments[0],s=arguments[1],o=arguments[2],l=arguments[3];this.setQuadrantSegments(r),this.setEndCapStyle(s),this.setJoinStyle(o),this.setMitreLimit(l)}}}function Zs(){this.minIndex=-1,this.minCoord=null,this.minDe=null,this.orientedDe=null}function Ji(){this.array_=[]}function Js(){this.finder=null,this.dirEdgeList=new C,this.nodes=new C,this.rightMostCoord=null,this.env=null,this.finder=new Zs}function jt(){this.inputLine=null,this.distanceTol=null,this.isDeleted=null,this.angleOrientation=nt.COUNTERCLOCKWISE;var t=arguments[0];this.inputLine=t}function Qr(){this.ptList=null,this.precisionModel=null,this.minimimVertexDistance=0,this.ptList=new C}function Je(){this.maxCurveSegmentError=0,this.filletAngleQuantum=null,this.closingSegLengthFactor=1,this.segList=null,this.distance=0,this.precisionModel=null,this.bufParams=null,this.li=null,this.s0=null,this.s1=null,this.s2=null,this.seg0=new dt,this.seg1=new dt,this.offset0=new dt,this.offset1=new dt,this.side=0,this._hasNarrowConcaveAngle=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this.precisionModel=t,this.bufParams=e,this.li=new Ht,this.filletAngleQuantum=Math.PI/2/e.getQuadrantSegments(),e.getQuadrantSegments()>=8&&e.getJoinStyle()===Ct.JOIN_ROUND&&(this.closingSegLengthFactor=Je.MAX_CLOSING_SEG_LEN_FACTOR),this.init(n)}function $r(){this.distance=0,this.precisionModel=null,this.bufParams=null;var t=arguments[0],e=arguments[1];this.precisionModel=t,this.bufParams=e}function ji(){this.subgraphs=null,this.seg=new dt,this.cga=new nt;var t=arguments[0];this.subgraphs=t}function Ki(){this.upwardSeg=null,this.leftDepth=null;var t=arguments[0],e=arguments[1];this.upwardSeg=new dt(t),this.leftDepth=e}function js(){this.inputGeom=null,this.distance=null,this.curveBuilder=null,this.curveList=new C;var t=arguments[0],e=arguments[1],n=arguments[2];this.inputGeom=t,this.distance=e,this.curveBuilder=n}function ti(){this._hasIntersection=!1,this.hasProper=!1,this.hasProperInterior=!1,this.hasInterior=!1,this.properIntersectionPoint=null,this.li=null,this.isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var t=arguments[0];this.li=t}function _n(){this.bufParams=null,this.workingPrecisionModel=null,this.workingNoder=null,this.geomFact=null,this.graph=null,this.edgeList=new Xi;var t=arguments[0];this.bufParams=t}function ei(){this.li=new Ht,this.segStrings=null;var t=arguments[0];this.segStrings=t}function xr(){this.li=null,this.pt=null,this.originalPt=null,this.ptScaled=null,this.p0Scaled=null,this.p1Scaled=null,this.scaleFactor=null,this.minx=null,this.maxx=null,this.miny=null,this.maxy=null,this.corner=new Array(4).fill(null),this.safeEnv=null;var t=arguments[0],e=arguments[1],n=arguments[2];if(this.originalPt=t,this.pt=t,this.scaleFactor=e,this.li=n,e<=0)throw new a;e!==1&&(this.pt=new v(this.scale(t.x),this.scale(t.y)),this.p0Scaled=new v,this.p1Scaled=new v),this.initCorners(this.pt)}function Qi(){this.index=null;var t=arguments[0];this.index=t}function ni(){Mn.apply(this),this.hotPixel=null,this.parentEdge=null,this.hotPixelVertexIndex=null,this._isNodeAdded=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this.hotPixel=t,this.parentEdge=e,this.hotPixelVertexIndex=n}function Ks(){this.li=null,this.interiorIntersections=null;var t=arguments[0];this.li=t,this.interiorIntersections=new C}function Qs(){this.pm=null,this.li=null,this.scaleFactor=null,this.noder=null,this.pointSnapper=null,this.nodedSegStrings=null;var t=arguments[0];this.pm=t,this.li=new Ht,this.li.setPrecisionModel(t),this.scaleFactor=t.getScale()}function Kt(){if(this.argGeom=null,this.distance=null,this.bufParams=new Ct,this.resultGeometry=null,this.saveException=null,arguments.length===1){var t=arguments[0];this.argGeom=t}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.argGeom=e,this.bufParams=n}}function Qn(){this.comps=null;var t=arguments[0];this.comps=t}function me(){if(this.component=null,this.segIndex=null,this.pt=null,arguments.length===2){var t=arguments[0],e=arguments[1];me.call(this,t,me.INSIDE_AREA,e)}else if(arguments.length===3){var n=arguments[0],r=arguments[1],s=arguments[2];this.component=n,this.segIndex=r,this.pt=s}}function $n(){this.pts=null;var t=arguments[0];this.pts=t}function ri(){this.locations=null;var t=arguments[0];this.locations=t}function qe(){if(this.geom=null,this.terminateDistance=0,this.ptLocator=new Un,this.minDistanceLocation=null,this.minDistance=c.MAX_VALUE,arguments.length===2){var t=arguments[0],e=arguments[1];qe.call(this,t,e,0)}else if(arguments.length===3){var n=arguments[0],r=arguments[1],s=arguments[2];this.geom=new Array(2).fill(null),this.geom[0]=n,this.geom[1]=r,this.terminateDistance=s}}function $s(){this.factory=null,this.directedEdges=new C,this.coordinates=null;var t=arguments[0];this.factory=t}function Pe(){this._isMarked=!1,this._isVisited=!1,this.data=null}function Ce(){Pe.apply(this),this.parentEdge=null,this.from=null,this.to=null,this.p0=null,this.p1=null,this.sym=null,this.edgeDirection=null,this.quadrant=null,this.angle=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this.from=t,this.to=e,this.edgeDirection=r,this.p0=t.getCoordinate(),this.p1=n;var s=this.p1.x-this.p0.x,o=this.p1.y-this.p0.y;this.quadrant=Nt.quadrant(s,o),this.angle=Math.atan2(o,s)}function ii(){var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];Ce.call(this,t,e,n,r)}function je(){if(Pe.apply(this),this.dirEdge=null,arguments.length!==0){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.setDirectedEdges(t,e)}}}function to(){this.outEdges=new C,this.sorted=!1}function cn(){if(Pe.apply(this),this.pt=null,this.deStar=null,arguments.length===1){var t=arguments[0];cn.call(this,t,new to)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.pt=e,this.deStar=n}}function $i(){je.apply(this),this.line=null;var t=arguments[0];this.line=t}function eo(){this.nodeMap=new Vt}function Er(){this.edges=new Rt,this.dirEdges=new Rt,this.nodeMap=new eo}function ts(){Er.apply(this)}function no(){this.graph=new ts,this.mergedLineStrings=null,this.factory=null,this.edgeStrings=null}function si(){this.edgeRing=null,this.next=null,this.label=-1;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];Ce.call(this,t,e,n,r)}function es(){je.apply(this),this.line=null;var t=arguments[0];this.line=t}function oi(){this.geometryFactory=new yt,this.geomGraph=null,this.disconnectedRingcoord=null;var t=arguments[0];this.geomGraph=t}function ns(){}function ai(){if(this.edgeEnds=new C,arguments.length===1){var t=arguments[0];ai.call(this,null,t)}else if(arguments.length===2){var e=arguments[1];Ye.call(this,e.getEdge(),e.getCoordinate(),e.getDirectedCoordinate(),new Bt(e.getLabel())),this.insert(e)}}function rs(){Zn.apply(this)}function is(){var t=arguments[0],e=arguments[1];an.call(this,t,e)}function ui(){Wn.apply(this)}function ro(){this.nodes=new gr(new ui)}function ss(){this.li=new Ht,this.geomGraph=null,this.nodeGraph=new ro,this.invalidPoint=null;var t=arguments[0];this.geomGraph=t}function io(){this.graph=null,this.rings=new C,this.totalEnv=new B,this.index=null,this.nestedPt=null;var t=arguments[0];this.graph=t}function It(){if(this.errorType=null,this.pt=null,arguments.length===1){var t=arguments[0];It.call(this,t,null)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.errorType=e,n!==null&&(this.pt=n.copy())}}function we(){this.parentGeometry=null,this.isSelfTouchingRingFormingHoleValid=!1,this.validErr=null;var t=arguments[0];this.parentGeometry=t}function Ge(){this.factory=null,this.deList=new C,this.lowestEdge=null,this.ring=null,this.ringPts=null,this.holes=null,this.shell=null,this._isHole=null,this._isProcessed=!1,this._isIncludedSet=!1,this._isIncluded=!1;var t=arguments[0];this.factory=t}function so(){}function Ut(){Er.apply(this),this.factory=null;var t=arguments[0];this.factory=t}function ve(){if(this.lineStringAdder=new os(this),this.graph=null,this.dangles=new C,this.cutEdges=new C,this.invalidRingLines=new C,this.holeList=null,this.shellList=null,this.polyList=null,this.isCheckingRingsValid=!0,this.extractOnlyPolygonal=null,this.geomFactory=null,arguments.length===0)ve.call(this,!1);else if(arguments.length===1){var t=arguments[0];this.extractOnlyPolygonal=t}}function os(){this.p=null;var t=arguments[0];this.p=t}function as(){this.li=new Ht,this.ptLocator=new Un,this.arg=null,this.nodes=new gr(new ui),this.im=null,this.isolatedEdges=new C,this.invalidPoint=null;var t=arguments[0];this.arg=t}function li(){this.rectEnv=null;var t=arguments[0];this.rectEnv=t.getEnvelopeInternal()}function oo(){this.li=new Ht,this.rectEnv=null,this.diagUp0=null,this.diagUp1=null,this.diagDown0=null,this.diagDown1=null;var t=arguments[0];this.rectEnv=t,this.diagUp0=new v(t.getMinX(),t.getMinY()),this.diagUp1=new v(t.getMaxX(),t.getMaxY()),this.diagDown0=new v(t.getMinX(),t.getMaxY()),this.diagDown1=new v(t.getMaxX(),t.getMinY())}function An(){this._isDone=!1}function Ir(){this.rectangle=null,this.rectEnv=null;var t=arguments[0];this.rectangle=t,this.rectEnv=t.getEnvelopeInternal()}function us(){An.apply(this),this.rectEnv=null,this._intersects=!1;var t=arguments[0];this.rectEnv=t}function ls(){An.apply(this),this.rectSeq=null,this.rectEnv=null,this._containsPoint=!1;var t=arguments[0];this.rectSeq=t.getExteriorRing().getCoordinateSequence(),this.rectEnv=t.getEnvelopeInternal()}function hs(){An.apply(this),this.rectEnv=null,this.rectIntersector=null,this.hasIntersection=!1,this.p0=new v,this.p1=new v;var t=arguments[0];this.rectEnv=t.getEnvelopeInternal(),this.rectIntersector=new oo(this.rectEnv)}function wt(){if(this._relate=null,arguments.length===2){var t=arguments[0],e=arguments[1];Rn.call(this,t,e),this._relate=new as(this.arg)}else if(arguments.length===3){var n=arguments[0],r=arguments[1],s=arguments[2];Rn.call(this,n,r,s),this._relate=new as(this.arg)}}function Se(){this.geomFactory=null,this.skipEmpty=!1,this.inputGeoms=null;var t=arguments[0];this.geomFactory=Se.extractFactory(t),this.inputGeoms=t}function hi(){this.pointGeom=null,this.otherGeom=null,this.geomFact=null;var t=arguments[0],e=arguments[1];this.pointGeom=t,this.otherGeom=e,this.geomFact=e.getFactory()}function Dn(){this.sortIndex=-1,this.comps=null;var t=arguments[0],e=arguments[1];this.sortIndex=t,this.comps=e}function Te(){this.inputPolys=null,this.geomFactory=null;var t=arguments[0];this.inputPolys=t,this.inputPolys===null&&(this.inputPolys=new C)}function Fn(){if(this.polygons=new C,this.lines=new C,this.points=new C,this.geomFact=null,arguments.length===1){if(X(arguments[0],w)){var t=arguments[0];this.extract(t)}else if(arguments[0]instanceof Q){var e=arguments[0];this.extract(e)}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];this.geomFact=r,this.extract(n)}}function cs(){xe.CoordinateOperation.apply(this),this.targetPM=null,this.removeCollapsed=!0;var t=arguments[0],e=arguments[1];this.targetPM=t,this.removeCollapsed=e}function tr(){this.targetPM=null,this.removeCollapsed=!0,this.changePrecisionModel=!1,this.isPointwise=!1;var t=arguments[0];this.targetPM=t}function ci(){this.pts=null,this.usePt=null,this.distanceTolerance=null,this.seg=new dt;var t=arguments[0];this.pts=t}function Nr(){this.inputGeom=null,this.distanceTolerance=null,this.isEnsureValidTopology=!0;var t=arguments[0];this.inputGeom=t}function fi(){oe.apply(this),this.isEnsureValidTopology=!0,this.distanceTolerance=null;var t=arguments[0],e=arguments[1];this.isEnsureValidTopology=t,this.distanceTolerance=e}function gi(){if(this.parent=null,this.index=null,arguments.length===2){var t=arguments[0],e=arguments[1];gi.call(this,t,e,null,-1)}else if(arguments.length===4){var n=arguments[0],r=arguments[1],s=arguments[2],o=arguments[3];dt.call(this,n,r),this.parent=s,this.index=o}}function In(){if(this.parentLine=null,this.segs=null,this.resultSegs=new C,this.minimumSize=null,arguments.length===1){var t=arguments[0];In.call(this,t,2)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.parentLine=e,this.minimumSize=n,this.init()}}function Cr(){this.index=new On}function ao(){this.querySeg=null,this.items=new C;var t=arguments[0];this.querySeg=t}function di(){this.li=new Ht,this.inputIndex=new Cr,this.outputIndex=new Cr,this.line=null,this.linePts=null,this.distanceTolerance=0;var t=arguments[0],e=arguments[1];this.inputIndex=t,this.outputIndex=e}function uo(){this.inputIndex=new Cr,this.outputIndex=new Cr,this.distanceTolerance=0}function er(){this.inputGeom=null,this.lineSimplifier=new uo,this.linestringMap=null;var t=arguments[0];this.inputGeom=t}function pi(){oe.apply(this),this.linestringMap=null;var t=arguments[0];this.linestringMap=t}function fs(){this.tps=null;var t=arguments[0];this.tps=t}function wr(){this.seg=null,this.segLen=null,this.splitPt=null,this.minimumLen=0;var t=arguments[0];this.seg=t,this.segLen=t.getLength()}function lo(){}function mi(){}function _t(){}function Lt(){if(this.p=null,arguments.length===1){var t=arguments[0];this.p=new v(t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.p=new v(e,n)}else if(arguments.length===3){var r=arguments[0],s=arguments[1],o=arguments[2];this.p=new v(r,s,o)}}function qn(){this._isOnConstraint=null,this.constraint=null;var t=arguments[0];Lt.call(this,t)}function Ft(){this._rot=null,this.vertex=null,this.next=null,this.data=null}function vi(){this.subdiv=null,this.isUsingTolerance=!1;var t=arguments[0];this.subdiv=t,this.isUsingTolerance=t.getTolerance()>0}function ho(){}function gs(){this.subdiv=null,this.lastEdge=null;var t=arguments[0];this.subdiv=t,this.init()}function Sr(){if(this.seg=null,arguments.length===1){if(typeof arguments[0]=="string"){var t=arguments[0];N.call(this,t)}else if(arguments[0]instanceof dt){var e=arguments[0];N.call(this,"Locate failed to converge (at edge: "+e+"). Possible causes include invalid Subdivision topology or very close sites"),this.seg=new dt(e)}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];N.call(this,Sr.msgWithSpatial(n,r)),this.seg=new dt(r)}}function Lr(){}function Le(){this.visitedKey=0,this.quadEdges=new C,this.startingEdge=null,this.tolerance=null,this.edgeCoincidenceTolerance=null,this.frameVertex=new Array(3).fill(null),this.frameEnv=null,this.locator=null,this.seg=new dt,this.triEdges=new Array(3).fill(null);var t=arguments[0],e=arguments[1];this.tolerance=e,this.edgeCoincidenceTolerance=e/Le.EDGE_COINCIDENCE_TOL_FACTOR,this.createFrame(t),this.startingEdge=this.initSubdiv(),this.locator=new gs(this)}function ds(){}function ps(){this.triList=new C}function ms(){this.triList=new C}function vs(){this.coordList=new q,this.triCoords=new C}function nr(){if(this.ls=null,this.data=null,arguments.length===2){var t=arguments[0],e=arguments[1];this.ls=new dt(t,e)}else if(arguments.length===3){var n=arguments[0],r=arguments[1],s=arguments[2];this.ls=new dt(n,r),this.data=s}else if(arguments.length===6){var o=arguments[0],l=arguments[1],x=arguments[2],A=arguments[3],V=arguments[4],Z=arguments[5];nr.call(this,new v(o,l,x),new v(A,V,Z))}else if(arguments.length===7){var K=arguments[0],$=arguments[1],ut=arguments[2],ft=arguments[3],gt=arguments[4],Ot=arguments[5],Xt=arguments[6];nr.call(this,new v(K,$,ut),new v(ft,gt,Ot),Xt)}}function yi(){}function ys(){if(this.p=null,this.data=null,this.left=null,this.right=null,this.count=null,arguments.length===2){var t=arguments[0],e=arguments[1];this.p=new v(t),this.left=null,this.right=null,this.count=1,this.data=e}else if(arguments.length===3){var n=arguments[0],r=arguments[1],s=arguments[2];this.p=new v(n,r),this.left=null,this.right=null,this.count=1,this.data=s}}function rr(){if(this.root=null,this.numberOfNodes=null,this.tolerance=null,arguments.length===0)rr.call(this,0);else if(arguments.length===1){var t=arguments[0];this.tolerance=t}}function xs(){this.tolerance=null,this.matchNode=null,this.matchDist=0,this.p=null;var t=arguments[0],e=arguments[1];this.p=t,this.tolerance=e}function Gn(){this.initialVertices=null,this.segVertices=null,this.segments=new C,this.subdiv=null,this.incDel=null,this.convexHull=null,this.splitFinder=new mi,this.kdt=null,this.vertexFactory=null,this.computeAreaEnv=null,this.splitPt=null,this.tolerance=null;var t=arguments[0],e=arguments[1];this.initialVertices=new C(t),this.tolerance=e,this.kdt=new rr(e)}function ne(){this.siteCoords=null,this.tolerance=0,this.subdiv=null}function Rr(){this.siteCoords=null,this.constraintLines=null,this.tolerance=0,this.subdiv=null,this.constraintVertexMap=new Vt}function xi(){this.siteCoords=null,this.tolerance=0,this.subdiv=null,this.clipEnv=null,this.diagramEnv=null}function Es(){}"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(t){if(this===void 0||this===null)throw new TypeError(this+" is not an object");var e=Object(this),n=Math.max(Math.min(e.length,9007199254740991),0)||0,r=1 in arguments&&parseInt(Number(arguments[1]),10)||0;r=r<0?Math.max(n+r,0):Math.min(r,n);var s=2 in arguments&&arguments[2]!==void 0?parseInt(Number(arguments[2]),10)||0:n;for(s=s<0?Math.max(n+arguments[2],0):Math.min(s,n);re.x?1:this.ye.y?1:0},clone:function(){try{var t=null;return t}catch(e){if(e instanceof CloneNotSupportedException)return I.shouldNeverReachHere("this shouldn't happen because this class is Cloneable"),null;throw e}finally{}},copy:function(){return new v(this)},toString:function(){return"("+this.x+", "+this.y+", "+this.z+")"},distance3D:function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return Math.sqrt(e*e+n*n+r*r)},distance:function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},hashCode:function(){var t=17;return t=37*t+v.hashCode(this.x),t=37*t+v.hashCode(this.y)},setCoordinate:function(t){this.x=t.x,this.y=t.y,this.z=t.z},interfaces_:function(){return[f,p,m]},getClass:function(){return v}}),v.hashCode=function(){if(arguments.length===1){var t=arguments[0],e=c.doubleToLongBits(t);return Math.trunc(e^e>>>32)}},d(M.prototype,{compare:function(t,e){var n=t,r=e,s=M.compare(n.x,r.x);if(s!==0)return s;var o=M.compare(n.y,r.y);if(o!==0)return o;if(this.dimensionsToTest<=2)return 0;var l=M.compare(n.z,r.z);return l},interfaces_:function(){return[g]},getClass:function(){return M}}),M.compare=function(t,e){return te?1:c.isNaN(t)?c.isNaN(e)?0:-1:c.isNaN(e)?1:0},v.DimensionalComparator=M,v.serialVersionUID=6683108902428367e3,v.NULL_ORDINATE=c.NaN,v.X=0,v.Y=1,v.Z=2,T.prototype.hasNext=function(){},T.prototype.next=function(){},T.prototype.remove=function(){},w.prototype.add=function(){},w.prototype.addAll=function(){},w.prototype.isEmpty=function(){},w.prototype.iterator=function(){},w.prototype.size=function(){},w.prototype.toArray=function(){},w.prototype.remove=function(){},b.prototype=new Error,b.prototype.name="IndexOutOfBoundsException",P.prototype=Object.create(w.prototype),P.prototype.constructor=P,P.prototype.get=function(){},P.prototype.set=function(){},P.prototype.isEmpty=function(){},O.prototype=new Error,O.prototype.name="NoSuchElementException",D.prototype=new Error,D.prototype.name="OperationNotSupported",C.prototype=Object.create(P.prototype),C.prototype.constructor=C,C.prototype.ensureCapacity=function(){},C.prototype.interfaces_=function(){return[P,w]},C.prototype.add=function(t){return arguments.length===1?this.array_.push(t):this.array_.splice(arguments[0],arguments[1]),!0},C.prototype.clear=function(){this.array_=[]},C.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},C.prototype.set=function(t,e){var n=this.array_[t];return this.array_[t]=e,n},C.prototype.iterator=function(){return new Ei(this)},C.prototype.get=function(t){if(t<0||t>=this.size())throw new b;return this.array_[t]},C.prototype.isEmpty=function(){return this.array_.length===0},C.prototype.size=function(){return this.array_.length},C.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e=1){var o=this.get(this.size()-1);if(o.equals2D(r))return null}C.prototype.add.call(this,r)}else if(arguments[0]instanceof Object&&typeof arguments[1]=="boolean"){var l=arguments[0],x=arguments[1];return this.add(l,x),!0}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var A=arguments[0],V=arguments[1],Z=arguments[2];if(Z)for(var K=0;K=0;K--)this.add(A[K],V);return!0}if(typeof arguments[2]=="boolean"&&Number.isInteger(arguments[0])&&arguments[1]instanceof v){var $=arguments[0],ut=arguments[1],ft=arguments[2];if(!ft){var gt=this.size();if(gt>0){if($>0){var Ot=this.get($-1);if(Ot.equals2D(ut))return null}if($ws&&(Ss=-1);for(var K=Cs;K!==ws;K+=Ss)this.add(Ve[K],ir);return!0}},closeRing:function(){this.size()>0&&this.add(new v(this.get(0)),!1)},interfaces_:function(){return[]},getClass:function(){return q}}),q.coordArrayType=new Array(0).fill(null),d(B.prototype,{getArea:function(){return this.getWidth()*this.getHeight()},equals:function(t){if(!(t instanceof B))return!1;var e=t;return this.isNull()?e.isNull():this.maxx===e.getMaxX()&&this.maxy===e.getMaxY()&&this.minx===e.getMinX()&&this.miny===e.getMinY()},intersection:function(t){if(this.isNull()||t.isNull()||!this.intersects(t))return new B;var e=this.minx>t.minx?this.minx:t.minx,n=this.miny>t.miny?this.miny:t.miny,r=this.maxx=this.minx&&e.getMaxX()<=this.maxx&&e.getMinY()>=this.miny&&e.getMaxY()<=this.maxy}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];return!this.isNull()&&n>=this.minx&&n<=this.maxx&&r>=this.miny&&r<=this.maxy}},intersects:function(){if(arguments.length===1){if(arguments[0]instanceof B){var t=arguments[0];return!this.isNull()&&!t.isNull()&&!(t.minx>this.maxx||t.maxxthis.maxy||t.maxythis.maxx||nthis.maxy||rthis.maxx&&(this.maxx=e.maxx),e.minythis.maxy&&(this.maxy=e.maxy))}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];this.isNull()?(this.minx=n,this.maxx=n,this.miny=r,this.maxy=r):(nthis.maxx&&(this.maxx=n),rthis.maxy&&(this.maxy=r))}},minExtent:function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return te.minx?1:this.minye.miny?1:this.maxxe.maxx?1:this.maxye.maxy?1:0},translate:function(t,e){return this.isNull()?null:void this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},toString:function(){return"Env["+this.minx+" : "+this.maxx+", "+this.miny+" : "+this.maxy+"]"},setToNull:function(){this.minx=0,this.maxx=-1,this.miny=0,this.maxy=-1},getHeight:function(){return this.isNull()?0:this.maxy-this.miny},maxExtent:function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},expandBy:function(){if(arguments.length===1){var t=arguments[0];this.expandBy(t,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this.isNull())return null;this.minx-=e,this.maxx+=e,this.miny-=n,this.maxy+=n,(this.minx>this.maxx||this.miny>this.maxy)&&this.setToNull()}},contains:function(){if(arguments.length===1){if(arguments[0]instanceof B){var t=arguments[0];return this.covers(t)}if(arguments[0]instanceof v){var e=arguments[0];return this.covers(e)}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];return this.covers(n,r)}},centre:function(){return this.isNull()?null:new v((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},init:function(){if(arguments.length===0)this.setToNull();else if(arguments.length===1){if(arguments[0]instanceof v){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof B){var e=arguments[0];this.minx=e.minx,this.maxx=e.maxx,this.miny=e.miny,this.maxy=e.maxy}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];this.init(n.x,r.x,n.y,r.y)}else if(arguments.length===4){var s=arguments[0],o=arguments[1],l=arguments[2],x=arguments[3];st.maxx&&(e=this.minx-t.maxx);var n=0;return this.maxyt.maxy&&(n=this.miny-t.maxy),e===0?n:n===0?e:Math.sqrt(e*e+n*n)},hashCode:function(){var t=17;return t=37*t+v.hashCode(this.minx),t=37*t+v.hashCode(this.maxx),t=37*t+v.hashCode(this.miny),t=37*t+v.hashCode(this.maxy)},interfaces_:function(){return[f,m]},getClass:function(){return B}}),B.intersects=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],n=arguments[2];return n.x>=(t.xe.x?t.x:e.x)&&n.y>=(t.ye.y?t.y:e.y)}if(arguments.length===4){var r=arguments[0],s=arguments[1],o=arguments[2],l=arguments[3],x=Math.min(o.x,l.x),A=Math.max(o.x,l.x),V=Math.min(r.x,s.x),Z=Math.max(r.x,s.x);return!(V>A)&&!(ZA)&&!(Zn?n:t}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var r=arguments[0],s=arguments[1],o=arguments[2];return ro?o:r}},ot.wrap=function(t,e){return t<0?e- -t%e:t%e},ot.max=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],n=arguments[2],r=t;return e>r&&(r=e),n>r&&(r=n),r}if(arguments.length===4){var s=arguments[0],o=arguments[1],l=arguments[2],x=arguments[3],r=s;return o>r&&(r=o),l>r&&(r=l),x>r&&(r=x),r}},ot.average=function(t,e){return(t+e)/2},ot.LOG_10=Math.log(10),F.prototype.append=function(t){this.str+=t},F.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},F.prototype.toString=function(t){return this.str},Y.prototype.intValue=function(){return this.value},Y.prototype.compareTo=function(t){return this.valuet?1:0},Y.isNaN=function(t){return Number.isNaN(t)},H.isWhitespace=function(t){return t<=32&&t>=0||t==127},H.toUpperCase=function(t){return t.toUpperCase()},d(z.prototype,{le:function(t){return this.hi9?(Z=!0,K="9"):K="0"+V,l.append(K),n=n.subtract(z.valueOf(V)).multiply(z.TEN),Z&&n.selfAdd(z.TEN);var $=!0,ut=z.magnitude(n.hi);if(ut<0&&Math.abs(ut)>=x-A&&($=!1),!$)break}return e[0]=r,l.toString()},sqr:function(){return this.multiply(this)},doubleValue:function(){return this.hi+this.lo},subtract:function(){if(arguments[0]instanceof z){var t=arguments[0];return this.add(t.negate())}if(typeof arguments[0]=="number"){var e=arguments[0];return this.add(-e)}},equals:function(){if(arguments.length===1){var t=arguments[0];return this.hi===t.hi&&this.lo===t.lo}},isZero:function(){return this.hi===0&&this.lo===0},selfSubtract:function(){if(arguments[0]instanceof z){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t.hi,-t.lo)}if(typeof arguments[0]=="number"){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},getSpecialNumberString:function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},min:function(t){return this.le(t)?this:t},selfDivide:function(){if(arguments.length===1){if(arguments[0]instanceof z){var t=arguments[0];return this.selfDivide(t.hi,t.lo)}if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfDivide(e,0)}}else if(arguments.length===2){var n=arguments[0],r=arguments[1],s=null,o=null,l=null,x=null,A=null,V=null,Z=null,K=null;return A=this.hi/n,V=z.SPLIT*A,s=V-A,K=z.SPLIT*n,s=V-s,o=A-s,l=K-n,Z=A*n,l=K-l,x=n-l,K=s*l-Z+s*x+o*l+o*x,V=(this.hi-Z-K+this.lo-A*r)/n,K=A+V,this.hi=K,this.lo=A-K+V,this}},dump:function(){return"DD<"+this.hi+", "+this.lo+">"},divide:function(){if(arguments[0]instanceof z){var t=arguments[0],e=null,n=null,r=null,s=null,o=null,l=null,x=null,A=null;o=this.hi/t.hi,l=z.SPLIT*o,e=l-o,A=z.SPLIT*t.hi,e=l-e,n=o-e,r=A-t.hi,x=o*t.hi,r=A-r,s=t.hi-r,A=e*r-x+e*s+n*r+n*s,l=(this.hi-x-A+this.lo-o*t.lo)/t.hi,A=o+l;var V=A,Z=o-A+l;return new z(V,Z)}if(typeof arguments[0]=="number"){var K=arguments[0];return c.isNaN(K)?z.createNaN():z.copy(this).selfDivide(K,0)}},ge:function(t){return this.hi>t.hi||this.hi===t.hi&&this.lo>=t.lo},pow:function(t){if(t===0)return z.valueOf(1);var e=new z(this),n=z.valueOf(1),r=Math.abs(t);if(r>1)for(;r>0;)r%2===1&&n.selfMultiply(e),r/=2,r>0&&(e=e.sqr());else n=e;return t<0?n.reciprocal():n},ceil:function(){if(this.isNaN())return z.NaN;var t=Math.ceil(this.hi),e=0;return t===this.hi&&(e=Math.ceil(this.lo)),new z(t,e)},compareTo:function(t){var e=t;return this.hie.hi?1:this.loe.lo?1:0},rint:function(){if(this.isNaN())return this;var t=this.add(.5);return t.floor()},setValue:function(){if(arguments[0]instanceof z){var t=arguments[0];return this.init(t),this}if(typeof arguments[0]=="number"){var e=arguments[0];return this.init(e),this}},max:function(t){return this.ge(t)?this:t},sqrt:function(){if(this.isZero())return z.valueOf(0);if(this.isNegative())return z.NaN;var t=1/Math.sqrt(this.hi),e=this.hi*t,n=z.valueOf(e),r=this.subtract(n.sqr()),s=r.hi*(.5*t);return n.add(s)},selfAdd:function(){if(arguments.length===1){if(arguments[0]instanceof z){var t=arguments[0];return this.selfAdd(t.hi,t.lo)}if(typeof arguments[0]=="number"){var e=arguments[0],n=null,r=null,s=null,o=null,l=null,x=null;return s=this.hi+e,l=s-this.hi,o=s-l,o=e-l+(this.hi-o),x=o+this.lo,n=s+x,r=x+(s-n),this.hi=n+r,this.lo=r+(n-this.hi),this}}else if(arguments.length===2){var A=arguments[0],V=arguments[1],n=null,r=null,Z=null,K=null,s=null,o=null,l=null,x=null;s=this.hi+A,Z=this.lo+V,l=s-this.hi,x=Z-this.lo,o=s-l,K=Z-x,o=A-l+(this.hi-o),K=V-x+(this.lo-K),l=o+Z,n=s+l,r=l+(s-n),l=K+r;var $=n+l,ut=l+(n-$);return this.hi=$,this.lo=ut,this}},selfMultiply:function(){if(arguments.length===1){if(arguments[0]instanceof z){var t=arguments[0];return this.selfMultiply(t.hi,t.lo)}if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfMultiply(e,0)}}else if(arguments.length===2){var n=arguments[0],r=arguments[1],s=null,o=null,l=null,x=null,A=null,V=null;A=z.SPLIT*this.hi,s=A-this.hi,V=z.SPLIT*n,s=A-s,o=this.hi-s,l=V-n,A=this.hi*n,l=V-l,x=n-l,V=s*l-A+s*x+o*l+o*x+(this.hi*r+this.lo*n);var Z=A+V;s=A-Z;var K=V+s;return this.hi=Z,this.lo=K,this}},selfSqr:function(){return this.selfMultiply(this)},floor:function(){if(this.isNaN())return z.NaN;var t=Math.floor(this.hi),e=0;return t===this.hi&&(e=Math.floor(this.lo)),new z(t,e)},negate:function(){return this.isNaN()?this:new z(-this.hi,-this.lo)},clone:function(){try{return null}catch(t){if(t instanceof CloneNotSupportedException)return null;throw t}finally{}},multiply:function(){if(arguments[0]instanceof z){var t=arguments[0];return t.isNaN()?z.createNaN():z.copy(this).selfMultiply(t)}if(typeof arguments[0]=="number"){var e=arguments[0];return c.isNaN(e)?z.createNaN():z.copy(this).selfMultiply(e,0)}},isNaN:function(){return c.isNaN(this.hi)},intValue:function(){return Math.trunc(this.hi)},toString:function(){var t=z.magnitude(this.hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},toStandardNotation:function(){var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),r=e[0]+1,s=n;if(n.charAt(0)===".")s="0"+n;else if(r<0)s="0."+z.stringOfChar("0",-r)+n;else if(n.indexOf(".")===-1){var o=r-n.length,l=z.stringOfChar("0",o);s=n+l+".0"}return this.isNegative()?"-"+s:s},reciprocal:function(){var t=null,e=null,n=null,r=null,s=null,o=null,l=null,x=null;s=1/this.hi,o=z.SPLIT*s,t=o-s,x=z.SPLIT*this.hi,t=o-t,e=s-t,n=x-this.hi,l=s*this.hi,n=x-n,r=this.hi-n,x=t*n-l+t*r+e*n+e*r,o=(1-l-x-s*this.lo)/this.hi;var A=s+o,V=s-A+o;return new z(A,V)},toSciNotation:function(){if(this.isZero())return z.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),r=z.SCI_NOT_EXPONENT_CHAR+e[0];if(n.charAt(0)==="0")throw new IllegalStateException("Found leading zero: "+n);var s="";n.length>1&&(s=n.substring(1));var o=n.charAt(0)+"."+s;return this.isNegative()?"-"+o+r:o+r},abs:function(){return this.isNaN()?z.NaN:this.isNegative()?this.negate():new z(this)},isPositive:function(){return this.hi>0||this.hi===0&&this.lo>0},lt:function(t){return this.hit.hi||this.hi===t.hi&&this.lo>t.lo},isNegative:function(){return this.hi<0||this.hi===0&&this.lo<0},trunc:function(){return this.isNaN()?z.NaN:this.isPositive()?this.floor():this.ceil()},signum:function(){return this.hi>0?1:this.hi<0?-1:this.lo>0?1:this.lo<0?-1:0},interfaces_:function(){return[m,f,p]},getClass:function(){return z}}),z.sqr=function(t){return z.valueOf(t).selfMultiply(t)},z.valueOf=function(){if(typeof arguments[0]=="string"){var t=arguments[0];return z.parse(t)}if(typeof arguments[0]=="number"){var e=arguments[0];return new z(e)}},z.sqrt=function(t){return z.valueOf(t).sqrt()},z.parse=function(t){for(var e=0,n=t.length;H.isWhitespace(t.charAt(e));)e++;var r=!1;if(e=n);){var V=t.charAt(e);if(e++,H.isDigit(V)){var Z=V-"0";o.selfMultiply(z.TEN),o.selfAdd(Z),l++}else{if(V!=="."){if(V==="e"||V==="E"){var K=t.substring(e);try{A=Y.parseInt(K)}catch(gt){throw gt instanceof NumberFormatException?new NumberFormatException("Invalid exponent "+K+" in string "+t):gt}finally{}break}throw new NumberFormatException("Unexpected character '"+V+"' at position "+e+" in string "+t)}x=l}}var $=o,ut=l-x-A;if(ut===0)$=o;else if(ut>0){var ft=z.TEN.pow(ut);$=o.divide(ft)}else if(ut<0){var ft=z.TEN.pow(-ut);$=o.multiply(ft)}return r?$.negate():$},z.createNaN=function(){return new z(c.NaN,c.NaN)},z.copy=function(t){return new z(t)},z.magnitude=function(t){var e=Math.abs(t),n=Math.log(e)/Math.log(10),r=Math.trunc(Math.floor(n)),s=Math.pow(10,r);return 10*s<=e&&(r+=1),r},z.stringOfChar=function(t,e){for(var n=new F,r=0;r0){if(o<=0)return J.signum(l);r=s+o}else{if(!(s<0)||o>=0)return J.signum(l);r=-s-o}var x=J.DP_SAFE_EPSILON*r;return l>=x||-l>=x?J.signum(l):2},J.signum=function(t){return t>0?1:t<0?-1:0},J.DP_SAFE_EPSILON=1e-15,d(G.prototype,{setOrdinate:function(t,e,n){},size:function(){},getOrdinate:function(t,e){},getCoordinate:function(){},getCoordinateCopy:function(t){},getDimension:function(){},getX:function(t){},clone:function(){},expandEnvelope:function(t){},copy:function(){},getY:function(t){},toCoordinateArray:function(){},interfaces_:function(){return[p]},getClass:function(){return G}}),G.X=0,G.Y=1,G.Z=2,G.M=3,k.arraycopy=function(t,e,n,r,s){for(var o=0,l=e;l0},interfaces_:function(){return[st]},getClass:function(){return vt}}),d(Re.prototype,{isInBoundary:function(t){return t>1},interfaces_:function(){return[st]},getClass:function(){return Re}}),d(Qt.prototype,{isInBoundary:function(t){return t===1},interfaces_:function(){return[st]},getClass:function(){return Qt}}),st.Mod2BoundaryNodeRule=ct,st.EndPointBoundaryNodeRule=vt,st.MultiValentEndPointBoundaryNodeRule=Re,st.MonoValentEndPointBoundaryNodeRule=Qt,st.MOD2_BOUNDARY_RULE=new ct,st.ENDPOINT_BOUNDARY_RULE=new vt,st.MULTIVALENT_ENDPOINT_BOUNDARY_RULE=new Re,st.MONOVALENT_ENDPOINT_BOUNDARY_RULE=new Qt,st.OGC_SFS_BOUNDARY_RULE=st.MOD2_BOUNDARY_RULE,d(at.prototype,{interfaces_:function(){return[]},getClass:function(){return at}}),at.isRing=function(t){return!(t.length<4)&&!!t[0].equals2D(t[t.length-1])},at.ptNotInList=function(t,e){for(var n=0;n=t?e:[]},at.indexOf=function(t,e){for(var n=0;n0)&&(e=t[n]);return e},at.extract=function(t,e,n){e=ot.clamp(e,0,t.length),n=ot.clamp(n,-1,t.length);var r=n-e+1;n<0&&(r=0),e>=t.length&&(r=0),nr.length)return 1;if(n.length===0)return 0;var s=at.compare(n,r),o=at.isEqualReversed(n,r);return o?0:s},OLDcompare:function(t,e){var n=t,r=e;if(n.lengthr.length)return 1;if(n.length===0)return 0;for(var s=at.increasingDirection(n),o=at.increasingDirection(r),l=s>0?0:n.length-1,x=o>0?0:n.length-1,A=0;A0))return e.value;e=e.right}}return null},Vt.prototype.put=function(t,e){if(this.root_===null)return this.root_={key:t,value:e,left:null,right:null,parent:null,color:fn,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var n,r,s=this.root_;do if(n=s,r=t.compareTo(s.key),r<0)s=s.left;else{if(!(r>0)){var o=s.value;return s.value=e,o}s=s.right}while(s!==null);var l={key:t,left:null,right:null,value:e,parent:n,color:fn,getValue:function(){return this.value},getKey:function(){return this.key}};return r<0?n.left=l:n.right=l,this.fixAfterInsertion(l),this.size_++,null},Vt.prototype.fixAfterInsertion=function(t){for(t.color=Bn;t!=null&&t!=this.root_&&t.parent.color==Bn;)if(Et(t)==Mr(Et(Et(t)))){var e=Ni(Et(Et(t)));ke(e)==Bn?(Oe(Et(t),fn),Oe(e,fn),Oe(Et(Et(t)),Bn),t=Et(Et(t))):(t==Ni(Et(t))&&(t=Et(t),this.rotateLeft(t)),Oe(Et(t),fn),Oe(Et(Et(t)),Bn),this.rotateRight(Et(Et(t))))}else{var e=Mr(Et(Et(t)));ke(e)==Bn?(Oe(Et(t),fn),Oe(e,fn),Oe(Et(Et(t)),Bn),t=Et(Et(t))):(t==Mr(Et(t))&&(t=Et(t),this.rotateRight(t)),Oe(Et(t),fn),Oe(Et(Et(t)),Bn),this.rotateLeft(Et(Et(t))))}this.root_.color=fn},Vt.prototype.values=function(){var t=new C,e=this.getFirstEntry();if(e!==null)for(t.add(e.value);(e=Vt.successor(e))!==null;)t.add(e.value);return t},Vt.prototype.entrySet=function(){var t=new Rt,e=this.getFirstEntry();if(e!==null)for(t.add(e);(e=Vt.successor(e))!==null;)t.add(e);return t},Vt.prototype.rotateLeft=function(t){if(t!=null){var e=t.right;t.right=e.left,e.left!=null&&(e.left.parent=t),e.parent=t.parent,t.parent==null?this.root_=e:t.parent.left==t?t.parent.left=e:t.parent.right=e,e.left=t,t.parent=e}},Vt.prototype.rotateRight=function(t){if(t!=null){var e=t.left;t.left=e.right,e.right!=null&&(e.right.parent=t),e.parent=t.parent,t.parent==null?this.root_=e:t.parent.right==t?t.parent.right=e:t.parent.left=e,e.right=t,t.parent=e}},Vt.prototype.getFirstEntry=function(){var t=this.root_;if(t!=null)for(;t.left!=null;)t=t.left;return t},Vt.successor=function(t){if(t===null)return null;if(t.right!==null){for(var e=t.right;e.left!==null;)e=e.left;return e}for(var e=t.parent,n=t;e!==null&&n===e.right;)n=e,e=e.parent;return e},Vt.prototype.size=function(){return this.size_},d(or.prototype,{interfaces_:function(){return[]},getClass:function(){return or}}),Ci.prototype=new zt,Jt.prototype=new Ci,Jt.prototype.contains=function(t){for(var e=0,n=this.array_.length;e=0;){var l=s.substring(0,o);r.add(l),s=s.substring(o+n),o=s.indexOf(e)}s.length>0&&r.add(s);for(var x=new Array(r.size()).fill(null),A=0;A0)for(var o=s;o0&&r.append(" ");for(var o=0;o0&&r.append(","),r.append(ye.toString(t.getOrdinate(s,o)))}return r.append(")"),r.toString()}},kt.ensureValidRing=function(t,e){var n=e.size();if(n===0)return e;if(n<=3)return kt.createClosedRing(t,e,4);var r=e.getOrdinate(0,G.X)===e.getOrdinate(n-1,G.X)&&e.getOrdinate(0,G.Y)===e.getOrdinate(n-1,G.Y);return r?e:kt.createClosedRing(t,e,n+1)},kt.createClosedRing=function(t,e,n){var r=t.create(n,e.getDimension()),s=e.size();kt.copy(e,0,r,0,s);for(var o=s;o0&&kt.reverse(this.points),null}},getCoordinate:function(){return this.isEmpty()?null:this.points.getCoordinate(0)},getBoundaryDimension:function(){return this.isClosed()?tt.FALSE:0},isClosed:function(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},getEndPoint:function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},getDimension:function(){return 1},getLength:function(){return nt.computeLength(this.points)},getNumPoints:function(){return this.points.size()},reverse:function(){var t=this.points.copy();kt.reverse(t);var e=this.getFactory().createLineString(t);return e},compareToSameClass:function(){if(arguments.length===1){for(var t=arguments[0],e=t,n=0,r=0;n= 2)");this.points=t},isCoordinate:function(t){for(var e=0;e=1&&this.getCoordinateSequence().size()= 4)")},getGeometryType:function(){return"LinearRing"},copy:function(){return new qt(this.points.copy(),this.factory)},interfaces_:function(){return[]},getClass:function(){return qt}}),qt.MINIMUM_VALID_SIZE=4,qt.serialVersionUID=-0x3b229e262367a600,y(Zt,xt),d(Zt.prototype,{getSortIndex:function(){return Q.SORTINDEX_MULTIPOLYGON},equalsExact:function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];return!!this.isEquivalentClass(t)&&xt.prototype.equalsExact.call(this,t,e)}return xt.prototype.equalsExact.apply(this,arguments)},getBoundaryDimension:function(){return 1},getDimension:function(){return 2},reverse:function(){for(var t=this.geometries.length,e=new Array(t).fill(null),n=0;n0?e.createPoint(n[0]):e.createPoint():t},interfaces_:function(){return[Si]},getClass:function(){return bs}}),d(Ms.prototype,{edit:function(t,e){return t instanceof qt?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof mt?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof At?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},interfaces_:function(){return[Si]},getClass:function(){return Ms}}),xe.NoOpGeometryOperation=Rs,xe.CoordinateOperation=bs,xe.CoordinateSequenceOperation=Ms,d(Ee.prototype,{setOrdinate:function(t,e,n){switch(e){case G.X:this.coordinates[t].x=n;break;case G.Y:this.coordinates[t].y=n;break;case G.Z:this.coordinates[t].z=n;break;default:throw new a}},size:function(){return this.coordinates.length},getOrdinate:function(t,e){switch(e){case G.X:return this.coordinates[t].x;case G.Y:return this.coordinates[t].y;case G.Z:return this.coordinates[t].z}return c.NaN},getCoordinate:function(){if(arguments.length===1){var t=arguments[0];return this.coordinates[t]}if(arguments.length===2){var e=arguments[0],n=arguments[1];n.x=this.coordinates[e].x,n.y=this.coordinates[e].y,n.z=this.coordinates[e].z}},getCoordinateCopy:function(t){return new v(this.coordinates[t])},getDimension:function(){return this.dimension},getX:function(t){return this.coordinates[t].x},clone:function(){for(var t=new Array(this.size()).fill(null),e=0;e0){var t=new F(17*this.coordinates.length);t.append("("),t.append(this.coordinates[0]);for(var e=1;e3&&(r=3),r<2?new Ee(n):new Ee(n,r)}},interfaces_:function(){return[rt,m]},getClass:function(){return mn}}),mn.instance=function(){return mn.instanceObject},mn.serialVersionUID=-0x38e49fa6cf6f2e00,mn.instanceObject=new mn;var Ke,$o=Object.defineProperty,ta=Go({delete:zo,has:Xo,get:Vo,set:Uo,keys:Ho,values:Wo,entries:Zo,forEach:jo,clear:Yo}),ea=typeof Map<"u"&&Map.prototype.values?Map:ta;nn.prototype=new $e,nn.prototype.get=function(t){return this.map_.get(t)||null},nn.prototype.put=function(t,e){return this.map_.set(t,e),e},nn.prototype.values=function(){for(var t=new C,e=this.map_.values(),n=e.next();!n.done;)t.add(n.value),n=e.next();return t},nn.prototype.entrySet=function(){var t=new Rt;return this.map_.entries().forEach(function(e){return t.add(e)}),t},nn.prototype.size=function(){return this.map_.size()},d(St.prototype,{equals:function(t){if(!(t instanceof St))return!1;var e=t;return this.modelType===e.modelType&&this.scale===e.scale},compareTo:function(t){var e=t,n=this.getMaximumSignificantDigits(),r=e.getMaximumSignificantDigits();return new Y(n).compareTo(new Y(r))},getScale:function(){return this.scale},isFloating:function(){return this.modelType===St.FLOATING||this.modelType===St.FLOATING_SINGLE},getType:function(){return this.modelType},toString:function(){var t="UNKNOWN";return this.modelType===St.FLOATING?t="Floating":this.modelType===St.FLOATING_SINGLE?t="Floating-Single":this.modelType===St.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t},makePrecise:function(){if(typeof arguments[0]=="number"){var t=arguments[0];if(c.isNaN(t))return t;if(this.modelType===St.FLOATING_SINGLE){var e=t;return e}return this.modelType===St.FIXED?Math.round(t*this.scale)/this.scale:t}if(arguments[0]instanceof v){var n=arguments[0];if(this.modelType===St.FLOATING)return null;n.x=this.makePrecise(n.x),n.y=this.makePrecise(n.y)}},getMaximumSignificantDigits:function(){var t=16;return this.modelType===St.FLOATING?t=16:this.modelType===St.FLOATING_SINGLE?t=6:this.modelType===St.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t},setScale:function(t){this.scale=Math.abs(t)},interfaces_:function(){return[m,f]},getClass:function(){return St}}),St.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},d(Xe.prototype,{readResolve:function(){return Xe.nameToTypeMap.get(this.name)},toString:function(){return this.name},interfaces_:function(){return[m]},getClass:function(){return Xe}}),Xe.serialVersionUID=-552860263173159e4,Xe.nameToTypeMap=new nn,St.Type=Xe,St.serialVersionUID=7777263578777804e3,St.FIXED=new Xe("FIXED"),St.FLOATING=new Xe("FLOATING"),St.FLOATING_SINGLE=new Xe("FLOATING SINGLE"),St.maximumPreciseValue=9007199254740992,d(yt.prototype,{toGeometry:function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new v(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new v(t.getMinX(),t.getMinY()),new v(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new v(t.getMinX(),t.getMinY()),new v(t.getMinX(),t.getMaxY()),new v(t.getMaxX(),t.getMaxY()),new v(t.getMaxX(),t.getMinY()),new v(t.getMinX(),t.getMinY())]),null)},createLineString:function(){if(arguments.length===0)return this.createLineString(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLineString(t!==null?this.getCoordinateSequenceFactory().create(t):null)}if(X(arguments[0],G)){var e=arguments[0];return new mt(e,this)}}},createMultiLineString:function(){if(arguments.length===0)return new ce(null,this);if(arguments.length===1){var t=arguments[0];return new ce(t,this)}},buildGeometry:function(t){for(var e=null,n=!1,r=!1,s=t.iterator();s.hasNext();){var o=s.next(),l=o.getClass();e===null&&(e=l),l!==e&&(n=!0),o.isGeometryCollectionOrDerived()&&(r=!0)}if(e===null)return this.createGeometryCollection();if(n||r)return this.createGeometryCollection(yt.toGeometryArray(t));var x=t.iterator().next(),A=t.size()>1;if(A){if(x instanceof Mt)return this.createMultiPolygon(yt.toPolygonArray(t));if(x instanceof mt)return this.createMultiLineString(yt.toLineStringArray(t));if(x instanceof At)return this.createMultiPoint(yt.toPointArray(t));I.shouldNeverReachHere("Unhandled class: "+x.getClass().getName())}return x},createMultiPointFromCoords:function(t){return this.createMultiPoint(t!==null?this.getCoordinateSequenceFactory().create(t):null)},createPoint:function(){if(arguments.length===0)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof v){var t=arguments[0];return this.createPoint(t!==null?this.getCoordinateSequenceFactory().create([t]):null)}if(X(arguments[0],G)){var e=arguments[0];return new At(e,this)}}},getCoordinateSequenceFactory:function(){return this.coordinateSequenceFactory},createPolygon:function(){if(arguments.length===0)return new Mt(null,null,this);if(arguments.length===1){if(X(arguments[0],G)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}if(arguments[0]instanceof qt){var n=arguments[0];return this.createPolygon(n,null)}}else if(arguments.length===2){var r=arguments[0],s=arguments[1];return new Mt(r,s,this)}},getSRID:function(){return this.SRID},createGeometryCollection:function(){if(arguments.length===0)return new xt(null,this);if(arguments.length===1){var t=arguments[0];return new xt(t,this)}},createGeometry:function(t){var e=new xe(this);return e.edit(t,{edit:function(){if(arguments.length===2){var n=arguments[0];return this.coordinateSequenceFactory.create(n)}}})},getPrecisionModel:function(){return this.precisionModel},createLinearRing:function(){if(arguments.length===0)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(t!==null?this.getCoordinateSequenceFactory().create(t):null)}if(X(arguments[0],G)){var e=arguments[0];return new qt(e,this)}}},createMultiPolygon:function(){if(arguments.length===0)return new Zt(null,this);if(arguments.length===1){var t=arguments[0];return new Zt(t,this)}},createMultiPoint:function(){if(arguments.length===0)return new fe(null,this);if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return new fe(t,this)}if(arguments[0]instanceof Array){var e=arguments[0];return this.createMultiPoint(e!==null?this.getCoordinateSequenceFactory().create(e):null)}if(X(arguments[0],G)){var n=arguments[0];if(n===null)return this.createMultiPoint(new Array(0).fill(null));for(var r=new Array(n.size()).fill(null),s=0;sn?(this.intLineIndex[t][0]=0,this.intLineIndex[t][1]=1):(this.intLineIndex[t][0]=1,this.intLineIndex[t][1]=0)}},isProper:function(){return this.hasIntersection()&&this._isProper},setPrecisionModel:function(t){this.precisionModel=t},isInteriorIntersection:function(){if(arguments.length===0)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(arguments.length===1){for(var t=arguments[0],e=0;es?r:s;else{var l=Math.abs(t.x-e.x),x=Math.abs(t.y-e.y);o=r>s?l:x,o!==0||t.equals(e)||(o=Math.max(l,x))}return I.isTrue(!(o===0&&!t.equals(e)),"Bad distance calculation"),o},Pt.nonRobustComputeEdgeDistance=function(t,e,n){var r=t.x-e.x,s=t.y-e.y,o=Math.sqrt(r*r+s*s);return I.isTrue(!(o===0&&!t.equals(e)),"Invalid distance calculation"),o},Pt.DONT_INTERSECT=0,Pt.DO_INTERSECT=1,Pt.COLLINEAR=2,Pt.NO_INTERSECTION=0,Pt.POINT_INTERSECTION=1,Pt.COLLINEAR_INTERSECTION=2,y(Ht,Pt),d(Ht.prototype,{isInSegmentEnvelopes:function(t){var e=new B(this.inputLines[0][0],this.inputLines[0][1]),n=new B(this.inputLines[1][0],this.inputLines[1][1]);return e.contains(t)&&n.contains(t)},computeIntersection:function(){if(arguments.length!==3)return Pt.prototype.computeIntersection.apply(this,arguments);var t=arguments[0],e=arguments[1],n=arguments[2];return this._isProper=!1,B.intersects(e,n,t)&&nt.orientationIndex(e,n,t)===0&&nt.orientationIndex(n,e,t)===0?(this._isProper=!0,(t.equals(e)||t.equals(n))&&(this._isProper=!1),this.result=Pt.POINT_INTERSECTION,null):void(this.result=Pt.NO_INTERSECTION)},normalizeToMinimum:function(t,e,n,r,s){s.x=this.smallestInAbsValue(t.x,e.x,n.x,r.x),s.y=this.smallestInAbsValue(t.y,e.y,n.y,r.y),t.x-=s.x,t.y-=s.y,e.x-=s.x,e.y-=s.y,n.x-=s.x,n.y-=s.y,r.x-=s.x,r.y-=s.y},safeHCoordinateIntersection:function(t,e,n,r){var s=null;try{s=j.intersection(t,e,n,r)}catch(o){if(!(o instanceof W))throw o;s=Ht.nearestEndpoint(t,e,n,r)}finally{}return s},intersection:function(t,e,n,r){var s=this.intersectionWithNormalization(t,e,n,r);return this.isInSegmentEnvelopes(s)||(s=new v(Ht.nearestEndpoint(t,e,n,r))),this.precisionModel!==null&&this.precisionModel.makePrecise(s),s},smallestInAbsValue:function(t,e,n,r){var s=t,o=Math.abs(s);return Math.abs(e)1e-4&&k.out.println("Distance = "+s.distance(o))},intersectionWithNormalization:function(t,e,n,r){var s=new v(t),o=new v(e),l=new v(n),x=new v(r),A=new v;this.normalizeToEnvCentre(s,o,l,x,A);var V=this.safeHCoordinateIntersection(s,o,l,x);return V.x+=A.x,V.y+=A.y,V},computeCollinearIntersection:function(t,e,n,r){var s=B.intersects(t,e,n),o=B.intersects(t,e,r),l=B.intersects(n,r,t),x=B.intersects(n,r,e);return s&&o?(this.intPt[0]=n,this.intPt[1]=r,Pt.COLLINEAR_INTERSECTION):l&&x?(this.intPt[0]=t,this.intPt[1]=e,Pt.COLLINEAR_INTERSECTION):s&&l?(this.intPt[0]=n,this.intPt[1]=t,!n.equals(t)||o||x?Pt.COLLINEAR_INTERSECTION:Pt.POINT_INTERSECTION):s&&x?(this.intPt[0]=n,this.intPt[1]=e,!n.equals(e)||o||l?Pt.COLLINEAR_INTERSECTION:Pt.POINT_INTERSECTION):o&&l?(this.intPt[0]=r,this.intPt[1]=t,!r.equals(t)||s||x?Pt.COLLINEAR_INTERSECTION:Pt.POINT_INTERSECTION):o&&x?(this.intPt[0]=r,this.intPt[1]=e,!r.equals(e)||s||l?Pt.COLLINEAR_INTERSECTION:Pt.POINT_INTERSECTION):Pt.NO_INTERSECTION},normalizeToEnvCentre:function(t,e,n,r,s){var o=t.xe.x?t.x:e.x,A=t.y>e.y?t.y:e.y,V=n.xr.x?n.x:r.x,$=n.y>r.y?n.y:r.y,ut=o>V?o:V,ft=xZ?l:Z,Ot=A<$?A:$,Xt=(ut+ft)/2,Ve=(gt+Ot)/2;s.x=Xt,s.y=Ve,t.x-=s.x,t.y-=s.y,e.x-=s.x,e.y-=s.y,n.x-=s.x,n.y-=s.y,r.x-=s.x,r.y-=s.y},computeIntersect:function(t,e,n,r){if(this._isProper=!1,!B.intersects(t,e,n,r))return Pt.NO_INTERSECTION;var s=nt.orientationIndex(t,e,n),o=nt.orientationIndex(t,e,r);if(s>0&&o>0||s<0&&o<0)return Pt.NO_INTERSECTION;var l=nt.orientationIndex(n,r,t),x=nt.orientationIndex(n,r,e);if(l>0&&x>0||l<0&&x<0)return Pt.NO_INTERSECTION;var A=s===0&&o===0&&l===0&&x===0;return A?this.computeCollinearIntersection(t,e,n,r):(s===0||o===0||l===0||x===0?(this._isProper=!1,t.equals2D(n)||t.equals2D(r)?this.intPt[0]=t:e.equals2D(n)||e.equals2D(r)?this.intPt[0]=e:s===0?this.intPt[0]=new v(n):o===0?this.intPt[0]=new v(r):l===0?this.intPt[0]=new v(t):x===0&&(this.intPt[0]=new v(e))):(this._isProper=!0,this.intPt[0]=this.intersection(t,e,n,r)),Pt.POINT_INTERSECTION)},interfaces_:function(){return[]},getClass:function(){return Ht}}),Ht.nearestEndpoint=function(t,e,n,r){var s=t,o=nt.distancePointLine(t,n,r),l=nt.distancePointLine(e,n,r);return l0?n>0?-s:s:n>0?s:-s;if(e===0||n===0)return r>0?t>0?s:-s:t>0?-s:s;if(0=r?(t=-t,e=-e,n=-n,r=-r):(s=-s,o=-t,t=-n,n=o,o=-e,e=-r,r=o),0=n))return-s;s=-s,t=-t,n=-n}for(;;){if(l=Math.floor(n/t),n-=l*t,r-=l*e,r<0)return-s;if(r>e)return s;if(t>n+n){if(er+r)return-s;n=t-n,r=e-r,s=-s}if(r===0)return n===0?0:-s;if(n===0||(l=Math.floor(t/n),t-=l*n,e-=l*r,e<0))return s;if(e>r)return-s;if(n>t+t){if(re+e)return s;t=n-t,e=r-e,s=-s}if(e===0)return t===0?0:s;if(t===0)return-s}},d(kn.prototype,{countSegment:function(t,e){if(t.xr&&(n=e.x,r=t.x),this.p.x>=n&&this.p.x<=r&&(this.isPointOnSegment=!0),null}if(t.y>this.p.y&&e.y<=this.p.y||e.y>this.p.y&&t.y<=this.p.y){var s=t.x-this.p.x,o=t.y-this.p.y,l=e.x-this.p.x,x=e.y-this.p.y,A=Vn.signOfDet2x2(s,o,l,x);if(A===0)return this.isPointOnSegment=!0,null;x0&&this.crossingCount++}},isPointInPolygon:function(){return this.getLocation()!==L.EXTERIOR},getLocation:function(){return this.isPointOnSegment?L.BOUNDARY:this.crossingCount%2===1?L.INTERIOR:L.EXTERIOR},isOnSegment:function(){return this.isPointOnSegment},interfaces_:function(){return[]},getClass:function(){return kn}}),kn.locatePointInRing=function(){if(arguments[0]instanceof v&&X(arguments[1],G)){for(var t=arguments[0],e=arguments[1],n=new kn(t),r=new v,s=new v,o=1;o1||A<0||A>1)&&(s=!0)}}else s=!0;return s?ot.min(nt.distancePointLine(t,n,r),nt.distancePointLine(e,n,r),nt.distancePointLine(n,t,e),nt.distancePointLine(r,t,e)):0},nt.isPointInRing=function(t,e){return nt.locatePointInRing(t,e)!==L.EXTERIOR},nt.computeLength=function(t){var e=t.size();if(e<=1)return 0;var n=0,r=new v;t.getCoordinate(0,r);for(var s=r.x,o=r.y,l=1;ln.y&&(n=o,r=s)}var l=r;do l-=1,l<0&&(l=e);while(t[l].equals2D(n)&&l!==r);var x=r;do x=(x+1)%e;while(t[x].equals2D(n)&&x!==r);var A=t[l],V=t[x];if(A.equals2D(n)||V.equals2D(n)||A.equals2D(V))return!1;var Z=nt.computeOrientation(A,n,V);return Z===0?A.x>V.x:Z>0},nt.locatePointInRing=function(t,e){return kn.locatePointInRing(t,e)},nt.distancePointLinePerpendicular=function(t,e,n){var r=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),s=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/r;return Math.abs(s)*Math.sqrt(r)},nt.computeOrientation=function(t,e,n){return nt.orientationIndex(t,e,n)},nt.distancePointLine=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(e.length===0)throw new a;for(var n=t.distance(e[0]),r=0;r=1)return o.distance(x);var Z=((l.y-o.y)*(x.x-l.x)-(l.x-o.x)*(x.y-l.y))/A;return Math.abs(Z)*Math.sqrt(A)}},nt.isOnLine=function(t,e){for(var n=new Ht,r=1;r=0&&n>=0||e<=0&&n<=0?Math.max(e,n):0}if(arguments[0]instanceof v){var r=arguments[0];return nt.orientationIndex(this.p0,this.p1,r)}},toGeometry:function(t){return t.createLineString([this.p0,this.p1])},isVertical:function(){return this.p0.x===this.p1.x},equals:function(t){if(!(t instanceof dt))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},intersection:function(t){var e=new Ht;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},project:function(){if(arguments[0]instanceof v){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new v(t);var e=this.projectionFactor(t),n=new v;return n.x=this.p0.x+e*(this.p1.x-this.p0.x),n.y=this.p0.y+e*(this.p1.y-this.p0.y),n}if(arguments[0]instanceof dt){var r=arguments[0],s=this.projectionFactor(r.p0),o=this.projectionFactor(r.p1);if(s>=1&&o>=1||s<=0&&o<=0)return null;var l=this.project(r.p0);s<0&&(l=this.p0),s>1&&(l=this.p1);var x=this.project(r.p1);return o<0&&(x=this.p0),o>1&&(x=this.p1),new dt(l,x)}},normalize:function(){this.p1.compareTo(this.p0)<0&&this.reverse()},angle:function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},getCoordinate:function(t){return t===0?this.p0:this.p1},distancePerpendicular:function(t){return nt.distancePointLinePerpendicular(t,this.p0,this.p1)},minY:function(){return Math.min(this.p0.y,this.p1.y)},midPoint:function(){return dt.midPoint(this.p0,this.p1)},projectionFactor:function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,r=e*e+n*n;if(r<=0)return c.NaN;var s=((t.x-this.p0.x)*e+(t.y-this.p0.y)*n)/r;return s},closestPoints:function(t){var e=this.intersection(t);if(e!==null)return[e,e];var n=new Array(2).fill(null),r=c.MAX_VALUE,s=null,o=this.closestPoint(t.p0);r=o.distance(t.p0),n[0]=o,n[1]=t.p0;var l=this.closestPoint(t.p1);s=l.distance(t.p1),s0&&e<1)return this.project(t);var n=this.p0.distance(t),r=this.p1.distance(t);return n1||c.isNaN(e))&&(e=1),e},toString:function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},isHorizontal:function(){return this.p0.y===this.p1.y},distance:function(){if(arguments[0]instanceof dt){var t=arguments[0];return nt.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}if(arguments[0]instanceof v){var e=arguments[0];return nt.distancePointLine(e,this.p0,this.p1)}},pointAlong:function(t){var e=new v;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e},hashCode:function(){var t=java.lang.Double.doubleToLongBits(this.p0.x);t^=31*java.lang.Double.doubleToLongBits(this.p0.y);var e=Math.trunc(t)^Math.trunc(t>>32),n=java.lang.Double.doubleToLongBits(this.p1.x);n^=31*java.lang.Double.doubleToLongBits(this.p1.y);var r=Math.trunc(n)^Math.trunc(n>>32);return e^r},interfaces_:function(){return[f,m]},getClass:function(){return dt}}),dt.midPoint=function(t,e){return new v((t.x+e.x)/2,(t.y+e.y)/2)},dt.serialVersionUID=0x2d2172135f411c00,d(bt.prototype,{isIntersects:function(){return!this.isDisjoint()},isCovers:function(){var t=bt.isTrue(this.matrix[L.INTERIOR][L.INTERIOR])||bt.isTrue(this.matrix[L.INTERIOR][L.BOUNDARY])||bt.isTrue(this.matrix[L.BOUNDARY][L.INTERIOR])||bt.isTrue(this.matrix[L.BOUNDARY][L.BOUNDARY]);return t&&this.matrix[L.EXTERIOR][L.INTERIOR]===tt.FALSE&&this.matrix[L.EXTERIOR][L.BOUNDARY]===tt.FALSE},isCoveredBy:function(){var t=bt.isTrue(this.matrix[L.INTERIOR][L.INTERIOR])||bt.isTrue(this.matrix[L.INTERIOR][L.BOUNDARY])||bt.isTrue(this.matrix[L.BOUNDARY][L.INTERIOR])||bt.isTrue(this.matrix[L.BOUNDARY][L.BOUNDARY]);return t&&this.matrix[L.INTERIOR][L.EXTERIOR]===tt.FALSE&&this.matrix[L.BOUNDARY][L.EXTERIOR]===tt.FALSE},set:function(){if(arguments.length===1)for(var t=arguments[0],e=0;e=0&&e>=0&&this.setAtLeast(t,e,n)},isWithin:function(){return bt.isTrue(this.matrix[L.INTERIOR][L.INTERIOR])&&this.matrix[L.INTERIOR][L.EXTERIOR]===tt.FALSE&&this.matrix[L.BOUNDARY][L.EXTERIOR]===tt.FALSE},isTouches:function(t,e){return t>e?this.isTouches(e,t):(t===tt.A&&e===tt.A||t===tt.L&&e===tt.L||t===tt.L&&e===tt.A||t===tt.P&&e===tt.A||t===tt.P&&e===tt.L)&&this.matrix[L.INTERIOR][L.INTERIOR]===tt.FALSE&&(bt.isTrue(this.matrix[L.INTERIOR][L.BOUNDARY])||bt.isTrue(this.matrix[L.BOUNDARY][L.INTERIOR])||bt.isTrue(this.matrix[L.BOUNDARY][L.BOUNDARY]))},isOverlaps:function(t,e){return t===tt.P&&e===tt.P||t===tt.A&&e===tt.A?bt.isTrue(this.matrix[L.INTERIOR][L.INTERIOR])&&bt.isTrue(this.matrix[L.INTERIOR][L.EXTERIOR])&&bt.isTrue(this.matrix[L.EXTERIOR][L.INTERIOR]):t===tt.L&&e===tt.L&&this.matrix[L.INTERIOR][L.INTERIOR]===1&&bt.isTrue(this.matrix[L.INTERIOR][L.EXTERIOR])&&bt.isTrue(this.matrix[L.EXTERIOR][L.INTERIOR])},isEquals:function(t,e){return t===e&&bt.isTrue(this.matrix[L.INTERIOR][L.INTERIOR])&&this.matrix[L.INTERIOR][L.EXTERIOR]===tt.FALSE&&this.matrix[L.BOUNDARY][L.EXTERIOR]===tt.FALSE&&this.matrix[L.EXTERIOR][L.INTERIOR]===tt.FALSE&&this.matrix[L.EXTERIOR][L.BOUNDARY]===tt.FALSE},toString:function(){for(var t=new F("123456789"),e=0;e<3;e++)for(var n=0;n<3;n++)t.setCharAt(3*e+n,tt.toDimensionSymbol(this.matrix[e][n]));return t.toString()},setAll:function(t){for(var e=0;e<3;e++)for(var n=0;n<3;n++)this.matrix[e][n]=t},get:function(t,e){return this.matrix[t][e]},transpose:function(){var t=this.matrix[1][0];return this.matrix[1][0]=this.matrix[0][1],this.matrix[0][1]=t,t=this.matrix[2][0],this.matrix[2][0]=this.matrix[0][2],this.matrix[0][2]=t,t=this.matrix[2][1],this.matrix[2][1]=this.matrix[1][2],this.matrix[1][2]=t,this},matches:function(t){if(t.length!==9)throw new a;for(var e=0;e<3;e++)for(var n=0;n<3;n++)if(!bt.matches(this.matrix[e][n],t.charAt(3*e+n)))return!1;return!0},add:function(t){for(var e=0;e<3;e++)for(var n=0;n<3;n++)this.setAtLeast(e,n,t.get(e,n))},isDisjoint:function(){return this.matrix[L.INTERIOR][L.INTERIOR]===tt.FALSE&&this.matrix[L.INTERIOR][L.BOUNDARY]===tt.FALSE&&this.matrix[L.BOUNDARY][L.INTERIOR]===tt.FALSE&&this.matrix[L.BOUNDARY][L.BOUNDARY]===tt.FALSE},isCrosses:function(t,e){return t===tt.P&&e===tt.L||t===tt.P&&e===tt.A||t===tt.L&&e===tt.A?bt.isTrue(this.matrix[L.INTERIOR][L.INTERIOR])&&bt.isTrue(this.matrix[L.INTERIOR][L.EXTERIOR]):t===tt.L&&e===tt.P||t===tt.A&&e===tt.P||t===tt.A&&e===tt.L?bt.isTrue(this.matrix[L.INTERIOR][L.INTERIOR])&&bt.isTrue(this.matrix[L.EXTERIOR][L.INTERIOR]):t===tt.L&&e===tt.L&&this.matrix[L.INTERIOR][L.INTERIOR]===0},interfaces_:function(){return[p]},getClass:function(){return bt}}),bt.matches=function(){if(Number.isInteger(arguments[0])&&typeof arguments[1]=="string"){var t=arguments[0],e=arguments[1];return e===tt.SYM_DONTCARE||e===tt.SYM_TRUE&&(t>=0||t===tt.TRUE)||e===tt.SYM_FALSE&&t===tt.FALSE||e===tt.SYM_P&&t===tt.P||e===tt.SYM_L&&t===tt.L||e===tt.SYM_A&&t===tt.A}if(typeof arguments[0]=="string"&&typeof arguments[1]=="string"){var n=arguments[0],r=arguments[1],s=new bt(n);return s.matches(r)}},bt.isTrue=function(t){return t>=0||t===tt.TRUE};var na=Object.freeze({Coordinate:v,CoordinateList:q,Envelope:B,LineSegment:dt,GeometryFactory:yt,Geometry:Q,Point:At,LineString:mt,LinearRing:qt,Polygon:Mt,GeometryCollection:xt,MultiPoint:fe,MultiLineString:ce,MultiPolygon:Zt,Dimension:tt,IntersectionMatrix:bt,PrecisionModel:St});d(rn.prototype,{addPoint:function(t){this.ptCount+=1,this.ptCentSum.x+=t.x,this.ptCentSum.y+=t.y},setBasePoint:function(t){this.areaBasePt===null&&(this.areaBasePt=t)},addLineSegments:function(t){for(var e=0,n=0;n0&&this.addPoint(t[0])},addHole:function(t){for(var e=nt.isCCW(t),n=0;n0)t.x=this.cg3.x/3/this.areasum2,t.y=this.cg3.y/3/this.areasum2;else if(this.totalLength>0)t.x=this.lineCentSum.x/this.totalLength,t.y=this.lineCentSum.y/this.totalLength;else{if(!(this.ptCount>0))return null;t.x=this.ptCentSum.x/this.ptCount,t.y=this.ptCentSum.y/this.ptCount}return t},addShell:function(t){t.length>0&&this.setBasePoint(t[0]);for(var e=!nt.isCCW(t),n=0;n=this.size())throw new IndexOutOfBoundsException;return this.array_[t]},re.prototype.push=function(t){return this.array_.push(t),t},re.prototype.pop=function(t){if(this.array_.length===0)throw new Li;return this.array_.pop()},re.prototype.peek=function(){if(this.array_.length===0)throw new Li;return this.array_[this.array_.length-1]},re.prototype.empty=function(){return this.array_.length===0},re.prototype.isEmpty=function(){return this.empty()},re.prototype.search=function(t){return this.array_.indexOf(t)},re.prototype.size=function(){return this.array_.length},re.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e50&&(t=this.reduce(this.inputPts));var e=this.preSort(t),n=this.grahamScan(e),r=this.toCoordinateArray(n);return this.lineOrPolygon(r)},padArray3:function(t){for(var e=new Array(3).fill(null),n=0;ne[2].y&&(e[2]=t[r]),t[r].x+t[r].y>e[3].x+e[3].y&&(e[3]=t[r]),t[r].x>e[4].x&&(e[4]=t[r]),t[r].x-t[r].y>e[5].x-e[5].y&&(e[5]=t[r]),t[r].y0;)e=n.pop();e=n.push(e),e=n.push(t[r])}return e=n.push(t[0]),n},interfaces_:function(){return[]},getClass:function(){return sn}}),sn.extractCoordinates=function(t){var e=new ar;return t.apply(e),e.getCoordinates()},d(ur.prototype,{compare:function(t,e){var n=t,r=e;return ur.polarCompare(this.origin,n,r)},interfaces_:function(){return[g]},getClass:function(){return ur}}),ur.polarCompare=function(t,e,n){var r=e.x-t.x,s=e.y-t.y,o=n.x-t.x,l=n.y-t.y,x=nt.computeOrientation(t,e,n);if(x===nt.COUNTERCLOCKWISE)return 1;if(x===nt.CLOCKWISE)return-1;var A=r*r+s*s,V=o*o+l*l;return AV?1:0},sn.RadialComparator=ur,d(oe.prototype,{transformPoint:function(t,e){return this.factory.createPoint(this.transformCoordinates(t.getCoordinateSequence(),t))},transformPolygon:function(t,e){var n=!0,r=this.transformLinearRing(t.getExteriorRing(),t);r!==null&&r instanceof qt&&!r.isEmpty()||(n=!1);for(var s=new C,o=0;o0&&r<4&&!this.preserveType?this.factory.createLineString(n):this.factory.createLinearRing(n)},interfaces_:function(){return[]},getClass:function(){return oe}}),d(lr.prototype,{snapVertices:function(t,e){for(var n=this._isClosed?t.size()-1:t.size(),r=0;r=0&&t.add(o+1,new v(s),!1)}},findSegmentIndexToSnap:function(t,e){for(var n=c.MAX_VALUE,r=-1,s=0;se&&(e=r)}return e}if(arguments.length===2){var s=arguments[0],o=arguments[1];return Math.min(ie.computeOverlaySnapTolerance(s),ie.computeOverlaySnapTolerance(o))}},ie.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal(),n=Math.min(e.getHeight(),e.getWidth()),r=n*ie.SNAP_PRECISION_FACTOR;return r},ie.snapToSelf=function(t,e,n){var r=new ie(t);return r.snapToSelf(e,n)},ie.SNAP_PRECISION_FACTOR=1e-9,y(Pr,oe),d(Pr.prototype,{snapLine:function(t,e){var n=new lr(t,this.snapTolerance);return n.setAllowSnappingToSourceVertices(this.isSelfSnap),n.snapTo(e)},transformCoordinates:function(t,e){var n=t.toCoordinateArray(),r=this.snapLine(n,this.snapPts);return this.factory.getCoordinateSequenceFactory().create(r)},interfaces_:function(){return[]},getClass:function(){return Pr}}),d(Ie.prototype,{getCommon:function(){return c.longBitsToDouble(this.commonBits)},add:function(t){var e=c.doubleToLongBits(t);if(this.isFirst)return this.commonBits=e,this.commonSignExp=Ie.signExpBits(this.commonBits),this.isFirst=!1,null;var n=Ie.signExpBits(e);return n!==this.commonSignExp?(this.commonBits=0,null):(this.commonMantissaBitsCount=Ie.numCommonMostSigMantissaBits(this.commonBits,e),void(this.commonBits=Ie.zeroLowerBits(this.commonBits,64-(12+this.commonMantissaBitsCount))))},toString:function(){if(arguments.length===1){var t=arguments[0],e=c.longBitsToDouble(t),n=Long.toBinaryString(t),r="0000000000000000000000000000000000000000000000000000000000000000"+n,s=r.substring(r.length-64),o=s.substring(0,1)+" "+s.substring(1,12)+"(exp) "+s.substring(12)+" [ "+e+" ]";return o}},interfaces_:function(){return[]},getClass:function(){return Ie}}),Ie.getBit=function(t,e){var n=1<>52},Ie.zeroLowerBits=function(t,e){var n=(1<=0;r--){if(Ie.getBit(t,r)!==Ie.getBit(e,r))return n;n++}return 52},d(Tr.prototype,{addCommonBits:function(t){var e=new Or(this.commonCoord);t.apply(e),t.geometryChanged()},removeCommonBits:function(t){if(this.commonCoord.x===0&&this.commonCoord.y===0)return t;var e=new v(this.commonCoord);e.x=-e.x,e.y=-e.y;var n=new Or(e);return t.apply(n),t.geometryChanged(),t},getCommonCoordinate:function(){return this.commonCoord},add:function(t){t.apply(this.ccFilter),this.commonCoord=this.ccFilter.getCommonCoordinate()},interfaces_:function(){return[]},getClass:function(){return Tr}}),d(Ri.prototype,{filter:function(t){this.commonBitsX.add(t.x),this.commonBitsY.add(t.y)},getCommonCoordinate:function(){return new v(this.commonBitsX.getCommon(),this.commonBitsY.getCommon())},interfaces_:function(){return[lt]},getClass:function(){return Ri}}),d(Or.prototype,{filter:function(t,e){var n=t.getOrdinate(e,0)+this.trans.x,r=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,n),t.setOrdinate(e,1,r)},isDone:function(){return!1},isGeometryChanged:function(){return!0},interfaces_:function(){return[zn]},getClass:function(){return Or}}),Tr.CommonCoordinateFilter=Ri,Tr.Translater=Or,d(Xn.prototype,{next:function(){if(this.atStart)return this.atStart=!1,Xn.isAtomic(this.parent)&&this.index++,this.parent;if(this.subcollectionIterator!==null){if(this.subcollectionIterator.hasNext())return this.subcollectionIterator.next();this.subcollectionIterator=null}if(this.index>=this.max)throw new O;var t=this.parent.getGeometryN(this.index++);return t instanceof xt?(this.subcollectionIterator=new Xn(t),this.subcollectionIterator.next()):t},remove:function(){throw new UnsupportedOperationException(this.getClass().getName())},hasNext:function(){if(this.atStart)return!0;if(this.subcollectionIterator!==null){if(this.subcollectionIterator.hasNext())return!0;this.subcollectionIterator=null}return!(this.index>=this.max)},interfaces_:function(){return[T]},getClass:function(){return Xn}}),Xn.isAtomic=function(t){return!(t instanceof xt)},d(Un.prototype,{locateInternal:function(){if(arguments[0]instanceof v&&arguments[1]instanceof Mt){var t=arguments[0],e=arguments[1];if(e.isEmpty())return L.EXTERIOR;var n=e.getExteriorRing(),r=this.locateInPolygonRing(t,n);if(r===L.EXTERIOR)return L.EXTERIOR;if(r===L.BOUNDARY)return L.BOUNDARY;for(var s=0;s0||this.isIn?L.INTERIOR:L.EXTERIOR)},interfaces_:function(){return[]},getClass:function(){return Un}}),d(hr.prototype,{interfaces_:function(){return[]},getClass:function(){return hr}}),hr.octant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];if(t===0&&e===0)throw new a;var n=Math.abs(t),r=Math.abs(e);return t>=0?e>=0?n>=r?0:1:n>=r?7:6:e>=0?n>=r?3:2:n>=r?4:5}if(arguments[0]instanceof v&&arguments[1]instanceof v){var s=arguments[0],o=arguments[1],l=o.x-s.x,x=o.y-s.y;if(l===0&&x===0)throw new a;return hr.octant(l,x)}},d(_r.prototype,{getCoordinates:function(){},size:function(){},getCoordinate:function(t){},isClosed:function(){},setData:function(t){},getData:function(){},interfaces_:function(){return[]},getClass:function(){return _r}}),d(Os.prototype,{getCoordinates:function(){return this.pts},size:function(){return this.pts.length},getCoordinate:function(t){return this.pts[t]},isClosed:function(){return this.pts[0].equals(this.pts[this.pts.length-1])},getSegmentOctant:function(t){return t===this.pts.length-1?-1:hr.octant(this.getCoordinate(t),this.getCoordinate(t+1))},setData:function(t){this.data=t},getData:function(){return this.data},toString:function(){return $t.toLineString(new Ee(this.pts))},interfaces_:function(){return[_r]},getClass:function(){return Os}}),d(bi.prototype,{getBounds:function(){},interfaces_:function(){return[]},getClass:function(){return bi}}),d(on.prototype,{getItem:function(){return this.item},getBounds:function(){return this.bounds},interfaces_:function(){return[bi,m]},getClass:function(){return on}}),d(_s.prototype,{poll:function(){if(this.isEmpty())return null;var t=this.items.get(1);return this.items.set(1,this.items.get(this._size)),this._size-=1,this.reorder(1),t},size:function(){return this._size},reorder:function(t){for(var e=null,n=this.items.get(t);2*t<=this._size&&(e=2*t,e!==this._size&&this.items.get(e+1).compareTo(this.items.get(e))<0&&e++,this.items.get(e).compareTo(n)<0);t=e)this.items.set(t,this.items.get(e));this.items.set(t,n)},clear:function(){this._size=0,this.items.clear()},isEmpty:function(){return this._size===0},add:function(t){this.items.add(null),this._size+=1;var e=this._size;for(this.items.set(0,t);t.compareTo(this.items.get(Math.trunc(e/2)))<0;e/=2)this.items.set(e,this.items.get(Math.trunc(e/2)));this.items.set(e,t)},interfaces_:function(){return[]},getClass:function(){return _s}}),d(Cn.prototype,{visitItem:function(t){},interfaces_:function(){return[]},getClass:function(){return Cn}}),d(Mi.prototype,{insert:function(t,e){},remove:function(t,e){},query:function(){},interfaces_:function(){return[]},getClass:function(){return Mi}}),d(se.prototype,{getLevel:function(){return this.level},size:function(){return this.childBoundables.size()},getChildBoundables:function(){return this.childBoundables},addChildBoundable:function(t){I.isTrue(this.bounds===null),this.childBoundables.add(t)},isEmpty:function(){return this.childBoundables.isEmpty()},getBounds:function(){return this.bounds===null&&(this.bounds=this.computeBounds()),this.bounds},interfaces_:function(){return[bi,m]},getClass:function(){return se}}),se.serialVersionUID=6493722185909574e3;var Qe={reverseOrder:function(){return{compare:function(t,e){return e.compareTo(t)}}},min:function(t){return Qe.sort(t),t.get(0)},sort:function(t,e){var n=t.toArray();e?_e.sort(n,e):_e.sort(n);for(var r=t.iterator(),s=0,o=n.length;sae.area(this.boundable2)?(this.expand(this.boundable1,this.boundable2,t,e),null):(this.expand(this.boundable2,this.boundable1,t,e),null);if(n)return this.expand(this.boundable1,this.boundable2,t,e),null;if(r)return this.expand(this.boundable2,this.boundable1,t,e),null;throw new a},isLeaves:function(){return!(ae.isComposite(this.boundable1)||ae.isComposite(this.boundable2))},compareTo:function(t){var e=t;return this._distancee._distance?1:0},expand:function(t,e,n,r){for(var s=t.getChildBoundables(),o=s.iterator();o.hasNext();){var l=o.next(),x=new ae(l,e,this.itemDistance);x.getDistance()-2),r.getLevel()===n)return s.add(r),null;for(var o=r.getChildBoundables().iterator();o.hasNext();){var l=o.next();l instanceof se?this.boundablesAtLevel(n,l,s):(I.isTrue(l instanceof on),n===-1&&s.add(l))}return null}},query:function(){if(arguments.length===1){var t=arguments[0];this.build();var e=new C;return this.isEmpty()||this.getIntersectsOp().intersects(this.root.getBounds(),t)&&this.query(t,this.root,e),e}if(arguments.length===2){var n=arguments[0],r=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this.root.getBounds(),n)&&this.query(n,this.root,r)}else if(arguments.length===3){if(X(arguments[2],Cn)&&arguments[0]instanceof Object&&arguments[1]instanceof se)for(var s=arguments[0],o=arguments[1],l=arguments[2],x=o.getChildBoundables(),A=0;Ae&&(e=s)}}return e+1}},createParentBoundables:function(t,e){I.isTrue(!t.isEmpty());var n=new C;n.add(this.createNode(e));var r=new C(t);Qe.sort(r,this.getComparator());for(var s=r.iterator();s.hasNext();){var o=s.next();this.lastNode(n).getChildBoundables().size()===this.getNodeCapacity()&&n.add(this.createNode(e)),this.lastNode(n).addChildBoundable(o)}return n},isEmpty:function(){return this.built?this.root.isEmpty():this.itemBoundables.isEmpty()},interfaces_:function(){return[m]},getClass:function(){return Gt}}),Gt.compareDoubles=function(t,e){return t>e?1:t0);for(var n=new C,r=0;r0;){var Z=V.poll(),K=Z.getDistance();if(K>=x)break;Z.isLeaves()?(x=K,A=Z):Z.expandToQueue(V,x)}return[A.getBoundable(0).getItem(),A.getBoundable(1).getItem()]}}else if(arguments.length===3){var $=arguments[0],ut=arguments[1],ft=arguments[2],gt=new on($,ut),e=new ae(this.getRoot(),gt,ft);return this.nearestNeighbour(e)[0]}},interfaces_:function(){return[Mi,m]},getClass:function(){return Dt}}),Dt.centreX=function(t){return Dt.avg(t.getMinX(),t.getMaxX())},Dt.avg=function(t,e){return(t+e)/2},Dt.centreY=function(t){return Dt.avg(t.getMinY(),t.getMaxY())},y(Ar,se),d(Ar.prototype,{computeBounds:function(){for(var t=null,e=this.getChildBoundables().iterator();e.hasNext();){var n=e.next();t===null?t=new B(n.getBounds()):t.expandToInclude(n.getBounds())}return t},interfaces_:function(){return[]},getClass:function(){return Ar}}),Dt.STRtreeNode=Ar,Dt.serialVersionUID=0x39920f7d5f261e0,Dt.xComparator={interfaces_:function(){return[g]},compare:function(t,e){return Gt.compareDoubles(Dt.centreX(t.getBounds()),Dt.centreX(e.getBounds()))}},Dt.yComparator={interfaces_:function(){return[g]},compare:function(t,e){return Gt.compareDoubles(Dt.centreY(t.getBounds()),Dt.centreY(e.getBounds()))}},Dt.intersectsOp={interfaces_:function(){return[IntersectsOp]},intersects:function(t,e){return t.intersects(e)}},Dt.DEFAULT_NODE_CAPACITY=10,d(ue.prototype,{interfaces_:function(){return[]},getClass:function(){return ue}}),ue.relativeSign=function(t,e){return te?1:0},ue.compare=function(t,e,n){if(e.equals2D(n))return 0;var r=ue.relativeSign(e.x,n.x),s=ue.relativeSign(e.y,n.y);switch(t){case 0:return ue.compareValue(r,s);case 1:return ue.compareValue(s,r);case 2:return ue.compareValue(s,-r);case 3:return ue.compareValue(-r,s);case 4:return ue.compareValue(-r,-s);case 5:return ue.compareValue(-s,-r);case 6:return ue.compareValue(-s,r);case 7:return ue.compareValue(r,-s)}return I.shouldNeverReachHere("invalid octant value"),0},ue.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0},d(As.prototype,{getCoordinate:function(){return this.coord},print:function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)},compareTo:function(t){var e=t;return this.segmentIndexe.segmentIndex?1:this.coord.equals2D(e.coord)?0:ue.compare(this.segmentOctant,this.coord,e.coord)},isEndPoint:function(t){return this.segmentIndex===0&&!this._isInterior||this.segmentIndex===t},isInterior:function(){return this._isInterior},interfaces_:function(){return[f]},getClass:function(){return As}}),d(Ds.prototype,{getSplitCoordinates:function(){var t=new q;this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var r=e.next();this.addEdgeCoordinates(n,r,t),n=r}return t.toCoordinateArray()},addCollapsedNodes:function(){var t=new C;this.findCollapsesFromInsertedNodes(t),this.findCollapsesFromExistingVertices(t);for(var e=t.iterator();e.hasNext();){var n=e.next().intValue();this.add(this.edge.getCoordinate(n),n)}},print:function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}},findCollapsesFromExistingVertices:function(t){for(var e=0;ethis.currNode.segmentIndex,null)},remove:function(){throw new UnsupportedOperationException(this.getClass().getName())},hasNext:function(){return this.nextNode!==null},readNextNode:function(){this.nodeIt.hasNext()?this.nextNode=this.nodeIt.next():this.nextNode=null},interfaces_:function(){return[T]},getClass:function(){return wo}}),d(Fs.prototype,{addIntersection:function(t,e){},interfaces_:function(){return[_r]},getClass:function(){return Fs}}),d(Ue.prototype,{getCoordinates:function(){return this.pts},size:function(){return this.pts.length},getCoordinate:function(t){return this.pts[t]},isClosed:function(){return this.pts[0].equals(this.pts[this.pts.length-1])},getSegmentOctant:function(t){return t===this.pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},setData:function(t){this.data=t},safeOctant:function(t,e){return t.equals2D(e)?0:hr.octant(t,e)},getData:function(){return this.data},addIntersection:function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(arguments.length===4){var n=arguments[0],r=arguments[1],s=arguments[3],o=new v(n.getIntersection(s));this.addIntersection(o,r)}},toString:function(){return $t.toLineString(new Ee(this.pts))},getNodeList:function(){return this.nodeList},addIntersectionNode:function(t,e){var n=e,r=n+1;if(re?t:e;return r===0&&s===3?3:r},Nt.isInHalfPlane=function(t,e){return e===Nt.SE?t===Nt.SE||t===Nt.SW:t===e||t===e+1},Nt.quadrant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];if(t===0&&e===0)throw new a;return t>=0?e>=0?Nt.NE:Nt.SE:e>=0?Nt.NW:Nt.SW}if(arguments[0]instanceof v&&arguments[1]instanceof v){var n=arguments[0],r=arguments[1];if(r.x===n.x&&r.y===n.y)throw new a;return r.x>=n.x?r.y>=n.y?Nt.NE:Nt.SE:r.y>=n.y?Nt.NW:Nt.SW}},Nt.NE=0,Nt.NW=1,Nt.SW=2,Nt.SE=3,d(Ae.prototype,{interfaces_:function(){return[]},getClass:function(){return Ae}}),Ae.getChainStartIndices=function(t){var e=0,n=new C;n.add(new Y(e));do{var r=Ae.findChainEnd(t,e);n.add(new Y(r)),e=r}while(e=t.length-1)return t.length-1;for(var r=Nt.quadrant(t[n],t[n+1]),s=e+1;sn.getId()&&(n.computeOverlaps(o,t),this.nOverlaps++),this.segInt.isDone())return null}},interfaces_:function(){return[]},getClass:function(){return wn}}),y(qr,Dr),d(qr.prototype,{overlap:function(){if(arguments.length!==4)return Dr.prototype.overlap.apply(this,arguments);var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3],s=t.getContext(),o=n.getContext();this.si.processIntersections(s,e,o,r)},interfaces_:function(){return[]},getClass:function(){return qr}}),wn.SegmentOverlapAction=qr,y(ge,N),d(ge.prototype,{getCoordinate:function(){return this.pt},interfaces_:function(){return[]},getClass:function(){return ge}}),ge.msgWithCoord=function(t,e){return e!==null?t+" [ "+e+" ]":t},d(Gr.prototype,{processIntersections:function(t,e,n,r){},isDone:function(){},interfaces_:function(){return[]},getClass:function(){return Gr}}),d(vn.prototype,{getInteriorIntersection:function(){return this.interiorIntersection},setCheckEndSegmentsOnly:function(t){this.isCheckEndSegmentsOnly=t},getIntersectionSegments:function(){return this.intSegments},count:function(){return this.intersectionCount},getIntersections:function(){return this.intersections},setFindAllIntersections:function(t){this.findAllIntersections=t},setKeepIntersections:function(t){this.keepIntersections=t},processIntersections:function(t,e,n,r){if(!this.findAllIntersections&&this.hasIntersection()||t===n&&e===r)return null;if(this.isCheckEndSegmentsOnly){var s=this.isEndSegment(t,e)||this.isEndSegment(n,r);if(!s)return null}var o=t.getCoordinates()[e],l=t.getCoordinates()[e+1],x=n.getCoordinates()[r],A=n.getCoordinates()[r+1];this.li.computeIntersection(o,l,x,A),this.li.hasIntersection()&&this.li.isInteriorIntersection()&&(this.intSegments=new Array(4).fill(null),this.intSegments[0]=o,this.intSegments[1]=l,this.intSegments[2]=x,this.intSegments[3]=A,this.interiorIntersection=this.li.getIntersection(0),this.keepIntersections&&this.intersections.add(this.interiorIntersection),this.intersectionCount++)},isEndSegment:function(t,e){return e===0||e>=t.size()-2},hasIntersection:function(){return this.interiorIntersection!==null},isDone:function(){return!this.findAllIntersections&&this.interiorIntersection!==null},interfaces_:function(){return[Gr]},getClass:function(){return vn}}),vn.createAllIntersectionsFinder=function(t){var e=new vn(t);return e.setFindAllIntersections(!0),e},vn.createAnyIntersectionFinder=function(t){return new vn(t)},vn.createIntersectionCounter=function(t){var e=new vn(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e},d(Br.prototype,{execute:function(){return this.segInt!==null?null:void this.checkInteriorIntersections()},getIntersections:function(){return this.segInt.getIntersections()},isValid:function(){return this.execute(),this._isValid},setFindAllIntersections:function(t){this.findAllIntersections=t},checkInteriorIntersections:function(){this._isValid=!0,this.segInt=new vn(this.li),this.segInt.setFindAllIntersections(this.findAllIntersections);var t=new wn;if(t.setSegmentIntersector(this.segInt),t.computeNodes(this.segStrings),this.segInt.hasIntersection())return this._isValid=!1,null},checkValid:function(){if(this.execute(),!this._isValid)throw new ge(this.getErrorMessage(),this.segInt.getInteriorIntersection())},getErrorMessage:function(){if(this._isValid)return"no intersections found";var t=this.segInt.getIntersectionSegments();return"found non-noded intersection between "+$t.toLineString(t[0],t[1])+" and "+$t.toLineString(t[2],t[3])},interfaces_:function(){return[]},getClass:function(){return Br}}),Br.computeIntersections=function(t){var e=new Br(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()},d(Yn.prototype,{checkValid:function(){this.nv.checkValid()},interfaces_:function(){return[]},getClass:function(){return Yn}}),Yn.toSegmentStrings=function(t){for(var e=new C,n=t.iterator();n.hasNext();){var r=n.next();e.add(new Os(r.getCoordinates(),r))}return e},Yn.checkValid=function(t){var e=new Yn(t);e.checkValid()},d(cr.prototype,{map:function(t){for(var e=new C,n=0;nthis.location.length){var e=new Array(3).fill(null);e[et.ON]=this.location[et.ON],e[et.LEFT]=L.NONE,e[et.RIGHT]=L.NONE,this.location=e}for(var n=0;n1&&t.append(L.toLocationSymbol(this.location[et.LEFT])),t.append(L.toLocationSymbol(this.location[et.ON])),this.location.length>1&&t.append(L.toLocationSymbol(this.location[et.RIGHT])),t.toString()},setLocations:function(t,e,n){this.location[et.ON]=t,this.location[et.LEFT]=e,this.location[et.RIGHT]=n},get:function(t){return t1},isAnyNull:function(){for(var t=0;tthis.maxNodeDegree&&(this.maxNodeDegree=n),t=this.getNext(t)}while(t!==this.startDe);this.maxNodeDegree*=2},addPoints:function(t,e,n){var r=t.getCoordinates();if(e){var s=1;n&&(s=0);for(var o=s;o=0;o--)this.pts.add(r[o])}},isHole:function(){return this._isHole},setInResult:function(){var t=this.startDe;do t.getEdge().setInResult(!0),t=t.getNext();while(t!==this.startDe)},containsPoint:function(t){var e=this.getLinearRing(),n=e.getEnvelopeInternal();if(!n.contains(t)||!nt.isPointInRing(t,e.getCoordinates()))return!1;for(var r=this.holes.iterator();r.hasNext();){var s=r.next();if(s.containsPoint(t))return!1}return!0},addHole:function(t){this.holes.add(t)},isShell:function(){return this.shell===null},getLabel:function(){return this.label},getEdges:function(){return this.edges},getMaxNodeDegree:function(){return this.maxNodeDegree<0&&this.computeMaxNodeDegree(),this.maxNodeDegree},getShell:function(){return this.shell},mergeLabel:function(){if(arguments.length===1){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],r=e.getLocation(n,et.RIGHT);if(r===L.NONE)return null;if(this.label.getLocation(n)===L.NONE)return this.label.setLocation(n,r),null}},setShell:function(t){this.shell=t,t!==null&&t.addHole(this)},toPolygon:function(t){for(var e=new Array(this.holes.size()).fill(null),n=0;n=2,"found partial label"),this.computeIM(t)},isInResult:function(){return this._isInResult},isVisited:function(){return this._isVisited},interfaces_:function(){return[]},getClass:function(){return Sn}}),y(an,Sn),d(an.prototype,{isIncidentEdgeInResult:function(){for(var t=this.getEdges().getEdges().iterator();t.hasNext();){var e=t.next();if(e.getEdge().isInResult())return!0}return!1},isIsolated:function(){return this.label.getGeometryCount()===1},getCoordinate:function(){return this.coord},print:function(t){t.println("node "+this.coord+" lbl: "+this.label)},computeIM:function(t){},computeMergedLocation:function(t,e){var n=L.NONE;if(n=this.label.getLocation(e),!t.isNull(e)){var r=t.getLocation(e);n!==L.BOUNDARY&&(n=r)}return n},setLabel:function(){if(arguments.length!==2)return Sn.prototype.setLabel.apply(this,arguments);var t=arguments[0],e=arguments[1];this.label===null?this.label=new Bt(t,e):this.label.setLocation(t,e)},getEdges:function(){return this.edges},mergeLabel:function(){if(arguments[0]instanceof an){var t=arguments[0];this.mergeLabel(t.label)}else if(arguments[0]instanceof Bt)for(var e=arguments[0],n=0;n<2;n++){var r=this.computeMergedLocation(e,n),s=this.label.getLocation(n);s===L.NONE&&this.label.setLocation(n,r)}},add:function(t){this.edges.insert(t),t.setNode(this)},setLabelBoundary:function(t){if(this.label===null)return null;var e=L.NONE;this.label!==null&&(e=this.label.getLocation(t));var n=null;switch(e){case L.BOUNDARY:n=L.INTERIOR;break;case L.INTERIOR:n=L.BOUNDARY;break;default:n=L.BOUNDARY}this.label.setLocation(t,n)},interfaces_:function(){return[]},getClass:function(){return an}}),d(gr.prototype,{find:function(t){return this.nodeMap.get(t)},addNode:function(){if(arguments[0]instanceof v){var t=arguments[0],e=this.nodeMap.get(t);return e===null&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}if(arguments[0]instanceof an){var n=arguments[0],e=this.nodeMap.get(n.getCoordinate());return e===null?(this.nodeMap.put(n.getCoordinate(),n),n):(e.mergeLabel(n),e)}},print:function(t){for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}},iterator:function(){return this.nodeMap.values().iterator()},values:function(){return this.nodeMap.values()},getBoundaryNodes:function(t){for(var e=new C,n=this.iterator();n.hasNext();){var r=n.next();r.getLabel().getLocation(t)===L.BOUNDARY&&e.add(r)}return e},add:function(t){var e=t.getCoordinate(),n=this.addNode(e);n.add(t)},interfaces_:function(){return[]},getClass:function(){return gr}}),d(Ye.prototype,{compareDirection:function(t){return this.dx===t.dx&&this.dy===t.dy?0:this.quadrant>t.quadrant?1:this.quadrant2){o.linkDirectedEdgesForMinimalEdgeRings();var l=o.buildMinimalRings(),x=this.findShell(l);x!==null?(this.placePolygonHoles(x,l),e.add(x)):n.addAll(l)}else r.add(o)}return r},containsPoint:function(t){for(var e=this.shellList.iterator();e.hasNext();){var n=e.next();if(n.containsPoint(t))return!0}return!1},buildMaximalEdgeRings:function(t){for(var e=new C,n=t.iterator();n.hasNext();){var r=n.next();if(r.isInResult()&&r.getLabel().isArea()&&r.getEdgeRing()===null){var s=new zr(r,this.geometryFactory);e.add(s),s.setInResult()}}return e},placePolygonHoles:function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next();r.isHole()&&r.setShell(t)}},getPolygons:function(){var t=this.computePolygons(this.shellList);return t},findEdgeRingContaining:function(t,e){for(var n=t.getLinearRing(),r=n.getEnvelopeInternal(),s=n.getCoordinateN(0),o=null,l=null,x=e.iterator();x.hasNext();){var A=x.next(),V=A.getLinearRing(),Z=V.getEnvelopeInternal();o!==null&&(l=o.getLinearRing().getEnvelopeInternal());var K=!1;Z.contains(r)&&nt.isPointInRing(s,V.getCoordinates())&&(K=!0),K&&(o===null||l.contains(Z))&&(o=A)}return o},findShell:function(t){for(var e=0,n=null,r=t.iterator();r.hasNext();){var s=r.next();s.isHole()||(n=s,e++)}return I.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),n},add:function(){if(arguments.length===1){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(arguments.length===2){var e=arguments[0],n=arguments[1];He.linkResultDirectedEdges(n);var r=this.buildMaximalEdgeRings(e),s=new C,o=this.buildMinimalEdgeRings(r,this.shellList,s);this.sortShellsAndHoles(o,this.shellList,s),this.placeFreeHoles(this.shellList,s)}},interfaces_:function(){return[]},getClass:function(){return _i}}),d(Gs.prototype,{collectLines:function(t){for(var e=this.op.getGraph().getEdgeEnds().iterator();e.hasNext();){var n=e.next();this.collectLineEdge(n,t,this.lineEdgesList),this.collectBoundaryTouchEdge(n,t,this.lineEdgesList)}},labelIsolatedLine:function(t,e){var n=this.ptLocator.locate(t.getCoordinate(),this.op.getArgGeometry(e));t.getLabel().setLocation(e,n)},build:function(t){return this.findCoveredLineEdges(),this.collectLines(t),this.buildLines(t),this.resultLineList},collectLineEdge:function(t,e,n){var r=t.getLabel(),s=t.getEdge();t.isLineEdge()&&(t.isVisited()||!ht.isResultOfOp(r,e)||s.isCovered()||(n.add(s),t.setVisitedEdge(!0)))},findCoveredLineEdges:function(){for(var t=this.op.getGraph().getNodes().iterator();t.hasNext();){var e=t.next();e.getEdges().findCoveredLineEdges()}for(var n=this.op.getGraph().getEdgeEnds().iterator();n.hasNext();){var r=n.next(),s=r.getEdge();if(r.isLineEdge()&&!s.isCoveredSet()){var o=this.op.isCoveredByA(r.getCoordinate());s.setCovered(o)}}},labelIsolatedLines:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next(),r=n.getLabel();n.isIsolated()&&(r.isNull(0)?this.labelIsolatedLine(n,0):this.labelIsolatedLine(n,1))}},buildLines:function(t){for(var e=this.lineEdgesList.iterator();e.hasNext();){var n=e.next(),r=(n.getLabel(),this.geometryFactory.createLineString(n.getCoordinates()));this.resultLineList.add(r),n.setInResult(!0)}},collectBoundaryTouchEdge:function(t,e,n){var r=t.getLabel();return t.isLineEdge()||t.isVisited()||t.isInteriorAreaEdge()||t.getEdge().isInResult()?null:(I.isTrue(!(t.isInResult()||t.getSym().isInResult())||!t.getEdge().isInResult()),void(ht.isResultOfOp(r,e)&&e===ht.INTERSECTION&&(n.add(t.getEdge()),t.setVisitedEdge(!0))))},interfaces_:function(){return[]},getClass:function(){return Gs}}),d(Bs.prototype,{filterCoveredNodeToPoint:function(t){var e=t.getCoordinate();if(!this.op.isCoveredByLA(e)){var n=this.geometryFactory.createPoint(e);this.resultPointList.add(n)}},extractNonCoveredResultNodes:function(t){for(var e=this.op.getGraph().getNodes().iterator();e.hasNext();){var n=e.next();if(!(n.isInResult()||n.isIncidentEdgeInResult()||n.getEdges().getDegree()!==0&&t!==ht.INTERSECTION)){var r=n.getLabel();ht.isResultOfOp(r,t)&&this.filterCoveredNodeToPoint(n)}}},build:function(t){return this.extractNonCoveredResultNodes(t),this.resultPointList},interfaces_:function(){return[]},getClass:function(){return Bs}}),d(Ai.prototype,{locate:function(t){},interfaces_:function(){return[]},getClass:function(){return Ai}}),d(Ne.prototype,{locate:function(t){return Ne.locate(t,this.geom)},interfaces_:function(){return[Ai]},getClass:function(){return Ne}}),Ne.isPointInRing=function(t,e){return!!e.getEnvelopeInternal().intersects(t)&&nt.isPointInRing(t,e.getCoordinates())},Ne.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var n=e.getExteriorRing();if(!Ne.isPointInRing(t,n))return!1;for(var r=0;r=0;n--){var r=this.edgeList.get(n),s=r.getSym();e===null&&(e=s),t!==null&&s.setNext(t),t=r}e.setNext(t)},computeDepths:function(){if(arguments.length===1){var t=arguments[0],e=this.findIndex(t),n=(t.getLabel(),t.getDepth(et.LEFT)),r=t.getDepth(et.RIGHT),s=this.computeDepths(e+1,this.edgeList.size(),n),o=this.computeDepths(0,e,s);if(o!==r)throw new ge("depth mismatch at "+t.getCoordinate())}else if(arguments.length===3){for(var l=arguments[0],x=arguments[1],A=arguments[2],V=A,Z=l;Z=0;s--){var o=this.resultAreaEdgeList.get(s),l=o.getSym();switch(e===null&&o.getEdgeRing()===t&&(e=o),r){case this.SCANNING_FOR_INCOMING:if(l.getEdgeRing()!==t)continue;n=l,r=this.LINKING_TO_OUTGOING;break;case this.LINKING_TO_OUTGOING:if(o.getEdgeRing()!==t)continue;n.setNextMin(o),r=this.SCANNING_FOR_INCOMING}}r===this.LINKING_TO_OUTGOING&&(I.isTrue(e!==null,"found null for first outgoing dirEdge"),I.isTrue(e.getEdgeRing()===t,"unable to link last incoming dirEdge"),n.setNextMin(e))},getOutgoingDegree:function(){if(arguments.length===0){for(var t=0,e=this.iterator();e.hasNext();){var n=e.next();n.isInResult()&&t++}return t}if(arguments.length===1){for(var r=arguments[0],t=0,e=this.iterator();e.hasNext();){var n=e.next();n.getEdgeRing()===r&&t++}return t}},getLabel:function(){return this.label},findCoveredLineEdges:function(){for(var t=L.NONE,e=this.iterator();e.hasNext();){var n=e.next(),r=n.getSym();if(!n.isLineEdge()){if(n.isInResult()){t=L.INTERIOR;break}if(r.isInResult()){t=L.EXTERIOR;break}}}if(t===L.NONE)return null;for(var s=t,e=this.iterator();e.hasNext();){var n=e.next(),r=n.getSym();n.isLineEdge()?n.getEdge().setCovered(s===L.INTERIOR):(n.isInResult()&&(s=L.EXTERIOR),r.isInResult()&&(s=L.INTERIOR))}},computeLabelling:function(t){Zn.prototype.computeLabelling.call(this,t),this.label=new Bt(L.NONE);for(var e=this.iterator();e.hasNext();)for(var n=e.next(),r=n.getEdge(),s=r.getLabel(),o=0;o<2;o++){var l=s.getLocation(o);l!==L.INTERIOR&&l!==L.BOUNDARY||this.label.setLocation(o,L.INTERIOR)}},interfaces_:function(){return[]},getClass:function(){return Di}}),y(dr,Wn),d(dr.prototype,{createNode:function(t){return new an(t,new Di)},interfaces_:function(){return[]},getClass:function(){return dr}}),d(zs.prototype,{computeIntersections:function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},interfaces_:function(){return[]},getClass:function(){return zs}}),d(un.prototype,{isDelete:function(){return this.eventType===un.DELETE},setDeleteEventIndex:function(t){this.deleteEventIndex=t},getObject:function(){return this.obj},compareTo:function(t){var e=t;return this.xValuee.xValue?1:this.eventTypee.eventType?1:0},getInsertEvent:function(){return this.insertEvent},isInsert:function(){return this.eventType===un.INSERT},isSameLabel:function(t){return this.label!==null&&this.label===t.label},getDeleteEventIndex:function(){return this.deleteEventIndex},interfaces_:function(){return[f]},getClass:function(){return un}}),un.INSERT=1,un.DELETE=2,d(Fi.prototype,{interfaces_:function(){return[]},getClass:function(){return Fi}}),d(Ln.prototype,{isTrivialIntersection:function(t,e,n,r){if(t===n&&this.li.getIntersectionNum()===1){if(Ln.isAdjacentSegments(e,r))return!0;if(t.isClosed()){var s=t.getNumPoints()-1;if(e===0&&r===s||r===0&&e===s)return!0}}return!1},getProperIntersectionPoint:function(){return this.properIntersectionPoint},setIsDoneIfProperInt:function(t){this.isDoneWhenProperInt=t},hasProperInteriorIntersection:function(){return this.hasProperInterior},isBoundaryPointInternal:function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next(),s=r.getCoordinate();if(t.isIntersection(s))return!0}return!1},hasProperIntersection:function(){return this.hasProper},hasIntersection:function(){return this._hasIntersection},isDone:function(){return this._isDone},isBoundaryPoint:function(t,e){return e!==null&&(!!this.isBoundaryPointInternal(t,e[0])||!!this.isBoundaryPointInternal(t,e[1]))},setBoundaryNodes:function(t,e){this.bdyNodes=new Array(2).fill(null),this.bdyNodes[0]=t,this.bdyNodes[1]=e},addIntersections:function(t,e,n,r){if(t===n&&e===r)return null;this.numTests++;var s=t.getCoordinates()[e],o=t.getCoordinates()[e+1],l=n.getCoordinates()[r],x=n.getCoordinates()[r+1];this.li.computeIntersection(s,o,l,x),this.li.hasIntersection()&&(this.recordIsolated&&(t.setIsolated(!1),n.setIsolated(!1)),this.numIntersections++,this.isTrivialIntersection(t,e,n,r)||(this._hasIntersection=!0,!this.includeProper&&this.li.isProper()||(t.addIntersections(this.li,e,0),n.addIntersections(this.li,r,1)),this.li.isProper()&&(this.properIntersectionPoint=this.li.getIntersection(0).copy(),this.hasProper=!0,this.isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this.li,this.bdyNodes)||(this.hasProperInterior=!0))))},interfaces_:function(){return[]},getClass:function(){return Ln}}),Ln.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1},y(qi,Fi),d(qi.prototype,{prepareEvents:function(){Qe.sort(this.events);for(var t=0;te||this.maxo?1:0},interfaces_:function(){return[g]},getClass:function(){return Vs}}),Jn.NodeComparator=Vs,y(Gi,Jn),d(Gi.prototype,{query:function(t,e,n){return this.intersects(t,e)?void n.visitItem(this.item):null},interfaces_:function(){return[]},getClass:function(){return Gi}}),y(Bi,Jn),d(Bi.prototype,{buildExtent:function(t,e){this.min=Math.min(t.min,e.min),this.max=Math.max(t.max,e.max)},query:function(t,e,n){return this.intersects(t,e)?(this.node1!==null&&this.node1.query(t,e,n),void(this.node2!==null&&this.node2.query(t,e,n))):null},interfaces_:function(){return[]},getClass:function(){return Bi}}),d(ks.prototype,{buildTree:function(){Qe.sort(this.leaves,new IntervalRTreeNode.NodeComparator);for(var t=this.leaves,e=null,n=new C;;){if(this.buildLevel(t,n),n.size()===1)return n.get(0);e=t,t=n,n=e}},insert:function(t,e,n){if(this.root!==null)throw new IllegalStateException("Index cannot be added to once it has been queried");this.leaves.add(new Gi(t,e,n))},query:function(t,e,n){this.init(),this.root.query(t,e,n)},buildRoot:function(){return this.root!==null?null:void(this.root=this.buildTree())},printNode:function(t){k.out.println($t.toLineString(new v(t.min,this.level),new v(t.max,this.level)))},init:function(){return this.root!==null?null:void this.buildRoot()},buildLevel:function(t,e){this.level++,e.clear();for(var n=0;n0||!e.coord.equals2D(r);s||n--;var o=new Array(n).fill(null),l=0;o[l++]=new v(t.coord);for(var x=t.segmentIndex+1;x<=e.segmentIndex;x++)o[l++]=this.edge.pts[x];return s&&(o[l]=e.coord),new be(o,new Bt(this.edge.label))},add:function(t,e,n){var r=new Xs(t,e,n),s=this.nodeMap.get(r);return s!==null?s:(this.nodeMap.put(r,r),r)},isIntersection:function(t){for(var e=this.iterator();e.hasNext();){var n=e.next();if(n.coord.equals(t))return!0}return!1},interfaces_:function(){return[]},getClass:function(){return Us}}),d(kr.prototype,{getChainStartIndices:function(t){var e=0,n=new C;n.add(new Y(e));do{var r=this.findChainEnd(t,e);n.add(new Y(r)),e=r}while(en?e:n},getMinX:function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return ee&&(r=1),this.depth[t][n]=r}}},getDelta:function(t){return this.depth[t][et.RIGHT]-this.depth[t][et.LEFT]},getLocation:function(t,e){return this.depth[t][e]<=0?L.EXTERIOR:L.INTERIOR},toString:function(){return"A: "+this.depth[0][1]+","+this.depth[0][2]+" B: "+this.depth[1][1]+","+this.depth[1][2]},add:function(){if(arguments.length===1)for(var t=arguments[0],e=0;e<2;e++)for(var n=1;n<3;n++){var r=t.getLocation(e,n);r!==L.EXTERIOR&&r!==L.INTERIOR||(this.isNull(e,n)?this.depth[e][n]=De.depthAtLocation(r):this.depth[e][n]+=De.depthAtLocation(r))}else if(arguments.length===3){var s=arguments[0],o=arguments[1],l=arguments[2];l===L.INTERIOR&&this.depth[s][o]++}},interfaces_:function(){return[]},getClass:function(){return De}}),De.depthAtLocation=function(t){return t===L.EXTERIOR?0:t===L.INTERIOR?1:De.NULL_VALUE},De.NULL_VALUE=-1,y(be,Sn),d(be.prototype,{getDepth:function(){return this.depth},getCollapsedEdge:function(){var t=new Array(2).fill(null);t[0]=this.pts[0],t[1]=this.pts[1];var e=new be(t,Bt.toLineLabel(this.label));return e},isIsolated:function(){return this._isIsolated},getCoordinates:function(){return this.pts},setIsolated:function(t){this._isIsolated=t},setName:function(t){this.name=t},equals:function(t){if(!(t instanceof be))return!1;var e=t;if(this.pts.length!==e.pts.length)return!1;for(var n=!0,r=!0,s=this.pts.length,o=0;o0?this.pts[0]:null;if(arguments.length===1){var t=arguments[0];return this.pts[t]}},print:function(t){t.print("edge "+this.name+": "),t.print("LINESTRING (");for(var e=0;e0&&t.print(","),t.print(this.pts[e].x+" "+this.pts[e].y);t.print(") "+this.label+" "+this.depthDelta)},computeIM:function(t){be.updateIM(this.label,t)},isCollapsed:function(){return!!this.label.isArea()&&this.pts.length===3&&!!this.pts[0].equals(this.pts[2])},isClosed:function(){return this.pts[0].equals(this.pts[this.pts.length-1])},getMaximumSegmentIndex:function(){return this.pts.length-1},getDepthDelta:function(){return this.depthDelta},getNumPoints:function(){return this.pts.length},printReverse:function(t){t.print("edge "+this.name+": ");for(var e=this.pts.length-1;e>=0;e--)t.print(this.pts[e]+" ");t.println("")},getMonotoneChainEdge:function(){return this.mce===null&&(this.mce=new Ys(this)),this.mce},getEnvelope:function(){if(this.env===null){this.env=new B;for(var t=0;t0&&t.append(","),t.append(this.pts[e].x+" "+this.pts[e].y);return t.append(") "+this.label+" "+this.depthDelta),t.toString()},isPointwiseEqual:function(t){if(this.pts.length!==t.pts.length)return!1;for(var e=0;e=2,"found LineString with single point"),this.insertBoundaryPoint(this.argIndex,e[0]),this.insertBoundaryPoint(this.argIndex,e[e.length-1])},getInvalidPoint:function(){return this.invalidPoint},getBoundaryPoints:function(){for(var t=this.getBoundaryNodes(),e=new Array(t.size()).fill(null),n=0,r=t.iterator();r.hasNext();){var s=r.next();e[n++]=s.getCoordinate().copy()}return e},getBoundaryNodes:function(){return this.boundaryNodes===null&&(this.boundaryNodes=this.nodes.getBoundaryNodes(this.argIndex)),this.boundaryNodes},addSelfIntersectionNode:function(t,e,n){return this.isBoundaryNode(t,e)?null:void(n===L.BOUNDARY&&this.useBoundaryDeterminationRule?this.insertBoundaryPoint(t,e):this.insertPoint(t,e,n))},addPolygonRing:function(t,e,n){if(t.isEmpty())return null;var r=at.removeRepeatedPoints(t.getCoordinates());if(r.length<4)return this._hasTooFewPoints=!0,this.invalidPoint=r[0],null;var s=e,o=n;nt.isCCW(r)&&(s=n,o=e);var l=new be(r,new Bt(this.argIndex,L.BOUNDARY,s,o));this.lineEdgeMap.put(t,l),this.insertEdge(l),this.insertPoint(this.argIndex,r[0],L.BOUNDARY)},insertPoint:function(t,e,n){var r=this.nodes.addNode(e),s=r.getLabel();s===null?r.label=new Bt(t,n):s.setLocation(t,n)},createEdgeSetIntersector:function(){return new qi},addSelfIntersectionNodes:function(t){for(var e=this.edges.iterator();e.hasNext();)for(var n=e.next(),r=n.getLabel().getLocation(t),s=n.eiList.iterator();s.hasNext();){var o=s.next();this.addSelfIntersectionNode(t,o.coord,r)}},add:function(){if(arguments.length!==1)return He.prototype.add.apply(this,arguments);var t=arguments[0];if(t.isEmpty())return null;if(t instanceof Zt&&(this.useBoundaryDeterminationRule=!1),t instanceof Mt)this.addPolygon(t);else if(t instanceof mt)this.addLineString(t);else if(t instanceof At)this.addPoint(t);else if(t instanceof fe)this.addCollection(t);else if(t instanceof ce)this.addCollection(t);else if(t instanceof Zt)this.addCollection(t);else{if(!(t instanceof xt))throw new UnsupportedOperationException(t.getClass().getName());this.addCollection(t)}},addCollection:function(t){for(var e=0;e50?(this.areaPtLocator===null&&(this.areaPtLocator=new Vr(this.parentGeom)),this.areaPtLocator.locate(t)):this.ptLocator.locate(t,this.parentGeom)},findEdge:function(){if(arguments.length===1){var t=arguments[0];return this.lineEdgeMap.get(t)}return He.prototype.findEdge.apply(this,arguments)},interfaces_:function(){return[]},getClass:function(){return le}}),le.determineBoundary=function(t,e){return t.isInBoundary(e)?L.BOUNDARY:L.INTERIOR},d(Rn.prototype,{getArgGeometry:function(t){return this.arg[t].getGeometry()},setComputationPrecision:function(t){this.resultPrecisionModel=t,this.li.setPrecisionModel(this.resultPrecisionModel)},interfaces_:function(){return[]},getClass:function(){return Rn}}),d(bn.prototype,{compareTo:function(t){var e=t,n=bn.compareOriented(this.pts,this._orientation,e.pts,e._orientation);return n},interfaces_:function(){return[f]},getClass:function(){return bn}}),bn.orientation=function(t){return at.increasingDirection(t)===1},bn.compareOriented=function(t,e,n,r){for(var s=e?1:-1,o=r?1:-1,l=e?t.length:-1,x=r?n.length:-1,A=e?0:t.length-1,V=r?0:n.length-1;;){var Z=t[A].compareTo(n[V]);if(Z!==0)return Z;A+=s,V+=o;var K=A===l,$=V===x;if(K&&!$)return-1;if(!K&&$)return 1;if(K&&$)return 0}},d(Xi.prototype,{print:function(t){t.print("MULTILINESTRING ( ");for(var e=0;e0&&t.print(","),t.print("(");for(var r=n.getCoordinates(),s=0;s0&&t.print(","),t.print(r[s].x+" "+r[s].y);t.println(")")}t.print(") ")},addAll:function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next())},findEdgeIndex:function(t){for(var e=0;ethis.maxWidth)&&(this.interiorPoint=e,this.maxWidth=n)},getInteriorPoint:function(){return this.interiorPoint},widestGeometry:function(){if(arguments[0]instanceof xt){var e=arguments[0];if(e.isEmpty())return e;for(var n=e.getGeometryN(0),r=1;rn.getEnvelopeInternal().getWidth()&&(n=e.getGeometryN(r));return n}if(arguments[0]instanceof Q){var s=arguments[0];return s instanceof xt?this.widestGeometry(s):s}},horizontalBisector:function(t){var e=t.getEnvelopeInternal(),n=pr.getBisectorY(t);return this.factory.createLineString([new v(e.getMinX(),n),new v(e.getMaxX(),n)])},add:function(t){if(t instanceof Mt)this.addPolygon(t);else if(t instanceof xt)for(var e=t,n=0;nthis.loY&&(this.loY=t):t>this.centreY&&tt&&(t=n)}return t+1},nodeSize:function(){for(var t=0,e=0;e<2;e++)this.subnode[e]!==null&&(t+=this.subnode[e].nodeSize());return t+1},add:function(t){this.items.add(t)},interfaces_:function(){return[]},getClass:function(){return We}}),We.getSubnodeIndex=function(t,e){var n=-1;return t.min>=e&&(n=1),t.max<=e&&(n=0),n},d(ln.prototype,{expandToInclude:function(t){t.max>this.max&&(this.max=t.max),t.minn||this.max=this.min&&e<=this.max}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];return n>=this.min&&r<=this.max}},init:function(t,e){this.min=t,this.max=e,t>e&&(this.min=e,this.max=t)},getMax:function(){return this.max},interfaces_:function(){return[]},getClass:function(){return ln}}),jn.exponent=function(t){return Qo(64,t)-1023},jn.powerOf2=function(t){return Math.pow(2,t)},d(Xr.prototype,{getInterval:function(){return this.interval},getLevel:function(){return this.level},computeKey:function(t){for(this.level=Xr.computeLevel(t),this.interval=new ln,this.computeInterval(this.level,t);!this.interval.contains(t);)this.level+=1,this.computeInterval(this.level,t)},computeInterval:function(t,e){var n=jn.powerOf2(t);this.pt=Math.floor(e.getMin()/n)*n,this.interval.init(this.pt,this.pt+n)},getPoint:function(){return this.pt},interfaces_:function(){return[]},getClass:function(){return Xr}}),Xr.computeLevel=function(t){var e=t.getWidth(),n=jn.exponent(e)+1;return n},y(yn,We),d(yn.prototype,{getInterval:function(){return this.interval},find:function(t){var e=We.getSubnodeIndex(t,this.centre);if(e===-1)return this;if(this.subnode[e]!==null){var n=this.subnode[e];return n.find(t)}return this},insert:function(t){I.isTrue(this.interval===null||this.interval.contains(t.interval));var e=We.getSubnodeIndex(t.interval,this.centre);if(t.level===this.level-1)this.subnode[e]=t;else{var n=this.createSubnode(e);n.insert(t),this.subnode[e]=n}},isSearchMatch:function(t){return t.overlaps(this.interval)},getSubnode:function(t){return this.subnode[t]===null&&(this.subnode[t]=this.createSubnode(t)),this.subnode[t]},getNode:function(t){var e=We.getSubnodeIndex(t,this.centre);if(e!==-1){var n=this.getSubnode(e);return n.getNode(t)}return this},createSubnode:function(t){var e=0,n=0;switch(t){case 0:e=this.interval.getMin(),n=this.centre;break;case 1:e=this.centre,n=this.interval.getMax()}var r=new ln(e,n),s=new yn(r,this.level-1);return s},interfaces_:function(){return[]},getClass:function(){return yn}}),yn.createNode=function(t){var e=new Xr(t),n=new yn(e.getInterval(),e.getLevel());return n},yn.createExpanded=function(t,e){var n=new ln(e);t!==null&&n.expandToInclude(t.interval);var r=yn.createNode(n);return t!==null&&r.insert(t),r},d(Pn.prototype,{interfaces_:function(){return[]},getClass:function(){return Pn}}),Pn.isZeroWidth=function(t,e){var n=e-t;if(n===0)return!0;var r=Math.max(Math.abs(t),Math.abs(e)),s=n/r,o=jn.exponent(s);return o<=Pn.MIN_BINARY_EXPONENT},Pn.MIN_BINARY_EXPONENT=-50,y(mr,We),d(mr.prototype,{insert:function(t,e){var n=We.getSubnodeIndex(t,mr.origin);if(n===-1)return this.add(e),null;var r=this.subnode[n];if(r===null||!r.getInterval().contains(t)){var s=yn.createExpanded(r,t);this.subnode[n]=s}this.insertContained(this.subnode[n],t,e)},isSearchMatch:function(t){return!0},insertContained:function(t,e,n){I.isTrue(t.getInterval().contains(e));var r=Pn.isZeroWidth(e.getMin(),e.getMax()),s=null;s=r?t.find(e):t.getNode(e),s.add(n)},interfaces_:function(){return[]},getClass:function(){return mr}}),mr.origin=0,d(vr.prototype,{size:function(){return this.root!==null?this.root.size():0},insert:function(t,e){this.collectStats(t);var n=vr.ensureExtent(t,this.minExtent);this.root.insert(n,e)},query:function(){if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];return this.query(new ln(t,t))}if(arguments[0]instanceof ln){var e=arguments[0],n=new C;return this.query(e,n),n}}else if(arguments.length===2){var r=arguments[0],s=arguments[1];this.root.addAllItemsFromOverlapping(r,s)}},iterator:function(){var t=new C;return this.root.addAllItems(t),t.iterator()},remove:function(t,e){var n=vr.ensureExtent(t,this.minExtent);return this.root.remove(n,e)},collectStats:function(t){var e=t.getWidth();e0&&(this.minExtent=e)},depth:function(){return this.root!==null?this.root.depth():0},nodeSize:function(){return this.root!==null?this.root.nodeSize():0},interfaces_:function(){return[]},getClass:function(){return vr}}),vr.ensureExtent=function(t,e){var n=t.getMin(),r=t.getMax();return n!==r?t:(n===r&&(n-=e/2,r=n+e/2),new ln(n,r))},d(Hs.prototype,{isInside:function(t){},interfaces_:function(){return[]},getClass:function(){return Hs}}),d(Ur.prototype,{testLineSegment:function(t,e){var n=null,r=null,s=null,o=null,l=null,x=e.p0,A=e.p1;r=x.x-t.x,s=x.y-t.y,o=A.x-t.x,l=A.y-t.y,(s>0&&l<=0||l>0&&s<=0)&&(n=Vn.signOfDet2x2(r,s,o,l)/(l-s),0Math.PI;)t-=pt.PI_TIMES_2;for(;t<=-Math.PI;)t+=pt.PI_TIMES_2;return t},pt.angle=function(){if(arguments.length===1){var t=arguments[0];return Math.atan2(t.y,t.x)}if(arguments.length===2){var e=arguments[0],n=arguments[1],r=n.x-e.x,s=n.y-e.y;return Math.atan2(s,r)}},pt.isAcute=function(t,e,n){var r=t.x-e.x,s=t.y-e.y,o=n.x-e.x,l=n.y-e.y,x=r*o+s*l;return x>0},pt.isObtuse=function(t,e,n){var r=t.x-e.x,s=t.y-e.y,o=n.x-e.x,l=n.y-e.y,x=r*o+s*l;return x<0},pt.interiorAngle=function(t,e,n){var r=pt.angle(e,t),s=pt.angle(e,n);return Math.abs(s-r)},pt.normalizePositive=function(t){if(t<0){for(;t<0;)t+=pt.PI_TIMES_2;t>=pt.PI_TIMES_2&&(t=0)}else{for(;t>=pt.PI_TIMES_2;)t-=pt.PI_TIMES_2;t<0&&(t=0)}return t},pt.angleBetween=function(t,e,n){var r=pt.angle(e,t),s=pt.angle(e,n);return pt.diff(r,s)},pt.diff=function(t,e){var n=null;return n=tMath.PI&&(n=2*Math.PI-n),n},pt.toRadians=function(t){return t*Math.PI/180},pt.getTurn=function(t,e){var n=Math.sin(e-t);return n>0?pt.COUNTERCLOCKWISE:n<0?pt.CLOCKWISE:pt.NONE},pt.angleBetweenOriented=function(t,e,n){var r=pt.angle(e,t),s=pt.angle(e,n),o=s-r;return o<=-Math.PI?o+pt.PI_TIMES_2:o>Math.PI?o-pt.PI_TIMES_2:o},pt.PI_TIMES_2=2*Math.PI,pt.PI_OVER_2=Math.PI/2,pt.PI_OVER_4=Math.PI/4,pt.COUNTERCLOCKWISE=nt.COUNTERCLOCKWISE,pt.CLOCKWISE=nt.CLOCKWISE,pt.NONE=nt.COLLINEAR,d(Tt.prototype,{area:function(){return Tt.area(this.p0,this.p1,this.p2)},signedArea:function(){return Tt.signedArea(this.p0,this.p1,this.p2)},interpolateZ:function(t){if(t===null)throw new a;return Tt.interpolateZ(t,this.p0,this.p1,this.p2)},longestSideLength:function(){return Tt.longestSideLength(this.p0,this.p1,this.p2)},isAcute:function(){return Tt.isAcute(this.p0,this.p1,this.p2)},circumcentre:function(){return Tt.circumcentre(this.p0,this.p1,this.p2)},area3D:function(){return Tt.area3D(this.p0,this.p1,this.p2)},centroid:function(){return Tt.centroid(this.p0,this.p1,this.p2)},inCentre:function(){return Tt.inCentre(this.p0,this.p1,this.p2)},interfaces_:function(){return[]},getClass:function(){return Tt}}),Tt.area=function(t,e,n){return Math.abs(((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2)},Tt.signedArea=function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2},Tt.det=function(t,e,n,r){return t*r-e*n},Tt.interpolateZ=function(t,e,n,r){var s=e.x,o=e.y,l=n.x-s,x=r.x-s,A=n.y-o,V=r.y-o,Z=l*V-x*A,K=t.x-s,$=t.y-o,ut=(V*K-x*$)/Z,ft=(-A*K+l*$)/Z,gt=e.z+ut*(n.z-e.z)+ft*(r.z-e.z);return gt},Tt.longestSideLength=function(t,e,n){var r=t.distance(e),s=e.distance(n),o=n.distance(t),l=r;return s>l&&(l=s),o>l&&(l=o),l},Tt.isAcute=function(t,e,n){return!!pt.isAcute(t,e,n)&&!!pt.isAcute(e,n,t)&&!!pt.isAcute(n,t,e)},Tt.circumcentre=function(t,e,n){var r=n.x,s=n.y,o=t.x-r,l=t.y-s,x=e.x-r,A=e.y-s,V=2*Tt.det(o,l,x,A),Z=Tt.det(l,o*o+l*l,A,x*x+A*A),K=Tt.det(o,o*o+l*l,x,x*x+A*A),$=r-Z/V,ut=s+K/V;return new v($,ut)},Tt.perpendicularBisector=function(t,e){var n=e.x-t.x,r=e.y-t.y,s=new j(t.x+n/2,t.y+r/2,1),o=new j(t.x-r+n/2,t.y+n+r/2,1);return new j(s,o)},Tt.angleBisector=function(t,e,n){var r=e.distance(t),s=e.distance(n),o=r/(r+s),l=n.x-t.x,x=n.y-t.y,A=new v(t.x+o*l,t.y+o*x);return A},Tt.area3D=function(t,e,n){var r=e.x-t.x,s=e.y-t.y,o=e.z-t.z,l=n.x-t.x,x=n.y-t.y,A=n.z-t.z,V=s*A-o*x,Z=o*l-r*A,K=r*x-s*l,$=V*V+Z*Z+K*K,ut=Math.sqrt($)/2;return ut},Tt.centroid=function(t,e,n){var r=(t.x+e.x+n.x)/3,s=(t.y+e.y+n.y)/3;return new v(r,s)},Tt.inCentre=function(t,e,n){var r=e.distance(n),s=t.distance(n),o=t.distance(e),l=r+s+o,x=(r*t.x+s*e.x+o*n.x)/l,A=(r*t.y+s*e.y+o*n.y)/l;return new v(x,A)},d(xn.prototype,{getRadius:function(){return this.compute(),this.radius},getDiameter:function(){switch(this.compute(),this.extremalPts.length){case 0:return this.input.getFactory().createLineString();case 1:return this.input.getFactory().createPoint(this.centre)}var t=this.extremalPts[0],e=this.extremalPts[1];return this.input.getFactory().createLineString([t,e])},getExtremalPoints:function(){return this.compute(),this.extremalPts},computeCirclePoints:function(){if(this.input.isEmpty())return this.extremalPts=new Array(0).fill(null),null;if(this.input.getNumPoints()===1){var n=this.input.getCoordinates();return this.extremalPts=[new v(n[0])],null}var t=this.input.convexHull(),e=t.getCoordinates(),n=e;if(e[0].equals2D(e[e.length-1])&&(n=new Array(e.length-1).fill(null),at.copyDeep(e,0,n,0,e.length-1)),n.length<=2)return this.extremalPts=at.copyDeep(n),null;for(var r=xn.lowestPoint(n),s=xn.pointWitMinAngleWithX(n,r),o=0;o=r;)r=s,o=l,l=ee.nextIndex(t,o),s=e.distancePerpendicular(t[l]);return rr&&(r=x),xo&&(o=A),A=t.length&&(e=0),e},ee.computeC=function(t,e,n){return t*n.y-e*n.x},ee.getMinimumDiameter=function(t){return new ee(t).getDiameter()},ee.getMinimumRectangle=function(t){return new ee(t).getMinimumRectangle()},ee.computeSegmentForLine=function(t,e,n){var r=null,s=null;return Math.abs(e)>Math.abs(t)?(r=new v(0,n/e),s=new v(1,n/e-t/e)):(r=new v(n/t,0),s=new v(n/t-e/t,1)),new dt(r,s)};var ra=Object.freeze({Centroid:rn,CGAlgorithms:nt,ConvexHull:sn,InteriorPointArea:Fe,InteriorPointLine:Ui,InteriorPointPoint:Yi,RobustLineIntersector:Ht,MCPointInRing:Ur,MinimumBoundingCircle:xn,MinimumDiameter:ee});d(Tn.prototype,{getResultGeometry:function(){return new Hr(this.distanceTolerance).transform(this.inputGeom)},setDistanceTolerance:function(t){if(t<=0)throw new a;this.distanceTolerance=t},interfaces_:function(){return[]},getClass:function(){return Tn}}),Tn.densifyPoints=function(t,e,n){for(var r=new dt,s=new q,o=0;o1)for(var A=l/x,V=1;Vl?1:ot&&(t=n)}return t+1},isEmpty:function(){var e=!0;this.items.isEmpty()||(e=!1);for(var n=0;n<4;n++)this.subnode[n]!==null&&(this.subnode[n].isEmpty()||(e=!1));return e},add:function(t){this.items.add(t)},interfaces_:function(){return[m]},getClass:function(){return Ze}}),Ze.getSubnodeIndex=function(t,e,n){var r=-1;return t.getMinX()>=e&&(t.getMinY()>=n&&(r=3),t.getMaxY()<=n&&(r=1)),t.getMaxX()<=e&&(t.getMinY()>=n&&(r=2),t.getMaxY()<=n&&(r=0)),r},d(Zr.prototype,{getLevel:function(){return this.level},computeKey:function(){if(arguments.length===1){var t=arguments[0];for(this.level=Zr.computeQuadLevel(t),this.env=new B,this.computeKey(this.level,t);!this.env.contains(t);)this.level+=1,this.computeKey(this.level,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],r=jn.powerOf2(e);this.pt.x=Math.floor(n.getMinX()/r)*r,this.pt.y=Math.floor(n.getMinY()/r)*r,this.env.init(this.pt.x,this.pt.x+r,this.pt.y,this.pt.y+r)}},getEnvelope:function(){return this.env},getCentre:function(){return new v((this.env.getMinX()+this.env.getMaxX())/2,(this.env.getMinY()+this.env.getMaxY())/2)},getPoint:function(){return this.pt},interfaces_:function(){return[]},getClass:function(){return Zr}}),Zr.computeQuadLevel=function(t){var e=t.getWidth(),n=t.getHeight(),r=e>n?e:n,s=jn.exponent(r)+1;return s},y(En,Ze),d(En.prototype,{find:function(t){var e=Ze.getSubnodeIndex(t,this.centrex,this.centrey);if(e===-1)return this;if(this.subnode[e]!==null){var n=this.subnode[e];return n.find(t)}return this},isSearchMatch:function(t){return this.env.intersects(t)},getSubnode:function(t){return this.subnode[t]===null&&(this.subnode[t]=this.createSubnode(t)),this.subnode[t]},getEnvelope:function(){return this.env},getNode:function(t){var e=Ze.getSubnodeIndex(t,this.centrex,this.centrey);if(e!==-1){var n=this.getSubnode(e);return n.getNode(t)}return this},createSubnode:function(t){var e=0,n=0,r=0,s=0;switch(t){case 0:e=this.env.getMinX(),n=this.centrex,r=this.env.getMinY(),s=this.centrey;break;case 1:e=this.centrex,n=this.env.getMaxX(),r=this.env.getMinY(),s=this.centrey;break;case 2:e=this.env.getMinX(),n=this.centrex,r=this.centrey,s=this.env.getMaxY();break;case 3:e=this.centrex,n=this.env.getMaxX(),r=this.centrey,s=this.env.getMaxY()}var o=new B(e,n,r,s),l=new En(o,this.level-1);return l},insertNode:function(t){I.isTrue(this.env===null||this.env.contains(t.env));var e=Ze.getSubnodeIndex(t.env,this.centrex,this.centrey);if(t.level===this.level-1)this.subnode[e]=t;else{var n=this.createSubnode(e);n.insertNode(t),this.subnode[e]=n}},interfaces_:function(){return[]},getClass:function(){return En}}),En.createNode=function(t){var e=new Zr(t),n=new En(e.getEnvelope(),e.getLevel());return n},En.createExpanded=function(t,e){var n=new B(e);t!==null&&n.expandToInclude(t.env);var r=En.createNode(n);return t!==null&&r.insertNode(t),r},y(Kn,Ze),d(Kn.prototype,{insert:function(t,e){var n=Ze.getSubnodeIndex(t,Kn.origin.x,Kn.origin.y);if(n===-1)return this.add(e),null;var r=this.subnode[n];if(r===null||!r.getEnvelope().contains(t)){var s=En.createExpanded(r,t);this.subnode[n]=s}this.insertContained(this.subnode[n],t,e)},isSearchMatch:function(t){return!0},insertContained:function(t,e,n){I.isTrue(t.getEnvelope().contains(e));var r=Pn.isZeroWidth(e.getMinX(),e.getMaxX()),s=Pn.isZeroWidth(e.getMinY(),e.getMaxY()),o=null;o=r||s?t.find(e):t.getNode(e),o.add(n)},interfaces_:function(){return[]},getClass:function(){return Kn}}),Kn.origin=new v(0,0),d(On.prototype,{size:function(){return this.root!==null?this.root.size():0},insert:function(t,e){this.collectStats(t);var n=On.ensureExtent(t,this.minExtent);this.root.insert(n,e)},query:function(){if(arguments.length===1){var t=arguments[0],e=new zi;return this.query(t,e),e.getItems()}if(arguments.length===2){var n=arguments[0],r=arguments[1];this.root.visit(n,r)}},queryAll:function(){var t=new C;return this.root.addAllItems(t),t},remove:function(t,e){var n=On.ensureExtent(t,this.minExtent);return this.root.remove(n,e)},collectStats:function(t){var e=t.getWidth();e0&&(this.minExtent=e);var n=t.getHeight();n0&&(this.minExtent=n)},depth:function(){return this.root!==null?this.root.depth():0},isEmpty:function(){return this.root===null},interfaces_:function(){return[Mi,m]},getClass:function(){return On}}),On.ensureExtent=function(t,e){var n=t.getMinX(),r=t.getMaxX(),s=t.getMinY(),o=t.getMaxY();return n!==r&&s!==o?t:(n===r&&(n-=e/2,r=n+e/2),s===o&&(s-=e/2,o=s+e/2),new B(n,r,s,o))},On.serialVersionUID=-7461163625812743e3;var aa=Object.freeze({Quadtree:On}),ua=Object.freeze({STRtree:Dt}),la=Object.freeze({quadtree:aa,strtree:ua}),ha=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"];d(Ws.prototype,{read:function(t){var e=void 0;e=typeof t=="string"?JSON.parse(t):t;var n=e.type;if(!ze[n])throw new Error("Unknown GeoJSON type: "+e.type);return ha.indexOf(n)!==-1?ze[n].apply(this,[e.coordinates]):n==="GeometryCollection"?ze[n].apply(this,[e.geometries]):ze[n].apply(this,[e])},write:function(t){var e=t.getGeometryType();if(!dn[e])throw new Error("Geometry is not supported");return dn[e].apply(this,[t])}});var ze={Feature:function(t){var e={};for(var n in t)e[n]=t[n];if(t.geometry){var r=t.geometry.type;if(!ze[r])throw new Error("Unknown GeoJSON type: "+t.type);e.geometry=this.read(t.geometry)}return t.bbox&&(e.bbox=ze.bbox.apply(this,[t.bbox])),e},FeatureCollection:function(t){var e={};if(t.features){e.features=[];for(var n=0;n0&&this.minIndexthis.minCoord.y&&n.y>this.minCoord.y&&r===nt.CLOCKWISE)&&(s=!0),s&&(this.minIndex=this.minIndex-1)},getRightmostSideOfSegment:function(t,e){var n=t.getEdge(),r=n.getCoordinates();if(e<0||e+1>=r.length||r[e].y===r[e+1].y)return-1;var s=et.LEFT;return r[e].ythis.minCoord.x)&&(this.minDe=t,this.minIndex=n,this.minCoord=e[n])},findRightmostEdgeAtNode:function(){var t=this.minDe.getNode(),e=t.getEdges();this.minDe=e.getRightmostEdge(),this.minDe.isForward()||(this.minDe=this.minDe.getSym(),this.minIndex=this.minDe.getEdge().getCoordinates().length-1)},findEdge:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();n.isForward()&&this.checkForRightmostCoordinate(n)}I.isTrue(this.minIndex!==0||this.minCoord.equals(this.minDe.getCoordinate()),"inconsistency in rightmost processing"),this.minIndex===0?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this.orientedDe=this.minDe;var r=this.getRightmostSide(this.minDe,this.minIndex);r===et.LEFT&&(this.orientedDe=this.minDe.getSym())},interfaces_:function(){return[]},getClass:function(){return Zs}}),Ji.prototype.addLast=function(t){this.array_.push(t)},Ji.prototype.removeFirst=function(){return this.array_.shift()},Ji.prototype.isEmpty=function(){return this.array_.length===0},d(Js.prototype,{clearVisitedEdges:function(){for(var t=this.dirEdgeList.iterator();t.hasNext();){var e=t.next();e.setVisited(!1)}},getRightmostCoordinate:function(){return this.rightMostCoord},computeNodeDepth:function(t){for(var e=null,n=t.getEdges().iterator();n.hasNext();){var r=n.next();if(r.isVisited()||r.getSym().isVisited()){e=r;break}}if(e===null)throw new ge("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(e);for(var n=t.getEdges().iterator();n.hasNext();){var r=n.next();r.setVisited(!0),this.copySymDepths(r)}},computeDepth:function(t){this.clearVisitedEdges();var e=this.finder.getEdge();e.getNode(),e.getLabel(),e.setEdgeDepths(et.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},create:function(t){this.addReachable(t),this.finder.findEdge(this.dirEdgeList),this.rightMostCoord=this.finder.getCoordinate()},findResultEdges:function(){for(var t=this.dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(et.RIGHT)>=1&&e.getDepth(et.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},computeDepths:function(t){var e=new Rt,n=new Ji,r=t.getNode();for(n.addLast(r),e.add(r),t.setVisited(!0);!n.isEmpty();){var s=n.removeFirst();e.add(s),this.computeNodeDepth(s);for(var o=s.getEdges().iterator();o.hasNext();){var l=o.next(),x=l.getSym();if(!x.isVisited()){var A=x.getNode();e.contains(A)||(n.addLast(A),e.add(A))}}}},compareTo:function(t){var e=t;return this.rightMostCoord.xe.rightMostCoord.x?1:0},getEnvelope:function(){if(this.env===null){for(var t=new B,e=this.dirEdgeList.iterator();e.hasNext();)for(var n=e.next(),r=n.getEdge().getCoordinates(),s=0;s=0;n--)this.addPt(t[n])},isRedundant:function(t){if(this.ptList.size()<1)return!1;var e=this.ptList.get(this.ptList.size()-1),n=t.distance(e);return n=2&&this.ptList.get(this.ptList.size()-2),t.equals(e)?null:void this.ptList.add(t)},setMinimumVertexDistance:function(t){this.minimimVertexDistance=t},interfaces_:function(){return[]},getClass:function(){return Qr}}),Qr.COORDINATE_ARRAY_TYPE=new Array(0).fill(null),d(Je.prototype,{addNextSegment:function(t,e){if(this.s0=this.s1,this.s1=this.s2,this.s2=t,this.seg0.setCoordinates(this.s0,this.s1),this.computeOffsetSegment(this.seg0,this.side,this.distance,this.offset0),this.seg1.setCoordinates(this.s1,this.s2),this.computeOffsetSegment(this.seg1,this.side,this.distance,this.offset1),this.s1.equals(this.s2))return null;var n=nt.computeOrientation(this.s0,this.s1,this.s2),r=n===nt.CLOCKWISE&&this.side===et.LEFT||n===nt.COUNTERCLOCKWISE&&this.side===et.RIGHT;n===0?this.addCollinear(e):r?this.addOutsideTurn(n,e):this.addInsideTurn(n,e)},addLineEndCap:function(t,e){var n=new dt(t,e),r=new dt;this.computeOffsetSegment(n,et.LEFT,this.distance,r);var s=new dt;this.computeOffsetSegment(n,et.RIGHT,this.distance,s);var o=e.x-t.x,l=e.y-t.y,x=Math.atan2(l,o);switch(this.bufParams.getEndCapStyle()){case Ct.CAP_ROUND:this.segList.addPt(r.p1),this.addFilletArc(e,x+Math.PI/2,x-Math.PI/2,nt.CLOCKWISE,this.distance),this.segList.addPt(s.p1);break;case Ct.CAP_FLAT:this.segList.addPt(r.p1),this.segList.addPt(s.p1);break;case Ct.CAP_SQUARE:var A=new v;A.x=Math.abs(this.distance)*Math.cos(x),A.y=Math.abs(this.distance)*Math.sin(x);var V=new v(r.p1.x+A.x,r.p1.y+A.y),Z=new v(s.p1.x+A.x,s.p1.y+A.y);this.segList.addPt(V),this.segList.addPt(Z)}},getCoordinates:function(){var t=this.segList.getCoordinates();return t},addMitreJoin:function(t,e,n,r){var s=!0,o=null;try{o=j.intersection(e.p0,e.p1,n.p0,n.p1);var l=r<=0?1:o.distance(t)/Math.abs(r);l>this.bufParams.getMitreLimit()&&(s=!1)}catch(x){if(!(x instanceof W))throw x;o=new v(0,0),s=!1}finally{}s?this.segList.addPt(o):this.addLimitedMitreJoin(e,n,r,this.bufParams.getMitreLimit())},addFilletCorner:function(t,e,n,r,s){var o=e.x-t.x,l=e.y-t.y,x=Math.atan2(l,o),A=n.x-t.x,V=n.y-t.y,Z=Math.atan2(V,A);r===nt.CLOCKWISE?x<=Z&&(x+=2*Math.PI):x>=Z&&(x-=2*Math.PI),this.segList.addPt(e),this.addFilletArc(t,x,Z,r,s),this.segList.addPt(n)},addOutsideTurn:function(t,e){return this.offset0.p1.distance(this.offset1.p0)0){var n=new v((this.closingSegLengthFactor*this.offset0.p1.x+this.s1.x)/(this.closingSegLengthFactor+1),(this.closingSegLengthFactor*this.offset0.p1.y+this.s1.y)/(this.closingSegLengthFactor+1));this.segList.addPt(n);var r=new v((this.closingSegLengthFactor*this.offset1.p0.x+this.s1.x)/(this.closingSegLengthFactor+1),(this.closingSegLengthFactor*this.offset1.p0.y+this.s1.y)/(this.closingSegLengthFactor+1));this.segList.addPt(r)}else this.segList.addPt(this.s1);this.segList.addPt(this.offset1.p0)}},createCircle:function(t){var e=new v(t.x+this.distance,t.y);this.segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this.distance),this.segList.closeRing()},addBevelJoin:function(t,e){this.segList.addPt(t.p1),this.segList.addPt(e.p0)},init:function(t){this.distance=t,this.maxCurveSegmentError=t*(1-Math.cos(this.filletAngleQuantum/2)),this.segList=new Qr,this.segList.setPrecisionModel(this.precisionModel),this.segList.setMinimumVertexDistance(t*Je.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},addCollinear:function(t){this.li.computeIntersection(this.s0,this.s1,this.s1,this.s2);var e=this.li.getIntersectionNum();e>=2&&(this.bufParams.getJoinStyle()===Ct.JOIN_BEVEL||this.bufParams.getJoinStyle()===Ct.JOIN_MITRE?(t&&this.segList.addPt(this.offset0.p1),this.segList.addPt(this.offset1.p0)):this.addFilletCorner(this.s1,this.offset0.p1,this.offset1.p0,nt.CLOCKWISE,this.distance))},closeRing:function(){this.segList.closeRing()},hasNarrowConcaveAngle:function(){return this._hasNarrowConcaveAngle},interfaces_:function(){return[]},getClass:function(){return Je}}),Je.OFFSET_SEGMENT_SEPARATION_FACTOR=.001,Je.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR=.001,Je.CURVE_VERTEX_SNAP_DISTANCE_FACTOR=1e-6,Je.MAX_CLOSING_SEG_LEN_FACTOR=80,d($r.prototype,{getOffsetCurve:function(t,e){if(this.distance=e,e===0)return null;var n=e<0,r=Math.abs(e),s=this.getSegGen(r);t.length<=1?this.computePointCurve(t[0],s):this.computeOffsetCurve(t,n,s);var o=s.getCoordinates();return n&&at.reverse(o),o},computeSingleSidedBufferCurve:function(t,e,n){var r=this.simplifyTolerance(this.distance);if(e){n.addSegments(t,!0);var s=jt.simplify(t,-r),o=s.length-1;n.initSideSegments(s[o],s[o-1],et.LEFT),n.addFirstSegment();for(var l=o-2;l>=0;l--)n.addNextSegment(s[l],!0)}else{n.addSegments(t,!1);var x=jt.simplify(t,r),A=x.length-1;n.initSideSegments(x[0],x[1],et.LEFT),n.addFirstSegment();for(var l=2;l<=A;l++)n.addNextSegment(x[l],!0)}n.addLastSegment(),n.closeRing()},computeRingBufferCurve:function(t,e,n){var r=this.simplifyTolerance(this.distance);e===et.RIGHT&&(r=-r);var s=jt.simplify(t,r),o=s.length-1;n.initSideSegments(s[o-1],s[0],e);for(var l=1;l<=o;l++){var x=l!==1;n.addNextSegment(s[l],x)}n.closeRing()},computeLineBufferCurve:function(t,e){var n=this.simplifyTolerance(this.distance),r=jt.simplify(t,n),s=r.length-1;e.initSideSegments(r[0],r[1],et.LEFT);for(var o=2;o<=s;o++)e.addNextSegment(r[o],!0);e.addLastSegment(),e.addLineEndCap(r[s-1],r[s]);var l=jt.simplify(t,-n),x=l.length-1;e.initSideSegments(l[x],l[x-1],et.LEFT);for(var o=x-2;o>=0;o--)e.addNextSegment(l[o],!0);e.addLastSegment(),e.addLineEndCap(l[1],l[0]),e.closeRing()},computePointCurve:function(t,e){switch(this.bufParams.getEndCapStyle()){case Ct.CAP_ROUND:e.createCircle(t);break;case Ct.CAP_SQUARE:e.createSquare(t)}},getLineCurve:function(t,e){if(this.distance=e,e<0&&!this.bufParams.isSingleSided()||e===0)return null;var n=Math.abs(e),r=this.getSegGen(n);if(t.length<=1)this.computePointCurve(t[0],r);else if(this.bufParams.isSingleSided()){var s=e<0;this.computeSingleSidedBufferCurve(t,s,r)}else this.computeLineBufferCurve(t,r);var o=r.getCoordinates();return o},getBufferParameters:function(){return this.bufParams},simplifyTolerance:function(t){return t*this.bufParams.getSimplifyFactor()},getRingCurve:function(t,e,n){if(this.distance=n,t.length<=2)return this.getLineCurve(t,n);if(n===0)return $r.copyCoordinates(t);var r=this.getSegGen(n);return this.computeRingBufferCurve(t,e,r),r.getCoordinates()},computeOffsetCurve:function(t,e,n){var r=this.simplifyTolerance(this.distance);if(e){var s=jt.simplify(t,-r),o=s.length-1;n.initSideSegments(s[o],s[o-1],et.LEFT),n.addFirstSegment();for(var l=o-2;l>=0;l--)n.addNextSegment(s[l],!0)}else{var x=jt.simplify(t,r),A=x.length-1;n.initSideSegments(x[0],x[1],et.LEFT),n.addFirstSegment();for(var l=2;l<=A;l++)n.addNextSegment(x[l],!0)}n.addLastSegment()},getSegGen:function(t){return new Je(this.precisionModel,this.bufParams,t)},interfaces_:function(){return[]},getClass:function(){return $r}}),$r.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),n=0;ns.getMaxY()||this.findStabbedSegments(t,r.getDirectedEdges(),e)}return e}if(arguments.length===3){if(X(arguments[2],P)&&arguments[0]instanceof v&&arguments[1]instanceof Hn)for(var o=arguments[0],l=arguments[1],x=arguments[2],A=l.getEdge().getCoordinates(),n=0;nthis.seg.p1.y&&this.seg.reverse();var V=Math.max(this.seg.p0.x,this.seg.p1.x);if(!(Vthis.seg.p1.y||nt.computeOrientation(this.seg.p0,this.seg.p1,o)===nt.RIGHT)){var Z=l.getDepth(et.LEFT);this.seg.p0.equals(A[n])||(Z=l.getDepth(et.RIGHT));var K=new Ki(this.seg,Z);x.add(K)}}else if(X(arguments[2],P)&&arguments[0]instanceof v&&X(arguments[1],P))for(var $=arguments[0],ut=arguments[1],ft=arguments[2],n=ut.iterator();n.hasNext();){var gt=n.next();gt.isForward()&&this.findStabbedSegments($,gt,ft)}}},getDepth:function(t){var e=this.findStabbedSegments(t);if(e.size()===0)return 0;var n=Qe.min(e);return n.leftDepth},interfaces_:function(){return[]},getClass:function(){return ji}}),d(Ki.prototype,{compareTo:function(t){var e=t;if(this.upwardSeg.minX()>=e.upwardSeg.maxX())return 1;if(this.upwardSeg.maxX()<=e.upwardSeg.minX())return-1;var n=this.upwardSeg.orientationIndex(e.upwardSeg);return n!==0?n:(n=-1*e.upwardSeg.orientationIndex(this.upwardSeg),n!==0?n:this.upwardSeg.compareTo(e.upwardSeg))},compareX:function(t,e){var n=t.p0.compareTo(e.p0);return n!==0?n:t.p1.compareTo(e.p1)},toString:function(){return this.upwardSeg.toString()},interfaces_:function(){return[f]},getClass:function(){return Ki}}),ji.DepthSegment=Ki,d(js.prototype,{addPoint:function(t){if(this.distance<=0)return null;var e=t.getCoordinates(),n=this.curveBuilder.getLineCurve(e,this.distance);this.addCurve(n,L.EXTERIOR,L.INTERIOR)},addPolygon:function(t){var e=this.distance,n=et.LEFT;this.distance<0&&(e=-this.distance,n=et.RIGHT);var r=t.getExteriorRing(),s=at.removeRepeatedPoints(r.getCoordinates());if(this.distance<0&&this.isErodedCompletely(r,this.distance)||this.distance<=0&&s.length<3)return null;this.addPolygonRing(s,e,n,L.EXTERIOR,L.INTERIOR);for(var o=0;o0&&this.isErodedCompletely(l,-this.distance)||this.addPolygonRing(x,e,et.opposite(n),L.INTERIOR,L.EXTERIOR)}},isTriangleErodedCompletely:function(t,e){var n=new Tt(t[0],t[1],t[2]),r=n.inCentre(),s=nt.distancePointLine(r,n.p0,n.p1);return s=qt.MINIMUM_VALID_SIZE&&nt.isCCW(t)&&(o=s,l=r,n=et.opposite(n));var x=this.curveBuilder.getRingCurve(t,n,e);this.addCurve(x,o,l)},add:function(t){if(t.isEmpty())return null;if(t instanceof Mt)this.addPolygon(t);else if(t instanceof mt)this.addLineString(t);else if(t instanceof At)this.addPoint(t);else if(t instanceof fe)this.addCollection(t);else if(t instanceof ce)this.addCollection(t);else if(t instanceof Zt)this.addCollection(t);else{if(!(t instanceof xt))throw new UnsupportedOperationException(t.getClass().getName());this.addCollection(t)}},isErodedCompletely:function(t,e){var n=t.getCoordinates();if(n.length<4)return e<0;if(n.length===4)return this.isTriangleErodedCompletely(n,e);var r=t.getEnvelopeInternal(),s=Math.min(r.getHeight(),r.getWidth());return e<0&&2*Math.abs(e)>s},addCollection:function(t){for(var e=0;er||this.maxyo;if(l)return!1;var x=this.intersectsToleranceSquare(t,e);return I.isTrue(!(l&&x),"Found bad envelope test"),x},initCorners:function(t){var e=.5;this.minx=t.x-e,this.maxx=t.x+e,this.miny=t.y-e,this.maxy=t.y+e,this.corner[0]=new v(this.maxx,this.maxy),this.corner[1]=new v(this.minx,this.maxy),this.corner[2]=new v(this.minx,this.miny),this.corner[3]=new v(this.maxx,this.miny)},intersects:function(t,e){return this.scaleFactor===1?this.intersectsScaled(t,e):(this.copyScaled(t,this.p0Scaled),this.copyScaled(e,this.p1Scaled),this.intersectsScaled(this.p0Scaled,this.p1Scaled))},scale:function(t){return Math.round(t*this.scaleFactor)},getCoordinate:function(){return this.originalPt},copyScaled:function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},getSafeEnvelope:function(){if(this.safeEnv===null){var t=xr.SAFE_ENV_EXPANSION_FACTOR/this.scaleFactor;this.safeEnv=new B(this.originalPt.x-t,this.originalPt.x+t,this.originalPt.y-t,this.originalPt.y+t)}return this.safeEnv},intersectsPixelClosure:function(t,e){return this.li.computeIntersection(t,e,this.corner[0],this.corner[1]),!!this.li.hasIntersection()||(this.li.computeIntersection(t,e,this.corner[1],this.corner[2]),!!this.li.hasIntersection()||(this.li.computeIntersection(t,e,this.corner[2],this.corner[3]),!!this.li.hasIntersection()||(this.li.computeIntersection(t,e,this.corner[3],this.corner[0]),!!this.li.hasIntersection())))},intersectsToleranceSquare:function(t,e){var n=!1,r=!1;return this.li.computeIntersection(t,e,this.corner[0],this.corner[1]),!!this.li.isProper()||(this.li.computeIntersection(t,e,this.corner[1],this.corner[2]),!!this.li.isProper()||(this.li.hasIntersection()&&(n=!0),this.li.computeIntersection(t,e,this.corner[2],this.corner[3]),!!this.li.isProper()||(this.li.hasIntersection()&&(r=!0),this.li.computeIntersection(t,e,this.corner[3],this.corner[0]),!!this.li.isProper()||!(!n||!r)||!!t.equals(this.pt)||!!e.equals(this.pt))))},addSnappedNode:function(t,e){var n=t.getCoordinate(e),r=t.getCoordinate(e+1);return!!this.intersects(n,r)&&(t.addIntersection(this.getCoordinate(),e),!0)},interfaces_:function(){return[]},getClass:function(){return xr}}),xr.SAFE_ENV_EXPANSION_FACTOR=.75,d(Qi.prototype,{snap:function(){if(arguments.length===1){var t=arguments[0];return this.snap(t,null,-1)}if(arguments.length===3){var e=arguments[0],n=arguments[1],r=arguments[2],s=e.getSafeEnvelope(),o=new ni(e,n,r);return this.index.query(s,{interfaces_:function(){return[Cn]},visitItem:function(l){var x=l;x.select(s,o)}}),o.isNodeAdded()}},interfaces_:function(){return[]},getClass:function(){return Qi}}),y(ni,Mn),d(ni.prototype,{isNodeAdded:function(){return this._isNodeAdded},select:function(){if(arguments.length!==2)return Mn.prototype.select.apply(this,arguments);var t=arguments[0],e=arguments[1],n=t.getContext();return this.parentEdge!==null&&n===this.parentEdge&&e===this.hotPixelVertexIndex?null:void(this._isNodeAdded=this.hotPixel.addSnappedNode(n,e))},interfaces_:function(){return[]},getClass:function(){return ni}}),Qi.HotPixelSnapAction=ni,d(Ks.prototype,{processIntersections:function(t,e,n,r){if(t===n&&e===r)return null;var s=t.getCoordinates()[e],o=t.getCoordinates()[e+1],l=n.getCoordinates()[r],x=n.getCoordinates()[r+1];if(this.li.computeIntersection(s,o,l,x),this.li.hasIntersection()&&this.li.isInteriorIntersection()){for(var A=0;A=0;t--){try{this.bufferReducedPrecision(t)}catch(s){if(!(s instanceof ge))throw s;this.saveException=s}finally{}if(this.resultGeometry!==null)return null}throw this.saveException}if(arguments.length===1){var e=arguments[0],n=Kt.precisionScaleFactor(this.argGeom,this.distance,e),r=new St(n);this.bufferFixedPrecision(r)}},computeGeometry:function(){if(this.bufferOriginalPrecision(),this.resultGeometry!==null)return null;var t=this.argGeom.getFactory().getPrecisionModel();t.getType()===St.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()},setQuadrantSegments:function(t){this.bufParams.setQuadrantSegments(t)},bufferOriginalPrecision:function(){try{var t=new _n(this.bufParams);this.resultGeometry=t.buffer(this.argGeom,this.distance)}catch(e){if(!(e instanceof N))throw e;this.saveException=e}finally{}},getResultGeometry:function(t){return this.distance=t,this.computeGeometry(),this.resultGeometry},setEndCapStyle:function(t){this.bufParams.setEndCapStyle(t)},interfaces_:function(){return[]},getClass:function(){return Kt}}),Kt.bufferOp=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new Kt(t),r=n.getResultGeometry(e);return r}if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof Q&&typeof arguments[1]=="number"){var s=arguments[0],o=arguments[1],l=arguments[2],x=new Kt(s);x.setQuadrantSegments(l);var r=x.getResultGeometry(o);return r}if(arguments[2]instanceof Ct&&arguments[0]instanceof Q&&typeof arguments[1]=="number"){var A=arguments[0],V=arguments[1],Z=arguments[2],x=new Kt(A,Z),r=x.getResultGeometry(V);return r}}else if(arguments.length===4){var K=arguments[0],$=arguments[1],ut=arguments[2],ft=arguments[3],x=new Kt(K);x.setQuadrantSegments(ut),x.setEndCapStyle(ft);var r=x.getResultGeometry($);return r}},Kt.precisionScaleFactor=function(t,e,n){var r=t.getEnvelopeInternal(),s=ot.max(Math.abs(r.getMaxX()),Math.abs(r.getMaxY()),Math.abs(r.getMinX()),Math.abs(r.getMinY())),o=e>0?e:0,l=s+2*o,x=Math.trunc(Math.log(l)/Math.log(10)+1),A=n-x,V=Math.pow(10,A);return V},Kt.CAP_ROUND=Ct.CAP_ROUND,Kt.CAP_BUTT=Ct.CAP_FLAT,Kt.CAP_FLAT=Ct.CAP_FLAT,Kt.CAP_SQUARE=Ct.CAP_SQUARE,Kt.MAX_PRECISION_DIGITS=12;var ga=Object.freeze({BufferOp:Kt,BufferParameters:Ct});d(Qn.prototype,{filter:function(t){t instanceof Mt&&this.comps.add(t)},interfaces_:function(){return[tn]},getClass:function(){return Qn}}),Qn.getPolygons=function(){if(arguments.length===1){var t=arguments[0];return Qn.getPolygons(t,new C)}if(arguments.length===2){var e=arguments[0],n=arguments[1];return e instanceof Mt?n.add(e):e instanceof xt&&e.apply(new Qn(n)),n}},d(me.prototype,{isInsideArea:function(){return this.segIndex===me.INSIDE_AREA},getCoordinate:function(){return this.pt},getGeometryComponent:function(){return this.component},getSegmentIndex:function(){return this.segIndex},interfaces_:function(){return[]},getClass:function(){return me}}),me.INSIDE_AREA=-1,d($n.prototype,{filter:function(t){t instanceof At&&this.pts.add(t)},interfaces_:function(){return[tn]},getClass:function(){return $n}}),$n.getPoints=function(){if(arguments.length===1){var t=arguments[0];return t instanceof At?Qe.singletonList(t):$n.getPoints(t,new C)}if(arguments.length===2){var e=arguments[0],n=arguments[1];return e instanceof At?n.add(e):e instanceof xt&&e.apply(new $n(n)),n}},d(ri.prototype,{filter:function(t){(t instanceof At||t instanceof mt||t instanceof Mt)&&this.locations.add(new me(t,0,t.getCoordinate()))},interfaces_:function(){return[tn]},getClass:function(){return ri}}),ri.getLocations=function(t){var e=new C;return t.apply(new ri(e)),e},d(qe.prototype,{computeContainmentDistance:function(){if(arguments.length===0){var t=new Array(2).fill(null);if(this.computeContainmentDistance(0,t),this.minDistance<=this.terminateDistance)return null;this.computeContainmentDistance(1,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],r=1-e,s=Qn.getPolygons(this.geom[e]);if(s.size()>0){var o=ri.getLocations(this.geom[r]);if(this.computeContainmentDistance(o,s,n),this.minDistance<=this.terminateDistance)return this.minDistanceLocation[r]=n[0],this.minDistanceLocation[e]=n[1],null}}else if(arguments.length===3){if(arguments[2]instanceof Array&&X(arguments[0],P)&&X(arguments[1],P)){for(var l=arguments[0],x=arguments[1],A=arguments[2],V=0;Vthis.minDistance)return null;for(var r=t.getCoordinates(),s=e.getCoordinate(),o=0;othis.minDistance)return null;for(var r=V.getCoordinates(),$=Z.getCoordinates(),o=0;ot&&at.reverse(this.coordinates)}return this.coordinates},toLineString:function(){return this.factory.createLineString(this.getCoordinates())},add:function(t){this.directedEdges.add(t)},interfaces_:function(){return[]},getClass:function(){return $s}}),d(Pe.prototype,{setVisited:function(t){this._isVisited=t},isMarked:function(){return this._isMarked},setData:function(t){this.data=t},getData:function(){return this.data},setMarked:function(t){this._isMarked=t},getContext:function(){return this.data},isVisited:function(){return this._isVisited},setContext:function(t){this.data=t},interfaces_:function(){return[]},getClass:function(){return Pe}}),Pe.getComponentWithVisitedState=function(t,e){for(;t.hasNext();){var n=t.next();if(n.isVisited()===e)return n}return null},Pe.setVisited=function(t,e){for(;t.hasNext();){var n=t.next();n.setVisited(e)}},Pe.setMarked=function(t,e){for(;t.hasNext();){var n=t.next();n.setMarked(e)}},y(Ce,Pe),d(Ce.prototype,{isRemoved:function(){return this.parentEdge===null},compareDirection:function(t){return this.quadrant>t.quadrant?1:this.quadrant=t.getNumPoints()&&r===null)return null;var o=t.getCoordinate(s);r!==null&&r.segmentIndex===n.segmentIndex&&(o=r.coord);var l=new Ye(t,n.coord,o,new Bt(t.getLabel()));e.add(l)},createEdgeEndForPrev:function(t,e,n,r){var s=n.segmentIndex;if(n.dist===0){if(s===0)return null;s--}var o=t.getCoordinate(s);r!==null&&r.segmentIndex>=s&&(o=r.coord);var l=new Bt(t.getLabel());l.flip();var x=new Ye(t,n.coord,o,l);e.add(x)},computeEdgeEnds:function(){if(arguments.length===1){for(var t=arguments[0],e=new C,n=t;n.hasNext();){var r=n.next();this.computeEdgeEnds(r,e)}return e}if(arguments.length===2){var s=arguments[0],o=arguments[1],l=s.getEdgeIntersectionList();l.addEndpoints();var x=l.iterator(),A=null,V=null;if(!x.hasNext())return null;var Z=x.next();do A=V,V=Z,Z=null,x.hasNext()&&(Z=x.next()),V!==null&&(this.createEdgeEndForPrev(s,o,V,A),this.createEdgeEndForNext(s,o,V,Z));while(V!==null)}},interfaces_:function(){return[]},getClass:function(){return ns}}),y(ai,Ye),d(ai.prototype,{insert:function(t){this.edgeEnds.add(t)},print:function(t){t.println("EdgeEndBundle--> Label: "+this.label);for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t),t.println()}},iterator:function(){return this.edgeEnds.iterator()},getEdgeEnds:function(){return this.edgeEnds},computeLabelOn:function(t,e){for(var n=0,r=!1,s=this.iterator();s.hasNext();){var o=s.next(),l=o.getLabel().getLocation(t);l===L.BOUNDARY&&n++,l===L.INTERIOR&&(r=!0)}var l=L.NONE;r&&(l=L.INTERIOR),n>0&&(l=le.determineBoundary(e,n)),this.label.setLocation(t,l)},computeLabelSide:function(t,e){for(var n=this.iterator();n.hasNext();){var r=n.next();if(r.getLabel().isArea()){var s=r.getLabel().getLocation(t,e);if(s===L.INTERIOR)return this.label.setLocation(t,e,L.INTERIOR),null;s===L.EXTERIOR&&this.label.setLocation(t,e,L.EXTERIOR)}}},getLabel:function(){return this.label},computeLabelSides:function(t){this.computeLabelSide(t,et.LEFT),this.computeLabelSide(t,et.RIGHT)},updateIM:function(t){be.updateIM(this.label,t)},computeLabel:function(t){for(var e=!1,n=this.iterator();n.hasNext();){var r=n.next();r.getLabel().isArea()&&(e=!0)}e?this.label=new Bt(L.NONE,L.NONE,L.NONE):this.label=new Bt(L.NONE);for(var s=0;s<2;s++)this.computeLabelOn(s,t),e&&this.computeLabelSides(s)},interfaces_:function(){return[]},getClass:function(){return ai}}),y(rs,Zn),d(rs.prototype,{updateIM:function(t){for(var e=this.iterator();e.hasNext();){var n=e.next();n.updateIM(t)}},insert:function(t){var e=this.edgeMap.get(t);e===null?(e=new ai(t),this.insertEdgeEnd(t,e)):e.insert(t)},interfaces_:function(){return[]},getClass:function(){return rs}}),y(is,an),d(is.prototype,{updateIMFromEdges:function(t){this.edges.updateIM(t)},computeIM:function(t){t.setAtLeastIfValid(this.label.getLocation(0),this.label.getLocation(1),0)},interfaces_:function(){return[]},getClass:function(){return is}}),y(ui,Wn),d(ui.prototype,{createNode:function(t){return new is(t,new rs)},interfaces_:function(){return[]},getClass:function(){return ui}}),d(ro.prototype,{insertEdgeEnds:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this.nodes.add(n)}},getNodeIterator:function(){return this.nodes.iterator()},copyNodesAndLabels:function(t,e){for(var n=t.getNodeIterator();n.hasNext();){var r=n.next(),s=this.nodes.addNode(r.getCoordinate());s.setLabel(e,r.getLabel().getLocation(e))}},build:function(t){this.computeIntersectionNodes(t,0),this.copyNodesAndLabels(t,0);var e=new ns,n=e.computeEdgeEnds(t.getEdgeIterator());this.insertEdgeEnds(n)},computeIntersectionNodes:function(t,e){for(var n=t.getEdgeIterator();n.hasNext();)for(var r=n.next(),s=r.getLabel().getLocation(e),o=r.getEdgeIntersectionList().iterator();o.hasNext();){var l=o.next(),x=this.nodes.addNode(l.coord);s===L.BOUNDARY?x.setLabelBoundary(e):x.getLabel().isNull(e)&&x.setLabel(e,L.INTERIOR)}},interfaces_:function(){return[]},getClass:function(){return ro}}),d(ss.prototype,{isNodeEdgeAreaLabelsConsistent:function(){for(var t=this.nodeGraph.getNodeIterator();t.hasNext();){var e=t.next();if(!e.getEdges().isAreaLabelsConsistent(this.geomGraph))return this.invalidPoint=e.getCoordinate().copy(),!1}return!0},getInvalidPoint:function(){return this.invalidPoint},hasDuplicateRings:function(){for(var t=this.nodeGraph.getNodeIterator();t.hasNext();)for(var e=t.next(),n=e.getEdges().iterator();n.hasNext();){var r=n.next();if(r.getEdgeEnds().size()>1)return this.invalidPoint=r.getEdge().getCoordinate(0),!0}return!1},isNodeConsistentArea:function(){var t=this.geomGraph.computeSelfNodes(this.li,!0,!0);return t.hasProperIntersection()?(this.invalidPoint=t.getProperIntersectionPoint(),!1):(this.nodeGraph.build(this.geomGraph),this.isNodeEdgeAreaLabelsConsistent())},interfaces_:function(){return[]},getClass:function(){return ss}}),d(io.prototype,{buildIndex:function(){this.index=new Dt;for(var t=0;t=1&&(e=t.getCoordinateN(0)),this.validErr=new It(It.RING_NOT_CLOSED,e)}},checkShellsNotNested:function(t,e){for(var n=0;n=0;r--)n.add(t[r],!1)},Ge.findEdgeRingContaining=function(t,e){for(var n=t.getRing(),r=n.getEnvelopeInternal(),s=n.getCoordinateN(0),o=null,l=null,x=e.iterator();x.hasNext();){var A=x.next(),V=A.getRing(),Z=V.getEnvelopeInternal();if(!Z.equals(r)&&Z.contains(r)){s=at.ptNotInList(n.getCoordinates(),V.getCoordinates());var K=!1;nt.isPointInRing(s,V.getCoordinates())&&(K=!0),K&&(o===null||l.contains(Z))&&(o=A,l=o.getRing().getEnvelopeInternal())}}return o},d(so.prototype,{compare:function(t,e){var n=t,r=e;return n.getRing().getEnvelope().compareTo(r.getRing().getEnvelope())},interfaces_:function(){return[g]},getClass:function(){return so}}),Ge.EnvelopeComparator=so,y(Ut,Er),d(Ut.prototype,{findEdgeRing:function(t){var e=new Ge(this.factory);return e.build(t),e},computeDepthParity:function(){if(arguments.length===0)for(;;){var t=null;if(t===null)return null;this.computeDepthParity(t)}},computeNextCWEdges:function(){for(var t=this.nodeIterator();t.hasNext();){var e=t.next();Ut.computeNextCWEdges(e)}},addEdge:function(t){if(t.isEmpty())return null;var e=at.removeRepeatedPoints(t.getCoordinates());if(e.length<2)return null;var n=e[0],r=e[e.length-1],s=this.getNode(n),o=this.getNode(r),l=new si(s,o,e[1],!0),x=new si(o,s,e[e.length-2],!1),A=new es(t);A.setDirectedEdges(l,x),this.add(A)},deleteCutEdges:function(){this.computeNextCWEdges(),Ut.findLabeledEdgeRings(this.dirEdges);for(var t=new C,e=this.dirEdges.iterator();e.hasNext();){var n=e.next();if(!n.isMarked()){var r=n.getSym();if(n.getLabel()===r.getLabel()){n.setMarked(!0),r.setMarked(!0);var s=n.getEdge();t.add(s.getLine())}}}return t},getEdgeRings:function(){this.computeNextCWEdges(),Ut.label(this.dirEdges,-1);var t=Ut.findLabeledEdgeRings(this.dirEdges);this.convertMaximalToMinimalEdgeRings(t);for(var e=new C,n=this.dirEdges.iterator();n.hasNext();){var r=n.next();if(!r.isMarked()&&!r.isInRing()){var s=this.findEdgeRing(r);e.add(s)}}return e},getNode:function(t){var e=this.findNode(t);return e===null&&(e=new cn(t),this.add(e)),e},convertMaximalToMinimalEdgeRings:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next(),r=n.getLabel(),s=Ut.findIntersectionNodes(n,r);if(s!==null)for(var o=s.iterator();o.hasNext();){var l=o.next();Ut.computeNextCCWEdges(l,r)}}},deleteDangles:function(){for(var t=this.findNodesOfDegree(1),e=new Rt,n=new re,r=t.iterator();r.hasNext();)n.push(r.next());for(;!n.isEmpty();){var s=n.pop();Ut.deleteAllEdges(s);for(var o=s.getOutEdges().getEdges(),r=o.iterator();r.hasNext();){var l=r.next();l.setMarked(!0);var x=l.getSym();x!==null&&x.setMarked(!0);var A=l.getEdge();e.add(A.getLine());var V=l.getToNode();Ut.getDegreeNonDeleted(V)===1&&n.push(V)}}return e},interfaces_:function(){return[]},getClass:function(){return Ut}}),Ut.findLabeledEdgeRings=function(t){for(var e=new C,n=1,r=t.iterator();r.hasNext();){var s=r.next();if(!(s.isMarked()||s.getLabel()>=0)){e.add(s);var o=Ge.findDirEdgesInRing(s);Ut.label(o,n),n++}}return e},Ut.getDegreeNonDeleted=function(t){for(var e=t.getOutEdges().getEdges(),n=0,r=e.iterator();r.hasNext();){var s=r.next();s.isMarked()||n++}return n},Ut.deleteAllEdges=function(t){for(var e=t.getOutEdges().getEdges(),n=e.iterator();n.hasNext();){var r=n.next();r.setMarked(!0);var s=r.getSym();s!==null&&s.setMarked(!0)}},Ut.label=function(t,e){for(var n=t.iterator();n.hasNext();){var r=n.next();r.setLabel(e)}},Ut.computeNextCWEdges=function(t){for(var e=t.getOutEdges(),n=null,r=null,s=e.getEdges().iterator();s.hasNext();){var o=s.next();if(!o.isMarked()){if(n===null&&(n=o),r!==null){var l=r.getSym();l.setNext(o)}r=o}}if(r!==null){var l=r.getSym();l.setNext(n)}},Ut.computeNextCCWEdges=function(t,e){for(var n=t.getOutEdges(),r=null,s=null,o=n.getEdges(),l=o.size()-1;l>=0;l--){var x=o.get(l),A=x.getSym(),V=null;x.getLabel()===e&&(V=x);var Z=null;A.getLabel()===e&&(Z=A),V===null&&Z===null||(Z!==null&&(s=Z),V!==null&&(s!==null&&(s.setNext(V),s=null),r===null&&(r=V)))}s!==null&&(I.isTrue(r!==null),s.setNext(r))},Ut.getDegree=function(t,e){for(var n=t.getOutEdges().getEdges(),r=0,s=n.iterator();s.hasNext();){var o=s.next();o.getLabel()===e&&r++}return r},Ut.findIntersectionNodes=function(t,e){var n=t,r=null;do{var s=n.getFromNode();Ut.getDegree(s,e)>1&&(r===null&&(r=new C),r.add(s)),n=n.getNext(),I.isTrue(n!==null,"found null DE in ring"),I.isTrue(n===t||!n.isInRing(),"found DE already in ring")}while(n!==t);return r},d(ve.prototype,{getGeometry:function(){return this.geomFactory===null&&(this.geomFactory=new yt),this.polygonize(),this.extractOnlyPolygonal?this.geomFactory.buildGeometry(this.polyList):this.geomFactory.createGeometryCollection(yt.toGeometryArray(this.polyList))},getInvalidRingLines:function(){return this.polygonize(),this.invalidRingLines},findValidRings:function(t,e,n){for(var r=t.iterator();r.hasNext();){var s=r.next();s.isValid()?e.add(s):n.add(s.getLineString())}},polygonize:function(){if(this.polyList!==null||(this.polyList=new C,this.graph===null))return null;this.dangles=this.graph.deleteDangles(),this.cutEdges=this.graph.deleteCutEdges();var t=this.graph.getEdgeRings(),e=new C;this.invalidRingLines=new C,this.isCheckingRingsValid?this.findValidRings(t,e,this.invalidRingLines):e=t,this.findShellsAndHoles(e),ve.assignHolesToShells(this.holeList,this.shellList),Qe.sort(this.shellList,new Ge.EnvelopeComparator);var n=!0;this.extractOnlyPolygonal&&(ve.findDisjointShells(this.shellList),n=!1),this.polyList=ve.extractPolygons(this.shellList,n)},getDangles:function(){return this.polygonize(),this.dangles},getCutEdges:function(){return this.polygonize(),this.cutEdges},getPolygons:function(){return this.polygonize(),this.polyList},add:function(){if(X(arguments[0],w))for(var t=arguments[0],e=t.iterator();e.hasNext();){var n=e.next();this.add(n)}else if(arguments[0]instanceof mt){var r=arguments[0];this.geomFactory=r.getFactory(),this.graph===null&&(this.graph=new Ut(this.geomFactory)),this.graph.addEdge(r)}else if(arguments[0]instanceof Q){var s=arguments[0];s.apply(this.lineStringAdder)}},setCheckRingsValid:function(t){this.isCheckingRingsValid=t},findShellsAndHoles:function(t){this.holeList=new C,this.shellList=new C;for(var e=t.iterator();e.hasNext();){var n=e.next();n.computeHole(),n.isHole()?this.holeList.add(n):this.shellList.add(n)}},interfaces_:function(){return[]},getClass:function(){return ve}}),ve.findOuterShells=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next(),r=n.getOuterHole();r===null||r.isProcessed()||(n.setIncluded(!0),r.setProcessed(!0))}},ve.extractPolygons=function(t,e){for(var n=new C,r=t.iterator();r.hasNext();){var s=r.next();(e||s.isIncluded())&&n.add(s.getPolygon())}return n},ve.assignHolesToShells=function(t,e){for(var n=t.iterator();n.hasNext();){var r=n.next();ve.assignHoleToShell(r,e)}},ve.assignHoleToShell=function(t,e){var n=Ge.findEdgeRingContaining(t,e);n!==null&&n.addHole(t)},ve.findDisjointShells=function(t){ve.findOuterShells(t);var e=null;do{e=!1;for(var n=t.iterator();n.hasNext();){var r=n.next();r.isIncludedSet()||(r.updateIncluded(),r.isIncludedSet()||(e=!0))}}while(e)},d(os.prototype,{filter:function(t){t instanceof mt&&this.p.add(t)},interfaces_:function(){return[it]},getClass:function(){return os}}),ve.LineStringAdder=os;var va=Object.freeze({Polygonizer:ve});d(as.prototype,{insertEdgeEnds:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this.nodes.add(n)}},computeProperIntersectionIM:function(t,e){var n=this.arg[0].getGeometry().getDimension(),r=this.arg[1].getGeometry().getDimension(),s=t.hasProperIntersection(),o=t.hasProperInteriorIntersection();n===2&&r===2?s&&e.setAtLeast("212101212"):n===2&&r===1?(s&&e.setAtLeast("FFF0FFFF2"),o&&e.setAtLeast("1FFFFF1FF")):n===1&&r===2?(s&&e.setAtLeast("F0FFFFFF2"),o&&e.setAtLeast("1F1FFFFFF")):n===1&&r===1&&o&&e.setAtLeast("0FFFFFFFF")},labelIsolatedEdges:function(t,e){for(var n=this.arg[t].getEdgeIterator();n.hasNext();){var r=n.next();r.isIsolated()&&(this.labelIsolatedEdge(r,e,this.arg[e].getGeometry()),this.isolatedEdges.add(r))}},labelIsolatedEdge:function(t,e,n){if(n.getDimension()>0){var r=this.ptLocator.locate(t.getCoordinate(),n);t.getLabel().setAllLocations(e,r)}else t.getLabel().setAllLocations(e,L.EXTERIOR)},computeIM:function(){var t=new bt;if(t.set(L.EXTERIOR,L.EXTERIOR,2),!this.arg[0].getGeometry().getEnvelopeInternal().intersects(this.arg[1].getGeometry().getEnvelopeInternal()))return this.computeDisjointIM(t),t;this.arg[0].computeSelfNodes(this.li,!1),this.arg[1].computeSelfNodes(this.li,!1);var e=this.arg[0].computeEdgeIntersections(this.arg[1],this.li,!1);this.computeIntersectionNodes(0),this.computeIntersectionNodes(1),this.copyNodesAndLabels(0),this.copyNodesAndLabels(1),this.labelIsolatedNodes(),this.computeProperIntersectionIM(e,t);var n=new ns,r=n.computeEdgeEnds(this.arg[0].getEdgeIterator());this.insertEdgeEnds(r);var s=n.computeEdgeEnds(this.arg[1].getEdgeIterator());return this.insertEdgeEnds(s),this.labelNodeEdges(),this.labelIsolatedEdges(0,1),this.labelIsolatedEdges(1,0),this.updateIM(t),t},labelNodeEdges:function(){for(var t=this.nodes.iterator();t.hasNext();){var e=t.next();e.getEdges().computeLabelling(this.arg)}},copyNodesAndLabels:function(t){for(var e=this.arg[t].getNodeIterator();e.hasNext();){var n=e.next(),r=this.nodes.addNode(n.getCoordinate());r.setLabel(t,n.getLabel().getLocation(t))}},labelIntersectionNodes:function(t){for(var e=this.arg[t].getEdgeIterator();e.hasNext();)for(var n=e.next(),r=n.getLabel().getLocation(t),s=n.getEdgeIntersectionList().iterator();s.hasNext();){var o=s.next(),l=this.nodes.find(o.coord);l.getLabel().isNull(t)&&(r===L.BOUNDARY?l.setLabelBoundary(t):l.setLabel(t,L.INTERIOR))}},labelIsolatedNode:function(t,e){var n=this.ptLocator.locate(t.getCoordinate(),this.arg[e].getGeometry());t.getLabel().setAllLocations(e,n)},computeIntersectionNodes:function(t){for(var e=this.arg[t].getEdgeIterator();e.hasNext();)for(var n=e.next(),r=n.getLabel().getLocation(t),s=n.getEdgeIntersectionList().iterator();s.hasNext();){var o=s.next(),l=this.nodes.addNode(o.coord);r===L.BOUNDARY?l.setLabelBoundary(t):l.getLabel().isNull(t)&&l.setLabel(t,L.INTERIOR)}},labelIsolatedNodes:function(){for(var t=this.nodes.iterator();t.hasNext();){var e=t.next(),n=e.getLabel();I.isTrue(n.getGeometryCount()>0,"node with empty label found"),e.isIsolated()&&(n.isNull(0)?this.labelIsolatedNode(e,0):this.labelIsolatedNode(e,1))}},updateIM:function(t){for(var e=this.isolatedEdges.iterator();e.hasNext();){var n=e.next();n.updateIM(t)}for(var r=this.nodes.iterator();r.hasNext();){var s=r.next();s.updateIM(t),s.updateIMFromEdges(t)}},computeDisjointIM:function(t){var e=this.arg[0].getGeometry();e.isEmpty()||(t.set(L.INTERIOR,L.EXTERIOR,e.getDimension()),t.set(L.BOUNDARY,L.EXTERIOR,e.getBoundaryDimension()));var n=this.arg[1].getGeometry();n.isEmpty()||(t.set(L.EXTERIOR,L.INTERIOR,n.getDimension()),t.set(L.EXTERIOR,L.BOUNDARY,n.getBoundaryDimension()))},interfaces_:function(){return[]},getClass:function(){return as}}),d(li.prototype,{isContainedInBoundary:function(t){if(t instanceof Mt)return!1;if(t instanceof At)return this.isPointContainedInBoundary(t);if(t instanceof mt)return this.isLineStringContainedInBoundary(t);for(var e=0;e0){var r=t;t=e,e=r}var s=!1;return e.y>t.y&&(s=!0),s?this.li.computeIntersection(t,e,this.diagDown0,this.diagDown1):this.li.computeIntersection(t,e,this.diagUp0,this.diagUp1),!!this.li.hasIntersection()},interfaces_:function(){return[]},getClass:function(){return oo}}),d(An.prototype,{applyTo:function(t){for(var e=0;e=this.rectEnv.getMinX()&&e.getMaxX()<=this.rectEnv.getMaxX()?(this._intersects=!0,null):e.getMinY()>=this.rectEnv.getMinY()&&e.getMaxY()<=this.rectEnv.getMaxY()?(this._intersects=!0,null):void 0:null},intersects:function(){return this._intersects},interfaces_:function(){return[]},getClass:function(){return us}}),y(ls,An),d(ls.prototype,{isDone:function(){return this._containsPoint===!0},visit:function(t){if(!(t instanceof Mt))return null;var e=t.getEnvelopeInternal();if(!this.rectEnv.intersects(e))return null;for(var n=new v,r=0;r<4;r++)if(this.rectSeq.getCoordinate(r,n),e.contains(n)&&Ne.containsPointInPolygon(n,t))return this._containsPoint=!0,null},containsPoint:function(){return this._containsPoint},interfaces_:function(){return[]},getClass:function(){return ls}}),y(hs,An),d(hs.prototype,{intersects:function(){return this.hasIntersection},isDone:function(){return this.hasIntersection===!0},visit:function(t){var e=t.getEnvelopeInternal();if(!this.rectEnv.intersects(e))return null;var n=te.getLines(t);this.checkIntersectionWithLineStrings(n)},checkIntersectionWithLineStrings:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();if(this.checkIntersectionWithSegments(n),this.hasIntersection)return null}},checkIntersectionWithSegments:function(t){for(var e=t.getCoordinateSequence(),n=1;n=t.size()?null:t.get(e)},Te.union=function(t){var e=new Te(t);return e.union()},Te.STRTREE_NODE_CAPACITY=4,d(Fn.prototype,{unionNoOpt:function(t){var e=this.geomFact.createPoint();return Wt.overlayOp(t,e,ht.UNION)},unionWithNull:function(t,e){return t===null&&e===null?null:e===null?t:t===null?e:t.union(e)},extract:function(){if(X(arguments[0],w))for(var t=arguments[0],e=t.iterator();e.hasNext();){var n=e.next();this.extract(n)}else if(arguments[0]instanceof Q){var r=arguments[0];this.geomFact===null&&(this.geomFact=r.getFactory()),Dn.extract(r,Q.SORTINDEX_POLYGON,this.polygons),Dn.extract(r,Q.SORTINDEX_LINESTRING,this.lines),Dn.extract(r,Q.SORTINDEX_POINT,this.points)}},union:function(){if(this.geomFact===null)return null;var e=null;if(this.points.size()>0){var n=this.geomFact.buildGeometry(this.points);e=this.unionNoOpt(n)}var r=null;if(this.lines.size()>0){var s=this.geomFact.buildGeometry(this.lines);r=this.unionNoOpt(s)}var o=null;this.polygons.size()>0&&(o=Te.union(this.polygons));var l=this.unionWithNull(r,o),x=null;return x=e===null?l:l===null?e:hi.union(e,l),x===null?this.geomFact.createGeometryCollection():x},interfaces_:function(){return[]},getClass:function(){return Fn}}),Fn.union=function(){if(arguments.length===1){if(X(arguments[0],w)){var t=arguments[0],e=new Fn(t);return e.union()}if(arguments[0]instanceof Q){var n=arguments[0],e=new Fn(n);return e.union()}}else if(arguments.length===2){var r=arguments[0],s=arguments[1],e=new Fn(r,s);return e.union()}};var xa=Object.freeze({UnaryUnionOp:Fn}),Ea=Object.freeze({IsValidOp:we,ConsistentAreaTester:ss}),Ia=Object.freeze({BoundaryOp:pn,IsSimpleOp:Kr,buffer:ga,distance:da,linemerge:pa,overlay:ma,polygonize:va,relate:ya,union:xa,valid:Ea});y(cs,xe.CoordinateOperation),d(cs.prototype,{editCoordinates:function(t,e){if(t.length===0)return null;for(var n=new Array(t.length).fill(null),r=0;r=2&&(r=!0);var s=e.edit(t,new cs(this.targetPM,r));return s},changePM:function(t,e){var n=this.createEditor(t.getFactory(),e);return n.edit(t,new xe.NoOpGeometryOperation)},setRemoveCollapsedComponents:function(t){this.removeCollapsed=t},createFactory:function(t,e){var n=new yt(e,t.getSRID(),t.getCoordinateSequenceFactory());return n},setChangePrecisionModel:function(t){this.changePrecisionModel=t},reduce:function(t){var e=this.reducePointwise(t);return this.isPointwise?e:X(e,en)?e.isValid()?e:this.fixPolygonalTopology(e):e},setPointwise:function(t){this.isPointwise=t},createEditor:function(t,e){if(t.getPrecisionModel()===e)return new xe;var n=this.createFactory(t,e),r=new xe(n);return r},interfaces_:function(){return[]},getClass:function(){return tr}}),tr.reduce=function(t,e){var n=new tr(e);return n.reduce(t)},tr.reducePointwise=function(t,e){var n=new tr(e);return n.setPointwise(!0),n.reduce(t)};var Na=Object.freeze({GeometryPrecisionReducer:tr});d(ci.prototype,{simplifySection:function(t,e){if(t+1===e)return null;this.seg.p0=this.pts[t],this.seg.p1=this.pts[e];for(var n=-1,r=t,s=t+1;sn&&(n=o,r=s)}if(n<=this.distanceTolerance)for(var s=t+1;sthis.distanceTolerance&&(o=!1);var V=new dt;if(V.p0=this.linePts[t],V.p1=this.linePts[e],r[0]=t,r[1]=e,this.hasBadIntersection(this.line,r,V)&&(o=!1),o){var s=this.flatten(t,e);return this.line.addToResult(s),null}this.simplifySection(t,A,n),this.simplifySection(A,e,n)},hasBadOutputIntersection:function(t){for(var e=this.outputIndex.query(t),n=e.iterator();n.hasNext();){var r=n.next();if(this.hasInteriorIntersection(r,t))return!0}return!1},findFurthestPoint:function(t,e,n,r){var s=new dt;s.p0=t[e],s.p1=t[n];for(var o=-1,l=e,x=e+1;xo&&(o=V,l=x)}return r[0]=o,l},simplify:function(t){this.line=t,this.linePts=t.getParentCoordinates(),this.simplifySection(0,this.linePts.length-1,0)},remove:function(t,e,n){for(var r=e;r=e[0]&&rs&&(A=s),o.setMinimumLength(A),o.splitAt(l),o.getSplitPoint()},interfaces_:function(){return[lo]},getClass:function(){return mi}}),mi.projectedSplitPoint=function(t,e){var n=t.getLineSegment(),r=n.project(e);return r},d(_t.prototype,{interfaces_:function(){return[]},getClass:function(){return _t}}),_t.triArea=function(t,e,n){return(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x)},_t.isInCircleDDNormalized=function(t,e,n,r){var s=z.valueOf(t.x).selfSubtract(r.x),o=z.valueOf(t.y).selfSubtract(r.y),l=z.valueOf(e.x).selfSubtract(r.x),x=z.valueOf(e.y).selfSubtract(r.y),A=z.valueOf(n.x).selfSubtract(r.x),V=z.valueOf(n.y).selfSubtract(r.y),Z=s.multiply(x).selfSubtract(l.multiply(o)),K=l.multiply(V).selfSubtract(A.multiply(x)),$=A.multiply(o).selfSubtract(s.multiply(V)),ut=s.multiply(s).selfAdd(o.multiply(o)),ft=l.multiply(l).selfAdd(x.multiply(x)),gt=A.multiply(A).selfAdd(V.multiply(V)),Ot=ut.selfMultiply(K).selfAdd(ft.selfMultiply($)).selfAdd(gt.selfMultiply(Z)),Xt=Ot.doubleValue()>0;return Xt},_t.checkRobustInCircle=function(t,e,n,r){var s=_t.isInCircleNonRobust(t,e,n,r),o=_t.isInCircleDDSlow(t,e,n,r),l=_t.isInCircleCC(t,e,n,r),x=Tt.circumcentre(t,e,n);k.out.println("p radius diff a = "+Math.abs(r.distance(x)-t.distance(x))/t.distance(x)),s===o&&s===l||(k.out.println("inCircle robustness failure (double result = "+s+", DD result = "+o+", CC result = "+l+")"),k.out.println($t.toLineString(new Ee([t,e,n,r]))),k.out.println("Circumcentre = "+$t.toPoint(x)+" radius = "+t.distance(x)),k.out.println("p radius diff a = "+Math.abs(r.distance(x)/t.distance(x)-1)),k.out.println("p radius diff b = "+Math.abs(r.distance(x)/e.distance(x)-1)),k.out.println("p radius diff c = "+Math.abs(r.distance(x)/n.distance(x)-1)),k.out.println())},_t.isInCircleDDFast=function(t,e,n,r){var s=z.sqr(t.x).selfAdd(z.sqr(t.y)).selfMultiply(_t.triAreaDDFast(e,n,r)),o=z.sqr(e.x).selfAdd(z.sqr(e.y)).selfMultiply(_t.triAreaDDFast(t,n,r)),l=z.sqr(n.x).selfAdd(z.sqr(n.y)).selfMultiply(_t.triAreaDDFast(t,e,r)),x=z.sqr(r.x).selfAdd(z.sqr(r.y)).selfMultiply(_t.triAreaDDFast(t,e,n)),A=s.selfSubtract(o).selfAdd(l).selfSubtract(x),V=A.doubleValue()>0;return V},_t.isInCircleCC=function(t,e,n,r){var s=Tt.circumcentre(t,e,n),o=t.distance(s),l=r.distance(s)-o;return l<=0},_t.isInCircleNormalized=function(t,e,n,r){var s=t.x-r.x,o=t.y-r.y,l=e.x-r.x,x=e.y-r.y,A=n.x-r.x,V=n.y-r.y,Z=s*x-l*o,K=l*V-A*x,$=A*o-s*V,ut=s*s+o*o,ft=l*l+x*x,gt=A*A+V*V,Ot=ut*K+ft*$+gt*Z;return Ot>0},_t.isInCircleDDSlow=function(t,e,n,r){var s=z.valueOf(r.x),o=z.valueOf(r.y),l=z.valueOf(t.x),x=z.valueOf(t.y),A=z.valueOf(e.x),V=z.valueOf(e.y),Z=z.valueOf(n.x),K=z.valueOf(n.y),$=l.multiply(l).add(x.multiply(x)).multiply(_t.triAreaDDSlow(A,V,Z,K,s,o)),ut=A.multiply(A).add(V.multiply(V)).multiply(_t.triAreaDDSlow(l,x,Z,K,s,o)),ft=Z.multiply(Z).add(K.multiply(K)).multiply(_t.triAreaDDSlow(l,x,A,V,s,o)),gt=s.multiply(s).add(o.multiply(o)).multiply(_t.triAreaDDSlow(l,x,A,V,Z,K)),Ot=$.subtract(ut).add(ft).subtract(gt),Xt=Ot.doubleValue()>0;return Xt},_t.isInCircleNonRobust=function(t,e,n,r){var s=(t.x*t.x+t.y*t.y)*_t.triArea(e,n,r)-(e.x*e.x+e.y*e.y)*_t.triArea(t,n,r)+(n.x*n.x+n.y*n.y)*_t.triArea(t,e,r)-(r.x*r.x+r.y*r.y)*_t.triArea(t,e,n)>0;return s},_t.isInCircleRobust=function(t,e,n,r){return _t.isInCircleNormalized(t,e,n,r)},_t.triAreaDDSlow=function(t,e,n,r,s,o){return n.subtract(t).multiply(o.subtract(e)).subtract(r.subtract(e).multiply(s.subtract(t)))},_t.triAreaDDFast=function(t,e,n){var r=z.valueOf(e.x).selfSubtract(t.x).selfMultiply(z.valueOf(n.y).selfSubtract(t.y)),s=z.valueOf(e.y).selfSubtract(t.y).selfMultiply(z.valueOf(n.x).selfSubtract(t.x));return r.selfSubtract(s)},d(Lt.prototype,{circleCenter:function(t,e){var n=new Lt(this.getX(),this.getY()),r=this.bisector(n,t),s=this.bisector(t,e),o=new j(r,s),l=null;try{l=new Lt(o.getX(),o.getY())}catch(x){if(!(x instanceof W))throw x;k.err.println("a: "+n+" b: "+t+" c: "+e),k.err.println(x)}finally{}return l},dot:function(t){return this.p.x*t.getX()+this.p.y*t.getY()},magn:function(){return Math.sqrt(this.p.x*this.p.x+this.p.y*this.p.y)},getZ:function(){return this.p.z},bisector:function(t,e){var n=e.getX()-t.getX(),r=e.getY()-t.getY(),s=new j(t.getX()+n/2,t.getY()+r/2,1),o=new j(t.getX()-r+n/2,t.getY()+n+r/2,1);return new j(s,o)},equals:function(){if(arguments.length===1){var t=arguments[0];return this.p.x===t.getX()&&this.p.y===t.getY()}if(arguments.length===2){var e=arguments[0],n=arguments[1];return this.p.distance(e.getCoordinate())0},getX:function(){return this.p.x},crossProduct:function(t){return this.p.x*t.getY()-this.p.y*t.getX()},setZ:function(t){this.p.z=t},times:function(t){return new Lt(t*this.p.x,t*this.p.y)},cross:function(){return new Lt(this.p.y,-this.p.x)},leftOf:function(t){return this.isCCW(t.orig(),t.dest())},toString:function(){return"POINT ("+this.p.x+" "+this.p.y+")"},sub:function(t){return new Lt(this.p.x-t.getX(),this.p.y-t.getY())},getY:function(){return this.p.y},classify:function(t,e){var n=this,r=e.sub(t),s=n.sub(t),o=r.crossProduct(s);return o>0?Lt.LEFT:o<0?Lt.RIGHT:r.getX()*s.getX()<0||r.getY()*s.getY()<0?Lt.BEHIND:r.magn()n?10*e:10*n,this.frameVertex[0]=new Lt((t.getMaxX()+t.getMinX())/2,t.getMaxY()+r),this.frameVertex[1]=new Lt(t.getMinX()-r,t.getMinY()-r),this.frameVertex[2]=new Lt(t.getMaxX()+r,t.getMinY()-r),this.frameEnv=new B(this.frameVertex[0].getCoordinate(),this.frameVertex[1].getCoordinate()),this.frameEnv.expandToInclude(this.frameVertex[2].getCoordinate())},getTriangleCoordinates:function(t){var e=new vs;return this.visitTriangles(e,t),e.getTriangles()},getVertices:function(t){for(var e=new Rt,n=this.quadEdges.iterator();n.hasNext();){var r=n.next(),s=r.orig();!t&&this.isFrameVertex(s)||e.add(s);var o=r.dest();!t&&this.isFrameVertex(o)||e.add(o)}return e},fetchTriangleToVisit:function(t,e,n,r){var s=t,o=0,l=!1;do{this.triEdges[o]=s,this.isFrameEdge(s)&&(l=!0);var x=s.sym();r.contains(x)||e.push(x),r.add(s),o++,s=s.lNext()}while(s!==t);return l&&!n?null:this.triEdges},getEdges:function(){if(arguments.length===0)return this.quadEdges;if(arguments.length===1){for(var t=arguments[0],e=this.getPrimaryEdges(!1),n=new Array(e.size()).fill(null),r=0,s=e.iterator();s.hasNext();){var o=s.next();n[r++]=t.createLineString([o.orig().getCoordinate(),o.dest().getCoordinate()])}return t.createMultiLineString(n)}},getVertexUniqueEdges:function(t){for(var e=new C,n=new Rt,r=this.quadEdges.iterator();r.hasNext();){var s=r.next(),o=s.orig();n.contains(o)||(n.add(o),!t&&this.isFrameVertex(o)||e.add(s));var l=s.sym(),x=l.orig();n.contains(x)||(n.add(x),!t&&this.isFrameVertex(x)||e.add(l))}return e},getTriangleEdges:function(t){var e=new ps;return this.visitTriangles(e,t),e.getTriangleEdges()},getPrimaryEdges:function(t){this.visitedKey++;var e=new C,n=new re;n.push(this.startingEdge);for(var r=new Rt;!n.empty();){var s=n.pop();if(!r.contains(s)){var o=s.getPrimary();!t&&this.isFrameEdge(o)||e.add(o),n.push(s.oNext()),n.push(s.sym().oNext()),r.add(s),r.add(s.sym())}}return e},delete:function(t){Ft.splice(t,t.oPrev()),Ft.splice(t.sym(),t.sym().oPrev());var e=t.sym(),n=t.rot(),r=t.rot().sym();this.quadEdges.remove(t),this.quadEdges.remove(e),this.quadEdges.remove(n),this.quadEdges.remove(r),t.delete(),e.delete(),n.delete(),r.delete()},locateFromEdge:function(t,e){for(var n=0,r=this.quadEdges.size(),s=e;;){if(n++,n>r)throw new Sr(s.toLineSegment());if(t.equals(s.orig())||t.equals(s.dest()))break;if(t.rightOf(s))s=s.sym();else if(t.rightOf(s.oNext())){if(t.rightOf(s.dPrev()))break;s=s.dPrev()}else s=s.oNext()}return s},getTolerance:function(){return this.tolerance},getVoronoiCellPolygons:function(t){this.visitTriangles(new ds,!0);for(var e=new C,n=this.getVertexUniqueEdges(!1),r=n.iterator();r.hasNext();){var s=r.next();e.add(this.getVoronoiCellPolygon(s,t))}return e},getVoronoiDiagram:function(t){var e=this.getVoronoiCellPolygons(t);return t.createGeometryCollection(yt.toGeometryArray(e))},getTriangles:function(t){for(var e=this.getTriangleCoordinates(!1),n=new Array(e.size()).fill(null),r=0,s=e.iterator();s.hasNext();){var o=s.next();n[r++]=t.createPolygon(t.createLinearRing(o),null)}return t.createGeometryCollection(n)},insertSite:function(t){var e=this.locate(t);if(t.equals(e.orig(),this.tolerance)||t.equals(e.dest(),this.tolerance))return e;var n=this.makeEdge(e.orig(),t);Ft.splice(n,e);var r=n;do n=this.connect(e,n.sym()),e=n.oPrev();while(e.lNext()!==r);return r},locate:function(){if(arguments.length===1){if(arguments[0]instanceof Lt){var t=arguments[0];return this.locator.locate(t)}if(arguments[0]instanceof v){var e=arguments[0];return this.locator.locate(new Lt(e))}}else if(arguments.length===2){var n=arguments[0],r=arguments[1],s=this.locator.locate(new Lt(n));if(s===null)return null;var o=s;s.dest().getCoordinate().equals2D(n)&&(o=s.sym());var l=o;do{if(l.dest().getCoordinate().equals2D(r))return l;l=l.oNext()}while(l!==o);return null}},interfaces_:function(){return[]},getClass:function(){return Le}}),Le.getTriangleEdges=function(t,e){if(e[0]=t,e[1]=e[0].lNext(),e[2]=e[1].lNext(),e[2].lNext()!==e[0])throw new a},d(ds.prototype,{visit:function(t){for(var e=t[0].orig().getCoordinate(),n=t[1].orig().getCoordinate(),r=t[2].orig().getCoordinate(),s=Tt.circumcentre(e,n,r),o=new Lt(s),l=0;l<3;l++)t[l].rot().setOrig(o)},interfaces_:function(){return[Lr]},getClass:function(){return ds}}),d(ps.prototype,{getTriangleEdges:function(){return this.triList},visit:function(t){this.triList.add(t.clone())},interfaces_:function(){return[Lr]},getClass:function(){return ps}}),d(ms.prototype,{visit:function(t){this.triList.add([t[0].orig(),t[1].orig(),t[2].orig()])},getTriangleVertices:function(){return this.triList},interfaces_:function(){return[Lr]},getClass:function(){return ms}}),d(vs.prototype,{checkTriangleSize:function(t){t.length>=2?$t.toLineString(t[0],t[1]):t.length>=1&&$t.toPoint(t[0])},visit:function(t){this.coordList.clear();for(var e=0;e<3;e++){var n=t[e].orig();this.coordList.add(n.getCoordinate())}if(this.coordList.size()>0){this.coordList.closeRing();var r=this.coordList.toCoordinateArray();if(r.length!==4)return null;this.triCoords.add(r)}},getTriangles:function(){return this.triCoords},interfaces_:function(){return[Lr]},getClass:function(){return vs}}),Le.TriangleCircumcentreVisitor=ds,Le.TriangleEdgesListVisitor=ps,Le.TriangleVertexListVisitor=ms,Le.TriangleCoordinatesVisitor=vs,Le.EDGE_COINCIDENCE_TOL_FACTOR=1e3,d(nr.prototype,{getLineSegment:function(){return this.ls},getEndZ:function(){var t=this.ls.getCoordinate(1);return t.z},getStartZ:function(){var t=this.ls.getCoordinate(0);return t.z},intersection:function(t){return this.ls.intersection(t.getLineSegment())},getStart:function(){return this.ls.getCoordinate(0)},getEnd:function(){return this.ls.getCoordinate(1)},getEndY:function(){var t=this.ls.getCoordinate(1);return t.y},getStartX:function(){var t=this.ls.getCoordinate(0);return t.x},equalsTopo:function(t){return this.ls.equalsTopo(t.getLineSegment())},getStartY:function(){var t=this.ls.getCoordinate(0);return t.y},setData:function(t){this.data=t},getData:function(){return this.data},getEndX:function(){var t=this.ls.getCoordinate(1);return t.x},toString:function(){return this.ls.toString()},interfaces_:function(){return[]},getClass:function(){return nr}}),d(yi.prototype,{visit:function(t){},interfaces_:function(){return[]},getClass:function(){return yi}}),d(ys.prototype,{isRepeated:function(){return this.count>1},getRight:function(){return this.right},getCoordinate:function(){return this.p},setLeft:function(t){this.left=t},getX:function(){return this.p.x},getData:function(){return this.data},getCount:function(){return this.count},getLeft:function(){return this.left},getY:function(){return this.p.y},increment:function(){this.count=this.count+1},setRight:function(t){this.right=t},interfaces_:function(){return[]},getClass:function(){return ys}}),d(rr.prototype,{insert:function(){if(arguments.length===1){var t=arguments[0];return this.insert(t,null)}if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this.root===null)return this.root=new ys(e,n),this.root;if(this.tolerance>0){var r=this.findBestMatchNode(e);if(r!==null)return r.increment(),r}return this.insertExact(e,n)}},query:function(){var t=arguments,e=this;if(arguments.length===1){var n=arguments[0],r=new C;return this.query(n,r),r}if(arguments.length===2){if(arguments[0]instanceof B&&X(arguments[1],P))(function(){var l=t[0],x=t[1];e.queryNode(e.root,l,!0,{interfaces_:function(){return[yi]},visit:function(A){x.add(A)}})})();else if(arguments[0]instanceof B&&X(arguments[1],yi)){var s=arguments[0],o=arguments[1];this.queryNode(this.root,s,!0,o)}}},queryNode:function(t,e,n,r){if(t===null)return null;var s=null,o=null,l=null;n?(s=e.getMinX(),o=e.getMaxX(),l=t.getX()):(s=e.getMinY(),o=e.getMaxY(),l=t.getY());var x=s0&&te)&&qe.isWithinDistance(this,t,e)},distance:function(t){return qe.distance(this,t)},isEquivalentClass:function(t){return this.getClass()===t.getClass()}});var La="1.3.0 (6e65adb)";_.version=La,_.algorithm=ra,_.densify=ia,_.dissolve=sa,_.geom=na,_.geomgraph=oa,_.index=la,_.io=ca,_.noding=fa,_.operation=Ia,_.precision=Na,_.simplify=Ca,_.triangulate=Sa,Object.defineProperty(_,"__esModule",{value:!0})})},{}],29:[function(h,E,u){var _=h("@turf/meta").coordEach,d=h("@turf/centroid"),S=h("@turf/convex"),a=h("@turf/explode"),c=h("@turf/helpers").point;function f(p){if(p.type==="Feature"&&p.geometry.type==="Polygon"){var g=[];_(p,function(W){g.push(W)});var m=d(p),N=m.geometry.coordinates,y=0,R=0,I=0,v,M,T,w,b,P,O,D,C=g.map(function(W){return[W[0]-N[0],W[1]-N[1]]});for(v=0;v=3){for(var p=[],g=0;g0)-(a<0)},u.abs=function(a){var c=a>>_-1;return(a^c)-c},u.min=function(a,c){return c^(a^c)&-(a65535)<<4,a>>>=c,f=(a>255)<<3,a>>>=f,c|=f,f=(a>15)<<2,a>>>=f,c|=f,f=(a>3)<<1,a>>>=f,c|=f,c|a>>1},u.log10=function(a){return a>=1e9?9:a>=1e8?8:a>=1e7?7:a>=1e6?6:a>=1e5?5:a>=1e4?4:a>=1e3?3:a>=100?2:a>=10?1:0},u.popCount=function(a){return a=a-(a>>>1&1431655765),a=(a&858993459)+(a>>>2&858993459),(a+(a>>>4)&252645135)*16843009>>>24};function d(a){var c=32;return a&=-a,a&&c--,a&65535&&(c-=16),a&16711935&&(c-=8),a&252645135&&(c-=4),a&858993459&&(c-=2),a&1431655765&&(c-=1),c}u.countTrailingZeros=d,u.nextPow2=function(a){return a+=a===0,--a,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a+1},u.prevPow2=function(a){return a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a-(a>>>1)},u.parity=function(a){return a^=a>>>16,a^=a>>>8,a^=a>>>4,a&=15,27030>>>a&1};var S=new Array(256);(function(a){for(var c=0;c<256;++c){var f=c,p=c,g=7;for(f>>>=1;f;f>>>=1)p<<=1,p|=f&1,--g;a[c]=p<>>8&255]<<16|S[a>>>16&255]<<8|S[a>>>24&255]},u.interleave2=function(a,c){return a&=65535,a=(a|a<<8)&16711935,a=(a|a<<4)&252645135,a=(a|a<<2)&858993459,a=(a|a<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,a|c<<1},u.deinterleave2=function(a,c){return a=a>>>c&1431655765,a=(a|a>>>1)&858993459,a=(a|a>>>2)&252645135,a=(a|a>>>4)&16711935,a=(a|a>>>16)&65535,a<<16>>16},u.interleave3=function(a,c,f){return a&=1023,a=(a|a<<16)&4278190335,a=(a|a<<8)&251719695,a=(a|a<<4)&3272356035,a=(a|a<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,a|=c<<1,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,a|f<<2},u.deinterleave3=function(a,c){return a=a>>>c&1227133513,a=(a|a>>>2)&3272356035,a=(a|a>>>4)&251719695,a=(a|a>>>8)&4278190335,a=(a|a>>>16)&1023,a<<22>>22},u.nextCombination=function(a){var c=a|a-1;return c+1|(~c&-~c)-1>>>d(a)+1}},{}],38:[function(h,E,u){var _=h("./lib/ch1d"),d=h("./lib/ch2d"),S=h("./lib/chnd");E.exports=a;function a(c){var f=c.length;if(f===0)return[];if(f===1)return[[0]];var p=c[0].length;return p===0?[]:p===1?_(c):p===2?d(c):S(c,p)}},{"./lib/ch1d":39,"./lib/ch2d":40,"./lib/chnd":41}],39:[function(h,E,u){E.exports=_;function _(d){for(var S=0,a=0,c=1;cd[a][0]&&(a=c);return Sa?[[a],[S]]:[[S]]}},{}],40:[function(h,E,u){E.exports=d;var _=h("monotone-convex-hull-2d");function d(S){var a=_(S),c=a.length;if(c<=2)return[];for(var f=new Array(c),p=a[c-1],g=0;g=p[v]&&(I+=1);y[R]=I}}return f}function c(f,p){try{return _(f,!0)}catch{var g=d(f);if(g.length<=p)return[];var m=S(f,g),N=_(m,!0);return a(N,g)}}},{"affine-hull":36,"incremental-convex-hull":42}],42:[function(h,E,u){E.exports=N;var _=h("robust-orientation"),d=h("simplicial-complex").compareCells;function S(y,R,I){this.vertices=y,this.adjacent=R,this.boundary=I,this.lastVisited=-1}S.prototype.flip=function(){var y=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=y;var R=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=R};function a(y,R,I){this.vertices=y,this.cell=R,this.index=I}function c(y,R){return d(y.vertices,R.vertices)}function f(y){for(var R=["function orient(){var tuple=this.tuple;return test("],I=0;I<=y;++I)I>0&&R.push(","),R.push("tuple[",I,"]");R.push(")}return orient");var v=new Function("test",R.join("")),M=_[y+1];return M||(M=_),v(M)}var p=[];function g(y,R,I){this.dimension=y,this.vertices=R,this.simplices=I,this.interior=I.filter(function(T){return!T.boundary}),this.tuple=new Array(y+1);for(var v=0;v<=y;++v)this.tuple[v]=this.vertices[v];var M=p[y];M||(M=p[y]=f(y)),this.orient=M}var m=g.prototype;m.handleBoundaryDegeneracy=function(y,R){var I=this.dimension,v=this.vertices.length-1,M=this.tuple,T=this.vertices,w=[y];for(y.lastVisited=-v;w.length>0;){y=w.pop(),y.vertices;for(var b=y.adjacent,P=0;P<=I;++P){var O=b[P];if(!(!O.boundary||O.lastVisited<=-v)){for(var D=O.vertices,C=0;C<=I;++C){var q=D[C];q<0?M[C]=R:M[C]=T[q]}var B=this.orient();if(B>0)return O;O.lastVisited=-v,B===0&&w.push(O)}}}return null},m.walk=function(y,R){var I=this.vertices.length-1,v=this.dimension,M=this.vertices,T=this.tuple,w=R?this.interior.length*Math.random()|0:this.interior.length-1,b=this.interior[w];t:for(;!b.boundary;){for(var P=b.vertices,O=b.adjacent,D=0;D<=v;++D)T[D]=M[P[D]];b.lastVisited=I;for(var D=0;D<=v;++D){var C=O[D];if(!(C.lastVisited>=I)){var q=T[D];T[D]=y;var B=this.orient();if(T[D]=q,B<0){b=C;continue t}else C.boundary?C.lastVisited=-I:C.lastVisited=I}}return}return b},m.addPeaks=function(y,R){var I=this.vertices.length-1,v=this.dimension,M=this.vertices,T=this.tuple,w=this.interior,b=this.simplices,P=[R];R.lastVisited=I,R.vertices[R.vertices.indexOf(-1)]=I,R.boundary=!1,w.push(R);for(var O=[];P.length>0;){var R=P.pop(),D=R.vertices,C=R.adjacent,q=D.indexOf(I);if(!(q<0)){for(var B=0;B<=v;++B)if(B!==q){var U=C[B];if(!(!U.boundary||U.lastVisited>=I)){var W=U.vertices;if(U.lastVisited!==-I){for(var L=0,X=0;X<=v;++X)W[X]<0?(L=X,T[X]=y):T[X]=M[W[X]];var ot=this.orient();if(ot>0){W[L]=I,U.boundary=!1,w.push(U),P.push(U),U.lastVisited=I;continue}else U.lastVisited=-I}var F=U.adjacent,Y=D.slice(),H=C.slice(),z=new S(Y,H,!0);b.push(z);var J=F.indexOf(R);if(!(J<0)){F[J]=z,H[q]=U,Y[B]=-1,H[B]=R,C[B]=z,z.flip();for(var X=0;X<=v;++X){var G=Y[X];if(!(G<0||G===I)){for(var k=new Array(v-1),j=0,rt=0;rt<=v;++rt){var it=Y[rt];it<0||rt===X||(k[j++]=it)}O.push(new a(k,z,X))}}}}}}}O.sort(c);for(var B=0;B+1=0?w[P++]=b[D]:O=D&1;if(O===(y&1)){var C=w[0];w[0]=w[1],w[1]=C}R.push(w)}}return R};function N(y,R){var I=y.length;if(I===0)throw new Error("Must have at least d+1 points");var v=y[0].length;if(I<=v)throw new Error("Must input at least d+1 points");var M=y.slice(0,v+1),T=_.apply(void 0,M);if(T===0)throw new Error("Input not in general position");for(var w=new Array(v+1),b=0;b<=v;++b)w[b]=b;T<0&&(w[0]=1,w[1]=0);for(var P=new S(w,new Array(v+1),!1),O=P.adjacent,D=new Array(v+2),b=0;b<=v;++b){for(var C=w.slice(),q=0;q<=v;++q)q===b&&(C[q]=-1);var B=C[0];C[0]=C[1],C[1]=B;var U=new S(C,new Array(v+1),!0);O[b]=U,D[b]=U}D[v+1]=P;for(var b=0;b<=v;++b)for(var C=O[b].vertices,W=O[b].adjacent,q=0;q<=v;++q){var L=C[q];if(L<0){W[q]=P;continue}for(var X=0;X<=v;++X)O[X].vertices.indexOf(L)<0&&(W[q]=O[X])}for(var ot=new g(v,M,D),F=!!R,b=v+1;b1&&_(S[p[y-2]],S[p[y-1]],N)<=0;)y-=1,p.pop();for(p.push(m),y=g.length;y>1&&_(S[g[y-2]],S[g[y-1]],N)>=0;)y-=1,g.pop();g.push(m)}for(var R=new Array(g.length+p.length-2),I=0,c=0,v=p.length;c0;--M)R[I++]=g[M];return R}},{"robust-orientation":44}],44:[function(h,E,u){var _=h("two-product"),d=h("robust-sum"),S=h("robust-scale"),a=h("robust-subtract"),c=5,f=11102230246251565e-32,p=(3+16*f)*f,g=(7+56*f)*f;function m(O,D){for(var C=new Array(O.length-1),q=1;q>1;return["sum(",R(O.slice(0,D)),",",R(O.slice(D)),")"].join("")}function I(O){if(O.length===2)return[["sum(prod(",O[0][0],",",O[1][1],"),prod(-",O[0][1],",",O[1][0],"))"].join("")];for(var D=[],C=0;C0){if(U<=0)return W;L=B+U}else if(B<0){if(U>=0)return W;L=-(B+U)}else return W;var X=p*L;return W>=X||W<=-X?W:M(D,C,q)},function(D,C,q,B){var U=D[0]-B[0],W=C[0]-B[0],L=q[0]-B[0],X=D[1]-B[1],ot=C[1]-B[1],F=q[1]-B[1],Y=D[2]-B[2],H=C[2]-B[2],z=q[2]-B[2],J=W*F,G=L*ot,k=L*X,j=U*F,rt=U*ot,it=W*X,Q=Y*(J-G)+H*(k-j)+z*(rt-it),lt=(Math.abs(J)+Math.abs(G))*Math.abs(Y)+(Math.abs(k)+Math.abs(j))*Math.abs(H)+(Math.abs(rt)+Math.abs(it))*Math.abs(z),st=g*lt;return Q>st||-Q>st?Q:T(D,C,q,B)}];function b(O){var D=w[O.length];return D||(D=w[O.length]=v(O.length)),D.apply(void 0,O)}function P(){for(;w.length<=c;)w.push(v(w.length));for(var O=[],D=["slow"],C=0;C<=c;++C)O.push("a"+C),D.push("o"+C);for(var q=["function getOrientation(",O.join(),"){switch(arguments.length){case 0:case 1:return 0;"],C=2;C<=c;++C)q.push("case ",C,":return o",C,"(",O.slice(0,C).join(),");");q.push("}var s=new Array(arguments.length);for(var i=0;i=f?(w=I,N+=1,N=f?(w=I,N+=1,N>1,U=f(P[B],O);U<=0?(U===0&&(q=B),D=B+1):U>0&&(C=B-1)}return q}u.findCell=N;function y(P,O){for(var D=new Array(P.length),C=0,q=D.length;C=P.length||f(P[H],B)!==0););}return D}u.incidence=y;function R(P,O){if(!O)return y(m(v(P,0)),P);for(var D=new Array(O),C=0;C>>X&1&&L.push(q[X]);O.push(L)}return g(O)}u.explode=I;function v(P,O){if(O<0)return[];for(var D=[],C=(1<S[1]!=R>S[1]&&S[0]<(y-m)*(S[1]-N)/(R-N)+m;v&&(f=!f)}return f}},{"@turf/invariant":73}],73:[function(h,E,u){arguments[4][4][0].apply(u,arguments)},{dup:4}],74:[function(h,E,u){E.exports=_;function _(a,c,f,p,g){for(f=f||0,p=p||a.length-1,g=g||S;p>f;){if(p-f>600){var m=p-f+1,N=c-f+1,y=Math.log(m),R=.5*Math.exp(2*y/3),I=.5*Math.sqrt(y*R*(m-R)/m)*(N-m/2<0?-1:1),v=Math.max(f,Math.floor(c-N*R/m+I)),M=Math.min(p,Math.floor(c+(m-N)*R/m+I));_(a,c,v,M,g)}var T=a[c],w=f,b=p;for(d(a,f,c),g(a[p],T)>0&&d(a,f,p);w0;)b--}g(a[f],T)===0?d(a,f,b):(b++,d(a,b,p)),b<=c&&(f=b+1),c<=b&&(p=b-1)}}function d(a,c,f){var p=a[c];a[c]=a[f],a[f]=p}function S(a,c){return ac?1:0}},{}],75:[function(h,E,u){E.exports=d;var _=h("quickselect");function d(w,b){if(!(this instanceof d))return new d(w,b);this._maxEntries=Math.max(4,w||9),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),b&&this._initFormat(b),this.clear()}d.prototype={all:function(){return this._all(this.data,[])},search:function(w){var b=this.data,P=[],O=this.toBBox;if(!v(w,b))return P;for(var D=[],C,q,B,U;b;){for(C=0,q=b.children.length;C=0&&C[b].children.length>this._maxEntries;)this._split(C,b),b--;this._adjustParentBBoxes(D,C,b)},_split:function(w,b){var P=w[b],O=P.children.length,D=this._minEntries;this._chooseSplitAxis(P,D,O);var C=this._chooseSplitIndex(P,D,O),q=M(P.children.splice(C,P.children.length-C));q.height=P.height,q.leaf=P.leaf,a(P,this.toBBox),a(q,this.toBBox),b?w[b-1].children.push(q):this._splitRoot(P,q)},_splitRoot:function(w,b){this.data=M([w,b]),this.data.height=w.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(w,b,P){var O,D,C,q,B,U,W,L;for(U=W=1/0,O=b;O<=P-b;O++)D=c(w,0,O,this.toBBox),C=c(w,O,P,this.toBBox),q=R(D,C),B=m(D)+m(C),q=b;U--)W=w.children[U],f(q,w.leaf?D(W):W),B+=N(q);return B},_adjustParentBBoxes:function(w,b,P){for(var O=P;O>=0;O--)f(b[O],w)},_condense:function(w){for(var b=w.length-1,P;b>=0;b--)w[b].children.length===0?b>0?(P=w[b-1].children,P.splice(P.indexOf(w[b]),1)):this.clear():a(w[b],this.toBBox)},_initFormat:function(w){var b=["return a"," - b",";"];this.compareMinX=new Function("a","b",b.join(w[0])),this.compareMinY=new Function("a","b",b.join(w[1])),this.toBBox=new Function("a","return {minX: a"+w[0]+", minY: a"+w[1]+", maxX: a"+w[2]+", maxY: a"+w[3]+"};")}};function S(w,b,P){if(!P)return b.indexOf(w);for(var O=0;O=w.minX&&b.maxY>=w.minY}function M(w){return{children:w,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function T(w,b,P,O,D){for(var C=[b,P],q;C.length;)P=C.pop(),b=C.pop(),!(P-b<=O)&&(q=b+Math.ceil((P-b)/O/2)*O,_(w,q,b,P,D),C.push(b,q,q,P))}},{quickselect:74}],76:[function(h,E,u){var _=h("@turf/meta");E.exports=function(d){var S={MultiPoint:{coordinates:[],properties:[]},MultiLineString:{coordinates:[],properties:[]},MultiPolygon:{coordinates:[],properties:[]}},a=Object.keys(S).reduce(function(f,p){return f[p.replace("Multi","")]=p,f},{});function c(f,p,g){g?S[p].coordinates=S[p].coordinates.concat(f.geometry.coordinates):S[p].coordinates.push(f.geometry.coordinates),S[p].properties.push(f.properties)}return _.featureEach(d,function(f){f.geometry&&(S[f.geometry.type]?c(f,f.geometry.type,!0):a[f.geometry.type]&&c(f,a[f.geometry.type],!1))}),{type:"FeatureCollection",features:Object.keys(S).filter(function(f){return S[f].coordinates.length}).sort().map(function(f){return{type:"Feature",properties:{collectedProperties:S[f].properties},geometry:{type:f,coordinates:S[f].coordinates}}})}}},{"@turf/meta":77}],77:[function(h,E,u){arguments[4][14][0].apply(u,arguments)},{dup:14}],78:[function(h,E,u){var _=h("@turf/tin"),d=h("@turf/union"),S=h("@turf/distance");function a(f,p,g){if(typeof p!="number")throw new Error("maxEdge parameter is required");var m=_(f),N=m.features.filter(y);if(m.features=N,m.features.length<1)throw new Error("too few polygons found to compute concave hull");function y(R){var I=R.geometry.coordinates[0][0],v=R.geometry.coordinates[0][1],M=R.geometry.coordinates[0][2],T=S(I,v,g),w=S(v,M,g),b=S(I,M,g);return T<=p&&w<=p&&b<=p}return c(m)}function c(f){for(var p=JSON.parse(JSON.stringify(f.features[0])),g=f.features,m=0,N=g.length;mR&&(R=p[g].y);var O=N-m,D=R-y,C=O>D?O:D,q=(N+m)*.5,B=(R+y)*.5,U=[new S({x:q-20*C,y:B-C,__sentinel:!0},{x:q,y:B+20*C,__sentinel:!0},{x:q+20*C,y:B-C,__sentinel:!0})],W=[],L=[],X;for(g=p.length;g--;){for(L.length=0,X=U.length;X--;){if(O=p[g].x-U[X].x,O>0&&O*O>U[X].r){W.push(U[X]),U.splice(X,1);continue}D=p[g].y-U[X].y,!(O*O+D*D>U[X].r)&&(L.push(U[X].a,U[X].b,U[X].b,U[X].c,U[X].c,U[X].a),U.splice(X,1))}for(c(L),X=L.length;X;)M=L[--X],v=L[--X],T=p[g],w=M.x-v.x,b=M.y-v.y,P=2*(w*(T.y-M.y)-b*(T.x-M.x)),Math.abs(P)>I&&U.push(new S(v,M,T))}for(Array.prototype.push.apply(W,U),g=W.length;g--;)(W[g].a.__sentinel||W[g].b.__sentinel||W[g].c.__sentinel)&&W.splice(g,1);return W}},{"@turf/helpers":83}],83:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],84:[function(h,E,u){var _=h("jsts");E.exports=function(){for(var d=new _.io.GeoJSONReader,S=d.read(JSON.stringify(arguments[0].geometry)),a=1;a0&&q!==0)if(q>N[N.length-1])q=q-N.length;else{var B=f.greaterNumber(q,N);B!==0&&(q=q-B)}if(q!==T){var U=g.features[q];if(!(typeof m!==void 0&&U.properties[m]!==w.properties[m])){var W=d(w,U);if(!W){var L=JSON.stringify(w),X=JSON.stringify(U),ot=p(JSON.parse(L)),F=p(JSON.parse(X));W=c.lineStringsIntersect(ot.geometry,F.geometry)}W&&(g.features[T]=_(w,U),N.push(O[C].origIndexPosition),N.sort(function(H,z){return H-z}),R.remove(O[C]),g.features.splice(q,1),P.origIndexPosition=T,R.remove(P,function(H,z){return H.origIndexPosition===z.origIndexPosition}),D=!0)}}}if(D){var Y=S(w);R.insert({minX:Y[0],minY:Y[1],maxX:Y[2],maxY:Y[3],origIndexPosition:T}),T--}}return g};function p(g){if(g==null)throw new Error("No polygon was passed");g.geometry.type="LineString";var m=[].concat.apply([],g.geometry.coordinates);return g.geometry.coordinates=m,g}},{"@turf/bbox":111,"@turf/union":113,"geojson-utils":115,"get-closest":116,rbush:118,"turf-overlaps":120}],111:[function(h,E,u){arguments[4][18][0].apply(u,arguments)},{"@turf/meta":112,dup:18}],112:[function(h,E,u){arguments[4][14][0].apply(u,arguments)},{dup:14}],113:[function(h,E,u){arguments[4][84][0].apply(u,arguments)},{dup:84,jsts:114}],114:[function(h,E,u){arguments[4][28][0].apply(u,arguments)},{dup:28}],115:[function(h,E,u){(function(){var _=this.gju={};typeof E<"u"&&E.exports&&(E.exports=_),_.lineStringsIntersect=function(a,c){for(var f=[],p=0;p<=a.coordinates.length-2;++p)for(var g=0;g<=c.coordinates.length-2;++g){var m={x:a.coordinates[p][1],y:a.coordinates[p][0]},N={x:a.coordinates[p+1][1],y:a.coordinates[p+1][0]},y={x:c.coordinates[g][1],y:c.coordinates[g][0]},R={x:c.coordinates[g+1][1],y:c.coordinates[g+1][0]},I=(R.x-y.x)*(m.y-y.y)-(R.y-y.y)*(m.x-y.x),v=(N.x-m.x)*(m.y-y.y)-(N.y-m.y)*(m.x-y.x),M=(R.y-y.y)*(N.x-m.x)-(R.x-y.x)*(N.y-m.y);if(M!=0){var T=I/M,w=v/M;0<=T&&T<=1&&0<=w&&w<=1&&f.push({type:"Point",coordinates:[m.x+T*(N.x-m.x),m.y+T*(N.y-m.y)]})}}return f.length==0&&(f=!1),f};function d(a){for(var c=[],f=[],p=0;pc[1][0]||a.coordinates[0]c[1][1])};function S(a,c,f){for(var p=[[0,0]],g=0;gc!=p[m][0]>c&&a<(p[m][1]-p[g][1])*(c-p[g][0])/(p[m][0]-p[g][0])+p[g][1]&&(N=!N);return N}_.pointInPolygon=function(a,c){for(var f=c.type=="Polygon"?[c.coordinates]:c.coordinates,p=!1,g=0;gf)return!1}return!0},_.area=function(a){for(var c=0,f=a.coordinates[0],p=f.length-1,g,m,N=0;N0;)if(m=L[p-1],N=X[p-1],p--,N-m>1){for(T=a[N].lng()-a[m].lng(),w=a[N].lat()-a[m].lat(),Math.abs(T)>180&&(T=360-Math.abs(T)),T*=Math.cos(U*(a[N].lat()+a[m].lat())),b=T*T+w*w,y=m+1,R=m,v=-1;y180&&(P=360-Math.abs(P)),P*=Math.cos(U*(a[y].lat()+a[m].lat())),D=P*P+O*O,C=a[y].lng()-a[N].lng(),q=a[y].lat()-a[N].lat(),Math.abs(C)>180&&(C=360-Math.abs(C)),C*=Math.cos(U*(a[y].lat()+a[N].lat())),B=C*C+q*q,D>=b+B?I=B:B>=b+D?I=D:I=(P*w-O*T)*(P*w-O*T)/b,I>v&&(R=y,v=I);v=0&&(typeof p>"u"||N0}},{}],120:[function(h,E,u){var _=h("turf-is-clockwise");function d(c,f){var p=c[0],g=c[1],m=f[0],N=f[1];return _([p,m,N,p])!=_([g,m,N,g])&&_([p,g,m,p])!=_([p,g,N,p])}function S(c,f){for(var p=0;pP&&(C>w&&Dw&&CM&&(M=q)}var B=[];if(v&&M0&&Math.abs(L-m[W-1][0])>P){var X=parseFloat(m[W-1][0]),ot=parseFloat(m[W-1][1]),F=parseFloat(m[W][0]),Y=parseFloat(m[W][1]);if(X>-180&&X-180&&m[W-1][0]w&&X<180&&F===-180&&W+1w&&m[W-1][0]<180){U.push([180,m[W][1]]),W++,U.push([m[W][0],m[W][1]]);continue}if(Xw){var H=X;X=F,F=H;var z=ot;ot=Y,Y=z}if(X>w&&F=180&&Xw?180:-180,G]),U=[],U.push([m[W-1][0]>w?-180:180,G]),B.push(U)}else U=[],B.push(U);U.push([L,m[W][1]])}else U.push([m[W][0],m[W][1]])}}else{var k=[];B.push(k);for(var j=0;jC/2;H&&(Y-=C/4);for(var z=a([]),J=0;J=m;G--)for(var k=p;k<=g-1;k++){var j,rt;if(j=Math.min(f[k][G],f[k][G+1]),rt=Math.min(f[k+1][G],f[k+1][G+1]),W=Math.min(j,rt),j=Math.max(f[k][G],f[k][G+1]),rt=Math.max(f[k+1][G],f[k+1][G+1]),L=Math.max(j,rt),L>=v[0]&&W<=v[I-1]){for(var it=0;it=W&&v[it]<=L){for(var Q=4;Q>=0;Q--)Q>0?(M[Q]=f[k+H[Q-1]][G+z[Q-1]]-v[it],w[Q]=y[k+H[Q-1]],b[Q]=R[G+z[Q-1]]):(M[0]=.25*(M[1]+M[2]+M[3]+M[4]),w[0]=.5*(y[k]+y[k+1]),b[0]=.5*(R[G]+R[G+1])),M[Q]>_?T[Q]=1:M[Q]<-_?T[Q]=-1:T[Q]=0;for(Q=1;Q<=4;Q++)if(C=Q,q=0,Q!=4?B=Q+1:B=1,U=J[T[C]+1][T[q]+1][T[B]+1],U!=0){switch(U){case 1:X=w[C],F=b[C],ot=w[q],Y=b[q];break;case 2:X=w[q],F=b[q],ot=w[B],Y=b[B];break;case 3:X=w[B],F=b[B],ot=w[C],Y=b[C];break;case 4:X=w[C],F=b[C],ot=O(q,B),Y=D(q,B);break;case 5:X=w[q],F=b[q],ot=O(B,C),Y=D(B,C);break;case 6:X=w[B],F=b[B],ot=O(C,q),Y=D(C,q);break;case 7:X=O(C,q),F=D(C,q),ot=O(q,B),Y=D(q,B);break;case 8:X=O(q,B),F=D(q,B),ot=O(B,C),Y=D(B,C);break;case 9:X=O(B,C),F=D(B,C),ot=O(C,q),Y=D(C,q);break}P(X,F,ot,Y,v[it],it)}}}}}},{}],169:[function(h,E,u){var _=h("@turf/tin"),d=h("@turf/inside"),S=h("@turf/point-grid"),a=h("@turf/distance"),c=h("@turf/bbox"),f=h("@turf/planepoint"),p=h("@turf/helpers").featureCollection,g=h("@turf/helpers").lineString,m=h("@turf/helpers").point,N=h("@turf/square"),y=h("./conrec");E.exports=function(R,I,v,M){for(var T=_(R,I),w=c(R),b=N(w),P=a(m([b[0],b[1]]),m([b[2],b[1]]),"kilometers")/v,O=S(b,P,"kilometers"),D=[],C=0;C2){var it=[];rt.forEach(function(lt){it.push([lt.x,lt.y])});var Q=g(it);Q.properties={},Q.properties[I]=rt.level,j.features.push(Q)}}),j}},{"./conrec":168,"@turf/bbox":170,"@turf/distance":172,"@turf/helpers":175,"@turf/inside":176,"@turf/planepoint":178,"@turf/point-grid":179,"@turf/square":186,"@turf/tin":190}],170:[function(h,E,u){arguments[4][18][0].apply(u,arguments)},{"@turf/meta":171,dup:18}],171:[function(h,E,u){arguments[4][14][0].apply(u,arguments)},{dup:14}],172:[function(h,E,u){arguments[4][8][0].apply(u,arguments)},{"@turf/helpers":173,"@turf/invariant":174,dup:8}],173:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],174:[function(h,E,u){arguments[4][4][0].apply(u,arguments)},{dup:4}],175:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],176:[function(h,E,u){arguments[4][72][0].apply(u,arguments)},{"@turf/invariant":177,dup:72}],177:[function(h,E,u){arguments[4][4][0].apply(u,arguments)},{dup:4}],178:[function(h,E,u){E.exports=function(_,d){var S=_.geometry.coordinates[0],a=_.geometry.coordinates[1],c=d.geometry.coordinates[0][0][0],f=d.geometry.coordinates[0][0][1],p=d.properties.a,g=d.geometry.coordinates[0][1][0],m=d.geometry.coordinates[0][1][1],N=d.properties.b,y=d.geometry.coordinates[0][2][0],R=d.geometry.coordinates[0][2][1],I=d.properties.c,v=(I*(S-c)*(a-m)+p*(S-g)*(a-R)+N*(S-y)*(a-f)-N*(S-c)*(a-R)-I*(S-g)*(a-f)-p*(S-y)*(a-m))/((S-c)*(a-m)+(S-g)*(a-R)+(S-y)*(a-f)-(S-c)*(a-R)-(S-g)*(a-f)-(S-y)*(a-m));return v}},{}],179:[function(h,E,u){var _=h("@turf/helpers").point,d=h("@turf/helpers").featureCollection,S=h("@turf/distance"),a=h("@turf/bbox");E.exports=function(c,f,p){var g=[];if(!c)throw new Error("bbox is required");if(Array.isArray(c)||(c=a(c)),c.length!==4)throw new Error("bbox must contain 4 numbers");for(var m=c[0],N=c[1],y=c[2],R=c[3],I=f/S(_([m,N]),_([y,N]),p),v=I*(y-m),M=f/S(_([m,N]),_([m,R]),p),T=M*(R-N),w=m;w<=y;){for(var b=N;b<=R;)g.push(_([w,b])),b+=T;w+=v}return d(g)}},{"@turf/bbox":180,"@turf/distance":182,"@turf/helpers":185}],180:[function(h,E,u){arguments[4][18][0].apply(u,arguments)},{"@turf/meta":181,dup:18}],181:[function(h,E,u){arguments[4][14][0].apply(u,arguments)},{dup:14}],182:[function(h,E,u){arguments[4][8][0].apply(u,arguments)},{"@turf/helpers":183,"@turf/invariant":184,dup:8}],183:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],184:[function(h,E,u){arguments[4][4][0].apply(u,arguments)},{dup:4}],185:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],186:[function(h,E,u){var _=h("@turf/distance");E.exports=function(d){var S=d[0],a=d[1],c=d[2],f=d[3],p=_(d.slice(0,2),[c,a]),g=_(d.slice(0,2),[S,f]);if(p>=g){var m=(a+f)/2;return[S,m-(c-S)/2,c,m+(c-S)/2]}else{var N=(S+c)/2;return[N-(f-a)/2,a,N+(f-a)/2,f]}}},{"@turf/distance":187}],187:[function(h,E,u){arguments[4][8][0].apply(u,arguments)},{"@turf/helpers":188,"@turf/invariant":189,dup:8}],188:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],189:[function(h,E,u){arguments[4][4][0].apply(u,arguments)},{dup:4}],190:[function(h,E,u){arguments[4][82][0].apply(u,arguments)},{"@turf/helpers":191,dup:82}],191:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],192:[function(h,E,u){var _=h("@turf/helpers").point;E.exports=function(S){var a,c,f={type:"FeatureCollection",features:[]};if(S.type==="Feature"?c=S.geometry:c=S,c.type==="LineString")a=[c.coordinates];else if(c.type==="MultiLineString")a=c.coordinates;else if(c.type==="MultiPolygon")a=[].concat.apply([],c.coordinates);else if(c.type==="Polygon")a=c.coordinates;else throw new Error("Input must be a LineString, MultiLineString, Polygon, or MultiPolygon Feature or Geometry");return a.forEach(function(p){a.forEach(function(g){for(var m=0;m=0&&R<=1&&(T.onLine1=!0),I>=0&&I<=1&&(T.onLine2=!0),T.onLine1&&T.onLine2?[T.x,T.y]:!1)}},{"@turf/helpers":193}],193:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],194:[function(h,E,u){var _=h("@turf/line-slice-along"),d=h("@turf/line-distance"),S=h("@turf/helpers").featureCollection,a=h("@turf/meta").featureEach,c=h("@turf/flatten");E.exports=function(p,g,m,N){var y=[],R=arguments[4];return a(p,function(I){I.geometry.type==="MultiLineString"&&(I=c(I)),a(I,function(v){N&&(v.geometry.coordinates=v.geometry.coordinates.reverse());var M=f(v,g,m);M.forEach(function(T,w){if(R===!0){var b=w%2===0?"F":"0",P=(w%2===0,"0"),O=w%2===0?"0":"F";T.properties.stroke="#"+b+P+O,T.properties["stroke-width"]=6}y.push(T)})})}),S(y)};function f(p,g,m){var N=[],y=d(p,m);if(y<=g)return[p];for(var R=Math.floor(y/g)+1,I=0;I=y&&M===m.length-1);M++){if(y>f&&N.length===0){if(R=f-y,!R)return N.push(m[M]),a(N);I=_(m[M],m[M-1])-180,v=S(m[M],R,I,g),N.push(v.geometry.coordinates)}if(y>=p)return R=p-y,R?(I=_(m[M],m[M-1])-180,v=S(m[M],R,I,g),N.push(v.geometry.coordinates),a(N)):(N.push(m[M]),a(N));if(y>=f&&N.push(m[M]),M===m.length-1)return a(N);y+=d(m[M],m[M+1],g)}return a(m[m.length-1])}},{"@turf/bearing":211,"@turf/destination":213,"@turf/distance":216,"@turf/helpers":219}],211:[function(h,E,u){arguments[4][3][0].apply(u,arguments)},{"@turf/invariant":212,dup:3}],212:[function(h,E,u){arguments[4][4][0].apply(u,arguments)},{dup:4}],213:[function(h,E,u){arguments[4][5][0].apply(u,arguments)},{"@turf/helpers":214,"@turf/invariant":215,dup:5}],214:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],215:[function(h,E,u){arguments[4][4][0].apply(u,arguments)},{dup:4}],216:[function(h,E,u){arguments[4][8][0].apply(u,arguments)},{"@turf/helpers":217,"@turf/invariant":218,dup:8}],217:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],218:[function(h,E,u){arguments[4][4][0].apply(u,arguments)},{dup:4}],219:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],220:[function(h,E,u){arguments[4][14][0].apply(u,arguments)},{dup:14}],221:[function(h,E,u){arguments[4][200][0].apply(u,arguments)},{"@turf/distance":222,"@turf/flatten":225,"@turf/helpers":229,"@turf/meta":230,dup:200}],222:[function(h,E,u){arguments[4][8][0].apply(u,arguments)},{"@turf/helpers":223,"@turf/invariant":224,dup:8}],223:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],224:[function(h,E,u){arguments[4][4][0].apply(u,arguments)},{dup:4}],225:[function(h,E,u){arguments[4][132][0].apply(u,arguments)},{"@turf/helpers":226,"@turf/invariant":227,"@turf/meta":228,dup:132}],226:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],227:[function(h,E,u){arguments[4][4][0].apply(u,arguments)},{dup:4}],228:[function(h,E,u){arguments[4][14][0].apply(u,arguments)},{dup:14}],229:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],230:[function(h,E,u){arguments[4][14][0].apply(u,arguments)},{dup:14}],231:[function(h,E,u){var _=h("@turf/helpers"),d=h("@turf/meta"),S=h("@turf/line-segment"),a=h("@turf/invariant").getCoords,c=h("geojson-rbush"),f=_.point,p=_.featureCollection,g=d.featureEach;E.exports=function(N,y){var R=[];if(N.geometry.type==="LineString"&&y.geometry.type==="LineString"&&N.geometry.coordinates.length===2&&y.geometry.coordinates.length===2){var I=m(N,y);return I&&R.push(I),p(R)}var v=c();return v.load(S(y)),g(S(N),function(M){g(v.search(M),function(T){var w=m(M,T);w&&R.push(w)})}),p(R)};function m(N,y){var R=a(N),I=a(y);if(R.length!==2)throw new Error(" line1 must only contain 2 coordinates");if(I.length!==2)throw new Error(" line2 must only contain 2 coordinates");var v=R[0][0],M=R[0][1],T=R[1][0],w=R[1][1],b=I[0][0],P=I[0][1],O=I[1][0],D=I[1][1],C=(D-P)*(T-v)-(O-b)*(w-M),q=(O-b)*(M-P)-(D-P)*(v-b),B=(T-v)*(M-P)-(w-M)*(v-b);if(C===0)return null;var U=q/C,W=B/C;if(U>=0&&U<=1&&W>=0&&W<=1){var L=v+U*(T-v),X=M+U*(w-M);return f([L,X])}return null}},{"@turf/helpers":233,"@turf/invariant":234,"@turf/line-segment":235,"@turf/meta":243,"geojson-rbush":244}],232:[function(h,E,u){arguments[4][18][0].apply(u,arguments)},{"@turf/meta":243,dup:18}],233:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],234:[function(h,E,u){arguments[4][4][0].apply(u,arguments)},{dup:4}],235:[function(h,E,u){var _=h("@turf/flatten"),d=h("@turf/meta").featureEach,S=h("@turf/helpers").lineString,a=h("@turf/helpers").featureCollection,c=h("@turf/invariant").getCoords;E.exports=function(g){var m=[],N=0;return d(g,function(y){d(_(y),function(R){var I=[],v=R.geometry?R.geometry.type:R.type;switch(v){case"Polygon":I=c(R);break;case"LineString":I=[c(R)]}I.forEach(function(M){var T=f(M,R.properties);T.forEach(function(w){w.id=N,m.push(w),N++})})})}),a(m)};function f(g,m){var N=[];return g.reduce(function(y,R){var I=S([y,R],m);return I.bbox=p(y,R),N.push(I),R}),N}function p(g,m){var N=g[0],y=g[1],R=m[0],I=m[1],v=NR?N:R,w=y>I?y:I;return[v,M,T,w]}},{"@turf/flatten":236,"@turf/helpers":240,"@turf/invariant":241,"@turf/meta":242}],236:[function(h,E,u){arguments[4][132][0].apply(u,arguments)},{"@turf/helpers":237,"@turf/invariant":238,"@turf/meta":239,dup:132}],237:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],238:[function(h,E,u){arguments[4][4][0].apply(u,arguments)},{dup:4}],239:[function(h,E,u){arguments[4][14][0].apply(u,arguments)},{dup:14}],240:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],241:[function(h,E,u){arguments[4][4][0].apply(u,arguments)},{dup:4}],242:[function(h,E,u){arguments[4][14][0].apply(u,arguments)},{dup:14}],243:[function(h,E,u){arguments[4][14][0].apply(u,arguments)},{dup:14}],244:[function(h,E,u){var _=h("@turf/bbox"),d=h("@turf/helpers").featureCollection,S=h("@turf/meta").featureEach,a=h("rbush");E.exports=function(c){var f=a(c);return f.insert=function(p){return p.bbox=p.bbox?p.bbox:_(p),a.prototype.insert.call(this,p)},f.load=function(p){var g=[];return S(p,function(m){m.bbox=m.bbox?m.bbox:_(m),g.push(m)}),a.prototype.load.call(this,g)},f.remove=function(p){return a.prototype.remove.call(this,p)},f.clear=function(){return a.prototype.clear.call(this)},f.search=function(p){var g=a.prototype.search.call(this,this.toBBox(p));return d(g)},f.collides=function(p){return a.prototype.collides.call(this,this.toBBox(p))},f.all=function(){var p=a.prototype.all.call(this);return d(p)},f.toJSON=function(){return a.prototype.toJSON.call(this)},f.fromJSON=function(p){return a.prototype.fromJSON.call(this,p)},f.toBBox=function(p){var g=p.bbox?p.bbox:_(p);return{minX:g[0],minY:g[1],maxX:g[2],maxY:g[3]}},f}},{"@turf/bbox":232,"@turf/helpers":233,"@turf/meta":243,rbush:246}],245:[function(h,E,u){arguments[4][74][0].apply(u,arguments)},{dup:74}],246:[function(h,E,u){arguments[4][75][0].apply(u,arguments)},{dup:75,quickselect:245}],247:[function(h,E,u){arguments[4][235][0].apply(u,arguments)},{"@turf/flatten":248,"@turf/helpers":252,"@turf/invariant":253,"@turf/meta":254,dup:235}],248:[function(h,E,u){arguments[4][132][0].apply(u,arguments)},{"@turf/helpers":249,"@turf/invariant":250,"@turf/meta":251,dup:132}],249:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],250:[function(h,E,u){arguments[4][4][0].apply(u,arguments)},{dup:4}],251:[function(h,E,u){arguments[4][14][0].apply(u,arguments)},{dup:14}],252:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],253:[function(h,E,u){arguments[4][4][0].apply(u,arguments)},{dup:4}],254:[function(h,E,u){arguments[4][14][0].apply(u,arguments)},{dup:14}],255:[function(h,E,u){arguments[4][210][0].apply(u,arguments)},{"@turf/bearing":256,"@turf/destination":258,"@turf/distance":261,"@turf/helpers":264,dup:210}],256:[function(h,E,u){arguments[4][3][0].apply(u,arguments)},{"@turf/invariant":257,dup:3}],257:[function(h,E,u){arguments[4][4][0].apply(u,arguments)},{dup:4}],258:[function(h,E,u){arguments[4][5][0].apply(u,arguments)},{"@turf/helpers":259,"@turf/invariant":260,dup:5}],259:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],260:[function(h,E,u){arguments[4][4][0].apply(u,arguments)},{dup:4}],261:[function(h,E,u){arguments[4][8][0].apply(u,arguments)},{"@turf/helpers":262,"@turf/invariant":263,dup:8}],262:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],263:[function(h,E,u){arguments[4][4][0].apply(u,arguments)},{dup:4}],264:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],265:[function(h,E,u){var _=h("@turf/helpers").lineString,d=h("@turf/point-on-line");E.exports=function(a,c,f){var p;if(f.type==="Feature")p=f.geometry.coordinates;else if(f.type==="LineString")p=f.coordinates;else throw new Error("input must be a LineString Feature or Geometry");var g=d(f,a),m=d(f,c),N;g.properties.index<=m.properties.index?N=[g,m]:N=[m,g];for(var y=_([N[0].geometry.coordinates],{}),R=N[0].properties.index+1;R0&&M<1&&(P.onLine1=!0),T>0&&T<1&&(P.onLine2=!0),P.onLine1&&P.onLine2?[P.x,P.y]:!1)}},{"@turf/bearing":268,"@turf/destination":270,"@turf/distance":273,"@turf/helpers":276}],268:[function(h,E,u){arguments[4][3][0].apply(u,arguments)},{"@turf/invariant":269,dup:3}],269:[function(h,E,u){arguments[4][4][0].apply(u,arguments)},{dup:4}],270:[function(h,E,u){arguments[4][5][0].apply(u,arguments)},{"@turf/helpers":271,"@turf/invariant":272,dup:5}],271:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],272:[function(h,E,u){arguments[4][4][0].apply(u,arguments)},{dup:4}],273:[function(h,E,u){arguments[4][8][0].apply(u,arguments)},{"@turf/helpers":274,"@turf/invariant":275,dup:8}],274:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],275:[function(h,E,u){arguments[4][4][0].apply(u,arguments)},{dup:4}],276:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],277:[function(h,E,u){var _=h("@turf/meta").featureEach,d=h("rbush"),S=h("@turf/bbox"),a=h("@turf/helpers"),c=h("@turf/union");E.exports=function(I,v){var M=m(v),T=p(I),w=T[0],b=T[1];w=N(w),b=N(b);var P=f(M,w,b);return P};function f(I,v,M){var T=[];return T.push(I.geometry.coordinates[0]),_(v,function(w){T.push(w.geometry.coordinates[0])}),_(M,function(w){T.push(w.geometry.coordinates[0])}),a.polygon(T)}function p(I){var v=[],M=[];return _(I,function(T){T.geometry.type==="MultiPolygon"&&(T=g(T)),_(T,function(w){var b=w.geometry.coordinates,P=b[0],O=b.slice(1);v.push(a.polygon([P])),O.forEach(function(D){M.push(a.polygon([D]))})})}),[a.featureCollection(v),a.featureCollection(M)]}function g(I){var v=[];return I.geometry.coordinates.forEach(function(M){v.push(a.polygon(M))}),a.featureCollection(v)}function m(I){var v=[[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]],M=I&&I.geometry.coordinates||v;return a.polygon(M)}function N(I){if(I.features.length<=1)return I;var v=R(I),M=[],T={};return _(I,function(w,b){if(T[b])return!0;for(v.remove({index:b},y),T[b]=!0;;){var P=S(w),O=v.search({minX:P[0],minY:P[1],maxX:P[2],maxY:P[3]});if(O.length>0){var D=O.map(function(C){return T[C.index]=!0,v.remove({index:C.index},y),C.geojson});D.push(w),w=c.apply(this,D)}if(O.length===0)break}M.push(w)}),a.featureCollection(M)}function y(I,v){return I.index===v.index}function R(I){var v=d(),M=[];return _(I,function(T,w){var b=S(T);M.push({minX:b[0],minY:b[1],maxX:b[2],maxY:b[3],geojson:T,index:w})}),v.load(M),v}},{"@turf/bbox":278,"@turf/helpers":280,"@turf/meta":281,"@turf/union":282,rbush:285}],278:[function(h,E,u){arguments[4][18][0].apply(u,arguments)},{"@turf/meta":279,dup:18}],279:[function(h,E,u){arguments[4][14][0].apply(u,arguments)},{dup:14}],280:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],281:[function(h,E,u){arguments[4][14][0].apply(u,arguments)},{dup:14}],282:[function(h,E,u){arguments[4][84][0].apply(u,arguments)},{dup:84,jsts:283}],283:[function(h,E,u){arguments[4][28][0].apply(u,arguments)},{dup:28}],284:[function(h,E,u){arguments[4][74][0].apply(u,arguments)},{dup:74}],285:[function(h,E,u){arguments[4][75][0].apply(u,arguments)},{dup:75,quickselect:284}],286:[function(h,E,u){arguments[4][14][0].apply(u,arguments)},{dup:14}],287:[function(h,E,u){var _=h("@turf/bearing"),d=h("@turf/destination"),S=h("@turf/distance");E.exports=function(a,c){var f=S(a,c,"miles"),p=_(a,c),g=d(a,f/2,p,"miles");return g}},{"@turf/bearing":288,"@turf/destination":290,"@turf/distance":293}],288:[function(h,E,u){arguments[4][3][0].apply(u,arguments)},{"@turf/invariant":289,dup:3}],289:[function(h,E,u){arguments[4][4][0].apply(u,arguments)},{dup:4}],290:[function(h,E,u){arguments[4][5][0].apply(u,arguments)},{"@turf/helpers":291,"@turf/invariant":292,dup:5}],291:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],292:[function(h,E,u){arguments[4][4][0].apply(u,arguments)},{dup:4}],293:[function(h,E,u){arguments[4][8][0].apply(u,arguments)},{"@turf/helpers":294,"@turf/invariant":295,dup:8}],294:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],295:[function(h,E,u){arguments[4][4][0].apply(u,arguments)},{dup:4}],296:[function(h,E,u){var _=h("@turf/distance");E.exports=function(d,S){for(var a,c=1/0,f=0;f0?O+C[D-1]:O}function P(O,D){O=O*2*Math.PI/w[w.length-1];var C=Math.random();T.push([C*I*Math.sin(O),C*I*Math.cos(O)])}return N(M)};function d(y){return function(R,I){return[R[0]+y[0],R[1]+y[1]]}}function S(){return Math.random()-.5}function a(){return S()*360}function c(){return S()*180}function f(y){return{type:"Point",coordinates:y||[a(),c()]}}function p(y){return[Math.random()*(y[2]-y[0])+y[0],Math.random()*(y[3]-y[1])+y[1]]}function g(y){return{type:"Polygon",coordinates:y}}function m(y){return{type:"Feature",geometry:y,properties:{}}}function N(y){return{type:"FeatureCollection",features:y}}},{}],334:[function(h,E,u){var _=h("@turf/helpers").featureCollection;E.exports=function(S,a){var c=_(d(S.features,a));return c};function d(S,a){for(var c=S.slice(0),f=S.length,p=f-a,g,m;f-- >p;)m=Math.floor((f+1)*Math.random()),g=c[m],c[m]=c[f],c[f]=g;return c.slice(p)}},{"@turf/helpers":335}],335:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],336:[function(h,E,u){var _=h("simplify-js"),d=["LineString","MultiLineString","Polygon","MultiPolygon"];E.exports=function(g,m,N){return g.type==="Feature"?c(S(g,m,N),g.properties):g.type==="FeatureCollection"?{type:"FeatureCollection",features:g.features.map(function(y){var R=S(y,m,N);return d.indexOf(R.type)>-1?c(R,y.properties):R})}:g.type==="GeometryCollection"?{type:"GeometryCollection",geometries:g.geometries.map(function(y){return d.indexOf(y.type)>-1?S({type:"Feature",geometry:y},m,N):y})}:g};function S(g,m,N){return g.geometry.type==="LineString"?{type:"LineString",coordinates:f(g.geometry.coordinates,m,N)}:g.geometry.type==="MultiLineString"?{type:"MultiLineString",coordinates:g.geometry.coordinates.map(function(y){return f(y,m,N)})}:g.geometry.type==="Polygon"?{type:"Polygon",coordinates:p(g.geometry.coordinates,m,N)}:g.geometry.type==="MultiPolygon"?{type:"MultiPolygon",coordinates:g.geometry.coordinates.map(function(y){return p(y,m,N)})}:g}function a(g){return g.length<3?!1:!(g.length===3&&g[2][0]===g[0][0]&&g[2][1]===g[0][1])}function c(g,m){return{type:"Feature",geometry:g,properties:m}}function f(g,m,N){return _(g.map(function(y){return{x:y[0],y:y[1],z:y[2]}}),m,N).map(function(y){return y.z?[y.x,y.y,y.z]:[y.x,y.y]})}function p(g,m,N){return g.map(function(y){var R=y.map(function(v){return{x:v[0],y:v[1]}});if(R.length<4)throw new Error("Invalid polygon");for(var I=_(R,m,N).map(function(v){return[v.x,v.y]});!a(I);)m-=m*.01,I=_(R,m,N).map(function(v){return[v.x,v.y]});return(I[I.length-1][0]!==I[0][0]||I[I.length-1][1]!==I[0][1])&&I.push(I[0]),I})}},{"simplify-js":337}],337:[function(h,E,u){(function(){function _(f,p){var g=f.x-p.x,m=f.y-p.y;return g*g+m*m}function d(f,p,g){var m=p.x,N=p.y,y=g.x-m,R=g.y-N;if(y!==0||R!==0){var I=((f.x-m)*y+(f.y-N)*R)/(y*y+R*R);I>1?(m=g.x,N=g.y):I>0&&(m+=y*I,N+=R*I)}return y=f.x-m,R=f.y-N,y*y+R*R}function S(f,p){for(var g=f[0],m=[g],N,y=1,R=f.length;yp&&(m.push(N),g=N);return g!==N&&m.push(N),m}function a(f,p){var g=f.length,m=typeof Uint8Array<"u"?Uint8Array:Array,N=new m(g),y=0,R=g-1,I=[],v=[],M,T,w,b;for(N[y]=N[R]=1;R;){for(T=0,M=y+1;MT&&(b=M,T=w);T>p&&(N[b]=1,I.push(y,b,b,R)),R=I.pop(),y=I.pop()}for(M=0;M0&&(g+=c[m-1].length,p.holes.push(g))}return p}},{"@turf/helpers":353,earcut:354}],353:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],354:[function(h,E,u){E.exports=_;function _(F,Y,H){H=H||2;var z=Y&&Y.length,J=z?Y[0]*H:F.length,G=d(F,0,J,H,!0),k=[];if(!G)return k;var j,rt,it,Q,lt,st,ct;if(z&&(G=m(F,Y,G,H)),F.length>80*H){j=it=F[0],rt=Q=F[1];for(var vt=H;vtit&&(it=lt),st>Q&&(Q=st);ct=Math.max(it-j,Q-rt)}return a(G,k,H,j,rt,ct),k}function d(F,Y,H,z,J){var G,k;if(J===ot(F,Y,H,z)>0)for(G=Y;G=Y;G-=z)k=W(G,F[G],F[G+1],k);return k&&O(k,k.next)&&(L(k),k=k.next),k}function S(F,Y){if(!F)return F;Y||(Y=F);var H=F,z;do if(z=!1,!H.steiner&&(O(H,H.next)||P(H.prev,H,H.next)===0)){if(L(H),H=Y=H.prev,H===H.next)return null;z=!0}else H=H.next;while(z||H!==Y);return Y}function a(F,Y,H,z,J,G,k){if(F){!k&&G&&I(F,z,J,G);for(var j=F,rt,it;F.prev!==F.next;){if(rt=F.prev,it=F.next,G?f(F,z,J,G):c(F)){Y.push(rt.i/H),Y.push(F.i/H),Y.push(it.i/H),L(F),F=it.next,j=it.next;continue}if(F=it,F===j){k?k===1?(F=p(F,Y,H),a(F,Y,H,z,J,G,2)):k===2&&g(F,Y,H,z,J,G):a(S(F),Y,H,z,J,G,1);break}}}}function c(F){var Y=F.prev,H=F,z=F.next;if(P(Y,H,z)>=0)return!1;for(var J=F.next.next;J!==F.prev;){if(w(Y.x,Y.y,H.x,H.y,z.x,z.y,J.x,J.y)&&P(J.prev,J,J.next)>=0)return!1;J=J.next}return!0}function f(F,Y,H,z){var J=F.prev,G=F,k=F.next;if(P(J,G,k)>=0)return!1;for(var j=J.xG.x?J.x>k.x?J.x:k.x:G.x>k.x?G.x:k.x,Q=J.y>G.y?J.y>k.y?J.y:k.y:G.y>k.y?G.y:k.y,lt=M(j,rt,Y,H,z),st=M(it,Q,Y,H,z),ct=F.nextZ;ct&&ct.z<=st;){if(ct!==F.prev&&ct!==F.next&&w(J.x,J.y,G.x,G.y,k.x,k.y,ct.x,ct.y)&&P(ct.prev,ct,ct.next)>=0)return!1;ct=ct.nextZ}for(ct=F.prevZ;ct&&ct.z>=lt;){if(ct!==F.prev&&ct!==F.next&&w(J.x,J.y,G.x,G.y,k.x,k.y,ct.x,ct.y)&&P(ct.prev,ct,ct.next)>=0)return!1;ct=ct.prevZ}return!0}function p(F,Y,H){var z=F;do{var J=z.prev,G=z.next.next;!O(J,G)&&D(J,z,z.next,G)&&q(J,G)&&q(G,J)&&(Y.push(J.i/H),Y.push(z.i/H),Y.push(G.i/H),L(z),L(z.next),z=F=G),z=z.next}while(z!==F);return z}function g(F,Y,H,z,J,G){var k=F;do{for(var j=k.next.next;j!==k.prev;){if(k.i!==j.i&&b(k,j)){var rt=U(k,j);k=S(k,k.next),rt=S(rt,rt.next),a(k,Y,H,z,J,G),a(rt,Y,H,z,J,G);return}j=j.next}k=k.next}while(k!==F)}function m(F,Y,H,z){var J=[],G,k,j,rt,it;for(G=0,k=Y.length;G=H.next.y){var j=H.x+(J-H.y)*(H.next.x-H.x)/(H.next.y-H.y);if(j<=z&&j>G){if(G=j,j===z){if(J===H.y)return H;if(J===H.next.y)return H.next}k=H.x=H.x&&H.x>=it&&w(Jk.x)&&q(H,F)&&(k=H,lt=st)),H=H.next;return k}function I(F,Y,H,z){var J=F;do J.z===null&&(J.z=M(J.x,J.y,Y,H,z)),J.prevZ=J.prev,J.nextZ=J.next,J=J.next;while(J!==F);J.prevZ.nextZ=null,J.prevZ=null,v(J)}function v(F){var Y,H,z,J,G,k,j,rt,it=1;do{for(H=F,F=null,G=null,k=0;H;){for(k++,z=H,j=0,Y=0;Y0||rt>0&&z;)j===0?(J=z,z=z.nextZ,rt--):rt===0||!z||H.z<=z.z?(J=H,H=H.nextZ,j--):(J=z,z=z.nextZ,rt--),G?G.nextZ=J:F=J,J.prevZ=G,G=J;H=z}G.nextZ=null,it*=2}while(k>1);return F}function M(F,Y,H,z,J){return F=32767*(F-H)/J,Y=32767*(Y-z)/J,F=(F|F<<8)&16711935,F=(F|F<<4)&252645135,F=(F|F<<2)&858993459,F=(F|F<<1)&1431655765,Y=(Y|Y<<8)&16711935,Y=(Y|Y<<4)&252645135,Y=(Y|Y<<2)&858993459,Y=(Y|Y<<1)&1431655765,F|Y<<1}function T(F){var Y=F,H=F;do Y.x=0&&(F-k)*(z-j)-(H-k)*(Y-j)>=0&&(H-k)*(G-j)-(J-k)*(z-j)>=0}function b(F,Y){return F.next.i!==Y.i&&F.prev.i!==Y.i&&!C(F,Y)&&q(F,Y)&&q(Y,F)&&B(F,Y)}function P(F,Y,H){return(Y.y-F.y)*(H.x-Y.x)-(Y.x-F.x)*(H.y-Y.y)}function O(F,Y){return F.x===Y.x&&F.y===Y.y}function D(F,Y,H,z){return O(F,Y)&&O(H,z)||O(F,z)&&O(H,Y)?!0:P(F,Y,H)>0!=P(F,Y,z)>0&&P(H,z,F)>0!=P(H,z,Y)>0}function C(F,Y){var H=F;do{if(H.i!==F.i&&H.next.i!==F.i&&H.i!==Y.i&&H.next.i!==Y.i&&D(H,H.next,F,Y))return!0;H=H.next}while(H!==F);return!1}function q(F,Y){return P(F.prev,F,F.next)<0?P(F,Y,F.next)>=0&&P(F,F.prev,Y)>=0:P(F,Y,F.prev)<0||P(F,F.next,Y)<0}function B(F,Y){var H=F,z=!1,J=(F.x+Y.x)/2,G=(F.y+Y.y)/2;do H.y>G!=H.next.y>G&&J<(H.next.x-H.x)*(G-H.y)/(H.next.y-H.y)+H.x&&(z=!z),H=H.next;while(H!==F);return z}function U(F,Y){var H=new X(F.i,F.x,F.y),z=new X(Y.i,Y.x,Y.y),J=F.next,G=Y.prev;return F.next=Y,Y.prev=F,H.next=J,J.prev=H,z.next=H,H.prev=z,G.next=z,z.prev=G,z}function W(F,Y,H,z){var J=new X(F,Y,H);return z?(J.next=z.next,J.prev=z,z.next.prev=J,z.next=J):(J.prev=J,J.next=J),J}function L(F){F.next.prev=F.prev,F.prev.next=F.next,F.prevZ&&(F.prevZ.nextZ=F.nextZ),F.nextZ&&(F.nextZ.prevZ=F.prevZ)}function X(F,Y,H){this.i=F,this.x=Y,this.y=H,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}_.deviation=function(F,Y,H,z){var J=Y&&Y.length,G=J?Y[0]*H:F.length,k=Math.abs(ot(F,0,G,H));if(J)for(var j=0,rt=Y.length;j0&&(z+=F[J-1].length,H.holes.push(z))}return H}},{}],355:[function(h,E,u){arguments[4][82][0].apply(u,arguments)},{"@turf/helpers":356,dup:82}],356:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],357:[function(h,E,u){var _=h("@turf/helpers").featureCollection,d=h("@turf/helpers").polygon,S=h("@turf/distance");E.exports=function(a,c,f){for(var p=_([]),g=c/S([a[0],a[1]],[a[2],a[1]],f),m=g*(a[2]-a[0]),N=c/S([a[0],a[1]],[a[0],a[3]],f),y=N*(a[3]-a[1]),R=0,I=a[0];I<=a[2];){for(var v=0,M=a[1];M<=a[3];)R%2===0&&v%2===0?p.features.push(d([[[I,M],[I,M+y],[I+m,M],[I,M]]]),d([[[I,M+y],[I+m,M+y],[I+m,M],[I,M+y]]])):R%2===0&&v%2===1?p.features.push(d([[[I,M],[I+m,M+y],[I+m,M],[I,M]]]),d([[[I,M],[I,M+y],[I+m,M+y],[I,M]]])):v%2===0&&R%2===1?p.features.push(d([[[I,M],[I,M+y],[I+m,M+y],[I,M]]]),d([[[I,M],[I+m,M+y],[I+m,M],[I,M]]])):v%2===1&&R%2===1&&p.features.push(d([[[I,M],[I,M+y],[I+m,M],[I,M]]]),d([[[I,M+y],[I+m,M+y],[I+m,M],[I,M+y]]])),M+=y,v++;R++,I+=m}return p}},{"@turf/distance":358,"@turf/helpers":361}],358:[function(h,E,u){arguments[4][8][0].apply(u,arguments)},{"@turf/helpers":359,"@turf/invariant":360,dup:8}],359:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],360:[function(h,E,u){arguments[4][4][0].apply(u,arguments)},{dup:4}],361:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],362:[function(h,E,u){E.exports=function(a,c,f){if(c=c||6,f=f||2,a===void 0)throw new Error("layer is required");switch(a.type){case"FeatureCollection":return a.features=a.features.map(function(p){return _(p,c,f)}),a;case"Feature":return _(a,c,f);default:throw new Error("invalid type")}};function _(a,c,f){return f!==void 0&&(a.geometry.coordinates=S(a.geometry.coordinates,0,f)),a.geometry.coordinates=d(a.geometry.coordinates,c),a}function d(a,c){return a.map(function(f){return typeof f=="object"?d(f,c):Number(f.toFixed(c))})}function S(a,c,f){return typeof a[0]!="object"?a.slice(c,f):a.map(function(p){return S(p,c,f)})}},{}],363:[function(h,E,u){arguments[4][84][0].apply(u,arguments)},{dup:84,jsts:364}],364:[function(h,E,u){arguments[4][28][0].apply(u,arguments)},{dup:28}],365:[function(h,E,u){var _=h("simplepolygon"),d=h("@turf/flatten"),S=h("@turf/meta").featureEach,a=h("@turf/helpers").featureCollection;E.exports=function(c){var f=a([]);return S(c,function(p){p.geometry.type==="MultiPolygon"&&(p=d(p)),S(p,function(g){var m=_(g);S(m,function(N){N.properties=g.properties?g.properties:{},f.features.push(N)})})}),f}},{"@turf/flatten":370,"@turf/helpers":374,"@turf/meta":375,simplepolygon:383}],366:[function(h,E,u){arguments[4][12][0].apply(u,arguments)},{"@mapbox/geojson-area":367,"@turf/meta":368,dup:12}],367:[function(h,E,u){arguments[4][13][0].apply(u,arguments)},{dup:13,wgs84:369}],368:[function(h,E,u){arguments[4][14][0].apply(u,arguments)},{dup:14}],369:[function(h,E,u){arguments[4][15][0].apply(u,arguments)},{dup:15}],370:[function(h,E,u){arguments[4][132][0].apply(u,arguments)},{"@turf/helpers":371,"@turf/invariant":372,"@turf/meta":373,dup:132}],371:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],372:[function(h,E,u){arguments[4][4][0].apply(u,arguments)},{dup:4}],373:[function(h,E,u){arguments[4][14][0].apply(u,arguments)},{dup:14}],374:[function(h,E,u){arguments[4][6][0].apply(u,arguments)},{dup:6}],375:[function(h,E,u){arguments[4][14][0].apply(u,arguments)},{dup:14}],376:[function(h,E,u){var _=h("@turf/inside"),d=h("@turf/helpers").featureCollection;E.exports=function(S,a){for(var c=d([]),f=0;f=1||X<=0||ot>=1||ot<=0)){var F=L,Y=!m[F];Y&&(m[F]=!0),c?g.push(c(L,P,O,q,B,X,D,C,U,W,ot,Y)):g.push(L)}}}function b(P,O){var D=p[P][O],C=p[P][O+1];if(D[0]D[zt.isect].coord?-1:1});for(var G=[];ot.length>0;){var k=ot.pop(),j=k.isect,rt=k.parent,it=k.winding,Q=G.length,lt=[D[j].coord],st=j;if(D[j].ringAndEdge1Walkable)var ct=D[j].ringAndEdge1,vt=D[j].nxtIsectAlongRingAndEdge1;else var ct=D[j].ringAndEdge2,vt=D[j].nxtIsectAlongRingAndEdge2;for(;!y(D[j].coord,D[vt].coord);){lt.push(D[vt].coord);for(var Re=void 0,F=0;F1)for(var zt=0;zt"u"&&(v=!0),I.length!=3)throw new Error("This function requires an array of three points [x,y]");var M=(I[1][0]-I[0][0])*(I[2][1]-I[0][1])-(I[1][1]-I[0][1])*(I[2][0]-I[0][0]);return M>=0==v}function N(I){for(var v=0,M=0;M0}},methods:{clearError(i){this.errors&&this.errors[i]&&this.$store.commit("clearError",i)},errorExists(i){return this.errors?this.errors.hasOwnProperty(i):!1},getFirstError(i){return this.errors[i][0]}}},o={name:"CreateCleanup",mixins:[n],data(){return{name:"",description:"",time:"",date:"",invite_link:"",processing:!1}},computed:{cleanup(){return this.$store.state.cleanups},getInviteLink(){let i="https://openlittermap.com/cleanups/";return this.invite_link===""?i:i+this.invite_link+"/join"}},methods:{async submit(){this.processing=!0,await this.$store.dispatch("CREATE_CLEANUP_EVENT",{name:this.name,date:this.date,lat:this.cleanup.lat,lon:this.cleanup.lon,time:this.time,description:this.description,invite_link:this.invite_link}),this.processing=!1}}};var l=function(){var t=this,e=t._self._c;return e("div",{staticClass:"cleanup-container"},[e("form",{attrs:{method:"post"},on:{submit:function(s){return s.preventDefault(),t.submit.apply(null,arguments)},keydown:function(s){return t.clearError(s.target.name)}}},[e("div",{staticClass:"flex"},[e("p",{staticClass:"flex-1"},[t._v("Name")]),t.errorExists("name")?e("p",{staticClass:"help is-danger",domProps:{textContent:t._s(t.getFirstError("name"))}}):t._e()]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.name,expression:"name"}],staticClass:"input mb1",class:t.errorExists("name")?"is-danger":"",attrs:{name:"name",placeholder:"My Awesome Cleanup",required:""},domProps:{value:t.name},on:{input:function(s){s.target.composing||(t.name=s.target.value)}}}),e("div",{staticClass:"flex"},[e("p",{staticClass:"flex-1"},[t._v("Date")]),t.errorExists("date")?e("p",{staticClass:"help is-danger",domProps:{textContent:t._s(t.getFirstError("date"))}}):t._e()]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.date,expression:"date"}],staticClass:"input mb1",class:t.errorExists("date")?"is-danger":"",attrs:{name:"date",type:"date"},domProps:{value:t.date},on:{input:function(s){s.target.composing||(t.date=s.target.value)}}}),e("div",{staticClass:"flex"},[e("p",{staticClass:"flex-1"},[t._v("Location:")]),t.errorExists("lat")||t.errorExists("lon")?e("div",[e("p",{staticClass:"help is-danger"},[t._v(" You have not set a location. ")])]):t._e()]),e("div",{staticClass:"mb1"},[t.cleanup.lat?e("div",[e("p",[t._v(" Lat: "+t._s(t.cleanup.lat)+" ")]),e("p",[t._v(" Lon: "+t._s(t.cleanup.lon)+" ")])]):e("p",[t._v(" Click anywhere on the map to set the location ")])]),e("div",{staticClass:"flex"},[e("p",{staticClass:"flex-1"},[t._v("Time")]),t.errorExists("time")?e("p",{staticClass:"help is-danger",domProps:{textContent:t._s(t.getFirstError("time"))}}):t._e()]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.time,expression:"time"}],staticClass:"input mb1",class:t.errorExists("time")?"is-danger":"",attrs:{name:"time",placeholder:"Enter time",required:""},domProps:{value:t.time},on:{input:function(s){s.target.composing||(t.time=s.target.value)}}}),e("div",{staticClass:"flex"},[e("p",{staticClass:"flex-1"},[t._v("Description")]),t.errorExists("description")?e("p",{staticClass:"help is-danger",domProps:{textContent:t._s(t.getFirstError("description"))}}):t._e()]),e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.description,expression:"description"}],staticClass:"input mb1",class:t.errorExists("description")?"is-danger":"",staticStyle:{height:"2.65em"},attrs:{name:"description",placeholder:"Enter information about your event",required:""},domProps:{value:t.description},on:{input:function(s){s.target.composing||(t.description=s.target.value)}}}),e("div",{staticClass:"flex"},[e("p",{staticClass:"flex-1"},[t._v(" Create an invite link ")]),t.errorExists("invite_link")?e("p",{staticClass:"help is-danger",domProps:{textContent:t._s(t.getFirstError("invite_link"))}}):t._e()]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.invite_link,expression:"invite_link"}],staticClass:"input mb-05",class:t.errorExists("invite_link")?"is-danger":"",attrs:{name:"invite_link",placeholder:"openlittermap.com/cleanups/my-cleanup-event"},domProps:{value:t.invite_link},on:{input:function(s){s.target.composing||(t.invite_link=s.target.value)}}}),e("p",{staticClass:"is-grey mb2"},[t._v(" "+t._s(t.getInviteLink)+" ")]),e("div",{staticClass:"flex"},[e("button",{staticClass:"button is-info is-medium",class:t.processing?"is-loading":"",attrs:{disabled:t.processing,type:"submit"}},[t._v(" Let's Cleanup! ")])])])])},c=[],p=a(o,l,c,!1,null,"6fc26179");const u=p.exports,m={name:"JoinCleanup",data(){return{invite_link:"",processing:!1}},mixins:[n],methods:{async submit(){this.processing=!0,await this.$store.dispatch("JOIN_CLEANUP",{link:this.invite_link}),this.processing=!1}}};var d=function(){var t=this,e=t._self._c;return e("div",{staticClass:"has-text-left"},[e("form",{attrs:{method:"post"},on:{submit:function(s){return s.preventDefault(),t.submit.apply(null,arguments)},keydown:function(s){return t.clearError(s.target.name)}}},[e("div",{staticClass:"flex"},[e("p",{staticClass:"flex-1"},[t._v("Join a cleanup")]),t.errorExists("invite_link")?e("p",{staticClass:"help is-danger",domProps:{textContent:t._s(t.getFirstError("invite_link"))}}):t._e()]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.invite_link,expression:"invite_link"}],staticClass:"input",class:t.errorExists("invite_link")?"is-danger":"",attrs:{name:"invite_link",required:"",placeholder:"Enter invitation code to join a cleanup"},domProps:{value:t.invite_link},on:{input:function(s){s.target.composing||(t.invite_link=s.target.value)}}}),e("div",{staticClass:"flex mt1 jc"},[e("button",{staticClass:"button is-info is-medium",class:t.processing?"is-loading":"",attrs:{disabled:t.processing,type:"submit"}},[t._v(" Join Cleanup! ")])])])])},_=[],v=a(m,d,_,!1,null,"65f99a5b");const C=v.exports,g="https://img.freepik.com/free-vector/volunteers-cleaning-up-garbage-city-park_74855-17942.jpg?w=1380&t=st=1659282438~exp=1659283038~hmac=b3c1ecc87fa677a97391b1f182f0e8674f32684d632f8d5df366bfe8204ee62e",f={name:"CleanupSidebar",components:{CreateCleanup:u,JoinCleanup:C},props:["creatingCleanup","joiningCleanup"],data(){return{processing:!1}},computed:{auth(){return this.$store.state.user.auth},getCreateCleanupImg(){return g},getTitle(){return this.$store.state.globalmap.creating?"Create a new cleanup event!":"Help us clean the planet!"}},methods:{goBack(){this.$store.commit("clearErrors"),this.$store.commit("creatingCleanup",!1),this.$store.commit("joiningCleanup",!1)},startCreatingCleanup(){this.$store.commit("creatingCleanup",!0)},startJoiningCleanup(){this.$store.commit("joiningCleanup",!0)}}};var h=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"pt3 pb3 flex",staticStyle:{"align-items":"center"}},[t.joiningCleanup||t.creatingCleanup?e("i",{staticClass:"fa fa-arrow-left pointer",on:{click:t.goBack}}):t._e(),e("p",{staticClass:"title is-3 flex-1"},[t._v(" "+t._s(t.getTitle)+" ")])]),e("div",{staticClass:"cleanup-buttons"},[!t.creatingCleanup&&!t.joiningCleanup?e("div",[e("img",{staticClass:"pb1",attrs:{src:t.getCreateCleanupImg}}),t.auth?e("div",[e("button",{staticClass:"button is-medium is-info mb1",on:{click:t.startCreatingCleanup}},[t._v(" Create a cleanup ")]),e("button",{staticClass:"button is-medium is-primary mb1",on:{click:t.startJoiningCleanup}},[t._v(" Join a cleanup ")])]):e("p",{staticClass:"mb1"},[t._v(" Log In to Create or Join a Cleanup ")]),e("p",{staticClass:"mb1"},[t._v(" Cleanups are a great way to bring people together, quantify, and communicate your positive environmental impact. ")]),e("p",[t._v(" Clean up, have fun and share data! ")])]):t._e(),t.creatingCleanup?e("CreateCleanup"):t._e(),t.joiningCleanup?e("JoinCleanup"):t._e()],1)])},x=[],b=a(f,h,x,!1,null,"4ce4c465");const E=b.exports,k={name:"Cleanups",components:{Supercluster:r,CleanupSidebar:E},data(){return{loading:!1}},async created(){this.loading=!0,await this.$store.dispatch("GET_CLEANUPS");const i=this.$route;i.params.hasOwnProperty("invite_link")&&await this.$store.dispatch("JOIN_CLEANUP",{link:i.params.invite_link}),this.loading=!1},computed:{creatingCleanup(){return this.$store.state.cleanups.creating},joiningCleanup(){return this.$store.state.cleanups.joining}}};var y=function(){var t=this,e=t._self._c;return e("div",{staticClass:"cleanups-container"},[e("CleanupSidebar",{staticClass:"cleanup-sidebar",class:t.creatingCleanup?"find-location":"",attrs:{creatingCleanup:t.creatingCleanup,joiningCleanup:t.joiningCleanup}}),e("div",{staticClass:"cleanup-map",class:t.creatingCleanup?"find-location":""},[t.loading?e("div"):e("Supercluster",{attrs:{activeLayer:"cleanups"}})],1)],1)},$=[],w=a(k,y,$,!1,null,"7732288b");const I=w.exports;export{I as default}; +import{S as r}from"./Supercluster-6zQlYpaO.js";import{n as a}from"./app-BwSojYvl.js";import"./index-Dxbj43yt.js";import"./mapHelpers-DmBbMbJe.js";import"./moment-zH0z38ay.js";import"./glify-browser-BLn8SaeM.js";/* empty css */const n={computed:{errors(){return this.$store.state.errors.errorsObject},errorsExist(){return this.errors&&Object.keys(this.errors).length>0}},methods:{clearError(i){this.errors&&this.errors[i]&&this.$store.commit("clearError",i)},errorExists(i){return this.errors?this.errors.hasOwnProperty(i):!1},getFirstError(i){return this.errors[i][0]}}},o={name:"CreateCleanup",mixins:[n],data(){return{name:"",description:"",time:"",date:"",invite_link:"",processing:!1}},computed:{cleanup(){return this.$store.state.cleanups},getInviteLink(){let i="https://openlittermap.com/cleanups/";return this.invite_link===""?i:i+this.invite_link+"/join"}},methods:{async submit(){this.processing=!0,await this.$store.dispatch("CREATE_CLEANUP_EVENT",{name:this.name,date:this.date,lat:this.cleanup.lat,lon:this.cleanup.lon,time:this.time,description:this.description,invite_link:this.invite_link}),this.processing=!1}}};var l=function(){var t=this,e=t._self._c;return e("div",{staticClass:"cleanup-container"},[e("form",{attrs:{method:"post"},on:{submit:function(s){return s.preventDefault(),t.submit.apply(null,arguments)},keydown:function(s){return t.clearError(s.target.name)}}},[e("div",{staticClass:"flex"},[e("p",{staticClass:"flex-1"},[t._v("Name")]),t.errorExists("name")?e("p",{staticClass:"help is-danger",domProps:{textContent:t._s(t.getFirstError("name"))}}):t._e()]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.name,expression:"name"}],staticClass:"input mb1",class:t.errorExists("name")?"is-danger":"",attrs:{name:"name",placeholder:"My Awesome Cleanup",required:""},domProps:{value:t.name},on:{input:function(s){s.target.composing||(t.name=s.target.value)}}}),e("div",{staticClass:"flex"},[e("p",{staticClass:"flex-1"},[t._v("Date")]),t.errorExists("date")?e("p",{staticClass:"help is-danger",domProps:{textContent:t._s(t.getFirstError("date"))}}):t._e()]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.date,expression:"date"}],staticClass:"input mb1",class:t.errorExists("date")?"is-danger":"",attrs:{name:"date",type:"date"},domProps:{value:t.date},on:{input:function(s){s.target.composing||(t.date=s.target.value)}}}),e("div",{staticClass:"flex"},[e("p",{staticClass:"flex-1"},[t._v("Location:")]),t.errorExists("lat")||t.errorExists("lon")?e("div",[e("p",{staticClass:"help is-danger"},[t._v(" You have not set a location. ")])]):t._e()]),e("div",{staticClass:"mb1"},[t.cleanup.lat?e("div",[e("p",[t._v(" Lat: "+t._s(t.cleanup.lat)+" ")]),e("p",[t._v(" Lon: "+t._s(t.cleanup.lon)+" ")])]):e("p",[t._v(" Click anywhere on the map to set the location ")])]),e("div",{staticClass:"flex"},[e("p",{staticClass:"flex-1"},[t._v("Time")]),t.errorExists("time")?e("p",{staticClass:"help is-danger",domProps:{textContent:t._s(t.getFirstError("time"))}}):t._e()]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.time,expression:"time"}],staticClass:"input mb1",class:t.errorExists("time")?"is-danger":"",attrs:{name:"time",placeholder:"Enter time",required:""},domProps:{value:t.time},on:{input:function(s){s.target.composing||(t.time=s.target.value)}}}),e("div",{staticClass:"flex"},[e("p",{staticClass:"flex-1"},[t._v("Description")]),t.errorExists("description")?e("p",{staticClass:"help is-danger",domProps:{textContent:t._s(t.getFirstError("description"))}}):t._e()]),e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.description,expression:"description"}],staticClass:"input mb1",class:t.errorExists("description")?"is-danger":"",staticStyle:{height:"2.65em"},attrs:{name:"description",placeholder:"Enter information about your event",required:""},domProps:{value:t.description},on:{input:function(s){s.target.composing||(t.description=s.target.value)}}}),e("div",{staticClass:"flex"},[e("p",{staticClass:"flex-1"},[t._v(" Create an invite link ")]),t.errorExists("invite_link")?e("p",{staticClass:"help is-danger",domProps:{textContent:t._s(t.getFirstError("invite_link"))}}):t._e()]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.invite_link,expression:"invite_link"}],staticClass:"input mb-05",class:t.errorExists("invite_link")?"is-danger":"",attrs:{name:"invite_link",placeholder:"openlittermap.com/cleanups/my-cleanup-event"},domProps:{value:t.invite_link},on:{input:function(s){s.target.composing||(t.invite_link=s.target.value)}}}),e("p",{staticClass:"is-grey mb2"},[t._v(" "+t._s(t.getInviteLink)+" ")]),e("div",{staticClass:"flex"},[e("button",{staticClass:"button is-info is-medium",class:t.processing?"is-loading":"",attrs:{disabled:t.processing,type:"submit"}},[t._v(" Let's Cleanup! ")])])])])},c=[],p=a(o,l,c,!1,null,"6fc26179");const u=p.exports,m={name:"JoinCleanup",data(){return{invite_link:"",processing:!1}},mixins:[n],methods:{async submit(){this.processing=!0,await this.$store.dispatch("JOIN_CLEANUP",{link:this.invite_link}),this.processing=!1}}};var d=function(){var t=this,e=t._self._c;return e("div",{staticClass:"has-text-left"},[e("form",{attrs:{method:"post"},on:{submit:function(s){return s.preventDefault(),t.submit.apply(null,arguments)},keydown:function(s){return t.clearError(s.target.name)}}},[e("div",{staticClass:"flex"},[e("p",{staticClass:"flex-1"},[t._v("Join a cleanup")]),t.errorExists("invite_link")?e("p",{staticClass:"help is-danger",domProps:{textContent:t._s(t.getFirstError("invite_link"))}}):t._e()]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.invite_link,expression:"invite_link"}],staticClass:"input",class:t.errorExists("invite_link")?"is-danger":"",attrs:{name:"invite_link",required:"",placeholder:"Enter invitation code to join a cleanup"},domProps:{value:t.invite_link},on:{input:function(s){s.target.composing||(t.invite_link=s.target.value)}}}),e("div",{staticClass:"flex mt1 jc"},[e("button",{staticClass:"button is-info is-medium",class:t.processing?"is-loading":"",attrs:{disabled:t.processing,type:"submit"}},[t._v(" Join Cleanup! ")])])])])},_=[],v=a(m,d,_,!1,null,"65f99a5b");const C=v.exports,g="https://img.freepik.com/free-vector/volunteers-cleaning-up-garbage-city-park_74855-17942.jpg?w=1380&t=st=1659282438~exp=1659283038~hmac=b3c1ecc87fa677a97391b1f182f0e8674f32684d632f8d5df366bfe8204ee62e",f={name:"CleanupSidebar",components:{CreateCleanup:u,JoinCleanup:C},props:["creatingCleanup","joiningCleanup"],data(){return{processing:!1}},computed:{auth(){return this.$store.state.user.auth},getCreateCleanupImg(){return g},getTitle(){return this.$store.state.globalmap.creating?"Create a new cleanup event!":"Help us clean the planet!"}},methods:{goBack(){this.$store.commit("clearErrors"),this.$store.commit("creatingCleanup",!1),this.$store.commit("joiningCleanup",!1)},startCreatingCleanup(){this.$store.commit("creatingCleanup",!0)},startJoiningCleanup(){this.$store.commit("joiningCleanup",!0)}}};var h=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"pt3 pb3 flex",staticStyle:{"align-items":"center"}},[t.joiningCleanup||t.creatingCleanup?e("i",{staticClass:"fa fa-arrow-left pointer",on:{click:t.goBack}}):t._e(),e("p",{staticClass:"title is-3 flex-1"},[t._v(" "+t._s(t.getTitle)+" ")])]),e("div",{staticClass:"cleanup-buttons"},[!t.creatingCleanup&&!t.joiningCleanup?e("div",[e("img",{staticClass:"pb1",attrs:{src:t.getCreateCleanupImg}}),t.auth?e("div",[e("button",{staticClass:"button is-medium is-info mb1",on:{click:t.startCreatingCleanup}},[t._v(" Create a cleanup ")]),e("button",{staticClass:"button is-medium is-primary mb1",on:{click:t.startJoiningCleanup}},[t._v(" Join a cleanup ")])]):e("p",{staticClass:"mb1"},[t._v(" Log In to Create or Join a Cleanup ")]),e("p",{staticClass:"mb1"},[t._v(" Cleanups are a great way to bring people together, quantify, and communicate your positive environmental impact. ")]),e("p",[t._v(" Clean up, have fun and share data! ")])]):t._e(),t.creatingCleanup?e("CreateCleanup"):t._e(),t.joiningCleanup?e("JoinCleanup"):t._e()],1)])},x=[],b=a(f,h,x,!1,null,"4ce4c465");const E=b.exports,k={name:"Cleanups",components:{Supercluster:r,CleanupSidebar:E},data(){return{loading:!1}},async created(){this.loading=!0,await this.$store.dispatch("GET_CLEANUPS");const i=this.$route;i.params.hasOwnProperty("invite_link")&&await this.$store.dispatch("JOIN_CLEANUP",{link:i.params.invite_link}),this.loading=!1},computed:{creatingCleanup(){return this.$store.state.cleanups.creating},joiningCleanup(){return this.$store.state.cleanups.joining}}};var y=function(){var t=this,e=t._self._c;return e("div",{staticClass:"cleanups-container"},[e("CleanupSidebar",{staticClass:"cleanup-sidebar",class:t.creatingCleanup?"find-location":"",attrs:{creatingCleanup:t.creatingCleanup,joiningCleanup:t.joiningCleanup}}),e("div",{staticClass:"cleanup-map",class:t.creatingCleanup?"find-location":""},[t.loading?e("div"):e("Supercluster",{attrs:{activeLayer:"cleanups"}})],1)],1)},$=[],w=a(k,y,$,!1,null,"7732288b");const I=w.exports;export{I as default}; diff --git a/public/build/assets/ContactUs-wDc9y1Uc.js b/public/build/assets/ContactUs-BUcYwgJG.js similarity index 98% rename from public/build/assets/ContactUs-wDc9y1Uc.js rename to public/build/assets/ContactUs-BUcYwgJG.js index 4fabf1ac..fdf00d29 100644 --- a/public/build/assets/ContactUs-wDc9y1Uc.js +++ b/public/build/assets/ContactUs-BUcYwgJG.js @@ -1 +1 @@ -import{V as i}from"./vue-recaptcha.es-KbLMYh7d.js";import{n as r}from"./app-DuS6KM7M.js";/* empty css */var l={};const c={name:"ContactUs",components:{VueRecaptcha:i},data(){return{name:"",email:"",subject:"",message:"",g_recaptcha_response:"",processing:!1}},computed:{errors(){return this.$store.state.user.errors},computedKey(){return l.MIX_GOOGLE_RECAPTCHA_KEY}},methods:{async submit(){this.processing=!0,await this.$store.dispatch("SEND_EMAIL_TO_US",{name:this.name,email:this.email,subject:this.subject,message:this.message,"g-recaptcha-response":this.g_recaptcha_response}),this.processing=!1},clearErrors(e){this.$store.commit("deleteUserError",e)},hasError(e){return this.errors.hasOwnProperty(e)},getError(e){return this.errors[e][0]},recaptcha(e){this.g_recaptcha_response=e}}};var o=function(){var s=this,t=s._self._c;return t("section",{staticClass:"hero is-info is-fullheight"},[t("div",{staticClass:"columns centered"},[t("div",{staticClass:"column"}),t("div",{staticClass:"column is-half-tablet is-one-third-desktop is-one-quarter-fullhd"},[t("p",{staticClass:"title is-1 has-text-centered"},[s._v("Contact Us")]),t("div",{staticClass:"panel-body"},[t("form",{staticClass:"form-horizontal",attrs:{role:"form"},on:{submit:function(a){return a.preventDefault(),s.submit.apply(null,arguments)},keydown:function(a){return s.clearErrors(a.target.name)}}},[s._m(0),t("div",{staticClass:"field with-x-spacing"},[t("label",{staticClass:"label has-text-white",attrs:{for:"name"}},[s._v("Your Name (optional)")]),t("div",{staticClass:"control has-icons-left",class:s.processing?"is-loading":""},[t("input",{directives:[{name:"model",rawName:"v-model",value:s.name,expression:"name"}],staticClass:"input",class:s.hasError("name")?"is-danger":"",attrs:{id:"name",type:"text",name:"name",autofocus:""},domProps:{value:s.name},on:{input:function(a){a.target.composing||(s.name=a.target.value)}}}),s._m(1),s.hasError("name")?t("p",{staticClass:"help has-text-white has-text-weight-bold"},[s._v(s._s(s.getError("name")))]):s._e()])]),t("div",{staticClass:"field with-x-spacing"},[t("label",{staticClass:"label has-text-white",attrs:{for:"email"}},[s._v("Your Email")]),t("div",{staticClass:"control has-icons-left",class:s.processing?"is-loading":""},[t("input",{directives:[{name:"model",rawName:"v-model",value:s.email,expression:"email"}],staticClass:"input",class:s.hasError("email")?"is-danger":"",attrs:{id:"email",type:"email",name:"email",required:"",placeholder:"you@email.com"},domProps:{value:s.email},on:{input:function(a){a.target.composing||(s.email=a.target.value)}}}),s._m(2),s.hasError("email")?t("p",{staticClass:"help has-text-white has-text-weight-bold"},[s._v(s._s(s.getError("email")))]):s._e()])]),t("div",{staticClass:"field with-x-spacing"},[t("label",{staticClass:"label has-text-white",attrs:{for:"subject"}},[s._v("Subject")]),t("div",{staticClass:"control has-icons-left",class:s.processing?"is-loading":""},[t("input",{directives:[{name:"model",rawName:"v-model",value:s.subject,expression:"subject"}],staticClass:"input",class:s.hasError("subject")?"is-danger":"",attrs:{id:"subject",type:"text",name:"subject",required:""},domProps:{value:s.subject},on:{input:function(a){a.target.composing||(s.subject=a.target.value)}}}),s._m(3),s.hasError("subject")?t("p",{staticClass:"help has-text-white has-text-weight-bold"},[s._v(s._s(s.getError("subject")))]):s._e()])]),t("div",{staticClass:"field with-x-spacing"},[t("label",{staticClass:"label has-text-white",attrs:{for:"message"}},[s._v("Message")]),t("div",{staticClass:"control has-icons-left",class:s.processing?"is-loading":""},[t("textarea",{directives:[{name:"model",rawName:"v-model",value:s.message,expression:"message"}],staticClass:"textarea",class:s.hasError("message")?"is-danger":"",attrs:{id:"message",required:""},domProps:{value:s.message},on:{input:function(a){a.target.composing||(s.message=a.target.value)}}}),s.hasError("message")?t("p",{staticClass:"help has-text-white has-text-weight-bold"},[s._v(s._s(s.getError("message")))]):s._e()])]),t("div",{staticClass:"field with-x-spacing"},[t("div",{staticClass:"control recaptcha"},[t("vue-recaptcha",{attrs:{sitekey:s.computedKey,loadRecaptchaScript:!0},on:{verify:s.recaptcha},model:{value:s.g_recaptcha_response,callback:function(a){s.g_recaptcha_response=a},expression:"g_recaptcha_response"}}),s.hasError("g-recaptcha-response")?t("p",{staticClass:"help has-text-white has-text-weight-bold"},[s._v(s._s(s.getError("g-recaptcha-response")))]):s._e()],1)]),t("div",{staticClass:"field has-text-centered"},[t("div",{staticClass:"control"},[t("button",{staticClass:"button is-primary",class:s.processing?"is-loading":"",attrs:{type:"submit",disabled:s.processing}},[s._v(" Send Email ")])])])])])]),t("div",{staticClass:"column"})])])},n=[function(){var e=this,s=e._self._c;return s("div",{staticClass:"field with-x-spacing"},[s("label",{staticClass:"label has-text-white",attrs:{for:"to"}},[e._v("To")]),s("div",{staticClass:"control"},[s("input",{staticClass:"input",attrs:{type:"text",value:"info@openlittermap.com",readonly:""}})])])},function(){var e=this,s=e._self._c;return s("span",{staticClass:"icon is-small is-left"},[s("i",{staticClass:"fa fa-user"})])},function(){var e=this,s=e._self._c;return s("span",{staticClass:"icon is-small is-left"},[s("i",{staticClass:"fa fa-envelope"})])},function(){var e=this,s=e._self._c;return s("span",{staticClass:"icon is-small is-left"},[s("i",{staticClass:"fa fa-info"})])}],m=r(c,o,n,!1,null,"156071c9");const d=m.exports;export{d as default}; +import{V as i}from"./vue-recaptcha.es-KbLMYh7d.js";import{n as r}from"./app-BwSojYvl.js";/* empty css */var l={};const c={name:"ContactUs",components:{VueRecaptcha:i},data(){return{name:"",email:"",subject:"",message:"",g_recaptcha_response:"",processing:!1}},computed:{errors(){return this.$store.state.user.errors},computedKey(){return l.MIX_GOOGLE_RECAPTCHA_KEY}},methods:{async submit(){this.processing=!0,await this.$store.dispatch("SEND_EMAIL_TO_US",{name:this.name,email:this.email,subject:this.subject,message:this.message,"g-recaptcha-response":this.g_recaptcha_response}),this.processing=!1},clearErrors(e){this.$store.commit("deleteUserError",e)},hasError(e){return this.errors.hasOwnProperty(e)},getError(e){return this.errors[e][0]},recaptcha(e){this.g_recaptcha_response=e}}};var o=function(){var s=this,t=s._self._c;return t("section",{staticClass:"hero is-info is-fullheight"},[t("div",{staticClass:"columns centered"},[t("div",{staticClass:"column"}),t("div",{staticClass:"column is-half-tablet is-one-third-desktop is-one-quarter-fullhd"},[t("p",{staticClass:"title is-1 has-text-centered"},[s._v("Contact Us")]),t("div",{staticClass:"panel-body"},[t("form",{staticClass:"form-horizontal",attrs:{role:"form"},on:{submit:function(a){return a.preventDefault(),s.submit.apply(null,arguments)},keydown:function(a){return s.clearErrors(a.target.name)}}},[s._m(0),t("div",{staticClass:"field with-x-spacing"},[t("label",{staticClass:"label has-text-white",attrs:{for:"name"}},[s._v("Your Name (optional)")]),t("div",{staticClass:"control has-icons-left",class:s.processing?"is-loading":""},[t("input",{directives:[{name:"model",rawName:"v-model",value:s.name,expression:"name"}],staticClass:"input",class:s.hasError("name")?"is-danger":"",attrs:{id:"name",type:"text",name:"name",autofocus:""},domProps:{value:s.name},on:{input:function(a){a.target.composing||(s.name=a.target.value)}}}),s._m(1),s.hasError("name")?t("p",{staticClass:"help has-text-white has-text-weight-bold"},[s._v(s._s(s.getError("name")))]):s._e()])]),t("div",{staticClass:"field with-x-spacing"},[t("label",{staticClass:"label has-text-white",attrs:{for:"email"}},[s._v("Your Email")]),t("div",{staticClass:"control has-icons-left",class:s.processing?"is-loading":""},[t("input",{directives:[{name:"model",rawName:"v-model",value:s.email,expression:"email"}],staticClass:"input",class:s.hasError("email")?"is-danger":"",attrs:{id:"email",type:"email",name:"email",required:"",placeholder:"you@email.com"},domProps:{value:s.email},on:{input:function(a){a.target.composing||(s.email=a.target.value)}}}),s._m(2),s.hasError("email")?t("p",{staticClass:"help has-text-white has-text-weight-bold"},[s._v(s._s(s.getError("email")))]):s._e()])]),t("div",{staticClass:"field with-x-spacing"},[t("label",{staticClass:"label has-text-white",attrs:{for:"subject"}},[s._v("Subject")]),t("div",{staticClass:"control has-icons-left",class:s.processing?"is-loading":""},[t("input",{directives:[{name:"model",rawName:"v-model",value:s.subject,expression:"subject"}],staticClass:"input",class:s.hasError("subject")?"is-danger":"",attrs:{id:"subject",type:"text",name:"subject",required:""},domProps:{value:s.subject},on:{input:function(a){a.target.composing||(s.subject=a.target.value)}}}),s._m(3),s.hasError("subject")?t("p",{staticClass:"help has-text-white has-text-weight-bold"},[s._v(s._s(s.getError("subject")))]):s._e()])]),t("div",{staticClass:"field with-x-spacing"},[t("label",{staticClass:"label has-text-white",attrs:{for:"message"}},[s._v("Message")]),t("div",{staticClass:"control has-icons-left",class:s.processing?"is-loading":""},[t("textarea",{directives:[{name:"model",rawName:"v-model",value:s.message,expression:"message"}],staticClass:"textarea",class:s.hasError("message")?"is-danger":"",attrs:{id:"message",required:""},domProps:{value:s.message},on:{input:function(a){a.target.composing||(s.message=a.target.value)}}}),s.hasError("message")?t("p",{staticClass:"help has-text-white has-text-weight-bold"},[s._v(s._s(s.getError("message")))]):s._e()])]),t("div",{staticClass:"field with-x-spacing"},[t("div",{staticClass:"control recaptcha"},[t("vue-recaptcha",{attrs:{sitekey:s.computedKey,loadRecaptchaScript:!0},on:{verify:s.recaptcha},model:{value:s.g_recaptcha_response,callback:function(a){s.g_recaptcha_response=a},expression:"g_recaptcha_response"}}),s.hasError("g-recaptcha-response")?t("p",{staticClass:"help has-text-white has-text-weight-bold"},[s._v(s._s(s.getError("g-recaptcha-response")))]):s._e()],1)]),t("div",{staticClass:"field has-text-centered"},[t("div",{staticClass:"control"},[t("button",{staticClass:"button is-primary",class:s.processing?"is-loading":"",attrs:{type:"submit",disabled:s.processing}},[s._v(" Send Email ")])])])])])]),t("div",{staticClass:"column"})])])},n=[function(){var e=this,s=e._self._c;return s("div",{staticClass:"field with-x-spacing"},[s("label",{staticClass:"label has-text-white",attrs:{for:"to"}},[e._v("To")]),s("div",{staticClass:"control"},[s("input",{staticClass:"input",attrs:{type:"text",value:"info@openlittermap.com",readonly:""}})])])},function(){var e=this,s=e._self._c;return s("span",{staticClass:"icon is-small is-left"},[s("i",{staticClass:"fa fa-user"})])},function(){var e=this,s=e._self._c;return s("span",{staticClass:"icon is-small is-left"},[s("i",{staticClass:"fa fa-envelope"})])},function(){var e=this,s=e._self._c;return s("span",{staticClass:"icon is-small is-left"},[s("i",{staticClass:"fa fa-info"})])}],m=r(c,o,n,!1,null,"156071c9");const d=m.exports;export{d as default}; diff --git a/public/build/assets/Countries-CsBf8WrW.js b/public/build/assets/Countries-Dyh1yqJ3.js similarity index 96% rename from public/build/assets/Countries-CsBf8WrW.js rename to public/build/assets/Countries-Dyh1yqJ3.js index f43d3dd4..79563689 100644 --- a/public/build/assets/Countries-CsBf8WrW.js +++ b/public/build/assets/Countries-Dyh1yqJ3.js @@ -1 +1 @@ -import{L as r}from"./vue-loading-hzYdSApK.js";/* empty css */import{n as a}from"./app-DuS6KM7M.js";import{L as i}from"./LeaderboardList-BGXAKUdR.js";import{S as l}from"./SortLocations-DdlBSIC0.js";/* empty css */import"./moment-zH0z38ay.js";const n={name:"TotalGlobalCounts",props:["loading"],computed:{previous_littercoin(){let e=0;return this.$localStorage.get("littercoin_owed")&&(e=this.$localStorage.get("littercoin_owed")),this.$localStorage.set("littercoin_owed",this.littercoin),e},previous_total_litter(){let e=0;return this.$localStorage.get("total_litter")&&(e=this.$localStorage.get("total_litter")),this.$localStorage.set("total_litter",this.total_litter),e},previous_total_photos(){let e=0;return this.$localStorage.get("total_photos")&&(e=this.$localStorage.get("total_photos")),this.$localStorage.set("total_photos",this.total_photos),e},total_litter(){return this.$store.state.locations.total_litter},total_photos(){return this.$store.state.locations.total_photos},total_littercoin(){return this.$store.state.locations.littercoin}},methods:{commas(e){return parseInt(e).toLocaleString()}}};var c=function(){var t=this,s=t._self._c;return s("div",{staticClass:"stats"},[s("div",{staticClass:"stat"},[s("h1",{staticClass:"subtitle is-5 has-text-centered"},[s("strong",{staticClass:"has-text-black font-800"},[t._v(" "+t._s(t.$t("location.total-verified-litter"))+" ")])]),s("h1",{staticClass:"title is-2 has-text-centered has-text-white"},[s("strong",[t.loading?s("span",[t._v("...")]):s("number",{attrs:{from:t.previous_total_litter,to:t.total_litter,duration:3,delay:1,easing:"Power1.easeOut",format:t.commas}})],1)])]),s("div",{staticClass:"stat"},[s("h1",{staticClass:"subtitle is-5 has-text-centered"},[s("strong",{staticClass:"has-text-black font-800"},[t._v(" "+t._s(t.$t("location.total-verified-photos"))+" ")])]),s("h1",{staticClass:"title is-2 has-text-centered has-text-white"},[s("strong",[t.loading?s("span",[t._v("...")]):s("number",{attrs:{from:t.previous_total_photos,to:t.total_photos,duration:3,delay:1,easing:"Power1.easeOut",format:t.commas}})],1)])]),s("div",{staticClass:"stat"},[s("h1",{staticClass:"subtitle is-5 has-text-centered"},[s("strong",{staticClass:"has-text-black font-800"},[t._v(" "+t._s(t.$t("location.total-littercoin-issued"))+" ")])]),s("h1",{staticClass:"title is-2 has-text-centered has-text-white"},[s("strong",[t.loading?s("span",[t._v("...")]):s("number",{attrs:{from:t.previous_littercoin,to:t.total_littercoin,duration:3,delay:1,easing:"Power1.easeOut",format:t.commas}})],1)])])])},_=[],d=a(n,c,_,!1,null,"c7421a37");const p=d.exports,h={name:"ProgressBar",props:["currentxp","xpneeded","startingxp"],computed:{currentValue(){let e=this.xpneeded-this.startingxp;return(this.currentxp-this.startingxp)*100/e}}};var u=function(){var t=this,s=t._self._c;return s("progress",{staticClass:"progress is-large is-success",attrs:{max:100},domProps:{value:t.currentValue}})},m=[],g=a(h,u,m,!1,null,null);const v=g.exports,f={name:"Progress",props:["loading"],components:{ProgressBar:v},methods:{commas(e){return parseInt(e).toLocaleString()}},computed:{littercoin(){return this.$store.state.locations.littercoin},previousXp(){return this.$store.state.locations.level.previousXp},nextXp(){return this.$store.state.locations.level.nextXp},total_litter(){return this.$store.state.locations.total_litter},progress(){let e=this.nextXp-this.previousXp;return((this.total_litter-this.previousXp)*100/e).toFixed(2)},total_photos(){return this.$store.state.locations.total_photos}}};var x=function(){var t=this,s=t._self._c;return s("div",{staticClass:"container mt4 progress-bar"},[s("div",[s("div",{staticClass:"flex mb1"},[s("h4",{staticClass:"flex-1 has-text-white"},[t._v(" "+t._s(t.$t("location.previous-target"))+": "),s("br"),s("strong",{staticClass:"has-text-white"},[t._v(" "+t._s(t._f("commas")(this.previousXp))+" "+t._s(t.$t("location.litter"))+" ")])]),s("h4",{staticClass:"has-text-white"},[t._v(t._s(t.$t("location.next-target"))+": "),s("br"),s("strong",{staticClass:"has-text-white"},[t._v(" "+t._s(t._f("commas")(this.nextXp))+" "+t._s(t.$t("location.litter"))+" ")])])]),s("ProgressBar",{staticClass:"mb1em",attrs:{currentxp:t.total_litter,startingxp:t.previousXp,xpneeded:t.nextXp}}),t.loading?s("p",{staticClass:"has-text-centered has-text-white mb2"},[t._v("...%")]):s("p",{staticClass:"has-text-centered has-text-white mb2"},[t._v(t._s(this.progress)+"%")])],1)])},$=[],C=a(f,x,$,!1,null,"fdd75015");const b=C.exports,w={name:"GlobalMetaData",props:["loading"],components:{LeaderboardList:i,Progress:b,TotalGlobalCounts:p},channel:"main",echo:{ImageUploaded:(e,t)=>{e.isUserVerified&&t.$store.commit("incrementTotalPhotos")},ImageDeleted:(e,t)=>{e.isUserVerified&&t.$store.commit("decrementTotalPhotos")},TagsVerifiedByAdmin:(e,t)=>{t.$store.commit("incrementTotalLitter",e.total_litter_all_categories),e.isUserVerified||t.$store.commit("incrementTotalPhotos")}},computed:{leaders(){return this.$store.state.locations.globalLeaders}},methods:{openLeaderboard(e){this.$router.push({path:"/leaderboard"})}}};var L=function(){var t=this,s=t._self._c;return s("section",{staticClass:"is-link hero is-bold"},[s("section",{staticClass:"wrapper is-link is-bold"},[s("div",{staticClass:"container"},[s("div",{staticClass:"typed-container"},[s("vue-typed-js",{attrs:{strings:["Community ^2000","Impact ^3000","Progress ^4000"],loop:!0,typespeed:5,startDelay:1e3,backSpeed:10,showCursor:!1}},[s("h1",{staticClass:"worldcup-title"},[t._v("Our Global "),s("span",{staticClass:"typing"})])])],1),s("TotalGlobalCounts",{attrs:{loading:t.loading}}),s("div",{staticClass:"leaderboard-heading",on:{click:t.openLeaderboard}},[s("h3",{staticClass:"title is-2 has-text-centered"},[t._v(" "+t._s(t.$t("location.global-leaderboard"))+" ")]),s("i",{staticClass:"fa fa-arrow-right"})]),s("LeaderboardList",{attrs:{leaders:t.leaders}})],1),s("Progress",{attrs:{loading:t.loading}})],1)])},P=[],S=a(w,L,P,!1,null,"bd523968");const y=S.exports,T={name:"Countries",components:{Loading:r,GlobalMetaData:y,SortLocations:l},async created(){this.loading=!0,await this.$store.dispatch("GET_WORLD_CUP_DATA"),this.loading=!1},data(){return{loading:!0}}};var X=function(){var t=this,s=t._self._c;return s("div",[s("loading",{directives:[{name:"show",rawName:"v-show",value:t.loading,expression:"loading"}],attrs:{active:t.loading,"is-full-page":!0},on:{"update:active":function(o){t.loading=o}}}),s("GlobalMetaData",{attrs:{loading:t.loading}}),s("SortLocations",{attrs:{locationType:"country"}})],1)},V=[],G=a(T,X,V,!1,null,null);const B=G.exports;export{B as default}; +import{L as r}from"./vue-loading-Ck0acTfr.js";/* empty css */import{n as a}from"./app-BwSojYvl.js";import{L as i}from"./LeaderboardList-DXMp6mtM.js";import{S as l}from"./SortLocations-R8WNss-N.js";/* empty css */import"./moment-zH0z38ay.js";const n={name:"TotalGlobalCounts",props:["loading"],computed:{previous_littercoin(){let e=0;return this.$localStorage.get("littercoin_owed")&&(e=this.$localStorage.get("littercoin_owed")),this.$localStorage.set("littercoin_owed",this.littercoin),e},previous_total_litter(){let e=0;return this.$localStorage.get("total_litter")&&(e=this.$localStorage.get("total_litter")),this.$localStorage.set("total_litter",this.total_litter),e},previous_total_photos(){let e=0;return this.$localStorage.get("total_photos")&&(e=this.$localStorage.get("total_photos")),this.$localStorage.set("total_photos",this.total_photos),e},total_litter(){return this.$store.state.locations.total_litter},total_photos(){return this.$store.state.locations.total_photos},total_littercoin(){return this.$store.state.locations.littercoin}},methods:{commas(e){return parseInt(e).toLocaleString()}}};var c=function(){var t=this,s=t._self._c;return s("div",{staticClass:"stats"},[s("div",{staticClass:"stat"},[s("h1",{staticClass:"subtitle is-5 has-text-centered"},[s("strong",{staticClass:"has-text-black font-800"},[t._v(" "+t._s(t.$t("location.total-verified-litter"))+" ")])]),s("h1",{staticClass:"title is-2 has-text-centered has-text-white"},[s("strong",[t.loading?s("span",[t._v("...")]):s("number",{attrs:{from:t.previous_total_litter,to:t.total_litter,duration:3,delay:1,easing:"Power1.easeOut",format:t.commas}})],1)])]),s("div",{staticClass:"stat"},[s("h1",{staticClass:"subtitle is-5 has-text-centered"},[s("strong",{staticClass:"has-text-black font-800"},[t._v(" "+t._s(t.$t("location.total-verified-photos"))+" ")])]),s("h1",{staticClass:"title is-2 has-text-centered has-text-white"},[s("strong",[t.loading?s("span",[t._v("...")]):s("number",{attrs:{from:t.previous_total_photos,to:t.total_photos,duration:3,delay:1,easing:"Power1.easeOut",format:t.commas}})],1)])]),s("div",{staticClass:"stat"},[s("h1",{staticClass:"subtitle is-5 has-text-centered"},[s("strong",{staticClass:"has-text-black font-800"},[t._v(" "+t._s(t.$t("location.total-littercoin-issued"))+" ")])]),s("h1",{staticClass:"title is-2 has-text-centered has-text-white"},[s("strong",[t.loading?s("span",[t._v("...")]):s("number",{attrs:{from:t.previous_littercoin,to:t.total_littercoin,duration:3,delay:1,easing:"Power1.easeOut",format:t.commas}})],1)])])])},_=[],d=a(n,c,_,!1,null,"c7421a37");const p=d.exports,h={name:"ProgressBar",props:["currentxp","xpneeded","startingxp"],computed:{currentValue(){let e=this.xpneeded-this.startingxp;return(this.currentxp-this.startingxp)*100/e}}};var u=function(){var t=this,s=t._self._c;return s("progress",{staticClass:"progress is-large is-success",attrs:{max:100},domProps:{value:t.currentValue}})},m=[],g=a(h,u,m,!1,null,null);const v=g.exports,f={name:"Progress",props:["loading"],components:{ProgressBar:v},methods:{commas(e){return parseInt(e).toLocaleString()}},computed:{littercoin(){return this.$store.state.locations.littercoin},previousXp(){return this.$store.state.locations.level.previousXp},nextXp(){return this.$store.state.locations.level.nextXp},total_litter(){return this.$store.state.locations.total_litter},progress(){let e=this.nextXp-this.previousXp;return((this.total_litter-this.previousXp)*100/e).toFixed(2)},total_photos(){return this.$store.state.locations.total_photos}}};var x=function(){var t=this,s=t._self._c;return s("div",{staticClass:"container mt4 progress-bar"},[s("div",[s("div",{staticClass:"flex mb1"},[s("h4",{staticClass:"flex-1 has-text-white"},[t._v(" "+t._s(t.$t("location.previous-target"))+": "),s("br"),s("strong",{staticClass:"has-text-white"},[t._v(" "+t._s(t._f("commas")(this.previousXp))+" "+t._s(t.$t("location.litter"))+" ")])]),s("h4",{staticClass:"has-text-white"},[t._v(t._s(t.$t("location.next-target"))+": "),s("br"),s("strong",{staticClass:"has-text-white"},[t._v(" "+t._s(t._f("commas")(this.nextXp))+" "+t._s(t.$t("location.litter"))+" ")])])]),s("ProgressBar",{staticClass:"mb1em",attrs:{currentxp:t.total_litter,startingxp:t.previousXp,xpneeded:t.nextXp}}),t.loading?s("p",{staticClass:"has-text-centered has-text-white mb2"},[t._v("...%")]):s("p",{staticClass:"has-text-centered has-text-white mb2"},[t._v(t._s(this.progress)+"%")])],1)])},$=[],C=a(f,x,$,!1,null,"fdd75015");const b=C.exports,w={name:"GlobalMetaData",props:["loading"],components:{LeaderboardList:i,Progress:b,TotalGlobalCounts:p},channel:"main",echo:{ImageUploaded:(e,t)=>{e.isUserVerified&&t.$store.commit("incrementTotalPhotos")},ImageDeleted:(e,t)=>{e.isUserVerified&&t.$store.commit("decrementTotalPhotos")},TagsVerifiedByAdmin:(e,t)=>{t.$store.commit("incrementTotalLitter",e.total_litter_all_categories),e.isUserVerified||t.$store.commit("incrementTotalPhotos")}},computed:{leaders(){return this.$store.state.locations.globalLeaders}},methods:{openLeaderboard(e){this.$router.push({path:"/leaderboard"})}}};var L=function(){var t=this,s=t._self._c;return s("section",{staticClass:"is-link hero is-bold"},[s("section",{staticClass:"wrapper is-link is-bold"},[s("div",{staticClass:"container"},[s("div",{staticClass:"typed-container"},[s("vue-typed-js",{attrs:{strings:["Community ^2000","Impact ^3000","Progress ^4000"],loop:!0,typespeed:5,startDelay:1e3,backSpeed:10,showCursor:!1}},[s("h1",{staticClass:"worldcup-title"},[t._v("Our Global "),s("span",{staticClass:"typing"})])])],1),s("TotalGlobalCounts",{attrs:{loading:t.loading}}),s("div",{staticClass:"leaderboard-heading",on:{click:t.openLeaderboard}},[s("h3",{staticClass:"title is-2 has-text-centered"},[t._v(" "+t._s(t.$t("location.global-leaderboard"))+" ")]),s("i",{staticClass:"fa fa-arrow-right"})]),s("LeaderboardList",{attrs:{leaders:t.leaders}})],1),s("Progress",{attrs:{loading:t.loading}})],1)])},P=[],S=a(w,L,P,!1,null,"bd523968");const y=S.exports,T={name:"Countries",components:{Loading:r,GlobalMetaData:y,SortLocations:l},async created(){this.loading=!0,await this.$store.dispatch("GET_WORLD_CUP_DATA"),this.loading=!1},data(){return{loading:!0}}};var X=function(){var t=this,s=t._self._c;return s("div",[s("loading",{directives:[{name:"show",rawName:"v-show",value:t.loading,expression:"loading"}],attrs:{active:t.loading,"is-full-page":!0},on:{"update:active":function(o){t.loading=o}}}),s("GlobalMetaData",{attrs:{loading:t.loading}}),s("SortLocations",{attrs:{locationType:"country"}})],1)},V=[],G=a(T,X,V,!1,null,null);const B=G.exports;export{B as default}; diff --git a/public/build/assets/Credits-kCn_9RdJ.js b/public/build/assets/Credits-DjTyM_GJ.js similarity index 96% rename from public/build/assets/Credits-kCn_9RdJ.js rename to public/build/assets/Credits-DjTyM_GJ.js index fdd973fe..4f3dbffb 100644 --- a/public/build/assets/Credits-kCn_9RdJ.js +++ b/public/build/assets/Credits-DjTyM_GJ.js @@ -1 +1 @@ -import{n as e}from"./app-DuS6KM7M.js";/* empty css */const o={name:"Credits"};var r=function(){var a=this;return a._self._c,a._m(0)},c=[function(){var t=this,a=t._self._c;return a("div",[a("div",[t._v("Icons made by "),a("a",{attrs:{href:"https://www.flaticon.com/authors/pixel-buddha",title:"Pixel Buddha"}},[t._v("Pixel Buddha")]),t._v(" from "),a("a",{attrs:{href:"https://www.flaticon.com/",title:"Flaticon"}},[t._v("www.flaticon.com")])]),a("div",[t._v("Icons made by "),a("a",{attrs:{href:"https://www.freepik.com",title:"Freepik"}},[t._v("Freepik")]),t._v(" from "),a("a",{attrs:{href:"https://www.flaticon.com/",title:"Flaticon"}},[t._v("www.flaticon.com")])]),a("div",[t._v("Icons made by "),a("a",{attrs:{href:"https://www.flaticon.com/authors/smashicons",title:"Smashicons"}},[t._v("Smashicons")]),t._v(" from "),a("a",{attrs:{href:"https://www.flaticon.com/",title:"Flaticon"}},[t._v("www.flaticon.com")])]),a("div",[t._v("Icons made by "),a("a",{attrs:{href:"https://www.flaticon.com/authors/alfredo-hernandez",title:"Alfredo Hernandez"}},[t._v("Alfredo Hernandez")]),t._v(" from "),a("a",{attrs:{href:"https://www.flaticon.com/",title:"Flaticon"}},[t._v("www.flaticon.com")])]),a("div",[t._v("Icons made by "),a("a",{attrs:{href:"https://www.flaticon.com/authors/sbts2018",title:"sbts2018"}},[t._v("sbts2018")]),t._v(" from "),a("a",{attrs:{href:"https://www.flaticon.com/",title:"Flaticon"}},[t._v("www.flaticon.com")])]),a("a",{attrs:{href:"https://www.freepik.com/vectors/garbage-man"}},[t._v("Garbage man vector created by pch.vector - www.freepik.com")]),a("a",{attrs:{href:"https://create.vista.com/unlimited/stock-photos/164344014/stock-photo-volunteer-with-trash-bag-and/"}},[t._v("Photo Volunteering, people and ecology concept - volunteer woman with garbage bag and glass bottle cleaning area in park created by Syda_Productions")])])}],s=e(o,r,c,!1,null,"bbbc3a94");const w=s.exports;export{w as default}; +import{n as e}from"./app-BwSojYvl.js";/* empty css */const o={name:"Credits"};var r=function(){var a=this;return a._self._c,a._m(0)},c=[function(){var t=this,a=t._self._c;return a("div",[a("div",[t._v("Icons made by "),a("a",{attrs:{href:"https://www.flaticon.com/authors/pixel-buddha",title:"Pixel Buddha"}},[t._v("Pixel Buddha")]),t._v(" from "),a("a",{attrs:{href:"https://www.flaticon.com/",title:"Flaticon"}},[t._v("www.flaticon.com")])]),a("div",[t._v("Icons made by "),a("a",{attrs:{href:"https://www.freepik.com",title:"Freepik"}},[t._v("Freepik")]),t._v(" from "),a("a",{attrs:{href:"https://www.flaticon.com/",title:"Flaticon"}},[t._v("www.flaticon.com")])]),a("div",[t._v("Icons made by "),a("a",{attrs:{href:"https://www.flaticon.com/authors/smashicons",title:"Smashicons"}},[t._v("Smashicons")]),t._v(" from "),a("a",{attrs:{href:"https://www.flaticon.com/",title:"Flaticon"}},[t._v("www.flaticon.com")])]),a("div",[t._v("Icons made by "),a("a",{attrs:{href:"https://www.flaticon.com/authors/alfredo-hernandez",title:"Alfredo Hernandez"}},[t._v("Alfredo Hernandez")]),t._v(" from "),a("a",{attrs:{href:"https://www.flaticon.com/",title:"Flaticon"}},[t._v("www.flaticon.com")])]),a("div",[t._v("Icons made by "),a("a",{attrs:{href:"https://www.flaticon.com/authors/sbts2018",title:"sbts2018"}},[t._v("sbts2018")]),t._v(" from "),a("a",{attrs:{href:"https://www.flaticon.com/",title:"Flaticon"}},[t._v("www.flaticon.com")])]),a("a",{attrs:{href:"https://www.freepik.com/vectors/garbage-man"}},[t._v("Garbage man vector created by pch.vector - www.freepik.com")]),a("a",{attrs:{href:"https://create.vista.com/unlimited/stock-photos/164344014/stock-photo-volunteer-with-trash-bag-and/"}},[t._v("Photo Volunteering, people and ecology concept - volunteer woman with garbage bag and glass bottle cleaning area in park created by Syda_Productions")])])}],s=e(o,r,c,!1,null,"bbbc3a94");const w=s.exports;export{w as default}; diff --git a/public/build/assets/Details-DlDlKZRi.js b/public/build/assets/Details-BBDTCe8n.js similarity index 98% rename from public/build/assets/Details-DlDlKZRi.js rename to public/build/assets/Details-BBDTCe8n.js index ebd19459..f2a24fc3 100644 --- a/public/build/assets/Details-DlDlKZRi.js +++ b/public/build/assets/Details-BBDTCe8n.js @@ -1 +1 @@ -import{n as a}from"./app-DuS6KM7M.js";/* empty css */const i={name:"Details",data(){return{btn:"button is-medium is-info",processing:!1}},computed:{button(){return this.processing?this.btn+" is-loading":this.btn},email:{get(){return this.user.email},set(t){this.$store.commit("changeUserEmail",t)}},errors(){return this.$store.state.user.errors},name:{get(){return this.user.name},set(t){this.$store.commit("changeUserName",t)}},user(){return this.$store.state.user.user},username:{get(){return this.user.username},set(t){this.$store.commit("changeUserUsername",t)}}},methods:{clearError(t){this.errors[t]&&this.$store.commit("deleteUserError",t)},getFirstError(t){return this.errors[t][0]},errorExists(t){return this.errors.hasOwnProperty(t)},async submit(){this.processing=!0,await this.$store.dispatch("UPDATE_DETAILS"),this.processing=!1}}};var n=function(){var e=this,s=e._self._c;return s("div",{staticStyle:{"padding-left":"1em","padding-right":"1em"}},[s("h1",{staticClass:"title is-4"},[e._v(e._s(e.$t("settings.details.change-details")))]),s("hr"),s("br"),s("div",{staticClass:"columns"},[s("div",{staticClass:"column is-one-third is-offset-1"},[s("form",{on:{submit:function(r){return r.preventDefault(),e.submit.apply(null,arguments)},keydown:function(r){return e.clearError(r.target.name)}}},[s("label",{attrs:{for:"name"}},[e._v(e._s(e.$t("settings.details.your-name")))]),e.errorExists("name")?s("span",{staticClass:"error",domProps:{textContent:e._s(e.getFirstError("name"))}}):e._e(),s("div",{staticClass:"field"},[s("div",{staticClass:"control has-icons-left"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.name,expression:"name"}],staticClass:"input",attrs:{type:"text",name:"name",id:"name",placeholder:e.name,required:""},domProps:{value:e.name},on:{input:function(r){r.target.composing||(e.name=r.target.value)}}}),e._m(0)])]),s("label",{attrs:{for:"username"}},[e._v(e._s(e.$t("settings.details.unique-id")))]),e.errorExists("username")?s("span",{staticClass:"error",domProps:{textContent:e._s(e.getFirstError("username"))}}):e._e(),s("div",{staticClass:"field"},[s("div",{staticClass:"control has-icons-left"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.username,expression:"username"}],staticClass:"input",attrs:{type:"text",name:"username",id:"username",placeholder:e.username,required:""},domProps:{value:e.username},on:{input:function(r){r.target.composing||(e.username=r.target.value)}}}),s("span",{staticClass:"icon is-small is-left"},[e._v(" @ ")])])]),s("label",{attrs:{for:"email"}},[e._v(e._s(e.$t("settings.details.email")))]),e.errorExists("email")?s("span",{staticClass:"error",domProps:{textContent:e._s(e.getFirstError("email"))}}):e._e(),s("div",{staticClass:"field mb2"},[s("div",{staticClass:"control has-icons-left"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.email,expression:"email"}],staticClass:"input",attrs:{type:"email",name:"email",id:"email",placeholder:e.email,required:""},domProps:{value:e.email},on:{input:function(r){r.target.composing||(e.email=r.target.value)}}}),e._m(1)])]),s("button",{class:e.button,attrs:{disabled:e.processing}},[e._v(e._s(e.$t("settings.details.update-details")))])])])])])},o=[function(){var t=this,e=t._self._c;return e("span",{staticClass:"icon is-small is-left"},[e("i",{staticClass:"fa fa-user"})])},function(){var t=this,e=t._self._c;return e("span",{staticClass:"icon is-small is-left"},[e("i",{staticClass:"fa fa-envelope"})])}],l=a(i,n,o,!1,null,null);const c=l.exports;export{c as default}; +import{n as a}from"./app-BwSojYvl.js";/* empty css */const i={name:"Details",data(){return{btn:"button is-medium is-info",processing:!1}},computed:{button(){return this.processing?this.btn+" is-loading":this.btn},email:{get(){return this.user.email},set(t){this.$store.commit("changeUserEmail",t)}},errors(){return this.$store.state.user.errors},name:{get(){return this.user.name},set(t){this.$store.commit("changeUserName",t)}},user(){return this.$store.state.user.user},username:{get(){return this.user.username},set(t){this.$store.commit("changeUserUsername",t)}}},methods:{clearError(t){this.errors[t]&&this.$store.commit("deleteUserError",t)},getFirstError(t){return this.errors[t][0]},errorExists(t){return this.errors.hasOwnProperty(t)},async submit(){this.processing=!0,await this.$store.dispatch("UPDATE_DETAILS"),this.processing=!1}}};var n=function(){var e=this,s=e._self._c;return s("div",{staticStyle:{"padding-left":"1em","padding-right":"1em"}},[s("h1",{staticClass:"title is-4"},[e._v(e._s(e.$t("settings.details.change-details")))]),s("hr"),s("br"),s("div",{staticClass:"columns"},[s("div",{staticClass:"column is-one-third is-offset-1"},[s("form",{on:{submit:function(r){return r.preventDefault(),e.submit.apply(null,arguments)},keydown:function(r){return e.clearError(r.target.name)}}},[s("label",{attrs:{for:"name"}},[e._v(e._s(e.$t("settings.details.your-name")))]),e.errorExists("name")?s("span",{staticClass:"error",domProps:{textContent:e._s(e.getFirstError("name"))}}):e._e(),s("div",{staticClass:"field"},[s("div",{staticClass:"control has-icons-left"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.name,expression:"name"}],staticClass:"input",attrs:{type:"text",name:"name",id:"name",placeholder:e.name,required:""},domProps:{value:e.name},on:{input:function(r){r.target.composing||(e.name=r.target.value)}}}),e._m(0)])]),s("label",{attrs:{for:"username"}},[e._v(e._s(e.$t("settings.details.unique-id")))]),e.errorExists("username")?s("span",{staticClass:"error",domProps:{textContent:e._s(e.getFirstError("username"))}}):e._e(),s("div",{staticClass:"field"},[s("div",{staticClass:"control has-icons-left"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.username,expression:"username"}],staticClass:"input",attrs:{type:"text",name:"username",id:"username",placeholder:e.username,required:""},domProps:{value:e.username},on:{input:function(r){r.target.composing||(e.username=r.target.value)}}}),s("span",{staticClass:"icon is-small is-left"},[e._v(" @ ")])])]),s("label",{attrs:{for:"email"}},[e._v(e._s(e.$t("settings.details.email")))]),e.errorExists("email")?s("span",{staticClass:"error",domProps:{textContent:e._s(e.getFirstError("email"))}}):e._e(),s("div",{staticClass:"field mb2"},[s("div",{staticClass:"control has-icons-left"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.email,expression:"email"}],staticClass:"input",attrs:{type:"email",name:"email",id:"email",placeholder:e.email,required:""},domProps:{value:e.email},on:{input:function(r){r.target.composing||(e.email=r.target.value)}}}),e._m(1)])]),s("button",{class:e.button,attrs:{disabled:e.processing}},[e._v(e._s(e.$t("settings.details.update-details")))])])])])])},o=[function(){var t=this,e=t._self._c;return e("span",{staticClass:"icon is-small is-left"},[e("i",{staticClass:"fa fa-user"})])},function(){var t=this,e=t._self._c;return e("span",{staticClass:"icon is-small is-left"},[e("i",{staticClass:"fa fa-envelope"})])}],l=a(i,n,o,!1,null,null);const c=l.exports;export{c as default}; diff --git a/public/build/assets/Donate-RQpbk3fS.js b/public/build/assets/Donate-CymQE4iA.js similarity index 95% rename from public/build/assets/Donate-RQpbk3fS.js rename to public/build/assets/Donate-CymQE4iA.js index 46d70041..8b636571 100644 --- a/public/build/assets/Donate-RQpbk3fS.js +++ b/public/build/assets/Donate-CymQE4iA.js @@ -1 +1 @@ -import{L as n}from"./vue-loading-hzYdSApK.js";/* empty css */import{n as i}from"./app-DuS6KM7M.js";import{_ as o}from"./IMG_0556-0A1kBpHu.js";/* empty css */const r={name:"DonateButtons",components:{Loading:n},data(){return{stripeEmail:"",stripeToken:"",amount:"",loading:!0}},async created(){this.loading=!0,await this.$store.dispatch("GET_DONATION_AMOUNTS"),this.$emit("donations-loaded"),this.loading=!1},computed:{amounts(){return this.$store.state.donate.amounts}},methods:{donate(a){this.amount=this.prices[a]*100,this.stripe=StripeCheckout.configure({key:OLM.stripeKey,image:"https://stripe.com/img/documentation/checkout/marketplace.png",locale:"auto",panelLabel:"One-time Donation",token:e=>{this.stripeToken=e.id,this.stripeEmail=e.email,axios.post("/donate",this.$data).then(t=>{alert("Congratulations! Your payment was successful. Thanks!")}).catch(t=>{alert("Sorry, there was an error processing your card! You have not been charged. Please try again")})}}),this.stripe.open({name:"€"+this.prices[a],description:"OpenLitterMap",zipCode:!1,amount:this.prices[a]*100})}}};var c=function(){var e=this,t=e._self._c;return t("div",[e.loading?t("loading",{attrs:{active:e.loading,"is-full-page":!1},on:{"update:active":function(s){e.loading=s}}}):t("div",{staticClass:"box"},[t("h3",{staticClass:"title is-2 mb1em"},[t("strong",{staticStyle:{color:"#363636"}},[e._v("Select an amount:")])]),t("div",{staticClass:"grid-container has-text-centered"},e._l(e.amounts,function(s){return t("div",[t("div",{staticClass:"box",staticStyle:{"background-color":"lightgreen"}},[t("h3",{staticClass:"title is-3 mb1em"},[t("strong",[e._v("€"+e._s(s.amount/100))])]),t("button",{staticClass:"button is-medium is-primary",on:{click:function(v){return e.donate(s.id)}}},[e._v("Donate now")])])])}),0),t("h3",{staticClass:"title is-1",staticStyle:{"text-align":"right"}},[t("strong",{staticStyle:{color:"#363636"}},[e._v("Thank you.")])])])],1)},l=[],d=i(r,c,l,!1,null,"9c0de48a");const p=d.exports,m={name:"Donate",components:{DonateButtons:p},data(){return{loading:!0}}};var _=function(){var e=this,t=e._self._c;return t("section",{staticClass:"section hero is-fullheight is-primary is-bold"},[t("div",{staticClass:"container"},[t("h3",{staticClass:"title is-3"},[e._v(e._s(e.$t("home.donate.olm-dependent-on-donations")))]),t("br"),t("img",{staticStyle:{height:"450px",display:"block",margin:"auto","object-fit":"cover"},attrs:{src:o,alt:"It's important",title:"It's important"}}),t("p",{staticStyle:{"text-align":"center","margin-top":"12px"}},[e._v(e._s(e.$t("home.donate.its-important")))]),t("br"),t("div",{staticStyle:{"word-break":"break-all"}},[t("p",[e._v("Bitcoin: 3Cvyhhec777Dnc6a5QHZ1S8DZpL3nodZ2K")]),t("p",[e._v("Bitcoin Cash: 14FEA8ckGiTf5HvYhANBAEpmvawdJpFFU6")]),t("p",[e._v("Ethereum: 0x43DbD68771cEDad272dcC78c4108B543DDF8a449")]),t("p",[e._v("Dash: XfLLMTKeSwXhaoUGpUJVTV9KrtGTXiMoAG")]),e.loading?t("p",[e._v("Updating....")]):e._e()]),t("br"),t("div",{staticClass:"container"},[t("donate-buttons",{on:{"donations-loaded":function(s){e.loading=!1}}})],1)])])},u=[],h=i(m,_,u,!1,null,"60e4ca1c");const D=h.exports;export{D as default}; +import{L as n}from"./vue-loading-Ck0acTfr.js";/* empty css */import{n as i}from"./app-BwSojYvl.js";import{_ as o}from"./IMG_0556-0A1kBpHu.js";/* empty css */const r={name:"DonateButtons",components:{Loading:n},data(){return{stripeEmail:"",stripeToken:"",amount:"",loading:!0}},async created(){this.loading=!0,await this.$store.dispatch("GET_DONATION_AMOUNTS"),this.$emit("donations-loaded"),this.loading=!1},computed:{amounts(){return this.$store.state.donate.amounts}},methods:{donate(a){this.amount=this.prices[a]*100,this.stripe=StripeCheckout.configure({key:OLM.stripeKey,image:"https://stripe.com/img/documentation/checkout/marketplace.png",locale:"auto",panelLabel:"One-time Donation",token:e=>{this.stripeToken=e.id,this.stripeEmail=e.email,axios.post("/donate",this.$data).then(t=>{alert("Congratulations! Your payment was successful. Thanks!")}).catch(t=>{alert("Sorry, there was an error processing your card! You have not been charged. Please try again")})}}),this.stripe.open({name:"€"+this.prices[a],description:"OpenLitterMap",zipCode:!1,amount:this.prices[a]*100})}}};var c=function(){var e=this,t=e._self._c;return t("div",[e.loading?t("loading",{attrs:{active:e.loading,"is-full-page":!1},on:{"update:active":function(s){e.loading=s}}}):t("div",{staticClass:"box"},[t("h3",{staticClass:"title is-2 mb1em"},[t("strong",{staticStyle:{color:"#363636"}},[e._v("Select an amount:")])]),t("div",{staticClass:"grid-container has-text-centered"},e._l(e.amounts,function(s){return t("div",[t("div",{staticClass:"box",staticStyle:{"background-color":"lightgreen"}},[t("h3",{staticClass:"title is-3 mb1em"},[t("strong",[e._v("€"+e._s(s.amount/100))])]),t("button",{staticClass:"button is-medium is-primary",on:{click:function(v){return e.donate(s.id)}}},[e._v("Donate now")])])])}),0),t("h3",{staticClass:"title is-1",staticStyle:{"text-align":"right"}},[t("strong",{staticStyle:{color:"#363636"}},[e._v("Thank you.")])])])],1)},l=[],d=i(r,c,l,!1,null,"9c0de48a");const p=d.exports,m={name:"Donate",components:{DonateButtons:p},data(){return{loading:!0}}};var _=function(){var e=this,t=e._self._c;return t("section",{staticClass:"section hero is-fullheight is-primary is-bold"},[t("div",{staticClass:"container"},[t("h3",{staticClass:"title is-3"},[e._v(e._s(e.$t("home.donate.olm-dependent-on-donations")))]),t("br"),t("img",{staticStyle:{height:"450px",display:"block",margin:"auto","object-fit":"cover"},attrs:{src:o,alt:"It's important",title:"It's important"}}),t("p",{staticStyle:{"text-align":"center","margin-top":"12px"}},[e._v(e._s(e.$t("home.donate.its-important")))]),t("br"),t("div",{staticStyle:{"word-break":"break-all"}},[t("p",[e._v("Bitcoin: 3Cvyhhec777Dnc6a5QHZ1S8DZpL3nodZ2K")]),t("p",[e._v("Bitcoin Cash: 14FEA8ckGiTf5HvYhANBAEpmvawdJpFFU6")]),t("p",[e._v("Ethereum: 0x43DbD68771cEDad272dcC78c4108B543DDF8a449")]),t("p",[e._v("Dash: XfLLMTKeSwXhaoUGpUJVTV9KrtGTXiMoAG")]),e.loading?t("p",[e._v("Updating....")]):e._e()]),t("br"),t("div",{staticClass:"container"},[t("donate-buttons",{on:{"donations-loaded":function(s){e.loading=!1}}})],1)])])},u=[],h=i(m,_,u,!1,null,"60e4ca1c");const D=h.exports;export{D as default}; diff --git a/public/build/assets/Email-C4w3wM9T.js b/public/build/assets/Email-B8-JmzOD.js similarity index 97% rename from public/build/assets/Email-C4w3wM9T.js rename to public/build/assets/Email-B8-JmzOD.js index e7706385..1ac055e7 100644 --- a/public/build/assets/Email-C4w3wM9T.js +++ b/public/build/assets/Email-B8-JmzOD.js @@ -1 +1 @@ -import{n as i}from"./app-DuS6KM7M.js";/* empty css */const r={name:"Email",data(){return{email:"",processing:!1}},computed:{validationErrors(){let a=this.$store.state.user.errors;return a&&a.email?a.email[0]:null}},methods:{async submit(){this.processing=!0,await this.$store.dispatch("SEND_PASSWORD_RESET_LINK",this.email),this.processing=!1},clearErrors(){this.$store.commit("errors",[])}}};var l=function(){var s=this,t=s._self._c;return t("section",{staticClass:"hero is-info is-fullheight"},[t("div",{staticClass:"columns centered"},[t("div",{staticClass:"column"}),t("div",{staticClass:"column is-half-tablet is-one-third-desktop is-one-quarter-fullhd"},[t("p",{staticClass:"title is-1 has-text-centered"},[s._v("Reset Password")]),t("div",{staticClass:"panel-body"},[t("form",{staticClass:"form-horizontal",attrs:{role:"form"},on:{submit:function(e){return e.preventDefault(),s.submit.apply(null,arguments)}}},[t("div",{staticClass:"field with-x-spacing"},[t("label",{staticClass:"label has-text-white",attrs:{for:"email"}},[s._v("E-Mail Address")]),t("div",{staticClass:"control has-icons-left",class:s.processing?"is-loading":""},[t("input",{directives:[{name:"model",rawName:"v-model",value:s.email,expression:"email"}],staticClass:"input",class:s.validationErrors?"is-danger":"",attrs:{id:"email",type:"email",name:"email",required:"",autofocus:"",placeholder:"you@email.com"},domProps:{value:s.email},on:{input:[function(e){e.target.composing||(s.email=e.target.value)},s.clearErrors]}}),s._m(0),s.validationErrors?t("p",{staticClass:"help has-text-white has-text-weight-bold"},[s._v(s._s(s.validationErrors))]):s._e()])]),t("div",{staticClass:"field has-text-centered"},[t("div",{staticClass:"control"},[t("button",{staticClass:"button is-primary",class:s.processing?"is-loading":"",attrs:{type:"submit",disabled:s.processing}},[s._v(" Send Password Reset Link ")])])])])])]),t("div",{staticClass:"column"})])])},o=[function(){var a=this,s=a._self._c;return s("span",{staticClass:"icon is-small is-left"},[s("i",{staticClass:"fa fa-envelope"})])}],n=i(r,l,o,!1,null,"4ded61d5");const d=n.exports;export{d as default}; +import{n as i}from"./app-BwSojYvl.js";/* empty css */const r={name:"Email",data(){return{email:"",processing:!1}},computed:{validationErrors(){let a=this.$store.state.user.errors;return a&&a.email?a.email[0]:null}},methods:{async submit(){this.processing=!0,await this.$store.dispatch("SEND_PASSWORD_RESET_LINK",this.email),this.processing=!1},clearErrors(){this.$store.commit("errors",[])}}};var l=function(){var s=this,t=s._self._c;return t("section",{staticClass:"hero is-info is-fullheight"},[t("div",{staticClass:"columns centered"},[t("div",{staticClass:"column"}),t("div",{staticClass:"column is-half-tablet is-one-third-desktop is-one-quarter-fullhd"},[t("p",{staticClass:"title is-1 has-text-centered"},[s._v("Reset Password")]),t("div",{staticClass:"panel-body"},[t("form",{staticClass:"form-horizontal",attrs:{role:"form"},on:{submit:function(e){return e.preventDefault(),s.submit.apply(null,arguments)}}},[t("div",{staticClass:"field with-x-spacing"},[t("label",{staticClass:"label has-text-white",attrs:{for:"email"}},[s._v("E-Mail Address")]),t("div",{staticClass:"control has-icons-left",class:s.processing?"is-loading":""},[t("input",{directives:[{name:"model",rawName:"v-model",value:s.email,expression:"email"}],staticClass:"input",class:s.validationErrors?"is-danger":"",attrs:{id:"email",type:"email",name:"email",required:"",autofocus:"",placeholder:"you@email.com"},domProps:{value:s.email},on:{input:[function(e){e.target.composing||(s.email=e.target.value)},s.clearErrors]}}),s._m(0),s.validationErrors?t("p",{staticClass:"help has-text-white has-text-weight-bold"},[s._v(s._s(s.validationErrors))]):s._e()])]),t("div",{staticClass:"field has-text-centered"},[t("div",{staticClass:"control"},[t("button",{staticClass:"button is-primary",class:s.processing?"is-loading":"",attrs:{type:"submit",disabled:s.processing}},[s._v(" Send Password Reset Link ")])])])])])]),t("div",{staticClass:"column"})])])},o=[function(){var a=this,s=a._self._c;return s("span",{staticClass:"icon is-small is-left"},[s("i",{staticClass:"fa fa-envelope"})])}],n=i(r,l,o,!1,null,"4ded61d5");const d=n.exports;export{d as default}; diff --git a/public/build/assets/Emails-udg0lUCE.js b/public/build/assets/Emails-B3sy2HLk.js similarity index 94% rename from public/build/assets/Emails-udg0lUCE.js rename to public/build/assets/Emails-B3sy2HLk.js index 8decfe5c..17a26f41 100644 --- a/public/build/assets/Emails-udg0lUCE.js +++ b/public/build/assets/Emails-B3sy2HLk.js @@ -1 +1 @@ -import{n as e}from"./app-DuS6KM7M.js";/* empty css */const i={name:"Emails",data(){return{processing:!1}},computed:{button(){return this.processing?"button is-info is-loading":"button is-info"},color(){return this.$store.state.user.user.emailsub?"color: green":"color: red"},computedPresence(){return this.$store.state.user.user.emailsub?"Subscribed":"Unsubscribed"}},methods:{async toggle(){this.processing=!0,this.$store.dispatch("TOGGLE_EMAIL_SUBSCRIPTION"),this.processing=!1}}};var r=function(){var s=this,t=s._self._c;return t("div",{staticStyle:{padding:"0 1em"}},[t("h1",{staticClass:"title is-4"},[s._v(s._s(s.$t("settings.emails.toggle-email")))]),t("hr"),t("p",[s._v(s._s(s.$t("settings.emails.we-send-updates")))]),t("p",[s._v(s._s(s.$t("settings.emails.subscribe")))]),t("br"),t("p",[t("b",[s._v(s._s(s.$t("settings.emails.current-status"))+":")])]),t("p",[t("b",{style:s.color},[s._v(s._s(this.computedPresence))])]),t("br"),t("div",{staticClass:"columns"},[t("div",{staticClass:"column is-one-third is-offset-1"},[t("button",{class:s.button,attrs:{disabled:s.processing},on:{click:s.toggle}},[s._v(s._s(s.$t("settings.emails.change-status")))])])])])},n=[],o=e(i,r,n,!1,null,null);const u=o.exports;export{u as default}; +import{n as e}from"./app-BwSojYvl.js";/* empty css */const i={name:"Emails",data(){return{processing:!1}},computed:{button(){return this.processing?"button is-info is-loading":"button is-info"},color(){return this.$store.state.user.user.emailsub?"color: green":"color: red"},computedPresence(){return this.$store.state.user.user.emailsub?"Subscribed":"Unsubscribed"}},methods:{async toggle(){this.processing=!0,this.$store.dispatch("TOGGLE_EMAIL_SUBSCRIPTION"),this.processing=!1}}};var r=function(){var s=this,t=s._self._c;return t("div",{staticStyle:{padding:"0 1em"}},[t("h1",{staticClass:"title is-4"},[s._v(s._s(s.$t("settings.emails.toggle-email")))]),t("hr"),t("p",[s._v(s._s(s.$t("settings.emails.we-send-updates")))]),t("p",[s._v(s._s(s.$t("settings.emails.subscribe")))]),t("br"),t("p",[t("b",[s._v(s._s(s.$t("settings.emails.current-status"))+":")])]),t("p",[t("b",{style:s.color},[s._v(s._s(this.computedPresence))])]),t("br"),t("div",{staticClass:"columns"},[t("div",{staticClass:"column is-one-third is-offset-1"},[t("button",{class:s.button,attrs:{disabled:s.processing},on:{click:s.toggle}},[s._v(s._s(s.$t("settings.emails.change-status")))])])])])},n=[],o=e(i,r,n,!1,null,null);const u=o.exports;export{u as default}; diff --git a/public/build/assets/FAQ-CM-GCf64.js b/public/build/assets/FAQ-ChqK9RWj.js similarity index 99% rename from public/build/assets/FAQ-CM-GCf64.js rename to public/build/assets/FAQ-ChqK9RWj.js index e56e0afe..1fcf151d 100644 --- a/public/build/assets/FAQ-CM-GCf64.js +++ b/public/build/assets/FAQ-ChqK9RWj.js @@ -1 +1 @@ -import{n as a}from"./app-DuS6KM7M.js";/* empty css */const i={name:"FAQ",mounted(){window.scrollTo(0,0)}};var n=function(){var e=this,o=e._self._c;return o("section",{staticClass:"hero section-faq"},[o("div",{staticClass:"hero-body"},[o("div",{staticClass:"py-2 mb-6"},[o("div",{staticClass:"title has-text-light has-text-centered"},[e._v(" "+e._s(e.$t("common.faq"))+" ")])]),e._m(0)])])},r=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"faq"},[e("ul",[e("li",[e("input",{attrs:{type:"checkbox",checked:""}}),e("i"),e("h2",[t._v("What is OpenLitterMap?")]),e("p",[t._v("OpenLitterMap is an open source, interactive, and accessible databsase of the world's litter & plastic pollution. We are turning cleaning the planet into a game, to make it fun and easy to collect data. This data is important to give visibility to litter, and help find solutions like where to put bins, ashtrays & more. ")])]),e("li",[e("input",{attrs:{type:"checkbox",checked:""}}),e("i"),e("h2",[t._v("Why is it called OpenLitterMap?")]),e("p",[t._v(` "Open" - because all of our code & data is open source. This means that anyone can access the code, learn from it, improvee it, or use it in another project! You don't have to be a developer to appreciate how powerful this is. Open source code can be passed on from generation to generation, who can build on it, learn from it and use it to continue to help improve society for the betterment of humanity. `),e("br"),t._v(" "),e("br"),t._v(" Not only is all of our code open source, which you can find at "),e("a",{attrs:{href:"https://github.com/openlittermap"}},[t._v("https://github.com/openlittermap")]),t._v(" but all of our data is also openly available for anyone to download and start using. This is in contrast to many other apps, who do not open up access to their code and data as they are trying to keep it for themselves (booo!!!) "),e("br"),t._v(' "LitterMap" - because we visualise our entire global repository on the global map, which loads all data in 30kb and 33ms (August 2022). '),e("br"),t._v(" The OpenLitterMap name was inspired by "),e("a",{attrs:{href:"https://openstreetmap.org"}},[t._v("OpenStreetMap")]),t._v(" which is the most detailed & comprehensive map of the world ever created by over 2-million volunteers that contiunes to be updated constantly. Unlike other services like Google Maps, which is not open and owned by Google, OpenStreetMap code and data is open to everyone, allowing anyone to be a part of adding, editing or using the code and/or data. Inspired by the open source values of OpenStreetMap, we decided to apply the same open values to litter and plastic pollution. ")])]),e("li",[e("input",{attrs:{type:"checkbox",checked:""}}),e("i"),e("h2",[t._v("How do I take pictures?")]),e("p",[t._v(" Firstly, make sure that your phone has the right settings: "),e("br"),t._v('  • iPhone. Open Settings -> Privacy -> Location. Turn "Camera On While Using". '),e("br"),t._v("  • Android. Open the Camera. "),e("br"),t._v("Go to camera settings => Activate Geotagging. "),e("br"),t._v("Pull down top-menu and Activate GPS "),e("br"),e("br"),t._v("There are different ways to take pictures: "),e("br"),t._v("  • Open your normal camera and use that to take the photos (our preferred way) "),e("br"),t._v("  • Open the app and take pictures from within the app (This is currently disabled.) "),e("br"),e("br"),t._v("There are 2 ways to upload and tag your data. You can use the mobile app, or you can use openlittermap.com and log in there. If you visit the website, you have to upload your images first, then tag them. Some people prefer this way, as you get a full screen, a keyboard, and you can tag many items at once. Other people prefer using the mobile app, where you have to select your images first, tag them, and upload the tagged ones. "),e("br"),t._v("Check your setting: do you normally pick up the litter or not? "),e("br"),t._v("If you want to take pictures without draining your battery, it is okay to put it in flight-mode! To determine your location, you need the GPS sensor in your device to connect to a location-tracking satellite, not your cellular or wifi network. You can collect geospatial data anywhere, without needing a connection to anything else. This means that it works in the most remote parts of the world, but you need to connect to the internet if you want to upload your data. ")])]),e("li",[e("input",{attrs:{type:"checkbox",checked:""}}),e("i"),e("h2",[t._v("What is Littercoin?")]),e("p",[t._v("Littercoin is the reward that our users get for producing geographic information. You can not buy Littercoin. You can only earn it by joining the community and helping us collect data. "),e("br"),t._v("Littercoin does not yet have a value, but we are working on it by locking ADA in a smart contract which will give each Littercoin value. Our vision is that your Littercoin can only be spent at participating pre-approved zero-waste stores that partner up. Unlike traditional government money that is printed out of thin-air, Littercoin is a new type of environmental currency that is created by people helping to clean the planet and can be spent in climate-approved stores only. "),e("br"),t._v("Unlike other cryptocurrencies, we are not going to list Littercoin on any exchange, making it non-tradable. The smart contract will be able to verify the integrity of each token, proving it has not been traded or listed on an exchange. "),e("br"),t._v("Cheating the system (‘oh, let me just drop a bunch of litter here and take a lot of photos of it’) is possible, but in reality, nobody does this and the benefits will far outweigh any cheating. There is also so much litter out there that finding it is much easier than carrying it around. We have a system in place that involves reviewing all tags on each image. This is generating high quality data that is being used to train the OpenLitterAI, which will make verification easier. If you really want to cheat the system, you might as well rob a zero-waste store. (Please don’t). ")])]),e("li",[e("input",{attrs:{type:"checkbox",checked:""}}),e("i"),e("h2",[t._v("How can I download the images?")]),e("p",[t._v("This feature is not working properly yet as openlittermap is still in development. Do you think the development of this technology is important? https://gofundme.com/openlittermap ")])]),e("li",[e("input",{attrs:{type:"checkbox",checked:""}}),e("i"),e("h2",[t._v("What’s the use of having an option ‘I did not pick it up’?")]),e("p",[t._v("Isn’t it all about cleaning the earth and picking litter? Good question! Yes, the idea is to make the world a better place, and there are many ways to do that. Most of us pick litter, so right at that moment, a difference is being made, the world is a bit cleaner than before. And we don’t just pick the litter, but we also take a picture to create data about that litter that can be used long after the litter is gone. "),e("br"),t._v("However, there are situatuibs when someone would take a picture without picking the litter: "),e("br"),t._v("  • The litter is too big. You are walking with your dog and picking some litter while doing so, but suddenly you see something that shouldn’t be there but it is too big. (a car-wheel, a broken toilet, etc.). "),e("br"),t._v("  • It’s too dangerous. For instance during Covid, a lot of litter-pickers stopped picking litter like facemasks because of the risk of Covid. However, taking pictures of the facemasks was still possible and welcome. "),e("br"),t._v("  • You believe that leaving the litter where it was found is making a bigger impact. This might also be true. Some people believe that by removing the litter, you are in fact saying ‘dump whatever you want, I’ll come around and pick it up’. Others believe ‘if the place is clean, it will stay clean for a longer period of time. We ourselves don’t believe in either of them. Anyway, if you want to make an impact by not touching the litter, you can still register it. "),e("br"),t._v("   • Someone else can pick it up. Suppose you are in a wheelchair, or late for a meeting. By collecting data, you can create data that other people can respond to. This feature is still in development. "),e("br"),t._v("   • We can also use those pictures to train our Machine Learning model. The more pictures we have from different kinds of litter, the better we can train the computer to recognise the litter; eventually it can help us in predicting what the litter in the picture is and lessen the trouble of you or us having to tag it manually "),e("br"),t._v("   • The data tells an important story. Some people don't want to pick up litter, but they are happy to try and help educate society. We have been picking up litter for decades and its getting worse, so clearly picking up litter alone is not working. If picking up litter is all we do, that is all we will ever do. Collecting data can be a more effective educational tool long-term to fix the problem. ")])]),e("li",[e("input",{attrs:{type:"checkbox",checked:""}}),e("i"),e("h2",[t._v("Taking pictures and tagging them is taking a lot of time, what to do?")]),e("p",[t._v("You could try our ‘bulk-tag’option. You can find this on the add-tags page, or your profile. Here you can see the photos that you uploaded from web that you need to tag. If you have similar photos (for instance all pictures with a redbull-can), you can select all of them and then choose ‘start tagging’, now you only have to give the right tags once and these will be applied to all selected pictures. The pictures that were not selected remain so you could repeat the process if you want to. This tool actually works really good, go check it out! ")])]),e("li",[e("input",{attrs:{type:"checkbox",checked:""}}),e("i"),e("h2",[t._v("What kind of pictures should I take?")]),e("p",[e("br"),t._v("  • This is entirely up to you and depends on what kind of story you want to take. "),e("br"),t._v("  • If you want, you can add 1 tag to each photo. "),e("br"),t._v("  • Or, you can include many objects in a single photo. "),e("br"),t._v("  • If its not possible to count the litter, you can use the Dumping category (small, medium, large) and pick a number between 0-100 depending on how bad you think the problem is. "),e("br"),t._v("  • When possible, hold your camera as close to the item as possible. "),e("br"),t._v("  • If there is a brand on the item, make sure that is also visible in the picture. "),e("br"),t._v("  • Don't include people, faces, shadows, feet, or clothes. Please take photos of litter ONLY. With these guidelines, you can help us create an excellent quality datasetset and you will make life easier for those who need to help verify the data. However, there are situations where this is not possible. For instance, you see something floating in the water and are not able to pick it, or turn it to see if there is a brand on it, or to zoom in. That’s okay, it is still valuable data and we welcome your contribution. "),e("br"),t._v("Do I have to take 1 photo per item? "),e("br"),t._v("  • No, you don’t. You can take 1 photo, apply a tag of cigarette butts tag with a quantity of 50. "),e("br"),t._v("And if I find different objects close together, do i have to sort those first? "),e("br"),t._v("  • Some people do this, but its not necessary. It all depends what kind of story you want to tell. "),e("br"),t._v("So do whatever you prefer, but do try and help us build a high quality database! ")])]),e("li",[e("input",{attrs:{type:"checkbox",checked:""}}),e("i"),e("h2",[t._v("How to tag correctly?")]),e("p",[t._v(" There is no single method to tag pictures, all data is valuable. It is also 'your story' to tell. However, you should try to tell what kind of item it is (it should be available under some category, and only if it is not, use 'other') and if possible add the brand as well (if the brand is not available yet, you could use the custom tags input). But try to use the pre-defined tags as much as possible. "),e("br"),t._v("If possible, tag the ‘worst’ material. So an item with both plastic and paper, tag as plastic. "),e("br"),e("br"),t._v("Some examples: "),e("br"),t._v("red bull can → 2 tags: ‘the object’ (look for the best ‘can’ that you can find) + brand "),e("br"),t._v("Soda can with a brand that we don’t have yet → 1 predefined tag (can) + 1 customtag:somebrandname "),e("br"),t._v("If you have found an energy-can, only give 1 tag for the item: so don’t tag it as ‘can’ and ‘energycan’, but just as an energycan "),e("br"),e("br"),t._v("Multiple litter items in a photo can be tagged with appropriate counts applied. A photo can contain a mixture of beer bottles, beer cans, plastic cups, or any number of recognized category items. Multiple recognized brands and their counts can also be applied. ")])])])])}],s=a(i,n,r,!1,null,"a00c8460");const c=s.exports;export{c as default}; +import{n as a}from"./app-BwSojYvl.js";/* empty css */const i={name:"FAQ",mounted(){window.scrollTo(0,0)}};var n=function(){var e=this,o=e._self._c;return o("section",{staticClass:"hero section-faq"},[o("div",{staticClass:"hero-body"},[o("div",{staticClass:"py-2 mb-6"},[o("div",{staticClass:"title has-text-light has-text-centered"},[e._v(" "+e._s(e.$t("common.faq"))+" ")])]),e._m(0)])])},r=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"faq"},[e("ul",[e("li",[e("input",{attrs:{type:"checkbox",checked:""}}),e("i"),e("h2",[t._v("What is OpenLitterMap?")]),e("p",[t._v("OpenLitterMap is an open source, interactive, and accessible databsase of the world's litter & plastic pollution. We are turning cleaning the planet into a game, to make it fun and easy to collect data. This data is important to give visibility to litter, and help find solutions like where to put bins, ashtrays & more. ")])]),e("li",[e("input",{attrs:{type:"checkbox",checked:""}}),e("i"),e("h2",[t._v("Why is it called OpenLitterMap?")]),e("p",[t._v(` "Open" - because all of our code & data is open source. This means that anyone can access the code, learn from it, improvee it, or use it in another project! You don't have to be a developer to appreciate how powerful this is. Open source code can be passed on from generation to generation, who can build on it, learn from it and use it to continue to help improve society for the betterment of humanity. `),e("br"),t._v(" "),e("br"),t._v(" Not only is all of our code open source, which you can find at "),e("a",{attrs:{href:"https://github.com/openlittermap"}},[t._v("https://github.com/openlittermap")]),t._v(" but all of our data is also openly available for anyone to download and start using. This is in contrast to many other apps, who do not open up access to their code and data as they are trying to keep it for themselves (booo!!!) "),e("br"),t._v(' "LitterMap" - because we visualise our entire global repository on the global map, which loads all data in 30kb and 33ms (August 2022). '),e("br"),t._v(" The OpenLitterMap name was inspired by "),e("a",{attrs:{href:"https://openstreetmap.org"}},[t._v("OpenStreetMap")]),t._v(" which is the most detailed & comprehensive map of the world ever created by over 2-million volunteers that contiunes to be updated constantly. Unlike other services like Google Maps, which is not open and owned by Google, OpenStreetMap code and data is open to everyone, allowing anyone to be a part of adding, editing or using the code and/or data. Inspired by the open source values of OpenStreetMap, we decided to apply the same open values to litter and plastic pollution. ")])]),e("li",[e("input",{attrs:{type:"checkbox",checked:""}}),e("i"),e("h2",[t._v("How do I take pictures?")]),e("p",[t._v(" Firstly, make sure that your phone has the right settings: "),e("br"),t._v('  • iPhone. Open Settings -> Privacy -> Location. Turn "Camera On While Using". '),e("br"),t._v("  • Android. Open the Camera. "),e("br"),t._v("Go to camera settings => Activate Geotagging. "),e("br"),t._v("Pull down top-menu and Activate GPS "),e("br"),e("br"),t._v("There are different ways to take pictures: "),e("br"),t._v("  • Open your normal camera and use that to take the photos (our preferred way) "),e("br"),t._v("  • Open the app and take pictures from within the app (This is currently disabled.) "),e("br"),e("br"),t._v("There are 2 ways to upload and tag your data. You can use the mobile app, or you can use openlittermap.com and log in there. If you visit the website, you have to upload your images first, then tag them. Some people prefer this way, as you get a full screen, a keyboard, and you can tag many items at once. Other people prefer using the mobile app, where you have to select your images first, tag them, and upload the tagged ones. "),e("br"),t._v("Check your setting: do you normally pick up the litter or not? "),e("br"),t._v("If you want to take pictures without draining your battery, it is okay to put it in flight-mode! To determine your location, you need the GPS sensor in your device to connect to a location-tracking satellite, not your cellular or wifi network. You can collect geospatial data anywhere, without needing a connection to anything else. This means that it works in the most remote parts of the world, but you need to connect to the internet if you want to upload your data. ")])]),e("li",[e("input",{attrs:{type:"checkbox",checked:""}}),e("i"),e("h2",[t._v("What is Littercoin?")]),e("p",[t._v("Littercoin is the reward that our users get for producing geographic information. You can not buy Littercoin. You can only earn it by joining the community and helping us collect data. "),e("br"),t._v("Littercoin does not yet have a value, but we are working on it by locking ADA in a smart contract which will give each Littercoin value. Our vision is that your Littercoin can only be spent at participating pre-approved zero-waste stores that partner up. Unlike traditional government money that is printed out of thin-air, Littercoin is a new type of environmental currency that is created by people helping to clean the planet and can be spent in climate-approved stores only. "),e("br"),t._v("Unlike other cryptocurrencies, we are not going to list Littercoin on any exchange, making it non-tradable. The smart contract will be able to verify the integrity of each token, proving it has not been traded or listed on an exchange. "),e("br"),t._v("Cheating the system (‘oh, let me just drop a bunch of litter here and take a lot of photos of it’) is possible, but in reality, nobody does this and the benefits will far outweigh any cheating. There is also so much litter out there that finding it is much easier than carrying it around. We have a system in place that involves reviewing all tags on each image. This is generating high quality data that is being used to train the OpenLitterAI, which will make verification easier. If you really want to cheat the system, you might as well rob a zero-waste store. (Please don’t). ")])]),e("li",[e("input",{attrs:{type:"checkbox",checked:""}}),e("i"),e("h2",[t._v("How can I download the images?")]),e("p",[t._v("This feature is not working properly yet as openlittermap is still in development. Do you think the development of this technology is important? https://gofundme.com/openlittermap ")])]),e("li",[e("input",{attrs:{type:"checkbox",checked:""}}),e("i"),e("h2",[t._v("What’s the use of having an option ‘I did not pick it up’?")]),e("p",[t._v("Isn’t it all about cleaning the earth and picking litter? Good question! Yes, the idea is to make the world a better place, and there are many ways to do that. Most of us pick litter, so right at that moment, a difference is being made, the world is a bit cleaner than before. And we don’t just pick the litter, but we also take a picture to create data about that litter that can be used long after the litter is gone. "),e("br"),t._v("However, there are situatuibs when someone would take a picture without picking the litter: "),e("br"),t._v("  • The litter is too big. You are walking with your dog and picking some litter while doing so, but suddenly you see something that shouldn’t be there but it is too big. (a car-wheel, a broken toilet, etc.). "),e("br"),t._v("  • It’s too dangerous. For instance during Covid, a lot of litter-pickers stopped picking litter like facemasks because of the risk of Covid. However, taking pictures of the facemasks was still possible and welcome. "),e("br"),t._v("  • You believe that leaving the litter where it was found is making a bigger impact. This might also be true. Some people believe that by removing the litter, you are in fact saying ‘dump whatever you want, I’ll come around and pick it up’. Others believe ‘if the place is clean, it will stay clean for a longer period of time. We ourselves don’t believe in either of them. Anyway, if you want to make an impact by not touching the litter, you can still register it. "),e("br"),t._v("   • Someone else can pick it up. Suppose you are in a wheelchair, or late for a meeting. By collecting data, you can create data that other people can respond to. This feature is still in development. "),e("br"),t._v("   • We can also use those pictures to train our Machine Learning model. The more pictures we have from different kinds of litter, the better we can train the computer to recognise the litter; eventually it can help us in predicting what the litter in the picture is and lessen the trouble of you or us having to tag it manually "),e("br"),t._v("   • The data tells an important story. Some people don't want to pick up litter, but they are happy to try and help educate society. We have been picking up litter for decades and its getting worse, so clearly picking up litter alone is not working. If picking up litter is all we do, that is all we will ever do. Collecting data can be a more effective educational tool long-term to fix the problem. ")])]),e("li",[e("input",{attrs:{type:"checkbox",checked:""}}),e("i"),e("h2",[t._v("Taking pictures and tagging them is taking a lot of time, what to do?")]),e("p",[t._v("You could try our ‘bulk-tag’option. You can find this on the add-tags page, or your profile. Here you can see the photos that you uploaded from web that you need to tag. If you have similar photos (for instance all pictures with a redbull-can), you can select all of them and then choose ‘start tagging’, now you only have to give the right tags once and these will be applied to all selected pictures. The pictures that were not selected remain so you could repeat the process if you want to. This tool actually works really good, go check it out! ")])]),e("li",[e("input",{attrs:{type:"checkbox",checked:""}}),e("i"),e("h2",[t._v("What kind of pictures should I take?")]),e("p",[e("br"),t._v("  • This is entirely up to you and depends on what kind of story you want to take. "),e("br"),t._v("  • If you want, you can add 1 tag to each photo. "),e("br"),t._v("  • Or, you can include many objects in a single photo. "),e("br"),t._v("  • If its not possible to count the litter, you can use the Dumping category (small, medium, large) and pick a number between 0-100 depending on how bad you think the problem is. "),e("br"),t._v("  • When possible, hold your camera as close to the item as possible. "),e("br"),t._v("  • If there is a brand on the item, make sure that is also visible in the picture. "),e("br"),t._v("  • Don't include people, faces, shadows, feet, or clothes. Please take photos of litter ONLY. With these guidelines, you can help us create an excellent quality datasetset and you will make life easier for those who need to help verify the data. However, there are situations where this is not possible. For instance, you see something floating in the water and are not able to pick it, or turn it to see if there is a brand on it, or to zoom in. That’s okay, it is still valuable data and we welcome your contribution. "),e("br"),t._v("Do I have to take 1 photo per item? "),e("br"),t._v("  • No, you don’t. You can take 1 photo, apply a tag of cigarette butts tag with a quantity of 50. "),e("br"),t._v("And if I find different objects close together, do i have to sort those first? "),e("br"),t._v("  • Some people do this, but its not necessary. It all depends what kind of story you want to tell. "),e("br"),t._v("So do whatever you prefer, but do try and help us build a high quality database! ")])]),e("li",[e("input",{attrs:{type:"checkbox",checked:""}}),e("i"),e("h2",[t._v("How to tag correctly?")]),e("p",[t._v(" There is no single method to tag pictures, all data is valuable. It is also 'your story' to tell. However, you should try to tell what kind of item it is (it should be available under some category, and only if it is not, use 'other') and if possible add the brand as well (if the brand is not available yet, you could use the custom tags input). But try to use the pre-defined tags as much as possible. "),e("br"),t._v("If possible, tag the ‘worst’ material. So an item with both plastic and paper, tag as plastic. "),e("br"),e("br"),t._v("Some examples: "),e("br"),t._v("red bull can → 2 tags: ‘the object’ (look for the best ‘can’ that you can find) + brand "),e("br"),t._v("Soda can with a brand that we don’t have yet → 1 predefined tag (can) + 1 customtag:somebrandname "),e("br"),t._v("If you have found an energy-can, only give 1 tag for the item: so don’t tag it as ‘can’ and ‘energycan’, but just as an energycan "),e("br"),e("br"),t._v("Multiple litter items in a photo can be tagged with appropriate counts applied. A photo can contain a mixture of beer bottles, beer cans, plastic cups, or any number of recognized category items. Multiple recognized brands and their counts can also be applied. ")])])])])}],s=a(i,n,r,!1,null,"a00c8460");const c=s.exports;export{c as default}; diff --git a/public/build/assets/FunctionalCalendar-D8S_iHDa.js b/public/build/assets/FunctionalCalendar-zzBz_PQP.js similarity index 99% rename from public/build/assets/FunctionalCalendar-D8S_iHDa.js rename to public/build/assets/FunctionalCalendar-zzBz_PQP.js index 609e27c4..1a603955 100644 --- a/public/build/assets/FunctionalCalendar-D8S_iHDa.js +++ b/public/build/assets/FunctionalCalendar-zzBz_PQP.js @@ -1,4 +1,4 @@ -import{n as p}from"./app-DuS6KM7M.js";Date.prototype.getWeekNumber=function(t){if(!t){let a=(this.getDay()+6)%7;this.setDate(this.getDate()-a+3)}let e=new Date(this.getFullYear(),0,4);return Math.ceil(((this-e)/864e5+e.getDay()+1)/7)};class C{constructor(e,a,i,s){this.sundayStart=e,this.leftAndRightDays=a,this.dateFormat=i,this.dayNames=s}formatDate(e){let a=e.getDate(),i=e.getMonth()+1,s=e.getFullYear(),n=this.dateFormat.replace("dd",a.toString());return n=n.replace("mm",i.toString()),n=n.replace("yyyy",s.toString()),n.split(" ")[0]}getDateFromFormat(e){let a=this.dateFormat.split(" ")[0];if(e=e.split(" ")[0],a.indexOf("/")!==-1)a=a.split("/"),e=e.split("/");else if(a.indexOf("-")!==-1)a=a.split("-"),e=e.split("-");else if(a.indexOf(".")!==-1)a=a.split("."),e=e.split(".");else throw new Error("Your date format not valid. Please read documentation.!");let i=a.indexOf("yyyy"),s=a.indexOf("mm"),n=a.indexOf("dd");return new Date(e[i],e[s]-1,e[n])}checkValidDate(e){return e=this.getDateFromFormat(e),e!="Invalid Date"}getWeeksInMonth(e,a){let i=[],s=new Date(a,e,1),n=new Date(a,e+1,0),r=n.getDate(),l=1,o=this.sundayStart?7-s.getDay():s.getDay()===0?1:7-s.getDay()+1;for(;l<=r;)i.push({year:a,start:l,end:o,number:new Date(a,e,l).getWeekNumber(this.sundayStart),days:[]}),l=o+1,o=o+7,o>r&&(o=r);return{weeks:i,month:n.getMonth(),year:n.getFullYear()}}getLeftMonthDays(e,a){let s=this.getWeeksInMonth(e,a).weeks[0],n=s.end-s.start+1,r=[],l=0,o=0;if(n!==7){let d=this.getWeeksInMonth(e-1,a),f=d.weeks[d.weeks.length-1];for(let h=f.start;h<=f.end;h++)r.push(h);o=d.month,l=d.year}return{days:r.reverse(),month:o,year:l}}getRightMonthDays(e,a){let i=this.getWeeksInMonth(e,a),s=i.weeks[i.weeks.length-1],n=s.end-s.start+1,r=[],l=0,o=0;if(n!==7){let d=this.getWeeksInMonth(e+1,a),f=d.weeks[0];for(let h=f.start;h<=f.end;h++)r.push(h);o=d.month,l=d.year}return{days:r,month:o,year:l}}getFinalizedWeeks(e,a){let i=this.getWeeksInMonth(e,a),s=this.getLeftMonthDays(e,a),n=this.getRightMonthDays(e,a);return i.weeks.forEach(r=>{for(let l=r.start;l<=r.end;l++)r.days.push({day:l,month:i.month,year:i.year,hide:!1,hideLeftAndRightDays:!1})}),s.days.length&&s.days.forEach(r=>{let l=!1;this.leftAndRightDays||(r="",l=!0),i.weeks[0].days.unshift({day:r,month:s.month,year:s.year,hide:!0,hideLeftAndRightDays:l})}),n.days.length&&n.days.forEach(r=>{let l=!1;this.leftAndRightDays||(r="",l=!0),i.weeks[i.weeks.length-1].days.push({day:r,month:n.month,year:n.year,hide:!0,hideLeftAndRightDays:l})}),i.weeks.forEach(r=>{delete r.year}),i.weeks}mask(e){let a=this.getDateFromFormat(e).getDate().toString().length,i=this.getDateFromFormat(e).getMonth(),s="00";a===1&&(s="0");let n="00";i+1<=9&&(n="0");let r=this.dateFormat.replace("dd",s).replace("mm",n).replace("yyyy","0000"),l=/[0\*]/,o=/[0-9]/,d="";for(let f=0,h=0;h=e.length||r[h]==="0"&&e[f].match(o)==null);){for(;r[h].match(l)==null&&e[f]!==r[h];)d+=r[h++];d+=e[f++],h++}return d}}const m=()=>{},y={props:{activeHours:{type:Array,required:!1},activeMinutes:{type:Array,required:!1},borderColor:{type:String,default:""},displayTimeInput:{type:Boolean,default:!1},configs:{type:Object,default:()=>{}},sundayStart:{type:Boolean,default:m},placeholder:{type:[String,Boolean],default:m},dateFormat:{type:String,validator(t){let e=t.split(" ")[1];return e?!!~["HH:MM","HH:mm","hh:MM","hh:mm"].indexOf(e):!0}},canClearRange:{type:Boolean,default:!1},isMultiple:{type:Boolean,default:m},isSeparately:{type:Boolean,default:m},isDatePicker:{type:Boolean,default:m},isMultipleDatePicker:{type:Boolean,default:m},isMultipleDateRange:{type:Boolean,default:m},isDateRange:{type:Boolean,default:m},withTimePicker:{type:Boolean,default:m},calendarsCount:{type:Number},isModal:{type:Boolean,default:m},isTypeable:{type:Boolean,default:m},changeMonthFunction:{type:Boolean,default:m},changeYearFunction:{type:Boolean,default:m},changeYearStep:{type:Number,default:()=>3},changeMonthStep:{type:Number,default:()=>1},newCurrentDate:{type:Date},markedDates:{type:Array,default:()=>[]},markedDateRange:{type:[Object,Array]},disabledDayNames:{type:Array},disabledDates:{type:Array,default:()=>[]},enabledDates:{type:Array,default:()=>[]},limits:{type:[Object,Boolean],default:m},minSelDays:{type:[Number,Boolean],default:m},maxSelDays:{type:[Number,Boolean],default:m},dayNames:{type:Array},monthNames:{type:Array},shortMonthNames:{type:Array},showWeekNumbers:{type:Boolean,default:m},value:{type:Object},transition:{type:Boolean,default:m},hiddenElements:{type:Array},isAutoCloseable:{type:Boolean,default:void 0},isDark:{type:Boolean,default:void 0},isLayoutExpandable:{type:Boolean,default:void 0},titlePosition:{type:String,default:"center"},arrowsPosition:{type:String,default:"space-between"},alwaysUseDefaultClasses:{type:Boolean,default:!1}},data(){return{popoverElement:"",defaultDateFormat:{date:!1,dateTime:!1,hour:"00",minute:"00"},hoveredObject:null,calendar:{currentDate:new Date,selectedDate:!1,selectedDateTime:!1,selectedHour:"00",selectedMinute:"00",selectedDatesItem:"",selectedDates:[],dateRange:{start:"",end:""},multipleDateRange:[]},transitionPrefix:"left",showCalendar:!0,showMonthPicker:!1,showYearPicker:!1,showTimePicker:!1,allowPreDate:!0,allowNextDate:!0,listCalendars:[],fConfigs:{sundayStart:!1,placeholder:!1,dateFormat:"dd/mm/yyyy hh:MM",isMultipleDateRange:!1,isDatePicker:!1,isMultipleDatePicker:!1,isDateRange:!1,withTimePicker:!1,isMultiple:!1,calendarsCount:1,isSeparately:!1,isModal:!1,isTypeable:!1,changeMonthFunction:!1,changeYearFunction:!1,changeYearStep:3,changeMonthStep:1,markedDates:[],markedDateRange:{start:!1,end:!1},limits:!1,minSelDays:!1,maxSelDays:!1,disabledDates:[],enabledDates:[],disabledDayNames:[],dayNames:["Mo","Tu","We","Th","Fr","Sa","Su"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],showWeekNumbers:!1,transition:!0,hiddenElements:[],isAutoCloseable:!1,isDark:!1,isLayoutExpandable:!1,titlePosition:"center",arrowsPosition:"space-between"}}}},k={name:"TimePicker",data(){return{startDateActive:!0,currentSelectedDate:""}},props:{height:{type:Number,required:!0},hours:{type:Array,default:function(){return[...Array(24).keys()]},required:!1},minutes:{type:Array,default:function(){return[...Array(60).keys()]},required:!1}},watch:{startDateActive:function(){this.setScrollPosition()}},computed:{getCurrentDate(){return this.currentSelectedDate.date},getCurrentDateTime(){return this.currentSelectedDate.dateTime}},created(){let t=this.$parent.calendar.selectedDates;this.currentSelectedDate=t[t.length-1]},mounted(){let t=this.$parent.calendar.dateRange.start.split(" ")[0],e=this.$parent.calendar.dateRange.end.split(" ")[0];t&&this.$parent.helpCalendar.getDateFromFormat(t)a.date===this.getCurrentDate);e.hour=t}else this.$parent.calendar.selectedHour=t;this.setSelectedDateTime(),this.setScrollPosition()},changeMinute(t){if(this.$parent.fConfigs.isDateRange)this.checkStartDate()?this.$parent.calendar.dateRange.start=this.addMinuteHour("minute",this.$parent.calendar.dateRange.start,t):this.$parent.calendar.dateRange.end=this.addMinuteHour("minute",this.$parent.calendar.dateRange.end,t);else if(this.$parent.fConfigs.isMultipleDatePicker){let e=this.$parent.calendar.selectedDates.find(a=>a.date===this.getCurrentDate);e.minute=t}else this.$parent.calendar.selectedMinute=t;this.setSelectedDateTime(),this.setScrollPosition()},setSelectedDateTime(){if(this.$parent.fConfigs.isDatePicker)this.$parent.calendar.selectedDateTime=this.$parent.calendar.selectedDate+" "+this.$parent.calendar.selectedHour+":"+this.$parent.calendar.selectedMinute;else if(this.$parent.fConfigs.isMultipleDatePicker){let t=this.$parent.calendar.selectedDates.find(e=>e.date===this.getCurrentDate);t.dateTime=t.date+" "+t.hour+":"+t.minute}},checkStartDate(){return this.startDateActive},checkHourActiveClass(t){let e;return this.$parent.fConfigs.isDateRange?this.checkStartDate()?e=this.$parent.calendar.dateRange.start.split(" ")[1].split(":")[0]:e=this.$parent.calendar.dateRange.end.split(" ")[1].split(":")[0]:this.$parent.fConfigs.isMultipleDatePicker?e=this.$parent.calendar.selectedDates.find(a=>a.date===this.getCurrentDate).hour:e=this.$parent.calendar.selectedHour,this.hours.length&&!this.hours.some(a=>a==e)&&(e=this.hours[0]),e==this.formatTime(t)},checkMinuteActiveClass(t){let e;return this.$parent.fConfigs.isDateRange?this.checkStartDate()?e=this.$parent.calendar.dateRange.start.split(":")[1]:e=this.$parent.calendar.dateRange.end.split(":")[1]:this.$parent.fConfigs.isMultipleDatePicker?e=this.$parent.calendar.selectedDates.find(a=>a.date===this.getCurrentDate).minute:e=this.$parent.calendar.selectedMinute,this.minutes.length&&!this.minutes.some(a=>a==e)&&(e=this.minutes[0]),e==this.formatTime(t)},setStyles(){this.setScrollPosition();let t=+this.height-35-85;document.getElementsByClassName("vfc-time-picker__list")[0].style.height=t+"px",document.getElementsByClassName("vfc-time-picker__list")[1].style.height=t+"px"},setScrollPosition(){let t=this.$parent.$refs.mainContainer;this.$nextTick(function(){const e=this.$refs.hourList.querySelector(".vfc-time-picker__item--selected"),a=this.$refs.minuteList.querySelector(".vfc-time-picker__item--selected");this.$refs.hourList.scrollTop=e?e.offsetTop-t.clientHeight/2:0,this.$refs.minuteList.scrollTop=a?a.offsetTop-t.clientHeight/2:0})}}};var v=function(){var e=this,a=e._self._c;return a("div",{staticClass:"vfc-time-picker-container"},[a("div",{staticClass:"vfc-close",on:{click:function(i){return e.close()}}}),a("div",{staticClass:"vfc-modal-time-mechanic"},[a("div",{staticClass:"vfc-modal-time-line",attrs:{id:"time-line"}},[a("span",[e.$parent.fConfigs.isDateRange?[a("span",{class:{"vfc-active":e.startDateActive},on:{click:function(i){e.startDateActive=!0}}},[e._v(e._s(e.$parent.calendar.dateRange.start))]),e.$parent.calendar.dateRange.end?[a("span",[e._v("-")]),a("span",{class:{"vfc-active":!e.startDateActive},on:{click:function(i){e.startDateActive=!1}}},[e._v(e._s(e.$parent.calendar.dateRange.end))])]:e._e()]:e.$parent.fConfigs.isMultipleDatePicker?[e._v(e._s(e.getCurrentDateTime))]:[e._v(e._s(e.$parent.calendar.selectedDateTime))]],2)]),e._m(0),a("div",{staticClass:"vfc-time-picker"},[a("div",{ref:"hourList",staticClass:"vfc-time-picker__list vfc-time-picker__list--hours"},e._l(e.hours,function(i){return a("div",{key:i,staticClass:"vfc-time-picker__item",class:{"vfc-time-picker__item--selected":e.checkHourActiveClass(i)},on:{click:function(s){e.changeHour(e.formatTime(i))}}},[e._v(" "+e._s(e.formatTime(i))+" ")])}),0),a("div",{ref:"minuteList",staticClass:"vfc-time-picker__list vfc-time-picker__list--minutes"},e._l(e.minutes,function(i){return a("div",{key:i,staticClass:"vfc-time-picker__item",class:{"vfc-time-picker__item--selected":e.checkMinuteActiveClass(i)},on:{click:function(s){e.changeMinute(e.formatTime(i))}}},[e._v(" "+e._s(e.formatTime(i))+" ")])}),0)])])])},w=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"titles"},[e("div",[t._v("Hour")]),e("div",[t._v("Minute")])])}],R=p(k,v,w,!1,null,"10658a87");const M=R.exports,_={name:"Arrows",props:{fConfigs:{type:Object,required:!0},allowPreDate:{type:Boolean,required:!0},allowNextDate:{type:Boolean,required:!0},calendarKey:{type:Number,default:0},isMultiple:{type:Boolean,required:!0}},computed:{oneArrows(){return!this.fConfigs.isSeparately&&!this.isMultiple},manyArrows(){return this.fConfigs.isSeparately&&this.isMultiple}}};var F=function(){var e=this,a=e._self._c;return a("div",[e.oneArrows||e.manyArrows?a("div",{staticClass:"vfc-separately-navigation-buttons",class:"vfc-"+e.fConfigs.arrowsPosition},[a("div",{class:{"vfc-cursor-pointer":e.allowPreDate},on:{click:function(i){return e.$parent.PreMonth(e.oneArrows?0:e.calendarKey)}}},[e._t("navigationArrowLeft",function(){return[a("div",{staticClass:"vfc-arrow-left",class:{"vfc-disabled":!e.allowPreDate}})]})],2),a("div",{class:{"vfc-cursor-pointer":e.allowNextDate},on:{click:function(i){return e.$parent.NextMonth(e.oneArrows?0:e.calendarKey)}}},[e._t("navigationArrowRight",function(){return[a("div",{staticClass:"vfc-arrow-right",class:{"vfc-disabled":!e.allowNextDate}})]})],2)]):e._e()])},T=[],S=p(_,F,T,!1,null,null);const $=S.exports,P={name:"WeekNumbers",props:{number:{tyoe:Number,required:!0},borderColor:{type:String,default:""}}};var b=function(){var e=this,a=e._self._c;return a("div",{staticClass:"vfc-day vfc-week-number",style:{borderRightColor:e.borderColor}},[a("span",{staticClass:"vfc-span-day"},[e._v(e._s(e.number))])])},x=[],A=p(P,b,x,!1,null,"334cd43d");const N=A.exports,Y={name:"Day",props:{day_key:{type:Number,required:!0},week:{type:Object,required:!0},day:{type:Object,required:!0},helpCalendar:{type:Object,required:!0},fConfigs:{type:Object,required:!0},calendar:{type:Object,required:!0},alwaysUseDefaultClasses:{type:Boolean,default:!1}},data(){return{toolTip:!1,onNumber:!1}},computed:{startActive(){if(!this.fConfigs.isMultipleDateRange)return(this.day.isDateRangeStart||this.day.isMouseToLeft)&&!this.day.hideLeftAndRightDays;"".inRange||this.inRangeInit();const t=this.day.date.inRange(this.calendar.multipleDateRange),e=this.calendar.multipleDateRange[this.calendar.multipleDateRange.length-1];if(!e)return t;const a=~this.calendar.multipleDateRange.map(s=>s.start).indexOf(this.day.date),i=~this.calendar.multipleDateRange.map(s=>s.end).indexOf(this.day.date);return a===i&&i?t:a&&~a>-1&&this.calendar.multipleDateRange[~a].end||!e.start&&!e.end?a||t:(this.day.isDateRangeStart||this.day.isMouseToLeft)&&!this.day.hideLeftAndRightDays||t},endActive(){if(!this.fConfigs.isMultipleDateRange)return(this.day.isDateRangeEnd||this.day.isMouseToRight)&&!this.day.hideLeftAndRightDays;"".inRange||this.inRangeInit();const t=this.day.date.inRange(this.calendar.multipleDateRange),e=this.calendar.multipleDateRange[this.calendar.multipleDateRange.length-1];if(!e)return t;const a=~this.calendar.multipleDateRange.map(s=>s.start).indexOf(this.day.date),i=~this.calendar.multipleDateRange.map(s=>s.end).indexOf(this.day.date);return a===i&&i?t:i?!0:!e.start&&!e.end?e.start===e.end?!1:i:(this.day.isDateRangeEnd||this.day.isMouseToRight)&&!this.day.hideLeftAndRightDays||t},numberShow(){return this.fConfigs.isMultipleDateRange?!!(~this.calendar.multipleDateRange.map(e=>e.end).indexOf(this.day.date)||~this.calendar.multipleDateRange.map(e=>e.start).indexOf(this.day.date)):!1},timesShow(){let t=this.calendar.multipleDateRange?~this.calendar.multipleDateRange.map(e=>e.end).indexOf(this.day.date):-1;return this.fConfigs.isMultipleDateRange&&t},getDaysNumber(){const t=this.calendar.multipleDateRange.map(s=>s.end).indexOf(this.day.date),e=this.calendar.multipleDateRange.map(s=>s.start).indexOf(this.day.date),a=this.calendar.multipleDateRange.map(s=>s.end).lastIndexOf(this.day.date),i=this.calendar.multipleDateRange.map(s=>s.start).lastIndexOf(this.day.date);return this.toolTip=t!==a||e!==i||t>-1&&e>-1||e>-1&&t>-1,this.toolTip?"·":(t>-1?Number(t):0)||e}},methods:{toolTipTxt(){const t=[],e=this.calendar.multipleDateRange.map(r=>r.end),a=this.calendar.multipleDateRange.map(r=>r.start);let i=0,s=0,n=e.indexOf(this.day.date,i);for(;~e.indexOf(this.day.date,i);)n=e.indexOf(this.day.date,i),t.push(n),i=n+1;for(n=a.indexOf(this.day.date,s);~a.indexOf(this.day.date,s);)n=a.indexOf(this.day.date,s),t.push(n),s=n+1;return t.sort((r,l)=>r-l)},inRangeInit(){//!!!!\\ +import{n as p}from"./app-BwSojYvl.js";Date.prototype.getWeekNumber=function(t){if(!t){let a=(this.getDay()+6)%7;this.setDate(this.getDate()-a+3)}let e=new Date(this.getFullYear(),0,4);return Math.ceil(((this-e)/864e5+e.getDay()+1)/7)};class C{constructor(e,a,i,s){this.sundayStart=e,this.leftAndRightDays=a,this.dateFormat=i,this.dayNames=s}formatDate(e){let a=e.getDate(),i=e.getMonth()+1,s=e.getFullYear(),n=this.dateFormat.replace("dd",a.toString());return n=n.replace("mm",i.toString()),n=n.replace("yyyy",s.toString()),n.split(" ")[0]}getDateFromFormat(e){let a=this.dateFormat.split(" ")[0];if(e=e.split(" ")[0],a.indexOf("/")!==-1)a=a.split("/"),e=e.split("/");else if(a.indexOf("-")!==-1)a=a.split("-"),e=e.split("-");else if(a.indexOf(".")!==-1)a=a.split("."),e=e.split(".");else throw new Error("Your date format not valid. Please read documentation.!");let i=a.indexOf("yyyy"),s=a.indexOf("mm"),n=a.indexOf("dd");return new Date(e[i],e[s]-1,e[n])}checkValidDate(e){return e=this.getDateFromFormat(e),e!="Invalid Date"}getWeeksInMonth(e,a){let i=[],s=new Date(a,e,1),n=new Date(a,e+1,0),r=n.getDate(),l=1,o=this.sundayStart?7-s.getDay():s.getDay()===0?1:7-s.getDay()+1;for(;l<=r;)i.push({year:a,start:l,end:o,number:new Date(a,e,l).getWeekNumber(this.sundayStart),days:[]}),l=o+1,o=o+7,o>r&&(o=r);return{weeks:i,month:n.getMonth(),year:n.getFullYear()}}getLeftMonthDays(e,a){let s=this.getWeeksInMonth(e,a).weeks[0],n=s.end-s.start+1,r=[],l=0,o=0;if(n!==7){let d=this.getWeeksInMonth(e-1,a),f=d.weeks[d.weeks.length-1];for(let h=f.start;h<=f.end;h++)r.push(h);o=d.month,l=d.year}return{days:r.reverse(),month:o,year:l}}getRightMonthDays(e,a){let i=this.getWeeksInMonth(e,a),s=i.weeks[i.weeks.length-1],n=s.end-s.start+1,r=[],l=0,o=0;if(n!==7){let d=this.getWeeksInMonth(e+1,a),f=d.weeks[0];for(let h=f.start;h<=f.end;h++)r.push(h);o=d.month,l=d.year}return{days:r,month:o,year:l}}getFinalizedWeeks(e,a){let i=this.getWeeksInMonth(e,a),s=this.getLeftMonthDays(e,a),n=this.getRightMonthDays(e,a);return i.weeks.forEach(r=>{for(let l=r.start;l<=r.end;l++)r.days.push({day:l,month:i.month,year:i.year,hide:!1,hideLeftAndRightDays:!1})}),s.days.length&&s.days.forEach(r=>{let l=!1;this.leftAndRightDays||(r="",l=!0),i.weeks[0].days.unshift({day:r,month:s.month,year:s.year,hide:!0,hideLeftAndRightDays:l})}),n.days.length&&n.days.forEach(r=>{let l=!1;this.leftAndRightDays||(r="",l=!0),i.weeks[i.weeks.length-1].days.push({day:r,month:n.month,year:n.year,hide:!0,hideLeftAndRightDays:l})}),i.weeks.forEach(r=>{delete r.year}),i.weeks}mask(e){let a=this.getDateFromFormat(e).getDate().toString().length,i=this.getDateFromFormat(e).getMonth(),s="00";a===1&&(s="0");let n="00";i+1<=9&&(n="0");let r=this.dateFormat.replace("dd",s).replace("mm",n).replace("yyyy","0000"),l=/[0\*]/,o=/[0-9]/,d="";for(let f=0,h=0;h=e.length||r[h]==="0"&&e[f].match(o)==null);){for(;r[h].match(l)==null&&e[f]!==r[h];)d+=r[h++];d+=e[f++],h++}return d}}const m=()=>{},y={props:{activeHours:{type:Array,required:!1},activeMinutes:{type:Array,required:!1},borderColor:{type:String,default:""},displayTimeInput:{type:Boolean,default:!1},configs:{type:Object,default:()=>{}},sundayStart:{type:Boolean,default:m},placeholder:{type:[String,Boolean],default:m},dateFormat:{type:String,validator(t){let e=t.split(" ")[1];return e?!!~["HH:MM","HH:mm","hh:MM","hh:mm"].indexOf(e):!0}},canClearRange:{type:Boolean,default:!1},isMultiple:{type:Boolean,default:m},isSeparately:{type:Boolean,default:m},isDatePicker:{type:Boolean,default:m},isMultipleDatePicker:{type:Boolean,default:m},isMultipleDateRange:{type:Boolean,default:m},isDateRange:{type:Boolean,default:m},withTimePicker:{type:Boolean,default:m},calendarsCount:{type:Number},isModal:{type:Boolean,default:m},isTypeable:{type:Boolean,default:m},changeMonthFunction:{type:Boolean,default:m},changeYearFunction:{type:Boolean,default:m},changeYearStep:{type:Number,default:()=>3},changeMonthStep:{type:Number,default:()=>1},newCurrentDate:{type:Date},markedDates:{type:Array,default:()=>[]},markedDateRange:{type:[Object,Array]},disabledDayNames:{type:Array},disabledDates:{type:Array,default:()=>[]},enabledDates:{type:Array,default:()=>[]},limits:{type:[Object,Boolean],default:m},minSelDays:{type:[Number,Boolean],default:m},maxSelDays:{type:[Number,Boolean],default:m},dayNames:{type:Array},monthNames:{type:Array},shortMonthNames:{type:Array},showWeekNumbers:{type:Boolean,default:m},value:{type:Object},transition:{type:Boolean,default:m},hiddenElements:{type:Array},isAutoCloseable:{type:Boolean,default:void 0},isDark:{type:Boolean,default:void 0},isLayoutExpandable:{type:Boolean,default:void 0},titlePosition:{type:String,default:"center"},arrowsPosition:{type:String,default:"space-between"},alwaysUseDefaultClasses:{type:Boolean,default:!1}},data(){return{popoverElement:"",defaultDateFormat:{date:!1,dateTime:!1,hour:"00",minute:"00"},hoveredObject:null,calendar:{currentDate:new Date,selectedDate:!1,selectedDateTime:!1,selectedHour:"00",selectedMinute:"00",selectedDatesItem:"",selectedDates:[],dateRange:{start:"",end:""},multipleDateRange:[]},transitionPrefix:"left",showCalendar:!0,showMonthPicker:!1,showYearPicker:!1,showTimePicker:!1,allowPreDate:!0,allowNextDate:!0,listCalendars:[],fConfigs:{sundayStart:!1,placeholder:!1,dateFormat:"dd/mm/yyyy hh:MM",isMultipleDateRange:!1,isDatePicker:!1,isMultipleDatePicker:!1,isDateRange:!1,withTimePicker:!1,isMultiple:!1,calendarsCount:1,isSeparately:!1,isModal:!1,isTypeable:!1,changeMonthFunction:!1,changeYearFunction:!1,changeYearStep:3,changeMonthStep:1,markedDates:[],markedDateRange:{start:!1,end:!1},limits:!1,minSelDays:!1,maxSelDays:!1,disabledDates:[],enabledDates:[],disabledDayNames:[],dayNames:["Mo","Tu","We","Th","Fr","Sa","Su"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],showWeekNumbers:!1,transition:!0,hiddenElements:[],isAutoCloseable:!1,isDark:!1,isLayoutExpandable:!1,titlePosition:"center",arrowsPosition:"space-between"}}}},k={name:"TimePicker",data(){return{startDateActive:!0,currentSelectedDate:""}},props:{height:{type:Number,required:!0},hours:{type:Array,default:function(){return[...Array(24).keys()]},required:!1},minutes:{type:Array,default:function(){return[...Array(60).keys()]},required:!1}},watch:{startDateActive:function(){this.setScrollPosition()}},computed:{getCurrentDate(){return this.currentSelectedDate.date},getCurrentDateTime(){return this.currentSelectedDate.dateTime}},created(){let t=this.$parent.calendar.selectedDates;this.currentSelectedDate=t[t.length-1]},mounted(){let t=this.$parent.calendar.dateRange.start.split(" ")[0],e=this.$parent.calendar.dateRange.end.split(" ")[0];t&&this.$parent.helpCalendar.getDateFromFormat(t)a.date===this.getCurrentDate);e.hour=t}else this.$parent.calendar.selectedHour=t;this.setSelectedDateTime(),this.setScrollPosition()},changeMinute(t){if(this.$parent.fConfigs.isDateRange)this.checkStartDate()?this.$parent.calendar.dateRange.start=this.addMinuteHour("minute",this.$parent.calendar.dateRange.start,t):this.$parent.calendar.dateRange.end=this.addMinuteHour("minute",this.$parent.calendar.dateRange.end,t);else if(this.$parent.fConfigs.isMultipleDatePicker){let e=this.$parent.calendar.selectedDates.find(a=>a.date===this.getCurrentDate);e.minute=t}else this.$parent.calendar.selectedMinute=t;this.setSelectedDateTime(),this.setScrollPosition()},setSelectedDateTime(){if(this.$parent.fConfigs.isDatePicker)this.$parent.calendar.selectedDateTime=this.$parent.calendar.selectedDate+" "+this.$parent.calendar.selectedHour+":"+this.$parent.calendar.selectedMinute;else if(this.$parent.fConfigs.isMultipleDatePicker){let t=this.$parent.calendar.selectedDates.find(e=>e.date===this.getCurrentDate);t.dateTime=t.date+" "+t.hour+":"+t.minute}},checkStartDate(){return this.startDateActive},checkHourActiveClass(t){let e;return this.$parent.fConfigs.isDateRange?this.checkStartDate()?e=this.$parent.calendar.dateRange.start.split(" ")[1].split(":")[0]:e=this.$parent.calendar.dateRange.end.split(" ")[1].split(":")[0]:this.$parent.fConfigs.isMultipleDatePicker?e=this.$parent.calendar.selectedDates.find(a=>a.date===this.getCurrentDate).hour:e=this.$parent.calendar.selectedHour,this.hours.length&&!this.hours.some(a=>a==e)&&(e=this.hours[0]),e==this.formatTime(t)},checkMinuteActiveClass(t){let e;return this.$parent.fConfigs.isDateRange?this.checkStartDate()?e=this.$parent.calendar.dateRange.start.split(":")[1]:e=this.$parent.calendar.dateRange.end.split(":")[1]:this.$parent.fConfigs.isMultipleDatePicker?e=this.$parent.calendar.selectedDates.find(a=>a.date===this.getCurrentDate).minute:e=this.$parent.calendar.selectedMinute,this.minutes.length&&!this.minutes.some(a=>a==e)&&(e=this.minutes[0]),e==this.formatTime(t)},setStyles(){this.setScrollPosition();let t=+this.height-35-85;document.getElementsByClassName("vfc-time-picker__list")[0].style.height=t+"px",document.getElementsByClassName("vfc-time-picker__list")[1].style.height=t+"px"},setScrollPosition(){let t=this.$parent.$refs.mainContainer;this.$nextTick(function(){const e=this.$refs.hourList.querySelector(".vfc-time-picker__item--selected"),a=this.$refs.minuteList.querySelector(".vfc-time-picker__item--selected");this.$refs.hourList.scrollTop=e?e.offsetTop-t.clientHeight/2:0,this.$refs.minuteList.scrollTop=a?a.offsetTop-t.clientHeight/2:0})}}};var v=function(){var e=this,a=e._self._c;return a("div",{staticClass:"vfc-time-picker-container"},[a("div",{staticClass:"vfc-close",on:{click:function(i){return e.close()}}}),a("div",{staticClass:"vfc-modal-time-mechanic"},[a("div",{staticClass:"vfc-modal-time-line",attrs:{id:"time-line"}},[a("span",[e.$parent.fConfigs.isDateRange?[a("span",{class:{"vfc-active":e.startDateActive},on:{click:function(i){e.startDateActive=!0}}},[e._v(e._s(e.$parent.calendar.dateRange.start))]),e.$parent.calendar.dateRange.end?[a("span",[e._v("-")]),a("span",{class:{"vfc-active":!e.startDateActive},on:{click:function(i){e.startDateActive=!1}}},[e._v(e._s(e.$parent.calendar.dateRange.end))])]:e._e()]:e.$parent.fConfigs.isMultipleDatePicker?[e._v(e._s(e.getCurrentDateTime))]:[e._v(e._s(e.$parent.calendar.selectedDateTime))]],2)]),e._m(0),a("div",{staticClass:"vfc-time-picker"},[a("div",{ref:"hourList",staticClass:"vfc-time-picker__list vfc-time-picker__list--hours"},e._l(e.hours,function(i){return a("div",{key:i,staticClass:"vfc-time-picker__item",class:{"vfc-time-picker__item--selected":e.checkHourActiveClass(i)},on:{click:function(s){e.changeHour(e.formatTime(i))}}},[e._v(" "+e._s(e.formatTime(i))+" ")])}),0),a("div",{ref:"minuteList",staticClass:"vfc-time-picker__list vfc-time-picker__list--minutes"},e._l(e.minutes,function(i){return a("div",{key:i,staticClass:"vfc-time-picker__item",class:{"vfc-time-picker__item--selected":e.checkMinuteActiveClass(i)},on:{click:function(s){e.changeMinute(e.formatTime(i))}}},[e._v(" "+e._s(e.formatTime(i))+" ")])}),0)])])])},w=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"titles"},[e("div",[t._v("Hour")]),e("div",[t._v("Minute")])])}],R=p(k,v,w,!1,null,"10658a87");const M=R.exports,_={name:"Arrows",props:{fConfigs:{type:Object,required:!0},allowPreDate:{type:Boolean,required:!0},allowNextDate:{type:Boolean,required:!0},calendarKey:{type:Number,default:0},isMultiple:{type:Boolean,required:!0}},computed:{oneArrows(){return!this.fConfigs.isSeparately&&!this.isMultiple},manyArrows(){return this.fConfigs.isSeparately&&this.isMultiple}}};var F=function(){var e=this,a=e._self._c;return a("div",[e.oneArrows||e.manyArrows?a("div",{staticClass:"vfc-separately-navigation-buttons",class:"vfc-"+e.fConfigs.arrowsPosition},[a("div",{class:{"vfc-cursor-pointer":e.allowPreDate},on:{click:function(i){return e.$parent.PreMonth(e.oneArrows?0:e.calendarKey)}}},[e._t("navigationArrowLeft",function(){return[a("div",{staticClass:"vfc-arrow-left",class:{"vfc-disabled":!e.allowPreDate}})]})],2),a("div",{class:{"vfc-cursor-pointer":e.allowNextDate},on:{click:function(i){return e.$parent.NextMonth(e.oneArrows?0:e.calendarKey)}}},[e._t("navigationArrowRight",function(){return[a("div",{staticClass:"vfc-arrow-right",class:{"vfc-disabled":!e.allowNextDate}})]})],2)]):e._e()])},T=[],S=p(_,F,T,!1,null,null);const $=S.exports,P={name:"WeekNumbers",props:{number:{tyoe:Number,required:!0},borderColor:{type:String,default:""}}};var b=function(){var e=this,a=e._self._c;return a("div",{staticClass:"vfc-day vfc-week-number",style:{borderRightColor:e.borderColor}},[a("span",{staticClass:"vfc-span-day"},[e._v(e._s(e.number))])])},x=[],A=p(P,b,x,!1,null,"334cd43d");const N=A.exports,Y={name:"Day",props:{day_key:{type:Number,required:!0},week:{type:Object,required:!0},day:{type:Object,required:!0},helpCalendar:{type:Object,required:!0},fConfigs:{type:Object,required:!0},calendar:{type:Object,required:!0},alwaysUseDefaultClasses:{type:Boolean,default:!1}},data(){return{toolTip:!1,onNumber:!1}},computed:{startActive(){if(!this.fConfigs.isMultipleDateRange)return(this.day.isDateRangeStart||this.day.isMouseToLeft)&&!this.day.hideLeftAndRightDays;"".inRange||this.inRangeInit();const t=this.day.date.inRange(this.calendar.multipleDateRange),e=this.calendar.multipleDateRange[this.calendar.multipleDateRange.length-1];if(!e)return t;const a=~this.calendar.multipleDateRange.map(s=>s.start).indexOf(this.day.date),i=~this.calendar.multipleDateRange.map(s=>s.end).indexOf(this.day.date);return a===i&&i?t:a&&~a>-1&&this.calendar.multipleDateRange[~a].end||!e.start&&!e.end?a||t:(this.day.isDateRangeStart||this.day.isMouseToLeft)&&!this.day.hideLeftAndRightDays||t},endActive(){if(!this.fConfigs.isMultipleDateRange)return(this.day.isDateRangeEnd||this.day.isMouseToRight)&&!this.day.hideLeftAndRightDays;"".inRange||this.inRangeInit();const t=this.day.date.inRange(this.calendar.multipleDateRange),e=this.calendar.multipleDateRange[this.calendar.multipleDateRange.length-1];if(!e)return t;const a=~this.calendar.multipleDateRange.map(s=>s.start).indexOf(this.day.date),i=~this.calendar.multipleDateRange.map(s=>s.end).indexOf(this.day.date);return a===i&&i?t:i?!0:!e.start&&!e.end?e.start===e.end?!1:i:(this.day.isDateRangeEnd||this.day.isMouseToRight)&&!this.day.hideLeftAndRightDays||t},numberShow(){return this.fConfigs.isMultipleDateRange?!!(~this.calendar.multipleDateRange.map(e=>e.end).indexOf(this.day.date)||~this.calendar.multipleDateRange.map(e=>e.start).indexOf(this.day.date)):!1},timesShow(){let t=this.calendar.multipleDateRange?~this.calendar.multipleDateRange.map(e=>e.end).indexOf(this.day.date):-1;return this.fConfigs.isMultipleDateRange&&t},getDaysNumber(){const t=this.calendar.multipleDateRange.map(s=>s.end).indexOf(this.day.date),e=this.calendar.multipleDateRange.map(s=>s.start).indexOf(this.day.date),a=this.calendar.multipleDateRange.map(s=>s.end).lastIndexOf(this.day.date),i=this.calendar.multipleDateRange.map(s=>s.start).lastIndexOf(this.day.date);return this.toolTip=t!==a||e!==i||t>-1&&e>-1||e>-1&&t>-1,this.toolTip?"·":(t>-1?Number(t):0)||e}},methods:{toolTipTxt(){const t=[],e=this.calendar.multipleDateRange.map(r=>r.end),a=this.calendar.multipleDateRange.map(r=>r.start);let i=0,s=0,n=e.indexOf(this.day.date,i);for(;~e.indexOf(this.day.date,i);)n=e.indexOf(this.day.date,i),t.push(n),i=n+1;for(n=a.indexOf(this.day.date,s);~a.indexOf(this.day.date,s);)n=a.indexOf(this.day.date,s),t.push(n),s=n+1;return t.sort((r,l)=>r-l)},inRangeInit(){//!!!!\\ const t=this.helpCalendar;String.prototype.inRange=function(e){let a=!1;return e.forEach(i=>{const s=+t.getDateFromFormat(i.start.split(" ")[0]),n=+t.getDateFromFormat(i.end.split(" ")[0]),r=+t.getDateFromFormat(this.split(" ")[0]);s!==n&&s&&n&&(a=a||se.end===this.day.date);this.calendar.multipleDateRange.splice(t,1)},dayMouseOver(){this.$emit("dayMouseOver",this.day.date)},hasSlot(t="default"){return!!this.$parent.$parent.$slots[t]||!!this.$parent.$parent.$scopedSlots[t]},isDisabledDate(t){const e=this.fConfigs.disabledDates;return this.isDateIncludedInDatesCollection(t,e)||!this.isEnabledDate(t)},isEnabledDate(t){const e=this.fConfigs.enabledDates;return!e.length||this.isDateIncludedInDatesCollection(t,e)},isDateIncludedInDatesCollection(t,e){let a=new Date;a.setHours(0,0,0,0);let i=this.helpCalendar.getDateFromFormat(t);return e.includes(t)||e.includes("beforeToday")&&i.getTime()a.getTime()},getClassNames(t){let e=[];(!this.hasSlot("default")||this.alwaysUseDefaultClasses)&&e.push("vfc-span-day");let a=this.helpCalendar.getDateFromFormat(t.date).getDay()-1;a===-1&&(a=6);let i=this.fConfigs.dayNames[a];this.fConfigs.disabledDayNames.includes(i)&&(t.hide=!0,e.push("vfc-cursor-not-allowed"));let s=this.helpCalendar.getDateFromFormat(t.date);if(new Date().setHours(0,0,0,0),this.isDisabledDate(t.date)&&(e.push("vfc-disabled"),e.push("vfc-cursor-not-allowed")),this.fConfigs.limits){let r=this.helpCalendar.getDateFromFormat(this.fConfigs.limits.min).getTime(),l=this.helpCalendar.getDateFromFormat(this.fConfigs.limits.max).getTime();(s.getTime()l)&&(e.push("vfc-disabled"),e.push("vfc-cursor-not-allowed"))}if(t.hide&&e.push("vfc-hide"),t.isToday&&e.push("vfc-today"),!t.hideLeftAndRightDays&&!this.fConfigs.disabledDayNames.includes(i)&&(t.isMarked?e.push("vfc-marked"):t.isHovered&&e.push("vfc-hovered"),this.fConfigs.markedDates.includes(t.date)&&e.push("vfc-borderd"),Array.isArray(this.fConfigs.markedDateRange)?this.fConfigs.markedDateRange.forEach(r=>{this.helpCalendar.getDateFromFormat(r.start)<=this.helpCalendar.getDateFromFormat(t.date)&&this.helpCalendar.getDateFromFormat(r.end)>=this.helpCalendar.getDateFromFormat(t.date)&&e.push("vfc-marked"),t.date===r.start?e.push("vfc-start-marked"):t.date===r.end&&e.push("vfc-end-marked")}):this.fConfigs.markedDateRange.start&&this.fConfigs.markedDateRange.end?(this.helpCalendar.getDateFromFormat(this.fConfigs.markedDateRange.start)<=this.helpCalendar.getDateFromFormat(t.date)&&this.helpCalendar.getDateFromFormat(this.fConfigs.markedDateRange.end)>=this.helpCalendar.getDateFromFormat(t.date)&&e.push("vfc-marked"),t.date===this.fConfigs.markedDateRange.start?e.push("vfc-start-marked"):t.date===this.fConfigs.markedDateRange.end&&e.push("vfc-end-marked")):(this.fConfigs.markedDateRange.start&&this.helpCalendar.getDateFromFormat(this.fConfigs.markedDateRange.start)<=this.helpCalendar.getDateFromFormat(t.date)&&e.push("vfc-marked"),this.fConfigs.markedDateRange.end&&this.helpCalendar.getDateFromFormat(this.fConfigs.markedDateRange.end)>=this.helpCalendar.getDateFromFormat(t.date)&&e.push("vfc-marked")),e.push("vfc-hover")),this.fConfigs.isMultipleDateRange&&("".inRange||this.inRangeInit(),(t.isMarked||~this.calendar.multipleDateRange.map(r=>r.start.split(" ")[0]).indexOf(t.date)||~this.calendar.multipleDateRange.map(r=>r.end.split(" ")[0]).indexOf(t.date)||t.date.inRange(this.calendar.multipleDateRange))&&e.push("vfc-marked"),this.fConfigs.markedDates.includes(t.date)&&e.push("vfc-borderd"),~this.calendar.multipleDateRange.map(r=>r.start.split(" ")[0]).indexOf(t.date)&&e.push("vfc-start-marked"),~this.calendar.multipleDateRange.map(r=>r.end.split(" ")[0]).indexOf(t.date)&&e.push("vfc-end-marked")),typeof this.fConfigs.markedDates=="object"){let r=this.fConfigs.markedDates.find(l=>l.date===t.date);typeof r<"u"&&e.push(r.class)}return t.date===this.calendar.dateRange.start.split(" ")[0]&&e.push("vfc-start-marked"),t.date===this.calendar.dateRange.end.split(" ")[0]&&e.push("vfc-end-marked"),(t.date===this.calendar.selectedDate||this.calendar.hasOwnProperty("selectedDates")&&this.calendar.selectedDates.find(r=>r.date===t.date))&&e.push("vfc-borderd"),e}}};var O=function(){var e=this,a=e._self._c;return a("div",{staticClass:"vfc-day"},[e.startActive?a("div",{staticClass:"vfc-base-start"}):e._e(),e.endActive?a("div",{staticClass:"vfc-base-end"}):e._e(),e.day.hideLeftAndRightDays?e._e():a("span",{class:e.getClassNames(e.day),on:{click:function(i){return i.target!==i.currentTarget?null:e.$parent.$parent.clickDay(e.day,e.isDisabledDate)},mouseover:e.dayMouseOver}},[e._t("default",function(){return[e._v(e._s(e.day.day))]},{week:e.week,day:e.day}),e.timesShow?a("span",{staticClass:"times",on:{click:e.clearRange}},[e._v("×")]):e._e(),e.numberShow?a("span",{staticClass:"number",on:{mouseover:function(i){e.toolTip&&(e.onNumber=!0)},mouseleave:function(i){e.onNumber=!1}}},[e._v(e._s(e.getDaysNumber)+" "),a("div",{directives:[{name:"show",rawName:"v-show",value:e.toolTip&&e.onNumber,expression:"toolTip && onNumber"}],staticClass:"toolTip"},[e._v(" "+e._s(e.toolTipTxt().join(" "))+" ")])]):e._e()],2)])},E=[],L=p(Y,O,E,!1,null,"2af096af");const H=L.exports,I={name:"MonthYearPicker",props:{calendarKey:{type:Number,default:0},changeYearStep:{type:Number,default:3}},data(){return{delta:0}},watch:{delta(t){t<-new Date().getFullYear()&&(this.delta=0)}},methods:{changePicker(t){if(this.$parent.showMonthPicker){t==="right"?this.$parent.NextYear(this.calendarKey):this.$parent.PreYear(this.calendarKey);return}t==="right"?this.delta+=this.changeYearStep:this.delta-=this.changeYearStep}}};var B=function(){var e=this,a=e._self._c;return a("div",{staticClass:"vfc-months-container"},[a("div",{staticClass:"vfc-content vfc-content-MY-picker"},[a("div",{staticClass:"vfc-navigation-buttons"},[a("div",{on:{click:function(i){return e.changePicker("left")}}},[a("div",{staticClass:"vfc-arrow-left"})]),a("h2",{class:["vfc-top-date",e.delta!==0&&"vfc-top-date-has-delta"],on:{click:function(i){e.delta=0}}},[a("span",{staticClass:"vfc-popover-caret"}),e._v(" "+e._s(e.$parent.listCalendars[e.calendarKey].date.getFullYear())+" ")]),a("div",{on:{click:function(i){return e.changePicker("right")}}},[a("div",{staticClass:"vfc-arrow-right"})])]),a("div",{staticClass:"vfc-months"},[e.$parent.showMonthPicker?e._l(e.$parent.fConfigs.shortMonthNames,function(i,s){return a("div",{key:s,staticClass:"vfc-item",class:{"vfc-selected":e.$parent.listCalendars[e.calendarKey].date.getMonth()===s},on:{click:function(n){return e.$parent.pickMonth(s,e.calendarKey)}}},[e._v(" "+e._s(i)+" ")])}):e.$parent.showYearPicker?e._l(e.$parent.getYearList(e.$parent.listCalendars[e.calendarKey].date,e.delta),function(i,s){return a("div",{key:s,staticClass:"vfc-item",class:{"vfc-selected":e.$parent.listCalendars[e.calendarKey].date.getFullYear()===i.year},on:{click:function(n){return e.$parent.pickYear(i.year,e.calendarKey)}}},[e._v(" "+e._s(i.year)+" ")])}):e._e()],2)])])},W=[],q=p(I,B,W,!1,null,"5a5ef54d");const j=q.exports,U={name:"PickerInputs",props:{fConfigs:{type:Object,required:!0},singleSelectedDate:{type:String,required:!0},calendar:{type:Object,required:!0}},computed:{dateRangeSelectedStartDate:{get(){return this.calendar.dateRange.start?this.calendar.dateRange.start:""},set(t){t=this.helpCalendar.mask(t),this.helpCalendar.getDateFromFormat(t).getMonth()&&(this.calendar.dateRange.start=t)}},dateRangeSelectedEndDate:{get(){return this.calendar.dateRange.end?this.calendar.dateRange.end:""},set(t){t=this.helpCalendar.mask(t),this.helpCalendar.getDateFromFormat(t).getMonth()&&(this.calendar.dateRange.end=t)}}}};var J=function(){var e=this,a=e._self._c;return a("div",[e.fConfigs.isModal&&e.fConfigs.isDateRange?a("div",{staticClass:"vfc-multiple-input",class:{"vfc-dark":e.fConfigs.isDark}},[e._t("dateRangeInputs",function(){return[a("input",{directives:[{name:"model",rawName:"v-model",value:e.dateRangeSelectedStartDate,expression:"dateRangeSelectedStartDate"}],attrs:{type:"text",title:"Start Date",placeholder:e.fConfigs.placeholder.split(" ")[0],readonly:!e.fConfigs.isTypeable,maxlength:e.fConfigs.dateFormat.length},domProps:{value:e.dateRangeSelectedStartDate},on:{input:function(i){i.target.composing||(e.dateRangeSelectedStartDate=i.target.value)}}}),a("input",{directives:[{name:"model",rawName:"v-model",value:e.dateRangeSelectedEndDate,expression:"dateRangeSelectedEndDate"}],attrs:{type:"text",title:"End Date",placeholder:e.fConfigs.placeholder.split(" ")[0],readonly:!e.fConfigs.isTypeable,maxlength:e.fConfigs.dateFormat.length},domProps:{value:e.dateRangeSelectedEndDate},on:{input:function(i){i.target.composing||(e.dateRangeSelectedEndDate=i.target.value)}}})]},{startDate:e.dateRangeSelectedStartDate,endDate:e.dateRangeSelectedEndDate,isTypeable:e.fConfigs.isTypeable})],2):e.fConfigs.isModal&&e.fConfigs.isDatePicker?a("div",{class:{"vfc-dark":e.fConfigs.isDark}},[e._t("datePickerInput",function(){return[a("input",{directives:[{name:"model",rawName:"v-model",value:e.singleSelectedDate,expression:"singleSelectedDate"}],staticClass:"vfc-single-input",attrs:{type:"text",title:"Date",placeholder:e.fConfigs.placeholder,readonly:!e.fConfigs.isTypeable,maxlength:e.fConfigs.dateFormat.length},domProps:{value:e.singleSelectedDate},on:{input:function(i){i.target.composing||(e.singleSelectedDate=i.target.value)}}})]},{selectedDate:e.singleSelectedDate,isTypeable:e.fConfigs.isTypeable})],2):e.fConfigs.isModal&&e.fConfigs.isMultipleDatePicker?a("div",{staticClass:"vfc-tags-input-root",class:{"vfc-dark":e.fConfigs.isDark}},[a("div",{staticClass:"vfc-tags-input-wrapper-default vfc-tags-input"},[e._l(e.calendar.selectedDates,function(i,s){return a("span",{key:s,staticClass:"vfc-tags-input-badge vfc-tags-input-badge-pill vfc-tags-input-badge-selected-default"},[a("span",{domProps:{innerHTML:e._s(i.date)}}),a("a",{staticClass:"vfc-tags-input-remove",attrs:{href:"#"},on:{click:function(n){return n.preventDefault(),e.removeFromSelectedDates(s)}}})])}),a("input",{directives:[{name:"model",rawName:"v-model",value:e.calendar.selectedDatesItem,expression:"calendar.selectedDatesItem"}],attrs:{type:"text",placeholder:"Add a date"},domProps:{value:e.calendar.selectedDatesItem},on:{keydown:function(i){return!i.type.indexOf("key")&&e._k(i.keyCode,"enter",13,i.key,"Enter")?null:(i.preventDefault(),e.$parent.addToSelectedDates.apply(null,arguments))},input:function(i){i.target.composing||e.$set(e.calendar,"selectedDatesItem",i.target.value)}}})],2)]):e._e()])},z=[],G=p(U,J,z,!1,null,"d846c6d7");const Q=G.exports,X={name:"Footer"};var Z=function(){var e=this,a=e._self._c;return a("div",{staticClass:"footerCon"},[e._t("cleaner"),e._t("footer")],2)},V=[],K=p(X,Z,V,!1,null,"40e6eac8");const ee=K.exports,te=(t,e)=>!!t&&!!e&&(t===e||t.contains(e)),D=()=>new Date().getUTCMilliseconds(),ae={name:"FunctionalCalendar",components:{MonthYearPicker:j,TimePicker:M,PickerInputs:Q,Arrows:$,Footer:ee,Day:H,WeekNumbers:N},mixins:[y],computed:{startDMY(){return this.calendar.dateRange.start?this.calendar.dateRange.start.split(" ")[0]:""},endDMY(){return this.calendar.dateRange.end?this.calendar.dateRange.end.split(" ")[0]:""},rangeIsSelected(){return this.isMultipleDateRange?this.calendar.multipleDateRange.length>0:!!(this.calendar.dateRange.end&&this.calendar.dateRange.start)},helpCalendar(){return new C(this.fConfigs.sundayStart,this.checkHiddenElement("leftAndRightDays"),this.fConfigs.dateFormat,this.fConfigs.dayNames)},singleSelectedDate:{get(){let t="";if(this.displayTimeInput){const e=["HH:MM","HH:mm","hh:MM","hh:mm","MM:HH","mm:HH","MM:hh","mm:hh"];let a=this.fConfigs.dateFormat;this.dateFormat&&(a=this.dateFormat),e.indexOf(a.split(" ")[1])>3?t+=" "+[this.calendar.selectedHour,this.calendar.selectedMinute].reverse().join(":"):t+=" "+[this.calendar.selectedHour,this.calendar.selectedMinute].join(":")}return this.calendar.selectedDate?this.calendar.selectedDate+t:""},set(t){t=this.helpCalendar.mask(t),this.helpCalendar.getDateFromFormat(t).getMonth()&&(this.calendar.selectedDate=t)}}},created(){this.setConfigs(),this.initCalendar()},mounted(){this.displayTimeInput&&(this.fConfigs.placeholder.split(" ")[1]||(this.fConfigs.placeholder+=" hh:mm")),this.popoverElement=this.$refs.popoverElement,this.popoverElement.addEventListener("focusin",this.onFocusIn),this.popoverElement.addEventListener("focusout",this.onFocusOut),window.addEventListener("click",this.hideMonthYearPicker,{capture:!0}),this.$watch("value",function(t){if(typeof t=="object"&&(t.hasOwnProperty("dateRange")||t.hasOwnProperty("selectedDate")))this.calendar=t;else if(typeof t=="object"&&t.hasOwnProperty("multipleDateRange")){this.calendar.multipleDateRange=t.multipleDateRange;const e=this.calendar.multipleDateRange[Math.max(0,this.calendar.multipleDateRange.length-1)];if(e&&(e.start&&!e.end||!e.start&&e.end))throw new Error("Invalid Data Range")}},{immediate:!0,deep:!0}),this.$watch("showCalendar",function(t){t?this.$emit("opened"):this.$emit("closed")},{immediate:!0,deep:!0})},beforeDestroy:function(){window.removeEventListener("focusin",this.onFocusIn),window.removeEventListener("focusout",this.onFocusOut),window.removeEventListener("click",this.hideMonthYearPicker)},watch:{enabledDates:{handler(){this.fConfigs.enabledDates=this.enabledDates},deep:!0},"configs.enabledDates":{handler(){this.fConfigs.enabledDates=this.configs.enabledDates},deep:!0},fConfigs:{handler(){this.markChooseDays()},deep:!0,immediate:!0},calendar:{handler(){this.markChooseDays()},deep:!0,immediate:!0},"calendar.currentDate":{handler(t){this.$emit("input",this.calendar),this.checkLimits(t)}}},methods:{initCalendar(){this.setCalendarData(),this.listRendering(),this.markChooseDays(),this.checkLimits(this.calendar.currentDate)},updateCalendar(){this.setExistingCalendarData(),this.listRendering(),this.markChooseDays()},isNotSeparatelyAndFirst(t){return this.isSeparately||t==0},setCalendarData(){let t=this.calendar.currentDate;t=new Date(t.getFullYear(),t.getMonth()-1),this.listCalendars=[];for(let e=0;e{typeof this.fConfigs[e]<"u"&&this.$set(this.fConfigs,e,t[e])})),typeof this.configs<"u"?Object.keys(this.fConfigs).forEach(e=>{typeof this.configs[e]<"u"&&this.$set(this.fConfigs,e,this.configs[e])}):Object.keys(this.$props).forEach(e=>{typeof this.fConfigs[e]<"u"&&typeof this.$props[e]<"u"&&this.$set(this.fConfigs,e,this.$props[e])}),this.fConfigs.isModal&&(this.showCalendar=!1),this.fConfigs.placeholder||(this.fConfigs.placeholder=this.fConfigs.dateFormat),typeof this.newCurrentDate<"u"&&(this.calendar.currentDate=this.newCurrentDate),this.fConfigs.sundayStart){let e=[...this.fConfigs.dayNames],a=e[e.length-1];e.splice(e.length-1,1),e.unshift(a),this.fConfigs.dayNames=e}},listRendering(){this.listCalendars.forEach(t=>{t.weeks.forEach(e=>{let a=[];e.days.forEach(i=>{let s=new Date(i.year,i.month,i.day),n=new Date,r=!1;s.setHours(0,0,0,0),n.setHours(0,0,0,0),s.getTime()===n.getTime()&&(r=!0);let l;typeof this.fConfigs.markedDates[0]=="object"?l=this.fConfigs.markedDates.find(d=>d.date===this.helpCalendar.formatDate(s)):l=this.fConfigs.markedDates.find(d=>d===this.helpCalendar.formatDate(s)),this.startDMY===this.helpCalendar.formatDate(s)&&(l=!0);let o=!1;typeof l<"u"&&(o=!0),a.push({day:i.day,date:this.helpCalendar.formatDate(s),hide:i.hide,isMouseToLeft:!1,isMouseToRight:!1,isHovered:!1,isDateRangeStart:this.checkDateRangeStart(this.helpCalendar.formatDate(s)),isDateRangeEnd:this.checkDateRangeEnd(this.helpCalendar.formatDate(s)),hideLeftAndRightDays:i.hideLeftAndRightDays,isToday:r,isMarked:o})}),e.days=a})})},clickDay(t,e){if(this.fConfigs.withTimePicker&&this.fConfigs.isDateRange&&(t.date=t.date+" 00:00"),this.$emit("dayClicked",t),!this.fConfigs.isDateRange&&!this.fConfigs.isDatePicker&&!this.fConfigs.isMultipleDatePicker)return!1;let a=this.helpCalendar.getDateFromFormat(t.date).getDay()-1;a===-1&&(a=6);let i=this.fConfigs.dayNames[a];if(this.fConfigs.disabledDayNames.includes(i)||e(t.date))return!1;if(this.fConfigs.limits){let s=this.helpCalendar.getDateFromFormat(this.fConfigs.limits.min).getTime(),n=this.helpCalendar.getDateFromFormat(this.fConfigs.limits.max).getTime(),r=this.helpCalendar.getDateFromFormat(t.date).getTime();if(rn)return!1}if(this.fConfigs.isMultipleDateRange){let s=this.helpCalendar.getDateFromFormat(t.date.split(" ")[0]).getTime(),n=this.calendar.multipleDateRange.length,r=this.calendar.multipleDateRange[n-1],l="";if(r||(this.calendar.multipleDateRange.push({end:"",start:""}),n=this.calendar.multipleDateRange.length,r=this.calendar.multipleDateRange[n-1]),r.start&&(l=this.helpCalendar.getDateFromFormat(r.start)),r.start!==""&&r.end!==""?this.calendar.multipleDateRange.push({end:"",start:t.date}):r.start===""&&r.end===""?r.start=t.date:r.end===""&&s>l.getTime()?r.end=t.date:r.start!==""&&s<=l.getTime()&&(this.$nextTick(()=>{this.calendar.withTimePicker&&(this.$refs.timePicker.startDateActive=!0)}),r.end=r.start,r.start=t.date),r.start!==""&&r.end!==""){let o=864e5,d=this.helpCalendar.getDateFromFormat(r.start),f=this.helpCalendar.getDateFromFormat(r.end),h=Math.round(Math.abs((d.getTime()-f.getTime())/o)),u=this.helpCalendar.getDateFromFormat(t.date).getTime();this.$emit("selectedDaysCount",h),this.fConfigs.isModal&&this.fConfigs.isAutoCloseable&&(this.showCalendar=!1);let c=this.fConfigs.minSelDays;c&&u>=l.getTime()&&h=l.getTime()&&h>=g&&(l.setDate(l.getDate()+(g-1)),r.end=this.helpCalendar.formatDate(l)),g&&u=g&&(l.setDate(l.getDate()-(g-1)),r.start=this.helpCalendar.formatDate(l))}this.$emit("input",this.calendar)}else if(this.fConfigs.isDateRange){let s=this.helpCalendar.getDateFromFormat(t.date.split(" ")[0]).getTime(),n="";if(this.calendar.dateRange.start&&(n=this.helpCalendar.getDateFromFormat(this.calendar.dateRange.start)),this.calendar.dateRange.start!==""&&this.calendar.dateRange.end!==""?(this.calendar.dateRange.start=t.date,this.calendar.dateRange.end=""):this.calendar.dateRange.start===""&&this.calendar.dateRange.end===""?this.calendar.dateRange.start=t.date:this.calendar.dateRange.end===""&&s>n.getTime()?this.calendar.dateRange.end=t.date:this.calendar.dateRange.start!==""&&s<=n.getTime()&&(this.$nextTick(()=>{this.calendar.dateRange&&this.calendar.withTimePicker&&(this.$refs.timePicker.startDateActive=!0)}),this.calendar.dateRange.end=this.calendar.dateRange.start,this.calendar.dateRange.start=t.date),this.calendar.dateRange.start!==""&&this.calendar.dateRange.end!==""){let r=864e5,l=this.helpCalendar.getDateFromFormat(this.calendar.dateRange.start),o=this.helpCalendar.getDateFromFormat(this.calendar.dateRange.end),d=Math.round(Math.abs((l.getTime()-o.getTime())/r)),f=this.helpCalendar.getDateFromFormat(t.date).getTime();this.$emit("selectedDaysCount",d),this.fConfigs.isModal&&this.fConfigs.isAutoCloseable&&(this.showCalendar=!1);let h=this.fConfigs.minSelDays;h&&f>=n.getTime()&&d=n.getTime()&&d>=u&&(n.setDate(n.getDate()+(u-1)),this.calendar.dateRange.end=this.helpCalendar.formatDate(n)),u&&f=u&&(n.setDate(n.getDate()-(u-1)),this.calendar.dateRange.start=this.helpCalendar.formatDate(n))}this.$emit("input",this.calendar)}else if(this.fConfigs.isDatePicker)this.calendar.selectedDate=t.date,this.$emit("input",this.calendar),this.fConfigs.isModal&&this.fConfigs.isAutoCloseable&&(this.showCalendar=!1);else if(this.fConfigs.isMultipleDatePicker){if(this.calendar.hasOwnProperty("selectedDates")&&this.calendar.selectedDates.find(s=>s.date===t.date)){let s=this.calendar.selectedDates.findIndex(n=>n.date===t.date);this.calendar.selectedDates.splice(s,1)}else{let s=Object.assign({},this.defaultDateFormat);s.date=t.date,this.calendar.hasOwnProperty("selectedDates")||(this.calendar.selectedDates=[]),this.calendar.selectedDates.push(s)}this.$emit("input",this.calendar)}this.markChooseDays(),this.fConfigs.withTimePicker&&((this.fConfigs.isDateRange||this.fConfigs.isDatePicker)&&this.openTimePicker(),this.calendar.selectedDates.find(s=>s.date===t.date)&&this.fConfigs.isMultipleDatePicker&&this.openTimePicker()),this.$emit("choseDay",t)},markChooseDays(){let t=this.startDMY,e=this.endDMY;this.listCalendars.forEach(a=>{a.weeks.forEach(i=>{i.days.forEach(s=>{s.isMarked=!1,s.date=s.date.split(" ")[0],this.fConfigs.isDatePicker?this.calendar.selectedDate===s.date&&(s.isMarked=!0):this.fConfigs.isMultipleDatePicker?this.calendar.hasOwnProperty("selectedDates")&&this.calendar.selectedDates.find(n=>n.date===s.date)&&(s.isMarked=!0):(s.isMouseToLeft=!1,s.isMouseToRight=!1,t===s.date&&(s.isMouseToLeft=!!e,s.isMarked=!0),e===s.date&&(s.isMouseToRight=!!e,s.isMarked=!0),this.calendar.multipleDateRange&&(~this.calendar.multipleDateRange.map(n=>n.start.split(" ")[0]).indexOf(s.date)&&(s.isMouseToLeft=!!e,s.isMarked=!0),~this.calendar.multipleDateRange.map(n=>n.end.split(" ")[0]).indexOf(s.date)&&(s.isMouseToRight=!!e,s.isMarked=!0),this.calendar.multipleDateRange.forEach(n=>{n.start&&n.start===n.end&&(s.isMouseToLeft=!1,s.isMouseToRight=!1),n.start&&n.end&&this.helpCalendar.getDateFromFormat(s.date).getTime()>this.helpCalendar.getDateFromFormat(n.start)&&this.helpCalendar.getDateFromFormat(s.date)this.helpCalendar.getDateFromFormat(t)&&this.helpCalendar.getDateFromFormat(s.date)a)return!1}if((this.calendar.dateRange.start===""||this.calendar.dateRange.end==="")&&(this.calendar.dateRange.start!==""||this.calendar.dateRange.end!==""))for(let e=0;ed.getTime()||l===o&&od.getTime();let f=this.helpCalendar.getDateFromFormat(r.date).getDay()-1;f===-1&&(f=6);let h=this.fConfigs.dayNames[f];if(!this.fConfigs.disabledDayNames.includes(h)&&(l>d.getTime()&&lo)&&(this.listCalendars[e].weeks[i].days[n].isMarked=!0),!this.calendar.dateRange.end&&l===o&&(this.listCalendars[e].weeks[i].days[n].isHovered=!1),this.checkSelDates("min",this.calendar.dateRange.start,r.date,t)){this.listCalendars[e].weeks[i].days[n].isMarked=!0;let u,c;c=new Date(d.getTime()),u=new Date(d.getTime()),c.setDate(c.getDate()-this.fConfigs.minSelDays+1),u.setDate(u.getDate()+this.fConfigs.minSelDays-1),o>=c.getTime()&&this.helpCalendar.formatDate(c)===r.date?(this.listCalendars[e].weeks[i].days[n].isMarked=!1,this.listCalendars[e].weeks[i].days[n].isMouseToLeft=!0,this.listCalendars[e].weeks[i].days[n].isHovered=!0):o<=u.getTime()&&this.helpCalendar.formatDate(u)===r.date&&(this.listCalendars[e].weeks[i].days[n].isMarked=!1,this.listCalendars[e].weeks[i].days[n].isMouseToRight=!0,this.listCalendars[e].weeks[i].days[n].isHovered=!0)}if(this.checkSelDates("max",this.calendar.dateRange.start,r.date,t)){this.listCalendars[e].weeks[i].days[n].isMarked=!1,this.listCalendars[e].weeks[i].days[n].isHovered=!1,this.listCalendars[e].weeks[i].days[n].isMouseToLeft=!1,this.listCalendars[e].weeks[i].days[n].isMouseToRight=!1;let u,c;u=new Date(d.getTime()),c=new Date(d.getTime()),u.setDate(u.getDate()-this.fConfigs.maxSelDays+1),c.setDate(c.getDate()+this.fConfigs.maxSelDays-1),o<=u.getTime()&&this.helpCalendar.formatDate(u)===r.date&&(this.listCalendars[e].weeks[i].days[n].isHovered=!0,this.listCalendars[e].weeks[i].days[n].isMouseToLeft=!0),o>=c.getTime()&&this.helpCalendar.formatDate(c)===r.date&&(this.listCalendars[e].weeks[i].days[n].isHovered=!0,this.listCalendars[e].weeks[i].days[n].isMouseToRight=!0)}}}}}if(this.calendar.multipleDateRange){let e=this.calendar.multipleDateRange[this.calendar.multipleDateRange.length-1];if(!e)return;if((e.start===""||e.end==="")&&(e.start!==""||e.end!==""))for(let a=0;af.getTime()||o===d&&df.getTime();let h=this.helpCalendar.getDateFromFormat(l.date).getDay()-1;h===-1&&(h=6);let u=this.fConfigs.dayNames[h];if(!this.fConfigs.disabledDayNames.includes(u)&&(o>f.getTime()&&od)&&(this.listCalendars[a].weeks[s].days[r].isMarked=!0),!e.end&&o===d&&(this.listCalendars[a].weeks[s].days[r].isHovered=!1),this.checkSelDates("min",e.start,l.date,t)){this.listCalendars[a].weeks[s].days[r].isMarked=!0;let c,g;g=new Date(f.getTime()),c=new Date(f.getTime()),g.setDate(g.getDate()-this.fConfigs.minSelDays+1),c.setDate(c.getDate()+this.fConfigs.minSelDays-1),d>=g.getTime()&&this.helpCalendar.formatDate(g)===l.date?(this.listCalendars[a].weeks[s].days[r].isMarked=!1,this.listCalendars[a].weeks[s].days[r].isMouseToLeft=!0,this.listCalendars[a].weeks[s].days[r].isHovered=!0):d<=c.getTime()&&this.helpCalendar.formatDate(c)===l.date&&(this.listCalendars[a].weeks[s].days[r].isMarked=!1,this.listCalendars[a].weeks[s].days[r].isMouseToRight=!0,this.listCalendars[a].weeks[s].days[r].isHovered=!0)}if(this.checkSelDates("max",e.start,l.date,t)){this.listCalendars[a].weeks[s].days[r].isMarked=!1,this.listCalendars[a].weeks[s].days[r].isHovered=!1,this.listCalendars[a].weeks[s].days[r].isMouseToLeft=!1,this.listCalendars[a].weeks[s].days[r].isMouseToRight=!1;let c,g;c=new Date(f.getTime()),g=new Date(f.getTime()),c.setDate(c.getDate()-this.fConfigs.maxSelDays+1),g.setDate(g.getDate()+this.fConfigs.maxSelDays-1),d<=c.getTime()&&this.helpCalendar.formatDate(c)===l.date&&(this.listCalendars[a].weeks[s].days[r].isHovered=!0,this.listCalendars[a].weeks[s].days[r].isMouseToLeft=!0),d>=g.getTime()&&this.helpCalendar.formatDate(g)===l.date&&(this.listCalendars[a].weeks[s].days[r].isHovered=!0,this.listCalendars[a].weeks[s].days[r].isMouseToRight=!0)}}}}}}},PreMonth(t=null){if(!this.allowPreDate)return!1;this.transitionPrefix="right";let e=this.fConfigs.changeMonthStep;t=t!==null?t:0;let a=this.listCalendars[t];a.date=new Date(a.date.getFullYear(),a.date.getMonth()-e),a.key-=D(),this.updateCalendar(),this.fConfigs.isSeparately||(this.calendar.currentDate=a.date,this.initCalendar()),this.$emit("changedMonth",a.date)},NextMonth(t=null){if(!this.allowNextDate)return!1;this.transitionPrefix="left";let e=this.fConfigs.changeMonthStep;t=t!==null?t:0;let a=this.listCalendars[t];a.date=new Date(a.date.getFullYear(),a.date.getMonth()+e),a.key+=D(),this.updateCalendar(),this.fConfigs.isSeparately||(this.calendar.currentDate=a.date,this.initCalendar()),this.$emit("changedMonth",a.date)},PreYear(t=null){if(!this.allowPreDate)return!1;let e=this.showYearPicker?this.fConfigs.changeYearStep:1;t=t!==null?t:0;let a=this.listCalendars[t];a.date=new Date(a.date.getFullYear()-e,a.date.getMonth()),this.updateCalendar(),this.fConfigs.isSeparately||(this.calendar.currentDate=a.date,this.initCalendar()),this.$emit("changedYear",a.date)},NextYear(t=null){if(!this.allowNextDate)return!1;let e=this.showYearPicker?this.fConfigs.changeYearStep:1;t=t!==null?t:0;let a=this.listCalendars[t];a.date=new Date(a.date.getFullYear()+e,a.date.getMonth()),this.updateCalendar(),this.fConfigs.isSeparately||(this.calendar.currentDate=a.date,this.initCalendar()),this.$emit("changedYear",a.date)},ChooseDate(t){let e=this.helpCalendar.getDateFromFormat(t);t==="today"&&(e=new Date),this.listCalendars[0].date=this.calendar.currentDate=e,this.updateCalendar(),this.initCalendar()},openMonthPicker(t){this.fConfigs.changeMonthFunction&&(this.showMonthPicker=t===this.showMonthPicker?!1:t,this.showYearPicker=!1)},openYearPicker(t){this.fConfigs.changeYearFunction&&(this.showYearPicker=t===this.showYearPicker?!1:t,this.showMonthPicker=!1)},openTimePicker(){this.showTimePicker=!0},pickMonth(t,e){if(this.showMonthPicker=!1,!this.isSeparately)this.listCalendars.forEach((i,s)=>{let n=i.date;i.date=new Date(n.getFullYear(),t+1+s,0),i.key+=D()});else{let i=this.listCalendars[e],s=i.date;i.date=new Date(s.getFullYear(),t+1,0),i.key+=D()}let a=this.listCalendars[e];this.$emit("changedMonth",a.date),this.updateCalendar()},pickYear(t,e){if(this.showYearPicker=!1,!this.isSeparately)this.listCalendars.forEach(a=>{let i=a.date;a.date=new Date(t,i.getMonth()+1,0),a.key+=D(),this.$emit("changedYear",a.date)});else{let a=this.listCalendars[e],i=a.date;a.date=new Date(t,i.getMonth()+1,0),a.key+=D(),this.$emit("changedYear",a.date)}this.updateCalendar()},getYearList(t,e){let a=[],i=t.getFullYear()-4+e;for(let s=0;s<12;s++){let n=i+s;a.push({year:n})}return a},addToSelectedDates(){if(this.helpCalendar.checkValidDate(this.calendar.selectedDatesItem)){let t=Object.assign({},this.defaultDateFormat);t.date=this.calendar.selectedDatesItem,this.calendar.selectedDates.push(t),this.calendar.selectedDatesItem="",this.markChooseDays()}},removeFromSelectedDates(t){this.calendar.selectedDates.splice(t,1),this.markChooseDays()},checkDateRangeEnd(t){return Array.isArray(this.fConfigs.markedDateRange)?this.fConfigs.markedDateRange.findIndex(e=>e.end===t)!==-1:t===this.fConfigs.markedDateRange.end},checkSelDates(t,e,a,i){let s=this.helpCalendar.getDateFromFormat(e).getTime(),n=this.helpCalendar.getDateFromFormat(a).getTime(),r=this.helpCalendar.getDateFromFormat(i).getTime(),o=(t==="min"?this.fConfigs.minSelDays:this.fConfigs.maxSelDays-2)*1e3*60*60*24,d=s+o,f=s-o,h;return r>s?t==="min"?h=ns&&this.fConfigs.minSelDays:h=n>d&&n>s&&this.fConfigs.maxSelDays:rf&&n=a&&(this.allowNextDate=!1)}},getTransition_(){if(!this.fConfigs.transition)return"";let t="";return this.transitionPrefix==="left"?t="vfc-calendar-slide-left":this.transitionPrefix==="right"&&(t="vfc-calendar-slide-right"),t},checkHiddenElement(t){return!this.fConfigs.hiddenElements.includes(t)},onFocusIn(){this.fConfigs.isModal&&(this.showCalendar=!0)},onFocusOut(t){if(this.fConfigs.isModal&&!te(this.popoverElement,t.relatedTarget))return this.showCalendar=this.showMonthPicker=this.showYearPicker=!1},hideMonthYearPicker(t){this.$nextTick(()=>{if(this.showMonthPicker||this.showYearPicker){let e=this.showMonthPicker?this.showMonthPicker-1:this.showYearPicker-1;return this.$refs.calendars.querySelectorAll(".vfc-content-MY-picker")[e].contains(t.target)?void 0:this.showMonthPicker=this.showYearPicker=!1}})},checkDateRangeStart(t){return Array.isArray(this.fConfigs.markedDateRange)?this.fConfigs.markedDateRange.findIndex(e=>e.start===t)!==-1:t===this.fConfigs.markedDateRange.start},cleanRange(){if(!this.isMultipleDateRange){this.calendar.dateRange.end="",this.calendar.dateRange.start="";return}this.calendar.multipleDateRange=[]}}};var se=function(){var e=this,a=e._self._c;return a("div",{ref:"popoverElement",staticClass:"vfc-popover-container",attrs:{tabindex:"0"}},[a("PickerInputs",{attrs:{fConfigs:e.fConfigs,singleSelectedDate:e.singleSelectedDate,calendar:e.calendar},scopedSlots:e._u([{key:"dateRangeInputs",fn:function(i){return[e._t("dateRangeInputs",null,{startDate:i.startDate,endDate:i.endDate,isTypeable:e.fConfigs.isTypeable})]}},{key:"datePickerInput",fn:function(i){return[e._t("datePickerInput",null,{selectedDate:i.selectedDate,isTypeable:e.fConfigs.isTypeable})]}}],null,!0)}),a("div",{directives:[{name:"show",rawName:"v-show",value:e.showCalendar,expression:"showCalendar"}],ref:"mainContainer",staticClass:"vfc-main-container",class:{"vfc-modal":e.fConfigs.isModal&&(e.fConfigs.isDatePicker||e.fConfigs.isDateRange||e.fConfigs.isMultipleDatePicker),"vfc-dark":e.fConfigs.isDark}},[e.showTimePicker?a("time-picker",{ref:"timePicker",attrs:{height:e.$refs.popoverElement.clientHeight,hours:e.activeHours,minutes:e.activeMinutes}}):[a("div",{staticClass:"vfc-calendars-container"},[a("Arrows",{attrs:{isMultiple:!1,fConfigs:e.fConfigs,allowPreDate:e.allowPreDate,allowNextDate:e.allowNextDate},scopedSlots:e._u([{key:"navigationArrowLeft",fn:function(){return[e._t("navigationArrowLeft")]},proxy:!0},{key:"navigationArrowRight",fn:function(){return[e._t("navigationArrowRight")]},proxy:!0}],null,!0)}),a("div",{ref:"calendars",staticClass:"vfc-calendars"},e._l(e.listCalendars,function(i,s){return a("div",{key:i.key,staticClass:"vfc-calendar"},[a("month-year-picker",{directives:[{name:"show",rawName:"v-show",value:e.showMonthPicker===s+1||e.showYearPicker===s+1,expression:` showMonthPicker === key + 1 || showYearPicker === key + 1 diff --git a/public/build/assets/GlobalFlag-BXap7gwF.js b/public/build/assets/GlobalFlag-DK1P1Fl8.js similarity index 95% rename from public/build/assets/GlobalFlag-BXap7gwF.js rename to public/build/assets/GlobalFlag-DK1P1Fl8.js index 0d02ee3e..2c327599 100644 --- a/public/build/assets/GlobalFlag-BXap7gwF.js +++ b/public/build/assets/GlobalFlag-DK1P1Fl8.js @@ -1 +1 @@ -import{L as o}from"./vue-loading-hzYdSApK.js";/* empty css */import{n as a,e as l}from"./app-DuS6KM7M.js";/* empty css */const n={name:"GlobalFlag",components:{Loading:o,VueSimpleSuggest:l},async created(){this.loading=!0,await this.$store.dispatch("GET_COUNTRIES_FOR_FLAGS"),this.loading=!1},data(){return{btn:"button mt1 is-primary is-medium",country:"",processing:!1,loading:!0,autoCompleteStyle:{vueSimpleSuggest:"position-relative width-50",inputWrapper:"",defaultInput:"input",suggestions:"position-absolute list-group z-1000 custom-class-overflow width-50",suggestItem:"list-group-item"}}},computed:{button(){return this.processing?this.btn+" is-loading":this.btn},countries(){return this.$store.state.user.countries}},methods:{getCountries(){return Object.values(this.countries)},getSelected(){return this.$store.state.user.user.global_flag?this.countries[this.$store.state.user.user.global_flag]:!1},onFocus(){this.$refs.vss.suggestions=this.$refs.vss.list},onSuggestion(){this.$nextTick(function(){Array.prototype.forEach.call(document.getElementsByClassName("input"),function(i){i.blur()})})},async save(){this.processing=!0;let i=Object.keys(this.countries).find(t=>this.countries[t]===this.country);await this.$store.dispatch("UPDATE_GLOBAL_FLAG",i),this.processing=!1}}};var r=function(){var t=this,s=t._self._c;return s("div",{staticStyle:{"padding-left":"1em","padding-right":"1em"}},[s("h1",{staticClass:"title is-4"},[t._v(t._s(t.$t("settings.globalFlag.show-flag")))]),s("hr"),s("br"),t.loading?s("loading",{attrs:{active:t.loading,"is-full-page":!0},on:{"update:active":function(e){t.loading=e}}}):s("div",{staticClass:"columns"},[s("div",{staticClass:"column is-offset-1"},[s("p",{staticClass:"title is-5 mb20 green"},[t._v(t._s(t.$t("settings.globalFlag.top-10")))]),s("div",{directives:[{name:"show",rawName:"v-show",value:this.$store.state.user.user.global_flag,expression:"this.$store.state.user.user.global_flag"}],staticClass:"mb20"},[s("p",{staticClass:"strong"},[t._v(t._s(t.$t("settings.globalFlag.global-top-10-challenge"))+": "+t._s(this.getSelected()))])]),s("p",{staticClass:"mb20"},[t._v(t._s(t.$t("settings.globalFlag.action-select")))]),s("p",{staticClass:"mb20"},[t._v(t._s(t.$t("settings.globalFlag.select-country")))]),s("vue-simple-suggest",{ref:"vss",attrs:{"filter-by-query":!0,list:t.getCountries(),"min-length":0,"max-suggestions":0,mode:"select",placeholder:t.$t("settings.globalFlag.select-country"),styles:t.autoCompleteStyle},on:{focus:function(e){return t.onFocus()},"suggestion-click":function(e){return t.onSuggestion()}},model:{value:t.country,callback:function(e){t.country=e},expression:"country"}}),s("button",{class:t.button,attrs:{disabled:t.processing},on:{click:t.save}},[t._v(t._s(t.$t("settings.globalFlag.save-flag")))])],1)])],1)},u=[],c=a(n,r,u,!1,null,null);const f=c.exports;export{f as default}; +import{L as o}from"./vue-loading-Ck0acTfr.js";/* empty css */import{n as a,e as l}from"./app-BwSojYvl.js";/* empty css */const n={name:"GlobalFlag",components:{Loading:o,VueSimpleSuggest:l},async created(){this.loading=!0,await this.$store.dispatch("GET_COUNTRIES_FOR_FLAGS"),this.loading=!1},data(){return{btn:"button mt1 is-primary is-medium",country:"",processing:!1,loading:!0,autoCompleteStyle:{vueSimpleSuggest:"position-relative width-50",inputWrapper:"",defaultInput:"input",suggestions:"position-absolute list-group z-1000 custom-class-overflow width-50",suggestItem:"list-group-item"}}},computed:{button(){return this.processing?this.btn+" is-loading":this.btn},countries(){return this.$store.state.user.countries}},methods:{getCountries(){return Object.values(this.countries)},getSelected(){return this.$store.state.user.user.global_flag?this.countries[this.$store.state.user.user.global_flag]:!1},onFocus(){this.$refs.vss.suggestions=this.$refs.vss.list},onSuggestion(){this.$nextTick(function(){Array.prototype.forEach.call(document.getElementsByClassName("input"),function(i){i.blur()})})},async save(){this.processing=!0;let i=Object.keys(this.countries).find(t=>this.countries[t]===this.country);await this.$store.dispatch("UPDATE_GLOBAL_FLAG",i),this.processing=!1}}};var r=function(){var t=this,s=t._self._c;return s("div",{staticStyle:{"padding-left":"1em","padding-right":"1em"}},[s("h1",{staticClass:"title is-4"},[t._v(t._s(t.$t("settings.globalFlag.show-flag")))]),s("hr"),s("br"),t.loading?s("loading",{attrs:{active:t.loading,"is-full-page":!0},on:{"update:active":function(e){t.loading=e}}}):s("div",{staticClass:"columns"},[s("div",{staticClass:"column is-offset-1"},[s("p",{staticClass:"title is-5 mb20 green"},[t._v(t._s(t.$t("settings.globalFlag.top-10")))]),s("div",{directives:[{name:"show",rawName:"v-show",value:this.$store.state.user.user.global_flag,expression:"this.$store.state.user.user.global_flag"}],staticClass:"mb20"},[s("p",{staticClass:"strong"},[t._v(t._s(t.$t("settings.globalFlag.global-top-10-challenge"))+": "+t._s(this.getSelected()))])]),s("p",{staticClass:"mb20"},[t._v(t._s(t.$t("settings.globalFlag.action-select")))]),s("p",{staticClass:"mb20"},[t._v(t._s(t.$t("settings.globalFlag.select-country")))]),s("vue-simple-suggest",{ref:"vss",attrs:{"filter-by-query":!0,list:t.getCountries(),"min-length":0,"max-suggestions":0,mode:"select",placeholder:t.$t("settings.globalFlag.select-country"),styles:t.autoCompleteStyle},on:{focus:function(e){return t.onFocus()},"suggestion-click":function(e){return t.onSuggestion()}},model:{value:t.country,callback:function(e){t.country=e},expression:"country"}}),s("button",{class:t.button,attrs:{disabled:t.processing},on:{click:t.save}},[t._v(t._s(t.$t("settings.globalFlag.save-flag")))])],1)])],1)},u=[],c=a(n,r,u,!1,null,null);const f=c.exports;export{f as default}; diff --git a/public/build/assets/GlobalMapContainer-53DCEk1M.js b/public/build/assets/GlobalMapContainer-BX-EkdbH.js similarity index 79% rename from public/build/assets/GlobalMapContainer-53DCEk1M.js rename to public/build/assets/GlobalMapContainer-BX-EkdbH.js index 784bf3a9..24355d6d 100644 --- a/public/build/assets/GlobalMapContainer-53DCEk1M.js +++ b/public/build/assets/GlobalMapContainer-BX-EkdbH.js @@ -1 +1 @@ -import{L as r}from"./vue-loading-hzYdSApK.js";/* empty css */import{S as o}from"./Supercluster-BNFeeEyK.js";import{n}from"./app-DuS6KM7M.js";import"./index-Dxbj43yt.js";import"./mapHelpers-CSfygYu3.js";import"./moment-zH0z38ay.js";import"./glify-browser-DAFS8CF1.js";/* empty css */const s={name:"GlobalMapContainer",components:{Loading:r,Supercluster:o},data(){return{mapHeight:window.outerHeight-72}},async created(){this.isMobile&&this.addEventListenerIfMobile();let i=parseInt(new URLSearchParams(window.location.search).get("year"))||null;await this.$store.dispatch("GET_CLUSTERS",{zoom:2,year:i}),await this.$store.dispatch("GET_ART_DATA"),await this.$store.dispatch("GET_CLEANUPS"),await this.$store.dispatch("GET_MERCHANTS_GEOJSON"),this.$store.commit("globalLoading",!1)},async destroyed(){window.removeEventListener("resize",this.resizeHandler)},computed:{loading(){return this.$store.state.globalmap.loading},isMobile(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}},methods:{addEventListenerIfMobile(){this.mapHeight=window.innerHeight-72+"px",window.addEventListener("resize",this.resizeHandler)},resizeHandler(){this.mapHeight=window.innerHeight-72+"px"}}};var d=function(){var e=this,t=e._self._c;return t("div",{staticClass:"global-map-container",style:{height:e.mapHeight}},[e.loading?t("loading",{attrs:{active:e.loading,"is-full-page":!0},on:{"update:active":function(a){e.loading=a}}}):t("supercluster")],1)},l=[],p=n(s,d,l,!1,null,"8375a653");const E=p.exports;export{E as default}; +import{L as r}from"./vue-loading-Ck0acTfr.js";/* empty css */import{S as o}from"./Supercluster-6zQlYpaO.js";import{n}from"./app-BwSojYvl.js";import"./index-Dxbj43yt.js";import"./mapHelpers-DmBbMbJe.js";import"./moment-zH0z38ay.js";import"./glify-browser-BLn8SaeM.js";/* empty css */const s={name:"GlobalMapContainer",components:{Loading:r,Supercluster:o},data(){return{mapHeight:window.outerHeight-72}},async created(){this.isMobile&&this.addEventListenerIfMobile();let i=parseInt(new URLSearchParams(window.location.search).get("year"))||null;await this.$store.dispatch("GET_CLUSTERS",{zoom:2,year:i}),await this.$store.dispatch("GET_ART_DATA"),await this.$store.dispatch("GET_CLEANUPS"),await this.$store.dispatch("GET_MERCHANTS_GEOJSON"),this.$store.commit("globalLoading",!1)},async destroyed(){window.removeEventListener("resize",this.resizeHandler)},computed:{loading(){return this.$store.state.globalmap.loading},isMobile(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}},methods:{addEventListenerIfMobile(){this.mapHeight=window.innerHeight-72+"px",window.addEventListener("resize",this.resizeHandler)},resizeHandler(){this.mapHeight=window.innerHeight-72+"px"}}};var d=function(){var e=this,t=e._self._c;return t("div",{staticClass:"global-map-container",style:{height:e.mapHeight}},[e.loading?t("loading",{attrs:{active:e.loading,"is-full-page":!0},on:{"update:active":function(a){e.loading=a}}}):t("supercluster")],1)},l=[],p=n(s,d,l,!1,null,"8375a653");const E=p.exports;export{E as default}; diff --git a/public/build/assets/History-BVxi7Dxp.js b/public/build/assets/History-DwaBXQAD.js similarity index 76% rename from public/build/assets/History-BVxi7Dxp.js rename to public/build/assets/History-DwaBXQAD.js index a985879b..282edd8a 100644 --- a/public/build/assets/History-BVxi7Dxp.js +++ b/public/build/assets/History-DwaBXQAD.js @@ -1 +1 @@ -import{L as e}from"./vue-loading-hzYdSApK.js";/* empty css */import{L as o}from"./LitterTable-ChsxOeDI.js";import{n as r}from"./app-DuS6KM7M.js";/* empty css */const s={name:"History",components:{Loading:e,LitterTable:o},data(){return{loading:!0}},async created(){await this.$store.dispatch("GET_ALL_PHOTOS_PAGINATED"),await this.$store.dispatch("GET_LIST_OF_COUNTRY_NAMES"),this.loading=!1},computed:{paginatedPhotos(){return this.$store.state.alldata.paginated}}};var i=function(){var t=this,a=t._self._c;return a("div",[t.loading?a("loading",{attrs:{active:!0,"is-full-page":!0}}):a("LitterTable",{attrs:{title:"All Uploads",paginatedPhotos:t.paginatedPhotos,action:"GET_ALL_PHOTOS_PAGINATED"}})],1)},n=[],_=r(s,i,n,!1,null,"10e55381");const u=_.exports;export{u as default}; +import{L as e}from"./vue-loading-Ck0acTfr.js";/* empty css */import{L as o}from"./LitterTable-BrAEt-_i.js";import{n as r}from"./app-BwSojYvl.js";/* empty css */const s={name:"History",components:{Loading:e,LitterTable:o},data(){return{loading:!0}},async created(){await this.$store.dispatch("GET_ALL_PHOTOS_PAGINATED"),await this.$store.dispatch("GET_LIST_OF_COUNTRY_NAMES"),this.loading=!1},computed:{paginatedPhotos(){return this.$store.state.alldata.paginated}}};var i=function(){var t=this,a=t._self._c;return a("div",[t.loading?a("loading",{attrs:{active:!0,"is-full-page":!0}}):a("LitterTable",{attrs:{title:"All Uploads",paginatedPhotos:t.paginatedPhotos,action:"GET_ALL_PHOTOS_PAGINATED"}})],1)},n=[],_=r(s,i,n,!1,null,"10e55381");const u=_.exports;export{u as default}; diff --git a/public/build/assets/Index-CXrDT6HQ.js b/public/build/assets/Index-DWgg3krU.js similarity index 98% rename from public/build/assets/Index-CXrDT6HQ.js rename to public/build/assets/Index-DWgg3krU.js index cf421c2d..fcb8f5fa 100644 --- a/public/build/assets/Index-CXrDT6HQ.js +++ b/public/build/assets/Index-DWgg3krU.js @@ -1 +1 @@ -import{n as r}from"./app-DuS6KM7M.js";import{L as p}from"./BaseCharts-C5LiKM-N.js";/* empty css */import"./moment-zH0z38ay.js";const v={name:"SocialSection",data(){return{cards:[{title:"Slack",link:"https://join.slack.com/t/openlittermap/shared_invite/zt-fdctasud-mu~OBQKReRdC9Ai9KgGROw",icon:"fa fa-slack"},{title:"Twitter",link:"https://twitter.com/OpenLitterMap",icon:"fa fa-twitter"},{title:"Facebook",link:"https://www.facebook.com/openlittermap/",icon:"fa fa-facebook"},{title:"Instagram",link:"https://www.instagram.com/openlittermap/",icon:"fa fa-instagram"},{title:"Reddit",link:"https://www.reddit.com/r/openlittermap/",icon:"fa fa-reddit"},{title:"YouTube",link:"https://www.youtube.com/channel/UCfUT45IaIoxSCdQwv7-cTRg",icon:"fa fa-youtube"},{title:"LinkedIn",link:"https://www.linkedin.com/company/openlittermap/",icon:"fa fa-linkedin"},{title:"GitHub",link:"https://github.com/openlittermap",icon:"fa fa-github"}]}}};var y=function(){var t=this,s=t._self._c;return s("section",{staticClass:"hero section-social"},[s("div",{staticClass:"hero-body"},[s("div",{staticClass:"py-2 social-links"},[t._l(t.cards,function(i){return s("div",{staticClass:"social-card"},[s("a",{attrs:{href:i.link,title:i.title,target:"_blank"}},[s("i",{staticClass:"fa-4x fa-fw is-large has-text-light",class:i.icon})])])}),s("a",{staticClass:"discord-link",attrs:{href:"https://discord.gg/z6Pg2g5y6G",target:"_blank"}},[t._v(" and discord ")])],2)])])},g=[],C=r(v,y,g,!1,null,"42339a2b");const b=C.exports,k={name:"HeroSection",computed:{imageStyle(){return`linear-gradient(to left, transparent 0%, black 100%), url("${window.location.origin}/assets/grass.jpg")`}}};var w=function(){var t=this,s=t._self._c;return s("section",{staticClass:"community",style:{backgroundImage:t.imageStyle}},[s("div",{staticClass:"hero is-medium container"},[s("div",{staticClass:"hero-body community-hero"},[s("h1",{staticClass:"title has-text-white has-text-weight-bold is-size-2 is-size-1-desktop"},[t._v(" "+t._s(t.$t("home.community.title"))+" ")]),s("h2",{staticClass:"subtitle has-text-white-bis is-size-4 mt-1"},[t._v(" "+t._s(t.$t("home.community.subtitle"))+" ")])])]),t._m(0)])},x=[function(){var e=this,t=e._self._c;return t("p",{staticClass:"copyright"},[t("a",{attrs:{target:"_blank",href:"https://www.pexels.com/photo/green-grass-field-during-sun-rise-997121/"}},[e._v(" Photo by Peter Fazekas from Pexels ")])])}],$=r(k,w,x,!1,null,"ee714f81");const S=$.exports;function _(e,t){if(t){var s=this.$data._chart,i=e.datasets.map(function(a){return a.label}),c=t.datasets.map(function(a){return a.label}),l=JSON.stringify(c),m=JSON.stringify(i);m===l&&t.datasets.length===e.datasets.length?(e.datasets.forEach(function(a,o){var h=Object.keys(t.datasets[o]),n=Object.keys(a),f=h.filter(function(d){return d!=="_meta"&&n.indexOf(d)===-1});f.forEach(function(d){delete s.data.datasets[o][d]});for(var u in a)a.hasOwnProperty(u)&&(s.data.datasets[o][u]=a[u])}),e.hasOwnProperty("labels")&&(s.data.labels=e.labels,this.$emit("labels:update")),e.hasOwnProperty("xLabels")&&(s.data.xLabels=e.xLabels,this.$emit("xlabels:update")),e.hasOwnProperty("yLabels")&&(s.data.yLabels=e.yLabels,this.$emit("ylabels:update")),s.update(),this.$emit("chart:update")):(s&&(s.destroy(),this.$emit("chart:destroy")),this.renderChart(this.chartData,this.options),this.$emit("chart:render"))}else this.$data._chart&&(this.$data._chart.destroy(),this.$emit("chart:destroy")),this.renderChart(this.chartData,this.options),this.$emit("chart:render")}var M={data:function(){return{chartData:null}},watch:{chartData:_}},T={props:{chartData:{type:Object,required:!0,default:function(){}}},watch:{chartData:_}};const P={reactiveData:M,reactiveProp:T},{reactiveProp:z}=P,O={extends:p,mixins:[z],props:["options"],mounted(){this.renderChart(this.chartData,this.options)}},D={name:"StatsSection",components:{StatsChart:O},data(){return{options:{aspectRatio:3,maintainAspectRatio:!1,legend:{labels:{fontColor:"whitesmoke"}},scales:{xAxes:[{gridLines:{display:!1},ticks:{fontColor:"whitesmoke"}}],yAxes:[{id:"photos",type:"linear",position:"left",gridLines:{display:!1},ticks:{fontColor:"whitesmoke"}},{id:"users",type:"linear",position:"right",gridLines:{display:!1},ticks:{fontColor:"whitesmoke"}}]}}}},computed:{getUploadsPerMinute(){return(this.stats.photosPerMonth/30/24/60).toFixed(2)+" per minute"},getNewUsersPerDay(){return(this.stats.usersPerMonth/30).toFixed(2)+" per day"},getTagsPerMinute(){return(this.stats.litterTagsPerMonth/30/24/60).toFixed(2)+" per minute"},stats(){return this.$store.state.community},yearlyStats(){return this.stats.statsByMonth?{labels:this.stats.statsByMonth.periods,datasets:[{label:this.$i18n.t("home.community.photos-every-month-label"),yAxisID:"photos",borderColor:"#1DD3B0",borderWidth:3,pointBackgroundColor:"#008080",pointBorderColor:"#008080",backgroundColor:"transparent",data:this.stats.statsByMonth.photosByMonth},{label:this.$i18n.t("home.community.users-every-month-label"),yAxisID:"users",borderColor:"#c2f970",borderWidth:3,pointBackgroundColor:"#008080",pointBorderColor:"#008080",backgroundColor:"transparent",data:this.stats.statsByMonth.usersByMonth}]}:{}}},async mounted(){await this.$store.dispatch("GET_STATS")},methods:{commas(e){return parseInt(e).toLocaleString()}}};var R=function(){var t=this,s=t._self._c;return s("section",{staticClass:"hero section-stats"},[s("div",{staticClass:"hero-body is-flex"},[s("div",{staticClass:"stats"},[s("div",{staticClass:"stat has-text-light has-text-centered"},[s("div",{staticClass:"total has-text-weight-bold"},[s("number",{attrs:{from:0,to:t.stats.photosPerMonth,duration:2,delay:0,easing:"Power1.easeOut",format:t.commas}})],1),s("div",{staticClass:"is-size-5"},[t._v(t._s(t.$t("home.community.photos-last-30-days")))]),s("p",[t._v(t._s(t.getUploadsPerMinute))])]),s("div",{staticClass:"stat has-text-light has-text-centered"},[s("div",{staticClass:"total has-text-weight-bold"},[s("number",{attrs:{from:0,to:t.stats.usersPerMonth,duration:2,delay:0,easing:"Power1.easeOut",format:t.commas}})],1),s("div",{staticClass:"is-size-5"},[t._v(t._s(t.$t("home.community.users-last-30-days")))]),s("p",[t._v(t._s(t.getNewUsersPerDay))])]),s("div",{staticClass:"stat has-text-light has-text-centered"},[s("div",{staticClass:"total has-text-weight-bold"},[s("number",{attrs:{from:0,to:t.stats.litterTagsPerMonth,duration:2,delay:0,easing:"Power1.easeOut",format:t.commas}})],1),s("div",{staticClass:"is-size-5"},[t._v(t._s(t.$t("home.community.litter-tags-last-30-days")))]),s("p",[t._v(t._s(t.getTagsPerMinute))])])]),s("div",{staticClass:"charts mt-6"},[s("div",{staticClass:"chart"},[s("StatsChart",{attrs:{"chart-data":t.yearlyStats,options:t.options}})],1)])])])},B=[],U=r(D,R,B,!1,null,"e5c6f815");const L=U.exports,F="/build/assets/zoom-brand-logo-DPOquhA7.png",j={name:"ZoomSection",data(){return{days:null,hours:null,minutes:null,isLive:!1}},mounted(){setInterval(()=>{let e=new Date,t=new Date;t.setUTCDate(e.getUTCDate()+(11-e.getUTCDay())%7+1);let s=new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),18,0,0,0);if(e.getDay()===5){let a=new Date(e.getTime());const o=17,h=19;a.setUTCHours(o),a.setUTCMinutes(0),a.setUTCSeconds(0),a.setUTCMilliseconds(0);let n=new Date(a.getTime());n.setUTCHours(h),n.setUTCMinutes(30),this.isLive=e>=a&&e{let e=new Date,t=new Date;t.setUTCDate(e.getUTCDate()+(11-e.getUTCDay())%7+1);let s=new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),18,0,0,0);if(e.getDay()===5){let a=new Date(e.getTime());const o=17,h=19;a.setUTCHours(o),a.setUTCMinutes(0),a.setUTCSeconds(0),a.setUTCMilliseconds(0);let n=new Date(a.getTime());n.setUTCHours(h),n.setUTCMinutes(30),this.isLive=e>=a&&e1,expression:"leaderboard.currentPage > 1"}],staticClass:"button is-medium mr-1",on:{click:e.loadPreviousPage}},[e._v(" "+e._s(e.$t("common.previous"))+" ")]),a("button",{directives:[{name:"show",rawName:"v-show",value:e.leaderboard.hasNextPage,expression:"leaderboard.hasNextPage"}],staticClass:"button is-medium",on:{click:e.loadNextPage}},[e._v(" "+e._s(e.$t("common.next"))+" ")])]):e._e()],1)],1)])},d=[],l=o(r,i,d,!1,null,"2d78ff5e");const p=l.exports;export{p as default}; +import{L as t}from"./vue-loading-Ck0acTfr.js";import{L as s}from"./LeaderboardList-DXMp6mtM.js";import{n as o}from"./app-BwSojYvl.js";import"./moment-zH0z38ay.js";/* empty css */const r={name:"Leaderboard",components:{Loading:t,LeaderboardList:s},data(){return{loading:!0}},async created(){this.loading=!0,await this.$store.dispatch("GET_USERS_FOR_GLOBAL_LEADERBOARD","today"),this.loading=!1},computed:{leaderboard(){return this.$store.state.leaderboard}},methods:{async loadPreviousPage(){this.loading=!0,window.scrollTo({top:0,behavior:"smooth"}),await this.$store.dispatch("GET_PREVIOUS_LEADERBOARD_PAGE"),this.loading=!1},async loadNextPage(){this.loading=!0,window.scrollTo({top:0,behavior:"smooth"}),await this.$store.dispatch("GET_NEXT_LEADERBOARD_PAGE"),this.loading=!1},openWorldCup(){this.$router.push({path:"/world"})}}};var i=function(){var e=this,a=e._self._c;return a("section",{staticClass:"is-link hero is-bold is-fullheight"},[a("section",{staticClass:"wrapper is-link is-bold"},[a("div",{staticClass:"leaderboard-heading",on:{click:e.openWorldCup}},[a("i",{staticClass:"fa fa-arrow-left has-text-white"}),a("h3",{staticClass:"title is-2 has-text-centered has-text-white"},[e._v(" "+e._s(e.$t("location.global-leaderboard"))+" ")])]),e.loading?a("loading",{attrs:{active:!0,"is-full-page":!0,"background-color":"transparent",color:"white"}}):e._e(),e.loading?e._e():a("div",[a("LeaderboardList",{attrs:{leaders:e.leaderboard.users}}),e.leaderboard.users.length?a("div",{staticClass:"flex jc"},[a("button",{directives:[{name:"show",rawName:"v-show",value:e.leaderboard.currentPage>1,expression:"leaderboard.currentPage > 1"}],staticClass:"button is-medium mr-1",on:{click:e.loadPreviousPage}},[e._v(" "+e._s(e.$t("common.previous"))+" ")]),a("button",{directives:[{name:"show",rawName:"v-show",value:e.leaderboard.hasNextPage,expression:"leaderboard.hasNextPage"}],staticClass:"button is-medium",on:{click:e.loadNextPage}},[e._v(" "+e._s(e.$t("common.next"))+" ")])]):e._e()],1)],1)])},d=[],l=o(r,i,d,!1,null,"2d78ff5e");const p=l.exports;export{p as default}; diff --git a/public/build/assets/LeaderboardList-BGXAKUdR.js b/public/build/assets/LeaderboardList-DXMp6mtM.js similarity index 98% rename from public/build/assets/LeaderboardList-BGXAKUdR.js rename to public/build/assets/LeaderboardList-DXMp6mtM.js index 56920140..de2c7064 100644 --- a/public/build/assets/LeaderboardList-BGXAKUdR.js +++ b/public/build/assets/LeaderboardList-DXMp6mtM.js @@ -1 +1 @@ -import{h as d}from"./moment-zH0z38ay.js";import{n as _}from"./app-DuS6KM7M.js";const m={name:"LeaderboardFilters",props:["locationType","locationId"],data(){return{processing:!1,selected:"today",options:["all-time","today","yesterday","this-month","last-month","this-year"]}},methods:{async changeOption(e){this.selected=e,this.processing=!0,this.locationId&&this.locationType?await this.$store.dispatch("GET_USERS_FOR_LOCATION_LEADERBOARD",{timeFilter:e,locationId:this.locationId,locationType:this.locationType}):await this.$store.dispatch("GET_USERS_FOR_GLOBAL_LEADERBOARD",e),this.processing=!1},getNameForOption(e){return e==="today"?"Today":e==="yesterday"?"Yesterday":e==="this-month"?"This Month":e==="last-month"?"Last Month":e==="this-year"?"This Year":e==="all-time"?"All Time":""},async optionChanged(e){const t=e.target.value;this.selected=t,this.processing=!0,await this.$store.dispatch("GET_GLOBAL_LEADERBOARD",t),this.processing=!1}}};var p=function(){var t=this,s=t._self._c;return s("div",[s("div",{staticClass:"leaderboard-filters-container"},t._l(t.options,function(a){return s("p",{staticClass:"leaderboard-option",class:a===t.selected?"is-selected":"",on:{click:function(r){return t.changeOption(a)}}},[t._v(" "+t._s(t.getNameForOption(a))+" ")])}),0),s("div",{staticClass:"mobile-filters-container"},[s("select",{directives:[{name:"model",rawName:"v-model",value:t.selected,expression:"selected"}],staticClass:"input mb1",on:{change:[function(a){var r=Array.prototype.filter.call(a.target.options,function(i){return i.selected}).map(function(i){var n="_value"in i?i._value:i.value;return n});t.selected=a.target.multiple?r:r[0]},t.optionChanged]}},t._l(t.options,function(a){return s("option",{domProps:{value:a}},[t._v(" "+t._s(t.getNameForOption(a))+" ")])}),0)])])},f=[],u=_(m,p,f,!1,null,"4aab6639");const v=u.exports,o="/build/assets/gold-medal-2-DT1ucjbO.png",l="/build/assets/silver-medal-2-Dx0QRhyS.png",c="/build/assets/bronze-medal-2-DyRiKOrS.png",g={name:"LeaderboardList",props:["leaders","locationId","locationType"],components:{LeaderboardFilters:v},methods:{getCountryFlag(e){return e?(e=e.toLowerCase(),"/assets/icons/flags/"+e+".png"):""},getPosition(e){return d.localeData().ordinal(e)}}};var h=function(){var t=this,s=t._self._c;return s("div",{staticClass:"global-leaders"},[s("LeaderboardFilters",{attrs:{locationId:t.locationId,locationType:t.locationType}}),t.leaders.length===0?s("div",[s("p",{staticClass:"empty-leaderboard-title"},[t._v("Nobody has uploaded yet!")])]):t._e(),t._l(t.leaders,function(a,r){return s("div",{staticClass:"leader wow slideInLeft"},[a.rank?s("div",{staticClass:"medal"},[a.rank===1?s("img",{attrs:{src:o,alt:"Gold spot"}}):t._e(),a.rank===2?s("img",{attrs:{src:l,alt:"Silver spot"}}):t._e(),a.rank===3?s("img",{attrs:{src:c,alt:"Bronze spot"}}):t._e()]):s("div",{staticClass:"medal"},[r===0?s("img",{attrs:{src:o,alt:"Gold spot"}}):t._e(),r===1?s("img",{attrs:{src:l,alt:"Silver spot"}}):t._e(),r===2?s("img",{attrs:{src:c,alt:"Bronze spot"}}):t._e()]),s("div",{staticClass:"rank"},[a.rank?s("span",[t._v(t._s(t.getPosition(a.rank)))]):s("span",[t._v(t._s(t.getPosition(r+1)))]),s("div",{staticClass:"flag"},[s("img",{directives:[{name:"show",rawName:"v-show",value:a.global_flag,expression:"leader.global_flag"}],attrs:{src:t.getCountryFlag(a.global_flag),alt:a.global_flag}})])]),s("div",{staticClass:"details"},[s("div",{staticClass:"name"},[a.name||a.username?s("span",[t._v(t._s(a.name)+" "+t._s(a.username))]):s("span",[t._v(t._s(t.$t("common.anonymous")))])]),a.team?s("div",{staticClass:"team"},[t._v(" "+t._s(t.$t("common.team"))+" "+t._s(a.team)+" ")]):t._e(),a.social?s("div",{staticClass:"social-container"},t._l(a.social,function(i,n){return s("a",{attrs:{target:"_blank",href:i}},[s("i",{staticClass:"fa",class:n==="personal"?"fa-link":`fa-${n}`})])}),0):t._e()]),a.social?s("div",{staticClass:"social-container"},t._l(a.social,function(i,n){return s("a",{attrs:{target:"_blank",href:i}},[s("i",{staticClass:"fa",class:n==="personal"?"fa-link":`fa-${n}`})])}),0):t._e(),s("div",{staticClass:"xp"},[s("div",{staticClass:"value"},[t._v(t._s(a.xp))]),s("div",{staticClass:"text"},[t._v("XP")])])])})],2)},C=[],b=_(g,h,C,!1,null,"5ae5a51c");const O=b.exports;export{O as L}; +import{h as d}from"./moment-zH0z38ay.js";import{n as _}from"./app-BwSojYvl.js";const m={name:"LeaderboardFilters",props:["locationType","locationId"],data(){return{processing:!1,selected:"today",options:["all-time","today","yesterday","this-month","last-month","this-year"]}},methods:{async changeOption(e){this.selected=e,this.processing=!0,this.locationId&&this.locationType?await this.$store.dispatch("GET_USERS_FOR_LOCATION_LEADERBOARD",{timeFilter:e,locationId:this.locationId,locationType:this.locationType}):await this.$store.dispatch("GET_USERS_FOR_GLOBAL_LEADERBOARD",e),this.processing=!1},getNameForOption(e){return e==="today"?"Today":e==="yesterday"?"Yesterday":e==="this-month"?"This Month":e==="last-month"?"Last Month":e==="this-year"?"This Year":e==="all-time"?"All Time":""},async optionChanged(e){const t=e.target.value;this.selected=t,this.processing=!0,await this.$store.dispatch("GET_GLOBAL_LEADERBOARD",t),this.processing=!1}}};var p=function(){var t=this,s=t._self._c;return s("div",[s("div",{staticClass:"leaderboard-filters-container"},t._l(t.options,function(a){return s("p",{staticClass:"leaderboard-option",class:a===t.selected?"is-selected":"",on:{click:function(r){return t.changeOption(a)}}},[t._v(" "+t._s(t.getNameForOption(a))+" ")])}),0),s("div",{staticClass:"mobile-filters-container"},[s("select",{directives:[{name:"model",rawName:"v-model",value:t.selected,expression:"selected"}],staticClass:"input mb1",on:{change:[function(a){var r=Array.prototype.filter.call(a.target.options,function(i){return i.selected}).map(function(i){var n="_value"in i?i._value:i.value;return n});t.selected=a.target.multiple?r:r[0]},t.optionChanged]}},t._l(t.options,function(a){return s("option",{domProps:{value:a}},[t._v(" "+t._s(t.getNameForOption(a))+" ")])}),0)])])},f=[],u=_(m,p,f,!1,null,"4aab6639");const v=u.exports,o="/build/assets/gold-medal-2-DT1ucjbO.png",l="/build/assets/silver-medal-2-Dx0QRhyS.png",c="/build/assets/bronze-medal-2-DyRiKOrS.png",g={name:"LeaderboardList",props:["leaders","locationId","locationType"],components:{LeaderboardFilters:v},methods:{getCountryFlag(e){return e?(e=e.toLowerCase(),"/assets/icons/flags/"+e+".png"):""},getPosition(e){return d.localeData().ordinal(e)}}};var h=function(){var t=this,s=t._self._c;return s("div",{staticClass:"global-leaders"},[s("LeaderboardFilters",{attrs:{locationId:t.locationId,locationType:t.locationType}}),t.leaders.length===0?s("div",[s("p",{staticClass:"empty-leaderboard-title"},[t._v("Nobody has uploaded yet!")])]):t._e(),t._l(t.leaders,function(a,r){return s("div",{staticClass:"leader wow slideInLeft"},[a.rank?s("div",{staticClass:"medal"},[a.rank===1?s("img",{attrs:{src:o,alt:"Gold spot"}}):t._e(),a.rank===2?s("img",{attrs:{src:l,alt:"Silver spot"}}):t._e(),a.rank===3?s("img",{attrs:{src:c,alt:"Bronze spot"}}):t._e()]):s("div",{staticClass:"medal"},[r===0?s("img",{attrs:{src:o,alt:"Gold spot"}}):t._e(),r===1?s("img",{attrs:{src:l,alt:"Silver spot"}}):t._e(),r===2?s("img",{attrs:{src:c,alt:"Bronze spot"}}):t._e()]),s("div",{staticClass:"rank"},[a.rank?s("span",[t._v(t._s(t.getPosition(a.rank)))]):s("span",[t._v(t._s(t.getPosition(r+1)))]),s("div",{staticClass:"flag"},[s("img",{directives:[{name:"show",rawName:"v-show",value:a.global_flag,expression:"leader.global_flag"}],attrs:{src:t.getCountryFlag(a.global_flag),alt:a.global_flag}})])]),s("div",{staticClass:"details"},[s("div",{staticClass:"name"},[a.name||a.username?s("span",[t._v(t._s(a.name)+" "+t._s(a.username))]):s("span",[t._v(t._s(t.$t("common.anonymous")))])]),a.team?s("div",{staticClass:"team"},[t._v(" "+t._s(t.$t("common.team"))+" "+t._s(a.team)+" ")]):t._e(),a.social?s("div",{staticClass:"social-container"},t._l(a.social,function(i,n){return s("a",{attrs:{target:"_blank",href:i}},[s("i",{staticClass:"fa",class:n==="personal"?"fa-link":`fa-${n}`})])}),0):t._e()]),a.social?s("div",{staticClass:"social-container"},t._l(a.social,function(i,n){return s("a",{attrs:{target:"_blank",href:i}},[s("i",{staticClass:"fa",class:n==="personal"?"fa-link":`fa-${n}`})])}),0):t._e(),s("div",{staticClass:"xp"},[s("div",{staticClass:"value"},[t._v(t._s(a.xp))]),s("div",{staticClass:"text"},[t._v("XP")])])])})],2)},C=[],b=_(g,h,C,!1,null,"5ae5a51c");const O=b.exports;export{O as L}; diff --git a/public/build/assets/LitterTable-ChsxOeDI.js b/public/build/assets/LitterTable-BrAEt-_i.js similarity index 99% rename from public/build/assets/LitterTable-ChsxOeDI.js rename to public/build/assets/LitterTable-BrAEt-_i.js index d6441038..f1b51feb 100644 --- a/public/build/assets/LitterTable-ChsxOeDI.js +++ b/public/build/assets/LitterTable-BrAEt-_i.js @@ -1 +1 @@ -import{n as l}from"./app-DuS6KM7M.js";const n={name:"FilterPhotos",props:["action","parent"],methods:{async getData(){await this.$store.dispatch(this.action)}},computed:{countries(){return this.$store.state.locations.countryNames},filterTag:{get(){return this.$store.state.user.filterPhotos.filterTag},set(a){this.$store.commit("setFilterTag",a)}},filterCustomTag:{get(){return this.$store.state.user.filterPhotos.filterCustomTag},set(a){this.$store.commit("setFilterCustomTag",a)}},filterDateFrom:{get(){return this.$store.state.user.filterPhotos.filterDateFrom},set(a){this.$store.commit("setFilterDateFrom",a)}},filterDateTo:{get(){return this.$store.state.user.filterPhotos.filterDateTo},set(a){this.$store.commit("setFilterDateTo",a)}},filterCountry:{get(){return this.$store.state.user.filterPhotos.filterCountry},set(a){this.$store.commit("setFilterCountry",a)}},paginationAmount:{get(){return this.$store.state.user.filterPhotos.paginationAmount},set(a){this.$store.commit("setFilterPhotosPaginationAmount",a)}}}};var c=function(){var t=this,e=t._self._c;return e("div",{staticClass:"filters"},[e("div",{staticClass:"filter-item"},[e("label",{attrs:{for:"filterTag"}},[t._v(" Tag ")]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.filterTag,expression:"filterTag"}],staticClass:"input",attrs:{id:"filterTag",name:"filterTag",placeholder:"Enter a tag"},domProps:{value:t.filterTag},on:{input:function(o){o.target.composing||(t.filterTag=o.target.value)}}})]),e("div",{staticClass:"filter-item"},[e("label",{attrs:{for:"filterCustomTag"}},[t._v(" Custom Tag ")]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.filterCustomTag,expression:"filterCustomTag"}],staticClass:"input",attrs:{id:"filterCustomTag",name:"filterCustomTag",placeholder:"Enter a custom tag"},domProps:{value:t.filterCustomTag},on:{input:function(o){o.target.composing||(t.filterCustomTag=o.target.value)}}})]),e("div",{staticClass:"filter-item"},[e("label",{attrs:{for:"uploadedFrom"}},[t._v(" Uploaded From ")]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.filterDateFrom,expression:"filterDateFrom"}],staticClass:"input",attrs:{id:"uploadedFrom",name:"uploadedFrom",type:"date",placeholder:"From"},domProps:{value:t.filterDateFrom},on:{input:function(o){o.target.composing||(t.filterDateFrom=o.target.value)}}})]),e("div",{staticClass:"filter-item"},[e("label",{attrs:{for:"uploadedTo"}},[t._v(" Uploaded To ")]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.filterDateTo,expression:"filterDateTo"}],staticClass:"input",attrs:{id:"uploadedTo",name:"uploadedTo",type:"date",placeholder:"To"},domProps:{value:t.filterDateTo},on:{input:function(o){o.target.composing||(t.filterDateTo=o.target.value)}}})]),t.parent==="global"?e("div",{staticClass:"filter-item"},[e("label",{attrs:{for:"filterCountry"}},[t._v(" Country ")]),e("select",{directives:[{name:"model",rawName:"v-model",value:t.filterCountry,expression:"filterCountry"}],staticClass:"input",on:{change:function(o){var r=Array.prototype.filter.call(o.target.options,function(i){return i.selected}).map(function(i){var s="_value"in i?i._value:i.value;return s});t.filterCountry=o.target.multiple?r:r[0]}}},[e("option",{attrs:{value:"all",selected:""}},[t._v("All")]),t._l(t.countries,function(o){return e("option",{key:o.id,domProps:{value:o.id}},[t._v(t._s(o.country))])})],2)]):t._e(),e("div",{staticClass:"filter-item"},[e("label",{attrs:{for:"uploadedTo"}},[t._v(" Amount ")]),e("select",{directives:[{name:"model",rawName:"v-model",value:t.paginationAmount,expression:"paginationAmount"}],staticClass:"input",on:{change:function(o){var r=Array.prototype.filter.call(o.target.options,function(i){return i.selected}).map(function(i){var s="_value"in i?i._value:i.value;return s});t.paginationAmount=o.target.multiple?r:r[0]}}},[e("option",{attrs:{value:"25"}},[t._v("25")]),e("option",{attrs:{value:"50"}},[t._v("50")]),e("option",{attrs:{value:"100"}},[t._v("100")])])]),e("button",{staticClass:"button is-small is-primary",staticStyle:{"margin-top":"25px"},on:{click:t.getData}},[t._v("Apply Filters")])])},u=[],d=l(n,c,u,!1,null,"f169fac0");const m=d.exports,p={name:"LitterTable",components:{FilterPhotos:m},props:["title","action","paginatedPhotos"],data(){return{showCopyNotification:!1,currentPage:1,lastPage:1}},methods:{getCustomTags(a){return a.map(t=>t.tag).join(", ")},async copyLinkToClipboard(a){const t=`https://openlittermap.com/global?lat=${a.lat}&lon=${a.lon}&zoom=17&photo=${a.id}`;if(navigator.clipboard)try{await navigator.clipboard.writeText(t);return}catch(e){console.error("Failed to copy with Clipboard API: ",e)}this.copyToFallbackClipboard(t)},copyToFallbackClipboard(a){const t=document.createElement("textarea");t.value=a,document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy")}catch(e){console.error("Fallback copy to clipboard failed: ",e)}finally{document.body.removeChild(t)}},openLinkNewTab(a){const t=`${window.location.origin}/global?lat=${a.lat}&lon=${a.lon}&zoom=17&photo=${a.id}`;window.open(t,"_blank")},async loadPreviousPage(){const a=this.paginatedPhotos.current_page-1;await this.$store.dispatch(this.action,a)},async loadNextPage(){const a=this.paginatedPhotos.current_page+1;await this.$store.dispatch(this.action,a)}}};var g=function(){var t=this,e=t._self._c;return e("div",{staticClass:"uploads-container"},[e("h3",{staticClass:"uploads-title"},[t._v(" "+t._s(this.title)+" "),e("span",[t._v(" ("+t._s(this.paginatedPhotos.total)+")")])]),e("FilterPhotos",{attrs:{action:this.action,parent:"global"}}),e("div",{staticClass:"table-wrapper"},[e("table",{staticClass:"uploads-table"},[t._m(0),e("tbody",t._l(t.paginatedPhotos.data,function(o){return e("tr",{key:o.id},[e("td",[t._v(" "+t._s(o.id)+" ")]),e("td",[t._v(" "+t._s(o.result_string?o.result_string:"No tags")+" ")]),e("td",[t._v(" "+t._s(o.custom_tags.length?t.getCustomTags(o.custom_tags):"No tags")+" ")]),e("td",[t._v(" "+t._s(o.datetime)+" ")]),e("td",{staticStyle:{"max-width":"15em"}},[t._v(" "+t._s(o.display_name)+" ")]),e("td",{staticClass:"centre-table-buttons"},[e("button",{on:{click:function(r){return t.copyLinkToClipboard(o)}}},[t._v(" Copy Link ")]),e("button",{on:{click:function(r){return t.openLinkNewTab(o)}}},[t._v(" Open ")])])])}),0)])]),e("div",{staticClass:"pagination"},[e("button",{attrs:{disabled:this.paginatedPhotos.current_page===1},on:{click:t.loadPreviousPage}},[t._v(" Previous ")]),e("p",[t._v(t._s(this.paginatedPhotos.current_page))]),e("button",{attrs:{disabled:this.paginatedPhotos.next_page_url===null},on:{click:t.loadNextPage}},[t._v(" Next ")])])],1)},v=[function(){var a=this,t=a._self._c;return t("thead",[t("tr",[t("th",[a._v("ID")]),t("th",[a._v("Tags")]),t("th",[a._v("Custom Tags")]),t("th",[a._v("Taken at")]),t("th",{staticStyle:{"max-width":"15em"}},[a._v("Address")]),t("th",[a._v("Actions")])])])}],f=l(p,g,v,!1,null,"03a1a97e");const h=f.exports;export{h as L}; +import{n as l}from"./app-BwSojYvl.js";const n={name:"FilterPhotos",props:["action","parent"],methods:{async getData(){await this.$store.dispatch(this.action)}},computed:{countries(){return this.$store.state.locations.countryNames},filterTag:{get(){return this.$store.state.user.filterPhotos.filterTag},set(a){this.$store.commit("setFilterTag",a)}},filterCustomTag:{get(){return this.$store.state.user.filterPhotos.filterCustomTag},set(a){this.$store.commit("setFilterCustomTag",a)}},filterDateFrom:{get(){return this.$store.state.user.filterPhotos.filterDateFrom},set(a){this.$store.commit("setFilterDateFrom",a)}},filterDateTo:{get(){return this.$store.state.user.filterPhotos.filterDateTo},set(a){this.$store.commit("setFilterDateTo",a)}},filterCountry:{get(){return this.$store.state.user.filterPhotos.filterCountry},set(a){this.$store.commit("setFilterCountry",a)}},paginationAmount:{get(){return this.$store.state.user.filterPhotos.paginationAmount},set(a){this.$store.commit("setFilterPhotosPaginationAmount",a)}}}};var c=function(){var t=this,e=t._self._c;return e("div",{staticClass:"filters"},[e("div",{staticClass:"filter-item"},[e("label",{attrs:{for:"filterTag"}},[t._v(" Tag ")]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.filterTag,expression:"filterTag"}],staticClass:"input",attrs:{id:"filterTag",name:"filterTag",placeholder:"Enter a tag"},domProps:{value:t.filterTag},on:{input:function(o){o.target.composing||(t.filterTag=o.target.value)}}})]),e("div",{staticClass:"filter-item"},[e("label",{attrs:{for:"filterCustomTag"}},[t._v(" Custom Tag ")]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.filterCustomTag,expression:"filterCustomTag"}],staticClass:"input",attrs:{id:"filterCustomTag",name:"filterCustomTag",placeholder:"Enter a custom tag"},domProps:{value:t.filterCustomTag},on:{input:function(o){o.target.composing||(t.filterCustomTag=o.target.value)}}})]),e("div",{staticClass:"filter-item"},[e("label",{attrs:{for:"uploadedFrom"}},[t._v(" Uploaded From ")]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.filterDateFrom,expression:"filterDateFrom"}],staticClass:"input",attrs:{id:"uploadedFrom",name:"uploadedFrom",type:"date",placeholder:"From"},domProps:{value:t.filterDateFrom},on:{input:function(o){o.target.composing||(t.filterDateFrom=o.target.value)}}})]),e("div",{staticClass:"filter-item"},[e("label",{attrs:{for:"uploadedTo"}},[t._v(" Uploaded To ")]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.filterDateTo,expression:"filterDateTo"}],staticClass:"input",attrs:{id:"uploadedTo",name:"uploadedTo",type:"date",placeholder:"To"},domProps:{value:t.filterDateTo},on:{input:function(o){o.target.composing||(t.filterDateTo=o.target.value)}}})]),t.parent==="global"?e("div",{staticClass:"filter-item"},[e("label",{attrs:{for:"filterCountry"}},[t._v(" Country ")]),e("select",{directives:[{name:"model",rawName:"v-model",value:t.filterCountry,expression:"filterCountry"}],staticClass:"input",on:{change:function(o){var r=Array.prototype.filter.call(o.target.options,function(i){return i.selected}).map(function(i){var s="_value"in i?i._value:i.value;return s});t.filterCountry=o.target.multiple?r:r[0]}}},[e("option",{attrs:{value:"all",selected:""}},[t._v("All")]),t._l(t.countries,function(o){return e("option",{key:o.id,domProps:{value:o.id}},[t._v(t._s(o.country))])})],2)]):t._e(),e("div",{staticClass:"filter-item"},[e("label",{attrs:{for:"uploadedTo"}},[t._v(" Amount ")]),e("select",{directives:[{name:"model",rawName:"v-model",value:t.paginationAmount,expression:"paginationAmount"}],staticClass:"input",on:{change:function(o){var r=Array.prototype.filter.call(o.target.options,function(i){return i.selected}).map(function(i){var s="_value"in i?i._value:i.value;return s});t.paginationAmount=o.target.multiple?r:r[0]}}},[e("option",{attrs:{value:"25"}},[t._v("25")]),e("option",{attrs:{value:"50"}},[t._v("50")]),e("option",{attrs:{value:"100"}},[t._v("100")])])]),e("button",{staticClass:"button is-small is-primary",staticStyle:{"margin-top":"25px"},on:{click:t.getData}},[t._v("Apply Filters")])])},u=[],d=l(n,c,u,!1,null,"f169fac0");const m=d.exports,p={name:"LitterTable",components:{FilterPhotos:m},props:["title","action","paginatedPhotos"],data(){return{showCopyNotification:!1,currentPage:1,lastPage:1}},methods:{getCustomTags(a){return a.map(t=>t.tag).join(", ")},async copyLinkToClipboard(a){const t=`https://openlittermap.com/global?lat=${a.lat}&lon=${a.lon}&zoom=17&photo=${a.id}`;if(navigator.clipboard)try{await navigator.clipboard.writeText(t);return}catch(e){console.error("Failed to copy with Clipboard API: ",e)}this.copyToFallbackClipboard(t)},copyToFallbackClipboard(a){const t=document.createElement("textarea");t.value=a,document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy")}catch(e){console.error("Fallback copy to clipboard failed: ",e)}finally{document.body.removeChild(t)}},openLinkNewTab(a){const t=`${window.location.origin}/global?lat=${a.lat}&lon=${a.lon}&zoom=17&photo=${a.id}`;window.open(t,"_blank")},async loadPreviousPage(){const a=this.paginatedPhotos.current_page-1;await this.$store.dispatch(this.action,a)},async loadNextPage(){const a=this.paginatedPhotos.current_page+1;await this.$store.dispatch(this.action,a)}}};var g=function(){var t=this,e=t._self._c;return e("div",{staticClass:"uploads-container"},[e("h3",{staticClass:"uploads-title"},[t._v(" "+t._s(this.title)+" "),e("span",[t._v(" ("+t._s(this.paginatedPhotos.total)+")")])]),e("FilterPhotos",{attrs:{action:this.action,parent:"global"}}),e("div",{staticClass:"table-wrapper"},[e("table",{staticClass:"uploads-table"},[t._m(0),e("tbody",t._l(t.paginatedPhotos.data,function(o){return e("tr",{key:o.id},[e("td",[t._v(" "+t._s(o.id)+" ")]),e("td",[t._v(" "+t._s(o.result_string?o.result_string:"No tags")+" ")]),e("td",[t._v(" "+t._s(o.custom_tags.length?t.getCustomTags(o.custom_tags):"No tags")+" ")]),e("td",[t._v(" "+t._s(o.datetime)+" ")]),e("td",{staticStyle:{"max-width":"15em"}},[t._v(" "+t._s(o.display_name)+" ")]),e("td",{staticClass:"centre-table-buttons"},[e("button",{on:{click:function(r){return t.copyLinkToClipboard(o)}}},[t._v(" Copy Link ")]),e("button",{on:{click:function(r){return t.openLinkNewTab(o)}}},[t._v(" Open ")])])])}),0)])]),e("div",{staticClass:"pagination"},[e("button",{attrs:{disabled:this.paginatedPhotos.current_page===1},on:{click:t.loadPreviousPage}},[t._v(" Previous ")]),e("p",[t._v(t._s(this.paginatedPhotos.current_page))]),e("button",{attrs:{disabled:this.paginatedPhotos.next_page_url===null},on:{click:t.loadNextPage}},[t._v(" Next ")])])],1)},v=[function(){var a=this,t=a._self._c;return t("thead",[t("tr",[t("th",[a._v("ID")]),t("th",[a._v("Tags")]),t("th",[a._v("Custom Tags")]),t("th",[a._v("Taken at")]),t("th",{staticStyle:{"max-width":"15em"}},[a._v("Address")]),t("th",[a._v("Actions")])])])}],f=l(p,g,v,!1,null,"03a1a97e");const h=f.exports;export{h as L}; diff --git a/public/build/assets/Littercoin-CNmEbY4c.js b/public/build/assets/Littercoin-DRfqG3mg.js similarity index 99% rename from public/build/assets/Littercoin-CNmEbY4c.js rename to public/build/assets/Littercoin-DRfqG3mg.js index 0980271b..c8c3d371 100644 --- a/public/build/assets/Littercoin-CNmEbY4c.js +++ b/public/build/assets/Littercoin-DRfqG3mg.js @@ -1 +1 @@ -import{n as c}from"./app-DuS6KM7M.js";/* empty css */const l="/build/assets/nami-BuYycVV_.png",d="/build/assets/eternl-CDqNp3Eg.png",u={name:"Littercoin",async created(){this.loading=!0,await axios.get("/get-users-littercoin").then(a=>{this.littercoinEarned=a.data.littercoinEarned,this.littercoinDue=a.data.littercoinDue}).catch(a=>{console.error("littercoin",a)}),await axios.get("/littercoin-info").then(async a=>{const t=await JSON.parse(a.data);if(t.status==200)this.adaAmount=t.payload.list[0].int/1e6,this.lcAmount=t.payload.list[1].int,this.ratio=this.adaAmount/this.lcAmount,this.lcAddr=t.payload.addr,this.lcAddrURL="https://cexplorer.io/address/"+t.payload.addr,this.lcScriptName=t.payload.scriptName,this.lcScriptURL="/contracts/"+t.payload.scriptName;else throw console.error("Could not fetch littercoin contract info")}).catch(a=>{console.error("littercoin-info",a)}),await axios.get("https://api.coingecko.com/api/v3/simple/price?ids=cardano&vs_currencies=usd").then(a=>{console.log("ada-price",a),this.adaValues=a.data.cardano}).catch(a=>{console.error("ada-price",a)}),this.loading=!1},data(){return{loading:!0,adaAmount:0,lcAmount:0,ratio:0,adaValues:{},selectedCurrency:"usd",currencySymbols:{usd:"$",eur:"€",btc:"₿"},lcAddr:"",lcAddrURL:"",lcScriptName:"",lcScriptURL:"",littercoinEarned:0,littercoinDue:0,walletChoice:"",walletLoading:!1,adaBalance:0,littercoinBalance:0,merchTokenBalance:0,mintDestAddr:"",merchDestAddr:"",addAdaQty:0,lcQty:0,mintFormSubmitted:!1,burnFormSubmitted:!1,merchFormSubmitted:!1,addAdaFormSubmitted:!1,mintSuccess:!1,burnSuccess:!1,merchSuccess:!1,addAdaSuccess:!1,mintTxId:"",burnTxId:"",merchTxId:"",addAdaTxId:"",mintTxIdURL:"",burnTxIdURL:"",merchTxIdURL:"",addAdaTxIdURL:""}},computed:{user(){return this.$store.state.user.user},isAdmin(){return this.$store.state.user.admin},checkMintDisabled(){return!!this.mintFormSubmitted},checkBurnDisabled(){return!!this.burnFormSubmitted},checkMerchDisabled(){return!!this.merchFormSubmitted},checkAddAdaDisabled(){return!!this.addAdaFormSubmitted},getLittercoinPrice(){const a=this.currencySymbols[this.selectedCurrency],t=this.adaValues[this.selectedCurrency];return this.lcAmount===0?0:a.toString()+(this.ratio*t).toFixed(2).toString()}},methods:{async getWalletInfo(){this.walletLoading=!0;try{var a;this.walletChoice==="nami"?a=await window.cardano.nami.enable():this.walletChoice==="eternl"?a=await window.cardano.eternl.enable():(alert("No wallet selected"),this.mintFormSubmitted=!1);const t=await a.getBalance();console.log({balanceCbor:t});const e=await a.getUtxos();console.log({cborUtxos:e}),await axios.post("/wallet-info",{balanceCborHex:t,utxos:e}).then(async i=>{const s=await JSON.parse(i.data);this.adaBalance=s.payload.adaAmt,this.littercoinBalance=s.payload.lcAmt,this.merchTokenBalance=s.payload.mtAmt,this.walletLoading=!1}).catch(i=>{console.error("Error accessing user wallet",i.response.data.errors),alert("Error accessing user wallet")})}catch(t){console.error(t)}},submitForm:function(a){if(!this.walletChoice){alert("Please select a wallet");return}if(this.adaBalance<5){alert("Not enough Ada in the wallet for a transaction, please make sure there is 5 or more Ada in your wallet");return}if(a==="mint"){if(!this.mintDestAddr.match(/^addr/)){alert("Please enter a valid mint littercoin destination address");return}if(!this.littercoinDue>0){alert("There are no littercoin due for minting");return}this.mintFormSubmitted=!0,this.submitMint()}if(a==="burn"){if(this.lcQty<1){alert("Minimum 1 littercoin required for burn");return}if(this.lcQty>this.littercoinBalance){alert("The amount of littercoin to burn exceeds the amount of littercoin in the wallet");return}if(this.merchTokenBalance<1){alert("No Merchant Tokens founds in the wallet");return}this.burnFormSubmitted=!0,this.submitBurn()}if(a==="merchant"){if(!this.merchDestAddr.match(/^addr/)){alert("Please enter a valid mint merchant token destination address");return}this.merchFormSubmitted=!0,this.merchMint()}if(a==="addAda"){if(!this.addAdaQty>2){alert("Minimum 2 Ada donation amount required");return}this.addAdaFormSubmitted=!0,this.addAda()}},async submitMint(){try{var a;this.walletChoice==="nami"?a=await window.cardano.nami.enable():this.walletChoice==="eternl"?a=await window.cardano.eternl.enable():(alert("No wallet selected"),this.mintFormSubmitted=!1);const t=await a.getUtxos(),e=await a.getChangeAddress();await axios.post("/littercoin-mint-tx",{destAddr:this.mintDestAddr,changeAddr:e,utxos:t}).then(async i=>{const s=await JSON.parse(i.data);if(s.status==200){console.log("Get wallet signature");var o;try{o=await a.signTx(s.cborTx,!0)}catch(r){console.error(r),this.mintFormSubmitted=!1;return}console.log("Submit transaction..."),await axios.post("/littercoin-submit-mint-tx",{cborSig:o,cborTx:s.cborTx}).then(async r=>{const n=await JSON.parse(r.data);n.status==200?(this.mintTxId=n.txId,this.mintTxIdURL="https://cexplorer.io/tx/"+n.txId,this.mintSuccess=!0):(console.error("Littercoin Mint transaction could not be submitted"),alert("Littercoin Mint transaction could not be submitted, please try again"),this.mintFormSubmitted=!1)}).catch(r=>{r.response.status==422?console.error("Invalid Wallet Input",r.response.data.errors):console.error("littercoin-submit-mint-tx: ",r),alert("Littercoin Mint transaction could not be submitted, please try again"),this.mintFormSubmitted=!1})}else console.error("Littercoin Mint transaction could not be submitted"),alert("Littercoin Mint transaction could not be submitted, please try again"),this.mintFormSubmitted=!1}).catch(i=>{i.response.status==422?(console.error("Invalid User Input",i.response.data.errors),alert("Please check that you have entered a valid destination address")):(console.error("littercoin-mint-tx",i),alert("Littercoin Mint transaction could not be submitted, please try again")),this.mintFormSubmitted=!1})}catch(t){console.error(t),this.mintFormSubmitted=!1}},async submitBurn(){try{var a;this.walletChoice==="nami"?a=await window.cardano.nami.enable():this.walletChoice==="eternl"?a=await window.cardano.eternl.enable():(alert("No wallet selected"),this.burnFormSubmitted=!1);const t=await a.getUtxos(),e=await a.getChangeAddress();await axios.post("/littercoin-burn-tx",{lcQty:this.lcQty,changeAddr:e,utxos:t}).then(async i=>{const s=await JSON.parse(i.data);if(s.status==200){console.log("Get wallet signature");var o;try{o=await a.signTx(s.cborTx,!0)}catch(r){console.error(r),this.burnFormSubmitted=!1;return}console.log("Submit transaction..."),await axios.post("/littercoin-submit-burn-tx",{cborSig:o,cborTx:s.cborTx}).then(async r=>{const n=await JSON.parse(r.data);n.status==200?(this.burnTxId=n.txId,this.burnTxIdURL="https://cexplorer.io/tx/"+n.txId,this.burnSuccess=!0):(console.error("Littercoin Burn transaction was not successful"),alert("Littercoin Burn transaction could not be submitted, please try again"),this.burnFormSubmitted=!1)}).catch(r=>{r.response.status==422?console.error("Invalid Wallet Input",r.response.data.errors):console.error("littercoin-submit-burn-tx: ",r),alert("Littercoin Burn transaction could not be submitted, please try again"),this.burnFormSubmitted=!1})}else s.status==401?(console.error("Insufficient Littercoin In Wallet For Burn"),alert("Insufficient Littercoin In Wallet For Burn"),this.burnFormSubmitted=!1):s.status==402?(console.error("Merchant Token Not Found"),alert("Merchant Token Not Found"),this.burnFormSubmitted=!1):s.status==403?(console.error("Ada Withdraw amount is less than the minimum 2 Ada"),alert("Ada Withdraw amount is less than the minimum 2 Ada"),this.burnFormSubmitted=!1):s.status==404?(console.error("Insufficient funds in Littercoin contract"),alert("Insufficient funds in Littercoin contract"),this.burnFormSubmitted=!1):s.status==405?(console.error("No valid merchant token found in the wallet"),alert("No valid merchant token found in the wallet"),this.burnFormSubmitted=!1):(console.error("Littercoin Burn transaction was not successful"),alert("Littercoin Burn transaction could not be submitted, please try again"),this.burnFormSubmitted=!1)}).catch(i=>{i.response.status==422?(console.error("Invalid User Input",i.response.data.errors),alert("Please check that you have entered a valid destination address")):(console.error("littercoin-burn-tx",i),alert("Littercoin Burn transaction could not be submitted, please try again")),this.burnFormSubmitted=!1})}catch(t){console.error(t),this.burnFormSubmitted=!1}},async merchMint(){try{var a;this.walletChoice==="nami"?a=await window.cardano.nami.enable():this.walletChoice==="eternl"?a=await window.cardano.eternl.enable():(alert("No wallet selected"),this.merchFormSubmitted=!1);const t=await a.getUtxos(),e=await a.getChangeAddress();await axios.post("/merchant-mint-tx",{destAddr:this.merchDestAddr,changeAddr:e,utxos:t}).then(async i=>{const s=await JSON.parse(i.data);if(s.status==200){console.log("Get wallet signature");var o;try{o=await a.signTx(s.cborTx,!0)}catch(r){console.error(r),this.merchFormSubmitted=!1;return}console.log("Submit transaction..."),await axios.post("/merchant-submit-mint-tx",{cborSig:o,cborTx:s.cborTx}).then(async r=>{const n=await JSON.parse(r.data);n.status==200?(this.merchTxId=n.txId,this.merchTxIdURL="https://cexplorer.io/tx/"+n.txId,this.merchSuccess=!0):(console.error("Merchant Token Mint transaction could not be submitted"),alert("Merchant Token Mint transaction could not be submitted, please try again"),this.merchFormSubmitted=!1)}).catch(r=>{r.response.status==422?console.error("Invalid Wallet Input",r.response.data.errors):console.error("merchant-submit-mint-tx: ",r),alert("Merchant Token Mint transaction could not be submitted, please try again"),this.merchFormSubmitted=!1})}else s.status==407?(console.error("Must be an admin user to mint a merchant token"),alert("Must be an admin user to mint a merchant token"),this.merchFormSubmitted=!1):(console.error("Merchant Token Mint transaction could not be submitted"),alert("Merchant Token Mint transaction could not be submitted, please try again"),this.merchFormSubmitted=!1)}).catch(i=>{i.response.status==422?(console.error("Invalid User Input",i.response.data.errors),alert("Please check that you have entered a valid destination address")):(console.error("merchant-submit-mint-tx: ",i),alert("Merchant Token Mint transaction could not be submitted, please try again")),this.merchFormSubmitted=!1})}catch(t){console.error(t),this.merchFormSubmitted=!1}},async addAda(){try{var a;this.walletChoice==="nami"?a=await window.cardano.nami.enable():this.walletChoice==="eternl"?a=await window.cardano.eternl.enable():(alert("No wallet selected"),this.addAdaFormSubmitted=!1);const t=await a.getUtxos(),e=await a.getChangeAddress();await axios.post("/add-ada-tx",{adaQty:this.addAdaQty,changeAddr:e,utxos:t}).then(async i=>{const s=await JSON.parse(i.data);if(s.status==200){console.log("Get wallet signature");var o;try{o=await a.signTx(s.cborTx,!0)}catch(r){console.error(r),this.addAdaFormSubmitted=!1;return}await axios.post("/add-ada-submit-tx",{cborSig:o,cborTx:s.cborTx}).then(async r=>{const n=await JSON.parse(r.data);n.status==200?(this.addAdaTxId=n.txId,this.addAdaTxIdURL="https://cexplorer.io/tx/"+n.txId,this.addAdaSuccess=!0):(console.error("Could not submit transaction"),alert("Add Ada transaction could not be submitted, please try again"),this.addAdaFormSubmitted=!1)}).catch(r=>{r.response.status==422?console.error("Invalid Wallet Input",r.response.data.errors):console.error("add-ada-submit-tx: ",r),alert("Add Ada transaction could not be submitted, please try again"),this.addAdaFormSubmitted=!1})}else s.status==408?(console.error("More Ada in the wallet required for this transaction"),alert('More Ada in the wallet required for this transaction"'),this.addAdaFormSubmitted=!1):(console.error("Add Ada transaction was not successful"),alert("Add Ada transaction could not be submitted, please try again"),this.addAdaFormSubmitted=!1)}).catch(i=>{i.response.status==422?(console.error("Invalid User Input",i.response.data.errors),alert("Please check that you have entered a valid destination address")):(console.error("add-ada-tx",i),alert("Add Ada transaction could not be submitted, please try again")),this.addAdaFormSubmitted=!1})}catch(t){console.error(t),this.addAdaFormSubmitted=!1}}}};var m=function(){var t=this,e=t._self._c;return e("div",{staticStyle:{"padding-left":"1em","padding-right":"1em"}},[e("h1",{staticClass:"title is-4"},[t._v(" "+t._s(t.$t("settings.littercoin.littercoin-header")))]),e("hr"),e("br"),e("div",{staticClass:"columns"},[e("div",{staticClass:"column is-two-thirds is-offset-1"},[e("h1",{staticClass:"title is-4"},[t._v("Littercoin Smart Contract ")]),t.loading?e("p",[t._v("Loading...")]):e("div",[e("div",{staticClass:"mb-2"},[e("strong",[t._v("Ada Locked at the Smart Contract")]),e("p",[t._v(t._s(this.adaAmount.toLocaleString())+" ada")])]),e("div",{staticClass:"mb-2"},[e("strong",[t._v("Total Littercoin In Circulation")]),e("p",[t._v(t._s(this.lcAmount.toLocaleString())+" Littercoin")])]),e("div",{staticClass:"mb-2"},[e("strong",[t._v("Ratio:")]),e("p",[t._v(t._s(this.ratio.toLocaleString())+" ada per Littercoin")]),e("p",[t._v("or "+t._s(this.getLittercoinPrice)+" per Littercoin")])]),e("p",[t._v("Source Code: "),e("a",{attrs:{href:this.lcScriptURL,target:"_blank",rel:"noopener noreferrer"}},[t._v(t._s(this.lcScriptName))])]),e("p",[t._v("Address: "),e("a",{staticStyle:{"font-size":"small"},attrs:{href:this.lcAddrURL,target:"_blank",rel:"noopener noreferrer"}},[t._v(t._s(this.lcAddr))])])]),e("hr"),e("h1",{staticClass:"title is-4"},[t._v("My Littercoin")]),e("p",[t._v("Total Littercoin Earned: "+t._s(this.littercoinEarned))]),e("p",[t._v("Total Littercoin Received: "+t._s(this.littercoinEarned-this.littercoinDue))]),e("p",[t._v("Littercoin Due: "+t._s(this.littercoinDue))]),e("hr"),e("div",[e("h1",{staticClass:"title is-4"},[t._v("Select Your Wallet")]),e("p",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.walletChoice,expression:"walletChoice"}],attrs:{type:"radio",value:"nami"},domProps:{checked:t._q(t.walletChoice,"nami")},on:{change:[function(i){t.walletChoice="nami"},t.getWalletInfo]}}),t._v("   "),e("img",{staticStyle:{width:"20px",height:"20px"},attrs:{src:l,alt:"Nami Wallet"}}),e("label",[t._v("  Nami")])]),e("br"),e("p",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.walletChoice,expression:"walletChoice"}],attrs:{type:"radio",value:"eternl"},domProps:{checked:t._q(t.walletChoice,"eternl")},on:{change:[function(i){t.walletChoice="eternl"},t.getWalletInfo]}}),t._v("  "),e("img",{staticStyle:{width:"20px",height:"20px"},attrs:{src:d,alt:"Eternl Wallet"}}),e("label",[t._v("  Eternl")])]),e("br"),t.walletChoice?e("div",[t.walletLoading?e("p",[t._v("Loading...")]):e("div",[t._v(" Ada amount: "+t._s(this.adaBalance.toLocaleString())+" "),e("br"),t._v(" Littercoin amount: "+t._s(this.littercoinBalance.toLocaleString())+" "),e("br"),t._v(" Merchant Token amount: "+t._s(this.merchTokenBalance.toLocaleString())+" "),e("br")])]):t._e(),e("hr"),t.walletChoice?e("div",[t.mintSuccess?t._e():e("form",{attrs:{method:"post"},on:{submit:function(i){return i.preventDefault(),t.submitForm("mint")}}},[e("h1",{staticClass:"title is-4"},[t._v("Mint Littercoin")]),t._v(" Enter the wallet where you want your Littercoin to be sent "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.mintDestAddr,expression:"mintDestAddr"}],staticClass:"input",attrs:{placeholder:"Enter destination wallet address"},domProps:{value:t.mintDestAddr},on:{input:function(i){i.target.composing||(t.mintDestAddr=i.target.value)}}}),e("div",{staticStyle:{"text-align":"center","padding-bottom":"1em"}},[e("button",{staticClass:"button is-medium is-primary mb1 mt1",class:t.mintFormSubmitted?"is-loading":"",attrs:{disabled:t.checkMintDisabled}},[t._v("Submit Tx")])])]),t.mintSuccess?e("div",[e("p"),e("h1",{staticClass:"title is-4"},[t._v("Mint Littercoin Success!!!")]),e("p"),e("p",[t._v("Please wait approximately 20-60 seconds for the littercoin to show up in your wallet.")]),e("p",[t._v("To track this transaction on the blockchain, select the TxId link below.")]),e("p",[t._v("TxId: "),e("a",{staticStyle:{"font-size":"small"},attrs:{href:this.mintTxIdURL,target:"_blank",rel:"noopener noreferrer"}},[t._v(t._s(this.mintTxId))])])]):t._e(),e("hr")]):t._e(),t.walletChoice?e("div",[t.burnSuccess?t._e():e("form",{attrs:{method:"post"},on:{submit:function(i){return i.preventDefault(),t.submitForm("burn")}}},[e("h1",{staticClass:"title is-4"},[t._v("Burn Littercoin")]),t._v(" Only those holding a Merchant Token can burn Littercoin to received Ada from the Littercoin Smart Contract "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.lcQty,expression:"lcQty"}],staticClass:"input",attrs:{type:"number",placeholder:"Enter number of littercoins to burn"},domProps:{value:t.lcQty},on:{input:function(i){i.target.composing||(t.lcQty=i.target.value)}}}),e("div",{staticStyle:{"text-align":"center","padding-bottom":"1em"}},[e("button",{staticClass:"button is-medium is-primary mb1 mt1",class:t.burnFormSubmitted?"is-loading":"",attrs:{disabled:t.checkBurnDisabled}},[t._v("Submit Tx")])]),t._v(" Note: There is a 4.2% (or 1 Ada minimum) service fee included in the burn transaction ")]),t.burnSuccess?e("div",[e("p"),e("h1",{staticClass:"title is-4"},[t._v("Burn Littercoin Success!!!")]),e("p"),e("p",[t._v("Please wait approximately 20-60 seconds for the Ada to show up in your wallet.")]),e("p",[t._v("To track this transaction on the blockchain, select the TxId link below.")]),e("p",[t._v("TxId: "),e("a",{staticStyle:{"font-size":"small"},attrs:{href:this.burnTxIdURL,target:"_blank",rel:"noopener noreferrer"}},[t._v(t._s(this.burnTxId))])])]):t._e(),e("hr")]):t._e(),t.walletChoice?e("div",[!t.merchSuccess&&t.isAdmin?e("form",{attrs:{method:"post"},on:{submit:function(i){return i.preventDefault(),t.submitForm("merchant")}}},[e("p"),e("h1",{staticClass:"title is-4"},[t._v("Mint Merchant Token")]),e("p"),t._v(" Enter the wallet where you want a Merchant Token to be sent "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.merchDestAddr,expression:"merchDestAddr"}],staticClass:"input",attrs:{placeholder:"Enter destination wallet address"},domProps:{value:t.merchDestAddr},on:{input:function(i){i.target.composing||(t.merchDestAddr=i.target.value)}}}),e("div",{staticStyle:{"text-align":"center","padding-bottom":"1em"}},[e("button",{staticClass:"button is-medium is-primary mb1 mt1",class:t.merchFormSubmitted?"is-loading":"",attrs:{disabled:t.checkMerchDisabled}},[t._v("Submit Tx")])])]):t._e(),t.merchSuccess&&t.isAdmin?e("div",[e("p"),e("h1",{staticClass:"title is-4"},[t._v("Mint Merchant Token Success!!!")]),e("p"),e("p",[t._v("Please wait approximately 20-60 seconds for the merchant token to show up in the wallet.")]),e("p",[t._v("To track this transaction on the blockchain, select the TxId link below.")]),e("p",[t._v("TxId: "),e("a",{staticStyle:{"font-size":"small"},attrs:{href:this.merchTxIdURL,target:"_blank",rel:"noopener noreferrer"}},[t._v(t._s(this.merchTxId))])])]):t._e(),e("hr")]):t._e(),t.walletChoice?e("div",[t.addAdaSuccess?t._e():e("form",{attrs:{method:"post"},on:{submit:function(i){return i.preventDefault(),t.submitForm("addAda")}}},[e("p"),e("h1",{staticClass:"title is-4"},[t._v("Add Ada To Littercoin Smart Contract")]),e("p"),e("input",{directives:[{name:"model",rawName:"v-model",value:t.addAdaQty,expression:"addAdaQty"}],staticClass:"input",attrs:{type:"number",placeholder:"Enter amount of Ada to send"},domProps:{value:t.addAdaQty},on:{input:function(i){i.target.composing||(t.addAdaQty=i.target.value)}}}),e("div",{staticStyle:{"text-align":"center","padding-bottom":"1em"}},[e("button",{staticClass:"button is-medium is-primary mb1 mt1",class:t.addAdaFormSubmitted?"is-loading":"",attrs:{disabled:t.checkAddAdaDisabled}},[t._v("Submit Tx")])])]),t.addAdaSuccess?e("div",[e("p"),e("h1",{staticClass:"title is-4"},[t._v("Add Ada Success!!!")]),e("p"),e("p",[t._v("Please wait approximately 20-60 seconds and refresh this page for the Ada to show up in the Littercoin Smart Contract.")]),e("p",[t._v("To track this transaction on the blockchain, select the TxId link below.")]),e("p",[t._v("TxId: "),e("a",{staticStyle:{"font-size":"small"},attrs:{href:this.addAdaTxIdURL,target:"_blank",rel:"noopener noreferrer"}},[t._v(t._s(this.addAdaTxId))])])]):t._e(),e("hr")]):t._e()])])])])},h=[],b=c(u,m,h,!1,null,null);const v=b.exports;export{v as default}; +import{n as c}from"./app-BwSojYvl.js";/* empty css */const l="/build/assets/nami-BuYycVV_.png",d="/build/assets/eternl-CDqNp3Eg.png",u={name:"Littercoin",async created(){this.loading=!0,await axios.get("/get-users-littercoin").then(a=>{this.littercoinEarned=a.data.littercoinEarned,this.littercoinDue=a.data.littercoinDue}).catch(a=>{console.error("littercoin",a)}),await axios.get("/littercoin-info").then(async a=>{const t=await JSON.parse(a.data);if(t.status==200)this.adaAmount=t.payload.list[0].int/1e6,this.lcAmount=t.payload.list[1].int,this.ratio=this.adaAmount/this.lcAmount,this.lcAddr=t.payload.addr,this.lcAddrURL="https://cexplorer.io/address/"+t.payload.addr,this.lcScriptName=t.payload.scriptName,this.lcScriptURL="/contracts/"+t.payload.scriptName;else throw console.error("Could not fetch littercoin contract info")}).catch(a=>{console.error("littercoin-info",a)}),await axios.get("https://api.coingecko.com/api/v3/simple/price?ids=cardano&vs_currencies=usd").then(a=>{console.log("ada-price",a),this.adaValues=a.data.cardano}).catch(a=>{console.error("ada-price",a)}),this.loading=!1},data(){return{loading:!0,adaAmount:0,lcAmount:0,ratio:0,adaValues:{},selectedCurrency:"usd",currencySymbols:{usd:"$",eur:"€",btc:"₿"},lcAddr:"",lcAddrURL:"",lcScriptName:"",lcScriptURL:"",littercoinEarned:0,littercoinDue:0,walletChoice:"",walletLoading:!1,adaBalance:0,littercoinBalance:0,merchTokenBalance:0,mintDestAddr:"",merchDestAddr:"",addAdaQty:0,lcQty:0,mintFormSubmitted:!1,burnFormSubmitted:!1,merchFormSubmitted:!1,addAdaFormSubmitted:!1,mintSuccess:!1,burnSuccess:!1,merchSuccess:!1,addAdaSuccess:!1,mintTxId:"",burnTxId:"",merchTxId:"",addAdaTxId:"",mintTxIdURL:"",burnTxIdURL:"",merchTxIdURL:"",addAdaTxIdURL:""}},computed:{user(){return this.$store.state.user.user},isAdmin(){return this.$store.state.user.admin},checkMintDisabled(){return!!this.mintFormSubmitted},checkBurnDisabled(){return!!this.burnFormSubmitted},checkMerchDisabled(){return!!this.merchFormSubmitted},checkAddAdaDisabled(){return!!this.addAdaFormSubmitted},getLittercoinPrice(){const a=this.currencySymbols[this.selectedCurrency],t=this.adaValues[this.selectedCurrency];return this.lcAmount===0?0:a.toString()+(this.ratio*t).toFixed(2).toString()}},methods:{async getWalletInfo(){this.walletLoading=!0;try{var a;this.walletChoice==="nami"?a=await window.cardano.nami.enable():this.walletChoice==="eternl"?a=await window.cardano.eternl.enable():(alert("No wallet selected"),this.mintFormSubmitted=!1);const t=await a.getBalance();console.log({balanceCbor:t});const e=await a.getUtxos();console.log({cborUtxos:e}),await axios.post("/wallet-info",{balanceCborHex:t,utxos:e}).then(async i=>{const s=await JSON.parse(i.data);this.adaBalance=s.payload.adaAmt,this.littercoinBalance=s.payload.lcAmt,this.merchTokenBalance=s.payload.mtAmt,this.walletLoading=!1}).catch(i=>{console.error("Error accessing user wallet",i.response.data.errors),alert("Error accessing user wallet")})}catch(t){console.error(t)}},submitForm:function(a){if(!this.walletChoice){alert("Please select a wallet");return}if(this.adaBalance<5){alert("Not enough Ada in the wallet for a transaction, please make sure there is 5 or more Ada in your wallet");return}if(a==="mint"){if(!this.mintDestAddr.match(/^addr/)){alert("Please enter a valid mint littercoin destination address");return}if(!this.littercoinDue>0){alert("There are no littercoin due for minting");return}this.mintFormSubmitted=!0,this.submitMint()}if(a==="burn"){if(this.lcQty<1){alert("Minimum 1 littercoin required for burn");return}if(this.lcQty>this.littercoinBalance){alert("The amount of littercoin to burn exceeds the amount of littercoin in the wallet");return}if(this.merchTokenBalance<1){alert("No Merchant Tokens founds in the wallet");return}this.burnFormSubmitted=!0,this.submitBurn()}if(a==="merchant"){if(!this.merchDestAddr.match(/^addr/)){alert("Please enter a valid mint merchant token destination address");return}this.merchFormSubmitted=!0,this.merchMint()}if(a==="addAda"){if(!this.addAdaQty>2){alert("Minimum 2 Ada donation amount required");return}this.addAdaFormSubmitted=!0,this.addAda()}},async submitMint(){try{var a;this.walletChoice==="nami"?a=await window.cardano.nami.enable():this.walletChoice==="eternl"?a=await window.cardano.eternl.enable():(alert("No wallet selected"),this.mintFormSubmitted=!1);const t=await a.getUtxos(),e=await a.getChangeAddress();await axios.post("/littercoin-mint-tx",{destAddr:this.mintDestAddr,changeAddr:e,utxos:t}).then(async i=>{const s=await JSON.parse(i.data);if(s.status==200){console.log("Get wallet signature");var o;try{o=await a.signTx(s.cborTx,!0)}catch(r){console.error(r),this.mintFormSubmitted=!1;return}console.log("Submit transaction..."),await axios.post("/littercoin-submit-mint-tx",{cborSig:o,cborTx:s.cborTx}).then(async r=>{const n=await JSON.parse(r.data);n.status==200?(this.mintTxId=n.txId,this.mintTxIdURL="https://cexplorer.io/tx/"+n.txId,this.mintSuccess=!0):(console.error("Littercoin Mint transaction could not be submitted"),alert("Littercoin Mint transaction could not be submitted, please try again"),this.mintFormSubmitted=!1)}).catch(r=>{r.response.status==422?console.error("Invalid Wallet Input",r.response.data.errors):console.error("littercoin-submit-mint-tx: ",r),alert("Littercoin Mint transaction could not be submitted, please try again"),this.mintFormSubmitted=!1})}else console.error("Littercoin Mint transaction could not be submitted"),alert("Littercoin Mint transaction could not be submitted, please try again"),this.mintFormSubmitted=!1}).catch(i=>{i.response.status==422?(console.error("Invalid User Input",i.response.data.errors),alert("Please check that you have entered a valid destination address")):(console.error("littercoin-mint-tx",i),alert("Littercoin Mint transaction could not be submitted, please try again")),this.mintFormSubmitted=!1})}catch(t){console.error(t),this.mintFormSubmitted=!1}},async submitBurn(){try{var a;this.walletChoice==="nami"?a=await window.cardano.nami.enable():this.walletChoice==="eternl"?a=await window.cardano.eternl.enable():(alert("No wallet selected"),this.burnFormSubmitted=!1);const t=await a.getUtxos(),e=await a.getChangeAddress();await axios.post("/littercoin-burn-tx",{lcQty:this.lcQty,changeAddr:e,utxos:t}).then(async i=>{const s=await JSON.parse(i.data);if(s.status==200){console.log("Get wallet signature");var o;try{o=await a.signTx(s.cborTx,!0)}catch(r){console.error(r),this.burnFormSubmitted=!1;return}console.log("Submit transaction..."),await axios.post("/littercoin-submit-burn-tx",{cborSig:o,cborTx:s.cborTx}).then(async r=>{const n=await JSON.parse(r.data);n.status==200?(this.burnTxId=n.txId,this.burnTxIdURL="https://cexplorer.io/tx/"+n.txId,this.burnSuccess=!0):(console.error("Littercoin Burn transaction was not successful"),alert("Littercoin Burn transaction could not be submitted, please try again"),this.burnFormSubmitted=!1)}).catch(r=>{r.response.status==422?console.error("Invalid Wallet Input",r.response.data.errors):console.error("littercoin-submit-burn-tx: ",r),alert("Littercoin Burn transaction could not be submitted, please try again"),this.burnFormSubmitted=!1})}else s.status==401?(console.error("Insufficient Littercoin In Wallet For Burn"),alert("Insufficient Littercoin In Wallet For Burn"),this.burnFormSubmitted=!1):s.status==402?(console.error("Merchant Token Not Found"),alert("Merchant Token Not Found"),this.burnFormSubmitted=!1):s.status==403?(console.error("Ada Withdraw amount is less than the minimum 2 Ada"),alert("Ada Withdraw amount is less than the minimum 2 Ada"),this.burnFormSubmitted=!1):s.status==404?(console.error("Insufficient funds in Littercoin contract"),alert("Insufficient funds in Littercoin contract"),this.burnFormSubmitted=!1):s.status==405?(console.error("No valid merchant token found in the wallet"),alert("No valid merchant token found in the wallet"),this.burnFormSubmitted=!1):(console.error("Littercoin Burn transaction was not successful"),alert("Littercoin Burn transaction could not be submitted, please try again"),this.burnFormSubmitted=!1)}).catch(i=>{i.response.status==422?(console.error("Invalid User Input",i.response.data.errors),alert("Please check that you have entered a valid destination address")):(console.error("littercoin-burn-tx",i),alert("Littercoin Burn transaction could not be submitted, please try again")),this.burnFormSubmitted=!1})}catch(t){console.error(t),this.burnFormSubmitted=!1}},async merchMint(){try{var a;this.walletChoice==="nami"?a=await window.cardano.nami.enable():this.walletChoice==="eternl"?a=await window.cardano.eternl.enable():(alert("No wallet selected"),this.merchFormSubmitted=!1);const t=await a.getUtxos(),e=await a.getChangeAddress();await axios.post("/merchant-mint-tx",{destAddr:this.merchDestAddr,changeAddr:e,utxos:t}).then(async i=>{const s=await JSON.parse(i.data);if(s.status==200){console.log("Get wallet signature");var o;try{o=await a.signTx(s.cborTx,!0)}catch(r){console.error(r),this.merchFormSubmitted=!1;return}console.log("Submit transaction..."),await axios.post("/merchant-submit-mint-tx",{cborSig:o,cborTx:s.cborTx}).then(async r=>{const n=await JSON.parse(r.data);n.status==200?(this.merchTxId=n.txId,this.merchTxIdURL="https://cexplorer.io/tx/"+n.txId,this.merchSuccess=!0):(console.error("Merchant Token Mint transaction could not be submitted"),alert("Merchant Token Mint transaction could not be submitted, please try again"),this.merchFormSubmitted=!1)}).catch(r=>{r.response.status==422?console.error("Invalid Wallet Input",r.response.data.errors):console.error("merchant-submit-mint-tx: ",r),alert("Merchant Token Mint transaction could not be submitted, please try again"),this.merchFormSubmitted=!1})}else s.status==407?(console.error("Must be an admin user to mint a merchant token"),alert("Must be an admin user to mint a merchant token"),this.merchFormSubmitted=!1):(console.error("Merchant Token Mint transaction could not be submitted"),alert("Merchant Token Mint transaction could not be submitted, please try again"),this.merchFormSubmitted=!1)}).catch(i=>{i.response.status==422?(console.error("Invalid User Input",i.response.data.errors),alert("Please check that you have entered a valid destination address")):(console.error("merchant-submit-mint-tx: ",i),alert("Merchant Token Mint transaction could not be submitted, please try again")),this.merchFormSubmitted=!1})}catch(t){console.error(t),this.merchFormSubmitted=!1}},async addAda(){try{var a;this.walletChoice==="nami"?a=await window.cardano.nami.enable():this.walletChoice==="eternl"?a=await window.cardano.eternl.enable():(alert("No wallet selected"),this.addAdaFormSubmitted=!1);const t=await a.getUtxos(),e=await a.getChangeAddress();await axios.post("/add-ada-tx",{adaQty:this.addAdaQty,changeAddr:e,utxos:t}).then(async i=>{const s=await JSON.parse(i.data);if(s.status==200){console.log("Get wallet signature");var o;try{o=await a.signTx(s.cborTx,!0)}catch(r){console.error(r),this.addAdaFormSubmitted=!1;return}await axios.post("/add-ada-submit-tx",{cborSig:o,cborTx:s.cborTx}).then(async r=>{const n=await JSON.parse(r.data);n.status==200?(this.addAdaTxId=n.txId,this.addAdaTxIdURL="https://cexplorer.io/tx/"+n.txId,this.addAdaSuccess=!0):(console.error("Could not submit transaction"),alert("Add Ada transaction could not be submitted, please try again"),this.addAdaFormSubmitted=!1)}).catch(r=>{r.response.status==422?console.error("Invalid Wallet Input",r.response.data.errors):console.error("add-ada-submit-tx: ",r),alert("Add Ada transaction could not be submitted, please try again"),this.addAdaFormSubmitted=!1})}else s.status==408?(console.error("More Ada in the wallet required for this transaction"),alert('More Ada in the wallet required for this transaction"'),this.addAdaFormSubmitted=!1):(console.error("Add Ada transaction was not successful"),alert("Add Ada transaction could not be submitted, please try again"),this.addAdaFormSubmitted=!1)}).catch(i=>{i.response.status==422?(console.error("Invalid User Input",i.response.data.errors),alert("Please check that you have entered a valid destination address")):(console.error("add-ada-tx",i),alert("Add Ada transaction could not be submitted, please try again")),this.addAdaFormSubmitted=!1})}catch(t){console.error(t),this.addAdaFormSubmitted=!1}}}};var m=function(){var t=this,e=t._self._c;return e("div",{staticStyle:{"padding-left":"1em","padding-right":"1em"}},[e("h1",{staticClass:"title is-4"},[t._v(" "+t._s(t.$t("settings.littercoin.littercoin-header")))]),e("hr"),e("br"),e("div",{staticClass:"columns"},[e("div",{staticClass:"column is-two-thirds is-offset-1"},[e("h1",{staticClass:"title is-4"},[t._v("Littercoin Smart Contract ")]),t.loading?e("p",[t._v("Loading...")]):e("div",[e("div",{staticClass:"mb-2"},[e("strong",[t._v("Ada Locked at the Smart Contract")]),e("p",[t._v(t._s(this.adaAmount.toLocaleString())+" ada")])]),e("div",{staticClass:"mb-2"},[e("strong",[t._v("Total Littercoin In Circulation")]),e("p",[t._v(t._s(this.lcAmount.toLocaleString())+" Littercoin")])]),e("div",{staticClass:"mb-2"},[e("strong",[t._v("Ratio:")]),e("p",[t._v(t._s(this.ratio.toLocaleString())+" ada per Littercoin")]),e("p",[t._v("or "+t._s(this.getLittercoinPrice)+" per Littercoin")])]),e("p",[t._v("Source Code: "),e("a",{attrs:{href:this.lcScriptURL,target:"_blank",rel:"noopener noreferrer"}},[t._v(t._s(this.lcScriptName))])]),e("p",[t._v("Address: "),e("a",{staticStyle:{"font-size":"small"},attrs:{href:this.lcAddrURL,target:"_blank",rel:"noopener noreferrer"}},[t._v(t._s(this.lcAddr))])])]),e("hr"),e("h1",{staticClass:"title is-4"},[t._v("My Littercoin")]),e("p",[t._v("Total Littercoin Earned: "+t._s(this.littercoinEarned))]),e("p",[t._v("Total Littercoin Received: "+t._s(this.littercoinEarned-this.littercoinDue))]),e("p",[t._v("Littercoin Due: "+t._s(this.littercoinDue))]),e("hr"),e("div",[e("h1",{staticClass:"title is-4"},[t._v("Select Your Wallet")]),e("p",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.walletChoice,expression:"walletChoice"}],attrs:{type:"radio",value:"nami"},domProps:{checked:t._q(t.walletChoice,"nami")},on:{change:[function(i){t.walletChoice="nami"},t.getWalletInfo]}}),t._v("   "),e("img",{staticStyle:{width:"20px",height:"20px"},attrs:{src:l,alt:"Nami Wallet"}}),e("label",[t._v("  Nami")])]),e("br"),e("p",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.walletChoice,expression:"walletChoice"}],attrs:{type:"radio",value:"eternl"},domProps:{checked:t._q(t.walletChoice,"eternl")},on:{change:[function(i){t.walletChoice="eternl"},t.getWalletInfo]}}),t._v("  "),e("img",{staticStyle:{width:"20px",height:"20px"},attrs:{src:d,alt:"Eternl Wallet"}}),e("label",[t._v("  Eternl")])]),e("br"),t.walletChoice?e("div",[t.walletLoading?e("p",[t._v("Loading...")]):e("div",[t._v(" Ada amount: "+t._s(this.adaBalance.toLocaleString())+" "),e("br"),t._v(" Littercoin amount: "+t._s(this.littercoinBalance.toLocaleString())+" "),e("br"),t._v(" Merchant Token amount: "+t._s(this.merchTokenBalance.toLocaleString())+" "),e("br")])]):t._e(),e("hr"),t.walletChoice?e("div",[t.mintSuccess?t._e():e("form",{attrs:{method:"post"},on:{submit:function(i){return i.preventDefault(),t.submitForm("mint")}}},[e("h1",{staticClass:"title is-4"},[t._v("Mint Littercoin")]),t._v(" Enter the wallet where you want your Littercoin to be sent "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.mintDestAddr,expression:"mintDestAddr"}],staticClass:"input",attrs:{placeholder:"Enter destination wallet address"},domProps:{value:t.mintDestAddr},on:{input:function(i){i.target.composing||(t.mintDestAddr=i.target.value)}}}),e("div",{staticStyle:{"text-align":"center","padding-bottom":"1em"}},[e("button",{staticClass:"button is-medium is-primary mb1 mt1",class:t.mintFormSubmitted?"is-loading":"",attrs:{disabled:t.checkMintDisabled}},[t._v("Submit Tx")])])]),t.mintSuccess?e("div",[e("p"),e("h1",{staticClass:"title is-4"},[t._v("Mint Littercoin Success!!!")]),e("p"),e("p",[t._v("Please wait approximately 20-60 seconds for the littercoin to show up in your wallet.")]),e("p",[t._v("To track this transaction on the blockchain, select the TxId link below.")]),e("p",[t._v("TxId: "),e("a",{staticStyle:{"font-size":"small"},attrs:{href:this.mintTxIdURL,target:"_blank",rel:"noopener noreferrer"}},[t._v(t._s(this.mintTxId))])])]):t._e(),e("hr")]):t._e(),t.walletChoice?e("div",[t.burnSuccess?t._e():e("form",{attrs:{method:"post"},on:{submit:function(i){return i.preventDefault(),t.submitForm("burn")}}},[e("h1",{staticClass:"title is-4"},[t._v("Burn Littercoin")]),t._v(" Only those holding a Merchant Token can burn Littercoin to received Ada from the Littercoin Smart Contract "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.lcQty,expression:"lcQty"}],staticClass:"input",attrs:{type:"number",placeholder:"Enter number of littercoins to burn"},domProps:{value:t.lcQty},on:{input:function(i){i.target.composing||(t.lcQty=i.target.value)}}}),e("div",{staticStyle:{"text-align":"center","padding-bottom":"1em"}},[e("button",{staticClass:"button is-medium is-primary mb1 mt1",class:t.burnFormSubmitted?"is-loading":"",attrs:{disabled:t.checkBurnDisabled}},[t._v("Submit Tx")])]),t._v(" Note: There is a 4.2% (or 1 Ada minimum) service fee included in the burn transaction ")]),t.burnSuccess?e("div",[e("p"),e("h1",{staticClass:"title is-4"},[t._v("Burn Littercoin Success!!!")]),e("p"),e("p",[t._v("Please wait approximately 20-60 seconds for the Ada to show up in your wallet.")]),e("p",[t._v("To track this transaction on the blockchain, select the TxId link below.")]),e("p",[t._v("TxId: "),e("a",{staticStyle:{"font-size":"small"},attrs:{href:this.burnTxIdURL,target:"_blank",rel:"noopener noreferrer"}},[t._v(t._s(this.burnTxId))])])]):t._e(),e("hr")]):t._e(),t.walletChoice?e("div",[!t.merchSuccess&&t.isAdmin?e("form",{attrs:{method:"post"},on:{submit:function(i){return i.preventDefault(),t.submitForm("merchant")}}},[e("p"),e("h1",{staticClass:"title is-4"},[t._v("Mint Merchant Token")]),e("p"),t._v(" Enter the wallet where you want a Merchant Token to be sent "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.merchDestAddr,expression:"merchDestAddr"}],staticClass:"input",attrs:{placeholder:"Enter destination wallet address"},domProps:{value:t.merchDestAddr},on:{input:function(i){i.target.composing||(t.merchDestAddr=i.target.value)}}}),e("div",{staticStyle:{"text-align":"center","padding-bottom":"1em"}},[e("button",{staticClass:"button is-medium is-primary mb1 mt1",class:t.merchFormSubmitted?"is-loading":"",attrs:{disabled:t.checkMerchDisabled}},[t._v("Submit Tx")])])]):t._e(),t.merchSuccess&&t.isAdmin?e("div",[e("p"),e("h1",{staticClass:"title is-4"},[t._v("Mint Merchant Token Success!!!")]),e("p"),e("p",[t._v("Please wait approximately 20-60 seconds for the merchant token to show up in the wallet.")]),e("p",[t._v("To track this transaction on the blockchain, select the TxId link below.")]),e("p",[t._v("TxId: "),e("a",{staticStyle:{"font-size":"small"},attrs:{href:this.merchTxIdURL,target:"_blank",rel:"noopener noreferrer"}},[t._v(t._s(this.merchTxId))])])]):t._e(),e("hr")]):t._e(),t.walletChoice?e("div",[t.addAdaSuccess?t._e():e("form",{attrs:{method:"post"},on:{submit:function(i){return i.preventDefault(),t.submitForm("addAda")}}},[e("p"),e("h1",{staticClass:"title is-4"},[t._v("Add Ada To Littercoin Smart Contract")]),e("p"),e("input",{directives:[{name:"model",rawName:"v-model",value:t.addAdaQty,expression:"addAdaQty"}],staticClass:"input",attrs:{type:"number",placeholder:"Enter amount of Ada to send"},domProps:{value:t.addAdaQty},on:{input:function(i){i.target.composing||(t.addAdaQty=i.target.value)}}}),e("div",{staticStyle:{"text-align":"center","padding-bottom":"1em"}},[e("button",{staticClass:"button is-medium is-primary mb1 mt1",class:t.addAdaFormSubmitted?"is-loading":"",attrs:{disabled:t.checkAddAdaDisabled}},[t._v("Submit Tx")])])]),t.addAdaSuccess?e("div",[e("p"),e("h1",{staticClass:"title is-4"},[t._v("Add Ada Success!!!")]),e("p"),e("p",[t._v("Please wait approximately 20-60 seconds and refresh this page for the Ada to show up in the Littercoin Smart Contract.")]),e("p",[t._v("To track this transaction on the blockchain, select the TxId link below.")]),e("p",[t._v("TxId: "),e("a",{staticStyle:{"font-size":"small"},attrs:{href:this.addAdaTxIdURL,target:"_blank",rel:"noopener noreferrer"}},[t._v(t._s(this.addAdaTxId))])])]):t._e(),e("hr")]):t._e()])])])])},h=[],b=c(u,m,h,!1,null,null);const v=b.exports;export{v as default}; diff --git a/public/build/assets/Merchants-BU28_bVG.js b/public/build/assets/Merchants-B_xjooHF.js similarity index 98% rename from public/build/assets/Merchants-BU28_bVG.js rename to public/build/assets/Merchants-B_xjooHF.js index 101b6e5c..e739e9f2 100644 --- a/public/build/assets/Merchants-BU28_bVG.js +++ b/public/build/assets/Merchants-B_xjooHF.js @@ -1 +1 @@ -import{n as a}from"./app-DuS6KM7M.js";/* empty css */const o={name:"Merchants",data(){return{storeName:"",storeAddress:"",storeEmail:"",storePhone:"",storeWebsite:"",message:"",formSubmitted:!1}},methods:{submitForm(){this.formSubmitted=!0,axios.post("/api/littercoin/merchants",{name:this.storeName,address:this.storeAddress,email:this.storeEmail,phone:this.storePhone,website:this.storeWebsite,message:this.message}).then(r=>{console.log("merchants",r)}).catch(r=>{console.log("merchants",r)})}}};var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"container p-10-mob"},[t("div",[t("p",{staticClass:"title is-2 has-text-centered mb1",staticStyle:{"margin-top":"1em"}},[e._v(" Become a Littercoin partner! ")]),e._m(0),t("transition",{attrs:{name:"fade"}},[e.formSubmitted?t("div",[t("p",{staticClass:"has-text-centered"},[e._v("Thank you for submitting your store's information!")])]):e._e()]),e.formSubmitted?e._e():t("form",{on:{submit:function(s){return s.preventDefault(),e.submitForm.apply(null,arguments)}}},[t("div",{staticClass:"form-group"},[t("label",{attrs:{for:"store-name"}},[e._v("Store Name:")]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.storeName,expression:"storeName"}],attrs:{placeholder:"Your stores name",type:"text",id:"store-name",name:"store-name",required:""},domProps:{value:e.storeName},on:{input:function(s){s.target.composing||(e.storeName=s.target.value)}}})]),t("div",{staticClass:"form-group"},[t("label",{attrs:{for:"store-address"}},[e._v("Store Address:")]),t("textarea",{directives:[{name:"model",rawName:"v-model",value:e.storeAddress,expression:"storeAddress"}],attrs:{placeholder:"Your stores address",id:"store-address",name:"store-address",required:""},domProps:{value:e.storeAddress},on:{input:function(s){s.target.composing||(e.storeAddress=s.target.value)}}})]),t("div",{staticClass:"form-group"},[t("label",{attrs:{for:"store-email"}},[e._v("Email:")]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.storeEmail,expression:"storeEmail"}],attrs:{placeholder:"Your stores email",type:"email",id:"store-email",name:"store-email",required:""},domProps:{value:e.storeEmail},on:{input:function(s){s.target.composing||(e.storeEmail=s.target.value)}}})]),t("div",{staticClass:"form-group"},[t("label",{attrs:{for:"store-phone"}},[e._v("Phone:")]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.storePhone,expression:"storePhone"}],attrs:{placeholder:"Your phone",type:"tel",id:"store-phone",name:"store-phone",required:""},domProps:{value:e.storePhone},on:{input:function(s){s.target.composing||(e.storePhone=s.target.value)}}})]),t("div",{staticClass:"form-group"},[t("label",{attrs:{for:"store-website"}},[e._v("Website:")]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.storeWebsite,expression:"storeWebsite"}],attrs:{placeholder:"Your stores website",type:"url",id:"store-website",name:"store-website"},domProps:{value:e.storeWebsite},on:{input:function(s){s.target.composing||(e.storeWebsite=s.target.value)}}})]),t("div",{staticClass:"form-group"},[t("label",{attrs:{for:"message"}},[e._v("Message:")]),t("textarea",{directives:[{name:"model",rawName:"v-model",value:e.message,expression:"message"}],attrs:{placeholder:"Write us a message",id:"message",name:"message"},domProps:{value:e.message},on:{input:function(s){s.target.composing||(e.message=s.target.value)}}})]),e._m(1)])],1)])},n=[function(){var r=this,e=r._self._c;return e("div",{staticClass:"has-text-centered"},[e("p",[r._v(" Be a zero-waste hero, join us and accept Littercoin ")]),e("p",{staticClass:"mb1"},[r._v(" It's like getting paid to save the planet! ")])])},function(){var r=this,e=r._self._c;return e("div",{staticClass:"flex jc",staticStyle:{"padding-bottom":"3em"}},[e("button",{attrs:{type:"submit"}},[r._v("Submit")])])}],m=a(o,i,n,!1,null,"7797c8ba");const u=m.exports;export{u as default}; +import{n as a}from"./app-BwSojYvl.js";/* empty css */const o={name:"Merchants",data(){return{storeName:"",storeAddress:"",storeEmail:"",storePhone:"",storeWebsite:"",message:"",formSubmitted:!1}},methods:{submitForm(){this.formSubmitted=!0,axios.post("/api/littercoin/merchants",{name:this.storeName,address:this.storeAddress,email:this.storeEmail,phone:this.storePhone,website:this.storeWebsite,message:this.message}).then(r=>{console.log("merchants",r)}).catch(r=>{console.log("merchants",r)})}}};var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"container p-10-mob"},[t("div",[t("p",{staticClass:"title is-2 has-text-centered mb1",staticStyle:{"margin-top":"1em"}},[e._v(" Become a Littercoin partner! ")]),e._m(0),t("transition",{attrs:{name:"fade"}},[e.formSubmitted?t("div",[t("p",{staticClass:"has-text-centered"},[e._v("Thank you for submitting your store's information!")])]):e._e()]),e.formSubmitted?e._e():t("form",{on:{submit:function(s){return s.preventDefault(),e.submitForm.apply(null,arguments)}}},[t("div",{staticClass:"form-group"},[t("label",{attrs:{for:"store-name"}},[e._v("Store Name:")]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.storeName,expression:"storeName"}],attrs:{placeholder:"Your stores name",type:"text",id:"store-name",name:"store-name",required:""},domProps:{value:e.storeName},on:{input:function(s){s.target.composing||(e.storeName=s.target.value)}}})]),t("div",{staticClass:"form-group"},[t("label",{attrs:{for:"store-address"}},[e._v("Store Address:")]),t("textarea",{directives:[{name:"model",rawName:"v-model",value:e.storeAddress,expression:"storeAddress"}],attrs:{placeholder:"Your stores address",id:"store-address",name:"store-address",required:""},domProps:{value:e.storeAddress},on:{input:function(s){s.target.composing||(e.storeAddress=s.target.value)}}})]),t("div",{staticClass:"form-group"},[t("label",{attrs:{for:"store-email"}},[e._v("Email:")]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.storeEmail,expression:"storeEmail"}],attrs:{placeholder:"Your stores email",type:"email",id:"store-email",name:"store-email",required:""},domProps:{value:e.storeEmail},on:{input:function(s){s.target.composing||(e.storeEmail=s.target.value)}}})]),t("div",{staticClass:"form-group"},[t("label",{attrs:{for:"store-phone"}},[e._v("Phone:")]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.storePhone,expression:"storePhone"}],attrs:{placeholder:"Your phone",type:"tel",id:"store-phone",name:"store-phone",required:""},domProps:{value:e.storePhone},on:{input:function(s){s.target.composing||(e.storePhone=s.target.value)}}})]),t("div",{staticClass:"form-group"},[t("label",{attrs:{for:"store-website"}},[e._v("Website:")]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.storeWebsite,expression:"storeWebsite"}],attrs:{placeholder:"Your stores website",type:"url",id:"store-website",name:"store-website"},domProps:{value:e.storeWebsite},on:{input:function(s){s.target.composing||(e.storeWebsite=s.target.value)}}})]),t("div",{staticClass:"form-group"},[t("label",{attrs:{for:"message"}},[e._v("Message:")]),t("textarea",{directives:[{name:"model",rawName:"v-model",value:e.message,expression:"message"}],attrs:{placeholder:"Write us a message",id:"message",name:"message"},domProps:{value:e.message},on:{input:function(s){s.target.composing||(e.message=s.target.value)}}})]),e._m(1)])],1)])},n=[function(){var r=this,e=r._self._c;return e("div",{staticClass:"has-text-centered"},[e("p",[r._v(" Be a zero-waste hero, join us and accept Littercoin ")]),e("p",{staticClass:"mb1"},[r._v(" It's like getting paid to save the planet! ")])])},function(){var r=this,e=r._self._c;return e("div",{staticClass:"flex jc",staticStyle:{"padding-bottom":"3em"}},[e("button",{attrs:{type:"submit"}},[r._v("Submit")])])}],m=a(o,i,n,!1,null,"7797c8ba");const u=m.exports;export{u as default}; diff --git a/public/build/assets/Merchants-MB9vWSx2.js b/public/build/assets/Merchants-Dbwu67dA.js similarity index 95% rename from public/build/assets/Merchants-MB9vWSx2.js rename to public/build/assets/Merchants-Dbwu67dA.js index 54a27cd8..18c01ed4 100644 --- a/public/build/assets/Merchants-MB9vWSx2.js +++ b/public/build/assets/Merchants-Dbwu67dA.js @@ -1 +1 @@ -import{S as o}from"./Supercluster-BNFeeEyK.js";import{n,V as c}from"./app-DuS6KM7M.js";import{v as l}from"./vue2Dropzone-Cofu5FX6.js";import"./index-Dxbj43yt.js";import"./mapHelpers-CSfygYu3.js";import"./moment-zH0z38ay.js";import"./glify-browser-DAFS8CF1.js";/* empty css */const m={name:"MerchantMap",components:{Supercluster:o},data(){return{loading:!1}},async created(){this.loading=!0,await this.$store.dispatch("GET_MERCHANTS_GEOJSON"),this.loading=!1}};var p=function(){var e=this,t=e._self._c;return t("div",{staticClass:"h100"},[e.loading?t("div"):t("Supercluster",{attrs:{activeLayer:"merchants"}})],1)},h=[],d=n(m,p,h,!1,null,"d1448ca1");const u=d.exports,_={name:"CreateMerchant",components:{vueDropzone:l},data(){return{name:"",address:"",email:"",website:"",about:"",processing:!1,merchantWasCreated:!1,dropzoneOptions:{url:"/merchants/upload-photo",thumbnailWidth:150,maxFilesize:20,headers:{"X-CSRF-TOKEN":window.axios.defaults.headers.common["X-CSRF-TOKEN"]},paramName:"file",acceptedFiles:"image/*,.heic,.heif",params:{merchantId:0}}}},computed:{merchant(){return this.$store.state.merchants.merchant}},methods:{async submit(){if(this.merchant.lat===0&&this.merchant.lon===0){alert("Please select a location");return}if(this.name===""||this.email===""||this.website===""||this.about===""){alert("Please enter something into all fields");return}this.processing=!0,await this.$store.dispatch("CREATE_MERCHANT",{name:this.name,lat:this.merchant.lat,lon:this.merchant.lon,email:this.email,about:this.about,website:this.website}),this.name="",this.email="",this.about="",this.website="",this.merchantWasCreated=!0,this.dropzoneOptions.params.merchantId=this.merchant.id,this.processing=!1},failed(s,e){const t=e.message,a=s.previewElement.querySelector(".dz-error-message");a&&(a.textContent=t,a.style.opacity=1,a.style.pointerEvents="auto");const r=this.$t("notifications.error"),i=e.message;c.$vToastify.error({title:r,body:i,position:"top-right",type:"error"})}}};var v=function(){var e=this,t=e._self._c;return t("div",[t("p",{staticClass:"title is-1"},[e._v(" "+e._s(this.merchantWasCreated?"Upload photos":"Create a Merchant!")+" ")]),e.merchantWasCreated?t("vue-dropzone",{attrs:{id:"dropzone",options:e.dropzoneOptions,"use-custom-slot":!0},on:{"vdropzone-error":e.failed}},[t("i",{staticClass:"fa fa-image upload-icon",attrs:{"aria-hidden":"true"}})]):t("div",[t("p",{staticClass:"merchant-label"},[e._v("Name")]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.name,expression:"name"}],staticClass:"input w50 merchant-input",attrs:{placeholder:"Name of the business"},domProps:{value:e.name},on:{input:function(a){a.target.composing||(e.name=a.target.value)}}}),t("div",{staticClass:"mb1"},[e.merchant.lat?t("div",[t("p",[e._v(" Lat: "+e._s(e.merchant.lat)+" ")]),t("p",[e._v(" Lon: "+e._s(e.merchant.lon)+" ")])]):t("p",[e._v(" Click anywhere on the map to set the location ")])]),t("p",{staticClass:"merchant-label"},[e._v("Email")]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.email,expression:"email"}],staticClass:"input w50 merchant-input",attrs:{placeholder:"Enter their email",type:"email"},domProps:{value:e.email},on:{input:function(a){a.target.composing||(e.email=a.target.value)}}}),t("p",{staticClass:"merchant-label"},[e._v("Website")]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.website,expression:"website"}],staticClass:"input w50 merchant-input",attrs:{placeholder:"https://website.com"},domProps:{value:e.website},on:{input:function(a){a.target.composing||(e.website=a.target.value)}}}),t("p",{staticClass:"merchant-label"},[e._v("About")]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.about,expression:"about"}],staticClass:"input w50 merchant-input",staticStyle:{"margin-bottom":"2em"},attrs:{placeholder:"Information or keywords"},domProps:{value:e.about},on:{input:function(a){a.target.composing||(e.about=a.target.value)}}}),t("br"),t("button",{staticClass:"button is-medium is-primary",class:e.processing?"is-loading":"",attrs:{disabled:e.processing},on:{click:e.submit}},[e._v(" Create ")])])],1)},f=[],b=n(_,v,f,!1,null,"3385c883");const g=b.exports,C={name:"ApproveMerchant",data(){return{processing:!1,processingDelete:!1,loading:!0}},async created(){this.loading=!0,await this.$store.dispatch("GET_NEXT_MERCHANT_TO_APPROVE"),this.loading=!1},computed:{merchant(){return this.$store.state.merchants.merchant}},methods:{async approveMerchant(){this.processing=!0,await this.$store.dispatch("APPROVE_MERCHANT"),this.processing=!1},async deleteMerchant(){this.processingDelete=!0,await this.$store.dispatch("DELETE_MERCHANT"),this.processingDelete=!1}}};var w=function(){var e=this,t=e._self._c;return t("div",[e.loading?t("p",[e._v("Loading...")]):this.merchant.lat===0&&this.merchant.lon===0?t("p",[e._v("Done - Thank you!")]):t("div",[t("p",[e._v("Name: "+e._s(this.merchant.name))]),t("p",[e._v("About: "+e._s(this.merchant.about))]),t("p",[e._v("Website: "+e._s(this.merchant.website))]),t("div",{staticClass:"flex mt1"},[t("button",{staticClass:"button is-medium is-primary mr1",class:e.processing?"is-loading":"",attrs:{disabled:e.processing},on:{click:e.approveMerchant}},[e._v(" Approve ")]),t("button",{staticClass:"button is-medium is-danger",class:e.processingDelete?"is-loading":"",attrs:{disabled:e.processingDelete},on:{click:e.deleteMerchant}},[e._v(" Delete ")])])])])},M=[],E=n(C,w,M,!1,null,"ae67b4fd");const y=E.exports,$={name:"Merchants",components:{MerchantMap:u,CreateMerchant:g,ApproveMerchant:y},data(){return{selectedComponent:"CreateMerchant"}},methods:{changeComponent(s){this.selectedComponent=s}}};var N=function(){var e=this,t=e._self._c;return t("div",{staticClass:"h100"},[t("div",{staticClass:"columns h100"},[t("div",{staticClass:"column is-half"},[t("MerchantMap")],1),t("div",{staticClass:"column is-half pt5 pl5"},[e.can("approve merchants")?t("div",{staticClass:"mb3"},[t("button",{staticClass:"button is-small is-info",on:{click:function(a){return e.changeComponent("CreateMerchant")}}},[e._v("Create Merchants")]),t("button",{staticClass:"button is-small is-warning",on:{click:function(a){return e.changeComponent("ApproveMerchant")}}},[e._v("Approve Merchants")])]):e._e(),t(e.selectedComponent,{tag:"component"})],1)])])},A=[],T=n($,N,A,!1,null,"becb4ef6");const F=T.exports;export{F as default}; +import{S as o}from"./Supercluster-6zQlYpaO.js";import{n,V as c}from"./app-BwSojYvl.js";import{v as l}from"./vue2Dropzone-YzntsfFs.js";import"./index-Dxbj43yt.js";import"./mapHelpers-DmBbMbJe.js";import"./moment-zH0z38ay.js";import"./glify-browser-BLn8SaeM.js";/* empty css */const m={name:"MerchantMap",components:{Supercluster:o},data(){return{loading:!1}},async created(){this.loading=!0,await this.$store.dispatch("GET_MERCHANTS_GEOJSON"),this.loading=!1}};var p=function(){var e=this,t=e._self._c;return t("div",{staticClass:"h100"},[e.loading?t("div"):t("Supercluster",{attrs:{activeLayer:"merchants"}})],1)},h=[],d=n(m,p,h,!1,null,"d1448ca1");const u=d.exports,_={name:"CreateMerchant",components:{vueDropzone:l},data(){return{name:"",address:"",email:"",website:"",about:"",processing:!1,merchantWasCreated:!1,dropzoneOptions:{url:"/merchants/upload-photo",thumbnailWidth:150,maxFilesize:20,headers:{"X-CSRF-TOKEN":window.axios.defaults.headers.common["X-CSRF-TOKEN"]},paramName:"file",acceptedFiles:"image/*,.heic,.heif",params:{merchantId:0}}}},computed:{merchant(){return this.$store.state.merchants.merchant}},methods:{async submit(){if(this.merchant.lat===0&&this.merchant.lon===0){alert("Please select a location");return}if(this.name===""||this.email===""||this.website===""||this.about===""){alert("Please enter something into all fields");return}this.processing=!0,await this.$store.dispatch("CREATE_MERCHANT",{name:this.name,lat:this.merchant.lat,lon:this.merchant.lon,email:this.email,about:this.about,website:this.website}),this.name="",this.email="",this.about="",this.website="",this.merchantWasCreated=!0,this.dropzoneOptions.params.merchantId=this.merchant.id,this.processing=!1},failed(s,e){const t=e.message,a=s.previewElement.querySelector(".dz-error-message");a&&(a.textContent=t,a.style.opacity=1,a.style.pointerEvents="auto");const r=this.$t("notifications.error"),i=e.message;c.$vToastify.error({title:r,body:i,position:"top-right",type:"error"})}}};var v=function(){var e=this,t=e._self._c;return t("div",[t("p",{staticClass:"title is-1"},[e._v(" "+e._s(this.merchantWasCreated?"Upload photos":"Create a Merchant!")+" ")]),e.merchantWasCreated?t("vue-dropzone",{attrs:{id:"dropzone",options:e.dropzoneOptions,"use-custom-slot":!0},on:{"vdropzone-error":e.failed}},[t("i",{staticClass:"fa fa-image upload-icon",attrs:{"aria-hidden":"true"}})]):t("div",[t("p",{staticClass:"merchant-label"},[e._v("Name")]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.name,expression:"name"}],staticClass:"input w50 merchant-input",attrs:{placeholder:"Name of the business"},domProps:{value:e.name},on:{input:function(a){a.target.composing||(e.name=a.target.value)}}}),t("div",{staticClass:"mb1"},[e.merchant.lat?t("div",[t("p",[e._v(" Lat: "+e._s(e.merchant.lat)+" ")]),t("p",[e._v(" Lon: "+e._s(e.merchant.lon)+" ")])]):t("p",[e._v(" Click anywhere on the map to set the location ")])]),t("p",{staticClass:"merchant-label"},[e._v("Email")]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.email,expression:"email"}],staticClass:"input w50 merchant-input",attrs:{placeholder:"Enter their email",type:"email"},domProps:{value:e.email},on:{input:function(a){a.target.composing||(e.email=a.target.value)}}}),t("p",{staticClass:"merchant-label"},[e._v("Website")]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.website,expression:"website"}],staticClass:"input w50 merchant-input",attrs:{placeholder:"https://website.com"},domProps:{value:e.website},on:{input:function(a){a.target.composing||(e.website=a.target.value)}}}),t("p",{staticClass:"merchant-label"},[e._v("About")]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.about,expression:"about"}],staticClass:"input w50 merchant-input",staticStyle:{"margin-bottom":"2em"},attrs:{placeholder:"Information or keywords"},domProps:{value:e.about},on:{input:function(a){a.target.composing||(e.about=a.target.value)}}}),t("br"),t("button",{staticClass:"button is-medium is-primary",class:e.processing?"is-loading":"",attrs:{disabled:e.processing},on:{click:e.submit}},[e._v(" Create ")])])],1)},f=[],b=n(_,v,f,!1,null,"3385c883");const g=b.exports,C={name:"ApproveMerchant",data(){return{processing:!1,processingDelete:!1,loading:!0}},async created(){this.loading=!0,await this.$store.dispatch("GET_NEXT_MERCHANT_TO_APPROVE"),this.loading=!1},computed:{merchant(){return this.$store.state.merchants.merchant}},methods:{async approveMerchant(){this.processing=!0,await this.$store.dispatch("APPROVE_MERCHANT"),this.processing=!1},async deleteMerchant(){this.processingDelete=!0,await this.$store.dispatch("DELETE_MERCHANT"),this.processingDelete=!1}}};var w=function(){var e=this,t=e._self._c;return t("div",[e.loading?t("p",[e._v("Loading...")]):this.merchant.lat===0&&this.merchant.lon===0?t("p",[e._v("Done - Thank you!")]):t("div",[t("p",[e._v("Name: "+e._s(this.merchant.name))]),t("p",[e._v("About: "+e._s(this.merchant.about))]),t("p",[e._v("Website: "+e._s(this.merchant.website))]),t("div",{staticClass:"flex mt1"},[t("button",{staticClass:"button is-medium is-primary mr1",class:e.processing?"is-loading":"",attrs:{disabled:e.processing},on:{click:e.approveMerchant}},[e._v(" Approve ")]),t("button",{staticClass:"button is-medium is-danger",class:e.processingDelete?"is-loading":"",attrs:{disabled:e.processingDelete},on:{click:e.deleteMerchant}},[e._v(" Delete ")])])])])},M=[],E=n(C,w,M,!1,null,"ae67b4fd");const y=E.exports,$={name:"Merchants",components:{MerchantMap:u,CreateMerchant:g,ApproveMerchant:y},data(){return{selectedComponent:"CreateMerchant"}},methods:{changeComponent(s){this.selectedComponent=s}}};var N=function(){var e=this,t=e._self._c;return t("div",{staticClass:"h100"},[t("div",{staticClass:"columns h100"},[t("div",{staticClass:"column is-half"},[t("MerchantMap")],1),t("div",{staticClass:"column is-half pt5 pl5"},[e.can("approve merchants")?t("div",{staticClass:"mb3"},[t("button",{staticClass:"button is-small is-info",on:{click:function(a){return e.changeComponent("CreateMerchant")}}},[e._v("Create Merchants")]),t("button",{staticClass:"button is-small is-warning",on:{click:function(a){return e.changeComponent("ApproveMerchant")}}},[e._v("Approve Merchants")])]):e._e(),t(e.selectedComponent,{tag:"component"})],1)])])},A=[],T=n($,N,A,!1,null,"becb4ef6");const F=T.exports;export{F as default}; diff --git a/public/build/assets/MyUploads-BvdFJIdW.js b/public/build/assets/MyUploads-YAgiypRv.js similarity index 75% rename from public/build/assets/MyUploads-BvdFJIdW.js rename to public/build/assets/MyUploads-YAgiypRv.js index 55a16d36..bd0b5dbd 100644 --- a/public/build/assets/MyUploads-BvdFJIdW.js +++ b/public/build/assets/MyUploads-YAgiypRv.js @@ -1 +1 @@ -import{L as e}from"./LitterTable-ChsxOeDI.js";import{n as o}from"./app-DuS6KM7M.js";/* empty css */const s={name:"MyUploads",components:{LitterTable:e},async created(){await this.$store.dispatch("GET_MY_PHOTOS")},computed:{paginatedPhotos(){return this.$store.state.photos.myUploadsPaginate}}};var n=function(){var t=this,a=t._self._c;return a("LitterTable",{attrs:{title:"My Uploads",paginatedPhotos:t.paginatedPhotos,action:"GET_MY_PHOTOS"}})},r=[],i=o(s,n,r,!1,null,null);const d=i.exports;export{d as default}; +import{L as e}from"./LitterTable-BrAEt-_i.js";import{n as o}from"./app-BwSojYvl.js";/* empty css */const s={name:"MyUploads",components:{LitterTable:e},async created(){await this.$store.dispatch("GET_MY_PHOTOS")},computed:{paginatedPhotos(){return this.$store.state.photos.myUploadsPaginate}}};var n=function(){var t=this,a=t._self._c;return a("LitterTable",{attrs:{title:"My Uploads",paginatedPhotos:t.paginatedPhotos,action:"GET_MY_PHOTOS"}})},r=[],i=o(s,n,r,!1,null,null);const d=i.exports;export{d as default}; diff --git a/public/build/assets/Payments-VcSsorvg.js b/public/build/assets/Payments-BbgiyAGe.js similarity index 95% rename from public/build/assets/Payments-VcSsorvg.js rename to public/build/assets/Payments-BbgiyAGe.js index bb32765f..37134294 100644 --- a/public/build/assets/Payments-VcSsorvg.js +++ b/public/build/assets/Payments-BbgiyAGe.js @@ -1 +1 @@ -import{L as n}from"./vue-loading-hzYdSApK.js";/* empty css */import{n as a}from"./app-DuS6KM7M.js";/* empty css */const r={name:"Payments",components:{Loading:n},async created(){this.loading=!0,this.$store.state.plans.plans.length===0&&await this.$store.dispatch("GET_PLANS"),this.$store.state.user.user.stripe_id&&await this.$store.dispatch("GET_USERS_SUBSCRIPTIONS"),this.loading=!1},data(){return{loading:!0,plan:"Startup"}},computed:{check_for_stripe_id(){return this.$store.state.user.user.stripe_id},current_plan(){return this.plans.find(e=>e.name===this.subscription.name)},plans(){return this.$store.state.plans.plans},subscription(){return this.$store.state.subscriber.subscription}},methods:{async cancel_active_subscription(){await this.$store.dispatch("DELETE_ACTIVE_SUBSCRIPTION")},async resubscribe(){await this.$store.dispatch("RESUBSCRIBE",this.plan)},subscribe(){console.log("todo - load stripe")}}};var o=function(){var t=this,s=t._self._c;return s("div",{staticStyle:{"padding-left":"1em","padding-right":"1em"}},[s("h1",{staticClass:"title is-4"},[t._v(t._s(t.$t("settings.payments.finance")))]),s("hr"),s("br"),s("div",{staticClass:"columns"},[t.loading?s("loading",{attrs:{active:t.loading,"is-full-page":!0},on:{"update:active":function(i){t.loading=i}}}):s("div",{staticClass:"column one-third is-offset-1"},[t.check_for_stripe_id?s("div",[t.subscription.stripe_status==="active"?s("div",[s("p",[t._v("You are currently subscribed to the "),s("strong",{staticClass:"green"},[t._v(t._s(t.subscription.name))]),t._v(" plan")]),s("p",{staticClass:"mb1"},[t._v("Helping us with "),s("strong",{staticClass:"green"},[t._v("€"+t._s(t.current_plan.price/100))]),t._v(" per month")]),s("p",[t._v("Thank you for helping the development of OpenLitterMap!")]),s("p",{staticClass:"mb1"},[t._v("You can change or cancel your subscription at any time.")]),s("button",{staticClass:"button is-medium is-danger",on:{click:t.cancel_active_subscription}},[t._v("Cancel Subscription")])]):s("div",[s("p",{staticClass:"mb1"},[t._v("You have unsubscribed from "),s("strong",{staticClass:"green"},[t._v(t._s(t.subscription.name))])]),s("p",{staticClass:"mb1"},[t._v("Thank you for supporting the development of OpenLitterMap")]),s("p",[t._v("Please contact us if you would like to resubscribe, or else create a new account. Thanks!")])])]):s("div",[s("p",[t._v(t._s(t.$t("settings.payments.help")))]),s("ul",[s("li",[t._v("- "+t._s(t.$t("settings.payments.support")))]),s("li",[t._v("- "+t._s(t.$t("settings.payments.help-costs")))]),s("li",[t._v("- "+t._s(t.$t("settings.payments.help-hire")))]),s("li",[t._v("- "+t._s(t.$t("settings.payments.help-produce")))]),s("li",[t._v("- "+t._s(t.$t("settings.payments.help-write")))]),s("li",[t._v("- "+t._s(t.$t("settings.payments.help-outreach")))]),s("li",[t._v("- "+t._s(t.$t("settings.payments.help-incentivize")))]),s("li",[t._v("- "+t._s(t.$t("settings.payments.more-soon")))])]),s("button",{staticClass:"button is-medium is-primary",on:{click:t.subscribe}},[t._v(t._s(t.$t("settings.payments.click-to-support")))])])])],1)])},c=[],p=a(r,o,c,!1,null,null);const d=p.exports;export{d as default}; +import{L as n}from"./vue-loading-Ck0acTfr.js";/* empty css */import{n as a}from"./app-BwSojYvl.js";/* empty css */const r={name:"Payments",components:{Loading:n},async created(){this.loading=!0,this.$store.state.plans.plans.length===0&&await this.$store.dispatch("GET_PLANS"),this.$store.state.user.user.stripe_id&&await this.$store.dispatch("GET_USERS_SUBSCRIPTIONS"),this.loading=!1},data(){return{loading:!0,plan:"Startup"}},computed:{check_for_stripe_id(){return this.$store.state.user.user.stripe_id},current_plan(){return this.plans.find(e=>e.name===this.subscription.name)},plans(){return this.$store.state.plans.plans},subscription(){return this.$store.state.subscriber.subscription}},methods:{async cancel_active_subscription(){await this.$store.dispatch("DELETE_ACTIVE_SUBSCRIPTION")},async resubscribe(){await this.$store.dispatch("RESUBSCRIBE",this.plan)},subscribe(){console.log("todo - load stripe")}}};var o=function(){var t=this,s=t._self._c;return s("div",{staticStyle:{"padding-left":"1em","padding-right":"1em"}},[s("h1",{staticClass:"title is-4"},[t._v(t._s(t.$t("settings.payments.finance")))]),s("hr"),s("br"),s("div",{staticClass:"columns"},[t.loading?s("loading",{attrs:{active:t.loading,"is-full-page":!0},on:{"update:active":function(i){t.loading=i}}}):s("div",{staticClass:"column one-third is-offset-1"},[t.check_for_stripe_id?s("div",[t.subscription.stripe_status==="active"?s("div",[s("p",[t._v("You are currently subscribed to the "),s("strong",{staticClass:"green"},[t._v(t._s(t.subscription.name))]),t._v(" plan")]),s("p",{staticClass:"mb1"},[t._v("Helping us with "),s("strong",{staticClass:"green"},[t._v("€"+t._s(t.current_plan.price/100))]),t._v(" per month")]),s("p",[t._v("Thank you for helping the development of OpenLitterMap!")]),s("p",{staticClass:"mb1"},[t._v("You can change or cancel your subscription at any time.")]),s("button",{staticClass:"button is-medium is-danger",on:{click:t.cancel_active_subscription}},[t._v("Cancel Subscription")])]):s("div",[s("p",{staticClass:"mb1"},[t._v("You have unsubscribed from "),s("strong",{staticClass:"green"},[t._v(t._s(t.subscription.name))])]),s("p",{staticClass:"mb1"},[t._v("Thank you for supporting the development of OpenLitterMap")]),s("p",[t._v("Please contact us if you would like to resubscribe, or else create a new account. Thanks!")])])]):s("div",[s("p",[t._v(t._s(t.$t("settings.payments.help")))]),s("ul",[s("li",[t._v("- "+t._s(t.$t("settings.payments.support")))]),s("li",[t._v("- "+t._s(t.$t("settings.payments.help-costs")))]),s("li",[t._v("- "+t._s(t.$t("settings.payments.help-hire")))]),s("li",[t._v("- "+t._s(t.$t("settings.payments.help-produce")))]),s("li",[t._v("- "+t._s(t.$t("settings.payments.help-write")))]),s("li",[t._v("- "+t._s(t.$t("settings.payments.help-outreach")))]),s("li",[t._v("- "+t._s(t.$t("settings.payments.help-incentivize")))]),s("li",[t._v("- "+t._s(t.$t("settings.payments.more-soon")))])]),s("button",{staticClass:"button is-medium is-primary",on:{click:t.subscribe}},[t._v(t._s(t.$t("settings.payments.click-to-support")))])])])],1)])},c=[],p=a(r,o,c,!1,null,null);const d=p.exports;export{d as default}; diff --git a/public/build/assets/PickedUp-DnNJB4FB.js b/public/build/assets/PickedUp-CD9AKudE.js similarity index 95% rename from public/build/assets/PickedUp-DnNJB4FB.js rename to public/build/assets/PickedUp-CD9AKudE.js index 4eaeaaec..41383b75 100644 --- a/public/build/assets/PickedUp-DnNJB4FB.js +++ b/public/build/assets/PickedUp-CD9AKudE.js @@ -1 +1 @@ -import{n as e}from"./app-DuS6KM7M.js";/* empty css */const i={name:"PickedUp",data(){return{processing:!1}},methods:{async toggle(){this.processing=!0,await this.$store.dispatch("TOGGLE_LITTER_PICKED_UP_SETTING"),this.processing=!1}},computed:{button(){return this.processing?"button is-info is-loading":"button is-info"},picked_up(){return!this.$store.state.user.user.items_remaining},text(){return this.picked_up?"Your litter will be logged as picked up.":"Your litter is logged as not picked up."}}};var n=function(){var s=this,t=s._self._c;return t("div",{staticStyle:{"padding-left":"1em","padding-right":"1em"}},[t("h1",{staticClass:"title is-4"},[s._v(s._s(s.$t("settings.presence.do-you-pickup")))]),t("hr"),t("p",{staticClass:"mb1"},[s._v(s._s(s.$t("settings.presence.save-def-settings")))]),t("p",{staticClass:"mb1"},[s._v(s._s(s.$t("settings.presence.change-value-of-litter")))]),t("p",[s._v(s._s(s.$t("settings.presence.status")))]),t("br"),t("p",[t("b",[s._v(s._s(s.$t("settings.presence.toggle-presence"))+":")])]),t("p",[t("b",{style:s.picked_up?"color: green":"color: red"},[s._v(s._s(this.text))])]),t("br"),t("div",{staticClass:"columns"},[t("div",{staticClass:"column is-one-third is-offset-1"},[t("div",{staticClass:"row"},[t("button",{class:s.button,attrs:{disabled:s.processing},on:{click:s.toggle}},[s._v(s._s(s.$t("settings.presence.pickup?")))])])])])])},r=[],o=e(i,n,r,!1,null,null);const l=o.exports;export{l as default}; +import{n as e}from"./app-BwSojYvl.js";/* empty css */const i={name:"PickedUp",data(){return{processing:!1}},methods:{async toggle(){this.processing=!0,await this.$store.dispatch("TOGGLE_LITTER_PICKED_UP_SETTING"),this.processing=!1}},computed:{button(){return this.processing?"button is-info is-loading":"button is-info"},picked_up(){return!this.$store.state.user.user.items_remaining},text(){return this.picked_up?"Your litter will be logged as picked up.":"Your litter is logged as not picked up."}}};var n=function(){var s=this,t=s._self._c;return t("div",{staticStyle:{"padding-left":"1em","padding-right":"1em"}},[t("h1",{staticClass:"title is-4"},[s._v(s._s(s.$t("settings.presence.do-you-pickup")))]),t("hr"),t("p",{staticClass:"mb1"},[s._v(s._s(s.$t("settings.presence.save-def-settings")))]),t("p",{staticClass:"mb1"},[s._v(s._s(s.$t("settings.presence.change-value-of-litter")))]),t("p",[s._v(s._s(s.$t("settings.presence.status")))]),t("br"),t("p",[t("b",[s._v(s._s(s.$t("settings.presence.toggle-presence"))+":")])]),t("p",[t("b",{style:s.picked_up?"color: green":"color: red"},[s._v(s._s(this.text))])]),t("br"),t("div",{staticClass:"columns"},[t("div",{staticClass:"column is-one-third is-offset-1"},[t("div",{staticClass:"row"},[t("button",{class:s.button,attrs:{disabled:s.processing},on:{click:s.toggle}},[s._v(s._s(s.$t("settings.presence.pickup?")))])])])])])},r=[],o=e(i,n,r,!1,null,null);const l=o.exports;export{l as default}; diff --git a/public/build/assets/Privacy-GGgsaM3d.js b/public/build/assets/Privacy-BPIfeVCy.js similarity index 99% rename from public/build/assets/Privacy-GGgsaM3d.js rename to public/build/assets/Privacy-BPIfeVCy.js index 2dd6aa64..b40593d4 100644 --- a/public/build/assets/Privacy-GGgsaM3d.js +++ b/public/build/assets/Privacy-BPIfeVCy.js @@ -1 +1 @@ -import{n as m}from"./app-DuS6KM7M.js";/* empty css */const o={name:"MapsPrivacy",computed:{maps_name:{get(){return this.$store.getters.user.show_name_maps},set(c){this.$store.commit("changePrivacy",{column:"show_name_maps",v:c})}},maps_username:{get(){return this.$store.getters.user.show_username_maps},set(c){this.$store.commit("changePrivacy",{column:"show_username_maps",v:c})}}}};var l=function(){var e=this,a=e._self._c;return a("div",[a("h1",{staticClass:"title is-4"},[e._v(" "+e._s(e.$t("settings.privacy.maps"))+": ")]),a("div",{staticClass:"mb1"},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.maps_name,expression:"maps_name"}],attrs:{id:"settings_maps_change_name",name:"settings_maps_change_name",type:"checkbox"},domProps:{checked:Array.isArray(e.maps_name)?e._i(e.maps_name,null)>-1:e.maps_name},on:{change:function(i){var s=e.maps_name,r=i.target,_=!!r.checked;if(Array.isArray(s)){var n=null,t=e._i(s,n);r.checked?t<0&&(e.maps_name=s.concat([n])):t>-1&&(e.maps_name=s.slice(0,t).concat(s.slice(t+1)))}else e.maps_name=_}}}),a("label",{staticClass:"checkbox",attrs:{for:"settings_maps_change_name"}},[e._v(" "+e._s(e.$t("settings.privacy.credit-name"))+" ")]),a("br"),a("input",{directives:[{name:"model",rawName:"v-model",value:e.maps_username,expression:"maps_username"}],attrs:{id:"settings_maps_change_username",name:"settings_maps_change_username",type:"checkbox"},domProps:{checked:Array.isArray(e.maps_username)?e._i(e.maps_username,null)>-1:e.maps_username},on:{change:function(i){var s=e.maps_username,r=i.target,_=!!r.checked;if(Array.isArray(s)){var n=null,t=e._i(s,n);r.checked?t<0&&(e.maps_username=s.concat([n])):t>-1&&(e.maps_username=s.slice(0,t).concat(s.slice(t+1)))}else e.maps_username=_}}}),a("label",{staticClass:"checkbox",attrs:{for:"settings_maps_change_username"}},[e._v(" "+e._s(e.$t("settings.privacy.credit-username"))+" ")])]),a("div",{staticClass:"mb1"},[e.maps_name&&e.maps_username?a("h1",{staticClass:"success-privacy-text"},[e._v(" Both your name and username will appear on each image you upload to the maps. ")]):e.maps_name&&!e.maps_username?a("h1",{staticClass:"success-privacy-text"},[e._v(" "+e._s(e.$t("settings.privacy.name-imgs-yes"))+" ")]):!e.maps_name&&e.maps_username?a("h1",{staticClass:"success-privacy-text"},[e._v(" "+e._s(e.$t("settings.privacy.username-imgs-yes"))+" ")]):!e.maps_name&&!e.maps_username?a("h1",{staticClass:"failed-privacy-text"},[e._v(" "+e._s(e.$t("settings.privacy.name-username-map-no"))+" ")]):e._e()])])},d=[],p=m(o,l,d,!1,null,null);const u=p.exports,y={name:"LeaderboardsPrivacy",computed:{leaderboard_name:{get(){return this.$store.getters.user.show_name},set(c){this.$store.commit("changePrivacy",{column:"show_name",v:c})}},leaderboard_username:{get(){return this.$store.getters.user.show_username},set(c){this.$store.commit("changePrivacy",{column:"show_username",v:c})}}}};var v=function(){var e=this,a=e._self._c;return a("div",[a("h1",{staticClass:"title is-4"},[e._v(" "+e._s(e.$t("settings.privacy.leaderboards"))+": ")]),a("div",{staticClass:"mb1"},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.leaderboard_name,expression:"leaderboard_name"}],attrs:{id:"settings_privacy_leaderboards_name",name:"settings_privacy_leaderboards_name",type:"checkbox"},domProps:{checked:Array.isArray(e.leaderboard_name)?e._i(e.leaderboard_name,null)>-1:e.leaderboard_name},on:{change:function(i){var s=e.leaderboard_name,r=i.target,_=!!r.checked;if(Array.isArray(s)){var n=null,t=e._i(s,n);r.checked?t<0&&(e.leaderboard_name=s.concat([n])):t>-1&&(e.leaderboard_name=s.slice(0,t).concat(s.slice(t+1)))}else e.leaderboard_name=_}}}),a("label",{staticClass:"checkbox",attrs:{for:"settings_privacy_leaderboards_name"}},[e._v(" "+e._s(e.$t("settings.privacy.credit-my-name"))+" ")]),a("br"),a("input",{directives:[{name:"model",rawName:"v-model",value:e.leaderboard_username,expression:"leaderboard_username"}],attrs:{id:"settings_privacy_leaderboards_username",name:"settings_privacy_leaderboards_username",type:"checkbox"},domProps:{checked:Array.isArray(e.leaderboard_username)?e._i(e.leaderboard_username,null)>-1:e.leaderboard_username},on:{change:function(i){var s=e.leaderboard_username,r=i.target,_=!!r.checked;if(Array.isArray(s)){var n=null,t=e._i(s,n);r.checked?t<0&&(e.leaderboard_username=s.concat([n])):t>-1&&(e.leaderboard_username=s.slice(0,t).concat(s.slice(t+1)))}else e.leaderboard_username=_}}}),a("label",{staticClass:"checkbox",attrs:{for:"settings_privacy_leaderboards_username"}},[e._v(" "+e._s(e.$t("settings.privacy.credit-my-username"))+" ")])]),a("div",{staticClass:"mb1"},[e.leaderboard_name&&e.leaderboard_username?a("h1",{staticClass:"success-privacy-text"},[e._v(" Both your name and username will appear on the Leaderboards. Good luck! ")]):e.leaderboard_name&&!e.leaderboard_username?a("h1",{staticClass:"success-privacy-text"},[e._v(" "+e._s(e.$t("settings.privacy.name-leaderboards-yes"))+" ")]):!e.leaderboard_name&&e.leaderboard_username?a("h1",{staticClass:"success-privacy-text"},[e._v(" "+e._s(e.$t("settings.privacy.username-leaderboards-yes"))+" ")]):!e.leaderboard_name&&!e.leaderboard_username?a("h1",{staticClass:"failed-privacy-text"},[e._v(" "+e._s(e.$t("settings.privacy.name-username-leaderboards-no"))+" ")]):e._e()])])},h=[],g=m(y,v,h,!1,null,null);const b=g.exports,f={name:"CreatedByPrivacy",computed:{createdby_name:{get(){return this.$store.getters.user.show_name_createdby},set(c){this.$store.commit("changePrivacy",{column:"show_name_createdby",v:c})}},createdby_username:{get(){return this.$store.getters.user.show_username_createdby},set(c){this.$store.commit("changePrivacy",{column:"show_username_createdby",v:c})}}}};var C=function(){var e=this,a=e._self._c;return a("div",[a("h1",{staticClass:"title is-4"},[e._v(" "+e._s(e.$t("settings.privacy.created-by"))+": ")]),a("div",{staticClass:"mb1"},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.createdby_name,expression:"createdby_name"}],attrs:{id:"settings_privacy_createdby_name",name:"settings_privacy_createdby_name",type:"checkbox"},domProps:{checked:Array.isArray(e.createdby_name)?e._i(e.createdby_name,null)>-1:e.createdby_name},on:{change:function(i){var s=e.createdby_name,r=i.target,_=!!r.checked;if(Array.isArray(s)){var n=null,t=e._i(s,n);r.checked?t<0&&(e.createdby_name=s.concat([n])):t>-1&&(e.createdby_name=s.slice(0,t).concat(s.slice(t+1)))}else e.createdby_name=_}}}),a("label",{staticClass:"checkbox",attrs:{for:"settings_privacy_createdby_name"}},[e._v(" "+e._s(e.$t("settings.privacy.credit-name"))+" ")]),a("br"),a("input",{directives:[{name:"model",rawName:"v-model",value:e.createdby_username,expression:"createdby_username"}],attrs:{id:"settings_privacy_createdby_username",name:"settings_privacy_createdby_username",type:"checkbox"},domProps:{checked:Array.isArray(e.createdby_username)?e._i(e.createdby_username,null)>-1:e.createdby_username},on:{change:function(i){var s=e.createdby_username,r=i.target,_=!!r.checked;if(Array.isArray(s)){var n=null,t=e._i(s,n);r.checked?t<0&&(e.createdby_username=s.concat([n])):t>-1&&(e.createdby_username=s.slice(0,t).concat(s.slice(t+1)))}else e.createdby_username=_}}}),a("label",{staticClass:"checkbox",attrs:{for:"settings_privacy_createdby_username"}},[e._v(" "+e._s(e.$t("settings.privacy.credit-username"))+" ")])]),a("div",{staticClass:"mb1"},[e.createdby_name&&e.createdby_username?a("h1",{staticClass:"success-privacy-text"},[e._v(" Both your name and username will appear in the Created By section of any new locations you create by being the first to upload. ")]):e.createdby_name&&!e.createdby_username?a("h1",{staticClass:"success-privacy-text"},[e._v(" "+e._s(e.$t("settings.privacy.name-locations-yes"))+" ")]):!e.createdby_name&&e.createdby_username?a("h1",{staticClass:"success-privacy-text"},[e._v(" "+e._s(e.$t("settings.privacy.username-locations-yes"))+" ")]):!e.createdby_name&&!e.createdby_username?a("h1",{staticClass:"failed-privacy-text"},[e._v(" "+e._s(e.$t("settings.privacy.name-username-locations-yes"))+" ")]):e._e()])])},x=[],k=m(f,C,x,!1,null,null);const $=k.exports,P={name:"PreventOthersTaggingMyPhotos",computed:{prevent_others_tagging_my_photos:{get(){return this.$store.getters.user.prevent_others_tagging_my_photos},set(c){this.$store.commit("changePrivacy",{column:"prevent_others_tagging_my_photos",v:c})}}}};var A=function(){var e=this,a=e._self._c;return a("div",[a("h1",{staticClass:"title is-4"},[e._v(" Prevent others tagging my photos: ")]),a("div",{staticClass:"mb1"},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.prevent_others_tagging_my_photos,expression:"prevent_others_tagging_my_photos"}],attrs:{id:"settings_privacy_prevent_others_tagging_my_photos",name:"settings_privacy_prevent_others_tagging_my_photos",type:"checkbox"},domProps:{checked:Array.isArray(e.prevent_others_tagging_my_photos)?e._i(e.prevent_others_tagging_my_photos,null)>-1:e.prevent_others_tagging_my_photos},on:{change:function(i){var s=e.prevent_others_tagging_my_photos,r=i.target,_=!!r.checked;if(Array.isArray(s)){var n=null,t=e._i(s,n);r.checked?t<0&&(e.prevent_others_tagging_my_photos=s.concat([n])):t>-1&&(e.prevent_others_tagging_my_photos=s.slice(0,t).concat(s.slice(t+1)))}else e.prevent_others_tagging_my_photos=_}}}),a("label",{staticClass:"checkbox",attrs:{for:"settings_privacy_prevent_others_tagging_my_photos"}},[e._v(" Prevent others tagging my photos ")])])])},w=[],N=m(P,A,w,!1,null,null);const B=N.exports,M={name:"Privacy",components:{PreventOthersTaggingMyPhotos:B,MapsPrivacy:u,LeaderboardsPrivacy:b,CreatedByPrivacy:$},data(){return{processing:!1}},methods:{async submit(){this.processing=!0,await this.$store.dispatch("SAVE_PRIVACY_SETTINGS"),this.processing=!1}}};var R=function(){var e=this,a=e._self._c;return a("div",{staticStyle:{"padding-left":"1em","padding-right":"1em"}},[a("h1",{staticClass:"title is-4"},[e._v(" "+e._s(e.$t("settings.privacy.change-privacy"))+" ")]),a("hr"),a("br"),a("div",{staticClass:"columns"},[a("div",{staticClass:"column one-third is-offset-1"},[a("div",{staticClass:"field"},[a("MapsPrivacy"),a("LeaderboardsPrivacy"),a("CreatedByPrivacy"),a("PreventOthersTaggingMyPhotos")],1),a("button",{staticClass:"button is-medium is-info",class:e.processing?"is-loading":"",attrs:{disabled:e.processing},on:{click:e.submit}},[e._v(" "+e._s(e.$t("settings.privacy.update"))+" ")])])])])},F=[],T=m(M,R,F,!1,null,null);const O=T.exports;export{O as default}; +import{n as m}from"./app-BwSojYvl.js";/* empty css */const o={name:"MapsPrivacy",computed:{maps_name:{get(){return this.$store.getters.user.show_name_maps},set(c){this.$store.commit("changePrivacy",{column:"show_name_maps",v:c})}},maps_username:{get(){return this.$store.getters.user.show_username_maps},set(c){this.$store.commit("changePrivacy",{column:"show_username_maps",v:c})}}}};var l=function(){var e=this,a=e._self._c;return a("div",[a("h1",{staticClass:"title is-4"},[e._v(" "+e._s(e.$t("settings.privacy.maps"))+": ")]),a("div",{staticClass:"mb1"},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.maps_name,expression:"maps_name"}],attrs:{id:"settings_maps_change_name",name:"settings_maps_change_name",type:"checkbox"},domProps:{checked:Array.isArray(e.maps_name)?e._i(e.maps_name,null)>-1:e.maps_name},on:{change:function(i){var s=e.maps_name,r=i.target,_=!!r.checked;if(Array.isArray(s)){var n=null,t=e._i(s,n);r.checked?t<0&&(e.maps_name=s.concat([n])):t>-1&&(e.maps_name=s.slice(0,t).concat(s.slice(t+1)))}else e.maps_name=_}}}),a("label",{staticClass:"checkbox",attrs:{for:"settings_maps_change_name"}},[e._v(" "+e._s(e.$t("settings.privacy.credit-name"))+" ")]),a("br"),a("input",{directives:[{name:"model",rawName:"v-model",value:e.maps_username,expression:"maps_username"}],attrs:{id:"settings_maps_change_username",name:"settings_maps_change_username",type:"checkbox"},domProps:{checked:Array.isArray(e.maps_username)?e._i(e.maps_username,null)>-1:e.maps_username},on:{change:function(i){var s=e.maps_username,r=i.target,_=!!r.checked;if(Array.isArray(s)){var n=null,t=e._i(s,n);r.checked?t<0&&(e.maps_username=s.concat([n])):t>-1&&(e.maps_username=s.slice(0,t).concat(s.slice(t+1)))}else e.maps_username=_}}}),a("label",{staticClass:"checkbox",attrs:{for:"settings_maps_change_username"}},[e._v(" "+e._s(e.$t("settings.privacy.credit-username"))+" ")])]),a("div",{staticClass:"mb1"},[e.maps_name&&e.maps_username?a("h1",{staticClass:"success-privacy-text"},[e._v(" Both your name and username will appear on each image you upload to the maps. ")]):e.maps_name&&!e.maps_username?a("h1",{staticClass:"success-privacy-text"},[e._v(" "+e._s(e.$t("settings.privacy.name-imgs-yes"))+" ")]):!e.maps_name&&e.maps_username?a("h1",{staticClass:"success-privacy-text"},[e._v(" "+e._s(e.$t("settings.privacy.username-imgs-yes"))+" ")]):!e.maps_name&&!e.maps_username?a("h1",{staticClass:"failed-privacy-text"},[e._v(" "+e._s(e.$t("settings.privacy.name-username-map-no"))+" ")]):e._e()])])},d=[],p=m(o,l,d,!1,null,null);const u=p.exports,y={name:"LeaderboardsPrivacy",computed:{leaderboard_name:{get(){return this.$store.getters.user.show_name},set(c){this.$store.commit("changePrivacy",{column:"show_name",v:c})}},leaderboard_username:{get(){return this.$store.getters.user.show_username},set(c){this.$store.commit("changePrivacy",{column:"show_username",v:c})}}}};var v=function(){var e=this,a=e._self._c;return a("div",[a("h1",{staticClass:"title is-4"},[e._v(" "+e._s(e.$t("settings.privacy.leaderboards"))+": ")]),a("div",{staticClass:"mb1"},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.leaderboard_name,expression:"leaderboard_name"}],attrs:{id:"settings_privacy_leaderboards_name",name:"settings_privacy_leaderboards_name",type:"checkbox"},domProps:{checked:Array.isArray(e.leaderboard_name)?e._i(e.leaderboard_name,null)>-1:e.leaderboard_name},on:{change:function(i){var s=e.leaderboard_name,r=i.target,_=!!r.checked;if(Array.isArray(s)){var n=null,t=e._i(s,n);r.checked?t<0&&(e.leaderboard_name=s.concat([n])):t>-1&&(e.leaderboard_name=s.slice(0,t).concat(s.slice(t+1)))}else e.leaderboard_name=_}}}),a("label",{staticClass:"checkbox",attrs:{for:"settings_privacy_leaderboards_name"}},[e._v(" "+e._s(e.$t("settings.privacy.credit-my-name"))+" ")]),a("br"),a("input",{directives:[{name:"model",rawName:"v-model",value:e.leaderboard_username,expression:"leaderboard_username"}],attrs:{id:"settings_privacy_leaderboards_username",name:"settings_privacy_leaderboards_username",type:"checkbox"},domProps:{checked:Array.isArray(e.leaderboard_username)?e._i(e.leaderboard_username,null)>-1:e.leaderboard_username},on:{change:function(i){var s=e.leaderboard_username,r=i.target,_=!!r.checked;if(Array.isArray(s)){var n=null,t=e._i(s,n);r.checked?t<0&&(e.leaderboard_username=s.concat([n])):t>-1&&(e.leaderboard_username=s.slice(0,t).concat(s.slice(t+1)))}else e.leaderboard_username=_}}}),a("label",{staticClass:"checkbox",attrs:{for:"settings_privacy_leaderboards_username"}},[e._v(" "+e._s(e.$t("settings.privacy.credit-my-username"))+" ")])]),a("div",{staticClass:"mb1"},[e.leaderboard_name&&e.leaderboard_username?a("h1",{staticClass:"success-privacy-text"},[e._v(" Both your name and username will appear on the Leaderboards. Good luck! ")]):e.leaderboard_name&&!e.leaderboard_username?a("h1",{staticClass:"success-privacy-text"},[e._v(" "+e._s(e.$t("settings.privacy.name-leaderboards-yes"))+" ")]):!e.leaderboard_name&&e.leaderboard_username?a("h1",{staticClass:"success-privacy-text"},[e._v(" "+e._s(e.$t("settings.privacy.username-leaderboards-yes"))+" ")]):!e.leaderboard_name&&!e.leaderboard_username?a("h1",{staticClass:"failed-privacy-text"},[e._v(" "+e._s(e.$t("settings.privacy.name-username-leaderboards-no"))+" ")]):e._e()])])},h=[],g=m(y,v,h,!1,null,null);const b=g.exports,f={name:"CreatedByPrivacy",computed:{createdby_name:{get(){return this.$store.getters.user.show_name_createdby},set(c){this.$store.commit("changePrivacy",{column:"show_name_createdby",v:c})}},createdby_username:{get(){return this.$store.getters.user.show_username_createdby},set(c){this.$store.commit("changePrivacy",{column:"show_username_createdby",v:c})}}}};var C=function(){var e=this,a=e._self._c;return a("div",[a("h1",{staticClass:"title is-4"},[e._v(" "+e._s(e.$t("settings.privacy.created-by"))+": ")]),a("div",{staticClass:"mb1"},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.createdby_name,expression:"createdby_name"}],attrs:{id:"settings_privacy_createdby_name",name:"settings_privacy_createdby_name",type:"checkbox"},domProps:{checked:Array.isArray(e.createdby_name)?e._i(e.createdby_name,null)>-1:e.createdby_name},on:{change:function(i){var s=e.createdby_name,r=i.target,_=!!r.checked;if(Array.isArray(s)){var n=null,t=e._i(s,n);r.checked?t<0&&(e.createdby_name=s.concat([n])):t>-1&&(e.createdby_name=s.slice(0,t).concat(s.slice(t+1)))}else e.createdby_name=_}}}),a("label",{staticClass:"checkbox",attrs:{for:"settings_privacy_createdby_name"}},[e._v(" "+e._s(e.$t("settings.privacy.credit-name"))+" ")]),a("br"),a("input",{directives:[{name:"model",rawName:"v-model",value:e.createdby_username,expression:"createdby_username"}],attrs:{id:"settings_privacy_createdby_username",name:"settings_privacy_createdby_username",type:"checkbox"},domProps:{checked:Array.isArray(e.createdby_username)?e._i(e.createdby_username,null)>-1:e.createdby_username},on:{change:function(i){var s=e.createdby_username,r=i.target,_=!!r.checked;if(Array.isArray(s)){var n=null,t=e._i(s,n);r.checked?t<0&&(e.createdby_username=s.concat([n])):t>-1&&(e.createdby_username=s.slice(0,t).concat(s.slice(t+1)))}else e.createdby_username=_}}}),a("label",{staticClass:"checkbox",attrs:{for:"settings_privacy_createdby_username"}},[e._v(" "+e._s(e.$t("settings.privacy.credit-username"))+" ")])]),a("div",{staticClass:"mb1"},[e.createdby_name&&e.createdby_username?a("h1",{staticClass:"success-privacy-text"},[e._v(" Both your name and username will appear in the Created By section of any new locations you create by being the first to upload. ")]):e.createdby_name&&!e.createdby_username?a("h1",{staticClass:"success-privacy-text"},[e._v(" "+e._s(e.$t("settings.privacy.name-locations-yes"))+" ")]):!e.createdby_name&&e.createdby_username?a("h1",{staticClass:"success-privacy-text"},[e._v(" "+e._s(e.$t("settings.privacy.username-locations-yes"))+" ")]):!e.createdby_name&&!e.createdby_username?a("h1",{staticClass:"failed-privacy-text"},[e._v(" "+e._s(e.$t("settings.privacy.name-username-locations-yes"))+" ")]):e._e()])])},x=[],k=m(f,C,x,!1,null,null);const $=k.exports,P={name:"PreventOthersTaggingMyPhotos",computed:{prevent_others_tagging_my_photos:{get(){return this.$store.getters.user.prevent_others_tagging_my_photos},set(c){this.$store.commit("changePrivacy",{column:"prevent_others_tagging_my_photos",v:c})}}}};var A=function(){var e=this,a=e._self._c;return a("div",[a("h1",{staticClass:"title is-4"},[e._v(" Prevent others tagging my photos: ")]),a("div",{staticClass:"mb1"},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.prevent_others_tagging_my_photos,expression:"prevent_others_tagging_my_photos"}],attrs:{id:"settings_privacy_prevent_others_tagging_my_photos",name:"settings_privacy_prevent_others_tagging_my_photos",type:"checkbox"},domProps:{checked:Array.isArray(e.prevent_others_tagging_my_photos)?e._i(e.prevent_others_tagging_my_photos,null)>-1:e.prevent_others_tagging_my_photos},on:{change:function(i){var s=e.prevent_others_tagging_my_photos,r=i.target,_=!!r.checked;if(Array.isArray(s)){var n=null,t=e._i(s,n);r.checked?t<0&&(e.prevent_others_tagging_my_photos=s.concat([n])):t>-1&&(e.prevent_others_tagging_my_photos=s.slice(0,t).concat(s.slice(t+1)))}else e.prevent_others_tagging_my_photos=_}}}),a("label",{staticClass:"checkbox",attrs:{for:"settings_privacy_prevent_others_tagging_my_photos"}},[e._v(" Prevent others tagging my photos ")])])])},w=[],N=m(P,A,w,!1,null,null);const B=N.exports,M={name:"Privacy",components:{PreventOthersTaggingMyPhotos:B,MapsPrivacy:u,LeaderboardsPrivacy:b,CreatedByPrivacy:$},data(){return{processing:!1}},methods:{async submit(){this.processing=!0,await this.$store.dispatch("SAVE_PRIVACY_SETTINGS"),this.processing=!1}}};var R=function(){var e=this,a=e._self._c;return a("div",{staticStyle:{"padding-left":"1em","padding-right":"1em"}},[a("h1",{staticClass:"title is-4"},[e._v(" "+e._s(e.$t("settings.privacy.change-privacy"))+" ")]),a("hr"),a("br"),a("div",{staticClass:"columns"},[a("div",{staticClass:"column one-third is-offset-1"},[a("div",{staticClass:"field"},[a("MapsPrivacy"),a("LeaderboardsPrivacy"),a("CreatedByPrivacy"),a("PreventOthersTaggingMyPhotos")],1),a("button",{staticClass:"button is-medium is-info",class:e.processing?"is-loading":"",attrs:{disabled:e.processing},on:{click:e.submit}},[e._v(" "+e._s(e.$t("settings.privacy.update"))+" ")])])])])},F=[],T=m(M,R,F,!1,null,null);const O=T.exports;export{O as default}; diff --git a/public/build/assets/Privacy-DGjpqRx1.js b/public/build/assets/Privacy-DUg7uCoa.js similarity index 99% rename from public/build/assets/Privacy-DGjpqRx1.js rename to public/build/assets/Privacy-DUg7uCoa.js index 63358595..85948ac4 100644 --- a/public/build/assets/Privacy-DGjpqRx1.js +++ b/public/build/assets/Privacy-DUg7uCoa.js @@ -1 +1 @@ -import{n as a}from"./app-DuS6KM7M.js";/* empty css */const i={name:"Privacy"};var o=function(){var e=this;return e._self._c,e._m(0)},r=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"container"},[e("h1",[t._v("PLEASE READ CAREFULLY BEFORE USING OPENLITTERMAP.COM:")]),e("p",[e("i",[t._v(" Last updated: 14"),e("sup",[t._v("th")]),t._v(" April 2017 ")])]),e("br"),e("h1",[t._v("Privacy Policy of OpenLitterMap.com")]),e("br"),e("p",[t._v("Our Services provide volunteers (Citizen Scientists) with a means to share information on occurrences of litter through geotagged imagery. Geotagged images have a spatial (a specific, typically centimeter-accurate GPS Lat/Long position) reference as well as a specific time-stamp (Year-month-day HH:MM:SS), which can be used to determine exactly where and when an occurrence of litter was identified- thus showing the location of a contributor at any point in time and potentially revealing information about the spatial patterns of a contributor or many contributors and revealing the location of hotspots and irregular occurrences of hazardous material such as drug-related litter (eg. needles, injecting equipment). A specific litter item can be shown individually and/or abstracted to a dynamically-sized hexagonal grid to analytically characterize the presence of litter, or abstractively perhaps even the illicit consumption of toxic substances. Once these images are shared with us, and only geotagged images can pass, the volunteer must properly attribute each image (eg. Determine x items of litter in x number of photos through the user of their Profile (https://openlittermap.com/profile) and once the image and its’ contents are attributed, each image must be submitted for crowdsourced verification. The verified images, their location and the time the image was captured will be mapped, spatially analyzed and the results, the images, the make/model of the device (which is an indication of spatial accuracy eg. iPhones (5+) are currently typically superior in spatial accuracy and temporal GPS-revisit frequency to Android) and their contents will be made public for guests or authenticated users of the website. Each image can account for only 1 point on the map which when clicked, will show the image which can be viewed in high-resolution, as well as its contents, the make and/or model of the device and although all images will be submitted anonymously by default, each contributor has the option to credit either their full name and/or unique Username or Organisation on the verifiable geotagged images they provide. We will maintain the images at our own discretion in accordance with our limited server capacity. However, images that are verified by an Admin and reach stage two verification will be deleted, allowing us to resolve greater volumes of data and keep our costs as low as possible. "),e("br"),e("br"),e("br"),t._v(" This Privacy Policy describes how and when we collect, share and use your information across the website. By using this website, you authorize us to store and use your information in accordance with this privacy policy. This policy will change from time to time and we will do our best to notify you of these changes and updates once you log into the website and through our social media campaigns @OpenLitterMap (Twitter).")]),e("br"),e("br"),e("h3",[t._v("People under the age of 13")]),e("br"),e("p",[t._v("We do not allow for people under the age of 13 to use or register with our Services. If we discover there is personal information from or about children below this age category, we will permanently delete that information and any other associate records immediately.")]),e("br"),e("h3",[t._v("People aged 13-17")]),e("br"),e("p",[t._v("Only with parental or guardian supervision may a person aged 13-17 use this website for educational purposes. With proper supervision a person in this age category may be able to involve themselves with challenging the destructive paradigm of plastic pollution and contribute to the production of geospatial knowledge that has the potential to transform public and institutional behaviour however users should take particular caution when sharing their information online or when collecting data on litter which may be detrimental to personal health. For example, drug-related litter is a highly dangerous public-health hazard and if mishandled or stepped on accidentally, could result in a life-long physical, sexual and mentally-debilitating illness, disease, infection and/or scar, which will require urgent medical treatment from a medical professional- something this website claims to hold no knowledge of. Parents may choose to show the information on drug-related litter to their adolescent children to raise awareness about the harms caused by drug-related littering the public so that further accidents can be avoided.")]),e("br"),e("h3",{staticStyle:{color:"red"}},[t._v("If you require urgent medical treatment")]),e("br"),e("p",[e("b",[t._v("Please call 112, 999 or your appropriate emergency line and ask for an ambulance.")])]),e("br"),e("br"),e("h3",[t._v("We collect the following information:")]),e("br"),e("p",[t._v("- Information you provide when you register for an account (eg. Full Name, legitimate and verifiable email address, a unique username or the organisation you are legally entitled to represent) "),e("br"),t._v(" - The images you submit. "),e("br"),t._v(" - The metadata associated with the images. "),e("br"),t._v(" - The attribute information associated with each image. "),e("br"),t._v(" - Cumulate statistics and geostatistics based on the analysis of each and all images. ")]),e("br"),e("h3",[t._v("We do not collect the following information:")]),e("p",[e("br"),t._v(" - Cookies. "),e("br"),t._v(" - Your IP address. "),e("br"),t._v(" - The website you have come for, or are going to. "),e("br"),t._v(" - The type of browser you are using. "),e("br"),t._v(" - “Clickstream” data. "),e("br"),t._v(" - How you use this website. "),e("br")]),e("br"),e("h3",[t._v("Other people including 3rd parties may use the information you decide to make public accessible.")]),e("br"),e("p",[t._v("By submitting data to this Service, you accept and understand that the images, their contents, their location in time and space and potentially on your allowance, you may wish to be represented as the contributor of the image by full name and/or your unique username. By default, all images will be contributed anonymously. ")]),e("br"),e("h3",[t._v("Security and your Password")]),e("br"),e("p",[t._v("You must choose a strong password at least 6 characters long that contains upper and lower case characters, a number and a symbol. Your password will be encrypted using the best available encryption methods and stored securely on our server. With the one exception of the map on Firefox which requires partial encryption, all of our website runs on an encrypted HTTPS network so the information you provide, including for example credit card information, is fully encrypted with SSL. In fact for credit cards we never touch your card details as we use Stripe for payments. www.stripe.com")]),e("br"),e("h3",[t._v("Feedback")]),e("br"),e("p",[t._v("This is a new service. We are happy to hear feedback on this service or privacy policy if you think you can offer us some advice please contact us at info@openlittermap.com")])])}],n=a(i,o,r,!1,null,"f7be5479");const c=n.exports;export{c as default}; +import{n as a}from"./app-BwSojYvl.js";/* empty css */const i={name:"Privacy"};var o=function(){var e=this;return e._self._c,e._m(0)},r=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"container"},[e("h1",[t._v("PLEASE READ CAREFULLY BEFORE USING OPENLITTERMAP.COM:")]),e("p",[e("i",[t._v(" Last updated: 14"),e("sup",[t._v("th")]),t._v(" April 2017 ")])]),e("br"),e("h1",[t._v("Privacy Policy of OpenLitterMap.com")]),e("br"),e("p",[t._v("Our Services provide volunteers (Citizen Scientists) with a means to share information on occurrences of litter through geotagged imagery. Geotagged images have a spatial (a specific, typically centimeter-accurate GPS Lat/Long position) reference as well as a specific time-stamp (Year-month-day HH:MM:SS), which can be used to determine exactly where and when an occurrence of litter was identified- thus showing the location of a contributor at any point in time and potentially revealing information about the spatial patterns of a contributor or many contributors and revealing the location of hotspots and irregular occurrences of hazardous material such as drug-related litter (eg. needles, injecting equipment). A specific litter item can be shown individually and/or abstracted to a dynamically-sized hexagonal grid to analytically characterize the presence of litter, or abstractively perhaps even the illicit consumption of toxic substances. Once these images are shared with us, and only geotagged images can pass, the volunteer must properly attribute each image (eg. Determine x items of litter in x number of photos through the user of their Profile (https://openlittermap.com/profile) and once the image and its’ contents are attributed, each image must be submitted for crowdsourced verification. The verified images, their location and the time the image was captured will be mapped, spatially analyzed and the results, the images, the make/model of the device (which is an indication of spatial accuracy eg. iPhones (5+) are currently typically superior in spatial accuracy and temporal GPS-revisit frequency to Android) and their contents will be made public for guests or authenticated users of the website. Each image can account for only 1 point on the map which when clicked, will show the image which can be viewed in high-resolution, as well as its contents, the make and/or model of the device and although all images will be submitted anonymously by default, each contributor has the option to credit either their full name and/or unique Username or Organisation on the verifiable geotagged images they provide. We will maintain the images at our own discretion in accordance with our limited server capacity. However, images that are verified by an Admin and reach stage two verification will be deleted, allowing us to resolve greater volumes of data and keep our costs as low as possible. "),e("br"),e("br"),e("br"),t._v(" This Privacy Policy describes how and when we collect, share and use your information across the website. By using this website, you authorize us to store and use your information in accordance with this privacy policy. This policy will change from time to time and we will do our best to notify you of these changes and updates once you log into the website and through our social media campaigns @OpenLitterMap (Twitter).")]),e("br"),e("br"),e("h3",[t._v("People under the age of 13")]),e("br"),e("p",[t._v("We do not allow for people under the age of 13 to use or register with our Services. If we discover there is personal information from or about children below this age category, we will permanently delete that information and any other associate records immediately.")]),e("br"),e("h3",[t._v("People aged 13-17")]),e("br"),e("p",[t._v("Only with parental or guardian supervision may a person aged 13-17 use this website for educational purposes. With proper supervision a person in this age category may be able to involve themselves with challenging the destructive paradigm of plastic pollution and contribute to the production of geospatial knowledge that has the potential to transform public and institutional behaviour however users should take particular caution when sharing their information online or when collecting data on litter which may be detrimental to personal health. For example, drug-related litter is a highly dangerous public-health hazard and if mishandled or stepped on accidentally, could result in a life-long physical, sexual and mentally-debilitating illness, disease, infection and/or scar, which will require urgent medical treatment from a medical professional- something this website claims to hold no knowledge of. Parents may choose to show the information on drug-related litter to their adolescent children to raise awareness about the harms caused by drug-related littering the public so that further accidents can be avoided.")]),e("br"),e("h3",{staticStyle:{color:"red"}},[t._v("If you require urgent medical treatment")]),e("br"),e("p",[e("b",[t._v("Please call 112, 999 or your appropriate emergency line and ask for an ambulance.")])]),e("br"),e("br"),e("h3",[t._v("We collect the following information:")]),e("br"),e("p",[t._v("- Information you provide when you register for an account (eg. Full Name, legitimate and verifiable email address, a unique username or the organisation you are legally entitled to represent) "),e("br"),t._v(" - The images you submit. "),e("br"),t._v(" - The metadata associated with the images. "),e("br"),t._v(" - The attribute information associated with each image. "),e("br"),t._v(" - Cumulate statistics and geostatistics based on the analysis of each and all images. ")]),e("br"),e("h3",[t._v("We do not collect the following information:")]),e("p",[e("br"),t._v(" - Cookies. "),e("br"),t._v(" - Your IP address. "),e("br"),t._v(" - The website you have come for, or are going to. "),e("br"),t._v(" - The type of browser you are using. "),e("br"),t._v(" - “Clickstream” data. "),e("br"),t._v(" - How you use this website. "),e("br")]),e("br"),e("h3",[t._v("Other people including 3rd parties may use the information you decide to make public accessible.")]),e("br"),e("p",[t._v("By submitting data to this Service, you accept and understand that the images, their contents, their location in time and space and potentially on your allowance, you may wish to be represented as the contributor of the image by full name and/or your unique username. By default, all images will be contributed anonymously. ")]),e("br"),e("h3",[t._v("Security and your Password")]),e("br"),e("p",[t._v("You must choose a strong password at least 6 characters long that contains upper and lower case characters, a number and a symbol. Your password will be encrypted using the best available encryption methods and stored securely on our server. With the one exception of the map on Firefox which requires partial encryption, all of our website runs on an encrypted HTTPS network so the information you provide, including for example credit card information, is fully encrypted with SSL. In fact for credit cards we never touch your card details as we use Stripe for payments. www.stripe.com")]),e("br"),e("h3",[t._v("Feedback")]),e("br"),e("p",[t._v("This is a new service. We are happy to hear feedback on this service or privacy policy if you think you can offer us some advice please contact us at info@openlittermap.com")])])}],n=a(i,o,r,!1,null,"f7be5479");const c=n.exports;export{c as default}; diff --git a/public/build/assets/Profile-pp-NK3vM.js b/public/build/assets/Profile-DseiX7S2.js similarity index 97% rename from public/build/assets/Profile-pp-NK3vM.js rename to public/build/assets/Profile-DseiX7S2.js index 1e4690a0..653f2978 100644 --- a/public/build/assets/Profile-pp-NK3vM.js +++ b/public/build/assets/Profile-DseiX7S2.js @@ -1 +1 @@ -import{h as p}from"./moment-zH0z38ay.js";import{n as r,a as _}from"./app-DuS6KM7M.js";import{_ as m,a as u}from"./phone-lg_u1nSM.js";import{R as f,L as h}from"./BaseCharts-C5LiKM-N.js";import{L as i,h as c}from"./mapHelpers-CSfygYu3.js";import"./leaflet.timedimension.control-D33qz71h.js";import{F as d}from"./FunctionalCalendar-D8S_iHDa.js";/* empty css */const v={name:"ProfileWelcome",computed:{name(){return this.user.user.name},totalUsers(){return this.user.totalUsers},usersPosition(){return p.localeData().ordinal(this.user.position)},user(){return this.$store.state.user}}};var g=function(){var e=this,t=e._self._c;return t("div",{staticClass:"profile-card"},[t("p",{staticClass:"mb1"},[e._v(" "+e._s(e.$t("profile.dashboard.welcome"))+", "+e._s(e.name)+" ")]),t("p",{staticClass:"mb1"},[e._v(" "+e._s(e.$t("profile.dashboard.out-of",{total:e.totalUsers}))+" ")]),t("p",{staticClass:"mb1 is-secondary"},[e._v(" "+e._s(e.$t("profile.dashboard.rank",{rank:e.usersPosition}))+" ")]),t("p",{staticClass:"mb1"},[e._v(" Next Littercoin: "+e._s(this.user.user.littercoin_progress)+"% ")]),t("p",[e._v(" Total Littercoin: "+e._s(this.user.user.total_littercoin)+" ")])])},$=[],b=r(v,g,$,!1,null,"f145dc52");const C=b.exports,y={name:"ProfileStats",computed:{photoPercent(){return this.user.photoPercent},tagPercent(){return this.user.tagPercent},userTagsCount(){return this.user.user.total_tags},userPhotoCount(){return this.user.user.total_images},user(){return this.$store.state.user}}};var P=function(){var e=this,t=e._self._c;return t("div",{staticClass:"profile-card"},[t("p",{staticClass:"mb1"},[e._v(e._s(e.$t("profile.dashboard.have-uploaded")))]),t("div",{staticClass:"flex"},[t("div",{staticClass:"profile-stat-card"},[t("img",{attrs:{src:m}}),t("div",[t("p",{staticClass:"profile-stat"},[e._v(e._s(e.userPhotoCount))]),t("p",{staticClass:"profile-text"},[e._v(e._s(e.$t("profile.dashboard.photos")))])])]),t("div",{staticClass:"profile-stat-card"},[t("img",{attrs:{src:u}}),t("div",[t("p",{staticClass:"profile-stat"},[e._v(e._s(e.userTagsCount))]),t("p",{staticClass:"profile-text"},[e._v(e._s(e.$t("profile.dashboard.tags")))])])]),t("div",{staticClass:"profile-stat-card"},[t("p",{staticClass:"profile-percent"},[e._v("%")]),t("div",[t("p",{staticClass:"profile-stat"},[e._v(e._s(e.photoPercent))]),t("p",{staticClass:"profile-text"},[e._v(e._s(e.$t("profile.dashboard.all-photos")))])])]),t("div",{staticClass:"profile-stat-card"},[t("p",{staticClass:"profile-percent"},[e._v("%")]),t("div",[t("p",{staticClass:"profile-stat"},[e._v(e._s(e.tagPercent))]),t("p",{staticClass:"profile-text"},[e._v(e._s(e.$t("profile.dashboard.all-tags")))])])])])])},D=[],x=r(y,P,D,!1,null,"97e77d3c");const L=x.exports,w={name:"ProfileNextTarget",computed:{currentLevel(){return this.user.level},currentXp(){return this.user.xp_redis},neededXp(){return this.$store.state.user.requiredXp},user(){return this.$store.state.user.user}}};var R=function(){var e=this,t=e._self._c;return t("div",{staticClass:"profile-card"},[t("p",{staticClass:"mb1"},[e._v(" "+e._s(e.$t("profile.dashboard.your-level"))+" ")]),t("p",{staticClass:"is-secondary"},[e._v(" "+e._s(e.$t("profile.dashboard.reached-level"))+" "),t("strong",{staticClass:"is-white"},[e._v(" "+e._s(e.currentLevel)+" ")])]),t("p",{staticClass:"is-secondary mb1"},[e._v(" "+e._s(e.$t("profile.dashboard.have-xp"))+" "),t("strong",{staticClass:"is-white"},[e._v(" "+e._s(e.currentXp)+" xp ")])]),t("p",{staticClass:"is-secondary mb2"},[e._v(" "+e._s(e.$t("profile.dashboard.need-xp"))+" "),t("strong",{staticClass:"is-white"},[e._v(" "+e._s(e.neededXp)+" xp ")]),e._v(" "+e._s(e.$t("profile.dashboard.to-reach-level"))+" ")])])},T=[],k=r(w,R,T,!1,null,"68e020ba");const S=k.exports,F={extends:f,name:"Radar",props:["categories"],mounted(){let s=[];_.filter(e=>e!=="art"&&e!=="dogshit").map(e=>{s.push(this.$t("litter.categories."+e))}),this.renderChart({labels:s,datasets:[{label:this.$t("profile.dashboard.total-categories"),backgroundColor:"#1DD3B0",data:this.categories,fill:!0,borderColor:"#1DD3B0",maxBarThickness:"10"}]},{responsive:!0,maintainAspectRatio:!1,legend:{labels:{fontColor:"#1DD3B0"}},scale:{pointLabels:{fontColor:"white"}},tooltips:{callbacks:{title:(e,t)=>t.labels[e[0].index]}}})}},A=null,O=null;var B=r(F,A,O,!1,null,null);const E=B.exports,M={name:"ProfileCategories",components:{Radar:E},computed:{categories(){return[this.user.total_categories.alcohol,this.user.total_brands_redis,this.user.total_categories.coastal,this.user.total_categories.coffee,this.user.total_categories.dumping,this.user.total_categories.food,this.user.total_categories.industrial,this.user.total_categories.other,this.user.total_categories.sanitary,this.user.total_categories.softdrinks,this.user.total_categories.smoking]},user(){return this.$store.state.user.user}}};var N=function(){var e=this,t=e._self._c;return t("div",{staticClass:"profile-card"},[t("Radar",{key:e.user.total_tags,attrs:{categories:e.categories}})],1)},U=[],W=r(M,N,U,!1,null,"3a36a1f8");const X=W.exports,z={name:"ProfileMap",data(){return{map:null,loading:!0,fullscreen:!1,pointsLayer:null,timeLayer:null,player:null}},async mounted(){this.map=i.map("hexmap",{center:[0,0],zoom:2,scrollWheelZoom:!1,smoothWheelZoom:!0,smoothSensitivity:1});const e=new Date().getFullYear();i.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"Map data © "+'OpenStreetMap'+" & Contributors",maxZoom:20,minZoom:1}).addTo(this.map),this.map.attributionControl.addAttribution("Litter data © OpenLitterMap & Contributors "+e);let a=new i.TimeDimension({});this.map.timeDimension=a,this.player=new i.TimeDimension.Player({transitionTime:1e3,loop:!0},a),this.player.on("play",()=>{var n;(n=this.map)!=null&&n.hasLayer(this.pointsLayer)&&this.map.removeLayer(this.pointsLayer)}),this.map.addControl(new i.Control.TimeDimension({player:this.player,timeDimension:a,timeSliderDragUpdate:!0,loopButton:!0,autoPlay:!1,minSpeed:5,maxSpeed:100})),this.loading=!1},computed:{geojson(){return this.$store.state.user.geojson.features}},watch:{geojson(s){this.pointsLayer&&this.pointsLayer.remove(),this.timeLayer&&this.timeLayer.remove(),this.player&&this.player.stop(),this.pointsLayer=i.geoJSON(s,{pointToLayer:(e,t)=>i.marker([t.lng,t.lat]),onEachFeature:(e,t)=>{t.on("click",a=>{i.popup(c.popupOptions).setLatLng(e.geometry.coordinates).setContent(c.getMapImagePopupContent(e.properties)).openOn(this.map)})}}),this.timeLayer=i.timeDimension.layer.geoJson(this.pointsLayer,{updateTimeDimension:!0,updateTimeDimensionMode:"replace"}),this.pointsLayer.addTo(this.map),this.timeLayer.addTo(this.map)}},methods:{fullscreenChange(s){this.fullscreen=s},toggle(){this.$refs.fullscreen.toggle()}}};var I=function(){var e=this,t=e._self._c;return t("div",{staticClass:"profile-card",staticStyle:{padding:"0 !important"}},[t("fullscreen",{ref:"fullscreen",staticClass:"profile-map-container",on:{change:e.fullscreenChange}},[t("button",{staticClass:"btn-map-fullscreen",on:{click:e.toggle}},[t("i",{staticClass:"fa fa-expand"})]),t("div",{ref:"hexmap",attrs:{id:"hexmap"}})])],1)},Z=[],j=r(z,I,Z,!1,null,null);const q=j.exports,G={name:"ProfileCalendar",components:{FunctionalCalendar:d},data(){return{btn:"button is-primary is-fullwidth",calendarData:{},period:"created_at",periods:["created_at","datetime"]}},computed:{button(){return this.processing?this.btn+" is-loading":this.btn},disabled(){return!!(this.processing||!this.calendarData.hasOwnProperty("dateRange")||!this.calendarData.dateRange.hasOwnProperty("start")&&!this.calendarData.dateRange.hasOwnProperty("end"))}},methods:{async changePeriod(){this.disabled||await this.$store.dispatch("GET_USERS_PROFILE_MAP_DATA",{period:this.period,start:this.calendarData.dateRange.start,end:this.calendarData.dateRange.end})},getPeriod(s){return s||(s=this.period),this.$t("teams.dashboard.times."+s)}}};var J=function(){var e=this,t=e._self._c;return t("div",{staticClass:"profile-card"},[t("FunctionalCalendar",{attrs:{"day-names":e.$t("common.day-names"),"month-names":e.$t("common.month-names"),"short-month-names":e.$t("common.short-month-names"),sundayStart:!1,"date-format":"yyyy-mm-dd","is-date-range":!0,"is-date-picker":!1,"change-month-function":!0,"change-year-function":!0},model:{value:e.calendarData,callback:function(a){e.calendarData=a},expression:"calendarData"}}),t("select",{directives:[{name:"model",rawName:"v-model",value:e.period,expression:"period"}],staticClass:"input mt1 mb1",on:{change:function(a){var n=Array.prototype.filter.call(a.target.options,function(o){return o.selected}).map(function(o){var l="_value"in o?o._value:o.value;return l});e.period=a.target.multiple?n:n[0]}}},e._l(e.periods,function(a){return t("option",{domProps:{value:a}},[e._v(e._s(e.getPeriod(a)))])}),0),t("button",{class:e.button,attrs:{disabled:e.disabled},on:{click:e.changePeriod}},[e._v(e._s(e.$t("profile.dashboard.calendar-load-data")))])],1)},V=[],Y=r(G,J,V,!1,null,"310729d1");const H=Y.exports,K={name:"ProfileDownload",components:{FunctionalCalendar:d},data(){return{btn:"button tooltip is-primary",processing:!1,calendarData:{},period:"created_at",periods:["created_at","datetime"]}},computed:{button(){return this.processing?this.btn+" is-loading":this.btn}},methods:{async download(){var s,e,t,a;this.processing=!0,await this.$store.dispatch("DOWNLOAD_MY_DATA",{dateField:this.period,fromDate:(e=(s=this.calendarData)==null?void 0:s.dateRange)==null?void 0:e.start,toDate:(a=(t=this.calendarData)==null?void 0:t.dateRange)==null?void 0:a.end}),this.processing=!1}}};var Q=function(){var e=this,t=e._self._c;return t("div",{staticClass:"profile-card"},[t("p",{staticClass:"profile-dl-title"},[e._v(e._s(e.$t("profile.dashboard.download-data")))]),t("FunctionalCalendar",{attrs:{"day-names":e.$t("common.day-names"),"month-names":e.$t("common.month-names"),"short-month-names":e.$t("common.short-month-names"),sundayStart:!1,"date-format":"yyyy-mm-dd","is-date-range":!0,"is-date-picker":!1,"change-month-function":!0,"change-year-function":!0},model:{value:e.calendarData,callback:function(a){e.calendarData=a},expression:"calendarData"}}),t("div",{staticClass:"inputs-wrapper"},[t("select",{directives:[{name:"model",rawName:"v-model",value:e.period,expression:"period"}],staticClass:"input mt1 mb1",on:{change:function(a){var n=Array.prototype.filter.call(a.target.options,function(o){return o.selected}).map(function(o){var l="_value"in o?o._value:o.value;return l});e.period=a.target.multiple?n:n[0]}}},e._l(e.periods,function(a){return t("option",{domProps:{value:a}},[e._v(e._s(e.$t("teams.dashboard.times."+a)))])}),0),t("button",{class:e.button,attrs:{disabled:e.processing},on:{click:e.download}},[t("span",{staticClass:"tooltip-text is-size-6"},[e._v(e._s(e.$t("profile.dashboard.email-send-msg")))]),e._v(" "+e._s(e.$t("common.download"))+" ")])])],1)},ee=[],te=r(K,Q,ee,!1,null,"324f02ec");const se=te.exports,ae={extends:h,name:"TimeSeriesLine",props:["ppm"],data(){return{months:this.$t("common.short-month-names")}},mounted(){let s=JSON.parse(this.ppm),e=[],t=[];for(let a in s)e.push(this.months[parseInt(a.substring(0,2))-1]+a.substring(2,5)),t.push(s[a]);this.renderChart({labels:e,datasets:[{label:this.$t("profile.dashboard.timeseries-verified-photos"),backgroundColor:"#1DD3B0",data:t,fill:!1,borderColor:"#1DD3B0",maxBarThickness:"50"}]},{responsive:!0,maintainAspectRatio:!1,legend:{labels:{fontColor:"#1DD3B0"}},scales:{xAxes:[{gridLines:{color:"rgba(255,255,255,0.5)",display:!0,drawBorder:!0,drawOnChartArea:!1},ticks:{fontColor:"#1DD3B0"}}],yAxes:[{gridLines:{color:"rgba(255,255,255,0.5)",display:!0,drawBorder:!0,drawOnChartArea:!1},ticks:{fontColor:"#1DD3B0"}}]}})}},re=null,oe=null;var ie=r(ae,re,oe,!1,null,null);const ne=ie.exports,le={name:"ProfileTimeSeries",components:{TimeSeriesLine:ne},computed:{ppm(){return this.$store.state.user.user.photos_per_month}}};var ce=function(){var e=this,t=e._self._c;return t("div",{staticClass:"profile-card"},[t("TimeSeriesLine",{attrs:{ppm:e.ppm}})],1)},de=[],pe=r(le,ce,de,!1,null,"0a4093f8");const _e=pe.exports,me={name:"ProfilePhotos"};var ue=function(){var e=this,t=e._self._c;return t("div",{staticClass:"profile-card"},[t("p",{staticClass:"mb1"},[e._v(e._s(e.$t("profile.dashboard.manage-my-photos")))]),t("router-link",{attrs:{to:"/bulk-tag"}},[t("button",{staticClass:"button is-medium is-primary"},[e._v(e._s(e.$t("profile.dashboard.view-my-photos")))])])],1)},fe=[],he=r(me,ue,fe,!1,null,"8c86183f");const ve=he.exports,ge={name:"Profile",components:{ProfileWelcome:C,ProfileTimeSeries:_e,ProfileStats:L,ProfileNextTarget:S,ProfileCategories:X,ProfileMap:q,ProfileCalendar:H,ProfileDownload:se,ProfilePhotos:ve},async mounted(){await this.$store.dispatch("GET_CURRENT_USER"),await this.$store.dispatch("GET_USERS_PROFILE_DATA")}};var $e=function(){var e=this,t=e._self._c;return t("section",{staticClass:"profile-container"},[t("ProfileWelcome"),t("ProfileStats"),t("ProfileNextTarget"),t("ProfileCategories"),t("ProfileMap"),t("ProfileCalendar"),t("ProfileDownload"),t("ProfileTimeSeries"),t("ProfilePhotos")],1)},be=[],Ce=r(ge,$e,be,!1,null,null);const ke=Ce.exports;export{ke as default}; +import{h as p}from"./moment-zH0z38ay.js";import{n as r,a as _}from"./app-BwSojYvl.js";import{_ as m,a as u}from"./phone-lg_u1nSM.js";import{R as f,L as h}from"./BaseCharts-CrCx08_V.js";import{L as i,h as c}from"./mapHelpers-DmBbMbJe.js";import"./leaflet.timedimension.control-DCjZM-xt.js";import{F as d}from"./FunctionalCalendar-zzBz_PQP.js";/* empty css */const v={name:"ProfileWelcome",computed:{name(){return this.user.user.name},totalUsers(){return this.user.totalUsers},usersPosition(){return p.localeData().ordinal(this.user.position)},user(){return this.$store.state.user}}};var g=function(){var e=this,t=e._self._c;return t("div",{staticClass:"profile-card"},[t("p",{staticClass:"mb1"},[e._v(" "+e._s(e.$t("profile.dashboard.welcome"))+", "+e._s(e.name)+" ")]),t("p",{staticClass:"mb1"},[e._v(" "+e._s(e.$t("profile.dashboard.out-of",{total:e.totalUsers}))+" ")]),t("p",{staticClass:"mb1 is-secondary"},[e._v(" "+e._s(e.$t("profile.dashboard.rank",{rank:e.usersPosition}))+" ")]),t("p",{staticClass:"mb1"},[e._v(" Next Littercoin: "+e._s(this.user.user.littercoin_progress)+"% ")]),t("p",[e._v(" Total Littercoin: "+e._s(this.user.user.total_littercoin)+" ")])])},$=[],b=r(v,g,$,!1,null,"f145dc52");const C=b.exports,y={name:"ProfileStats",computed:{photoPercent(){return this.user.photoPercent},tagPercent(){return this.user.tagPercent},userTagsCount(){return this.user.user.total_tags},userPhotoCount(){return this.user.user.total_images},user(){return this.$store.state.user}}};var P=function(){var e=this,t=e._self._c;return t("div",{staticClass:"profile-card"},[t("p",{staticClass:"mb1"},[e._v(e._s(e.$t("profile.dashboard.have-uploaded")))]),t("div",{staticClass:"flex"},[t("div",{staticClass:"profile-stat-card"},[t("img",{attrs:{src:m}}),t("div",[t("p",{staticClass:"profile-stat"},[e._v(e._s(e.userPhotoCount))]),t("p",{staticClass:"profile-text"},[e._v(e._s(e.$t("profile.dashboard.photos")))])])]),t("div",{staticClass:"profile-stat-card"},[t("img",{attrs:{src:u}}),t("div",[t("p",{staticClass:"profile-stat"},[e._v(e._s(e.userTagsCount))]),t("p",{staticClass:"profile-text"},[e._v(e._s(e.$t("profile.dashboard.tags")))])])]),t("div",{staticClass:"profile-stat-card"},[t("p",{staticClass:"profile-percent"},[e._v("%")]),t("div",[t("p",{staticClass:"profile-stat"},[e._v(e._s(e.photoPercent))]),t("p",{staticClass:"profile-text"},[e._v(e._s(e.$t("profile.dashboard.all-photos")))])])]),t("div",{staticClass:"profile-stat-card"},[t("p",{staticClass:"profile-percent"},[e._v("%")]),t("div",[t("p",{staticClass:"profile-stat"},[e._v(e._s(e.tagPercent))]),t("p",{staticClass:"profile-text"},[e._v(e._s(e.$t("profile.dashboard.all-tags")))])])])])])},D=[],x=r(y,P,D,!1,null,"97e77d3c");const L=x.exports,w={name:"ProfileNextTarget",computed:{currentLevel(){return this.user.level},currentXp(){return this.user.xp_redis},neededXp(){return this.$store.state.user.requiredXp},user(){return this.$store.state.user.user}}};var R=function(){var e=this,t=e._self._c;return t("div",{staticClass:"profile-card"},[t("p",{staticClass:"mb1"},[e._v(" "+e._s(e.$t("profile.dashboard.your-level"))+" ")]),t("p",{staticClass:"is-secondary"},[e._v(" "+e._s(e.$t("profile.dashboard.reached-level"))+" "),t("strong",{staticClass:"is-white"},[e._v(" "+e._s(e.currentLevel)+" ")])]),t("p",{staticClass:"is-secondary mb1"},[e._v(" "+e._s(e.$t("profile.dashboard.have-xp"))+" "),t("strong",{staticClass:"is-white"},[e._v(" "+e._s(e.currentXp)+" xp ")])]),t("p",{staticClass:"is-secondary mb2"},[e._v(" "+e._s(e.$t("profile.dashboard.need-xp"))+" "),t("strong",{staticClass:"is-white"},[e._v(" "+e._s(e.neededXp)+" xp ")]),e._v(" "+e._s(e.$t("profile.dashboard.to-reach-level"))+" ")])])},T=[],k=r(w,R,T,!1,null,"68e020ba");const S=k.exports,F={extends:f,name:"Radar",props:["categories"],mounted(){let s=[];_.filter(e=>e!=="art"&&e!=="dogshit").map(e=>{s.push(this.$t("litter.categories."+e))}),this.renderChart({labels:s,datasets:[{label:this.$t("profile.dashboard.total-categories"),backgroundColor:"#1DD3B0",data:this.categories,fill:!0,borderColor:"#1DD3B0",maxBarThickness:"10"}]},{responsive:!0,maintainAspectRatio:!1,legend:{labels:{fontColor:"#1DD3B0"}},scale:{pointLabels:{fontColor:"white"}},tooltips:{callbacks:{title:(e,t)=>t.labels[e[0].index]}}})}},A=null,O=null;var B=r(F,A,O,!1,null,null);const E=B.exports,M={name:"ProfileCategories",components:{Radar:E},computed:{categories(){return[this.user.total_categories.alcohol,this.user.total_brands_redis,this.user.total_categories.coastal,this.user.total_categories.coffee,this.user.total_categories.dumping,this.user.total_categories.food,this.user.total_categories.industrial,this.user.total_categories.other,this.user.total_categories.sanitary,this.user.total_categories.softdrinks,this.user.total_categories.smoking]},user(){return this.$store.state.user.user}}};var N=function(){var e=this,t=e._self._c;return t("div",{staticClass:"profile-card"},[t("Radar",{key:e.user.total_tags,attrs:{categories:e.categories}})],1)},U=[],W=r(M,N,U,!1,null,"3a36a1f8");const X=W.exports,z={name:"ProfileMap",data(){return{map:null,loading:!0,fullscreen:!1,pointsLayer:null,timeLayer:null,player:null}},async mounted(){this.map=i.map("hexmap",{center:[0,0],zoom:2,scrollWheelZoom:!1,smoothWheelZoom:!0,smoothSensitivity:1});const e=new Date().getFullYear();i.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"Map data © "+'OpenStreetMap'+" & Contributors",maxZoom:20,minZoom:1}).addTo(this.map),this.map.attributionControl.addAttribution("Litter data © OpenLitterMap & Contributors "+e);let a=new i.TimeDimension({});this.map.timeDimension=a,this.player=new i.TimeDimension.Player({transitionTime:1e3,loop:!0},a),this.player.on("play",()=>{var n;(n=this.map)!=null&&n.hasLayer(this.pointsLayer)&&this.map.removeLayer(this.pointsLayer)}),this.map.addControl(new i.Control.TimeDimension({player:this.player,timeDimension:a,timeSliderDragUpdate:!0,loopButton:!0,autoPlay:!1,minSpeed:5,maxSpeed:100})),this.loading=!1},computed:{geojson(){return this.$store.state.user.geojson.features}},watch:{geojson(s){this.pointsLayer&&this.pointsLayer.remove(),this.timeLayer&&this.timeLayer.remove(),this.player&&this.player.stop(),this.pointsLayer=i.geoJSON(s,{pointToLayer:(e,t)=>i.marker([t.lng,t.lat]),onEachFeature:(e,t)=>{t.on("click",a=>{i.popup(c.popupOptions).setLatLng(e.geometry.coordinates).setContent(c.getMapImagePopupContent(e.properties)).openOn(this.map)})}}),this.timeLayer=i.timeDimension.layer.geoJson(this.pointsLayer,{updateTimeDimension:!0,updateTimeDimensionMode:"replace"}),this.pointsLayer.addTo(this.map),this.timeLayer.addTo(this.map)}},methods:{fullscreenChange(s){this.fullscreen=s},toggle(){this.$refs.fullscreen.toggle()}}};var I=function(){var e=this,t=e._self._c;return t("div",{staticClass:"profile-card",staticStyle:{padding:"0 !important"}},[t("fullscreen",{ref:"fullscreen",staticClass:"profile-map-container",on:{change:e.fullscreenChange}},[t("button",{staticClass:"btn-map-fullscreen",on:{click:e.toggle}},[t("i",{staticClass:"fa fa-expand"})]),t("div",{ref:"hexmap",attrs:{id:"hexmap"}})])],1)},Z=[],j=r(z,I,Z,!1,null,null);const q=j.exports,G={name:"ProfileCalendar",components:{FunctionalCalendar:d},data(){return{btn:"button is-primary is-fullwidth",calendarData:{},period:"created_at",periods:["created_at","datetime"]}},computed:{button(){return this.processing?this.btn+" is-loading":this.btn},disabled(){return!!(this.processing||!this.calendarData.hasOwnProperty("dateRange")||!this.calendarData.dateRange.hasOwnProperty("start")&&!this.calendarData.dateRange.hasOwnProperty("end"))}},methods:{async changePeriod(){this.disabled||await this.$store.dispatch("GET_USERS_PROFILE_MAP_DATA",{period:this.period,start:this.calendarData.dateRange.start,end:this.calendarData.dateRange.end})},getPeriod(s){return s||(s=this.period),this.$t("teams.dashboard.times."+s)}}};var J=function(){var e=this,t=e._self._c;return t("div",{staticClass:"profile-card"},[t("FunctionalCalendar",{attrs:{"day-names":e.$t("common.day-names"),"month-names":e.$t("common.month-names"),"short-month-names":e.$t("common.short-month-names"),sundayStart:!1,"date-format":"yyyy-mm-dd","is-date-range":!0,"is-date-picker":!1,"change-month-function":!0,"change-year-function":!0},model:{value:e.calendarData,callback:function(a){e.calendarData=a},expression:"calendarData"}}),t("select",{directives:[{name:"model",rawName:"v-model",value:e.period,expression:"period"}],staticClass:"input mt1 mb1",on:{change:function(a){var n=Array.prototype.filter.call(a.target.options,function(o){return o.selected}).map(function(o){var l="_value"in o?o._value:o.value;return l});e.period=a.target.multiple?n:n[0]}}},e._l(e.periods,function(a){return t("option",{domProps:{value:a}},[e._v(e._s(e.getPeriod(a)))])}),0),t("button",{class:e.button,attrs:{disabled:e.disabled},on:{click:e.changePeriod}},[e._v(e._s(e.$t("profile.dashboard.calendar-load-data")))])],1)},V=[],Y=r(G,J,V,!1,null,"310729d1");const H=Y.exports,K={name:"ProfileDownload",components:{FunctionalCalendar:d},data(){return{btn:"button tooltip is-primary",processing:!1,calendarData:{},period:"created_at",periods:["created_at","datetime"]}},computed:{button(){return this.processing?this.btn+" is-loading":this.btn}},methods:{async download(){var s,e,t,a;this.processing=!0,await this.$store.dispatch("DOWNLOAD_MY_DATA",{dateField:this.period,fromDate:(e=(s=this.calendarData)==null?void 0:s.dateRange)==null?void 0:e.start,toDate:(a=(t=this.calendarData)==null?void 0:t.dateRange)==null?void 0:a.end}),this.processing=!1}}};var Q=function(){var e=this,t=e._self._c;return t("div",{staticClass:"profile-card"},[t("p",{staticClass:"profile-dl-title"},[e._v(e._s(e.$t("profile.dashboard.download-data")))]),t("FunctionalCalendar",{attrs:{"day-names":e.$t("common.day-names"),"month-names":e.$t("common.month-names"),"short-month-names":e.$t("common.short-month-names"),sundayStart:!1,"date-format":"yyyy-mm-dd","is-date-range":!0,"is-date-picker":!1,"change-month-function":!0,"change-year-function":!0},model:{value:e.calendarData,callback:function(a){e.calendarData=a},expression:"calendarData"}}),t("div",{staticClass:"inputs-wrapper"},[t("select",{directives:[{name:"model",rawName:"v-model",value:e.period,expression:"period"}],staticClass:"input mt1 mb1",on:{change:function(a){var n=Array.prototype.filter.call(a.target.options,function(o){return o.selected}).map(function(o){var l="_value"in o?o._value:o.value;return l});e.period=a.target.multiple?n:n[0]}}},e._l(e.periods,function(a){return t("option",{domProps:{value:a}},[e._v(e._s(e.$t("teams.dashboard.times."+a)))])}),0),t("button",{class:e.button,attrs:{disabled:e.processing},on:{click:e.download}},[t("span",{staticClass:"tooltip-text is-size-6"},[e._v(e._s(e.$t("profile.dashboard.email-send-msg")))]),e._v(" "+e._s(e.$t("common.download"))+" ")])])],1)},ee=[],te=r(K,Q,ee,!1,null,"324f02ec");const se=te.exports,ae={extends:h,name:"TimeSeriesLine",props:["ppm"],data(){return{months:this.$t("common.short-month-names")}},mounted(){let s=JSON.parse(this.ppm),e=[],t=[];for(let a in s)e.push(this.months[parseInt(a.substring(0,2))-1]+a.substring(2,5)),t.push(s[a]);this.renderChart({labels:e,datasets:[{label:this.$t("profile.dashboard.timeseries-verified-photos"),backgroundColor:"#1DD3B0",data:t,fill:!1,borderColor:"#1DD3B0",maxBarThickness:"50"}]},{responsive:!0,maintainAspectRatio:!1,legend:{labels:{fontColor:"#1DD3B0"}},scales:{xAxes:[{gridLines:{color:"rgba(255,255,255,0.5)",display:!0,drawBorder:!0,drawOnChartArea:!1},ticks:{fontColor:"#1DD3B0"}}],yAxes:[{gridLines:{color:"rgba(255,255,255,0.5)",display:!0,drawBorder:!0,drawOnChartArea:!1},ticks:{fontColor:"#1DD3B0"}}]}})}},re=null,oe=null;var ie=r(ae,re,oe,!1,null,null);const ne=ie.exports,le={name:"ProfileTimeSeries",components:{TimeSeriesLine:ne},computed:{ppm(){return this.$store.state.user.user.photos_per_month}}};var ce=function(){var e=this,t=e._self._c;return t("div",{staticClass:"profile-card"},[t("TimeSeriesLine",{attrs:{ppm:e.ppm}})],1)},de=[],pe=r(le,ce,de,!1,null,"0a4093f8");const _e=pe.exports,me={name:"ProfilePhotos"};var ue=function(){var e=this,t=e._self._c;return t("div",{staticClass:"profile-card"},[t("p",{staticClass:"mb1"},[e._v(e._s(e.$t("profile.dashboard.manage-my-photos")))]),t("router-link",{attrs:{to:"/bulk-tag"}},[t("button",{staticClass:"button is-medium is-primary"},[e._v(e._s(e.$t("profile.dashboard.view-my-photos")))])])],1)},fe=[],he=r(me,ue,fe,!1,null,"8c86183f");const ve=he.exports,ge={name:"Profile",components:{ProfileWelcome:C,ProfileTimeSeries:_e,ProfileStats:L,ProfileNextTarget:S,ProfileCategories:X,ProfileMap:q,ProfileCalendar:H,ProfileDownload:se,ProfilePhotos:ve},async mounted(){await this.$store.dispatch("GET_CURRENT_USER"),await this.$store.dispatch("GET_USERS_PROFILE_DATA")}};var $e=function(){var e=this,t=e._self._c;return t("section",{staticClass:"profile-container"},[t("ProfileWelcome"),t("ProfileStats"),t("ProfileNextTarget"),t("ProfileCategories"),t("ProfileMap"),t("ProfileCalendar"),t("ProfileDownload"),t("ProfileTimeSeries"),t("ProfilePhotos")],1)},be=[],Ce=r(ge,$e,be,!1,null,null);const ke=Ce.exports;export{ke as default}; diff --git a/public/build/assets/RecentTags-CgmFFS03.js b/public/build/assets/RecentTags-BQfW5nXp.js similarity index 97% rename from public/build/assets/RecentTags-CgmFFS03.js rename to public/build/assets/RecentTags-BQfW5nXp.js index 7c5ccbb2..85edd2f9 100644 --- a/public/build/assets/RecentTags-CgmFFS03.js +++ b/public/build/assets/RecentTags-BQfW5nXp.js @@ -1 +1 @@ -import{n as r}from"./app-DuS6KM7M.js";const o={name:"RecentTags",props:["photoId"],computed:{recentTags(){return this.$store.state.litter.recentTags},recentCustomTags(){return this.$store.state.litter.recentCustomTags}},methods:{getCategoryName(e){return this.$i18n.t(`litter.categories.${e}`)},getTagName(e,t){return this.$i18n.t(`litter.${e}.${t}`)},addRecentTag(e,t){let s=1;this.$store.state.litter.tags.hasOwnProperty(this.photoId)&&this.$store.state.litter.tags[this.photoId].hasOwnProperty(e)&&this.$store.state.litter.tags[this.photoId][e].hasOwnProperty(t)&&(s=parseInt(this.$store.state.litter.tags[this.photoId][e][t])+1),this.$store.commit("changeCategory",e),this.$store.commit("changeTag",t),this.$store.commit("addTag",{photoId:this.photoId,category:e,tag:t,quantity:s})},addRecentCustomTag(e){this.$store.commit("addCustomTag",{photoId:this.photoId,customTag:e})},clearRecentTags(){this.$store.commit("initRecentTags",{}),this.$store.commit("initRecentCustomTags",[]),this.$localStorage.remove("recentTags"),this.$localStorage.remove("recentCustomTags")},clearRecentTag(e,t){this.$store.commit("removeRecentTag",{category:e,tag:t}),this.$localStorage.set("recentTags",JSON.stringify(this.recentTags))},clearRecentCustomTag(e){this.$store.commit("removeRecentCustomTag",e),this.$localStorage.set("recentCustomTags",JSON.stringify(this.recentCustomTags))}}};var c=function(){var t=this,s=t._self._c;return Object.keys(t.recentTags).length>0||t.recentCustomTags.length?s("div",{staticClass:"tags-container"},[s("p",{staticClass:"recent-tags-title mb-5 has-text-weight-bold"},[t._v(t._s(t.$t("tags.recently-tags")))]),t.recentCustomTags.length?s("div",[s("p",[t._v(t._s(t.$t("tags.custom-tags")))]),s("transition-group",{staticClass:"recent-tags",attrs:{name:"list",tag:"div"}},t._l(t.recentCustomTags,function(a){return s("div",{key:a,staticClass:"litter-tag",on:{click:function(i){return t.addRecentCustomTag(a)}}},[s("span",{staticClass:"close",on:{click:function(i){return i.preventDefault(),i.stopPropagation(),t.clearRecentCustomTag(a)}}},[s("i",{staticClass:"fa fa-times"})]),s("p",{staticClass:"has-text-white"},[t._v(t._s(a))])])}),0)],1):t._e(),s("transition-group",{attrs:{name:"categories",tag:"div"}},t._l(Object.keys(t.recentTags),function(a){return s("div",{key:a},[s("p",[t._v(t._s(t.getCategoryName(a)))]),s("transition-group",{staticClass:"recent-tags",attrs:{name:"list",tag:"div"}},t._l(Object.keys(t.recentTags[a]),function(i){return s("div",{key:i,staticClass:"litter-tag",on:{click:function(n){return t.addRecentTag(a,i)}}},[s("span",{staticClass:"close",on:{click:function(n){return n.preventDefault(),n.stopPropagation(),t.clearRecentTag(a,i)}}},[s("i",{staticClass:"fa fa-times"})]),s("p",{staticClass:"has-text-white"},[t._v(t._s(t.getTagName(a,i)))])])}),0)],1)}),0),s("div",{staticClass:"clear-tags-button"},[s("button",{staticClass:"button is-danger is-small tooltip",on:{click:t.clearRecentTags}},[s("span",{staticClass:"tooltip-text"},[t._v(t._s(t.$t("tags.clear-tags-btn")))]),s("i",{staticClass:"fa fa-trash"})])])],1):t._e()},l=[],g=r(o,c,l,!1,null,"8cffa47b");const h=g.exports;export{h as R}; +import{n as r}from"./app-BwSojYvl.js";const o={name:"RecentTags",props:["photoId"],computed:{recentTags(){return this.$store.state.litter.recentTags},recentCustomTags(){return this.$store.state.litter.recentCustomTags}},methods:{getCategoryName(e){return this.$i18n.t(`litter.categories.${e}`)},getTagName(e,t){return this.$i18n.t(`litter.${e}.${t}`)},addRecentTag(e,t){let s=1;this.$store.state.litter.tags.hasOwnProperty(this.photoId)&&this.$store.state.litter.tags[this.photoId].hasOwnProperty(e)&&this.$store.state.litter.tags[this.photoId][e].hasOwnProperty(t)&&(s=parseInt(this.$store.state.litter.tags[this.photoId][e][t])+1),this.$store.commit("changeCategory",e),this.$store.commit("changeTag",t),this.$store.commit("addTag",{photoId:this.photoId,category:e,tag:t,quantity:s})},addRecentCustomTag(e){this.$store.commit("addCustomTag",{photoId:this.photoId,customTag:e})},clearRecentTags(){this.$store.commit("initRecentTags",{}),this.$store.commit("initRecentCustomTags",[]),this.$localStorage.remove("recentTags"),this.$localStorage.remove("recentCustomTags")},clearRecentTag(e,t){this.$store.commit("removeRecentTag",{category:e,tag:t}),this.$localStorage.set("recentTags",JSON.stringify(this.recentTags))},clearRecentCustomTag(e){this.$store.commit("removeRecentCustomTag",e),this.$localStorage.set("recentCustomTags",JSON.stringify(this.recentCustomTags))}}};var c=function(){var t=this,s=t._self._c;return Object.keys(t.recentTags).length>0||t.recentCustomTags.length?s("div",{staticClass:"tags-container"},[s("p",{staticClass:"recent-tags-title mb-5 has-text-weight-bold"},[t._v(t._s(t.$t("tags.recently-tags")))]),t.recentCustomTags.length?s("div",[s("p",[t._v(t._s(t.$t("tags.custom-tags")))]),s("transition-group",{staticClass:"recent-tags",attrs:{name:"list",tag:"div"}},t._l(t.recentCustomTags,function(a){return s("div",{key:a,staticClass:"litter-tag",on:{click:function(i){return t.addRecentCustomTag(a)}}},[s("span",{staticClass:"close",on:{click:function(i){return i.preventDefault(),i.stopPropagation(),t.clearRecentCustomTag(a)}}},[s("i",{staticClass:"fa fa-times"})]),s("p",{staticClass:"has-text-white"},[t._v(t._s(a))])])}),0)],1):t._e(),s("transition-group",{attrs:{name:"categories",tag:"div"}},t._l(Object.keys(t.recentTags),function(a){return s("div",{key:a},[s("p",[t._v(t._s(t.getCategoryName(a)))]),s("transition-group",{staticClass:"recent-tags",attrs:{name:"list",tag:"div"}},t._l(Object.keys(t.recentTags[a]),function(i){return s("div",{key:i,staticClass:"litter-tag",on:{click:function(n){return t.addRecentTag(a,i)}}},[s("span",{staticClass:"close",on:{click:function(n){return n.preventDefault(),n.stopPropagation(),t.clearRecentTag(a,i)}}},[s("i",{staticClass:"fa fa-times"})]),s("p",{staticClass:"has-text-white"},[t._v(t._s(t.getTagName(a,i)))])])}),0)],1)}),0),s("div",{staticClass:"clear-tags-button"},[s("button",{staticClass:"button is-danger is-small tooltip",on:{click:t.clearRecentTags}},[s("span",{staticClass:"tooltip-text"},[t._v(t._s(t.$t("tags.clear-tags-btn")))]),s("i",{staticClass:"fa fa-trash"})])])],1):t._e()},l=[],g=r(o,c,l,!1,null,"8cffa47b");const h=g.exports;export{h as R}; diff --git a/public/build/assets/References-B8W4oQ8F.js b/public/build/assets/References-ryyeDsEf.js similarity index 99% rename from public/build/assets/References-B8W4oQ8F.js rename to public/build/assets/References-ryyeDsEf.js index 09072a50..e9781154 100644 --- a/public/build/assets/References-B8W4oQ8F.js +++ b/public/build/assets/References-ryyeDsEf.js @@ -1,3 +1,3 @@ -import{h as n}from"./moment-zH0z38ay.js";import{n as o}from"./app-DuS6KM7M.js";/* empty css */const r={name:"References",created(){window.scrollTo(0,0)},data(){return{references:[{date:"2018/06/25",title:"OpenLitterMap.com – Open Data on Plastic Pollution with Blockchain Rewards (Littercoin)",link:"https://opengeospatialdata.springeropen.com/articles/10.1186/s40965-018-0050-y",author:"Lynch, S."},{date:"2018/12/21",title:"A Review of the Applicability of Gamification and Game-based Learning to Improve Household-level Waste Management Practices among Schoolchildren",link:"https://ijtech.eng.ui.ac.id/article/view/2644",author:"Magista et al."},{date:"2019/01/05",title:"Needs, drivers, participants and engagement actions: a framework for motivating contributions to volunteered geographic information systems",link:"https://link.springer.com/article/10.1007/s10109-018-00289-5",author:"Gómez-Barrón, et al."},{date:"2019/10/08",title:"CITIZEN SCIENCE AND DATA INTEGRATION FOR UNDERSTANDING MARINE LITTER",link:"http://pure.iiasa.ac.at/id/eprint/16095/1/22_Camera_ready_paper.pdf",author:"Campbell et al."},{date:"2019/10/09",title:"Citizen science and the United Nations Sustainable Development Goals",link:"https://www.nature.com/articles/s41893-019-0390-3",author:"Fritz et al."},{date:"2019/12/04",title:"Citizen Science - International Encyclopedia of Human Geography (Second Edition, Pages 209-214)",link:"https://www.sciencedirect.com/science/article/pii/B9780081022955106018",author:"Fast, V. and Haworth, B."},{date:"2021/01/05",title:"Workflows and Spatial Analysis in the Age of GeoBlockchain: A Land Ownership Example",link:"https://cartogis.org/docs/autocarto/2020/docs/abstracts/3e%20Workflows%20and%20Spatial%20Analysis%20in%20the%20Age%20of%20GeoBlockchain%20A%20Land.pdf",author:"Papantonioua, C. and Hilton, B."},{date:"2020/06/09",title:"Open data and its peers: understanding promising harbingers from Nordic Europe",link:"https://www.emerald.com/insight/content/doi/10.1108/AJIM-12-2019-0364/full/html",author:"Kessen, M."},{date:"2020/06/13",title:"Volunteered geographic information systems: Technological design patterns",link:"https://onlinelibrary.wiley.com/doi/abs/10.1111/tgis.12544",author:"Gómez-Barrón, et al."},{date:"2020/07/02",title:"Mapping citizen science contributions to the UN sustainable development goals",link:"https://link.springer.com/article/10.1007/s11625-020-00833-7",author:"Fraisl et al."},{date:"2020/08/27",title:"Official Survey Data and Virtual Worlds—Designing an Integrative and Economical Open Source Production Pipeline for xR-Applications in Small and Medium-Sized Enterprises",link:"file:///Users/sean/Documents/BDCC-04-00026-v2.pdf",author:"Höhl, W."},{date:"2020/11/02",title:"Citizen science and marine conservation: a global review",link:"https://royalsocietypublishing.org/doi/full/10.1098/rstb.2019.0461",author:"Kelly et al."},{date:"2020/11/04",title:"Towards fair and efficient task allocation in blockchain-based crowdsourcing",link:"https://link.springer.com/article/10.1007/s42045-020-00043-w",author:"Pang et al."},{date:"2020/12/21",title:"Open-source geospatial tools and technologies for urban and environmental studies",link:"https://opengeospatialdata.springeropen.com/articles/10.1186/s40965-020-00078-2",author:"Mobasheri et al."},{date:"2021/02/01",title:"Analysis of plastic water pollution data",link:"https://dspace.lib.uom.gr/bitstream/2159/25376/1/BesiouEleutheriaMsc2021.pdf",author:"ΜΠΕΣΙΟΥ, E."},{date:"2021/01/13",title:"Enabling a large-scale assessment of litter along Saudi Arabian red sea shores by combining drones and machine learning",link:"https://www.sciencedirect.com/science/article/abs/pii/S0269749121003109",author:"Martin et al."},{date:"2021/03/04",title:"Autonomous, Onboard Vision-Based Trash and Litter Detection in Low Altitude Aerial Images Collected by an Unmanned Aerial Vehicle",link:"https://www.researchgate.net/profile/Mateusz-Piechocki-2/publication/349869848_Autonomous_Onboard_Vision-Based_Trash_and_Litter_Detection_in_Low_Altitude_Aerial_Images_Collected_by_an_Unmanned_Aerial_Vehicle/links/60450db2a6fdcc9c781dc33b/Autonomous-Onboard-Vision-Based-Trash-and-Litter-Detection-in-Low-Altitude-Aerial-Images-Collected-by-an-Unmanned-Aerial-Vehicle.pdf",author:"Kraft et al."},{date:"2021/04/18",title:"Environmental fate and impacts of microplastics in aquatic ecosystems: a review",link:"https://pubs.rsc.org/en/content/articlehtml/2021/ra/d1ra00880c",author:"Du et al."},{date:"2021/05/06",title:"Blockchain technologies to address smart city and society challenges",link:"https://www.sciencedirect.com/science/article/abs/pii/S0747563221001771",author:"Mora et al."},{date:"2021/05/17",title:"Waste detection in Pomerania: Non-profit project for detecting waste in environment",link:"https://arxiv.org/pdf/2105.06808.pdf",author:"Majchrowska et al."},{date:"2021/05/17",title:"This city is not a bin: Crowdmapping the distribution of urban litter",link:"https://github.com/andrea-ballatore/litter-dynamics/blob/885de9c61d0b669d007ad871c8494851ce43da9a/publications/ballatore_et_al-2021-city_not_a_bin_crowdmapping.pdf",author:"Ballatore et al."},{date:"2021/08/23",title:"Using citizen science data to monitor the Sustainable Development Goals: a bottom-up analysis",link:"https://link.springer.com/article/10.1007/s11625-021-01001-1",author:"Ballerini & Bergh"},{date:"2021/09/30",title:"Is Downloading this App Consistent with my Values?",link:"https://arxiv.org/pdf/2106.12458.pdf",author:"Carter, S."},{date:"2021/10/21",title:"From City to Sea: Integrated Management of Litter and Plastics and Their Effects on Waterways - A Guide for Municipalities",link:"https://openknowledge.worldbank.org/handle/10986/36523",author:"World Bank"},{date:"2021/10/27",title:"A Systematic Literature Review of Blockchain Technology for Smart Villages",link:"https://link.springer.com/article/10.1007/s11831-021-09659-7",author:"Kaur & Parashar"},{date:"2021/11/02",title:"Environmental Governance. In: Handbook of Environmental Sociology. Handbooks of Sociology and Social Research.",link:"https://link.springer.com/chapter/10.1007/978-3-030-77712-8_16",author:"Fisher et al."},{date:"2021/11/05",title:"Recycling Waste Classification Using Vision Transformer on Portable Device",link:"https://www.mdpi.com/2071-1050/13/21/11572",author:"Huang et al."},{date:"2021/11/23",title:"Litter origins, accumulation rates, and hierarchical composition on urban roadsides of the Inland Empire, California",link:"https://iopscience.iop.org/article/10.1088/1748-9326/ac3c6a",author:"W. Cowger et al."},{date:"2021/12/13",title:"Citizen science at public libraries: Data on librarians and users perceptions of participating in a citizen science project in Catalunya, Spain",link:"https://www.sciencedirect.com/science/article/pii/S2352340921009884",author:"Cigarini et al"},{date:"2022/01/20",title:"Real-Time Litter Detection System for Moving Vehicles Using YOLO",link:"https://ieeexplore.ieee.org/document/9716512",author:"Amrutha et al"},{date:"2022/02/01",title:"Deep learning-based waste detection in natural and urban environments",link:"https://www.sciencedirect.com/science/article/pii/S0956053X21006474",author:"Majchrowskaa et al"},{date:"2022/02/24",title:"Image Classification Approaches for Segregation of Plastic Waste Based on Resin Identification Code",link:"https://link.springer.com/article/10.1007/s41403-022-00324-4",author:"Agarwal et al"},{date:"2022/02/24",title:"Toward smarter management and recovery of municipal solid waste: A critical review on deep learning approaches",link:"https://www.sciencedirect.com/science/article/abs/pii/S0959652622005807",author:"Kunsen et al"},{date:"2022/03/31",title:"Retraining of object detectors to become suitable for trash detection in the context of autonomous driving",link:"https://www.researchgate.net/profile/Ishan-Srivastava-8/publication/360688760_Object_detection_in_self_driving_cars_using_YOLOv5/links/6285697c50c4566fc2744ac0/Object-detection-in-self-driving-cars-using-YOLOv5.pdf",author:"Srivastava, I"},{date:"2022/04/26",title:"Beach beauty in Bengal: Perception of scenery and its implications for coastal management in Purba Medinipur district, eastern India",link:"https://www.sciencedirect.com/science/article/abs/pii/S0308597X22000811",author:"Chatterjee et al"},{date:"2022/04/26",title:"Application of blockchain technology for geospatial data protection and management",link:"http://zgt.com.ua/en/%D0%B7%D0%B0%D1%81%D1%82%D0%BE%D1%81%D1%83%D0%B2%D0%B0%D0%BD%D0%BD%D1%8F-%D1%82%D0%B5%D1%85%D0%BD%D0%BE%D0%BB%D0%BE%D0%B3%D1%96%D1%97-blockchain-%D0%B4%D0%BB%D1%8F-%D0%B7%D0%B0%D1%85%D0%B8%D1%81%D1%82/",author:"Chetverikov, B & Kilaru, V"},{date:"2022/06/11",title:"Towards geospatial blockchain: A review of research on blockchain technology applied to geospatial data",link:"https://agile-giss.copernicus.org/articles/3/71/2022/agile-giss-3-71-2022.pdf",author:"Zhao et al"},{date:"2022/07/01",title:"Determinants of Household Waste Disposal Practices and Implications for Practical Community Interventions: Lessons from Lilongwe",link:"https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4151604",author:"Kalonde et al"},{date:"2022/07/29",title:"Plastic waste mapping and monitoring using geospatial approaches",link:"https://iopscience.iop.org/article/10.1088/1755-1315/1064/1/012008",author:"Zulkifli et al"},{date:"2022/07/29",title:"Smart waste segmentation deep learning based approach",link:"http://dspace.univ-tebessa.dz:8080/jspui/bitstream/123456789/4951/1/Achi%20Belgacem%20Aimen%20pfe_finale.pdf",author:"Belgacem, A"},{date:"2022/10/15",title:"Role of Citizen Scientists in Environmental Plastic Litter Research—A Systematic Review",link:"https://www.proquest.com/openview/aa8927ea09166e0b8af056edc05e6b19/1?pq-origsite=gscholar&cbl=2032327",author:"Cristina et al"},{date:"2022/11/22",title:"The Sharing Green Economy: Sharing What’s Possible with New Labor Economics ",link:"https://www.amazon.com/dp/B0BN6W4W15",author:"Mike Duwe"},{date:"2022/11/25",title:"Waste management: A comprehensive state of the art about the rise of blockchain technology",link:"https://www.sciencedirect.com/science/article/abs/pii/S0166361522002081",author:"Baralla et al"},{date:"2023/01/17",title:"Smardy: Zero-Trust FAIR Marketplace for Research Data",link:"https://ieeexplore.ieee.org/abstract/document/10020710",author:"Ion-Dorinel et al"},{date:"2023/02/24",title:"Monitoring contaminants of emerging concern in aquatic systems through the lens of citizen science",link:"https://www.sciencedirect.com/science/article/pii/S0048969723011439?ref=pdf_download&fr=RR-2&rr=7c4c1b55da651c89",author:"Raman et al"},{date:"2023/03/01",title:"Applications of convolutional neural networks for intelligent waste identification and recycling: A review",link:"https://www.sciencedirect.com/science/article/abs/pii/S0921344922006450",author:"Wu et al"},{date:"2023/03/07",title:"Determinants of household waste disposal practices and implications for practical community interventions: lessons from Lilongwe",link:"https://iopscience.iop.org/article/10.1088/2634-4505/acbcec/meta",author:"Kalonde et al"},{date:"2023/04/12",title:"Understanding GIS through Sustainable Development Goals",link:"https://www.taylorfrancis.com/books/mono/10.1201/9781003220510/understanding-gis-sustainable-development-goals-paul-holloway",author:"Holloway, P."},{date:"2023/04/27",title:"INTERACT Pocket guide on how to reduce plastic consumption and pollution",link:"https://eu-interact.org/app/uploads/2023/05/D2.11.pdf",author:"Arndal et al"},{date:"2023/04/27",title:`Evaluation of a smartphone-based methodology that integrates +import{h as n}from"./moment-zH0z38ay.js";import{n as o}from"./app-BwSojYvl.js";/* empty css */const r={name:"References",created(){window.scrollTo(0,0)},data(){return{references:[{date:"2018/06/25",title:"OpenLitterMap.com – Open Data on Plastic Pollution with Blockchain Rewards (Littercoin)",link:"https://opengeospatialdata.springeropen.com/articles/10.1186/s40965-018-0050-y",author:"Lynch, S."},{date:"2018/12/21",title:"A Review of the Applicability of Gamification and Game-based Learning to Improve Household-level Waste Management Practices among Schoolchildren",link:"https://ijtech.eng.ui.ac.id/article/view/2644",author:"Magista et al."},{date:"2019/01/05",title:"Needs, drivers, participants and engagement actions: a framework for motivating contributions to volunteered geographic information systems",link:"https://link.springer.com/article/10.1007/s10109-018-00289-5",author:"Gómez-Barrón, et al."},{date:"2019/10/08",title:"CITIZEN SCIENCE AND DATA INTEGRATION FOR UNDERSTANDING MARINE LITTER",link:"http://pure.iiasa.ac.at/id/eprint/16095/1/22_Camera_ready_paper.pdf",author:"Campbell et al."},{date:"2019/10/09",title:"Citizen science and the United Nations Sustainable Development Goals",link:"https://www.nature.com/articles/s41893-019-0390-3",author:"Fritz et al."},{date:"2019/12/04",title:"Citizen Science - International Encyclopedia of Human Geography (Second Edition, Pages 209-214)",link:"https://www.sciencedirect.com/science/article/pii/B9780081022955106018",author:"Fast, V. and Haworth, B."},{date:"2021/01/05",title:"Workflows and Spatial Analysis in the Age of GeoBlockchain: A Land Ownership Example",link:"https://cartogis.org/docs/autocarto/2020/docs/abstracts/3e%20Workflows%20and%20Spatial%20Analysis%20in%20the%20Age%20of%20GeoBlockchain%20A%20Land.pdf",author:"Papantonioua, C. and Hilton, B."},{date:"2020/06/09",title:"Open data and its peers: understanding promising harbingers from Nordic Europe",link:"https://www.emerald.com/insight/content/doi/10.1108/AJIM-12-2019-0364/full/html",author:"Kessen, M."},{date:"2020/06/13",title:"Volunteered geographic information systems: Technological design patterns",link:"https://onlinelibrary.wiley.com/doi/abs/10.1111/tgis.12544",author:"Gómez-Barrón, et al."},{date:"2020/07/02",title:"Mapping citizen science contributions to the UN sustainable development goals",link:"https://link.springer.com/article/10.1007/s11625-020-00833-7",author:"Fraisl et al."},{date:"2020/08/27",title:"Official Survey Data and Virtual Worlds—Designing an Integrative and Economical Open Source Production Pipeline for xR-Applications in Small and Medium-Sized Enterprises",link:"file:///Users/sean/Documents/BDCC-04-00026-v2.pdf",author:"Höhl, W."},{date:"2020/11/02",title:"Citizen science and marine conservation: a global review",link:"https://royalsocietypublishing.org/doi/full/10.1098/rstb.2019.0461",author:"Kelly et al."},{date:"2020/11/04",title:"Towards fair and efficient task allocation in blockchain-based crowdsourcing",link:"https://link.springer.com/article/10.1007/s42045-020-00043-w",author:"Pang et al."},{date:"2020/12/21",title:"Open-source geospatial tools and technologies for urban and environmental studies",link:"https://opengeospatialdata.springeropen.com/articles/10.1186/s40965-020-00078-2",author:"Mobasheri et al."},{date:"2021/02/01",title:"Analysis of plastic water pollution data",link:"https://dspace.lib.uom.gr/bitstream/2159/25376/1/BesiouEleutheriaMsc2021.pdf",author:"ΜΠΕΣΙΟΥ, E."},{date:"2021/01/13",title:"Enabling a large-scale assessment of litter along Saudi Arabian red sea shores by combining drones and machine learning",link:"https://www.sciencedirect.com/science/article/abs/pii/S0269749121003109",author:"Martin et al."},{date:"2021/03/04",title:"Autonomous, Onboard Vision-Based Trash and Litter Detection in Low Altitude Aerial Images Collected by an Unmanned Aerial Vehicle",link:"https://www.researchgate.net/profile/Mateusz-Piechocki-2/publication/349869848_Autonomous_Onboard_Vision-Based_Trash_and_Litter_Detection_in_Low_Altitude_Aerial_Images_Collected_by_an_Unmanned_Aerial_Vehicle/links/60450db2a6fdcc9c781dc33b/Autonomous-Onboard-Vision-Based-Trash-and-Litter-Detection-in-Low-Altitude-Aerial-Images-Collected-by-an-Unmanned-Aerial-Vehicle.pdf",author:"Kraft et al."},{date:"2021/04/18",title:"Environmental fate and impacts of microplastics in aquatic ecosystems: a review",link:"https://pubs.rsc.org/en/content/articlehtml/2021/ra/d1ra00880c",author:"Du et al."},{date:"2021/05/06",title:"Blockchain technologies to address smart city and society challenges",link:"https://www.sciencedirect.com/science/article/abs/pii/S0747563221001771",author:"Mora et al."},{date:"2021/05/17",title:"Waste detection in Pomerania: Non-profit project for detecting waste in environment",link:"https://arxiv.org/pdf/2105.06808.pdf",author:"Majchrowska et al."},{date:"2021/05/17",title:"This city is not a bin: Crowdmapping the distribution of urban litter",link:"https://github.com/andrea-ballatore/litter-dynamics/blob/885de9c61d0b669d007ad871c8494851ce43da9a/publications/ballatore_et_al-2021-city_not_a_bin_crowdmapping.pdf",author:"Ballatore et al."},{date:"2021/08/23",title:"Using citizen science data to monitor the Sustainable Development Goals: a bottom-up analysis",link:"https://link.springer.com/article/10.1007/s11625-021-01001-1",author:"Ballerini & Bergh"},{date:"2021/09/30",title:"Is Downloading this App Consistent with my Values?",link:"https://arxiv.org/pdf/2106.12458.pdf",author:"Carter, S."},{date:"2021/10/21",title:"From City to Sea: Integrated Management of Litter and Plastics and Their Effects on Waterways - A Guide for Municipalities",link:"https://openknowledge.worldbank.org/handle/10986/36523",author:"World Bank"},{date:"2021/10/27",title:"A Systematic Literature Review of Blockchain Technology for Smart Villages",link:"https://link.springer.com/article/10.1007/s11831-021-09659-7",author:"Kaur & Parashar"},{date:"2021/11/02",title:"Environmental Governance. In: Handbook of Environmental Sociology. Handbooks of Sociology and Social Research.",link:"https://link.springer.com/chapter/10.1007/978-3-030-77712-8_16",author:"Fisher et al."},{date:"2021/11/05",title:"Recycling Waste Classification Using Vision Transformer on Portable Device",link:"https://www.mdpi.com/2071-1050/13/21/11572",author:"Huang et al."},{date:"2021/11/23",title:"Litter origins, accumulation rates, and hierarchical composition on urban roadsides of the Inland Empire, California",link:"https://iopscience.iop.org/article/10.1088/1748-9326/ac3c6a",author:"W. Cowger et al."},{date:"2021/12/13",title:"Citizen science at public libraries: Data on librarians and users perceptions of participating in a citizen science project in Catalunya, Spain",link:"https://www.sciencedirect.com/science/article/pii/S2352340921009884",author:"Cigarini et al"},{date:"2022/01/20",title:"Real-Time Litter Detection System for Moving Vehicles Using YOLO",link:"https://ieeexplore.ieee.org/document/9716512",author:"Amrutha et al"},{date:"2022/02/01",title:"Deep learning-based waste detection in natural and urban environments",link:"https://www.sciencedirect.com/science/article/pii/S0956053X21006474",author:"Majchrowskaa et al"},{date:"2022/02/24",title:"Image Classification Approaches for Segregation of Plastic Waste Based on Resin Identification Code",link:"https://link.springer.com/article/10.1007/s41403-022-00324-4",author:"Agarwal et al"},{date:"2022/02/24",title:"Toward smarter management and recovery of municipal solid waste: A critical review on deep learning approaches",link:"https://www.sciencedirect.com/science/article/abs/pii/S0959652622005807",author:"Kunsen et al"},{date:"2022/03/31",title:"Retraining of object detectors to become suitable for trash detection in the context of autonomous driving",link:"https://www.researchgate.net/profile/Ishan-Srivastava-8/publication/360688760_Object_detection_in_self_driving_cars_using_YOLOv5/links/6285697c50c4566fc2744ac0/Object-detection-in-self-driving-cars-using-YOLOv5.pdf",author:"Srivastava, I"},{date:"2022/04/26",title:"Beach beauty in Bengal: Perception of scenery and its implications for coastal management in Purba Medinipur district, eastern India",link:"https://www.sciencedirect.com/science/article/abs/pii/S0308597X22000811",author:"Chatterjee et al"},{date:"2022/04/26",title:"Application of blockchain technology for geospatial data protection and management",link:"http://zgt.com.ua/en/%D0%B7%D0%B0%D1%81%D1%82%D0%BE%D1%81%D1%83%D0%B2%D0%B0%D0%BD%D0%BD%D1%8F-%D1%82%D0%B5%D1%85%D0%BD%D0%BE%D0%BB%D0%BE%D0%B3%D1%96%D1%97-blockchain-%D0%B4%D0%BB%D1%8F-%D0%B7%D0%B0%D1%85%D0%B8%D1%81%D1%82/",author:"Chetverikov, B & Kilaru, V"},{date:"2022/06/11",title:"Towards geospatial blockchain: A review of research on blockchain technology applied to geospatial data",link:"https://agile-giss.copernicus.org/articles/3/71/2022/agile-giss-3-71-2022.pdf",author:"Zhao et al"},{date:"2022/07/01",title:"Determinants of Household Waste Disposal Practices and Implications for Practical Community Interventions: Lessons from Lilongwe",link:"https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4151604",author:"Kalonde et al"},{date:"2022/07/29",title:"Plastic waste mapping and monitoring using geospatial approaches",link:"https://iopscience.iop.org/article/10.1088/1755-1315/1064/1/012008",author:"Zulkifli et al"},{date:"2022/07/29",title:"Smart waste segmentation deep learning based approach",link:"http://dspace.univ-tebessa.dz:8080/jspui/bitstream/123456789/4951/1/Achi%20Belgacem%20Aimen%20pfe_finale.pdf",author:"Belgacem, A"},{date:"2022/10/15",title:"Role of Citizen Scientists in Environmental Plastic Litter Research—A Systematic Review",link:"https://www.proquest.com/openview/aa8927ea09166e0b8af056edc05e6b19/1?pq-origsite=gscholar&cbl=2032327",author:"Cristina et al"},{date:"2022/11/22",title:"The Sharing Green Economy: Sharing What’s Possible with New Labor Economics ",link:"https://www.amazon.com/dp/B0BN6W4W15",author:"Mike Duwe"},{date:"2022/11/25",title:"Waste management: A comprehensive state of the art about the rise of blockchain technology",link:"https://www.sciencedirect.com/science/article/abs/pii/S0166361522002081",author:"Baralla et al"},{date:"2023/01/17",title:"Smardy: Zero-Trust FAIR Marketplace for Research Data",link:"https://ieeexplore.ieee.org/abstract/document/10020710",author:"Ion-Dorinel et al"},{date:"2023/02/24",title:"Monitoring contaminants of emerging concern in aquatic systems through the lens of citizen science",link:"https://www.sciencedirect.com/science/article/pii/S0048969723011439?ref=pdf_download&fr=RR-2&rr=7c4c1b55da651c89",author:"Raman et al"},{date:"2023/03/01",title:"Applications of convolutional neural networks for intelligent waste identification and recycling: A review",link:"https://www.sciencedirect.com/science/article/abs/pii/S0921344922006450",author:"Wu et al"},{date:"2023/03/07",title:"Determinants of household waste disposal practices and implications for practical community interventions: lessons from Lilongwe",link:"https://iopscience.iop.org/article/10.1088/2634-4505/acbcec/meta",author:"Kalonde et al"},{date:"2023/04/12",title:"Understanding GIS through Sustainable Development Goals",link:"https://www.taylorfrancis.com/books/mono/10.1201/9781003220510/understanding-gis-sustainable-development-goals-paul-holloway",author:"Holloway, P."},{date:"2023/04/27",title:"INTERACT Pocket guide on how to reduce plastic consumption and pollution",link:"https://eu-interact.org/app/uploads/2023/05/D2.11.pdf",author:"Arndal et al"},{date:"2023/04/27",title:`Evaluation of a smartphone-based methodology that integrates long-term tracking of mobility, place experiences, heart rate variability, and subjective well-being`,link:"https://www.cell.com/heliyon/pdf/S2405-8440(23)02958-4.pdf",author:"Giusti et al"},{date:"2023/05/01",title:"Waste classification using vision transformer based on multilayer hybrid convolution neural network",link:"https://www.sciencedirect.com/science/article/abs/pii/S2212095523000779",author:"Alrayes et al"},{date:"2023/05/25",title:"Optimized Custom Dataset for Efficient Detection of Underwater Trash",link:"https://arxiv.org/pdf/2305.16460.pdf",author:"Walia et al"},{date:"2023/05/29",title:"A methodology for quantifying and characterizing litter from trash capture devices (TCDs) to measure impact and inform upstream solutions",link:"https://www.facetsjournal.com/doi/full/10.1139/facets-2022-0034",author:"Sherlock et al"},{date:"2023/07/01",title:"Study on the real-time object detection approach for end-of-life battery-powered electronics in the waste of electrical and electronic equipment recycling process",link:"https://www.sciencedirect.com/science/article/abs/pii/S0956053X23003355",author:"Yang et al"},{date:"2023/08/16",title:"Mapping Waste Piles in an Urban Environment Using Ground Surveys, Manual Digitization of Drone Imagery, and Object Based Image Classification Approach",link:"https://assets.researchsquare.com/files/rs-3244445/v1/ae8bcfa1-65c2-4ca1-ab43-8216902c2b0b.pdf?c=1692214271",author:"Kalonde et al"},{date:"2023/08/16",title:"The Privacy-Value-App Relationship and the Value-Centered Privacy Assistant",link:"https://arxiv.org/pdf/2308.05700.pdf",author:"Carter et al"},{date:"2023/08/18",title:"Centralized road to a decentralized circular plastics economy",link:"https://dutchblockchaincoalition.org/assets/images/default/Msc_Thesis_NinaHuijberts.pdf",author:"Huijberts, N."},{date:"2023/08/23",title:"A survey on bias in machine learning research",link:"https://arxiv.org/pdf/2308.11254.pdf",author:"Mikolajczyk-Bare & Grochowski"},{date:"2023/08/31",title:"Deep learning-based object detection for smart solid waste management system",link:"https://www.peertechzpublications.org/articles/AEST-7-170.pdf",author:"Desta et al"},{date:"2023/09/01",title:"Machine Learning-Based Garbage Detection and 3D Spatial Localization for Intelligent Robotic Grasp",link:"https://www.mdpi.com/2076-3417/13/18/10018",author:"Zhenwei et al"},{date:"2023/09/12",title:"Do We Consume a Lot? Citizen Science Activity for a Circular Economy of Single-Use Plastics in the European Union and North America",link:"https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4569668",author:"Salas et al"},{date:"2023/09/23",title:"Outdoor Trash Detection in Natural Environment Using a Deep Learning Model",link:"https://ieeexplore.ieee.org/abstract/document/10244010",author:"Das et al"},{date:"2023/09/29",title:"Trash AI: A Web GUI for Serverless Computer Vision Analysis of Images of Trash",link:"https://joss.theoj.org/papers/10.21105/joss.05136.pdf",author:"Cowger et al"},{date:"2023/11/16",title:"Public geography and citizen science: participatory practices for action research",link:"https://rosa.uniroma1.it/rosa02/annali_memotef/article/view/1538",author:"Capinera, C."},{date:"2024/01/15",title:"German artificial intelligence (AI) technologies in waste management industry that can be implemented in Iran",link:"https://d1wqtxts1xzle7.cloudfront.net/115878636/Milad_Shokrollahi_Paper_92103552_-libre.pdf?1718099227=&response-content-disposition=inline%3B+filename%3DGerman_artificial_intelligence_AI_techn.pdf&Expires=1727174926&Signature=QqRyD8qAGQuQFsAJb0LYB21c18TpbmIz21p4fHMADTWxZOxbIpObVinLLdzFVWbe~mNiklw~M8Do4yn51ODUIG5QuOlHjfnSIxQK7Fxx1TY1s8xEp-hRDgM4K32XTxI-QymY1nrIBy7mhvYcXzu4x~c6S4AVXPUIS1zf-YNdNyAd7mtKKyGQxpE0R5RZghIxNtQHt1isrGT8iDqIJd0~804OgMG0P3SjM-cwIaQS1qKA7Nwjo6SUzlKrzZLOCVNZ~qLUCQWxj5MkYdo9QUijzaGeOlzAVqjLwexOY9RqjrFQu5Adbt~B8UPSW3xTmCPh1Ssd2Y6Y0cUkkuZ169d0Nw__&Key-Pair-Id=APKAJLOHF5GGSLRBV4ZA",author:"Shokrollahi, M."},{date:"2024/01/26",title:"pLitterStreet: Street Level Plastic Litter Detection and Mapping",link:"https://arxiv.org/abs/2401.14719",author:"Reddy et al"},{date:"2024/02/01",title:"Hierarchical waste detection with weakly supervised segmentation in images from recycling plants",link:"https://www.sciencedirect.com/science/article/abs/pii/S0952197623017268",author:"Yudin et al"},{date:"2024/02/28",title:"Optical Detection of Plastic Waste Through Computer Vision",link:"https://www.sciencedirect.com/science/article/pii/S2667305324000176",author:"Shukratov et al"},{date:"2024/03/01",title:"GENII: A graph neural network-based model for citywide litter prediction leveraging crowdsensing data",link:"https://www.sciencedirect.com/science/article/abs/pii/S0957417423020675",author:"Wang et al"},{date:"2024/03/02",title:"Application Research of Waterborne Plastic Waste Recycling Device Based on Green Design Principles ",link:"https://ebooks.iospress.nl/doi/10.3233/FAIA231470",author:"Zheng & Biao"},{date:"2024/03/19",title:"AI-enhanced Collective Intelligence: The State of the Art and Prospects",link:"https://arxiv.org/pdf/2403.10433.pdf",author:"Cui & Yasseri"},{date:"2024/04/24",title:"Machine Vision for Solid Waste Detection",link:"https://link.springer.com/chapter/10.1007/978-3-031-59531-8_12",author:"Pimenov et al"},{date:"2024/04/25",title:"A Review on Open Data Storage and Retrieval Techniques in Blockchain-based Applications",link:"https://ieeexplore.ieee.org/abstract/document/10533356",author:"Fateminasab et al"},{date:"2024/04/30",title:"Identifying E-Governance Approaches And Their Potential To Support Progress Toward The EU Green Deal",link:"https://edepot.wur.nl/659247",author:"Kogut et al"},{date:"2024/05/07",title:"Open Data Sources for Post-Consumer Plastic Sorting: What We Have and What We Still Need",link:"https://www.sciencedirect.com/science/article/pii/S2212827124001847",author:"Basedow et al"},{date:"2024/06/08",title:"Deep Learning in Waste Management: A Brief Survey",link:"https://www.preprints.org/manuscript/202407.0637/v1",author:"Kunwar et al"},{date:"2024/06/10",title:"The use of citizen science data for biodiversity monitoring and informing the GBF indicators",link:"https://pure.iiasa.ac.at/id/eprint/19822/1/GBF%20ppt%20-%20Fraisl%20v0.pdf",author:"Fraisl, D"},{date:"2024/06/12",title:"Design of an autonomous litter detection and collection system for Icelandic beaches",link:"https://skemman.is/handle/1946/47664",author:"Frey René"},{date:"2024/06/28",title:"Quantification of litter in cities using a smartphone application and citizen science in conjunction with deep learning-based image processing",link:"https://www.sciencedirect.com/science/article/pii/S0956053X24003817",author:"Kako et al"},{date:"2024/08/18",title:"Enhancing Μaritime Lοgistics with Blοckchain Τechnοlοgy : Applicatiοn tο secure and trace dangerοus gοοds in smart pοrts",link:"https://theses.hal.science/tel-04652638/",author:"Abdallah, R."},{date:"2024/08/29",title:"A Deep Learning-Based Approach to Garbage Detection in urban centers",link:"https://eajse.tiu.edu.iq/index.php/eajse/article/view/25",author:"Arif et al"},{date:"2024/09/14",title:"Blockchain on Sustainable Environmental Measures: A Review",link:"https://www.mdpi.com/2813-5288/2/3/16",author:"Vladucu et al"},{date:"2024/09/20",title:"Uncollected Solid Waste Detection and Reporting Using Machine-learning and Geotagging",link:"https://papers.academic-conferences.org/index.php/ecie/article/view/2581",author:"Ndlovu et al"}]}},methods:{getDate(a){return n(a).format("LL")},open(a){window.open(a,"_blank")}}};var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"content p2"},[t("p",{staticClass:"ref-title"},[e._v(" OpenLitterMap has been referenced "+e._s(e.references.length)+" times and counting ")]),t("ul",e._l(e.references.slice().reverse(),function(i){return t("li",[t("div",{staticClass:"mb1"},[t("p",[e._v(e._s(e.getDate(i.date)))]),t("a",{on:{click:function(d){return e.open(i.link)}}},[e._v(e._s(i.title))]),t("p",[e._v(e._s(i.author))])])])}),0)])},l=[],c=o(r,s,l,!1,null,"58d4ec2a");const m=c.exports;export{m as default}; diff --git a/public/build/assets/Reset-CSUJFfJ4.js b/public/build/assets/Reset-BkrHXCCU.js similarity index 99% rename from public/build/assets/Reset-CSUJFfJ4.js rename to public/build/assets/Reset-BkrHXCCU.js index 631cc7aa..e713d2b1 100644 --- a/public/build/assets/Reset-CSUJFfJ4.js +++ b/public/build/assets/Reset-BkrHXCCU.js @@ -1 +1 @@ -import{n as d}from"./app-DuS6KM7M.js";/* empty css */const c={name:"Email",props:["token"],data(){return{email:this.$route.query.email,password:"",passwordConfirmation:"",processing:!1,isPasswordVisible:!1,isPasswordConfirmationVisible:!1}},computed:{errors(){return this.$store.state.user.errors},emailErrors(){return this.errors.email?this.errors.email[0]:null},passwordErrors(){return this.errors.password?this.errors.password[0]:null},passwordConfirmationErrors(){return this.errors.password_confirmation?this.errors.password_confirmation[0]:null}},methods:{async submit(){if(this.password!==this.passwordConfirmation){let t={...this.errors,password:["The password confirmation does not match."]};this.$store.commit("errors",t);return}this.processing=!0,await this.$store.dispatch("RESET_PASSWORD",{email:this.email,password:this.password,password_confirmation:this.passwordConfirmation,token:this.token}),this.processing=!1},clearErrors(){this.$store.commit("errors",[])}}};var p=function(){var s=this,a=s._self._c;return a("section",{staticClass:"hero is-info is-fullheight"},[a("div",{staticClass:"columns centered"},[a("div",{staticClass:"column"}),a("div",{staticClass:"column is-half-tablet is-one-third-desktop is-one-quarter-fullhd"},[a("p",{staticClass:"title is-1 has-text-centered"},[s._v("Reset Your Password")]),a("div",{staticClass:"panel-body"},[a("form",{staticClass:"form-horizontal",attrs:{role:"form"},on:{submit:function(r){return r.preventDefault(),s.submit.apply(null,arguments)}}},[a("div",{staticClass:"field with-x-spacing"},[a("label",{staticClass:"label has-text-white",attrs:{for:"email"}},[s._v(s._s(s.$t("settings.details.email")))]),a("div",{staticClass:"control has-icons-left",class:s.processing?"is-loading":""},[a("input",{directives:[{name:"model",rawName:"v-model",value:s.email,expression:"email"}],staticClass:"input",class:s.emailErrors?"is-danger":"",attrs:{id:"email",type:"email",name:"email",required:"",autofocus:"",placeholder:"you@email.com"},domProps:{value:s.email},on:{input:[function(r){r.target.composing||(s.email=r.target.value)},s.clearErrors]}}),s._m(0),s.emailErrors?a("p",{staticClass:"help has-text-white has-text-weight-bold"},[s._v(s._s(s.emailErrors))]):s._e()])]),a("div",{staticClass:"field with-x-spacing"},[a("label",{staticClass:"label has-text-white",attrs:{for:"password"}},[s._v(s._s(s.$t("settings.password.enter-new-password")))]),a("div",{staticClass:"control has-icons-left has-icons-right",class:s.processing?"is-loading":""},[(s.isPasswordVisible?"text":"password")=="checkbox"?a("input",{directives:[{name:"model",rawName:"v-model",value:s.password,expression:"password"}],staticClass:"input",class:s.passwordErrors?"is-danger":"",attrs:{id:"password",name:"password",required:"",placeholder:"********",type:"checkbox"},domProps:{checked:Array.isArray(s.password)?s._i(s.password,null)>-1:s.password},on:{input:s.clearErrors,change:function(r){var i=s.password,e=r.target,l=!!e.checked;if(Array.isArray(i)){var n=null,o=s._i(i,n);e.checked?o<0&&(s.password=i.concat([n])):o>-1&&(s.password=i.slice(0,o).concat(i.slice(o+1)))}else s.password=l}}}):(s.isPasswordVisible?"text":"password")=="radio"?a("input",{directives:[{name:"model",rawName:"v-model",value:s.password,expression:"password"}],staticClass:"input",class:s.passwordErrors?"is-danger":"",attrs:{id:"password",name:"password",required:"",placeholder:"********",type:"radio"},domProps:{checked:s._q(s.password,null)},on:{input:s.clearErrors,change:function(r){s.password=null}}}):a("input",{directives:[{name:"model",rawName:"v-model",value:s.password,expression:"password"}],staticClass:"input",class:s.passwordErrors?"is-danger":"",attrs:{id:"password",name:"password",required:"",placeholder:"********",type:s.isPasswordVisible?"text":"password"},domProps:{value:s.password},on:{input:[function(r){r.target.composing||(s.password=r.target.value)},s.clearErrors]}}),s._m(1),a("span",{staticClass:"icon is-small is-right cursor-pointer",staticStyle:{"pointer-events":"all"},on:{click:function(r){s.isPasswordVisible=!s.isPasswordVisible}}},[a("i",{staticClass:"fa",class:s.isPasswordVisible?"fa-eye":"fa-eye-slash"})]),s.passwordErrors?a("p",{staticClass:"help has-text-white has-text-weight-bold"},[s._v(s._s(s.passwordErrors))]):s._e()])]),a("div",{staticClass:"field with-x-spacing"},[a("label",{staticClass:"label has-text-white",attrs:{for:"password_conf"}},[s._v(s._s(s.$t("settings.password.confirm-new-password")))]),a("div",{staticClass:"control has-icons-left has-icons-right",class:s.processing?"is-loading":""},[(s.isPasswordConfirmationVisible?"text":"password")=="checkbox"?a("input",{directives:[{name:"model",rawName:"v-model",value:s.passwordConfirmation,expression:"passwordConfirmation"}],staticClass:"input",class:s.passwordConfirmationErrors?"is-danger":"",attrs:{id:"password_conf",name:"password_conf",required:"",placeholder:"********",type:"checkbox"},domProps:{checked:Array.isArray(s.passwordConfirmation)?s._i(s.passwordConfirmation,null)>-1:s.passwordConfirmation},on:{input:s.clearErrors,change:function(r){var i=s.passwordConfirmation,e=r.target,l=!!e.checked;if(Array.isArray(i)){var n=null,o=s._i(i,n);e.checked?o<0&&(s.passwordConfirmation=i.concat([n])):o>-1&&(s.passwordConfirmation=i.slice(0,o).concat(i.slice(o+1)))}else s.passwordConfirmation=l}}}):(s.isPasswordConfirmationVisible?"text":"password")=="radio"?a("input",{directives:[{name:"model",rawName:"v-model",value:s.passwordConfirmation,expression:"passwordConfirmation"}],staticClass:"input",class:s.passwordConfirmationErrors?"is-danger":"",attrs:{id:"password_conf",name:"password_conf",required:"",placeholder:"********",type:"radio"},domProps:{checked:s._q(s.passwordConfirmation,null)},on:{input:s.clearErrors,change:function(r){s.passwordConfirmation=null}}}):a("input",{directives:[{name:"model",rawName:"v-model",value:s.passwordConfirmation,expression:"passwordConfirmation"}],staticClass:"input",class:s.passwordConfirmationErrors?"is-danger":"",attrs:{id:"password_conf",name:"password_conf",required:"",placeholder:"********",type:s.isPasswordConfirmationVisible?"text":"password"},domProps:{value:s.passwordConfirmation},on:{input:[function(r){r.target.composing||(s.passwordConfirmation=r.target.value)},s.clearErrors]}}),s._m(2),a("div",{staticClass:"icon is-small is-right cursor-pointer",staticStyle:{"pointer-events":"all"},on:{click:function(r){s.isPasswordConfirmationVisible=!s.isPasswordConfirmationVisible}}},[a("i",{staticClass:"fa",class:s.isPasswordConfirmationVisible?"fa-eye":"fa-eye-slash"})]),s.passwordConfirmationErrors?a("p",{staticClass:"help has-text-white has-text-weight-bold"},[s._v(s._s(s.passwordConfirmationErrors))]):s._e()])]),a("div",{staticClass:"field has-text-centered"},[a("div",{staticClass:"control"},[a("button",{staticClass:"button is-primary",class:s.processing?"is-loading":"",attrs:{type:"submit",disabled:s.processing}},[s._v(" Reset Password ")])])])])])]),a("div",{staticClass:"column"})])])},m=[function(){var t=this,s=t._self._c;return s("span",{staticClass:"icon is-small is-left"},[s("i",{staticClass:"fa fa-envelope"})])},function(){var t=this,s=t._self._c;return s("span",{staticClass:"icon is-small is-left"},[s("i",{staticClass:"fa fa-lock"})])},function(){var t=this,s=t._self._c;return s("span",{staticClass:"icon is-small is-left"},[s("i",{staticClass:"fa fa-lock"})])}],w=d(c,p,m,!1,null,"9f4d8a55");const h=w.exports;export{h as default}; +import{n as d}from"./app-BwSojYvl.js";/* empty css */const c={name:"Email",props:["token"],data(){return{email:this.$route.query.email,password:"",passwordConfirmation:"",processing:!1,isPasswordVisible:!1,isPasswordConfirmationVisible:!1}},computed:{errors(){return this.$store.state.user.errors},emailErrors(){return this.errors.email?this.errors.email[0]:null},passwordErrors(){return this.errors.password?this.errors.password[0]:null},passwordConfirmationErrors(){return this.errors.password_confirmation?this.errors.password_confirmation[0]:null}},methods:{async submit(){if(this.password!==this.passwordConfirmation){let t={...this.errors,password:["The password confirmation does not match."]};this.$store.commit("errors",t);return}this.processing=!0,await this.$store.dispatch("RESET_PASSWORD",{email:this.email,password:this.password,password_confirmation:this.passwordConfirmation,token:this.token}),this.processing=!1},clearErrors(){this.$store.commit("errors",[])}}};var p=function(){var s=this,a=s._self._c;return a("section",{staticClass:"hero is-info is-fullheight"},[a("div",{staticClass:"columns centered"},[a("div",{staticClass:"column"}),a("div",{staticClass:"column is-half-tablet is-one-third-desktop is-one-quarter-fullhd"},[a("p",{staticClass:"title is-1 has-text-centered"},[s._v("Reset Your Password")]),a("div",{staticClass:"panel-body"},[a("form",{staticClass:"form-horizontal",attrs:{role:"form"},on:{submit:function(r){return r.preventDefault(),s.submit.apply(null,arguments)}}},[a("div",{staticClass:"field with-x-spacing"},[a("label",{staticClass:"label has-text-white",attrs:{for:"email"}},[s._v(s._s(s.$t("settings.details.email")))]),a("div",{staticClass:"control has-icons-left",class:s.processing?"is-loading":""},[a("input",{directives:[{name:"model",rawName:"v-model",value:s.email,expression:"email"}],staticClass:"input",class:s.emailErrors?"is-danger":"",attrs:{id:"email",type:"email",name:"email",required:"",autofocus:"",placeholder:"you@email.com"},domProps:{value:s.email},on:{input:[function(r){r.target.composing||(s.email=r.target.value)},s.clearErrors]}}),s._m(0),s.emailErrors?a("p",{staticClass:"help has-text-white has-text-weight-bold"},[s._v(s._s(s.emailErrors))]):s._e()])]),a("div",{staticClass:"field with-x-spacing"},[a("label",{staticClass:"label has-text-white",attrs:{for:"password"}},[s._v(s._s(s.$t("settings.password.enter-new-password")))]),a("div",{staticClass:"control has-icons-left has-icons-right",class:s.processing?"is-loading":""},[(s.isPasswordVisible?"text":"password")=="checkbox"?a("input",{directives:[{name:"model",rawName:"v-model",value:s.password,expression:"password"}],staticClass:"input",class:s.passwordErrors?"is-danger":"",attrs:{id:"password",name:"password",required:"",placeholder:"********",type:"checkbox"},domProps:{checked:Array.isArray(s.password)?s._i(s.password,null)>-1:s.password},on:{input:s.clearErrors,change:function(r){var i=s.password,e=r.target,l=!!e.checked;if(Array.isArray(i)){var n=null,o=s._i(i,n);e.checked?o<0&&(s.password=i.concat([n])):o>-1&&(s.password=i.slice(0,o).concat(i.slice(o+1)))}else s.password=l}}}):(s.isPasswordVisible?"text":"password")=="radio"?a("input",{directives:[{name:"model",rawName:"v-model",value:s.password,expression:"password"}],staticClass:"input",class:s.passwordErrors?"is-danger":"",attrs:{id:"password",name:"password",required:"",placeholder:"********",type:"radio"},domProps:{checked:s._q(s.password,null)},on:{input:s.clearErrors,change:function(r){s.password=null}}}):a("input",{directives:[{name:"model",rawName:"v-model",value:s.password,expression:"password"}],staticClass:"input",class:s.passwordErrors?"is-danger":"",attrs:{id:"password",name:"password",required:"",placeholder:"********",type:s.isPasswordVisible?"text":"password"},domProps:{value:s.password},on:{input:[function(r){r.target.composing||(s.password=r.target.value)},s.clearErrors]}}),s._m(1),a("span",{staticClass:"icon is-small is-right cursor-pointer",staticStyle:{"pointer-events":"all"},on:{click:function(r){s.isPasswordVisible=!s.isPasswordVisible}}},[a("i",{staticClass:"fa",class:s.isPasswordVisible?"fa-eye":"fa-eye-slash"})]),s.passwordErrors?a("p",{staticClass:"help has-text-white has-text-weight-bold"},[s._v(s._s(s.passwordErrors))]):s._e()])]),a("div",{staticClass:"field with-x-spacing"},[a("label",{staticClass:"label has-text-white",attrs:{for:"password_conf"}},[s._v(s._s(s.$t("settings.password.confirm-new-password")))]),a("div",{staticClass:"control has-icons-left has-icons-right",class:s.processing?"is-loading":""},[(s.isPasswordConfirmationVisible?"text":"password")=="checkbox"?a("input",{directives:[{name:"model",rawName:"v-model",value:s.passwordConfirmation,expression:"passwordConfirmation"}],staticClass:"input",class:s.passwordConfirmationErrors?"is-danger":"",attrs:{id:"password_conf",name:"password_conf",required:"",placeholder:"********",type:"checkbox"},domProps:{checked:Array.isArray(s.passwordConfirmation)?s._i(s.passwordConfirmation,null)>-1:s.passwordConfirmation},on:{input:s.clearErrors,change:function(r){var i=s.passwordConfirmation,e=r.target,l=!!e.checked;if(Array.isArray(i)){var n=null,o=s._i(i,n);e.checked?o<0&&(s.passwordConfirmation=i.concat([n])):o>-1&&(s.passwordConfirmation=i.slice(0,o).concat(i.slice(o+1)))}else s.passwordConfirmation=l}}}):(s.isPasswordConfirmationVisible?"text":"password")=="radio"?a("input",{directives:[{name:"model",rawName:"v-model",value:s.passwordConfirmation,expression:"passwordConfirmation"}],staticClass:"input",class:s.passwordConfirmationErrors?"is-danger":"",attrs:{id:"password_conf",name:"password_conf",required:"",placeholder:"********",type:"radio"},domProps:{checked:s._q(s.passwordConfirmation,null)},on:{input:s.clearErrors,change:function(r){s.passwordConfirmation=null}}}):a("input",{directives:[{name:"model",rawName:"v-model",value:s.passwordConfirmation,expression:"passwordConfirmation"}],staticClass:"input",class:s.passwordConfirmationErrors?"is-danger":"",attrs:{id:"password_conf",name:"password_conf",required:"",placeholder:"********",type:s.isPasswordConfirmationVisible?"text":"password"},domProps:{value:s.passwordConfirmation},on:{input:[function(r){r.target.composing||(s.passwordConfirmation=r.target.value)},s.clearErrors]}}),s._m(2),a("div",{staticClass:"icon is-small is-right cursor-pointer",staticStyle:{"pointer-events":"all"},on:{click:function(r){s.isPasswordConfirmationVisible=!s.isPasswordConfirmationVisible}}},[a("i",{staticClass:"fa",class:s.isPasswordConfirmationVisible?"fa-eye":"fa-eye-slash"})]),s.passwordConfirmationErrors?a("p",{staticClass:"help has-text-white has-text-weight-bold"},[s._v(s._s(s.passwordConfirmationErrors))]):s._e()])]),a("div",{staticClass:"field has-text-centered"},[a("div",{staticClass:"control"},[a("button",{staticClass:"button is-primary",class:s.processing?"is-loading":"",attrs:{type:"submit",disabled:s.processing}},[s._v(" Reset Password ")])])])])])]),a("div",{staticClass:"column"})])])},m=[function(){var t=this,s=t._self._c;return s("span",{staticClass:"icon is-small is-left"},[s("i",{staticClass:"fa fa-envelope"})])},function(){var t=this,s=t._self._c;return s("span",{staticClass:"icon is-small is-left"},[s("i",{staticClass:"fa fa-lock"})])},function(){var t=this,s=t._self._c;return s("span",{staticClass:"icon is-small is-left"},[s("i",{staticClass:"fa fa-lock"})])}],w=d(c,p,m,!1,null,"9f4d8a55");const h=w.exports;export{h as default}; diff --git a/public/build/assets/Settings-as1oCdH4.js b/public/build/assets/Settings-Cun0a94W.js similarity index 92% rename from public/build/assets/Settings-as1oCdH4.js rename to public/build/assets/Settings-Cun0a94W.js index e5f68f07..59e68765 100644 --- a/public/build/assets/Settings-as1oCdH4.js +++ b/public/build/assets/Settings-Cun0a94W.js @@ -1 +1 @@ -import i from"./Details-DlDlKZRi.js";import e from"./Social-LSzGhZlS.js";import n from"./Account-vqCFUWRL.js";import{n as o}from"./app-DuS6KM7M.js";import l from"./Payments-VcSsorvg.js";import c from"./Privacy-GGgsaM3d.js";import d from"./Littercoin-CNmEbY4c.js";import p from"./PickedUp-DnNJB4FB.js";import m from"./Emails-udg0lUCE.js";import u from"./GlobalFlag-BXap7gwF.js";/* empty css */import"./vue-loading-hzYdSApK.js";/* empty css */const f={name:"Password",data(){return{processing:!1,oldpassword:"",password:"",password_confirmation:"",btn:"button is-medium is-info"}},computed:{button(){return this.processing?this.btn+" is-loading":this.btn},errors(){return this.$store.state.user.errors}},methods:{clearError(r){this.errors[r]&&this.$store.commit("deleteUserError",r)},getFirstError(r){return this.errors[r][0]},errorExists(r){return this.errors.hasOwnProperty(r)},async submit(){this.processing=!0,await this.$store.dispatch("CHANGE_PASSWORD",{oldpassword:this.oldpassword,password:this.password,password_confirmation:this.password_confirmation}),this.processing=!1},translate(r){return this.$t("settings."+r)}}};var _=function(){var s=this,t=s._self._c;return t("div",{staticStyle:{"padding-left":"1em","padding-right":"1em"}},[t("h1",{staticClass:"title is-4"},[s._v(" "+s._s(s.$t("settings.password.change-password")))]),t("hr"),t("br"),t("div",{staticClass:"columns"},[t("div",{staticClass:"column is-one-third is-offset-1"},[t("form",{attrs:{method:"POST"},on:{submit:function(a){return a.preventDefault(),s.submit.apply(null,arguments)},keydown:function(a){return s.clearError(a.target.name)}}},[t("label",{attrs:{for:"oldpassword"}},[s._v(" "+s._s(s.$t("settings.password.enter-old-password")))]),s.errorExists("oldpassword")?t("span",{staticClass:"error",domProps:{textContent:s._s(s.getFirstError("oldpassword"))}}):s._e(),t("div",{staticClass:"field"},[t("div",{staticClass:"control has-icons-left"},[t("input",{directives:[{name:"model",rawName:"v-model",value:s.oldpassword,expression:"oldpassword"}],staticClass:"input",attrs:{type:"password",name:"oldpassword",placeholder:"*********",required:""},domProps:{value:s.oldpassword},on:{input:function(a){a.target.composing||(s.oldpassword=a.target.value)}}}),s._m(0)])]),t("label",{attrs:{for:"password"}},[s._v(s._s(s.$t("settings.password.enter-new-password")))]),s.errorExists("password")?t("span",{staticClass:"error",domProps:{textContent:s._s(s.getFirstError("password"))}}):s._e(),t("div",{staticClass:"field"},[t("div",{staticClass:"control has-icons-left"},[t("input",{directives:[{name:"model",rawName:"v-model",value:s.password,expression:"password"}],staticClass:"input",attrs:{id:"password",type:"password",name:"password",placeholder:s.translate("password.enter-strong-password"),required:""},domProps:{value:s.password},on:{input:function(a){a.target.composing||(s.password=a.target.value)}}}),s._m(1)])]),t("label",{attrs:{for:"password_confirmation"}},[s._v(s._s(s.$t("settings.password.confirm-new-password")))]),s.errorExists("password_confirmation")?t("span",{staticClass:"error",domProps:{textContent:s._s(s.getFirstError("password_confirmation"))}}):s._e(),t("div",{staticClass:"field mb2"},[t("div",{staticClass:"control has-icons-left"},[t("input",{directives:[{name:"model",rawName:"v-model",value:s.password_confirmation,expression:"password_confirmation"}],staticClass:"input",attrs:{type:"password",name:"password_confirmation",placeholder:s.translate("password.repeat-strong-password"),required:""},domProps:{value:s.password_confirmation},on:{input:function(a){a.target.composing||(s.password_confirmation=a.target.value)}}}),s._m(2)])]),t("div",{staticClass:"col-md-12",staticStyle:{"text-align":"center"}},[t("button",{class:s.button,attrs:{disabled:s.processing}},[s._v(s._s(s.$t("settings.password.update-password")))])])])])])])},w=[function(){var r=this,s=r._self._c;return s("span",{staticClass:"icon is-small is-left"},[s("i",{staticClass:"fa fa-key"})])},function(){var r=this,s=r._self._c;return s("span",{staticClass:"icon is-small is-left"},[s("i",{staticClass:"fa fa-key"})])},function(){var r=this,s=r._self._c;return s("span",{staticClass:"icon is-small is-left"},[s("i",{staticClass:"fa fa-key"})])}],v=o(f,_,w,!1,null,null);const h=v.exports,g={name:"Settings",components:{Details:i,Social:e,Account:n,Password:h,Payments:l,Privacy:c,Littercoin:d,PickedUp:p,Emails:m,GlobalFlag:u},async created(){window.location.href.split("/")[4]&&(this.link=window.location.href.split("/")[4])},data(){return{links:["details","social","account","password","payments","privacy","littercoin","picked-up","emails","show-flag"],link:"password",types:{details:"Details",social:"Social",account:"Account",password:"Password",payments:"Payments",privacy:"Privacy",littercoin:"Littercoin","picked-up":"PickedUp",emails:"Emails","show-flag":"GlobalFlag"}}},methods:{change(r){this.link=r},translate(r){return this.$t("settings.common."+r)}}};var C=function(){var s=this,t=s._self._c;return t("div",{staticClass:"container mt5"},[t("div",{staticClass:"columns"},[t("div",{staticClass:"column is-2"},[t("aside",{staticClass:"menu",attrs:{id:"panel"}},[t("p",{staticClass:"menu-label"},[s._v(" "+s._s(s.$t("settings.common.general"))+" ")]),t("ul",{staticClass:"menu-list"},s._l(s.links,function(a){return t("li",[t("router-link",{attrs:{to:"/settings/"+a},nativeOn:{click:function(P){return s.change(a)}}},[s._v(" "+s._s(s.translate(a))+" ")])],1)}),0)])]),t("div",{staticClass:"column is-three-quarters is-offset-1"},[t(this.types[this.link],{tag:"component"})],1)])])},y=[],b=o(g,C,y,!1,null,null);const U=b.exports;export{U as default}; +import i from"./Details-BBDTCe8n.js";import e from"./Social-DgpaWAPL.js";import n from"./Account-BQJ9B9OG.js";import{n as o}from"./app-BwSojYvl.js";import l from"./Payments-BbgiyAGe.js";import c from"./Privacy-BPIfeVCy.js";import d from"./Littercoin-DRfqG3mg.js";import p from"./PickedUp-CD9AKudE.js";import m from"./Emails-B3sy2HLk.js";import u from"./GlobalFlag-DK1P1Fl8.js";/* empty css */import"./vue-loading-Ck0acTfr.js";/* empty css */const f={name:"Password",data(){return{processing:!1,oldpassword:"",password:"",password_confirmation:"",btn:"button is-medium is-info"}},computed:{button(){return this.processing?this.btn+" is-loading":this.btn},errors(){return this.$store.state.user.errors}},methods:{clearError(r){this.errors[r]&&this.$store.commit("deleteUserError",r)},getFirstError(r){return this.errors[r][0]},errorExists(r){return this.errors.hasOwnProperty(r)},async submit(){this.processing=!0,await this.$store.dispatch("CHANGE_PASSWORD",{oldpassword:this.oldpassword,password:this.password,password_confirmation:this.password_confirmation}),this.processing=!1},translate(r){return this.$t("settings."+r)}}};var _=function(){var s=this,t=s._self._c;return t("div",{staticStyle:{"padding-left":"1em","padding-right":"1em"}},[t("h1",{staticClass:"title is-4"},[s._v(" "+s._s(s.$t("settings.password.change-password")))]),t("hr"),t("br"),t("div",{staticClass:"columns"},[t("div",{staticClass:"column is-one-third is-offset-1"},[t("form",{attrs:{method:"POST"},on:{submit:function(a){return a.preventDefault(),s.submit.apply(null,arguments)},keydown:function(a){return s.clearError(a.target.name)}}},[t("label",{attrs:{for:"oldpassword"}},[s._v(" "+s._s(s.$t("settings.password.enter-old-password")))]),s.errorExists("oldpassword")?t("span",{staticClass:"error",domProps:{textContent:s._s(s.getFirstError("oldpassword"))}}):s._e(),t("div",{staticClass:"field"},[t("div",{staticClass:"control has-icons-left"},[t("input",{directives:[{name:"model",rawName:"v-model",value:s.oldpassword,expression:"oldpassword"}],staticClass:"input",attrs:{type:"password",name:"oldpassword",placeholder:"*********",required:""},domProps:{value:s.oldpassword},on:{input:function(a){a.target.composing||(s.oldpassword=a.target.value)}}}),s._m(0)])]),t("label",{attrs:{for:"password"}},[s._v(s._s(s.$t("settings.password.enter-new-password")))]),s.errorExists("password")?t("span",{staticClass:"error",domProps:{textContent:s._s(s.getFirstError("password"))}}):s._e(),t("div",{staticClass:"field"},[t("div",{staticClass:"control has-icons-left"},[t("input",{directives:[{name:"model",rawName:"v-model",value:s.password,expression:"password"}],staticClass:"input",attrs:{id:"password",type:"password",name:"password",placeholder:s.translate("password.enter-strong-password"),required:""},domProps:{value:s.password},on:{input:function(a){a.target.composing||(s.password=a.target.value)}}}),s._m(1)])]),t("label",{attrs:{for:"password_confirmation"}},[s._v(s._s(s.$t("settings.password.confirm-new-password")))]),s.errorExists("password_confirmation")?t("span",{staticClass:"error",domProps:{textContent:s._s(s.getFirstError("password_confirmation"))}}):s._e(),t("div",{staticClass:"field mb2"},[t("div",{staticClass:"control has-icons-left"},[t("input",{directives:[{name:"model",rawName:"v-model",value:s.password_confirmation,expression:"password_confirmation"}],staticClass:"input",attrs:{type:"password",name:"password_confirmation",placeholder:s.translate("password.repeat-strong-password"),required:""},domProps:{value:s.password_confirmation},on:{input:function(a){a.target.composing||(s.password_confirmation=a.target.value)}}}),s._m(2)])]),t("div",{staticClass:"col-md-12",staticStyle:{"text-align":"center"}},[t("button",{class:s.button,attrs:{disabled:s.processing}},[s._v(s._s(s.$t("settings.password.update-password")))])])])])])])},w=[function(){var r=this,s=r._self._c;return s("span",{staticClass:"icon is-small is-left"},[s("i",{staticClass:"fa fa-key"})])},function(){var r=this,s=r._self._c;return s("span",{staticClass:"icon is-small is-left"},[s("i",{staticClass:"fa fa-key"})])},function(){var r=this,s=r._self._c;return s("span",{staticClass:"icon is-small is-left"},[s("i",{staticClass:"fa fa-key"})])}],v=o(f,_,w,!1,null,null);const h=v.exports,g={name:"Settings",components:{Details:i,Social:e,Account:n,Password:h,Payments:l,Privacy:c,Littercoin:d,PickedUp:p,Emails:m,GlobalFlag:u},async created(){window.location.href.split("/")[4]&&(this.link=window.location.href.split("/")[4])},data(){return{links:["details","social","account","password","payments","privacy","littercoin","picked-up","emails","show-flag"],link:"password",types:{details:"Details",social:"Social",account:"Account",password:"Password",payments:"Payments",privacy:"Privacy",littercoin:"Littercoin","picked-up":"PickedUp",emails:"Emails","show-flag":"GlobalFlag"}}},methods:{change(r){this.link=r},translate(r){return this.$t("settings.common."+r)}}};var C=function(){var s=this,t=s._self._c;return t("div",{staticClass:"container mt5"},[t("div",{staticClass:"columns"},[t("div",{staticClass:"column is-2"},[t("aside",{staticClass:"menu",attrs:{id:"panel"}},[t("p",{staticClass:"menu-label"},[s._v(" "+s._s(s.$t("settings.common.general"))+" ")]),t("ul",{staticClass:"menu-list"},s._l(s.links,function(a){return t("li",[t("router-link",{attrs:{to:"/settings/"+a},nativeOn:{click:function(P){return s.change(a)}}},[s._v(" "+s._s(s.translate(a))+" ")])],1)}),0)])]),t("div",{staticClass:"column is-three-quarters is-offset-1"},[t(this.types[this.link],{tag:"component"})],1)])])},y=[],b=o(g,C,y,!1,null,null);const U=b.exports;export{U as default}; diff --git a/public/build/assets/SignUp-JIDYF55j.js b/public/build/assets/SignUp-R39V8jhU.js similarity index 98% rename from public/build/assets/SignUp-JIDYF55j.js rename to public/build/assets/SignUp-R39V8jhU.js index d05666e1..af4ddfc5 100644 --- a/public/build/assets/SignUp-JIDYF55j.js +++ b/public/build/assets/SignUp-R39V8jhU.js @@ -1 +1 @@ -import{n as s}from"./app-DuS6KM7M.js";/* empty css */const i={name:"SignUp"};var n=function(){var t=this,a=t._self._c;return a("section",{staticClass:"section hero fullheight is-primary is-bold"},[a("div",{staticClass:"container"},[a("h1",{staticClass:"title"},[t._v(" "+t._s(t.$t("auth.signup.ready-to-join"))+" ")]),a("h2",{staticClass:"subtitle"},[t._v(" "+t._s(t.$t("auth.signup.join-subtitle"))+" ")]),a("div",{staticClass:"columns"},[a("div",{staticClass:"column wow bounceInRight"},[a("div",{staticClass:"box",attrs:{id:"first"}},[a("p",{staticClass:"card-header-title",staticStyle:{color:"#3273dc","margin-bottom":"-20px"}},[t._v(" "+t._s(t.$t("auth.signup.free-plan"))+" ")]),a("div",{staticClass:"content"},[a("ul",[a("li",[t._v(t._s(t.$t("auth.signup.free-plan-feature1")))]),a("li",[t._v(t._s(t.$t("auth.signup.free-plan-feature2")))]),a("li",[t._v(t._s(t.$t("auth.signup.free-plan-feature3")))]),a("li",[t._v(t._s(t.$t("auth.signup.free-plan-feature4")))])])]),a("div",{staticStyle:{"text-align":"center"}},[a("router-link",{attrs:{to:"/join?plan=free"}},[a("button",{staticClass:"button is-primary is-center",staticStyle:{"margin-top":"-10px"}},[t._v(" "+t._s(t.$t("auth.signup.free-plan-join"))+" ")])])],1)])]),a("div",{staticClass:"column wow bounceInDown"},[a("div",{staticClass:"box"},[a("p",{staticClass:"card-header-title",staticStyle:{color:"orange"}},[t._v(" "+t._s(t.$t("auth.signup.startup-plan"))+" "),a("strong",{staticStyle:{"padding-left":"30px"}},[t._v(t._s(t.$t("auth.signup.startup-plan-donation")))])]),a("div",{staticClass:"content"},[a("ul",[a("li",[t._v(t._s(t.$t("auth.signup.startup-plan-feature1")))]),a("li",[t._v(t._s(t.$t("auth.signup.startup-plan-feature2")))]),a("li",[t._v(t._s(t.$t("auth.signup.startup-plan-feature3")))])])]),a("div",{staticStyle:{"text-align":"center"}},[a("router-link",{attrs:{to:"/join?plan=startup"}},[a("button",{staticClass:"button is-warning"},[t._v(" "+t._s(t.$t("auth.signup.startup-plan-join"))+" ")])])],1)])]),a("div",{staticClass:"column wow bounceInLeft"},[a("div",{staticClass:"box"},[a("p",{staticClass:"card-header-title",staticStyle:{color:"green"}},[t._v(" "+t._s(t.$t("auth.signup.basic-plan"))),a("strong",{staticStyle:{"padding-left":"30px"}},[t._v(t._s(t.$t("auth.signup.basic-plan-donation")))])]),a("div",{staticClass:"content"},[a("ul",[a("li",[t._v(t._s(t.$t("auth.signup.basic-plan-feature1")))]),a("li",[t._v(t._s(t.$t("auth.signup.basic-plan-feature2")))]),a("li",[t._v(t._s(t.$t("auth.signup.basic-plan-feature3")))])])]),a("div",{staticStyle:{"text-align":"center"}},[a("router-link",{attrs:{to:"/join?plan=basic"}},[a("button",{staticClass:"button is-success"},[t._v(" "+t._s(t.$t("auth.signup.basic-plan-join"))+" ")])])],1)])])]),a("div",{staticClass:"columns"},[a("div",{staticClass:"column is-4 is-offset-2 wow bounceInLeft"},[a("div",{staticClass:"box"},[a("p",{staticClass:"card-header-title"},[t._v(" "+t._s(t.$t("auth.signup.advanced-plan"))+" "),a("strong",{staticStyle:{"padding-left":"12px"}},[t._v(t._s(t.$t("auth.signup.advanced-plan-donation"))+" ")])]),a("div",{staticClass:"content"},[a("ul",[a("li",[t._v(t._s(t.$t("auth.signup.advanced-plan-feature1")))]),a("li",[t._v(t._s(t.$t("auth.signup.advanced-plan-feature2")))]),a("li",[t._v(t._s(t.$t("auth.signup.advanced-plan-feature3")))])])]),a("div",{staticStyle:{"text-align":"center"}},[a("router-link",{attrs:{to:"/join?plan=advanced"}},[a("button",{staticClass:"button is-dark"},[t._v(" "+t._s(t.$t("auth.signup.advanced-plan-join"))+" ")])])],1)])]),a("div",{staticClass:"column is-4 wow bounceInRight"},[a("div",{staticClass:"box"},[a("p",{staticClass:"card-header-title",staticStyle:{color:"red"}},[t._v(" "+t._s(t.$t("auth.signup.pro-plan"))+" "),a("strong",{staticStyle:{"padding-left":"45px"}},[t._v(t._s(t.$t("auth.signup.pro-plan-donation")))])]),a("div",{staticClass:"content"},[a("ul",[a("li",[t._v(t._s(t.$t("auth.signup.pro-plan-feature1")))]),a("li",[t._v(t._s(t.$t("auth.signup.pro-plan-feature2")))]),a("li",[t._v(t._s(t.$t("auth.signup.pro-plan-feature3")))])])]),a("div",{staticStyle:{"text-align":"center"}},[a("router-link",{attrs:{to:"/join?plan=pro"}},[a("button",{staticClass:"button is-danger"},[t._v(" "+t._s(t.$t("auth.signup.pro-plan-join"))+" ")])])],1)])])])])])},e=[],l=s(i,n,e,!1,null,"895a84a0");const c=l.exports;export{c as default}; +import{n as s}from"./app-BwSojYvl.js";/* empty css */const i={name:"SignUp"};var n=function(){var t=this,a=t._self._c;return a("section",{staticClass:"section hero fullheight is-primary is-bold"},[a("div",{staticClass:"container"},[a("h1",{staticClass:"title"},[t._v(" "+t._s(t.$t("auth.signup.ready-to-join"))+" ")]),a("h2",{staticClass:"subtitle"},[t._v(" "+t._s(t.$t("auth.signup.join-subtitle"))+" ")]),a("div",{staticClass:"columns"},[a("div",{staticClass:"column wow bounceInRight"},[a("div",{staticClass:"box",attrs:{id:"first"}},[a("p",{staticClass:"card-header-title",staticStyle:{color:"#3273dc","margin-bottom":"-20px"}},[t._v(" "+t._s(t.$t("auth.signup.free-plan"))+" ")]),a("div",{staticClass:"content"},[a("ul",[a("li",[t._v(t._s(t.$t("auth.signup.free-plan-feature1")))]),a("li",[t._v(t._s(t.$t("auth.signup.free-plan-feature2")))]),a("li",[t._v(t._s(t.$t("auth.signup.free-plan-feature3")))]),a("li",[t._v(t._s(t.$t("auth.signup.free-plan-feature4")))])])]),a("div",{staticStyle:{"text-align":"center"}},[a("router-link",{attrs:{to:"/join?plan=free"}},[a("button",{staticClass:"button is-primary is-center",staticStyle:{"margin-top":"-10px"}},[t._v(" "+t._s(t.$t("auth.signup.free-plan-join"))+" ")])])],1)])]),a("div",{staticClass:"column wow bounceInDown"},[a("div",{staticClass:"box"},[a("p",{staticClass:"card-header-title",staticStyle:{color:"orange"}},[t._v(" "+t._s(t.$t("auth.signup.startup-plan"))+" "),a("strong",{staticStyle:{"padding-left":"30px"}},[t._v(t._s(t.$t("auth.signup.startup-plan-donation")))])]),a("div",{staticClass:"content"},[a("ul",[a("li",[t._v(t._s(t.$t("auth.signup.startup-plan-feature1")))]),a("li",[t._v(t._s(t.$t("auth.signup.startup-plan-feature2")))]),a("li",[t._v(t._s(t.$t("auth.signup.startup-plan-feature3")))])])]),a("div",{staticStyle:{"text-align":"center"}},[a("router-link",{attrs:{to:"/join?plan=startup"}},[a("button",{staticClass:"button is-warning"},[t._v(" "+t._s(t.$t("auth.signup.startup-plan-join"))+" ")])])],1)])]),a("div",{staticClass:"column wow bounceInLeft"},[a("div",{staticClass:"box"},[a("p",{staticClass:"card-header-title",staticStyle:{color:"green"}},[t._v(" "+t._s(t.$t("auth.signup.basic-plan"))),a("strong",{staticStyle:{"padding-left":"30px"}},[t._v(t._s(t.$t("auth.signup.basic-plan-donation")))])]),a("div",{staticClass:"content"},[a("ul",[a("li",[t._v(t._s(t.$t("auth.signup.basic-plan-feature1")))]),a("li",[t._v(t._s(t.$t("auth.signup.basic-plan-feature2")))]),a("li",[t._v(t._s(t.$t("auth.signup.basic-plan-feature3")))])])]),a("div",{staticStyle:{"text-align":"center"}},[a("router-link",{attrs:{to:"/join?plan=basic"}},[a("button",{staticClass:"button is-success"},[t._v(" "+t._s(t.$t("auth.signup.basic-plan-join"))+" ")])])],1)])])]),a("div",{staticClass:"columns"},[a("div",{staticClass:"column is-4 is-offset-2 wow bounceInLeft"},[a("div",{staticClass:"box"},[a("p",{staticClass:"card-header-title"},[t._v(" "+t._s(t.$t("auth.signup.advanced-plan"))+" "),a("strong",{staticStyle:{"padding-left":"12px"}},[t._v(t._s(t.$t("auth.signup.advanced-plan-donation"))+" ")])]),a("div",{staticClass:"content"},[a("ul",[a("li",[t._v(t._s(t.$t("auth.signup.advanced-plan-feature1")))]),a("li",[t._v(t._s(t.$t("auth.signup.advanced-plan-feature2")))]),a("li",[t._v(t._s(t.$t("auth.signup.advanced-plan-feature3")))])])]),a("div",{staticStyle:{"text-align":"center"}},[a("router-link",{attrs:{to:"/join?plan=advanced"}},[a("button",{staticClass:"button is-dark"},[t._v(" "+t._s(t.$t("auth.signup.advanced-plan-join"))+" ")])])],1)])]),a("div",{staticClass:"column is-4 wow bounceInRight"},[a("div",{staticClass:"box"},[a("p",{staticClass:"card-header-title",staticStyle:{color:"red"}},[t._v(" "+t._s(t.$t("auth.signup.pro-plan"))+" "),a("strong",{staticStyle:{"padding-left":"45px"}},[t._v(t._s(t.$t("auth.signup.pro-plan-donation")))])]),a("div",{staticClass:"content"},[a("ul",[a("li",[t._v(t._s(t.$t("auth.signup.pro-plan-feature1")))]),a("li",[t._v(t._s(t.$t("auth.signup.pro-plan-feature2")))]),a("li",[t._v(t._s(t.$t("auth.signup.pro-plan-feature3")))])])]),a("div",{staticStyle:{"text-align":"center"}},[a("router-link",{attrs:{to:"/join?plan=pro"}},[a("button",{staticClass:"button is-danger"},[t._v(" "+t._s(t.$t("auth.signup.pro-plan-join"))+" ")])])],1)])])])])])},e=[],l=s(i,n,e,!1,null,"895a84a0");const c=l.exports;export{c as default}; diff --git a/public/build/assets/Social-LSzGhZlS.js b/public/build/assets/Social-DgpaWAPL.js similarity index 98% rename from public/build/assets/Social-LSzGhZlS.js rename to public/build/assets/Social-DgpaWAPL.js index d96af466..0bd794f4 100644 --- a/public/build/assets/Social-LSzGhZlS.js +++ b/public/build/assets/Social-DgpaWAPL.js @@ -1 +1 @@ -import{n}from"./app-DuS6KM7M.js";/* empty css */const o={name:"Social",data(){return{btn:"button is-medium is-info",processing:!1,twitter:null,facebook:null,instagram:null,linkedin:null,reddit:null,personal:null}},mounted(){var e,t,s,i,a,r;this.$store.commit("errors",{}),this.twitter=(e=this.user.settings)==null?void 0:e.social_twitter,this.facebook=(t=this.user.settings)==null?void 0:t.social_facebook,this.instagram=(s=this.user.settings)==null?void 0:s.social_instagram,this.linkedin=(i=this.user.settings)==null?void 0:i.social_linkedin,this.reddit=(a=this.user.settings)==null?void 0:a.social_reddit,this.personal=(r=this.user.settings)==null?void 0:r.social_personal},computed:{button(){return this.processing?this.btn+" is-loading":this.btn},errors(){return this.$store.state.user.errors},user(){return this.$store.state.user.user}},methods:{getFirstError(e){return this.errors.hasOwnProperty(e)?this.errors[e][0]:null},async submit(){this.processing=!0,await this.$store.dispatch("UPDATE_SETTINGS",{social_twitter:this.twitter,social_facebook:this.facebook,social_instagram:this.instagram,social_linkedin:this.linkedin,social_reddit:this.reddit,social_personal:this.personal}),this.processing=!1}}};var l=function(){var t=this,s=t._self._c;return s("div",{staticStyle:{"padding-left":"1em","padding-right":"1em"}},[s("h1",{staticClass:"title is-4"},[t._v(t._s(t.$t("settings.common.social")))]),s("hr"),s("p",[t._v(t._s(t.$t("settings.social.description")))]),s("br"),s("div",{staticClass:"columns"},[s("div",{staticClass:"column is-half"},[s("form",{on:{submit:function(i){return i.preventDefault(),t.submit.apply(null,arguments)}}},[s("label",{attrs:{for:"twitter"}},[t._v("Twitter")]),s("div",{staticClass:"field"},[s("div",{staticClass:"control has-icons-left"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.twitter,expression:"twitter"}],staticClass:"input",attrs:{type:"text",name:"twitter",id:"twitter",placeholder:"Twitter URL"},domProps:{value:t.twitter},on:{input:function(i){i.target.composing||(t.twitter=i.target.value)}}}),t._m(0)]),t.getFirstError("social_twitter")?s("p",{staticClass:"help is-danger is-size-6",domProps:{textContent:t._s(t.getFirstError("social_twitter"))}}):t._e()]),s("label",{attrs:{for:"facebook"}},[t._v("Facebook")]),s("div",{staticClass:"field"},[s("div",{staticClass:"control has-icons-left"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.facebook,expression:"facebook"}],staticClass:"input",attrs:{type:"text",name:"facebook",id:"facebook",placeholder:"Facebook URL"},domProps:{value:t.facebook},on:{input:function(i){i.target.composing||(t.facebook=i.target.value)}}}),t._m(1)]),t.getFirstError("social_facebook")?s("p",{staticClass:"help is-danger is-size-6",domProps:{textContent:t._s(t.getFirstError("social_facebook"))}}):t._e()]),s("label",{attrs:{for:"instagram"}},[t._v("Instagram")]),s("div",{staticClass:"field"},[s("div",{staticClass:"control has-icons-left"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.instagram,expression:"instagram"}],staticClass:"input",attrs:{type:"text",name:"instagram",id:"instagram",placeholder:"Instagram URL"},domProps:{value:t.instagram},on:{input:function(i){i.target.composing||(t.instagram=i.target.value)}}}),t._m(2)]),t.getFirstError("social_instagram")?s("p",{staticClass:"help is-danger is-size-6",domProps:{textContent:t._s(t.getFirstError("social_instagram"))}}):t._e()]),s("label",{attrs:{for:"linkedin"}},[t._v("LinkedIn")]),s("div",{staticClass:"field"},[s("div",{staticClass:"control has-icons-left"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.linkedin,expression:"linkedin"}],staticClass:"input",attrs:{type:"text",name:"linkedin",id:"linkedin",placeholder:"LinkedIn URL"},domProps:{value:t.linkedin},on:{input:function(i){i.target.composing||(t.linkedin=i.target.value)}}}),t._m(3)]),t.getFirstError("social_linkedin")?s("p",{staticClass:"help is-danger is-size-6",domProps:{textContent:t._s(t.getFirstError("social_linkedin"))}}):t._e()]),s("label",{attrs:{for:"reddit"}},[t._v("Reddit")]),s("div",{staticClass:"field"},[s("div",{staticClass:"control has-icons-left"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.reddit,expression:"reddit"}],staticClass:"input",attrs:{type:"text",name:"reddit",id:"reddit",placeholder:"Reddit URL"},domProps:{value:t.reddit},on:{input:function(i){i.target.composing||(t.reddit=i.target.value)}}}),t._m(4)]),t.getFirstError("social_reddit")?s("p",{staticClass:"help is-danger is-size-6",domProps:{textContent:t._s(t.getFirstError("social_reddit"))}}):t._e()]),s("label",{attrs:{for:"personal"}},[t._v(t._s(t.$t("settings.social.personal-website")))]),s("div",{staticClass:"field"},[s("div",{staticClass:"control has-icons-left"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.personal,expression:"personal"}],staticClass:"input",attrs:{type:"text",name:"personal",id:"personal",placeholder:t.$t("settings.social.personal-website-url")},domProps:{value:t.personal},on:{input:function(i){i.target.composing||(t.personal=i.target.value)}}}),t._m(5)]),t.getFirstError("social_personal")?s("p",{staticClass:"help is-danger is-size-6",domProps:{textContent:t._s(t.getFirstError("social_personal"))}}):t._e()]),s("button",{class:t.button,attrs:{disabled:t.processing}},[t._v(t._s(t.$t("common.submit")))])])])])])},c=[function(){var e=this,t=e._self._c;return t("span",{staticClass:"icon is-small is-left"},[t("i",{staticClass:"fa fa-twitter"})])},function(){var e=this,t=e._self._c;return t("span",{staticClass:"icon is-small is-left"},[t("i",{staticClass:"fa fa-facebook"})])},function(){var e=this,t=e._self._c;return t("span",{staticClass:"icon is-small is-left"},[t("i",{staticClass:"fa fa-instagram"})])},function(){var e=this,t=e._self._c;return t("span",{staticClass:"icon is-small is-left"},[t("i",{staticClass:"fa fa-linkedin"})])},function(){var e=this,t=e._self._c;return t("span",{staticClass:"icon is-small is-left"},[t("i",{staticClass:"fa fa-reddit"})])},function(){var e=this,t=e._self._c;return t("span",{staticClass:"icon is-small is-left"},[t("i",{staticClass:"fa fa-link"})])}],d=n(o,l,c,!1,null,null);const u=d.exports;export{u as default}; +import{n}from"./app-BwSojYvl.js";/* empty css */const o={name:"Social",data(){return{btn:"button is-medium is-info",processing:!1,twitter:null,facebook:null,instagram:null,linkedin:null,reddit:null,personal:null}},mounted(){var e,t,s,i,a,r;this.$store.commit("errors",{}),this.twitter=(e=this.user.settings)==null?void 0:e.social_twitter,this.facebook=(t=this.user.settings)==null?void 0:t.social_facebook,this.instagram=(s=this.user.settings)==null?void 0:s.social_instagram,this.linkedin=(i=this.user.settings)==null?void 0:i.social_linkedin,this.reddit=(a=this.user.settings)==null?void 0:a.social_reddit,this.personal=(r=this.user.settings)==null?void 0:r.social_personal},computed:{button(){return this.processing?this.btn+" is-loading":this.btn},errors(){return this.$store.state.user.errors},user(){return this.$store.state.user.user}},methods:{getFirstError(e){return this.errors.hasOwnProperty(e)?this.errors[e][0]:null},async submit(){this.processing=!0,await this.$store.dispatch("UPDATE_SETTINGS",{social_twitter:this.twitter,social_facebook:this.facebook,social_instagram:this.instagram,social_linkedin:this.linkedin,social_reddit:this.reddit,social_personal:this.personal}),this.processing=!1}}};var l=function(){var t=this,s=t._self._c;return s("div",{staticStyle:{"padding-left":"1em","padding-right":"1em"}},[s("h1",{staticClass:"title is-4"},[t._v(t._s(t.$t("settings.common.social")))]),s("hr"),s("p",[t._v(t._s(t.$t("settings.social.description")))]),s("br"),s("div",{staticClass:"columns"},[s("div",{staticClass:"column is-half"},[s("form",{on:{submit:function(i){return i.preventDefault(),t.submit.apply(null,arguments)}}},[s("label",{attrs:{for:"twitter"}},[t._v("Twitter")]),s("div",{staticClass:"field"},[s("div",{staticClass:"control has-icons-left"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.twitter,expression:"twitter"}],staticClass:"input",attrs:{type:"text",name:"twitter",id:"twitter",placeholder:"Twitter URL"},domProps:{value:t.twitter},on:{input:function(i){i.target.composing||(t.twitter=i.target.value)}}}),t._m(0)]),t.getFirstError("social_twitter")?s("p",{staticClass:"help is-danger is-size-6",domProps:{textContent:t._s(t.getFirstError("social_twitter"))}}):t._e()]),s("label",{attrs:{for:"facebook"}},[t._v("Facebook")]),s("div",{staticClass:"field"},[s("div",{staticClass:"control has-icons-left"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.facebook,expression:"facebook"}],staticClass:"input",attrs:{type:"text",name:"facebook",id:"facebook",placeholder:"Facebook URL"},domProps:{value:t.facebook},on:{input:function(i){i.target.composing||(t.facebook=i.target.value)}}}),t._m(1)]),t.getFirstError("social_facebook")?s("p",{staticClass:"help is-danger is-size-6",domProps:{textContent:t._s(t.getFirstError("social_facebook"))}}):t._e()]),s("label",{attrs:{for:"instagram"}},[t._v("Instagram")]),s("div",{staticClass:"field"},[s("div",{staticClass:"control has-icons-left"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.instagram,expression:"instagram"}],staticClass:"input",attrs:{type:"text",name:"instagram",id:"instagram",placeholder:"Instagram URL"},domProps:{value:t.instagram},on:{input:function(i){i.target.composing||(t.instagram=i.target.value)}}}),t._m(2)]),t.getFirstError("social_instagram")?s("p",{staticClass:"help is-danger is-size-6",domProps:{textContent:t._s(t.getFirstError("social_instagram"))}}):t._e()]),s("label",{attrs:{for:"linkedin"}},[t._v("LinkedIn")]),s("div",{staticClass:"field"},[s("div",{staticClass:"control has-icons-left"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.linkedin,expression:"linkedin"}],staticClass:"input",attrs:{type:"text",name:"linkedin",id:"linkedin",placeholder:"LinkedIn URL"},domProps:{value:t.linkedin},on:{input:function(i){i.target.composing||(t.linkedin=i.target.value)}}}),t._m(3)]),t.getFirstError("social_linkedin")?s("p",{staticClass:"help is-danger is-size-6",domProps:{textContent:t._s(t.getFirstError("social_linkedin"))}}):t._e()]),s("label",{attrs:{for:"reddit"}},[t._v("Reddit")]),s("div",{staticClass:"field"},[s("div",{staticClass:"control has-icons-left"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.reddit,expression:"reddit"}],staticClass:"input",attrs:{type:"text",name:"reddit",id:"reddit",placeholder:"Reddit URL"},domProps:{value:t.reddit},on:{input:function(i){i.target.composing||(t.reddit=i.target.value)}}}),t._m(4)]),t.getFirstError("social_reddit")?s("p",{staticClass:"help is-danger is-size-6",domProps:{textContent:t._s(t.getFirstError("social_reddit"))}}):t._e()]),s("label",{attrs:{for:"personal"}},[t._v(t._s(t.$t("settings.social.personal-website")))]),s("div",{staticClass:"field"},[s("div",{staticClass:"control has-icons-left"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.personal,expression:"personal"}],staticClass:"input",attrs:{type:"text",name:"personal",id:"personal",placeholder:t.$t("settings.social.personal-website-url")},domProps:{value:t.personal},on:{input:function(i){i.target.composing||(t.personal=i.target.value)}}}),t._m(5)]),t.getFirstError("social_personal")?s("p",{staticClass:"help is-danger is-size-6",domProps:{textContent:t._s(t.getFirstError("social_personal"))}}):t._e()]),s("button",{class:t.button,attrs:{disabled:t.processing}},[t._v(t._s(t.$t("common.submit")))])])])])])},c=[function(){var e=this,t=e._self._c;return t("span",{staticClass:"icon is-small is-left"},[t("i",{staticClass:"fa fa-twitter"})])},function(){var e=this,t=e._self._c;return t("span",{staticClass:"icon is-small is-left"},[t("i",{staticClass:"fa fa-facebook"})])},function(){var e=this,t=e._self._c;return t("span",{staticClass:"icon is-small is-left"},[t("i",{staticClass:"fa fa-instagram"})])},function(){var e=this,t=e._self._c;return t("span",{staticClass:"icon is-small is-left"},[t("i",{staticClass:"fa fa-linkedin"})])},function(){var e=this,t=e._self._c;return t("span",{staticClass:"icon is-small is-left"},[t("i",{staticClass:"fa fa-reddit"})])},function(){var e=this,t=e._self._c;return t("span",{staticClass:"icon is-small is-left"},[t("i",{staticClass:"fa fa-link"})])}],d=n(o,l,c,!1,null,null);const u=d.exports;export{u as default}; diff --git a/public/build/assets/SortLocations-DdlBSIC0.js b/public/build/assets/SortLocations-R8WNss-N.js similarity index 99% rename from public/build/assets/SortLocations-DdlBSIC0.js rename to public/build/assets/SortLocations-R8WNss-N.js index c41f10df..105cbd7b 100644 --- a/public/build/assets/SortLocations-DdlBSIC0.js +++ b/public/build/assets/SortLocations-R8WNss-N.js @@ -1 +1 @@ -import{c as ot,g as er,n as xt}from"./app-DuS6KM7M.js";import{h as nr}from"./moment-zH0z38ay.js";var st={exports:{}};st.exports;(function(l,r){var s=200,_="Expected a function",w="__lodash_hash_undefined__",h=1,C=2,ct=1/0,At=9007199254740991,W="[object Arguments]",lt="[object Array]",Lt="[object Boolean]",$t="[object Date]",St="[object Error]",Ot="[object Function]",ie="[object GeneratorFunction]",X="[object Map]",Et="[object Number]",M="[object Object]",Pt="[object Promise]",Bt="[object RegExp]",Y="[object Set]",Nt="[object String]",Ft="[object Symbol]",ut="[object WeakMap]",Mt="[object ArrayBuffer]",q="[object DataView]",oe="[object Float32Array]",se="[object Float64Array]",ce="[object Int8Array]",le="[object Int16Array]",ue="[object Int32Array]",fe="[object Uint8Array]",de="[object Uint8ClampedArray]",pe="[object Uint16Array]",_e="[object Uint32Array]",he=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ge=/^\w*$/,ye=/^\./,ve=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,me=/[\\^$.*+?()[\]{}|]/g,be=/\\(\\)?/g,Ce=/^\[object .+?Constructor\]$/,we=/^(?:0|[1-9]\d*)$/,d={};d[oe]=d[se]=d[ce]=d[le]=d[ue]=d[fe]=d[de]=d[pe]=d[_e]=!0,d[W]=d[lt]=d[Mt]=d[Lt]=d[q]=d[$t]=d[St]=d[Ot]=d[X]=d[Et]=d[M]=d[Bt]=d[Y]=d[Nt]=d[ut]=!1;var Dt=typeof ot=="object"&&ot&&ot.Object===Object&&ot,Te=typeof self=="object"&&self&&self.Object===Object&&self,S=Dt||Te||Function("return this")(),Rt=r&&!r.nodeType&&r,It=Rt&&!0&&l&&!l.nodeType&&l,xe=It&&It.exports===Rt,Ut=xe&&Dt.process,Gt=function(){try{return Ut&&Ut.binding("util")}catch{}}(),Ht=Gt&&Gt.isTypedArray;function Ae(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Kt(t,e){for(var n=-1,a=t?t.length:0,o=Array(a);++n-1}function en(t,e){var n=this.__data__,a=j(n,t);return a<0?n.push([t,e]):n[a][1]=e,this}x.prototype.clear=Ve,x.prototype.delete=je,x.prototype.get=ke,x.prototype.has=tn,x.prototype.set=en;function A(t){var e=-1,n=t?t.length:0;for(this.clear();++ee||i&&c&&u&&!f&&!p||a&&c&&u||!n&&u||!o)return 1;if(!a&&!i&&!p&&t=f)return u;var p=n[a];return u*(p=="desc"?-1:1)}}return t.index-e.index}function Rn(t,e){return function(n,a){if(n==null)return n;if(!H(n))return t(n,a);for(var o=n.length,i=-1,c=Object(n);++if))return!1;var p=i.get(t);if(p&&i.get(e))return p==e;var y=-1,v=!0,g=o&h?new V:void 0;for(i.set(t,e),i.set(e,t);++y-1&&t%1==0&&t1&&kt(t,e[0],e[1])?e=[]:n>2&&kt(e[0],e[1],e[2])&&(e=[e[0]]),Pn(t,yn(e),[])});function bt(t,e){if(typeof t!="function"||e&&typeof e!="function")throw new TypeError(_);var n=function(){var a=arguments,o=e?e.apply(this,a):a[0],i=n.cache;if(i.has(o))return i.get(o);var c=t.apply(this,a);return n.cache=i.set(o,c),c};return n.cache=new(bt.Cache||A),n}bt.Cache=A;function Ct(t,e){return t===e||t!==t&&e!==e}function wt(t){return Qn(t)&&T.call(t,"callee")&&(!Ie.call(t,"callee")||D.call(t)==W)}var E=Array.isArray;function H(t){return t!=null&&Tt(t.length)&&!ne(t)}function Qn(t){return nt(t)&&H(t)}function ne(t){var e=K(t)?D.call(t):"";return e==Ot||e==ie}function Tt(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=At}function K(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function nt(t){return!!t&&typeof t=="object"}function Z(t){return typeof t=="symbol"||nt(t)&&D.call(t)==Ft}var zn=Ht?Zt(Ht):An;function Vn(t){return t==null?"":Fn(t)}function jn(t,e,n){var a=t==null?void 0:zt(t,e);return a===void 0?n:a}function kn(t,e){return t!=null&&Kn(t,e,Cn)}function rt(t){return H(t)?hn(t):$n(t)}function re(t){return t}function tr(t){return tt(t)?Se(et(t)):Bn(t)}l.exports=Jn})(st,st.exports);var rr=st.exports;const I=er(rr),ar={name:"LocationNavbar",data(){return{options:[{text:"A-Z",value:"alphabetical"},{text:this.$t("location.most-data"),value:"most-data"},{text:this.$t("location.most-data-person"),value:"most-data-per-person"},{text:"Total Contributors",value:"total-contributors"},{text:"First Created",value:"first-created"},{text:"Most Recently Created",value:"most-recently-created"},{text:"Most Recently Updated",value:"most-recently-updated"}]}},computed:{sortLocationsBy:{get(){return this.$store.state.locations.sortLocationsBy},set(l){this.$store.commit("setSortLocationsBy",l)}}}};var ir=function(){var r=this,s=r._self._c;return s("div",{staticClass:"container w100"},[s("br"),s("div",{staticClass:"control locations-control"},[s("div",{staticClass:"select"},[s("select",{directives:[{name:"model",rawName:"v-model",value:r.sortLocationsBy,expression:"sortLocationsBy"}],on:{change:function(_){var w=Array.prototype.filter.call(_.target.options,function(h){return h.selected}).map(function(h){var C="_value"in h?h._value:h.value;return C});r.sortLocationsBy=_.target.multiple?w:w[0]}}},r._l(r.options,function(_){return s("option",{key:_.value,domProps:{value:_.value}},[r._v(r._s(_.text))])}),0)])])])},or=[],sr=xt(ar,ir,or,!1,null,"d74a7dec");const cr=sr.exports,lr={name:"LocationMetadata",props:["index","location","locationType","category"],data(){return{dir:"/assets/icons/flags/"}},computed:{country(){return this.$store.state.locations.country},countryName(){return this.$store.state.locations.countryName},stateName(){return this.$store.state.locations.stateName},state(){return this.$store.state.locations.state},textSize(){return this.category==="A-Z"?"title is-1 flex-1 ma":"title is-3 flex-1 ma"}},methods:{getCountryFlag(l){if(l)return l=l.toLowerCase(),this.dir+l+".png"},getDataForLocation(l){if(this.$store.commit("setLocations",[]),this.locationType==="country"){const r=l.country;this.$store.commit("countryName",r),this.$router.push({path:"/world/"+r})}else if(this.locationType==="state"){const r=this.countryName,s=l.state;this.$store.commit("stateName",s),this.$router.push({path:"/world/"+r+"/"+s})}else if(this.locationType==="city"){const r=this.countryName,s=this.stateName,_=l.city;l.hasOwnProperty("hex")&&this.$router.push({path:"/world/"+r+"/"+s+"/"+_+"/map/"}),this.$router.push({path:"/world/"+r+"/"+s+"/"+_+"/map"})}},getLocationName(l){return l[this.locationType]},positions(l){return nr.localeData().ordinal(l+1)}}};var ur=function(){var r=this,s=r._self._c;return s("div",{staticClass:"column is-3"},[s("div",{staticClass:"flex pb1"},[r.locationType==="country"?s("img",{staticClass:"img-flag",attrs:{height:"15",src:r.getCountryFlag(r.location.shortcode)}}):r._e(),s("h2",{class:r.textSize},[s("a",{staticClass:"is-link has-text-centered location-title",attrs:{id:r.location[r.locationType]},on:{click:function(_){return r.getDataForLocation(r.location)}}},[s("span",{directives:[{name:"show",rawName:"v-show",value:r.category!=="A-Z"&&r.index<100,expression:"category !== 'A-Z' && index < 100"}]},[r._v(r._s(r.positions(r.index))+" -")]),s("span",[r._v(r._s(r.getLocationName(r.location)))])])])]),s("div",{staticClass:"panel"},[s("div",{staticClass:"panel-block"},[r._v(r._s(r.$t("location.total-verified-litter"))+": "),s("strong",{staticClass:"green flex-1"},[r._v("  "+r._s(r.location.total_litter_redis.toLocaleString())+" ")]),r.locationType==="country"?s("p",{staticClass:"total-photos-percentage"},[r._v(" "+r._s((r.location.total_litter_redis/this.$store.state.locations.total_litter*100).toFixed(2)+"% Total")+" ")]):r._e()]),s("div",{staticClass:"panel-block"},[r._v(" "+r._s(r.$t("location.total-verified-photos"))+": "),s("strong",{staticClass:"green flex-1"},[r._v("  "+r._s(r.location.total_photos_redis.toLocaleString())+" ")]),r.locationType==="country"?s("p",{staticClass:"total-photos-percentage"},[r._v(" "+r._s((r.location.total_photos_redis/this.$store.state.locations.total_photos*100).toFixed(2)+"% Total")+" ")]):r._e()]),s("div",{staticClass:"panel-block"},[r._v(r._s(r.$t("common.created"))+": "),s("strong",{staticClass:"green"},[r._v("  "+r._s(r.location.diffForHumans))])]),s("div",{staticClass:"panel-block"},[r._v(r._s(r.$t("location.number-of-contributors"))+": "),s("strong",{staticClass:"green"},[r._v("  "+r._s(r.location.total_contributors_redis.toLocaleString()))])]),s("div",{staticClass:"panel-block"},[r._v(r._s(r.$t("location.avg-img-per-person"))+": "),s("strong",{staticClass:"green"},[r._v("  "+r._s(r.location.avg_photo_per_user.toLocaleString()))])]),s("div",{staticClass:"panel-block"},[r._v(r._s(r.$t("location.avg-litter-per-person"))+": "),s("strong",{staticClass:"green"},[r._v("  "+r._s(r.location.avg_litter_per_user.toLocaleString()))])]),s("div",{staticClass:"panel-block"},[r._v(r._s(r.$t("common.created-by"))+": "),s("strong",{staticClass:"green"},[r._v("  "+r._s(r.location.created_by_name)+" "+r._s(r.location.created_by_username))])]),s("div",{staticClass:"panel-block-without-flex"},[r._v(" Last Updated: "),s("strong",{staticClass:"green"},[r._v("  "+r._s(r.location.updatedAtDiffForHumans))]),s("p",[r._v("by "),s("strong",{staticClass:"is-green"},[r._v(" "+r._s(r.location.last_uploader_name)+" "+r._s(r.location.last_uploader_username)+" ")])])])])])},fr=[],dr=xt(lr,ur,fr,!1,null,"f276ecc3");const pr=dr.exports,_r={name:"SortLocations",props:["locationType"],components:{LocationNavbar:cr,LocationMetadata:pr},data(){return{selectedTab:"LeaderboardList",tabs:[{title:this.$t("location.litter"),component:"ChartsContainer",in_location:"all"},{title:this.$t("location.time-series"),component:"TimeSeriesContainer",in_location:"all"},{title:this.$t("location.leaderboard"),component:"LeaderboardList",in_location:"all"},{title:this.$t("location.options"),component:"Options",in_location:"city"},{title:this.$t("common.download"),component:"Download",in_location:"all"}]}},computed:{container(){return this.orderedBy.length===0?"vh65":""},getUsersForLocationLeaderboard(){return this.$store.state.locations.locationTabKey,this.$store.state.leaderboard[this.locationType][this.selectedLocationId]??[]},isAuth(){return this.$store.state.user.auth},orderedBy(){return this.sortedBy==="alphabetical"?this.locations:this.sortedBy==="most-data"?I(this.locations,"total_litter_redis").reverse():this.sortedBy==="most-data-per-person"?I(this.locations,"avg_litter_per_user").reverse():this.sortedBy==="most-recently-updated"?I(this.locations,"updated_at").reverse():this.sortedBy==="total-contributors"?I(this.locations,"total_contributors_redis").reverse():this.sortedBy==="first-created"?I(this.locations,"created_at"):this.sortedBy==="most-recently-created"?I(this.locations,"created_at").reverse():[]},locations(){return this.$store.state.locations.locations},selectedLocationId(){return this.$store.state.locations.selectedLocationId},sortedBy(){return this.$store.state.locations.sortLocationsBy}},methods:{async loadTab(l,r){await this.$store.dispatch("GET_USERS_FOR_LOCATION_LEADERBOARD",{timeFilter:"today",locationType:this.locationType,locationId:r}),this.selectedTab=l},showOnlySelectedComponent(l){return this.selectedLocationId===l},showTab(l){return l==="all"||this.locationType===l},updateUrl(l){console.log({url:l})}}};var hr=function(){var r=this,s=r._self._c;return s("section",{staticClass:"inner-locations-container",class:r.container},[s("location-navbar"),r._l(r.orderedBy,function(_,w){return s("section",{key:w},[s("br"),s("h1",{staticClass:"title is-1 has-text-centered world-cup-title"},[r._v(" #LitterWorldCup ")]),s("div",{staticClass:"hero-body location-container"},[s("div",{staticClass:"columns"},[s("LocationMetadata",{attrs:{index:w,location:_,locationType:r.locationType,category:r.sortedBy}}),s("div",{staticClass:"column is-half is-offset-1"},[s("p",{staticClass:"show-mobile"},[r._v("Drag these across for more options")]),s("div",{staticClass:"tabs is-center"},r._l(r.tabs,function(h,C){return s("p",{directives:[{name:"show",rawName:"v-show",value:r.showTab(h.in_location),expression:"showTab(tab.in_location)"}],key:C,staticClass:"location-tab",class:h.component===r.selectedTab?"location-tab-is-active":"",on:{click:function(ct){return r.loadTab(h.component,_.id)}}},[r._v(" "+r._s(h.title)+" ")])}),0)])],1)])])})],2)},gr=[],yr=xt(_r,hr,gr,!1,null,"98128dff");const br=yr.exports;export{br as S}; +import{c as ot,g as er,n as xt}from"./app-BwSojYvl.js";import{h as nr}from"./moment-zH0z38ay.js";var st={exports:{}};st.exports;(function(l,r){var s=200,_="Expected a function",w="__lodash_hash_undefined__",h=1,C=2,ct=1/0,At=9007199254740991,W="[object Arguments]",lt="[object Array]",Lt="[object Boolean]",$t="[object Date]",St="[object Error]",Ot="[object Function]",ie="[object GeneratorFunction]",X="[object Map]",Et="[object Number]",M="[object Object]",Pt="[object Promise]",Bt="[object RegExp]",Y="[object Set]",Nt="[object String]",Ft="[object Symbol]",ut="[object WeakMap]",Mt="[object ArrayBuffer]",q="[object DataView]",oe="[object Float32Array]",se="[object Float64Array]",ce="[object Int8Array]",le="[object Int16Array]",ue="[object Int32Array]",fe="[object Uint8Array]",de="[object Uint8ClampedArray]",pe="[object Uint16Array]",_e="[object Uint32Array]",he=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ge=/^\w*$/,ye=/^\./,ve=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,me=/[\\^$.*+?()[\]{}|]/g,be=/\\(\\)?/g,Ce=/^\[object .+?Constructor\]$/,we=/^(?:0|[1-9]\d*)$/,d={};d[oe]=d[se]=d[ce]=d[le]=d[ue]=d[fe]=d[de]=d[pe]=d[_e]=!0,d[W]=d[lt]=d[Mt]=d[Lt]=d[q]=d[$t]=d[St]=d[Ot]=d[X]=d[Et]=d[M]=d[Bt]=d[Y]=d[Nt]=d[ut]=!1;var Dt=typeof ot=="object"&&ot&&ot.Object===Object&&ot,Te=typeof self=="object"&&self&&self.Object===Object&&self,S=Dt||Te||Function("return this")(),Rt=r&&!r.nodeType&&r,It=Rt&&!0&&l&&!l.nodeType&&l,xe=It&&It.exports===Rt,Ut=xe&&Dt.process,Gt=function(){try{return Ut&&Ut.binding("util")}catch{}}(),Ht=Gt&&Gt.isTypedArray;function Ae(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Kt(t,e){for(var n=-1,a=t?t.length:0,o=Array(a);++n-1}function en(t,e){var n=this.__data__,a=j(n,t);return a<0?n.push([t,e]):n[a][1]=e,this}x.prototype.clear=Ve,x.prototype.delete=je,x.prototype.get=ke,x.prototype.has=tn,x.prototype.set=en;function A(t){var e=-1,n=t?t.length:0;for(this.clear();++ee||i&&c&&u&&!f&&!p||a&&c&&u||!n&&u||!o)return 1;if(!a&&!i&&!p&&t=f)return u;var p=n[a];return u*(p=="desc"?-1:1)}}return t.index-e.index}function Rn(t,e){return function(n,a){if(n==null)return n;if(!H(n))return t(n,a);for(var o=n.length,i=-1,c=Object(n);++if))return!1;var p=i.get(t);if(p&&i.get(e))return p==e;var y=-1,v=!0,g=o&h?new V:void 0;for(i.set(t,e),i.set(e,t);++y-1&&t%1==0&&t1&&kt(t,e[0],e[1])?e=[]:n>2&&kt(e[0],e[1],e[2])&&(e=[e[0]]),Pn(t,yn(e),[])});function bt(t,e){if(typeof t!="function"||e&&typeof e!="function")throw new TypeError(_);var n=function(){var a=arguments,o=e?e.apply(this,a):a[0],i=n.cache;if(i.has(o))return i.get(o);var c=t.apply(this,a);return n.cache=i.set(o,c),c};return n.cache=new(bt.Cache||A),n}bt.Cache=A;function Ct(t,e){return t===e||t!==t&&e!==e}function wt(t){return Qn(t)&&T.call(t,"callee")&&(!Ie.call(t,"callee")||D.call(t)==W)}var E=Array.isArray;function H(t){return t!=null&&Tt(t.length)&&!ne(t)}function Qn(t){return nt(t)&&H(t)}function ne(t){var e=K(t)?D.call(t):"";return e==Ot||e==ie}function Tt(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=At}function K(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function nt(t){return!!t&&typeof t=="object"}function Z(t){return typeof t=="symbol"||nt(t)&&D.call(t)==Ft}var zn=Ht?Zt(Ht):An;function Vn(t){return t==null?"":Fn(t)}function jn(t,e,n){var a=t==null?void 0:zt(t,e);return a===void 0?n:a}function kn(t,e){return t!=null&&Kn(t,e,Cn)}function rt(t){return H(t)?hn(t):$n(t)}function re(t){return t}function tr(t){return tt(t)?Se(et(t)):Bn(t)}l.exports=Jn})(st,st.exports);var rr=st.exports;const I=er(rr),ar={name:"LocationNavbar",data(){return{options:[{text:"A-Z",value:"alphabetical"},{text:this.$t("location.most-data"),value:"most-data"},{text:this.$t("location.most-data-person"),value:"most-data-per-person"},{text:"Total Contributors",value:"total-contributors"},{text:"First Created",value:"first-created"},{text:"Most Recently Created",value:"most-recently-created"},{text:"Most Recently Updated",value:"most-recently-updated"}]}},computed:{sortLocationsBy:{get(){return this.$store.state.locations.sortLocationsBy},set(l){this.$store.commit("setSortLocationsBy",l)}}}};var ir=function(){var r=this,s=r._self._c;return s("div",{staticClass:"container w100"},[s("br"),s("div",{staticClass:"control locations-control"},[s("div",{staticClass:"select"},[s("select",{directives:[{name:"model",rawName:"v-model",value:r.sortLocationsBy,expression:"sortLocationsBy"}],on:{change:function(_){var w=Array.prototype.filter.call(_.target.options,function(h){return h.selected}).map(function(h){var C="_value"in h?h._value:h.value;return C});r.sortLocationsBy=_.target.multiple?w:w[0]}}},r._l(r.options,function(_){return s("option",{key:_.value,domProps:{value:_.value}},[r._v(r._s(_.text))])}),0)])])])},or=[],sr=xt(ar,ir,or,!1,null,"d74a7dec");const cr=sr.exports,lr={name:"LocationMetadata",props:["index","location","locationType","category"],data(){return{dir:"/assets/icons/flags/"}},computed:{country(){return this.$store.state.locations.country},countryName(){return this.$store.state.locations.countryName},stateName(){return this.$store.state.locations.stateName},state(){return this.$store.state.locations.state},textSize(){return this.category==="A-Z"?"title is-1 flex-1 ma":"title is-3 flex-1 ma"}},methods:{getCountryFlag(l){if(l)return l=l.toLowerCase(),this.dir+l+".png"},getDataForLocation(l){if(this.$store.commit("setLocations",[]),this.locationType==="country"){const r=l.country;this.$store.commit("countryName",r),this.$router.push({path:"/world/"+r})}else if(this.locationType==="state"){const r=this.countryName,s=l.state;this.$store.commit("stateName",s),this.$router.push({path:"/world/"+r+"/"+s})}else if(this.locationType==="city"){const r=this.countryName,s=this.stateName,_=l.city;l.hasOwnProperty("hex")&&this.$router.push({path:"/world/"+r+"/"+s+"/"+_+"/map/"}),this.$router.push({path:"/world/"+r+"/"+s+"/"+_+"/map"})}},getLocationName(l){return l[this.locationType]},positions(l){return nr.localeData().ordinal(l+1)}}};var ur=function(){var r=this,s=r._self._c;return s("div",{staticClass:"column is-3"},[s("div",{staticClass:"flex pb1"},[r.locationType==="country"?s("img",{staticClass:"img-flag",attrs:{height:"15",src:r.getCountryFlag(r.location.shortcode)}}):r._e(),s("h2",{class:r.textSize},[s("a",{staticClass:"is-link has-text-centered location-title",attrs:{id:r.location[r.locationType]},on:{click:function(_){return r.getDataForLocation(r.location)}}},[s("span",{directives:[{name:"show",rawName:"v-show",value:r.category!=="A-Z"&&r.index<100,expression:"category !== 'A-Z' && index < 100"}]},[r._v(r._s(r.positions(r.index))+" -")]),s("span",[r._v(r._s(r.getLocationName(r.location)))])])])]),s("div",{staticClass:"panel"},[s("div",{staticClass:"panel-block"},[r._v(r._s(r.$t("location.total-verified-litter"))+": "),s("strong",{staticClass:"green flex-1"},[r._v("  "+r._s(r.location.total_litter_redis.toLocaleString())+" ")]),r.locationType==="country"?s("p",{staticClass:"total-photos-percentage"},[r._v(" "+r._s((r.location.total_litter_redis/this.$store.state.locations.total_litter*100).toFixed(2)+"% Total")+" ")]):r._e()]),s("div",{staticClass:"panel-block"},[r._v(" "+r._s(r.$t("location.total-verified-photos"))+": "),s("strong",{staticClass:"green flex-1"},[r._v("  "+r._s(r.location.total_photos_redis.toLocaleString())+" ")]),r.locationType==="country"?s("p",{staticClass:"total-photos-percentage"},[r._v(" "+r._s((r.location.total_photos_redis/this.$store.state.locations.total_photos*100).toFixed(2)+"% Total")+" ")]):r._e()]),s("div",{staticClass:"panel-block"},[r._v(r._s(r.$t("common.created"))+": "),s("strong",{staticClass:"green"},[r._v("  "+r._s(r.location.diffForHumans))])]),s("div",{staticClass:"panel-block"},[r._v(r._s(r.$t("location.number-of-contributors"))+": "),s("strong",{staticClass:"green"},[r._v("  "+r._s(r.location.total_contributors_redis.toLocaleString()))])]),s("div",{staticClass:"panel-block"},[r._v(r._s(r.$t("location.avg-img-per-person"))+": "),s("strong",{staticClass:"green"},[r._v("  "+r._s(r.location.avg_photo_per_user.toLocaleString()))])]),s("div",{staticClass:"panel-block"},[r._v(r._s(r.$t("location.avg-litter-per-person"))+": "),s("strong",{staticClass:"green"},[r._v("  "+r._s(r.location.avg_litter_per_user.toLocaleString()))])]),s("div",{staticClass:"panel-block"},[r._v(r._s(r.$t("common.created-by"))+": "),s("strong",{staticClass:"green"},[r._v("  "+r._s(r.location.created_by_name)+" "+r._s(r.location.created_by_username))])]),s("div",{staticClass:"panel-block-without-flex"},[r._v(" Last Updated: "),s("strong",{staticClass:"green"},[r._v("  "+r._s(r.location.updatedAtDiffForHumans))]),s("p",[r._v("by "),s("strong",{staticClass:"is-green"},[r._v(" "+r._s(r.location.last_uploader_name)+" "+r._s(r.location.last_uploader_username)+" ")])])])])])},fr=[],dr=xt(lr,ur,fr,!1,null,"f276ecc3");const pr=dr.exports,_r={name:"SortLocations",props:["locationType"],components:{LocationNavbar:cr,LocationMetadata:pr},data(){return{selectedTab:"LeaderboardList",tabs:[{title:this.$t("location.litter"),component:"ChartsContainer",in_location:"all"},{title:this.$t("location.time-series"),component:"TimeSeriesContainer",in_location:"all"},{title:this.$t("location.leaderboard"),component:"LeaderboardList",in_location:"all"},{title:this.$t("location.options"),component:"Options",in_location:"city"},{title:this.$t("common.download"),component:"Download",in_location:"all"}]}},computed:{container(){return this.orderedBy.length===0?"vh65":""},getUsersForLocationLeaderboard(){return this.$store.state.locations.locationTabKey,this.$store.state.leaderboard[this.locationType][this.selectedLocationId]??[]},isAuth(){return this.$store.state.user.auth},orderedBy(){return this.sortedBy==="alphabetical"?this.locations:this.sortedBy==="most-data"?I(this.locations,"total_litter_redis").reverse():this.sortedBy==="most-data-per-person"?I(this.locations,"avg_litter_per_user").reverse():this.sortedBy==="most-recently-updated"?I(this.locations,"updated_at").reverse():this.sortedBy==="total-contributors"?I(this.locations,"total_contributors_redis").reverse():this.sortedBy==="first-created"?I(this.locations,"created_at"):this.sortedBy==="most-recently-created"?I(this.locations,"created_at").reverse():[]},locations(){return this.$store.state.locations.locations},selectedLocationId(){return this.$store.state.locations.selectedLocationId},sortedBy(){return this.$store.state.locations.sortLocationsBy}},methods:{async loadTab(l,r){await this.$store.dispatch("GET_USERS_FOR_LOCATION_LEADERBOARD",{timeFilter:"today",locationType:this.locationType,locationId:r}),this.selectedTab=l},showOnlySelectedComponent(l){return this.selectedLocationId===l},showTab(l){return l==="all"||this.locationType===l},updateUrl(l){console.log({url:l})}}};var hr=function(){var r=this,s=r._self._c;return s("section",{staticClass:"inner-locations-container",class:r.container},[s("location-navbar"),r._l(r.orderedBy,function(_,w){return s("section",{key:w},[s("br"),s("h1",{staticClass:"title is-1 has-text-centered world-cup-title"},[r._v(" #LitterWorldCup ")]),s("div",{staticClass:"hero-body location-container"},[s("div",{staticClass:"columns"},[s("LocationMetadata",{attrs:{index:w,location:_,locationType:r.locationType,category:r.sortedBy}}),s("div",{staticClass:"column is-half is-offset-1"},[s("p",{staticClass:"show-mobile"},[r._v("Drag these across for more options")]),s("div",{staticClass:"tabs is-center"},r._l(r.tabs,function(h,C){return s("p",{directives:[{name:"show",rawName:"v-show",value:r.showTab(h.in_location),expression:"showTab(tab.in_location)"}],key:C,staticClass:"location-tab",class:h.component===r.selectedTab?"location-tab-is-active":"",on:{click:function(ct){return r.loadTab(h.component,_.id)}}},[r._v(" "+r._s(h.title)+" ")])}),0)])],1)])])})],2)},gr=[],yr=xt(_r,hr,gr,!1,null,"2881aeee");const br=yr.exports;export{br as S}; diff --git a/public/build/assets/SortLocations-DXPjAZTB.css b/public/build/assets/SortLocations-W9sW4X4i.css similarity index 62% rename from public/build/assets/SortLocations-DXPjAZTB.css rename to public/build/assets/SortLocations-W9sW4X4i.css index 51c3fd7f..a5f556dd 100644 --- a/public/build/assets/SortLocations-DXPjAZTB.css +++ b/public/build/assets/SortLocations-W9sW4X4i.css @@ -1 +1 @@ -.locations-control[data-v-d74a7dec]{text-align:right}@media screen and (max-width: 768px){.locations-control[data-v-d74a7dec]{text-align:center}}.green[data-v-f276ecc3]{color:green!important}.panel-block[data-v-f276ecc3],.panel-block-without-flex[data-v-f276ecc3]{color:#000;background-color:#fff}.location-title[data-v-f276ecc3]:hover{color:green!important;border-bottom:1px solid green}.total-photos-percentage[data-v-f276ecc3]{color:green;font-weight:700}.img-flag[data-v-f276ecc3]{padding-right:1.5em;border-radius:1px;flex:.1}.inner-locations-container[data-v-98128dff]{flex:1;background-color:#48c774;background-image:linear-gradient(to right bottom,#7ed56fcc,#28b485cc)}.l-tab.is-active[data-v-98128dff]{border-bottom:2px solid white!important}.location-tab[data-v-98128dff]{background-color:#fff;border-radius:6px;padding:.5em 1.5em;cursor:pointer}.location-tab.location-tab-is-active[data-v-98128dff]{background-color:#3273dc;color:#fff}.h65pc[data-v-98128dff]{height:65%}.world-cup-title[data-v-98128dff]{color:#34495e} +.locations-control[data-v-d74a7dec]{text-align:right}@media screen and (max-width: 768px){.locations-control[data-v-d74a7dec]{text-align:center}}.green[data-v-f276ecc3]{color:green!important}.panel-block[data-v-f276ecc3],.panel-block-without-flex[data-v-f276ecc3]{color:#000;background-color:#fff}.location-title[data-v-f276ecc3]:hover{color:green!important;border-bottom:1px solid green}.total-photos-percentage[data-v-f276ecc3]{color:green;font-weight:700}.img-flag[data-v-f276ecc3]{padding-right:1.5em;border-radius:1px;flex:.1}.inner-locations-container[data-v-2881aeee]{flex:1;background-color:#48c774;background-image:linear-gradient(to right bottom,#7ed56fcc,#28b485cc)}.l-tab.is-active[data-v-2881aeee]{border-bottom:2px solid white!important}.location-tab[data-v-2881aeee]{background-color:#fff;border-radius:6px;padding:.5em 1.5em;cursor:pointer}.location-tab.location-tab-is-active[data-v-2881aeee]{background-color:#3273dc;color:#fff}.h65pc[data-v-2881aeee]{height:65%}.world-cup-title[data-v-2881aeee]{color:#34495e} diff --git a/public/build/assets/States-CsX0UE67.js b/public/build/assets/States-BEsFSBg6.js similarity index 85% rename from public/build/assets/States-CsX0UE67.js rename to public/build/assets/States-BEsFSBg6.js index b3923f00..236e8725 100644 --- a/public/build/assets/States-CsX0UE67.js +++ b/public/build/assets/States-BEsFSBg6.js @@ -1 +1 @@ -import{S as a}from"./SortLocations-DdlBSIC0.js";import{L as i}from"./vue-loading-hzYdSApK.js";/* empty css */import{n as e}from"./app-DuS6KM7M.js";import"./moment-zH0z38ay.js";/* empty css */const n={name:"States",async created(){this.loading=!0,window.scroll({top:0,left:0});const o=window.location.href.split("/")[4];await this.$store.dispatch("GET_STATES",o),this.loading=!1},components:{Loading:i,SortLocations:a},data(){return{loading:!0}},computed:{backButtonText(){return this.$store.state.locations.countryName}},methods:{goBack(){this.$store.commit("setLocations",[]),this.$router.push({path:"/world"})}}};var r=function(){var s=this,t=s._self._c;return t("div",{staticClass:"locations-container"},[t("section",{staticClass:"hero is-info is-medium"},[t("div",{staticClass:"hero-body"},[t("div",{staticClass:"container"},[t("div",{staticClass:"columns"},[t("div",{staticClass:"column is-4"},[t("h1",{staticClass:"title is-1 flex pointer",on:{click:s.goBack}},[t("i",{directives:[{name:"show",rawName:"v-show",value:!s.loading,expression:"!loading"}],staticClass:"fa fa-chevron-left country-back"}),s._v(" "+s._s(s.backButtonText)+" ")])])])])])]),t("sort-locations",{attrs:{locationType:"state"}})],1)},c=[],l=e(n,r,c,!1,null,"bac93c77");const _=l.exports;export{_ as default}; +import{S as a}from"./SortLocations-R8WNss-N.js";import{L as i}from"./vue-loading-Ck0acTfr.js";/* empty css */import{n as e}from"./app-BwSojYvl.js";import"./moment-zH0z38ay.js";/* empty css */const n={name:"States",async created(){this.loading=!0,window.scroll({top:0,left:0});const o=window.location.href.split("/")[4];await this.$store.dispatch("GET_STATES",o),this.loading=!1},components:{Loading:i,SortLocations:a},data(){return{loading:!0}},computed:{backButtonText(){return this.$store.state.locations.countryName}},methods:{goBack(){this.$store.commit("setLocations",[]),this.$router.push({path:"/world"})}}};var r=function(){var s=this,t=s._self._c;return t("div",{staticClass:"locations-container"},[t("section",{staticClass:"hero is-info is-medium"},[t("div",{staticClass:"hero-body"},[t("div",{staticClass:"container"},[t("div",{staticClass:"columns"},[t("div",{staticClass:"column is-4"},[t("h1",{staticClass:"title is-1 flex pointer",on:{click:s.goBack}},[t("i",{directives:[{name:"show",rawName:"v-show",value:!s.loading,expression:"!loading"}],staticClass:"fa fa-chevron-left country-back"}),s._v(" "+s._s(s.backButtonText)+" ")])])])])])]),t("sort-locations",{attrs:{locationType:"state"}})],1)},c=[],l=e(n,r,c,!1,null,"bac93c77");const _=l.exports;export{_ as default}; diff --git a/public/build/assets/Subscribe-BWBMOk3F.js b/public/build/assets/Subscribe-CF0U_ZOk.js similarity index 98% rename from public/build/assets/Subscribe-BWBMOk3F.js rename to public/build/assets/Subscribe-CF0U_ZOk.js index 57634fa5..4d38e306 100644 --- a/public/build/assets/Subscribe-BWBMOk3F.js +++ b/public/build/assets/Subscribe-CF0U_ZOk.js @@ -1 +1 @@ -import{L as p}from"./vue-loading-hzYdSApK.js";/* empty css */import{V as m}from"./vue-recaptcha.es-KbLMYh7d.js";import{n as c}from"./app-DuS6KM7M.js";/* empty css */const d={name:"CreateAccount",props:["plan"],components:{VueRecaptcha:m},created(){this.plan&&(this.plan==="startup"?this.planInt=2:this.plan==="basic"?this.planInt=3:this.plan==="advanced"?this.planInt=4:this.plan==="pro"&&(this.planInt=5))},data(){return{planInt:1,processing:!1,name:"",username:"",email:"",password:"",checkbox:!1,password_confirmation:"",g_recaptcha_response:""}},computed:{checkDisabled(){return!!this.processing},errors(){return this.$store.state.plans.errors},plans(){return this.$store.state.plans.plans}},methods:{clearError(a){this.errors[a]&&this.$store.commit("clearCreateAccountError",a)},changeUrl(a){let s=this.plans[a.target.value-1].name.toLowerCase();this.$router.push({path:"join",query:{plan:s}})},getFirstError(a){return this.errors[a][0]},errorExists(a){return this.errors.hasOwnProperty(a)},recaptcha(a){this.g_recaptcha_response=a},showStripe(){this.$store.commit("showModal",{type:"CreditCard"})},async submit(){if(!this.checkbox){alert("Please accept the terms and conditions, and privacy policy to continue");return}this.processing=!0;let a=this.plans[this.planInt-1].plan_id;await this.$store.dispatch("CREATE_ACCOUNT",{name:this.name,username:this.username,email:this.email,password:this.password,password_confirmation:this.password_confirmation,g_recaptcha_response:this.g_recaptcha_response,plan:this.planInt,plan_id:a}),this.password_confirmation="",this.processing=!1}}};var u=function(){var s=this,t=s._self._c;return t("div",{staticClass:"container"},[t("div",{staticClass:"call-container"},[t("div",{staticClass:"has-text-centered"},[t("strong",[s._v(s._s(s.$t("auth.subscribe.crowdfunding-message")))]),t("div",{staticClass:"control mt2"},[t("div",{staticClass:"select"},[t("select",{directives:[{name:"model",rawName:"v-model",value:s.planInt,expression:"planInt"}],on:{change:[function(e){var r=Array.prototype.filter.call(e.target.options,function(i){return i.selected}).map(function(i){var o="_value"in i?i._value:i.value;return o});s.planInt=e.target.multiple?r:r[0]},s.changeUrl]}},s._l(s.plans,function(e){return t("option",{domProps:{value:e.id}},[s._v(" "+s._s(e.name)+" — €"+s._s(e.price/100)+" ")])}),0)])])])]),t("div",{staticClass:"signup-container"},[t("h3",{staticClass:"title is-3"},[s._v(s._s(s.$t("auth.subscribe.form-create-account")))]),t("form",{attrs:{method:"post"},on:{submit:function(e){return e.preventDefault(),s.submit.apply(null,arguments)},keydown:function(e){return s.clearError(e.target.name)}}},[t("div",{staticClass:"field"},[t("label",{staticClass:"label",attrs:{for:"name"}},[s._v(s._s(s.$t("auth.subscribe.form-field-name")))]),t("div",{staticClass:"control has-icons-left"},[t("input",{directives:[{name:"model",rawName:"v-model",value:s.name,expression:"name"}],staticClass:"input",class:s.errorExists("name")?"is-danger":"",attrs:{name:"name",type:"text",placeholder:"Your full name",required:""},domProps:{value:s.name},on:{input:function(e){e.target.composing||(s.name=e.target.value)}}}),s._m(0),s.errorExists("name")?t("p",{staticClass:"help is-danger",domProps:{textContent:s._s(s.getFirstError("name"))}}):s._e()])]),t("div",{staticClass:"field"},[t("label",{staticClass:"label",attrs:{for:"username"}},[s._v(s._s(s.$t("auth.subscribe.form-field-unique-id")))]),t("div",{staticClass:"control has-icons-left"},[t("input",{directives:[{name:"model",rawName:"v-model",value:s.username,expression:"username"}],staticClass:"input",class:s.errorExists("username")?"is-danger":"",attrs:{name:"username",placeholder:"Unique Username or Organisation",required:"",type:"text"},domProps:{value:s.username},on:{input:function(e){e.target.composing||(s.username=e.target.value)}}}),t("span",{staticClass:"icon is-small is-left"},[s._v(" @ ")]),s.errorExists("username")?t("p",{staticClass:"help is-danger",domProps:{textContent:s._s(s.getFirstError("username"))}}):s._e()])]),t("div",{staticClass:"field"},[t("label",{staticClass:"label",attrs:{for:"email"}},[s._v(s._s(s.$t("auth.subscribe.form-field-email")))]),t("div",{staticClass:"control has-icons-left"},[t("input",{directives:[{name:"model",rawName:"v-model",value:s.email,expression:"email"}],staticClass:"input",class:s.errorExists("email")?"is-danger":"",attrs:{name:"email",type:"email",placeholder:"you@email.com",required:""},domProps:{value:s.email},on:{input:function(e){e.target.composing||(s.email=e.target.value)}}}),s._m(1),s.errorExists("email")?t("p",{staticClass:"help is-danger",domProps:{textContent:s._s(s.getFirstError("email"))}}):s._e()])]),t("div",{staticClass:"field"},[t("label",{staticClass:"label",attrs:{for:"password"}},[s._v(s._s(s.$t("auth.subscribe.form-field-password")))]),t("div",{staticClass:"control has-icons-left"},[t("input",{directives:[{name:"model",rawName:"v-model",value:s.password,expression:"password"}],staticClass:"input",class:s.errorExists("password")?"is-danger":"",attrs:{id:"password",name:"password",type:"password",placeholder:"Create a strong password",required:""},domProps:{value:s.password},on:{input:function(e){e.target.composing||(s.password=e.target.value)}}}),s._m(2),s.errorExists("password")?t("p",{staticClass:"help is-danger",domProps:{textContent:s._s(s.getFirstError("password"))}}):s._e()])]),t("div",{staticClass:"field"},[t("label",{staticClass:"label",attrs:{for:"password_confirmation"}},[s._v(s._s(s.$t("auth.subscribe.form-field-pass-confirm")))]),t("div",{staticClass:"control has-icons-left"},[t("input",{directives:[{name:"model",rawName:"v-model",value:s.password_confirmation,expression:"password_confirmation"}],staticClass:"input",class:s.errorExists("password_confirmation")?"is-danger":"",attrs:{type:"password",id:"password_confirmation",name:"password_confirmation",placeholder:"Confirm your Password",required:""},domProps:{value:s.password_confirmation},on:{input:function(e){e.target.composing||(s.password_confirmation=e.target.value)}}}),s._m(3),s.errorExists("password_confirmation")?t("p",{staticClass:"help is-danger",domProps:{textContent:s._s(s.getFirstError("password_confirmation"))}}):s._e()])]),t("p",{staticClass:"mtb1"},[t("input",{directives:[{name:"model",rawName:"v-model",value:s.checkbox,expression:"checkbox"}],staticClass:"filled-in",staticStyle:{"margin-right":"10px"},attrs:{type:"checkbox",name:"ConfirmToS",id:"ConfirmToS"},domProps:{checked:Array.isArray(s.checkbox)?s._i(s.checkbox,null)>-1:s.checkbox},on:{change:function(e){var r=s.checkbox,i=e.target,o=!!i.checked;if(Array.isArray(r)){var l=null,n=s._i(r,l);i.checked?n<0&&(s.checkbox=r.concat([l])):n>-1&&(s.checkbox=r.slice(0,n).concat(r.slice(n+1)))}else s.checkbox=o}}}),t("label",{attrs:{for:"ConfirmToS"},domProps:{innerHTML:s._s(s.$t("auth.subscribe.form-account-conditions"))}})]),t("div",{staticClass:"captcha"},[t("div",[t("vue-recaptcha",{attrs:{sitekey:"6Le9FtwcAAAAAMOImuwEoOYssOVdNf7dfI2x8XZh",loadRecaptchaScript:!0},on:{verify:s.recaptcha},model:{value:s.g_recaptcha_response,callback:function(e){s.g_recaptcha_response=e},expression:"g_recaptcha_response"}})],1),s.errorExists("g-recaptcha-response")?t("p",{staticClass:"help is-danger",domProps:{textContent:s._s(s.getFirstError("g-recaptcha-response"))}}):s._e()]),t("br"),t("div",{staticStyle:{"text-align":"center","padding-bottom":"1em"}},[t("button",{staticClass:"button is-medium is-primary mb1",class:s.processing?"is-loading":"",attrs:{disabled:s.checkDisabled}},[s._v(s._s(s.$t("auth.subscribe.form-btn")))]),t("p",[s._v(s._s(s.$t("auth.subscribe.create-account-note"))+" ")])])])])])},f=[function(){var a=this,s=a._self._c;return s("span",{staticClass:"icon is-small is-left"},[s("i",{staticClass:"fa fa-user"})])},function(){var a=this,s=a._self._c;return s("span",{staticClass:"icon is-small is-left"},[s("i",{staticClass:"fa fa-envelope"})])},function(){var a=this,s=a._self._c;return s("span",{staticClass:"icon is-small is-left"},[s("i",{staticClass:"fa fa-key"})])},function(){var a=this,s=a._self._c;return s("span",{staticClass:"icon is-small is-left"},[s("i",{staticClass:"fa fa-refresh"})])}],h=c(d,u,f,!1,null,null);const _=h.exports,v={name:"Subscribe",components:{CreateAccount:_,Loading:p},async created(){if(window.location.href.includes("?")&&(this.plan=window.location.href.split("?")[1].split("=")[1]),window.location.href.includes("&")){let a=window.location.href.split("&")[1].split("=")[1],s=this.$t("signup."+a+"-title"),t=this.$t("signup."+a+"-subtitle");this.$swal(s,t,a)}await this.$store.dispatch("GET_PLANS")},data(){return{loading:!0,plan:""}}};var b=function(){var s=this,t=s._self._c;return t("div",[t("section",{staticClass:"hero is-info is-medium"},[t("div",{staticClass:"hero-body"},[t("div",{staticClass:"container"},[t("h1",{staticClass:"title"},[s._v(" "+s._s(s.$t("auth.subscribe.title"))+" ")]),t("h2",{staticClass:"subtitle"},[s._v(" "+s._s(s.$t("auth.subscribe.subtitle"))+" ")])])])]),t("section",[t("create-account",{attrs:{plan:s.plan}})],1)])},g=[],C=c(v,b,g,!1,null,"823b903e");const $=C.exports;export{$ as default}; +import{L as p}from"./vue-loading-Ck0acTfr.js";/* empty css */import{V as m}from"./vue-recaptcha.es-KbLMYh7d.js";import{n as c}from"./app-BwSojYvl.js";/* empty css */const d={name:"CreateAccount",props:["plan"],components:{VueRecaptcha:m},created(){this.plan&&(this.plan==="startup"?this.planInt=2:this.plan==="basic"?this.planInt=3:this.plan==="advanced"?this.planInt=4:this.plan==="pro"&&(this.planInt=5))},data(){return{planInt:1,processing:!1,name:"",username:"",email:"",password:"",checkbox:!1,password_confirmation:"",g_recaptcha_response:""}},computed:{checkDisabled(){return!!this.processing},errors(){return this.$store.state.plans.errors},plans(){return this.$store.state.plans.plans}},methods:{clearError(a){this.errors[a]&&this.$store.commit("clearCreateAccountError",a)},changeUrl(a){let s=this.plans[a.target.value-1].name.toLowerCase();this.$router.push({path:"join",query:{plan:s}})},getFirstError(a){return this.errors[a][0]},errorExists(a){return this.errors.hasOwnProperty(a)},recaptcha(a){this.g_recaptcha_response=a},showStripe(){this.$store.commit("showModal",{type:"CreditCard"})},async submit(){if(!this.checkbox){alert("Please accept the terms and conditions, and privacy policy to continue");return}this.processing=!0;let a=this.plans[this.planInt-1].plan_id;await this.$store.dispatch("CREATE_ACCOUNT",{name:this.name,username:this.username,email:this.email,password:this.password,password_confirmation:this.password_confirmation,g_recaptcha_response:this.g_recaptcha_response,plan:this.planInt,plan_id:a}),this.password_confirmation="",this.processing=!1}}};var u=function(){var s=this,t=s._self._c;return t("div",{staticClass:"container"},[t("div",{staticClass:"call-container"},[t("div",{staticClass:"has-text-centered"},[t("strong",[s._v(s._s(s.$t("auth.subscribe.crowdfunding-message")))]),t("div",{staticClass:"control mt2"},[t("div",{staticClass:"select"},[t("select",{directives:[{name:"model",rawName:"v-model",value:s.planInt,expression:"planInt"}],on:{change:[function(e){var r=Array.prototype.filter.call(e.target.options,function(i){return i.selected}).map(function(i){var o="_value"in i?i._value:i.value;return o});s.planInt=e.target.multiple?r:r[0]},s.changeUrl]}},s._l(s.plans,function(e){return t("option",{domProps:{value:e.id}},[s._v(" "+s._s(e.name)+" — €"+s._s(e.price/100)+" ")])}),0)])])])]),t("div",{staticClass:"signup-container"},[t("h3",{staticClass:"title is-3"},[s._v(s._s(s.$t("auth.subscribe.form-create-account")))]),t("form",{attrs:{method:"post"},on:{submit:function(e){return e.preventDefault(),s.submit.apply(null,arguments)},keydown:function(e){return s.clearError(e.target.name)}}},[t("div",{staticClass:"field"},[t("label",{staticClass:"label",attrs:{for:"name"}},[s._v(s._s(s.$t("auth.subscribe.form-field-name")))]),t("div",{staticClass:"control has-icons-left"},[t("input",{directives:[{name:"model",rawName:"v-model",value:s.name,expression:"name"}],staticClass:"input",class:s.errorExists("name")?"is-danger":"",attrs:{name:"name",type:"text",placeholder:"Your full name",required:""},domProps:{value:s.name},on:{input:function(e){e.target.composing||(s.name=e.target.value)}}}),s._m(0),s.errorExists("name")?t("p",{staticClass:"help is-danger",domProps:{textContent:s._s(s.getFirstError("name"))}}):s._e()])]),t("div",{staticClass:"field"},[t("label",{staticClass:"label",attrs:{for:"username"}},[s._v(s._s(s.$t("auth.subscribe.form-field-unique-id")))]),t("div",{staticClass:"control has-icons-left"},[t("input",{directives:[{name:"model",rawName:"v-model",value:s.username,expression:"username"}],staticClass:"input",class:s.errorExists("username")?"is-danger":"",attrs:{name:"username",placeholder:"Unique Username or Organisation",required:"",type:"text"},domProps:{value:s.username},on:{input:function(e){e.target.composing||(s.username=e.target.value)}}}),t("span",{staticClass:"icon is-small is-left"},[s._v(" @ ")]),s.errorExists("username")?t("p",{staticClass:"help is-danger",domProps:{textContent:s._s(s.getFirstError("username"))}}):s._e()])]),t("div",{staticClass:"field"},[t("label",{staticClass:"label",attrs:{for:"email"}},[s._v(s._s(s.$t("auth.subscribe.form-field-email")))]),t("div",{staticClass:"control has-icons-left"},[t("input",{directives:[{name:"model",rawName:"v-model",value:s.email,expression:"email"}],staticClass:"input",class:s.errorExists("email")?"is-danger":"",attrs:{name:"email",type:"email",placeholder:"you@email.com",required:""},domProps:{value:s.email},on:{input:function(e){e.target.composing||(s.email=e.target.value)}}}),s._m(1),s.errorExists("email")?t("p",{staticClass:"help is-danger",domProps:{textContent:s._s(s.getFirstError("email"))}}):s._e()])]),t("div",{staticClass:"field"},[t("label",{staticClass:"label",attrs:{for:"password"}},[s._v(s._s(s.$t("auth.subscribe.form-field-password")))]),t("div",{staticClass:"control has-icons-left"},[t("input",{directives:[{name:"model",rawName:"v-model",value:s.password,expression:"password"}],staticClass:"input",class:s.errorExists("password")?"is-danger":"",attrs:{id:"password",name:"password",type:"password",placeholder:"Create a strong password",required:""},domProps:{value:s.password},on:{input:function(e){e.target.composing||(s.password=e.target.value)}}}),s._m(2),s.errorExists("password")?t("p",{staticClass:"help is-danger",domProps:{textContent:s._s(s.getFirstError("password"))}}):s._e()])]),t("div",{staticClass:"field"},[t("label",{staticClass:"label",attrs:{for:"password_confirmation"}},[s._v(s._s(s.$t("auth.subscribe.form-field-pass-confirm")))]),t("div",{staticClass:"control has-icons-left"},[t("input",{directives:[{name:"model",rawName:"v-model",value:s.password_confirmation,expression:"password_confirmation"}],staticClass:"input",class:s.errorExists("password_confirmation")?"is-danger":"",attrs:{type:"password",id:"password_confirmation",name:"password_confirmation",placeholder:"Confirm your Password",required:""},domProps:{value:s.password_confirmation},on:{input:function(e){e.target.composing||(s.password_confirmation=e.target.value)}}}),s._m(3),s.errorExists("password_confirmation")?t("p",{staticClass:"help is-danger",domProps:{textContent:s._s(s.getFirstError("password_confirmation"))}}):s._e()])]),t("p",{staticClass:"mtb1"},[t("input",{directives:[{name:"model",rawName:"v-model",value:s.checkbox,expression:"checkbox"}],staticClass:"filled-in",staticStyle:{"margin-right":"10px"},attrs:{type:"checkbox",name:"ConfirmToS",id:"ConfirmToS"},domProps:{checked:Array.isArray(s.checkbox)?s._i(s.checkbox,null)>-1:s.checkbox},on:{change:function(e){var r=s.checkbox,i=e.target,o=!!i.checked;if(Array.isArray(r)){var l=null,n=s._i(r,l);i.checked?n<0&&(s.checkbox=r.concat([l])):n>-1&&(s.checkbox=r.slice(0,n).concat(r.slice(n+1)))}else s.checkbox=o}}}),t("label",{attrs:{for:"ConfirmToS"},domProps:{innerHTML:s._s(s.$t("auth.subscribe.form-account-conditions"))}})]),t("div",{staticClass:"captcha"},[t("div",[t("vue-recaptcha",{attrs:{sitekey:"6Le9FtwcAAAAAMOImuwEoOYssOVdNf7dfI2x8XZh",loadRecaptchaScript:!0},on:{verify:s.recaptcha},model:{value:s.g_recaptcha_response,callback:function(e){s.g_recaptcha_response=e},expression:"g_recaptcha_response"}})],1),s.errorExists("g-recaptcha-response")?t("p",{staticClass:"help is-danger",domProps:{textContent:s._s(s.getFirstError("g-recaptcha-response"))}}):s._e()]),t("br"),t("div",{staticStyle:{"text-align":"center","padding-bottom":"1em"}},[t("button",{staticClass:"button is-medium is-primary mb1",class:s.processing?"is-loading":"",attrs:{disabled:s.checkDisabled}},[s._v(s._s(s.$t("auth.subscribe.form-btn")))]),t("p",[s._v(s._s(s.$t("auth.subscribe.create-account-note"))+" ")])])])])])},f=[function(){var a=this,s=a._self._c;return s("span",{staticClass:"icon is-small is-left"},[s("i",{staticClass:"fa fa-user"})])},function(){var a=this,s=a._self._c;return s("span",{staticClass:"icon is-small is-left"},[s("i",{staticClass:"fa fa-envelope"})])},function(){var a=this,s=a._self._c;return s("span",{staticClass:"icon is-small is-left"},[s("i",{staticClass:"fa fa-key"})])},function(){var a=this,s=a._self._c;return s("span",{staticClass:"icon is-small is-left"},[s("i",{staticClass:"fa fa-refresh"})])}],h=c(d,u,f,!1,null,null);const _=h.exports,v={name:"Subscribe",components:{CreateAccount:_,Loading:p},async created(){if(window.location.href.includes("?")&&(this.plan=window.location.href.split("?")[1].split("=")[1]),window.location.href.includes("&")){let a=window.location.href.split("&")[1].split("=")[1],s=this.$t("signup."+a+"-title"),t=this.$t("signup."+a+"-subtitle");this.$swal(s,t,a)}await this.$store.dispatch("GET_PLANS")},data(){return{loading:!0,plan:""}}};var b=function(){var s=this,t=s._self._c;return t("div",[t("section",{staticClass:"hero is-info is-medium"},[t("div",{staticClass:"hero-body"},[t("div",{staticClass:"container"},[t("h1",{staticClass:"title"},[s._v(" "+s._s(s.$t("auth.subscribe.title"))+" ")]),t("h2",{staticClass:"subtitle"},[s._v(" "+s._s(s.$t("auth.subscribe.subtitle"))+" ")])])])]),t("section",[t("create-account",{attrs:{plan:s.plan}})],1)])},g=[],C=c(v,b,g,!1,null,"823b903e");const $=C.exports;export{$ as default}; diff --git a/public/build/assets/Supercluster-BNFeeEyK.js b/public/build/assets/Supercluster-6zQlYpaO.js similarity index 99% rename from public/build/assets/Supercluster-BNFeeEyK.js rename to public/build/assets/Supercluster-6zQlYpaO.js index 23a4d70f..4e85c9fc 100644 --- a/public/build/assets/Supercluster-BNFeeEyK.js +++ b/public/build/assets/Supercluster-6zQlYpaO.js @@ -1 +1 @@ -import{n as u,C as Z}from"./app-DuS6KM7M.js";import{M as L,a as $,C as g,Z as I,b as j,L as H}from"./index-Dxbj43yt.js";import{L as s,h as m}from"./mapHelpers-CSfygYu3.js";import{g as B}from"./glify-browser-DAFS8CF1.js";const Y={name:"GlobalMapNotification",props:{color:{type:String,default:"green"}}};var J=function(){var e=this,o=e._self._c;return o("div",{staticClass:"event",class:"event-"+e.color,on:{click:function(n){return e.$emit("click",n)}}},[o("div",{staticClass:"event-image"},[e._t("image")],2),o("div",{staticClass:"event-content"},[e._t("content")],2)])},W=[],q=u(Y,J,W,!1,null,"e06e593a");const v=q.exports,V={name:"CleanupCreated",props:["payload"],components:{GlobalMapNotification:v}};var X=function(){var e=this,o=e._self._c;return o("GlobalMapNotification",{attrs:{color:"green"},on:{click:function(n){return e.$emit("click",n)}},scopedSlots:e._u([{key:"image",fn:function(){return[o("div",{staticClass:"-mt-2"},[o("i",{staticClass:"fa fa-users fa-fw"})])]},proxy:!0},{key:"content",fn:function(){return[o("p",[e._v("Cleanup created")]),o("i",[e._v(e._s(e.$t("home.globalMap.say-hello-to"))+" "),o("strong",[e._v(e._s(e.payload.name))]),e._v("!")])]},proxy:!0}])})},K=[],Q=u(V,X,K,!1,null,"9c29fe7c");const ee=Q.exports,te={name:"ImageUploaded",props:["payload"],data(){return{dir:"/assets/icons/flags/"}},methods:{countryFlag(t){return t?this.dir+t.toLowerCase()+".png":""}},computed:{country(){var t;return(t=this.payload.country)!=null&&t.includes("error_")?null:this.payload.country},state(){var t;return(t=this.payload.state)!=null&&t.includes("error_")?null:this.payload.state},city(){var t;return(t=this.payload.city)!=null&&t.includes("error_")?null:this.payload.city},cityText(){let t=[this.city,this.state].filter(e=>e).join(", ");return t&&this.country&&(t+=", "),t},photoSource(){return this.payload.photoSource==="web"?"fa-desktop":"fa-mobile large-icon"}}};var oe=function(){var e=this,o=e._self._c;return o("div",{staticClass:"event",on:{click:function(n){return e.$emit("click",n)}}},[o("div",{staticClass:"top-heading"},[e.payload.countryCode?o("img",{attrs:{src:e.countryFlag(e.payload.countryCode),alt:e.payload.countryCode}}):o("i",{staticClass:"fa fa-image fa-2x"}),o("div",[o("p",{staticClass:"event-bold"},[e.payload.isPickedUp?o("span",[e._v(e._s(e.$t("home.globalMap.litter-picked-up")))]):o("span",[e._v(e._s(e.$t("home.globalMap.litter-uploaded")))])]),o("p",{staticClass:"event-location"},[o("i",{staticClass:"city-name"},[e._v(e._s(e.cityText))]),e._v(e._s(e.country)+" ")])]),o("div",{staticClass:"event-source"},[o("i",{staticClass:"fa",class:e.photoSource})])]),e.payload.user.name||e.payload.user.username?o("p",[e._v(" "+e._s(e.$t("locations.cityVueMap.by"))+" "),o("span",{staticClass:"event-bold"},[e._v(" "+e._s(e.payload.user.name)+" "+e._s(e.payload.user.username?"@"+e.payload.user.username:"")+" ")])]):e._e(),e.payload.teamName?o("p",{staticClass:"event-team"},[e._v(" "+e._s(e.$t("common.team"))+" "),o("span",{staticClass:"event-bold"},[e._v(e._s(e.payload.teamName))])]):e._e()])},ne=[],se=u(te,oe,ne,!1,null,"a5896d9f");const ae=se.exports,re="/build/assets/mining-Cq36pFOM.png",ie={name:"LittercoinMined",components:{GlobalMapNotification:v},props:["payload"],methods:{getLittercoinReason(t){if(t==="verified-box")return this.$i18n.t("home.globalMap.littercoin-100-boxes-verified");if(t==="100-images-verified")return this.$i18n.t("home.globalMap.littercoin-100-verified")}}};var le=function(){var e=this,o=e._self._c;return o("GlobalMapNotification",{attrs:{color:"littercoin"},on:{click:function(n){return e.$emit("click",n)}},scopedSlots:e._u([{key:"image",fn:function(){return[o("div",{staticClass:"flex items-center h-full"},[o("img",{staticClass:"ltr-icon",attrs:{src:re,alt:"Mining"}})])]},proxy:!0},{key:"content",fn:function(){return[o("div",{staticClass:"flex items-center h-full"},[o("div",[o("p",[e._v(e._s(e.$t("home.globalMap.littercoin-mined")))]),o("i",[e._v(e._s(e.$t("common.reason"))+": "),o("span",{staticClass:"ltr-strong"},[e._v(e._s(e.getLittercoinReason(e.payload.reason)))])])])])]},proxy:!0}])})},ce=[],pe=u(ie,le,ce,!1,null,"6648b6f2");const ue=pe.exports,de={name:"NewCountryAdded",components:{GlobalMapNotification:v},props:["payload"]};var me=function(){var e=this,o=e._self._c;return o("GlobalMapNotification",{attrs:{color:"blue"},on:{click:function(n){return e.$emit("click",n)}},scopedSlots:e._u([{key:"image",fn:function(){return[o("div",{staticClass:"-mt-2"},[o("i",{staticClass:"fa fa-flag fa-fw"})])]},proxy:!0},{key:"content",fn:function(){return[o("strong",[e._v(e._s(e.$t("home.globalMap.new-country")))]),o("p",[e._v(e._s(e.$t("home.globalMap.say-hello-to"))+" "),o("i",[e._v(e._s(e.payload.country))])])]},proxy:!0}])})},he=[],fe=u(de,me,he,!1,null,"538454b0");const _e=fe.exports,ge={name:"NewStateAdded",components:{GlobalMapNotification:v},props:["payload"]};var ve=function(){var e=this,o=e._self._c;return o("GlobalMapNotification",{attrs:{color:"blue"},on:{click:function(n){return e.$emit("click",n)}},scopedSlots:e._u([{key:"image",fn:function(){return[o("div",{staticClass:"-mt-2"},[o("i",{staticClass:"fa fa-flag fa-fw"})])]},proxy:!0},{key:"content",fn:function(){return[o("strong",[e._v(e._s(e.$t("home.globalMap.new-state")))]),o("p",[e._v(e._s(e.$t("home.globalMap.say-hello-to"))+" "),o("i",[e._v(e._s(e.payload.state))])])]},proxy:!0}])})},ye=[],Ce=u(ge,ve,ye,!1,null,"ee01ceee");const Le=Ce.exports,we={name:"NewCityAdded",components:{GlobalMapNotification:v},props:["payload"]};var be=function(){var e=this,o=e._self._c;return o("GlobalMapNotification",{attrs:{color:"blue"},on:{click:function(n){return e.$emit("click",n)}},scopedSlots:e._u([{key:"image",fn:function(){return[o("div",{staticClass:"-mt-2"},[o("i",{staticClass:"fa fa-flag fa-fw"})])]},proxy:!0},{key:"content",fn:function(){return[o("strong",[e._v(e._s(e.$t("home.globalMap.new-city")))]),o("p",[e._v(e._s(e.$t("home.globalMap.say-hello-to"))+" "),o("i",[e._v(e._s(e.payload.city))])])]},proxy:!0}])})},$e=[],ke=u(we,be,$e,!1,null,"03289d8a");const Se=ke.exports,Me={name:"TeamCreated",components:{GlobalMapNotification:v},props:["payload"]};var Te=function(){var e=this,o=e._self._c;return o("GlobalMapNotification",{attrs:{color:"colourful"},on:{click:function(n){return e.$emit("click",n)}},scopedSlots:e._u([{key:"image",fn:function(){return[o("div",{staticClass:"-mt-2"},[o("i",{staticClass:"fa fa-users fa-fw"})])]},proxy:!0},{key:"content",fn:function(){return[o("p",[e._v(e._s(e.$t("home.globalMap.team-created")))]),o("i",[e._v(e._s(e.$t("home.globalMap.say-hello-to"))+" "),o("strong",[e._v(e._s(e.payload.teamName))]),e._v("!")])]},proxy:!0}])})},Ee=[],Oe=u(Me,Te,Ee,!1,null,"a390effa");const Ue=Oe.exports,Pe={name:"UserSignedUp",props:["payload"],components:{GlobalMapNotification:v}};var xe=function(){var e=this,o=e._self._c;return o("GlobalMapNotification",{attrs:{color:"yellow"},on:{click:function(n){return e.$emit("click",n)}},scopedSlots:e._u([{key:"image",fn:function(){return[o("div",{staticClass:"-mt-2"},[o("i",{staticClass:"fa fa-user fa-fw"})])]},proxy:!0},{key:"content",fn:function(){return[o("strong",[e._v(e._s(e.$t("home.globalMap.new-user")))]),o("p",[e._v(e._s(e.$t("home.globalMap.user-signed-up")))])]},proxy:!0}])})},De=[],Ge=u(Pe,xe,De,!1,null,"fd609b30");const Ie=Ge.exports,Ne={name:"live-events",components:{CleanupCreated:ee,ImageUploaded:ae,LittercoinMined:ue,NewCityAdded:Se,NewStateAdded:Le,NewCountryAdded:_e,TeamCreated:Ue,UserSignedUp:Ie},data(){return{events:[],clicks:0,timer:null}},created(){this.listenForEvents()},methods:{addEvent(t,e){this.events.unshift({id:new Date().getTime(),type:t,payload:e}),this.updateDocumentTitle()},click(t,e){this.clicks++,this.clicks===1?this.timer=setTimeout(()=>{this.flyToLocation(t),this.clicks=0},300):(clearTimeout(this.timer),this.removeEvent(e),this.clicks=0)},listenForEvents(){Echo.channel("main").listen(".App\\Events\\Cleanups\\CleanupCreated",t=>{this.addEvent("CleanupCreated",t)}).listen("ImageUploaded",t=>{this.addEvent("ImageUploaded",t)}).listen("NewCountryAdded",t=>{this.addEvent("NewCountryAdded",t)}).listen("NewStateAdded",t=>{this.addEvent("NewStateAdded",t)}).listen("NewCityAdded",t=>{this.addEvent("NewCityAdded",t)}).listen(".App\\Events\\Littercoin\\LittercoinMined",t=>{this.addEvent("LittercoinMined",t)}).listen("TeamCreated",t=>{this.addEvent("TeamCreated",t)}).listen("UserSignedUp",t=>{this.addEvent("UserSignedUp",t.now)})},flyToLocation(t){var e,o;(e=t.payload)!=null&&e.latitude&&((o=t.payload)!=null&&o.longitude)&&this.$emit("fly-to-location",{...t.payload,zoom:17})},removeEvent(t){this.events.splice(t,1),this.updateDocumentTitle()},updateDocumentTitle(){document.title=this.events.length>0?"("+this.events.length+") OpenLitterMap":"OpenLitterMap"}}};var Re=function(){var e=this,o=e._self._c;return o("div",{staticClass:"sidebar-menu scrollbar-hidden"},[o("transition-group",{attrs:{name:"list",mode:"out-in"}},e._l(e.events,function(n,l){return o("span",{key:n.id,staticClass:"list-item"},[o(n.type,{tag:"component",attrs:{payload:n.payload},on:{click:function(r){return e.click(n,l)}}})],1)}),0)],1)},Fe=[],Ae=u(Ne,Re,Fe,!1,null,null);const ze=Ae.exports,Ze={name:"SearchCustomTags",created(){this.debouncedInputHandler=this.debounce(this.searchForTags)},directives:{ClickOutside:Z},data(){return{search:"",open:!1,processing:!1,selectedTags:[]}},computed:{customTags(){return this.$store.state.globalmap.customTagsFound}},methods:{closeContainer(){this.open=!1},debounce(t){let e;return function(...o){clearTimeout(e),e=setTimeout(()=>{t.apply(this,o)},1e3)}},loadCustomTag(t){window.open("https://openlittermap.com/tags?custom_tags="+t)},async searchForTags(){this.processing=!0,await this.$store.dispatch("SEARCH_CUSTOM_TAGS",this.search),this.processing=!1}}};var je=function(){var e=this,o=e._self._c;return o("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.closeContainer,expression:"closeContainer"}],staticClass:"outer-container"},[o("div",{staticClass:"inner-container"},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.search,expression:"search"}],staticClass:"input",attrs:{id:"search-custom-tags",placeholder:"Search custom tags"},domProps:{value:e.search},on:{click:function(n){e.open=!0},input:[function(n){n.target.composing||(e.search=n.target.value)},e.debouncedInputHandler]}}),e.open?o("div",{staticClass:"tags-container"},[e.customTags.length?e._l(this.customTags,function(n){return o("div",{staticClass:"tag-selection",on:{click:function(l){return e.loadCustomTag(n.tag)}}},[o("p",[e._v(e._s(n.tag)+" ("+e._s(n.total)+")")])])}):o("p",[e._v(" No results found. Try again later! ")])],2):e._e()])])},He=[],Be=u(Ze,je,He,!1,null,"539139af");const Ye=Be.exports,Je={initialize:function(){s.Control.Select=s.Control.extend({options:{position:"topright",iconMain:"≡",iconChecked:"◉",iconUnchecked:"ⵔ",iconGroupChecked:"▶",iconGroupUnchecked:"⊳",multi:!1,items:[],id:"",selectedDefault:!1,additionalClass:"",onOpen:()=>{},onClose:()=>{},onGroupOpen:t=>{},onSelect:t=>{}},initialize(t){this.menus=[],s.Util.setOptions(this,t);const e=this.options;this.options.items.forEach(r=>{r.label||(r.label=r.value)}),e.multi?e.selectedDefault=e.selectedDefault instanceof Array?e.selectedDefault:[]:e.selectedDefault=e.selectedDefault||(e.items instanceof Array&&e.items.length>0?e.items[0].value:!1),console.log(e.selectedDefault),this.state={selected:e.selectedDefault,open:!1};const o=r=>{this._isGroup(r)&&r.items.map(i=>{i.parent=r.value,o(i)})};this.options.items.map(r=>{r.parent="top",o(r)});const n=r=>{let i=[];return this._isGroup(r)&&r.items.map(c=>{i.push(c.value),i=i.concat(n(c))}),i},l=r=>{r.children=n(r),this._isGroup(r)&&r.items.map(i=>{l(i)})};this.options.items.map(r=>{l(r)})},onAdd(t){this.map=t;const e=this.options;this.container=s.DomUtil.create("div","leaflet-control leaflet-bar leaflet-control-select"),this.container.setAttribute("id",e.id);const o=s.DomUtil.create("a","leaflet-control-button ",this.container);return o.innerHTML=e.iconMain,t.on("click",this._hideMenu,this),s.DomEvent.on(o,"click",s.DomEvent.stop),s.DomEvent.on(o,"click",this._iconClicked,this),s.DomEvent.disableClickPropagation(this.container),s.DomEvent.disableScrollPropagation(this.container),this.render(),this.container},_emit(t,e){const o={};switch(t){case"ITEM_SELECT":this.options.multi?(o.selected=this.state.selected.slice(),this.state.selected.includes(e.item.value)?o.selected=o.selected.filter(n=>n!==e.item.value):o.selected.push(e.item.value)):o.selected=e.item.value,o.open=e.item.parent;break;case"GROUP_OPEN":o.open=e.item.value;break;case"GROUP_CLOSE":o.open=e.item.parent;break;case"MENU_OPEN":o.open="top";break;case"MENU_CLOSE":o.open=!1;break}this._setState(o),this.render()},_setState(t){this.options.onSelect&&t.selected&&(this.options.multi&&t.selected.length!==this.state.selected.length||!this.options.multi&&t.selected!==this.state.selected)&&this.options.onSelect(t.selected),this.options.onGroupOpen&&t.open&&t.open!==this.state.open&&(console.log("group open"),this.options.onGroupOpen(t.open)),this.options.onOpen&&t.open==="top"&&this.options.onOpen(),this.options.onClose&&!t.open&&this.options.onClose(),this.state=Object.assign(this.state,t)},_isGroup(t){return"items"in t},_isSelected(t){const e=this.state.selected;return e?this._isGroup(t)?"children"in t?this.options.multi?e.find(o=>t.children.includes(o)):t.children.includes(e):!1:this.options.multi?e.indexOf(t.value)>-1:e===t.value:!1},_isOpen(t){const e=this.state.open;return e&&(e===t.value||t.children.includes(e))},_hideMenu(){this._emit("MENU_CLOSE",{})},_iconClicked(){this._emit("MENU_OPEN",{})},_itemClicked(t){this._isGroup(t)?this.state.open===t.value?this._emit("GROUP_CLOSE",{item:t}):this._emit("GROUP_OPEN",{item:t}):this._emit("ITEM_SELECT",{item:t})},_renderRadioIcon(t,e){const o=s.DomUtil.create("span","radio icon",e);o.innerHTML=t?this.options.iconChecked:this.options.iconUnchecked},_renderGroupIcon(t,e){const o=s.DomUtil.create("span","group icon",e);o.innerHTML=t?this.options.iconGroupChecked:this.options.iconGroupUnchecked},_renderItem(t,e){const o=this._isSelected(t),n=s.DomUtil.create("div","leaflet-control-select-menu-line",e),l=s.DomUtil.create("div","leaflet-control-select-menu-line-content",n),r=s.DomUtil.create("span","text",l);return r.innerHTML=t.label,this._isGroup(t)?(this._renderGroupIcon(o,l),s.DomUtil.addClass(n,"group"),this._isOpen(t)&&s.DomUtil.addClass(n,"group-opened"),this._isOpen(t)&&this._renderMenu(n,t.items)):this._renderRadioIcon(o,l),s.DomEvent.addListener(l,"click",i=>{this._itemClicked(t)}),n},_renderMenu(t,e){const o=s.DomUtil.create("div","leaflet-control-select-menu leaflet-bar ",t);this.menus.push(o),e.map(n=>{this._renderItem(n,o)})},_clearMenus(){this.menus.map(t=>t.remove()),this.meus=[]},render(){this._clearMenus(),this.state.open&&this._renderMenu(this.container,this.options.items)},close(){this._hideMenu()}}),s.control.select=t=>new s.Control.Select(t)}};var a,f,k,U,_,y=L,S,M=null,w,C,T=!1,E=!1;const P=s.icon({iconUrl:"/images/vendor/leaflet/dist/dot.png",iconSize:[10,10]}),F=s.icon({iconUrl:"/images/vendor/leaflet/dist/grey-dot.jpg",iconSize:[13,10]});function We(t,e){const o=[e.lng,e.lat];return t.properties.verified===2?s.marker(o,{icon:P}):s.marker(o,{icon:F})}function N(t,e){return s.marker(e,{icon:P})}function qe(t,e){if(!t.properties.cluster)return t.properties.verified===2?s.marker(e,{icon:P}):s.marker(e,{icon:F});const o=t.properties.point_count,n=o'+t.properties.point_count_abbreviated+"",className:"marker-cluster-"+n,iconSize:s.point(40,40)});return s.marker(e,{icon:l})}function R(){T&&(a.removeControl(w),T=!1),E||(C=s.control.layers(null,null).addTo(a),C.addOverlay(f,"Global"),C.addOverlay(U,"Litter Art"),S&&C.addOverlay(S,"Cleanups"),k&&C.addOverlay(k,"Merchants"),E=!0)}function Ve(){if(E&&(a.removeControl(C),E=!1),!T){const t={Alcohol:new s.LayerGroup,Brands:new s.LayerGroup,Coastal:new s.LayerGroup,Coffee:new s.LayerGroup,Dumping:new s.LayerGroup,Food:new s.LayerGroup,Industrial:new s.LayerGroup,Other:new s.LayerGroup,PetSurprise:new s.LayerGroup,Sanitary:new s.LayerGroup,Smoking:new s.LayerGroup,SoftDrinks:new s.LayerGroup};w=s.control.layers(null,t).addTo(a),T=!0}}function Xe(t,e){t.properties.cluster&&e.on("click",function(o){const n=a.getZoom()+I>$?$:a.getZoom()+I;a.flyTo(o.latlng,n,{animate:!0,duration:2})})}function Ke(t,e){e.on("click",function(o){a.flyTo(t.geometry.coordinates,14,{animate:!0,duration:10});const n=new URL(window.location.href);n.searchParams.set("lat",t.geometry.coordinates[0]),n.searchParams.set("lon",t.geometry.coordinates[1]),n.searchParams.set("zoom",g),n.searchParams.set("photo",t.properties.photo_id),s.popup(m.popupOptions).setLatLng(t.geometry.coordinates).setContent(m.getMapImagePopupContent(t.properties,n.toString())).openOn(a)})}function Qe(t,e){e.on("click",function(o){const n=[t.geometry.coordinates[1],t.geometry.coordinates[0]];a.flyTo(n,14,{animate:!0,duration:10});const l=m.getCleanupContent(t.properties,M);s.popup(m.popupOptions).setLatLng(n).setContent(l).openOn(a)})}function et(t,e){e.on("click",function(o){const n=[t.geometry.coordinates[1],t.geometry.coordinates[0]];a.flyTo(n,14,{animate:!0,duration:10});const l=m.getMerchantContent(t.properties,M);s.popup(m.popupOptions).setLatLng(n).setContent(l).openOn(a),new Swiper(".swiper-container",{navigation:{prevEl:"#prevButton",nextEl:"#nextButton"}})})}function tt(){let t=[];return w._layerControlInputs.forEach((e,o)=>{if(e.checked){const n=w._layers[o].name.toLowerCase()==="petsurprise"?"dogshit":w._layers[o].name.toLowerCase();t.push(n)}}),t.length>0?t:null}const ot={name:"Supercluster",components:{SearchCustomTags:Ye,LiveEvents:ze},props:{activeLayer:{default:"clusters",required:!1}},data(){return{visiblePoints:[]}},mounted(){var n,l,r;window.olm_map=this,a=s.map("openlittermap",{center:[0,0],zoom:L,scrollWheelZoom:!1,smoothWheelZoom:!0,smoothSensitivity:2}),a.scrollWheelZoom=!0,this.flyToLocationFromURL();const e=new Date().getFullYear();if(s.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"Map data © "+'OpenStreetMap'+" & Contributors",maxZoom:$,minZoom:L}).addTo(a),a.attributionControl.addAttribution("Litter data © OpenLitterMap & Contributors "+e+" Clustering @ MapBox"),f=s.geoJSON(null,{pointToLayer:qe,onEachFeature:Xe}),(n=this.$store.state.globalmap.geojson)!=null&&n.features&&f.addData(this.$store.state.globalmap.geojson.features),this.activeLayer==="clusters"&&f.addTo(a),U=s.geoJSON(null,{pointToLayer:We,onEachFeature:Ke}),(r=(l=this.$store.state.globalmap)==null?void 0:l.artData)!=null&&r.features&&U.addData(this.$store.state.globalmap.artData.features),this.$store.state.cleanups.geojson&&(S=s.geoJSON(this.$store.state.cleanups.geojson,{onEachFeature:Qe,pointToLayer:N})),this.activeLayer==="cleanups"&&(S.addTo(a),a.on("click",function(i){const c=i.latlng.lat,p=i.latlng.lng;window.olm_map.$store.commit("setCleanupLocation",{lat:c,lng:p})}),this.$route.params.hasOwnProperty("invite_link"))){const i=this.$store.state.cleanups.cleanup,c=[i.lat,i.lon];a.flyTo(c,16,{animate:!0,duration:5});const p=this.$store.state.user.auth?this.$store.state.user.user.id:null;s.popup(m.popupOptions).setLatLng(c).setContent(m.getCleanupContent(i,p)).openOn(a)}this.$store.state.user.auth&&(M=this.$store.state.user.user.id),Object.keys(this.$store.state.merchants.geojson).length>0&&(k=s.geoJSON(this.$store.state.merchants.geojson,{onEachFeature:et,pointToLayer:N})),this.activeLayer==="merchants"&&(k.addTo(a),a.on("click",function(i){const c=i.latlng.lat,p=i.latlng.lng;window.olm_map.$store.commit("setMerchantLocation",{lat:c,lng:p})})),this.$store.state.user.auth&&(M=this.$store.state.user.user.id),a.on("moveend",this.update),R(),a.on("overlayadd",this.update),a.on("overlayremove",this.update),a.on("popupopen",m.scrollPopupToBottom),a.on("popupclose",()=>{const i=new URL(window.location.href);i.searchParams.delete("photo"),window.history.pushState(null,"",i)}),a.on("zoom",()=>{_!=null&&_.remove&&_.remove()}),this.setupYearDropdown()},methods:{async update(){this.updateLocationInURL();const t=a.getBounds(),e={left:t.getWest(),bottom:t.getSouth(),right:t.getEast(),top:t.getNorth()},o=Math.round(a.getZoom());if(o===2&&o===y||o===3&&o===y||o===4&&o===y||o===5&&o===y)return;_&&(f.clearLayers(),_.remove());const n=new URLSearchParams(window.location.search),l=parseInt(n.get("year"))||null,r=n.get("fromDate")||null,i=n.get("toDate")||null,c=n.get("username")||null;if(o{console.log("get_clusters.update",d),f.clearLayers(),f.addData(d.data)}).catch(d=>{console.error("get_clusters.update",d)})}else{Ve();const p=tt();await axios.get("/global/points",{params:{zoom:o,bbox:e,layers:p,year:l,fromDate:r,toDate:i,username:c}}).then(d=>{console.log("get_global_points",d),this.visiblePoints=d.data.features,y[h.geometry.coordinates[0],h.geometry.coordinates[1]]);_=B.points({map:a,data:A,size:10,color:{r:.054,g:.819,b:.27,a:1},click:(h,b,rt)=>{const O=d.data.features.find(G=>G.geometry.coordinates[0]===b[0]&&G.geometry.coordinates[1]===b[1]);if(!O)return;const D=new URL(window.location.href);return D.searchParams.set("photo",O.properties.photo_id),window.history.pushState(null,"",D),this.renderLeafletPopup(O,h.latlng)}});let z=new URLSearchParams(window.location.search),x=parseInt(z.get("photo"));if(x){if(!this.visiblePoints.length)return;const h=this.visiblePoints.find(b=>b.properties.photo_id===x);h&&this.renderLeafletPopup(h,[h.geometry.coordinates[0],h.geometry.coordinates[1]])}}).catch(d=>{console.error("get_global_points",d)})}y=o},renderLeafletPopup(t,e){const o=new URL(window.location.href);o.searchParams.set("lat",t.geometry.coordinates[0]),o.searchParams.set("lon",t.geometry.coordinates[1]),o.searchParams.set("zoom",g),o.searchParams.set("photo",t.properties.photo_id),s.popup(m.popupOptions).setLatLng(e).setContent(m.getMapImagePopupContent(t.properties,o.toString())).openOn(a)},flyToLocationFromURL(){let t=new URLSearchParams(window.location.search),e=parseFloat(t.get("lat")||0),o=parseFloat(t.get("lon")||0),n=parseFloat(t.get("zoom")||L),l=parseInt(t.get("photo"));e=e<-85||e>85?0:e,o=o<-180||o>180?0:o,n=n<2||n>$?L:n,!(e===0&&o===0&&n===2)&&this.flyToLocation({latitude:e,longitude:o,zoom:n,photoId:l})},updateUrlPhotoIdAndFlyToLocation(t){const e=Math.round(a.getZoom()),o=new URL(window.location.href);o.searchParams.set("photo",t.photoId),window.history.pushState(null,"",o);const n=a.distance(a.getCenter(),[t.latitude,t.longitude]);e>=g&&n<=2e3?this.flyToLocation({...t,duration:1}):this.flyToLocation(t)},flyToLocation(t){const e=s.latLng(t.latitude,t.longitude),o=t.photoId&&Math.round(t.zoom)=2017;o--)t.push({label:o.toString(),value:o.toString()});let e=parseInt(new URLSearchParams(window.location.search).get("year"))||"*";s.control.select({position:"topleft",selectedDefault:e.toString(),items:t,onSelect:function(o){const n=new URL(window.location.href);o==="*"?n.searchParams.delete("year"):n.searchParams.set("year",o),window.history.pushState(null,"",n),window.location.reload()}}).addTo(a)}}};var nt=function(){var e=this,o=e._self._c;return o("div",{staticClass:"h100"},[o("div",{ref:"openlittermap",attrs:{id:"openlittermap"}}),o("SearchCustomTags"),o("LiveEvents",{on:{"fly-to-location":e.updateUrlPhotoIdAndFlyToLocation}})],1)},st=[],at=u(ot,nt,st,!1,null,null);const ut=at.exports;export{ut as S}; +import{n as u,C as Z}from"./app-BwSojYvl.js";import{M as L,a as $,C as g,Z as I,b as j,L as H}from"./index-Dxbj43yt.js";import{L as s,h as m}from"./mapHelpers-DmBbMbJe.js";import{g as B}from"./glify-browser-BLn8SaeM.js";const Y={name:"GlobalMapNotification",props:{color:{type:String,default:"green"}}};var J=function(){var e=this,o=e._self._c;return o("div",{staticClass:"event",class:"event-"+e.color,on:{click:function(n){return e.$emit("click",n)}}},[o("div",{staticClass:"event-image"},[e._t("image")],2),o("div",{staticClass:"event-content"},[e._t("content")],2)])},W=[],q=u(Y,J,W,!1,null,"e06e593a");const v=q.exports,V={name:"CleanupCreated",props:["payload"],components:{GlobalMapNotification:v}};var X=function(){var e=this,o=e._self._c;return o("GlobalMapNotification",{attrs:{color:"green"},on:{click:function(n){return e.$emit("click",n)}},scopedSlots:e._u([{key:"image",fn:function(){return[o("div",{staticClass:"-mt-2"},[o("i",{staticClass:"fa fa-users fa-fw"})])]},proxy:!0},{key:"content",fn:function(){return[o("p",[e._v("Cleanup created")]),o("i",[e._v(e._s(e.$t("home.globalMap.say-hello-to"))+" "),o("strong",[e._v(e._s(e.payload.name))]),e._v("!")])]},proxy:!0}])})},K=[],Q=u(V,X,K,!1,null,"9c29fe7c");const ee=Q.exports,te={name:"ImageUploaded",props:["payload"],data(){return{dir:"/assets/icons/flags/"}},methods:{countryFlag(t){return t?this.dir+t.toLowerCase()+".png":""}},computed:{country(){var t;return(t=this.payload.country)!=null&&t.includes("error_")?null:this.payload.country},state(){var t;return(t=this.payload.state)!=null&&t.includes("error_")?null:this.payload.state},city(){var t;return(t=this.payload.city)!=null&&t.includes("error_")?null:this.payload.city},cityText(){let t=[this.city,this.state].filter(e=>e).join(", ");return t&&this.country&&(t+=", "),t},photoSource(){return this.payload.photoSource==="web"?"fa-desktop":"fa-mobile large-icon"}}};var oe=function(){var e=this,o=e._self._c;return o("div",{staticClass:"event",on:{click:function(n){return e.$emit("click",n)}}},[o("div",{staticClass:"top-heading"},[e.payload.countryCode?o("img",{attrs:{src:e.countryFlag(e.payload.countryCode),alt:e.payload.countryCode}}):o("i",{staticClass:"fa fa-image fa-2x"}),o("div",[o("p",{staticClass:"event-bold"},[e.payload.isPickedUp?o("span",[e._v(e._s(e.$t("home.globalMap.litter-picked-up")))]):o("span",[e._v(e._s(e.$t("home.globalMap.litter-uploaded")))])]),o("p",{staticClass:"event-location"},[o("i",{staticClass:"city-name"},[e._v(e._s(e.cityText))]),e._v(e._s(e.country)+" ")])]),o("div",{staticClass:"event-source"},[o("i",{staticClass:"fa",class:e.photoSource})])]),e.payload.user.name||e.payload.user.username?o("p",[e._v(" "+e._s(e.$t("locations.cityVueMap.by"))+" "),o("span",{staticClass:"event-bold"},[e._v(" "+e._s(e.payload.user.name)+" "+e._s(e.payload.user.username?"@"+e.payload.user.username:"")+" ")])]):e._e(),e.payload.teamName?o("p",{staticClass:"event-team"},[e._v(" "+e._s(e.$t("common.team"))+" "),o("span",{staticClass:"event-bold"},[e._v(e._s(e.payload.teamName))])]):e._e()])},ne=[],se=u(te,oe,ne,!1,null,"a5896d9f");const ae=se.exports,re="/build/assets/mining-Cq36pFOM.png",ie={name:"LittercoinMined",components:{GlobalMapNotification:v},props:["payload"],methods:{getLittercoinReason(t){if(t==="verified-box")return this.$i18n.t("home.globalMap.littercoin-100-boxes-verified");if(t==="100-images-verified")return this.$i18n.t("home.globalMap.littercoin-100-verified")}}};var le=function(){var e=this,o=e._self._c;return o("GlobalMapNotification",{attrs:{color:"littercoin"},on:{click:function(n){return e.$emit("click",n)}},scopedSlots:e._u([{key:"image",fn:function(){return[o("div",{staticClass:"flex items-center h-full"},[o("img",{staticClass:"ltr-icon",attrs:{src:re,alt:"Mining"}})])]},proxy:!0},{key:"content",fn:function(){return[o("div",{staticClass:"flex items-center h-full"},[o("div",[o("p",[e._v(e._s(e.$t("home.globalMap.littercoin-mined")))]),o("i",[e._v(e._s(e.$t("common.reason"))+": "),o("span",{staticClass:"ltr-strong"},[e._v(e._s(e.getLittercoinReason(e.payload.reason)))])])])])]},proxy:!0}])})},ce=[],pe=u(ie,le,ce,!1,null,"6648b6f2");const ue=pe.exports,de={name:"NewCountryAdded",components:{GlobalMapNotification:v},props:["payload"]};var me=function(){var e=this,o=e._self._c;return o("GlobalMapNotification",{attrs:{color:"blue"},on:{click:function(n){return e.$emit("click",n)}},scopedSlots:e._u([{key:"image",fn:function(){return[o("div",{staticClass:"-mt-2"},[o("i",{staticClass:"fa fa-flag fa-fw"})])]},proxy:!0},{key:"content",fn:function(){return[o("strong",[e._v(e._s(e.$t("home.globalMap.new-country")))]),o("p",[e._v(e._s(e.$t("home.globalMap.say-hello-to"))+" "),o("i",[e._v(e._s(e.payload.country))])])]},proxy:!0}])})},he=[],fe=u(de,me,he,!1,null,"538454b0");const _e=fe.exports,ge={name:"NewStateAdded",components:{GlobalMapNotification:v},props:["payload"]};var ve=function(){var e=this,o=e._self._c;return o("GlobalMapNotification",{attrs:{color:"blue"},on:{click:function(n){return e.$emit("click",n)}},scopedSlots:e._u([{key:"image",fn:function(){return[o("div",{staticClass:"-mt-2"},[o("i",{staticClass:"fa fa-flag fa-fw"})])]},proxy:!0},{key:"content",fn:function(){return[o("strong",[e._v(e._s(e.$t("home.globalMap.new-state")))]),o("p",[e._v(e._s(e.$t("home.globalMap.say-hello-to"))+" "),o("i",[e._v(e._s(e.payload.state))])])]},proxy:!0}])})},ye=[],Ce=u(ge,ve,ye,!1,null,"ee01ceee");const Le=Ce.exports,we={name:"NewCityAdded",components:{GlobalMapNotification:v},props:["payload"]};var be=function(){var e=this,o=e._self._c;return o("GlobalMapNotification",{attrs:{color:"blue"},on:{click:function(n){return e.$emit("click",n)}},scopedSlots:e._u([{key:"image",fn:function(){return[o("div",{staticClass:"-mt-2"},[o("i",{staticClass:"fa fa-flag fa-fw"})])]},proxy:!0},{key:"content",fn:function(){return[o("strong",[e._v(e._s(e.$t("home.globalMap.new-city")))]),o("p",[e._v(e._s(e.$t("home.globalMap.say-hello-to"))+" "),o("i",[e._v(e._s(e.payload.city))])])]},proxy:!0}])})},$e=[],ke=u(we,be,$e,!1,null,"03289d8a");const Se=ke.exports,Me={name:"TeamCreated",components:{GlobalMapNotification:v},props:["payload"]};var Te=function(){var e=this,o=e._self._c;return o("GlobalMapNotification",{attrs:{color:"colourful"},on:{click:function(n){return e.$emit("click",n)}},scopedSlots:e._u([{key:"image",fn:function(){return[o("div",{staticClass:"-mt-2"},[o("i",{staticClass:"fa fa-users fa-fw"})])]},proxy:!0},{key:"content",fn:function(){return[o("p",[e._v(e._s(e.$t("home.globalMap.team-created")))]),o("i",[e._v(e._s(e.$t("home.globalMap.say-hello-to"))+" "),o("strong",[e._v(e._s(e.payload.teamName))]),e._v("!")])]},proxy:!0}])})},Ee=[],Oe=u(Me,Te,Ee,!1,null,"a390effa");const Ue=Oe.exports,Pe={name:"UserSignedUp",props:["payload"],components:{GlobalMapNotification:v}};var xe=function(){var e=this,o=e._self._c;return o("GlobalMapNotification",{attrs:{color:"yellow"},on:{click:function(n){return e.$emit("click",n)}},scopedSlots:e._u([{key:"image",fn:function(){return[o("div",{staticClass:"-mt-2"},[o("i",{staticClass:"fa fa-user fa-fw"})])]},proxy:!0},{key:"content",fn:function(){return[o("strong",[e._v(e._s(e.$t("home.globalMap.new-user")))]),o("p",[e._v(e._s(e.$t("home.globalMap.user-signed-up")))])]},proxy:!0}])})},De=[],Ge=u(Pe,xe,De,!1,null,"fd609b30");const Ie=Ge.exports,Ne={name:"live-events",components:{CleanupCreated:ee,ImageUploaded:ae,LittercoinMined:ue,NewCityAdded:Se,NewStateAdded:Le,NewCountryAdded:_e,TeamCreated:Ue,UserSignedUp:Ie},data(){return{events:[],clicks:0,timer:null}},created(){this.listenForEvents()},methods:{addEvent(t,e){this.events.unshift({id:new Date().getTime(),type:t,payload:e}),this.updateDocumentTitle()},click(t,e){this.clicks++,this.clicks===1?this.timer=setTimeout(()=>{this.flyToLocation(t),this.clicks=0},300):(clearTimeout(this.timer),this.removeEvent(e),this.clicks=0)},listenForEvents(){Echo.channel("main").listen(".App\\Events\\Cleanups\\CleanupCreated",t=>{this.addEvent("CleanupCreated",t)}).listen("ImageUploaded",t=>{this.addEvent("ImageUploaded",t)}).listen("NewCountryAdded",t=>{this.addEvent("NewCountryAdded",t)}).listen("NewStateAdded",t=>{this.addEvent("NewStateAdded",t)}).listen("NewCityAdded",t=>{this.addEvent("NewCityAdded",t)}).listen(".App\\Events\\Littercoin\\LittercoinMined",t=>{this.addEvent("LittercoinMined",t)}).listen("TeamCreated",t=>{this.addEvent("TeamCreated",t)}).listen("UserSignedUp",t=>{this.addEvent("UserSignedUp",t.now)})},flyToLocation(t){var e,o;(e=t.payload)!=null&&e.latitude&&((o=t.payload)!=null&&o.longitude)&&this.$emit("fly-to-location",{...t.payload,zoom:17})},removeEvent(t){this.events.splice(t,1),this.updateDocumentTitle()},updateDocumentTitle(){document.title=this.events.length>0?"("+this.events.length+") OpenLitterMap":"OpenLitterMap"}}};var Re=function(){var e=this,o=e._self._c;return o("div",{staticClass:"sidebar-menu scrollbar-hidden"},[o("transition-group",{attrs:{name:"list",mode:"out-in"}},e._l(e.events,function(n,l){return o("span",{key:n.id,staticClass:"list-item"},[o(n.type,{tag:"component",attrs:{payload:n.payload},on:{click:function(r){return e.click(n,l)}}})],1)}),0)],1)},Fe=[],Ae=u(Ne,Re,Fe,!1,null,null);const ze=Ae.exports,Ze={name:"SearchCustomTags",created(){this.debouncedInputHandler=this.debounce(this.searchForTags)},directives:{ClickOutside:Z},data(){return{search:"",open:!1,processing:!1,selectedTags:[]}},computed:{customTags(){return this.$store.state.globalmap.customTagsFound}},methods:{closeContainer(){this.open=!1},debounce(t){let e;return function(...o){clearTimeout(e),e=setTimeout(()=>{t.apply(this,o)},1e3)}},loadCustomTag(t){window.open("https://openlittermap.com/tags?custom_tags="+t)},async searchForTags(){this.processing=!0,await this.$store.dispatch("SEARCH_CUSTOM_TAGS",this.search),this.processing=!1}}};var je=function(){var e=this,o=e._self._c;return o("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.closeContainer,expression:"closeContainer"}],staticClass:"outer-container"},[o("div",{staticClass:"inner-container"},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.search,expression:"search"}],staticClass:"input",attrs:{id:"search-custom-tags",placeholder:"Search custom tags"},domProps:{value:e.search},on:{click:function(n){e.open=!0},input:[function(n){n.target.composing||(e.search=n.target.value)},e.debouncedInputHandler]}}),e.open?o("div",{staticClass:"tags-container"},[e.customTags.length?e._l(this.customTags,function(n){return o("div",{staticClass:"tag-selection",on:{click:function(l){return e.loadCustomTag(n.tag)}}},[o("p",[e._v(e._s(n.tag)+" ("+e._s(n.total)+")")])])}):o("p",[e._v(" No results found. Try again later! ")])],2):e._e()])])},He=[],Be=u(Ze,je,He,!1,null,"539139af");const Ye=Be.exports,Je={initialize:function(){s.Control.Select=s.Control.extend({options:{position:"topright",iconMain:"≡",iconChecked:"◉",iconUnchecked:"ⵔ",iconGroupChecked:"▶",iconGroupUnchecked:"⊳",multi:!1,items:[],id:"",selectedDefault:!1,additionalClass:"",onOpen:()=>{},onClose:()=>{},onGroupOpen:t=>{},onSelect:t=>{}},initialize(t){this.menus=[],s.Util.setOptions(this,t);const e=this.options;this.options.items.forEach(r=>{r.label||(r.label=r.value)}),e.multi?e.selectedDefault=e.selectedDefault instanceof Array?e.selectedDefault:[]:e.selectedDefault=e.selectedDefault||(e.items instanceof Array&&e.items.length>0?e.items[0].value:!1),console.log(e.selectedDefault),this.state={selected:e.selectedDefault,open:!1};const o=r=>{this._isGroup(r)&&r.items.map(i=>{i.parent=r.value,o(i)})};this.options.items.map(r=>{r.parent="top",o(r)});const n=r=>{let i=[];return this._isGroup(r)&&r.items.map(c=>{i.push(c.value),i=i.concat(n(c))}),i},l=r=>{r.children=n(r),this._isGroup(r)&&r.items.map(i=>{l(i)})};this.options.items.map(r=>{l(r)})},onAdd(t){this.map=t;const e=this.options;this.container=s.DomUtil.create("div","leaflet-control leaflet-bar leaflet-control-select"),this.container.setAttribute("id",e.id);const o=s.DomUtil.create("a","leaflet-control-button ",this.container);return o.innerHTML=e.iconMain,t.on("click",this._hideMenu,this),s.DomEvent.on(o,"click",s.DomEvent.stop),s.DomEvent.on(o,"click",this._iconClicked,this),s.DomEvent.disableClickPropagation(this.container),s.DomEvent.disableScrollPropagation(this.container),this.render(),this.container},_emit(t,e){const o={};switch(t){case"ITEM_SELECT":this.options.multi?(o.selected=this.state.selected.slice(),this.state.selected.includes(e.item.value)?o.selected=o.selected.filter(n=>n!==e.item.value):o.selected.push(e.item.value)):o.selected=e.item.value,o.open=e.item.parent;break;case"GROUP_OPEN":o.open=e.item.value;break;case"GROUP_CLOSE":o.open=e.item.parent;break;case"MENU_OPEN":o.open="top";break;case"MENU_CLOSE":o.open=!1;break}this._setState(o),this.render()},_setState(t){this.options.onSelect&&t.selected&&(this.options.multi&&t.selected.length!==this.state.selected.length||!this.options.multi&&t.selected!==this.state.selected)&&this.options.onSelect(t.selected),this.options.onGroupOpen&&t.open&&t.open!==this.state.open&&(console.log("group open"),this.options.onGroupOpen(t.open)),this.options.onOpen&&t.open==="top"&&this.options.onOpen(),this.options.onClose&&!t.open&&this.options.onClose(),this.state=Object.assign(this.state,t)},_isGroup(t){return"items"in t},_isSelected(t){const e=this.state.selected;return e?this._isGroup(t)?"children"in t?this.options.multi?e.find(o=>t.children.includes(o)):t.children.includes(e):!1:this.options.multi?e.indexOf(t.value)>-1:e===t.value:!1},_isOpen(t){const e=this.state.open;return e&&(e===t.value||t.children.includes(e))},_hideMenu(){this._emit("MENU_CLOSE",{})},_iconClicked(){this._emit("MENU_OPEN",{})},_itemClicked(t){this._isGroup(t)?this.state.open===t.value?this._emit("GROUP_CLOSE",{item:t}):this._emit("GROUP_OPEN",{item:t}):this._emit("ITEM_SELECT",{item:t})},_renderRadioIcon(t,e){const o=s.DomUtil.create("span","radio icon",e);o.innerHTML=t?this.options.iconChecked:this.options.iconUnchecked},_renderGroupIcon(t,e){const o=s.DomUtil.create("span","group icon",e);o.innerHTML=t?this.options.iconGroupChecked:this.options.iconGroupUnchecked},_renderItem(t,e){const o=this._isSelected(t),n=s.DomUtil.create("div","leaflet-control-select-menu-line",e),l=s.DomUtil.create("div","leaflet-control-select-menu-line-content",n),r=s.DomUtil.create("span","text",l);return r.innerHTML=t.label,this._isGroup(t)?(this._renderGroupIcon(o,l),s.DomUtil.addClass(n,"group"),this._isOpen(t)&&s.DomUtil.addClass(n,"group-opened"),this._isOpen(t)&&this._renderMenu(n,t.items)):this._renderRadioIcon(o,l),s.DomEvent.addListener(l,"click",i=>{this._itemClicked(t)}),n},_renderMenu(t,e){const o=s.DomUtil.create("div","leaflet-control-select-menu leaflet-bar ",t);this.menus.push(o),e.map(n=>{this._renderItem(n,o)})},_clearMenus(){this.menus.map(t=>t.remove()),this.meus=[]},render(){this._clearMenus(),this.state.open&&this._renderMenu(this.container,this.options.items)},close(){this._hideMenu()}}),s.control.select=t=>new s.Control.Select(t)}};var a,f,k,U,_,y=L,S,M=null,w,C,T=!1,E=!1;const P=s.icon({iconUrl:"/images/vendor/leaflet/dist/dot.png",iconSize:[10,10]}),F=s.icon({iconUrl:"/images/vendor/leaflet/dist/grey-dot.jpg",iconSize:[13,10]});function We(t,e){const o=[e.lng,e.lat];return t.properties.verified===2?s.marker(o,{icon:P}):s.marker(o,{icon:F})}function N(t,e){return s.marker(e,{icon:P})}function qe(t,e){if(!t.properties.cluster)return t.properties.verified===2?s.marker(e,{icon:P}):s.marker(e,{icon:F});const o=t.properties.point_count,n=o'+t.properties.point_count_abbreviated+"",className:"marker-cluster-"+n,iconSize:s.point(40,40)});return s.marker(e,{icon:l})}function R(){T&&(a.removeControl(w),T=!1),E||(C=s.control.layers(null,null).addTo(a),C.addOverlay(f,"Global"),C.addOverlay(U,"Litter Art"),S&&C.addOverlay(S,"Cleanups"),k&&C.addOverlay(k,"Merchants"),E=!0)}function Ve(){if(E&&(a.removeControl(C),E=!1),!T){const t={Alcohol:new s.LayerGroup,Brands:new s.LayerGroup,Coastal:new s.LayerGroup,Coffee:new s.LayerGroup,Dumping:new s.LayerGroup,Food:new s.LayerGroup,Industrial:new s.LayerGroup,Other:new s.LayerGroup,PetSurprise:new s.LayerGroup,Sanitary:new s.LayerGroup,Smoking:new s.LayerGroup,SoftDrinks:new s.LayerGroup};w=s.control.layers(null,t).addTo(a),T=!0}}function Xe(t,e){t.properties.cluster&&e.on("click",function(o){const n=a.getZoom()+I>$?$:a.getZoom()+I;a.flyTo(o.latlng,n,{animate:!0,duration:2})})}function Ke(t,e){e.on("click",function(o){a.flyTo(t.geometry.coordinates,14,{animate:!0,duration:10});const n=new URL(window.location.href);n.searchParams.set("lat",t.geometry.coordinates[0]),n.searchParams.set("lon",t.geometry.coordinates[1]),n.searchParams.set("zoom",g),n.searchParams.set("photo",t.properties.photo_id),s.popup(m.popupOptions).setLatLng(t.geometry.coordinates).setContent(m.getMapImagePopupContent(t.properties,n.toString())).openOn(a)})}function Qe(t,e){e.on("click",function(o){const n=[t.geometry.coordinates[1],t.geometry.coordinates[0]];a.flyTo(n,14,{animate:!0,duration:10});const l=m.getCleanupContent(t.properties,M);s.popup(m.popupOptions).setLatLng(n).setContent(l).openOn(a)})}function et(t,e){e.on("click",function(o){const n=[t.geometry.coordinates[1],t.geometry.coordinates[0]];a.flyTo(n,14,{animate:!0,duration:10});const l=m.getMerchantContent(t.properties,M);s.popup(m.popupOptions).setLatLng(n).setContent(l).openOn(a),new Swiper(".swiper-container",{navigation:{prevEl:"#prevButton",nextEl:"#nextButton"}})})}function tt(){let t=[];return w._layerControlInputs.forEach((e,o)=>{if(e.checked){const n=w._layers[o].name.toLowerCase()==="petsurprise"?"dogshit":w._layers[o].name.toLowerCase();t.push(n)}}),t.length>0?t:null}const ot={name:"Supercluster",components:{SearchCustomTags:Ye,LiveEvents:ze},props:{activeLayer:{default:"clusters",required:!1}},data(){return{visiblePoints:[]}},mounted(){var n,l,r;window.olm_map=this,a=s.map("openlittermap",{center:[0,0],zoom:L,scrollWheelZoom:!1,smoothWheelZoom:!0,smoothSensitivity:2}),a.scrollWheelZoom=!0,this.flyToLocationFromURL();const e=new Date().getFullYear();if(s.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"Map data © "+'OpenStreetMap'+" & Contributors",maxZoom:$,minZoom:L}).addTo(a),a.attributionControl.addAttribution("Litter data © OpenLitterMap & Contributors "+e+" Clustering @ MapBox"),f=s.geoJSON(null,{pointToLayer:qe,onEachFeature:Xe}),(n=this.$store.state.globalmap.geojson)!=null&&n.features&&f.addData(this.$store.state.globalmap.geojson.features),this.activeLayer==="clusters"&&f.addTo(a),U=s.geoJSON(null,{pointToLayer:We,onEachFeature:Ke}),(r=(l=this.$store.state.globalmap)==null?void 0:l.artData)!=null&&r.features&&U.addData(this.$store.state.globalmap.artData.features),this.$store.state.cleanups.geojson&&(S=s.geoJSON(this.$store.state.cleanups.geojson,{onEachFeature:Qe,pointToLayer:N})),this.activeLayer==="cleanups"&&(S.addTo(a),a.on("click",function(i){const c=i.latlng.lat,p=i.latlng.lng;window.olm_map.$store.commit("setCleanupLocation",{lat:c,lng:p})}),this.$route.params.hasOwnProperty("invite_link"))){const i=this.$store.state.cleanups.cleanup,c=[i.lat,i.lon];a.flyTo(c,16,{animate:!0,duration:5});const p=this.$store.state.user.auth?this.$store.state.user.user.id:null;s.popup(m.popupOptions).setLatLng(c).setContent(m.getCleanupContent(i,p)).openOn(a)}this.$store.state.user.auth&&(M=this.$store.state.user.user.id),Object.keys(this.$store.state.merchants.geojson).length>0&&(k=s.geoJSON(this.$store.state.merchants.geojson,{onEachFeature:et,pointToLayer:N})),this.activeLayer==="merchants"&&(k.addTo(a),a.on("click",function(i){const c=i.latlng.lat,p=i.latlng.lng;window.olm_map.$store.commit("setMerchantLocation",{lat:c,lng:p})})),this.$store.state.user.auth&&(M=this.$store.state.user.user.id),a.on("moveend",this.update),R(),a.on("overlayadd",this.update),a.on("overlayremove",this.update),a.on("popupopen",m.scrollPopupToBottom),a.on("popupclose",()=>{const i=new URL(window.location.href);i.searchParams.delete("photo"),window.history.pushState(null,"",i)}),a.on("zoom",()=>{_!=null&&_.remove&&_.remove()}),this.setupYearDropdown()},methods:{async update(){this.updateLocationInURL();const t=a.getBounds(),e={left:t.getWest(),bottom:t.getSouth(),right:t.getEast(),top:t.getNorth()},o=Math.round(a.getZoom());if(o===2&&o===y||o===3&&o===y||o===4&&o===y||o===5&&o===y)return;_&&(f.clearLayers(),_.remove());const n=new URLSearchParams(window.location.search),l=parseInt(n.get("year"))||null,r=n.get("fromDate")||null,i=n.get("toDate")||null,c=n.get("username")||null;if(o{console.log("get_clusters.update",d),f.clearLayers(),f.addData(d.data)}).catch(d=>{console.error("get_clusters.update",d)})}else{Ve();const p=tt();await axios.get("/global/points",{params:{zoom:o,bbox:e,layers:p,year:l,fromDate:r,toDate:i,username:c}}).then(d=>{console.log("get_global_points",d),this.visiblePoints=d.data.features,y[h.geometry.coordinates[0],h.geometry.coordinates[1]]);_=B.points({map:a,data:A,size:10,color:{r:.054,g:.819,b:.27,a:1},click:(h,b,rt)=>{const O=d.data.features.find(G=>G.geometry.coordinates[0]===b[0]&&G.geometry.coordinates[1]===b[1]);if(!O)return;const D=new URL(window.location.href);return D.searchParams.set("photo",O.properties.photo_id),window.history.pushState(null,"",D),this.renderLeafletPopup(O,h.latlng)}});let z=new URLSearchParams(window.location.search),x=parseInt(z.get("photo"));if(x){if(!this.visiblePoints.length)return;const h=this.visiblePoints.find(b=>b.properties.photo_id===x);h&&this.renderLeafletPopup(h,[h.geometry.coordinates[0],h.geometry.coordinates[1]])}}).catch(d=>{console.error("get_global_points",d)})}y=o},renderLeafletPopup(t,e){const o=new URL(window.location.href);o.searchParams.set("lat",t.geometry.coordinates[0]),o.searchParams.set("lon",t.geometry.coordinates[1]),o.searchParams.set("zoom",g),o.searchParams.set("photo",t.properties.photo_id),s.popup(m.popupOptions).setLatLng(e).setContent(m.getMapImagePopupContent(t.properties,o.toString())).openOn(a)},flyToLocationFromURL(){let t=new URLSearchParams(window.location.search),e=parseFloat(t.get("lat")||0),o=parseFloat(t.get("lon")||0),n=parseFloat(t.get("zoom")||L),l=parseInt(t.get("photo"));e=e<-85||e>85?0:e,o=o<-180||o>180?0:o,n=n<2||n>$?L:n,!(e===0&&o===0&&n===2)&&this.flyToLocation({latitude:e,longitude:o,zoom:n,photoId:l})},updateUrlPhotoIdAndFlyToLocation(t){const e=Math.round(a.getZoom()),o=new URL(window.location.href);o.searchParams.set("photo",t.photoId),window.history.pushState(null,"",o);const n=a.distance(a.getCenter(),[t.latitude,t.longitude]);e>=g&&n<=2e3?this.flyToLocation({...t,duration:1}):this.flyToLocation(t)},flyToLocation(t){const e=s.latLng(t.latitude,t.longitude),o=t.photoId&&Math.round(t.zoom)=2017;o--)t.push({label:o.toString(),value:o.toString()});let e=parseInt(new URLSearchParams(window.location.search).get("year"))||"*";s.control.select({position:"topleft",selectedDefault:e.toString(),items:t,onSelect:function(o){const n=new URL(window.location.href);o==="*"?n.searchParams.delete("year"):n.searchParams.set("year",o),window.history.pushState(null,"",n),window.location.reload()}}).addTo(a)}}};var nt=function(){var e=this,o=e._self._c;return o("div",{staticClass:"h100"},[o("div",{ref:"openlittermap",attrs:{id:"openlittermap"}}),o("SearchCustomTags"),o("LiveEvents",{on:{"fly-to-location":e.updateUrlPhotoIdAndFlyToLocation}})],1)},st=[],at=u(ot,nt,st,!1,null,null);const ut=at.exports;export{ut as S}; diff --git a/public/build/assets/Tag-rH_B50Z1.js b/public/build/assets/Tag-BrnjdQ4S.js similarity index 96% rename from public/build/assets/Tag-rH_B50Z1.js rename to public/build/assets/Tag-BrnjdQ4S.js index c5bd90ad..06649a8c 100644 --- a/public/build/assets/Tag-rH_B50Z1.js +++ b/public/build/assets/Tag-BrnjdQ4S.js @@ -1 +1 @@ -import{h as r}from"./moment-zH0z38ay.js";import{L as n}from"./vue-loading-hzYdSApK.js";/* empty css */import{n as o,A as l,P as c,T as g,b as u}from"./app-DuS6KM7M.js";import{R as _}from"./RecentTags-CgmFFS03.js";/* empty css */const m={name:"Tag",components:{Loading:n,AddTags:l,Presence:c,Tags:g,ProfileDelete:u,RecentTags:_},async mounted(){this.loading=!0,await this.$store.dispatch("GET_CURRENT_USER"),await this.$store.dispatch("GET_PHOTOS_FOR_TAGGING"),this.loading=!1},data(){return{loading:!0}},computed:{current_page(){return this.$store.state.photos.paginate.current_page},hasRecentTags(){return Object.keys(this.$store.state.litter.recentTags).length>0||this.$store.state.litter.recentCustomTags.length>0},photos(){var e,t,s;return(s=(t=(e=this.$store.state)==null?void 0:e.photos)==null?void 0:t.paginate)==null?void 0:s.data},previous_page(){var e;return(e=this.$store.state.photos.paginate)==null?void 0:e.prev_page_url},remaining(){return this.$store.state.photos.remaining},show_current_page(){return this.$store.state.photos.paginate.current_page>1},show_next_page(){return this.$store.state.photos.paginate.next_page_url},user(){return this.$store.state.user.user}},methods:{getDate(e){return r(e).format("LLL")},goToPage(e){this.$store.dispatch("SELECT_IMAGE",e)},nextImage(){this.$store.dispatch("NEXT_IMAGE")},previousImage(){this.$store.dispatch("PREVIOUS_IMAGE")}}};var d=function(){var t=this,s=t._self._c;return s("section",{staticClass:"hero fullheight is-primary is-bold tag-container"},[t.loading?s("loading",{attrs:{"is-full-page":!0},model:{value:t.loading,callback:function(a){t.loading=a},expression:"loading"}}):s("div",{staticClass:"pt2"},[t.photos.length===0?s("div",{staticClass:"hero-body"},[s("div",{staticClass:"container has-text-centered"},[s("h3",{staticClass:"subtitle is-1"},[t._v(" "+t._s(t.$t("tags.no-tags"))+" ")]),s("router-link",{attrs:{to:"/submit"}},[s("h3",{staticClass:"subtitle button is-medium is-info hov"},[t._v(" "+t._s(t.$t("tags.please-upload"))+" ")])])],1)]):s("div",t._l(t.photos,function(a){return s("div",{key:a.id,staticClass:"mb2"},[s("div",{staticClass:"columns"},[s("div",{staticClass:"column",attrs:{id:"image-metadata"}},[s("div",{staticClass:"box image-metadata-box"},[s("ul",[s("li",{staticClass:"list-group-item"},[t._v(" "+t._s(t.$t("tags.to-tag"))+": "+t._s(t.remaining)+" ")]),s("li",{staticClass:"list-group-item"},[t._v(" "+t._s(t.$t("tags.total-uploaded"))+": "+t._s(t.user.total_images)+" ")]),a.team?s("li",{staticClass:"list-group-item"},[t._v(" "+t._s(t.$t("common.team"))+": "),s("strong",[t._v(t._s(a.team.name))])]):t._e(),s("li",{staticClass:"list-group-item"},[t._v(" Next Littercoin: "+t._s(t.user.littercoin_progress)+"% ")]),s("li",{staticClass:"list-group-item"},[t._v(" Total Littercoin: "+t._s(t.user.total_littercoin)+" ")])]),s("router-link",{attrs:{to:"/bulk-tag"}},[s("button",{staticClass:"button is-primary bulk-tag-btn"},[t._v("Tag in bulk")])])],1),t.hasRecentTags?s("div",{staticClass:"box control has-text-centered"},[s("RecentTags",{attrs:{"photo-id":a.id}})],1):t._e()]),t._v(" "),s("div",{staticClass:"column is-6 image-wrapper"},[s("div",{staticClass:"image-content"},[s("img",{directives:[{name:"img",rawName:"v-img",value:{sourceButton:!0},expression:"{ sourceButton: true }"}],staticClass:"img",attrs:{src:a.filename}})]),s("div",{staticClass:"column is-10 is-offset-1 mt-4"},[s("add-tags",{attrs:{id:a.id}})],1)]),s("div",{staticClass:"column is-3",attrs:{id:"image-counts"}},[s("div",{staticClass:"box"},[s("p",{staticClass:"list-group-item"},[s("strong",[t._v(" #"+t._s(a.id)+": ")]),t._v(" "+t._s(t.$t("tags.taken"))+" "+t._s(t.getDate(a.datetime))+" ")]),s("p",{staticClass:"list-group-item"},[s("strong",[t._v(t._s(t.$t("tags.coordinates"))+": ")]),t._v(" "+t._s(a.lat)+", "+t._s(a.lon)+" ")]),s("p",{staticClass:"list-group-item"},[s("strong",[t._v(t._s(t.$t("tags.address"))+": ")]),t._v(" "+t._s(a.display_name)+" ")]),s("p",{staticClass:"list-group-item"},[s("strong",[t._v(t._s(t.$t("tags.device"))+": ")]),t._v(" "+t._s(a.model)+" ")]),s("presence",{key:a.id}),s("profile-delete",{staticClass:"mt-4",attrs:{photoid:a.id}})],1),s("Tags",{attrs:{"photo-id":a.id}})],1)]),s("div",{staticClass:"column",staticStyle:{"text-align":"center"}},[s("div",{staticClass:"has-text-centered mt3em"},[s("a",{directives:[{name:"show",rawName:"v-show",value:t.previous_page,expression:"previous_page"}],staticClass:"pagination-previous has-background-link has-text-white",on:{click:t.previousImage}},[t._v(t._s(t.$t("tags.previous")))]),s("a",{directives:[{name:"show",rawName:"v-show",value:t.remaining>t.current_page,expression:"remaining > current_page"}],staticClass:"pagination-next has-background-link has-text-white",on:{click:t.nextImage}},[t._v(t._s(t.$t("tags.next")))])])]),s("div",{staticClass:"column"},[s("nav",{staticClass:"pagination is-centered",attrs:{role:"navigation","aria-label":"pagination"}},[s("ul",{staticClass:"pagination-list"},t._l(t.remaining,function(i){return s("li",{key:i},[s("a",{class:i===t.current_page?"pagination-link is-current":"pagination-link",attrs:{"aria-label":"page"+t.current_page,"aria-current":t.current_page},on:{click:function(h){return t.goToPage(i)}}},[t._v(t._s(i))])])}),0)])])])}),0)])],1)},p=[],v=o(m,d,p,!1,null,"9b9cefd4");const k=v.exports;export{k as default}; +import{h as r}from"./moment-zH0z38ay.js";import{L as n}from"./vue-loading-Ck0acTfr.js";/* empty css */import{n as o,A as l,P as c,T as g,b as u}from"./app-BwSojYvl.js";import{R as _}from"./RecentTags-BQfW5nXp.js";/* empty css */const m={name:"Tag",components:{Loading:n,AddTags:l,Presence:c,Tags:g,ProfileDelete:u,RecentTags:_},async mounted(){this.loading=!0,await this.$store.dispatch("GET_CURRENT_USER"),await this.$store.dispatch("GET_PHOTOS_FOR_TAGGING"),this.loading=!1},data(){return{loading:!0}},computed:{current_page(){return this.$store.state.photos.paginate.current_page},hasRecentTags(){return Object.keys(this.$store.state.litter.recentTags).length>0||this.$store.state.litter.recentCustomTags.length>0},photos(){var e,t,s;return(s=(t=(e=this.$store.state)==null?void 0:e.photos)==null?void 0:t.paginate)==null?void 0:s.data},previous_page(){var e;return(e=this.$store.state.photos.paginate)==null?void 0:e.prev_page_url},remaining(){return this.$store.state.photos.remaining},show_current_page(){return this.$store.state.photos.paginate.current_page>1},show_next_page(){return this.$store.state.photos.paginate.next_page_url},user(){return this.$store.state.user.user}},methods:{getDate(e){return r(e).format("LLL")},goToPage(e){this.$store.dispatch("SELECT_IMAGE",e)},nextImage(){this.$store.dispatch("NEXT_IMAGE")},previousImage(){this.$store.dispatch("PREVIOUS_IMAGE")}}};var d=function(){var t=this,s=t._self._c;return s("section",{staticClass:"hero fullheight is-primary is-bold tag-container"},[t.loading?s("loading",{attrs:{"is-full-page":!0},model:{value:t.loading,callback:function(a){t.loading=a},expression:"loading"}}):s("div",{staticClass:"pt2"},[t.photos.length===0?s("div",{staticClass:"hero-body"},[s("div",{staticClass:"container has-text-centered"},[s("h3",{staticClass:"subtitle is-1"},[t._v(" "+t._s(t.$t("tags.no-tags"))+" ")]),s("router-link",{attrs:{to:"/submit"}},[s("h3",{staticClass:"subtitle button is-medium is-info hov"},[t._v(" "+t._s(t.$t("tags.please-upload"))+" ")])])],1)]):s("div",t._l(t.photos,function(a){return s("div",{key:a.id,staticClass:"mb2"},[s("div",{staticClass:"columns"},[s("div",{staticClass:"column",attrs:{id:"image-metadata"}},[s("div",{staticClass:"box image-metadata-box"},[s("ul",[s("li",{staticClass:"list-group-item"},[t._v(" "+t._s(t.$t("tags.to-tag"))+": "+t._s(t.remaining)+" ")]),s("li",{staticClass:"list-group-item"},[t._v(" "+t._s(t.$t("tags.total-uploaded"))+": "+t._s(t.user.total_images)+" ")]),a.team?s("li",{staticClass:"list-group-item"},[t._v(" "+t._s(t.$t("common.team"))+": "),s("strong",[t._v(t._s(a.team.name))])]):t._e(),s("li",{staticClass:"list-group-item"},[t._v(" Next Littercoin: "+t._s(t.user.littercoin_progress)+"% ")]),s("li",{staticClass:"list-group-item"},[t._v(" Total Littercoin: "+t._s(t.user.total_littercoin)+" ")])]),s("router-link",{attrs:{to:"/bulk-tag"}},[s("button",{staticClass:"button is-primary bulk-tag-btn"},[t._v("Tag in bulk")])])],1),t.hasRecentTags?s("div",{staticClass:"box control has-text-centered"},[s("RecentTags",{attrs:{"photo-id":a.id}})],1):t._e()]),t._v(" "),s("div",{staticClass:"column is-6 image-wrapper"},[s("div",{staticClass:"image-content"},[s("img",{directives:[{name:"img",rawName:"v-img",value:{sourceButton:!0},expression:"{ sourceButton: true }"}],staticClass:"img",attrs:{src:a.filename}})]),s("div",{staticClass:"column is-10 is-offset-1 mt-4"},[s("add-tags",{attrs:{id:a.id}})],1)]),s("div",{staticClass:"column is-3",attrs:{id:"image-counts"}},[s("div",{staticClass:"box"},[s("p",{staticClass:"list-group-item"},[s("strong",[t._v(" #"+t._s(a.id)+": ")]),t._v(" "+t._s(t.$t("tags.taken"))+" "+t._s(t.getDate(a.datetime))+" ")]),s("p",{staticClass:"list-group-item"},[s("strong",[t._v(t._s(t.$t("tags.coordinates"))+": ")]),t._v(" "+t._s(a.lat)+", "+t._s(a.lon)+" ")]),s("p",{staticClass:"list-group-item"},[s("strong",[t._v(t._s(t.$t("tags.address"))+": ")]),t._v(" "+t._s(a.display_name)+" ")]),s("p",{staticClass:"list-group-item"},[s("strong",[t._v(t._s(t.$t("tags.device"))+": ")]),t._v(" "+t._s(a.model)+" ")]),s("presence",{key:a.id}),s("profile-delete",{staticClass:"mt-4",attrs:{photoid:a.id}})],1),s("Tags",{attrs:{"photo-id":a.id}})],1)]),s("div",{staticClass:"column",staticStyle:{"text-align":"center"}},[s("div",{staticClass:"has-text-centered mt3em"},[s("a",{directives:[{name:"show",rawName:"v-show",value:t.previous_page,expression:"previous_page"}],staticClass:"pagination-previous has-background-link has-text-white",on:{click:t.previousImage}},[t._v(t._s(t.$t("tags.previous")))]),s("a",{directives:[{name:"show",rawName:"v-show",value:t.remaining>t.current_page,expression:"remaining > current_page"}],staticClass:"pagination-next has-background-link has-text-white",on:{click:t.nextImage}},[t._v(t._s(t.$t("tags.next")))])])]),s("div",{staticClass:"column"},[s("nav",{staticClass:"pagination is-centered",attrs:{role:"navigation","aria-label":"pagination"}},[s("ul",{staticClass:"pagination-list"},t._l(t.remaining,function(i){return s("li",{key:i},[s("a",{class:i===t.current_page?"pagination-link is-current":"pagination-link",attrs:{"aria-label":"page"+t.current_page,"aria-current":t.current_page},on:{click:function(h){return t.goToPage(i)}}},[t._v(t._s(i))])])}),0)])])])}),0)])],1)},p=[],v=o(m,d,p,!1,null,"9b9cefd4");const k=v.exports;export{k as default}; diff --git a/public/build/assets/TagsViewer-C76cCq43.js b/public/build/assets/TagsViewer-BVKGSnDH.js similarity index 93% rename from public/build/assets/TagsViewer-C76cCq43.js rename to public/build/assets/TagsViewer-BVKGSnDH.js index 69c0703c..e9db6710 100644 --- a/public/build/assets/TagsViewer-C76cCq43.js +++ b/public/build/assets/TagsViewer-BVKGSnDH.js @@ -1 +1 @@ -import{L as s,h as m}from"./mapHelpers-CSfygYu3.js";import"./leaflet.timedimension.control-D33qz71h.js";import{M as i,a as p}from"./index-Dxbj43yt.js";import{n as l}from"./app-DuS6KM7M.js";import"./moment-zH0z38ay.js";/* empty css */const c={name:"TagsViewer",data(){return{geojson:null,map:null,pointsLayer:null,timeLayer:null,player:null}},async mounted(){await this.load(),this.map=s.map("map",{center:[0,0],zoom:i,scrollWheelZoom:!1,smoothWheelZoom:!0,smoothSensitivity:1}),this.flyToLocationFromURL();const t=new Date().getFullYear();s.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"Map data © "+'OpenStreetMap'+" & Contributors",maxZoom:p,minZoom:i}).addTo(this.map),this.map.attributionControl.addAttribution("Litter data © OpenLitterMap & Contributors "+t);let o=new s.TimeDimension({});this.map.timeDimension=o,this.player=new s.TimeDimension.Player({transitionTime:1e3,loop:!0},o),this.player.on("play",()=>{var n;(n=this.map)!=null&&n.hasLayer(this.pointsLayer)&&this.map.removeLayer(this.pointsLayer)}),this.map.addControl(new s.Control.TimeDimension({player:this.player,timeDimension:o,timeSliderDragUpdate:!0,loopButton:!0,autoPlay:!1,minSpeed:5,maxSpeed:100})),this.pointsLayer=s.geoJSON(this.geojson,{pointToLayer:(n,r)=>s.marker([r.lng,r.lat]),onEachFeature:(n,r)=>{r.on("click",g=>{s.popup(m.popupOptions).setLatLng(n.geometry.coordinates).setContent(m.getMapImagePopupContent(n.properties)).openOn(this.map)})}}),this.timeLayer=s.timeDimension.layer.geoJson(this.pointsLayer,{updateTimeDimension:!0,updateTimeDimensionMode:"replace"}),this.pointsLayer.addTo(this.map),this.timeLayer.addTo(this.map),this.map.on("moveend",this.updateLocationInURL),this.map.on("popupopen",m.scrollPopupToBottom)},methods:{async load(){const e=new URLSearchParams(window.location.search),t=e.get("custom_tag"),a=e.get("brand"),o=e.get("custom_tags");await axios.get("/tags-search",{params:{custom_tag:t,custom_tags:o,brand:a}}).then(n=>{this.geojson=n.data}).catch(n=>{console.error("get_tags",n)})},flyToLocationFromURL(){const e=new URLSearchParams(window.location.search);let t=parseFloat(e.get("lat")||0),a=parseFloat(e.get("lon")||0),o=parseFloat(e.get("zoom")||i);if(t=t<-85||t>85?0:t,a=a<-180||a>180?0:a,o=op?i:o,t===0&&a===0&&o===i)return;const n=[t,a];this.map.flyTo(n,o,{animate:!0,duration:5})},updateLocationInURL(){const e=this.map.getCenter(),t=new URL(window.location.href);t.searchParams.set("lat",e.lat),t.searchParams.set("lon",e.lng),t.searchParams.set("zoom",this.map.getZoom()),window.history.pushState(null,"",t)}}};var h=function(){var t=this,a=t._self._c;return a("div",{staticClass:"map-container"},[a("div",{ref:"map",attrs:{id:"map"}})])},u=[],d=l(c,h,u,!1,null,"da532280");const D=d.exports;export{D as default}; +import{L as s,h as m}from"./mapHelpers-DmBbMbJe.js";import"./leaflet.timedimension.control-DCjZM-xt.js";import{M as i,a as p}from"./index-Dxbj43yt.js";import{n as l}from"./app-BwSojYvl.js";import"./moment-zH0z38ay.js";/* empty css */const c={name:"TagsViewer",data(){return{geojson:null,map:null,pointsLayer:null,timeLayer:null,player:null}},async mounted(){await this.load(),this.map=s.map("map",{center:[0,0],zoom:i,scrollWheelZoom:!1,smoothWheelZoom:!0,smoothSensitivity:1}),this.flyToLocationFromURL();const t=new Date().getFullYear();s.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"Map data © "+'OpenStreetMap'+" & Contributors",maxZoom:p,minZoom:i}).addTo(this.map),this.map.attributionControl.addAttribution("Litter data © OpenLitterMap & Contributors "+t);let o=new s.TimeDimension({});this.map.timeDimension=o,this.player=new s.TimeDimension.Player({transitionTime:1e3,loop:!0},o),this.player.on("play",()=>{var n;(n=this.map)!=null&&n.hasLayer(this.pointsLayer)&&this.map.removeLayer(this.pointsLayer)}),this.map.addControl(new s.Control.TimeDimension({player:this.player,timeDimension:o,timeSliderDragUpdate:!0,loopButton:!0,autoPlay:!1,minSpeed:5,maxSpeed:100})),this.pointsLayer=s.geoJSON(this.geojson,{pointToLayer:(n,r)=>s.marker([r.lng,r.lat]),onEachFeature:(n,r)=>{r.on("click",g=>{s.popup(m.popupOptions).setLatLng(n.geometry.coordinates).setContent(m.getMapImagePopupContent(n.properties)).openOn(this.map)})}}),this.timeLayer=s.timeDimension.layer.geoJson(this.pointsLayer,{updateTimeDimension:!0,updateTimeDimensionMode:"replace"}),this.pointsLayer.addTo(this.map),this.timeLayer.addTo(this.map),this.map.on("moveend",this.updateLocationInURL),this.map.on("popupopen",m.scrollPopupToBottom)},methods:{async load(){const e=new URLSearchParams(window.location.search),t=e.get("custom_tag"),a=e.get("brand"),o=e.get("custom_tags");await axios.get("/tags-search",{params:{custom_tag:t,custom_tags:o,brand:a}}).then(n=>{this.geojson=n.data}).catch(n=>{console.error("get_tags",n)})},flyToLocationFromURL(){const e=new URLSearchParams(window.location.search);let t=parseFloat(e.get("lat")||0),a=parseFloat(e.get("lon")||0),o=parseFloat(e.get("zoom")||i);if(t=t<-85||t>85?0:t,a=a<-180||a>180?0:a,o=op?i:o,t===0&&a===0&&o===i)return;const n=[t,a];this.map.flyTo(n,o,{animate:!0,duration:5})},updateLocationInURL(){const e=this.map.getCenter(),t=new URL(window.location.href);t.searchParams.set("lat",e.lat),t.searchParams.set("lon",e.lng),t.searchParams.set("zoom",this.map.getZoom()),window.history.pushState(null,"",t)}}};var h=function(){var t=this,a=t._self._c;return a("div",{staticClass:"map-container"},[a("div",{ref:"map",attrs:{id:"map"}})])},u=[],d=l(c,h,u,!1,null,"da532280");const D=d.exports;export{D as default}; diff --git a/public/build/assets/Teams-BICBJp3G.js b/public/build/assets/Teams-BcDhvNQi.js similarity index 99% rename from public/build/assets/Teams-BICBJp3G.js rename to public/build/assets/Teams-BcDhvNQi.js index 018fd2b8..2e59069d 100644 --- a/public/build/assets/Teams-BICBJp3G.js +++ b/public/build/assets/Teams-BcDhvNQi.js @@ -1 +1 @@ -import{L as g}from"./vue-loading-hzYdSApK.js";/* empty css */import{M as d,a as u,C as h,Z as v,b,L as y}from"./index-Dxbj43yt.js";import{L as n,h as _}from"./mapHelpers-CSfygYu3.js";import{g as w}from"./glify-browser-DAFS8CF1.js";import{n as c}from"./app-DuS6KM7M.js";import{h as f}from"./moment-zH0z38ay.js";/* empty css */const $={name:"ClusterMap",props:["clustersUrl","pointsUrl"],data(){return{map:null,clusters:[],points:[],prevZoom:d,pointsLayerController:null,pointsControllerShowing:!1,grey_dot:null,green_dot:null}},async mounted(){await this.setup()},watch:{async clustersUrl(){var a;this.map.remove(),this.map=null,this.prevZoom=d,(a=this.points)!=null&&a.remove&&(this.points.resetVertices(),this.points.remove()),this.clusters.clearLayers(),this.clusters=null,this.points=null,this.pointsLayerController=null,this.pointsControllerShowing=!1,await this.setup()}},methods:{async setup(){this.map=n.map("map",{center:[0,0],zoom:d,scrollWheelZoom:!1,smoothWheelZoom:!0,smoothSensitivity:1}),this.map.scrollWheelZoom=!0;const a=new Date().getFullYear();n.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"Map data © "+'OpenStreetMap'+" & Contributors",maxZoom:u,minZoom:d}).addTo(this.map),this.map.attributionControl.addAttribution("Litter data © OpenLitterMap & Contributors "+a+" Clustering @ MapBox"),this.clusters=n.geoJSON(null,{pointToLayer:this.createClusterIcon,onEachFeature:this.onEachFeature}).addTo(this.map),await this.getClusters(2,null),this.map.on("moveend",this.update),this.map.on("overlayadd",this.update),this.map.on("overlayremove",this.update),this.map.on("popupopen",_.scrollPopupToBottom),this.map.on("zoom",()=>{var t;(t=this.points)!=null&&t.remove&&this.points.remove()}),this.green_dot=n.icon({iconUrl:"./images/vendor/leaflet/dist/dot.png",iconSize:[10,10]}),this.grey_dot=n.icon({iconUrl:"./images/vendor/leaflet/dist/grey-dot.jpg",iconSize:[13,10]})},async getClusters(a,e){await axios.get(this.clustersUrl,{params:{zoom:a,bbox:e}}).then(t=>{console.log("get_map_clusters",t),this.clusters.clearLayers(),this.clusters.addData(t.data)}).catch(t=>{console.error("get_map_clusters",t)}).finally(()=>this.$emit("loading-complete"))},async getPoints(a,e,t){await axios.get(this.pointsUrl,{params:{zoom:a,bbox:e,layers:t}}).then(s=>{console.log("get_map_points",s),this.prevZoom[r.geometry.coordinates[0],r.geometry.coordinates[1]]);this.points=w.points({map:this.map,data:i,size:10,color:{r:.054,g:.819,b:.27,a:1},click:(r,o,l)=>{const m=s.data.features.find(p=>p.geometry.coordinates[0]===o[0]&&p.geometry.coordinates[1]===o[1]);if(m)return this.renderLeafletPopup(m,r.latlng)}})}).catch(s=>{console.error("get_map_points",s)})},async update(){var s;const a=this.map.getBounds(),e={left:a.getWest(),bottom:a.getSouth(),right:a.getEast(),top:a.getNorth()},t=Math.round(this.map.getZoom());if(!(t===this.prevZoom&&[2,3,4,5].indexOf(t)>=0)){if((s=this.points)!=null&&s.remove&&(this.clusters.clearLayers(),this.points.remove()),t'+a.properties.point_count_abbreviated+"",className:"marker-cluster-"+s,iconSize:n.point(40,40)});return n.marker(e,{icon:i})},createPointGroups(){if(!this.pointsControllerShowing){const a={Alcohol:new n.LayerGroup,Brands:new n.LayerGroup,Coastal:new n.LayerGroup,Coffee:new n.LayerGroup,Dumping:new n.LayerGroup,Food:new n.LayerGroup,Industrial:new n.LayerGroup,Other:new n.LayerGroup,PetSurprise:new n.LayerGroup,Sanitary:new n.LayerGroup,Smoking:new n.LayerGroup,SoftDrinks:new n.LayerGroup};this.pointsLayerController=n.control.layers(null,a).addTo(this.map),this.pointsControllerShowing=!0}},onEachFeature(a,e){if(a.properties.cluster){const t=this;e.on("click",function(s){const i=t.map.getZoom()+v>u?u:t.map.getZoom()+v;t.map.flyTo(s.latlng,i,{animate:!0,duration:2})})}},getActiveLayers(){let a=[];return this.pointsLayerController._layerControlInputs.forEach((e,t)=>{if(e.checked){const s=this.pointsLayerController._layers[t].name.toLowerCase()==="petsurprise"?"dogshit":this.pointsLayerController._layers[t].name.toLowerCase();a.push(s)}}),a.length>0?a:null},renderLeafletPopup(a,e){n.popup(_.popupOptions).setLatLng(e).setContent(_.getMapImagePopupContent(a.properties)).openOn(this.map)}}};var T=function(){var e=this,t=e._self._c;return t("div",{staticClass:"h100"},[t("div",{ref:"map",attrs:{id:"map"}})])},C=[],S=c($,T,C,!1,null,"ae8e3771");const E=S.exports,x={name:"TeamMap",props:["teamId"],components:{Loading:g,ClusterMap:E},data(){return{loading:!0}},watch:{teamId(a){a>0&&(this.loading=!0)}},methods:{fullscreenChange(a){this.fullscreen=a},toggle(){this.$refs.fullscreen.toggle()}}};var A=function(){var e=this,t=e._self._c;return t("div",{staticClass:"team-map-container"},[e.loading&&e.teamId>0?t("loading",{attrs:{active:e.loading,"is-full-page":!1},on:{"update:active":function(s){e.loading=s}}}):e._e(),e.teamId>0?t("fullscreen",{ref:"fullscreen",staticClass:"profile-map-container",on:{change:e.fullscreenChange}},[t("button",{staticClass:"btn-map-fullscreen",on:{click:e.toggle}},[t("i",{staticClass:"fa fa-expand"})]),t("cluster-map",{attrs:{"clusters-url":`/teams/clusters/${e.teamId}`,"points-url":`/teams/points/${e.teamId}`},on:{"loading-complete":function(s){e.loading=!1}}})],1):e._e()],1)},L=[],P=c(x,A,L,!1,null,"fb1186a6");const k=P.exports,I={name:"TeamsDashboard",components:{TeamMap:k},async created(){await this.changeTeamOrTime()},data(){return{period:"all",timePeriods:["today","week","month","year","all"],viewTeam:0}},computed:{litter_count(){return this.$store.state.teams.allTeams.litter_count??0},photos_count(){return this.$store.state.teams.allTeams.photos_count??0},members_count(){return this.$store.state.teams.allTeams.members_count??0},teams(){return this.$store.state.teams.teams}},methods:{async changeTeamOrTime(){await this.$store.dispatch("GET_TEAM_DASHBOARD_DATA",{period:this.period,team_id:this.viewTeam})},getPeriod(a){return a||(a=this.period),this.$t("teams.dashboard.times."+a)}}};var M=function(){var e=this,t=e._self._c;return t("section",{staticClass:"tdc"},[t("p",{staticClass:"subtitle is-centered is-3"},[e._v(e._s(e.$t("teams.dashboard.teams-dashboard")))]),t("div",{staticClass:"columns"},[t("div",{staticClass:"column teams-card"},[t("span",{staticClass:"title is-2",staticStyle:{color:"#7b848e"}},[e._v(e._s(e.photos_count))]),t("br"),e._v(" "+e._s(e.$t("teams.dashboard.photos-uploaded"))+" "+e._s(this.getPeriod())+" ")]),t("div",{staticClass:"column teams-card"},[t("span",{staticClass:"title is-2",staticStyle:{color:"#7b848e"}},[e._v(e._s(e.litter_count))]),t("br"),e._v(" "+e._s(e.$t("teams.dashboard.litter-tagged"))+" "+e._s(this.getPeriod())+" ")]),t("div",{staticClass:"column teams-card"},[t("span",{staticClass:"title is-2",staticStyle:{color:"#7b848e"}},[e._v(e._s(e.members_count))]),t("br"),e._v(" "+e._s(e.$t("teams.dashboard.members-uploaded"))+" "+e._s(this.getPeriod())+" ")])]),t("div",{staticClass:"mobile-teams-select"},[t("select",{directives:[{name:"model",rawName:"v-model",value:e.period,expression:"period"}],staticClass:"input dash-time",on:{change:[function(s){var i=Array.prototype.filter.call(s.target.options,function(r){return r.selected}).map(function(r){var o="_value"in r?r._value:r.value;return o});e.period=s.target.multiple?i:i[0]},e.changeTeamOrTime]}},e._l(e.timePeriods,function(s){return t("option",{domProps:{value:s}},[e._v(e._s(e.getPeriod(s)))])}),0),t("div",{staticStyle:{flex:"0.1"}}),t("select",{directives:[{name:"model",rawName:"v-model",value:e.viewTeam,expression:"viewTeam"}],staticClass:"input dash-time",on:{change:[function(s){var i=Array.prototype.filter.call(s.target.options,function(r){return r.selected}).map(function(r){var o="_value"in r?r._value:r.value;return o});e.viewTeam=s.target.multiple?i:i[0]},e.changeTeamOrTime]}},[t("option",{attrs:{value:"0",selected:""}},[e._v(e._s(e.$t("teams.dashboard.all-teams")))]),e._l(e.teams,function(s){return t("option",{domProps:{value:s.id}},[e._v(e._s(s.name))])})],2)]),t("TeamMap",{attrs:{"team-id":e.viewTeam}})],1)},N=[],O=c(I,M,N,!1,null,"96580220");const R=O.exports,G={name:"CreateTeam",data(){return{btn:"button is-medium is-primary",processing:!1,identifier:"",name:"",teamType:1}},computed:{button(){return this.processing?this.btn+" is-loading":this.btn},errors(){return this.$store.state.teams.errors},remaining(){return this.user.remaining_teams},teamTypes(){return this.$store.state.teams.types},user(){return this.$store.state.user.user}},methods:{clearErrors(){this.$store.commit("teamErrors",[])},clearError(a){this.errors[a]&&this.$store.commit("clearTeamsError",a)},async create(){this.processing=!0,await this.$store.dispatch("CREATE_NEW_TEAM",{name:this.name,identifier:this.identifier,teamType:this.teamType}),this.processing=!1,this.name="",this.identifier=""},errorExists(a){return this.errors.hasOwnProperty(a)},getFirstError(a){return this.errors[a][0]}},mounted(){this.clearErrors()}};var D=function(){var e=this,t=e._self._c;return t("div",{staticClass:"ctc"},[t("h1",{staticClass:"title is-2"},[e._v(e._s(e.$t("teams.dashboard.create-a-team")))]),t("p",{staticClass:"mb2"},[e._v(e._s(e.$t("teams.create.allowed-to-create",{teams:this.remaining}))+".")]),e.remaining?t("div",{staticClass:"columns mt3"},[t("div",{staticClass:"column is-one-third"},[t("p",{staticClass:"mb1"},[e._v(e._s(e.$t("teams.create.what-kind-of-team")))])]),t("div",{staticClass:"column is-half card p2"},[t("form",{attrs:{method:"post"},on:{submit:function(s){return s.preventDefault(),e.create.apply(null,arguments)}}},[t("div",{staticClass:"control pb2"},[t("p",[e._v(e._s(e.$t("teams.create.team-type")))]),t("div",{staticClass:"select"},[t("select",{directives:[{name:"model",rawName:"v-model",value:e.teamType,expression:"teamType"}],on:{change:function(s){var i=Array.prototype.filter.call(s.target.options,function(r){return r.selected}).map(function(r){var o="_value"in r?r._value:r.value;return o});e.teamType=s.target.multiple?i:i[0]}}},e._l(e.teamTypes,function(s){return t("option",{domProps:{value:s.id}},[e._v(e._s(s.team))])}),0)])]),t("div",{staticClass:"control pb2"},[t("label",{attrs:{for:"name"}},[e._v(e._s(e.$t("teams.create.team-name")))]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.name,expression:"name"}],staticClass:"input",attrs:{name:"name",placeholder:e.$t("teams.create.my-awesome-team-placeholder"),type:"text",required:""},domProps:{value:e.name},on:{keydown:function(s){return e.clearError("name")},input:function(s){s.target.composing||(e.name=s.target.value)}}}),e.errorExists("name")?t("p",{staticClass:"is-danger",domProps:{textContent:e._s(e.getFirstError("name"))}}):e._e()]),t("div",{staticClass:"control pb2"},[t("label",{attrs:{for:"identifier"}},[e._v(e._s(e.$t("teams.create.unique-team-id")))]),t("br"),t("small",[e._v(e._s(e.$t("teams.create.id-to-join-team")))]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.identifier,expression:"identifier"}],staticClass:"input",attrs:{name:"identifier",placeholder:"Awesome2021",required:""},domProps:{value:e.identifier},on:{keydown:function(s){return e.clearError("identifier")},input:function(s){s.target.composing||(e.identifier=s.target.value)}}}),e.errorExists("identifier")?t("p",{staticClass:"is-danger",domProps:{textContent:e._s(e.getFirstError("identifier"))}}):e._e()]),t("div",[t("button",{class:e.button,attrs:{disabled:e.processing}},[e._v(e._s(e.$t("teams.create.create-team")))])])])])]):e._e()])},F=[],U=c(G,D,F,!1,null,"8767c0cc");const B=U.exports,j={name:"JoinTeam",data(){return{btn:"button is-medium is-primary",identifier:"",processing:!1}},computed:{button(){return this.processing?this.btn+" is-loading":this.btn},errors(){return this.$store.state.teams.errors}},methods:{clearErrors(){this.$store.commit("teamErrors",[])},clearError(a){this.errors[a]&&this.$store.commit("clearTeamsError",a)},errorExists(a){return this.errors.hasOwnProperty(a)},getFirstError(a){return this.errors[a][0]},async submit(){this.processing=!0,await this.$store.dispatch("JOIN_TEAM",this.identifier),this.processing=!1}},mounted(){this.clearErrors()}};var Z=function(){var e=this,t=e._self._c;return t("div",{staticClass:"jtc"},[t("h1",{staticClass:"title is-2"},[e._v(e._s(e.$t("teams.dashboard.join-a-team")))]),t("div",{staticClass:"columns mt3"},[t("div",{staticClass:"column is-one-third"},[t("p",{staticClass:"mb1"},[e._v(e._s(e.$t("teams.join.enter-team-identifier")))])]),t("div",{staticClass:"column is-half card p2"},[t("form",{on:{submit:function(s){return s.preventDefault(),e.submit.apply(null,arguments)}}},[t("div",{staticClass:"control mb2"},[t("label",{attrs:{for:"join"}},[e._v(e._s(e.$t("teams.join.team-identifier")))]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.identifier,expression:"identifier"}],staticClass:"input",attrs:{name:"join",id:"join",placeholder:e.$t("teams.join.enter-id-to-join-placeholder"),required:"",autofocus:""},domProps:{value:e.identifier},on:{input:[function(s){s.target.composing||(e.identifier=s.target.value)},e.clearError]}}),e.errorExists("identifier")?t("p",{staticClass:"is-danger",domProps:{textContent:e._s(e.getFirstError("identifier"))}}):e._e()]),t("div",{staticClass:"has-text-right"},[t("button",{class:e.button,attrs:{disabled:e.processing}},[e._v(e._s(e.$t("teams.join.join-team")))])])])])])])},V=[],z=c(j,Z,V,!1,null,"c7229e4a");const q=z.exports,W={name:"MyTeams",data(){return{loading:!1,processing:!1,changing:!1,viewTeam:null,dlProcessing:!1}},computed:{activeTeam(){return this.user.active_team},current_page(){return this.members.current_page},isLeader(){const a=this.teams.find(e=>e.id===this.viewTeam);return a&&a.leader===this.user.id},members(){return this.$store.state.teams.members},show_current_page(){return this.members.current_page>1},show_next_page(){return this.members.next_page_url},teams(){return this.$store.state.teams.teams},user(){return this.$store.state.user.user}},async mounted(){this.loading=!0,await this.getUserTeams(),this.loading=!1},methods:{async changeActiveTeam(a){this.processing=!0,await this.$store.dispatch("CHANGE_ACTIVE_TEAM",a),this.processing=!1},async inactivateTeam(){var a;this.processing=!0,await this.$store.dispatch("INACTIVATE_TEAM"),this.viewTeam=(a=this.teams[0])==null?void 0:a.id,await this.changeViewedTeam(),this.processing=!1},async getUserTeams(){var e;await this.$store.dispatch("GET_USERS_TEAMS");let a=this.activeTeam||((e=this.teams[0])==null?void 0:e.id);a&&(this.viewTeam=a,await this.$store.dispatch("GET_TEAM_MEMBERS",this.viewTeam))},async leaveTeam(a){confirm(this.$t("teams.myteams.confirm-leave-team"))&&(this.loading=!0,await this.$store.dispatch("LEAVE_TEAM",a),await this.getUserTeams(),this.loading=!1)},async changeViewedTeam(){this.changing=!0,await this.$store.dispatch("GET_TEAM_MEMBERS",this.viewTeam),this.changing=!1},checkActiveTeam(a){return a===this.viewTeam?"team-active":"team-inactive"},checkActiveTeamText(a){return this.changing?"...":a===this.viewTeam?this.$t("common.active"):this.$t("common.inactive")},async download(a){this.dlProcessing=!0,await this.$store.dispatch("DOWNLOAD_DATA_FOR_TEAM",a),this.dlProcessing=!1},getRank(a){return this.members.current_page===1?a+1:a+1+(this.members.current_page-1)*10},icon(a){return a===this.viewTeam?"fa fa-check":"fa fa-ban"},medal(a){if(this.members.current_page===1){if(a===0)return"/assets/icons/gold-medal.png";if(a===1)return"/assets/icons/silver-medal.png";if(a===2)return"/assets/icons/bronze-medal.svg"}return""},previousPage(){this.$store.dispatch("PREVIOUS_MEMBERS_PAGE",this.viewTeam)},nextPage(){this.$store.dispatch("NEXT_MEMBERS_PAGE",this.viewTeam)},async toggleLeaderboardVis(a){await this.$store.dispatch("TOGGLE_LEADERBOARD_VISIBILITY",a)},formatDate(a){return f(a).format("LLL")}}};var H=function(){var e=this,t=e._self._c;return t("section",[t("div",{staticClass:"my-teams-container"},[t("h1",{staticClass:"title is-2"},[e._v(" "+e._s(e.$t("teams.myteams.title"))+" ")]),e.loading?t("p",[e._v(" "+e._s(e.$t("common.loading"))+" ")]):t("div",[t("div",{staticClass:"active-team-indicator"},[t("div",[e.user.active_team?t("div",{staticClass:"mb1"},[t("p",[e._v(" "+e._s(e.$t("teams.myteams.currently-joined-team"))+" "),t("strong",[e._v(e._s(e.user.team.name))]),e._v(". "),t("br"),e._v(" "+e._s(e.$t("teams.myteams.enabled-contributions"))+" ")])]):e.teams&&e.teams.length?t("p",{staticClass:"mb1",domProps:{innerHTML:e._s(e.$t("teams.myteams.disabled-contributions"))}}):t("p",{staticClass:"mb1"},[e._v(" "+e._s(e.$t("teams.myteams.no-joined-team"))+". ")])]),e.user.active_team?t("div",{staticClass:"button is-warning tooltip",on:{click:e.inactivateTeam}},[t("span",{staticClass:"tooltip-text disable-teams-tooltip"},[e._v(" "+e._s(e.$t("teams.myteams.disable-contributions-tooltip"))+" ")]),e._v(" "+e._s(e.$t("common.inactivate"))+" ")]):e._e()]),e.teams&&e.teams.length?t("div",{staticClass:"mb1"},[t("div",{staticClass:"is-size-3"},[e._v(" "+e._s(e.$t("teams.myteams.team-details"))+" ")]),e.isLeader?t("div",[t("p",[e._v(e._s(e.$t("teams.myteams.leader-of-team"))+".")])]):e._e()]):e._e(),e.teams&&e.teams.length?t("div",{staticStyle:{"overflow-x":"scroll"}},[t("div",{staticClass:"flex mb1"},[t("select",{directives:[{name:"model",rawName:"v-model",value:e.viewTeam,expression:"viewTeam"}],staticClass:"input mtba",staticStyle:{"max-width":"20em","min-width":"5em"},on:{change:[function(s){var i=Array.prototype.filter.call(s.target.options,function(r){return r.selected}).map(function(r){var o="_value"in r?r._value:r.value;return o});e.viewTeam=s.target.multiple?i:i[0]},e.changeViewedTeam]}},[t("option",{attrs:{disabled:""},domProps:{selected:!e.viewTeam,value:null}},[e._v(" "+e._s(e.$t("teams.myteams.join-team"))+" ")]),e._l(e.teams,function(s){return t("option",{key:s.id,domProps:{value:s.id}},[e._v(" "+e._s(s.name)+" ")])})],2)]),t("table",{staticClass:"table is-fullwidth is-hoverable has-text-centered"},[t("thead",[t("th",[e._v(e._s(e.$t("teams.myteams.position-header")))]),t("th",[e._v(e._s(e.$t("teams.myteams.name-header")))]),t("th",[e._v(e._s(e.$t("teams.myteams.username-header")))]),t("th",[e._v(e._s(e.$t("teams.myteams.status-header")))]),t("th",[e._v(e._s(e.$t("teams.myteams.photos-header")))]),t("th",[e._v(e._s(e.$t("teams.myteams.litter-header")))]),t("th",[e._v(e._s(e.$t("teams.myteams.last-activity-header")))])]),t("tbody",e._l(e.members.data,function(s,i){return t("tr",{key:s.id},[t("td",[t("div",{staticClass:"medal-container"},[t("img",{directives:[{name:"show",rawName:"v-show",value:i<3,expression:"index < 3"}],staticClass:"medal",attrs:{src:e.medal(i)}}),t("span",[e._v(e._s(e.getRank(i)))])])]),t("td",[e._v(e._s(s.name?s.name:"-"))]),t("td",[e._v(e._s(s.username?s.username:"-"))]),t("td",{staticStyle:{width:"9em","white-space":"nowrap"}},[t("span",{class:e.checkActiveTeam(s.active_team)},[t("i",{class:e.icon(s.active_team)}),e._v(" "+e._s(e.checkActiveTeamText(s.active_team))+" ")])]),t("td",[e._v(e._s(s.pivot.total_photos))]),t("td",[e._v(e._s(s.pivot.total_litter))]),t("td",{staticStyle:{"max-width":"100px"}},[e._v(" "+e._s(s.pivot.updated_at?e.formatDate(s.pivot.updated_at):"-")+" ")])])}),0)]),t("div",{staticClass:"has-text-centered"},[t("a",{directives:[{name:"show",rawName:"v-show",value:this.current_page>1,expression:"this.current_page > 1"}],staticClass:"pagination-previous",on:{click:e.previousPage}},[e._v(e._s(e.$t("common.previous")))]),t("a",{directives:[{name:"show",rawName:"v-show",value:this.show_next_page,expression:"this.show_next_page"}],staticClass:"pagination-next",on:{click:e.nextPage}},[e._v(e._s(e.$t("common.next-page")))])])]):e._e(),e.teams&&e.teams.length?t("div",{staticStyle:{"overflow-x":"scroll"}},[t("div",{staticClass:"is-size-3 mb1"},[e._v(" "+e._s(e.$t("teams.myteams.all-my-teams"))+" ")]),t("table",{staticClass:"table is-fullwidth is-hoverable"},[t("thead",[t("th",[e._v(e._s(e.$t("teams.myteams.name-header")))]),t("th",[e._v(e._s(e.$t("teams.myteams.identifier-header")))]),t("th",[e._v(e._s(e.$t("teams.myteams.members-header")))]),t("th",[e._v(e._s(e.$t("teams.myteams.photos-header")))]),t("th",[e._v(e._s(e.$t("teams.myteams.litter-header")))]),t("th",[e._v(e._s(e.$t("common.actions")))])]),t("tbody",e._l(e.teams,function(s){return t("tr",{key:s.id,class:s.id===e.activeTeam?"is-primary-row":""},[t("td",[e._v(e._s(s.name))]),t("td",[e._v(e._s(s.identifier))]),t("td",[e._v(e._s(s.members))]),t("td",[e._v(e._s(s.total_images))]),t("td",[e._v(e._s(s.total_litter))]),t("td",{staticStyle:{"min-width":"120px","max-width":"150px"}},[t("button",{staticClass:"button is-small is-primary team-action tooltip",class:e.processing?"is-loading":"",attrs:{disabled:s.id===e.activeTeam},on:{click:function(i){return e.changeActiveTeam(s.id)}}},[t("span",{staticClass:"tooltip-text"},[e._v(" "+e._s(s.id===e.activeTeam?e.$t("teams.myteams.this-is-active-team"):e.$t("teams.myteams.set-as-active-team"))+" ")]),t("i",{staticClass:"fa fa-star"})]),t("button",{staticClass:"button is-small is-info team-action tooltip",class:e.dlProcessing?"is-loading":"",on:{click:function(i){return e.download(s.id)}}},[t("span",{staticClass:"tooltip-text"},[e._v(e._s(e.$t("teams.myteams.download-team-data")))]),t("i",{staticClass:"fa fa-download"})]),t("button",{staticClass:"button is-small is-danger team-action tooltip",attrs:{disabled:s.members<=1},on:{click:function(i){return e.leaveTeam(s.id)}}},[t("span",{staticClass:"tooltip-text"},[e._v(" "+e._s(s.members>1?e.$t("teams.myteams.leave-team"):e.$t("teams.myteams.cant-leave-team"))+" ")]),t("i",{staticClass:"fa fa-sign-out"})]),s.leader===e.user.id?t("button",{staticClass:"button is-small is-warning team-action tooltip",on:{click:function(i){return e.toggleLeaderboardVis(s.id)}}},[t("span",{staticClass:"tooltip-text"},[e._v(" "+e._s(s.leaderboards?e.$t("teams.myteams.hide-from-leaderboards"):e.$t("teams.myteams.show-on-leaderboards"))+" ")]),t("i",{staticClass:"fa",class:s.leaderboards?"fa-eye-slash":"fa-eye"})]):e._e()])])}),0)])]):e._e()])])])},J=[],Y=c(W,H,J,!1,null,"8042d205");const X=Y.exports,K={name:"TeamSettings",data(){return{loading:!0,privacySectionSelectedTeamId:0,attributesSectionSelectedTeamId:0,privacyAllProcessing:!1,privacySubmitProcessing:!1,attributesProcessing:!1,attributesTeamName:"",attributesTeamIdentifier:"",btnAll:"button is-medium is-primary mt1",btn:"button is-medium is-warning mt1 mr1"}},async created(){var a,e;this.loading=!0,this.teams.length===0&&await this.$store.dispatch("GET_USERS_TEAMS"),this.privacySectionSelectedTeamId=(a=this.teams[0])==null?void 0:a.id,this.attributesSectionSelectedTeamId=(e=this.teamsLedByUser[0])==null?void 0:e.id,this.clearErrors(),this.loading=!1},watch:{attributesSectionSelectedTeam(){this.attributesTeamName=this.attributesSectionSelectedTeam.name,this.attributesTeamIdentifier=this.attributesSectionSelectedTeam.identifier}},computed:{allButton(){return this.privacyAllProcessing?this.btnAll+" is-loading":this.btnAll},disabled(){return this.privacyAllProcessing||this.privacySubmitProcessing},submitButton(){return this.privacySubmitProcessing?this.btn+" is-loading":this.btn},show_name_leaderboards:{get(){return this.team.pivot.show_name_leaderboards},set(a){this.$store.commit("team_settings",{team_id:this.privacySectionSelectedTeamId,key:"show_name_leaderboards",v:a})}},show_username_leaderboards:{get(){return this.team.pivot.show_username_leaderboards},set(a){this.$store.commit("team_settings",{team_id:this.privacySectionSelectedTeamId,key:"show_username_leaderboards",v:a})}},show_name_maps:{get(){return this.team.pivot.show_name_maps},set(a){this.$store.commit("team_settings",{team_id:this.privacySectionSelectedTeamId,key:"show_name_maps",v:a})}},show_username_maps:{get(){return this.team.pivot.show_username_maps},set(a){this.$store.commit("team_settings",{team_id:this.privacySectionSelectedTeamId,key:"show_username_maps",v:a})}},team(){return this.teams.find(a=>a.id===this.privacySectionSelectedTeamId)},attributesSectionSelectedTeam(){return this.teamsLedByUser.find(a=>a.id===this.attributesSectionSelectedTeamId)},teams(){return this.$store.state.teams.teams},user(){return this.$store.state.user.user},teamsLedByUser(){return this.teams.filter(a=>a.leader===this.user.id)},errors(){return this.$store.state.teams.errors}},methods:{async submit(a){a?this.privacyAllProcessing=!0:this.privacySubmitProcessing=!0,await this.$store.dispatch("SAVE_TEAM_SETTINGS",{all:a,team_id:this.privacySectionSelectedTeamId}),this.privacySubmitProcessing=!1,this.privacyAllProcessing=!1},async updateTeam(){if(this.attributesProcessing=!0,await this.$store.dispatch("UPDATE_TEAM",{teamId:this.attributesSectionSelectedTeamId,name:this.attributesTeamName,identifier:this.attributesTeamIdentifier}),this.attributesProcessing=!1,!Object.keys(this.errors).length&&(await this.$store.dispatch("GET_USERS_TEAMS"),this.user.active_team===this.attributesSectionSelectedTeamId)){let a=this.teams.find(e=>e.id===this.attributesSectionSelectedTeamId);this.$store.commit("usersTeam",a)}},clearErrors(){this.$store.commit("teamErrors",[])},clearError(a){this.errors[a]&&this.$store.commit("clearTeamsError",a)},getFirstError(a){return this.errors[a]?this.errors[a][0]:null}}};var Q=function(){var e=this,t=e._self._c;return t("div",{staticClass:"tsc"},[t("h1",{staticClass:"title is-2"},[e._v(e._s(e.$t("teams.dashboard.settings")))]),!e.loading&&!e.teams.length?t("p",{staticClass:"mb1"},[e._v(e._s(e.$t("teams.myteams.no-joined-team"))+".")]):e._e(),e.teams.length?t("div",{staticClass:"columns mt3 mb3"},[t("div",{staticClass:"column is-one-third pt0"},[t("h1",{staticClass:"title"},[e._v(e._s(e.$t("teams.settings.privacy-title")))]),t("p",{staticClass:"mb1"},[e._v(e._s(e.$t("teams.settings.privacy-text")))])]),t("div",{staticClass:"column is-half card p2"},[e.loading?t("p",[e._v(e._s(e.$t("common.loading")))]):t("div",[t("select",{directives:[{name:"model",rawName:"v-model",value:e.privacySectionSelectedTeamId,expression:"privacySectionSelectedTeamId"}],staticClass:"input mb2",on:{change:function(s){var i=Array.prototype.filter.call(s.target.options,function(r){return r.selected}).map(function(r){var o="_value"in r?r._value:r.value;return o});e.privacySectionSelectedTeamId=s.target.multiple?i:i[0]}}},e._l(e.teams,function(s){return t("option",{domProps:{value:s.id}},[e._v(" "+e._s(s.name)+" ")])}),0),t("h1",{staticClass:"title is-4"},[e._v(e._s(e.$t("teams.settings.maps.team-map"))+":")]),t("label",{staticClass:"checkbox mb1"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.show_name_maps,expression:"show_name_maps"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.show_name_maps)?e._i(e.show_name_maps,null)>-1:e.show_name_maps},on:{change:function(s){var i=e.show_name_maps,r=s.target,o=!!r.checked;if(Array.isArray(i)){var l=null,m=e._i(i,l);r.checked?m<0&&(e.show_name_maps=i.concat([l])):m>-1&&(e.show_name_maps=i.slice(0,m).concat(i.slice(m+1)))}else e.show_name_maps=o}}}),e._v(" "+e._s(e.$t("settings.privacy.credit-name"))+" ")]),t("br"),t("label",{staticClass:"checkbox mb1"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.show_username_maps,expression:"show_username_maps"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.show_username_maps)?e._i(e.show_username_maps,null)>-1:e.show_username_maps},on:{change:function(s){var i=e.show_username_maps,r=s.target,o=!!r.checked;if(Array.isArray(i)){var l=null,m=e._i(i,l);r.checked?m<0&&(e.show_username_maps=i.concat([l])):m>-1&&(e.show_username_maps=i.slice(0,m).concat(i.slice(m+1)))}else e.show_username_maps=o}}}),e._v(" "+e._s(e.$t("settings.privacy.credit-username"))+" ")]),t("p",{directives:[{name:"show",rawName:"v-show",value:e.show_name_maps,expression:"show_name_maps"}],staticClass:"is-green"},[e._v(e._s(e.$t("teams.settings.maps.name-will-appear")))]),t("p",{directives:[{name:"show",rawName:"v-show",value:e.show_username_maps,expression:"show_username_maps"}],staticClass:"is-green"},[e._v(e._s(e.$t("teams.settings.maps.username-will-appear")))]),t("p",{directives:[{name:"show",rawName:"v-show",value:!e.show_name_maps&&!e.show_username_maps,expression:"! show_name_maps && ! show_username_maps"}],staticClass:"is-red"},[e._v(e._s(e.$t("teams.settings.maps.will-not-appear")))]),t("h1",{staticClass:"title is-4 mt1"},[e._v(e._s(e.$t("teams.settings.leaderboards.team-leaderboard"))+":")]),t("label",{staticClass:"checkbox mb1"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.show_name_leaderboards,expression:"show_name_leaderboards"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.show_name_leaderboards)?e._i(e.show_name_leaderboards,null)>-1:e.show_name_leaderboards},on:{change:function(s){var i=e.show_name_leaderboards,r=s.target,o=!!r.checked;if(Array.isArray(i)){var l=null,m=e._i(i,l);r.checked?m<0&&(e.show_name_leaderboards=i.concat([l])):m>-1&&(e.show_name_leaderboards=i.slice(0,m).concat(i.slice(m+1)))}else e.show_name_leaderboards=o}}}),e._v(" "+e._s(e.$t("settings.privacy.credit-name"))+" ")]),t("br"),t("label",{staticClass:"checkbox mb1"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.show_username_leaderboards,expression:"show_username_leaderboards"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.show_username_leaderboards)?e._i(e.show_username_leaderboards,null)>-1:e.show_username_leaderboards},on:{change:function(s){var i=e.show_username_leaderboards,r=s.target,o=!!r.checked;if(Array.isArray(i)){var l=null,m=e._i(i,l);r.checked?m<0&&(e.show_username_leaderboards=i.concat([l])):m>-1&&(e.show_username_leaderboards=i.slice(0,m).concat(i.slice(m+1)))}else e.show_username_leaderboards=o}}}),e._v(" "+e._s(e.$t("settings.privacy.credit-username"))+" ")]),t("p",{directives:[{name:"show",rawName:"v-show",value:e.show_name_leaderboards,expression:"show_name_leaderboards"}],staticClass:"is-green"},[e._v(e._s(e.$t("teams.settings.leaderboards.name-will-appear")))]),t("p",{directives:[{name:"show",rawName:"v-show",value:e.show_username_leaderboards,expression:"show_username_leaderboards"}],staticClass:"is-green"},[e._v(e._s(e.$t("teams.settings.leaderboards.username-will-appear")))]),t("p",{directives:[{name:"show",rawName:"v-show",value:!e.show_name_leaderboards&&!e.show_username_leaderboards,expression:"! show_name_leaderboards && ! show_username_leaderboards"}],staticClass:"is-red"},[e._v(e._s(e.$t("teams.settings.leaderboards.will-not-appear")))]),t("div",{staticClass:"flex"},[t("button",{class:e.submitButton,attrs:{disabled:e.disabled},on:{click:function(s){return e.submit(!1)}}},[e._v(e._s(e.$t("teams.settings.submit-one-team")))]),t("button",{class:e.allButton,attrs:{disabled:e.disabled},on:{click:function(s){return e.submit(!0)}}},[e._v(e._s(e.$t("teams.settings.apply-all-teams")))])])])])]):e._e(),e.teamsLedByUser.length?t("div",{staticClass:"columns mb3"},[t("div",{staticClass:"column is-one-third pt0"},[t("h1",{staticClass:"title"},[e._v(e._s(e.$t("teams.settings.team-update-title")))]),t("p",{staticClass:"mb1"},[e._v(e._s(e.$t("teams.settings.team-update-text")))])]),t("div",{staticClass:"column is-half card p2"},[e.loading?t("p",[e._v(e._s(e.$t("common.loading")))]):t("div",[t("form",{attrs:{method:"post"},on:{submit:function(s){return s.preventDefault(),e.updateTeam.apply(null,arguments)}}},[t("div",{staticClass:"control pb2"},[t("p",[e._v(e._s(e.$t("teams.create.select-team")))]),t("div",{staticClass:"select"},[t("select",{directives:[{name:"model",rawName:"v-model",value:e.attributesSectionSelectedTeamId,expression:"attributesSectionSelectedTeamId"}],on:{change:function(s){var i=Array.prototype.filter.call(s.target.options,function(r){return r.selected}).map(function(r){var o="_value"in r?r._value:r.value;return o});e.attributesSectionSelectedTeamId=s.target.multiple?i:i[0]}}},e._l(e.teamsLedByUser,function(s){return t("option",{domProps:{value:s.id}},[e._v(" "+e._s(s.name)+" ")])}),0)])]),t("div",{staticClass:"control pb2"},[t("label",{attrs:{for:"name"}},[e._v(e._s(e.$t("teams.create.team-name")))]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.attributesTeamName,expression:"attributesTeamName"}],staticClass:"input",attrs:{name:"name",placeholder:e.$t("teams.create.my-awesome-team-placeholder"),type:"text",required:""},domProps:{value:e.attributesTeamName},on:{keydown:function(s){return e.clearError("name")},input:function(s){s.target.composing||(e.attributesTeamName=s.target.value)}}}),e.getFirstError("name")?t("p",{staticClass:"is-danger",domProps:{textContent:e._s(e.getFirstError("name"))}}):e._e()]),t("div",{staticClass:"control pb2"},[t("label",{attrs:{for:"identifier"}},[e._v(e._s(e.$t("teams.create.unique-team-id")))]),t("br"),t("small",[e._v(e._s(e.$t("teams.create.id-to-join-team")))]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.attributesTeamIdentifier,expression:"attributesTeamIdentifier"}],staticClass:"input",attrs:{id:"identifier",name:"identifier",placeholder:"Awesome2021",required:""},domProps:{value:e.attributesTeamIdentifier},on:{keydown:function(s){return e.clearError("identifier")},input:function(s){s.target.composing||(e.attributesTeamIdentifier=s.target.value)}}}),e.getFirstError("identifier")?t("p",{staticClass:"is-danger",domProps:{textContent:e._s(e.getFirstError("identifier"))}}):e._e()]),t("div",[t("button",{class:e.btnAll,attrs:{disabled:e.attributesProcessing}},[e._v(e._s(e.$t("teams.create.update-team")))])])])])])]):e._e()])},ee=[],te=c(K,Q,ee,!1,null,"1189eacc");const se=te.exports,ae={name:"TeamsLeaderboard",data(){return{loading:!0}},async created(){await this.$store.dispatch("GET_TEAMS_LEADERBOARD"),this.loading=!1},computed:{teams(){return this.$store.state.teams.leaderboard}},methods:{getDate(a){return f(a).format("LL")},medal(a){return a===0?"/assets/icons/gold-medal.png":a===1?"/assets/icons/silver-medal.png":a===2?"/assets/icons/bronze-medal.svg":""}}};var ie=function(){var e=this,t=e._self._c;return t("section",[t("div",{staticClass:"my-teams-container"},[t("h1",{staticClass:"title is-2"},[e._v(e._s(e.$t("teams.leaderboard.title")))]),e.loading?t("p",[e._v(e._s(e.$t("common.loading")))]):t("table",{staticClass:"table is-fullwidth is-hoverable has-text-centered"},[t("thead",[t("th",[e._v(e._s(e.$t("teams.leaderboard.position-header")))]),t("th",[e._v(e._s(e.$t("teams.leaderboard.name-header")))]),t("th",[e._v(e._s(e.$t("teams.leaderboard.litter-header")))]),t("th",[e._v(e._s(e.$t("teams.leaderboard.photos-header")))]),t("th",[e._v(e._s(e.$t("teams.leaderboard.created-at-header")))])]),t("tbody",e._l(e.teams,function(s,i){return t("tr",[t("td",[t("div",{staticClass:"medal-container"},[t("img",{directives:[{name:"show",rawName:"v-show",value:i<3,expression:"index < 3"}],staticClass:"medal",attrs:{src:e.medal(i)}}),t("span",[e._v(e._s(i+1))])])]),t("td",[e._v(e._s(s.name))]),t("td",[e._v(e._s(s.total_litter))]),t("td",[e._v(e._s(s.total_images))]),t("td",[e._v(e._s(e.getDate(s.created_at)))])])}),0)])])])},re=[],ne=c(ae,ie,re,!1,null,"f92a40f4");const oe=ne.exports,me={name:"Teams",components:{TeamsDashboard:R,CreateTeam:B,JoinTeam:q,MyTeams:X,TeamSettings:se,TeamsLeaderboard:oe},async created(){this.loading=!0,await this.$store.dispatch("GET_TEAM_TYPES"),this.teams.length===0&&await this.$store.dispatch("GET_USERS_TEAMS"),this.loading=!1},data(){return{loading:!0,items:[{name:this.$t("teams.dashboard.dashboard"),icon:"fa fa-home teams-icon",component:"TeamsDashboard"},{name:this.$t("teams.dashboard.join-a-team"),icon:"fa fa-sign-in teams-icon",component:"JoinTeam"},{name:this.$t("teams.dashboard.create-a-team"),icon:"fa fa-plus teams-icon",component:"CreateTeam"},{name:this.$t("teams.myteams.title"),icon:"fa fa-users teams-icon",component:"MyTeams"},{name:this.$t("teams.dashboard.leaderboard"),icon:"fa fa-trophy teams-icon",component:"TeamsLeaderboard"},{name:this.$t("teams.dashboard.settings"),icon:"fa fa-gear teams-icon",component:"TeamSettings"}]}},computed:{teams(){return this.$store.state.teams.teams},type(){return this.$store.state.teams.component_type}},methods:{goto(a){this.$store.commit("teamComponent",a)}}};var le=function(){var e=this,t=e._self._c;return t("section",[t("div",{staticClass:"columns"},[t("div",{staticClass:"column is-one-fifth teams-left-col"},[t("p",{staticClass:"teams-title"},[e._v(e._s(e.$t("teams.dashboard.olm-teams")))]),e._l(e.items,function(s){return t("div",{staticClass:"team-flex",on:{click:function(i){return e.goto(s.component)}}},[t("i",{class:s.icon}),t("p",{staticClass:"mtba"},[e._v(e._s(s.name))])])})],2),t("div",{staticClass:"column pt3 mobile-teams-padding",staticStyle:{"background-color":"#edf1f4"}},[e.loading?t("p",[e._v(e._s(e.$t("common.loading")))]):t(e.type,{tag:"component"})],1)])])},ce=[],de=c(me,le,ce,!1,null,"e7bd35ae");const ye=de.exports;export{ye as default}; +import{L as g}from"./vue-loading-Ck0acTfr.js";/* empty css */import{M as d,a as u,C as h,Z as v,b,L as y}from"./index-Dxbj43yt.js";import{L as n,h as _}from"./mapHelpers-DmBbMbJe.js";import{g as w}from"./glify-browser-BLn8SaeM.js";import{n as c}from"./app-BwSojYvl.js";import{h as f}from"./moment-zH0z38ay.js";/* empty css */const $={name:"ClusterMap",props:["clustersUrl","pointsUrl"],data(){return{map:null,clusters:[],points:[],prevZoom:d,pointsLayerController:null,pointsControllerShowing:!1,grey_dot:null,green_dot:null}},async mounted(){await this.setup()},watch:{async clustersUrl(){var a;this.map.remove(),this.map=null,this.prevZoom=d,(a=this.points)!=null&&a.remove&&(this.points.resetVertices(),this.points.remove()),this.clusters.clearLayers(),this.clusters=null,this.points=null,this.pointsLayerController=null,this.pointsControllerShowing=!1,await this.setup()}},methods:{async setup(){this.map=n.map("map",{center:[0,0],zoom:d,scrollWheelZoom:!1,smoothWheelZoom:!0,smoothSensitivity:1}),this.map.scrollWheelZoom=!0;const a=new Date().getFullYear();n.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"Map data © "+'OpenStreetMap'+" & Contributors",maxZoom:u,minZoom:d}).addTo(this.map),this.map.attributionControl.addAttribution("Litter data © OpenLitterMap & Contributors "+a+" Clustering @ MapBox"),this.clusters=n.geoJSON(null,{pointToLayer:this.createClusterIcon,onEachFeature:this.onEachFeature}).addTo(this.map),await this.getClusters(2,null),this.map.on("moveend",this.update),this.map.on("overlayadd",this.update),this.map.on("overlayremove",this.update),this.map.on("popupopen",_.scrollPopupToBottom),this.map.on("zoom",()=>{var t;(t=this.points)!=null&&t.remove&&this.points.remove()}),this.green_dot=n.icon({iconUrl:"./images/vendor/leaflet/dist/dot.png",iconSize:[10,10]}),this.grey_dot=n.icon({iconUrl:"./images/vendor/leaflet/dist/grey-dot.jpg",iconSize:[13,10]})},async getClusters(a,e){await axios.get(this.clustersUrl,{params:{zoom:a,bbox:e}}).then(t=>{console.log("get_map_clusters",t),this.clusters.clearLayers(),this.clusters.addData(t.data)}).catch(t=>{console.error("get_map_clusters",t)}).finally(()=>this.$emit("loading-complete"))},async getPoints(a,e,t){await axios.get(this.pointsUrl,{params:{zoom:a,bbox:e,layers:t}}).then(s=>{console.log("get_map_points",s),this.prevZoom[r.geometry.coordinates[0],r.geometry.coordinates[1]]);this.points=w.points({map:this.map,data:i,size:10,color:{r:.054,g:.819,b:.27,a:1},click:(r,o,l)=>{const m=s.data.features.find(p=>p.geometry.coordinates[0]===o[0]&&p.geometry.coordinates[1]===o[1]);if(m)return this.renderLeafletPopup(m,r.latlng)}})}).catch(s=>{console.error("get_map_points",s)})},async update(){var s;const a=this.map.getBounds(),e={left:a.getWest(),bottom:a.getSouth(),right:a.getEast(),top:a.getNorth()},t=Math.round(this.map.getZoom());if(!(t===this.prevZoom&&[2,3,4,5].indexOf(t)>=0)){if((s=this.points)!=null&&s.remove&&(this.clusters.clearLayers(),this.points.remove()),t'+a.properties.point_count_abbreviated+"",className:"marker-cluster-"+s,iconSize:n.point(40,40)});return n.marker(e,{icon:i})},createPointGroups(){if(!this.pointsControllerShowing){const a={Alcohol:new n.LayerGroup,Brands:new n.LayerGroup,Coastal:new n.LayerGroup,Coffee:new n.LayerGroup,Dumping:new n.LayerGroup,Food:new n.LayerGroup,Industrial:new n.LayerGroup,Other:new n.LayerGroup,PetSurprise:new n.LayerGroup,Sanitary:new n.LayerGroup,Smoking:new n.LayerGroup,SoftDrinks:new n.LayerGroup};this.pointsLayerController=n.control.layers(null,a).addTo(this.map),this.pointsControllerShowing=!0}},onEachFeature(a,e){if(a.properties.cluster){const t=this;e.on("click",function(s){const i=t.map.getZoom()+v>u?u:t.map.getZoom()+v;t.map.flyTo(s.latlng,i,{animate:!0,duration:2})})}},getActiveLayers(){let a=[];return this.pointsLayerController._layerControlInputs.forEach((e,t)=>{if(e.checked){const s=this.pointsLayerController._layers[t].name.toLowerCase()==="petsurprise"?"dogshit":this.pointsLayerController._layers[t].name.toLowerCase();a.push(s)}}),a.length>0?a:null},renderLeafletPopup(a,e){n.popup(_.popupOptions).setLatLng(e).setContent(_.getMapImagePopupContent(a.properties)).openOn(this.map)}}};var T=function(){var e=this,t=e._self._c;return t("div",{staticClass:"h100"},[t("div",{ref:"map",attrs:{id:"map"}})])},C=[],S=c($,T,C,!1,null,"ae8e3771");const E=S.exports,x={name:"TeamMap",props:["teamId"],components:{Loading:g,ClusterMap:E},data(){return{loading:!0}},watch:{teamId(a){a>0&&(this.loading=!0)}},methods:{fullscreenChange(a){this.fullscreen=a},toggle(){this.$refs.fullscreen.toggle()}}};var A=function(){var e=this,t=e._self._c;return t("div",{staticClass:"team-map-container"},[e.loading&&e.teamId>0?t("loading",{attrs:{active:e.loading,"is-full-page":!1},on:{"update:active":function(s){e.loading=s}}}):e._e(),e.teamId>0?t("fullscreen",{ref:"fullscreen",staticClass:"profile-map-container",on:{change:e.fullscreenChange}},[t("button",{staticClass:"btn-map-fullscreen",on:{click:e.toggle}},[t("i",{staticClass:"fa fa-expand"})]),t("cluster-map",{attrs:{"clusters-url":`/teams/clusters/${e.teamId}`,"points-url":`/teams/points/${e.teamId}`},on:{"loading-complete":function(s){e.loading=!1}}})],1):e._e()],1)},L=[],P=c(x,A,L,!1,null,"fb1186a6");const k=P.exports,I={name:"TeamsDashboard",components:{TeamMap:k},async created(){await this.changeTeamOrTime()},data(){return{period:"all",timePeriods:["today","week","month","year","all"],viewTeam:0}},computed:{litter_count(){return this.$store.state.teams.allTeams.litter_count??0},photos_count(){return this.$store.state.teams.allTeams.photos_count??0},members_count(){return this.$store.state.teams.allTeams.members_count??0},teams(){return this.$store.state.teams.teams}},methods:{async changeTeamOrTime(){await this.$store.dispatch("GET_TEAM_DASHBOARD_DATA",{period:this.period,team_id:this.viewTeam})},getPeriod(a){return a||(a=this.period),this.$t("teams.dashboard.times."+a)}}};var M=function(){var e=this,t=e._self._c;return t("section",{staticClass:"tdc"},[t("p",{staticClass:"subtitle is-centered is-3"},[e._v(e._s(e.$t("teams.dashboard.teams-dashboard")))]),t("div",{staticClass:"columns"},[t("div",{staticClass:"column teams-card"},[t("span",{staticClass:"title is-2",staticStyle:{color:"#7b848e"}},[e._v(e._s(e.photos_count))]),t("br"),e._v(" "+e._s(e.$t("teams.dashboard.photos-uploaded"))+" "+e._s(this.getPeriod())+" ")]),t("div",{staticClass:"column teams-card"},[t("span",{staticClass:"title is-2",staticStyle:{color:"#7b848e"}},[e._v(e._s(e.litter_count))]),t("br"),e._v(" "+e._s(e.$t("teams.dashboard.litter-tagged"))+" "+e._s(this.getPeriod())+" ")]),t("div",{staticClass:"column teams-card"},[t("span",{staticClass:"title is-2",staticStyle:{color:"#7b848e"}},[e._v(e._s(e.members_count))]),t("br"),e._v(" "+e._s(e.$t("teams.dashboard.members-uploaded"))+" "+e._s(this.getPeriod())+" ")])]),t("div",{staticClass:"mobile-teams-select"},[t("select",{directives:[{name:"model",rawName:"v-model",value:e.period,expression:"period"}],staticClass:"input dash-time",on:{change:[function(s){var i=Array.prototype.filter.call(s.target.options,function(r){return r.selected}).map(function(r){var o="_value"in r?r._value:r.value;return o});e.period=s.target.multiple?i:i[0]},e.changeTeamOrTime]}},e._l(e.timePeriods,function(s){return t("option",{domProps:{value:s}},[e._v(e._s(e.getPeriod(s)))])}),0),t("div",{staticStyle:{flex:"0.1"}}),t("select",{directives:[{name:"model",rawName:"v-model",value:e.viewTeam,expression:"viewTeam"}],staticClass:"input dash-time",on:{change:[function(s){var i=Array.prototype.filter.call(s.target.options,function(r){return r.selected}).map(function(r){var o="_value"in r?r._value:r.value;return o});e.viewTeam=s.target.multiple?i:i[0]},e.changeTeamOrTime]}},[t("option",{attrs:{value:"0",selected:""}},[e._v(e._s(e.$t("teams.dashboard.all-teams")))]),e._l(e.teams,function(s){return t("option",{domProps:{value:s.id}},[e._v(e._s(s.name))])})],2)]),t("TeamMap",{attrs:{"team-id":e.viewTeam}})],1)},N=[],O=c(I,M,N,!1,null,"96580220");const R=O.exports,G={name:"CreateTeam",data(){return{btn:"button is-medium is-primary",processing:!1,identifier:"",name:"",teamType:1}},computed:{button(){return this.processing?this.btn+" is-loading":this.btn},errors(){return this.$store.state.teams.errors},remaining(){return this.user.remaining_teams},teamTypes(){return this.$store.state.teams.types},user(){return this.$store.state.user.user}},methods:{clearErrors(){this.$store.commit("teamErrors",[])},clearError(a){this.errors[a]&&this.$store.commit("clearTeamsError",a)},async create(){this.processing=!0,await this.$store.dispatch("CREATE_NEW_TEAM",{name:this.name,identifier:this.identifier,teamType:this.teamType}),this.processing=!1,this.name="",this.identifier=""},errorExists(a){return this.errors.hasOwnProperty(a)},getFirstError(a){return this.errors[a][0]}},mounted(){this.clearErrors()}};var D=function(){var e=this,t=e._self._c;return t("div",{staticClass:"ctc"},[t("h1",{staticClass:"title is-2"},[e._v(e._s(e.$t("teams.dashboard.create-a-team")))]),t("p",{staticClass:"mb2"},[e._v(e._s(e.$t("teams.create.allowed-to-create",{teams:this.remaining}))+".")]),e.remaining?t("div",{staticClass:"columns mt3"},[t("div",{staticClass:"column is-one-third"},[t("p",{staticClass:"mb1"},[e._v(e._s(e.$t("teams.create.what-kind-of-team")))])]),t("div",{staticClass:"column is-half card p2"},[t("form",{attrs:{method:"post"},on:{submit:function(s){return s.preventDefault(),e.create.apply(null,arguments)}}},[t("div",{staticClass:"control pb2"},[t("p",[e._v(e._s(e.$t("teams.create.team-type")))]),t("div",{staticClass:"select"},[t("select",{directives:[{name:"model",rawName:"v-model",value:e.teamType,expression:"teamType"}],on:{change:function(s){var i=Array.prototype.filter.call(s.target.options,function(r){return r.selected}).map(function(r){var o="_value"in r?r._value:r.value;return o});e.teamType=s.target.multiple?i:i[0]}}},e._l(e.teamTypes,function(s){return t("option",{domProps:{value:s.id}},[e._v(e._s(s.team))])}),0)])]),t("div",{staticClass:"control pb2"},[t("label",{attrs:{for:"name"}},[e._v(e._s(e.$t("teams.create.team-name")))]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.name,expression:"name"}],staticClass:"input",attrs:{name:"name",placeholder:e.$t("teams.create.my-awesome-team-placeholder"),type:"text",required:""},domProps:{value:e.name},on:{keydown:function(s){return e.clearError("name")},input:function(s){s.target.composing||(e.name=s.target.value)}}}),e.errorExists("name")?t("p",{staticClass:"is-danger",domProps:{textContent:e._s(e.getFirstError("name"))}}):e._e()]),t("div",{staticClass:"control pb2"},[t("label",{attrs:{for:"identifier"}},[e._v(e._s(e.$t("teams.create.unique-team-id")))]),t("br"),t("small",[e._v(e._s(e.$t("teams.create.id-to-join-team")))]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.identifier,expression:"identifier"}],staticClass:"input",attrs:{name:"identifier",placeholder:"Awesome2021",required:""},domProps:{value:e.identifier},on:{keydown:function(s){return e.clearError("identifier")},input:function(s){s.target.composing||(e.identifier=s.target.value)}}}),e.errorExists("identifier")?t("p",{staticClass:"is-danger",domProps:{textContent:e._s(e.getFirstError("identifier"))}}):e._e()]),t("div",[t("button",{class:e.button,attrs:{disabled:e.processing}},[e._v(e._s(e.$t("teams.create.create-team")))])])])])]):e._e()])},F=[],U=c(G,D,F,!1,null,"8767c0cc");const B=U.exports,j={name:"JoinTeam",data(){return{btn:"button is-medium is-primary",identifier:"",processing:!1}},computed:{button(){return this.processing?this.btn+" is-loading":this.btn},errors(){return this.$store.state.teams.errors}},methods:{clearErrors(){this.$store.commit("teamErrors",[])},clearError(a){this.errors[a]&&this.$store.commit("clearTeamsError",a)},errorExists(a){return this.errors.hasOwnProperty(a)},getFirstError(a){return this.errors[a][0]},async submit(){this.processing=!0,await this.$store.dispatch("JOIN_TEAM",this.identifier),this.processing=!1}},mounted(){this.clearErrors()}};var Z=function(){var e=this,t=e._self._c;return t("div",{staticClass:"jtc"},[t("h1",{staticClass:"title is-2"},[e._v(e._s(e.$t("teams.dashboard.join-a-team")))]),t("div",{staticClass:"columns mt3"},[t("div",{staticClass:"column is-one-third"},[t("p",{staticClass:"mb1"},[e._v(e._s(e.$t("teams.join.enter-team-identifier")))])]),t("div",{staticClass:"column is-half card p2"},[t("form",{on:{submit:function(s){return s.preventDefault(),e.submit.apply(null,arguments)}}},[t("div",{staticClass:"control mb2"},[t("label",{attrs:{for:"join"}},[e._v(e._s(e.$t("teams.join.team-identifier")))]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.identifier,expression:"identifier"}],staticClass:"input",attrs:{name:"join",id:"join",placeholder:e.$t("teams.join.enter-id-to-join-placeholder"),required:"",autofocus:""},domProps:{value:e.identifier},on:{input:[function(s){s.target.composing||(e.identifier=s.target.value)},e.clearError]}}),e.errorExists("identifier")?t("p",{staticClass:"is-danger",domProps:{textContent:e._s(e.getFirstError("identifier"))}}):e._e()]),t("div",{staticClass:"has-text-right"},[t("button",{class:e.button,attrs:{disabled:e.processing}},[e._v(e._s(e.$t("teams.join.join-team")))])])])])])])},V=[],z=c(j,Z,V,!1,null,"c7229e4a");const q=z.exports,W={name:"MyTeams",data(){return{loading:!1,processing:!1,changing:!1,viewTeam:null,dlProcessing:!1}},computed:{activeTeam(){return this.user.active_team},current_page(){return this.members.current_page},isLeader(){const a=this.teams.find(e=>e.id===this.viewTeam);return a&&a.leader===this.user.id},members(){return this.$store.state.teams.members},show_current_page(){return this.members.current_page>1},show_next_page(){return this.members.next_page_url},teams(){return this.$store.state.teams.teams},user(){return this.$store.state.user.user}},async mounted(){this.loading=!0,await this.getUserTeams(),this.loading=!1},methods:{async changeActiveTeam(a){this.processing=!0,await this.$store.dispatch("CHANGE_ACTIVE_TEAM",a),this.processing=!1},async inactivateTeam(){var a;this.processing=!0,await this.$store.dispatch("INACTIVATE_TEAM"),this.viewTeam=(a=this.teams[0])==null?void 0:a.id,await this.changeViewedTeam(),this.processing=!1},async getUserTeams(){var e;await this.$store.dispatch("GET_USERS_TEAMS");let a=this.activeTeam||((e=this.teams[0])==null?void 0:e.id);a&&(this.viewTeam=a,await this.$store.dispatch("GET_TEAM_MEMBERS",this.viewTeam))},async leaveTeam(a){confirm(this.$t("teams.myteams.confirm-leave-team"))&&(this.loading=!0,await this.$store.dispatch("LEAVE_TEAM",a),await this.getUserTeams(),this.loading=!1)},async changeViewedTeam(){this.changing=!0,await this.$store.dispatch("GET_TEAM_MEMBERS",this.viewTeam),this.changing=!1},checkActiveTeam(a){return a===this.viewTeam?"team-active":"team-inactive"},checkActiveTeamText(a){return this.changing?"...":a===this.viewTeam?this.$t("common.active"):this.$t("common.inactive")},async download(a){this.dlProcessing=!0,await this.$store.dispatch("DOWNLOAD_DATA_FOR_TEAM",a),this.dlProcessing=!1},getRank(a){return this.members.current_page===1?a+1:a+1+(this.members.current_page-1)*10},icon(a){return a===this.viewTeam?"fa fa-check":"fa fa-ban"},medal(a){if(this.members.current_page===1){if(a===0)return"/assets/icons/gold-medal.png";if(a===1)return"/assets/icons/silver-medal.png";if(a===2)return"/assets/icons/bronze-medal.svg"}return""},previousPage(){this.$store.dispatch("PREVIOUS_MEMBERS_PAGE",this.viewTeam)},nextPage(){this.$store.dispatch("NEXT_MEMBERS_PAGE",this.viewTeam)},async toggleLeaderboardVis(a){await this.$store.dispatch("TOGGLE_LEADERBOARD_VISIBILITY",a)},formatDate(a){return f(a).format("LLL")}}};var H=function(){var e=this,t=e._self._c;return t("section",[t("div",{staticClass:"my-teams-container"},[t("h1",{staticClass:"title is-2"},[e._v(" "+e._s(e.$t("teams.myteams.title"))+" ")]),e.loading?t("p",[e._v(" "+e._s(e.$t("common.loading"))+" ")]):t("div",[t("div",{staticClass:"active-team-indicator"},[t("div",[e.user.active_team?t("div",{staticClass:"mb1"},[t("p",[e._v(" "+e._s(e.$t("teams.myteams.currently-joined-team"))+" "),t("strong",[e._v(e._s(e.user.team.name))]),e._v(". "),t("br"),e._v(" "+e._s(e.$t("teams.myteams.enabled-contributions"))+" ")])]):e.teams&&e.teams.length?t("p",{staticClass:"mb1",domProps:{innerHTML:e._s(e.$t("teams.myteams.disabled-contributions"))}}):t("p",{staticClass:"mb1"},[e._v(" "+e._s(e.$t("teams.myteams.no-joined-team"))+". ")])]),e.user.active_team?t("div",{staticClass:"button is-warning tooltip",on:{click:e.inactivateTeam}},[t("span",{staticClass:"tooltip-text disable-teams-tooltip"},[e._v(" "+e._s(e.$t("teams.myteams.disable-contributions-tooltip"))+" ")]),e._v(" "+e._s(e.$t("common.inactivate"))+" ")]):e._e()]),e.teams&&e.teams.length?t("div",{staticClass:"mb1"},[t("div",{staticClass:"is-size-3"},[e._v(" "+e._s(e.$t("teams.myteams.team-details"))+" ")]),e.isLeader?t("div",[t("p",[e._v(e._s(e.$t("teams.myteams.leader-of-team"))+".")])]):e._e()]):e._e(),e.teams&&e.teams.length?t("div",{staticStyle:{"overflow-x":"scroll"}},[t("div",{staticClass:"flex mb1"},[t("select",{directives:[{name:"model",rawName:"v-model",value:e.viewTeam,expression:"viewTeam"}],staticClass:"input mtba",staticStyle:{"max-width":"20em","min-width":"5em"},on:{change:[function(s){var i=Array.prototype.filter.call(s.target.options,function(r){return r.selected}).map(function(r){var o="_value"in r?r._value:r.value;return o});e.viewTeam=s.target.multiple?i:i[0]},e.changeViewedTeam]}},[t("option",{attrs:{disabled:""},domProps:{selected:!e.viewTeam,value:null}},[e._v(" "+e._s(e.$t("teams.myteams.join-team"))+" ")]),e._l(e.teams,function(s){return t("option",{key:s.id,domProps:{value:s.id}},[e._v(" "+e._s(s.name)+" ")])})],2)]),t("table",{staticClass:"table is-fullwidth is-hoverable has-text-centered"},[t("thead",[t("th",[e._v(e._s(e.$t("teams.myteams.position-header")))]),t("th",[e._v(e._s(e.$t("teams.myteams.name-header")))]),t("th",[e._v(e._s(e.$t("teams.myteams.username-header")))]),t("th",[e._v(e._s(e.$t("teams.myteams.status-header")))]),t("th",[e._v(e._s(e.$t("teams.myteams.photos-header")))]),t("th",[e._v(e._s(e.$t("teams.myteams.litter-header")))]),t("th",[e._v(e._s(e.$t("teams.myteams.last-activity-header")))])]),t("tbody",e._l(e.members.data,function(s,i){return t("tr",{key:s.id},[t("td",[t("div",{staticClass:"medal-container"},[t("img",{directives:[{name:"show",rawName:"v-show",value:i<3,expression:"index < 3"}],staticClass:"medal",attrs:{src:e.medal(i)}}),t("span",[e._v(e._s(e.getRank(i)))])])]),t("td",[e._v(e._s(s.name?s.name:"-"))]),t("td",[e._v(e._s(s.username?s.username:"-"))]),t("td",{staticStyle:{width:"9em","white-space":"nowrap"}},[t("span",{class:e.checkActiveTeam(s.active_team)},[t("i",{class:e.icon(s.active_team)}),e._v(" "+e._s(e.checkActiveTeamText(s.active_team))+" ")])]),t("td",[e._v(e._s(s.pivot.total_photos))]),t("td",[e._v(e._s(s.pivot.total_litter))]),t("td",{staticStyle:{"max-width":"100px"}},[e._v(" "+e._s(s.pivot.updated_at?e.formatDate(s.pivot.updated_at):"-")+" ")])])}),0)]),t("div",{staticClass:"has-text-centered"},[t("a",{directives:[{name:"show",rawName:"v-show",value:this.current_page>1,expression:"this.current_page > 1"}],staticClass:"pagination-previous",on:{click:e.previousPage}},[e._v(e._s(e.$t("common.previous")))]),t("a",{directives:[{name:"show",rawName:"v-show",value:this.show_next_page,expression:"this.show_next_page"}],staticClass:"pagination-next",on:{click:e.nextPage}},[e._v(e._s(e.$t("common.next-page")))])])]):e._e(),e.teams&&e.teams.length?t("div",{staticStyle:{"overflow-x":"scroll"}},[t("div",{staticClass:"is-size-3 mb1"},[e._v(" "+e._s(e.$t("teams.myteams.all-my-teams"))+" ")]),t("table",{staticClass:"table is-fullwidth is-hoverable"},[t("thead",[t("th",[e._v(e._s(e.$t("teams.myteams.name-header")))]),t("th",[e._v(e._s(e.$t("teams.myteams.identifier-header")))]),t("th",[e._v(e._s(e.$t("teams.myteams.members-header")))]),t("th",[e._v(e._s(e.$t("teams.myteams.photos-header")))]),t("th",[e._v(e._s(e.$t("teams.myteams.litter-header")))]),t("th",[e._v(e._s(e.$t("common.actions")))])]),t("tbody",e._l(e.teams,function(s){return t("tr",{key:s.id,class:s.id===e.activeTeam?"is-primary-row":""},[t("td",[e._v(e._s(s.name))]),t("td",[e._v(e._s(s.identifier))]),t("td",[e._v(e._s(s.members))]),t("td",[e._v(e._s(s.total_images))]),t("td",[e._v(e._s(s.total_litter))]),t("td",{staticStyle:{"min-width":"120px","max-width":"150px"}},[t("button",{staticClass:"button is-small is-primary team-action tooltip",class:e.processing?"is-loading":"",attrs:{disabled:s.id===e.activeTeam},on:{click:function(i){return e.changeActiveTeam(s.id)}}},[t("span",{staticClass:"tooltip-text"},[e._v(" "+e._s(s.id===e.activeTeam?e.$t("teams.myteams.this-is-active-team"):e.$t("teams.myteams.set-as-active-team"))+" ")]),t("i",{staticClass:"fa fa-star"})]),t("button",{staticClass:"button is-small is-info team-action tooltip",class:e.dlProcessing?"is-loading":"",on:{click:function(i){return e.download(s.id)}}},[t("span",{staticClass:"tooltip-text"},[e._v(e._s(e.$t("teams.myteams.download-team-data")))]),t("i",{staticClass:"fa fa-download"})]),t("button",{staticClass:"button is-small is-danger team-action tooltip",attrs:{disabled:s.members<=1},on:{click:function(i){return e.leaveTeam(s.id)}}},[t("span",{staticClass:"tooltip-text"},[e._v(" "+e._s(s.members>1?e.$t("teams.myteams.leave-team"):e.$t("teams.myteams.cant-leave-team"))+" ")]),t("i",{staticClass:"fa fa-sign-out"})]),s.leader===e.user.id?t("button",{staticClass:"button is-small is-warning team-action tooltip",on:{click:function(i){return e.toggleLeaderboardVis(s.id)}}},[t("span",{staticClass:"tooltip-text"},[e._v(" "+e._s(s.leaderboards?e.$t("teams.myteams.hide-from-leaderboards"):e.$t("teams.myteams.show-on-leaderboards"))+" ")]),t("i",{staticClass:"fa",class:s.leaderboards?"fa-eye-slash":"fa-eye"})]):e._e()])])}),0)])]):e._e()])])])},J=[],Y=c(W,H,J,!1,null,"8042d205");const X=Y.exports,K={name:"TeamSettings",data(){return{loading:!0,privacySectionSelectedTeamId:0,attributesSectionSelectedTeamId:0,privacyAllProcessing:!1,privacySubmitProcessing:!1,attributesProcessing:!1,attributesTeamName:"",attributesTeamIdentifier:"",btnAll:"button is-medium is-primary mt1",btn:"button is-medium is-warning mt1 mr1"}},async created(){var a,e;this.loading=!0,this.teams.length===0&&await this.$store.dispatch("GET_USERS_TEAMS"),this.privacySectionSelectedTeamId=(a=this.teams[0])==null?void 0:a.id,this.attributesSectionSelectedTeamId=(e=this.teamsLedByUser[0])==null?void 0:e.id,this.clearErrors(),this.loading=!1},watch:{attributesSectionSelectedTeam(){this.attributesTeamName=this.attributesSectionSelectedTeam.name,this.attributesTeamIdentifier=this.attributesSectionSelectedTeam.identifier}},computed:{allButton(){return this.privacyAllProcessing?this.btnAll+" is-loading":this.btnAll},disabled(){return this.privacyAllProcessing||this.privacySubmitProcessing},submitButton(){return this.privacySubmitProcessing?this.btn+" is-loading":this.btn},show_name_leaderboards:{get(){return this.team.pivot.show_name_leaderboards},set(a){this.$store.commit("team_settings",{team_id:this.privacySectionSelectedTeamId,key:"show_name_leaderboards",v:a})}},show_username_leaderboards:{get(){return this.team.pivot.show_username_leaderboards},set(a){this.$store.commit("team_settings",{team_id:this.privacySectionSelectedTeamId,key:"show_username_leaderboards",v:a})}},show_name_maps:{get(){return this.team.pivot.show_name_maps},set(a){this.$store.commit("team_settings",{team_id:this.privacySectionSelectedTeamId,key:"show_name_maps",v:a})}},show_username_maps:{get(){return this.team.pivot.show_username_maps},set(a){this.$store.commit("team_settings",{team_id:this.privacySectionSelectedTeamId,key:"show_username_maps",v:a})}},team(){return this.teams.find(a=>a.id===this.privacySectionSelectedTeamId)},attributesSectionSelectedTeam(){return this.teamsLedByUser.find(a=>a.id===this.attributesSectionSelectedTeamId)},teams(){return this.$store.state.teams.teams},user(){return this.$store.state.user.user},teamsLedByUser(){return this.teams.filter(a=>a.leader===this.user.id)},errors(){return this.$store.state.teams.errors}},methods:{async submit(a){a?this.privacyAllProcessing=!0:this.privacySubmitProcessing=!0,await this.$store.dispatch("SAVE_TEAM_SETTINGS",{all:a,team_id:this.privacySectionSelectedTeamId}),this.privacySubmitProcessing=!1,this.privacyAllProcessing=!1},async updateTeam(){if(this.attributesProcessing=!0,await this.$store.dispatch("UPDATE_TEAM",{teamId:this.attributesSectionSelectedTeamId,name:this.attributesTeamName,identifier:this.attributesTeamIdentifier}),this.attributesProcessing=!1,!Object.keys(this.errors).length&&(await this.$store.dispatch("GET_USERS_TEAMS"),this.user.active_team===this.attributesSectionSelectedTeamId)){let a=this.teams.find(e=>e.id===this.attributesSectionSelectedTeamId);this.$store.commit("usersTeam",a)}},clearErrors(){this.$store.commit("teamErrors",[])},clearError(a){this.errors[a]&&this.$store.commit("clearTeamsError",a)},getFirstError(a){return this.errors[a]?this.errors[a][0]:null}}};var Q=function(){var e=this,t=e._self._c;return t("div",{staticClass:"tsc"},[t("h1",{staticClass:"title is-2"},[e._v(e._s(e.$t("teams.dashboard.settings")))]),!e.loading&&!e.teams.length?t("p",{staticClass:"mb1"},[e._v(e._s(e.$t("teams.myteams.no-joined-team"))+".")]):e._e(),e.teams.length?t("div",{staticClass:"columns mt3 mb3"},[t("div",{staticClass:"column is-one-third pt0"},[t("h1",{staticClass:"title"},[e._v(e._s(e.$t("teams.settings.privacy-title")))]),t("p",{staticClass:"mb1"},[e._v(e._s(e.$t("teams.settings.privacy-text")))])]),t("div",{staticClass:"column is-half card p2"},[e.loading?t("p",[e._v(e._s(e.$t("common.loading")))]):t("div",[t("select",{directives:[{name:"model",rawName:"v-model",value:e.privacySectionSelectedTeamId,expression:"privacySectionSelectedTeamId"}],staticClass:"input mb2",on:{change:function(s){var i=Array.prototype.filter.call(s.target.options,function(r){return r.selected}).map(function(r){var o="_value"in r?r._value:r.value;return o});e.privacySectionSelectedTeamId=s.target.multiple?i:i[0]}}},e._l(e.teams,function(s){return t("option",{domProps:{value:s.id}},[e._v(" "+e._s(s.name)+" ")])}),0),t("h1",{staticClass:"title is-4"},[e._v(e._s(e.$t("teams.settings.maps.team-map"))+":")]),t("label",{staticClass:"checkbox mb1"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.show_name_maps,expression:"show_name_maps"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.show_name_maps)?e._i(e.show_name_maps,null)>-1:e.show_name_maps},on:{change:function(s){var i=e.show_name_maps,r=s.target,o=!!r.checked;if(Array.isArray(i)){var l=null,m=e._i(i,l);r.checked?m<0&&(e.show_name_maps=i.concat([l])):m>-1&&(e.show_name_maps=i.slice(0,m).concat(i.slice(m+1)))}else e.show_name_maps=o}}}),e._v(" "+e._s(e.$t("settings.privacy.credit-name"))+" ")]),t("br"),t("label",{staticClass:"checkbox mb1"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.show_username_maps,expression:"show_username_maps"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.show_username_maps)?e._i(e.show_username_maps,null)>-1:e.show_username_maps},on:{change:function(s){var i=e.show_username_maps,r=s.target,o=!!r.checked;if(Array.isArray(i)){var l=null,m=e._i(i,l);r.checked?m<0&&(e.show_username_maps=i.concat([l])):m>-1&&(e.show_username_maps=i.slice(0,m).concat(i.slice(m+1)))}else e.show_username_maps=o}}}),e._v(" "+e._s(e.$t("settings.privacy.credit-username"))+" ")]),t("p",{directives:[{name:"show",rawName:"v-show",value:e.show_name_maps,expression:"show_name_maps"}],staticClass:"is-green"},[e._v(e._s(e.$t("teams.settings.maps.name-will-appear")))]),t("p",{directives:[{name:"show",rawName:"v-show",value:e.show_username_maps,expression:"show_username_maps"}],staticClass:"is-green"},[e._v(e._s(e.$t("teams.settings.maps.username-will-appear")))]),t("p",{directives:[{name:"show",rawName:"v-show",value:!e.show_name_maps&&!e.show_username_maps,expression:"! show_name_maps && ! show_username_maps"}],staticClass:"is-red"},[e._v(e._s(e.$t("teams.settings.maps.will-not-appear")))]),t("h1",{staticClass:"title is-4 mt1"},[e._v(e._s(e.$t("teams.settings.leaderboards.team-leaderboard"))+":")]),t("label",{staticClass:"checkbox mb1"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.show_name_leaderboards,expression:"show_name_leaderboards"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.show_name_leaderboards)?e._i(e.show_name_leaderboards,null)>-1:e.show_name_leaderboards},on:{change:function(s){var i=e.show_name_leaderboards,r=s.target,o=!!r.checked;if(Array.isArray(i)){var l=null,m=e._i(i,l);r.checked?m<0&&(e.show_name_leaderboards=i.concat([l])):m>-1&&(e.show_name_leaderboards=i.slice(0,m).concat(i.slice(m+1)))}else e.show_name_leaderboards=o}}}),e._v(" "+e._s(e.$t("settings.privacy.credit-name"))+" ")]),t("br"),t("label",{staticClass:"checkbox mb1"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.show_username_leaderboards,expression:"show_username_leaderboards"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.show_username_leaderboards)?e._i(e.show_username_leaderboards,null)>-1:e.show_username_leaderboards},on:{change:function(s){var i=e.show_username_leaderboards,r=s.target,o=!!r.checked;if(Array.isArray(i)){var l=null,m=e._i(i,l);r.checked?m<0&&(e.show_username_leaderboards=i.concat([l])):m>-1&&(e.show_username_leaderboards=i.slice(0,m).concat(i.slice(m+1)))}else e.show_username_leaderboards=o}}}),e._v(" "+e._s(e.$t("settings.privacy.credit-username"))+" ")]),t("p",{directives:[{name:"show",rawName:"v-show",value:e.show_name_leaderboards,expression:"show_name_leaderboards"}],staticClass:"is-green"},[e._v(e._s(e.$t("teams.settings.leaderboards.name-will-appear")))]),t("p",{directives:[{name:"show",rawName:"v-show",value:e.show_username_leaderboards,expression:"show_username_leaderboards"}],staticClass:"is-green"},[e._v(e._s(e.$t("teams.settings.leaderboards.username-will-appear")))]),t("p",{directives:[{name:"show",rawName:"v-show",value:!e.show_name_leaderboards&&!e.show_username_leaderboards,expression:"! show_name_leaderboards && ! show_username_leaderboards"}],staticClass:"is-red"},[e._v(e._s(e.$t("teams.settings.leaderboards.will-not-appear")))]),t("div",{staticClass:"flex"},[t("button",{class:e.submitButton,attrs:{disabled:e.disabled},on:{click:function(s){return e.submit(!1)}}},[e._v(e._s(e.$t("teams.settings.submit-one-team")))]),t("button",{class:e.allButton,attrs:{disabled:e.disabled},on:{click:function(s){return e.submit(!0)}}},[e._v(e._s(e.$t("teams.settings.apply-all-teams")))])])])])]):e._e(),e.teamsLedByUser.length?t("div",{staticClass:"columns mb3"},[t("div",{staticClass:"column is-one-third pt0"},[t("h1",{staticClass:"title"},[e._v(e._s(e.$t("teams.settings.team-update-title")))]),t("p",{staticClass:"mb1"},[e._v(e._s(e.$t("teams.settings.team-update-text")))])]),t("div",{staticClass:"column is-half card p2"},[e.loading?t("p",[e._v(e._s(e.$t("common.loading")))]):t("div",[t("form",{attrs:{method:"post"},on:{submit:function(s){return s.preventDefault(),e.updateTeam.apply(null,arguments)}}},[t("div",{staticClass:"control pb2"},[t("p",[e._v(e._s(e.$t("teams.create.select-team")))]),t("div",{staticClass:"select"},[t("select",{directives:[{name:"model",rawName:"v-model",value:e.attributesSectionSelectedTeamId,expression:"attributesSectionSelectedTeamId"}],on:{change:function(s){var i=Array.prototype.filter.call(s.target.options,function(r){return r.selected}).map(function(r){var o="_value"in r?r._value:r.value;return o});e.attributesSectionSelectedTeamId=s.target.multiple?i:i[0]}}},e._l(e.teamsLedByUser,function(s){return t("option",{domProps:{value:s.id}},[e._v(" "+e._s(s.name)+" ")])}),0)])]),t("div",{staticClass:"control pb2"},[t("label",{attrs:{for:"name"}},[e._v(e._s(e.$t("teams.create.team-name")))]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.attributesTeamName,expression:"attributesTeamName"}],staticClass:"input",attrs:{name:"name",placeholder:e.$t("teams.create.my-awesome-team-placeholder"),type:"text",required:""},domProps:{value:e.attributesTeamName},on:{keydown:function(s){return e.clearError("name")},input:function(s){s.target.composing||(e.attributesTeamName=s.target.value)}}}),e.getFirstError("name")?t("p",{staticClass:"is-danger",domProps:{textContent:e._s(e.getFirstError("name"))}}):e._e()]),t("div",{staticClass:"control pb2"},[t("label",{attrs:{for:"identifier"}},[e._v(e._s(e.$t("teams.create.unique-team-id")))]),t("br"),t("small",[e._v(e._s(e.$t("teams.create.id-to-join-team")))]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.attributesTeamIdentifier,expression:"attributesTeamIdentifier"}],staticClass:"input",attrs:{id:"identifier",name:"identifier",placeholder:"Awesome2021",required:""},domProps:{value:e.attributesTeamIdentifier},on:{keydown:function(s){return e.clearError("identifier")},input:function(s){s.target.composing||(e.attributesTeamIdentifier=s.target.value)}}}),e.getFirstError("identifier")?t("p",{staticClass:"is-danger",domProps:{textContent:e._s(e.getFirstError("identifier"))}}):e._e()]),t("div",[t("button",{class:e.btnAll,attrs:{disabled:e.attributesProcessing}},[e._v(e._s(e.$t("teams.create.update-team")))])])])])])]):e._e()])},ee=[],te=c(K,Q,ee,!1,null,"1189eacc");const se=te.exports,ae={name:"TeamsLeaderboard",data(){return{loading:!0}},async created(){await this.$store.dispatch("GET_TEAMS_LEADERBOARD"),this.loading=!1},computed:{teams(){return this.$store.state.teams.leaderboard}},methods:{getDate(a){return f(a).format("LL")},medal(a){return a===0?"/assets/icons/gold-medal.png":a===1?"/assets/icons/silver-medal.png":a===2?"/assets/icons/bronze-medal.svg":""}}};var ie=function(){var e=this,t=e._self._c;return t("section",[t("div",{staticClass:"my-teams-container"},[t("h1",{staticClass:"title is-2"},[e._v(e._s(e.$t("teams.leaderboard.title")))]),e.loading?t("p",[e._v(e._s(e.$t("common.loading")))]):t("table",{staticClass:"table is-fullwidth is-hoverable has-text-centered"},[t("thead",[t("th",[e._v(e._s(e.$t("teams.leaderboard.position-header")))]),t("th",[e._v(e._s(e.$t("teams.leaderboard.name-header")))]),t("th",[e._v(e._s(e.$t("teams.leaderboard.litter-header")))]),t("th",[e._v(e._s(e.$t("teams.leaderboard.photos-header")))]),t("th",[e._v(e._s(e.$t("teams.leaderboard.created-at-header")))])]),t("tbody",e._l(e.teams,function(s,i){return t("tr",[t("td",[t("div",{staticClass:"medal-container"},[t("img",{directives:[{name:"show",rawName:"v-show",value:i<3,expression:"index < 3"}],staticClass:"medal",attrs:{src:e.medal(i)}}),t("span",[e._v(e._s(i+1))])])]),t("td",[e._v(e._s(s.name))]),t("td",[e._v(e._s(s.total_litter))]),t("td",[e._v(e._s(s.total_images))]),t("td",[e._v(e._s(e.getDate(s.created_at)))])])}),0)])])])},re=[],ne=c(ae,ie,re,!1,null,"f92a40f4");const oe=ne.exports,me={name:"Teams",components:{TeamsDashboard:R,CreateTeam:B,JoinTeam:q,MyTeams:X,TeamSettings:se,TeamsLeaderboard:oe},async created(){this.loading=!0,await this.$store.dispatch("GET_TEAM_TYPES"),this.teams.length===0&&await this.$store.dispatch("GET_USERS_TEAMS"),this.loading=!1},data(){return{loading:!0,items:[{name:this.$t("teams.dashboard.dashboard"),icon:"fa fa-home teams-icon",component:"TeamsDashboard"},{name:this.$t("teams.dashboard.join-a-team"),icon:"fa fa-sign-in teams-icon",component:"JoinTeam"},{name:this.$t("teams.dashboard.create-a-team"),icon:"fa fa-plus teams-icon",component:"CreateTeam"},{name:this.$t("teams.myteams.title"),icon:"fa fa-users teams-icon",component:"MyTeams"},{name:this.$t("teams.dashboard.leaderboard"),icon:"fa fa-trophy teams-icon",component:"TeamsLeaderboard"},{name:this.$t("teams.dashboard.settings"),icon:"fa fa-gear teams-icon",component:"TeamSettings"}]}},computed:{teams(){return this.$store.state.teams.teams},type(){return this.$store.state.teams.component_type}},methods:{goto(a){this.$store.commit("teamComponent",a)}}};var le=function(){var e=this,t=e._self._c;return t("section",[t("div",{staticClass:"columns"},[t("div",{staticClass:"column is-one-fifth teams-left-col"},[t("p",{staticClass:"teams-title"},[e._v(e._s(e.$t("teams.dashboard.olm-teams")))]),e._l(e.items,function(s){return t("div",{staticClass:"team-flex",on:{click:function(i){return e.goto(s.component)}}},[t("i",{class:s.icon}),t("p",{staticClass:"mtba"},[e._v(e._s(s.name))])])})],2),t("div",{staticClass:"column pt3 mobile-teams-padding",staticStyle:{"background-color":"#edf1f4"}},[e.loading?t("p",[e._v(e._s(e.$t("common.loading")))]):t(e.type,{tag:"component"})],1)])])},ce=[],de=c(me,le,ce,!1,null,"e7bd35ae");const ye=de.exports;export{ye as default}; diff --git a/public/build/assets/Terms-CdLjzXTS.js b/public/build/assets/Terms-V1Ug9pC6.js similarity index 99% rename from public/build/assets/Terms-CdLjzXTS.js rename to public/build/assets/Terms-V1Ug9pC6.js index 174c9bc9..012339da 100644 --- a/public/build/assets/Terms-CdLjzXTS.js +++ b/public/build/assets/Terms-V1Ug9pC6.js @@ -1 +1 @@ -import{n as o}from"./app-DuS6KM7M.js";/* empty css */const r={name:"Terms"};var i=function(){var e=this;return e._self._c,e._m(0)},a=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"container"},[e("h1",[t._v("PLEASE READ CAREFULLY BEFORE USING OPEN LITTER MAP")]),e("p",[e("i",[t._v(" Last updated: 17"),e("sup",[t._v("th")]),t._v(" Feb 2018 ")])]),e("br"),t._v(' This END USER LICENCE AGREEMENT (the “EULA” or the "Licence") is a legal agreement between you (the "Licensee" or "you") and Seán Lynch trading as OpenLitterMap.com (“OpenLitterMap”, the “Licensor”, “our” or "we") for your licensed use of and access to www.OpenLitterMap.com (the “Website”), the internet based user interface (the “Web Application”) and the multi-platform smartphone and tablet software application (the “Mobile Application”) which will launch soon (together the Website, the Web Application and the Mobile Application are hereafter described as the “Platform”) and your access to the data-logging process which provides a means for Citzien Scientists (you) to contribute and attribute geotagged images of litter (eg. "cigarette butts", "plastic bottles", etc.) through our content-sharing platform (the "Services") in accordance with the terms of this Agreement. '),e("br"),t._v(" The Terms of Service (hereforth referred to as the “Terms”) govern access and use of the OpenLitterMap website. These Terms are a legal agreement between you and us. By using these Services you are agreeing to these Terms. "),e("br"),t._v(" OpenLitterMap data is "),e("a",{attrs:{href:"https://opendatacommons.org/licenses/odbl/"}},[t._v("Open Data, licensed by the Open Database Licence")]),t._v(" (ODBl - https://opendatacommons.org/licenses/odbl/). Any rights in individual contents of the database are licenced under the Database Contents License: http://opendatacommons.org/licenses/dbcl/1.0/ "),e("br"),t._v(' This means that anyone is free to copy, distribute, share and use our data, as long as you credit OpenLitterMap and its contributors with "© OpenLitterMap & Contributors". '),e("br"),e("br"),e("b",[t._v("DISCLAIMER: OpenLitterMap is not intended for use by individuals in an emergency situation nor is it currently being used to notify law enforcement or public bodies of the existence of real time litter issues. It is currently being used for geostatistical and awareness-raising purposes only. If you wish to report a specific issue of concern regarding the collection and removal of litter, please contact your local authority. We are not yet in contact with Local Authorities and we cannot guarantee that our 3rd party communication with them will enable their response to be as effective as contact from a concerned member of the public. However, with your ongoing participation we hope to achieve this to solve problems such as the millions of tonnes of plastic entering the ocean of our only habitable planet.")]),e("br"),e("br"),e("p",[t._v("PLEASE BE CAREFUL AND REMAIN VIGILANT WHEN DEALING WITH LITTER, PARTICULARLY DRUG-RELATED LITTER (EG. NEEDLES & INJECTING EQUIPMENT), AS IT POSES A SIGNIFICANT THREAT TO YOUR PERSONAL HEALTH AND WELL-BEING. YOU ARE ENTIRELY RESPONISBLE FOR YOURSELF WHEN YOU ARE DEALING WITH LITTER IN ANY WAY INCLUDING LOOKING FOR, PHOTOGRAPHING, COLLECTING DATA ON, REMOVING, ATTEMPTING TO REMOVE AND/OR ANY OTHER MEANS OF COMING INTO CONTACT WITH LITTER AND/OR DRUG-RELATED LITTER. UNDER NO CIRCUMSTANCES CAN WE BE HELD ACCOUNTABLE FOR PERSONAL INJURUES OR ANY OTHER CLAIMS RESULTING FROM ANY CONTENT PUBLISHED TO OR COMING FROM THIS WEBSITE INCLUDING PERSONAL INJURIES FROM NEEDLES, NEEDLE-STICKS OR ANY OTHER FORM OF DRUG PARAPHANALIA OR HARM THAT MAY BE CAUSED FROM ACCIDENTS, DISCOVERY OF, MISHANDLING OF AND THE USE OR IMPROPER USE OF DRUG PARAPHANALIA OR DRUG-RELATED LITTER."),e("b",[t._v(" YOU UNRESERVEDLY AGREE TO REMOVE OUR LIABILITY FROM ANY DAMAGES THAT MAY OCCUR FROM USE OR ACCESS OF THESE SERVICES OR FROM INFORMATION SHARED BY A 3RD PARTY.")])]),e("br"),e("p",[t._v("BY REGISTERING FOR, UPLOADING TO AND/OR DOWNLOADING DATA AND INFORMATION FROM THE PLATFORM AND YOUR SUBSEQUENT CONTINUED USE OF THE PLATFORM AND THE SERVICES, YOU CONSENT TO BE BOUND BY THIS LICENCE. BY TICKING THE BOX ON REGISTRATION, AND AT ANY OTHER TIME ON LOGGING IN TO THE PLATFORM AND THROUGH YOUR CONTINUED USE OF THE SERVICES AND THE PLATFORM, YOU AGREE TO BE BOUND TO THE TERMS OF THIS LICENCE. IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS AGREEMENT, THEN DO NOT REGISTER FOR THE PLATFORM, OR USE ANY OF THE SERVICES. BY TICKING THE BOX YOU CONFIRM THAT YOU HAVE READ, YOU DO ACCEPT AND UNDERSTAND THE TERMS OF THIS LICENCE AGREEMENT; THAT YOU ALSO CONSENT TO USE ELECTRONIC SIGNATURES AND ACKNOWLEDGE YOUR TICKING OF BOX TO BE AN ELECTRONIC SIGNATURE SUFFICIENT TO BIND YOU TO THE TERMS OF THIS LICENCE AGREEMENT.")]),e("br"),e("br"),e("h3",[t._v("SECTION 1. GRANT AND SCOPE OF LICENCE")]),e("div",{staticClass:"container"},[e("p",[t._v("1.1 General: ")]),e("div",{staticClass:"container"},[t._v(" OpenLitterMap provides you with access to the services through its platform. All verified litter data (120+ items, lat, lon, timestamp and OpenStreetMap address at each location) is Free and Open to download by Country, State or City and can be used for your own research, educational or commercial purposes, available through the Open Database Licence (ODbl - https://opendatacommons.org/licenses/odbl/). Link "),e("a",{attrs:{href:"https://opendatacommons.org/licenses/odbl/"}},[t._v("here")]),t._v(". ")]),e("br"),e("br"),e("p",[t._v("1.2 Definitions:")]),e("div",{staticClass:"container"},[t._v(" 1.2.1 Content: the Services and the Platform provides information including images, time and location data of litter that is supplied by our community of contributors, which is designed to raise awareness of litter and to provide hyper-geostatistical information to public bodies, various stakeholders and other interested parties to assist and inform the decisions made in relation littering to challenge the destructive plastic pollution paradigm; and "),e("br"),e("br"),t._v("1.2.2 User Generated Content: the information, images or content provided by an End User posted to the Platform. ")]),e("br"),e("p",[t._v("1.3 Licence:")]),e("div",{staticClass:"container"},[t._v(" OpenLitterMap hereby grants to you a limited, personal or commercial, non- exclusive, non-transferable, temporary, revocable, non-assignable, non-sub-licensable licence and right to access the Platform and the Services though a generally available web browser in consideration of your strict and continued compliance with the following conditions: "),e("br"),e("br"),t._v("1.3.1 your agreement, as evidenced by your acceptance of this EULA and your continued use of the Platform and the Services, to abide by the terms of this Licence; "),e("br"),e("br"),t._v("1.3.2 your continuing compliance with the terms of this EULA and the Privacy Policy posted on the Website (which is hereby incorporated by this reference); and "),e("br"),e("br"),t._v("1.3.3 not to use scraping, spidering, crawling or other technology or software of a malicious nature to access or make available to third parties information or data secured by the Platform, whether such data or information relates to OpenLitterMap , the Platform, the Services or Content without the express written consent of OpenLitterMap. ")]),e("br"),e("p",[t._v("1.4 Use: Any use of the Platform, its software and/or Services or any part thereof in a manner contrary to the scope and purpose of this Licence is strictly prohibited and a violation of this Agreement, terminable in accordance with Section 12. OpenLitterMap is not intended for emergency use and users should apply extreme caution to their personal safety when using the Platform and engaging with or photographing litter, particularly needles, needle-sticks, syringes or any other form of drug-related litter. This Platform and the Content should only be used as an educational, statistics gathering tool and for aiding decision support. It is not intended to override or replace the obligation and necessity for reporting of litter to the appropriate authority in the geographical area in which the litter is identified. This Platform and the Content is currently only available directly as a web app from www.OpenLitterMap.com. Sourcing this Platform from another source without the consent of OpenLitterMap is not permitted and a direct breach of the terms of this Agreement.")]),e("br"),e("p",[t._v("1.5 Intellectual Property:")]),e("div",{staticClass:"container"},[e("br"),t._v("1.5.1 “Intellectual Property Right(s)” includes any patent, trade or other mark, registered design, topography right, copyright, database right or any other right in the nature of any of the foregoing (or application, or right to apply for, any of the foregoing), and trade or business name, invention, discovery, improvement, design, technique, confidential process or information or know how, in each case subsisting anywhere in the world and whether registered, unregistered, or unregisterable, and any licence or right of user of any of the foregoing, and the full right to all legal protection relating to the same; "),e("br"),e("br"),t._v("1.5.2 Seán Lynch reserves all Intellectual Property Rights in and to the Platform, the Content and the Services and any such Intellectual Property Right shall at all times be and for all purposes remain vested in OpenLitterMap and/or its licensors, including all copies made of the Website and the Web with Section 10. ")]),e("br"),t._v("1.6 Reciprocal Licence: End Users grant to OpenLitterMap and its licensors an irrevocable, royalty free and non-exclusive licence to use, copy, modify, adapt, translate and distribute anonymised or personally or organisationally attributed geostatistical or operational information relating to the uses made of the Application by End Users, or about the Device and related software, hardware and peripherals, information relating to their Device and the Platform and content on the Device (“Metadata”) to provide services and to develop and improve the Platform. Metadata expressly does not include personal data the use, control and processing of which is governed by our Privacy Policy."),e("p")]),e("br"),e("h3",[t._v("SECTION 2. ACCESS TO THE SERVICES")]),e("br"),e("p",[t._v("2.1. Your Account: OpenLitterMap is offering access to and use of the Platform and the Services solely for use by the person or entity in whose name an account is registered and not for the use or benefit of any third party. OpenLitterMap may change, suspend or discontinue any part of the Platform, the Content and/or the Services at any time, including the availability of any feature, database, or content. "),e("br"),e("br"),t._v("2.2 Account Limitation: The Licensor may also impose limits on certain features of the Platform and the Services or restrict your access to parts or all of the Services without notice or liability. For as long as the Licensor continues to offer the Platform and the Services, we shall provide and seek to update, improve and expand. Therefore, OpenLitterMap reserves the right, at its discretion, to modify this EULA at any time by posting a notice on the Platform, or by sending you a notice via e-mail, and you consent to the receipt of such notice. You shall be responsible for reviewing and becoming familiar with any such modifications. Your use of the Platform and the Services following such notification constitutes your acceptance of the terms and conditions of this EULA as modified. Any new features that materially augment or enhance the Platform and/or the Services currently available, including the release of new tools and resources, shall be subject to this Agreement (as updated). You can review the most current version of the EULA at any time at: www.OpenLitterMap.com/terms. "),e("br"),e("br"),t._v("2.3 Account Availability: The Licensor will use reasonable efforts to ensure that the Platform and the Services are available twenty-four hours a day, seven days a week. However, access to the Platform and Services shall be as they may exist and be available on any given day and the Licensor has no other obligation, except as expressly stated in this EULA. There will be occasions when the Platform and the Services will be unavailable or interrupted for maintenance, upgrades and emergency repairs or due to failure of telecommunications links and equipment. Every reasonable step will be taken by OpenLitterMap to minimize such disruption where it is within OpenLitterMap's reasonable control. YOU AGREE THAT OpenLitterMap WILL NOT BE LIABLE IN ANY EVENT TO YOU OR ANY OTHER PARTY FOR ANY SUSPENSION, MODIFICATION, DISCONTINUANCE OR LACK OF AVAILABILITY OF THE PLATFORM, SERVICES OR OTHER CONTENT. The Licensor retains the right to create limits on use and storage with respect to the Platform and the Services determined at its sole discretion at any time with or without notice. "),e("br"),e("br"),t._v("2.4 Eligibility: To be eligible to use the Platform and the Services, you must meet the following criteria and represent and warrant that you: ")]),e("div",{staticClass:"container"},[e("br"),t._v("2.4.1 are not currently restricted from use of the Platform and the Services, or not otherwise prohibited from having an account with OpenLitterMap; "),e("br"),e("br"),t._v("2.4.2 will only maintain one End User Account at any given time (unless explicitly consented to by OpenLitterMap ); "),e("br"),e("br"),e("br"),t._v("2.4.3 will not violate any rights of OpenLitterMap, including Intellectual Property Rights such as copyright, patent, design or trademark rights; "),e("br"),e("br"),t._v("2.4.4 agree to provide at your cost all equipment, software, and internet access necessary to use the Platform and the Services; "),e("br"),t._v("2.4.5 understand and agree that use of the Platform and the Services may entail the applicability of certain incidental usage charges (“Incidental Charges”) during the installation and use of the Service. These Incidental Charges may, among others, be levied by your mobile network operator or your internet service provider. You are advised to consult your mobile data or internet data plan to identify the Incidental Charges which may be incurred prior to the installation and operation of these Services; and "),e("br"),t._v("2.4.6 you are responsible for your own personal safety if you come into contact with people engaged in illegal behaviour and you are wholly and completely independently responsible for your own personal belongings. You are responsible for any personal decisions made arising from our services including personal injury or injuries from gathering data on litter paricularly drug-related litter or for visiting areas known to be frequented by people who choose to consume illicit substances or engage in anti-social behaviour particularly in areas where hazardous injecting equipment lays idle and exposed. ")]),e("br"),e("br"),t._v("2.5 Suitability: You certify to OpenLitterMap that you are legally permitted to use the Platform and the Services, and take full responsibility for the selection and use of the Platform and the Services. "),e("br"),e("br"),t._v("2.6 Prohibition by law: This Agreement is void where prohibited by law, and the right to use the Platform and Services are revoked in such jurisdictions. OpenLitterMap makes no claim that the Services may be lawfully used or that User Generated Content may be uploaded or downloaded in any jurisdiction save the jurisdiction specified by this EULA. Access to the Content made available via the Platform may not be legally permitted by certain persons or in certain countries. If you use the Services or the Platform from outside Ireland, you do so at your own risk and you are responsible for compliance with the laws of that jurisdiction. Furthermore, if you believe that you are entitled or obligated to act contrary to this Agreement under any mandatory law, you agree to provide us with a detailed and substantiated explanation of your reasons in writing at least 30 days before you act contrary to this Agreement, to allow us to assess whether we may, at our sole discretion, provide an alternative remedy for the situation, though we are under no obligation to do so. "),e("br"),e("br"),t._v("2.7. Privacy: Please note that privacy is very important to us. You should not enter and should also protect sensitive personal information such as your phone number, street address, or other information that is confidential in nature, by avoiding inputting them in fields that would present in a public manner or as identifying information. Please see our Privacy Policy which governs the manner in which your personal information is used and displayed by OpenLitterMap. By using this Platform and availing of the Services, you understand and agree that we are a content-sharing platform providing you with a means to view, locate and upload geo-tagged photos and other materials that are intended to be made public. This means that any geo-tagged photo you share, once properly attributed with the contents exhibited and once passes our verification system, will have a visible spatial (eg. centimeter accurate GPS location) and temporal (eg. a specific point in time to the second, minute, hour, day, month, year) stamp that will identify the contributors location at a specific location in time. You confirm that we may access this location identification mechanism and we may share this with information third parties and users of this Platform. Any registered User may view or potentially re-use your content that you provide to the Service. By default, the images you post will remain anonymous, however if you wish, you have the option to attribute either your full name or the unique username /organisation you are legally entitled to represent on all or none of the images you submit through your account. This can be changed in the settings section at openlittermap.com/settings/privacy. "),e("p"),e("br"),e("h3",[t._v("SECTION 3. REGISTRATION")]),e("br"),e("p",[t._v("3.1 Registration Process: ")]),e("div",{staticClass:"container"},[e("br"),t._v("3.1.1 Information: If you choose to create an End-User Account, you agree to provide only accurate and complete registration information and you will keep that information up-to-date if it changes. We will retain this information in accordance with the terms of our Privacy Policy. "),e("br"),e("br"),t._v("3.1.2 Registering: When you register, you will be required to generate a unique log-in credential (a password) which relates to your own personal email address. Your password will be subject to certain limitations as regards availability, at the sole discretion of OpenLitterMap and must contain a minimum of 6 characters including one uppercase, one lowercase, one numeric digit and one special character. We reserve the right to the forfeiture of your password at any time. The combination of your email address and password permits us to verify you as the permitted and authorised user of the particular End-User Account, as well as providing access to the secure parts of the Platform and the Services such as uploading, attributing, verifying and downloading data. Access to the secure aspects of the Platform and the Services is not permitted for any other person or entity using your email and password and you are responsible for preventing such unauthorized use. Upon successful completion of the registration process, you will be afforded access to your End-User Account. You will be required to validate your End User Account through a validation process by email which will grant you authorized access to the Service. ")]),e("br"),e("br"),t._v("3.2 Access Denial: Individuals whose access to the Platform or use of the Services has previously been terminated by OpenLitterMap may not register for another account, nor may you designate another individual to use an account on your behalf. OpenLitterMap expressly reserves the right not to grant access to anyone they may choose, to the Services, the Platform or to create an End-User Account for any reason. "),e("br"),e("br"),t._v("3.3 Authentication: The Website and Application rely on email addresses and passwords to know whether the person accessing the Platform and utilising the Services are authorized to do so. If someone accesses the Platform and or the Services using an email address and/or password that you have provided us with, we will rely on that email address and password and will assume that access has been made by you. You are recommended to change your password regularly to prevent unauthorised use. You are solely responsible for any and all access to the Platform, your End-User Account and/or use of the Services by persons using your email address and password. Please notify us immediately if you believe or become aware that your End-User Account is being used without your authorization. "),e("br"),e("br"),t._v("3.4: Access Indemnity: You indemnify us and hold us harmless for all damages and losses related to your failure to comply with the provisions of this Section 3, including, without limitation, your failure to secure your End-User Account from third party access. "),e("p"),e("br"),e("h3",[t._v("SECTION 4. AGE AND RESPONSIBILITY")]),e("br"),e("p",[t._v("4.1 Age: Any individual making use of the Platform or the Services must be over 18 years of age to register or utilise them. "),e("br"),e("br"),t._v("4.2 Responsibility: ")]),e("div",{staticClass:"container"},[e("br"),t._v("4.2.1 By using and registering for the Platform and the Services, you understand that you are financially responsible for the applicable costs (if any) of using the services as detailed in this Agreement. "),e("br"),e("br"),t._v("4.2.2 You agree to notify us immediately of any unauthorised use of your log-on information or any other breach of security. "),e("br"),e("br"),t._v("4.2.3 This Platform shall currently only be used as a tool to raise public awareness and to aid and inform decision making to curb the destructive plastic pollution paradigm. It is not intended to be used in an emergency nor is it intended to override the roles of law enforcement or public administration. It is the obligation of the End User to confirm the information provided by way of the Content through independent sources. This Platform must not be considered complete or comprehensive due to possible errors in the database, limitations on volunteer contributions and the associated Content. Use of the Platform is solely at the End User’s risk. ")]),e("p"),e("br"),e("h3",[t._v("SECTION 5. USER UNDERTAKINGS")]),e("p",[t._v("5.1 Undertaking: Except as expressly set out in this Licence or as permitted by any local law, you undertake not to: ")]),e("div",{staticClass:"container"},[e("br"),t._v("5.1.1. use the Services for any unlawful or illegal purpose; "),e("br"),t._v("5.1.2. act dishonestly or fraudulently by engaging in objectionable conduct, or by posting inappropriate, inaccurate, or objectionable content to or through the Platform; "),e("br"),t._v("5.1.3 publish inaccurate information in the designated fields on registration for the service (e.g. do not include a link or an email address in your name field) "),e("br"),t._v("5.1.4. make any translation, adaptation, arrangement or any other alteration of the permanent aspects of the Platform or any of the software contained in either or both; "),e("br"),t._v("5.1.5. make any form of distribution to the public of the content of the Platform, the software, in whole or in part, or of copies thereof; "),e("br"),t._v("5.1.6. make any form of distribution to the public of the Content or any other content on the Platform save as in accordance with the terms of this EULA; "),e("br"),t._v("5.1.7. remove or alter any copyright, meta-tags or other proprietary notice from the Platform, the Software and/or the Content; "),e("br"),t._v("5.1.8 disseminate, sell, give away, hire, lease, offer or expose for sale or distribute the content of the Platform, the Content or another associated data, information, product or content wholly or partially derived from any of the foregoing; "),e("br"),t._v("5.1.9. create an End-User Account for anyone other than a natural person; "),e("br"),t._v("5.1.10. harass, abuse or harm another person, including sending unwelcomed communications to others using the Services; "),e("br"),t._v("5.1.11. use or attempt to use another End Users account without authorization from OpenLitterMap or that End User or create a false identity on the Website and/or the Application; "),e("br"),t._v("5.1.12. Upload, post, email, transmit or otherwise make available or initiate any content that: a) falsely states, impersonates or otherwise misrepresents your identity to OpenLitterMap , including but not limited to the use of a pseudonym; b) is unlawful, libellous, abusive, obscene, discriminatory or otherwise objectionable; c) adds to a content field such content that is not intended for such field (i.e. submitting a telephone number in the “Name” or any other field, or including telephone numbers, email addresses, street addresses or any personally identifiable information for which there is not a field provided by OpenLitterMap ); d) includes information that you do not have the right to disclose or make available under any law or under contractual or fiduciary relationships. e) infringes upon patents, trademarks, trade secrets, copyrights or other proprietary rights; and/or f) includes any unsolicited or unauthorised communication, advertising, promotional materials, “junk mail,” “spam,” “chain letters,” “pyramid schemes,” or any other form of solicitation. This prohibition includes but is not limited to (i) using OpenLitterMap to send messages to people who have not expressly consented to the receipt of such contact through the privacy controls on the system; (ii) sending messages to distribution lists, newsgroup aliases, or group aliases. "),e("br"),t._v("5.1.13. imply or state, directly or indirectly, that you are affiliated with or endorsed by OpenLitterMap unless you have entered into a written agreement with OpenLitterMap; "),e("br"),t._v("5.1.14. reverse engineer, decompile, disassemble, decipher or otherwise attempt to derive the source code for any underlying intellectual property used in the Platform or to provide the Services, or any part thereof; "),e("br"),t._v("5.1.15. use manual or automated software, devices, scripts robots, other means or processes to access, “scrape,” “crawl” or “spider” any web pages or other services contained in the Platform; "),e("br"),t._v("5.1.16. infringe or use the OpenLitterMap brand, logos and/or trademarks, including, without limitation, using the word “OpenLitterMap” in any business name, email, or URL or including OpenLitterMap’s trademarks and logos except as expressly permitted by Seán Lynch post April 2017; "),e("br"),t._v("5.1.17 use bots or other automated methods to access the Platform, add or download contacts, send or redirect messages, or perform other activities through the Platform, unless explicitly permitted by OpenLitterMap ; "),e("br"),t._v("5.1.18. Engage in “framing,” “mirroring,” or otherwise simulating the appearance or function of the Platform; "),e("br"),t._v("5.1.19. Attempt to or actually access the Platform by any means other than through the interfaces provided by OpenLitterMap. This prohibition includes accessing or attempting to access OpenLitterMap using any third-party service, including software-as-a-service platforms that aggregate access to multiple services, including OpenLitterMap and proxy services; "),e("br"),t._v("5.1.20. Deep-link to the Platform for any purpose, (i.e. including a link to OpenLitterMap other than the home page) unless expressly authorized in writing by OpenLitterMap or for the purpose of authorised promotion; "),e("br"),t._v("5.1.21. Engage in any action that directly or indirectly interferes with the proper working of or places an unreasonable load on OpenLitterMap infrastructure, including, but not limited to, sending unsolicited communications to other Users or OpenLitterMap personnel, attempting to gain unauthorised access to OpenLitterMap , or transmitting or activating computer viruses through or on the Platform. ")]),e("br"),e("br"),t._v("5.2. Compliance Indemnity: You hereby agree to indemnify and hold OpenLitterMap and its licensors harmless from and against any liabilities, damages, judgments, costs and expenses (including reasonable legal fees and indirect and consequential loss) (“Losses”) arising out of your registration for or use of the Website, any downloading, installation and use of the Application software, or use of the Services in a manner inconsistent with this EULA. "),e("br"),e("br"),t._v("5.3 Warranty: You represent and warrant that you have the legal right and capacity to enter into this EULA in your jurisdiction. "),e("p"),e("br"),e("h3",[t._v("SECTION 6. OpenLitterMap 'UNDERTAKINGS'")]),e("p",[t._v("6.1 OpenLitterMap Indemnity: We shall indemnify you against any claim that your use of or access to the Platform or Services infringes the copyright of any third party provided: ")]),e("div",{staticClass:"container"},[e("br"),t._v("6.1.1 such claim relates to the technology and software underlying the Platform and or the Services; "),e("br"),t._v("6.1.2 we are immediately notified of any such claim; "),e("br"),t._v("6.1.3 you do not make any admission of liability; "),e("br"),t._v("6.1.4 we are given immediate and complete control of such claim, including the right to conduct the defence of any claim and to make any settlements as appropriate; and "),e("br"),t._v("6.1.5 the claim does not arise on foot of any of the circumstances set out in Section 5 above. ")]),e("br"),t._v("6.2 Remedies: We shall have the right at our discretion, to replace, modify or change the software incorporated in the Services to make any such software non-infringing. The maximum aggregate liability of OpenLitterMap shall be equal to that which is set out in section 9 of this Agreement. This states the entire liability of OpenLitterMap to you in respect of the infringement of the Intellectual Property Rights of any third parties. "),e("br"),e("br"),t._v("6.3. Disclosure of End User Information: "),e("div",{staticClass:"container"},[e("br"),t._v("6.3.1. You acknowledge, consent and agree that we may access, preserve, and disclose your registration and any other information you provide to us, if required to do so by law or we, in good faith believe that such access, preservation or disclosure is reasonably necessary in our opinion to: (a) comply with legal process, including, but not limited to, civil and criminal subpoenas, court orders or other compulsory disclosures; (b) enforce this Agreement; (c) respond to claims of a violation of the rights of third parties, whether or not the third party is a User, individual, or government agency; (d) respond to customer service inquiries; or (e) protect the rights, property, or personal safety of OpenLitterMap developers/employees, our users or the public. "),e("br"),t._v("6.3.2. Disclosures of user information to third parties other than those required to provide customer support, to administer this EULA, or to comply with legal requirements are addressed in the Privacy Policy. ")]),e("p"),e("br"),e("h3",[t._v("SECTION 7. THIRD PARTY SITES")]),e("br"),e("p",[t._v("7.1 Links: OpenLitterMap if it includes links to third party web sites in its Content (“Third Party Site(s)”) is not responsible for and does not endorse any features, content, advertising, products or other materials on or available from Third Party Sites or applications. If you decide to access Third Party Sites, you do so at your own risk and agree that your use of any Third Party Sites is on an “as-is” basis without any warranty, and your use of any Third Party Site is subject to the terms and conditions contained therein.")]),e("br"),e("h3",[t._v("SECTION 8. WARRANTY & DISCLAIMER ")]),e("br"),e("p",[t._v("8.1 ANY INFORMATION OR CONTENT CONTAINED IN THE PLATFORM OR PROVIDED VIA THE SERVICES IS PROVIDED “AS IS” OR “AS AVAILABLE”. WHILE OpenLitterMap STRIVES TO PROVIDE YOU WITH USEFUL AND ACCURATE EVIDENCE BASED INFORMATION, OpenLitterMap DOES NOT WARRANT, AND EXPRESSLY DISCLAIMS, THAT THE INFORMATION CONTAINED IN CONTENT PROVIDED BY THIS PLATFORM IS UP-TO- DATE AND COMPLETE. "),e("br"),e("br"),t._v("8.2 AN END USER OF THE PLATFORM IS RESPONSIBLE FOR ANY AND ALL DAMAGES ARISING FROM PERSONAL CONTACT WITH LITTER INCLUDING NEEDLES, NEEDLE-STICKS OR ANY FORM OF DRUG-RELATED LITTER THAT MAY ARISE AS A CONSEQUENCE OF THEIR SEARCH FOR OR COLLECTION OF LITTER INCLUDING HANDLING OR MISHANDLING LITTER THAT MAY CAUSE HARM TO THE END USER’S PERSONAL HEALTH AND WELL-BEING. THE END USER HEREBY FULLY ACKNOWLEDGES THAT THEY ARE RESPONSIBLE FOR THEIR OWN ACTIONS AND THAT UNDER NO CIRCUMSTANCES CAN THE LICENSOR BE HELD RESPONSIBLE FOR SUCH ACTIONS. BY VOLUNTEERING TO SUBMIT AND CATEGORIZE GEOTAGGED PHOTOS OF LITTER WE STRIVE TO REDUCE THE HARMS CAUSED BY LITTER TO SOCIETY. "),e("br"),e("br"),t._v("8.3 TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, WE DISCLAIM ANY AND ALL IMPLIED WARRANTIES AND REPRESENTATIONS, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, ACCURACY OF DATA, AND NONINFRINGEMENT. IF YOU ARE DISSATISFIED WITH THE PLATFORM, THE SERVICES, OR DO NOT AGREE WITH THE TERMS OF THIS EULA, YOU MAY CLOSE YOUR OpenLitterMap ACCOUNT AND TERMINATE THIS EULA IN ACCORDANCE WITH SECTION 12 (“TERMINATION”) AND SUCH TERMINATION SHALL BE YOUR SOLE AND EXCLUSIVE REMEDY. THIS PLATFORM AND THE CONTENT PROVIDED BY IT, MUST NOT BE CONSIDERED COMPLETE OR COMPREHENSIVE DUE TO POSSIBLE ERRORS IN THE DATABASE AND OUR INTERNAL TECHNICAL METHODS. "),e("br"),e("br"),t._v("8.4 OpenLitterMap IS NOT RESPONSIBLE AND MAKES NO REPRESENTATIONS OR WARRANTIES FOR THE DELIVERY OF ANY MESSAGES OR COMMUNICATION (SUCH AS EMAILS, FORUM POSTINGS OR TRANSMISSION OF ANY OTHER USER GENERATED CONTENT) UPLOADED TO THE PLATFORM. THE TRANSMISSION OF ANY SUCH MESSAGES, IMAGES OR COMMUNICATION SHALL BE ENTIRELY THE RESPONSIBILITY OF THE MOBILE NETWORK OPERATOR OR BROADBAND INTERNET PROVIDER. IN ADDITION, WE NEITHER WARRANT NOR REPRESENT THAT YOUR PERSONAL USE OF THE SERVICE WILL NOT INFRINGE THE RIGHTS OF THIRD PARTIES. ANY MATERIAL, SERVICE, OR TECHNOLOGY DESCRIBED OR USED ON THE PLATFORM MAY BE SUBJECT TO INTELLECTUAL PROPERTY RIGHTS OWNED BY THIRD PARTIES WHO HAVE LICENSED SUCH MATERIAL, SERVICE, OR TECHNOLOGY TO US. "),e("br"),e("br"),t._v("8.5 OpenLitterMap DOES NOT HAVE ANY OBLIGATION TO VERIFY THE IDENTITY OF THE PERSONS SUBSCRIBING FOR ITS SERVICES, NOR DOES IT HAVE ANY OBLIGATION TO MONITOR THE USE OF ITS SERVICES BY OTHER USERS; THEREFORE, OpenLitterMap DISCLAIMS ALL LIABILITY FOR IDENTITY THEFT OR ANY OTHER MISUSE OF YOUR IDENTITY OR INFORMATION. "),e("br"),e("br"),t._v("8.6 OpenLitterMap DOES NOT GUARANTEE THAT THE SERVICES IT PROVIDES WILL FUNCTION WITHOUT INTERRUPTION OR ERRORS IN OPERATION. IN PARTICULAR, THE OPERATION OF THE SERVICES MAY BE INTERRUPTED DUE TO MAINTENANCE, UPDATES, OR SYSTEM OR NETWORK FAILURES. OpenLitterMap DISCLAIMS ALL LIABILITY FOR DAMAGES CAUSED BY ANY SUCH INTERRUPTION OR ERRORS IN FUNCTIONALITY. FURTHERMORE, OpenLitterMap DISCLAIMS ALL LIABILITY FOR ANY MALFUNCTIONING, IMPOSSIBILITY OF ACCESS, OR POOR USE CONDITIONS OF THE PLATFORM DUE TO INAPPROPRIATE EQUIPMENT, DISTURBANCES RELATED TO INTERNET SERVICE PROVIDERS, TO THE SATURATION OF THE INTERNET NETWORK, AND FOR ANY OTHER REASON. ")]),e("br"),e("h3",[t._v("SECTION 9: LIMITATION OF LIABILITY.")]),e("br"),e("p",[t._v("9.1 Precedence: This Section prevails over all other provisions of this EULA and sets out the entire liability of OpenLitterMap in respect of: ")]),e("div",{staticClass:"container"},[e("br"),t._v("9.1.1 the performance, non-performance, purported performance or delay in performance by OpenLitterMap of its obligations under this EULA; and "),e("br"),t._v("9.1.2 otherwise in relation to this Agreement or the entering into or performance of this EULA. ")]),e("br"),t._v("9.2 Losses not excluded: Nothing in this EULA shall exclude or limit OpenLitterMap liability specifically; "),e("div",{staticClass:"container"},[e("br"),t._v("9.2.1 under the tort of deceit; "),e("br"),t._v("9.2.2 for death or personal injury caused by any breach of duty; "),e("br"),t._v("9.2.3 any breach of an obligation implied by the Sale of Goods Act 1893 and/or the Sale of Goods, Supply of Services Act 1980 (if any); or "),e("br"),t._v("9.2.4 any other liability to the extent that under applicable law it cannot be excluded or limited. ")]),e("br"),t._v("9.3 Losses specifically excluded: OpenLitterMap disclaims all responsibility in respect of and for the personal safety of volunteers collecting and collating Content for upload on the Platform. End Users hereby hold the Licensor harmless from any damages, liabilities, Losses or any claims resulting from personal contact with litter such as needles, needle-sticks or any form of litter that may occur as a result of an End User’s search for or collection of litter including handling or mishandling or litter that may result in causing harm to the personal health and well-being of the End User or any other third party. Please be careful. "),e("br"),e("br"),t._v("9.4 No Implied Terms: The terms of this EULA are in lieu of all other conditions, warranties and other terms concerning the supply or purported supply of, or failure to supply or delay in supplying, any services (except for those arising under the Sale of Goods Act 1893 and/or the Sale of Goods, Supply of Services Act 1980 (if any) which might but for this Clause have effect between OpenLitterMap and you or would otherwise be implied or incorporated into this EULA or any collateral contract, whether by statue, common law, or otherwise (including the implied conditions, warranties or other terms as to satisfactory quality, fitness for purpose or as to the use of reasonable skill and care), all of which are hereby excluded. "),e("br"),e("br"),t._v("9.5 Non-Contractual Liability: Subject to 9.2 and 9.3, OpenLitterMap does not accept, and excludes all liability for breach of any obligation or duty to take reasonable care or exercise reasonable skill other than any such obligation or duty arising under this EULA. "),e("br"),e("br"),t._v("9.6 Indirect Loss: Subject to 9.2, OpenLitterMap shall not be liable in contract, tort or otherwise howsoever for any of the following losses or damage, (whether or not such damage was foreseen, foreseeable, known or otherwise): "),e("div",{staticClass:"container"},[e("br"),t._v("9.6.1 revenue, actual or anticipated profits, contracts, use of money, anticipated savings, business, opportunity, goodwill, reputation, changes in the value of assets, damage or corruption of data ; or "),e("br"),t._v("9.6.2 any indirect or consequential loss howsoever caused (including, for the avoidance of doubt, whether such loss or damage is of a type specified in 9.6.1). "),e("br"),t._v("9.6.3 any other entities that claim a right to the same name. ")]),e("br"),t._v("9.7 Breach of Warranty: For the avoidance of doubt, OpenLitterMap shall have no liability to remedy a breach of warranty where such breach arises as a result of any of the following circumstances: "),e("div",{staticClass:"container"},[e("br"),t._v("9.7.1. any use of the Services by you other than in accordance with the terms of this Agreement or use of the Services for a purpose for which they were not designed; "),e("br"),t._v("9.7.2. any temporary or permanent reproduction by any means and in any form, in whole or in part, of the Platform; "),e("br"),t._v("9.7.3. any reverse assembly, reverse compilation, reverse engineering or adaptation of the whole or part of the Platform; "),e("br"),t._v("9.7.4. any alteration, modification, adjustment, translation, adaptation or enhancement made by you to the Website or the Application or any combination, connection, operation or use of the Platform with any other equipment, software or documentation; "),e("br"),t._v("9.7.5 any dissemination, sale, hire, lease offer or exposure for sale or distribution of the Platform; "),e("br"),t._v("9.7.6 any item of third party hardware or software, even if forming part of the software or if the Licensor has recommended such third party hardware or software; "),e("br"),t._v("9.7.7 any breach by you of your obligations under this Agreement or of the Licensor’s Intellectual Property Rights; or "),e("br"),t._v("9.7.8 any act, omission, negligence, fraud or default of or by you. ")]),e("p"),e("br"),e("h3",[t._v("SECTION 10. INTELLECTUAL PROPERTY RIGHTS ")]),e("p",[t._v("10.1 Vesting: You acknowledge that all Intellectual Property Rights, title and interest in the Platform and the Services contained therein, throughout the world belong to Seán Lynch, that rights in the these are licensed (not sold) to you, and that you have no rights in, or to, the Platform and the Services other than the right to use them in accordance with the terms of this EULA. "),e("br"),t._v("10.2 Contributions: Currently OpenLitterMap only accepts feedback to seanlynch@umail.ucc.ie. Please note that as OpenLitterMap develops we welcome your information, ideas, suggestions or other materials which you may supply. Any ideas, suggestions, documents, improvements, comments, proposals or feedback in relation to the operation of the Platform and or the Services (“Feedback”) in whatever manner or form facilitated by the Platform; any such communication with OpenLitterMap whether verbally, via postings on blogs, forums, questionnaires, email and the like (“Communication”), you acknowledge and agree that such Feedback and or Communication (together “Contributions”): ")]),e("div",{staticClass:"container"},[e("br"),t._v("10.2.1. do not contain confidential or proprietary information; "),e("br"),t._v("10.2.2. do not create any express or implied obligation of confidentiality in respect of OpenLitterMap; "),e("br"),t._v("10.2.3. OpenLitterMap is free to use or disclose (or choose not to use or disclose) such Contributions for any purpose, in any way, in any media worldwide; "),e("br"),t._v("10.2.4. does not preclude OpenLitterMap from having something similar to the Contributions already under consideration or in development; "),e("br"),t._v("10.2.5. that you irrevocably waive and assign all right, title and interest in and to the Contributions to OpenLitterMap; "),e("br"),t._v("10.2.6. does not entitle you to any compensation, royalty or reimbursement of any kind from OpenLitterMap under any circumstances; and "),e("br"),t._v("10.2.7 you further agree to provide OpenLitterMap with such assistance as may be required in documenting, perfecting and maintaining OpenLitterMap’s rights in and to any such Contributions. ")]),e("p"),e("br"),e("h3",[t._v("SECTION 11. INTEGRITY OF DATA")]),e("p",[t._v("11.1 Not Bespoke: You acknowledge that the Platform, the Services and the software have not been developed to meet your individual requirements and that it is therefore your responsibility to ensure that the facilities and functions of the Platform and the Services as described on the Website, meet your requirements. "),e("br"),t._v("11.2 Minor Errors: You acknowledge that the Platform and the Services may not be free of bugs or errors and you agree that the existence of any errors shall not constitute a breach of this Licence. "),e("br"),t._v("11.3 Insurance: You agree that you are the best judge of the value and importance of the data held on your End-User Account and that you will be solely responsible for taking out any insurance policy or other financial cover for loss or damage which may arise from loss of data for any reason. ")]),e("br"),e("h3",[t._v("SECTION 12. TERMINATION")]),e("p",[t._v("12.1 Duration: This Licence is effective either until deactivated by you by emailing us at seanlynch@umail.ucc.ie "),e("br"),t._v("12.2 Immediate Termination: OpenLitterMap may terminate this Licence immediately if: "),e("br"),t._v("12.2.1 you commit a material or persistent breach of this Licence which you fail to remedy (if remediable) within 14 days after the service on you of notice requiring you to do so; "),e("br"),t._v("12.2.2 a petition for a bankruptcy order to be made against you has been presented to the court; "),e("br"),t._v("12.2.3. if OpenLitterMap believes, at its sole discretion, that you are not adhering to the terms and conditions of this EULA or the Privacy Policy; or "),e("br"),t._v("12.2.4 for just cause at the sole discretion of OpenLitterMap to include, but not limited to the abuse of any fair usage policy or for the breach of any matter outlined under Section 5.1 above. "),e("br"),t._v("12.4 Upon termination for any reason: "),e("br"),t._v("12.4.1 all rights granted to you under this Licence shall cease; "),e("br"),t._v("12.4.2 you must cease all activities authorised by this Licence; "),e("br"),t._v("12.4.3 you must immediately pay to the Licensor any sums due to the Licensor under this Licence if applicable; and "),e("br"),t._v("12.4.4 All data stored and retained in the System will be deleted within a reasonable period. ")]),e("br"),e("h3",[t._v("SECTION 13. DATA PROTECTION")]),e("p",[t._v("OpenLitterMap shall comply with the Data Protection requirements set out in our Privacy Policy.")]),e("br"),e("h3",[t._v("SECTION 14. NOTICES")]),e("p",[t._v("14.1 Service messages: For the purposes of service messages and notices about the Services to you, OpenLitterMap may place a banner notice across the Platform to alert you to certain changes such as modifications to this EULA. Alternatively, notice may consist of an email from OpenLitterMap to an email address associated with your account or via a digital distribution platform for mobile applications, applicable to your particular device should we choose to facilitate this in the future. "),e("br"),t._v("14.2: General Communication: You also agree that OpenLitterMap may communicate with you through your account or through other means including email about your account or services associated with OpenLitterMap. To unsubscribe from any communication we circulate to you, please click on the unsubscribe mechanism at the bottom of the communication. You acknowledge and agree that we shall have no liability associated with or arising from your failure to do so, to maintain accurate contact or other information, including, but not limited to, your failure to receive critical information about the Platform and Services. "),e("br"),t._v("14.3 Contacting OpenLitterMap : You may contact OpenLitterMap directly by email at seanlynch@umail.ucc.ie ")]),e("br"),e("h3",[t._v("SECTION 15. AMENDMENTS TO THE LICENCE")]),e("p",[t._v("15.1 Amendments: OpenLitterMap reserves the right, at our sole discretion, to amend, add or delete any of the terms and conditions of this Licence. OpenLitterMap will post notifications of any such changes to this Licence on the Website or in the Application, will provide a link to the revised version of this Licence, and may provide such other notice as the Licensor may elect in its sole discretion. If any future changes to this Licence are unacceptable to you or cause you to no longer be in compliance with this Licence, you may terminate this Licence in accordance with the terms herein. "),e("br"),t._v("15.2 Evidence of Acceptance: Your installation, download and/or use of any updated or modified Software (if any) and/or your continued use of the Website, the Application or the Services following notice of changes to this Licence as described above means you accept any and all such changes. OpenLitterMap may change, modify, suspend, or discontinue any aspect of the Website, the Application and/or the Services at any time. "),e("br"),t._v("15.3 Limits: OpenLitterMap may also impose limits on certain features without notice or liability. You disclaim any right, title or interest, monetary or otherwise, in any feature or content contained in the Platform and/or the Services. ")]),e("br"),e("h3",[t._v("SECTION 16. WAIVER")]),e("p",[t._v("16.1 Strict Performance: If OpenLitterMap fails, at any time during the term of this Licence, to insist on strict performance of any of your obligations under this Licence, or if OpenLitterMap fails to exercise any of the rights or remedies to which it is entitled under this Licence, this shall not constitute a waiver of such rights or remedies and shall not relieve you from compliance with such obligations.")]),e("br"),e("h3",[t._v("SECTION 17. CONFIDENTIAL INFORMATION")]),e("p",[t._v("17.1 Non-Confidential Relationship: You acknowledge and agree that your relationship with OpenLitterMap is not a confidential, fiduciary, or other type of special relationship, and that your decision to submit any User Generated Content does not place OpenLitterMap in a position that is any different from the position held by members of the general public, including with regard to your User Generated Content. None of your User Generated Content will be subject to any obligation of confidence on the part of OpenLitterMap, and OpenLitterMap will not be liable for any use or disclosure of any Content you provide, subject at all times to the terms of the Privacy Policy.")]),e("br"),e("h3",[t._v("SECTION 18. SEVERABILITY")]),e("p",[t._v("If any of the terms of this Licence are determined by any competent authority to be invalid, unlawful or unenforceable to any extent, such term, condition or provision will to that extent be severed from the remaining terms, conditions and provisions which will continue to be valid to the fullest extent permitted by law.")]),e("br"),e("h3",[t._v("SECTION 19. ENTIRE AGREEMENT")]),e("p",[t._v("This EULA and any document expressly referred to in it represents the entire agreement between you and Seán Lynch trading as OpenLitterMap, in relation to the license hereunder and supersedes any prior agreement, representation, understanding or arrangement between us, whether oral or in writing. Both Parties hereunder acknowledge that, in entering into this EULA, neither Party has relied on any representation, undertaking or promise given by the other or implied from anything said or written in negotiations between us before entering into this Licence except as expressly stated in this Licence. ")]),e("br"),e("h3",[t._v("SECTION 20. LAW AND JURISDICTION")]),e("p",[t._v("20.1 Jurisdiction: This EULA is governed by Irish law. Any dispute arising from, or related to, any term of this EULA shall be subject to the exclusive jurisdiction of the Irish courts. "),e("br"),t._v("20.2 Language: Any dispute arising from, or related to, any term of this EULA arising between the Parties, shall be resolved or determined based on the English language version alone. These terms were originally written in English. In the event that these terms are translated into any other language, the translation shall be for review purposes only and have no legal effect. ")]),e("br"),e("h3",[t._v("SECTION 21. Relationship")]),e("p",[t._v("Nothing in this Agreement shall create, evidence or imply any agency, partnership or joint venture between you and OpenLitterMap. Neither you nor OpenLitterMap shall act or describe itself as the agent of the other; nor shall either party represent that it has any authority to make commitments on behalf of the other.")])])}],n=o(r,i,a,!1,null,"158f244b");const l=n.exports;export{l as default}; +import{n as o}from"./app-BwSojYvl.js";/* empty css */const r={name:"Terms"};var i=function(){var e=this;return e._self._c,e._m(0)},a=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"container"},[e("h1",[t._v("PLEASE READ CAREFULLY BEFORE USING OPEN LITTER MAP")]),e("p",[e("i",[t._v(" Last updated: 17"),e("sup",[t._v("th")]),t._v(" Feb 2018 ")])]),e("br"),t._v(' This END USER LICENCE AGREEMENT (the “EULA” or the "Licence") is a legal agreement between you (the "Licensee" or "you") and Seán Lynch trading as OpenLitterMap.com (“OpenLitterMap”, the “Licensor”, “our” or "we") for your licensed use of and access to www.OpenLitterMap.com (the “Website”), the internet based user interface (the “Web Application”) and the multi-platform smartphone and tablet software application (the “Mobile Application”) which will launch soon (together the Website, the Web Application and the Mobile Application are hereafter described as the “Platform”) and your access to the data-logging process which provides a means for Citzien Scientists (you) to contribute and attribute geotagged images of litter (eg. "cigarette butts", "plastic bottles", etc.) through our content-sharing platform (the "Services") in accordance with the terms of this Agreement. '),e("br"),t._v(" The Terms of Service (hereforth referred to as the “Terms”) govern access and use of the OpenLitterMap website. These Terms are a legal agreement between you and us. By using these Services you are agreeing to these Terms. "),e("br"),t._v(" OpenLitterMap data is "),e("a",{attrs:{href:"https://opendatacommons.org/licenses/odbl/"}},[t._v("Open Data, licensed by the Open Database Licence")]),t._v(" (ODBl - https://opendatacommons.org/licenses/odbl/). Any rights in individual contents of the database are licenced under the Database Contents License: http://opendatacommons.org/licenses/dbcl/1.0/ "),e("br"),t._v(' This means that anyone is free to copy, distribute, share and use our data, as long as you credit OpenLitterMap and its contributors with "© OpenLitterMap & Contributors". '),e("br"),e("br"),e("b",[t._v("DISCLAIMER: OpenLitterMap is not intended for use by individuals in an emergency situation nor is it currently being used to notify law enforcement or public bodies of the existence of real time litter issues. It is currently being used for geostatistical and awareness-raising purposes only. If you wish to report a specific issue of concern regarding the collection and removal of litter, please contact your local authority. We are not yet in contact with Local Authorities and we cannot guarantee that our 3rd party communication with them will enable their response to be as effective as contact from a concerned member of the public. However, with your ongoing participation we hope to achieve this to solve problems such as the millions of tonnes of plastic entering the ocean of our only habitable planet.")]),e("br"),e("br"),e("p",[t._v("PLEASE BE CAREFUL AND REMAIN VIGILANT WHEN DEALING WITH LITTER, PARTICULARLY DRUG-RELATED LITTER (EG. NEEDLES & INJECTING EQUIPMENT), AS IT POSES A SIGNIFICANT THREAT TO YOUR PERSONAL HEALTH AND WELL-BEING. YOU ARE ENTIRELY RESPONISBLE FOR YOURSELF WHEN YOU ARE DEALING WITH LITTER IN ANY WAY INCLUDING LOOKING FOR, PHOTOGRAPHING, COLLECTING DATA ON, REMOVING, ATTEMPTING TO REMOVE AND/OR ANY OTHER MEANS OF COMING INTO CONTACT WITH LITTER AND/OR DRUG-RELATED LITTER. UNDER NO CIRCUMSTANCES CAN WE BE HELD ACCOUNTABLE FOR PERSONAL INJURUES OR ANY OTHER CLAIMS RESULTING FROM ANY CONTENT PUBLISHED TO OR COMING FROM THIS WEBSITE INCLUDING PERSONAL INJURIES FROM NEEDLES, NEEDLE-STICKS OR ANY OTHER FORM OF DRUG PARAPHANALIA OR HARM THAT MAY BE CAUSED FROM ACCIDENTS, DISCOVERY OF, MISHANDLING OF AND THE USE OR IMPROPER USE OF DRUG PARAPHANALIA OR DRUG-RELATED LITTER."),e("b",[t._v(" YOU UNRESERVEDLY AGREE TO REMOVE OUR LIABILITY FROM ANY DAMAGES THAT MAY OCCUR FROM USE OR ACCESS OF THESE SERVICES OR FROM INFORMATION SHARED BY A 3RD PARTY.")])]),e("br"),e("p",[t._v("BY REGISTERING FOR, UPLOADING TO AND/OR DOWNLOADING DATA AND INFORMATION FROM THE PLATFORM AND YOUR SUBSEQUENT CONTINUED USE OF THE PLATFORM AND THE SERVICES, YOU CONSENT TO BE BOUND BY THIS LICENCE. BY TICKING THE BOX ON REGISTRATION, AND AT ANY OTHER TIME ON LOGGING IN TO THE PLATFORM AND THROUGH YOUR CONTINUED USE OF THE SERVICES AND THE PLATFORM, YOU AGREE TO BE BOUND TO THE TERMS OF THIS LICENCE. IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS AGREEMENT, THEN DO NOT REGISTER FOR THE PLATFORM, OR USE ANY OF THE SERVICES. BY TICKING THE BOX YOU CONFIRM THAT YOU HAVE READ, YOU DO ACCEPT AND UNDERSTAND THE TERMS OF THIS LICENCE AGREEMENT; THAT YOU ALSO CONSENT TO USE ELECTRONIC SIGNATURES AND ACKNOWLEDGE YOUR TICKING OF BOX TO BE AN ELECTRONIC SIGNATURE SUFFICIENT TO BIND YOU TO THE TERMS OF THIS LICENCE AGREEMENT.")]),e("br"),e("br"),e("h3",[t._v("SECTION 1. GRANT AND SCOPE OF LICENCE")]),e("div",{staticClass:"container"},[e("p",[t._v("1.1 General: ")]),e("div",{staticClass:"container"},[t._v(" OpenLitterMap provides you with access to the services through its platform. All verified litter data (120+ items, lat, lon, timestamp and OpenStreetMap address at each location) is Free and Open to download by Country, State or City and can be used for your own research, educational or commercial purposes, available through the Open Database Licence (ODbl - https://opendatacommons.org/licenses/odbl/). Link "),e("a",{attrs:{href:"https://opendatacommons.org/licenses/odbl/"}},[t._v("here")]),t._v(". ")]),e("br"),e("br"),e("p",[t._v("1.2 Definitions:")]),e("div",{staticClass:"container"},[t._v(" 1.2.1 Content: the Services and the Platform provides information including images, time and location data of litter that is supplied by our community of contributors, which is designed to raise awareness of litter and to provide hyper-geostatistical information to public bodies, various stakeholders and other interested parties to assist and inform the decisions made in relation littering to challenge the destructive plastic pollution paradigm; and "),e("br"),e("br"),t._v("1.2.2 User Generated Content: the information, images or content provided by an End User posted to the Platform. ")]),e("br"),e("p",[t._v("1.3 Licence:")]),e("div",{staticClass:"container"},[t._v(" OpenLitterMap hereby grants to you a limited, personal or commercial, non- exclusive, non-transferable, temporary, revocable, non-assignable, non-sub-licensable licence and right to access the Platform and the Services though a generally available web browser in consideration of your strict and continued compliance with the following conditions: "),e("br"),e("br"),t._v("1.3.1 your agreement, as evidenced by your acceptance of this EULA and your continued use of the Platform and the Services, to abide by the terms of this Licence; "),e("br"),e("br"),t._v("1.3.2 your continuing compliance with the terms of this EULA and the Privacy Policy posted on the Website (which is hereby incorporated by this reference); and "),e("br"),e("br"),t._v("1.3.3 not to use scraping, spidering, crawling or other technology or software of a malicious nature to access or make available to third parties information or data secured by the Platform, whether such data or information relates to OpenLitterMap , the Platform, the Services or Content without the express written consent of OpenLitterMap. ")]),e("br"),e("p",[t._v("1.4 Use: Any use of the Platform, its software and/or Services or any part thereof in a manner contrary to the scope and purpose of this Licence is strictly prohibited and a violation of this Agreement, terminable in accordance with Section 12. OpenLitterMap is not intended for emergency use and users should apply extreme caution to their personal safety when using the Platform and engaging with or photographing litter, particularly needles, needle-sticks, syringes or any other form of drug-related litter. This Platform and the Content should only be used as an educational, statistics gathering tool and for aiding decision support. It is not intended to override or replace the obligation and necessity for reporting of litter to the appropriate authority in the geographical area in which the litter is identified. This Platform and the Content is currently only available directly as a web app from www.OpenLitterMap.com. Sourcing this Platform from another source without the consent of OpenLitterMap is not permitted and a direct breach of the terms of this Agreement.")]),e("br"),e("p",[t._v("1.5 Intellectual Property:")]),e("div",{staticClass:"container"},[e("br"),t._v("1.5.1 “Intellectual Property Right(s)” includes any patent, trade or other mark, registered design, topography right, copyright, database right or any other right in the nature of any of the foregoing (or application, or right to apply for, any of the foregoing), and trade or business name, invention, discovery, improvement, design, technique, confidential process or information or know how, in each case subsisting anywhere in the world and whether registered, unregistered, or unregisterable, and any licence or right of user of any of the foregoing, and the full right to all legal protection relating to the same; "),e("br"),e("br"),t._v("1.5.2 Seán Lynch reserves all Intellectual Property Rights in and to the Platform, the Content and the Services and any such Intellectual Property Right shall at all times be and for all purposes remain vested in OpenLitterMap and/or its licensors, including all copies made of the Website and the Web with Section 10. ")]),e("br"),t._v("1.6 Reciprocal Licence: End Users grant to OpenLitterMap and its licensors an irrevocable, royalty free and non-exclusive licence to use, copy, modify, adapt, translate and distribute anonymised or personally or organisationally attributed geostatistical or operational information relating to the uses made of the Application by End Users, or about the Device and related software, hardware and peripherals, information relating to their Device and the Platform and content on the Device (“Metadata”) to provide services and to develop and improve the Platform. Metadata expressly does not include personal data the use, control and processing of which is governed by our Privacy Policy."),e("p")]),e("br"),e("h3",[t._v("SECTION 2. ACCESS TO THE SERVICES")]),e("br"),e("p",[t._v("2.1. Your Account: OpenLitterMap is offering access to and use of the Platform and the Services solely for use by the person or entity in whose name an account is registered and not for the use or benefit of any third party. OpenLitterMap may change, suspend or discontinue any part of the Platform, the Content and/or the Services at any time, including the availability of any feature, database, or content. "),e("br"),e("br"),t._v("2.2 Account Limitation: The Licensor may also impose limits on certain features of the Platform and the Services or restrict your access to parts or all of the Services without notice or liability. For as long as the Licensor continues to offer the Platform and the Services, we shall provide and seek to update, improve and expand. Therefore, OpenLitterMap reserves the right, at its discretion, to modify this EULA at any time by posting a notice on the Platform, or by sending you a notice via e-mail, and you consent to the receipt of such notice. You shall be responsible for reviewing and becoming familiar with any such modifications. Your use of the Platform and the Services following such notification constitutes your acceptance of the terms and conditions of this EULA as modified. Any new features that materially augment or enhance the Platform and/or the Services currently available, including the release of new tools and resources, shall be subject to this Agreement (as updated). You can review the most current version of the EULA at any time at: www.OpenLitterMap.com/terms. "),e("br"),e("br"),t._v("2.3 Account Availability: The Licensor will use reasonable efforts to ensure that the Platform and the Services are available twenty-four hours a day, seven days a week. However, access to the Platform and Services shall be as they may exist and be available on any given day and the Licensor has no other obligation, except as expressly stated in this EULA. There will be occasions when the Platform and the Services will be unavailable or interrupted for maintenance, upgrades and emergency repairs or due to failure of telecommunications links and equipment. Every reasonable step will be taken by OpenLitterMap to minimize such disruption where it is within OpenLitterMap's reasonable control. YOU AGREE THAT OpenLitterMap WILL NOT BE LIABLE IN ANY EVENT TO YOU OR ANY OTHER PARTY FOR ANY SUSPENSION, MODIFICATION, DISCONTINUANCE OR LACK OF AVAILABILITY OF THE PLATFORM, SERVICES OR OTHER CONTENT. The Licensor retains the right to create limits on use and storage with respect to the Platform and the Services determined at its sole discretion at any time with or without notice. "),e("br"),e("br"),t._v("2.4 Eligibility: To be eligible to use the Platform and the Services, you must meet the following criteria and represent and warrant that you: ")]),e("div",{staticClass:"container"},[e("br"),t._v("2.4.1 are not currently restricted from use of the Platform and the Services, or not otherwise prohibited from having an account with OpenLitterMap; "),e("br"),e("br"),t._v("2.4.2 will only maintain one End User Account at any given time (unless explicitly consented to by OpenLitterMap ); "),e("br"),e("br"),e("br"),t._v("2.4.3 will not violate any rights of OpenLitterMap, including Intellectual Property Rights such as copyright, patent, design or trademark rights; "),e("br"),e("br"),t._v("2.4.4 agree to provide at your cost all equipment, software, and internet access necessary to use the Platform and the Services; "),e("br"),t._v("2.4.5 understand and agree that use of the Platform and the Services may entail the applicability of certain incidental usage charges (“Incidental Charges”) during the installation and use of the Service. These Incidental Charges may, among others, be levied by your mobile network operator or your internet service provider. You are advised to consult your mobile data or internet data plan to identify the Incidental Charges which may be incurred prior to the installation and operation of these Services; and "),e("br"),t._v("2.4.6 you are responsible for your own personal safety if you come into contact with people engaged in illegal behaviour and you are wholly and completely independently responsible for your own personal belongings. You are responsible for any personal decisions made arising from our services including personal injury or injuries from gathering data on litter paricularly drug-related litter or for visiting areas known to be frequented by people who choose to consume illicit substances or engage in anti-social behaviour particularly in areas where hazardous injecting equipment lays idle and exposed. ")]),e("br"),e("br"),t._v("2.5 Suitability: You certify to OpenLitterMap that you are legally permitted to use the Platform and the Services, and take full responsibility for the selection and use of the Platform and the Services. "),e("br"),e("br"),t._v("2.6 Prohibition by law: This Agreement is void where prohibited by law, and the right to use the Platform and Services are revoked in such jurisdictions. OpenLitterMap makes no claim that the Services may be lawfully used or that User Generated Content may be uploaded or downloaded in any jurisdiction save the jurisdiction specified by this EULA. Access to the Content made available via the Platform may not be legally permitted by certain persons or in certain countries. If you use the Services or the Platform from outside Ireland, you do so at your own risk and you are responsible for compliance with the laws of that jurisdiction. Furthermore, if you believe that you are entitled or obligated to act contrary to this Agreement under any mandatory law, you agree to provide us with a detailed and substantiated explanation of your reasons in writing at least 30 days before you act contrary to this Agreement, to allow us to assess whether we may, at our sole discretion, provide an alternative remedy for the situation, though we are under no obligation to do so. "),e("br"),e("br"),t._v("2.7. Privacy: Please note that privacy is very important to us. You should not enter and should also protect sensitive personal information such as your phone number, street address, or other information that is confidential in nature, by avoiding inputting them in fields that would present in a public manner or as identifying information. Please see our Privacy Policy which governs the manner in which your personal information is used and displayed by OpenLitterMap. By using this Platform and availing of the Services, you understand and agree that we are a content-sharing platform providing you with a means to view, locate and upload geo-tagged photos and other materials that are intended to be made public. This means that any geo-tagged photo you share, once properly attributed with the contents exhibited and once passes our verification system, will have a visible spatial (eg. centimeter accurate GPS location) and temporal (eg. a specific point in time to the second, minute, hour, day, month, year) stamp that will identify the contributors location at a specific location in time. You confirm that we may access this location identification mechanism and we may share this with information third parties and users of this Platform. Any registered User may view or potentially re-use your content that you provide to the Service. By default, the images you post will remain anonymous, however if you wish, you have the option to attribute either your full name or the unique username /organisation you are legally entitled to represent on all or none of the images you submit through your account. This can be changed in the settings section at openlittermap.com/settings/privacy. "),e("p"),e("br"),e("h3",[t._v("SECTION 3. REGISTRATION")]),e("br"),e("p",[t._v("3.1 Registration Process: ")]),e("div",{staticClass:"container"},[e("br"),t._v("3.1.1 Information: If you choose to create an End-User Account, you agree to provide only accurate and complete registration information and you will keep that information up-to-date if it changes. We will retain this information in accordance with the terms of our Privacy Policy. "),e("br"),e("br"),t._v("3.1.2 Registering: When you register, you will be required to generate a unique log-in credential (a password) which relates to your own personal email address. Your password will be subject to certain limitations as regards availability, at the sole discretion of OpenLitterMap and must contain a minimum of 6 characters including one uppercase, one lowercase, one numeric digit and one special character. We reserve the right to the forfeiture of your password at any time. The combination of your email address and password permits us to verify you as the permitted and authorised user of the particular End-User Account, as well as providing access to the secure parts of the Platform and the Services such as uploading, attributing, verifying and downloading data. Access to the secure aspects of the Platform and the Services is not permitted for any other person or entity using your email and password and you are responsible for preventing such unauthorized use. Upon successful completion of the registration process, you will be afforded access to your End-User Account. You will be required to validate your End User Account through a validation process by email which will grant you authorized access to the Service. ")]),e("br"),e("br"),t._v("3.2 Access Denial: Individuals whose access to the Platform or use of the Services has previously been terminated by OpenLitterMap may not register for another account, nor may you designate another individual to use an account on your behalf. OpenLitterMap expressly reserves the right not to grant access to anyone they may choose, to the Services, the Platform or to create an End-User Account for any reason. "),e("br"),e("br"),t._v("3.3 Authentication: The Website and Application rely on email addresses and passwords to know whether the person accessing the Platform and utilising the Services are authorized to do so. If someone accesses the Platform and or the Services using an email address and/or password that you have provided us with, we will rely on that email address and password and will assume that access has been made by you. You are recommended to change your password regularly to prevent unauthorised use. You are solely responsible for any and all access to the Platform, your End-User Account and/or use of the Services by persons using your email address and password. Please notify us immediately if you believe or become aware that your End-User Account is being used without your authorization. "),e("br"),e("br"),t._v("3.4: Access Indemnity: You indemnify us and hold us harmless for all damages and losses related to your failure to comply with the provisions of this Section 3, including, without limitation, your failure to secure your End-User Account from third party access. "),e("p"),e("br"),e("h3",[t._v("SECTION 4. AGE AND RESPONSIBILITY")]),e("br"),e("p",[t._v("4.1 Age: Any individual making use of the Platform or the Services must be over 18 years of age to register or utilise them. "),e("br"),e("br"),t._v("4.2 Responsibility: ")]),e("div",{staticClass:"container"},[e("br"),t._v("4.2.1 By using and registering for the Platform and the Services, you understand that you are financially responsible for the applicable costs (if any) of using the services as detailed in this Agreement. "),e("br"),e("br"),t._v("4.2.2 You agree to notify us immediately of any unauthorised use of your log-on information or any other breach of security. "),e("br"),e("br"),t._v("4.2.3 This Platform shall currently only be used as a tool to raise public awareness and to aid and inform decision making to curb the destructive plastic pollution paradigm. It is not intended to be used in an emergency nor is it intended to override the roles of law enforcement or public administration. It is the obligation of the End User to confirm the information provided by way of the Content through independent sources. This Platform must not be considered complete or comprehensive due to possible errors in the database, limitations on volunteer contributions and the associated Content. Use of the Platform is solely at the End User’s risk. ")]),e("p"),e("br"),e("h3",[t._v("SECTION 5. USER UNDERTAKINGS")]),e("p",[t._v("5.1 Undertaking: Except as expressly set out in this Licence or as permitted by any local law, you undertake not to: ")]),e("div",{staticClass:"container"},[e("br"),t._v("5.1.1. use the Services for any unlawful or illegal purpose; "),e("br"),t._v("5.1.2. act dishonestly or fraudulently by engaging in objectionable conduct, or by posting inappropriate, inaccurate, or objectionable content to or through the Platform; "),e("br"),t._v("5.1.3 publish inaccurate information in the designated fields on registration for the service (e.g. do not include a link or an email address in your name field) "),e("br"),t._v("5.1.4. make any translation, adaptation, arrangement or any other alteration of the permanent aspects of the Platform or any of the software contained in either or both; "),e("br"),t._v("5.1.5. make any form of distribution to the public of the content of the Platform, the software, in whole or in part, or of copies thereof; "),e("br"),t._v("5.1.6. make any form of distribution to the public of the Content or any other content on the Platform save as in accordance with the terms of this EULA; "),e("br"),t._v("5.1.7. remove or alter any copyright, meta-tags or other proprietary notice from the Platform, the Software and/or the Content; "),e("br"),t._v("5.1.8 disseminate, sell, give away, hire, lease, offer or expose for sale or distribute the content of the Platform, the Content or another associated data, information, product or content wholly or partially derived from any of the foregoing; "),e("br"),t._v("5.1.9. create an End-User Account for anyone other than a natural person; "),e("br"),t._v("5.1.10. harass, abuse or harm another person, including sending unwelcomed communications to others using the Services; "),e("br"),t._v("5.1.11. use or attempt to use another End Users account without authorization from OpenLitterMap or that End User or create a false identity on the Website and/or the Application; "),e("br"),t._v("5.1.12. Upload, post, email, transmit or otherwise make available or initiate any content that: a) falsely states, impersonates or otherwise misrepresents your identity to OpenLitterMap , including but not limited to the use of a pseudonym; b) is unlawful, libellous, abusive, obscene, discriminatory or otherwise objectionable; c) adds to a content field such content that is not intended for such field (i.e. submitting a telephone number in the “Name” or any other field, or including telephone numbers, email addresses, street addresses or any personally identifiable information for which there is not a field provided by OpenLitterMap ); d) includes information that you do not have the right to disclose or make available under any law or under contractual or fiduciary relationships. e) infringes upon patents, trademarks, trade secrets, copyrights or other proprietary rights; and/or f) includes any unsolicited or unauthorised communication, advertising, promotional materials, “junk mail,” “spam,” “chain letters,” “pyramid schemes,” or any other form of solicitation. This prohibition includes but is not limited to (i) using OpenLitterMap to send messages to people who have not expressly consented to the receipt of such contact through the privacy controls on the system; (ii) sending messages to distribution lists, newsgroup aliases, or group aliases. "),e("br"),t._v("5.1.13. imply or state, directly or indirectly, that you are affiliated with or endorsed by OpenLitterMap unless you have entered into a written agreement with OpenLitterMap; "),e("br"),t._v("5.1.14. reverse engineer, decompile, disassemble, decipher or otherwise attempt to derive the source code for any underlying intellectual property used in the Platform or to provide the Services, or any part thereof; "),e("br"),t._v("5.1.15. use manual or automated software, devices, scripts robots, other means or processes to access, “scrape,” “crawl” or “spider” any web pages or other services contained in the Platform; "),e("br"),t._v("5.1.16. infringe or use the OpenLitterMap brand, logos and/or trademarks, including, without limitation, using the word “OpenLitterMap” in any business name, email, or URL or including OpenLitterMap’s trademarks and logos except as expressly permitted by Seán Lynch post April 2017; "),e("br"),t._v("5.1.17 use bots or other automated methods to access the Platform, add or download contacts, send or redirect messages, or perform other activities through the Platform, unless explicitly permitted by OpenLitterMap ; "),e("br"),t._v("5.1.18. Engage in “framing,” “mirroring,” or otherwise simulating the appearance or function of the Platform; "),e("br"),t._v("5.1.19. Attempt to or actually access the Platform by any means other than through the interfaces provided by OpenLitterMap. This prohibition includes accessing or attempting to access OpenLitterMap using any third-party service, including software-as-a-service platforms that aggregate access to multiple services, including OpenLitterMap and proxy services; "),e("br"),t._v("5.1.20. Deep-link to the Platform for any purpose, (i.e. including a link to OpenLitterMap other than the home page) unless expressly authorized in writing by OpenLitterMap or for the purpose of authorised promotion; "),e("br"),t._v("5.1.21. Engage in any action that directly or indirectly interferes with the proper working of or places an unreasonable load on OpenLitterMap infrastructure, including, but not limited to, sending unsolicited communications to other Users or OpenLitterMap personnel, attempting to gain unauthorised access to OpenLitterMap , or transmitting or activating computer viruses through or on the Platform. ")]),e("br"),e("br"),t._v("5.2. Compliance Indemnity: You hereby agree to indemnify and hold OpenLitterMap and its licensors harmless from and against any liabilities, damages, judgments, costs and expenses (including reasonable legal fees and indirect and consequential loss) (“Losses”) arising out of your registration for or use of the Website, any downloading, installation and use of the Application software, or use of the Services in a manner inconsistent with this EULA. "),e("br"),e("br"),t._v("5.3 Warranty: You represent and warrant that you have the legal right and capacity to enter into this EULA in your jurisdiction. "),e("p"),e("br"),e("h3",[t._v("SECTION 6. OpenLitterMap 'UNDERTAKINGS'")]),e("p",[t._v("6.1 OpenLitterMap Indemnity: We shall indemnify you against any claim that your use of or access to the Platform or Services infringes the copyright of any third party provided: ")]),e("div",{staticClass:"container"},[e("br"),t._v("6.1.1 such claim relates to the technology and software underlying the Platform and or the Services; "),e("br"),t._v("6.1.2 we are immediately notified of any such claim; "),e("br"),t._v("6.1.3 you do not make any admission of liability; "),e("br"),t._v("6.1.4 we are given immediate and complete control of such claim, including the right to conduct the defence of any claim and to make any settlements as appropriate; and "),e("br"),t._v("6.1.5 the claim does not arise on foot of any of the circumstances set out in Section 5 above. ")]),e("br"),t._v("6.2 Remedies: We shall have the right at our discretion, to replace, modify or change the software incorporated in the Services to make any such software non-infringing. The maximum aggregate liability of OpenLitterMap shall be equal to that which is set out in section 9 of this Agreement. This states the entire liability of OpenLitterMap to you in respect of the infringement of the Intellectual Property Rights of any third parties. "),e("br"),e("br"),t._v("6.3. Disclosure of End User Information: "),e("div",{staticClass:"container"},[e("br"),t._v("6.3.1. You acknowledge, consent and agree that we may access, preserve, and disclose your registration and any other information you provide to us, if required to do so by law or we, in good faith believe that such access, preservation or disclosure is reasonably necessary in our opinion to: (a) comply with legal process, including, but not limited to, civil and criminal subpoenas, court orders or other compulsory disclosures; (b) enforce this Agreement; (c) respond to claims of a violation of the rights of third parties, whether or not the third party is a User, individual, or government agency; (d) respond to customer service inquiries; or (e) protect the rights, property, or personal safety of OpenLitterMap developers/employees, our users or the public. "),e("br"),t._v("6.3.2. Disclosures of user information to third parties other than those required to provide customer support, to administer this EULA, or to comply with legal requirements are addressed in the Privacy Policy. ")]),e("p"),e("br"),e("h3",[t._v("SECTION 7. THIRD PARTY SITES")]),e("br"),e("p",[t._v("7.1 Links: OpenLitterMap if it includes links to third party web sites in its Content (“Third Party Site(s)”) is not responsible for and does not endorse any features, content, advertising, products or other materials on or available from Third Party Sites or applications. If you decide to access Third Party Sites, you do so at your own risk and agree that your use of any Third Party Sites is on an “as-is” basis without any warranty, and your use of any Third Party Site is subject to the terms and conditions contained therein.")]),e("br"),e("h3",[t._v("SECTION 8. WARRANTY & DISCLAIMER ")]),e("br"),e("p",[t._v("8.1 ANY INFORMATION OR CONTENT CONTAINED IN THE PLATFORM OR PROVIDED VIA THE SERVICES IS PROVIDED “AS IS” OR “AS AVAILABLE”. WHILE OpenLitterMap STRIVES TO PROVIDE YOU WITH USEFUL AND ACCURATE EVIDENCE BASED INFORMATION, OpenLitterMap DOES NOT WARRANT, AND EXPRESSLY DISCLAIMS, THAT THE INFORMATION CONTAINED IN CONTENT PROVIDED BY THIS PLATFORM IS UP-TO- DATE AND COMPLETE. "),e("br"),e("br"),t._v("8.2 AN END USER OF THE PLATFORM IS RESPONSIBLE FOR ANY AND ALL DAMAGES ARISING FROM PERSONAL CONTACT WITH LITTER INCLUDING NEEDLES, NEEDLE-STICKS OR ANY FORM OF DRUG-RELATED LITTER THAT MAY ARISE AS A CONSEQUENCE OF THEIR SEARCH FOR OR COLLECTION OF LITTER INCLUDING HANDLING OR MISHANDLING LITTER THAT MAY CAUSE HARM TO THE END USER’S PERSONAL HEALTH AND WELL-BEING. THE END USER HEREBY FULLY ACKNOWLEDGES THAT THEY ARE RESPONSIBLE FOR THEIR OWN ACTIONS AND THAT UNDER NO CIRCUMSTANCES CAN THE LICENSOR BE HELD RESPONSIBLE FOR SUCH ACTIONS. BY VOLUNTEERING TO SUBMIT AND CATEGORIZE GEOTAGGED PHOTOS OF LITTER WE STRIVE TO REDUCE THE HARMS CAUSED BY LITTER TO SOCIETY. "),e("br"),e("br"),t._v("8.3 TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, WE DISCLAIM ANY AND ALL IMPLIED WARRANTIES AND REPRESENTATIONS, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, ACCURACY OF DATA, AND NONINFRINGEMENT. IF YOU ARE DISSATISFIED WITH THE PLATFORM, THE SERVICES, OR DO NOT AGREE WITH THE TERMS OF THIS EULA, YOU MAY CLOSE YOUR OpenLitterMap ACCOUNT AND TERMINATE THIS EULA IN ACCORDANCE WITH SECTION 12 (“TERMINATION”) AND SUCH TERMINATION SHALL BE YOUR SOLE AND EXCLUSIVE REMEDY. THIS PLATFORM AND THE CONTENT PROVIDED BY IT, MUST NOT BE CONSIDERED COMPLETE OR COMPREHENSIVE DUE TO POSSIBLE ERRORS IN THE DATABASE AND OUR INTERNAL TECHNICAL METHODS. "),e("br"),e("br"),t._v("8.4 OpenLitterMap IS NOT RESPONSIBLE AND MAKES NO REPRESENTATIONS OR WARRANTIES FOR THE DELIVERY OF ANY MESSAGES OR COMMUNICATION (SUCH AS EMAILS, FORUM POSTINGS OR TRANSMISSION OF ANY OTHER USER GENERATED CONTENT) UPLOADED TO THE PLATFORM. THE TRANSMISSION OF ANY SUCH MESSAGES, IMAGES OR COMMUNICATION SHALL BE ENTIRELY THE RESPONSIBILITY OF THE MOBILE NETWORK OPERATOR OR BROADBAND INTERNET PROVIDER. IN ADDITION, WE NEITHER WARRANT NOR REPRESENT THAT YOUR PERSONAL USE OF THE SERVICE WILL NOT INFRINGE THE RIGHTS OF THIRD PARTIES. ANY MATERIAL, SERVICE, OR TECHNOLOGY DESCRIBED OR USED ON THE PLATFORM MAY BE SUBJECT TO INTELLECTUAL PROPERTY RIGHTS OWNED BY THIRD PARTIES WHO HAVE LICENSED SUCH MATERIAL, SERVICE, OR TECHNOLOGY TO US. "),e("br"),e("br"),t._v("8.5 OpenLitterMap DOES NOT HAVE ANY OBLIGATION TO VERIFY THE IDENTITY OF THE PERSONS SUBSCRIBING FOR ITS SERVICES, NOR DOES IT HAVE ANY OBLIGATION TO MONITOR THE USE OF ITS SERVICES BY OTHER USERS; THEREFORE, OpenLitterMap DISCLAIMS ALL LIABILITY FOR IDENTITY THEFT OR ANY OTHER MISUSE OF YOUR IDENTITY OR INFORMATION. "),e("br"),e("br"),t._v("8.6 OpenLitterMap DOES NOT GUARANTEE THAT THE SERVICES IT PROVIDES WILL FUNCTION WITHOUT INTERRUPTION OR ERRORS IN OPERATION. IN PARTICULAR, THE OPERATION OF THE SERVICES MAY BE INTERRUPTED DUE TO MAINTENANCE, UPDATES, OR SYSTEM OR NETWORK FAILURES. OpenLitterMap DISCLAIMS ALL LIABILITY FOR DAMAGES CAUSED BY ANY SUCH INTERRUPTION OR ERRORS IN FUNCTIONALITY. FURTHERMORE, OpenLitterMap DISCLAIMS ALL LIABILITY FOR ANY MALFUNCTIONING, IMPOSSIBILITY OF ACCESS, OR POOR USE CONDITIONS OF THE PLATFORM DUE TO INAPPROPRIATE EQUIPMENT, DISTURBANCES RELATED TO INTERNET SERVICE PROVIDERS, TO THE SATURATION OF THE INTERNET NETWORK, AND FOR ANY OTHER REASON. ")]),e("br"),e("h3",[t._v("SECTION 9: LIMITATION OF LIABILITY.")]),e("br"),e("p",[t._v("9.1 Precedence: This Section prevails over all other provisions of this EULA and sets out the entire liability of OpenLitterMap in respect of: ")]),e("div",{staticClass:"container"},[e("br"),t._v("9.1.1 the performance, non-performance, purported performance or delay in performance by OpenLitterMap of its obligations under this EULA; and "),e("br"),t._v("9.1.2 otherwise in relation to this Agreement or the entering into or performance of this EULA. ")]),e("br"),t._v("9.2 Losses not excluded: Nothing in this EULA shall exclude or limit OpenLitterMap liability specifically; "),e("div",{staticClass:"container"},[e("br"),t._v("9.2.1 under the tort of deceit; "),e("br"),t._v("9.2.2 for death or personal injury caused by any breach of duty; "),e("br"),t._v("9.2.3 any breach of an obligation implied by the Sale of Goods Act 1893 and/or the Sale of Goods, Supply of Services Act 1980 (if any); or "),e("br"),t._v("9.2.4 any other liability to the extent that under applicable law it cannot be excluded or limited. ")]),e("br"),t._v("9.3 Losses specifically excluded: OpenLitterMap disclaims all responsibility in respect of and for the personal safety of volunteers collecting and collating Content for upload on the Platform. End Users hereby hold the Licensor harmless from any damages, liabilities, Losses or any claims resulting from personal contact with litter such as needles, needle-sticks or any form of litter that may occur as a result of an End User’s search for or collection of litter including handling or mishandling or litter that may result in causing harm to the personal health and well-being of the End User or any other third party. Please be careful. "),e("br"),e("br"),t._v("9.4 No Implied Terms: The terms of this EULA are in lieu of all other conditions, warranties and other terms concerning the supply or purported supply of, or failure to supply or delay in supplying, any services (except for those arising under the Sale of Goods Act 1893 and/or the Sale of Goods, Supply of Services Act 1980 (if any) which might but for this Clause have effect between OpenLitterMap and you or would otherwise be implied or incorporated into this EULA or any collateral contract, whether by statue, common law, or otherwise (including the implied conditions, warranties or other terms as to satisfactory quality, fitness for purpose or as to the use of reasonable skill and care), all of which are hereby excluded. "),e("br"),e("br"),t._v("9.5 Non-Contractual Liability: Subject to 9.2 and 9.3, OpenLitterMap does not accept, and excludes all liability for breach of any obligation or duty to take reasonable care or exercise reasonable skill other than any such obligation or duty arising under this EULA. "),e("br"),e("br"),t._v("9.6 Indirect Loss: Subject to 9.2, OpenLitterMap shall not be liable in contract, tort or otherwise howsoever for any of the following losses or damage, (whether or not such damage was foreseen, foreseeable, known or otherwise): "),e("div",{staticClass:"container"},[e("br"),t._v("9.6.1 revenue, actual or anticipated profits, contracts, use of money, anticipated savings, business, opportunity, goodwill, reputation, changes in the value of assets, damage or corruption of data ; or "),e("br"),t._v("9.6.2 any indirect or consequential loss howsoever caused (including, for the avoidance of doubt, whether such loss or damage is of a type specified in 9.6.1). "),e("br"),t._v("9.6.3 any other entities that claim a right to the same name. ")]),e("br"),t._v("9.7 Breach of Warranty: For the avoidance of doubt, OpenLitterMap shall have no liability to remedy a breach of warranty where such breach arises as a result of any of the following circumstances: "),e("div",{staticClass:"container"},[e("br"),t._v("9.7.1. any use of the Services by you other than in accordance with the terms of this Agreement or use of the Services for a purpose for which they were not designed; "),e("br"),t._v("9.7.2. any temporary or permanent reproduction by any means and in any form, in whole or in part, of the Platform; "),e("br"),t._v("9.7.3. any reverse assembly, reverse compilation, reverse engineering or adaptation of the whole or part of the Platform; "),e("br"),t._v("9.7.4. any alteration, modification, adjustment, translation, adaptation or enhancement made by you to the Website or the Application or any combination, connection, operation or use of the Platform with any other equipment, software or documentation; "),e("br"),t._v("9.7.5 any dissemination, sale, hire, lease offer or exposure for sale or distribution of the Platform; "),e("br"),t._v("9.7.6 any item of third party hardware or software, even if forming part of the software or if the Licensor has recommended such third party hardware or software; "),e("br"),t._v("9.7.7 any breach by you of your obligations under this Agreement or of the Licensor’s Intellectual Property Rights; or "),e("br"),t._v("9.7.8 any act, omission, negligence, fraud or default of or by you. ")]),e("p"),e("br"),e("h3",[t._v("SECTION 10. INTELLECTUAL PROPERTY RIGHTS ")]),e("p",[t._v("10.1 Vesting: You acknowledge that all Intellectual Property Rights, title and interest in the Platform and the Services contained therein, throughout the world belong to Seán Lynch, that rights in the these are licensed (not sold) to you, and that you have no rights in, or to, the Platform and the Services other than the right to use them in accordance with the terms of this EULA. "),e("br"),t._v("10.2 Contributions: Currently OpenLitterMap only accepts feedback to seanlynch@umail.ucc.ie. Please note that as OpenLitterMap develops we welcome your information, ideas, suggestions or other materials which you may supply. Any ideas, suggestions, documents, improvements, comments, proposals or feedback in relation to the operation of the Platform and or the Services (“Feedback”) in whatever manner or form facilitated by the Platform; any such communication with OpenLitterMap whether verbally, via postings on blogs, forums, questionnaires, email and the like (“Communication”), you acknowledge and agree that such Feedback and or Communication (together “Contributions”): ")]),e("div",{staticClass:"container"},[e("br"),t._v("10.2.1. do not contain confidential or proprietary information; "),e("br"),t._v("10.2.2. do not create any express or implied obligation of confidentiality in respect of OpenLitterMap; "),e("br"),t._v("10.2.3. OpenLitterMap is free to use or disclose (or choose not to use or disclose) such Contributions for any purpose, in any way, in any media worldwide; "),e("br"),t._v("10.2.4. does not preclude OpenLitterMap from having something similar to the Contributions already under consideration or in development; "),e("br"),t._v("10.2.5. that you irrevocably waive and assign all right, title and interest in and to the Contributions to OpenLitterMap; "),e("br"),t._v("10.2.6. does not entitle you to any compensation, royalty or reimbursement of any kind from OpenLitterMap under any circumstances; and "),e("br"),t._v("10.2.7 you further agree to provide OpenLitterMap with such assistance as may be required in documenting, perfecting and maintaining OpenLitterMap’s rights in and to any such Contributions. ")]),e("p"),e("br"),e("h3",[t._v("SECTION 11. INTEGRITY OF DATA")]),e("p",[t._v("11.1 Not Bespoke: You acknowledge that the Platform, the Services and the software have not been developed to meet your individual requirements and that it is therefore your responsibility to ensure that the facilities and functions of the Platform and the Services as described on the Website, meet your requirements. "),e("br"),t._v("11.2 Minor Errors: You acknowledge that the Platform and the Services may not be free of bugs or errors and you agree that the existence of any errors shall not constitute a breach of this Licence. "),e("br"),t._v("11.3 Insurance: You agree that you are the best judge of the value and importance of the data held on your End-User Account and that you will be solely responsible for taking out any insurance policy or other financial cover for loss or damage which may arise from loss of data for any reason. ")]),e("br"),e("h3",[t._v("SECTION 12. TERMINATION")]),e("p",[t._v("12.1 Duration: This Licence is effective either until deactivated by you by emailing us at seanlynch@umail.ucc.ie "),e("br"),t._v("12.2 Immediate Termination: OpenLitterMap may terminate this Licence immediately if: "),e("br"),t._v("12.2.1 you commit a material or persistent breach of this Licence which you fail to remedy (if remediable) within 14 days after the service on you of notice requiring you to do so; "),e("br"),t._v("12.2.2 a petition for a bankruptcy order to be made against you has been presented to the court; "),e("br"),t._v("12.2.3. if OpenLitterMap believes, at its sole discretion, that you are not adhering to the terms and conditions of this EULA or the Privacy Policy; or "),e("br"),t._v("12.2.4 for just cause at the sole discretion of OpenLitterMap to include, but not limited to the abuse of any fair usage policy or for the breach of any matter outlined under Section 5.1 above. "),e("br"),t._v("12.4 Upon termination for any reason: "),e("br"),t._v("12.4.1 all rights granted to you under this Licence shall cease; "),e("br"),t._v("12.4.2 you must cease all activities authorised by this Licence; "),e("br"),t._v("12.4.3 you must immediately pay to the Licensor any sums due to the Licensor under this Licence if applicable; and "),e("br"),t._v("12.4.4 All data stored and retained in the System will be deleted within a reasonable period. ")]),e("br"),e("h3",[t._v("SECTION 13. DATA PROTECTION")]),e("p",[t._v("OpenLitterMap shall comply with the Data Protection requirements set out in our Privacy Policy.")]),e("br"),e("h3",[t._v("SECTION 14. NOTICES")]),e("p",[t._v("14.1 Service messages: For the purposes of service messages and notices about the Services to you, OpenLitterMap may place a banner notice across the Platform to alert you to certain changes such as modifications to this EULA. Alternatively, notice may consist of an email from OpenLitterMap to an email address associated with your account or via a digital distribution platform for mobile applications, applicable to your particular device should we choose to facilitate this in the future. "),e("br"),t._v("14.2: General Communication: You also agree that OpenLitterMap may communicate with you through your account or through other means including email about your account or services associated with OpenLitterMap. To unsubscribe from any communication we circulate to you, please click on the unsubscribe mechanism at the bottom of the communication. You acknowledge and agree that we shall have no liability associated with or arising from your failure to do so, to maintain accurate contact or other information, including, but not limited to, your failure to receive critical information about the Platform and Services. "),e("br"),t._v("14.3 Contacting OpenLitterMap : You may contact OpenLitterMap directly by email at seanlynch@umail.ucc.ie ")]),e("br"),e("h3",[t._v("SECTION 15. AMENDMENTS TO THE LICENCE")]),e("p",[t._v("15.1 Amendments: OpenLitterMap reserves the right, at our sole discretion, to amend, add or delete any of the terms and conditions of this Licence. OpenLitterMap will post notifications of any such changes to this Licence on the Website or in the Application, will provide a link to the revised version of this Licence, and may provide such other notice as the Licensor may elect in its sole discretion. If any future changes to this Licence are unacceptable to you or cause you to no longer be in compliance with this Licence, you may terminate this Licence in accordance with the terms herein. "),e("br"),t._v("15.2 Evidence of Acceptance: Your installation, download and/or use of any updated or modified Software (if any) and/or your continued use of the Website, the Application or the Services following notice of changes to this Licence as described above means you accept any and all such changes. OpenLitterMap may change, modify, suspend, or discontinue any aspect of the Website, the Application and/or the Services at any time. "),e("br"),t._v("15.3 Limits: OpenLitterMap may also impose limits on certain features without notice or liability. You disclaim any right, title or interest, monetary or otherwise, in any feature or content contained in the Platform and/or the Services. ")]),e("br"),e("h3",[t._v("SECTION 16. WAIVER")]),e("p",[t._v("16.1 Strict Performance: If OpenLitterMap fails, at any time during the term of this Licence, to insist on strict performance of any of your obligations under this Licence, or if OpenLitterMap fails to exercise any of the rights or remedies to which it is entitled under this Licence, this shall not constitute a waiver of such rights or remedies and shall not relieve you from compliance with such obligations.")]),e("br"),e("h3",[t._v("SECTION 17. CONFIDENTIAL INFORMATION")]),e("p",[t._v("17.1 Non-Confidential Relationship: You acknowledge and agree that your relationship with OpenLitterMap is not a confidential, fiduciary, or other type of special relationship, and that your decision to submit any User Generated Content does not place OpenLitterMap in a position that is any different from the position held by members of the general public, including with regard to your User Generated Content. None of your User Generated Content will be subject to any obligation of confidence on the part of OpenLitterMap, and OpenLitterMap will not be liable for any use or disclosure of any Content you provide, subject at all times to the terms of the Privacy Policy.")]),e("br"),e("h3",[t._v("SECTION 18. SEVERABILITY")]),e("p",[t._v("If any of the terms of this Licence are determined by any competent authority to be invalid, unlawful or unenforceable to any extent, such term, condition or provision will to that extent be severed from the remaining terms, conditions and provisions which will continue to be valid to the fullest extent permitted by law.")]),e("br"),e("h3",[t._v("SECTION 19. ENTIRE AGREEMENT")]),e("p",[t._v("This EULA and any document expressly referred to in it represents the entire agreement between you and Seán Lynch trading as OpenLitterMap, in relation to the license hereunder and supersedes any prior agreement, representation, understanding or arrangement between us, whether oral or in writing. Both Parties hereunder acknowledge that, in entering into this EULA, neither Party has relied on any representation, undertaking or promise given by the other or implied from anything said or written in negotiations between us before entering into this Licence except as expressly stated in this Licence. ")]),e("br"),e("h3",[t._v("SECTION 20. LAW AND JURISDICTION")]),e("p",[t._v("20.1 Jurisdiction: This EULA is governed by Irish law. Any dispute arising from, or related to, any term of this EULA shall be subject to the exclusive jurisdiction of the Irish courts. "),e("br"),t._v("20.2 Language: Any dispute arising from, or related to, any term of this EULA arising between the Parties, shall be resolved or determined based on the English language version alone. These terms were originally written in English. In the event that these terms are translated into any other language, the translation shall be for review purposes only and have no legal effect. ")]),e("br"),e("h3",[t._v("SECTION 21. Relationship")]),e("p",[t._v("Nothing in this Agreement shall create, evidence or imply any agency, partnership or joint venture between you and OpenLitterMap. Neither you nor OpenLitterMap shall act or describe itself as the agent of the other; nor shall either party represent that it has any authority to make commitments on behalf of the other.")])])}],n=o(r,i,a,!1,null,"158f244b");const l=n.exports;export{l as default}; diff --git a/public/build/assets/Upload-B3_oqonN.js b/public/build/assets/Upload-C8Yy0zHr.js similarity index 95% rename from public/build/assets/Upload-B3_oqonN.js rename to public/build/assets/Upload-C8Yy0zHr.js index d7afb4a7..8a0f69a1 100644 --- a/public/build/assets/Upload-B3_oqonN.js +++ b/public/build/assets/Upload-C8Yy0zHr.js @@ -1 +1 @@ -import{n as r,V as i}from"./app-DuS6KM7M.js";import{v as l}from"./vue2Dropzone-Cofu5FX6.js";/* empty css */const n={name:"Upload",components:{vueDropzone:l},data(){return{options:{url:"/upload",thumbnailWidth:150,maxFilesize:20,headers:{"X-CSRF-TOKEN":window.axios.defaults.headers.common["X-CSRF-TOKEN"]},includeStyling:!0,duplicateCheck:!0,paramName:"file",acceptedFiles:"image/*,.heic,.heif"},showTagLitterButton:!0,progress:0}},computed:{team(){var s;return(s=this.$store.state.user.user.team)==null?void 0:s.name}},async created(){Object.keys(this.$store.state.user.user.length===0)&&await this.$store.dispatch("GET_CURRENT_USER")},methods:{failed(s,t){let e=s.previewElement.querySelectorAll(".dz-error-message span");e&&e.length&&(e[0].textContent=t.message);const o=this.$t("notifications.error"),a=t.message;i.$vToastify.error({title:o,body:a,position:"top-right",type:"error"})},uploadStarted(s){this.showTagLitterButton=!1},uploadCompleted(s){this.showTagLitterButton=!0},tag(){this.$router.push({path:"/tag"})},uploadProgress(s,t,e){this.progress=s}}};var d=function(){var t=this,e=t._self._c;return e("section",{staticClass:"section hero fullheight is-warning is-bold upload-section"},[e("div",{staticClass:"container ma has-text-centered",staticStyle:{"flex-grow":"0",width:"100%"}},[e("h1",{staticClass:"title is-1 drop-title"},[t._v(" "+t._s(t.$t("upload.click-to-upload"))+" ")]),t.team?e("p",{staticClass:"subtitle mt-1"},[t._v(" "+t._s(t.$t("common.team"))+": "),e("strong",[t._v(t._s(t.team))])]):t._e(),e("vue-dropzone",{attrs:{id:"customdropzone",options:t.options,"use-custom-slot":!0},on:{"vdropzone-error":t.failed,"vdropzone-files-added":t.uploadStarted,"vdropzone-file-added":t.uploadStarted,"vdropzone-queue-complete":t.uploadCompleted,"vdropzone-total-upload-progress":t.uploadProgress}},[e("i",{staticClass:"fa fa-image upload-icon",attrs:{"aria-hidden":"true"}})]),e("div",{directives:[{name:"show",rawName:"v-show",value:t.progress,expression:"progress"}],staticClass:"wrapper"},[e("div",{staticClass:"progress-bar"},[e("span",{staticClass:"progress-bar-fill has-background-info",style:{width:`${t.progress}%`}})])]),e("h2",{staticClass:"title is-2"},[t._v(" "+t._s(t.$t("upload.thank-you"))+" ")]),e("h3",{staticClass:"title is-3 mb2r"},[t._v(" "+t._s(t.$t("upload.need-tag-litter"))+" ")]),t.showTagLitterButton?e("button",{staticClass:"button is-medium is-info hov",on:{click:t.tag}},[t._v(" "+t._s(t.$t("upload.tag-litter"))),e("i",{staticClass:"fa fa-arrow-right",attrs:{"aria-hidden":"true"}})]):t._e()],1)])},p=[],u=r(n,d,p,!1,null,"fcf00e23");const f=u.exports;export{f as default}; +import{n as r,V as i}from"./app-BwSojYvl.js";import{v as l}from"./vue2Dropzone-YzntsfFs.js";/* empty css */const n={name:"Upload",components:{vueDropzone:l},data(){return{options:{url:"/upload",thumbnailWidth:150,maxFilesize:20,headers:{"X-CSRF-TOKEN":window.axios.defaults.headers.common["X-CSRF-TOKEN"]},includeStyling:!0,duplicateCheck:!0,paramName:"file",acceptedFiles:"image/*,.heic,.heif"},showTagLitterButton:!0,progress:0}},computed:{team(){var s;return(s=this.$store.state.user.user.team)==null?void 0:s.name}},async created(){Object.keys(this.$store.state.user.user.length===0)&&await this.$store.dispatch("GET_CURRENT_USER")},methods:{failed(s,t){let e=s.previewElement.querySelectorAll(".dz-error-message span");e&&e.length&&(e[0].textContent=t.message);const o=this.$t("notifications.error"),a=t.message;i.$vToastify.error({title:o,body:a,position:"top-right",type:"error"})},uploadStarted(s){this.showTagLitterButton=!1},uploadCompleted(s){this.showTagLitterButton=!0},tag(){this.$router.push({path:"/tag"})},uploadProgress(s,t,e){this.progress=s}}};var d=function(){var t=this,e=t._self._c;return e("section",{staticClass:"section hero fullheight is-warning is-bold upload-section"},[e("div",{staticClass:"container ma has-text-centered",staticStyle:{"flex-grow":"0",width:"100%"}},[e("h1",{staticClass:"title is-1 drop-title"},[t._v(" "+t._s(t.$t("upload.click-to-upload"))+" ")]),t.team?e("p",{staticClass:"subtitle mt-1"},[t._v(" "+t._s(t.$t("common.team"))+": "),e("strong",[t._v(t._s(t.team))])]):t._e(),e("vue-dropzone",{attrs:{id:"customdropzone",options:t.options,"use-custom-slot":!0},on:{"vdropzone-error":t.failed,"vdropzone-files-added":t.uploadStarted,"vdropzone-file-added":t.uploadStarted,"vdropzone-queue-complete":t.uploadCompleted,"vdropzone-total-upload-progress":t.uploadProgress}},[e("i",{staticClass:"fa fa-image upload-icon",attrs:{"aria-hidden":"true"}})]),e("div",{directives:[{name:"show",rawName:"v-show",value:t.progress,expression:"progress"}],staticClass:"wrapper"},[e("div",{staticClass:"progress-bar"},[e("span",{staticClass:"progress-bar-fill has-background-info",style:{width:`${t.progress}%`}})])]),e("h2",{staticClass:"title is-2"},[t._v(" "+t._s(t.$t("upload.thank-you"))+" ")]),e("h3",{staticClass:"title is-3 mb2r"},[t._v(" "+t._s(t.$t("upload.need-tag-litter"))+" ")]),t.showTagLitterButton?e("button",{staticClass:"button is-medium is-info hov",on:{click:t.tag}},[t._v(" "+t._s(t.$t("upload.tag-litter"))),e("i",{staticClass:"fa fa-arrow-right",attrs:{"aria-hidden":"true"}})]):t._e()],1)])},p=[],u=r(n,d,p,!1,null,"fcf00e23");const f=u.exports;export{f as default}; diff --git a/public/build/assets/VerifyPhotos-C24Hl2QU.js b/public/build/assets/VerifyPhotos-D9w2zbqL.js similarity index 97% rename from public/build/assets/VerifyPhotos-C24Hl2QU.js rename to public/build/assets/VerifyPhotos-D9w2zbqL.js index 14c49cbe..c724f33d 100644 --- a/public/build/assets/VerifyPhotos-C24Hl2QU.js +++ b/public/build/assets/VerifyPhotos-D9w2zbqL.js @@ -1 +1 @@ -import{L as n}from"./vue-loading-hzYdSApK.js";/* empty css */import{h as l}from"./moment-zH0z38ay.js";import{n as c,A as d,T as h}from"./app-DuS6KM7M.js";import{R as p}from"./RecentTags-CgmFFS03.js";/* empty css */const u={name:"VerifyPhotos",components:{Loading:n,AddTags:d,Tags:h,RecentTags:p},async created(){this.loading=!0,await this.$store.dispatch("GET_NEXT_ADMIN_PHOTO"),this.loading=!1},data(){return{loading:!0,processing:!1,btn:"button is-large is-success",deleteButton:"button is-large is-danger mb1 tooltip",deleteVerify:"button is-large is-warning mb1 tooltip",selectedCountry:"",searchPhotoId:0,filterMyOwnPhotos:!1}},computed:{checkUpdateTagsDisabled(){return!!(this.processing||this.$store.state.litter.hasAddedNewTag===!1)},delete_button(){return this.processing?this.deleteButton+" is-loading":this.deleteButton},delete_verify_button(){return this.processing?this.deleteVerify+" is-loading":this.deleteVerify},photo(){return this.$store.state.admin.photo},photosNotProcessed(){return this.$store.state.admin.not_processed},photosAwaitingVerification(){return this.$store.state.admin.awaiting_verification},countriesWithPhotos(){return this.$store.state.admin.countriesWithPhotos},uploadedTime(){return l(this.photo.created_at).format("LLL")},verify_correct_button(){return this.processing?this.btn+" is-loading":this.btn},hasRecentTags(){return Object.keys(this.$store.state.litter.recentTags).length>0||this.$store.state.litter.recentCustomTags.length}},methods:{async adminDelete(o){this.processing=!0,await this.$store.dispatch("ADMIN_DELETE_IMAGE"),this.processing=!1},clearTags(){this.$store.commit("setAllTagsToZero",this.photo.id)},async filterByCountry(){this.loading=!0,this.$store.commit("setFilterByCountry",this.selectedCountry),await this.$store.dispatch("GET_NEXT_ADMIN_PHOTO"),this.loading=!1},async findPhotoById(){this.loading=!0,await this.$store.dispatch("ADMIN_FIND_PHOTO_BY_ID",this.searchPhotoId),this.loading=!1},async goBackOnePhoto(){this.processing=!0,await this.$store.dispatch("ADMIN_GO_BACK_ONE_PHOTO",{filterMyOwnPhotos:this.filterMyOwnPhotos,photoId:this.photo.id}),this.processing=!1},async resetTags(){this.processing=!0,await this.$store.dispatch("ADMIN_RESET_TAGS"),this.processing=!1},async verifyCorrect(){this.processing=!0,await this.$store.dispatch("ADMIN_VERIFY_CORRECT"),this.processing=!1},async verifyDelete(){this.processing=!0,await this.$store.dispatch("ADMIN_VERIFY_DELETE"),this.processing=!1},async updateNewTags(){this.processing=!0,await this.$store.dispatch("ADMIN_UPDATE_WITH_NEW_TAGS"),this.processing=!1},async skipPhoto(){this.loading=!0,this.$store.commit("setSkippedPhotos",this.$store.state.admin.skippedPhotos+1),await this.$store.dispatch("GET_NEXT_ADMIN_PHOTO"),this.loading=!1}}};var g=function(){var t=this,s=t._self._c;return s("div",[s("div",{staticClass:"has-background-grey-light has-text-centered py-2 admin-filters"},[s("p",{staticClass:"has-text-weight-bold"},[t._v("Filter photos by:")]),s("div",{staticClass:"control ml-4"},[s("div",{staticClass:"select"},[s("select",{directives:[{name:"model",rawName:"v-model",value:t.selectedCountry,expression:"selectedCountry"}],on:{change:[function(e){var a=Array.prototype.filter.call(e.target.options,function(i){return i.selected}).map(function(i){var r="_value"in i?i._value:i.value;return r});t.selectedCountry=e.target.multiple?a:a[0]},t.filterByCountry]}},[s("option",{attrs:{value:""}},[t._v("All Countries")]),t._l(t.countriesWithPhotos,function(e){return s("option",{key:e.id,domProps:{value:e.id}},[t._v(t._s(e.country)+" ("+t._s(e.total)+")")])})],2)])])]),s("div",{staticClass:"container is-fluid mt3"},[t.loading?s("loading",{attrs:{active:t.loading,"is-full-page":!0},on:{"update:active":function(e){t.loading=e}}}):s("div",[this.photosAwaitingVerification===0&&this.photosNotProcessed===0?s("div",[s("p",{staticClass:"title is-3"},[t._v("All done.")])]):t.photo?s("div",[s("div",{staticClass:"columns"},[s("div",{staticClass:"column is-3"},[s("p",[t._v("Search by ID. Press Enter to Search.")]),s("input",{directives:[{name:"model",rawName:"v-model",value:t.searchPhotoId,expression:"searchPhotoId"}],staticClass:"input",attrs:{type:"number",placeholder:"Enter ID"},domProps:{value:t.searchPhotoId},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.findPhotoById.apply(null,arguments)},input:function(e){e.target.composing||(t.searchPhotoId=e.target.value)}}})])]),s("div",{staticClass:"columns"},[s("div",{staticClass:"column has-text-centered"},[s("p",{staticClass:"subtitle is-5"},[t._v("Uploaded, not tagged: "+t._s(this.photosNotProcessed))]),s("p",{staticClass:"subtitle is-5"},[t._v("Tagged, awaiting verification: "+t._s(this.photosAwaitingVerification))]),s("div",{staticClass:"mt-5"},[s("button",{class:t.delete_verify_button,attrs:{disabled:t.processing},on:{click:t.verifyDelete}},[s("span",{staticClass:"tooltip-text is-size-6"},[t._v("Accept data, verify, but delete the image.")]),t._v(" Verify & Delete ")]),s("button",{class:t.delete_button,attrs:{disabled:t.processing},on:{click:t.adminDelete}},[s("span",{staticClass:"tooltip-text is-size-6"},[t._v("Delete the image.")]),t._v(" DELETE ")])]),t.hasRecentTags?s("div",{staticClass:"recent-tags control has-text-centered has-background-light px-4 py-4"},[s("RecentTags",{staticClass:"mb-5",attrs:{"photo-id":t.photo.id}})],1):t._e()]),s("div",{staticClass:"column is-half",staticStyle:{"text-align":"center"}},[s("h1",{staticClass:"title is-2 has-text-centered"},[t._v(" #"+t._s(parseInt(this.photo.id).toLocaleString())+" Uploaded "+t._s(this.uploadedTime)+" ")]),s("p",[t._v(" From: "),s("span",[t._v("@"+t._s(this.photo.user.username)+" #"+t._s(this.photo.user.id))])]),s("p",[t._v(" Verification count: "+t._s(this.photo.user.user_verification_count)+"% ")]),s("p",{staticClass:"subtitle is-5 has-text-centered mb-8"},[t._v(" "+t._s(this.photo.display_name)+" ")]),s("img",{directives:[{name:"img",rawName:"v-img",value:{sourceButton:!0},expression:"{sourceButton: true}"}],staticClass:"verify-image",attrs:{src:this.photo.filename}}),t.photo.verification===.1?s("div",{staticClass:"has-text-centered mb1"},[s("button",{class:t.verify_correct_button,attrs:{disabled:t.processing},on:{click:t.verifyCorrect}},[t._v("VERIFY CORRECT")]),s("button",{staticClass:"button is-large is-danger",attrs:{disabled:t.processing},on:{click:t.resetTags}},[t._v("FALSE")])]):t._e(),s("div",{staticClass:"columns"},[s("div",{staticClass:"column is-two-thirds is-offset-2"},[s("add-tags",{attrs:{admin:!0,id:t.photo.id}})],1)]),s("div",{staticStyle:{"padding-top":"1em","text-align":"center"}},[s("button",{staticClass:"button is-large is-warning",on:{click:t.goBackOnePhoto}},[t._v(" Go Back 1 photo ")]),s("button",{staticClass:"button is-large is-success mb1 tooltip",class:t.processing?"is-loading":"",attrs:{disabled:t.checkUpdateTagsDisabled},on:{click:t.updateNewTags}},[s("span",{staticClass:"tooltip-text is-size-6"},[t._v("Update the image and save the new data.")]),t._v(" Update with new tags ")]),s("button",{staticClass:"button is-large is-info tooltip mb-1",attrs:{disabled:t.processing},on:{click:t.skipPhoto}},[s("span",{staticClass:"tooltip-text is-size-6"},[t._v("Skip this photo and verify the next one.")]),t._v(" Skip ")])]),s("div",{staticClass:"switch-container"},[s("p",{staticClass:"mr-2"},[s("strong",[t._v("Search your photos only")])]),s("label",{staticClass:"switch"},[s("input",{attrs:{type:"checkbox"},domProps:{checked:t.filterMyOwnPhotos},on:{change:function(e){t.filterMyOwnPhotos=!t.filterMyOwnPhotos}}}),s("span",{staticClass:"slider round"})])])]),s("div",{staticClass:"column has-text-centered",staticStyle:{position:"relative"}},[s("Tags",{attrs:{"photo-id":t.photo.id,admin:!0}}),s("div",{staticStyle:{"padding-top":"3em"}},[s("button",{staticClass:"button is-medium is-dark tooltip",on:{click:t.clearTags}},[s("span",{staticClass:"tooltip-text is-size-6"},[t._v("To undo this, just refresh the page.")]),t._v(" Clear user input ")])])],1)])]):s("div",[s("p",{staticClass:"title is-3"},[t._v("All photos for your selection are done.")]),s("p",{staticClass:"subtitle is-5"},[t._v("You can refresh the page to view skipped photos.")])])])],1)])},_=[],v=c(u,g,_,!1,null,"4a9be0c7");const w=v.exports;export{w as default}; +import{L as n}from"./vue-loading-Ck0acTfr.js";/* empty css */import{h as l}from"./moment-zH0z38ay.js";import{n as c,A as d,T as h}from"./app-BwSojYvl.js";import{R as p}from"./RecentTags-BQfW5nXp.js";/* empty css */const u={name:"VerifyPhotos",components:{Loading:n,AddTags:d,Tags:h,RecentTags:p},async created(){this.loading=!0,await this.$store.dispatch("GET_NEXT_ADMIN_PHOTO"),this.loading=!1},data(){return{loading:!0,processing:!1,btn:"button is-large is-success",deleteButton:"button is-large is-danger mb1 tooltip",deleteVerify:"button is-large is-warning mb1 tooltip",selectedCountry:"",searchPhotoId:0,filterMyOwnPhotos:!1}},computed:{checkUpdateTagsDisabled(){return!!(this.processing||this.$store.state.litter.hasAddedNewTag===!1)},delete_button(){return this.processing?this.deleteButton+" is-loading":this.deleteButton},delete_verify_button(){return this.processing?this.deleteVerify+" is-loading":this.deleteVerify},photo(){return this.$store.state.admin.photo},photosNotProcessed(){return this.$store.state.admin.not_processed},photosAwaitingVerification(){return this.$store.state.admin.awaiting_verification},countriesWithPhotos(){return this.$store.state.admin.countriesWithPhotos},uploadedTime(){return l(this.photo.created_at).format("LLL")},verify_correct_button(){return this.processing?this.btn+" is-loading":this.btn},hasRecentTags(){return Object.keys(this.$store.state.litter.recentTags).length>0||this.$store.state.litter.recentCustomTags.length}},methods:{async adminDelete(o){this.processing=!0,await this.$store.dispatch("ADMIN_DELETE_IMAGE"),this.processing=!1},clearTags(){this.$store.commit("setAllTagsToZero",this.photo.id)},async filterByCountry(){this.loading=!0,this.$store.commit("setFilterByCountry",this.selectedCountry),await this.$store.dispatch("GET_NEXT_ADMIN_PHOTO"),this.loading=!1},async findPhotoById(){this.loading=!0,await this.$store.dispatch("ADMIN_FIND_PHOTO_BY_ID",this.searchPhotoId),this.loading=!1},async goBackOnePhoto(){this.processing=!0,await this.$store.dispatch("ADMIN_GO_BACK_ONE_PHOTO",{filterMyOwnPhotos:this.filterMyOwnPhotos,photoId:this.photo.id}),this.processing=!1},async resetTags(){this.processing=!0,await this.$store.dispatch("ADMIN_RESET_TAGS"),this.processing=!1},async verifyCorrect(){this.processing=!0,await this.$store.dispatch("ADMIN_VERIFY_CORRECT"),this.processing=!1},async verifyDelete(){this.processing=!0,await this.$store.dispatch("ADMIN_VERIFY_DELETE"),this.processing=!1},async updateNewTags(){this.processing=!0,await this.$store.dispatch("ADMIN_UPDATE_WITH_NEW_TAGS"),this.processing=!1},async skipPhoto(){this.loading=!0,this.$store.commit("setSkippedPhotos",this.$store.state.admin.skippedPhotos+1),await this.$store.dispatch("GET_NEXT_ADMIN_PHOTO"),this.loading=!1}}};var g=function(){var t=this,s=t._self._c;return s("div",[s("div",{staticClass:"has-background-grey-light has-text-centered py-2 admin-filters"},[s("p",{staticClass:"has-text-weight-bold"},[t._v("Filter photos by:")]),s("div",{staticClass:"control ml-4"},[s("div",{staticClass:"select"},[s("select",{directives:[{name:"model",rawName:"v-model",value:t.selectedCountry,expression:"selectedCountry"}],on:{change:[function(e){var a=Array.prototype.filter.call(e.target.options,function(i){return i.selected}).map(function(i){var r="_value"in i?i._value:i.value;return r});t.selectedCountry=e.target.multiple?a:a[0]},t.filterByCountry]}},[s("option",{attrs:{value:""}},[t._v("All Countries")]),t._l(t.countriesWithPhotos,function(e){return s("option",{key:e.id,domProps:{value:e.id}},[t._v(t._s(e.country)+" ("+t._s(e.total)+")")])})],2)])])]),s("div",{staticClass:"container is-fluid mt3"},[t.loading?s("loading",{attrs:{active:t.loading,"is-full-page":!0},on:{"update:active":function(e){t.loading=e}}}):s("div",[this.photosAwaitingVerification===0&&this.photosNotProcessed===0?s("div",[s("p",{staticClass:"title is-3"},[t._v("All done.")])]):t.photo?s("div",[s("div",{staticClass:"columns"},[s("div",{staticClass:"column is-3"},[s("p",[t._v("Search by ID. Press Enter to Search.")]),s("input",{directives:[{name:"model",rawName:"v-model",value:t.searchPhotoId,expression:"searchPhotoId"}],staticClass:"input",attrs:{type:"number",placeholder:"Enter ID"},domProps:{value:t.searchPhotoId},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.findPhotoById.apply(null,arguments)},input:function(e){e.target.composing||(t.searchPhotoId=e.target.value)}}})])]),s("div",{staticClass:"columns"},[s("div",{staticClass:"column has-text-centered"},[s("p",{staticClass:"subtitle is-5"},[t._v("Uploaded, not tagged: "+t._s(this.photosNotProcessed))]),s("p",{staticClass:"subtitle is-5"},[t._v("Tagged, awaiting verification: "+t._s(this.photosAwaitingVerification))]),s("div",{staticClass:"mt-5"},[s("button",{class:t.delete_verify_button,attrs:{disabled:t.processing},on:{click:t.verifyDelete}},[s("span",{staticClass:"tooltip-text is-size-6"},[t._v("Accept data, verify, but delete the image.")]),t._v(" Verify & Delete ")]),s("button",{class:t.delete_button,attrs:{disabled:t.processing},on:{click:t.adminDelete}},[s("span",{staticClass:"tooltip-text is-size-6"},[t._v("Delete the image.")]),t._v(" DELETE ")])]),t.hasRecentTags?s("div",{staticClass:"recent-tags control has-text-centered has-background-light px-4 py-4"},[s("RecentTags",{staticClass:"mb-5",attrs:{"photo-id":t.photo.id}})],1):t._e()]),s("div",{staticClass:"column is-half",staticStyle:{"text-align":"center"}},[s("h1",{staticClass:"title is-2 has-text-centered"},[t._v(" #"+t._s(parseInt(this.photo.id).toLocaleString())+" Uploaded "+t._s(this.uploadedTime)+" ")]),s("p",[t._v(" From: "),s("span",[t._v("@"+t._s(this.photo.user.username)+" #"+t._s(this.photo.user.id))])]),s("p",[t._v(" Verification count: "+t._s(this.photo.user.user_verification_count)+"% ")]),s("p",{staticClass:"subtitle is-5 has-text-centered mb-8"},[t._v(" "+t._s(this.photo.display_name)+" ")]),s("img",{directives:[{name:"img",rawName:"v-img",value:{sourceButton:!0},expression:"{sourceButton: true}"}],staticClass:"verify-image",attrs:{src:this.photo.filename}}),t.photo.verification===.1?s("div",{staticClass:"has-text-centered mb1"},[s("button",{class:t.verify_correct_button,attrs:{disabled:t.processing},on:{click:t.verifyCorrect}},[t._v("VERIFY CORRECT")]),s("button",{staticClass:"button is-large is-danger",attrs:{disabled:t.processing},on:{click:t.resetTags}},[t._v("FALSE")])]):t._e(),s("div",{staticClass:"columns"},[s("div",{staticClass:"column is-two-thirds is-offset-2"},[s("add-tags",{attrs:{admin:!0,id:t.photo.id}})],1)]),s("div",{staticStyle:{"padding-top":"1em","text-align":"center"}},[s("button",{staticClass:"button is-large is-warning",on:{click:t.goBackOnePhoto}},[t._v(" Go Back 1 photo ")]),s("button",{staticClass:"button is-large is-success mb1 tooltip",class:t.processing?"is-loading":"",attrs:{disabled:t.checkUpdateTagsDisabled},on:{click:t.updateNewTags}},[s("span",{staticClass:"tooltip-text is-size-6"},[t._v("Update the image and save the new data.")]),t._v(" Update with new tags ")]),s("button",{staticClass:"button is-large is-info tooltip mb-1",attrs:{disabled:t.processing},on:{click:t.skipPhoto}},[s("span",{staticClass:"tooltip-text is-size-6"},[t._v("Skip this photo and verify the next one.")]),t._v(" Skip ")])]),s("div",{staticClass:"switch-container"},[s("p",{staticClass:"mr-2"},[s("strong",[t._v("Search your photos only")])]),s("label",{staticClass:"switch"},[s("input",{attrs:{type:"checkbox"},domProps:{checked:t.filterMyOwnPhotos},on:{change:function(e){t.filterMyOwnPhotos=!t.filterMyOwnPhotos}}}),s("span",{staticClass:"slider round"})])])]),s("div",{staticClass:"column has-text-centered",staticStyle:{position:"relative"}},[s("Tags",{attrs:{"photo-id":t.photo.id,admin:!0}}),s("div",{staticStyle:{"padding-top":"3em"}},[s("button",{staticClass:"button is-medium is-dark tooltip",on:{click:t.clearTags}},[s("span",{staticClass:"tooltip-text is-size-6"},[t._v("To undo this, just refresh the page.")]),t._v(" Clear user input ")])])],1)])]):s("div",[s("p",{staticClass:"title is-3"},[t._v("All photos for your selection are done.")]),s("p",{staticClass:"subtitle is-5"},[t._v("You can refresh the page to view skipped photos.")])])])],1)])},_=[],v=c(u,g,_,!1,null,"4a9be0c7");const w=v.exports;export{w as default}; diff --git a/public/build/assets/Welcome-DAW7Ybqv.js b/public/build/assets/Welcome-CMnCnRfK.js similarity index 99% rename from public/build/assets/Welcome-DAW7Ybqv.js rename to public/build/assets/Welcome-CMnCnRfK.js index d625d8f6..8387cae0 100644 --- a/public/build/assets/Welcome-DAW7Ybqv.js +++ b/public/build/assets/Welcome-CMnCnRfK.js @@ -1 +1 @@ -import{n as i}from"./app-DuS6KM7M.js";import{_ as o,a as r}from"./android-BlaF6v8Z.js";import{_ as n,a as c}from"./phone-lg_u1nSM.js";/* empty css */const l={name:"Footer",data(){return{email:"",socials:[{icon:"facebook2.png",url:"https://facebook.com/openlittermap"},{icon:"ig2.png",url:"https://instagram.com/openlittermap"},{icon:"twitter2.png",url:"https://twitter.com/openlittermap"},{icon:"reddit.png",url:"https://reddit.com/r/openlittermap"},{icon:"tumblr.png",url:"https://tumblr.com/openlittermap"}],version:"v3.3.3"}},computed:{errors(){return this.$store.state.subscriber.errors},hasErrors(){return Object.keys(this.errors).length>0},subscribed(){return this.$store.state.subscriber.just_subscribed}},methods:{clearErrors(){this.$store.commit("clearSubscriberErrors")},getError(s){return this.errors[s][0]},icon(s){return"/assets/icons/"+s},open(s){window.open(s,"_blank")},async subscribe(){await this.$store.dispatch("SUBSCRIBE",this.email)}}};var m=function(){var t=this,e=t._self._c;return e("footer",{staticClass:"foot"},[e("div",{staticClass:"container"},[e("div",{staticClass:"inner-footer-container has-text-centered"},[e("p",{staticClass:"top-footer-title"},[t._v(t._s(t.$t("home.footer.email-you"))+"?")]),t.hasErrors?e("div",{staticClass:"notification is-danger mb1em"},t._l(Object.keys(this.errors),function(a){return e("div",{key:a},[e("p",[t._v(t._s(t.getError(a)))])])}),0):t._e(),e("form",{attrs:{method:"post"},on:{submit:function(a){return a.preventDefault(),t.subscribe.apply(null,arguments)}}},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.email,expression:"email"}],staticClass:"input f-input",attrs:{placeholder:t.$t("home.footer.enter-email"),required:"",type:"email"},domProps:{value:t.email},on:{input:[function(a){a.target.composing||(t.email=a.target.value)},t.clearErrors]}}),e("br"),e("button",{staticClass:"button is-medium is-primary hov mb2"},[t._v(t._s(t.$t("home.footer.subscribe")))]),e("p",{directives:[{name:"show",rawName:"v-show",value:t.subscribed,expression:"subscribed"}],staticClass:"footer-success"},[t._v(" "+t._s(t.$t("home.footer.subscribed-success-msg"))+". ")])])]),e("div",{staticClass:"columns"},[e("div",{staticClass:"column is-half foot-container-left"},[e("p",{staticClass:"olm-title"},[t._v("#OpenLitterMap")]),e("p",{staticClass:"footer-text mb1"},[t._v(t._s(t.$t("home.footer.need-your-help"))+".")]),t._l(t.socials,function(a){return e("img",{staticClass:"footer-icon",attrs:{src:t.icon(a.icon)},on:{click:function(S){return t.open(a.url)}}})}),e("br"),e("p",{staticClass:"footer-text mt1"},[t._v(" "+t._s(this.version)+" ")])],2),e("div",{staticClass:"column is-2"},[e("p",{staticClass:"olm-subtitle"},[t._v(t._s(t.$t("home.footer.read")))]),e("p",{staticClass:"footer-link",on:{click:function(a){return t.open("https://openlittermap.medium.com/")}}},[t._v(t._s(t.$t("home.footer.blog")))]),e("p",{staticClass:"footer-link",on:{click:function(a){return t.open("https://opengeospatialdata.springeropen.com/articles/10.1186/s40965-018-0050-y")}}},[t._v(t._s(t.$t("home.footer.research-paper")))]),e("router-link",{staticClass:"footer-link",attrs:{tag:"p",to:"/references"}},[t._v(t._s(t.$t("home.footer.references")))]),e("router-link",{staticClass:"footer-link",attrs:{tag:"p",to:"/credits"}},[t._v(t._s(t.$t("home.footer.credits")))]),e("router-link",{staticClass:"footer-link",attrs:{tag:"p",to:"/faq"}},[t._v(t._s(t.$t("common.faq")))])],1),e("div",{staticClass:"column is-2"},[e("p",{staticClass:"olm-subtitle"},[t._v(t._s(t.$t("home.footer.watch")))]),e("p",{staticClass:"footer-link",on:{click:function(a){return t.open("https://www.youtube.com/watch?v=my7Cx-kZhT4")}}},[t._v("TEDx 2017")]),e("p",{staticClass:"footer-link",on:{click:function(a){return t.open("https://www.youtube.com/watch?v=E_qhEhHwUGM")}}},[t._v("State of the Map 2019")]),e("p",{staticClass:"footer-link",on:{click:function(a){return t.open("https://www.youtube.com/watch?v=T8rGf1ScR1I")}}},[t._v("Datapub 2020")]),e("p",{staticClass:"footer-link",on:{click:function(a){return t.open("https://www.youtube.com/watch?v=5HuaQNeHuZ8")}}},[t._v("ESA PhiWeek 2020")]),e("p",{staticClass:"footer-link",on:{click:function(a){return t.open("https://www.youtube.com/watch?v=QhLsA0WIfTA")}}},[t._v("Geneva Forum, UN 2020")]),e("p",{staticClass:"footer-link",on:{click:function(a){return t.open("https://www.youtube.com/watch?v=Pe4nHdoAlu4")}}},[t._v("Cardano4Climate Meetup 2021")]),e("p",{staticClass:"footer-link",on:{click:function(a){return t.open("https://www.youtube.com/watch?v=f2UGAxRwrQk")}}},[t._v("CardanoSummit 2022")])]),e("div",{staticClass:"column is-2"},[e("p",{staticClass:"olm-subtitle"},[t._v(t._s(t.$t("home.footer.help")))]),e("router-link",{attrs:{to:"/contact-us"}},[e("p",{staticClass:"footer-link"},[t._v(t._s(t.$t("home.footer.contact-us")))])]),e("p",{staticClass:"footer-link"},[t._v(t._s(t.$t("home.footer.create-account")))]),e("p",{staticClass:"footer-link",on:{click:function(a){return t.open("https://angel.co/openlittermap/jobs")}}},[t._v(t._s(t.$t("home.footer.join-the-team")))]),e("p",{staticClass:"footer-link",on:{click:function(a){return t.open("https://join.slack.com/t/openlittermap/shared_invite/zt-fdctasud-mu~OBQKReRdC9Ai9KgGROw")}}},[t._v(t._s(t.$t("home.footer.join-slack")))]),e("p",{staticClass:"footer-link",on:{click:function(a){return t.open("https://github.com/openlittermap")}}},[t._v("GitHub")]),e("p",{staticClass:"footer-link",on:{click:function(a){return t.open("https://www.facebook.com/pg/openlittermap/groups/")}}},[t._v(t._s(t.$t("home.footer.fb-group")))]),e("router-link",{staticClass:"footer-link",attrs:{to:"/donate"}},[t._v(t._s(t.$t("home.footer.single-donation")))]),e("router-link",{staticClass:"footer-link",attrs:{to:"/signup"}},[t._v(t._s(t.$t("home.footer.crowdfunding")))])],1)])]),e("div",{staticClass:"footer-bottom"},[e("p",{staticClass:"footer-text"},[t._v(t._s(t.$t("home.footer.olm-is-flagship")))])])])},_=[],u=i(l,m,_,!1,null,"164499f6");const p=u.exports,d="/build/assets/cardano-BjKjjQeP.svg",h="/build/assets/engine-lease-finance-logo-CfF72bGp.png",v="/build/assets/plastic_raiders-BEOTwJ_1.png",f="/build/assets/science-foundation-ireland-Cs5Mx-ee.png",g="/build/assets/dpga-CsamMBXL.png",b="/build/assets/c4clogo-BQ46TDw_.jpeg",C={name:"Partners"};var w=function(){var t=this;return t._self._c,t._m(0)},$=[function(){var s=this,t=s._self._c;return t("div",{staticClass:"partners-list"},[t("div",{staticClass:"partner has-text-centered"},[t("a",{attrs:{href:"https://cardano.org/",target:"_blank"}},[t("img",{attrs:{loading:"lazy",src:d,alt:"Partner"}})])]),t("div",{staticClass:"partner has-text-centered"},[t("a",{attrs:{href:"https://elfc.com/",target:"_blank"}},[t("img",{attrs:{loading:"lazy",src:h,alt:"Partner"}})])]),t("div",{staticClass:"partner has-text-centered"},[t("a",{attrs:{href:"https://twitter.com/PlasticRaiders?s=20",target:"_blank"}},[t("img",{attrs:{loading:"lazy",src:v,alt:"Partner"}})])]),t("div",{staticClass:"partner has-text-centered"},[t("a",{attrs:{href:"https://www.sfi.ie/",target:"_blank"}},[t("img",{attrs:{loading:"lazy",src:f,alt:"Partner"}})])]),t("div",{staticClass:"partner has-text-centered"},[t("a",{attrs:{href:"https://www.digitalpublicgoods.net/",target:"_blank"}},[t("img",{attrs:{loading:"lazy",src:g,alt:"Partner"}})])]),t("div",{staticClass:"partner has-text-centered"},[t("a",{attrs:{href:"https://www.cardano4climate.com/",target:"_blank"}},[t("img",{attrs:{loading:"lazy",src:b,alt:"Partner"}})])])])}],k=i(C,w,$,!1,null,"65eba873");const y=k.exports,x="/build/assets/world-BpJiS2Th.png",q="/build/assets/microscope-BxV7iasq.png",H="/build/assets/tree-BQ8u605e.png",P="/build/assets/twitter2-fyDWX9iQ.png",j={name:"Welcome",components:{Partners:y,Footer:p},mounted(){this.startHeadingsAnimation()},data(){return{headings:[{title:this.$t("home.welcome.plastic-pollution-out-of-control"),img:"/assets/plastic_bottles.jpg"},{title:this.$t("home.welcome.fires-out-of-control"),img:"/assets/forest_fire.jpg"},{title:this.$t("home.welcome.glass-hurts-pets"),img:"/assets/dog.jpeg"}],activeHeadingIndex:0}},computed:{activeHeading(){return this.headings[this.activeHeadingIndex]},modal(){return this.$store.state.modal.show}},methods:{android(){window.open("https://play.google.com/store/apps/details?id=com.geotech.openlittermap","_blank")},ios(){window.open("https://apps.apple.com/us/app/openlittermap/id1475982147","_blank")},startHeadingsAnimation(){let s=this,t=null;function e(){if(document.hidden){t&&clearInterval(t);return}t=setInterval(()=>{s.activeHeadingIndex=(s.activeHeadingIndex+1)%s.headings.length},5e3)}e(),document.addEventListener("visibilitychange",e)}}};var E=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"container home-container"},[e("div",{staticClass:"columns c-1"},[e("div",{staticClass:"column is-half",staticStyle:{"padding-right":"1em !important"}},[e("transition",{attrs:{name:"slide-fade-left",mode:"out-in"}},[e("h1",{key:t.activeHeading.title,staticClass:"main-title variable-height",domProps:{innerHTML:t._s(t.activeHeading.title)}})]),e("h2",{staticClass:"subtitle is-3 home-img-padding"},[t._v(" "+t._s(t.$t("home.welcome.help-us"))+". ")]),e("div",{staticClass:"flex"},[e("img",{staticClass:"app-icon",staticStyle:{"margin-right":"1em"},attrs:{src:o},on:{click:t.ios}}),e("img",{staticClass:"app-icon",attrs:{src:r},on:{click:t.android}})])],1),e("div",{staticClass:"column is-half"},[e("div",{staticClass:"top-image"},[e("transition",{attrs:{name:"slide-fade-right",mode:"out-in"}},[e("img",{key:t.activeHeading.title,attrs:{src:t.activeHeading.img,alt:t.activeHeading.title}})])],1)])]),e("div",{staticClass:"why-container"},[e("h1",{staticClass:"main-title"},[t._v(" "+t._s(t.$t("home.welcome.why-collect-data"))+"? ")]),e("div",{staticClass:"columns welcome-mb"},[t._m(0),e("div",{staticClass:"column ma"},[e("h2",{staticClass:"main-subtitle"},[t._v(" 1. "+t._s(t.$t("home.welcome.visibility"))+" ")]),e("h3",{staticClass:"welcome-subtitle mb1em"},[t._v(" "+t._s(t.$t("home.welcome.our-maps-reveal-litter-normality"))+". ")])])]),e("div",{staticClass:"columns welcome-mb"},[t._m(1),e("div",{staticClass:"column ma"},[e("h2",{staticClass:"main-subtitle"},[t._v(" 2. "+t._s(t.$t("home.welcome.science"))+" ")]),e("h3",{staticClass:"welcome-subtitle mb1em"},[t._v(" "+t._s(t.$t("home.welcome.our-data-open-source"))+". ")])])]),e("div",{staticClass:"columns welcome-mb"},[t._m(2),e("div",{staticClass:"column ma"},[e("h2",{staticClass:"main-subtitle"},[t._v(" 3. "+t._s(t.$t("home.welcome.community"))+" ")]),e("h3",{staticClass:"welcome-subtitle"},[t._v(" "+t._s(t.$t("home.welcome.must-work-together"))+". ")])])])]),e("div",[e("h1",{staticClass:"main-title"},[t._v(" "+t._s(t.$t("home.welcome.how-does-it-work"))+"? ")]),e("div",{staticClass:"columns welcome-mb"},[t._m(3),e("div",{staticClass:"column ma"},[e("h2",{staticClass:"main-subtitle"},[t._v(" 1. "+t._s(t.$t("home.welcome.take-a-photo"))+" ")]),e("h3",{staticClass:"welcome-subtitle mb1em"},[t._v(" "+t._s(t.$t("home.welcome.device-captures-info"))+" ")])])]),e("div",{staticClass:"columns welcome-mb"},[t._m(4),e("div",{staticClass:"column ma"},[e("h2",{staticClass:"main-subtitle"},[t._v(" 2. "+t._s(t.$t("home.welcome.tag-the-litter"))+" ")]),e("h3",{staticClass:"welcome-subtitle mb1em"},[t._v(" "+t._s(t.$t("home.welcome.tag-litter-you-see"))+"! ")])])]),e("div",{staticClass:"columns welcome-mb"},[t._m(5),e("div",{staticClass:"column ma"},[e("h2",{staticClass:"main-subtitle"},[t._v(" 3. "+t._s(t.$t("home.welcome.share-results"))+" ")]),e("h3",{staticClass:"welcome-subtitle"},[t._v(" "+t._s(t.$t("home.welcome.share"))+"! ")])])])]),e("div",{staticClass:"partners-container container is-max-desktop"},[e("p",{staticClass:"has-text-centered main-title"},[t._v(t._s(t.$t("home.welcome.our-partners")))]),e("Partners")],1)]),e("Footer")],1)},B=[function(){var s=this,t=s._self._c;return t("div",{staticClass:"column is-one-quarter icon-center has-text-centered"},[t("img",{staticClass:"about-icon",attrs:{src:x}})])},function(){var s=this,t=s._self._c;return t("div",{staticClass:"column is-one-quarter icon-center has-text-centered"},[t("img",{staticClass:"about-icon",attrs:{src:q}})])},function(){var s=this,t=s._self._c;return t("div",{staticClass:"column is-one-quarter icon-center has-text-centered"},[t("img",{staticClass:"about-icon",attrs:{src:H}})])},function(){var s=this,t=s._self._c;return t("div",{staticClass:"column is-one-quarter icon-center has-text-centered"},[t("img",{staticClass:"about-icon",attrs:{src:n}})])},function(){var s=this,t=s._self._c;return t("div",{staticClass:"column is-one-quarter icon-center has-text-centered"},[t("img",{staticClass:"about-icon",attrs:{src:c}})])},function(){var s=this,t=s._self._c;return t("div",{staticClass:"column is-one-quarter icon-center has-text-centered"},[t("img",{staticClass:"about-icon",attrs:{src:P}})])}],R=i(j,E,B,!1,null,"e98c7fd5");const Q=R.exports;export{Q as default}; +import{n as i}from"./app-BwSojYvl.js";import{_ as o,a as r}from"./android-BlaF6v8Z.js";import{_ as n,a as c}from"./phone-lg_u1nSM.js";/* empty css */const l={name:"Footer",data(){return{email:"",socials:[{icon:"facebook2.png",url:"https://facebook.com/openlittermap"},{icon:"ig2.png",url:"https://instagram.com/openlittermap"},{icon:"twitter2.png",url:"https://twitter.com/openlittermap"},{icon:"reddit.png",url:"https://reddit.com/r/openlittermap"},{icon:"tumblr.png",url:"https://tumblr.com/openlittermap"}],version:"v3.3.3"}},computed:{errors(){return this.$store.state.subscriber.errors},hasErrors(){return Object.keys(this.errors).length>0},subscribed(){return this.$store.state.subscriber.just_subscribed}},methods:{clearErrors(){this.$store.commit("clearSubscriberErrors")},getError(s){return this.errors[s][0]},icon(s){return"/assets/icons/"+s},open(s){window.open(s,"_blank")},async subscribe(){await this.$store.dispatch("SUBSCRIBE",this.email)}}};var m=function(){var t=this,e=t._self._c;return e("footer",{staticClass:"foot"},[e("div",{staticClass:"container"},[e("div",{staticClass:"inner-footer-container has-text-centered"},[e("p",{staticClass:"top-footer-title"},[t._v(t._s(t.$t("home.footer.email-you"))+"?")]),t.hasErrors?e("div",{staticClass:"notification is-danger mb1em"},t._l(Object.keys(this.errors),function(a){return e("div",{key:a},[e("p",[t._v(t._s(t.getError(a)))])])}),0):t._e(),e("form",{attrs:{method:"post"},on:{submit:function(a){return a.preventDefault(),t.subscribe.apply(null,arguments)}}},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.email,expression:"email"}],staticClass:"input f-input",attrs:{placeholder:t.$t("home.footer.enter-email"),required:"",type:"email"},domProps:{value:t.email},on:{input:[function(a){a.target.composing||(t.email=a.target.value)},t.clearErrors]}}),e("br"),e("button",{staticClass:"button is-medium is-primary hov mb2"},[t._v(t._s(t.$t("home.footer.subscribe")))]),e("p",{directives:[{name:"show",rawName:"v-show",value:t.subscribed,expression:"subscribed"}],staticClass:"footer-success"},[t._v(" "+t._s(t.$t("home.footer.subscribed-success-msg"))+". ")])])]),e("div",{staticClass:"columns"},[e("div",{staticClass:"column is-half foot-container-left"},[e("p",{staticClass:"olm-title"},[t._v("#OpenLitterMap")]),e("p",{staticClass:"footer-text mb1"},[t._v(t._s(t.$t("home.footer.need-your-help"))+".")]),t._l(t.socials,function(a){return e("img",{staticClass:"footer-icon",attrs:{src:t.icon(a.icon)},on:{click:function(S){return t.open(a.url)}}})}),e("br"),e("p",{staticClass:"footer-text mt1"},[t._v(" "+t._s(this.version)+" ")])],2),e("div",{staticClass:"column is-2"},[e("p",{staticClass:"olm-subtitle"},[t._v(t._s(t.$t("home.footer.read")))]),e("p",{staticClass:"footer-link",on:{click:function(a){return t.open("https://openlittermap.medium.com/")}}},[t._v(t._s(t.$t("home.footer.blog")))]),e("p",{staticClass:"footer-link",on:{click:function(a){return t.open("https://opengeospatialdata.springeropen.com/articles/10.1186/s40965-018-0050-y")}}},[t._v(t._s(t.$t("home.footer.research-paper")))]),e("router-link",{staticClass:"footer-link",attrs:{tag:"p",to:"/references"}},[t._v(t._s(t.$t("home.footer.references")))]),e("router-link",{staticClass:"footer-link",attrs:{tag:"p",to:"/credits"}},[t._v(t._s(t.$t("home.footer.credits")))]),e("router-link",{staticClass:"footer-link",attrs:{tag:"p",to:"/faq"}},[t._v(t._s(t.$t("common.faq")))])],1),e("div",{staticClass:"column is-2"},[e("p",{staticClass:"olm-subtitle"},[t._v(t._s(t.$t("home.footer.watch")))]),e("p",{staticClass:"footer-link",on:{click:function(a){return t.open("https://www.youtube.com/watch?v=my7Cx-kZhT4")}}},[t._v("TEDx 2017")]),e("p",{staticClass:"footer-link",on:{click:function(a){return t.open("https://www.youtube.com/watch?v=E_qhEhHwUGM")}}},[t._v("State of the Map 2019")]),e("p",{staticClass:"footer-link",on:{click:function(a){return t.open("https://www.youtube.com/watch?v=T8rGf1ScR1I")}}},[t._v("Datapub 2020")]),e("p",{staticClass:"footer-link",on:{click:function(a){return t.open("https://www.youtube.com/watch?v=5HuaQNeHuZ8")}}},[t._v("ESA PhiWeek 2020")]),e("p",{staticClass:"footer-link",on:{click:function(a){return t.open("https://www.youtube.com/watch?v=QhLsA0WIfTA")}}},[t._v("Geneva Forum, UN 2020")]),e("p",{staticClass:"footer-link",on:{click:function(a){return t.open("https://www.youtube.com/watch?v=Pe4nHdoAlu4")}}},[t._v("Cardano4Climate Meetup 2021")]),e("p",{staticClass:"footer-link",on:{click:function(a){return t.open("https://www.youtube.com/watch?v=f2UGAxRwrQk")}}},[t._v("CardanoSummit 2022")])]),e("div",{staticClass:"column is-2"},[e("p",{staticClass:"olm-subtitle"},[t._v(t._s(t.$t("home.footer.help")))]),e("router-link",{attrs:{to:"/contact-us"}},[e("p",{staticClass:"footer-link"},[t._v(t._s(t.$t("home.footer.contact-us")))])]),e("p",{staticClass:"footer-link"},[t._v(t._s(t.$t("home.footer.create-account")))]),e("p",{staticClass:"footer-link",on:{click:function(a){return t.open("https://angel.co/openlittermap/jobs")}}},[t._v(t._s(t.$t("home.footer.join-the-team")))]),e("p",{staticClass:"footer-link",on:{click:function(a){return t.open("https://join.slack.com/t/openlittermap/shared_invite/zt-fdctasud-mu~OBQKReRdC9Ai9KgGROw")}}},[t._v(t._s(t.$t("home.footer.join-slack")))]),e("p",{staticClass:"footer-link",on:{click:function(a){return t.open("https://github.com/openlittermap")}}},[t._v("GitHub")]),e("p",{staticClass:"footer-link",on:{click:function(a){return t.open("https://www.facebook.com/pg/openlittermap/groups/")}}},[t._v(t._s(t.$t("home.footer.fb-group")))]),e("router-link",{staticClass:"footer-link",attrs:{to:"/donate"}},[t._v(t._s(t.$t("home.footer.single-donation")))]),e("router-link",{staticClass:"footer-link",attrs:{to:"/signup"}},[t._v(t._s(t.$t("home.footer.crowdfunding")))])],1)])]),e("div",{staticClass:"footer-bottom"},[e("p",{staticClass:"footer-text"},[t._v(t._s(t.$t("home.footer.olm-is-flagship")))])])])},_=[],u=i(l,m,_,!1,null,"164499f6");const p=u.exports,d="/build/assets/cardano-BjKjjQeP.svg",h="/build/assets/engine-lease-finance-logo-CfF72bGp.png",v="/build/assets/plastic_raiders-BEOTwJ_1.png",f="/build/assets/science-foundation-ireland-Cs5Mx-ee.png",g="/build/assets/dpga-CsamMBXL.png",b="/build/assets/c4clogo-BQ46TDw_.jpeg",C={name:"Partners"};var w=function(){var t=this;return t._self._c,t._m(0)},$=[function(){var s=this,t=s._self._c;return t("div",{staticClass:"partners-list"},[t("div",{staticClass:"partner has-text-centered"},[t("a",{attrs:{href:"https://cardano.org/",target:"_blank"}},[t("img",{attrs:{loading:"lazy",src:d,alt:"Partner"}})])]),t("div",{staticClass:"partner has-text-centered"},[t("a",{attrs:{href:"https://elfc.com/",target:"_blank"}},[t("img",{attrs:{loading:"lazy",src:h,alt:"Partner"}})])]),t("div",{staticClass:"partner has-text-centered"},[t("a",{attrs:{href:"https://twitter.com/PlasticRaiders?s=20",target:"_blank"}},[t("img",{attrs:{loading:"lazy",src:v,alt:"Partner"}})])]),t("div",{staticClass:"partner has-text-centered"},[t("a",{attrs:{href:"https://www.sfi.ie/",target:"_blank"}},[t("img",{attrs:{loading:"lazy",src:f,alt:"Partner"}})])]),t("div",{staticClass:"partner has-text-centered"},[t("a",{attrs:{href:"https://www.digitalpublicgoods.net/",target:"_blank"}},[t("img",{attrs:{loading:"lazy",src:g,alt:"Partner"}})])]),t("div",{staticClass:"partner has-text-centered"},[t("a",{attrs:{href:"https://www.cardano4climate.com/",target:"_blank"}},[t("img",{attrs:{loading:"lazy",src:b,alt:"Partner"}})])])])}],k=i(C,w,$,!1,null,"65eba873");const y=k.exports,x="/build/assets/world-BpJiS2Th.png",q="/build/assets/microscope-BxV7iasq.png",H="/build/assets/tree-BQ8u605e.png",P="/build/assets/twitter2-fyDWX9iQ.png",j={name:"Welcome",components:{Partners:y,Footer:p},mounted(){this.startHeadingsAnimation()},data(){return{headings:[{title:this.$t("home.welcome.plastic-pollution-out-of-control"),img:"/assets/plastic_bottles.jpg"},{title:this.$t("home.welcome.fires-out-of-control"),img:"/assets/forest_fire.jpg"},{title:this.$t("home.welcome.glass-hurts-pets"),img:"/assets/dog.jpeg"}],activeHeadingIndex:0}},computed:{activeHeading(){return this.headings[this.activeHeadingIndex]},modal(){return this.$store.state.modal.show}},methods:{android(){window.open("https://play.google.com/store/apps/details?id=com.geotech.openlittermap","_blank")},ios(){window.open("https://apps.apple.com/us/app/openlittermap/id1475982147","_blank")},startHeadingsAnimation(){let s=this,t=null;function e(){if(document.hidden){t&&clearInterval(t);return}t=setInterval(()=>{s.activeHeadingIndex=(s.activeHeadingIndex+1)%s.headings.length},5e3)}e(),document.addEventListener("visibilitychange",e)}}};var E=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"container home-container"},[e("div",{staticClass:"columns c-1"},[e("div",{staticClass:"column is-half",staticStyle:{"padding-right":"1em !important"}},[e("transition",{attrs:{name:"slide-fade-left",mode:"out-in"}},[e("h1",{key:t.activeHeading.title,staticClass:"main-title variable-height",domProps:{innerHTML:t._s(t.activeHeading.title)}})]),e("h2",{staticClass:"subtitle is-3 home-img-padding"},[t._v(" "+t._s(t.$t("home.welcome.help-us"))+". ")]),e("div",{staticClass:"flex"},[e("img",{staticClass:"app-icon",staticStyle:{"margin-right":"1em"},attrs:{src:o},on:{click:t.ios}}),e("img",{staticClass:"app-icon",attrs:{src:r},on:{click:t.android}})])],1),e("div",{staticClass:"column is-half"},[e("div",{staticClass:"top-image"},[e("transition",{attrs:{name:"slide-fade-right",mode:"out-in"}},[e("img",{key:t.activeHeading.title,attrs:{src:t.activeHeading.img,alt:t.activeHeading.title}})])],1)])]),e("div",{staticClass:"why-container"},[e("h1",{staticClass:"main-title"},[t._v(" "+t._s(t.$t("home.welcome.why-collect-data"))+"? ")]),e("div",{staticClass:"columns welcome-mb"},[t._m(0),e("div",{staticClass:"column ma"},[e("h2",{staticClass:"main-subtitle"},[t._v(" 1. "+t._s(t.$t("home.welcome.visibility"))+" ")]),e("h3",{staticClass:"welcome-subtitle mb1em"},[t._v(" "+t._s(t.$t("home.welcome.our-maps-reveal-litter-normality"))+". ")])])]),e("div",{staticClass:"columns welcome-mb"},[t._m(1),e("div",{staticClass:"column ma"},[e("h2",{staticClass:"main-subtitle"},[t._v(" 2. "+t._s(t.$t("home.welcome.science"))+" ")]),e("h3",{staticClass:"welcome-subtitle mb1em"},[t._v(" "+t._s(t.$t("home.welcome.our-data-open-source"))+". ")])])]),e("div",{staticClass:"columns welcome-mb"},[t._m(2),e("div",{staticClass:"column ma"},[e("h2",{staticClass:"main-subtitle"},[t._v(" 3. "+t._s(t.$t("home.welcome.community"))+" ")]),e("h3",{staticClass:"welcome-subtitle"},[t._v(" "+t._s(t.$t("home.welcome.must-work-together"))+". ")])])])]),e("div",[e("h1",{staticClass:"main-title"},[t._v(" "+t._s(t.$t("home.welcome.how-does-it-work"))+"? ")]),e("div",{staticClass:"columns welcome-mb"},[t._m(3),e("div",{staticClass:"column ma"},[e("h2",{staticClass:"main-subtitle"},[t._v(" 1. "+t._s(t.$t("home.welcome.take-a-photo"))+" ")]),e("h3",{staticClass:"welcome-subtitle mb1em"},[t._v(" "+t._s(t.$t("home.welcome.device-captures-info"))+" ")])])]),e("div",{staticClass:"columns welcome-mb"},[t._m(4),e("div",{staticClass:"column ma"},[e("h2",{staticClass:"main-subtitle"},[t._v(" 2. "+t._s(t.$t("home.welcome.tag-the-litter"))+" ")]),e("h3",{staticClass:"welcome-subtitle mb1em"},[t._v(" "+t._s(t.$t("home.welcome.tag-litter-you-see"))+"! ")])])]),e("div",{staticClass:"columns welcome-mb"},[t._m(5),e("div",{staticClass:"column ma"},[e("h2",{staticClass:"main-subtitle"},[t._v(" 3. "+t._s(t.$t("home.welcome.share-results"))+" ")]),e("h3",{staticClass:"welcome-subtitle"},[t._v(" "+t._s(t.$t("home.welcome.share"))+"! ")])])])]),e("div",{staticClass:"partners-container container is-max-desktop"},[e("p",{staticClass:"has-text-centered main-title"},[t._v(t._s(t.$t("home.welcome.our-partners")))]),e("Partners")],1)]),e("Footer")],1)},B=[function(){var s=this,t=s._self._c;return t("div",{staticClass:"column is-one-quarter icon-center has-text-centered"},[t("img",{staticClass:"about-icon",attrs:{src:x}})])},function(){var s=this,t=s._self._c;return t("div",{staticClass:"column is-one-quarter icon-center has-text-centered"},[t("img",{staticClass:"about-icon",attrs:{src:q}})])},function(){var s=this,t=s._self._c;return t("div",{staticClass:"column is-one-quarter icon-center has-text-centered"},[t("img",{staticClass:"about-icon",attrs:{src:H}})])},function(){var s=this,t=s._self._c;return t("div",{staticClass:"column is-one-quarter icon-center has-text-centered"},[t("img",{staticClass:"about-icon",attrs:{src:n}})])},function(){var s=this,t=s._self._c;return t("div",{staticClass:"column is-one-quarter icon-center has-text-centered"},[t("img",{staticClass:"about-icon",attrs:{src:c}})])},function(){var s=this,t=s._self._c;return t("div",{staticClass:"column is-one-quarter icon-center has-text-centered"},[t("img",{staticClass:"about-icon",attrs:{src:P}})])}],R=i(j,E,B,!1,null,"e98c7fd5");const Q=R.exports;export{Q as default}; diff --git a/public/build/assets/app-DuS6KM7M.js b/public/build/assets/app-BwSojYvl.js similarity index 99% rename from public/build/assets/app-DuS6KM7M.js rename to public/build/assets/app-BwSojYvl.js index 7eab54f7..6ffa0a89 100644 --- a/public/build/assets/app-DuS6KM7M.js +++ b/public/build/assets/app-BwSojYvl.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Welcome-DAW7Ybqv.js","assets/android-BlaF6v8Z.js","assets/phone-lg_u1nSM.js","assets/Welcome-CMiWjwE5.css","assets/app-DgER1unv.css","assets/Email-C4w3wM9T.js","assets/Email-Dc7BjTI2.css","assets/Reset-CSUJFfJ4.js","assets/Reset-PQ6Ild1M.css","assets/About-DPBE0Q2l.js","assets/IMG_0556-0A1kBpHu.js","assets/About-CJvJIjVD.css","assets/Cleanups-eon5Bc-e.js","assets/Supercluster-BNFeeEyK.js","assets/index-Dxbj43yt.js","assets/mapHelpers-CSfygYu3.js","assets/moment-zH0z38ay.js","assets/glify-browser-DAFS8CF1.js","assets/Supercluster-pk8N7rfa.css","assets/Cleanups-Dq-PfgLP.css","assets/History-BVxi7Dxp.js","assets/vue-loading-hzYdSApK.js","assets/LitterTable-ChsxOeDI.js","assets/LitterTable-BXAohLoO.css","assets/History-B_SY1GJM.css","assets/vue-loading-Bx4XiriG.css","assets/Merchants-BU28_bVG.js","assets/Merchants-Cz_XwIx8.css","assets/Donate-RQpbk3fS.js","assets/Donate-Di7tAK4-.css","assets/ContactUs-wDc9y1Uc.js","assets/vue-recaptcha.es-KbLMYh7d.js","assets/ContactUs-Dc_Ms9n1.css","assets/Index-CXrDT6HQ.js","assets/BaseCharts-C5LiKM-N.js","assets/Index-xHBi0eWU.css","assets/FAQ-CM-GCf64.js","assets/FAQ-DbW4-k28.css","assets/GlobalMapContainer-53DCEk1M.js","assets/GlobalMapContainer-DB_sJ7_e.css","assets/TagsViewer-C76cCq43.js","assets/leaflet.timedimension.control-D33qz71h.js","assets/leaflet.timedimension-Bdqzd31F.css","assets/TagsViewer-wB-tqvgQ.css","assets/SignUp-JIDYF55j.js","assets/SignUp-6Tszk4Ry.css","assets/Subscribe-BWBMOk3F.js","assets/Subscribe-qGW6QDXl.css","assets/Terms-CdLjzXTS.js","assets/Privacy-DGjpqRx1.js","assets/References-B8W4oQ8F.js","assets/References-BplXbXnZ.css","assets/Leaderboard-BWV_yeAo.js","assets/LeaderboardList-BGXAKUdR.js","assets/LeaderboardList-D5tOaIXl.css","assets/Leaderboard-C00NtHs0.css","assets/Credits-kCn_9RdJ.js","assets/Countries-CsBf8WrW.js","assets/SortLocations-DdlBSIC0.js","assets/SortLocations-DXPjAZTB.css","assets/Countries-DfoyNAPX.css","assets/States-CsX0UE67.js","assets/Cities-Ds2_3Q4N.js","assets/CityMapContainer-BhOtMbex.js","assets/CityMapContainer-DB28sbhK.css","assets/VerifyPhotos-C24Hl2QU.js","assets/RecentTags-CgmFFS03.js","assets/RecentTags-Bs1oOZGS.css","assets/VerifyPhotos-CIXNLNYw.css","assets/Merchants-MB9vWSx2.js","assets/vue2Dropzone-Cofu5FX6.js","assets/Merchants-k4_xx9Zm.css","assets/Upload-B3_oqonN.js","assets/Upload-C-sNntu_.css","assets/Tag-rH_B50Z1.js","assets/Tag-BiBKbM5u.css","assets/BulkTag-_HdSK23F.js","assets/FunctionalCalendar-D8S_iHDa.js","assets/FunctionalCalendar-CIfXugP3.css","assets/BulkTag-D2tf3_38.css","assets/Profile-pp-NK3vM.js","assets/Profile-93d8h0zy.css","assets/MyUploads-BvdFJIdW.js","assets/Teams-BICBJp3G.js","assets/Teams-trJyc3eO.css","assets/Settings-as1oCdH4.js","assets/Details-DlDlKZRi.js","assets/Social-LSzGhZlS.js","assets/Account-vqCFUWRL.js","assets/Payments-VcSsorvg.js","assets/Privacy-GGgsaM3d.js","assets/Privacy-CPrCLl9N.css","assets/Littercoin-CNmEbY4c.js","assets/PickedUp-DnNJB4FB.js","assets/Emails-udg0lUCE.js","assets/GlobalFlag-BXap7gwF.js","assets/GlobalFlag-ChcN8WT1.css","assets/BoundingBox-DfbRgnL2.js","assets/BoundingBox-ZChBJfEI.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Welcome-CMnCnRfK.js","assets/android-BlaF6v8Z.js","assets/phone-lg_u1nSM.js","assets/Welcome-CMiWjwE5.css","assets/app-DgER1unv.css","assets/Email-B8-JmzOD.js","assets/Email-Dc7BjTI2.css","assets/Reset-BkrHXCCU.js","assets/Reset-PQ6Ild1M.css","assets/About-r0jCEBny.js","assets/IMG_0556-0A1kBpHu.js","assets/About-CJvJIjVD.css","assets/Cleanups-DyhnfstR.js","assets/Supercluster-6zQlYpaO.js","assets/index-Dxbj43yt.js","assets/mapHelpers-DmBbMbJe.js","assets/moment-zH0z38ay.js","assets/glify-browser-BLn8SaeM.js","assets/Supercluster-pk8N7rfa.css","assets/Cleanups-Dq-PfgLP.css","assets/History-DwaBXQAD.js","assets/vue-loading-Ck0acTfr.js","assets/LitterTable-BrAEt-_i.js","assets/LitterTable-BXAohLoO.css","assets/History-B_SY1GJM.css","assets/vue-loading-Bx4XiriG.css","assets/Merchants-B_xjooHF.js","assets/Merchants-Cz_XwIx8.css","assets/Donate-CymQE4iA.js","assets/Donate-Di7tAK4-.css","assets/ContactUs-BUcYwgJG.js","assets/vue-recaptcha.es-KbLMYh7d.js","assets/ContactUs-Dc_Ms9n1.css","assets/Index-DWgg3krU.js","assets/BaseCharts-CrCx08_V.js","assets/Index-xHBi0eWU.css","assets/FAQ-ChqK9RWj.js","assets/FAQ-DbW4-k28.css","assets/GlobalMapContainer-BX-EkdbH.js","assets/GlobalMapContainer-DB_sJ7_e.css","assets/TagsViewer-BVKGSnDH.js","assets/leaflet.timedimension.control-DCjZM-xt.js","assets/leaflet.timedimension-Bdqzd31F.css","assets/TagsViewer-wB-tqvgQ.css","assets/SignUp-R39V8jhU.js","assets/SignUp-6Tszk4Ry.css","assets/Subscribe-CF0U_ZOk.js","assets/Subscribe-qGW6QDXl.css","assets/Terms-V1Ug9pC6.js","assets/Privacy-DUg7uCoa.js","assets/References-ryyeDsEf.js","assets/References-BplXbXnZ.css","assets/Leaderboard-Cnk6qMob.js","assets/LeaderboardList-DXMp6mtM.js","assets/LeaderboardList-D5tOaIXl.css","assets/Leaderboard-C00NtHs0.css","assets/Credits-DjTyM_GJ.js","assets/Countries-Dyh1yqJ3.js","assets/SortLocations-R8WNss-N.js","assets/SortLocations-W9sW4X4i.css","assets/Countries-DfoyNAPX.css","assets/States-BEsFSBg6.js","assets/Cities-Cnu1Qb5q.js","assets/CityMapContainer-D1JDJV1x.js","assets/CityMapContainer-DB28sbhK.css","assets/VerifyPhotos-D9w2zbqL.js","assets/RecentTags-BQfW5nXp.js","assets/RecentTags-Bs1oOZGS.css","assets/VerifyPhotos-CIXNLNYw.css","assets/Merchants-Dbwu67dA.js","assets/vue2Dropzone-YzntsfFs.js","assets/Merchants-k4_xx9Zm.css","assets/Upload-C8Yy0zHr.js","assets/Upload-C-sNntu_.css","assets/Tag-BrnjdQ4S.js","assets/Tag-BiBKbM5u.css","assets/BulkTag-B4RuqF6V.js","assets/FunctionalCalendar-zzBz_PQP.js","assets/FunctionalCalendar-CIfXugP3.css","assets/BulkTag-D2tf3_38.css","assets/Profile-DseiX7S2.js","assets/Profile-93d8h0zy.css","assets/MyUploads-YAgiypRv.js","assets/Teams-BcDhvNQi.js","assets/Teams-trJyc3eO.css","assets/Settings-Cun0a94W.js","assets/Details-BBDTCe8n.js","assets/Social-DgpaWAPL.js","assets/Account-BQJ9B9OG.js","assets/Payments-BbgiyAGe.js","assets/Privacy-BPIfeVCy.js","assets/Privacy-CPrCLl9N.css","assets/Littercoin-DRfqG3mg.js","assets/PickedUp-CD9AKudE.js","assets/Emails-B3sy2HLk.js","assets/GlobalFlag-DK1P1Fl8.js","assets/GlobalFlag-ChcN8WT1.css","assets/BoundingBox-CL6PBiVq.js","assets/BoundingBox-ZChBJfEI.css"])))=>i.map(i=>d[i]); /* empty css */var qa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function rM(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function a(){return this instanceof a?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(n,a,i.get?i:{enumerable:!0,get:function(){return e[a]}})}),n}var Hd={exports:{}};/** * @license * Lodash @@ -66,7 +66,7 @@ Unaweza kujiunga tena wakati wowote na michango yako itahifadhiwa.`},Qbe={"team- * vue-router v3.6.5 * (c) 2022 Evan You * @license MIT - */function Ha(e,t){for(var n in t)e[n]=t[n];return e}var g_e=/[!'()*]/g,v_e=function(e){return"%"+e.charCodeAt(0).toString(16)},b_e=/%2C/g,go=function(e){return encodeURIComponent(e).replace(g_e,v_e).replace(b_e,",")};function Sg(e){try{return decodeURIComponent(e)}catch{}return e}function __e(e,t,n){t===void 0&&(t={});var a=n||y_e,i;try{i=a(e||"")}catch{i={}}for(var r in t){var s=t[r];i[r]=Array.isArray(s)?s.map(wk):wk(s)}return i}var wk=function(e){return e==null||typeof e=="object"?e:String(e)};function y_e(e){var t={};return e=e.trim().replace(/^(\?|#|&)/,""),e&&e.split("&").forEach(function(n){var a=n.replace(/\+/g," ").split("="),i=Sg(a.shift()),r=a.length>0?Sg(a.join("=")):null;t[i]===void 0?t[i]=r:Array.isArray(t[i])?t[i].push(r):t[i]=[t[i],r]}),t}function w_e(e){var t=e?Object.keys(e).map(function(n){var a=e[n];if(a===void 0)return"";if(a===null)return go(n);if(Array.isArray(a)){var i=[];return a.forEach(function(r){r!==void 0&&(r===null?i.push(go(n)):i.push(go(n)+"="+go(r)))}),i.join("&")}return go(n)+"="+go(a)}).filter(function(n){return n.length>0}).join("&"):null;return t?"?"+t:""}var mf=/\/?$/;function gf(e,t,n,a){var i=a&&a.options.stringifyQuery,r=t.query||{};try{r=Tg(r)}catch{}var s={name:t.name||e&&e.name,meta:e&&e.meta||{},path:t.path||"/",hash:t.hash||"",query:r,params:t.params||{},fullPath:kk(t,i),matched:e?k_e(e):[]};return n&&(s.redirectedFrom=kk(n,i)),Object.freeze(s)}function Tg(e){if(Array.isArray(e))return e.map(Tg);if(e&&typeof e=="object"){var t={};for(var n in e)t[n]=Tg(e[n]);return t}else return e}var Ur=gf(null,{path:"/"});function k_e(e){for(var t=[];e;)t.unshift(e),e=e.parent;return t}function kk(e,t){var n=e.path,a=e.query;a===void 0&&(a={});var i=e.hash;i===void 0&&(i="");var r=t||w_e;return(n||"/")+r(a)+i}function dS(e,t,n){return t===Ur?e===t:t?e.path&&t.path?e.path.replace(mf,"")===t.path.replace(mf,"")&&(n||e.hash===t.hash&&Dd(e.query,t.query)):e.name&&t.name?e.name===t.name&&(n||e.hash===t.hash&&Dd(e.query,t.query)&&Dd(e.params,t.params)):!1:!1}function Dd(e,t){if(e===void 0&&(e={}),t===void 0&&(t={}),!e||!t)return e===t;var n=Object.keys(e).sort(),a=Object.keys(t).sort();return n.length!==a.length?!1:n.every(function(i,r){var s=e[i],l=a[r];if(l!==i)return!1;var u=t[i];return s==null||u==null?s===u:typeof s=="object"&&typeof u=="object"?Dd(s,u):String(s)===String(u)})}function $_e(e,t){return e.path.replace(mf,"/").indexOf(t.path.replace(mf,"/"))===0&&(!t.hash||e.hash===t.hash)&&C_e(e.query,t.query)}function C_e(e,t){for(var n in t)if(!(n in e))return!1;return!0}function fS(e){for(var t=0;t=0&&(t=e.slice(a),e=e.slice(0,a));var i=e.indexOf("?");return i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),{path:e,query:n,hash:t}}function Pr(e){return e.replace(/\/(?:\s*\/)+/g,"/")}var vf=Array.isArray||function(e){return Object.prototype.toString.call(e)=="[object Array]"},nl=gS,z_e=tb,P_e=O_e,A_e=pS,D_e=mS,E_e=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function tb(e,t){for(var n=[],a=0,i=0,r="",s=t&&t.delimiter||"/",l;(l=E_e.exec(e))!=null;){var u=l[0],d=l[1],f=l.index;if(r+=e.slice(i,f),i=f+u.length,d){r+=d[1];continue}var p=e[i],v=l[2],y=l[3],$=l[4],b=l[5],k=l[6],T=l[7];r&&(n.push(r),r="");var x=v!=null&&p!=null&&p!==v,D=k==="+"||k==="*",P=k==="?"||k==="*",R=l[2]||s,q=$||b;n.push({name:y||a++,prefix:v||"",delimiter:R,optional:P,repeat:D,partial:x,asterisk:!!T,pattern:q?I_e(q):T?".*":"[^"+Ed(R)+"]+?"})}return i1||!R.length)return R.length===0?t():t("span",{},R)}if(this.tag==="a")P.on=D,P.attrs={href:u,"aria-current":T};else{var q=vS(this.$slots.default);if(q){q.isStatic=!1;var U=q.data=Ha({},q.data);U.on=U.on||{};for(var G in U.on){var J=U.on[G];G in D&&(U.on[G]=Array.isArray(J)?J:[J])}for(var ge in D)ge in U.on?U.on[ge].push(D[ge]):U.on[ge]=x;var Te=q.data.attrs=Ha({},q.data.attrs);Te.href=u,Te["aria-current"]=T}else P.on=D}return t(this.tag,P,this.$slots.default)}};function Tk(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){var t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function vS(e){if(e){for(var t,n=0;n-1&&(k.params[P]=$.params[P]);return k.path=Od(x.path,k.params),v(x,k,b)}else if(k.path){k.params={};for(var R=0;R-1}function ah(e,t){return yf(e)&&e._isRouter&&(t==null||e.type===t)}function Ek(e,t,n){var a=function(i){i>=e.length?n():e[i]?t(e[i],function(){a(i+1)}):a(i+1)};a(0)}function iye(e){return function(t,n,a){var i=!1,r=0,s=null;CS(e,function(l,u,d,f){if(typeof l=="function"&&l.cid===void 0){i=!0,r++;var p=Ok(function(b){sye(b)&&(b=b.default),l.resolved=typeof b=="function"?b:bf.extend(b),d.components[f]=b,r--,r<=0&&a()}),v=Ok(function(b){var k="Failed to resolve async component "+f+": "+b;s||(s=yf(b)?b:new Error(k),a(s))}),y;try{y=l(p,v)}catch(b){v(b)}if(y)if(typeof y.then=="function")y.then(p,v);else{var $=y.component;$&&typeof $.then=="function"&&$.then(p,v)}}}),i||a()}}function CS(e,t){return SS(e.map(function(n){return Object.keys(n.components).map(function(a){return t(n.components[a],n.instances[a],n,a)})}))}function SS(e){return Array.prototype.concat.apply([],e)}var rye=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol";function sye(e){return e.__esModule||rye&&e[Symbol.toStringTag]==="Module"}function Ok(e){var t=!1;return function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];if(!t)return t=!0,e.apply(this,n)}}var Ya=function(t,n){this.router=t,this.base=oye(n),this.current=Ur,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};Ya.prototype.listen=function(t){this.cb=t};Ya.prototype.onReady=function(t,n){this.ready?t():(this.readyCbs.push(t),n&&this.readyErrorCbs.push(n))};Ya.prototype.onError=function(t){this.errorCbs.push(t)};Ya.prototype.transitionTo=function(t,n,a){var i=this,r;try{r=this.router.match(t,this.current)}catch(l){throw this.errorCbs.forEach(function(u){u(l)}),l}var s=this.current;this.confirmTransition(r,function(){i.updateRoute(r),n&&n(r),i.ensureURL(),i.router.afterHooks.forEach(function(l){l&&l(r,s)}),i.ready||(i.ready=!0,i.readyCbs.forEach(function(l){l(r)}))},function(l){a&&a(l),l&&!i.ready&&(!ah(l,Ns.redirected)||s!==Ur)&&(i.ready=!0,i.readyErrorCbs.forEach(function(u){u(l)}))})};Ya.prototype.confirmTransition=function(t,n,a){var i=this,r=this.current;this.pending=t;var s=function(b){!ah(b)&&yf(b)&&(i.errorCbs.length?i.errorCbs.forEach(function(k){k(b)}):console.error(b)),a&&a(b)},l=t.matched.length-1,u=r.matched.length-1;if(dS(t,r)&&l===u&&t.matched[l]===r.matched[u])return this.ensureURL(),t.hash&&Ar(this.router,r,t,!1),s(eye(r,t));var d=lye(this.current.matched,t.matched),f=d.updated,p=d.deactivated,v=d.activated,y=[].concat(uye(p),this.router.beforeHooks,dye(f),v.map(function(b){return b.beforeEnter}),iye(v)),$=function(b,k){if(i.pending!==t)return s(Dk(r,t));try{b(t,r,function(T){T===!1?(i.ensureURL(!0),s(tye(r,t))):yf(T)?(i.ensureURL(!0),s(T)):typeof T=="string"||typeof T=="object"&&(typeof T.path=="string"||typeof T.name=="string")?(s(Q_e(r,t)),typeof T=="object"&&T.replace?i.replace(T):i.push(T)):k(T)})}catch(T){s(T)}};Ek(y,$,function(){var b=fye(v),k=b.concat(i.router.resolveHooks);Ek(k,$,function(){if(i.pending!==t)return s(Dk(r,t));i.pending=null,n(t),i.router.app&&i.router.app.$nextTick(function(){fS(t)})})})};Ya.prototype.updateRoute=function(t){this.current=t,this.cb&&this.cb(t)};Ya.prototype.setupListeners=function(){};Ya.prototype.teardown=function(){this.listeners.forEach(function(t){t()}),this.listeners=[],this.current=Ur,this.pending=null};function oye(e){if(!e)if(jc){var t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^https?:\/\/[^\/]+/,"")}else e="/";return e.charAt(0)!=="/"&&(e="/"+e),e.replace(/\/$/,"")}function lye(e,t){var n,a=Math.max(e.length,t.length);for(n=0;n0)){var i=this.router,r=i.options.scrollBehavior,s=Dr&&r;s&&this.listeners.push(kS());var l=function(){var u=a.current,d=Jl(a.base);a.current===Ur&&d===a._startLocation||a.transitionTo(d,function(f){s&&Ar(i,f,u,!0)})};window.addEventListener("popstate",l),this.listeners.push(function(){window.removeEventListener("popstate",l)})}},t.prototype.go=function(a){window.history.go(a)},t.prototype.push=function(a,i,r){var s=this,l=this,u=l.current;this.transitionTo(a,function(d){_f(Pr(s.base+d.fullPath)),Ar(s.router,d,u,!1),i&&i(d)},r)},t.prototype.replace=function(a,i,r){var s=this,l=this,u=l.current;this.transitionTo(a,function(d){Pg(Pr(s.base+d.fullPath)),Ar(s.router,d,u,!1),i&&i(d)},r)},t.prototype.ensureURL=function(a){if(Jl(this.base)!==this.current.fullPath){var i=Pr(this.base+this.current.fullPath);a?_f(i):Pg(i)}},t.prototype.getCurrentLocation=function(){return Jl(this.base)},t}(Ya);function Jl(e){var t=window.location.pathname,n=t.toLowerCase(),a=e.toLowerCase();return e&&(n===a||n.indexOf(Pr(a+"/"))===0)&&(t=t.slice(e.length)),(t||"/")+window.location.search+window.location.hash}var zS=function(e){function t(n,a,i){e.call(this,n,a),!(i&&pye(this.base))&&Mk()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setupListeners=function(){var a=this;if(!(this.listeners.length>0)){var i=this.router,r=i.options.scrollBehavior,s=Dr&&r;s&&this.listeners.push(kS());var l=function(){var d=a.current;Mk()&&a.transitionTo(Md(),function(f){s&&Ar(a.router,f,d,!0),Dr||jd(f.fullPath)})},u=Dr?"popstate":"hashchange";window.addEventListener(u,l),this.listeners.push(function(){window.removeEventListener(u,l)})}},t.prototype.push=function(a,i,r){var s=this,l=this,u=l.current;this.transitionTo(a,function(d){jk(d.fullPath),Ar(s.router,d,u,!1),i&&i(d)},r)},t.prototype.replace=function(a,i,r){var s=this,l=this,u=l.current;this.transitionTo(a,function(d){jd(d.fullPath),Ar(s.router,d,u,!1),i&&i(d)},r)},t.prototype.go=function(a){window.history.go(a)},t.prototype.ensureURL=function(a){var i=this.current.fullPath;Md()!==i&&(a?jk(i):jd(i))},t.prototype.getCurrentLocation=function(){return Md()},t}(Ya);function pye(e){var t=Jl(e);if(!/^\/#/.test(t))return window.location.replace(Pr(e+"/#"+t)),!0}function Mk(){var e=Md();return e.charAt(0)==="/"?!0:(jd("/"+e),!1)}function Md(){var e=window.location.href,t=e.indexOf("#");return t<0?"":(e=e.slice(t+1),e)}function Ag(e){var t=window.location.href,n=t.indexOf("#"),a=n>=0?t.slice(0,n):t;return a+"#"+e}function jk(e){Dr?_f(Ag(e)):window.location.hash=e}function jd(e){Dr?Pg(Ag(e)):window.location.replace(Ag(e))}var mye=function(e){function t(n,a){e.call(this,n,a),this.stack=[],this.index=-1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.push=function(a,i,r){var s=this;this.transitionTo(a,function(l){s.stack=s.stack.slice(0,s.index+1).concat(l),s.index++,i&&i(l)},r)},t.prototype.replace=function(a,i,r){var s=this;this.transitionTo(a,function(l){s.stack=s.stack.slice(0,s.index).concat(l),i&&i(l)},r)},t.prototype.go=function(a){var i=this,r=this.index+a;if(!(r<0||r>=this.stack.length)){var s=this.stack[r];this.confirmTransition(s,function(){var l=i.current;i.index=r,i.updateRoute(s),i.router.afterHooks.forEach(function(u){u&&u(s,l)})},function(l){ah(l,Ns.duplicated)&&(i.index=r)})}},t.prototype.getCurrentLocation=function(){var a=this.stack[this.stack.length-1];return a?a.fullPath:"/"},t.prototype.ensureURL=function(){},t}(Ya),bt=function(t){t===void 0&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=U_e(t.routes||[],this);var n=t.mode||"hash";switch(this.fallback=n==="history"&&!Dr&&t.fallback!==!1,this.fallback&&(n="hash"),jc||(n="abstract"),this.mode=n,n){case"history":this.history=new xS(this,t.base);break;case"hash":this.history=new zS(this,t.base,this.fallback);break;case"abstract":this.history=new mye(this,t.base);break}},PS={currentRoute:{configurable:!0}};bt.prototype.match=function(t,n,a){return this.matcher.match(t,n,a)};PS.currentRoute.get=function(){return this.history&&this.history.current};bt.prototype.init=function(t){var n=this;if(this.apps.push(t),t.$once("hook:destroyed",function(){var s=n.apps.indexOf(t);s>-1&&n.apps.splice(s,1),n.app===t&&(n.app=n.apps[0]||null),n.app||n.history.teardown()}),!this.app){this.app=t;var a=this.history;if(a instanceof xS||a instanceof zS){var i=function(s){var l=a.current,u=n.options.scrollBehavior,d=Dr&&u;d&&"fullPath"in s&&Ar(n,s,l,!1)},r=function(s){a.setupListeners(),i(s)};a.transitionTo(a.getCurrentLocation(),r,r)}a.listen(function(s){n.apps.forEach(function(l){l._route=s})})}};bt.prototype.beforeEach=function(t){return sb(this.beforeHooks,t)};bt.prototype.beforeResolve=function(t){return sb(this.resolveHooks,t)};bt.prototype.afterEach=function(t){return sb(this.afterHooks,t)};bt.prototype.onReady=function(t,n){this.history.onReady(t,n)};bt.prototype.onError=function(t){this.history.onError(t)};bt.prototype.push=function(t,n,a){var i=this;if(!n&&!a&&typeof Promise<"u")return new Promise(function(r,s){i.history.push(t,r,s)});this.history.push(t,n,a)};bt.prototype.replace=function(t,n,a){var i=this;if(!n&&!a&&typeof Promise<"u")return new Promise(function(r,s){i.history.replace(t,r,s)});this.history.replace(t,n,a)};bt.prototype.go=function(t){this.history.go(t)};bt.prototype.back=function(){this.go(-1)};bt.prototype.forward=function(){this.go(1)};bt.prototype.getMatchedComponents=function(t){var n=t?t.matched?t:this.resolve(t).route:this.currentRoute;return n?[].concat.apply([],n.matched.map(function(a){return Object.keys(a.components).map(function(i){return a.components[i]})})):[]};bt.prototype.resolve=function(t,n,a){n=n||this.history.current;var i=ib(t,n,a,this),r=this.match(i,n),s=r.redirectedFrom||r.fullPath,l=this.history.base,u=gye(l,s,this.mode);return{location:i,route:r,href:u,normalizedTo:i,resolved:r}};bt.prototype.getRoutes=function(){return this.matcher.getRoutes()};bt.prototype.addRoute=function(t,n){this.matcher.addRoute(t,n),this.history.current!==Ur&&this.history.transitionTo(this.history.getCurrentLocation())};bt.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==Ur&&this.history.transitionTo(this.history.getCurrentLocation())};Object.defineProperties(bt.prototype,PS);var AS=bt;function sb(e,t){return e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function gye(e,t,n){var a=n==="hash"?"#"+t:t;return e?Pr(e+"/"+a):a}bt.install=xg;bt.version="3.6.5";bt.isNavigationFailure=ah;bt.NavigationFailureType=Ns;bt.START_LOCATION=Ur;jc&&window.Vue&&window.Vue.use(bt);function Tt({next:e,store:t}){if(t.state.user.auth)return e();window.location.href="/"}function Ik({next:e}){if(window.Laravel.jsPermissions.roles.includes("admin")||window.Laravel.jsPermissions.roles.includes("superadmin"))return e();window.location.href="/"}function vye({next:e}){if(window.Laravel.jsPermissions.permissions.includes("create boxes"))return e();window.location.href="/"}function bye({next:e}){if(window.Laravel.jsPermissions.permissions.includes("verify boxes"))return e();window.location.href="/"}function DS(e,t,n){const a=t[n];return a?()=>{const i=DS(e,t,n+1);a({...e,next:i})}:e.next}const No=new AS({mode:"history",linkActiveClass:"is-active",routes:[{path:"/",component:()=>De(()=>import("./Welcome-DAW7Ybqv.js"),__vite__mapDeps([0,1,2,3,4]))},{path:"/confirm/email/:token",component:()=>De(()=>import("./Welcome-DAW7Ybqv.js"),__vite__mapDeps([0,1,2,3,4]))},{path:"/password/reset",component:()=>De(()=>import("./Email-C4w3wM9T.js"),__vite__mapDeps([5,6,4]))},{path:"/password/reset/:token",component:()=>De(()=>import("./Reset-CSUJFfJ4.js"),__vite__mapDeps([7,8,4])),props:!0},{path:"/emails/unsubscribe/:token",component:()=>De(()=>import("./Welcome-DAW7Ybqv.js"),__vite__mapDeps([0,1,2,3,4]))},{path:"/about",component:()=>De(()=>import("./About-DPBE0Q2l.js"),__vite__mapDeps([9,1,10,11,4]))},{path:"/cleanups",component:()=>De(()=>import("./Cleanups-eon5Bc-e.js"),__vite__mapDeps([12,13,14,15,16,17,18,19,4])),children:[{path:":invite_link/join",component:()=>De(()=>import("./Cleanups-eon5Bc-e.js"),__vite__mapDeps([12,13,14,15,16,17,18,19,4]))}]},{path:"/history",component:()=>De(()=>import("./History-BVxi7Dxp.js"),__vite__mapDeps([20,21,22,23,24,25,4]))},{path:"/littercoin/merchants",component:()=>De(()=>import("./Merchants-BU28_bVG.js"),__vite__mapDeps([26,27,4]))},{path:"/donate",component:()=>De(()=>import("./Donate-RQpbk3fS.js"),__vite__mapDeps([28,21,10,29,25,4]))},{path:"/contact-us",component:()=>De(()=>import("./ContactUs-wDc9y1Uc.js"),__vite__mapDeps([30,31,32,4]))},{path:"/community",component:()=>De(()=>import("./Index-CXrDT6HQ.js"),__vite__mapDeps([33,34,16,35,4]))},{path:"/faq",component:()=>De(()=>import("./FAQ-CM-GCf64.js"),__vite__mapDeps([36,37,4]))},{path:"/global",component:()=>De(()=>import("./GlobalMapContainer-53DCEk1M.js"),__vite__mapDeps([38,21,13,14,15,16,17,18,39,25,4]))},{path:"/tags",component:()=>De(()=>import("./TagsViewer-C76cCq43.js"),__vite__mapDeps([40,15,16,41,42,14,43,4]))},{path:"/signup",component:()=>De(()=>import("./SignUp-JIDYF55j.js"),__vite__mapDeps([44,45,4]))},{path:"/join/:plan?",component:()=>De(()=>import("./Subscribe-BWBMOk3F.js"),__vite__mapDeps([46,21,31,47,25,4]))},{path:"/terms",component:()=>De(()=>import("./Terms-CdLjzXTS.js"),__vite__mapDeps([48,24,4]))},{path:"/privacy",component:()=>De(()=>import("./Privacy-DGjpqRx1.js"),__vite__mapDeps([49,24,4]))},{path:"/references",component:()=>De(()=>import("./References-B8W4oQ8F.js"),__vite__mapDeps([50,16,51,4]))},{path:"/leaderboard",component:()=>De(()=>import("./Leaderboard-BWV_yeAo.js"),__vite__mapDeps([52,21,53,16,54,55,4]))},{path:"/credits",component:()=>De(()=>import("./Credits-kCn_9RdJ.js"),__vite__mapDeps([56,24,4]))},{path:"/world",component:()=>De(()=>import("./Countries-CsBf8WrW.js"),__vite__mapDeps([57,21,53,16,54,58,59,60,25,4]))},{path:"/world/:country",component:()=>De(()=>import("./States-CsX0UE67.js"),__vite__mapDeps([61,58,16,59,21,24,25,4]))},{path:"/world/:country/:state",component:()=>De(()=>import("./Cities-Ds2_3Q4N.js"),__vite__mapDeps([62,58,16,59,21,24,25,4]))},{path:"/world/:country/:state/:city/map/:minDate?/:maxDate?/:hex?",component:()=>De(()=>import("./CityMapContainer-BhOtMbex.js"),__vite__mapDeps([63,21,15,16,64,25,4]))},{path:"/admin/photos",component:()=>De(()=>import("./VerifyPhotos-C24Hl2QU.js"),__vite__mapDeps([65,21,16,66,67,68,25,4])),meta:{middleware:[Tt,Ik]}},{path:"/admin/merchants",component:()=>De(()=>import("./Merchants-MB9vWSx2.js"),__vite__mapDeps([69,13,14,15,16,17,18,70,71,4])),meta:{middleware:[Tt,Ik]}},{path:"/upload",component:()=>De(()=>import("./Upload-B3_oqonN.js"),__vite__mapDeps([72,70,73,4])),meta:{middleware:[Tt]}},{path:"/submit",component:()=>De(()=>import("./Upload-B3_oqonN.js"),__vite__mapDeps([72,70,73,4])),meta:{middleware:[Tt]}},{path:"/tag",component:()=>De(()=>import("./Tag-rH_B50Z1.js"),__vite__mapDeps([74,16,21,66,67,75,25,4])),meta:{middleware:[Tt]}},{path:"/bulk-tag",component:()=>De(()=>import("./BulkTag-_HdSK23F.js"),__vite__mapDeps([76,77,78,21,16,79,25,4])),meta:{middleware:[Tt]}},{path:"/profile",component:()=>De(()=>import("./Profile-pp-NK3vM.js"),__vite__mapDeps([80,16,2,34,15,41,42,77,78,81,4])),meta:{middleware:[Tt]}},{path:"/my-uploads",component:()=>De(()=>import("./MyUploads-BvdFJIdW.js"),__vite__mapDeps([82,22,23,4])),meta:{middleware:[Tt]}},{path:"/teams",component:()=>De(()=>import("./Teams-BICBJp3G.js"),__vite__mapDeps([83,21,14,15,16,17,84,25,4])),meta:{middleware:[Tt]}},{path:"/settings",component:()=>De(()=>import("./Settings-as1oCdH4.js"),__vite__mapDeps([85,86,4,87,88,89,21,25,90,91,92,93,94,95,96])),meta:{middleware:[Tt]},children:[{path:"password",component:()=>De(()=>import("./Settings-as1oCdH4.js"),__vite__mapDeps([85,86,4,87,88,89,21,25,90,91,92,93,94,95,96])),meta:{middleware:[Tt]}},{path:"details",component:()=>De(()=>import("./Details-DlDlKZRi.js"),__vite__mapDeps([86,4])),meta:{middleware:[Tt]}},{path:"social",component:()=>De(()=>import("./Social-LSzGhZlS.js"),__vite__mapDeps([87,4])),meta:{middleware:[Tt]}},{path:"account",component:()=>De(()=>import("./Account-vqCFUWRL.js"),__vite__mapDeps([88,4])),meta:{middleware:[Tt]}},{path:"payments",component:()=>De(()=>import("./Payments-VcSsorvg.js"),__vite__mapDeps([89,21,25,4])),meta:{middleware:[Tt]}},{path:"privacy",component:()=>De(()=>import("./Privacy-GGgsaM3d.js"),__vite__mapDeps([90,91,4])),meta:{middleware:[Tt]}},{path:"littercoin",component:()=>De(()=>import("./Littercoin-CNmEbY4c.js"),__vite__mapDeps([92,4])),meta:{middleware:[Tt]}},{path:"picked-up",component:()=>De(()=>import("./PickedUp-DnNJB4FB.js"),__vite__mapDeps([93,4])),meta:{middleware:[Tt]}},{path:"emails",component:()=>De(()=>import("./Emails-udg0lUCE.js"),__vite__mapDeps([94,4])),meta:{middleware:[Tt]}},{path:"show-flag",component:()=>De(()=>import("./GlobalFlag-BXap7gwF.js"),__vite__mapDeps([95,21,96,25,4])),meta:{middleware:[Tt]}}]},{path:"/bbox",component:()=>De(()=>import("./BoundingBox-DfbRgnL2.js"),__vite__mapDeps([97,21,98,25,4])),meta:{middleware:[Tt,vye]}},{path:"/bbox/verify",component:()=>De(()=>import("./BoundingBox-DfbRgnL2.js"),__vite__mapDeps([97,21,98,25,4])),meta:{middleware:[Tt,bye]}}]});No.beforeEach((e,t,n)=>{if(!e.meta.middleware)return n();const a=e.meta.middleware,i={to:e,from:t,next:n,store:BS};return a[0]({...i,next:DS(i,a,1)})});const _ye={async ADD_BOXES_TO_IMAGE(e){await axios.post("/bbox/create",{photo_id:e.rootState.admin.id,boxes:e.state.boxes}).then(t=>{console.log("add_boxes_to_image",t),t.data.success&&(fe.$vToastify.success({title:"Success!",body:"Thank you for helping us clean the planet!",position:"top-right"}),e.dispatch("GET_NEXT_BBOX"))}).catch(t=>{console.error("add_boxes_to_image",t)})},async BBOX_SKIP_IMAGE(e,t){await axios.post("/bbox/skip",{photo_id:e.rootState.admin.id}).then(n=>{console.log("bbox_skip_image",n),fe.$vToastify.success({title:"Skipping",body:"This image will not be used for AI",position:"top-right"}),t?e.dispatch("GET_NEXT_BOXES_TO_VERIFY"):e.dispatch("GET_NEXT_BBOX")}).catch(n=>{console.error("bbox_skip_image",n)})},async BBOX_UPDATE_TAGS(e){await axios.post("/bbox/tags/update",{photoId:e.rootState.admin.id,tags:e.rootState.litter.tags}).then(t=>{console.log("bbox_update_tags",t),fe.$vToastify.success({title:"Updated",body:"The tags for this image have been updated",position:"top-right"});const n=[...e.state.boxes];e.commit("initBboxTags",e.rootState.litter.tags),e.commit("updateBoxPositions",n)}).catch(t=>{console.error("bbox_update_tags",t)})},async BBOX_WRONG_TAGS(e){await axios.post("/bbox/tags/wrong",{photoId:e.rootState.admin.id}).then(t=>{console.log("bbox_wrong_tags",t),t.data.success&&fe.$vToastify.success({title:"Thanks for helping!",body:"An admin will update these tags",position:"top-right"})}).catch(t=>{console.error("bbox_wrong_tags",t)})},async GET_NEXT_BBOX(e){await axios.get("/bbox/index").then(t=>{console.log("next_bb_img",t),e.commit("adminImage",{id:t.data.photo.id,filename:t.data.photo.five_hundred_square_filepath}),e.commit("initAdminItems",t.data.photo),e.commit("initBboxTags",t.data.photo),e.commit("bboxCount",{usersBoxCount:t.data.usersBoxCount,totalBoxCount:t.data.totalBoxCount}),e.commit("adminLoading",!1)}).catch(t=>{console.log("error.next_bb_img",t)})},async GET_NEXT_BOXES_TO_VERIFY(e){await axios.get("/bbox/verify/index").then(t=>{console.log("verify_next_box",t),t.data.photo&&(e.commit("adminImage",{id:t.data.photo.id,filename:t.data.photo.five_hundred_square_filepath}),e.commit("initAdminItems",t.data.photo),e.commit("initBoxesToVerify",t.data.photo.boxes),e.commit("adminLoading",!1))}).catch(t=>{console.log("error.verify_next_box",t)})},async VERIFY_BOXES(e){await axios.post("/bbox/verify/update",{photo_id:e.rootState.admin.id,hasChanged:e.state.hasChanged,boxes:e.state.boxes}).then(t=>{console.log("verify_boxes",t),t.data.success&&(fe.$vToastify.success({title:"Verified",body:"Stage 4 level achieved!",position:"top-right"}),e.dispatch("GET_NEXT_BOXES_TO_VERIFY"))}).catch(t=>{console.error("verify_boxes",t)})}},wf=["alcohol","art","brands","coastal","coffee","dogshit","dumping","food","industrial","sanitary","softdrinks","smoking","material","other"],So={smoking:["butts","lighters","cigaretteBox","tobaccoPouch","skins","smoking_plastic","filters","filterbox","vape_pen","vape_oil","smokingOther"],alcohol:["beerBottle","spiritBottle","wineBottle","beerCan","brokenGlass","bottleTops","paperCardAlcoholPackaging","plasticAlcoholPackaging","pint","six_pack_rings","alcohol_plastic_cups","alcoholOther"],art:["item"],coffee:["coffeeCups","coffeeLids","coffeeOther"],food:["sweetWrappers","paperFoodPackaging","plasticFoodPackaging","plasticCutlery","crisp_small","crisp_large","styrofoam_plate","napkins","sauce_packet","glass_jar","glass_jar_lid","aluminium_foil","pizza_box","foodOther","chewing_gum"],softdrinks:["waterBottle","fizzyDrinkBottle","tinCan","bottleLid","bottleLabel","sportsDrink","straws","plastic_cups","plastic_cup_tops","milk_bottle","milk_carton","paper_cups","juice_cartons","juice_bottles","juice_packet","ice_tea_bottles","ice_tea_can","energy_can","pullring","strawpacket","styro_cup","broken_glass","softDrinkOther"],sanitary:["gloves","facemask","condoms","nappies","menstral","deodorant","ear_swabs","tooth_pick","tooth_brush","wetwipes","hand_sanitiser","sanitaryOther"],dumping:["small","medium","large"],industrial:["oil","industrial_plastic","chemical","bricks","tape","industrial_other"],coastal:["microplastics","mediumplastics","macroplastics","rope_small","rope_medium","rope_large","fishing_gear_nets","ghost_nets","buoys","degraded_plasticbottle","degraded_plasticbag","degraded_straws","degraded_lighters","balloons","lego","shotgun_cartridges","styro_small","styro_medium","styro_large","coastal_other"],brands:["aadrink","acadia","adidas","albertheijn","aldi","amazon","amstel","anheuser_busch","apple","applegreen","asahi","avoca","bacardi","ballygowan","bewleys","brambles","budweiser","bulmers","bullit","burgerking","butlers","cadburys","cafenero","calanda","camel","caprisun","carlsberg","centra","circlek","coke","coles","colgate","corona","costa","doritos","drpepper","dunnes","duracell","durex","esquires","evian","fanta","fernandes","fosters","frank_and_honest","fritolay","gatorade","gillette","goldenpower","guinness","haribo","heineken","hertog_jan","insomnia","kellogs","kfc","lavish","lego","lidl","lindenvillage","lipton","lolly_and_cookes","loreal","lucozade","marlboro","mars","mcdonalds","modelo","molson_coors","monster","nero","nescafe","nestle","nike","obriens","ok_","pepsi","powerade","redbull","ribena","sainsburys","samsung","schutters","seven_eleven","slammers","spa","spar","starbucks","stella","subway","supermacs","supervalu","tayto","tesco","tim_hortons","thins","volvic","waitrose","walkers","wendys","wilde_and_greene","winston","woolworths","wrigleys"],other:["random_litter","bags_litter","overflowing_bins","plastic","automobile","tyre","traffic_cone","metal","plastic_bags","election_posters","forsale_posters","cable_tie","books","magazine","paper","stationary","washing_up","clothing","hair_tie","ear_plugs","elec_small","elec_large","batteries","balloons","life_buoy","other"],trashdog:["trashdog","littercat","duck"],dogshit:["poo","poo_in_bag"],material:["aluminium","bronze","carbon_fiber","ceramic","composite","concrete","copper","fiberglass","glass","iron_or_steel","latex","metal","nickel","nylon","paper","plastic","polyethylene","polymer","polypropylene","polystyrene","pvc","rubber","titanium","wood"]},yye={activateBox(e,t){let n=[...e.boxes];n.map(a=>(a.active=a.id===t,a)),e.boxes=n},addBoxBrand(e,t){let n=[...e.brands];n.push(t),e.brands=n},addNewBox(e){let t=e.boxes;const n=e.boxes.length===0?1:e.boxes[e.boxes.length-1].id+1;t.push({id:n,top:0,left:0,height:100,width:100,active:!1,category:null,tag:null,brand:null,showLabel:!1,hidden:!1})},addSelectedBrandToBox(e,t){let n=[...e.boxes],a=n.find(r=>r.id===t),i=[...e.brands];a.brand=i[e.selectedBrandIndex],i.splice(e.selectedBrandIndex,1),e.brands=i,e.boxes=n,e.selectedBrandIndex=null,e.hasChanged=!0},addTagToBox(e,t){let n=[...e.boxes],a=n.find(i=>i.active);a.category=t.category,a.tag=t.tag,t.hasOwnProperty("brand")&&(a.brand=t.brand),e.boxes=n},bboxCount(e,t){e.usersBoxCount=t.usersBoxCount,e.totalBoxCount=t.totalBoxCount},setBrandsBox(e,t){e.brands=t},clearBoxes(e){e.boxes=[]},deactivateBoxes(e){let t=[...e.boxes];t.map(n=>n.active=!1),e.selectedBrandIndex=null,e.boxes=t},initBboxTags(e,t){console.log({payload:t}),this.commit("clearBoxes"),e.hasChanged=!1,wf.map(n=>{t[n]&&So[n].map(a=>{if(t[n][a]){const i=t[n][a];console.log(n,a,i);let r=1;for(;r<=i;){if(n==="brands"){this.commit("addBoxBrand",a),r++;continue}this.commit("addNewBox");const s=e.boxes[e.boxes.length-1].id;this.commit("activateBox",s),this.commit("addTagToBox",{category:n,tag:a}),r++}}})})},initBoxesToVerify(e,t){this.commit("clearBoxes"),t.map(n=>{const a=JSON.parse(n.bbox);return n.left=a[0],n.top=a[1],n.width=a[2],n.height=a[3],n}),e.boxes=t},moveBoxUp(e){let t=[...e.boxes];t.map(n=>(n.active&&n.top--,n)),e.boxes=t,e.hasChanged=!0},moveBoxRight(e){let t=[...e.boxes];t.map(n=>(n.active&&n.left++,n)),e.boxes=t,e.hasChanged=!0},moveBoxDown(e){let t=[...e.boxes];t.map(n=>(n.active&&n.top++,n)),e.boxes=t,e.hasChanged=!0},moveBoxLeft(e){let t=[...e.boxes];t.map(n=>(n.active&&n.left--,n)),e.boxes=t,e.hasChanged=!0},removeBboxTag(e,t){let n=[...e.boxes];n.map(a=>{if(a.active){let i=Object.assign({},a.tags);delete i[t.category][t.tag_key],Object.keys(i[t.category]).length===0&&delete i[t.category]}return a}),e.boxes=n},rotateBox(e,t){let n=[...e.boxes],a=n.find(s=>s.id===t);const i=a.width,r=a.height;a.height=i,a.width=r,e.boxes=n},selectBrandBoxIndex(e,t){e.selectedBrandIndex=t},showAllBoxes(e){let t=[...e.boxes];t.map(n=>n.hidden=!1),e.boxes=t},toggleBoxLabel(e,t){let n=[...e.boxes],a=n.find(i=>i.id===t);a.showLabel=!a.showLabel,e.boxes=n},toggleHiddenBoxes(e){let t=[...e.boxes];t.map(n=>n.hidden=!n.active),e.boxes=t},updateBoxPosition(e,t){e.boxes.map(n=>(n.active&&(n.top=t.top,n.left=t.left,n.width=t.width,n.height=t.height),n)),e.hasChanged=!0},updateBoxPositions(e,t){let n=[...e.boxes];n.map((a,i)=>(t[i]&&(a.id=t[i].id,a.top=t[i].top,a.left=t[i].left,a.width=t[i].width,a.height=t[i].height),a)),e.boxes=n,e.hasChanged=!0}},wye={boxes:[{id:1,width:100,height:100,top:0,left:0,active:!0,category:null,tag:null,brand:null,showLabel:!1,hidden:!1}],brands:[],hasChanged:!1,selectedBrandIndex:null,totalBoxCount:0,usersBoxCount:0},kye={state:wye,actions:_ye,mutations:yye},$ye={center:null,data:null,hex:100,zoom:1},Cye={async GET_CITY_DATA(e,t){await axios.get("/city",{params:{city:t.city,min:t.min,max:t.max,hex:t.hex}}).then(n=>{console.log("get_city_data",n),e.commit("init_city_data",n.data)}).catch(n=>{console.log("error.get_city_data",n)})}},Sye={init_city_data(e,t){e.center=t.center_map,e.data=t.litterGeojson,e.hex=t.hex,e.zoom=t.map_zoom}},Tye=Object.assign({},$ye),xye={state:Tye,actions:Cye,mutations:Sye},zye={async CREATE_CLEANUP_EVENT(e,t){const n=Se.t("notifications.success"),a="A new cleanup has been created!";await axios.post("/cleanups/create",{name:t.name,date:t.date,lat:t.lat,lon:t.lon,time:t.time,description:t.description,invite_link:t.invite_link}).then(i=>{console.log("create_cleanup_event",i),i.data.success&&(fe.$vToastify.success({title:n,body:a}),setTimeout(()=>{fe.$vToastify.success({title:n,body:"You have joined a cleanup!"})},1500))}).catch(i=>{var r,s;console.log("create_cleanup_event",i),e.commit("setErrors",(s=(r=i==null?void 0:i.response)==null?void 0:r.data)==null?void 0:s.errors)})},async GET_CLEANUPS(e){await axios.get("/cleanups/get-cleanups").then(t=>{console.log("get_cleanups",t),t.data.success&&e.commit("setCleanupsGeojson",t.data.geojson)}).catch(t=>{console.error("get_cleanups",t)})},async JOIN_CLEANUP(e,t){const n=Se.t("notifications.success"),a="You have joined a cleanup!";await axios.post(`/cleanups/${t.link}/join`).then(i=>{console.log("join_cleanup",i),i.data.cleanup&&e.commit("setActiveCleanup",i.data.cleanup),i.data.success?fe.$vToastify.success({title:n,body:a}):i.data.msg==="already joined"?fe.$vToastify.error({title:"Not possible",body:"You have already joined this cleanup. Please refresh the page to see!"}):i.data.msg==="cleanup not found"&&fe.$vToastify.error({title:"Not found",body:"We cannot find a cleanup with this invitation"})}).catch(i=>{console.error("join_cleanup",i)})},async LEAVE_CLEANUP(e,t){const n=Se.t("notifications.success"),a="You have left the cleanup";await axios.post(`/cleanups/${t.link}/leave`).then(i=>{console.log("leave_cleanup",i),i.data.success?fe.$vToastify.success({title:n,body:a}):i.data.msg==="already left"&&fe.$vToastify.error({title:"Not possible",body:"You have already left this cleanup. Please refresh the page to see!"})}).catch(i=>{console.error("leave_cleanup",i)})}},Pye={creatingCleanup(e,t){e.creating=t},joiningCleanup(e,t){e.joining=t},setActiveCleanup(e,t){e.cleanup=t},setCleanupLocation(e,t){e.lat=t.lat,e.lon=t.lng},setCleanupsGeojson(e,t){e.geojson=t}},Aye={creating:!1,joining:!1,lat:null,lon:null,geojson:null,cleanup:null},Dye={state:Aye,actions:zye,mutations:Pye},Eye={photosPerMonth:0,litterTagsPerMonth:0,usersPerMonth:0,littercoinPerMonth:0,statsByMonth:[]},Oye={async GET_STATS(e){await axios.get("/community/stats").then(t=>{console.log("get_stats",t),e.commit("setStats",t.data)}).catch(t=>{console.error("get_stats",t)})}},Mye={setStats(e,t){e.photosPerMonth=t.photosPerMonth,e.usersPerMonth=t.usersPerMonth,e.litterTagsPerMonth=t.litterTagsPerMonth,e.statsByMonth=t.statsByMonth}},jye=Object.assign({},Eye),Iye={state:jye,actions:Oye,mutations:Mye},ES={amounts:[]},Lye={async GET_DONATION_AMOUNTS(e){await axios.get(window.location.origin+"/donate/amounts").then(t=>{console.log("get_donation_options",t.data),e.commit("setDonateAmounts",t.data)}).catch(t=>{console.log("error.get_donation_options",t)})}},Fye={resetState(e){Object.assign(e,ES)},setDonateAmounts(e,t){e.amounts=t}},Rye=Object.assign({},ES),Bye={actions:Lye,mutations:Fye,state:Rye},Nye={clearError(e,t){e.errorsObject&&(delete e.errorsObject[t],Object.keys(e.errorsObject).length===0&&(e.errorsObject=null))},clearErrors(e){e.errorsObject=null},hideModal(e){e.errorsObject=null},setErrors(e,t){e.errorsObject=t},setCleanupLocation(e){var t,n;(t=e.errorsObject)!=null&&t.hasOwnProperty("lat")&&delete e.errorsObject.lat,(n=e.errorsObject)!=null&&n.hasOwnProperty("lon")&&delete e.errorsObject.lon}},qye={errorsObject:null},Hye={state:qye,mutations:Nye},OS={artData:[],currentDate:"today",loading:!0,datesOpen:!1,langsOpen:!1,geojson:[],customTagsFound:[]},Vye={async GET_ART_DATA(e){await axios.get("/global/art-data").then(t=>{console.log("get_art_data",t),e.commit("globalArtData",t.data)}).catch(t=>{console.error("get_art_data",t)})},async GET_CLUSTERS(e,t){await axios.get("/global/clusters",{params:{zoom:t.zoom,year:t.year,bbox:null}}).then(n=>{console.log("get_clusters",n),e.commit("updateGlobalData",n.data)}).catch(n=>{console.error("get_clusters",n)})},async SEARCH_CUSTOM_TAGS(e,t){await axios.get("/global/search/custom-tags",{params:{search:t}}).then(n=>{console.log("search_custom_tags",n),n.data.success&&e.commit("setCustomTagsFound",n.data.tags)}).catch(n=>{console.error("search_custom_tags",n)})}},Uye={closeDatesButton(e){e.datesOpen=!1},closeLangsButton(e){e.langsOpen=!1},globalArtData(e,t){e.artData=t},globalLoading(e,t){e.loading=t},resetState(e){Object.assign(e,OS)},setCustomTagsFound(e,t){e.customTagsFound=t},toggleLangsButton(e){e.langsOpen=!e.langsOpen},toggleGlobalDates(e){e.datesOpen=!e.datesOpen},updateGlobalData(e,t){e.geojson=t}},Wye=Object.assign({},OS),Kye={state:Wye,actions:Vye,mutations:Uye},Gye={async GET_USERS_FOR_GLOBAL_LEADERBOARD(e,t){await axios.get("/global/leaderboard",{params:{timeFilter:t}}).then(n=>{console.log("get_users_for_global_leaderboard",n),e.commit("setGlobalLeaderboard",n.data),e.commit("setGlobalLeaders",n.data.users)}).catch(n=>{console.error("get_users_for_global_leaderboard",n)})},async GET_USERS_FOR_LOCATION_LEADERBOARD(e,t){await axios.get("/global/leaderboard/location",{params:{timeFilter:t==null?void 0:t.timeFilter,locationType:t==null?void 0:t.locationType,locationId:t==null?void 0:t.locationId}}).then(n=>{console.log("get_users_for_location_leaderboard",n),e.commit("setGlobalLeaderboard",n.data),e.commit("setLocationLeaderboard",{locationType:t.locationType,locationId:t.locationId,users:n.data.users}),e.commit("setSelectedLocationId",t.locationId),e.commit("updateLocationTabKey")}).catch(n=>{console.error("get_users_for_location_leaderboard",n)})},async GET_NEXT_LEADERBOARD_PAGE(e){e.commit("incrementLeaderboardPage"),await axios.get("/global/leaderboard",{params:{page:e.state.currentPage}}).then(t=>{console.log("get_next_leaderboard_page",t),e.commit("setGlobalLeaderboard",t.data)}).catch(t=>{console.error("get_next_leaderboard_page",t)})},async GET_PREVIOUS_LEADERBOARD_PAGE(e){e.commit("decrementLeaderboardPage"),await axios.get("/global/leaderboard",{params:{page:e.state.currentPage}}).then(t=>{console.log("get_previous_leaderboard_page",t),e.commit("setGlobalLeaderboard",t.data)}).catch(t=>{console.error("get_previous_leaderboard_page",t)})}},Jye={setGlobalLeaderboard(e,t){e.users=t.users,e.hasNextPage=t.hasNextPage},incrementLeaderboardPage(e){e.currentPage++},decrementLeaderboardPage(e){e.currentPage--},setLocationLeaderboard(e,t){e[t.locationType][t.locationId]=t.users}},Yye={currentPage:1,hasNextPage:!1,users:[],country:{},state:{},city:{}},Xye={state:Yye,actions:Gye,mutations:Jye},MS={countryName:"",globalLeaders:[],hex:null,level:{previousXp:0,nextXp:0},locations:[],littercoin:0,minDate:null,maxDate:null,previousLevelInt:0,progressPercent:0,sortLocationsBy:"most-data",stateName:"",totalLitterInt:0,total_litter:0,total_photos:0,selectedLocationId:0,locationTabKey:0,countryNames:[]},Zye={async DOWNLOAD_DATA(e,t){let n=Se.t("notifications.success"),a="Your download is being processed and will be emailed to you soon";await axios.post("/download",{locationType:t.locationType,locationId:t.locationId,email:t.email}).then(i=>{console.log("download_data",i),i.data.success?fe.$vToastify.success({title:n,body:a,position:"top-right"}):fe.$vToastify.success({title:"Error",body:"Sorry, there was an error with the download. Please contact support",position:"top-right"})}).catch(i=>{console.error("download_data",i)})},async GET_WORLD_CUP_DATA(e){await axios.get("/get-world-cup-data").then(t=>{console.log("get_world_cup_data",t),e.commit("setCountries",t.data)}).catch(t=>{console.log("error.get_world_cup_data",t)})},async GET_LIST_OF_COUNTRY_NAMES(e){await axios.get("/countries/names").then(t=>{console.log("get_list_of_country_names",t),t.data.success&&e.commit("setCountryNames",t.data.countries)}).catch(t=>{console.log("error.get_list_of_country_names",t)})},async GET_COUNTRIES(e){await axios.get("countries").then(t=>{console.log("get_countries",t),e.commit("setCountries",t.data)}).catch(t=>{console.log("error.get_countries",t)})},async GET_STATES(e,t){await axios.get("/states",{params:{country:t}}).then(n=>{console.log("get_states",n),n.data.success?(e.commit("countryName",n.data.countryName),e.commit("setLocations",n.data.states)):No.push({path:"/world"})}).catch(n=>{console.log("error.get_states",n)})},async GET_CITIES(e,t){await axios.get("/cities",{params:{country:t.country,state:t.state}}).then(n=>{console.log("get_cities",n),n.data.success?(e.commit("countryName",n.data.country),e.commit("stateName",n.data.state),e.commit("setLocations",n.data.cities)):No.push({path:"/world"})}).catch(n=>{console.log("error.get_cities",n)})}},Qye={resetLocations(e){Object.assign(e,MS)},setCountries(e,t){e.locations=t.countries,e.globalLeaders=t.globalLeaders,e.total_litter=t.total_litter,e.total_photos=t.total_photos,e.level.previousXp=t.previousXp,e.level.nextXp=t.nextXp,e.littercoin=t.littercoin},setCountryNames(e,t){e.countryNames=t},setGlobalLeaders(e,t){e.globalLeaders=t},countryName(e,t){e.countryName=t},stateName(e,t){e.stateName=t},setLocations(e,t){e.locations=t},updateCitySlider(e,t){let n=[...e.locations];n[t.index].minDate=t.dates[0],n[t.index].maxDate=t.dates[1],n[t.index].hex=t.hex,e.locations=n},incrementTotalPhotos(e,t=1){e.total_photos+=t},decrementTotalPhotos(e,t=1){e.total_photos-=t},incrementTotalLitter(e,t){e.total_litter+=t},decrementTotalLitter(e,t){e.total_litter-=t},setSortLocationsBy(e,t){e.sortLocationsBy=t},setSelectedLocationId(e,t){e.selectedLocationId=t},updateLocationTabKey(e){e.locationTabKey++}},ewe=Object.assign({},MS),twe={actions:Zye,mutations:Qye,state:ewe},jS={category:"smoking",hasAddedNewTag:!1,pickedUp:null,tag:"butts",customTag:"",loading:!1,photos:{},tags:{},customTags:{},customTagsError:"",submitting:!1,recentTags:{},recentCustomTags:[]},nwe={async BULK_TAG_PHOTOS(e){const t="Success!",n="Your tags were applied to the images";let a=e.rootState.photos.bulkPaginate.data.filter(i=>{var l;const r=i.tags&&Object.keys(i.tags).length,s=(l=i.custom_tags)==null?void 0:l.length;return r||s}).reduce((i,r)=>(i[r.id]={tags:r.tags??{},custom_tags:r.custom_tags??[],picked_up:!!r.picked_up},i),{});await axios.post("/user/profile/photos/tags/bulkTag",{photos:a}).then(i=>{console.log("bulk_tag_photos",i),i.data.success&&fe.$vToastify.success({title:t,body:n,position:"top-right"})}).catch(i=>{console.error("bulk_tag_photos",i)})},async ADD_TAGS_TO_IMAGE(e,t){const n=Se.t("notifications.success"),a=Se.t("notifications.tags-added"),i=e.rootState.photos.paginate.data[0].id;await axios.post("add-tags",{photo_id:i,tags:e.state.tags[i],custom_tags:e.state.customTags[i],picked_up:e.state.pickedUp}).then(r=>{r.data.success&&(fe.$vToastify.success({title:n,body:a,position:"top-right"}),e.commit("clearTags",i),e.rootState.user.user.verification_required||(e.commit("incrementUsersNextLittercoinScore"),e.rootState.user.user.littercoin_progress===100&&(e.commit("incrementLittercoinScore"),fe.$vToastify.success({title:n,body:"You just earned a Littercoin!",position:"top-right"})))),e.dispatch("LOAD_NEXT_IMAGE")}).catch(r=>console.log(r))}},awe={addRecentTag(e,t){let n=Object.assign({},e.recentTags);n={...n,[t.category]:{...n[t.category],[t.tag]:1}};const a=n;Object.entries(n).forEach(([i,r])=>{const s=Object.entries(r).sort(function(l,u){const d=Se.t(`litter.${i}.${l[0]}`),f=Se.t(`litter.${i}.${u[0]}`);return d===f?0:da.toLowerCase()===t.customTag.toLowerCase())!==void 0){e.customTagsError=Se.t("tags.tag-already-added");return}if(n[t.photoId].length>=3){e.customTagsError=Se.t("tags.tag-limit-reached");return}n[t.photoId].unshift(t.customTag),e.recentCustomTags.indexOf(t.customTag)===-1&&(e.recentCustomTags.push(t.customTag),e.recentCustomTags.sort(function(a,i){return a===i?0:a{t.hasOwnProperty(a)&&t[a]&&So[a].map(i=>{t[a][i]&&(n={...n,[t.id]:{...n[t.id],[a]:{...n[t.id]?n[t.id][a]:{},[i]:t[a][i]}}})})}),e.tags=n},initAdminCustomTags(e,t){e.customTags={[t.id]:t.custom_tags.map(n=>n.tag)}},initRecentTags(e,t){e.recentTags=t},initRecentCustomTags(e,t){e.recentCustomTags=t},removeTag(e,t){let n=Object.assign({},e.tags);delete n[t.photoId][t.category][t.tag_key],Object.keys(n[t.photoId][t.category]).length===0&&delete n[t.photoId][t.category],e.tags=n},removeRecentTag(e,t){let n=Object.assign({},e.recentTags);delete n[t.category][t.tag],Object.keys(n[t.category]).length===0&&delete n[t.category],e.recentTags=n},resetTag(e,t){let n=Object.assign({},e.tags);n[t.photoId][t.category][t.tag_key]=0,e.tags=n,e.hasAddedNewTag=!0},removeCustomTag(e,t){let n=Object.assign({},e.customTags);n[t.photoId]=n[t.photoId].filter(a=>a!==t.customTag),e.customTags=n,e.hasAddedNewTag=!0},removeRecentCustomTag(e,t){let n=Object.assign([],e.recentCustomTags);n=n.filter(a=>a!==t),e.recentCustomTags=n},resetState(e){Object.assign(e,jS)},resetLitter(e){e.categories={Alcohol:{},Art:{},Brands:{},Coastal:{},Coffee:{},Dumping:{},Drugs:{},Food:{},Industrial:{},Other:{},Sanitary:{},Smoking:{},SoftDrinks:{},TrashDog:{}}},setAllTagsToZero(e,t){let n=Object.assign({},e.tags[t]);Object.entries(n).map(a=>{let i=a[0],r=a[1];Object.keys(n[i]).length>0&&Object.keys(r).map(s=>{n[i][s]=0})}),e.tags={...e.tags,[t]:n}},set_default_litter_picked_up(e,t){e.pickedUp=t},setLang(e,t){e.categoryNames=t.categoryNames,e.currentCategory=t.currentCategory,e.currentItem=t.currentItem,e.litterlang=t.litterlang},togglePickedUp(e){e.pickedUp=!e.pickedUp},toggleSubmit(e){e.submitting=!e.submitting}},iwe=Object.assign({},jS),rwe={state:iwe,actions:nwe,mutations:awe},swe={async CREATE_MERCHANT(e,t){const n=Se.t("notifications.success"),a="Merchant created";await axios.post("/merchants/create",{name:t.name,address:t.address,lat:t.lat,lon:t.lon,email:t.email,about:t.about,website:t.website}).then(i=>{console.log("admin_create_merchant",i),i.data.success&&(fe.$vToastify.success({title:n,body:a,position:"top-right"}),e.commit("setMerchant",i.data.merchant))}).catch(i=>{console.error("admin_create_merchant",i)})},async GET_MERCHANTS_GEOJSON(e){await axios.get("/merchants/get-geojson").then(t=>{console.log("get_merchants_geojson",t),t.data.success&&e.commit("setMerchantsGeojson",t.data.geojson)}).catch(t=>{console.error("get_merchants_geojson",t)})},async GET_NEXT_MERCHANT_TO_APPROVE(e){await axios.get("/merchants/get-next-merchant-to-approve").then(t=>{console.log("get_next_merchant_to_approve",t),t.data.success?e.commit("setMerchant",t.data.merchant):e.commit("resetMerchant")}).catch(t=>{console.error("get_next_merchant_to_approve",t)})},async APPROVE_MERCHANT(e){const t=Se.t("notifications.success"),n="Merchant approved";await axios.post("/admin/merchants/approve",{merchantId:e.state.merchant.id}).then(a=>{console.log("approve_merchant",a),a.data.success&&(fe.$vToastify.success({title:t,body:n,position:"top-right"}),e.dispatch("GET_NEXT_MERCHANT_TO_APPROVE"))}).catch(a=>{console.error("approve_merchant",a)})},async DELETE_MERCHANT(e){const t=Se.t("notifications.success"),n="Merchant deleted";await axios.post("/admin/merchants/delete",{merchantId:e.state.merchant.id}).then(a=>{console.log("delete_merchant",a),a.data.success?(fe.$vToastify.success({title:t,body:n,position:"top-right"}),e.dispatch("GET_NEXT_MERCHANT_TO_APPROVE")):a.data.msg==="does not exist"&&e.commit("resetMerchant")}).catch(a=>{console.error("delete_merchant",a)})}},owe={resetMerchant(e){e.merchant={},e.merchant.lat=0,e.merchant.lon=0},setMerchantLocation(e,t){e.merchant.lat=t.lat,e.merchant.lon=t.lng},setMerchantsGeojson(e,t){e.geojson=t},setMerchant(e,t){e.merchant=t}},lwe={geojson:{},merchant:{lat:0,lon:0}},cwe={state:lwe,actions:swe,mutations:owe},IS={action:"",button:"",show:!1,title:"",type:""},uwe={},dwe={hideModal(e){e.show=!1},resetState(e){Object.assign(e,IS)},showModal(e,t){e.type=t.type,e.title=t.title,e.action=t.action,e.show=!0}},fwe=Object.assign({},IS),hwe={state:fwe,actions:uwe,mutations:dwe},pwe={errors:{}},mwe={state:pwe},Dg={filters:{id:"",dateRange:{start:null,end:null},period:"created_at",verified:null},paginate:{prev_page_url:null,next_page_url:null,data:[]},bulkPaginate:{prev_page_url:null,next_page_url:null,data:[]},myUploadsPaginate:null,remaining:0,selectedCount:0,selectAll:!1,inclIds:[],exclIds:[],total:0,verified:0,previousCustomTags:[],showDetailsPhotoId:null},gwe={async DELETE_SELECTED_PHOTOS(e){await axios.post("/user/profile/photos/delete",{selectAll:e.state.photos.selectAll,inclIds:e.state.photos.inclIds,exclIds:e.state.photos.exclIds,filters:e.state.photos.filters}).then(t=>{console.log("delete_selected_photos",t)}).catch(t=>{console.error("delete_selected_photos",t)})},async GET_MY_PHOTOS(e,t){await axios.get("/photos/get-my-photos",{params:{filterTag:e.rootState.user.filterPhotos.filterTag,filterCustomTag:e.rootState.user.filterPhotos.filterCustomTag,filterDateFrom:e.rootState.user.filterPhotos.filterDateFrom,filterDateTo:e.rootState.user.filterPhotos.filterDateTo,paginationAmount:e.rootState.user.filterPhotos.paginationAmount,loadPage:t}}).then(n=>{console.log("GET_MY_PHOTOS",n),n.data.success&&e.commit("setUsersPaginatedUploads",n.data.photos)}).catch(n=>{console.log("GET_MY_PHOTOS",n.response.data),n.response&&n.response.status===422||console.error("An unexpected error occurred.",n)})},async GET_PHOTOS_FOR_TAGGING(e){await axios.get("photos").then(t=>{e.commit("photosForTagging",t.data)}).catch(t=>{console.error("get_photos_for_tagging",t)})},async GET_USERS_FILTERED_PHOTOS(e){await axios.get("/user/profile/photos/filter",{params:{filters:e.state.filters}}).then(t=>{console.log("get_users_filtered_photos",t),e.commit("myProfilePhotos",t.data.paginate),e.commit("photosCount",t.data.count)}).catch(t=>{console.error("get_users_filtered_photos",t)})},async LOAD_PREVIOUS_CUSTOM_TAGS(e){await axios.get("/user/profile/photos/previous-custom-tags").then(t=>{console.log("load_previous_custom_tags",t),e.commit("setPreviousCustomTags",t.data)}).catch(t=>{console.error("load_previous_custom_tags",t)})},async LOAD_MY_PHOTOS(e){await axios.get("/user/profile/photos/index").then(t=>{console.log("load_my_photos",t),e.commit("myProfilePhotos",t.data.paginate),e.commit("photosCount",t.data.count)}).catch(t=>{console.error("load_my_photos",t)})},async LOAD_NEXT_IMAGE(e){let t=e.state.paginate.next_page_url||e.state.paginate.current_page===1?e.state.paginate.current_page:e.state.paginate.current_page-1;await axios.get("/photos?page="+t).then(n=>{e.commit("photosForTagging",n.data)}).catch(n=>{console.error("load_next_image",n)})},async NEXT_IMAGE(e){await axios.get(e.state.paginate.next_page_url).then(t=>{e.commit("photosForTagging",t.data)}).catch(t=>{console.error("next_image",t)})},async PREVIOUS_IMAGE(e){await axios.get(e.state.paginate.prev_page_url).then(t=>{e.commit("photosForTagging",t.data)}).catch(t=>{console.error("previous_image",t)})},async PREVIOUS_PHOTOS_PAGE(e){await axios.get(e.state.bulkPaginate.prev_page_url).then(t=>{console.log("previous_photos_url",t),e.commit("paginatedPhotos",t.data.paginate)}).catch(t=>{console.error("previous_photos_url",t)})},async NEXT_PHOTOS_PAGE(e){await axios.get(e.state.bulkPaginate.next_page_url).then(t=>{console.log("next_photos_page",t),e.commit("paginatedPhotos",t.data.paginate)}).catch(t=>{console.error("next_photos_page",t)})},async SELECT_IMAGE(e,t){await axios.get(`/photos?page=${t}`).then(n=>{e.commit("photosForTagging",n.data)}).catch(n=>{console.error("select_image",n)})}},vwe={filter_photos(e,t){e.filters[t.key]=t.v},filter_photos_calendar(e,t){e.filters.dateRange.start=t.min,e.filters.dateRange.end=t.max},paginatedPhotos(e,t){(e.inclIds.length>0||e.exclIds.length>0||e.selectAll)&&(t.data=t.data.map(n=>(e.selectAll&&(n.selected=!0),e.inclIds.includes(n.id)&&(n.selected=!0),e.exclIds.includes(n.id)&&(n.selected=!1),n))),e.bulkPaginate=t},photosCount(e,t){e.total=t},photosForTagging(e,t){e.paginate=t.photos,e.remaining=t.remaining,e.total=t.total,e.previousCustomTags=t.custom_tags},myProfilePhotos(e,t){e.bulkPaginate=t},setPreviousCustomTags(e,t){e.previousCustomTags=t},resetState(e){Object.assign(e,Dg)},resetPhotoState(e){Object.assign(e,Dg)},selectAllPhotos(e){e.selectAll=!e.selectAll;let t=[...e.bulkPaginate.data];t.forEach(n=>{n.selected=e.selectAll}),e.bulkPaginate.data=t,e.selectedCount=e.selectAll?e.total:0},setPhotoPickedUp(e,t){const n=e.bulkPaginate.data.findIndex(i=>i.id===t.photoId);let a=e.bulkPaginate.data[n];a.picked_up=t.picked_up,e.bulkPaginate.data.splice(n,1,a)},addTagToPhoto(e,t){const n=e.bulkPaginate.data.findIndex(r=>r.id===t.photoId);let a=e.bulkPaginate.data[n],i=Object.assign({},a.tags??{});a.tags={...i,[t.category]:{...i[t.category],[t.tag]:t.quantity}},e.bulkPaginate.data.splice(n,1,a)},addCustomTagToPhoto(e,t){const n=e.bulkPaginate.data.findIndex(r=>r.id===t.photoId);let a=e.bulkPaginate.data[n],i=a.custom_tags??[];i.find(r=>r.toLowerCase()===t.customTag.toLowerCase())===void 0&&(i.length>=3||(i.unshift(t.customTag),a.custom_tags=i,e.bulkPaginate.data.splice(n,1,a)))},removeTagFromPhoto(e,t){const n=e.bulkPaginate.data.findIndex(r=>r.id===t.photoId);let a=e.bulkPaginate.data[n],i=Object.assign({},a.tags??{});delete i[t.category][t.tag],Object.keys(i[t.category]).length===0&&delete i[t.category],a.tags=i,e.bulkPaginate.data.splice(n,1,a)},removeCustomTagFromPhoto(e,t){const n=e.bulkPaginate.data.findIndex(r=>r.id===t.photoId);let a=e.bulkPaginate.data[n],i=a.custom_tags??[];i=i.filter(r=>r!==t.customTag),a.custom_tags=i,e.bulkPaginate.data.splice(n,1,a)},setUsersPaginatedUploads(e,t){e.myUploadsPaginate=t},setPhotoToShowDetails(e,t){e.showDetailsPhotoId=t},togglePhotoSelected(e,t){let n=[...e.bulkPaginate.data],a=[...e.inclIds],i=[...e.exclIds],r=n.find(s=>s.id===t);r.selected=!r.selected,r.selected?(e.selectedCount++,e.selectAll?i=i.filter(s=>s!==r.id):a.push(r.id)):(e.selectedCount--,e.selectAll?i.push(r.id):a=a.filter(s=>s!==r.id)),e.selectAll?e.exclIds.push(r.id):e.inclIds.push(r.id),e.inclIds=a,e.exclIds=i,e.bulkPaginate.data=n}},bwe=Object.assign({},Dg),_we={state:bwe,actions:gwe,mutations:vwe},LS={errors:{},plan:"",plans:[]};var ywe={};const wwe={async CREATE_ACCOUNT(e,t){await axios.post("/register",{name:t.name,username:t.username,email:t.email,password:t.password,password_confirmation:t.password_confirmation,"g-recaptcha-response":t.g_recaptcha_response}).then(n=>{if(console.log("create_account",n),t.plan===1)alert("Congratulations! Your free account has been created. Please verify your email to activate login");else if(t.plan>1){const a=Stripe(ywe.MIX_STRIPE_PUBLIC_KEY);let i=window.location.href+"&status=success",r=window.location.href+"&status=error";a.redirectToCheckout({lineItems:[{price:t.plan_id,quantity:1}],mode:"subscription",successUrl:i,cancelUrl:r})}e.commit("createAccountErrors",[])}).catch(n=>{console.log("error.create_account",n),e.commit("createAccountErrors",n.response.data.errors)})},async GET_PLANS(e){await axios.get("/plans").then(t=>{console.log("get_plans",t),e.commit("setPlans",t.data)}).catch(t=>{console.log("error.get_plans",t)})}},kwe={clearCreateAccountError(e,t){delete e.errors[t]},createAccountErrors(e,t){e.errors=t},resetState(e){Object.assign(e,LS)},setPlans(e,t){e.plans=t}},$we=Object.assign({},LS),Cwe={state:$we,actions:wwe,mutations:kwe},FS={errors:{},just_subscribed:!1,subscription:{}},Swe={async DELETE_ACTIVE_SUBSCRIPTION(e){let t=Se.t("notifications.success"),n=Se.t("notifications.subscription-cancelled");await axios.post("/stripe/delete").then(a=>{console.log("delete_active_subscription",a),fe.$vToastify.success({title:t,body:n,position:"top-right"}),e.commit("reset_subscriber")}).catch(a=>{console.log("error.delete_active_subscription")})},async GET_USERS_SUBSCRIPTIONS(e){await axios.get("/stripe/subscriptions").then(t=>{console.log("check_current_subscription",t),e.commit("subscription",t.data.sub)}).catch(t=>{console.log("error.check_current_subscription",t)})},async RESUBSCRIBE(e,t){await axios.post("/stripe/resubscribe",{plan:t}).then(n=>{console.log("resubscribe",n)}).catch(n=>{console.log("error.resubscribe",n)})},async SUBSCRIBE(e,t){await axios.post("/subscribe",{email:t}).then(n=>{console.log("subscribe",n),e.commit("has_subscribed",!0),setTimeout(()=>{e.commit("has_subscribed",!1)},5e3)}).catch(n=>{console.log("error.subscribe",n.response.data.errors),e.commit("subscribeErrors",n.response.data.errors)})}},Twe={clearSubscriberErrors(e){e.errors={}},has_subscribed(e,t){e.just_subscribed=t},resetState(e){Object.assign(e,FS)},reset_subscriber(e,t){e.subscription={}},subscription(e,t){e.subscription=t},subscribeErrors(e,t){e.errors=t}},xwe=Object.assign({},FS),zwe={state:xwe,actions:Swe,mutations:Twe},Pwe={async CHANGE_ACTIVE_TEAM(e,t){const n=Se.t("notifications.success"),a="Your active team has changed";await axios.post("/teams/active",{team_id:t}).then(i=>{console.log("change_active_team",i),i.data.success&&(fe.$vToastify.success({title:n,body:a,position:"top-right"}),e.commit("usersActiveTeam",t),e.commit("usersTeam",i.data.team))}).catch(i=>{console.error("change_active_team",i)})},async LEAVE_TEAM(e,t){let n=Se.t("notifications.success"),a=Se.t("teams.myteams.just-left-team"),i=Se.t("notifications.error"),r=Se.t("notifications.something-went-wrong");await axios.post("/teams/leave",{team_id:t}).then(s=>{console.log("leave_team",s),s.data.success&&(fe.$vToastify.success({title:n,body:a+" "+s.data.team.name+"."}),s.data.activeTeam&&(e.commit("usersActiveTeam",s.data.activeTeam.id),e.commit("usersTeam",s.data.activeTeam)))}).catch(s=>{fe.$vToastify.error({title:i,body:r})})},async INACTIVATE_TEAM(e){let t=Se.t("notifications.error"),n=Se.t("notifications.something-went-wrong");await axios.post("/teams/inactivate").then(a=>{console.log("inactivate_team",a),a.data.success&&(e.commit("usersActiveTeam",null),e.commit("usersTeam",null))}).catch(a=>{fe.$vToastify.error({title:t,body:n})})},async CREATE_NEW_TEAM(e,t){const n=Se.t("notifications.success"),a=Se.t("teams.create.created"),i=Se.t("notifications.error"),r=Se.t("teams.create.max-created"),s=Se.t("notifications.success"),l="Congratulations! You have joined a new team!";await axios.post("/teams/create",{name:t.name,identifier:t.identifier,team_type:t.teamType}).then(u=>{console.log("create_new_team",u),u.data.success?(fe.$vToastify.success({title:n,body:a,position:"top-right"}),e.commit("decrementUsersRemainingTeams"),e.commit("usersActiveTeam",u.data.team.id),e.commit("usersTeam",u.data.team),e.rootState.user.user.active_team||fe.$vToastify.success({title:s,body:l,position:"top-right"})):fe.$vToastify.error({title:i,body:r,position:"top-right"})}).catch(u=>{console.error("create_new_team",u.response.data.errors),e.commit("teamErrors",u.response.data.errors)})},async UPDATE_TEAM(e,t){const n=Se.t("notifications.success"),a=Se.t("teams.create.updated"),i=Se.t("notifications.error"),r=Se.t("notifications.something-went-wrong");await axios.post(`/teams/update/${t.teamId}`,{name:t.name,identifier:t.identifier}).then(async s=>{console.log("update_team",s),s.data.success?fe.$vToastify.success({title:n,body:a}):fe.$vToastify.error({title:i,body:r})}).catch(s=>{e.commit("teamErrors",s.response.data.errors)})},async DOWNLOAD_DATA_FOR_TEAM(e,t){const n=Se.t("notifications.success"),a="Your download is being processed and will be emailed to you shortly";await axios.post("/teams/download",{team_id:t}).then(i=>{console.log("download_data_for_team",i),i.data.success&&fe.$vToastify.success({title:n,body:a,position:"bottom-right"})}).catch(i=>{console.error("download_data_for_team",i)})},async GET_TEAM_DASHBOARD_DATA(e,t){await axios.get("/teams/data",{params:{period:t.period,team_id:t.team_id}}).then(n=>{console.log("get_team_dashboard_data",n),e.commit("teamDashboardData",n.data)}).catch(n=>{console.error("get_team_dashboard_data",n)})},async GET_TEAMS_LEADERBOARD(e){await axios.get("/teams/leaderboard").then(t=>{console.log("get_teams_leaderboard",t),e.commit("teamsLeaderboard",t.data)}).catch(t=>{console.error("get_teams_leaderboard",t)})},async GET_TEAM_MEMBERS(e,t){await axios.get("/teams/members",{params:{team_id:t}}).then(n=>{console.log("get_team_members",n),e.commit("paginatedTeamMembers",n.data.result)}).catch(n=>{console.error("get_team_members",n)})},async GET_TEAM_TYPES(e){await axios.get("/teams/get-types").then(t=>{console.log("get_team_types",t),e.commit("teamTypes",t.data)}).catch(t=>{console.error("get_team_types",t)})},async GET_USERS_TEAMS(e){await axios.get("/teams/joined").then(t=>{console.log("get_users_teams",t),e.commit("usersTeams",t.data)}).catch(t=>{console.error("get_users_teams",t)})},async JOIN_TEAM(e,t){const n=Se.t("notifications.success"),a="Congratulations! You have joined a new team!",i="You have already joined this team!";await axios.post("/teams/join",{identifier:t}).then(r=>{console.log("join_team",r),r.data.success?(fe.$vToastify.success({title:n,body:a,position:"bottom-right"}),e.commit("usersActiveTeam",r.data.activeTeam.id),e.commit("usersTeam",r.data.activeTeam)):r.data.msg==="already-joined"&&fe.$vToastify.info({title:"Hold on!",body:i,position:"bottom-right"})}).catch(r=>{console.error("join_team",r),e.commit("teamErrors",r.response.data.errors)})},async PREVIOUS_MEMBERS_PAGE(e,t){await axios.get(e.state.members.prev_page_url,{params:{team_id:t}}).then(n=>{console.log("previous_members_page",n),e.commit("paginatedTeamMembers",n.data.result)}).catch(n=>{console.error("previous_members_page",n)})},async NEXT_MEMBERS_PAGE(e,t){await axios.get(e.state.members.next_page_url,{params:{team_id:t}}).then(n=>{console.log("next_members_page",n),e.commit("paginatedTeamMembers",n.data.result)}).catch(n=>{console.error("next_members_page",n)})},async SAVE_TEAM_SETTINGS(e,t){const n=e.state.teams.find(r=>r.id===t.team_id).pivot,a=Se.t("notifications.success"),i="Team settings updated";await axios.post("/teams/settings",{settings:n,all:t.all,team_id:t.team_id}).then(r=>{console.log("save_team_settings",r),r.data.success&&(fe.$vToastify.success({title:a,body:i,position:"top-right"}),t.all&&e.commit("allTeamSettings",t.team_id))}).catch(r=>{console.error("save_team_settings",r)})},async TOGGLE_LEADERBOARD_VISIBILITY(e,t){const n=Se.t("notifications.success"),a="Visibility changed";await axios.post("/teams/leaderboard/visibility",{team_id:t}).then(i=>{console.log("toggle_leaderboard_visibility",i),i.data.success&&(fe.$vToastify.success({title:n,body:a,position:"top-right"}),e.commit("toggleTeamLeaderboardVis",t))}).catch(i=>{console.error("toggle_leaderboard_visibility",i)})}},Awe={allTeamSettings(e,t){let n=[...e.teams];const a=n.find(i=>i.id===t);n.forEach(i=>{i.pivot.show_name_maps=a.pivot.show_name_maps,i.pivot.show_username_maps=a.pivot.show_username_maps,i.pivot.show_name_leaderboards=a.pivot.show_name_leaderboards,i.pivot.show_username_leaderboards=a.pivot.show_username_leaderboards}),e.teams=n},clearTeamsError(e,t){delete e.errors[t]},teamDashboardData(e,t){e.allTeams.photos_count=t.photos_count,e.allTeams.litter_count=t.litter_count,e.allTeams.members_count=t.members_count,e.geojson=t.geojson},paginatedTeamMembers(e,t){e.members=t},teamComponent(e,t){e.component_type=t},teamErrors(e,t){e.errors=t},teamsLeaderboard(e,t){e.leaderboard=t},teamMap(e,t){e.geojson=t},teamMembers(e,t){e.members.data=t},team_settings(e,t){let n=[...e.teams],a=n.find(i=>i.id===t.team_id);a.pivot[t.key]=t.v,e.teams=n},teamTypes(e,t){e.types=t},toggleTeamLeaderboardVis(e,t){let n=[...e.teams],a=n.find(i=>i.id===t);a.leaderboards=!a.leaderboards,e.teams=n},usersTeams(e,t){e.teams=t}},Dwe={allTeams:{photos_count:0,litter_count:0,members_count:0},component_type:"TeamsDashboard",errors:{},geojson:[],leaderboard:[],members:{},teams:[],types:[]},Ewe={state:Dwe,actions:Pwe,mutations:Awe},RS={admin:!1,auth:!1,countries:{},errorLogin:"",errors:{},geojson:{features:[]},helper:!1,position:0,photoPercent:0,requiredXp:0,tagPercent:0,totalPhotos:0,totalTags:0,totalUsers:0,user:{}},Owe={async CHANGE_PASSWORD(e,t){await axios.patch("/settings/details/password",{oldpassword:t.oldpassword,password:t.password,password_confirmation:t.password_confirmation}).then(n=>{console.log("change_password",n)}).catch(n=>{console.log("error.change_password",n.response.data),e.commit("errors",n.response.data.errors)})},async SEND_PASSWORD_RESET_LINK(e,t){const n=Se.t("notifications.success");fe.$vToastify.success({title:n,body:"An email will be sent with a link to reset your password if the email exists."}),await axios.post("/password/email",{email:t}).then(i=>{}).catch(i=>{})},async RESET_PASSWORD(e,t){const n=Se.t("notifications.success");await axios.post("/password/reset",t).then(a=>{console.log("reset_password",a),a.data.success&&(fe.$vToastify.success({title:n,body:a.data.message}),setTimeout(function(){No.replace("/"),No.go(0)},4e3))}).catch(a=>{console.log("error.reset_password",a.response.data),e.commit("errors",a.response.data.errors)})},async SEND_EMAIL_TO_US(e,t){const n=Se.t("notifications.success"),a="We got your email. You'll hear from us soon!";await axios.post("/contact-us",t).then(i=>{console.log("send_email_to_us",i),fe.$vToastify.success({title:n,body:a})}).catch(i=>{console.log("error.send_email_to_us",i.response.data),e.commit("errors",i.response.data.errors)})},CHECK_AUTH(e){},async DELETE_ACCOUNT(e,t){await axios.post("/settings/delete",{password:t}).then(n=>{console.log("delete_account",n)}).catch(n=>{console.log("error.delete_account",n.response.data)})},async DOWNLOAD_MY_DATA(e,t){const n=Se.t("notifications.success"),a="Your download is being processed and will be emailed to you.";await axios.get("/user/profile/download",{params:t}).then(i=>{console.log("download_my_data",i),fe.$vToastify.success({title:n,body:a,position:"top-right"})}).catch(i=>{console.error("download_my_data",i)})},async GET_CURRENT_USER(e){await axios.get("/current-user").then(t=>{console.log("get_current_user",t),e.commit("initUser",t.data),e.commit("set_default_litter_picked_up",t.data.picked_up)}).catch(t=>{console.log("error.get_current_user",t)})},async GET_COUNTRIES_FOR_FLAGS(e){await axios.get("/settings/flags/countries").then(t=>{console.log("flags_countries",t),e.commit("flags_countries",t.data)}).catch(t=>{console.log("error.flags_countries",t)})},async GET_USERS_PROFILE_DATA(e){await axios.get("/user/profile/index").then(t=>{console.log("get_users_position",t),e.commit("usersPosition",t.data)}).catch(t=>{console.error("get_users_position",t)})},async GET_USERS_PROFILE_MAP_DATA(e,t){await axios.get("/user/profile/map",{params:{period:t.period,start:t.start+" 00:00:00",end:t.end+" 23:59:59"}}).then(n=>{console.log("get_users_profile_map_data",n),e.commit("usersGeojson",n.data.geojson)}).catch(n=>{console.error("get_users_profile_map_data",n)})},async LOGIN(e,t){await axios.post("/login",{email:t.email,password:t.password}).then(n=>{console.log("login_success",n),e.commit("hideModal"),e.commit("login"),window.location.href="/upload"}).catch(n=>{console.log("error.login",n.response.data),e.commit("errorLogin",n.response.data.email)})},async LOGOUT(e){await axios.get("/logout").then(t=>{console.log("logout",t),e.commit("logout"),e.commit("resetState"),window.location.href="/"}).catch(t=>{console.log("error.logout",t)})},async SAVE_PRIVACY_SETTINGS(e){const t=Se.t("notifications.success"),n=Se.t("notifications.privacy-updated");await axios.post("/settings/privacy/update",{show_name_maps:e.state.user.show_name_maps,show_username_maps:e.state.user.show_username_maps,show_name:e.state.user.show_name,show_username:e.state.user.show_username,show_name_createdby:e.state.user.show_name_createdby,show_username_createdby:e.state.user.show_username_createdby,prevent_others_tagging_my_photos:e.state.user.prevent_others_tagging_my_photos}).then(a=>{console.log("save_privacy_settings",a),fe.$vToastify.success({title:t,body:n,position:"top-right"})}).catch(a=>{console.log("error.save_privacy_settings",a)})},async TOGGLE_EMAIL_SUBSCRIPTION(e){let t=Se.t("notifications.success"),n=Se.t("notifications.settings.subscribed"),a=Se.t("notifications.settings.unsubscribed");await axios.post("/settings/email/toggle").then(i=>{console.log("toggle_email_subscription",i),i.data.sub?fe.$vToastify.success({title:t,body:n,position:"top-right"}):fe.$vToastify.success({title:t,body:a,position:"top-right"}),e.commit("toggle_email_sub",i.data.sub)}).catch(i=>{console.log(i)})},async TOGGLE_LITTER_PICKED_UP_SETTING(e){const t=Se.t("notifications.success"),n=Se.t("notifications.litter-toggled");await axios.post("/settings/toggle").then(a=>{console.log("toggle_litter",a),a.data.message==="success"&&(e.commit("toggle_litter_picked_up",a.data.value),fe.$vToastify.success({title:t,body:n,position:"top-right"}))}).catch(a=>{console.log(a)})},async UPDATE_DETAILS(e){const t=Se.t("notifications.success"),n="Your information has been updated";await axios.post("/settings/details",{name:e.state.user.name,email:e.state.user.email,username:e.state.user.username}).then(a=>{console.log("update_details",a),fe.$vToastify.success({title:t,body:n,position:"top-right"})}).catch(a=>{console.log("error.update_details",a),e.commit("errors",a.response.data.errors)})},async UPDATE_GLOBAL_FLAG(e,t){let n=Se.t("notifications.success"),a=Se.t("notifications.settings.flag-updated");await axios.post("/settings/save-flag",{country:t}).then(i=>{console.log(i),fe.$vToastify.success({title:n,body:a,position:"top-right"})}).catch(i=>{console.log(i)})},async UPDATE_SETTINGS(e,t){let n=Se.t("notifications.success"),a=Se.t("notifications.settings-updated");await axios.patch("/settings",t).then(i=>{console.log(i),Object.keys(t).forEach(r=>{e.commit("deleteUserError",r)}),fe.$vToastify.success({title:n,body:a,position:"top-right"})}).catch(i=>{e.commit("errors",i.response.data.errors),console.log(i)})}},Mwe={user(e){return e.user}},jwe={changePrivacy(e,t){e.user[t.column]=t.v},changeUserEmail(e,t){e.user.email=t},changeUserName(e,t){e.user.name=t},changeUserUsername(e,t){e.user.username=t},decrementUsersRemainingTeams(e){e.user.remaining_teams--},deleteUserError(e,t){delete e.errors[t]},errorLogin(e,t){e.errorLogin=t},errors(e,t){e.errors=t},flags_countries(e,t){e.countries=t},initUser(e,t){e.user=t,(window.Laravel.jsPermissions.roles.includes("admin")||window.Laravel.jsPermissions.roles.includes("superadmin"))&&(e.admin=!0),window.Laravel.jsPermissions.roles.includes("helper")&&(e.helper=!0)},login(e){e.auth=!0},logout(e){e.auth=!1,e.admin=!1,e.helper=!1},incrementUsersNextLittercoinScore(e){let t=Object.assign({},e.user);t.littercoin_progress++,e.user=t},incrementLittercoinScore(e){let t=Object.assign({},e.user);t.total_littercoin++,t.littercoin_progress=0,e.user=t},usersActiveTeam(e,t){e.user.active_team=t},usersTeam(e,t){e.user.team=t},resetState(e){Object.assign(e,RS)},toggle_email_sub(e,t){e.user.emailsub=t},toggle_litter_picked_up(e,t){e.user.items_remaining=t},usersGeojson(e,t){e.geojson=t},usersPosition(e,t){e.position=t.usersPosition,e.totalUsers=t.totalUsers,e.totalPhotos=t.totalPhotos,e.totalTags=t.totalTags,e.photoPercent=Math.round(t.photoPercent*100,2),e.tagPercent=Math.round(t.tagPercent*100,2),e.requiredXp=t.requiredXp}},Iwe={},Lwe={setFilterTag(e,t){e.filterTag=t},setFilterCustomTag(e,t){e.filterCustomTag=t},setFilterDateFrom(e,t){e.filterDateFrom=t},setFilterDateTo(e,t){e.filterDateTo=t},setFilterCountry(e,t){e.filterCountry=t},setFilterPhotosPaginationAmount(e,t){e.paginationAmount=t}},Fwe={filterDateFrom:"",filterDateTo:"",filterResultString:"",filterTag:"",filterCustomTag:"",filterCountry:"all",paginationAmount:25},Rwe={state:Fwe,actions:Iwe,mutations:Lwe},Bwe=Object.assign({},RS),Nwe={state:Bwe,actions:Owe,getters:Mwe,mutations:jwe,modules:{filterPhotos:Rwe}};fe.use(nS);const BS=new nS.Store({plugins:[h2({paths:["user","litter.recentTags"]})],modules:{admin:c_e,alldata:h_e,bbox:kye,donate:Bye,citymap:xye,cleanups:Dye,community:Iye,errors:Hye,globalmap:Kye,leaderboard:Xye,locations:twe,litter:rwe,merchants:cwe,modal:hwe,payments:mwe,photos:_we,plans:Cwe,subscriber:zwe,teams:Ewe,user:Nwe}});var NS={exports:{}};(function(e,t){var n={};/** + */function Ha(e,t){for(var n in t)e[n]=t[n];return e}var g_e=/[!'()*]/g,v_e=function(e){return"%"+e.charCodeAt(0).toString(16)},b_e=/%2C/g,go=function(e){return encodeURIComponent(e).replace(g_e,v_e).replace(b_e,",")};function Sg(e){try{return decodeURIComponent(e)}catch{}return e}function __e(e,t,n){t===void 0&&(t={});var a=n||y_e,i;try{i=a(e||"")}catch{i={}}for(var r in t){var s=t[r];i[r]=Array.isArray(s)?s.map(wk):wk(s)}return i}var wk=function(e){return e==null||typeof e=="object"?e:String(e)};function y_e(e){var t={};return e=e.trim().replace(/^(\?|#|&)/,""),e&&e.split("&").forEach(function(n){var a=n.replace(/\+/g," ").split("="),i=Sg(a.shift()),r=a.length>0?Sg(a.join("=")):null;t[i]===void 0?t[i]=r:Array.isArray(t[i])?t[i].push(r):t[i]=[t[i],r]}),t}function w_e(e){var t=e?Object.keys(e).map(function(n){var a=e[n];if(a===void 0)return"";if(a===null)return go(n);if(Array.isArray(a)){var i=[];return a.forEach(function(r){r!==void 0&&(r===null?i.push(go(n)):i.push(go(n)+"="+go(r)))}),i.join("&")}return go(n)+"="+go(a)}).filter(function(n){return n.length>0}).join("&"):null;return t?"?"+t:""}var mf=/\/?$/;function gf(e,t,n,a){var i=a&&a.options.stringifyQuery,r=t.query||{};try{r=Tg(r)}catch{}var s={name:t.name||e&&e.name,meta:e&&e.meta||{},path:t.path||"/",hash:t.hash||"",query:r,params:t.params||{},fullPath:kk(t,i),matched:e?k_e(e):[]};return n&&(s.redirectedFrom=kk(n,i)),Object.freeze(s)}function Tg(e){if(Array.isArray(e))return e.map(Tg);if(e&&typeof e=="object"){var t={};for(var n in e)t[n]=Tg(e[n]);return t}else return e}var Ur=gf(null,{path:"/"});function k_e(e){for(var t=[];e;)t.unshift(e),e=e.parent;return t}function kk(e,t){var n=e.path,a=e.query;a===void 0&&(a={});var i=e.hash;i===void 0&&(i="");var r=t||w_e;return(n||"/")+r(a)+i}function dS(e,t,n){return t===Ur?e===t:t?e.path&&t.path?e.path.replace(mf,"")===t.path.replace(mf,"")&&(n||e.hash===t.hash&&Dd(e.query,t.query)):e.name&&t.name?e.name===t.name&&(n||e.hash===t.hash&&Dd(e.query,t.query)&&Dd(e.params,t.params)):!1:!1}function Dd(e,t){if(e===void 0&&(e={}),t===void 0&&(t={}),!e||!t)return e===t;var n=Object.keys(e).sort(),a=Object.keys(t).sort();return n.length!==a.length?!1:n.every(function(i,r){var s=e[i],l=a[r];if(l!==i)return!1;var u=t[i];return s==null||u==null?s===u:typeof s=="object"&&typeof u=="object"?Dd(s,u):String(s)===String(u)})}function $_e(e,t){return e.path.replace(mf,"/").indexOf(t.path.replace(mf,"/"))===0&&(!t.hash||e.hash===t.hash)&&C_e(e.query,t.query)}function C_e(e,t){for(var n in t)if(!(n in e))return!1;return!0}function fS(e){for(var t=0;t=0&&(t=e.slice(a),e=e.slice(0,a));var i=e.indexOf("?");return i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),{path:e,query:n,hash:t}}function Pr(e){return e.replace(/\/(?:\s*\/)+/g,"/")}var vf=Array.isArray||function(e){return Object.prototype.toString.call(e)=="[object Array]"},nl=gS,z_e=tb,P_e=O_e,A_e=pS,D_e=mS,E_e=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function tb(e,t){for(var n=[],a=0,i=0,r="",s=t&&t.delimiter||"/",l;(l=E_e.exec(e))!=null;){var u=l[0],d=l[1],f=l.index;if(r+=e.slice(i,f),i=f+u.length,d){r+=d[1];continue}var p=e[i],v=l[2],y=l[3],$=l[4],b=l[5],k=l[6],T=l[7];r&&(n.push(r),r="");var x=v!=null&&p!=null&&p!==v,D=k==="+"||k==="*",P=k==="?"||k==="*",R=l[2]||s,q=$||b;n.push({name:y||a++,prefix:v||"",delimiter:R,optional:P,repeat:D,partial:x,asterisk:!!T,pattern:q?I_e(q):T?".*":"[^"+Ed(R)+"]+?"})}return i1||!R.length)return R.length===0?t():t("span",{},R)}if(this.tag==="a")P.on=D,P.attrs={href:u,"aria-current":T};else{var q=vS(this.$slots.default);if(q){q.isStatic=!1;var U=q.data=Ha({},q.data);U.on=U.on||{};for(var G in U.on){var J=U.on[G];G in D&&(U.on[G]=Array.isArray(J)?J:[J])}for(var ge in D)ge in U.on?U.on[ge].push(D[ge]):U.on[ge]=x;var Te=q.data.attrs=Ha({},q.data.attrs);Te.href=u,Te["aria-current"]=T}else P.on=D}return t(this.tag,P,this.$slots.default)}};function Tk(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){var t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function vS(e){if(e){for(var t,n=0;n-1&&(k.params[P]=$.params[P]);return k.path=Od(x.path,k.params),v(x,k,b)}else if(k.path){k.params={};for(var R=0;R-1}function ah(e,t){return yf(e)&&e._isRouter&&(t==null||e.type===t)}function Ek(e,t,n){var a=function(i){i>=e.length?n():e[i]?t(e[i],function(){a(i+1)}):a(i+1)};a(0)}function iye(e){return function(t,n,a){var i=!1,r=0,s=null;CS(e,function(l,u,d,f){if(typeof l=="function"&&l.cid===void 0){i=!0,r++;var p=Ok(function(b){sye(b)&&(b=b.default),l.resolved=typeof b=="function"?b:bf.extend(b),d.components[f]=b,r--,r<=0&&a()}),v=Ok(function(b){var k="Failed to resolve async component "+f+": "+b;s||(s=yf(b)?b:new Error(k),a(s))}),y;try{y=l(p,v)}catch(b){v(b)}if(y)if(typeof y.then=="function")y.then(p,v);else{var $=y.component;$&&typeof $.then=="function"&&$.then(p,v)}}}),i||a()}}function CS(e,t){return SS(e.map(function(n){return Object.keys(n.components).map(function(a){return t(n.components[a],n.instances[a],n,a)})}))}function SS(e){return Array.prototype.concat.apply([],e)}var rye=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol";function sye(e){return e.__esModule||rye&&e[Symbol.toStringTag]==="Module"}function Ok(e){var t=!1;return function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];if(!t)return t=!0,e.apply(this,n)}}var Ya=function(t,n){this.router=t,this.base=oye(n),this.current=Ur,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};Ya.prototype.listen=function(t){this.cb=t};Ya.prototype.onReady=function(t,n){this.ready?t():(this.readyCbs.push(t),n&&this.readyErrorCbs.push(n))};Ya.prototype.onError=function(t){this.errorCbs.push(t)};Ya.prototype.transitionTo=function(t,n,a){var i=this,r;try{r=this.router.match(t,this.current)}catch(l){throw this.errorCbs.forEach(function(u){u(l)}),l}var s=this.current;this.confirmTransition(r,function(){i.updateRoute(r),n&&n(r),i.ensureURL(),i.router.afterHooks.forEach(function(l){l&&l(r,s)}),i.ready||(i.ready=!0,i.readyCbs.forEach(function(l){l(r)}))},function(l){a&&a(l),l&&!i.ready&&(!ah(l,Ns.redirected)||s!==Ur)&&(i.ready=!0,i.readyErrorCbs.forEach(function(u){u(l)}))})};Ya.prototype.confirmTransition=function(t,n,a){var i=this,r=this.current;this.pending=t;var s=function(b){!ah(b)&&yf(b)&&(i.errorCbs.length?i.errorCbs.forEach(function(k){k(b)}):console.error(b)),a&&a(b)},l=t.matched.length-1,u=r.matched.length-1;if(dS(t,r)&&l===u&&t.matched[l]===r.matched[u])return this.ensureURL(),t.hash&&Ar(this.router,r,t,!1),s(eye(r,t));var d=lye(this.current.matched,t.matched),f=d.updated,p=d.deactivated,v=d.activated,y=[].concat(uye(p),this.router.beforeHooks,dye(f),v.map(function(b){return b.beforeEnter}),iye(v)),$=function(b,k){if(i.pending!==t)return s(Dk(r,t));try{b(t,r,function(T){T===!1?(i.ensureURL(!0),s(tye(r,t))):yf(T)?(i.ensureURL(!0),s(T)):typeof T=="string"||typeof T=="object"&&(typeof T.path=="string"||typeof T.name=="string")?(s(Q_e(r,t)),typeof T=="object"&&T.replace?i.replace(T):i.push(T)):k(T)})}catch(T){s(T)}};Ek(y,$,function(){var b=fye(v),k=b.concat(i.router.resolveHooks);Ek(k,$,function(){if(i.pending!==t)return s(Dk(r,t));i.pending=null,n(t),i.router.app&&i.router.app.$nextTick(function(){fS(t)})})})};Ya.prototype.updateRoute=function(t){this.current=t,this.cb&&this.cb(t)};Ya.prototype.setupListeners=function(){};Ya.prototype.teardown=function(){this.listeners.forEach(function(t){t()}),this.listeners=[],this.current=Ur,this.pending=null};function oye(e){if(!e)if(jc){var t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^https?:\/\/[^\/]+/,"")}else e="/";return e.charAt(0)!=="/"&&(e="/"+e),e.replace(/\/$/,"")}function lye(e,t){var n,a=Math.max(e.length,t.length);for(n=0;n0)){var i=this.router,r=i.options.scrollBehavior,s=Dr&&r;s&&this.listeners.push(kS());var l=function(){var u=a.current,d=Jl(a.base);a.current===Ur&&d===a._startLocation||a.transitionTo(d,function(f){s&&Ar(i,f,u,!0)})};window.addEventListener("popstate",l),this.listeners.push(function(){window.removeEventListener("popstate",l)})}},t.prototype.go=function(a){window.history.go(a)},t.prototype.push=function(a,i,r){var s=this,l=this,u=l.current;this.transitionTo(a,function(d){_f(Pr(s.base+d.fullPath)),Ar(s.router,d,u,!1),i&&i(d)},r)},t.prototype.replace=function(a,i,r){var s=this,l=this,u=l.current;this.transitionTo(a,function(d){Pg(Pr(s.base+d.fullPath)),Ar(s.router,d,u,!1),i&&i(d)},r)},t.prototype.ensureURL=function(a){if(Jl(this.base)!==this.current.fullPath){var i=Pr(this.base+this.current.fullPath);a?_f(i):Pg(i)}},t.prototype.getCurrentLocation=function(){return Jl(this.base)},t}(Ya);function Jl(e){var t=window.location.pathname,n=t.toLowerCase(),a=e.toLowerCase();return e&&(n===a||n.indexOf(Pr(a+"/"))===0)&&(t=t.slice(e.length)),(t||"/")+window.location.search+window.location.hash}var zS=function(e){function t(n,a,i){e.call(this,n,a),!(i&&pye(this.base))&&Mk()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setupListeners=function(){var a=this;if(!(this.listeners.length>0)){var i=this.router,r=i.options.scrollBehavior,s=Dr&&r;s&&this.listeners.push(kS());var l=function(){var d=a.current;Mk()&&a.transitionTo(Md(),function(f){s&&Ar(a.router,f,d,!0),Dr||jd(f.fullPath)})},u=Dr?"popstate":"hashchange";window.addEventListener(u,l),this.listeners.push(function(){window.removeEventListener(u,l)})}},t.prototype.push=function(a,i,r){var s=this,l=this,u=l.current;this.transitionTo(a,function(d){jk(d.fullPath),Ar(s.router,d,u,!1),i&&i(d)},r)},t.prototype.replace=function(a,i,r){var s=this,l=this,u=l.current;this.transitionTo(a,function(d){jd(d.fullPath),Ar(s.router,d,u,!1),i&&i(d)},r)},t.prototype.go=function(a){window.history.go(a)},t.prototype.ensureURL=function(a){var i=this.current.fullPath;Md()!==i&&(a?jk(i):jd(i))},t.prototype.getCurrentLocation=function(){return Md()},t}(Ya);function pye(e){var t=Jl(e);if(!/^\/#/.test(t))return window.location.replace(Pr(e+"/#"+t)),!0}function Mk(){var e=Md();return e.charAt(0)==="/"?!0:(jd("/"+e),!1)}function Md(){var e=window.location.href,t=e.indexOf("#");return t<0?"":(e=e.slice(t+1),e)}function Ag(e){var t=window.location.href,n=t.indexOf("#"),a=n>=0?t.slice(0,n):t;return a+"#"+e}function jk(e){Dr?_f(Ag(e)):window.location.hash=e}function jd(e){Dr?Pg(Ag(e)):window.location.replace(Ag(e))}var mye=function(e){function t(n,a){e.call(this,n,a),this.stack=[],this.index=-1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.push=function(a,i,r){var s=this;this.transitionTo(a,function(l){s.stack=s.stack.slice(0,s.index+1).concat(l),s.index++,i&&i(l)},r)},t.prototype.replace=function(a,i,r){var s=this;this.transitionTo(a,function(l){s.stack=s.stack.slice(0,s.index).concat(l),i&&i(l)},r)},t.prototype.go=function(a){var i=this,r=this.index+a;if(!(r<0||r>=this.stack.length)){var s=this.stack[r];this.confirmTransition(s,function(){var l=i.current;i.index=r,i.updateRoute(s),i.router.afterHooks.forEach(function(u){u&&u(s,l)})},function(l){ah(l,Ns.duplicated)&&(i.index=r)})}},t.prototype.getCurrentLocation=function(){var a=this.stack[this.stack.length-1];return a?a.fullPath:"/"},t.prototype.ensureURL=function(){},t}(Ya),bt=function(t){t===void 0&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=U_e(t.routes||[],this);var n=t.mode||"hash";switch(this.fallback=n==="history"&&!Dr&&t.fallback!==!1,this.fallback&&(n="hash"),jc||(n="abstract"),this.mode=n,n){case"history":this.history=new xS(this,t.base);break;case"hash":this.history=new zS(this,t.base,this.fallback);break;case"abstract":this.history=new mye(this,t.base);break}},PS={currentRoute:{configurable:!0}};bt.prototype.match=function(t,n,a){return this.matcher.match(t,n,a)};PS.currentRoute.get=function(){return this.history&&this.history.current};bt.prototype.init=function(t){var n=this;if(this.apps.push(t),t.$once("hook:destroyed",function(){var s=n.apps.indexOf(t);s>-1&&n.apps.splice(s,1),n.app===t&&(n.app=n.apps[0]||null),n.app||n.history.teardown()}),!this.app){this.app=t;var a=this.history;if(a instanceof xS||a instanceof zS){var i=function(s){var l=a.current,u=n.options.scrollBehavior,d=Dr&&u;d&&"fullPath"in s&&Ar(n,s,l,!1)},r=function(s){a.setupListeners(),i(s)};a.transitionTo(a.getCurrentLocation(),r,r)}a.listen(function(s){n.apps.forEach(function(l){l._route=s})})}};bt.prototype.beforeEach=function(t){return sb(this.beforeHooks,t)};bt.prototype.beforeResolve=function(t){return sb(this.resolveHooks,t)};bt.prototype.afterEach=function(t){return sb(this.afterHooks,t)};bt.prototype.onReady=function(t,n){this.history.onReady(t,n)};bt.prototype.onError=function(t){this.history.onError(t)};bt.prototype.push=function(t,n,a){var i=this;if(!n&&!a&&typeof Promise<"u")return new Promise(function(r,s){i.history.push(t,r,s)});this.history.push(t,n,a)};bt.prototype.replace=function(t,n,a){var i=this;if(!n&&!a&&typeof Promise<"u")return new Promise(function(r,s){i.history.replace(t,r,s)});this.history.replace(t,n,a)};bt.prototype.go=function(t){this.history.go(t)};bt.prototype.back=function(){this.go(-1)};bt.prototype.forward=function(){this.go(1)};bt.prototype.getMatchedComponents=function(t){var n=t?t.matched?t:this.resolve(t).route:this.currentRoute;return n?[].concat.apply([],n.matched.map(function(a){return Object.keys(a.components).map(function(i){return a.components[i]})})):[]};bt.prototype.resolve=function(t,n,a){n=n||this.history.current;var i=ib(t,n,a,this),r=this.match(i,n),s=r.redirectedFrom||r.fullPath,l=this.history.base,u=gye(l,s,this.mode);return{location:i,route:r,href:u,normalizedTo:i,resolved:r}};bt.prototype.getRoutes=function(){return this.matcher.getRoutes()};bt.prototype.addRoute=function(t,n){this.matcher.addRoute(t,n),this.history.current!==Ur&&this.history.transitionTo(this.history.getCurrentLocation())};bt.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==Ur&&this.history.transitionTo(this.history.getCurrentLocation())};Object.defineProperties(bt.prototype,PS);var AS=bt;function sb(e,t){return e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function gye(e,t,n){var a=n==="hash"?"#"+t:t;return e?Pr(e+"/"+a):a}bt.install=xg;bt.version="3.6.5";bt.isNavigationFailure=ah;bt.NavigationFailureType=Ns;bt.START_LOCATION=Ur;jc&&window.Vue&&window.Vue.use(bt);function Tt({next:e,store:t}){if(t.state.user.auth)return e();window.location.href="/"}function Ik({next:e}){if(window.Laravel.jsPermissions.roles.includes("admin")||window.Laravel.jsPermissions.roles.includes("superadmin"))return e();window.location.href="/"}function vye({next:e}){if(window.Laravel.jsPermissions.permissions.includes("create boxes"))return e();window.location.href="/"}function bye({next:e}){if(window.Laravel.jsPermissions.permissions.includes("verify boxes"))return e();window.location.href="/"}function DS(e,t,n){const a=t[n];return a?()=>{const i=DS(e,t,n+1);a({...e,next:i})}:e.next}const No=new AS({mode:"history",linkActiveClass:"is-active",routes:[{path:"/",component:()=>De(()=>import("./Welcome-CMnCnRfK.js"),__vite__mapDeps([0,1,2,3,4]))},{path:"/confirm/email/:token",component:()=>De(()=>import("./Welcome-CMnCnRfK.js"),__vite__mapDeps([0,1,2,3,4]))},{path:"/password/reset",component:()=>De(()=>import("./Email-B8-JmzOD.js"),__vite__mapDeps([5,6,4]))},{path:"/password/reset/:token",component:()=>De(()=>import("./Reset-BkrHXCCU.js"),__vite__mapDeps([7,8,4])),props:!0},{path:"/emails/unsubscribe/:token",component:()=>De(()=>import("./Welcome-CMnCnRfK.js"),__vite__mapDeps([0,1,2,3,4]))},{path:"/about",component:()=>De(()=>import("./About-r0jCEBny.js"),__vite__mapDeps([9,1,10,11,4]))},{path:"/cleanups",component:()=>De(()=>import("./Cleanups-DyhnfstR.js"),__vite__mapDeps([12,13,14,15,16,17,18,19,4])),children:[{path:":invite_link/join",component:()=>De(()=>import("./Cleanups-DyhnfstR.js"),__vite__mapDeps([12,13,14,15,16,17,18,19,4]))}]},{path:"/history",component:()=>De(()=>import("./History-DwaBXQAD.js"),__vite__mapDeps([20,21,22,23,24,25,4]))},{path:"/littercoin/merchants",component:()=>De(()=>import("./Merchants-B_xjooHF.js"),__vite__mapDeps([26,27,4]))},{path:"/donate",component:()=>De(()=>import("./Donate-CymQE4iA.js"),__vite__mapDeps([28,21,10,29,25,4]))},{path:"/contact-us",component:()=>De(()=>import("./ContactUs-BUcYwgJG.js"),__vite__mapDeps([30,31,32,4]))},{path:"/community",component:()=>De(()=>import("./Index-DWgg3krU.js"),__vite__mapDeps([33,34,16,35,4]))},{path:"/faq",component:()=>De(()=>import("./FAQ-ChqK9RWj.js"),__vite__mapDeps([36,37,4]))},{path:"/global",component:()=>De(()=>import("./GlobalMapContainer-BX-EkdbH.js"),__vite__mapDeps([38,21,13,14,15,16,17,18,39,25,4]))},{path:"/tags",component:()=>De(()=>import("./TagsViewer-BVKGSnDH.js"),__vite__mapDeps([40,15,16,41,42,14,43,4]))},{path:"/signup",component:()=>De(()=>import("./SignUp-R39V8jhU.js"),__vite__mapDeps([44,45,4]))},{path:"/join/:plan?",component:()=>De(()=>import("./Subscribe-CF0U_ZOk.js"),__vite__mapDeps([46,21,31,47,25,4]))},{path:"/terms",component:()=>De(()=>import("./Terms-V1Ug9pC6.js"),__vite__mapDeps([48,24,4]))},{path:"/privacy",component:()=>De(()=>import("./Privacy-DUg7uCoa.js"),__vite__mapDeps([49,24,4]))},{path:"/references",component:()=>De(()=>import("./References-ryyeDsEf.js"),__vite__mapDeps([50,16,51,4]))},{path:"/leaderboard",component:()=>De(()=>import("./Leaderboard-Cnk6qMob.js"),__vite__mapDeps([52,21,53,16,54,55,4]))},{path:"/credits",component:()=>De(()=>import("./Credits-DjTyM_GJ.js"),__vite__mapDeps([56,24,4]))},{path:"/world",component:()=>De(()=>import("./Countries-Dyh1yqJ3.js"),__vite__mapDeps([57,21,53,16,54,58,59,60,25,4]))},{path:"/world/:country",component:()=>De(()=>import("./States-BEsFSBg6.js"),__vite__mapDeps([61,58,16,59,21,24,25,4]))},{path:"/world/:country/:state",component:()=>De(()=>import("./Cities-Cnu1Qb5q.js"),__vite__mapDeps([62,58,16,59,21,24,25,4]))},{path:"/world/:country/:state/:city/map/:minDate?/:maxDate?/:hex?",component:()=>De(()=>import("./CityMapContainer-D1JDJV1x.js"),__vite__mapDeps([63,21,15,16,64,25,4]))},{path:"/admin/photos",component:()=>De(()=>import("./VerifyPhotos-D9w2zbqL.js"),__vite__mapDeps([65,21,16,66,67,68,25,4])),meta:{middleware:[Tt,Ik]}},{path:"/admin/merchants",component:()=>De(()=>import("./Merchants-Dbwu67dA.js"),__vite__mapDeps([69,13,14,15,16,17,18,70,71,4])),meta:{middleware:[Tt,Ik]}},{path:"/upload",component:()=>De(()=>import("./Upload-C8Yy0zHr.js"),__vite__mapDeps([72,70,73,4])),meta:{middleware:[Tt]}},{path:"/submit",component:()=>De(()=>import("./Upload-C8Yy0zHr.js"),__vite__mapDeps([72,70,73,4])),meta:{middleware:[Tt]}},{path:"/tag",component:()=>De(()=>import("./Tag-BrnjdQ4S.js"),__vite__mapDeps([74,16,21,66,67,75,25,4])),meta:{middleware:[Tt]}},{path:"/bulk-tag",component:()=>De(()=>import("./BulkTag-B4RuqF6V.js"),__vite__mapDeps([76,77,78,21,16,79,25,4])),meta:{middleware:[Tt]}},{path:"/profile",component:()=>De(()=>import("./Profile-DseiX7S2.js"),__vite__mapDeps([80,16,2,34,15,41,42,77,78,81,4])),meta:{middleware:[Tt]}},{path:"/my-uploads",component:()=>De(()=>import("./MyUploads-YAgiypRv.js"),__vite__mapDeps([82,22,23,4])),meta:{middleware:[Tt]}},{path:"/teams",component:()=>De(()=>import("./Teams-BcDhvNQi.js"),__vite__mapDeps([83,21,14,15,16,17,84,25,4])),meta:{middleware:[Tt]}},{path:"/settings",component:()=>De(()=>import("./Settings-Cun0a94W.js"),__vite__mapDeps([85,86,4,87,88,89,21,25,90,91,92,93,94,95,96])),meta:{middleware:[Tt]},children:[{path:"password",component:()=>De(()=>import("./Settings-Cun0a94W.js"),__vite__mapDeps([85,86,4,87,88,89,21,25,90,91,92,93,94,95,96])),meta:{middleware:[Tt]}},{path:"details",component:()=>De(()=>import("./Details-BBDTCe8n.js"),__vite__mapDeps([86,4])),meta:{middleware:[Tt]}},{path:"social",component:()=>De(()=>import("./Social-DgpaWAPL.js"),__vite__mapDeps([87,4])),meta:{middleware:[Tt]}},{path:"account",component:()=>De(()=>import("./Account-BQJ9B9OG.js"),__vite__mapDeps([88,4])),meta:{middleware:[Tt]}},{path:"payments",component:()=>De(()=>import("./Payments-BbgiyAGe.js"),__vite__mapDeps([89,21,25,4])),meta:{middleware:[Tt]}},{path:"privacy",component:()=>De(()=>import("./Privacy-BPIfeVCy.js"),__vite__mapDeps([90,91,4])),meta:{middleware:[Tt]}},{path:"littercoin",component:()=>De(()=>import("./Littercoin-DRfqG3mg.js"),__vite__mapDeps([92,4])),meta:{middleware:[Tt]}},{path:"picked-up",component:()=>De(()=>import("./PickedUp-CD9AKudE.js"),__vite__mapDeps([93,4])),meta:{middleware:[Tt]}},{path:"emails",component:()=>De(()=>import("./Emails-B3sy2HLk.js"),__vite__mapDeps([94,4])),meta:{middleware:[Tt]}},{path:"show-flag",component:()=>De(()=>import("./GlobalFlag-DK1P1Fl8.js"),__vite__mapDeps([95,21,96,25,4])),meta:{middleware:[Tt]}}]},{path:"/bbox",component:()=>De(()=>import("./BoundingBox-CL6PBiVq.js"),__vite__mapDeps([97,21,98,25,4])),meta:{middleware:[Tt,vye]}},{path:"/bbox/verify",component:()=>De(()=>import("./BoundingBox-CL6PBiVq.js"),__vite__mapDeps([97,21,98,25,4])),meta:{middleware:[Tt,bye]}}]});No.beforeEach((e,t,n)=>{if(!e.meta.middleware)return n();const a=e.meta.middleware,i={to:e,from:t,next:n,store:BS};return a[0]({...i,next:DS(i,a,1)})});const _ye={async ADD_BOXES_TO_IMAGE(e){await axios.post("/bbox/create",{photo_id:e.rootState.admin.id,boxes:e.state.boxes}).then(t=>{console.log("add_boxes_to_image",t),t.data.success&&(fe.$vToastify.success({title:"Success!",body:"Thank you for helping us clean the planet!",position:"top-right"}),e.dispatch("GET_NEXT_BBOX"))}).catch(t=>{console.error("add_boxes_to_image",t)})},async BBOX_SKIP_IMAGE(e,t){await axios.post("/bbox/skip",{photo_id:e.rootState.admin.id}).then(n=>{console.log("bbox_skip_image",n),fe.$vToastify.success({title:"Skipping",body:"This image will not be used for AI",position:"top-right"}),t?e.dispatch("GET_NEXT_BOXES_TO_VERIFY"):e.dispatch("GET_NEXT_BBOX")}).catch(n=>{console.error("bbox_skip_image",n)})},async BBOX_UPDATE_TAGS(e){await axios.post("/bbox/tags/update",{photoId:e.rootState.admin.id,tags:e.rootState.litter.tags}).then(t=>{console.log("bbox_update_tags",t),fe.$vToastify.success({title:"Updated",body:"The tags for this image have been updated",position:"top-right"});const n=[...e.state.boxes];e.commit("initBboxTags",e.rootState.litter.tags),e.commit("updateBoxPositions",n)}).catch(t=>{console.error("bbox_update_tags",t)})},async BBOX_WRONG_TAGS(e){await axios.post("/bbox/tags/wrong",{photoId:e.rootState.admin.id}).then(t=>{console.log("bbox_wrong_tags",t),t.data.success&&fe.$vToastify.success({title:"Thanks for helping!",body:"An admin will update these tags",position:"top-right"})}).catch(t=>{console.error("bbox_wrong_tags",t)})},async GET_NEXT_BBOX(e){await axios.get("/bbox/index").then(t=>{console.log("next_bb_img",t),e.commit("adminImage",{id:t.data.photo.id,filename:t.data.photo.five_hundred_square_filepath}),e.commit("initAdminItems",t.data.photo),e.commit("initBboxTags",t.data.photo),e.commit("bboxCount",{usersBoxCount:t.data.usersBoxCount,totalBoxCount:t.data.totalBoxCount}),e.commit("adminLoading",!1)}).catch(t=>{console.log("error.next_bb_img",t)})},async GET_NEXT_BOXES_TO_VERIFY(e){await axios.get("/bbox/verify/index").then(t=>{console.log("verify_next_box",t),t.data.photo&&(e.commit("adminImage",{id:t.data.photo.id,filename:t.data.photo.five_hundred_square_filepath}),e.commit("initAdminItems",t.data.photo),e.commit("initBoxesToVerify",t.data.photo.boxes),e.commit("adminLoading",!1))}).catch(t=>{console.log("error.verify_next_box",t)})},async VERIFY_BOXES(e){await axios.post("/bbox/verify/update",{photo_id:e.rootState.admin.id,hasChanged:e.state.hasChanged,boxes:e.state.boxes}).then(t=>{console.log("verify_boxes",t),t.data.success&&(fe.$vToastify.success({title:"Verified",body:"Stage 4 level achieved!",position:"top-right"}),e.dispatch("GET_NEXT_BOXES_TO_VERIFY"))}).catch(t=>{console.error("verify_boxes",t)})}},wf=["alcohol","art","brands","coastal","coffee","dogshit","dumping","food","industrial","sanitary","softdrinks","smoking","material","other"],So={smoking:["butts","lighters","cigaretteBox","tobaccoPouch","skins","smoking_plastic","filters","filterbox","vape_pen","vape_oil","smokingOther"],alcohol:["beerBottle","spiritBottle","wineBottle","beerCan","brokenGlass","bottleTops","paperCardAlcoholPackaging","plasticAlcoholPackaging","pint","six_pack_rings","alcohol_plastic_cups","alcoholOther"],art:["item"],coffee:["coffeeCups","coffeeLids","coffeeOther"],food:["sweetWrappers","paperFoodPackaging","plasticFoodPackaging","plasticCutlery","crisp_small","crisp_large","styrofoam_plate","napkins","sauce_packet","glass_jar","glass_jar_lid","aluminium_foil","pizza_box","foodOther","chewing_gum"],softdrinks:["waterBottle","fizzyDrinkBottle","tinCan","bottleLid","bottleLabel","sportsDrink","straws","plastic_cups","plastic_cup_tops","milk_bottle","milk_carton","paper_cups","juice_cartons","juice_bottles","juice_packet","ice_tea_bottles","ice_tea_can","energy_can","pullring","strawpacket","styro_cup","broken_glass","softDrinkOther"],sanitary:["gloves","facemask","condoms","nappies","menstral","deodorant","ear_swabs","tooth_pick","tooth_brush","wetwipes","hand_sanitiser","sanitaryOther"],dumping:["small","medium","large"],industrial:["oil","industrial_plastic","chemical","bricks","tape","industrial_other"],coastal:["microplastics","mediumplastics","macroplastics","rope_small","rope_medium","rope_large","fishing_gear_nets","ghost_nets","buoys","degraded_plasticbottle","degraded_plasticbag","degraded_straws","degraded_lighters","balloons","lego","shotgun_cartridges","styro_small","styro_medium","styro_large","coastal_other"],brands:["aadrink","acadia","adidas","albertheijn","aldi","amazon","amstel","anheuser_busch","apple","applegreen","asahi","avoca","bacardi","ballygowan","bewleys","brambles","budweiser","bulmers","bullit","burgerking","butlers","cadburys","cafenero","calanda","camel","caprisun","carlsberg","centra","circlek","coke","coles","colgate","corona","costa","doritos","drpepper","dunnes","duracell","durex","esquires","evian","fanta","fernandes","fosters","frank_and_honest","fritolay","gatorade","gillette","goldenpower","guinness","haribo","heineken","hertog_jan","insomnia","kellogs","kfc","lavish","lego","lidl","lindenvillage","lipton","lolly_and_cookes","loreal","lucozade","marlboro","mars","mcdonalds","modelo","molson_coors","monster","nero","nescafe","nestle","nike","obriens","ok_","pepsi","powerade","redbull","ribena","sainsburys","samsung","schutters","seven_eleven","slammers","spa","spar","starbucks","stella","subway","supermacs","supervalu","tayto","tesco","tim_hortons","thins","volvic","waitrose","walkers","wendys","wilde_and_greene","winston","woolworths","wrigleys"],other:["random_litter","bags_litter","overflowing_bins","plastic","automobile","tyre","traffic_cone","metal","plastic_bags","election_posters","forsale_posters","cable_tie","books","magazine","paper","stationary","washing_up","clothing","hair_tie","ear_plugs","elec_small","elec_large","batteries","balloons","life_buoy","other"],trashdog:["trashdog","littercat","duck"],dogshit:["poo","poo_in_bag"],material:["aluminium","bronze","carbon_fiber","ceramic","composite","concrete","copper","fiberglass","glass","iron_or_steel","latex","metal","nickel","nylon","paper","plastic","polyethylene","polymer","polypropylene","polystyrene","pvc","rubber","titanium","wood"]},yye={activateBox(e,t){let n=[...e.boxes];n.map(a=>(a.active=a.id===t,a)),e.boxes=n},addBoxBrand(e,t){let n=[...e.brands];n.push(t),e.brands=n},addNewBox(e){let t=e.boxes;const n=e.boxes.length===0?1:e.boxes[e.boxes.length-1].id+1;t.push({id:n,top:0,left:0,height:100,width:100,active:!1,category:null,tag:null,brand:null,showLabel:!1,hidden:!1})},addSelectedBrandToBox(e,t){let n=[...e.boxes],a=n.find(r=>r.id===t),i=[...e.brands];a.brand=i[e.selectedBrandIndex],i.splice(e.selectedBrandIndex,1),e.brands=i,e.boxes=n,e.selectedBrandIndex=null,e.hasChanged=!0},addTagToBox(e,t){let n=[...e.boxes],a=n.find(i=>i.active);a.category=t.category,a.tag=t.tag,t.hasOwnProperty("brand")&&(a.brand=t.brand),e.boxes=n},bboxCount(e,t){e.usersBoxCount=t.usersBoxCount,e.totalBoxCount=t.totalBoxCount},setBrandsBox(e,t){e.brands=t},clearBoxes(e){e.boxes=[]},deactivateBoxes(e){let t=[...e.boxes];t.map(n=>n.active=!1),e.selectedBrandIndex=null,e.boxes=t},initBboxTags(e,t){console.log({payload:t}),this.commit("clearBoxes"),e.hasChanged=!1,wf.map(n=>{t[n]&&So[n].map(a=>{if(t[n][a]){const i=t[n][a];console.log(n,a,i);let r=1;for(;r<=i;){if(n==="brands"){this.commit("addBoxBrand",a),r++;continue}this.commit("addNewBox");const s=e.boxes[e.boxes.length-1].id;this.commit("activateBox",s),this.commit("addTagToBox",{category:n,tag:a}),r++}}})})},initBoxesToVerify(e,t){this.commit("clearBoxes"),t.map(n=>{const a=JSON.parse(n.bbox);return n.left=a[0],n.top=a[1],n.width=a[2],n.height=a[3],n}),e.boxes=t},moveBoxUp(e){let t=[...e.boxes];t.map(n=>(n.active&&n.top--,n)),e.boxes=t,e.hasChanged=!0},moveBoxRight(e){let t=[...e.boxes];t.map(n=>(n.active&&n.left++,n)),e.boxes=t,e.hasChanged=!0},moveBoxDown(e){let t=[...e.boxes];t.map(n=>(n.active&&n.top++,n)),e.boxes=t,e.hasChanged=!0},moveBoxLeft(e){let t=[...e.boxes];t.map(n=>(n.active&&n.left--,n)),e.boxes=t,e.hasChanged=!0},removeBboxTag(e,t){let n=[...e.boxes];n.map(a=>{if(a.active){let i=Object.assign({},a.tags);delete i[t.category][t.tag_key],Object.keys(i[t.category]).length===0&&delete i[t.category]}return a}),e.boxes=n},rotateBox(e,t){let n=[...e.boxes],a=n.find(s=>s.id===t);const i=a.width,r=a.height;a.height=i,a.width=r,e.boxes=n},selectBrandBoxIndex(e,t){e.selectedBrandIndex=t},showAllBoxes(e){let t=[...e.boxes];t.map(n=>n.hidden=!1),e.boxes=t},toggleBoxLabel(e,t){let n=[...e.boxes],a=n.find(i=>i.id===t);a.showLabel=!a.showLabel,e.boxes=n},toggleHiddenBoxes(e){let t=[...e.boxes];t.map(n=>n.hidden=!n.active),e.boxes=t},updateBoxPosition(e,t){e.boxes.map(n=>(n.active&&(n.top=t.top,n.left=t.left,n.width=t.width,n.height=t.height),n)),e.hasChanged=!0},updateBoxPositions(e,t){let n=[...e.boxes];n.map((a,i)=>(t[i]&&(a.id=t[i].id,a.top=t[i].top,a.left=t[i].left,a.width=t[i].width,a.height=t[i].height),a)),e.boxes=n,e.hasChanged=!0}},wye={boxes:[{id:1,width:100,height:100,top:0,left:0,active:!0,category:null,tag:null,brand:null,showLabel:!1,hidden:!1}],brands:[],hasChanged:!1,selectedBrandIndex:null,totalBoxCount:0,usersBoxCount:0},kye={state:wye,actions:_ye,mutations:yye},$ye={center:null,data:null,hex:100,zoom:1},Cye={async GET_CITY_DATA(e,t){await axios.get("/city",{params:{city:t.city,min:t.min,max:t.max,hex:t.hex}}).then(n=>{console.log("get_city_data",n),e.commit("init_city_data",n.data)}).catch(n=>{console.log("error.get_city_data",n)})}},Sye={init_city_data(e,t){e.center=t.center_map,e.data=t.litterGeojson,e.hex=t.hex,e.zoom=t.map_zoom}},Tye=Object.assign({},$ye),xye={state:Tye,actions:Cye,mutations:Sye},zye={async CREATE_CLEANUP_EVENT(e,t){const n=Se.t("notifications.success"),a="A new cleanup has been created!";await axios.post("/cleanups/create",{name:t.name,date:t.date,lat:t.lat,lon:t.lon,time:t.time,description:t.description,invite_link:t.invite_link}).then(i=>{console.log("create_cleanup_event",i),i.data.success&&(fe.$vToastify.success({title:n,body:a}),setTimeout(()=>{fe.$vToastify.success({title:n,body:"You have joined a cleanup!"})},1500))}).catch(i=>{var r,s;console.log("create_cleanup_event",i),e.commit("setErrors",(s=(r=i==null?void 0:i.response)==null?void 0:r.data)==null?void 0:s.errors)})},async GET_CLEANUPS(e){await axios.get("/cleanups/get-cleanups").then(t=>{console.log("get_cleanups",t),t.data.success&&e.commit("setCleanupsGeojson",t.data.geojson)}).catch(t=>{console.error("get_cleanups",t)})},async JOIN_CLEANUP(e,t){const n=Se.t("notifications.success"),a="You have joined a cleanup!";await axios.post(`/cleanups/${t.link}/join`).then(i=>{console.log("join_cleanup",i),i.data.cleanup&&e.commit("setActiveCleanup",i.data.cleanup),i.data.success?fe.$vToastify.success({title:n,body:a}):i.data.msg==="already joined"?fe.$vToastify.error({title:"Not possible",body:"You have already joined this cleanup. Please refresh the page to see!"}):i.data.msg==="cleanup not found"&&fe.$vToastify.error({title:"Not found",body:"We cannot find a cleanup with this invitation"})}).catch(i=>{console.error("join_cleanup",i)})},async LEAVE_CLEANUP(e,t){const n=Se.t("notifications.success"),a="You have left the cleanup";await axios.post(`/cleanups/${t.link}/leave`).then(i=>{console.log("leave_cleanup",i),i.data.success?fe.$vToastify.success({title:n,body:a}):i.data.msg==="already left"&&fe.$vToastify.error({title:"Not possible",body:"You have already left this cleanup. Please refresh the page to see!"})}).catch(i=>{console.error("leave_cleanup",i)})}},Pye={creatingCleanup(e,t){e.creating=t},joiningCleanup(e,t){e.joining=t},setActiveCleanup(e,t){e.cleanup=t},setCleanupLocation(e,t){e.lat=t.lat,e.lon=t.lng},setCleanupsGeojson(e,t){e.geojson=t}},Aye={creating:!1,joining:!1,lat:null,lon:null,geojson:null,cleanup:null},Dye={state:Aye,actions:zye,mutations:Pye},Eye={photosPerMonth:0,litterTagsPerMonth:0,usersPerMonth:0,littercoinPerMonth:0,statsByMonth:[]},Oye={async GET_STATS(e){await axios.get("/community/stats").then(t=>{console.log("get_stats",t),e.commit("setStats",t.data)}).catch(t=>{console.error("get_stats",t)})}},Mye={setStats(e,t){e.photosPerMonth=t.photosPerMonth,e.usersPerMonth=t.usersPerMonth,e.litterTagsPerMonth=t.litterTagsPerMonth,e.statsByMonth=t.statsByMonth}},jye=Object.assign({},Eye),Iye={state:jye,actions:Oye,mutations:Mye},ES={amounts:[]},Lye={async GET_DONATION_AMOUNTS(e){await axios.get(window.location.origin+"/donate/amounts").then(t=>{console.log("get_donation_options",t.data),e.commit("setDonateAmounts",t.data)}).catch(t=>{console.log("error.get_donation_options",t)})}},Fye={resetState(e){Object.assign(e,ES)},setDonateAmounts(e,t){e.amounts=t}},Rye=Object.assign({},ES),Bye={actions:Lye,mutations:Fye,state:Rye},Nye={clearError(e,t){e.errorsObject&&(delete e.errorsObject[t],Object.keys(e.errorsObject).length===0&&(e.errorsObject=null))},clearErrors(e){e.errorsObject=null},hideModal(e){e.errorsObject=null},setErrors(e,t){e.errorsObject=t},setCleanupLocation(e){var t,n;(t=e.errorsObject)!=null&&t.hasOwnProperty("lat")&&delete e.errorsObject.lat,(n=e.errorsObject)!=null&&n.hasOwnProperty("lon")&&delete e.errorsObject.lon}},qye={errorsObject:null},Hye={state:qye,mutations:Nye},OS={artData:[],currentDate:"today",loading:!0,datesOpen:!1,langsOpen:!1,geojson:[],customTagsFound:[]},Vye={async GET_ART_DATA(e){await axios.get("/global/art-data").then(t=>{console.log("get_art_data",t),e.commit("globalArtData",t.data)}).catch(t=>{console.error("get_art_data",t)})},async GET_CLUSTERS(e,t){await axios.get("/global/clusters",{params:{zoom:t.zoom,year:t.year,bbox:null}}).then(n=>{console.log("get_clusters",n),e.commit("updateGlobalData",n.data)}).catch(n=>{console.error("get_clusters",n)})},async SEARCH_CUSTOM_TAGS(e,t){await axios.get("/global/search/custom-tags",{params:{search:t}}).then(n=>{console.log("search_custom_tags",n),n.data.success&&e.commit("setCustomTagsFound",n.data.tags)}).catch(n=>{console.error("search_custom_tags",n)})}},Uye={closeDatesButton(e){e.datesOpen=!1},closeLangsButton(e){e.langsOpen=!1},globalArtData(e,t){e.artData=t},globalLoading(e,t){e.loading=t},resetState(e){Object.assign(e,OS)},setCustomTagsFound(e,t){e.customTagsFound=t},toggleLangsButton(e){e.langsOpen=!e.langsOpen},toggleGlobalDates(e){e.datesOpen=!e.datesOpen},updateGlobalData(e,t){e.geojson=t}},Wye=Object.assign({},OS),Kye={state:Wye,actions:Vye,mutations:Uye},Gye={async GET_USERS_FOR_GLOBAL_LEADERBOARD(e,t){await axios.get("/global/leaderboard",{params:{timeFilter:t}}).then(n=>{console.log("get_users_for_global_leaderboard",n),e.commit("setGlobalLeaderboard",n.data),e.commit("setGlobalLeaders",n.data.users)}).catch(n=>{console.error("get_users_for_global_leaderboard",n)})},async GET_USERS_FOR_LOCATION_LEADERBOARD(e,t){await axios.get("/global/leaderboard/location",{params:{timeFilter:t==null?void 0:t.timeFilter,locationType:t==null?void 0:t.locationType,locationId:t==null?void 0:t.locationId}}).then(n=>{console.log("get_users_for_location_leaderboard",n),e.commit("setGlobalLeaderboard",n.data),e.commit("setLocationLeaderboard",{locationType:t.locationType,locationId:t.locationId,users:n.data.users}),e.commit("setSelectedLocationId",t.locationId),e.commit("updateLocationTabKey")}).catch(n=>{console.error("get_users_for_location_leaderboard",n)})},async GET_NEXT_LEADERBOARD_PAGE(e){e.commit("incrementLeaderboardPage"),await axios.get("/global/leaderboard",{params:{page:e.state.currentPage}}).then(t=>{console.log("get_next_leaderboard_page",t),e.commit("setGlobalLeaderboard",t.data)}).catch(t=>{console.error("get_next_leaderboard_page",t)})},async GET_PREVIOUS_LEADERBOARD_PAGE(e){e.commit("decrementLeaderboardPage"),await axios.get("/global/leaderboard",{params:{page:e.state.currentPage}}).then(t=>{console.log("get_previous_leaderboard_page",t),e.commit("setGlobalLeaderboard",t.data)}).catch(t=>{console.error("get_previous_leaderboard_page",t)})}},Jye={setGlobalLeaderboard(e,t){e.users=t.users,e.hasNextPage=t.hasNextPage},incrementLeaderboardPage(e){e.currentPage++},decrementLeaderboardPage(e){e.currentPage--},setLocationLeaderboard(e,t){e[t.locationType][t.locationId]=t.users}},Yye={currentPage:1,hasNextPage:!1,users:[],country:{},state:{},city:{}},Xye={state:Yye,actions:Gye,mutations:Jye},MS={countryName:"",globalLeaders:[],hex:null,level:{previousXp:0,nextXp:0},locations:[],littercoin:0,minDate:null,maxDate:null,previousLevelInt:0,progressPercent:0,sortLocationsBy:"most-data",stateName:"",totalLitterInt:0,total_litter:0,total_photos:0,selectedLocationId:0,locationTabKey:0,countryNames:[]},Zye={async DOWNLOAD_DATA(e,t){let n=Se.t("notifications.success"),a="Your download is being processed and will be emailed to you soon";await axios.post("/download",{locationType:t.locationType,locationId:t.locationId,email:t.email}).then(i=>{console.log("download_data",i),i.data.success?fe.$vToastify.success({title:n,body:a,position:"top-right"}):fe.$vToastify.success({title:"Error",body:"Sorry, there was an error with the download. Please contact support",position:"top-right"})}).catch(i=>{console.error("download_data",i)})},async GET_WORLD_CUP_DATA(e){await axios.get("/get-world-cup-data").then(t=>{console.log("get_world_cup_data",t),e.commit("setCountries",t.data)}).catch(t=>{console.log("error.get_world_cup_data",t)})},async GET_LIST_OF_COUNTRY_NAMES(e){await axios.get("/countries/names").then(t=>{console.log("get_list_of_country_names",t),t.data.success&&e.commit("setCountryNames",t.data.countries)}).catch(t=>{console.log("error.get_list_of_country_names",t)})},async GET_COUNTRIES(e){await axios.get("countries").then(t=>{console.log("get_countries",t),e.commit("setCountries",t.data)}).catch(t=>{console.log("error.get_countries",t)})},async GET_STATES(e,t){await axios.get("/states",{params:{country:t}}).then(n=>{console.log("get_states",n),n.data.success?(e.commit("countryName",n.data.countryName),e.commit("setLocations",n.data.states)):No.push({path:"/world"})}).catch(n=>{console.log("error.get_states",n)})},async GET_CITIES(e,t){await axios.get("/cities",{params:{country:t.country,state:t.state}}).then(n=>{console.log("get_cities",n),n.data.success?(e.commit("countryName",n.data.country),e.commit("stateName",n.data.state),e.commit("setLocations",n.data.cities)):No.push({path:"/world"})}).catch(n=>{console.log("error.get_cities",n)})}},Qye={resetLocations(e){Object.assign(e,MS)},setCountries(e,t){e.locations=t.countries,e.globalLeaders=t.globalLeaders,e.total_litter=t.total_litter,e.total_photos=t.total_photos,e.level.previousXp=t.previousXp,e.level.nextXp=t.nextXp,e.littercoin=t.littercoin},setCountryNames(e,t){e.countryNames=t},setGlobalLeaders(e,t){e.globalLeaders=t},countryName(e,t){e.countryName=t},stateName(e,t){e.stateName=t},setLocations(e,t){e.locations=t},updateCitySlider(e,t){let n=[...e.locations];n[t.index].minDate=t.dates[0],n[t.index].maxDate=t.dates[1],n[t.index].hex=t.hex,e.locations=n},incrementTotalPhotos(e,t=1){e.total_photos+=t},decrementTotalPhotos(e,t=1){e.total_photos-=t},incrementTotalLitter(e,t){e.total_litter+=t},decrementTotalLitter(e,t){e.total_litter-=t},setSortLocationsBy(e,t){e.sortLocationsBy=t},setSelectedLocationId(e,t){e.selectedLocationId=t},updateLocationTabKey(e){e.locationTabKey++}},ewe=Object.assign({},MS),twe={actions:Zye,mutations:Qye,state:ewe},jS={category:"smoking",hasAddedNewTag:!1,pickedUp:null,tag:"butts",customTag:"",loading:!1,photos:{},tags:{},customTags:{},customTagsError:"",submitting:!1,recentTags:{},recentCustomTags:[]},nwe={async BULK_TAG_PHOTOS(e){const t="Success!",n="Your tags were applied to the images";let a=e.rootState.photos.bulkPaginate.data.filter(i=>{var l;const r=i.tags&&Object.keys(i.tags).length,s=(l=i.custom_tags)==null?void 0:l.length;return r||s}).reduce((i,r)=>(i[r.id]={tags:r.tags??{},custom_tags:r.custom_tags??[],picked_up:!!r.picked_up},i),{});await axios.post("/user/profile/photos/tags/bulkTag",{photos:a}).then(i=>{console.log("bulk_tag_photos",i),i.data.success&&fe.$vToastify.success({title:t,body:n,position:"top-right"})}).catch(i=>{console.error("bulk_tag_photos",i)})},async ADD_TAGS_TO_IMAGE(e,t){const n=Se.t("notifications.success"),a=Se.t("notifications.tags-added"),i=e.rootState.photos.paginate.data[0].id;await axios.post("add-tags",{photo_id:i,tags:e.state.tags[i],custom_tags:e.state.customTags[i],picked_up:e.state.pickedUp}).then(r=>{r.data.success&&(fe.$vToastify.success({title:n,body:a,position:"top-right"}),e.commit("clearTags",i),e.rootState.user.user.verification_required||(e.commit("incrementUsersNextLittercoinScore"),e.rootState.user.user.littercoin_progress===100&&(e.commit("incrementLittercoinScore"),fe.$vToastify.success({title:n,body:"You just earned a Littercoin!",position:"top-right"})))),e.dispatch("LOAD_NEXT_IMAGE")}).catch(r=>console.log(r))}},awe={addRecentTag(e,t){let n=Object.assign({},e.recentTags);n={...n,[t.category]:{...n[t.category],[t.tag]:1}};const a=n;Object.entries(n).forEach(([i,r])=>{const s=Object.entries(r).sort(function(l,u){const d=Se.t(`litter.${i}.${l[0]}`),f=Se.t(`litter.${i}.${u[0]}`);return d===f?0:da.toLowerCase()===t.customTag.toLowerCase())!==void 0){e.customTagsError=Se.t("tags.tag-already-added");return}if(n[t.photoId].length>=3){e.customTagsError=Se.t("tags.tag-limit-reached");return}n[t.photoId].unshift(t.customTag),e.recentCustomTags.indexOf(t.customTag)===-1&&(e.recentCustomTags.push(t.customTag),e.recentCustomTags.sort(function(a,i){return a===i?0:a{t.hasOwnProperty(a)&&t[a]&&So[a].map(i=>{t[a][i]&&(n={...n,[t.id]:{...n[t.id],[a]:{...n[t.id]?n[t.id][a]:{},[i]:t[a][i]}}})})}),e.tags=n},initAdminCustomTags(e,t){e.customTags={[t.id]:t.custom_tags.map(n=>n.tag)}},initRecentTags(e,t){e.recentTags=t},initRecentCustomTags(e,t){e.recentCustomTags=t},removeTag(e,t){let n=Object.assign({},e.tags);delete n[t.photoId][t.category][t.tag_key],Object.keys(n[t.photoId][t.category]).length===0&&delete n[t.photoId][t.category],e.tags=n},removeRecentTag(e,t){let n=Object.assign({},e.recentTags);delete n[t.category][t.tag],Object.keys(n[t.category]).length===0&&delete n[t.category],e.recentTags=n},resetTag(e,t){let n=Object.assign({},e.tags);n[t.photoId][t.category][t.tag_key]=0,e.tags=n,e.hasAddedNewTag=!0},removeCustomTag(e,t){let n=Object.assign({},e.customTags);n[t.photoId]=n[t.photoId].filter(a=>a!==t.customTag),e.customTags=n,e.hasAddedNewTag=!0},removeRecentCustomTag(e,t){let n=Object.assign([],e.recentCustomTags);n=n.filter(a=>a!==t),e.recentCustomTags=n},resetState(e){Object.assign(e,jS)},resetLitter(e){e.categories={Alcohol:{},Art:{},Brands:{},Coastal:{},Coffee:{},Dumping:{},Drugs:{},Food:{},Industrial:{},Other:{},Sanitary:{},Smoking:{},SoftDrinks:{},TrashDog:{}}},setAllTagsToZero(e,t){let n=Object.assign({},e.tags[t]);Object.entries(n).map(a=>{let i=a[0],r=a[1];Object.keys(n[i]).length>0&&Object.keys(r).map(s=>{n[i][s]=0})}),e.tags={...e.tags,[t]:n}},set_default_litter_picked_up(e,t){e.pickedUp=t},setLang(e,t){e.categoryNames=t.categoryNames,e.currentCategory=t.currentCategory,e.currentItem=t.currentItem,e.litterlang=t.litterlang},togglePickedUp(e){e.pickedUp=!e.pickedUp},toggleSubmit(e){e.submitting=!e.submitting}},iwe=Object.assign({},jS),rwe={state:iwe,actions:nwe,mutations:awe},swe={async CREATE_MERCHANT(e,t){const n=Se.t("notifications.success"),a="Merchant created";await axios.post("/merchants/create",{name:t.name,address:t.address,lat:t.lat,lon:t.lon,email:t.email,about:t.about,website:t.website}).then(i=>{console.log("admin_create_merchant",i),i.data.success&&(fe.$vToastify.success({title:n,body:a,position:"top-right"}),e.commit("setMerchant",i.data.merchant))}).catch(i=>{console.error("admin_create_merchant",i)})},async GET_MERCHANTS_GEOJSON(e){await axios.get("/merchants/get-geojson").then(t=>{console.log("get_merchants_geojson",t),t.data.success&&e.commit("setMerchantsGeojson",t.data.geojson)}).catch(t=>{console.error("get_merchants_geojson",t)})},async GET_NEXT_MERCHANT_TO_APPROVE(e){await axios.get("/merchants/get-next-merchant-to-approve").then(t=>{console.log("get_next_merchant_to_approve",t),t.data.success?e.commit("setMerchant",t.data.merchant):e.commit("resetMerchant")}).catch(t=>{console.error("get_next_merchant_to_approve",t)})},async APPROVE_MERCHANT(e){const t=Se.t("notifications.success"),n="Merchant approved";await axios.post("/admin/merchants/approve",{merchantId:e.state.merchant.id}).then(a=>{console.log("approve_merchant",a),a.data.success&&(fe.$vToastify.success({title:t,body:n,position:"top-right"}),e.dispatch("GET_NEXT_MERCHANT_TO_APPROVE"))}).catch(a=>{console.error("approve_merchant",a)})},async DELETE_MERCHANT(e){const t=Se.t("notifications.success"),n="Merchant deleted";await axios.post("/admin/merchants/delete",{merchantId:e.state.merchant.id}).then(a=>{console.log("delete_merchant",a),a.data.success?(fe.$vToastify.success({title:t,body:n,position:"top-right"}),e.dispatch("GET_NEXT_MERCHANT_TO_APPROVE")):a.data.msg==="does not exist"&&e.commit("resetMerchant")}).catch(a=>{console.error("delete_merchant",a)})}},owe={resetMerchant(e){e.merchant={},e.merchant.lat=0,e.merchant.lon=0},setMerchantLocation(e,t){e.merchant.lat=t.lat,e.merchant.lon=t.lng},setMerchantsGeojson(e,t){e.geojson=t},setMerchant(e,t){e.merchant=t}},lwe={geojson:{},merchant:{lat:0,lon:0}},cwe={state:lwe,actions:swe,mutations:owe},IS={action:"",button:"",show:!1,title:"",type:""},uwe={},dwe={hideModal(e){e.show=!1},resetState(e){Object.assign(e,IS)},showModal(e,t){e.type=t.type,e.title=t.title,e.action=t.action,e.show=!0}},fwe=Object.assign({},IS),hwe={state:fwe,actions:uwe,mutations:dwe},pwe={errors:{}},mwe={state:pwe},Dg={filters:{id:"",dateRange:{start:null,end:null},period:"created_at",verified:null},paginate:{prev_page_url:null,next_page_url:null,data:[]},bulkPaginate:{prev_page_url:null,next_page_url:null,data:[]},myUploadsPaginate:null,remaining:0,selectedCount:0,selectAll:!1,inclIds:[],exclIds:[],total:0,verified:0,previousCustomTags:[],showDetailsPhotoId:null},gwe={async DELETE_SELECTED_PHOTOS(e){await axios.post("/user/profile/photos/delete",{selectAll:e.state.photos.selectAll,inclIds:e.state.photos.inclIds,exclIds:e.state.photos.exclIds,filters:e.state.photos.filters}).then(t=>{console.log("delete_selected_photos",t)}).catch(t=>{console.error("delete_selected_photos",t)})},async GET_MY_PHOTOS(e,t){await axios.get("/photos/get-my-photos",{params:{filterTag:e.rootState.user.filterPhotos.filterTag,filterCustomTag:e.rootState.user.filterPhotos.filterCustomTag,filterDateFrom:e.rootState.user.filterPhotos.filterDateFrom,filterDateTo:e.rootState.user.filterPhotos.filterDateTo,paginationAmount:e.rootState.user.filterPhotos.paginationAmount,loadPage:t}}).then(n=>{console.log("GET_MY_PHOTOS",n),n.data.success&&e.commit("setUsersPaginatedUploads",n.data.photos)}).catch(n=>{console.log("GET_MY_PHOTOS",n.response.data),n.response&&n.response.status===422||console.error("An unexpected error occurred.",n)})},async GET_PHOTOS_FOR_TAGGING(e){await axios.get("photos").then(t=>{e.commit("photosForTagging",t.data)}).catch(t=>{console.error("get_photos_for_tagging",t)})},async GET_USERS_FILTERED_PHOTOS(e){await axios.get("/user/profile/photos/filter",{params:{filters:e.state.filters}}).then(t=>{console.log("get_users_filtered_photos",t),e.commit("myProfilePhotos",t.data.paginate),e.commit("photosCount",t.data.count)}).catch(t=>{console.error("get_users_filtered_photos",t)})},async LOAD_PREVIOUS_CUSTOM_TAGS(e){await axios.get("/user/profile/photos/previous-custom-tags").then(t=>{console.log("load_previous_custom_tags",t),e.commit("setPreviousCustomTags",t.data)}).catch(t=>{console.error("load_previous_custom_tags",t)})},async LOAD_MY_PHOTOS(e){await axios.get("/user/profile/photos/index").then(t=>{console.log("load_my_photos",t),e.commit("myProfilePhotos",t.data.paginate),e.commit("photosCount",t.data.count)}).catch(t=>{console.error("load_my_photos",t)})},async LOAD_NEXT_IMAGE(e){let t=e.state.paginate.next_page_url||e.state.paginate.current_page===1?e.state.paginate.current_page:e.state.paginate.current_page-1;await axios.get("/photos?page="+t).then(n=>{e.commit("photosForTagging",n.data)}).catch(n=>{console.error("load_next_image",n)})},async NEXT_IMAGE(e){await axios.get(e.state.paginate.next_page_url).then(t=>{e.commit("photosForTagging",t.data)}).catch(t=>{console.error("next_image",t)})},async PREVIOUS_IMAGE(e){await axios.get(e.state.paginate.prev_page_url).then(t=>{e.commit("photosForTagging",t.data)}).catch(t=>{console.error("previous_image",t)})},async PREVIOUS_PHOTOS_PAGE(e){await axios.get(e.state.bulkPaginate.prev_page_url).then(t=>{console.log("previous_photos_url",t),e.commit("paginatedPhotos",t.data.paginate)}).catch(t=>{console.error("previous_photos_url",t)})},async NEXT_PHOTOS_PAGE(e){await axios.get(e.state.bulkPaginate.next_page_url).then(t=>{console.log("next_photos_page",t),e.commit("paginatedPhotos",t.data.paginate)}).catch(t=>{console.error("next_photos_page",t)})},async SELECT_IMAGE(e,t){await axios.get(`/photos?page=${t}`).then(n=>{e.commit("photosForTagging",n.data)}).catch(n=>{console.error("select_image",n)})}},vwe={filter_photos(e,t){e.filters[t.key]=t.v},filter_photos_calendar(e,t){e.filters.dateRange.start=t.min,e.filters.dateRange.end=t.max},paginatedPhotos(e,t){(e.inclIds.length>0||e.exclIds.length>0||e.selectAll)&&(t.data=t.data.map(n=>(e.selectAll&&(n.selected=!0),e.inclIds.includes(n.id)&&(n.selected=!0),e.exclIds.includes(n.id)&&(n.selected=!1),n))),e.bulkPaginate=t},photosCount(e,t){e.total=t},photosForTagging(e,t){e.paginate=t.photos,e.remaining=t.remaining,e.total=t.total,e.previousCustomTags=t.custom_tags},myProfilePhotos(e,t){e.bulkPaginate=t},setPreviousCustomTags(e,t){e.previousCustomTags=t},resetState(e){Object.assign(e,Dg)},resetPhotoState(e){Object.assign(e,Dg)},selectAllPhotos(e){e.selectAll=!e.selectAll;let t=[...e.bulkPaginate.data];t.forEach(n=>{n.selected=e.selectAll}),e.bulkPaginate.data=t,e.selectedCount=e.selectAll?e.total:0},setPhotoPickedUp(e,t){const n=e.bulkPaginate.data.findIndex(i=>i.id===t.photoId);let a=e.bulkPaginate.data[n];a.picked_up=t.picked_up,e.bulkPaginate.data.splice(n,1,a)},addTagToPhoto(e,t){const n=e.bulkPaginate.data.findIndex(r=>r.id===t.photoId);let a=e.bulkPaginate.data[n],i=Object.assign({},a.tags??{});a.tags={...i,[t.category]:{...i[t.category],[t.tag]:t.quantity}},e.bulkPaginate.data.splice(n,1,a)},addCustomTagToPhoto(e,t){const n=e.bulkPaginate.data.findIndex(r=>r.id===t.photoId);let a=e.bulkPaginate.data[n],i=a.custom_tags??[];i.find(r=>r.toLowerCase()===t.customTag.toLowerCase())===void 0&&(i.length>=3||(i.unshift(t.customTag),a.custom_tags=i,e.bulkPaginate.data.splice(n,1,a)))},removeTagFromPhoto(e,t){const n=e.bulkPaginate.data.findIndex(r=>r.id===t.photoId);let a=e.bulkPaginate.data[n],i=Object.assign({},a.tags??{});delete i[t.category][t.tag],Object.keys(i[t.category]).length===0&&delete i[t.category],a.tags=i,e.bulkPaginate.data.splice(n,1,a)},removeCustomTagFromPhoto(e,t){const n=e.bulkPaginate.data.findIndex(r=>r.id===t.photoId);let a=e.bulkPaginate.data[n],i=a.custom_tags??[];i=i.filter(r=>r!==t.customTag),a.custom_tags=i,e.bulkPaginate.data.splice(n,1,a)},setUsersPaginatedUploads(e,t){e.myUploadsPaginate=t},setPhotoToShowDetails(e,t){e.showDetailsPhotoId=t},togglePhotoSelected(e,t){let n=[...e.bulkPaginate.data],a=[...e.inclIds],i=[...e.exclIds],r=n.find(s=>s.id===t);r.selected=!r.selected,r.selected?(e.selectedCount++,e.selectAll?i=i.filter(s=>s!==r.id):a.push(r.id)):(e.selectedCount--,e.selectAll?i.push(r.id):a=a.filter(s=>s!==r.id)),e.selectAll?e.exclIds.push(r.id):e.inclIds.push(r.id),e.inclIds=a,e.exclIds=i,e.bulkPaginate.data=n}},bwe=Object.assign({},Dg),_we={state:bwe,actions:gwe,mutations:vwe},LS={errors:{},plan:"",plans:[]};var ywe={};const wwe={async CREATE_ACCOUNT(e,t){await axios.post("/register",{name:t.name,username:t.username,email:t.email,password:t.password,password_confirmation:t.password_confirmation,"g-recaptcha-response":t.g_recaptcha_response}).then(n=>{if(console.log("create_account",n),t.plan===1)alert("Congratulations! Your free account has been created. Please verify your email to activate login");else if(t.plan>1){const a=Stripe(ywe.MIX_STRIPE_PUBLIC_KEY);let i=window.location.href+"&status=success",r=window.location.href+"&status=error";a.redirectToCheckout({lineItems:[{price:t.plan_id,quantity:1}],mode:"subscription",successUrl:i,cancelUrl:r})}e.commit("createAccountErrors",[])}).catch(n=>{console.log("error.create_account",n),e.commit("createAccountErrors",n.response.data.errors)})},async GET_PLANS(e){await axios.get("/plans").then(t=>{console.log("get_plans",t),e.commit("setPlans",t.data)}).catch(t=>{console.log("error.get_plans",t)})}},kwe={clearCreateAccountError(e,t){delete e.errors[t]},createAccountErrors(e,t){e.errors=t},resetState(e){Object.assign(e,LS)},setPlans(e,t){e.plans=t}},$we=Object.assign({},LS),Cwe={state:$we,actions:wwe,mutations:kwe},FS={errors:{},just_subscribed:!1,subscription:{}},Swe={async DELETE_ACTIVE_SUBSCRIPTION(e){let t=Se.t("notifications.success"),n=Se.t("notifications.subscription-cancelled");await axios.post("/stripe/delete").then(a=>{console.log("delete_active_subscription",a),fe.$vToastify.success({title:t,body:n,position:"top-right"}),e.commit("reset_subscriber")}).catch(a=>{console.log("error.delete_active_subscription")})},async GET_USERS_SUBSCRIPTIONS(e){await axios.get("/stripe/subscriptions").then(t=>{console.log("check_current_subscription",t),e.commit("subscription",t.data.sub)}).catch(t=>{console.log("error.check_current_subscription",t)})},async RESUBSCRIBE(e,t){await axios.post("/stripe/resubscribe",{plan:t}).then(n=>{console.log("resubscribe",n)}).catch(n=>{console.log("error.resubscribe",n)})},async SUBSCRIBE(e,t){await axios.post("/subscribe",{email:t}).then(n=>{console.log("subscribe",n),e.commit("has_subscribed",!0),setTimeout(()=>{e.commit("has_subscribed",!1)},5e3)}).catch(n=>{console.log("error.subscribe",n.response.data.errors),e.commit("subscribeErrors",n.response.data.errors)})}},Twe={clearSubscriberErrors(e){e.errors={}},has_subscribed(e,t){e.just_subscribed=t},resetState(e){Object.assign(e,FS)},reset_subscriber(e,t){e.subscription={}},subscription(e,t){e.subscription=t},subscribeErrors(e,t){e.errors=t}},xwe=Object.assign({},FS),zwe={state:xwe,actions:Swe,mutations:Twe},Pwe={async CHANGE_ACTIVE_TEAM(e,t){const n=Se.t("notifications.success"),a="Your active team has changed";await axios.post("/teams/active",{team_id:t}).then(i=>{console.log("change_active_team",i),i.data.success&&(fe.$vToastify.success({title:n,body:a,position:"top-right"}),e.commit("usersActiveTeam",t),e.commit("usersTeam",i.data.team))}).catch(i=>{console.error("change_active_team",i)})},async LEAVE_TEAM(e,t){let n=Se.t("notifications.success"),a=Se.t("teams.myteams.just-left-team"),i=Se.t("notifications.error"),r=Se.t("notifications.something-went-wrong");await axios.post("/teams/leave",{team_id:t}).then(s=>{console.log("leave_team",s),s.data.success&&(fe.$vToastify.success({title:n,body:a+" "+s.data.team.name+"."}),s.data.activeTeam&&(e.commit("usersActiveTeam",s.data.activeTeam.id),e.commit("usersTeam",s.data.activeTeam)))}).catch(s=>{fe.$vToastify.error({title:i,body:r})})},async INACTIVATE_TEAM(e){let t=Se.t("notifications.error"),n=Se.t("notifications.something-went-wrong");await axios.post("/teams/inactivate").then(a=>{console.log("inactivate_team",a),a.data.success&&(e.commit("usersActiveTeam",null),e.commit("usersTeam",null))}).catch(a=>{fe.$vToastify.error({title:t,body:n})})},async CREATE_NEW_TEAM(e,t){const n=Se.t("notifications.success"),a=Se.t("teams.create.created"),i=Se.t("notifications.error"),r=Se.t("teams.create.max-created"),s=Se.t("notifications.success"),l="Congratulations! You have joined a new team!";await axios.post("/teams/create",{name:t.name,identifier:t.identifier,team_type:t.teamType}).then(u=>{console.log("create_new_team",u),u.data.success?(fe.$vToastify.success({title:n,body:a,position:"top-right"}),e.commit("decrementUsersRemainingTeams"),e.commit("usersActiveTeam",u.data.team.id),e.commit("usersTeam",u.data.team),e.rootState.user.user.active_team||fe.$vToastify.success({title:s,body:l,position:"top-right"})):fe.$vToastify.error({title:i,body:r,position:"top-right"})}).catch(u=>{console.error("create_new_team",u.response.data.errors),e.commit("teamErrors",u.response.data.errors)})},async UPDATE_TEAM(e,t){const n=Se.t("notifications.success"),a=Se.t("teams.create.updated"),i=Se.t("notifications.error"),r=Se.t("notifications.something-went-wrong");await axios.post(`/teams/update/${t.teamId}`,{name:t.name,identifier:t.identifier}).then(async s=>{console.log("update_team",s),s.data.success?fe.$vToastify.success({title:n,body:a}):fe.$vToastify.error({title:i,body:r})}).catch(s=>{e.commit("teamErrors",s.response.data.errors)})},async DOWNLOAD_DATA_FOR_TEAM(e,t){const n=Se.t("notifications.success"),a="Your download is being processed and will be emailed to you shortly";await axios.post("/teams/download",{team_id:t}).then(i=>{console.log("download_data_for_team",i),i.data.success&&fe.$vToastify.success({title:n,body:a,position:"bottom-right"})}).catch(i=>{console.error("download_data_for_team",i)})},async GET_TEAM_DASHBOARD_DATA(e,t){await axios.get("/teams/data",{params:{period:t.period,team_id:t.team_id}}).then(n=>{console.log("get_team_dashboard_data",n),e.commit("teamDashboardData",n.data)}).catch(n=>{console.error("get_team_dashboard_data",n)})},async GET_TEAMS_LEADERBOARD(e){await axios.get("/teams/leaderboard").then(t=>{console.log("get_teams_leaderboard",t),e.commit("teamsLeaderboard",t.data)}).catch(t=>{console.error("get_teams_leaderboard",t)})},async GET_TEAM_MEMBERS(e,t){await axios.get("/teams/members",{params:{team_id:t}}).then(n=>{console.log("get_team_members",n),e.commit("paginatedTeamMembers",n.data.result)}).catch(n=>{console.error("get_team_members",n)})},async GET_TEAM_TYPES(e){await axios.get("/teams/get-types").then(t=>{console.log("get_team_types",t),e.commit("teamTypes",t.data)}).catch(t=>{console.error("get_team_types",t)})},async GET_USERS_TEAMS(e){await axios.get("/teams/joined").then(t=>{console.log("get_users_teams",t),e.commit("usersTeams",t.data)}).catch(t=>{console.error("get_users_teams",t)})},async JOIN_TEAM(e,t){const n=Se.t("notifications.success"),a="Congratulations! You have joined a new team!",i="You have already joined this team!";await axios.post("/teams/join",{identifier:t}).then(r=>{console.log("join_team",r),r.data.success?(fe.$vToastify.success({title:n,body:a,position:"bottom-right"}),e.commit("usersActiveTeam",r.data.activeTeam.id),e.commit("usersTeam",r.data.activeTeam)):r.data.msg==="already-joined"&&fe.$vToastify.info({title:"Hold on!",body:i,position:"bottom-right"})}).catch(r=>{console.error("join_team",r),e.commit("teamErrors",r.response.data.errors)})},async PREVIOUS_MEMBERS_PAGE(e,t){await axios.get(e.state.members.prev_page_url,{params:{team_id:t}}).then(n=>{console.log("previous_members_page",n),e.commit("paginatedTeamMembers",n.data.result)}).catch(n=>{console.error("previous_members_page",n)})},async NEXT_MEMBERS_PAGE(e,t){await axios.get(e.state.members.next_page_url,{params:{team_id:t}}).then(n=>{console.log("next_members_page",n),e.commit("paginatedTeamMembers",n.data.result)}).catch(n=>{console.error("next_members_page",n)})},async SAVE_TEAM_SETTINGS(e,t){const n=e.state.teams.find(r=>r.id===t.team_id).pivot,a=Se.t("notifications.success"),i="Team settings updated";await axios.post("/teams/settings",{settings:n,all:t.all,team_id:t.team_id}).then(r=>{console.log("save_team_settings",r),r.data.success&&(fe.$vToastify.success({title:a,body:i,position:"top-right"}),t.all&&e.commit("allTeamSettings",t.team_id))}).catch(r=>{console.error("save_team_settings",r)})},async TOGGLE_LEADERBOARD_VISIBILITY(e,t){const n=Se.t("notifications.success"),a="Visibility changed";await axios.post("/teams/leaderboard/visibility",{team_id:t}).then(i=>{console.log("toggle_leaderboard_visibility",i),i.data.success&&(fe.$vToastify.success({title:n,body:a,position:"top-right"}),e.commit("toggleTeamLeaderboardVis",t))}).catch(i=>{console.error("toggle_leaderboard_visibility",i)})}},Awe={allTeamSettings(e,t){let n=[...e.teams];const a=n.find(i=>i.id===t);n.forEach(i=>{i.pivot.show_name_maps=a.pivot.show_name_maps,i.pivot.show_username_maps=a.pivot.show_username_maps,i.pivot.show_name_leaderboards=a.pivot.show_name_leaderboards,i.pivot.show_username_leaderboards=a.pivot.show_username_leaderboards}),e.teams=n},clearTeamsError(e,t){delete e.errors[t]},teamDashboardData(e,t){e.allTeams.photos_count=t.photos_count,e.allTeams.litter_count=t.litter_count,e.allTeams.members_count=t.members_count,e.geojson=t.geojson},paginatedTeamMembers(e,t){e.members=t},teamComponent(e,t){e.component_type=t},teamErrors(e,t){e.errors=t},teamsLeaderboard(e,t){e.leaderboard=t},teamMap(e,t){e.geojson=t},teamMembers(e,t){e.members.data=t},team_settings(e,t){let n=[...e.teams],a=n.find(i=>i.id===t.team_id);a.pivot[t.key]=t.v,e.teams=n},teamTypes(e,t){e.types=t},toggleTeamLeaderboardVis(e,t){let n=[...e.teams],a=n.find(i=>i.id===t);a.leaderboards=!a.leaderboards,e.teams=n},usersTeams(e,t){e.teams=t}},Dwe={allTeams:{photos_count:0,litter_count:0,members_count:0},component_type:"TeamsDashboard",errors:{},geojson:[],leaderboard:[],members:{},teams:[],types:[]},Ewe={state:Dwe,actions:Pwe,mutations:Awe},RS={admin:!1,auth:!1,countries:{},errorLogin:"",errors:{},geojson:{features:[]},helper:!1,position:0,photoPercent:0,requiredXp:0,tagPercent:0,totalPhotos:0,totalTags:0,totalUsers:0,user:{}},Owe={async CHANGE_PASSWORD(e,t){await axios.patch("/settings/details/password",{oldpassword:t.oldpassword,password:t.password,password_confirmation:t.password_confirmation}).then(n=>{console.log("change_password",n)}).catch(n=>{console.log("error.change_password",n.response.data),e.commit("errors",n.response.data.errors)})},async SEND_PASSWORD_RESET_LINK(e,t){const n=Se.t("notifications.success");fe.$vToastify.success({title:n,body:"An email will be sent with a link to reset your password if the email exists."}),await axios.post("/password/email",{email:t}).then(i=>{}).catch(i=>{})},async RESET_PASSWORD(e,t){const n=Se.t("notifications.success");await axios.post("/password/reset",t).then(a=>{console.log("reset_password",a),a.data.success&&(fe.$vToastify.success({title:n,body:a.data.message}),setTimeout(function(){No.replace("/"),No.go(0)},4e3))}).catch(a=>{console.log("error.reset_password",a.response.data),e.commit("errors",a.response.data.errors)})},async SEND_EMAIL_TO_US(e,t){const n=Se.t("notifications.success"),a="We got your email. You'll hear from us soon!";await axios.post("/contact-us",t).then(i=>{console.log("send_email_to_us",i),fe.$vToastify.success({title:n,body:a})}).catch(i=>{console.log("error.send_email_to_us",i.response.data),e.commit("errors",i.response.data.errors)})},CHECK_AUTH(e){},async DELETE_ACCOUNT(e,t){await axios.post("/settings/delete",{password:t}).then(n=>{console.log("delete_account",n)}).catch(n=>{console.log("error.delete_account",n.response.data)})},async DOWNLOAD_MY_DATA(e,t){const n=Se.t("notifications.success"),a="Your download is being processed and will be emailed to you.";await axios.get("/user/profile/download",{params:t}).then(i=>{console.log("download_my_data",i),fe.$vToastify.success({title:n,body:a,position:"top-right"})}).catch(i=>{console.error("download_my_data",i)})},async GET_CURRENT_USER(e){await axios.get("/current-user").then(t=>{console.log("get_current_user",t),e.commit("initUser",t.data),e.commit("set_default_litter_picked_up",t.data.picked_up)}).catch(t=>{console.log("error.get_current_user",t)})},async GET_COUNTRIES_FOR_FLAGS(e){await axios.get("/settings/flags/countries").then(t=>{console.log("flags_countries",t),e.commit("flags_countries",t.data)}).catch(t=>{console.log("error.flags_countries",t)})},async GET_USERS_PROFILE_DATA(e){await axios.get("/user/profile/index").then(t=>{console.log("get_users_position",t),e.commit("usersPosition",t.data)}).catch(t=>{console.error("get_users_position",t)})},async GET_USERS_PROFILE_MAP_DATA(e,t){await axios.get("/user/profile/map",{params:{period:t.period,start:t.start+" 00:00:00",end:t.end+" 23:59:59"}}).then(n=>{console.log("get_users_profile_map_data",n),e.commit("usersGeojson",n.data.geojson)}).catch(n=>{console.error("get_users_profile_map_data",n)})},async LOGIN(e,t){await axios.post("/login",{email:t.email,password:t.password}).then(n=>{console.log("login_success",n),e.commit("hideModal"),e.commit("login"),window.location.href="/upload"}).catch(n=>{console.log("error.login",n.response.data),e.commit("errorLogin",n.response.data.email)})},async LOGOUT(e){await axios.get("/logout").then(t=>{console.log("logout",t),e.commit("logout"),e.commit("resetState"),window.location.href="/"}).catch(t=>{console.log("error.logout",t)})},async SAVE_PRIVACY_SETTINGS(e){const t=Se.t("notifications.success"),n=Se.t("notifications.privacy-updated");await axios.post("/settings/privacy/update",{show_name_maps:e.state.user.show_name_maps,show_username_maps:e.state.user.show_username_maps,show_name:e.state.user.show_name,show_username:e.state.user.show_username,show_name_createdby:e.state.user.show_name_createdby,show_username_createdby:e.state.user.show_username_createdby,prevent_others_tagging_my_photos:e.state.user.prevent_others_tagging_my_photos}).then(a=>{console.log("save_privacy_settings",a),fe.$vToastify.success({title:t,body:n,position:"top-right"})}).catch(a=>{console.log("error.save_privacy_settings",a)})},async TOGGLE_EMAIL_SUBSCRIPTION(e){let t=Se.t("notifications.success"),n=Se.t("notifications.settings.subscribed"),a=Se.t("notifications.settings.unsubscribed");await axios.post("/settings/email/toggle").then(i=>{console.log("toggle_email_subscription",i),i.data.sub?fe.$vToastify.success({title:t,body:n,position:"top-right"}):fe.$vToastify.success({title:t,body:a,position:"top-right"}),e.commit("toggle_email_sub",i.data.sub)}).catch(i=>{console.log(i)})},async TOGGLE_LITTER_PICKED_UP_SETTING(e){const t=Se.t("notifications.success"),n=Se.t("notifications.litter-toggled");await axios.post("/settings/toggle").then(a=>{console.log("toggle_litter",a),a.data.message==="success"&&(e.commit("toggle_litter_picked_up",a.data.value),fe.$vToastify.success({title:t,body:n,position:"top-right"}))}).catch(a=>{console.log(a)})},async UPDATE_DETAILS(e){const t=Se.t("notifications.success"),n="Your information has been updated";await axios.post("/settings/details",{name:e.state.user.name,email:e.state.user.email,username:e.state.user.username}).then(a=>{console.log("update_details",a),fe.$vToastify.success({title:t,body:n,position:"top-right"})}).catch(a=>{console.log("error.update_details",a),e.commit("errors",a.response.data.errors)})},async UPDATE_GLOBAL_FLAG(e,t){let n=Se.t("notifications.success"),a=Se.t("notifications.settings.flag-updated");await axios.post("/settings/save-flag",{country:t}).then(i=>{console.log(i),fe.$vToastify.success({title:n,body:a,position:"top-right"})}).catch(i=>{console.log(i)})},async UPDATE_SETTINGS(e,t){let n=Se.t("notifications.success"),a=Se.t("notifications.settings-updated");await axios.patch("/settings",t).then(i=>{console.log(i),Object.keys(t).forEach(r=>{e.commit("deleteUserError",r)}),fe.$vToastify.success({title:n,body:a,position:"top-right"})}).catch(i=>{e.commit("errors",i.response.data.errors),console.log(i)})}},Mwe={user(e){return e.user}},jwe={changePrivacy(e,t){e.user[t.column]=t.v},changeUserEmail(e,t){e.user.email=t},changeUserName(e,t){e.user.name=t},changeUserUsername(e,t){e.user.username=t},decrementUsersRemainingTeams(e){e.user.remaining_teams--},deleteUserError(e,t){delete e.errors[t]},errorLogin(e,t){e.errorLogin=t},errors(e,t){e.errors=t},flags_countries(e,t){e.countries=t},initUser(e,t){e.user=t,(window.Laravel.jsPermissions.roles.includes("admin")||window.Laravel.jsPermissions.roles.includes("superadmin"))&&(e.admin=!0),window.Laravel.jsPermissions.roles.includes("helper")&&(e.helper=!0)},login(e){e.auth=!0},logout(e){e.auth=!1,e.admin=!1,e.helper=!1},incrementUsersNextLittercoinScore(e){let t=Object.assign({},e.user);t.littercoin_progress++,e.user=t},incrementLittercoinScore(e){let t=Object.assign({},e.user);t.total_littercoin++,t.littercoin_progress=0,e.user=t},usersActiveTeam(e,t){e.user.active_team=t},usersTeam(e,t){e.user.team=t},resetState(e){Object.assign(e,RS)},toggle_email_sub(e,t){e.user.emailsub=t},toggle_litter_picked_up(e,t){e.user.items_remaining=t},usersGeojson(e,t){e.geojson=t},usersPosition(e,t){e.position=t.usersPosition,e.totalUsers=t.totalUsers,e.totalPhotos=t.totalPhotos,e.totalTags=t.totalTags,e.photoPercent=Math.round(t.photoPercent*100,2),e.tagPercent=Math.round(t.tagPercent*100,2),e.requiredXp=t.requiredXp}},Iwe={},Lwe={setFilterTag(e,t){e.filterTag=t},setFilterCustomTag(e,t){e.filterCustomTag=t},setFilterDateFrom(e,t){e.filterDateFrom=t},setFilterDateTo(e,t){e.filterDateTo=t},setFilterCountry(e,t){e.filterCountry=t},setFilterPhotosPaginationAmount(e,t){e.paginationAmount=t}},Fwe={filterDateFrom:"",filterDateTo:"",filterResultString:"",filterTag:"",filterCustomTag:"",filterCountry:"all",paginationAmount:25},Rwe={state:Fwe,actions:Iwe,mutations:Lwe},Bwe=Object.assign({},RS),Nwe={state:Bwe,actions:Owe,getters:Mwe,mutations:jwe,modules:{filterPhotos:Rwe}};fe.use(nS);const BS=new nS.Store({plugins:[h2({paths:["user","litter.recentTags"]})],modules:{admin:c_e,alldata:h_e,bbox:kye,donate:Bye,citymap:xye,cleanups:Dye,community:Iye,errors:Hye,globalmap:Kye,leaderboard:Xye,locations:twe,litter:rwe,merchants:cwe,modal:hwe,payments:mwe,photos:_we,plans:Cwe,subscriber:zwe,teams:Ewe,user:Nwe}});var NS={exports:{}};(function(e,t){var n={};/** * vue-local-storage v0.6.0 * (c) 2017 Alexander Avakov * @license MIT diff --git a/public/build/assets/glify-browser-DAFS8CF1.js b/public/build/assets/glify-browser-BLn8SaeM.js similarity index 64% rename from public/build/assets/glify-browser-DAFS8CF1.js rename to public/build/assets/glify-browser-BLn8SaeM.js index 98fdb30a..7ff2649e 100644 --- a/public/build/assets/glify-browser-DAFS8CF1.js +++ b/public/build/assets/glify-browser-BLn8SaeM.js @@ -1,4 +1,4 @@ -import{g as hl}from"./app-DuS6KM7M.js";import{l as pl}from"./mapHelpers-CSfygYu3.js";L.Map.mergeOptions({smoothWheelZoom:!0,smoothSensitivity:2});L.Map.SmoothWheelZoom=L.Handler.extend({addHooks:function(){L.DomEvent.on(this._map._container,"wheel",this._onWheelScroll,this)},removeHooks:function(){L.DomEvent.off(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(Ur){this._isWheeling||this._onWheelStart(Ur),this._onWheeling(Ur)},_onWheelStart:function(Ur){var Vr=this._map;this._isWheeling=!0,this._wheelMousePosition=Vr.mouseEventToContainerPoint(Ur),this._centerPoint=Vr.getSize()._divideBy(2),this._startLatLng=Vr.containerPointToLatLng(this._centerPoint),this._wheelStartLatLng=Vr.containerPointToLatLng(this._wheelMousePosition),this._startZoom=Vr.getZoom(),this._moved=!1,this._zooming=!0,Vr._stop(),Vr._panAnim&&Vr._panAnim.stop(),this._goalZoom=Vr.getZoom(),this._prevCenter=Vr.getCenter(),this._prevZoom=Vr.getZoom(),this._zoomAnimationId=requestAnimationFrame(this._updateWheelZoom.bind(this))},_onWheeling:function(Ur){var Vr=this._map;this._goalZoom=this._goalZoom+L.DomEvent.getWheelDelta(Ur)*.003*Vr.options.smoothSensitivity,(this._goalZoomVr.getMaxZoom())&&(this._goalZoom=Vr._limitZoom(this._goalZoom)),clearTimeout(this._timeoutId),this._timeoutId=setTimeout(this._onWheelEnd.bind(this),200),L.DomEvent.preventDefault(Ur),L.DomEvent.stopPropagation(Ur)},_onWheelEnd:function(Ur){this._isWheeling=!1,cancelAnimationFrame(this._zoomAnimationId),this._map._moveEnd(!0)},_updateWheelZoom:function(){var Ur=this._map;if(!(!Ur.getCenter().equals(this._prevCenter)||Ur.getZoom()!=this._prevZoom)){this._zoom=Ur.getZoom()+(this._goalZoom-Ur.getZoom())*.3,this._zoom=Math.floor(this._zoom*100)/100;var Vr=this._wheelMousePosition.subtract(this._centerPoint);Vr.x===0&&Vr.y===0||(Ur.options.smoothWheelZoom==="center"?this._center=this._startLatLng:this._center=Ur.unproject(Ur.project(this._wheelStartLatLng,this._zoom).subtract(Vr),this._zoom),this._moved||(Ur._moveStart(!0,!1),this._moved=!0),Ur._move(this._center,this._zoom),this._prevCenter=Ur.getCenter(),this._prevZoom=Ur.getZoom(),this._zoomAnimationId=requestAnimationFrame(this._updateWheelZoom.bind(this)))}}});L.Map.addInitHook("addHandler","smoothWheelZoom",L.Map.SmoothWheelZoom);var Ea={exports:{}};/*! For license information please see glify-browser.js.LICENSE.txt */(function(Ur,Vr){(function($i,In){Ur.exports=In(pl)})(self,$i=>(()=>{var In={570:X=>{function Ar(v,_,i){i=i||2;var a,l,f,g,h,b,F,k=_&&_.length,j=k?_[0]*i:v.length,R=K(v,0,j,i,!0),$=[];if(!R||R.next===R.prev)return $;if(k&&(R=function(J,rr,_r,Y){var B,z,hr,pr=[];for(B=0,z=rr.length;B80*i){a=f=v[0],l=g=v[1];for(var O=i;Of&&(f=h),b>g&&(g=b);F=(F=Math.max(f-a,g-l))!==0?32767/F:0}return c(R,$,i,a,l,F,0),$}function K(v,_,i,a,l){var f,g;if(l===Sr(v,_,i,a)>0)for(f=_;f=_;f-=a)g=Z(f,v[f],v[f+1],g);return g&&x(g,g.next)&&(ur(g),g=g.next),g}function Or(v,_){if(!v)return v;_||(_=v);var i,a=v;do if(i=!1,a.steiner||!x(a,a.next)&&G(a.prev,a,a.next)!==0)a=a.next;else{if(ur(a),(a=_=a.prev)===a.next)break;i=!0}while(i||a!==_);return _}function c(v,_,i,a,l,f,g){if(v){!g&&f&&function(k,j,R,$){var O=k;do O.z===0&&(O.z=Rr(O.x,O.y,j,R,$)),O.prevZ=O.prev,O.nextZ=O.next,O=O.next;while(O!==k);O.prevZ.nextZ=null,O.prevZ=null,function(J){var rr,_r,Y,B,z,hr,pr,xr,vr=1;do{for(_r=J,J=null,z=null,hr=0;_r;){for(hr++,Y=_r,pr=0,rr=0;rr0||xr>0&&Y;)pr!==0&&(xr===0||!Y||_r.z<=Y.z)?(B=_r,_r=_r.nextZ,pr--):(B=Y,Y=Y.nextZ,xr--),z?z.nextZ=B:J=B,B.prevZ=z,z=B;_r=Y}z.nextZ=null,vr*=2}while(hr>1)}(O)}(v,a,l,f);for(var h,b,F=v;v.prev!==v.next;)if(h=v.prev,b=v.next,f?or(v,a,l,f):sr(v))_.push(h.i/i|0),_.push(v.i/i|0),_.push(b.i/i|0),ur(v),v=b.next,F=b.next;else if((v=b)===F){g?g===1?c(v=cr(Or(v),_,i),_,i,a,l,f,2):g===2&&Pr(v,_,i,a,l,f):c(Or(v),_,i,a,l,f,1);break}}}function sr(v){var _=v.prev,i=v,a=v.next;if(G(_,i,a)>=0)return!1;for(var l=_.x,f=i.x,g=a.x,h=_.y,b=i.y,F=a.y,k=lf?l>g?l:g:f>g?f:g,$=h>b?h>F?h:F:b>F?b:F,O=a.next;O!==_;){if(O.x>=k&&O.x<=R&&O.y>=j&&O.y<=$&&br(l,h,f,b,g,F,O.x,O.y)&&G(O.prev,O,O.next)>=0)return!1;O=O.next}return!0}function or(v,_,i,a){var l=v.prev,f=v,g=v.next;if(G(l,f,g)>=0)return!1;for(var h=l.x,b=f.x,F=g.x,k=l.y,j=f.y,R=g.y,$=hb?h>F?h:F:b>F?b:F,rr=k>j?k>R?k:R:j>R?j:R,_r=Rr($,O,_,i,a),Y=Rr(J,rr,_,i,a),B=v.prevZ,z=v.nextZ;B&&B.z>=_r&&z&&z.z<=Y;){if(B.x>=$&&B.x<=J&&B.y>=O&&B.y<=rr&&B!==l&&B!==g&&br(h,k,b,j,F,R,B.x,B.y)&&G(B.prev,B,B.next)>=0||(B=B.prevZ,z.x>=$&&z.x<=J&&z.y>=O&&z.y<=rr&&z!==l&&z!==g&&br(h,k,b,j,F,R,z.x,z.y)&&G(z.prev,z,z.next)>=0))return!1;z=z.nextZ}for(;B&&B.z>=_r;){if(B.x>=$&&B.x<=J&&B.y>=O&&B.y<=rr&&B!==l&&B!==g&&br(h,k,b,j,F,R,B.x,B.y)&&G(B.prev,B,B.next)>=0)return!1;B=B.prevZ}for(;z&&z.z<=Y;){if(z.x>=$&&z.x<=J&&z.y>=O&&z.y<=rr&&z!==l&&z!==g&&br(h,k,b,j,F,R,z.x,z.y)&&G(z.prev,z,z.next)>=0)return!1;z=z.nextZ}return!0}function cr(v,_,i){var a=v;do{var l=a.prev,f=a.next.next;!x(l,f)&&w(l,a,a.next,f)&&U(l,f)&&U(f,l)&&(_.push(l.i/i|0),_.push(a.i/i|0),_.push(f.i/i|0),ur(a),ur(a.next),a=v=f),a=a.next}while(a!==v);return Or(a)}function Pr(v,_,i,a,l,f){var g=v;do{for(var h=g.next.next;h!==g.prev;){if(g.i!==h.i&&Cr(g,h)){var b=q(g,h);return g=Or(g,g.next),b=Or(b,b.next),c(g,_,i,a,l,f,0),void c(b,_,i,a,l,f,0)}h=h.next}g=g.next}while(g!==v)}function fr(v,_){return v.x-_.x}function Er(v,_){var i=function(l,f){var g,h=f,b=l.x,F=l.y,k=-1/0;do{if(F<=h.y&&F>=h.next.y&&h.next.y!==h.y){var j=h.x+(F-h.y)*(h.next.x-h.x)/(h.next.y-h.y);if(j<=b&&j>k&&(k=j,g=h.x=h.x&&h.x>=O&&b!==h.x&&br(Fg.x||h.x===g.x&&Mr(g,h)))&&(g=h,rr=R)),h=h.next;while(h!==$);return g}(v,_);if(!i)return _;var a=q(i,v);return Or(a,a.next),Or(i,i.next)}function Mr(v,_){return G(v.prev,v,_.prev)<0&&G(_.next,v,v.next)<0}function Rr(v,_,i,a,l){return(v=1431655765&((v=858993459&((v=252645135&((v=16711935&((v=(v-i)*l|0)|v<<8))|v<<4))|v<<2))|v<<1))|(_=1431655765&((_=858993459&((_=252645135&((_=16711935&((_=(_-a)*l|0)|_<<8))|_<<4))|_<<2))|_<<1))<<1}function Tr(v){var _=v,i=v;do(_.x=(v-g)*(f-h)&&(v-g)*(a-h)>=(i-g)*(_-h)&&(i-g)*(f-h)>=(l-g)*(a-h)}function Cr(v,_){return v.next.i!==_.i&&v.prev.i!==_.i&&!function(i,a){var l=i;do{if(l.i!==i.i&&l.next.i!==i.i&&l.i!==a.i&&l.next.i!==a.i&&w(l,l.next,i,a))return!0;l=l.next}while(l!==i);return!1}(v,_)&&(U(v,_)&&U(_,v)&&function(i,a){var l=i,f=!1,g=(i.x+a.x)/2,h=(i.y+a.y)/2;do l.y>h!=l.next.y>h&&l.next.y!==l.y&&g<(l.next.x-l.x)*(h-l.y)/(l.next.y-l.y)+l.x&&(f=!f),l=l.next;while(l!==i);return f}(v,_)&&(G(v.prev,v,_.prev)||G(v,_.prev,_))||x(v,_)&&G(v.prev,v,v.next)>0&&G(_.prev,_,_.next)>0)}function G(v,_,i){return(_.y-v.y)*(i.x-_.x)-(_.x-v.x)*(i.y-_.y)}function x(v,_){return v.x===_.x&&v.y===_.y}function w(v,_,i,a){var l=N(G(v,_,i)),f=N(G(v,_,a)),g=N(G(i,a,v)),h=N(G(i,a,_));return l!==f&&g!==h||!(l!==0||!T(v,i,_))||!(f!==0||!T(v,a,_))||!(g!==0||!T(i,v,a))||!(h!==0||!T(i,_,a))}function T(v,_,i){return _.x<=Math.max(v.x,i.x)&&_.x>=Math.min(v.x,i.x)&&_.y<=Math.max(v.y,i.y)&&_.y>=Math.min(v.y,i.y)}function N(v){return v>0?1:v<0?-1:0}function U(v,_){return G(v.prev,v,v.next)<0?G(v,_,v.next)>=0&&G(v,v.prev,_)>=0:G(v,_,v.prev)<0||G(v,v.next,_)<0}function q(v,_){var i=new dr(v.i,v.x,v.y),a=new dr(_.i,_.x,_.y),l=v.next,f=_.prev;return v.next=_,_.prev=v,i.next=l,l.prev=i,a.next=i,i.prev=a,f.next=a,a.prev=f,a}function Z(v,_,i,a){var l=new dr(v,_,i);return a?(l.next=a.next,l.prev=a,a.next.prev=l,a.next=l):(l.prev=l,l.next=l),l}function ur(v){v.next.prev=v.prev,v.prev.next=v.next,v.prevZ&&(v.prevZ.nextZ=v.nextZ),v.nextZ&&(v.nextZ.prevZ=v.prevZ)}function dr(v,_,i){this.i=v,this.x=_,this.y=i,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Sr(v,_,i,a){for(var l=0,f=_,g=i-a;f0&&(a+=v[l-1].length,i.holes.push(a))}return i}},543:function(X,Ar,K){var Or;X=K.nmd(X),(function(){var c,sr="Expected a function",or="__lodash_hash_undefined__",cr="__lodash_placeholder__",Pr=32,fr=128,Er=1/0,Mr=9007199254740991,Rr=NaN,Tr=4294967295,br=[["ary",fr],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",Pr],["partialRight",64],["rearg",256]],Cr="[object Arguments]",G="[object Array]",x="[object Boolean]",w="[object Date]",T="[object Error]",N="[object Function]",U="[object GeneratorFunction]",q="[object Map]",Z="[object Number]",ur="[object Object]",dr="[object Promise]",Sr="[object RegExp]",v="[object Set]",_="[object String]",i="[object Symbol]",a="[object WeakMap]",l="[object ArrayBuffer]",f="[object DataView]",g="[object Float32Array]",h="[object Float64Array]",b="[object Int8Array]",F="[object Int16Array]",k="[object Int32Array]",j="[object Uint8Array]",R="[object Uint8ClampedArray]",$="[object Uint16Array]",O="[object Uint32Array]",J=/\b__p \+= '';/g,rr=/\b(__p \+=) '' \+/g,_r=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Y=/&(?:amp|lt|gt|quot|#39);/g,B=/[&<>"']/g,z=RegExp(Y.source),hr=RegExp(B.source),pr=/<%-([\s\S]+?)%>/g,xr=/<%([\s\S]+?)%>/g,vr=/<%=([\s\S]+?)%>/g,kr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$r=/^\w*$/,oe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yr=/[\\^$.*+?()[\]{}|]/g,ce=RegExp(yr.source),Gr=/^\s+/,At=/\s/,Ma=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Fa=/\{\n\/\* \[wrapped with (.+)\] \*/,Ca=/,? & /,ka=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ba=/[()=,{}\[\]\/\s]/,za=/\\(\\)?/g,Pa=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ji=/\w*$/,Ra=/^[-+]0x[0-9a-f]+$/i,Oa=/^0b[01]+$/i,Ia=/^\[object .+?Constructor\]$/,ja=/^0o[0-7]+$/i,Ta=/^(?:0|[1-9]\d*)$/,Za=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Yt=/($^)/,Wa=/['\n\r\u2028\u2029\\]/g,Nt="\\ud800-\\udfff",Qi="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ro="\\u2700-\\u27bf",eo="a-z\\xdf-\\xf6\\xf8-\\xff",to="A-Z\\xc0-\\xd6\\xd8-\\xde",no="\\ufe0e\\ufe0f",io="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ya="["+Nt+"]",oo="["+io+"]",Dt="["+Qi+"]",uo="\\d+",Na="["+ro+"]",ao="["+eo+"]",so="[^"+Nt+io+uo+ro+eo+to+"]",Tn="\\ud83c[\\udffb-\\udfff]",co="[^"+Nt+"]",Zn="(?:\\ud83c[\\udde6-\\uddff]){2}",Wn="[\\ud800-\\udbff][\\udc00-\\udfff]",ft="["+to+"]",lo="\\u200d",fo="(?:"+ao+"|"+so+")",Da="(?:"+ft+"|"+so+")",ho="(?:['’](?:d|ll|m|re|s|t|ve))?",po="(?:['’](?:D|LL|M|RE|S|T|VE))?",vo="(?:"+Dt+"|"+Tn+")?",go="["+no+"]?",_o=go+vo+"(?:"+lo+"(?:"+[co,Zn,Wn].join("|")+")"+go+vo+")*",Ua="(?:"+[Na,Zn,Wn].join("|")+")"+_o,Xa="(?:"+[co+Dt+"?",Dt,Zn,Wn,Ya].join("|")+")",Ka=RegExp("['’]","g"),Va=RegExp(Dt,"g"),Yn=RegExp(Tn+"(?="+Tn+")|"+Xa+_o,"g"),Ha=RegExp([ft+"?"+ao+"+"+ho+"(?="+[oo,ft,"$"].join("|")+")",Da+"+"+po+"(?="+[oo,ft+fo,"$"].join("|")+")",ft+"?"+fo+"+"+ho,ft+"+"+po,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",uo,Ua].join("|"),"g"),qa=RegExp("["+lo+Nt+Qi+no+"]"),$a=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ga=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ja=-1,Wr={};Wr[g]=Wr[h]=Wr[b]=Wr[F]=Wr[k]=Wr[j]=Wr[R]=Wr[$]=Wr[O]=!0,Wr[Cr]=Wr[G]=Wr[l]=Wr[x]=Wr[f]=Wr[w]=Wr[T]=Wr[N]=Wr[q]=Wr[Z]=Wr[ur]=Wr[Sr]=Wr[v]=Wr[_]=Wr[a]=!1;var Zr={};Zr[Cr]=Zr[G]=Zr[l]=Zr[f]=Zr[x]=Zr[w]=Zr[g]=Zr[h]=Zr[b]=Zr[F]=Zr[k]=Zr[q]=Zr[Z]=Zr[ur]=Zr[Sr]=Zr[v]=Zr[_]=Zr[i]=Zr[j]=Zr[R]=Zr[$]=Zr[O]=!0,Zr[T]=Zr[N]=Zr[a]=!1;var Qa={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},rs=parseFloat,es=parseInt,yo=typeof K.g=="object"&&K.g&&K.g.Object===Object&&K.g,ts=typeof self=="object"&&self&&self.Object===Object&&self,ne=yo||ts||Function("return this")(),mo=Ar&&!Ar.nodeType&&Ar,St=mo&&X&&!X.nodeType&&X,xo=St&&St.exports===mo,Nn=xo&&yo.process,we=function(){try{return St&&St.require&&St.require("util").types||Nn&&Nn.binding&&Nn.binding("util")}catch{}}(),wo=we&&we.isArrayBuffer,bo=we&&we.isDate,Lo=we&&we.isMap,Ao=we&&we.isRegExp,So=we&&we.isSet,Eo=we&&we.isTypedArray;function _e(m,E,C){switch(C.length){case 0:return m.call(E);case 1:return m.call(E,C[0]);case 2:return m.call(E,C[0],C[1]);case 3:return m.call(E,C[0],C[1],C[2])}return m.apply(E,C)}function ns(m,E,C,D){for(var lr=-1,Br=m==null?0:m.length;++lr-1}function Dn(m,E,C){for(var D=-1,lr=m==null?0:m.length;++D-1;);return C}function Ro(m,E){for(var C=m.length;C--&&ht(E,m[C],0)>-1;);return C}var ss=Vn({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),cs=Vn({"&":"&","<":"<",">":">",'"':""","'":"'"});function ls(m){return"\\"+Qa[m]}function pt(m){return qa.test(m)}function Gn(m){var E=-1,C=Array(m.size);return m.forEach(function(D,lr){C[++E]=[lr,D]}),C}function Oo(m,E){return function(C){return m(E(C))}}function He(m,E){for(var C=-1,D=m.length,lr=0,Br=[];++C",""":'"',"'":"'"}),Vt=function m(E){var C,D=(E=E==null?ne:Vt.defaults(ne.Object(),E,Vt.pick(ne,Ga))).Array,lr=E.Date,Br=E.Error,Jr=E.Function,ze=E.Math,Yr=E.Object,Jn=E.RegExp,ps=E.String,Le=E.TypeError,Ht=D.prototype,vs=Jr.prototype,gt=Yr.prototype,qt=E["__core-js_shared__"],$t=vs.toString,jr=gt.hasOwnProperty,gs=0,jo=(C=/[^.]+$/.exec(qt&&qt.keys&&qt.keys.IE_PROTO||""))?"Symbol(src)_1."+C:"",Gt=gt.toString,ds=$t.call(Yr),_s=ne._,ys=Jn("^"+$t.call(jr).replace(yr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Jt=xo?E.Buffer:c,qe=E.Symbol,Qt=E.Uint8Array,To=Jt?Jt.allocUnsafe:c,rn=Oo(Yr.getPrototypeOf,Yr),Zo=Yr.create,Wo=gt.propertyIsEnumerable,en=Ht.splice,Yo=qe?qe.isConcatSpreadable:c,Mt=qe?qe.iterator:c,tt=qe?qe.toStringTag:c,tn=function(){try{var r=at(Yr,"defineProperty");return r({},"",{}),r}catch{}}(),ms=E.clearTimeout!==ne.clearTimeout&&E.clearTimeout,xs=lr&&lr.now!==ne.Date.now&&lr.now,ws=E.setTimeout!==ne.setTimeout&&E.setTimeout,nn=ze.ceil,on=ze.floor,Qn=Yr.getOwnPropertySymbols,bs=Jt?Jt.isBuffer:c,No=E.isFinite,Ls=Ht.join,As=Oo(Yr.keys,Yr),Qr=ze.max,ue=ze.min,Ss=lr.now,Es=E.parseInt,Do=ze.random,Ms=Ht.reverse,ri=at(E,"DataView"),Ft=at(E,"Map"),ei=at(E,"Promise"),dt=at(E,"Set"),Ct=at(E,"WeakMap"),kt=at(Yr,"create"),un=Ct&&new Ct,_t={},Fs=st(ri),Cs=st(Ft),ks=st(ei),Bs=st(dt),zs=st(Ct),an=qe?qe.prototype:c,Bt=an?an.valueOf:c,Uo=an?an.toString:c;function u(r){if(Kr(r)&&!mr(r)&&!(r instanceof Fr)){if(r instanceof Ae)return r;if(jr.call(r,"__wrapped__"))return Xu(r)}return new Ae(r)}var yt=function(){function r(){}return function(e){if(!Xr(e))return{};if(Zo)return Zo(e);r.prototype=e;var t=new r;return r.prototype=c,t}}();function sn(){}function Ae(r,e){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=c}function Fr(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Tr,this.__views__=[]}function nt(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e=e?r:e)),r}function Se(r,e,t,n,o,s){var p,d=1&e,y=2&e,S=4&e;if(t&&(p=o?t(r,n,o,s):t(r)),p!==c)return p;if(!Xr(r))return r;var A=mr(r);if(A){if(p=function(M){var I=M.length,tr=new M.constructor(I);return I&&typeof M[0]=="string"&&jr.call(M,"index")&&(tr.index=M.index,tr.input=M.input),tr}(r),!d)return pe(r,p)}else{var P=ae(r),V=P==N||P==U;if(rt(r))return _u(r,d);if(P==ur||P==Cr||V&&!o){if(p=y||V?{}:Iu(r),!d)return y?function(M,I){return Re(M,Ru(M),I)}(r,function(M,I){return M&&Re(I,ge(I),M)}(p,r)):function(M,I){return Re(M,Ei(M),I)}(r,Vo(p,r))}else{if(!Zr[P])return o?r:{};p=function(M,I,tr){var W,gr=M.constructor;switch(I){case l:return mi(M);case x:case w:return new gr(+M);case f:return function(ar,zr){var Q=zr?mi(ar.buffer):ar.buffer;return new ar.constructor(Q,ar.byteOffset,ar.byteLength)}(M,tr);case g:case h:case b:case F:case k:case j:case R:case $:case O:return yu(M,tr);case q:return new gr;case Z:case _:return new gr(M);case Sr:return function(ar){var zr=new ar.constructor(ar.source,Ji.exec(ar));return zr.lastIndex=ar.lastIndex,zr}(M);case v:return new gr;case i:return W=M,Bt?Yr(Bt.call(W)):{}}}(r,P,d)}}s||(s=new ke);var H=s.get(r);if(H)return H;s.set(r,p),ca(r)?r.forEach(function(M){p.add(Se(M,e,t,M,r,s))}):aa(r)&&r.forEach(function(M,I){p.set(I,Se(M,e,t,I,r,s))});var er=A?c:(S?y?Li:bi:y?ge:ee)(r);return be(er||r,function(M,I){er&&(M=r[I=M]),zt(p,I,Se(M,e,t,I,r,s))}),p}function Ho(r,e,t){var n=t.length;if(r==null)return!n;for(r=Yr(r);n--;){var o=t[n],s=e[o],p=r[o];if(p===c&&!(o in r)||!s(p))return!1}return!0}function qo(r,e,t){if(typeof r!="function")throw new Le(sr);return Zt(function(){r.apply(c,t)},e)}function Pt(r,e,t,n){var o=-1,s=Ut,p=!0,d=r.length,y=[],S=e.length;if(!d)return y;t&&(e=Dr(e,ye(t))),n?(s=Dn,p=!1):e.length>=200&&(s=Et,p=!1,e=new it(e));r:for(;++o-1},je.prototype.set=function(r,e){var t=this.__data__,n=cn(t,r);return n<0?(++this.size,t.push([r,e])):t[n][1]=e,this},Te.prototype.clear=function(){this.size=0,this.__data__={hash:new nt,map:new(Ft||je),string:new nt}},Te.prototype.delete=function(r){var e=wn(this,r).delete(r);return this.size-=e?1:0,e},Te.prototype.get=function(r){return wn(this,r).get(r)},Te.prototype.has=function(r){return wn(this,r).has(r)},Te.prototype.set=function(r,e){var t=wn(this,r),n=t.size;return t.set(r,e),this.size+=t.size==n?0:1,this},it.prototype.add=it.prototype.push=function(r){return this.__data__.set(r,or),this},it.prototype.has=function(r){return this.__data__.has(r)},ke.prototype.clear=function(){this.__data__=new je,this.size=0},ke.prototype.delete=function(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t},ke.prototype.get=function(r){return this.__data__.get(r)},ke.prototype.has=function(r){return this.__data__.has(r)},ke.prototype.set=function(r,e){var t=this.__data__;if(t instanceof je){var n=t.__data__;if(!Ft||n.length<199)return n.push([r,e]),this.size=++t.size,this;t=this.__data__=new Te(n)}return t.set(r,e),this.size=t.size,this};var $e=bu(Pe),$o=bu(oi,!0);function Is(r,e){var t=!0;return $e(r,function(n,o,s){return t=!!e(n,o,s)}),t}function ln(r,e,t){for(var n=-1,o=r.length;++n0&&t(d)?e>1?ie(d,e-1,t,n,o):Ve(o,d):n||(o[o.length]=d)}return o}var ii=Lu(),Jo=Lu(!0);function Pe(r,e){return r&&ii(r,e,ee)}function oi(r,e){return r&&Jo(r,e,ee)}function fn(r,e){return Ke(e,function(t){return De(r[t])})}function ut(r,e){for(var t=0,n=(e=Je(e,r)).length;r!=null&&te}function js(r,e){return r!=null&&jr.call(r,e)}function Ts(r,e){return r!=null&&e in Yr(r)}function ai(r,e,t){for(var n=t?Dn:Ut,o=r[0].length,s=r.length,p=s,d=D(s),y=1/0,S=[];p--;){var A=r[p];p&&e&&(A=Dr(A,ye(e))),y=ue(A.length,y),d[p]=!t&&(e||o>=120&&A.length>=120)?new it(p&&A):c}A=r[0];var P=-1,V=d[0];r:for(;++P=tr?W:W*(V[H]=="desc"?-1:1)}return A.index-P.index}(y,S,t)});d--;)s[d]=s[d].value;return s}(o)}function su(r,e,t){for(var n=-1,o=e.length,s={};++n-1;)d!==r&&en.call(d,y,1),en.call(r,y,1);return r}function cu(r,e){for(var t=r?e.length:0,n=t-1;t--;){var o=e[t];if(t==n||o!==s){var s=o;Ne(o)?en.call(r,o,1):gi(r,o)}}return r}function hi(r,e){return r+on(Do()*(e-r+1))}function pi(r,e){var t="";if(!r||e<1||e>Mr)return t;do e%2&&(t+=r),(e=on(e/2))&&(r+=r);while(e);return t}function Lr(r,e){return ki(Zu(r,e,de),r+"")}function Zs(r){return Ko(Lt(r))}function Ws(r,e){var t=Lt(r);return bn(t,ot(e,0,t.length))}function It(r,e,t,n){if(!Xr(r))return r;for(var o=-1,s=(e=Je(e,r)).length,p=s-1,d=r;d!=null&&++oo?0:o+e),(t=t>o?o:t)<0&&(t+=o),o=e>t?0:t-e>>>0,e>>>=0;for(var s=D(o);++n>>1,p=r[s];p!==null&&!xe(p)&&(t?p<=e:p=200){var S=e?null:Xs(r);if(S)return Kt(S);p=!1,o=Et,y=new it}else y=e?[]:d;r:for(;++n=n?r:Ee(r,e,t)}var du=ms||function(r){return ne.clearTimeout(r)};function _u(r,e){if(e)return r.slice();var t=r.length,n=To?To(t):new r.constructor(t);return r.copy(n),n}function mi(r){var e=new r.constructor(r.byteLength);return new Qt(e).set(new Qt(r)),e}function yu(r,e){var t=e?mi(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}function mu(r,e){if(r!==e){var t=r!==c,n=r===null,o=r==r,s=xe(r),p=e!==c,d=e===null,y=e==e,S=xe(e);if(!d&&!S&&!s&&r>e||s&&p&&y&&!d&&!S||n&&p&&y||!t&&y||!o)return 1;if(!n&&!s&&!S&&r1?t[o-1]:c,p=o>2?t[2]:c;for(s=r.length>3&&typeof s=="function"?(o--,s):c,p&&fe(t[0],t[1],p)&&(s=o<3?c:s,o=1),e=Yr(e);++n-1?o[s?e[p]:p]:c}}function Eu(r){return Ye(function(e){var t=e.length,n=t,o=Ae.prototype.thru;for(r&&e.reverse();n--;){var s=e[n];if(typeof s!="function")throw new Le(sr);if(o&&!p&&xn(s)=="wrapper")var p=new Ae([],!0)}for(n=p?n:t;++n1&&W.reverse(),A&&yd))return!1;var S=s.get(r),A=s.get(e);if(S&&A)return S==e&&A==r;var P=-1,V=!0,H=2&t?new it:c;for(s.set(r,e),s.set(e,r);++P-1&&r%1==0&&r1?"& ":"")+s[d],s=s.join(p>2?", ":" "),o.replace(Ma,`{ +import{g as hl}from"./app-BwSojYvl.js";import{r as pl}from"./mapHelpers-DmBbMbJe.js";L.Map.mergeOptions({smoothWheelZoom:!0,smoothSensitivity:2});L.Map.SmoothWheelZoom=L.Handler.extend({addHooks:function(){L.DomEvent.on(this._map._container,"wheel",this._onWheelScroll,this)},removeHooks:function(){L.DomEvent.off(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(Ur){this._isWheeling||this._onWheelStart(Ur),this._onWheeling(Ur)},_onWheelStart:function(Ur){var Vr=this._map;this._isWheeling=!0,this._wheelMousePosition=Vr.mouseEventToContainerPoint(Ur),this._centerPoint=Vr.getSize()._divideBy(2),this._startLatLng=Vr.containerPointToLatLng(this._centerPoint),this._wheelStartLatLng=Vr.containerPointToLatLng(this._wheelMousePosition),this._startZoom=Vr.getZoom(),this._moved=!1,this._zooming=!0,Vr._stop(),Vr._panAnim&&Vr._panAnim.stop(),this._goalZoom=Vr.getZoom(),this._prevCenter=Vr.getCenter(),this._prevZoom=Vr.getZoom(),this._zoomAnimationId=requestAnimationFrame(this._updateWheelZoom.bind(this))},_onWheeling:function(Ur){var Vr=this._map;this._goalZoom=this._goalZoom+L.DomEvent.getWheelDelta(Ur)*.003*Vr.options.smoothSensitivity,(this._goalZoomVr.getMaxZoom())&&(this._goalZoom=Vr._limitZoom(this._goalZoom)),clearTimeout(this._timeoutId),this._timeoutId=setTimeout(this._onWheelEnd.bind(this),200),L.DomEvent.preventDefault(Ur),L.DomEvent.stopPropagation(Ur)},_onWheelEnd:function(Ur){this._isWheeling=!1,cancelAnimationFrame(this._zoomAnimationId),this._map._moveEnd(!0)},_updateWheelZoom:function(){var Ur=this._map;if(!(!Ur.getCenter().equals(this._prevCenter)||Ur.getZoom()!=this._prevZoom)){this._zoom=Ur.getZoom()+(this._goalZoom-Ur.getZoom())*.3,this._zoom=Math.floor(this._zoom*100)/100;var Vr=this._wheelMousePosition.subtract(this._centerPoint);Vr.x===0&&Vr.y===0||(Ur.options.smoothWheelZoom==="center"?this._center=this._startLatLng:this._center=Ur.unproject(Ur.project(this._wheelStartLatLng,this._zoom).subtract(Vr),this._zoom),this._moved||(Ur._moveStart(!0,!1),this._moved=!0),Ur._move(this._center,this._zoom),this._prevCenter=Ur.getCenter(),this._prevZoom=Ur.getZoom(),this._zoomAnimationId=requestAnimationFrame(this._updateWheelZoom.bind(this)))}}});L.Map.addInitHook("addHandler","smoothWheelZoom",L.Map.SmoothWheelZoom);var Ea={exports:{}};/*! For license information please see glify-browser.js.LICENSE.txt */(function(Ur,Vr){(function($i,In){Ur.exports=In(pl())})(self,$i=>(()=>{var In={570:X=>{function Ar(v,_,i){i=i||2;var a,l,f,g,h,b,F,k=_&&_.length,j=k?_[0]*i:v.length,R=K(v,0,j,i,!0),$=[];if(!R||R.next===R.prev)return $;if(k&&(R=function(J,rr,_r,Y){var B,z,hr,pr=[];for(B=0,z=rr.length;B80*i){a=f=v[0],l=g=v[1];for(var O=i;Of&&(f=h),b>g&&(g=b);F=(F=Math.max(f-a,g-l))!==0?32767/F:0}return c(R,$,i,a,l,F,0),$}function K(v,_,i,a,l){var f,g;if(l===Sr(v,_,i,a)>0)for(f=_;f=_;f-=a)g=Z(f,v[f],v[f+1],g);return g&&x(g,g.next)&&(ur(g),g=g.next),g}function Or(v,_){if(!v)return v;_||(_=v);var i,a=v;do if(i=!1,a.steiner||!x(a,a.next)&&G(a.prev,a,a.next)!==0)a=a.next;else{if(ur(a),(a=_=a.prev)===a.next)break;i=!0}while(i||a!==_);return _}function c(v,_,i,a,l,f,g){if(v){!g&&f&&function(k,j,R,$){var O=k;do O.z===0&&(O.z=Rr(O.x,O.y,j,R,$)),O.prevZ=O.prev,O.nextZ=O.next,O=O.next;while(O!==k);O.prevZ.nextZ=null,O.prevZ=null,function(J){var rr,_r,Y,B,z,hr,pr,xr,vr=1;do{for(_r=J,J=null,z=null,hr=0;_r;){for(hr++,Y=_r,pr=0,rr=0;rr0||xr>0&&Y;)pr!==0&&(xr===0||!Y||_r.z<=Y.z)?(B=_r,_r=_r.nextZ,pr--):(B=Y,Y=Y.nextZ,xr--),z?z.nextZ=B:J=B,B.prevZ=z,z=B;_r=Y}z.nextZ=null,vr*=2}while(hr>1)}(O)}(v,a,l,f);for(var h,b,F=v;v.prev!==v.next;)if(h=v.prev,b=v.next,f?or(v,a,l,f):sr(v))_.push(h.i/i|0),_.push(v.i/i|0),_.push(b.i/i|0),ur(v),v=b.next,F=b.next;else if((v=b)===F){g?g===1?c(v=cr(Or(v),_,i),_,i,a,l,f,2):g===2&&Pr(v,_,i,a,l,f):c(Or(v),_,i,a,l,f,1);break}}}function sr(v){var _=v.prev,i=v,a=v.next;if(G(_,i,a)>=0)return!1;for(var l=_.x,f=i.x,g=a.x,h=_.y,b=i.y,F=a.y,k=lf?l>g?l:g:f>g?f:g,$=h>b?h>F?h:F:b>F?b:F,O=a.next;O!==_;){if(O.x>=k&&O.x<=R&&O.y>=j&&O.y<=$&&br(l,h,f,b,g,F,O.x,O.y)&&G(O.prev,O,O.next)>=0)return!1;O=O.next}return!0}function or(v,_,i,a){var l=v.prev,f=v,g=v.next;if(G(l,f,g)>=0)return!1;for(var h=l.x,b=f.x,F=g.x,k=l.y,j=f.y,R=g.y,$=hb?h>F?h:F:b>F?b:F,rr=k>j?k>R?k:R:j>R?j:R,_r=Rr($,O,_,i,a),Y=Rr(J,rr,_,i,a),B=v.prevZ,z=v.nextZ;B&&B.z>=_r&&z&&z.z<=Y;){if(B.x>=$&&B.x<=J&&B.y>=O&&B.y<=rr&&B!==l&&B!==g&&br(h,k,b,j,F,R,B.x,B.y)&&G(B.prev,B,B.next)>=0||(B=B.prevZ,z.x>=$&&z.x<=J&&z.y>=O&&z.y<=rr&&z!==l&&z!==g&&br(h,k,b,j,F,R,z.x,z.y)&&G(z.prev,z,z.next)>=0))return!1;z=z.nextZ}for(;B&&B.z>=_r;){if(B.x>=$&&B.x<=J&&B.y>=O&&B.y<=rr&&B!==l&&B!==g&&br(h,k,b,j,F,R,B.x,B.y)&&G(B.prev,B,B.next)>=0)return!1;B=B.prevZ}for(;z&&z.z<=Y;){if(z.x>=$&&z.x<=J&&z.y>=O&&z.y<=rr&&z!==l&&z!==g&&br(h,k,b,j,F,R,z.x,z.y)&&G(z.prev,z,z.next)>=0)return!1;z=z.nextZ}return!0}function cr(v,_,i){var a=v;do{var l=a.prev,f=a.next.next;!x(l,f)&&w(l,a,a.next,f)&&U(l,f)&&U(f,l)&&(_.push(l.i/i|0),_.push(a.i/i|0),_.push(f.i/i|0),ur(a),ur(a.next),a=v=f),a=a.next}while(a!==v);return Or(a)}function Pr(v,_,i,a,l,f){var g=v;do{for(var h=g.next.next;h!==g.prev;){if(g.i!==h.i&&Cr(g,h)){var b=q(g,h);return g=Or(g,g.next),b=Or(b,b.next),c(g,_,i,a,l,f,0),void c(b,_,i,a,l,f,0)}h=h.next}g=g.next}while(g!==v)}function fr(v,_){return v.x-_.x}function Er(v,_){var i=function(l,f){var g,h=f,b=l.x,F=l.y,k=-1/0;do{if(F<=h.y&&F>=h.next.y&&h.next.y!==h.y){var j=h.x+(F-h.y)*(h.next.x-h.x)/(h.next.y-h.y);if(j<=b&&j>k&&(k=j,g=h.x=h.x&&h.x>=O&&b!==h.x&&br(Fg.x||h.x===g.x&&Mr(g,h)))&&(g=h,rr=R)),h=h.next;while(h!==$);return g}(v,_);if(!i)return _;var a=q(i,v);return Or(a,a.next),Or(i,i.next)}function Mr(v,_){return G(v.prev,v,_.prev)<0&&G(_.next,v,v.next)<0}function Rr(v,_,i,a,l){return(v=1431655765&((v=858993459&((v=252645135&((v=16711935&((v=(v-i)*l|0)|v<<8))|v<<4))|v<<2))|v<<1))|(_=1431655765&((_=858993459&((_=252645135&((_=16711935&((_=(_-a)*l|0)|_<<8))|_<<4))|_<<2))|_<<1))<<1}function Tr(v){var _=v,i=v;do(_.x=(v-g)*(f-h)&&(v-g)*(a-h)>=(i-g)*(_-h)&&(i-g)*(f-h)>=(l-g)*(a-h)}function Cr(v,_){return v.next.i!==_.i&&v.prev.i!==_.i&&!function(i,a){var l=i;do{if(l.i!==i.i&&l.next.i!==i.i&&l.i!==a.i&&l.next.i!==a.i&&w(l,l.next,i,a))return!0;l=l.next}while(l!==i);return!1}(v,_)&&(U(v,_)&&U(_,v)&&function(i,a){var l=i,f=!1,g=(i.x+a.x)/2,h=(i.y+a.y)/2;do l.y>h!=l.next.y>h&&l.next.y!==l.y&&g<(l.next.x-l.x)*(h-l.y)/(l.next.y-l.y)+l.x&&(f=!f),l=l.next;while(l!==i);return f}(v,_)&&(G(v.prev,v,_.prev)||G(v,_.prev,_))||x(v,_)&&G(v.prev,v,v.next)>0&&G(_.prev,_,_.next)>0)}function G(v,_,i){return(_.y-v.y)*(i.x-_.x)-(_.x-v.x)*(i.y-_.y)}function x(v,_){return v.x===_.x&&v.y===_.y}function w(v,_,i,a){var l=N(G(v,_,i)),f=N(G(v,_,a)),g=N(G(i,a,v)),h=N(G(i,a,_));return l!==f&&g!==h||!(l!==0||!T(v,i,_))||!(f!==0||!T(v,a,_))||!(g!==0||!T(i,v,a))||!(h!==0||!T(i,_,a))}function T(v,_,i){return _.x<=Math.max(v.x,i.x)&&_.x>=Math.min(v.x,i.x)&&_.y<=Math.max(v.y,i.y)&&_.y>=Math.min(v.y,i.y)}function N(v){return v>0?1:v<0?-1:0}function U(v,_){return G(v.prev,v,v.next)<0?G(v,_,v.next)>=0&&G(v,v.prev,_)>=0:G(v,_,v.prev)<0||G(v,v.next,_)<0}function q(v,_){var i=new dr(v.i,v.x,v.y),a=new dr(_.i,_.x,_.y),l=v.next,f=_.prev;return v.next=_,_.prev=v,i.next=l,l.prev=i,a.next=i,i.prev=a,f.next=a,a.prev=f,a}function Z(v,_,i,a){var l=new dr(v,_,i);return a?(l.next=a.next,l.prev=a,a.next.prev=l,a.next=l):(l.prev=l,l.next=l),l}function ur(v){v.next.prev=v.prev,v.prev.next=v.next,v.prevZ&&(v.prevZ.nextZ=v.nextZ),v.nextZ&&(v.nextZ.prevZ=v.prevZ)}function dr(v,_,i){this.i=v,this.x=_,this.y=i,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Sr(v,_,i,a){for(var l=0,f=_,g=i-a;f0&&(a+=v[l-1].length,i.holes.push(a))}return i}},543:function(X,Ar,K){var Or;X=K.nmd(X),(function(){var c,sr="Expected a function",or="__lodash_hash_undefined__",cr="__lodash_placeholder__",Pr=32,fr=128,Er=1/0,Mr=9007199254740991,Rr=NaN,Tr=4294967295,br=[["ary",fr],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",Pr],["partialRight",64],["rearg",256]],Cr="[object Arguments]",G="[object Array]",x="[object Boolean]",w="[object Date]",T="[object Error]",N="[object Function]",U="[object GeneratorFunction]",q="[object Map]",Z="[object Number]",ur="[object Object]",dr="[object Promise]",Sr="[object RegExp]",v="[object Set]",_="[object String]",i="[object Symbol]",a="[object WeakMap]",l="[object ArrayBuffer]",f="[object DataView]",g="[object Float32Array]",h="[object Float64Array]",b="[object Int8Array]",F="[object Int16Array]",k="[object Int32Array]",j="[object Uint8Array]",R="[object Uint8ClampedArray]",$="[object Uint16Array]",O="[object Uint32Array]",J=/\b__p \+= '';/g,rr=/\b(__p \+=) '' \+/g,_r=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Y=/&(?:amp|lt|gt|quot|#39);/g,B=/[&<>"']/g,z=RegExp(Y.source),hr=RegExp(B.source),pr=/<%-([\s\S]+?)%>/g,xr=/<%([\s\S]+?)%>/g,vr=/<%=([\s\S]+?)%>/g,kr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$r=/^\w*$/,oe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yr=/[\\^$.*+?()[\]{}|]/g,ce=RegExp(yr.source),Gr=/^\s+/,At=/\s/,Ma=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Fa=/\{\n\/\* \[wrapped with (.+)\] \*/,Ca=/,? & /,ka=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ba=/[()=,{}\[\]\/\s]/,za=/\\(\\)?/g,Pa=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ji=/\w*$/,Ra=/^[-+]0x[0-9a-f]+$/i,Oa=/^0b[01]+$/i,Ia=/^\[object .+?Constructor\]$/,ja=/^0o[0-7]+$/i,Ta=/^(?:0|[1-9]\d*)$/,Za=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Yt=/($^)/,Wa=/['\n\r\u2028\u2029\\]/g,Nt="\\ud800-\\udfff",Qi="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ro="\\u2700-\\u27bf",eo="a-z\\xdf-\\xf6\\xf8-\\xff",to="A-Z\\xc0-\\xd6\\xd8-\\xde",no="\\ufe0e\\ufe0f",io="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ya="["+Nt+"]",oo="["+io+"]",Dt="["+Qi+"]",uo="\\d+",Na="["+ro+"]",ao="["+eo+"]",so="[^"+Nt+io+uo+ro+eo+to+"]",Tn="\\ud83c[\\udffb-\\udfff]",co="[^"+Nt+"]",Zn="(?:\\ud83c[\\udde6-\\uddff]){2}",Wn="[\\ud800-\\udbff][\\udc00-\\udfff]",ft="["+to+"]",lo="\\u200d",fo="(?:"+ao+"|"+so+")",Da="(?:"+ft+"|"+so+")",ho="(?:['’](?:d|ll|m|re|s|t|ve))?",po="(?:['’](?:D|LL|M|RE|S|T|VE))?",vo="(?:"+Dt+"|"+Tn+")?",go="["+no+"]?",_o=go+vo+"(?:"+lo+"(?:"+[co,Zn,Wn].join("|")+")"+go+vo+")*",Ua="(?:"+[Na,Zn,Wn].join("|")+")"+_o,Xa="(?:"+[co+Dt+"?",Dt,Zn,Wn,Ya].join("|")+")",Ka=RegExp("['’]","g"),Va=RegExp(Dt,"g"),Yn=RegExp(Tn+"(?="+Tn+")|"+Xa+_o,"g"),Ha=RegExp([ft+"?"+ao+"+"+ho+"(?="+[oo,ft,"$"].join("|")+")",Da+"+"+po+"(?="+[oo,ft+fo,"$"].join("|")+")",ft+"?"+fo+"+"+ho,ft+"+"+po,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",uo,Ua].join("|"),"g"),qa=RegExp("["+lo+Nt+Qi+no+"]"),$a=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ga=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ja=-1,Wr={};Wr[g]=Wr[h]=Wr[b]=Wr[F]=Wr[k]=Wr[j]=Wr[R]=Wr[$]=Wr[O]=!0,Wr[Cr]=Wr[G]=Wr[l]=Wr[x]=Wr[f]=Wr[w]=Wr[T]=Wr[N]=Wr[q]=Wr[Z]=Wr[ur]=Wr[Sr]=Wr[v]=Wr[_]=Wr[a]=!1;var Zr={};Zr[Cr]=Zr[G]=Zr[l]=Zr[f]=Zr[x]=Zr[w]=Zr[g]=Zr[h]=Zr[b]=Zr[F]=Zr[k]=Zr[q]=Zr[Z]=Zr[ur]=Zr[Sr]=Zr[v]=Zr[_]=Zr[i]=Zr[j]=Zr[R]=Zr[$]=Zr[O]=!0,Zr[T]=Zr[N]=Zr[a]=!1;var Qa={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},rs=parseFloat,es=parseInt,yo=typeof K.g=="object"&&K.g&&K.g.Object===Object&&K.g,ts=typeof self=="object"&&self&&self.Object===Object&&self,ne=yo||ts||Function("return this")(),mo=Ar&&!Ar.nodeType&&Ar,St=mo&&X&&!X.nodeType&&X,xo=St&&St.exports===mo,Nn=xo&&yo.process,we=function(){try{return St&&St.require&&St.require("util").types||Nn&&Nn.binding&&Nn.binding("util")}catch{}}(),wo=we&&we.isArrayBuffer,bo=we&&we.isDate,Lo=we&&we.isMap,Ao=we&&we.isRegExp,So=we&&we.isSet,Eo=we&&we.isTypedArray;function _e(m,E,C){switch(C.length){case 0:return m.call(E);case 1:return m.call(E,C[0]);case 2:return m.call(E,C[0],C[1]);case 3:return m.call(E,C[0],C[1],C[2])}return m.apply(E,C)}function ns(m,E,C,D){for(var lr=-1,Br=m==null?0:m.length;++lr-1}function Dn(m,E,C){for(var D=-1,lr=m==null?0:m.length;++D-1;);return C}function Ro(m,E){for(var C=m.length;C--&&ht(E,m[C],0)>-1;);return C}var ss=Vn({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),cs=Vn({"&":"&","<":"<",">":">",'"':""","'":"'"});function ls(m){return"\\"+Qa[m]}function pt(m){return qa.test(m)}function Gn(m){var E=-1,C=Array(m.size);return m.forEach(function(D,lr){C[++E]=[lr,D]}),C}function Oo(m,E){return function(C){return m(E(C))}}function He(m,E){for(var C=-1,D=m.length,lr=0,Br=[];++C",""":'"',"'":"'"}),Vt=function m(E){var C,D=(E=E==null?ne:Vt.defaults(ne.Object(),E,Vt.pick(ne,Ga))).Array,lr=E.Date,Br=E.Error,Jr=E.Function,ze=E.Math,Yr=E.Object,Jn=E.RegExp,ps=E.String,Le=E.TypeError,Ht=D.prototype,vs=Jr.prototype,gt=Yr.prototype,qt=E["__core-js_shared__"],$t=vs.toString,jr=gt.hasOwnProperty,gs=0,jo=(C=/[^.]+$/.exec(qt&&qt.keys&&qt.keys.IE_PROTO||""))?"Symbol(src)_1."+C:"",Gt=gt.toString,ds=$t.call(Yr),_s=ne._,ys=Jn("^"+$t.call(jr).replace(yr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Jt=xo?E.Buffer:c,qe=E.Symbol,Qt=E.Uint8Array,To=Jt?Jt.allocUnsafe:c,rn=Oo(Yr.getPrototypeOf,Yr),Zo=Yr.create,Wo=gt.propertyIsEnumerable,en=Ht.splice,Yo=qe?qe.isConcatSpreadable:c,Mt=qe?qe.iterator:c,tt=qe?qe.toStringTag:c,tn=function(){try{var r=at(Yr,"defineProperty");return r({},"",{}),r}catch{}}(),ms=E.clearTimeout!==ne.clearTimeout&&E.clearTimeout,xs=lr&&lr.now!==ne.Date.now&&lr.now,ws=E.setTimeout!==ne.setTimeout&&E.setTimeout,nn=ze.ceil,on=ze.floor,Qn=Yr.getOwnPropertySymbols,bs=Jt?Jt.isBuffer:c,No=E.isFinite,Ls=Ht.join,As=Oo(Yr.keys,Yr),Qr=ze.max,ue=ze.min,Ss=lr.now,Es=E.parseInt,Do=ze.random,Ms=Ht.reverse,ri=at(E,"DataView"),Ft=at(E,"Map"),ei=at(E,"Promise"),dt=at(E,"Set"),Ct=at(E,"WeakMap"),kt=at(Yr,"create"),un=Ct&&new Ct,_t={},Fs=st(ri),Cs=st(Ft),ks=st(ei),Bs=st(dt),zs=st(Ct),an=qe?qe.prototype:c,Bt=an?an.valueOf:c,Uo=an?an.toString:c;function u(r){if(Kr(r)&&!mr(r)&&!(r instanceof Fr)){if(r instanceof Ae)return r;if(jr.call(r,"__wrapped__"))return Xu(r)}return new Ae(r)}var yt=function(){function r(){}return function(e){if(!Xr(e))return{};if(Zo)return Zo(e);r.prototype=e;var t=new r;return r.prototype=c,t}}();function sn(){}function Ae(r,e){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=c}function Fr(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Tr,this.__views__=[]}function nt(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e=e?r:e)),r}function Se(r,e,t,n,o,s){var p,d=1&e,y=2&e,S=4&e;if(t&&(p=o?t(r,n,o,s):t(r)),p!==c)return p;if(!Xr(r))return r;var A=mr(r);if(A){if(p=function(M){var I=M.length,tr=new M.constructor(I);return I&&typeof M[0]=="string"&&jr.call(M,"index")&&(tr.index=M.index,tr.input=M.input),tr}(r),!d)return pe(r,p)}else{var P=ae(r),V=P==N||P==U;if(rt(r))return _u(r,d);if(P==ur||P==Cr||V&&!o){if(p=y||V?{}:Iu(r),!d)return y?function(M,I){return Re(M,Ru(M),I)}(r,function(M,I){return M&&Re(I,ge(I),M)}(p,r)):function(M,I){return Re(M,Ei(M),I)}(r,Vo(p,r))}else{if(!Zr[P])return o?r:{};p=function(M,I,tr){var W,gr=M.constructor;switch(I){case l:return mi(M);case x:case w:return new gr(+M);case f:return function(ar,zr){var Q=zr?mi(ar.buffer):ar.buffer;return new ar.constructor(Q,ar.byteOffset,ar.byteLength)}(M,tr);case g:case h:case b:case F:case k:case j:case R:case $:case O:return yu(M,tr);case q:return new gr;case Z:case _:return new gr(M);case Sr:return function(ar){var zr=new ar.constructor(ar.source,Ji.exec(ar));return zr.lastIndex=ar.lastIndex,zr}(M);case v:return new gr;case i:return W=M,Bt?Yr(Bt.call(W)):{}}}(r,P,d)}}s||(s=new ke);var H=s.get(r);if(H)return H;s.set(r,p),ca(r)?r.forEach(function(M){p.add(Se(M,e,t,M,r,s))}):aa(r)&&r.forEach(function(M,I){p.set(I,Se(M,e,t,I,r,s))});var er=A?c:(S?y?Li:bi:y?ge:ee)(r);return be(er||r,function(M,I){er&&(M=r[I=M]),zt(p,I,Se(M,e,t,I,r,s))}),p}function Ho(r,e,t){var n=t.length;if(r==null)return!n;for(r=Yr(r);n--;){var o=t[n],s=e[o],p=r[o];if(p===c&&!(o in r)||!s(p))return!1}return!0}function qo(r,e,t){if(typeof r!="function")throw new Le(sr);return Zt(function(){r.apply(c,t)},e)}function Pt(r,e,t,n){var o=-1,s=Ut,p=!0,d=r.length,y=[],S=e.length;if(!d)return y;t&&(e=Dr(e,ye(t))),n?(s=Dn,p=!1):e.length>=200&&(s=Et,p=!1,e=new it(e));r:for(;++o-1},je.prototype.set=function(r,e){var t=this.__data__,n=cn(t,r);return n<0?(++this.size,t.push([r,e])):t[n][1]=e,this},Te.prototype.clear=function(){this.size=0,this.__data__={hash:new nt,map:new(Ft||je),string:new nt}},Te.prototype.delete=function(r){var e=wn(this,r).delete(r);return this.size-=e?1:0,e},Te.prototype.get=function(r){return wn(this,r).get(r)},Te.prototype.has=function(r){return wn(this,r).has(r)},Te.prototype.set=function(r,e){var t=wn(this,r),n=t.size;return t.set(r,e),this.size+=t.size==n?0:1,this},it.prototype.add=it.prototype.push=function(r){return this.__data__.set(r,or),this},it.prototype.has=function(r){return this.__data__.has(r)},ke.prototype.clear=function(){this.__data__=new je,this.size=0},ke.prototype.delete=function(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t},ke.prototype.get=function(r){return this.__data__.get(r)},ke.prototype.has=function(r){return this.__data__.has(r)},ke.prototype.set=function(r,e){var t=this.__data__;if(t instanceof je){var n=t.__data__;if(!Ft||n.length<199)return n.push([r,e]),this.size=++t.size,this;t=this.__data__=new Te(n)}return t.set(r,e),this.size=t.size,this};var $e=bu(Pe),$o=bu(oi,!0);function Is(r,e){var t=!0;return $e(r,function(n,o,s){return t=!!e(n,o,s)}),t}function ln(r,e,t){for(var n=-1,o=r.length;++n0&&t(d)?e>1?ie(d,e-1,t,n,o):Ve(o,d):n||(o[o.length]=d)}return o}var ii=Lu(),Jo=Lu(!0);function Pe(r,e){return r&&ii(r,e,ee)}function oi(r,e){return r&&Jo(r,e,ee)}function fn(r,e){return Ke(e,function(t){return De(r[t])})}function ut(r,e){for(var t=0,n=(e=Je(e,r)).length;r!=null&&te}function js(r,e){return r!=null&&jr.call(r,e)}function Ts(r,e){return r!=null&&e in Yr(r)}function ai(r,e,t){for(var n=t?Dn:Ut,o=r[0].length,s=r.length,p=s,d=D(s),y=1/0,S=[];p--;){var A=r[p];p&&e&&(A=Dr(A,ye(e))),y=ue(A.length,y),d[p]=!t&&(e||o>=120&&A.length>=120)?new it(p&&A):c}A=r[0];var P=-1,V=d[0];r:for(;++P=tr?W:W*(V[H]=="desc"?-1:1)}return A.index-P.index}(y,S,t)});d--;)s[d]=s[d].value;return s}(o)}function su(r,e,t){for(var n=-1,o=e.length,s={};++n-1;)d!==r&&en.call(d,y,1),en.call(r,y,1);return r}function cu(r,e){for(var t=r?e.length:0,n=t-1;t--;){var o=e[t];if(t==n||o!==s){var s=o;Ne(o)?en.call(r,o,1):gi(r,o)}}return r}function hi(r,e){return r+on(Do()*(e-r+1))}function pi(r,e){var t="";if(!r||e<1||e>Mr)return t;do e%2&&(t+=r),(e=on(e/2))&&(r+=r);while(e);return t}function Lr(r,e){return ki(Zu(r,e,de),r+"")}function Zs(r){return Ko(Lt(r))}function Ws(r,e){var t=Lt(r);return bn(t,ot(e,0,t.length))}function It(r,e,t,n){if(!Xr(r))return r;for(var o=-1,s=(e=Je(e,r)).length,p=s-1,d=r;d!=null&&++oo?0:o+e),(t=t>o?o:t)<0&&(t+=o),o=e>t?0:t-e>>>0,e>>>=0;for(var s=D(o);++n>>1,p=r[s];p!==null&&!xe(p)&&(t?p<=e:p=200){var S=e?null:Xs(r);if(S)return Kt(S);p=!1,o=Et,y=new it}else y=e?[]:d;r:for(;++n=n?r:Ee(r,e,t)}var du=ms||function(r){return ne.clearTimeout(r)};function _u(r,e){if(e)return r.slice();var t=r.length,n=To?To(t):new r.constructor(t);return r.copy(n),n}function mi(r){var e=new r.constructor(r.byteLength);return new Qt(e).set(new Qt(r)),e}function yu(r,e){var t=e?mi(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}function mu(r,e){if(r!==e){var t=r!==c,n=r===null,o=r==r,s=xe(r),p=e!==c,d=e===null,y=e==e,S=xe(e);if(!d&&!S&&!s&&r>e||s&&p&&y&&!d&&!S||n&&p&&y||!t&&y||!o)return 1;if(!n&&!s&&!S&&r1?t[o-1]:c,p=o>2?t[2]:c;for(s=r.length>3&&typeof s=="function"?(o--,s):c,p&&fe(t[0],t[1],p)&&(s=o<3?c:s,o=1),e=Yr(e);++n-1?o[s?e[p]:p]:c}}function Eu(r){return Ye(function(e){var t=e.length,n=t,o=Ae.prototype.thru;for(r&&e.reverse();n--;){var s=e[n];if(typeof s!="function")throw new Le(sr);if(o&&!p&&xn(s)=="wrapper")var p=new Ae([],!0)}for(n=p?n:t;++n1&&W.reverse(),A&&yd))return!1;var S=s.get(r),A=s.get(e);if(S&&A)return S==e&&A==r;var P=-1,V=!0,H=2&t?new it:c;for(s.set(r,e),s.set(e,r);++P-1&&r%1==0&&r1?"& ":"")+s[d],s=s.join(p>2?", ":" "),o.replace(Ma,`{ /* [wrapped with `+s+`] */ `)}(n,function(o,s){return be(br,function(p){var d="_."+p[0];s&p[1]&&!Ut(o,d)&&o.push(d)}),o.sort()}(function(o){var s=o.match(Fa);return s?s[1].split(Ca):[]}(n),t)))}function Du(r){var e=0,t=0;return function(){var n=Ss(),o=16-(n-t);if(t=n,o>0){if(++e>=800)return arguments[0]}else e=0;return r.apply(c,arguments)}}function bn(r,e){var t=-1,n=r.length,o=n-1;for(e=e===c?n:e;++t1?r[e-1]:c;return t=typeof t=="function"?(r.pop(),t):c,Gu(r,t)});function Ju(r){var e=u(r);return e.__chain__=!0,e}function Ln(r,e){return e(r)}var hc=Ye(function(r){var e=r.length,t=e?r[0]:0,n=this.__wrapped__,o=function(s){return ni(s,r)};return!(e>1||this.__actions__.length)&&n instanceof Fr&&Ne(t)?((n=n.slice(t,+t+(e?1:0))).__actions__.push({func:Ln,args:[o],thisArg:c}),new Ae(n,this.__chain__).thru(function(s){return e&&!s.length&&s.push(c),s})):this.thru(o)}),pc=gn(function(r,e,t){jr.call(r,t)?++r[t]:Ze(r,t,1)}),vc=Su(Ku),gc=Su(Vu);function Qu(r,e){return(mr(r)?be:$e)(r,nr(e,3))}function ra(r,e){return(mr(r)?is:$o)(r,nr(e,3))}var dc=gn(function(r,e,t){jr.call(r,t)?r[t].push(e):Ze(r,t,[e])}),_c=Lr(function(r,e,t){var n=-1,o=typeof e=="function",s=ve(r)?D(r.length):[];return $e(r,function(p){s[++n]=o?_e(e,p,t):Rt(p,e,t)}),s}),yc=gn(function(r,e,t){Ze(r,t,e)});function An(r,e){return(mr(r)?Dr:nu)(r,nr(e,3))}var mc=gn(function(r,e,t){r[t?0:1].push(e)},function(){return[[],[]]}),xc=Lr(function(r,e){if(r==null)return[];var t=e.length;return t>1&&fe(r,e[0],e[1])?e=[]:t>2&&fe(e[0],e[1],e[2])&&(e=[e[0]]),au(r,ie(e,1),[])}),Sn=xs||function(){return ne.Date.now()};function ea(r,e,t){return e=t?c:e,e=r&&e==null?r.length:e,We(r,fr,c,c,c,c,e)}function ta(r,e){var t;if(typeof e!="function")throw new Le(sr);return r=wr(r),function(){return--r>0&&(t=e.apply(this,arguments)),r<=1&&(e=c),t}}var Oi=Lr(function(r,e,t){var n=1;if(t.length){var o=He(t,wt(Oi));n|=Pr}return We(r,n,e,t,o)}),na=Lr(function(r,e,t){var n=3;if(t.length){var o=He(t,wt(na));n|=Pr}return We(e,n,r,t,o)});function ia(r,e,t){var n,o,s,p,d,y,S=0,A=!1,P=!1,V=!0;if(typeof r!="function")throw new Le(sr);function H(W){var gr=n,ar=o;return n=o=c,S=W,p=r.apply(ar,gr)}function er(W){var gr=W-y;return y===c||gr>=e||gr<0||P&&W-S>=s}function M(){var W=Sn();if(er(W))return I(W);d=Zt(M,function(gr){var ar=e-(gr-y);return P?ue(ar,s-(gr-S)):ar}(W))}function I(W){return d=c,V&&n?H(W):(n=o=c,p)}function tr(){var W=Sn(),gr=er(W);if(n=arguments,o=this,y=W,gr){if(d===c)return function(ar){return S=ar,d=Zt(M,e),A?H(ar):p}(y);if(P)return du(d),d=Zt(M,e),H(y)}return d===c&&(d=Zt(M,e)),p}return e=Fe(e)||0,Xr(t)&&(A=!!t.leading,s=(P="maxWait"in t)?Qr(Fe(t.maxWait)||0,e):s,V="trailing"in t?!!t.trailing:V),tr.cancel=function(){d!==c&&du(d),S=0,n=y=o=d=c},tr.flush=function(){return d===c?p:I(Sn())},tr}var wc=Lr(function(r,e){return qo(r,1,e)}),bc=Lr(function(r,e,t){return qo(r,Fe(e)||0,t)});function En(r,e){if(typeof r!="function"||e!=null&&typeof e!="function")throw new Le(sr);var t=function(){var n=arguments,o=e?e.apply(this,n):n[0],s=t.cache;if(s.has(o))return s.get(o);var p=r.apply(this,n);return t.cache=s.set(o,p)||s,p};return t.cache=new(En.Cache||Te),t}function Mn(r){if(typeof r!="function")throw new Le(sr);return function(){var e=arguments;switch(e.length){case 0:return!r.call(this);case 1:return!r.call(this,e[0]);case 2:return!r.call(this,e[0],e[1]);case 3:return!r.call(this,e[0],e[1],e[2])}return!r.apply(this,e)}}En.Cache=Te;var Lc=Us(function(r,e){var t=(e=e.length==1&&mr(e[0])?Dr(e[0],ye(nr())):Dr(ie(e,1),ye(nr()))).length;return Lr(function(n){for(var o=-1,s=ue(n.length,t);++o=e}),ct=ru(function(){return arguments}())?ru:function(r){return Kr(r)&&jr.call(r,"callee")&&!Wo.call(r,"callee")},mr=D.isArray,Mc=wo?ye(wo):function(r){return Kr(r)&&le(r)==l};function ve(r){return r!=null&&Fn(r.length)&&!De(r)}function Hr(r){return Kr(r)&&ve(r)}var rt=bs||Vi,Fc=bo?ye(bo):function(r){return Kr(r)&&le(r)==w};function ji(r){if(!Kr(r))return!1;var e=le(r);return e==T||e=="[object DOMException]"||typeof r.message=="string"&&typeof r.name=="string"&&!Wt(r)}function De(r){if(!Xr(r))return!1;var e=le(r);return e==N||e==U||e=="[object AsyncFunction]"||e=="[object Proxy]"}function ua(r){return typeof r=="number"&&r==wr(r)}function Fn(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Mr}function Xr(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}function Kr(r){return r!=null&&typeof r=="object"}var aa=Lo?ye(Lo):function(r){return Kr(r)&&ae(r)==q};function sa(r){return typeof r=="number"||Kr(r)&&le(r)==Z}function Wt(r){if(!Kr(r)||le(r)!=ur)return!1;var e=rn(r);if(e===null)return!0;var t=jr.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&$t.call(t)==ds}var Ti=Ao?ye(Ao):function(r){return Kr(r)&&le(r)==Sr},ca=So?ye(So):function(r){return Kr(r)&&ae(r)==v};function Cn(r){return typeof r=="string"||!mr(r)&&Kr(r)&&le(r)==_}function xe(r){return typeof r=="symbol"||Kr(r)&&le(r)==i}var bt=Eo?ye(Eo):function(r){return Kr(r)&&Fn(r.length)&&!!Wr[le(r)]},Cc=mn(li),kc=mn(function(r,e){return r<=e});function la(r){if(!r)return[];if(ve(r))return Cn(r)?Ce(r):pe(r);if(Mt&&r[Mt])return function(t){for(var n,o=[];!(n=t.next()).done;)o.push(n.value);return o}(r[Mt]());var e=ae(r);return(e==q?Gn:e==v?Kt:Lt)(r)}function Ue(r){return r?(r=Fe(r))===Er||r===-1/0?17976931348623157e292*(r<0?-1:1):r==r?r:0:r===0?r:0}function wr(r){var e=Ue(r),t=e%1;return e==e?t?e-t:e:0}function fa(r){return r?ot(wr(r),0,Tr):0}function Fe(r){if(typeof r=="number")return r;if(xe(r))return Rr;if(Xr(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=Xr(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=zo(r);var t=Oa.test(r);return t||ja.test(r)?es(r.slice(2),t?2:8):Ra.test(r)?Rr:+r}function ha(r){return Re(r,ge(r))}function Ir(r){return r==null?"":me(r)}var Bc=mt(function(r,e){if(Tt(e)||ve(e))Re(e,ee(e),r);else for(var t in e)jr.call(e,t)&&zt(r,t,e[t])}),pa=mt(function(r,e){Re(e,ge(e),r)}),kn=mt(function(r,e,t,n){Re(e,ge(e),r,n)}),zc=mt(function(r,e,t,n){Re(e,ee(e),r,n)}),Pc=Ye(ni),Rc=Lr(function(r,e){r=Yr(r);var t=-1,n=e.length,o=n>2?e[2]:c;for(o&&fe(e[0],e[1],o)&&(n=1);++t1),s}),Re(r,Li(r),t),n&&(t=Se(t,7,Ks));for(var o=e.length;o--;)gi(t,e[o]);return t}),Yc=Ye(function(r,e){return r==null?{}:function(t,n){return su(t,n,function(o,s){return Wi(t,s)})}(r,e)});function ga(r,e){if(r==null)return{};var t=Dr(Li(r),function(n){return[n]});return e=nr(e),su(r,t,function(n,o){return e(n,o[0])})}var da=ku(ee),_a=ku(ge);function Lt(r){return r==null?[]:$n(r,ee(r))}var Nc=xt(function(r,e,t){return e=e.toLowerCase(),r+(t?ya(e):e)});function ya(r){return Yi(Ir(r).toLowerCase())}function ma(r){return(r=Ir(r))&&r.replace(Za,ss).replace(Va,"")}var Dc=xt(function(r,e,t){return r+(t?"-":"")+e.toLowerCase()}),Uc=xt(function(r,e,t){return r+(t?" ":"")+e.toLowerCase()}),Xc=Au("toLowerCase"),Kc=xt(function(r,e,t){return r+(t?"_":"")+e.toLowerCase()}),Vc=xt(function(r,e,t){return r+(t?" ":"")+Yi(e)}),Hc=xt(function(r,e,t){return r+(t?" ":"")+e.toUpperCase()}),Yi=Au("toUpperCase");function xa(r,e,t){return r=Ir(r),(e=t?c:e)===c?function(n){return $a.test(n)}(r)?function(n){return n.match(Ha)||[]}(r):function(n){return n.match(ka)||[]}(r):r.match(e)||[]}var wa=Lr(function(r,e){try{return _e(r,c,e)}catch(t){return ji(t)?t:new Br(t)}}),qc=Ye(function(r,e){return be(e,function(t){t=Oe(t),Ze(r,t,Oi(r[t],r))}),r});function Ni(r){return function(){return r}}var $c=Eu(),Gc=Eu(!0);function de(r){return r}function Di(r){return tu(typeof r=="function"?r:Se(r,1))}var Jc=Lr(function(r,e){return function(t){return Rt(t,r,e)}}),Qc=Lr(function(r,e){return function(t){return Rt(r,t,e)}});function Ui(r,e,t){var n=ee(e),o=fn(e,n);t!=null||Xr(e)&&(o.length||!n.length)||(t=e,e=r,r=this,o=fn(e,ee(e)));var s=!(Xr(t)&&"chain"in t&&!t.chain),p=De(r);return be(o,function(d){var y=e[d];r[d]=y,p&&(r.prototype[d]=function(){var S=this.__chain__;if(s||S){var A=r(this.__wrapped__);return(A.__actions__=pe(this.__actions__)).push({func:y,args:arguments,thisArg:r}),A.__chain__=S,A}return y.apply(r,Ve([this.value()],arguments))})}),r}function Xi(){}var rl=xi(Dr),el=xi(Mo),tl=xi(Xn);function ba(r){return Mi(r)?Kn(Oe(r)):function(e){return function(t){return ut(t,e)}}(r)}var nl=Fu(),il=Fu(!0);function Ki(){return[]}function Vi(){return!1}var Hi,ol=_n(function(r,e){return r+e},0),ul=wi("ceil"),al=_n(function(r,e){return r/e},1),sl=wi("floor"),cl=_n(function(r,e){return r*e},1),ll=wi("round"),fl=_n(function(r,e){return r-e},0);return u.after=function(r,e){if(typeof e!="function")throw new Le(sr);return r=wr(r),function(){if(--r<1)return e.apply(this,arguments)}},u.ary=ea,u.assign=Bc,u.assignIn=pa,u.assignInWith=kn,u.assignWith=zc,u.at=Pc,u.before=ta,u.bind=Oi,u.bindAll=qc,u.bindKey=na,u.castArray=function(){if(!arguments.length)return[];var r=arguments[0];return mr(r)?r:[r]},u.chain=Ju,u.chunk=function(r,e,t){e=(t?fe(r,e,t):e===c)?1:Qr(wr(e),0);var n=r==null?0:r.length;if(!n||e<1)return[];for(var o=0,s=0,p=D(nn(n/e));oS?0:S+d),(y=y===c||y>S?S:wr(y))<0&&(y+=S),y=d>y?0:fa(y);d>>0)?(r=Ir(r))&&(typeof e=="string"||e!=null&&!Ti(e))&&!(e=me(e))&&pt(r)?Qe(Ce(r),0,t):r.split(e,t):[]},u.spread=function(r,e){if(typeof r!="function")throw new Le(sr);return e=e==null?0:Qr(wr(e),0),Lr(function(t){var n=t[e],o=Qe(t,0,e);return n&&Ve(o,n),_e(r,this,o)})},u.tail=function(r){var e=r==null?0:r.length;return e?Ee(r,1,e):[]},u.take=function(r,e,t){return r&&r.length?Ee(r,0,(e=t||e===c?1:wr(e))<0?0:e):[]},u.takeRight=function(r,e,t){var n=r==null?0:r.length;return n?Ee(r,(e=n-(e=t||e===c?1:wr(e)))<0?0:e,n):[]},u.takeRightWhile=function(r,e){return r&&r.length?vn(r,nr(e,3),!1,!0):[]},u.takeWhile=function(r,e){return r&&r.length?vn(r,nr(e,3)):[]},u.tap=function(r,e){return e(r),r},u.throttle=function(r,e,t){var n=!0,o=!0;if(typeof r!="function")throw new Le(sr);return Xr(t)&&(n="leading"in t?!!t.leading:n,o="trailing"in t?!!t.trailing:o),ia(r,e,{leading:n,maxWait:e,trailing:o})},u.thru=Ln,u.toArray=la,u.toPairs=da,u.toPairsIn=_a,u.toPath=function(r){return mr(r)?Dr(r,Oe):xe(r)?[r]:pe(Uu(Ir(r)))},u.toPlainObject=ha,u.transform=function(r,e,t){var n=mr(r),o=n||rt(r)||bt(r);if(e=nr(e,4),t==null){var s=r&&r.constructor;t=o?n?new s:[]:Xr(r)&&De(s)?yt(rn(r)):{}}return(o?be:Pe)(r,function(p,d,y){return e(t,p,d,y)}),t},u.unary=function(r){return ea(r,1)},u.union=nc,u.unionBy=ic,u.unionWith=oc,u.uniq=function(r){return r&&r.length?Ge(r):[]},u.uniqBy=function(r,e){return r&&r.length?Ge(r,nr(e,2)):[]},u.uniqWith=function(r,e){return e=typeof e=="function"?e:c,r&&r.length?Ge(r,c,e):[]},u.unset=function(r,e){return r==null||gi(r,e)},u.unzip=Ri,u.unzipWith=Gu,u.update=function(r,e,t){return r==null?r:pu(r,e,yi(t))},u.updateWith=function(r,e,t,n){return n=typeof n=="function"?n:c,r==null?r:pu(r,e,yi(t),n)},u.values=Lt,u.valuesIn=function(r){return r==null?[]:$n(r,ge(r))},u.without=uc,u.words=xa,u.wrap=function(r,e){return Ii(yi(e),r)},u.xor=ac,u.xorBy=sc,u.xorWith=cc,u.zip=lc,u.zipObject=function(r,e){return gu(r||[],e||[],zt)},u.zipObjectDeep=function(r,e){return gu(r||[],e||[],It)},u.zipWith=fc,u.entries=da,u.entriesIn=_a,u.extend=pa,u.extendWith=kn,Ui(u,u),u.add=ol,u.attempt=wa,u.camelCase=Nc,u.capitalize=ya,u.ceil=ul,u.clamp=function(r,e,t){return t===c&&(t=e,e=c),t!==c&&(t=(t=Fe(t))==t?t:0),e!==c&&(e=(e=Fe(e))==e?e:0),ot(Fe(r),e,t)},u.clone=function(r){return Se(r,4)},u.cloneDeep=function(r){return Se(r,5)},u.cloneDeepWith=function(r,e){return Se(r,5,e=typeof e=="function"?e:c)},u.cloneWith=function(r,e){return Se(r,4,e=typeof e=="function"?e:c)},u.conformsTo=function(r,e){return e==null||Ho(r,e,ee(e))},u.deburr=ma,u.defaultTo=function(r,e){return r==null||r!=r?e:r},u.divide=al,u.endsWith=function(r,e,t){r=Ir(r),e=me(e);var n=r.length,o=t=t===c?n:ot(wr(t),0,n);return(t-=e.length)>=0&&r.slice(t,o)==e},u.eq=Be,u.escape=function(r){return(r=Ir(r))&&hr.test(r)?r.replace(B,cs):r},u.escapeRegExp=function(r){return(r=Ir(r))&&ce.test(r)?r.replace(yr,"\\$&"):r},u.every=function(r,e,t){var n=mr(r)?Mo:Is;return t&&fe(r,e,t)&&(e=c),n(r,nr(e,3))},u.find=vc,u.findIndex=Ku,u.findKey=function(r,e){return Fo(r,nr(e,3),Pe)},u.findLast=gc,u.findLastIndex=Vu,u.findLastKey=function(r,e){return Fo(r,nr(e,3),oi)},u.floor=sl,u.forEach=Qu,u.forEachRight=ra,u.forIn=function(r,e){return r==null?r:ii(r,nr(e,3),ge)},u.forInRight=function(r,e){return r==null?r:Jo(r,nr(e,3),ge)},u.forOwn=function(r,e){return r&&Pe(r,nr(e,3))},u.forOwnRight=function(r,e){return r&&oi(r,nr(e,3))},u.get=Zi,u.gt=Sc,u.gte=Ec,u.has=function(r,e){return r!=null&&Ou(r,e,js)},u.hasIn=Wi,u.head=qu,u.identity=de,u.includes=function(r,e,t,n){r=ve(r)?r:Lt(r),t=t&&!n?wr(t):0;var o=r.length;return t<0&&(t=Qr(o+t,0)),Cn(r)?t<=o&&r.indexOf(e,t)>-1:!!o&&ht(r,e,t)>-1},u.indexOf=function(r,e,t){var n=r==null?0:r.length;if(!n)return-1;var o=t==null?0:wr(t);return o<0&&(o=Qr(n+o,0)),ht(r,e,o)},u.inRange=function(r,e,t){return e=Ue(e),t===c?(t=e,e=0):t=Ue(t),function(n,o,s){return n>=ue(o,s)&&n=-9007199254740991&&r<=Mr},u.isSet=ca,u.isString=Cn,u.isSymbol=xe,u.isTypedArray=bt,u.isUndefined=function(r){return r===c},u.isWeakMap=function(r){return Kr(r)&&ae(r)==a},u.isWeakSet=function(r){return Kr(r)&&le(r)=="[object WeakSet]"},u.join=function(r,e){return r==null?"":Ls.call(r,e)},u.kebabCase=Dc,u.last=Me,u.lastIndexOf=function(r,e,t){var n=r==null?0:r.length;if(!n)return-1;var o=n;return t!==c&&(o=(o=wr(t))<0?Qr(n+o,0):ue(o,n-1)),e==e?function(s,p,d){for(var y=d+1;y--;)if(s[y]===p)return y;return y}(r,e,o):Xt(r,Co,o,!0)},u.lowerCase=Uc,u.lowerFirst=Xc,u.lt=Cc,u.lte=kc,u.max=function(r){return r&&r.length?ln(r,de,ui):c},u.maxBy=function(r,e){return r&&r.length?ln(r,nr(e,2),ui):c},u.mean=function(r){return ko(r,de)},u.meanBy=function(r,e){return ko(r,nr(e,2))},u.min=function(r){return r&&r.length?ln(r,de,li):c},u.minBy=function(r,e){return r&&r.length?ln(r,nr(e,2),li):c},u.stubArray=Ki,u.stubFalse=Vi,u.stubObject=function(){return{}},u.stubString=function(){return""},u.stubTrue=function(){return!0},u.multiply=cl,u.nth=function(r,e){return r&&r.length?uu(r,wr(e)):c},u.noConflict=function(){return ne._===this&&(ne._=_s),this},u.noop=Xi,u.now=Sn,u.pad=function(r,e,t){r=Ir(r);var n=(e=wr(e))?vt(r):0;if(!e||n>=e)return r;var o=(e-n)/2;return yn(on(o),t)+r+yn(nn(o),t)},u.padEnd=function(r,e,t){r=Ir(r);var n=(e=wr(e))?vt(r):0;return e&&ne){var n=r;r=e,e=n}if(t||r%1||e%1){var o=Do();return ue(r+o*(e-r+rs("1e-"+((o+"").length-1))),e)}return hi(r,e)},u.reduce=function(r,e,t){var n=mr(r)?Un:Bo,o=arguments.length<3;return n(r,nr(e,4),t,o,$e)},u.reduceRight=function(r,e,t){var n=mr(r)?os:Bo,o=arguments.length<3;return n(r,nr(e,4),t,o,$o)},u.repeat=function(r,e,t){return e=(t?fe(r,e,t):e===c)?1:wr(e),pi(Ir(r),e)},u.replace=function(){var r=arguments,e=Ir(r[0]);return r.length<3?e:e.replace(r[1],r[2])},u.result=function(r,e,t){var n=-1,o=(e=Je(e,r)).length;for(o||(o=1,r=c);++n0&&(t[a]==1?s[a]=t[a]+" "+_[a]:s[a]=t[a]+" "+i[a]);return s.join(" ").trim().replace(/[ ]{2,}/g," ")};function n(m,_){var i=_||!1,e=[2,3,4,5,7,8,9],s=[0,0,0,0,0,0,0],t=[0,12,4,7,24,60,60],a;if(m=m.toUpperCase(),m){if(typeof m!="string")throw new Error("Invalid iso8601 period string '"+m+"'")}else return s;if(a=/^P((\d+Y)?(\d+M)?(\d+W)?(\d+D)?)?(T(\d+H)?(\d+M)?(\d+S)?)?$/.exec(m))for(var r=0;r0;r--)s[r]>=t[r]&&(s[r-1]=s[r-1]+Math.floor(s[r]/t[r]),s[r]=s[r]%t[r]);return s}return d})}(c)),c.exports}(function(f,d){(function(n,m){f.exports=n(T,b())})(function(n,m){if(typeof _>"u")var _={iso8601:m};return n.TimeDimension=(n.Layer||n.Class).extend({includes:n.Evented||n.Mixin.Events,initialize:function(i){n.setOptions(this,i),this._availableTimes=this._generateAvailableTimes(),this._currentTimeIndex=-1,this._loadingTimeIndex=-1,this._loadingTimeout=this.options.loadingTimeout||3e3,this._syncedLayers=[],this._availableTimes.length>0&&this.setCurrentTime(this.options.currentTime||this._getDefaultCurrentTime()),this.options.lowerLimitTime&&this.setLowerLimit(this.options.lowerLimitTime),this.options.upperLimitTime&&this.setUpperLimit(this.options.upperLimitTime)},getAvailableTimes:function(){return this._availableTimes},getCurrentTimeIndex:function(){return this._currentTimeIndex===-1?this._availableTimes.length-1:this._currentTimeIndex},getCurrentTime:function(){var i=-1;return this._loadingTimeIndex!==-1?i=this._loadingTimeIndex:i=this.getCurrentTimeIndex(),i>=0?this._availableTimes[i]:null},isLoading:function(){return this._loadingTimeIndex!==-1},setCurrentTimeIndex:function(i){var e=this._upperLimit||this._availableTimes.length-1,s=this._lowerLimit||0;if(i=Math.min(Math.max(s,i),e),!(i<0)){this._loadingTimeIndex=i;var t=this._availableTimes[i];this._checkSyncedLayersReady(this._availableTimes[this._loadingTimeIndex])?this._newTimeIndexLoaded():(this.fire("timeloading",{time:t}),setTimeout((function(a){a==this._loadingTimeIndex&&this._newTimeIndexLoaded()}).bind(this,i),this._loadingTimeout))}},_newTimeIndexLoaded:function(){if(this._loadingTimeIndex!==-1){var i=this._availableTimes[this._loadingTimeIndex];this._currentTimeIndex=this._loadingTimeIndex,this.fire("timeload",{time:i}),this._loadingTimeIndex=-1}},_checkSyncedLayersReady:function(i){for(var e=0,s=this._syncedLayers.length;e-1&&(s=this._loadingTimeIndex),s=s+i,s>t&&(e?s=a:s=t),s-1&&(t=this._loadingTimeIndex);for(var r=0,o=this._syncedLayers.length;r0;){if(t=t+i,t>h)if(s)t=u;else break;if(t-1&&(t=this._loadingTimeIndex);for(var a=e,r=0,o=this._upperLimit||this._availableTimes.length-1,l=this._lowerLimit||0;a>0;){if(t=t+i,t>o)if(s)t=l;else{a=0,r=e;break}if(t0&&e--,e},setAvailableTimes:function(i,e){var s=this.getCurrentTime(),t=this.getLowerLimit(),a=this.getUpperLimit();if(e=="extremes"){var r=this.options.period||"P1D";this._availableTimes=n.TimeDimension.Util.explodeTimeRange(new Date(i[0]),new Date(i[i.length-1]),r)}else{var o=n.TimeDimension.Util.parseTimesExpression(i);if(this._availableTimes.length===0)this._availableTimes=o;else if(e=="intersect")this._availableTimes=n.TimeDimension.Util.intersect_arrays(o,this._availableTimes);else if(e=="union")this._availableTimes=n.TimeDimension.Util.union_arrays(o,this._availableTimes);else if(e=="replace")this._availableTimes=o;else throw"Merge available times mode not implemented: "+e}t&&this.setLowerLimit(t),a&&this.setUpperLimit(a),this.setCurrentTime(s),this.fire("availabletimeschanged",{availableTimes:this._availableTimes,currentTime:s})},getLowerLimit:function(){return this._availableTimes[this.getLowerLimitIndex()]},getUpperLimit:function(){return this._availableTimes[this.getUpperLimitIndex()]},setLowerLimit:function(i){var e=this._seekNearestTimeIndex(i);this.setLowerLimitIndex(e)},setUpperLimit:function(i){var e=this._seekNearestTimeIndex(i);this.setUpperLimitIndex(e)},setLowerLimitIndex:function(i){this._lowerLimit=Math.min(Math.max(i||0,0),this._upperLimit||this._availableTimes.length-1),this.fire("limitschanged",{lowerLimit:this._lowerLimit,upperLimit:this._upperLimit})},setUpperLimitIndex:function(i){this._upperLimit=Math.max(Math.min(i,this._availableTimes.length-1),this._lowerLimit||0),this.fire("limitschanged",{lowerLimit:this._lowerLimit,upperLimit:this._upperLimit})},getLowerLimitIndex:function(){return this._lowerLimit},getUpperLimitIndex:function(){return this._upperLimit}}),n.Map.addInitHook(function(){this.options.timeDimension&&(this.timeDimension=n.timeDimension(this.options.timeDimensionOptions||{}))}),n.timeDimension=function(i){return new n.TimeDimension(i)},n.TimeDimension.Util={getTimeDuration:function(i){if(typeof _>"u")throw"iso8601-js-period library is required for Leatlet.TimeDimension: https://github.com/nezasa/iso8601-js-period";return _.iso8601.Period.parse(i,!0)},addTimeDuration:function(i,e,s){typeof s>"u"&&(s=!0),(typeof e=="string"||e instanceof String)&&(e=this.getTimeDuration(e));var t=e.length,a=s?"getUTC":"get",r=s?"setUTC":"set";t>0&&e[0]!=0&&i[r+"FullYear"](i[a+"FullYear"]()+e[0]),t>1&&e[1]!=0&&i[r+"Month"](i[a+"Month"]()+e[1]),t>2&&e[2]!=0&&i[r+"Date"](i[a+"Date"]()+e[2]*7),t>3&&e[3]!=0&&i[r+"Date"](i[a+"Date"]()+e[3]),t>4&&e[4]!=0&&i[r+"Hours"](i[a+"Hours"]()+e[4]),t>5&&e[5]!=0&&i[r+"Minutes"](i[a+"Minutes"]()+e[5]),t>6&&e[6]!=0&&i[r+"Seconds"](i[a+"Seconds"]()+e[6])},subtractTimeDuration:function(i,e,s){(typeof e=="string"||e instanceof String)&&(e=this.getTimeDuration(e));for(var t=[],a=0,r=e.length;a2&&s[2].length?s[2]:"P1D";return e!=null&&(r=e),this.explodeTimeRange(t,a,r)},explodeTimeRange:function(i,e,s,t){var a=this.getTimeDuration(s),r=[],o=new Date(i.getTime()),l=null,h=null,u=null,g=null;if(t!==void 0){var p=t.split("/");l=p[0].split(":")[0],h=p[0].split(":")[1],u=p[1].split(":")[0],g=p[1].split(":")[1]}for(;o=l&&o.getUTCHours()<=u)&&(o.getUTCHours()!=l||o.getUTCMinutes()>=h)&&(o.getUTCHours()!=u||o.getUTCMinutes()<=g)&&r.push(o.getTime()),this.addTimeDuration(o,a);return o>=e&&r.push(e.getTime()),r},parseTimeInterval:function(i){var e=i.split("/");if(e.length!=2)throw"Incorrect ISO9601 TimeInterval: "+i;var s=Date.parse(e[0]),t=null,a=null;return isNaN(s)?(a=this.getTimeDuration(e[0]),t=Date.parse(e[1]),s=new Date(t),this.subtractTimeDuration(s,a,!0),t=new Date(t)):(t=Date.parse(e[1]),isNaN(t)?(a=this.getTimeDuration(e[1]),t=new Date(s),this.addTimeDuration(t,a,!0)):t=new Date(t),s=new Date(s)),[s,t]},parseTimesExpression:function(i,e){var s=[];if(!i)return s;if(typeof i=="string"||i instanceof String)for(var t=i.split(","),a,r,o=0,l=t.length;o0&&t.length>0;)s[0]t[0]||a.push(s.shift()),t.shift());return a},union_arrays:function(i,e){for(var s=i.slice(0),t=e.slice(0),a=[];s.length>0&&t.length>0;)s[0]t[0]?a.push(t.shift()):(a.push(s.shift()),t.shift());return s.length>0?a=a.concat(s):t.length>0&&(a=a.concat(t)),a},sort_and_deduplicate:function(i){i=i.slice(0).sort();for(var e=[],s=null,t=0,a=i.length;t-1){var o=a-e;o>0&&(r=s.splice(0,o),this._removeLayers(r))}if(i>-1){a=s.indexOf(t);var o=s.length-a-i-1;o>0&&(r=s.splice(a+i+1,o),this._removeLayers(r))}},_showLayer:function(i,e){this._currentLayer&&this._currentLayer!==i&&this._currentLayer.hide(),i.show(),!(this._currentLayer&&this._currentLayer===i)&&(this._currentLayer=i,this._currentTime=e,this._evictCachedTimes(this._timeCacheForward,this._timeCacheBackward))},_getLayerForTime:function(i){if(i==0||i==this._defaultTime||i==null)return this._baseLayer;if(this._layers.hasOwnProperty(i))return this._layers[i];var e=this._getNearestTime(i);if(this._layers.hasOwnProperty(e))return this._layers[e];var s=this._createLayerForTime(e);return this._layers[i]=s,s.on("load",(function(t,a){t.setLoaded(!0),this._layers[a]||(this._layers[a]=t),this._timeDimension&&a==this._timeDimension.getCurrentTime()&&!this._timeDimension.isLoading()&&this._showLayer(t,a),this.fire("timeload",{time:a})}).bind(this,s,i)),s.onAdd=(function(t){Object.getPrototypeOf(this).onAdd.call(this,t),this.hide()}).bind(s),s},_createLayerForTime:function(i){var e=this._baseLayer.options;return e.time=new Date(i).toISOString(),new this._baseLayer.constructor(this._baseLayer.getURL(),e)},_getLoadedTimes:function(){var i=[];for(var e in this._layers)this._layers.hasOwnProperty(e)&&i.push(e);return i.sort(function(s,t){return s-t})},_removeLayers:function(i){for(var e=0,s=i.length;ethis._timeCacheForward&&(this._timeCacheForward=i)},_requestTimeDimensionFromCapabilities:function(){if(!this._capabilitiesRequested){this._capabilitiesRequested=!0;var i=this._getCapabilitiesUrl();this._proxy&&(i=this._proxy+"?url="+encodeURIComponent(i));var e=new XMLHttpRequest;e.addEventListener("load",(function(s){var t=s.currentTarget.responseXML;t!==null&&(this._defaultTime=Date.parse(this._getDefaultTimeFromCapabilities(t)),this._setDefaultTime=this._setDefaultTime||this._timeDimension&&this._timeDimension.getAvailableTimes().length==0,this.setAvailableTimes(this._parseTimeDimensionFromCapabilities(t)),this._setDefaultTime&&this._timeDimension&&this._timeDimension.setCurrentTime(this._defaultTime))}).bind(this)),e.overrideMimeType("application/xml"),e.open("GET",i),e.send()}},_getCapabilitiesUrl:function(){var i=this._baseLayer.getURL();this._getCapabilitiesAlternateUrl&&(i=this._getCapabilitiesAlternateUrl);var e=n.extend({},this._getCapabilitiesParams,{request:"GetCapabilities",service:"WMS",version:this._wmsVersion});return i=i+n.Util.getParamString(e,i,e.uppercase),i},_parseTimeDimensionFromCapabilities:function(i){var e=i.querySelectorAll('Layer[queryable="1"]'),s=this._baseLayer.wmsParams.layers,t=null,a=null;return e.forEach(function(r){r.querySelector("Name").innerHTML===s&&(t=r)}),t&&(a=this._getTimesFromLayerCapabilities(t),a||(a=this._getTimesFromLayerCapabilities(t.parentNode))),a},_getTimesFromLayerCapabilities:function(i){for(var e=null,s=i.children,t=0,a=s.length;t0&&this._timeDimension.setCurrentTime(this._defaultTime))},_getNearestTime:function(i){if(this._layers.hasOwnProperty(i)||this._availableTimes.length==0)return i;for(var e=0,s=this._availableTimes.length;e0&&e--,i!=this._availableTimes[e],this._availableTimes[e]}}),n.NonTiledLayer||(n.NonTiledLayer=(n.Layer||n.Class).extend({})),n.NonTiledLayer.include({_visible:!0,_loaded:!1,_originalUpdate:n.NonTiledLayer.prototype._update,_originalOnRemove:n.NonTiledLayer.prototype.onRemove,_update:function(){!this._visible&&this._loaded||this._originalUpdate()},onRemove:function(i){this._loaded=!1,this._originalOnRemove(i)},setLoaded:function(i){this._loaded=i},isLoaded:function(){return this._loaded},hide:function(){this._visible=!1,this._div.style.display="none"},show:function(){this._visible=!0,this._div.style.display="block"},getURL:function(){return this._wmsUrl}}),n.TileLayer.include({_visible:!0,_loaded:!1,_originalUpdate:n.TileLayer.prototype._update,_update:function(){!this._visible&&this._loaded||this._originalUpdate()},setLoaded:function(i){this._loaded=i},isLoaded:function(){return this._loaded},hide:function(){this._visible=!1,this._container&&(this._container.style.display="none")},show:function(){this._visible=!0,this._container&&(this._container.style.display="block")},getURL:function(){return this._url}}),n.timeDimension.layer.wms=function(i,e){return new n.TimeDimension.Layer.WMS(i,e)},n.TimeDimension.Layer.GeoJson=n.TimeDimension.Layer.extend({initialize:function(i,e){n.TimeDimension.Layer.prototype.initialize.call(this,i,e),this._updateTimeDimension=this.options.updateTimeDimension||!1,this._updateTimeDimensionMode=this.options.updateTimeDimensionMode||"extremes",this._duration=this.options.duration||null,this._addlastPoint=this.options.addlastPoint||!1,this._waitForReady=this.options.waitForReady||!1,this._defaultTime=0,this._availableTimes=[],this._loaded=!1,this._baseLayer.getLayers().length==0?this._waitForReady?this._baseLayer.on("ready",this._onReadyBaseLayer,this):this._loaded=!0:(this._loaded=!0,this._setAvailableTimes()),this._baseLayer.on("layeradd",(function(){this._loaded&&this._setAvailableTimes()}).bind(this))},onAdd:function(i){n.TimeDimension.Layer.prototype.onAdd.call(this,i),this._loaded&&this._setAvailableTimes()},eachLayer:function(i,e){return this._currentLayer&&i.call(e,this._currentLayer),n.TimeDimension.Layer.prototype.eachLayer.call(this,i,e)},isReady:function(i){return this._loaded},_update:function(){if(this._map&&this._loaded){this._timeDimension.getCurrentTime();var i=this._timeDimension.getCurrentTime(),e=0;if(this._duration){var s=new Date(i);n.TimeDimension.Util.subtractTimeDuration(s,this._duration,!0),e=s.getTime()}for(var t=n.geoJson(null,this._baseLayer.options),a=this._baseLayer.getLayers(),r=0,o=a.length;r0)){var h=l.properties;h.last=!0,t.addData({type:"Feature",properties:h,geometry:{type:"Point",coordinates:l.geometry.coordinates[l.geometry.coordinates.length-1]}})}}this._currentLayer&&this._map.removeLayer(this._currentLayer),t.getLayers().length&&(t.addTo(this._map),this._currentLayer=t)}},_setAvailableTimes:function(){for(var i=[],e=this._baseLayer.getLayers(),s=0,t=e.length;ss||t[o-1]e){for(var l=0;le&&(a=l),t[l]>s){r=l;break}}a===null&&(a=0),r===null&&(r=o);var h=[];return i.geometry.coordinates[0].length?h=i.geometry.coordinates.slice(a,r):h=i.geometry.coordinates,{type:"Feature",properties:i.properties,geometry:{type:i.geometry.type,coordinates:h}}},_onReadyBaseLayer:function(){this._loaded=!0,this._setAvailableTimes(),this._update()}}),n.timeDimension.layer.geoJson=function(i,e){return new n.TimeDimension.Layer.GeoJson(i,e)},n.TimeDimension.Player=(n.Layer||n.Class).extend({includes:n.Evented||n.Mixin.Events,initialize:function(i,e){n.setOptions(this,i),this._timeDimension=e,this._paused=!1,this._buffer=this.options.buffer||5,this._minBufferReady=this.options.minBufferReady||1,this._waitingForBuffer=!1,this._loop=this.options.loop||!1,this._steps=1,this._timeDimension.on("timeload",(function(s){this.release(),this._waitingForBuffer=!1}).bind(this)),this.setTransitionTime(this.options.transitionTime||1e3),this._timeDimension.on("limitschanged availabletimeschanged timeload",(function(s){this._timeDimension.prepareNextTimes(this._steps,this._minBufferReady,this._loop)}).bind(this))},_tick:function(){var i=this._getMaxIndex(),e=this._timeDimension.getCurrentTimeIndex()>=i&&this._steps>0,s=this._timeDimension.getCurrentTimeIndex()==0&&this._steps<0;if((e||s)&&!this._loop){this.pause(),this.stop(),this.fire("animationfinished");return}if(!this._paused){var t=0,a=this._bufferSize;if(this._minBufferReady>0){if(t=this._timeDimension.getNumberNextTimesReady(this._steps,a,this._loop),this._waitingForBuffer)if(t0&&this._timeDimension.prepareNextTimes(this._steps,a,this._loop)}},_getMaxIndex:function(){return Math.min(this._timeDimension.getAvailableTimes().length-1,this._timeDimension.getUpperLimitIndex()||1/0)},start:function(i){this._intervalID||(this._steps=i||1,this._waitingForBuffer=!1,this.options.startOver&&this._timeDimension.getCurrentTimeIndex()===this._getMaxIndex()&&this._timeDimension.setCurrentTimeIndex(this._timeDimension.getLowerLimitIndex()||0),this.release(),this._intervalID=window.setInterval(n.bind(this._tick,this),this._transitionTime),this._tick(),this.fire("play"),this.fire("running"))},stop:function(){this._intervalID&&(clearInterval(this._intervalID),this._intervalID=null,this._waitingForBuffer=!1,this.fire("stop"))},pause:function(){this._paused=!0},release:function(){this._paused=!1},getTransitionTime:function(){return this._transitionTime},isPlaying:function(){return!!this._intervalID},isWaiting:function(){return this._waitingForBuffer},isLooped:function(){return this._loop},setLooped:function(i){this._loop=i,this.fire("loopchange",{loop:i})},setTransitionTime:function(i){this._transitionTime=i,typeof this._buffer=="function"?this._bufferSize=this._buffer.call(this,this._transitionTime,this._minBufferReady,this._loop):this._bufferSize=this._buffer,this._intervalID&&(this.stop(),this.start(this._steps)),this.fire("speedchange",{transitionTime:i,buffer:this._bufferSize})},getSteps:function(){return this._steps}}),n.UI=n.ui=n.UI||{},n.UI.Knob=n.Draggable.extend({options:{className:"knob",step:1,rangeMin:0,rangeMax:10},initialize:function(i,e){n.setOptions(this,e),this._element=n.DomUtil.create("div",this.options.className||"knob",i),n.Draggable.prototype.initialize.call(this,this._element,this._element),this._container=i,this.on("predrag",function(){this._newPos.y=0,this._newPos.x=this._adjustX(this._newPos.x)},this),this.on("dragstart",function(){n.DomUtil.addClass(i,"dragging")}),this.on("dragend",function(){n.DomUtil.removeClass(i,"dragging")}),n.DomEvent.on(this._element,"dblclick",function(s){this.fire("dblclick",s)},this),n.DomEvent.disableClickPropagation(this._element),this.enable()},_getProjectionCoef:function(){return(this.options.rangeMax-this.options.rangeMin)/(this._container.offsetWidth||this._container.style.width)},_update:function(){this.setPosition(n.DomUtil.getPosition(this._element).x)},_adjustX:function(i){var e=this._toValue(i)||this.getMinValue();return this._toX(this._adjustValue(e))},_adjustValue:function(i){return i=Math.max(this.getMinValue(),Math.min(this.getMaxValue(),i)),i=i-this.options.rangeMin,i=Math.round(i/this.options.step)*this.options.step,i=i+this.options.rangeMin,i=Math.round(i*100)/100,i},_toX:function(i){var e=(i-this.options.rangeMin)/this._getProjectionCoef();return e},_toValue:function(i){var e=i*this._getProjectionCoef()+this.options.rangeMin;return e},getMinValue:function(){return this.options.minValue||this.options.rangeMin},getMaxValue:function(){return this.options.maxValue||this.options.rangeMax},setStep:function(i){this.options.step=i,this._update()},setPosition:function(i){n.DomUtil.setPosition(this._element,n.point(this._adjustX(i),0)),this.fire("positionchanged")},getPosition:function(){return n.DomUtil.getPosition(this._element).x},setValue:function(i){this.setPosition(this._toX(i))},getValue:function(){return this._adjustValue(this._toValue(this.getPosition()))}}),n.Control.TimeDimension=n.Control.extend({options:{styleNS:"leaflet-control-timecontrol",position:"bottomleft",title:"Time Control",backwardButton:!0,forwardButton:!0,playButton:!0,playReverseButton:!1,loopButton:!1,displayDate:!0,timeSlider:!0,timeSliderDragUpdate:!1,limitSliders:!1,limitMinimumRange:5,speedSlider:!0,minSpeed:.1,maxSpeed:10,speedStep:.1,timeSteps:1,autoPlay:!1,playerOptions:{transitionTime:1e3},timeZones:["UTC","Local"]},initialize:function(i){n.setOptions(i),n.Control.prototype.initialize.call(this,i),this._timeZoneIndex=0,this._timeDimension=this.options.timeDimension||null},onAdd:function(i){var e;return this._map=i,!this._timeDimension&&i.timeDimension&&(this._timeDimension=i.timeDimension),this._initPlayer(),e=n.DomUtil.create("div","leaflet-bar leaflet-bar-horizontal leaflet-bar-timecontrol"),this.options.backwardButton&&(this._buttonBackward=this._createButton("Backward",e)),this.options.playReverseButton&&(this._buttonPlayReversePause=this._createButton("Play Reverse",e)),this.options.playButton&&(this._buttonPlayPause=this._createButton("Play",e)),this.options.forwardButton&&(this._buttonForward=this._createButton("Forward",e)),this.options.loopButton&&(this._buttonLoop=this._createButton("Loop",e)),this.options.displayDate&&(this._displayDate=this._createButton("Date",e)),this.options.timeSlider&&(this._sliderTime=this._createSliderTime(this.options.styleNS+" timecontrol-slider timecontrol-dateslider",e)),this.options.speedSlider&&(this._sliderSpeed=this._createSliderSpeed(this.options.styleNS+" timecontrol-slider timecontrol-speed",e)),this._steps=this.options.timeSteps||1,this._timeDimension.on("timeload",this._update,this),this._timeDimension.on("timeload",this._onPlayerStateChange,this),this._timeDimension.on("timeloading",this._onTimeLoading,this),this._timeDimension.on("limitschanged availabletimeschanged",this._onTimeLimitsChanged,this),n.DomEvent.disableClickPropagation(e),e},addTo:function(){return n.Control.prototype.addTo.apply(this,arguments),this._onPlayerStateChange(),this._onTimeLimitsChanged(),this._update(),this},onRemove:function(){this._player.off("play stop running loopchange speedchange",this._onPlayerStateChange,this),this._player.off("waiting",this._onPlayerWaiting,this),this._timeDimension.off("timeload",this._update,this),this._timeDimension.off("timeload",this._onPlayerStateChange,this),this._timeDimension.off("timeloading",this._onTimeLoading,this),this._timeDimension.off("limitschanged availabletimeschanged",this._onTimeLimitsChanged,this)},_initPlayer:function(){this._player||(this.options.player?this._player=this.options.player:this._player=new n.TimeDimension.Player(this.options.playerOptions,this._timeDimension)),this.options.autoPlay&&this._player.start(this._steps),this._player.on("play stop running loopchange speedchange",this._onPlayerStateChange,this),this._player.on("waiting",this._onPlayerWaiting,this),this._onPlayerStateChange()},_onTimeLoading:function(i){i.time==this._timeDimension.getCurrentTime()&&this._displayDate&&n.DomUtil.addClass(this._displayDate,"loading")},_onTimeLimitsChanged:function(){var i=this._timeDimension.getLowerLimitIndex(),e=this._timeDimension.getUpperLimitIndex(),s=this._timeDimension.getAvailableTimes().length-1;this._limitKnobs&&(this._limitKnobs[0].options.rangeMax=s,this._limitKnobs[1].options.rangeMax=s,this._limitKnobs[0].setValue(i||0),this._limitKnobs[1].setValue(e||s)),this._sliderTime&&(this._sliderTime.options.rangeMax=s,this._sliderTime._update())},_onPlayerWaiting:function(i){this._buttonPlayPause&&this._player.getSteps()>0&&(n.DomUtil.addClass(this._buttonPlayPause,"loading"),this._buttonPlayPause.innerHTML=this._getDisplayLoadingText(i.available,i.buffer)),this._buttonPlayReversePause&&this._player.getSteps()<0&&(n.DomUtil.addClass(this._buttonPlayReversePause,"loading"),this._buttonPlayReversePause.innerHTML=this._getDisplayLoadingText(i.available,i.buffer))},_onPlayerStateChange:function(){if(this._buttonPlayPause&&(this._player.isPlaying()&&this._player.getSteps()>0?(n.DomUtil.addClass(this._buttonPlayPause,"pause"),n.DomUtil.removeClass(this._buttonPlayPause,"play")):(n.DomUtil.removeClass(this._buttonPlayPause,"pause"),n.DomUtil.addClass(this._buttonPlayPause,"play")),this._player.isWaiting()&&this._player.getSteps()>0?n.DomUtil.addClass(this._buttonPlayPause,"loading"):(this._buttonPlayPause.innerHTML="",n.DomUtil.removeClass(this._buttonPlayPause,"loading"))),this._buttonPlayReversePause&&(this._player.isPlaying()&&this._player.getSteps()<0?n.DomUtil.addClass(this._buttonPlayReversePause,"pause"):n.DomUtil.removeClass(this._buttonPlayReversePause,"pause"),this._player.isWaiting()&&this._player.getSteps()<0?n.DomUtil.addClass(this._buttonPlayReversePause,"loading"):(this._buttonPlayReversePause.innerHTML="",n.DomUtil.removeClass(this._buttonPlayReversePause,"loading"))),this._buttonLoop&&(this._player.isLooped()?n.DomUtil.addClass(this._buttonLoop,"looped"):n.DomUtil.removeClass(this._buttonLoop,"looped")),this._sliderSpeed&&!this._draggingSpeed){var i=this._player.getTransitionTime()||1e3;i=Math.round(1e4/i)/10,this._sliderSpeed.setValue(i)}},_update:function(){if(this._timeDimension)if(this._timeDimension.getCurrentTimeIndex()>=0){var i=new Date(this._timeDimension.getCurrentTime());this._displayDate&&(n.DomUtil.removeClass(this._displayDate,"loading"),this._displayDate.innerHTML=this._getDisplayDateFormat(i)),this._sliderTime&&!this._slidingTimeSlider&&this._sliderTime.setValue(this._timeDimension.getCurrentTimeIndex())}else this._displayDate&&(this._displayDate.innerHTML=this._getDisplayNoTimeError())},_createButton:function(i,e){var s=n.DomUtil.create("a",this.options.styleNS+" timecontrol-"+i.toLowerCase(),e);return s.href="#",s.title=i,n.DomEvent.addListener(s,"click",n.DomEvent.stopPropagation).addListener(s,"click",n.DomEvent.preventDefault).addListener(s,"click",this["_button"+i.replace(/ /i,"")+"Clicked"],this),s},_createSliderTime:function(i,e){var s,t,a,r,o;return s=n.DomUtil.create("div",i,e),t=n.DomUtil.create("div","slider",s),a=this._timeDimension.getAvailableTimes().length-1,this.options.limitSliders&&(o=this._limitKnobs=this._createLimitKnobs(t)),r=new n.UI.Knob(t,{className:"knob main",rangeMin:0,rangeMax:a}),r.on("dragend",function(l){var h=l.target.getValue();this._sliderTimeValueChanged(h),this._slidingTimeSlider=!1},this),r.on("drag",function(l){this._slidingTimeSlider=!0;var h=this._timeDimension.getAvailableTimes()[l.target.getValue()];if(h){var u=new Date(h);this._displayDate&&(this._displayDate.innerHTML=this._getDisplayDateFormat(u)),this.options.timeSliderDragUpdate&&this._sliderTimeValueChanged(l.target.getValue())}},this),r.on("predrag",function(){var l,h;o&&(l=o[0].getPosition(),h=o[1].getPosition(),this._newPos.xh&&(this._newPos.x=h))},r),n.DomEvent.on(t,"click",function(l){if(!n.DomUtil.hasClass(l.target,"knob")){var h=l.touches&&l.touches.length===1?l.touches[0]:l,u=n.DomEvent.getMousePosition(h,t).x;o?o[0].getPosition()<=u&&u<=o[1].getPosition()&&(r.setPosition(u),this._sliderTimeValueChanged(r.getValue())):(r.setPosition(u),this._sliderTimeValueChanged(r.getValue()))}},this),r.setPosition(0),r},_createLimitKnobs:function(i){n.DomUtil.addClass(i,"has-limits");var e=this._timeDimension.getAvailableTimes().length-1,s=n.DomUtil.create("div","range",i),t=new n.UI.Knob(i,{className:"knob lower",rangeMin:0,rangeMax:e}),a=new n.UI.Knob(i,{className:"knob upper",rangeMin:0,rangeMax:e});return n.DomUtil.setPosition(s,0),t.setPosition(0),a.setPosition(e),t.on("dragend",function(r){var o=r.target.getValue();this._sliderLimitsValueChanged(o,a.getValue())},this),a.on("dragend",function(r){var o=r.target.getValue();this._sliderLimitsValueChanged(t.getValue(),o)},this),t.on("drag positionchanged",function(){n.DomUtil.setPosition(s,n.point(t.getPosition(),0)),s.style.width=a.getPosition()-t.getPosition()+"px"},this),a.on("drag positionchanged",function(){s.style.width=a.getPosition()-t.getPosition()+"px"},this),a.on("predrag",function(){var r=t._toX(t.getValue()+this.options.limitMinimumRange);a._newPos.x<=r&&(a._newPos.x=r)},this),t.on("predrag",function(){var r=a._toX(a.getValue()-this.options.limitMinimumRange);t._newPos.x>=r&&(t._newPos.x=r)},this),t.on("dblclick",function(){this._timeDimension.setLowerLimitIndex(0)},this),a.on("dblclick",function(){this._timeDimension.setUpperLimitIndex(this._timeDimension.getAvailableTimes().length-1)},this),[t,a]},_createSliderSpeed:function(i,e){var s=n.DomUtil.create("div",i,e),t=n.DomUtil.create("span","speed",s),a=n.DomUtil.create("div","slider",s),r=Math.round(1e4/(this._player.getTransitionTime()||1e3))/10;t.innerHTML=this._getDisplaySpeed(r);var o=new n.UI.Knob(a,{step:this.options.speedStep,rangeMin:this.options.minSpeed,rangeMax:this.options.maxSpeed});return o.on("dragend",function(l){var h=l.target.getValue();this._draggingSpeed=!1,t.innerHTML=this._getDisplaySpeed(h),this._sliderSpeedValueChanged(h)},this),o.on("drag",function(l){this._draggingSpeed=!0,t.innerHTML=this._getDisplaySpeed(l.target.getValue())},this),o.on("positionchanged",function(l){t.innerHTML=this._getDisplaySpeed(l.target.getValue())},this),n.DomEvent.on(a,"click",function(l){if(l.target!==o._element){var h=l.touches&&l.touches.length===1?l.touches[0]:l,u=n.DomEvent.getMousePosition(h,a).x;o.setPosition(u),t.innerHTML=this._getDisplaySpeed(o.getValue()),this._sliderSpeedValueChanged(o.getValue())}},this),o},_buttonBackwardClicked:function(){this._timeDimension.previousTime(this._steps)},_buttonForwardClicked:function(){this._timeDimension.nextTime(this._steps)},_buttonLoopClicked:function(){this._player.setLooped(!this._player.isLooped())},_buttonPlayClicked:function(){this._player.isPlaying()?this._player.stop():this._player.start(this._steps)},_buttonPlayReverseClicked:function(){this._player.isPlaying()?this._player.stop():this._player.start(this._steps*-1)},_buttonDateClicked:function(){this._switchTimeZone()},_sliderTimeValueChanged:function(i){this._timeDimension.setCurrentTimeIndex(i)},_sliderLimitsValueChanged:function(i,e){this._timeDimension.setLowerLimitIndex(i),this._timeDimension.setUpperLimitIndex(e)},_sliderSpeedValueChanged:function(i){this._player.setTransitionTime(1e3/i)},_getCurrentTimeZone:function(){return this.options.timeZones[this._timeZoneIndex]},_switchTimeZone:function(){this._getCurrentTimeZone().toLowerCase()=="utc"&&n.DomUtil.removeClass(this._displayDate,"utc"),this._timeZoneIndex=(this._timeZoneIndex+1)%this.options.timeZones.length;var i=this._getCurrentTimeZone();i.toLowerCase()=="utc"?(n.DomUtil.addClass(this._displayDate,"utc"),this._displayDate.title="UTC Time"):i.toLowerCase()=="local"?this._displayDate.title="Local Time":this._displayDate.title=i,this._update()},_getDisplayDateFormat:function(i){var e=this._getCurrentTimeZone();return e.toLowerCase()=="utc"?i.toISOString():e.toLowerCase()=="local"?i.toLocaleString():i.toLocaleString([],{timeZone:e,timeZoneName:"short"})},_getDisplaySpeed:function(i){return i+"fps"},_getDisplayLoadingText:function(i,e){return""+Math.floor(i/e*100)+"%"},_getDisplayNoTimeError:function(){return"Time not available"}}),n.Map.addInitHook(function(){this.options.timeDimensionControl&&(this.timeDimensionControl=n.control.timeDimension(this.options.timeDimensionControlOptions||{}),this.addControl(this.timeDimensionControl))}),n.control.timeDimension=function(i){return new n.Control.TimeDimension(i)},n.TimeDimension})})(D); diff --git a/public/build/assets/leaflet.timedimension.control-DCjZM-xt.js b/public/build/assets/leaflet.timedimension.control-DCjZM-xt.js new file mode 100644 index 00000000..f11608a3 --- /dev/null +++ b/public/build/assets/leaflet.timedimension.control-DCjZM-xt.js @@ -0,0 +1 @@ +import{r as T}from"./mapHelpers-DmBbMbJe.js";import{c as v}from"./app-BwSojYvl.js";var D={exports:{}},c={exports:{}},y;function b(){return y||(y=1,function(f){(function(d,n){f.exports?f.exports=n():(d.nezasa||(d.nezasa={}),d.nezasa.iso8601||(d.nezasa.iso8601=n()))})(v,function(){var d={Period:{}};d.version="0.2",d.Period.parse=function(m,_){return n(m,_)},d.Period.parseToTotalSeconds=function(m){for(var _=[31104e3,2592e3,604800,86400,3600,60,1],i=n(m),e=0,s=0;s0&&(t[a]==1?s[a]=t[a]+" "+_[a]:s[a]=t[a]+" "+i[a]);return s.join(" ").trim().replace(/[ ]{2,}/g," ")};function n(m,_){var i=_||!1,e=[2,3,4,5,7,8,9],s=[0,0,0,0,0,0,0],t=[0,12,4,7,24,60,60],a;if(m=m.toUpperCase(),m){if(typeof m!="string")throw new Error("Invalid iso8601 period string '"+m+"'")}else return s;if(a=/^P((\d+Y)?(\d+M)?(\d+W)?(\d+D)?)?(T(\d+H)?(\d+M)?(\d+S)?)?$/.exec(m))for(var r=0;r0;r--)s[r]>=t[r]&&(s[r-1]=s[r-1]+Math.floor(s[r]/t[r]),s[r]=s[r]%t[r]);return s}return d})}(c)),c.exports}(function(f,d){(function(n,m){f.exports=n(T(),b())})(function(n,m){if(typeof _>"u")var _={iso8601:m};return n.TimeDimension=(n.Layer||n.Class).extend({includes:n.Evented||n.Mixin.Events,initialize:function(i){n.setOptions(this,i),this._availableTimes=this._generateAvailableTimes(),this._currentTimeIndex=-1,this._loadingTimeIndex=-1,this._loadingTimeout=this.options.loadingTimeout||3e3,this._syncedLayers=[],this._availableTimes.length>0&&this.setCurrentTime(this.options.currentTime||this._getDefaultCurrentTime()),this.options.lowerLimitTime&&this.setLowerLimit(this.options.lowerLimitTime),this.options.upperLimitTime&&this.setUpperLimit(this.options.upperLimitTime)},getAvailableTimes:function(){return this._availableTimes},getCurrentTimeIndex:function(){return this._currentTimeIndex===-1?this._availableTimes.length-1:this._currentTimeIndex},getCurrentTime:function(){var i=-1;return this._loadingTimeIndex!==-1?i=this._loadingTimeIndex:i=this.getCurrentTimeIndex(),i>=0?this._availableTimes[i]:null},isLoading:function(){return this._loadingTimeIndex!==-1},setCurrentTimeIndex:function(i){var e=this._upperLimit||this._availableTimes.length-1,s=this._lowerLimit||0;if(i=Math.min(Math.max(s,i),e),!(i<0)){this._loadingTimeIndex=i;var t=this._availableTimes[i];this._checkSyncedLayersReady(this._availableTimes[this._loadingTimeIndex])?this._newTimeIndexLoaded():(this.fire("timeloading",{time:t}),setTimeout((function(a){a==this._loadingTimeIndex&&this._newTimeIndexLoaded()}).bind(this,i),this._loadingTimeout))}},_newTimeIndexLoaded:function(){if(this._loadingTimeIndex!==-1){var i=this._availableTimes[this._loadingTimeIndex];this._currentTimeIndex=this._loadingTimeIndex,this.fire("timeload",{time:i}),this._loadingTimeIndex=-1}},_checkSyncedLayersReady:function(i){for(var e=0,s=this._syncedLayers.length;e-1&&(s=this._loadingTimeIndex),s=s+i,s>t&&(e?s=a:s=t),s-1&&(t=this._loadingTimeIndex);for(var r=0,o=this._syncedLayers.length;r0;){if(t=t+i,t>h)if(s)t=u;else break;if(t-1&&(t=this._loadingTimeIndex);for(var a=e,r=0,o=this._upperLimit||this._availableTimes.length-1,l=this._lowerLimit||0;a>0;){if(t=t+i,t>o)if(s)t=l;else{a=0,r=e;break}if(t0&&e--,e},setAvailableTimes:function(i,e){var s=this.getCurrentTime(),t=this.getLowerLimit(),a=this.getUpperLimit();if(e=="extremes"){var r=this.options.period||"P1D";this._availableTimes=n.TimeDimension.Util.explodeTimeRange(new Date(i[0]),new Date(i[i.length-1]),r)}else{var o=n.TimeDimension.Util.parseTimesExpression(i);if(this._availableTimes.length===0)this._availableTimes=o;else if(e=="intersect")this._availableTimes=n.TimeDimension.Util.intersect_arrays(o,this._availableTimes);else if(e=="union")this._availableTimes=n.TimeDimension.Util.union_arrays(o,this._availableTimes);else if(e=="replace")this._availableTimes=o;else throw"Merge available times mode not implemented: "+e}t&&this.setLowerLimit(t),a&&this.setUpperLimit(a),this.setCurrentTime(s),this.fire("availabletimeschanged",{availableTimes:this._availableTimes,currentTime:s})},getLowerLimit:function(){return this._availableTimes[this.getLowerLimitIndex()]},getUpperLimit:function(){return this._availableTimes[this.getUpperLimitIndex()]},setLowerLimit:function(i){var e=this._seekNearestTimeIndex(i);this.setLowerLimitIndex(e)},setUpperLimit:function(i){var e=this._seekNearestTimeIndex(i);this.setUpperLimitIndex(e)},setLowerLimitIndex:function(i){this._lowerLimit=Math.min(Math.max(i||0,0),this._upperLimit||this._availableTimes.length-1),this.fire("limitschanged",{lowerLimit:this._lowerLimit,upperLimit:this._upperLimit})},setUpperLimitIndex:function(i){this._upperLimit=Math.max(Math.min(i,this._availableTimes.length-1),this._lowerLimit||0),this.fire("limitschanged",{lowerLimit:this._lowerLimit,upperLimit:this._upperLimit})},getLowerLimitIndex:function(){return this._lowerLimit},getUpperLimitIndex:function(){return this._upperLimit}}),n.Map.addInitHook(function(){this.options.timeDimension&&(this.timeDimension=n.timeDimension(this.options.timeDimensionOptions||{}))}),n.timeDimension=function(i){return new n.TimeDimension(i)},n.TimeDimension.Util={getTimeDuration:function(i){if(typeof _>"u")throw"iso8601-js-period library is required for Leatlet.TimeDimension: https://github.com/nezasa/iso8601-js-period";return _.iso8601.Period.parse(i,!0)},addTimeDuration:function(i,e,s){typeof s>"u"&&(s=!0),(typeof e=="string"||e instanceof String)&&(e=this.getTimeDuration(e));var t=e.length,a=s?"getUTC":"get",r=s?"setUTC":"set";t>0&&e[0]!=0&&i[r+"FullYear"](i[a+"FullYear"]()+e[0]),t>1&&e[1]!=0&&i[r+"Month"](i[a+"Month"]()+e[1]),t>2&&e[2]!=0&&i[r+"Date"](i[a+"Date"]()+e[2]*7),t>3&&e[3]!=0&&i[r+"Date"](i[a+"Date"]()+e[3]),t>4&&e[4]!=0&&i[r+"Hours"](i[a+"Hours"]()+e[4]),t>5&&e[5]!=0&&i[r+"Minutes"](i[a+"Minutes"]()+e[5]),t>6&&e[6]!=0&&i[r+"Seconds"](i[a+"Seconds"]()+e[6])},subtractTimeDuration:function(i,e,s){(typeof e=="string"||e instanceof String)&&(e=this.getTimeDuration(e));for(var t=[],a=0,r=e.length;a2&&s[2].length?s[2]:"P1D";return e!=null&&(r=e),this.explodeTimeRange(t,a,r)},explodeTimeRange:function(i,e,s,t){var a=this.getTimeDuration(s),r=[],o=new Date(i.getTime()),l=null,h=null,u=null,g=null;if(t!==void 0){var p=t.split("/");l=p[0].split(":")[0],h=p[0].split(":")[1],u=p[1].split(":")[0],g=p[1].split(":")[1]}for(;o=l&&o.getUTCHours()<=u)&&(o.getUTCHours()!=l||o.getUTCMinutes()>=h)&&(o.getUTCHours()!=u||o.getUTCMinutes()<=g)&&r.push(o.getTime()),this.addTimeDuration(o,a);return o>=e&&r.push(e.getTime()),r},parseTimeInterval:function(i){var e=i.split("/");if(e.length!=2)throw"Incorrect ISO9601 TimeInterval: "+i;var s=Date.parse(e[0]),t=null,a=null;return isNaN(s)?(a=this.getTimeDuration(e[0]),t=Date.parse(e[1]),s=new Date(t),this.subtractTimeDuration(s,a,!0),t=new Date(t)):(t=Date.parse(e[1]),isNaN(t)?(a=this.getTimeDuration(e[1]),t=new Date(s),this.addTimeDuration(t,a,!0)):t=new Date(t),s=new Date(s)),[s,t]},parseTimesExpression:function(i,e){var s=[];if(!i)return s;if(typeof i=="string"||i instanceof String)for(var t=i.split(","),a,r,o=0,l=t.length;o0&&t.length>0;)s[0]t[0]||a.push(s.shift()),t.shift());return a},union_arrays:function(i,e){for(var s=i.slice(0),t=e.slice(0),a=[];s.length>0&&t.length>0;)s[0]t[0]?a.push(t.shift()):(a.push(s.shift()),t.shift());return s.length>0?a=a.concat(s):t.length>0&&(a=a.concat(t)),a},sort_and_deduplicate:function(i){i=i.slice(0).sort();for(var e=[],s=null,t=0,a=i.length;t-1){var o=a-e;o>0&&(r=s.splice(0,o),this._removeLayers(r))}if(i>-1){a=s.indexOf(t);var o=s.length-a-i-1;o>0&&(r=s.splice(a+i+1,o),this._removeLayers(r))}},_showLayer:function(i,e){this._currentLayer&&this._currentLayer!==i&&this._currentLayer.hide(),i.show(),!(this._currentLayer&&this._currentLayer===i)&&(this._currentLayer=i,this._currentTime=e,this._evictCachedTimes(this._timeCacheForward,this._timeCacheBackward))},_getLayerForTime:function(i){if(i==0||i==this._defaultTime||i==null)return this._baseLayer;if(this._layers.hasOwnProperty(i))return this._layers[i];var e=this._getNearestTime(i);if(this._layers.hasOwnProperty(e))return this._layers[e];var s=this._createLayerForTime(e);return this._layers[i]=s,s.on("load",(function(t,a){t.setLoaded(!0),this._layers[a]||(this._layers[a]=t),this._timeDimension&&a==this._timeDimension.getCurrentTime()&&!this._timeDimension.isLoading()&&this._showLayer(t,a),this.fire("timeload",{time:a})}).bind(this,s,i)),s.onAdd=(function(t){Object.getPrototypeOf(this).onAdd.call(this,t),this.hide()}).bind(s),s},_createLayerForTime:function(i){var e=this._baseLayer.options;return e.time=new Date(i).toISOString(),new this._baseLayer.constructor(this._baseLayer.getURL(),e)},_getLoadedTimes:function(){var i=[];for(var e in this._layers)this._layers.hasOwnProperty(e)&&i.push(e);return i.sort(function(s,t){return s-t})},_removeLayers:function(i){for(var e=0,s=i.length;ethis._timeCacheForward&&(this._timeCacheForward=i)},_requestTimeDimensionFromCapabilities:function(){if(!this._capabilitiesRequested){this._capabilitiesRequested=!0;var i=this._getCapabilitiesUrl();this._proxy&&(i=this._proxy+"?url="+encodeURIComponent(i));var e=new XMLHttpRequest;e.addEventListener("load",(function(s){var t=s.currentTarget.responseXML;t!==null&&(this._defaultTime=Date.parse(this._getDefaultTimeFromCapabilities(t)),this._setDefaultTime=this._setDefaultTime||this._timeDimension&&this._timeDimension.getAvailableTimes().length==0,this.setAvailableTimes(this._parseTimeDimensionFromCapabilities(t)),this._setDefaultTime&&this._timeDimension&&this._timeDimension.setCurrentTime(this._defaultTime))}).bind(this)),e.overrideMimeType("application/xml"),e.open("GET",i),e.send()}},_getCapabilitiesUrl:function(){var i=this._baseLayer.getURL();this._getCapabilitiesAlternateUrl&&(i=this._getCapabilitiesAlternateUrl);var e=n.extend({},this._getCapabilitiesParams,{request:"GetCapabilities",service:"WMS",version:this._wmsVersion});return i=i+n.Util.getParamString(e,i,e.uppercase),i},_parseTimeDimensionFromCapabilities:function(i){var e=i.querySelectorAll('Layer[queryable="1"]'),s=this._baseLayer.wmsParams.layers,t=null,a=null;return e.forEach(function(r){r.querySelector("Name").innerHTML===s&&(t=r)}),t&&(a=this._getTimesFromLayerCapabilities(t),a||(a=this._getTimesFromLayerCapabilities(t.parentNode))),a},_getTimesFromLayerCapabilities:function(i){for(var e=null,s=i.children,t=0,a=s.length;t0&&this._timeDimension.setCurrentTime(this._defaultTime))},_getNearestTime:function(i){if(this._layers.hasOwnProperty(i)||this._availableTimes.length==0)return i;for(var e=0,s=this._availableTimes.length;e0&&e--,i!=this._availableTimes[e],this._availableTimes[e]}}),n.NonTiledLayer||(n.NonTiledLayer=(n.Layer||n.Class).extend({})),n.NonTiledLayer.include({_visible:!0,_loaded:!1,_originalUpdate:n.NonTiledLayer.prototype._update,_originalOnRemove:n.NonTiledLayer.prototype.onRemove,_update:function(){!this._visible&&this._loaded||this._originalUpdate()},onRemove:function(i){this._loaded=!1,this._originalOnRemove(i)},setLoaded:function(i){this._loaded=i},isLoaded:function(){return this._loaded},hide:function(){this._visible=!1,this._div.style.display="none"},show:function(){this._visible=!0,this._div.style.display="block"},getURL:function(){return this._wmsUrl}}),n.TileLayer.include({_visible:!0,_loaded:!1,_originalUpdate:n.TileLayer.prototype._update,_update:function(){!this._visible&&this._loaded||this._originalUpdate()},setLoaded:function(i){this._loaded=i},isLoaded:function(){return this._loaded},hide:function(){this._visible=!1,this._container&&(this._container.style.display="none")},show:function(){this._visible=!0,this._container&&(this._container.style.display="block")},getURL:function(){return this._url}}),n.timeDimension.layer.wms=function(i,e){return new n.TimeDimension.Layer.WMS(i,e)},n.TimeDimension.Layer.GeoJson=n.TimeDimension.Layer.extend({initialize:function(i,e){n.TimeDimension.Layer.prototype.initialize.call(this,i,e),this._updateTimeDimension=this.options.updateTimeDimension||!1,this._updateTimeDimensionMode=this.options.updateTimeDimensionMode||"extremes",this._duration=this.options.duration||null,this._addlastPoint=this.options.addlastPoint||!1,this._waitForReady=this.options.waitForReady||!1,this._defaultTime=0,this._availableTimes=[],this._loaded=!1,this._baseLayer.getLayers().length==0?this._waitForReady?this._baseLayer.on("ready",this._onReadyBaseLayer,this):this._loaded=!0:(this._loaded=!0,this._setAvailableTimes()),this._baseLayer.on("layeradd",(function(){this._loaded&&this._setAvailableTimes()}).bind(this))},onAdd:function(i){n.TimeDimension.Layer.prototype.onAdd.call(this,i),this._loaded&&this._setAvailableTimes()},eachLayer:function(i,e){return this._currentLayer&&i.call(e,this._currentLayer),n.TimeDimension.Layer.prototype.eachLayer.call(this,i,e)},isReady:function(i){return this._loaded},_update:function(){if(this._map&&this._loaded){this._timeDimension.getCurrentTime();var i=this._timeDimension.getCurrentTime(),e=0;if(this._duration){var s=new Date(i);n.TimeDimension.Util.subtractTimeDuration(s,this._duration,!0),e=s.getTime()}for(var t=n.geoJson(null,this._baseLayer.options),a=this._baseLayer.getLayers(),r=0,o=a.length;r0)){var h=l.properties;h.last=!0,t.addData({type:"Feature",properties:h,geometry:{type:"Point",coordinates:l.geometry.coordinates[l.geometry.coordinates.length-1]}})}}this._currentLayer&&this._map.removeLayer(this._currentLayer),t.getLayers().length&&(t.addTo(this._map),this._currentLayer=t)}},_setAvailableTimes:function(){for(var i=[],e=this._baseLayer.getLayers(),s=0,t=e.length;ss||t[o-1]e){for(var l=0;le&&(a=l),t[l]>s){r=l;break}}a===null&&(a=0),r===null&&(r=o);var h=[];return i.geometry.coordinates[0].length?h=i.geometry.coordinates.slice(a,r):h=i.geometry.coordinates,{type:"Feature",properties:i.properties,geometry:{type:i.geometry.type,coordinates:h}}},_onReadyBaseLayer:function(){this._loaded=!0,this._setAvailableTimes(),this._update()}}),n.timeDimension.layer.geoJson=function(i,e){return new n.TimeDimension.Layer.GeoJson(i,e)},n.TimeDimension.Player=(n.Layer||n.Class).extend({includes:n.Evented||n.Mixin.Events,initialize:function(i,e){n.setOptions(this,i),this._timeDimension=e,this._paused=!1,this._buffer=this.options.buffer||5,this._minBufferReady=this.options.minBufferReady||1,this._waitingForBuffer=!1,this._loop=this.options.loop||!1,this._steps=1,this._timeDimension.on("timeload",(function(s){this.release(),this._waitingForBuffer=!1}).bind(this)),this.setTransitionTime(this.options.transitionTime||1e3),this._timeDimension.on("limitschanged availabletimeschanged timeload",(function(s){this._timeDimension.prepareNextTimes(this._steps,this._minBufferReady,this._loop)}).bind(this))},_tick:function(){var i=this._getMaxIndex(),e=this._timeDimension.getCurrentTimeIndex()>=i&&this._steps>0,s=this._timeDimension.getCurrentTimeIndex()==0&&this._steps<0;if((e||s)&&!this._loop){this.pause(),this.stop(),this.fire("animationfinished");return}if(!this._paused){var t=0,a=this._bufferSize;if(this._minBufferReady>0){if(t=this._timeDimension.getNumberNextTimesReady(this._steps,a,this._loop),this._waitingForBuffer)if(t0&&this._timeDimension.prepareNextTimes(this._steps,a,this._loop)}},_getMaxIndex:function(){return Math.min(this._timeDimension.getAvailableTimes().length-1,this._timeDimension.getUpperLimitIndex()||1/0)},start:function(i){this._intervalID||(this._steps=i||1,this._waitingForBuffer=!1,this.options.startOver&&this._timeDimension.getCurrentTimeIndex()===this._getMaxIndex()&&this._timeDimension.setCurrentTimeIndex(this._timeDimension.getLowerLimitIndex()||0),this.release(),this._intervalID=window.setInterval(n.bind(this._tick,this),this._transitionTime),this._tick(),this.fire("play"),this.fire("running"))},stop:function(){this._intervalID&&(clearInterval(this._intervalID),this._intervalID=null,this._waitingForBuffer=!1,this.fire("stop"))},pause:function(){this._paused=!0},release:function(){this._paused=!1},getTransitionTime:function(){return this._transitionTime},isPlaying:function(){return!!this._intervalID},isWaiting:function(){return this._waitingForBuffer},isLooped:function(){return this._loop},setLooped:function(i){this._loop=i,this.fire("loopchange",{loop:i})},setTransitionTime:function(i){this._transitionTime=i,typeof this._buffer=="function"?this._bufferSize=this._buffer.call(this,this._transitionTime,this._minBufferReady,this._loop):this._bufferSize=this._buffer,this._intervalID&&(this.stop(),this.start(this._steps)),this.fire("speedchange",{transitionTime:i,buffer:this._bufferSize})},getSteps:function(){return this._steps}}),n.UI=n.ui=n.UI||{},n.UI.Knob=n.Draggable.extend({options:{className:"knob",step:1,rangeMin:0,rangeMax:10},initialize:function(i,e){n.setOptions(this,e),this._element=n.DomUtil.create("div",this.options.className||"knob",i),n.Draggable.prototype.initialize.call(this,this._element,this._element),this._container=i,this.on("predrag",function(){this._newPos.y=0,this._newPos.x=this._adjustX(this._newPos.x)},this),this.on("dragstart",function(){n.DomUtil.addClass(i,"dragging")}),this.on("dragend",function(){n.DomUtil.removeClass(i,"dragging")}),n.DomEvent.on(this._element,"dblclick",function(s){this.fire("dblclick",s)},this),n.DomEvent.disableClickPropagation(this._element),this.enable()},_getProjectionCoef:function(){return(this.options.rangeMax-this.options.rangeMin)/(this._container.offsetWidth||this._container.style.width)},_update:function(){this.setPosition(n.DomUtil.getPosition(this._element).x)},_adjustX:function(i){var e=this._toValue(i)||this.getMinValue();return this._toX(this._adjustValue(e))},_adjustValue:function(i){return i=Math.max(this.getMinValue(),Math.min(this.getMaxValue(),i)),i=i-this.options.rangeMin,i=Math.round(i/this.options.step)*this.options.step,i=i+this.options.rangeMin,i=Math.round(i*100)/100,i},_toX:function(i){var e=(i-this.options.rangeMin)/this._getProjectionCoef();return e},_toValue:function(i){var e=i*this._getProjectionCoef()+this.options.rangeMin;return e},getMinValue:function(){return this.options.minValue||this.options.rangeMin},getMaxValue:function(){return this.options.maxValue||this.options.rangeMax},setStep:function(i){this.options.step=i,this._update()},setPosition:function(i){n.DomUtil.setPosition(this._element,n.point(this._adjustX(i),0)),this.fire("positionchanged")},getPosition:function(){return n.DomUtil.getPosition(this._element).x},setValue:function(i){this.setPosition(this._toX(i))},getValue:function(){return this._adjustValue(this._toValue(this.getPosition()))}}),n.Control.TimeDimension=n.Control.extend({options:{styleNS:"leaflet-control-timecontrol",position:"bottomleft",title:"Time Control",backwardButton:!0,forwardButton:!0,playButton:!0,playReverseButton:!1,loopButton:!1,displayDate:!0,timeSlider:!0,timeSliderDragUpdate:!1,limitSliders:!1,limitMinimumRange:5,speedSlider:!0,minSpeed:.1,maxSpeed:10,speedStep:.1,timeSteps:1,autoPlay:!1,playerOptions:{transitionTime:1e3},timeZones:["UTC","Local"]},initialize:function(i){n.setOptions(i),n.Control.prototype.initialize.call(this,i),this._timeZoneIndex=0,this._timeDimension=this.options.timeDimension||null},onAdd:function(i){var e;return this._map=i,!this._timeDimension&&i.timeDimension&&(this._timeDimension=i.timeDimension),this._initPlayer(),e=n.DomUtil.create("div","leaflet-bar leaflet-bar-horizontal leaflet-bar-timecontrol"),this.options.backwardButton&&(this._buttonBackward=this._createButton("Backward",e)),this.options.playReverseButton&&(this._buttonPlayReversePause=this._createButton("Play Reverse",e)),this.options.playButton&&(this._buttonPlayPause=this._createButton("Play",e)),this.options.forwardButton&&(this._buttonForward=this._createButton("Forward",e)),this.options.loopButton&&(this._buttonLoop=this._createButton("Loop",e)),this.options.displayDate&&(this._displayDate=this._createButton("Date",e)),this.options.timeSlider&&(this._sliderTime=this._createSliderTime(this.options.styleNS+" timecontrol-slider timecontrol-dateslider",e)),this.options.speedSlider&&(this._sliderSpeed=this._createSliderSpeed(this.options.styleNS+" timecontrol-slider timecontrol-speed",e)),this._steps=this.options.timeSteps||1,this._timeDimension.on("timeload",this._update,this),this._timeDimension.on("timeload",this._onPlayerStateChange,this),this._timeDimension.on("timeloading",this._onTimeLoading,this),this._timeDimension.on("limitschanged availabletimeschanged",this._onTimeLimitsChanged,this),n.DomEvent.disableClickPropagation(e),e},addTo:function(){return n.Control.prototype.addTo.apply(this,arguments),this._onPlayerStateChange(),this._onTimeLimitsChanged(),this._update(),this},onRemove:function(){this._player.off("play stop running loopchange speedchange",this._onPlayerStateChange,this),this._player.off("waiting",this._onPlayerWaiting,this),this._timeDimension.off("timeload",this._update,this),this._timeDimension.off("timeload",this._onPlayerStateChange,this),this._timeDimension.off("timeloading",this._onTimeLoading,this),this._timeDimension.off("limitschanged availabletimeschanged",this._onTimeLimitsChanged,this)},_initPlayer:function(){this._player||(this.options.player?this._player=this.options.player:this._player=new n.TimeDimension.Player(this.options.playerOptions,this._timeDimension)),this.options.autoPlay&&this._player.start(this._steps),this._player.on("play stop running loopchange speedchange",this._onPlayerStateChange,this),this._player.on("waiting",this._onPlayerWaiting,this),this._onPlayerStateChange()},_onTimeLoading:function(i){i.time==this._timeDimension.getCurrentTime()&&this._displayDate&&n.DomUtil.addClass(this._displayDate,"loading")},_onTimeLimitsChanged:function(){var i=this._timeDimension.getLowerLimitIndex(),e=this._timeDimension.getUpperLimitIndex(),s=this._timeDimension.getAvailableTimes().length-1;this._limitKnobs&&(this._limitKnobs[0].options.rangeMax=s,this._limitKnobs[1].options.rangeMax=s,this._limitKnobs[0].setValue(i||0),this._limitKnobs[1].setValue(e||s)),this._sliderTime&&(this._sliderTime.options.rangeMax=s,this._sliderTime._update())},_onPlayerWaiting:function(i){this._buttonPlayPause&&this._player.getSteps()>0&&(n.DomUtil.addClass(this._buttonPlayPause,"loading"),this._buttonPlayPause.innerHTML=this._getDisplayLoadingText(i.available,i.buffer)),this._buttonPlayReversePause&&this._player.getSteps()<0&&(n.DomUtil.addClass(this._buttonPlayReversePause,"loading"),this._buttonPlayReversePause.innerHTML=this._getDisplayLoadingText(i.available,i.buffer))},_onPlayerStateChange:function(){if(this._buttonPlayPause&&(this._player.isPlaying()&&this._player.getSteps()>0?(n.DomUtil.addClass(this._buttonPlayPause,"pause"),n.DomUtil.removeClass(this._buttonPlayPause,"play")):(n.DomUtil.removeClass(this._buttonPlayPause,"pause"),n.DomUtil.addClass(this._buttonPlayPause,"play")),this._player.isWaiting()&&this._player.getSteps()>0?n.DomUtil.addClass(this._buttonPlayPause,"loading"):(this._buttonPlayPause.innerHTML="",n.DomUtil.removeClass(this._buttonPlayPause,"loading"))),this._buttonPlayReversePause&&(this._player.isPlaying()&&this._player.getSteps()<0?n.DomUtil.addClass(this._buttonPlayReversePause,"pause"):n.DomUtil.removeClass(this._buttonPlayReversePause,"pause"),this._player.isWaiting()&&this._player.getSteps()<0?n.DomUtil.addClass(this._buttonPlayReversePause,"loading"):(this._buttonPlayReversePause.innerHTML="",n.DomUtil.removeClass(this._buttonPlayReversePause,"loading"))),this._buttonLoop&&(this._player.isLooped()?n.DomUtil.addClass(this._buttonLoop,"looped"):n.DomUtil.removeClass(this._buttonLoop,"looped")),this._sliderSpeed&&!this._draggingSpeed){var i=this._player.getTransitionTime()||1e3;i=Math.round(1e4/i)/10,this._sliderSpeed.setValue(i)}},_update:function(){if(this._timeDimension)if(this._timeDimension.getCurrentTimeIndex()>=0){var i=new Date(this._timeDimension.getCurrentTime());this._displayDate&&(n.DomUtil.removeClass(this._displayDate,"loading"),this._displayDate.innerHTML=this._getDisplayDateFormat(i)),this._sliderTime&&!this._slidingTimeSlider&&this._sliderTime.setValue(this._timeDimension.getCurrentTimeIndex())}else this._displayDate&&(this._displayDate.innerHTML=this._getDisplayNoTimeError())},_createButton:function(i,e){var s=n.DomUtil.create("a",this.options.styleNS+" timecontrol-"+i.toLowerCase(),e);return s.href="#",s.title=i,n.DomEvent.addListener(s,"click",n.DomEvent.stopPropagation).addListener(s,"click",n.DomEvent.preventDefault).addListener(s,"click",this["_button"+i.replace(/ /i,"")+"Clicked"],this),s},_createSliderTime:function(i,e){var s,t,a,r,o;return s=n.DomUtil.create("div",i,e),t=n.DomUtil.create("div","slider",s),a=this._timeDimension.getAvailableTimes().length-1,this.options.limitSliders&&(o=this._limitKnobs=this._createLimitKnobs(t)),r=new n.UI.Knob(t,{className:"knob main",rangeMin:0,rangeMax:a}),r.on("dragend",function(l){var h=l.target.getValue();this._sliderTimeValueChanged(h),this._slidingTimeSlider=!1},this),r.on("drag",function(l){this._slidingTimeSlider=!0;var h=this._timeDimension.getAvailableTimes()[l.target.getValue()];if(h){var u=new Date(h);this._displayDate&&(this._displayDate.innerHTML=this._getDisplayDateFormat(u)),this.options.timeSliderDragUpdate&&this._sliderTimeValueChanged(l.target.getValue())}},this),r.on("predrag",function(){var l,h;o&&(l=o[0].getPosition(),h=o[1].getPosition(),this._newPos.xh&&(this._newPos.x=h))},r),n.DomEvent.on(t,"click",function(l){if(!n.DomUtil.hasClass(l.target,"knob")){var h=l.touches&&l.touches.length===1?l.touches[0]:l,u=n.DomEvent.getMousePosition(h,t).x;o?o[0].getPosition()<=u&&u<=o[1].getPosition()&&(r.setPosition(u),this._sliderTimeValueChanged(r.getValue())):(r.setPosition(u),this._sliderTimeValueChanged(r.getValue()))}},this),r.setPosition(0),r},_createLimitKnobs:function(i){n.DomUtil.addClass(i,"has-limits");var e=this._timeDimension.getAvailableTimes().length-1,s=n.DomUtil.create("div","range",i),t=new n.UI.Knob(i,{className:"knob lower",rangeMin:0,rangeMax:e}),a=new n.UI.Knob(i,{className:"knob upper",rangeMin:0,rangeMax:e});return n.DomUtil.setPosition(s,0),t.setPosition(0),a.setPosition(e),t.on("dragend",function(r){var o=r.target.getValue();this._sliderLimitsValueChanged(o,a.getValue())},this),a.on("dragend",function(r){var o=r.target.getValue();this._sliderLimitsValueChanged(t.getValue(),o)},this),t.on("drag positionchanged",function(){n.DomUtil.setPosition(s,n.point(t.getPosition(),0)),s.style.width=a.getPosition()-t.getPosition()+"px"},this),a.on("drag positionchanged",function(){s.style.width=a.getPosition()-t.getPosition()+"px"},this),a.on("predrag",function(){var r=t._toX(t.getValue()+this.options.limitMinimumRange);a._newPos.x<=r&&(a._newPos.x=r)},this),t.on("predrag",function(){var r=a._toX(a.getValue()-this.options.limitMinimumRange);t._newPos.x>=r&&(t._newPos.x=r)},this),t.on("dblclick",function(){this._timeDimension.setLowerLimitIndex(0)},this),a.on("dblclick",function(){this._timeDimension.setUpperLimitIndex(this._timeDimension.getAvailableTimes().length-1)},this),[t,a]},_createSliderSpeed:function(i,e){var s=n.DomUtil.create("div",i,e),t=n.DomUtil.create("span","speed",s),a=n.DomUtil.create("div","slider",s),r=Math.round(1e4/(this._player.getTransitionTime()||1e3))/10;t.innerHTML=this._getDisplaySpeed(r);var o=new n.UI.Knob(a,{step:this.options.speedStep,rangeMin:this.options.minSpeed,rangeMax:this.options.maxSpeed});return o.on("dragend",function(l){var h=l.target.getValue();this._draggingSpeed=!1,t.innerHTML=this._getDisplaySpeed(h),this._sliderSpeedValueChanged(h)},this),o.on("drag",function(l){this._draggingSpeed=!0,t.innerHTML=this._getDisplaySpeed(l.target.getValue())},this),o.on("positionchanged",function(l){t.innerHTML=this._getDisplaySpeed(l.target.getValue())},this),n.DomEvent.on(a,"click",function(l){if(l.target!==o._element){var h=l.touches&&l.touches.length===1?l.touches[0]:l,u=n.DomEvent.getMousePosition(h,a).x;o.setPosition(u),t.innerHTML=this._getDisplaySpeed(o.getValue()),this._sliderSpeedValueChanged(o.getValue())}},this),o},_buttonBackwardClicked:function(){this._timeDimension.previousTime(this._steps)},_buttonForwardClicked:function(){this._timeDimension.nextTime(this._steps)},_buttonLoopClicked:function(){this._player.setLooped(!this._player.isLooped())},_buttonPlayClicked:function(){this._player.isPlaying()?this._player.stop():this._player.start(this._steps)},_buttonPlayReverseClicked:function(){this._player.isPlaying()?this._player.stop():this._player.start(this._steps*-1)},_buttonDateClicked:function(){this._switchTimeZone()},_sliderTimeValueChanged:function(i){this._timeDimension.setCurrentTimeIndex(i)},_sliderLimitsValueChanged:function(i,e){this._timeDimension.setLowerLimitIndex(i),this._timeDimension.setUpperLimitIndex(e)},_sliderSpeedValueChanged:function(i){this._player.setTransitionTime(1e3/i)},_getCurrentTimeZone:function(){return this.options.timeZones[this._timeZoneIndex]},_switchTimeZone:function(){this._getCurrentTimeZone().toLowerCase()=="utc"&&n.DomUtil.removeClass(this._displayDate,"utc"),this._timeZoneIndex=(this._timeZoneIndex+1)%this.options.timeZones.length;var i=this._getCurrentTimeZone();i.toLowerCase()=="utc"?(n.DomUtil.addClass(this._displayDate,"utc"),this._displayDate.title="UTC Time"):i.toLowerCase()=="local"?this._displayDate.title="Local Time":this._displayDate.title=i,this._update()},_getDisplayDateFormat:function(i){var e=this._getCurrentTimeZone();return e.toLowerCase()=="utc"?i.toISOString():e.toLowerCase()=="local"?i.toLocaleString():i.toLocaleString([],{timeZone:e,timeZoneName:"short"})},_getDisplaySpeed:function(i){return i+"fps"},_getDisplayLoadingText:function(i,e){return""+Math.floor(i/e*100)+"%"},_getDisplayNoTimeError:function(){return"Time not available"}}),n.Map.addInitHook(function(){this.options.timeDimensionControl&&(this.timeDimensionControl=n.control.timeDimension(this.options.timeDimensionControlOptions||{}),this.addControl(this.timeDimensionControl))}),n.control.timeDimension=function(i){return new n.Control.TimeDimension(i)},n.TimeDimension})})(D); diff --git a/public/build/assets/mapHelpers-CSfygYu3.js b/public/build/assets/mapHelpers-CSfygYu3.js deleted file mode 100644 index d99574d3..00000000 --- a/public/build/assets/mapHelpers-CSfygYu3.js +++ /dev/null @@ -1,60 +0,0 @@ -import{c as $o,g as jo,i as rt}from"./app-DuS6KM7M.js";import{h as yn}from"./moment-zH0z38ay.js";var ni={exports:{}};/* @preserve - * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com - * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */(function(c,b){(function(l,I){I(b)})($o,function(l){var I="1.9.4";function w(t){var e,i,n,o;for(i=1,n=arguments.length;i"u"||!L||!L.Mixin)){t=W(t)?t:[t];for(var e=0;e0?Math.floor(t):Math.ceil(t)};p.prototype={clone:function(){return new p(this.x,this.y)},add:function(t){return this.clone()._add(m(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(m(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new p(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new p(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=ai(this.x),this.y=ai(this.y),this},distanceTo:function(t){t=m(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=m(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=m(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+$(this.x)+", "+$(this.y)+")"}};function m(t,e,i){return t instanceof p?t:W(t)?new p(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new p(t.x,t.y):new p(t,e,i)}function Z(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=G(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>=e.x&&n.x<=i.x,r=o.y>=e.y&&n.y<=i.y;return s&&r},overlaps:function(t){t=G(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>e.x&&n.xe.y&&n.y=e.lat&&o.lat<=i.lat&&n.lng>=e.lng&&o.lng<=i.lng},intersects:function(t){t=B(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=e.lat&&n.lat<=i.lat,r=o.lng>=e.lng&&n.lng<=i.lng;return s&&r},overlaps:function(t){t=B(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>e.lat&&n.late.lng&&n.lng1,In=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",E,e),window.removeEventListener("testPassiveEventSupport",E,e)}catch{}return t}(),Bn=function(){return!!document.createElement("canvas").getContext}(),ze=!!(document.createElementNS&&ui("svg").createSVGRect),Nn=!!ze&&function(){var t=document.createElement("div");return t.innerHTML="",(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),Rn=!ze&&function(){try{var t=document.createElement("div");t.innerHTML='';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&typeof e.adj=="object"}catch{return!1}}(),Dn=navigator.platform.indexOf("Mac")===0,Fn=navigator.platform.indexOf("Linux")===0;function it(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var d={ie,ielt9:Ln,edge:ci,webkit:Ce,android:fi,android23:di,androidStock:bn,opera:ke,chrome:_i,gecko:mi,safari:Mn,phantom:pi,opera12:vi,win:Cn,ie3d:gi,webkit3d:Se,gecko3d:yi,any3d:kn,mobile:Ft,mobileWebkit:Sn,mobileWebkit3d:zn,msPointer:wi,pointer:xi,touch:En,touchNative:Pi,mobileOpera:Zn,mobileGecko:On,retina:An,passiveEvents:In,canvas:Bn,svg:ze,vml:Rn,inlineSvg:Nn,mac:Dn,linux:Fn},Li=d.msPointer?"MSPointerDown":"pointerdown",Ti=d.msPointer?"MSPointerMove":"pointermove",bi=d.msPointer?"MSPointerUp":"pointerup",Mi=d.msPointer?"MSPointerCancel":"pointercancel",Ee={touchstart:Li,touchmove:Ti,touchend:bi,touchcancel:Mi},Ci={touchstart:qn,touchmove:ne,touchend:ne,touchcancel:ne},Mt={},ki=!1;function Hn(t,e,i){return e==="touchstart"&&Vn(),Ci[e]?(i=Ci[e].bind(this,i),t.addEventListener(Ee[e],i,!1),i):(console.warn("wrong event specified:",e),E)}function Wn(t,e,i){if(!Ee[e]){console.warn("wrong event specified:",e);return}t.removeEventListener(Ee[e],i,!1)}function Un(t){Mt[t.pointerId]=t}function Gn(t){Mt[t.pointerId]&&(Mt[t.pointerId]=t)}function Si(t){delete Mt[t.pointerId]}function Vn(){ki||(document.addEventListener(Li,Un,!0),document.addEventListener(Ti,Gn,!0),document.addEventListener(bi,Si,!0),document.addEventListener(Mi,Si,!0),ki=!0)}function ne(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){e.touches=[];for(var i in Mt)e.touches.push(Mt[i]);e.changedTouches=[e],t(e)}}function qn(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&F(e),ne(t,e)}function $n(t){var e={},i,n;for(n in t)i=t[n],e[n]=i&&i.bind?i.bind(t):i;return t=e,e.type="dblclick",e.detail=2,e.isTrusted=!1,e._simulated=!0,e}var jn=200;function Kn(t,e){t.addEventListener("dblclick",e);var i=0,n;function o(s){if(s.detail!==1){n=s.detail;return}if(!(s.pointerType==="mouse"||s.sourceCapabilities&&!s.sourceCapabilities.firesTouchEvents)){var r=Ai(s);if(!(r.some(function(h){return h instanceof HTMLLabelElement&&h.attributes.for})&&!r.some(function(h){return h instanceof HTMLInputElement||h instanceof HTMLSelectElement}))){var a=Date.now();a-i<=jn?(n++,n===2&&e($n(s))):n=1,i=a}}}return t.addEventListener("click",o),{dblclick:e,simDblclick:o}}function Yn(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var Ze=re(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Ht=re(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),zi=Ht==="webkitTransition"||Ht==="OTransition"?Ht+"End":"transitionend";function Ei(t){return typeof t=="string"?document.getElementById(t):t}function Wt(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||i==="auto")&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return i==="auto"?null:i}function M(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function O(t){var e=t.parentNode;e&&e.removeChild(t)}function oe(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Ct(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function kt(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function Oe(t,e){if(t.classList!==void 0)return t.classList.contains(e);var i=se(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function g(t,e){if(t.classList!==void 0)for(var i=et(e),n=0,o=i.length;n0?2*window.devicePixelRatio:1;function Bi(t){return d.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/Qn:t.deltaY&&t.deltaMode===1?-t.deltaY*20:t.deltaY&&t.deltaMode===2?-t.deltaY*60:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?-t.detail*20:t.detail?t.detail/-32765*60:0}function Ve(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch{return!1}return i!==t}var to={__proto__:null,on:v,off:z,stopPropagation:wt,disableScrollPropagation:Ge,disableClickPropagation:qt,preventDefault:F,stop:xt,getPropagationPath:Ai,getMousePosition:Ii,getWheelDelta:Bi,isExternalTarget:Ve,addListener:v,removeListener:z},Ni=Rt.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=yt(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=U(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=this._duration*1e3;ethis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,B(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){e=e||{};var i=m(e.paddingTopLeft||e.padding||[0,0]),n=m(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),s=this.project(t),r=this.getPixelBounds(),a=G([r.min.add(i),r.max.subtract(n)]),h=a.getSize();if(!a.contains(s)){this._enforcingBounds=!0;var u=s.subtract(a.getCenter()),f=a.extend(s).getSize().subtract(h);o.x+=u.x<0?-f.x:f.x,o.y+=u.y<0?-f.y:f.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=w({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),o=i.divideBy(2).round(),s=n.subtract(o);return!s.x&&!s.y?this:(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(C(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=w({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=C(this._handleGeolocationResponse,this),i=C(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,i=t.message||(e===1?"permission denied":e===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=t.coords.latitude,i=t.coords.longitude,n=new k(e,i),o=n.toBounds(t.coords.accuracy*2),s=this._locateOptions;if(s.setView){var r=this.getBoundsZoom(o);this.setView(n,s.maxZoom?Math.min(r,s.maxZoom):r)}var a={latlng:n,bounds:o,timestamp:t.timestamp};for(var h in t.coords)typeof t.coords[h]=="number"&&(a[h]=t.coords[h]);this.fire("locationfound",a)}},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),O(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(K(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)O(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),n=M("div",i,e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new V(e,i)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=B(t),i=m(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),h=this.getSize().subtract(i),u=G(this.project(a,n),this.project(r,n)).getSize(),f=d.any3d?this.options.zoomSnap:1,_=h.x/u.x,y=h.y/u.y,H=e?Math.max(_,y):Math.min(_,y);return n=this.getScaleZoom(H,n),f&&(n=Math.round(n/(f/100))*(f/100),n=e?Math.ceil(n/f)*f:Math.floor(n/f)*f),Math.max(o,Math.min(s,n))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new p(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new Z(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===void 0?this.getZoom():t)},getPane:function(t){return typeof t=="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=e===void 0?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=e===void 0?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.latLngToPoint(P(t),e)},unproject:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.pointToLatLng(m(t),e)},layerPointToLatLng:function(t){var e=m(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(P(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(P(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(B(t))},distance:function(t,e){return this.options.crs.distance(P(t),P(e))},containerPointToLayerPoint:function(t){return m(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return m(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(m(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(P(t)))},mouseEventToContainerPoint:function(t){return Ii(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=Ei(t);if(e){if(e._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");v(e,"scroll",this._onScroll,this),this._containerId=x(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&d.any3d,g(t,"leaflet-container"+(d.touch?" leaflet-touch":"")+(d.retina?" leaflet-retina":"")+(d.ielt9?" leaflet-oldie":"")+(d.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=Wt(t,"position");e!=="absolute"&&e!=="relative"&&e!=="fixed"&&e!=="sticky"&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),N(this._mapPane,new p(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(g(t.markerPane,"leaflet-zoom-hide"),g(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){N(this._mapPane,new p(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var o=this._zoom!==e;this._moveStart(o,i)._move(t,e)._moveEnd(o),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){e===void 0&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((o||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return K(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){N(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[x(this._container)]=this;var e=t?z:v;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),d.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){K(this._resizeRequest),this._resizeRequest=U(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i=[],n,o=e==="mouseout"||e==="mouseover",s=t.target||t.srcElement,r=!1;s;){if(n=this._targets[x(s)],n&&(e==="click"||e==="preclick")&&this._draggableMoved(n)){r=!0;break}if(n&&n.listens(e,!0)&&(o&&!Ve(s,t)||(i.push(n),o))||s===this._container)break;s=s.parentNode}return!i.length&&!r&&!o&&this.listens(e,!0)&&(i=[this]),i},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||t.type==="click"&&this._isClickDisabled(e))){var i=t.type;i==="mousedown"&&De(e),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if(t.type==="click"){var n=w({},t);n.type="preclick",this._fireDOMEvent(n,n.type,i)}var o=this._findEventTargets(t,e);if(i){for(var s=[],r=0;r0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=d.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){A(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return(e&&e.animate)!==!0&&!this.getSize().contains(i)?!1:(this.panBy(i,e),!0)},_createAnimProxy:function(){var t=this._proxy=M("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(e){var i=Ze,n=this._proxy.style[i];gt(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){O(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();gt(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n);return i.animate!==!0&&!this.getSize().contains(o)?!1:(U(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,g(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(C(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&A(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function eo(t,e){return new T(t,e)}var Q=ht.extend({options:{position:"topright"},initialize:function(t){S(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return g(e,"leaflet-control"),i.indexOf("bottom")!==-1?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(O(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),$t=function(t){return new Q(t)};T.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=M("div",e+"control-container",this._container);function n(o,s){var r=e+o+" "+e+s;t[o+s]=M("div",r,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)O(this._controlCorners[t]);O(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ri=Q.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(x(t.target)),i=e.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e=document.createElement("label"),i=this._map.hasLayer(t.layer),n;t.overlay?(n=document.createElement("input"),n.type="checkbox",n.className="leaflet-control-layers-selector",n.defaultChecked=i):n=this._createRadioElement("leaflet-base-layers_"+x(this),i),this._layerControlInputs.push(n),n.layerId=x(t.layer),v(n,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("span");e.appendChild(s),s.appendChild(n),s.appendChild(o);var r=t.overlay?this._overlaysList:this._baseLayersList;return r.appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){if(!this._preventClick){var t=this._layerControlInputs,e,i,n=[],o=[];this._handlingClick=!0;for(var s=t.length-1;s>=0;s--)e=t[s],i=this._getLayer(e.layerId).layer,e.checked?n.push(i):e.checked||o.push(i);for(s=0;s=0;o--)e=t[o],i=this._getLayer(e.layerId).layer,e.disabled=i.options.minZoom!==void 0&&ni.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,v(t,"click",F),this.expand();var e=this;setTimeout(function(){z(t,"click",F),e._preventClick=!1})}}),io=function(t,e,i){return new Ri(t,e,i)},qe=Q.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=M("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,o){var s=M("a",i,n);return s.innerHTML=t,s.href="#",s.title=e,s.setAttribute("role","button"),s.setAttribute("aria-label",e),qt(s),v(s,"click",xt),v(s,"click",o,this),v(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";A(this._zoomInButton,e),A(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(g(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(g(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});T.mergeOptions({zoomControl:!0}),T.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new qe,this.addControl(this.zoomControl))});var no=function(t){return new qe(t)},Di=Q.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=M("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=M("div",e,i)),t.imperial&&(this._iScale=M("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e=t*3.2808399,i,n,o;e>5280?(i=e/5280,n=this._getRoundNum(i),this._updateScale(this._iScale,n+" mi",n/i)):(o=this._getRoundNum(e),this._updateScale(this._iScale,o+" ft",o/e))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),oo=function(t){return new Di(t)},so='',$e=Q.extend({options:{position:"bottomright",prefix:''+(d.inlineSvg?so+" ":"")+"Leaflet"},initialize:function(t){S(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=M("div","leaflet-control-attribution"),qt(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(' ')}}});T.mergeOptions({attributionControl:!0}),T.addInitHook(function(){this.options.attributionControl&&new $e().addTo(this)});var ro=function(t){return new $e(t)};Q.Layers=Ri,Q.Zoom=qe,Q.Scale=Di,Q.Attribution=$e,$t.layers=io,$t.zoom=no,$t.scale=oo,$t.attribution=ro;var ot=ht.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});ot.addTo=function(t,e){return t.addHandler(e,this),this};var ao={Events:j},Fi=d.touch?"touchstart mousedown":"mousedown",pt=Rt.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){S(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(v(this._dragStartTarget,Fi,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(pt._dragging===this&&this.finishDrag(!0),z(this._dragStartTarget,Fi,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!Oe(this._element,"leaflet-zoom-anim"))){if(t.touches&&t.touches.length!==1){pt._dragging===this&&this.finishDrag();return}if(!(pt._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches)&&(pt._dragging=this,this._preventOutline&&De(this._element),Be(),Ut(),!this._moving)){this.fire("down");var e=t.touches?t.touches[0]:t,i=Zi(this._element);this._startPoint=new p(e.clientX,e.clientY),this._startPos=yt(this._element),this._parentScale=Fe(i);var n=t.type==="mousedown";v(document,n?"mousemove":"touchmove",this._onMove,this),v(document,n?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(t){if(this._enabled){if(t.touches&&t.touches.length>1){this._moved=!0;return}var e=t.touches&&t.touches.length===1?t.touches[0]:t,i=new p(e.clientX,e.clientY)._subtract(this._startPoint);!i.x&&!i.y||Math.abs(i.x)+Math.abs(i.y)s&&(r=a,s=h);s>i&&(e[r]=1,Ke(t,e,i,n,r),Ke(t,e,i,r,o))}function co(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;ne&&(i.push(t[n]),o=n);return oe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i}function fo(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function jt(t,e,i,n){var o=e.x,s=e.y,r=i.x-o,a=i.y-s,h=r*r+a*a,u;return h>0&&(u=((t.x-o)*r+(t.y-s)*a)/h,u>1?(o=i.x,s=i.y):u>0&&(o+=r*u,s+=a*u)),r=t.x-o,a=t.y-s,n?r*r+a*a:new p(o,s)}function X(t){return!W(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]<"u"}function $i(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),X(t)}function ji(t,e){var i,n,o,s,r,a,h,u;if(!t||t.length===0)throw new Error("latlngs not passed");X(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var f=P([0,0]),_=B(t),y=_.getNorthWest().distanceTo(_.getSouthWest())*_.getNorthEast().distanceTo(_.getNorthWest());y<1700&&(f=je(t));var H=t.length,D=[];for(i=0;in){h=(s-n)/o,u=[a.x-h*(a.x-r.x),a.y-h*(a.y-r.y)];break}var q=e.unproject(m(u));return P([q.lat+f.lat,q.lng+f.lng])}var _o={__proto__:null,simplify:Ui,pointToSegmentDistance:Gi,closestPointOnSegment:uo,clipSegment:qi,_getEdgeIntersection:ue,_getBitCode:Pt,_sqClosestPointOnSegment:jt,isFlat:X,_flat:$i,polylineCenter:ji},Ye={project:function(t){return new p(t.lng,t.lat)},unproject:function(t){return new k(t.y,t.x)},bounds:new Z([-180,-90],[180,90])},Xe={R:6378137,R_MINOR:6356752314245179e-9,bounds:new Z([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,o=this.R_MINOR/i,s=Math.sqrt(1-o*o),r=s*Math.sin(n),a=Math.tan(Math.PI/4-n/2)/Math.pow((1-r)/(1+r),s/2);return n=-i*Math.log(Math.max(a,1e-10)),new p(t.lng*e*i,n)},unproject:function(t){for(var e=180/Math.PI,i=this.R,n=this.R_MINOR/i,o=Math.sqrt(1-n*n),s=Math.exp(-t.y/i),r=Math.PI/2-2*Math.atan(s),a=0,h=.1,u;a<15&&Math.abs(h)>1e-7;a++)u=o*Math.sin(r),u=Math.pow((1-u)/(1+u),o/2),h=Math.PI/2-2*Math.atan(s*u)-r,r+=h;return new k(r*e,t.x*e/i)}},mo={__proto__:null,LonLat:Ye,Mercator:Xe,SphericalMercator:Le},po=w({},mt,{code:"EPSG:3395",projection:Xe,transformation:function(){var t=.5/(Math.PI*Xe.R);return Dt(t,.5,-t,.5)}()}),Ki=w({},mt,{code:"EPSG:4326",projection:Ye,transformation:Dt(1/180,1,-1/180,.5)}),vo=w({},ut,{projection:Ye,transformation:Dt(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});ut.Earth=mt,ut.EPSG3395=po,ut.EPSG3857=be,ut.EPSG900913=Pn,ut.EPSG4326=Ki,ut.Simple=vo;var tt=Rt.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[x(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[x(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});T.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=x(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=x(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return x(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){t=t?W(t)?t:[t]:[];for(var e=0,i=t.length;ethis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&e[0]instanceof k&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){ct.prototype._setLatLngs.call(this,t),X(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return X(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new p(e,e);if(t=new Z(t.min.subtract(i),t.max.add(i)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}for(var n=0,o=this._rings.length,s;nt.y!=o.y>t.y&&t.x<(o.x-n.x)*(t.y-n.y)/(o.y-n.y)+n.x&&(e=!e);return e||ct.prototype._containsPoint.call(this,t,!0)}});function bo(t,e){return new Et(t,e)}var ft=lt.extend({initialize:function(t,e){S(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e=W(t)?t:t.features,i,n,o;if(e){for(i=0,n=e.length;i0&&o.push(o[0].slice()),o}function Zt(t,e){return t.feature?w({},t.feature,{geometry:e}):me(e)}function me(t){return t.type==="Feature"||t.type==="FeatureCollection"?t:{type:"Feature",properties:{},geometry:t}}var ei={toGeoJSON:function(t){return Zt(this,{type:"Point",coordinates:ti(this.getLatLng(),t)})}};le.include(ei),Je.include(ei),ce.include(ei),ct.include({toGeoJSON:function(t){var e=!X(this._latlngs),i=_e(this._latlngs,e?1:0,!1,t);return Zt(this,{type:(e?"Multi":"")+"LineString",coordinates:i})}}),Et.include({toGeoJSON:function(t){var e=!X(this._latlngs),i=e&&!X(this._latlngs[0]),n=_e(this._latlngs,i?2:e?1:0,!0,t);return e||(n=[n]),Zt(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),St.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),Zt(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(e==="MultiPoint")return this.toMultiPoint(t);var i=e==="GeometryCollection",n=[];return this.eachLayer(function(o){if(o.toGeoJSON){var s=o.toGeoJSON(t);if(i)n.push(s.geometry);else{var r=me(s);r.type==="FeatureCollection"?n.push.apply(n,r.features):n.push(r)}}}),i?Zt(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});function Ji(t,e){return new ft(t,e)}var Mo=Ji,pe=tt.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=B(e),S(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(g(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){O(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&Ct(this._image),this},bringToBack:function(){return this._map&&kt(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=B(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._url.tagName==="IMG",e=this._image=t?this._url:M("img");if(g(e,"leaflet-image-layer"),this._zoomAnimated&&g(e,"leaflet-zoom-animated"),this.options.className&&g(e,this.options.className),e.onselectstart=E,e.onmousemove=E,e.onload=C(this.fire,this,"load"),e.onerror=C(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(e.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t){this._url=e.src;return}e.src=this._url,e.alt=this.options.alt},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;gt(this._image,i,e)},_reset:function(){var t=this._image,e=new Z(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();N(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){Y(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),Co=function(t,e,i){return new pe(t,e,i)},Qi=pe.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t=this._url.tagName==="VIDEO",e=this._image=t?this._url:M("video");if(g(e,"leaflet-image-layer"),this._zoomAnimated&&g(e,"leaflet-zoom-animated"),this.options.className&&g(e,this.options.className),e.onselectstart=E,e.onmousemove=E,e.onloadeddata=C(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],o=0;o0?n:[e.src];return}W(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var s=0;so?(e.height=o+"px",g(t,s)):A(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();N(this._container,e.add(i))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var t=this._map,e=parseInt(Wt(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,o=new p(this._containerLeft,-i-this._containerBottom);o._add(yt(this._container));var s=t.layerPointToContainerPoint(o),r=m(this.options.autoPanPadding),a=m(this.options.autoPanPaddingTopLeft||r),h=m(this.options.autoPanPaddingBottomRight||r),u=t.getSize(),f=0,_=0;s.x+n+h.x>u.x&&(f=s.x+n-u.x+h.x),s.x-f-a.x<0&&(f=s.x-a.x),s.y+i+h.y>u.y&&(_=s.y+i-u.y+h.y),s.y-_-a.y<0&&(_=s.y-a.y),(f||_)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([f,_]))}},_getAnchor:function(){return m(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),zo=function(t,e){return new ve(t,e)};T.mergeOptions({closePopupOnClick:!0}),T.include({openPopup:function(t,e,i){return this._initOverlay(ve,t,e,i).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),tt.include({bindPopup:function(t,e){return this._popup=this._initOverlay(ve,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof lt||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(!(!this._popup||!this._map)){xt(t);var e=t.layer||t.target;if(this._popup._source===e&&!(e instanceof vt)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng);return}this._popup._source=e,this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){t.originalEvent.keyCode===13&&this._openPopup(t)}});var ge=st.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){st.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){st.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=st.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip",e=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=M("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+x(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,n=this._map,o=this._container,s=n.latLngToContainerPoint(n.getCenter()),r=n.layerPointToContainerPoint(t),a=this.options.direction,h=o.offsetWidth,u=o.offsetHeight,f=m(this.options.offset),_=this._getAnchor();a==="top"?(e=h/2,i=u):a==="bottom"?(e=h/2,i=0):a==="center"?(e=h/2,i=u/2):a==="right"?(e=0,i=u/2):a==="left"?(e=h,i=u/2):r.xthis.options.maxZoom||in?this._retainParent(o,s,r,n):!1)},_retainChildren:function(t,e,i,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*e;s<2*e+2;s++){var r=new p(o,s);r.z=i+1;var a=this._tileCoordsToKey(r),h=this._tiles[a];if(h&&h.active){h.retain=!0;continue}else h&&h.loaded&&(h.retain=!0);i+1this.options.maxZoom||this.options.minZoom!==void 0&&o1){this._setView(t,i);return}for(var _=o.min.y;_<=o.max.y;_++)for(var y=o.min.x;y<=o.max.x;y++){var H=new p(y,_);if(H.z=this._tileZoom,!!this._isValidTile(H)){var D=this._tiles[this._tileCoordsToKey(H)];D?D.current=!0:r.push(H)}}if(r.sort(function(q,At){return q.distanceTo(s)-At.distanceTo(s)}),r.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var J=document.createDocumentFragment();for(y=0;yi.max.x)||!e.wrapLat&&(t.yi.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return B(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),o=n.add(i),s=e.unproject(n,t.z),r=e.unproject(o,t.z);return[s,r]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new V(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new p(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(O(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){g(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=E,t.onmousemove=E,d.ielt9&&this.options.opacity<1&&Y(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),C(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&U(C(this._tileReady,this,t,null,o)),N(o,i),this._tiles[n]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);i=this._tiles[n],i&&(i.loaded=+new Date,this._map._fadeAnimated?(Y(i.el,0),K(this._fadeFrame),this._fadeFrame=U(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(g(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),d.ielt9||!this._map._fadeAnimated?U(this._pruneTiles,this):setTimeout(C(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new p(this._wrapX?_t(t.x,this._wrapX):t.x,this._wrapY?_t(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new Z(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function Oo(t){return new Yt(t)}var Ot=Yt.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,e=S(this,e),e.detectRetina&&d.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),typeof e.subdomains=="string"&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&e===void 0&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return v(i,"load",C(this._tileOnLoad,this,e,i)),v(i,"error",C(this._tileOnError,this,e,i)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(i.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:d.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return Nt(this._url,w(e,this.options))},_tileOnLoad:function(t,e){d.ielt9?setTimeout(C(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,n=this.options.zoomOffset;return i&&(t=e-t),t+n},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=E,e.onerror=E,!e.complete)){e.src=ee;var i=this._tiles[t].coords;O(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:i})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",ee),Yt.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(!(!this._map||i&&i.getAttribute("src")===ee))return Yt.prototype._tileReady.call(this,t,e,i)}});function nn(t,e){return new Ot(t,e)}var on=Ot.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=w({},this.defaultWmsParams);for(var n in e)n in this.options||(i[n]=e[n]);e=S(this,e);var o=e.detectRetina&&d.retina?2:1,s=this.getTileSize();i.width=s.x*o,i.height=s.y*o,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,Ot.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=G(i.project(e[0]),i.project(e[1])),o=n.min,s=n.max,r=(this._wmsVersion>=1.3&&this._crs===Ki?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),a=Ot.prototype.getTileUrl.call(this,t);return a+Bt(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return w(this.wmsParams,t),e||this.redraw(),this}});function Ao(t,e){return new on(t,e)}Ot.WMS=on,nn.wms=Ao;var dt=tt.extend({options:{padding:.1},initialize:function(t){S(this,t),x(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),g(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),s=n.multiplyBy(-i).add(o).subtract(this._map._getNewPixelOrigin(t,e));d.any3d?gt(this._container,s,i):N(this._container,s)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new Z(i,i.add(e.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),sn=dt.extend({options:{tolerance:0},getEvents:function(){var t=dt.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){dt.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");v(t,"mousemove",this._onMouseMove,this),v(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),v(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){K(this._redrawRequest),delete this._ctx,O(this._container),z(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var t;this._redrawBounds=null;for(var e in this._layers)t=this._layers[e],t._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){dt.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=d.retina?2:1;N(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",d.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){dt.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[x(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[x(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(typeof t.options.dashArray=="string"){var e=t.options.dashArray.split(/[, ]+/),i=[],n,o;for(o=0;o')}}catch{}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Io={_initContainer:function(){this._container=M("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(dt.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Xt("shape");g(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Xt("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[x(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;O(e),t.removeInteractiveTarget(e),delete this._layers[x(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e||(e=t._stroke=Xt("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=W(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=Xt("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,"+65535*360)},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){Ct(t._container)},_bringToBack:function(t){kt(t._container)}},ye=d.vml?Xt:ui,Jt=dt.extend({_initContainer:function(){this._container=ye("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=ye("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){O(this._container),z(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){dt.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;(!this._svgSize||!this._svgSize.equals(e))&&(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),N(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=ye("path");t.options.className&&g(e,t.options.className),t.options.interactive&&g(e,"leaflet-interactive"),this._updateStyle(t),this._layers[x(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){O(t._path),t.removeInteractiveTarget(t._path),delete this._layers[x(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,li(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n=Math.max(Math.round(t._radiusY),1)||i,o="a"+i+","+n+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+o+i*2+",0 "+o+-i*2+",0 ";this._setPath(t,s)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){Ct(t._path)},_bringToBack:function(t){kt(t._path)}});d.vml&&Jt.include(Io);function an(t){return d.svg||d.vml?new Jt(t):null}T.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if(t==="overlayPane"||t===void 0)return!1;var e=this._paneRenderers[t];return e===void 0&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&rn(t)||an(t)}});var hn=Et.extend({initialize:function(t,e){Et.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=B(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Bo(t,e){return new hn(t,e)}Jt.create=ye,Jt.pointsToPath=li,ft.geometryToLayer=fe,ft.coordsToLatLng=Qe,ft.coordsToLatLngs=de,ft.latLngToCoords=ti,ft.latLngsToCoords=_e,ft.getFeature=Zt,ft.asFeature=me,T.mergeOptions({boxZoom:!0});var un=ot.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){v(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){z(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){O(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||t.which!==1&&t.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Ut(),Be(),this._startPoint=this._map.mouseEventToContainerPoint(t),v(document,{contextmenu:xt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=M("div","leaflet-zoom-box",this._container),g(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new Z(this._point,this._startPoint),i=e.getSize();N(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(O(this._box),A(this._container,"leaflet-crosshair")),Gt(),Ne(),z(document,{contextmenu:xt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if(!(t.which!==1&&t.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(C(this._resetState,this),0);var e=new V(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){t.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});T.addInitHook("addHandler","boxZoom",un),T.mergeOptions({doubleClickZoom:!0});var ln=ot.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,o=t.originalEvent.shiftKey?i-n:i+n;e.options.doubleClickZoom==="center"?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});T.addInitHook("addHandler","doubleClickZoom",ln),T.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var cn=ot.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new pt(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}g(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){A(this._map._container,"leaflet-grab"),A(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=B(this._map.options.maxBounds);this._offsetLimit=G(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.xe.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,r=Math.abs(o+i)0?s:-s))-e;this._delta=0,this._startTime=null,r&&(t.options.scrollWheelZoom==="center"?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});T.addInitHook("addHandler","scrollWheelZoom",dn);var No=600;T.mergeOptions({tapHold:d.touchNative&&d.safari&&d.mobile,tapTolerance:15});var _n=ot.extend({addHooks:function(){v(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){z(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),t.touches.length===1){var e=t.touches[0];this._startPos=this._newPos=new p(e.clientX,e.clientY),this._holdTimeout=setTimeout(C(function(){this._cancel(),this._isTapValid()&&(v(document,"touchend",F),v(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),No),v(document,"touchend touchcancel contextmenu",this._cancel,this),v(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){z(document,"touchend",F),z(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),z(document,"touchend touchcancel contextmenu",this._cancel,this),z(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new p(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var i=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});i._simulated=!0,e.target.dispatchEvent(i)}});T.addInitHook("addHandler","tapHold",_n),T.mergeOptions({touchZoom:d.touch,bounceAtZoomLimits:!0});var mn=ot.extend({addHooks:function(){g(this._map._container,"leaflet-touch-zoom"),v(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){A(this._map._container,"leaflet-touch-zoom"),z(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(!(!t.touches||t.touches.length!==2||e._animatingZoom||this._zooming)){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),e.options.touchZoom!=="center"&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),v(document,"touchmove",this._onTouchMove,this),v(document,"touchend touchcancel",this._onTouchEnd,this),F(t)}},_onTouchMove:function(t){if(!(!t.touches||t.touches.length!==2||!this._zooming)){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),o=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoome.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),e.options.touchZoom==="center"){if(this._center=this._startLatLng,o===1)return}else{var s=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(o===1&&s.x===0&&s.y===0)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),K(this._animRequest);var r=C(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=U(r,this,!0),F(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,K(this._animRequest),z(document,"touchmove",this._onTouchMove,this),z(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});T.addInitHook("addHandler","touchZoom",mn),T.BoxZoom=un,T.DoubleClickZoom=ln,T.Drag=cn,T.Keyboard=fn,T.ScrollWheelZoom=dn,T.TapHold=_n,T.TouchZoom=mn,l.Bounds=Z,l.Browser=d,l.CRS=ut,l.Canvas=sn,l.Circle=Je,l.CircleMarker=ce,l.Class=ht,l.Control=Q,l.DivIcon=en,l.DivOverlay=st,l.DomEvent=to,l.DomUtil=Jn,l.Draggable=pt,l.Evented=Rt,l.FeatureGroup=lt,l.GeoJSON=ft,l.GridLayer=Yt,l.Handler=ot,l.Icon=zt,l.ImageOverlay=pe,l.LatLng=k,l.LatLngBounds=V,l.Layer=tt,l.LayerGroup=St,l.LineUtil=_o,l.Map=T,l.Marker=le,l.Mixin=ao,l.Path=vt,l.Point=p,l.PolyUtil=ho,l.Polygon=Et,l.Polyline=ct,l.Popup=ve,l.PosAnimation=Ni,l.Projection=mo,l.Rectangle=hn,l.Renderer=dt,l.SVG=Jt,l.SVGOverlay=tn,l.TileLayer=Ot,l.Tooltip=ge,l.Transformation=Te,l.Util=wn,l.VideoOverlay=Qi,l.bind=C,l.bounds=G,l.canvas=rn,l.circle=Lo,l.circleMarker=Po,l.control=$t,l.divIcon=Zo,l.extend=w,l.featureGroup=yo,l.geoJSON=Ji,l.geoJson=Mo,l.gridLayer=Oo,l.icon=wo,l.imageOverlay=Co,l.latLng=P,l.latLngBounds=B,l.layerGroup=go,l.map=eo,l.marker=xo,l.point=m,l.polygon=bo,l.polyline=To,l.popup=zo,l.rectangle=Bo,l.setOptions=S,l.stamp=x,l.svg=an,l.svgOverlay=So,l.tileLayer=nn,l.tooltip=Eo,l.transformation=Dt,l.version=I,l.videoOverlay=ko;var Ro=window.L;l.noConflict=function(){return window.L=Ro,this},window.L=l})})(ni,ni.exports);var Ko=ni.exports;const Jo=jo(Ko),Lt={popupOptions:{minWidth:window.innerWidth>=768?350:200,maxWidth:600,maxHeight:window.innerWidth>=768?800:500,closeButton:!0},getAdminName:c=>{let b="These tags were updated by ";return c.name||c.username?(c.name&&(b+=c.name),c.username&&(b+=" @"+c.username)):b+="an admin",b+="
at "+yn(c.created_at).format("LLL"),b},getRemovedTags:c=>{let b="Removed Tags: ";return c.customTags&&(c.customTags.forEach(l=>{b+=l+" "}),b+="
"),c.tags&&Object.keys(c.tags).forEach(l=>{Object.entries(c.tags[l]).forEach(I=>{b+=rt.t(`litter.${l}.${I[0]}`)+`(${I[1]})`}),b+="
"}),b},scrollPopupToBottom:c=>{var l,I;let b=(I=(l=c.popup)==null?void 0:l.getElement())==null?void 0:I.querySelector(".leaflet-popup-content");b&&(b.scrollTop=b.scrollHeight)},parseTags:(c,b,l)=>{if(!c&&!b)return l?rt.t("litter.not-tagged-yet"):rt.t("litter.not-verified");let I="",w=c?c.split(","):[];return w.pop(),w.forEach(at=>{let C=at.split(" ");C[0]==="art.item"?I+=rt.t("litter."+C[0])+"
":I+=rt.t("litter."+C[0])+": "+C[1]+"
"}),I},formatUserName:(c,b)=>c||b?`${rt.t("locations.cityVueMap.by")} ${c||""} ${b?"@"+b:""}`:"",formatPickedUp:c=>c?`${rt.t("litter.presence.picked-up")}`:`${rt.t("litter.presence.still-there")}`,formatTeam:c=>c?`${rt.t("common.team")} ${c}`:"",formatPhotoTakenTime:c=>rt.t("locations.cityVueMap.taken-on")+" "+yn(c).format("LLL"),getMapImagePopupContent:(c,b=null)=>{var Tt,et,S,Bt,te,Nt,W,bt;const l=Lt.formatUserName(c.name,c.username),I=c.filename!=="/assets/images/waiting.png",w=(Tt=c.custom_tags)==null?void 0:Tt.join("
"),at=Lt.parseTags(c.result_string,w,I),C=Lt.formatPhotoTakenTime(c.datetime),It=Lt.formatTeam(c.team),x=Lt.formatPickedUp(c.picked_up),Qt=c.result_string&&c.result_string.includes("art.item"),_t=c.social&&Object.keys(c.social).length,E=c.admin?Lt.getAdminName(c.admin):null,$=(et=c.admin)!=null&&et.removedTags?Lt.getRemovedTags(c.admin.removedTags):"";return` - Litter photo -
- ${at?"
"+at+"
":""} - ${w?"
"+w+"
":""} - ${Qt?"":"
"+x+"
"} -
${C}
- ${l?"
"+l+"
":""} - ${It?'
'+It+"
":""} - ${_t?'":""} - ${b?'':""} - ${E?'

'+E+"

":""} - ${$?'

'+$+"

":""} -
`},getCleanupContent:(c,b=null)=>{let l="";return b===null?l="Log in to join the cleanup":c.users.find(I=>I.user_id===b)?(l="

You have joined the cleanup

",b===c.user_id?l+="

You cannot leave the cleanup you created

":l+=`Click here to leave`):l=`Click here to join`,` -
-

${c.name}

-

Attending: ${c.users.length} ${c.users.length===1?"person":"people"}

-

${c.description}

-

When? ${c.startsAt}

-

${c.timeDiff}

- ${l} -
- `},getMerchantContent:c=>{let b="";c.photos.length>0&&c.photos.forEach(I=>{b+=`
photo
`});let l=c.website?`${c.website}`:"";return` -
-
-
- ${b} -
-
-
-
-

Name: ${c.name}

-

About this merchant: ${c.about?c.about:""}

-

Website: ${l}

-
- `}};export{Jo as L,Lt as h,Ko as l}; diff --git a/public/build/assets/mapHelpers-DmBbMbJe.js b/public/build/assets/mapHelpers-DmBbMbJe.js new file mode 100644 index 00000000..0fe1bd19 --- /dev/null +++ b/public/build/assets/mapHelpers-DmBbMbJe.js @@ -0,0 +1,60 @@ +import{c as jo,g as Ko,i as rt}from"./app-BwSojYvl.js";import{h as yn}from"./moment-zH0z38ay.js";var xe={exports:{}};/* @preserve + * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com + * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade + */var wn;function Yo(){return wn||(wn=1,function(c,b){(function(l,I){I(b)})(jo,function(l){var I="1.9.4";function w(t){var e,i,n,o;for(i=1,n=arguments.length;i"u"||!L||!L.Mixin)){t=W(t)?t:[t];for(var e=0;e0?Math.floor(t):Math.ceil(t)};p.prototype={clone:function(){return new p(this.x,this.y)},add:function(t){return this.clone()._add(m(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(m(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new p(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new p(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=ai(this.x),this.y=ai(this.y),this},distanceTo:function(t){t=m(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=m(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=m(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+$(this.x)+", "+$(this.y)+")"}};function m(t,e,i){return t instanceof p?t:W(t)?new p(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new p(t.x,t.y):new p(t,e,i)}function Z(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=G(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>=e.x&&n.x<=i.x,r=o.y>=e.y&&n.y<=i.y;return s&&r},overlaps:function(t){t=G(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>e.x&&n.xe.y&&n.y=e.lat&&o.lat<=i.lat&&n.lng>=e.lng&&o.lng<=i.lng},intersects:function(t){t=B(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=e.lat&&n.lat<=i.lat,r=o.lng>=e.lng&&n.lng<=i.lng;return s&&r},overlaps:function(t){t=B(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>e.lat&&n.late.lng&&n.lng1,Bn=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",E,e),window.removeEventListener("testPassiveEventSupport",E,e)}catch{}return t}(),Nn=function(){return!!document.createElement("canvas").getContext}(),Ee=!!(document.createElementNS&&ui("svg").createSVGRect),Rn=!!Ee&&function(){var t=document.createElement("div");return t.innerHTML="",(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),Dn=!Ee&&function(){try{var t=document.createElement("div");t.innerHTML='';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&typeof e.adj=="object"}catch{return!1}}(),Fn=navigator.platform.indexOf("Mac")===0,Hn=navigator.platform.indexOf("Linux")===0;function it(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var d={ie,ielt9:Tn,edge:ci,webkit:Se,android:fi,android23:di,androidStock:Mn,opera:ke,chrome:_i,gecko:mi,safari:Cn,phantom:pi,opera12:vi,win:Sn,ie3d:gi,webkit3d:ze,gecko3d:yi,any3d:kn,mobile:Ft,mobileWebkit:zn,mobileWebkit3d:En,msPointer:wi,pointer:xi,touch:Zn,touchNative:Pi,mobileOpera:On,mobileGecko:An,retina:In,passiveEvents:Bn,canvas:Nn,svg:Ee,vml:Dn,inlineSvg:Rn,mac:Fn,linux:Hn},Li=d.msPointer?"MSPointerDown":"pointerdown",Ti=d.msPointer?"MSPointerMove":"pointermove",bi=d.msPointer?"MSPointerUp":"pointerup",Mi=d.msPointer?"MSPointerCancel":"pointercancel",Ze={touchstart:Li,touchmove:Ti,touchend:bi,touchcancel:Mi},Ci={touchstart:$n,touchmove:ne,touchend:ne,touchcancel:ne},Mt={},Si=!1;function Wn(t,e,i){return e==="touchstart"&&qn(),Ci[e]?(i=Ci[e].bind(this,i),t.addEventListener(Ze[e],i,!1),i):(console.warn("wrong event specified:",e),E)}function Un(t,e,i){if(!Ze[e]){console.warn("wrong event specified:",e);return}t.removeEventListener(Ze[e],i,!1)}function Gn(t){Mt[t.pointerId]=t}function Vn(t){Mt[t.pointerId]&&(Mt[t.pointerId]=t)}function ki(t){delete Mt[t.pointerId]}function qn(){Si||(document.addEventListener(Li,Gn,!0),document.addEventListener(Ti,Vn,!0),document.addEventListener(bi,ki,!0),document.addEventListener(Mi,ki,!0),Si=!0)}function ne(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){e.touches=[];for(var i in Mt)e.touches.push(Mt[i]);e.changedTouches=[e],t(e)}}function $n(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&F(e),ne(t,e)}function jn(t){var e={},i,n;for(n in t)i=t[n],e[n]=i&&i.bind?i.bind(t):i;return t=e,e.type="dblclick",e.detail=2,e.isTrusted=!1,e._simulated=!0,e}var Kn=200;function Yn(t,e){t.addEventListener("dblclick",e);var i=0,n;function o(s){if(s.detail!==1){n=s.detail;return}if(!(s.pointerType==="mouse"||s.sourceCapabilities&&!s.sourceCapabilities.firesTouchEvents)){var r=Ai(s);if(!(r.some(function(h){return h instanceof HTMLLabelElement&&h.attributes.for})&&!r.some(function(h){return h instanceof HTMLInputElement||h instanceof HTMLSelectElement}))){var a=Date.now();a-i<=Kn?(n++,n===2&&e(jn(s))):n=1,i=a}}}return t.addEventListener("click",o),{dblclick:e,simDblclick:o}}function Xn(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var Oe=re(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Ht=re(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),zi=Ht==="webkitTransition"||Ht==="OTransition"?Ht+"End":"transitionend";function Ei(t){return typeof t=="string"?document.getElementById(t):t}function Wt(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||i==="auto")&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return i==="auto"?null:i}function M(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function O(t){var e=t.parentNode;e&&e.removeChild(t)}function oe(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Ct(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function St(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function Ae(t,e){if(t.classList!==void 0)return t.classList.contains(e);var i=se(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function g(t,e){if(t.classList!==void 0)for(var i=et(e),n=0,o=i.length;n0?2*window.devicePixelRatio:1;function Bi(t){return d.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/to:t.deltaY&&t.deltaMode===1?-t.deltaY*20:t.deltaY&&t.deltaMode===2?-t.deltaY*60:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?-t.detail*20:t.detail?t.detail/-32765*60:0}function qe(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch{return!1}return i!==t}var eo={__proto__:null,on:v,off:z,stopPropagation:wt,disableScrollPropagation:Ve,disableClickPropagation:qt,preventDefault:F,stop:xt,getPropagationPath:Ai,getMousePosition:Ii,getWheelDelta:Bi,isExternalTarget:qe,addListener:v,removeListener:z},Ni=Rt.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=yt(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=U(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=this._duration*1e3;ethis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,B(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){e=e||{};var i=m(e.paddingTopLeft||e.padding||[0,0]),n=m(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),s=this.project(t),r=this.getPixelBounds(),a=G([r.min.add(i),r.max.subtract(n)]),h=a.getSize();if(!a.contains(s)){this._enforcingBounds=!0;var u=s.subtract(a.getCenter()),f=a.extend(s).getSize().subtract(h);o.x+=u.x<0?-f.x:f.x,o.y+=u.y<0?-f.y:f.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=w({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),o=i.divideBy(2).round(),s=n.subtract(o);return!s.x&&!s.y?this:(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(C(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=w({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=C(this._handleGeolocationResponse,this),i=C(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,i=t.message||(e===1?"permission denied":e===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=t.coords.latitude,i=t.coords.longitude,n=new S(e,i),o=n.toBounds(t.coords.accuracy*2),s=this._locateOptions;if(s.setView){var r=this.getBoundsZoom(o);this.setView(n,s.maxZoom?Math.min(r,s.maxZoom):r)}var a={latlng:n,bounds:o,timestamp:t.timestamp};for(var h in t.coords)typeof t.coords[h]=="number"&&(a[h]=t.coords[h]);this.fire("locationfound",a)}},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),O(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(K(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)O(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),n=M("div",i,e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new V(e,i)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=B(t),i=m(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),h=this.getSize().subtract(i),u=G(this.project(a,n),this.project(r,n)).getSize(),f=d.any3d?this.options.zoomSnap:1,_=h.x/u.x,y=h.y/u.y,H=e?Math.max(_,y):Math.min(_,y);return n=this.getScaleZoom(H,n),f&&(n=Math.round(n/(f/100))*(f/100),n=e?Math.ceil(n/f)*f:Math.floor(n/f)*f),Math.max(o,Math.min(s,n))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new p(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new Z(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===void 0?this.getZoom():t)},getPane:function(t){return typeof t=="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=e===void 0?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=e===void 0?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.latLngToPoint(P(t),e)},unproject:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.pointToLatLng(m(t),e)},layerPointToLatLng:function(t){var e=m(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(P(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(P(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(B(t))},distance:function(t,e){return this.options.crs.distance(P(t),P(e))},containerPointToLayerPoint:function(t){return m(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return m(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(m(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(P(t)))},mouseEventToContainerPoint:function(t){return Ii(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=Ei(t);if(e){if(e._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");v(e,"scroll",this._onScroll,this),this._containerId=x(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&d.any3d,g(t,"leaflet-container"+(d.touch?" leaflet-touch":"")+(d.retina?" leaflet-retina":"")+(d.ielt9?" leaflet-oldie":"")+(d.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=Wt(t,"position");e!=="absolute"&&e!=="relative"&&e!=="fixed"&&e!=="sticky"&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),N(this._mapPane,new p(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(g(t.markerPane,"leaflet-zoom-hide"),g(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){N(this._mapPane,new p(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var o=this._zoom!==e;this._moveStart(o,i)._move(t,e)._moveEnd(o),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){e===void 0&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((o||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return K(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){N(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[x(this._container)]=this;var e=t?z:v;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),d.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){K(this._resizeRequest),this._resizeRequest=U(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i=[],n,o=e==="mouseout"||e==="mouseover",s=t.target||t.srcElement,r=!1;s;){if(n=this._targets[x(s)],n&&(e==="click"||e==="preclick")&&this._draggableMoved(n)){r=!0;break}if(n&&n.listens(e,!0)&&(o&&!qe(s,t)||(i.push(n),o))||s===this._container)break;s=s.parentNode}return!i.length&&!r&&!o&&this.listens(e,!0)&&(i=[this]),i},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||t.type==="click"&&this._isClickDisabled(e))){var i=t.type;i==="mousedown"&&Fe(e),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if(t.type==="click"){var n=w({},t);n.type="preclick",this._fireDOMEvent(n,n.type,i)}var o=this._findEventTargets(t,e);if(i){for(var s=[],r=0;r0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=d.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){A(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return(e&&e.animate)!==!0&&!this.getSize().contains(i)?!1:(this.panBy(i,e),!0)},_createAnimProxy:function(){var t=this._proxy=M("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(e){var i=Oe,n=this._proxy.style[i];gt(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){O(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();gt(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n);return i.animate!==!0&&!this.getSize().contains(o)?!1:(U(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,g(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(C(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&A(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function io(t,e){return new T(t,e)}var Q=ht.extend({options:{position:"topright"},initialize:function(t){k(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return g(e,"leaflet-control"),i.indexOf("bottom")!==-1?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(O(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),$t=function(t){return new Q(t)};T.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=M("div",e+"control-container",this._container);function n(o,s){var r=e+o+" "+e+s;t[o+s]=M("div",r,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)O(this._controlCorners[t]);O(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ri=Q.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(x(t.target)),i=e.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e=document.createElement("label"),i=this._map.hasLayer(t.layer),n;t.overlay?(n=document.createElement("input"),n.type="checkbox",n.className="leaflet-control-layers-selector",n.defaultChecked=i):n=this._createRadioElement("leaflet-base-layers_"+x(this),i),this._layerControlInputs.push(n),n.layerId=x(t.layer),v(n,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("span");e.appendChild(s),s.appendChild(n),s.appendChild(o);var r=t.overlay?this._overlaysList:this._baseLayersList;return r.appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){if(!this._preventClick){var t=this._layerControlInputs,e,i,n=[],o=[];this._handlingClick=!0;for(var s=t.length-1;s>=0;s--)e=t[s],i=this._getLayer(e.layerId).layer,e.checked?n.push(i):e.checked||o.push(i);for(s=0;s=0;o--)e=t[o],i=this._getLayer(e.layerId).layer,e.disabled=i.options.minZoom!==void 0&&ni.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,v(t,"click",F),this.expand();var e=this;setTimeout(function(){z(t,"click",F),e._preventClick=!1})}}),no=function(t,e,i){return new Ri(t,e,i)},$e=Q.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=M("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,o){var s=M("a",i,n);return s.innerHTML=t,s.href="#",s.title=e,s.setAttribute("role","button"),s.setAttribute("aria-label",e),qt(s),v(s,"click",xt),v(s,"click",o,this),v(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";A(this._zoomInButton,e),A(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(g(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(g(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});T.mergeOptions({zoomControl:!0}),T.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new $e,this.addControl(this.zoomControl))});var oo=function(t){return new $e(t)},Di=Q.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=M("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=M("div",e,i)),t.imperial&&(this._iScale=M("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e=t*3.2808399,i,n,o;e>5280?(i=e/5280,n=this._getRoundNum(i),this._updateScale(this._iScale,n+" mi",n/i)):(o=this._getRoundNum(e),this._updateScale(this._iScale,o+" ft",o/e))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),so=function(t){return new Di(t)},ro='',je=Q.extend({options:{position:"bottomright",prefix:''+(d.inlineSvg?ro+" ":"")+"Leaflet"},initialize:function(t){k(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=M("div","leaflet-control-attribution"),qt(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(' ')}}});T.mergeOptions({attributionControl:!0}),T.addInitHook(function(){this.options.attributionControl&&new je().addTo(this)});var ao=function(t){return new je(t)};Q.Layers=Ri,Q.Zoom=$e,Q.Scale=Di,Q.Attribution=je,$t.layers=no,$t.zoom=oo,$t.scale=so,$t.attribution=ao;var ot=ht.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});ot.addTo=function(t,e){return t.addHandler(e,this),this};var ho={Events:j},Fi=d.touch?"touchstart mousedown":"mousedown",pt=Rt.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){k(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(v(this._dragStartTarget,Fi,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(pt._dragging===this&&this.finishDrag(!0),z(this._dragStartTarget,Fi,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!Ae(this._element,"leaflet-zoom-anim"))){if(t.touches&&t.touches.length!==1){pt._dragging===this&&this.finishDrag();return}if(!(pt._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches)&&(pt._dragging=this,this._preventOutline&&Fe(this._element),Ne(),Ut(),!this._moving)){this.fire("down");var e=t.touches?t.touches[0]:t,i=Zi(this._element);this._startPoint=new p(e.clientX,e.clientY),this._startPos=yt(this._element),this._parentScale=He(i);var n=t.type==="mousedown";v(document,n?"mousemove":"touchmove",this._onMove,this),v(document,n?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(t){if(this._enabled){if(t.touches&&t.touches.length>1){this._moved=!0;return}var e=t.touches&&t.touches.length===1?t.touches[0]:t,i=new p(e.clientX,e.clientY)._subtract(this._startPoint);!i.x&&!i.y||Math.abs(i.x)+Math.abs(i.y)s&&(r=a,s=h);s>i&&(e[r]=1,Ye(t,e,i,n,r),Ye(t,e,i,r,o))}function fo(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;ne&&(i.push(t[n]),o=n);return oe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i}function _o(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function jt(t,e,i,n){var o=e.x,s=e.y,r=i.x-o,a=i.y-s,h=r*r+a*a,u;return h>0&&(u=((t.x-o)*r+(t.y-s)*a)/h,u>1?(o=i.x,s=i.y):u>0&&(o+=r*u,s+=a*u)),r=t.x-o,a=t.y-s,n?r*r+a*a:new p(o,s)}function X(t){return!W(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]<"u"}function $i(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),X(t)}function ji(t,e){var i,n,o,s,r,a,h,u;if(!t||t.length===0)throw new Error("latlngs not passed");X(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var f=P([0,0]),_=B(t),y=_.getNorthWest().distanceTo(_.getSouthWest())*_.getNorthEast().distanceTo(_.getNorthWest());y<1700&&(f=Ke(t));var H=t.length,D=[];for(i=0;in){h=(s-n)/o,u=[a.x-h*(a.x-r.x),a.y-h*(a.y-r.y)];break}var q=e.unproject(m(u));return P([q.lat+f.lat,q.lng+f.lng])}var mo={__proto__:null,simplify:Ui,pointToSegmentDistance:Gi,closestPointOnSegment:lo,clipSegment:qi,_getEdgeIntersection:ue,_getBitCode:Pt,_sqClosestPointOnSegment:jt,isFlat:X,_flat:$i,polylineCenter:ji},Xe={project:function(t){return new p(t.lng,t.lat)},unproject:function(t){return new S(t.y,t.x)},bounds:new Z([-180,-90],[180,90])},Je={R:6378137,R_MINOR:6356752314245179e-9,bounds:new Z([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,o=this.R_MINOR/i,s=Math.sqrt(1-o*o),r=s*Math.sin(n),a=Math.tan(Math.PI/4-n/2)/Math.pow((1-r)/(1+r),s/2);return n=-i*Math.log(Math.max(a,1e-10)),new p(t.lng*e*i,n)},unproject:function(t){for(var e=180/Math.PI,i=this.R,n=this.R_MINOR/i,o=Math.sqrt(1-n*n),s=Math.exp(-t.y/i),r=Math.PI/2-2*Math.atan(s),a=0,h=.1,u;a<15&&Math.abs(h)>1e-7;a++)u=o*Math.sin(r),u=Math.pow((1-u)/(1+u),o/2),h=Math.PI/2-2*Math.atan(s*u)-r,r+=h;return new S(r*e,t.x*e/i)}},po={__proto__:null,LonLat:Xe,Mercator:Je,SphericalMercator:Te},vo=w({},mt,{code:"EPSG:3395",projection:Je,transformation:function(){var t=.5/(Math.PI*Je.R);return Dt(t,.5,-t,.5)}()}),Ki=w({},mt,{code:"EPSG:4326",projection:Xe,transformation:Dt(1/180,1,-1/180,.5)}),go=w({},ut,{projection:Xe,transformation:Dt(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});ut.Earth=mt,ut.EPSG3395=vo,ut.EPSG3857=Me,ut.EPSG900913=Ln,ut.EPSG4326=Ki,ut.Simple=go;var tt=Rt.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[x(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[x(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});T.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=x(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=x(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return x(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){t=t?W(t)?t:[t]:[];for(var e=0,i=t.length;ethis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&e[0]instanceof S&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){ct.prototype._setLatLngs.call(this,t),X(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return X(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new p(e,e);if(t=new Z(t.min.subtract(i),t.max.add(i)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}for(var n=0,o=this._rings.length,s;nt.y!=o.y>t.y&&t.x<(o.x-n.x)*(t.y-n.y)/(o.y-n.y)+n.x&&(e=!e);return e||ct.prototype._containsPoint.call(this,t,!0)}});function Mo(t,e){return new Et(t,e)}var ft=lt.extend({initialize:function(t,e){k(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e=W(t)?t:t.features,i,n,o;if(e){for(i=0,n=e.length;i0&&o.push(o[0].slice()),o}function Zt(t,e){return t.feature?w({},t.feature,{geometry:e}):me(e)}function me(t){return t.type==="Feature"||t.type==="FeatureCollection"?t:{type:"Feature",properties:{},geometry:t}}var ii={toGeoJSON:function(t){return Zt(this,{type:"Point",coordinates:ei(this.getLatLng(),t)})}};le.include(ii),Qe.include(ii),ce.include(ii),ct.include({toGeoJSON:function(t){var e=!X(this._latlngs),i=_e(this._latlngs,e?1:0,!1,t);return Zt(this,{type:(e?"Multi":"")+"LineString",coordinates:i})}}),Et.include({toGeoJSON:function(t){var e=!X(this._latlngs),i=e&&!X(this._latlngs[0]),n=_e(this._latlngs,i?2:e?1:0,!0,t);return e||(n=[n]),Zt(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),kt.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),Zt(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(e==="MultiPoint")return this.toMultiPoint(t);var i=e==="GeometryCollection",n=[];return this.eachLayer(function(o){if(o.toGeoJSON){var s=o.toGeoJSON(t);if(i)n.push(s.geometry);else{var r=me(s);r.type==="FeatureCollection"?n.push.apply(n,r.features):n.push(r)}}}),i?Zt(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});function Ji(t,e){return new ft(t,e)}var Co=Ji,pe=tt.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=B(e),k(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(g(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){O(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&Ct(this._image),this},bringToBack:function(){return this._map&&St(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=B(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._url.tagName==="IMG",e=this._image=t?this._url:M("img");if(g(e,"leaflet-image-layer"),this._zoomAnimated&&g(e,"leaflet-zoom-animated"),this.options.className&&g(e,this.options.className),e.onselectstart=E,e.onmousemove=E,e.onload=C(this.fire,this,"load"),e.onerror=C(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(e.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t){this._url=e.src;return}e.src=this._url,e.alt=this.options.alt},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;gt(this._image,i,e)},_reset:function(){var t=this._image,e=new Z(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();N(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){Y(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),So=function(t,e,i){return new pe(t,e,i)},Qi=pe.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t=this._url.tagName==="VIDEO",e=this._image=t?this._url:M("video");if(g(e,"leaflet-image-layer"),this._zoomAnimated&&g(e,"leaflet-zoom-animated"),this.options.className&&g(e,this.options.className),e.onselectstart=E,e.onmousemove=E,e.onloadeddata=C(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],o=0;o0?n:[e.src];return}W(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var s=0;so?(e.height=o+"px",g(t,s)):A(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();N(this._container,e.add(i))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var t=this._map,e=parseInt(Wt(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,o=new p(this._containerLeft,-i-this._containerBottom);o._add(yt(this._container));var s=t.layerPointToContainerPoint(o),r=m(this.options.autoPanPadding),a=m(this.options.autoPanPaddingTopLeft||r),h=m(this.options.autoPanPaddingBottomRight||r),u=t.getSize(),f=0,_=0;s.x+n+h.x>u.x&&(f=s.x+n-u.x+h.x),s.x-f-a.x<0&&(f=s.x-a.x),s.y+i+h.y>u.y&&(_=s.y+i-u.y+h.y),s.y-_-a.y<0&&(_=s.y-a.y),(f||_)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([f,_]))}},_getAnchor:function(){return m(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Eo=function(t,e){return new ve(t,e)};T.mergeOptions({closePopupOnClick:!0}),T.include({openPopup:function(t,e,i){return this._initOverlay(ve,t,e,i).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),tt.include({bindPopup:function(t,e){return this._popup=this._initOverlay(ve,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof lt||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(!(!this._popup||!this._map)){xt(t);var e=t.layer||t.target;if(this._popup._source===e&&!(e instanceof vt)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng);return}this._popup._source=e,this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){t.originalEvent.keyCode===13&&this._openPopup(t)}});var ge=st.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){st.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){st.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=st.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip",e=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=M("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+x(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,n=this._map,o=this._container,s=n.latLngToContainerPoint(n.getCenter()),r=n.layerPointToContainerPoint(t),a=this.options.direction,h=o.offsetWidth,u=o.offsetHeight,f=m(this.options.offset),_=this._getAnchor();a==="top"?(e=h/2,i=u):a==="bottom"?(e=h/2,i=0):a==="center"?(e=h/2,i=u/2):a==="right"?(e=0,i=u/2):a==="left"?(e=h,i=u/2):r.xthis.options.maxZoom||in?this._retainParent(o,s,r,n):!1)},_retainChildren:function(t,e,i,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*e;s<2*e+2;s++){var r=new p(o,s);r.z=i+1;var a=this._tileCoordsToKey(r),h=this._tiles[a];if(h&&h.active){h.retain=!0;continue}else h&&h.loaded&&(h.retain=!0);i+1this.options.maxZoom||this.options.minZoom!==void 0&&o1){this._setView(t,i);return}for(var _=o.min.y;_<=o.max.y;_++)for(var y=o.min.x;y<=o.max.x;y++){var H=new p(y,_);if(H.z=this._tileZoom,!!this._isValidTile(H)){var D=this._tiles[this._tileCoordsToKey(H)];D?D.current=!0:r.push(H)}}if(r.sort(function(q,At){return q.distanceTo(s)-At.distanceTo(s)}),r.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var J=document.createDocumentFragment();for(y=0;yi.max.x)||!e.wrapLat&&(t.yi.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return B(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),o=n.add(i),s=e.unproject(n,t.z),r=e.unproject(o,t.z);return[s,r]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new V(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new p(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(O(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){g(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=E,t.onmousemove=E,d.ielt9&&this.options.opacity<1&&Y(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),C(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&U(C(this._tileReady,this,t,null,o)),N(o,i),this._tiles[n]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);i=this._tiles[n],i&&(i.loaded=+new Date,this._map._fadeAnimated?(Y(i.el,0),K(this._fadeFrame),this._fadeFrame=U(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(g(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),d.ielt9||!this._map._fadeAnimated?U(this._pruneTiles,this):setTimeout(C(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new p(this._wrapX?_t(t.x,this._wrapX):t.x,this._wrapY?_t(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new Z(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function Ao(t){return new Yt(t)}var Ot=Yt.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,e=k(this,e),e.detectRetina&&d.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),typeof e.subdomains=="string"&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&e===void 0&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return v(i,"load",C(this._tileOnLoad,this,e,i)),v(i,"error",C(this._tileOnError,this,e,i)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(i.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:d.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return Nt(this._url,w(e,this.options))},_tileOnLoad:function(t,e){d.ielt9?setTimeout(C(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,n=this.options.zoomOffset;return i&&(t=e-t),t+n},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=E,e.onerror=E,!e.complete)){e.src=ee;var i=this._tiles[t].coords;O(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:i})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",ee),Yt.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(!(!this._map||i&&i.getAttribute("src")===ee))return Yt.prototype._tileReady.call(this,t,e,i)}});function nn(t,e){return new Ot(t,e)}var on=Ot.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=w({},this.defaultWmsParams);for(var n in e)n in this.options||(i[n]=e[n]);e=k(this,e);var o=e.detectRetina&&d.retina?2:1,s=this.getTileSize();i.width=s.x*o,i.height=s.y*o,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,Ot.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=G(i.project(e[0]),i.project(e[1])),o=n.min,s=n.max,r=(this._wmsVersion>=1.3&&this._crs===Ki?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),a=Ot.prototype.getTileUrl.call(this,t);return a+Bt(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return w(this.wmsParams,t),e||this.redraw(),this}});function Io(t,e){return new on(t,e)}Ot.WMS=on,nn.wms=Io;var dt=tt.extend({options:{padding:.1},initialize:function(t){k(this,t),x(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),g(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),s=n.multiplyBy(-i).add(o).subtract(this._map._getNewPixelOrigin(t,e));d.any3d?gt(this._container,s,i):N(this._container,s)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new Z(i,i.add(e.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),sn=dt.extend({options:{tolerance:0},getEvents:function(){var t=dt.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){dt.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");v(t,"mousemove",this._onMouseMove,this),v(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),v(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){K(this._redrawRequest),delete this._ctx,O(this._container),z(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var t;this._redrawBounds=null;for(var e in this._layers)t=this._layers[e],t._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){dt.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=d.retina?2:1;N(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",d.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){dt.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[x(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[x(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(typeof t.options.dashArray=="string"){var e=t.options.dashArray.split(/[, ]+/),i=[],n,o;for(o=0;o')}}catch{}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Bo={_initContainer:function(){this._container=M("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(dt.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Xt("shape");g(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Xt("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[x(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;O(e),t.removeInteractiveTarget(e),delete this._layers[x(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e||(e=t._stroke=Xt("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=W(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=Xt("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,"+65535*360)},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){Ct(t._container)},_bringToBack:function(t){St(t._container)}},ye=d.vml?Xt:ui,Jt=dt.extend({_initContainer:function(){this._container=ye("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=ye("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){O(this._container),z(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){dt.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;(!this._svgSize||!this._svgSize.equals(e))&&(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),N(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=ye("path");t.options.className&&g(e,t.options.className),t.options.interactive&&g(e,"leaflet-interactive"),this._updateStyle(t),this._layers[x(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){O(t._path),t.removeInteractiveTarget(t._path),delete this._layers[x(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,li(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n=Math.max(Math.round(t._radiusY),1)||i,o="a"+i+","+n+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+o+i*2+",0 "+o+-i*2+",0 ";this._setPath(t,s)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){Ct(t._path)},_bringToBack:function(t){St(t._path)}});d.vml&&Jt.include(Bo);function an(t){return d.svg||d.vml?new Jt(t):null}T.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if(t==="overlayPane"||t===void 0)return!1;var e=this._paneRenderers[t];return e===void 0&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&rn(t)||an(t)}});var hn=Et.extend({initialize:function(t,e){Et.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=B(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function No(t,e){return new hn(t,e)}Jt.create=ye,Jt.pointsToPath=li,ft.geometryToLayer=fe,ft.coordsToLatLng=ti,ft.coordsToLatLngs=de,ft.latLngToCoords=ei,ft.latLngsToCoords=_e,ft.getFeature=Zt,ft.asFeature=me,T.mergeOptions({boxZoom:!0});var un=ot.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){v(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){z(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){O(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||t.which!==1&&t.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Ut(),Ne(),this._startPoint=this._map.mouseEventToContainerPoint(t),v(document,{contextmenu:xt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=M("div","leaflet-zoom-box",this._container),g(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new Z(this._point,this._startPoint),i=e.getSize();N(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(O(this._box),A(this._container,"leaflet-crosshair")),Gt(),Re(),z(document,{contextmenu:xt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if(!(t.which!==1&&t.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(C(this._resetState,this),0);var e=new V(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){t.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});T.addInitHook("addHandler","boxZoom",un),T.mergeOptions({doubleClickZoom:!0});var ln=ot.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,o=t.originalEvent.shiftKey?i-n:i+n;e.options.doubleClickZoom==="center"?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});T.addInitHook("addHandler","doubleClickZoom",ln),T.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var cn=ot.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new pt(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}g(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){A(this._map._container,"leaflet-grab"),A(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=B(this._map.options.maxBounds);this._offsetLimit=G(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.xe.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,r=Math.abs(o+i)0?s:-s))-e;this._delta=0,this._startTime=null,r&&(t.options.scrollWheelZoom==="center"?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});T.addInitHook("addHandler","scrollWheelZoom",dn);var Ro=600;T.mergeOptions({tapHold:d.touchNative&&d.safari&&d.mobile,tapTolerance:15});var _n=ot.extend({addHooks:function(){v(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){z(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),t.touches.length===1){var e=t.touches[0];this._startPos=this._newPos=new p(e.clientX,e.clientY),this._holdTimeout=setTimeout(C(function(){this._cancel(),this._isTapValid()&&(v(document,"touchend",F),v(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),Ro),v(document,"touchend touchcancel contextmenu",this._cancel,this),v(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){z(document,"touchend",F),z(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),z(document,"touchend touchcancel contextmenu",this._cancel,this),z(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new p(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var i=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});i._simulated=!0,e.target.dispatchEvent(i)}});T.addInitHook("addHandler","tapHold",_n),T.mergeOptions({touchZoom:d.touch,bounceAtZoomLimits:!0});var mn=ot.extend({addHooks:function(){g(this._map._container,"leaflet-touch-zoom"),v(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){A(this._map._container,"leaflet-touch-zoom"),z(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(!(!t.touches||t.touches.length!==2||e._animatingZoom||this._zooming)){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),e.options.touchZoom!=="center"&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),v(document,"touchmove",this._onTouchMove,this),v(document,"touchend touchcancel",this._onTouchEnd,this),F(t)}},_onTouchMove:function(t){if(!(!t.touches||t.touches.length!==2||!this._zooming)){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),o=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoome.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),e.options.touchZoom==="center"){if(this._center=this._startLatLng,o===1)return}else{var s=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(o===1&&s.x===0&&s.y===0)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),K(this._animRequest);var r=C(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=U(r,this,!0),F(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,K(this._animRequest),z(document,"touchmove",this._onTouchMove,this),z(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});T.addInitHook("addHandler","touchZoom",mn),T.BoxZoom=un,T.DoubleClickZoom=ln,T.Drag=cn,T.Keyboard=fn,T.ScrollWheelZoom=dn,T.TapHold=_n,T.TouchZoom=mn,l.Bounds=Z,l.Browser=d,l.CRS=ut,l.Canvas=sn,l.Circle=Qe,l.CircleMarker=ce,l.Class=ht,l.Control=Q,l.DivIcon=en,l.DivOverlay=st,l.DomEvent=eo,l.DomUtil=Qn,l.Draggable=pt,l.Evented=Rt,l.FeatureGroup=lt,l.GeoJSON=ft,l.GridLayer=Yt,l.Handler=ot,l.Icon=zt,l.ImageOverlay=pe,l.LatLng=S,l.LatLngBounds=V,l.Layer=tt,l.LayerGroup=kt,l.LineUtil=mo,l.Map=T,l.Marker=le,l.Mixin=ho,l.Path=vt,l.Point=p,l.PolyUtil=uo,l.Polygon=Et,l.Polyline=ct,l.Popup=ve,l.PosAnimation=Ni,l.Projection=po,l.Rectangle=hn,l.Renderer=dt,l.SVG=Jt,l.SVGOverlay=tn,l.TileLayer=Ot,l.Tooltip=ge,l.Transformation=be,l.Util=xn,l.VideoOverlay=Qi,l.bind=C,l.bounds=G,l.canvas=rn,l.circle=To,l.circleMarker=Lo,l.control=$t,l.divIcon=Oo,l.extend=w,l.featureGroup=wo,l.geoJSON=Ji,l.geoJson=Co,l.gridLayer=Ao,l.icon=xo,l.imageOverlay=So,l.latLng=P,l.latLngBounds=B,l.layerGroup=yo,l.map=io,l.marker=Po,l.point=m,l.polygon=Mo,l.polyline=bo,l.popup=Eo,l.rectangle=No,l.setOptions=k,l.stamp=x,l.svg=an,l.svgOverlay=zo,l.tileLayer=nn,l.tooltip=Zo,l.transformation=Dt,l.version=I,l.videoOverlay=ko;var Do=window.L;l.noConflict=function(){return window.L=Do,this},window.L=l})}(xe,xe.exports)),xe.exports}var Xo=Yo();const ts=Ko(Xo),Lt={popupOptions:{minWidth:window.innerWidth>=768?350:200,maxWidth:600,maxHeight:window.innerWidth>=768?800:500,closeButton:!0},getAdminName:c=>{let b="These tags were updated by ";return c.name||c.username?(c.name&&(b+=c.name),c.username&&(b+=" @"+c.username)):b+="an admin",b+="
at "+yn(c.created_at).format("LLL"),b},getRemovedTags:c=>{let b="Removed Tags: ";return c.customTags&&(c.customTags.forEach(l=>{b+=l+" "}),b+="
"),c.tags&&Object.keys(c.tags).forEach(l=>{Object.entries(c.tags[l]).forEach(I=>{b+=rt.t(`litter.${l}.${I[0]}`)+`(${I[1]})`}),b+="
"}),b},scrollPopupToBottom:c=>{var l,I;let b=(I=(l=c.popup)==null?void 0:l.getElement())==null?void 0:I.querySelector(".leaflet-popup-content");b&&(b.scrollTop=b.scrollHeight)},parseTags:(c,b,l)=>{if(!c&&!b)return l?rt.t("litter.not-tagged-yet"):rt.t("litter.not-verified");let I="",w=c?c.split(","):[];return w.pop(),w.forEach(at=>{let C=at.split(" ");C[0]==="art.item"?I+=rt.t("litter."+C[0])+"
":I+=rt.t("litter."+C[0])+": "+C[1]+"
"}),I},formatUserName:(c,b)=>c||b?`${rt.t("locations.cityVueMap.by")} ${c||""} ${b?"@"+b:""}`:"",formatPickedUp:c=>c?`${rt.t("litter.presence.picked-up")}`:`${rt.t("litter.presence.still-there")}`,formatTeam:c=>c?`${rt.t("common.team")} ${c}`:"",formatPhotoTakenTime:c=>rt.t("locations.cityVueMap.taken-on")+" "+yn(c).format("LLL"),getMapImagePopupContent:(c,b=null)=>{var Tt,et,k,Bt,te,Nt,W,bt;const l=Lt.formatUserName(c.name,c.username),I=c.filename!=="/assets/images/waiting.png",w=(Tt=c.custom_tags)==null?void 0:Tt.join("
"),at=Lt.parseTags(c.result_string,w,I),C=Lt.formatPhotoTakenTime(c.datetime),It=Lt.formatTeam(c.team),x=Lt.formatPickedUp(c.picked_up),Qt=c.result_string&&c.result_string.includes("art.item"),_t=c.social&&Object.keys(c.social).length,E=c.admin?Lt.getAdminName(c.admin):null,$=(et=c.admin)!=null&&et.removedTags?Lt.getRemovedTags(c.admin.removedTags):"";return` + Litter photo +
+ ${at?"
"+at+"
":""} + ${w?"
"+w+"
":""} + ${Qt?"":"
"+x+"
"} +
${C}
+ ${l?"
"+l+"
":""} + ${It?'
'+It+"
":""} + ${_t?'":""} + ${b?'':""} + ${E?'

'+E+"

":""} + ${$?'

'+$+"

":""} +
`},getCleanupContent:(c,b=null)=>{let l="";return b===null?l="Log in to join the cleanup":c.users.find(I=>I.user_id===b)?(l="

You have joined the cleanup

",b===c.user_id?l+="

You cannot leave the cleanup you created

":l+=`Click here to leave`):l=`Click here to join`,` +
+

${c.name}

+

Attending: ${c.users.length} ${c.users.length===1?"person":"people"}

+

${c.description}

+

When? ${c.startsAt}

+

${c.timeDiff}

+ ${l} +
+ `},getMerchantContent:c=>{let b="";c.photos.length>0&&c.photos.forEach(I=>{b+=`
photo
`});let l=c.website?`${c.website}`:"";return` +
+
+
+ ${b} +
+
+
+
+

Name: ${c.name}

+

About this merchant: ${c.about?c.about:""}

+

Website: ${l}

+
+ `}};export{ts as L,Lt as h,Yo as r}; diff --git a/public/build/assets/vue-loading-hzYdSApK.js b/public/build/assets/vue-loading-Ck0acTfr.js similarity index 99% rename from public/build/assets/vue-loading-hzYdSApK.js rename to public/build/assets/vue-loading-Ck0acTfr.js index 5873cadd..30633f83 100644 --- a/public/build/assets/vue-loading-hzYdSApK.js +++ b/public/build/assets/vue-loading-Ck0acTfr.js @@ -1 +1 @@ -import{c as I,g as O}from"./app-DuS6KM7M.js";var _={exports:{}};(function(g,R){(function(s,l){g.exports=l()})(I,()=>(()=>{var i={};i.d=(n,t)=>{for(var e in t)i.o(t,e)&&!i.o(n,e)&&Object.defineProperty(n,e,{enumerable:!0,get:t[e]})},i.o=(n,t)=>Object.prototype.hasOwnProperty.call(n,t);var s={};i.d(s,{default:()=>D});var l=function(){var t=this,e=t._self._c;return e("transition",{attrs:{name:t.transition}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.isActive,expression:"isActive"}],staticClass:"vld-overlay is-active",class:{"is-full-page":t.isFullPage},style:{zIndex:t.zIndex},attrs:{tabindex:"0","aria-busy":t.isActive,"aria-label":"Loading"}},[e("div",{staticClass:"vld-background",style:t.bgStyle,on:{click:function(r){return r.preventDefault(),t.cancel.apply(null,arguments)}}}),e("div",{staticClass:"vld-icon"},[t._t("before"),t._t("default",function(){return[e(t.loader,{tag:"component",attrs:{color:t.color,width:t.width,height:t.height}})]}),t._t("after")],2)])])},h=[];const f=n=>{typeof n.remove<"u"?n.remove():n.parentNode.removeChild(n)},v=typeof window<"u"?window.HTMLElement:Object,b={mounted(){this.enforceFocus&&document.addEventListener("focusin",this.focusIn)},methods:{focusIn(n){if(!this.isActive||n.target===this.$el||this.$el.contains(n.target))return;let t=this.container?this.container:this.isFullPage?null:this.$el.parentElement;(this.isFullPage||t&&t.contains(n.target))&&(n.preventDefault(),this.$el.focus())}},beforeDestroy(){document.removeEventListener("focusin",this.focusIn)}};var y=function(){var t=this,e=t._self._c;return e("svg",{attrs:{viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,stroke:t.color}},[e("g",{attrs:{fill:"none","fill-rule":"evenodd"}},[e("g",{attrs:{transform:"translate(1 1)","stroke-width":"2"}},[e("circle",{attrs:{"stroke-opacity":".25",cx:"18",cy:"18",r:"18"}}),e("path",{attrs:{d:"M36 18c0-9.94-8.06-18-18-18"}},[e("animateTransform",{attrs:{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"0.8s",repeatCount:"indefinite"}})],1)])])])},w=[];const C={name:"spinner",props:{color:{type:String,default:"#000"},height:{type:Number,default:64},width:{type:Number,default:64}}};function o(n,t,e,r,d,E,p,u){var a=typeof n=="function"?n.options:n;return t&&(a.render=t,a.staticRenderFns=e,a._compiled=!0),{exports:n,options:a}}var x=o(C,y,w);const j=x.exports;var N=function(){var t=this,e=t._self._c;return e("svg",{attrs:{viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:t.color,width:t.width,height:t.height}},[e("circle",{attrs:{cx:"15",cy:"15",r:"15"}},[e("animate",{attrs:{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}}),e("animate",{attrs:{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"}})]),e("circle",{attrs:{cx:"60",cy:"15",r:"9","fill-opacity":"0.3"}},[e("animate",{attrs:{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}}),e("animate",{attrs:{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"}})]),e("circle",{attrs:{cx:"105",cy:"15",r:"15"}},[e("animate",{attrs:{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}}),e("animate",{attrs:{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"}})])])},S=[],k=o({name:"dots",props:{color:{type:String,default:"#000"},height:{type:Number,default:240},width:{type:Number,default:60}}},N,S);const F=k.exports;var L=function(){var t=this,e=t._self._c;return e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30 30",height:t.height,width:t.width,fill:t.color}},[e("rect",{attrs:{x:"0",y:"13",width:"4",height:"5"}},[e("animate",{attrs:{attributeName:"height",attributeType:"XML",values:"5;21;5",begin:"0s",dur:"0.6s",repeatCount:"indefinite"}}),e("animate",{attrs:{attributeName:"y",attributeType:"XML",values:"13; 5; 13",begin:"0s",dur:"0.6s",repeatCount:"indefinite"}})]),e("rect",{attrs:{x:"10",y:"13",width:"4",height:"5"}},[e("animate",{attrs:{attributeName:"height",attributeType:"XML",values:"5;21;5",begin:"0.15s",dur:"0.6s",repeatCount:"indefinite"}}),e("animate",{attrs:{attributeName:"y",attributeType:"XML",values:"13; 5; 13",begin:"0.15s",dur:"0.6s",repeatCount:"indefinite"}})]),e("rect",{attrs:{x:"20",y:"13",width:"4",height:"5"}},[e("animate",{attrs:{attributeName:"height",attributeType:"XML",values:"5;21;5",begin:"0.3s",dur:"0.6s",repeatCount:"indefinite"}}),e("animate",{attrs:{attributeName:"y",attributeType:"XML",values:"13; 5; 13",begin:"0.3s",dur:"0.6s",repeatCount:"indefinite"}})])])},M=[],P=o({name:"bars",props:{color:{type:String,default:"#000"},height:{type:Number,default:40},width:{type:Number,default:40}}},L,M);const $=P.exports;var A=o({name:"vue-loading",mixins:[b],props:{active:Boolean,programmatic:Boolean,container:[Object,Function,v],isFullPage:{type:Boolean,default:!0},enforceFocus:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!1},transition:{type:String,default:"fade"},canCancel:Boolean,onCancel:{type:Function,default:()=>{}},color:String,backgroundColor:String,blur:{type:String,default:"2px"},opacity:Number,width:Number,height:Number,zIndex:Number,loader:{type:String,default:"spinner"}},data(){return{isActive:this.active}},components:{Spinner:j,Dots:F,Bars:$},beforeMount(){this.programmatic&&(this.container?(this.isFullPage=!1,this.container.appendChild(this.$el)):document.body.appendChild(this.$el))},mounted(){this.programmatic&&(this.isActive=!0),document.addEventListener("keyup",this.keyPress)},methods:{cancel(){!this.canCancel||!this.isActive||(this.hide(),this.onCancel.apply(null,arguments))},hide(){this.$emit("hide"),this.$emit("update:active",!1),this.programmatic&&(this.isActive=!1,setTimeout(()=>{this.$destroy(),f(this.$el)},150))},disableScroll(){this.isFullPage&&this.lockScroll&&document.body.classList.add("vld-shown")},enableScroll(){this.isFullPage&&this.lockScroll&&document.body.classList.remove("vld-shown")},keyPress(n){n.keyCode===27&&this.cancel()}},watch:{active(n){this.isActive=n},isActive(n){n?this.disableScroll():this.enableScroll()}},computed:{bgStyle(){return{background:this.backgroundColor,opacity:this.opacity,backdropFilter:`blur(${this.blur})`}}},beforeDestroy(){document.removeEventListener("keyup",this.keyPress)}},l,h);const c=A.exports,T=function(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return{show(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;const p=Object.assign({},t,r,{programmatic:!0}),u=new(n.extend(c))({el:document.createElement("div"),propsData:p}),a=Object.assign({},e,d);return Object.keys(a).map(m=>{u.$slots[m]=a[m]}),u}}},B=function(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=T(n,t,e);n.$loading=r,n.prototype.$loading=r};c.install=B;const D=c;return s=s.default,s})())})(_);var X=_.exports;const V=O(X);export{V as L}; +import{c as I,g as O}from"./app-BwSojYvl.js";var _={exports:{}};(function(g,R){(function(s,l){g.exports=l()})(I,()=>(()=>{var i={};i.d=(n,t)=>{for(var e in t)i.o(t,e)&&!i.o(n,e)&&Object.defineProperty(n,e,{enumerable:!0,get:t[e]})},i.o=(n,t)=>Object.prototype.hasOwnProperty.call(n,t);var s={};i.d(s,{default:()=>D});var l=function(){var t=this,e=t._self._c;return e("transition",{attrs:{name:t.transition}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.isActive,expression:"isActive"}],staticClass:"vld-overlay is-active",class:{"is-full-page":t.isFullPage},style:{zIndex:t.zIndex},attrs:{tabindex:"0","aria-busy":t.isActive,"aria-label":"Loading"}},[e("div",{staticClass:"vld-background",style:t.bgStyle,on:{click:function(r){return r.preventDefault(),t.cancel.apply(null,arguments)}}}),e("div",{staticClass:"vld-icon"},[t._t("before"),t._t("default",function(){return[e(t.loader,{tag:"component",attrs:{color:t.color,width:t.width,height:t.height}})]}),t._t("after")],2)])])},h=[];const f=n=>{typeof n.remove<"u"?n.remove():n.parentNode.removeChild(n)},v=typeof window<"u"?window.HTMLElement:Object,b={mounted(){this.enforceFocus&&document.addEventListener("focusin",this.focusIn)},methods:{focusIn(n){if(!this.isActive||n.target===this.$el||this.$el.contains(n.target))return;let t=this.container?this.container:this.isFullPage?null:this.$el.parentElement;(this.isFullPage||t&&t.contains(n.target))&&(n.preventDefault(),this.$el.focus())}},beforeDestroy(){document.removeEventListener("focusin",this.focusIn)}};var y=function(){var t=this,e=t._self._c;return e("svg",{attrs:{viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,stroke:t.color}},[e("g",{attrs:{fill:"none","fill-rule":"evenodd"}},[e("g",{attrs:{transform:"translate(1 1)","stroke-width":"2"}},[e("circle",{attrs:{"stroke-opacity":".25",cx:"18",cy:"18",r:"18"}}),e("path",{attrs:{d:"M36 18c0-9.94-8.06-18-18-18"}},[e("animateTransform",{attrs:{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"0.8s",repeatCount:"indefinite"}})],1)])])])},w=[];const C={name:"spinner",props:{color:{type:String,default:"#000"},height:{type:Number,default:64},width:{type:Number,default:64}}};function o(n,t,e,r,d,E,p,u){var a=typeof n=="function"?n.options:n;return t&&(a.render=t,a.staticRenderFns=e,a._compiled=!0),{exports:n,options:a}}var x=o(C,y,w);const j=x.exports;var N=function(){var t=this,e=t._self._c;return e("svg",{attrs:{viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:t.color,width:t.width,height:t.height}},[e("circle",{attrs:{cx:"15",cy:"15",r:"15"}},[e("animate",{attrs:{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}}),e("animate",{attrs:{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"}})]),e("circle",{attrs:{cx:"60",cy:"15",r:"9","fill-opacity":"0.3"}},[e("animate",{attrs:{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}}),e("animate",{attrs:{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"}})]),e("circle",{attrs:{cx:"105",cy:"15",r:"15"}},[e("animate",{attrs:{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}}),e("animate",{attrs:{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"}})])])},S=[],k=o({name:"dots",props:{color:{type:String,default:"#000"},height:{type:Number,default:240},width:{type:Number,default:60}}},N,S);const F=k.exports;var L=function(){var t=this,e=t._self._c;return e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30 30",height:t.height,width:t.width,fill:t.color}},[e("rect",{attrs:{x:"0",y:"13",width:"4",height:"5"}},[e("animate",{attrs:{attributeName:"height",attributeType:"XML",values:"5;21;5",begin:"0s",dur:"0.6s",repeatCount:"indefinite"}}),e("animate",{attrs:{attributeName:"y",attributeType:"XML",values:"13; 5; 13",begin:"0s",dur:"0.6s",repeatCount:"indefinite"}})]),e("rect",{attrs:{x:"10",y:"13",width:"4",height:"5"}},[e("animate",{attrs:{attributeName:"height",attributeType:"XML",values:"5;21;5",begin:"0.15s",dur:"0.6s",repeatCount:"indefinite"}}),e("animate",{attrs:{attributeName:"y",attributeType:"XML",values:"13; 5; 13",begin:"0.15s",dur:"0.6s",repeatCount:"indefinite"}})]),e("rect",{attrs:{x:"20",y:"13",width:"4",height:"5"}},[e("animate",{attrs:{attributeName:"height",attributeType:"XML",values:"5;21;5",begin:"0.3s",dur:"0.6s",repeatCount:"indefinite"}}),e("animate",{attrs:{attributeName:"y",attributeType:"XML",values:"13; 5; 13",begin:"0.3s",dur:"0.6s",repeatCount:"indefinite"}})])])},M=[],P=o({name:"bars",props:{color:{type:String,default:"#000"},height:{type:Number,default:40},width:{type:Number,default:40}}},L,M);const $=P.exports;var A=o({name:"vue-loading",mixins:[b],props:{active:Boolean,programmatic:Boolean,container:[Object,Function,v],isFullPage:{type:Boolean,default:!0},enforceFocus:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!1},transition:{type:String,default:"fade"},canCancel:Boolean,onCancel:{type:Function,default:()=>{}},color:String,backgroundColor:String,blur:{type:String,default:"2px"},opacity:Number,width:Number,height:Number,zIndex:Number,loader:{type:String,default:"spinner"}},data(){return{isActive:this.active}},components:{Spinner:j,Dots:F,Bars:$},beforeMount(){this.programmatic&&(this.container?(this.isFullPage=!1,this.container.appendChild(this.$el)):document.body.appendChild(this.$el))},mounted(){this.programmatic&&(this.isActive=!0),document.addEventListener("keyup",this.keyPress)},methods:{cancel(){!this.canCancel||!this.isActive||(this.hide(),this.onCancel.apply(null,arguments))},hide(){this.$emit("hide"),this.$emit("update:active",!1),this.programmatic&&(this.isActive=!1,setTimeout(()=>{this.$destroy(),f(this.$el)},150))},disableScroll(){this.isFullPage&&this.lockScroll&&document.body.classList.add("vld-shown")},enableScroll(){this.isFullPage&&this.lockScroll&&document.body.classList.remove("vld-shown")},keyPress(n){n.keyCode===27&&this.cancel()}},watch:{active(n){this.isActive=n},isActive(n){n?this.disableScroll():this.enableScroll()}},computed:{bgStyle(){return{background:this.backgroundColor,opacity:this.opacity,backdropFilter:`blur(${this.blur})`}}},beforeDestroy(){document.removeEventListener("keyup",this.keyPress)}},l,h);const c=A.exports,T=function(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return{show(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;const p=Object.assign({},t,r,{programmatic:!0}),u=new(n.extend(c))({el:document.createElement("div"),propsData:p}),a=Object.assign({},e,d);return Object.keys(a).map(m=>{u.$slots[m]=a[m]}),u}}},B=function(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=T(n,t,e);n.$loading=r,n.prototype.$loading=r};c.install=B;const D=c;return s=s.default,s})())})(_);var X=_.exports;const V=O(X);export{V as L}; diff --git a/public/build/assets/vue2Dropzone-Cofu5FX6.js b/public/build/assets/vue2Dropzone-YzntsfFs.js similarity index 99% rename from public/build/assets/vue2Dropzone-Cofu5FX6.js rename to public/build/assets/vue2Dropzone-YzntsfFs.js index 72572b68..b080afdc 100644 --- a/public/build/assets/vue2Dropzone-Cofu5FX6.js +++ b/public/build/assets/vue2Dropzone-YzntsfFs.js @@ -1,4 +1,4 @@ -import{c as I,g as N}from"./app-DuS6KM7M.js";var O={exports:{}};(function(R,Q){(function(U,M){R.exports=M()})(I,function(){var U,M=(function(l){var a=function(){function d(o,e){for(var t=0;t1?t-1:0),i=1;i=s.length);)s[r++].apply(this,n)}return this}},{key:"off",value:function(o,e){if(!this._callbacks||arguments.length===0)return this._callbacks={},this;var t=this._callbacks[o];if(!t)return this;if(arguments.length===1)return delete this._callbacks[o],this;for(var n=0;n=n.length);){var i=n[t++];if(/(^| )dz-message($| )/.test(i.className)){e=i,i.className="dz-message";break}}e||(e=o.createElement('
'),this.element.appendChild(e));var r=e.getElementsByTagName("span")[0];return r&&(r.textContent!=null?r.textContent=this.options.dictFallbackMessage:r.innerText!=null&&(r.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(e,t,n,i){var r={srcX:0,srcY:0,srcWidth:e.width,srcHeight:e.height},s=e.width/e.height;t==null&&n==null?(t=r.srcWidth,n=r.srcHeight):t==null?t=n*s:n==null&&(n=t/s);var u=(t=Math.min(t,r.srcWidth))/(n=Math.min(n,r.srcHeight));if(r.srcWidth>t||r.srcHeight>n)if(i==="crop")s>u?(r.srcHeight=e.height,r.srcWidth=r.srcHeight*u):(r.srcWidth=e.width,r.srcHeight=r.srcWidth/u);else{if(i!=="contain")throw new Error("Unknown resizeMethod '"+i+"'");s>u?n=t/s:t=n*s}return r.srcX=(e.width-r.srcWidth)/2,r.srcY=(e.height-r.srcHeight)/2,r.trgWidth=t,r.trgHeight=n,r},transformFile:function(e,t){return(this.options.resizeWidth||this.options.resizeHeight)&&e.type.match(/image.*/)?this.resizeImage(e,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,t):t(e)},previewTemplate:`
+import{c as I,g as N}from"./app-BwSojYvl.js";var O={exports:{}};(function(R,Q){(function(U,M){R.exports=M()})(I,function(){var U,M=(function(l){var a=function(){function d(o,e){for(var t=0;t1?t-1:0),i=1;i=s.length);)s[r++].apply(this,n)}return this}},{key:"off",value:function(o,e){if(!this._callbacks||arguments.length===0)return this._callbacks={},this;var t=this._callbacks[o];if(!t)return this;if(arguments.length===1)return delete this._callbacks[o],this;for(var n=0;n=n.length);){var i=n[t++];if(/(^| )dz-message($| )/.test(i.className)){e=i,i.className="dz-message";break}}e||(e=o.createElement('
'),this.element.appendChild(e));var r=e.getElementsByTagName("span")[0];return r&&(r.textContent!=null?r.textContent=this.options.dictFallbackMessage:r.innerText!=null&&(r.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(e,t,n,i){var r={srcX:0,srcY:0,srcWidth:e.width,srcHeight:e.height},s=e.width/e.height;t==null&&n==null?(t=r.srcWidth,n=r.srcHeight):t==null?t=n*s:n==null&&(n=t/s);var u=(t=Math.min(t,r.srcWidth))/(n=Math.min(n,r.srcHeight));if(r.srcWidth>t||r.srcHeight>n)if(i==="crop")s>u?(r.srcHeight=e.height,r.srcWidth=r.srcHeight*u):(r.srcWidth=e.width,r.srcHeight=r.srcWidth/u);else{if(i!=="contain")throw new Error("Unknown resizeMethod '"+i+"'");s>u?n=t/s:t=n*s}return r.srcX=(e.width-r.srcWidth)/2,r.srcY=(e.height-r.srcHeight)/2,r.trgWidth=t,r.trgHeight=n,r},transformFile:function(e,t){return(this.options.resizeWidth||this.options.resizeHeight)&&e.type.match(/image.*/)?this.resizeImage(e,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,t):t(e)},previewTemplate:`
diff --git a/resources/js/views/Locations/SortLocations.vue b/resources/js/views/Locations/SortLocations.vue index ab73df7f..1b9cfee6 100644 --- a/resources/js/views/Locations/SortLocations.vue +++ b/resources/js/views/Locations/SortLocations.vue @@ -1,5 +1,8 @@