diff --git a/add-banner/assets/index-23f1f4a7.css b/add-banner/assets/index-23f1f4a7.css deleted file mode 100644 index 420de249..00000000 --- a/add-banner/assets/index-23f1f4a7.css +++ /dev/null @@ -1 +0,0 @@ -body{margin:0;padding:0}.left.svelte-1qv6srk{position:absolute;margin:10px}#map.svelte-1qv6srk{position:absolute;bottom:0;right:0;width:50%} diff --git a/add-banner/assets/index-3891e3e5.css b/add-banner/assets/index-3891e3e5.css new file mode 100644 index 00000000..815316ba --- /dev/null +++ b/add-banner/assets/index-3891e3e5.css @@ -0,0 +1 @@ +body{margin:0;padding:0}.left.svelte-16qyz2v{margin:10px}#map.svelte-16qyz2v{position:absolute;bottom:0;right:0;width:50%} diff --git a/add-banner/assets/main-6392a344.js b/add-banner/assets/main-5e6b24b8.js similarity index 73% rename from add-banner/assets/main-6392a344.js rename to add-banner/assets/main-5e6b24b8.js index f6040dba..c14e8f50 100644 --- a/add-banner/assets/main-6392a344.js +++ b/add-banner/assets/main-5e6b24b8.js @@ -1 +1 @@ -import{S as ge,i as de,s as ce,H as he,L as _e,a as ve,E as le,F as be,R as we,b as Y,c as ie,d as Se,M as ye,e as d,f as m,g as y,h as Ae,j as A,m as c,k as C,l as u,n as ue,t as h,o as _,p as M,q as v,r as ke,u as Le,v as G,w as fe,x as Ce,G as Me,y as Ee,z as Ie,A as Fe,B as Te,C as Be,D as De,I as Je,J as Oe,K as pe}from"./index-112be501.js";import{D as je,A as Ge}from"./About-dd58f7c4.js";import{P as He}from"./Popup-41ef12d1.js";function Ne(o){let e;return{c(){e=G("About")},m(s,t){C(s,e,t)},d(s){s&&M(e)}}}function Pe(o){let e,s,t,n,r;return{c(){e=y("input"),s=m(),t=y("datalist"),A(e,"class","govuk-input govuk-input--width-20"),A(e,"id","inputValue"),A(e,"data-testid","transport-authority"),A(e,"list","authorities-list"),A(t,"id","authorities-list")},m(l,p){C(l,e,p),fe(e,o[0]),C(l,s,p),C(l,t,p),o[12](t),n||(r=Ce(e,"input",o[11]),n=!0)},p(l,p){p&1&&e.value!==l[0]&&fe(e,l[0])},d(l){l&&(M(e),M(s),M(t)),o[12](null),n=!1,r()}}}function qe(o){let e;return{c(){e=G("Start")},m(s,t){C(s,e,t)},d(s){s&&M(e)}}}function Ve(o){let e,s=o[19].name+"",t,n,r=o[19].level+"",l,p;return{c(){e=y("p"),t=G(s),n=G(" ("),l=G(r),p=G(")")},m(g,$){C(g,e,$),u(e,t),u(e,n),u(e,l),u(e,p)},p(g,$){$&524288&&s!==(s=g[19].name+"")&&pe(t,s),$&524288&&r!==(r=g[19].level+"")&&pe(l,r)},d(g){g&&M(e)}}}function Re(o){let e,s;return e=new He({props:{$$slots:{default:[Ve,({props:t})=>({19:t}),({props:t})=>t?524288:0]},$$scope:{ctx:o}}}),{c(){d(e.$$.fragment)},m(t,n){c(e,t,n),s=!0},p(t,n){const r={};n&1572864&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){s||(h(e.$$.fragment,t),s=!0)},o(t){_(e.$$.fragment,t),s=!1},d(t){v(e,t)}}}function ze(o){let e,s,t,n;return e=new Be({props:{id:"boundaries",filter:["==",["get","level"],o[5]],paint:{"fill-color":"rgb(200, 100, 240)","fill-outline-color":"rgb(200, 100, 240)","fill-opacity":De(0,.5)},manageHoverState:!0,hoverCursor:"pointer",$$slots:{default:[Re]},$$scope:{ctx:o}}}),e.$on("click",o[8]),t=new Je({props:{id:"boundaries-outline",filter:["==",["get","level"],o[5]],paint:{"line-color":"rgb(200, 100, 240)","line-width":2.5},manageHoverState:!0}}),{c(){d(e.$$.fragment),s=m(),d(t.$$.fragment)},m(r,l){c(e,r,l),C(r,s,l),c(t,r,l),n=!0},p(r,l){const p={};l&32&&(p.filter=["==",["get","level"],r[5]]),l&1048576&&(p.$$scope={dirty:l,ctx:r}),e.$set(p);const g={};l&32&&(g.filter=["==",["get","level"],r[5]]),t.$set(g)},i(r){n||(h(e.$$.fragment,r),h(t.$$.fragment,r),n=!0)},o(r){_(e.$$.fragment,r),_(t.$$.fragment,r),n=!1},d(r){r&&M(s),v(e,r),v(t,r)}}}function Ke(o){let e,s;return e=new Me({props:{data:o[1],generateId:!0,$$slots:{default:[ze]},$$scope:{ctx:o}}}),{c(){d(e.$$.fragment)},m(t,n){c(e,t,n),s=!0},p(t,n){const r={};n&2&&(r.data=t[1]),n&1048608&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){s||(h(e.$$.fragment,t),s=!0)},o(t){_(e.$$.fragment,t),s=!1},d(t){v(e,t)}}}function Ue(o){let e,s,t,n,r,l,p,g,$,B,w,J,E,P,I,q,k,V,R,z,L,i,S,b,H,F,O,j,Z,K,N,D,W,T,Q,U;e=new he({}),$=new _e({}),w=new ve({props:{$$slots:{default:[Ne]},$$scope:{ctx:o}}}),w.$on("click",o[10]),E=new le({props:{errorMessage:o[3]}}),I=new be({props:{label:"Select Transport Authority or Local Authority District",id:"inputValue",$$slots:{default:[Pe]},$$scope:{ctx:o}}}),k=new je({props:{disabled:!o[6],$$slots:{default:[qe]},$$scope:{ctx:o}}}),k.$on("click",o[9]);function $e(a){o[13](a)}let x={label:"Or pick from the map",choices:[["TA","Transport Authorities"],["LAD","Local Authority Districts"]],inlineSmall:!0};o[5]!==void 0&&(x.value=o[5]),L=new we({props:x}),Y.push(()=>ie(L,"value",$e)),F=new le({props:{errorMessage:We}}),j=new Se({props:{label:"Or upload an ATIP GeoJSON file",onLoad:o[7]}}),D=new ye({props:{style:"streets",startBounds:[-5.96,49.89,2.31,55.94],$$slots:{default:[Ke]},$$scope:{ctx:o}}});function me(a){o[14](a)}let ee={};return o[2]!==void 0&&(ee.open=o[2]),T=new Ge({props:ee}),Y.push(()=>ie(T,"open",me)),{c(){d(e.$$.fragment),s=m(),t=y("div"),n=y("div"),r=y("h1"),r.textContent="Welcome to ATIP Scheme Sketcher v2",l=m(),p=y("p"),p.textContent=`App version: ${Ae()}`,g=m(),d($.$$.fragment),B=m(),d(w.$$.fragment),J=m(),d(E.$$.fragment),P=m(),d(I.$$.fragment),q=m(),d(k.$$.fragment),V=m(),R=y("hr"),z=m(),d(L.$$.fragment),S=m(),b=y("hr"),H=m(),d(F.$$.fragment),O=m(),d(j.$$.fragment),Z=m(),K=y("div"),N=y("div"),d(D.$$.fragment),W=m(),d(T.$$.fragment),A(r,"class","govuk-heading-l"),A(n,"class","govuk-grid-column-one-half left svelte-1qv6srk"),A(N,"id","map"),A(N,"class","svelte-1qv6srk"),A(K,"class","govuk-grid-column-one-half"),A(t,"class","govuk-grid-row below-header")},m(a,f){c(e,a,f),C(a,s,f),C(a,t,f),u(t,n),u(n,r),u(n,l),u(n,p),u(n,g),c($,n,null),u(n,B),c(w,n,null),u(n,J),c(E,n,null),u(n,P),c(I,n,null),u(n,q),c(k,n,null),u(n,V),u(n,R),u(n,z),c(L,n,null),u(n,S),u(n,b),u(n,H),c(F,n,null),u(n,O),c(j,n,null),u(t,Z),u(t,K),u(K,N),c(D,N,null),C(a,W,f),c(T,a,f),U=!0},p(a,[f]){const te={};f&1048576&&(te.$$scope={dirty:f,ctx:a}),w.$set(te);const ne={};f&8&&(ne.errorMessage=a[3]),E.$set(ne);const ae={};f&1048593&&(ae.$$scope={dirty:f,ctx:a}),I.$set(ae);const X={};f&64&&(X.disabled=!a[6]),f&1048576&&(X.$$scope={dirty:f,ctx:a}),k.$set(X);const se={};!i&&f&32&&(i=!0,se.value=a[5],ue(()=>i=!1)),L.$set(se);const re={};f&1048610&&(re.$$scope={dirty:f,ctx:a}),D.$set(re);const oe={};!Q&&f&4&&(Q=!0,oe.open=a[2],ue(()=>Q=!1)),T.$set(oe)},i(a){U||(h(e.$$.fragment,a),h($.$$.fragment,a),h(w.$$.fragment,a),h(E.$$.fragment,a),h(I.$$.fragment,a),h(k.$$.fragment,a),h(L.$$.fragment,a),h(F.$$.fragment,a),h(j.$$.fragment,a),h(D.$$.fragment,a),h(T.$$.fragment,a),U=!0)},o(a){_(e.$$.fragment,a),_($.$$.fragment,a),_(w.$$.fragment,a),_(E.$$.fragment,a),_(I.$$.fragment,a),_(k.$$.fragment,a),_(L.$$.fragment,a),_(F.$$.fragment,a),_(j.$$.fragment,a),_(D.$$.fragment,a),_(T.$$.fragment,a),U=!1},d(a){a&&(M(s),M(t),M(W)),v(e,a),v($),v(w),v(E),v(I),v(k),v(L),v(F),v(j),v(D),v(T,a)}}}let We="";function Qe(o,e,s){let t,n;ke(o,Oe,i=>s(15,n=i));let r={type:"FeatureCollection",features:[]},l=!1,g=new URLSearchParams(window.location.search).get("error")||"",$,B,w=new Set,J="TA";Le(async()=>{Ee(),s(1,r=await Ie());for(let i of r.features){let S=document.createElement("option");S.value=i.properties.full_name,S.label=`${i.properties.name} (${i.properties.level})`,B.appendChild(S),w.add(i.properties.full_name)}});function E(i,S){try{let b=JSON.parse(S),H=Fe(b.features,r);if(!H)throw new Error("Can't figure out the authority boundary that fully contains this scheme");b.authority=H;let F=b.authority,O=P(b);O!="v1"&&(F+=`_${O}`),Te(F,JSON.stringify(b)),window.location.href=`scheme.html?authority=${b.authority}&schema=${O}`}catch(b){s(3,g=`Couldn't load scheme from a file: ${b}`)}}function P(i){if(i.features.length>0){let S=i.features[0].properties;for(let b of["pipeline"])if(S&&b in S)return b}return n}function I(i){window.location.href=`scheme.html?authority=${i.detail.features[0].properties.full_name}&schema=${n}`}function q(){window.location.href=`scheme.html?authority=${$}&schema=${n}`}const k=()=>s(2,l=!l);function V(){$=this.value,s(0,$)}function R(i){Y[i?"unshift":"push"](()=>{B=i,s(4,B)})}function z(i){J=i,s(5,J)}function L(i){l=i,s(2,l)}return o.$$.update=()=>{o.$$.dirty&1&&s(6,t=w.has($))},[$,r,l,g,B,J,t,E,I,q,k,V,R,z,L]}class Xe extends ge{constructor(e){super(),de(this,e,Qe,Ue,ce,{})}}document.body.className+=" js-enabled"+("noModule"in HTMLScriptElement.prototype?" govuk-frontend-supported":"");new Xe({target:document.getElementById("app")}); +import{S as ge,i as de,s as ce,H as he,L as _e,a as ve,E as le,F as be,R as we,b as Y,c as ie,d as ye,M as Se,e as d,f as m,g as S,h as Ae,j as A,m as c,k as C,l as u,n as ue,t as h,o as _,p as M,q as v,r as ke,u as Le,v as G,w as fe,x as Ce,G as Me,y as Ee,z as Ie,A as Fe,B as Te,C as Be,D as De,I as Je,J as Oe,K as pe}from"./index-112be501.js";import{D as je,A as Ge}from"./About-dd58f7c4.js";import{P as He}from"./Popup-41ef12d1.js";function Ne(o){let e;return{c(){e=G("About")},m(s,t){C(s,e,t)},d(s){s&&M(e)}}}function Pe(o){let e,s,t,n,r;return{c(){e=S("input"),s=m(),t=S("datalist"),A(e,"class","govuk-input govuk-input--width-20"),A(e,"id","inputValue"),A(e,"data-testid","transport-authority"),A(e,"list","authorities-list"),A(t,"id","authorities-list")},m(l,p){C(l,e,p),fe(e,o[0]),C(l,s,p),C(l,t,p),o[12](t),n||(r=Ce(e,"input",o[11]),n=!0)},p(l,p){p&1&&e.value!==l[0]&&fe(e,l[0])},d(l){l&&(M(e),M(s),M(t)),o[12](null),n=!1,r()}}}function qe(o){let e;return{c(){e=G("Start")},m(s,t){C(s,e,t)},d(s){s&&M(e)}}}function Ve(o){let e,s=o[19].name+"",t,n,r=o[19].level+"",l,p;return{c(){e=S("p"),t=G(s),n=G(" ("),l=G(r),p=G(")")},m(g,$){C(g,e,$),u(e,t),u(e,n),u(e,l),u(e,p)},p(g,$){$&524288&&s!==(s=g[19].name+"")&&pe(t,s),$&524288&&r!==(r=g[19].level+"")&&pe(l,r)},d(g){g&&M(e)}}}function ze(o){let e,s;return e=new He({props:{$$slots:{default:[Ve,({props:t})=>({19:t}),({props:t})=>t?524288:0]},$$scope:{ctx:o}}}),{c(){d(e.$$.fragment)},m(t,n){c(e,t,n),s=!0},p(t,n){const r={};n&1572864&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){s||(h(e.$$.fragment,t),s=!0)},o(t){_(e.$$.fragment,t),s=!1},d(t){v(e,t)}}}function Re(o){let e,s,t,n;return e=new Be({props:{id:"boundaries",filter:["==",["get","level"],o[5]],paint:{"fill-color":"rgb(200, 100, 240)","fill-outline-color":"rgb(200, 100, 240)","fill-opacity":De(0,.5)},manageHoverState:!0,hoverCursor:"pointer",$$slots:{default:[ze]},$$scope:{ctx:o}}}),e.$on("click",o[8]),t=new Je({props:{id:"boundaries-outline",filter:["==",["get","level"],o[5]],paint:{"line-color":"rgb(200, 100, 240)","line-width":2.5},manageHoverState:!0}}),{c(){d(e.$$.fragment),s=m(),d(t.$$.fragment)},m(r,l){c(e,r,l),C(r,s,l),c(t,r,l),n=!0},p(r,l){const p={};l&32&&(p.filter=["==",["get","level"],r[5]]),l&1048576&&(p.$$scope={dirty:l,ctx:r}),e.$set(p);const g={};l&32&&(g.filter=["==",["get","level"],r[5]]),t.$set(g)},i(r){n||(h(e.$$.fragment,r),h(t.$$.fragment,r),n=!0)},o(r){_(e.$$.fragment,r),_(t.$$.fragment,r),n=!1},d(r){r&&M(s),v(e,r),v(t,r)}}}function Ke(o){let e,s;return e=new Me({props:{data:o[1],generateId:!0,$$slots:{default:[Re]},$$scope:{ctx:o}}}),{c(){d(e.$$.fragment)},m(t,n){c(e,t,n),s=!0},p(t,n){const r={};n&2&&(r.data=t[1]),n&1048608&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){s||(h(e.$$.fragment,t),s=!0)},o(t){_(e.$$.fragment,t),s=!1},d(t){v(e,t)}}}function Ue(o){let e,s,t,n,r,l,p,g,$,B,w,J,E,P,I,q,k,V,z,R,L,i,y,b,H,F,O,j,Z,K,N,D,W,T,Q,U;e=new he({}),$=new _e({}),w=new ve({props:{$$slots:{default:[Ne]},$$scope:{ctx:o}}}),w.$on("click",o[10]),E=new le({props:{errorMessage:o[3]}}),I=new be({props:{label:"Select Transport Authority or Local Authority District",id:"inputValue",$$slots:{default:[Pe]},$$scope:{ctx:o}}}),k=new je({props:{disabled:!o[6],$$slots:{default:[qe]},$$scope:{ctx:o}}}),k.$on("click",o[9]);function $e(a){o[13](a)}let x={label:"Or pick from the map",choices:[["TA","Transport Authorities"],["LAD","Local Authority Districts"]],inlineSmall:!0};o[5]!==void 0&&(x.value=o[5]),L=new we({props:x}),Y.push(()=>ie(L,"value",$e)),F=new le({props:{errorMessage:We}}),j=new ye({props:{label:"Or upload an ATIP GeoJSON file",onLoad:o[7]}}),D=new Se({props:{style:"streets",startBounds:[-5.96,49.89,2.31,55.94],$$slots:{default:[Ke]},$$scope:{ctx:o}}});function me(a){o[14](a)}let ee={};return o[2]!==void 0&&(ee.open=o[2]),T=new Ge({props:ee}),Y.push(()=>ie(T,"open",me)),{c(){d(e.$$.fragment),s=m(),t=S("div"),n=S("div"),r=S("h1"),r.textContent="Welcome to ATIP Scheme Sketcher v2",l=m(),p=S("p"),p.textContent=`App version: ${Ae()}`,g=m(),d($.$$.fragment),B=m(),d(w.$$.fragment),J=m(),d(E.$$.fragment),P=m(),d(I.$$.fragment),q=m(),d(k.$$.fragment),V=m(),z=S("hr"),R=m(),d(L.$$.fragment),y=m(),b=S("hr"),H=m(),d(F.$$.fragment),O=m(),d(j.$$.fragment),Z=m(),K=S("div"),N=S("div"),d(D.$$.fragment),W=m(),d(T.$$.fragment),A(r,"class","govuk-heading-l"),A(n,"class","govuk-grid-column-one-half left svelte-16qyz2v"),A(N,"id","map"),A(N,"class","svelte-16qyz2v"),A(K,"class","govuk-grid-column-one-half"),A(t,"class","govuk-grid-row below-header")},m(a,f){c(e,a,f),C(a,s,f),C(a,t,f),u(t,n),u(n,r),u(n,l),u(n,p),u(n,g),c($,n,null),u(n,B),c(w,n,null),u(n,J),c(E,n,null),u(n,P),c(I,n,null),u(n,q),c(k,n,null),u(n,V),u(n,z),u(n,R),c(L,n,null),u(n,y),u(n,b),u(n,H),c(F,n,null),u(n,O),c(j,n,null),u(t,Z),u(t,K),u(K,N),c(D,N,null),C(a,W,f),c(T,a,f),U=!0},p(a,[f]){const te={};f&1048576&&(te.$$scope={dirty:f,ctx:a}),w.$set(te);const ne={};f&8&&(ne.errorMessage=a[3]),E.$set(ne);const ae={};f&1048593&&(ae.$$scope={dirty:f,ctx:a}),I.$set(ae);const X={};f&64&&(X.disabled=!a[6]),f&1048576&&(X.$$scope={dirty:f,ctx:a}),k.$set(X);const se={};!i&&f&32&&(i=!0,se.value=a[5],ue(()=>i=!1)),L.$set(se);const re={};f&1048610&&(re.$$scope={dirty:f,ctx:a}),D.$set(re);const oe={};!Q&&f&4&&(Q=!0,oe.open=a[2],ue(()=>Q=!1)),T.$set(oe)},i(a){U||(h(e.$$.fragment,a),h($.$$.fragment,a),h(w.$$.fragment,a),h(E.$$.fragment,a),h(I.$$.fragment,a),h(k.$$.fragment,a),h(L.$$.fragment,a),h(F.$$.fragment,a),h(j.$$.fragment,a),h(D.$$.fragment,a),h(T.$$.fragment,a),U=!0)},o(a){_(e.$$.fragment,a),_($.$$.fragment,a),_(w.$$.fragment,a),_(E.$$.fragment,a),_(I.$$.fragment,a),_(k.$$.fragment,a),_(L.$$.fragment,a),_(F.$$.fragment,a),_(j.$$.fragment,a),_(D.$$.fragment,a),_(T.$$.fragment,a),U=!1},d(a){a&&(M(s),M(t),M(W)),v(e,a),v($),v(w),v(E),v(I),v(k),v(L),v(F),v(j),v(D),v(T,a)}}}let We="";function Qe(o,e,s){let t,n;ke(o,Oe,i=>s(15,n=i));let r={type:"FeatureCollection",features:[]},l=!1,g=new URLSearchParams(window.location.search).get("error")||"",$,B,w=new Set,J="TA";Le(async()=>{Ee(),s(1,r=await Ie());for(let i of r.features){let y=document.createElement("option");y.value=i.properties.full_name,y.label=`${i.properties.name} (${i.properties.level})`,B.appendChild(y),w.add(i.properties.full_name)}});function E(i,y){try{let b=JSON.parse(y),H=Fe(b.features,r);if(!H)throw new Error("Can't figure out the authority boundary that fully contains this scheme");b.authority=H;let F=b.authority,O=P(b);O!="v1"&&(F+=`_${O}`),Te(F,JSON.stringify(b)),window.location.href=`scheme.html?authority=${b.authority}&schema=${O}`}catch(b){s(3,g=`Couldn't load scheme from a file: ${b}`)}}function P(i){if(i.features.length>0){let y=i.features[0].properties;for(let b of["pipeline"])if(y&&b in y)return b}return n}function I(i){window.location.href=`scheme.html?authority=${i.detail.features[0].properties.full_name}&schema=${n}`}function q(){window.location.href=`scheme.html?authority=${$}&schema=${n}`}const k=()=>s(2,l=!l);function V(){$=this.value,s(0,$)}function z(i){Y[i?"unshift":"push"](()=>{B=i,s(4,B)})}function R(i){J=i,s(5,J)}function L(i){l=i,s(2,l)}return o.$$.update=()=>{o.$$.dirty&1&&s(6,t=w.has($))},[$,r,l,g,B,J,t,E,I,q,k,V,z,R,L]}class Xe extends ge{constructor(e){super(),de(this,e,Qe,Ue,ce,{})}}document.body.className+=" js-enabled"+("noModule"in HTMLScriptElement.prototype?" govuk-frontend-supported":"");new Xe({target:document.getElementById("app")}); diff --git a/add-banner/index.html b/add-banner/index.html index 88b78f4e..9ef90b00 100644 --- a/add-banner/index.html +++ b/add-banner/index.html @@ -7,12 +7,12 @@ content="initial-scale=1,maximum-scale=1,user-scalable=no" /> Active Travel Infrastructure Platform v2 - + - +