Plugin Directory

Changeset 3369385


Ignore:
Timestamp:
09/29/2025 02:44:54 AM (3 months ago)
Author:
genolve
Message:
  • ChatGPT-5 now default model to generate designs.
  • Midjourney video generation.
  • AI music from Lyria, Stabilityai and Minimax.
  • New tool to quickly create viral videos.
Location:
genolve-toolkit/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • genolve-toolkit/trunk/css/genolve-style.css

    r3283646 r3369385  
    143143    cursor: help;
    144144}
     145@media screen and (orientation:portrait) {
     146.gnlv-help {
     147    display:inline-block;
     148    width:30px;
     149}
     150}
    145151.gnlv-help:hover {
    146152    text-decoration: none !important;
     
    190196  animation: gnlv-width  99s ease-out  forwards  ;
    191197}
     198.gnlv-aniwidth180 {
     199  background: #FC3;
     200    height: 30px;
     201  animation: gnlv-width  180s ease-out  forwards  ;
     202}
    192203.gnlv-swatch {
    193204    width:14px;
     
    221232   color: black;
    222233}
     234.gnlv-media-icon {
     235    margin: 2px;
     236
     237}
     238/* changed to similar to gnlv-a-rev
    223239.gnlv-media-icon img{
    224240    height:16px;
     241    border-radius:1px;
     242    background-color:#FFF;
     243    border: 1px solid #CCCCCC;
     244}
     245.gnlv-media-icon img:hover{
     246    border: 1px solid #FFF;
     247}*/
     248a.gnlv-media-icon:link, a.gnlv-media-icon:visited {
     249    display: inline-block;
     250    color: #DDD !important;
     251    background-color: #f37511;
     252    text-decoration: none;
     253    padding-top: 2px;
     254    padding-bottom: 2px;
     255    padding-left: 4px;
     256    padding-right: 4px;
     257    margin-left: 4px;
     258    margin-right: 4px;
     259    border-radius: 4px;/*rounding corner */
     260}
     261a.gnlv-media-icon:hover {
     262    color: #FFF !important;
     263    text-decoration: none;
     264}
     265a.gnlv-media-icon img {
     266    border-width: 0;
     267    vertical-align: text-bottom;
     268    border-radius:2px;
     269}
     270.gnlv-iconbar{
     271    /*background-color:#CCC;*/
     272    margin:3px;
    225273}
    226274.gnlv-font {
  • genolve-toolkit/trunk/genolve-toolkit.php

    r3283646 r3369385  
    22/*
    33 * Plugin Name: Genolve AI image AI video generator
    4  * Version: 5.0.3
     4 * Version: 5.0.4
    55 * Plugin URI: https://www.genolve.com/
    66 * Description: Stunning AI video & images from a prompt, plus amazing toolkit to make blog graphics, podcasts or promotional videos with AI assisted design.
  • genolve-toolkit/trunk/inc/functions.php

    r3283646 r3369385  
    2020define( 'GENOLVE_ACTION_URL',  'https://www.genolve.com/');     
    2121define( 'GENOLVE_JS_URL',      'https://www.genolve.com/js/' );
    22 define( 'GENOLVE_VER',         '-5.0.3' );
     22define( 'GENOLVE_VER',         '-5.0.4' );
    2323
    2424/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  • genolve-toolkit/trunk/js/bootstrap-4-0-ns/css/bootstrap-ns.css

    r3235663 r3369385  
    63326332}
    63336333
     6334@media (min-width: 1458px) {
     6335  .twbs .d-xxl-none {
     6336    display: none !important;
     6337  }
     6338  .twbs .d-xxl-inline {
     6339    display: inline !important;
     6340  }
     6341  .twbs .d-xxl-inline-block {
     6342    display: inline-block !important;
     6343  }
     6344  .twbs .d-xxl-block {
     6345    display: block !important;
     6346  }
     6347  .twbs .d-xxl-table {
     6348    display: table !important;
     6349  }
     6350  .twbs .d-xxl-table-row {
     6351    display: table-row !important;
     6352  }
     6353  .twbs .d-xxl-table-cell {
     6354    display: table-cell !important;
     6355  }
     6356  .twbs .d-xxl-flex {
     6357    display: -ms-flexbox !important;
     6358    display: flex !important;
     6359  }
     6360  .twbs .d-xxl-inline-flex {
     6361    display: -ms-inline-flexbox !important;
     6362    display: inline-flex !important;
     6363  }
     6364}
    63346365@media print {
    63356366  .twbs .d-print-none {
  • genolve-toolkit/trunk/js/genolve-3rdparty.js

    r3235663 r3369385  
    1 function GNLV_3RDPARTY(d,K,B){function Z(a){for(var b=0,c="",e="0123456789abcdef".split("");b<a;)c+=e[Math.floor(Math.random()*16)],b++;return"#"+c}function ia(a,b){if(b<a.length)for(var c=0;c<a.length;c++){var e=a[c].attr("class");d.vprint("d3","confetti:  SPRITE ["+c+"] current:"+e);c==b?a[c].classed("gnlv-gone",!1):a[c].classed("gnlv-gone",!0)}else console.warn("3rdparty.classAct sprite"+b+" past num:"+a.length)}var t=this,D=this,R=-1,V=[42,43],ja="easeLinear,easeQuad,easeQuadIn,easeQuadOut,easeCubic,easeCubicIn,easeCubicOut,easeSin,easeSinIn,easeSinOut,easeExp,easeExpIn,easeExpOut,easeCircle,easeCircleIn,easeCircleOut".split(/,/),
    2 ka=["uniform","bands","bigMiddle","bigEdge","RANDOM"],la="complementary splitcomplementary analagous triadic tetradic monochromatic".split(" "),oa="complementaryScheme,splitComplementaryScheme,splitComplementaryCWScheme,splitComplementaryCCWScheme,triadicScheme,clashScheme,tetradicScheme,fourToneCWScheme,fourToneCCWScheme,fiveToneAScheme,fiveToneBScheme,fiveToneCScheme,fiveToneDScheme,fiveToneEScheme,sixToneCWScheme,sixToneCCWScheme,neutralScheme,analogousScheme".split(/,/),pa="interpolateMagma,interpolateViridis,interpolateInferno,interpolatePlasma,interpolateWarm,interpolateCool,interpolateRainbow,interpolateCubehelixDefault".split(/,/);
    3 this.apidiv=this.imgkey="notset";this.apidivA={};this.Color=this.cryb="notset";this.kulaA;this.pjA;this.limitkula;this.setValMode=Object.freeze({LOOP:"LOOP",LIMIT:"LIMIT",RANDOM:"RANDOM"});B==null&&(B=jQuery);d.vprint("d3","3 3 3 3 3 3 3 3 3 3 3 3  INIT 3rd party scripts  have d3?"+typeof d3+" have Color?"+typeof net+" have ColorRYB?"+typeof ColorRYB+"3 3 3 3 3 3 3 3 3 3 3 3 eloop:"+typeof document.eloop);var y=document.eloop,F={},ca=15;typeof net=="undefined"||typeof ColorRYB=="undefined"?(d.vprint("d3",
    4 "3 3 3 3 3 3 3 3 3 3 3 3  INIT dynamic load color.js scripts   3 3 3 3 3 3 3 3 3 3 3 3 from:"+y.actionhost),B.getScript(y.actionhost+"/js/color-js/color.js",function(){t.Color=net.brehaut.Color;t.cryb=new ColorRYB(d,B);d.vprint("d3","3 3 3 3 3 3 3 3 3 3 3 3 DONE INIT dynamic load color scripts DONE  3 3 3 3 3 3 3 3 3 3 3 3 had net.Color?"+typeof net+" cryb?"+typeof ColorRYB)})):(t.Color=net.brehaut.Color,t.cryb=new ColorRYB(d,B),d.vprint("d3","3 3 3 3 3 3 3 3 3 3 3 3  INIT normal load color scripts DONE  3 3 3 3 3 3 3 3 3 3 3 3"));
    5 typeof d3=="undefined"&&B.getScript(y.actionhost+"/js/d3/d3.min.js",function(){d.vprint("d3","3 3 3 3 3 3 3 3 3 3 3 3  d3 loaded DONE  3 3 3 3 3 3 3 3 3 3 3 3")});this.mulberry32=function(a){return function(){var b=a+=1831565813;b=Math.imul(b^b>>>15,b|1);b^=b+Math.imul(b^b>>>7,b|61);return((b^b>>>14)>>>0)/4294967296}};this.autoWrapIt=function(a,b,c,e,g){a==null&&(a=y.activeslot);var f=[],h=RegExp("\\[font\\d\\]","ig"),q=[],m,z,n=0,k,l,u=0,L="tel"+Math.floor(Math.random()*1E3)+"_",x=[];if(b)for(d.vprint("text",
    6 "autoWrapIt found num font tags:"+b.length),m=0;m<b.length;m++)q[m]=!1,f.push(new RegExp("\\[font"+(m+1)+"\\]","i")),x.push("<tspan "+d.dumpvar(b[m],"css")+">");u=0;var I=function(N){if(b)for(m=0;m<b.length;m++)for(;N.match(f[m]);)q[m]=!q[m],zhtm=q[m]?x[m]:"</tspan>",N=N.replace(f[m],zhtm);return N},v=function(N){var aa="";if(b)for(m=0;m<b.length;m++)N=="close"?aa+=q[m]?"</tspan>":"":N=="open"?aa+=q[m]?x[m]:"":console.warn("autoWrapIt:getOpenClose bad arg:"+N);return aa};g.match(/&lt;br&gt;&lt;br&gt;/)&&
    7 (g=g.replace(/&lt;br&gt;/ig," &lt;br&gt;"));c=="blockit"&&(g=g.toUpperCase(),g=g.replace(/&LT;BR&GT;/ig,"&lt;br&gt;"));var M=g.split(" ");var r=l=k="";y.slot[a]||(y.slot[a]={});for(z=y.slot[a].hadAwrap=0;z<M.length;z++){var E=M[z];var J=E=="&lt;br&gt;"?["",""]:E.split(/&lt;br&gt;/);J.length>2&&console.warn("autoWrapIt:shit break split num over2:"+J.length);if(String(k+E.replace(h,"")).length>e||J.length>1){y.slot[a].hadAwrap++;n=y.slot[a].hadAwrap;if(J.length>1){for(d.vprint("text","autoWrapIt start BREAKS loop breakA:"+
    8 J);J.length>1;){var p=J.shift();l+=I(p);k+=p.replace(h,"");p=c=="blockit"?D.calcFS(e,k):58;u+=p;k.match(/^\s*$/)||(r+='<text id="DENT" class="gnlvani" FONTSIZE x="0" dy="DDYY">CONTENT</text>'.replace("DDYY",u+"").replace("FONTSIZE",'style="font-size:'+p+'px"').replace("CONTENT",l).replace("DENT",L+n));E=k=l="";n++}E=J.shift()}else{d.vprint("text","autoWrapIt WRAP up buf:"+k+": nextWord:"+E+":");if(k==""){l=k=E;E.match(h)&&console.warn("autoWrapIt: missed a font tag on:"+E);continue}k=k.replace(/ $/,
    9 "");l=l.replace(/ $/,"")+v("close");p=c=="blockit"?D.calcFS(e,k):58;u+=p;k.match(/^\s*$/)||(r+='<text id="DENT" class="gnlvani" FONTSIZE x="0" dy="DDYY">CONTENT</text>'.replace("DDYY",u+"").replace("FONTSIZE",'style="font-size:'+p+'px"').replace("CONTENT",l).replace("DENT",L+n))}p=v("open");l=p+I(E)+" ";k=E.replace(h,"")+" "}else d.vprint("text","autoWrapIt traverse words buf:"+k+": next:"+E+":"),l+=I(E)+" ",k+=E.replace(h,"")+" "}k.match(/^\s*$/)||(d.vprint("text","autoWrapIt start LAST tspan buf:"+
    10 k+":"),k=k.replace(/ $/,""),l=l.replace(/ $/,""),p=c=="blockit"?D.calcFS(e,k):58,n++,r+='<text id="DENT" class="gnlvani" FONTSIZE x="0" dy="DDYY">CONTENT</text>'.replace("DDYY",u+p+"").replace("FONTSIZE",'style="font-size:'+p+'px"').replace("CONTENT",l).replace("DENT",L+n));d.vprint("text","autoWrapIt DONE size:"+M.length+" autowrap:"+e+" ["+g+"]->"+r);return r};this.calcFS=function(a,b,c){var e,g=b.length;if(g<=0)return 58;(e=b.match(/I/g))&&typeof e=="object"&&(g-=e.length*.8);(e=b.match(/J/g))&&
    11 typeof e=="object"&&(g-=e.length*.3);(e=b.match(/[ \.]/g))&&typeof e=="object"&&(g-=e.length*.6);(e=b.match(/[MW]/g))&&typeof e=="object"&&(g+=e.length*.45);(e=b.match(/[\-=]/g))&&typeof e=="object"&&(g+=e.length*.75);(e=b.match(/[\u{1f300}-\u{1f5ff}\u{1f900}-\u{1f9ff}\u{1f600}-\u{1f64f}\u{1f680}-\u{1f6ff}\u{2600}-\u{26ff}\u{2700}-\u{27bf}\u{1f1e6}-\u{1f1ff}\u{1f191}-\u{1f251}\u{1f004}\u{1f0cf}\u{1f170}-\u{1f171}\u{1f17e}-\u{1f17f}\u{1f18e}\u{3030}\u{2b50}\u{2b55}\u{2934}-\u{2935}\u{2b05}-\u{2b07}\u{2b1b}-\u{2b1c}\u{3297}\u{3299}\u{303d}\u{00a9}\u{00ae}\u{2122}\u{23f3}\u{24c2}\u{23e9}-\u{23ef}\u{25b6}\u{23f8}-\u{23fa}]/ug))&&
    12 typeof e=="object"&&(g+=e.length*.75);a=parseInt(a?a:20);b.match(/^\s+$/)&&(g=a);a=parseInt(a/g*58);d.vprint("text","calcFS inlen:"+b.length+"->adjust:"+g+"->"+a+":"+b+":");return c?g:a};this.d3interpolate=function(a,b,c){d.vprint("d3","d3interpolate  = = =  START = = =  with rootel:"+a);var e,g=this.d3_getNchild(a,2),f=g[0],h=f.cloneNode();g=g[1];a=d3.select(a);this.pjA=b;c!=null&&(V=c,R=-1);d.vprint("d3","found child1:"+h.nodeName+" child2:"+g.nodeName);var q=[];for(c=0;c<b.cfTag.length;c++){var m=
    13 {};m.cfTag=b.cfTag[c];m.from=h.getAttribute(b.cfTag[c]);m.to=g.getAttribute(b.cfTag[c]);m.vals=d3.quantize(d3.interpolate(m.from,m.to),b.cfSections);var z=b.cfEase==null?d3.easeLinear:d3["ease"+b.cfEase[c]];m.vals=d.zero2one(b.cfSections).map(function(n){return d3.interpolate(m.from,m.to)(z(n))});q.push(m)}f.remove();g.remove();d.vprint("d3","packed up dataA:"+d.dumpvar(q));d.vprint("d3","TEMPLATE:"+h);b=a.selectAll(h.nodeName).data(d.ones(b.cfSections)).enter().append(function(){return h.cloneNode()});
    14 for(e=0;e<q.length;e++)d.vprint("d3","process tag:"+q[e].cfTag+" vals:"+q[e].vals),b.attr(q[e].cfTag,function(n,k){d.vprint("d3","tag:"+q[e].cfTag+" val["+k+"]"+q[e].vals[k]);return q[e].vals[k]})};this.d3limitrange=function(a,b,c){var e=d3.select(a);c!=null&&(V=c,R=-1);d.vprint("d3","d3limitrange SELECT["+a+"] rootel type:"+e.node().nodeName+" transform: have data:"+b);t.limitkula=D.codonSel(b.cfRange,"scale");c=e.selectAll(b.cfSelector);d.vprint("d3","d3limitrange my limited color is:"+t.limitkula+
    15 " apply to selection:"+b.cfSelector+" children:"+c.size());for(a=0;a<b.cfTag.length;a++)d.vprint("d3","process tag:"+b.cfTag[a]+":"),c.style(b.cfTag[a],function(g,f){return t.limitkula})};this.d3colormatch=function(a,b,c){var e=d3.select(a);c!=null&&(V=c,R=-1);c=b.dominate;c=="currentColor"&&(c=d.curcolor);if(c.match(/^grab.*/)){var g=c.replace(/grab/,"");var f=e.attr(g);var h=d.getCstyle(e.node(),g);d.vprint("d3","d3colormatch   S E E D  C O L O R   grab["+g+"].attr found:"+f+" cstyle:"+h);c="#883300";
    16 f!=null&&(c=f);h!=null&&(c=h)}d.vprint("d3","d3colormatch - START - rootel type:"+e.node().nodeName+" transform: have data:"+b+" seedColor:"+c+" scheme:"+b.cfScheme+","+typeof b.cfScheme);if(typeof t.Color!="function")if(d.vprint("d3","d3colormatch no Color obj!"),typeof net!="undefined")t.Color=net.brehaut.Color;else return;h=t.Color(c);b.cfScheme==null||b.cfScheme=="RANDOMRGB"?(d.vprint("d3","d3colormatch ** RGB mode"),f=D.codonSel(oa),t.kulaA=h[f]()):b.subordinate!=null?(g=b.subordinate.replace(/grab/,
    17 ""),f=e.attr(g),h=d.getCstyle(e.node(),g),d.vprint("d3","d3colormatch ** S U B O R D I N A T E  C O L O R   grab["+g+"].attr found:"+f+" cstyle:"+h),g="#883300",f!=null&&(g=f),h!=null&&(g=h),d.vprint("d3","d3colormatch seedColor:"+c+" subColor:"+g),t.kulaF=d3.interpolateRgb(c,g)):b.cfScheme&&typeof b.cfScheme=="string"&&b.cfScheme.match(/^interpolate/)?(c=b.cfScheme&&d3[b.cfScheme]?b.cfScheme:K.iterate(pa,null,"random"),d.vprint("d3","d3colormatch ** interpolation function:"+c),t.kulaF=d3[c]):B.isArray(b.cfScheme)?
    18 (f=D.codonSel(b.cfScheme),d.vprint("d3","d3colormatch ** RYB Array mode:"+f+" seedColor:"+c+" CSS:"+h.toCSS()+" have cryb?"+typeof t.cryb),t.kulaA=t.cryb.getAllSymmetries(f,h.toCSS(),"ryb")):(f=D.codonSel(la),d.vprint("d3","d3colormatch ** RYB Random Array mode:"+la+"->"+f),t.kulaA=t.cryb.getAllSymmetries(f,c,"ryb"),f!="complementary"&&f!="analagous"||t.kulaA.push(c));d.vprint("d3","d3colormatch can choose from colors=======>"+t.kulaA+" stagger?"+b.cfStagger);t.limitkula=D.codonSel(t.kulaA);if(b.cfSelector!=
    19 "none")for(a=d3.select(d.bubbleUp(a,"svg")),e=e.selectAll(b.cfSelector),d.vprint("d3","d3colormatch my limited color is:"+t.limitkula+" apply to selection:"+b.cfSelector+" children found:"+e.size()),e.size()==0&&(e=a.selectAll(b.cfSelector)),t.numkids=e.size(),a=0;a<b.cfTag.length;a++)d.vprint("d3","child["+a+"] tag:"+b.cfTag[a]+": color:"+t.limitkula),b.cfTag[a]=="flood-color"?e.attr(b.cfTag[a],function(q,m){return da(q,m,b)}):e.style(b.cfTag[a],function(q,m){return da(q,m,b)});d.vprint("d3","d3colormatch done!")};
    20 var da=function(a,b,c){if(c.cfStagger==null)return t.limitkula;if(c.cfStagger=="cycle")return t.kulaA[b%t.kulaA.length];if(c.subordinate!=null||c.cfScheme&&typeof c.cfScheme=="string"&&c.cfScheme.match(/^interpolate/))return a=t.kulaF(b*2/t.numkids),b*2>t.numkids&&(a=t.kulaF((2*t.numkids-b*2)/t.numkids)),a;b=D.getRandPoint(1,[[0,0],[t.kulaA.length-1,20]],c.cfStagger,"uniform");b=parseInt(b[0][0]);return t.kulaA[b]};this.d3voronify=function(a,b,c){var e;var g="0 0 200 200";var f,h,q,m;d.vprint("d3",
    21 "voronify START with el.id:"+a.id);var z=d3.select(a);d.vprint("d3","voronify have rootel?"+typeof z);d.vprint("d3","voronify have rootel.node?"+typeof z.node+" fill?"+z.attr("fill"));R=-1;V=c;c=d3.select(d.bubbleUp(a,"svg"));d.vprint("d3","voronify have svg?"+typeof c);var n=c.node().getBBox();c.attr&&c.attr("viewBox")&&(g=c.attr("viewBox"));g=g.split(/ /);d.vprint("d3","voronify  eloop.template box: "+y.viewBoxA+" local bbox?"+typeof n+" local viewBox:"+c.attr("viewBox")+" obj bbox:"+d.dumpvar(n,
    22 "onelevel"));g=b.target=="standard"?[[0,0],[1E3,1E3]]:y.viewBoxA!=null&&b.target=="template"?[[y.viewBoxA[0],y.viewBoxA[1]],[y.viewBoxA[2],y.viewBoxA[3]]]:n.width>0?[[d.d0(n.x),d.d0(n.y)],[d.d0(n.width),d.d0(n.height)]]:[[g[0],g[1]],[g[2],g[3]]];var k=[[0,0],[g[1][0]-1,g[1][1]-1]],l=[[0,0],[g[1][0]+1,g[1][1]+1]],u=d3.scaleLinear().domain([0,d.d0(n.width-1)]).rangeRound([0,255]).clamp(!0),L=d3.scaleLinear().domain([0,d.d0(n.width-1)]).rangeRound([0,255]).clamp(!0);d.vprint("d3","voronify d3 extentA:"+
    23 d.dumpvar(k,"onelevel")+" extentB:"+d.dumpvar(l,"onelevel"));k=D.getRandPoint(D.codonSel(b.num),k,b.xpat,b.ypat);d.startTimer();d.vprint("util","voronify d3 rand points time:"+d.getTimer()+" num sites:"+k.length);n="pattern_"+d.alphanumA[Math.floor(Math.random()*36)]+d.alphanumA[Math.floor(Math.random()*36)]+d.alphanumA[Math.floor(Math.random()*36)]+"_1_";b.colorO!=null&&b.colorO.cfFunc!=null&&(d.vprint("d3","voronify d3 -START- using color func:"+b.colorO.cfFunc),t[b.colorO.cfFunc](a,b.colorO),d.vprint("d3",
    24 "voronify d3 -END-  using color func:"+b.colorO.cfFunc));a=d3.voronoi().extent(l);d.vprint("d3","voronify d3 GERNERATE time:"+d.getTimer());var x=[],I="fill";B.isArray(b.shape)&&(b.shape=D.codonSel(b.shape));b.shrink!=null&&(b.shrink=D.codonSelJSON(b.shrink),b.shape!="lines"&&b.shape!="oneline"&&b.shape!="triangles"||b.shrink.thinthreshold==null||delete b.shrink.thinthreshold);b.shape=="lines"||b.shape=="oneline"?(I="stroke",a=a.links(k)):a=b.shape=="triangles"?a.triangles(k):a.polygons(k);d.vprint("d3",
    25 "voronify making pattern with num points:"+a.length+" have svg el?"+c);g=c.select("defs").append("pattern").attr("id",n).attr("x",g[0][0]).attr("y",g[0][1]).attr("width",g[1][0]).attr("height",g[1][1]).attr("patternUnits","userSpaceOnUse").attr("patternTransform","scale(1)");b.cfApplyClass!=null&&g.attr("class",b.cfApplyClass);g.selectAll("path").data(a).enter().append("path").attr(I,function(v,M){return v==null||v.length==null&&v.source==null?(d.vprint("d3^2","BAD d at index["+M+"]"+d.dumpvar(v,
    26 "onelevel")),""):b.colorO!=null?(f=v.source==null?v[0][0]:d.d0(v.source[0]),h=v.source==null?v[0][1]:d.d0(v.source[1]),e="#34F",b.colorO.scheme=="solid"&&b.colorO.hex!=null?e=b.colorO.hex:b.colorO.scheme=="monochrome"?e="rgb(0, 0, "+u(f)+")":b.colorO.scheme=="inerpolateColor"?e=d3[b.colorO.schemeParam](u(h)/255):b.colorO.scheme=="random"?e="rgb("+(h+f)%255+", "+u(f)+", "+L(h)+")":b.colorO.cfFunc!=null?e=da(v,M,b.colorO):d.vprint("d3","no color to set! had colorO but no scheme"),d.vprint("d3^2","setting "+
    27 I+":"+e),e):""}).attr("d",function(v,M){if(v==null||v.length==null&&v.source==null)return"";if(v.source!=null)return f=d.dd(v.source[0]),h=d.dd(v.source[1]),q=d.dd(v.target[0]),m=d.dd(v.target[1]),x.push("M",f,h,q,m),"M"+f+","+h+" "+q+","+m;var r=K.vA2O(v);r=b.shrink!=null?D.vM2Q(r,b.shrink):K.vMstr(r);d.vprint("d3^2","d["+M+"]:numpoints:"+v.length+": Cstr:"+r);return r});x.length>0&&b.shape=="oneline"&&(a=c.select("g"),d.vprint("d3","voronify had allPoints:"+x.length+" have g element?"+a),g=x.join(),
    28 g=g.replace(/,?M,/g," M"),l=e==null?"":" stroke='"+e+"'",a.node().innerHTML="<path "+l+"  d='"+g+"' />");d.vprint("util","voronify d3 MODIFY time:"+d.getTimer());z.attr("fill","url(#"+n+")");y.isBlocks&&c.append("rect").attr("x",0).attr("y",0).attr("width","100%").attr("height","100%").attr("fill","url(#"+n+")")};this.d3transform=function(a,b,c){d.vprint("d3","d3transform  = = =  START = = =  with rootel:"+a);a=d3.select(a);R=-1;d.vprint("d3","have codondex:"+R+" codon array:"+c);var e=this.codonSel(b.cfSections);
    29 var g=qa(b,e);c=b.cfData!=null?b.cfData:d.ones(e);d.vprint("d3","my data array:"+c);var f=a.node().firstChild;for(d.vprint("d3","num first child:"+f.nodeName+","+f+" nextSibling:"+f.nextSibling.nodeName);(f.nodeName=="#text"||f.nodeName=="#comment")&&f.nextSibling!=null;)f=f.nextSibling;d.vprint("d3","look for tag:"+f.nodeName);d.vprint("d3","rendering with cfSections:"+e+" cfTag:"+b.cfTag+" cfWrap:"+b.cfWrap+" incA:"+g+":");this.incA=g;this.jA=b;B.isArray(b.cfTag)||(b.cfTag=[b.cfTag]);B.isArray(b.cfWrap)||
    30 (b.cfWrap=[b.cfWrap]);c=a.selectAll(f.nodeName).data(d.ones(e)).enter().append(function(){return f.cloneNode()});for(a=0;a<b.cfTag.length;a++)this.wrap=b.cfWrap[a],this.contA=this.wrap.match(/CONTENT[0-9]+_/g),d.vprint("d3","process tag:"+b.cfTag[a]+" wrap:"+this.wrap+" numtags:"+this.contA),c.attr(b.cfTag[a],ra.bind(this))};this.divEffect=function(a){var b=a.getAttribute("data-div");var c=a.getAttribute("data-aa");d.vprint("d3","divEffect: - - - - - - - - - -  - - - - - - - - - -arg:"+typeof a+"  have data?"+
    31 typeof genolve_gen_sel_hash+" key:"+c+" "+b);if(b.match(/(decoration|text|flair)/)){var e=parseFloat(a.getAttribute("data-dur"));a=parseFloat(a.getAttribute("data-pause"));d.vprint("d3","divEffect: - - - - - - - - - -  - - - - - - - - ani dur:"+e+" pause:"+a);var g="falling-snow-"+b;var f=B("#"+g);f.length>=1?d.vprint("eloop","divEffect: - - - - - - - - - -  - - - - - - - - div already there!"+g):(B("body").prepend('<div id="'+g+'" class="gnlv-falling"/>'),f=B("#"+g),b=d3.select("#"+c+" #"+b).node().innerHTML,
    32 b=b.replace("opacity: 0","opacity: 1"),d.vprint("d3","divEffect: - - - - - - - - - -  - - - - - - - - svg:"+b),b='<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg width="100%" height="100%"  preserveAspectRatio="xMinYMin slice" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:html="http://www.w3.org/1999/xhtml"><desc>evolved at www.genolve.com</desc>CONTENT</svg>'.replace(/CONTENT/,b),c="data:image/svg+xml;utf8,"+encodeURIComponent(b),c="data:image/svg+xml;base64,"+
    33 btoa(b),f.css({"background-image":"url( '"+c+"')"}),f.css({opacity:0,animation:"gnlv-opacity-fadein  linear  "+e+"s forwards"}),document.fallingtimeout1=window.setTimeout(function(){B("#"+g).css({opacity:1,animation:"gnlv-opacity-fade  linear  "+e+"s forwards"})},(e+a)*1E3),document.fallingtimeout2=window.setTimeout(function(){B("#"+g).remove()},(e*2+a)*1E3))}else typeof genolve_gen_sel_hash!="undefined"&&genolve_gen_sel_hash[b]?(d.vprint("d3","divEffect: data:"+d.dumpvar(genolve_gen_sel_hash[b])),
    34 genolve_divEffect(b,d,B)):d.vprint("warn","divEffect: genolve_gen_sel_hash had no data for:"+b)};var sa=function(a,b){var c,e=y.anielapsed();var g=F[b].segmO[a];for(c in g)if(c=="wurd"){var f=D.autoWrapIt("text",null,F[b].justify,F[b].autoWrap,htmlEntities(g[c]));var h=d3.select("#"+b+" g[id^=tgrp]");d.vprint("aig","doSubtitles.runSegment["+a+"] found tgrp under ["+b+"]? "+typeof h);h.node().innerHTML=f}else c!="start"&&c!="TO"&&(f=Snap.select("#"+c))&&f.attr&&(g[c].match(/;/)?f.attr("keyTimes",g[c]):
    35 (f.attr("begin",g[c]),f.attr("lastcall",""),f.attr("from",Math.random())),d.vprint("aig","doSubtitles.runSegment["+a+"] subt at:"+d.d4(e/F[b].atime)+" restored["+c+"] -> "+g[c]))};this.subt_kickoff=function(a,b){var c,e;if(typeof a=="string")d.vprint("eloop","subt_kickoff found string AAid:"+a);else if(a&&a.getAttribute("id")=="timekeeperani"){ca=a.parentNode.parentNode.getAttribute("datatime");a=a.parentNode.parentNode.parentNode.getAttribute("id");d.vprint("eloop","subt_kickoff had AAid?"+a+" atime:"+
    36 ca+" aidA set?"+typeof F);if(ca==null)return;F[a]||(F[a]={});F[a].atime=ca}else d.vprint("eloop","subt_kickoff found no AAid! type:"+typeof a+" attributes?"+a.attributes.id+" getAttr:"+a.getAttribute("id"));if(!F[a].segmO||b!=null)if(d.vprint("eloop","subt_kickoff ======== looking for segO under #"+a+" #text"),c=d3.select("#"+a+" #text")){if(e=c.node().getAttribute("segm"))d.vprint("error","subt_kickoff found and set segmO:"+e),F[a].segmO=d.parsejson(e);if(c=c.node().getAttribute("gnlv-data"))d.vprint("eloop",
    37 "subt_kickoff found and set mydata:"+c),c=d.parsejson(c),F[a].justify=c.justify,F[a].autoWrap=c.autoWrap}b==null&&(b=0);if(F[a].segmO)for(d.vprint("eloop","subt_kickoff ======== subtitles num segments:"+F[a].segmO.length+" startat:"+b+" dump first:"+d.dumpvar(F[a].segmO[0])),e=0;e<F[a].segmO.length;e++)c=F[a].segmO[e],d.vprint("eloop","subt_kickoff ========["+e+"]: seg.start:"+c.start+" >? startat:"+b),c.start>=b&&(c.TO&&window.clearTimeout(c.TO),F[a].segmO[e].TO=window.setTimeout(sa,d.setVal(c.start,
    38 -(b+.001),0,F[a].atime,d.setValMode.LIMIT)*1E3,e,a))};this.d3confetti=function(a,b,c,e,g,f,h){var q=0,m=0,z,n=f.match(/(burst-selfzoomInOut)/)?9:f.match(/(sprinkle)/)?20:30;var k=0;var l=a.getAttribute("lastcall");var u=a.getAttribute("dur");var L=a.getAttribute("utarg"),x=a.getAttribute("sizehint");e=parseInt(e);if(e>0)if(l==null&&h=="repeat"){if(h=y.anielapsed()-parseFloat(a.getAttribute("begin")),h<0&&(h+=parseFloat(u)),a.setAttribute("lastcall",Date.now()-h*1E3),d.vprint("d3","d3confetti first call ignore, start delta:"+
    39 h+" firefox:"+d.getBrowser("isfirefox")),d.getBrowser("isfirefox"))return}else if(h=="begin")d.vprint("d3","d3confetti 1st begin OK");else{if(Date.now()-l<(parseFloat(u)-.5)*1E3){d.vprint("d3^2","d3confetti anirepeat ignore delta:"+(Date.now()-l)+" < "+(parseFloat(u)-.5)*1E3);return}d.vprint("d3","d3confetti trigger:"+a.id+"  delta:"+(Date.now()-l)+" event:"+h);a.setAttribute("lastcall",Date.now())}l=a.getAttribute("lastcall");var I=t.mulberry32(parseFloat(l));u=d3.select(b);if(u==null||u.size==null||
    40 u.size()!=1)d.vprint("warn","confetti X X X X found none or more than one of place targ:"+b);else if(f.match(/(sprinkle)/)){var v=a.getAttribute("vx");var M=a.getAttribute("vy");d.vprint("d3","d3confetti sprinkle tw/th:"+y.tw+","+y.th+" scaled xy limits:"+v+","+M)}var r=d3.select("#"+c);r!=null&&r.size!=null&&r.size()==1&&r.node!=null||d.vprint("warn","confetti X X X X found none or more than one of targ:"+c+":"+typeof r);var E=b.match(/(text)/);l=E?"g[id^=tgrp]":"g[id^=B0]";h=r.select(l);f.match(/(corner)/)&&
    41 (h=d3.select("#"+L));if(h==null||h.size==null||h.size()!=1||h.node==null)d.vprint("warn","confetti X X X X found none or more than one of:usetargid:"+L+" OR selector:"+l+" place:"+b+" from :"+r.attr("id")),f.match(/(self)/)||(h=r),d.vprint("warn","usetarg alternate:"+(h.size?h.size():"nada"));else{var J=[];k=f.match(/(sprite)/)?r:h;k=k.selectAll(".gnlv-sprite");k.each(function(C){J.push(d3.select(this))});f.match(/(sprite)/)||k.classed("gnlv-gone",!1);k=k.size();k>0&&d.vprint("d3","confetti: is a sprite? found:"+
    42 k)}var p=r.node().getBBox();l=[[d.d0(p.x),d.d0(p.y)],[d.d0(p.width),d.d0(p.height)]];var N=Math.max(p.width,p.height)*2;var aa=b.match(/(text)/)?100:50;var G=d.dd(Math.abs(g)/15);G=f.match(/(burst-selfzoom)/)?1:G;var ta=Math.floor(Math.random()*90-45),S=1;if(f.match(/(tile)/)){r=d3.select("#"+L);r=r.node().getBBox();if(typeof r!="object"||r.width==0)r={x:0,y:0,width:200,height:200};x&&(S=parseFloat(x)/(E?5:20));n=parseInt(p.width/(S*r.width)*p.height/(S*r.height)+.5);d.vprint("d3","confetti: TILE TILE "+
    43 L+" tilesizer:"+x+"->"+S+" targetsize:"+p.x+","+p.y+","+p.width+","+p.height+" size:"+r.width+","+r.height+" object size:"+p.width+","+p.height+" NUM:"+n);p.width==0?(x=a.getAttribute("tbox"),x!=null?p=d.parsejson(x):d.vprint("warn","confetti: box width zero and no saved data!")):a.setAttribute("tbox",JSON.stringify(p).replace(/"/g,"'"));var H=b.match(/(text)/)?B.extend({},p):{x:0,y:0,width:200,height:200};n=parseInt(H.width/(S*r.width)*H.height/(S*r.height)+.5);H.cx=H.x+H.width/2;H.cy=H.y+H.height/
    44 2;q=H.x;m=H.y}x="interpolateCool";p="interpolateWarm";if(f.match(/(burst-selfzoomInOut|sprinkle|sprite|tile)/)){x="interpolateRainbow";p="interpolateViridis";var O=parseFloat(a.getAttribute("ppp"));var P=parseFloat(a.getAttribute("ddd"))}var ea=d3[x],ma=d3[p];if(f.match(/(sprite)/)&&J.length>0)e>0?(ia(J,1),window.setTimeout(y.tpr.d3confetti,(P+O-1.1)*1E3,a,b,c,-e,g,f)):(d.vprint("d3","confetti:  SPRITE X deactivate X"),ia(J,0));else if(e>0){u.select("#confetti"+c).remove();r=d3.select("#"+c);p=r.node().getBBox();
    45 O=b.match(/(text)/)?p.x+p.width/2:p.width/2;var W=p.height/2;Math.abs(g)!=10&&Math.abs(g)!=3||!f.match(/(burst-self|tile|corner)/)?b.match(/(text)/)&&(O=f.match(/(burst-selfzoom|tile)/)?0:O/2,W=f.match(/(burst-selfzoom|tile)/)?0:W/2):W=O=0;x="translate("+O+","+W+")";E="";c.match(/tel[0-9]+_/)&&(E+=" "+u.select("g[id^=tgrp]").attr("class"),h=r,r=parseFloat(c.split("_")[1]),W=f.match(/(burst-self|corner)/)?(r-1)*p.height*G:(r-1)*p.height,x=f.match(/(burst-selfzoom|tile)/)?x:"translate("+O+","+W+")");
    46 d.vprint("d3","confetti: making it, toggle:"+e+" under:"+b+" id:"+u.attr("id")+" svg:bbox:"+l+"  scale:"+G+" gtrans:"+x);O=u.append("g").attr("id","confetti"+c).attr("transform",x).attr("class",f+E);f.match(/(InOut)/)&&(l=document.createElement("style"),l.type="text/css",P=document.createTextNode(".gnlv-btime use { --bdur:"+P+"s; }"),l.appendChild(P),O.node().appendChild(l));var fa=O.append("g").attr("id","confettig").attr("class","gnlv-btime").attr("style","transform:translate(0px,0px)");if(f.match(/(burst-self|corner)/)){u.size()>
    47 1&&alert("size for place too big:"+u.size());var U=[];P=k==0?h.attr("id"):J[0].attr("id");fa.selectAll("use").data(d3.range(n)).enter().append("use").attr("xlink:href","#"+P).attr("style",function(C,w){var A;var ba=f.match(/(burst-selfzoom)/)?ea(w/n):Z(6);var ha=f.match(/(burst-selfzoom)/)?ma(w/n):Z(6);var X=A=100;C=0;if(f.match(/(collapse)/)){A=d.ddd(Math.random()*Math.PI*2);U.push(A);C=d.d0(A*180/Math.PI+90);var Q=0+N;X=f.match(/(burst-selfzoom)/)?100:100+Q*Math.cos(A);A=f.match(/(burst-selfzoom)/)?
    48 100:100+Q*Math.sin(A);G=b.match(/(text)/)?3:.7}else f.match(/(sprinkle)/)?(A=d.ddd(Math.random()*Math.PI*2),U.push(A),C=0,X=parseFloat(v)*I()-v/2,A=parseFloat(M)*I()-M/2,G=0):f.match(/(tile)/)&&(A=d.ddd(Math.atan2(m-H.cy,q-H.cx)),U.push(A),C=0,A=X=100,z="mask_"+w,fa.append("mask").attr("id",z).append("use").attr("xlink:href","#"+L).attr("fill","#FFFFFF").attr("transform","translate("+q+","+m+") scale("+S+")"),q+=200*S,q>=H.x+H.width&&(q=H.x,m+=200*S,m>=H.y+H.height&&d.vprint("d3","confetti["+w+"]:  y:"+
    49 m+" past bound:"+(H.y+H.height)+" delta:"+200*S)),G=1);w=f.match(/(burst-selfzoom|sprinkle|tile)/)?";transition-delay:"+d.dd(1-w/n)+"s;":"";f.match(/(tile)/)&&(w+=";mask:url('#"+z+"');");return"transform:translate("+X+"px,"+A+"px) rotate("+C+"deg) scale("+G+") translate(-100px,-100px);opacity:1;fill:"+ba+"; stroke:"+ha+w});a.setAttribute("ang",U.join())}else fa.selectAll("path").data(d3.range(n)).enter().append("path").attr("d",function(C,w){var A;f=="burst-triangle"||f=="burst-confetti"?A="M 0,0 60,0 30,40z":
    50 f=="burst-stars"?A="M47-9.4L19.4,11.5l8.9,33.5L-0.1,25.1l-29.1,18.8l10.1-33.1L-46-11l34.6-0.7L1.1-44l11.3,32.7L47-9.4   L19.4,11.5":f=="burst-bubbles"?A="M25,0.8c0,6.6-2.6,12.5-6.9,17C13.5,22.5,7.9,25,1.1,25c-7.8,0-13.5-3.8-17.1-7.1c-4.2-3.9-7-11-7-17.1\t\tc-0.1-5.4,2.1-12.1,7-16.8c4.9-4.7,10.5-7,17-7c7.7,0,13.3,3.1,17,7C22.3-11.4,25-5.8,25,0.8c0,6.6-2.6,12.5-6.9,17":console.warn("3rdparty.raindrop has no option to make:"+f);return A}).attr("style",function(C,w){C=f=="burst-bubbles"?ea(w/n):Z(6);
    51 return"transform:translate(0px,0px) scale("+G+");opacity:1;fill:"+C});window.setTimeout(y.tpr.d3confetti,100,a,b,c,-e,g,f)}else x=f.match(/(burst-self|corner)/)?"use":"path",d.vprint("d3","confetti: animate it, toggle:"+e+" target:"+c+": found?"+u.select("#confetti"+c).size()+" selecting:"+x),e==-3&&f.match(/(burst-selfzoomInOut)/)?(d.vprint("d3","confetti remove confetti hack!"),u.select("#confetti"+c).remove()):e==-2&&f.match(/(burst-selftile)/)?(l=u.select("#defs"+c),l.size()==1&&(a=l.node().parentNode,
    52 d.vprint("d3","d3confetti UNDO defs hide, parent:"+a.getAttribute("id")),c=l.select("#defs"+c+">g"),c.size()==1?a.appendChild(c.node()):d.vprint("warn","d3confetti UNDO defs num <g> found other than 1:"+c.size()))):(f.match(/(burst-selfzoom|tile)/)&&(l=u.select("#defs"+c),l.size()==0&&(d.vprint("d3","confetti: create defs wrap"),p=document.createElementNS("http://www.w3.org/2000/svg","defs"),p.setAttribute("id","defs"+c),(r=h.node().parentElement)?(r.appendChild(p),l=u.select("#defs"+c)):d.vprint("d3",
    53 "confetti: utarg parent null")),l.node().appendChild(h.node())),h=u.select("#confetti"+c),h=h.selectAll("g").attr("style",function(C,w){C=0;f=="burst-bubbles"&&(C=-600*G,N/=2);return"transform:translate(0px,"+C+"px)"}),h=u.selectAll("#confetti"+c+" g>"+x),f.match(/(collapse|tile)/)&&(u=a.getAttribute("ang"),U=u.split(/,/).map(Number),I=t.mulberry32(U[0])),h.attr("style",function(C,w){var A=0,ba=0;var ha=f.match(/(burst-selfzoom|burst-bubbles)/)?ma(w/n):Z(6);var X=f.match(/(burst-selfzoom|burst-bubbles)/)?
    54 ea(w/n):Z(6);C=f.match(/(burst-selfzoom)/)?ta:d.d0(Math.random()*360-180);var Q=d.ddd(Math.random()*Math.PI*2);var T=Math.random()*N;var Y=0;f.match(/(collapse)/)?(Q=U[w],C=d.d0(Q*180/Math.PI+90),T=I()*aa,ba=25*I()-12.5,Y=e==-2?0:1,A=100,G=b.match(/(text)/)?1:.1):f.match(/(tile)/)&&(G=w<n*.25||w>n*.75?1.5+Math.random():.1+Math.random(),Q=U[w],Y=C=T=0,A=100);var na=f.match(/(burst-selfzoom)/)?100:A+ba+T*Math.cos(Q);Q=f.match(/(burst-selfzoom)/)?100:A+ba+T*Math.sin(Q);f.match(/(burst-selfzoomInOut)/)&&
    55 e==-1?(G=14,Y=1):f.match(/(burst-selfzoomInOut)/)&&e==-2?Y=G=1:G=f.match(/(burst-selfzoom)/)?d.dd(w*10/n):G;f.match(/(sprinkle)/)&&(C=0,na=parseFloat(v)*I()-v/2,Q=parseFloat(M)*I()-M/2,G=w<5?3.5+Math.random():.3+Math.random(),e==-2&&(G=.1),Y=e==-2?0:1);T=f.match(/(burst-self|corner|sprinkle|tile)/)?"translate(-100px,-100px)":"";T+=f.match(/(burst-selfzoom|corner|tile)/)?";transition-delay:"+(e==-1?d.dd(1-w/n):d.dd(w/n))+"s":"";T+=f.match(/(sprinkle)/)?";transition-delay:"+(e==-1?d.dd(w/n):d.dd(1-
    56 w/n))+"s":"";T+=f.match(/(tile)/)?";mask:url('#mask_"+w+"')":"";return"transform:translate("+na+"px,"+Q+"px) rotate("+C+"deg) scale("+G+") "+T+";opacity:"+Y+";fill:"+ha+"; stroke:"+X}),f.match(/(collapse)/)&&k>0&&(d.vprint("d3","confetti s s s s s s s s s s s s s s s s s s s s s s s s s s s sprites found:"+k),h.on("transitionend",function(C,w){d3.select(this).attr("href","#"+J[1].attr("id"))})),e>-3&&f.match(/(burst-selfzoomInOut|sprinkle)/)&&(d.vprint("d3","confetti: que - = 3rd toggle = - , reverse"+
    57 e),e==-1?window.setTimeout(y.tpr.d3confetti,(P+O-1.1)*1E3,a,b,c,e-1,g,f):window.setTimeout(y.tpr.d3confetti,3500,a,b,c,e-1,g,f)),e>-2&&f.match(/(collapse|tile)/)&&(P=f.match(/(collapse)/)?2.2:P+O,d.vprint("d3","confetti: - = 2nd toggle = -, delay:"+P+" opacity"+e),window.setTimeout(y.tpr.d3confetti,P*1E3,a,b,c,e-1,g,f)))};var ra=function(a,b){var c,e=this.wrap;for(c=0;c<this.contA.length;c++){var g=d.d0(this.contA[c])-1;var f=this.jA.cfCalc==null?"+":this.jA.cfCalc[g];d.vprint("d3","d3Attr_templateEngine i["+
    58 b+"] d["+a+"] nn["+c+"] wrap:"+this.contA[c]+" inc["+g+"]="+this.incA[g]+" calc:"+f);f=="*"?(e=e.replace(this.contA[c],this.jA.cfFrom[g]),this.jA.cfFrom[g]*=this.incA[g]):e=e.replace(this.contA[c],this.jA.cfFrom[g]+b*this.incA[g])}return e};this.codonSelJSON=function(a){for(var b in a)B.isArray(a[b])&&(a[b]=D.codonSel(a[b]));return a};this.setCodonA=function(a){V=a};this.codonSel=function(a,b){if((b=="scale"||b=="normal"||b==null)&&!B.isArray(a))return d.vprint("d3","codonSel, have NORMAL mode but not passed a array!"+
    59 a),a;R=d.setVal(R,1,0,V.length-1,d.setValMode.LOOP);var c=parseInt(V[R]);b=="scale"?a=d3.scaleLinear().domain([0,200]).range(a).clamp(!0)(c):b=="func"?(typeof a!="function"&&d.vprint("d3","codonSel, have function mode but not passed a function!"+a),a=a(parseFloat(c)/200)):a=a[c%a.length];d.vprint("d3","codonSel codonA["+R+"]="+c+" selects   = =>    "+a);return a};this.d3_getNchild=function(a,b){var c=[];a=a.firstChild;for(d.vprint("d3","d3_getNchild first child:"+a.nodeName+","+a+" nextSibling:"+
    60 a.nextSibling.nodeName);a.nextSibling!=null&&b>0;)a.nodeName=="#text"||a.nodeName=="#comment"?a=a.nextSibling:(c.push(a),a=a.nextSibling,b--);return c};this.getRandPoint=function(a,b,c,e,g,f){var h=[],q=d.d0(b[0][0]),m=d.d0(b[0][1]),z=d.d0(b[1][0]),n=d.d0(b[1][1]);d3.scaleLinear().domain([q,q+z]).range([q,q+z]).ticks(7);c=="VRANDOM"&&(c=D.codonSel(ka));e=="VRANDOM"&&(e=D.codonSel(ka));c=="RANDOM"&&(c=D.codonSel(ja));e=="RANDOM"&&(e=D.codonSel(ja));for(b=0;b<a;b++){var k=Math.random();var l=Math.random();
    61 var u=.5+.1*Math.sin(l*2*Math.PI);var L=.5+.1*Math.sin(k*2*Math.PI);c!="uniform"&&(c=="bigEdge"?k=k>u?d3.easeQuadIn(k):d3.easeQuadOut(k):c=="bigMiddle"?k=k<u?d3.easeQuadIn(k):d3.easeQuadOut(k):c=="bands"?k=Math.round(k*z/15)*15/z:(d3[c]==null&&(d.vprint("warn","getRandPoint did not find ease:"+c+" selecting: easeLinear"),c="easeLinear"),k=d3[c](k)));e!="uniform"&&(e=="bigEdge"?l=l>L?d3.easeQuadIn(l):d3.easeQuadOut(l):e=="bigMiddle"?l=l<L?d3.easeQuadIn(l):d3.easeQuadOut(l):e=="bands"?l=Math.round(l*
    62 n/15)*15/n:(d3[e]==null&&d.vprint("warn","getRandPoint did not find ease:"+e),l=d3[e](l)));l=[d.d0(k*z+q),d.d0(l*n+m)];g!=null&&l.push(d.dd(d.setVal(0,0,g[0],g[1],d.setValMode.RANDOM)));f!=null&&l.push(d.dd(d.setVal(0,0,f[0],f[1],d.setValMode.RANDOM)));h.push(l)}return h};var qa=function(a,b){var c,e=[];b<1&&console.error("doFromToBy sections must be 1 or more");B.isArray(a.cfFrom)||(a.cfFrom=[a.cfFrom]);if(a.cfTo!=null)for(B.isArray(a.cfTo)||(a.cfTo=[a.cfTo]),a.cfTo.length!=a.cfFrom.length&&console.warn("doFromToBy: size From != To: "+
    63 a.cfFrom.length+"!="+a.cfTo.length),c=0;c<a.cfTo.length;c++){var g=(a.cfTo[c]-a.cfFrom[c])/(b-1);d.vprint("d3","doFromToBy["+c+"] sections:"+b+":"+g);e[c]=g}a.cfInc!=null&&(B.isArray(a.cfInc)||(a.cfInc=[a.cfInc]),a.cfInc.length!=a.cfFrom.length&&console.warn("doFromToBy: size From != cfInc: "+a.cfFrom.length+"!="+a.cfInc.length),e=a.cfInc);return e};this.vM2Q=function(a,b){var c,e,g=[];if(b.thinthreshold!=null&&(a=K.vthinpoints(a,b.thinthreshold),a.length<3))return"";var f=K.vcentroid(a);var h=b.shrinkamount;
    64 for(c=0;c<a.length;c++){var q=b.shrinkmode=="centroid"?K.vwave(a[c],h,f,1):b.shrinkmode=="fixed"?K.vmovetoward(a[c],f,h):a[c];g.push(q);c==0&&(e=q);if(c<a.length-1){q=K.vave(a[c],a[c+1]);var m=K.vmag(K.vsub(a[c],a[c+1]))}else q=K.vave(a[c],a[0]),m=K.vmag(K.vsub(a[c],a[0]));var z=1-Math.pow(.3*m/Math.abs(h),1.1);m=z<-2?-2*h:z*h;d.vprint("util^2","vM2Q factor:"+z+" delta2:"+m);b.shrinkmode=="fixed"?g.push(K.vmovetoward(q,f,m)):g.push(q)}g.push(e);g.length%2==0&&d.vprint("util","vM2Q POINTS missmatch EVEN need ODD");
    65 if(b.retmode=="points")return g;a="M"+g[0].cx+","+g[0].cy+" Q";for(c=1;c<g.length;c++)a+=g[c].cx+","+g[c].cy+" ";return a+" Z"}};
     1"use strict";function GNLV_3RDPARTY(t,e,r){var a=this,n=this,o=-1,i=[42,43],l="easeLinear,easeQuad,easeQuadIn,easeQuadOut,easeCubic,easeCubicIn,easeCubicOut,easeSin,easeSinIn,easeSinOut,easeExp,easeExpIn,easeExpOut,easeCircle,easeCircleIn,easeCircleOut".split(/,/),s=["uniform","bands","bigMiddle","bigEdge","RANDOM"],c=["complementary","splitcomplementary","analagous","triadic","tetradic","monochromatic"],d="complementaryScheme,splitComplementaryScheme,splitComplementaryCWScheme,splitComplementaryCCWScheme,triadicScheme,clashScheme,tetradicScheme,fourToneCWScheme,fourToneCCWScheme,fiveToneAScheme,fiveToneBScheme,fiveToneCScheme,fiveToneDScheme,fiveToneEScheme,sixToneCWScheme,sixToneCCWScheme,neutralScheme,analogousScheme".split(/,/),u=String("interpolateMagma,interpolateViridis,interpolateInferno,interpolatePlasma,interpolateWarm,interpolateCool,interpolateRainbow,interpolateCubehelixDefault").split(/,/);this.imgkey="notset",this.apidiv="notset",this.apidivA={},this.cryb="notset",this.Color="notset",this.kulaA,this.pjA,this.limitkula,this.setValMode=Object.freeze({LOOP:"LOOP",LIMIT:"LIMIT",RANDOM:"RANDOM"}),null==r&&(r=jQuery),t.vprint("d3","3 3 3 3 3 3 3 3 3 3 3 3  INIT 3rd party scripts  have d3?"+typeof d3+" have Color?"+typeof net+" have ColorRYB?"+typeof ColorRYB+"3 3 3 3 3 3 3 3 3 3 3 3 eloop:"+typeof document.eloop);var f=document.eloop,p={},h=15;"undefined"==typeof net||"undefined"==typeof ColorRYB?(t.vprint("d3","3 3 3 3 3 3 3 3 3 3 3 3  INIT dynamic load color.js scripts   3 3 3 3 3 3 3 3 3 3 3 3 from:"+f.actionhost),r.getScript(f.actionhost+"/js/color-js/color.js",(function(){a.Color=net.brehaut.Color,a.cryb=new ColorRYB(t,r),t.vprint("d3","3 3 3 3 3 3 3 3 3 3 3 3 DONE INIT dynamic load color scripts DONE  3 3 3 3 3 3 3 3 3 3 3 3 had net.Color?"+typeof net+" cryb?"+typeof ColorRYB)}))):(a.Color=net.brehaut.Color,a.cryb=new ColorRYB(t,r),t.vprint("d3","3 3 3 3 3 3 3 3 3 3 3 3  INIT normal load color scripts DONE  3 3 3 3 3 3 3 3 3 3 3 3")),"undefined"==typeof d3&&r.getScript(f.actionhost+"/js/d3/d3.min.js",(function(){t.vprint("d3","3 3 3 3 3 3 3 3 3 3 3 3  d3 loaded DONE  3 3 3 3 3 3 3 3 3 3 3 3")})),this.mulberry32=function(t){return function(){var e=t+=1831565813;return e=Math.imul(e^e>>>15,1|e),(((e^=e+Math.imul(e^e>>>7,61|e))^e>>>14)>>>0)/4294967296}},this.autoWrapIt=function(e,r,a,o,i){null==e&&(e=f.activeslot);var l,s,c,d,u,p,h,m,g,v,b,y=[],A=new RegExp("\\[font\\d\\]","ig"),w=[],x=0,S=0,T="tel"+Math.floor(1e3*Math.random())+"_",O=[];if(r)for(t.vprint("text","autoWrapIt found num font tags:"+r.length),l=0;l<r.length;l++)w[l]=!1,y.push(new RegExp("\\[font"+(l+1)+"\\]","i")),O.push("<tspan "+t.dumpvar(r[l],"css")+">");var k='<text id="DENT" class="gnlvani" FONTSIZE x="0" dy="DDYY">CONTENT</text>';S=0;var M=function(t){var e=t;if(r)for(l=0;l<r.length;l++)for(;e.match(y[l]);)w[l]=!w[l],u=w[l]?O[l]:"</tspan>",e=e.replace(y[l],u);return e},N=function(t){var e="";if(r)for(l=0;l<r.length;l++)"close"==t?e+=w[l]?"</tspan>":"":"open"==t?e+=w[l]?O[l]:"":console.warn("autoWrapIt:getOpenClose bad arg:"+t);return e};for(i.match(/&lt;br&gt;&lt;br&gt;/)&&(i=i.replace(/&lt;br&gt;/gi," &lt;br&gt;")),"blockit"==a&&(i=(i=i.toUpperCase()).replace(/&LT;BR&GT;/gi,"&lt;br&gt;")),c=i.split(" "),p="",h="",m="",f.slot[e]||(f.slot[e]={}),f.slot[e].hadAwrap=0,s=0;s<c.length;s++)if((g="&lt;br&gt;"==(v=c[s])?["",""]:v.split(/&lt;br&gt;/)).length>2&&console.warn("autoWrapIt:shit break split num over2:"+g.length),String(p+v.replace(A,"")).length>o||g.length>1){if(f.slot[e].hadAwrap++,x=f.slot[e].hadAwrap,g.length>1){for(t.vprint("text","autoWrapIt start BREAKS loop breakA:"+g);g.length>1;)h+=M(d=g.shift()),p+=d.replace(A,""),S+=b="blockit"==a?n.calcFS(o,p):58,p.match(/^\s*$/)||(m+=k.replace("DDYY",S+"").replace("FONTSIZE",'style="font-size:'+b+'px"').replace("CONTENT",h).replace("DENT",T+x)),v=p=h="",x++;v=g.shift()}else{if(t.vprint("text","autoWrapIt WRAP up buf:"+p+": nextWord:"+v+":"),""==p){p=v,h=v,v.match(A)&&console.warn("autoWrapIt: missed a font tag on:"+v);continue}p=p.replace(/ $/,""),h=h.replace(/ $/,"")+N("close"),S+=b="blockit"==a?n.calcFS(o,p):58,p.match(/^\s*$/)||(m+=k.replace("DDYY",S+"").replace("FONTSIZE",'style="font-size:'+b+'px"').replace("CONTENT",h).replace("DENT",T+x))}h=(d=N("open"))+M(v)+" ",p=v.replace(A,"")+" "}else t.vprint("text","autoWrapIt traverse words buf:"+p+": next:"+v+":"),h+=M(v)+" ",p+=v.replace(A,"")+" ";return p.match(/^\s*$/)||(t.vprint("text","autoWrapIt start LAST tspan buf:"+p+":"),p=p.replace(/ $/,""),h=h.replace(/ $/,""),b="blockit"==a?n.calcFS(o,p):58,x++,m+=k.replace("DDYY",(S+=b)+"").replace("FONTSIZE",'style="font-size:'+b+'px"').replace("CONTENT",h).replace("DENT",T+x)),t.vprint("text","autoWrapIt DONE size:"+c.length+" autowrap:"+o+" ["+i+"]->"+m),m},this.calcFS=function(e,r,a){var n,o,i,l=r.length;return l<=0?58:((o=r.match(/I/g))&&"object"==typeof o&&(l-=.8*o.length),(o=r.match(/J/g))&&"object"==typeof o&&(l-=.3*o.length),(o=r.match(/[ \.]/g))&&"object"==typeof o&&(l-=.6*o.length),(o=r.match(/[MW]/g))&&"object"==typeof o&&(l+=.45*o.length),(o=r.match(/[\-=]/g))&&"object"==typeof o&&(l+=.75*o.length),(o=r.match(/[\u{1f300}-\u{1f5ff}\u{1f900}-\u{1f9ff}\u{1f600}-\u{1f64f}\u{1f680}-\u{1f6ff}\u{2600}-\u{26ff}\u{2700}-\u{27bf}\u{1f1e6}-\u{1f1ff}\u{1f191}-\u{1f251}\u{1f004}\u{1f0cf}\u{1f170}-\u{1f171}\u{1f17e}-\u{1f17f}\u{1f18e}\u{3030}\u{2b50}\u{2b55}\u{2934}-\u{2935}\u{2b05}-\u{2b07}\u{2b1b}-\u{2b1c}\u{3297}\u{3299}\u{303d}\u{00a9}\u{00ae}\u{2122}\u{23f3}\u{24c2}\u{23e9}-\u{23ef}\u{25b6}\u{23f8}-\u{23fa}]/gu))&&"object"==typeof o&&(l+=.75*o.length),i=parseInt(e||20),r.match(/^\s+$/)&&(l=i),n=parseInt(i/l*58),t.vprint("text","calcFS inlen:"+r.length+"->adjust:"+l+"->"+n+":"+r+":"),a?l:n)},this.d3interpolate=function(e,r,a){var n,l;t.vprint("d3","d3interpolate  = = =  START = = =  with rootel:"+e);var s=this.d3_getNchild(e,2),c=s[0],d=c.cloneNode(),u=s[1],f=d3.select(e);this.pjA=r,null!=a&&(i=a,o=-1),t.vprint("d3","found child1:"+d.nodeName+" child2:"+u.nodeName);var p=[];for(n=0;n<r.cfTag.length;n++){var h={};h.cfTag=r.cfTag[n],h.from=d.getAttribute(r.cfTag[n]),h.to=u.getAttribute(r.cfTag[n]),h.vals=d3.quantize(d3.interpolate(h.from,h.to),r.cfSections);var m=null==r.cfEase?d3.easeLinear:d3["ease"+r.cfEase[n]];h.vals=t.zero2one(r.cfSections).map((function(t){return d3.interpolate(h.from,h.to)(m(t))})),p.push(h)}c.remove(),u.remove(),t.vprint("d3","packed up dataA:"+t.dumpvar(p)),t.vprint("d3","TEMPLATE:"+d);var g=f.selectAll(d.nodeName).data(t.ones(r.cfSections)).enter().append((function(){return d.cloneNode()}));for(l=0;l<p.length;l++)t.vprint("d3","process tag:"+p[l].cfTag+" vals:"+p[l].vals),g.attr(p[l].cfTag,(function(e,r){return t.vprint("d3","tag:"+p[l].cfTag+" val["+r+"]"+p[l].vals[r]),p[l].vals[r]}))},this.d3limitrange=function(e,r,l){var s,c=d3.select(e);null!=l&&(i=l,o=-1),t.vprint("d3","d3limitrange SELECT["+e+"] rootel type:"+c.node().nodeName+" transform: have data:"+r),a.limitkula=n.codonSel(r.cfRange,"scale");var d=c.selectAll(r.cfSelector);for(t.vprint("d3","d3limitrange my limited color is:"+a.limitkula+" apply to selection:"+r.cfSelector+" children:"+d.size()),s=0;s<r.cfTag.length;s++)t.vprint("d3","process tag:"+r.cfTag[s]+":"),d.style(r.cfTag[s],(function(t,e){return a.limitkula}))},this.d3colormatch=function(l,s,f){var p,h,g,v,b,y,A,w=d3.select(l);null!=f&&(i=f,o=-1);var x,S=s.dominate;if("currentColor"==S&&(S=t.curcolor),S.match(/^grab.*/)&&(y=S.replace(/grab/,""),v=w.attr(y),b=t.getCstyle(w.node(),y),t.vprint("d3","d3colormatch   S E E D  C O L O R   grab["+y+"].attr found:"+v+" cstyle:"+b),S="#883300",null!=v&&(S=v),null!=b&&(S=b)),t.vprint("d3","d3colormatch - START - rootel type:"+w.node().nodeName+" transform: have data:"+s+" seedColor:"+S+" scheme:"+s.cfScheme+","+typeof s.cfScheme),"function"!=typeof a.Color){if(t.vprint("d3","d3colormatch no Color obj!"),"undefined"==typeof net)return;a.Color=net.brehaut.Color}var T=a.Color(S);if(null==s.cfScheme||"RANDOMRGB"==s.cfScheme)t.vprint("d3","d3colormatch ** RGB mode"),g=n.codonSel(d),a.kulaA=T[g]();else if(null!=s.subordinate){y=s.subordinate.replace(/grab/,""),v=w.attr(y),b=t.getCstyle(w.node(),y),t.vprint("d3","d3colormatch ** S U B O R D I N A T E  C O L O R   grab["+y+"].attr found:"+v+" cstyle:"+b),x="#883300",null!=v&&(x=v),null!=b&&(x=b),t.vprint("d3","d3colormatch seedColor:"+S+" subColor:"+x);null==s.cfEase?d3.easeLinear:d3["ease"+s.cfEase[undefined]];a.kulaF=d3.interpolateRgb(S,x)}else s.cfScheme&&"string"==typeof s.cfScheme&&s.cfScheme.match(/^interpolate/)?(A=s.cfScheme&&d3[s.cfScheme]?s.cfScheme:e.iterate(u,null,"random"),t.vprint("d3","d3colormatch ** interpolation function:"+A),a.kulaF=d3[A]):r.isArray(s.cfScheme)?(g=n.codonSel(s.cfScheme),t.vprint("d3","d3colormatch ** RYB Array mode:"+g+" seedColor:"+S+" CSS:"+T.toCSS()+" have cryb?"+typeof a.cryb),a.kulaA=a.cryb.getAllSymmetries(g,T.toCSS(),"ryb")):(g=n.codonSel(c),t.vprint("d3","d3colormatch ** RYB Random Array mode:"+c+"->"+g),a.kulaA=a.cryb.getAllSymmetries(g,S,"ryb"),"complementary"!=g&&"analagous"!=g||a.kulaA.push(S));if(t.vprint("d3","d3colormatch can choose from colors=======>"+a.kulaA+" stagger?"+s.cfStagger),a.limitkula=n.codonSel(a.kulaA),"none"!=s.cfSelector){p=d3.select(t.bubbleUp(l,"svg"));var O=w.selectAll(s.cfSelector);for(t.vprint("d3","d3colormatch my limited color is:"+a.limitkula+" apply to selection:"+s.cfSelector+" children found:"+O.size()),0==O.size()&&(O=p.selectAll(s.cfSelector)),a.numkids=O.size(),h=0;h<s.cfTag.length;h++)t.vprint("d3","child["+h+"] tag:"+s.cfTag[h]+": color:"+a.limitkula),"flood-color"==s.cfTag[h]?O.attr(s.cfTag[h],(function(t,e){return m(t,e,s)})):O.style(s.cfTag[h],(function(t,e){return m(t,e,s)}))}t.vprint("d3","d3colormatch done!")};var m=function(t,e,r){var o;if(null==r.cfStagger)return a.limitkula;if("cycle"==r.cfStagger)return a.kulaA[e%a.kulaA.length];if(null!=r.subordinate||r.cfScheme&&"string"==typeof r.cfScheme&&r.cfScheme.match(/^interpolate/))return o=a.kulaF(2*e/a.numkids),2*e>a.numkids&&(o=a.kulaF((2*a.numkids-2*e)/a.numkids)),o;var i=n.getRandPoint(1,[[0,0],[a.kulaA.length-1,20]],r.cfStagger,"uniform"),l=parseInt(i[0][0]);return a.kulaA[l]};function g(t){for(var e=0,r="",a="0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f".split(",");e<t;)r+=a[Math.floor(16*Math.random())],e++;return"#"+r}function v(e,r){var a;if(r<e.length)for(var n=0;n<e.length;n++)a=e[n].attr("class"),t.vprint("d3","confetti:  SPRITE ["+n+"] current:"+a),n==r?e[n].classed("gnlv-gone",!1):e[n].classed("gnlv-gone",!0);else console.warn("3rdparty.classAct sprite"+r+" past num:"+e.length)}this.d3voronify=function(l,s,c){var d,u,p,h,g,v,b,y="0 0 200 200";t.vprint("d3","voronify START with el.id:"+l.id);var A=d3.select(l);t.vprint("d3","voronify have rootel?"+typeof A),t.vprint("d3","voronify have rootel.node?"+typeof A.node+" fill?"+A.attr("fill")),o=-1,i=c;var w=d3.select(t.bubbleUp(l,"svg"));t.vprint("d3","voronify have svg?"+typeof w);var x=w.node().getBBox();w.attr&&w.attr("viewBox")&&(y=w.attr("viewBox")),y=y.split(/ /),t.vprint("d3","voronify  eloop.template box: "+f.viewBoxA+" local bbox?"+typeof x+" local viewBox:"+w.attr("viewBox")+" obj bbox:"+t.dumpvar(x,"onelevel"));var S=[[0,0],[(d="standard"==s.target?[[0,0],[1e3,1e3]]:null!=f.viewBoxA&&"template"==s.target?[[f.viewBoxA[0],f.viewBoxA[1]],[f.viewBoxA[2],f.viewBoxA[3]]]:x.width>0?[[t.d0(x.x),t.d0(x.y)],[t.d0(x.width),t.d0(x.height)]]:[[y[0],y[1]],[y[2],y[3]]])[1][0]-1,d[1][1]-1]],T=[[0,0],[d[1][0]+1,d[1][1]+1]],O=d3.scaleLinear().domain([0,t.d0(x.width-1)]).rangeRound([0,255]).clamp(!0),k=d3.scaleLinear().domain([0,t.d0(x.width-1)]).rangeRound([0,255]).clamp(!0);t.vprint("d3","voronify d3 extentA:"+t.dumpvar(S,"onelevel")+" extentB:"+t.dumpvar(T,"onelevel"));var M=n.getRandPoint(n.codonSel(s.num),S,s.xpat,s.ypat);t.startTimer(),t.vprint("util","voronify d3 rand points time:"+t.getTimer()+" num sites:"+M.length);var N="pattern_"+t.alphanumA[Math.floor(36*Math.random())]+t.alphanumA[Math.floor(36*Math.random())]+t.alphanumA[Math.floor(36*Math.random())]+"_1_";null!=s.colorO&&null!=s.colorO.cfFunc&&(t.vprint("d3","voronify d3 -START- using color func:"+s.colorO.cfFunc),a[s.colorO.cfFunc](l,s.colorO),t.vprint("d3","voronify d3 -END-  using color func:"+s.colorO.cfFunc));var C=d3.voronoi().extent(T);t.vprint("d3","voronify d3 GERNERATE time:"+t.getTimer());var I=[],E="fill";r.isArray(s.shape)&&(s.shape=n.codonSel(s.shape)),null!=s.shrink&&(s.shrink=n.codonSelJSON(s.shrink),"lines"!=s.shape&&"oneline"!=s.shape&&"triangles"!=s.shape||null==s.shrink.thinthreshold||delete s.shrink.thinthreshold),"lines"==s.shape||"oneline"==s.shape?(E="stroke",u=C.links(M)):u="triangles"==s.shape?C.triangles(M):C.polygons(M),t.vprint("d3","voronify making pattern with num points:"+u.length+" have svg el?"+w);var F=w.select("defs").append("pattern").attr("id",N).attr("x",d[0][0]).attr("y",d[0][1]).attr("width",d[1][0]).attr("height",d[1][1]).attr("patternUnits","userSpaceOnUse").attr("patternTransform","scale(1)");if(null!=s.cfApplyClass&&F.attr("class",s.cfApplyClass),F.selectAll("path").data(u).enter().append("path").attr(E,(function(e,r){return null==e||null==e.length&&null==e.source?(t.vprint("d3^2","BAD d at index["+r+"]"+t.dumpvar(e,"onelevel")),""):null!=s.colorO?(h=null==e.source?e[0][0]:t.d0(e.source[0]),g=null==e.source?e[0][1]:t.d0(e.source[1]),p="#34F","solid"==s.colorO.scheme&&null!=s.colorO.hex?p=s.colorO.hex:"monochrome"==s.colorO.scheme?p="rgb(0, 0, "+O(h)+")":"inerpolateColor"==s.colorO.scheme?p=d3[s.colorO.schemeParam](O(g)/255):"random"==s.colorO.scheme?p="rgb("+(g+h)%255+", "+O(h)+", "+k(g)+")":null!=s.colorO.cfFunc?p=m(e,r,s.colorO):t.vprint("d3","no color to set! had colorO but no scheme"),t.vprint("d3^2","setting "+E+":"+p),p):""})).attr("d",(function(r,a){var o,i;return null==r||null==r.length&&null==r.source?"":null!=r.source?(h=t.dd(r.source[0]),g=t.dd(r.source[1]),v=t.dd(r.target[0]),b=t.dd(r.target[1]),I.push("M",h,g,v,b),"M"+h+","+g+" "+v+","+b):(o=e.vA2O(r),i=null!=s.shrink?n.vM2Q(o,s.shrink):e.vMstr(o),t.vprint("d3^2","d["+a+"]:numpoints:"+r.length+": Cstr:"+i),i)})),I.length>0&&"oneline"==s.shape){var z=w.select("g");t.vprint("d3","voronify had allPoints:"+I.length+" have g element?"+z);var R=I.join();R=R.replace(/,?M,/g," M");var D=null==p?"":" stroke='"+p+"'";z.node().innerHTML="<path "+D+"  d='"+R+"' />"}t.vprint("util","voronify d3 MODIFY time:"+t.getTimer()),A.attr("fill","url(#"+N+")"),f.isBlocks&&w.append("rect").attr("x",0).attr("y",0).attr("width","100%").attr("height","100%").attr("fill","url(#"+N+")")},this.d3transform=function(e,a,n){var i,l,s,c;t.vprint("d3","d3transform  = = =  START = = =  with rootel:"+e);var d=d3.select(e);o=-1,c=n,t.vprint("d3","have codondex:"+o+" codon array:"+c),s=this.codonSel(a.cfSections);var u=A(a,s);l=null!=a.cfData?a.cfData:t.ones(s),t.vprint("d3","my data array:"+l);var f=d.node().firstChild;for(t.vprint("d3","num first child:"+f.nodeName+","+f+" nextSibling:"+f.nextSibling.nodeName);("#text"==f.nodeName||"#comment"==f.nodeName)&&null!=f.nextSibling;)f=f.nextSibling;t.vprint("d3","look for tag:"+f.nodeName),t.vprint("d3","rendering with cfSections:"+s+" cfTag:"+a.cfTag+" cfWrap:"+a.cfWrap+" incA:"+u+":"),this.incA=u,this.jA=a,r.isArray(a.cfTag)||(a.cfTag=[a.cfTag]),r.isArray(a.cfWrap)||(a.cfWrap=[a.cfWrap]);var p=d.selectAll(f.nodeName).data(t.ones(s)).enter().append((function(){return f.cloneNode()}));for(i=0;i<a.cfTag.length;i++)this.wrap=a.cfWrap[i],this.contA=this.wrap.match(/CONTENT[0-9]+\_/g),t.vprint("d3","process tag:"+a.cfTag[i]+" wrap:"+this.wrap+" numtags:"+this.contA),p.attr(a.cfTag[i],y.bind(this))},this.divEffect=function(e){var n,o,i,l,s,c,d,u,f;a.mediatype;if(s=e.getAttribute("data-div"),c=e.getAttribute("data-aa"),t.vprint("d3","divEffect: - - - - - - - - - -  - - - - - - - - - -arg:"+typeof e+"  have data?"+typeof genolve_gen_sel_hash+" key:"+c+" "+s),s.match(/(decoration|text|flair)/)){if(o=parseFloat(e.getAttribute("data-dur")),n=parseFloat(e.getAttribute("data-pause")),t.vprint("d3","divEffect: - - - - - - - - - -  - - - - - - - - ani dur:"+o+" pause:"+n),(d=r("#"+(l="falling-snow-"+s))).length>=1)return void t.vprint("eloop","divEffect: - - - - - - - - - -  - - - - - - - - div already there!"+l);r("body").prepend('<div id="'+l+'" class="gnlv-falling"/>'),d=r("#"+l),u=(u=d3.select("#"+c+" #"+s).node().innerHTML).replace("opacity: 0","opacity: 1"),t.vprint("d3","divEffect: - - - - - - - - - -  - - - - - - - - svg:"+u),u='<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg width="100%" height="100%"  preserveAspectRatio="xMinYMin slice" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:html="http://www.w3.org/1999/xhtml"><desc>evolved at www.genolve.com</desc>CONTENT</svg>'.replace(/CONTENT/,u),"data:image/svg+xml;utf8,"+encodeURIComponent(u),f="data:image/svg+xml;base64,"+btoa(u),d.css({"background-image":"url( '"+f+"')"}),i={duration:o,animateOutPause:n},d.css({opacity:0,animation:"gnlv-opacity-fadein  linear  "+i.duration+"s forwards"}),document.fallingtimeout1=window.setTimeout((function(){r("#"+l).css({opacity:1,animation:"gnlv-opacity-fade  linear  "+i.duration+"s forwards"})}),1e3*(i.duration+i.animateOutPause)),document.fallingtimeout2=window.setTimeout((function(){r("#"+l).remove()}),1e3*(2*i.duration+i.animateOutPause))}else"undefined"!=typeof genolve_gen_sel_hash&&genolve_gen_sel_hash[s]?(t.vprint("d3","divEffect: data:"+t.dumpvar(genolve_gen_sel_hash[s])),genolve_divEffect(s,t,r)):t.vprint("warn","divEffect: genolve_gen_sel_hash had no data for:"+s)};var b=function(e,r){var a,o,i,l,s,c=f.anielapsed();for(o in i=p[r].segmO[e])"wurd"==o?(l=n.autoWrapIt("text",null,p[r].justify,p[r].autoWrap,htmlEntities(i[o])),s=d3.select("#"+r+" g[id^=tgrp]"),t.vprint("aig","doSubtitles.runSegment["+e+"] found tgrp under ["+r+"]? "+typeof s),s.node().innerHTML=l):"start"==o||"TO"==o||(a=Snap.select("#"+o))&&a.attr&&(i[o].match(/;/)?a.attr("keyTimes",i[o]):(a.attr("begin",i[o]),a.attr("lastcall",""),a.attr("from",Math.random())),t.vprint("aig","doSubtitles.runSegment["+e+"] subt at:"+t.d4(c/p[r].atime)+" restored["+o+"] -> "+i[o]))};this.subt_kickoff=function(e,r){var a,n,o,i,l,s;if("string"==typeof e)t.vprint("eloop","subt_kickoff found string AAid:"+e+" startat:"+r);else if(e&&"timekeeperani"==e.getAttribute("id")){if(h=e.parentNode.parentNode.getAttribute("datatime"),e=e.parentNode.parentNode.parentNode.getAttribute("id"),t.vprint("eloop","subt_kickoff had AAid?"+e+" atime:"+h+" aidA set?"+typeof p),null==h)return;p[e]||(p[e]={}),p[e].atime=h}else t.vprint("eloop","subt_kickoff found no AAid! type:"+typeof e+" attributes?"+e.attributes.id+" getAttr:"+e.getAttribute("id"));if(p[e]&&p[e].segmO&&null==r||(t.vprint("eloop","subt_kickoff ======== NO segO, looking for segO under #"+e+" #text"),(o=d3.select("#"+e+" #text"))?(p[e]||(p[e]={}),(i=o.node().getAttribute("segm"))&&(t.vprint("error","subt_kickoff found and set segmO:"+i),p[e].segmO=t.parsejson(i)),(l=o.node().getAttribute("gnlv-data"))&&(t.vprint("eloop","subt_kickoff found and set mydata:"+l),s=t.parsejson(l),p[e].justify=s.justify,p[e].autoWrap=s.autoWrap)):t.vprint("error","subt_kickoff ======== still no segO #"+e)),null==r&&(r=0),p[e].segmO)for(t.vprint("eloop","subt_kickoff ======== subtitles num segments:"+p[e].segmO.length+" startat:"+r+" dump first:"+t.dumpvar(p[e].segmO[0])),n=0;n<p[e].segmO.length;n++)a=p[e].segmO[n],t.vprint("eloop","subt_kickoff ========["+n+"]: seg.start:"+a.start+" >? startat:"+r),a.start>=r&&(a.TO&&window.clearTimeout(a.TO),p[e].segmO[n].TO=window.setTimeout(b,1e3*t.setVal(a.start,-(r+.001),0,p[e].atime,t.setValMode.LIMIT),n,e))},this.d3confetti=function(e,n,o,i,l,s,c){var d,u,p,h,m,b,y,A,w,x,S,T,O,k,M,N,C,I=0,E=0,F=s.match(/(burst-selfzoomInOut)/)?9:s.match(/(sprinkle)/)?20:30,z=0,R=e.getAttribute("lastcall"),D=e.getAttribute("dur"),B=e.getAttribute("utarg"),_=e.getAttribute("sizehint");if((i=parseInt(i))>0)if(null==R&&"repeat"==c){var j=f.anielapsed()-parseFloat(e.getAttribute("begin"));if(j<0&&(j+=parseFloat(D)),e.setAttribute("lastcall",Date.now()-1e3*j),t.vprint("d3","d3confetti first call ignore, start delta:"+j+" firefox:"+t.getBrowser("isfirefox")),t.getBrowser("isfirefox"))return}else if("begin"==c)t.vprint("d3","d3confetti 1st begin OK");else{if(Date.now()-R<1e3*(parseFloat(D)-.5))return void t.vprint("d3^2","d3confetti anirepeat ignore delta:"+(Date.now()-R)+" < "+1e3*(parseFloat(D)-.5));t.vprint("d3","d3confetti trigger:"+e.id+"  delta:"+(Date.now()-R)+" event:"+c),e.setAttribute("lastcall",Date.now())}R=e.getAttribute("lastcall"),M=a.mulberry32(parseFloat(R));var L,W=d3.select(n);null==W||null==W.size||1!=W.size()?t.vprint("warn","confetti X X X X found none or more than one of place targ:"+n):s.match(/(sprinkle)/)&&(S=e.getAttribute("vx"),T=e.getAttribute("vy"),t.vprint("d3","d3confetti sprinkle tw/th:"+f.tw+","+f.th+" scaled xy limits:"+S+","+T));var P=d3.select("#"+o);null!=P&&null!=P.size&&1==P.size()&&null!=P.node||t.vprint("warn","confetti X X X X found none or more than one of targ:"+o+":"+typeof P);var Y=n.match(/(text)/),Q=Y?"g[id^=tgrp]":"g[id^=B0]",V=P.select(Q);s.match(/(corner)/)&&(V=d3.select("#"+B)),null==V||null==V.size||1!=V.size()||null==V.node?(t.vprint("warn","confetti X X X X found none or more than one of:usetargid:"+B+" OR selector:"+Q+" place:"+n+" from :"+P.attr("id")),s.match(/(self)/)||(V=P),t.vprint("warn","usetarg alternate:"+(V.size?V.size():"nada"))):(C=[],(N=(s.match(/(sprite)/)?P:V).selectAll(".gnlv-sprite")).each((function(t){C.push(d3.select(this))})),s.match(/(sprite)/)||N.classed("gnlv-gone",!1),(z=N.size())>0&&t.vprint("d3","confetti: is a sprite? found:"+z));var X,U=P.node().getBBox();d=[[t.d0(U.x),t.d0(U.y)],[t.d0(U.width),t.d0(U.height)]],U.x,U.width,U.y,U.height,u=2*Math.max(U.width,U.height),p=n.match(/(text)/)?100:50;var $=t.dd(Math.abs(l)/15);$=s.match(/(burst-selfzoom)/)?1:$;var G=Math.floor(90*Math.random()-45),Z=1;if(s.match(/(tile)/)){if("object"==typeof(O=d3.select("#"+B).node().getBBox())&&0!=O.width||(O={x:0,y:0,width:200,height:200}),_&&(Z=parseFloat(_)/(Y?5:20)),F=parseInt(U.width/(Z*O.width)*U.height/(Z*O.height)+.5),t.vprint("d3","confetti: TILE TILE "+B+" tilesizer:"+_+"->"+Z+" targetsize:"+U.x+","+U.y+","+U.width+","+U.height+" size:"+O.width+","+O.height+" object size:"+U.width+","+U.height+" NUM:"+F),0==U.width){var J=e.getAttribute("tbox");null!=J?U=t.parsejson(J):t.vprint("warn","confetti: box width zero and no saved data!")}else e.setAttribute("tbox",JSON.stringify(U).replace(/"/g,"'"));X=n.match(/(text)/)?r.extend({},U):{x:0,y:0,width:200,height:200},F=parseInt(X.width/(Z*O.width)*X.height/(Z*O.height)+.5),X.cx=X.x+X.width/2,X.cy=X.y+X.height/2,I=X.x,E=X.y}var H="interpolateCool",q="interpolateWarm";s.match(/(burst-selfzoomInOut|sprinkle|sprite|tile)/)&&(H="interpolateRainbow",q="interpolateViridis",b=parseFloat(e.getAttribute("ppp")),y=parseFloat(e.getAttribute("ddd")));var K=d3[H],tt=d3[q];if(s.match(/(sprite)/)&&C.length>0)i>0?(v(C,1),window.setTimeout(f.tpr.d3confetti,1e3*(y+b-1.1),e,n,o,-i,l,s)):(t.vprint("d3","confetti:  SPRITE X deactivate X"),v(C,0));else if(i>0){W.select("#confetti"+o).remove(),U=(P=d3.select("#"+o)).node().getBBox();var et=n.match(/(text)/)?U.x+U.width/2:U.width/2,rt=U.height/2;10!=Math.abs(l)&&3!=Math.abs(l)||!s.match(/(burst-self|tile|corner)/)?n.match(/(text)/)&&(et=s.match(/(burst-selfzoom|tile)/)?0:et/2,rt=s.match(/(burst-selfzoom|tile)/)?0:rt/2):(et=0,rt=0);var at="translate("+et+","+rt+")",nt="";if(o.match(/tel[0-9]+_/)){nt+=" "+W.select("g[id^=tgrp]").attr("class"),V=P;var ot=parseFloat(o.split("_")[1]);rt=s.match(/(burst-self|corner)/)?(ot-1)*U.height*$:(ot-1)*U.height,at=s.match(/(burst-selfzoom|tile)/)?at:"translate("+et+","+rt+")"}t.vprint("d3","confetti: making it, toggle:"+i+" under:"+n+" id:"+W.attr("id")+" svg:bbox:"+d+"  scale:"+$+" gtrans:"+at);var it=W.append("g").attr("id","confetti"+o).attr("transform",at).attr("class",s+nt);if(s.match(/(InOut)/)){var lt=document.createElement("style");lt.type="text/css";var st=document.createTextNode(".gnlv-btime use { --bdur:"+y+"s; }");lt.appendChild(st),it.node().appendChild(lt)}L=it.append("g").attr("id","confettig").attr("class","gnlv-btime").attr("style","transform:translate(0px,0px)"),s.match(/(burst-self|corner)/)?(W.size()>1&&alert("size for place too big:"+W.size()),A=[],x=0==z?V.attr("id"):C[0].attr("id"),L.selectAll("use").data(d3.range(F)).enter().append("use").attr("xlink:href","#"+x).attr("style",(function(e,r){var a,o,i,l,c,d,f;d=s.match(/(burst-selfzoom)/)?K(r/F):g(6),f=s.match(/(burst-selfzoom)/)?tt(r/F):g(6),l=c=100,a=0,s.match(/(collapse)/)?(o=t.ddd(Math.random()*Math.PI*2),A.push(o),a=t.d0(180*o/Math.PI+90),i=0+u,l=s.match(/(burst-selfzoom)/)?100:100+i*Math.cos(o),c=s.match(/(burst-selfzoom)/)?100:100+i*Math.sin(o),$=n.match(/(text)/)?3:.7):s.match(/(sprinkle)/)?(o=t.ddd(Math.random()*Math.PI*2),A.push(o),a=0,i=0+u,l=parseFloat(S)*M()-S/2,c=parseFloat(T)*M()-T/2,$=0):s.match(/(tile)/)&&(o=t.ddd(Math.atan2(E-X.cy,I-X.cx)),A.push(o),a=0,i=0+u,l=100,c=100,k="mask_"+r,L.append("mask").attr("id",k).append("use").attr("xlink:href","#"+B).attr("fill","#FFFFFF").attr("transform","translate("+I+","+E+") scale("+Z+")"),(I+=200*Z)>=X.x+X.width&&(I=X.x,(E+=200*Z)>=X.y+X.height&&t.vprint("d3","confetti["+r+"]:  y:"+E+" past bound:"+(X.y+X.height)+" delta:"+200*Z)),$=1);var p=s.match(/(burst-selfzoom|sprinkle|tile)/)?";transition-delay:"+t.dd(1-r/F)+"s;":"";return s.match(/(tile)/)&&(p+=";mask:url('#"+k+"');"),"transform:translate("+l+"px,"+c+"px) rotate("+a+"deg) scale("+$+") translate(-100px,-100px);opacity:1;fill:"+d+"; stroke:"+f+p})),e.setAttribute("ang",A.join())):L.selectAll("path").data(d3.range(F)).enter().append("path").attr("d",(function(t,e){return function(t,e,r){var a;return"burst-triangle"==r||"burst-confetti"==r?a="M 0,0 60,0 30,40z":"burst-stars"==r?a="M47-9.4L19.4,11.5l8.9,33.5L-0.1,25.1l-29.1,18.8l10.1-33.1L-46-11l34.6-0.7L1.1-44l11.3,32.7L47-9.4   L19.4,11.5":"burst-bubbles"==r?a="M25,0.8c0,6.6-2.6,12.5-6.9,17C13.5,22.5,7.9,25,1.1,25c-7.8,0-13.5-3.8-17.1-7.1c-4.2-3.9-7-11-7-17.1\t\tc-0.1-5.4,2.1-12.1,7-16.8c4.9-4.7,10.5-7,17-7c7.7,0,13.3,3.1,17,7C22.3-11.4,25-5.8,25,0.8c0,6.6-2.6,12.5-6.9,17":console.warn("3rdparty.raindrop has no option to make:"+r),a}(0,0,s)})).attr("style",(function(t,e){var r="burst-bubbles"==s?K(e/F):g(6);return"transform:translate(0px,0px) scale("+$+");opacity:1;fill:"+r})),window.setTimeout(f.tpr.d3confetti,100,e,n,o,-i,l,s)}else{var ct=s.match(/(burst-self|corner)/)?"use":"path";if(t.vprint("d3","confetti: animate it, toggle:"+i+" target:"+o+": found?"+W.select("#confetti"+o).size()+" selecting:"+ct),-3==i&&s.match(/(burst-selfzoomInOut)/))return t.vprint("d3","confetti remove confetti hack!"),void W.select("#confetti"+o).remove();if(-2==i&&s.match(/(burst-selftile)/)){if(1==(h=W.select("#defs"+o)).size()){m=h.node().parentNode,t.vprint("d3","d3confetti UNDO defs hide, parent:"+m.getAttribute("id"));var dt=h.select("#defs"+o+">g");1==dt.size()?m.appendChild(dt.node()):t.vprint("warn","d3confetti UNDO defs num <g> found other than 1:"+dt.size())}return}if(s.match(/(burst-selfzoom|tile)/)){if(0==(h=W.select("#defs"+o)).size()){t.vprint("d3","confetti: create defs wrap");var ut=document.createElementNS("http://www.w3.org/2000/svg","defs");ut.setAttribute("id","defs"+o);var ft=V.node().parentElement;ft?(ft.appendChild(ut),h=W.select("#defs"+o)):t.vprint("d3","confetti: utarg parent null")}h.node().appendChild(V.node())}var pt=W.select("#confetti"+o);if(pt=pt.selectAll("g").attr("style",(function(t,e){var r=0;return"burst-bubbles"==s&&(r=-600*$,u/=2),"transform:translate(0px,"+r+"px)"})),pt=W.selectAll("#confetti"+o+" g>"+ct),s.match(/(collapse|tile)/)&&(w=e.getAttribute("ang"),A=w.split(/,/).map(Number),M=a.mulberry32(A[0])),pt.attr("style",(function(e,r){var a,o,l,c,d,f,h,m,v=0,b=0;h=s.match(/(burst-selfzoom|burst-bubbles)/)?tt(r/F):g(6),m=s.match(/(burst-selfzoom|burst-bubbles)/)?K(r/F):g(6),a=s.match(/(burst-selfzoom)/)?G:t.d0(360*Math.random()-180),o=t.ddd(Math.random()*Math.PI*2),l=0+Math.random()*u,f=0,s.match(/(collapse)/)?(o=A[r],a=t.d0(180*o/Math.PI+90),l=0+M()*p,b=25*M()-12.5,f=-2==i?0:1,v=100,$=n.match(/(text)/)?1:.1):s.match(/(tile)/)&&($=r<.25*F||r>.75*F?1.5+Math.random():.1+Math.random(),o=A[r],l=0,a=0,f=0,v=100),c=s.match(/(burst-selfzoom)/)?100:v+b+l*Math.cos(o),d=s.match(/(burst-selfzoom)/)?100:v+b+l*Math.sin(o),s.match(/(burst-selfzoomInOut)/)&&-1==i?($=14,f=1):s.match(/(burst-selfzoomInOut)/)&&-2==i?($=1,f=1):$=s.match(/(burst-selfzoom)/)?t.dd(10*r/F):$,s.match(/(sprinkle)/)&&(a=0,c=parseFloat(S)*M()-S/2,d=parseFloat(T)*M()-T/2,$=r<5?3.5+Math.random():.3+Math.random(),-2==i&&($=.1),f=-2==i?0:1);var y=s.match(/(burst-self|corner|sprinkle|tile)/)?"translate(-100px,-100px)":"";return y+=s.match(/(burst-selfzoom|corner|tile)/)?";transition-delay:"+(-1==i?t.dd(1-r/F):t.dd(r/F))+"s":"",y+=s.match(/(sprinkle)/)?";transition-delay:"+(-1==i?t.dd(r/F):t.dd(1-r/F))+"s":"",y+=s.match(/(tile)/)?";mask:url('#mask_"+r+"')":"","transform:translate("+c+"px,"+d+"px) rotate("+a+"deg) scale("+$+") "+y+";opacity:"+f+";fill:"+h+"; stroke:"+m})),s.match(/(collapse)/)&&z>0&&(t.vprint("d3","confetti s s s s s s s s s s s s s s s s s s s s s s s s s s s sprites found:"+z),pt.on("transitionend",(function(t,e){d3.select(this).attr("href","#"+C[1].attr("id"))}))),i>-3&&s.match(/(burst-selfzoomInOut|sprinkle)/)&&(t.vprint("d3","confetti: que - = 3rd toggle = - , reverse"+i),-1==i?window.setTimeout(f.tpr.d3confetti,1e3*(y+b-1.1),e,n,o,i-1,l,s):window.setTimeout(f.tpr.d3confetti,3500,e,n,o,i-1,l,s)),i>-2&&s.match(/(collapse|tile)/)){var ht=s.match(/(collapse)/)?2.2:y+b;t.vprint("d3","confetti: - = 2nd toggle = -, delay:"+ht+" opacity"+i),window.setTimeout(f.tpr.d3confetti,1e3*ht,e,n,o,i-1,l,s)}}};var y=function(e,r){var a,n,o,i=this.wrap;for(a=0;a<this.contA.length;a++)n=t.d0(this.contA[a])-1,o=null==this.jA.cfCalc?"+":this.jA.cfCalc[n],t.vprint("d3","d3Attr_templateEngine i["+r+"] d["+e+"] nn["+a+"] wrap:"+this.contA[a]+" inc["+n+"]="+this.incA[n]+" calc:"+o),"*"==o?(i=i.replace(this.contA[a],this.jA.cfFrom[n]),this.jA.cfFrom[n]=this.jA.cfFrom[n]*this.incA[n]):i=i.replace(this.contA[a],this.jA.cfFrom[n]+r*this.incA[n]);return i};this.codonSelJSON=function(t){var e;for(e in t)r.isArray(t[e])&&(t[e]=n.codonSel(t[e]));return t},this.setCodonA=function(t){i=t},this.codonSel=function(e,a){var n;if(("scale"==a||"normal"==a||null==a)&&!r.isArray(e))return t.vprint("d3","codonSel, have NORMAL mode but not passed a array!"+e),e;o=t.setVal(o,1,0,i.length-1,t.setValMode.LOOP);var l=parseInt(i[o]);"scale"==a?n=d3.scaleLinear().domain([0,200]).range(e).clamp(!0)(l):"func"==a?("function"!=typeof e&&t.vprint("d3","codonSel, have function mode but not passed a function!"+e),n=e(parseFloat(l)/200)):n=e[l%e.length];return t.vprint("d3","codonSel codonA["+o+"]="+l+" selects   = =>    "+n),n},this.d3_getNchild=function(e,r){var a=[],n=e.firstChild;for(t.vprint("d3","d3_getNchild first child:"+n.nodeName+","+n+" nextSibling:"+n.nextSibling.nodeName);null!=n.nextSibling&&r>0;)"#text"==n.nodeName||"#comment"==n.nodeName?n=n.nextSibling:(a.push(n),n=n.nextSibling,r--);return a},this.getRandPoint=function(e,r,a,o,i,c){var d,u,f,p,h,m,g,v=[],b=t.d0(r[0][0]),y=t.d0(r[0][1]),A=t.d0(r[1][0]),w=t.d0(r[1][1]);d3.scaleLinear().domain([b,b+A]).range([b,b+A]).ticks(7);for("VRANDOM"==a&&(a=n.codonSel(s)),"VRANDOM"==o&&(o=n.codonSel(s)),"RANDOM"==a&&(a=n.codonSel(l)),"RANDOM"==o&&(o=n.codonSel(l)),d=0;d<e;d++){u=Math.random(),f=Math.random(),.2,m=.5+.1*Math.sin(2*f*Math.PI),g=.5+.1*Math.sin(2*u*Math.PI),"uniform"==a?p=u:"bigEdge"==a?p=u>m?d3.easeQuadIn(u):d3.easeQuadOut(u):"bigMiddle"==a?p=u<m?d3.easeQuadIn(u):d3.easeQuadOut(u):"bands"==a?p=15*Math.round(u*A/15)/A:(null==d3[a]&&(t.vprint("warn","getRandPoint did not find ease:"+a+" selecting: easeLinear"),a="easeLinear"),p=d3[a](u)),"uniform"==o?h=f:"bigEdge"==o?h=f>g?d3.easeQuadIn(f):d3.easeQuadOut(f):"bigMiddle"==o?h=f<g?d3.easeQuadIn(f):d3.easeQuadOut(f):"bands"==o?h=15*Math.round(f*w/15)/w:(null==d3[o]&&t.vprint("warn","getRandPoint did not find ease:"+o),h=d3[o](f));var x=[t.d0(p*A+b),t.d0(h*w+y)];null!=i&&x.push(t.dd(t.setVal(0,0,i[0],i[1],t.setValMode.RANDOM))),null!=c&&x.push(t.dd(t.setVal(0,0,c[0],c[1],t.setValMode.RANDOM))),v.push(x)}return v};var A=function(e,a){var n,o,i=[];if(a<1&&console.error("doFromToBy sections must be 1 or more"),r.isArray(e.cfFrom)||(e.cfFrom=[e.cfFrom]),null!=e.cfTo)for(r.isArray(e.cfTo)||(e.cfTo=[e.cfTo]),e.cfTo.length!=e.cfFrom.length&&console.warn("doFromToBy: size From != To: "+e.cfFrom.length+"!="+e.cfTo.length),n=0;n<e.cfTo.length;n++)o=(e.cfTo[n]-e.cfFrom[n])/(a-1),t.vprint("d3","doFromToBy["+n+"] sections:"+a+":"+o),i[n]=o;return null!=e.cfInc&&(r.isArray(e.cfInc)||(e.cfInc=[e.cfInc]),e.cfInc.length!=e.cfFrom.length&&console.warn("doFromToBy: size From != cfInc: "+e.cfFrom.length+"!="+e.cfInc.length),i=e.cfInc),i};this.vM2Q=function(r,a){var n,o,i,l,s,c,d,u,f=[],p="";if(null!=a.thinthreshold&&(r=e.vthinpoints(r,a.thinthreshold)).length<3)return"";u=e.vcentroid(r);var h=a.shrinkamount;for(n=0;n<r.length;n++)i="centroid"==a.shrinkmode?e.vwave(r[n],h,u,1):"fixed"==a.shrinkmode?e.vmovetoward(r[n],u,h):r[n],f.push(i),0==n&&(o=i),n<r.length-1?(d=e.vave(r[n],r[n+1]),l=e.vmag(e.vsub(r[n],r[n+1]))):(d=e.vave(r[n],r[0]),l=e.vmag(e.vsub(r[n],r[0]))),s=(c=1-Math.pow(.3*l/Math.abs(h),1.1))<-2?-2*h:c*h,t.vprint("util^2","vM2Q factor:"+c+" delta2:"+s),"fixed"==a.shrinkmode?f.push(e.vmovetoward(d,u,s)):f.push(d);if(f.push(o),f.length%2==0&&t.vprint("util","vM2Q POINTS missmatch EVEN need ODD"),"points"==a.retmode)return f;for(p="M"+f[0].cx+","+f[0].cy+" Q",n=1;n<f.length;n++)p+=f[n].cx+","+f[n].cy+" ";return p+" Z"}}
  • genolve-toolkit/trunk/js/genolve-getsvg.js

    r3027954 r3369385  
    9090                }// end genolve_divEffect
    9191jQuery(document).ready(function ($) {
    92   vv=true;//production
     92  vv=true;//production true
    9393  if(typeof eloop=='undefined'){
    9494    eloop={version:'stub',actionhost:"../.."};
     
    193193          }
    194194        });
    195         //
     195      //
    196196      // VIDEO TAG replacements   V I D E O
    197197      // Find all  .wp_video on page with <video> containing genolve
     
    288288                    // modal dialog must have div called "message"
    289289                    var payload,thisel,myclasses,imgsrc,imgw,imgh,mypclasses,el,key;
    290                     var newdiv,themusic={};
     290                                        var newdiv,themusic={};
    291291                    vpr.vprint("gwpt","genolve-getsvg: = = = CALLBACK = = =had reponse?["+response+"]");
    292292                    payload=response;
  • genolve-toolkit/trunk/js/genolve-sound.js

    r3235663 r3369385  
    1 var GenolveSound=function(q){var b=this;q==null&&(q={});this.ver="2.0.0";this.fov=90;this.muted=!0;this.numfreqbins=256;var ca=0,da=0,u=484,V=0,O=57,I=null,ea=3,W=!1,P=!0,w={},E=0,X=70,fa,Y,f=q.vpr;q.actionhost==null&&q.actionhost=="https://www.genolve.com";var r,x="off",Q,Z,D,R,aa,ba=!0,F,m={},n=[];this.trueh=200;this.plO={};var e="notset";this.playExtra=this.muteExtra=this.muteTrans=null;this.doplots=!0;this.needSetup=!1;this.playID={};this.endID={};this.fadeID={};this.lastSnd={};var v=
    2 0,S=0,G=document.getElementById("oscilloscope");if(G!=null){var p=G.getContext("2d");var A=G.width;var B=G.height}var y=document.getElementById("plot");if(y!=null){var l=y.getContext("2d");l.font="28px serif";l.lineWidth=1;l.strokeStyle="green";l.rect(0,0,y.width,y.height);l.stroke()}f==null&&(f={name:"snd-stub",vprint:function(a,c){vv||console.log(c)},dumpvar:function(a){return JSON.stringify(a)},setValMode:{LOOP:"LOOP",LOOPz:"LOOPz",LOOPtoBOUND:"LOOPtoBOUND",LIMIT:"LIMIT",RANDOM:"RANDOM",MIDNORM:"MIDNORM",
    3 LOWNORM:"LOWNORM",HINORM:"HINORM"},setVal:function(a,c,d,h,g){d=parseFloat(d);h=parseFloat(h);if(d>h){var k=h;h=d;d=k}k=h-d;k=g==this.setValMode.LOOPz?k+1:k;a=isNaN(a)?0:parseFloat(a);c=isNaN(c)?1:parseFloat(c);a+=c;if(a>h)if(g==this.setValMode.LIMIT)a=h;else if(g==this.setValMode.LOOPtoBOUND)a=d;else if(g==this.setValMode.LOOP||g==this.setValMode.LOOPz)for(;a>h;)a-=k;else console.warn("GNLV_UTILS.setVal invalid setValMode:"+g+" must be LOOP/LIMIT/RANDOM");else if(a<d)if(g==this.setValMode.LIMIT)a=
    4 d;else if(g==this.setValMode.LOOPtoBOUND)a=h;else if(g==this.setValMode.LOOP||g==this.setValMode.LOOPz)for(;a<d;)a+=k;else console.warn("GNLV_UTILS.setVal invalid setValMode:"+g+" must be LOOP/LIMIT/RANDOM");return a},d0:function(a){a=String(a).replace(/[^0-9\-\.]/g,"");return Math.round(parseFloat(a))},dd:function(a){return Math.round(parseFloat(a)*100)/100},ddd:function(a){return Math.round(parseFloat(a)*1E3)/1E3},d4:function(a){return Math.round(parseFloat(a)*1E4)/1E4},parsejson:function(a){var c=
    5 {};if(a.match(/^\{'/)||a.match(/^\[\{'/))a=a.replace(/'/g,'"');try{c=JSON.parse(a)}catch(d){console.warn("JSON parse error on["+a+"]:"+d)}return c}});this.volsprite='<g id="vol_on_off" class="gnlv-clickable gnlv-vol-control" data-ver="1.1" data-target="default" onclick="document.gnlvSound.toggleVol(this)" transform="scale(.2)"><circle  cx="100" cy="100" r="100" fill="#DDDDDD"/><g id="vol_on" transform="scale(0.2)" class="vol_on"><path d="M156,379 v247 h140 l210,173 l0,-592 l-210,173 H156 z  M588,351 c-12,-12 -32,-12 -44,0 c-12,12 -12,32 0,44 v0 c27,27 44,64 44,105 c0,41 -17,78 -44,105 c-12,12 -12,32 0,44 c6,6 14,9 22,9 c8,0 16,-3 22,-9 c38,-38 62,-91 62,-149 C650,442 626,389 588,351 z  M659,279 c-12,-12 -32,-12 -44,0 c-12,12 -12,32 0,44 c45,45 73,108 73,177 c0,69 -28,131 -73,177 c-12,12 -12,32 0,44 c6,6 14,9 22,9 c8,0 16,-3 22,-9 c57,-57 92,-135 91,-221 C751,414 716,335 659,279 z  M728,211 c-12,-12 -32,-12 -44,0 c-12,12 -12,32 0,44 h0 c63,63 102,149 102,245 c0,96 -39,182 -101,245 c-12,12 -12,32 0,44 c6,6 14,9 22,9 s16,-3 22,-9 c74,-74 120,-176 120,-289 C847,387 801,285 728,211 z  "></path></g><g id="vol_off" transform="scale(0.2)" class="vol_off" style="display:none"><path d="M156,379 v247 h140 l210,173 l0,-592 l-210,173 H156 z  M920,652 788,520 920,384 852,320 720,452 588,320 520,384 652,520 520,652 588,716 720,584 852,716 920,652 788,520  "></path> </g></g>';
    6 this.sndLibO={none:"none",drone:"https://www.genolve.com/svg/snd/drone-flying.mp3",train:"https://www.genolve.com/svg/snd/train-wheels.mp3",tick:"https://www.genolve.com/svg/snd/Tick.mp3",bells:"https://www.genolve.com/svg/snd/sleigh-bells-2ring.mp3","80svibe":"https://www.genolve.com/svg/snd/80s_vibe.mp3",rave:"https://www.genolve.com/svg/snd/rave_digger.mp3"};this.eventMapO={onmousemove:"mousemove",onfocusin:"focusin",onclick:"click",onmousedown:"mousedown",onmouseup:"mouseup",onbegin:"beginEvent",
    7 onend:"endEvent",onrepeat:"repeatEvent"};this.panningInterval=null;f.vprint("snd","   - =   gnlvSound loading   = - vpr:"+f.name);typeof Howl!="function"&&(f.vprint("warn","= = = =missing Howler! loading now"),jQuery.getScript(q.actionhost+"/js/howler.js/dist/howler.min.js",function(){f.vprint("snd","3 3 3 3 3 3 3 3 3 3 3 3  howler loaded DONE  3 3 3 3 3 3 3 3 3 3 3 3")}).done(function(){}));typeof window.jsmediatags!="function"&&(f.vprint("warn","= = = =missing window.jsmediatags! loading now"),
    8 jQuery.getScript(q.actionhost+"/js/jsmediatags/dist/jsmediatags.min.js",function(){f.vprint("snd","3 3 3 3 3 3 3 3 3 3 3 3  jsmediatags loaded DONE  3 3 3 3 3 3 3 3 3 3 3 3")}));this.init=function(){f.vprint("snd","init sound");q.volel&&b.registerVol(q.volel);if(q.preload){f.vprint("snd","init - PRELOAD["+e+"]:"+q.preload);var a={enable:!0,snd:"tlmusic",pl:e,playmode:"continuous",do3d:!1,file:q.preload,usemode:"record"};q.preload=="none"?window.setTimeout(function(){jQuery.event.trigger({type:"readyplayerone",
    9 message:"NO music to load, ready now",time:new Date})},500):b.preload(a)}};this.getMediaTags=function(a){f.vprint("snd","getMediaTags =START+ for:"+a);if(typeof eloop!="undefined"&&eloop.music&&window.jsmediatags){var c={artist:"unknown",album:"unknown",track:0,title:"unknown",fileLength:eloop.mp3length,genre:"unknown"};window.jsmediatags.read(a,{onSuccess:function(d){eloop.music.exturl=="none";if(d&&d.tags&&d.tags.comment&&d.tags.comment.text){var h=d.tags.comment.text.split(/\r\n/,1);h.length==
    10 1&&(eloop.music.exturl=h[0].replace(/URL:\s*/,""))}f.vprint("snd","getMediaTags returned:"+f.dumpvar(d));for(key in c)eloop.music[key]=d&&d.tags&&d.tags[key]?d.tags[key]:c[key];typeof SpotifyApi=="undefined"?f.vprint("warn","getMediaTags no spotify api!"):(SpotifyApi.thmb=eloop.thmb,SpotifyApi.updateCurTrack("normal",eloop.music))},onError:function(d){console.error("getMediaTags:"+f.dumpvar(d));for(key in c)eloop.music[key]=c[key];SpotifyApi.thmb=eloop.thmb;SpotifyApi.updateCurTrack("normal",eloop.music)}})}else f.vprint("warn",
    11 "getMediaTags missing "+typeof window.jsmediatags+" or eloop missing!"+typeof eloop)};var K=function(a){return a?a-Y:(new Date).getTime()-Y},ha=function(a,c){f.vprint("error","ERROR X X sound["+a+"]:"+c)};this.resize=function(a){a?(b.winw=a.winw||1200,b.winh=a.winh||630,a.coordA&&b.plO[e]&&b.plO[e].volel&&(coordA.length==3&&coordA.pop(),b.plO[e].volel.transform("matrix(0.2 0 0 0.2 "+coordA.join(" ")+")"))):(b.winw=b.winw||1200,b.winh=b.winh||630);b.aratio=b.winw/b.winh;b.camxshift=b.winw/2;b.camx=
    12 0;b.camy=b.winh/2;b.camz=-20;f.vprint("snd","sound resize= = = = = win w h:"+b.winw+","+b.winh+" aratio:"+b.aratio)};b.resize(q);this.panO={};this.mute=function(){f.vprint("snd","= = = = = global MUTE Sound["+e+"] muteTrans?"+(b.muteTrans!=null)+" extra?"+(b.muteExtra!=null));Howler.mute(!0);for(var a in b.plO[e].sndO)b.plO[e].sndO[a].pause();b.muted=!0;b.metronomeID&&(window.clearInterval(b.metronomeID),b.metronomeID=null);b.beatWorkerID&&(window.clearInterval(b.beatWorkerID),b.beatWorkerID=null);
    13 b.muteTrans!=null&&b.muteTrans(e);b.muteExtra!=null&&b.muteExtra()};this.play=function(){f.vprint("snd","= = = = = global PLAY Sound["+e+"] extra?"+(b.playExtra!=null));b.muted=!1;Howler.mute(!1);for(var a in b.plO[e].sndO)f.vprint("snd","= = = = =  PLAY["+e+"]["+a+"]"),b.plO[e].sndO[a].playmode!="none"&&b.plO[e].sndO[a].playmode=="continuous"&&b.plO[e].sndO[a].play();this.ana();b.playExtra!=null&&b.playExtra()};this.volume=function(a,c){f.vprint("snd","= = = = = volume Sound["+a+"] found?"+(b.plO[e]&&
    14 b.plO[e].sndO[a])+" vol:"+c);b.plO[e]&&b.plO[e].sndO[a]&&b.plO[e].sndO[a].volume(parseFloat(c)/10)};this.global_vol=function(a){Howler.volume(a)};this.addVol=function(a){if(a==null)f.vprint("snd","sound addVol["+e+"] abort, missing parent obj!");else{var c=a.select("#vol_on_off"),d=!0;L(e);c&&(oldver=c.attr("data-ver"),oldver=oldver==null?0:parseFloat(oldver),f.vprint("snd","addVol["+e+"] sound  found existing vol el! ver:"+oldver),oldver<1.1?c.remove():d=!1);d&&(f.vprint("snd","addVol["+e+"] sound new volsprite and hide!"),
    15 a.append(Snap.parse(b.volsprite)),c=a.select("#vol_on_off"),c.hasClass("gnlv-gone")||c.addClass("gnlv-gone"),b.plO[e].volState="vol_hidden");b.plO[e].volel=c;b.plO[e].voldomel=c.node;return c}};this.showVol=function(a){b.plO[e].volel&&b.plO[e].volel.attr&&typeof b.plO[e].volel.removeClass=="function"?(f.vprint("snd","showVol["+e+"] "+a+" have func?"+typeof b.plO[e].volel.removeClass),a==null||a==1?b.plO[e].volel.removeClass("gnlv-gone"):b.plO[e].volel.addClass("gnlv-gone")):(f.vprint("warn","showVol["+
    16 e+"] = = = found no vol element at:"+b.plO[e].volel),b.registerVol())};this.registerVol=function(a){a=a?a:q.volel;a==null&&(a="#vol_on_off");var c=Snap.select(a);f.vprint("snd","registerVol["+e+"]found ["+a+"]?"+typeof c);L(e);c&&c.attr?(f.vprint("snd","registerVol["+e+"] found it:"+c.attr("id")+", have removeClass?"+typeof c.removeClass),b.plO[e].volel=c,b.plO[e].voldomel=c.node):f.vprint("warn","registerVol["+e+"] X X X found no vol element at:"+a)};this.toggleVol=function(a){typeof a=="string"?
    17 b.plO[e].volState=a=="vol_on"?"vol_off":"vol_on":typeof a=="object"&&(f.vprint("snd","toggleVol[ event:"+a+"]  nodeType?:"+a.nodeType+" id?"+a.id),newapl=a.getAttribute("data-target"),f.vprint("snd","toggleVol[ event:"+a+"]  playlist:"+newapl),L(newapl));if(b.plO[e].voldomel)var c=b.plO[e].voldomel.getAttribute("id");else f.vprint("error","toggleVol[ event:"+a+"] NO voldomel for apl:"+e),b.registerVol();b.plO[e].volState=="vol_on"?(b.plO[e].volState="vol_off",b.plO[e].voldomel.querySelector(".vol_on").style.display=
    18 "none",b.plO[e].voldomel.querySelector(".vol_off").style.display="block",b.mute()):(b.needSetup&&(b.needSetup=!1,typeof gnlvScroll!="undefined"&&q.doScroll==1?(gnlvScroll.doSetup(),typeof eloop!="undefined"&&eloop.ani_state=="running"&&eloop.mkVidtimer()):f.vprint("warn","toggleVol X X X sound had flag for doSetup but no gnlvScroll defined!"+typeof gnlvScroll+" or flagged to skip:"+q.doScroll)),b.plO[e].volState="vol_on",b.plO[e].voldomel.querySelector(".vol_on").style.display="block",b.plO[e].voldomel.querySelector(".vol_off").style.display=
    19 "none",typeof eloop!="undefined"&&eloop.music&&eloop.music.muzvidlink==1&&b.restart(eloop.anielapsed()),b.play());typeof gnlvScroll!="undefined"&&gnlvScroll.changeDiv(e,b.plO[e].volState);f.vprint("snd","toggleVol[cur:"+e+"]["+c+"]:"+b.plO[e].volState)};this.getVolState=function(){L(e);return b.plO[e].volState};this.volColor=function(){var a=W?"#FFFFFF":"#000000";W=!W;b.plO[e].volel.attr({fill:a})};this.volMarquee=function(a,c,d){zmq=b.plO[e].volel.select("#track_marquee");c!="auto"?zmq!=null&&zmq.remove():
    20 (f.vprint("snd","= = = = = = = volMarquee marquee mode:"+c+" volel:"+b.plO[e].volel.attr("id")+" marquee el?"+zmq+" track info:"+d),zmq==null?(f.vprint("snd","= = = = = = = volMarquee inserted marquee"),b.plO[e].volel.append(Snap.parse(a.replace(/CONTENT/,d))),zmq=b.plO[e].volel.select("#track_marquee"),mycirc=b.plO[e].volel.select("circle"),mycirc.before(zmq)):zmq.select("textPath").node.innerHTML=d)};var L=function(a,c){a=="notset"&&(a="default");f.vprint("snd","changeapl mode:"+c+" playlist "+
    21 e+" -> "+a);a==e&&c!="create"&&b.plO[a]!=null?f.vprint("snd","changeapl noop, playlist  same! "+a):a==null||b.plO[a]==null||c=="create"?(f.vprint("snd","changeapl X X X X INIT X X X X   apl["+a+"]  not initialised? >"+b.plO[a]+"< or  mode create?"+c),e=a,b.plO[e]={},b.plO[e].sndO={},b.plO[e].volState="vol_hidden"):(f.vprint("snd","changeapl, new playlist! ["+e+"]volState"+b.plO[e].volState),b.plO[e].volState=="vol_on"&&b.toggleVol("vol_off"),e=a,typeof gnlvScroll!="undefined"&&gnlvScroll.changeDiv(e,
    22 b.plO[e].volState))};this.radio=function(a){b.start({enable:!0,snd:"myradio",file:a,format:["mp3","aac"],do3d:!1,playmode:"normal"})};this.ana=function(a){if(a!=null&&(x=a,f.vprint("snd","ana MODE CHANGE:"+x+" muted?"+b.muted+" save for later"),b.muted))return;x=="off"?p&&(p.clearRect(0,0,A,B),p.fillStyle="red",p.fillRect(0,0,A,B)):r==null&&(f.vprint("snd","ana -------------------------------------------------- CREATE --------------------------------------------------Analyser:"+x+" bins:"+b.numfreqbins),
    23 r=Howler.ctx.createAnalyser(),r.maxDecibels=-20,r.fftSize=b.numfreqbins*2,x==="onbeat"?(a=Howler.ctx.createBiquadFilter(),a.type="lowpass",Howler.masterGain.connect(a),a.connect(r),f.vprint("snd","ana   LOWPASS FILTER ADDED")):Howler.masterGain.connect(r),G&&(A=G.width,B=G.height),fa=Y=(new Date).getTime());x==="headless"?(this.bufferLength=D=r.frequencyBinCount,this.dataArray=new Uint8Array(this.bufferLength),this.timeArray=new Uint8Array(this.bufferLength)):x==="onbeat"?(this.bufferLength=D=r.frequencyBinCount,
    24 this.dataArray=new Uint8Array(this.bufferLength),this.timeArray=new Uint8Array(this.bufferLength),f.vprint("snd","start beatWorker at interval:10"),b.beatWorkerID&&window.clearInterval(b.beatWorkerID),b.beatWorkerID=window.setInterval(qa,10),f.vprint("snd","start metronome at period - - - - - - - - - - - :"+u),b.metronomeID&&window.clearInterval(b.metronomeID),b.metronomeID=window.setTimeout(ia,u)):x==="sinewave"?(D=r.frequencyBinCount,Q=new Uint8Array(D),r.getByteTimeDomainData(Q),ja()):x=="frequencybars"&&
    25 (D=R=r.frequencyBinCount,Z=new Uint8Array(R),p.clearRect(0,0,A,B),ka());f.vprint("snd","ana DONE anaMode [ "+x+" ]  num bins:"+D+" - - - - - - - - - - - -  - - - - - --  - - - - - --  -- - ");f.vprint("snd","ana DONE  - - - - - - - - - - - -  - - - - - --  - - - - - --  -- - ")};this.getAna=function(){if(r==null||x=="off"||b.muted)return null;r.getByteFrequencyData(this.dataArray);r.getByteTimeDomainData(this.timeArray);return{data:{freq:this.dataArray,time:this.timeArray,metro:(K()-E)/u,size:this.bufferLength}}};
    26 var qa=function(){r.getByteFrequencyData(b.dataArray);var a=b.dataArray,c=b.bufferLength;da++;ca=((new Date).getTime()-fa)/da;var d=[],h,g=0,k=0,z=0,C=0,H=0;for(h=0;h<c;h++)d[h]=f.setVal(a[h]/255,0,0,1,f.setValMode.LIMIT),H=Math.max(H,d[h]),g+=d[h],h<3?C+=d[h]:h<6?z+=d[h]:k+=d[h];m.ave=g/c;m.max=H;m.bass=C/3;m.mid=z/3;m.treb=k/3;aa=!1;m.prevh2&&m.bass<m.prevh&&m.prevh<m.prevh2&&ba==1&&(ba=!1,aa=!0,F=100*m.prevh2,a={bar:F,ts:m.prevt2},F<O?T(a,"cyan"):(n.push(a),O=(3*O+(F-10))/4));m.bass>m.prevh&&m.prevh>
    27 m.prevh2&&(ba=!0);m.prevh2=m.prevh;m.prevt2=m.prevt;m.prevh=m.bass;m.prevt=K()},ia=function(){E=K();T({ts:E,bar:X},"black");f.vprint("snd",vv?"":"metronome - - - - - - - - - - - TICK at["+E+"] period:"+u+" beat:"+n.length);$.event.trigger({type:"beat",keyoff:"bass",time:new Date});if(ea--<0){ea=3;var a=(new Date).getTime();f.vprint("snd",vv?"":"metronome evalBeats - START -  period:"+u+" num beats:"+n.length);n.length==0&&(O*=.5);var c=99999999999999;b.doplots&&(v=V/10-S,plotw=(K(a)-V)/10,l.fillStyle=
    28 P?"yellow":"orange",l.fillRect(v,0,plotw,5+5*P));V=K(a);P=!P;if(n.length>0){for(var d=0;d<n.length;d++){var h=X-n[d].bar;h=h<0?0:h*h;var g=E-n[d].ts;g*=g;h=g+h;d>0&&(g=n[d].ts-n[d-1].ts,g=Math.round(g/10)*10,w[g]=w[g]==null?1:w[g]+1);d>1&&(g=n[d].ts-n[d-2].ts,g=Math.round(g/10)*10,w[g]=w[g]==null?1:w[g]+1);d>2&&(g=n[d].ts-n[d-3].ts,g=Math.round(g/10)*10,w[g]=w[g]==null?1:w[g]+1);if(h<c){var k=d;c=h}T(n[d],"sand")}T(n[k],"red");X=n[k].bar;f.vprint("snd",vv?"":"metronome evalBeats histO:"+f.dumpvar(w));
    29 g=ra(w);k="nada";f.vprint("snd",vv?"":"metronome evalBeats gotback:"+f.dumpvar(g));g&&g.length>1&&(g=g.sort(sa),u=Math.round(60/g[0].tempo*1E3),k=g[0].tempo);c=u-(E-n[n.length-1].ts);I=u;u=c;f.vprint("snd",vv?"":"metronome evalBeats best:"+k+"->[ "+I+" ] THIS delay:"+u+" DUMP tempos:"+g);b.doplots&&(v=n[n.length-1].ts/10-S,plotw=I/10,l.fillStyle="green",l.fillRect(v,16,plotw,2));n.length=0;f.vprint("snd",vv?"":"metronome evalBeats DONE for["+E+"]: took:"+((new Date).getTime()-a))}}b.metronomeID&&
    30 window.clearInterval(b.metronomeID);b.metronomeID=window.setTimeout(ia,u);I!=null&&(u=I,I=null)},sa=function(a,c){let d=0;a.count<c.count?d=1:a.count>c.count&&(d=-1);return d},ra=function(a){var c,d=[];for(c in a){var h=a[c];var g=60/(c/1E3);g=Math.round(g);if(g===0)return;for(;g<90;)g*=2;for(;g>180;)g/=2;g=Math.round(g);d.some(function(k){if(k.tempo===g)return k.count+=h})||d.push({tempo:g,count:h})}return d},T=function(a,c){b.doplots&&(v=a.ts/10-S,ploty=c=="black"?0:15,ploth=c=="black"?a.bar:a.bar-
    31 15,l.fillStyle=c,l.fillRect(v,ploty,1,ploth),v>y.width&&(S+=y.width,l.fillStyle="white",l.fillRect(1,1,y.width-2,y.height-2)))},ka=function(){b.muted||(drawVisual=requestAnimationFrame(ka));r.getByteFrequencyData(Z);p.fillStyle="rgb(0, 0, 0)";p.fillRect(0,0,A,B);for(var a=A/R,c,d=0,h=0;h<R;h++)c=Z[h],p.fillStyle="rgb("+(c+100)+",50,50)",p.fillRect(d,B-c,a,c),d+=a+1;aa?(pnbpix=333/17,l.fillStyle="rgb(200,200,0)",l.fillRect(v,F-1,pnbpix,1),l.fillStyle=beatStyle):(F=10,l.fillStyle="rgb(50,50,50)");l.fillRect(v,
    32 0,1,F);l.fillStyle="rgb(200, 200, 200)";l.fillRect(10,25,250,35);l.fillStyle="rgb(0,0,0)";l.fillText("cps:"+Math.round(ca)+" pbp:333",10,50);v+=1;v>y.width&&(v=0,l.fillStyle="white",l.fillRect(1,1,y.width-2,y.height-2))},ja=function(){b.muted||requestAnimationFrame(ja);r.getByteTimeDomainData(Q);p.fillStyle="rgb(200, 200, 200)";p.fillRect(0,0,A,B);p.lineWidth=2;p.strokeStyle="rgb(0, 0, 0)";p.beginPath();for(var a=A*1/D,c=0,d=0;d<D;d++){var h=Q[d]/128*B/2;d===0?p.moveTo(c,h):p.lineTo(c,h);c+=a}p.lineTo(A,
    33 B/2);p.stroke()};this.restart=function(a,c){f.vprint("snd","= = restart all or key?"+c+" timepos:"+a);if(b.plO[e]!=null)if(a==null&&(a=0),c!=null)b.plO[e].sndO[c].seek(a);else for(c in b.plO[e].sndO)b.plO[e].sndO[c].seek(a)};var la=function(a,c){var d=0;for(a==null||a.attr("id")==null||a.attr("id");a!=null&&a.parent()!=null&&!a.hasClass(c);){a=a.parent();var h=a==null?"nada":a.attr("id")==null?"nada":a.attr("id");f.vprint("snd",">>>>> findParent bubble["+d+"]:fromhere id:"+h+":");if(a.hasClass(c))return a;
    34 d++}return null};this.preload=function(a){f.vprint("snd","=preload("+a.file+","+a.snd+","+a.pl+"):");a.preloading=!0;b.start(a)};this.start=function(a){e=a.pl==null?"default":a.pl;L(e);f.vprint("snd","= = = = = gnvlSound.START["+e+"],  eloop?"+typeof eloop+":");b.plO[e]==null?f.vprint("snd","= = = = = X X X playlist[ "+e+" ] mia"):f.vprint("snd","= = = = =  cur volel?"+typeof b.plO[e].volel+", param vol?"+typeof a.volel+" sndO:"+b.plO[e].sndO);a.snd==null&&(a.snd="tlmusic");a.volel&&(b.plO[e].volel=
    35 a.volel,b.plO[e].voldomel=a.volel.node,delete a.volel);f.vprint("snd","= = = = =  final ["+e+"]volel?"+typeof b.plO[e].volel+":");typeof b.plO[e].volel=="undefined"&&b.registerVol();b.plO[e].volState=="vol_hidden"&&(a.usemode=="idle2play"?b.plO[e].volel.removeClass("gnlv-gone"):(typeof eloop=="undefined"||eloop.version!="stub")&&b.plO[e].volel.removeClass("gnlv-gone"),a.preloading&&a.usemode!="idle2play"||b.toggleVol("vol_off"));if(a.enable){a.file==null?a.file=b.sndLibO[a.snd]:b.sndLibO[a.snd]&&
    36 a.file!=b.sndLibO[a.snd]&&(f.vprint("snd","= detect sound file change:"+a.file+"->"+b.sndLibO[a.snd]),a.file=b.sndLibO[a.snd]);f.vprint("snd","= = = = = CREATE Sound["+a.snd+"] params:"+a);var c=a.playmode=="continuous"?!0:!1;this.plO[e].sndO[a.snd]!=null&&(f.vprint("snd","= old sound existed same? false :old:"+this.plO[e].sndO[a.snd].src+" new:"+a.file),f.vprint("snd","= unload old sound:"+a.snd),this.plO[e].sndO[a.snd].unload());c={src:[a.file],loop:c,autoplay:!1,preload:!0,onloaderror:ha,onplayerror:ha};
    37 a.volume&&(c.volume=parseFloat(a.volume)/10);a.format&&(c.format=a.format);a.do3d&&(c.do3d=a.do3d);a.html5&&(c.html5=a.html5,f.vprint("snd","X X looks like html5? "+a.html5+" NO ANALYZER"));a.file.match(/\.[a-zA-Z0-9]{3}$/)||(f.vprint("snd","no extension guess = AUTOFORMAT mp3"),c.format=["mp3"]);f.vprint("snd","MADE snd["+e+"]["+a.snd+"]="+a.file);this.plO[e].sndO[a.snd]=new Howl(c);a.do3d&&(this.plO[e].sndO[a.snd].do3d=a.do3d);a.playmode&&(this.plO[e].sndO[a.snd].playmode=a.playmode);this.plO[e].sndO[a.snd].src=
    38 a.file;this.plO[e].sndO[a.snd].once("load",function(d,h){f.vprint("snd","LOAD DONE:sound tag:"+a.snd+" arg1"+d+" arg2:"+h);a.snd=="tlmusic"&&a.preloading&&jQuery.event.trigger({type:"readyplayerone",message:"tlmusic is ready for action",time:new Date})});f.vprint("snd","have audiocontext:"+Howler.ctx);if(a.do3d)b.panO[a.ani]=b.setupPan(a.snd,0,0),b.panningInterval==null&&a.ani!="autoset"?(f.vprint("snd","= = = = = START Panner Interval= = = = = CAMERA["+a.ani+"]              C  A  M  E  R  A           xyz: "+
    39 this.camx+","+this.camy+","+this.camz),Howler.pos(this.camx,this.camy,this.camz),b.panningInterval=window.setInterval(ta,100)):f.vprint("snd","= = = X X skip Panner Interval, already there,  panO:"+Object.keys(b.panO)+" or bad id:"+a.ani);else if(a.playmode.match(/^on/))for(playmodeA=a.playmode.split(/,/),f.vprint("alert","= = = = = EVENT LISTENER MODE RETIRED  = = = : "+a.playmode+" : split:"+playmodeA.length+" for "+a.ani),ii=0;ii<playmodeA.length;ii++)myp=ma(a.ani),anelA=myp.el.querySelectorAll("animateTransform"),
    40 anmtA=myp.el.querySelectorAll("*[id^=anmt_]"),f.vprint("snd",vv?"":"on-event= = = = = found num animateTransform       A N I    T R A N S         :"+anelA.length+" num id anmt:"+anmtA.length),anelA.length>0?anel=anelA[0]:anmtA.length>0&&(anel=anmtA[0]),playmodeA[ii].match(/(mouse|click|focus)/)&&(anel=myp.el),anel.removeEventListener(b.eventMapO[playmodeA[ii]],na),anel.addEventListener(b.eventMapO[playmodeA[ii]],na.bind({mysound:b.plO[e].sndO[a.snd]}));else f.vprint("snd","= = = = = non-3d sound autoplay skip")}};
    41 var na=function(a){console.log("i repeated:"+a.detail+" mysound:"+typeof this.mysound);this.mysound.play()};this.stdplay=function(a,c,d,h,g,k,z,C){if(a&&a.getAttribute){var H=a.getAttribute("ddd");a.getAttribute("ppp");var J=a.getAttribute("apl");var t=a.getAttribute("slot");var oa=parseFloat(a.getAttribute("vol"))/10}else f.vprint("warn","stdplay["+d+"]["+c+"] X X X have no el?"+typeof a);if(d==null||d=="null")d=J!=null?J:e;f.vprint("snd","stdplay[apl:"+e+" myapl:"+d+" aaa:"+J+"]["+c+"] Tfrom:"+
    42 g+" to:"+k+" have apl?"+typeof b.plO[d]+" have sound?"+typeof b.plO[d].sndO[c]);if(b.plO[d].sndO[c]==null){f.vprint("warn","stdplay["+d+"]["+c+"] X X X NOT INITIALIZED  X X X! have el?"+typeof a);var pa=Snap(a);if(t=la(pa,"gnlv-slot-eloop"))if(J=t.attr("gnlv-data"),mysvg=la(pa,"gnlv-svg"),f.vprint("snd","snd["+c+"]  data:"+J),(jsonO=f.parsejson(J))&&jsonO.transO&&jsonO.transO.sound){mysvg&&mysvg.attr&&(d=mysvg.attr("id"),jsonO.transO.sound.pl=d,a.setAttribute("apl",d));if(b.plO[d].sndO[c]==null){f.vprint("snd",
    43 "snd["+d+"]["+c+"] NEW DATA  NEW DATA  NEW DATA,    -=> starting <=- ");b.start(jsonO.transO.sound);g-=.25;g<0&&(g=0);setTimeout(b.stdplay,250,a,c,d,h,g,k,z,C);return}f.vprint("snd","snd["+d+"]["+c+"] is OK ")}}b.plO[d].sndO[c].state()!="loaded"&&g==0?f.vprint("warn","stdplay["+d+"]["+c+"] X X X not loaded!"):b.plO[d].sndO[c].do3d?f.vprint("snd","stdplay["+d+"]["+c+"] is 3d, no action!"):(b.plO[d].sndO[c].stop(),b.playID[t]&&clearTimeout(b.playID[t]),b.lastSnd[t]!=c&&b.plO[d].sndO[b.lastSnd[t]]&&
    44 b.plO[d].sndO[b.lastSnd[t]].stop(),b.lastSnd[t]=c,b.playID[t]=window.setTimeout(function(U,M,N){f.vprint("snd","stdplay["+d+"]["+t+"]["+c+"]PLAY, fadein?"+U.match(/(FadeIn)/)+" playmode:"+U+" ddd:"+M+" cur vol:"+N);b.playID[t]=!1;e==d&&(b.plO[d].sndO[c].play(),U.match(/(FadeIn)/)&&b.plO[d].sndO[c].fade(0,N,M*1E3))},g*1E3,h,H,oa),k>0&&(b.endID[t]=window.setTimeout(function(){f.vprint("snd","stdplay["+d+"]["+c+"]STOP");b.plO[d].sndO[c].stop()},k*1E3),h.match(/(FadeInOut)/)&&(b.fadeID[t]=window.setTimeout(function(U,
    45 M,N){f.vprint("snd","stdplay["+d+"]["+c+"]FADE "+N+" dur:"+M);e==d&&b.plO[d].sndO[c].fade(N,0,M*1E3)},(k-H)*1E3,h,H,oa))))};var ma=function(a){var c=200,d=0,h=200;var g=document.getElementById(a);if(g==null)f.vprint("warn","gnlvPosById["+a+"] not found!");else{var k=g.getBoundingClientRect();var z=b.fov*Math.PI/180;var C=k.height;C=z*C/b.winh;c=b.trueh/Math.tan(C);isNaN(c)&&(c=-1E3);z*=b.aratio;curx=k.x+k.width/2-b.camxshift;z=f.d4(z*curx/b.winw);d=f.d4(c*Math.tan(z));h=f.d4(k.y);f.vprint("snd",vv?
    46 "":"gnlvPosById key["+a+"] hasPan?"+b.panO[a]+" found el?"+typeof g+" x:"+parseInt(k.x)+" truex,y:"+d+","+h+" theta:"+C+" phi:"+z+" dist(z):"+parseInt(c))}return{x:d,y:h,z:c,el:g}},ta=function(){for(key in b.panO)myp=ma(key),b.panO[key].indexOf(".")>0?b.plO[e].sndO[b.panO[key.split(".")[0]]].pos(myp.x+.5,myp.y+.5,myp.z,key.split(".")[1]):b.plO[e].sndO[b.panO[key]].pos(myp.x+.5,myp.y+.5,myp.z),f.vprint("snd","gnlvPanner["+e+"]: ["+key+"] xy:"+myp.x+","+myp.y)};this.setupPan=function(a,c,d,h){sound=
    47 b.plO[e].sndO[a];var g=h==null?sound.play():sound.play(h);f.vprint("snd","===setupPan=== set up panner on sound   -=["+a+"]=-   soundId   -=["+g+"]=- x:"+c+",y:"+d+" sprite?"+h);sound.once("play",function(){sound.pos(c+.5,d+.5,-.5,g);sound.volume(1,g);sound.pannerAttr({panningModel:"HRTF",refDistance:100,rolloffFactor:.5,distanceModel:"exponential"},g)}.bind(this),g);return h==null?a:a+"."+h};this.init()};
     1var GenolveSound=function(e){var n=this;null==e&&(e={}),this.ver="2.0.0",this.fov=90,this.muted=!0,this.numfreqbins=256;var t,l,o,a=0,r=0,i=10,s=484,d=0,p=57,u=null,v=3,m=!1,f=!0,c={},h=!0,g=0,y=70,O="bass",w=e.vpr;null==e.actionhost&&e.actionhost;var b,S,A,D,I,T,M="off",k=!0,L={},x=[];this.trueh=200,this.plO={};var E="notset";this.muteTrans=null,this.muteExtra=null,this.playExtra=null,this.doplots=!0,this.needSetup=!1,this.playID={},this.endID={},this.fadeID={},this.lastSnd={};var N,V,R,_,q=0,P=0,X=document.getElementById("oscilloscope");null!=X&&(N=X.getContext("2d"),R=X.width,_=X.height);var z=document.getElementById("plot");null!=z&&((V=z.getContext("2d")).font="28px serif",V.lineWidth=1,V.strokeStyle="green",V.rect(0,0,z.width,z.height),V.stroke()),null==w&&(w={name:"snd-stub",vprint:function(e,n){vv||console.log(n)},isnull:function(e){return void 0===e||"0"!==(e=String(e))&&(""==e||"undefined"==e||"_All_"==e||"null"==e||null===e)},dumpvar:function(e){return JSON.stringify(e)},setValMode:{LOOP:"LOOP",LOOPz:"LOOPz",LOOPtoBOUND:"LOOPtoBOUND",LIMIT:"LIMIT",RANDOM:"RANDOM",MIDNORM:"MIDNORM",LOWNORM:"LOWNORM",HINORM:"HINORM"},setVal:function(e,n,t,l,o){if((t=parseFloat(t))>(l=parseFloat(l))){var a=l;l=t,t=a}var r,i=l-t,s=o==this.setValMode.LOOPz?i+1:i;if((r=(e=isNaN(e)?0:parseFloat(e))+(n=isNaN(n)?1:parseFloat(n)))>l)if(o==this.setValMode.LIMIT)r=l;else if(o==this.setValMode.LOOPtoBOUND)r=t;else if(o==this.setValMode.LOOP||o==this.setValMode.LOOPz)for(;r>l;)r-=s;else console.warn("GNLV_UTILS.setVal invalid setValMode:"+o+" must be LOOP/LIMIT/RANDOM");else if(r<t)if(o==this.setValMode.LIMIT)r=t;else if(o==this.setValMode.LOOPtoBOUND)r=l;else if(o==this.setValMode.LOOP||o==this.setValMode.LOOPz)for(;r<t;)r+=s;else console.warn("GNLV_UTILS.setVal invalid setValMode:"+o+" must be LOOP/LIMIT/RANDOM");return r},d0:function(e){return e=String(e).replace(/[^0-9\-\.]/g,""),Math.round(parseFloat(e))},dd:function(e){return Math.round(100*parseFloat(e))/100},ddd:function(e){return Math.round(1e3*parseFloat(e))/1e3},d4:function(e){return Math.round(1e4*parseFloat(e))/1e4},parsejson:function(e){var n={};(e.match(/^\{'/)||e.match(/^\[\{'/))&&(e=e.replace(/'/g,'"'));try{n=JSON.parse(e)}catch(n){console.warn("JSON parse error on["+e+"]:"+n)}return n}});this.volsprite='<g id="vol_on_off" class="gnlv-clickable gnlv-vol-control" data-ver="1.1" data-target="default" onclick="document.gnlvSound.toggleVol(this)" transform="scale(.2)"><circle  cx="100" cy="100" r="100" fill="#DDDDDD"/><g id="vol_on" transform="scale(0.2)" class="vol_on"><path d="M156,379 v247 h140 l210,173 l0,-592 l-210,173 H156 z  M588,351 c-12,-12 -32,-12 -44,0 c-12,12 -12,32 0,44 v0 c27,27 44,64 44,105 c0,41 -17,78 -44,105 c-12,12 -12,32 0,44 c6,6 14,9 22,9 c8,0 16,-3 22,-9 c38,-38 62,-91 62,-149 C650,442 626,389 588,351 z  M659,279 c-12,-12 -32,-12 -44,0 c-12,12 -12,32 0,44 c45,45 73,108 73,177 c0,69 -28,131 -73,177 c-12,12 -12,32 0,44 c6,6 14,9 22,9 c8,0 16,-3 22,-9 c57,-57 92,-135 91,-221 C751,414 716,335 659,279 z  M728,211 c-12,-12 -32,-12 -44,0 c-12,12 -12,32 0,44 h0 c63,63 102,149 102,245 c0,96 -39,182 -101,245 c-12,12 -12,32 0,44 c6,6 14,9 22,9 s16,-3 22,-9 c74,-74 120,-176 120,-289 C847,387 801,285 728,211 z  "></path></g><g id="vol_off" transform="scale(0.2)" class="vol_off" style="display:none"><path d="M156,379 v247 h140 l210,173 l0,-592 l-210,173 H156 z  M920,652 788,520 920,384 852,320 720,452 588,320 520,384 652,520 520,652 588,716 720,584 852,716 920,652 788,520  "></path> </g></g>',this.sndLibO={none:"none",drone:"https://www.genolve.com/svg/snd/drone-flying.mp3",train:"https://www.genolve.com/svg/snd/train-wheels.mp3",tick:"https://www.genolve.com/svg/snd/Tick.mp3",bells:"https://www.genolve.com/svg/snd/sleigh-bells-2ring.mp3","80svibe":"https://www.genolve.com/svg/snd/80s_vibe.mp3",rave:"https://www.genolve.com/svg/snd/rave_digger.mp3"},this.eventMapO={onmousemove:"mousemove",onfocusin:"focusin",onclick:"click",onmousedown:"mousedown",onmouseup:"mouseup",onbegin:"beginEvent",onend:"endEvent",onrepeat:"repeatEvent"},this.panningInterval=null,w.vprint("snd","   - =   gnlvSound loading   = - vpr:"+w.name),"function"!=typeof Howl&&(w.vprint("warn","= = = =missing Howler! loading now"),jQuery.getScript(e.actionhost+"/js/howler.js/dist/howler.min.js",(function(){w.vprint("snd","3 3 3 3 3 3 3 3 3 3 3 3  howler loaded DONE  3 3 3 3 3 3 3 3 3 3 3 3")})).done((function(){}))),"function"!=typeof window.jsmediatags&&(w.vprint("warn","= = = =missing window.jsmediatags! loading now"),jQuery.getScript(e.actionhost+"/js/jsmediatags/dist/jsmediatags.min.js",(function(){w.vprint("snd","3 3 3 3 3 3 3 3 3 3 3 3  jsmediatags loaded DONE  3 3 3 3 3 3 3 3 3 3 3 3")}))),this.init=function(){if(w.vprint("snd","init sound"),e.volel&&n.registerVol(e.volel),e.preload){w.vprint("snd","init - PRELOAD["+E+"]:"+e.preload);var t={enable:!0,snd:"tlmusic",pl:E,playmode:"continuous",do3d:!1,file:e.preload,usemode:"record"};"none"==e.preload?window.setTimeout((function(){jQuery.event.trigger({type:"readyplayerone",message:"NO music to load, ready now",time:new Date})}),500):n.preload(t)}},this.getMediaTags=function(e){if(w.vprint("snd","getMediaTags =START+ for:"+e),"undefined"!=typeof eloop&&eloop.music&&window.jsmediatags){var n={artist:"unknown",album:"unknown",track:0,title:"unknown",fileLength:eloop.mp3length,genre:"unknown"};window.jsmediatags.read(e,{onSuccess:function(e){if(eloop.music.exturl,e&&e.tags&&e.tags.comment&&e.tags.comment.text){var t=e.tags.comment.text.split(/\r\n/,1);1==t.length&&(eloop.music.exturl=t[0].replace(/URL:\s*/,""))}for(key in w.vprint("snd","getMediaTags returned:"+w.dumpvar(e)),n)eloop.music[key]=e&&e.tags&&e.tags[key]?e.tags[key]:n[key];"undefined"==typeof SpotifyApi?w.vprint("warn","getMediaTags no spotify api!"):(SpotifyApi.thmb=eloop.thmb,SpotifyApi.updateCurTrack("normal",eloop.music))},onError:function(e){for(key in console.error("getMediaTags:"+w.dumpvar(e)),n)eloop.music[key]=n[key];SpotifyApi.thmb=eloop.thmb,SpotifyApi.updateCurTrack("normal",eloop.music)}})}else w.vprint("warn","getMediaTags missing "+typeof window.jsmediatags+" or eloop missing!"+typeof eloop)};var C=function(e){return e?e-l:(new Date).getTime()-l},F=function(e,n){w.vprint("error","ERROR X X sound["+e+"]:"+n)};this.resize=function(e){e?(n.winw=e.winw||1200,n.winh=e.winh||630,e.coordA&&n.plO[E]&&n.plO[E].volel&&(3==coordA.length&&coordA.pop(),n.plO[E].volel.transform("matrix(0.2 0 0 0.2 "+coordA.join(" ")+")"))):(n.winw=n.winw||1200,n.winh=n.winh||630),n.aratio=n.winw/n.winh,n.camxshift=n.winw/2,n.camx=0,n.camy=n.winh/2,n.camz=-20,w.vprint("snd","sound resize= = = = = win w h:"+n.winw+","+n.winh+" aratio:"+n.aratio)},n.resize(e),this.panO={},this.mute=function(){for(var e in w.vprint("snd","= = = = = global MUTE Sound["+E+"] muteTrans?"+(null!=n.muteTrans)+" extra?"+(null!=n.muteExtra)),Howler.mute(!0),n.plO[E].sndO)n.plO[E].sndO[e].pause();n.muted=!0,n.metronomeID&&(window.clearInterval(n.metronomeID),n.metronomeID=null),n.beatWorkerID&&(window.clearInterval(n.beatWorkerID),n.beatWorkerID=null),null!=n.muteTrans&&n.muteTrans(E),null!=n.muteExtra&&n.muteExtra()},this.play=function(){for(var e in w.vprint("snd","= = = = = global PLAY Sound["+E+"] extra?"+(null!=n.playExtra)),n.muted=!1,Howler.mute(!1),n.plO[E].sndO)w.vprint("snd","= = = = =  PLAY["+E+"]["+e+"]"),"none"==n.plO[E].sndO[e].playmode||"continuous"==n.plO[E].sndO[e].playmode&&n.plO[E].sndO[e].play();this.ana(),null!=n.playExtra&&n.playExtra()},this.volume=function(e,t){w.vprint("snd","= = = = = volume Sound["+e+"] found?"+(n.plO[E]&&n.plO[E].sndO[e])+" vol:"+t),n.plO[E]&&n.plO[E].sndO[e]&&n.plO[E].sndO[e].volume(parseFloat(t)/10)},this.global_vol=function(e){Howler.volume(e)},this.addVol=function(e){if(null!=e){var t=e.select("#vol_on_off"),l=!0;return j(E),t&&(oldver=t.attr("data-ver"),oldver=null==oldver?0:parseFloat(oldver),w.vprint("snd","addVol["+E+"] sound  found existing vol el! ver:"+oldver),oldver<1.1?t.remove():l=!1),l&&(w.vprint("snd","addVol["+E+"] sound new volsprite and hide!"),e.append(Snap.parse(n.volsprite)),(t=e.select("#vol_on_off")).hasClass("gnlv-gone")||t.addClass("gnlv-gone"),n.plO[E].volState="vol_hidden"),n.plO[E].volel=t,n.plO[E].voldomel=t.node,t}w.vprint("snd","sound addVol["+E+"] abort, missing parent obj!")},this.showVol=function(e){n.plO[E].volel&&n.plO[E].volel.attr&&"function"==typeof n.plO[E].volel.removeClass?(w.vprint("snd","showVol["+E+"] "+e+" have func?"+typeof n.plO[E].volel.removeClass),null==e||1==e?n.plO[E].volel.removeClass("gnlv-gone"):n.plO[E].volel.addClass("gnlv-gone")):(w.vprint("warn","showVol["+E+"] = = = found no vol element at:"+n.plO[E].volel),n.registerVol())},this.registerVol=function(t){var l=t||e.volel;null==l&&(l="#vol_on_off");var o=Snap.select(l);w.vprint("snd","registerVol["+E+"]found ["+l+"]?"+typeof o),j(E),o&&o.attr?(w.vprint("snd","registerVol["+E+"] found it:"+o.attr("id")+", have removeClass?"+typeof o.removeClass),n.plO[E].volel=o,n.plO[E].voldomel=o.node):w.vprint("warn","registerVol["+E+"] X X X found no vol element at:"+l)},this.toggleVol=function(t){var l;"string"==typeof t?n.plO[E].volState="vol_on"==t?"vol_off":"vol_on":"object"==typeof t&&(w.vprint("snd","toggleVol[ event:"+t+"]  nodeType?:"+t.nodeType+" id?"+t.id),newapl=t.getAttribute("data-target"),w.vprint("snd","toggleVol[ event:"+t+"]  playlist:"+newapl),j(newapl)),n.plO[E].voldomel?l=n.plO[E].voldomel.getAttribute("id"):(w.vprint("error","toggleVol[ event:"+t+"] NO voldomel for apl:"+E),n.registerVol()),"vol_on"==n.plO[E].volState?(n.plO[E].volState="vol_off",n.plO[E].voldomel.querySelector(".vol_on").style.display="none",n.plO[E].voldomel.querySelector(".vol_off").style.display="block",n.mute()):(n.needSetup&&(n.needSetup=!1,"undefined"!=typeof gnlvScroll&&1==e.doScroll?(gnlvScroll.doSetup(),"undefined"!=typeof eloop&&"running"==eloop.ani_state&&eloop.mkVidtimer()):w.vprint("warn","toggleVol X X X sound had flag for doSetup but no gnlvScroll defined!"+typeof gnlvScroll+" or flagged to skip:"+e.doScroll)),n.plO[E].volState="vol_on",n.plO[E].voldomel.querySelector(".vol_on").style.display="block",n.plO[E].voldomel.querySelector(".vol_off").style.display="none","undefined"!=typeof eloop&&eloop.music&&1==eloop.music.muzvidlink&&n.restart(eloop.anielapsed()),n.play()),"undefined"!=typeof gnlvScroll&&gnlvScroll.changeDiv(E,n.plO[E].volState),w.vprint("snd","toggleVol[cur:"+E+"]["+l+"]:"+n.plO[E].volState)},this.getVolState=function(){return j(E),n.plO[E].volState},this.volColor=function(){var e=m?"#FFFFFF":"#000000";m=!m,n.plO[E].volel.attr({fill:e})},this.volMarquee=function(e,t,l){zmq=n.plO[E].volel.select("#track_marquee"),"auto"!=t?null!=zmq&&zmq.remove():(w.vprint("snd","= = = = = = = volMarquee marquee mode:"+t+" volel:"+n.plO[E].volel.attr("id")+" marquee el?"+zmq+" track info:"+l),null==zmq?(w.vprint("snd","= = = = = = = volMarquee inserted marquee"),n.plO[E].volel.append(Snap.parse(e.replace(/CONTENT/,l))),zmq=n.plO[E].volel.select("#track_marquee"),mycirc=n.plO[E].volel.select("circle"),mycirc.before(zmq)):zmq.select("textPath").node.innerHTML=l)};var j=function(e,t){"notset"==e&&(e="default"),w.vprint("snd","changeapl mode:"+t+" playlist "+E+" -> "+e),e==E&&"create"!=t&&null!=n.plO[e]?w.vprint("snd","changeapl noop, playlist  same! "+e):null==e||null==n.plO[e]||"create"==t?(w.vprint("snd","changeapl X X X X INIT X X X X   apl["+e+"]  not initialised? >"+n.plO[e]+"< or  mode create?"+t),E=e,n.plO[E]={},n.plO[E].sndO={},n.plO[E].volState="vol_hidden"):(w.vprint("snd","changeapl, new playlist! ["+E+"]volState"+n.plO[E].volState),"vol_on"==n.plO[E].volState&&n.toggleVol("vol_off"),E=e,"undefined"!=typeof gnlvScroll&&gnlvScroll.changeDiv(E,n.plO[E].volState))};this.radio=function(e){var t={enable:!0,snd:"myradio",file:e,format:["mp3","aac"],do3d:!1,playmode:"normal"};n.start(t)},this.ana=function(e){if(null==e||(M=e,w.vprint("snd","ana MODE CHANGE:"+M+" muted?"+n.muted+" save for later"),!n.muted)){if("off"==M)N&&(N.clearRect(0,0,R,_),N.fillStyle="red",N.fillRect(0,0,R,_));else if(null==o){if(w.vprint("snd","ana -------------------------------------------------- CREATE --------------------------------------------------Analyser:"+M+" bins:"+n.numfreqbins),(o=Howler.ctx.createAnalyser()).maxDecibels=-20,o.fftSize=2*n.numfreqbins,"onbeat"===M){var a=Howler.ctx.createBiquadFilter();a.type="lowpass",Howler.masterGain.connect(a),a.connect(o),w.vprint("snd","ana   LOWPASS FILTER ADDED")}else Howler.masterGain.connect(o);X&&(R=X.width,_=X.height),t=l=(new Date).getTime()}"headless"===M?(this.bufferLength=A=o.frequencyBinCount,this.dataArray=new Uint8Array(this.bufferLength),this.timeArray=new Uint8Array(this.bufferLength)):"onbeat"===M?(this.bufferLength=A=o.frequencyBinCount,this.dataArray=new Uint8Array(this.bufferLength),this.timeArray=new Uint8Array(this.bufferLength),w.vprint("snd","start beatWorker at interval:10"),n.beatWorkerID&&window.clearInterval(n.beatWorkerID),n.beatWorkerID=window.setInterval(B,i),w.vprint("snd","start metronome at period - - - - - - - - - - - :"+s),n.metronomeID&&window.clearInterval(n.metronomeID),n.metronomeID=window.setTimeout(H,s)):"sinewave"===M?(A=o.frequencyBinCount,b=new Uint8Array(A),o.getByteTimeDomainData(b),Z()):"frequencybars"==M&&(A=D=o.frequencyBinCount,S=new Uint8Array(D),N.clearRect(0,0,R,_),J()),w.vprint("snd","ana DONE anaMode [ "+M+" ]  num bins:"+A+" - - - - - - - - - - - -  - - - - - --  - - - - - --  -- - "),w.vprint("snd","ana DONE  - - - - - - - - - - - -  - - - - - --  - - - - - --  -- - ")}},this.getAna=function(){return null==o||"off"==M||n.muted?null:(o.getByteFrequencyData(this.dataArray),o.getByteTimeDomainData(this.timeArray),{data:{freq:this.dataArray,time:this.timeArray,metro:(C()-g)/s,size:this.bufferLength}})};var B=function(){o.getByteFrequencyData(n.dataArray),G(n.dataArray,n.bufferLength)},H=function(){var e,t;if(g=C(),Q({ts:g,bar:y},"black"),w.vprint("snd",vv?"":"metronome - - - - - - - - - - - TICK at["+g+"] period:"+s+" beat:"+x.length),$.event.trigger({type:"beat",keyoff:O,time:new Date}),v--<0){v=3;var l=(new Date).getTime();w.vprint("snd",vv?"":"metronome evalBeats - START -  period:"+s+" num beats:"+x.length),0==x.length&&(p*=.5);x.length;var o,a,r=99999999999999;if(n.doplots&&(q=d/i-P,plotw=(C(l)-d)/i,V.fillStyle=f?"yellow":"orange",V.fillRect(q,0,plotw,5+5*f)),d=C(l),f=!f,x.length>0){for(var m=0;m<x.length;m++)e=(e=y-x[m].bar)<0?0:e*e,t=g-x[m].ts,a=(t*=t)+e,m>0&&(t=x[m].ts-x[m-1].ts,t=10*Math.round(t/10),c[t]=null==c[t]?1:c[t]+1),m>1&&(t=x[m].ts-x[m-2].ts,t=10*Math.round(t/10),c[t]=null==c[t]?1:c[t]+1),m>2&&(t=x[m].ts-x[m-3].ts,t=10*Math.round(t/10),c[t]=null==c[t]?1:c[t]+1),a<r&&(o=m,r=a),Q(x[m],"sand");Q(x[o],"red"),y=x[o].bar,w.vprint("snd",vv?"":"metronome evalBeats histO:"+w.dumpvar(c));var b=W(c),S="nada";if(w.vprint("snd",vv?"":"metronome evalBeats gotback:"+w.dumpvar(b)),b&&b.length>1){b=b.sort(U);s=Math.round(60/b[0].tempo*1e3),S=b[0].tempo}var A=s-(g-x[x.length-1].ts);u=s,s=A,w.vprint("snd",vv?"":"metronome evalBeats best:"+S+"->[ "+u+" ] THIS delay:"+s+" DUMP tempos:"+b),n.doplots&&(q=x[x.length-1].ts/i-P,plotw=u/i,V.fillStyle="green",V.fillRect(q,16,plotw,2)),x.length=0,w.vprint("snd",vv?"":"metronome evalBeats DONE for["+g+"]: took:"+((new Date).getTime()-l))}}h=!h,n.metronomeID&&window.clearInterval(n.metronomeID),n.metronomeID=window.setTimeout(H,s),null!=u&&(s=u,u=null)},U=function(e,n){let t=0;return e.count<n.count?t=1:e.count>n.count&&(t=-1),t},W=function(e){var n,t,l=[];for(n in e){t=e[n];var o=60/(n/1e3);if(0===(o=Math.round(o)))return;for(;o<90;)o*=2;for(;o>180;)o/=2;o=Math.round(o),l.some((function(e){if(e.tempo===o)return e.count+=t}))||l.push({tempo:o,count:t})}return l},G=function(e,n){r++,a=((new Date).getTime()-t)/r;var l,o=[],i=0,s=0,d=0,u=0,v=0;for(l=0;l<n;l++)o[l]=w.setVal(e[l]/255,0,0,1,w.setValMode.LIMIT),v=Math.max(v,o[l]),i+=o[l],l<3?u+=o[l]:l<6?d+=o[l]:s+=o[l];if(L.ave=i/n,L.max=v,L.bass=u/3,L.mid=d/3,L.treb=s/3,I=!1,L.prevh2&&L.bass<L.prevh&&L.prevh<L.prevh2&&(!0,1==k)){k=!1,I=!0;var m={bar:T=100*L.prevh2,ts:L.prevt2};T<p?Q(m,"cyan"):(x.push(m),p=(3*p+(T-10))/4)}L.bass>L.prevh&&L.prevh>L.prevh2&&(k=!0,!1),L.prevh2=L.prevh,L.prevt2=L.prevt,L.prevh=L.bass,L.prevt=C()},Q=function(e,t){n.doplots&&(q=e.ts/i-P,ploty="black"==t?0:15,ploth="black"==t?e.bar:e.bar-15,V.fillStyle=t,V.fillRect(q,ploty,1,ploth),q>z.width&&(P+=z.width,V.fillStyle="white",V.fillRect(1,1,z.width-2,z.height-2)))},Y=function(){I?(pnbpix=333/17,V.fillStyle="rgb(200,200,0)",V.fillRect(q,T-1,pnbpix,1),V.fillStyle=beatStyle):(T=10,V.fillStyle="rgb(50,50,50)"),V.fillRect(q,0,1,T),V.fillStyle="rgb(200, 200, 200)",V.fillRect(10,25,250,35),V.fillStyle="rgb(0,0,0)",V.fillText("cps:"+Math.round(a)+" pbp:"+Math.round(333),10,50),(q+=1)>z.width&&(q=0,V.fillStyle="white",V.fillRect(1,1,z.width-2,z.height-2))},J=function(){n.muted||(drawVisual=requestAnimationFrame(J)),o.getByteFrequencyData(S),N.fillStyle="rgb(0, 0, 0)",N.fillRect(0,0,R,_);for(var e,t=R/D,l=0,a=0;a<D;a++)e=S[a],N.fillStyle="rgb("+(e+100)+",50,50)",N.fillRect(l,_-e,t,e),l+=t+1;Y()},Z=function(){n.muted||requestAnimationFrame(Z),o.getByteTimeDomainData(b),N.fillStyle="rgb(200, 200, 200)",N.fillRect(0,0,R,_),N.lineWidth=2,N.strokeStyle="rgb(0, 0, 0)",N.beginPath();for(var e=1*R/A,t=0,l=0;l<A;l++){var a=b[l]/128*_/2;0===l?N.moveTo(t,a):N.lineTo(t,a),t+=e}N.lineTo(R,_/2),N.stroke()};this.restart=function(e,t){if(w.vprint("snd","= = restart all or key?"+t+" timepos:"+e),null!=n.plO[E])if(null==e&&(e=0),null!=t)n.plO[E].sndO[t].seek(e);else for(var t in n.plO[E].sndO)n.plO[E].sndO[t].seek(e)};var K=function(e,n){for(var t=0,l=null==e||null==e.attr("id")?"nada":e.attr("id");null!=e&&null!=e.parent()&&!e.hasClass(n);){if(l=null==(e=e.parent())||null==e.attr("id")?"nada":e.attr("id"),w.vprint("snd",">>>>> findParent bubble["+t+"]:fromhere id:"+l+":"),e.hasClass(n))return e;t++}return null};this.preload=function(e){w.vprint("snd","=preload("+e.file+","+e.snd+","+e.pl+"):"),e.preloading=!0,n.start(e)},this.start=function(e){var t,l;if(E=null==e.pl?"default":e.pl,j(E),w.vprint("snd","= = = = = gnvlSound.START["+E+"],  eloop?"+typeof eloop+":"),null==n.plO[E]?w.vprint("snd","= = = = = X X X playlist[ "+E+" ] mia"):w.vprint("snd","= = = = =  cur volel?"+typeof n.plO[E].volel+", param vol?"+typeof e.volel+" sndO:"+n.plO[E].sndO),null==e.snd&&(e.snd="tlmusic"),e.volel&&(n.plO[E].volel=e.volel,n.plO[E].voldomel=e.volel.node,delete e.volel),w.vprint("snd","= = = = =  final ["+E+"]volel?"+typeof n.plO[E].volel+":"),void 0===n.plO[E].volel&&n.registerVol(),"vol_hidden"==n.plO[E].volState&&("idle2play"==e.usemode?n.plO[E].volel.removeClass("gnlv-gone"):"undefined"!=typeof eloop&&"stub"==eloop.version||n.plO[E].volel.removeClass("gnlv-gone"),e.preloading&&"idle2play"!=e.usemode||n.toggleVol("vol_off")),e.enable){if(null==e.file?e.file=n.sndLibO[e.snd]:n.sndLibO[e.snd]&&e.file!=n.sndLibO[e.snd]&&(w.vprint("snd","= detect sound file change:"+e.file+"->"+n.sndLibO[e.snd]),e.file=n.sndLibO[e.snd]),e.volume&&w.isnull(e.volume)&&(e.volume=10),w.vprint("snd","= = = = = CREATE Sound["+e.snd+"] params:"+w.dumpvar(e)),t="continuous"==e.playmode,null!=this.plO[E].sndO[e.snd]){if(e.do3d&&e.ani,!1)return;w.vprint("snd","= unload old sound:"+e.snd),this.plO[E].sndO[e.snd].unload()}if(l={src:[e.file],loop:t,autoplay:!1,preload:!0,onloaderror:F,onplayerror:F},e.volume?l.volume=parseFloat(e.volume)/10:l.volume=1,e.format&&(l.format=e.format),e.do3d&&(l.do3d=e.do3d),e.html5&&(l.html5=e.html5,w.vprint("snd","X X looks like html5? "+e.html5+" NO ANALYZER")),e.file.match(/\.[a-zA-Z0-9]{3}$/)||(w.vprint("snd","no extension guess = AUTOFORMAT mp3"),l.format=["mp3"]),w.vprint("snd","MADE snd["+E+"]["+e.snd+"]="+e.file),this.plO[E].sndO[e.snd]=new Howl(l),e.do3d&&(this.plO[E].sndO[e.snd].do3d=e.do3d),e.playmode&&(this.plO[E].sndO[e.snd].playmode=e.playmode),this.plO[E].sndO[e.snd].src=e.file,this.plO[E].sndO[e.snd].once("load",(function(n,t){w.vprint("snd","LOAD DONE:sound tag:"+e.snd+" arg1"+n+" arg2:"+t),"tlmusic"==e.snd&&e.preloading&&jQuery.event.trigger({type:"readyplayerone",message:"tlmusic is ready for action",time:new Date})})),w.vprint("snd","have audiocontext:"+Howler.ctx),e.do3d)n.panO[e.ani]=n.setupPan(e.snd,0,0),null==n.panningInterval&&"autoset"!=e.ani?(w.vprint("snd","= = = = = START Panner Interval= = = = = CAMERA["+e.ani+"]              C  A  M  E  R  A           xyz: "+this.camx+","+this.camy+","+this.camz),Howler.pos(this.camx,this.camy,this.camz),n.panningInterval=window.setInterval(te,100)):w.vprint("snd","= = = X X skip Panner Interval, already there,  panO:"+Object.keys(n.panO)+" or bad id:"+e.ani);else if(e.playmode.match(/^on/))for(playmodeA=e.playmode.split(/,/),w.vprint("alert","= = = = = EVENT LISTENER MODE RETIRED  = = = : "+e.playmode+" : split:"+playmodeA.length+" for "+e.ani),ii=0;ii<playmodeA.length;ii++)myp=ne(e.ani),anelA=myp.el.querySelectorAll("animateTransform"),anmtA=myp.el.querySelectorAll("*[id^=anmt_]"),w.vprint("snd",vv?"":"on-event= = = = = found num animateTransform       A N I    T R A N S         :"+anelA.length+" num id anmt:"+anmtA.length),anelA.length>0?anel=anelA[0]:anmtA.length>0&&(anel=anmtA[0]),playmodeA[ii].match(/(mouse|click|focus)/)&&(anel=myp.el),anel.removeEventListener(n.eventMapO[playmodeA[ii]],ee),anel.addEventListener(n.eventMapO[playmodeA[ii]],ee.bind({mysound:n.plO[E].sndO[e.snd]}));else w.vprint("snd","= = = = = non-3d sound autoplay skip")}};var ee=function(e){console.log("i repeated:"+e.detail+" mysound:"+typeof this.mysound),this.mysound.play()};this.stdplay=function(e,t,l,o,a,r,i,s){var d,p,u,v,m;if(e&&e.getAttribute?(v=e.getAttribute("ddd"),e.getAttribute("ppp"),u=e.getAttribute("apl"),d=e.getAttribute("slot"),m=parseFloat(e.getAttribute("vol"))/10):w.vprint("warn","stdplay["+l+"]["+t+"] X X X have no el?"+typeof e),null!=l&&"null"!=l||(l=null!=u?u:E),w.vprint("snd","stdplay[apl:"+E+" myapl:"+l+" aaa:"+u+"]["+t+"] Tfrom:"+a+" to:"+r+" have apl?"+typeof n.plO[l]+" have sound?"+typeof n.plO[l].sndO[t]),null==n.plO[l].sndO[t]){w.vprint("warn","stdplay["+l+"]["+t+"] X X X NOT INITIALIZED  X X X! have el?"+typeof e);var f=Snap(e);if((d=K(f,"gnlv-slot-eloop"))&&(p=d.attr("gnlv-data"),mysvg=K(f,"gnlv-svg"),w.vprint("snd","snd["+t+"]  data:"+p),jsonO=w.parsejson(p),jsonO&&jsonO.transO&&jsonO.transO.sound)){if(mysvg&&mysvg.attr&&(l=mysvg.attr("id"),jsonO.transO.sound.pl=l,e.setAttribute("apl",l)),null==n.plO[l].sndO[t]){w.vprint("snd","snd["+l+"]["+t+"] NEW DATA  NEW DATA  NEW DATA,    -=> starting <=- "),n.start(jsonO.transO.sound);var c=a-.25;return c<0&&(c=0),void setTimeout(n.stdplay,250,e,t,l,o,c,r,i,s)}w.vprint("snd","snd["+l+"]["+t+"] is OK ")}}"loaded"!=n.plO[l].sndO[t].state()&&0==a?w.vprint("warn","stdplay["+l+"]["+t+"] X X X not loaded!"):n.plO[l].sndO[t].do3d?w.vprint("snd","stdplay["+l+"]["+t+"] is 3d, no action!"):(n.plO[l].sndO[t].stop(),n.playID[d]&&clearTimeout(n.playID[d]),n.lastSnd[d]!=t&&n.plO[l].sndO[n.lastSnd[d]]&&n.plO[l].sndO[n.lastSnd[d]].stop(),n.lastSnd[d]=t,n.playID[d]=window.setTimeout((function(e,o,a){w.vprint("snd","stdplay["+l+"]["+d+"]["+t+"]PLAY, fadein?"+e.match(/(FadeIn)/)+" playmode:"+e+" ddd:"+o+" cur vol:"+a),n.playID[d]=!1,E==l&&(n.plO[l].sndO[t].play(),e.match(/(FadeIn)/)&&n.plO[l].sndO[t].fade(0,a,1e3*o))}),1e3*a,o,v,m),r>0&&(n.endID[d]=window.setTimeout((function(){w.vprint("snd","stdplay["+l+"]["+t+"]STOP"),n.plO[l].sndO[t].stop()}),1e3*r),o.match(/(FadeInOut)/)&&(n.fadeID[d]=window.setTimeout((function(e,o,a){w.vprint("snd","stdplay["+l+"]["+t+"]FADE "+a+" dur:"+o),E==l&&n.plO[l].sndO[t].fade(a,0,1e3*o)}),1e3*(r-v),o,v,m))))};var ne=function(e){var t,l,o,a,r,i,s=200,d=0,p=200;return null==(t=document.getElementById(e))?w.vprint("warn","gnlvPosById["+e+"] not found!"):(l=t.getBoundingClientRect(),r=(o=n.fov*Math.PI/180)*l.height/n.winh,s=n.trueh/Math.tan(r),isNaN(s)&&(s=-1e3),a=o*n.aratio,curx=l.x+l.width/2-n.camxshift,i=w.d4(a*curx/n.winw),d=w.d4(s*Math.tan(i)),p=w.d4(l.y),w.vprint("snd",vv?"":"gnlvPosById key["+e+"] hasPan?"+n.panO[e]+" found el?"+typeof t+" x:"+parseInt(l.x)+" truex,y:"+d+","+p+" theta:"+r+" phi:"+i+" dist(z):"+parseInt(s))),{x:d,y:p,z:s,el:t}},te=function(){for(key in n.panO)myp=ne(key),n.panO[key].indexOf(".")>0?n.plO[E].sndO[n.panO[key.split(".")[0]]].pos(myp.x+.5,myp.y+.5,myp.z,key.split(".")[1]):n.plO[E].sndO[n.panO[key]].pos(myp.x+.5,myp.y+.5,myp.z),w.vprint("snd","gnlvPanner["+E+"]: ["+key+"] xy:"+myp.x+","+myp.y)};this.setupPan=function(e,t,l,o){var a;return sound=n.plO[E].sndO[e],a=null==o?sound.play():sound.play(o),w.vprint("snd","===setupPan=== set up panner on sound   -=["+e+"]=-   soundId   -=["+a+"]=- x:"+t+",y:"+l+" sprite?"+o),sound.once("play",function(){sound.pos(t+.5,l+.5,-.5,a),sound.volume(1,a),sound.pannerAttr({panningModel:"HRTF",refDistance:100,rolloffFactor:.5,distanceModel:"exponential"},a)}.bind(this),a),null==o?e:e+"."+o},this.init()};
  • genolve-toolkit/trunk/readme.txt

    r3283646 r3369385  
    22Contributors: genolve
    33Donate link: https://www.genolve.com/
    4 Tags: AI image, AI video, Midjourney, DALLE, podcast, ChatGPT, Sora, slider
     4Tags: AI image, AI video, Midjourney, DALLE, podcast, ChatGPT, Veo, slider
    55Requires at least: 5.0
    66Tested up to: 6.8
    7 Stable tag: 5.0.3
     7Stable tag: 5.0.4
    88Requires PHP: 5.2.4
    99License: GPLv2 or later
     
    1616 
    1717### All Your Favorite AI Image Models 
    18 If all you want are AI images, there is a special mode just for that. Use top **AI image generators like DALLE3, Stability.ai, Midjourney, Imagen, Minimax and Kling** all from one simple interface. Genolve's single interface saves registering and paying on multiple AI image sites and having to learn different interfaces. Refill credits at the same rate the vendor charges. If your AI prompt falls flat with one model, switch to a different model with one click.  Suggested prompts are automatically generated with ChatGPT.   Your images are only seen by you instead of posting on a public interface. Kling and Imagen have features specifically for making product shots. [more on AI images]( https://www.genolve.com/svg/en/prompt-tips-in-painting-dalle2-midjourney-stable-diffusion.php)
     18If all you want are AI images, there is a special mode just for that. Use top **AI image generators like DALLE3, Stability.ai, Midjourney, Imagen, Minimax and Luma** all from one simple interface. Genolve's single interface saves registering and paying on multiple AI image sites and having to learn different interfaces. Refill credits at the same rate the vendor charges. If your AI prompt falls flat with one model, switch to a different model with one click.  Suggested prompts are automatically generated with ChatGPT.   Your images are only seen by you instead of posting on a public interface. Kling and Imagen have features specifically for making product shots. [more on AI images]( https://www.genolve.com/svg/en/prompt-tips-in-painting-dalle2-midjourney-stable-diffusion.php)
    1919
    2020### AI Video Generators 
    21 Use top **AI video generators like Veo2, Hailuo or Kling**, more coming soon, for 5-10 second video clips. Combine these clips into a larger presentation with Genolve. Though pricey, Google's news-headlining Veo2 generates detailed realistic video at amazing speed. People are also raving about the realistic, consistent and affordable videos from Hailuo and Kling. OpenAI's  **Sora** has not yet been released for API access. [more on AI videos]( https://www.genolve.com/svg/en/ai-video-generator-with-genolve-ai-assisted-design.php)
     21Use top **AI video generators like Veo3, Midjourney, Hailuo or Luma**, more coming soon, for 5-10 second video clips. Genolve provides tools to combine these clips into polished presentations or longer videos. The **Viral video** workflow plans out a storyboard of pictures, actions and dialog that is then converted into a longer character-consistent video. The [Video from a phrase]( https://www.genolve.com/svg/en/ai-video-generator-with-genolve-ai-assisted-design.php) workflow uses a multi-media mix of text, images and video to present your message.  As with AI images, you can use any AI video generator directly for either text2video or image2video tasks. Note that OpenAI's  **Sora** has not yet been released for API access.
    2222
    2323### Generate Video for a Podcast or Music MP3 
     
    3030* **Text 2 Video** - Generate ready-to-go videos from a single phrase.
    3131* **Audio 2 Video** - Make an instant music video from an MP3 or make video backgrounds for a podcast simply by supplying the audio.
     32* **Image 2 Video** - Watch any image come to life as a video; old photos, sketches, anime all work.
    3233* **Image Generation** - Generate AI images from a prompt, use preset styles to refine it. ChatGPT automatically suggests a better prompt.
    33 * **Video Generation** - Generate AI videos from a prompt or magically bring a static photo to life.
     34* **Video Generation** - Generate AI videos from a prompt - multiple models available.
     35* **Music Generation** - Generate AI music from a prompt with Lyria, Stabilityai or Minimax. Use as background track or for a music video.
    3436* **Out Painting** - Easily expand the crop on AI generated images as well as your own images in the media library.
    3537* **In Painting** - Touch up any image using a brush to add new details or remove unwanted objects.
    3638* **Variations** - Get further variations on any AI generated image.
    37 * **Top LLMs** - Latest models like gemini-2.5-flash or o4-mini drive the AI-assisted design and are also at your fingertips to help create ads, product descriptions, proofread text or generate quotes.
     39* **Top LLMs** - Latest models like gemini-2.5-flash or gpt-5 drive the AI-assisted design and are also at your fingertips to help create ads, product descriptions, proofread text or generate quotes.
    3840* **Gutenberg Image** - Generate AI pictures right from the image block.
    3941* **Current models** - As soon as a new version is released it's added in.
     
    116118== Changelog ==
    117119
     120= 5.0.4 =
     121* ChatGPT-5 now default model to generate designs.
     122* Midjourney video generation.
     123* AI music from Lyria, Stabilityai and Minimax.
     124* New tool to quickly create viral videos.
     125
    118126= 5.0.3 =
    119127* Added AI video generation models Veo-2, Hailuo and Kling.
Note: See TracChangeset for help on using the changeset viewer.