Skip to content

Commit

Permalink
deploy: 0d44579
Browse files Browse the repository at this point in the history
  • Loading branch information
yongrenjie committed Nov 22, 2023
1 parent 62aee29 commit a6e76f5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ modelled development strategies on any of the four indicators.
map to deselect all output areas.)`,A=E1(),O=Te("div"),P=Te("label"),P.textContent="Signature",F=E1(),T=Te("input"),M=E1(),Re.c(),B=E1(),L0($.$$.fragment),te=E1(),L0(K.$$.fragment),We=E1(),L0(se.$$.fragment),ae(P,"for","sig-modified"),ae(P,"class","svelte-zt4ipt"),ae(T,"type","checkbox"),ae(T,"id","sig-modified"),ae(O,"id","changes-grid"),ae(O,"class","svelte-zt4ipt")},m(p1,A1){l1(p1,e,A1),me(e,i),me(e,_),me(e,o),me(e,r),me(e,u),me(e,d),l1(p1,C,A1),l1(p1,x,A1),l1(p1,A,A1),l1(p1,O,A1),me(O,P),me(O,F),me(O,T),T.checked=s[2],me(O,M),Re.m(O,null),me(O,B),I0($,O,null),me(O,te),I0(K,O,null),me(O,We),I0(se,O,null),de=!0,Ee||(Ae=[K1(T,"change",s[21]),K1(T,"change",s[22])],Ee=!0)},p(p1,A1){(!de||A1[0]&1)&&a!==(a=p1[0].length+"")&&C4(_,a),(!de||A1[0]&1)&&p!==(p=p1[0].length>1?"s":"")&&C4(r,p),(!de||A1[0]&1)&&h!==(h=p1[0].map(dy).join(", ")+"")&&C4(d,h),A1[0]&4&&(T.checked=p1[2]),Se===(Se=Qe(p1))&&Re?Re.p(p1,A1):(Re.d(1),Re=Se(p1),Re&&(Re.c(),Re.m(O,B)));const $1={};A1[0]&1024&&($1.min=p1[10]),A1[0]&2048&&($1.max=p1[11]),A1[0]&1024&&($1.defaultVal=p1[10]),!Z&&A1[0]&32&&(Z=!0,$1.modified=p1[5],k4(()=>Z=!1)),!re&&A1[0]&16&&(re=!0,$1.value=p1[4],k4(()=>re=!1)),$.$set($1);const G1={};A1[0]&4096&&(G1.min=p1[12]),A1[0]&8192&&(G1.max=p1[13]),A1[0]&4096&&(G1.defaultVal=p1[12]),!pe&&A1[0]&128&&(pe=!0,G1.modified=p1[7],k4(()=>pe=!1)),!De&&A1[0]&64&&(De=!0,G1.value=p1[6],k4(()=>De=!1)),K.$set(G1);const V={};!be&&A1[0]&512&&(be=!0,V.modified=p1[9],k4(()=>be=!1)),!L&&A1[0]&256&&(L=!0,V.value=p1[8],k4(()=>L=!1)),se.$set(V)},i(p1){de||(v1($.$$.fragment,p1),v1(K.$$.fragment,p1),v1(se.$$.fragment,p1),de=!0)},o(p1){z1($.$$.fragment,p1),z1(K.$$.fragment,p1),z1(se.$$.fragment,p1),de=!1},d(p1){p1&&o1(e),p1&&o1(C),p1&&o1(x),p1&&o1(A),p1&&o1(O),Re.d(),M0($),M0(K),M0(se),Ee=!1,_4(Ae)}}}function DE(s){let e;return{c(){e=Te("p"),e.textContent=`Click on the map to select an output area to modify. You can select
multiple output areas by holding down the Shift key.`},m(i,a){l1(i,e,a)},p:e0,i:e0,o:e0,d(i){i&&o1(e)}}}function wE(s){let e,i=[...W1.signatures.entries()],a=[];for(let _=0;_<i.length;_+=1)a[_]=jy(hy(s,i,_));return{c(){e=Te("select");for(let _=0;_<a.length;_+=1)a[_].c();ae(e,"id","sig-dropdown"),e.disabled=!0,ae(e,"class","svelte-zt4ipt")},m(_,o){l1(_,e,o);for(let p=0;p<a.length;p+=1)a[p]&&a[p].m(e,null);L9(e,s[3])},p(_,o){if(o&0){i=[...W1.signatures.entries()];let p;for(p=0;p<i.length;p+=1){const r=hy(_,i,p);a[p]?a[p].p(r,o):(a[p]=jy(r),a[p].c(),a[p].m(e,null))}for(;p<a.length;p+=1)a[p].d(1);a.length=i.length}o[0]&8&&L9(e,_[3])},d(_){_&&o1(e),g5(a,_)}}}function OE(s){let e,i,a,_=[...W1.signatures.entries()],o=[];for(let p=0;p<_.length;p+=1)o[p]=qy(Ey(s,_,p));return{c(){e=Te("select");for(let p=0;p<o.length;p+=1)o[p].c();ae(e,"id","sig-dropdown"),ae(e,"class","svelte-zt4ipt"),s[1]===void 0&&ei(()=>s[23].call(e))},m(p,r){l1(p,e,r);for(let u=0;u<o.length;u+=1)o[u]&&o[u].m(e,null);L9(e,s[1],!0),i||(a=[K1(e,"change",s[23]),K1(e,"change",s[15])],i=!0)},p(p,r){if(r&0){_=[...W1.signatures.entries()];let u;for(u=0;u<_.length;u+=1){const h=Ey(p,_,u);o[u]?o[u].p(h,r):(o[u]=qy(h),o[u].c(),o[u].m(e,null))}for(;u<o.length;u+=1)o[u].d(1);o.length=_.length}r[0]&2&&L9(e,p[1])},d(p){p&&o1(e),g5(o,p),i=!1,_4(a)}}}function jy(s){let e,i=s[35]+"",a,_,o=s[36].name+"",p;return{c(){e=Te("option"),a=t0(i),_=t0(": "),p=t0(o),e.__value=s[35],e.value=e.__value},m(r,u){l1(r,e,u),me(e,a),me(e,_),me(e,p)},p:e0,d(r){r&&o1(e)}}}function qy(s){let e,i=s[35]+"",a,_,o=s[36].name+"",p;return{c(){e=Te("option"),a=t0(i),_=t0(": "),p=t0(o),e.__value=s[35],e.value=e.__value},m(r,u){l1(r,e,u),me(e,a),me(e,_),me(e,p)},p:e0,d(r){r&&o1(e)}}}function FE(s){let e,i,a,_,o,p,r,u,h,d,C,x;const A=[DE,PE],O=[];function P(F,T){return F[0].length===0?0:1}return r=P(s),u=O[r]=A[r](s),{c(){e=Te("h3"),e.textContent="Step 2: Modify output areas",i=E1(),a=Te("input"),_=E1(),o=Te("input"),p=E1(),u.c(),h=z5(),ae(e,"class","svelte-zt4ipt"),ae(a,"type","button"),a.value="Back to scenario selection",ae(o,"type","button"),o.value="Continue to add metadata"},m(F,T){l1(F,e,T),l1(F,i,T),l1(F,a,T),l1(F,_,T),l1(F,o,T),l1(F,p,T),O[r].m(F,T),l1(F,h,T),d=!0,C||(x=[K1(a,"click",s[19]),K1(o,"click",s[20])],C=!0)},p(F,T){let M=r;r=P(F),r===M?O[r].p(F,T):(L4(),z1(O[M],1,1,()=>{O[M]=null}),R4(),u=O[r],u?u.p(F,T):(u=O[r]=A[r](F),u.c()),v1(u,1),u.m(h.parentNode,h))},i(F){d||(v1(u),d=!0)},o(F){z1(u),d=!1},d(F){F&&o1(e),F&&o1(i),F&&o1(a),F&&o1(_),F&&o1(o),F&&o1(p),O[r].d(F),F&&o1(h),C=!1,_4(x)}}}const dy=s=>s.name;function SE(s,e,i){let a,_,o;d0(s,y5,je=>i(0,a=je)),d0(s,M5,je=>i(30,_=je)),d0(s,_8,je=>i(31,o=je));const p=Ji();let{changes:r}=e,{userChangesPresent:u}=e,h=!1;lc(()=>{K0(_8,o=!0,o),i(18,h=!0)}),R8(()=>{K0(_8,o=!1,o)});function d(je){return _.get(W1.referenceScenarioObject.metadata.name).values.get(je).get("signature_type")}function C(je){const s1=r.has(je),Je=r.get(je);return new Map([["signature_type",s1?Je.get("signature_type"):null],["job_types",s1?Je.get("job_types"):null],["use",s1?Je.get("use"):null],["greenspace",s1?Je.get("greenspace"):null],["reference_sig",d(je)]])}function x(){if(!P&&!M&&!$&&!re)a.forEach(s1=>{r.delete(s1.name)});else{const s1=new Map([["signature_type",P?O:null],["job_types",M?T:null],["use",$?B:null],["greenspace",re?Z:null]]);a.length===1?a.forEach(Je=>{r.set(Je.name,s1)}):a.length>1&&a.forEach(Je=>{const Ye=C(Je.name);s1.forEach((d1,k1)=>{d1!==null&&Ye.set(k1,d1)}),Ye.delete("reference_sig"),r.set(Je.name,Ye)})}const je=r.size===0?"No changes":[...r.entries()].map(([s1,Je])=>s1+": "+[...Je.entries()].map(([Ye,d1])=>Ye+": "+String(d1).padEnd(4," ")).join("; ")).join(`
`);console.log(`Updated 'changes' to:
`,je),i(16,u=!0)}function A(je){if(je.length!==0)if(je.length===1){const s1=je[0].name,Je=C(s1);i(1,O=Je.get("signature_type")),i(2,P=O!==null),i(4,T=Je.get("job_types")),i(5,M=T!==null),i(6,B=Je.get("use")),i(7,$=B!==null),i(8,Z=Je.get("greenspace")),i(9,re=Z!==null),i(3,F=Je.get("reference_sig")),console.log(O),console.log(F),i(10,te=W1.signatures[O||F].job_d1),i(11,K=W1.signatures[O||F].job_d9),i(12,pe=W1.signatures[O||F].use_d1),i(13,De=W1.signatures[O||F].use_d9)}else{const s1=je.map(n1=>C(n1.name).get("signature_type")),Je=je.map(n1=>C(n1.name).get("reference_sig"));s1.every(n1=>n1===null)?(i(2,P=!1),Je.every(n1=>n1===Je[0])?i(3,F=Je[0]):i(3,F=null)):s1.some(n1=>n1!==null)&&s1.some(n1=>n1===null)?(i(1,O=null),i(2,P=!1),i(3,F=null)):s1.every(n1=>n1===s1[0])?(i(1,O=s1[0]),i(2,P=!0)):(i(1,O=null),i(2,P=!1));const Ye=je.map(n1=>C(n1.name).get("job_types"));Ye.every(n1=>n1===Ye[0]&&n1!==null)?(i(4,T=Ye[0]),i(5,M=!0)):(i(4,T=null),i(5,M=!1));const d1=je.map(n1=>C(n1.name).get("use"));d1.every(n1=>n1===d1[0]&&n1!==null)?(i(6,B=d1[0]),i(7,$=!0)):(i(6,B=null),i(7,$=!1));const k1=je.map(n1=>C(n1.name).get("greenspace"));k1.every(n1=>n1===k1[0]&&n1!==null)?(i(8,Z=k1[0]),i(9,re=!0)):(i(8,Z=null),i(9,re=!1))}}let O=null,P,F,T=null,M,B=null,$,Z=null,re,te,K,pe,De;const We=()=>p("returnToSelection",{}),se=()=>p("proceedToMetadata",{});function be(){P=this.checked,i(2,P)}const L=()=>{P&&i(1,O=F),a.length>1&&!P&&i(1,O=null),x()};function de(){O=wa(this),i(1,O)}function Ee(je){M=je,i(5,M)}function Ae(je){T=je,i(4,T)}function Qe(je){$=je,i(7,$)}function Se(je){B=je,i(6,B)}function Re(je){re=je,i(9,re)}function Oe(je){Z=je,i(8,Z)}return s.$$set=je=>{"changes"in je&&i(17,r=je.changes),"userChangesPresent"in je&&i(16,u=je.userChangesPresent)},s.$$.update=()=>{s.$$.dirty[0]&262145&&h&&A(a)},[a,O,P,F,T,M,B,$,Z,re,te,K,pe,De,p,x,u,r,h,We,se,be,L,de,Ee,Ae,Qe,Se,Re,Oe]}class kE extends o4{constructor(e){super(),y4(this,e,SE,FE,J0,{changes:17,userChangesPresent:16},null,[-1,-1])}}function TE(s){let e,i,a,_,o,p,r,u,h,d,C;return{c(){e=Te("h3"),e.textContent="Step 3: Input scenario metadata",i=E1(),a=Te("input"),_=E1(),o=Te("input"),p=E1(),r=Te("input"),u=E1(),h=Te("textarea"),ae(e,"class","svelte-1kzfktu"),ae(a,"type","button"),a.value="Back to OA modification",ae(o,"type","button"),o.value="Accept changes and calculate",ae(r,"type","text"),ae(r,"placeholder","Scenario title..."),ae(h,"placeholder","A longer textual description..."),ae(h,"spellcheck","false")},m(x,A){l1(x,e,A),l1(x,i,A),l1(x,a,A),l1(x,_,A),l1(x,o,A),l1(x,p,A),l1(x,r,A),F5(r,s[0]),l1(x,u,A),l1(x,h,A),F5(h,s[1]),d||(C=[K1(a,"click",s[3]),K1(o,"click",s[4]),K1(r,"input",s[5]),K1(h,"input",s[6])],d=!0)},p(x,[A]){A&1&&r.value!==x[0]&&F5(r,x[0]),A&2&&F5(h,x[1])},i:e0,o:e0,d(x){x&&o1(e),x&&o1(i),x&&o1(a),x&&o1(_),x&&o1(o),x&&o1(p),x&&o1(r),x&&o1(u),x&&o1(h),d=!1,_4(C)}}}function IE(s,e,i){let{scenarioShort:a=""}=e,{scenarioDescription:_=""}=e;const o=Ji(),p=()=>o("returnToModify"),r=()=>o("acceptChangesAndCalculate");function u(){a=this.value,i(0,a)}function h(){_=this.value,i(1,_)}return s.$$set=d=>{"scenarioShort"in d&&i(0,a=d.scenarioShort),"scenarioDescription"in d&&i(1,_=d.scenarioDescription)},[a,_,o,p,r,u,h]}class ME extends o4{constructor(e){super(),y4(this,e,IE,TE,J0,{scenarioShort:0,scenarioDescription:1})}}function zE(s){let e,i,a,_,o,p,r;return{c(){e=Te("div"),i=Te("div"),a=Te("p"),a.textContent="Calculation in progress...",_=E1(),o=Te("input"),ae(a,"class","svelte-1tzbrs5"),ae(o,"type","button"),o.value="Cancel",ae(o,"id","cancel-calculation"),ae(o,"class","svelte-1tzbrs5"),ae(i,"id","calculating"),ae(i,"class","svelte-1tzbrs5"),ae(e,"id","calculating-cover"),ae(e,"class","svelte-1tzbrs5")},m(u,h){l1(u,e,h),me(e,i),me(i,a),me(i,_),me(i,o),p||(r=K1(o,"click",s[1]),p=!0)},p:e0,i:e0,o:e0,d(u){u&&o1(e),p=!1,r()}}}function LE(s){const e=Ji();return[e,()=>e("abort",{})]}class RE extends o4{constructor(e){super(),y4(this,e,LE,zE,J0,{})}}function BE(s){let e,i,a,_,o,p,r,u,h,d,C,x,A,O,P,F,T;return{c(){e=Te("div"),i=Te("div"),a=Te("h3"),a.textContent="An error occurred :(",_=E1(),o=Te("p"),p=t0(s[0]),r=E1(),u=Te("p"),h=t0("Please try again, or "),d=Te("a"),C=t0("contact the developers"),x=t0(" if the problem persists."),A=E1(),O=Te("p"),P=Te("button"),P.textContent="Close",ae(a,"class","svelte-1xb3nt3"),ae(o,"id","error-message"),ae(o,"class","svelte-1xb3nt3"),ae(d,"href",NE),ae(d,"class","svelte-1xb3nt3"),ae(u,"class","svelte-1xb3nt3"),ae(P,"id","error-close"),ae(P,"class","svelte-1xb3nt3"),ae(O,"class","svelte-1xb3nt3"),ae(i,"id","error"),ae(i,"class","svelte-1xb3nt3"),ae(e,"id","error-cover"),ae(e,"class","svelte-1xb3nt3")},m(M,B){l1(M,e,B),me(e,i),me(i,a),me(i,_),me(i,o),me(o,p),me(i,r),me(i,u),me(u,h),me(u,d),me(d,C),me(u,x),me(i,A),me(i,O),me(O,P),F||(T=K1(P,"click",s[1]),F=!0)},p(M,[B]){B&1&&C4(p,M[0])},i:e0,o:e0,d(M){M&&o1(e),F=!1,T()}}}const NE="https://github.com/Urban-Analytics-Technology-Platform/demoland-web/issues";function VE(s,e,i){const a=Ji();let{message:_}=e;function o(){a("close")}return s.$$set=p=>{"message"in p&&i(0,_=p.message)},[_,o]}class Ap extends o4{constructor(e){super(),y4(this,e,VE,BE,J0,{message:0})}}const UE="modulepreload",$E=function(s){return"/demoland-web/dev/"+s},fy={},WE=function(e,i,a){if(!i||i.length===0)return e();const _=document.getElementsByTagName("link");return Promise.all(i.map(o=>{if(o=$E(o),o in fy)return;fy[o]=!0;const p=o.endsWith(".css"),r=p?'[rel="stylesheet"]':"";if(!!a)for(let d=_.length-1;d>=0;d--){const C=_[d];if(C.href===o&&(!p||C.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${r}`))return;const h=document.createElement("link");if(h.rel=p?"stylesheet":UE,p||(h.as="script",h.crossOrigin=""),h.href=o,document.head.appendChild(h),p)return new Promise((d,C)=>{h.addEventListener("load",d),h.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>e())};let M6;const y8={};let U2=0;async function GE(){if(M6)return M6;const s=await WE(()=>import("./pyodide_worker-4fcb317a.js"),[]);return M6=new s.default,M6.onmessage=e=>{if(e.data.error)throw new Error(e.data.error);{const{id:i,...a}=e.data,_=y8[i];console.log(y8),delete y8[i],_(a)}},M6}async function ZE(s,e){const i=await GE();return U2=(U2+1)%Number.MAX_SAFE_INTEGER,new Promise(a=>{y8[U2]=a,i.postMessage({...e,python:s,id:U2})})}async function HE(s){const i=await ZE(`
`,je),i(16,u=!0)}function A(je){if(je.length!==0)if(je.length===1){const s1=je[0].name,Je=C(s1);i(1,O=Je.get("signature_type")),i(2,P=O!==null),i(4,T=Je.get("job_types")),i(5,M=T!==null),i(6,B=Je.get("use")),i(7,$=B!==null),i(8,Z=Je.get("greenspace")),i(9,re=Z!==null),i(3,F=Je.get("reference_sig")),console.log(O),console.log(F),i(10,te=W1.signatures[O||F].job_d1),i(11,K=W1.signatures[O||F].job_d9),i(12,pe=W1.signatures[O||F].use_d1),i(13,De=W1.signatures[O||F].use_d9)}else{const s1=je.map(n1=>C(n1.name).get("signature_type")),Je=je.map(n1=>C(n1.name).get("reference_sig"));s1.every(n1=>n1===null)?(i(2,P=!1),Je.every(n1=>n1===Je[0])?i(3,F=Je[0]):i(3,F=null)):s1.some(n1=>n1!==null)&&s1.some(n1=>n1===null)?(i(1,O=null),i(2,P=!1),i(3,F=null)):s1.every(n1=>n1===s1[0])?(i(1,O=s1[0]),i(2,P=!0)):(i(1,O=null),i(2,P=!1));const Ye=je.map(n1=>C(n1.name).get("job_types"));Ye.every(n1=>n1===Ye[0]&&n1!==null)?(i(4,T=Ye[0]),i(5,M=!0)):(i(4,T=null),i(5,M=!1));const d1=je.map(n1=>C(n1.name).get("use"));d1.every(n1=>n1===d1[0]&&n1!==null)?(i(6,B=d1[0]),i(7,$=!0)):(i(6,B=null),i(7,$=!1));const k1=je.map(n1=>C(n1.name).get("greenspace"));k1.every(n1=>n1===k1[0]&&n1!==null)?(i(8,Z=k1[0]),i(9,re=!0)):(i(8,Z=null),i(9,re=!1))}}let O=null,P,F,T=null,M,B=null,$,Z=null,re,te,K,pe,De;const We=()=>p("returnToSelection",{}),se=()=>p("proceedToMetadata",{});function be(){P=this.checked,i(2,P)}const L=()=>{P&&i(1,O=F),a.length>1&&!P&&i(1,O=null),x()};function de(){O=wa(this),i(1,O)}function Ee(je){M=je,i(5,M)}function Ae(je){T=je,i(4,T)}function Qe(je){$=je,i(7,$)}function Se(je){B=je,i(6,B)}function Re(je){re=je,i(9,re)}function Oe(je){Z=je,i(8,Z)}return s.$$set=je=>{"changes"in je&&i(17,r=je.changes),"userChangesPresent"in je&&i(16,u=je.userChangesPresent)},s.$$.update=()=>{s.$$.dirty[0]&262145&&h&&A(a)},[a,O,P,F,T,M,B,$,Z,re,te,K,pe,De,p,x,u,r,h,We,se,be,L,de,Ee,Ae,Qe,Se,Re,Oe]}class kE extends o4{constructor(e){super(),y4(this,e,SE,FE,J0,{changes:17,userChangesPresent:16},null,[-1,-1])}}function TE(s){let e,i,a,_,o,p,r,u,h,d,C;return{c(){e=Te("h3"),e.textContent="Step 3: Input scenario metadata",i=E1(),a=Te("input"),_=E1(),o=Te("input"),p=E1(),r=Te("input"),u=E1(),h=Te("textarea"),ae(e,"class","svelte-1kzfktu"),ae(a,"type","button"),a.value="Back to OA modification",ae(o,"type","button"),o.value="Accept changes and calculate",ae(r,"type","text"),ae(r,"placeholder","Scenario title..."),ae(h,"placeholder","A longer textual description..."),ae(h,"spellcheck","false")},m(x,A){l1(x,e,A),l1(x,i,A),l1(x,a,A),l1(x,_,A),l1(x,o,A),l1(x,p,A),l1(x,r,A),F5(r,s[0]),l1(x,u,A),l1(x,h,A),F5(h,s[1]),d||(C=[K1(a,"click",s[3]),K1(o,"click",s[4]),K1(r,"input",s[5]),K1(h,"input",s[6])],d=!0)},p(x,[A]){A&1&&r.value!==x[0]&&F5(r,x[0]),A&2&&F5(h,x[1])},i:e0,o:e0,d(x){x&&o1(e),x&&o1(i),x&&o1(a),x&&o1(_),x&&o1(o),x&&o1(p),x&&o1(r),x&&o1(u),x&&o1(h),d=!1,_4(C)}}}function IE(s,e,i){let{scenarioShort:a=""}=e,{scenarioDescription:_=""}=e;const o=Ji(),p=()=>o("returnToModify"),r=()=>o("acceptChangesAndCalculate");function u(){a=this.value,i(0,a)}function h(){_=this.value,i(1,_)}return s.$$set=d=>{"scenarioShort"in d&&i(0,a=d.scenarioShort),"scenarioDescription"in d&&i(1,_=d.scenarioDescription)},[a,_,o,p,r,u,h]}class ME extends o4{constructor(e){super(),y4(this,e,IE,TE,J0,{scenarioShort:0,scenarioDescription:1})}}function zE(s){let e,i,a,_,o,p,r;return{c(){e=Te("div"),i=Te("div"),a=Te("p"),a.textContent="Calculation in progress...",_=E1(),o=Te("input"),ae(a,"class","svelte-1tzbrs5"),ae(o,"type","button"),o.value="Cancel",ae(o,"id","cancel-calculation"),ae(o,"class","svelte-1tzbrs5"),ae(i,"id","calculating"),ae(i,"class","svelte-1tzbrs5"),ae(e,"id","calculating-cover"),ae(e,"class","svelte-1tzbrs5")},m(u,h){l1(u,e,h),me(e,i),me(i,a),me(i,_),me(i,o),p||(r=K1(o,"click",s[1]),p=!0)},p:e0,i:e0,o:e0,d(u){u&&o1(e),p=!1,r()}}}function LE(s){const e=Ji();return[e,()=>e("abort",{})]}class RE extends o4{constructor(e){super(),y4(this,e,LE,zE,J0,{})}}function BE(s){let e,i,a,_,o,p,r,u,h,d,C,x,A,O,P,F,T;return{c(){e=Te("div"),i=Te("div"),a=Te("h3"),a.textContent="An error occurred :(",_=E1(),o=Te("p"),p=t0(s[0]),r=E1(),u=Te("p"),h=t0("Please try again, or "),d=Te("a"),C=t0("contact the developers"),x=t0(" if the problem persists."),A=E1(),O=Te("p"),P=Te("button"),P.textContent="Close",ae(a,"class","svelte-1xb3nt3"),ae(o,"id","error-message"),ae(o,"class","svelte-1xb3nt3"),ae(d,"href",NE),ae(d,"class","svelte-1xb3nt3"),ae(u,"class","svelte-1xb3nt3"),ae(P,"id","error-close"),ae(P,"class","svelte-1xb3nt3"),ae(O,"class","svelte-1xb3nt3"),ae(i,"id","error"),ae(i,"class","svelte-1xb3nt3"),ae(e,"id","error-cover"),ae(e,"class","svelte-1xb3nt3")},m(M,B){l1(M,e,B),me(e,i),me(i,a),me(i,_),me(i,o),me(o,p),me(i,r),me(i,u),me(u,h),me(u,d),me(d,C),me(u,x),me(i,A),me(i,O),me(O,P),F||(T=K1(P,"click",s[1]),F=!0)},p(M,[B]){B&1&&C4(p,M[0])},i:e0,o:e0,d(M){M&&o1(e),F=!1,T()}}}const NE="https://github.com/Urban-Analytics-Technology-Platform/demoland-web/issues";function VE(s,e,i){const a=Ji();let{message:_}=e;function o(){a("close")}return s.$$set=p=>{"message"in p&&i(0,_=p.message)},[_,o]}class Ap extends o4{constructor(e){super(),y4(this,e,VE,BE,J0,{message:0})}}const UE="modulepreload",$E=function(s){return"/demoland-web/dev/"+s},fy={},WE=function(e,i,a){if(!i||i.length===0)return e();const _=document.getElementsByTagName("link");return Promise.all(i.map(o=>{if(o=$E(o),o in fy)return;fy[o]=!0;const p=o.endsWith(".css"),r=p?'[rel="stylesheet"]':"";if(!!a)for(let d=_.length-1;d>=0;d--){const C=_[d];if(C.href===o&&(!p||C.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${r}`))return;const h=document.createElement("link");if(h.rel=p?"stylesheet":UE,p||(h.as="script",h.crossOrigin=""),h.href=o,document.head.appendChild(h),p)return new Promise((d,C)=>{h.addEventListener("load",d),h.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>e())};let M6;const y8={};let U2=0;async function GE(){if(M6)return M6;const s=await WE(()=>import("./pyodide_worker-223c35fb.js"),[]);return M6=new s.default,M6.onmessage=e=>{if(e.data.error)throw new Error(e.data.error);{const{id:i,...a}=e.data,_=y8[i];console.log(y8),delete y8[i],_(a)}},M6}async function ZE(s,e){const i=await GE();return U2=(U2+1)%Number.MAX_SAFE_INTEGER,new Promise(a=>{y8[U2]=a,i.postMessage({...e,python:s,id:U2})})}async function HE(s){const i=await ZE(`
import pyodide_http
pyodide_http.patch_all()
print(globals())
Expand Down
Loading

0 comments on commit a6e76f5

Please sign in to comment.