From 2983e0ba1ed9c24809d9a0dc98cdf3103c53d2e2 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Wed, 10 Dec 2025 10:57:38 +0100 Subject: [PATCH 001/221] step loop efficiency --- docs/API/panels.md | 8 +- docs/js/GroundForge-opt.js | 608 ++++++++++++++++++------------------- docs/js/nudgePairs.js | 9 +- docs/js/panel.js | 44 +-- docs/panel-test.html | 2 +- 5 files changed, 342 insertions(+), 329 deletions(-) diff --git a/docs/API/panels.md b/docs/API/panels.md index d11ce60ed..03ed28c76 100644 --- a/docs/API/panels.md +++ b/docs/API/panels.md @@ -120,10 +120,16 @@ Options: - `steps`: array of strings, default empty, droste stitch definitions: for each element a pair diagram is created from the (previous) thread diagram. +Note that the URL query keys _droste2_ and _droste3_ are the equivalent of _steps[0]_ and _steps[1]_ respectively. +The widget uses the values of the _steps_ option. +The pages of GroundForge use the query parameters to pass a pattern +back and forth between _pattern_, _stitches_ and _droste_. +The query keys were numbered with 2nd and 3rd pair diagram in mind. + ### `GF_panel.nudge(id)` Nudges the stitch positions in the panel with the given id. -Called by default for all diagrams except for a primary pair diagram (type _pair_, step _0_), +Called by default for all diagrams except for a primary pair diagram (`type` _pair_, no `steps`), also called by ![](/GroundForge/images/play.png). A page may call this function explicitly for its primary pair diagram as well. \ No newline at end of file diff --git a/docs/js/GroundForge-opt.js b/docs/js/GroundForge-opt.js index bfe1a5c42..a91cb5270 100644 --- a/docs/js/GroundForge-opt.js +++ b/docs/js/GroundForge-opt.js @@ -7,71 +7,71 @@ function Ca(a){switch(typeof a){case "string":return Da(w(),a);case "number":ret function Ka(a,b){var c=m.Object.getPrototypeOf,e=m.Object.getOwnPropertyDescriptor;for(a=c(a);null!==a;){var f=e(a,b);if(void 0!==f)return f;a=c(a)}}function La(a,b,c){a=Ka(a,c);if(void 0!==a)return c=a.get,void 0!==c?c.call(b):a.value}function Ma(a,b,c,e){a=Ka(a,c);if(void 0!==a&&(a=a.set,void 0!==a)){a.call(b,e);return}throw new m.TypeError("super has no setter '"+c+"'.");} function Na(a,b,c,e,f){a=a.a;c=c.a;if(a!==c||e>24===a&&1/a!==1/-0} -function sa(a){return"number"===typeof a&&a<<16>>16===a&&1/a!==1/-0}function Oa(a){return"number"===typeof a&&(a|0)===a&&1/a!==1/-0}function Ra(a){return null===a?Sa().Pj:a}function Ta(){this.lk=this.$k=void 0;this.bi=this.Yi=this.q=null;this.ci=0;this.Fk=null;this.Sj="";this.yf=this.Qj=this.Rj=void 0;this.name="";this.isRawJSType=this.isArrayClass=this.isInterface=this.isPrimitive=!1;this.isInstance=void 0} +function sa(a){return"number"===typeof a&&a<<16>>16===a&&1/a!==1/-0}function Qa(a){return"number"===typeof a&&(a|0)===a&&1/a!==1/-0}function Ra(a){return null===a?Sa().Pj:a}function Ta(){this.lk=this.$k=void 0;this.bi=this.Yi=this.q=null;this.ci=0;this.Fk=null;this.Sj="";this.yf=this.Qj=this.Rj=void 0;this.name="";this.isRawJSType=this.isArrayClass=this.isInterface=this.isPrimitive=!1;this.isInstance=void 0} function Ua(a,b,c){var e=new Ta;e.q={};e.Yi=null;e.Fk=a;e.Sj=b;e.yf=function(){return!1};e.name=c;e.isPrimitive=!0;e.isInstance=function(){return!1};return e}function y(a,b,c,e,f,g,h,k){var l=new Ta,n=ja(a);h=h||function(a){return!!(a&&a.$classData&&a.$classData.q[n])};k=k||function(a,b){return!!(a&&a.$classData&&a.$classData.ci===b&&a.$classData.bi.q[n])};l.lk=g;l.q=e;l.Sj="L"+c+";";l.yf=k;l.name=c;l.isInterface=b;l.isRawJSType=!!f;l.isInstance=h;return l} -function Va(a){function b(a){if("number"===typeof a){this.a=Array(a);for(var b=0;b>>0)).toString(16);return a+"@"+b};nb.prototype.L=function(){return Ha(this)};nb.prototype.toString=function(){return this.w()};function qb(a,b){if(a=a&&a.$classData){var c=a.ci||0;return!(cb||!a.bi.isPrimitive)}return!1} var A=y({c:0},!1,"java.lang.Object",{c:1},void 0,void 0,function(a){return null!==a},qb);nb.prototype.$classData=A;function rb(a){var b=u(B(A),[a.a.length]);Na(a,0,b,0,a.a.length);return b} function sb(a,b,c){if(32>c)return a.Wb().a[31&b];if(1024>c)return a.$().a[31&(b>>>5|0)].a[31&b];if(32768>c)return a.pa().a[31&(b>>>10|0)].a[31&(b>>>5|0)].a[31&b];if(1048576>c)return a.Ia().a[31&(b>>>15|0)].a[31&(b>>>10|0)].a[31&(b>>>5|0)].a[31&b];if(33554432>c)return a.vb().a[31&(b>>>20|0)].a[31&(b>>>15|0)].a[31&(b>>>10|0)].a[31&(b>>>5|0)].a[31&b];if(1073741824>c)return a.Fd().a[31&(b>>>25|0)].a[31&(b>>>20|0)].a[31&(b>>>15|0)].a[31&(b>>>10|0)].a[31&(b>>>5|0)].a[31&b];throw(new tb).b();} -function ub(a,b,c,e){if(32<=e)if(1024>e)1===a.uc()&&(a.Ka(u(B(A),[32])),a.$().a[31&(b>>>5|0)]=a.Wb(),a.cf(1+a.uc()|0)),a.$a(u(B(A),[32]));else if(32768>e)2===a.uc()&&(a.db(u(B(A),[32])),a.pa().a[31&(b>>>10|0)]=a.$(),a.cf(1+a.uc()|0)),a.Ka(a.pa().a[31&(c>>>10|0)]),null===a.$()&&a.Ka(u(B(A),[32])),a.$a(u(B(A),[32]));else if(1048576>e)3===a.uc()&&(a.Xb(u(B(A),[32])),a.Ia().a[31&(b>>>15|0)]=a.pa(),a.cf(1+a.uc()|0)),a.db(a.Ia().a[31&(c>>>15|0)]),null===a.pa()&&a.db(u(B(A),[32])),a.Ka(a.pa().a[31&(c>>> -10|0)]),null===a.$()&&a.Ka(u(B(A),[32])),a.$a(u(B(A),[32]));else if(33554432>e)4===a.uc()&&(a.xd(u(B(A),[32])),a.vb().a[31&(b>>>20|0)]=a.Ia(),a.cf(1+a.uc()|0)),a.Xb(a.vb().a[31&(c>>>20|0)]),null===a.Ia()&&a.Xb(u(B(A),[32])),a.db(a.Ia().a[31&(c>>>15|0)]),null===a.pa()&&a.db(u(B(A),[32])),a.Ka(a.pa().a[31&(c>>>10|0)]),null===a.$()&&a.Ka(u(B(A),[32])),a.$a(u(B(A),[32]));else if(1073741824>e)5===a.uc()&&(a.Vg(u(B(A),[32])),a.Fd().a[31&(b>>>25|0)]=a.vb(),a.cf(1+a.uc()|0)),a.xd(a.Fd().a[31&(c>>>25|0)]), -null===a.vb()&&a.xd(u(B(A),[32])),a.Xb(a.vb().a[31&(c>>>20|0)]),null===a.Ia()&&a.Xb(u(B(A),[32])),a.db(a.Ia().a[31&(c>>>15|0)]),null===a.pa()&&a.db(u(B(A),[32])),a.Ka(a.pa().a[31&(c>>>10|0)]),null===a.$()&&a.Ka(u(B(A),[32])),a.$a(u(B(A),[32]));else throw(new tb).b();}function vb(a,b,c){var e=u(B(A),[32]);Na(a,b,e,c,32-(c>b?c:b)|0);return e} -function wb(a,b,c){if(32<=c)if(1024>c)a.$a(a.$().a[31&(b>>>5|0)]);else if(32768>c)a.Ka(a.pa().a[31&(b>>>10|0)]),a.$a(a.$().a[31&(b>>>5|0)]);else if(1048576>c)a.db(a.Ia().a[31&(b>>>15|0)]),a.Ka(a.pa().a[31&(b>>>10|0)]),a.$a(a.$().a[31&(b>>>5|0)]);else if(33554432>c)a.Xb(a.vb().a[31&(b>>>20|0)]),a.db(a.Ia().a[31&(b>>>15|0)]),a.Ka(a.pa().a[31&(b>>>10|0)]),a.$a(a.$().a[31&(b>>>5|0)]);else if(1073741824>c)a.xd(a.Fd().a[31&(b>>>25|0)]),a.Xb(a.vb().a[31&(b>>>20|0)]),a.db(a.Ia().a[31&(b>>>15|0)]),a.Ka(a.pa().a[31& -(b>>>10|0)]),a.$a(a.$().a[31&(b>>>5|0)]);else throw(new tb).b();} -function xb(a,b){var c=-1+a.uc()|0;switch(c){case 5:a.Vg(rb(a.Fd()));a.xd(rb(a.vb()));a.Xb(rb(a.Ia()));a.db(rb(a.pa()));a.Ka(rb(a.$()));a.Fd().a[31&(b>>>25|0)]=a.vb();a.vb().a[31&(b>>>20|0)]=a.Ia();a.Ia().a[31&(b>>>15|0)]=a.pa();a.pa().a[31&(b>>>10|0)]=a.$();a.$().a[31&(b>>>5|0)]=a.Wb();break;case 4:a.xd(rb(a.vb()));a.Xb(rb(a.Ia()));a.db(rb(a.pa()));a.Ka(rb(a.$()));a.vb().a[31&(b>>>20|0)]=a.Ia();a.Ia().a[31&(b>>>15|0)]=a.pa();a.pa().a[31&(b>>>10|0)]=a.$();a.$().a[31&(b>>>5|0)]=a.Wb();break;case 3:a.Xb(rb(a.Ia())); +function ub(a,b,c,e){if(32<=e)if(1024>e)1===a.uc()&&(a.Ka(u(B(A),[32])),a.$().a[31&(b>>>5|0)]=a.Wb(),a.cf(1+a.uc()|0)),a.Za(u(B(A),[32]));else if(32768>e)2===a.uc()&&(a.db(u(B(A),[32])),a.pa().a[31&(b>>>10|0)]=a.$(),a.cf(1+a.uc()|0)),a.Ka(a.pa().a[31&(c>>>10|0)]),null===a.$()&&a.Ka(u(B(A),[32])),a.Za(u(B(A),[32]));else if(1048576>e)3===a.uc()&&(a.Xb(u(B(A),[32])),a.Ia().a[31&(b>>>15|0)]=a.pa(),a.cf(1+a.uc()|0)),a.db(a.Ia().a[31&(c>>>15|0)]),null===a.pa()&&a.db(u(B(A),[32])),a.Ka(a.pa().a[31&(c>>> +10|0)]),null===a.$()&&a.Ka(u(B(A),[32])),a.Za(u(B(A),[32]));else if(33554432>e)4===a.uc()&&(a.wd(u(B(A),[32])),a.vb().a[31&(b>>>20|0)]=a.Ia(),a.cf(1+a.uc()|0)),a.Xb(a.vb().a[31&(c>>>20|0)]),null===a.Ia()&&a.Xb(u(B(A),[32])),a.db(a.Ia().a[31&(c>>>15|0)]),null===a.pa()&&a.db(u(B(A),[32])),a.Ka(a.pa().a[31&(c>>>10|0)]),null===a.$()&&a.Ka(u(B(A),[32])),a.Za(u(B(A),[32]));else if(1073741824>e)5===a.uc()&&(a.Vg(u(B(A),[32])),a.Fd().a[31&(b>>>25|0)]=a.vb(),a.cf(1+a.uc()|0)),a.wd(a.Fd().a[31&(c>>>25|0)]), +null===a.vb()&&a.wd(u(B(A),[32])),a.Xb(a.vb().a[31&(c>>>20|0)]),null===a.Ia()&&a.Xb(u(B(A),[32])),a.db(a.Ia().a[31&(c>>>15|0)]),null===a.pa()&&a.db(u(B(A),[32])),a.Ka(a.pa().a[31&(c>>>10|0)]),null===a.$()&&a.Ka(u(B(A),[32])),a.Za(u(B(A),[32]));else throw(new tb).b();}function vb(a,b,c){var e=u(B(A),[32]);Na(a,b,e,c,32-(c>b?c:b)|0);return e} +function wb(a,b,c){if(32<=c)if(1024>c)a.Za(a.$().a[31&(b>>>5|0)]);else if(32768>c)a.Ka(a.pa().a[31&(b>>>10|0)]),a.Za(a.$().a[31&(b>>>5|0)]);else if(1048576>c)a.db(a.Ia().a[31&(b>>>15|0)]),a.Ka(a.pa().a[31&(b>>>10|0)]),a.Za(a.$().a[31&(b>>>5|0)]);else if(33554432>c)a.Xb(a.vb().a[31&(b>>>20|0)]),a.db(a.Ia().a[31&(b>>>15|0)]),a.Ka(a.pa().a[31&(b>>>10|0)]),a.Za(a.$().a[31&(b>>>5|0)]);else if(1073741824>c)a.wd(a.Fd().a[31&(b>>>25|0)]),a.Xb(a.vb().a[31&(b>>>20|0)]),a.db(a.Ia().a[31&(b>>>15|0)]),a.Ka(a.pa().a[31& +(b>>>10|0)]),a.Za(a.$().a[31&(b>>>5|0)]);else throw(new tb).b();} +function xb(a,b){var c=-1+a.uc()|0;switch(c){case 5:a.Vg(rb(a.Fd()));a.wd(rb(a.vb()));a.Xb(rb(a.Ia()));a.db(rb(a.pa()));a.Ka(rb(a.$()));a.Fd().a[31&(b>>>25|0)]=a.vb();a.vb().a[31&(b>>>20|0)]=a.Ia();a.Ia().a[31&(b>>>15|0)]=a.pa();a.pa().a[31&(b>>>10|0)]=a.$();a.$().a[31&(b>>>5|0)]=a.Wb();break;case 4:a.wd(rb(a.vb()));a.Xb(rb(a.Ia()));a.db(rb(a.pa()));a.Ka(rb(a.$()));a.vb().a[31&(b>>>20|0)]=a.Ia();a.Ia().a[31&(b>>>15|0)]=a.pa();a.pa().a[31&(b>>>10|0)]=a.$();a.$().a[31&(b>>>5|0)]=a.Wb();break;case 3:a.Xb(rb(a.Ia())); a.db(rb(a.pa()));a.Ka(rb(a.$()));a.Ia().a[31&(b>>>15|0)]=a.pa();a.pa().a[31&(b>>>10|0)]=a.$();a.$().a[31&(b>>>5|0)]=a.Wb();break;case 2:a.db(rb(a.pa()));a.Ka(rb(a.$()));a.pa().a[31&(b>>>10|0)]=a.$();a.$().a[31&(b>>>5|0)]=a.Wb();break;case 1:a.Ka(rb(a.$()));a.$().a[31&(b>>>5|0)]=a.Wb();break;case 0:break;default:throw(new C).g(c);}}function yb(a,b){var c=a.a[b];a.a[b]=null;return rb(c)} -function zb(a,b,c){a.cf(c);c=-1+c|0;switch(c){case -1:break;case 0:a.$a(b.Wb());break;case 1:a.Ka(b.$());a.$a(b.Wb());break;case 2:a.db(b.pa());a.Ka(b.$());a.$a(b.Wb());break;case 3:a.Xb(b.Ia());a.db(b.pa());a.Ka(b.$());a.$a(b.Wb());break;case 4:a.xd(b.vb());a.Xb(b.Ia());a.db(b.pa());a.Ka(b.$());a.$a(b.Wb());break;case 5:a.Vg(b.Fd());a.xd(b.vb());a.Xb(b.Ia());a.db(b.pa());a.Ka(b.$());a.$a(b.Wb());break;default:throw(new C).g(c);}}function Ab(a){return null===a?Bb():a} +function zb(a,b,c){a.cf(c);c=-1+c|0;switch(c){case -1:break;case 0:a.Za(b.Wb());break;case 1:a.Ka(b.$());a.Za(b.Wb());break;case 2:a.db(b.pa());a.Ka(b.$());a.Za(b.Wb());break;case 3:a.Xb(b.Ia());a.db(b.pa());a.Ka(b.$());a.Za(b.Wb());break;case 4:a.wd(b.vb());a.Xb(b.Ia());a.db(b.pa());a.Ka(b.$());a.Za(b.Wb());break;case 5:a.Vg(b.Fd());a.wd(b.vb());a.Xb(b.Ia());a.db(b.pa());a.Ka(b.$());a.Za(b.Wb());break;default:throw(new C).g(c);}}function Ab(a){return null===a?Bb():a} function Cb(a){return a===Bb()?null:a}var Db=y({Cp:0},!0,"scala.collection.mutable.HashEntry",{Cp:1});function Eb(){this.Al=this.on=this.Lp=this.Lf=null}Eb.prototype=new z;Eb.prototype.constructor=Eb; function Fb(a,b){w();a=(new E).e('\x3cmarker id\x3d"start-'+a+'"\n | viewBox\x3d"-7 -7 14 14"\n | markerWidth\x3d"12"\n | markerHeight\x3d"12"\n | orient\x3d"auto"\n | markerUnits\x3d"userSpaceOnUse"\x3e\n | \x3cpath d\x3d"'+b+'"\n | fill\x3d"#000"\n | style\x3d"opacity: 0.5;"\x3e\x3c/path\x3e\n |\x3c/marker\x3e\n |');a=Gb(a);a=(new E).e(a);return Hb(0,Ib(a),"[\n\r]","")} Eb.prototype.b=function(){Jb=this;this.Lf="m 0,40 c -3.40759,0 -6.01351,3.60204 -1.63269,3.60204 l 0,19.82157 c -3.67432,-0.008 -1.7251,5.087 -1.32784,7.27458 0.76065,4.18864 1.01701,8.40176 0.3478,12.58551 -1.68869,10.55725 -2.31894,21.67593 1.25552,31.9161 0.2088,0.59819 0.68935,2.7631 1.40054,2.7636 0.71159,0 1.19169,-2.16521 1.40057,-2.7636 C 5.01838,104.95964 4.38954,93.84095 2.70085,83.2837 2.03164,79.09995 2.28656,74.88683 3.04721,70.69819 3.44447,68.51061 5.61865,63.44146 1.71951,63.42361 l 0,-19.82157 C 5.86853,43.60204 3.4855,39.99659 0,40 L 0,0";this.Lp= "M -18,-6 H 6 V 6 h -24 z";this.on="M -5,0 0,8 5,0 0,-8 Z";var a="\x3cdefs\x3e\n | "+Fb("thread",this.Lp)+"\n | "+Fb("pair",this.on)+"\n | "+Kb(1)+"\n | "+Kb(2)+"\n | "+Kb(3)+"\n |\x3c/defs\x3e",a=(new E).e(a),a=Gb(a),a=(new E).e(a);this.Al=Ib(a);return this}; function Kb(a){var b=1===a?"M 0,4.8 0,-4.8":2===a?"M -1,4.8 V -4.8 M 1,4.8 1,-4.8":"M -3,4.8 V -4.8 M 3,4.8 3,-4.8 M 0,4.8 0,-4.8";w();a=(new E).e('\x3cmarker id\x3d"twist-'+a+'"\n | viewBox\x3d"-3 -3 6 6"\n | markerWidth\x3d"6"\n | markerHeight\x3d"6"\n | orient\x3d"auto"\n | markerUnits\x3d"userSpaceOnUse"\x3e\n | \x3cpath d\x3d"'+b+'"\n | fill\x3d"#000"\n | stroke\x3d"#000"\n | stroke-width\x3d"1.5px"\x3e\x3c/path\x3e\n |\x3c/marker\x3e\n |'); -a=Gb(a);a=(new E).e(a);return Hb(0,Ib(a),"[\n\r]","")}function Lb(a,b,c,e,f){if(0=q?"":"; marker-mid: url('#twist-"+q+"')",x=Wb(na(a)),x=0<=(x.length|0)&&"White"===x.substring(0,5)?Wb(na(a)):"";a=(new E).e('\x3cpath\n | class\x3d"'+a.dn+" "+x+'"\n | id\x3d"n'+a.Fa+"-n"+a.ha+'"\n | d\x3d"'+g+'"\n | style\x3d"stroke: rgb(0, 0, 0); stroke-width: '+c+"; fill: none; opacity: "+ f+q+'"\n |\x3e\x3c/path\x3e');return Gb(a)}}(a,b,c,e));b=H();return f.ia(a,b.p).ad()} function Xb(a,b,c){var e=H();b=b.Tc(e.p);a=G(function(a,b){return function(a){if(null!==a){var c=a.N(),e=a.Ja();a=c.Lf||c.Fl?1:b;var f=c.Lf?"rgb(0, 0, 0); stroke-width: 2px":"none",p=c.Lf?Hb(w(),c.Wj,".*d","thread "):(c.Wn?"left ":c.Zn?"right ":"")+c.Uf,t=-1!==(p.indexOf("cross")|0)||-1!==(p.indexOf("twist")|0)?" ct-"+c.Ua.substring(0,-1+(c.Ua.length|0)|0):"",q=-1!==(p.indexOf("cross")|0)||-1!==(p.indexOf("twist")|0)?"":-1!==(p.indexOf("thread")|0)?"onclick\x3d'clickedThread(event)'":"onclick\x3d'clickedStitch(event)'"; if(""===t&&-1===(p.indexOf("thread")|0))return c="\x3cg "+q+'\n | class\x3d"'+c.Wj+'"\n | id\x3d"n'+e+'"\n | transform\x3d"translate('+c.qa+","+c.Ca+')"\n |\x3e\x3ctitle\x3e'+p+'\x3c/title\x3e\x3cg transform\x3d"scale(1.5)"\x3e'+Yb(Zb(),Hb(w(),p," .*",""))+"\x3c/g\x3e\x3c/g\x3e",c=(new E).e(c),Gb(c);e="\x3cpath "+q+'\n | class\x3d"'+c.Wj+t+'"\n | id\x3d"n'+e+'"\n | d\x3d"';t=Vb();c=(new E).e(e+(c.Fl?Tb(4):c.Lf?t.Lf:Tb(9))+'"\n | style\x3d"fill: rgb(0, 0, 0); stroke: '+ f+"; opacity: "+a+'"\n | transform\x3d"translate('+c.qa+","+c.Ca+')"\n |\x3e\x3ctitle\x3e'+p+"\x3c/title\x3e\x3c/path\x3e");return Gb(c)}throw(new C).g(a);}}(a,c));c=H();return b.ia(a,c.p).ad()} -function $b(a,b,c,e,f,g){a=Mb(new Nb,(new Qb).fc(c,e),(new Qb).fc(f,g),F());return"WhiteStart"===b?ac((new bc).hc(cc(dc().yh,I())),a):"WhiteStartLeft"===b?Sb((new ec).hc(cc(dc().yh,I())),a):"WhiteStartRight"===b?Sb((new fc).hc(cc(dc().yh,I())),a):"WhiteEnd"===b?ac((new gc).hc(cc(dc().yh,I())),a):"WhiteEndLeft"===b?Sb((new hc).hc(cc(dc().yh,I())),a):"WhiteEndRight"===b?Sb((new ic).hc(cc(dc().yh,I())),a):"M "+c+","+e+" "+(c+(f-c)/2)+" "+(e+(g-e)/2)+" "+f+","+g} +function $b(a,b,c,e,f,g){a=Mb(new Pb,(new Qb).fc(c,e),(new Qb).fc(f,g),F());return"WhiteStart"===b?ac((new bc).hc(cc(dc().yh,I())),a):"WhiteStartLeft"===b?Sb((new ec).hc(cc(dc().yh,I())),a):"WhiteStartRight"===b?Sb((new fc).hc(cc(dc().yh,I())),a):"WhiteEnd"===b?ac((new gc).hc(cc(dc().yh,I())),a):"WhiteEndLeft"===b?Sb((new hc).hc(cc(dc().yh,I())),a):"WhiteEndRight"===b?Sb((new ic).hc(cc(dc().yh,I())),a):"M "+c+","+e+" "+(c+(f-c)/2)+" "+(e+(g-e)/2)+" "+f+","+g} function ac(a,b){b=a.Fg(b);if(null===b)throw(new C).g(b);a=b.Fa;b=b.ha;return"M "+a.qa+","+a.Ca+" "+b.qa+","+b.Ca} Eb.prototype.render=function(a){for(var b=arguments.length|0,c=1,e=[];cg?-g|0:g,f)?g=!0:(oc(),g=b.Ae,g=0!==pc(0>g?-g|0:g,f));g?g=!0:(oc(),g=b.xe,g=0!==pc(0>g?-g|0:g,e));g?g=!0:(oc(),g=b.ye,g=0!==pc(0>g?-g|0:g,e));if(g)return e=(new E).e("Only simple tile ["+e+","+f+"] layout is supported.\n |"+b.Mi),Gb(e);if(r(3,e)>b.Eg||f<<1>b.jg)return e=(new E).e("Swatch (alias patch ["+b.Eg+","+b.jg+"]) should be at least 3 tiles ["+e+","+f+"] wide and 2 high.\n |"+b.Mi),Gb(e);b=r(15,e);g=r(15,f);b=c.pe.Yd(G(function(a, +function lc(a,b,c){var e=b.md,f=b.Uc;oc();var g=b.ye;0!==pc(0>g?-g|0:g,f)?g=!0:(oc(),g=b.ze,g=0!==pc(0>g?-g|0:g,f));g?g=!0:(oc(),g=b.we,g=0!==pc(0>g?-g|0:g,e));g?g=!0:(oc(),g=b.xe,g=0!==pc(0>g?-g|0:g,e));if(g)return e=(new E).e("Only simple tile ["+e+","+f+"] layout is supported.\n |"+b.Mi),Gb(e);if(r(3,e)>b.Eg||f<<1>b.jg)return e=(new E).e("Swatch (alias patch ["+b.Eg+","+b.jg+"]) should be at least 3 tiles ["+e+","+f+"] wide and 2 high.\n |"+b.Mi),Gb(e);b=r(15,e);g=r(15,f);b=c.pe.Yd(G(function(a, b,c,e){return function(a){a=b.Pa.i(a.Fa);return a.qa>=c&&a.qa=e&&a.Cab.m())return H(),Dc(),(new Ec).b().cc();var c=b.z(),e=H();b=b.Kf(c,e.p);a=G(function(){return function(a){if(null!==a){var b=a.Ja();a=[(new K).j("source",a.Qa()),(new K).j("target",b)];for(var b=Fc(new Gc,Hc()),c=0,e=a.length|0;cb.m())return H(),Dc(),(new Ec).b().cc();var c=b.z(),e=H();b=b.Kf(c,e.p);a=G(function(){return function(a){if(null!==a){var b=a.Ja();a=[(new K).j("source",a.Qa()),(new K).j("target",b)];for(var b=Fc(new Gc,Hc()),c=0,e=a.length|0;ck?-k|0:k,h)?(oc(),k=b.Ae,k=0===pc(0>k?-k|0:k,h)):k=!1;oc();var l=b.xe;0===pc(0>l?-l|0:l,g)?(oc(),l=b.ye,l=0===pc(0>l?-l|0:l,g)):l=!1;var n=Yc(k,l);var p=n.De;if(!0===n.Ce&&!0===p)n=h;else if(h=n.De,!0===n.Ce&&!1===h)n=g=0;else if(h=n.De,!1===n.Ce&&!0===h)n=g=0;else if(h=n.De,!1===n.Ce&&!1===h)n=g=0;else throw(new C).g(n);h=g;g=n;n=r(3,h)<=b.Eg&&g<<1<=b.jg;b="Swatch ["+b.Eg+","+b.jg+"]"+(" tile["+b.md+","+b.Uc)+"]"+(" simple["+h+","+ -g)+"]"+(" shiftCols[E\x3d"+b.xe+",W\x3d"+b.ye)+"]"+(" shiftRows[E\x3d"+b.ze+",W\x3d"+b.Ae)+"]"+(" isHorBrick\x3d"+k+", isVerBrick\x3d")+l;if(n&&0!==g)return Zc($c().se.td,b+"\n"),(new ad).g(c.pe.Yd(G(function(a,b,c,e,f,g){return function(a){var h=b.Pa.i(c.l(a)|0);a=Ja(-2+h.Ca/e/15);h=Ja(-2+h.qa/e/15);return a>=g&&a=f&&hk?-k|0:k,h)?(oc(),k=b.ze,k=0===pc(0>k?-k|0:k,h)):k=!1;oc();var l=b.we;0===pc(0>l?-l|0:l,g)?(oc(),l=b.xe,l=0===pc(0>l?-l|0:l,g)):l=!1;var n=Yc(k,l);var p=n.Ce;if(!0===n.Be&&!0===p)n=h;else if(h=n.Ce,!0===n.Be&&!1===h)n=g=0;else if(h=n.Ce,!1===n.Be&&!0===h)n=g=0;else if(h=n.Ce,!1===n.Be&&!1===h)n=g=0;else throw(new C).g(n);h=g;g=n;n=r(3,h)<=b.Eg&&g<<1<=b.jg;b="Swatch ["+b.Eg+","+b.jg+"]"+(" tile["+b.md+","+b.Uc)+"]"+(" simple["+h+","+ +g)+"]"+(" shiftCols[E\x3d"+b.we+",W\x3d"+b.xe)+"]"+(" shiftRows[E\x3d"+b.ye+",W\x3d"+b.ze)+"]"+(" isHorBrick\x3d"+k+", isVerBrick\x3d")+l;if(n&&0!==g)return Zc($c().Ke.Ad,b+"\n"),(new ad).g(c.pe.Yd(G(function(a,b,c,e,f,g){return function(a){var h=b.Pa.i(c.l(a)|0);a=Ja(-2+h.Ca/e/15);h=Ja(-2+h.qa/e/15);return a>=g&&a=f&&h=e,e=-1+e|0;Xd();Yd();Xd();Zd();var g=(new ae).b();if(!f)for(f=0;;){var h=f,k=Vd((new Wd).Xa(a)),k=(new E).e(k),k=be(k);Xd();var l=Yd().Eb,l=ce(k,l);if(!k.bc)for(var n=k.Sa;;){var p=n,t=de().Gl,q=65535&(a.a[h].charCodeAt(p)|0),t=t.Xc((new M).aa(q));if(t.h())p=F();else{t=t.v();a:{q=ee(P(),t);if(!q.h()&&null!==q.v()&&0===q.v().Ra(2)&&(t=q.v().i(0),q=q.v().i(1), -null!==t)){var x=t.Qa(),t=t.Ja();if(null!==q){p="["+h+","+p+","+(h+x|0)+","+(p+t|0)+","+(h+q.Qa()|0)+","+(p+q.Ja()|0)+"]";break a}}p=""}p=(new J).g(p)}l.da(p.h()?"":p.v());if(n===k.we)break;n=n+k.Ha|0}h=l.X();fe(g,h);if(f===e)break;f=1+f|0}e=ge(g);return b+"\t"+a.a.length+"\t"+(c|0)+"\n"+Hb(0,he(e,"","\t",""),"\t+","\t")};md.prototype.$classData=y({mq:0},!1,"dibl.Matrix$",{mq:1,c:1});var nd=void 0;function de(){nd||(nd=(new md).b());return nd}function ie(){}ie.prototype=new z; +null!==t)){var x=t.Qa(),t=t.Ja();if(null!==q){p="["+h+","+p+","+(h+x|0)+","+(p+t|0)+","+(h+q.Qa()|0)+","+(p+q.Ja()|0)+"]";break a}}p=""}p=(new J).g(p)}l.da(p.h()?"":p.v());if(n===k.ve)break;n=n+k.Ha|0}h=l.X();fe(g,h);if(f===e)break;f=1+f|0}e=ge(g);return b+"\t"+a.a.length+"\t"+(c|0)+"\n"+Hb(0,he(e,"","\t",""),"\t+","\t")};md.prototype.$classData=y({mq:0},!1,"dibl.Matrix$",{mq:1,c:1});var nd=void 0;function de(){nd||(nd=(new md).b());return nd}function ie(){}ie.prototype=new z; ie.prototype.constructor=ie;ie.prototype.b=function(){return this};function je(a,b){return(new Qb).fc(30+15*b,30+15*a)} -function mc(a,b){var c=ke(b),e=c.m(),f=c.t().m();b="create NewPairDiagram ["+e+","+f+"]";Zc($c().se.td,b+"\n");var g=0,g=0,h=je(0,0),k=je(-1+e|0,-1+f|0);b=H();var l=[le(new me,0,(new Qb).fc(0,0),(new Qb).fc(0,0))];b=Rc(b,(new L).xa(l));var n=0>=e,e=-1+e|0;Xd();Yd();Xd();Zd();l=(new ae).b();if(!n)for(n=0;;){var p=n,t=0>=f;if(t)var q=0;else var x=f>>31,q=(0===x?-1<(-2147483648^f):0q&&ne(oe(),0,f,1,!1);if(!t)for(t=0;;){var Y=t;q=c.i(p).i(Y); -if(0===q.Qc.a.length)H(),Dc(),q=(new Ec).b().cc();else{var X=q.Qc;b:{var Z,pa,ha;Z=ee(P(),X);if(!Z.h()&&null!==Z.v()&&0===Z.v().Ra(2)&&(pa=Z.v().i(0),ha=Z.v().i(1),null!==pa&&(Z=pa.Qa(),pa=pa.Ja(),null!==ha))){X=ha.Qa();ha=ha.Ja();break b}throw(new C).g(X);}X|=0;ha|=0;Z=je(p+(Z|0)|0,Y+(pa|0)|0);pa=je(p+X|0,Y+ha|0);Y=je(p,Y);X=pe(qe(),q.zb);g=1+g|0;q=re(g,Y,Z,pa,q.zb,q.Ua,X);Y=Yc(Z.qak.qa||Z.Cak.qa||pa.Ca=e,e=-1+e|0;Xd();Yd();Xd();Zd();l=(new ae).b();if(!n)for(n=0;;){var p=n,t=0>=f;if(t)var q=0;else var x=f>>31,q=(0===x?-1<(-2147483648^f):0q&&ne(oe(),0,f,1,!1);if(!t)for(t=0;;){var Y=t;q=c.i(p).i(Y); +if(0===q.Qc.a.length)H(),Dc(),q=(new Ec).b().cc();else{var X=q.Qc;b:{var Z,pa,ha;Z=ee(P(),X);if(!Z.h()&&null!==Z.v()&&0===Z.v().Ra(2)&&(pa=Z.v().i(0),ha=Z.v().i(1),null!==pa&&(Z=pa.Qa(),pa=pa.Ja(),null!==ha))){X=ha.Qa();ha=ha.Ja();break b}throw(new C).g(X);}X|=0;ha|=0;Z=je(p+(Z|0)|0,Y+(pa|0)|0);pa=je(p+X|0,Y+ha|0);Y=je(p,Y);X=pe(qe(),q.zb);g=1+g|0;q=re(g,Y,Z,pa,q.zb,q.Ua,X);Y=Yc(Z.qak.qa||Z.Cak.qa||pa.Cac)break a;c=-1+(c/26|0)|0}}return""+e+(1+b|0)}Vf.prototype.defaultColorValue=function(a){return gg(this,a)};Vf.prototype.makeValid=function(a,b){return Uf(0,a,b)};Vf.prototype.toID=function(a,b){return tg(this,a|0,b|0)};Vf.prototype.$classData=y({vq:0},!1,"dibl.Stitches$",{vq:1,c:1});var Wf=void 0;function qe(){Wf||(Wf=(new Vf).b());return Wf}function ug(){}ug.prototype=new z;ug.prototype.constructor=ug;ug.prototype.b=function(){return this}; function vg(a,b,c,e){c=c.Yd(G(function(a,b){return function(a){return b.Y(a.Qa())}}(a,b)),!1);var f=G(function(){return function(a){return a.Ja()}}(a)),g=td();c=Ue(c,f,g);c=qc(c,G(function(){return function(a){return a.Ja()}}(a))).Pc(G(function(){return function(a){return 2===a.ea().m()}}(a))).jd((new wg).vg(v(Ud)));dc();for(var f=null,f=[],g=0,h=c.a.length;g=l)var n=0;else g=l>>31,n=(0===g?-1<(-2147483648^l):0n&&ne(oe(),0,l,1,!1);Xd();Zd();l=(new ae).b();if(1===n){if(!k)for(k=0;;){se(l,k);if(k===g)break;k=1+k|0}}else if(1=+m.Math.abs(c.qa-a.qa)?60>=+m.Math.abs(c.Ca-a.Ca):!1}}(a,c)),!1);c=H();return(new De).dh(b, e.ub(a,c.p))}function Xg(a){var b=a.Fc(),c=b.m(),c=u(B(bb),[c]);Jg(b,c,0);for(var b=(new vd).b(),e=0,f=c.a.length;ec&&(c=da(1+c));1c?da(a+da(da(6*da(b-a))*c)):.5>c?b:.6666666865348816>c?da(a+da(6*da(da(b-a)*da(.6666666865348816-c)))):a}function Zh(){qd();var a=I(),b=$h(a),b=u(B(Ud),[b]),c;c=0;for(a=ai(a);a.U();){var e=a.M();b.a[c]=e;c=1+c|0}return b}function pd(a,b,c){c=(new L).xa([b,c]);a=c.o.length|0;a=u(B(Ud),[a]);b=0;for(c=Q(new R,c,0,c.o.length|0);c.U();){var e=c.M();a.a[b]=e;b=1+b|0}return a} Xh.prototype.$classData=y({Hq:0},!1,"dibl.package$",{Hq:1,c:1});var bi=void 0;function qd(){bi||(bi=(new Xh).b());return bi}function ci(){}ci.prototype=new z;ci.prototype.constructor=ci;ci.prototype.b=function(){return this};function di(a){a=Hb(w(),Hb(w(),Hb(w(),a,"[^0-9-]",""),"([0-9])-","$1"),"^-$","0");a=(new E).e(a);return Ag(Bg(),a.d)}ci.prototype.$classData=y({Iq:0},!1,"dibl.package$StringExtensions$",{Iq:1,c:1});var ei=void 0;function fi(){ei||(ei=(new ci).b())} function gi(){this.Tp=null;this.G=!1}gi.prototype=new z;gi.prototype.constructor=gi;gi.prototype.b=function(){return this};function hi(a){return'\x3cpath d\x3d"m '+a+'" style\x3d"fill:none;stroke-width:1.1;stroke:#000;marker-end:url(#Arrow1Mend)"\x3e\x3c/path\x3e'} -gi.prototype.Gk=function(a){var b=ke(a),c="create prototype ["+b.s()+","+b.t().s()+"]";Zc($c().se.td,c+"\n");c=b.Fc();Xd();Yd();Xd();Zd();var e=(new ae).b();if(!c.bc)for(var f=c.Sa;;){var g=f,h=ii(b.i(g).Fc());Xd();var k=Yd().Eb,k=ce(h,k);if(!h.bc)for(var l=h.Sa;;){var n=l,p=b.i(g).i(n),t=p.zb,q=m.String.fromCharCode(p.af).toUpperCase(),x="transform\x3d'translate("+(38+r(10,n)|0)+","+(1+r(10,g)|0)+")'",D=a;if(!D.G&&!D.G){var Y=D.If.a.length,X=Vd((new Wd).Xa(D.If)).a.length,Z;Z=[];for(var pa=0;pa< -Y;){var ha;ha=[];for(var Pa=0;Pa=ha))for(ha=0;;){var Pa=ha,Qa=D.If.a[Pa].a.length,Ob=-1+Qa|0;if(!(0>=Qa))for(Qa=0;;){for(var Jc=Qa,xd=D.If.a[Pa].a[Jc].Qc,Kc=0,bd=xd.a.length;Kc>24&&0===(2&X.G)<<24>>24&&(Z=ki(li(),gg(qe(),X.zb)),Z.h()?pa=!0:(pa=Z.v(),pa=!(new E).e(pa).h()),X.xf=pa?Z:F(),X.G=(2|X.G)<<24>>24);X=p.He&&-1===("-VWXYZ".indexOf(q)|0);mi();D=(!0===rf(p)||2===D||"-"===q?"":"\x3cuse xlink:href\x3d'#oops' "+x+" style\x3d'opacity:0."+(1+D|0)+";'\x3e\x3c/use\x3e")+ +gi.prototype.Gk=function(a){var b=ke(a),c="create prototype ["+b.s()+","+b.t().s()+"]";Zc($c().Ke.Ad,c+"\n");c=b.Fc();Xd();Yd();Xd();Zd();var e=(new ae).b();if(!c.bc)for(var f=c.Sa;;){var g=f,h=ii(b.i(g).Fc());Xd();var k=Yd().Eb,k=ce(h,k);if(!h.bc)for(var l=h.Sa;;){var n=l,p=b.i(g).i(n),t=p.zb,q=m.String.fromCharCode(p.af).toUpperCase(),x="transform\x3d'translate("+(38+r(10,n)|0)+","+(1+r(10,g)|0)+")'",D=a;if(!D.G&&!D.G){var Y=D.If.a.length,X=Vd((new Wd).Xa(D.If)).a.length,Z;Z=[];for(var pa=0;pa< +Y;){var ha;ha=[];for(var Oa=0;Oa=ha))for(ha=0;;){var Oa=ha,Pa=D.If.a[Oa].a.length,Nb=-1+Pa|0;if(!(0>=Pa))for(Pa=0;;){for(var Jc=Pa,xd=D.If.a[Oa].a[Jc].Qc,Kc=0,bd=xd.a.length;Kc>24&&0===(2&X.G)<<24>>24&&(Z=ki(li(),gg(qe(),X.zb)),Z.h()?pa=!0:(pa=Z.v(),pa=!(new E).e(pa).h()),X.xf=pa?Z:F(),X.G=(2|X.G)<<24>>24);X=p.Ge&&-1===("-VWXYZ".indexOf(q)|0);mi();D=(!0===rf(p)||2===D||"-"===q?"":"\x3cuse xlink:href\x3d'#oops' "+x+" style\x3d'opacity:0."+(1+D|0)+";'\x3e\x3c/use\x3e")+ "\n |\x3cuse ";mi();p=D+(X?"data-formid\x3d'"+p.Ua+"' onclick\x3d'resetStitch(event)'":"")+"\n | xlink:href\x3d'#vc"+q+"'\n | id\x3d'svg-r"+(1+g|0)+"-c"+(1+n|0)+"'\n | "+x+"\n | style\x3d'stroke:#000;opacity:"+Y+";'\n |\x3e\x3ctitle\x3e"+t+"\x3c/title\x3e\n |\x3c/use\x3e\n |";mi();t=X;q=g;x=ke(a).i(q).i(n);t?(n="\x3cforeignObject x\x3d'"+(19+r(10,n)|0)+"' y\x3d'"+(970+r(10,q)|0)+"' width\x3d'4em' height\x3d'8'\x3e\n | \x3cinput name\x3d'"+ -x.Ua+"'\n | id\x3d'"+x.Ua+"'\n | type\x3d'text'\n | value\x3d'"+x.zb+"'\n | onchange\x3d'showProto(event)'\n | \x3e\x3c/input\x3e\n |\x3c/foreignObject\x3e\n |",n=(new E).e(n),n=Gb(n)):n="";n=(new E).e(p+n);k.da(Gb(n));if(l===h.we)break;l=l+h.Ha|0}g=k.X();fe(e,g);if(f===c.we)break;f=f+c.Ha|0}a=ge(e);a=he(a,"","\n","");this.G||this.G||(c=hi("-12,978 -6,0"),e=hi("-12,969 -7,7"),f=hi("-20,970 0,6"),g=hi("-29,969 7,7"),h=hi("-28,978 6,0"), +x.Ua+"'\n | id\x3d'"+x.Ua+"'\n | type\x3d'text'\n | value\x3d'"+x.zb+"'\n | onchange\x3d'showProto(event)'\n | \x3e\x3c/input\x3e\n |\x3c/foreignObject\x3e\n |",n=(new E).e(n),n=Gb(n)):n="";n=(new E).e(p+n);k.da(Gb(n));if(l===h.ve)break;l=l+h.Ha|0}g=k.X();fe(e,g);if(f===c.ve)break;f=f+c.Ha|0}a=ge(e);a=he(a,"","\n","");this.G||this.G||(c=hi("-12,978 -6,0"),e=hi("-12,969 -7,7"),f=hi("-20,970 0,6"),g=hi("-29,969 7,7"),h=hi("-28,978 6,0"), k=""+hi("-28,978 c 3,-2 4,-1 6,0")+hi("-28,978 c 2,2 4,1 6,0"),l=""+hi("-29,969 c 1,4 4,6 7,7")+hi("-29,969 c 4,1 6,4 7,7"),n=""+hi("-20,970 c 2,3 1,4 0,6")+hi("-20,970 c -2,3 -1,4 0,6"),p=""+hi("-12,969 c -4,1 -6,4 -7,7")+hi("-12,969 c -1,4 -4,6 -7,7"),t=""+hi("-12,978 c -3,-2 -4,-1 -6,0")+hi("-12,977 c -3,2 -4,1 -6,0"),q=hi("-20,960 0,16"),x=hi("-2,978 -16,0"),D=hi("-38,978 16,0"),b=H(),c=[ni(48,""+c+e),ni(49,""+c+f),ni(50,""+c+g),ni(51,""+h+c),ni(52,""+e+f),ni(53,""+e+g),ni(54,""+e+h),ni(55,""+ f+g),ni(56,""+f+h),ni(57,""+g+h),ni(65,""+c+q),ni(66,""+e+q),ni(67,""+q+g),ni(68,""+q+h),ni(69,""+x+e),ni(70,""+x+f),ni(71,""+x+q),ni(72,""+x+g),ni(73,""+x+h),ni(74,""+D+c),ni(75,""+x+D),ni(76,""+e+D),ni(77,""+f+D),ni(78,""+q+D),ni(79,""+g+D),ni(80,k),ni(81,l),ni(82,n),ni(83,p),ni(84,t),ni(86,h),ni(87,g),ni(88,f),ni(89,e),ni(90,c),ni(45,"")],this.Tp=Rc(b,(new L).xa(c)).Jb("\n "),this.G=!0);a=(new E).e('\x3csvg\n | xmlns\x3d"http://www.w3.org/2000/svg"\n | xmlns:xlink\x3d\'http://www.w3.org/1999/xlink\'\n | width\x3d"297mm"\n | height\x3d"210mm"\n | id\x3d"svg2"\n | version\x3d"1.1"\x3e\n | \x3cdefs id\x3d"defs4"\x3e\n | \x3cmarker orient\x3d"auto" refY\x3d"0" refX\x3d"0" id\x3d"Arrow1Mend" style\x3d"overflow:visible"\x3e\n | \x3cpath d\x3d"M 0,0 2,-5 -12.5,0 5,5 0,0 Z" style\x3d"fill-rule:evenodd;stroke-width:1pt" transform\x3d"matrix(-0.22,0,0,-0.22,-2,0)"\x3e\x3c/path\x3e\n | \x3c/marker\x3e\n | \x3c/defs\x3e\n | \x3cg id\x3d"layer1" transform\x3d"matrix(2.7,0,0,2.7,-10,-2600)"\x3e\n | \x3cg\x3e\n | \x3cpath id\x3d"oops"\n | d\x3d"m -15.737308,978.07528 a 4.4367617,4.4367617 0 0 1 -2.222417,3.84823 4.4428755,4.4428755 0 0 1 -4.443852,-0.002 4.4428755,4.4428755 0 0 1 -2.219481,-3.84991 l 4.442876,0.002"\n | style\x3d"fill:#000000;stroke:none;"\n | \x3e\x3c/path\x3e\n | '+ this.Tp+"\n | \x3c/g\x3e\n | "+a+"\n | \x3c/g\x3e\n |\x3c/svg\x3e\n |");return Gb(a)}; function ni(a,b){return'\x3cg id\x3d"vc'+(new M).aa(a)+'"\x3e\x3cpath style\x3d"fill:white;stroke-width:1" d\x3d"m -18.064645,978.05982 c 0,0.55229 -0.223858,1.05229 -0.585787,1.41422 -0.361929,0.36192 -0.861929,0.58578 -1.414213,0.58578 -0.552284,0 -1.052284,-0.22386 -1.414213,-0.58578 -0.361929,-0.36193 -0.585787,-0.86193 -0.585787,-1.41422 0,-0.55228 0.223858,-1.05228 0.585787,-1.41421 0.361929,-0.36193 0.861929,-0.58579 1.414213,-0.58579 0.552284,0 1.052284,0.22386 1.414213,0.58579 0.361929,0.36193 0.585787,0.86193 0.585787,1.41421 z"\x3e\x3c/path\x3e\x3ctext y\x3d"979.27722" x\x3d"-21.02791" style\x3d"font-size:3.3px;font-family:Arial;fill:#000000;stroke:none"\x3e'+(new M).aa(a)+ "\x3c/text\x3e"+b+"\x3c/g\x3e"}gi.prototype.create=function(a){return this.Gk(a)};gi.prototype.$classData=y({Lq:0},!1,"dibl.proto.PrototypeDiagram$",{Lq:1,c:1});var oi=void 0;function mi(){oi||(oi=(new gi).b());return oi}function pi(){this.pn=null}pi.prototype=new z;pi.prototype.constructor=pi;pi.prototype.b=function(){this.pn="[^0-9a-z-]+";return this}; -function qi(a,b){a=wc(xc(),b).w();b=sd(w(),b,"\x26",0);for(var c=(new Of).ae(Pf(Qf(),yf(na(b)))),e=0,f=b.a.length;ee)a="333333";else{a=da(da(e)/da(a.Cl.s()));e=da(.20000000298023224+da(.15000000596046448*da(e%3|0)));qd();var f=.5>e?da(e*da(2)):da(da(e+1)-da(1*e)),g=da(da(2*e)-f),h=Ja(da(255*Yh(g,f,da(.3333333432674408+a)))),e=Ja(da(255*Yh(g,f,a))),f=Ja(da(255*Yh(g,f,da(-.3333333432674408+a))));a=h|0;e|=0;f|=0;h=(new E).e("%02X%02X%02X");f=[a,e,f];w();a=h.d;H();Ve();e=[];h=0;for(g=f.length|0;h=h))for(h=0;;){k=h;n=a.gh.a[k].a.length;l=-1+n|0;if(!(0>=n))for(n=0;;){var p=n;rc(new sc,(new Wd).Xa(a.gh.a[k].a[p]),G(function(){return function(a){return null!==a}}(a))).K(G(function(a,b,c,e){return function(f){if(null!== f){var g=c+f.Qa()|0;f=e+f.Ja()|0;var h=0<=f&&f=f;f=-1+f|0;Xd();Yd();Xd();Zd();g=(new ae).b();if(!h)for(h=0;;){k=h;l=(new Di).Ib(0,a.gh.a[k].a.length,1);k=rc(new sc,l,G(function(a,b,c){return function(a){return 0<(b.a[c].a[a|0]%4|0)}}(a,c,k))).ia(G(function(a,b){return function(a){return(new N).r(b,a|0)}}(a,k)),(Xd(),Yd().Eb)); -fe(g,k);if(h===f)break;h=1+h|0}a.Cl=ge(g);f=(new Id).b();c=!1;c=!0;Jd(f,"");g=0;for(h=e.a.length;gf||0>g||f>=a.Ze||g>=a.uf)}throw(new C).g(e);}}(a,b,c)),g=(new Ef).vg(v(Ni));e.ab.K(G(function(a,b,c){return function(e){return a.ig.l(e)?c.da(b.l(e)):void 0}}(e,f,g)));for(var e=g.X(),f=null,f=[],g=0,h=e.a.length;g=c,c=-1+c|0;Xd();Yd();Xd();Zd();var f=(new ae).b();if(!e)for(e=0;;){var g=e,h=(new Di).Ib(0,a.gh.a[g].a.length,1),g=rc(new sc,h,G(function(a,b){return function(c){return 0!==a.gh.a[b].a[c|0].a.length}}(a,g))).oc(G(function(a,b,c){return function(a){a=Wi(b,c,a|0);a=(new E).e(a);for(var e=dc().Rm,e=ce(a,e),f=0,g=a.d.length|0;fe.R(g,a.a[-1+(b+f|0)|0])){for(var h=b,k=-1+(b+f|0)|0;1<(k-h|0);){var l=(h+k|0)>>>1|0;0>e.R(g,a.a[l])?k=l:h=l}h=h+(0>e.R(g,a.a[h])?0:1)|0;for(k=b+f|0;k>h;)a.a[k]=a.a[-1+k|0],k=-1+k|0;a.a[h]=g}f=1+f|0}}}function qj(a,b){a=b.a.length;for(var c=0;c!==a;)b.a[c]=0,c=1+c|0} function Dd(a,b,c){var e=new rj;e.$m=c;c=b.a.length;16=f||g.Jd(b.a[l],b.a[n]))?(c.a[a]=b.a[l],l=1+l|0):(c.a[a]=b.a[n],n=1+n|0),a=1+a|0;Na(c,e,b,e,h)}else pj(b,e,f,g)}oj.prototype.$classData=y({Hr:0},!1,"java.util.Arrays$",{Hr:1,c:1});var tj=void 0;function Ed(){tj||(tj=(new oj).b());return tj}function uj(){this.ao=null} uj.prototype=new z;uj.prototype.constructor=uj;uj.prototype.b=function(){vj=this;this.ao=new m.RegExp("(?:(\\d+)\\$)?([-#+ 0,\\(\x3c]*)(\\d+)?(?:\\.(\\d+))?[%A-Za-z]","g");return this};uj.prototype.$classData=y({Mr:0},!1,"java.util.Formatter$",{Mr:1,c:1});var vj=void 0;function wj(){}wj.prototype=new z;wj.prototype.constructor=wj;function xj(){}xj.prototype=wj.prototype;function yj(){}yj.prototype=new z;yj.prototype.constructor=yj;function zj(){}zj.prototype=yj.prototype;function Aj(){} -Aj.prototype=new z;Aj.prototype.constructor=Aj;function Bj(){}Bj.prototype=Aj.prototype;function xg(a,b){null===b?a=null:0===b.a.length?(Cj||(Cj=(new Dj).b()),a=Cj.tm):a=(new Ne).Xa(b);return a}function Kg(a,b){return null!==b?(new ji).fg(b):null}function Ej(a,b){return G(function(a,b){return function(f){f=a.Pg(f,Fj().uk);return Fj().uk!==f&&(b.l(f),!0)}}(a,b))}function Gj(a,b,c){return a.yd(b)?a.l(b):c.l(b)}function Hj(){this.Dn=this.Po=this.uk=null}Hj.prototype=new z;Hj.prototype.constructor=Hj; +Aj.prototype=new z;Aj.prototype.constructor=Aj;function Bj(){}Bj.prototype=Aj.prototype;function xg(a,b){null===b?a=null:0===b.a.length?(Cj||(Cj=(new Dj).b()),a=Cj.tm):a=(new Ne).Xa(b);return a}function Kg(a,b){return null!==b?(new ji).fg(b):null}function Ej(a,b){return G(function(a,b){return function(f){f=a.Pg(f,Fj().uk);return Fj().uk!==f&&(b.l(f),!0)}}(a,b))}function Gj(a,b,c){return a.xd(b)?a.l(b):c.l(b)}function Hj(){this.Dn=this.Po=this.uk=null}Hj.prototype=new z;Hj.prototype.constructor=Hj; Hj.prototype.b=function(){Ij=this;this.uk=(new Jj).b();this.Po=G(function(){return function(){return!1}}(this));this.Dn=(new Kj).b();return this};Hj.prototype.$classData=y({is:0},!1,"scala.PartialFunction$",{is:1,c:1});var Ij=void 0;function Fj(){Ij||(Ij=(new Hj).b());return Ij}function Lj(){}Lj.prototype=new z;Lj.prototype.constructor=Lj;Lj.prototype.b=function(){return this};Lj.prototype.$classData=y({ps:0},!1,"scala.Predef$DummyImplicit",{ps:1,c:1});function Mj(){}Mj.prototype=new z; Mj.prototype.constructor=Mj;Mj.prototype.b=function(){return this};Mj.prototype.$classData=y({qs:0},!1,"scala.Predef$any2stringadd$",{qs:1,c:1});var Nj=void 0;function Oj(){this.ab=this.Cg=null}Oj.prototype=new z;Oj.prototype.constructor=Oj;function Pj(){}Pj.prototype=Oj.prototype;function Qj(a,b){return a.ab.kf(a.Cg,b)}Oj.prototype.dr=function(a,b){this.Cg=b;if(null===a)throw Rj(Sj(),null);this.ab=a;return this};function Tj(){}Tj.prototype=new z;Tj.prototype.constructor=Tj;Tj.prototype.b=function(){return this}; Tj.prototype.$classData=y({Fs:0},!1,"scala.math.Ordered$",{Fs:1,c:1});var Uj=void 0;function Vj(){this.ab=this.Cg=null}Vj.prototype=new z;Vj.prototype.constructor=Vj;function Wj(a,b){return a.ab.qe(a.Cg,b)}function Xj(a,b){var c=new Vj;c.Cg=b;if(null===a)throw Rj(Sj(),null);c.ab=a;return c}function Yj(a,b){return a.ab.Jd(a.Cg,b)}Vj.prototype.$classData=y({Ss:0},!1,"scala.math.Ordering$Ops",{Ss:1,c:1});function Zj(){this.Sk=null;this.G=0}Zj.prototype=new z;Zj.prototype.constructor=Zj; Zj.prototype.b=function(){ak=this;(new bk).b();ck||(ck=(new dk).b());Ih();H();Yd();ek();mg();I();fk||(fk=(new gk).b());hk||(hk=(new ik).b());jk||(jk=(new kk).b());lk();mk||(mk=(new nk).b());this.Sk=Zd();ok||(ok=(new pk).b());oe();qk||(qk=(new rk).b());sk||(sk=(new tk).b());uk||(uk=(new vk).b());wk||(wk=(new xk).b());Uj||(Uj=(new Tj).b());yk||(yk=(new zk).b());Ak||(Ak=(new Bk).b());Ck||(Ck=(new Dk).b());Ek||(Ek=(new Fk).b());return this};Zj.prototype.$classData=y({Ws:0},!1,"scala.package$",{Ws:1,c:1}); var ak=void 0;function Gk(){ak||(ak=(new Zj).b());return ak}function Hk(){}Hk.prototype=new z;Hk.prototype.constructor=Hk;Hk.prototype.b=function(){Ik=this;Jk();Kk();Lk();Mk();Nk();Ok();Pk();Qk();Rk();Sk||(Sk=(new Tk).b());Xe();Uk||(Uk=(new Vk).b());Wk();Xk();return this};Hk.prototype.$classData=y({Ys:0},!1,"scala.reflect.ClassManifestFactory$",{Ys:1,c:1});var Ik=void 0;function Yk(){}Yk.prototype=new z;Yk.prototype.constructor=Yk;Yk.prototype.b=function(){return this}; -Yk.prototype.$classData=y({at:0},!1,"scala.reflect.ManifestFactory$",{at:1,c:1});var Zk=void 0;function $k(){}$k.prototype=new z;$k.prototype.constructor=$k;$k.prototype.b=function(){al=this;Ik||(Ik=(new Hk).b());Zk||(Zk=(new Yk).b());return this};$k.prototype.$classData=y({qt:0},!1,"scala.reflect.package$",{qt:1,c:1});var al=void 0;function bl(){this.td=null}bl.prototype=new z;bl.prototype.constructor=bl;bl.prototype.w=function(){return"DynamicVariable("+this.td+")"}; -bl.prototype.g=function(a){this.td=a;return this};bl.prototype.$classData=y({rt:0},!1,"scala.util.DynamicVariable",{rt:1,c:1});function cl(){}cl.prototype=new z;cl.prototype.constructor=cl;cl.prototype.b=function(){(new dl).b();return this};cl.prototype.$classData=y({xt:0},!1,"scala.util.control.Breaks",{xt:1,c:1});function el(){}el.prototype=new z;el.prototype.constructor=el;el.prototype.b=function(){return this}; +Yk.prototype.$classData=y({at:0},!1,"scala.reflect.ManifestFactory$",{at:1,c:1});var Zk=void 0;function $k(){}$k.prototype=new z;$k.prototype.constructor=$k;$k.prototype.b=function(){al=this;Ik||(Ik=(new Hk).b());Zk||(Zk=(new Yk).b());return this};$k.prototype.$classData=y({qt:0},!1,"scala.reflect.package$",{qt:1,c:1});var al=void 0;function bl(){this.Ad=null}bl.prototype=new z;bl.prototype.constructor=bl;bl.prototype.w=function(){return"DynamicVariable("+this.Ad+")"}; +bl.prototype.g=function(a){this.Ad=a;return this};bl.prototype.$classData=y({rt:0},!1,"scala.util.DynamicVariable",{rt:1,c:1});function cl(){}cl.prototype=new z;cl.prototype.constructor=cl;cl.prototype.b=function(){(new dl).b();return this};cl.prototype.$classData=y({xt:0},!1,"scala.util.control.Breaks",{xt:1,c:1});function el(){}el.prototype=new z;el.prototype.constructor=el;el.prototype.b=function(){return this}; function fl(a,b){return b&&b.$classData&&b.$classData.q.Rw||b&&b.$classData&&b.$classData.q.Qw||b&&b.$classData&&b.$classData.q.Ow||b&&b.$classData&&b.$classData.q.Pw||b&&b.$classData&&b.$classData.q.Oo?F():(new J).g(b)}el.prototype.$classData=y({At:0},!1,"scala.util.control.NonFatal$",{At:1,c:1});var gl=void 0;function hl(){gl||(gl=(new el).b());return gl}function il(){}il.prototype=new z;il.prototype.constructor=il;function jl(){}jl.prototype=il.prototype; il.prototype.qj=function(a,b){b=r(-862048943,b);b=r(461845907,b<<15|b>>>17|0);return a^b};il.prototype.ua=function(a,b){a=this.qj(a,b);return-430675100+r(5,a<<13|a>>>19|0)|0};function kl(a){var b=ll(),c=a.wb();if(0===c)return a=a.yb(),Da(w(),a);for(var e=-889275714,f=0;f>>16|0));a=r(-1028477387,a^(a>>>13|0));return a^(a>>>16|0)}; function ol(a,b,c){var e=(new we).Ab(0);c=(new we).Ab(c);b.K(G(function(a,b,c){return function(e){c.H=a.ua(c.H,ml(S(),e));b.H=1+b.H|0}}(a,e,c)));return a.nc(c.H,e.H)}function pl(){}pl.prototype=new z;pl.prototype.constructor=pl;pl.prototype.b=function(){return this};function ql(a,b){a=r(-1640532531,b);Bg();return r(-1640532531,a<<24|16711680&a<<8|65280&(a>>>8|0)|a>>>24|0)}pl.prototype.$classData=y({Ct:0},!1,"scala.util.hashing.package$",{Ct:1,c:1});var rl=void 0; function sl(){rl||(rl=(new pl).b());return rl}function kk(){}kk.prototype=new z;kk.prototype.constructor=kk;kk.prototype.b=function(){return this};kk.prototype.$classData=y({Ft:0},!1,"scala.collection.$colon$plus$",{Ft:1,c:1});var jk=void 0;function ik(){}ik.prototype=new z;ik.prototype.constructor=ik;ik.prototype.b=function(){return this};ik.prototype.$classData=y({Gt:0},!1,"scala.collection.$plus$colon$",{Gt:1,c:1});var hk=void 0;function tl(){this.Gd=null}tl.prototype=new z; -tl.prototype.constructor=tl;tl.prototype.b=function(){ul=this;this.Gd=(new vl).b();return this};tl.prototype.$classData=y({Lt:0},!1,"scala.collection.Iterator$",{Lt:1,c:1});var ul=void 0;function ek(){ul||(ul=(new tl).b());return ul}function Jg(a,b,c){a.Vc(b,c,wl(xl(),b)-c|0)}function yl(a,b){b=b.Rg();b.eb(a.Ga());return b.X()}function he(a,b,c,e){return a.Vd((new Id).b(),b,c,e).Mb.Ya} +tl.prototype.constructor=tl;tl.prototype.b=function(){ul=this;this.Gd=(new vl).b();return this};tl.prototype.$classData=y({Lt:0},!1,"scala.collection.Iterator$",{Lt:1,c:1});var ul=void 0;function ek(){ul||(ul=(new tl).b());return ul}function Jg(a,b,c){a.Vc(b,c,wl(xl(),b)-c|0)}function yl(a,b){b=b.Rg();b.eb(a.Ga());return b.X()}function he(a,b,c,e){return a.Vd((new Id).b(),b,c,e).Mb.$a} function El(a,b,c){b=(new Ri).g(b);a.K(G(function(a,b,c){return function(a){c.H=Wi(b,c.H,a)}}(a,c,b)));return b.H}function Fl(a){var b=(new we).Ab(0);a.K(G(function(a,b){return function(){b.H=1+b.H|0}}(a,b)));return b.H} function Ke(a,b){var c=(new nb).b();try{if(a&&a.$classData&&a.$classData.q.qd)var e=a;else{if(!(a&&a.$classData&&a.$classData.q.wa))return a.K(b.ok(G(function(a,b){return function(a){throw(new Gl).j(b,(new J).g(a));}}(a,c)))),F();e=a.vf()}for(var f=new Hl;e.U();){var g=b.Pg(e.M(),f);if(g!==f)return(new J).g(g)}return F()}catch(h){if(h&&h.$classData&&h.$classData.q.bm&&h.wl===c)return h.mm;throw h;}} function Il(a,b){if(a.h())throw(new Jl).e("empty.min");return a.Jc(Vi(function(a,b){return function(a,c){return b.Jd(a,c)?a:c}}(a,b)))}function Kl(a,b,c,e,f){var g=Qi(!0);Jd(b,c);a.K(G(function(a,b,c,e){return function(a){if(e.H)Kd(b,a),e.H=!1;else return Jd(b,c),Kd(b,a)}}(a,b,e,g)));Jd(b,f);return b}function Ll(a,b){if(a.h())throw(new Jl).e("empty.max");return a.Jc(Vi(function(a,b){return function(a,c){return b.me(a,c)?a:c}}(a,b)))} -function Ml(a,b){return a.Ie()?(b=b.Kd(a.s()),a.Ee(b,0),b):a.lc().jd(b)}function Nl(a,b){if(a.h())throw(new Jl).e("empty.reduceLeft");var c=Qi(!0),e=(new Ri).g(0);a.K(G(function(a,b,c,e){return function(a){c.H?(e.H=a,c.H=!1):e.H=Wi(b,e.H,a)}}(a,b,c,e)));return e.H}function Ol(){}Ol.prototype=new z;Ol.prototype.constructor=Ol;function Pl(){}Pl.prototype=Ol.prototype;function cc(a,b){return a.fa().eb(b).X()}Ol.prototype.fa=function(){return Fc(new Gc,this.En())};function Ql(){}Ql.prototype=new z; +function Ml(a,b){return a.He()?(b=b.Kd(a.s()),a.De(b,0),b):a.lc().jd(b)}function Nl(a,b){if(a.h())throw(new Jl).e("empty.reduceLeft");var c=Qi(!0),e=(new Ri).g(0);a.K(G(function(a,b,c,e){return function(a){c.H?(e.H=a,c.H=!1):e.H=Wi(b,e.H,a)}}(a,b,c,e)));return e.H}function Ol(){}Ol.prototype=new z;Ol.prototype.constructor=Ol;function Pl(){}Pl.prototype=Ol.prototype;function cc(a,b){return a.fa().eb(b).X()}Ol.prototype.fa=function(){return Fc(new Gc,this.En())};function Ql(){}Ql.prototype=new z; Ql.prototype.constructor=Ql;function Rl(){}Rl.prototype=Ql.prototype;function Rc(a,b){if(b.h())return a.Wg();a=a.fa();a.eb(b);return a.X()}Ql.prototype.Wg=function(){return this.fa().X()};function Sl(a,b){a:for(;;){if(!b.h()){a.Yb(b.t());b=b.z();continue a}break}}function fe(a,b){b&&b.$classData&&b.$classData.q.zj?Sl(a,b):b.K(G(function(a){return function(b){return a.Yb(b)}}(a)));return a}function Tl(){}Tl.prototype=new z;Tl.prototype.constructor=Tl;function Ul(){}Ul.prototype=Tl.prototype; function nk(){}nk.prototype=new z;nk.prototype.constructor=nk;nk.prototype.b=function(){return this};nk.prototype.$classData=y({Yu:0},!1,"scala.collection.immutable.Stream$$hash$colon$colon$",{Yu:1,c:1});var mk=void 0;function Vl(){this.Wp=null}Vl.prototype=new z;Vl.prototype.constructor=Vl;function Wl(a,b){a.Wp=b;return a}function Xl(a,b){return Yl(new Zl,b,a.Wp)}Vl.prototype.$classData=y({Zu:0},!1,"scala.collection.immutable.Stream$ConsWrapper",{Zu:1,c:1}); -function $l(){this.cm=this.td=null;this.G=!1;this.ab=null}$l.prototype=new z;$l.prototype.constructor=$l;function am(a,b,c){a.cm=c;if(null===b)throw Rj(Sj(),null);a.ab=b;return a}function bm(a){a.G||(a.G||(a.td=cm(a.cm),a.G=!0),a.cm=null);return a.td}$l.prototype.$classData=y({dv:0},!1,"scala.collection.immutable.StreamIterator$LazyCell",{dv:1,c:1});function dm(){}dm.prototype=new z;dm.prototype.constructor=dm;dm.prototype.b=function(){return this}; +function $l(){this.cm=this.Ad=null;this.G=!1;this.ab=null}$l.prototype=new z;$l.prototype.constructor=$l;function am(a,b,c){a.cm=c;if(null===b)throw Rj(Sj(),null);a.ab=b;return a}function bm(a){a.G||(a.G||(a.Ad=cm(a.cm),a.G=!0),a.cm=null);return a.Ad}$l.prototype.$classData=y({dv:0},!1,"scala.collection.immutable.StreamIterator$LazyCell",{dv:1,c:1});function dm(){}dm.prototype=new z;dm.prototype.constructor=dm;dm.prototype.b=function(){return this}; function em(a,b,c,e){a=0>c?0:c;return e<=a||a>=(b.length|0)?"":b.substring(a,e>(b.length|0)?b.length|0:e)}dm.prototype.$classData=y({fv:0},!1,"scala.collection.immutable.StringOps$",{fv:1,c:1});var fm=void 0;function gm(){fm||(fm=(new dm).b());return fm}function hm(){}hm.prototype=new z;hm.prototype.constructor=hm;hm.prototype.b=function(){return this};hm.prototype.fa=function(){var a=(new Id).b();return im(new jm,a,G(function(){return function(a){return(new Md).e(a)}}(this)))}; hm.prototype.$classData=y({nv:0},!1,"scala.collection.immutable.WrappedString$",{nv:1,c:1});var km=void 0;function lm(){}lm.prototype=new z;lm.prototype.constructor=lm;lm.prototype.b=function(){return this};lm.prototype.$classData=y({sv:0},!1,"scala.collection.mutable.ArrayOps$ofBoolean$",{sv:1,c:1});var mm=void 0;function nm(){}nm.prototype=new z;nm.prototype.constructor=nm;nm.prototype.b=function(){return this}; nm.prototype.$classData=y({tv:0},!1,"scala.collection.mutable.ArrayOps$ofByte$",{tv:1,c:1});var om=void 0;function pm(){}pm.prototype=new z;pm.prototype.constructor=pm;pm.prototype.b=function(){return this};pm.prototype.$classData=y({uv:0},!1,"scala.collection.mutable.ArrayOps$ofChar$",{uv:1,c:1});var qm=void 0;function rm(){}rm.prototype=new z;rm.prototype.constructor=rm;rm.prototype.b=function(){return this}; @@ -240,9 +240,9 @@ e|0;e===b.a.length?e=b:(a=u(B(oa),[e]),Na(b,0,a,0,e),e=a)}}return e}function pn( function Ye(a,b){var c=(new qn).b();if(c.lj)throw(new rn).b();for(var e=0,f=0,g=a.length|0,h=0;h!==g;){var k=a.indexOf("%",h)|0;if(0>k){sn(c,a.substring(h));break}sn(c,a.substring(h,k));h=1+k|0;vj||(vj=(new uj).b());var l=vj.ao;l.lastIndex=h;k=l.exec(a);if(null===k||(k.index|0)!==h)throw c=h===g?"%":a.substring(h,1+h|0),(new tn).e(c);for(var h=l.lastIndex|0,l=65535&(a.charCodeAt(-1+h|0)|0),n,p=k[2],t=90>=l?256:0,q=p.length|0,x=0;x!==q;){n=65535&(p.charCodeAt(x)|0);switch(n){case 45:var D=1;break; case 35:D=2;break;case 43:D=4;break;case 32:D=8;break;case 48:D=16;break;case 44:D=32;break;case 40:D=64;break;case 60:D=128;break;default:throw(new C).g((new M).aa(n));}if(0!==(t&D))throw(new un).e(m.String.fromCharCode(n));t|=D;x=1+x|0}n=t;q=vn(k[3],-1);t=vn(k[4],-1);if(37===l||110===l)k=null;else{if(0!==(1&n)&&0>q)throw(new wn).e("%"+k[0]);0!==(128&n)?p=f:(p=vn(k[1],0),p=0===p?e=1+e|0:0>p?f:p);if(0>=p||p>b.a.length){c=m.String.fromCharCode(l);if(0>("bBhHsHcCdoxXeEgGfn%".indexOf(c)|0))throw(new tn).e(c); throw(new xn).e("%"+k[0]);}f=p;k=b.a[-1+p|0]}p=c;x=k;D=l;k=n;l=q;q=t;switch(D){case 98:case 66:0!==(126&k)&&yn(k,D,126);zn(p,k,l,q,!1===x||null===x?"false":"true");break;case 104:case 72:0!==(126&k)&&yn(k,D,126);t=null===x?"null":(+(Ca(x)>>>0)).toString(16);zn(p,k,l,q,t);break;case 115:case 83:x&&x.$classData&&x.$classData.q.Sw?(0!==(124&k)&&yn(k,D,124),x.Lw(p,(0!==(1&k)?1:0)|(0!==(2&k)?4:0)|(0!==(256&k)?2:0),l,q)):(0!==(126&k)&&yn(k,D,126),zn(p,k,l,q,""+x));break;case 99:case 67:0!==(126&k)&&yn(k, -D,126);if(0<=q)throw(new An).Ab(q);if(Bn(x))zn(p,k,l,-1,m.String.fromCharCode(null===x?0:x.ca));else if(Oa(x)){t=x|0;if(!(0<=t&&1114111>=t))throw(new Cn).Ab(t);t=65536>t?m.String.fromCharCode(t):m.String.fromCharCode(-64+(t>>10)|55296,56320|1023&t);zn(p,k,l,-1,t)}else Dn(p,x,D,k,l,q);break;case 100:0!==(2&k)&&yn(k,D,2);17!==(17&k)&&12!==(12&k)||En(k);if(0<=q)throw(new An).Ab(q);Oa(x)?Fn(p,k,l,""+(x|0)):za(x)?(q=Ra(x),t=q.va,q=q.Oa,Fn(p,k,l,Gn(Sa(),t,q))):Dn(p,x,D,k,l,q);break;case 111:0!==(108&k)&& -yn(k,D,108);17===(17&k)&&En(k);if(0<=q)throw(new An).Ab(q);t=0!==(2&k)?"0":"";Oa(x)?(q=(+((x|0)>>>0)).toString(8),Hn(p,k,l,t,q)):za(x)?(q=Ra(x),x=q.va,n=q.Oa,In||(In=(new Jn).b()),q=1073741823&x,D=1073741823&((x>>>30|0)+(n<<2)|0),x=n>>>28|0,0!==x?(x=(+(x>>>0)).toString(8),n=(+(D>>>0)).toString(8),D="0000000000".substring(n.length|0),q=(+(q>>>0)).toString(8),q=x+(""+D+n)+(""+"0000000000".substring(q.length|0)+q)):0!==D?(x=(+(D>>>0)).toString(8),q=(+(q>>>0)).toString(8),q=x+(""+"0000000000".substring(q.length| -0)+q)):q=(+(q>>>0)).toString(8),Hn(p,k,l,t,q)):Dn(p,x,D,k,l,q);break;case 120:case 88:0!==(108&k)&&yn(k,D,108);17===(17&k)&&En(k);if(0<=q)throw(new An).Ab(q);t=0===(2&k)?"":0!==(256&k)?"0X":"0x";Oa(x)?(q=(+((x|0)>>>0)).toString(16),Hn(p,k,l,t,Kn(k,q))):za(x)?(q=Ra(x),x=q.va,n=q.Oa,In||(In=(new Jn).b()),q=k,0!==n?(n=(+(n>>>0)).toString(16),x=(+(x>>>0)).toString(16),x=n+(""+"00000000".substring(x.length|0)+x)):x=(+(x>>>0)).toString(16),Hn(p,q,l,t,Kn(k,x))):Dn(p,x,D,k,l,q);break;case 101:case 69:0!== +D,126);if(0<=q)throw(new An).Ab(q);if(Bn(x))zn(p,k,l,-1,m.String.fromCharCode(null===x?0:x.ca));else if(Qa(x)){t=x|0;if(!(0<=t&&1114111>=t))throw(new Cn).Ab(t);t=65536>t?m.String.fromCharCode(t):m.String.fromCharCode(-64+(t>>10)|55296,56320|1023&t);zn(p,k,l,-1,t)}else Dn(p,x,D,k,l,q);break;case 100:0!==(2&k)&&yn(k,D,2);17!==(17&k)&&12!==(12&k)||En(k);if(0<=q)throw(new An).Ab(q);Qa(x)?Fn(p,k,l,""+(x|0)):za(x)?(q=Ra(x),t=q.va,q=q.Oa,Fn(p,k,l,Gn(Sa(),t,q))):Dn(p,x,D,k,l,q);break;case 111:0!==(108&k)&& +yn(k,D,108);17===(17&k)&&En(k);if(0<=q)throw(new An).Ab(q);t=0!==(2&k)?"0":"";Qa(x)?(q=(+((x|0)>>>0)).toString(8),Hn(p,k,l,t,q)):za(x)?(q=Ra(x),x=q.va,n=q.Oa,In||(In=(new Jn).b()),q=1073741823&x,D=1073741823&((x>>>30|0)+(n<<2)|0),x=n>>>28|0,0!==x?(x=(+(x>>>0)).toString(8),n=(+(D>>>0)).toString(8),D="0000000000".substring(n.length|0),q=(+(q>>>0)).toString(8),q=x+(""+D+n)+(""+"0000000000".substring(q.length|0)+q)):0!==D?(x=(+(D>>>0)).toString(8),q=(+(q>>>0)).toString(8),q=x+(""+"0000000000".substring(q.length| +0)+q)):q=(+(q>>>0)).toString(8),Hn(p,k,l,t,q)):Dn(p,x,D,k,l,q);break;case 120:case 88:0!==(108&k)&&yn(k,D,108);17===(17&k)&&En(k);if(0<=q)throw(new An).Ab(q);t=0===(2&k)?"":0!==(256&k)?"0X":"0x";Qa(x)?(q=(+((x|0)>>>0)).toString(16),Hn(p,k,l,t,Kn(k,q))):za(x)?(q=Ra(x),x=q.va,n=q.Oa,In||(In=(new Jn).b()),q=k,0!==n?(n=(+(n>>>0)).toString(16),x=(+(x>>>0)).toString(16),x=n+(""+"00000000".substring(x.length|0)+x)):x=(+(x>>>0)).toString(16),Hn(p,q,l,t,Kn(k,x))):Dn(p,x,D,k,l,q);break;case 101:case 69:0!== (32&k)&&yn(k,D,32);17!==(17&k)&&12!==(12&k)||En(k);"number"===typeof x?(t=+x,t!==t||Infinity===t||-Infinity===t?Ln(p,k,l,t):Fn(p,k,l,Mn(t,0<=q?q:6,0!==(2&k)))):Dn(p,x,D,k,l,q);break;case 103:case 71:0!==(2&k)&&yn(k,D,2);17!==(17&k)&&12!==(12&k)||En(k);"number"===typeof x?(x=+x,x!==x||Infinity===x||-Infinity===x?Ln(p,k,l,x):(t=k,n=0<=q?q:6,k=0!==(2&k),q=+m.Math.abs(x),n=0===n?1:n,1E-4<=q&&q<+m.Math.pow(10,n)?(D=void 0!==m.Math.log10?+m.Math.log10(q):+m.Math.log(q)/2.302585092994046,D=Ja(+m.Math.ceil(D)), q=+m.Math.pow(10,D)<=q?1+D|0:D,q=n-q|0,k=Nn(x,0l)throw(new wn).e("%-%");Qn(p,k,l,"%");break;case 110:if(0!==(255&k))throw(new On).e(Pn(k));if(0<=q)throw(new An).Ab(q);if(0<=l)throw(new Rn).Ab(l); sn(p,"\n");break;default:throw(new tn).e(m.String.fromCharCode(D));}}a=c.w();c.Uj();return a} @@ -271,7 +271,7 @@ function cj(){}cj.prototype=new aj;cj.prototype.constructor=cj;cj.prototype.b=fu Uo.prototype.km=function(a,b,c,e){return(new N).r((a+c|0)%c|0,(b+e|0)%e|0)};Uo.prototype.$classData=y({Pq:0},!1,"dibl.sheet.Checker$",{Pq:1,Tq:1,c:1});var Vo=void 0;function dj(){Vo||(Vo=(new Uo).b());return Vo}function Wo(){}Wo.prototype=new z;Wo.prototype.constructor=Wo;function Xo(){}Xo.prototype=Wo.prototype;function Ao(a){return!!(a&&a.$classData&&a.$classData.q.Kh||"number"===typeof a)}function Yo(){this.ej=this.pj=this.ii=null;this.Xi=this.oj=0}Yo.prototype=new z;Yo.prototype.constructor=Yo; Yo.prototype.A=function(a){return a&&a.$classData&&a.$classData.q.io?this.ej===a.ej&&this.oj===a.oj&&this.ii===a.ii&&this.pj===a.pj:!1};Yo.prototype.w=function(){var a="";"\x3cjscode\x3e"!==this.ii&&(a=""+a+this.ii+".");a=""+a+this.pj;null===this.ej?a+="(Unknown Source)":(a=a+"("+this.ej,0<=this.oj&&(a=a+":"+this.oj,0<=this.Xi&&(a=a+":"+this.Xi)),a+=")");return a};Yo.prototype.L=function(){var a=this.ii,a=Da(w(),a),b=this.pj;return a^Da(w(),b)};Yo.prototype.setColumnNumber=function(a){this.Xi=a|0}; Yo.prototype.getColumnNumber=function(){return this.Xi};var Zo=y({io:0},!1,"java.lang.StackTraceElement",{io:1,c:1,f:1});Yo.prototype.$classData=Zo;function W(){this.Xj=this.Ei=null;this.gq=!1;this.Ki=null}W.prototype=new z;W.prototype.constructor=W;function $o(){}$o.prototype=W.prototype; -W.prototype.fj=function(){if(void 0===m.Error.captureStackTrace){try{var a={}.undef()}catch(b){if(a=so(Sj(),b),null!==a)if(ro(a))a=a.$g;else throw Rj(Sj(),a);else throw b;}this.stackdata=a}else m.Error.captureStackTrace(this),this.stackdata=this;return this};W.prototype.Ge=function(){return this.Ei};W.prototype.w=function(){var a=pb(na(this)),b=this.Ge();return null===b?a:a+": "+b}; +W.prototype.fj=function(){if(void 0===m.Error.captureStackTrace){try{var a={}.undef()}catch(b){if(a=so(Sj(),b),null!==a)if(ro(a))a=a.$g;else throw Rj(Sj(),a);else throw b;}this.stackdata=a}else m.Error.captureStackTrace(this),this.stackdata=this;return this};W.prototype.Fe=function(){return this.Ei};W.prototype.w=function(){var a=pb(na(this)),b=this.Fe();return null===b?a:a+": "+b}; function ap(a){if(null===a.Ki){var b;if(a.gq){no||(no=(new Xn).b());b=no;var c=a.stackdata,e;if(c){if(0===(1&b.G)<<24>>24&&0===(1&b.G)<<24>>24){a:try{m.Packages.org.mozilla.javascript.JavaScriptException,e=!0}catch(q){e=so(Sj(),q);if(null!==e){if(ro(e)){e=!1;break a}throw Rj(Sj(),e);}throw q;}b.Xn=e;b.G=(1|b.G)<<24>>24}if(b.Xn)e=c.stack,e=(void 0===e?"":e).replace(ho("^\\s+at\\s+","gm"),"").replace(ho("^(.+?)(?: \\((.+)\\))?$","gm"),"$2@$1").replace(ho("\\r\\n?","gm"),"\n").split("\n");else if(c.arguments&& c.stack)e=fo(c);else if(c.stack&&c.sourceURL)e=c.stack.replace(ho("\\[native code\\]\\n","m"),"").replace(ho("^(?\x3d\\w+Error\\:).*$\\n","m"),"").replace(ho("^@","gm"),"{anonymous}()@").split("\n");else if(c.stack&&c.number)e=c.stack.replace(ho("^\\s*at\\s+(.*)$","gm"),"$1").replace(ho("^Anonymous function\\s+","gm"),"{anonymous}() ").replace(ho("^([^\\(]+|\\{anonymous\\}\\(\\))\\s+\\((.+)\\)$","gm"),"$1@$2").split("\n").slice(1);else if(c.stack&&c.fileName)e=c.stack.replace(ho("(?:\\n@:0)?\\s+$", "m"),"").replace(ho("^(?:\\((\\S*)\\))?@","gm"),"{anonymous}($1)@").split("\n");else if(c.message&&c["opera#sourceloc"])if(c.stacktrace)if(-1c.stacktrace.split("\n").length)e=mo(c);else{e=ho("Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$","i");for(var c=c.stacktrace.split("\n"),f=[],g=0,h=c.length|0;g=+m.Math.abs(c.qa-a.qa)?60>=+m.Math.abs(c.Ca-a.Ca):!1}}(a,c)),!1);c=H();return(new K).j(f,e.ub(a,c.p))}var h=b.t(),g=Qg(h)?Rc(H(),(new L).xa([h.Mf,h.$f])):Rc(H(),(new L).xa([h.Mf,h.$f,h.sg,h.ag])),h=Qg(h)?Rc(H(),(new L).xa([h.bg,h.Nf])):Rc(H(),(new L).xa([h.bg,h.Nf, -h.cg,h.tg])),k=g.Fc(),l=c;Xd();var n=Yd().Eb,n=ce(k,n);if(!k.bc)for(var p=k.Sa;;){var t=p,q=l.i(g.i(t)|0);n.da(Yp(ye(),h.i(t)|0,q.qa,100+q.Ca));if(p===k.we)break;p=p+k.Ha|0}k=n.X();l=g.Fc();n=c;Xd();p=Yd().Eb;p=ce(l,p);if(!l.bc)for(t=l.Sa;;){q=t;p.da(Sc(Vc(),g.i(q)|0,n.s()+q|0,h.i(q)|0,0===(q%2|0)));if(t===l.we)break;t=t+l.Ha|0}h=p.X();g=G(function(){return function(a){return a.ha}}(a));l=H();g=h.ia(g,l.p);b=b.z();l=H();c=c.ub(k,l.p);k=H();e=e.ub(h,k.p);h=H();f=f.ub(g,h.p)}} +h.cg,h.tg])),k=g.Fc(),l=c;Xd();var n=Yd().Eb,n=ce(k,n);if(!k.bc)for(var p=k.Sa;;){var t=p,q=l.i(g.i(t)|0);n.da(Yp(ye(),h.i(t)|0,q.qa,100+q.Ca));if(p===k.ve)break;p=p+k.Ha|0}k=n.X();l=g.Fc();n=c;Xd();p=Yd().Eb;p=ce(l,p);if(!l.bc)for(t=l.Sa;;){q=t;p.da(Sc(Vc(),g.i(q)|0,n.s()+q|0,h.i(q)|0,0===(q%2|0)));if(t===l.ve)break;t=t+l.Ha|0}h=p.X();g=G(function(){return function(a){return a.ha}}(a));l=H();g=h.ia(g,l.p);b=b.z();l=H();c=c.ub(k,l.p);k=H();e=e.ub(h,k.p);h=H();f=f.ub(g,h.p)}} aq.prototype.$classData=y({xq:0},!1,"dibl.Threads$",{xq:1,c:1,k:1,f:1});var bq=void 0;function Cg(){bq||(bq=(new aq).b());return bq}function cq(){this.aj=0}cq.prototype=new z;cq.prototype.constructor=cq;cq.prototype.b=function(){this.aj=1E5;return this}; -cq.prototype.create=function(a,b,c,e){b=[];for(var f=e.length|0,g=0;gk.Ng()&&f.push(k);g=1+g|0}Zc($c().se.td,f+"\n");if(2!==(f.length|0))a="no null space: "+f,Zc($c().se.td,a+"\n"),a=Hc();else{b=[];g=0;for(h=f.length|0;gk.Ng()&&f.push(k);g=1+g|0}Zc($c().Ke.Ad,f+"\n");if(2!==(f.length|0))a="no null space: "+f,Zc($c().Ke.Ad,a+"\n"),a=Hc();else{b=[];g=0;for(h=f.length|0;g=h)var l=0;else c=h>>31,l=(0===c?-1<(-2147483648^h):0l&&ne(oe(),0,h,1,!1);if(!k)for(h=0;;){l=h;k=a.i(l);l=(new Sh).fc(+g[l].i(b),+g[l].i(f));k=(new K).j(k,l);se(e,k);if(h===c)break;h=1+h|0}c=ge(e);a=Fc(new Gc,Hc());for(c=te(c);c.Og;)e=c.M(),Ic(a,e);a=a.sa}return a};cq.prototype.$classData=y({Bq:0},!1,"dibl.fte.Delta$",{Bq:1,c:1,k:1,f:1});var dq=void 0; function eq(){dq||(dq=(new cq).b());return dq}function fq(){}fq.prototype=new z;fq.prototype.constructor=fq;function gq(a,b){a=G(function(){return function(a){return a.kc}}(a));var c=H();return b.ia(a,c.p).Bc()}fq.prototype.b=function(){return this}; function hq(a,b,c,e){for(;;){var f=gq(a,b).Tn(gq(a,c));if(!f.h())return(new K).j(iq(a,b,f),iq(a,c,f));var g=b.nb().kc,f=c.nb().kc,g=e.l(g).Pc(G(function(){return function(a){return a.tl}}(a))),f=e.l(f).Pc(G(function(){return function(a){return a.hf}}(a))),h=H();b=b.ub(g,h.p);g=H();c=c.ub(f,g.p)}}function iq(a,b,c){if(c.h())return b;var e=b.Rf();a=G(function(){return function(a){return a.kc}}(a));var f=H();c=e.ia(a,f.p).Hd(c.t());return e.rc(c,b.s())} @@ -314,30 +314,30 @@ function nh(a,b){b=qc(b,G(function(){return function(a){return a.gd}}(a)));for(v function oh(){kq||(kq=(new fq).b());return kq}function lq(){}lq.prototype=new z;lq.prototype.constructor=lq;lq.prototype.b=function(){return this};function mq(a,b){if(null===a)throw(new Se).b();if(Bf(Cf(),"[lr]o",a))return!0;if(null===b)throw(new Se).b();return Bf(Cf(),"[lr]i",b)} function nq(a,b,c,e){c=Xc(ld(),c,b,G(function(){return function(a){return a.ha}}(a)),e).ak(O(function(){return function(){H();Dc();return(new Ec).b().cc()}}(a)));b=oq(pq(),c,b);a=G(function(){return function(a){return(new K).j(a.gd,a.kc)}}(a));c=Te();e=Te();return Ue(b,a,qq(c,e))} function oq(a,b,c){a=G(function(a,b,c){return function(a){var e;e=pq();var l=b.Pa.i(a.Fa).xg,n=rq(a);e="cross"===l&&!0===n||!("cross"===l&&!1===n)&&("twist"===l&&!1===n||!("twist"===l&&!0===n)&&sq(e,a,b,c));var l=b.Pa.i(a.Fa).Ua,n=pq(),p=b.Pa.i(a.ha).xg,t=rq(a),n="cross"===p&&!0===t||!("cross"===p&&!1===t)&&("twist"===p&&!1===t||!("twist"===p&&!0===t)&&tq(n,a,b,c));return uq(new er,e,l,n,b.Pa.i(a.ha).Ua,1)}}(a,c,b));c=H();return b.ia(a,c.p)} -function fr(a,b){a=(new nb).b();try{var c=Hb(w(),b,"\\s+",""),e=sd(w(),c,";",0),f=(new Ne).Xa(e),g=H().p,h=ce(f,g);b=0;for(var k=f.m();b>24?hr(Pb):Pb.gl).exec(nf);if(null!==Fi){var Gi=Fi[1];ob=+m.parseFloat(void 0===Gi?void 0:Gi)}else{var Pb=Ga,Ae=(0===(2&Pb.G)<<24>>24?ir(Pb):Pb.fl).exec(nf),of;if(null!==Ae){var Hi=Ae[1],Ii=Ae[2],Lc=Ae[3],yd=Ae[4];""===Ii&&""===Lc&&Ga.oi(nf);for(var Ga=""+Ii+Lc,zl=-((Lc.length|0)<<2)|0,Pb=0;;)if(Pb!==(Ga.length| -0)&&48===(65535&(Ga.charCodeAt(Pb)|0)))Pb=1+Pb|0;else break;var zd=Ga.substring(Pb);if(""===zd)of="-"===Hi?-0:0;else{var Ji=15<(zd.length|0),Ki=Ji?zd.substring(0,15):zd,$d=zl+(Ji?(-15+(zd.length|0)|0)<<2:0)|0,Ad=+m.parseInt(Ki,16);jr(dc(),0!==Ad&&Infinity!==Ad);var pf=+m.parseInt(yd,10),yc=Ja(pf)+$d|0,Ga=yc/3|0,cd=+m.Math.pow(2,Ga),Fg=+m.Math.pow(2,yc-(Ga<<1)|0),Ga=Ad*cd*cd*Fg;of="-"===Hi?-Ga:Ga}}else of=Ga.oi(nf);ob=of}p=uq(Kc,c,e,g,bd,ob);break a}}H();Dc();var Be=(new Ec).b();throw(new Gl).j(a, +function fr(a,b){a=(new nb).b();try{var c=Hb(w(),b,"\\s+",""),e=sd(w(),c,";",0),f=(new Ne).Xa(e),g=H().p,h=ce(f,g);b=0;for(var k=f.m();b>24?hr(Ob):Ob.gl).exec(nf);if(null!==Fi){var Gi=Fi[1];ob=+m.parseFloat(void 0===Gi?void 0:Gi)}else{var Ob=Ga,Ae=(0===(2&Ob.G)<<24>>24?ir(Ob):Ob.fl).exec(nf),of;if(null!==Ae){var Hi=Ae[1],Ii=Ae[2],Lc=Ae[3],yd=Ae[4];""===Ii&&""===Lc&&Ga.oi(nf);for(var Ga=""+Ii+Lc,zl=-((Lc.length|0)<<2)|0,Ob=0;;)if(Ob!==(Ga.length| +0)&&48===(65535&(Ga.charCodeAt(Ob)|0)))Ob=1+Ob|0;else break;var zd=Ga.substring(Ob);if(""===zd)of="-"===Hi?-0:0;else{var Ji=15<(zd.length|0),Ki=Ji?zd.substring(0,15):zd,$d=zl+(Ji?(-15+(zd.length|0)|0)<<2:0)|0,Ad=+m.parseInt(Ki,16);jr(dc(),0!==Ad&&Infinity!==Ad);var pf=+m.parseInt(yd,10),xc=Ja(pf)+$d|0,Ga=xc/3|0,cd=+m.Math.pow(2,Ga),Fg=+m.Math.pow(2,xc-(Ga<<1)|0),Ga=Ad*cd*cd*Fg;of="-"===Hi?-Ga:Ga}}else of=Ga.oi(nf);ob=of}p=uq(Kc,c,e,g,bd,ob);break a}}H();Dc();var Be=(new Ec).b();throw(new Gl).j(a, Be.cc());}h.da(p);b=1+b|0}return h.X()}catch(Bd){if(Bd&&Bd.$classData&&Bd.$classData.q.bm&&Bd.wl===a)return Bd.mm;throw Bd;}}function sq(a,b,c,e){a=e.ac(G(function(a,b,c){return function(a){return c.Pa.i(a.ha).Ua!==c.Pa.i(b.ha).Ua?c.Pa.i(a.Fa).Ua===c.Pa.i(b.Fa).Ua:!1}}(a,b,c)));a.h()?a=F():(a=a.v().ha,a=(new J).g(c.Pa.i(a).qa));a=+(a.h()?0:a.v());return c.Pa.i(b.ha).qa(b+c|0)?0:n)|0)}else b=c}}f.wh=b;f.pg=!0;return b}qr.prototype.b=function(){return this}; +n=n.Ja();a=a.a[k];for(var k=l.Qc,p=[],t=0,q=k.a.length;t(b+c|0)?0:n)|0)}else b=c}}f.wh=b;f.pg=!0;return b}qr.prototype.b=function(){return this}; function wr(a){var b=xr,c=a.a.length,e=0>=c;if(e)var f=0;else var g=c>>31,f=(0===g?-1<(-2147483648^c):0f&&ne(oe(),0,c,1,!1);if(!e)for(c=0;;){var e=c,f=a.a[e].a.length/2|0,k=yr((new Di).Ib(0,a.a[e].a.length,1),f);if(null===k)throw(new C).g(k);se(h,(new df).ne(e,f,k));if(c===g)break;c=1+c|0}for(g=te(ge(h));g.Og;)a:{if(e=g.M(),null!==e&&(h=e.fb|0,c=e.jb|0,f=e.mb,null!==f)){e=f.ea();f=ii(f.N());Xd();k=Yd().Eb;zr(f,e,k).K(G(function(a,b,c,e){return function(a){for(a|= -0;Ar(b.a[c].a[a],b,c,e,a););}}(b,a,h,c)));break a}throw(new C).g(e);}g=a.a.length;b=-1+g|0;if(!(0>=g))for(g=0;;){h=g;e=a.a[h].a.length;c=-1+e|0;if(!(0>=e))for(e=0;;){f=e;k=a.a[h].a[f];if(rf(k)){var l=a.a[h],n=Zh();l.a[f]=ur(new vr,k.Ua,k.af,k.zb,k.He,n)}if(e===c)break;e=1+e|0}if(g===b)break;g=1+g|0}} +0;Ar(b.a[c].a[a],b,c,e,a););}}(b,a,h,c)));break a}throw(new C).g(e);}g=a.a.length;b=-1+g|0;if(!(0>=g))for(g=0;;){h=g;e=a.a[h].a.length;c=-1+e|0;if(!(0>=e))for(e=0;;){f=e;k=a.a[h].a[f];if(rf(k)){var l=a.a[h],n=Zh();l.a[f]=ur(new vr,k.Ua,k.af,k.zb,k.Ge,n)}if(e===c)break;e=1+e|0}if(g===b)break;g=1+g|0}} function Br(a,b,c,e,f){if(null===f)throw(new Se).b();if(f.pg)return f.wh;a:{if(null===c)throw(new C).g(c);var g=c.Qa(),h=c.Ja(),k=b+g|0;e=e+h|0;if(sr(k,e,a))b=c;else{var l=a.a[k].a[e];if(rf(l)){var n=Tf((new Wd).Xa(l.Qc)),n=n.h()?(new N).r(0,0):n.v(),p=tr((new Wd).Xa(l.Qc)),p=p.h()?(new N).r(0,0):p.v();b:{if(null!==n){var t=n.Ja();if(0===n.Qa()&&0===t&&null!==p&&(t=p.Ja(),0===p.Qa()&&0===t)){b=c;break a}}if(null!==n&&(c=n.Ja(),0===n.Qa()&&0===c)){n=p;break b}}if(null===n)throw(new C).g(n);c=n.Qa(); -n=n.Ja();a=a.a[k];for(var k=l.Qc,p=[],t=0,q=k.a.length;t(b+c|0)?0:n)|0)}else b=c}}f.wh=b;f.pg=!0;return b} +n=n.Ja();a=a.a[k];for(var k=l.Qc,p=[],t=0,q=k.a.length;t(b+c|0)?0:n)|0)}else b=c}}f.wh=b;f.pg=!0;return b} function Ar(a,b,c,e,f){if(0===a.Qc.a.length||rf(a))return!1;var g=a.Qc;var h=ee(P(),g);if(h.h()||null===h.v()||0!==h.v().Ra(2))throw(new C).g(g);g=h.v().i(0);h=h.v().i(1);if(null===g?null===h:g.A(h)){if(null===g)throw(new C).g(g);var h=g.Qa(),k=g.Ja(),g=c+h|0;a=f+k|0;if(sr(g,a,b))b=!1;else if(e=b.a[g].a[a],2>e.Qc.a.length)b=!1;else{var l=e.Qc;b:{var n=ee(P(),l);if(!n.h()&&null!==n.v()&&0===n.v().Ra(2)){var p=n.v().i(0),t=n.v().i(1);if(null!==p&&(n=p.Qa(),p=p.Ja(),null!==t)){l=t.Qa();t=t.Ja();break b}}throw(new C).g(l); -}n|=0;p|=0;l|=0;t|=0;h=pd(qd(),(new N).r(h+n|0,k+p|0),(new N).r(h+l|0,k+t|0));k=b.a[c].a[f];b.a[c].a[f]=ur(new vr,k.Ua,k.af,k.zb,k.He,h);b=b.a[g];c=Zh();b.a[a]=ur(new vr,e.Ua,e.af,e.zb,e.He,c);b=!0}return b}k=(new Cr).b();n=(new Cr).b();fa||0>b||b>=c.a[a].a.length}qr.prototype.$classData=y({Jq:0},!1,"dibl.proto.Item$",{Jq:1,c:1,k:1,f:1});var xr=void 0;function Er(){}Er.prototype=new z;Er.prototype.constructor=Er;Er.prototype.b=function(){return this};function Fr(a,b,c,e){a=e.Ta("shift"+b,O(function(a,b){return function(){return""+b}}(a,c)));if(null===a)throw(new Se).b();return Bf(Cf(),"-?[0-9]+",a)?(c=(new E).e(a),Ag(Bg(),c.d)):c} function wc(a,b){b=sd(w(),b,"\x26",0);for(var c=(new Of).ae(Pf(Qf(),yf(na(b)))),e=0,f=b.a.length;e>24&&0===(16&a.G)<<24>>24){var b=(new L).xa([1632,1776,1984,2406,2534,2662,2790,2918,3046,3174,3302,3430,3664,3792,3872,4160,4240,6112,6160,6470,6608,6784,6800,6992,7088,7232,7248,42528,43216,43264,43472,43600,44016,65296,66720,69734,69872,69942,70096,71360,120782,120792,120802,120812,120822]),c=b.o.length|0,c=u(B(bb),[c]),e;e=0;for(b=Q(new R,b,0,b.o.length|0);b.U();){var f=b.M();c.a[e]=f|0;e=1+e|0}a.to=c;a.G=(16|a.G)<<24>>24}return a.to} function Sd(a,b){return 65535&(m.String.fromCharCode(b).toUpperCase().charCodeAt(0)|0)}Jr.prototype.$classData=y({kr:0},!1,"java.lang.Character$",{kr:1,c:1,k:1,f:1});var Lr=void 0;function Td(){Lr||(Lr=(new Jr).b());return Lr}function Mr(){this.fl=this.gl=null;this.G=0}Mr.prototype=new z;Mr.prototype.constructor=Mr;Mr.prototype.b=function(){return this}; @@ -351,7 +351,7 @@ Wr.prototype.b=function(){Xr=this;this.co=new m.RegExp("^\\\\Q(.|\\n|\\r)\\\\E$" function fg(a,b){a=a.co.exec(b);if(null!==a){a=a[1];if(void 0===a)throw(new V).e("undefined.get");a=(new J).g((new K).j(Yr(a),0))}else a=F();if(a.h()){var c=Cf().bo.exec(b);if(null!==c){a=c[0];if(void 0===a)throw(new V).e("undefined.get");a=b.substring(a.length|0);var e=c[1];if(void 0===e)var f=0;else{var e=(new E).e(e),f=e.d.length|0,g=0,h=0;a:for(;;){if(g!==f){var k=1+g|0,g=e.i(g),g=null===g?0:g.ca,h=h|0|Zr(Cf(),g),g=k;continue a}break}f=h|0}c=c[2];if(void 0===c)c=f;else{c=(new E).e(c);e=c.d.length| 0;k=0;g=f;a:for(;;){if(k!==e){f=1+k|0;k=c.i(k);k=null===k?0:k.ca;g=(g|0)&~Zr(Cf(),k);k=f;continue a}break}c=g|0}a=(new J).g((new K).j(a,c))}else a=F()}a=a.h()?(new K).j(b,0):a.v();if(null===a)throw(new C).g(a);c=a.Ja();a=new m.RegExp(a.N(),"g"+(0!==(2&c)?"i":"")+(0!==(8&c)?"m":""));c=new Vr;c.eh=a;c.Pk=b;return c} function Yr(a){for(var b="",c=0;c<(a.length|0);){var e=65535&(a.charCodeAt(c)|0);switch(e){case 92:case 46:case 40:case 41:case 91:case 93:case 123:case 125:case 124:case 63:case 42:case 43:case 94:case 36:e="\\"+(new M).aa(e);break;default:e=(new M).aa(e)}b=""+b+e;c=1+c|0}return b}function Zr(a,b){switch(b){case 105:return 2;case 100:return 1;case 109:return 8;case 115:return 32;case 117:return 64;case 120:return 4;case 85:return 256;default:throw(new tb).e("bad in-pattern flag");}} -Wr.prototype.$classData=y({Zr:0},!1,"java.util.regex.Pattern$",{Zr:1,c:1,k:1,f:1});var Xr=void 0;function Cf(){Xr||(Xr=(new Wr).b());return Xr}function $r(){this.se=null}$r.prototype=new xj;$r.prototype.constructor=$r;$r.prototype.b=function(){as=this;this.se=(new bl).g(lj().Ao);(new bl).g(lj().nl);(new bl).g(null);return this};$r.prototype.$classData=y({bs:0},!1,"scala.Console$",{bs:1,Uw:1,c:1,gx:1});var as=void 0;function $c(){as||(as=(new $r).b());return as}function bs(){}bs.prototype=new z; +Wr.prototype.$classData=y({Zr:0},!1,"java.util.regex.Pattern$",{Zr:1,c:1,k:1,f:1});var Xr=void 0;function Cf(){Xr||(Xr=(new Wr).b());return Xr}function $r(){this.Ke=null}$r.prototype=new xj;$r.prototype.constructor=$r;$r.prototype.b=function(){as=this;this.Ke=(new bl).g(lj().Ao);(new bl).g(lj().nl);(new bl).g(null);return this};$r.prototype.$classData=y({bs:0},!1,"scala.Console$",{bs:1,Uw:1,c:1,gx:1});var as=void 0;function $c(){as||(as=(new $r).b());return as}function bs(){}bs.prototype=new z; bs.prototype.constructor=bs;bs.prototype.b=function(){return this};function ki(a,b){return null===b?F():(new J).g(b)}bs.prototype.$classData=y({hs:0},!1,"scala.Option$",{hs:1,c:1,k:1,f:1});var cs=void 0;function li(){cs||(cs=(new bs).b());return cs}function ds(){this.Wh=this.Rm=this.yh=null}ds.prototype=new Bj;ds.prototype.constructor=ds;function jr(a,b){if(!b)throw(new Mm).g("assertion failed");} ds.prototype.b=function(){es=this;Gk();mg();this.yh=gh();Uh();al||(al=(new $k).b());al||(al=(new $k).b());fs||(fs=(new gs).b());this.Rm=(new ep).b();this.Wh=(new hs).b();(new is).b();return this}; function js(a,b){if(qb(b,1))return(new Wd).Xa(b);if(fb(b,1))return(new ks).Ih(b);if(hb(b,1))return(new ls).Dh(b);if(gb(b,1))return(new ms).Eh(b);if(mb(b,1))return(new ns).ch(b);if(lb(b,1))return(new os).Fh(b);if(jb(b,1))return(new Hd).fg(b);if(kb(b,1))return(new ps).Gh(b);if(ib(b,1))return(new qs).Hh(b);if(Jo(b))return(new rs).Jh(b);if(null===b)return null;throw(new C).g(b);}ds.prototype.$classData=y({ls:0},!1,"scala.Predef$",{ls:1,Xw:1,c:1,Vw:1});var es=void 0; @@ -382,11 +382,11 @@ function Ts(a,b,c,e,f){if(0===(e|f))throw(new et).e("/ by zero");if(c===b>>31){i f&(-1+e|0):h=dt(a,h,f,b,e,1)|0;return g?(g=a.Db,a.Db=0!==h?~g:-g|0,-h|0):h}at.prototype.$classData=y({nw:0},!1,"scala.scalajs.runtime.RuntimeLong$",{nw:1,c:1,k:1,f:1});var bt=void 0;function Sa(){bt||(bt=(new at).b());return bt}function ft(){}ft.prototype=new z;ft.prototype.constructor=ft;function gt(){}gt.prototype=ft.prototype;ft.prototype.l=function(a){return this.Pg(a,Fj().Dn)};ft.prototype.ok=function(a){return Ej(this,a)};ft.prototype.w=function(){return"\x3cfunction1\x3e"}; function Cr(){this.pg=!1;this.wh=null}Cr.prototype=new z;Cr.prototype.constructor=Cr;Cr.prototype.b=function(){return this};Cr.prototype.w=function(){return"LazyRef "+(this.pg?"of: "+this.wh:"thunk")};Cr.prototype.$classData=y({ww:0},!1,"scala.runtime.LazyRef",{ww:1,c:1,k:1,f:1});var ts=y({xw:0},!1,"scala.runtime.Nothing$",{xw:1,Qb:1,c:1,f:1});function ht(){}ht.prototype=new z;ht.prototype.constructor=ht;function it(){}it.prototype=ht.prototype;ht.prototype.Uj=function(){}; var oa=y({Xq:0},!1,"java.lang.String",{Xq:1,c:1,f:1,vl:1,jf:1},void 0,void 0,function(a){return"string"===typeof a});function Mm(){W.call(this)}Mm.prototype=new Rr;Mm.prototype.constructor=Mm;Mm.prototype.g=function(a){W.prototype.Pb.call(this,""+a,a&&a.$classData&&a.$classData.q.Qb?a:null,0,!0);return this};Mm.prototype.$classData=y({hr:0},!1,"java.lang.AssertionError",{hr:1,or:1,Qb:1,c:1,f:1}); -var ra=y({jr:0},!1,"java.lang.Byte",{jr:1,Kh:1,c:1,f:1,jf:1},void 0,void 0,function(a){return qa(a)}),wa=y({mr:0},!1,"java.lang.Double",{mr:1,Kh:1,c:1,f:1,jf:1},void 0,void 0,function(a){return"number"===typeof a}),va=y({pr:0},!1,"java.lang.Float",{pr:1,Kh:1,c:1,f:1,jf:1},void 0,void 0,function(a){return"number"===typeof a}),ua=y({rr:0},!1,"java.lang.Integer",{rr:1,Kh:1,c:1,f:1,jf:1},void 0,void 0,function(a){return Oa(a)}),Aa=y({vr:0},!1,"java.lang.Long",{vr:1,Kh:1,c:1,f:1,jf:1},void 0,void 0,function(a){return za(a)}); -function jt(){W.call(this)}jt.prototype=new Sr;jt.prototype.constructor=jt;function kt(){}kt.prototype=jt.prototype;var ta=y({Br:0},!1,"java.lang.Short",{Br:1,Kh:1,c:1,f:1,jf:1},void 0,void 0,function(a){return sa(a)});function Tn(){this.Tg=null}Tn.prototype=new z;Tn.prototype.constructor=Tn;d=Tn.prototype;d.b=function(){Tn.prototype.ek.call(this,(new lt).b());return this};d.em=function(a,b){return this.Tg.Ya.substring(a,b)};d.w=function(){return this.Tg.Ya}; -d.Tk=function(a){var b=this.Tg;b.Ya=""+b.Ya+a;return this};function Un(a,b){a=a.Tg;a.Ya=""+a.Ya+b}d.m=function(){return this.Tg.m()};d.ek=function(a){this.Tg=a;return this};d.$classData=y({Cr:0},!1,"java.lang.StringBuffer",{Cr:1,c:1,vl:1,eo:1,f:1});function lt(){this.Ya=null}lt.prototype=new z;lt.prototype.constructor=lt;d=lt.prototype;d.b=function(){this.Ya="";return this};d.em=function(a,b){return this.Ya.substring(a,b)};d.w=function(){return this.Ya}; -function mt(a){var b=new lt;lt.prototype.e.call(b,ma(a));return b}d.Tk=function(a){this.Ya=""+this.Ya+a;return this};d.Ab=function(a){lt.prototype.b.call(this);if(0>a)throw(new nt).b();return this};d.m=function(){return this.Ya.length|0};function Vn(a,b){b=m.String.fromCharCode(b);a.Ya=""+a.Ya+b}d.e=function(a){lt.prototype.b.call(this);if(null===a)throw(new Se).b();this.Ya=a;return this}; -function ot(a){for(var b=a.Ya,c="",e=-1+(b.length|0)|0;0a)throw(new nt).b();return this};d.m=function(){return this.$a.length|0};function Vn(a,b){b=m.String.fromCharCode(b);a.$a=""+a.$a+b}d.e=function(a){lt.prototype.b.call(this);if(null===a)throw(new Se).b();this.$a=a;return this}; +function ot(a){for(var b=a.$a,c="",e=-1+(b.length|0)|0;01/a?"-"+b:b;b=a.length|0;a=101!==(65535&(a.charCodeAt(-3+b|0)|0))?a:a.substring(0,-1+b|0)+"0"+a.substring(-1+b|0);if(!c||0<=(a.indexOf(".")|0))return a;c=a.indexOf("e")|0;return a.substring(0,c)+"."+a.substring(c)}function st(a,b){for(var c="",e=0;e!==b;)c=""+c+a,e=1+e|0;return c}function Qn(a,b,c,e){var f=e.length|0;f>=c?sn(a,e):0!==(1&b)?qt(a,e,st(" ",c-f|0)):qt(a,st(" ",c-f|0),e)}function Kn(a,b){return 0!==(256&a)?b.toUpperCase():b} d.w=function(){if(this.lj)throw(new rn).b();return null===this.rg?this.nh:this.rg.w()};function Pn(a){return(0!==(1&a)?"-":"")+(0!==(2&a)?"#":"")+(0!==(4&a)?"+":"")+(0!==(8&a)?" ":"")+(0!==(16&a)?"0":"")+(0!==(32&a)?",":"")+(0!==(64&a)?"(":"")+(0!==(128&a)?"\x3c":"")}d.br=function(a){this.rg=a;this.nh="";this.lj=!1;return this};function vn(a,b){if(void 0===a)return b;a=+m.parseInt(a,10);return 2147483647>=a?Ja(a):-1}function tt(a,b,c,e){null===a.rg?a.nh=a.nh+(""+b+c)+e:rt(a,[b,c,e])} @@ -398,62 +398,62 @@ c,f,Kn(b,e))}}d.Uj=function(){if(!this.lj&&null!==this.rg){var a=this.rg;if(a&&a function zf(a,b,c,e,f,g){a=na(b);var h;if(h=!!a.je.isArrayClass)h=na(e),h.je.isPrimitive||a.je.isPrimitive?a=h===a||(h===v(ab)?a===v($a):h===v(bb)?a===v($a)||a===v(ab):h===v(db)?a===v($a)||a===v(ab)||a===v(bb):h===v(eb)&&(a===v($a)||a===v(ab)||a===v(bb)||a===v(db))):(a=a.je.getFakeInstance(),a=!!h.je.isInstance(a)),h=a;if(h)Na(b,c,e,f,g);else for(a=c,c=c+g|0;a>10|c<<12);return this};d.w=function(){return Gn(Sa(),this.va,this.Oa)};d.r=function(a,b){this.va=a;this.Oa=b;return this};d.Ab=function(a){Mf.prototype.r.call(this,a,a>>31);return this};d.L=function(){return this.va^this.Oa};function za(a){return!!(a&&a.$classData&&a.$classData.q.Kp)}d.$classData=y({Kp:0},!1,"scala.scalajs.runtime.RuntimeLong",{Kp:1,Kh:1,c:1,f:1,jf:1}); function De(){this.pe=this.Pa=null}De.prototype=new z;De.prototype.constructor=De;d=De.prototype;d.yb=function(){return"Diagram"};d.wb=function(){return 2};d.dh=function(a,b){this.Pa=a;this.pe=b;return this};d.A=function(a){if(this===a)return!0;if(a&&a.$classData&&a.$classData.q.um){var b=this.Pa,c=a.Pa;if(null===b?null===c:b.A(c))return b=this.pe,a=a.pe,null===b?null===a:b.A(a)}return!1};d.xb=function(a){switch(a){case 0:return this.Pa;case 1:return this.pe;default:throw(new gp).e(""+a);}}; -function Ot(a){var b=new m.Array(a.m()),c=a.Fc();if(!c.bc)for(var e=c.Sa;;){var f=e;b[f]=a.i(f).Bk();b[f].index=f;if(e===c.we)break;e=e+c.Ha|0}return b}d.w=function(){return Lo(this)};function Pt(a,b,c){for(;;)if(b.Y(a))a=c.l(a).t().Qa();else return a} +function Ot(a){var b=new m.Array(a.m()),c=a.Fc();if(!c.bc)for(var e=c.Sa;;){var f=e;b[f]=a.i(f).Bk();b[f].index=f;if(e===c.ve)break;e=e+c.Ha|0}return b}d.w=function(){return Lo(this)};function Pt(a,b,c){for(;;)if(b.Y(a))a=c.l(a).t().Qa();else return a} function Je(a){for(var b=a.pe.Bd(G(function(){return function(a){return!a.Yk()}}(a))),c=G(function(){return function(a){return(new N).r(a.Fa,a.ha)}}(a)),e=H(),b=b.ia(c,e.p),c=qc(b,G(function(){return function(a){if(null!==a)return(new N).r(a.Qa(),a.Ja());throw(new C).g(a);}}(a))).Pc(G(function(){return function(a){if(null!==a)return 1>24&&0===(1&a.G)<<24>>24){var b=a.zb;if(null===b)throw(new Se).b();a.so=""===b||"-"===a.zb;a.G=(1|a.G)<<24>>24}return a.so}function ur(a,b,c,e,f,g){a.Ua=b;a.af=c;a.zb=e;a.He=f;a.Qc=g;return a}d.L=function(){var a=-889275714,a=S().ua(a,ml(S(),this.Ua)),a=S().ua(a,this.af),a=S().ua(a,ml(S(),this.zb)),a=S().ua(a,this.He?1231:1237),a=S().ua(a,ml(S(),this.Qc));return S().nc(a,5)};d.Cb=function(){return Qt(this)}; -var cu=y({Mm:0},!1,"dibl.proto.Item",{Mm:1,c:1,ob:1,u:1,k:1,f:1});vr.prototype.$classData=cu;function du(){this.fe=this.ce=this.Ed=null;this.hk=this.nk=this.Uc=this.yj=this.md=this.Mh=this.oh=this.ph=this.ye=this.xe=this.Ae=this.ze=0}du.prototype=new z;du.prototype.constructor=du; -function vc(a){if(0b?-b|0:b,a.Uc)}else b=!1;b?(oc(),b=a.Ae,b=0===pc(0>b?-b|0:b,a.Uc)):b=!1;if(0c?-c|0:c,a.md)}else c=!1;c?(oc(),c=a.ye,c=0===pc(0>c?-c|0:c,a.md)):c=!1;if(!0===b&&!0===c)return a;if(!0===b&&!1===c){var c=b=a.Ed,e=G(function(a){return function(b){var c=a.md/2|0;return""+b.substring(c)+b.substring(0,c)}}(a)),f=H(),c=c.ia(e,f.p),e=H(),b=b.ub(c,e.p),c=a.ph,e=r(6,a.md),f=a.oh,g=a.Uc<<1;return Hr(b,a.ce,a.fe,a.ze,a.Ae,a.xe, -a.ye,c>e?c:e,f>g?f:g)}if(!1===b&&!0===c)return b=a.Uc/2|0,c=a.Ed.rc(0,b),e=a.Ed.rc(b,a.Ed.s()),b=a.Ed,f=H(),c=e.ub(c,f.p),e=H(),b=b.Kf(c,e.p),c=G(function(){return function(a){if(null!==a)return""+a.N()+a.ea();throw(new C).g(a);}}(a)),e=H(),b=b.ia(c,e.p),c=a.ph,e=r(3,a.md),f=a.oh,g=a.Uc<<2,Hr(b,a.ce,a.fe,a.ze,a.Ae,a.xe,a.ye,c>e?c:e,f>g?f:g);dc();throw(new zt).b();}d=du.prototype;d.yb=function(){return"PairParams"};d.wb=function(){return 9}; -d.A=function(a){if(this===a)return!0;if(a&&a.$classData&&a.$classData.q.Nm){var b=this.Ed,c=a.Ed;(null===b?null===c:b.A(c))?(b=this.ce,c=a.ce,b=null===b?null===c:b.A(c)):b=!1;b?(b=this.fe,c=a.fe,b=null===b?null===c:b.A(c)):b=!1;return b&&this.ze===a.ze&&this.Ae===a.Ae&&this.xe===a.xe&&this.ye===a.ye&&this.ph===a.ph?this.oh===a.oh:!1}return!1}; -d.xb=function(a){switch(a){case 0:return this.Ed;case 1:return this.ce;case 2:return this.fe;case 3:return this.ze;case 4:return this.Ae;case 5:return this.xe;case 6:return this.ye;case 7:return this.ph;case 8:return this.oh;default:throw(new gp).e(""+a);}}; -d.w=function(){return"tile\x3d"+this.Ed.Jb(",")+"\x26footside\x3d"+this.ce.Jb(",")+"\x26headside\x3d"+this.fe.Jb(",")+"\x26swatchWidth\x3d"+this.ph+"\x26swatchHeight\x3d"+this.oh+"\x26shiftColsSE\x3d"+this.xe+"\x26shiftColsSW\x3d"+this.ye+"\x26shiftRowsSE\x3d"+this.ze+"\x26shiftRowsSW\x3d"+this.Ae+"\x26"}; -d.L=function(){var a=-889275714,a=S().ua(a,ml(S(),this.Ed)),a=S().ua(a,ml(S(),this.ce)),a=S().ua(a,ml(S(),this.fe)),a=S().ua(a,this.ze),a=S().ua(a,this.Ae),a=S().ua(a,this.xe),a=S().ua(a,this.ye),a=S().ua(a,this.ph),a=S().ua(a,this.oh);return S().nc(a,9)};d.Cb=function(){return Qt(this)}; -function Hr(a,b,c,e,f,g,h,k,l){var n=new du;n.Ed=a;n.ce=b;n.fe=c;n.ze=e;n.Ae=f;n.xe=g;n.ye=h;n.ph=k;n.oh=l;e=b.Zd();e.h()?e=F():(e=e.v(),e=(new J).g(e.length|0));n.Mh=(e.h()?0:e.v())|0;e=a.Zd();e.h()?e=F():(e=e.v(),e=(new J).g(e.length|0));n.md=(e.h()?0:e.v())|0;e=c.Zd();e.h()?e=F():(e=e.v(),e=(new J).g(e.length|0));n.yj=(e.h()?0:e.v())|0;n.Uc=a.m();n.nk=c.m();n.hk=b.m();return n}d.$classData=y({Nm:0},!1,"dibl.proto.PairParams",{Nm:1,c:1,ob:1,u:1,k:1,f:1}); -function uc(){this.Ym=this.Jo=this.lo=this.Ed=this.fe=this.ce=this.Le=this.jo=this.Mi=this.vo=null;this.Ck=this.Kj=this.yi=this.mj=this.ye=this.xe=this.Ae=this.ze=this.Eg=this.jg=this.ro=this.hk=this.nk=this.Uc=this.yj=this.md=this.Mh=0;this.If=null;this.G=!1}uc.prototype=new z;uc.prototype.constructor=uc;function ke(a){a=a.If;P();(new Lj).b();var b=eu().fa(),c=a.a.length;switch(c){case -1:break;default:b.rb(c)}for(var c=0,e=a.a.length;c>24&&0===(1&a.G)<<24>>24){var b=a.zb;if(null===b)throw(new Se).b();a.so=""===b||"-"===a.zb;a.G=(1|a.G)<<24>>24}return a.so}function ur(a,b,c,e,f,g){a.Ua=b;a.af=c;a.zb=e;a.Ge=f;a.Qc=g;return a}d.L=function(){var a=-889275714,a=S().ua(a,ml(S(),this.Ua)),a=S().ua(a,this.af),a=S().ua(a,ml(S(),this.zb)),a=S().ua(a,this.Ge?1231:1237),a=S().ua(a,ml(S(),this.Qc));return S().nc(a,5)};d.Cb=function(){return Qt(this)}; +var cu=y({Mm:0},!1,"dibl.proto.Item",{Mm:1,c:1,ob:1,u:1,k:1,f:1});vr.prototype.$classData=cu;function du(){this.fe=this.ce=this.Ed=null;this.hk=this.nk=this.Uc=this.yj=this.md=this.Mh=this.oh=this.ph=this.xe=this.we=this.ze=this.ye=0}du.prototype=new z;du.prototype.constructor=du; +function vc(a){if(0b?-b|0:b,a.Uc)}else b=!1;b?(oc(),b=a.ze,b=0===pc(0>b?-b|0:b,a.Uc)):b=!1;if(0c?-c|0:c,a.md)}else c=!1;c?(oc(),c=a.xe,c=0===pc(0>c?-c|0:c,a.md)):c=!1;if(!0===b&&!0===c)return a;if(!0===b&&!1===c){var c=b=a.Ed,e=G(function(a){return function(b){var c=a.md/2|0;return""+b.substring(c)+b.substring(0,c)}}(a)),f=H(),c=c.ia(e,f.p),e=H(),b=b.ub(c,e.p),c=a.ph,e=r(6,a.md),f=a.oh,g=a.Uc<<1;return Hr(b,a.ce,a.fe,a.ye,a.ze,a.we, +a.xe,c>e?c:e,f>g?f:g)}if(!1===b&&!0===c)return b=a.Uc/2|0,c=a.Ed.rc(0,b),e=a.Ed.rc(b,a.Ed.s()),b=a.Ed,f=H(),c=e.ub(c,f.p),e=H(),b=b.Kf(c,e.p),c=G(function(){return function(a){if(null!==a)return""+a.N()+a.ea();throw(new C).g(a);}}(a)),e=H(),b=b.ia(c,e.p),c=a.ph,e=r(3,a.md),f=a.oh,g=a.Uc<<2,Hr(b,a.ce,a.fe,a.ye,a.ze,a.we,a.xe,c>e?c:e,f>g?f:g);dc();throw(new zt).b();}d=du.prototype;d.yb=function(){return"PairParams"};d.wb=function(){return 9}; +d.A=function(a){if(this===a)return!0;if(a&&a.$classData&&a.$classData.q.Nm){var b=this.Ed,c=a.Ed;(null===b?null===c:b.A(c))?(b=this.ce,c=a.ce,b=null===b?null===c:b.A(c)):b=!1;b?(b=this.fe,c=a.fe,b=null===b?null===c:b.A(c)):b=!1;return b&&this.ye===a.ye&&this.ze===a.ze&&this.we===a.we&&this.xe===a.xe&&this.ph===a.ph?this.oh===a.oh:!1}return!1}; +d.xb=function(a){switch(a){case 0:return this.Ed;case 1:return this.ce;case 2:return this.fe;case 3:return this.ye;case 4:return this.ze;case 5:return this.we;case 6:return this.xe;case 7:return this.ph;case 8:return this.oh;default:throw(new gp).e(""+a);}}; +d.w=function(){return"tile\x3d"+this.Ed.Jb(",")+"\x26footside\x3d"+this.ce.Jb(",")+"\x26headside\x3d"+this.fe.Jb(",")+"\x26swatchWidth\x3d"+this.ph+"\x26swatchHeight\x3d"+this.oh+"\x26shiftColsSE\x3d"+this.we+"\x26shiftColsSW\x3d"+this.xe+"\x26shiftRowsSE\x3d"+this.ye+"\x26shiftRowsSW\x3d"+this.ze+"\x26"}; +d.L=function(){var a=-889275714,a=S().ua(a,ml(S(),this.Ed)),a=S().ua(a,ml(S(),this.ce)),a=S().ua(a,ml(S(),this.fe)),a=S().ua(a,this.ye),a=S().ua(a,this.ze),a=S().ua(a,this.we),a=S().ua(a,this.xe),a=S().ua(a,this.ph),a=S().ua(a,this.oh);return S().nc(a,9)};d.Cb=function(){return Qt(this)}; +function Hr(a,b,c,e,f,g,h,k,l){var n=new du;n.Ed=a;n.ce=b;n.fe=c;n.ye=e;n.ze=f;n.we=g;n.xe=h;n.ph=k;n.oh=l;e=b.Zd();e.h()?e=F():(e=e.v(),e=(new J).g(e.length|0));n.Mh=(e.h()?0:e.v())|0;e=a.Zd();e.h()?e=F():(e=e.v(),e=(new J).g(e.length|0));n.md=(e.h()?0:e.v())|0;e=c.Zd();e.h()?e=F():(e=e.v(),e=(new J).g(e.length|0));n.yj=(e.h()?0:e.v())|0;n.Uc=a.m();n.nk=c.m();n.hk=b.m();return n}d.$classData=y({Nm:0},!1,"dibl.proto.PairParams",{Nm:1,c:1,ob:1,u:1,k:1,f:1}); +function uc(){this.Ym=this.Jo=this.lo=this.Ed=this.fe=this.ce=this.Le=this.jo=this.Mi=this.vo=null;this.Ck=this.Kj=this.yi=this.mj=this.xe=this.we=this.ze=this.ye=this.Eg=this.jg=this.ro=this.hk=this.nk=this.Uc=this.yj=this.md=this.Mh=0;this.If=null;this.G=!1}uc.prototype=new z;uc.prototype.constructor=uc;function ke(a){a=a.If;P();(new Lj).b();var b=eu().fa(),c=a.a.length;switch(c){case -1:break;default:b.rb(c)}for(var c=0,e=a.a.length;c=e;if(f)var g=0;else var h=e>>31,g=(0===h?-1<(-2147483648^e):0g&&ne(oe(),0,e,1,!1);if(!f)for(e=0;;){f=e;f=(new N).r(f,b+f|0);se(k,f);if(e===h)break;e=1+e|0}for(b=te(ge(k));b.Og;)if(k=b.M(),null!==k){if(h=k.Qa(),k=k.Ja(),f=a.md,e=-1+f|0,!(0>=f))for(f=0;;){var l=f;0<=k&&k=f))for(;;){var f=b,g=a.Kj,h=-1+g|0;if(!(c>=g))for(g=c;;){var k=g;gu(a,k,f,f,k%c|0);if(g===h)break;g=1+g|0}if(b===e)break;b=1+b|0}}d.L=function(){return kl(this)}; -d.e=function(a){this.Mi=a;Zc($c().se.td,a+"\n");dc();a=sd(w(),a,"\x26",0);for(var b=(new Of).ae(Pf(Qf(),yf(na(a)))),c=0,e=a.a.length;cc?b:c;this.ro=a>b?a:b;fi();a=this.Le.Ta("patchHeight",O(function(a){return function(){return""+(a.Uc<<2)}}(this)));a=di(a);b=this.Uc;this.jg=a>b?a:b;fi();a=this.Le.Ta("patchWidth",O(function(a){return function(){return""+r(6,a.md)}}(this)));a=di(a);b=this.md;this.Eg=a>b?a:b;fi();a=this.Le.Ta("shiftRowsSE",O(function(a){return function(){return""+a.Uc}}(this)));this.ze= -di(a);fi();a=this.Le.Ta("shiftRowsSW",O(function(a){return function(){return""+a.Uc}}(this)));this.Ae=di(a);fi();a=this.Le.Ta("shiftColsSE",O(function(a){return function(){return""+a.md}}(this)));this.xe=di(a);fi();a=this.Le.Ta("shiftColsSW",O(function(){return function(){return"0"}}(this)));this.ye=di(a);this.mj=this.ce.t().trim().length|0;this.yi=this.mj+this.Eg|0;this.Kj=this.jg;a=this.Eg;b=this.mj;c=0===this.yi?0:this.fe.t().length|0;this.Ck=(a+b|0)+c|0;a=this.jg;b=null;b=[];for(c=0;cb?a:b,b=-1+a|0,!(0>=a)))for(c=0;;){e=c;g=-a|0;f=1+g|0;if(!(a<=g))for(g=a;;){var k=g;0===e&0===k||(h=r(k,this.Ae)+r(e,this.ze)|0,k=r(k,this.ye)+r(e,this.xe)|0,(-this.md|0)c?b:c;this.ro=a>b?a:b;fi();a=this.Le.Ta("patchHeight",O(function(a){return function(){return""+(a.Uc<<2)}}(this)));a=di(a);b=this.Uc;this.jg=a>b?a:b;fi();a=this.Le.Ta("patchWidth",O(function(a){return function(){return""+r(6,a.md)}}(this)));a=di(a);b=this.md;this.Eg=a>b?a:b;fi();a=this.Le.Ta("shiftRowsSE",O(function(a){return function(){return""+a.Uc}}(this)));this.ye= +di(a);fi();a=this.Le.Ta("shiftRowsSW",O(function(a){return function(){return""+a.Uc}}(this)));this.ze=di(a);fi();a=this.Le.Ta("shiftColsSE",O(function(a){return function(){return""+a.md}}(this)));this.we=di(a);fi();a=this.Le.Ta("shiftColsSW",O(function(){return function(){return"0"}}(this)));this.xe=di(a);this.mj=this.ce.t().trim().length|0;this.yi=this.mj+this.Eg|0;this.Kj=this.jg;a=this.Eg;b=this.mj;c=0===this.yi?0:this.fe.t().length|0;this.Ck=(a+b|0)+c|0;a=this.jg;b=null;b=[];for(c=0;cb?a:b,b=-1+a|0,!(0>=a)))for(c=0;;){e=c;g=-a|0;f=1+g|0;if(!(a<=g))for(g=a;;){var k=g;0===e&0===k||(h=r(k,this.ze)+r(e,this.ye)|0,k=r(k,this.xe)+r(e,this.we)|0,(-this.md|0)=a.nj)throw(new V).e("next on empty iterator");for(var b=a.Yc;;){if(a.Yc=a.nj)throw(new V).e("next on empty iterator");for(var b=a.Yc;;){if(a.Yca.R(b,c))return-1;c=a.Wc(0);return 0=(65535&(a.charCodeAt(b)|0))&&48<=(65535&(a.charCodeAt(b)|0)))b=-1+b|0;else break;for(var f=b;;)if(-1!==b&&36!==(65535&(a.charCodeAt(b)|0))&&46!==(65535&(a.charCodeAt(b)|0)))b=-1+b|0;else break;var g=1+b|0;if(b===f&&e!==(a.length|0))return c;for(;;)if(-1!==b&&36===(65535&(a.charCodeAt(b)| 0)))b=-1+b|0;else break;var f=-1===b?!0:46===(65535&(a.charCodeAt(b)|0)),h;(h=f)||(h=65535&(a.charCodeAt(g)|0),h=!(90h||65>h));if(h){e=a.substring(g,e);g=c;if(null===g)throw(new Se).b();c=""===g?e:""+e+(new M).aa(46)+c;if(f)return c}}}function Tv(){this.p=null}Tv.prototype=new zs;Tv.prototype.constructor=Tv;function Uv(){}Uv.prototype=Tv.prototype;function Vv(){Xu.call(this)}Vv.prototype=new Yu;Vv.prototype.constructor=Vv;Vv.prototype.Kn=function(a){return Wv(a)}; -Vv.prototype.$classData=y({ku:0},!1,"scala.collection.immutable.HashMap$HashTrieMap$$anon$1",{ku:1,hv:1,Ad:1,c:1,qd:1,Q:1,P:1});function Xv(){Xu.call(this)}Xv.prototype=new Yu;Xv.prototype.constructor=Xv;Xv.prototype.Kn=function(a){return a.Hc};Xv.prototype.$classData=y({pu:0},!1,"scala.collection.immutable.HashSet$HashTrieSet$$anon$1",{pu:1,hv:1,Ad:1,c:1,qd:1,Q:1,P:1});function Yv(){}Yv.prototype=new Ou;Yv.prototype.constructor=Yv;Yv.prototype.b=function(){return this};Yv.prototype.Yj=function(){return ag()}; -Yv.prototype.$classData=y({Qu:0},!1,"scala.collection.immutable.Set$",{Qu:1,Ro:1,Ol:1,Nl:1,dd:1,c:1,ed:1});var Zv=void 0;function Uh(){Zv||(Zv=(new Yv).b());return Zv}function $v(){this.uj=null}$v.prototype=new ov;$v.prototype.constructor=$v;$v.prototype.b=function(){nv.prototype.b.call(this);return this};$v.prototype.X=function(){return aw(this)};function aw(a){return a.uj.Za.Tb().oc(G(function(){return function(a){return a.Tb()}}(a)),(lk(),(new Xs).b()))} +Vv.prototype.$classData=y({ku:0},!1,"scala.collection.immutable.HashMap$HashTrieMap$$anon$1",{ku:1,hv:1,zd:1,c:1,qd:1,Q:1,P:1});function Xv(){Xu.call(this)}Xv.prototype=new Yu;Xv.prototype.constructor=Xv;Xv.prototype.Kn=function(a){return a.Hc};Xv.prototype.$classData=y({pu:0},!1,"scala.collection.immutable.HashSet$HashTrieSet$$anon$1",{pu:1,hv:1,zd:1,c:1,qd:1,Q:1,P:1});function Yv(){}Yv.prototype=new Ou;Yv.prototype.constructor=Yv;Yv.prototype.b=function(){return this};Yv.prototype.Yj=function(){return ag()}; +Yv.prototype.$classData=y({Qu:0},!1,"scala.collection.immutable.Set$",{Qu:1,Ro:1,Ol:1,Nl:1,dd:1,c:1,ed:1});var Zv=void 0;function Uh(){Zv||(Zv=(new Yv).b());return Zv}function $v(){this.uj=null}$v.prototype=new ov;$v.prototype.constructor=$v;$v.prototype.b=function(){nv.prototype.b.call(this);return this};$v.prototype.X=function(){return aw(this)};function aw(a){return a.uj.Ya.Tb().oc(G(function(){return function(a){return a.Tb()}}(a)),(lk(),(new Xs).b()))} function bw(a){return!!(a&&a.$classData&&a.$classData.q.ap)}$v.prototype.$classData=y({ap:0},!1,"scala.collection.immutable.Stream$StreamBuilder",{ap:1,Jx:1,c:1,Sd:1,Ac:1,zc:1,yc:1});function ae(){this.$i=this.Nh=this.Ui=0;this.An=this.yn=this.wn=this.un=this.sn=this.bj=null}ae.prototype=new z;ae.prototype.constructor=ae;d=ae.prototype;d.Ia=function(){return this.wn};d.b=function(){this.bj=u(B(A),[32]);this.$i=1;this.Nh=this.Ui=0;return this};d.uc=function(){return this.$i}; d.Yb=function(a){return se(this,a)};d.Vg=function(a){this.An=a};d.Wb=function(){return this.bj};d.db=function(a){this.un=a};d.vb=function(){return this.yn}; -function se(a,b){if(a.Nh>=a.bj.a.length){var c=32+a.Ui|0,e=a.Ui^c;if(1024>e)1===a.uc()&&(a.Ka(u(B(A),[32])),a.$().a[0]=a.Wb(),a.cf(1+a.uc()|0)),a.$a(u(B(A),[32])),a.$().a[31&(c>>>5|0)]=a.Wb();else if(32768>e)2===a.uc()&&(a.db(u(B(A),[32])),a.pa().a[0]=a.$(),a.cf(1+a.uc()|0)),a.$a(u(B(A),[32])),a.Ka(u(B(A),[32])),a.$().a[31&(c>>>5|0)]=a.Wb(),a.pa().a[31&(c>>>10|0)]=a.$();else if(1048576>e)3===a.uc()&&(a.Xb(u(B(A),[32])),a.Ia().a[0]=a.pa(),a.cf(1+a.uc()|0)),a.$a(u(B(A),[32])),a.Ka(u(B(A),[32])),a.db(u(B(A), -[32])),a.$().a[31&(c>>>5|0)]=a.Wb(),a.pa().a[31&(c>>>10|0)]=a.$(),a.Ia().a[31&(c>>>15|0)]=a.pa();else if(33554432>e)4===a.uc()&&(a.xd(u(B(A),[32])),a.vb().a[0]=a.Ia(),a.cf(1+a.uc()|0)),a.$a(u(B(A),[32])),a.Ka(u(B(A),[32])),a.db(u(B(A),[32])),a.Xb(u(B(A),[32])),a.$().a[31&(c>>>5|0)]=a.Wb(),a.pa().a[31&(c>>>10|0)]=a.$(),a.Ia().a[31&(c>>>15|0)]=a.pa(),a.vb().a[31&(c>>>20|0)]=a.Ia();else if(1073741824>e)5===a.uc()&&(a.Vg(u(B(A),[32])),a.Fd().a[0]=a.vb(),a.cf(1+a.uc()|0)),a.$a(u(B(A),[32])),a.Ka(u(B(A), -[32])),a.db(u(B(A),[32])),a.Xb(u(B(A),[32])),a.xd(u(B(A),[32])),a.$().a[31&(c>>>5|0)]=a.Wb(),a.pa().a[31&(c>>>10|0)]=a.$(),a.Ia().a[31&(c>>>15|0)]=a.pa(),a.vb().a[31&(c>>>20|0)]=a.Ia(),a.Fd().a[31&(c>>>25|0)]=a.vb();else throw(new tb).b();a.Ui=c;a.Nh=0}a.bj.a[a.Nh]=b;a.Nh=1+a.Nh|0;return a}d.X=function(){return ge(this)};d.ie=function(a,b){Np(this,a,b)};d.Ka=function(a){this.sn=a};d.xd=function(a){this.yn=a};d.$=function(){return this.sn};d.Fd=function(){return this.An}; -function ge(a){var b=a.Ui+a.Nh|0;if(0===b)return Zd().zh;var c=(new cw).Ib(0,b,0);zb(c,a,a.$i);1=a.bj.a.length){var c=32+a.Ui|0,e=a.Ui^c;if(1024>e)1===a.uc()&&(a.Ka(u(B(A),[32])),a.$().a[0]=a.Wb(),a.cf(1+a.uc()|0)),a.Za(u(B(A),[32])),a.$().a[31&(c>>>5|0)]=a.Wb();else if(32768>e)2===a.uc()&&(a.db(u(B(A),[32])),a.pa().a[0]=a.$(),a.cf(1+a.uc()|0)),a.Za(u(B(A),[32])),a.Ka(u(B(A),[32])),a.$().a[31&(c>>>5|0)]=a.Wb(),a.pa().a[31&(c>>>10|0)]=a.$();else if(1048576>e)3===a.uc()&&(a.Xb(u(B(A),[32])),a.Ia().a[0]=a.pa(),a.cf(1+a.uc()|0)),a.Za(u(B(A),[32])),a.Ka(u(B(A),[32])),a.db(u(B(A), +[32])),a.$().a[31&(c>>>5|0)]=a.Wb(),a.pa().a[31&(c>>>10|0)]=a.$(),a.Ia().a[31&(c>>>15|0)]=a.pa();else if(33554432>e)4===a.uc()&&(a.wd(u(B(A),[32])),a.vb().a[0]=a.Ia(),a.cf(1+a.uc()|0)),a.Za(u(B(A),[32])),a.Ka(u(B(A),[32])),a.db(u(B(A),[32])),a.Xb(u(B(A),[32])),a.$().a[31&(c>>>5|0)]=a.Wb(),a.pa().a[31&(c>>>10|0)]=a.$(),a.Ia().a[31&(c>>>15|0)]=a.pa(),a.vb().a[31&(c>>>20|0)]=a.Ia();else if(1073741824>e)5===a.uc()&&(a.Vg(u(B(A),[32])),a.Fd().a[0]=a.vb(),a.cf(1+a.uc()|0)),a.Za(u(B(A),[32])),a.Ka(u(B(A), +[32])),a.db(u(B(A),[32])),a.Xb(u(B(A),[32])),a.wd(u(B(A),[32])),a.$().a[31&(c>>>5|0)]=a.Wb(),a.pa().a[31&(c>>>10|0)]=a.$(),a.Ia().a[31&(c>>>15|0)]=a.pa(),a.vb().a[31&(c>>>20|0)]=a.Ia(),a.Fd().a[31&(c>>>25|0)]=a.vb();else throw(new tb).b();a.Ui=c;a.Nh=0}a.bj.a[a.Nh]=b;a.Nh=1+a.Nh|0;return a}d.X=function(){return ge(this)};d.ie=function(a,b){Np(this,a,b)};d.Ka=function(a){this.sn=a};d.wd=function(a){this.yn=a};d.$=function(){return this.sn};d.Fd=function(){return this.An}; +function ge(a){var b=a.Ui+a.Nh|0;if(0===b)return Zd().zh;var c=(new cw).Ib(0,b,0);zb(c,a,a.$i);1c)this.$a(this.$().a[31&(b>>>5|0)]);else if(32768>c)this.Ka(this.pa().a[31&(b>>>10|0)]),this.$a(this.$().a[0]);else if(1048576>c)this.db(this.Ia().a[31&(b>>>15|0)]),this.Ka(this.pa().a[0]),this.$a(this.$().a[0]);else if(33554432>c)this.Xb(this.vb().a[31&(b>>>20|0)]),this.db(this.Ia().a[0]),this.Ka(this.pa().a[0]), -this.$a(this.$().a[0]);else if(1073741824>c)this.xd(this.Fd().a[31&(b>>>25|0)]),this.Xb(this.vb().a[0]),this.db(this.Ia().a[0]),this.Ka(this.pa().a[0]),this.$a(this.$().a[0]);else throw(new tb).b();this.Sg=b;b=this.ll-this.Sg|0;this.ml=32>b?b:32;this.va=0}else this.Og=!1;return a};d.Ia=function(){return this.xn};d.uc=function(){return this.cl};d.Vg=function(a){this.Bn=a};d.r=function(a,b){this.ll=b;this.Sg=-32&a;this.va=31&a;a=b-this.Sg|0;this.ml=32>a?a:32;this.Og=(this.Sg+this.va|0)c)this.Za(this.$().a[31&(b>>>5|0)]);else if(32768>c)this.Ka(this.pa().a[31&(b>>>10|0)]),this.Za(this.$().a[0]);else if(1048576>c)this.db(this.Ia().a[31&(b>>>15|0)]),this.Ka(this.pa().a[0]),this.Za(this.$().a[0]);else if(33554432>c)this.Xb(this.vb().a[31&(b>>>20|0)]),this.db(this.Ia().a[0]),this.Ka(this.pa().a[0]), +this.Za(this.$().a[0]);else if(1073741824>c)this.wd(this.Fd().a[31&(b>>>25|0)]),this.Xb(this.vb().a[0]),this.db(this.Ia().a[0]),this.Ka(this.pa().a[0]),this.Za(this.$().a[0]);else throw(new tb).b();this.Sg=b;b=this.ll-this.Sg|0;this.ml=32>b?b:32;this.va=0}else this.Og=!1;return a};d.Ia=function(){return this.xn};d.uc=function(){return this.cl};d.Vg=function(a){this.Bn=a};d.r=function(a,b){this.ll=b;this.Sg=-32&a;this.va=31&a;a=b-this.Sg|0;this.ml=32>a?a:32;this.Og=(this.Sg+this.va|0)this.R(a,b)};d.R=function(a,b){return this.$m.R(a,b)};d.Jd=function(a,b){return 0>=this.R(a,b)}; -d.$classData=y({Ir:0},!1,"java.util.Arrays$$anon$3",{Ir:1,c:1,Ne:1,Je:1,Oe:1,Me:1,k:1,f:1});function un(){W.call(this);this.bh=null}un.prototype=new Iv;un.prototype.constructor=un;un.prototype.Ge=function(){return"Flags \x3d '"+this.bh+"'"};un.prototype.e=function(a){this.bh=a;W.prototype.Pb.call(this,null,null,0,!0);if(null===a)throw(new Se).b();return this};un.prototype.$classData=y({Jr:0},!1,"java.util.DuplicateFormatFlagsException",{Jr:1,zg:1,zf:1,$c:1,Gc:1,Qb:1,c:1,f:1}); -function vt(){W.call(this);this.bh=null;this.Ug=0}vt.prototype=new Iv;vt.prototype.constructor=vt;vt.prototype.Ge=function(){return"Conversion \x3d "+(new M).aa(this.Ug)+", Flags \x3d "+this.bh};vt.prototype.$classData=y({Kr:0},!1,"java.util.FormatFlagsConversionMismatchException",{Kr:1,zg:1,zf:1,$c:1,Gc:1,Qb:1,c:1,f:1});function Cn(){W.call(this);this.Ug=0}Cn.prototype=new Iv;Cn.prototype.constructor=Cn;Cn.prototype.Ge=function(){return"Code point \x3d 0x"+(+(this.Ug>>>0)).toString(16)}; -Cn.prototype.Ab=function(a){this.Ug=a;W.prototype.Pb.call(this,null,null,0,!0);return this};Cn.prototype.$classData=y({Or:0},!1,"java.util.IllegalFormatCodePointException",{Or:1,zg:1,zf:1,$c:1,Gc:1,Qb:1,c:1,f:1});function ut(){W.call(this);this.Ug=0;this.Vm=null}ut.prototype=new Iv;ut.prototype.constructor=ut;ut.prototype.Ge=function(){return m.String.fromCharCode(this.Ug)+" !\x3d "+pb(this.Vm)}; -ut.prototype.$classData=y({Pr:0},!1,"java.util.IllegalFormatConversionException",{Pr:1,zg:1,zf:1,$c:1,Gc:1,Qb:1,c:1,f:1});function On(){W.call(this);this.bh=null}On.prototype=new Iv;On.prototype.constructor=On;On.prototype.Ge=function(){return"Flags \x3d '"+this.bh+"'"};On.prototype.e=function(a){this.bh=a;W.prototype.Pb.call(this,null,null,0,!0);if(null===a)throw(new Se).b();return this}; -On.prototype.$classData=y({Qr:0},!1,"java.util.IllegalFormatFlagsException",{Qr:1,zg:1,zf:1,$c:1,Gc:1,Qb:1,c:1,f:1});function An(){W.call(this);this.Co=0}An.prototype=new Iv;An.prototype.constructor=An;An.prototype.Ge=function(){return""+this.Co};An.prototype.Ab=function(a){this.Co=a;W.prototype.Pb.call(this,null,null,0,!0);return this};An.prototype.$classData=y({Rr:0},!1,"java.util.IllegalFormatPrecisionException",{Rr:1,zg:1,zf:1,$c:1,Gc:1,Qb:1,c:1,f:1});function Rn(){W.call(this);this.bq=0} -Rn.prototype=new Iv;Rn.prototype.constructor=Rn;Rn.prototype.Ge=function(){return""+this.bq};Rn.prototype.Ab=function(a){this.bq=a;W.prototype.Pb.call(this,null,null,0,!0);return this};Rn.prototype.$classData=y({Sr:0},!1,"java.util.IllegalFormatWidthException",{Sr:1,zg:1,zf:1,$c:1,Gc:1,Qb:1,c:1,f:1});function xn(){W.call(this);this.hh=null}xn.prototype=new Iv;xn.prototype.constructor=xn;xn.prototype.Ge=function(){return"Format specifier '"+this.hh+"'"}; -xn.prototype.e=function(a){this.hh=a;W.prototype.Pb.call(this,null,null,0,!0);if(null===a)throw(new Se).b();return this};xn.prototype.$classData=y({Tr:0},!1,"java.util.MissingFormatArgumentException",{Tr:1,zg:1,zf:1,$c:1,Gc:1,Qb:1,c:1,f:1});function wn(){W.call(this);this.hh=null}wn.prototype=new Iv;wn.prototype.constructor=wn;wn.prototype.Ge=function(){return this.hh};wn.prototype.e=function(a){this.hh=a;W.prototype.Pb.call(this,null,null,0,!0);if(null===a)throw(new Se).b();return this}; -wn.prototype.$classData=y({Ur:0},!1,"java.util.MissingFormatWidthException",{Ur:1,zg:1,zf:1,$c:1,Gc:1,Qb:1,c:1,f:1});function tn(){W.call(this);this.hh=null}tn.prototype=new Iv;tn.prototype.constructor=tn;tn.prototype.Ge=function(){return"Conversion \x3d '"+this.hh+"'"};tn.prototype.e=function(a){this.hh=a;W.prototype.Pb.call(this,null,null,0,!0);if(null===a)throw(new Se).b();return this}; -tn.prototype.$classData=y({Wr:0},!1,"java.util.UnknownFormatConversionException",{Wr:1,zg:1,zf:1,$c:1,Gc:1,Qb:1,c:1,f:1});function hw(){K.call(this);this.De=this.Ce=!1}hw.prototype=new Gv;hw.prototype.constructor=hw;hw.prototype.ea=function(){return this.De};hw.prototype.N=function(){return this.Ce};function Yc(a,b){var c=new hw;c.Ce=a;c.De=b;K.prototype.j.call(c,null,null);return c}hw.prototype.$classData=y({us:0},!1,"scala.Tuple2$mcZZ$sp",{us:1,Qi:1,c:1,Hl:1,ob:1,u:1,k:1,f:1}); +d.$classData=y({Ir:0},!1,"java.util.Arrays$$anon$3",{Ir:1,c:1,Ne:1,Ie:1,Oe:1,Me:1,k:1,f:1});function un(){W.call(this);this.bh=null}un.prototype=new Iv;un.prototype.constructor=un;un.prototype.Fe=function(){return"Flags \x3d '"+this.bh+"'"};un.prototype.e=function(a){this.bh=a;W.prototype.Pb.call(this,null,null,0,!0);if(null===a)throw(new Se).b();return this};un.prototype.$classData=y({Jr:0},!1,"java.util.DuplicateFormatFlagsException",{Jr:1,zg:1,zf:1,$c:1,Gc:1,Qb:1,c:1,f:1}); +function vt(){W.call(this);this.bh=null;this.Ug=0}vt.prototype=new Iv;vt.prototype.constructor=vt;vt.prototype.Fe=function(){return"Conversion \x3d "+(new M).aa(this.Ug)+", Flags \x3d "+this.bh};vt.prototype.$classData=y({Kr:0},!1,"java.util.FormatFlagsConversionMismatchException",{Kr:1,zg:1,zf:1,$c:1,Gc:1,Qb:1,c:1,f:1});function Cn(){W.call(this);this.Ug=0}Cn.prototype=new Iv;Cn.prototype.constructor=Cn;Cn.prototype.Fe=function(){return"Code point \x3d 0x"+(+(this.Ug>>>0)).toString(16)}; +Cn.prototype.Ab=function(a){this.Ug=a;W.prototype.Pb.call(this,null,null,0,!0);return this};Cn.prototype.$classData=y({Or:0},!1,"java.util.IllegalFormatCodePointException",{Or:1,zg:1,zf:1,$c:1,Gc:1,Qb:1,c:1,f:1});function ut(){W.call(this);this.Ug=0;this.Vm=null}ut.prototype=new Iv;ut.prototype.constructor=ut;ut.prototype.Fe=function(){return m.String.fromCharCode(this.Ug)+" !\x3d "+pb(this.Vm)}; +ut.prototype.$classData=y({Pr:0},!1,"java.util.IllegalFormatConversionException",{Pr:1,zg:1,zf:1,$c:1,Gc:1,Qb:1,c:1,f:1});function On(){W.call(this);this.bh=null}On.prototype=new Iv;On.prototype.constructor=On;On.prototype.Fe=function(){return"Flags \x3d '"+this.bh+"'"};On.prototype.e=function(a){this.bh=a;W.prototype.Pb.call(this,null,null,0,!0);if(null===a)throw(new Se).b();return this}; +On.prototype.$classData=y({Qr:0},!1,"java.util.IllegalFormatFlagsException",{Qr:1,zg:1,zf:1,$c:1,Gc:1,Qb:1,c:1,f:1});function An(){W.call(this);this.Co=0}An.prototype=new Iv;An.prototype.constructor=An;An.prototype.Fe=function(){return""+this.Co};An.prototype.Ab=function(a){this.Co=a;W.prototype.Pb.call(this,null,null,0,!0);return this};An.prototype.$classData=y({Rr:0},!1,"java.util.IllegalFormatPrecisionException",{Rr:1,zg:1,zf:1,$c:1,Gc:1,Qb:1,c:1,f:1});function Rn(){W.call(this);this.bq=0} +Rn.prototype=new Iv;Rn.prototype.constructor=Rn;Rn.prototype.Fe=function(){return""+this.bq};Rn.prototype.Ab=function(a){this.bq=a;W.prototype.Pb.call(this,null,null,0,!0);return this};Rn.prototype.$classData=y({Sr:0},!1,"java.util.IllegalFormatWidthException",{Sr:1,zg:1,zf:1,$c:1,Gc:1,Qb:1,c:1,f:1});function xn(){W.call(this);this.hh=null}xn.prototype=new Iv;xn.prototype.constructor=xn;xn.prototype.Fe=function(){return"Format specifier '"+this.hh+"'"}; +xn.prototype.e=function(a){this.hh=a;W.prototype.Pb.call(this,null,null,0,!0);if(null===a)throw(new Se).b();return this};xn.prototype.$classData=y({Tr:0},!1,"java.util.MissingFormatArgumentException",{Tr:1,zg:1,zf:1,$c:1,Gc:1,Qb:1,c:1,f:1});function wn(){W.call(this);this.hh=null}wn.prototype=new Iv;wn.prototype.constructor=wn;wn.prototype.Fe=function(){return this.hh};wn.prototype.e=function(a){this.hh=a;W.prototype.Pb.call(this,null,null,0,!0);if(null===a)throw(new Se).b();return this}; +wn.prototype.$classData=y({Ur:0},!1,"java.util.MissingFormatWidthException",{Ur:1,zg:1,zf:1,$c:1,Gc:1,Qb:1,c:1,f:1});function tn(){W.call(this);this.hh=null}tn.prototype=new Iv;tn.prototype.constructor=tn;tn.prototype.Fe=function(){return"Conversion \x3d '"+this.hh+"'"};tn.prototype.e=function(a){this.hh=a;W.prototype.Pb.call(this,null,null,0,!0);if(null===a)throw(new Se).b();return this}; +tn.prototype.$classData=y({Wr:0},!1,"java.util.UnknownFormatConversionException",{Wr:1,zg:1,zf:1,$c:1,Gc:1,Qb:1,c:1,f:1});function hw(){K.call(this);this.Ce=this.Be=!1}hw.prototype=new Gv;hw.prototype.constructor=hw;hw.prototype.ea=function(){return this.Ce};hw.prototype.N=function(){return this.Be};function Yc(a,b){var c=new hw;c.Be=a;c.Ce=b;K.prototype.j.call(c,null,null);return c}hw.prototype.$classData=y({us:0},!1,"scala.Tuple2$mcZZ$sp",{us:1,Qi:1,c:1,Hl:1,ob:1,u:1,k:1,f:1}); function mw(){this.zo=this.yo=null}mw.prototype=new z;mw.prototype.constructor=mw;function qq(a,b){var c=new mw;c.yo=a;c.zo=b;return c}d=mw.prototype;d.me=function(a,b){return 0<=this.R(a,b)};d.le=function(a,b){return 0this.R(a,b)};d.R=function(a,b){var c=this.yo.R(a.N(),b.N());0!==c?a=c:(a=this.zo.R(a.ea(),b.ea()),a=0!==a?a:0);return a};d.Jd=function(a,b){return 0>=this.R(a,b)}; -d.$classData=y({Hs:0},!1,"scala.math.Ordering$$anon$12",{Hs:1,c:1,Ne:1,Je:1,Oe:1,Me:1,k:1,f:1});function nw(){this.ni=this.ab=null}nw.prototype=new z;nw.prototype.constructor=nw;d=nw.prototype;d.me=function(a,b){return 0<=this.R(a,b)};d.le=function(a,b){return 0this.R(a,b)};d.R=function(a,b){return this.ab.R(this.ni.l(a),this.ni.l(b))};function ud(a,b){var c=new nw;if(null===a)throw Rj(Sj(),null);c.ab=a;c.ni=b;return c} -d.Jd=function(a,b){return 0>=this.R(a,b)};d.$classData=y({Is:0},!1,"scala.math.Ordering$$anon$5",{Is:1,c:1,Ne:1,Je:1,Oe:1,Me:1,k:1,f:1});function wg(){this.pk=null}wg.prototype=new z;wg.prototype.constructor=wg;d=wg.prototype;d.Kd=function(a){var b=this.bd();return b===v($a)?u(B($a),[a]):b===v(ab)?u(B(ab),[a]):b===v(Za)?u(B(Za),[a]):b===v(bb)?u(B(bb),[a]):b===v(cb)?u(B(cb),[a]):b===v(db)?u(B(db),[a]):b===v(eb)?u(B(eb),[a]):b===v(Ya)?u(B(Ya),[a]):b===v(Xa)?u(B(ya),[a]):wf(xf(),this.bd(),a)}; -d.A=function(a){var b;a&&a.$classData&&a.$classData.q.te?(b=this.bd(),a=a.bd(),b=b===a):b=!1;return b};d.w=function(){return xu(this,this.pk)};d.bd=function(){return this.pk};d.vg=function(a){this.pk=a;return this};d.L=function(){return ml(S(),this.pk)};d.$classData=y({$s:0},!1,"scala.reflect.ClassTag$GenericClassTag",{$s:1,c:1,te:1,Pe:1,ue:1,k:1,f:1,u:1});function ow(){this.p=null}ow.prototype=new Uv;ow.prototype.constructor=ow;ow.prototype.b=function(){up.prototype.b.call(this);return this}; +d.$classData=y({Hs:0},!1,"scala.math.Ordering$$anon$12",{Hs:1,c:1,Ne:1,Ie:1,Oe:1,Me:1,k:1,f:1});function nw(){this.ni=this.ab=null}nw.prototype=new z;nw.prototype.constructor=nw;d=nw.prototype;d.me=function(a,b){return 0<=this.R(a,b)};d.le=function(a,b){return 0this.R(a,b)};d.R=function(a,b){return this.ab.R(this.ni.l(a),this.ni.l(b))};function ud(a,b){var c=new nw;if(null===a)throw Rj(Sj(),null);c.ab=a;c.ni=b;return c} +d.Jd=function(a,b){return 0>=this.R(a,b)};d.$classData=y({Is:0},!1,"scala.math.Ordering$$anon$5",{Is:1,c:1,Ne:1,Ie:1,Oe:1,Me:1,k:1,f:1});function wg(){this.pk=null}wg.prototype=new z;wg.prototype.constructor=wg;d=wg.prototype;d.Kd=function(a){var b=this.bd();return b===v($a)?u(B($a),[a]):b===v(ab)?u(B(ab),[a]):b===v(Za)?u(B(Za),[a]):b===v(bb)?u(B(bb),[a]):b===v(cb)?u(B(cb),[a]):b===v(db)?u(B(db),[a]):b===v(eb)?u(B(eb),[a]):b===v(Ya)?u(B(Ya),[a]):b===v(Xa)?u(B(ya),[a]):wf(xf(),this.bd(),a)}; +d.A=function(a){var b;a&&a.$classData&&a.$classData.q.se?(b=this.bd(),a=a.bd(),b=b===a):b=!1;return b};d.w=function(){return xu(this,this.pk)};d.bd=function(){return this.pk};d.vg=function(a){this.pk=a;return this};d.L=function(){return ml(S(),this.pk)};d.$classData=y({$s:0},!1,"scala.reflect.ClassTag$GenericClassTag",{$s:1,c:1,se:1,Pe:1,te:1,k:1,f:1,u:1});function ow(){this.p=null}ow.prototype=new Uv;ow.prototype.constructor=ow;ow.prototype.b=function(){up.prototype.b.call(this);return this}; ow.prototype.fa=function(){Dc();return(new Ec).b()};ow.prototype.$classData=y({Tt:0},!1,"scala.collection.Seq$",{Tt:1,Df:1,Cf:1,Od:1,dd:1,c:1,Pd:1,ed:1});var pw=void 0;function H(){pw||(pw=(new ow).b());return pw}function qw(){this.p=null}qw.prototype=new Uv;qw.prototype.constructor=qw;function rw(){}rw.prototype=qw.prototype;function sw(){}sw.prototype=new Bs;sw.prototype.constructor=sw;sw.prototype.b=function(){tw=this;Ep(new Dp,Vi(function(){return function(a){return a}}(this)));return this}; function uw(a,b,c,e,f,g,h){var k=31&(b>>>g|0),l=31&(e>>>g|0);if(k!==l)return a=1<c)a.Vi=""+a.Vi+b,b="";else{var e=""+a.Vi+b.substring(0,c);m.console&&(a.Vn&&m.console.error?m.console.error(e):m.console.log(e));a.Vi="";b=b.substring(1+c|0)}}}Hw.prototype.Uj=function(){};Hw.prototype.$classData=y({tr:0},!1,"java.lang.JSConsoleBasedPrintStream",{tr:1,Kw:1,Jw:1,Wq:1,c:1,Rk:1,fo:1,Qm:1,eo:1});function Bh(){K.call(this);this.Nk=this.Lk=0}Bh.prototype=new Gv;Bh.prototype.constructor=Bh;d=Bh.prototype;d.Ng=function(){return this.Lk}; d.ea=function(){return this.Nk};d.uh=function(){return this.Nk};d.fc=function(a,b){this.Lk=a;this.Nk=b;K.prototype.j.call(this,null,null);return this};d.N=function(){return this.Lk};d.$classData=y({ss:0},!1,"scala.Tuple2$mcDD$sp",{ss:1,Qi:1,c:1,Hl:1,ob:1,u:1,k:1,f:1,$w:1});function N(){K.call(this);this.Ok=this.Mk=0}N.prototype=new Gv;N.prototype.constructor=N;d=N.prototype;d.Qa=function(){return this.Mk};d.r=function(a,b){this.Mk=a;this.Ok=b;K.prototype.j.call(this,null,null);return this};d.ea=function(){return this.Ok}; d.Ja=function(){return this.Ok};d.N=function(){return this.Mk};d.$classData=y({ts:0},!1,"scala.Tuple2$mcII$sp",{ts:1,Qi:1,c:1,Hl:1,ob:1,u:1,k:1,f:1,ax:1});function Ls(){}Ls.prototype=new z;Ls.prototype.constructor=Ls;d=Ls.prototype;d.b=function(){return this};d.me=function(a,b){return 0<=this.R(a,b)};d.le=function(a,b){return 0this.R(a,b)};d.R=function(a,b){return(a|0)-(b|0)|0};d.Jd=function(a,b){return 0>=this.R(a,b)}; -d.$classData=y({Js:0},!1,"scala.math.Ordering$Byte$",{Js:1,c:1,Ks:1,Ne:1,Je:1,Oe:1,Me:1,k:1,f:1});var Ks=void 0;function Ns(){}Ns.prototype=new z;Ns.prototype.constructor=Ns;d=Ns.prototype;d.b=function(){return this};d.me=function(a,b){return 0<=this.R(a,b)};d.le=function(a,b){return 0this.R(a,b)};d.R=function(a,b){return(null===a?0:a.ca)-(null===b?0:b.ca)|0};d.Jd=function(a,b){return 0>=this.R(a,b)}; -d.$classData=y({Ls:0},!1,"scala.math.Ordering$Char$",{Ls:1,c:1,Ms:1,Ne:1,Je:1,Oe:1,Me:1,k:1,f:1});var Ms=void 0;function Iw(){}Iw.prototype=new z;Iw.prototype.constructor=Iw;d=Iw.prototype;d.b=function(){return this};d.me=function(a,b){return+a>=+b};d.qe=function(a,b){return+a<+b};d.le=function(a,b){return+a>+b};d.R=function(a,b){a=+a;b=+b;return Or(gr(),a,b)};d.Jd=function(a,b){return+a<=+b};d.$classData=y({Ns:0},!1,"scala.math.Ordering$Double$",{Ns:1,c:1,px:1,Ne:1,Je:1,Oe:1,Me:1,k:1,f:1}); -var Jw=void 0;function Jh(){Jw||(Jw=(new Iw).b());return Jw}function Kw(){}Kw.prototype=new z;Kw.prototype.constructor=Kw;d=Kw.prototype;d.b=function(){return this};d.me=function(a,b){return 0<=this.R(a,b)};d.le=function(a,b){return 0this.R(a,b)};d.R=function(a,b){a|=0;b|=0;return a===b?0:a=this.R(a,b)};d.$classData=y({Os:0},!1,"scala.math.Ordering$Int$",{Os:1,c:1,Ps:1,Ne:1,Je:1,Oe:1,Me:1,k:1,f:1});var Lw=void 0; +d.$classData=y({Js:0},!1,"scala.math.Ordering$Byte$",{Js:1,c:1,Ks:1,Ne:1,Ie:1,Oe:1,Me:1,k:1,f:1});var Ks=void 0;function Ns(){}Ns.prototype=new z;Ns.prototype.constructor=Ns;d=Ns.prototype;d.b=function(){return this};d.me=function(a,b){return 0<=this.R(a,b)};d.le=function(a,b){return 0this.R(a,b)};d.R=function(a,b){return(null===a?0:a.ca)-(null===b?0:b.ca)|0};d.Jd=function(a,b){return 0>=this.R(a,b)}; +d.$classData=y({Ls:0},!1,"scala.math.Ordering$Char$",{Ls:1,c:1,Ms:1,Ne:1,Ie:1,Oe:1,Me:1,k:1,f:1});var Ms=void 0;function Iw(){}Iw.prototype=new z;Iw.prototype.constructor=Iw;d=Iw.prototype;d.b=function(){return this};d.me=function(a,b){return+a>=+b};d.qe=function(a,b){return+a<+b};d.le=function(a,b){return+a>+b};d.R=function(a,b){a=+a;b=+b;return Or(gr(),a,b)};d.Jd=function(a,b){return+a<=+b};d.$classData=y({Ns:0},!1,"scala.math.Ordering$Double$",{Ns:1,c:1,px:1,Ne:1,Ie:1,Oe:1,Me:1,k:1,f:1}); +var Jw=void 0;function Jh(){Jw||(Jw=(new Iw).b());return Jw}function Kw(){}Kw.prototype=new z;Kw.prototype.constructor=Kw;d=Kw.prototype;d.b=function(){return this};d.me=function(a,b){return 0<=this.R(a,b)};d.le=function(a,b){return 0this.R(a,b)};d.R=function(a,b){a|=0;b|=0;return a===b?0:a=this.R(a,b)};d.$classData=y({Os:0},!1,"scala.math.Ordering$Int$",{Os:1,c:1,Ps:1,Ne:1,Ie:1,Oe:1,Me:1,k:1,f:1});var Lw=void 0; function td(){Lw||(Lw=(new Kw).b());return Lw}function Rs(){}Rs.prototype=new z;Rs.prototype.constructor=Rs;d=Rs.prototype;d.b=function(){return this};d.me=function(a,b){return 0<=this.R(a,b)};d.le=function(a,b){return 0this.R(a,b)};d.R=function(a,b){var c=Ra(a);a=c.va;var c=c.Oa,e=Ra(b);b=e.va;e=e.Oa;Sa();return c===e?a===b?0:(-2147483648^a)<(-2147483648^b)?-1:1:c=this.R(a,b)}; -d.$classData=y({Qs:0},!1,"scala.math.Ordering$Long$",{Qs:1,c:1,Rs:1,Ne:1,Je:1,Oe:1,Me:1,k:1,f:1});var Qs=void 0;function Hs(){}Hs.prototype=new z;Hs.prototype.constructor=Hs;d=Hs.prototype;d.b=function(){return this};d.me=function(a,b){return 0<=this.R(a,b)};d.le=function(a,b){return 0this.R(a,b)};d.R=function(a,b){return(a|0)-(b|0)|0};d.Jd=function(a,b){return 0>=this.R(a,b)}; -d.$classData=y({Ts:0},!1,"scala.math.Ordering$Short$",{Ts:1,c:1,Us:1,Ne:1,Je:1,Oe:1,Me:1,k:1,f:1});var Gs=void 0;function Mw(){}Mw.prototype=new z;Mw.prototype.constructor=Mw;d=Mw.prototype;d.b=function(){return this};d.me=function(a,b){return 0<=this.R(a,b)};d.le=function(a,b){return 0this.R(a,b)};d.R=function(a,b){return a===b?0:a=this.R(a,b)}; -d.$classData=y({Vs:0},!1,"scala.math.Ordering$String$",{Vs:1,c:1,qx:1,Ne:1,Je:1,Oe:1,Me:1,k:1,f:1});var Nw=void 0;function Te(){Nw||(Nw=(new Mw).b());return Nw}function Ow(){this.sd=null}Ow.prototype=new z;Ow.prototype.constructor=Ow;function Pw(){}Pw.prototype=Ow.prototype;Ow.prototype.A=function(a){return this===a};Ow.prototype.w=function(){return this.sd};Ow.prototype.L=function(){return Ha(this)};function Qw(){}Qw.prototype=new z;Qw.prototype.constructor=Qw;function Rw(){}Rw.prototype=Qw.prototype; +d.$classData=y({Qs:0},!1,"scala.math.Ordering$Long$",{Qs:1,c:1,Rs:1,Ne:1,Ie:1,Oe:1,Me:1,k:1,f:1});var Qs=void 0;function Hs(){}Hs.prototype=new z;Hs.prototype.constructor=Hs;d=Hs.prototype;d.b=function(){return this};d.me=function(a,b){return 0<=this.R(a,b)};d.le=function(a,b){return 0this.R(a,b)};d.R=function(a,b){return(a|0)-(b|0)|0};d.Jd=function(a,b){return 0>=this.R(a,b)}; +d.$classData=y({Ts:0},!1,"scala.math.Ordering$Short$",{Ts:1,c:1,Us:1,Ne:1,Ie:1,Oe:1,Me:1,k:1,f:1});var Gs=void 0;function Mw(){}Mw.prototype=new z;Mw.prototype.constructor=Mw;d=Mw.prototype;d.b=function(){return this};d.me=function(a,b){return 0<=this.R(a,b)};d.le=function(a,b){return 0this.R(a,b)};d.R=function(a,b){return a===b?0:a=this.R(a,b)}; +d.$classData=y({Vs:0},!1,"scala.math.Ordering$String$",{Vs:1,c:1,qx:1,Ne:1,Ie:1,Oe:1,Me:1,k:1,f:1});var Nw=void 0;function Te(){Nw||(Nw=(new Mw).b());return Nw}function Ow(){this.sd=null}Ow.prototype=new z;Ow.prototype.constructor=Ow;function Pw(){}Pw.prototype=Ow.prototype;Ow.prototype.A=function(a){return this===a};Ow.prototype.w=function(){return this.sd};Ow.prototype.L=function(){return Ha(this)};function Qw(){}Qw.prototype=new z;Qw.prototype.constructor=Qw;function Rw(){}Rw.prototype=Qw.prototype; function Sw(){this.Eb=this.p=null}Sw.prototype=new rw;Sw.prototype.constructor=Sw;Sw.prototype.b=function(){up.prototype.b.call(this);Tw=this;this.Eb=(new xs).b();return this};Sw.prototype.fa=function(){Xd();Zd();return(new ae).b()};Sw.prototype.$classData=y({Ht:0},!1,"scala.collection.IndexedSeq$",{Ht:1,So:1,Df:1,Cf:1,Od:1,dd:1,c:1,Pd:1,ed:1});var Tw=void 0;function Yd(){Tw||(Tw=(new Sw).b());return Tw}function R(){this.Yc=this.Yg=0;this.Gb=null}R.prototype=new Ft;R.prototype.constructor=R; R.prototype.M=function(){this.Yc>=this.Yg&&ek().Gd.M();var a=this.Gb.i(this.Yc);this.Yc=1+this.Yc|0;return a};function Q(a,b,c,e){a.Yg=e;if(null===b)throw Rj(Sj(),null);a.Gb=b;a.Yc=c;return a}R.prototype.U=function(){return this.Yc=a?Q(new R,this.Gb,this.Yc,this.Yg):(this.Yc+a|0)>=this.Yg?Q(new R,this.Gb,this.Yg,this.Yg):Q(new R,this.Gb,this.Yc+a|0,this.Yg)}; -R.prototype.$classData=y({Jt:0},!1,"scala.collection.IndexedSeqLike$Elements",{Jt:1,Ad:1,c:1,qd:1,Q:1,P:1,ux:1,k:1,f:1});function Uw(){}Uw.prototype=new Ou;Uw.prototype.constructor=Uw;Uw.prototype.b=function(){return this};function Vw(a,b,c,e,f,g){var h=31&(b>>>g|0),k=31&(e>>>g|0);if(h!==k)return a=1<>>g|0),k=31&(e>>>g|0);if(h!==k)return a=1<>24};d.wj=function(a,b){return((a|0)%(b|0)|0)<<24>>24};d.me=function(a,b){return 0<=this.R(a,b)};d.kf=function(a,b){return((a|0)+(b|0)|0)<<24>>24}; -d.qe=function(a,b){return 0>this.R(a,b)};d.le=function(a,b){return 0>24};d.Rh=function(a,b){return((a|0)/(b|0)|0)<<24>>24};d.R=function(a,b){return(a|0)-(b|0)|0};d.rh=function(a){return a|0};d.Wc=function(a){return a<<24>>24};d.Jd=function(a,b){return 0>=this.R(a,b)};d.$classData=y({As:0},!1,"scala.math.Numeric$ByteIsIntegral$",{As:1,c:1,jx:1,qk:1,rk:1,Ne:1,Je:1,Oe:1,Me:1,k:1,f:1,Ks:1});var Is=void 0;function By(){}By.prototype=new z; +d.qe=function(a,b){return 0>this.R(a,b)};d.le=function(a,b){return 0>24};d.Rh=function(a,b){return((a|0)/(b|0)|0)<<24>>24};d.R=function(a,b){return(a|0)-(b|0)|0};d.rh=function(a){return a|0};d.Wc=function(a){return a<<24>>24};d.Jd=function(a,b){return 0>=this.R(a,b)};d.$classData=y({As:0},!1,"scala.math.Numeric$ByteIsIntegral$",{As:1,c:1,jx:1,qk:1,rk:1,Ne:1,Ie:1,Oe:1,Me:1,k:1,f:1,Ks:1});var Is=void 0;function By(){}By.prototype=new z; By.prototype.constructor=By;d=By.prototype;d.b=function(){return this};d.Dg=function(a,b){return(new M).aa(65535&((null===a?0:a.ca)-(null===b?0:b.ca)|0))};d.wj=function(a,b){return(new M).aa(65535&((null===a?0:a.ca)%(null===b?0:b.ca)|0))};d.me=function(a,b){return 0<=this.R(a,b)};d.kf=function(a,b){return(new M).aa(65535&((null===a?0:a.ca)+(null===b?0:b.ca)|0))};d.qe=function(a,b){return 0>this.R(a,b)};d.le=function(a,b){return 0=this.R(a,b)};d.$classData=y({Bs:0},!1,"scala.math.Numeric$CharIsIntegral$",{Bs:1,c:1,kx:1,qk:1,rk:1,Ne:1,Je:1,Oe:1,Me:1,k:1,f:1,Ms:1});var Cy=void 0; +d.qh=function(a,b){a=65535&r(null===a?0:a.ca,null===b?0:b.ca);return(new M).aa(a)};d.Rh=function(a,b){return(new M).aa(65535&((null===a?0:a.ca)/(null===b?0:b.ca)|0))};d.R=function(a,b){return(null===a?0:a.ca)-(null===b?0:b.ca)|0};d.rh=function(a){return null===a?0:a.ca};d.Wc=function(a){return(new M).aa(65535&a)};d.Jd=function(a,b){return 0>=this.R(a,b)};d.$classData=y({Bs:0},!1,"scala.math.Numeric$CharIsIntegral$",{Bs:1,c:1,kx:1,qk:1,rk:1,Ne:1,Ie:1,Oe:1,Me:1,k:1,f:1,Ms:1});var Cy=void 0; function Zf(){Cy||(Cy=(new By).b());return Cy}function Dy(){}Dy.prototype=new z;Dy.prototype.constructor=Dy;d=Dy.prototype;d.b=function(){return this};d.Dg=function(a,b){return(a|0)-(b|0)|0};d.wj=function(a,b){return(a|0)%(b|0)|0};d.me=function(a,b){return 0<=this.R(a,b)};d.kf=function(a,b){return(a|0)+(b|0)|0};d.qe=function(a,b){return 0>this.R(a,b)};d.le=function(a,b){return 0=this.R(a,b)};d.$classData=y({Cs:0},!1,"scala.math.Numeric$IntIsIntegral$",{Cs:1,c:1,lx:1,qk:1,rk:1,Ne:1,Je:1,Oe:1,Me:1,k:1,f:1,Ps:1});var Ey=void 0;function xp(){Ey||(Ey=(new Dy).b());return Ey}function Ps(){}Ps.prototype=new z;Ps.prototype.constructor=Ps;d=Ps.prototype;d.b=function(){return this}; +d.R=function(a,b){a|=0;b|=0;return a===b?0:a=this.R(a,b)};d.$classData=y({Cs:0},!1,"scala.math.Numeric$IntIsIntegral$",{Cs:1,c:1,lx:1,qk:1,rk:1,Ne:1,Ie:1,Oe:1,Me:1,k:1,f:1,Ps:1});var Ey=void 0;function xp(){Ey||(Ey=(new Dy).b());return Ey}function Ps(){}Ps.prototype=new z;Ps.prototype.constructor=Ps;d=Ps.prototype;d.b=function(){return this}; d.Dg=function(a,b){var c=Ra(a);a=c.va;var c=c.Oa,e=Ra(b);b=e.va;e=e.Oa;c=(new Mf).r(a,c);b=(new Mf).r(b,e);a=c.va;c=c.Oa;e=b.Oa;b=a-b.va|0;return(new Mf).r(b,(-2147483648^b)>(-2147483648^a)?-1+(c-e|0)|0:c-e|0)};d.wj=function(a,b){var c=Ra(a);a=c.va;var c=c.Oa,e=Ra(b);b=e.va;e=e.Oa;a=(new Mf).r(a,c);b=(new Mf).r(b,e);c=Sa();a=Ts(c,a.va,a.Oa,b.va,b.Oa);return(new Mf).r(a,c.Db)};d.me=function(a,b){return 0<=this.R(a,b)}; d.kf=function(a,b){var c=Ra(a);a=c.va;var c=c.Oa,e=Ra(b);b=e.va;e=e.Oa;c=(new Mf).r(a,c);b=(new Mf).r(b,e);a=c.va;c=c.Oa;e=b.Oa;b=a+b.va|0;return(new Mf).r(b,(-2147483648^b)<(-2147483648^a)?1+(c+e|0)|0:c+e|0)};d.qe=function(a,b){return 0>this.R(a,b)};d.le=function(a,b){return 0>>16|0,h=65535&e,k=e>>>16|0,l=r(f,h),h=r(g,h),n=r(f,k),f=l+((h+n|0)<<16)|0,l=(l>>>16|0)+n|0;a=(((r(b,c.Oa)+r(a.Oa,e)|0)+r(g,k)|0)+(l>>>16|0)|0)+(((65535&l)+h|0)>>>16|0)|0;return(new Mf).r(f,a)};d.Rh=function(a,b){var c=Ra(a);a=c.va;var c=c.Oa,e=Ra(b);b=e.va;e=e.Oa;a=(new Mf).r(a,c);b=(new Mf).r(b,e);c=Sa();a=Nm(c,a.va,a.Oa,b.va,b.Oa);return(new Mf).r(a,c.Db)}; -d.R=function(a,b){var c=Ra(a);a=c.va;var c=c.Oa,e=Ra(b);b=e.va;e=e.Oa;Sa();return c===e?a===b?0:(-2147483648^a)<(-2147483648^b)?-1:1:c>31)};d.Jd=function(a,b){return 0>=this.R(a,b)};d.$classData=y({Ds:0},!1,"scala.math.Numeric$LongIsIntegral$",{Ds:1,c:1,mx:1,qk:1,rk:1,Ne:1,Je:1,Oe:1,Me:1,k:1,f:1,Rs:1});var Os=void 0;function Fs(){}Fs.prototype=new z;Fs.prototype.constructor=Fs;d=Fs.prototype; +d.R=function(a,b){var c=Ra(a);a=c.va;var c=c.Oa,e=Ra(b);b=e.va;e=e.Oa;Sa();return c===e?a===b?0:(-2147483648^a)<(-2147483648^b)?-1:1:c>31)};d.Jd=function(a,b){return 0>=this.R(a,b)};d.$classData=y({Ds:0},!1,"scala.math.Numeric$LongIsIntegral$",{Ds:1,c:1,mx:1,qk:1,rk:1,Ne:1,Ie:1,Oe:1,Me:1,k:1,f:1,Rs:1});var Os=void 0;function Fs(){}Fs.prototype=new z;Fs.prototype.constructor=Fs;d=Fs.prototype; d.b=function(){return this};d.Dg=function(a,b){return((a|0)-(b|0)|0)<<16>>16};d.wj=function(a,b){return((a|0)%(b|0)|0)<<16>>16};d.me=function(a,b){return 0<=this.R(a,b)};d.kf=function(a,b){return((a|0)+(b|0)|0)<<16>>16};d.qe=function(a,b){return 0>this.R(a,b)};d.le=function(a,b){return 0>16};d.Rh=function(a,b){return((a|0)/(b|0)|0)<<16>>16};d.R=function(a,b){return(a|0)-(b|0)|0};d.rh=function(a){return a|0};d.Wc=function(a){return a<<16>>16}; -d.Jd=function(a,b){return 0>=this.R(a,b)};d.$classData=y({Es:0},!1,"scala.math.Numeric$ShortIsIntegral$",{Es:1,c:1,ox:1,qk:1,rk:1,Ne:1,Je:1,Oe:1,Me:1,k:1,f:1,Us:1});var Es=void 0;function Fy(){}Fy.prototype=new z;Fy.prototype.constructor=Fy;function Gy(){}d=Gy.prototype=Fy.prototype;d.Ee=function(a,b){Jg(this,a,b)};d.cc=function(){var a=mg().p;return xt(this,a)};d.oc=function(a,b){return Zg(this,a,b)};d.Jb=function(a){return this.Ic("",a,"")};d.Ic=function(a,b,c){return he(this,a,b,c)}; +d.Jd=function(a,b){return 0>=this.R(a,b)};d.$classData=y({Es:0},!1,"scala.math.Numeric$ShortIsIntegral$",{Es:1,c:1,ox:1,qk:1,rk:1,Ne:1,Ie:1,Oe:1,Me:1,k:1,f:1,Us:1});var Es=void 0;function Fy(){}Fy.prototype=new z;Fy.prototype.constructor=Fy;function Gy(){}d=Gy.prototype=Fy.prototype;d.De=function(a,b){Jg(this,a,b)};d.cc=function(){var a=mg().p;return xt(this,a)};d.oc=function(a,b){return Zg(this,a,b)};d.Jb=function(a){return this.Ic("",a,"")};d.Ic=function(a,b,c){return he(this,a,b,c)}; d.Bd=function(a){return rc(new sc,this,a)};d.w=function(){return Mv(this)};d.Of=function(a,b){return El(this,a,b)};d.Zd=function(){return Tf(this)};d.$e=function(){Zd();var a=Yd().Eb;return xt(this,a)};d.Pc=function(a){return this.Yd(a,!1)};d.lc=function(){var a=Gt().p;return xt(this,a)};d.Yd=function(a,b){return Nv(this,a,b)};d.ad=function(){return this.Jb("")};d.ub=function(a,b){return zr(this,a,b)};d.Lc=function(){return-1};d.ee=function(a){return Il(this,a)};d.nb=function(){return Ov(this)}; -d.z=function(){return Pv(this)};d.Vd=function(a,b,c,e){return Kl(this,a,b,c,e)};d.dc=function(){return this.Tb()};d.de=function(a){return Ll(this,a)};d.Bc=function(){var a=Uh(),a=Vh(a);return xt(this,a)};d.Kb=function(){return this};d.Cd=function(a,b){return this.Of(a,b)};d.Ie=function(){return!0};d.hd=function(a){var b=Fc(new Gc,Hc());this.K(G(function(a,b,f){return function(a){return f.da(a)}}(this,a,b)));return b.sa};d.ia=function(a,b){return Qd(this,a,b)};d.jd=function(a){return Ml(this,a)}; +d.z=function(){return Pv(this)};d.Vd=function(a,b,c,e){return Kl(this,a,b,c,e)};d.dc=function(){return this.Tb()};d.de=function(a){return Ll(this,a)};d.Bc=function(){var a=Uh(),a=Vh(a);return xt(this,a)};d.Kb=function(){return this};d.Cd=function(a,b){return this.Of(a,b)};d.He=function(){return!0};d.hd=function(a){var b=Fc(new Gc,Hc());this.K(G(function(a,b,f){return function(a){return f.da(a)}}(this,a,b)));return b.sa};d.ia=function(a,b){return Qd(this,a,b)};d.jd=function(a){return Ml(this,a)}; d.uo=function(){return!this.h()};d.Jc=function(a){return Nl(this,a)};d.fa=function(){return this.Ub().fa()};d.Mc=function(){return Sv(this)};function be(a){a=a.m();return(new Di).Ib(0,a,1)}function Oe(a,b,c){c=c.ld(a.Kb());c.eb(a.sc());c.da(b);return c.X()} function Hy(a,b){var c=a.m(),e=a.fa();if(1===c)e.eb(a);else if(1=a.Ra(1))return a.Kb();for(var c=a.fa(),e=(new Hx).b(),f=a.ba(),g=!1;f.U();){var h=f.M();Hm(e,h)?c.da(h):g=!0}return g||!b?c.X():a.Kb()}function mh(a,b){b=Jy(a,b.sf());var c=a.fa();a.K(G(function(a,b,c){return function(a){var e=b.l(a)|0;0===e?a=c.da(a):(Ky(b,a,-1+e|0),a=void 0);return a}}(a,b,c)));return c.X()}function Jy(a,b){var c=Ly();b.K(G(function(a,b){return function(a){var c=1+(b.l(a)|0)|0;Ky(b,a,c)}}(a,c)));return c} @@ -663,80 +663,80 @@ function rg(a,b){a=a.il(b);if(0>b||a.h())throw(new gp).e(""+b);return a.t()}func function cz(a,b){for(;!a.h();){if(b.l(a.t()))return(new J).g(a.t());a=a.z()}return F()}function $h(a){for(var b=0;!a.h();)b=1+b|0,a=a.z();return b}function dz(a){if(a.h())throw(new V).b();for(var b=a.z();!b.h();)a=b,b=b.z();return a.t()}function ez(a,b){for(;!a.h();){if(T(U(),a.t(),b))return!0;a=a.z()}return!1}function fz(a,b){return 0<=b&&0<(0>b?1:qg(a,b))}function qg(a,b){var c=0;for(;;){if(c===b)return a.h()?0:1;if(a.h())return-1;c=1+c|0;a=a.z()}} function gz(a,b){if(a.h())throw(new Jl).e("empty.reduceLeft");return a.z().Of(a.t(),b)}function hz(a){var b=(new lv).Ab(a.s());a.K(G(function(a,b){return function(a){return iz(b,a)}}(a,b)));return b}function Ah(a){if(a.h())return Gk().Sk.zh;Gk();var b=(new ae).b();a.K(G(function(a,b){return function(a){return b.da(a)}}(a,b)));return ge(b)}function jz(a,b){return b.Ga().Cd(a,Vi(function(){return function(a,b){return a.bf(b)}}(a)))} function kz(a){var b=(new lv).Ab(a.s());a.K(G(function(a,b){return function(a){return iz(b,a)}}(a,b)));return b}function lz(a,b,c,e,f){var g=a.ba();a=(new Gu).jj(g,G(function(){return function(a){if(null!==a){var b=a.N();a=a.ea();Nj||(Nj=(new Mj).b());return""+(""+b+" -\x3e ")+a}throw(new C).g(a);}}(a)));return Kl(a,b,c,e,f)}function Re(a){if(a.h())return Gk().Sk.zh;Gk();var b=(new ae).b();a.K(G(function(a,b){return function(a){return b.da(a)}}(a,b)));return ge(b)} -function mz(a,b){var c=(new Ri).g(a);a.K(G(function(a,b,c){return function(a){b.l(a)&&(c.H=c.H.ud(a.N()))}}(a,b,c)));return c.H}function nz(a,b,c){return a.Ta(b,O(function(a,b,c){return function(){return c.l(b)}}(a,b,c)))}function oz(a,b){return b.Ga().Cd(a,Vi(function(){return function(a,b){return a.kd(b)}}(a)))}function We(a){return Do(a)?a.Yx():a} +function mz(a,b){var c=(new Ri).g(a);a.K(G(function(a,b,c){return function(a){b.l(a)&&(c.H=c.H.td(a.N()))}}(a,b,c)));return c.H}function nz(a,b,c){return a.Ta(b,O(function(a,b,c){return function(){return c.l(b)}}(a,b,c)))}function oz(a,b){return b.Ga().Cd(a,Vi(function(){return function(a,b){return a.kd(b)}}(a)))}function We(a){return Do(a)?a.Yx():a} function Fv(a){if(null!==a){var b=a.toLowerCase();if("true"===b)return!0;if("false"===b)return!1;throw(new tb).e('For input string: "'+a+'"');}throw(new tb).e('For input string: "null"');}function pz(a,b,c){b=0=e)return a.fa().X();c=a.fa();a=a.w().substring(b,e);return c.eb((new E).e(a)).X()}function ej(a,b){a=a.w();b=97<=b&&122>=b||65<=b&&90>=b||48<=b&&57>=b?m.String.fromCharCode(b):"\\"+(new M).aa(b);return sd(w(),a,b,0)} -function Gb(a){var b=(new Id).b(),c=new Vu;if(null===a)throw Rj(Sj(),null);c.Gb=a;c.dm=a.w();c.nj=c.dm.length|0;for(c.Yc=0;c.U();){a=Wu(c);for(var e=a.length|0,f=0;;)if(f=(65535&(a.charCodeAt(f)|0)))f=1+f|0;else break;a=f=(65535&(a.charCodeAt(f)|0)))f=1+f|0;else break;a=f=b)){c.ie(b,this);var e=0;for(a=this.ba().hl(a);ea?0:a)|0);for(var c=0,e=this.ba();ca)a=1;else{for(var b=0,c=this.ba();c.U();){if(b===a){a=c.U()?1:0;break a}c.M();b=1+b|0}a=b-a|0}return a};d.Fc=function(){return be(this)};d.h=function(){return 0===this.Ra(0)};d.ok=function(a){return Ej(this,a)};d.A=function(a){return Cu(this,a)};d.Pi=function(a,b){return Oe(this,a,b)};d.w=function(){return Mv(this)};d.Zc=function(a,b){a:{var c=0>>c|0)),f=Gm(Bg(),this.wd&(-1+e|0));if(0!==(this.wd&e)){e=this.Hb.a[f];a=e.Lj(a,b,5+c|0);if(e===a)return this;b=u(B(Ww),[this.Hb.a.length]);zf(P(),this.Hb,0,b,0,this.Hb.a.length);b.a[f]=a;return Xw(new Yw,this.wd,b,this.Hf+(a.s()-e.s()|0)|0)}c=u(B(Ww),[1+this.Hb.a.length|0]);zf(P(),this.Hb,0,c,0,f);c.a[f]=bA(new cA,a,b);zf(P(),this.Hb,f,c,1+f|0,this.Hb.a.length-f|0);return Xw(new Yw,this.wd|e,c,1+this.Hf|0)}; +function Zw(){lA||(lA=(new kA).b());return lA}function Yw(){this.vd=0;this.Hb=null;this.Hf=0}Yw.prototype=new aA;Yw.prototype.constructor=Yw;d=Yw.prototype; +d.Lj=function(a,b,c){var e=1<<(31&(b>>>c|0)),f=Gm(Bg(),this.vd&(-1+e|0));if(0!==(this.vd&e)){e=this.Hb.a[f];a=e.Lj(a,b,5+c|0);if(e===a)return this;b=u(B(Ww),[this.Hb.a.length]);zf(P(),this.Hb,0,b,0,this.Hb.a.length);b.a[f]=a;return Xw(new Yw,this.vd,b,this.Hf+(a.s()-e.s()|0)|0)}c=u(B(Ww),[1+this.Hb.a.length|0]);zf(P(),this.Hb,0,c,0,f);c.a[f]=bA(new cA,a,b);zf(P(),this.Hb,f,c,1+f|0,this.Hb.a.length-f|0);return Xw(new Yw,this.vd|e,c,1+this.Hf|0)}; d.K=function(a){for(var b=0;b>>c|0)),f=Gm(Bg(),this.wd&(-1+e|0));if(0!==(this.wd&e)){var g=this.Hb.a[f];a=g.xj(a,b,5+c|0);return g===a?this:null===a?(e^=this.wd,0!==e?(a=u(B(Ww),[-1+this.Hb.a.length|0]),zf(P(),this.Hb,0,a,0,f),zf(P(),this.Hb,1+f|0,a,f,-1+(this.Hb.a.length-f|0)|0),f=this.Hf-g.s()|0,1!==a.a.length||$u(a.a[0])?Xw(new Yw,e,a,f):a.a[0]):null):1!==this.Hb.a.length||$u(a)?(e=u(B(Ww),[this.Hb.a.length]),zf(P(),this.Hb,0,e,0,this.Hb.a.length),e.a[f]=a,f=this.Hf+(a.s()-g.s()|0)|0,Xw(new Yw, -this.wd,e,f)):a}return this}; -d.vi=function(a,b,c,e){if(a===this)return this;if(a&&a.$classData&&a.$classData.q.Xo)return a.vi(this,b,c,e);if($u(a)){var f=this.Hb,g=this.wd,h=0,k=a.Hb,l=a.wd,n=0;if(0===(g&l))return null;for(var p=e,t=0,q=0;0!==(g&l);){var x=g^g&(-1+g|0),D=l^l&(-1+l|0);if(x===D){var Y=f.a[h].vi(k.a[n],5+b|0,c,p);null!==Y&&(t=t+Y.s()|0,q|=x,c.a[p]=Y,p=1+p|0);g&=~x;h=1+h|0;l&=~D;n=1+n|0}else{var Y=-1+x|0,X=-1+D|0;YY!==0>X?(g&=~x,h=1+h|0):(l&=~D,n=1+n|0)}}if(0===q)return null;if(t===this.Hf)return this;if(t=== -a.Hf)return a;a=p-e|0;return 1!==a||$u(c.a[e])?(b=u(B(Ww),[a]),Na(c,e,b,0,a),Xw(new Yw,q,b,t)):c.a[e]}return null};function Xw(a,b,c,e){a.wd=b;a.Hb=c;a.Hf=e;jr(dc(),Gm(Bg(),b)===c.a.length);return a} -d.gj=function(a,b,c,e,f){for(var g=f,h=0,k=0,l=0;l>>1|0;k=e}return Xw(new Yw,k,a,h)}return e.a[f]}; -d.eg=function(a,b,c){var e=31&(b>>>c|0),f=1<>>c|0)),f=Gm(Bg(),this.vd&(-1+e|0));if(0!==(this.vd&e)){var g=this.Hb.a[f];a=g.xj(a,b,5+c|0);return g===a?this:null===a?(e^=this.vd,0!==e?(a=u(B(Ww),[-1+this.Hb.a.length|0]),zf(P(),this.Hb,0,a,0,f),zf(P(),this.Hb,1+f|0,a,f,-1+(this.Hb.a.length-f|0)|0),f=this.Hf-g.s()|0,1!==a.a.length||$u(a.a[0])?Xw(new Yw,e,a,f):a.a[0]):null):1!==this.Hb.a.length||$u(a)?(e=u(B(Ww),[this.Hb.a.length]),zf(P(),this.Hb,0,e,0,this.Hb.a.length),e.a[f]=a,f=this.Hf+(a.s()-g.s()|0)|0,Xw(new Yw, +this.vd,e,f)):a}return this}; +d.vi=function(a,b,c,e){if(a===this)return this;if(a&&a.$classData&&a.$classData.q.Xo)return a.vi(this,b,c,e);if($u(a)){var f=this.Hb,g=this.vd,h=0,k=a.Hb,l=a.vd,n=0;if(0===(g&l))return null;for(var p=e,t=0,q=0;0!==(g&l);){var x=g^g&(-1+g|0),D=l^l&(-1+l|0);if(x===D){var Y=f.a[h].vi(k.a[n],5+b|0,c,p);null!==Y&&(t=t+Y.s()|0,q|=x,c.a[p]=Y,p=1+p|0);g&=~x;h=1+h|0;l&=~D;n=1+n|0}else{var Y=-1+x|0,X=-1+D|0;YY!==0>X?(g&=~x,h=1+h|0):(l&=~D,n=1+n|0)}}if(0===q)return null;if(t===this.Hf)return this;if(t=== +a.Hf)return a;a=p-e|0;return 1!==a||$u(c.a[e])?(b=u(B(Ww),[a]),Na(c,e,b,0,a),Xw(new Yw,q,b,t)):c.a[e]}return null};function Xw(a,b,c,e){a.vd=b;a.Hb=c;a.Hf=e;jr(dc(),Gm(Bg(),b)===c.a.length);return a} +d.gj=function(a,b,c,e,f){for(var g=f,h=0,k=0,l=0;l>>1|0;k=e}return Xw(new Yw,k,a,h)}return e.a[f]}; +d.eg=function(a,b,c){var e=31&(b>>>c|0),f=1<a||a>=aB(this))throw(new gp).e(""+a);return $A(this,a)};d.l=function(a){return this.i(a|0)};d.qc=function(){return this}; d.h=function(){return 0===aB(this)};d.cb=function(){return this};d.A=function(a){return a&&a.$classData&&a.$classData.q.Zo?aB(this)===aB(a)&&(0===aB(this)||T(U(),this.Sa,a.Sa)&&T(U(),this.nb(),a.nb())):Cu(this,a)};d.w=function(){var a=this.h()?"empty ":"",b=this.sl?"to":"until",c=T(U(),this.Ha,1)?"":" by "+this.Ha;return a+"NumericRange "+this.Sa+" "+b+" "+this.gf+c};d.Ub=function(){return Xd()};d.K=function(a){for(var b=0,c=this.Sa;b>24&&0===(1&a.Wd)<<24>>24&&(a.wo=yp(Yf(),a.Sa,a.gf,a.Ha,a.sl,a.vc),a.Wd=(1|a.Wd)<<24>>24);return a.wo}d.ba=function(){return Q(new R,this,0,aB(this))};d.sf=function(){return this};d.m=function(){return aB(this)};d.Lc=function(){return aB(this)};d.ee=function(a){if(a===this.vc)var b=!0;else b=Yf().bl.Xc(this.vc),b.h()?b=!1:(b=b.v(),b=a===b);return b?0=a||0===aB(this)?a=this:a>=aB(this)?(a=this.gf,Yf(),a=(new bB).ij(a,a,this.Ha,this.vc)):a=this.cn($A(this,a),this.gf,this.Ha);return a};d.nb=function(){if(0===(2&this.Wd)<<24>>24&&0===(2&this.Wd)<<24>>24){if(0===aB(this))var a=I(),a=dz(a);else a=$A(this,-1+aB(this)|0);this.ko=a;this.Wd=(2|this.Wd)<<24>>24}return this.ko};d.Pn=function(a,b,c,e,f){this.Sa=a;this.gf=b;this.Ha=c;this.sl=e;this.vc=f;return this};d.sc=function(){return this}; d.Y=function(a){try{var b;var c;if(this.h())c=!1;else{var e=Xj(this.vc,this.Ha),f=this.vc.Wc(0);if(e.ab.le(e.Cg,f)&&Yj(Xj(this.vc,this.Sa),a)&&Yj(Xj(this.vc,a),this.nb()))c=!0;else{if(Wj(Xj(this.vc,this.Ha),this.vc.Wc(0)))var g=this.vc,h=this.nb(),k=Yj(Xj(g,h),a);else k=!1;c=k?Yj(Xj(this.vc,a),this.Sa):!1}}if(c){U();var l=this.vc,n,p=jp(this.vc,a);n=p.ab.Dg(p.Cg,this.Sa);var t,q=jp(l,n);t=q.ab.wj(q.no,this.Ha);b=T(0,t,this.vc.Wc(0))}else b=!1;return b}catch(x){if(qu(x))return!1;throw x;}};d.dc=function(){return this}; -d.de=function(a){if(a===this.vc)var b=!0;else b=Yf().bl.Xc(this.vc),b.h()?b=!1:(b=b.v(),b=a===b);return b?0>24&&0===(4&this.Wd)<<24>>24&&(this.Ln=mp(ll(),this),this.Wd=(4|this.Wd)<<24>>24);return this.Ln};function XA(){}XA.prototype=new Mz;XA.prototype.constructor=XA;function cB(){}d=cB.prototype=XA.prototype;d.Ga=function(){return this}; -d.Zf=function(a){return this.ql(ml(S(),a))};d.b=function(){return this};d.cb=function(){return this};d.Li=function(a,b,c,e,f){return dB(a,b,e,f)};d.qi=function(){return F()};d.kd=function(a){return eB(this,a)};d.K=function(){};function eB(a,b){return a.Li(b.N(),a.Zf(b.N()),0,b.ea(),b,null)}function WA(a,b,c){return a.Li(b,a.Zf(b),0,c,null,null)}d.ud=function(a){return this.Ci(a,this.Zf(a),0)};d.mi=function(){od();return Rg()};d.Ci=function(){return this};d.pi=function(){return null}; +d.de=function(a){if(a===this.vc)var b=!0;else b=Yf().bl.Xc(this.vc),b.h()?b=!1:(b=b.v(),b=a===b);return b?0>24&&0===(4&this.Wd)<<24>>24&&(this.Ln=mp(ll(),this),this.Wd=(4|this.Wd)<<24>>24);return this.Ln};function XA(){}XA.prototype=new Mz;XA.prototype.constructor=XA;function cB(){}d=cB.prototype=XA.prototype;d.Ga=function(){return this}; +d.Zf=function(a){return this.ql(ml(S(),a))};d.b=function(){return this};d.cb=function(){return this};d.Li=function(a,b,c,e,f){return dB(a,b,e,f)};d.qi=function(){return F()};d.kd=function(a){return eB(this,a)};d.K=function(){};function eB(a,b){return a.Li(b.N(),a.Zf(b.N()),0,b.ea(),b,null)}function WA(a,b,c){return a.Li(b,a.Zf(b),0,c,null,null)}d.td=function(a){return this.Ci(a,this.Zf(a),0)};d.mi=function(){od();return Rg()};d.Ci=function(){return this};d.pi=function(){return null}; d.Pc=function(a){od();var b=6+this.s()|0,b=u(B(vw),[224>b?b:224]);od();a=this.pi(a,!1,0,b,0);return null===a?Rg():a};d.kl=function(){od();return Rg()};d.s=function(){return 0};d.Ej=function(){return this};d.ba=function(){return ek().Gd};d.gm=function(){var a=this.t().N();return this.Ci(a,this.Zf(a),0)};d.ql=function(a){a=a+~(a<<9)|0;a^=a>>>14|0;a=a+(a<<4)|0;return a^(a>>>10|0)};d.Xc=function(a){return this.qi(a,this.Zf(a),0)};d.hi=function(){return!1};d.Y=function(a){return this.hi(a,this.Zf(a),0)}; -d.z=function(){return this.gm()};d.In=function(a){od();var b=6+this.s()|0,b=u(B(vw),[224>b?b:224]);od();a=this.pi(a,!0,0,b,0);return null===a?Rg():a};d.Xf=function(a){return eB(this,a)};var vw=y({Bj:0},!1,"scala.collection.immutable.HashMap",{Bj:1,Tf:1,Qe:1,Da:1,Ea:1,c:1,Aa:1,na:1,oa:1,ga:1,Q:1,P:1,ka:1,ma:1,ya:1,Ba:1,za:1,wa:1,ja:1,la:1,u:1,Te:1,ve:1,Re:1,Ue:1,Va:1,ra:1,Lb:1,Ef:1,ib:1,lb:1,kb:1,Ff:1,k:1,f:1,hb:1});XA.prototype.$classData=vw;function cA(){this.Hc=null;this.gb=0}cA.prototype=new nA; +d.z=function(){return this.gm()};d.In=function(a){od();var b=6+this.s()|0,b=u(B(vw),[224>b?b:224]);od();a=this.pi(a,!0,0,b,0);return null===a?Rg():a};d.Xf=function(a){return eB(this,a)};var vw=y({Bj:0},!1,"scala.collection.immutable.HashMap",{Bj:1,Tf:1,Qe:1,Da:1,Ea:1,c:1,Aa:1,na:1,oa:1,ga:1,Q:1,P:1,ka:1,ma:1,ya:1,Ba:1,za:1,wa:1,ja:1,la:1,u:1,Te:1,ue:1,Re:1,Ue:1,Va:1,ra:1,Lb:1,Ef:1,ib:1,lb:1,kb:1,Ff:1,k:1,f:1,hb:1});XA.prototype.$classData=vw;function cA(){this.Hc=null;this.gb=0}cA.prototype=new nA; cA.prototype.constructor=cA;d=cA.prototype;d.Lj=function(a,b,c){if(b===this.gb&&T(U(),a,this.Hc))return this;if(b!==this.gb)return Vw(ax(),this.gb,this,b,bA(new cA,a,b),c);c=ex();return fB(new gB,b,Pz(new Qz,c,this.Hc).Zh(a))};d.K=function(a){a.l(this.Hc)};function bA(a,b,c){a.Hc=b;a.gb=c;return a}d.s=function(){return 1};d.ba=function(){ek();var a=(new L).xa([this.Hc]);return Q(new R,a,0,a.o.length|0)};d.xj=function(a,b){return b===this.gb&&T(U(),a,this.Hc)?null:this}; d.vi=function(a,b){return a.eg(this.Hc,this.gb,b)?this:null};d.gj=function(a,b){return b!==!!a.l(this.Hc)?this:null};d.eg=function(a,b){return b===this.gb&&T(U(),a,this.Hc)};d.Gj=function(a,b){return a.eg(this.Hc,this.gb,b)};d.$classData=y({Vo:0},!1,"scala.collection.immutable.HashSet$HashSet1",{Vo:1,Xo:1,Uh:1,Bf:1,Da:1,Ea:1,c:1,Aa:1,na:1,oa:1,ga:1,Q:1,P:1,ka:1,ma:1,ya:1,Ba:1,za:1,wa:1,ja:1,la:1,u:1,Ve:1,ra:1,Se:1,mf:1,pf:1,nf:1,Lb:1,Gf:1,ib:1,lb:1,kb:1,hb:1,k:1,f:1}); -function gB(){this.gb=0;this.Ke=null}gB.prototype=new nA;gB.prototype.constructor=gB;d=gB.prototype;d.Lj=function(a,b,c){return b===this.gb?fB(new gB,b,this.Ke.Zh(a)):Vw(ax(),this.gb,this,b,bA(new cA,a,b),c)};d.K=function(a){var b=Rz(this.Ke);np(ai(b),a)};d.s=function(){return this.Ke.s()};d.ba=function(){var a=Rz(this.Ke);return ai(a)}; -d.xj=function(a,b){if(b===this.gb){a=this.Ke.nm(a);var c=a.s();switch(c){case 0:return null;case 1:return a=Rz(a),bA(new cA,ai(a).M(),b);default:return c===this.Ke.s()?this:fB(new gB,b,a)}}else return this};d.vi=function(a,b){for(var c=this.Ke,e=bg(new cg,ex()),c=Rz(c),c=ai(c);c.U();){var f=c.M();!1!==a.eg(f,this.gb,b)&&dg(e,f)}b=e.sa;e=b.s();return 0===e?null:e===this.Ke.s()?this:e===a.s()?a:1===e?(a=Rz(b),bA(new cA,ai(a).M(),this.gb)):fB(new gB,this.gb,b)}; -function fB(a,b,c){a.gb=b;a.Ke=c;return a}d.gj=function(a,b){a=b?Nv(this.Ke,a,!0):Nv(this.Ke,a,!1);b=a.s();switch(b){case 0:return null;case 1:return a=Rz(a),bA(new cA,ai(a).M(),this.gb);default:return b===this.Ke.s()?this:fB(new gB,this.gb,a)}};d.eg=function(a,b){return b===this.gb&&this.Ke.Y(a)};d.Gj=function(a,b){for(var c=Rz(this.Ke),c=ai(c),e=!0;e&&c.U();)e=c.M(),e=a.eg(e,this.gb,b);return e}; +function gB(){this.gb=0;this.Je=null}gB.prototype=new nA;gB.prototype.constructor=gB;d=gB.prototype;d.Lj=function(a,b,c){return b===this.gb?fB(new gB,b,this.Je.Zh(a)):Vw(ax(),this.gb,this,b,bA(new cA,a,b),c)};d.K=function(a){var b=Rz(this.Je);np(ai(b),a)};d.s=function(){return this.Je.s()};d.ba=function(){var a=Rz(this.Je);return ai(a)}; +d.xj=function(a,b){if(b===this.gb){a=this.Je.nm(a);var c=a.s();switch(c){case 0:return null;case 1:return a=Rz(a),bA(new cA,ai(a).M(),b);default:return c===this.Je.s()?this:fB(new gB,b,a)}}else return this};d.vi=function(a,b){for(var c=this.Je,e=bg(new cg,ex()),c=Rz(c),c=ai(c);c.U();){var f=c.M();!1!==a.eg(f,this.gb,b)&&dg(e,f)}b=e.sa;e=b.s();return 0===e?null:e===this.Je.s()?this:e===a.s()?a:1===e?(a=Rz(b),bA(new cA,ai(a).M(),this.gb)):fB(new gB,this.gb,b)}; +function fB(a,b,c){a.gb=b;a.Je=c;return a}d.gj=function(a,b){a=b?Nv(this.Je,a,!0):Nv(this.Je,a,!1);b=a.s();switch(b){case 0:return null;case 1:return a=Rz(a),bA(new cA,ai(a).M(),this.gb);default:return b===this.Je.s()?this:fB(new gB,this.gb,a)}};d.eg=function(a,b){return b===this.gb&&this.Je.Y(a)};d.Gj=function(a,b){for(var c=Rz(this.Je),c=ai(c),e=!0;e&&c.U();)e=c.M(),e=a.eg(e,this.gb,b);return e}; d.$classData=y({ou:0},!1,"scala.collection.immutable.HashSet$HashSetCollision1",{ou:1,Xo:1,Uh:1,Bf:1,Da:1,Ea:1,c:1,Aa:1,na:1,oa:1,ga:1,Q:1,P:1,ka:1,ma:1,ya:1,Ba:1,za:1,wa:1,ja:1,la:1,u:1,Ve:1,ra:1,Se:1,mf:1,pf:1,nf:1,Lb:1,Gf:1,ib:1,lb:1,kb:1,hb:1,k:1,f:1});function hB(){}hB.prototype=new pA;hB.prototype.constructor=hB;hB.prototype.b=function(){return this}; -hB.prototype.$classData=y({vu:0},!1,"scala.collection.immutable.ListMap$EmptyListMap$",{vu:1,uu:1,Tf:1,Qe:1,Da:1,Ea:1,c:1,Aa:1,na:1,oa:1,ga:1,Q:1,P:1,ka:1,ma:1,ya:1,Ba:1,za:1,wa:1,ja:1,la:1,u:1,Te:1,ve:1,Re:1,Ue:1,Va:1,ra:1,Lb:1,Ef:1,ib:1,lb:1,kb:1,Ff:1,k:1,f:1});var iB=void 0;function qA(){iB||(iB=(new hB).b());return iB}function uA(){this.pm=this.Kg=this.Hc=null}uA.prototype=new pA;uA.prototype.constructor=uA; -function jB(a,b){var c=I();for(;;){if(b.h())return dz(c);if(T(U(),a,b.Lh())){b=b.fh();for(a=c;!a.h();)c=a.t(),b=tA(new uA,b,c.Lh(),c.Mj()),a=a.z();return b}var e=b.fh(),c=og(new pg,b,c);b=e}}d=uA.prototype;d.l=function(a){a:{var b=this;for(;;){if(b.h())throw(new V).e("key not found: "+a);if(T(U(),a,b.Lh())){a=b.Mj();break a}b=b.fh()}}return a};d.Mj=function(){return this.Kg};d.h=function(){return!1};d.kd=function(a){return this.th(a)};d.ud=function(a){return jB(a,this)}; +hB.prototype.$classData=y({vu:0},!1,"scala.collection.immutable.ListMap$EmptyListMap$",{vu:1,uu:1,Tf:1,Qe:1,Da:1,Ea:1,c:1,Aa:1,na:1,oa:1,ga:1,Q:1,P:1,ka:1,ma:1,ya:1,Ba:1,za:1,wa:1,ja:1,la:1,u:1,Te:1,ue:1,Re:1,Ue:1,Va:1,ra:1,Lb:1,Ef:1,ib:1,lb:1,kb:1,Ff:1,k:1,f:1});var iB=void 0;function qA(){iB||(iB=(new hB).b());return iB}function uA(){this.pm=this.Kg=this.Hc=null}uA.prototype=new pA;uA.prototype.constructor=uA; +function jB(a,b){var c=I();for(;;){if(b.h())return dz(c);if(T(U(),a,b.Lh())){b=b.fh();for(a=c;!a.h();)c=a.t(),b=tA(new uA,b,c.Lh(),c.Mj()),a=a.z();return b}var e=b.fh(),c=og(new pg,b,c);b=e}}d=uA.prototype;d.l=function(a){a:{var b=this;for(;;){if(b.h())throw(new V).e("key not found: "+a);if(T(U(),a,b.Lh())){a=b.Mj();break a}b=b.fh()}}return a};d.Mj=function(){return this.Kg};d.h=function(){return!1};d.kd=function(a){return this.th(a)};d.td=function(a){return jB(a,this)}; d.s=function(){a:{var a=this,b=0;for(;;){if(a.h())break a;a=a.fh();b=1+b|0}}return b};d.Lh=function(){return this.Hc};d.th=function(a){var b=jB(a.N(),this);return tA(new uA,b,a.N(),a.ea())};d.lm=function(a,b){var c=jB(a,this);return tA(new uA,c,a,b)};d.Ik=function(a){return jB(a,this)};d.Xc=function(a){a:{var b=this;for(;;){if(b.h()){a=F();break a}if(T(U(),a,b.Lh())){a=(new J).g(b.Mj());break a}b=b.fh()}}return a};d.nb=function(){return(new K).j(this.Hc,this.Kg)}; function tA(a,b,c,e){a.Hc=c;a.Kg=e;if(null===b)throw Rj(Sj(),null);a.pm=b;return a}d.Y=function(a){a:{var b=this;for(;;){if(b.h()){a=!1;break a}if(T(U(),a,b.Lh())){a=!0;break a}b=b.fh()}}return a};d.fh=function(){return this.pm};d.Xf=function(a){return this.th(a)}; -d.$classData=y({wu:0},!1,"scala.collection.immutable.ListMap$Node",{wu:1,uu:1,Tf:1,Qe:1,Da:1,Ea:1,c:1,Aa:1,na:1,oa:1,ga:1,Q:1,P:1,ka:1,ma:1,ya:1,Ba:1,za:1,wa:1,ja:1,la:1,u:1,Te:1,ve:1,Re:1,Ue:1,Va:1,ra:1,Lb:1,Ef:1,ib:1,lb:1,kb:1,Ff:1,k:1,f:1});function bB(){YA.call(this);this.sj=null}bB.prototype=new ZA;bB.prototype.constructor=bB;bB.prototype.ij=function(a,b,c,e){this.sj=e;YA.prototype.Pn.call(this,a,b,c,!1,e);return this};bB.prototype.cn=function(a,b,c){Yf();return(new bB).ij(a,b,c,this.sj)}; +d.$classData=y({wu:0},!1,"scala.collection.immutable.ListMap$Node",{wu:1,uu:1,Tf:1,Qe:1,Da:1,Ea:1,c:1,Aa:1,na:1,oa:1,ga:1,Q:1,P:1,ka:1,ma:1,ya:1,Ba:1,za:1,wa:1,ja:1,la:1,u:1,Te:1,ue:1,Re:1,Ue:1,Va:1,ra:1,Lb:1,Ef:1,ib:1,lb:1,kb:1,Ff:1,k:1,f:1});function bB(){YA.call(this);this.sj=null}bB.prototype=new ZA;bB.prototype.constructor=bB;bB.prototype.ij=function(a,b,c,e){this.sj=e;YA.prototype.Pn.call(this,a,b,c,!1,e);return this};bB.prototype.cn=function(a,b,c){Yf();return(new bB).ij(a,b,c,this.sj)}; bB.prototype.$classData=y({Lu:0},!1,"scala.collection.immutable.NumericRange$Exclusive",{Lu:1,Zo:1,wc:1,Da:1,Ea:1,c:1,Aa:1,na:1,oa:1,ga:1,Q:1,P:1,ka:1,ma:1,ya:1,Ba:1,za:1,wa:1,ja:1,la:1,u:1,xc:1,Va:1,ra:1,jc:1,pb:1,qb:1,Cj:1,kg:1,ib:1,lb:1,kb:1,cd:1,Fb:1,k:1,f:1});function $f(){YA.call(this);this.sj=null}$f.prototype=new ZA;$f.prototype.constructor=$f;$f.prototype.ij=function(a,b,c,e){this.sj=e;YA.prototype.Pn.call(this,a,b,c,!0,e);return this}; -$f.prototype.cn=function(a,b,c){Yf();return(new $f).ij(a,b,c,this.sj)};$f.prototype.$classData=y({Mu:0},!1,"scala.collection.immutable.NumericRange$Inclusive",{Mu:1,Zo:1,wc:1,Da:1,Ea:1,c:1,Aa:1,na:1,oa:1,ga:1,Q:1,P:1,ka:1,ma:1,ya:1,Ba:1,za:1,wa:1,ja:1,la:1,u:1,xc:1,Va:1,ra:1,jc:1,pb:1,qb:1,Cj:1,kg:1,ib:1,lb:1,kb:1,cd:1,Fb:1,k:1,f:1});function Di(){this.Ha=this.gf=this.Sa=0;this.bc=!1;this.we=this.Sf=0}Di.prototype=new Az;Di.prototype.constructor=Di;function kB(){}d=kB.prototype=Di.prototype; +$f.prototype.cn=function(a,b,c){Yf();return(new $f).ij(a,b,c,this.sj)};$f.prototype.$classData=y({Mu:0},!1,"scala.collection.immutable.NumericRange$Inclusive",{Mu:1,Zo:1,wc:1,Da:1,Ea:1,c:1,Aa:1,na:1,oa:1,ga:1,Q:1,P:1,ka:1,ma:1,ya:1,Ba:1,za:1,wa:1,ja:1,la:1,u:1,xc:1,Va:1,ra:1,jc:1,pb:1,qb:1,Cj:1,kg:1,ib:1,lb:1,kb:1,cd:1,Fb:1,k:1,f:1});function Di(){this.Ha=this.gf=this.Sa=0;this.bc=!1;this.ve=this.Sf=0}Di.prototype=new Az;Di.prototype.constructor=Di;function kB(){}d=kB.prototype=Di.prototype; d.Ga=function(){return this};d.yg=function(){return!1};d.t=function(){return this.bc?I().ri():this.Sa};d.i=function(a){return this.Ri(a)};d.tf=function(){return this};d.l=function(a){return this.Ri(a|0)};d.h=function(){return this.bc};d.qc=function(){return this};d.cb=function(){return this};d.A=function(a){if(a&&a.$classData&&a.$classData.q.Ql){if(this.bc)return a.bc;if(!a.h()&&this.Sa===a.Sa){var b=lB(this);return b===lB(a)&&(this.Sa===b||this.Ha===a.Ha)}return!1}return Cu(this,a)}; d.Ri=function(a){0>this.Sf&&ne(oe(),this.Sa,this.gf,this.Ha,this.yg());if(0>a||a>=this.Sf)throw(new gp).e(""+a);return this.Sa+r(this.Ha,a)|0}; d.Ib=function(a,b,c){this.Sa=a;this.gf=b;this.Ha=c;this.bc=a>b&&0c||a===b&&!this.yg();if(0===c)throw(new tb).e("step cannot be 0.");if(this.bc)a=0;else{var e;e=mB(this);a=e.va;var f=e.Oa,g=this.Ha,h=g>>31;e=Sa();a=Nm(e,a,f,g,h);e=e.Db;g=this.yg()||!nB(this)?1:0;f=g>>31;g=a+g|0;e=(new Mf).r(g,(-2147483648^g)<(-2147483648^a)?1+(e+f|0)|0:e+f|0);a=e.va;e=e.Oa;a=(0===e?-1<(-2147483648^a):0>31,a=Ts(Sa(),a,e,c,f),b=0!==a?b-a|0:this.yg()?b:b-c|0}this.we=b;return this};d.Ub=function(){return Xd()};d.w=function(){var a=this.yg()?"to":"until",b=1===this.Ha?"":" by "+this.Ha;return(this.bc?"empty ":nB(this)?"":"inexact ")+"Range "+this.Sa+" "+a+" "+this.gf+b};d.K=function(a){if(!this.bc)for(var b=this.Sa;;){a.l(b);if(b===this.we)break;b=b+this.Ha|0}}; +mB(this),a=e.va,e=e.Oa,f=c>>31,a=Ts(Sa(),a,e,c,f),b=0!==a?b-a|0:this.yg()?b:b-c|0}this.ve=b;return this};d.Ub=function(){return Xd()};d.w=function(){var a=this.yg()?"to":"until",b=1===this.Ha?"":" by "+this.Ha;return(this.bc?"empty ":nB(this)?"":"inexact ")+"Range "+this.Sa+" "+a+" "+this.gf+b};d.K=function(a){if(!this.bc)for(var b=this.Sa;;){a.l(b);if(b===this.ve)break;b=b+this.Ha|0}}; d.rc=function(a,b){if(0>=a)a=oB(this,b);else if(b>=this.Sf&&0<=this.Sf)a=pB(this,a);else{var c=this.Sa+r(this.Ha,a)|0;a=a>=b?(new Di).Ib(c,c,this.Ha):(new qB).Ib(c,this.Sa+r(this.Ha,-1+b|0)|0,this.Ha)}return a};d.bn=function(a,b,c){return(new Di).Ib(a,b,c)};d.Rf=function(){return ii(this)};d.s=function(){return this.m()};d.lc=function(){return My(this)};d.ba=function(){return Q(new R,this,0,this.m())};d.m=function(){return 0>this.Sf?ne(oe(),this.Sa,this.gf,this.Ha,this.yg()):this.Sf};d.sf=function(){return this}; d.Lc=function(){return this.m()};function pB(a,b){return 0>=b||a.bc?a:b>=a.Sf&&0<=a.Sf?(b=a.gf,(new Di).Ib(b,b,a.Ha)):a.bn(a.Sa+r(a.Ha,b)|0,a.gf,a.Ha)}function yr(a,b){return(new K).j(oB(a,b),pB(a,b))}d.ee=function(a){return a===td()?0>31;a=Sa();c=Ts(a,c,b,e,f);b=a.Db;return 0===c&&0===b}d.nb=function(){return lB(this)}; -d.Dc=function(a){return pB(this,a)};d.z=function(){this.bc&&rB(I());return pB(this,1)};d.sc=function(){return this};d.dc=function(){return this};d.de=function(a){return a===td()?0=b||a.bc?(b=a.Sa,(new Di).Ib(b,b,a.Ha)):b>=a.Sf&&0<=a.Sf?a:(new qB).Ib(a.Sa,a.Sa+r(a.Ha,-1+b|0)|0,a.Ha)}function lB(a){return a.bc?(a=I(),dz(a)|0):a.we}d.yd=function(a){return Du(this,a|0)};d.L=function(){return mp(ll(),this)}; +d.Dc=function(a){return pB(this,a)};d.z=function(){this.bc&&rB(I());return pB(this,1)};d.sc=function(){return this};d.dc=function(){return this};d.de=function(a){return a===td()?0=b||a.bc?(b=a.Sa,(new Di).Ib(b,b,a.Ha)):b>=a.Sf&&0<=a.Sf?a:(new qB).Ib(a.Sa,a.Sa+r(a.Ha,-1+b|0)|0,a.Ha)}function lB(a){return a.bc?(a=I(),dz(a)|0):a.ve}d.xd=function(a){return Du(this,a|0)};d.L=function(){return mp(ll(),this)}; function mB(a){var b=a.gf,c=b>>31,e=a.Sa;a=e>>31;e=b-e|0;return(new Mf).r(e,(-2147483648^e)>(-2147483648^b)?-1+(c-a|0)|0:c-a|0)}d.$classData=y({Ql:0},!1,"scala.collection.immutable.Range",{Ql:1,wc:1,Da:1,Ea:1,c:1,Aa:1,na:1,oa:1,ga:1,Q:1,P:1,ka:1,ma:1,ya:1,Ba:1,za:1,wa:1,ja:1,la:1,u:1,xc:1,Va:1,ra:1,jc:1,pb:1,qb:1,Cj:1,kg:1,ib:1,lb:1,kb:1,cd:1,Fb:1,hb:1,k:1,f:1});function sB(){}sB.prototype=new Az;sB.prototype.constructor=sB;function tB(){}d=tB.prototype=sB.prototype;d.Ga=function(){return this}; function uB(a){for(var b=pp(),b=(new Ri).g(b),c=a;!c.h();){lk();var e=Xl(Wl(new Vl,O(function(a,b){return function(){return b.H}}(a,b))),c.t());e.z();b.H=e;c=c.z()}return b.H}d.i=function(a){return rg(this,a)};d.tf=function(){return this};d.Ra=function(a){return 0>a?1:qg(this,a)};d.l=function(a){return rg(this,a|0)};d.Rc=function(a){return $y(this,a)};d.Oc=function(a){return Zy(this,a)};d.qc=function(){return this};d.cb=function(){return this}; d.oc=function(a,b){if(bw(b.ld(this))){if(this.h())a=pp();else{b=(new Ri).g(this);for(var c=a.l(b.H.t()).Tb();!b.H.h()&&c.h();)b.H=b.H.z(),b.H.h()||(c=a.l(b.H.t()).Tb());a=b.H.h()?(lk(),pp()):vB(c,O(function(a,b,c){return function(){return c.H.z().oc(b,(lk(),(new Xs).b()))}}(this,a,b)))}return a}return Zg(this,a,b)};d.A=function(a){return this===a||Cu(this,a)};function Kp(a,b,c){for(;!a.h()&&!!b.l(a.t())===c;)a=a.z();return a.h()?pp():ky(lk(),a,b,c)}d.il=function(a){return wB(this,a)}; @@ -835,38 +835,38 @@ d.Of=function(a,b){var c=this;for(;;){if(c.h())return a;var e=c.z();a=Wi(b,a,c.t d.ke=function(){return xB(this,Rc(Uh(),I()),this)};d.ba=function(){return Uu(this)};d.ac=function(a){return cz(this,a)};d.ub=function(a,b){return bw(b.ld(this))?(this.h()?a=a.Tb():(b=this.t(),a=Yl(new Zl,b,O(function(a,b){return function(){return a.z().ub(b,(lk(),(new Xs).b()))}}(this,a)))),a):zr(this,a,b)};d.m=function(){for(var a=0,b=this;!b.h();)a=1+a|0,b=b.z();return a};d.Tc=function(a){var b=lk();return this.Kf(jy(b,0,1),a)};d.ad=function(){return this.Ic("","","")};d.sf=function(){return this}; d.Up=function(a){return yB(this,a)};d.Tb=function(){return this};d.nb=function(){return dz(this)};d.Dc=function(a){return wB(this,a)};function wB(a,b){for(;;){if(0>=b||a.h())return a;a=a.z();b=-1+b|0}}d.sc=function(){return this};d.Y=function(a){return ez(this,a)}; d.Vd=function(a,b,c,e){Jd(a,b);if(!this.h()){Kd(a,this.t());b=this;if(b.Jg()){var f=this.z();if(f.h())return Jd(a,e),a;if(b!==f&&(b=f,f.Jg()))for(f=f.z();b!==f&&f.Jg();)Kd(Jd(a,c),b.t()),b=b.z(),f=f.z(),f.Jg()&&(f=f.z());if(f.Jg()){for(var g=this,h=0;g!==f;)g=g.z(),f=f.z(),h=1+h|0;b===f&&0=b||a.h())return lk(),pp();if(1===b)return b=a.t(),Yl(new Zl,b,O(function(){return function(){lk();return pp()}}(a)));var c=a.t();return Yl(new Zl,c,O(function(a,b){return function(){return yB(a.z(),-1+b|0)}}(a,b)))}d.Jc=function(a){if(this.h())throw(new Jl).e("empty.reduceLeft");for(var b=this.t(),c=this.z();!c.h();)b=Wi(a,b,c.t()),c=c.z();return b}; function vB(a,b){if(a.h())return cm(b).Tb();var c=a.t();return Yl(new Zl,c,O(function(a,b){return function(){return vB(a.z(),b)}}(a,b)))}d.Mc=function(){return"Stream"};d.Kf=function(a,b){return bw(b.ld(this))?(this.h()||a.h()?a=pp():(b=(new K).j(this.t(),a.t()),a=Yl(new Zl,b,O(function(a,b){return function(){return a.z().Kf(b.z(),(lk(),(new Xs).b()))}}(this,a)))),a):fy(this,a,b)};function zB(a,b){if(b>=a.Rb)throw(new gp).e(""+b);return a.o.a[b]} function AB(a,b){var c=a.o.a.length,e=c>>31,f=b>>31;if(f===e?(-2147483648^b)>(-2147483648^c):f>e){f=c<<1;for(c=c>>>31|0|e<<1;;){var e=b>>31,g=f,h=c;if(e===h?(-2147483648^b)>(-2147483648^g):e>h)c=f>>>31|0|c<<1,f<<=1;else break}b=c;if(0===b?-1<(-2147483648^f):0>>c|0)),k=Gm(Bg(),this.Dd&(-1+h|0));if(0!==(this.Dd&h)){h=this.Ob.a[k];a=h.Li(a,b,5+c|0,e,f,g);if(a===h)return this;b=u(B(vw),[this.Ob.a.length]);zf(P(),this.Ob,0,b,0,this.Ob.a.length);b.a[k]=a;return ww(new xw,this.Dd,b,this.Rb+(a.s()-h.s()|0)|0)}c=u(B(vw),[1+this.Ob.a.length|0]);zf(P(),this.Ob,0,c,0,k);c.a[k]=dB(a,b,e,f);zf(P(),this.Ob,k,c,1+k|0,this.Ob.a.length-k|0);return ww(new xw,this.Dd|h,c,1+this.Rb|0)}; d.qi=function(a,b,c){var e=31&(b>>>c|0);if(-1===this.Dd)return this.Ob.a[e].qi(a,b,5+c|0);e=1<>>c|0)),f=Gm(Bg(),this.Dd&(-1+e|0));if(0!==(this.Dd&e)){var g=this.Ob.a[f];a=g.Ci(a,b,5+c|0);if(a===g)return this;if(0===a.s()){e^=this.Dd;if(0!==e)return a=u(B(vw),[-1+this.Ob.a.length|0]),zf(P(),this.Ob,0,a,0,f),zf(P(),this.Ob,1+f|0,a,f,-1+(this.Ob.a.length-f|0)|0),f=this.Rb-g.s()|0,1!==a.a.length||Zu(a.a[0])?ww(new xw,e,a,f):a.a[0];od();return Rg()}return 1!==this.Ob.a.length||Zu(a)?(e=u(B(vw),[this.Ob.a.length]),zf(P(),this.Ob,0,e,0,this.Ob.a.length),e.a[f]= a,f=this.Rb+(a.s()-g.s()|0)|0,ww(new xw,this.Dd,e,f)):a}return this};d.pi=function(a,b,c,e,f){for(var g=f,h=0,k=0,l=0;l>>1|0;k=e}return ww(new xw,k,a,h)}return e.a[f]}; d.ba=function(){var a=new Vv;Xu.prototype.On.call(a,this.Ob);return a};d.s=function(){return this.Rb};function ww(a,b,c,e){a.Dd=b;a.Ob=c;a.Rb=e;return a}d.hi=function(a,b,c){var e=31&(b>>>c|0);if(-1===this.Dd)return this.Ob.a[e].hi(a,b,5+c|0);e=1<a?1:qg(this,a)}; +d.$classData=y({Uo:0},!1,"scala.collection.immutable.HashMap$HashTrieMap",{Uo:1,Bj:1,Tf:1,Qe:1,Da:1,Ea:1,c:1,Aa:1,na:1,oa:1,ga:1,Q:1,P:1,ka:1,ma:1,ya:1,Ba:1,za:1,wa:1,ja:1,la:1,u:1,Te:1,ue:1,Re:1,Ue:1,Va:1,ra:1,Lb:1,Ef:1,ib:1,lb:1,kb:1,Ff:1,k:1,f:1,hb:1});function GB(){}GB.prototype=new Az;GB.prototype.constructor=GB;function HB(){}d=HB.prototype=GB.prototype;d.Ga=function(){return this};d.i=function(a){return rg(this,a)};d.tf=function(){return this};d.Ra=function(a){return 0>a?1:qg(this,a)}; d.Rc=function(a){return $y(this,a)};d.l=function(a){return rg(this,a|0)};d.Oc=function(a){return Zy(this,a)};d.cc=function(){return this};d.qc=function(){return this};d.cb=function(){return this}; d.oc=function(a,b){if(b===mg().p){if(this===I())return I();b=this;for(var c=Qi(!1),e=(new Ri).g(null),f=(new Ri).g(null);b!==I();)a.l(b.t()).Ga().K(G(function(a,b,c,e){return function(a){b.H?(a=og(new pg,a,I()),e.H.Jf=a,e.H=a):(c.H=og(new pg,a,I()),e.H=c.H,b.H=!0)}}(this,c,e,f))),b=b.z();return c.H?e.H:I()}return Zg(this,a,b)};d.il=function(a){return IB(this,a)}; function JB(a,b){if(a.h()||0>=b)return I();for(var c=og(new pg,a.t(),I()),e=c,f=a.z(),g=1;;){if(f.h())return a;if(ge)a.$a(rb(a.Wb()));else if(1024>e)a.Ka(rb(a.$())),a.$().a[31&(b>>>5|0)]=a.Wb(),a.$a(yb(a.$(),31&(c>>>5|0)));else if(32768>e)a.Ka(rb(a.$())),a.db(rb(a.pa())),a.$().a[31&(b>>>5|0)]=a.Wb(),a.pa().a[31&(b>>>10|0)]=a.$(),a.Ka(yb(a.pa(),31&(c>>>10|0))),a.$a(yb(a.$(),31&(c>>>5|0)));else if(1048576>e)a.Ka(rb(a.$())),a.db(rb(a.pa())),a.Xb(rb(a.Ia())),a.$().a[31&(b>>>5|0)]=a.Wb(),a.pa().a[31&(b>>>10|0)]=a.$(),a.Ia().a[31&(b>>>15|0)]=a.pa(),a.db(yb(a.Ia(),31&(c>>>15|0))),a.Ka(yb(a.pa(), -31&(c>>>10|0))),a.$a(yb(a.$(),31&(c>>>5|0)));else if(33554432>e)a.Ka(rb(a.$())),a.db(rb(a.pa())),a.Xb(rb(a.Ia())),a.xd(rb(a.vb())),a.$().a[31&(b>>>5|0)]=a.Wb(),a.pa().a[31&(b>>>10|0)]=a.$(),a.Ia().a[31&(b>>>15|0)]=a.pa(),a.vb().a[31&(b>>>20|0)]=a.Ia(),a.Xb(yb(a.vb(),31&(c>>>20|0))),a.db(yb(a.Ia(),31&(c>>>15|0))),a.Ka(yb(a.pa(),31&(c>>>10|0))),a.$a(yb(a.$(),31&(c>>>5|0)));else if(1073741824>e)a.Ka(rb(a.$())),a.db(rb(a.pa())),a.Xb(rb(a.Ia())),a.xd(rb(a.vb())),a.Vg(rb(a.Fd())),a.$().a[31&(b>>>5|0)]= -a.Wb(),a.pa().a[31&(b>>>10|0)]=a.$(),a.Ia().a[31&(b>>>15|0)]=a.pa(),a.vb().a[31&(b>>>20|0)]=a.Ia(),a.Fd().a[31&(b>>>25|0)]=a.vb(),a.xd(yb(a.Fd(),31&(c>>>25|0))),a.Xb(yb(a.vb(),31&(c>>>20|0))),a.db(yb(a.Ia(),31&(c>>>15|0))),a.Ka(yb(a.pa(),31&(c>>>10|0))),a.$a(yb(a.$(),31&(c>>>5|0)));else throw(new tb).b();else{b=-1+a.uc()|0;switch(b){case 5:a.Vg(rb(a.Fd()));a.xd(yb(a.Fd(),31&(c>>>25|0)));a.Xb(yb(a.vb(),31&(c>>>20|0)));a.db(yb(a.Ia(),31&(c>>>15|0)));a.Ka(yb(a.pa(),31&(c>>>10|0)));a.$a(yb(a.$(),31&(c>>> -5|0)));break;case 4:a.xd(rb(a.vb()));a.Xb(yb(a.vb(),31&(c>>>20|0)));a.db(yb(a.Ia(),31&(c>>>15|0)));a.Ka(yb(a.pa(),31&(c>>>10|0)));a.$a(yb(a.$(),31&(c>>>5|0)));break;case 3:a.Xb(rb(a.Ia()));a.db(yb(a.Ia(),31&(c>>>15|0)));a.Ka(yb(a.pa(),31&(c>>>10|0)));a.$a(yb(a.$(),31&(c>>>5|0)));break;case 2:a.db(rb(a.pa()));a.Ka(yb(a.pa(),31&(c>>>10|0)));a.$a(yb(a.$(),31&(c>>>5|0)));break;case 1:a.Ka(rb(a.$()));a.$a(yb(a.$(),31&(c>>>5|0)));break;case 0:a.$a(rb(a.Wb()));break;default:throw(new C).g(b);}a.Vb=!0}} +function QB(a,b,c,e){if(a.Vb)if(32>e)a.Za(rb(a.Wb()));else if(1024>e)a.Ka(rb(a.$())),a.$().a[31&(b>>>5|0)]=a.Wb(),a.Za(yb(a.$(),31&(c>>>5|0)));else if(32768>e)a.Ka(rb(a.$())),a.db(rb(a.pa())),a.$().a[31&(b>>>5|0)]=a.Wb(),a.pa().a[31&(b>>>10|0)]=a.$(),a.Ka(yb(a.pa(),31&(c>>>10|0))),a.Za(yb(a.$(),31&(c>>>5|0)));else if(1048576>e)a.Ka(rb(a.$())),a.db(rb(a.pa())),a.Xb(rb(a.Ia())),a.$().a[31&(b>>>5|0)]=a.Wb(),a.pa().a[31&(b>>>10|0)]=a.$(),a.Ia().a[31&(b>>>15|0)]=a.pa(),a.db(yb(a.Ia(),31&(c>>>15|0))),a.Ka(yb(a.pa(), +31&(c>>>10|0))),a.Za(yb(a.$(),31&(c>>>5|0)));else if(33554432>e)a.Ka(rb(a.$())),a.db(rb(a.pa())),a.Xb(rb(a.Ia())),a.wd(rb(a.vb())),a.$().a[31&(b>>>5|0)]=a.Wb(),a.pa().a[31&(b>>>10|0)]=a.$(),a.Ia().a[31&(b>>>15|0)]=a.pa(),a.vb().a[31&(b>>>20|0)]=a.Ia(),a.Xb(yb(a.vb(),31&(c>>>20|0))),a.db(yb(a.Ia(),31&(c>>>15|0))),a.Ka(yb(a.pa(),31&(c>>>10|0))),a.Za(yb(a.$(),31&(c>>>5|0)));else if(1073741824>e)a.Ka(rb(a.$())),a.db(rb(a.pa())),a.Xb(rb(a.Ia())),a.wd(rb(a.vb())),a.Vg(rb(a.Fd())),a.$().a[31&(b>>>5|0)]= +a.Wb(),a.pa().a[31&(b>>>10|0)]=a.$(),a.Ia().a[31&(b>>>15|0)]=a.pa(),a.vb().a[31&(b>>>20|0)]=a.Ia(),a.Fd().a[31&(b>>>25|0)]=a.vb(),a.wd(yb(a.Fd(),31&(c>>>25|0))),a.Xb(yb(a.vb(),31&(c>>>20|0))),a.db(yb(a.Ia(),31&(c>>>15|0))),a.Ka(yb(a.pa(),31&(c>>>10|0))),a.Za(yb(a.$(),31&(c>>>5|0)));else throw(new tb).b();else{b=-1+a.uc()|0;switch(b){case 5:a.Vg(rb(a.Fd()));a.wd(yb(a.Fd(),31&(c>>>25|0)));a.Xb(yb(a.vb(),31&(c>>>20|0)));a.db(yb(a.Ia(),31&(c>>>15|0)));a.Ka(yb(a.pa(),31&(c>>>10|0)));a.Za(yb(a.$(),31&(c>>> +5|0)));break;case 4:a.wd(rb(a.vb()));a.Xb(yb(a.vb(),31&(c>>>20|0)));a.db(yb(a.Ia(),31&(c>>>15|0)));a.Ka(yb(a.pa(),31&(c>>>10|0)));a.Za(yb(a.$(),31&(c>>>5|0)));break;case 3:a.Xb(rb(a.Ia()));a.db(yb(a.Ia(),31&(c>>>15|0)));a.Ka(yb(a.pa(),31&(c>>>10|0)));a.Za(yb(a.$(),31&(c>>>5|0)));break;case 2:a.db(rb(a.pa()));a.Ka(yb(a.pa(),31&(c>>>10|0)));a.Za(yb(a.$(),31&(c>>>5|0)));break;case 1:a.Ka(rb(a.$()));a.Za(yb(a.$(),31&(c>>>5|0)));break;case 0:a.Za(rb(a.Wb()));break;default:throw(new C).g(b);}a.Vb=!0}} d.t=function(){if(0===this.Ra(0))throw(new Jl).e("empty.head");return this.i(0)};d.i=function(a){var b=a+this.Sb|0;if(0<=a&&b=b)b=Zd().zh;else if(this.Sb<(this.Ec-b|0)){var c=this.Sb+b|0,e=-32&(-1+c|0),f=TB(this.Sb^(-1+c|0)),g=this.Sb&~(-1+(1<=c)VB(b.$b,c);else if(1024>=c)VB(b.$b,1+(31&(-1+c|0))|0),b.mc=WB(b.mc,c>>>5|0);else if(32768>=c)VB(b.$b,1+(31&(-1+c|0))|0),b.mc=WB(b.mc,1+(31&((-1+c|0)>>>5|0))|0),b.Nc=WB(b.Nc,c>>>10|0);else if(1048576>=c)VB(b.$b,1+(31&(-1+c|0))| @@ -876,9 +876,9 @@ function RB(a,b){if(a.Ec!==a.Sb){var c=-32&a.Ec,e=31&a.Ec;if(a.Ec!==c){var f=(ne g|0]=b;return h}f=a.pd;g=(new cw).Ib(a.Sb,1+a.Ec|0,c);zb(g,a,a.Zb);g.Vb=a.Vb;YB(g,f,c,f^c);g.$b.a[e]=b;return g}a=u(B(A),[32]);a.a[0]=b;b=(new cw).Ib(0,1,0);b.Zb=1;b.$b=a;return b}d.lc=function(){return My(this)}; function UB(a,b){a.Zb=b;b=-1+b|0;switch(b){case 0:a.mc=null;a.Nc=null;a.nd=null;a.Xd=null;a.ef=null;break;case 1:a.Nc=null;a.nd=null;a.Xd=null;a.ef=null;break;case 2:a.nd=null;a.Xd=null;a.ef=null;break;case 3:a.Xd=null;a.ef=null;break;case 4:a.ef=null;break;case 5:break;default:throw(new C).g(b);}}function ZB(a,b){var c=(Zd(),Yd().Eb);c===(Xd(),Yd().Eb)||c===Dc().p||c===H().p?a=$B(a,b):(c=c.ld(a.Kb()),c.da(b),c.eb(a.sc()),a=c.X());return a}d.ba=function(){return te(this)}; d.Ka=function(a){this.mc=a};function VB(a,b){for(;b=c||c<(this.m()>>>5|0))return b=(new Ri).g(this),a.K(G(function(a,b){return function(a){b.H=b.H.Pi(a,(Zd(),Yd().Eb))}}(this,b))),b.H;if(this.m()<(c>>>5|0)&&a&&a.$classData&&a.$classData.q.dp){b=a;for(a=dv(this);a.U();)c=a.M(),b=ZB(b,c);return b}return zr(this,a,b)}return zr(this,a.Ga(),b)};d.xd=function(a){this.Xd=a};d.sf=function(){return this}; +d.ub=function(a,b){if(b===(Xd(),Yd().Eb)||b===Dc().p||b===H().p){if(a.h())return this;a=a.He()?a.Ga():a.$e();var c=a.s();if(2>=c||c<(this.m()>>>5|0))return b=(new Ri).g(this),a.K(G(function(a,b){return function(a){b.H=b.H.Pi(a,(Zd(),Yd().Eb))}}(this,b))),b.H;if(this.m()<(c>>>5|0)&&a&&a.$classData&&a.$classData.q.dp){b=a;for(a=dv(this);a.U();)c=a.M(),b=ZB(b,c);return b}return zr(this,a,b)}return zr(this,a.Ga(),b)};d.wd=function(a){this.Xd=a};d.sf=function(){return this}; function YB(a,b,c,e){a.Vb?(xb(a,b),ub(a,b,c,e)):(ub(a,b,c,e),a.Vb=!0)}d.Lc=function(){return this.m()};d.$=function(){return this.mc};d.nb=function(){if(0===this.Ra(0))throw(new Jl).e("empty.last");return this.i(-1+this.m()|0)};d.Fd=function(){return this.ef};d.Dc=function(a){return XB(this,a)};d.sc=function(){return this};d.z=function(){if(0===this.Ra(0))throw(new Jl).e("empty.tail");return XB(this,1)};d.dc=function(){return this}; -function te(a){var b=(new dw).r(a.Sb,a.Ec);zb(b,a,a.Zb);a.Vb&&xb(b,a.pd);1a)return 1;if(1024>a)return 2;if(32768>a)return 3;if(1048576>a)return 4;if(33554432>a)return 5;if(1073741824>a)return 6;throw(new tb).b();}d.yd=function(a){return Du(this,a|0)};function aC(a,b){for(var c=0;ca)return 1;if(1024>a)return 2;if(32768>a)return 3;if(1048576>a)return 4;if(33554432>a)return 5;if(1073741824>a)return 6;throw(new tb).b();}d.xd=function(a){return Du(this,a|0)};function aC(a,b){for(var c=0;c=b))if(a.Sb<(a.Ec-b|0)){var c=a.Sb+b|0,e=-32&c,f=TB(c^(-1+a.Ec|0)),g=c&~(-1+(1<a)aC(b.$b,a);else if(1024>a)aC(b.$b,31&a),b.mc=bC(b.mc,a>>>5|0);else if(32768>a)aC(b.$b,31&a),b.mc=bC(b.mc,31&(a>>>5|0)),b.Nc=bC(b.Nc,a>>>10|0);else if(1048576>a)aC(b.$b,31&a),b.mc=bC(b.mc,31&(a>>>5|0)),b.Nc=bC(b.Nc,31&(a>>>10|0)),b.nd=bC(b.nd,a>>>15|0);else if(33554432>a)aC(b.$b,31&a), b.mc=bC(b.mc,31&(a>>>5|0)),b.Nc=bC(b.Nc,31&(a>>>10|0)),b.nd=bC(b.nd,31&(a>>>15|0)),b.Xd=bC(b.Xd,a>>>20|0);else if(1073741824>a)aC(b.$b,31&a),b.mc=bC(b.mc,31&(a>>>5|0)),b.Nc=bC(b.Nc,31&(a>>>10|0)),b.nd=bC(b.nd,31&(a>>>15|0)),b.Xd=bC(b.Xd,31&(a>>>20|0)),b.ef=bC(b.ef,a>>>25|0);else throw(new tb).b();a=b}else a=Zd().zh;return a} function $B(a,b){if(a.Ec!==a.Sb){var c=-32&(-1+a.Sb|0),e=31&(-1+a.Sb|0);if(a.Sb!==(32+c|0)){var f=(new cw).Ib(-1+a.Sb|0,a.Ec,c);zb(f,a,a.Zb);f.Vb=a.Vb;QB(f,a.pd,c,a.pd^c);f.$b.a[e]=b;return f}var g=(1<>>r(5,-1+a.Zb|0)|0;if(0!==f){if(1c)return f=(1<b?0:b;if(c<=b||b>=(a.he.length|0))return(new Md).e("");c=c>(a.he.length|0)?a.he.length|0:c;dc();return(new Md).e((null!==a?a.he:null).substring(b,c))}d.jd=function(){return pn(w(),this.he)};d.Jc=function(a){return Yy(this,a)};d.fa=function(){km||(km=(new hm).b());return km.fa()};d.Kf=function(a,b){return Nd(this,a,b)}; d.$classData=y({mv:0},!1,"scala.collection.immutable.WrappedString",{mv:1,wc:1,Da:1,Ea:1,c:1,Aa:1,na:1,oa:1,ga:1,Q:1,P:1,ka:1,ma:1,ya:1,Ba:1,za:1,wa:1,ja:1,la:1,u:1,xc:1,Va:1,ra:1,jc:1,pb:1,qb:1,Cj:1,kg:1,ib:1,lb:1,kb:1,cd:1,Fb:1,bp:1,pc:1,Il:1,jf:1});function pg(){this.Jf=this.dk=null}pg.prototype=new HB;pg.prototype.constructor=pg;d=pg.prototype;d.yb=function(){return"::"};d.t=function(){return this.dk};d.wb=function(){return 2};d.h=function(){return!1}; d.xb=function(a){switch(a){case 0:return this.dk;case 1:return this.Jf;default:throw(new gp).e(""+a);}};d.z=function(){return this.Jf};function og(a,b,c){a.dk=b;a.Jf=c;return a}d.Cb=function(){return Qt(this)};d.$classData=y({du:0},!1,"scala.collection.immutable.$colon$colon",{du:1,Yo:1,wc:1,Da:1,Ea:1,c:1,Aa:1,na:1,oa:1,ga:1,Q:1,P:1,ka:1,ma:1,ya:1,Ba:1,za:1,wa:1,ja:1,la:1,u:1,xc:1,Va:1,ra:1,jc:1,pb:1,qb:1,Pl:1,kg:1,ib:1,lb:1,kb:1,zj:1,Jl:1,ob:1,Kl:1,k:1,f:1});function dC(){}dC.prototype=new HB; @@ -895,64 +895,64 @@ d.$classData=y({Ju:0},!1,"scala.collection.immutable.Nil$",{Ju:1,Yo:1,wc:1,Da:1, d.ie=function(a,b){Np(this,a,b)};d.dc=function(){return xz(this)};d.rb=function(){};d.fa=function(){return this.mi()};d.eb=function(a){return fe(this,a)};function hC(){}hC.prototype=new wz;hC.prototype.constructor=hC;function iC(){}d=iC.prototype=hC.prototype;d.h=function(){return 0===this.s()};d.qc=function(){return this};d.A=function(a){return Lv(this,a)};d.w=function(){return Mv(this)};d.zk=function(a){var b=fv(this);return Th(b,a)};d.lc=function(){return hz(this)}; d.ie=function(a,b){Np(this,a,b)};d.dc=function(){return yz(this)};d.rb=function(){};d.L=function(){var a=ll();return nl(a,this,a.$l)};d.ia=function(a,b){return Qd(this,a,b)};d.eb=function(a){return fe(this,a)};d.fa=function(){return this.Ub().Wg()};d.Mc=function(){return"Set"};function jC(){}jC.prototype=new jA;jC.prototype.constructor=jC;function kC(){}kC.prototype=jC.prototype;jC.prototype.eb=function(a){return fe(this,a)};function lC(){}lC.prototype=new jA;lC.prototype.constructor=lC; function mC(){}d=mC.prototype=lC.prototype;d.Ga=function(){return this};d.t=function(){return Vd(this)};d.tf=function(){return this};d.Ra=function(a){return Py(this,a)};d.Rc=function(a){return Dr(this,a)};d.Oc=function(a){return Qy(this,a)};d.qc=function(){return this};d.h=function(){return Oy(this)};d.cb=function(){return this};d.Ub=function(){return Ew()};d.K=function(a){Ry(this,a)};d.Of=function(a,b){var c=this.m();return Wy(this,0,c,a,b)};d.Zc=function(a,b){return Sy(this,a,b)}; -d.rc=function(a,b){return Ty(this,a,b)};d.Rf=function(){return Pd(this)};d.lc=function(){return My(this)};d.Vh=function(){return this};d.ba=function(){return Q(new R,this,0,this.m())};d.ac=function(a){return Uy(this,a)};d.sf=function(){return this};d.Tc=function(a){return Vy(this,a)};d.Lc=function(){return this.m()};d.nb=function(){return fj(this)};d.Dc=function(a){var b=this.m();return Ty(this,a,b)};d.sc=function(){return this};d.z=function(){return Pg(this)};d.yd=function(a){return Du(this,a|0)}; +d.rc=function(a,b){return Ty(this,a,b)};d.Rf=function(){return Pd(this)};d.lc=function(){return My(this)};d.Vh=function(){return this};d.ba=function(){return Q(new R,this,0,this.m())};d.ac=function(a){return Uy(this,a)};d.sf=function(){return this};d.Tc=function(a){return Vy(this,a)};d.Lc=function(){return this.m()};d.nb=function(){return fj(this)};d.Dc=function(a){var b=this.m();return Ty(this,a,b)};d.sc=function(){return this};d.z=function(){return Pg(this)};d.xd=function(a){return Du(this,a|0)}; d.Vc=function(a,b,c){Xy(this,a,b,c)};d.jd=function(a){var b=a.bd();return yf(na(this.o))===b?this.o:Ml(this,a)};d.Jc=function(a){return Yy(this,a)};d.fa=function(){return(new sv).ae(this.dg())};d.Mc=function(){return"WrappedArray"};d.Kf=function(a,b){return Nd(this,a,b)};function py(){this.Bg=0;this.Si=null}py.prototype=new jA;py.prototype.constructor=py;d=py.prototype;d.Ga=function(){return this};d.t=function(){return Vd(this)};d.i=function(a){if(a>=this.Bg)throw(new gp).e(""+a);return this.Si.a[a]}; d.tf=function(){return this};d.Ra=function(a){return Py(this,a)};d.Rc=function(a){return Dr(this,a)};d.l=function(a){return this.i(a|0)};d.Oc=function(a){return Qy(this,a)};d.h=function(){return Oy(this)};d.qc=function(){return this};d.cb=function(){return this};d.Ub=function(){return eu()};d.K=function(a){for(var b=0;b=a.mg?(e=b.Pf,e=ml(S(),e),e=Sm(a,e),Wm(a,b,e)):(b.Ld=a.Na.a[e],a.Na.a[e]=b,a.fd=1+a.fd|0,Ym(a,e));return b.ca}d.Xc=function(a){a=Xm(this,a);return null===a?F():(new J).g(a.ca)};d.Y=function(a){return null!==Xm(this,a)};d.da=function(a){return oC(this,a)}; -d.Xf=function(a){var b=(new Qv).b(),b=fe(b,this);return oC(b,a)};d.$classData=y({Dp:0},!1,"scala.collection.mutable.HashMap",{Dp:1,ov:1,Qe:1,Da:1,Ea:1,c:1,Aa:1,na:1,oa:1,ga:1,Q:1,P:1,ka:1,ma:1,ya:1,Ba:1,za:1,wa:1,ja:1,la:1,u:1,Te:1,ve:1,Re:1,Ue:1,Va:1,ra:1,Lb:1,Xv:1,Rd:1,Td:1,Nd:1,Zv:1,Ac:1,zc:1,yc:1,Aj:1,Qd:1,Md:1,zd:1,Pv:1,Sv:1,hb:1,k:1,f:1});function qC(){Qv.call(this)}qC.prototype=new nC;qC.prototype.constructor=qC;qC.prototype.Qk=function(){return 0}; -function Ly(){var a=new qC;Qv.prototype.Qn.call(a,null);return a}qC.prototype.$classData=y({Ut:0},!1,"scala.collection.SeqLike$$anon$1",{Ut:1,Dp:1,ov:1,Qe:1,Da:1,Ea:1,c:1,Aa:1,na:1,oa:1,ga:1,Q:1,P:1,ka:1,ma:1,ya:1,Ba:1,za:1,wa:1,ja:1,la:1,u:1,Te:1,ve:1,Re:1,Ue:1,Va:1,ra:1,Lb:1,Xv:1,Rd:1,Td:1,Nd:1,Zv:1,Ac:1,zc:1,yc:1,Aj:1,Qd:1,Md:1,zd:1,Pv:1,Sv:1,hb:1,k:1,f:1});function Hx(){this.qg=0;this.Na=null;this.mg=this.fd=0;this.rd=null;this.kh=0}Hx.prototype=new iC;Hx.prototype.constructor=Hx;d=Hx.prototype; +d.Xf=function(a){var b=(new Qv).b(),b=fe(b,this);return oC(b,a)};d.$classData=y({Dp:0},!1,"scala.collection.mutable.HashMap",{Dp:1,ov:1,Qe:1,Da:1,Ea:1,c:1,Aa:1,na:1,oa:1,ga:1,Q:1,P:1,ka:1,ma:1,ya:1,Ba:1,za:1,wa:1,ja:1,la:1,u:1,Te:1,ue:1,Re:1,Ue:1,Va:1,ra:1,Lb:1,Xv:1,Rd:1,Td:1,Nd:1,Zv:1,Ac:1,zc:1,yc:1,Aj:1,Qd:1,Md:1,yd:1,Pv:1,Sv:1,hb:1,k:1,f:1});function qC(){Qv.call(this)}qC.prototype=new nC;qC.prototype.constructor=qC;qC.prototype.Qk=function(){return 0}; +function Ly(){var a=new qC;Qv.prototype.Qn.call(a,null);return a}qC.prototype.$classData=y({Ut:0},!1,"scala.collection.SeqLike$$anon$1",{Ut:1,Dp:1,ov:1,Qe:1,Da:1,Ea:1,c:1,Aa:1,na:1,oa:1,ga:1,Q:1,P:1,ka:1,ma:1,ya:1,Ba:1,za:1,wa:1,ja:1,la:1,u:1,Te:1,ue:1,Re:1,Ue:1,Va:1,ra:1,Lb:1,Xv:1,Rd:1,Td:1,Nd:1,Zv:1,Ac:1,zc:1,yc:1,Aj:1,Qd:1,Md:1,yd:1,Pv:1,Sv:1,hb:1,k:1,f:1});function Hx(){this.qg=0;this.Na=null;this.mg=this.fd=0;this.rd=null;this.kh=0}Hx.prototype=new iC;Hx.prototype.constructor=Hx;d=Hx.prototype; d.Ga=function(){return this};d.b=function(){Hx.prototype.fr.call(this,null);return this};d.l=function(a){a=Ab(a);for(var b=Ca(a),b=Jm(this,b),c=this.Na.a[b];null!==c&&!T(U(),c,a);)b=(1+b|0)%this.Na.a.length|0,c=this.Na.a[b];return null!==c};d.cb=function(){return this};d.Yb=function(a){return rC(this,a)};d.Ub=function(){Ix||(Ix=(new Gx).b());return Ix};d.K=function(a){for(var b=0,c=this.Na.a.length;ba||a>=this.Qf)throw(new gp).e(""+a);return rg(this.Za,a)};d.tf=function(){return this};d.Ra=function(a){return 0>a?1:qg(this.Za,a)};d.Rc=function(a){return $y(this.Za,a)};d.l=function(a){return this.i(a|0)};d.Fc=function(){return be(this.Za)}; -d.Oc=function(a){return Zy(this.Za,a)};d.cc=function(){this.dj=!this.h();return this.Za};d.h=function(){return 0===this.Qf};d.cb=function(){return this};d.A=function(a){return a&&a.$classData&&a.$classData.q.Ep?this.Za.A(a.Za):Cu(this,a)};d.Jb=function(a){return he(this.Za,"",a,"")};d.Ic=function(a,b,c){return he(this.Za,a,b,c)};d.Yb=function(a){return qv(this,a)};d.Ub=function(){sy||(sy=(new ry).b());return sy};d.K=function(a){for(var b=this.Za;!b.h();)a.l(b.t()),b=b.z()}; -d.Of=function(a,b){return az(this.Za,a,b)};d.Zc=function(a,b){return bz(this.Za,a,b)};d.Zd=function(){return Tf(this.Za)};d.Jk=function(a){return qv(this,a)};d.s=function(){return this.Qf};d.lc=function(){var a=this.Za,b=Gt().p;return xt(a,b)};d.X=function(){return this.cc()};d.ba=function(){var a=new rv;a.Zi=this.h()?I():this.Za;return a};d.ie=function(a,b){Np(this,a,b)};d.ac=function(a){return cz(this.Za,a)};d.ad=function(){return he(this.Za,"","","")};d.m=function(){return this.Qf};d.sf=function(){return this}; -d.ee=function(a){return Il(this.Za,a)};d.Tb=function(){return this.Za.Tb()};d.nb=function(){if(null===this.hg)throw(new V).e("last of empty ListBuffer");return this.hg.dk};d.Y=function(a){return ez(this.Za,a)};d.Vd=function(a,b,c,e){return Kl(this.Za,a,b,c,e)};function qv(a,b){a.dj&&KB(a);if(a.h())a.hg=og(new pg,b,I()),a.Za=a.hg;else{var c=a.hg;a.hg=og(new pg,b,I());c.Jf=a.hg}a.Qf=1+a.Qf|0;return a}d.dc=function(){return this.Za};d.de=function(a){return Ll(this.Za,a)}; -d.yd=function(a){return fz(this.Za,a|0)};d.Bc=function(){var a=this.Za,b=Uh(),b=Vh(b);return xt(a,b)};d.Cd=function(a,b){return az(this.Za,a,b)};d.da=function(a){return qv(this,a)};d.Hd=function(a){return Bu(this.Za,a,0)};d.rb=function(){};d.Vc=function(a,b,c){ey(this.Za,a,b,c)};d.hd=function(){for(var a=this.Za,b=Fc(new Gc,Hc());!a.h();){var c=a.t();Ic(b,c);a=a.z()}return b.sa};d.jd=function(a){return Ml(this.Za,a)};d.uo=function(){return 0=b)){c.ie(b,e);for(var f=0,e=e.ba();fa||a>=this.Qf)throw(new gp).e(""+a);return rg(this.Ya,a)};d.tf=function(){return this};d.Ra=function(a){return 0>a?1:qg(this.Ya,a)};d.Rc=function(a){return $y(this.Ya,a)};d.l=function(a){return this.i(a|0)};d.Fc=function(){return be(this.Ya)}; +d.Oc=function(a){return Zy(this.Ya,a)};d.cc=function(){this.dj=!this.h();return this.Ya};d.h=function(){return 0===this.Qf};d.cb=function(){return this};d.A=function(a){return a&&a.$classData&&a.$classData.q.Ep?this.Ya.A(a.Ya):Cu(this,a)};d.Jb=function(a){return he(this.Ya,"",a,"")};d.Ic=function(a,b,c){return he(this.Ya,a,b,c)};d.Yb=function(a){return qv(this,a)};d.Ub=function(){sy||(sy=(new ry).b());return sy};d.K=function(a){for(var b=this.Ya;!b.h();)a.l(b.t()),b=b.z()}; +d.Of=function(a,b){return az(this.Ya,a,b)};d.Zc=function(a,b){return bz(this.Ya,a,b)};d.Zd=function(){return Tf(this.Ya)};d.Jk=function(a){return qv(this,a)};d.s=function(){return this.Qf};d.lc=function(){var a=this.Ya,b=Gt().p;return xt(a,b)};d.X=function(){return this.cc()};d.ba=function(){var a=new rv;a.Zi=this.h()?I():this.Ya;return a};d.ie=function(a,b){Np(this,a,b)};d.ac=function(a){return cz(this.Ya,a)};d.ad=function(){return he(this.Ya,"","","")};d.m=function(){return this.Qf};d.sf=function(){return this}; +d.ee=function(a){return Il(this.Ya,a)};d.Tb=function(){return this.Ya.Tb()};d.nb=function(){if(null===this.hg)throw(new V).e("last of empty ListBuffer");return this.hg.dk};d.Y=function(a){return ez(this.Ya,a)};d.Vd=function(a,b,c,e){return Kl(this.Ya,a,b,c,e)};function qv(a,b){a.dj&&KB(a);if(a.h())a.hg=og(new pg,b,I()),a.Ya=a.hg;else{var c=a.hg;a.hg=og(new pg,b,I());c.Jf=a.hg}a.Qf=1+a.Qf|0;return a}d.dc=function(){return this.Ya};d.de=function(a){return Ll(this.Ya,a)}; +d.xd=function(a){return fz(this.Ya,a|0)};d.Bc=function(){var a=this.Ya,b=Uh(),b=Vh(b);return xt(a,b)};d.Cd=function(a,b){return az(this.Ya,a,b)};d.da=function(a){return qv(this,a)};d.Hd=function(a){return Bu(this.Ya,a,0)};d.rb=function(){};d.Vc=function(a,b,c){ey(this.Ya,a,b,c)};d.hd=function(){for(var a=this.Ya,b=Fc(new Gc,Hc());!a.h();){var c=a.t();Ic(b,c);a=a.z()}return b.sa};d.jd=function(a){return Ml(this.Ya,a)};d.uo=function(){return 0=b)){c.ie(b,e);for(var f=0,e=e.ba();fthis.Rb&&1<=a&&(a=u(B(A),[a]),Na(this.o,0,a,0,this.Rb),this.o=a)};d.Vc=function(a,b,c){var e=wl(xl(),a)-b|0;c=cthis.Rb&&1<=a&&(a=u(B(A),[a]),Na(this.o,0,a,0,this.Rb),this.o=a)};d.Vc=function(a,b,c){var e=wl(xl(),a)-b|0;c=c { el.addEventListener('click', function(event) { @@ -139,6 +141,10 @@ const GF_panel = { }); }); } + console.timeEnd('diagramSVG'); + if (!isPrimaryPairDiagrem) { + this.nudge(id); + } }, clickedThread(event, colorId) { const selectedClass = event.currentTarget.textContent.replace(" ", ""); diff --git a/docs/panel-test.html b/docs/panel-test.html index 16923cb70..78b7ffbc1 100644 --- a/docs/panel-test.html +++ b/docs/panel-test.html @@ -19,7 +19,7 @@ GF_panel.load({caption: "primary pair", id: "panel", controls: ['diagram', "resize"]}); GF_panel.diagramSVG({id: 'panel', query: q, type: 'pair'}); GF_panel.load({caption: "thread step 1", id: "panel2", controls: ['diagram', "resize", "color"]}); - GF_panel.diagramSVG({id: 'panel2', query: q, type: 'pair', steps: ["tc,cross=ctc","tc",""]}); + GF_panel.diagramSVG({id: 'panel2', query: q, type: 'pair', steps: ["tc,cross=ctt","ttc","ctt"]}); // document.getElementById('panel').outerHTML = ''; // GF_stitches.load() From f418ecb5ea64581ba8a2361504a3ac7729ccd115 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Thu, 11 Dec 2025 18:47:29 +0100 Subject: [PATCH 002/221] blooper on panel-test.html --- docs/js/nudgePairs.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/js/nudgePairs.js b/docs/js/nudgePairs.js index 656df97fe..fea403eba 100644 --- a/docs/js/nudgePairs.js +++ b/docs/js/nudgePairs.js @@ -25,7 +25,10 @@ function nudgePairs(containerId) { * https://devdocs.io/d3~4/d3-force * https://devdocs.io/d3~4/d3-selection */ -function nudgeDiagram(svg) { +function nudgeDiagram(svg, forceOptions={ + forceManyBody: { strength: -1000 }, + link: { strength: 50, distance: 11.5, iterations: 30 } +}) { console.time("nudgeDiagram"); // collect data of the SVG elements with class node @@ -108,12 +111,12 @@ function nudgeDiagram(svg) { } // define forces with the collected data d3.forceSimulation(nodeData) - .force("charge", d3.forceManyBody().strength(-1000)) + .force("charge", d3.forceManyBody().strength(forceOptions.forceManyBody.strength)) .force("link", d3 .forceLink(linkData) - .strength(50) - .distance(11.5) - .iterations(30)) + .strength(forceOptions.forceManyBody.strength) + .distance(forceOptions.forceManyBody.distance) + .iterations(forceOptions.forceManyBody.iterations)) .force("center", d3.forceCenter(100, 100)) .alpha(0.0035) .on("tick", onTick) From d93436af80bae6051c17c58f58089a6bf54ac3dd Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 12 Dec 2025 12:03:08 +0100 Subject: [PATCH 003/221] bloeper fixed, styled diagrams --- docs/js/nudgePairs.js | 14 ++++++++------ docs/js/panel.js | 12 ++++++++---- docs/panel-test.html | 2 +- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/docs/js/nudgePairs.js b/docs/js/nudgePairs.js index fea403eba..a5e2f5132 100644 --- a/docs/js/nudgePairs.js +++ b/docs/js/nudgePairs.js @@ -21,13 +21,15 @@ function nudgePairs(containerId) { * - class link * - an id attribute containing the IDs of their nodes separated with '-' * - an attribute d defining a path with or without a midpoint + * @param forceOptions options for the force simulation * See also * https://devdocs.io/d3~4/d3-force * https://devdocs.io/d3~4/d3-selection */ -function nudgeDiagram(svg, forceOptions={ +function nudgeDiagram(svg, forceOptions= { forceManyBody: { strength: -1000 }, - link: { strength: 50, distance: 11.5, iterations: 30 } + link: { strength: 50, distance: 18, iterations: 30 }, + alpha: 0.0035 }) { console.time("nudgeDiagram"); // collect data of the SVG elements with class node @@ -114,11 +116,11 @@ function nudgeDiagram(svg, forceOptions={ .force("charge", d3.forceManyBody().strength(forceOptions.forceManyBody.strength)) .force("link", d3 .forceLink(linkData) - .strength(forceOptions.forceManyBody.strength) - .distance(forceOptions.forceManyBody.distance) - .iterations(forceOptions.forceManyBody.iterations)) + .strength(forceOptions.link.strength) + .distance(forceOptions.link.distance) + .iterations(forceOptions.link.iterations)) .force("center", d3.forceCenter(100, 100)) - .alpha(0.0035) + .alpha(forceOptions.alpha) .on("tick", onTick) .on("end", function() { moveToNW(); diff --git a/docs/js/panel.js b/docs/js/panel.js index 9756cdc83..6f9a9a1f6 100644 --- a/docs/js/panel.js +++ b/docs/js/panel.js @@ -97,7 +97,7 @@ const GF_panel = { }, diagramSVG(namedArgs) { console.time('diagramSVG'); - const { id, type='pair', steps: steps = [], query, size = this.svgSize } = namedArgs; + const { id, type='pair', steps: steps = [], query, size = this.svgSize[2] } = namedArgs; const {width, height} = { ...this.svgSize[steps.length < this.svgSize.length ? steps.length : this.svgSize.length], ...(typeof size === 'object' && size !== null ? size : {}) @@ -119,16 +119,20 @@ const GF_panel = { } const nodeTransparency = 0.05 const markers = true // use false for slow devices and IE-11, set them at onEnd + const isPairDiagram = namedArgs.type === 'pair'; let svg; - if (namedArgs.type === 'pair') { - svg = DiagramSvg.render(pairDiagram, "1px", markers, width, height, nodeTransparency) + if (isPairDiagram) { + svg = DiagramSvg.render(pairDiagram, "1.7px", markers, width, height, nodeTransparency) } else { - svg = DiagramSvg.render(threadDiagram, "2px", markers, width, height, nodeTransparency); + svg = DiagramSvg.render(threadDiagram, "4px", markers, width, height, nodeTransparency); } // TODO extract method of the part above? if (!id) return svg; const container = document.getElementById(id); container.innerHTML = svg; + const svgElement = container.querySelectorAll("svg>g")[0]; + svgElement.setAttribute("transform", isPairDiagram ? "scale(1.3)" : "scale(0.5)"); + if (type==='thread' && container.classList.contains("hasColorChooser")) { document.querySelectorAll(`#${id} .node`).forEach(el => { el.addEventListener('click', function(event) { diff --git a/docs/panel-test.html b/docs/panel-test.html index 78b7ffbc1..3b17436f7 100644 --- a/docs/panel-test.html +++ b/docs/panel-test.html @@ -19,7 +19,7 @@ GF_panel.load({caption: "primary pair", id: "panel", controls: ['diagram', "resize"]}); GF_panel.diagramSVG({id: 'panel', query: q, type: 'pair'}); GF_panel.load({caption: "thread step 1", id: "panel2", controls: ['diagram', "resize", "color"]}); - GF_panel.diagramSVG({id: 'panel2', query: q, type: 'pair', steps: ["tc,cross=ctt","ttc","ctt"]}); + GF_panel.diagramSVG({id: 'panel2', query: q, type: 'thread', steps: ["tc,cross=ctc"]}); // document.getElementById('panel').outerHTML = ''; // GF_stitches.load() From 3f53b93a45522c056846a5a85faf2d6c6d361dff Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 12 Dec 2025 13:51:37 +0100 Subject: [PATCH 004/221] viewport for mobile devices --- docs/panel-test.html | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/panel-test.html b/docs/panel-test.html index 3b17436f7..851643ca0 100644 --- a/docs/panel-test.html +++ b/docs/panel-test.html @@ -1,5 +1,6 @@ + From 53bfcafe5371a843ab91c918a3ba1b184119e3a3 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 12 Dec 2025 19:42:52 +0100 Subject: [PATCH 005/221] single diagram, radios select type --- docs/panel-test.html | 45 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/docs/panel-test.html b/docs/panel-test.html index 851643ca0..aa4f43c74 100644 --- a/docs/panel-test.html +++ b/docs/panel-test.html @@ -16,13 +16,46 @@ \ No newline at end of file From 79c3ad18918bc59f1603e42b6056a4a5ce288ad0 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Sat, 13 Dec 2025 09:28:16 +0100 Subject: [PATCH 006/221] fix first API demo --- docs/API/panels.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/API/panels.md b/docs/API/panels.md index 03ed28c76..53a17eb45 100644 --- a/docs/API/panels.md +++ b/docs/API/panels.md @@ -44,7 +44,7 @@ Widget demo's ### 1 ### 2 From bae7f30e98b064be47db3a36fb6666b484192a46 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Sun, 14 Dec 2025 13:20:13 +0100 Subject: [PATCH 007/221] two force configurations, pair+thread panel --- docs/API/panels.md | 17 ++++++++++------- docs/js/nudgePairs.js | 30 +++++++++++++----------------- docs/js/panel.js | 31 ++++++++++++++++--------------- docs/panel-test.html | 42 ++++++++++++++++-------------------------- 4 files changed, 55 insertions(+), 65 deletions(-) diff --git a/docs/API/panels.md b/docs/API/panels.md index 53a17eb45..9895f5f05 100644 --- a/docs/API/panels.md +++ b/docs/API/panels.md @@ -43,14 +43,14 @@ Widget demo's ### 1 ### 2 ### 3 @@ -94,11 +94,12 @@ Genrerates the panel structure: Options: - `caption`: mandatory string, plain text or HTML string generated at the start of the `figcaption`. - `id`: mandatory string, id for the generated `div`. +- `wnadHref`: typlicaly `javascript:...` to generate the diagram. + Creates the controls + ![wand](/GroundForge/images/wand.png) and + ![resume](/GroundForge/images/play.png) the latter calls nudge with diagramType 'thread' if control `color` is specified. - `controls`: optional array of strings, default empty, specifies buttons to generate in the `figcaption`: - `cleanup`: ![](/GroundForge/images/broom.png) removes overridden stitch definitions in a textarea. - - `diagram`: - - ![](/GroundForge/images/wand.png) the href should be set by the page creating the panel. - - ![](/GroundForge/images/play.png) starts/continues nudging stitch positions - `color`: color chooser, looks and dialog may vary per browser. Its value is used to highlight threads or stitches in thread diagrams. - `resize`: ![](/GroundForge/images/maximize.png) ![](/GroundForge/images/reset-dimensions.png) ![](/GroundForge/images/minimize.png) For a `div` with CSS style `overflow: auto; resize: both;`. @@ -126,10 +127,12 @@ The pages of GroundForge use the query parameters to pass a pattern back and forth between _pattern_, _stitches_ and _droste_. The query keys were numbered with 2nd and 3rd pair diagram in mind. -### `GF_panel.nudge(id)` +### `GF_panel.nudge(id, diagramType)` Nudges the stitch positions in the panel with the given id. +Default for `diagramType` is _pair_. + Called by default for all diagrams except for a primary pair diagram (`type` _pair_, no `steps`), also called by ![](/GroundForge/images/play.png). A page may call this function explicitly for its primary pair diagram as well. \ No newline at end of file diff --git a/docs/js/nudgePairs.js b/docs/js/nudgePairs.js index a5e2f5132..9f60858c8 100644 --- a/docs/js/nudgePairs.js +++ b/docs/js/nudgePairs.js @@ -21,17 +21,13 @@ function nudgePairs(containerId) { * - class link * - an id attribute containing the IDs of their nodes separated with '-' * - an attribute d defining a path with or without a midpoint - * @param forceOptions options for the force simulation + * @param diagramType 'pair' or 'thread' (default: 'thread') * See also * https://devdocs.io/d3~4/d3-force * https://devdocs.io/d3~4/d3-selection */ -function nudgeDiagram(svg, forceOptions= { - forceManyBody: { strength: -1000 }, - link: { strength: 50, distance: 18, iterations: 30 }, - alpha: 0.0035 -}) { - console.time("nudgeDiagram"); +function nudgeDiagram(svg, diagramType='thread') { + // collect data of the SVG elements with class node function getNodeData(n){ @@ -110,20 +106,20 @@ function nudgeDiagram(svg, forceOptions= { } links.attr("d", drawPath); nodes.attr("transform", moveNode); + // console.log(new Date().getMilliseconds()) } + // define forces with the collected data - d3.forceSimulation(nodeData) - .force("charge", d3.forceManyBody().strength(forceOptions.forceManyBody.strength)) + const forceDistance = diagramType === 'thread' ? 11.5 : 18; + d3.forceSimulation(nodeData) + .force("charge", d3.forceManyBody().strength(-1000)) .force("link", d3 .forceLink(linkData) - .strength(forceOptions.link.strength) - .distance(forceOptions.link.distance) - .iterations(forceOptions.link.iterations)) + .strength(50) + .distance(forceDistance) + .iterations(30)) .force("center", d3.forceCenter(100, 100)) - .alpha(forceOptions.alpha) + .alpha(0.0035) .on("tick", onTick) - .on("end", function() { - moveToNW(); - console.timeEnd("nudgeDiagram"); // End timer after simulation - }); + .on("end", moveToNW) } diff --git a/docs/js/panel.js b/docs/js/panel.js index 6f9a9a1f6..cda60c1f3 100644 --- a/docs/js/panel.js +++ b/docs/js/panel.js @@ -6,8 +6,8 @@ const GF_panel = { ], panelSize: {width: '300px', height: '300px'}, // default panel size - load(config) { - const { caption, id, controls = [], size = this.panelSize } = config; + load(config, parent) { + const { caption, id, wandHref, controls = [], size = this.panelSize } = config; const isArray = Array.isArray(controls); const sizeStr = JSON.stringify(size) .replace(/\n/g, "") @@ -16,16 +16,16 @@ const GF_panel = { const cleanup = isArray && controls.includes('cleanup') ? ` broom ` : ''; - const diagram = isArray && controls.includes('diagram') ? ` - wand - resume - download - ` : ''; - const colorChooser = isArray && controls.includes('color') ? ` + const hasColorChooser = isArray && controls.includes('color'); + const colorChooser = hasColorChooser ? ` ` : ''; - const hasColorChooser = isArray && controls.includes('color') - ? "class='hasColorChooser'" : ''; + const type = hasColorChooser ? "thread" : "pair"; + const diagram = wandHref ? ` + wand + resume + download + ` : ''; const resize = isArray && controls.includes('resize') ? ` maximize default @@ -41,9 +41,9 @@ const GF_panel = { ${colorChooser.trim()} ${resize.trim()} -
+
`.trim(); - document.currentScript.parentNode.append(figure); + parent.append(figure); this.resetDimensions(id, size); }, downloadSVG(containerId, filename = "diagram.svg") { @@ -80,8 +80,9 @@ const GF_panel = { } return false; }, - nudge(containerId) { - nudgeDiagram(d3.select('#' + containerId).select("svg")); + nudge(containerId, type = 'thread') { + console.log(`nudge called for container ${containerId} and diagram type ${type}`); + nudgeDiagram(d3.select('#' + containerId).select("svg"), type); }, resetDimensions(containerId, size = this.panelSize) { const el = document.getElementById(containerId); @@ -147,7 +148,7 @@ const GF_panel = { } console.timeEnd('diagramSVG'); if (!isPrimaryPairDiagrem) { - this.nudge(id); + this.nudge(id, type); } }, clickedThread(event, colorId) { diff --git a/docs/panel-test.html b/docs/panel-test.html index aa4f43c74..231a2ec39 100644 --- a/docs/panel-test.html +++ b/docs/panel-test.html @@ -8,7 +8,7 @@ Panel Test + + + + + \ No newline at end of file diff --git a/docs/panel-test.html b/docs/panel-test.html index 231a2ec39..24bda6182 100644 --- a/docs/panel-test.html +++ b/docs/panel-test.html @@ -5,7 +5,6 @@ - Panel Test +

Droste mixer? Under development.

+

TODO: Tabs with stitch/snow-galleries. Snow: no radios, first pair diagram, second thread diagram.

\ No newline at end of file From eb9930fe207563b455c9a3a17e7e780b2fc81cea Mon Sep 17 00:00:00 2001 From: jo-pol Date: Sun, 14 Dec 2025 20:11:06 +0100 Subject: [PATCH 012/221] cleanup --- docs/panel-test.html | 59 -------------------------------------------- 1 file changed, 59 deletions(-) delete mode 100644 docs/panel-test.html diff --git a/docs/panel-test.html b/docs/panel-test.html deleted file mode 100644 index 24bda6182..000000000 --- a/docs/panel-test.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - Panel Test - - - -

Droste mixer? Under development.

-

TODO: Tabs with stitch/snow-galleries. Snow: no radios, first pair diagram, second thread diagram.

- - - \ No newline at end of file From 4056663e0d00303bae201dc31d0ce39eef9934b8 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Mon, 15 Dec 2025 18:06:25 +0100 Subject: [PATCH 013/221] stitch input + rename --- docs/{mixer => drostemixer}/droste-mixer.js | 10 +++---- docs/drostemixer/index.md | 33 +++++++++++++++++++++ docs/{mixer => drostemixer}/test.html | 6 +++- docs/mixer/index.md | 15 ---------- 4 files changed, 43 insertions(+), 21 deletions(-) rename docs/{mixer => drostemixer}/droste-mixer.js (91%) create mode 100644 docs/drostemixer/index.md rename docs/{mixer => drostemixer}/test.html (75%) delete mode 100644 docs/mixer/index.md diff --git a/docs/mixer/droste-mixer.js b/docs/drostemixer/droste-mixer.js similarity index 91% rename from docs/mixer/droste-mixer.js rename to docs/drostemixer/droste-mixer.js index 94a25228d..c89653492 100644 --- a/docs/mixer/droste-mixer.js +++ b/docs/drostemixer/droste-mixer.js @@ -20,17 +20,17 @@ const GF_droste_mixer = { `; }, - load() { + load(container) { q = "patchWidth=3&patchHeight=5&c1=tc&d1=tctc&e1=tc&c2=tctc&e2=tctc&d3=tc&shiftColsSE=2&shiftRowsSE=2&shiftColsSW=-2&shiftRowsSW=2&footside=-5,B-,-2,b-,,&tile=831,4-7,-5-&headside=5-,-c,6-,-c" - GF_panel.load({caption: "options", id: "options", controls: ["resize"]}, document.body); - document.getElementById('options').innerHTML = `
+ GF_panel.load({caption: "pair diagram", id: "pair_panel", wandHref: "javascript:GF_droste_mixer.generateSelectedDiagram('pair')", controls: ["resize"]}, container); + GF_panel.load({caption: "thread diagram", id: "thread_panel", wandHref: "javascript:GF_droste_mixer.generateSelectedDiagram('thread')", controls: ["resize", "color"]}, container); + GF_panel.load({caption: "options", id: "options", controls: ["resize"]}, container); + document.getElementById('options').innerHTML = `
${this.drosteControls(1)}${this.drosteControls(2)}${this.drosteControls(3)} `; - GF_panel.load({caption: "pair diagram", id: "pair_panel", wandHref: "javascript:GF_droste_mixer.generateSelectedDiagram('pair')", controls: ["resize"]}, document.body); - GF_panel.load({caption: "thread diagram", id: "thread_panel", wandHref: "javascript:GF_droste_mixer.generateSelectedDiagram('thread')", controls: ["resize", "color"]}, document.body); document.querySelectorAll('input[name="droste"]').forEach(radio => { radio.addEventListener('change', function() { document.getElementById('pair_panel').style.backgroundColor = "rgb(238, 238, 238)"; diff --git a/docs/drostemixer/index.md b/docs/drostemixer/index.md new file mode 100644 index 000000000..98251d2d3 --- /dev/null +++ b/docs/drostemixer/index.md @@ -0,0 +1,33 @@ +--- +layout: default +title: GF - Droste mixer +javascript: + - d3.v4.min.js + - GroundForge-opt.js + - nudgePairs.js + - panel.js \2\.5\.0\<\/dans\-java\-utils\.version\>\n +--- + +Droste mixer? Under development. +================================ + +**TODO**: +* Galleries that can initialize the following two text fields +* Dressing-up +* Assigning stitches + +See [recipe sections](/GroundForge-help/snow-mix/droste/) for the droste input field for now. +If the droste field is not empty, a reloaded thread diagram will be one step further than the pair diagram checked in the options panel. + +--- + + + + + + + +--- + + + \ No newline at end of file diff --git a/docs/mixer/test.html b/docs/drostemixer/test.html similarity index 75% rename from docs/mixer/test.html rename to docs/drostemixer/test.html index 9de5fd26a..8c021482c 100644 --- a/docs/mixer/test.html +++ b/docs/drostemixer/test.html @@ -15,6 +15,10 @@ - +

+ + +

+ \ No newline at end of file diff --git a/docs/mixer/index.md b/docs/mixer/index.md deleted file mode 100644 index e058dcad8..000000000 --- a/docs/mixer/index.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -layout: default -title: GF - Droste mixer -javascript: - - d3.v4.min.js - - GroundForge-opt.js - - nudgePairs.js - - panel.js ---- - -

Droste mixer? Under development.

-

TODO: Tabs with stitch/snow-galleries. Snow: no radios, first pair diagram, second thread diagram.

- - - \ No newline at end of file From f802eab416ce3349c4fc21d65450420216160412 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Mon, 15 Dec 2025 18:17:10 +0100 Subject: [PATCH 014/221] typo --- docs/drostemixer/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/drostemixer/index.md b/docs/drostemixer/index.md index 98251d2d3..b915aa89a 100644 --- a/docs/drostemixer/index.md +++ b/docs/drostemixer/index.md @@ -5,7 +5,7 @@ javascript: - d3.v4.min.js - GroundForge-opt.js - nudgePairs.js - - panel.js \2\.5\.0\<\/dans\-java\-utils\.version\>\n + - panel.js --- Droste mixer? Under development. From 01c69e2684159d08f88943f9ade89c48ed3a53c9 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Mon, 15 Dec 2025 18:24:22 +0100 Subject: [PATCH 015/221] styling --- docs/drostemixer/index.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/drostemixer/index.md b/docs/drostemixer/index.md index b915aa89a..5860876e4 100644 --- a/docs/drostemixer/index.md +++ b/docs/drostemixer/index.md @@ -29,5 +29,11 @@ If the droste field is not empty, a reloaded thread diagram will be one step fur --- + \ No newline at end of file From 4da45a723d27d0066451882875a3988db74e22ea Mon Sep 17 00:00:00 2001 From: jo-pol Date: Mon, 15 Dec 2025 18:31:42 +0100 Subject: [PATCH 016/221] styling --- docs/drostemixer/index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/drostemixer/index.md b/docs/drostemixer/index.md index 5860876e4..1e44c42ef 100644 --- a/docs/drostemixer/index.md +++ b/docs/drostemixer/index.md @@ -25,7 +25,7 @@ If the droste field is not empty, a reloaded thread diagram will be one step fur - + --- @@ -34,6 +34,7 @@ If the droste field is not empty, a reloaded thread diagram will be one step fur .gf_panel > div {width: 100%; overflow: auto; resize:both; border: #ddd solid 1px; } .gf_panel > figcaption {width: 100%; box-sizing: border-box; background-color: #ddd; } .gf_panel > figcaption img, .gf_panel > figcaption > input {margin-left: 0.5em;} + #drosteStitches {width: 100%} \ No newline at end of file From 578b36433c17b283ef701333db78f7f3a2a00b55 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Mon, 15 Dec 2025 18:38:05 +0100 Subject: [PATCH 017/221] horizontal line --- docs/drostemixer/index.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/drostemixer/index.md b/docs/drostemixer/index.md index 1e44c42ef..7404b8d62 100644 --- a/docs/drostemixer/index.md +++ b/docs/drostemixer/index.md @@ -16,19 +16,17 @@ Droste mixer? Under development. * Dressing-up * Assigning stitches +--- + See [recipe sections](/GroundForge-help/snow-mix/droste/) for the droste input field for now. If the droste field is not empty, a reloaded thread diagram will be one step further than the pair diagram checked in the options panel. ---- - ---- -

+ + - + + +

From 475c268b98a4002c53ffc7138754e4da862c5099 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Wed, 17 Dec 2025 17:21:58 +0100 Subject: [PATCH 019/221] assiging stitches and recipes --- docs/drostemixer/droste-mixer.js | 94 ++++++++++++++++++++++++-------- docs/drostemixer/index.md | 13 +++-- docs/drostemixer/test.html | 7 ++- 3 files changed, 81 insertions(+), 33 deletions(-) diff --git a/docs/drostemixer/droste-mixer.js b/docs/drostemixer/droste-mixer.js index 330e9f994..c26393a03 100644 --- a/docs/drostemixer/droste-mixer.js +++ b/docs/drostemixer/droste-mixer.js @@ -1,34 +1,65 @@ const GF_droste_mixer = { generateSelectedDiagram(diagramType) { - const checkedDroste = document.querySelector('input[name="droste"]:checked'); - const drosteIndex = parseInt(checkedDroste.value, 10); - const stepValues = []; + const checkedStep = document.querySelector(`input[name="${diagramType}Step"]:checked`); + const drosteIndex = parseInt(checkedStep.value, 10); + const steps = []; for (let i = 1; i <= drosteIndex; i++) { - const textarea = document.getElementById('droste' + i); - txt = textarea && textarea.value.trim() ? textarea.value.trim() : "ct"; - stepValues.push(txt); + const textarea = document.getElementById(`droste${i}`); + txt = textarea && textarea.value.trim() ? textarea.value.trim() : "ctc"; + steps.push(txt); } - console.log(stepValues); - GF_panel.diagramSVG({id: diagramType+ '_panel', query: q, type: diagramType, steps: stepValues}); + const q = document.getElementById('droste0').value; + GF_panel.diagramSVG({id: diagramType+ '_panel', query: q, type: diagramType, steps: steps}); document.getElementById(diagramType+ '_panel').style.backgroundColor = ""; }, setStitchEvents() { function stitchHandler(event) { - const targetText = event.currentTarget.textContent; - const targetClass = '.'+targetText.replaceAll(/ /g, ''); - document.getElementById('pair_panel') - .querySelectorAll('title') - .forEach(title => { - if (title.parentNode.textContent === targetText) { + const newStitchValue = document.getElementById('basicStitchInput').value; + const newDrosteStitches = document.getElementById('drosteStitches').value.split(/[,.]/); + if(newStitchValue === '') return; + + const selectedText = event.currentTarget.textContent; + let selectedStitchId = selectedText.replace(/.* /,""); + + const pairPanel = document.getElementById('pair_panel'); + for (let title of pairPanel.getElementsByTagName('title')) { + if (title.innerHTML === selectedText) { title.parentNode.insertAdjacentHTML( 'beforeend', '' ); } - }); - document.getElementById('thread_panel').querySelectorAll(targetClass).forEach(el => { - el.append('') - }) + } + const threadPanel = document.getElementById('thread_panel'); + for (let path of threadPanel.getElementsByTagName('path')) { + if (path.textContent.includes(' - '+selectedStitchId)) { + path.style.opacity = 0.5; + } + } + const checkedDroste = document.querySelector('input[name="pairStep"]:checked'); + const drosteIndex = parseInt(checkedDroste.value, 10); + const drosteInput = document.getElementById('droste'+ drosteIndex); + if (drosteIndex===0){ + for(let kv of drosteInput.value.split(/&/)){ + let [key, value] = kv.split('='); + if(key === selectedStitchId){ + drosteInput.value = drosteInput.value.replace(kv, `${selectedStitchId}=${newStitchValue}`); + break; + } + } + } else { + drosteInput.value += `\n${selectedStitchId}=${newStitchValue}`; + } + if (newDrosteStitches.length !== newStitchValue.length) { + // TODO beep + return; + } + let extraSteps = '' + for (let i = 0; i < newDrosteStitches.length; i++) { + extraSteps += `\n${selectedStitchId}${i}=${newDrosteStitches[i]}`; + } + const elementId = 'droste'+ (drosteIndex + 1); + document.getElementById(elementId).value += extraSteps; } Array.from(document @@ -39,27 +70,42 @@ const GF_droste_mixer = { title.parentNode.addEventListener('click', stitchHandler) }); }, + stepRadiosControls(stepNr){ + return ` + + + `; + }, drosteControls(stepNr){ return ` -
- - +
${this.stepRadiosControls(stepNr)} +
`; }, load(container) { - q = "patchWidth=3&patchHeight=7&c1=tc&d1=tctc&e1=tc&c2=tctc&e2=tctc&d3=tc&shiftColsSE=2&shiftRowsSE=2&shiftColsSW=-2&shiftRowsSW=2&footside=-5,B-,-2,b-,,&tile=831,4-7,-5-&headside=5-,-c,6-,-c" + let q = new URL(document.documentURI).search.slice(1); + if (q === "" || !q.includes('shiftRows')) + q = "patchWidth=3&patchHeight=7&c1=tc&d1=tctc&e1=tc&c2=tctc&e2=tctc&d3=tc&shiftColsSE=2&shiftRowsSE=2&shiftColsSW=-2&shiftRowsSW=2&footside=-5,B-,-2,b-,,&tile=831,4-7,-5-&headside=5-,-c,6-,-c&droste2=ctct,twist=ct" const pairWandHref = "javascript:GF_droste_mixer.generateSelectedDiagram('pair');GF_droste_mixer.setStitchEvents()"; const threadWandHref = "javascript:GF_droste_mixer.generateSelectedDiagram('thread')"; GF_panel.load({caption: "pair diagram", id: "pair_panel", wandHref: pairWandHref, controls: ["resize"]}, container); GF_panel.load({caption: "thread diagram", id: "thread_panel", wandHref: threadWandHref, controls: ["resize", "color"]}, container); GF_panel.load({caption: "options", id: "options", controls: ["resize"]}, container); document.getElementById('options').innerHTML = ` -
- +
${this.stepRadiosControls(0)}
${this.drosteControls(1)}${this.drosteControls(2)}${this.drosteControls(3)} `; + for(let kv of q.split(/&/)){ + let eq = kv.indexOf('='); + let key = eq === -1 ? kv : kv.slice(0, eq); + let value = eq === -1 ? '' : kv.slice(eq + 1); + if(key.startsWith('droste')) { + const elementId = 'droste'+((key.slice(6)*1)-1); + document.getElementById(elementId).value = value; + } + } document.querySelectorAll('input[name="droste"]').forEach(radio => { radio.addEventListener('change', function() { document.getElementById('pair_panel').style.backgroundColor = "rgb(238, 238, 238)"; diff --git a/docs/drostemixer/index.md b/docs/drostemixer/index.md index 2d4746328..cb0bd115f 100644 --- a/docs/drostemixer/index.md +++ b/docs/drostemixer/index.md @@ -12,15 +12,16 @@ Droste mixer? Under development. ================================ **TODO**: -* Galleries that can initialize the following two text fields -* Dressing-up -* Assigning stitches +* Galleries: [basic stitches](/API/stitch-gallery) and recipes for snow with + [two droste steps](/GroundForge-help/snow-mix/droste/), maybe even + some [patterns](https://jo-pol.github.io/GroundForge-help/snow-mix/droste/#more-freedom). +* Flip buttons, apply to all (ignored only for step-0?). +* Radios -> twisters in diagram captions +* Rename rest of _options_ to _advanced_, maybe even initialy minimized (values collected from URL and pair diagram interactions) +* Legend panel (should wrap nicely) --- -See [recipe sections](/GroundForge-help/snow-mix/droste/) for the droste input field for now. -If the droste field is not empty, a reloaded thread diagram will be one step further than the pair diagram checked in the options panel. - diff --git a/docs/drostemixer/test.html b/docs/drostemixer/test.html index f0959af33..3e30a59e7 100644 --- a/docs/drostemixer/test.html +++ b/docs/drostemixer/test.html @@ -10,8 +10,9 @@ @@ -19,10 +20,10 @@

- + - +

From f94db4d7b058eb93aec76b863d9415240ee23c1f Mon Sep 17 00:00:00 2001 From: jo-pol Date: Wed, 17 Dec 2025 19:08:02 +0100 Subject: [PATCH 020/221] neutral title, styling, initial values --- docs/drostemixer/index.md | 19 +++++++++++-------- docs/index.md | 2 +- docs/mix4snow/index.md | 2 +- docs/tiles.md | 2 +- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/docs/drostemixer/index.md b/docs/drostemixer/index.md index cb0bd115f..eeea85327 100644 --- a/docs/drostemixer/index.md +++ b/docs/drostemixer/index.md @@ -1,6 +1,6 @@ --- layout: default -title: GF - Droste mixer +title: Droste mixer javascript: - d3.v4.min.js - GroundForge-opt.js @@ -8,31 +8,34 @@ javascript: - panel.js --- -Droste mixer? Under development. -================================ +Under development. +================== -**TODO**: +TO DO: * Galleries: [basic stitches](/API/stitch-gallery) and recipes for snow with [two droste steps](/GroundForge-help/snow-mix/droste/), maybe even some [patterns](https://jo-pol.github.io/GroundForge-help/snow-mix/droste/#more-freedom). * Flip buttons, apply to all (ignored only for step-0?). * Radios -> twisters in diagram captions -* Rename rest of _options_ to _advanced_, maybe even initialy minimized (values collected from URL and pair diagram interactions) +* Rename rest of _options_ to _advanced_, maybe initially minimized (values collected from URL and pair diagram interactions) * Legend panel (should wrap nicely) +* Link to changed pattern --- - + - + diff --git a/docs/index.md b/docs/index.md index 5eca67619..b3cb08a7c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,6 +1,6 @@ --- layout: default -title: GF - Home +title: Home --- {% include fallback.html %} diff --git a/docs/mix4snow/index.md b/docs/mix4snow/index.md index 883876bf6..fbd1d2609 100644 --- a/docs/mix4snow/index.md +++ b/docs/mix4snow/index.md @@ -1,6 +1,6 @@ --- layout: default -title: GF - Mix Snowflakes +title: Mix Snowflakes sidebar: mix4snow javascript: - d3.v4.min.js diff --git a/docs/tiles.md b/docs/tiles.md index 869e48158..4c91281ee 100644 --- a/docs/tiles.md +++ b/docs/tiles.md @@ -1,6 +1,6 @@ --- layout: default -title: GF - obsolete +title: Obsolete --- In April 2023, the tiles page was split and in December 2024 the content reduced to the following links: From 14480de7785de4b0f5b22d4d331f1c3d61a99cc9 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Wed, 17 Dec 2025 19:11:57 +0100 Subject: [PATCH 021/221] styling --- docs/drostemixer/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/drostemixer/index.md b/docs/drostemixer/index.md index eeea85327..741e85e21 100644 --- a/docs/drostemixer/index.md +++ b/docs/drostemixer/index.md @@ -35,7 +35,7 @@ TO DO: .gf_panel > figcaption {width: 100%; height:2.5em; padding-bottom: 0.2em; box-sizing: border-box; display: flex; align-items: flex-end; background-color: #ddd; } .gf_panel > figcaption img, .gf_panel > figcaption > input {margin-left: 0.5em;} .gf_panel > div > div > textarea { height: 7em;} - .gf_panel > div > div > radio { padding-right: 0.5em;} + .gf_panel > div > div > input[type="radio"] { padding-right: 0.5em;} #drosteStitches {width: 100%} From f0281dab1e7119f84eef1c5217aeec632a3e73d2 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Wed, 17 Dec 2025 19:19:23 +0100 Subject: [PATCH 022/221] styling --- docs/drostemixer/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/drostemixer/index.md b/docs/drostemixer/index.md index 741e85e21..ee1257548 100644 --- a/docs/drostemixer/index.md +++ b/docs/drostemixer/index.md @@ -35,7 +35,7 @@ TO DO: .gf_panel > figcaption {width: 100%; height:2.5em; padding-bottom: 0.2em; box-sizing: border-box; display: flex; align-items: flex-end; background-color: #ddd; } .gf_panel > figcaption img, .gf_panel > figcaption > input {margin-left: 0.5em;} .gf_panel > div > div > textarea { height: 7em;} - .gf_panel > div > div > input[type="radio"] { padding-right: 0.5em;} + .gf_panel > div > div > input[type="radio"] { margin-right: 0.5em;} #drosteStitches {width: 100%} From c262d63a291082c4211aa07f98c3d44e611b6450 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Wed, 17 Dec 2025 19:26:19 +0100 Subject: [PATCH 023/221] styling --- docs/drostemixer/droste-mixer.js | 2 +- docs/drostemixer/index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/drostemixer/droste-mixer.js b/docs/drostemixer/droste-mixer.js index c26393a03..9c57d3ea3 100644 --- a/docs/drostemixer/droste-mixer.js +++ b/docs/drostemixer/droste-mixer.js @@ -79,7 +79,7 @@ const GF_droste_mixer = { drosteControls(stepNr){ return `
${this.stepRadiosControls(stepNr)} - +
`; }, diff --git a/docs/drostemixer/index.md b/docs/drostemixer/index.md index ee1257548..64a61b8db 100644 --- a/docs/drostemixer/index.md +++ b/docs/drostemixer/index.md @@ -34,7 +34,7 @@ TO DO: .gf_panel > div {width: 100%; overflow: auto; resize:both; border: #ddd solid 1px; } .gf_panel > figcaption {width: 100%; height:2.5em; padding-bottom: 0.2em; box-sizing: border-box; display: flex; align-items: flex-end; background-color: #ddd; } .gf_panel > figcaption img, .gf_panel > figcaption > input {margin-left: 0.5em;} - .gf_panel > div > div > textarea { height: 7em;} + .gf_panel > div > div > textarea { height: 5.5em;} .gf_panel > div > div > input[type="radio"] { margin-right: 0.5em;} #drosteStitches {width: 100%} From 7739185fa752fbde3cf18a4def385109d2e2ff39 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Wed, 17 Dec 2025 22:02:07 +0100 Subject: [PATCH 024/221] reduced working title --- docs/drostemixer/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/drostemixer/index.md b/docs/drostemixer/index.md index 64a61b8db..1a7d37d32 100644 --- a/docs/drostemixer/index.md +++ b/docs/drostemixer/index.md @@ -1,6 +1,6 @@ --- layout: default -title: Droste mixer +title: wip javascript: - d3.v4.min.js - GroundForge-opt.js @@ -8,8 +8,8 @@ javascript: - panel.js --- -Under development. -================== +Work in progress +================ TO DO: * Galleries: [basic stitches](/API/stitch-gallery) and recipes for snow with From f775e694e2b4e7548015723d293feca15933891a Mon Sep 17 00:00:00 2001 From: jo-pol Date: Wed, 17 Dec 2025 23:09:07 +0100 Subject: [PATCH 025/221] steps in query --- docs/drostemixer/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/drostemixer/index.md b/docs/drostemixer/index.md index 1a7d37d32..89528f40d 100644 --- a/docs/drostemixer/index.md +++ b/docs/drostemixer/index.md @@ -16,7 +16,7 @@ TO DO: [two droste steps](/GroundForge-help/snow-mix/droste/), maybe even some [patterns](https://jo-pol.github.io/GroundForge-help/snow-mix/droste/#more-freedom). * Flip buttons, apply to all (ignored only for step-0?). -* Radios -> twisters in diagram captions +* Radios -> twisters in diagram captions. Both values should also be added to the URL query, defaulting to zero for both. * Rename rest of _options_ to _advanced_, maybe initially minimized (values collected from URL and pair diagram interactions) * Legend panel (should wrap nicely) * Link to changed pattern From 5cd0046649a11cd533c5028c8d24195384f50de8 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Thu, 18 Dec 2025 19:35:26 +0100 Subject: [PATCH 026/221] blooper --- docs/drostemixer/droste-mixer.js | 45 +++++++++++--------------------- docs/drostemixer/index.md | 9 +++---- docs/drostemixer/test.html | 6 +++-- docs/js/panel.js | 1 + 4 files changed, 24 insertions(+), 37 deletions(-) diff --git a/docs/drostemixer/droste-mixer.js b/docs/drostemixer/droste-mixer.js index 9c57d3ea3..37dc87d1b 100644 --- a/docs/drostemixer/droste-mixer.js +++ b/docs/drostemixer/droste-mixer.js @@ -1,6 +1,6 @@ const GF_droste_mixer = { generateSelectedDiagram(diagramType) { - const checkedStep = document.querySelector(`input[name="${diagramType}Step"]:checked`); + const checkedStep = document.querySelector(`input[name="${diagramType}Step"]`); const drosteIndex = parseInt(checkedStep.value, 10); const steps = []; for (let i = 1; i <= drosteIndex; i++) { @@ -70,18 +70,8 @@ const GF_droste_mixer = { title.parentNode.addEventListener('click', stitchHandler) }); }, - stepRadiosControls(stepNr){ - return ` - - - `; - }, drosteControls(stepNr){ - return ` -
${this.stepRadiosControls(stepNr)} - -
- `; + return ``; }, load(container) { let q = new URL(document.documentURI).search.slice(1); @@ -91,26 +81,21 @@ const GF_droste_mixer = { const threadWandHref = "javascript:GF_droste_mixer.generateSelectedDiagram('thread')"; GF_panel.load({caption: "pair diagram", id: "pair_panel", wandHref: pairWandHref, controls: ["resize"]}, container); GF_panel.load({caption: "thread diagram", id: "thread_panel", wandHref: threadWandHref, controls: ["resize", "color"]}, container); - GF_panel.load({caption: "options", id: "options", controls: ["resize"]}, container); + GF_panel.load({caption: "advanced", id: "options", controls: ["resize"]}, container); + const params = new URLSearchParams(window.location.search); + document.getElementById('threadStep').value = 1; document.getElementById('options').innerHTML = ` -
${this.stepRadiosControls(0)} - -
${this.drosteControls(1)}${this.drosteControls(2)}${this.drosteControls(3)} + Specs collected from URL and clicks on pair diagrams: + + + + `; - for(let kv of q.split(/&/)){ - let eq = kv.indexOf('='); - let key = eq === -1 ? kv : kv.slice(0, eq); - let value = eq === -1 ? '' : kv.slice(eq + 1); - if(key.startsWith('droste')) { - const elementId = 'droste'+((key.slice(6)*1)-1); - document.getElementById(elementId).value = value; - } + for (let type of ["pair", "thread"]) { + document.getElementById(`${type}`) + .addEventListener('change', function () { + document.getElementById(type + '_panel').style.backgroundColor = "rgb(238, 238, 238)"; + }); } - document.querySelectorAll('input[name="droste"]').forEach(radio => { - radio.addEventListener('change', function() { - document.getElementById('pair_panel').style.backgroundColor = "rgb(238, 238, 238)"; - document.getElementById('thread_panel').style.backgroundColor = "rgb(238, 238, 238)"; - }); - }); } } \ No newline at end of file diff --git a/docs/drostemixer/index.md b/docs/drostemixer/index.md index 89528f40d..24c43ecc1 100644 --- a/docs/drostemixer/index.md +++ b/docs/drostemixer/index.md @@ -14,12 +14,11 @@ Work in progress TO DO: * Galleries: [basic stitches](/API/stitch-gallery) and recipes for snow with [two droste steps](/GroundForge-help/snow-mix/droste/), maybe even - some [patterns](https://jo-pol.github.io/GroundForge-help/snow-mix/droste/#more-freedom). -* Flip buttons, apply to all (ignored only for step-0?). -* Radios -> twisters in diagram captions. Both values should also be added to the URL query, defaulting to zero for both. -* Rename rest of _options_ to _advanced_, maybe initially minimized (values collected from URL and pair diagram interactions) + some [patterns](https://jo-pol.github.io/GroundForge-help/snow-mix/droste/#more-freedom) +* Flip buttons, apply to all (ignored only for step-0?) +* Maybe show _advanced_ initially minimized * Legend panel (should wrap nicely) -* Link to changed pattern +* Link to changed pattern, add step numbers to URL --- diff --git a/docs/drostemixer/test.html b/docs/drostemixer/test.html index 3e30a59e7..1715a7edb 100644 --- a/docs/drostemixer/test.html +++ b/docs/drostemixer/test.html @@ -11,8 +11,10 @@ .gf_panel {display: inline-block; margin: 4px;} .gf_panel > div {width: 100%; overflow: auto; resize:both; border: #ddd solid 1px; } .gf_panel > figcaption {width: 100%; height:2.5em; padding-bottom: 0.2em; box-sizing: border-box; display: flex; align-items: flex-end; background-color: #ddd; } - .gf_panel > figcaption img, .gf_panel > figcaption > input {margin-left: 0.5em;} - .gf_panel > div > div > textarea { height: 7em;} + .gf_panel > figcaption img {margin-left: 0.5em; width: 3em;} + .gf_panel > figcaption > input {margin-left: 0.5em; width: 3em; height: 2.2em;} + .gf_panel > div > textarea { height: 7em; width: 100%} + .gf_panel > div > input { width: 100%} #drosteStitches {width: 40em;} diff --git a/docs/js/panel.js b/docs/js/panel.js index fa68fa5a3..4f72cd8e7 100644 --- a/docs/js/panel.js +++ b/docs/js/panel.js @@ -22,6 +22,7 @@ const GF_panel = { ` : ''; const type = hasColorChooser ? "thread" : "pair"; const diagram = wandHref ? ` + wand resume download From 9b3886f7df9b968ecb44944884d20d957f7634ba Mon Sep 17 00:00:00 2001 From: jo-pol Date: Thu, 18 Dec 2025 20:05:10 +0100 Subject: [PATCH 027/221] radios replaced with twisters --- docs/drostemixer/droste-mixer.js | 22 +++++++++------------- docs/drostemixer/index.md | 9 +++++---- docs/drostemixer/test.html | 2 +- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/docs/drostemixer/droste-mixer.js b/docs/drostemixer/droste-mixer.js index 37dc87d1b..90689d23b 100644 --- a/docs/drostemixer/droste-mixer.js +++ b/docs/drostemixer/droste-mixer.js @@ -1,7 +1,6 @@ const GF_droste_mixer = { generateSelectedDiagram(diagramType) { - const checkedStep = document.querySelector(`input[name="${diagramType}Step"]`); - const drosteIndex = parseInt(checkedStep.value, 10); + const drosteIndex = parseInt(document.getElementById(`${diagramType}Step`).value, 10); const steps = []; for (let i = 1; i <= drosteIndex; i++) { const textarea = document.getElementById(`droste${i}`); @@ -36,8 +35,7 @@ const GF_droste_mixer = { path.style.opacity = 0.5; } } - const checkedDroste = document.querySelector('input[name="pairStep"]:checked'); - const drosteIndex = parseInt(checkedDroste.value, 10); + const drosteIndex = parseInt(document.getElementById("pairStep").value); const drosteInput = document.getElementById('droste'+ drosteIndex); if (drosteIndex===0){ for(let kv of drosteInput.value.split(/&/)){ @@ -70,9 +68,6 @@ const GF_droste_mixer = { title.parentNode.addEventListener('click', stitchHandler) }); }, - drosteControls(stepNr){ - return ``; - }, load(container) { let q = new URL(document.documentURI).search.slice(1); if (q === "" || !q.includes('shiftRows')) @@ -82,20 +77,21 @@ const GF_droste_mixer = { GF_panel.load({caption: "pair diagram", id: "pair_panel", wandHref: pairWandHref, controls: ["resize"]}, container); GF_panel.load({caption: "thread diagram", id: "thread_panel", wandHref: threadWandHref, controls: ["resize", "color"]}, container); GF_panel.load({caption: "advanced", id: "options", controls: ["resize"]}, container); - const params = new URLSearchParams(window.location.search); + const params = new URLSearchParams(q); document.getElementById('threadStep').value = 1; document.getElementById('options').innerHTML = ` Specs collected from URL and clicks on pair diagrams: - - - + + + `; for (let type of ["pair", "thread"]) { - document.getElementById(`${type}`) - .addEventListener('change', function () { + document.querySelectorAll(`input[name="${type}Step"]`).forEach(function (elem) { + elem.addEventListener('change', function () { document.getElementById(type + '_panel').style.backgroundColor = "rgb(238, 238, 238)"; }); + }); } } } \ No newline at end of file diff --git a/docs/drostemixer/index.md b/docs/drostemixer/index.md index 24c43ecc1..f993dfc3c 100644 --- a/docs/drostemixer/index.md +++ b/docs/drostemixer/index.md @@ -32,10 +32,11 @@ TO DO: .gf_panel {display: inline-block; margin: 4px;} .gf_panel > div {width: 100%; overflow: auto; resize:both; border: #ddd solid 1px; } .gf_panel > figcaption {width: 100%; height:2.5em; padding-bottom: 0.2em; box-sizing: border-box; display: flex; align-items: flex-end; background-color: #ddd; } - .gf_panel > figcaption img, .gf_panel > figcaption > input {margin-left: 0.5em;} - .gf_panel > div > div > textarea { height: 5.5em;} - .gf_panel > div > div > input[type="radio"] { margin-right: 0.5em;} - #drosteStitches {width: 100%} + .gf_panel > figcaption img {margin-left: 0.5em; width: 3em;} + .gf_panel > figcaption > input {margin-left: 0.5em; width: 3em; height: 2.2em;} + .gf_panel > div > textarea { height: 6em; width: 100%} + .gf_panel > div > input { width: 100%} + #drosteStitches {width: 100%;} \ No newline at end of file diff --git a/docs/drostemixer/test.html b/docs/drostemixer/test.html index 1715a7edb..42994f8f7 100644 --- a/docs/drostemixer/test.html +++ b/docs/drostemixer/test.html @@ -13,7 +13,7 @@ .gf_panel > figcaption {width: 100%; height:2.5em; padding-bottom: 0.2em; box-sizing: border-box; display: flex; align-items: flex-end; background-color: #ddd; } .gf_panel > figcaption img {margin-left: 0.5em; width: 3em;} .gf_panel > figcaption > input {margin-left: 0.5em; width: 3em; height: 2.2em;} - .gf_panel > div > textarea { height: 7em; width: 100%} + .gf_panel > div > textarea { height: 6em; width: 100%} .gf_panel > div > input { width: 100%} #drosteStitches {width: 40em;} From 8d4d99a3e73d3277186238ff2d18382497afa2c8 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Thu, 18 Dec 2025 20:09:49 +0100 Subject: [PATCH 028/221] image size --- docs/drostemixer/index.md | 2 +- docs/drostemixer/test.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/drostemixer/index.md b/docs/drostemixer/index.md index f993dfc3c..cd3a04397 100644 --- a/docs/drostemixer/index.md +++ b/docs/drostemixer/index.md @@ -32,7 +32,7 @@ TO DO: .gf_panel {display: inline-block; margin: 4px;} .gf_panel > div {width: 100%; overflow: auto; resize:both; border: #ddd solid 1px; } .gf_panel > figcaption {width: 100%; height:2.5em; padding-bottom: 0.2em; box-sizing: border-box; display: flex; align-items: flex-end; background-color: #ddd; } - .gf_panel > figcaption img {margin-left: 0.5em; width: 3em;} + .gf_panel > figcaption img {margin-left: 0.5em;} .gf_panel > figcaption > input {margin-left: 0.5em; width: 3em; height: 2.2em;} .gf_panel > div > textarea { height: 6em; width: 100%} .gf_panel > div > input { width: 100%} diff --git a/docs/drostemixer/test.html b/docs/drostemixer/test.html index 42994f8f7..c709a7579 100644 --- a/docs/drostemixer/test.html +++ b/docs/drostemixer/test.html @@ -11,7 +11,7 @@ .gf_panel {display: inline-block; margin: 4px;} .gf_panel > div {width: 100%; overflow: auto; resize:both; border: #ddd solid 1px; } .gf_panel > figcaption {width: 100%; height:2.5em; padding-bottom: 0.2em; box-sizing: border-box; display: flex; align-items: flex-end; background-color: #ddd; } - .gf_panel > figcaption img {margin-left: 0.5em; width: 3em;} + .gf_panel > figcaption img {margin-left: 0.5em;} .gf_panel > figcaption > input {margin-left: 0.5em; width: 3em; height: 2.2em;} .gf_panel > div > textarea { height: 6em; width: 100%} .gf_panel > div > input { width: 100%} From d6478a4c8c52455d2302c31d77fef2ea8d5e5a81 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Thu, 18 Dec 2025 20:12:39 +0100 Subject: [PATCH 029/221] panel captions --- docs/drostemixer/droste-mixer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/drostemixer/droste-mixer.js b/docs/drostemixer/droste-mixer.js index 90689d23b..b5e6b0b84 100644 --- a/docs/drostemixer/droste-mixer.js +++ b/docs/drostemixer/droste-mixer.js @@ -74,8 +74,8 @@ const GF_droste_mixer = { q = "patchWidth=3&patchHeight=7&c1=tc&d1=tctc&e1=tc&c2=tctc&e2=tctc&d3=tc&shiftColsSE=2&shiftRowsSE=2&shiftColsSW=-2&shiftRowsSW=2&footside=-5,B-,-2,b-,,&tile=831,4-7,-5-&headside=5-,-c,6-,-c&droste2=ctct,twist=ct" const pairWandHref = "javascript:GF_droste_mixer.generateSelectedDiagram('pair');GF_droste_mixer.setStitchEvents()"; const threadWandHref = "javascript:GF_droste_mixer.generateSelectedDiagram('thread')"; - GF_panel.load({caption: "pair diagram", id: "pair_panel", wandHref: pairWandHref, controls: ["resize"]}, container); - GF_panel.load({caption: "thread diagram", id: "thread_panel", wandHref: threadWandHref, controls: ["resize", "color"]}, container); + GF_panel.load({caption: "pairs", id: "pair_panel", wandHref: pairWandHref, controls: ["resize"]}, container); + GF_panel.load({caption: "threads", id: "thread_panel", wandHref: threadWandHref, controls: ["resize", "color"]}, container); GF_panel.load({caption: "advanced", id: "options", controls: ["resize"]}, container); const params = new URLSearchParams(q); document.getElementById('threadStep').value = 1; From 9e64282303989085db6cb36abbb67b6bde8416b2 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 19 Dec 2025 08:19:22 +0100 Subject: [PATCH 030/221] no public test page, less duplication --- docs/drostemixer/droste-mixer.js | 13 +++++++++--- docs/drostemixer/index.md | 8 +------- .../test.html => test-docs/drostemixer.html | 20 ++++++------------- 3 files changed, 17 insertions(+), 24 deletions(-) rename docs/drostemixer/test.html => test-docs/drostemixer.html (53%) diff --git a/docs/drostemixer/droste-mixer.js b/docs/drostemixer/droste-mixer.js index b5e6b0b84..5acc7463f 100644 --- a/docs/drostemixer/droste-mixer.js +++ b/docs/drostemixer/droste-mixer.js @@ -74,13 +74,20 @@ const GF_droste_mixer = { q = "patchWidth=3&patchHeight=7&c1=tc&d1=tctc&e1=tc&c2=tctc&e2=tctc&d3=tc&shiftColsSE=2&shiftRowsSE=2&shiftColsSW=-2&shiftRowsSW=2&footside=-5,B-,-2,b-,,&tile=831,4-7,-5-&headside=5-,-c,6-,-c&droste2=ctct,twist=ct" const pairWandHref = "javascript:GF_droste_mixer.generateSelectedDiagram('pair');GF_droste_mixer.setStitchEvents()"; const threadWandHref = "javascript:GF_droste_mixer.generateSelectedDiagram('thread')"; + container.insertAdjacentHTML('beforeend',`

+ + + + +

`); GF_panel.load({caption: "pairs", id: "pair_panel", wandHref: pairWandHref, controls: ["resize"]}, container); GF_panel.load({caption: "threads", id: "thread_panel", wandHref: threadWandHref, controls: ["resize", "color"]}, container); - GF_panel.load({caption: "advanced", id: "options", controls: ["resize"]}, container); + GF_panel.load({caption: "advanced", id: "specs", controls: ["resize"]}, container); const params = new URLSearchParams(q); + document.getElementById('specs').style.height = "2"; document.getElementById('threadStep').value = 1; - document.getElementById('options').innerHTML = ` - Specs collected from URL and clicks on pair diagrams: + document.getElementById('specs').innerHTML = ` + Specs collected from URL and clicks: diff --git a/docs/drostemixer/index.md b/docs/drostemixer/index.md index cd3a04397..0803fd8e0 100644 --- a/docs/drostemixer/index.md +++ b/docs/drostemixer/index.md @@ -22,18 +22,12 @@ TO DO: --- - - - - - - -

- - - - - - -

\ No newline at end of file From 07647c53d290f0a6e9b81d9950028de4b7478b82 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 19 Dec 2025 08:27:27 +0100 Subject: [PATCH 031/221] layout --- docs/drostemixer/droste-mixer.js | 3 ++- docs/drostemixer/index.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/drostemixer/droste-mixer.js b/docs/drostemixer/droste-mixer.js index 5acc7463f..2191b1d76 100644 --- a/docs/drostemixer/droste-mixer.js +++ b/docs/drostemixer/droste-mixer.js @@ -77,6 +77,7 @@ const GF_droste_mixer = { container.insertAdjacentHTML('beforeend',`

+

`); @@ -84,7 +85,6 @@ const GF_droste_mixer = { GF_panel.load({caption: "threads", id: "thread_panel", wandHref: threadWandHref, controls: ["resize", "color"]}, container); GF_panel.load({caption: "advanced", id: "specs", controls: ["resize"]}, container); const params = new URLSearchParams(q); - document.getElementById('specs').style.height = "2"; document.getElementById('threadStep').value = 1; document.getElementById('specs').innerHTML = ` Specs collected from URL and clicks: @@ -93,6 +93,7 @@ const GF_droste_mixer = { `; + document.getElementById('specs').style.height = "2"; for (let type of ["pair", "thread"]) { document.querySelectorAll(`input[name="${type}Step"]`).forEach(function (elem) { elem.addEventListener('change', function () { diff --git a/docs/drostemixer/index.md b/docs/drostemixer/index.md index 0803fd8e0..95694e0a3 100644 --- a/docs/drostemixer/index.md +++ b/docs/drostemixer/index.md @@ -28,7 +28,7 @@ TO DO: .gf_panel > figcaption {width: 100%; height:2.5em; padding-bottom: 0.2em; box-sizing: border-box; display: flex; align-items: flex-end; background-color: #ddd; } .gf_panel > figcaption img {margin-left: 0.5em;} .gf_panel > figcaption > input {margin-left: 0.5em; width: 3em;} - .gf_panel > div > textarea { height: 6em; width: 100%} + .gf_panel > div > textarea { height: 4.5em; width: 100%} .gf_panel > div > input { width: 100%} #drosteStitches {width: 100%;} From cd5c8323ba1cf7a1fc7280a19c260190a883fa49 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 19 Dec 2025 08:30:33 +0100 Subject: [PATCH 032/221] layout --- docs/drostemixer/droste-mixer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/drostemixer/droste-mixer.js b/docs/drostemixer/droste-mixer.js index 2191b1d76..35c186da4 100644 --- a/docs/drostemixer/droste-mixer.js +++ b/docs/drostemixer/droste-mixer.js @@ -93,7 +93,7 @@ const GF_droste_mixer = { `; - document.getElementById('specs').style.height = "2"; + document.getElementById('specs').style.height = "2px"; for (let type of ["pair", "thread"]) { document.querySelectorAll(`input[name="${type}Step"]`).forEach(function (elem) { elem.addEventListener('change', function () { From 488d4d029e722b61dcda113cc435bdd6bf1ecdfa Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 19 Dec 2025 09:32:16 +0100 Subject: [PATCH 033/221] gallery --- docs/drostemixer/droste-mixer.js | 61 ++++++++++++++++++++++++++++---- test-docs/drostemixer.html | 2 +- 2 files changed, 55 insertions(+), 8 deletions(-) diff --git a/docs/drostemixer/droste-mixer.js b/docs/drostemixer/droste-mixer.js index 35c186da4..35ea6e247 100644 --- a/docs/drostemixer/droste-mixer.js +++ b/docs/drostemixer/droste-mixer.js @@ -1,4 +1,34 @@ const GF_droste_mixer = { + snow3: [ + ['123-a', 'rcrcrc','crc,crclctc,ctcrc,rcl,c,c'], + ['123-b', 'lclclc','rcl,ctc,crcllc,crrclcr,ctc,cl'], + ['132-a', 'rcrcrc','-,ctc,ctc,ctc,ctc,ctc'], + ['312-a', 'lclc','tctc,rctcl,ctcl,ctct'], + ['321-a', 'lclc','tc,rclcrc,clcrcl,ct'], + ['321-b', 'rcrc','tcr,lctc,ctcr,lct'], + ['321-c', 'rcrc','tcl,lctc,ctcr,rct'], + ['321-d', 'rcrc','t,lctc,ctcr,ctct'], + ['126453-a','lclclc','-,c,ctctc,ctctc,ctctc,c'], + ['153426-a','lclclc','t,rc,ctc,rclcr,ctcl,ct'], + ['154326-a','lclc','t,rctc,ctctcl,ctct'], + ['156423-a','rcrcrc','-,cr,crcl,clcrclcr,rcrcl,c'], + ['234561-a','lclclc','cr,crcl,clcr,crcl,clcr,c'], + ['263451-a','rcrcrc','-,cr,crcl,clcr,crcl,cl'], + ['321546-a','lclclc','-,cl,ctcl,crcrcr,rcr,c'], + ['321654-a','lclclclc','-,lc,crc,clcrc,clcr,c,crc,cl'], + ['321654-b','rcrcrc','-,cr,ctcr,clclc,lcl,c'], + ['354612-a','rcrcrc','ctct,ct,ct,ct,cl,ctc'], + ['426153-a','rcrc','lc,crclclc,crcrclc,cr'], + ['426153-b','rcrcrc','cr,ctcl,ctcr,ctcl,ctc,c'], + ['456123-a','rcrc','r,lrc,ctcr,lct'], + ['456123-b','rcrcrcrc','c,ctc,rclc,ctc,rc,rcl,ctc,c'], + ['462513-a','lclc','rc,clcrc,clctc,rcl'], + ['564312-a','rcrc','lcrc,clcrc,clcrc,clcr'], + ['563412-a','rcrcrc','-,c,ctctc,clcr,rctc,c'], + ['623451-a','lclclclc','r,c,crc,ctc,lcrcl,ctc,crc,cl'], + ['623541-a','lclclc','-,ctc,ct,crc,ctc,ctc'], + ['623541-b','rcrcrc','-,cl,ctctcr,ct,ctc,c'] + ], generateSelectedDiagram(diagramType) { const drosteIndex = parseInt(document.getElementById(`${diagramType}Step`).value, 10); const steps = []; @@ -69,21 +99,34 @@ const GF_droste_mixer = { }); }, load(container) { - let q = new URL(document.documentURI).search.slice(1); - if (q === "" || !q.includes('shiftRows')) - q = "patchWidth=3&patchHeight=7&c1=tc&d1=tctc&e1=tc&c2=tctc&e2=tctc&d3=tc&shiftColsSE=2&shiftRowsSE=2&shiftColsSW=-2&shiftRowsSW=2&footside=-5,B-,-2,b-,,&tile=831,4-7,-5-&headside=5-,-c,6-,-c&droste2=ctct,twist=ct" + const containerWidth = `'${container.style.width}'`; const pairWandHref = "javascript:GF_droste_mixer.generateSelectedDiagram('pair');GF_droste_mixer.setStitchEvents()"; const threadWandHref = "javascript:GF_droste_mixer.generateSelectedDiagram('thread')"; - container.insertAdjacentHTML('beforeend',`

+ GF_panel.load({caption: "select (3/6-pair)", id: "snow3", controls: ["resize"], size:{width:'´100%', height: '3em'}}, container); + GF_panel.load({caption: "tweak", id: "tweak", size:{width:'´100%', height: '6em'}}, container); + GF_panel.load({caption: "pairs", id: "pair_panel", wandHref: pairWandHref, controls: ["resize"]}, container); + GF_panel.load({caption: "threads", id: "thread_panel", wandHref: threadWandHref, controls: ["resize", "color"]}, container); + GF_panel.load({caption: "advanced", id: "specs", controls: ["resize"]}, container); + document.getElementById('tweak').insertAdjacentHTML('beforeend',`


`); - GF_panel.load({caption: "pairs", id: "pair_panel", wandHref: pairWandHref, controls: ["resize"]}, container); - GF_panel.load({caption: "threads", id: "thread_panel", wandHref: threadWandHref, controls: ["resize", "color"]}, container); - GF_panel.load({caption: "advanced", id: "specs", controls: ["resize"]}, container); + document.getElementById('tweak').parentNode.style.width = '100%'; + document.getElementById('tweak').parentNode.style.width = '100%'; + const gallery = document.getElementById('snow3') + for(let [img,basicStitch,droste] of GF_droste_mixer.snow3){ + gallery.insertAdjacentHTML('beforeend',` + ${img} + `); + + } + let q = new URL(document.documentURI).search.slice(1); + if (q === "" || !q.includes('shiftRows')) { + q = "patchWidth=3&patchHeight=7&c1=tc&d1=tctc&e1=tc&c2=tctc&e2=tctc&d3=tc&shiftColsSE=2&shiftRowsSE=2&shiftColsSW=-2&shiftRowsSW=2&footside=-5,B-,-2,b-,,&tile=831,4-7,-5-&headside=5-,-c,6-,-c&droste2=ctct,twist=ct" + } const params = new URLSearchParams(q); document.getElementById('threadStep').value = 1; document.getElementById('specs').innerHTML = ` @@ -101,5 +144,9 @@ const GF_droste_mixer = { }); }); } + }, + setRecipe(basicStitch, drosteStitches) { + document.getElementById('basicStitchInput').value = basicStitch; + document.getElementById('drosteStitches').value = drosteStitches; } } \ No newline at end of file diff --git a/test-docs/drostemixer.html b/test-docs/drostemixer.html index 1b467230e..7c179c448 100644 --- a/test-docs/drostemixer.html +++ b/test-docs/drostemixer.html @@ -15,7 +15,7 @@ .gf_panel > figcaption > input {margin-left: 0.5em; width: 3em;} .gf_panel > div > textarea { height: 6em; width: 100%} .gf_panel > div > input { width: 100%} - #drosteStitches {width: 40em;} + #drosteStitches {width: 100%;} From 13028fe328e0e7cd31142ff16097c325d76f3691 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 19 Dec 2025 09:37:33 +0100 Subject: [PATCH 034/221] gallery images --- docs/drostemixer/droste-mixer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/drostemixer/droste-mixer.js b/docs/drostemixer/droste-mixer.js index 35ea6e247..3aff186e1 100644 --- a/docs/drostemixer/droste-mixer.js +++ b/docs/drostemixer/droste-mixer.js @@ -119,7 +119,7 @@ const GF_droste_mixer = { const gallery = document.getElementById('snow3') for(let [img,basicStitch,droste] of GF_droste_mixer.snow3){ gallery.insertAdjacentHTML('beforeend',` - ${img} + ${img} `); } From 74186b8e22524d152e8632e2026c09dce7670ace Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 19 Dec 2025 09:59:36 +0100 Subject: [PATCH 035/221] gallery height, updated todo's, borrowed sidebar --- docs/drostemixer/droste-mixer.js | 2 +- docs/drostemixer/index.md | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/drostemixer/droste-mixer.js b/docs/drostemixer/droste-mixer.js index 3aff186e1..e013520fd 100644 --- a/docs/drostemixer/droste-mixer.js +++ b/docs/drostemixer/droste-mixer.js @@ -102,7 +102,7 @@ const GF_droste_mixer = { const containerWidth = `'${container.style.width}'`; const pairWandHref = "javascript:GF_droste_mixer.generateSelectedDiagram('pair');GF_droste_mixer.setStitchEvents()"; const threadWandHref = "javascript:GF_droste_mixer.generateSelectedDiagram('thread')"; - GF_panel.load({caption: "select (3/6-pair)", id: "snow3", controls: ["resize"], size:{width:'´100%', height: '3em'}}, container); + GF_panel.load({caption: "select (3/6-pair)", id: "snow3", controls: ["resize"], size:{width:'´100%', height: '50px'}}, container); GF_panel.load({caption: "tweak", id: "tweak", size:{width:'´100%', height: '6em'}}, container); GF_panel.load({caption: "pairs", id: "pair_panel", wandHref: pairWandHref, controls: ["resize"]}, container); GF_panel.load({caption: "threads", id: "thread_panel", wandHref: threadWandHref, controls: ["resize", "color"]}, container); diff --git a/docs/drostemixer/index.md b/docs/drostemixer/index.md index 95694e0a3..09dd7c951 100644 --- a/docs/drostemixer/index.md +++ b/docs/drostemixer/index.md @@ -1,6 +1,7 @@ --- layout: default title: wip +sidebar: mix4snow javascript: - d3.v4.min.js - GroundForge-opt.js @@ -12,11 +13,10 @@ Work in progress ================ TO DO: -* Galleries: [basic stitches](/API/stitch-gallery) and recipes for snow with - [two droste steps](/GroundForge-help/snow-mix/droste/), maybe even - some [patterns](https://jo-pol.github.io/GroundForge-help/snow-mix/droste/#more-freedom) -* Flip buttons, apply to all (ignored only for step-0?) -* Maybe show _advanced_ initially minimized +* Toggle between galleries (minimize all but one): [basic stitches](/API/stitch-gallery) and [4/8-pair snow](/GroundForge-help/snow-mix/droste/#48-pair-recipes). + Maybe even some basic [pattern](/GroundForge-help/snow-mix/droste/#more-freedom) + variations, finally linking to the catalogues (tesselace first). +* Flip buttons, apply to all (ignored only for step-0?), beep on invalid input. * Legend panel (should wrap nicely) * Link to changed pattern, add step numbers to URL From add8c02d4841127186910691d2a20ddaba2a1313 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 19 Dec 2025 11:06:12 +0100 Subject: [PATCH 036/221] torcon base pattern --- docs/drostemixer/droste-mixer.js | 2 +- docs/drostemixer/index.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/drostemixer/droste-mixer.js b/docs/drostemixer/droste-mixer.js index e013520fd..d36deec18 100644 --- a/docs/drostemixer/droste-mixer.js +++ b/docs/drostemixer/droste-mixer.js @@ -125,7 +125,7 @@ const GF_droste_mixer = { } let q = new URL(document.documentURI).search.slice(1); if (q === "" || !q.includes('shiftRows')) { - q = "patchWidth=3&patchHeight=7&c1=tc&d1=tctc&e1=tc&c2=tctc&e2=tctc&d3=tc&shiftColsSE=2&shiftRowsSE=2&shiftColsSW=-2&shiftRowsSW=2&footside=-5,B-,-2,b-,,&tile=831,4-7,-5-&headside=5-,-c,6-,-c&droste2=ctct,twist=ct" + q = "patchWidth=7&patchHeight=7&footside=---x,---4,---x,---4&tile=5-,-5,5-,-5&headside=-,c,-,c,&shiftColsSW=0&shiftRowsSW=4&shiftColsSE=2&shiftRowsSE=2&e1=ctc&l2=llctt&f2=ctc&d2=rrctt&e3=ctc&l4=llctt&f4=ctc&d4=rrctt" } const params = new URLSearchParams(q); document.getElementById('threadStep').value = 1; diff --git a/docs/drostemixer/index.md b/docs/drostemixer/index.md index 09dd7c951..1fa7e1bc0 100644 --- a/docs/drostemixer/index.md +++ b/docs/drostemixer/index.md @@ -28,8 +28,8 @@ TO DO: .gf_panel > figcaption {width: 100%; height:2.5em; padding-bottom: 0.2em; box-sizing: border-box; display: flex; align-items: flex-end; background-color: #ddd; } .gf_panel > figcaption img {margin-left: 0.5em;} .gf_panel > figcaption > input {margin-left: 0.5em; width: 3em;} - .gf_panel > div > textarea { height: 4.5em; width: 100%} - .gf_panel > div > input { width: 100%} + .gf_panel > div > textarea { height: 4.5em; width: 98%} + .gf_panel > div > input { width: 98%} #drosteStitches {width: 100%;} From e091e3a88c195c49fd681c9cec25a26f604c3620 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 19 Dec 2025 11:23:33 +0100 Subject: [PATCH 037/221] attempt to reproduce initial mix4snow --- docs/drostemixer/droste-mixer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/drostemixer/droste-mixer.js b/docs/drostemixer/droste-mixer.js index d36deec18..e12d89c9d 100644 --- a/docs/drostemixer/droste-mixer.js +++ b/docs/drostemixer/droste-mixer.js @@ -125,11 +125,12 @@ const GF_droste_mixer = { } let q = new URL(document.documentURI).search.slice(1); if (q === "" || !q.includes('shiftRows')) { - q = "patchWidth=7&patchHeight=7&footside=---x,---4,---x,---4&tile=5-,-5,5-,-5&headside=-,c,-,c,&shiftColsSW=0&shiftRowsSW=4&shiftColsSE=2&shiftRowsSE=2&e1=ctc&l2=llctt&f2=ctc&d2=rrctt&e3=ctc&l4=llctt&f4=ctc&d4=rrctt" + q = "patchWidth=7&patchHeight=7&footside=---x,---4,---x,---4&tile=5-,-5,5-,-5&headside=-,c,-,c,&shiftColsSW=0&shiftRowsSW=4&shiftColsSE=2&shiftRowsSE=2&e1=ctc&l2=llctt&f2=ctc&d2=rrctt&e3=ctc&l4=llctt&f4=ctc&d4=rrctt&droste2=e12=clcrcl,e13=ct,f42=ctcl,e32=f22=ctcr,e33=f43=lct,e31=f21=lctc,e11=rclcrc,f23=rct,f41=rctc,e10=tc,f20=tcl,e30=f40=tcr" } const params = new URLSearchParams(q); document.getElementById('threadStep').value = 1; document.getElementById('specs').innerHTML = ` + Specs collected from URL and clicks: From 929b9706bce01a6a0600dd6f58fc44a68484a652 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 19 Dec 2025 11:30:03 +0100 Subject: [PATCH 038/221] attempt to reproduce initial mix4snow --- docs/drostemixer/droste-mixer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/drostemixer/droste-mixer.js b/docs/drostemixer/droste-mixer.js index e12d89c9d..e9c824063 100644 --- a/docs/drostemixer/droste-mixer.js +++ b/docs/drostemixer/droste-mixer.js @@ -125,7 +125,7 @@ const GF_droste_mixer = { } let q = new URL(document.documentURI).search.slice(1); if (q === "" || !q.includes('shiftRows')) { - q = "patchWidth=7&patchHeight=7&footside=---x,---4,---x,---4&tile=5-,-5,5-,-5&headside=-,c,-,c,&shiftColsSW=0&shiftRowsSW=4&shiftColsSE=2&shiftRowsSE=2&e1=ctc&l2=llctt&f2=ctc&d2=rrctt&e3=ctc&l4=llctt&f4=ctc&d4=rrctt&droste2=e12=clcrcl,e13=ct,f42=ctcl,e32=f22=ctcr,e33=f43=lct,e31=f21=lctc,e11=rclcrc,f23=rct,f41=rctc,e10=tc,f20=tcl,e30=f40=tcr" + q = "patchWidth=7&patchHeight=7&footside=---x,---4,---x,---4&tile=5-,-5,5-,-5&headside=-,c,-,c,&shiftColsSW=0&shiftRowsSW=4&shiftColsSE=2&shiftRowsSE=2&e1=lclc&l2=llctt&f2=rcrc&d2=rrctt&e3=rcrc&l4=llctt&f4=lclc&d4=rrctt&droste2=e12=clcrcl,e13=ct,f42=ctcl,e32=f22=ctcr,e33=f43=lct,e31=f21=lctc,e11=rclcrc,f23=rct,f41=rctc,e10=tc,f20=tcl,e30=f40=tcr" } const params = new URLSearchParams(q); document.getElementById('threadStep').value = 1; From e7b910a1d8168f6c2e740534a708bd78198cef8e Mon Sep 17 00:00:00 2001 From: jo-pol Date: Sun, 21 Dec 2025 13:18:30 +0100 Subject: [PATCH 039/221] implemented flip --- docs/drostemixer/droste-mixer.js | 57 ++++++++++++++++++++++---------- docs/drostemixer/index.md | 12 +++---- test-docs/drostemixer.html | 2 ++ 3 files changed, 48 insertions(+), 23 deletions(-) diff --git a/docs/drostemixer/droste-mixer.js b/docs/drostemixer/droste-mixer.js index e9c824063..fe7650505 100644 --- a/docs/drostemixer/droste-mixer.js +++ b/docs/drostemixer/droste-mixer.js @@ -2,21 +2,21 @@ const GF_droste_mixer = { snow3: [ ['123-a', 'rcrcrc','crc,crclctc,ctcrc,rcl,c,c'], ['123-b', 'lclclc','rcl,ctc,crcllc,crrclcr,ctc,cl'], - ['132-a', 'rcrcrc','-,ctc,ctc,ctc,ctc,ctc'], + ['132-a', 'crcrc','ctc,ctc,ctc,ctc,ctc'], ['312-a', 'lclc','tctc,rctcl,ctcl,ctct'], ['321-a', 'lclc','tc,rclcrc,clcrcl,ct'], ['321-b', 'rcrc','tcr,lctc,ctcr,lct'], ['321-c', 'rcrc','tcl,lctc,ctcr,rct'], ['321-d', 'rcrc','t,lctc,ctcr,ctct'], - ['126453-a','lclclc','-,c,ctctc,ctctc,ctctc,c'], + ['126453-a','clclc','c,ctctc,ctctc,ctctc,c'], ['153426-a','lclclc','t,rc,ctc,rclcr,ctcl,ct'], ['154326-a','lclc','t,rctc,ctctcl,ctct'], - ['156423-a','rcrcrc','-,cr,crcl,clcrclcr,rcrcl,c'], + ['156423-a','crcrc','cr,crcl,clcrclcr,rcrcl,c'], ['234561-a','lclclc','cr,crcl,clcr,crcl,clcr,c'], - ['263451-a','rcrcrc','-,cr,crcl,clcr,crcl,cl'], - ['321546-a','lclclc','-,cl,ctcl,crcrcr,rcr,c'], - ['321654-a','lclclclc','-,lc,crc,clcrc,clcr,c,crc,cl'], - ['321654-b','rcrcrc','-,cr,ctcr,clclc,lcl,c'], + ['263451-a','crcrc','cr,crcl,clcr,crcl,cl'], + ['321546-a','clclc','cl,ctcl,crcrcr,rcr,c'], + ['321654-a','clclclc','lc,crc,clcrc,clcr,c,crc,cl'], + ['321654-b','crcrc','cr,ctcr,clclc,lcl,c'], ['354612-a','rcrcrc','ctct,ct,ct,ct,cl,ctc'], ['426153-a','rcrc','lc,crclclc,crcrclc,cr'], ['426153-b','rcrcrc','cr,ctcl,ctcr,ctcl,ctc,c'], @@ -24,10 +24,10 @@ const GF_droste_mixer = { ['456123-b','rcrcrcrc','c,ctc,rclc,ctc,rc,rcl,ctc,c'], ['462513-a','lclc','rc,clcrc,clctc,rcl'], ['564312-a','rcrc','lcrc,clcrc,clcrc,clcr'], - ['563412-a','rcrcrc','-,c,ctctc,clcr,rctc,c'], + ['563412-a','crcrc','c,ctctc,clcr,rctc,c'], ['623451-a','lclclclc','r,c,crc,ctc,lcrcl,ctc,crc,cl'], - ['623541-a','lclclc','-,ctc,ct,crc,ctc,ctc'], - ['623541-b','rcrcrc','-,cl,ctctcr,ct,ctc,c'] + ['623541-a','clclc','ctc,ct,crc,ctc,ctc'], + ['623541-b','crcrc','cl,ctctcr,ct,ctc,c'] ], generateSelectedDiagram(diagramType) { const drosteIndex = parseInt(document.getElementById(`${diagramType}Step`).value, 10); @@ -98,12 +98,33 @@ const GF_droste_mixer = { title.parentNode.addEventListener('click', stitchHandler) }); }, + flip_b2d() { + function flip(n) { + return n.value.toLowerCase() + .replaceAll(/[^crlt]/g, '') + .replace(/l/g, "R") + .replace(/r/g, "L"); + } + const n = document.getElementById('drosteStitches'); + n.value = flip(n); + this.flipRadio(document.getElementById('basicStitchInput')); + n.focus(); + }, + + flip_b2p() { + const n = document.getElementById('drosteStitches'); + n.value = n.value.toLowerCase() + .replaceAll('.', ',') + .replaceAll(/[^crlt,]/g, '') + .split(",").reverse().join(""); + n.focus(); + }, load(container) { const containerWidth = `'${container.style.width}'`; const pairWandHref = "javascript:GF_droste_mixer.generateSelectedDiagram('pair');GF_droste_mixer.setStitchEvents()"; const threadWandHref = "javascript:GF_droste_mixer.generateSelectedDiagram('thread')"; - GF_panel.load({caption: "select (3/6-pair)", id: "snow3", controls: ["resize"], size:{width:'´100%', height: '50px'}}, container); - GF_panel.load({caption: "tweak", id: "tweak", size:{width:'´100%', height: '6em'}}, container); + GF_panel.load({caption: "select (3/6-pair)", id: "snow3", controls: ["resize"], size:{width:'´98%', height: '50px'}}, container); + GF_panel.load({caption: "tweak selected", id: "tweak", size:{width:'´98%', height: 'auto'}}, container); GF_panel.load({caption: "pairs", id: "pair_panel", wandHref: pairWandHref, controls: ["resize"]}, container); GF_panel.load({caption: "threads", id: "thread_panel", wandHref: threadWandHref, controls: ["resize", "color"]}, container); GF_panel.load({caption: "advanced", id: "specs", controls: ["resize"]}, container); @@ -113,14 +134,16 @@ const GF_droste_mixer = {
+ Flip: + + +

`); document.getElementById('tweak').parentNode.style.width = '100%'; - document.getElementById('tweak').parentNode.style.width = '100%'; - const gallery = document.getElementById('snow3') + const snow3Gallery = document.getElementById('snow3') for(let [img,basicStitch,droste] of GF_droste_mixer.snow3){ - gallery.insertAdjacentHTML('beforeend',` - ${img} - `); + snow3Gallery.insertAdjacentHTML('beforeend', + `${img} `); } let q = new URL(document.documentURI).search.slice(1); diff --git a/docs/drostemixer/index.md b/docs/drostemixer/index.md index 1fa7e1bc0..3bca7af74 100644 --- a/docs/drostemixer/index.md +++ b/docs/drostemixer/index.md @@ -16,20 +16,20 @@ TO DO: * Toggle between galleries (minimize all but one): [basic stitches](/API/stitch-gallery) and [4/8-pair snow](/GroundForge-help/snow-mix/droste/#48-pair-recipes). Maybe even some basic [pattern](/GroundForge-help/snow-mix/droste/#more-freedom) variations, finally linking to the catalogues (tesselace first). -* Flip buttons, apply to all (ignored only for step-0?), beep on invalid input. +* Apply to all (apply to ignored only for step-0?), beep on invalid input. * Legend panel (should wrap nicely) -* Link to changed pattern, add step numbers to URL - ---- +* Link to changed pattern, fix wand in _advanced_ panel, add step numbers to URL, sidebar subjects diff --git a/test-docs/drostemixer.html b/test-docs/drostemixer.html index 7c179c448..3a18aaae9 100644 --- a/test-docs/drostemixer.html +++ b/test-docs/drostemixer.html @@ -15,6 +15,8 @@ .gf_panel > figcaption > input {margin-left: 0.5em; width: 3em;} .gf_panel > div > textarea { height: 6em; width: 100%} .gf_panel > div > input { width: 100%} + #tweak {resize: none;} + #snow3 {resize: vertical;} #drosteStitches {width: 100%;} From 69584f0610567a428a38f7de9f86748a7f95dd28 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Mon, 22 Dec 2025 08:12:54 +0100 Subject: [PATCH 040/221] method prefix for flip both --- docs/drostemixer/droste-mixer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/drostemixer/droste-mixer.js b/docs/drostemixer/droste-mixer.js index fe7650505..3a0ac5b04 100644 --- a/docs/drostemixer/droste-mixer.js +++ b/docs/drostemixer/droste-mixer.js @@ -137,7 +137,7 @@ const GF_droste_mixer = { Flip: - +

`); document.getElementById('tweak').parentNode.style.width = '100%'; const snow3Gallery = document.getElementById('snow3') From db29a3ff5dea37c389c5a1ba5e75ffab034adca6 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Tue, 23 Dec 2025 17:11:43 +0100 Subject: [PATCH 041/221] link to updated pattern, layout, refactoring --- docs/drostemixer/droste-mixer.js | 54 +++++++++++++++++++------------- docs/drostemixer/index.md | 5 +-- docs/js/panel.js | 1 - test-docs/drostemixer.html | 2 +- 4 files changed, 37 insertions(+), 25 deletions(-) diff --git a/docs/drostemixer/droste-mixer.js b/docs/drostemixer/droste-mixer.js index 3a0ac5b04..a34bab5c6 100644 --- a/docs/drostemixer/droste-mixer.js +++ b/docs/drostemixer/droste-mixer.js @@ -48,7 +48,7 @@ const GF_droste_mixer = { if(newStitchValue === '') return; const selectedText = event.currentTarget.textContent; - let selectedStitchId = selectedText.replace(/.* /,""); + const selectedStitchId = selectedText.replace(/.* /,""); const pairPanel = document.getElementById('pair_panel'); for (let title of pairPanel.getElementsByTagName('title')) { @@ -86,8 +86,16 @@ const GF_droste_mixer = { for (let i = 0; i < newDrosteStitches.length; i++) { extraSteps += `\n${selectedStitchId}${i}=${newDrosteStitches[i]}`; } - const elementId = 'droste'+ (drosteIndex + 1); - document.getElementById(elementId).value += extraSteps; + const drosteId = 'droste'+ (drosteIndex + 1); + document.getElementById(drosteId).value += extraSteps; + const droste0 = document.getElementById('droste0'); + const params = new URLSearchParams(droste0.value); + // params.set(selectedStitchId, newStitchValue); + params.set(drosteId, extraSteps.replaceAll('\n',',').trim()); + // droste0.value = params.toString(); + document.getElementById(drosteId).value += extraSteps; + document.getElementById('selfRef').href = '?'+params.toString(); + document.getElementById('selfRef').style.display = 'inline'; } Array.from(document @@ -101,14 +109,15 @@ const GF_droste_mixer = { flip_b2d() { function flip(n) { return n.value.toLowerCase() - .replaceAll(/[^crlt]/g, '') + .replaceAll(/[^crlt,.]/g, '') .replace(/l/g, "R") - .replace(/r/g, "L"); + .replace(/r/g, "L") + .toLowerCase(); } const n = document.getElementById('drosteStitches'); n.value = flip(n); - this.flipRadio(document.getElementById('basicStitchInput')); - n.focus(); + const n2 = document.getElementById('basicStitchInput'); + n2.value = flip(n2); }, flip_b2p() { @@ -119,16 +128,23 @@ const GF_droste_mixer = { .split(",").reverse().join(""); n.focus(); }, + twister(type){ + return `${type}s ` + }, load(container) { - const containerWidth = `'${container.style.width}'`; const pairWandHref = "javascript:GF_droste_mixer.generateSelectedDiagram('pair');GF_droste_mixer.setStitchEvents()"; const threadWandHref = "javascript:GF_droste_mixer.generateSelectedDiagram('thread')"; + let q = new URL(document.documentURI).search.slice(1); + if (q === "" || !q.includes('shiftRows')) { + q = "patchWidth=7&patchHeight=7&footside=---x,---4,---x,---4&tile=5-,-5,5-,-5&headside=-,c,-,c,&shiftColsSW=0&shiftRowsSW=4&shiftColsSE=2&shiftRowsSE=2&e1=lclc&l2=llctt&f2=rcrc&d2=rrctt&e3=rcrc&l4=llctt&f4=lclc&d4=rrctt&droste2=e12=clcrcl,e13=ct,f42=ctcl,e32=f22=ctcr,e33=f43=lct,e31=f21=lctc,e11=rclcrc,f23=rct,f41=rctc,e10=tc,f20=tcl,e30=f40=tcr" + } GF_panel.load({caption: "select (3/6-pair)", id: "snow3", controls: ["resize"], size:{width:'´98%', height: '50px'}}, container); GF_panel.load({caption: "tweak selected", id: "tweak", size:{width:'´98%', height: 'auto'}}, container); - GF_panel.load({caption: "pairs", id: "pair_panel", wandHref: pairWandHref, controls: ["resize"]}, container); - GF_panel.load({caption: "threads", id: "thread_panel", wandHref: threadWandHref, controls: ["resize", "color"]}, container); + container.insertAdjacentHTML('beforeend',`

`); + GF_panel.load({caption: this.twister("pair"), id: "pair_panel", wandHref: pairWandHref, controls: ["resize"]}, container); + GF_panel.load({caption: this.twister("thread"), id: "thread_panel", wandHref: threadWandHref, controls: ["resize", "color"]}, container); GF_panel.load({caption: "advanced", id: "specs", controls: ["resize"]}, container); - document.getElementById('tweak').insertAdjacentHTML('beforeend',`

+ document.getElementById('tweak').insertAdjacentHTML('beforeend',`
@@ -138,27 +154,23 @@ const GF_droste_mixer = { -

`); - document.getElementById('tweak').parentNode.style.width = '100%'; + `); + document.getElementById('tweak').parentNode.style = `width: calc(100% - 7px)` const snow3Gallery = document.getElementById('snow3') for(let [img,basicStitch,droste] of GF_droste_mixer.snow3){ snow3Gallery.insertAdjacentHTML('beforeend', `${img} `); } - let q = new URL(document.documentURI).search.slice(1); - if (q === "" || !q.includes('shiftRows')) { - q = "patchWidth=7&patchHeight=7&footside=---x,---4,---x,---4&tile=5-,-5,5-,-5&headside=-,c,-,c,&shiftColsSW=0&shiftRowsSW=4&shiftColsSE=2&shiftRowsSE=2&e1=lclc&l2=llctt&f2=rcrc&d2=rrctt&e3=rcrc&l4=llctt&f4=lclc&d4=rrctt&droste2=e12=clcrcl,e13=ct,f42=ctcl,e32=f22=ctcr,e33=f43=lct,e31=f21=lctc,e11=rclcrc,f23=rct,f41=rctc,e10=tc,f20=tcl,e30=f40=tcr" - } const params = new URLSearchParams(q); document.getElementById('threadStep').value = 1; document.getElementById('specs').innerHTML = ` - + Specs collected from URL and clicks: - - - + + + `; document.getElementById('specs').style.height = "2px"; for (let type of ["pair", "thread"]) { diff --git a/docs/drostemixer/index.md b/docs/drostemixer/index.md index 3bca7af74..29abb789f 100644 --- a/docs/drostemixer/index.md +++ b/docs/drostemixer/index.md @@ -13,17 +13,18 @@ Work in progress ================ TO DO: +* Fix flip, fix link to updated pattern (and add step nrs) * Toggle between galleries (minimize all but one): [basic stitches](/API/stitch-gallery) and [4/8-pair snow](/GroundForge-help/snow-mix/droste/#48-pair-recipes). Maybe even some basic [pattern](/GroundForge-help/snow-mix/droste/#more-freedom) variations, finally linking to the catalogues (tesselace first). * Apply to all (apply to ignored only for step-0?), beep on invalid input. * Legend panel (should wrap nicely) -* Link to changed pattern, fix wand in _advanced_ panel, add step numbers to URL, sidebar subjects +* Update sidebar subjects - + \ No newline at end of file From 12ff9d92bbaf143ff89c789a2b7f8a9599e4af6f Mon Sep 17 00:00:00 2001 From: jo-pol Date: Wed, 24 Dec 2025 08:54:36 +0100 Subject: [PATCH 043/221] fix flipping --- docs/drostemixer/droste-mixer.js | 4 ++-- docs/drostemixer/index.md | 3 ++- test-docs/drostemixer.html | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/drostemixer/droste-mixer.js b/docs/drostemixer/droste-mixer.js index a34bab5c6..a4c781d6e 100644 --- a/docs/drostemixer/droste-mixer.js +++ b/docs/drostemixer/droste-mixer.js @@ -124,8 +124,8 @@ const GF_droste_mixer = { const n = document.getElementById('drosteStitches'); n.value = n.value.toLowerCase() .replaceAll('.', ',') - .replaceAll(/[^crlt,]/g, '') - .split(",").reverse().join(""); + .replaceAll(/[^crlt,.]/g, '') + .split(/[,.]/).reverse().join(","); n.focus(); }, twister(type){ diff --git a/docs/drostemixer/index.md b/docs/drostemixer/index.md index 29abb789f..75b056454 100644 --- a/docs/drostemixer/index.md +++ b/docs/drostemixer/index.md @@ -13,7 +13,7 @@ Work in progress ================ TO DO: -* Fix flip, fix link to updated pattern (and add step nrs) +* Fix link to updated pattern (and add step nrs) * Toggle between galleries (minimize all but one): [basic stitches](/API/stitch-gallery) and [4/8-pair snow](/GroundForge-help/snow-mix/droste/#48-pair-recipes). Maybe even some basic [pattern](/GroundForge-help/snow-mix/droste/#more-freedom) variations, finally linking to the catalogues (tesselace first). @@ -30,6 +30,7 @@ TO DO: .gf_panel > div > textarea { height: 4.5em; width: 98%} .gf_panel > div > input { width: 98%} #tweak {resize: none;} + #tweak input {margin-left: 2em;} #snow3 {resize: vertical;} #drosteStitches {width: 100%;} diff --git a/test-docs/drostemixer.html b/test-docs/drostemixer.html index a51d5c05c..e8f084228 100644 --- a/test-docs/drostemixer.html +++ b/test-docs/drostemixer.html @@ -16,6 +16,7 @@ .gf_panel > div > textarea { height: 6em; width: 100%} .gf_panel > div > input { width: 100%} #tweak {resize: none;} + #tweak input {margin-left: 2em;} #snow3 {resize: vertical;} #drosteStitches {width: 100%;} From 0044d98a4d68cf402063ee03f56476ee00fbf861 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Wed, 24 Dec 2025 14:10:24 +0100 Subject: [PATCH 044/221] fix link to updated pattern --- docs/drostemixer/droste-mixer.js | 17 ++++++++++------- docs/drostemixer/index.md | 8 +++----- test-docs/drostemixer.html | 6 +++--- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/docs/drostemixer/droste-mixer.js b/docs/drostemixer/droste-mixer.js index a4c781d6e..48a22ea28 100644 --- a/docs/drostemixer/droste-mixer.js +++ b/docs/drostemixer/droste-mixer.js @@ -44,7 +44,8 @@ const GF_droste_mixer = { setStitchEvents() { function stitchHandler(event) { const newStitchValue = document.getElementById('basicStitchInput').value; - const newDrosteStitches = document.getElementById('drosteStitches').value.split(/[,.]/); + const drosteValue = document.getElementById('drosteStitches').value; + const newDrosteStitches = drosteValue === '' ? [] : drosteValue.split(/[,.]/); if(newStitchValue === '') return; const selectedText = event.currentTarget.textContent; @@ -78,7 +79,7 @@ const GF_droste_mixer = { } else { drosteInput.value += `\n${selectedStitchId}=${newStitchValue}`; } - if (newDrosteStitches.length !== newStitchValue.length) { + if (newDrosteStitches.length > 0 && newDrosteStitches.length !== newStitchValue.length) { // TODO beep return; } @@ -90,11 +91,13 @@ const GF_droste_mixer = { document.getElementById(drosteId).value += extraSteps; const droste0 = document.getElementById('droste0'); const params = new URLSearchParams(droste0.value); - // params.set(selectedStitchId, newStitchValue); + params.set(selectedStitchId, newStitchValue); + params.set("pairStep", document.getElementById('pairStep').value); + params.set("threadStep", document.getElementById('threadStep').value); params.set(drosteId, extraSteps.replaceAll('\n',',').trim()); - // droste0.value = params.toString(); + droste0.value = decodeURIComponent(params.toString()); document.getElementById(drosteId).value += extraSteps; - document.getElementById('selfRef').href = '?'+params.toString(); + document.getElementById('selfRef').href = '?'+droste0.value document.getElementById('selfRef').style.display = 'inline'; } @@ -155,7 +158,6 @@ const GF_droste_mixer = { `); - document.getElementById('tweak').parentNode.style = `width: calc(100% - 7px)` const snow3Gallery = document.getElementById('snow3') for(let [img,basicStitch,droste] of GF_droste_mixer.snow3){ snow3Gallery.insertAdjacentHTML('beforeend', @@ -163,7 +165,8 @@ const GF_droste_mixer = { } const params = new URLSearchParams(q); - document.getElementById('threadStep').value = 1; + document.getElementById('pairStep').value = params.get('pairStep') || 0; + document.getElementById('threadStep').value = params.get('threadStep') || 1; document.getElementById('specs').innerHTML = ` Specs collected from URL and clicks: diff --git a/docs/drostemixer/index.md b/docs/drostemixer/index.md index 75b056454..7c718e98a 100644 --- a/docs/drostemixer/index.md +++ b/docs/drostemixer/index.md @@ -13,7 +13,6 @@ Work in progress ================ TO DO: -* Fix link to updated pattern (and add step nrs) * Toggle between galleries (minimize all but one): [basic stitches](/API/stitch-gallery) and [4/8-pair snow](/GroundForge-help/snow-mix/droste/#48-pair-recipes). Maybe even some basic [pattern](/GroundForge-help/snow-mix/droste/#more-freedom) variations, finally linking to the catalogues (tesselace first). @@ -27,12 +26,11 @@ TO DO: .gf_panel > figcaption {width: 100%; height:2.5em; padding-bottom: 0.2em; padding-left:0.5em; margin-left:0; margin-bottom:0; box-sizing: border-box; display: flex; align-items: center; background-color: #ddd; } .gf_panel > figcaption img {margin-left: 0.5em;} .gf_panel > figcaption > input {margin-left: 0.5em; width: 3em;} - .gf_panel > div > textarea { height: 4.5em; width: 98%} - .gf_panel > div > input { width: 98%} + .gf_panel > div > textarea { height: 4.5em; width: 100%} + .gf_panel > div > input { width: calc(100% - 1px)} #tweak {resize: none;} - #tweak input {margin-left: 2em;} + #tweak input {width: calc(100% - 2em); margin-left: 2em; } #snow3 {resize: vertical;} - #drosteStitches {width: 100%;} \ No newline at end of file diff --git a/test-docs/drostemixer.html b/test-docs/drostemixer.html index e8f084228..289e5ea57 100644 --- a/test-docs/drostemixer.html +++ b/test-docs/drostemixer.html @@ -14,11 +14,10 @@ .gf_panel > figcaption img {margin-left: 0.5em;} .gf_panel > figcaption > input {margin-left: 0.5em; width: 3em;} .gf_panel > div > textarea { height: 6em; width: 100%} - .gf_panel > div > input { width: 100%} + .gf_panel > div > input { width: calc(100% - 1px)} #tweak {resize: none;} - #tweak input {margin-left: 2em;} + #tweak input {width: calc(100% - 2em); margin-left: 2em; } #snow3 {resize: vertical;} - #drosteStitches {width: 100%;} @@ -30,6 +29,7 @@ document.querySelectorAll('img').forEach(img => { img.src = img.src.replace(/.*GroundForge/g, basePath); }); + GF_panel.resetDimensions('specs'); \ No newline at end of file From 30700e7f2919ec03edc6f4abdf512be1bada3633 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Wed, 24 Dec 2025 14:18:27 +0100 Subject: [PATCH 045/221] layout --- docs/drostemixer/droste-mixer.js | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/drostemixer/droste-mixer.js b/docs/drostemixer/droste-mixer.js index 48a22ea28..a7af7a4fc 100644 --- a/docs/drostemixer/droste-mixer.js +++ b/docs/drostemixer/droste-mixer.js @@ -158,6 +158,7 @@ const GF_droste_mixer = { `); + document.getElementById('tweak').parentNode.style = `width: calc(100% - 7px)` const snow3Gallery = document.getElementById('snow3') for(let [img,basicStitch,droste] of GF_droste_mixer.snow3){ snow3Gallery.insertAdjacentHTML('beforeend', From 783c07f1fb6bbe625f3049b2a8cbb163d147e127 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Wed, 24 Dec 2025 14:51:24 +0100 Subject: [PATCH 046/221] layout --- docs/drostemixer/index.md | 2 +- test-docs/drostemixer.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/drostemixer/index.md b/docs/drostemixer/index.md index 7c718e98a..505072ecc 100644 --- a/docs/drostemixer/index.md +++ b/docs/drostemixer/index.md @@ -29,7 +29,7 @@ TO DO: .gf_panel > div > textarea { height: 4.5em; width: 100%} .gf_panel > div > input { width: calc(100% - 1px)} #tweak {resize: none;} - #tweak input {width: calc(100% - 2em); margin-left: 2em; } + #tweak input {width: calc(100% - 2em); margin-left: 2.5px; } #snow3 {resize: vertical;} diff --git a/test-docs/drostemixer.html b/test-docs/drostemixer.html index 289e5ea57..771f3b52d 100644 --- a/test-docs/drostemixer.html +++ b/test-docs/drostemixer.html @@ -16,7 +16,7 @@ .gf_panel > div > textarea { height: 6em; width: 100%} .gf_panel > div > input { width: calc(100% - 1px)} #tweak {resize: none;} - #tweak input {width: calc(100% - 2em); margin-left: 2em; } + #tweak input {width: calc(100% - 2em); margin-left: 2.5em; } #snow3 {resize: vertical;} From 8e1438745e96f04bc7d643453d14d485ba28261f Mon Sep 17 00:00:00 2001 From: jo-pol Date: Wed, 24 Dec 2025 14:54:17 +0100 Subject: [PATCH 047/221] layout --- docs/drostemixer/index.md | 2 +- test-docs/drostemixer.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/drostemixer/index.md b/docs/drostemixer/index.md index 505072ecc..7d7669805 100644 --- a/docs/drostemixer/index.md +++ b/docs/drostemixer/index.md @@ -29,7 +29,7 @@ TO DO: .gf_panel > div > textarea { height: 4.5em; width: 100%} .gf_panel > div > input { width: calc(100% - 1px)} #tweak {resize: none;} - #tweak input {width: calc(100% - 2em); margin-left: 2.5px; } + #tweak input {width: calc(100% - 2.5em); margin-left: 2px; } #snow3 {resize: vertical;} diff --git a/test-docs/drostemixer.html b/test-docs/drostemixer.html index 771f3b52d..f7e8dc018 100644 --- a/test-docs/drostemixer.html +++ b/test-docs/drostemixer.html @@ -16,7 +16,7 @@ .gf_panel > div > textarea { height: 6em; width: 100%} .gf_panel > div > input { width: calc(100% - 1px)} #tweak {resize: none;} - #tweak input {width: calc(100% - 2em); margin-left: 2.5em; } + #tweak input {width: calc(100% - 2.5em); margin-left: 2em; } #snow3 {resize: vertical;} From 96b01e3213f093a7b28e3bf83c4d44943670be31 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Wed, 24 Dec 2025 14:56:31 +0100 Subject: [PATCH 048/221] layout --- docs/drostemixer/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/drostemixer/index.md b/docs/drostemixer/index.md index 7d7669805..fad1efd9c 100644 --- a/docs/drostemixer/index.md +++ b/docs/drostemixer/index.md @@ -29,7 +29,7 @@ TO DO: .gf_panel > div > textarea { height: 4.5em; width: 100%} .gf_panel > div > input { width: calc(100% - 1px)} #tweak {resize: none;} - #tweak input {width: calc(100% - 2.5em); margin-left: 2px; } + #tweak input {width: calc(100% - 2.5em); margin-left: 2em; } #snow3 {resize: vertical;} From 80eaa360c9ed1d3d1dc591f6e6304ee3b6979625 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Thu, 25 Dec 2025 12:05:55 +0100 Subject: [PATCH 049/221] broken link --- docs/drostemixer/index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/drostemixer/index.md b/docs/drostemixer/index.md index fad1efd9c..92830ea1f 100644 --- a/docs/drostemixer/index.md +++ b/docs/drostemixer/index.md @@ -13,9 +13,10 @@ Work in progress ================ TO DO: -* Toggle between galleries (minimize all but one): [basic stitches](/API/stitch-gallery) and [4/8-pair snow](/GroundForge-help/snow-mix/droste/#48-pair-recipes). +* Add galleries for [basic stitches](/GroundForge/API/stitch-gallery) and [4/8-pair snow](/GroundForge-help/snow-mix/droste/#48-pair-recipes). Maybe even some basic [pattern](/GroundForge-help/snow-mix/droste/#more-freedom) variations, finally linking to the catalogues (tesselace first). + Toggle between these galleries (minimize all but one). * Apply to all (apply to ignored only for step-0?), beep on invalid input. * Legend panel (should wrap nicely) * Update sidebar subjects From 1c3665c7fc6c07165990fe97a05f27c121aaed86 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Thu, 25 Dec 2025 18:50:59 +0100 Subject: [PATCH 050/221] moved drostemixer to API/hybrid --- docs/{drostemixer/index.md => API/hybrid.md} | 8 +++---- docs/API/index.md | 22 +++++++++++++++++-- .../droste-mixer.js => js/hybrid.js} | 18 +++++++-------- docs/symmetry.html | 1 - test-docs/{drostemixer.html => hybrid.html} | 4 ++-- 5 files changed, 35 insertions(+), 18 deletions(-) rename docs/{drostemixer/index.md => API/hybrid.md} (81%) rename docs/{drostemixer/droste-mixer.js => js/hybrid.js} (92%) rename test-docs/{drostemixer.html => hybrid.html} (92%) diff --git a/docs/drostemixer/index.md b/docs/API/hybrid.md similarity index 81% rename from docs/drostemixer/index.md rename to docs/API/hybrid.md index 92830ea1f..2b56d3f74 100644 --- a/docs/drostemixer/index.md +++ b/docs/API/hybrid.md @@ -16,8 +16,8 @@ TO DO: * Add galleries for [basic stitches](/GroundForge/API/stitch-gallery) and [4/8-pair snow](/GroundForge-help/snow-mix/droste/#48-pair-recipes). Maybe even some basic [pattern](/GroundForge-help/snow-mix/droste/#more-freedom) variations, finally linking to the catalogues (tesselace first). - Toggle between these galleries (minimize all but one). -* Apply to all (apply to ignored only for step-0?), beep on invalid input. +* Toggle between the galleries (minimize all but the last one opened). +* Apply to all (apply to ignored for step-0?), beep on invalid input (tweak and spinners). * Legend panel (should wrap nicely) * Update sidebar subjects @@ -33,5 +33,5 @@ TO DO: #tweak input {width: calc(100% - 2.5em); margin-left: 2em; } #snow3 {resize: vertical;} - - \ No newline at end of file + + \ No newline at end of file diff --git a/docs/API/index.md b/docs/API/index.md index 0b64f2775..324f8f539 100644 --- a/docs/API/index.md +++ b/docs/API/index.md @@ -15,14 +15,13 @@ title: API * [pair.html](#pairhtml) * [thread.html](#threadhtml) * [Download SVG](#download-svg) -* [Stitch gallery](stitch-gallery) GroundForge is a library to generate tread diagrams from pair diagrams for bobbin lace. Current User Interfaces ======================= -* The former pattern editor is split into +* The former editor (aka the page _tiles_) is split into * [pattern editor](/GroundForge/pattern) * [stitches](/GroundForge/stitches) * [droste](/GroundForge/droste) @@ -30,6 +29,25 @@ Current User Interfaces * [snow mixer](/GroundForge/mix4snow) * [symmetry](/GroundForge/symmetry) +Work in progress +================ + +The next sections describe API's and demonstrators that caused +too much copy-pasting between the current user interfaces. +Some new scripts are started to share code between the user interfaces. + +* [Stitch gallery](stitch-gallery) shares code between _nets_, _stitches_ and _droste_. +* [Panels](API/panels) is started to be resued on several existing pages before developing new pages. + The gallery is not yet felxible enough yet to be used along with the panels. +* [Hybrid](APY/hybrid) was started to test the _panel.js_ code. + It seems to lead to a page that combines functionality of + the pages _stitches_, _droste_ and a variant of the _snow mixer_. + This variant wass inspired when writing + [snow with two droste steps](/GroundForge-help/snow-mix/droste). + By hiding or not generating certain components, the script could be used + to replace the three pages. + + Demonstrators ============= diff --git a/docs/drostemixer/droste-mixer.js b/docs/js/hybrid.js similarity index 92% rename from docs/drostemixer/droste-mixer.js rename to docs/js/hybrid.js index a7af7a4fc..1ac56899c 100644 --- a/docs/drostemixer/droste-mixer.js +++ b/docs/js/hybrid.js @@ -1,4 +1,4 @@ -const GF_droste_mixer = { +const GF_hybrid = { snow3: [ ['123-a', 'rcrcrc','crc,crclctc,ctcrc,rcl,c,c'], ['123-b', 'lclclc','rcl,ctc,crcllc,crrclcr,ctc,cl'], @@ -135,8 +135,8 @@ const GF_droste_mixer = { return `${type}s ` }, load(container) { - const pairWandHref = "javascript:GF_droste_mixer.generateSelectedDiagram('pair');GF_droste_mixer.setStitchEvents()"; - const threadWandHref = "javascript:GF_droste_mixer.generateSelectedDiagram('thread')"; + const pairWandHref = "javascript:GF_hybrid.generateSelectedDiagram('pair');GF_hybrid.setStitchEvents()"; + const threadWandHref = "javascript:GF_hybrid.generateSelectedDiagram('thread')"; let q = new URL(document.documentURI).search.slice(1); if (q === "" || !q.includes('shiftRows')) { q = "patchWidth=7&patchHeight=7&footside=---x,---4,---x,---4&tile=5-,-5,5-,-5&headside=-,c,-,c,&shiftColsSW=0&shiftRowsSW=4&shiftColsSE=2&shiftRowsSE=2&e1=lclc&l2=llctt&f2=rcrc&d2=rrctt&e3=rcrc&l4=llctt&f4=lclc&d4=rrctt&droste2=e12=clcrcl,e13=ct,f42=ctcl,e32=f22=ctcr,e33=f43=lct,e31=f21=lctc,e11=rclcrc,f23=rct,f41=rctc,e10=tc,f20=tcl,e30=f40=tcr" @@ -154,22 +154,22 @@ const GF_droste_mixer = { Flip: - - - + + + `); document.getElementById('tweak').parentNode.style = `width: calc(100% - 7px)` const snow3Gallery = document.getElementById('snow3') - for(let [img,basicStitch,droste] of GF_droste_mixer.snow3){ + for(let [img,basicStitch,droste] of GF_hybrid.snow3){ snow3Gallery.insertAdjacentHTML('beforeend', - `${img} `); + `${img} `); } const params = new URLSearchParams(q); document.getElementById('pairStep').value = params.get('pairStep') || 0; document.getElementById('threadStep').value = params.get('threadStep') || 1; document.getElementById('specs').innerHTML = ` - + Specs collected from URL and clicks: diff --git a/docs/symmetry.html b/docs/symmetry.html index 3d93ecaa5..50fcd46d8 100644 --- a/docs/symmetry.html +++ b/docs/symmetry.html @@ -21,7 +21,6 @@ - diff --git a/test-docs/drostemixer.html b/test-docs/hybrid.html similarity index 92% rename from test-docs/drostemixer.html rename to test-docs/hybrid.html index f7e8dc018..705424e86 100644 --- a/test-docs/drostemixer.html +++ b/test-docs/hybrid.html @@ -5,7 +5,7 @@ - + Panel Test - - - - - - -
-
-
- - diff --git a/docs/API/thread.html b/docs/API/thread.html deleted file mode 100644 index 0c0bee767..000000000 --- a/docs/API/thread.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - GF: Thread diagram demonstrator - - - - - - - -
- - diff --git a/docs/images/tiling/index.md b/docs/images/tiling/index.md new file mode 100644 index 000000000..6bc7bb28b --- /dev/null +++ b/docs/images/tiling/index.md @@ -0,0 +1,12 @@ +--- +layout: default +title: tile gallery demo +--- + + \ No newline at end of file diff --git a/docs/patternGallery.md b/docs/patternGallery.md new file mode 100644 index 000000000..e87bde4ae --- /dev/null +++ b/docs/patternGallery.md @@ -0,0 +1,45 @@ +--- +layout: default +title: patterns +javascript: + - GroundForge-opt.js + - panel.js +--- + +Pattern gallery +=============== + + + +
\ No newline at end of file From 4ed751012f31f00ba3bd3294dd1d65163c3a6733 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Mon, 29 Dec 2025 19:47:30 +0100 Subject: [PATCH 072/221] move files --- docs/images/tiling/index.md | 12 ------------ docs/js/hybrid.js | 2 +- docs/{patternGallery.md => tileGallery/index.md} | 4 ++-- docs/{images/tiling => tileGallery}/index.svg | 0 4 files changed, 3 insertions(+), 15 deletions(-) delete mode 100644 docs/images/tiling/index.md rename docs/{patternGallery.md => tileGallery/index.md} (89%) rename docs/{images/tiling => tileGallery}/index.svg (100%) diff --git a/docs/images/tiling/index.md b/docs/images/tiling/index.md deleted file mode 100644 index 6bc7bb28b..000000000 --- a/docs/images/tiling/index.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -layout: default -title: tile gallery demo ---- - - \ No newline at end of file diff --git a/docs/js/hybrid.js b/docs/js/hybrid.js index 32acc5013..b637f89af 100644 --- a/docs/js/hybrid.js +++ b/docs/js/hybrid.js @@ -181,7 +181,7 @@ const GF_hybrid = { `); document.getElementById('tweak').parentNode.style = `width: calc(100% - 7px)`; - const svgFile = `${this.content_home}/images/tiling/index.svg`; + const svgFile = `${this.content_home}/tileGallery/index.svg`; fetch(svgFile) .then(response => { return response.text(); diff --git a/docs/patternGallery.md b/docs/tileGallery/index.md similarity index 89% rename from docs/patternGallery.md rename to docs/tileGallery/index.md index e87bde4ae..f10ce52ae 100644 --- a/docs/patternGallery.md +++ b/docs/tileGallery/index.md @@ -25,8 +25,8 @@ Pattern gallery function setPattern(q){ GF_panel.diagramSVG({id: 'preview', query: q, type: 'pair', steps: 0}); } -GF_panel.load({caption: "pattern gallery", id: "patterns", controls: ["resize"], size:{width:'300px', height: '150px'}}, document.getElementById('main-content')); -fetch(svgFile) +GF_panel.load({caption: "gallery", id: "patterns", controls: ["resize"], size:{width:'300px', height: '150px'}}, document.getElementById('main-content')); +fetch('index.svg') .then(response => { return response.text(); }) diff --git a/docs/images/tiling/index.svg b/docs/tileGallery/index.svg similarity index 100% rename from docs/images/tiling/index.svg rename to docs/tileGallery/index.svg From 37e96ba4544592d1059bb288ad4e6e41f656eee1 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Mon, 29 Dec 2025 19:53:13 +0100 Subject: [PATCH 073/221] selector --- docs/tileGallery/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/tileGallery/index.md b/docs/tileGallery/index.md index f10ce52ae..800ab47b5 100644 --- a/docs/tileGallery/index.md +++ b/docs/tileGallery/index.md @@ -25,14 +25,14 @@ Pattern gallery function setPattern(q){ GF_panel.diagramSVG({id: 'preview', query: q, type: 'pair', steps: 0}); } -GF_panel.load({caption: "gallery", id: "patterns", controls: ["resize"], size:{width:'300px', height: '150px'}}, document.getElementById('main-content')); +GF_panel.load({caption: "gallery", id: "patterns", controls: ["resize"], size:{width:'450px', height: '150px'}}, document.getElementById('main-content')); fetch('index.svg') .then(response => { return response.text(); }) .then(svg => { document.getElementById('patterns').insertAdjacentHTML('beforeend', svg); - document.querySelectorAll("#pattern > svg a").forEach(el => { + document.querySelectorAll("#patterns > svg a").forEach(el => { const link = (el.getAttribute('xlink:href')); if(link.includes('?')) { el.setAttribute('href', `javascript:setPattern('${link.split('?')[1]}')`); From 5ddf8e2ee3d459ca943deb69970559fce53b1bc2 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Mon, 29 Dec 2025 20:00:13 +0100 Subject: [PATCH 074/221] selector --- docs/tileGallery/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/tileGallery/index.md b/docs/tileGallery/index.md index 800ab47b5..8425df7de 100644 --- a/docs/tileGallery/index.md +++ b/docs/tileGallery/index.md @@ -23,9 +23,9 @@ Pattern gallery + +
\ No newline at end of file diff --git a/docs/tileGallery/tile-gallery.js b/docs/tileGallery/tile-gallery.js new file mode 100644 index 000000000..91a38690d --- /dev/null +++ b/docs/tileGallery/tile-gallery.js @@ -0,0 +1,36 @@ +GF_tiles = { + content_home: '..', + showPreview(clickedElement){ + const previewDiv = document.getElementById('previews'); + previewDiv.innerHTML = ''; + Array.from(clickedElement.parentElement.children) + .filter(el => el.tagName.toLowerCase() === 'a') + .forEach(element => { + const q = element.getAttribute('xlink:href').split('?')[1]; + const panelId = `preview_${(element.textContent)}`; + const caption = `modify: ${element.textContent}`; + GF_panel.load({caption: caption, id: panelId, size:{width:'280px', height: '200px'}}, previewDiv); + GF_panel.diagramSVG({id: panelId, query: q, type: 'pair'},previewDiv); + }) + return false; + }, + load(parent = document.body, jsAction = 'GF_tiles.showPreview(this)') { + GF_panel.load({caption: " ", id: "patterns", controls: ["resize"], size:{width:'480px', height: '300px'}}, parent); + parent.insertAdjacentHTML('beforeend', `
`); + const svg = `${this.content_home}/docs/tileGallery/index.svg`; + fetch(svg) + .then(response => response.text()) + .then(svg => { + document.getElementById('patterns').insertAdjacentHTML('beforeend', svg); + document.querySelectorAll("#patterns > svg a").forEach(el => { + const link = el.getAttribute('xlink:href'); + if(link !== null) { + el.setAttribute('href', link.replace(/.*io.GroundForge/ , '/GroundForge')); + if(link.includes('?')) { + el.setAttribute('onclick', `javascript:${jsAction};return false;`); + } + } + }) + }); + } +}; diff --git a/test-docs/tile-gallery.html b/test-docs/tile-gallery.html new file mode 100644 index 000000000..c1bfe09c1 --- /dev/null +++ b/test-docs/tile-gallery.html @@ -0,0 +1,35 @@ + + + + + + + + + Panel Test + + + + + + + \ No newline at end of file From ef5601fc3a880b68e5f185fd365136a0a99babfe Mon Sep 17 00:00:00 2001 From: jo-pol Date: Tue, 30 Dec 2025 10:28:15 +0100 Subject: [PATCH 079/221] fix not found --- docs/tileGallery/tile-gallery.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/tileGallery/tile-gallery.js b/docs/tileGallery/tile-gallery.js index 91a38690d..de904e765 100644 --- a/docs/tileGallery/tile-gallery.js +++ b/docs/tileGallery/tile-gallery.js @@ -1,5 +1,5 @@ GF_tiles = { - content_home: '..', + content_home: '/GroundForge', showPreview(clickedElement){ const previewDiv = document.getElementById('previews'); previewDiv.innerHTML = ''; @@ -17,7 +17,7 @@ GF_tiles = { load(parent = document.body, jsAction = 'GF_tiles.showPreview(this)') { GF_panel.load({caption: " ", id: "patterns", controls: ["resize"], size:{width:'480px', height: '300px'}}, parent); parent.insertAdjacentHTML('beforeend', `
`); - const svg = `${this.content_home}/docs/tileGallery/index.svg`; + const svg = `${this.content_home}/tileGallery/index.svg`; fetch(svg) .then(response => response.text()) .then(svg => { From 84a2ca0601da717c09ca5c42b93d90167d543203 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Tue, 30 Dec 2025 11:20:36 +0100 Subject: [PATCH 080/221] todo's, fix page for local testing --- docs/tileGallery/index.md | 9 +++++++++ test-docs/tile-gallery.html | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/tileGallery/index.md b/docs/tileGallery/index.md index 85bfe9dc5..fe966a2a1 100644 --- a/docs/tileGallery/index.md +++ b/docs/tileGallery/index.md @@ -9,6 +9,15 @@ javascript: Pattern gallery =============== + +**TODO**: Add more letters, fix a broken footside. +Split gallery in images per square to use full width of a desktop and not use too much width on a mobile device. +Links in last square are intended for another [wip](API/hybrid) page (which is inspired by mixing snow in two droste steps), it should link to this page. +Preview captions link to pattern, add link to stitches, perhaps even the currently wip page. +Sidebar subjects? + +--- + Clicking one letter shows all variants. - + \ No newline at end of file diff --git a/docs/js/hybrid.js b/docs/js/hybrid.js index b637f89af..02c3ef872 100644 --- a/docs/js/hybrid.js +++ b/docs/js/hybrid.js @@ -123,7 +123,8 @@ const GF_hybrid = { const n2 = document.getElementById('basicStitchInput'); n2.value = flip(n2); }, - setPattern(q) { + setPattern(element) { + let q = element.getAttribute('xlink:href').split('?')[1]; document.getElementById('pairStep').value = 0; document.getElementById('threadStep').value = 0; document.getElementById('droste0').value = q; @@ -162,13 +163,13 @@ const GF_hybrid = { if (q === "" || !q.includes('shiftRows')) { q = "patchWidth=7&patchHeight=7&footside=---x,---4,---x,---4&tile=5-,-5,5-,-5&headside=-,c,-,c,&shiftColsSW=0&shiftRowsSW=4&shiftColsSE=2&shiftRowsSE=2&e1=lclc&l2=llctt&f2=rcrc&d2=rrctt&e3=rcrc&l4=llctt&f4=lclc&d4=rrctt&droste2=e12=clcrcl,e13=ct,f42=ctcl,e32=f22=ctcr,e33=f43=lct,e31=f21=lctc,e11=rclcrc,f23=rct,f41=rctc,e10=tc,f20=tcl,e30=f40=tcr" } - GF_panel.load({caption: "Initialize (w.i.p.)", id: "pattern", controls: ["resize"], size:{width:'300px', height: '150px'}}, container); + GF_panel.load({caption: "Initialize (w.i.p.)", id: "pattern", controls: ["resize"], size:{width:'310px', height: '150px'}}, container); GF_panel.load({caption: "select (3/6-pair)", id: "snow3", controls: ["resize"], size:{width:'98%', height: '50px'}}, container); GF_panel.load({caption: "tweak selected", id: "tweak", size:{width:'´98%', height: 'auto'}}, container); container.insertAdjacentHTML('beforeend',`

`); GF_panel.load({caption: this.twister("pair"), id: "pair_panel", wandHref: pairWandHref, controls: ["resize"]}, container); GF_panel.load({caption: this.twister("thread"), id: "thread_panel", wandHref: threadWandHref, controls: ["resize", "color"]}, container); - GF_panel.load({caption: "advanced", id: "specs", controls: ["resize"]}, container); + GF_panel.load({caption: "specifications", id: "specs", controls: ["resize"]}, container); document.getElementById('tweak').insertAdjacentHTML('beforeend',` @@ -180,37 +181,14 @@ const GF_hybrid = { `); - document.getElementById('tweak').parentNode.style = `width: calc(100% - 7px)`; - const svgFile = `${this.content_home}/tileGallery/index.svg`; - fetch(svgFile) - .then(response => { - return response.text(); - }) - .then(svg => { - document.getElementById('pattern').insertAdjacentHTML('beforeend', svg); - document.querySelectorAll("#pattern > svg a").forEach(el => { - const link = (el.getAttribute('xlink:href')); - if(link.includes('?')) { - el.setAttribute('href', `javascript:GF_hybrid.setPattern('${link.split('?')[1]}')`); - } else { - el.setAttribute('href', link.replace(/.*io.GroundForge/ , '/GroundForge')); - } - }) - const svgEl = document.querySelector('#pattern > svg'); - const units = svgEl.getAttribute('width').replace(/[0-9]/g, ''); - const w = svgEl.getAttribute('width').replace(/[^0-9]/g, ''); - const h = svgEl.getAttribute('height').replace(/[^0-9]/g, ''); - // scale by changing page dimensions - svgEl.setAttribute('width', (w*0.65)+units); - svgEl.setAttribute('height', (h*0.65)+units) - }); + GF_tiles.loadSvg('GF_hybrid.setPattern(this);return false;', 'pattern'); const snow3Gallery = document.getElementById('snow3') for(let [img,basicStitch,droste] of GF_hybrid.snow3){ snow3Gallery.insertAdjacentHTML('beforeend', `${img} `); - } const params = new URLSearchParams(q); + document.getElementById('tweak').parentNode.style = `width: calc(100% - 7px)`; document.getElementById('pairStep').value = params.get('pairStep') || 0; document.getElementById('threadStep').value = params.get('threadStep') || 1; document.getElementById('specs').innerHTML = ` diff --git a/docs/tileGallery/tile-gallery.js b/docs/tileGallery/tile-gallery.js index de904e765..d02289b22 100644 --- a/docs/tileGallery/tile-gallery.js +++ b/docs/tileGallery/tile-gallery.js @@ -1,6 +1,6 @@ GF_tiles = { content_home: '/GroundForge', - showPreview(clickedElement){ + showPreviews(clickedElement){ const previewDiv = document.getElementById('previews'); previewDiv.innerHTML = ''; Array.from(clickedElement.parentElement.children) @@ -14,23 +14,33 @@ GF_tiles = { }) return false; }, - load(parent = document.body, jsAction = 'GF_tiles.showPreview(this)') { - GF_panel.load({caption: " ", id: "patterns", controls: ["resize"], size:{width:'480px', height: '300px'}}, parent); + load(parent = document.body, jsAction) { + GF_panel.load({caption: " ", id: "patterns", controls: ["resize"], size:{width:'310px', height: '300px'}}, parent); parent.insertAdjacentHTML('beforeend', `
`); + this.loadSvg(jsAction); + }, + loadSvg(jsAction = 'GF_tiles.showPreviews(this)', containerId = 'patterns') { const svg = `${this.content_home}/tileGallery/index.svg`; fetch(svg) .then(response => response.text()) .then(svg => { - document.getElementById('patterns').insertAdjacentHTML('beforeend', svg); - document.querySelectorAll("#patterns > svg a").forEach(el => { + document.getElementById(containerId).insertAdjacentHTML('beforeend', svg); + document.querySelectorAll(`#${containerId} > svg a`).forEach(el => { const link = el.getAttribute('xlink:href'); - if(link !== null) { - el.setAttribute('href', link.replace(/.*io.GroundForge/ , '/GroundForge')); - if(link.includes('?')) { + if (link !== null) { + el.setAttribute('href', link.replace(/.*io.GroundForge/, '/GroundForge')); + if (link.includes('?')) { el.setAttribute('onclick', `javascript:${jsAction};return false;`); } } }) + const svgEl = document.querySelector(`#${containerId} > svg`); + const units = svgEl.getAttribute('width').replace(/[0-9]/g, ''); + const w = svgEl.getAttribute('width').replace(/[^0-9]/g, ''); + const h = svgEl.getAttribute('height').replace(/[^0-9]/g, ''); + // scale by changing page dimensions + svgEl.setAttribute('width', (w*0.65)+units); + svgEl.setAttribute('height', (h*0.65)+units) }); } }; diff --git a/test-docs/hybrid.html b/test-docs/hybrid.html index 1788c7dc8..cb6e4c0e7 100644 --- a/test-docs/hybrid.html +++ b/test-docs/hybrid.html @@ -6,6 +6,7 @@ + Panel Test \ No newline at end of file diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index a74c7f4fa..903c73e65 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -13,6 +13,11 @@ + {% if page.css %} + {% for css in page.css %} + + {% endfor %} + {% endif %} {% if page.javascript %} {% for javascript in page.javascript %} diff --git a/docs/css/hybrid.css b/docs/css/hybrid.css new file mode 100644 index 000000000..26e550a62 --- /dev/null +++ b/docs/css/hybrid.css @@ -0,0 +1,10 @@ +.gf_panel {display: inline-block; margin: 4px;} +.gf_panel > div {width: 100%; overflow: auto; resize:both; border: #ddd solid 1px; } +.gf_panel > figcaption {width: 100%; height:2.5em; padding-bottom: 0.2em; padding-left:0.5em; margin-left:0; margin-bottom:0; box-sizing: border-box; display: flex; align-items: center; background-color: #ddd; } +.gf_panel > figcaption img {margin-left: 0.5em;} +.gf_panel > figcaption > input {margin-left: 0.5em; width: 3em;} +.gf_panel > div > textarea { height: 6em; width: 100%} +.gf_panel > div > input { width: calc(100% - 1px)} +#tweak {resize: none;} +#tweak input {width: calc(100% - 2.5em); margin-left: 2em; } +#snow3 {resize: vertical;} diff --git a/docs/images/under-construction.png b/docs/images/under-construction.png deleted file mode 100644 index 08bee18448ab8efa388a8e15840c07053ae0811f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 772 zcmV+f1N;1mP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!~g&e!~vBn4jTXf02y>eSaefwW^{L9 za%BKPWN%_+AW3auXJt}lVPtu6$z?nM00MMLL_t(IPlZ%XOR7;29<@R+BSTz?CT&83 z0{=k-f(zGvAm|?mTna*4QHVBeTopu%mO{H0x^N+gf`ToCNDyfuxd^2XYwpZ*d*$tN zs|OC}%$a#-p7WeJujS+8gUJNuzox}v!Fn(lP#_S%p4s;;BnWtafB#%DYZ1li=_xxL z4$fpU{QCNe7<1hJV3mQ&R;!gH5j{OU(PT2AmzNjn^?Ed&PU-6Eik_dJe`fXxt0qz0 z-`~^j?k;(~Ud%f?J0z?q8jVt+P#~w%iGsf-ozLf>dT?;S>+9=$d3niudwVJt`~CjK z5p_1C_zBSP?CcB)Zf|dSI2^LDVUYlPwOWm}=-b;H68@GH8cHy&t*ueF+ogCs4jt8A zU0tP{n;Yn>ab~D(?0xYWM{2j*IHGKU-NnTPXR}!j27~bbd&6e7=CxHtR`EqQ%H?uk zCQfQJ8tA`%zfTVj57?9V#W34nE=sGaKC09C`8h`-5e#wh($W%UWvkFw?MH)+Lif}* zhE`exU0+`#LA_q*YPHIno11L6+gaL(kB*LbHk*B>Vb16CTq>2YHZDxDV5mqYlh98t z2X-ozVvonecXxN3PNz8(3UQ@U;p5|D6xME#{sl`tAs8CT%H=YGip3&q4M-#s>~guV zRy3PU-rn9u+{(%d=2$ESpXSlTIC87i0<&;945vzVw$Y+M+))eE8zh7&XuU0000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + A - - - B - - - C - - - - - - - - - A - - - - - A - - - - - A + + + A - - - - - B + + + A - - - - - - - - - - - - - - - - - - - - - - - - + y="153.90761">C + + + + + + + + id="a25181" + xlink:href="https://d-bl.github.io/GroundForge/pattern.html?patchWidth=7&patchHeight=8&footside=----,---b,&tile=5-5,-5-,5-5&headside=-,c,&shiftColsSW=-4&shiftRowsSW=2&shiftColsSE=3&shiftRowsSE=1&e1=crcc&e1=crcl&g1=clcc&e3=ctc&g3=ccrc&f2=cclc&f3=crcl" + transform="matrix(2,0,0,2,70.184608,-147.55551)"> Tesselace + y="153.90761">A + + + id="a1439" + xlink:href="https://d-bl.github.io/GroundForge/pattern.html?patchWidth=6&patchHeight=6&footside=----,---b,&tile=1,8&headside=c,-,&shiftColsSW=0&shiftRowsSW=2&shiftColsSE=1&shiftRowsSE=2&k1=ctctt&e1=ct&e2=ctct&d2=ctctt" + transform="matrix(2,0,0,2,-14.482062,-189.89094)"> MAE + y="153.90761">A - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + id="a1445" + xlink:href="https://d-bl.github.io/GroundForge/pattern.html?patchWidth=6&patchHeight=6&footside=----,---b,&tile=11,88&headside=c,-,&shiftColsSW=-1&shiftRowsSW=2&shiftColsSE=1&shiftRowsSE=2&k1=ctctt&f1=ctc&e1=ct&f2=ctc&e2=ctc&d2=ctctt" + transform="matrix(2,0,0,2,27.851272,-189.89094)"> See also: + x="24.575508" + y="153.90761" + id="text1443">A - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + A - - - - - A + + + + + + + + + + + + + + + + + + + + + + + + + + Tesselace + + + MAE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See also: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A - - - A + + + + + B - - - A + + + C - - - - - - - - - - - - - - - - - - - - - - - - + y="153.90761">B + + id="a5479" + xlink:href="https://d-bl.github.io/GroundForge/pattern.html?patchWidth=7&patchHeight=8&footside=---b,----&tile=-5,5-&headside=c,-&shiftColsSW=-3&shiftRowsSW=1&shiftColsSE=1&shiftRowsSE=1&l1=ctctt&f1=clcrclc&d1=ctctt&e2=ctc" + transform="matrix(2,0,0,2,-3.3695627,-105.22215)"> D.I.Y. + y="153.90761">C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + D.I.Y. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test-docs/hybrid.html b/test-docs/hybrid.html index 6a7ccfd55..b8f1086c9 100644 --- a/test-docs/hybrid.html +++ b/test-docs/hybrid.html @@ -7,19 +7,8 @@ + Panel Test - - - - - diff --git a/docs/stitches.md b/docs/stitches.md new file mode 100644 index 000000000..4de4780ef --- /dev/null +++ b/docs/stitches.md @@ -0,0 +1,28 @@ +--- +layout: default +title: Stitches and threads +javascript: +- d3.v4.min.js +- GroundForge-opt.js +- nudgePairs.js +- panel.js +- hybrid.js +css: +- hybrid.css +--- + +Stitches and threads +================ + + \ No newline at end of file From c6b43d350568ec9a5bdda436cd2b8249db414cc0 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Sat, 10 Jan 2026 16:31:32 +0100 Subject: [PATCH 119/221] debug: stitches page in new style --- docs/stitches.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/stitches.md b/docs/stitches.md index 4de4780ef..0e2ec742a 100644 --- a/docs/stitches.md +++ b/docs/stitches.md @@ -15,6 +15,7 @@ Stitches and threads ================ \ No newline at end of file From 167fdcc76c43686b9638f5293c5ff9565925847a Mon Sep 17 00:00:00 2001 From: jo-pol Date: Sat, 10 Jan 2026 16:44:23 +0100 Subject: [PATCH 122/221] syntax: stitches page in new style --- docs/stitches.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/stitches.md b/docs/stitches.md index 6abe76032..545b1f1f7 100644 --- a/docs/stitches.md +++ b/docs/stitches.md @@ -21,10 +21,10 @@ Stitches and threads GF_hybrid.snow4 = []; // clear for performance GF_hybrid.load(document.getElementById('main-content')); for (let id of ['pairStep', 'threadStep']) { - document.getElementsById(id).value = 0; + document.getElementById(id).value = 0; } for (let id of ['specs', 'pattern', 'snow3', 'snow4', 'drosteStitches', 'pairStep', 'threadStep']) { - document.getElementsById(id).parentNode.style.display = 'none'; + document.getElementById(id).parentNode.style.display = 'none'; } document.getElementsById('stitches').parentNode.getElementsByTagName('selecti').outerHTML = 'stitches'; \ No newline at end of file From 7e920dcae5b3e76df99963c7c0db52aef67ab7d4 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Sat, 10 Jan 2026 16:50:28 +0100 Subject: [PATCH 123/221] syntax: stitches page in new style --- docs/stitches.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/stitches.md b/docs/stitches.md index 545b1f1f7..5d7c39c3f 100644 --- a/docs/stitches.md +++ b/docs/stitches.md @@ -26,5 +26,5 @@ Stitches and threads for (let id of ['specs', 'pattern', 'snow3', 'snow4', 'drosteStitches', 'pairStep', 'threadStep']) { document.getElementById(id).parentNode.style.display = 'none'; } - document.getElementsById('stitches').parentNode.getElementsByTagName('selecti').outerHTML = 'stitches'; + document.getElementById('stitches').parentNode.getElementsByTagName('select').outerHTML = 'stitches'; \ No newline at end of file From 189ccf56940e9ccc9cc8c1f8fd80a0f181b8e1c7 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Sat, 10 Jan 2026 16:56:25 +0100 Subject: [PATCH 124/221] logic: stitches page in new style --- docs/stitches.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/stitches.md b/docs/stitches.md index 5d7c39c3f..1c7aedbc7 100644 --- a/docs/stitches.md +++ b/docs/stitches.md @@ -15,7 +15,6 @@ Stitches and threads ================ \ No newline at end of file From 806443791f18019a6bab24d1bd0ebcfd1f9573a3 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Sat, 10 Jan 2026 17:07:36 +0100 Subject: [PATCH 125/221] logic: stitches page in new style --- docs/stitches.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/stitches.md b/docs/stitches.md index 1c7aedbc7..f345a5a59 100644 --- a/docs/stitches.md +++ b/docs/stitches.md @@ -22,8 +22,10 @@ Stitches and threads for (let id of ['pairStep', 'threadStep']) { document.getElementById(id).value = 0; } - for (let id of ['specs', 'pattern', 'snow3', 'snow4', 'drosteStitches', 'pairStep', 'threadStep']) { + for (let id of ['specs', 'drosteStitches', 'pairStep', 'threadStep']) { document.getElementById(id).parentNode.style.display = 'none'; } + document.getElementById('stitches').style.display = 'block'; document.getElementById('stitches').parentNode.getElementsByTagName('select')[0].outerHTML = 'stitches'; + console.log('================ Loaded hybrid panels ================'); \ No newline at end of file From 5059f56ce606455a1e44364bee51ee6b84ac63ee Mon Sep 17 00:00:00 2001 From: jo-pol Date: Sat, 10 Jan 2026 17:11:57 +0100 Subject: [PATCH 126/221] logic: stitches page in new style --- docs/stitches.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/stitches.md b/docs/stitches.md index f345a5a59..39537a85e 100644 --- a/docs/stitches.md +++ b/docs/stitches.md @@ -22,10 +22,10 @@ Stitches and threads for (let id of ['pairStep', 'threadStep']) { document.getElementById(id).value = 0; } - for (let id of ['specs', 'drosteStitches', 'pairStep', 'threadStep']) { + for (let id of ['specs', 'drosteStitches', 'pairStep', 'threadStep', 'snow3']) { document.getElementById(id).parentNode.style.display = 'none'; } - document.getElementById('stitches').style.display = 'block'; + document.getElementById('stitches').parentNode.style.display = 'block'; document.getElementById('stitches').parentNode.getElementsByTagName('select')[0].outerHTML = 'stitches'; console.log('================ Loaded hybrid panels ================'); \ No newline at end of file From 46359fd0b6ba08ecec8c3857af65b86a36f531d8 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Sat, 10 Jan 2026 17:15:47 +0100 Subject: [PATCH 127/221] logic: stitches page in new style --- docs/stitches.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/stitches.md b/docs/stitches.md index 39537a85e..339a9fdea 100644 --- a/docs/stitches.md +++ b/docs/stitches.md @@ -11,10 +11,8 @@ css: - hybrid.css --- -Stitches and threads -================ - \ No newline at end of file From 1c0c1107241694d6caa175b050103d940d717ac0 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Sun, 11 Jan 2026 15:07:36 +0100 Subject: [PATCH 133/221] labels and width --- docs/stitches.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/stitches.md b/docs/stitches.md index 429fb5f60..23af1eb8d 100644 --- a/docs/stitches.md +++ b/docs/stitches.md @@ -24,11 +24,9 @@ sidebar: stitches for (let id of ['specs', 'drosteStitches', 'pairStep', 'threadStep', 'snow3']) { document.getElementById(id).parentNode.style.display = 'none'; } - document.getElementById('stitches').style.width = 'auto'; + document.getElementById('basicStitchInput').parentNode.textContent = ''; const stitchesEl = document.getElementById('stitches').parentNode; stitchesEl.style.display = 'block'; - stitchesEl.style.width = 'auto'; - stitchesEl.textContent = ''; stitchesEl.getElementsByTagName('select')[0].outerHTML = 'stitches'; console.log('================ Loaded hybrid panels ================'); \ No newline at end of file From 385b216d18b357e1ff29ef70752b7ddb3e176636 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Sun, 11 Jan 2026 15:31:15 +0100 Subject: [PATCH 134/221] labels --- docs/stitches.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/stitches.md b/docs/stitches.md index 23af1eb8d..99f10380a 100644 --- a/docs/stitches.md +++ b/docs/stitches.md @@ -24,9 +24,9 @@ sidebar: stitches for (let id of ['specs', 'drosteStitches', 'pairStep', 'threadStep', 'snow3']) { document.getElementById(id).parentNode.style.display = 'none'; } - document.getElementById('basicStitchInput').parentNode.textContent = ''; + document.getElementById('basicStitchInput').previousSibling.remove(); // remove label const stitchesEl = document.getElementById('stitches').parentNode; - stitchesEl.style.display = 'block'; - stitchesEl.getElementsByTagName('select')[0].outerHTML = 'stitches'; + stitchesEl.style.display = 'block'; // make visible, whichever gallery is visible by default + stitchesEl.getElementsByTagName('select')[0].outerHTML = 'stitches'; // no choice for other galleries console.log('================ Loaded hybrid panels ================'); \ No newline at end of file From fb46a6a7ecbf5e4ba89f4cec0adab33ff8477aeb Mon Sep 17 00:00:00 2001 From: jo-pol Date: Sun, 11 Jan 2026 16:24:23 +0100 Subject: [PATCH 135/221] print style --- docs/stitches.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/stitches.md b/docs/stitches.md index 99f10380a..6116ce0da 100644 --- a/docs/stitches.md +++ b/docs/stitches.md @@ -9,6 +9,7 @@ javascript: - hybrid.js css: - hybrid.css +- print.css sidebar: stitches --- From 6b4171b9d09f211d274aed7a73225fb86bbc3c12 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Sun, 11 Jan 2026 16:41:50 +0100 Subject: [PATCH 136/221] wip --- docs/stitches.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/stitches.md b/docs/stitches.md index 6116ce0da..a12e7c1f8 100644 --- a/docs/stitches.md +++ b/docs/stitches.md @@ -25,7 +25,6 @@ sidebar: stitches for (let id of ['specs', 'drosteStitches', 'pairStep', 'threadStep', 'snow3']) { document.getElementById(id).parentNode.style.display = 'none'; } - document.getElementById('basicStitchInput').previousSibling.remove(); // remove label const stitchesEl = document.getElementById('stitches').parentNode; stitchesEl.style.display = 'block'; // make visible, whichever gallery is visible by default stitchesEl.getElementsByTagName('select')[0].outerHTML = 'stitches'; // no choice for other galleries From b92d214b60fe03265c35858cfee5f15cd260e661 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Sun, 11 Jan 2026 16:58:36 +0100 Subject: [PATCH 137/221] wip --- docs/assets/css/hybrid.css | 6 ++++++ docs/stitches.md | 1 + 2 files changed, 7 insertions(+) diff --git a/docs/assets/css/hybrid.css b/docs/assets/css/hybrid.css index aac80bef8..918359fde 100644 --- a/docs/assets/css/hybrid.css +++ b/docs/assets/css/hybrid.css @@ -21,3 +21,9 @@ #main-content > ul, #main-content > ol, #main-content > p, #main-content > h1, #main-content > h2, #main-content > h3, #main-content > h4, #main-content > pre, #main-content > blockquote, #main-content > hr, #main-content > table, #main-content > .deprecated { max-width: 690px; } + +@media print { + form, header, figcaption { display: none } + #to_self { display: block } +} + diff --git a/docs/stitches.md b/docs/stitches.md index a12e7c1f8..6116ce0da 100644 --- a/docs/stitches.md +++ b/docs/stitches.md @@ -25,6 +25,7 @@ sidebar: stitches for (let id of ['specs', 'drosteStitches', 'pairStep', 'threadStep', 'snow3']) { document.getElementById(id).parentNode.style.display = 'none'; } + document.getElementById('basicStitchInput').previousSibling.remove(); // remove label const stitchesEl = document.getElementById('stitches').parentNode; stitchesEl.style.display = 'block'; // make visible, whichever gallery is visible by default stitchesEl.getElementsByTagName('select')[0].outerHTML = 'stitches'; // no choice for other galleries From c92be576697fc03c9364b3a07bba6e5253bf6440 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Sun, 11 Jan 2026 16:59:47 +0100 Subject: [PATCH 138/221] wip --- docs/stitches.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/stitches.md b/docs/stitches.md index 6116ce0da..99f10380a 100644 --- a/docs/stitches.md +++ b/docs/stitches.md @@ -9,7 +9,6 @@ javascript: - hybrid.js css: - hybrid.css -- print.css sidebar: stitches --- From eb2fa9fb2cbeca015c5f12812eab2e39b8dd6b37 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Sun, 11 Jan 2026 17:25:06 +0100 Subject: [PATCH 139/221] print clutter --- docs/assets/css/hybrid.css | 3 +-- docs/assets/css/print.css | 11 ----------- 2 files changed, 1 insertion(+), 13 deletions(-) delete mode 100644 docs/assets/css/print.css diff --git a/docs/assets/css/hybrid.css b/docs/assets/css/hybrid.css index 918359fde..c49ec0d62 100644 --- a/docs/assets/css/hybrid.css +++ b/docs/assets/css/hybrid.css @@ -23,7 +23,6 @@ } @media print { - form, header, figcaption { display: none } - #to_self { display: block } + .gf_panel > a, .gf_panel > input[type="color"] { display: none } } diff --git a/docs/assets/css/print.css b/docs/assets/css/print.css deleted file mode 100644 index effd2eaf7..000000000 --- a/docs/assets/css/print.css +++ /dev/null @@ -1,11 +0,0 @@ -main div { - display: inline-block; overflow: hidden; resize: both; - width: 300px; height: 300px; - vertical-align: text-top; - border: solid 1px #DDD; - margin-top: 3px; -} -#whiting {display: none; } -input { display: none } -#threadColor, form { display: inline-block } -form { vertical-align: text-top } From 3b6dc05bf6f7dd5e5e17fc9aba753120c52aa894 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Sun, 11 Jan 2026 18:47:58 +0100 Subject: [PATCH 140/221] wip --- docs/assets/css/hybrid.css | 1 + docs/stitches.md | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/assets/css/hybrid.css b/docs/assets/css/hybrid.css index c49ec0d62..bf3cede8a 100644 --- a/docs/assets/css/hybrid.css +++ b/docs/assets/css/hybrid.css @@ -24,5 +24,6 @@ @media print { .gf_panel > a, .gf_panel > input[type="color"] { display: none } + .gf_pael > div { overflow: hidden; } } diff --git a/docs/stitches.md b/docs/stitches.md index 99f10380a..56874872d 100644 --- a/docs/stitches.md +++ b/docs/stitches.md @@ -21,9 +21,12 @@ sidebar: stitches for (let id of ['pairStep', 'threadStep']) { document.getElementById(id).value = 0; } - for (let id of ['specs', 'drosteStitches', 'pairStep', 'threadStep', 'snow3']) { + for (let id of ['pairStep', 'threadStep']) { document.getElementById(id).parentNode.style.display = 'none'; } + for (let id of ['specs', 'drosteStitches', 'snow3']) { + document.getElementById(id).parentNode.remove(); + } document.getElementById('basicStitchInput').previousSibling.remove(); // remove label const stitchesEl = document.getElementById('stitches').parentNode; stitchesEl.style.display = 'block'; // make visible, whichever gallery is visible by default From 60c721753afd1711c6b3a6193d4886e3f700649f Mon Sep 17 00:00:00 2001 From: jo-pol Date: Sun, 11 Jan 2026 18:50:34 +0100 Subject: [PATCH 141/221] wip --- docs/stitches.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/stitches.md b/docs/stitches.md index 56874872d..99f10380a 100644 --- a/docs/stitches.md +++ b/docs/stitches.md @@ -21,12 +21,9 @@ sidebar: stitches for (let id of ['pairStep', 'threadStep']) { document.getElementById(id).value = 0; } - for (let id of ['pairStep', 'threadStep']) { + for (let id of ['specs', 'drosteStitches', 'pairStep', 'threadStep', 'snow3']) { document.getElementById(id).parentNode.style.display = 'none'; } - for (let id of ['specs', 'drosteStitches', 'snow3']) { - document.getElementById(id).parentNode.remove(); - } document.getElementById('basicStitchInput').previousSibling.remove(); // remove label const stitchesEl = document.getElementById('stitches').parentNode; stitchesEl.style.display = 'block'; // make visible, whichever gallery is visible by default From cdbc2efe9a99a897cf418f245329bfb94380996c Mon Sep 17 00:00:00 2001 From: jo-pol Date: Sun, 11 Jan 2026 19:43:41 +0100 Subject: [PATCH 142/221] wip --- docs/assets/css/hybrid.css | 9 ++++++++- docs/stitches.md | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/assets/css/hybrid.css b/docs/assets/css/hybrid.css index bf3cede8a..d56f3278e 100644 --- a/docs/assets/css/hybrid.css +++ b/docs/assets/css/hybrid.css @@ -24,6 +24,13 @@ @media print { .gf_panel > a, .gf_panel > input[type="color"] { display: none } - .gf_pael > div { overflow: hidden; } + .gf_panel > div { overflow: hidden; } + .gf_panel > figcaption { outline: 2px solid #ddd;} + .gf_panel:not(.hidden):not([style*="display: none"]) { + display: inline-block !important; + break-inside: avoid; + page-break-inside: avoid; + vertical-align: top; + } } diff --git a/docs/stitches.md b/docs/stitches.md index 99f10380a..16b7fbea7 100644 --- a/docs/stitches.md +++ b/docs/stitches.md @@ -27,6 +27,6 @@ sidebar: stitches document.getElementById('basicStitchInput').previousSibling.remove(); // remove label const stitchesEl = document.getElementById('stitches').parentNode; stitchesEl.style.display = 'block'; // make visible, whichever gallery is visible by default - stitchesEl.getElementsByTagName('select')[0].outerHTML = 'stitches'; // no choice for other galleries + stitchesEl.getElementsByTagName('select')[0].outerHTML = 'stitch gallery'; // no choice for other galleries console.log('================ Loaded hybrid panels ================'); \ No newline at end of file From bc7ae758af426c9968bada3bab4bcd93e5131ee0 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Sat, 17 Jan 2026 11:46:41 +0100 Subject: [PATCH 143/221] moved help item to soundless video's --- docs/pattern.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pattern.html b/docs/pattern.html index 1aafd91ca..646596e63 100644 --- a/docs/pattern.html +++ b/docs/pattern.html @@ -41,13 +41,13 @@

GroundForge: Assemble a pair diagram

  • Half minute soundless screen recordings From f8cee86b9e5e522953e229c843ce06201d9a4904 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Sat, 17 Jan 2026 12:02:21 +0100 Subject: [PATCH 144/221] wip --- docs/API/stitch-gallery.md | 2 +- docs/stitches.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/API/stitch-gallery.md b/docs/API/stitch-gallery.md index 174f3ca3b..518d75a4c 100644 --- a/docs/API/stitch-gallery.md +++ b/docs/API/stitch-gallery.md @@ -22,7 +22,7 @@ Widget demo ----------- diff --git a/docs/stitches.md b/docs/stitches.md index 16b7fbea7..31cccd34f 100644 --- a/docs/stitches.md +++ b/docs/stitches.md @@ -27,6 +27,6 @@ sidebar: stitches document.getElementById('basicStitchInput').previousSibling.remove(); // remove label const stitchesEl = document.getElementById('stitches').parentNode; stitchesEl.style.display = 'block'; // make visible, whichever gallery is visible by default - stitchesEl.getElementsByTagName('select')[0].outerHTML = 'stitch gallery'; // no choice for other galleries + stitchesEl.getElementsByTagName('select')[0].outerHTML = 'select stitch example'; // no choice for other galleries console.log('================ Loaded hybrid panels ================'); \ No newline at end of file From a972e7d5c2ae16f12c2daeb5b213c008001da97e Mon Sep 17 00:00:00 2001 From: jo-pol Date: Wed, 21 Jan 2026 13:28:14 +0100 Subject: [PATCH 145/221] droste same style as stitches --- docs/API/index.md | 2 +- docs/_includes/Sidebar-droste.md | 15 +++ docs/droste.html | 183 ------------------------------- docs/droste.md | 40 +++++++ docs/js/stitches.js | 135 ----------------------- 5 files changed, 56 insertions(+), 319 deletions(-) create mode 100644 docs/_includes/Sidebar-droste.md delete mode 100644 docs/droste.html create mode 100644 docs/droste.md delete mode 100644 docs/js/stitches.js diff --git a/docs/API/index.md b/docs/API/index.md index c50f6592e..b96f3a59f 100644 --- a/docs/API/index.md +++ b/docs/API/index.md @@ -134,7 +134,7 @@ The query mimics what would be sent to a server when submitting the form. Many fields of the form are hidden to the user. To avoid outdated documentation: look for the usage of `TilesConfig.queryFields`. -* Droste patterns use additional parameters in the load function of `droste.js`. +* Droste patterns use additional parameters * `API/proto.html` uses only some of the `queryFields`. * `API/sheet.html` does not use a query at all. diff --git a/docs/_includes/Sidebar-droste.md b/docs/_includes/Sidebar-droste.md new file mode 100644 index 000000000..d6f426d51 --- /dev/null +++ b/docs/_includes/Sidebar-droste.md @@ -0,0 +1,15 @@ +- Features on this page + - [Icons](/GroundForge-help/Icons) + - [Droste effect](/GroundForge-help/Droste-effect) + - [Color code](/GroundForge-help/color-rules) + - [Download](/GroundForge-help/Download) +- Half minute captures + - [Flip and rotate stitches](/GroundForge-help/clips/flip) + - [Colors in thread diagrams](/GroundForge-help/clips/color) + - [Resize panels](/GroundForge-help/clips/resize) + - [Print as PDF](/GroundForge-help/clips/print-as-pdf) +- Pattern galleries + - [Basic](tileGallery) + - [Tesselace](/tesselace-to-gf "computer generated pair diagrams") + - [MAE](/MAE-gf "More Attractive Examples (community contributions)") + - [Sampler by G. Whiting](/gw-lace-to-gf "donated to the MET") diff --git a/docs/droste.html b/docs/droste.html deleted file mode 100644 index 2f65aad80..000000000 --- a/docs/droste.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - GF: Pair diagrams from thread diagrams - - - - - - - - - - - - - - - - - - - - - - -
    -
    -

    Diagrams for Bobbin Lace

    -

    GroundForge: Pair diagrams from thread diagrams

    -
    -
    -
    - - Stitches and threads -
    - show/hide help links - - -

    - Back to the initial pair diagram. -

    -

    - - - -

    - -

    Out of sync diagrams/stitches become grey/black, use the wand to refresh.

    -
    -

    First step

    -
    -
    - Stitches - - max - default - min -
    - -
    -
    -
    - Pairs - wand - nudge - - max - default - min -
    -
    -
    -
    -
    - Threads - wand - nudge - - - max - reset - min -
    -
    -
    -

    Second step

    -
    -
    - Stitches - - max - default - min -
    - -
    -
    -
    - Pairs - wand - nudge - - - max - default - min -
    -
    -
    -
    -
    - Threads - wand - nudge - download - - max - default - min -
    -
    -
    -
    -
    -
    -
    -
    - - - - - - diff --git a/docs/droste.md b/docs/droste.md new file mode 100644 index 000000000..8f03ec91a --- /dev/null +++ b/docs/droste.md @@ -0,0 +1,40 @@ +--- +layout: default +title: Pair diagrams from thread diagrams +javascript: +- d3.v4.min.js +- GroundForge-opt.js +- nudgePairs.js +- panel.js +- hybrid.js +css: +- hybrid.css +sidebar: droste +--- + + + + \ No newline at end of file diff --git a/docs/js/stitches.js b/docs/js/stitches.js deleted file mode 100644 index afe804aa3..000000000 --- a/docs/js/stitches.js +++ /dev/null @@ -1,135 +0,0 @@ -function load() { - - let q = window.location.search.substr(1)+"" - if(!q) - q = 'patchWidth=8&patchHeight=8&footside=r,1&tile=888,111&headside=8,r&shiftColsSW=-2&shiftRowsSW=2&shiftColsSE=1&shiftRowsSE=2&a1=ctctctcll&j2=ctctctcrr&b2=ct' - dimInit(q); - // document.getElementById("helpMenuButton").focus() - showThread(show(q)) -} -function reloadPair() { - // dimensions for an A1 - let width = 2245 - let height = 3178 - - let zoom = 1.9 - let itemMatrix = TilesConfig(getQ()).getItemMatrix - document.getElementById('pair').innerHTML = PairSvg.render(itemMatrix, width, height, zoom) -} -function getQ() { - return d3.select('#to_self').attr('href').replace(/.*[?]/, ""); -} - -function getDim(q) { - let w = q.replace(/.*patchWidth=/, "").replace(/&.*/, ""); - let h = q.replace(/.*patchHeight=/, "").replace(/&.*/, ""); - return [w,h] -} -function dimInit(q) { - let [w,h] = getDim(q); - d3.select("#patchHeight").attr("value", h).on("change", dimChanged) - d3.select("#patchWidth").attr("value", w).on("change", dimChanged) -} -function dimChanged() { - let q = getQ() - let w = d3.select("#patchWidth").node().value - let h = d3.select("#patchHeight").node().value - let [wq, hq] = getDim(q) - if (w == wq && h == hq) return // apparently first action on the page - q = getQ() - .replace(new RegExp('patchWidth=[0-9]+'),'patchWidth='+w) - .replace(new RegExp('patchHeight=[0-9]+'),'patchHeight='+h) - show(q) // TODO spoiler to reuse methods on pattern and droste - return void(0) -} -function show(q) { - var cfg = TilesConfig(q) - - // dimensions for an A1 - let width = 2245 - let height = 3178 - - let zoom = 1.9 - let itemMatrix = cfg.getItemMatrix - document.getElementById('to_self').href = "stitches?"+q - document.getElementById('to_pattern').href = "pattern.html?"+q - document.getElementById('to_droste').href = "droste.html?"+q - document.getElementById('enum').innerHTML = PairSvg.legend(itemMatrix) - document.getElementById('pair').innerHTML = PairSvg.render(itemMatrix, width, height, zoom) - document.getElementById('thread').innerHTML = '' - q.split("&").find(whiting) - return cfg -} -function redrawThreads(){ - showThread(TilesConfig(getQ())) -} -function showThread(cfg) { - var pairDiagram = NewPairDiagram.create(cfg) // old style pair diagram - var threadDiagram = ThreadDiagram.create(pairDiagram) - showGraph('#thread', threadDiagram) - d3.select('#thread g').attr("transform","scale(0.5,0.5)") -} -function maximize(containerId) { - d3.select(containerId).style("width","100%").style("height","90vh") -} -function minimize(containerId) { - d3.select(containerId).style("width","250px").style("height","250px") -} -function clickedStitch(event) { - - var id = event.currentTarget.getElementsByTagName("title")[0].innerHTML.replace(/.* /,"") - var replacement = `${id}=${GF_stitches.paintStitchValue()}` - var search = new RegExp(`(?<=[?&])${id}=[ctlr]+`,'gi') - let attr = getQ(); - if (search.test(attr)) - q = attr.replace(search,replacement) - else - q = attr + "&" + replacement - show(q) -} -function setAllStitches() { - var replacement = `=${GF_stitches.paintStitchValue()}&` - var search = new RegExp(`=[ctlr]+&`,'gi') - var searchLast = new RegExp(`=[ctlr]+$`,'gi') - var searchLast = new RegExp(`=[ctlr]+$`,'g') - let q = getQ() - .replace(search, replacement) - .replace(searchLast, replacement) - show(q) - show(getQ().replace(searchLast, replacement)) -} -function setIgnoredStitches() { - var replacement = `=${GF_stitches.paintStitchValue()}` - let q = getQ().split('&').map((kv => replaceIgnored(kv, replacement))).join('&') - show(q) -} -function replaceIgnored(kv, replacement) { - if (/[a-z][0-9]+=-/.test(kv)) { - return kv.replace(/=-/, replacement); - } - return kv; -} -function whiting (kv) { - var k = kv.trim().replace(/[^a-zA-Z0-9]/g,"") - if (!kv.trim().startsWith("whiting")) return false - // side effect: add whiting link - var pageNr = kv.split("P")[1] - var cellNr = kv.split("_")[0].split("=")[1] - var w = d3.select('#whiting') - w.style("display","inline-block") - w.node().innerHTML = - ""+ - " Page " + pageNr + " "+ - "of 'A Lace Guide for Makers and Collectors' by Gertrude Whiting; 1920." - return true -} -function toggleVisibility(id) { - console.log('toggleVisibility '+id) - var x = document.getElementById(id); - if (x.style.display === "block") { - x.style.display = "none"; - } else { - x.style.display = "block"; - } - return void(0) -} \ No newline at end of file From 1b69008783725243bba6556d6c276ad6d57327d4 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Wed, 21 Jan 2026 13:34:40 +0100 Subject: [PATCH 146/221] droste same style as stitches --- docs/droste.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/droste.md b/docs/droste.md index 8f03ec91a..8cb40ab74 100644 --- a/docs/droste.md +++ b/docs/droste.md @@ -12,10 +12,12 @@ css: sidebar: droste --- - - \ No newline at end of file diff --git a/docs/droste.md b/docs/droste.md index 0b757b543..2346ae506 100644 --- a/docs/droste.md +++ b/docs/droste.md @@ -31,7 +31,7 @@ sidebar: droste for (let id of ['pairStep', 'threadStep']) { document.getElementById(id).value = 1; } - for (let id of ['specs', 'drosteStitches', 'pairStep', 'threadStep', 'snow3']) { + for (let id of ['drosteStitches', 'pairStep', 'threadStep', 'snow3']) { document.getElementById(id).parentNode.style.display = 'none'; } document.getElementById('basicStitchInput').previousSibling.remove(); // remove label From ed3c7a4bc3b2c3631cc7f0132a62d17424d9aa60 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Wed, 21 Jan 2026 14:00:54 +0100 Subject: [PATCH 152/221] fix broom icon on droste --- docs/API/hybrid.md | 6 +++++- docs/droste.md | 1 + docs/js/hybrid.js | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/API/hybrid.md b/docs/API/hybrid.md index 24121949b..718a2895b 100644 --- a/docs/API/hybrid.md +++ b/docs/API/hybrid.md @@ -24,8 +24,12 @@ and [.html]({{ site.github.repository_url}}/blob/master/test-docs/hybrid.html). Note the different locations of the scripts, mark down front matter expects them in docs/js. TO DO: +* Stitches gallery * Apply to all (apply to ignored only for step-0) * Beep on invalid input (tweak, spinners, specs). When pasting a URL in the first specifications field: strip until question mark. - \ No newline at end of file + \ No newline at end of file diff --git a/docs/droste.md b/docs/droste.md index 2346ae506..f9a969b3c 100644 --- a/docs/droste.md +++ b/docs/droste.md @@ -27,6 +27,7 @@ sidebar: droste GF_tiles = {loadGallery (namedArgs){ }}; // dummy to avoid errors GF_hybrid.snow3 = []; // clear for performance GF_hybrid.snow4 = []; // clear for performance + GF_hybrid.content_home = '.'; GF_hybrid.load(document.getElementById('main-content')); for (let id of ['pairStep', 'threadStep']) { document.getElementById(id).value = 1; diff --git a/docs/js/hybrid.js b/docs/js/hybrid.js index 9dc45c5ec..a6a8090f9 100644 --- a/docs/js/hybrid.js +++ b/docs/js/hybrid.js @@ -1,5 +1,5 @@ const GF_hybrid = { - content_home: '..', + content_home: '.', snow4:[ // screenshots taken at 50% zoom level // ndb: patterns from "naar de bron" by Nora Andries From f1d89ee3e790e5d2bd4f5919f7f02a8744f6c446 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Wed, 21 Jan 2026 14:10:43 +0100 Subject: [PATCH 153/221] fix invalid droste step number --- docs/droste.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/droste.md b/docs/droste.md index f9a969b3c..2a1ee214d 100644 --- a/docs/droste.md +++ b/docs/droste.md @@ -21,6 +21,7 @@ sidebar: droste document.getElementById("drosteStep") .addEventListener('change', e => { const step = Math.min(3, Math.max(1, parseInt(e.target.value))); + document.getElementById("drosteStep").value = step; document.getElementById("threadStep").value = step; document.getElementById("pairStep").value = step; }); From 099fcc9f35b5ab66260c53b8e7125fab080e4335 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Wed, 21 Jan 2026 14:18:45 +0100 Subject: [PATCH 154/221] fix alpha droste step number --- docs/droste.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/droste.md b/docs/droste.md index 2a1ee214d..e636bfa62 100644 --- a/docs/droste.md +++ b/docs/droste.md @@ -20,7 +20,8 @@ sidebar: droste `); document.getElementById("drosteStep") .addEventListener('change', e => { - const step = Math.min(3, Math.max(1, parseInt(e.target.value))); + const val = parseInt(e.target.value, 10); + const step = isNaN(val) ? 1 : Math.min(3, Math.max(1, val)); document.getElementById("drosteStep").value = step; document.getElementById("threadStep").value = step; document.getElementById("pairStep").value = step; From 5992b468ccd512d877688ff60f29a3ba01d49f8e Mon Sep 17 00:00:00 2001 From: jo-pol Date: Thu, 22 Jan 2026 19:07:52 +0100 Subject: [PATCH 155/221] reduced code duplication --- docs/droste.md | 30 +----------------------------- docs/js/hybrid.js | 36 ++++++++++++++++++++++++++++++++++++ docs/stitches.md | 17 +---------------- 3 files changed, 38 insertions(+), 45 deletions(-) diff --git a/docs/droste.md b/docs/droste.md index e636bfa62..a9c9ffc70 100644 --- a/docs/droste.md +++ b/docs/droste.md @@ -13,33 +13,5 @@ sidebar: droste --- \ No newline at end of file diff --git a/docs/js/hybrid.js b/docs/js/hybrid.js index a6a8090f9..c341ecf4d 100644 --- a/docs/js/hybrid.js +++ b/docs/js/hybrid.js @@ -329,5 +329,41 @@ const GF_hybrid = { document.getElementById('basicStitchInput').value = basicStitch; document.getElementById('drosteStitches').value = drosteStitches; // TODO: second step of droste stitches, requires more intelligence in resetting previously assigned stitches + }, + loadDroste(parent){ + parent.insertAdjacentHTML("beforeend",` + + + `); + document.getElementById("drosteStep") + .addEventListener('change', e => { + const val = parseInt(e.target.value, 10); + const step = isNaN(val) ? 1 : Math.min(3, Math.max(1, val)); + document.getElementById("drosteStep").value = step; + document.getElementById("threadStep").value = step; + document.getElementById("pairStep").value = step; + }); + this.loadSimple(parent, 1, ['drosteStitches', 'pairStep', 'threadStep', 'snow3'] ); + }, + loadStitches(parent){ + this.loadSimple(parent, 0, ['drosteStitches', 'pairStep', 'threadStep', 'snow3', 'specs'] ); + }, + loadSimple(parent, initialStep, hiddenElements){ + console.log('================ Loading panels ================'); + GF_tiles = {loadGallery (namedArgs){ }}; // dummy to avoid errors + this.snow3 = []; // clear for performance + this.snow4 = []; // clear for performance + this.load(parent); + for (let id of ['pairStep', 'threadStep']) { + document.getElementById(id).value = initialStep; + } + for (let id of hiddenElements) { + document.getElementById(id).parentNode.style.display = 'none'; + } + document.getElementById('basicStitchInput').previousSibling.remove(); // remove label + const stitchesEl = document.getElementById('stitches').parentNode; + stitchesEl.style.display = 'block'; // make visible, whichever gallery is visible by default + stitchesEl.getElementsByTagName('select')[0].outerHTML = 'select stitch example'; // no choice for other galleries + console.log('================ Loaded panels ================'); } } \ No newline at end of file diff --git a/docs/stitches.md b/docs/stitches.md index 31cccd34f..dcc0a44cd 100644 --- a/docs/stitches.md +++ b/docs/stitches.md @@ -13,20 +13,5 @@ sidebar: stitches --- \ No newline at end of file From ce0d2392e5bd70c13605422906628375490f9e0d Mon Sep 17 00:00:00 2001 From: jo-pol Date: Thu, 22 Jan 2026 22:29:36 +0100 Subject: [PATCH 156/221] a start with jsdoc --- .github/workflows/jsdoc.yml | 0 docs/_includes/Sidebar-droste.md | 1 + docs/js/hybrid.js | 36 +++++++++++++++++++++++++++++--- docs/js/panel.js | 17 +++++++++++++++ 4 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/jsdoc.yml diff --git a/.github/workflows/jsdoc.yml b/.github/workflows/jsdoc.yml new file mode 100644 index 000000000..e69de29bb diff --git a/docs/_includes/Sidebar-droste.md b/docs/_includes/Sidebar-droste.md index d6f426d51..5b5884590 100644 --- a/docs/_includes/Sidebar-droste.md +++ b/docs/_includes/Sidebar-droste.md @@ -2,6 +2,7 @@ - [Icons](/GroundForge-help/Icons) - [Droste effect](/GroundForge-help/Droste-effect) - [Color code](/GroundForge-help/color-rules) + - [Swatch size](/GroundForge-help/Patch-Size) (NYI) - [Download](/GroundForge-help/Download) - Half minute captures - [Flip and rotate stitches](/GroundForge-help/clips/flip) diff --git a/docs/js/hybrid.js b/docs/js/hybrid.js index c341ecf4d..d607f393e 100644 --- a/docs/js/hybrid.js +++ b/docs/js/hybrid.js @@ -1,5 +1,11 @@ +/** + * + */ const GF_hybrid = { content_home: '.', + /** + * 4/8 pair snow gallery patterns + */ snow4:[ // screenshots taken at 50% zoom level // ndb: patterns from "naar de bron" by Nora Andries @@ -9,6 +15,9 @@ const GF_hybrid = { ['spider-2-rings.png','ctct','x1=ctcrctc,x2=ctclctc,x4=x5=tt'], ['spider-3-rings.png','ctcctct','x3=ctcctc,x8=x9=tt','x33=ctcctc,x80=x81=x90=x91=tt'] ], + /** + * 3/6 pair snow gallery patterns + */ snow3: [ ['123-a', 'rcrcrc','crc,crclctc,ctcrc,rcl,c,c'], ['123-b', 'lclclc','rcl,ctc,crcllc,crrclcr,ctc,cl'], @@ -217,6 +226,10 @@ const GF_hybrid = {
    `) }); }, + /** + * Loads all components required for the droste mixer + * @param {!HTMLElement} container receives the generated components + */ load(container) { function twister(type){ return `${type}s`; @@ -330,7 +343,12 @@ const GF_hybrid = { document.getElementById('drosteStitches').value = drosteStitches; // TODO: second step of droste stitches, requires more intelligence in resetting previously assigned stitches }, - loadDroste(parent){ + /** + * Load panels for droste page + * @param {!HTMLElement} parent receives the generated components + * @param {!number} initialStep default: 1, 0 for a combination of the stitches page and droste page + */ + loadDroste(parent, initialStep = 1){ parent.insertAdjacentHTML("beforeend",` @@ -338,16 +356,28 @@ const GF_hybrid = { document.getElementById("drosteStep") .addEventListener('change', e => { const val = parseInt(e.target.value, 10); - const step = isNaN(val) ? 1 : Math.min(3, Math.max(1, val)); + const step = isNaN(val) ? initialStep : Math.min(3, Math.max(initialStep, val)); document.getElementById("drosteStep").value = step; document.getElementById("threadStep").value = step; document.getElementById("pairStep").value = step; }); - this.loadSimple(parent, 1, ['drosteStitches', 'pairStep', 'threadStep', 'snow3'] ); + this.loadSimple(parent, initialStep, ['drosteStitches', 'pairStep', 'threadStep', 'snow3'] ); }, + /** + * Load panels for stitches page + * @param {!HTMLElement} parent receives the generated components + */ loadStitches(parent){ this.loadSimple(parent, 0, ['drosteStitches', 'pairStep', 'threadStep', 'snow3', 'specs'] ); }, + /** + * Common loading code for droste and stitches pages + * @param {!HTMLElement} parent receives the generated components + * @param {!number} initialStep 0 for stitches page, 1 for droste page, 0 for a combination of both + * @param {!String[]} hiddenElements + * for droste: ['drosteStitches', 'pairStep', 'threadStep', 'snow3'], for stitches add 'specs' + * note that a droste page needs a drosteStep input to control the hidden pair and thread step values + */ loadSimple(parent, initialStep, hiddenElements){ console.log('================ Loading panels ================'); GF_tiles = {loadGallery (namedArgs){ }}; // dummy to avoid errors diff --git a/docs/js/panel.js b/docs/js/panel.js index 236e247af..dd370cc54 100644 --- a/docs/js/panel.js +++ b/docs/js/panel.js @@ -6,6 +6,17 @@ const GF_panel = { ], panelSize: {width: '300px', height: '300px'}, // default panel size + /** + * Creates and appends a diagram panel with controls to the specified parent element. + * + * @param {Object} config - Configuration for the panel. + * @param {string} config.caption - The caption text for the panel. + * @param {string} config.id - The unique ID for the panel container. + * @param {string} [config.wandHref] - Optional URL for the reload (wand) icon. + * @param {Array} [config.controls] - List of control names to include (e.g., 'cleanup', 'color', 'resize'). + * @param {Object} [config.size] - Optional size for the panel (e.g., `{width: '300px', height: '300px'}`). + * @param {HTMLElement} config.parent - The parent element to which the panel will be appended. + */ load(config) { const { caption, id, wandHref, controls = [], size = this.panelSize, parent } = config; const isArray = Array.isArray(controls); @@ -46,6 +57,12 @@ const GF_panel = { parent.append(figure); this.resetDimensions(id, size); }, + + /** + * Downloads the SVG content of the specified container as a file. + * @param containerId + * @param filename + */ downloadSVG(containerId, filename = "diagram.svg") { const el = document.querySelector('#'+ containerId + " svg"); if (!el) return; From 8b86fe5280e19924b37979b8d5e16a7fecb26d27 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 23 Jan 2026 07:48:33 +0100 Subject: [PATCH 157/221] jsdoc workflow --- .github/workflows/jsdoc.yml | 31 +++++++++++++++++++++++++++++++ docs/js/hybrid.js | 12 ++++++++++-- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/.github/workflows/jsdoc.yml b/.github/workflows/jsdoc.yml index e69de29bb..c57f3ffcc 100644 --- a/.github/workflows/jsdoc.yml +++ b/.github/workflows/jsdoc.yml @@ -0,0 +1,31 @@ +name: Generate JSDoc + +on: + push: + branches: [ main ] + workflow_dispatch: + +jobs: + build-jsdoc: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install dependencies + run: npm ci + + - name: Generate JSDoc + run: npx jsdoc docs/js -d docs/jsdoc + + - name: Upload JSDoc to artifact + uses: actions/upload-artifact@v4 + with: + name: jsdoc + path: docs/jsdoc diff --git a/docs/js/hybrid.js b/docs/js/hybrid.js index d607f393e..566c99bce 100644 --- a/docs/js/hybrid.js +++ b/docs/js/hybrid.js @@ -1,10 +1,18 @@ /** * + * Page content generator for GroundForge. + * + * Requires: + * - d3.v4.min.js + * - GroundForge-opt.js + * - nudgePairs.js + * - panel.js + * - hybrid.css */ const GF_hybrid = { content_home: '.', /** - * 4/8 pair snow gallery patterns + * 4/8 pair snow gallery recipes (W.I.P.) */ snow4:[ // screenshots taken at 50% zoom level @@ -16,7 +24,7 @@ const GF_hybrid = { ['spider-3-rings.png','ctcctct','x3=ctcctc,x8=x9=tt','x33=ctcctc,x80=x81=x90=x91=tt'] ], /** - * 3/6 pair snow gallery patterns + * 3/6 pair snow gallery recipes */ snow3: [ ['123-a', 'rcrcrc','crc,crclctc,ctcrc,rcl,c,c'], From ac461c3d9476d7da89dd4c762e4d4dce7da0ff09 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 23 Jan 2026 08:17:47 +0100 Subject: [PATCH 158/221] jsdoc workflow --- .github/workflows/jsdoc.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/jsdoc.yml b/.github/workflows/jsdoc.yml index c57f3ffcc..4c4bef739 100644 --- a/.github/workflows/jsdoc.yml +++ b/.github/workflows/jsdoc.yml @@ -18,8 +18,18 @@ jobs: with: node-version: '20' + - name: Create temporary package.json + run: | + echo '{ + "name": "temp-jsdoc", + "version": "1.0.0", + "devDependencies": { + "jsdoc": "^4.0.0" + } + }' > package.json + - name: Install dependencies - run: npm ci + run: npm install - name: Generate JSDoc run: npx jsdoc docs/js -d docs/jsdoc From 97128e252dbb0fc264c32a929fe02b23fd529d9b Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 23 Jan 2026 14:15:56 +0100 Subject: [PATCH 159/221] improved jsdoc comments --- docs/js/hybrid.js | 8 ++++++++ docs/js/nudgePairs.js | 15 +++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/docs/js/hybrid.js b/docs/js/hybrid.js index 566c99bce..f5077e679 100644 --- a/docs/js/hybrid.js +++ b/docs/js/hybrid.js @@ -8,6 +8,14 @@ * - nudgePairs.js * - panel.js * - hybrid.css + * + * @constant + * @property {function} load - loads all components required for the droste mixer + * @property {function} loadStitches - loads all components required for the stitches page + * @property {function} loadDroste - loads all components required for the droste page + * @property {string} content_home - base path for content like images + * @property {Array} snow3 - 3/6 pair snow gallery recipes + * @property {Array} snow4 - 4/8 pair snow gallery recipes */ const GF_hybrid = { content_home: '.', diff --git a/docs/js/nudgePairs.js b/docs/js/nudgePairs.js index 9f60858c8..3093e49e1 100644 --- a/docs/js/nudgePairs.js +++ b/docs/js/nudgePairs.js @@ -1,7 +1,13 @@ /** - * container: d3.selection of element containing an SVG generated with PairSvg.create - * in other words: the primary pair diagram + * Spreads nodes in a pair diagram to reduce overlaps. + * + * Uses d3-force to apply forces to the nodes and links of the diagram. + * Requires d3.js + * + * @param {string} containerId + * of element containing an SVG generated with PairSvg.create + * in other words: the primary pair diagram */ function nudgePairs(containerId) { @@ -12,6 +18,11 @@ function nudgePairs(containerId) { } /** + * Spreads nodes in a pair diagram to reduce overlaps. + * + * Uses d3-force to apply forces to the nodes and links of the diagram. + * Requires d3.js + * * @param svg has * - elements with * - class node From 8cfa9d2129525c9fd16a009dddc61bca4a16bc56 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 23 Jan 2026 14:37:55 +0100 Subject: [PATCH 160/221] improved jsdoc comments --- .github/workflows/jsdoc.yml | 2 +- docs/js/hybrid.js | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/jsdoc.yml b/.github/workflows/jsdoc.yml index 4c4bef739..ea8fc0547 100644 --- a/.github/workflows/jsdoc.yml +++ b/.github/workflows/jsdoc.yml @@ -38,4 +38,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: jsdoc - path: docs/jsdoc + path: docs/jsdoc/global.html diff --git a/docs/js/hybrid.js b/docs/js/hybrid.js index f5077e679..596e6599b 100644 --- a/docs/js/hybrid.js +++ b/docs/js/hybrid.js @@ -10,6 +10,7 @@ * - hybrid.css * * @constant + * @type {{load: function, loadStitches: function, loadDroste: function, content_home: string, snow3: Array, snow4: Array, generateSelectedDiagram: function, setStitchEvents: function, flip_b2d: function, scrollIfTooLittleIsVisible: function, setPattern: function, flip_b2p: function, otherGallery: function, generateLegend: function, loadSimple: function}} * @property {function} load - loads all components required for the droste mixer * @property {function} loadStitches - loads all components required for the stitches page * @property {function} loadDroste - loads all components required for the droste page @@ -244,7 +245,10 @@ const GF_hybrid = { }, /** * Loads all components required for the droste mixer + * @function + * @memberof GF_hybrid * @param {!HTMLElement} container receives the generated components + * @returns {void} */ load(container) { function twister(type){ @@ -361,8 +365,11 @@ const GF_hybrid = { }, /** * Load panels for droste page + * @function + * @memberof GF_hybrid * @param {!HTMLElement} parent receives the generated components * @param {!number} initialStep default: 1, 0 for a combination of the stitches page and droste page + * @returns {void} */ loadDroste(parent, initialStep = 1){ parent.insertAdjacentHTML("beforeend",` @@ -381,18 +388,24 @@ const GF_hybrid = { }, /** * Load panels for stitches page - * @param {!HTMLElement} parent receives the generated components - */ + * @function + * @memberof GF_hybrid + * @param {!HTMLElement} container receives the generated components + * @returns {void} + * */ loadStitches(parent){ this.loadSimple(parent, 0, ['drosteStitches', 'pairStep', 'threadStep', 'snow3', 'specs'] ); }, /** * Common loading code for droste and stitches pages + * @function + * @memberof GF_hybrid * @param {!HTMLElement} parent receives the generated components * @param {!number} initialStep 0 for stitches page, 1 for droste page, 0 for a combination of both * @param {!String[]} hiddenElements * for droste: ['drosteStitches', 'pairStep', 'threadStep', 'snow3'], for stitches add 'specs' * note that a droste page needs a drosteStep input to control the hidden pair and thread step values + * @returns {void} */ loadSimple(parent, initialStep, hiddenElements){ console.log('================ Loading panels ================'); From f638254a5955ba06587f514197931cd687ea4b0f Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 23 Jan 2026 14:41:29 +0100 Subject: [PATCH 161/221] improved jsdoc comments --- docs/js/hybrid.js | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/docs/js/hybrid.js b/docs/js/hybrid.js index 596e6599b..d7ca4a1a7 100644 --- a/docs/js/hybrid.js +++ b/docs/js/hybrid.js @@ -1,22 +1,6 @@ /** - * - * Page content generator for GroundForge. - * - * Requires: - * - d3.v4.min.js - * - GroundForge-opt.js - * - nudgePairs.js - * - panel.js - * - hybrid.css - * - * @constant - * @type {{load: function, loadStitches: function, loadDroste: function, content_home: string, snow3: Array, snow4: Array, generateSelectedDiagram: function, setStitchEvents: function, flip_b2d: function, scrollIfTooLittleIsVisible: function, setPattern: function, flip_b2p: function, otherGallery: function, generateLegend: function, loadSimple: function}} - * @property {function} load - loads all components required for the droste mixer - * @property {function} loadStitches - loads all components required for the stitches page - * @property {function} loadDroste - loads all components required for the droste page - * @property {string} content_home - base path for content like images - * @property {Array} snow3 - 3/6 pair snow gallery recipes - * @property {Array} snow4 - 4/8 pair snow gallery recipes + * GF_hybrid namespace. + * @namespace */ const GF_hybrid = { content_home: '.', From 06c3fd076bab9c0a692107a2d0d44b8cf83e99e5 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 23 Jan 2026 14:44:10 +0100 Subject: [PATCH 162/221] upload all --- .github/workflows/jsdoc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jsdoc.yml b/.github/workflows/jsdoc.yml index ea8fc0547..af35a148a 100644 --- a/.github/workflows/jsdoc.yml +++ b/.github/workflows/jsdoc.yml @@ -38,4 +38,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: jsdoc - path: docs/jsdoc/global.html + path: docs/jsdoc/ From 79b3ebc4022a70694922ace0419d1a4528713f02 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 23 Jan 2026 15:38:22 +0100 Subject: [PATCH 163/221] selective jsdocs --- docs/js/hybrid.js | 48 ++++++++++++++++++----------------------------- 1 file changed, 18 insertions(+), 30 deletions(-) diff --git a/docs/js/hybrid.js b/docs/js/hybrid.js index d7ca4a1a7..fe0564620 100644 --- a/docs/js/hybrid.js +++ b/docs/js/hybrid.js @@ -1,12 +1,13 @@ /** - * GF_hybrid namespace. + * GroundForge page component generator. + * + * The surrounding page should take care of the house style like headers footers and menu's with help pages.. + * + * Requires: d3.v4.min.js - GroundForge-opt.js - nudgePairs.js (nudgeDiagram) - panel.js - hybrid.css * @namespace */ const GF_hybrid = { content_home: '.', - /** - * 4/8 pair snow gallery recipes (W.I.P.) - */ snow4:[ // screenshots taken at 50% zoom level // ndb: patterns from "naar de bron" by Nora Andries @@ -16,9 +17,6 @@ const GF_hybrid = { ['spider-2-rings.png','ctct','x1=ctcrctc,x2=ctclctc,x4=x5=tt'], ['spider-3-rings.png','ctcctct','x3=ctcctc,x8=x9=tt','x33=ctcctc,x80=x81=x90=x91=tt'] ], - /** - * 3/6 pair snow gallery recipes - */ snow3: [ ['123-a', 'rcrcrc','crc,crclctc,ctcrc,rcl,c,c'], ['123-b', 'lclclc','rcl,ctc,crcllc,crrclcr,ctc,cl'], @@ -228,11 +226,10 @@ const GF_hybrid = { }); }, /** - * Loads all components required for the droste mixer + * Loads all components required for the droste mixer. * @function * @memberof GF_hybrid * @param {!HTMLElement} container receives the generated components - * @returns {void} */ load(container) { function twister(type){ @@ -348,15 +345,14 @@ const GF_hybrid = { // TODO: second step of droste stitches, requires more intelligence in resetting previously assigned stitches }, /** - * Load panels for droste page + * Load components for the droste page. * @function * @memberof GF_hybrid - * @param {!HTMLElement} parent receives the generated components + * @param {!HTMLElement} container receives the generated components * @param {!number} initialStep default: 1, 0 for a combination of the stitches page and droste page - * @returns {void} */ - loadDroste(parent, initialStep = 1){ - parent.insertAdjacentHTML("beforeend",` + loadDroste(container, initialStep = 1){ + container.insertAdjacentHTML("beforeend",` `); @@ -368,35 +364,27 @@ const GF_hybrid = { document.getElementById("threadStep").value = step; document.getElementById("pairStep").value = step; }); - this.loadSimple(parent, initialStep, ['drosteStitches', 'pairStep', 'threadStep', 'snow3'] ); + this.loadSimple(container, initialStep, ['drosteStitches', 'pairStep', 'threadStep', 'snow3'] ); }, /** - * Load panels for stitches page + * Load components for the stitches page. * @function * @memberof GF_hybrid * @param {!HTMLElement} container receives the generated components - * @returns {void} * */ - loadStitches(parent){ - this.loadSimple(parent, 0, ['drosteStitches', 'pairStep', 'threadStep', 'snow3', 'specs'] ); + loadStitches(container){ + this.loadSimple(container, 0, ['drosteStitches', 'pairStep', 'threadStep', 'snow3', 'specs'] ); }, /** - * Common loading code for droste and stitches pages - * @function - * @memberof GF_hybrid - * @param {!HTMLElement} parent receives the generated components - * @param {!number} initialStep 0 for stitches page, 1 for droste page, 0 for a combination of both - * @param {!String[]} hiddenElements - * for droste: ['drosteStitches', 'pairStep', 'threadStep', 'snow3'], for stitches add 'specs' - * note that a droste page needs a drosteStep input to control the hidden pair and thread step values - * @returns {void} + * Common code for loadStitches and loadDroste, hiding some components generated by load. + * @Ignore */ - loadSimple(parent, initialStep, hiddenElements){ + loadSimple(container, initialStep, hiddenElements){ console.log('================ Loading panels ================'); GF_tiles = {loadGallery (namedArgs){ }}; // dummy to avoid errors this.snow3 = []; // clear for performance this.snow4 = []; // clear for performance - this.load(parent); + this.load(container); for (let id of ['pairStep', 'threadStep']) { document.getElementById(id).value = initialStep; } From d53f1031c1a33207d27be14afe4dbb9e9c1a8223 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 23 Jan 2026 15:57:06 +0100 Subject: [PATCH 164/221] jsdocs layout --- docs/js/nudgePairs.js | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/docs/js/nudgePairs.js b/docs/js/nudgePairs.js index 3093e49e1..f2272ce13 100644 --- a/docs/js/nudgePairs.js +++ b/docs/js/nudgePairs.js @@ -20,22 +20,18 @@ function nudgePairs(containerId) { /** * Spreads nodes in a pair diagram to reduce overlaps. * - * Uses d3-force to apply forces to the nodes and links of the diagram. - * Requires d3.js + * **SVG requirements:** + * - Elements with class `node` and an `id` attribute + * - Must have attribute `transform="translate(x,y)"` + * - Elements with class `link` and an `id` attribute containing node IDs separated by `-` + * - Must have attribute `d` defining a path * - * @param svg has - * - elements with - * - class node - * - an id attribute - * - an attribute transform="translate(x,y)" - * - elements with - * - class link - * - an id attribute containing the IDs of their nodes separated with '-' - * - an attribute d defining a path with or without a midpoint + * Uses d3-force to apply forces to the nodes and links of the diagram. + * Requires d3.js and DiagramSvg.linkPath function of GroundForge-opt.js. See also + * - https://devdocs.io/d3~4/d3-force + * - https://devdocs.io/d3~4/d3-selection + * @param svg SVG selection * @param diagramType 'pair' or 'thread' (default: 'thread') - * See also - * https://devdocs.io/d3~4/d3-force - * https://devdocs.io/d3~4/d3-selection */ function nudgeDiagram(svg, diagramType='thread') { From ddb4ae97c1ab868c2942d6452f5cdd1d6bafaba4 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 23 Jan 2026 16:09:06 +0100 Subject: [PATCH 165/221] jsdocs layout --- .github/workflows/jsdoc.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/jsdoc.yml b/.github/workflows/jsdoc.yml index af35a148a..d8f9a1a33 100644 --- a/.github/workflows/jsdoc.yml +++ b/.github/workflows/jsdoc.yml @@ -24,7 +24,8 @@ jobs: "name": "temp-jsdoc", "version": "1.0.0", "devDependencies": { - "jsdoc": "^4.0.0" + "jsdoc": "^4.0.0", + "docdash": "^2.0.0" } }' > package.json @@ -32,7 +33,7 @@ jobs: run: npm install - name: Generate JSDoc - run: npx jsdoc docs/js -d docs/jsdoc + run: npx jsdoc docs/js -d docs/jsdoc -t ./node_modules/docdash - name: Upload JSDoc to artifact uses: actions/upload-artifact@v4 From 0026d288ab607b45029a45b19f4f5a41bd009a0f Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 23 Jan 2026 16:24:30 +0100 Subject: [PATCH 166/221] jsdocs layout --- .github/workflows/jsdoc.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/jsdoc.yml b/.github/workflows/jsdoc.yml index d8f9a1a33..820e08b1b 100644 --- a/.github/workflows/jsdoc.yml +++ b/.github/workflows/jsdoc.yml @@ -30,10 +30,12 @@ jobs: }' > package.json - name: Install dependencies - run: npm install + run: | + npm install + npm install --save-dev jsdoc-baseline - name: Generate JSDoc - run: npx jsdoc docs/js -d docs/jsdoc -t ./node_modules/docdash + run: npx jsdoc docs/js -d docs/jsdoc -t ./node_modules/jsdoc-baseline - name: Upload JSDoc to artifact uses: actions/upload-artifact@v4 From ba815e8a2c055ed6c8981c8dccd7eaeb863f36c5 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 23 Jan 2026 16:30:23 +0100 Subject: [PATCH 167/221] jsdocs layout --- .github/workflows/jsdoc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jsdoc.yml b/.github/workflows/jsdoc.yml index 820e08b1b..caac8294e 100644 --- a/.github/workflows/jsdoc.yml +++ b/.github/workflows/jsdoc.yml @@ -24,7 +24,7 @@ jobs: "name": "temp-jsdoc", "version": "1.0.0", "devDependencies": { - "jsdoc": "^4.0.0", + "jsdoc": "^3.6.3", "docdash": "^2.0.0" } }' > package.json From c5b4b80459ac7d0189c8828a0c50505af3d479b0 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 23 Jan 2026 18:50:16 +0100 Subject: [PATCH 168/221] jsdocs in pdf --- .github/workflows/jsdoc.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/jsdoc.yml b/.github/workflows/jsdoc.yml index caac8294e..f0e1424d2 100644 --- a/.github/workflows/jsdoc.yml +++ b/.github/workflows/jsdoc.yml @@ -42,3 +42,19 @@ jobs: with: name: jsdoc path: docs/jsdoc/ + + - name: Install Puppeteer + run: npm install puppeteer + + - name: Generate PDF from JSDoc index.html + run: | + node -e " + const puppeteer = require('puppeteer'); + (async () => { + const browser = await puppeteer.launch({args: ['--no-sandbox']}); + const page = await browser.newPage(); + await page.goto('file://' + process.cwd() + '/docs/jsdoc/index.html', {waitUntil: 'networkidle0'}); + await page.pdf({path: 'docs/jsdoc/jsdoc.pdf', format: 'A4'}); + await browser.close(); + })(); + " From a32a5e03159d547d077e67acfcae7f6a5b0a64e9 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 23 Jan 2026 18:51:31 +0100 Subject: [PATCH 169/221] jsdocs in pdf before upload --- .github/workflows/jsdoc.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/jsdoc.yml b/.github/workflows/jsdoc.yml index f0e1424d2..4bef5e13f 100644 --- a/.github/workflows/jsdoc.yml +++ b/.github/workflows/jsdoc.yml @@ -37,12 +37,6 @@ jobs: - name: Generate JSDoc run: npx jsdoc docs/js -d docs/jsdoc -t ./node_modules/jsdoc-baseline - - name: Upload JSDoc to artifact - uses: actions/upload-artifact@v4 - with: - name: jsdoc - path: docs/jsdoc/ - - name: Install Puppeteer run: npm install puppeteer @@ -58,3 +52,9 @@ jobs: await browser.close(); })(); " + + - name: Upload JSDoc to artifact + uses: actions/upload-artifact@v4 + with: + name: jsdoc + path: docs/jsdoc/ From 52181fb373095183a973df33c9a3b4d3743993a0 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 23 Jan 2026 18:56:44 +0100 Subject: [PATCH 170/221] jsdocs in pdf --- .github/workflows/jsdoc.yml | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/.github/workflows/jsdoc.yml b/.github/workflows/jsdoc.yml index 4bef5e13f..570674ede 100644 --- a/.github/workflows/jsdoc.yml +++ b/.github/workflows/jsdoc.yml @@ -37,19 +37,43 @@ jobs: - name: Generate JSDoc run: npx jsdoc docs/js -d docs/jsdoc -t ./node_modules/jsdoc-baseline - - name: Install Puppeteer - run: npm install puppeteer + - name: Install Puppeteer and pdf-lib + run: npm install puppeteer pdf-lib - - name: Generate PDF from JSDoc index.html + - name: Generate PDF from selected JSDoc HTML files run: | node -e " + const fs = require('fs'); + const path = require('path'); const puppeteer = require('puppeteer'); + const { PDFDocument } = require('pdf-lib'); + (async () => { + const dir = path.join(process.cwd(), 'docs/jsdoc'); + const files = fs.readdirSync(dir) + .filter(f => f.endsWith('.html') && f !== 'index.html' && !f.endsWith('.js.html')) + .map(f => path.join(dir, f)); + const browser = await puppeteer.launch({args: ['--no-sandbox']}); - const page = await browser.newPage(); - await page.goto('file://' + process.cwd() + '/docs/jsdoc/index.html', {waitUntil: 'networkidle0'}); - await page.pdf({path: 'docs/jsdoc/jsdoc.pdf', format: 'A4'}); + const pdfBuffers = []; + for (const file of files) { + const page = await browser.newPage(); + await page.goto('file://' + file, {waitUntil: 'networkidle0'}); + const pdf = await page.pdf({format: 'A4'}); + pdfBuffers.push(pdf); + await page.close(); + } await browser.close(); + + // Merge PDFs + const mergedPdf = await PDFDocument.create(); + for (const pdfBytes of pdfBuffers) { + const pdf = await PDFDocument.load(pdfBytes); + const copiedPages = await mergedPdf.copyPages(pdf, pdf.getPageIndices()); + copiedPages.forEach((p) => mergedPdf.addPage(p)); + } + const mergedBytes = await mergedPdf.save(); + fs.writeFileSync(path.join(dir, 'jsdoc.pdf'), mergedBytes); })(); " From cca7689bf5a4426aad67680770a7fc12b9de6422 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 23 Jan 2026 19:29:08 +0100 Subject: [PATCH 171/221] jsdocs for panels --- .github/workflows/jsdoc.yml | 2 +- docs/js/hybrid.js | 5 +---- docs/js/nudgePairs.js | 3 ++- docs/js/panel.js | 12 ++++++++++++ 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/jsdoc.yml b/.github/workflows/jsdoc.yml index 570674ede..a49524a7e 100644 --- a/.github/workflows/jsdoc.yml +++ b/.github/workflows/jsdoc.yml @@ -81,4 +81,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: jsdoc - path: docs/jsdoc/ + path: docs/jsdoc/jsdoc.pdf diff --git a/docs/js/hybrid.js b/docs/js/hybrid.js index fe0564620..673bac558 100644 --- a/docs/js/hybrid.js +++ b/docs/js/hybrid.js @@ -1,5 +1,5 @@ /** - * GroundForge page component generator. + * GroundForge page generator. * * The surrounding page should take care of the house style like headers footers and menu's with help pages.. * @@ -227,7 +227,6 @@ const GF_hybrid = { }, /** * Loads all components required for the droste mixer. - * @function * @memberof GF_hybrid * @param {!HTMLElement} container receives the generated components */ @@ -346,7 +345,6 @@ const GF_hybrid = { }, /** * Load components for the droste page. - * @function * @memberof GF_hybrid * @param {!HTMLElement} container receives the generated components * @param {!number} initialStep default: 1, 0 for a combination of the stitches page and droste page @@ -368,7 +366,6 @@ const GF_hybrid = { }, /** * Load components for the stitches page. - * @function * @memberof GF_hybrid * @param {!HTMLElement} container receives the generated components * */ diff --git a/docs/js/nudgePairs.js b/docs/js/nudgePairs.js index f2272ce13..fc96d1c44 100644 --- a/docs/js/nudgePairs.js +++ b/docs/js/nudgePairs.js @@ -5,6 +5,7 @@ * Uses d3-force to apply forces to the nodes and links of the diagram. * Requires d3.js * + * @Ignore * @param {string} containerId * of element containing an SVG generated with PairSvg.create * in other words: the primary pair diagram @@ -30,7 +31,7 @@ function nudgePairs(containerId) { * Requires d3.js and DiagramSvg.linkPath function of GroundForge-opt.js. See also * - https://devdocs.io/d3~4/d3-force * - https://devdocs.io/d3~4/d3-selection - * @param svg SVG selection + * @param svg SVG element selected with d3.select * @param diagramType 'pair' or 'thread' (default: 'thread') */ function nudgeDiagram(svg, diagramType='thread') { diff --git a/docs/js/panel.js b/docs/js/panel.js index dd370cc54..518698ea1 100644 --- a/docs/js/panel.js +++ b/docs/js/panel.js @@ -1,3 +1,9 @@ +/** + * GroundForge component generator. + * + * Requires: d3.v4.min.js - GroundForge-opt.js - nudgePairs.js (nudgeDiagram) + * @namespace + */ const GF_panel = { svgSize: [ // portrait pages, size increases per droste step {width: 793.70079, height: 1122.5197}, // A4 @@ -97,6 +103,12 @@ const GF_panel = { } return false; }, + /** + * Calls nudgeDiagram to start or resume the layout animation. + * + * @param containerId + * @param type + */ nudge(containerId, type = 'thread') { console.log(`nudge called for container ${containerId} and diagram type ${type}`); nudgeDiagram(d3.select('#' + containerId).select("svg"), type); From 9b0278233ff6338857f23576e96145b3986d0e4e Mon Sep 17 00:00:00 2001 From: jo-pol Date: Sat, 24 Jan 2026 15:02:29 +0100 Subject: [PATCH 172/221] jsdocs for releases --- .github/workflows/jsdoc.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/jsdoc.yml b/.github/workflows/jsdoc.yml index a49524a7e..83a42f110 100644 --- a/.github/workflows/jsdoc.yml +++ b/.github/workflows/jsdoc.yml @@ -4,7 +4,8 @@ on: push: branches: [ main ] workflow_dispatch: - + release: + types: [published] jobs: build-jsdoc: runs-on: ubuntu-latest @@ -82,3 +83,9 @@ jobs: with: name: jsdoc path: docs/jsdoc/jsdoc.pdf + + - name: Upload PDF to GitHub Release + if: github.event_name == 'release' + uses: softprops/action-gh-release@v2 + with: + files: docs/jsdoc/jsdoc.pdf From bbf9e29e689ec9fbdba1154acbbb6369bbb6d417 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Wed, 28 Jan 2026 10:33:49 +0100 Subject: [PATCH 173/221] droste and stitches start differently, jsDoc --- docs/API/index.md | 9 ++-- docs/API/panels.md | 60 +------------------------ docs/droste.md | 11 ++++- docs/{API/hybrid.md => drosteMixer.md} | 10 +---- docs/js/hybrid.js | 45 ++++++++++--------- docs/js/nudgePairs.js | 12 ----- docs/js/panel.js | 62 ++++++++++++++++++++++---- docs/stitches.md | 10 ++++- test-docs/hybrid.html | 2 +- 9 files changed, 105 insertions(+), 116 deletions(-) rename docs/{API/hybrid.md => drosteMixer.md} (57%) diff --git a/docs/API/index.md b/docs/API/index.md index b96f3a59f..f8e481a0f 100644 --- a/docs/API/index.md +++ b/docs/API/index.md @@ -26,9 +26,10 @@ Current User Interfaces * [pattern editor](/GroundForge/pattern) * [stitches](/GroundForge/stitches) * [droste](/GroundForge/droste) -* [nets](/GroundForge/nets) -* [snow mixer](/GroundForge/mix4snow) -* [symmetry](/GroundForge/symmetry) +* Later pages + * [nets](/GroundForge/nets) + * [snow mixer](/GroundForge/mix4snow) + * [symmetry](/GroundForge/symmetry) Widgets / Work in progress ================ @@ -40,7 +41,7 @@ Some new scripts are started to share code between the user interfaces. * [Stitch gallery](stitch-gallery) shares code between _nets_, _stitches_ and _droste_. * [Panels](panels) is started to be resued on several existing pages before developing new pages. The stitches gallery is not yet flexible enough to be used along with the panels. -* [Hybrid](hybrid) was started to test the _panel.js_ code. +* [Hybrid](../drosteMixer.md) was started to test the _panel.js_ code. It is evolving into a page that combines functionality of the pages _stitches_, _droste_ and a variant of the _snow mixer_. This variant wass inspired when writing diff --git a/docs/API/panels.md b/docs/API/panels.md index fb68fdc1f..0024ffdb6 100644 --- a/docs/API/panels.md +++ b/docs/API/panels.md @@ -99,62 +99,4 @@ and images used by the _panel.js_ and adjust all their paths. Widget description ------------------ -To use the widget functions on your own page, include (copies of) the following scripts: -[d3.v4.min.js](/GroundForge/js/d3.v4.min.js), -[GroundForge-opt.js](/GroundForge/js/GroundForge-opt.js), -[nudgePairs.js](/GroundForge/js/nudgePairs.js) and -[panel.js](/GroundForge/js/panel.js). - -### `GF_panel.load(options)` - -Genrerates the panel structure: - -
    ...
    - -Options: -- `caption`: mandatory string, plain text or HTML string generated at the start of the `figcaption`. -- `id`: mandatory string, id for the generated `div`. -- `wnadHref`: typlicaly `javascript:...` to generate the diagram. - Creates the controls - ![wand](/GroundForge/images/wand.png) and - ![resume](/GroundForge/images/play.png) the latter calls nudge with diagramType 'thread' if control `color` is specified. -- `controls`: optional array of strings, default empty, specifies buttons to generate in the `figcaption`: - - `cleanup`: ![](/GroundForge/images/broom.png) removes overridden stitch definitions in a textarea. - - `color`: color chooser, looks and dialog may vary per browser. Its value is used to highlight threads or stitches in thread diagrams. - - `resize`: ![](/GroundForge/images/maximize.png) ![](/GroundForge/images/reset-dimensions.png) ![](/GroundForge/images/minimize.png) - For a `div` with CSS style `overflow: auto; resize: both;`. - A border makes the hot corner at the right bottom easy to find, even when a browser hides scroll bars. -- `size`: optional, object with `width` and `height` properties, e.g. `{width: "400px", height: "200px"}`. -- `parent`: optional, DOM element to append the generated panel to. - If omitted, the panel is appended to `document.body`. - -### `GF_panel.diagramSVG(options)` - -Generates an SVG diagram inside the `div` with the specified _id_. - -Also to be called by the wand button. -The page context determines where to get the query and droste steps. - -Options: -- `id`: optional string, id of a panel previously created with `GF_panel.load`. - If omitted, an SVG is returned as string to be used outside a panel context, no nudging is applied. -- `query`: mandatory string with the pattern definition and stitches. -- `type`: optional string, either `thread` or `pair`, default is `pair`. -- `steps`: array of strings, default empty, droste stitch definitions: - for each element a pair diagram is created from the (previous) thread diagram. - -Note that the URL query keys _droste2_ and _droste3_ are the equivalent of _steps[0]_ and _steps[1]_ respectively. -The widget uses the values of the _steps_ option. -The pages of GroundForge use the query parameters to pass a pattern -back and forth between _pattern_, _stitches_ and _droste_. -The query keys were numbered with 2nd and 3rd pair diagram in mind. - -### `GF_panel.nudge(id, diagramType)` - -Nudges the stitch positions in the panel with the given id. - -Default for `diagramType` is _pair_. - -Called by default for all diagrams except for a primary pair diagram (`type` _pair_, no `steps`), -also called by ![](/GroundForge/images/play.png). -A page may call this function explicitly for its primary pair diagram as well. \ No newline at end of file +See jsDoc, either in the source code or as generated with a GitHub workflow, uploaded with releases. diff --git a/docs/droste.md b/docs/droste.md index a9c9ffc70..6ae56c22e 100644 --- a/docs/droste.md +++ b/docs/droste.md @@ -12,6 +12,15 @@ css: sidebar: droste --- + +TO DO: +* Stitches gallery +* Apply to all (apply to ignored only for step-0) +* Beep on invalid input (tweak, spinners, specs). When pasting a URL in the first specifications field: strip until question mark. +* Start with step 1 unless a URL argument specifies a higher number. Always reveal specification panel but initially closed. +* Dynamic link to pattern page for the current pattern. For now, we only have a link to a changed pattern. + +
    \ No newline at end of file diff --git a/docs/API/hybrid.md b/docs/drosteMixer.md similarity index 57% rename from docs/API/hybrid.md rename to docs/drosteMixer.md index 718a2895b..7bf4004ab 100644 --- a/docs/API/hybrid.md +++ b/docs/drosteMixer.md @@ -17,19 +17,13 @@ Work in progress Inspired by [mix snow with two droste steps](/GroundForge-help/snow-mix/droste) and the desire to develop scripts for reusable widgets. -Usage: see sources -for .md of [this]({{ site.github.repository_url}}/blob/master/docs/API/hybrid.md) -and [stitches]({{ site.github.repository_url}}/blob/master/docs/stitches.md). -and [.html]({{ site.github.repository_url}}/blob/master/test-docs/hybrid.html). -Note the different locations of the scripts, mark down front matter expects them in docs/js. - TO DO: * Stitches gallery * Apply to all (apply to ignored only for step-0) * Beep on invalid input (tweak, spinners, specs). When pasting a URL in the first specifications field: strip until question mark. +* Dynamic link to pattern page _inside the pattern gallery_. - + \ No newline at end of file diff --git a/docs/js/hybrid.js b/docs/js/hybrid.js index 673bac558..ca68271c5 100644 --- a/docs/js/hybrid.js +++ b/docs/js/hybrid.js @@ -344,40 +344,43 @@ const GF_hybrid = { // TODO: second step of droste stitches, requires more intelligence in resetting previously assigned stitches }, /** - * Load components for the droste page. - * @memberof GF_hybrid + * Wrapper for loadSimple. Initial step is 1 and specs panel is shown immediately + * * @param {!HTMLElement} container receives the generated components - * @param {!number} initialStep default: 1, 0 for a combination of the stitches page and droste page */ - loadDroste(container, initialStep = 1){ - container.insertAdjacentHTML("beforeend",` - - - `); - document.getElementById("drosteStep") - .addEventListener('change', e => { - const val = parseInt(e.target.value, 10); - const step = isNaN(val) ? initialStep : Math.min(3, Math.max(initialStep, val)); - document.getElementById("drosteStep").value = step; - document.getElementById("threadStep").value = step; - document.getElementById("pairStep").value = step; - }); - this.loadSimple(container, initialStep, ['drosteStitches', 'pairStep', 'threadStep', 'snow3'] ); + loadDroste(container){ + this.loadSimple(container, 1, ['drosteStitches', 'pairStep', 'threadStep', 'snow3'] ); }, /** - * Load components for the stitches page. - * @memberof GF_hybrid + * Wrapper for loadSimple. Initial step is 0 and specs panel is initially hidden, shown when step becomes larger. + * * @param {!HTMLElement} container receives the generated components * */ loadStitches(container){ this.loadSimple(container, 0, ['drosteStitches', 'pairStep', 'threadStep', 'snow3', 'specs'] ); }, /** - * Common code for loadStitches and loadDroste, hiding some components generated by load. - * @Ignore + * Wrapper for load. Hiding some elements and adding a control that keeps both step inputs in sync. */ loadSimple(container, initialStep, hiddenElements){ console.log('================ Loading panels ================'); + container.insertAdjacentHTML("beforeend",` + + + `); + document.getElementById("drosteStep") + .addEventListener('change', e => { + const val = parseInt(e.target.value, 10); + const step = isNaN(val) ? 0 : Math.min(3, Math.max(initialStep, val)); + document.getElementById("drosteStep").value = step; + document.getElementById("threadStep").value = step; + document.getElementById("pairStep").value = step; + const specsStyle = document.getElementById("specs").parentNode.style; + if(step>0 && specsStyle.display === "none"){ + specsStyle.display = "block"; + document.getElementById("specs").style.height = "0"; + } + }); GF_tiles = {loadGallery (namedArgs){ }}; // dummy to avoid errors this.snow3 = []; // clear for performance this.snow4 = []; // clear for performance diff --git a/docs/js/nudgePairs.js b/docs/js/nudgePairs.js index fc96d1c44..1f9c40315 100644 --- a/docs/js/nudgePairs.js +++ b/docs/js/nudgePairs.js @@ -1,15 +1,3 @@ - -/** - * Spreads nodes in a pair diagram to reduce overlaps. - * - * Uses d3-force to apply forces to the nodes and links of the diagram. - * Requires d3.js - * - * @Ignore - * @param {string} containerId - * of element containing an SVG generated with PairSvg.create - * in other words: the primary pair diagram - */ function nudgePairs(containerId) { var svg = d3.select(containerId+" svg") diff --git a/docs/js/panel.js b/docs/js/panel.js index 518698ea1..636a10613 100644 --- a/docs/js/panel.js +++ b/docs/js/panel.js @@ -13,15 +13,26 @@ const GF_panel = { panelSize: {width: '300px', height: '300px'}, // default panel size /** - * Creates and appends a diagram panel with controls to the specified parent element. + * Creates the panel structure with a configurable set of controls in the caption. + * + *
    ...
    * * @param {Object} config - Configuration for the panel. - * @param {string} config.caption - The caption text for the panel. - * @param {string} config.id - The unique ID for the panel container. - * @param {string} [config.wandHref] - Optional URL for the reload (wand) icon. - * @param {Array} [config.controls] - List of control names to include (e.g., 'cleanup', 'color', 'resize'). + * @param {string} config.caption - Plain text or HTML string generated at the start of the `figcaption`. + * @param {string} config.id - The unique ID for the `div` element. + * @param {string} [config.wandHref] - Optional URL for the reload (wand) icon, typically: `javascript:...`. + * Creates the controls _wand_ and _href_. + * @param {Array} [config.controls] - List of control names to include. + * Recognized values: + * - 'cleanup': Adds a cleanup (broom) button to clean up content. + * Intended for the specification panel on a droste page. + * - 'color': Adds a color chooser. + * looks and dialog may vary per browser. + * Its value is used to highlight threads or stitches in thread diagrams. + * - 'resize': Adds maximize, minimize, and reset size controls. * @param {Object} [config.size] - Optional size for the panel (e.g., `{width: '300px', height: '300px'}`). - * @param {HTMLElement} config.parent - The parent element to which the panel will be appended. + * @param {HTMLElement} [config.parent] - The parent element to which the panel will be appended. + * Default: `document.body`. */ load(config) { const { caption, id, wandHref, controls = [], size = this.panelSize, parent } = config; @@ -104,10 +115,24 @@ const GF_panel = { return false; }, /** - * Calls nudgeDiagram to start or resume the layout animation. + * Spreads nodes in a pair diagram to reduce overlaps. * - * @param containerId - * @param type + * Called by default for all diagrams except for a primary pair diagram (no `steps`), + * Also called by resume control which is also available for the primary pair diagram. + * + * Uses d3-force to apply forces to the nodes and links of a diagram. + * Requires d3.js and DiagramSvg.linkPath function of GroundForge-opt.js. See also + * - https://devdocs.io/d3~4/d3-force + * - https://devdocs.io/d3~4/d3-selection + * + * Wrapper for nudgeDiagram to hide D3js for the caller. + * + * @param {string} containerId Id of an element containing an SVG with the following requirements. + * - Elements with class `node` and an `id` attribute + * - Must have attribute `transform="translate(x,y)"` + * - Elements with class `link` and an `id` attribute containing node IDs separated by `-` + * - Must have attribute `d` defining a path + * @param {string} [type] Defaults to 'pair'. Other option is 'thread'. */ nudge(containerId, type = 'thread') { console.log(`nudge called for container ${containerId} and diagram type ${type}`); @@ -133,6 +158,25 @@ const GF_panel = { element.scrollIntoView({behavior: 'smooth', block: 'center'}); } }, + /** + * Generates an SVG diagram. + * + * @param {Object} namedArgs + * @param {string} [namedArgs.id] - Optional ID of the container element to render the SVG into. + * @param {string} [namedArgs.type='pair'] - Type of diagram: 'pair' or 'thread'. + * @param {Array} [namedArgs.steps=[]] - droste stitch definitions: + * for each element a pair diagram is created from the (previous) thread diagram. + * @param {string} namedArgs.query - URL arguments. + * Note that the arguments _droste2_ and _droste3_ are the equivalent of _steps[0]_ and _steps[1]_ respectively. + * This method uses the values of the _steps_ option. + * The pages of GroundForge use the query parameters to pass a pattern + * back and forth between _pattern_, _stitches_ and _droste_. + * The query keys were numbered with 2nd and 3rd pair diagram in mind. + * @param {Object} [namedArgs.size] - Size configuration for the SVG. + * Default (A4 similar to US letter, A3 similar to Tabloid or Ledger, A2) depends on the number of steps. + * @returns {HTMLElement} SVG unless `id` is provided. + * To be used outside a panel context, no nudging is applied. + */ diagramSVG(namedArgs) { console.time('diagramSVG'); const { diff --git a/docs/stitches.md b/docs/stitches.md index dcc0a44cd..ab18f8b47 100644 --- a/docs/stitches.md +++ b/docs/stitches.md @@ -12,6 +12,14 @@ css: sidebar: stitches --- +TO DO: +* Stitches gallery. +* Apply to all/ignored. +* Beep on invalid input (tweak, spinners, specs). When pasting a URL in the first specifications field: strip until question mark. +* Allow droste steps but allways start with step 0 and the pair diagram rendered. Reveal specification panel once another step nummer is selected. +* Dynamic link to pattern page for the current pattern. For now, we only have a link to a changed pattern. + +
    \ No newline at end of file diff --git a/test-docs/hybrid.html b/test-docs/hybrid.html index 65d4243a0..94233f34d 100644 --- a/test-docs/hybrid.html +++ b/test-docs/hybrid.html @@ -16,7 +16,7 @@ = window.location.origin.startsWith('http') ? window.location.origin + '/GroundForge/docs' : window.location.pathname.replace(/GroundForge.*/g, '/GroundForge/docs'); - GF_hybrid.load(document.body) + GF_hybrid.loadStitches(document.body) document.querySelectorAll('figcaption img').forEach(img => { img.src = img.src.replace(/.*GroundForge/g, GF_hybrid.content_home); }); From 239229b9431a85584d6e73940bc266c893864c93 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 30 Jan 2026 08:38:30 +0100 Subject: [PATCH 174/221] mark dirty on changed step nr, allow zero --- docs/js/hybrid.js | 12 ++++++++++-- test-docs/hybrid.html | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/js/hybrid.js b/docs/js/hybrid.js index ca68271c5..74b453875 100644 --- a/docs/js/hybrid.js +++ b/docs/js/hybrid.js @@ -331,9 +331,11 @@ const GF_hybrid = { specsPanelContent.style.width = "100%"; specsPanelContent.style.height = "2px"; for (let type of ["pair", "thread"]) { + document.getElementById(type + '_panel').innerHTML = "Click/tap the wand to (re)generate the diagram."; + document.getElementById(type + '_panel').style.color = "#bbbbbb"; document.querySelectorAll(`input[name="${type}Step"]`).forEach(function (elem) { elem.addEventListener('change', function () { - document.getElementById(type + '_panel').style.backgroundColor = "rgb(238, 238, 238)"; + this.markPanelDirty(type); }); }); } @@ -359,6 +361,9 @@ const GF_hybrid = { loadStitches(container){ this.loadSimple(container, 0, ['drosteStitches', 'pairStep', 'threadStep', 'snow3', 'specs'] ); }, + markPanelDirty(type) { + document.getElementById(type + '_panel').style.backgroundColor = "rgb(238, 238, 238)"; + }, /** * Wrapper for load. Hiding some elements and adding a control that keeps both step inputs in sync. */ @@ -371,7 +376,7 @@ const GF_hybrid = { document.getElementById("drosteStep") .addEventListener('change', e => { const val = parseInt(e.target.value, 10); - const step = isNaN(val) ? 0 : Math.min(3, Math.max(initialStep, val)); + const step = isNaN(val) ? 0 : Math.min(3, Math.max(0, val)); document.getElementById("drosteStep").value = step; document.getElementById("threadStep").value = step; document.getElementById("pairStep").value = step; @@ -380,6 +385,9 @@ const GF_hybrid = { specsStyle.display = "block"; document.getElementById("specs").style.height = "0"; } + for (let type of ["pair", "thread"]) { + this.markPanelDirty(type); + } }); GF_tiles = {loadGallery (namedArgs){ }}; // dummy to avoid errors this.snow3 = []; // clear for performance diff --git a/test-docs/hybrid.html b/test-docs/hybrid.html index 94233f34d..65d4243a0 100644 --- a/test-docs/hybrid.html +++ b/test-docs/hybrid.html @@ -16,7 +16,7 @@ = window.location.origin.startsWith('http') ? window.location.origin + '/GroundForge/docs' : window.location.pathname.replace(/GroundForge.*/g, '/GroundForge/docs'); - GF_hybrid.loadStitches(document.body) + GF_hybrid.load(document.body) document.querySelectorAll('figcaption img').forEach(img => { img.src = img.src.replace(/.*GroundForge/g, GF_hybrid.content_home); }); From 2ddbb277fc73091f39b3f8bd51a56a60291a2b26 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Sat, 31 Jan 2026 16:40:32 +0100 Subject: [PATCH 175/221] apply to buttons, only svg's become grey on changed step nr --- docs/js/hybrid.js | 53 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 16 deletions(-) diff --git a/docs/js/hybrid.js b/docs/js/hybrid.js index 74b453875..3c8fc4168 100644 --- a/docs/js/hybrid.js +++ b/docs/js/hybrid.js @@ -232,7 +232,8 @@ const GF_hybrid = { */ load(container) { function twister(type){ - return `${type}s`; + // TODO: shared code on top of loadSimple + return `${type}s`; } function galleryPanels() { const galleries = { @@ -294,7 +295,14 @@ const GF_hybrid = { } galleryPanels(); GF_panel.load({caption: "tweak selected stitch", id: "tweak", size:{width:'´98%', height: 'auto'}, parent: container}); - container.insertAdjacentHTML('beforeend',`

    `); + container.insertAdjacentHTML('beforeend',` +

    + Assign tweaked stitch + + or click a stich in the pair diagram. + +

    + `); GF_panel.load({caption: twister("pair"), id: "pair_panel", wandHref: pairWandHref, controls: ["resize"], parent: container}); GF_panel.load({caption: twister("thread"), id: "thread_panel", wandHref: threadWandHref, controls: ["resize", "color"], parent: container}); GF_panel.load({caption: 'stitch enumeration', id: "legend_panel", controls: ["resize"], parent: container}); @@ -333,11 +341,7 @@ const GF_hybrid = { for (let type of ["pair", "thread"]) { document.getElementById(type + '_panel').innerHTML = "Click/tap the wand to (re)generate the diagram."; document.getElementById(type + '_panel').style.color = "#bbbbbb"; - document.querySelectorAll(`input[name="${type}Step"]`).forEach(function (elem) { - elem.addEventListener('change', function () { - this.markPanelDirty(type); - }); - }); + document.getElementById(`${type}Step`).addEventListener('change', GF_hybrid.stepNrChanged); } }, setRecipe(basicStitch, drosteStitches) { @@ -361,8 +365,26 @@ const GF_hybrid = { loadStitches(container){ this.loadSimple(container, 0, ['drosteStitches', 'pairStep', 'threadStep', 'snow3', 'specs'] ); }, - markPanelDirty(type) { - document.getElementById(type + '_panel').style.backgroundColor = "rgb(238, 238, 238)"; + stepNrChanged(e) { + const id = e.target.getAttribute("id"); + const val = parseInt(e.target.value, 10); + const step = isNaN(val) ? 0 : Math.min(3, Math.max(0, val)); + document.getElementById(id).value = step; + if (id !== 'threadStep') { + // id can be pairStep or drosteStep, the latter changes both others + document.getElementById("ignored").style.display = + step === 0 ? "inline-block" : "none"; + } + const panelIds = id === 'drosteStep' + ? ['pair_panel', 'thread_panel'] + : [id.replace('Step', '') + '_panel']; + + panelIds.forEach(pid => { + const panelEl = document.getElementById(pid); + if (panelEl.getElementsByTagName('svg').length > 0) + panelEl.style.backgroundColor = 'rgb(238, 238, 238)'; + }); + return step; }, /** * Wrapper for load. Hiding some elements and adding a control that keeps both step inputs in sync. @@ -375,23 +397,22 @@ const GF_hybrid = { `); document.getElementById("drosteStep") .addEventListener('change', e => { - const val = parseInt(e.target.value, 10); - const step = isNaN(val) ? 0 : Math.min(3, Math.max(0, val)); + const step = GF_hybrid.stepNrChanged(e); document.getElementById("drosteStep").value = step; document.getElementById("threadStep").value = step; document.getElementById("pairStep").value = step; const specsStyle = document.getElementById("specs").parentNode.style; - if(step>0 && specsStyle.display === "none"){ + if(step>0){ + if(specsStyle.display === "none") + document.getElementById("specs").style.height = "0"; specsStyle.display = "block"; - document.getElementById("specs").style.height = "0"; - } - for (let type of ["pair", "thread"]) { - this.markPanelDirty(type); } }); + // Disable galleries that will not be used GF_tiles = {loadGallery (namedArgs){ }}; // dummy to avoid errors this.snow3 = []; // clear for performance this.snow4 = []; // clear for performance + this.load(container); for (let id of ['pairStep', 'threadStep']) { document.getElementById(id).value = initialStep; From 82df83c258c4c02366292d4b60af2c27b83b19e1 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Sun, 1 Feb 2026 20:54:34 +0100 Subject: [PATCH 176/221] step logic --- docs/droste.md | 7 +-- docs/drosteMixer.md | 10 ++-- docs/js/hybrid.js | 118 +++++++++++++++++++++++--------------------- docs/stitches.md | 4 +- 4 files changed, 74 insertions(+), 65 deletions(-) diff --git a/docs/droste.md b/docs/droste.md index 6ae56c22e..c90760ecd 100644 --- a/docs/droste.md +++ b/docs/droste.md @@ -12,12 +12,13 @@ css: sidebar: droste --- +Starts with step 1 unless a URL argument specifies a higher number. Always reveal specification panel but initially closed. TO DO: -* Stitches gallery -* Apply to all (apply to ignored only for step-0) +* Stitches gallery. +* Swatch size. +* Apply to all/ignored. * Beep on invalid input (tweak, spinners, specs). When pasting a URL in the first specifications field: strip until question mark. -* Start with step 1 unless a URL argument specifies a higher number. Always reveal specification panel but initially closed. * Dynamic link to pattern page for the current pattern. For now, we only have a link to a changed pattern.
    diff --git a/docs/drosteMixer.md b/docs/drosteMixer.md index 7bf4004ab..fa309ac08 100644 --- a/docs/drosteMixer.md +++ b/docs/drosteMixer.md @@ -1,7 +1,7 @@ --- layout: default title: wip -sidebar: mix4snow +sidebar: droste mixer javascript: - d3.v4.min.js - GroundForge-opt.js @@ -12,14 +12,12 @@ css: - hybrid.css --- -Work in progress -================ - Inspired by [mix snow with two droste steps](/GroundForge-help/snow-mix/droste) and the desire to develop scripts for reusable widgets. TO DO: -* Stitches gallery -* Apply to all (apply to ignored only for step-0) +* Stitches gallery. +* Swatch size. +* Apply to all/ignored. * Beep on invalid input (tweak, spinners, specs). When pasting a URL in the first specifications field: strip until question mark. * Dynamic link to pattern page _inside the pattern gallery_. diff --git a/docs/js/hybrid.js b/docs/js/hybrid.js index 3c8fc4168..3e23238e7 100644 --- a/docs/js/hybrid.js +++ b/docs/js/hybrid.js @@ -230,11 +230,8 @@ const GF_hybrid = { * @memberof GF_hybrid * @param {!HTMLElement} container receives the generated components */ - load(container) { - function twister(type){ - // TODO: shared code on top of loadSimple - return `${type}s`; - } + load(container, initialStep=0) { + console.log('================ Loading panels ================'); function galleryPanels() { const galleries = { 'pattern': {caption: 'Pattern gallery', height: '150px'}, @@ -285,6 +282,12 @@ const GF_hybrid = { For ideas see this page. `; } + function twister(type) { + return ``; + } + function prefixedTwister(type){ + return `${type}s

    Flip: - - - + + +

    `); const params = new URLSearchParams(q); From 7606ce1b7fd7ba84635c139f60497b1970b5b260 Mon Sep 17 00:00:00 2001 From: jo-pol Date: Wed, 13 May 2026 10:36:56 +0200 Subject: [PATCH 191/221] wip --- docs/drosteMixer.md | 2 +- docs/js/hybrid.js | 16 ++++++++++++---- test-docs/hybrid.html | 2 +- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/docs/drosteMixer.md b/docs/drosteMixer.md index 7a28cd8f0..ab7379e65 100644 --- a/docs/drosteMixer.md +++ b/docs/drosteMixer.md @@ -17,5 +17,5 @@ css: \ No newline at end of file diff --git a/docs/js/hybrid.js b/docs/js/hybrid.js index f549c0122..0f2b30e1b 100644 --- a/docs/js/hybrid.js +++ b/docs/js/hybrid.js @@ -8,7 +8,6 @@ * - GroundForge-opt.js * - nudgePairs.js (nudgeDiagram) * - panel.js - * - hybrid.css * - stitch-gallery.js * @namespace */ @@ -319,7 +318,7 @@ const GF_hybrid = { let q = new URL(document.documentURI).search.slice(1) .replaceAll(/[^a-zA-Z0-9=,.-]/g,''); if (q === "" || !q.includes('shiftRows')) { - q = "patchWidth=7&patchHeight=8&footside=----,---b&tile=5-&headside=-,c&shiftColsSW=-1&shiftRowsSW=1&shiftColsSE=1&shiftRowsSE=1&footsideStitch=tr&headsideStitch=tl&tileStitch=ct&e1=ctc" + q = "patchWidth=7&patchHeight=7&footside=---x,---4,---x,---4&tile=5-,-5,5-,-5&headside=-,c,-,c,&shiftColsSW=0&shiftRowsSW=4&shiftColsSE=2&shiftRowsSE=2&e1=lclc&l2=llctt&f2=rcrc&d2=rrctt&e3=rcrc&l4=llctt&f4=lclc&d4=rrctt&droste2=e12=clcrcl,e13=ct,f42=ctcl,e32=f22=ctcr,e33=f43=lct,e31=f21=lctc,e11=rclcrc,f23=rct,f41=rctc,e10=tc,f20=tcl,e30=f40=tcr" } galleryPanels(); GF_panel.load({caption: "tweak selected stitch", id: "tweak", size:{width:'98%', height: 'auto'}, parent: container}); @@ -428,7 +427,7 @@ const GF_hybrid = { * @param {!HTMLElement} container receives the generated components */ loadDroste(container){ - this.loadSimple(container, 1, ['drosteStitches', 'pairStep', 'threadStep', 'snow3'] ); + this.loadSimple(container, 1, ['drosteStitches', 'pairStep', 'threadStep', 'snow3', 'snow4'] ); }, /** * Wrapper for loadSimple. Initial step is 0 and specs panel is initially hidden, shown when step becomes larger. @@ -436,7 +435,16 @@ const GF_hybrid = { * @param {!HTMLElement} container receives the generated components * */ loadStitches(container){ - this.loadSimple(container, 0, ['drosteStitches', 'pairStep', 'threadStep', 'snow3', 'specs'] ); + this.loadSimple(container, 0, ['drosteStitches', 'pairStep', 'threadStep', 'snow3', 'snow4', 'drosteStep', 'specs'] ); + }, + /** + * Wrapper for load. Hides the third step field + * + * @param {!HTMLElement} container receives the generated components + * */ + loadDrosteMixer(container){ + this.load(container); + document.getElementById('drosteStep').parentNode.style.display = 'none'; }, /** * Wrapper for load. Hiding some elements. diff --git a/test-docs/hybrid.html b/test-docs/hybrid.html index 525828b17..06cb029cc 100644 --- a/test-docs/hybrid.html +++ b/test-docs/hybrid.html @@ -17,7 +17,7 @@ = window.location.origin.startsWith('http') ? window.location.origin + '/GroundForge/docs' : window.location.pathname.replace(/GroundForge.*/g, '/GroundForge/docs'); - GF_hybrid.load(document.body) + GF_hybrid.loadStitches(document.body) document.querySelectorAll('figcaption img, #stitches img').forEach(img => { img.src = img.src.replace(/.*GroundForge/g, GF_hybrid.content_home); }); From ca5d1a696e7648ead2103e0350a46e2b32fd203e Mon Sep 17 00:00:00 2001 From: jo-pol Date: Wed, 13 May 2026 13:07:25 +0200 Subject: [PATCH 192/221] inial step nr, notes to issue --- docs/droste.md | 4 +--- docs/drosteMixer.md | 2 +- docs/js/hybrid.js | 4 ++-- docs/stitches.md | 4 +--- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/docs/droste.md b/docs/droste.md index 412a25a99..8705aceb3 100644 --- a/docs/droste.md +++ b/docs/droste.md @@ -13,9 +13,7 @@ css: sidebar: droste --- -Starts with step 1 unless a URL argument specifies a higher number. Always reveals specification panel but initially closed. - -[W.I.P.](https://github.com/d-bl/GroundForge/issues/259) +Notes on [W.I.P.](https://github.com/d-bl/GroundForge/issues/259)
    + +# Stitches Generator + +![][p-alfa1] + +[p-alfa1]: random-stitches.svg "stitch-generator in Alphabet 1, by M. Tempels" + +This feature generates a list of random stitches. +Please note: a number that is too low or too high will be set to 1 resp. the maximal number allowed. + +  +**The number of stitches generated.** +Minimal 1, maximal 25. + +  +**The maximal number of crosses in a stitch.** +Minimal 1, maximal 5. The generated stitch has at least one cross. + +  +**The maximal number of twists between two crosses.** +Minimal 1, maximal 5. +The generated stitch can have 0 twists between two crosses, e.g. "cc". + + +  +**The maximal number of twists between two stitches** +Minimal 1, maximal 5. +The generated stitch can have 0 twists at the front and at the back, e.g. "ctc". + +
    + +
    + + +
      +**Position of twists between stitches:** +Twists can be at the front (Rctc), at the back (ctcL), at front and back (RctcL) of the generated stitch or none (ctc). + + +

    diff --git a/docs/random-stitches/random-stitches.css b/docs/random-stitches/random-stitches.css index 89308aaef..a197ec443 100644 --- a/docs/random-stitches/random-stitches.css +++ b/docs/random-stitches/random-stitches.css @@ -1,5 +1,9 @@ /* table in stitch-generator/index.md */ -.stgen td {text-align:left; vertical-align:top; padding: 5px 15px 5px 5px; border-style:hidden;} -.stgen th {text-align:left; vertical-align:top; padding: 5px 15px 5px 5px; border-style:hidden; font-weight:bold;} - +input[type="number"] { width: 3em; } +p:has(> input:first-child) { + text-indent: -5em; + padding-left: 5em; + white-space: normal; +} +#between { display: inline-block; } \ No newline at end of file From 03467f5685010ee798938bcb6f608a9d2ed7447b Mon Sep 17 00:00:00 2001 From: jo-pol Date: Thu, 14 May 2026 11:29:41 +0200 Subject: [PATCH 195/221] random maintenance experiment --- docs/random-stitches/index2.md | 14 +++++++------- docs/random-stitches/random-stitches.css | 3 +-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/docs/random-stitches/index2.md b/docs/random-stitches/index2.md index a3354f785..35fe3da61 100644 --- a/docs/random-stitches/index2.md +++ b/docs/random-stitches/index2.md @@ -17,31 +17,31 @@ This feature generates a list of random stitches. Please note: a number that is too low or too high will be set to 1 resp. the maximal number allowed.   -**The number of stitches generated.** +**The number of stitches generated.**
    Minimal 1, maximal 25.   -**The maximal number of crosses in a stitch.** +**The maximal number of crosses in a stitch.**
    Minimal 1, maximal 5. The generated stitch has at least one cross.   -**The maximal number of twists between two crosses.** +**The maximal number of twists between two crosses.**
    Minimal 1, maximal 5. The generated stitch can have 0 twists between two crosses, e.g. "cc".   -**The maximal number of twists between two stitches** +**The maximal number of twists between two stitches**
    Minimal 1, maximal 5. The generated stitch can have 0 twists at the front and at the back, e.g. "ctc". -
    +
    -
      -**Position of twists between stitches:** +  +**Position of twists between stitches:**
    Twists can be at the front (Rctc), at the back (ctcL), at front and back (RctcL) of the generated stitch or none (ctc). - + or click a stich in the pair diagram.

    +
    `); GF_panel.load({caption: prefixedTwister("pair"), id: "pair_panel", wandHref: pairWandHref, controls: ["resize"], parent: container}); GF_panel.load({caption: prefixedTwister("thread"), id: "thread_panel", wandHref: threadWandHref, controls: ["resize", "color"], parent: container}); @@ -474,33 +491,38 @@ const GF_hybrid = { }, assignToAll() { const stepValue = document.getElementById('pairStep').value * 1; + const stitchValue = document.getElementById('basicStitchInput').value; + const stitchTitles = Array.from(document.getElementById('pair_panel') + .getElementsByTagName('title') + ); if (document.getElementById('drosteStitches').value.trim() !== '') { - alert("not implemented for droste applied to basic stitch") + this.showToast("Not implemented for droste applied to basic stitch") + } else if (stepValue !== 0) { + document.getElementById('droste' + stepValue).value = + stitchValue; // default for this droste level + } else if (!stitchTitles || stitchTitles.length === 0) { + this.showToast("No stitches found in the pair diagram") } else { - const stitchValue = document.getElementById('basicStitchInput').value; + document.getElementById('pair_panel').style.backgroundColor = "#f0f0f0"; // TODO share code with markDirty const d0 = document.getElementById('droste0'); - document.getElementById('pair_panel').style.backgroundColor = "#f3f3f3"; // TODO share code with markDirty - if (stepValue !== 0) { - document.getElementById('droste' + stepValue).value = - stitchValue; - } else { - const params = new URLSearchParams(d0.value); - for (const key of Array.from(params.keys())) { - if (/^[a-zA-Z]\d+$/.test(key)) { - params.delete(key); - } + const params = new URLSearchParams(d0.value); + const regex = /^[a-zA-Z]{1,2}\d+$/; + // remove predefined stitches + for (const key of Array.from(params.keys())) { + if (regex.test(key)) { + params.delete(key); } - Array.from(document.getElementById('pair_panel') - .getElementsByTagName('title') - ).forEach(el => { - const [stitch,tag = ''] = el.textContent.toLowerCase().split(/ - /); - if (tag !== '') { - params.set(tag, stitchValue); - } - }); - d0.value = Array.from(params).map(([k, v]) => `${k}=${v}`).join('&'); - console.log("---------"+d0.value); } + // add stitches with ID-s from diagram + stitchTitles.forEach(el => { + const [stitch,tag = ''] = el.textContent.toLowerCase().split(/ - /); + if (tag !== '') { + params.set(tag, stitchValue); + } + }); + d0.value = Array.from(params).map(([k, v]) => `${k}=${v}`).join('&'); + console.log("---------"+d0.value); + } } } \ No newline at end of file From 25c3f176bc301350ac31446aaa0812276bbb3aca Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 15 May 2026 13:43:21 +0200 Subject: [PATCH 198/221] validation --- docs/assets/css/hybrid.css | 1 + docs/js/hybrid.js | 77 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 74 insertions(+), 4 deletions(-) diff --git a/docs/assets/css/hybrid.css b/docs/assets/css/hybrid.css index 5a0b10a58..7cd315b5c 100644 --- a/docs/assets/css/hybrid.css +++ b/docs/assets/css/hybrid.css @@ -41,6 +41,7 @@ position: fixed; bottom: 20px; left: 20px; + margin-right: 20px; background: #333; color: #fff; padding: 12px 24px; diff --git a/docs/js/hybrid.js b/docs/js/hybrid.js index 114862d91..8eff817ab 100644 --- a/docs/js/hybrid.js +++ b/docs/js/hybrid.js @@ -52,6 +52,63 @@ const GF_hybrid = { ['623541-a','clclc','ctc,ct,crc,ctc,ctc'], ['623541-b','crcrc','cl,ctctcr,ct,ctc,c'] ], + lastValidBasicStitchValue: '', + lastValidDrosteOnBasicValue: '', + fixBasicStitchValue(basicStitchEl, drostOnBasicEl) { + let value = basicStitchEl.value.toLowerCase().trim(); + const hasDroste = drostOnBasicEl && drostOnBasicEl.value.trim() !== ''; + const regexp = hasDroste ? /^[tclr]*$/ : /^(-|([tclr])*)$/; + if (!regexp.test(value)) { + basicStitchEl.value = this.lastValidBasicStitchValue; + const pos1 = basicStitchEl.selectionStart - 1; + const pos2 = basicStitchEl.selectionEnd - 1; + basicStitchEl.setSelectionRange(pos1, pos2); + this.showToast(` + Basic stitch only allows the characters T, C, L, R. + When "Droste applied to basic stitch" has content, + T is replaced with LR for proper flipping. + Without droste, just a "-" is also allowed to drop stitches. + `); + return; + } + if (hasDroste) { + value = value.replace(/[tT]/g, 'LR'); + } + basicStitchEl.value = value.toUpperCase() + GF_hybrid.lastValidBasicStitchValue = value; + }, + fixDrosteOnBasic(basicStitchEl, drosteOnBasicEl) { + function isValid(str) { + if(str === '') return true + const validChars = /[^x0-9=ctlr,.;]/i + const repeatedSeparator = /[,.;][,.;]/; + const groupRegex = /^(x(([0-9]+)=?)?)?[ctlr]*$/i; + if (validChars.test(str)) return false; + if (repeatedSeparator.test(str)) return false; + const stitches = str.split(/[,.;]/); + if (stitches.length > drosteOnBasicEl.value.length) return false; + return stitches.every(g => groupRegex.test(g)); + } + const value = drosteOnBasicEl.value.trim().toUpperCase(); + drosteOnBasicEl.value = value; + if (isValid(value)) { + GF_hybrid.lastValidDrosteOnBasicValue = value; + drosteOnBasicEl.value = value; + } else { + drosteOnBasicEl.value = GF_hybrid.lastValidDrosteOnBasicValue; + const pos1 = drosteOnBasicEl.selectionStart - 1; + const pos2 = drosteOnBasicEl.selectionEnd - 1; + drosteOnBasicEl.setSelectionRange(pos1, pos2); + GF_hybrid.showToast(` + "Droste applied to basic stitch" needs either numbered stitches, + or as many stitches as characters in "Basic stitch". + Allowed separators between stitches: ";.," + Example of a numbered stitch: "X12=CTCT". + Default for not specified stitches is "CTC". + `); + } + }, + generateSelectedDiagram(diagramType) { const drosteIndex = parseInt(document.getElementById(`${diagramType}Step`).value, 10); const steps = []; @@ -362,11 +419,21 @@ const GF_hybrid = { document.getElementById('tweak').insertAdjacentHTML('beforeend',`


    Flip: @@ -374,6 +441,8 @@ const GF_hybrid = {

    `); + this.lastValidBasicStitchValue = document.getElementById('basicStitchInput').value.trim(); + this.lastValidDrosteOnBasicValue = document.getElementById('drosteStitches').value.trim(); const params = new URLSearchParams(q); document.getElementById('tweak').parentNode.style = `width: calc(100% - 7px)`; document.getElementById('pairStep').value = params.get('pairStep') || 0; @@ -496,12 +565,12 @@ const GF_hybrid = { .getElementsByTagName('title') ); if (document.getElementById('drosteStitches').value.trim() !== '') { - this.showToast("Not implemented for droste applied to basic stitch") + this.showToast("Assign to all is not implemented for droste applied to basic stitch") } else if (stepValue !== 0) { document.getElementById('droste' + stepValue).value = stitchValue; // default for this droste level } else if (!stitchTitles || stitchTitles.length === 0) { - this.showToast("No stitches found in the pair diagram") + this.showToast("No stitches found in the pair diagram.") } else { document.getElementById('pair_panel').style.backgroundColor = "#f0f0f0"; // TODO share code with markDirty const d0 = document.getElementById('droste0'); From d1d74ded572856be379622e159b54155a185bc7a Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 15 May 2026 13:58:32 +0200 Subject: [PATCH 199/221] validate tweaked stitches, capitals --- docs/js/hybrid.js | 70 +++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/docs/js/hybrid.js b/docs/js/hybrid.js index 8eff817ab..a0115fb7d 100644 --- a/docs/js/hybrid.js +++ b/docs/js/hybrid.js @@ -16,41 +16,41 @@ const GF_hybrid = { snow4:[ // screenshots taken at 50% zoom level // ndb: patterns from "naar de bron" by Nora Andries - ['ndb-9Z.png','rclrcr','x0=cl,x1=llclcr,x2=llclcrclcll,x3=crclcrcl,x4=clcrll,x5=c','x00=x70=c,x80=x81=x90=x91=lrt '], - ['ndb-10N.png','clclrcrclr','x0=x7=c,x1=rclcr,x2=crc,x3=rctc,x4=ctcl,x5=clcr,x6=crcl,x8=x9=tt','x00=,x70=c,x80=x81=x90=x91=tt '], - ['spider-1-ring.png','clrclr','x1=x2=ctctc,x4=x5=tt'], - ['spider-2-rings.png','clrclr','x1=ctcrctc,x2=ctclctc,x4=x5=tt'], - ['spider-3-rings.png','clrcclrclr','x3=ctcctc,x8=x9=tt','x33=ctcctc,x80=x81=x90=x91=tt'] + ['ndb-9Z.png', 'RCLRCR','X0=CL,X1=LLCLCR,X2=LLCLCRCLCLL,X3=CRCLCRCL,X4=CLCRLL,X5=C','X00=X70=C,X80=X81=X90=X91=LRT '], + ['ndb-10N.png', 'ClClRCRClR','X0=X7=C,X1=RClCR,X2=CRC,X3=RCTC,X4=CTCl,X5=ClCR,X6=CRCl,X8=X9=TT','X00=,X70=C,X80=X81=X90=X91=TT '], + ['spider-1-ring.png', 'ClRClR','X1=X2=CTCTC,X4=X5=TT'], + ['spider-2-rings.png','ClRClR','X1=CTCRCTC,X2=CTClCTC,X4=X5=TT'], + ['spider-3-rings.png','ClRCClRClR','X3=CTCCTC,X8=X9=TT','X33=CTCCTC,X80=X81=X90=X91=TT'] ], snow3: [ - ['123-a', 'rcrcrc','crc,crclctc,ctcrc,rcl,c,c'], - ['123-b', 'lclclc','rcl,ctc,crcllc,crrclcr,ctc,cl'], - ['132-a', 'crcrc','ctc,ctc,ctc,ctc,ctc'], - ['312-a', 'lclc','tctc,rctcl,ctcl,ctct'], - ['321-a', 'lclc','tc,rclcrc,clcrcl,ct'], - ['321-b', 'rcrc','tcr,lctc,ctcr,lct'], - ['321-c', 'rcrc','tcl,lctc,ctcr,rct'], - ['321-d', 'rcrc','t,lctc,ctcr,ctct'], - ['126453-a','clclc','c,ctctc,ctctc,ctctc,c'], - ['153426-a','lclclc','t,rc,ctc,rclcr,ctcl,ct'], - ['154326-a','lclc','t,rctc,ctctcl,ctct'], - ['156423-a','crcrc','cr,crcl,clcrclcr,rcrcl,c'], - ['234561-a','lclclc','cr,crcl,clcr,crcl,clcr,c'], - ['263451-a','crcrc','cr,crcl,clcr,crcl,cl'], - ['321546-a','clclc','cl,ctcl,crcrcr,rcr,c'], - ['321654-a','clclclc','lc,crc,clcrc,clcr,c,crc,cl'], - ['321654-b','crcrc','cr,ctcr,clclc,lcl,c'], - ['354612-a','rcrcrc','ctct,ct,ct,ct,cl,ctc'], - ['426153-a','rcrc','lc,crclclc,crcrclc,cr'], - ['426153-b','rcrcrc','cr,ctcl,ctcr,ctcl,ctc,c'], - ['456123-a','rcrc','r,lrc,ctcr,lct'], - ['456123-b','rcrcrcrc','c,ctc,rclc,ctc,rc,rcl,ctc,c'], - ['462513-a','lclc','rc,clcrc,clctc,rcl'], - ['564312-a','rcrc','lcrc,clcrc,clcrc,clcr'], - ['563412-a','crcrc','c,ctctc,clcr,rctc,c'], - ['623451-a','lclclclc','r,c,crc,ctc,lcrcl,ctc,crc,cl'], - ['623541-a','clclc','ctc,ct,crc,ctc,ctc'], - ['623541-b','crcrc','cl,ctctcr,ct,ctc,c'] + ['123-a', 'RCRCRC','CRC,CRCLCTC,CTCRC,RCL,C,C'], + ['123-b', 'LCLCLC','RCL,CTC,CRCLLC,CRRCLCR,CTC,CL'], + ['132-a', 'CRCRC','CTC,CTC,CTC,CTC,CTC'], + ['312-a', 'LCLC','TCTC,RCTCL,CTCL,CTCT'], + ['321-a', 'LCLC','TC,RCLCRC,CLCRCL,CT'], + ['321-b', 'RCRC','TCR,LCTC,CTCR,LCT'], + ['321-c', 'RCRC','TCL,LCTC,CTCR,RCT'], + ['321-d', 'RCRC','T,LCTC,CTCR,CTCT'], + ['126453-a','CLCLC','C,CTCTC,CTCTC,CTCTC,C'], + ['153426-a','LCLCLC','T,RC,CTC,RCLCR,CTCL,CT'], + ['154326-a','LCLC','T,RCTC,CTCTCL,CTCT'], + ['156423-a','CRCRC','CR,CRCL,CLCRCLCR,RCRCL,C'], + ['234561-a','LCLCLC','CR,CRCL,CLCR,CRCL,CLCR,C'], + ['263451-a','CRCRC','CR,CRCL,CLCR,CRCL,CL'], + ['321546-a','CLCLC','CL,CTCL,CRCRCR,RCR,C'], + ['321654-a','CLCLCLC','LC,CRC,CLCRC,CLCR,C,CRC,CL'], + ['321654-b','CRCRC','CR,CTCR,CLCLC,LCL,C'], + ['354612-a','RCRCRC','CTCT,CT,CT,CT,CL,CTC'], + ['426153-a','RCRC','LC,CRCLCLC,CRCRCLC,CR'], + ['426153-b','RCRCRC','CR,CTCL,CTCR,CTCL,CTC,C'], + ['456123-a','RCRC','R,LRC,CTCR,LCT'], + ['456123-b','RCRCRCRC','C,CTC,RCLC,CTC,RC,RCL,CTC,C'], + ['462513-a','LCLC','RC,CLCRC,CLCTC,RCL'], + ['564312-a','RCRC','LCRC,CLCRC,CLCRC,CLCR'], + ['563412-a','CRCRC','C,CTCTC,CLCR,RCTC,C'], + ['623451-a','LCLCLCLC','R,C,CRC,CTC,LCRCL,CTC,CRC,CL'], + ['623541-a','CLCLC','CTC,CT,CRC,CTC,CTC'], + ['623541-b','CRCRC','CL,CTCTCR,CT,CTC,C'] ], lastValidBasicStitchValue: '', lastValidDrosteOnBasicValue: '', @@ -421,7 +421,7 @@ const GF_hybrid = { `; @@ -434,7 +470,7 @@ const GF_hybrid = { Assign tweaked stitch or click a stich in the pair diagram. - + ${this.patternInfo.linkHtmlString(q)}

    @@ -447,8 +483,8 @@ const GF_hybrid = { GF_panel.load({caption: "specifications", id: "specs", controls: ["resize"], size:{width: '100%', height: '300px'}, parent: container}); document.getElementById('tweak').insertAdjacentHTML('beforeend',`

    - ${this.basicStitch.htmlString()}
    - ${this.drosteOnBasicStitch.htmlString()} + ${this.recipes.basicStitch.htmlString()}
    + ${this.recipes.drosteOnBasicStitch.htmlString()}

    Flip: @@ -468,7 +504,7 @@ const GF_hybrid = { specsPanelContent.innerHTML = ` Specs collected from URL and clicks: - + ${this.patternInfo.specsHtmlString(q)} ${drosteTextField(1)} ${drosteTextField(2)} ${drosteTextField(3)} @@ -525,18 +561,13 @@ const GF_hybrid = { }); console.log('================ Loaded panels ================'); }, - setRecipe(basicStitch, drosteStitches) { - document.getElementById('basicStitchInput').value = basicStitch; - document.getElementById(GF_hybrid.drosteOnBasicStitch.id).value = drosteStitches; - // TODO: second step of droste stitches, requires more intelligence in resetting previously assigned stitches - }, /** * Wrapper for loadSimple. Initial step is 1 and specs panel is shown immediately * * @param {!HTMLElement} container receives the generated components */ loadDroste(container){ - this.loadSimple(container, 1, [GF_hybrid.drosteOnBasicStitch.id, 'pairStep', 'threadStep', 'snow3', 'snow4'] ); + this.loadSimple(container, 1, [GF_hybrid.recipes.drosteOnBasicStitch.id, 'pairStep', 'threadStep', 'snow3', 'snow4'] ); }, /** * Wrapper for loadSimple. Initial step is 0 and specs panel is initially hidden, shown when step becomes larger. @@ -544,7 +575,7 @@ const GF_hybrid = { * @param {!HTMLElement} container receives the generated components * */ loadStitches(container){ - this.loadSimple(container, 0, [GF_hybrid.drosteOnBasicStitch.id, 'pairStep', 'threadStep', 'snow3', 'snow4', 'drosteStep', 'specs'] ); + this.loadSimple(container, 0, [GF_hybrid.recipes.drosteOnBasicStitch.id, 'pairStep', 'threadStep', 'snow3', 'snow4', 'drosteStep', 'specs'] ); }, /** * Wrapper for load. Hides the third step field @@ -562,62 +593,56 @@ const GF_hybrid = { loadSimple(container, initialStep, hiddenElements){ // Clear galleries that will not be used GF_tiles = {loadGallery (namedArgs){ }}; // dummy to avoid errors - this.snow3 = []; // clear for performance - this.snow4 = []; // clear for performance + GF_hybrid.recipes.snow3 = []; // clear for performance + GF_hybrid.recipes.snow4 = []; // clear for performance - this.load(container, initialStep); + this.load(container); for (let id of ['pairStep', 'threadStep', 'drosteStep']) { document.getElementById(id).value = initialStep; } for (let id of hiddenElements) { document.getElementById(id).parentNode.style.display = 'none'; } - document.getElementById('basicStitchInput').previousSibling.remove(); // remove label + document.getElementById(GF_hybrid.recipes.basicStitch.id).previousSibling.remove(); // remove label const stitchesEl = document.getElementById('stitches').parentNode; stitchesEl.style.display = 'block'; // make visible, whichever gallery is visible by default stitchesEl.getElementsByTagName('select')[0].outerHTML = 'select stitch example'; // no choice for other galleries }, - updatePatternLink(value) { - const selRef = document.getElementById('selfRef'); - selRef.href = '?' + value; - selRef.style.display = 'inline'; - console.log("---------" + value); - }, assignToIgnored() { const stepValue = document.getElementById('pairStep').value * 1; - const stitchValue = document.getElementById('basicStitchInput').value; - const queryField = document.getElementById('droste0'); + const stitchValue = document.getElementById(GF_hybrid.recipes.basicStitch.id).value; + let query = this.patternInfo.getValue(); // key=- where key is letters+digits (e.g. e1=-, f42=-) // this also matches droste1=- but not expecting just a dash as content for the droste specs const regexp = /(^|&)([a-z]+[0-9]+=)-(&|$)/gi - if (document.getElementById(GF_hybrid.drosteOnBasicStitch.id).value.trim() !== '') { + if (document.getElementById(GF_hybrid.recipes.drosteOnBasicStitch.id).value.trim() !== '') { this.showToast("Assign to ignored is not implemented for droste applied to basic stitch") } else if (stepValue !== 0 && stitchValue) { this.showToast("Assign to ignored is only implemented for step 1") - } else if (!regexp.test(queryField.value)) { + } else if (!regexp.test(query)) { this.showToast("No ignored stitches.") } else { if (stitchValue) { - queryField.value = queryField.value.replace(regexp, `$1$2${stitchValue}$3`); + query = query.replace(regexp, `$1$2${stitchValue}$3`); } else { - queryField.value = queryField.value.replace(regexp, (match, sep, keyEq, tail) => { + query = query.replace(regexp, (match, sep, keyEq, tail) => { const rnd = GF_Random.genRandomStitch(3, 2, 1, 1); return `${sep}${keyEq}${rnd}${tail}`; }); } document.getElementById('pair_panel').style.backgroundColor = GF_hybrid.dirtyBackGround; - this.updatePatternLink(queryField.value); + this.patternInfo.setValue(query); } }, assignToAll() { const stepValue = document.getElementById('pairStep').value * 1; - const stitchValue = document.getElementById('basicStitchInput').value; + const stitchValue = document.getElementById(GF_hybrid.recipes.basicStitch.id).value; const stitchTitles = Array.from(document.getElementById('pair_panel') .getElementsByTagName('title') ); - if (document.getElementById(GF_hybrid.drosteOnBasicStitch.id).value.trim() !== '') { + if (document.getElementById(GF_hybrid.recipes.drosteOnBasicStitch.id).value.trim() !== '') { this.showToast("Assign to all is not implemented for droste applied to basic stitch") } else if (stepValue !== 0 && stitchValue) { document.getElementById('droste' + stepValue).value = @@ -626,8 +651,7 @@ const GF_hybrid = { this.showToast("No stitches found in the pair diagram.") } else { document.getElementById('pair_panel').style.backgroundColor = GF_hybrid.dirtyBackGround; - const queryField = document.getElementById('droste0'); - const params = new URLSearchParams(queryField.value); + const params = new URLSearchParams(this.patternInfo.getValue()); const regex = /^[a-zA-Z]{1,2}\d+$/; // remove predefined stitches for (const key of Array.from(params.keys())) { @@ -645,9 +669,7 @@ const GF_hybrid = { params.set(tag, newValue); } }); - queryField.value = Array.from(params).map(([k, v]) => `${k}=${v}`).join('&'); - this.updatePatternLink(queryField.value); - + this.patternInfo.setValue(Array.from(params).map(([k, v]) => `${k}=${v}`).join('&')); } } } \ No newline at end of file From cf44729f5ed5f3e005ac9b602edde997b7af610c Mon Sep 17 00:00:00 2001 From: jo-pol Date: Fri, 22 May 2026 20:04:00 +0200 Subject: [PATCH 208/221] moved flip into recipes and apply setRecipe --- docs/js/hybrid.js | 134 +++++++++++++++++++++++++--------------------- 1 file changed, 74 insertions(+), 60 deletions(-) diff --git a/docs/js/hybrid.js b/docs/js/hybrid.js index 63c9e0d67..117872f29 100644 --- a/docs/js/hybrid.js +++ b/docs/js/hybrid.js @@ -73,12 +73,18 @@ const GF_hybrid = { GF_hybrid.recipes.setRecipe(stitch); } }, - setRecipe(basicStitch, droste1Stitches = '', droste2Stitches = '') { - document.getElementById(GF_hybrid.recipes.basicStitch.id).value = basicStitch; - document.getElementById(GF_hybrid.recipes.drosteOnBasicStitch.id).value = droste1Stitches; - // TODO setColorCode(); - GF_hybrid.recipes.basicStitch.lastValid = basicStitch; - GF_hybrid.recipes.drosteOnBasicStitch.lastValid = droste1Stitches; + setRecipe(basicStitch, droste1Stitches, droste2Stitches) { + const basicEl = document.getElementById(this.basicStitch.id); + if (basicEl) { + basicEl.value = basicStitch ?? ''; + this.basicStitch.lastValid = basicStitch ?? ''; + // TODO setColorCode(); + } + const drosteOnBasicEl = document.getElementById(this.drosteOnBasicStitch.id); + if (drosteOnBasicEl) { + drosteOnBasicEl.value = droste1Stitches ?? ''; + this.drosteOnBasicStitch.lastValid = droste1Stitches ?? ''; + } // TODO: second step of droste stitches, requires more intelligence in resetting previously assigned stitches }, basicStitch: { @@ -89,7 +95,7 @@ const GF_hybrid = { return ` ` @@ -168,6 +174,63 @@ const GF_hybrid = { } }, }, + flip: { + htmlString() { + return `

    Flip: + + + +

    + `; + }, + apply(direction) { + function flip2(value) { + switch (direction) { + case 'b2d': return value + .replace(/l/g, "R") + .replace(/r/g, "L") + .toLowerCase(); + case 'b2p': return value + .split("").reverse().join(""); + } + } + const basicEl = document.getElementById(GF_hybrid.recipes.basicStitch.id); + const drosteEl = document.getElementById(GF_hybrid.recipes.drosteOnBasicStitch.id); + const basicValue = basicEl.value.toLowerCase() + .replaceAll(/[^crlt]/g, '') + if (drosteEl && drosteEl.value.trim() !== '') { + if (drosteEl.value.includes('=')) { + const tLessBasicValue = basicValue.replace(/[t]/g, 'lr'); + const arr = Array(tLessBasicValue.length).fill('ctc'); + const keyValuePairs = drosteEl.value.toLowerCase() + .replaceAll(/[^crltx0-9=;,.]/g, '') + .split(/[;,.]/) + for (const kv of keyValuePairs) { + const value = kv.replace(/.*=/, '') + const keys = kv.replace(/=[^=]*$/, '').split(/=/) + for (const key of keys) { + arr[parseInt(key.replace(/x/i, ''))] = value; + } + } + const flipped = flip2(arr.join(';')) + .split(';'); + for (let i = 0; i < flipped.length; i++) { + flipped[i] = `x${i}=${flipped[i]}`; + } + GF_hybrid.recipes.setRecipe( + flip2(tLessBasicValue), + flipped.join(';') + .replace(/x[0-9]+=ctc(;|$)/gi,'') + .replace(/;$/,'') + ); + } else { + GF_hybrid.recipes.setRecipe(flip2(basicValue), flip2(drosteEl.value)); + } + } else { + GF_hybrid.recipes.setRecipe(flip2(basicValue)); + } + }, + } }, patternInfo: { linkHtmlString(q) {return ``}, @@ -286,52 +349,6 @@ const GF_hybrid = { title.parentNode.addEventListener('click', stitchHandler) }); }, - flip(direction) { - function flip2(value) { - switch (direction) { - case 'b2d': return value - .replace(/l/g, "R") - .replace(/r/g, "L") - .toLowerCase(); - case 'b2p': return value - .split("").reverse().join(""); - } - } - const basicEl = document.getElementById(GF_hybrid.recipes.basicStitch.id); - const drosteEl = document.getElementById(GF_hybrid.recipes.drosteOnBasicStitch.id); - const basicValue = basicEl.value.toLowerCase() - .replaceAll(/[^crlt]/g, '') - if (drosteEl && drosteEl.value.trim() !== '') { - if (drosteEl.value.includes('=')) { - const tLessBasicValue = basicValue.replace(/[t]/g, 'lr'); - const arr = Array(tLessBasicValue.length).fill('ctc'); - const keyValuePairs = drosteEl.value.toLowerCase() - .replaceAll(/[^crltx0-9=;,.]/g, '') - .split(/[;,.]/) - for (const kv of keyValuePairs) { - const value = kv.replace(/.*=/, '') - const keys = kv.replace(/=[^=]*$/, '').split(/=/) - for (const key of keys) { - arr[parseInt(key.replace(/x/i, ''))] = value; - } - } - const flipped = flip2(arr.join(';')) - .split(';'); - for (let i = 0; i < flipped.length; i++) { - flipped[i] = `x${i}=${flipped[i]}`; - } - drosteEl.value = flipped.join(';') - .replace(/x[0-9]+=ctc(;|$)/gi,'') - .replace(/;$/,''); - basicEl.value = flip2(tLessBasicValue); - } else { - drosteEl.value = flip2(drosteEl.value); - basicEl.value = flip2(basicValue); - } - } else { - basicEl.value = flip2(basicValue); - } - }, scrollIfTooLittleIsVisible(elementId) { const threadPanel = document.getElementById(elementId); const rect = threadPanel.getBoundingClientRect(); @@ -457,7 +474,6 @@ const GF_hybrid = { } const pairWandHref = "javascript:GF_hybrid.generateSelectedDiagram('pair');GF_hybrid.setStitchEvents()"; const threadWandHref = "javascript:GF_hybrid.generateSelectedDiagram('thread')"; - const legendWandHref = "javascript:GF_hybrid.generateLegend()"; let q = new URL(document.documentURI).search.slice(1) .replaceAll(/[^a-zA-Z0-9=,.&-]/g,''); if (q === "" || !q.includes('shiftRows')) { @@ -486,11 +502,7 @@ const GF_hybrid = { ${this.recipes.basicStitch.htmlString()}
    ${this.recipes.drosteOnBasicStitch.htmlString()}

    -

    Flip: - - - -

    + ${this.recipes.flip.htmlString()} `); const params = new URLSearchParams(q); document.getElementById('tweak').parentNode.style = `width: calc(100% - 7px)`; @@ -502,7 +514,9 @@ const GF_hybrid = { return `` } specsPanelContent.innerHTML = ` - + Specs collected from URL and clicks: ${this.patternInfo.specsHtmlString(q)} ${drosteTextField(1)} From 65afdf51b55a2c72c2a2dcccf79727d3e7f8461f Mon Sep 17 00:00:00 2001 From: jo-pol Date: Sat, 23 May 2026 11:59:34 +0200 Subject: [PATCH 209/221] color code --- docs/js/hybrid.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/js/hybrid.js b/docs/js/hybrid.js index 117872f29..20687d337 100644 --- a/docs/js/hybrid.js +++ b/docs/js/hybrid.js @@ -78,7 +78,7 @@ const GF_hybrid = { if (basicEl) { basicEl.value = basicStitch ?? ''; this.basicStitch.lastValid = basicStitch ?? ''; - // TODO setColorCode(); + this.basicStitch.setColorCode(); } const drosteOnBasicEl = document.getElementById(this.drosteOnBasicStitch.id); if (drosteOnBasicEl) { @@ -94,6 +94,7 @@ const GF_hybrid = { const other = `document.getElementById('${GF_hybrid.recipes.drosteOnBasicStitch.id}`; return ` `; } function prefixedTwister(type){ - return `${type}s