diff --git a/develop/assets/FileSaver.min-Cm7hTaEQ.js b/develop/assets/FileSaver.min-Rtud2Dhd.js
similarity index 97%
rename from develop/assets/FileSaver.min-Cm7hTaEQ.js
rename to develop/assets/FileSaver.min-Rtud2Dhd.js
index b66a43c..6a41165 100644
--- a/develop/assets/FileSaver.min-Cm7hTaEQ.js
+++ b/develop/assets/FileSaver.min-Rtud2Dhd.js
@@ -1 +1 @@
-import{g as j,c as s}from"./index-DimloEhh.js";var E={exports:{}};(function(b,S){(function(p,i){i()})(s,function(){function p(e,t){return typeof t>"u"?t={autoBom:!1}:typeof t!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function i(e,t,r){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){u(o.response,t,r)},o.onerror=function(){console.error("could not download file")},o.send()}function v(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return 200<=t.status&&299>=t.status}function l(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof s=="object"&&s.global===s?s:void 0,m=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!m?function(e,t,r){var o=a.URL||a.webkitURL,n=document.createElement("a");t=t||e.name||"download",n.download=t,n.rel="noopener",typeof e=="string"?(n.href=e,n.origin===location.origin?l(n):v(n.href)?i(e,t,r):l(n,n.target="_blank")):(n.href=o.createObjectURL(e),setTimeout(function(){o.revokeObjectURL(n.href)},4e4),setTimeout(function(){l(n)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,r){if(t=t||e.name||"download",typeof e!="string")navigator.msSaveOrOpenBlob(p(e,r),t);else if(v(e))i(e,t,r);else{var o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){l(o)})}}:function(e,t,r,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof e=="string")return i(e,t,r);var n=e.type==="application/octet-stream",h=/constructor/i.test(a.HTMLElement)||a.safari,w=/CriOS\/[\d]+/.test(navigator.userAgent);if((w||n&&h||m)&&typeof FileReader<"u"){var d=new FileReader;d.onloadend=function(){var c=d.result;c=w?c:c.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=c:location=c,o=null},d.readAsDataURL(e)}else{var y=a.URL||a.webkitURL,f=y.createObjectURL(e);o?o.location=f:location.href=f,o=null,setTimeout(function(){y.revokeObjectURL(f)},4e4)}});a.saveAs=u.saveAs=u,b.exports=u})})(E);var L=E.exports;const R=j(L),A=Object.freeze(Object.defineProperty({__proto__:null,default:R},Symbol.toStringTag,{value:"Module"}));export{A as F};
+import{g as j,c as s}from"./index-D-j8ueGo.js";var E={exports:{}};(function(b,S){(function(p,i){i()})(s,function(){function p(e,t){return typeof t>"u"?t={autoBom:!1}:typeof t!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function i(e,t,r){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){u(o.response,t,r)},o.onerror=function(){console.error("could not download file")},o.send()}function v(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return 200<=t.status&&299>=t.status}function l(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof s=="object"&&s.global===s?s:void 0,m=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!m?function(e,t,r){var o=a.URL||a.webkitURL,n=document.createElement("a");t=t||e.name||"download",n.download=t,n.rel="noopener",typeof e=="string"?(n.href=e,n.origin===location.origin?l(n):v(n.href)?i(e,t,r):l(n,n.target="_blank")):(n.href=o.createObjectURL(e),setTimeout(function(){o.revokeObjectURL(n.href)},4e4),setTimeout(function(){l(n)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,r){if(t=t||e.name||"download",typeof e!="string")navigator.msSaveOrOpenBlob(p(e,r),t);else if(v(e))i(e,t,r);else{var o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){l(o)})}}:function(e,t,r,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof e=="string")return i(e,t,r);var n=e.type==="application/octet-stream",h=/constructor/i.test(a.HTMLElement)||a.safari,w=/CriOS\/[\d]+/.test(navigator.userAgent);if((w||n&&h||m)&&typeof FileReader<"u"){var d=new FileReader;d.onloadend=function(){var c=d.result;c=w?c:c.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=c:location=c,o=null},d.readAsDataURL(e)}else{var y=a.URL||a.webkitURL,f=y.createObjectURL(e);o?o.location=f:location.href=f,o=null,setTimeout(function(){y.revokeObjectURL(f)},4e4)}});a.saveAs=u.saveAs=u,b.exports=u})})(E);var L=E.exports;const R=j(L),A=Object.freeze(Object.defineProperty({__proto__:null,default:R},Symbol.toStringTag,{value:"Module"}));export{A as F};
diff --git a/develop/assets/index-DimloEhh.js b/develop/assets/index-D-j8ueGo.js
similarity index 99%
rename from develop/assets/index-DimloEhh.js
rename to develop/assets/index-D-j8ueGo.js
index afa475c..65556ef 100644
--- a/develop/assets/index-DimloEhh.js
+++ b/develop/assets/index-D-j8ueGo.js
@@ -103,7 +103,7 @@ function print() { __p += __j.call(arguments, '') }
...message,
id,
},
- '*'
+ '*',
);
});
}
@@ -140,7 +140,7 @@ function print() { __p += __j.call(arguments, '') }
payload: idx,
},
},
- '*'
+ '*',
);
}
function solve(modelFile, dataFiles, options) {
@@ -151,7 +151,7 @@ function print() { __p += __j.call(arguments, '') }
dataFiles,
options,
},
- '*'
+ '*',
);
}
function getNumSolutions() {
@@ -196,5 +196,5 @@ function print() { __p += __j.call(arguments, '') }
})();
`;function ES(n,e,t){const i=n.slice();return i[23]=e[t],i[24]=e,i[25]=t,i}function zS(n){let e,t,i,r,s,l,o,a,c,h,O,p,g,m,y,$,_,W,R;return $=new wt({props:{icon:WC}}),{c(){e=k("div"),t=k("div"),t.innerHTML="Solution:",i=L(),r=k("div"),s=k("input"),o=L(),a=k("div"),c=k("input"),O=L(),p=k("div"),g=k("p"),m=k("button"),y=k("span"),Ae($.$$.fragment),v(t,"class","solution-label svelte-g2g7zr"),v(s,"class","input is-small"),v(s,"type","number"),v(s,"min",l=n[2]>0?1:0),v(s,"max",n[2]),v(c,"type","range"),v(c,"min",h=n[2]>0?1:0),v(c,"max",n[2]),v(c,"class","svelte-g2g7zr"),v(a,"class","solution-slider svelte-g2g7zr"),v(y,"class","icon"),v(m,"class","button is-small"),v(m,"title","Follow latest solution"),ne(m,"is-primary",n[0]),ne(m,"is-light",!n[0]),v(g,"class","control"),v(p,"class","field has-addons svelte-g2g7zr"),v(e,"class","top svelte-g2g7zr")},m(A,C){Y(A,e,C),Q(e,t),Q(e,i),Q(e,r),Q(r,s),si(s,n[1]),Q(e,o),Q(e,a),Q(a,c),si(c,n[1]),Q(e,O),Q(e,p),Q(p,g),Q(g,m),Q(m,y),Re($,y,null),_=!0,W||(R=[le(s,"input",n[12]),le(c,"change",n[13]),le(c,"input",n[13]),le(m,"click",n[14])],W=!0)},p(A,C){(!_||C&4&&l!==(l=A[2]>0?1:0))&&v(s,"min",l),(!_||C&4)&&v(s,"max",A[2]),C&2&&Bo(s.value)!==A[1]&&si(s,A[1]),(!_||C&4&&h!==(h=A[2]>0?1:0))&&v(c,"min",h),(!_||C&4)&&v(c,"max",A[2]),C&2&&si(c,A[1]),(!_||C&1)&&ne(m,"is-primary",A[0]),(!_||C&1)&&ne(m,"is-light",!A[0])},i(A){_||(M($.$$.fragment,A),_=!0)},o(A){j($.$$.fragment,A),_=!1},d(A){A&&X(e),Xe($),W=!1,Ft(R)}}}function MS(n){let e,t,i=n[24],r=n[25],s,l;const o=()=>n[15](e,i,r),a=()=>n[15](null,i,r);function c(...h){return n[16](n[23],...h)}return{c(){e=k("iframe"),v(e,"class","vis-window svelte-g2g7zr"),Om(e.src,t=n[23].url)||v(e,"src",t),v(e,"title","Visualisation")},m(h,O){Y(h,e,O),o(),s||(l=le(e,"load",c),s=!0)},p(h,O){n=h,O&8&&!Om(e.src,t=n[23].url)&&v(e,"src",t),(i!==n[24]||r!==n[25])&&(a(),i=n[24],r=n[25],o())},d(h){h&&X(e),a(),s=!1,l()}}}function G9(n){let e,t,i,r,s,l,o,a=n[2]>0&&zS(n),c=st(n[3]),h=[];for(let O=0;O0?a?(a.p(O,p),p&4&&M(a,1)):(a=zS(O),a.c(),M(a,1),a.m(e,t)):a&&(Je(),j(a,1,1,()=>{a=null}),et()),p&8){c=st(O[3]);let g;for(g=0;g{re=ke});ae.then(ke=>{ke.contentWindow.postMessage({event:"init",payload:N},"*")});const ye=s.reduce((ke,We)=>({...ke,[We.name]:We.state.doc.toString()}),{}),Se=[],ge=new DOMParser().parseFromString(q,"text/html");for(const ke of ge.getElementsByTagName("script")){const We=ke.getAttribute("src");if(We==="/minizinc-ide.js")ke.src=H9;else if(We in ye&&We.endsWith(".js")){const lt=URL.createObjectURL(new Blob([ye[We]],{type:"text/javascript; charset=utf-8"}));ke.src=lt,Se.push(lt)}}for(const ke of ge.getElementsByTagName("link")){const We=ke.getAttribute("href");if(We in ye&&We.endsWith(".css")){const lt=URL.createObjectURL(new Blob([ye[We]],{type:"text/css; charset=utf-8"}));ke.href=lt,Se.push(lt)}}const Ue=new XMLSerializer().serializeToString(ge.doctype)+ge.documentElement.outerHTML,Ie=URL.createObjectURL(new Blob([Ue],{type:"text/html; charset=utf-8"}));t(3,O=[...O,{key:B,url:Ie,extraUrls:Se,makeReady:re,ready:ae,solutions:[],element:null}])}function $(B,q){for(const N in B){const re=O.find(ye=>ye.key===N);if(!re){console.error(`Did not find visualisation for ${N}`);continue}const ae={time:q,data:B[N]};re.solutions.push(ae),xn({event:"solution",payload:ae},re)}t(2,h++,h)}function _(B,q){p={status:B,time:q};for(let N=0;Nre.element.contentWindow===B.source);switch(q.event){case"rebroadcast":for(const ae of O)xn(q.message,ae);q.message.event==="goToSolution"&&(l=q.message.payload===-1,t(0,o=q.message.payload===-1),a=q.message.payload+1,t(1,c=q.message.payload+1));break;case"solve":r("solve",{modelFile:q.modelFile,dataFiles:q.dataFiles,options:q.options});break;case"getNumSolutions":xn({event:"response",id:q.id,payload:N.solutions.length},N);break;case"getSolution":const re=q.index<0?q.index+N.solutions.length:q.index;if(re<0||re>=N.solutions.length)xn({event:"error",id:q.id,message:"Solution index out of range"},N);else{xn({event:"response",id:q.id,payload:N.solutions[q.index===-1?N.solutions.length-1:q.index]},N);break}case"getAllSolutions":xn({event:"response",id:q.id,payload:N.solutions},N);break;case"getStatus":xn({event:"response",id:q.id,payload:p},N);break;case"getFinishTime":xn({event:"response",id:q.id,payload:g},N);break}}function A(B,q,N){if(o&&a===c&&(a=h,t(1,c=h)),o!==l){l=o;for(const re of O)xn({event:"goToSolution",payload:o?-1:c-1},re)}if(a!==c){a=c,l=!1,t(0,o=!1);for(const re of O)xn({event:"goToSolution",payload:c-1},re)}}function C(){c=Bo(this.value),t(1,c)}function E(){c=Bo(this.value),t(1,c)}const D=()=>t(0,o=!o);function z(B,q,N){Et[B?"unshift":"push"](()=>{q[N].element=B,t(3,O)})}const F=(B,q)=>B.makeReady(q.target);return n.$$set=B=>{"files"in B&&t(6,s=B.files)},n.$$.update=()=>{n.$$.dirty&8&&t(4,i=Math.ceil(Math.sqrt(O.length))),n.$$.dirty&7&&A()},[o,c,h,O,i,R,s,m,y,$,_,W,C,E,D,z,F]}class J9 extends $i{constructor(e){super(),bi(this,e,K9,G9,Oi,{files:6,reset:7,addVisualisation:8,addSolution:9,status:10,finish:11})}get reset(){return this.$$.ctx[7]}get addVisualisation(){return this.$$.ctx[8]}get addSolution(){return this.$$.ctx[9]}get status(){return this.$$.ctx[10]}get finish(){return this.$$.ctx[11]}}const DS=[".mzn",".mzc",".dzn",".json",".html",".js",".css"];async function sQ(n){const e=n.startsWith("http://")||n.startsWith("https://")?n:`http://${n}`,t=e.split("/").pop();if(!t.endsWith(".mzp")&&DS.every(r=>!t.endsWith(r)))throw new Error("File type not recognised");const i=await fetch(new URL(e));if(!i.ok)throw new Error(`Request failed (${i.status} ${i.statusText})`);if(t.endsWith(".mzp")){const r=await i.json(),s=[],l=r.openFiles[r.openTab];let o=0;for(const c of r.projectFiles){const h=c.split("/").pop();if(DS.every(g=>!h.endsWith(g)))continue;c===l&&(o=s.length);const O=await fetch(new URL(c,e));if(!O.ok)throw new Error(`Request failed (${O.status} ${O.statusText})`);const p=await O.text();s.push({name:h,contents:p,hidden:r.openFiles.indexOf(c)===-1})}let a=r.selectedBuiltinConfigId;return a==="org.gecode.gecode"?a="org.minizinc.gecode_presolver":a==="org.chuffed.chuffed"&&(a="org.minizinc.chuffed"),{files:s,tab:o,solverId:a,timestamp:Date.now()}}else{const r=await i.text();return{files:[{name:t,contents:r}],timestamp:Date.now()}}}function e7(n){let e,t;return e=new _s({props:{active:n[0],title:"Create new file",$$slots:{default:[i7]},$$scope:{ctx:n}}}),e.$on("activate",n[8]),e.$on("cancel",n[23]),{c(){Ae(e.$$.fragment)},m(i,r){Re(e,i,r),t=!0},p(i,r){const s={};r&1&&(s.active=i[0]),r&134217770&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){t||(M(e.$$.fragment,i),t=!0)},o(i){j(e.$$.fragment,i),t=!1},d(i){Xe(e,i)}}}function t7(n){let e,t;return e=new _s({props:{active:n[0],title:"Import from URL",$$slots:{footer:[r7],default:[n7]},$$scope:{ctx:n}}}),e.$on("activate",n[8]),e.$on("cancel",n[14]),e.$on("submit",n[10]),{c(){Ae(e.$$.fragment)},m(i,r){Re(e,i,r),t=!0},p(i,r){const s={};r&1&&(s.active=i[0]),r&134217816&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){t||(M(e.$$.fragment,i),t=!0)},o(i){j(e.$$.fragment,i),t=!1},d(i){Xe(e,i)}}}function i7(n){let e,t,i,r,s,l,o,a,c,h,O,p,g,m,y,$,_,W,R,A,C,E,D,z,F,B,q,N,re,ae,ye,Se,ge,Ue,Ie;return{c(){e=k("aside"),t=k("p"),t.textContent="Model",i=L(),r=k("ul"),s=k("li"),l=k("button"),l.textContent="Model file (.mzn)",o=L(),a=k("li"),c=k("button"),c.textContent="Solution checker model (.mzc.mzn)",h=L(),O=k("p"),O.textContent="Data",p=L(),g=k("ul"),m=k("li"),y=k("button"),y.textContent="Data file (.dzn)",$=L(),_=k("li"),W=k("button"),W.textContent="JSON data file (.json)",R=L(),A=k("p"),A.textContent="Visualisation",C=L(),E=k("ul"),D=k("li"),z=k("button"),z.textContent="Custom visualisation (.html)",F=L(),B=k("p"),B.textContent="Import",q=L(),N=k("ul"),re=k("li"),ae=k("button"),ae.textContent="Upload file(s)",ye=L(),Se=k("li"),ge=k("button"),ge.textContent="Import from URL",v(t,"class","menu-label"),v(l,"type","button"),v(c,"type","button"),v(r,"class","menu-list"),v(O,"class","menu-label"),v(y,"type","button"),v(W,"type","button"),v(g,"class","menu-list"),v(A,"class","menu-label"),v(z,"type","button"),v(E,"class","menu-list"),v(B,"class","menu-label"),v(ae,"type","button"),v(ge,"type","button"),v(N,"class","menu-list"),v(e,"class","menu")},m(ke,We){Y(ke,e,We),Q(e,t),Q(e,i),Q(e,r),Q(r,s),Q(s,l),n[15](l),Q(r,o),Q(r,a),Q(a,c),Q(e,h),Q(e,O),Q(e,p),Q(e,g),Q(g,m),Q(m,y),Q(g,$),Q(g,_),Q(_,W),Q(e,R),Q(e,A),Q(e,C),Q(e,E),Q(E,D),Q(D,z),Q(e,F),Q(e,B),Q(e,q),Q(e,N),Q(N,re),Q(re,ae),Q(N,ye),Q(N,Se),Q(Se,ge),Ue||(Ie=[le(l,"click",n[16]),le(c,"click",n[17]),le(y,"click",n[18]),le(W,"click",n[19]),le(z,"click",n[20]),le(ae,"click",n[21]),le(ge,"click",n[22])],Ue=!0)},p:Qe,d(ke){ke&&X(e),n[15](null),Ue=!1,Ft(Ie)}}}function VS(n){let e,t;return{c(){e=k("div"),t=pe(n[6]),v(e,"class","error svelte-6l40ed")},m(i,r){Y(i,e,r),Q(e,t)},p(i,r){r&64&&Le(t,i[6])},d(i){i&&X(e)}}}function n7(n){let e,t,i,r,s,l,o=n[6]&&VS(n);return{c(){o&&o.c(),e=L(),t=k("div"),i=k("p"),r=k("input"),v(r,"class","input"),v(r,"type","text"),v(r,"pattern",".+\\.(mzn|dzn|json|js|html|css|mzp|mzc)"),r.required=!0,v(i,"class","control is-expanded"),v(t,"class","field")},m(a,c){o&&o.m(a,c),Y(a,e,c),Y(a,t,c),Q(t,i),Q(i,r),n[12](r),si(r,n[4]),s||(l=le(r,"input",n[13]),s=!0)},p(a,c){a[6]?o?o.p(a,c):(o=VS(a),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null),c&16&&r.value!==a[4]&&si(r,a[4])},d(a){a&&(X(e),X(t)),o&&o.d(a),n[12](null),s=!1,l()}}}function r7(n){let e,t,i,r,s,l;return{c(){e=k("div"),t=k("button"),t.textContent="OK",i=L(),r=k("button"),r.textContent="Cancel",v(t,"class","button is-primary"),v(r,"class","button"),v(r,"type","button"),v(e,"slot","footer")},m(o,a){Y(o,e,a),Q(e,t),Q(e,i),Q(e,r),s||(l=le(r,"click",n[11]),s=!0)},p:Qe,d(o){o&&X(e),s=!1,l()}}}function s7(n){let e,t,i,r,s,l,o;const a=[t7,e7],c=[];function h(O,p){return O[5]?0:1}return e=h(n),t=c[e]=a[e](n),{c(){t.c(),i=L(),r=k("input"),v(r,"class","is-hidden svelte-6l40ed"),v(r,"type","file"),r.multiple=!0,v(r,"accept",".mzn,.mzc,.dzn,.json,.html,.js,.css")},m(O,p){c[e].m(O,p),Y(O,i,p),Y(O,r,p),n[24](r),s=!0,l||(o=[le(r,"change",n[25]),le(r,"change",n[9])],l=!0)},p(O,[p]){let g=e;e=h(O),e===g?c[e].p(O,p):(Je(),j(c[g],1,1,()=>{c[g]=null}),et(),t=c[e],t?t.p(O,p):(t=c[e]=a[e](O),t.c()),M(t,1),t.m(i.parentNode,i))},i(O){s||(M(t),s=!0)},o(O){j(t),s=!1},d(O){O&&(X(i),X(r)),c[e].d(O),n[24](null),l=!1,Ft(o)}}}function l7(n,e,t){let{active:i=!1}=e;const r=en();let s,l,o,a="",c=!1,h=null;function O(ae){t(5,c=!1),t(4,a=""),t(6,h=null)}async function p(){await Bn(),o&&o.focus()}async function g(){const ae=[];for(const Se of l)ae.push(new Promise((ge,Ue)=>{const Ie=new FileReader;Ie.onload=()=>{ge({name:Se.name,contents:Ie.result})},Ie.onerror=ke=>Ue(ke),Ie.readAsText(Se)}));const ye=await Promise.all(ae);r("open",{files:ye})}async function m(){try{r("open",await sQ(a))}catch(ae){t(6,h=`Failed to import from URL: ${ae.message||ae}`),console.error(ae)}}const y=()=>r("cancel");function $(ae){Et[ae?"unshift":"push"](()=>{o=ae,t(3,o)})}function _(){a=this.value,t(4,a)}const W=()=>r("cancel");function R(ae){Et[ae?"unshift":"push"](()=>{o=ae,t(3,o)})}const A=()=>r("new",{type:".mzn"}),C=()=>r("new",{type:".mzc.mzn"}),E=()=>r("new",{type:".dzn"}),D=()=>r("new",{type:".json"}),z=()=>r("new",{type:".html"}),F=()=>s.click(),B=()=>t(5,c=!0),q=()=>r("cancel");function N(ae){Et[ae?"unshift":"push"](()=>{s=ae,t(1,s)})}function re(){l=this.files,t(2,l)}return n.$$set=ae=>{"active"in ae&&t(0,i=ae.active)},n.$$.update=()=>{n.$$.dirty&1&&O()},[i,s,l,o,a,c,h,r,p,g,m,y,$,_,W,R,A,C,E,D,z,F,B,q,N,re]}class o7 extends $i{constructor(e){super(),bi(this,e,l7,s7,Oi,{active:0})}}function qS(n,e,t){const i=n.slice();return i[14]=e[t],i}function IS(n,e,t){const i=n.slice();return i[17]=e[t].file,i[18]=e[t].index,i}function a7(n){let e,t,i,r,s,l,o;i=new wt({props:{icon:n[17].readOnly?rd:C1}});function a(){return n[11](n[18],n[17])}return{c(){e=k("button"),t=k("span"),Ae(i.$$.fragment),v(t,"class","icon"),v(e,"class","button is-small"),v(e,"title",r="Click to "+(n[17].readOnly?"unlock":"lock")+" this file for editing"),v(e,"type","button"),ne(e,"is-primary",!n[17].readOnly),ne(e,"is-light",n[17].readOnly)},m(c,h){Y(c,e,h),Q(e,t),Re(i,t,null),s=!0,l||(o=le(e,"click",a),l=!0)},p(c,h){n=c;const O={};h&2&&(O.icon=n[17].readOnly?rd:C1),i.$set(O),(!s||h&2&&r!==(r="Click to "+(n[17].readOnly?"unlock":"lock")+" this file for editing"))&&v(e,"title",r),(!s||h&2)&&ne(e,"is-primary",!n[17].readOnly),(!s||h&2)&&ne(e,"is-light",n[17].readOnly)},i(c){s||(M(i.$$.fragment,c),s=!0)},o(c){j(i.$$.fragment,c),s=!1},d(c){c&&X(e),Xe(i),l=!1,o()}}}function f7(n){let e,t,i,r;return i=new wt({props:{icon:rd}}),{c(){e=k("button"),t=k("span"),Ae(i.$$.fragment),v(t,"class","icon"),v(e,"class","button is-small is-light"),v(e,"title","Compiled checkers are read only"),v(e,"type","button"),e.disabled=!0},m(s,l){Y(s,e,l),Q(e,t),Re(i,t,null),r=!0},p:Qe,i(s){r||(M(i.$$.fragment,s),r=!0)},o(s){j(i.$$.fragment,s),r=!1},d(s){s&&X(e),Xe(i)}}}function NS(n){let e,t,i=n[17].name+"",r,s,l,o,a,c,h,O,p,g,m,y,$,_,W,R,A,C,E,D,z,F,B;p=new wt({props:{icon:n[17].hidden?W1:T1}});function q(){return n[10](n[18],n[17])}const N=[f7,a7],re=[];function ae(Se,ge){return ge&2&&($=null),$==null&&($=!!Se[17].name.endsWith(".mzc")),$?0:1}_=ae(n,-1),W=re[_]=N[_](n),D=new wt({props:{icon:Uy}});function ye(){return n[12](n[18])}return{c(){e=k("tr"),t=k("td"),r=pe(i),s=L(),l=k("td"),o=k("div"),a=k("div"),c=k("p"),h=k("button"),O=k("span"),Ae(p.$$.fragment),m=L(),y=k("p"),W.c(),R=L(),A=k("p"),C=k("button"),E=k("span"),Ae(D.$$.fragment),v(O,"class","icon"),v(h,"class","button is-small"),v(h,"title",g="Click to "+(n[17].hidden?"show":"hide")+" this file"),v(h,"type","button"),ne(h,"is-primary",!n[17].hidden),ne(h,"is-light",n[17].hidden),v(c,"class","control"),v(y,"class","control"),v(E,"class","icon"),v(C,"class","button is-small is-danger"),v(C,"title","Delete this file"),v(C,"type","button"),v(A,"class","control"),v(a,"class","field is-grouped"),v(o,"class","tool-buttons svelte-1bgv9sn")},m(Se,ge){Y(Se,e,ge),Q(e,t),Q(t,r),Q(e,s),Q(e,l),Q(l,o),Q(o,a),Q(a,c),Q(c,h),Q(h,O),Re(p,O,null),Q(a,m),Q(a,y),re[_].m(y,null),Q(a,R),Q(a,A),Q(A,C),Q(C,E),Re(D,E,null),z=!0,F||(B=[le(h,"click",q),le(C,"click",ye)],F=!0)},p(Se,ge){n=Se,(!z||ge&2)&&i!==(i=n[17].name+"")&&Le(r,i);const Ue={};ge&2&&(Ue.icon=n[17].hidden?W1:T1),p.$set(Ue),(!z||ge&2&&g!==(g="Click to "+(n[17].hidden?"show":"hide")+" this file"))&&v(h,"title",g),(!z||ge&2)&&ne(h,"is-primary",!n[17].hidden),(!z||ge&2)&&ne(h,"is-light",n[17].hidden);let Ie=_;_=ae(n,ge),_===Ie?re[_].p(n,ge):(Je(),j(re[Ie],1,1,()=>{re[Ie]=null}),et(),W=re[_],W?W.p(n,ge):(W=re[_]=N[_](n),W.c()),M(W,1),W.m(y,null))},i(Se){z||(M(p.$$.fragment,Se),M(W),M(D.$$.fragment,Se),z=!0)},o(Se){j(p.$$.fragment,Se),j(W),j(D.$$.fragment,Se),z=!1},d(Se){Se&&X(e),Xe(p),re[_].d(),Xe(D),F=!1,Ft(B)}}}function LS(n){let e,t=n[14].label+"",i,r,s,l,o=st(n[14].files),a=[];for(let h=0;hj(a[h],1,1,()=>{a[h]=null});return{c(){e=k("p"),i=pe(t),r=L(),s=k("table");for(let h=0;hj(p[m],1,1,()=>{p[m]=null});return s=new wt({props:{icon:zy}}),{c(){for(let m=0;mAccept',v(e,"slot","footer")},m(t,i){Y(t,e,i)},p:Qe,d(t){t&&X(e)}}}function h7(n){let e,t;return e=new _s({props:{active:n[0],title:"Manage files",$$slots:{footer:[u7],default:[c7]},$$scope:{ctx:n}}}),e.$on("submit",n[3]),e.$on("cancel",n[3]),{c(){Ae(e.$$.fragment)},m(i,r){Re(e,i,r),t=!0},p(i,[r]){const s={};r&1&&(s.active=i[0]),r&2097154&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){t||(M(e.$$.fragment,i),t=!0)},o(i){j(e.$$.fragment,i),t=!1},d(i){Xe(e,i)}}}function O7(n,e,t){let i,r,s,l,o,a,{active:c=!1}=e,{files:h=[]}=e;const O=en();function p(){O("close")}const g=(_,W)=>O("modifyFile",{index:_,options:{hidden:!W.hidden}}),m=(_,W)=>O("modifyFile",{index:_,options:{readOnly:!W.readOnly}}),y=_=>O("delete",{index:_}),$=()=>O("newFile");return n.$$set=_=>{"active"in _&&t(0,c=_.active),"files"in _&&t(4,h=_.files)},n.$$.update=()=>{n.$$.dirty&16&&t(9,i=h.map((_,W)=>({file:_,index:W}))),n.$$.dirty&512&&t(8,r=i.filter(_=>_.file.name.endsWith(".mzn")&&!_.file.name.endsWith(".mzc.mzn")).sort((_,W)=>_.file.name.localeCompare(W.file.name))),n.$$.dirty&512&&t(7,s=i.filter(_=>_.file.name.endsWith(".dzn")||_.file.name.endsWith(".json")).sort((_,W)=>_.file.name.localeCompare(W.file.name))),n.$$.dirty&512&&t(6,l=i.filter(_=>_.file.name.endsWith(".mzc")||_.file.name.endsWith(".mzc.mzn")).sort((_,W)=>_.file.name.localeCompare(W.file.name))),n.$$.dirty&512&&t(5,o=i.filter(_=>!_.file.name.endsWith(".mzn")&&!_.file.name.endsWith(".mzc")&&!_.file.name.endsWith(".dzn")&&!_.file.name.endsWith(".json")).sort((_,W)=>_.file.name.localeCompare(W.file.name))),n.$$.dirty&480&&t(1,a=[{label:"Model files",files:r},{label:"Data files",files:s},{label:"Solution checkers",files:l},{label:"Other files",files:o}].filter(_=>_.files.length>0))},[c,a,O,p,h,o,l,s,r,i,g,m,y,$]}class d7 extends $i{constructor(e){super(),bi(this,e,O7,h7,Oi,{active:0,files:4})}}function jS(n,e,t){const i=n.slice();return i[9]=e[t],i}function BS(n){let e,t=n[9]+"",i,r;return{c(){e=k("option"),i=pe(t),e.__value=r=n[9],si(e,e.__value),v(e,"class","svelte-1x5266v")},m(s,l){Y(s,e,l),Q(e,i)},p(s,l){l&1&&t!==(t=s[9]+"")&&Le(i,t),l&1&&r!==(r=s[9])&&(e.__value=r,si(e,e.__value))},d(s){s&&X(e)}}}function p7(n){let e,t,i,r,s,l=st(n[0]),o=[];for(let a=0;an[6].call(t)),v(e,"class","select is-fullwidth is-multiple svelte-1x5266v")},m(a,c){Y(a,e,c),Q(e,t);for(let h=0;h0&&t(2,l=p[0])}function a(){i("accept",{modelFile:l})}const c=()=>i("cancel");function h(){l=yO(this),t(2,l),t(0,r)}const O=()=>i("cancel");return n.$$set=p=>{"modelFiles"in p&&t(0,r=p.modelFiles),"active"in p&&t(1,s=p.active)},n.$$.update=()=>{n.$$.dirty&1&&o(r)},[r,s,l,i,a,c,h,O]}class b7 extends $i{constructor(e){super(),bi(this,e,S7,m7,Oi,{modelFiles:0,active:1})}}function FS(n,e,t){const i=n.slice();return i[25]=e[t],i[26]=e,i[27]=t,i}function GS(n,e,t){const i=n.slice();return i[22]=e[t],i}function HS(n){let e,t,i,r,s,l,o,a,c;return{c(){e=k("div"),t=k("ul"),i=k("li"),r=k("a"),r.textContent="Enter parameters",s=L(),l=k("li"),o=k("a"),o.textContent="Select data file",ne(i,"is-active",!n[2]),ne(l,"is-active",n[2]),v(e,"class","tabs")},m(h,O){Y(h,e,O),Q(e,t),Q(t,i),Q(i,r),Q(t,s),Q(t,l),Q(l,o),a||(c=[le(r,"click",n[13]),le(o,"click",n[14])],a=!0)},p(h,O){O&4&&ne(i,"is-active",!h[2]),O&4&&ne(l,"is-active",h[2])},d(h){h&&X(e),a=!1,Ft(c)}}}function $7(n){let e,t=st(n[5]),i=[];for(let r=0;rn[16].call(t)),v(e,"class","select is-fullwidth is-multiple")},m(a,c){Y(a,e,c),Q(e,t);for(let h=0;hF[B]===void 0?{name:B,value:""}:{name:B,value:F[B]}))}function y(){r?s("accept",{dataFiles:h}):s("accept",{parameters:O.reduce((F,B)=>({...F,[B.name]:B.value}),{})})}const $=()=>s("cancel"),_=()=>t(2,c=!1),W=()=>t(2,c=!0);function R(F){Et[F?"unshift":"push"](()=>{p=F,t(6,p)})}function A(){h=JW(this),t(4,h),t(1,a)}function C(F){Et[F?"unshift":"push"](()=>{p=F,t(6,p)})}function E(F,B){F[B].value=this.value,t(5,O)}function D(F,B){F[B].value=this.value,t(5,O)}const z=()=>s("cancel");return n.$$set=F=>{"active"in F&&t(0,l=F.active),"parameters"in F&&t(11,o=F.parameters),"dataFiles"in F&&t(1,a=F.dataFiles)},n.$$.update=()=>{n.$$.dirty&2048&&m(o),n.$$.dirty&2&&t(3,i=a.length>0),n.$$.dirty&12&&t(7,r=i&&c)},[l,a,c,i,h,O,p,r,s,g,y,o,$,_,W,R,A,C,E,D,z]}class x7 extends $i{constructor(e){super(),bi(this,e,P7,k7,Oi,{active:0,parameters:11,dataFiles:1})}}function eb(n){let e,t,i,r,s,l,o,a,c,h,O,p,g,m,y,$,_,W,R=Cn(n[1],"-a"),A,C=Cn(n[1],"-f"),E,D,z,F,B,q,N,re,ae,ye=Cn(n[1],"-v"),Se,ge,Ue,Ie,ke,We,lt,Vt=Cn(n[1],"-s"),Qt,pt,qt,$e,oe,H,ue,ce,Ee,tt,ft,je,At,ut,Un,_t;r=new wt({props:{icon:My}});let xt=R&&tb(n),St=C&&ib(n),Be=ye&&nb(n),fe=Vt&&rb(n);return{c(){e=k("div"),t=k("button"),i=k("span"),Ae(r.$$.fragment),s=L(),l=k("form"),o=k("h5"),o.textContent="Solving options",a=L(),c=k("div"),h=k("p"),O=k("input"),p=L(),g=k("label"),g.textContent="Time limit (s)",m=L(),y=k("p"),$=k("input"),W=L(),xt&&xt.c(),A=L(),St&&St.c(),E=L(),D=k("h5"),D.textContent="Output options",z=L(),F=k("div"),B=k("p"),q=k("input"),N=L(),re=k("label"),re.textContent="Verbose compilation",ae=L(),Be&&Be.c(),Se=L(),ge=k("div"),Ue=k("p"),Ie=k("input"),ke=L(),We=k("label"),We.textContent="Compilation statistics",lt=L(),fe&&fe.c(),Qt=L(),pt=k("div"),qt=k("p"),$e=k("input"),oe=L(),H=k("label"),H.textContent="Timing information",ue=L(),ce=k("div"),Ee=k("p"),Ee.innerHTML='',tt=L(),ft=k("p"),je=k("button"),je.textContent="Reset to defaults",v(i,"class","icon"),v(t,"class","button is-text is-small exit-button svelte-makhy9"),v(o,"class","title is-5 svelte-makhy9"),v(O,"id","enable-timelimit"),v(O,"type","checkbox"),v(O,"class","svelte-makhy9"),v(g,"for","enable-timelimit"),v(g,"class","svelte-makhy9"),v(h,"class","control checkbox-control svelte-makhy9"),v($,"class","input is-fullwidth"),v($,"type","number"),v($,"step","1"),v($,"min",0),$.disabled=_=!n[3].enableTimeLimit,v(y,"class","control is-expanded"),v(c,"class","field is-grouped"),v(D,"class","title is-5 svelte-makhy9"),v(q,"id","enable-verbose-compile"),v(q,"type","checkbox"),v(q,"class","svelte-makhy9"),v(re,"for","enable-verbose-compile"),v(re,"class","svelte-makhy9"),v(B,"class","control checkbox-control svelte-makhy9"),v(F,"class","field"),v(Ie,"id","enable-compilation-satistics"),v(Ie,"type","checkbox"),v(Ie,"class","svelte-makhy9"),v(We,"for","enable-compilation-satistics"),v(We,"class","svelte-makhy9"),v(Ue,"class","control checkbox-control svelte-makhy9"),v(ge,"class","field"),v($e,"id","enable-timing-information"),v($e,"type","checkbox"),v($e,"class","svelte-makhy9"),v(H,"for","enable-timing-information"),v(H,"class","svelte-makhy9"),v(qt,"class","control checkbox-control svelte-makhy9"),v(pt,"class","field"),v(Ee,"class","control"),v(je,"type","button"),v(je,"class","button is-danger"),v(ft,"class","control"),v(ce,"class","field is-grouped bottom-buttons svelte-makhy9"),v(e,"class","config-window svelte-makhy9")},m(Fe,He){Y(Fe,e,He),Q(e,t),Q(t,i),Re(r,i,null),Q(e,s),Q(e,l),Q(l,o),Q(l,a),Q(l,c),Q(c,h),Q(h,O),O.checked=n[3].enableTimeLimit,Q(h,p),Q(h,g),Q(c,m),Q(c,y),Q(y,$),si($,n[3].timeLimit),Q(l,W),xt&&xt.m(l,null),Q(l,A),St&&St.m(l,null),Q(l,E),Q(l,D),Q(l,z),Q(l,F),Q(F,B),Q(B,q),q.checked=n[3].verboseCompilation,Q(B,N),Q(B,re),Q(l,ae),Be&&Be.m(l,null),Q(l,Se),Q(l,ge),Q(ge,Ue),Q(Ue,Ie),Ie.checked=n[3].compilerStatistics,Q(Ue,ke),Q(Ue,We),Q(l,lt),fe&&fe.m(l,null),Q(l,Qt),Q(l,pt),Q(pt,qt),Q(qt,$e),$e.checked=n[3].outputTime,Q(qt,oe),Q(qt,H),Q(l,ue),Q(l,ce),Q(ce,Ee),Q(ce,tt),Q(ce,ft),Q(ft,je),ut=!0,Un||(_t=[le(t,"click",n[10]),le(O,"change",n[11]),le($,"input",n[12]),le(q,"change",n[15]),le(Ie,"change",n[17]),le($e,"change",n[19]),le(je,"click",n[2]),le(l,"submit",i$(n[20]))],Un=!0)},p(Fe,He){He&8&&(O.checked=Fe[3].enableTimeLimit),(!ut||He&8&&_!==(_=!Fe[3].enableTimeLimit))&&($.disabled=_),He&8&&Bo($.value)!==Fe[3].timeLimit&&si($,Fe[3].timeLimit),He&2&&(R=Cn(Fe[1],"-a")),R?xt?xt.p(Fe,He):(xt=tb(Fe),xt.c(),xt.m(l,A)):xt&&(xt.d(1),xt=null),He&2&&(C=Cn(Fe[1],"-f")),C?St?St.p(Fe,He):(St=ib(Fe),St.c(),St.m(l,E)):St&&(St.d(1),St=null),He&8&&(q.checked=Fe[3].verboseCompilation),He&2&&(ye=Cn(Fe[1],"-v")),ye?Be?Be.p(Fe,He):(Be=nb(Fe),Be.c(),Be.m(l,Se)):Be&&(Be.d(1),Be=null),He&8&&(Ie.checked=Fe[3].compilerStatistics),He&2&&(Vt=Cn(Fe[1],"-s")),Vt?fe?fe.p(Fe,He):(fe=rb(Fe),fe.c(),fe.m(l,Qt)):fe&&(fe.d(1),fe=null),He&8&&($e.checked=Fe[3].outputTime)},i(Fe){ut||(M(r.$$.fragment,Fe),Fe&&Gn(()=>{ut&&(At||(At=yl(e,wc,{x:100,duration:200},!0)),At.run(1))}),ut=!0)},o(Fe){j(r.$$.fragment,Fe),Fe&&(At||(At=yl(e,wc,{x:100,duration:200},!1)),At.run(0)),ut=!1},d(Fe){Fe&&X(e),Xe(r),xt&&xt.d(),St&&St.d(),Be&&Be.d(),fe&&fe.d(),Fe&&At&&At.end(),Un=!1,Ft(_t)}}}function tb(n){let e,t,i,r,s,l,o;return{c(){e=k("div"),t=k("p"),i=k("input"),r=L(),s=k("label"),s.textContent="All solutions (for satisfication problems)",v(i,"id","enable-all-solutions"),v(i,"type","checkbox"),v(i,"class","svelte-makhy9"),v(s,"for","enable-all-solutions"),v(s,"class","svelte-makhy9"),v(t,"class","control checkbox-control svelte-makhy9"),v(e,"class","field")},m(a,c){Y(a,e,c),Q(e,t),Q(t,i),i.checked=n[3].allSolutions,Q(t,r),Q(t,s),l||(o=le(i,"change",n[13]),l=!0)},p(a,c){c&8&&(i.checked=a[3].allSolutions)},d(a){a&&X(e),l=!1,o()}}}function ib(n){let e,t,i,r,s,l,o;return{c(){e=k("div"),t=k("p"),i=k("input"),r=L(),s=k("label"),s.textContent="Free search",v(i,"id","enable-free-search"),v(i,"type","checkbox"),v(i,"class","svelte-makhy9"),v(s,"for","enable-free-search"),v(s,"class","svelte-makhy9"),v(t,"class","control checkbox-control svelte-makhy9"),v(e,"class","field")},m(a,c){Y(a,e,c),Q(e,t),Q(t,i),i.checked=n[3].freeSearch,Q(t,r),Q(t,s),l||(o=le(i,"change",n[14]),l=!0)},p(a,c){c&8&&(i.checked=a[3].freeSearch)},d(a){a&&X(e),l=!1,o()}}}function nb(n){let e,t,i,r,s,l,o;return{c(){e=k("div"),t=k("p"),i=k("input"),r=L(),s=k("label"),s.textContent="Verbose solving",v(i,"id","enable-verbose-solve"),v(i,"type","checkbox"),v(i,"class","svelte-makhy9"),v(s,"for","enable-verbose-solve"),v(s,"class","svelte-makhy9"),v(t,"class","control checkbox-control svelte-makhy9"),v(e,"class","field")},m(a,c){Y(a,e,c),Q(e,t),Q(t,i),i.checked=n[3].verboseSolving,Q(t,r),Q(t,s),l||(o=le(i,"change",n[16]),l=!0)},p(a,c){c&8&&(i.checked=a[3].verboseSolving)},d(a){a&&X(e),l=!1,o()}}}function rb(n){let e,t,i,r,s,l,o;return{c(){e=k("div"),t=k("p"),i=k("input"),r=L(),s=k("label"),s.textContent="Solving statistics",v(i,"id","enable-solving-satistics"),v(i,"type","checkbox"),v(i,"class","svelte-makhy9"),v(s,"for","enable-solving-satistics"),v(s,"class","svelte-makhy9"),v(t,"class","control checkbox-control svelte-makhy9"),v(e,"class","field")},m(a,c){Y(a,e,c),Q(e,t),Q(t,i),i.checked=n[3].solvingStatistics,Q(t,r),Q(t,s),l||(o=le(i,"change",n[18]),l=!0)},p(a,c){c&8&&(i.checked=a[3].solvingStatistics)},d(a){a&&X(e),l=!1,o()}}}function W7(n){let e,t,i=n[0]&&eb(n);return{c(){i&&i.c(),e=Gt()},m(r,s){i&&i.m(r,s),Y(r,e,s),t=!0},p(r,[s]){r[0]?i?(i.p(r,s),s&1&&M(i,1)):(i=eb(r),i.c(),M(i,1),i.m(e.parentNode,e)):i&&(Je(),j(i,1,1,()=>{i=null}),et())},i(r){t||(M(i),t=!0)},o(r){j(i),t=!1},d(r){r&&X(e),i&&i.d(r)}}}function Cn(n,e){return n.indexOf(e)!==-1}function C7(n,e,t){const i=en();let{active:r}=e,{stdFlags:s=[]}=e;const l={enableTimeLimit:!1,timeLimit:1,allSolutions:!1,verboseCompilation:!1,verboseSolving:!1,compilerStatistics:!1,solvingStatistics:!1,outputTime:!1,freeSearch:!1};let o={...l};function a(B){const q=B*1e3;q!==Math.floor(q)&&t(3,o.timeLimit=Math.floor(q)/1e3,o)}function c(){for(const B in o)if(l[B]!==o[B])return!1;return!0}function h(){t(3,o={...l})}function O(B){const q={...l};for(const N in l)N in B&&(q[N]=B[N]);t(3,o=q)}function p(){return{...o}}function g(B){const q={solver:B};return o.enableTimeLimit&&o.timeLimit>0&&(q["time-limit"]=o.timeLimit*1e3),o.allSolutions&&Cn(s,"-a")&&(q["all-satisfaction"]=!0),o.verboseCompilation&&(q["verbose-compilation"]=!0),o.verboseSolving&&Cn(s,"-v")&&(q["verbose-solving"]=!0),o.compilerStatistics&&(q["compiler-statistics"]=!0),o.solvingStatistics&&Cn(s,"-s")&&(q["solver-statistics"]=!0),o.outputTime&&(q["output-time"]=!0),o.freeSearch&&Cn(s,"-f")&&(q["free-search"]=!0),q}function m(B){const q={solver:B};return o.verboseCompilation&&(q["verbose-compilation"]=!0),o.compilerStatistics&&(q["compiler-statistics"]=!0),q}const y=()=>i("close");function $(){o.enableTimeLimit=this.checked,t(3,o)}function _(){o.timeLimit=Bo(this.value),t(3,o)}function W(){o.allSolutions=this.checked,t(3,o)}function R(){o.freeSearch=this.checked,t(3,o)}function A(){o.verboseCompilation=this.checked,t(3,o)}function C(){o.verboseSolving=this.checked,t(3,o)}function E(){o.compilerStatistics=this.checked,t(3,o)}function D(){o.solvingStatistics=this.checked,t(3,o)}function z(){o.outputTime=this.checked,t(3,o)}const F=()=>i("close");return n.$$set=B=>{"active"in B&&t(0,r=B.active),"stdFlags"in B&&t(1,s=B.stdFlags)},n.$$.update=()=>{n.$$.dirty&8&&a(o.timeLimit)},[r,s,h,o,i,c,O,p,g,m,y,$,_,W,R,A,C,E,D,z,F]}class T7 extends $i{constructor(e){super(),bi(this,e,C7,W7,Oi,{active:0,stdFlags:1,isDefault:5,reset:2,load:6,save:7,getSolvingConfiguration:8,getCompilationConfiguration:9})}get isDefault(){return this.$$.ctx[5]}get reset(){return this.$$.ctx[2]}get load(){return this.$$.ctx[6]}get save(){return this.$$.ctx[7]}get getSolvingConfiguration(){return this.$$.ctx[8]}get getCompilationConfiguration(){return this.$$.ctx[9]}}function sb(n,e,t){const i=n.slice();return i[13]=e[t],i}const Z7=n=>({item:n&2}),lb=n=>({item:n[13]}),R7=n=>({item:n&4}),ob=n=>({item:n[2]});function ab(n){let e;const t=n[8].selected,i=Zi(t,n,n[7],ob),r=i||X7(n);return{c(){r&&r.c()},m(s,l){r&&r.m(s,l),e=!0},p(s,l){i?i.p&&(!e||l&132)&&Xi(i,t,s,s[7],e?Ri(t,s[7],l,R7):Ai(s[7]),ob):r&&r.p&&(!e||l&4)&&r.p(s,e?l:-1)},i(s){e||(M(r,s),e=!0)},o(s){j(r,s),e=!1},d(s){r&&r.d(s)}}}function X7(n){let e=n[2].label+"",t;return{c(){t=pe(e)},m(i,r){Y(i,t,r)},p(i,r){r&4&&e!==(e=i[2].label+"")&&Le(t,e)},d(i){i&&X(t)}}}function A7(n){let e=n[13].label+"",t;return{c(){t=pe(e)},m(i,r){Y(i,t,r)},p(i,r){r&2&&e!==(e=i[13].label+"")&&Le(t,e)},d(i){i&&X(t)}}}function fb(n){let e,t,i,r,s;const l=n[8].item,o=Zi(l,n,n[7],lb),a=o||A7(n);function c(){return n[10](n[13])}return{c(){e=k("a"),a&&a.c(),t=L(),v(e,"href","javascript:void(0);"),v(e,"class","dropdown-item"),ne(e,"is-active",n[2]===n[13])},m(h,O){Y(h,e,O),a&&a.m(e,null),Q(e,t),i=!0,r||(s=le(e,"click",c),r=!0)},p(h,O){n=h,o?o.p&&(!i||O&130)&&Xi(o,l,n,n[7],i?Ri(l,n[7],O,Z7):Ai(n[7]),lb):a&&a.p&&(!i||O&2)&&a.p(n,i?O:-1),(!i||O&6)&&ne(e,"is-active",n[2]===n[13])},i(h){i||(M(a,h),i=!0)},o(h){j(a,h),i=!1},d(h){h&&X(e),a&&a.d(h),r=!1,s()}}}function Y7(n){let e,t,i,r,s,l,o,a,c,h,O,p,g,m,y=n[2]&&ab(n);a=new wt({props:{icon:XC}});let $=st(n[1]),_=[];for(let R=0;R<$.length;R+=1)_[R]=fb(sb(n,$,R));const W=R=>j(_[R],1,1,()=>{_[R]=null});return{c(){e=L(),t=k("div"),i=k("div"),r=k("button"),s=k("span"),y&&y.c(),l=L(),o=k("span"),Ae(a.$$.fragment),c=L(),h=k("div"),O=k("div");for(let R=0;R<_.length;R+=1)_[R].c();v(o,"class","icon is-small"),v(r,"class","button"),r.disabled=n[3],v(i,"class","dropdown-trigger"),v(O,"class","dropdown-content"),v(h,"class","dropdown-menu"),v(t,"class","dropdown"),ne(t,"is-active",n[0])},m(R,A){Y(R,e,A),Y(R,t,A),Q(t,i),Q(i,r),Q(r,s),y&&y.m(s,null),Q(r,l),Q(r,o),Re(a,o,null),Q(t,c),Q(t,h),Q(h,O);for(let C=0;C<_.length;C+=1)_[C]&&_[C].m(O,null);n[11](t),p=!0,g||(m=[le(document.body,"click",n[6]),le(r,"click",n[9])],g=!0)},p(R,[A]){if(R[2]?y?(y.p(R,A),A&4&&M(y,1)):(y=ab(R),y.c(),M(y,1),y.m(s,null)):y&&(Je(),j(y,1,1,()=>{y=null}),et()),(!p||A&8)&&(r.disabled=R[3]),A&166){$=st(R[1]);let C;for(C=0;C<$.length;C+=1){const E=sb(R,$,C);_[C]?(_[C].p(E,A),M(_[C],1)):(_[C]=fb(E),_[C].c(),M(_[C],1),_[C].m(O,null))}for(Je(),C=$.length;C<_.length;C+=1)W(C);et()}(!p||A&1)&&ne(t,"is-active",R[0])},i(R){if(!p){M(y),M(a.$$.fragment,R);for(let A=0;A<$.length;A+=1)M(_[A]);p=!0}},o(R){j(y),j(a.$$.fragment,R),_=_.filter(Boolean);for(let A=0;A<_.length;A+=1)j(_[A]);p=!1},d(R){R&&(X(e),X(t)),y&&y.d(),Xe(a),di(_,R),n[11](null),g=!1,Ft(m)}}}function U7(n,e,t){let{$$slots:i={},$$scope:r}=e;const s=en();let{items:l=[]}=e,{currentItem:o=null}=e,{active:a=!1}=e,{disabled:c=!1}=e,h;function O($){s("selectItem",{item:$}),t(0,a=!1)}function p($){h&&!h.contains($.target)&&t(0,a=!1)}const g=()=>t(0,a=!a),m=$=>O($);function y($){Et[$?"unshift":"push"](()=>{h=$,t(4,h)})}return n.$$set=$=>{"items"in $&&t(1,l=$.items),"currentItem"in $&&t(2,o=$.currentItem),"active"in $&&t(0,a=$.active),"disabled"in $&&t(3,c=$.disabled),"$$scope"in $&&t(7,r=$.$$scope)},[a,l,o,c,h,O,p,r,i,g,m,y]}class E7 extends $i{constructor(e){super(),bi(this,e,U7,Y7,Oi,{items:1,currentItem:2,active:0,disabled:3})}}const lQ=Ne.define({map:(n,e)=>({from:e.mapPos(n.from),to:e.mapPos(n.to),msg:n.msg,type:n.type})}),oQ=Ne.define(),cb=pi.define({create(){return Ye.none},update(n,e){n=n.map(e.changes);for(const t of e.effects)t.is(oQ)&&(n=Ye.none),t.is(lQ)&&(n=n.update({add:[Ye.mark({class:`cm-mzn-underline-${t.value.type}`,attributes:{title:t.value.msg}}).range(t.value.from,t.value.to)]}));return n},provide:n=>de.decorations.from(n)});function $d(n,e,t){let i,r=1,s=1;for(i=0;i=n&&s>=e)return i;s++,t[i]===`
`&&(r++,s=1)}return i}function z7(n,e,t){const i=e.map(r=>lQ.of({from:$d(r.location.firstLine,r.location.firstColumn,n),to:$d(r.location.lastLine,r.location.lastColumn,n)+1,msg:`${r.type==="error"?"Error":"Warning"}: ${r.what}: ${r.message}`,type:r.type}));t.state.field(cb,!1)||i.push(Ne.appendConfig.of([cb])),t.dispatch({effects:[oQ.of(null),...i]})}const ml=[];function aQ(n,e=Qe){let t;const i=new Set;function r(o){if(Oi(n,o)&&(n=o,t)){const a=!ml.length;for(const c of i)c[1](),ml.push(c,n);if(a){for(let c=0;c{i.delete(c),i.size===0&&t&&(t(),t=null)}}return{set:r,update:s,subscribe:l}}const fQ=n=>{const e=window.matchMedia(n);return aQ(e.matches,t=>{const i=()=>t(window.matchMedia(n).matches);return e.addEventListener("change",i),()=>e.removeEventListener("change",i)})},M7=fQ("(prefers-color-scheme: dark)"),D7=fQ("(max-width: 768px)"),V7=n=>({isMobile:n[1]&4194304}),ub=n=>({isMobile:n[53]}),q7=n=>({isMobile:n[1]&4194304}),hb=n=>({isMobile:n[53]}),I7=n=>({isMobile:n[1]&4194304}),Ob=n=>({isMobile:n[53]}),N7=n=>({isMobile:n[1]&4194304}),db=n=>({isMobile:n[53]}),L7=n=>({isMobile:n[1]&4194304}),pb=n=>({isMobile:n[53]});function gb(n,e,t){const i=n.slice();return i[157]=e[t],i[159]=t,i}const j7=n=>({isMobile:n[1]&4194304}),mb=n=>({isMobile:n[53]});function Sb(n,e,t){const i=n.slice();return i[157]=e[t],i[159]=t,i}const B7=n=>({isMobile:n[1]&4194304}),bb=n=>({isMobile:n[53]}),F7=n=>({isMobile:n[1]&4194304}),$b=n=>({isMobile:n[53]});function G7(n){let e,t,i,r,s,l,o,a,c;return s=new wt({props:{icon:YC}}),{c(){e=k("button"),t=k("span"),t.textContent="Run",i=L(),r=k("span"),Ae(s.$$.fragment),v(r,"class","icon"),v(e,"class","button is-primary"),v(e,"title","Run the current file"),e.disabled=l=!n[50]},m(h,O){Y(h,e,O),Q(e,t),Q(e,i),Q(e,r),Re(s,r,null),o=!0,a||(c=le(e,"click",n[62]),a=!0)},p(h,O){(!o||O[1]&524288&&l!==(l=!h[50]))&&(e.disabled=l)},i(h){o||(M(s.$$.fragment,h),o=!0)},o(h){j(s.$$.fragment,h),o=!1},d(h){h&&X(e),Xe(s),a=!1,c()}}}function H7(n){let e,t,i,r,s,l,o,a;return s=new wt({props:{icon:RC}}),{c(){e=k("button"),t=k("span"),t.textContent="Stop",i=L(),r=k("span"),Ae(s.$$.fragment),v(r,"class","icon"),v(e,"class","button is-danger"),v(e,"title","Cancel solving")},m(c,h){Y(c,e,h),Q(e,t),Q(e,i),Q(e,r),Re(s,r,null),l=!0,o||(a=le(e,"click",n[64]),o=!0)},p:Qe,i(c){l||(M(s.$$.fragment,c),l=!0)},o(c){j(s.$$.fragment,c),l=!1},d(c){c&&X(e),Xe(s),o=!1,a()}}}function yb(n){let e,t,i,r,s,l;return{c(){e=k("div"),t=k("button"),i=k("span"),i.textContent="Compile",v(t,"class","button"),v(t,"title","Compile the current file and show the resultant FlatZinc"),t.disabled=r=n[47]||!n[49],v(e,"class","control")},m(o,a){Y(o,e,a),Q(e,t),Q(t,i),s||(l=le(t,"click",n[63]),s=!0)},p(o,a){a[1]&327680&&r!==(r=o[47]||!o[49])&&(t.disabled=r)},d(o){o&&X(e),s=!1,l()}}}function vb(n){let e,t,i;return t=new E7({props:{items:n[52],currentItem:n[0]?n[19].edge:n[19].latest,disabled:n[47],$$slots:{item:[K7,({item:r})=>({161:r}),({item:r})=>[0,0,0,0,0,r?64:0]]},$$scope:{ctx:n}}}),t.$on("selectItem",n[71]),{c(){e=k("div"),Ae(t.$$.fragment),v(e,"class","control")},m(r,s){Y(r,e,s),Re(t,e,null),i=!0},p(r,s){const l={};s[1]&2097152&&(l.items=r[52]),s[0]&524289&&(l.currentItem=r[0]?r[19].edge:r[19].latest),s[1]&65536&&(l.disabled=r[47]),s[4]&8192|s[5]&64&&(l.$$scope={dirty:s,ctx:r}),t.$set(l)},i(r){i||(M(t.$$.fragment,r),i=!0)},o(r){j(t.$$.fragment,r),i=!1},d(r){r&&X(e),Xe(t)}}}function K7(n){let e,t=n[161].label+"",i,r,s=n[161].detail+"",l,o;return{c(){e=k("span"),i=pe(t),r=pe(" ("),l=pe(s),o=pe(")"),v(e,"slot","item")},m(a,c){Y(a,e,c),Q(e,i),Q(e,r),Q(e,l),Q(e,o)},p(a,c){c[5]&64&&t!==(t=a[161].label+"")&&Le(i,t),c[5]&64&&s!==(s=a[161].detail+"")&&Le(l,s)},d(a){a&&X(e)}}}function wb(n){let e,t,i,r,s,l=st(n[23]),o=[];for(let a=0;an[93].call(i)),v(t,"class","select is-fullwidth"),v(e,"class","control is-expanded")},m(a,c){Y(a,e,c),Q(e,t),Q(t,i);for(let h=0;hSolver:',r=L(),s=k("div"),l=k("div"),o=k("select");for(let y=0;yn[94].call(o)),v(l,"class","select is-fullwidth"),v(s,"class","control is-expanded"),v(t,"class","field has-addons"),v(e,"class","navbar-item is-hidden-mobile")},m(y,$){Y(y,e,$),Q(e,t),Q(t,i),Q(t,r),Q(t,s),Q(s,l),Q(l,o);for(let _=0;_{m=null}),et())},i(y){c||(M(m),c=!0)},o(y){j(m),c=!1},d(y){y&&X(e),di(g,y),m&&m.d(),h=!1,O()}}}function kb(n){let e,t=n[157].name+"",i,r,s=n[157].version+"",l,o;return{c(){e=k("option"),i=pe(t),r=L(),l=pe(s),o=L(),e.__value=n[159],si(e,e.__value)},m(a,c){Y(a,e,c),Q(e,i),Q(e,r),Q(e,l),Q(e,o)},p(a,c){c[0]&8388608&&t!==(t=a[157].name+"")&&Le(i,t),c[0]&8388608&&s!==(s=a[157].version+"")&&Le(l,s)},d(a){a&&X(e)}}}function Pb(n){let e,t,i,r,s,l,o;return r=new wt({props:{icon:Ey}}),{c(){e=k("div"),t=k("button"),i=k("span"),Ae(r.$$.fragment),v(i,"class","icon"),v(t,"class","button is-primary"),v(e,"class","control")},m(a,c){Y(a,e,c),Q(e,t),Q(t,i),Re(r,i,null),s=!0,l||(o=le(t,"click",n[55]),l=!0)},p:Qe,i(a){s||(M(r.$$.fragment,a),s=!0)},o(a){j(r.$$.fragment,a),s=!1},d(a){a&&X(e),Xe(r),l=!1,o()}}}function J7(n){let e,t,i,r,s,l,o;const a=n[92]["navbar-before-share-buttons"],c=Zi(a,n,n[137],Ob);let h=n[10]&&xb(n),O=n[11]&&Wb(n),p=n[12]&&Cb(n);const g=n[92]["navbar-share-buttons"],m=Zi(g,n,n[137],hb);return{c(){c&&c.c(),e=L(),t=k("div"),i=k("div"),h&&h.c(),r=L(),O&&O.c(),s=L(),p&&p.c(),l=L(),m&&m.c(),v(i,"class","field has-addons"),v(t,"class","navbar-item")},m(y,$){c&&c.m(y,$),Y(y,e,$),Y(y,t,$),Q(t,i),h&&h.m(i,null),Q(i,r),O&&O.m(i,null),Q(i,s),p&&p.m(i,null),Q(i,l),m&&m.m(i,null),o=!0},p(y,$){c&&c.p&&(!o||$[1]&4194304|$[4]&8192)&&Xi(c,a,y,y[137],o?Ri(a,y[137],$,I7):Ai(y[137]),Ob),y[10]?h?(h.p(y,$),$[0]&1024&&M(h,1)):(h=xb(y),h.c(),M(h,1),h.m(i,r)):h&&(Je(),j(h,1,1,()=>{h=null}),et()),y[11]?O?(O.p(y,$),$[0]&2048&&M(O,1)):(O=Wb(y),O.c(),M(O,1),O.m(i,s)):O&&(Je(),j(O,1,1,()=>{O=null}),et()),y[12]?p?(p.p(y,$),$[0]&4096&&M(p,1)):(p=Cb(y),p.c(),M(p,1),p.m(i,l)):p&&(Je(),j(p,1,1,()=>{p=null}),et()),m&&m.p&&(!o||$[1]&4194304|$[4]&8192)&&Xi(m,g,y,y[137],o?Ri(g,y[137],$,q7):Ai(y[137]),hb)},i(y){o||(M(c,y),M(h),M(O),M(p),M(m,y),o=!0)},o(y){j(c,y),j(h),j(O),j(p),j(m,y),o=!1},d(y){y&&(X(e),X(t)),c&&c.d(y),h&&h.d(),O&&O.d(),p&&p.d(),m&&m.d(y)}}}function e6(n){let e,t,i,r,s,l,o,a=n[8]&&!n[47]&&n[49]&&Tb(n),c=n[9]&&n[5]&&n[23].length>0&&Zb(n),h=n[4]&&!n[47]&&Rb(n);const O=n[92]["navbar-before-share-buttons"],p=Zi(O,n,n[137],db);let g=n[10]&&n[18]===0&&Xb(n),m=n[12]&&n[18]===0&&Ab(n);return{c(){a&&a.c(),e=L(),c&&c.c(),t=L(),h&&h.c(),i=L(),p&&p.c(),r=L(),g&&g.c(),s=L(),m&&m.c(),l=Gt()},m(y,$){a&&a.m(y,$),Y(y,e,$),c&&c.m(y,$),Y(y,t,$),h&&h.m(y,$),Y(y,i,$),p&&p.m(y,$),Y(y,r,$),g&&g.m(y,$),Y(y,s,$),m&&m.m(y,$),Y(y,l,$),o=!0},p(y,$){y[8]&&!y[47]&&y[49]?a?(a.p(y,$),$[0]&256|$[1]&327680&&M(a,1)):(a=Tb(y),a.c(),M(a,1),a.m(e.parentNode,e)):a&&(Je(),j(a,1,1,()=>{a=null}),et()),y[9]&&y[5]&&y[23].length>0?c?(c.p(y,$),$[0]&8389152&&M(c,1)):(c=Zb(y),c.c(),M(c,1),c.m(t.parentNode,t)):c&&(Je(),j(c,1,1,()=>{c=null}),et()),y[4]&&!y[47]?h?(h.p(y,$),$[0]&16|$[1]&65536&&M(h,1)):(h=Rb(y),h.c(),M(h,1),h.m(i.parentNode,i)):h&&(Je(),j(h,1,1,()=>{h=null}),et()),p&&p.p&&(!o||$[1]&4194304|$[4]&8192)&&Xi(p,O,y,y[137],o?Ri(O,y[137],$,N7):Ai(y[137]),db),y[10]&&y[18]===0?g?(g.p(y,$),$[0]&263168&&M(g,1)):(g=Xb(y),g.c(),M(g,1),g.m(s.parentNode,s)):g&&(Je(),j(g,1,1,()=>{g=null}),et()),y[12]&&y[18]===0?m?(m.p(y,$),$[0]&266240&&M(m,1)):(m=Ab(y),m.c(),M(m,1),m.m(l.parentNode,l)):m&&(Je(),j(m,1,1,()=>{m=null}),et())},i(y){o||(M(a),M(c),M(h),M(p,y),M(g),M(m),o=!0)},o(y){j(a),j(c),j(h),j(p,y),j(g),j(m),o=!1},d(y){y&&(X(e),X(t),X(i),X(r),X(s),X(l)),a&&a.d(y),c&&c.d(y),h&&h.d(y),p&&p.d(y),g&&g.d(y),m&&m.d(y)}}}function xb(n){let e,t,i,r,s,l,o,a;return r=new wt({props:{icon:Ay}}),{c(){e=k("div"),t=k("button"),i=k("span"),Ae(r.$$.fragment),v(i,"class","icon"),v(t,"class","button is-primary"),v(t,"title","Share"),t.disabled=s=n[18]!==0,v(e,"class","control")},m(c,h){Y(c,e,h),Q(e,t),Q(t,i),Re(r,i,null),l=!0,o||(a=le(t,"click",n[101]),o=!0)},p(c,h){(!l||h[0]&262144&&s!==(s=c[18]!==0))&&(t.disabled=s)},i(c){l||(M(r.$$.fragment,c),l=!0)},o(c){j(r.$$.fragment,c),l=!1},d(c){c&&X(e),Xe(r),o=!1,a()}}}function Wb(n){let e,t,i,r,s,l,o,a;return r=new wt({props:{icon:ZC}}),{c(){e=k("div"),t=k("button"),i=k("span"),Ae(r.$$.fragment),v(i,"class","icon"),v(t,"class","button"),v(t,"title","Download project"),t.disabled=s=n[37]||n[18]!==0,v(e,"class","control")},m(c,h){Y(c,e,h),Q(e,t),Q(t,i),Re(r,i,null),l=!0,o||(a=le(t,"click",n[102]),o=!0)},p(c,h){(!l||h[0]&262144|h[1]&64&&s!==(s=c[37]||c[18]!==0))&&(t.disabled=s)},i(c){l||(M(r.$$.fragment,c),l=!0)},o(c){j(r.$$.fragment,c),l=!1},d(c){c&&X(e),Xe(r),o=!1,a()}}}function Cb(n){let e,t,i,r,s,l,o,a;return r=new wt({props:{icon:Yy}}),{c(){e=k("div"),t=k("button"),i=k("span"),Ae(r.$$.fragment),v(i,"class","icon"),v(t,"class","button is-primary"),v(t,"title","Open in playground"),t.disabled=s=n[18]!==0,v(e,"class","control")},m(c,h){Y(c,e,h),Q(e,t),Q(t,i),Re(r,i,null),l=!0,o||(a=le(t,"click",n[68]),o=!0)},p(c,h){(!l||h[0]&262144&&s!==(s=c[18]!==0))&&(t.disabled=s)},i(c){l||(M(r.$$.fragment,c),l=!0)},o(c){j(r.$$.fragment,c),l=!1},d(c){c&&X(e),Xe(r),o=!1,a()}}}function Tb(n){let e,t,i,r,s,l,o,a;return i=new wt({props:{icon:UC}}),{c(){e=k("a"),t=k("span"),Ae(i.$$.fragment),r=L(),s=k("span"),s.textContent="Compile current file",v(t,"class","icon svelte-hl0lfa"),v(e,"class","navbar-item mobile-menu-item svelte-hl0lfa"),v(e,"href","javascript:void(0);")},m(c,h){Y(c,e,h),Q(e,t),Re(i,t,null),Q(e,r),Q(e,s),l=!0,o||(a=le(e,"click",n[96]),o=!0)},p:Qe,i(c){l||(M(i.$$.fragment,c),l=!0)},o(c){j(i.$$.fragment,c),l=!1},d(c){c&&X(e),Xe(i),o=!1,a()}}}function Zb(n){let e,t,i,r,s,l,o,a;return i=new wt({props:{icon:Ey}}),{c(){e=k("a"),t=k("span"),Ae(i.$$.fragment),r=L(),s=k("span"),s.textContent="Solver configuration",v(t,"class","icon svelte-hl0lfa"),v(e,"class","navbar-item mobile-menu-item svelte-hl0lfa"),v(e,"href","javascript:void(0);")},m(c,h){Y(c,e,h),Q(e,t),Re(i,t,null),Q(e,r),Q(e,s),l=!0,o||(a=le(e,"click",n[97]),o=!0)},p:Qe,i(c){l||(M(i.$$.fragment,c),l=!0)},o(c){j(i.$$.fragment,c),l=!1},d(c){c&&X(e),Xe(i),o=!1,a()}}}function Rb(n){let e,t,i,r,s,l,o=n[0]?"latest":"edge",a,c,h,O,p;return i=new wt({props:{icon:PC}}),{c(){e=k("a"),t=k("span"),Ae(i.$$.fragment),r=L(),s=k("span"),l=pe("Switch to the "),a=pe(o),c=pe(" version of MiniZinc"),v(t,"class","icon svelte-hl0lfa"),v(e,"class","navbar-item mobile-menu-item svelte-hl0lfa"),v(e,"href","javascript:void(0);")},m(g,m){Y(g,e,m),Q(e,t),Re(i,t,null),Q(e,r),Q(e,s),Q(s,l),Q(s,a),Q(s,c),h=!0,O||(p=le(e,"click",n[98]),O=!0)},p(g,m){(!h||m[0]&1)&&o!==(o=g[0]?"latest":"edge")&&Le(a,o)},i(g){h||(M(i.$$.fragment,g),h=!0)},o(g){j(i.$$.fragment,g),h=!1},d(g){g&&X(e),Xe(i),O=!1,p()}}}function Xb(n){let e,t,i,r,s,l,o,a;return i=new wt({props:{icon:Ay}}),{c(){e=k("a"),t=k("span"),Ae(i.$$.fragment),r=L(),s=k("span"),s.textContent="Share this project",v(t,"class","icon svelte-hl0lfa"),v(e,"class","navbar-item mobile-menu-item svelte-hl0lfa"),v(e,"href","javascript:void(0);")},m(c,h){Y(c,e,h),Q(e,t),Re(i,t,null),Q(e,r),Q(e,s),l=!0,o||(a=le(e,"click",n[99]),o=!0)},p:Qe,i(c){l||(M(i.$$.fragment,c),l=!0)},o(c){j(i.$$.fragment,c),l=!1},d(c){c&&X(e),Xe(i),o=!1,a()}}}function Ab(n){let e,t,i,r,s,l,o,a;return i=new wt({props:{icon:Yy}}),{c(){e=k("a"),t=k("span"),Ae(i.$$.fragment),r=L(),s=k("span"),s.textContent="Open in MiniZinc Playground",v(t,"class","icon svelte-hl0lfa"),v(e,"class","navbar-item mobile-menu-item svelte-hl0lfa"),v(e,"href","javascript:void(0);")},m(c,h){Y(c,e,h),Q(e,t),Re(i,t,null),Q(e,r),Q(e,s),l=!0,o||(a=le(e,"click",n[100]),o=!0)},p:Qe,i(c){l||(M(i.$$.fragment,c),l=!0)},o(c){j(i.$$.fragment,c),l=!1},d(c){c&&X(e),Xe(i),o=!1,a()}}}function Yb(n){let e,t,i;return t=new LC({props:{files:n[20],currentIndex:n[21],readonly:!n[7]}}),t.$on("selectTab",n[110]),t.$on("reorder",n[111]),t.$on("newFile",n[112]),t.$on("rename",n[58]),t.$on("close",n[113]),t.$on("manageFiles",n[114]),{c(){e=k("div"),Ae(t.$$.fragment),v(e,"class","top svelte-hl0lfa")},m(r,s){Y(r,e,s),Re(t,e,null),i=!0},p(r,s){const l={};s[0]&1048576&&(l.files=r[20]),s[0]&2097152&&(l.currentIndex=r[21]),s[0]&128&&(l.readonly=!r[7]),t.$set(l)},i(r){i||(M(t.$$.fragment,r),i=!0)},o(r){j(t.$$.fragment,r),i=!1},d(r){r&&X(e),Xe(t)}}}function Ub(n){let e,t,i={state:n[51]};return e=new cC({props:i}),n[115](e),{c(){Ae(e.$$.fragment)},m(r,s){Re(e,r,s),t=!0},p(r,s){const l={};s[1]&1048576&&(l.state=r[51]),e.$set(l)},i(r){t||(M(e.$$.fragment,r),t=!0)},o(r){j(e.$$.fragment,r),t=!1},d(r){n[115](null),Xe(e,r)}}}function t6(n){let e,t,i,r,s=n[6]&&Yb(n),l=n[51]&&Ub(n);return{c(){e=k("div"),s&&s.c(),t=L(),i=k("div"),l&&l.c(),v(i,"class","grow svelte-hl0lfa"),v(e,"class","panel stack svelte-hl0lfa"),v(e,"slot","panelA")},m(o,a){Y(o,e,a),s&&s.m(e,null),Q(e,t),Q(e,i),l&&l.m(i,null),r=!0},p(o,a){o[6]?s?(s.p(o,a),a[0]&64&&M(s,1)):(s=Yb(o),s.c(),M(s,1),s.m(e,t)):s&&(Je(),j(s,1,1,()=>{s=null}),et()),o[51]?l?(l.p(o,a),a[1]&1048576&&M(l,1)):(l=Ub(o),l.c(),M(l,1),l.m(i,null)):l&&(Je(),j(l,1,1,()=>{l=null}),et())},i(o){r||(M(s),M(l),r=!0)},o(o){j(s),j(l),r=!1},d(o){o&&X(e),s&&s.d(),l&&l.d()}}}function Eb(n){let e,t,i,r,s,l,o,a,c,h,O,p,g=n[13]&&zb(n);return{c(){e=k("div"),t=k("div"),i=k("ul"),r=k("li"),s=k("a"),s.textContent="Output",l=L(),o=k("li"),a=k("a"),a.textContent="Visualisation",c=L(),g&&g.c(),v(s,"href","javascript:void(0);"),ne(r,"is-active",!n[43]),v(a,"href","javascript:void(0);"),ne(o,"is-active",n[43]),v(t,"class","tabs is-boxed"),v(e,"class","top svelte-hl0lfa")},m(m,y){Y(m,e,y),Q(e,t),Q(t,i),Q(i,r),Q(r,s),Q(i,l),Q(i,o),Q(o,a),Q(i,c),g&&g.m(i,null),h=!0,O||(p=[le(s,"click",n[103]),le(a,"click",n[104])],O=!0)},p(m,y){(!h||y[1]&4096)&&ne(r,"is-active",!m[43]),(!h||y[1]&4096)&&ne(o,"is-active",m[43]),m[13]?g?(g.p(m,y),y[0]&8192&&M(g,1)):(g=zb(m),g.c(),M(g,1),g.m(i,null)):g&&(Je(),j(g,1,1,()=>{g=null}),et())},i(m){h||(M(g),h=!0)},o(m){j(g),h=!1},d(m){m&&X(e),g&&g.d(),O=!1,Ft(p)}}}function zb(n){let e,t,i,r,s,l,o;return r=new wt({props:{icon:Dy}}),{c(){e=k("li"),t=k("button"),i=k("span"),Ae(r.$$.fragment),v(i,"class","icon"),v(t,"class","button is-small"),v(t,"title","Switch orientation"),v(e,"class","tab-end svelte-hl0lfa")},m(a,c){Y(a,e,c),Q(e,t),Q(t,i),Re(r,i,null),s=!0,l||(o=le(t,"click",n[70]),l=!0)},p:Qe,i(a){s||(M(r.$$.fragment,a),s=!0)},o(a){j(r.$$.fragment,a),s=!1},d(a){a&&X(e),Xe(r),l=!1,o()}}}function Mb(n){let e,t,i,r,s,l;return i=new wt({props:{icon:Dy}}),{c(){e=k("button"),t=k("span"),Ae(i.$$.fragment),v(t,"class","icon"),v(e,"class","button is-small"),v(e,"title","Switch orientation")},m(o,a){Y(o,e,a),Q(e,t),Re(i,t,null),r=!0,s||(l=le(e,"click",n[70]),s=!0)},p:Qe,i(o){r||(M(i.$$.fragment,o),r=!0)},o(o){j(i.$$.fragment,o),r=!1},d(o){o&&X(e),Xe(i),s=!1,l()}}}function i6(n){let e,t,i=n[13]&&!n[42]&&Mb(n);return{c(){e=k("p"),i&&i.c(),v(e,"class","control"),v(e,"slot","before-right-controls")},m(r,s){Y(r,e,s),i&&i.m(e,null),t=!0},p(r,s){r[13]&&!r[42]?i?(i.p(r,s),s[0]&8192|s[1]&2048&&M(i,1)):(i=Mb(r),i.c(),M(i,1),i.m(e,null)):i&&(Je(),j(i,1,1,()=>{i=null}),et())},i(r){t||(M(i),t=!0)},o(r){j(i),t=!1},d(r){r&&X(e),i&&i.d()}}}function n6(n){let e,t,i,r,s,l,o,a,c,h,O=n[42]&&Eb(n),p={files:n[20]};s=new J9({props:p}),n[105](s),s.$on("solve",n[106]);function g(y){n[107](y)}let m={output:n[33],showClearOutput:n[14],showAutoClearOutput:n[15],showSectionToggles:n[16],showRightControls:n[17],isTab:n[42],$$slots:{"before-right-controls":[i6]},$$scope:{ctx:n}};return n[1]!==void 0&&(m.autoClearOutput=n[1]),a=new B9({props:m}),Et.push(()=>qo(a,"autoClearOutput",g)),a.$on("clear",n[108]),a.$on("goto",n[109]),{c(){e=k("div"),O&&O.c(),t=L(),i=k("div"),r=k("div"),Ae(s.$$.fragment),l=L(),o=k("div"),Ae(a.$$.fragment),v(r,"class","tab-window svelte-hl0lfa"),ne(r,"visible",n[43]),v(o,"class","tab-window svelte-hl0lfa"),ne(o,"visible",!n[42]||!n[43]),v(i,"class","grow svelte-hl0lfa"),v(e,"class","panel stack svelte-hl0lfa"),v(e,"slot","panelB")},m(y,$){Y(y,e,$),O&&O.m(e,null),Q(e,t),Q(e,i),Q(i,r),Re(s,r,null),Q(i,l),Q(i,o),Re(a,o,null),h=!0},p(y,$){y[42]?O?(O.p(y,$),$[1]&2048&&M(O,1)):(O=Eb(y),O.c(),M(O,1),O.m(e,t)):O&&(Je(),j(O,1,1,()=>{O=null}),et());const _={};$[0]&1048576&&(_.files=y[20]),s.$set(_),(!h||$[1]&4096)&&ne(r,"visible",y[43]);const W={};$[1]&4&&(W.output=y[33]),$[0]&16384&&(W.showClearOutput=y[14]),$[0]&32768&&(W.showAutoClearOutput=y[15]),$[0]&65536&&(W.showSectionToggles=y[16]),$[0]&131072&&(W.showRightControls=y[17]),$[1]&2048&&(W.isTab=y[42]),$[0]&8192|$[1]&2048|$[4]&8192&&(W.$$scope={dirty:$,ctx:y}),!c&&$[0]&2&&(c=!0,W.autoClearOutput=y[1],Vo(()=>c=!1)),a.$set(W),(!h||$[1]&6144)&&ne(o,"visible",!y[42]||!y[43])},i(y){h||(M(O),M(s.$$.fragment,y),M(a.$$.fragment,y),h=!0)},o(y){j(O),j(s.$$.fragment,y),j(a.$$.fragment,y),h=!1},d(y){y&&X(e),O&&O.d(),n[105](null),Xe(s),Xe(a)}}}function r6(n){let e,t,i,r=n[20][n[29]].name+"",s,l,o,a;return{c(){e=k("p"),t=pe("Are you sure you wish to delete "),i=k("code"),s=pe(r),l=pe("?"),o=L(),a=k("p"),a.textContent="This cannot be undone."},m(c,h){Y(c,e,h),Q(e,t),Q(e,i),Q(i,s),Q(e,l),Y(c,o,h),Y(c,a,h)},p(c,h){h[0]&537919488&&r!==(r=c[20][c[29]].name+"")&&Le(s,r)},d(c){c&&(X(e),X(o),X(a))}}}function s6(n){let e,t,i,r,s,l;return{c(){e=k("div"),t=k("button"),t.textContent="Delete",i=L(),r=k("button"),r.textContent="Cancel",v(t,"class","button is-danger"),v(r,"type","button"),v(r,"class","button"),v(e,"slot","footer")},m(o,a){Y(o,e,a),Q(e,t),Q(e,i),Q(e,r),s||(l=[le(t,"click",n[126]),le(r,"click",n[127])],s=!0)},p:Qe,d(o){o&&X(e),s=!1,Ft(l)}}}function l6(n){let e,t,i,r,s,l,o,a,c,h,O;return a=new wt({props:{icon:xC}}),{c(){e=k("div"),t=k("p"),i=k("input"),r=L(),s=k("p"),l=k("button"),o=k("span"),Ae(a.$$.fragment),v(i,"class","input"),v(i,"type","text"),i.value=n[39],i.readOnly=!0,v(t,"class","control is-expanded"),v(o,"class","icon"),v(l,"type","button"),v(l,"class","button"),ne(l,"is-primary",!n[40]),ne(l,"is-success",n[40]),v(s,"class","control"),v(e,"class","field has-addons")},m(p,g){Y(p,e,g),Q(e,t),Q(t,i),n[134](i),Q(e,r),Q(e,s),Q(s,l),Q(l,o),Re(a,o,null),c=!0,h||(O=[le(i,"click",n[135]),le(l,"click",n[67])],h=!0)},p(p,g){(!c||g[1]&256&&i.value!==p[39])&&(i.value=p[39]),(!c||g[1]&512)&&ne(l,"is-primary",!p[40]),(!c||g[1]&512)&&ne(l,"is-success",p[40])},i(p){c||(M(a.$$.fragment,p),c=!0)},o(p){j(a.$$.fragment,p),c=!1},d(p){p&&X(e),n[134](null),Xe(a),h=!1,Ft(O)}}}function o6(n){let e,t,i,r;return{c(){e=k("div"),t=k("button"),t.textContent="Done",v(t,"class","button is-primary"),v(e,"slot","footer")},m(s,l){Y(s,e,l),Q(e,t),i||(r=le(t,"click",n[133]),i=!0)},p:Qe,d(s){s&&X(e),i=!1,r()}}}function a6(n){let e,t,i,r,s,l,o,a,c,h,O,p,g,m,y,$,_,W,R,A,C,E,D,z,F,B,q,N,re,ae,ye,Se,ge,Ue,Ie,ke,We,lt,Vt,Qt,pt,qt,$e,oe,H,ue,ce,Ee,tt,ft,je,At,ut,Un,_t,xt,St;const Be=n[92]["navbar-before-run-buttons"],fe=Zi(Be,n,n[137],$b),Fe=[H7,G7],He=[];function gi(J,we){return J[47]?0:1}O=gi(n),p=He[O]=Fe[O](n);let Wt=!n[53]&&n[8]&&yb(n),gt=!n[53]&&n[4]&&vb(n);const En=n[92]["navbar-run-buttons"],oi=Zi(En,n,n[137],bb);let Ht=n[53]&&n[5]&&n[23].length>0&&wb(n);const gn=n[92]["navbar-after-run-buttons"],Ct=Zi(gn,n,n[137],mb);let De=n[5]&&n[23].length>0&&_b(n);const mn=n[92]["navbar-after-solver-selector"],ri=Zi(mn,n,n[137],pb),Kt=[e6,J7],Sn=[];function er(J,we){return J[53]?0:1}Se=er(n),ge=Sn[Se]=Kt[Se](n);const Lr=n[92]["navbar-after-share-buttons"],zt=Zi(Lr,n,n[137],ub);function Ts(J){n[116](J)}let Zs={direction:n[2],showPanels:n[48],$$slots:{panelB:[n6],panelA:[t6]},$$scope:{ctx:n}};n[3]!==void 0&&(Zs.split=n[3]),lt=new $C({props:Zs}),Et.push(()=>qo(lt,"split",Ts));let Hl={active:n[35],stdFlags:n[45]};pt=new T7({props:Hl}),n[117](pt),pt.$on("close",n[118]),$e=new d7({props:{active:n[30],files:n[20]}}),$e.$on("close",n[119]),$e.$on("delete",n[120]),$e.$on("modifyFile",n[121]),$e.$on("newFile",n[122]),H=new o7({props:{active:n[28]}}),H.$on("cancel",n[123]),H.$on("new",n[124]),H.$on("open",n[125]),ce=new _s({props:{active:n[29]!==null,title:"Delete file",$$slots:{footer:[s6],default:[r6]},$$scope:{ctx:n}}}),ce.$on("cancel",n[128]),tt=new b7({props:{active:n[31],modelFiles:n[44]}}),tt.$on("accept",n[129]),tt.$on("cancel",n[130]),je=new x7({props:{active:n[32],dataFiles:n[46],parameters:n[34]}}),je.$on("accept",n[131]),je.$on("cancel",n[132]),ut=new _s({props:{active:n[39],title:"Share this project",$$slots:{footer:[o6],default:[l6]},$$scope:{ctx:n}}}),ut.$on("cancel",n[136]);const jr=n[92].default,Pi=Zi(jr,n,n[137],null);return{c(){e=k("div"),t=k("div"),i=k("div"),r=k("div"),s=k("nav"),l=k("div"),fe&&fe.c(),o=L(),a=k("div"),c=k("div"),h=k("div"),p.c(),g=L(),Wt&&Wt.c(),m=L(),gt&>.c(),y=L(),oi&&oi.c(),$=L(),Ht&&Ht.c(),_=L(),Ct&&Ct.c(),W=L(),De&&De.c(),R=L(),ri&&ri.c(),A=L(),C=k("a"),E=k("span"),D=L(),z=k("span"),F=L(),B=k("span"),q=L(),N=k("div"),re=k("div"),ae=L(),ye=k("div"),ge.c(),Ue=L(),zt&&zt.c(),Ie=L(),ke=k("div"),We=k("div"),Ae(lt.$$.fragment),Qt=L(),Ae(pt.$$.fragment),qt=L(),Ae($e.$$.fragment),oe=L(),Ae(H.$$.fragment),ue=L(),Ae(ce.$$.fragment),Ee=L(),Ae(tt.$$.fragment),ft=L(),Ae(je.$$.fragment),At=L(),Ae(ut.$$.fragment),Un=L(),Pi&&Pi.c(),v(h,"class","control"),v(c,"class","field navbar-run-buttons has-addons svelte-hl0lfa"),v(a,"class","navbar-item is-expanded"),v(E,"aria-hidden","true"),v(z,"aria-hidden","true"),v(B,"aria-hidden","true"),v(C,"role","button"),v(C,"class","navbar-burger"),v(C,"aria-label","menu"),v(C,"aria-expanded",n[26]),ne(C,"is-active",n[26]),v(l,"class","navbar-brand"),v(re,"class","navbar-start is-hidden-tablet"),v(ye,"class","navbar-end"),v(N,"class","navbar-menu"),ne(N,"is-active",n[26]),v(s,"class","navbar"),v(r,"class","top svelte-hl0lfa"),v(We,"class","left svelte-hl0lfa"),v(ke,"class","grow main-panel svelte-hl0lfa"),v(i,"class","stack svelte-hl0lfa"),v(t,"class","mzn-playground-wrapper svelte-hl0lfa"),ne(t,"is-dark",n[24]),v(e,"class","mzn-playground svelte-hl0lfa")},m(J,we){Y(J,e,we),Q(e,t),Q(t,i),Q(i,r),Q(r,s),Q(s,l),fe&&fe.m(l,null),Q(l,o),Q(l,a),Q(a,c),Q(c,h),He[O].m(h,null),Q(c,g),Wt&&Wt.m(c,null),Q(c,m),gt&>.m(c,null),Q(c,y),oi&&oi.m(c,null),Q(c,$),Ht&&Ht.m(c,null),Q(l,_),Ct&&Ct.m(l,null),Q(l,W),De&&De.m(l,null),Q(l,R),ri&&ri.m(l,null),Q(l,A),Q(l,C),Q(C,E),Q(C,D),Q(C,z),Q(C,F),Q(C,B),Q(s,q),Q(s,N),Q(N,re),Q(N,ae),Q(N,ye),Sn[Se].m(ye,null),Q(ye,Ue),zt&&zt.m(ye,null),Q(i,Ie),Q(i,ke),Q(ke,We),Re(lt,We,null),Q(ke,Qt),Re(pt,ke,null),Q(t,qt),Re($e,t,null),Q(t,oe),Re(H,t,null),Q(t,ue),Re(ce,t,null),Q(t,Ee),Re(tt,t,null),Q(t,ft),Re(je,t,null),Q(t,At),Re(ut,t,null),Q(t,Un),Pi&&Pi.m(t,null),_t=!0,xt||(St=le(C,"click",n[95]),xt=!0)},p(J,we){fe&&fe.p&&(!_t||we[1]&4194304|we[4]&8192)&&Xi(fe,Be,J,J[137],_t?Ri(Be,J[137],we,F7):Ai(J[137]),$b);let tn=O;O=gi(J),O===tn?He[O].p(J,we):(Je(),j(He[tn],1,1,()=>{He[tn]=null}),et(),p=He[O],p?p.p(J,we):(p=He[O]=Fe[O](J),p.c()),M(p,1),p.m(h,null)),!J[53]&&J[8]?Wt?Wt.p(J,we):(Wt=yb(J),Wt.c(),Wt.m(c,m)):Wt&&(Wt.d(1),Wt=null),!J[53]&&J[4]?gt?(gt.p(J,we),we[0]&16|we[1]&4194304&&M(gt,1)):(gt=vb(J),gt.c(),M(gt,1),gt.m(c,y)):gt&&(Je(),j(gt,1,1,()=>{gt=null}),et()),oi&&oi.p&&(!_t||we[1]&4194304|we[4]&8192)&&Xi(oi,En,J,J[137],_t?Ri(En,J[137],we,B7):Ai(J[137]),bb),J[53]&&J[5]&&J[23].length>0?Ht?Ht.p(J,we):(Ht=wb(J),Ht.c(),Ht.m(c,null)):Ht&&(Ht.d(1),Ht=null),Ct&&Ct.p&&(!_t||we[1]&4194304|we[4]&8192)&&Xi(Ct,gn,J,J[137],_t?Ri(gn,J[137],we,j7):Ai(J[137]),mb),J[5]&&J[23].length>0?De?(De.p(J,we),we[0]&8388640&&M(De,1)):(De=_b(J),De.c(),M(De,1),De.m(l,R)):De&&(Je(),j(De,1,1,()=>{De=null}),et()),ri&&ri.p&&(!_t||we[1]&4194304|we[4]&8192)&&Xi(ri,mn,J,J[137],_t?Ri(mn,J[137],we,L7):Ai(J[137]),pb),(!_t||we[0]&67108864)&&v(C,"aria-expanded",J[26]),(!_t||we[0]&67108864)&&ne(C,"is-active",J[26]);let Br=Se;Se=er(J),Se===Br?Sn[Se].p(J,we):(Je(),j(Sn[Br],1,1,()=>{Sn[Br]=null}),et(),ge=Sn[Se],ge?ge.p(J,we):(ge=Sn[Se]=Kt[Se](J),ge.c()),M(ge,1),ge.m(ye,Ue)),zt&&zt.p&&(!_t||we[1]&4194304|we[4]&8192)&&Xi(zt,Lr,J,J[137],_t?Ri(Lr,J[137],we,V7):Ai(J[137]),ub),(!_t||we[0]&67108864)&&ne(N,"is-active",J[26]);const zn={};we[0]&4&&(zn.direction=J[2]),we[1]&131072&&(zn.showPanels=J[48]),we[0]&1916002498|we[1]&1055748|we[4]&8192&&(zn.$$scope={dirty:we,ctx:J}),!Vt&&we[0]&8&&(Vt=!0,zn.split=J[3],Vo(()=>Vt=!1)),lt.$set(zn);const vr={};we[1]&16&&(vr.active=J[35]),we[1]&16384&&(vr.stdFlags=J[45]),pt.$set(vr);const tr={};we[0]&1073741824&&(tr.active=J[30]),we[0]&1048576&&(tr.files=J[20]),$e.$set(tr);const Rs={};we[0]&268435456&&(Rs.active=J[28]),H.$set(Rs);const ir={};we[0]&536870912&&(ir.active=J[29]!==null),we[0]&537919488|we[4]&8192&&(ir.$$scope={dirty:we,ctx:J}),ce.$set(ir);const kt={};we[1]&1&&(kt.active=J[31]),we[1]&8192&&(kt.modelFiles=J[44]),tt.$set(kt);const wr={};we[1]&2&&(wr.active=J[32]),we[1]&32768&&(wr.dataFiles=J[46]),we[1]&8&&(wr.parameters=J[34]),je.$set(wr);const Fr={};we[1]&256&&(Fr.active=J[39]),we[1]&896|we[4]&8192&&(Fr.$$scope={dirty:we,ctx:J}),ut.$set(Fr),Pi&&Pi.p&&(!_t||we[4]&8192)&&Xi(Pi,jr,J,J[137],_t?Ri(jr,J[137],we,null):Ai(J[137]),null),(!_t||we[0]&16777216)&&ne(t,"is-dark",J[24])},i(J){_t||(M(fe,J),M(p),M(gt),M(oi,J),M(Ct,J),M(De),M(ri,J),M(ge),M(zt,J),M(lt.$$.fragment,J),M(pt.$$.fragment,J),M($e.$$.fragment,J),M(H.$$.fragment,J),M(ce.$$.fragment,J),M(tt.$$.fragment,J),M(je.$$.fragment,J),M(ut.$$.fragment,J),M(Pi,J),_t=!0)},o(J){j(fe,J),j(p),j(gt),j(oi,J),j(Ct,J),j(De),j(ri,J),j(ge),j(zt,J),j(lt.$$.fragment,J),j(pt.$$.fragment,J),j($e.$$.fragment,J),j(H.$$.fragment,J),j(ce.$$.fragment,J),j(tt.$$.fragment,J),j(je.$$.fragment,J),j(ut.$$.fragment,J),j(Pi,J),_t=!1},d(J){J&&X(e),fe&&fe.d(J),He[O].d(),Wt&&Wt.d(),gt&>.d(),oi&&oi.d(J),Ht&&Ht.d(),Ct&&Ct.d(J),De&&De.d(),ri&&ri.d(J),Sn[Se].d(),zt&&zt.d(J),Xe(lt),n[117](null),Xe(pt),Xe($e),Xe(H),Xe(ce),Xe(tt),Xe(je),Xe(ut),Pi&&Pi.d(J),xt=!1,St()}}}function Db(n,e){n.effects=n.effects?[...n.effects,e]:[e]}function f6(n,e,t){let i,r,s,l,o,a,c,h,O,p,g,m,y,$,_,W,R,A,C;$O(n,M7,Z=>t(91,A=Z)),$O(n,D7,Z=>t(53,C=Z));let{$$slots:E={},$$scope:D}=e,{showVersionSwitcher:z=!0}=e,{showSolverDropdown:F=!0}=e,{edgeMiniZinc:B=!1}=e,{autoClearOutput:q=!1}=e,{showTabs:N=!0}=e,{canEditTabs:re=!0}=e,{compilationEnabled:ae=!0}=e,{project:ye}=e,{enabledSolvers:Se=null}=e,{canEditSolverSettings:ge=!0}=e,{showShareButton:Ue=!0}=e,{showDownloadButton:Ie=!0}=e,{externalPlaygroundURL:ke=null}=e,{splitterDirection:We="vertical"}=e,{splitterSize:lt=75}=e,{canSwitchOrientation:Vt=!0}=e,{showClearOutput:Qt=!0}=e,{showAutoClearOutput:pt=!0}=e,{showOutputSectionToggles:qt=!0}=e,{showOutputRightControls:$e=!0}=e,{theme:oe="auto"}=e,{hideOutputOnStartup:H=!0}=e,{autoFocus:ue=!0}=e;const ce=en();let Ee=0,tt=[],ft,je,At={latest:{label:"Latest",detail:"stable"},edge:{label:"Edge",detail:"development"}};function ut(Z){const he=B?IW:qW;if(je!==he){t(18,Ee++,Ee);const be=ft;ft=new Promise(async(Pe,ze)=>{be&&await be,je&&je.shutdown(),je=he,je.shutdown(),await je.init();const[it]=/version \d+\.\d+\.\d+(?:, build .*)?$/m.exec(await je.version()),Ze=B?"edge":"latest";t(19,At={...At,[Ze]:{...At[Ze],detail:it}}),t(83,tt=await je.solvers()),await Bn(),t(18,Ee--,Ee),Pe()})}return ft}const Un=new Promise((Z,he)=>{Hc(()=>{ut(),Z()})});async function _t(Z){t(0,B=Z.minizincVersion==="edge"),await Un,t(20,fe=[]),Zs(Z.files,ue),t(21,He=Z.tab||0),await ut(),Z.solverId?t(22,Kt=$.findIndex(he=>he.id===Z.solverId)):t(22,Kt=$.findIndex(he=>he.extraInfo&&he.extraInfo.isDefault)||0),Z.solverConfig?gi.load(Z.solverConfig):gi.reset()}async function xt(Z){const he=fe.length;Zs(Z.files),Z.tab!==void 0&&Z.tab!==null&&Z.tab>=0&&zt(he+Z.tab),Z.solverId&&(await ut(),t(22,Kt=$.findIndex(be=>be.id===Z.solverId)))}function St(){return fe.length>0}let Be,fe=[],Fe=!1,He=0,gi,Wt=!1,gt=null,En=!1,oi=!1,Ht=null,gn=!1,Ct=[],De=null,mn=[],ri={},Kt=-1;async function Sn(Z,he){if(await ut(),Kt<0||Kt>=$.length){const be=$.findIndex(Pe=>Pe.extraInfo&&Pe.extraInfo.isDefault);be!==-1&&t(22,Kt=be)}}let er=!1;function Lr(){t(35,er=!er)}async function zt(Z,he=!0){for(Be&&He=0&&fe[Z].hidden;)Z--;Z===-1&&(Z=fe.findIndex(be=>!be.hidden)),t(21,He=Z),await Bn(),Be&&h&&(he&&Be.focus(),h.scrollTop!==void 0&&Be.getView().requestMeasure({read(be){be.scrollDOM.scrollTo(h.scrollLeft,h.scrollTop)}}))}function Ts(Z){let he=`Untitled${Z}`,be=2;for(;fe.find(Pe=>Pe.name===he);)he=`Untitled-${be++}${Z}`;t(20,fe=[...fe,{name:he,state:Ot.create({extensions:ec(Z,kr,R)})}]),zt(fe.length-1),t(28,Wt=!1)}function Zs(Z,he=!0){let be=[];for(const Pe of Z){const ze=Pe.name.endsWith(".mzc.mzn")?Pe.name.length-8:Pe.name.lastIndexOf("."),it=Pe.name.substring(0,ze).replaceAll(/[\/\\\.]/g,""),Ze=Pe.name.substring(ze);let mi=`${it}${Ze}`,Zt=2;for(;fe.find(oo=>oo.name===mi);)mi=`${it}-${Zt++}${Ze}`;const Jr=ec(Ze,kr,R,Pe.readOnly);be.push({...Pe,hidden:Pe.hidden||Ze===".mzc",name:mi,state:Ot.create({doc:Pe.contents,extensions:Jr,selection:{anchor:Pe.anchor||0}})})}t(20,fe=[...fe,...be]),zt(fe.length-1,he),t(28,Wt=!1)}function Hl(Z){const{index:he,name:be,suffix:Pe}=Z.detail;let ze=be,it=2;for(;fe.some(Ze=>Ze===ze+Pe);)ze=`${be}-${it++}`;h&&t(87,h.state=Be.getState(),h),t(20,fe=[...fe.slice(0,he),{...fe[he],name:be+Pe},...fe.slice(he+1)])}function jr(Z){const he=r===1&&!fe[Z].hidden;t(20,fe=[...fe.slice(0,Z),...fe.slice(Z+1),...he?[{name:"Untitled.mzn",state:Ot.create({extensions:ec(".mzn",kr,R)})}]:[]]),He>=fe.length?zt(fe.length-1):zt(He),t(29,gt=null)}function Pi(Z,he){h&&t(87,h.state=Be.getState(),h);const be={...fe[Z],...he};"readOnly"in he&&Db(be,he.readOnly?h9:O9),t(20,fe=[...fe.slice(0,Z),be,...fe.slice(Z+1)]),zt(He)}function J(Z,he){let be;Z0){await Bn();const he=Be.getView();he&&he.state===Z.state&&(he.dispatch({effects:Z.effects}),Z.effects=[])}}let tn=null;async function Br(Z){t(18,Ee++,Ee),t(87,h.state=Be.getState(),h);let he=O?h:null;if(!he){if(m.length===0)return t(18,Ee--,Ee),!1;if(m.length===1)he=fe.find(ze=>ze.name===m[0]);else try{const ze=await new Promise((it,Ze)=>{t(36,tn=it),t(31,oi=!0)});if(!ze)return t(18,Ee--,Ee),!1;he=fe.find(it=>it.name===ze.modelFile)}finally{t(31,oi=!1)}}const be=new je.Model,Pe=[he.name];{const ze=he.name.substring(0,he.name.length-4),it=fe.find(Ze=>Ze.name===`${ze}.mzc`||Ze.name===`${ze}.mzc.mzn`);it&&Pe.push(it.name)}he!==h&&Pe.push(h.name);for(const ze of fe)be.addFile(ze.name,ze.state.doc.toString(),Pe.indexOf(ze.name)!==-1);try{const{input:ze}=await be.interface({options:gi.getCompilationConfiguration(_.id)});if(Object.keys(ze).length>0){const it={};for(const Ze in ze)it[Ze]=ri[Ze];t(34,ri=it),p&&mn.indexOf(h.name)===-1&&(mn=[...mn,h.name]);try{const Ze=await new Promise((mi,Zt)=>{t(36,tn=mi),t(32,Ht=!0)});if(!Ze)return t(18,Ee--,Ee),!1;if(Ze.parameters){let mi="";for(const Zt in Ze.parameters)Ze.parameters[Zt].trim().length>0&&(mi+=`${Zt} = ${Ze.parameters[Zt]};
-`);be.addDznString(mi),t(34,ri=Ze.parameters)}else{for(const mi of Ze.dataFiles)Pe.indexOf(mi)===-1&&(be.addFile(mi),Pe.push(mi));mn=Ze.dataFiles}}finally{t(32,Ht=!1)}}}catch(ze){console.error(ze)}return t(18,Ee--,Ee),{model:be,fileList:Pe}}async function zn(){if(g){const ze=new je.Model;ze.addFile(h.name,h.state.doc.toString());const it=[h.name],Ze=gi.getSolvingConfiguration(_.id);await vr(ze,it,Ze);return}const Z=await Br();if(!Z)return;const{model:he,fileList:be}=Z,Pe=gi.getSolvingConfiguration(_.id);await vr(he,be,Pe)}async function vr(Z,he,be){t(84,gn=!0);const Pe=Date.now();q&&t(33,Ct=[]),t(33,Ct=[...Ct,{files:he,output:[]}]),t(85,De=Z.solve({options:be,jsonOutput:!1})),wr(),De.on("error",kt),De.on("warning",kt),De.on("solution",ze=>kt(ze,Date.now()-Pe)),De.on("status",ze=>kt(ze,Date.now()-Pe)),De.on("statistics",kt),De.on("trace",ze=>kt(ze,Date.now()-Pe)),De.on("statistics",kt),De.on("comment",kt),De.on("time",kt),De.on("checker",kt),De.on("stderr",kt);try{await De,kt({type:"exit",code:0,runTime:Date.now()-Pe})}catch(ze){kt({type:"exit",code:ze.code,runTime:Date.now()-Pe})}t(85,De=null)}async function tr(){t(84,gn=!0);const Z=await Br();if(!Z)return;wr();const{model:he,fileList:be}=Z,Pe=be[0],ze=Date.now();q&&t(33,Ct=[]),t(33,Ct=[...Ct,{files:be,isCompile:!0,output:[]}]),t(85,De=he.compile({options:gi.getCompilationConfiguration(_.id)})),De.on("error",kt),De.on("warning",kt),De.on("statistics",kt),De.on("trace",kt),De.on("statistics",kt),De.on("stderr",kt);try{const it=await De;t(20,fe=[...fe,{name:`${Pe.substring(0,Pe.indexOf("."))}.fzn`,state:Ot.create({extensions:ec(".fzn",kr,R),doc:it})}]),zt(fe.length-1),kt({type:"exit",code:0,runTime:Date.now()-ze})}catch(it){kt({type:"exit",code:it.code,runTime:Date.now()-ze})}t(85,De=null)}function Rs(){kt({type:"cancel"}),De.cancel()}let ir=null;function kt(Z,he){ir?ir.then(()=>{ir=Fr(Z,he)}):ir=Fr(Z,he),Ct[Ct.length-1].output.push(Z),t(33,Ct)}function wr(){bn&&bn.reset(),t(42,Gr=!1),t(43,Hr=!1)}async function Fr(Z,he){if(Z.type==="trace"&&Z.section.startsWith("mzn_vis_")){Gr||(t(42,Gr=!0),t(43,Hr=!0)),await Bn();const be=fe.find(ze=>ze.name===Z.message.url);let Pe=null;if(be)Pe=be.state.doc.toString();else try{Pe=await je.readStdlibFileContents(Z.message.url)}catch(ze){console.error(ze);return}if(Pe===null){console.error(`Failed to get visualisation file ${Z.message.url}`);return}bn.addVisualisation(Z.section,Pe,Z.message.userData);return}if(Gr){for(;!bn;)await Bn();switch(Z.type){case"solution":bn.addSolution(Z.sections.filter(be=>be.startsWith("mzn_vis_")).reduce((be,Pe)=>({...be,[Pe]:Z.output[Pe]}),{}),"time"in Z?Z.time:he);break;case"status":bn.status(Z.status,"time"in Z?Z.time:he);break;case"exit":bn.status("time"in Z?Z.time:he);break}}}function Kl(){return h&&t(87,h.state=Be.getState(),h),{files:fe.map(Z=>({name:Z.name,contents:Z.state.doc.toString(),...Z.hidden?{hidden:!0}:{},...Z.readOnly?{readOnly:!0}:{}})),tab:He,solverId:_.id,solverConfig:gi.save(),minizincVersion:B?"edge":"latest"}}let Jl=!1;async function Qa(){t(37,Jl=!0);try{const Z=(await bm(async()=>{const{default:Zt}=await import("./jszip.min-bUkKTG0Z.js").then(Jr=>Jr.j);return{default:Zt}},[])).default,he=(await bm(async()=>{const{default:Zt}=await import("./FileSaver.min-Cm7hTaEQ.js").then(Jr=>Jr.F);return{default:Zt}},[])).default,be=Kl(),Pe=fe.map(Zt=>Zt.name),ze=fe.filter(Zt=>!Zt.hidden).map(Zt=>Zt.name);let it=_.id;it==="org.minizinc.gecode_presolver"?it="org.gecode.gecode":it==="org.minizinc.chuffed"&&(it="org.chuffed.chuffed");const Ze=new Z;for(const Zt of be.files)Ze.file(Zt.name,Zt.contents);Ze.file("Project.mzp",JSON.stringify({version:105,projectFiles:Pe,openFiles:ze,openTab:be.tab,selectedBuiltinConfigId:it,selectedBuiltinConfigVersion:"default"}));const mi=await Ze.generateAsync({type:"blob"});he.saveAs(mi,"Project.zip")}catch(Z){console.error(Z)}finally{t(37,Jl=!1)}}let Qr,_r=null,eo=!1;function Js(Z){const he=Kl(),be=new URL(Z);return be.hash=`#project=${encodeURIComponent(JSON.stringify(he))}`,t(40,eo=!1),be.toString()}function fu(){Qr.select(),Qr.setSelectionRange(0,_r.length),navigator.clipboard.writeText(_r),t(40,eo=!0)}function _a(){ke&&window.open(Js(ke),"_blank").focus()}let ka=null;async function kr(Z){const he=Z.view;if(!(Ee!==0||!_||!h||!h.name.endsWith(".mzn")))try{const be=he.state.doc.toString();if(be===ka)return;ka=be;const Pe=new je.Model;for(const Ze of fe)Pe.addFile(Ze.name,Ze.state.doc.toString(),!1);const ze=Pe.addString(be),it=await Pe.check({options:gi.getCompilationConfiguration(_.id)});if(he.state.doc.toString()!==be)return;z7(be,it.filter(Ze=>Ze.location.filename===ze),he)}catch(be){console.error(be)}}function Pa(Z){const he=fe.findIndex(be=>be.name===Z.filename);if(he!==-1){zt(he);const be=fe[he].state.doc.toString(),Pe=$d(Z.firstLine,Z.firstColumn,be);Be.focus(),Be.setCursor(Pe)}}function el(){We==="horizontal"?t(2,We="vertical"):t(2,We="horizontal")}function cu(Z){t(0,B=Z.detail.item===At.edge)}function uu(Z){h&&t(87,h.state=Be.getState(),h),fe.forEach(he=>Db(he,Z?p9:d9)),we(h)}let bn,Gr=!1,Hr=!1;function to(Z){De&&Rs();const he=[Z.modelFile],be=Z.modelFile.substring(0,Z.modelFile.length-4),Pe=fe.find(it=>it.name===`${be}.mzc`||it.name===`${be}.mzc.mzn`);if(Pe&&he.push(Pe.name),Z.dataFiles)for(const it of Z.dataFiles)he.push(it);const ze=new je.Model;for(const it of fe)ze.addFile(it.name,it.state.doc.toString(),he.indexOf(it.name)!==-1);vr(ze,he,Z.options||gi.getSolvingConfiguration(_.id))}function hu(){return Kt===($.findIndex(Z=>Z.extraInfo&&Z.extraInfo.isDefault)||0)}function Ou(){return gi.isDefault()}function du(){Kt=yO(this),t(22,Kt)}function pu(){Kt=yO(this),t(22,Kt)}const xa=()=>{t(26,Fe=!Fe),t(35,er=!1)},Wa=()=>{tr(),t(26,Fe=!1)},Ca=()=>{Lr(),t(26,Fe=!1)},io=()=>{t(0,B=!B),t(26,Fe=!1)},gu=()=>{t(39,_r=Js(window.location.href)),t(26,Fe=!1)},Ta=()=>{_a(),t(26,Fe=!1)},tl=()=>t(39,_r=Js(window.location.href)),Za=()=>Qa(),mu=()=>{t(43,Hr=!1)},Ra=()=>{t(43,Hr=!0)};function Xa(Z){Et[Z?"unshift":"push"](()=>{bn=Z,t(41,bn)})}const no=Z=>to(Z.detail);function Su(Z){q=Z,t(1,q)}const Aa=()=>t(33,Ct=[]),ro=Z=>Pa(Z.detail.location),so=Z=>zt(Z.detail.index),Kr=Z=>J(Z.detail.src,Z.detail.dest),Ya=()=>t(28,Wt=!0),Ua=Z=>t(29,gt=Z.detail.index),bu=()=>t(30,En=!0);function Ea(Z){Et[Z?"unshift":"push"](()=>{Be=Z,t(25,Be)})}function za(Z){lt=Z,t(3,lt)}function Ma(Z){Et[Z?"unshift":"push"](()=>{gi=Z,t(27,gi)})}const Da=()=>t(35,er=!1),$u=()=>t(30,En=!1),yu=Z=>t(29,gt=Z.detail.index),vu=Z=>Pi(Z.detail.index,Z.detail.options),Va=()=>t(28,Wt=!0),wu=()=>t(28,Wt=!1),Qu=Z=>Ts(Z.detail.type),_u=Z=>xt(Z.detail),ku=()=>jr(gt),lo=()=>t(29,gt=null),Pu=()=>t(29,gt=null),xu=Z=>tn(Z.detail),Wu=()=>tn(!1),Cu=Z=>tn(Z.detail),Tu=()=>tn(!1),Tt=()=>t(39,_r=null);function Pt(Z){Et[Z?"unshift":"push"](()=>{Qr=Z,t(38,Qr)})}const Zu=()=>Qr.select(),Ru=()=>t(39,_r=null);return n.$$set=Z=>{"showVersionSwitcher"in Z&&t(4,z=Z.showVersionSwitcher),"showSolverDropdown"in Z&&t(5,F=Z.showSolverDropdown),"edgeMiniZinc"in Z&&t(0,B=Z.edgeMiniZinc),"autoClearOutput"in Z&&t(1,q=Z.autoClearOutput),"showTabs"in Z&&t(6,N=Z.showTabs),"canEditTabs"in Z&&t(7,re=Z.canEditTabs),"compilationEnabled"in Z&&t(8,ae=Z.compilationEnabled),"project"in Z&&t(73,ye=Z.project),"enabledSolvers"in Z&&t(74,Se=Z.enabledSolvers),"canEditSolverSettings"in Z&&t(9,ge=Z.canEditSolverSettings),"showShareButton"in Z&&t(10,Ue=Z.showShareButton),"showDownloadButton"in Z&&t(11,Ie=Z.showDownloadButton),"externalPlaygroundURL"in Z&&t(12,ke=Z.externalPlaygroundURL),"splitterDirection"in Z&&t(2,We=Z.splitterDirection),"splitterSize"in Z&&t(3,lt=Z.splitterSize),"canSwitchOrientation"in Z&&t(13,Vt=Z.canSwitchOrientation),"showClearOutput"in Z&&t(14,Qt=Z.showClearOutput),"showAutoClearOutput"in Z&&t(15,pt=Z.showAutoClearOutput),"showOutputSectionToggles"in Z&&t(16,qt=Z.showOutputSectionToggles),"showOutputRightControls"in Z&&t(17,$e=Z.showOutputRightControls),"theme"in Z&&t(75,oe=Z.theme),"hideOutputOnStartup"in Z&&t(76,H=Z.hideOutputOnStartup),"autoFocus"in Z&&t(77,ue=Z.autoFocus),"$$scope"in Z&&t(137,D=Z.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&524288&&t(52,i=[At.latest,At.edge]),n.$$.dirty[0]&1&&ut(),n.$$.dirty[2]&2048&&_t(ye),n.$$.dirty[0]&1048576&&(r=fe.filter(Z=>!Z.hidden).length),n.$$.dirty[0]&3145728&&t(87,h=HeSe.indexOf(Z.id)!==-1):tt),n.$$.dirty[0]&12582912&&t(86,_=Kt>=0&&Kt<$.length?$[Kt]:null),n.$$.dirty[2]&33554432&&t(90,O=h&&h.name.endsWith(".mzn")&&!h.name.endsWith(".mzc.mzn")),n.$$.dirty[2]&33554432&&t(89,p=h&&(h.name.endsWith(".dzn")||h.name.endsWith(".json"))),n.$$.dirty[2]&33554432&&t(88,g=h&&h.name.endsWith(".fzn")),n.$$.dirty[0]&262144|n.$$.dirty[2]&486539264&&t(50,l=Ee===0&&_&&(O||p||g)),n.$$.dirty[0]&262144|n.$$.dirty[2]&419430400&&t(49,o=Ee===0&&_&&(O||p)),n.$$.dirty[2]&4210688&&t(48,a=!H||gn?"all":"a"),n.$$.dirty[2]&8388608&&t(47,c=De!==null),n.$$.dirty[0]&1048576&&t(44,m=fe.filter(Z=>Z.name.endsWith(".mzn")&&!Z.name.endsWith(".mzc.mzn")).map(Z=>Z.name)),n.$$.dirty[0]&1048576&&t(46,y=fe.filter(Z=>Z.name.endsWith(".dzn")||Z.name.endsWith(".json")).map(Z=>Z.name)),n.$$.dirty[0]&12582912&&Sn(),n.$$.dirty[2]&16777216&&t(45,W=_?_.stdFlags:[]),n.$$.dirty[2]&33554432&&we(h),n.$$.dirty[2]&536879104&&t(24,R={dark:!0,light:!1,auto:A}[oe]),n.$$.dirty[0]&16777216&&uu(R),n.$$.dirty[0]&8388608&&ce("solversChanged",{solvers:$})},[B,q,We,lt,z,F,N,re,ae,ge,Ue,Ie,ke,Vt,Qt,pt,qt,$e,Ee,At,fe,He,Kt,$,R,Be,Fe,gi,Wt,gt,En,oi,Ht,Ct,ri,er,tn,Jl,Qr,_r,eo,bn,Gr,Hr,m,W,y,c,a,o,l,s,i,C,xt,Lr,zt,Ts,Hl,jr,Pi,J,zn,tr,Rs,Qa,Js,fu,_a,Pa,el,cu,to,ye,Se,oe,H,ue,_t,St,Kl,hu,Ou,tt,gn,De,_,h,g,p,O,A,E,du,pu,xa,Wa,Ca,io,gu,Ta,tl,Za,mu,Ra,Xa,no,Su,Aa,ro,so,Kr,Ya,Ua,bu,Ea,za,Ma,Da,$u,yu,vu,Va,wu,Qu,_u,ku,lo,Pu,xu,Wu,Cu,Tu,Tt,Pt,Zu,Ru,D]}class c6 extends $i{constructor(e){super(),bi(this,e,f6,a6,Oi,{showVersionSwitcher:4,showSolverDropdown:5,edgeMiniZinc:0,autoClearOutput:1,showTabs:6,canEditTabs:7,compilationEnabled:8,project:73,enabledSolvers:74,canEditSolverSettings:9,showShareButton:10,showDownloadButton:11,externalPlaygroundURL:12,splitterDirection:2,splitterSize:3,canSwitchOrientation:13,showClearOutput:14,showAutoClearOutput:15,showOutputSectionToggles:16,showOutputRightControls:17,theme:75,hideOutputOnStartup:76,autoFocus:77,loadProject:78,hasFiles:79,getProject:80,isDefaultSolver:81,isDefaultSolverConfig:82},null,[-1,-1,-1,-1,-1,-1])}get loadProject(){return this.$$.ctx[78]}get hasFiles(){return this.$$.ctx[79]}get getProject(){return this.$$.ctx[80]}get isDefaultSolver(){return this.$$.ctx[81]}get isDefaultSolverConfig(){return this.$$.ctx[82]}}function Vb(n,e,t){const i=n.slice();return i[10]=e[t],i[12]=t,i}function qb(n){let e;return{c(){e=k("p"),e.textContent="No recent projects.",v(e,"class","has-text-centered")},m(t,i){Y(t,e,i)},p:Qe,d(t){t&&X(e)}}}function Ib(n){let e,t,i=Nb(n[10])+"",r,s,l,o,a=n[10].solver+"",c,h,O,p=new Date(n[10].timestamp).toLocaleString()+"",g,m,y,$;function _(){return n[7](n[12])}return{c(){e=k("div"),t=k("div"),r=pe(i),s=L(),l=k("div"),o=k("div"),c=pe(a),h=L(),O=k("div"),g=pe(p),m=L(),v(l,"class","info is-size-7 svelte-wl1zgv"),v(e,"class","item svelte-wl1zgv"),ne(e,"has-background-primary",n[2]===n[12]),ne(e,"has-text-white",n[2]===n[12])},m(W,R){Y(W,e,R),Q(e,t),Q(t,r),Q(e,s),Q(e,l),Q(l,o),Q(o,c),Q(l,h),Q(l,O),Q(O,g),Q(e,m),y||($=[le(e,"click",_),le(e,"dblclick",n[5])],y=!0)},p(W,R){n=W,R&2&&i!==(i=Nb(n[10])+"")&&Le(r,i),R&2&&a!==(a=n[10].solver+"")&&Le(c,a),R&2&&p!==(p=new Date(n[10].timestamp).toLocaleString()+"")&&Le(g,p),R&4&&ne(e,"has-background-primary",n[2]===n[12]),R&4&&ne(e,"has-text-white",n[2]===n[12])},d(W){W&&X(e),y=!1,Ft($)}}}function u6(n){let e,t=st(n[1]),i=[];for(let s=0;si.name);return n.files.length>3&&t.push(`+${n.files.length-3} more…`),t.join(", ")}return n.files.map(t=>t.name).join(", ")}function d6(n,e,t){let i;const r=en();let{active:s=!1}=e,{projects:l=[]}=e,o=-1;function a(g){g||t(2,o=-1)}function c(){i&&r("accept",{project:l[o]})}const h=()=>r("cancel"),O=g=>t(2,o=g),p=()=>r("cancel");return n.$$set=g=>{"active"in g&&t(0,s=g.active),"projects"in g&&t(1,l=g.projects)},n.$$.update=()=>{n.$$.dirty&6&&t(3,i=o>=0&&o{const t=localStorage.getItem(yd);if(t&&t.length>0){ms=!0;try{e(i=>({...i,...JSON.parse(t)}))}catch(i){console.error(i)}ms=!1}window.addEventListener("storage",i=>{if(i.storageArea===localStorage&&i.key===yd&&i.newValue.length>0){ms=!0;try{e(r=>({...r,...JSON.parse(i.newValue)}))}catch(r){console.error(r)}ms=!1}})});Ls.subscribe(n=>{ms||(Object.keys(n.sessions).length>Lb&&(ms=!0,Ls.update(e=>{const t=Object.keys(e.sessions).map(i=>({key:i,value:e.sessions[i]}));return t.sort((i,r)=>r.value.timestamp-i.value.timestamp),ms=!0,{...e,sessions:t.slice(0,Lb).reduce((i,r)=>({...i,[r.key]:r.value}),{})}}),ms=!1),localStorage.setItem(yd,JSON.stringify(n)))});const{document:g6,window:jb}=FW;function m6(n){let e,t;return e=new p6({props:{projects:n[5],active:n[4]}}),e.$on("cancel",n[12]),e.$on("accept",n[13]),{c(){Ae(e.$$.fragment)},m(i,r){Re(e,i,r),t=!0},p(i,r){const s={};r&32&&(s.projects=i[5]),r&16&&(s.active=i[4]),e.$set(s)},i(i){t||(M(e.$$.fragment,i),t=!0)},o(i){j(e.$$.fragment,i),t=!1},d(i){Xe(e,i)}}}function S6(n){let e,t,i,r,s,l,o,a,c;return l=new wt({props:{icon:Vy}}),{c(){e=k("div"),t=k("div"),i=k("div"),r=k("button"),s=k("span"),Ae(l.$$.fragment),v(s,"class","icon"),v(r,"class","button"),v(r,"title","Open recent project"),v(i,"class","control"),v(t,"class","field"),v(e,"class","navbar-item")},m(h,O){Y(h,e,O),Q(e,t),Q(t,i),Q(i,r),Q(r,s),Re(l,s,null),o=!0,a||(c=le(r,"click",n[11]),a=!0)},p:Qe,i(h){o||(M(l.$$.fragment,h),o=!0)},o(h){j(l.$$.fragment,h),o=!1},d(h){h&&X(e),Xe(l),a=!1,c()}}}function b6(n){let e,t,i,r,s,l,o,a;return i=new wt({props:{icon:Vy}}),{c(){e=k("a"),t=k("span"),Ae(i.$$.fragment),r=L(),s=k("span"),s.textContent="Open recent project",v(t,"class","icon"),v(e,"class","navbar-item mobile-menu-item"),v(e,"href","javascript:void(0);")},m(c,h){Y(c,e,h),Q(e,t),Re(i,t,null),Q(e,r),Q(e,s),l=!0,o||(a=le(e,"click",n[10]),o=!0)},p:Qe,i(c){l||(M(i.$$.fragment,c),l=!0)},o(c){j(i.$$.fragment,c),l=!1},d(c){c&&X(e),Xe(i),o=!1,a()}}}function $6(n){let e,t,i,r;const s=[b6,S6],l=[];function o(a,c){return a[25]?0:1}return e=o(n),t=l[e]=s[e](n),{c(){t.c(),i=Gt()},m(a,c){l[e].m(a,c),Y(a,i,c),r=!0},p(a,c){let h=e;e=o(a),e===h?l[e].p(a,c):(Je(),j(l[h],1,1,()=>{l[h]=null}),et(),t=l[e],t?t.p(a,c):(t=l[e]=s[e](a),t.c()),M(t,1),t.m(i.parentNode,i))},i(a){r||(M(t),r=!0)},o(a){j(t),r=!1},d(a){a&&X(i),l[e].d(a)}}}function y6(n){let e,t,i,r,s,l,o,a,c;function h(m){n[15](m)}function O(m){n[16](m)}function p(m){n[17](m)}let g={project:n[3],$$slots:{"navbar-before-share-buttons":[$6,({isMobile:m})=>({25:m}),({isMobile:m})=>m?33554432:0],default:[m6]},$$scope:{ctx:n}};return n[1].autoClearOutput!==void 0&&(g.autoClearOutput=n[1].autoClearOutput),n[1].splitterDirection!==void 0&&(g.splitterDirection=n[1].splitterDirection),n[1].splitterSize!==void 0&&(g.splitterSize=n[1].splitterSize),i=new c6({props:g}),n[14](i),Et.push(()=>qo(i,"autoClearOutput",h)),Et.push(()=>qo(i,"splitterDirection",O)),Et.push(()=>qo(i,"splitterSize",p)),i.$on("solversChanged",n[18]),{c(){e=L(),t=k("div"),Ae(i.$$.fragment),v(t,"class","playground-app svelte-tuc1wl")},m(m,y){Y(m,e,y),Y(m,t,y),Re(i,t,null),o=!0,a||(c=[le(jb,"beforeunload",n[7]),le(jb,"hashchange",n[6]),le(g6,"visibilitychange",n[9])],a=!0)},p(m,[y]){const $={};y&8&&($.project=m[3]),y&100663346&&($.$$scope={dirty:y,ctx:m}),!r&&y&2&&(r=!0,$.autoClearOutput=m[1].autoClearOutput,Vo(()=>r=!1)),!s&&y&2&&(s=!0,$.splitterDirection=m[1].splitterDirection,Vo(()=>s=!1)),!l&&y&2&&(l=!0,$.splitterSize=m[1].splitterSize,Vo(()=>l=!1)),i.$set($)},i(m){o||(M(i.$$.fragment,m),o=!0)},o(m){j(i.$$.fragment,m),o=!1},d(m){m&&(X(e),X(t)),n[14](null),Xe(i),a=!1,Ft(c)}}}const bO=`% Use this editor as a MiniZinc scratch book
+`);be.addDznString(mi),t(34,ri=Ze.parameters)}else{for(const mi of Ze.dataFiles)Pe.indexOf(mi)===-1&&(be.addFile(mi),Pe.push(mi));mn=Ze.dataFiles}}finally{t(32,Ht=!1)}}}catch(ze){console.error(ze)}return t(18,Ee--,Ee),{model:be,fileList:Pe}}async function zn(){if(g){const ze=new je.Model;ze.addFile(h.name,h.state.doc.toString());const it=[h.name],Ze=gi.getSolvingConfiguration(_.id);await vr(ze,it,Ze);return}const Z=await Br();if(!Z)return;const{model:he,fileList:be}=Z,Pe=gi.getSolvingConfiguration(_.id);await vr(he,be,Pe)}async function vr(Z,he,be){t(84,gn=!0);const Pe=Date.now();q&&t(33,Ct=[]),t(33,Ct=[...Ct,{files:he,output:[]}]),t(85,De=Z.solve({options:be,jsonOutput:!1})),wr(),De.on("error",kt),De.on("warning",kt),De.on("solution",ze=>kt(ze,Date.now()-Pe)),De.on("status",ze=>kt(ze,Date.now()-Pe)),De.on("statistics",kt),De.on("trace",ze=>kt(ze,Date.now()-Pe)),De.on("statistics",kt),De.on("comment",kt),De.on("time",kt),De.on("checker",kt),De.on("stderr",kt);try{await De,kt({type:"exit",code:0,runTime:Date.now()-Pe})}catch(ze){kt({type:"exit",code:ze.code,runTime:Date.now()-Pe})}t(85,De=null)}async function tr(){t(84,gn=!0);const Z=await Br();if(!Z)return;wr();const{model:he,fileList:be}=Z,Pe=be[0],ze=Date.now();q&&t(33,Ct=[]),t(33,Ct=[...Ct,{files:be,isCompile:!0,output:[]}]),t(85,De=he.compile({options:gi.getCompilationConfiguration(_.id)})),De.on("error",kt),De.on("warning",kt),De.on("statistics",kt),De.on("trace",kt),De.on("statistics",kt),De.on("stderr",kt);try{const it=await De;t(20,fe=[...fe,{name:`${Pe.substring(0,Pe.indexOf("."))}.fzn`,state:Ot.create({extensions:ec(".fzn",kr,R),doc:it})}]),zt(fe.length-1),kt({type:"exit",code:0,runTime:Date.now()-ze})}catch(it){kt({type:"exit",code:it.code,runTime:Date.now()-ze})}t(85,De=null)}function Rs(){kt({type:"cancel"}),De.cancel()}let ir=null;function kt(Z,he){ir?ir.then(()=>{ir=Fr(Z,he)}):ir=Fr(Z,he),Ct[Ct.length-1].output.push(Z),t(33,Ct)}function wr(){bn&&bn.reset(),t(42,Gr=!1),t(43,Hr=!1)}async function Fr(Z,he){if(Z.type==="trace"&&Z.section.startsWith("mzn_vis_")){Gr||(t(42,Gr=!0),t(43,Hr=!0)),await Bn();const be=fe.find(ze=>ze.name===Z.message.url);let Pe=null;if(be)Pe=be.state.doc.toString();else try{Pe=await je.readStdlibFileContents(Z.message.url)}catch(ze){console.error(ze);return}if(Pe===null){console.error(`Failed to get visualisation file ${Z.message.url}`);return}bn.addVisualisation(Z.section,Pe,Z.message.userData);return}if(Gr){for(;!bn;)await Bn();switch(Z.type){case"solution":bn.addSolution(Z.sections.filter(be=>be.startsWith("mzn_vis_")).reduce((be,Pe)=>({...be,[Pe]:Z.output[Pe]}),{}),"time"in Z?Z.time:he);break;case"status":bn.status(Z.status,"time"in Z?Z.time:he);break;case"exit":bn.status("time"in Z?Z.time:he);break}}}function Kl(){return h&&t(87,h.state=Be.getState(),h),{files:fe.map(Z=>({name:Z.name,contents:Z.state.doc.toString(),...Z.hidden?{hidden:!0}:{},...Z.readOnly?{readOnly:!0}:{}})),tab:He,solverId:_.id,solverConfig:gi.save(),minizincVersion:B?"edge":"latest"}}let Jl=!1;async function Qa(){t(37,Jl=!0);try{const Z=(await bm(async()=>{const{default:Zt}=await import("./jszip.min-JQuTIydQ.js").then(Jr=>Jr.j);return{default:Zt}},[])).default,he=(await bm(async()=>{const{default:Zt}=await import("./FileSaver.min-Rtud2Dhd.js").then(Jr=>Jr.F);return{default:Zt}},[])).default,be=Kl(),Pe=fe.map(Zt=>Zt.name),ze=fe.filter(Zt=>!Zt.hidden).map(Zt=>Zt.name);let it=_.id;it==="org.minizinc.gecode_presolver"?it="org.gecode.gecode":it==="org.minizinc.chuffed"&&(it="org.chuffed.chuffed");const Ze=new Z;for(const Zt of be.files)Ze.file(Zt.name,Zt.contents);Ze.file("Project.mzp",JSON.stringify({version:105,projectFiles:Pe,openFiles:ze,openTab:be.tab,selectedBuiltinConfigId:it,selectedBuiltinConfigVersion:"default"}));const mi=await Ze.generateAsync({type:"blob"});he.saveAs(mi,"Project.zip")}catch(Z){console.error(Z)}finally{t(37,Jl=!1)}}let Qr,_r=null,eo=!1;function Js(Z){const he=Kl(),be=new URL(Z);return be.hash=`#project=${encodeURIComponent(JSON.stringify(he))}`,t(40,eo=!1),be.toString()}function fu(){Qr.select(),Qr.setSelectionRange(0,_r.length),navigator.clipboard.writeText(_r),t(40,eo=!0)}function _a(){ke&&window.open(Js(ke),"_blank").focus()}let ka=null;async function kr(Z){const he=Z.view;if(!(Ee!==0||!_||!h||!h.name.endsWith(".mzn")))try{const be=he.state.doc.toString();if(be===ka)return;ka=be;const Pe=new je.Model;for(const Ze of fe)Pe.addFile(Ze.name,Ze.state.doc.toString(),!1);const ze=Pe.addString(be),it=await Pe.check({options:gi.getCompilationConfiguration(_.id)});if(he.state.doc.toString()!==be)return;z7(be,it.filter(Ze=>Ze.location.filename===ze),he)}catch(be){console.error(be)}}function Pa(Z){const he=fe.findIndex(be=>be.name===Z.filename);if(he!==-1){zt(he);const be=fe[he].state.doc.toString(),Pe=$d(Z.firstLine,Z.firstColumn,be);Be.focus(),Be.setCursor(Pe)}}function el(){We==="horizontal"?t(2,We="vertical"):t(2,We="horizontal")}function cu(Z){t(0,B=Z.detail.item===At.edge)}function uu(Z){h&&t(87,h.state=Be.getState(),h),fe.forEach(he=>Db(he,Z?p9:d9)),we(h)}let bn,Gr=!1,Hr=!1;function to(Z){De&&Rs();const he=[Z.modelFile],be=Z.modelFile.substring(0,Z.modelFile.length-4),Pe=fe.find(it=>it.name===`${be}.mzc`||it.name===`${be}.mzc.mzn`);if(Pe&&he.push(Pe.name),Z.dataFiles)for(const it of Z.dataFiles)he.push(it);const ze=new je.Model;for(const it of fe)ze.addFile(it.name,it.state.doc.toString(),he.indexOf(it.name)!==-1);vr(ze,he,Z.options||gi.getSolvingConfiguration(_.id))}function hu(){return Kt===($.findIndex(Z=>Z.extraInfo&&Z.extraInfo.isDefault)||0)}function Ou(){return gi.isDefault()}function du(){Kt=yO(this),t(22,Kt)}function pu(){Kt=yO(this),t(22,Kt)}const xa=()=>{t(26,Fe=!Fe),t(35,er=!1)},Wa=()=>{tr(),t(26,Fe=!1)},Ca=()=>{Lr(),t(26,Fe=!1)},io=()=>{t(0,B=!B),t(26,Fe=!1)},gu=()=>{t(39,_r=Js(window.location.href)),t(26,Fe=!1)},Ta=()=>{_a(),t(26,Fe=!1)},tl=()=>t(39,_r=Js(window.location.href)),Za=()=>Qa(),mu=()=>{t(43,Hr=!1)},Ra=()=>{t(43,Hr=!0)};function Xa(Z){Et[Z?"unshift":"push"](()=>{bn=Z,t(41,bn)})}const no=Z=>to(Z.detail);function Su(Z){q=Z,t(1,q)}const Aa=()=>t(33,Ct=[]),ro=Z=>Pa(Z.detail.location),so=Z=>zt(Z.detail.index),Kr=Z=>J(Z.detail.src,Z.detail.dest),Ya=()=>t(28,Wt=!0),Ua=Z=>t(29,gt=Z.detail.index),bu=()=>t(30,En=!0);function Ea(Z){Et[Z?"unshift":"push"](()=>{Be=Z,t(25,Be)})}function za(Z){lt=Z,t(3,lt)}function Ma(Z){Et[Z?"unshift":"push"](()=>{gi=Z,t(27,gi)})}const Da=()=>t(35,er=!1),$u=()=>t(30,En=!1),yu=Z=>t(29,gt=Z.detail.index),vu=Z=>Pi(Z.detail.index,Z.detail.options),Va=()=>t(28,Wt=!0),wu=()=>t(28,Wt=!1),Qu=Z=>Ts(Z.detail.type),_u=Z=>xt(Z.detail),ku=()=>jr(gt),lo=()=>t(29,gt=null),Pu=()=>t(29,gt=null),xu=Z=>tn(Z.detail),Wu=()=>tn(!1),Cu=Z=>tn(Z.detail),Tu=()=>tn(!1),Tt=()=>t(39,_r=null);function Pt(Z){Et[Z?"unshift":"push"](()=>{Qr=Z,t(38,Qr)})}const Zu=()=>Qr.select(),Ru=()=>t(39,_r=null);return n.$$set=Z=>{"showVersionSwitcher"in Z&&t(4,z=Z.showVersionSwitcher),"showSolverDropdown"in Z&&t(5,F=Z.showSolverDropdown),"edgeMiniZinc"in Z&&t(0,B=Z.edgeMiniZinc),"autoClearOutput"in Z&&t(1,q=Z.autoClearOutput),"showTabs"in Z&&t(6,N=Z.showTabs),"canEditTabs"in Z&&t(7,re=Z.canEditTabs),"compilationEnabled"in Z&&t(8,ae=Z.compilationEnabled),"project"in Z&&t(73,ye=Z.project),"enabledSolvers"in Z&&t(74,Se=Z.enabledSolvers),"canEditSolverSettings"in Z&&t(9,ge=Z.canEditSolverSettings),"showShareButton"in Z&&t(10,Ue=Z.showShareButton),"showDownloadButton"in Z&&t(11,Ie=Z.showDownloadButton),"externalPlaygroundURL"in Z&&t(12,ke=Z.externalPlaygroundURL),"splitterDirection"in Z&&t(2,We=Z.splitterDirection),"splitterSize"in Z&&t(3,lt=Z.splitterSize),"canSwitchOrientation"in Z&&t(13,Vt=Z.canSwitchOrientation),"showClearOutput"in Z&&t(14,Qt=Z.showClearOutput),"showAutoClearOutput"in Z&&t(15,pt=Z.showAutoClearOutput),"showOutputSectionToggles"in Z&&t(16,qt=Z.showOutputSectionToggles),"showOutputRightControls"in Z&&t(17,$e=Z.showOutputRightControls),"theme"in Z&&t(75,oe=Z.theme),"hideOutputOnStartup"in Z&&t(76,H=Z.hideOutputOnStartup),"autoFocus"in Z&&t(77,ue=Z.autoFocus),"$$scope"in Z&&t(137,D=Z.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&524288&&t(52,i=[At.latest,At.edge]),n.$$.dirty[0]&1&&ut(),n.$$.dirty[2]&2048&&_t(ye),n.$$.dirty[0]&1048576&&(r=fe.filter(Z=>!Z.hidden).length),n.$$.dirty[0]&3145728&&t(87,h=HeSe.indexOf(Z.id)!==-1):tt),n.$$.dirty[0]&12582912&&t(86,_=Kt>=0&&Kt<$.length?$[Kt]:null),n.$$.dirty[2]&33554432&&t(90,O=h&&h.name.endsWith(".mzn")&&!h.name.endsWith(".mzc.mzn")),n.$$.dirty[2]&33554432&&t(89,p=h&&(h.name.endsWith(".dzn")||h.name.endsWith(".json"))),n.$$.dirty[2]&33554432&&t(88,g=h&&h.name.endsWith(".fzn")),n.$$.dirty[0]&262144|n.$$.dirty[2]&486539264&&t(50,l=Ee===0&&_&&(O||p||g)),n.$$.dirty[0]&262144|n.$$.dirty[2]&419430400&&t(49,o=Ee===0&&_&&(O||p)),n.$$.dirty[2]&4210688&&t(48,a=!H||gn?"all":"a"),n.$$.dirty[2]&8388608&&t(47,c=De!==null),n.$$.dirty[0]&1048576&&t(44,m=fe.filter(Z=>Z.name.endsWith(".mzn")&&!Z.name.endsWith(".mzc.mzn")).map(Z=>Z.name)),n.$$.dirty[0]&1048576&&t(46,y=fe.filter(Z=>Z.name.endsWith(".dzn")||Z.name.endsWith(".json")).map(Z=>Z.name)),n.$$.dirty[0]&12582912&&Sn(),n.$$.dirty[2]&16777216&&t(45,W=_?_.stdFlags:[]),n.$$.dirty[2]&33554432&&we(h),n.$$.dirty[2]&536879104&&t(24,R={dark:!0,light:!1,auto:A}[oe]),n.$$.dirty[0]&16777216&&uu(R),n.$$.dirty[0]&8388608&&ce("solversChanged",{solvers:$})},[B,q,We,lt,z,F,N,re,ae,ge,Ue,Ie,ke,Vt,Qt,pt,qt,$e,Ee,At,fe,He,Kt,$,R,Be,Fe,gi,Wt,gt,En,oi,Ht,Ct,ri,er,tn,Jl,Qr,_r,eo,bn,Gr,Hr,m,W,y,c,a,o,l,s,i,C,xt,Lr,zt,Ts,Hl,jr,Pi,J,zn,tr,Rs,Qa,Js,fu,_a,Pa,el,cu,to,ye,Se,oe,H,ue,_t,St,Kl,hu,Ou,tt,gn,De,_,h,g,p,O,A,E,du,pu,xa,Wa,Ca,io,gu,Ta,tl,Za,mu,Ra,Xa,no,Su,Aa,ro,so,Kr,Ya,Ua,bu,Ea,za,Ma,Da,$u,yu,vu,Va,wu,Qu,_u,ku,lo,Pu,xu,Wu,Cu,Tu,Tt,Pt,Zu,Ru,D]}class c6 extends $i{constructor(e){super(),bi(this,e,f6,a6,Oi,{showVersionSwitcher:4,showSolverDropdown:5,edgeMiniZinc:0,autoClearOutput:1,showTabs:6,canEditTabs:7,compilationEnabled:8,project:73,enabledSolvers:74,canEditSolverSettings:9,showShareButton:10,showDownloadButton:11,externalPlaygroundURL:12,splitterDirection:2,splitterSize:3,canSwitchOrientation:13,showClearOutput:14,showAutoClearOutput:15,showOutputSectionToggles:16,showOutputRightControls:17,theme:75,hideOutputOnStartup:76,autoFocus:77,loadProject:78,hasFiles:79,getProject:80,isDefaultSolver:81,isDefaultSolverConfig:82},null,[-1,-1,-1,-1,-1,-1])}get loadProject(){return this.$$.ctx[78]}get hasFiles(){return this.$$.ctx[79]}get getProject(){return this.$$.ctx[80]}get isDefaultSolver(){return this.$$.ctx[81]}get isDefaultSolverConfig(){return this.$$.ctx[82]}}function Vb(n,e,t){const i=n.slice();return i[10]=e[t],i[12]=t,i}function qb(n){let e;return{c(){e=k("p"),e.textContent="No recent projects.",v(e,"class","has-text-centered")},m(t,i){Y(t,e,i)},p:Qe,d(t){t&&X(e)}}}function Ib(n){let e,t,i=Nb(n[10])+"",r,s,l,o,a=n[10].solver+"",c,h,O,p=new Date(n[10].timestamp).toLocaleString()+"",g,m,y,$;function _(){return n[7](n[12])}return{c(){e=k("div"),t=k("div"),r=pe(i),s=L(),l=k("div"),o=k("div"),c=pe(a),h=L(),O=k("div"),g=pe(p),m=L(),v(l,"class","info is-size-7 svelte-wl1zgv"),v(e,"class","item svelte-wl1zgv"),ne(e,"has-background-primary",n[2]===n[12]),ne(e,"has-text-white",n[2]===n[12])},m(W,R){Y(W,e,R),Q(e,t),Q(t,r),Q(e,s),Q(e,l),Q(l,o),Q(o,c),Q(l,h),Q(l,O),Q(O,g),Q(e,m),y||($=[le(e,"click",_),le(e,"dblclick",n[5])],y=!0)},p(W,R){n=W,R&2&&i!==(i=Nb(n[10])+"")&&Le(r,i),R&2&&a!==(a=n[10].solver+"")&&Le(c,a),R&2&&p!==(p=new Date(n[10].timestamp).toLocaleString()+"")&&Le(g,p),R&4&&ne(e,"has-background-primary",n[2]===n[12]),R&4&&ne(e,"has-text-white",n[2]===n[12])},d(W){W&&X(e),y=!1,Ft($)}}}function u6(n){let e,t=st(n[1]),i=[];for(let s=0;si.name);return n.files.length>3&&t.push(`+${n.files.length-3} more…`),t.join(", ")}return n.files.map(t=>t.name).join(", ")}function d6(n,e,t){let i;const r=en();let{active:s=!1}=e,{projects:l=[]}=e,o=-1;function a(g){g||t(2,o=-1)}function c(){i&&r("accept",{project:l[o]})}const h=()=>r("cancel"),O=g=>t(2,o=g),p=()=>r("cancel");return n.$$set=g=>{"active"in g&&t(0,s=g.active),"projects"in g&&t(1,l=g.projects)},n.$$.update=()=>{n.$$.dirty&6&&t(3,i=o>=0&&o{const t=localStorage.getItem(yd);if(t&&t.length>0){ms=!0;try{e(i=>({...i,...JSON.parse(t)}))}catch(i){console.error(i)}ms=!1}window.addEventListener("storage",i=>{if(i.storageArea===localStorage&&i.key===yd&&i.newValue.length>0){ms=!0;try{e(r=>({...r,...JSON.parse(i.newValue)}))}catch(r){console.error(r)}ms=!1}})});Ls.subscribe(n=>{ms||(Object.keys(n.sessions).length>Lb&&(ms=!0,Ls.update(e=>{const t=Object.keys(e.sessions).map(i=>({key:i,value:e.sessions[i]}));return t.sort((i,r)=>r.value.timestamp-i.value.timestamp),ms=!0,{...e,sessions:t.slice(0,Lb).reduce((i,r)=>({...i,[r.key]:r.value}),{})}}),ms=!1),localStorage.setItem(yd,JSON.stringify(n)))});const{document:g6,window:jb}=FW;function m6(n){let e,t;return e=new p6({props:{projects:n[5],active:n[4]}}),e.$on("cancel",n[12]),e.$on("accept",n[13]),{c(){Ae(e.$$.fragment)},m(i,r){Re(e,i,r),t=!0},p(i,r){const s={};r&32&&(s.projects=i[5]),r&16&&(s.active=i[4]),e.$set(s)},i(i){t||(M(e.$$.fragment,i),t=!0)},o(i){j(e.$$.fragment,i),t=!1},d(i){Xe(e,i)}}}function S6(n){let e,t,i,r,s,l,o,a,c;return l=new wt({props:{icon:Vy}}),{c(){e=k("div"),t=k("div"),i=k("div"),r=k("button"),s=k("span"),Ae(l.$$.fragment),v(s,"class","icon"),v(r,"class","button"),v(r,"title","Open recent project"),v(i,"class","control"),v(t,"class","field"),v(e,"class","navbar-item")},m(h,O){Y(h,e,O),Q(e,t),Q(t,i),Q(i,r),Q(r,s),Re(l,s,null),o=!0,a||(c=le(r,"click",n[11]),a=!0)},p:Qe,i(h){o||(M(l.$$.fragment,h),o=!0)},o(h){j(l.$$.fragment,h),o=!1},d(h){h&&X(e),Xe(l),a=!1,c()}}}function b6(n){let e,t,i,r,s,l,o,a;return i=new wt({props:{icon:Vy}}),{c(){e=k("a"),t=k("span"),Ae(i.$$.fragment),r=L(),s=k("span"),s.textContent="Open recent project",v(t,"class","icon"),v(e,"class","navbar-item mobile-menu-item"),v(e,"href","javascript:void(0);")},m(c,h){Y(c,e,h),Q(e,t),Re(i,t,null),Q(e,r),Q(e,s),l=!0,o||(a=le(e,"click",n[10]),o=!0)},p:Qe,i(c){l||(M(i.$$.fragment,c),l=!0)},o(c){j(i.$$.fragment,c),l=!1},d(c){c&&X(e),Xe(i),o=!1,a()}}}function $6(n){let e,t,i,r;const s=[b6,S6],l=[];function o(a,c){return a[25]?0:1}return e=o(n),t=l[e]=s[e](n),{c(){t.c(),i=Gt()},m(a,c){l[e].m(a,c),Y(a,i,c),r=!0},p(a,c){let h=e;e=o(a),e===h?l[e].p(a,c):(Je(),j(l[h],1,1,()=>{l[h]=null}),et(),t=l[e],t?t.p(a,c):(t=l[e]=s[e](a),t.c()),M(t,1),t.m(i.parentNode,i))},i(a){r||(M(t),r=!0)},o(a){j(t),r=!1},d(a){a&&X(i),l[e].d(a)}}}function y6(n){let e,t,i,r,s,l,o,a,c;function h(m){n[15](m)}function O(m){n[16](m)}function p(m){n[17](m)}let g={project:n[3],$$slots:{"navbar-before-share-buttons":[$6,({isMobile:m})=>({25:m}),({isMobile:m})=>m?33554432:0],default:[m6]},$$scope:{ctx:n}};return n[1].autoClearOutput!==void 0&&(g.autoClearOutput=n[1].autoClearOutput),n[1].splitterDirection!==void 0&&(g.splitterDirection=n[1].splitterDirection),n[1].splitterSize!==void 0&&(g.splitterSize=n[1].splitterSize),i=new c6({props:g}),n[14](i),Et.push(()=>qo(i,"autoClearOutput",h)),Et.push(()=>qo(i,"splitterDirection",O)),Et.push(()=>qo(i,"splitterSize",p)),i.$on("solversChanged",n[18]),{c(){e=L(),t=k("div"),Ae(i.$$.fragment),v(t,"class","playground-app svelte-tuc1wl")},m(m,y){Y(m,e,y),Y(m,t,y),Re(i,t,null),o=!0,a||(c=[le(jb,"beforeunload",n[7]),le(jb,"hashchange",n[6]),le(g6,"visibilitychange",n[9])],a=!0)},p(m,[y]){const $={};y&8&&($.project=m[3]),y&100663346&&($.$$scope={dirty:y,ctx:m}),!r&&y&2&&(r=!0,$.autoClearOutput=m[1].autoClearOutput,Vo(()=>r=!1)),!s&&y&2&&(s=!0,$.splitterDirection=m[1].splitterDirection,Vo(()=>s=!1)),!l&&y&2&&(l=!0,$.splitterSize=m[1].splitterSize,Vo(()=>l=!1)),i.$set($)},i(m){o||(M(i.$$.fragment,m),o=!0)},o(m){j(i.$$.fragment,m),o=!1},d(m){m&&(X(e),X(t)),n[14](null),Xe(i),a=!1,Ft(c)}}}const bO=`% Use this editor as a MiniZinc scratch book
`,Bb="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";function v6(n,e,t){let i,r;$O(n,Ls,N=>t(1,r=N));let s,l={files:[]},o=null,a=!1,c=[];function h(N,re){return!s||!re?[]:Object.entries(re.sessions).map(([ae,ye])=>{const Se=N.find(ge=>ge.id===ye.solverId);return{key:ae,files:ye.files,timestamp:ye.timestamp,solver:Se?Se.name:""}}).filter(ae=>ae.key!==sessionStorage.mznPlaygroundSession).sort((ae,ye)=>ye.timestamp-ae.timestamp)}function O(){const N=()=>Array(6).fill(0).map(()=>Bb[Math.floor(Math.random()*Bb.length)]).join("");let re=N();for(;re in r.sessions;)re=N();return re}function p(N){return N.solverId||(N.solver===0?N.solverId="org.minizinc.gecode_presolver":l.solver===1&&(N.solverId="org.minizinc.mip.coin-bc")),N}let g=!1;async function m(){const N=window.location.hash;if(N.length>0&&(g=!0,window.history.replaceState(void 0,void 0,window.location.pathname+window.location.search),g=!1),!g){if(N.startsWith("#project="))try{const re=decodeURIComponent(N.substring(9));$(O(),{...JSON.parse(re),timestamp:Date.now()});return}catch(re){console.error(re)}if(N.startsWith("#code="))try{const re=decodeURIComponent(N.substring(6));$(O(),{files:[{name:"Playground.mzn",contents:re,anchor:re.length}],timestamp:Date.now()});return}catch(re){console.error(re)}if(N.startsWith("#url="))try{const re=decodeURIComponent(N.substring(5));$(O(),await sQ(re));return}catch(re){console.error(re)}if(sessionStorage.mznPlaygroundSession&&r.sessions[sessionStorage.mznPlaygroundSession]){$(sessionStorage.mznPlaygroundSession,r.sessions[sessionStorage.mznPlaygroundSession]);return}l.files.length===0&&$(O(),{files:[{name:"Playground.mzn",contents:bO,anchor:bO.length}],timestamp:Date.now()})}}Hc(()=>m());function y(){if(sessionStorage.mznPlaygroundSession&&s.hasFiles())try{const N=s.getProject();if(!(sessionStorage.mznPlaygroundSession in r.sessions)&&s.isDefaultSolver()&&s.isDefaultSolverConfig()&&N.files.length===1&&N.files[0].name==="Playground.mzn"&&N.files[0].contents===bO)return;o=Date.now(),BW(Ls,r.sessions[sessionStorage.mznPlaygroundSession]={...N,timestamp:o},r)}catch(N){console.error(N)}}function $(N,re){y();try{const ae=p(re);sessionStorage.mznPlaygroundSession=N,t(3,l=ae),o=re.timestamp}catch(ae){console.error(ae)}t(4,a=!1),t(5,i=h(c,r))}function _(N){o!==null&&sessionStorage.mznPlaygroundSession in N.sessions&&N.sessions[sessionStorage.mznPlaygroundSession].timestamp>o&&(sessionStorage.mznPlaygroundSession=O(),t(5,i=h(c,N)))}const W=()=>{document.hidden&&y()},R=()=>t(4,a=!0),A=()=>t(4,a=!0),C=()=>t(4,a=!1),E=N=>$(N.detail.project.key,r.sessions[N.detail.project.key]);function D(N){Et[N?"unshift":"push"](()=>{s=N,t(2,s)})}function z(N){n.$$.not_equal(r.autoClearOutput,N)&&(r.autoClearOutput=N,Ls.set(r))}function F(N){n.$$.not_equal(r.splitterDirection,N)&&(r.splitterDirection=N,Ls.set(r))}function B(N){n.$$.not_equal(r.splitterSize,N)&&(r.splitterSize=N,Ls.set(r))}const q=N=>t(0,c=N.detail.solvers);return n.$$.update=()=>{n.$$.dirty&3&&t(5,i=h(c,r)),n.$$.dirty&2&&_(r)},[c,r,s,l,a,i,m,y,$,W,R,A,C,E,D,z,F,B,q]}class w6 extends $i{constructor(e){super(),bi(this,e,v6,y6,Oi,{})}}new w6({target:document.getElementById("app")});export{Xo as c,x6 as g};
diff --git a/develop/assets/jszip.min-bUkKTG0Z.js b/develop/assets/jszip.min-JQuTIydQ.js
similarity index 99%
rename from develop/assets/jszip.min-bUkKTG0Z.js
rename to develop/assets/jszip.min-JQuTIydQ.js
index d629669..59c48ba 100644
--- a/develop/assets/jszip.min-bUkKTG0Z.js
+++ b/develop/assets/jszip.min-JQuTIydQ.js
@@ -1,4 +1,4 @@
-import{g as At,c as bt}from"./index-DimloEhh.js";function vt(yt){throw new Error('Could not dynamically require "'+yt+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var St={exports:{}};/*!
+import{g as At,c as bt}from"./index-D-j8ueGo.js";function vt(yt){throw new Error('Could not dynamically require "'+yt+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var St={exports:{}};/*!
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
diff --git a/develop/index.html b/develop/index.html
index e0563a1..f296027 100644
--- a/develop/index.html
+++ b/develop/index.html
@@ -1,14 +1,14 @@
-
+
-
-
-
-
- MiniZinc Playground
-
-
-
-
-
-
+
+
+
+
+ MiniZinc Playground
+
+
+
+
+
+