@hpcc-js/other 3.5.8 → 3.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3546 -2
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +5 -2
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3547 @@
|
|
|
1
|
-
var t,e=Object.defineProperty,o=(t,o)=>e(t,"name",{value:o,configurable:!0});import{HTMLWidget as s,Utility as i,Palette as n,timeParse as r,format as a,select as l,map as c,extent as u,range as h,CanvasWidget as p,SVGWidget as d,Entity as g,d3Event as f,Widget as m,Platform as y,selectAll as _,PropertyExt as b,local as w}from"@hpcc-js/common";import{HorizontalList as x,VerticalList as v,Grid as C}from"@hpcc-js/layout";const S="@hpcc-js/other",R="3.5.8",I="3.24.0";var k,W,T=0,P=0,E=0,B=0,D=0,N=0,A="object"==typeof performance&&performance.now?performance:Date,O="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function H(){return D||(O(M),D=A.now()+N)}function M(){D=0}function j(){this._call=this._time=this._next=null}function L(t,e,o){var s=new j;return s.restart(t,e,o),s}function z(){H(),++T;for(var t,e=k;e;)(t=D-e._time)>=0&&e._call.call(null,t),e=e._next;--T}function F(){D=(B=A.now())+N,T=P=0;try{z()}finally{T=0,V(),D=0}}function U(){var t=A.now(),e=t-B;e>1e3&&(N-=e,B=t)}function V(){for(var t,e,o=k,s=1/0;o;)o._call?(s>o._time&&(s=o._time),t=o,o=o._next):(e=o._next,o._next=null,o=t?t._next=e:k=e);W=t,q(s)}function q(t){T||(P&&(P=clearTimeout(P)),t-D>24?(t<1/0&&(P=setTimeout(F,t-A.now()-N)),E&&(E=clearInterval(E))):(E||(B=A.now(),E=setInterval(U,1e3)),T=1,O(F)))}o(H,"now"),o(M,"clearNow"),o(j,"Timer"),j.prototype=L.prototype={constructor:j,restart:/* @__PURE__ */o(function(t,e,o){if("function"!=typeof t)throw new TypeError("callback is not a function");o=(null==o?H():+o)+(null==e?0:+e),this._next||W===this||(W?W._next=this:k=this,W=this),this._call=t,this._time=o,q()},"restart"),stop:/* @__PURE__ */o(function(){this._call&&(this._call=null,this._time=1/0,q())},"stop")},o(L,"timer"),o(z,"timerFlush"),o(F,"wake"),o(U,"poke"),o(V,"nap"),o(q,"sleep");const Y=class _Audio extends s{_sections;constructor(){super(),this._tag="audio",this._sections={}}section(t,e,o,s){return arguments.length?1===arguments.length?this._sections[t]:(this._sections[t]={label:t,offset:e,beatLength:o,beatCount:s,endOffset:e+s*o},this):this._sections}getType(t){switch(t){case"mp3":return"audio/mpeg; codecs='mp3'";case"ogg":return"audio/ogg; codecs='vorbis'"}return""}enter(t,e){const o=this;e.on("play",function(t){o.onPlay(t)})}update(t,e){e.selectAll("source").data(this.source(),function(t){return t}).enter().append("source").attr("src",function(t){return t})}createTimer(t,e,o){const s=this;L(function(){return s.onTick(t.label,o,t),!0},o*t.beatLength,e+t.offset)}onTick(t,e,o){}onPlay(t){const e=Date.now();for(const o in this._sections){const t=this._sections[o];for(let o=0;o<t.beatCount;++o)this.createTimer(t,e,o)}}play(t){const e=this;this._element.on("canplaythrough",function(t){e.node().play()}),this.node().load()}};o(Y,"Audio");let $=Y;function G(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}$.prototype._class+=" other_Audio",$.prototype.publish("source","","string","Audio Source"),o(G,"getDefaultExportFromCjs");var X,J={exports:{}};function Q(){return X||(X=1,t=J,e=/* @__PURE__ */function(){function t(t){if(document.querySelector){o(l,"hasClass"),o(c,"addEvent"),o(u,"removeEvent"),o(h,"live");var e={selector:0,source:0,minChars:3,delay:150,offsetLeft:0,offsetTop:1,cache:1,menuClass:"",renderItem:/* @__PURE__ */o(function(t,e){e=e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");var o=new RegExp("("+e.split(" ").join("|")+")","gi");return'<div class="autocomplete-suggestion" data-val="'+t+'">'+t.replace(o,"<b>$1</b>")+"</div>"},"renderItem"),onSelect:/* @__PURE__ */o(function(t,e,o){},"onSelect")};for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);for(var i="object"==typeof e.selector?[e.selector]:document.querySelectorAll(e.selector),n=0;n<i.length;n++){var r=i[n];r.sc=document.createElement("div"),r.sc.className="autocomplete-suggestions "+e.menuClass,r.autocompleteAttr=r.getAttribute("autocomplete"),r.setAttribute("autocomplete","off"),r.cache={},r.last_val="",r.updateSC=function(t,o){var s=r.getBoundingClientRect();if(r.sc.style.left=Math.round(s.left+(window.pageXOffset||document.documentElement.scrollLeft)+e.offsetLeft)+"px",r.sc.style.top=Math.round(s.bottom+(window.pageYOffset||document.documentElement.scrollTop)+e.offsetTop)+"px",r.sc.style.width=Math.round(s.right-s.left)+"px",!t&&(r.sc.style.display="block",r.sc.classList.remove("hide"),r.sc.maxHeight||(r.sc.maxHeight=parseInt((window.getComputedStyle?getComputedStyle(r.sc,null):r.sc.currentStyle).maxHeight)),r.sc.suggestionHeight||(r.sc.suggestionHeight=r.sc.querySelector(".autocomplete-suggestion").offsetHeight),r.sc.suggestionHeight))if(o){var i=r.sc.scrollTop,n=o.getBoundingClientRect().top-r.sc.getBoundingClientRect().top;n+r.sc.suggestionHeight-r.sc.maxHeight>0?r.sc.scrollTop=n+r.sc.suggestionHeight+i-r.sc.maxHeight:n<0&&(r.sc.scrollTop=n+i)}else r.sc.scrollTop=0},c(window,"resize",r.updateSC),document.body.appendChild(r.sc),h("autocomplete-suggestion","mouseleave",function(t){var e=r.sc.querySelector(".autocomplete-suggestion.selected");e&&setTimeout(function(){e.className=e.className.replace("selected","")},20)},r.sc),h("autocomplete-suggestion","mouseover",function(t){var e=r.sc.querySelector(".autocomplete-suggestion.selected");e&&(e.className=e.className.replace("selected","")),this.className+=" selected"},r.sc),h("autocomplete-suggestion","mousedown",function(t){if(l(this,"autocomplete-suggestion")){var o=this.getAttribute("data-val");r.value=o,e.onSelect(t,o,this),r.sc.style.display="none",r.sc.classList.add("hide")}},r.sc),r.blurHandler=function(){try{var t=document.querySelector(".autocomplete-suggestions:hover")}catch(e){t=0}t?r!==document.activeElement&&setTimeout(function(){r.focus()},20):(r.last_val=r.value,r.sc.style.display="none",r.sc.classList.add("hide"),setTimeout(function(){r.sc.style.display="none",r.sc.classList.add("hide")},350))},c(r,"blur",r.blurHandler);var a=/* @__PURE__ */o(function(t,o){if(o||(o=r.value),r.cache[o]=t,t.length&&o.length>=e.minChars){for(var s="",i=0;i<t.length;i++)s+=e.renderItem(t[i],o);r.sc.innerHTML=s,r.updateSC(0)}else r.sc.style.display="none",r.sc.classList.add("hide")},"suggest");r.keydownHandler=function(t){var o,s=window.event?t.keyCode:t.which;if((40==s||38==s)&&r.sc.innerHTML)return(i=r.sc.querySelector(".autocomplete-suggestion.selected"))?(o=40==s?i.nextSibling:i.previousSibling)?(i.className=i.className.replace("selected",""),o.className+=" selected",r.value=o.getAttribute("data-val")):(i.className=i.className.replace("selected",""),r.value=r.last_val,o=0):((o=40==s?r.sc.querySelector(".autocomplete-suggestion"):r.sc.childNodes[r.sc.childNodes.length-1]).className+=" selected",r.value=o.getAttribute("data-val")),r.updateSC(0,o),!1;if(27==s)r.value=r.last_val,r.sc.style.display="none",r.sc.classList.add("hide");else if(13==s||9==s){var i;"none"!==r.sc.style.display&&t.preventDefault(),(i=r.sc.querySelector(".autocomplete-suggestion.selected"))&&"none"!=r.sc.style.display&&(e.onSelect(t,i.getAttribute("data-val"),i),setTimeout(function(){r.sc.style.display="none",r.sc.classList.add("hide")},20))}},c(r,"keydown",r.keydownHandler),r.keyupHandler=function(t){var o=window.event?t.keyCode:t.which;if(!o||(o<35||o>40)&&13!=o&&27!=o){var s=r.value;if(s.length>=e.minChars){if(s!=r.last_val){if(r.last_val=s,clearTimeout(r.timer),e.cache){if(s in r.cache)return void a(r.cache[s]);for(var i=1;i<s.length-e.minChars;i++){var n=s.slice(0,s.length-i);if(n in r.cache&&!r.cache[n].length)return void a([])}}r.timer=setTimeout(function(){e.source(s,a)},e.delay)}}else r.last_val=s,r.sc.style.display="none",r.sc.classList.add("hide")}},c(r,"keyup",r.keyupHandler),r.focusHandler=function(t){r.last_val="\n",r.keyupHandler(t)},e.minChars||c(r,"focus",r.focusHandler)}this.destroy=function(){for(var t=0;t<i.length;t++){var e=i[t];u(window,"resize",e.updateSC),u(e,"blur",e.blurHandler),u(e,"focus",e.focusHandler),u(e,"keydown",e.keydownHandler),u(e,"keyup",e.keyupHandler),e.autocompleteAttr?e.setAttribute("autocomplete",e.autocompleteAttr):e.removeAttribute("autocomplete"),document.body.removeChild(e.sc),e=null}}}function l(t,e){return t.classList?t.classList.contains(e):new RegExp("\\b"+e+"\\b").test(t.className)}function c(t,e,o){t.attachEvent?t.attachEvent("on"+e,o):t.addEventListener(e,o)}function u(t,e,o){t.detachEvent?t.detachEvent("on"+e,o):t.removeEventListener(e,o)}function h(t,e,o,s){c(s||document,e,function(e){for(var s,i=e.target||e.srcElement;i&&!(s=l(i,t));)i=i.parentElement;s&&o.call(i,e)})}}return o(t,"autoComplete"),t}(),t.exports?t.exports=e:window.autoComplete=e),J.exports;var t,e}o(Q,"requireAutoComplete");const Z=/* @__PURE__ */G(Q()),K=class _AutoCompleteText extends s{_span;_prompt;_input;_prevMinCharsText;_autoComplete;constructor(){super(),this._tag="div"}autoCompleteTextData(){if(0===this.data().length)return[];return this._db.rollupView([this.textColumn(),this.valueColumn()]).entries().map(function(t,e){return{idx:e,text:t.key,value:t.values.length?t.values[0].key:"",origRow:t.values.length&&t.values[0].value.length?t.values[0].value[0]:[]}},this)}enter(t,e){super.enter(t,e),this._span=e.append("span"),this._prompt=this._span.append("label").attr("for",this.id()+"_input"),this._input=this._span.append("input").attr("id",this.id()+"_input").attr("name",this.id()+"_input_name").attr("type","text").attr("placeholder",this.placeholder())}update(t,e){if(super.update(t,e),this._prompt.text(this.label()),this._input.style("width",this.textboxWidth_exists()?this.textboxWidth()+"px":null),this._prevMinCharsText!==this.minCharsText()){this._prevMinCharsText=this.minCharsText(),this._autoComplete&&this._autoComplete.destroy();const t=this;this._autoComplete=new Z({selector:"#"+this.id()+"_input",minChars:this.minCharsText(),delay:150,offsetLeft:0,offsetTop:1,source:/* @__PURE__ */o((e,o)=>{const s=t._db.fieldByLabel(t.textColumn());if(s){e=e.toLowerCase();o(t.autoCompleteTextData().filter(function(t){return t.origRow[s.idx].toLowerCase().indexOf(e)>=0}).map(function(t){return{text:t.origRow[s.idx],rowIdx:t.idx}}))}},"source"),renderItem:/* @__PURE__ */o((t,e)=>{e=e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");const o=new RegExp("("+e.split(" ").join("|")+")","gi");return'<div class="autocomplete-suggestion" data-val="'+t.text+'" data-row-idx="'+t.rowIdx+'">'+t.text.replace(o,"<b>$1</b>")+"</div>"},"renderItem"),onSelect:/* @__PURE__ */o((e,o,s)=>{const i=+s.getAttribute("data-row-idx"),n=t.autoCompleteTextData()[i];t.click(t.rowToObj(n.origRow),t.valueColumn(),!0)},"onSelect")})}}exit(t,e){this._autoComplete&&this._autoComplete.destroy(),this._span.remove(),super.exit(t,e)}click(t,e,o){}};o(K,"AutoCompleteText");let tt=K;tt.prototype._class+=" other_AutoCompleteText",tt.prototype.publish("label","Label: ","string","Label for AutoCompleteText"),tt.prototype.publish("textboxWidth",null,"number","width of textbox",null,{optional:!0}),tt.prototype.publish("placeholder","Search...","string","Placeholder for AutoCompleteText"),tt.prototype.publish("valueColumn",null,"set","Select column for autocomplete",function(){return this.columns()},{optional:!0}),tt.prototype.publish("textColumn",null,"set","Select value(s)",function(){return this.columns()},{optional:!0}),tt.prototype.publish("minCharsText",1,"number","Size of multiAutoCompleteText box");var et=/* @__PURE__ */new Date,ot=/* @__PURE__ */new Date;function st(t,e,s,i){function n(e){return t(e=0===arguments.length?/* @__PURE__ */new Date:/* @__PURE__ */new Date(+e)),e}return o(n,"interval"),n.floor=function(e){return t(e=/* @__PURE__ */new Date(+e)),e},n.ceil=function(o){return t(o=new Date(o-1)),e(o,1),t(o),o},n.round=function(t){var e=n(t),o=n.ceil(t);return t-e<o-t?e:o},n.offset=function(t,o){return e(t=/* @__PURE__ */new Date(+t),null==o?1:Math.floor(o)),t},n.range=function(o,s,i){var r,a=[];if(o=n.ceil(o),i=null==i?1:Math.floor(i),!(o<s&&i>0))return a;do{a.push(r=/* @__PURE__ */new Date(+o)),e(o,i),t(o)}while(r<o&&o<s);return a},n.filter=function(o){return st(function(e){if(e>=e)for(;t(e),!o(e);)e.setTime(e-1)},function(t,s){if(t>=t)if(s<0)for(;++s<=0;)for(;e(t,-1),!o(t););else for(;--s>=0;)for(;e(t,1),!o(t););})},s&&(n.count=function(e,o){return et.setTime(+e),ot.setTime(+o),t(et),t(ot),Math.floor(s(et,ot))},n.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?n.filter(i?function(e){return i(e)%t===0}:function(e){return n.count(0,e)%t===0}):n:null}),n}o(st,"newInterval");var it=st(function(t){t.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+e)},function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5},function(t){return t.getDate()-1}).range;function nt(t){return st(function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+7*e)},function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5})}o(nt,"weekday");var rt=nt(0),at=nt(1),lt=nt(2),ct=nt(3),ut=nt(4),ht=nt(5),pt=nt(6);rt.range,at.range,lt.range,ct.range,ut.range,ht.range,pt.range;var dt=st(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,e){t.setMonth(t.getMonth()+e)},function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())},function(t){return t.getMonth()}).range,gt=st(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t,e){return e.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});gt.every=function(t){return isFinite(t=Math.floor(t))&&t>0?st(function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,o){e.setFullYear(e.getFullYear()+o*t)}):null},gt.range;const ft=class _CalendarHeatMap extends s{_prevDateColumn;_prevAggrType;_prevAggrColumn;_prevAggrDeltaColumn;_view;_parentNode;constructor(){super(),i.SimpleSelectionMixin.call(this)}calendarData(){if(0===this.fields().length||0===this.data().length)return[];const t=r(this.datePattern()),e=this.aggrDeltaColumn()?a(".1%"):a("s");return this._prevDateColumn===this.dateColumn()&&this._prevAggrType===this.aggrType()&&this._prevAggrColumn===this.aggrColumn()&&this._prevAggrDeltaColumn===this.aggrDeltaColumn()||(this._prevDateColumn=this.dateColumn(),this._prevAggrType=this.aggrType(),this._prevAggrColumn=this.aggrColumn(),this._prevAggrDeltaColumn=this.aggrDeltaColumn(),this._view=this._db.aggregateView([this.dateColumn()],this.aggrType(),this.aggrColumn(),this.aggrDeltaColumn())),this._view.entries().map(function(o){return o.dateKey=t(o.key),o.formattedValues=e(o.value.aggregate),o.origRows=o.value,o})}calcDelta(t){return(t.Close-t.Open)/t.Open}enter(t,e){super.enter(t,e),l(t.parentNode).style("overflow-y","scroll").style("overflow-x","hidden").style("height","100%").style("width","100%"),this._selection.widgetElement(e)}update(t,e){super.update(t,e),this._palette=this._palette.switch(this.paletteID());const s=this.width(),i=s/12/5,n=8*i,r=this.calendarData(),a=c(r,function(t){return t.dateKey}),p=u(r,function(t){return t.dateKey.getFullYear()}),d=this,g=e.selectAll("svg").data(h(+p[0],+p[1]+1)),f=g.enter().append("svg").each(function(t){const e=l(this).append("g");e.append("text").style("text-anchor","middle"),e.append("g").attr("class","days");const o=dt(new Date(t,0,1),new Date(t+1,0,1)),s=e.append("g").attr("class","months");o.forEach(function(t){s.append("path").attr("class","month").attr("d",w(t)).style("stroke",d.monthStrokeColor()).style("stroke-width",d.monthStrokeWidth())})}).merge(g).attr("width",s).attr("height",n);f.select("g").attr("transform","translate("+(s-53*i)/2+","+(n-7*i-1)+")"),f.select("text").attr("transform","translate(-6,"+3.5*i+")rotate(-90)").text(t=>t),g.exit().remove();let m=u(r,function(t){return t.value.aggregate});if(this.aggrDeltaColumn()){const t=Math.max(Math.abs(+m[0]),Math.abs(+m[1]));m=[-t,t]}const y=f.select(".days").selectAll(".day").data(function(t){return it(new Date(t,0,1),new Date(t+1,0,1))}),_=y.enter().append("rect").attr("class","day").call(this._selection.enter.bind(this._selection)).on("click",function(t){const e=a.get(t);e&&e.value&&e.value&&e.value.length&&d.click(d.rowToObj(e.value[0]),d.dateColumn(),d._selection.selected(this))}).on("dblclick",function(t){const e=a.get(t);e&&e.value&&e.value&&e.value.length&&d.dblclick(d.rowToObj(e.value[0]),d.dateColumn(),d._selection.selected(this))}).each(function(t){l(this).append("title")}).merge(y).attr("x",function(t){return rt.count(gt(t),t)*i}).attr("y",function(t){return t.getDay()*i}).attr("width",i).attr("height",i).style("stroke",this.dayStrokeColor()).style("stroke-width",this.dayStrokeWidth()).style("fill",null);_.select("title").text(t=>t),_.filter(function(t){return a.has(t)}).style("fill",function(t){const e=a.get(t);return e&&e.value&&e.value.aggregate?d._palette(e.value.aggregate,m[0],m[1]):null}).select("title").text(function(t){const e=a.get(t);return e.key+": "+e.formattedValues}),y.exit().remove();const b=g.select(".months").selectAll(".month").data(function(t){return dt(new Date(t,0,1),new Date(t+1,0,1))});function w(t){const e=new Date(t.getFullYear(),t.getMonth()+1,0),o=t.getDay(),s=rt.count(gt(t),t),n=e.getDay(),r=rt.count(gt(e),e);return"M"+(s+1)*i+","+o*i+"H"+s*i+"V"+7*i+"H"+r*i+"V"+(n+1)*i+"H"+(r+1)*i+"V0H"+(s+1)*i+"Z"}b.enter().append("path").attr("class","month").merge(b).attr("d",w).style("stroke",this.monthStrokeColor()).style("stroke-width",this.monthStrokeWidth()),b.exit().remove(),o(w,"calcMonthPath")}exit(t,e){super.exit(t,e)}click(t,e,o){}dblclick(t,e,o){}};o(ft,"CalendarHeatMap");let mt=ft;mt.prototype._class+=" other_CalendarHeatMap",mt.prototype.mixin(i.SimpleSelectionMixin),mt.prototype._palette=n.rainbow("default"),mt.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",mt.prototype._palette.switch(),{tags:["Basic","Shared"]}),mt.prototype.publish("dayStrokeColor","#ccc","html-color","Color of day border"),mt.prototype.publish("monthStrokeColor","#000","html-color","Color of month border"),mt.prototype.publish("dayStrokeWidth",1,"number","Pixel width of day border"),mt.prototype.publish("monthStrokeWidth",2,"number","Pixel width of month border"),mt.prototype.publish("dateColumn",null,"set","Date Column",function(){return this.columns()},{optional:!0}),mt.prototype.publish("datePattern","%Y-%m-%d","string","Date Pattern"),mt.prototype.publish("aggrType",null,"set","Aggregation Type",[null,"mean","median","sum","min","max"],{optional:!0}),mt.prototype.publish("aggrColumn",null,"set","Aggregation Field",function(){return this.columns()},{optional:!0,disable:/* @__PURE__ */o(t=>!t.aggrType(),"disable")}),mt.prototype.publish("aggrDeltaColumn",null,"set","Aggregation Field",function(){return this.columns()},{optional:!0,disable:/* @__PURE__ */o(t=>!t.aggrType(),"disable")});function yt(t){if(null==t)return null;if(!t.trim)return t.Row?_t(t.Row):t;const e=t.trim();return""!==e&&!isNaN(e)&&(e.length<=1||"0"!==e[0]||"."===e[1])?Number(e):e}function _t(t){for(const e in t)t[e]=yt(t[e]);return t}o(yt,"espValFix"),o(_t,"espRowFix");const bt=class _ESPUrl{_protocol="http:";_hostname="localhost";_url;_port;_search;_pathname;_params;_hash;_host;constructor(){}url(t){if(!arguments.length)return this._url;this._url=t;const e=document.createElement("a");e.href=this._url;const o={};if(e.search.length){let t=e.search;"?"===t[0]&&(t=t.substring(1)),t=t.split("&"),t.map(function(t){const e=t.split("=");o[decodeURIComponent(e[0])]=decodeURIComponent(e[1])})}for(this._protocol=e.protocol,this._hostname=e.hostname,this._port=e.port,this._pathname=e.pathname;this._pathname.length&&"/"===this._pathname[0];)this._pathname=this._pathname.substring(1);return this._search=e.search,this._params=o,this._hash=e.hash,this._host=e.host,this}protocol(t){return arguments.length?(this._protocol=t,this):this._protocol}hostname(t){return arguments.length?(this._hostname=t,this):this._hostname}port(t){return arguments.length?(this._port=t,this):this._port}search(t){return arguments.length?(this._search=t,this):this._search}pathname(t){return arguments.length?(this._pathname=t,this):this._pathname}hash(t){return arguments.length?(this._hash=t,this):this._hash}host(t){return arguments.length?(this._host=t,this):this._host}params(t){return arguments.length?(this._params=t,this):this._params}param(t){return this._params[t]}isWsWorkunits(){return this._pathname.toLowerCase().indexOf("wsworkunits")>=0||this._params.Wuid}isWorkunitResult(){return this.isWsWorkunits()&&(this._params.Sequence||this._params.ResultName)}isWsEcl(){return this._pathname.toLowerCase().indexOf("wsecl")>=0||this._params.QuerySetId&&this._params.Id}isWsWorkunits_GetStats(){return this._pathname.toLowerCase().indexOf("wsworkunits/wugetstats")>=0&&this._params.WUID}getUrl(t){return(void 0!==(t=t||{}).protocol?t.protocol:this._protocol)+"//"+(void 0!==t.hostname?t.hostname:this._hostname)+":"+(void 0!==t.port?t.port:this._port)+"/"+(void 0!==t.pathname?t.pathname:this._pathname)}};o(bt,"ESPUrl");let wt=bt;function xt(t){this._mappings=t,this._reverseMappings={};for(const e in this._mappings){this._reverseMappings[e]={};for(const t in this._mappings[e])this._reverseMappings[e][this._mappings[e][t]]=t}}o(xt,"ESPMappings"),xt.prototype.contains=function(t,e){return i.exists(t+"."+e,this._mappings)},xt.prototype.mapResult=function(t,e){const o=this._mappings[e];o&&(t[e]=t[e].map(function(t){let e=[];if(o.x&&o.x instanceof Array){e=[];for(let s=0;s<o.x.length;++s)e.push(t[o.y[s]])}else for(const s in o)"label"===o[s]?e[0]=t[s]:"weight"===o[s]&&(e[1]=t[s]);return e},this))},xt.prototype.mapResponse=function(t){for(const e in t)this.mapResult(t,e)};const vt=/* @__PURE__ */o(function(t){const e=[];for(const o in t)if(t.hasOwnProperty(o)){const s=t[o];null!=s&&e.push(encodeURIComponent(o)+"="+encodeURIComponent(s))}return e.join("&")},"serialize$1");let Ct=/* @__PURE__ */o(function(t,e,s){return new Promise(function(i,n){let r=1e3*s;const a="jsonp_callback_"+Math.round(999999*Math.random());window[a]=function(t){r=0,u(),i(t)};const l=document.createElement("script");l.src=t+(t.indexOf("?")>=0?"&":"?")+"jsonp="+a+"&"+vt(e),document.body.appendChild(l);const c=setInterval(function(){r<=0?clearInterval(c):(r-=5e3,r<=0&&(clearInterval(c),u(),n(Error("Request timeout: "+l.src))))},5e3);function u(){delete window[a],document.body.removeChild(l)}o(u,"doCallback")})},"jsonp");const St=class _Comms extends wt{_proxyMappings;_mappings;_timeout;_hipieResults;_hipieResultsLength;constructor(){super(),this._proxyMappings={},this._mappings=new xt({}),this._timeout=60,this._hipieResults={}}hipieResults(t){if(!arguments.length)return this._hipieResults;this._hipieResultsLength=0,this._hipieResults={};const e=this;return t.forEach(function(t){e._hipieResultsLength++,e._hipieResults[t.id]=t}),this}jsonp(t,e){for(const o in this._proxyMappings){const s=t.split(o),i=s[0];if(s.length>1){const n=(new wt).url(t);t=i+this._proxyMappings[o],e.IP=n.hostname(),e.PORT=n.port(),s.length>0&&(e.PATH=s[1]);break}}return Ct(t,e,this.timeout())}ajax(t,e,o){return new Promise(function(s,i){let n=e;"GET"===t&&o&&(n+="?"+vt(o));const r=new XMLHttpRequest;r.onload=function(t){this.status>=200&&this.status<300?s(JSON.parse(this.response)):i(Error(this.statusText))},r.onerror=function(){i(Error(this.statusText))},r.open(t,n),r.setRequestHeader("X-Requested-With","XMLHttpRequest"),"GET"===t?r.send():(r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.send(vt(o)))})}get(t,e){return this.ajax("GET",t,e)}post(t,e){return this.ajax("POST",t,e)}mappings(t){return arguments.length?(this._mappings=new xt(t),this):this._mappings}proxyMappings(t){return arguments.length?(this._proxyMappings=t,this):this._proxyMappings}timeout(t){return arguments.length?(this._timeout=t||60,this):this._timeout}};o(St,"Comms");let Rt=St;const It=class _Basic extends Rt{_cacheCalls;constructor(){super()}cacheCalls(t){return arguments.length?(this._cacheCalls=t,this):this._cacheCalls}call(t,e){const o=this._url+(this._url.indexOf("?")>=0?"&":"?")+vt(t);if(this._cacheCalls){const t=this;return new Promise(function(t,s){const i=JSON.parse(localStorage.getItem("hpcc.viz."+o));if(!i)throw Error("not cached");e&&(console.error("Deprecated: callback, use promise (Basic.prototype.call)"),e(i)),t(i)}).catch(function(s){return t.get(o).then(function(t){return localStorage.setItem("hpcc.viz."+o,JSON.stringify(t)),e&&(console.error("Deprecated: callback, use promise (Basic.prototype.call)"),e(t)),t})})}return localStorage.removeItem("hpcc.viz."+o),this.get(o).then(function(t){return e&&(console.error("Deprecated: callback, use promise (Basic.prototype.call)"),e(t)),t})}};o(It,"Basic");let kt=It;function Wt(t){for(const e in t){if(t[e].Row&&t[e].Row instanceof Array)return t;let o;if("string"!=typeof t[e]&&(o=Wt(t[e])),o)return o}return null}function Tt(t){for(const e in t){if(t[e].Exception&&t[e].Exception instanceof Array)return t[e];const o=Tt(t[e]);if(o)return o}return null}o(Wt,"locateRoxieResponse$1"),o(Tt,"locateRoxieException");const Pt=class _WsECL extends Rt{_target;_query;constructor(){super(),this._port="8002",this._target="",this._query=""}url(t){const e=super.url.apply(this,arguments);if(arguments.length){this._port="8010"===this._port?"8002":this._port;for(const o in this._params)switch(o){case"QuerySetId":this.target(this._params[o]);break;case"Id":this.query(this._params[o])}let t,e;this._target&&this._query||(t=this._pathname.split("/query/"),t.length>=2&&(e=t[1].split("/"),e.length>=2&&(this.target(e[0]),this.query(e[1]))))}return e}target(t){return arguments.length?(this._target=t,this):this._target}query(t){return arguments.length?(this._query=t,this):this._query}constructUrl(){return Rt.prototype.getUrl.call(this,{pathname:"WsEcl/submit/query/"+this._target+"/"+this._query+"/json"})}call(t,e,o){(t=t||{}).target=t.target||this._target,t.query=t.query||this._query;const s=this,i=this.getUrl({pathname:"WsEcl/submit/query/"+t.target+"/"+t.query+"/json"});return this.jsonp(i,e).then(function(t){let e=Wt(t);if(e||(e=Tt(t)),(t=e).Exception)throw Error(t.Exception.reduce(function(t,e,o,s){return t.length&&(t+="\n"),t+e.Source+" "+e.Code+": "+e.Message},""));for(const o in t)t[o].Row&&(t[o]=t[o].Row.map(_t));return s._mappings.mapResponse(t),o&&(console.error("Deprecated: callback, use promise (WsECL.prototype.call)"),o(t)),t})}send(t,e){return this.call({target:this._target,query:this._query},t,e)}};o(Pt,"WsECL");let Et=Pt,Bt=(o(t=class extends Rt{_wuid="";_jobname="";_sequence=null;_resultName=null;_fetchResultNamesPromise=null;_fetchResultPromise={};_resultNameCache={};_resultNameCacheCount=0;_total;constructor(){super(),this._port="8010"}url(t){const e=Rt.prototype.url.apply(this,arguments);if(arguments.length){for(const t in this._params)switch(t){case"Wuid":this.wuid(this._params[t]);break;case"ResultName":this.resultName(this._params[t]);break;case"Sequence":this.sequence(this._params[t])}if(!this._wuid){const t=this._url.split("/res/");if(t.length>=2){const e=t[1].split("/");this.wuid(e[0])}}}return e}wuid(t){return arguments.length?(this._wuid=t,this):this._wuid}jobname(t){return arguments.length?(this._jobname=t,this):this._jobname}sequence(t){return arguments.length?(this._sequence=t,this):this._sequence}resultName(t){return arguments.length?(this._resultName=t,this):this._resultName}appendParam(t,e,o){return e?(o&&(o+="&"),o+t+"="+e):o}constructUrl(){const t=Rt.prototype.getUrl.call(this,{pathname:"WsWorkunits/res/"+this._wuid+"/"});let e="";return e=this.appendParam("ResultName",this._resultName,e),t+(e?"?"+e:"")}_fetchResult(t,e,o){if(t=t||{},!this._fetchResultPromise[t.resultname]){t._start=t._start||0,t._count=t._count||-1;const s=this.getUrl({pathname:"WsWorkunits/WUResult.json"}),i={Wuid:t.wuid,ResultName:t.resultname,SuppressXmlSchema:!0,Start:t._start,Count:t._count};this._resultNameCache[t.resultname]={};const n=this;this._fetchResultPromise[t.resultname]=this.jsonp(s,i).then(function(s){for(const t in s){if(!s[t].Result)throw new Error("No result found.");n._total=s[t].Total,s=s[t].Result;for(const t in s){s=s[t].Row.map(_t);break}break}return n._resultNameCache[t.resultname]=s,o||n._mappings.mapResult(n._resultNameCache,t.resultname),e&&(console.error("Deprecated: callback, use promise (WsWorkunits.prototype._fetchResult)"),e(n._resultNameCache[t.resultname])),n._resultNameCache[t.resultname]})}return this._fetchResultPromise[t.resultname]}fetchResult(t,e,o){if(t.wuid)return this._fetchResult(t,e,o);if(t.jobname){const s=this;return this.WUQuery(t,function(i){return t.wuid=i[0].Wuid,s._fetchResult(t,e,o)})}}WUQuery(t,e){const o=this.getUrl({pathname:"WsWorkunits/WUQuery.json"}),s={Jobname:t.jobname,Count:1};return this._resultNameCache={},this._resultNameCacheCount=0,this.jsonp(o,s).then(function(t){if(!i.exists("WUQueryResponse.Workunits.ECLWorkunit",t))throw Error("No workunit found.");return t=t.WUQueryResponse.Workunits.ECLWorkunit,e&&(console.error("Deprecated: callback, use promise (WsWorkunits.prototype.WUQuery)"),e(t)),t})}fetchResultNames(t){if(!this._fetchResultNamesPromise){const e=this.getUrl({pathname:"WsWorkunits/WUInfo.json"}),o={Wuid:this._wuid,TruncateEclTo64k:!0,IncludeExceptions:!1,IncludeGraphs:!1,IncludeSourceFiles:!1,IncludeResults:!0,IncludeResultsViewNames:!1,IncludeVariables:!1,IncludeTimers:!1,IncludeResourceURLs:!1,IncludeDebugValues:!1,IncludeApplicationValues:!1,IncludeWorkflows:!1,IncludeXmlSchemas:!1,SuppressResultSchemas:!0};this._resultNameCache={},this._resultNameCacheCount=0;const s=this;this._fetchResultNamesPromise=this.jsonp(e,o).then(function(n){return i.exists("WUInfoResponse.Workunit.Archived",n)&&n.WUInfoResponse.Workunit.Archived&&console.warn("WU is archived: "+e+" "+JSON.stringify(o)),i.exists("WUInfoResponse.Workunit.Results.ECLResult",n)&&n.WUInfoResponse.Workunit.Results.ECLResult.map(function(t){s._resultNameCache[t.Name]=[],++s._resultNameCacheCount}),t&&(console.error("Deprecated: callback, use promise (WsWorkunits.prototype.fetchResultNames)"),t(s._resultNameCache)),s._resultNameCache})}return this._fetchResultNamesPromise}fetchResults(t,e){const o=this;return this.fetchResultNames().then(function(s){const i=[];for(const t in o._resultNameCache)i.push(o.fetchResult({wuid:o._wuid,resultname:t},null,e));return Promise.all(i).then(function(e){return t&&(console.error("Deprecated: callback, use promise (WsWorkunits.prototype.fetchResults)"),t(o._resultNameCache)),o._resultNameCache})})}postFilter(t,e){const o={};for(const s in e)o[s]=e[s].filter(function(e,o){for(const s in t)if(void 0!==e[s]&&void 0!==t[s]&&e[s]!=t[s])return!1;return!0});return this._mappings.mapResponse(o),o}send(t,e){const o=this;this._resultNameCacheCount?e(o.postFilter(t,this._resultNameCache)):this.fetchResults(function(s){e(o.postFilter(t,s))},!0)}},"WsWorkunits"),t);function Dt(){Rt.call(this),this._port="8010",this._wuid=null}function Nt(){Rt.call(this)}function At(){Bt.call(this)}function Ot(){At.call(this)}function Ht(t){t=t||document.URL;const e=(new wt).url(t);return e.isWsWorkunits_GetStats()?(new Dt).url(t):e.isWsWorkunits()?(new Bt).url(t):e.isWsEcl()?(new Et).url(t):null}function Mt(t){Ct=t}o(Dt,"WsWorkunits_GetStats"),Dt.prototype=Object.create(Rt.prototype),Dt.prototype.url=function(t){const e=Rt.prototype.url.apply(this,arguments);if(arguments.length)for(const o in this._params)if("WUID"===o)this.wuid(this._params[o]);return e},Dt.prototype.wuid=function(t){return arguments.length?(this._wuid=t,this):this._wuid},Dt.prototype.constructUrl=function(){return Rt.prototype.getUrl.call(this,{pathname:"WsWorkunits/WUGetStats?WUID="+this._wuid})},Dt.prototype.send=function(t,e){const o=this.getUrl({pathname:"WsWorkunits/WUGetStats.json?WUID="+this._wuid});return this.jsonp(o,t).then(function(t){return i.exists("WUGetStatsResponse.Statistics.WUStatisticItem",t)?(e&&(console.error("Deprecated: callback, use promise (WsWorkunits_GetStats.prototype.send)"),e(t.WUGetStatsResponse.Statistics.WUStatisticItem)),t.WUGetStatsResponse.Statistics.WUStatisticItem):(e&&(console.error("Deprecated: callback, use promise (WsWorkunits_GetStats.prototype.send)"),e([])),[])})},o(Nt,"HIPIERoxie"),Nt.prototype=Object.create(Rt.prototype),Nt.prototype.fetchResults=function(t,e){const o=this.getUrl({});this._resultNameCache={},this._resultNameCacheCount=0;const s=this;return this.jsonp(o,t).then(function(t){let o=Wt(t);if(o||(o=Tt(t)),(t=o).Exception)throw Error(t.Exception.reduce(function(t,e,o,s){return t.length&&(t+="\n"),t+e.Source+" "+e.Code+": "+e.Message},""));for(const e in t)t[e].Row&&(s._resultNameCache[e]=t[e].Row.map(_t),++s._resultNameCacheCount);return e&&(console.error("Deprecated: callback, use promise (HIPIERoxie.prototype.fetchResults)"),e(s._resultNameCache)),s._resultNameCache})},Nt.prototype.fetchResult=function(t,e){const o=this;return new Promise(function(s,i){e&&(console.error("Deprecated: callback, use promise (HIPIERoxie.prototype.fetchResult)"),e(o._resultNameCache[t])),s(o._resultNameCache[t])})},Nt.prototype.call=function(t,e){const o=this;return this.fetchResults(t,e).then(function(t){const e={};for(const s in o._hipieResults){const i=o._hipieResults[s];e[i.id]=t[i.from]}return e})},o(At,"HIPIEWorkunit"),At.prototype=Object.create(Bt.prototype),At.prototype.fetchResults=function(t){const e=this;return Bt.prototype.fetchResultNames.call(this).then(function(o){const s=[];for(const t in e._hipieResults){const o=e._hipieResults[t];s.push(e.fetchResult(o.from))}return Promise.all(s).then(function(o){return t&&(console.error("Deprecated: callback, use promise (HIPIEWorkunit.prototype.fetchResults)"),t(e._resultNameCache)),e._resultNameCache})})},At.prototype.fetchResult=function(t,e){return Bt.prototype.fetchResult.call(this,{wuid:this._wuid,resultname:t}).then(function(t){return e&&(console.error("Deprecated: callback, use promise (HIPIEWorkunit.prototype.fetchResult)"),e(t)),t})},At.prototype.call=function(t,e){const o=this;return!t.refresh&&this._resultNameCache&&this._resultNameCacheCount?new Promise(function(e,o){e(s(t))}):this.fetchResults(e).then(function(e){return s(t)});function s(t){const e={};for(const o in t)void 0!==t[o+"_changed"]&&(e[o]={value:t[o]});const s={};for(const i in o._hipieResults){const t=o._hipieResults[i],n={};for(let o=0;o<t.filters.length;++o){const s=t.filters[o];s.isRange()||(n[s.fieldid]=e[s.fieldid]||{value:void 0},n[s.fieldid].filter=s)}s[t.id]=o._resultNameCache[t.from].filter(function(t){for(const e in n)if(!n[e].filter.matches(t,n[e].value))return!1;return!0})}return s}},o(Ot,"HIPIEDatabomb"),Ot.prototype=Object.create(At.prototype),Ot.prototype.databomb=function(t){return arguments.length?(this._databomb=t,this):this._databomb},Ot.prototype.databombOutput=function(t,e){if(arguments.length)return this._resultNameCacheCount++,this._databomb instanceof Array?this._resultNameCache[t]=this._databomb.map(_t):this._resultNameCache[t]=this._databomb[t].map(_t),this},Ot.prototype.fetchResults=function(t){const e=this;return new Promise(function(o,s){t&&(console.error("Deprecated: callback, use promise (HIPIEDatabomb.prototype.fetchResults)"),t(e._resultNameCache)),o(e._resultNameCache)})},o(Ht,"createESPConnection"),o(Mt,"hookJsonp");const jt=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,Basic:kt,Comms:Rt,ESPMappings:xt,ESPUrl:wt,HIPIEDatabomb:Ot,HIPIERoxie:Nt,HIPIEWorkunit:At,WsECL:Et,WsWorkunits:Bt,createESPConnection:Ht,hookJsonp:Mt},Symbol.toStringTag,{value:"Module"}));function Lt(t){if(t.Row&&t.Row instanceof Array)return t.Row.map(Lt);if(t instanceof Object)for(const e in t)t[e]=Lt(t[e]);return t}o(Lt,"nestedRowFix");let zt=!1,Ft={};function Ut(){kt.call(this)}function Vt(t){Ut.call(this),this.url(t+"WsWorkunits/")}function qt(t,e){Ut.call(this),this.url(t+"WsWorkunits/"),this._wuid=e}function Yt(t,e,o){Ut.call(this),this.url(t+"WUResult.json"),this._wuid=e,this._name=o,this._xmlSchema=null}function $t(t,e){Ut.call(this),this.url(t+"WUResult.json"),this._logicalName=e,this._xmlSchema=null}function Gt(t,e){Ut.call(this);const o=t.split("/");let s=o.pop();"json"===s.toLowerCase()&&(s=o.pop()),this._queryName=s,this._resultName=e,this.url(o.join("/")+"/"+s+"/json")}function Xt(t){return t&&t.replace?t.replace(/ +$/,""):t}function Jt(t,e){return t.filter(function(t){for(const o in e)if(void 0!==t[o]&&Xt(e[o])!==Xt(t[o]))return!1;return!0})}function Qt(t){for(const e in t){if(t[e].Row&&t[e].Row instanceof Array)return t;const o=Qt(t[e]);if(o)return o}return null}function Zt(t,e,o){const s=(new wt).url(t);return 0===e.indexOf("http")?new Gt(e,o):0===e.indexOf("~")||e.indexOf("::")>=0?new $t(s.getUrl({pathname:"WsWorkunits/"}),e):e?new Yt(s.getUrl({pathname:"WsWorkunits/"}),e,o):null}function Kt(t){if(!arguments.length)return zt;zt=t,t||(Ft={})}function te(t){if(!arguments.length)return Ft;Ft=t}function ee(t){t=t||document.URL;if((new wt).url(t).isWsWorkunits()){const e=Ht(t);if(e instanceof Bt&&e.wuid())return new qt(e.getUrl({pathname:""}),e.wuid()).url(t)}return null}function oe(t,e){const o={columns:[],data:[]};if(t&&t.length){const s={};if(e&&e.length)e.forEach(function(t){s[t.value.toLowerCase()]=o.columns.length,o.columns.push(t.key)});else for(const e in t[0])s[e.toLowerCase()]=o.columns.length,o.columns.push(e);t.forEach(function(t,e){const i=[];for(const o in t)void 0!==s[o.toLowerCase()]&&(i[s[o.toLowerCase()]]=t[o]);o.data.push(i)})}return o}o(Ut,"BasicComms"),Ut.prototype=Object.create(kt.prototype),Ut.prototype.jsonp=function(t,e){const o=JSON.stringify(e);return zt&&Ft[t]&&Ft[t][o]?Promise.resolve(Ft[t][o]):kt.prototype.jsonp.apply(this,arguments).then(function(e){return zt&&(Ft[t]||(Ft[t]={}),Ft[t][o]=e),e})},o(Vt,"WsWorkunits"),Vt.prototype=Object.create(Ut.prototype),Vt.prototype.wuQuery=function(t){const e=this.getUrl({pathname:"WsWorkunits/WUQuery.json"}),o={Wuid:"",Type:"",Cluster:"",RoxieCluster:"",Owner:"",State:"",StartDate:"",EndDate:"",ECL:"",Jobname:"",LogicalFile:"",LogicalFileSearchType:"",After:"",Before:"",Count:"",PageSize:100,PageStartFrom:0,PageEndAt:"",LastNDays:"",Sortby:"",Descending:0,CacheHint:""};for(const s in t)o[s]=t[s];return this.jsonp(e,o).then(function(t){return t.WUQueryResponse&&t.WUQueryResponse.Workunits?t.WUQueryResponse.Workunits.ECLWorkunit:[]})},o(qt,"Workunit"),qt.prototype=Object.create(Ut.prototype),qt.prototype.wuInfo=function(t){const e=this.getUrl({pathname:"WsWorkunits/WUInfo.json"}),o={Wuid:this._wuid,TruncateEclTo64k:!0,IncludeExceptions:!1,IncludeGraphs:!1,IncludeSourceFiles:!1,IncludeResults:!1,IncludeResultsViewNames:!1,IncludeVariables:!1,IncludeTimers:!1,IncludeResourceURLs:!1,IncludeDebugValues:!1,IncludeApplicationValues:!1,IncludeWorkflows:!1,IncludeXmlSchemas:!1,SuppressResultSchemas:!0};for(const s in t)o[s]=t[s];return this.jsonp(e,o).then(function(s){if(zt){const i={WUInfoResponse:{Workunit:{}}};for(const e in t){const t=e.substring(7);i.WUInfoResponse.Workunit[t]=s.WUInfoResponse.Workunit[t]}Ft[e][JSON.stringify(o)]=i}return s})},qt.prototype.wuUpdate=function(t){const e=this.getUrl({pathname:"WsWorkunits/WUUpdate.json"}),o={Wuid:this._wuid};for(const s in t)o[s]=t[s];return this.post(e,o)},qt.prototype.appData=function(t,e,o){return 2===arguments.length?this.wuInfo({IncludeApplicationValues:!0}).then(function(o){let s;return o.WUInfoResponse&&o.WUInfoResponse.Workunit&&o.WUInfoResponse.Workunit.ApplicationValues&&o.WUInfoResponse.Workunit.ApplicationValues.ApplicationValue&&o.WUInfoResponse.Workunit.ApplicationValues.ApplicationValue.filter(function(o){return o.Application===t&&o.Name===e}).forEach(function(t){s=t.Value}),s}):3===arguments.length?this.wuUpdate({"ApplicationValues.ApplicationValue.0.Application":t,"ApplicationValues.ApplicationValue.0.Name":e,"ApplicationValues.ApplicationValue.0.Value":o,"ApplicationValues.ApplicationValue.itemcount":1}):void 0},qt.prototype.results=function(){const t=this;return this.wuInfo({IncludeResults:!0}).then(function(e){let o=[];return i.exists("WUInfoResponse.Workunit.Results.ECLResult",e)&&(o=e.WUInfoResponse.Workunit.Results.ECLResult.map(function(e){return new Yt(t.getUrl({pathname:"WsWorkunits/"}),t._wuid,e.Name)})),o})},qt.prototype.result=function(t,e){return Zt(t=t||this._wuid,e)},o(Yt,"WUResult"),Yt.prototype=Object.create(Ut.prototype),Yt.prototype.wuid=function(t){return arguments.length?(this._wuid=t,this):this._wuid},Yt.prototype.name=function(t){return arguments.length?(this._name=t,this):this._name},Yt.prototype.query=function(t,e){t=t||{},e=e||{};const o={Wuid:this._wuid,ResultName:this._name,SuppressXmlSchema:!0,Start:0,Count:-1};for(const n in t)o[n]=t[n];let s=0;for(const n in e)o["FilterBy.NamedValue."+s+".Name"]=n,o["FilterBy.NamedValue."+s+".Value"]=e[n],++s;s&&(o["FilterBy.NamedValue.itemcount"]=s);const i=this;return this.jsonp(this.url(),o).then(function(t){return t.WUResultResponse&&t.WUResultResponse.Result&&t.WUResultResponse.Result[i._name]?(zt&&(Ft[i.url()][JSON.stringify(o)]={WUResultResponse:{Result:t.WUResultResponse.Result}}),i._xmlSchema=t.WUResultResponse.Result.XmlSchema,Lt(t.WUResultResponse.Result[i._name])):[]})},o($t,"LogicalFile"),$t.prototype=Object.create(Ut.prototype),$t.prototype.query=function(t,e){t=t||{},e=e||{};const o={Cluster:"hthor",LogicalName:this._logicalName,SuppressXmlSchema:null!==this._xmlSchema,Start:0,Count:-1};for(const n in t)o[n]=t[n];let s=0;for(const n in e)o["FilterBy.NamedValue."+s+".Name"]=n,o["FilterBy.NamedValue."+s+".Value"]=e[n],++s;s&&(o["FilterBy.NamedValue.itemcount"]=s);const i=this;return this.jsonp(this.url(),o).then(function(t){return t.WUResultResponse&&t.WUResultResponse.Result&&t.WUResultResponse.Result.Row?(i._xmlSchema=t.WUResultResponse.Result.XmlSchema,Lt(t.WUResultResponse.Result.Row)):[]})},o(Gt,"RoxieQuery"),Gt.prototype=Object.create(Ut.prototype),o(Xt,"trimRight"),o(Jt,"postFilter"),o(Qt,"locateRoxieResponse"),Gt.prototype.query=function(t,e){t=t||{},e=e||{};const o={};for(const i in t)o[i]=t[i];for(const i in e)o[i]=e[i];const s=this;return this.jsonp(this.url(),o).then(function(t){if(t=Qt(t))if(s._resultName){if(t&&t[s._resultName]&&t[s._resultName].Row)return Lt(Jt(t[s._resultName].Row,e))}else for(const o in t)if(t[o].Row)return Lt(Jt(t[o].Row,e));return[]})},o(Zt,"createResult"),o(Kt,"enableCache"),o(te,"cache"),o(ee,"createConnection"),o(oe,"flattenResult");var se,ie={exports:{}};function ne(){return se||(se=1,function(){function t(e){if(!(this instanceof t))return new t(e);this._canvas=e="string"==typeof e?document.getElementById(e):e,this._ctx=e.getContext("2d"),this._width=e.width,this._height=e.height,this._max=1,this._data=[]}ie.exports=t,o(t,"simpleheat"),t.prototype={defaultRadius:25,defaultGradient:{.4:"blue",.6:"cyan",.7:"lime",.8:"yellow",1:"red"},data:/* @__PURE__ */o(function(t){return this._data=t,this},"data"),max:/* @__PURE__ */o(function(t){return this._max=t,this},"max"),add:/* @__PURE__ */o(function(t){return this._data.push(t),this},"add"),clear:/* @__PURE__ */o(function(){return this._data=[],this},"clear"),radius:/* @__PURE__ */o(function(t,e){e=void 0===e?15:e;var o=this._circle=this._createCanvas(),s=o.getContext("2d"),i=this._r=t+e;return o.width=o.height=2*i,s.shadowOffsetX=s.shadowOffsetY=2*i,s.shadowBlur=e,s.shadowColor="black",s.beginPath(),s.arc(-i,-i,t,0,2*Math.PI,!0),s.closePath(),s.fill(),this},"radius"),resize:/* @__PURE__ */o(function(){this._width=this._canvas.width,this._height=this._canvas.height},"resize"),gradient:/* @__PURE__ */o(function(t){var e=this._createCanvas(),o=e.getContext("2d"),s=o.createLinearGradient(0,0,0,256);for(var i in e.width=1,e.height=256,t)s.addColorStop(+i,t[i]);return o.fillStyle=s,o.fillRect(0,0,1,256),this._grad=o.getImageData(0,0,1,256).data,this},"gradient"),draw:/* @__PURE__ */o(function(t){this._circle||this.radius(this.defaultRadius),this._grad||this.gradient(this.defaultGradient);var e=this._ctx;e.clearRect(0,0,this._width,this._height);for(var o,s=0,i=this._data.length;s<i;s++)o=this._data[s],e.globalAlpha=Math.max(o[2]/this._max,void 0===t?.05:t),e.drawImage(this._circle,o[0]-this._r,o[1]-this._r);var n=e.getImageData(0,0,this._width,this._height);return this._colorize(n.data,this._grad),e.putImageData(n,0,0),this},"draw"),_colorize:/* @__PURE__ */o(function(t,e){for(var o,s=0,i=t.length;s<i;s+=4)(o=4*t[s+3])&&(t[s]=e[o],t[s+1]=e[o+1],t[s+2]=e[o+2])},"_colorize"),_createCanvas:/* @__PURE__ */o(function(){return"undefined"!=typeof document?document.createElement("canvas"):new this._canvas.constructor},"_createCanvas")}}()),ie.exports}o(ne,"requireSimpleheat");const re=/* @__PURE__ */G(ne()),ae=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,default:re},Symbol.toStringTag,{value:"Module"})),le=window.simpleheat||ae&&re||ae,ce=class _HeatMap extends p{_heat;constructor(){super()}enter(t,e){super.enter(t,e),this.resize(this._size),this._heat=le(t)}update(t,e){if(super.update(t,e),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this.topLeftX_exists()&&this.topLeftY_exists()&&this.bottomRightX_exists()&&this.bottomRightY_exists()?this._heat.data(this.skewedData()):this._heat.data(this.data()),this.radius()&&this._heat.radius(this.radius(),this.blur()),this.usePalette()){const t={};for(let e=1;e<=this.colorCount();e++){t[e/this.colorCount()]=this._palette(e,1,this.colorCount())}this._heat.defaultGradient=t,this._heat.gradient(t)}else this.gradient()&&(this._heat.defaultGradient=this.gradient(),this._heat.gradient(this.gradient()));this._heat.draw()}exit(t,e){delete this._heat,super.exit(t,e)}resize(t){const e=p.prototype.resize.apply(this,arguments);return void 0!==this._heat&&this._heat.resize(),e}skewedData(){const t=this,e=[],o=this.data(),s=this.size(),i=this.bottomRightX()-this.topLeftX(),n=this.bottomRightY()-this.topLeftY(),r=i/s.width,a=n/s.height;return o.forEach(function(o){const s=Math.abs(o[0]-t.topLeftX()),i=Math.abs(o[1]-t.topLeftY()),n=s/r,l=i/a;e.push([n,l,o[2]])}),e}};o(ce,"HeatMap");let ue=ce;ue.prototype._class+=" other_HeatMap",ue.prototype._palette=n.rainbow("default"),ue.prototype.publish("radius",15,"number","Set point radius",null,{tags:["Basic"]}),ue.prototype.publish("blur",15,"number","Set point blur",null,{tags:["Basic"]}),ue.prototype.publish("max",1,"number","Set max data value",null,{tags:["Basic"]}),ue.prototype.publish("gradient",{.4:"blue",.6:"cyan",.7:"lime",.8:"yellow",1:"red"},"object","Set gradient colors",null,{tags:["Basic"]}),ue.prototype.publish("usePalette",!1,"boolean","If true, uses paletteID and colorCount to determine gradient",null,{tags:["Basic"]}),ue.prototype.publish("colorCount",10,"number","Top left x-value",null,{tags:["Basic"]}),ue.prototype.publish("paletteID","default","set","Color palette for this widget",ue.prototype._palette.switch(),{tags:["Basic"]}),ue.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),ue.prototype.publish("topLeftX",null,"number","Top left x-value",null,{tags:["Basic"],optional:!0}),ue.prototype.publish("topLeftY",null,"number","Top left y-value",null,{tags:["Basic"],optional:!0}),ue.prototype.publish("bottomRightX",null,"number","Bottom right x-value",null,{tags:["Basic"],optional:!0}),ue.prototype.publish("bottomRightY",null,"number","Bottom right y-value",null,{tags:["Basic"],optional:!0});const he=class _HPCCBadge extends d{root;logo;logo_accent;logo_circles;line;circle_1;circle_2;circle_3;circle_4;circle_5;circle_6;circle_7;circle_8;circle_accent;text;text_hpccsystems;text_r;text_tm;constructor(){super()}testData(t,e){return this}enter(t,e){super.enter(t,e),this.root=e.append("g"),this.logo=this.root.append("g"),this.logo_accent=this.root.append("g"),this.line=this.logo_accent.append("path").attr("fill-rule","evenodd").attr("clip-rule","evenodd").attr("fill","#179BD7").attr("d","m 189.38849,364.55373 c 191.6,3.8 0,0 191.6,3.8 l 0.1,-4.2 c -191.7,0.4 0,0 -191.7,0.4 z"),this.circle_accent=this.logo_accent.append("path").attr("fill-rule","evenodd").attr("clip-rule","evenodd").attr("fill","#6E6E73").attr("d","M421.3,354.2c6.9,6.9,3.1,18.7-8.6,26.1c-11.8,7.4-26.3,6.9-32.1-0.6c-5.5-7.2-1.1-18.2,9.6-25C401,348,414.7,347.6,421.3,354.2z"),this.logo_circles=this.logo.append("g"),this.circle_1=this.logo_circles.append("path").attr("fill-rule","evenodd").attr("clip-rule","evenodd").attr("fill","#179BD7").attr("d","m 258.9815,363.84947 c 1.3,-3 1.5,-5.9 0.4,-8.1 -2.6,-5.4 -11.8,-5.1 -20.6,0.4 -3.5,2.2 -6.5,4.9 -8.7,7.8 -0.11933,0.35821 -0.39477,0.60735 -0.6,0.9 -2.9,4.1 -4.2,8.3 -3,11.6 2.1,6 11.4,6.3 20.9,0.4 5,-3.2 8.9,-7.3 11,-11.4 -0.59813,0.54778 0.47385,-1.28911 0.6,-1.6 z"),this.circle_2=this.logo_circles.append("path").attr("fill-rule","evenodd").attr("clip-rule","evenodd").attr("fill","#179BD7").attr("d","M291.3,349.3c9.5-5.9,14.1-15,10.5-20c-3.5-4.8-13.3-4.2-22.1,1.3c-8.8,5.5-13.7,14.1-10.9,19.3C271.7,355.4,281.9,355.2,291.3,349.3z"),this.circle_3=this.logo_circles.append("path").attr("fill-rule","evenodd").attr("clip-rule","evenodd").attr("fill","#179BD7").attr("d","M335.3,321.7c9.5-5.9,13.3-14.5,8.9-19c-4.3-4.3-14.8-3.2-23.6,2.3c-8.8,5.5-13.1,13.7-9.4,18.4C315,328.3,325.9,327.7,335.3,321.7z"),this.circle_4=this.logo_circles.append("path").attr("fill-rule","evenodd").attr("clip-rule","evenodd").attr("fill","#179BD7").attr("d","M273.2,384c-3.2-6.5-13.5-6.7-23.2-0.7c-9.7,6-15.6,16.4-13.2,23.4c2.5,7.3,13.1,8.2,23.6,1.7 C270.8,401.9,276.5,390.8,273.2,384z"),this.circle_5=this.logo_circles.append("path").attr("fill-rule","evenodd").attr("clip-rule","evenodd").attr("fill","#179BD7").attr("d","m 320.84499,363.83119 c 1,-3.4 0.8,-6.6 -1,-9.1 -4.2,-5.9 -15.3,-5.6 -25,0.5 -3.89999,2.4 -7.09999,5.5 -9.19999,8.7 -1.18854,2.2092 -0.0404,-0.09 -1.2,2.2 -2.2,4.1 -2.7,8.3 -0.9,11.5 3.6,6.7 15.09999,7 25.59999,0.5 5,-3.2 8.7,-7.2 10.7,-11.3 0.95557,-2.97582 0.0423,0.0306 1,-3 z"),this.circle_6=this.logo_circles.append("path").attr("fill-rule","evenodd").attr("clip-rule","evenodd").attr("fill","#179BD7").attr("d","M330.4,348.2c4.6,6,17,5.8,27.5-0.8c10.5-6.6,14.3-16.5,8.9-22c-5.2-5.3-17.1-4.4-26.8,1.6C330.3,333.1,325.9,342.4,330.4,348.2z"),this.circle_7=this.logo_circles.append("path").attr("fill-rule","evenodd").attr("clip-rule","evenodd").attr("fill","#179BD7").attr("d","M264.1,417.4c-10.8,6.7-17.2,19-14.2,27.8c3.2,9.2,15.4,11.1,27.2,3.7c11.8-7.4,17.8-20.6,13.6-29.2C286.6,411.6,274.8,410.7,264.1,417.4z"),this.circle_8=this.logo_circles.append("path").attr("fill-rule","evenodd").attr("clip-rule","evenodd").attr("fill","#179BD7").attr("d","M314.2,386.1c-10.8,6.7-16.2,18.4-11.9,26.4c4.5,8.4,17.8,9.5,29.6,2.2c11.8-7.4,16.6-19.9,11.1-27.7C337.7,379.6,324.9,379.3,314.2,386.1z"),this.text=this.root.append("g"),this.text_hpccsystems=this.text.append("path").attr("fill","#6E6E73").attr("d","M224.2,476.3c0.1-1.3,0.1-2.7,0.2-4.1c-0.3,0-0.5,0.1-0.8,0.1c-0.3,0-0.5,0-0.8,0c-0.3,0-0.5,0-0.8,0c-0.3,0-0.5-0.1-0.8-0.1c0.1,1.4,0.1,2.8,0.2,4.1c0.1,1.3,0.1,2.7,0.1,4.1v1.1c-1.1,0-2.3,0-3.3,0.1c-1.1,0-2.2,0-3.3,0c-1.1,0-2.3,0-3.3,0c-1.1,0-2.2,0-3.3-0.1v-1.1c0-1.4,0-2.8,0.1-4.1c0.1-1.3,0.1-2.7,0.2-4.1c-0.3,0-0.5,0.1-0.8,0.1c-0.3,0-0.5,0-0.8,0c-0.3,0-0.5,0-0.8,0c-0.3,0-0.5-0.1-0.8-0.1c0.1,1.4,0.1,2.8,0.2,4.1c0.1,1.3,0.1,2.7,0.1,4.1v5.5c0,1.4,0,2.8-0.1,4.1c-0.1,1.4-0.1,2.7-0.2,4c0.5,0,1-0.1,1.6-0.1c0.6,0,1.1,0,1.6,0.1c-0.1-1.3-0.1-2.7-0.2-4c-0.1-1.4-0.1-2.7-0.1-4.1v-2.9c1.1,0,2.3,0,3.3,0c1.1,0,2.2,0,3.3,0c1.1,0,2.3,0,3.3,0c1.1,0,2.2,0,3.3,0v2.9c0,1.4,0,2.8-0.1,4.1c-0.1,1.4-0.1,2.7-0.2,4c0.5,0,1-0.1,1.6-0.1c0.6,0,1.1,0,1.6,0.1c-0.1-1.3-0.1-2.7-0.2-4c-0.1-1.4-0.1-2.7-0.1-4.1v-5.5C224.1,479,224.1,477.7,224.2,476.3z M242.7,473.8c-0.4-0.4-0.9-0.7-1.4-0.9c-0.5-0.2-1-0.4-1.5-0.5c-0.5-0.1-1-0.2-1.5-0.2c-0.5,0-0.9,0-1.2,0c-0.2,0-0.5,0-0.9,0c-0.3,0-0.7,0-1.1,0c-0.4,0-0.7,0-1.1,0c-0.4,0-0.7,0-0.9,0c-0.5,0-1,0-1.5,0c-0.5,0-1-0.1-1.5-0.1c0.1,1.4,0.1,2.8,0.2,4.1c0.1,1.3,0.1,2.7,0.1,4.1v5.5c0,1.4,0,2.8-0.1,4.1c-0.1,1.4-0.1,2.7-0.2,4c0.5,0,1-0.1,1.6-0.1c0.6,0,1.1,0,1.6,0.1c-0.1-1.3-0.1-2.7-0.2-4c-0.1-1.4-0.1-2.7-0.1-4.1v-1.8c0.4,0,0.8,0.1,1.2,0.1c0.4,0,0.8,0,1.3,0c0.8,0,1.6-0.1,2.6-0.3c1-0.2,1.9-0.5,2.8-1c0.9-0.5,1.6-1.2,2.2-2c0.6-0.9,0.9-2,0.9-3.4c0-0.9-0.1-1.6-0.4-2.2C243.5,474.7,243.1,474.2,242.7,473.8z M240.6,480.4c-0.4,0.7-0.9,1.2-1.4,1.6c-0.6,0.4-1.2,0.7-1.9,0.8c-0.7,0.1-1.4,0.2-2,0.2c-0.8,0-1.5-0.1-2.3-0.3v-9.5h2.9c0.8,0,1.6,0.1,2.2,0.2c0.7,0.1,1.2,0.3,1.7,0.7c0.5,0.3,0.8,0.8,1.1,1.3c0.3,0.6,0.4,1.3,0.4,2.2C241.2,478.8,241,479.7,240.6,480.4z M251.9,475.4c0.8-0.8,1.7-1.5,2.8-1.9c1.1-0.4,2.2-0.6,3.5-0.6c0.8,0,1.5,0.1,2.1,0.3c0.6,0.2,1.2,0.5,1.7,0.7c0.5,0.3,1,0.6,1.3,0.9c0.4,0.3,0.7,0.6,0.9,0.9l0.2-0.1c0.1-0.3,0.1-0.8,0.3-1.3c0.1-0.5,0.2-0.9,0.4-1.2c-0.9-0.4-1.9-0.7-3.1-1c-1.2-0.3-2.4-0.4-3.8-0.4c-1.8,0-3.4,0.3-4.8,0.8c-1.5,0.5-2.7,1.3-3.8,2.2c-1.1,1-1.9,2.2-2.5,3.6c-0.6,1.4-0.9,3-0.9,4.8c0,1.8,0.3,3.4,0.9,4.8c0.6,1.4,1.4,2.6,2.4,3.6c1,1,2.3,1.7,3.7,2.2c1.4,0.5,3,0.7,4.7,0.7c0.8,0,1.5-0.1,2.3-0.2c0.7-0.1,1.4-0.3,2-0.4c0.6-0.2,1.1-0.3,1.5-0.5c0.4-0.2,0.7-0.4,0.9-0.6l0.3-1.9l-0.1-0.1c-0.3,0.2-0.7,0.5-1.1,0.8c-0.4,0.3-0.9,0.6-1.5,0.9c-0.5,0.3-1.1,0.5-1.8,0.7c-0.6,0.2-1.4,0.3-2.1,0.3c-1.3,0-2.4-0.2-3.5-0.6c-1.1-0.4-2-1-2.8-1.9c-0.8-0.8-1.4-1.9-1.9-3.2c-0.4-1.3-0.7-2.8-0.7-4.6c0-1.8,0.2-3.3,0.7-4.6 C250.5,477.3,251.1,476.3,251.9,475.4z M273.2,475.4c0.8-0.8,1.7-1.5,2.8-1.9c1.1-0.4,2.2-0.6,3.5-0.6c0.8,0,1.5,0.1,2.1,0.3c0.6,0.2,1.2,0.5,1.7,0.7c0.5,0.3,1,0.6,1.3,0.9c0.4,0.3,0.7,0.6,0.9,0.9l0.2-0.1c0.1-0.3,0.1-0.8,0.3-1.3c0.1-0.5,0.2-0.9,0.4-1.2c-0.9-0.4-1.9-0.7-3.1-1c-1.2-0.3-2.4-0.4-3.8-0.4c-1.8,0-3.4,0.3-4.8,0.8c-1.5,0.5-2.7,1.3-3.8,2.2c-1.1,1-1.9,2.2-2.5,3.6c-0.6,1.4-0.9,3-0.9,4.8c0,1.8,0.3,3.4,0.9,4.8c0.6,1.4,1.4,2.6,2.4,3.6c1,1,2.3,1.7,3.7,2.2c1.4,0.5,3,0.7,4.7,0.7c0.8,0,1.5-0.1,2.3-0.2c0.7-0.1,1.4-0.3,2-0.4c0.6-0.2,1.1-0.3,1.5-0.5c0.4-0.2,0.7-0.4,0.9-0.6l0.3-1.9l-0.1-0.1c-0.3,0.2-0.7,0.5-1.1,0.8c-0.4,0.3-0.9,0.6-1.5,0.9c-0.5,0.3-1.1,0.5-1.8,0.7c-0.6,0.2-1.4,0.3-2.1,0.3c-1.3,0-2.4-0.2-3.5-0.6c-1.1-0.4-2-1-2.8-1.9c-0.8-0.8-1.4-1.9-1.9-3.2c-0.4-1.3-0.7-2.8-0.7-4.6c0-1.8,0.2-3.3,0.7-4.6 C271.8,477.3,272.4,476.3,273.2,475.4z M308.2,482.9c-0.7-0.4-1.5-0.8-2.4-1.1c-0.9-0.3-1.7-0.7-2.4-1.1c-0.7-0.4-1.4-0.9-1.9-1.5c-0.5-0.6-0.7-1.4-0.7-2.4c0-0.6,0.1-1.1,0.3-1.6c0.2-0.5,0.5-0.9,0.9-1.3c0.4-0.4,0.8-0.6,1.3-0.8c0.5-0.2,1-0.3,1.6-0.3c0.6,0,1.1,0.1,1.5,0.3c0.4,0.2,0.8,0.5,1.1,0.7c0.3,0.3,0.6,0.6,0.7,1c0.2,0.4,0.3,0.7,0.4,1h0.4c0.1-0.6,0.3-1.1,0.4-1.5c0.1-0.4,0.3-0.8,0.5-1.1c-0.6-0.5-1.3-0.9-2.1-1.1c-0.7-0.2-1.6-0.4-2.6-0.4c-1.1,0-2,0.1-2.9,0.4c-0.9,0.3-1.6,0.7-2.2,1.2c-0.6,0.5-1.1,1.2-1.4,1.9c-0.3,0.7-0.5,1.5-0.5,2.4c0,1.3,0.2,2.3,0.7,3c0.5,0.7,1.1,1.4,1.9,1.8c0.7,0.5,1.5,0.9,2.4,1.2c0.9,0.3,1.7,0.7,2.4,1.1c0.7,0.4,1.4,0.9,1.9,1.4c0.5,0.6,0.7,1.3,0.7,2.3c0,0.6-0.1,1.2-0.3,1.8c-0.2,0.6-0.5,1.1-0.9,1.5c-0.4,0.4-0.9,0.7-1.4,1c-0.6,0.2-1.2,0.4-1.9,0.4c-0.7,0-1.3-0.1-1.8-0.3c-0.6-0.2-1-0.5-1.5-0.8c-0.4-0.3-0.8-0.7-1.1-1.1c-0.3-0.4-0.5-0.8-0.7-1.2h-0.4c-0.1,0.6-0.1,1.1-0.2,1.5c-0.1,0.4-0.2,0.8-0.4,1.3c0.6,0.4,1.2,0.8,2.1,1.2c0.8,0.4,1.9,0.5,3.2,0.5c1.2,0,2.3-0.2,3.3-0.5c1-0.4,1.8-0.8,2.5-1.5c0.7-0.6,1.2-1.4,1.5-2.3c0.4-0.9,0.5-1.8,0.5-2.8c0-1.2-0.2-2.1-0.7-2.8C309.6,483.9,309,483.3,308.2,482.9z M328.6,472.2c-0.4,0.9-0.9,1.9-1.4,2.8c-0.5,1-1,1.9-1.5,2.9c-0.5,1-1.1,1.9-1.6,2.8c-0.5,0.9-1,1.8-1.5,2.5c-1.1-1.9-2.2-3.8-3.1-5.6c-1-1.8-2-3.6-2.9-5.5c-0.3,0-0.6,0.1-0.9,0.1c-0.3,0-0.6,0-0.9,0c-0.3,0-0.6,0-0.9,0c-0.3,0-0.6-0.1-0.9-0.1c0.2,0.3,0.5,0.8,0.9,1.5c0.4,0.7,0.9,1.4,1.4,2.3c0.5,0.8,1,1.7,1.6,2.6c0.6,0.9,1.1,1.8,1.6,2.6c0.5,0.8,1,1.6,1.4,2.3c0.4,0.7,0.7,1.2,0.9,1.6c0,1.7,0,3.4,0,4.9c0,1.6-0.1,2.9-0.2,4c0.5,0,1-0.1,1.6-0.1c0.6,0,1.1,0,1.6,0.1c0-0.4-0.1-1-0.1-1.8c0-0.7-0.1-1.5-0.1-2.4c0-0.9,0-1.7,0-2.6c0-0.9,0-1.7,0-2.5c0.3-0.7,0.7-1.4,1.2-2.2c0.5-0.8,1-1.7,1.6-2.8c0.6-1,1.3-2.2,2.1-3.4c0.8-1.3,1.7-2.7,2.7-4.2c-0.5,0.1-0.9,0.2-1.2,0.2C329.5,472.3,329.1,472.3,328.6,472.2z M343.6,482.9c-0.7-0.4-1.5-0.8-2.4-1.1c-0.9-0.3-1.7-0.7-2.4-1.1c-0.7-0.4-1.4-0.9-1.9-1.5c-0.5-0.6-0.7-1.4-0.7-2.4c0-0.6,0.1-1.1,0.3-1.6c0.2-0.5,0.5-0.9,0.9-1.3c0.4-0.4,0.8-0.6,1.3-0.8c0.5-0.2,1-0.3,1.6-0.3c0.6,0,1.1,0.1,1.5,0.3c0.4,0.2,0.8,0.5,1.1,0.7c0.3,0.3,0.6,0.6,0.7,1c0.2,0.4,0.3,0.7,0.4,1h0.4c0.1-0.6,0.3-1.1,0.4-1.5c0.1-0.4,0.3-0.8,0.5-1.1c-0.6-0.5-1.3-0.9-2.1-1.1c-0.7-0.2-1.6-0.4-2.6-0.4c-1.1,0-2,0.1-2.9,0.4c-0.9,0.3-1.6,0.7-2.2,1.2c-0.6,0.5-1.1,1.2-1.4,1.9c-0.3,0.7-0.5,1.5-0.5,2.4c0,1.3,0.2,2.3,0.7,3c0.5,0.7,1.1,1.4,1.9,1.8c0.7,0.5,1.5,0.9,2.4,1.2c0.9,0.3,1.7,0.7,2.4,1.1c0.7,0.4,1.4,0.9,1.9,1.4c0.5,0.6,0.7,1.3,0.7,2.3c0,0.6-0.1,1.2-0.3,1.8c-0.2,0.6-0.5,1.1-0.9,1.5c-0.4,0.4-0.9,0.7-1.4,1c-0.6,0.2-1.2,0.4-1.9,0.4c-0.7,0-1.3-0.1-1.8-0.3c-0.6-0.2-1-0.5-1.5-0.8c-0.4-0.3-0.8-0.7-1.1-1.1c-0.3-0.4-0.5-0.8-0.7-1.2h-0.4c-0.1,0.6-0.1,1.1-0.2,1.5c-0.1,0.4-0.2,0.8-0.4,1.3c0.6,0.4,1.2,0.8,2.1,1.2c0.8,0.4,1.9,0.5,3.2,0.5c1.2,0,2.3-0.2,3.3-0.5c1-0.4,1.8-0.8,2.5-1.5c0.7-0.6,1.2-1.4,1.5-2.3c0.4-0.9,0.5-1.8,0.5-2.8c0-1.2-0.2-2.1-0.7-2.8C345,483.9,344.4,483.3,343.6,482.9z M360.7,472.3c-1.3,0-2.7,0-4.1,0c-1.4,0-2.8,0-4.1,0c-1.3,0-2.7-0.1-4.1-0.1c0.1,0.4,0.2,0.8,0.2,1c0,0.3-0.1,0.6-0.2,1c0.4-0.1,1-0.1,1.5-0.2c0.6,0,1.1-0.1,1.8-0.1c0.6,0,1.2-0.1,1.8-0.1c0.6,0,1.2,0,1.7,0c0.1,2.2,0.1,4.4,0.1,6.6v5.5c0,1.4,0,2.8-0.1,4.1c-0.1,1.4-0.1,2.7-0.2,4c0.5,0,1-0.1,1.6-0.1c0.6,0,1.1,0,1.6,0.1c-0.1-1.3-0.1-2.7-0.2-4c-0.1-1.4-0.1-2.7-0.1-4.1v-5.5c0-2.2,0-4.4,0.1-6.6c0.6,0,1.1,0,1.7,0c0.6,0,1.2,0,1.8,0.1c0.6,0,1.2,0.1,1.8,0.1c0.6,0,1.1,0.1,1.5,0.2c-0.1-0.4-0.2-0.7-0.2-1c0-0.3,0.1-0.6,0.2-1C363.4,472.2,362,472.3,360.7,472.3z M379.8,492.3c-0.5,0.1-1.1,0.2-1.8,0.2c-0.7,0.1-1.4,0.1-2.2,0.1c-0.8,0-1.6,0-2.4,0h-2.2c0-0.4,0-1,0-1.8c0-0.8,0-1.8,0-3v-3.2c0-0.3,0-0.6,0-0.8c0-0.2,0-0.4,0-0.6c0.4,0,0.9,0,1.5,0c0.6,0,1.3,0,2.1,0c0.7,0,1.5,0,2.2,0.1c0.7,0,1.4,0.1,1.9,0.2c-0.1-0.3-0.1-0.6-0.1-1c0-0.3,0-0.7,0.1-1c-0.5,0-1,0.1-1.5,0.1c-0.5,0-1.1,0.1-1.7,0.1c-0.6,0-1.3,0.1-2,0.1c-0.7,0-1.6,0-2.5,0c0-0.4,0-1,0-1.8c0-0.8,0-1.6,0-2.4c0-0.8,0-1.5,0-2.1c0-0.6,0.1-1.3,0.1-1.9c1,0,1.9,0,2.7,0c0.7,0,1.4,0.1,2.1,0.1c0.6,0,1.2,0.1,1.8,0.1c0.6,0,1.2,0.1,1.9,0.1c-0.1-0.3-0.1-0.6-0.1-1c0-0.3,0-0.6,0.1-1c-1,0-1.9,0.1-2.8,0.1c-0.9,0-1.9,0-2.8,0c-1,0-1.9,0-2.9,0c-0.9,0-1.9-0.1-2.9-0.1c0.1,1.4,0.1,2.7,0.2,4.1c0.1,1.4,0.1,2.7,0.1,4.1v5.5c0,1.4,0,2.8-0.1,4.1c-0.1,1.4-0.1,2.7-0.2,4.1c1,0,1.9-0.1,2.9-0.1h5.8c0.9,0,1.9,0,2.9,0.1c-0.1-0.2-0.1-0.5-0.1-0.8c0-0.1,0-0.3,0-0.5C379.7,492.6,379.8,492.4,379.8,492.3z M406.8,483.3c-0.2-1.8-0.4-3.7-0.6-5.6c-0.2-1.9-0.4-3.9-0.7-5.9h-0.4c-0.5,1-1.1,2-1.7,3.2c-0.6,1.1-1.2,2.3-1.9,3.4c-0.6,1.2-1.2,2.3-1.8,3.5c-0.6,1.1-1.2,2.2-1.7,3.2c-0.5,1-1,1.8-1.4,2.6c-0.4,0.8-0.7,1.3-0.9,1.7c-1.6-3-3.2-5.9-4.7-8.8c-1.5-2.8-3-5.8-4.4-8.8H386c-0.2,1.7-0.4,3.5-0.6,5.4c-0.2,1.9-0.5,3.8-0.8,5.7c-0.3,1.9-0.6,3.9-0.9,5.8c-0.3,1.9-0.6,3.7-0.9,5.5c0.3,0,0.7-0.1,1.1-0.1c0.4,0,0.8,0,1.1,0.1c0-0.9,0.1-1.9,0.2-3.3c0.1-1.3,0.2-2.7,0.4-4.2c0.1-1.5,0.3-3,0.5-4.6c0.2-1.5,0.3-3,0.5-4.3h0.1c1.4,2.8,2.8,5.6,4.2,8.2c1.4,2.7,2.7,5.4,4,8h0.3c1.3-2.9,2.6-5.7,4-8.3c1.4-2.6,2.9-5.3,4.3-8h0.1c0.3,2.8,0.6,5.5,0.9,8.1c0.2,2.7,0.5,5.4,0.7,8.2c0.3,0,0.5-0.1,0.7-0.1h1.5c0.2,0,0.5,0,0.7,0.1c-0.3-1.8-0.5-3.5-0.7-5.3 C407.2,486.9,407,485.1,406.8,483.3z M423.4,484.6c-0.5-0.7-1.1-1.3-1.9-1.7c-0.7-0.4-1.5-0.8-2.4-1.1c-0.9-0.3-1.7-0.7-2.4-1.1c-0.7-0.4-1.4-0.9-1.9-1.5c-0.5-0.6-0.7-1.4-0.7-2.4c0-0.6,0.1-1.1,0.3-1.6c0.2-0.5,0.5-0.9,0.9-1.3c0.4-0.4,0.8-0.6,1.3-0.8c0.5-0.2,1-0.3,1.6-0.3c0.6,0,1.1,0.1,1.5,0.3c0.4,0.2,0.8,0.5,1.1,0.7c0.3,0.3,0.6,0.6,0.7,1c0.2,0.4,0.3,0.7,0.4,1h0.4c0.1-0.6,0.3-1.1,0.4-1.5c0.1-0.4,0.3-0.8,0.5-1.1c-0.6-0.5-1.3-0.9-2.1-1.1c-0.7-0.2-1.6-0.4-2.6-0.4c-1.1,0-2,0.1-2.9,0.4c-0.9,0.3-1.6,0.7-2.2,1.2c-0.6,0.5-1.1,1.2-1.4,1.9c-0.3,0.7-0.5,1.5-0.5,2.4c0,1.3,0.2,2.3,0.7,3c0.5,0.7,1.1,1.4,1.9,1.8c0.7,0.5,1.5,0.9,2.4,1.2c0.9,0.3,1.7,0.7,2.4,1.1c0.7,0.4,1.4,0.9,1.9,1.4c0.5,0.6,0.7,1.3,0.7,2.3c0,0.6-0.1,1.2-0.3,1.8c-0.2,0.6-0.5,1.1-0.9,1.5c-0.4,0.4-0.9,0.7-1.4,1c-0.6,0.2-1.2,0.4-1.9,0.4c-0.7,0-1.3-0.1-1.8-0.3c-0.6-0.2-1-0.5-1.5-0.8c-0.4-0.3-0.8-0.7-1.1-1.1c-0.3-0.4-0.5-0.8-0.7-1.2h-0.4c-0.1,0.6-0.1,1.1-0.2,1.5c-0.1,0.4-0.2,0.8-0.4,1.3c0.6,0.4,1.2,0.8,2.1,1.2c0.8,0.4,1.9,0.5,3.2,0.5c1.2,0,2.3-0.2,3.3-0.5c1-0.4,1.8-0.8,2.5-1.5c0.7-0.6,1.2-1.4,1.5-2.3c0.4-0.9,0.5-1.8,0.5-2.8 C424.2,486.3,423.9,485.3,423.4,484.6z"),this.text_r=this.text.append("path").attr("fill","#6E6E73").attr("d","M433.1,472.1c2.2,0,3.9,1.8,3.9,3.9c0,2.2-1.8,3.9-3.9,3.9c-2.2,0-3.9-1.8-3.9-3.9 C429.2,473.8,430.9,472.1,433.1,472.1z M433.1,479.5c1.9,0,3.5-1.6,3.5-3.5s-1.5-3.5-3.5-3.5s-3.5,1.6-3.5,3.5 S431.2,479.5,433.1,479.5z M431.7,475c0-0.5,0-1.1-0.1-1.5c0.3,0,0.6,0.1,0.9,0.1c0.3,0,0.6-0.1,0.9-0.1c0.8,0,1.4,0.4,1.4,1.1c0,0.9-1,1.3-1.5,1.4c0.6,0.7,1.5,2,1.9,2.4v0.1c-0.1,0-0.3-0.1-0.4-0.1c-0.1,0-0.3,0-0.4,0.1c-0.5-0.8-1.1-1.6-1.8-2.4h-0.4v0.8c0,0.5,0,1.1,0.1,1.6c-0.1,0-0.2-0.1-0.4-0.1c-0.1,0-0.2,0-0.4,0.1c0-0.5,0.1-1,0.1-1.5V475z M432.2,475.7c0.1,0,0.3,0,0.5,0c0.7,0,1.4-0.3,1.4-1.1c0-0.6-0.4-0.9-1-0.9c-0.3,0-0.5,0-0.8,0.1c0,0.3-0.1,0.7-0.1,1V475.7z"),this.text_tm=this.text.append("path").attr("fill","#6E6E73").attr("d","M376.1,322.1c0-0.6,0-1.2,0-1.9c-0.6,0-1.4,0-1.9,0.1c0-0.1,0-0.2,0-0.3c0-0.1,0-0.2,0-0.3c0.8,0,1.5,0,2.3,0s1.5,0,2.3,0c0,0.1,0,0.2,0,0.3c0,0.1,0,0.2,0,0.3c-0.5-0.1-1.3-0.1-1.9-0.1c0,0.6,0,1.2,0,1.9v1.5c0,0.8,0,1.6,0.1,2.3c-0.2,0-0.3,0-0.4,0c-0.1,0-0.3,0-0.4,0c0-0.8,0.1-1.6,0.1-2.3V322.1zM380.5,319.7c0.8,1.7,1.7,3.3,2.6,5c0.4-0.7,1.8-3.3,2.7-5h0.1c0.3,2.3,0.5,4.3,0.7,6.3c-0.1,0-0.3,0-0.4,0c-0.1,0-0.3,0-0.4,0c-0.1-1.6-0.3-3.1-0.4-4.6h0c-0.8,1.5-1.6,3-2.4,4.6h-0.1c-0.7-1.5-1.5-3-2.3-4.6h0c-0.2,1.5-0.4,3.6-0.4,4.6c-0.1,0-0.2,0-0.3,0c-0.1,0-0.2,0-0.3,0c0.3-2,0.7-4.4,0.9-6.3H380.5z");const o=this.root.node().getBBox(),s=o.x+o.width/2,i=o.y+o.height/2,n=Math.min(this.width(),this.height())/Math.max(o.width,o.height);this.root.attr("transform","translate("+-s*n+","+-i*n+")scale("+n+")")}update(t,e){switch(super.update(t,e),this.animation()){case"none":break;case"accentInOut":this.logo.attr("opacity",0),this.logo_accent.attr("transform","translate(-400, 0)"),this.text.attr("opacity",0),this.logo.transition().duration(1e3).attr("opacity",1),this.logo_accent.transition().delay(500).duration(1500).attr("transform","translate(0, 0)"),this.text.transition().delay(100).duration(1e3).attr("opacity",1),this.logo_accent.transition().ease("back").delay(7e3).duration(1500).attr("transform","translate(400, 0)"),this.text.transition().delay(8400).duration(1e3).attr("opacity",0),this.logo_accent.transition().delay(8500).duration(1e3).attr("opacity",0),this.logo.transition().delay(8500).duration(1e3).attr("opacity",0);break;case"accentIn":this.logo.attr("opacity",0),this.logo_accent.attr("transform","translate(-400, 0)"),this.text.attr("opacity",0),this.logo.transition().duration(1e3).attr("opacity",1),this.logo_accent.transition().delay(500).duration(1500).attr("transform","translate(0, 0)"),this.text.transition().delay(100).duration(1e3).attr("opacity",1);break;case"fade_in":this.logo.attr("opacity",0),this.logo_accent.attr("opacity",0),this.text.attr("opacity",0),this.logo.transition().duration(1e3).attr("opacity",1),this.logo_accent.transition().duration(1e3).attr("opacity",1),this.text.transition().delay(100).duration(1e3).attr("opacity",1)}}};o(he,"HPCCBadge");let pe=he;pe.prototype._class+=" other_HPCCBadge",pe.prototype.publish("animation","none","set","Animation Style",["none","accentInOut","accentIn","fade_in"]);const de=class _Html extends s{constructor(){super(),this._tag="div"}enter(t,e){super.enter(t,e)}update(t,e){super.update(t,e),e.style("overflow-x",this.overflowX_exists()?this.overflowX():"").style("overflow-y",this.overflowY_exists()?this.overflowY():"");const o=e.selectAll(".htmlWrapper").data(this.data().length>0?this.data():[this.html()]);o.enter().append("div").attr("class","htmlWrapper").merge(o).html(function(t){return t}),o.exit().remove()}};o(de,"Html");let ge=de;ge.prototype._class+=" other_Html",ge.prototype.publish("html","","string","Html to render",null,{tags:["Basic"]}),ge.prototype.publish("overflowX",null,"set","CSS overflow-x",["","visible","hidden","scroll","auto","initial","inherit"],{tags:["Basic"],optional:!0}),ge.prototype.publish("overflowY",null,"set","CSS overflow-y",["","visible","hidden","scroll","auto","initial","inherit"],{tags:["Basic"],optional:!0});const fe=class _IconList extends s{_list;_entity_list=[];_content_list=[];constructor(){super(),this._list=(new x).orientation_default("horizontal").flexWrap_default("nowrap")}enter(t,e){super.enter(t,e),e.style("height","100%").style("width","100%"),l(t.parentElement).style("height","100%").style("width","100%"),this._list.target(t)}update(t,e){super.update(t,e);const o=this._list.widgets();this.data().forEach((t,e)=>{o[e]?(o[e]=this.updateListProperties(o[e],e),this.updateEntityProperties(o[e].widgets()[0],e),o[e].widgets()[1].html(this.data()[e][this.htmlColumnIndex_exists()?this.htmlColumnIndex():1])):o[e]=this.updateListProperties(new v,e).widgets([this.updateEntityProperties(new g,e),(new ge).html(this.data()[e][this.htmlColumnIndex_exists()?this.htmlColumnIndex():1])])}),this._list.widgets(o.slice(0,this.data().length)),this._list.resize().render()}updateListProperties(t,e){return t.disableScroll(!0).widgetsFlexBasis([this.iconSize()+"px",`calc(100% - ${this.iconSize()}px)`])}updateEntityProperties(t,e){return t.icon(this.iconColumnIndex_exists()?this.data()[e][this.iconColumnIndex()]:"?").iconColor(this.iconColorColumnIndex_exists()?this.data()[e][this.iconColorColumnIndex()]:"#000").iconDiameter(this.iconSize()).iconPaddingPercent(0)}};o(fe,"IconList");let me=fe;me.prototype._class+=" other_IconList",me.prototype.publish("iconSize",72,"number","Size of icon (pixels)"),me.prototype.publish("iconColumnIndex",0,"number","Index of column containing icon character"),me.prototype.publish("iconColorColumnIndex",1,"number","Index of column containing icon color"),me.prototype.publish("htmlColumnIndex",2,"number","Index of column containing html string");const ye=class _Paginator extends s{_tNumPages;_numList;paginator;side;_onSelect;constructor(){super(),this._tag="div",this._tNumPages=1,this._numList=[]}postUpdate(t,e){}enter(t,e){super.enter(t,e);const o=this;this.paginator=e.append("ul").attr("class","paginator pagination pagination-sm"),this.side=e.append("div").attr("class","paginator pagination side"),this.side.append("span").classed("side",!0).text("Page "),this.side.append("input").attr("type","number").attr("class","currentPageNumber").property("value",1).attr("min",1).on("change",function(){o.pageNumber(this.value),o._onSelect(this.value)}),this.side.append("span").classed("side total",!0).text(" of 1")}update(t,e){const o=this;if(e.style("bottom",this.bottom()+"px").style("right",this.right()+"px"),this._tNumPages=Math.ceil(this.numItems()/this.itemsPerPage())||1,this.pageNumber()>this._tNumPages&&this.pageNumber(1),this._numList=[],this.numItems()){this._numList.push("first");for(let t=-this.adjacentPages();t<=this.adjacentPages();t++)this.pageNumber()+t>0&&this.pageNumber()+t<=this._tNumPages&&this._numList.push(this.pageNumber()+t);this._numList.push("last")}this.side.select(".total").text(" of "+this._tNumPages),this.side.select(".currentPageNumber").property("value",this.pageNumber()),this.side.select(".currentPageNumber").attr("max",this._tNumPages);const s=this.paginator.selectAll("li").data(this._numList,function(t){return t});s.enter().append(function(t){const e=document.createElement("li");if(t!==o.pageNumber()){const o=document.createElement("a"),s=document.createTextNode(t);return o.appendChild(s),o.href="#",e.appendChild(o),e}{const o=document.createElement("span");return o.innerHTML=t,e.appendChild(o),e}}).on("click",function(t,e){switch(f().preventDefault(),o.side.select(".currentPageNumber").property("value",o.pageNumber()),t){case"first":1!==o.pageNumber()&&(o.pageNumber(1),o._onSelect(1,"previous"));break;case"last":o.pageNumber()!==o._tNumPages&&(o.pageNumber(o._tNumPages),o._onSelect(o._tNumPages,"previous"));break;default:o.pageNumber(t),o._onSelect(t)}}),s.classed("active",function(t,e){return t===o.pageNumber()}).select("a").text(function(t){return t}),s.exit().remove(),s.order(),0===this.numItems()&&l(t).remove()}exit(t,e){super.exit(t,e)}};o(ye,"Paginator");let _e=ye;_e.prototype._class+=" other_Paginator",_e.prototype.publish("itemsPerPage",2,"number","Pagination items per page",null,{tags:["Private"]}),_e.prototype.publish("numItems",10,"number","Pagination total number of items",null,{tags:["Private"]}),_e.prototype.publish("pageNumber",1,"number","Pagination set or get the page number",null,{tags:["Private"]}),_e.prototype.publish("adjacentPages",2,"number","Number of page indexes either side of current one",null,{tags:["Private"]}),_e.prototype.publish("bottom",20,"number","Pagination bottom offset",null,{tags:["Private"]}),_e.prototype.publish("right",20,"number","Pagination right offset",null,{tags:["Private"]});const be=class _Table extends s{_paginator;_selectionBag;_selectionPrevClick;_paginatorTableSpacing;tableDiv;thead;table;fixedHead;fixedHeadTable;fixedThead;unfixedThead;tbody;tfoot;fixedCol;fixedColTable;fixedColHead;fixedColHeadRow;fixedColBody;fixedColFoot;fixedColFootRow;_prevDescending;_prevSortByFieldIndex;_hasChildWidgets;_tNumPages;_empty_col_idx_arr;constructor(){super(),this._tag="div",this.columns([]),this._paginator=new _e,this._selectionBag=new i.Selection(this),this._selectionPrevClick=null,this._paginatorTableSpacing=4}size(t){const e=super.size.apply(this,arguments);if(arguments.length&&this.tableDiv){const t=this.showHeader()&&this.fixedHeader()?this.thead.property("offsetHeight"):0;this.tableDiv.style("width",this._size.width+"px").style("height",this._size.height-t+"px"),this._element.style("width",this._size.width+"px").style("height",this._size.height+"px")}return e}isHidden(t){if(this.pivot())return!1;if(-1!==this.hiddenColumns().indexOf(t))return!0;const e=this.fields();return!(!e||!e[t]||"hidden"!==e[t].type()&&-1===this._empty_col_idx_arr.indexOf(t))}tableColumns(t){const e=this.columns.apply(this,arguments);return!arguments.length&&this.pivot()?this._db.column(0):e}tableData(t){const e=this.data.apply(this,arguments);return!arguments.length&&this.pivot()?this._db.columns().filter(function(t,e){return e>0}):e}field(t,e){const s={transform:/* @__PURE__ */o(t=>t,"transform")};return this.pivot()?0===e?s:this.fields()[t+1]:-1===t?s:this.fields()[e]}calcFieldsIndex(t){let e=-1,o=0;const s=this.columns().length;let i=0;for(;e<s&&i<=t;)e++,this.isHidden(e)?o++:i++;return t+o}getEmptyColumnIdxArr(t,e){const o=[];if(this.hideEmptyColumns())for(let s=0;s<t.length;s++){let t=!0;for(let o=0;o<e.length;o++)if(-1===["",null,void 0].indexOf(e[o][s])){t=!1;break}t&&o.push(s)}return o}enter(t,e){super.enter(t,e),this._placeholderElement.style("overflow","hidden"),this.tableDiv=e.append("div").attr("class","tableDiv"),this.table=this.tableDiv.append("table"),this.fixedHead=e.append("div").classed("header-wrapper",!0),this.fixedHeadTable=this.fixedHead.append("table"),this.fixedThead=this.fixedHeadTable.append("thead").append("tr"),this.unfixedThead=this.table.append("thead").append("tr"),this.tbody=this.table.append("tbody"),this.tfoot=this.table.append("tfoot").append("tr"),this.fixedCol=e.append("div").classed("rows-wrapper",!0),this.fixedColTable=this.fixedCol.append("table"),this.fixedColHead=this.fixedColTable.append("thead"),this.fixedColHeadRow=this.fixedColHead.append("tr"),this.fixedColBody=this.fixedColTable.append("tbody"),this.fixedColFoot=this.fixedColTable.append("tfoot"),this.fixedColFootRow=this.fixedColFoot.append("tr"),this.tableDiv.style("overflow","auto")}update(t,e){super.update(t,e);const s=this,n=s.tableColumns(),r=s.tableData(),a=this.tableDiv.node().scrollLeft;this._empty_col_idx_arr=this.getEmptyColumnIdxArr(n,r),this.element().selectAll("table,tbody,th,td").style("width",null),!this.sortByFieldIndex_exists()||this._prevSortByFieldIndex===this.sortByFieldIndex()&&this._prevDescending===this.descending()||(i.multiSort(r,[{idx:this.sortByFieldIndex(),reverse:this.descending()}]),this._prevSortByFieldIndex=this.sortByFieldIndex(),this._prevDescending=this.descending()),this._hasChildWidgets=!1,this.fixedHeader()?this.thead=this.fixedThead:this.thead=this.unfixedThead,this.fixedHead.style("display",this.fixedHeader()?"table-row":"none"),this.unfixedThead.style("display",this.fixedHeader()?"none":"table-row");const c=this.thead.selectAll("th").data(this.showHeader()?n.filter(function(t,e){return!s.isHidden(e)&&-1===s._empty_col_idx_arr.indexOf(e)}):[]),u=c.enter().append("th").each(function(t){const e=l(this);e.append("span").attr("class","thText"),e.append("span").attr("class","thIcon")}).on("click",function(t,e){s.headerClick(t,e)}).merge(c).style("background-color",this.theadRowBackgroundColor()).style("border-color",this.theadCellBorderColor()).style("color",this.theadFontColor()).style("font-size",this.theadFontSize());if(u.select(".thText").style("font-family",this.theadFontFamily()).text(function(t,e){const o=s.calcFieldsIndex(e);return s.field(-1,o).transform(t)}),u.select(".thIcon").text(function(t,e){return s.descending()?s.sortByFieldIndex()===e?"":"":s.sortByFieldIndex()===e?"":""}),c.exit().remove(),u.order(),this.paginationLimit()&&this.pagination(r.length>=parseInt(this.paginationLimit())),this.pagination()){null===this._paginator.target()&&this._paginator.target(e.node());const t=this._calcRowsPerPage(u);this.itemsPerPage(t),this._paginator.numItems(r.length),this._tNumPages=Math.ceil(this._paginator.numItems()/this.itemsPerPage())||1,(this.pageNumber()>this._tNumPages||this.pageNumber()<=0)&&this.pageNumber(1),this._paginator._onSelect=function(t,e){s.pageNumber(t),s.render()}}else this._paginator.numItems(0);const h=this.pageNumber()-1,p=this.itemsPerPage(),d=h*p,g=h*parseInt(p)+parseInt(p);let f;f=this.topN()?r.slice(0,this.topN()):this.pagination()?r.slice(d,g):r;const _=[this.totalledLabel()?this.totalledLabel():null];if(0!==this.totalledColumns().length){for(let e=0;e<this.totalledColumns().length;e++)this.totalledColumns()[e]=+this.totalledColumns()[e];for(let e=1;e<n.length;e++){let t=0;if(-1!==this.totalledColumns().indexOf(e)){for(let o=0;o<f.length;o++)t+=f[o][e];_.push(t)}else _.push("")}const t=this.tfoot.selectAll("td").data(_);t.enter().append("td").merge(t).style("background-color",this.tfootRowBackgroundColor()).style("border-color",this.tfootCellBorderColor()).style("color",this.tfootFontColor()).style("font-size",this.tfootFontSize())[this.renderHtmlDataCells()?"html":"text"](function(t,e){return s.fields()[e].transform(t)}),t.exit().remove()}const b=this.tbody.selectAll("tr.tr_"+this.id()).data(f.map(function(t,e){for(let o=0;o<t.length;++o)void 0===t[o]&&(t[o]=null);return{rowIdx:e,row:t}})),w=b.enter().append("tr").attr("class","tr_"+this.id()).on("click.selectionBag",function(t){if(t.row){const e=t.row,o=t.rowIdx;s.selectionBagClick(e,o),s.applyRowStyles(s.getBodyRow(o)),s.applyFirstColRowStyles(s.getFixedRow(o))}},!0).on("mouseover",function(t){if(t.row){const e=t.rowIdx,o=s.getFixedRow(e);o.empty()||o.classed("hover",!0);const i=s.getBodyRow(e);i.classed("hover",!0),s.applyStyleToRows(i),s.applyFirstColRowStyles(o)}}).on("mouseout",function(t){if(t.row){const e=t.rowIdx,o=s.getFixedRow(e);o.classed("hover",!1);const i=s.getBodyRow(e);i.classed("hover",!1),s.applyStyleToRows(i),s.applyFirstColRowStyles(o)}}).merge(b).classed("selected",function(t){const e=t.row;return s._selectionBag.isSelected(s._createSelectionObject(e))}).classed("trId"+this._id,!0);b.exit().remove(),this.applyStyleToRows(w);const x=w.selectAll(".td_"+this.id()).data(function(t,e){return t.row.filter(function(t,e){return e<n.length&&!s.isHidden(e)&&-1===s._empty_col_idx_arr.indexOf(e)}).map(function(e,o){return{rowInfo:t,colIdx:o,cell:e}})});x.enter().append("td").attr("class","td_"+this.id()).on("click",function(t){t.rowInfo&&s.click(s.rowToObj(t.rowInfo.row),s.columns()[t.colIdx],s._selectionBag.isSelected(s._createSelectionObject(t.rowInfo.row)))}).on("dblclick",function(t,e){t.rowInfo&&s.dblclick(s.rowToObj(t.rowInfo.row),s.columns()[t.colIdx],s._selectionBag.isSelected(s._createSelectionObject(t.rowInfo.row)))}).each(function(t,e){const o=s.getColumnAlignment(t.rowInfo.rowIdx,t.colIdx,t.cell);l(this).style("height",null).style("text-align",o).style("vertical-align",s.verticalAlign()).classed("tr-"+t.rowInfo.rowIdx+"-td-"+e,!0)}).merge(x).each(function(t){const e=l(this);if(t.cell instanceof m){e[s.renderHtmlDataCells()?"html":"text"](null);const o=e.selectAll(".div_"+s.id()).data([t.cell],function(t){return t.id()});o.exit().each(function(t){t.target(null)}).remove(),o.enter().append("div").attr("class","div_"+s.id()).style("width",s.minWidgetWidth()+"px").style("height",s.minWidgetHeight()+"px").each(function(t){const e=l(this);t._parentWidget=s,t._class.indexOf("childWidget")<0&&(t._class="childWidget "+t._class),t.target(null).target(e.node())}).merge(o).each(function(t){t.resize().lazyRender(),s._hasChildWidgets=!0})}else{e.selectAll(".div_"+s.id()).remove();const o=s.calcFieldsIndex(t.colIdx);e[s.renderHtmlDataCells()?"html":"text"](s.field(t.rowInfo.rowIdx,o).transform(t.cell))}}),x.exit().remove();const v=parseInt(this.thead.node().offsetHeight);this.pagination()&&this._hasChildWidgets?(this.tableDiv.style("overflow-y","auto"),this.table.style("margin-bottom","50px"),console.warn("Warning: displaying another widget in the table may cause problems with pagination")):(this.tableDiv.style("overflow-y",null),this.table.style("margin-bottom",null)),this.size(this._size);let C=0;const S=this.fixedColHeadRow.selectAll("th").data(this.fixedColumn()&&this.showHeader()?[n[0]]:[]),R=S.enter().append("th").each(function(t){const e=l(this);e.append("span").attr("class","thText"),e.append("span").attr("class","thIcon")}).on("click",function(t,e){s.headerClick(t,e)}).merge(S).style("background-color",this.theadRowBackgroundColor()).style("border-color",this.theadCellBorderColor()).style("color",this.theadFontColor()).style("font-size",this.theadFontSize());R.select(".thText").style("font-family",this.theadFontFamily()).text(function(t){return t}),R.select(".thIcon").text(function(t,e){return s.descending()?s.sortByFieldIndex()===e?"":"":s.sortByFieldIndex()===e?"":""}),S.exit().remove();const I=this.fixedColBody.selectAll("tr").data(this.fixedColumn()?f:[]),k=I.enter().append("tr").attr("class",function(){return"trId"+s._id}).merge(I).on("click",function(t,e){l(w[0][e]).on("click.selectionBag")(w.data()[e],e)}).on("mouseover",function(t,e){l(w[0][e]).on("mouseover")(w.data()[e],e)}).on("mouseout",function(t,e){l(w[0][e]).on("mouseout")(w.data()[e],e)}).classed("selected",function(t){return s._selectionBag.isSelected(s._createSelectionObject(t))});I.exit().remove();const W=k.selectAll("td").data(function(t,e){return[t[0]]}),T=W.enter().append("td").merge(W)[this.renderHtmlDataCells()?"html":"text"](function(t){return"string"==typeof t?t.trim():"number"==typeof t?t:""});W.exit().remove();const P=this.fixedColFootRow.selectAll("td").data(this.fixedColumn()&&this.totalledLabel()?[this.totalledLabel()]:[]),E=P.enter().append("td").merge(P)[this.renderHtmlDataCells()?"html":"text"](function(t){return"string"==typeof t?t.trim():"number"==typeof t?t:""});let B;if(P.exit().remove(),this.fixedColumn()&&!this.fixedSize()&&E.length&&(this.showHeader()?(E.property("offsetWidth"),E.property("offsetWidth"),C=E.property("offsetWidth")):C=E.property("offsetWidth"),this.fixedCol.style("position","absolute").style("margin-top",-this.tableDiv.property("scrollTop")+v+"px"),T.style("width",C+"px"),this.fixedColHead.style("position","absolute").style("margin-top",(this.fixedHeader()?this.tableDiv.property("scrollTop"):0)-v+"px"),R.style("width",C+"px"),w.each(function(t,e){const o=l(this).select("td").property("offsetHeight");l(T[e][0]).style("height",o+"px")})),this.table.style("margin-left",-C+"px"),this.tableDiv.style("margin-left",C+"px").style("width",this.width()-C+"px"),w.empty()||this.setColumnWidths(w),this.fixedSize()){const t=l(".tableDiv > table").node();if(t){let o,i;B=t.getBoundingClientRect(),0!==B.width&&0!==B.height?(D(),N()):(B.height-v<=s.tableDiv.property("offsetHeight")?N():s.fixedHeader()?(o=s.tableDiv.property("offsetHeight"),o+="px"):o="100%",B.width-C<s.tableDiv.property("offsetWidth")?D():s.fixedColumn()?(i=s.tableDiv.property("offsetWidth")-C,i+="px"):i="100%"),e.classed("childWidget")&&(s._placeholderElement.style("width",i+"px").style("height",o+"px"),s.tableDiv.style("overflow","hidden")),s.size({width:i,height:o})}}function D(){B.width,s.tbody.property("offsetWidth")}function N(){s.tbody.property("offsetHeight")}this.setOnScrollEvents(this.tableDiv.node(),v),o(D,"calcWidth"),o(N,"calcHeight"),this._paginator.render(),setTimeout(function(){s._paginator.right((s.hasVScroll(e)?y.getScrollbarWidth():0)+s._paginatorTableSpacing).bottom((s.hasHScroll(e)?y.getScrollbarWidth():0)+s._paginatorTableSpacing).render(function(){s.tableDiv.node().scrollLeft=a})},0)}exit(t,e){this._paginator.target(null),super.exit(t,e)}setColumnWidths(t){const e=t.filter(function(t,e){return 0===e});let o=l(null);e.each(function(t){o=_(this.childNodes)});const s=this.fixedHeader()?this.thead.property("offsetHeight"):0;let i=1;const n={};o.each(function(t,e){n[e]=this.offsetWidth});this.thead.selectAll("th").each(function(t,e){const s=this.offsetWidth,r=o.empty()?0:n[e],a=s>=r?s:r;this.style.width=a+"px",o.filter((t,e)=>0===e).each(function(){l(this).style("width",a+"px")}),i+=a}),this.thead.style("position",this.fixedHeader()?"absolute":"relative").style("width",i+"px").style("margin-top","0px"),this.table.style("width",i+"px"),this.tableDiv.style("margin-top",(this.fixedHeader()?s:0)+"px"),this.tbody.style("width",i+"px")}getBodyRow(t){return this.table.selectAll("tbody tr.trId"+this._id).filter(function(e,o){return o===t})}getFixedRow(t){return this._element.selectAll(".rows-wrapper tbody tr").filter(function(e,o){return o===t})}setOnScrollEvents(t,e){const o=this;t.onscroll=function(t){const s=t.target.scrollTop,i=t.target.scrollLeft;o.fixedHeader()&&o.thead.style("margin-left",-i+"px"),o.fixedColumn()&&(o.fixedCol.style("margin-top",-s+e+"px"),o.fixedHeader()&&o.fixedColHead.style("margin-top",s-e+"px"))}}_generateTempRow(){const t=this.tbody.append("tr");return t.append("td").text("QQQ"),t}_createSelectionObject(t){const e=this;return{_id:t,element:/* @__PURE__ */o(()=>e.tbody?e.tbody.selectAll("tr").filter(function(e){return e===t}):l(null),"element")}}_calcRowsPerPage(t){0===this._paginator.numItems()&&(this._paginator.numItems(1),this.itemsPerPage(1)),this._paginator.render();const e=this.thead.selectAll("th").node()?this.thead.selectAll("th").node().clientHeight:0,o=this.tfoot.selectAll("td").node()?this.tfoot.selectAll("td").node().clientHeight:0,s=this._generateTempRow(),i=s.node().clientHeight;s.remove();const n=this.calcHeight(this._paginator.element());let r=Math.floor((this.height()-e-o-n-(this.table.style("width")>=this.table.style("width")?y.getScrollbarWidth():0)-2*this._paginatorTableSpacing)/i)||1;return 0!==this.totalledColumns().length&&(r-=1),r}sort(t){return this.sortByFieldIndex()!==t?this.descending(!1):this.descending(!this.descending()),this.sortByFieldIndex(t),this}selection(t){return arguments.length?(this._selectionBag.set(t.map(function(t){return this._createSelectionObject(t)},this)),this):this._selectionBag.get().map(function(t){return t._id})}selectionBagClick(t,e){if(this.multiSelect()&&f().shiftKey&&this._selectionPrevClick){let e=!1;const o=this.tableData().filter(function(o,s){let i=!1;return o!==t&&o!==this._selectionPrevClick||(e&&(i=!0),e=!e),e||i},this);this.selection(o)}else if(this.multiSelect())this._selectionBag.click(this._createSelectionObject(t),f),this._selectionPrevClick=t;else{const e=this._createSelectionObject(t);this._selectionBag.click(e,{ctrlKey:this._selectionBag.isSelected(e)}),this._selectionPrevClick=t}this.render()}applyHoverRowStyles(t){t.style("color",this.tbodyHoverRowFontColor()).style("background-color",this.tbodyHoverRowBackgroundColor())}applySelectedRowStyles(t){t.style("color",this.tbodySelectedRowFontColor()).style("background-color",this.tbodySelectedRowBackgroundColor())}applyRowStyles(t,e=!1){const o=t.datum().row;t.style("color",e?this.tbodyFirstColFontColor():this.tbodyFontColor()).style("background-color",e?this.tbodyFirstColBackgroundColor():this.tableZebraColor_exists()&&this.tableData().indexOf(o)%2?this.tbodyRowBackgroundColor():this.tableZebraColor())}applyFirstColRowStyles(t){this.applyStyleToRows(t,!0)}applyStyleToRows(t,e=!1){e=void 0!==e&&e;const o=this;t.each(function(){const t=l(this);t.classed("hover")?o.applyHoverRowStyles(t):t.classed("selected")?o.applySelectedRowStyles(t):o.applyRowStyles(t,e)})}getColumnAlignment(t,e,o){const s=this.calcFieldsIndex(e);switch(this.field(t,s).__prop_type){case"string":return this.stringAlign();case"number":return this.numberAlign();case"":case void 0:switch(typeof o){case"string":return this.stringAlign();case"number":return this.numberAlign()}}return null}serializeState(){return{selection:this._selectionBag.get().map(function(t){return t._id}),data:this.data()}}deserializeState(t){if(t){if(t.selection){const e=this;this._selectionBag.set(t.selection.map(function(t){return e._createSelectionObject(t)}))}t.data&&this.data(t.data)}return this}click(t,e,o){}dblclick(t,e,o){}headerClick(t,e){this.sort(e).render()}};o(be,"Table");let we=be;function xe(t){return'<div class="colorBlock" style="background-color:'+t+';"></div>'}we.prototype._class+=" other_Table",we.prototype.publish("renderHtmlDataCells",!1,"boolean","enable or disable HTML within cells",null,{tags:["Private"]}),we.prototype.publish("pagination",!0,"boolean","Enable or disable pagination",null,{tags:["Private"]}),we.prototype.publish("paginationLimit",null,"number","Maximum number of rows allowed before pagination defaults to on",null,{tags:["Private"]}),we.prototype.publishProxy("itemsPerPage","_paginator"),we.prototype.publishProxy("pageNumber","_paginator","pageNumber",1),we.prototype.publishProxy("adjacentPages","_paginator"),we.prototype.publish("topN",null,"number","Total number or rows of data to be displayed in the table",null,{tags:["Private"]}),we.prototype.publish("pivot",!1,"boolean","Pivot Table"),we.prototype.publish("showHeader",!0,"boolean","Show or hide the table header",null,{tags:["Private"]}),we.prototype.publish("fixedHeader",!0,"boolean","Enable or disable fixed table header",null,{tags:["Private"]}),we.prototype.publish("fixedColumn",!1,"boolean","Enable or disable fixed first column",null,{tags:["Private"]}),we.prototype.publish("multiSelect",!1,"boolean","Multiple Selection",null,{tags:["Basic"]}),we.prototype.publish("fixedSize",!1,"boolean","Fix Size to Min Width/Height"),we.prototype.publish("hideEmptyColumns",!1,"boolean","Hide columns with all empty cells"),we.prototype.publish("theadFontSize",null,"string","Table head font size",null,{tags:["Basic"],optional:!0}),we.prototype.publish("tbodyFontSize",null,"string","Table body font size",null,{tags:["Basic"],optional:!0}),we.prototype.publish("tfootFontSize",null,"string","Table body font size",null,{tags:["Basic"],optional:!0}),we.prototype.publish("theadFontColor",null,"html-color","Table head font color",null,{tags:["Basic"],optional:!0}),we.prototype.publish("tbodyFontColor",null,"html-color","Table body font color",null,{tags:["Basic"],optional:!0}),we.prototype.publish("tfootFontColor",null,"html-color","Table body font color",null,{tags:["Basic"],optional:!0}),we.prototype.publish("theadFontFamily",null,"string","Table head font family",null,{tags:["Basic"],optional:!0}),we.prototype.publish("tbodyFontFamily",null,"string","Table body font family",null,{tags:["Basic"],optional:!0}),we.prototype.publish("tfootFontFamily",null,"string","Table body font family",null,{tags:["Basic"],optional:!0}),we.prototype.publish("theadCellBorderColor",null,"html-color","Table head cell border color",null,{tags:["Basic"],optional:!0}),we.prototype.publish("tfootCellBorderColor",null,"html-color","Table head cell border color",null,{tags:["Basic"],optional:!0}),we.prototype.publish("theadRowBackgroundColor",null,"html-color","Table head row color",null,{tags:["Basic"],optional:!0}),we.prototype.publish("tfootRowBackgroundColor",null,"html-color","Table head row color",null,{tags:["Basic"],optional:!0}),we.prototype.publish("tbodyCellBorderColor",null,"html-color","Table body cell border color",null,{tags:["Basic"],optional:!0}),we.prototype.publish("tbodyRowBackgroundColor",null,"html-color","Table body row color",null,{tags:["Basic"],optional:!0}),we.prototype.publish("tbodyFirstColFontColor",null,"html-color","Table body first column font color",null,{tags:["Basic"],optional:!0}),we.prototype.publish("tbodyFirstColBackgroundColor",null,"html-color","Table body first column background color",null,{tags:["Basic"],optional:!0}),we.prototype.publish("tbodyHoverRowFontColor",null,"html-color","Table body hover row font color",null,{tags:["Basic"],optional:!0}),we.prototype.publish("tbodyHoverRowBackgroundColor",null,"html-color","Table body hover row background color",null,{tags:["Basic"],optional:!0}),we.prototype.publish("tbodySelectedRowFontColor",null,"html-color","Table body selected row color",null,{tags:["Basic"],optional:!0}),we.prototype.publish("tbodySelectedRowBackgroundColor",null,"html-color","Table body selected row color",null,{tags:["Basic"],optional:!0}),we.prototype.publish("tableZebraColor",null,"html-color","Table zebra row color",null,{tags:["Basic"],optional:!0}),we.prototype.publish("totalledColumns",[],"array","Array of indices of the columns to be totalled",null,{tags:["Basic"],optional:!0,disable:/* @__PURE__ */o(t=>t.pivot(),"disable")}),we.prototype.publish("totalledLabel",null,"string","Adds a label to the first column of the 'Totalled' row",null,{tags:["Basic"],optional:!0,disable:/* @__PURE__ */o(t=>t.pivot(),"disable")}),we.prototype.publish("hiddenColumns",[],"array","Array of indices of the columns to be hidden",null,{tags:["Basic"],optional:!0,disable:/* @__PURE__ */o(t=>t.pivot(),"disable")}),we.prototype.publish("stringAlign","left","set","Cell alignment for strings",["left","right","center"],{tags:["Basic"],optional:!0}),we.prototype.publish("numberAlign","right","set","Cell alignment for numbers",["left","right","center"],{tags:["Basic"],optional:!0}),we.prototype.publish("verticalAlign",null,"set","Cell vertical alignment",[null,"middle","top","bottom"],{tags:["Basic"],optional:!0}),we.prototype.publish("minWidgetWidth",320,"number","Minimum width of a child widget",null,{tags:["Basic"],optional:!0}),we.prototype.publish("minWidgetHeight",240,"number","Minimum height of a child widget",null,{tags:["Basic"],optional:!0}),we.prototype.publish("sortByFieldIndex",null,"number","Index for the field/column to sort the data",null,{tags:["Basic"],optional:!0}),we.prototype.publish("descending",!1,"boolean","Direction for sorting the data: ascending (true) or descending (false)",null,{tags:["Basic"],optional:!0}),o(xe,"_htmlColorBlock");const ve=class _Legend extends we{_targetWidget;_targetWidgetMonitor;constructor(){super(),this.showHeader(!1),this.pagination(!1)}isRainbow(){const t=this.getWidget();return t&&t._palette&&"rainbow"===t._palette.type()}targetWidget(t){if(!arguments.length)return this._targetWidget;this._targetWidget=t,this._targetWidgetMonitor&&(this._targetWidgetMonitor.remove(),delete this._targetWidgetMonitor);const e=this;return this._targetWidgetMonitor=this._targetWidget.monitor(function(t,o,s,i){switch(t){case"chart":case"columns":case"data":case"paletteID":e.lazyRender()}}),this}getWidget(){return this._targetWidget&&"chart_MultiChart"===this._targetWidget.classID()?this._targetWidget.chart():this._targetWidget}getPalette(){const t=this.getWidget();if(t&&t._palette)switch(t._palette.type()){case"ordinal":return n.ordinal(t._palette.id());case"rainbow":return n.rainbow(t._palette.id())}return n.ordinal("default")}enter(t,e){super.enter(t,e),l(t.parentNode).style("overflow-y","auto"),this.renderHtmlDataCells(!0),this.fixedHeader(!1),this.fixedSize(!0),e.classed("other_Legend",!0)}update(t,e){let o=[];if(this._targetWidget){const t=this.getPalette();switch(t.type()){case"ordinal":const e=t;switch(this.dataFamily()){case"2D":o=this._targetWidget.data().map(function(t){return[xe(e(t[0])),t[0]]},this);break;case"ND":o=this._targetWidget.columns().filter(function(t,e){return e>0}).map(function(t){return[xe(e(t)),t]},this)}break;case"rainbow":const s=t,i=a(this.rainbowFormat()),n=this.getWidget(),r=this.rainbowBins(),l=n._dataMinWeight,c=n._dataMaxWeight,u=(c-l)/(r-1);o.push([xe(s(l,l,c)),i(l)]);for(let t=1;t<r-1;++t){const e=u*t;o.push([xe(s(e,l,c)),i(Math.floor(e))])}o.push([xe(s(c,l,c)),i(c)])}}this.columns(["Key","Label"]),this.data(o),super.update(t,e),e.classed("horiz-legend","horizontal"===this.orientation());const s=e.select(".tableDiv > table"),i=s.node().getBoundingClientRect(),n=this._placeholderElement.node().getBoundingClientRect();e.select(".tableDiv").style("overflow","visible");const r=n.height/2-i.height/2,l=n.width/2-i.width/2;s.style("position","absolute").style("top",r+"px").style("left",l+"px");const c=this.pageNumber()-1,u=this.itemsPerPage(),h=c*u,p=c*parseInt(u)+parseInt(u);let d;d=this.pagination()?this.data().slice(h,p):this.data();const g=this.tbody.selectAll("tr").data(d),f=this;g.on("click",function(t,e){f.onClick(t,e)}).on("dblclick",function(t,e){f.onDblClick(t,e)}).on("mouseover",function(t,e){f.onMouseOver(t,e)})}exit(t,e){this._targetWidgetMonitor&&(this._targetWidgetMonitor.remove(),delete this._targetWidgetMonitor),super.exit(t,e)}onClick(t,e){}onDblClick(t,e){}onMouseOver(t,e){}};o(ve,"Legend");let Ce=ve;Ce.prototype._class+=" other_Legend",Ce.prototype.publish("dataFamily","ND","set","Type of data",["1D","2D","ND","map","any","other"],{tags:["Private"]}),Ce.prototype.publish("orientation","vertical","set","Orientation of Legend rows",["vertical","horizontal"],{tags:["Private"]}),Ce.prototype.publish("rainbowFormat",",","string","Rainbow number formatting",null,{tags:["Private"],optional:!0,disable:/* @__PURE__ */o(t=>!t.isRainbow(),"disable")}),Ce.prototype.publish("rainbowBins",8,"number","Number of rainbow bins",null,{tags:["Private"],disable:/* @__PURE__ */o(t=>!t.isRainbow(),"disable")});const Se=we.prototype.getBBox;Ce.prototype.getBBox=function(t,e){const o=Se.apply(this,arguments),s=this.element().select(".tableDiv > table");if(!s.empty()){const t=s.node().getBoundingClientRect(),i=t.width+8+(this.hasVScroll(this._placeholderElement)?y.getScrollbarWidth():0),n=t.height+8+(this.hasHScroll(this._placeholderElement)?y.getScrollbarWidth():0);return{x:o.x,y:o.y,width:(e?Math.round(i):i)*this._scale,height:(e?Math.round(n):n)*this._scale}}return o};const Re=class _MorphText extends d{_fontWidth;_textElement;constructor(){super()}enter(t,e){if(!this.fontSize()){const e=window.getComputedStyle(t,null);this.fontSize(parseInt(e.fontSize))}this._fontWidth=32*this.fontSize()/48,this._textElement=e.append("g")}dateTime(){const t=/* @__PURE__ */new Date,e=1===t.getSeconds().toString().length?"0"+t.getSeconds():t.getSeconds(),o=1===t.getMinutes().toString().length?"0"+t.getMinutes():t.getMinutes(),s=1===t.getHours().toString().length?"0"+t.getHours():t.getHours(),i=t.getHours()>=12?"pm":"am";return["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][t.getDay()]+" "+["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][t.getMonth()]+" "+t.getDate()+" "+t.getFullYear()+" "+s+":"+o+":"+e+i}update(t,e){const o=this,s=this._textElement.selectAll("text").data(this.data(),function(t){return t.id});s.attr("class","update"),this.transition.apply(s).attr("x",function(t,e){return(-o.data().length/2+e)*o._fontWidth+o._fontWidth/2});const i=s.enter().append("text").attr("class","enter").attr("font-size",this.fontSize()).attr("dy",".35em").attr("y",(this.reverse()?1:-1)*this._fontWidth*2).attr("x",function(t,e){return(-o.data().length/2+e)*o._fontWidth+o._fontWidth/2}).style("fill-opacity",1e-6).style("text-anchor",this.anchor()).text(function(t){return t.text});this.transition.apply(i).attr("y",0).style("fill-opacity",1),s.exit().attr("class","exit"),this.transition.apply(s.exit()).attr("y",(this.reverse()?-1:1)*this._fontWidth*2).style("fill-opacity",1e-6).remove()}};o(Re,"MorphText");let Ie=Re;Ie.prototype._class+=" other_MorphText",Ie.prototype.publish("anchor","middle","set","Sets anchor point",["middle"],{tags:["Basic"]}),Ie.prototype.publish("fontSize",14,"number","Sets fontsize",null,{tags:["Basic"]}),Ie.prototype.publish("reverse",!1,"boolean","Reverse Animation",null,{tags:["Basic"]}),Ie.prototype.publish("text","","string","Sets text/data of widget",null,{tags:["Basic"]});const ke=Ie.prototype.text;Ie.prototype.text=function(t){const e=ke.apply(this,arguments);if(arguments.length){const e={},o=t.split("");this.data(o.map(function(t){const o="_"+t;return void 0===e[o]&&(e[o]=0),e[o]++,{text:t,id:t.charCodeAt(0)+1024*e[o]}}))}return e};const We=class _NestedTable extends we{constructor(){super(),this.minWidgetHeight(240),this.minWidgetWidth(360)}};o(We,"NestedTable");let Te=We;Te.prototype._class+=" other_NestedTable";const Pe=Te.prototype.columns;Te.prototype.columns=function(t){return arguments.length?(this._columns=t,Pe.call(this,t.map(function(t){return"object"==typeof t?t.label:t}))):Pe.apply(this,arguments)};const Ee=Te.prototype.data;Te.prototype.data=function(t){if(arguments.length){const e=this;return Ee.call(this,t.map(function(t){return t.map(function(t,o){if(t instanceof Array){let s=[];if("object"==typeof e._columns[o]&&e._columns[o].columns)s=e._columns[o].columns;else for(let i=0;i<t.length;++i)s.push(e._columns[o]+"."+i);return(new we).columns(s).data(t)}return t})}))}return Ee.apply(this,arguments)};const Be=class _Column extends b{_owner;constructor(){super()}owner(t){return arguments.length?(this._owner=t,this):this._owner}valid(){return!!this.headerLabel()}};o(Be,"Column");let De=Be;De.prototype._class+=" other_Opportunity.Column",De.prototype.publish("headerLabel",null,"string","Header value of a table",function(){return this._owner?this._owner.columns():[]},{tags:["Basic"],optional:!0});const Ne=class _MouseHoverColumn extends b{_owner;constructor(){super()}owner(t){return arguments.length?(this._owner=t,this):this._owner}valid(){return!!this.hoverValue()&&!!this.hoverList()}};o(Ne,"MouseHoverColumn");let Ae=Ne;Ae.prototype._class+=" other_Opportunity.MouseHoverColumn",Ae.prototype.publish("hoverValue",null,"string","Hover value of a table",function(){return this._owner?this._owner.columns():[]},{tags:["Basic"],optional:!0}),Ae.prototype.publish("hoverList",null,"set","Hover value of a table",function(){return this._owner?this._owner.getIds():[]},{tags:["Basic"],optional:!0});const Oe=class _ColumnDropdown extends b{_owner;constructor(){super()}owner(t){return arguments.length?(this._owner=t,this):this._owner}valid(){return!!this.columnIndex()&&!!this.ColumnDropdownList()}};o(Oe,"ColumnDropdown");let He=Oe;He.prototype._class+=" other_Opportunity.ColumnDropdown",He.prototype.publish("columnIndex",null,"number","Column index for display context data based on column dropdown list selction",{},{tags:["Basic","Shared"]}),He.prototype.publish("ColumnDropdownList",null,"set","column value of a table",function(){return this._owner?this._owner.getIds():[]},{tags:["Basic"],optional:!0});const Me=class _Opportunity extends d{groupCount;svg;tooltipdiv;Column;MouseHoverColumn;ColumnDropdown;constructor(){super(),this._drawStartPos="origin",this.groupCount=7}enter(t,e){super.enter(t,e);const o=25*(this.data().length+1)+30;this.svg=e.append("g").attr("width",100*this.groupCount+1).attr("height",o),this.svg.append("defs").append("marker").classed("arrowhead",!0).attr("id","end-arrow").attr("viewBox","0 -5 10 10").attr("refX",6).attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("svg:path").attr("d","M0,-5L10,0L0,5").attr("fill","rgb(100,100,100)"),this.tooltipdiv=l("body").append("div").attr("class","other_Opportunity-tooltip tooltip").style("opacity",0)}update(t,e){super.update(t,e);const o=this,s=this.data(),i=this.opportunityId();s.sort(function(t,e){return t.cur_group>e.cur_group?1:t.cur_group<e.cur_group?-1:0});const n=[];for(let l=1;l<=o.groupCount;l++)n.push(l);const r=30,a=14,c=25*(s.length+1)+r,u=this.width(),h=30,p=u/o.groupCount-h,d=this.svg.selectAll(".group").data(n);d.enter().append("rect").attr("class","group"),d.attr("x",function(t,e){return e*u/o.groupCount+1}).attr("y",r).attr("width",u/this.groupCount).attr("height",c-r),d.exit().remove();const g=this.svg.selectAll(".group_headings").data(n);if(g.enter().append("text").attr("class","group_headings").attr("y",20),g.attr("x",function(t,e){return e*u/o.groupCount+u/o.groupCount/o.groupCount}).text(function(t,e){return o.headerLabels().length>0&&o.headerLabels()[e]&&o.headerLabels()[e].headerLabel()?o.headerLabels()[e].headerLabel():""}),g.exit().remove(),"prev_group"===this.previousGroup()&&"cur_group"===this.currentGroup()){const t=this.svg.selectAll(".node_date_change").data(s);t.enter().append("g").attr("class","node_date_change update").on("mouseover",function(t){o.tooltipdiv.transition().duration(200).style("opacity",.9);let e="<span style='font-weight:bolder'>Close Date Change </span><br/>";o.mouseHover().forEach(function(o,s){void 0!==o.hoverValue()&&(e=e+"<span style='font-weight:bold'>"+o.hoverValue()+": </span>"+t[o.hoverList()]+"<br/>")});let s=t.prevdate+"";s=s.replace(/(\d\d\d\d)(\d\d)(\d\d)/g,"$3-$2-$1");let i=t.curdate+"";i=i.replace(/(\d\d\d\d)(\d\d)(\d\d)/g,"$3-$2-$1"),e=e+"<span style='font-weight:bold'>From: </span>"+s+"<br/><span style='font-weight:bold'>To: </span>"+i+"<br/>";const n=f();o.tooltipdiv.html(e).style("left",n.pageX+"px").style("top",n.pageY-50+"px")}).on("mouseout",function(t){o.tooltipdiv.transition().duration(500).style("opacity",0)}).each(function(t){l(this).append("rect").attr("class","node_date_change_rect").attr("width",5).attr("height",a).attr("rx",6).attr("ry",6)}),t.attr("transform",function(t,e){return"translate("+(9*u/o.groupCount+h-80)+","+(e+24*e+12+r)+")"}),t.exit().remove();const e=this.svg.selectAll(".node_prev_group").data(s);e.enter().append("g").attr("class","node_prev_group").on("mouseover",function(t,e){o.tooltipdiv.transition().duration(200).style("opacity",.9);let s="";o.mouseHover().forEach(function(e,o){void 0!==e.hoverValue()&&(s=s+"<span style='font-weight:bold'>"+e.hoverValue()+": </span>"+t[e.hoverList()]+"<br/>")});const i=f();o.tooltipdiv.html(s).style("left",i.pageX+"px").style("top",i.pageY-100+"px")}).on("mouseout",function(t){o.tooltipdiv.transition().duration(500).style("opacity",0)}).each(function(t){const e=l(this);e.append("rect").attr("class","node_prev_rect").attr("rx",6).attr("ry",6),e.append("text").attr("class","node_prev_text")}),e.classed("update",!0).classed("changed",function(t){return 0!==t.delta}).attr("transform",function(t,e){return"translate("+((t.prev_group-1)*u/o.groupCount+15)+","+(e+24*e+10+r)+")"}).each(function(t){const e=l(this).selectAll(".arrow").data(0!==t.delta?[t]:[]);e.enter().append("line").attr("class","arrow update"),e.attr("x1",function(t){return t.delta>0?p:0}).attr("y1",7).attr("x2",function(t){return t.delta>0?p+h-4+(Math.abs(t.delta)-1)*(u/o.groupCount):-30-(Math.abs(t.delta)-1)*(u/o.groupCount)+4}).attr("y2",7).style("stroke-dasharray","3, 3").style("stroke","rgb(100,100,100)").style("marker-end","url(#end-arrow)").style("opacity","1"),e.exit().remove()});e.select(".node_prev_rect").attr("width",p).attr("height",a);e.select(".node_prev_text").attr("dy",10).attr("dx",p/4).text(function(t){return"number"==typeof t[i]?t[i]:t[i].substring(0,14)}),e.exit().remove();const n=this.svg.selectAll(".node_cur_group").data(s);n.enter().append("g").attr("class","node_cur_group").attr("transform",function(t,e){return"translate("+((t.prev_group-1)*u/o.groupCount+15)+","+(e+24*e+10+r)+")"}).on("mouseover",function(t,e){o.tooltipdiv.transition().duration(200).style("opacity",.9);let s="";o.mouseHover().forEach(function(e,o){void 0!==e.hoverValue()&&(s=s+"<span style='font-weight:bold'>"+e.hoverValue()+": </span>"+t[e.hoverList()]+"<br/>")});const i=f();o.tooltipdiv.html(s).style("left",i.pageX+"px").style("top",i.pageY-100+"px")}).on("mouseout",function(t){o.tooltipdiv.transition().duration(500).style("opacity",0)}).each(function(t){const e=l(this);e.append("rect").attr("class","node_cur_rect").attr("fill",function(t){let e;return e=t.delta<0||7===t.cur_group?"#F78181":"#A9F5A9",e}).attr("rx",6).attr("ry",6),e.append("a").append("text").attr("class","node_cur_text")}),n.classed("update",!0).classed("changed",function(t){return 0!==t.delta}).transition().duration(800).ease("linear").attr("transform",function(t,e){return"translate("+((t.cur_group-1)*u/o.groupCount+15)+","+(e+24*e+10+r)+")"}).each("end",function(){_(".arrow").style("opacity","1")});n.select(".node_cur_group a").classed("update",!0).attr("xlink:href",function(t){return o.url()+t.id}).attr("xlink:show","new");n.select(".node_cur_rect").attr("width",p).attr("height",a);n.select(".node_cur_text").classed("update",!0).attr("dy",10).attr("dx",p/4).style("fill","blue").text(function(t){return"number"==typeof t[i]?t[i]:t[i].substring(0,14)}),n.exit().remove()}for(let f=0;f<o.columnData().length;f++)if(o.columnData()[f]&&o.columnData()[f].ColumnDropdownList()){const t=this.svg.selectAll(".columnDataText_"+f).data(s);t.enter().append("g").attr("class","columnDataText_"+f+" update").each(function(t){l(this).append("text")}),t.attr("transform",function(t,e){return"translate("+(o.columnData()[f].columnIndex()*u/o.groupCount+15)+","+(e+24*e+12+r)+")"}).attr("width",5).attr("height",a).attr("rx",6).attr("ry",6);t.select("text").attr("y",-6).attr("dy",28).attr("dx",0).attr("height",20).attr("width",29).text(function(t,e){return t[o.columnData()[f].ColumnDropdownList()]}),t.exit().remove()}}exit(t,e){super.exit(t,e)}getIds(){const t=this.columns();return t.unshift("default"),t}};o(Me,"Opportunity");let je=Me;function Le(t){return t.publishedProperties(!1,!0)}function ze(t,e){t&&t.forEach(function(t){t.widgetWalker(e)})}function Fe(t,e,o){t.widgetWalker(function(t){t.propertyWalker(e,o)})}function Ue(t,e){return JSON.stringify(Ve(t,e))}function Ve(t,e){e=e||["surface","Color","Font","palette"];const s={};function i(t,e){let o=!1;for(const s in e)if(-1!==t.indexOf(e[s])){o=!0;break}return o}return Fe(t,null,function(t,o){if((t[o.id+"_modified"]()||t.publishedProperty(o.id).origDefaultValue!==t.publishedProperty(o.id).defaultValue)&&i(o.id,e)){const e=t._class.trim().split(" ");for(const i in e)if(e.HasOwnProperty(i)){if(void 0===s[e[i]]&&(s[e[i]]={}),void 0===s[e[i]][o.id]){s[e[i]][o.id]=t[o.id]();break}if(s[e[i]][o.id]===t[o.id]())break}}}),o(i,"_isFilterMatch"),s}function qe(t,e){Fe(t,null,function(t,e){t.publishedProperty(e.id).defaultValue=t.publishedProperty(e.id).origDefaultValue}),"function"==typeof e&&e.call(this)}function Ye(t,e,o){const s=this;Fe(t,null,function(t,o){switch(o.type){case"widget":return s.applyTheme(t[o.id](),e),!0;case"widgetArray":return t[o.id]().forEach(function(t){s.applyTheme(t,e)},this),!0;default:t.applyTheme(e)}}),"function"==typeof o&&o.call(this)}function $e(t,e,o,s){const i={__class:t.classID()};if(0!==t._id.indexOf(t._idSeed)&&(i.__id=t._id),t.version&&(i.__version=t.version()),i.__properties={},t.propertyWalker((e,n)=>{if(e[n.id+"_modified"]())switch(n.type){case"widget":return i.__properties[n.id]=$e(e[n.id](),null,o,s&&!t.serializeState),!0;case"widgetArray":case"propertyArray":i.__properties[n.id]=[];return e[n.id]().forEach(e=>{i.__properties[n.id].push($e(e,null,o,s&&!t.serializeState))}),!0;default:i.__properties[n.id]=e[n.id]()}},e),"marshaller_Graph"===t.classID()){const e=t.data().vertices;e&&(this.__vertices=e.map(e=>$e(e,null,o,s&&!t.serializeState)))}return o&&t.data&&(i.__data||(i.__data={}),i.__data.data=t.data()),s&&(t.serializeState?i.__state=t.serializeState():t.data&&(i.__state={data:t.data()})),i}function Ge(t,e,o,s){return JSON.stringify($e(t,e,o,s))}je.prototype._class+=" other_Opportunity",je.prototype.Column=De,je.prototype.MouseHoverColumn=Ae,je.prototype.ColumnDropdown=He,je.prototype.publish("previousGroup","","set","label in Opportunity",function(){return this.getIds()},{tags:["Basic","Shared"]}),je.prototype.publish("currentGroup","","set","label in Opportunity",function(){return this.getIds()},{tags:["Basic","Shared"]}),je.prototype.publish("opportunityId","id","set","Id for label in Opportunity",function(){return this.getIds()},{tags:["Basic","Shared"]}),je.prototype.publish("url",null,"string","URL in Opportunity",{},{tags:["Basic","Shared"]}),je.prototype.publish("width",1100,"number","label in Opportunity",{},{tags:["Basic","Shared"]}),je.prototype.publish("addColumn",null,"string","number of columns in a table",{},{tags:["Basic","Shared"],editor_input:/* @__PURE__ */o((t,e,o,s)=>{o.append("button").attr("id",t.id()+"_addColumn"+s.id).classed("property-input custom-editor-input addColumn update",!0).text("AddColumn").on("click",function(){e.groupCount=e.groupCount+1;t.setProperty(e,s.id,"Added a new column")})},"editor_input")}),je.prototype.publish("removeColumn",null,"string","number of columns in a table",function(){return this.columns()},{tags:["Basic","Shared"],editor_input:/* @__PURE__ */o((t,e,o,s)=>{o.append("button").attr("id",t.id()+"_removeColumn"+s.id).classed("property-input custom-editor-input removeColumn update",!0).text("RemoveColumn").on("click",function(){e.groupCount=e.groupCount-1;t.setProperty(e,s.id,"Removed a column")})},"editor_input")}),je.prototype.publish("headerLabels",[],"propertyArray","Source Columns",null,{autoExpand:De}),je.prototype.publish("mouseHover",[],"propertyArray","mouse hover options",null,{autoExpand:Ae}),je.prototype.publish("columnData",[],"propertyArray","column data",null,{autoExpand:He}),o(Le,"discover"),o(ze,"widgetArrayWalker"),o(Fe,"widgetPropertyWalker"),o(Ue,"serializeTheme"),o(Ve,"serializeThemeToObject"),o(qe,"removeTheme"),o(Ye,"applyTheme"),o($e,"serializeToObject"),o(Ge,"serialize");const Xe=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,applyTheme:Ye,discover:Le,removeTheme:qe,serialize:Ge,serializeTheme:Ue,serializeThemeToObject:Ve,serializeToObject:$e,widgetArrayWalker:ze,widgetPropertyWalker:Fe},Symbol.toStringTag,{value:"Module"}));function Je(t){switch(t){case"widget":case"widgetArray":case"propertyArray":return!0}return!1}o(Je,"hasProperties");const Qe=class _PropertyEditor extends s{_widgetOrig;_parentPropertyEditor;_show_settings;_selectedItems;__meta_sorting;_watch;_childPE=w();constructor(){super(),this._parentPropertyEditor=null,this._tag="div",this._show_settings=!1}parentPropertyEditor(t){return arguments.length?(this._parentPropertyEditor=t,this):this._parentPropertyEditor}depth(){let t=0,e=this.parentPropertyEditor();for(;e;)++t,e=e.parentPropertyEditor();return t}_show_header=!0;show_header(t){return arguments.length?(this._show_header=t,this):this._show_header}show_settings(t){return arguments.length?(this._show_settings=t,this):this._show_settings}rootWidgets(){return this._selectedItems&&this._selectedItems.length?this._selectedItems:this.show_settings()?[this]:this.widget()?[this.widget()]:[]}update(t,e){super.update(t,e);const o=this,s=this.rootWidgets().filter(function(t){return!(t._owningWidget&&t._owningWidget.excludeObjs instanceof Array&&-1!==t._owningWidget.excludeObjs.indexOf(t.classID()))}),i=e.selectAll(`table.property-table.table-${this.depth()}`).data(s,function(t){return"function"!=typeof t.id?`meta-${t.id}`:t.id()});i.enter().append("table").attr("class",`property-table table-${this.depth()}`).each(function(){const t=l(this);o._show_header&&null===o.parentPropertyEditor()&&t.append("thead").append("tr").append("th").attr("colspan","2").each(function(){o.enterHeader(l(this))}),t.append("tbody")}).merge(i).each(function(t){const e=l(this);o._show_header&&null===o.parentPropertyEditor()&&o.updateHeader(e.select("thead > tr > th")),o.renderInputs(e.select("tbody"),t)}),i.exit().each(function(){o.renderInputs(e.select("tbody"),null)}).remove()}exit(t,e){super.exit(t,e),this.watchWidget(null)}watchDepth=0;watchWidget(t){if(this._watch&&(window.__hpcc_debug&&(--this.watchDepth,console.info("watchDepth: "+this.watchDepth)),this._watch.remove(),delete this._watch),t){const e=this;this._watch=t.monitor(function(t,o,s){if(s!==o){(e.parentPropertyEditor()||e).lazyRender()}}),window.__hpcc_debug&&(++this.watchDepth,console.info("watchDepth: "+this.watchDepth))}}enterHeader(t){const e=this;t.append("span"),t.append("i").attr("class","expandIcon fa").on("click",function(){switch(e.peInputIcon()){case"fa-caret-up":case"fa-caret-right":e.element().selectAll(`.table-${e.depth()} > tbody > tr > .headerRow > .peInput > .property-table-collapsed`).classed("property-table-collapsed",!1),e.element().selectAll(`.table-${e.depth()} > tbody > tr > .headerRow > .peInput > i`).classed("fa-minus-square-o",!0).classed("fa-plus-square-o",!1);break;case"fa-caret-down":e.element().selectAll(`.table-${e.depth()} > tbody > tr > .headerRow > .peInput > div`).classed("property-table-collapsed",!0),e.element().selectAll(`.table-${e.depth()} > tbody > tr > .headerRow > .peInput > i`).classed("fa-minus-square-o",!1).classed("fa-plus-square-o",!0)}e.refreshExpandIcon()});const o=t.append("i").attr("class","sortIcon fa").on("click",function(){e.refreshSortIcon(o,!0)});t.append("i").attr("class","hideParamsIcon fa").on("click",function(){e.hideNonWidgets(!e.hideNonWidgets()).render()})}updateHeader(t){const e=this.widget();let o="";e&&(e.label&&(o+=e.label()),e.classID&&(o&&(o+=" - "),o+=e.classID())),t.select("span").text(o),this.refreshExpandIcon(),this.refreshSortIcon(t.select(".sortIcon")),this.refreshHideParamsIcon(t.select(".hideParamsIcon"))}peInputCount(){return this.element().selectAll(`.table-${this.depth()} > tbody > tr > .headerRow > .peInput > div`).size()}peInputCollapsedCount(){return this.element().selectAll(`.table-${this.depth()} > tbody > tr > .headerRow > .peInput > div.property-table-collapsed`).size()}peInputIcon(){const t=this.peInputCollapsedCount();return 0===t?"fa-caret-down":t===this.peInputCount()?"fa-caret-up":"fa-caret-right"}refreshExpandIcon(){const t=this.peInputIcon();this.element().select(`.table-${this.depth()} > thead > tr > th > .expandIcon`).classed("fa-caret-up",!1).classed("fa-caret-right",!1).classed("fa-caret-down",!1).classed(t,!0)}refreshSortIcon(t,e=!1){const o=this.sorting(),s=this.sorting_options(),i=this.__meta_sorting.ext.icons;e?(t.classed(i[s.indexOf(o)],!1),this.sorting(s[(s.indexOf(o)+1)%s.length]).render()):t.classed(i[s.indexOf(o)%s.length],!0).attr("title",o)}refreshHideParamsIcon(t){t.classed("fa-eye",!this.hideNonWidgets()).classed("fa-eye-slash",this.hideNonWidgets())}gatherDataTree(t){if(!t)return null;const e={label:t.id()+" ("+t.classID()+")",children:[]};return Le(t).forEach(function(o){const s={label:o.id,children:[]};switch(o.type){case"widget":s.children.push(this.gatherDataTree(t[o.id]()));break;case"widgetArray":case"propertyArray":const e=t[o.id]();e&&e.forEach(function(t){s.children.push(this.gatherDataTree(t))},this)}e.children.push(s)},this),e}getDataTree(){return this.gatherDataTree(this.widget())}_rowSorting(t){if("type"===this.sorting()){const e=["boolean","number","string","html-color","array","object","widget","widgetArray","propertyArray"];t.sort(function(t,o){return t.type===o.type?t.id<o.id?-1:1:e.indexOf(t.type)<e.indexOf(o.type)?-1:1})}else"A-Z"===this.sorting()?t.sort(function(t,e){return t.id<e.id?-1:1}):"Z-A"===this.sorting()&&t.sort(function(t,e){return t.id>e.id?-1:1})}filterInputs(t){const e=Le(t);if((this.filterTags()||this.excludeTags().length>0||this.excludeParams.length>0)&&t instanceof _PropertyEditor==!1){const o=this;return e.filter(function(e,s){if(t[e.id+"_hidden"]&&t[e.id+"_hidden"]())return!1;for(const i of o.excludeParams()){const o=i.split(".");let s,n;if(o.length>2?(s=o[0],n=o[2]):(s=o[0],n=o[1]),-1!==t.class().indexOf(s))return e.id!==n}return!(o.excludeTags().length>0&&e.ext&&e.ext.tags&&e.ext.tags.some(function(t){return o.excludeTags().indexOf(t)>-1}))&&!(!(o.filterTags()&&e.ext&&e.ext.tags&&-1!==e.ext.tags.indexOf(o.filterTags()))&&o.filterTags())})}return e}renderInputs(t,e){const o=this;let s=[];const i=!this.show_settings()&&this.showFields();e&&(s=this.filterInputs(e).filter(function(t){return"fields"!==t.id||i}),!this.show_settings()&&this.showData()&&e.data&&s.push({id:"data",type:"array"}),this.hideNonWidgets()&&(s=s.filter(function(t){return Je(t.type)})),this._rowSorting(s));const n=t.selectAll("tr.prop"+this.id()).data(s,function(t){return t.id});n.enter().append("tr").attr("class","property-wrapper prop"+this.id()).each(function(t){const s=l(this);if(Je(t.type))s.classed("property-widget-wrapper",!0),s.append("td").attr("colspan","2");else{s.classed("property-input-wrapper",!0),s.append("td").classed("property-label",!0).text(t.id);const i=s.append("td").classed("property-input-cell",!0);o.enterInputs(e,i,t)}}).merge(n).each(function(t){const s=l(this);s.classed("disabled",e[t.id+"_disabled"]&&e[t.id+"_disabled"]()),s.classed("invalid",e[t.id+"_valid"]&&!e[t.id+"_valid"]()),s.attr("title",t.description),Je(t.type)?o.updateWidgetRow(e,s.select("td"),t):o.updateInputs(e,t)}),n.exit().each(function(t){const s=l(this);Je(t.type)&&o.updateWidgetRow(e,s.select("td"),null)}).remove(),n.order()}updateWidgetRow(t,e,o){let s=[];t&&o&&(s=t[o.id]()||[]);let i=s instanceof Array?s:[s];if(o&&o.ext&&o.ext.autoExpand){let e=!0;const s=i.filter(function(o,s){return e=o.valid(),o._owner=t,e||s===i.length-1},this),n=t[o.id+"_disabled"]&&t[o.id+"_disabled"]();let r=!!(i.length-s.length);if(e&&!n){r=!0;const e=(new o.ext.autoExpand).owner(t);s.push(e)}r&&(t[o.id](s),i=s)}const n=this;e.classed("headerRow",!0);const r=e.selectAll(`div.peInput-${this.depth()}`).data(i,function(t){return t.id()});r.enter().append("div").attr("class",`peInput peInput-${this.depth()}`).each(function(t){const e=l(this);e.append("span"),e.append("i").attr("class","fa").on("click",function(t){const o=e.select("div");o.classed("property-table-collapsed",!o.classed("property-table-collapsed")),l(this).classed("fa-minus-square-o",!o.classed("property-table-collapsed")).classed("fa-plus-square-o",o.classed("property-table-collapsed")),n.refreshExpandIcon()});const s=e.append("div");n._childPE.set(this,(new _PropertyEditor).label(o.id).target(s.node()))}).merge(r).each(function(t){const e=l(this).select("div");l(this).select("span").text(`${o.id}`),l(this).select("i").classed("fa-minus-square-o",!e.classed("property-table-collapsed")).classed("fa-plus-square-o",e.classed("property-table-collapsed")),n._childPE.get(this).parentPropertyEditor(n).showFields(n.showFields()).showData(n.showData()).sorting(n.sorting()).filterTags(n.filterTags()).excludeTags(n.excludeTags()).excludeParams(n.excludeParams()).hideNonWidgets(n.hideNonWidgets()&&t._class.indexOf("layout_")>=0).widget(t).render()}),r.exit().each(function(t){n._childPE.get(this).widget(null).render().target(null),n._childPE.remove(this)}).remove()}setProperty(t,e,o){let s,i,n,r=this;for(;r&&t;){if(r===this&&(n=t[e](),t[e](o)),r){i=r;const t=r.widget();t instanceof m&&(s=t)}r=r.parentPropertyEditor()}s&&s.render(),i&&i.broadcast(e,o,n,t)}enterInputs(t,e,o){e.classed(o.type+"-cell",!0);const s=this;switch("function"==typeof o.ext.editor_input&&o.ext.editor_input(this,t,e,o),o.type){case"boolean":e.append("input").attr("id",this.id()+"_"+o.id).classed("property-input",!0).attr("type","checkbox").on("change",function(){s.setProperty(t,o.id,this.checked)});break;case"set":e.append("select").attr("id",this.id()+"_"+o.id).classed("property-input",!0).on("change",function(){s.setProperty(t,o.id,this.value)});break;case"array":case"object":e.append("textarea").attr("id",this.id()+"_"+o.id).classed("property-input",!0).attr("autocomplete","off").attr("autocorrect","off").attr("autocapitalize","off").attr("spellcheck","false").on("change",function(){let e;try{e=JSON.parse(this.value)}catch(i){e=this.value}s.setProperty(t,o.id,e)});break;default:o.ext&&o.ext.range?(e.append("span").classed("property-input-span",!0).attr("id",this.id()+"_"+o.id+"_currentVal").text(o.defaultValue),e.append("input").attr("type","range").attr("step",o.ext.range.step).attr("min",o.ext.range.min).attr("max",o.ext.range.max).attr("id",this.id()+"_"+o.id).classed("property-input",!0).on("input",function(){s.setProperty(t,o.id,this.value),l("#"+this.id+"_currentVal").text("Current Value: "+this.value)}).on("change",function(){s.setProperty(t,o.id,this.value),l("#"+this.id+"_currentVal").text("Current Value: "+this.value)})):(e.append(o.ext&&o.ext.multiline?"textarea":"input").attr("id",this.id()+"_"+o.id).classed("property-input",!0).attr("autocomplete","off").attr("autocorrect","off").attr("autocapitalize","off").attr("spellcheck","false").on("change",function(){s.setProperty(t,o.id,this.value)}),"html-color"!==o.type||y.isIE||e.append("input").attr("id",this.id()+"_"+o.id+"_2").classed("property-input",!0).attr("type","color").on("change",function(){s.setProperty(t,o.id,this.value)}))}}updateInputs(t,e){const s=_("#"+this.id()+"_"+e.id+", #"+this.id()+"_"+e.id+"_2"),i=t?t[e.id]():"";switch(s.property("disabled",t[e.id+"_disabled"]&&t[e.id+"_disabled"]()),s.property("invalid",t[e.id+"_valid"]&&!t[e.id+"_valid"]()),e.type){case"boolean":s.property("checked",i);break;case"set":const n=s.selectAll("option").data(t[e.id+"_options"]());n.enter().append("option").merge(n).attr("value",t=>t&&void 0!==t.value?t.value:t).text(t=>t&&void 0!==t.text?t.text:t),n.exit().remove(),s.property("value",i);break;case"array":case"object":s.property("value",JSON.stringify(i,/* @__PURE__ */o(function(t,e){return e instanceof m?Ge(e):e},"replacer")," "));break;default:e.ext&&e.ext.range&&l("#"+this.id()+"_"+e.id+"_currentVal").text("Current Value: "+i),s.property("value",i&&i.length&&i.length>1e5?"...too big to display...":i)}}};o(Qe,"PropertyEditor");let Ze=Qe;Ze.prototype._class+=" other_PropertyEditor",Ze.prototype.publish("showFields",!1,"boolean","If true, widget.fields() will display as if it was a publish parameter.",null,{tags:["Basic"]}),Ze.prototype.publish("showData",!1,"boolean","If true, widget.data() will display as if it was a publish parameter.",null,{tags:["Basic"]}),Ze.prototype.publish("sorting","none","set","Specify the sorting type",["none","A-Z","Z-A","type"],{tags:["Basic"],icons:["fa-sort","fa-sort-alpha-asc","fa-sort-alpha-desc","fa-sort-amount-asc"]}),Ze.prototype.publish("hideNonWidgets",!1,"boolean","Hides non-widget params (at this tier only)",null,{tags:["Basic"]}),Ze.prototype.publish("label","","string","Label to display in header of property editor table",null,{tags:["Basic"]}),Ze.prototype.publish("filterTags","","set","Only show Publish Params of this type",["Basic","Intermediate","Advance",""],{}),Ze.prototype.publish("excludeTags",["Private"],"array","Exclude this array of tags",null,{}),Ze.prototype.publish("excludeParams",[],"array","Exclude this array of params (widget.param)",null,{}),Ze.prototype.publish("widget",null,"widget","Widget",null,{tags:["Basic"],render:!1});const Ke=Ze.prototype.widget;Ze.prototype.widget=function(t){if(arguments.length&&Ke.call(this)===t)return this;const e=Ke.apply(this,arguments);if(arguments.length&&(this.watchWidget(t),t instanceof C)){const e=this;t.postSelectionChange=function(){e._selectedItems=t._selectionBag.get().map(function(t){return t.widget}),e.lazyRender()}}return e};const to=class _RadioCheckbox extends s{_span;_label;_Checkbox;constructor(){super()}rcData(){if(0===this.data().length)return[];const t=this._db.rollupView([this.textColumn(),this.valueColumn()]);let e=[];if(e=e.concat(t.entries().map(function(t){return{text:t.key,value:t.values.length?t.values[0].key:"",origRow:t.values.length&&t.values[0].values.length?t.values[0].values[0]:[]}},this)),this.sort_exists()){const t="descending"===this.sort();e.sort(function(e,o){return e.text<o.text?t?1:-1:e.text>o.text?t?-1:1:0})}return e}enter(t,e){super.enter(t,e),this._span=e.append("span"),this._label=this._span.append("label").attr("for",this.id()+"_radioCheckbox"),this._Checkbox=this._span.append("div").attr("id",this.id()+"_radioCheckbox")}update(t,e){super.update(t,e);const o=this;this._label.text(this.label());const s=this._Checkbox.selectAll(".dataRow").data(this.rcData());s.enter().append("div").attr("class","dataRow").each(function(t,e){const s=l(this),i=o.id()+"_checkbox_"+e;s.append("input").attr("id",i).attr("name",o.id()+"_radioCheckbox").on("change",function(t){o.handleClick()}),s.append("label").attr("for",i)}),s.each(function(t,e){const s=l(this);s.select("input").attr("type",o.multiple()?"checkbox":"radio").attr("value",t.value),s.select("label").text(t.text)}),s.exit().remove(),s.order()}exit(t,e){this._span.remove(),super.exit(t,e)}handleClick(){const t=[];this._Checkbox.selectAll(".dataRow > input").each(function(e,o){l(this).property("checked")&&e&&e.origRow&&t.push(e.origRow)}),t.length?this.click(this.rowToObj(t[0]),this.valueColumn(),!0):this.click([],this.valueColumn(),!1)}click(t,e,o){}};o(to,"RadioCheckbox");let eo=to;eo.prototype._class+=" other_RadioCheckbox",eo.prototype.publish("label",null,"string","Label for RadioCheckbox"),eo.prototype.publish("valueColumn",null,"set","RadioCheckbox display value",function(){return this.columns()},{optional:!0}),eo.prototype.publish("textColumn",null,"set","RadioCheckbox value(s)",function(){return this.columns()},{optional:!0}),eo.prototype.publish("sort",null,"set","Sort contents",["","ascending","descending"],{optional:!0}),eo.prototype.publish("multiple",!1,"boolean","Multiple selection");const oo=class _Select extends s{_span;_prompt;_select;constructor(){super()}selectData(){if(0===this.data().length)return[];const t=this._db.rollupView([this.textColumn(),this.valueColumn()]);let e=[];if(e=e.concat(t.entries().map(function(t){return{text:t.key,value:t.values.length?t.values[0].key:"",origRow:t.values.length&&t.values[0].value.length?t.values[0].value[0]:[]}},this)),this.sort_exists()){const t="descending"===this.sort();e.sort(function(e,o){return e.text<o.text?t?1:-1:e.text>o.text?t?-1:1:0})}return this.optional()&&e.unshift({value:"",text:""}),e}enter(t,e){super.enter(t,e),this._span=e.append("span"),this._prompt=this._span.append("label").attr("for",this.id()+"_select");const o=this;this._select=this._span.append("select").attr("id",this.id()+"_select").on("change",function(t){const e=[],s=o._select.node().options;for(let o=0;o<s.length;++o){const t=s[o];t.selected&&e.push(l(t).datum().origRow)}e.length?o.click(o.rowToObj(e[0]),o.valueColumn(),!0):o.click([],o.valueColumn(),!1)})}update(t,e){super.update(t,e),this._prompt.text(this.label()),this._select.attr("multiple",this.multiple()?this.multiple():null).attr("size",this.multiple()&&this.selectSize()?this.selectSize():null);const o=this._select.selectAll(".dataRow").data(this.selectData()),s=o.enter().append("option").attr("class","dataRow").merge(o).attr("value",function(t){return t.value}).text(function(t){return t.text});o.exit().remove(),s.order()}exit(t,e){this._span.remove(),super.exit(t,e)}click(t,e,o){}};o(oo,"Select");let so=oo;function io(){const t="@hpcc-js/other";try{return localStorage.setItem(t,t),localStorage.removeItem(t),!0}catch(e){return!1}}so.prototype._class+=" other_Select",so.prototype.publish("label",null,"string","Label for select"),so.prototype.publish("valueColumn",null,"set","Select display value",function(){return this.columns()},{optional:!0}),so.prototype.publish("textColumn",null,"set","Select value(s)",function(){return this.columns()},{optional:!0}),so.prototype.publish("optional",!0,"boolean","Optional Select"),so.prototype.publish("sort",null,"set","Sort contents",["","ascending","descending"],{optional:!0}),so.prototype.publish("multiple",!1,"boolean","Multiple selection"),so.prototype.publish("selectSize",5,"number","Size of multiselect box",null,{disable:/* @__PURE__ */o(t=>!t.multiple(),"disable")}),o(io,"hasLocalStorage");const no=io()?localStorage:{getItem(t){}},ro=/* @__PURE__ */o(function(t){return"function"==typeof window.g_defaultThemes&&window.g_defaultThemes(t),JSON.parse(no.getItem("themeEditorThemes")||"{}")},"getThemes"),ao=/* @__PURE__ */o(function(t){return"function"==typeof window.g_defaultSerials&&window.g_defaultSerials(t),JSON.parse(no.getItem("themeEditorSerials")||"{}")},"getSerials"),lo=/* @__PURE__ */o(function(t){const e=ro();let o=[];for(const s in e)o.push(s);return void 0!==t&&void 0!==o[t]&&(o=o[t]),o},"getThemeNames"),co=/* @__PURE__ */o(function(t){const e=ao();let o=[];for(const s in e)o.push(s);return void 0!==t&&void 0!==o[t]&&(o=o[t]),o},"getSerialNames"),uo=/* @__PURE__ */o(function(t){let e=!1;return void 0===t._current_grouping?t._current_grouping=t._group_params_by:t._current_grouping!==t._group_params_by&&(e=!0),void 0===t._showing_columns?t._showing_columns=t.showColumns():t._showing_columns!==t.showColumns()&&(e=!0),void 0===t._showing_data?t._showing_data=t.showData():t._showing_data!==t.showData()&&(e=!0),e},"tableNeedsRedraw"),ho=/* @__PURE__ */o(function(t){return t.split(/(?=[0-9A-Z])/).map(function(t){return t.length>1?t+" ":t}).join("").replace(/(?:^|\s)\S/g,function(t){return t.toUpperCase()})},"camelizeString"),po=/* @__PURE__ */o(function(t,e,o,s){let i,n="",r="te-input-"+t.id+"-"+s;void 0!==t.ext&&void 0!==t.ext.inputType&&(i=t.ext.inputType),void 0!==t.inputID&&(r=t.inputID);const a="data-paramid='"+t.id+"' data-wids='"+o.map(function(t){return"object"==typeof t.widget?t.widget._id:t}).join(",")+"'";switch(t.type){case"boolean":n="<input id='"+r+"' "+a+" type='checkbox' class='te-checkbox te-input'"+(e?" checked":"")+">";break;case"number":void 0!==i?"textarea"===i?n="<textarea id='"+r+"' class='te-textarea te-input' "+a+">"+e+"</textarea>":"range"===i&&(n="<input id='"+r+"' class='te-input' type='range' "+a+" value='"+e+"' min='"+t.ext.min+"' max='"+t.ext.max+"' step='"+t.ext.step+"'>"):n="<input id='"+r+"' type='text' class='te-text te-input' "+a+" value='"+e+"'>";break;case"string":void 0!==i?"textarea"===i&&(n="<textarea id='"+r+"' class='te-textarea te-input' "+a+">"+e+"</textarea>"):n="<input id='"+r+"' type='text' class='te-text te-input' value='"+e+"' "+a+">";break;case"html-color":const o=""===e?"":" value='"+e+"'";n="<input id='"+r+"' type='text' class='te-html-color-input te-input' "+a+" "+o+">",n+="<input type='color' class='te-html-color-button te-input' "+a+" "+o+">";break;case"set":n="<select id='"+r+"' class='te-select te-input'"+a+">"+l(t,e)+"</select>";break;case"array":n="<textarea id='"+r+"' class='te-textarea te-input' data-type='array' "+a+">"+e+"</textarea>"}return void 0!==t.ext.saveButton&&(n+="<button id='"+t.ext.saveButtonID+"'>"+t.ext.saveButton+"</button>"),n;function l(t,e){let o="";return t.set.forEach(function(t){o+="<option value='"+t+"'"+(t===e?" selected":"")+">"+t+"</option>"}),o}},"tableInputHtml"),go=class _ThemeEditor extends s{_current_grouping;_showing_columns;_showing_data;_contentEditors;_showSettings;_defaultThemes;_widgetObjsById;_sharedProperties;getThemes;getSerials;getDefaultThemes;getDefaultSerials;constructor(){super(),this._tag="div",this._current_grouping=void 0,this._showing_columns=void 0,this._showing_data=void 0,this.columns(["Key","Value"]),this._contentEditors=[],this._showSettings=!0,this._defaultThemes=[],this._widgetObjsById={}}showSettings(t){return arguments.length?(this._showSettings=t,this):this._showSettings}onChange(t,e){}enter(t,e){super.enter(t,e),this._placeholderElement.style("overflow","auto")}widgetProperty(t,e,o){return void 0===o?t[e]():t[e](o)}load(t){}save(t){}needsPropTableRedraw(){return null===document.getElementById("te-themeEditorOptions")}update(t,e){super.update(t,e),uo(this)&&e.selectAll("#"+this._id+" > table").remove(),this._current_grouping=this.paramGrouping(),this._widgetObjsById[this._id]=this,this._sharedProperties=this.findSharedProperties(this.data());if(this.needsPropTableRedraw()&&this.showSettings()){const e=Le(this);for(const t in e)if(-1!==e[t].ext.tags.indexOf(this.editorComplexity())){const o=this[e[t].id]();"loadedTheme"!==e[t].id&&"loadedSerial"!==e[t].id||(e[t].inputID="te-load-theme"),e[t].input=po(e[t],o,[this._id],this._id)}else delete e[t];t.innerHTML=this.propertiesTableHtml(e);const o=document.createEvent("Events");o.initEvent("TE Properties Ready",!0,!0),document.dispatchEvent(o)}this.buildTableObjects(t,this._sharedProperties),this.initFunctionality(t)}exit(t,e){super.exit(t,e)}click(t){}propertiesTableHtml(t){const e={id:"te-themeEditorOptions",label:"Editor Options",rowArr:[]},o={id:"te-tableModeOptions",label:this.themeMode()?"Save/Load Theme":"Save/Load Serial",rowArr:[]};for(const i in t)this.themeMode()?-1===t[i].ext.tags.indexOf("Theme")&&-1===t[i].ext.tags.indexOf("Serial")?e.rowArr.push({th:ho(t[i].id),td:t[i].input,trClass:"propertyRow"}):-1!==t[i].ext.tags.indexOf("Theme")&&o.rowArr.push({th:ho(t[i].id),td:t[i].input,trClass:"propertyRow"}):-1===t[i].ext.tags.indexOf("Serial")&&-1===t[i].ext.tags.indexOf("Theme")?e.rowArr.push({th:ho(t[i].id),td:t[i].input,trClass:"propertyRow"}):-1!==t[i].ext.tags.indexOf("Serial")&&o.rowArr.push({th:ho(t[i].id),td:t[i].input,trClass:"propertyRow"});let s="";return e.rowArr.length>0&&(s+=this.tableObjHtml(e)),o.rowArr.length>0&&(s+=this.tableObjHtml(o)),s}buildTableObjects(t,e){let o;o=this.themeMode()?{chartColorSection:{id:"te-colorOptions",label:"Chart Colors",rowObjArr:[]},surfaceSection:{id:"te-containerOptions",label:"Container Styles/Colors",rowObjArr:[]},fontSection:{id:"te-fontOptions",label:"Font Styles/Colors",rowObjArr:[]}}:{nonSurfaceSection:{id:"te-chartOptions",label:"Chart Properties",rowObjArr:[]}};for(const i in e)this.themeMode()?-1===i.toUpperCase().indexOf("FONT")||-1!==e[i].arr[0].widget._class.indexOf("layout_Surface")&&-1!==i.toUpperCase().indexOf("COLOR")?"paletteID"===i?o.chartColorSection.rowObjArr.push(e[i]):-1!==e[i].arr[0].widget._class.indexOf("layout_Surface")&&o.surfaceSection.rowObjArr.push(e[i]):o.fontSection.rowObjArr.push(e[i]):-1===e[i].arr[0].widget._class.indexOf("layout_Surface")&&o.nonSurfaceSection.rowObjArr.push(e[i]);let s="";for(const i in o)s+=this.sharedPropertyTableHtml(o[i]);t.innerHTML+=s}initFunctionality(t){const e=this;function s(t){if(e.showSettings()){document.getElementById("te-save-button").onclick=function(t){const e=t.target,o=e.previousSibling.value;if(o.length>1){const t=document.getElementById("te-load-theme"),s=t.getElementsByTagName("option");let i=!1;for(const e in s){s[e].value===o&&(i=!0)}i||(t.innerHTML+="<option value='"+o+"'>"+o+"</option>"),e.previousSibling.value="",t.value=o}else alert("Save Name cannot be empty.")}}}function i(t){const o=t.getElementsByClassName("te-input");for(const s in o){if(isNaN(parseInt(s)))break;const t=o[s],i=t.getAttribute("id");"te-load-theme"===i?t.onchange=function(t){const o=t.srcElement;e.load(o.value)}:null!==i&&-1!==i.indexOf("te-input-themeMode")?t.onchange=function(t){const o=t.srcElement;e.themeMode(o.checked);const s=document.getElementById("te-load-theme"),i=null!==s?s.value:"Default";e.load(i)}:"INPUT"!==t.tagName&&"SELECT"!==t.tagName&&"TEXTAREA"!==t.tagName||(t.onchange=function(t){const o=t.srcElement;let s=o.getAttribute("id");-1!==o.className.split(" ").indexOf("te-html-color-button")&&(s=o.previousSibling.getAttribute("id"),o.previousSibling.value=o.value);const i=o.getAttribute("type"),n=s.split("-"),r=n.slice(0,n.length-1).join("-")+"-",a=o.getAttribute("data-wids"),l=o.getAttribute("data-paramid");a.split(",").forEach(function(t){const s=r+t,n=document.getElementById(s);if("checkbox"===i)n.checked=o.checked,e._widgetObjsById[t][l](o.checked);else if("array"===o.getAttribute("data-type")){n.value=o.value;try{e._widgetObjsById[t][l](JSON.parse(o.value))}catch(a){}}else n.value=o.value,e._widgetObjsById[t][l](o.value),-1!==n.className.split(" ").indexOf("te-html-color-input")?n.nextSibling.value=o.value:-1!==n.className.split(" ").indexOf("te-html-color-button")&&(n.previousSibling.value=o.value)}),e.data().forEach(function(t){t.render()})})}}function n(t){const e=t.getElementsByClassName("te-section-table");for(const s in e)if("function"==typeof e[s].getElementsByTagName){e[s].getElementsByTagName("thead")[0].onclick=function(t){let e=t.toElement;"TH"===e.tagName&&(e=e.parentElement.parentElement);const o=e.parentElement;let s;-1===o.className.split(" ").indexOf("expanded")?(o.className="te-section-table expanded",s="shown"):(o.className="te-section-table collapsed",s="hidden");o.getElementsByTagName("tbody")[0].className=s}}const o=t.getElementsByClassName("sharedPropertyRow");for(const s in o)if("function"==typeof o[s].getElementsByClassName){o[s].getElementsByClassName("te-label")[0].onclick=function(t){const e=t.toElement.parentElement;let o;-1===e.className.split(" ").indexOf("expanded")?(e.className="sharedPropertyRow expanded",o="shown"):(e.className="sharedPropertyRow collapsed",o="hidden");let s=e.nextSibling;for(;null!==s;)-1===s.className.split(" ").indexOf("sharedPropertyRow")?(s.className="propertyRow "+o,s=s.nextSibling):s=null}}}n(t),i(t),s(),o(s,"_inputOnClick"),o(i,"_inputOnChange"),o(n,"_expandCollapse")}sharedPropertyTableHtml(t){const e={id:t.id,label:t.label,rowArr:[]};return t.rowObjArr.forEach(function(t){t.arr.forEach(function(r,a){0===a&&e.rowArr.push({th:s(t),td:n(t),trClass:"sharedPropertyRow collapsed"}),e.rowArr.push({th:o(r),td:i(t,a),trClass:"propertyRow hidden"})})}),this.tableObjHtml(e);function o(t){return t.widget.classID().split("_").join("/")+" <i>["+t.widget._id+"]</i>"}function s(t){return ho(t.id)}function i(t,e){const o=s(t,e);return po(t,o,[t.arr[e]],t.arr[e].widget._id);function s(t,e){const o=t.arr[e].widget[t.id]();return null!==o?o:""}}function n(t){const e=o(t);return po(t,e,t.arr,"shared");function o(t){const e=t.arr[0].widget[t.id]();return t.arr.forEach(function(t,o){if(e!==t.widget[t.id]())return""}),null!==e?"array"===t.type?JSON.stringify(e):e:""}}}tableObjHtml(t){let e="<table id='"+t.id+"' class='te-section-table expanded'>";return e+="<thead><tr><th colspan='2'>"+t.label+"</th></tr></thead>",e+="<tbody>",t.rowArr.forEach(function(t){e+=this.tableRowObjHtml(t)},this),e+="</tbody>",e+"</table>"}tableRowObjHtml(t){let e=void 0!==t.trClass?"<tr class='"+t.trClass+"'>":"<tr>";return e+="<th class='te-label'>"+t.th+"</th>",e+="<td>"+t.td+"</td>",e+"</tr>"}setWidgetObjsById(t){const e=this,o=t.widget[t.id]();"widgetArray"===t.type?o.forEach(function(t){e._widgetObjsById[t._id]=t}):"widget"===t.type&&null!==o&&(this._widgetObjsById[o._id]=o)}checkTagFilter(t){const e=["Basic"];let o=!1;return t.forEach(function(t){-1!==e.indexOf(t)&&(o=!0)}),o}findSharedProperties(t){const e=this;let o;if(void 0!==t&&t.length>0){let i=[];o={};const n={},r={};t.forEach(function(t){const e=s(t);i=i.concat(e)}),i.forEach(function(t){if(-1!==["widget","widgetArray"].indexOf(t.type))e.setWidgetObjsById(t);else if(e.checkTagFilter(t.ext.tags)){const e=t.id;-1!==t.widget._class.indexOf("Surface")?(void 0===n[e]&&(n[e]={arr:[]}),n[e].id=t.id,n[e].description=t.description,n[e].type=t.type,n[e].set=t.set,n[e].ext=t.ext,n[e].arr.push(t)):(void 0===r[e]&&(r[e]={arr:[]}),r[e].id=t.id,r[e].description=t.description,r[e].type=t.type,r[e].set=t.set,r[e].ext=t.ext,r[e].arr.push(t)),void 0===o[e]&&(o[e]={arr:[]}),o[e].id=t.id,o[e].description=t.description,o[e].type=t.type,o[e].set=t.set,o[e].ext=t.ext,o[e].arr.push(t)}})}return o;function s(t,o){let i=[];if(null!==t){Le(t).forEach(function(o,n){if(void 0!==o.ext.tags&&i.push({id:o.id,type:o.type,description:o.description,set:o.set,ext:o.ext,widget:t}),"widgetArray"===o.type){e.widgetProperty(t,o.id).forEach(function(t){const e=s(t);i=i.concat(e)})}else if("widget"===o.type){const n=s(e.widgetProperty(t,o.id));i=i.concat(n)}})}return i}}};o(go,"ThemeEditor");let fo=go;fo.prototype._class+=" other_ThemeEditor",fo.prototype.publish("themeMode",!0,"boolean","Edit default values",null,{tags:["Basic"]}),fo.prototype.publish("saveTheme","","string","Save Theme",null,{tags:["Basic","Theme"],saveButton:"Save",saveButtonID:"te-save-button"}),fo.prototype.publish("loadedTheme",lo(1),"set","Loaded Theme",lo(),{tags:["Basic","Theme"]}),fo.prototype.publish("saveSerial","","string","Save Serial",null,{tags:["Basic","Serial"],saveButton:"Save",saveButtonID:"te-save-button"}),fo.prototype.publish("loadedSerial",co(0),"set","Loaded Serial",co(),{tags:["Basic","Serial"]}),fo.prototype.publish("showColumns",!0,"boolean","Show Columns",null,{tags:["Intermediate"]}),fo.prototype.publish("showData",!0,"boolean","Show Data",null,{tags:["Intermediate"]}),fo.prototype.publish("shareCountMin",1,"number","Share Count Min",null,{tags:["Private"]}),fo.prototype.publish("paramGrouping","By Param","set","Param Grouping",["By Param","By Widget"],{tags:["Private"]}),fo.prototype.publish("editorComplexity","Basic","set","Choose what publish properties to display within the editor.",["Basic","Intermediate","Advanced","Private"],{tags:["Private"]}),fo.prototype.publish("sectionTitle","","string","Section Title",null,{tags:["Private"]}),fo.prototype.publish("collapsibleSections",!0,"boolean","Collapsible Sections",null,{tags:["Intermediate"]}),fo.prototype.getThemes=ro,fo.prototype.getSerials=ao,fo.prototype.getDefaultThemes=lo,fo.prototype.getDefaultSerials=co;export{$ as Audio,tt as AutoCompleteText,I as BUILD_VERSION,mt as CalendarHeatMap,De as Column,He as ColumnDropdown,jt as Comms,pe as HPCCBadge,ue as HeatMap,ge as Html,me as IconList,Ce as Legend,Ie as MorphText,Ae as MouseHoverColumn,Te as NestedTable,je as Opportunity,S as PKG_NAME,R as PKG_VERSION,_e as Paginator,Xe as Persist,Ze as PropertyEditor,eo as RadioCheckbox,so as Select,we as Table,fo as ThemeEditor,te as cache,ee as createConnection,Zt as createResult,Kt as enableCache,oe as flattenResult};
|
|
1
|
+
import { CanvasWidget as e, Entity as t, HTMLWidget as n, Palette as r, Platform as i, PropertyExt as a, SVGWidget as o, Utility as s, Widget as c, d3Event as l, extent as u, format as d, local as f, map as p, range as m, select as h, selectAll as g, timeParse as _ } from "@hpcc-js/common";
|
|
2
|
+
import { Grid as v, HorizontalList as y, VerticalList as b } from "@hpcc-js/layout";
|
|
3
|
+
//#region \0rolldown/runtime.js
|
|
4
|
+
var x = Object.create, S = Object.defineProperty, __name = (e, t) => S(e, "name", {
|
|
5
|
+
value: t,
|
|
6
|
+
configurable: !0
|
|
7
|
+
}), C = Object.getOwnPropertyDescriptor, w = Object.getOwnPropertyNames, T = Object.getPrototypeOf, E = Object.prototype.hasOwnProperty, __commonJSMin = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), __exportAll = (e, t) => {
|
|
8
|
+
let n = {};
|
|
9
|
+
for (var r in e) S(n, r, {
|
|
10
|
+
get: e[r],
|
|
11
|
+
enumerable: !0
|
|
12
|
+
});
|
|
13
|
+
return t || S(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
14
|
+
}, __copyProps = (e, t, n, r) => {
|
|
15
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = w(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !E.call(e, s) && s !== n && S(e, s, {
|
|
16
|
+
get: ((e) => t[e]).bind(null, s),
|
|
17
|
+
enumerable: !(r = C(t, s)) || r.enumerable
|
|
18
|
+
});
|
|
19
|
+
return e;
|
|
20
|
+
}, __toESM = (e, t, n) => (n = e == null ? {} : x(T(e)), __copyProps(t || !e || !e.__esModule ? S(n, "default", {
|
|
21
|
+
value: e,
|
|
22
|
+
enumerable: !0
|
|
23
|
+
}) : n, e)), D = "@hpcc-js/other", O = "3.5.9", k = "3.25.1", A = 0, j = 0, M = 0, N = 1e3, P, F, I = 0, L = 0, R = 0, z = typeof performance == "object" && performance.now ? performance : Date, B = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {
|
|
24
|
+
setTimeout(e, 17);
|
|
25
|
+
};
|
|
26
|
+
function now() {
|
|
27
|
+
return L ||= (B(clearNow), z.now() + R);
|
|
28
|
+
}
|
|
29
|
+
function clearNow() {
|
|
30
|
+
L = 0;
|
|
31
|
+
}
|
|
32
|
+
function Timer() {
|
|
33
|
+
this._call = this._time = this._next = null;
|
|
34
|
+
}
|
|
35
|
+
Timer.prototype = timer.prototype = {
|
|
36
|
+
constructor: Timer,
|
|
37
|
+
restart: function(e, t, n) {
|
|
38
|
+
if (typeof e != "function") throw TypeError("callback is not a function");
|
|
39
|
+
n = (n == null ? now() : +n) + (t == null ? 0 : +t), !this._next && F !== this && (F ? F._next = this : P = this, F = this), this._call = e, this._time = n, sleep();
|
|
40
|
+
},
|
|
41
|
+
stop: function() {
|
|
42
|
+
this._call && (this._call = null, this._time = Infinity, sleep());
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
function timer(e, t, n) {
|
|
46
|
+
var r = new Timer();
|
|
47
|
+
return r.restart(e, t, n), r;
|
|
48
|
+
}
|
|
49
|
+
function timerFlush() {
|
|
50
|
+
now(), ++A;
|
|
51
|
+
for (var e = P, t; e;) (t = L - e._time) >= 0 && e._call.call(null, t), e = e._next;
|
|
52
|
+
--A;
|
|
53
|
+
}
|
|
54
|
+
function wake() {
|
|
55
|
+
L = (I = z.now()) + R, A = j = 0;
|
|
56
|
+
try {
|
|
57
|
+
timerFlush();
|
|
58
|
+
} finally {
|
|
59
|
+
A = 0, nap(), L = 0;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function poke() {
|
|
63
|
+
var e = z.now(), t = e - I;
|
|
64
|
+
t > N && (R -= t, I = e);
|
|
65
|
+
}
|
|
66
|
+
function nap() {
|
|
67
|
+
for (var e, t = P, n, r = Infinity; t;) t._call ? (r > t._time && (r = t._time), e = t, t = t._next) : (n = t._next, t._next = null, t = e ? e._next = n : P = n);
|
|
68
|
+
F = e, sleep(r);
|
|
69
|
+
}
|
|
70
|
+
function sleep(e) {
|
|
71
|
+
A || (j &&= clearTimeout(j), e - L > 24 ? (e < Infinity && (j = setTimeout(wake, e - z.now() - R)), M &&= clearInterval(M)) : (M ||= (I = z.now(), setInterval(poke, N)), A = 1, B(wake)));
|
|
72
|
+
}
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region src/Audio.ts
|
|
75
|
+
var Audio = class extends n {
|
|
76
|
+
_sections;
|
|
77
|
+
constructor() {
|
|
78
|
+
super(), this._tag = "audio", this._sections = {};
|
|
79
|
+
}
|
|
80
|
+
section(e, t, n, r) {
|
|
81
|
+
return arguments.length ? arguments.length === 1 ? this._sections[e] : (this._sections[e] = {
|
|
82
|
+
label: e,
|
|
83
|
+
offset: t,
|
|
84
|
+
beatLength: n,
|
|
85
|
+
beatCount: r,
|
|
86
|
+
endOffset: t + r * n
|
|
87
|
+
}, this) : this._sections;
|
|
88
|
+
}
|
|
89
|
+
getType(e) {
|
|
90
|
+
switch (e) {
|
|
91
|
+
case "mp3": return "audio/mpeg; codecs='mp3'";
|
|
92
|
+
case "ogg": return "audio/ogg; codecs='vorbis'";
|
|
93
|
+
}
|
|
94
|
+
return "";
|
|
95
|
+
}
|
|
96
|
+
enter(e, t) {
|
|
97
|
+
let n = this;
|
|
98
|
+
t.on("play", function(e) {
|
|
99
|
+
n.onPlay(e);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
update(e, t) {
|
|
103
|
+
t.selectAll("source").data(this.source(), function(e) {
|
|
104
|
+
return e;
|
|
105
|
+
}).enter().append("source").attr("src", function(e) {
|
|
106
|
+
return e;
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
createTimer(e, t, n) {
|
|
110
|
+
let r = this;
|
|
111
|
+
timer(function() {
|
|
112
|
+
return r.onTick(e.label, n, e), !0;
|
|
113
|
+
}, n * e.beatLength, t + e.offset);
|
|
114
|
+
}
|
|
115
|
+
onTick(e, t, n) {}
|
|
116
|
+
onPlay(e) {
|
|
117
|
+
let t = Date.now();
|
|
118
|
+
for (let e in this._sections) {
|
|
119
|
+
let n = this._sections[e];
|
|
120
|
+
for (let e = 0; e < n.beatCount; ++e) this.createTimer(n, t, e);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
play(e) {
|
|
124
|
+
let t = this;
|
|
125
|
+
this._element.on("canplaythrough", function(e) {
|
|
126
|
+
t.node().play();
|
|
127
|
+
}), this.node().load();
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
Audio.prototype._class += " other_Audio", Audio.prototype.publish("source", "", "string", "Audio Source");
|
|
131
|
+
//#endregion
|
|
132
|
+
//#region src/AutoCompleteText.css
|
|
133
|
+
var ee = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((e, t) => {
|
|
134
|
+
var n = (function() {
|
|
135
|
+
function autoComplete(e) {
|
|
136
|
+
if (!document.querySelector) return;
|
|
137
|
+
function hasClass(e, t) {
|
|
138
|
+
return e.classList ? e.classList.contains(t) : RegExp("\\b" + t + "\\b").test(e.className);
|
|
139
|
+
}
|
|
140
|
+
function addEvent(e, t, n) {
|
|
141
|
+
e.attachEvent ? e.attachEvent("on" + t, n) : e.addEventListener(t, n);
|
|
142
|
+
}
|
|
143
|
+
function removeEvent(e, t, n) {
|
|
144
|
+
e.detachEvent ? e.detachEvent("on" + t, n) : e.removeEventListener(t, n);
|
|
145
|
+
}
|
|
146
|
+
function live(e, t, n, r) {
|
|
147
|
+
addEvent(r || document, t, function(t) {
|
|
148
|
+
for (var r, i = t.target || t.srcElement; i && !(r = hasClass(i, e));) i = i.parentElement;
|
|
149
|
+
r && n.call(i, t);
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
var t = {
|
|
153
|
+
selector: 0,
|
|
154
|
+
source: 0,
|
|
155
|
+
minChars: 3,
|
|
156
|
+
delay: 150,
|
|
157
|
+
offsetLeft: 0,
|
|
158
|
+
offsetTop: 1,
|
|
159
|
+
cache: 1,
|
|
160
|
+
menuClass: "",
|
|
161
|
+
renderItem: function(e, t) {
|
|
162
|
+
t = t.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
163
|
+
var n = RegExp("(" + t.split(" ").join("|") + ")", "gi");
|
|
164
|
+
return "<div class=\"autocomplete-suggestion\" data-val=\"" + e + "\">" + e.replace(n, "<b>$1</b>") + "</div>";
|
|
165
|
+
},
|
|
166
|
+
onSelect: function(e, t, n) {}
|
|
167
|
+
};
|
|
168
|
+
for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]);
|
|
169
|
+
for (var r = typeof t.selector == "object" ? [t.selector] : document.querySelectorAll(t.selector), i = 0; i < r.length; i++) {
|
|
170
|
+
var a = r[i];
|
|
171
|
+
a.sc = document.createElement("div"), a.sc.className = "autocomplete-suggestions " + t.menuClass, a.autocompleteAttr = a.getAttribute("autocomplete"), a.setAttribute("autocomplete", "off"), a.cache = {}, a.last_val = "", a.updateSC = function(e, n) {
|
|
172
|
+
var r = a.getBoundingClientRect();
|
|
173
|
+
if (a.sc.style.left = Math.round(r.left + (window.pageXOffset || document.documentElement.scrollLeft) + t.offsetLeft) + "px", a.sc.style.top = Math.round(r.bottom + (window.pageYOffset || document.documentElement.scrollTop) + t.offsetTop) + "px", a.sc.style.width = Math.round(r.right - r.left) + "px", !e && (a.sc.style.display = "block", a.sc.classList.remove("hide"), a.sc.maxHeight || (a.sc.maxHeight = parseInt((window.getComputedStyle ? getComputedStyle(a.sc, null) : a.sc.currentStyle).maxHeight)), a.sc.suggestionHeight || (a.sc.suggestionHeight = a.sc.querySelector(".autocomplete-suggestion").offsetHeight), a.sc.suggestionHeight)) if (!n) a.sc.scrollTop = 0;
|
|
174
|
+
else {
|
|
175
|
+
var i = a.sc.scrollTop, o = n.getBoundingClientRect().top - a.sc.getBoundingClientRect().top;
|
|
176
|
+
o + a.sc.suggestionHeight - a.sc.maxHeight > 0 ? a.sc.scrollTop = o + a.sc.suggestionHeight + i - a.sc.maxHeight : o < 0 && (a.sc.scrollTop = o + i);
|
|
177
|
+
}
|
|
178
|
+
}, addEvent(window, "resize", a.updateSC), document.body.appendChild(a.sc), live("autocomplete-suggestion", "mouseleave", function(e) {
|
|
179
|
+
var t = a.sc.querySelector(".autocomplete-suggestion.selected");
|
|
180
|
+
t && setTimeout(function() {
|
|
181
|
+
t.className = t.className.replace("selected", "");
|
|
182
|
+
}, 20);
|
|
183
|
+
}, a.sc), live("autocomplete-suggestion", "mouseover", function(e) {
|
|
184
|
+
var t = a.sc.querySelector(".autocomplete-suggestion.selected");
|
|
185
|
+
t && (t.className = t.className.replace("selected", "")), this.className += " selected";
|
|
186
|
+
}, a.sc), live("autocomplete-suggestion", "mousedown", function(e) {
|
|
187
|
+
if (hasClass(this, "autocomplete-suggestion")) {
|
|
188
|
+
var n = this.getAttribute("data-val");
|
|
189
|
+
a.value = n, t.onSelect(e, n, this), a.sc.style.display = "none", a.sc.classList.add("hide");
|
|
190
|
+
}
|
|
191
|
+
}, a.sc), a.blurHandler = function() {
|
|
192
|
+
try {
|
|
193
|
+
var e = document.querySelector(".autocomplete-suggestions:hover");
|
|
194
|
+
} catch {
|
|
195
|
+
var e = 0;
|
|
196
|
+
}
|
|
197
|
+
e ? a !== document.activeElement && setTimeout(function() {
|
|
198
|
+
a.focus();
|
|
199
|
+
}, 20) : (a.last_val = a.value, a.sc.style.display = "none", a.sc.classList.add("hide"), setTimeout(function() {
|
|
200
|
+
a.sc.style.display = "none", a.sc.classList.add("hide");
|
|
201
|
+
}, 350));
|
|
202
|
+
}, addEvent(a, "blur", a.blurHandler);
|
|
203
|
+
var suggest = function(e, n) {
|
|
204
|
+
if (!n) var n = a.value;
|
|
205
|
+
if (a.cache[n] = e, e.length && n.length >= t.minChars) {
|
|
206
|
+
for (var r = "", i = 0; i < e.length; i++) r += t.renderItem(e[i], n);
|
|
207
|
+
a.sc.innerHTML = r, a.updateSC(0);
|
|
208
|
+
} else a.sc.style.display = "none", a.sc.classList.add("hide");
|
|
209
|
+
};
|
|
210
|
+
a.keydownHandler = function(e) {
|
|
211
|
+
var n = window.event ? e.keyCode : e.which;
|
|
212
|
+
if ((n == 40 || n == 38) && a.sc.innerHTML) {
|
|
213
|
+
var r, i = a.sc.querySelector(".autocomplete-suggestion.selected");
|
|
214
|
+
return i ? (r = n == 40 ? i.nextSibling : i.previousSibling, r ? (i.className = i.className.replace("selected", ""), r.className += " selected", a.value = r.getAttribute("data-val")) : (i.className = i.className.replace("selected", ""), a.value = a.last_val, r = 0)) : (r = n == 40 ? a.sc.querySelector(".autocomplete-suggestion") : a.sc.childNodes[a.sc.childNodes.length - 1], r.className += " selected", a.value = r.getAttribute("data-val")), a.updateSC(0, r), !1;
|
|
215
|
+
} else if (n == 27) a.value = a.last_val, a.sc.style.display = "none", a.sc.classList.add("hide");
|
|
216
|
+
else if (n == 13 || n == 9) {
|
|
217
|
+
a.sc.style.display !== "none" && e.preventDefault();
|
|
218
|
+
var i = a.sc.querySelector(".autocomplete-suggestion.selected");
|
|
219
|
+
i && a.sc.style.display != "none" && (t.onSelect(e, i.getAttribute("data-val"), i), setTimeout(function() {
|
|
220
|
+
a.sc.style.display = "none", a.sc.classList.add("hide");
|
|
221
|
+
}, 20));
|
|
222
|
+
}
|
|
223
|
+
}, addEvent(a, "keydown", a.keydownHandler), a.keyupHandler = function(e) {
|
|
224
|
+
var n = window.event ? e.keyCode : e.which;
|
|
225
|
+
if (!n || (n < 35 || n > 40) && n != 13 && n != 27) {
|
|
226
|
+
var r = a.value;
|
|
227
|
+
if (r.length >= t.minChars) {
|
|
228
|
+
if (r != a.last_val) {
|
|
229
|
+
if (a.last_val = r, clearTimeout(a.timer), t.cache) {
|
|
230
|
+
if (r in a.cache) {
|
|
231
|
+
suggest(a.cache[r]);
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
for (var i = 1; i < r.length - t.minChars; i++) {
|
|
235
|
+
var o = r.slice(0, r.length - i);
|
|
236
|
+
if (o in a.cache && !a.cache[o].length) {
|
|
237
|
+
suggest([]);
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
a.timer = setTimeout(function() {
|
|
243
|
+
t.source(r, suggest);
|
|
244
|
+
}, t.delay);
|
|
245
|
+
}
|
|
246
|
+
} else a.last_val = r, a.sc.style.display = "none", a.sc.classList.add("hide");
|
|
247
|
+
}
|
|
248
|
+
}, addEvent(a, "keyup", a.keyupHandler), a.focusHandler = function(e) {
|
|
249
|
+
a.last_val = "\n", a.keyupHandler(e);
|
|
250
|
+
}, t.minChars || addEvent(a, "focus", a.focusHandler);
|
|
251
|
+
}
|
|
252
|
+
this.destroy = function() {
|
|
253
|
+
for (var e = 0; e < r.length; e++) {
|
|
254
|
+
var t = r[e];
|
|
255
|
+
removeEvent(window, "resize", t.updateSC), removeEvent(t, "blur", t.blurHandler), removeEvent(t, "focus", t.focusHandler), removeEvent(t, "keydown", t.keydownHandler), removeEvent(t, "keyup", t.keyupHandler), t.autocompleteAttr ? t.setAttribute("autocomplete", t.autocompleteAttr) : t.removeAttribute("autocomplete"), document.body.removeChild(t.sc), t = null;
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
return autoComplete;
|
|
260
|
+
})();
|
|
261
|
+
(function() {
|
|
262
|
+
typeof define == "function" && define.amd ? define("autoComplete", function() {
|
|
263
|
+
return n;
|
|
264
|
+
}) : t !== void 0 && t.exports ? t.exports = n : window.autoComplete = n;
|
|
265
|
+
})();
|
|
266
|
+
})))(), 1), AutoCompleteText = class extends n {
|
|
267
|
+
_span;
|
|
268
|
+
_prompt;
|
|
269
|
+
_input;
|
|
270
|
+
_prevMinCharsText;
|
|
271
|
+
_autoComplete;
|
|
272
|
+
constructor() {
|
|
273
|
+
super(), this._tag = "div";
|
|
274
|
+
}
|
|
275
|
+
autoCompleteTextData() {
|
|
276
|
+
return this.data().length === 0 ? [] : this._db.rollupView([this.textColumn(), this.valueColumn()]).entries().map(function(e, t) {
|
|
277
|
+
return {
|
|
278
|
+
idx: t,
|
|
279
|
+
text: e.key,
|
|
280
|
+
value: e.values.length ? e.values[0].key : "",
|
|
281
|
+
origRow: e.values.length && e.values[0].value.length ? e.values[0].value[0] : []
|
|
282
|
+
};
|
|
283
|
+
}, this);
|
|
284
|
+
}
|
|
285
|
+
enter(e, t) {
|
|
286
|
+
super.enter(e, t), this._span = t.append("span"), this._prompt = this._span.append("label").attr("for", this.id() + "_input"), this._input = this._span.append("input").attr("id", this.id() + "_input").attr("name", this.id() + "_input_name").attr("type", "text").attr("placeholder", this.placeholder());
|
|
287
|
+
}
|
|
288
|
+
update(e, t) {
|
|
289
|
+
if (super.update(e, t), this._prompt.text(this.label()), this._input.style("width", this.textboxWidth_exists() ? this.textboxWidth() + "px" : null), this._prevMinCharsText !== this.minCharsText()) {
|
|
290
|
+
this._prevMinCharsText = this.minCharsText(), this._autoComplete && this._autoComplete.destroy();
|
|
291
|
+
let e = this;
|
|
292
|
+
this._autoComplete = new ee.default({
|
|
293
|
+
selector: "#" + this.id() + "_input",
|
|
294
|
+
minChars: this.minCharsText(),
|
|
295
|
+
delay: 150,
|
|
296
|
+
offsetLeft: 0,
|
|
297
|
+
offsetTop: 1,
|
|
298
|
+
source: (t, n) => {
|
|
299
|
+
let r = e._db.fieldByLabel(e.textColumn());
|
|
300
|
+
r && (t = t.toLowerCase(), n(e.autoCompleteTextData().filter(function(e) {
|
|
301
|
+
return e.origRow[r.idx].toLowerCase().indexOf(t) >= 0;
|
|
302
|
+
}).map(function(e) {
|
|
303
|
+
return {
|
|
304
|
+
text: e.origRow[r.idx],
|
|
305
|
+
rowIdx: e.idx
|
|
306
|
+
};
|
|
307
|
+
})));
|
|
308
|
+
},
|
|
309
|
+
renderItem: (e, t) => {
|
|
310
|
+
t = t.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
311
|
+
let n = RegExp("(" + t.split(" ").join("|") + ")", "gi");
|
|
312
|
+
return "<div class=\"autocomplete-suggestion\" data-val=\"" + e.text + "\" data-row-idx=\"" + e.rowIdx + "\">" + e.text.replace(n, "<b>$1</b>") + "</div>";
|
|
313
|
+
},
|
|
314
|
+
onSelect: (t, n, r) => {
|
|
315
|
+
let i = +r.getAttribute("data-row-idx"), a = e.autoCompleteTextData()[i];
|
|
316
|
+
e.click(e.rowToObj(a.origRow), e.valueColumn(), !0);
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
exit(e, t) {
|
|
322
|
+
this._autoComplete && this._autoComplete.destroy(), this._span.remove(), super.exit(e, t);
|
|
323
|
+
}
|
|
324
|
+
click(e, t, n) {}
|
|
325
|
+
};
|
|
326
|
+
AutoCompleteText.prototype._class += " other_AutoCompleteText", AutoCompleteText.prototype.publish("label", "Label: ", "string", "Label for AutoCompleteText"), AutoCompleteText.prototype.publish("textboxWidth", null, "number", "width of textbox", null, { optional: !0 }), AutoCompleteText.prototype.publish("placeholder", "Search...", "string", "Placeholder for AutoCompleteText"), AutoCompleteText.prototype.publish("valueColumn", null, "set", "Select column for autocomplete", function() {
|
|
327
|
+
return this.columns();
|
|
328
|
+
}, { optional: !0 }), AutoCompleteText.prototype.publish("textColumn", null, "set", "Select value(s)", function() {
|
|
329
|
+
return this.columns();
|
|
330
|
+
}, { optional: !0 }), AutoCompleteText.prototype.publish("minCharsText", 1, "number", "Size of multiAutoCompleteText box");
|
|
331
|
+
//#endregion
|
|
332
|
+
//#region ../../node_modules/d3-time/src/interval.js
|
|
333
|
+
var V = /* @__PURE__ */ new Date(), H = /* @__PURE__ */ new Date();
|
|
334
|
+
function newInterval(e, t, n, r) {
|
|
335
|
+
function interval(t) {
|
|
336
|
+
return e(t = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+t)), t;
|
|
337
|
+
}
|
|
338
|
+
return interval.floor = function(t) {
|
|
339
|
+
return e(t = /* @__PURE__ */ new Date(+t)), t;
|
|
340
|
+
}, interval.ceil = function(n) {
|
|
341
|
+
return e(n = /* @__PURE__ */ new Date(n - 1)), t(n, 1), e(n), n;
|
|
342
|
+
}, interval.round = function(e) {
|
|
343
|
+
var t = interval(e), n = interval.ceil(e);
|
|
344
|
+
return e - t < n - e ? t : n;
|
|
345
|
+
}, interval.offset = function(e, n) {
|
|
346
|
+
return t(e = /* @__PURE__ */ new Date(+e), n == null ? 1 : Math.floor(n)), e;
|
|
347
|
+
}, interval.range = function(n, r, i) {
|
|
348
|
+
var a = [], o;
|
|
349
|
+
if (n = interval.ceil(n), i = i == null ? 1 : Math.floor(i), !(n < r) || !(i > 0)) return a;
|
|
350
|
+
do
|
|
351
|
+
a.push(o = /* @__PURE__ */ new Date(+n)), t(n, i), e(n);
|
|
352
|
+
while (o < n && n < r);
|
|
353
|
+
return a;
|
|
354
|
+
}, interval.filter = function(n) {
|
|
355
|
+
return newInterval(function(t) {
|
|
356
|
+
if (t >= t) for (; e(t), !n(t);) t.setTime(t - 1);
|
|
357
|
+
}, function(e, r) {
|
|
358
|
+
if (e >= e) if (r < 0) for (; ++r <= 0;) for (; t(e, -1), !n(e););
|
|
359
|
+
else for (; --r >= 0;) for (; t(e, 1), !n(e););
|
|
360
|
+
});
|
|
361
|
+
}, n && (interval.count = function(t, r) {
|
|
362
|
+
return V.setTime(+t), H.setTime(+r), e(V), e(H), Math.floor(n(V, H));
|
|
363
|
+
}, interval.every = function(e) {
|
|
364
|
+
return e = Math.floor(e), !isFinite(e) || !(e > 0) ? null : e > 1 ? interval.filter(r ? function(t) {
|
|
365
|
+
return r(t) % e === 0;
|
|
366
|
+
} : function(t) {
|
|
367
|
+
return interval.count(0, t) % e === 0;
|
|
368
|
+
}) : interval;
|
|
369
|
+
}), interval;
|
|
370
|
+
}
|
|
371
|
+
//#endregion
|
|
372
|
+
//#region ../../node_modules/d3-time/src/duration.js
|
|
373
|
+
var U = 6e4, te = 864e5, ne = 6048e5, re = newInterval(function(e) {
|
|
374
|
+
e.setHours(0, 0, 0, 0);
|
|
375
|
+
}, function(e, t) {
|
|
376
|
+
e.setDate(e.getDate() + t);
|
|
377
|
+
}, function(e, t) {
|
|
378
|
+
return (t - e - (t.getTimezoneOffset() - e.getTimezoneOffset()) * U) / te;
|
|
379
|
+
}, function(e) {
|
|
380
|
+
return e.getDate() - 1;
|
|
381
|
+
}).range;
|
|
382
|
+
//#endregion
|
|
383
|
+
//#region ../../node_modules/d3-time/src/week.js
|
|
384
|
+
function weekday(e) {
|
|
385
|
+
return newInterval(function(t) {
|
|
386
|
+
t.setDate(t.getDate() - (t.getDay() + 7 - e) % 7), t.setHours(0, 0, 0, 0);
|
|
387
|
+
}, function(e, t) {
|
|
388
|
+
e.setDate(e.getDate() + t * 7);
|
|
389
|
+
}, function(e, t) {
|
|
390
|
+
return (t - e - (t.getTimezoneOffset() - e.getTimezoneOffset()) * U) / ne;
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
var W = weekday(0), ie = weekday(1), ae = weekday(2), oe = weekday(3), se = weekday(4), ce = weekday(5), le = weekday(6);
|
|
394
|
+
W.range, ie.range, ae.range, oe.range, se.range, ce.range, le.range;
|
|
395
|
+
var G = newInterval(function(e) {
|
|
396
|
+
e.setDate(1), e.setHours(0, 0, 0, 0);
|
|
397
|
+
}, function(e, t) {
|
|
398
|
+
e.setMonth(e.getMonth() + t);
|
|
399
|
+
}, function(e, t) {
|
|
400
|
+
return t.getMonth() - e.getMonth() + (t.getFullYear() - e.getFullYear()) * 12;
|
|
401
|
+
}, function(e) {
|
|
402
|
+
return e.getMonth();
|
|
403
|
+
}).range, K = newInterval(function(e) {
|
|
404
|
+
e.setMonth(0, 1), e.setHours(0, 0, 0, 0);
|
|
405
|
+
}, function(e, t) {
|
|
406
|
+
e.setFullYear(e.getFullYear() + t);
|
|
407
|
+
}, function(e, t) {
|
|
408
|
+
return t.getFullYear() - e.getFullYear();
|
|
409
|
+
}, function(e) {
|
|
410
|
+
return e.getFullYear();
|
|
411
|
+
});
|
|
412
|
+
K.every = function(e) {
|
|
413
|
+
return !isFinite(e = Math.floor(e)) || !(e > 0) ? null : newInterval(function(t) {
|
|
414
|
+
t.setFullYear(Math.floor(t.getFullYear() / e) * e), t.setMonth(0, 1), t.setHours(0, 0, 0, 0);
|
|
415
|
+
}, function(t, n) {
|
|
416
|
+
t.setFullYear(t.getFullYear() + n * e);
|
|
417
|
+
});
|
|
418
|
+
}, K.range;
|
|
419
|
+
//#endregion
|
|
420
|
+
//#region src/CalendarHeatMap.ts
|
|
421
|
+
var CalendarHeatMap = class extends n {
|
|
422
|
+
_prevDateColumn;
|
|
423
|
+
_prevAggrType;
|
|
424
|
+
_prevAggrColumn;
|
|
425
|
+
_prevAggrDeltaColumn;
|
|
426
|
+
_view;
|
|
427
|
+
_parentNode;
|
|
428
|
+
constructor() {
|
|
429
|
+
super(), s.SimpleSelectionMixin.call(this);
|
|
430
|
+
}
|
|
431
|
+
calendarData() {
|
|
432
|
+
if (this.fields().length === 0 || this.data().length === 0) return [];
|
|
433
|
+
let e = _(this.datePattern()), t = this.aggrDeltaColumn() ? d(".1%") : d("s");
|
|
434
|
+
return (this._prevDateColumn !== this.dateColumn() || this._prevAggrType !== this.aggrType() || this._prevAggrColumn !== this.aggrColumn() || this._prevAggrDeltaColumn !== this.aggrDeltaColumn()) && (this._prevDateColumn = this.dateColumn(), this._prevAggrType = this.aggrType(), this._prevAggrColumn = this.aggrColumn(), this._prevAggrDeltaColumn = this.aggrDeltaColumn(), this._view = this._db.aggregateView([this.dateColumn()], this.aggrType(), this.aggrColumn(), this.aggrDeltaColumn())), this._view.entries().map(function(n) {
|
|
435
|
+
return n.dateKey = e(n.key), n.formattedValues = t(n.value.aggregate), n.origRows = n.value, n;
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
calcDelta(e) {
|
|
439
|
+
return (e.Close - e.Open) / e.Open;
|
|
440
|
+
}
|
|
441
|
+
enter(e, t) {
|
|
442
|
+
super.enter(e, t), h(e.parentNode).style("overflow-y", "scroll").style("overflow-x", "hidden").style("height", "100%").style("width", "100%"), this._selection.widgetElement(t);
|
|
443
|
+
}
|
|
444
|
+
update(e, t) {
|
|
445
|
+
super.update(e, t), this._palette = this._palette.switch(this.paletteID());
|
|
446
|
+
let n = this.width(), r = n / 12 / 5, i = r * 8, a = this.calendarData(), o = p(a, function(e) {
|
|
447
|
+
return e.dateKey;
|
|
448
|
+
}), s = u(a, function(e) {
|
|
449
|
+
return e.dateKey.getFullYear();
|
|
450
|
+
}), c = this, l = t.selectAll("svg").data(m(+s[0], +s[1] + 1)), d = l.enter().append("svg").each(function(e) {
|
|
451
|
+
let t = h(this).append("g");
|
|
452
|
+
t.append("text").style("text-anchor", "middle"), t.append("g").attr("class", "days");
|
|
453
|
+
let n = G(new Date(e, 0, 1), new Date(e + 1, 0, 1)), r = t.append("g").attr("class", "months");
|
|
454
|
+
n.forEach(function(e) {
|
|
455
|
+
r.append("path").attr("class", "month").attr("d", calcMonthPath(e)).style("stroke", c.monthStrokeColor()).style("stroke-width", c.monthStrokeWidth());
|
|
456
|
+
});
|
|
457
|
+
}).merge(l).attr("width", n).attr("height", i);
|
|
458
|
+
d.select("g").attr("transform", "translate(" + (n - r * 53) / 2 + "," + (i - r * 7 - 1) + ")"), d.select("text").attr("transform", "translate(-6," + r * 3.5 + ")rotate(-90)").text((e) => e), l.exit().remove();
|
|
459
|
+
let f = u(a, function(e) {
|
|
460
|
+
return e.value.aggregate;
|
|
461
|
+
});
|
|
462
|
+
if (this.aggrDeltaColumn()) {
|
|
463
|
+
let e = Math.max(Math.abs(+f[0]), Math.abs(+f[1]));
|
|
464
|
+
f = [-e, e];
|
|
465
|
+
}
|
|
466
|
+
let g = d.select(".days").selectAll(".day").data(function(e) {
|
|
467
|
+
return re(new Date(e, 0, 1), new Date(e + 1, 0, 1));
|
|
468
|
+
}), _ = g.enter().append("rect").attr("class", "day").call(this._selection.enter.bind(this._selection)).on("click", function(e) {
|
|
469
|
+
let t = o.get(e);
|
|
470
|
+
t && t.value && t.value && t.value.length && c.click(c.rowToObj(t.value[0]), c.dateColumn(), c._selection.selected(this));
|
|
471
|
+
}).on("dblclick", function(e) {
|
|
472
|
+
let t = o.get(e);
|
|
473
|
+
t && t.value && t.value && t.value.length && c.dblclick(c.rowToObj(t.value[0]), c.dateColumn(), c._selection.selected(this));
|
|
474
|
+
}).each(function(e) {
|
|
475
|
+
h(this).append("title");
|
|
476
|
+
}).merge(g).attr("x", function(e) {
|
|
477
|
+
return W.count(K(e), e) * r;
|
|
478
|
+
}).attr("y", function(e) {
|
|
479
|
+
return e.getDay() * r;
|
|
480
|
+
}).attr("width", r).attr("height", r).style("stroke", this.dayStrokeColor()).style("stroke-width", this.dayStrokeWidth()).style("fill", null);
|
|
481
|
+
_.select("title").text((e) => e), _.filter(function(e) {
|
|
482
|
+
return o.has(e);
|
|
483
|
+
}).style("fill", function(e) {
|
|
484
|
+
let t = o.get(e);
|
|
485
|
+
return !t || !t.value || !t.value.aggregate ? null : c._palette(t.value.aggregate, f[0], f[1]);
|
|
486
|
+
}).select("title").text(function(e) {
|
|
487
|
+
let t = o.get(e);
|
|
488
|
+
return t.key + ": " + t.formattedValues;
|
|
489
|
+
}), g.exit().remove();
|
|
490
|
+
let v = l.select(".months").selectAll(".month").data(function(e) {
|
|
491
|
+
return G(new Date(e, 0, 1), new Date(e + 1, 0, 1));
|
|
492
|
+
});
|
|
493
|
+
v.enter().append("path").attr("class", "month").merge(v).attr("d", calcMonthPath).style("stroke", this.monthStrokeColor()).style("stroke-width", this.monthStrokeWidth()), v.exit().remove();
|
|
494
|
+
function calcMonthPath(e) {
|
|
495
|
+
let t = new Date(e.getFullYear(), e.getMonth() + 1, 0), n = e.getDay(), i = W.count(K(e), e), a = t.getDay(), o = W.count(K(t), t);
|
|
496
|
+
return "M" + (i + 1) * r + "," + n * r + "H" + i * r + "V" + 7 * r + "H" + o * r + "V" + (a + 1) * r + "H" + (o + 1) * r + "V0H" + (i + 1) * r + "Z";
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
exit(e, t) {
|
|
500
|
+
super.exit(e, t);
|
|
501
|
+
}
|
|
502
|
+
click(e, t, n) {}
|
|
503
|
+
dblclick(e, t, n) {}
|
|
504
|
+
};
|
|
505
|
+
CalendarHeatMap.prototype._class += " other_CalendarHeatMap", CalendarHeatMap.prototype.mixin(s.SimpleSelectionMixin), CalendarHeatMap.prototype._palette = r.rainbow("default"), CalendarHeatMap.prototype.publish("paletteID", "YlOrRd", "set", "Color palette for this widget", CalendarHeatMap.prototype._palette.switch(), { tags: ["Basic", "Shared"] }), CalendarHeatMap.prototype.publish("dayStrokeColor", "#ccc", "html-color", "Color of day border"), CalendarHeatMap.prototype.publish("monthStrokeColor", "#000", "html-color", "Color of month border"), CalendarHeatMap.prototype.publish("dayStrokeWidth", 1, "number", "Pixel width of day border"), CalendarHeatMap.prototype.publish("monthStrokeWidth", 2, "number", "Pixel width of month border"), CalendarHeatMap.prototype.publish("dateColumn", null, "set", "Date Column", function() {
|
|
506
|
+
return this.columns();
|
|
507
|
+
}, { optional: !0 }), CalendarHeatMap.prototype.publish("datePattern", "%Y-%m-%d", "string", "Date Pattern"), CalendarHeatMap.prototype.publish("aggrType", null, "set", "Aggregation Type", [
|
|
508
|
+
null,
|
|
509
|
+
"mean",
|
|
510
|
+
"median",
|
|
511
|
+
"sum",
|
|
512
|
+
"min",
|
|
513
|
+
"max"
|
|
514
|
+
], { optional: !0 }), CalendarHeatMap.prototype.publish("aggrColumn", null, "set", "Aggregation Field", function() {
|
|
515
|
+
return this.columns();
|
|
516
|
+
}, {
|
|
517
|
+
optional: !0,
|
|
518
|
+
disable: (e) => !e.aggrType()
|
|
519
|
+
}), CalendarHeatMap.prototype.publish("aggrDeltaColumn", null, "set", "Aggregation Field", function() {
|
|
520
|
+
return this.columns();
|
|
521
|
+
}, {
|
|
522
|
+
optional: !0,
|
|
523
|
+
disable: (e) => !e.aggrType()
|
|
524
|
+
});
|
|
525
|
+
//#endregion
|
|
526
|
+
//#region src/Comms.ts
|
|
527
|
+
var ue = /* @__PURE__ */ __exportAll({
|
|
528
|
+
Basic: () => Basic,
|
|
529
|
+
Comms: () => Comms,
|
|
530
|
+
ESPMappings: () => ESPMappings,
|
|
531
|
+
ESPUrl: () => ESPUrl,
|
|
532
|
+
HIPIEDatabomb: () => HIPIEDatabomb,
|
|
533
|
+
HIPIERoxie: () => HIPIERoxie,
|
|
534
|
+
HIPIEWorkunit: () => HIPIEWorkunit,
|
|
535
|
+
WsECL: () => WsECL,
|
|
536
|
+
WsWorkunits: () => WsWorkunits$1,
|
|
537
|
+
createESPConnection: () => createESPConnection,
|
|
538
|
+
hookJsonp: () => hookJsonp
|
|
539
|
+
}), q = 60;
|
|
540
|
+
function espValFix(e) {
|
|
541
|
+
if (e == null) return null;
|
|
542
|
+
if (!e.trim) return e.Row ? espRowFix(e.Row) : e;
|
|
543
|
+
let t = e.trim();
|
|
544
|
+
return t !== "" && !isNaN(t) && (t.length <= 1 || t[0] !== "0" || t[1] === ".") ? Number(t) : t;
|
|
545
|
+
}
|
|
546
|
+
function espRowFix(e) {
|
|
547
|
+
for (let t in e) e[t] = espValFix(e[t]);
|
|
548
|
+
return e;
|
|
549
|
+
}
|
|
550
|
+
var ESPUrl = class {
|
|
551
|
+
_protocol = "http:";
|
|
552
|
+
_hostname = "localhost";
|
|
553
|
+
_url;
|
|
554
|
+
_port;
|
|
555
|
+
_search;
|
|
556
|
+
_pathname;
|
|
557
|
+
_params;
|
|
558
|
+
_hash;
|
|
559
|
+
_host;
|
|
560
|
+
constructor() {}
|
|
561
|
+
url(e) {
|
|
562
|
+
if (!arguments.length) return this._url;
|
|
563
|
+
this._url = e;
|
|
564
|
+
let t = document.createElement("a");
|
|
565
|
+
t.href = this._url;
|
|
566
|
+
let n = {};
|
|
567
|
+
if (t.search.length) {
|
|
568
|
+
let e = t.search;
|
|
569
|
+
e[0] === "?" && (e = e.substring(1)), e = e.split("&"), e.map(function(e) {
|
|
570
|
+
let t = e.split("=");
|
|
571
|
+
n[decodeURIComponent(t[0])] = decodeURIComponent(t[1]);
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
for (this._protocol = t.protocol, this._hostname = t.hostname, this._port = t.port, this._pathname = t.pathname; this._pathname.length && this._pathname[0] === "/";) this._pathname = this._pathname.substring(1);
|
|
575
|
+
return this._search = t.search, this._params = n, this._hash = t.hash, this._host = t.host, this;
|
|
576
|
+
}
|
|
577
|
+
protocol(e) {
|
|
578
|
+
return arguments.length ? (this._protocol = e, this) : this._protocol;
|
|
579
|
+
}
|
|
580
|
+
hostname(e) {
|
|
581
|
+
return arguments.length ? (this._hostname = e, this) : this._hostname;
|
|
582
|
+
}
|
|
583
|
+
port(e) {
|
|
584
|
+
return arguments.length ? (this._port = e, this) : this._port;
|
|
585
|
+
}
|
|
586
|
+
search(e) {
|
|
587
|
+
return arguments.length ? (this._search = e, this) : this._search;
|
|
588
|
+
}
|
|
589
|
+
pathname(e) {
|
|
590
|
+
return arguments.length ? (this._pathname = e, this) : this._pathname;
|
|
591
|
+
}
|
|
592
|
+
hash(e) {
|
|
593
|
+
return arguments.length ? (this._hash = e, this) : this._hash;
|
|
594
|
+
}
|
|
595
|
+
host(e) {
|
|
596
|
+
return arguments.length ? (this._host = e, this) : this._host;
|
|
597
|
+
}
|
|
598
|
+
params(e) {
|
|
599
|
+
return arguments.length ? (this._params = e, this) : this._params;
|
|
600
|
+
}
|
|
601
|
+
param(e) {
|
|
602
|
+
return this._params[e];
|
|
603
|
+
}
|
|
604
|
+
isWsWorkunits() {
|
|
605
|
+
return this._pathname.toLowerCase().indexOf("wsworkunits") >= 0 || this._params.Wuid;
|
|
606
|
+
}
|
|
607
|
+
isWorkunitResult() {
|
|
608
|
+
return this.isWsWorkunits() && (this._params.Sequence || this._params.ResultName);
|
|
609
|
+
}
|
|
610
|
+
isWsEcl() {
|
|
611
|
+
return this._pathname.toLowerCase().indexOf("wsecl") >= 0 || this._params.QuerySetId && this._params.Id;
|
|
612
|
+
}
|
|
613
|
+
isWsWorkunits_GetStats() {
|
|
614
|
+
return this._pathname.toLowerCase().indexOf("wsworkunits/wugetstats") >= 0 && this._params.WUID;
|
|
615
|
+
}
|
|
616
|
+
getUrl(e) {
|
|
617
|
+
return e ||= {}, (e.protocol === void 0 ? this._protocol : e.protocol) + "//" + (e.hostname === void 0 ? this._hostname : e.hostname) + ":" + (e.port === void 0 ? this._port : e.port) + "/" + (e.pathname === void 0 ? this._pathname : e.pathname);
|
|
618
|
+
}
|
|
619
|
+
};
|
|
620
|
+
function ESPMappings(e) {
|
|
621
|
+
this._mappings = e, this._reverseMappings = {};
|
|
622
|
+
for (let e in this._mappings) {
|
|
623
|
+
this._reverseMappings[e] = {};
|
|
624
|
+
for (let t in this._mappings[e]) this._reverseMappings[e][this._mappings[e][t]] = t;
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
ESPMappings.prototype.contains = function(e, t) {
|
|
628
|
+
return s.exists(e + "." + t, this._mappings);
|
|
629
|
+
}, ESPMappings.prototype.mapResult = function(e, t) {
|
|
630
|
+
let n = this._mappings[t];
|
|
631
|
+
n && (e[t] = e[t].map(function(e) {
|
|
632
|
+
let t = [];
|
|
633
|
+
if (n.x && n.x instanceof Array) {
|
|
634
|
+
t = [];
|
|
635
|
+
for (let r = 0; r < n.x.length; ++r) t.push(e[n.y[r]]);
|
|
636
|
+
} else for (let r in n) n[r] === "label" ? t[0] = e[r] : n[r] === "weight" && (t[1] = e[r]);
|
|
637
|
+
return t;
|
|
638
|
+
}, this));
|
|
639
|
+
}, ESPMappings.prototype.mapResponse = function(e) {
|
|
640
|
+
for (let t in e) this.mapResult(e, t);
|
|
641
|
+
};
|
|
642
|
+
var J = /* @__PURE__ */ __name(function(e) {
|
|
643
|
+
let t = [];
|
|
644
|
+
for (let n in e) if (e.hasOwnProperty(n)) {
|
|
645
|
+
let r = e[n];
|
|
646
|
+
r != null && t.push(encodeURIComponent(n) + "=" + encodeURIComponent(r));
|
|
647
|
+
}
|
|
648
|
+
return t.join("&");
|
|
649
|
+
}, "serialize"), jsonp = function(e, t, n) {
|
|
650
|
+
return new Promise(function(r, i) {
|
|
651
|
+
let a = n * 1e3, o = 5e3, s = "jsonp_callback_" + Math.round(Math.random() * 999999);
|
|
652
|
+
window[s] = function(e) {
|
|
653
|
+
a = 0, doCallback(), r(e);
|
|
654
|
+
};
|
|
655
|
+
let c = document.createElement("script");
|
|
656
|
+
c.src = e + (e.indexOf("?") >= 0 ? "&" : "?") + "jsonp=" + s + "&" + J(t), document.body.appendChild(c);
|
|
657
|
+
let l = setInterval(function() {
|
|
658
|
+
a <= 0 ? clearInterval(l) : (a -= o, a <= 0 && (clearInterval(l), doCallback(), i(Error("Request timeout: " + c.src))));
|
|
659
|
+
}, o);
|
|
660
|
+
function doCallback() {
|
|
661
|
+
delete window[s], document.body.removeChild(c);
|
|
662
|
+
}
|
|
663
|
+
});
|
|
664
|
+
}, Comms = class extends ESPUrl {
|
|
665
|
+
_proxyMappings;
|
|
666
|
+
_mappings;
|
|
667
|
+
_timeout;
|
|
668
|
+
_hipieResults;
|
|
669
|
+
_hipieResultsLength;
|
|
670
|
+
constructor() {
|
|
671
|
+
super(), this._proxyMappings = {}, this._mappings = new ESPMappings({}), this._timeout = q, this._hipieResults = {};
|
|
672
|
+
}
|
|
673
|
+
hipieResults(e) {
|
|
674
|
+
if (!arguments.length) return this._hipieResults;
|
|
675
|
+
this._hipieResultsLength = 0, this._hipieResults = {};
|
|
676
|
+
let t = this;
|
|
677
|
+
return e.forEach(function(e) {
|
|
678
|
+
t._hipieResultsLength++, t._hipieResults[e.id] = e;
|
|
679
|
+
}), this;
|
|
680
|
+
}
|
|
681
|
+
jsonp(e, t) {
|
|
682
|
+
for (let n in this._proxyMappings) {
|
|
683
|
+
let r = e.split(n), i = r[0];
|
|
684
|
+
if (r.length > 1) {
|
|
685
|
+
let a = new ESPUrl().url(e);
|
|
686
|
+
e = i + this._proxyMappings[n], t.IP = a.hostname(), t.PORT = a.port(), r.length > 0 && (t.PATH = r[1]);
|
|
687
|
+
break;
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
return jsonp(e, t, this.timeout());
|
|
691
|
+
}
|
|
692
|
+
ajax(e, t, n) {
|
|
693
|
+
return new Promise(function(r, i) {
|
|
694
|
+
let a = t;
|
|
695
|
+
e === "GET" && n && (a += "?" + J(n));
|
|
696
|
+
let o = new XMLHttpRequest();
|
|
697
|
+
o.onload = function(e) {
|
|
698
|
+
this.status >= 200 && this.status < 300 ? r(JSON.parse(this.response)) : i(Error(this.statusText));
|
|
699
|
+
}, o.onerror = function() {
|
|
700
|
+
i(Error(this.statusText));
|
|
701
|
+
}, o.open(e, a), o.setRequestHeader("X-Requested-With", "XMLHttpRequest"), e === "GET" ? o.send() : (o.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), o.send(J(n)));
|
|
702
|
+
});
|
|
703
|
+
}
|
|
704
|
+
get(e, t) {
|
|
705
|
+
return this.ajax("GET", e, t);
|
|
706
|
+
}
|
|
707
|
+
post(e, t) {
|
|
708
|
+
return this.ajax("POST", e, t);
|
|
709
|
+
}
|
|
710
|
+
mappings(e) {
|
|
711
|
+
return arguments.length ? (this._mappings = new ESPMappings(e), this) : this._mappings;
|
|
712
|
+
}
|
|
713
|
+
proxyMappings(e) {
|
|
714
|
+
return arguments.length ? (this._proxyMappings = e, this) : this._proxyMappings;
|
|
715
|
+
}
|
|
716
|
+
timeout(e) {
|
|
717
|
+
return arguments.length ? (this._timeout = e || q, this) : this._timeout;
|
|
718
|
+
}
|
|
719
|
+
}, Basic = class extends Comms {
|
|
720
|
+
_cacheCalls;
|
|
721
|
+
constructor() {
|
|
722
|
+
super();
|
|
723
|
+
}
|
|
724
|
+
cacheCalls(e) {
|
|
725
|
+
return arguments.length ? (this._cacheCalls = e, this) : this._cacheCalls;
|
|
726
|
+
}
|
|
727
|
+
call(e, t) {
|
|
728
|
+
let n = this._url + (this._url.indexOf("?") >= 0 ? "&" : "?") + J(e);
|
|
729
|
+
if (this._cacheCalls) {
|
|
730
|
+
let e = this;
|
|
731
|
+
return new Promise(function(e, r) {
|
|
732
|
+
let i = JSON.parse(localStorage.getItem("hpcc.viz." + n));
|
|
733
|
+
if (!i) throw Error("not cached");
|
|
734
|
+
t && (console.error("Deprecated: callback, use promise (Basic.prototype.call)"), t(i)), e(i);
|
|
735
|
+
}).catch(function(r) {
|
|
736
|
+
return e.get(n).then(function(e) {
|
|
737
|
+
return localStorage.setItem("hpcc.viz." + n, JSON.stringify(e)), t && (console.error("Deprecated: callback, use promise (Basic.prototype.call)"), t(e)), e;
|
|
738
|
+
});
|
|
739
|
+
});
|
|
740
|
+
} else return localStorage.removeItem("hpcc.viz." + n), this.get(n).then(function(e) {
|
|
741
|
+
return t && (console.error("Deprecated: callback, use promise (Basic.prototype.call)"), t(e)), e;
|
|
742
|
+
});
|
|
743
|
+
}
|
|
744
|
+
};
|
|
745
|
+
function locateRoxieResponse$1(e) {
|
|
746
|
+
for (let t in e) {
|
|
747
|
+
if (e[t].Row && e[t].Row instanceof Array) return e;
|
|
748
|
+
let n;
|
|
749
|
+
if (typeof e[t] != "string" && (n = locateRoxieResponse$1(e[t])), n) return n;
|
|
750
|
+
}
|
|
751
|
+
return null;
|
|
752
|
+
}
|
|
753
|
+
__name(locateRoxieResponse$1, "locateRoxieResponse");
|
|
754
|
+
function locateRoxieException(e) {
|
|
755
|
+
for (let t in e) {
|
|
756
|
+
if (e[t].Exception && e[t].Exception instanceof Array) return e[t];
|
|
757
|
+
let n = locateRoxieException(e[t]);
|
|
758
|
+
if (n) return n;
|
|
759
|
+
}
|
|
760
|
+
return null;
|
|
761
|
+
}
|
|
762
|
+
var WsECL = class extends Comms {
|
|
763
|
+
_target;
|
|
764
|
+
_query;
|
|
765
|
+
constructor() {
|
|
766
|
+
super(), this._port = "8002", this._target = "", this._query = "";
|
|
767
|
+
}
|
|
768
|
+
url(e) {
|
|
769
|
+
let t = super.url.apply(this, arguments);
|
|
770
|
+
if (arguments.length) {
|
|
771
|
+
this._port = this._port === "8010" ? "8002" : this._port;
|
|
772
|
+
for (let e in this._params) switch (e) {
|
|
773
|
+
case "QuerySetId":
|
|
774
|
+
this.target(this._params[e]);
|
|
775
|
+
break;
|
|
776
|
+
case "Id":
|
|
777
|
+
this.query(this._params[e]);
|
|
778
|
+
break;
|
|
779
|
+
}
|
|
780
|
+
let e, t;
|
|
781
|
+
(!this._target || !this._query) && (e = this._pathname.split("/query/"), e.length >= 2 && (t = e[1].split("/"), t.length >= 2 && (this.target(t[0]), this.query(t[1]))));
|
|
782
|
+
}
|
|
783
|
+
return t;
|
|
784
|
+
}
|
|
785
|
+
target(e) {
|
|
786
|
+
return arguments.length ? (this._target = e, this) : this._target;
|
|
787
|
+
}
|
|
788
|
+
query(e) {
|
|
789
|
+
return arguments.length ? (this._query = e, this) : this._query;
|
|
790
|
+
}
|
|
791
|
+
constructUrl() {
|
|
792
|
+
return Comms.prototype.getUrl.call(this, { pathname: "WsEcl/submit/query/" + this._target + "/" + this._query + "/json" });
|
|
793
|
+
}
|
|
794
|
+
call(e, t, n) {
|
|
795
|
+
e ||= {}, e.target = e.target || this._target, e.query = e.query || this._query;
|
|
796
|
+
let r = this, i = this.getUrl({ pathname: "WsEcl/submit/query/" + e.target + "/" + e.query + "/json" });
|
|
797
|
+
return this.jsonp(i, t).then(function(e) {
|
|
798
|
+
let t = locateRoxieResponse$1(e);
|
|
799
|
+
if (t ||= locateRoxieException(e), e = t, e.Exception) throw Error(e.Exception.reduce(function(e, t, n, r) {
|
|
800
|
+
return e.length && (e += "\n"), e + t.Source + " " + t.Code + ": " + t.Message;
|
|
801
|
+
}, ""));
|
|
802
|
+
for (let t in e) e[t].Row && (e[t] = e[t].Row.map(espRowFix));
|
|
803
|
+
return r._mappings.mapResponse(e), n && (console.error("Deprecated: callback, use promise (WsECL.prototype.call)"), n(e)), e;
|
|
804
|
+
});
|
|
805
|
+
}
|
|
806
|
+
send(e, t) {
|
|
807
|
+
return this.call({
|
|
808
|
+
target: this._target,
|
|
809
|
+
query: this._query
|
|
810
|
+
}, e, t);
|
|
811
|
+
}
|
|
812
|
+
}, WsWorkunits$1 = class extends Comms {
|
|
813
|
+
static {
|
|
814
|
+
__name(this, "WsWorkunits");
|
|
815
|
+
}
|
|
816
|
+
_wuid = "";
|
|
817
|
+
_jobname = "";
|
|
818
|
+
_sequence = null;
|
|
819
|
+
_resultName = null;
|
|
820
|
+
_fetchResultNamesPromise = null;
|
|
821
|
+
_fetchResultPromise = {};
|
|
822
|
+
_resultNameCache = {};
|
|
823
|
+
_resultNameCacheCount = 0;
|
|
824
|
+
_total;
|
|
825
|
+
constructor() {
|
|
826
|
+
super(), this._port = "8010";
|
|
827
|
+
}
|
|
828
|
+
url(e) {
|
|
829
|
+
let t = Comms.prototype.url.apply(this, arguments);
|
|
830
|
+
if (arguments.length) {
|
|
831
|
+
for (let e in this._params) switch (e) {
|
|
832
|
+
case "Wuid":
|
|
833
|
+
this.wuid(this._params[e]);
|
|
834
|
+
break;
|
|
835
|
+
case "ResultName":
|
|
836
|
+
this.resultName(this._params[e]);
|
|
837
|
+
break;
|
|
838
|
+
case "Sequence":
|
|
839
|
+
this.sequence(this._params[e]);
|
|
840
|
+
break;
|
|
841
|
+
}
|
|
842
|
+
if (!this._wuid) {
|
|
843
|
+
let e = this._url.split("/res/");
|
|
844
|
+
if (e.length >= 2) {
|
|
845
|
+
let t = e[1].split("/");
|
|
846
|
+
this.wuid(t[0]);
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
return t;
|
|
851
|
+
}
|
|
852
|
+
wuid(e) {
|
|
853
|
+
return arguments.length ? (this._wuid = e, this) : this._wuid;
|
|
854
|
+
}
|
|
855
|
+
jobname(e) {
|
|
856
|
+
return arguments.length ? (this._jobname = e, this) : this._jobname;
|
|
857
|
+
}
|
|
858
|
+
sequence(e) {
|
|
859
|
+
return arguments.length ? (this._sequence = e, this) : this._sequence;
|
|
860
|
+
}
|
|
861
|
+
resultName(e) {
|
|
862
|
+
return arguments.length ? (this._resultName = e, this) : this._resultName;
|
|
863
|
+
}
|
|
864
|
+
appendParam(e, t, n) {
|
|
865
|
+
return t ? (n && (n += "&"), n + e + "=" + t) : n;
|
|
866
|
+
}
|
|
867
|
+
constructUrl() {
|
|
868
|
+
let e = Comms.prototype.getUrl.call(this, { pathname: "WsWorkunits/res/" + this._wuid + "/" }), t = "";
|
|
869
|
+
return t = this.appendParam("ResultName", this._resultName, t), e + (t ? "?" + t : "");
|
|
870
|
+
}
|
|
871
|
+
_fetchResult(e, t, n) {
|
|
872
|
+
if (e ||= {}, !this._fetchResultPromise[e.resultname]) {
|
|
873
|
+
e._start = e._start || 0, e._count = e._count || -1;
|
|
874
|
+
let r = this.getUrl({ pathname: "WsWorkunits/WUResult.json" }), i = {
|
|
875
|
+
Wuid: e.wuid,
|
|
876
|
+
ResultName: e.resultname,
|
|
877
|
+
SuppressXmlSchema: !0,
|
|
878
|
+
Start: e._start,
|
|
879
|
+
Count: e._count
|
|
880
|
+
};
|
|
881
|
+
this._resultNameCache[e.resultname] = {};
|
|
882
|
+
let a = this;
|
|
883
|
+
this._fetchResultPromise[e.resultname] = this.jsonp(r, i).then(function(r) {
|
|
884
|
+
for (let e in r) {
|
|
885
|
+
if (!r[e].Result) throw Error("No result found.");
|
|
886
|
+
a._total = r[e].Total, r = r[e].Result;
|
|
887
|
+
for (let e in r) {
|
|
888
|
+
r = r[e].Row.map(espRowFix);
|
|
889
|
+
break;
|
|
890
|
+
}
|
|
891
|
+
break;
|
|
892
|
+
}
|
|
893
|
+
return a._resultNameCache[e.resultname] = r, n || a._mappings.mapResult(a._resultNameCache, e.resultname), t && (console.error("Deprecated: callback, use promise (WsWorkunits.prototype._fetchResult)"), t(a._resultNameCache[e.resultname])), a._resultNameCache[e.resultname];
|
|
894
|
+
});
|
|
895
|
+
}
|
|
896
|
+
return this._fetchResultPromise[e.resultname];
|
|
897
|
+
}
|
|
898
|
+
fetchResult(e, t, n) {
|
|
899
|
+
if (e.wuid) return this._fetchResult(e, t, n);
|
|
900
|
+
if (e.jobname) {
|
|
901
|
+
let r = this;
|
|
902
|
+
return this.WUQuery(e, function(i) {
|
|
903
|
+
return e.wuid = i[0].Wuid, r._fetchResult(e, t, n);
|
|
904
|
+
});
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
WUQuery(e, t) {
|
|
908
|
+
let n = this.getUrl({ pathname: "WsWorkunits/WUQuery.json" }), r = {
|
|
909
|
+
Jobname: e.jobname,
|
|
910
|
+
Count: 1
|
|
911
|
+
};
|
|
912
|
+
return this._resultNameCache = {}, this._resultNameCacheCount = 0, this.jsonp(n, r).then(function(e) {
|
|
913
|
+
if (!s.exists("WUQueryResponse.Workunits.ECLWorkunit", e)) throw Error("No workunit found.");
|
|
914
|
+
return e = e.WUQueryResponse.Workunits.ECLWorkunit, t && (console.error("Deprecated: callback, use promise (WsWorkunits.prototype.WUQuery)"), t(e)), e;
|
|
915
|
+
});
|
|
916
|
+
}
|
|
917
|
+
fetchResultNames(e) {
|
|
918
|
+
if (!this._fetchResultNamesPromise) {
|
|
919
|
+
let t = this.getUrl({ pathname: "WsWorkunits/WUInfo.json" }), n = {
|
|
920
|
+
Wuid: this._wuid,
|
|
921
|
+
TruncateEclTo64k: !0,
|
|
922
|
+
IncludeExceptions: !1,
|
|
923
|
+
IncludeGraphs: !1,
|
|
924
|
+
IncludeSourceFiles: !1,
|
|
925
|
+
IncludeResults: !0,
|
|
926
|
+
IncludeResultsViewNames: !1,
|
|
927
|
+
IncludeVariables: !1,
|
|
928
|
+
IncludeTimers: !1,
|
|
929
|
+
IncludeResourceURLs: !1,
|
|
930
|
+
IncludeDebugValues: !1,
|
|
931
|
+
IncludeApplicationValues: !1,
|
|
932
|
+
IncludeWorkflows: !1,
|
|
933
|
+
IncludeXmlSchemas: !1,
|
|
934
|
+
SuppressResultSchemas: !0
|
|
935
|
+
};
|
|
936
|
+
this._resultNameCache = {}, this._resultNameCacheCount = 0;
|
|
937
|
+
let r = this;
|
|
938
|
+
this._fetchResultNamesPromise = this.jsonp(t, n).then(function(i) {
|
|
939
|
+
return s.exists("WUInfoResponse.Workunit.Archived", i) && i.WUInfoResponse.Workunit.Archived && console.warn("WU is archived: " + t + " " + JSON.stringify(n)), s.exists("WUInfoResponse.Workunit.Results.ECLResult", i) && i.WUInfoResponse.Workunit.Results.ECLResult.map(function(e) {
|
|
940
|
+
r._resultNameCache[e.Name] = [], ++r._resultNameCacheCount;
|
|
941
|
+
}), e && (console.error("Deprecated: callback, use promise (WsWorkunits.prototype.fetchResultNames)"), e(r._resultNameCache)), r._resultNameCache;
|
|
942
|
+
});
|
|
943
|
+
}
|
|
944
|
+
return this._fetchResultNamesPromise;
|
|
945
|
+
}
|
|
946
|
+
fetchResults(e, t) {
|
|
947
|
+
let n = this;
|
|
948
|
+
return this.fetchResultNames().then(function(r) {
|
|
949
|
+
let i = [];
|
|
950
|
+
for (let e in n._resultNameCache) i.push(n.fetchResult({
|
|
951
|
+
wuid: n._wuid,
|
|
952
|
+
resultname: e
|
|
953
|
+
}, null, t));
|
|
954
|
+
return Promise.all(i).then(function(t) {
|
|
955
|
+
return e && (console.error("Deprecated: callback, use promise (WsWorkunits.prototype.fetchResults)"), e(n._resultNameCache)), n._resultNameCache;
|
|
956
|
+
});
|
|
957
|
+
});
|
|
958
|
+
}
|
|
959
|
+
postFilter(e, t) {
|
|
960
|
+
let n = {};
|
|
961
|
+
for (let r in t) n[r] = t[r].filter(function(t, n) {
|
|
962
|
+
for (let n in e) if (t[n] !== void 0 && e[n] !== void 0 && t[n] != e[n]) return !1;
|
|
963
|
+
return !0;
|
|
964
|
+
});
|
|
965
|
+
return this._mappings.mapResponse(n), n;
|
|
966
|
+
}
|
|
967
|
+
send(e, t) {
|
|
968
|
+
let n = this;
|
|
969
|
+
this._resultNameCacheCount ? t(n.postFilter(e, this._resultNameCache)) : this.fetchResults(function(r) {
|
|
970
|
+
t(n.postFilter(e, r));
|
|
971
|
+
}, !0);
|
|
972
|
+
}
|
|
973
|
+
};
|
|
974
|
+
function WsWorkunits_GetStats() {
|
|
975
|
+
Comms.call(this), this._port = "8010", this._wuid = null;
|
|
976
|
+
}
|
|
977
|
+
WsWorkunits_GetStats.prototype = Object.create(Comms.prototype), WsWorkunits_GetStats.prototype.url = function(e) {
|
|
978
|
+
let t = Comms.prototype.url.apply(this, arguments);
|
|
979
|
+
if (arguments.length) for (let e in this._params) switch (e) {
|
|
980
|
+
case "WUID":
|
|
981
|
+
this.wuid(this._params[e]);
|
|
982
|
+
break;
|
|
983
|
+
}
|
|
984
|
+
return t;
|
|
985
|
+
}, WsWorkunits_GetStats.prototype.wuid = function(e) {
|
|
986
|
+
return arguments.length ? (this._wuid = e, this) : this._wuid;
|
|
987
|
+
}, WsWorkunits_GetStats.prototype.constructUrl = function() {
|
|
988
|
+
return Comms.prototype.getUrl.call(this, { pathname: "WsWorkunits/WUGetStats?WUID=" + this._wuid });
|
|
989
|
+
}, WsWorkunits_GetStats.prototype.send = function(e, t) {
|
|
990
|
+
let n = this.getUrl({ pathname: "WsWorkunits/WUGetStats.json?WUID=" + this._wuid });
|
|
991
|
+
return this.jsonp(n, e).then(function(e) {
|
|
992
|
+
return s.exists("WUGetStatsResponse.Statistics.WUStatisticItem", e) ? (t && (console.error("Deprecated: callback, use promise (WsWorkunits_GetStats.prototype.send)"), t(e.WUGetStatsResponse.Statistics.WUStatisticItem)), e.WUGetStatsResponse.Statistics.WUStatisticItem) : (t && (console.error("Deprecated: callback, use promise (WsWorkunits_GetStats.prototype.send)"), t([])), []);
|
|
993
|
+
});
|
|
994
|
+
};
|
|
995
|
+
function HIPIERoxie() {
|
|
996
|
+
Comms.call(this);
|
|
997
|
+
}
|
|
998
|
+
HIPIERoxie.prototype = Object.create(Comms.prototype), HIPIERoxie.prototype.fetchResults = function(e, t) {
|
|
999
|
+
let n = this.getUrl({});
|
|
1000
|
+
this._resultNameCache = {}, this._resultNameCacheCount = 0;
|
|
1001
|
+
let r = this;
|
|
1002
|
+
return this.jsonp(n, e).then(function(e) {
|
|
1003
|
+
let n = locateRoxieResponse$1(e);
|
|
1004
|
+
if (n ||= locateRoxieException(e), e = n, e.Exception) throw Error(e.Exception.reduce(function(e, t, n, r) {
|
|
1005
|
+
return e.length && (e += "\n"), e + t.Source + " " + t.Code + ": " + t.Message;
|
|
1006
|
+
}, ""));
|
|
1007
|
+
for (let t in e) e[t].Row && (r._resultNameCache[t] = e[t].Row.map(espRowFix), ++r._resultNameCacheCount);
|
|
1008
|
+
return t && (console.error("Deprecated: callback, use promise (HIPIERoxie.prototype.fetchResults)"), t(r._resultNameCache)), r._resultNameCache;
|
|
1009
|
+
});
|
|
1010
|
+
}, HIPIERoxie.prototype.fetchResult = function(e, t) {
|
|
1011
|
+
let n = this;
|
|
1012
|
+
return new Promise(function(r, i) {
|
|
1013
|
+
t && (console.error("Deprecated: callback, use promise (HIPIERoxie.prototype.fetchResult)"), t(n._resultNameCache[e])), r(n._resultNameCache[e]);
|
|
1014
|
+
});
|
|
1015
|
+
}, HIPIERoxie.prototype.call = function(e, t) {
|
|
1016
|
+
let n = this;
|
|
1017
|
+
return this.fetchResults(e, t).then(function(e) {
|
|
1018
|
+
let t = {};
|
|
1019
|
+
for (let r in n._hipieResults) {
|
|
1020
|
+
let i = n._hipieResults[r];
|
|
1021
|
+
t[i.id] = e[i.from];
|
|
1022
|
+
}
|
|
1023
|
+
return t;
|
|
1024
|
+
});
|
|
1025
|
+
};
|
|
1026
|
+
function HIPIEWorkunit() {
|
|
1027
|
+
WsWorkunits$1.call(this);
|
|
1028
|
+
}
|
|
1029
|
+
HIPIEWorkunit.prototype = Object.create(WsWorkunits$1.prototype), HIPIEWorkunit.prototype.fetchResults = function(e) {
|
|
1030
|
+
let t = this;
|
|
1031
|
+
return WsWorkunits$1.prototype.fetchResultNames.call(this).then(function(n) {
|
|
1032
|
+
let r = [];
|
|
1033
|
+
for (let e in t._hipieResults) {
|
|
1034
|
+
let n = t._hipieResults[e];
|
|
1035
|
+
r.push(t.fetchResult(n.from));
|
|
1036
|
+
}
|
|
1037
|
+
return Promise.all(r).then(function(n) {
|
|
1038
|
+
return e && (console.error("Deprecated: callback, use promise (HIPIEWorkunit.prototype.fetchResults)"), e(t._resultNameCache)), t._resultNameCache;
|
|
1039
|
+
});
|
|
1040
|
+
});
|
|
1041
|
+
}, HIPIEWorkunit.prototype.fetchResult = function(e, t) {
|
|
1042
|
+
return WsWorkunits$1.prototype.fetchResult.call(this, {
|
|
1043
|
+
wuid: this._wuid,
|
|
1044
|
+
resultname: e
|
|
1045
|
+
}).then(function(e) {
|
|
1046
|
+
return t && (console.error("Deprecated: callback, use promise (HIPIEWorkunit.prototype.fetchResult)"), t(e)), e;
|
|
1047
|
+
});
|
|
1048
|
+
}, HIPIEWorkunit.prototype.call = function(e, t) {
|
|
1049
|
+
let n = this;
|
|
1050
|
+
if (e.refresh || !this._resultNameCache || !this._resultNameCacheCount) return this.fetchResults(t).then(function(t) {
|
|
1051
|
+
return filterResults(e);
|
|
1052
|
+
});
|
|
1053
|
+
return new Promise(function(t, n) {
|
|
1054
|
+
t(filterResults(e));
|
|
1055
|
+
});
|
|
1056
|
+
function filterResults(e) {
|
|
1057
|
+
let t = {};
|
|
1058
|
+
for (let n in e) e[n + "_changed"] !== void 0 && (t[n] = { value: e[n] });
|
|
1059
|
+
let r = {};
|
|
1060
|
+
for (let e in n._hipieResults) {
|
|
1061
|
+
let i = n._hipieResults[e], a = {};
|
|
1062
|
+
for (let e = 0; e < i.filters.length; ++e) {
|
|
1063
|
+
let n = i.filters[e];
|
|
1064
|
+
n.isRange() || (a[n.fieldid] = t[n.fieldid] || { value: void 0 }, a[n.fieldid].filter = n);
|
|
1065
|
+
}
|
|
1066
|
+
r[i.id] = n._resultNameCache[i.from].filter(function(e) {
|
|
1067
|
+
for (let t in a) if (!a[t].filter.matches(e, a[t].value)) return !1;
|
|
1068
|
+
return !0;
|
|
1069
|
+
});
|
|
1070
|
+
}
|
|
1071
|
+
return r;
|
|
1072
|
+
}
|
|
1073
|
+
};
|
|
1074
|
+
function HIPIEDatabomb() {
|
|
1075
|
+
HIPIEWorkunit.call(this);
|
|
1076
|
+
}
|
|
1077
|
+
HIPIEDatabomb.prototype = Object.create(HIPIEWorkunit.prototype), HIPIEDatabomb.prototype.databomb = function(e) {
|
|
1078
|
+
return arguments.length ? (this._databomb = e, this) : this._databomb;
|
|
1079
|
+
}, HIPIEDatabomb.prototype.databombOutput = function(e, t) {
|
|
1080
|
+
if (arguments.length) return this._resultNameCacheCount++, this._databomb instanceof Array ? this._resultNameCache[e] = this._databomb.map(espRowFix) : this._resultNameCache[e] = this._databomb[e].map(espRowFix), this;
|
|
1081
|
+
}, HIPIEDatabomb.prototype.fetchResults = function(e) {
|
|
1082
|
+
let t = this;
|
|
1083
|
+
return new Promise(function(n, r) {
|
|
1084
|
+
e && (console.error("Deprecated: callback, use promise (HIPIEDatabomb.prototype.fetchResults)"), e(t._resultNameCache)), n(t._resultNameCache);
|
|
1085
|
+
});
|
|
1086
|
+
};
|
|
1087
|
+
function createESPConnection(e) {
|
|
1088
|
+
e ||= document.URL;
|
|
1089
|
+
let t = new ESPUrl().url(e);
|
|
1090
|
+
return t.isWsWorkunits_GetStats() ? new WsWorkunits_GetStats().url(e) : t.isWsWorkunits() ? new WsWorkunits$1().url(e) : t.isWsEcl() ? new WsECL().url(e) : null;
|
|
1091
|
+
}
|
|
1092
|
+
function hookJsonp(e) {
|
|
1093
|
+
jsonp = e;
|
|
1094
|
+
}
|
|
1095
|
+
//#endregion
|
|
1096
|
+
//#region src/ESP.ts
|
|
1097
|
+
function nestedRowFix(e) {
|
|
1098
|
+
if (e.Row && e.Row instanceof Array) return e.Row.map(nestedRowFix);
|
|
1099
|
+
if (e instanceof Object) for (let t in e) e[t] = nestedRowFix(e[t]);
|
|
1100
|
+
return e;
|
|
1101
|
+
}
|
|
1102
|
+
var Y = !1, X = {};
|
|
1103
|
+
function BasicComms() {
|
|
1104
|
+
Basic.call(this);
|
|
1105
|
+
}
|
|
1106
|
+
BasicComms.prototype = Object.create(Basic.prototype), BasicComms.prototype.jsonp = function(e, t) {
|
|
1107
|
+
let n = JSON.stringify(t);
|
|
1108
|
+
return Y && X[e] && X[e][n] ? Promise.resolve(X[e][n]) : Basic.prototype.jsonp.apply(this, arguments).then(function(t) {
|
|
1109
|
+
return Y && (X[e] || (X[e] = {}), X[e][n] = t), t;
|
|
1110
|
+
});
|
|
1111
|
+
};
|
|
1112
|
+
function WsWorkunits(e) {
|
|
1113
|
+
BasicComms.call(this), this.url(e + "WsWorkunits/");
|
|
1114
|
+
}
|
|
1115
|
+
WsWorkunits.prototype = Object.create(BasicComms.prototype), WsWorkunits.prototype.wuQuery = function(e) {
|
|
1116
|
+
let t = this.getUrl({ pathname: "WsWorkunits/WUQuery.json" }), n = {
|
|
1117
|
+
Wuid: "",
|
|
1118
|
+
Type: "",
|
|
1119
|
+
Cluster: "",
|
|
1120
|
+
RoxieCluster: "",
|
|
1121
|
+
Owner: "",
|
|
1122
|
+
State: "",
|
|
1123
|
+
StartDate: "",
|
|
1124
|
+
EndDate: "",
|
|
1125
|
+
ECL: "",
|
|
1126
|
+
Jobname: "",
|
|
1127
|
+
LogicalFile: "",
|
|
1128
|
+
LogicalFileSearchType: "",
|
|
1129
|
+
After: "",
|
|
1130
|
+
Before: "",
|
|
1131
|
+
Count: "",
|
|
1132
|
+
PageSize: 100,
|
|
1133
|
+
PageStartFrom: 0,
|
|
1134
|
+
PageEndAt: "",
|
|
1135
|
+
LastNDays: "",
|
|
1136
|
+
Sortby: "",
|
|
1137
|
+
Descending: 0,
|
|
1138
|
+
CacheHint: ""
|
|
1139
|
+
};
|
|
1140
|
+
for (let t in e) n[t] = e[t];
|
|
1141
|
+
return this.jsonp(t, n).then(function(e) {
|
|
1142
|
+
return e.WUQueryResponse && e.WUQueryResponse.Workunits ? e.WUQueryResponse.Workunits.ECLWorkunit : [];
|
|
1143
|
+
});
|
|
1144
|
+
};
|
|
1145
|
+
function Workunit(e, t) {
|
|
1146
|
+
BasicComms.call(this), this.url(e + "WsWorkunits/"), this._wuid = t;
|
|
1147
|
+
}
|
|
1148
|
+
Workunit.prototype = Object.create(BasicComms.prototype), Workunit.prototype.wuInfo = function(e) {
|
|
1149
|
+
let t = this.getUrl({ pathname: "WsWorkunits/WUInfo.json" }), n = {
|
|
1150
|
+
Wuid: this._wuid,
|
|
1151
|
+
TruncateEclTo64k: !0,
|
|
1152
|
+
IncludeExceptions: !1,
|
|
1153
|
+
IncludeGraphs: !1,
|
|
1154
|
+
IncludeSourceFiles: !1,
|
|
1155
|
+
IncludeResults: !1,
|
|
1156
|
+
IncludeResultsViewNames: !1,
|
|
1157
|
+
IncludeVariables: !1,
|
|
1158
|
+
IncludeTimers: !1,
|
|
1159
|
+
IncludeResourceURLs: !1,
|
|
1160
|
+
IncludeDebugValues: !1,
|
|
1161
|
+
IncludeApplicationValues: !1,
|
|
1162
|
+
IncludeWorkflows: !1,
|
|
1163
|
+
IncludeXmlSchemas: !1,
|
|
1164
|
+
SuppressResultSchemas: !0
|
|
1165
|
+
};
|
|
1166
|
+
for (let t in e) n[t] = e[t];
|
|
1167
|
+
return this.jsonp(t, n).then(function(r) {
|
|
1168
|
+
if (Y) {
|
|
1169
|
+
let i = { WUInfoResponse: { Workunit: {} } };
|
|
1170
|
+
for (let t in e) {
|
|
1171
|
+
let e = t.substring(7);
|
|
1172
|
+
i.WUInfoResponse.Workunit[e] = r.WUInfoResponse.Workunit[e];
|
|
1173
|
+
}
|
|
1174
|
+
X[t][JSON.stringify(n)] = i;
|
|
1175
|
+
}
|
|
1176
|
+
return r;
|
|
1177
|
+
});
|
|
1178
|
+
}, Workunit.prototype.wuUpdate = function(e) {
|
|
1179
|
+
let t = this.getUrl({ pathname: "WsWorkunits/WUUpdate.json" }), n = { Wuid: this._wuid };
|
|
1180
|
+
for (let t in e) n[t] = e[t];
|
|
1181
|
+
return this.post(t, n);
|
|
1182
|
+
}, Workunit.prototype.appData = function(e, t, n) {
|
|
1183
|
+
if (arguments.length === 2) return this.wuInfo({ IncludeApplicationValues: !0 }).then(function(n) {
|
|
1184
|
+
let r;
|
|
1185
|
+
return n.WUInfoResponse && n.WUInfoResponse.Workunit && n.WUInfoResponse.Workunit.ApplicationValues && n.WUInfoResponse.Workunit.ApplicationValues.ApplicationValue && n.WUInfoResponse.Workunit.ApplicationValues.ApplicationValue.filter(function(n) {
|
|
1186
|
+
return n.Application === e && n.Name === t;
|
|
1187
|
+
}).forEach(function(e) {
|
|
1188
|
+
r = e.Value;
|
|
1189
|
+
}), r;
|
|
1190
|
+
});
|
|
1191
|
+
if (arguments.length === 3) return this.wuUpdate({
|
|
1192
|
+
"ApplicationValues.ApplicationValue.0.Application": e,
|
|
1193
|
+
"ApplicationValues.ApplicationValue.0.Name": t,
|
|
1194
|
+
"ApplicationValues.ApplicationValue.0.Value": n,
|
|
1195
|
+
"ApplicationValues.ApplicationValue.itemcount": 1
|
|
1196
|
+
});
|
|
1197
|
+
}, Workunit.prototype.results = function() {
|
|
1198
|
+
let e = this;
|
|
1199
|
+
return this.wuInfo({ IncludeResults: !0 }).then(function(t) {
|
|
1200
|
+
let n = [];
|
|
1201
|
+
return s.exists("WUInfoResponse.Workunit.Results.ECLResult", t) && (n = t.WUInfoResponse.Workunit.Results.ECLResult.map(function(t) {
|
|
1202
|
+
return new WUResult(e.getUrl({ pathname: "WsWorkunits/" }), e._wuid, t.Name);
|
|
1203
|
+
})), n;
|
|
1204
|
+
});
|
|
1205
|
+
}, Workunit.prototype.result = function(e, t) {
|
|
1206
|
+
return e ||= this._wuid, createResult(e, t);
|
|
1207
|
+
};
|
|
1208
|
+
function WUResult(e, t, n) {
|
|
1209
|
+
BasicComms.call(this), this.url(e + "WUResult.json"), this._wuid = t, this._name = n, this._xmlSchema = null;
|
|
1210
|
+
}
|
|
1211
|
+
WUResult.prototype = Object.create(BasicComms.prototype), WUResult.prototype.wuid = function(e) {
|
|
1212
|
+
return arguments.length ? (this._wuid = e, this) : this._wuid;
|
|
1213
|
+
}, WUResult.prototype.name = function(e) {
|
|
1214
|
+
return arguments.length ? (this._name = e, this) : this._name;
|
|
1215
|
+
}, WUResult.prototype.query = function(e, t) {
|
|
1216
|
+
e ||= {}, t ||= {};
|
|
1217
|
+
let n = {
|
|
1218
|
+
Wuid: this._wuid,
|
|
1219
|
+
ResultName: this._name,
|
|
1220
|
+
SuppressXmlSchema: !0,
|
|
1221
|
+
Start: 0,
|
|
1222
|
+
Count: -1
|
|
1223
|
+
};
|
|
1224
|
+
for (let t in e) n[t] = e[t];
|
|
1225
|
+
let r = 0;
|
|
1226
|
+
for (let e in t) n["FilterBy.NamedValue." + r + ".Name"] = e, n["FilterBy.NamedValue." + r + ".Value"] = t[e], ++r;
|
|
1227
|
+
r && (n["FilterBy.NamedValue.itemcount"] = r);
|
|
1228
|
+
let i = this;
|
|
1229
|
+
return this.jsonp(this.url(), n).then(function(e) {
|
|
1230
|
+
return e.WUResultResponse && e.WUResultResponse.Result && e.WUResultResponse.Result[i._name] ? (Y && (X[i.url()][JSON.stringify(n)] = { WUResultResponse: { Result: e.WUResultResponse.Result } }), i._xmlSchema = e.WUResultResponse.Result.XmlSchema, nestedRowFix(e.WUResultResponse.Result[i._name])) : [];
|
|
1231
|
+
});
|
|
1232
|
+
};
|
|
1233
|
+
function LogicalFile(e, t) {
|
|
1234
|
+
BasicComms.call(this), this.url(e + "WUResult.json"), this._logicalName = t, this._xmlSchema = null;
|
|
1235
|
+
}
|
|
1236
|
+
LogicalFile.prototype = Object.create(BasicComms.prototype), LogicalFile.prototype.query = function(e, t) {
|
|
1237
|
+
e ||= {}, t ||= {};
|
|
1238
|
+
let n = {
|
|
1239
|
+
Cluster: "hthor",
|
|
1240
|
+
LogicalName: this._logicalName,
|
|
1241
|
+
SuppressXmlSchema: this._xmlSchema !== null,
|
|
1242
|
+
Start: 0,
|
|
1243
|
+
Count: -1
|
|
1244
|
+
};
|
|
1245
|
+
for (let t in e) n[t] = e[t];
|
|
1246
|
+
let r = 0;
|
|
1247
|
+
for (let e in t) n["FilterBy.NamedValue." + r + ".Name"] = e, n["FilterBy.NamedValue." + r + ".Value"] = t[e], ++r;
|
|
1248
|
+
r && (n["FilterBy.NamedValue.itemcount"] = r);
|
|
1249
|
+
let i = this;
|
|
1250
|
+
return this.jsonp(this.url(), n).then(function(e) {
|
|
1251
|
+
return e.WUResultResponse && e.WUResultResponse.Result && e.WUResultResponse.Result.Row ? (i._xmlSchema = e.WUResultResponse.Result.XmlSchema, nestedRowFix(e.WUResultResponse.Result.Row)) : [];
|
|
1252
|
+
});
|
|
1253
|
+
};
|
|
1254
|
+
function RoxieQuery(e, t) {
|
|
1255
|
+
BasicComms.call(this);
|
|
1256
|
+
let n = e.split("/"), r = n.pop();
|
|
1257
|
+
r.toLowerCase() === "json" && (r = n.pop()), this._queryName = r, this._resultName = t, this.url(n.join("/") + "/" + r + "/json");
|
|
1258
|
+
}
|
|
1259
|
+
RoxieQuery.prototype = Object.create(BasicComms.prototype);
|
|
1260
|
+
function trimRight(e) {
|
|
1261
|
+
return e && e.replace ? e.replace(/ +$/, "") : e;
|
|
1262
|
+
}
|
|
1263
|
+
function postFilter(e, t) {
|
|
1264
|
+
return e.filter(function(e) {
|
|
1265
|
+
for (let n in t) if (e[n] !== void 0 && trimRight(t[n]) !== trimRight(e[n])) return !1;
|
|
1266
|
+
return !0;
|
|
1267
|
+
});
|
|
1268
|
+
}
|
|
1269
|
+
function locateRoxieResponse(e) {
|
|
1270
|
+
for (let t in e) {
|
|
1271
|
+
if (e[t].Row && e[t].Row instanceof Array) return e;
|
|
1272
|
+
let n = locateRoxieResponse(e[t]);
|
|
1273
|
+
if (n) return n;
|
|
1274
|
+
}
|
|
1275
|
+
return null;
|
|
1276
|
+
}
|
|
1277
|
+
RoxieQuery.prototype.query = function(e, t) {
|
|
1278
|
+
e ||= {}, t ||= {};
|
|
1279
|
+
let n = {};
|
|
1280
|
+
for (let t in e) n[t] = e[t];
|
|
1281
|
+
for (let e in t) n[e] = t[e];
|
|
1282
|
+
let r = this;
|
|
1283
|
+
return this.jsonp(this.url(), n).then(function(e) {
|
|
1284
|
+
if (e = locateRoxieResponse(e), e) {
|
|
1285
|
+
if (r._resultName) {
|
|
1286
|
+
if (e && e[r._resultName] && e[r._resultName].Row) return nestedRowFix(postFilter(e[r._resultName].Row, t));
|
|
1287
|
+
} else for (let n in e) if (e[n].Row) return nestedRowFix(postFilter(e[n].Row, t));
|
|
1288
|
+
}
|
|
1289
|
+
return [];
|
|
1290
|
+
});
|
|
1291
|
+
};
|
|
1292
|
+
function createResult(e, t, n) {
|
|
1293
|
+
let r = new ESPUrl().url(e);
|
|
1294
|
+
return t.indexOf("http") === 0 ? new RoxieQuery(t, n) : t.indexOf("~") === 0 || t.indexOf("::") >= 0 ? new LogicalFile(r.getUrl({ pathname: "WsWorkunits/" }), t) : t ? new WUResult(r.getUrl({ pathname: "WsWorkunits/" }), t, n) : null;
|
|
1295
|
+
}
|
|
1296
|
+
function enableCache(e) {
|
|
1297
|
+
if (!arguments.length) return Y;
|
|
1298
|
+
Y = e, e || (X = {});
|
|
1299
|
+
}
|
|
1300
|
+
function cache(e) {
|
|
1301
|
+
if (!arguments.length) return X;
|
|
1302
|
+
X = e;
|
|
1303
|
+
}
|
|
1304
|
+
function createConnection(e) {
|
|
1305
|
+
if (e ||= document.URL, new ESPUrl().url(e).isWsWorkunits()) {
|
|
1306
|
+
let t = createESPConnection(e);
|
|
1307
|
+
if (t instanceof WsWorkunits$1 && t.wuid()) return new Workunit(t.getUrl({ pathname: "" }), t.wuid()).url(e);
|
|
1308
|
+
}
|
|
1309
|
+
return null;
|
|
1310
|
+
}
|
|
1311
|
+
function flattenResult(e, t) {
|
|
1312
|
+
let n = {
|
|
1313
|
+
columns: [],
|
|
1314
|
+
data: []
|
|
1315
|
+
};
|
|
1316
|
+
if (e && e.length) {
|
|
1317
|
+
let r = {};
|
|
1318
|
+
if (t && t.length) t.forEach(function(e) {
|
|
1319
|
+
r[e.value.toLowerCase()] = n.columns.length, n.columns.push(e.key);
|
|
1320
|
+
});
|
|
1321
|
+
else for (let t in e[0]) r[t.toLowerCase()] = n.columns.length, n.columns.push(t);
|
|
1322
|
+
e.forEach(function(e, t) {
|
|
1323
|
+
let i = [];
|
|
1324
|
+
for (let t in e) r[t.toLowerCase()] !== void 0 && (i[r[t.toLowerCase()]] = e[t]);
|
|
1325
|
+
n.data.push(i);
|
|
1326
|
+
});
|
|
1327
|
+
}
|
|
1328
|
+
return n;
|
|
1329
|
+
}
|
|
1330
|
+
//#endregion
|
|
1331
|
+
//#region src/HeatMap.ts
|
|
1332
|
+
var Z = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((e, t) => {
|
|
1333
|
+
t !== void 0 && (t.exports = simpleheat);
|
|
1334
|
+
function simpleheat(e) {
|
|
1335
|
+
if (!(this instanceof simpleheat)) return new simpleheat(e);
|
|
1336
|
+
this._canvas = e = typeof e == "string" ? document.getElementById(e) : e, this._ctx = e.getContext("2d"), this._width = e.width, this._height = e.height, this._max = 1, this._data = [];
|
|
1337
|
+
}
|
|
1338
|
+
simpleheat.prototype = {
|
|
1339
|
+
defaultRadius: 25,
|
|
1340
|
+
defaultGradient: {
|
|
1341
|
+
.4: "blue",
|
|
1342
|
+
.6: "cyan",
|
|
1343
|
+
.7: "lime",
|
|
1344
|
+
.8: "yellow",
|
|
1345
|
+
1: "red"
|
|
1346
|
+
},
|
|
1347
|
+
data: function(e) {
|
|
1348
|
+
return this._data = e, this;
|
|
1349
|
+
},
|
|
1350
|
+
max: function(e) {
|
|
1351
|
+
return this._max = e, this;
|
|
1352
|
+
},
|
|
1353
|
+
add: function(e) {
|
|
1354
|
+
return this._data.push(e), this;
|
|
1355
|
+
},
|
|
1356
|
+
clear: function() {
|
|
1357
|
+
return this._data = [], this;
|
|
1358
|
+
},
|
|
1359
|
+
radius: function(e, t) {
|
|
1360
|
+
t = t === void 0 ? 15 : t;
|
|
1361
|
+
var n = this._circle = this._createCanvas(), r = n.getContext("2d"), i = this._r = e + t;
|
|
1362
|
+
return n.width = n.height = i * 2, r.shadowOffsetX = r.shadowOffsetY = i * 2, r.shadowBlur = t, r.shadowColor = "black", r.beginPath(), r.arc(-i, -i, e, 0, Math.PI * 2, !0), r.closePath(), r.fill(), this;
|
|
1363
|
+
},
|
|
1364
|
+
resize: function() {
|
|
1365
|
+
this._width = this._canvas.width, this._height = this._canvas.height;
|
|
1366
|
+
},
|
|
1367
|
+
gradient: function(e) {
|
|
1368
|
+
var t = this._createCanvas(), n = t.getContext("2d"), r = n.createLinearGradient(0, 0, 0, 256);
|
|
1369
|
+
for (var i in t.width = 1, t.height = 256, e) r.addColorStop(+i, e[i]);
|
|
1370
|
+
return n.fillStyle = r, n.fillRect(0, 0, 1, 256), this._grad = n.getImageData(0, 0, 1, 256).data, this;
|
|
1371
|
+
},
|
|
1372
|
+
draw: function(e) {
|
|
1373
|
+
this._circle || this.radius(this.defaultRadius), this._grad || this.gradient(this.defaultGradient);
|
|
1374
|
+
var t = this._ctx;
|
|
1375
|
+
t.clearRect(0, 0, this._width, this._height);
|
|
1376
|
+
for (var n = 0, r = this._data.length, i; n < r; n++) i = this._data[n], t.globalAlpha = Math.max(i[2] / this._max, e === void 0 ? .05 : e), t.drawImage(this._circle, i[0] - this._r, i[1] - this._r);
|
|
1377
|
+
var a = t.getImageData(0, 0, this._width, this._height);
|
|
1378
|
+
return this._colorize(a.data, this._grad), t.putImageData(a, 0, 0), this;
|
|
1379
|
+
},
|
|
1380
|
+
_colorize: function(e, t) {
|
|
1381
|
+
for (var n = 0, r = e.length, i; n < r; n += 4) i = e[n + 3] * 4, i && (e[n] = t[i], e[n + 1] = t[i + 1], e[n + 2] = t[i + 2]);
|
|
1382
|
+
},
|
|
1383
|
+
_createCanvas: function() {
|
|
1384
|
+
return typeof document < "u" ? document.createElement("canvas") : new this._canvas.constructor();
|
|
1385
|
+
}
|
|
1386
|
+
};
|
|
1387
|
+
})))(), 1), de = window.simpleheat || Z && Z.default || Z, HeatMap = class extends e {
|
|
1388
|
+
_heat;
|
|
1389
|
+
constructor() {
|
|
1390
|
+
super();
|
|
1391
|
+
}
|
|
1392
|
+
enter(e, t) {
|
|
1393
|
+
super.enter(e, t), this.resize(this._size), this._heat = de(e);
|
|
1394
|
+
}
|
|
1395
|
+
update(e, t) {
|
|
1396
|
+
if (super.update(e, t), this._palette = this._palette.switch(this.paletteID()), this.useClonedPalette() && (this._palette = this._palette.cloneNotExists(this.paletteID() + "_" + this.id())), this.topLeftX_exists() && this.topLeftY_exists() && this.bottomRightX_exists() && this.bottomRightY_exists() ? this._heat.data(this.skewedData()) : this._heat.data(this.data()), this.radius() && this._heat.radius(this.radius(), this.blur()), this.usePalette()) {
|
|
1397
|
+
let e = {};
|
|
1398
|
+
for (let t = 1; t <= this.colorCount(); t++) {
|
|
1399
|
+
let n = t / this.colorCount();
|
|
1400
|
+
e[n] = this._palette(t, 1, this.colorCount());
|
|
1401
|
+
}
|
|
1402
|
+
this._heat.defaultGradient = e, this._heat.gradient(e);
|
|
1403
|
+
} else this.gradient() && (this._heat.defaultGradient = this.gradient(), this._heat.gradient(this.gradient()));
|
|
1404
|
+
this._heat.draw();
|
|
1405
|
+
}
|
|
1406
|
+
exit(e, t) {
|
|
1407
|
+
delete this._heat, super.exit(e, t);
|
|
1408
|
+
}
|
|
1409
|
+
resize(t) {
|
|
1410
|
+
let n = e.prototype.resize.apply(this, arguments);
|
|
1411
|
+
return this._heat !== void 0 && this._heat.resize(), n;
|
|
1412
|
+
}
|
|
1413
|
+
skewedData() {
|
|
1414
|
+
let e = this, t = [], n = this.data(), r = this.size(), i = this.bottomRightX() - this.topLeftX(), a = this.bottomRightY() - this.topLeftY(), o = i / r.width, s = a / r.height;
|
|
1415
|
+
return n.forEach(function(n) {
|
|
1416
|
+
let r = Math.abs(n[0] - e.topLeftX()), i = Math.abs(n[1] - e.topLeftY()), a = r / o, c = i / s;
|
|
1417
|
+
t.push([
|
|
1418
|
+
a,
|
|
1419
|
+
c,
|
|
1420
|
+
n[2]
|
|
1421
|
+
]);
|
|
1422
|
+
}), t;
|
|
1423
|
+
}
|
|
1424
|
+
};
|
|
1425
|
+
HeatMap.prototype._class += " other_HeatMap", HeatMap.prototype._palette = r.rainbow("default"), HeatMap.prototype.publish("radius", 15, "number", "Set point radius", null, { tags: ["Basic"] }), HeatMap.prototype.publish("blur", 15, "number", "Set point blur", null, { tags: ["Basic"] }), HeatMap.prototype.publish("max", 1, "number", "Set max data value", null, { tags: ["Basic"] }), HeatMap.prototype.publish("gradient", {
|
|
1426
|
+
.4: "blue",
|
|
1427
|
+
.6: "cyan",
|
|
1428
|
+
.7: "lime",
|
|
1429
|
+
.8: "yellow",
|
|
1430
|
+
1: "red"
|
|
1431
|
+
}, "object", "Set gradient colors", null, { tags: ["Basic"] }), HeatMap.prototype.publish("usePalette", !1, "boolean", "If true, uses paletteID and colorCount to determine gradient", null, { tags: ["Basic"] }), HeatMap.prototype.publish("colorCount", 10, "number", "Top left x-value", null, { tags: ["Basic"] }), HeatMap.prototype.publish("paletteID", "default", "set", "Color palette for this widget", HeatMap.prototype._palette.switch(), { tags: ["Basic"] }), HeatMap.prototype.publish("useClonedPalette", !1, "boolean", "Enable or disable using a cloned palette", null, { tags: ["Intermediate", "Shared"] }), HeatMap.prototype.publish("topLeftX", null, "number", "Top left x-value", null, {
|
|
1432
|
+
tags: ["Basic"],
|
|
1433
|
+
optional: !0
|
|
1434
|
+
}), HeatMap.prototype.publish("topLeftY", null, "number", "Top left y-value", null, {
|
|
1435
|
+
tags: ["Basic"],
|
|
1436
|
+
optional: !0
|
|
1437
|
+
}), HeatMap.prototype.publish("bottomRightX", null, "number", "Bottom right x-value", null, {
|
|
1438
|
+
tags: ["Basic"],
|
|
1439
|
+
optional: !0
|
|
1440
|
+
}), HeatMap.prototype.publish("bottomRightY", null, "number", "Bottom right y-value", null, {
|
|
1441
|
+
tags: ["Basic"],
|
|
1442
|
+
optional: !0
|
|
1443
|
+
});
|
|
1444
|
+
//#endregion
|
|
1445
|
+
//#region src/HPCCBadge.ts
|
|
1446
|
+
var HPCCBadge = class extends o {
|
|
1447
|
+
root;
|
|
1448
|
+
logo;
|
|
1449
|
+
logo_accent;
|
|
1450
|
+
logo_circles;
|
|
1451
|
+
line;
|
|
1452
|
+
circle_1;
|
|
1453
|
+
circle_2;
|
|
1454
|
+
circle_3;
|
|
1455
|
+
circle_4;
|
|
1456
|
+
circle_5;
|
|
1457
|
+
circle_6;
|
|
1458
|
+
circle_7;
|
|
1459
|
+
circle_8;
|
|
1460
|
+
circle_accent;
|
|
1461
|
+
text;
|
|
1462
|
+
text_hpccsystems;
|
|
1463
|
+
text_r;
|
|
1464
|
+
text_tm;
|
|
1465
|
+
constructor() {
|
|
1466
|
+
super();
|
|
1467
|
+
}
|
|
1468
|
+
testData(e, t) {
|
|
1469
|
+
return this;
|
|
1470
|
+
}
|
|
1471
|
+
enter(e, t) {
|
|
1472
|
+
super.enter(e, t), this.root = t.append("g"), this.logo = this.root.append("g"), this.logo_accent = this.root.append("g"), this.line = this.logo_accent.append("path").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").attr("fill", "#179BD7").attr("d", "m 189.38849,364.55373 c 191.6,3.8 0,0 191.6,3.8 l 0.1,-4.2 c -191.7,0.4 0,0 -191.7,0.4 z"), this.circle_accent = this.logo_accent.append("path").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").attr("fill", "#6E6E73").attr("d", "M421.3,354.2c6.9,6.9,3.1,18.7-8.6,26.1c-11.8,7.4-26.3,6.9-32.1-0.6c-5.5-7.2-1.1-18.2,9.6-25C401,348,414.7,347.6,421.3,354.2z"), this.logo_circles = this.logo.append("g"), this.circle_1 = this.logo_circles.append("path").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").attr("fill", "#179BD7").attr("d", "m 258.9815,363.84947 c 1.3,-3 1.5,-5.9 0.4,-8.1 -2.6,-5.4 -11.8,-5.1 -20.6,0.4 -3.5,2.2 -6.5,4.9 -8.7,7.8 -0.11933,0.35821 -0.39477,0.60735 -0.6,0.9 -2.9,4.1 -4.2,8.3 -3,11.6 2.1,6 11.4,6.3 20.9,0.4 5,-3.2 8.9,-7.3 11,-11.4 -0.59813,0.54778 0.47385,-1.28911 0.6,-1.6 z"), this.circle_2 = this.logo_circles.append("path").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").attr("fill", "#179BD7").attr("d", "M291.3,349.3c9.5-5.9,14.1-15,10.5-20c-3.5-4.8-13.3-4.2-22.1,1.3c-8.8,5.5-13.7,14.1-10.9,19.3C271.7,355.4,281.9,355.2,291.3,349.3z"), this.circle_3 = this.logo_circles.append("path").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").attr("fill", "#179BD7").attr("d", "M335.3,321.7c9.5-5.9,13.3-14.5,8.9-19c-4.3-4.3-14.8-3.2-23.6,2.3c-8.8,5.5-13.1,13.7-9.4,18.4C315,328.3,325.9,327.7,335.3,321.7z"), this.circle_4 = this.logo_circles.append("path").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").attr("fill", "#179BD7").attr("d", "M273.2,384c-3.2-6.5-13.5-6.7-23.2-0.7c-9.7,6-15.6,16.4-13.2,23.4c2.5,7.3,13.1,8.2,23.6,1.7 C270.8,401.9,276.5,390.8,273.2,384z"), this.circle_5 = this.logo_circles.append("path").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").attr("fill", "#179BD7").attr("d", "m 320.84499,363.83119 c 1,-3.4 0.8,-6.6 -1,-9.1 -4.2,-5.9 -15.3,-5.6 -25,0.5 -3.89999,2.4 -7.09999,5.5 -9.19999,8.7 -1.18854,2.2092 -0.0404,-0.09 -1.2,2.2 -2.2,4.1 -2.7,8.3 -0.9,11.5 3.6,6.7 15.09999,7 25.59999,0.5 5,-3.2 8.7,-7.2 10.7,-11.3 0.95557,-2.97582 0.0423,0.0306 1,-3 z"), this.circle_6 = this.logo_circles.append("path").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").attr("fill", "#179BD7").attr("d", "M330.4,348.2c4.6,6,17,5.8,27.5-0.8c10.5-6.6,14.3-16.5,8.9-22c-5.2-5.3-17.1-4.4-26.8,1.6C330.3,333.1,325.9,342.4,330.4,348.2z"), this.circle_7 = this.logo_circles.append("path").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").attr("fill", "#179BD7").attr("d", "M264.1,417.4c-10.8,6.7-17.2,19-14.2,27.8c3.2,9.2,15.4,11.1,27.2,3.7c11.8-7.4,17.8-20.6,13.6-29.2C286.6,411.6,274.8,410.7,264.1,417.4z"), this.circle_8 = this.logo_circles.append("path").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").attr("fill", "#179BD7").attr("d", "M314.2,386.1c-10.8,6.7-16.2,18.4-11.9,26.4c4.5,8.4,17.8,9.5,29.6,2.2c11.8-7.4,16.6-19.9,11.1-27.7C337.7,379.6,324.9,379.3,314.2,386.1z"), this.text = this.root.append("g"), this.text_hpccsystems = this.text.append("path").attr("fill", "#6E6E73").attr("d", "M224.2,476.3c0.1-1.3,0.1-2.7,0.2-4.1c-0.3,0-0.5,0.1-0.8,0.1c-0.3,0-0.5,0-0.8,0c-0.3,0-0.5,0-0.8,0c-0.3,0-0.5-0.1-0.8-0.1c0.1,1.4,0.1,2.8,0.2,4.1c0.1,1.3,0.1,2.7,0.1,4.1v1.1c-1.1,0-2.3,0-3.3,0.1c-1.1,0-2.2,0-3.3,0c-1.1,0-2.3,0-3.3,0c-1.1,0-2.2,0-3.3-0.1v-1.1c0-1.4,0-2.8,0.1-4.1c0.1-1.3,0.1-2.7,0.2-4.1c-0.3,0-0.5,0.1-0.8,0.1c-0.3,0-0.5,0-0.8,0c-0.3,0-0.5,0-0.8,0c-0.3,0-0.5-0.1-0.8-0.1c0.1,1.4,0.1,2.8,0.2,4.1c0.1,1.3,0.1,2.7,0.1,4.1v5.5c0,1.4,0,2.8-0.1,4.1c-0.1,1.4-0.1,2.7-0.2,4c0.5,0,1-0.1,1.6-0.1c0.6,0,1.1,0,1.6,0.1c-0.1-1.3-0.1-2.7-0.2-4c-0.1-1.4-0.1-2.7-0.1-4.1v-2.9c1.1,0,2.3,0,3.3,0c1.1,0,2.2,0,3.3,0c1.1,0,2.3,0,3.3,0c1.1,0,2.2,0,3.3,0v2.9c0,1.4,0,2.8-0.1,4.1c-0.1,1.4-0.1,2.7-0.2,4c0.5,0,1-0.1,1.6-0.1c0.6,0,1.1,0,1.6,0.1c-0.1-1.3-0.1-2.7-0.2-4c-0.1-1.4-0.1-2.7-0.1-4.1v-5.5C224.1,479,224.1,477.7,224.2,476.3z M242.7,473.8c-0.4-0.4-0.9-0.7-1.4-0.9c-0.5-0.2-1-0.4-1.5-0.5c-0.5-0.1-1-0.2-1.5-0.2c-0.5,0-0.9,0-1.2,0c-0.2,0-0.5,0-0.9,0c-0.3,0-0.7,0-1.1,0c-0.4,0-0.7,0-1.1,0c-0.4,0-0.7,0-0.9,0c-0.5,0-1,0-1.5,0c-0.5,0-1-0.1-1.5-0.1c0.1,1.4,0.1,2.8,0.2,4.1c0.1,1.3,0.1,2.7,0.1,4.1v5.5c0,1.4,0,2.8-0.1,4.1c-0.1,1.4-0.1,2.7-0.2,4c0.5,0,1-0.1,1.6-0.1c0.6,0,1.1,0,1.6,0.1c-0.1-1.3-0.1-2.7-0.2-4c-0.1-1.4-0.1-2.7-0.1-4.1v-1.8c0.4,0,0.8,0.1,1.2,0.1c0.4,0,0.8,0,1.3,0c0.8,0,1.6-0.1,2.6-0.3c1-0.2,1.9-0.5,2.8-1c0.9-0.5,1.6-1.2,2.2-2c0.6-0.9,0.9-2,0.9-3.4c0-0.9-0.1-1.6-0.4-2.2C243.5,474.7,243.1,474.2,242.7,473.8z M240.6,480.4c-0.4,0.7-0.9,1.2-1.4,1.6c-0.6,0.4-1.2,0.7-1.9,0.8c-0.7,0.1-1.4,0.2-2,0.2c-0.8,0-1.5-0.1-2.3-0.3v-9.5h2.9c0.8,0,1.6,0.1,2.2,0.2c0.7,0.1,1.2,0.3,1.7,0.7c0.5,0.3,0.8,0.8,1.1,1.3c0.3,0.6,0.4,1.3,0.4,2.2C241.2,478.8,241,479.7,240.6,480.4z M251.9,475.4c0.8-0.8,1.7-1.5,2.8-1.9c1.1-0.4,2.2-0.6,3.5-0.6c0.8,0,1.5,0.1,2.1,0.3c0.6,0.2,1.2,0.5,1.7,0.7c0.5,0.3,1,0.6,1.3,0.9c0.4,0.3,0.7,0.6,0.9,0.9l0.2-0.1c0.1-0.3,0.1-0.8,0.3-1.3c0.1-0.5,0.2-0.9,0.4-1.2c-0.9-0.4-1.9-0.7-3.1-1c-1.2-0.3-2.4-0.4-3.8-0.4c-1.8,0-3.4,0.3-4.8,0.8c-1.5,0.5-2.7,1.3-3.8,2.2c-1.1,1-1.9,2.2-2.5,3.6c-0.6,1.4-0.9,3-0.9,4.8c0,1.8,0.3,3.4,0.9,4.8c0.6,1.4,1.4,2.6,2.4,3.6c1,1,2.3,1.7,3.7,2.2c1.4,0.5,3,0.7,4.7,0.7c0.8,0,1.5-0.1,2.3-0.2c0.7-0.1,1.4-0.3,2-0.4c0.6-0.2,1.1-0.3,1.5-0.5c0.4-0.2,0.7-0.4,0.9-0.6l0.3-1.9l-0.1-0.1c-0.3,0.2-0.7,0.5-1.1,0.8c-0.4,0.3-0.9,0.6-1.5,0.9c-0.5,0.3-1.1,0.5-1.8,0.7c-0.6,0.2-1.4,0.3-2.1,0.3c-1.3,0-2.4-0.2-3.5-0.6c-1.1-0.4-2-1-2.8-1.9c-0.8-0.8-1.4-1.9-1.9-3.2c-0.4-1.3-0.7-2.8-0.7-4.6c0-1.8,0.2-3.3,0.7-4.6 C250.5,477.3,251.1,476.3,251.9,475.4z M273.2,475.4c0.8-0.8,1.7-1.5,2.8-1.9c1.1-0.4,2.2-0.6,3.5-0.6c0.8,0,1.5,0.1,2.1,0.3c0.6,0.2,1.2,0.5,1.7,0.7c0.5,0.3,1,0.6,1.3,0.9c0.4,0.3,0.7,0.6,0.9,0.9l0.2-0.1c0.1-0.3,0.1-0.8,0.3-1.3c0.1-0.5,0.2-0.9,0.4-1.2c-0.9-0.4-1.9-0.7-3.1-1c-1.2-0.3-2.4-0.4-3.8-0.4c-1.8,0-3.4,0.3-4.8,0.8c-1.5,0.5-2.7,1.3-3.8,2.2c-1.1,1-1.9,2.2-2.5,3.6c-0.6,1.4-0.9,3-0.9,4.8c0,1.8,0.3,3.4,0.9,4.8c0.6,1.4,1.4,2.6,2.4,3.6c1,1,2.3,1.7,3.7,2.2c1.4,0.5,3,0.7,4.7,0.7c0.8,0,1.5-0.1,2.3-0.2c0.7-0.1,1.4-0.3,2-0.4c0.6-0.2,1.1-0.3,1.5-0.5c0.4-0.2,0.7-0.4,0.9-0.6l0.3-1.9l-0.1-0.1c-0.3,0.2-0.7,0.5-1.1,0.8c-0.4,0.3-0.9,0.6-1.5,0.9c-0.5,0.3-1.1,0.5-1.8,0.7c-0.6,0.2-1.4,0.3-2.1,0.3c-1.3,0-2.4-0.2-3.5-0.6c-1.1-0.4-2-1-2.8-1.9c-0.8-0.8-1.4-1.9-1.9-3.2c-0.4-1.3-0.7-2.8-0.7-4.6c0-1.8,0.2-3.3,0.7-4.6 C271.8,477.3,272.4,476.3,273.2,475.4z M308.2,482.9c-0.7-0.4-1.5-0.8-2.4-1.1c-0.9-0.3-1.7-0.7-2.4-1.1c-0.7-0.4-1.4-0.9-1.9-1.5c-0.5-0.6-0.7-1.4-0.7-2.4c0-0.6,0.1-1.1,0.3-1.6c0.2-0.5,0.5-0.9,0.9-1.3c0.4-0.4,0.8-0.6,1.3-0.8c0.5-0.2,1-0.3,1.6-0.3c0.6,0,1.1,0.1,1.5,0.3c0.4,0.2,0.8,0.5,1.1,0.7c0.3,0.3,0.6,0.6,0.7,1c0.2,0.4,0.3,0.7,0.4,1h0.4c0.1-0.6,0.3-1.1,0.4-1.5c0.1-0.4,0.3-0.8,0.5-1.1c-0.6-0.5-1.3-0.9-2.1-1.1c-0.7-0.2-1.6-0.4-2.6-0.4c-1.1,0-2,0.1-2.9,0.4c-0.9,0.3-1.6,0.7-2.2,1.2c-0.6,0.5-1.1,1.2-1.4,1.9c-0.3,0.7-0.5,1.5-0.5,2.4c0,1.3,0.2,2.3,0.7,3c0.5,0.7,1.1,1.4,1.9,1.8c0.7,0.5,1.5,0.9,2.4,1.2c0.9,0.3,1.7,0.7,2.4,1.1c0.7,0.4,1.4,0.9,1.9,1.4c0.5,0.6,0.7,1.3,0.7,2.3c0,0.6-0.1,1.2-0.3,1.8c-0.2,0.6-0.5,1.1-0.9,1.5c-0.4,0.4-0.9,0.7-1.4,1c-0.6,0.2-1.2,0.4-1.9,0.4c-0.7,0-1.3-0.1-1.8-0.3c-0.6-0.2-1-0.5-1.5-0.8c-0.4-0.3-0.8-0.7-1.1-1.1c-0.3-0.4-0.5-0.8-0.7-1.2h-0.4c-0.1,0.6-0.1,1.1-0.2,1.5c-0.1,0.4-0.2,0.8-0.4,1.3c0.6,0.4,1.2,0.8,2.1,1.2c0.8,0.4,1.9,0.5,3.2,0.5c1.2,0,2.3-0.2,3.3-0.5c1-0.4,1.8-0.8,2.5-1.5c0.7-0.6,1.2-1.4,1.5-2.3c0.4-0.9,0.5-1.8,0.5-2.8c0-1.2-0.2-2.1-0.7-2.8C309.6,483.9,309,483.3,308.2,482.9z M328.6,472.2c-0.4,0.9-0.9,1.9-1.4,2.8c-0.5,1-1,1.9-1.5,2.9c-0.5,1-1.1,1.9-1.6,2.8c-0.5,0.9-1,1.8-1.5,2.5c-1.1-1.9-2.2-3.8-3.1-5.6c-1-1.8-2-3.6-2.9-5.5c-0.3,0-0.6,0.1-0.9,0.1c-0.3,0-0.6,0-0.9,0c-0.3,0-0.6,0-0.9,0c-0.3,0-0.6-0.1-0.9-0.1c0.2,0.3,0.5,0.8,0.9,1.5c0.4,0.7,0.9,1.4,1.4,2.3c0.5,0.8,1,1.7,1.6,2.6c0.6,0.9,1.1,1.8,1.6,2.6c0.5,0.8,1,1.6,1.4,2.3c0.4,0.7,0.7,1.2,0.9,1.6c0,1.7,0,3.4,0,4.9c0,1.6-0.1,2.9-0.2,4c0.5,0,1-0.1,1.6-0.1c0.6,0,1.1,0,1.6,0.1c0-0.4-0.1-1-0.1-1.8c0-0.7-0.1-1.5-0.1-2.4c0-0.9,0-1.7,0-2.6c0-0.9,0-1.7,0-2.5c0.3-0.7,0.7-1.4,1.2-2.2c0.5-0.8,1-1.7,1.6-2.8c0.6-1,1.3-2.2,2.1-3.4c0.8-1.3,1.7-2.7,2.7-4.2c-0.5,0.1-0.9,0.2-1.2,0.2C329.5,472.3,329.1,472.3,328.6,472.2z M343.6,482.9c-0.7-0.4-1.5-0.8-2.4-1.1c-0.9-0.3-1.7-0.7-2.4-1.1c-0.7-0.4-1.4-0.9-1.9-1.5c-0.5-0.6-0.7-1.4-0.7-2.4c0-0.6,0.1-1.1,0.3-1.6c0.2-0.5,0.5-0.9,0.9-1.3c0.4-0.4,0.8-0.6,1.3-0.8c0.5-0.2,1-0.3,1.6-0.3c0.6,0,1.1,0.1,1.5,0.3c0.4,0.2,0.8,0.5,1.1,0.7c0.3,0.3,0.6,0.6,0.7,1c0.2,0.4,0.3,0.7,0.4,1h0.4c0.1-0.6,0.3-1.1,0.4-1.5c0.1-0.4,0.3-0.8,0.5-1.1c-0.6-0.5-1.3-0.9-2.1-1.1c-0.7-0.2-1.6-0.4-2.6-0.4c-1.1,0-2,0.1-2.9,0.4c-0.9,0.3-1.6,0.7-2.2,1.2c-0.6,0.5-1.1,1.2-1.4,1.9c-0.3,0.7-0.5,1.5-0.5,2.4c0,1.3,0.2,2.3,0.7,3c0.5,0.7,1.1,1.4,1.9,1.8c0.7,0.5,1.5,0.9,2.4,1.2c0.9,0.3,1.7,0.7,2.4,1.1c0.7,0.4,1.4,0.9,1.9,1.4c0.5,0.6,0.7,1.3,0.7,2.3c0,0.6-0.1,1.2-0.3,1.8c-0.2,0.6-0.5,1.1-0.9,1.5c-0.4,0.4-0.9,0.7-1.4,1c-0.6,0.2-1.2,0.4-1.9,0.4c-0.7,0-1.3-0.1-1.8-0.3c-0.6-0.2-1-0.5-1.5-0.8c-0.4-0.3-0.8-0.7-1.1-1.1c-0.3-0.4-0.5-0.8-0.7-1.2h-0.4c-0.1,0.6-0.1,1.1-0.2,1.5c-0.1,0.4-0.2,0.8-0.4,1.3c0.6,0.4,1.2,0.8,2.1,1.2c0.8,0.4,1.9,0.5,3.2,0.5c1.2,0,2.3-0.2,3.3-0.5c1-0.4,1.8-0.8,2.5-1.5c0.7-0.6,1.2-1.4,1.5-2.3c0.4-0.9,0.5-1.8,0.5-2.8c0-1.2-0.2-2.1-0.7-2.8C345,483.9,344.4,483.3,343.6,482.9z M360.7,472.3c-1.3,0-2.7,0-4.1,0c-1.4,0-2.8,0-4.1,0c-1.3,0-2.7-0.1-4.1-0.1c0.1,0.4,0.2,0.8,0.2,1c0,0.3-0.1,0.6-0.2,1c0.4-0.1,1-0.1,1.5-0.2c0.6,0,1.1-0.1,1.8-0.1c0.6,0,1.2-0.1,1.8-0.1c0.6,0,1.2,0,1.7,0c0.1,2.2,0.1,4.4,0.1,6.6v5.5c0,1.4,0,2.8-0.1,4.1c-0.1,1.4-0.1,2.7-0.2,4c0.5,0,1-0.1,1.6-0.1c0.6,0,1.1,0,1.6,0.1c-0.1-1.3-0.1-2.7-0.2-4c-0.1-1.4-0.1-2.7-0.1-4.1v-5.5c0-2.2,0-4.4,0.1-6.6c0.6,0,1.1,0,1.7,0c0.6,0,1.2,0,1.8,0.1c0.6,0,1.2,0.1,1.8,0.1c0.6,0,1.1,0.1,1.5,0.2c-0.1-0.4-0.2-0.7-0.2-1c0-0.3,0.1-0.6,0.2-1C363.4,472.2,362,472.3,360.7,472.3z M379.8,492.3c-0.5,0.1-1.1,0.2-1.8,0.2c-0.7,0.1-1.4,0.1-2.2,0.1c-0.8,0-1.6,0-2.4,0h-2.2c0-0.4,0-1,0-1.8c0-0.8,0-1.8,0-3v-3.2c0-0.3,0-0.6,0-0.8c0-0.2,0-0.4,0-0.6c0.4,0,0.9,0,1.5,0c0.6,0,1.3,0,2.1,0c0.7,0,1.5,0,2.2,0.1c0.7,0,1.4,0.1,1.9,0.2c-0.1-0.3-0.1-0.6-0.1-1c0-0.3,0-0.7,0.1-1c-0.5,0-1,0.1-1.5,0.1c-0.5,0-1.1,0.1-1.7,0.1c-0.6,0-1.3,0.1-2,0.1c-0.7,0-1.6,0-2.5,0c0-0.4,0-1,0-1.8c0-0.8,0-1.6,0-2.4c0-0.8,0-1.5,0-2.1c0-0.6,0.1-1.3,0.1-1.9c1,0,1.9,0,2.7,0c0.7,0,1.4,0.1,2.1,0.1c0.6,0,1.2,0.1,1.8,0.1c0.6,0,1.2,0.1,1.9,0.1c-0.1-0.3-0.1-0.6-0.1-1c0-0.3,0-0.6,0.1-1c-1,0-1.9,0.1-2.8,0.1c-0.9,0-1.9,0-2.8,0c-1,0-1.9,0-2.9,0c-0.9,0-1.9-0.1-2.9-0.1c0.1,1.4,0.1,2.7,0.2,4.1c0.1,1.4,0.1,2.7,0.1,4.1v5.5c0,1.4,0,2.8-0.1,4.1c-0.1,1.4-0.1,2.7-0.2,4.1c1,0,1.9-0.1,2.9-0.1h5.8c0.9,0,1.9,0,2.9,0.1c-0.1-0.2-0.1-0.5-0.1-0.8c0-0.1,0-0.3,0-0.5C379.7,492.6,379.8,492.4,379.8,492.3z M406.8,483.3c-0.2-1.8-0.4-3.7-0.6-5.6c-0.2-1.9-0.4-3.9-0.7-5.9h-0.4c-0.5,1-1.1,2-1.7,3.2c-0.6,1.1-1.2,2.3-1.9,3.4c-0.6,1.2-1.2,2.3-1.8,3.5c-0.6,1.1-1.2,2.2-1.7,3.2c-0.5,1-1,1.8-1.4,2.6c-0.4,0.8-0.7,1.3-0.9,1.7c-1.6-3-3.2-5.9-4.7-8.8c-1.5-2.8-3-5.8-4.4-8.8H386c-0.2,1.7-0.4,3.5-0.6,5.4c-0.2,1.9-0.5,3.8-0.8,5.7c-0.3,1.9-0.6,3.9-0.9,5.8c-0.3,1.9-0.6,3.7-0.9,5.5c0.3,0,0.7-0.1,1.1-0.1c0.4,0,0.8,0,1.1,0.1c0-0.9,0.1-1.9,0.2-3.3c0.1-1.3,0.2-2.7,0.4-4.2c0.1-1.5,0.3-3,0.5-4.6c0.2-1.5,0.3-3,0.5-4.3h0.1c1.4,2.8,2.8,5.6,4.2,8.2c1.4,2.7,2.7,5.4,4,8h0.3c1.3-2.9,2.6-5.7,4-8.3c1.4-2.6,2.9-5.3,4.3-8h0.1c0.3,2.8,0.6,5.5,0.9,8.1c0.2,2.7,0.5,5.4,0.7,8.2c0.3,0,0.5-0.1,0.7-0.1h1.5c0.2,0,0.5,0,0.7,0.1c-0.3-1.8-0.5-3.5-0.7-5.3 C407.2,486.9,407,485.1,406.8,483.3z M423.4,484.6c-0.5-0.7-1.1-1.3-1.9-1.7c-0.7-0.4-1.5-0.8-2.4-1.1c-0.9-0.3-1.7-0.7-2.4-1.1c-0.7-0.4-1.4-0.9-1.9-1.5c-0.5-0.6-0.7-1.4-0.7-2.4c0-0.6,0.1-1.1,0.3-1.6c0.2-0.5,0.5-0.9,0.9-1.3c0.4-0.4,0.8-0.6,1.3-0.8c0.5-0.2,1-0.3,1.6-0.3c0.6,0,1.1,0.1,1.5,0.3c0.4,0.2,0.8,0.5,1.1,0.7c0.3,0.3,0.6,0.6,0.7,1c0.2,0.4,0.3,0.7,0.4,1h0.4c0.1-0.6,0.3-1.1,0.4-1.5c0.1-0.4,0.3-0.8,0.5-1.1c-0.6-0.5-1.3-0.9-2.1-1.1c-0.7-0.2-1.6-0.4-2.6-0.4c-1.1,0-2,0.1-2.9,0.4c-0.9,0.3-1.6,0.7-2.2,1.2c-0.6,0.5-1.1,1.2-1.4,1.9c-0.3,0.7-0.5,1.5-0.5,2.4c0,1.3,0.2,2.3,0.7,3c0.5,0.7,1.1,1.4,1.9,1.8c0.7,0.5,1.5,0.9,2.4,1.2c0.9,0.3,1.7,0.7,2.4,1.1c0.7,0.4,1.4,0.9,1.9,1.4c0.5,0.6,0.7,1.3,0.7,2.3c0,0.6-0.1,1.2-0.3,1.8c-0.2,0.6-0.5,1.1-0.9,1.5c-0.4,0.4-0.9,0.7-1.4,1c-0.6,0.2-1.2,0.4-1.9,0.4c-0.7,0-1.3-0.1-1.8-0.3c-0.6-0.2-1-0.5-1.5-0.8c-0.4-0.3-0.8-0.7-1.1-1.1c-0.3-0.4-0.5-0.8-0.7-1.2h-0.4c-0.1,0.6-0.1,1.1-0.2,1.5c-0.1,0.4-0.2,0.8-0.4,1.3c0.6,0.4,1.2,0.8,2.1,1.2c0.8,0.4,1.9,0.5,3.2,0.5c1.2,0,2.3-0.2,3.3-0.5c1-0.4,1.8-0.8,2.5-1.5c0.7-0.6,1.2-1.4,1.5-2.3c0.4-0.9,0.5-1.8,0.5-2.8 C424.2,486.3,423.9,485.3,423.4,484.6z"), this.text_r = this.text.append("path").attr("fill", "#6E6E73").attr("d", "M433.1,472.1c2.2,0,3.9,1.8,3.9,3.9c0,2.2-1.8,3.9-3.9,3.9c-2.2,0-3.9-1.8-3.9-3.9 C429.2,473.8,430.9,472.1,433.1,472.1z M433.1,479.5c1.9,0,3.5-1.6,3.5-3.5s-1.5-3.5-3.5-3.5s-3.5,1.6-3.5,3.5 S431.2,479.5,433.1,479.5z M431.7,475c0-0.5,0-1.1-0.1-1.5c0.3,0,0.6,0.1,0.9,0.1c0.3,0,0.6-0.1,0.9-0.1c0.8,0,1.4,0.4,1.4,1.1c0,0.9-1,1.3-1.5,1.4c0.6,0.7,1.5,2,1.9,2.4v0.1c-0.1,0-0.3-0.1-0.4-0.1c-0.1,0-0.3,0-0.4,0.1c-0.5-0.8-1.1-1.6-1.8-2.4h-0.4v0.8c0,0.5,0,1.1,0.1,1.6c-0.1,0-0.2-0.1-0.4-0.1c-0.1,0-0.2,0-0.4,0.1c0-0.5,0.1-1,0.1-1.5V475z M432.2,475.7c0.1,0,0.3,0,0.5,0c0.7,0,1.4-0.3,1.4-1.1c0-0.6-0.4-0.9-1-0.9c-0.3,0-0.5,0-0.8,0.1c0,0.3-0.1,0.7-0.1,1V475.7z"), this.text_tm = this.text.append("path").attr("fill", "#6E6E73").attr("d", "M376.1,322.1c0-0.6,0-1.2,0-1.9c-0.6,0-1.4,0-1.9,0.1c0-0.1,0-0.2,0-0.3c0-0.1,0-0.2,0-0.3c0.8,0,1.5,0,2.3,0s1.5,0,2.3,0c0,0.1,0,0.2,0,0.3c0,0.1,0,0.2,0,0.3c-0.5-0.1-1.3-0.1-1.9-0.1c0,0.6,0,1.2,0,1.9v1.5c0,0.8,0,1.6,0.1,2.3c-0.2,0-0.3,0-0.4,0c-0.1,0-0.3,0-0.4,0c0-0.8,0.1-1.6,0.1-2.3V322.1zM380.5,319.7c0.8,1.7,1.7,3.3,2.6,5c0.4-0.7,1.8-3.3,2.7-5h0.1c0.3,2.3,0.5,4.3,0.7,6.3c-0.1,0-0.3,0-0.4,0c-0.1,0-0.3,0-0.4,0c-0.1-1.6-0.3-3.1-0.4-4.6h0c-0.8,1.5-1.6,3-2.4,4.6h-0.1c-0.7-1.5-1.5-3-2.3-4.6h0c-0.2,1.5-0.4,3.6-0.4,4.6c-0.1,0-0.2,0-0.3,0c-0.1,0-0.2,0-0.3,0c0.3-2,0.7-4.4,0.9-6.3H380.5z");
|
|
1473
|
+
let n = this.root.node().getBBox(), r = n.x + n.width / 2, i = n.y + n.height / 2, a = Math.min(this.width(), this.height()) / Math.max(n.width, n.height);
|
|
1474
|
+
this.root.attr("transform", "translate(" + -r * a + "," + -i * a + ")scale(" + a + ")");
|
|
1475
|
+
}
|
|
1476
|
+
update(e, t) {
|
|
1477
|
+
switch (super.update(e, t), this.animation()) {
|
|
1478
|
+
case "none": break;
|
|
1479
|
+
case "accentInOut":
|
|
1480
|
+
this.logo.attr("opacity", 0), this.logo_accent.attr("transform", "translate(-400, 0)"), this.text.attr("opacity", 0), this.logo.transition().duration(1e3).attr("opacity", 1), this.logo_accent.transition().delay(500).duration(1500).attr("transform", "translate(0, 0)"), this.text.transition().delay(100).duration(1e3).attr("opacity", 1), this.logo_accent.transition().ease("back").delay(7e3).duration(1500).attr("transform", "translate(400, 0)"), this.text.transition().delay(8400).duration(1e3).attr("opacity", 0), this.logo_accent.transition().delay(8500).duration(1e3).attr("opacity", 0), this.logo.transition().delay(8500).duration(1e3).attr("opacity", 0);
|
|
1481
|
+
break;
|
|
1482
|
+
case "accentIn":
|
|
1483
|
+
this.logo.attr("opacity", 0), this.logo_accent.attr("transform", "translate(-400, 0)"), this.text.attr("opacity", 0), this.logo.transition().duration(1e3).attr("opacity", 1), this.logo_accent.transition().delay(500).duration(1500).attr("transform", "translate(0, 0)"), this.text.transition().delay(100).duration(1e3).attr("opacity", 1);
|
|
1484
|
+
break;
|
|
1485
|
+
case "fade_in":
|
|
1486
|
+
this.logo.attr("opacity", 0), this.logo_accent.attr("opacity", 0), this.text.attr("opacity", 0), this.logo.transition().duration(1e3).attr("opacity", 1), this.logo_accent.transition().duration(1e3).attr("opacity", 1), this.text.transition().delay(100).duration(1e3).attr("opacity", 1);
|
|
1487
|
+
break;
|
|
1488
|
+
default: break;
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
};
|
|
1492
|
+
HPCCBadge.prototype._class += " other_HPCCBadge", HPCCBadge.prototype.publish("animation", "none", "set", "Animation Style", [
|
|
1493
|
+
"none",
|
|
1494
|
+
"accentInOut",
|
|
1495
|
+
"accentIn",
|
|
1496
|
+
"fade_in"
|
|
1497
|
+
]);
|
|
1498
|
+
//#endregion
|
|
1499
|
+
//#region src/Html.ts
|
|
1500
|
+
var Html = class extends n {
|
|
1501
|
+
constructor() {
|
|
1502
|
+
super(), this._tag = "div";
|
|
1503
|
+
}
|
|
1504
|
+
enter(e, t) {
|
|
1505
|
+
super.enter(e, t);
|
|
1506
|
+
}
|
|
1507
|
+
update(e, t) {
|
|
1508
|
+
super.update(e, t), t.style("overflow-x", this.overflowX_exists() ? this.overflowX() : "").style("overflow-y", this.overflowY_exists() ? this.overflowY() : "");
|
|
1509
|
+
let n = t.selectAll(".htmlWrapper").data(this.data().length > 0 ? this.data() : [this.html()]);
|
|
1510
|
+
n.enter().append("div").attr("class", "htmlWrapper").merge(n).html(function(e) {
|
|
1511
|
+
return e;
|
|
1512
|
+
}), n.exit().remove();
|
|
1513
|
+
}
|
|
1514
|
+
};
|
|
1515
|
+
Html.prototype._class += " other_Html", Html.prototype.publish("html", "", "string", "Html to render", null, { tags: ["Basic"] }), Html.prototype.publish("overflowX", null, "set", "CSS overflow-x", [
|
|
1516
|
+
"",
|
|
1517
|
+
"visible",
|
|
1518
|
+
"hidden",
|
|
1519
|
+
"scroll",
|
|
1520
|
+
"auto",
|
|
1521
|
+
"initial",
|
|
1522
|
+
"inherit"
|
|
1523
|
+
], {
|
|
1524
|
+
tags: ["Basic"],
|
|
1525
|
+
optional: !0
|
|
1526
|
+
}), Html.prototype.publish("overflowY", null, "set", "CSS overflow-y", [
|
|
1527
|
+
"",
|
|
1528
|
+
"visible",
|
|
1529
|
+
"hidden",
|
|
1530
|
+
"scroll",
|
|
1531
|
+
"auto",
|
|
1532
|
+
"initial",
|
|
1533
|
+
"inherit"
|
|
1534
|
+
], {
|
|
1535
|
+
tags: ["Basic"],
|
|
1536
|
+
optional: !0
|
|
1537
|
+
});
|
|
1538
|
+
//#endregion
|
|
1539
|
+
//#region src/IconList.ts
|
|
1540
|
+
var IconList = class extends n {
|
|
1541
|
+
_list;
|
|
1542
|
+
_entity_list = [];
|
|
1543
|
+
_content_list = [];
|
|
1544
|
+
constructor() {
|
|
1545
|
+
super(), this._list = new y().orientation_default("horizontal").flexWrap_default("nowrap");
|
|
1546
|
+
}
|
|
1547
|
+
enter(e, t) {
|
|
1548
|
+
super.enter(e, t), t.style("height", "100%").style("width", "100%"), h(e.parentElement).style("height", "100%").style("width", "100%"), this._list.target(e);
|
|
1549
|
+
}
|
|
1550
|
+
update(e, n) {
|
|
1551
|
+
super.update(e, n);
|
|
1552
|
+
let r = this._list.widgets();
|
|
1553
|
+
this.data().forEach((e, n) => {
|
|
1554
|
+
r[n] ? (r[n] = this.updateListProperties(r[n], n), this.updateEntityProperties(r[n].widgets()[0], n), r[n].widgets()[1].html(this.data()[n][this.htmlColumnIndex_exists() ? this.htmlColumnIndex() : 1])) : r[n] = this.updateListProperties(new b(), n).widgets([this.updateEntityProperties(new t(), n), new Html().html(this.data()[n][this.htmlColumnIndex_exists() ? this.htmlColumnIndex() : 1])]);
|
|
1555
|
+
}), this._list.widgets(r.slice(0, this.data().length)), this._list.resize().render();
|
|
1556
|
+
}
|
|
1557
|
+
updateListProperties(e, t) {
|
|
1558
|
+
return e.disableScroll(!0).widgetsFlexBasis([this.iconSize() + "px", `calc(100% - ${this.iconSize()}px)`]);
|
|
1559
|
+
}
|
|
1560
|
+
updateEntityProperties(e, t) {
|
|
1561
|
+
return e.icon(this.iconColumnIndex_exists() ? this.data()[t][this.iconColumnIndex()] : "?").iconColor(this.iconColorColumnIndex_exists() ? this.data()[t][this.iconColorColumnIndex()] : "#000").iconDiameter(this.iconSize()).iconPaddingPercent(0);
|
|
1562
|
+
}
|
|
1563
|
+
};
|
|
1564
|
+
IconList.prototype._class += " other_IconList", IconList.prototype.publish("iconSize", 72, "number", "Size of icon (pixels)"), IconList.prototype.publish("iconColumnIndex", 0, "number", "Index of column containing icon character"), IconList.prototype.publish("iconColorColumnIndex", 1, "number", "Index of column containing icon color"), IconList.prototype.publish("htmlColumnIndex", 2, "number", "Index of column containing html string");
|
|
1565
|
+
//#endregion
|
|
1566
|
+
//#region src/Paginator.ts
|
|
1567
|
+
var Paginator = class extends n {
|
|
1568
|
+
_tNumPages;
|
|
1569
|
+
_numList;
|
|
1570
|
+
paginator;
|
|
1571
|
+
side;
|
|
1572
|
+
_onSelect;
|
|
1573
|
+
constructor() {
|
|
1574
|
+
super(), this._tag = "div", this._tNumPages = 1, this._numList = [];
|
|
1575
|
+
}
|
|
1576
|
+
postUpdate(e, t) {}
|
|
1577
|
+
enter(e, t) {
|
|
1578
|
+
super.enter(e, t);
|
|
1579
|
+
let n = this;
|
|
1580
|
+
this.paginator = t.append("ul").attr("class", "paginator pagination pagination-sm"), this.side = t.append("div").attr("class", "paginator pagination side"), this.side.append("span").classed("side", !0).text("Page "), this.side.append("input").attr("type", "number").attr("class", "currentPageNumber").property("value", 1).attr("min", 1).on("change", function() {
|
|
1581
|
+
n.pageNumber(this.value), n._onSelect(this.value);
|
|
1582
|
+
}), this.side.append("span").classed("side total", !0).text(" of 1");
|
|
1583
|
+
}
|
|
1584
|
+
update(e, t) {
|
|
1585
|
+
let n = this;
|
|
1586
|
+
if (t.style("bottom", this.bottom() + "px").style("right", this.right() + "px"), this._tNumPages = Math.ceil(this.numItems() / this.itemsPerPage()) || 1, this.pageNumber() > this._tNumPages && this.pageNumber(1), this._numList = [], this.numItems()) {
|
|
1587
|
+
this._numList.push("first");
|
|
1588
|
+
for (let e = -this.adjacentPages(); e <= this.adjacentPages(); e++) this.pageNumber() + e > 0 && this.pageNumber() + e <= this._tNumPages && this._numList.push(this.pageNumber() + e);
|
|
1589
|
+
this._numList.push("last");
|
|
1590
|
+
}
|
|
1591
|
+
this.side.select(".total").text(" of " + this._tNumPages), this.side.select(".currentPageNumber").property("value", this.pageNumber()), this.side.select(".currentPageNumber").attr("max", this._tNumPages);
|
|
1592
|
+
let r = this.paginator.selectAll("li").data(this._numList, function(e) {
|
|
1593
|
+
return e;
|
|
1594
|
+
});
|
|
1595
|
+
r.enter().append(function(e) {
|
|
1596
|
+
let t = document.createElement("li");
|
|
1597
|
+
if (e !== n.pageNumber()) {
|
|
1598
|
+
let n = document.createElement("a"), r = document.createTextNode(e);
|
|
1599
|
+
return n.appendChild(r), n.href = "#", t.appendChild(n), t;
|
|
1600
|
+
} else {
|
|
1601
|
+
let n = document.createElement("span");
|
|
1602
|
+
return n.innerHTML = e, t.appendChild(n), t;
|
|
1603
|
+
}
|
|
1604
|
+
}).on("click", function(e, t) {
|
|
1605
|
+
switch (l().preventDefault(), n.side.select(".currentPageNumber").property("value", n.pageNumber()), e) {
|
|
1606
|
+
case "first":
|
|
1607
|
+
n.pageNumber() !== 1 && (n.pageNumber(1), n._onSelect(1, "previous"));
|
|
1608
|
+
break;
|
|
1609
|
+
case "last":
|
|
1610
|
+
n.pageNumber() !== n._tNumPages && (n.pageNumber(n._tNumPages), n._onSelect(n._tNumPages, "previous"));
|
|
1611
|
+
break;
|
|
1612
|
+
default: n.pageNumber(e), n._onSelect(e);
|
|
1613
|
+
}
|
|
1614
|
+
}), r.classed("active", function(e, t) {
|
|
1615
|
+
return e === n.pageNumber();
|
|
1616
|
+
}).select("a").text(function(e) {
|
|
1617
|
+
return e;
|
|
1618
|
+
}), r.exit().remove(), r.order(), this.numItems() === 0 && h(e).remove();
|
|
1619
|
+
}
|
|
1620
|
+
exit(e, t) {
|
|
1621
|
+
super.exit(e, t);
|
|
1622
|
+
}
|
|
1623
|
+
};
|
|
1624
|
+
Paginator.prototype._class += " other_Paginator", Paginator.prototype.publish("itemsPerPage", 2, "number", "Pagination items per page", null, { tags: ["Private"] }), Paginator.prototype.publish("numItems", 10, "number", "Pagination total number of items", null, { tags: ["Private"] }), Paginator.prototype.publish("pageNumber", 1, "number", "Pagination set or get the page number", null, { tags: ["Private"] }), Paginator.prototype.publish("adjacentPages", 2, "number", "Number of page indexes either side of current one", null, { tags: ["Private"] }), Paginator.prototype.publish("bottom", 20, "number", "Pagination bottom offset", null, { tags: ["Private"] }), Paginator.prototype.publish("right", 20, "number", "Pagination right offset", null, { tags: ["Private"] });
|
|
1625
|
+
//#endregion
|
|
1626
|
+
//#region src/Table.ts
|
|
1627
|
+
var Table = class extends n {
|
|
1628
|
+
_paginator;
|
|
1629
|
+
_selectionBag;
|
|
1630
|
+
_selectionPrevClick;
|
|
1631
|
+
_paginatorTableSpacing;
|
|
1632
|
+
tableDiv;
|
|
1633
|
+
thead;
|
|
1634
|
+
table;
|
|
1635
|
+
fixedHead;
|
|
1636
|
+
fixedHeadTable;
|
|
1637
|
+
fixedThead;
|
|
1638
|
+
unfixedThead;
|
|
1639
|
+
tbody;
|
|
1640
|
+
tfoot;
|
|
1641
|
+
fixedCol;
|
|
1642
|
+
fixedColTable;
|
|
1643
|
+
fixedColHead;
|
|
1644
|
+
fixedColHeadRow;
|
|
1645
|
+
fixedColBody;
|
|
1646
|
+
fixedColFoot;
|
|
1647
|
+
fixedColFootRow;
|
|
1648
|
+
_prevDescending;
|
|
1649
|
+
_prevSortByFieldIndex;
|
|
1650
|
+
_hasChildWidgets;
|
|
1651
|
+
_tNumPages;
|
|
1652
|
+
_empty_col_idx_arr;
|
|
1653
|
+
constructor() {
|
|
1654
|
+
super(), this._tag = "div", this.columns([]), this._paginator = new Paginator(), this._selectionBag = new s.Selection(this), this._selectionPrevClick = null, this._paginatorTableSpacing = 4;
|
|
1655
|
+
}
|
|
1656
|
+
size(e) {
|
|
1657
|
+
let t = super.size.apply(this, arguments);
|
|
1658
|
+
if (arguments.length && this.tableDiv) {
|
|
1659
|
+
let e = this.showHeader() && this.fixedHeader() ? this.thead.property("offsetHeight") : 0;
|
|
1660
|
+
this.tableDiv.style("width", this._size.width + "px").style("height", this._size.height - e + "px"), this._element.style("width", this._size.width + "px").style("height", this._size.height + "px");
|
|
1661
|
+
}
|
|
1662
|
+
return t;
|
|
1663
|
+
}
|
|
1664
|
+
isHidden(e) {
|
|
1665
|
+
if (this.pivot()) return !1;
|
|
1666
|
+
if (this.hiddenColumns().indexOf(e) !== -1) return !0;
|
|
1667
|
+
let t = this.fields();
|
|
1668
|
+
return !!(t && t[e] && (t[e].type() === "hidden" || this._empty_col_idx_arr.indexOf(e) !== -1));
|
|
1669
|
+
}
|
|
1670
|
+
tableColumns(e) {
|
|
1671
|
+
let t = this.columns.apply(this, arguments);
|
|
1672
|
+
return !arguments.length && this.pivot() ? this._db.column(0) : t;
|
|
1673
|
+
}
|
|
1674
|
+
tableData(e) {
|
|
1675
|
+
let t = this.data.apply(this, arguments);
|
|
1676
|
+
return !arguments.length && this.pivot() ? this._db.columns().filter(function(e, t) {
|
|
1677
|
+
return t > 0;
|
|
1678
|
+
}) : t;
|
|
1679
|
+
}
|
|
1680
|
+
field(e, t) {
|
|
1681
|
+
let n = { transform: (e) => e };
|
|
1682
|
+
return this.pivot() ? t === 0 ? n : this.fields()[e + 1] : e === -1 ? n : this.fields()[t];
|
|
1683
|
+
}
|
|
1684
|
+
calcFieldsIndex(e) {
|
|
1685
|
+
let t = -1, n = 0, r = this.columns().length, i = 0;
|
|
1686
|
+
for (; t < r && i <= e;) t++, this.isHidden(t) ? n++ : i++;
|
|
1687
|
+
return e + n;
|
|
1688
|
+
}
|
|
1689
|
+
getEmptyColumnIdxArr(e, t) {
|
|
1690
|
+
let n = [];
|
|
1691
|
+
if (this.hideEmptyColumns()) for (let r = 0; r < e.length; r++) {
|
|
1692
|
+
let e = !0;
|
|
1693
|
+
for (let n = 0; n < t.length; n++) if ([
|
|
1694
|
+
"",
|
|
1695
|
+
null,
|
|
1696
|
+
void 0
|
|
1697
|
+
].indexOf(t[n][r]) === -1) {
|
|
1698
|
+
e = !1;
|
|
1699
|
+
break;
|
|
1700
|
+
}
|
|
1701
|
+
e && n.push(r);
|
|
1702
|
+
}
|
|
1703
|
+
return n;
|
|
1704
|
+
}
|
|
1705
|
+
enter(e, t) {
|
|
1706
|
+
super.enter(e, t), this._placeholderElement.style("overflow", "hidden"), this.tableDiv = t.append("div").attr("class", "tableDiv"), this.table = this.tableDiv.append("table"), this.fixedHead = t.append("div").classed("header-wrapper", !0), this.fixedHeadTable = this.fixedHead.append("table"), this.fixedThead = this.fixedHeadTable.append("thead").append("tr"), this.unfixedThead = this.table.append("thead").append("tr"), this.tbody = this.table.append("tbody"), this.tfoot = this.table.append("tfoot").append("tr"), this.fixedCol = t.append("div").classed("rows-wrapper", !0), this.fixedColTable = this.fixedCol.append("table"), this.fixedColHead = this.fixedColTable.append("thead"), this.fixedColHeadRow = this.fixedColHead.append("tr"), this.fixedColBody = this.fixedColTable.append("tbody"), this.fixedColFoot = this.fixedColTable.append("tfoot"), this.fixedColFootRow = this.fixedColFoot.append("tr"), this.tableDiv.style("overflow", "auto");
|
|
1707
|
+
}
|
|
1708
|
+
update(e, t) {
|
|
1709
|
+
super.update(e, t);
|
|
1710
|
+
let n = this, r = n.tableColumns(), a = n.tableData(), o = this.tableDiv.node().scrollLeft;
|
|
1711
|
+
this._empty_col_idx_arr = this.getEmptyColumnIdxArr(r, a), this.element().selectAll("table,tbody,th,td").style("width", null), this.sortByFieldIndex_exists() && (this._prevSortByFieldIndex !== this.sortByFieldIndex() || this._prevDescending !== this.descending()) && (s.multiSort(a, [{
|
|
1712
|
+
idx: this.sortByFieldIndex(),
|
|
1713
|
+
reverse: this.descending()
|
|
1714
|
+
}]), this._prevSortByFieldIndex = this.sortByFieldIndex(), this._prevDescending = this.descending()), this._hasChildWidgets = !1, this.fixedHeader() ? this.thead = this.fixedThead : this.thead = this.unfixedThead, this.fixedHead.style("display", this.fixedHeader() ? "table-row" : "none"), this.unfixedThead.style("display", this.fixedHeader() ? "none" : "table-row");
|
|
1715
|
+
let l = this.thead.selectAll("th").data(this.showHeader() ? r.filter(function(e, t) {
|
|
1716
|
+
return !n.isHidden(t) && n._empty_col_idx_arr.indexOf(t) === -1;
|
|
1717
|
+
}) : []), u = l.enter().append("th").each(function(e) {
|
|
1718
|
+
let t = h(this);
|
|
1719
|
+
t.append("span").attr("class", "thText"), t.append("span").attr("class", "thIcon");
|
|
1720
|
+
}).on("click", function(e, t) {
|
|
1721
|
+
n.headerClick(e, t);
|
|
1722
|
+
}).merge(l).style("background-color", this.theadRowBackgroundColor()).style("border-color", this.theadCellBorderColor()).style("color", this.theadFontColor()).style("font-size", this.theadFontSize());
|
|
1723
|
+
if (u.select(".thText").style("font-family", this.theadFontFamily()).text(function(e, t) {
|
|
1724
|
+
let r = n.calcFieldsIndex(t);
|
|
1725
|
+
return n.field(-1, r).transform(e);
|
|
1726
|
+
}), u.select(".thIcon").text(function(e, t) {
|
|
1727
|
+
return n.descending() ? n.sortByFieldIndex() === t ? "" : "" : n.sortByFieldIndex() === t ? "" : "";
|
|
1728
|
+
}), l.exit().remove(), u.order(), this.paginationLimit() && this.pagination(a.length >= parseInt(this.paginationLimit())), this.pagination()) {
|
|
1729
|
+
this._paginator.target() === null && this._paginator.target(t.node());
|
|
1730
|
+
let e = this._calcRowsPerPage(u);
|
|
1731
|
+
this.itemsPerPage(e), this._paginator.numItems(a.length), this._tNumPages = Math.ceil(this._paginator.numItems() / this.itemsPerPage()) || 1, (this.pageNumber() > this._tNumPages || this.pageNumber() <= 0) && this.pageNumber(1), this._paginator._onSelect = function(e, t) {
|
|
1732
|
+
n.pageNumber(e), n.render();
|
|
1733
|
+
};
|
|
1734
|
+
} else this._paginator.numItems(0);
|
|
1735
|
+
let d = this.pageNumber() - 1, f = this.itemsPerPage(), p = d * f, m = d * parseInt(f) + parseInt(f), g;
|
|
1736
|
+
g = this.topN() ? a.slice(0, this.topN()) : this.pagination() ? a.slice(p, m) : a;
|
|
1737
|
+
let _ = [this.totalledLabel() ? this.totalledLabel() : null];
|
|
1738
|
+
if (this.totalledColumns().length !== 0) {
|
|
1739
|
+
for (let e = 0; e < this.totalledColumns().length; e++) this.totalledColumns()[e] = +this.totalledColumns()[e];
|
|
1740
|
+
for (let e = 1; e < r.length; e++) {
|
|
1741
|
+
let t = 0;
|
|
1742
|
+
if (this.totalledColumns().indexOf(e) !== -1) {
|
|
1743
|
+
for (let n = 0; n < g.length; n++) t += g[n][e];
|
|
1744
|
+
_.push(t);
|
|
1745
|
+
} else _.push("");
|
|
1746
|
+
}
|
|
1747
|
+
let e = this.tfoot.selectAll("td").data(_);
|
|
1748
|
+
e.enter().append("td").merge(e).style("background-color", this.tfootRowBackgroundColor()).style("border-color", this.tfootCellBorderColor()).style("color", this.tfootFontColor()).style("font-size", this.tfootFontSize())[this.renderHtmlDataCells() ? "html" : "text"](function(e, t) {
|
|
1749
|
+
return n.fields()[t].transform(e);
|
|
1750
|
+
}), e.exit().remove();
|
|
1751
|
+
}
|
|
1752
|
+
let v = this.tbody.selectAll("tr.tr_" + this.id()).data(g.map(function(e, t) {
|
|
1753
|
+
for (let t = 0; t < e.length; ++t) e[t] === void 0 && (e[t] = null);
|
|
1754
|
+
return {
|
|
1755
|
+
rowIdx: t,
|
|
1756
|
+
row: e
|
|
1757
|
+
};
|
|
1758
|
+
})), y = v.enter().append("tr").attr("class", "tr_" + this.id()).on("click.selectionBag", function(e) {
|
|
1759
|
+
if (e.row) {
|
|
1760
|
+
let t = e.row, r = e.rowIdx;
|
|
1761
|
+
n.selectionBagClick(t, r), n.applyRowStyles(n.getBodyRow(r)), n.applyFirstColRowStyles(n.getFixedRow(r));
|
|
1762
|
+
}
|
|
1763
|
+
}, !0).on("mouseover", function(e) {
|
|
1764
|
+
if (e.row) {
|
|
1765
|
+
let t = e.rowIdx, r = n.getFixedRow(t);
|
|
1766
|
+
r.empty() || r.classed("hover", !0);
|
|
1767
|
+
let i = n.getBodyRow(t);
|
|
1768
|
+
i.classed("hover", !0), n.applyStyleToRows(i), n.applyFirstColRowStyles(r);
|
|
1769
|
+
}
|
|
1770
|
+
}).on("mouseout", function(e) {
|
|
1771
|
+
if (e.row) {
|
|
1772
|
+
let t = e.rowIdx, r = n.getFixedRow(t);
|
|
1773
|
+
r.classed("hover", !1);
|
|
1774
|
+
let i = n.getBodyRow(t);
|
|
1775
|
+
i.classed("hover", !1), n.applyStyleToRows(i), n.applyFirstColRowStyles(r);
|
|
1776
|
+
}
|
|
1777
|
+
}).merge(v).classed("selected", function(e) {
|
|
1778
|
+
let t = e.row;
|
|
1779
|
+
return n._selectionBag.isSelected(n._createSelectionObject(t));
|
|
1780
|
+
}).classed("trId" + this._id, !0);
|
|
1781
|
+
v.exit().remove(), this.applyStyleToRows(y);
|
|
1782
|
+
let b = y.selectAll(".td_" + this.id()).data(function(e, t) {
|
|
1783
|
+
return e.row.filter(function(e, t) {
|
|
1784
|
+
return t < r.length && !n.isHidden(t) && n._empty_col_idx_arr.indexOf(t) === -1;
|
|
1785
|
+
}).map(function(t, n) {
|
|
1786
|
+
return {
|
|
1787
|
+
rowInfo: e,
|
|
1788
|
+
colIdx: n,
|
|
1789
|
+
cell: t
|
|
1790
|
+
};
|
|
1791
|
+
});
|
|
1792
|
+
});
|
|
1793
|
+
b.enter().append("td").attr("class", "td_" + this.id()).on("click", function(e) {
|
|
1794
|
+
e.rowInfo && n.click(n.rowToObj(e.rowInfo.row), n.columns()[e.colIdx], n._selectionBag.isSelected(n._createSelectionObject(e.rowInfo.row)));
|
|
1795
|
+
}).on("dblclick", function(e, t) {
|
|
1796
|
+
e.rowInfo && n.dblclick(n.rowToObj(e.rowInfo.row), n.columns()[e.colIdx], n._selectionBag.isSelected(n._createSelectionObject(e.rowInfo.row)));
|
|
1797
|
+
}).each(function(e, t) {
|
|
1798
|
+
let r = n.getColumnAlignment(e.rowInfo.rowIdx, e.colIdx, e.cell);
|
|
1799
|
+
h(this).style("height", null).style("text-align", r).style("vertical-align", n.verticalAlign()).classed("tr-" + e.rowInfo.rowIdx + "-td-" + t, !0);
|
|
1800
|
+
}).merge(b).each(function(e) {
|
|
1801
|
+
let t = h(this);
|
|
1802
|
+
if (e.cell instanceof c) {
|
|
1803
|
+
t[n.renderHtmlDataCells() ? "html" : "text"](null);
|
|
1804
|
+
let r = t.selectAll(".div_" + n.id()).data([e.cell], function(e) {
|
|
1805
|
+
return e.id();
|
|
1806
|
+
});
|
|
1807
|
+
r.exit().each(function(e) {
|
|
1808
|
+
e.target(null);
|
|
1809
|
+
}).remove(), r.enter().append("div").attr("class", "div_" + n.id()).style("width", n.minWidgetWidth() + "px").style("height", n.minWidgetHeight() + "px").each(function(e) {
|
|
1810
|
+
let t = h(this);
|
|
1811
|
+
e._parentWidget = n, e._class.indexOf("childWidget") < 0 && (e._class = "childWidget " + e._class), e.target(null).target(t.node());
|
|
1812
|
+
}).merge(r).each(function(e) {
|
|
1813
|
+
e.resize().lazyRender(), n._hasChildWidgets = !0;
|
|
1814
|
+
});
|
|
1815
|
+
} else {
|
|
1816
|
+
t.selectAll(".div_" + n.id()).remove();
|
|
1817
|
+
let r = n.calcFieldsIndex(e.colIdx);
|
|
1818
|
+
t[n.renderHtmlDataCells() ? "html" : "text"](n.field(e.rowInfo.rowIdx, r).transform(e.cell));
|
|
1819
|
+
}
|
|
1820
|
+
}), b.exit().remove();
|
|
1821
|
+
let x = parseInt(this.thead.node().offsetHeight);
|
|
1822
|
+
this.pagination() && this._hasChildWidgets ? (this.tableDiv.style("overflow-y", "auto"), this.table.style("margin-bottom", "50px"), console.warn("Warning: displaying another widget in the table may cause problems with pagination")) : (this.tableDiv.style("overflow-y", null), this.table.style("margin-bottom", null)), this.size(this._size);
|
|
1823
|
+
let S = 0, C = this.fixedColHeadRow.selectAll("th").data(this.fixedColumn() && this.showHeader() ? [r[0]] : []), w = C.enter().append("th").each(function(e) {
|
|
1824
|
+
let t = h(this);
|
|
1825
|
+
t.append("span").attr("class", "thText"), t.append("span").attr("class", "thIcon");
|
|
1826
|
+
}).on("click", function(e, t) {
|
|
1827
|
+
n.headerClick(e, t);
|
|
1828
|
+
}).merge(C).style("background-color", this.theadRowBackgroundColor()).style("border-color", this.theadCellBorderColor()).style("color", this.theadFontColor()).style("font-size", this.theadFontSize());
|
|
1829
|
+
w.select(".thText").style("font-family", this.theadFontFamily()).text(function(e) {
|
|
1830
|
+
return e;
|
|
1831
|
+
}), w.select(".thIcon").text(function(e, t) {
|
|
1832
|
+
return n.descending() ? n.sortByFieldIndex() === t ? "" : "" : n.sortByFieldIndex() === t ? "" : "";
|
|
1833
|
+
}), C.exit().remove();
|
|
1834
|
+
let T = this.fixedColBody.selectAll("tr").data(this.fixedColumn() ? g : []), E = T.enter().append("tr").attr("class", function() {
|
|
1835
|
+
return "trId" + n._id;
|
|
1836
|
+
}).merge(T).on("click", function(e, t) {
|
|
1837
|
+
h(y[0][t]).on("click.selectionBag")(y.data()[t], t);
|
|
1838
|
+
}).on("mouseover", function(e, t) {
|
|
1839
|
+
h(y[0][t]).on("mouseover")(y.data()[t], t);
|
|
1840
|
+
}).on("mouseout", function(e, t) {
|
|
1841
|
+
h(y[0][t]).on("mouseout")(y.data()[t], t);
|
|
1842
|
+
}).classed("selected", function(e) {
|
|
1843
|
+
return n._selectionBag.isSelected(n._createSelectionObject(e));
|
|
1844
|
+
});
|
|
1845
|
+
T.exit().remove();
|
|
1846
|
+
let D = E.selectAll("td").data(function(e, t) {
|
|
1847
|
+
return [e[0]];
|
|
1848
|
+
}), O = D.enter().append("td").merge(D)[this.renderHtmlDataCells() ? "html" : "text"](function(e) {
|
|
1849
|
+
return typeof e == "string" ? e.trim() : typeof e == "number" ? e : "";
|
|
1850
|
+
});
|
|
1851
|
+
D.exit().remove();
|
|
1852
|
+
let k = this.fixedColFootRow.selectAll("td").data(this.fixedColumn() && this.totalledLabel() ? [this.totalledLabel()] : []), A = k.enter().append("td").merge(k)[this.renderHtmlDataCells() ? "html" : "text"](function(e) {
|
|
1853
|
+
return typeof e == "string" ? e.trim() : typeof e == "number" ? e : "";
|
|
1854
|
+
});
|
|
1855
|
+
k.exit().remove(), this.fixedColumn() && !this.fixedSize() && A.length && (S = (this.showHeader() && (A.property("offsetWidth"), A.property("offsetWidth")), A.property("offsetWidth")), this.fixedCol.style("position", "absolute").style("margin-top", -this.tableDiv.property("scrollTop") + x + "px"), O.style("width", S + "px"), this.fixedColHead.style("position", "absolute").style("margin-top", (this.fixedHeader() ? this.tableDiv.property("scrollTop") : 0) - x + "px"), w.style("width", S + "px"), y.each(function(e, t) {
|
|
1856
|
+
let n = h(this).select("td").property("offsetHeight");
|
|
1857
|
+
h(O[t][0]).style("height", n + "px");
|
|
1858
|
+
})), this.table.style("margin-left", -S + "px"), this.tableDiv.style("margin-left", S + "px").style("width", this.width() - S + "px"), y.empty() || this.setColumnWidths(y);
|
|
1859
|
+
let j, M, N, P;
|
|
1860
|
+
if (this.fixedSize()) {
|
|
1861
|
+
let e = h(".tableDiv > table").node();
|
|
1862
|
+
if (e) {
|
|
1863
|
+
j = e.getBoundingClientRect();
|
|
1864
|
+
let r, i;
|
|
1865
|
+
j.width !== 0 && j.height !== 0 ? (calcWidth(), calcHeight()) : (j.height - x <= n.tableDiv.property("offsetHeight") ? calcHeight() : n.fixedHeader() ? (r = n.tableDiv.property("offsetHeight"), r += "px") : r = "100%", j.width - S < n.tableDiv.property("offsetWidth") ? calcWidth() : n.fixedColumn() ? (i = n.tableDiv.property("offsetWidth") - S, i += "px") : i = "100%"), t.classed("childWidget") && (n._placeholderElement.style("width", i + "px").style("height", r + "px"), n.tableDiv.style("overflow", "hidden")), n.size({
|
|
1866
|
+
width: i,
|
|
1867
|
+
height: r
|
|
1868
|
+
});
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
this.setOnScrollEvents(this.tableDiv.node(), x);
|
|
1872
|
+
function calcWidth() {
|
|
1873
|
+
let e = j.width;
|
|
1874
|
+
P = n.tbody.property("offsetWidth") + 1, N = e > P ? P : e, N = N;
|
|
1875
|
+
}
|
|
1876
|
+
function calcHeight() {
|
|
1877
|
+
M = n.tbody.property("offsetHeight") + x, M = M;
|
|
1878
|
+
}
|
|
1879
|
+
this._paginator.render(), setTimeout(function() {
|
|
1880
|
+
n._paginator.right((n.hasVScroll(t) ? i.getScrollbarWidth() : 0) + n._paginatorTableSpacing).bottom((n.hasHScroll(t) ? i.getScrollbarWidth() : 0) + n._paginatorTableSpacing).render(function() {
|
|
1881
|
+
n.tableDiv.node().scrollLeft = o;
|
|
1882
|
+
});
|
|
1883
|
+
}, 0);
|
|
1884
|
+
}
|
|
1885
|
+
exit(e, t) {
|
|
1886
|
+
this._paginator.target(null), super.exit(e, t);
|
|
1887
|
+
}
|
|
1888
|
+
setColumnWidths(e) {
|
|
1889
|
+
let t = this, n = e.filter(function(e, t) {
|
|
1890
|
+
return t === 0;
|
|
1891
|
+
}), r = h(null);
|
|
1892
|
+
n.each(function(e) {
|
|
1893
|
+
r = g(this.childNodes);
|
|
1894
|
+
});
|
|
1895
|
+
let i = this.fixedHeader() ? this.thead.property("offsetHeight") : 0, a = 1, o = {};
|
|
1896
|
+
r.each(function(e, t) {
|
|
1897
|
+
o[t] = this.offsetWidth;
|
|
1898
|
+
}), this.thead.selectAll("th").each(function(e, t) {
|
|
1899
|
+
let n = this.offsetWidth, i = r.empty() ? 0 : o[t], s = n >= i ? n : i;
|
|
1900
|
+
this.style.width = s + "px", r.filter((e, t) => t === 0).each(function() {
|
|
1901
|
+
h(this).style("width", s + "px");
|
|
1902
|
+
}), a += s;
|
|
1903
|
+
}), this.thead.style("position", this.fixedHeader() ? "absolute" : "relative").style("width", a + "px").style("margin-top", "0px"), this.table.style("width", a + "px"), this.tableDiv.style("margin-top", (t.fixedHeader() ? i : 0) + "px"), this.tbody.style("width", a + "px");
|
|
1904
|
+
}
|
|
1905
|
+
getBodyRow(e) {
|
|
1906
|
+
return this.table.selectAll("tbody tr.trId" + this._id).filter(function(t, n) {
|
|
1907
|
+
return n === e;
|
|
1908
|
+
});
|
|
1909
|
+
}
|
|
1910
|
+
getFixedRow(e) {
|
|
1911
|
+
return this._element.selectAll(".rows-wrapper tbody tr").filter(function(t, n) {
|
|
1912
|
+
return n === e;
|
|
1913
|
+
});
|
|
1914
|
+
}
|
|
1915
|
+
setOnScrollEvents(e, t) {
|
|
1916
|
+
let n = this;
|
|
1917
|
+
e.onscroll = function(e) {
|
|
1918
|
+
let r = e.target.scrollTop, i = e.target.scrollLeft;
|
|
1919
|
+
n.fixedHeader() && n.thead.style("margin-left", -i + "px"), n.fixedColumn() && (n.fixedCol.style("margin-top", -r + t + "px"), n.fixedHeader() && n.fixedColHead.style("margin-top", r - t + "px"));
|
|
1920
|
+
};
|
|
1921
|
+
}
|
|
1922
|
+
_generateTempRow() {
|
|
1923
|
+
let e = this.tbody.append("tr");
|
|
1924
|
+
return e.append("td").text("QQQ"), e;
|
|
1925
|
+
}
|
|
1926
|
+
_createSelectionObject(e) {
|
|
1927
|
+
let t = this;
|
|
1928
|
+
return {
|
|
1929
|
+
_id: e,
|
|
1930
|
+
element: () => t.tbody ? t.tbody.selectAll("tr").filter(function(t) {
|
|
1931
|
+
return t === e;
|
|
1932
|
+
}) : h(null)
|
|
1933
|
+
};
|
|
1934
|
+
}
|
|
1935
|
+
_calcRowsPerPage(e) {
|
|
1936
|
+
this._paginator.numItems() === 0 && (this._paginator.numItems(1), this.itemsPerPage(1)), this._paginator.render();
|
|
1937
|
+
let t = this.thead.selectAll("th").node() ? this.thead.selectAll("th").node().clientHeight : 0, n = this.tfoot.selectAll("td").node() ? this.tfoot.selectAll("td").node().clientHeight : 0, r = this._generateTempRow(), a = r.node().clientHeight;
|
|
1938
|
+
r.remove();
|
|
1939
|
+
let o = this.calcHeight(this._paginator.element()), s = Math.floor((this.height() - t - n - o - (this.table.style("width") >= this.table.style("width") ? i.getScrollbarWidth() : 0) - this._paginatorTableSpacing * 2) / a) || 1;
|
|
1940
|
+
return this.totalledColumns().length !== 0 && --s, s;
|
|
1941
|
+
}
|
|
1942
|
+
sort(e) {
|
|
1943
|
+
return this.sortByFieldIndex() === e ? this.descending(!this.descending()) : this.descending(!1), this.sortByFieldIndex(e), this;
|
|
1944
|
+
}
|
|
1945
|
+
selection(e) {
|
|
1946
|
+
return arguments.length ? (this._selectionBag.set(e.map(function(e) {
|
|
1947
|
+
return this._createSelectionObject(e);
|
|
1948
|
+
}, this)), this) : this._selectionBag.get().map(function(e) {
|
|
1949
|
+
return e._id;
|
|
1950
|
+
});
|
|
1951
|
+
}
|
|
1952
|
+
selectionBagClick(e, t) {
|
|
1953
|
+
if (this.multiSelect() && l().shiftKey && this._selectionPrevClick) {
|
|
1954
|
+
let t = !1, n = [], r = this.tableData().filter(function(r, i) {
|
|
1955
|
+
let a = !1;
|
|
1956
|
+
return (r === e || r === this._selectionPrevClick) && (t && (a = !0), t = !t, n.push(i)), t || a;
|
|
1957
|
+
}, this);
|
|
1958
|
+
this.selection(r);
|
|
1959
|
+
} else if (this.multiSelect()) this._selectionBag.click(this._createSelectionObject(e), l), this._selectionPrevClick = e;
|
|
1960
|
+
else {
|
|
1961
|
+
let t = this._createSelectionObject(e);
|
|
1962
|
+
this._selectionBag.click(t, { ctrlKey: this._selectionBag.isSelected(t) }), this._selectionPrevClick = e;
|
|
1963
|
+
}
|
|
1964
|
+
this.render();
|
|
1965
|
+
}
|
|
1966
|
+
applyHoverRowStyles(e) {
|
|
1967
|
+
let t = this;
|
|
1968
|
+
e.style("color", t.tbodyHoverRowFontColor()).style("background-color", t.tbodyHoverRowBackgroundColor());
|
|
1969
|
+
}
|
|
1970
|
+
applySelectedRowStyles(e) {
|
|
1971
|
+
let t = this;
|
|
1972
|
+
e.style("color", t.tbodySelectedRowFontColor()).style("background-color", t.tbodySelectedRowBackgroundColor());
|
|
1973
|
+
}
|
|
1974
|
+
applyRowStyles(e, t = !1) {
|
|
1975
|
+
let n = e.datum().row;
|
|
1976
|
+
e.style("color", t ? this.tbodyFirstColFontColor() : this.tbodyFontColor()).style("background-color", t ? this.tbodyFirstColBackgroundColor() : this.tableZebraColor_exists() && this.tableData().indexOf(n) % 2 ? this.tbodyRowBackgroundColor() : this.tableZebraColor());
|
|
1977
|
+
}
|
|
1978
|
+
applyFirstColRowStyles(e) {
|
|
1979
|
+
this.applyStyleToRows(e, !0);
|
|
1980
|
+
}
|
|
1981
|
+
applyStyleToRows(e, t = !1) {
|
|
1982
|
+
t = t === void 0 ? !1 : t;
|
|
1983
|
+
let n = this;
|
|
1984
|
+
e.each(function() {
|
|
1985
|
+
let e = h(this);
|
|
1986
|
+
e.classed("hover") ? n.applyHoverRowStyles(e) : e.classed("selected") ? n.applySelectedRowStyles(e) : n.applyRowStyles(e, t);
|
|
1987
|
+
});
|
|
1988
|
+
}
|
|
1989
|
+
getColumnAlignment(e, t, n) {
|
|
1990
|
+
let r = this.calcFieldsIndex(t);
|
|
1991
|
+
switch (this.field(e, r).__prop_type) {
|
|
1992
|
+
case "string": return this.stringAlign();
|
|
1993
|
+
case "number": return this.numberAlign();
|
|
1994
|
+
case "":
|
|
1995
|
+
case void 0: switch (typeof n) {
|
|
1996
|
+
case "string": return this.stringAlign();
|
|
1997
|
+
case "number": return this.numberAlign();
|
|
1998
|
+
}
|
|
1999
|
+
}
|
|
2000
|
+
return null;
|
|
2001
|
+
}
|
|
2002
|
+
serializeState() {
|
|
2003
|
+
return {
|
|
2004
|
+
selection: this._selectionBag.get().map(function(e) {
|
|
2005
|
+
return e._id;
|
|
2006
|
+
}),
|
|
2007
|
+
data: this.data()
|
|
2008
|
+
};
|
|
2009
|
+
}
|
|
2010
|
+
deserializeState(e) {
|
|
2011
|
+
if (e) {
|
|
2012
|
+
if (e.selection) {
|
|
2013
|
+
let t = this;
|
|
2014
|
+
this._selectionBag.set(e.selection.map(function(e) {
|
|
2015
|
+
return t._createSelectionObject(e);
|
|
2016
|
+
}));
|
|
2017
|
+
}
|
|
2018
|
+
e.data && this.data(e.data);
|
|
2019
|
+
}
|
|
2020
|
+
return this;
|
|
2021
|
+
}
|
|
2022
|
+
click(e, t, n) {}
|
|
2023
|
+
dblclick(e, t, n) {}
|
|
2024
|
+
headerClick(e, t) {
|
|
2025
|
+
this.sort(t).render();
|
|
2026
|
+
}
|
|
2027
|
+
};
|
|
2028
|
+
Table.prototype._class += " other_Table", Table.prototype.publish("renderHtmlDataCells", !1, "boolean", "enable or disable HTML within cells", null, { tags: ["Private"] }), Table.prototype.publish("pagination", !0, "boolean", "Enable or disable pagination", null, { tags: ["Private"] }), Table.prototype.publish("paginationLimit", null, "number", "Maximum number of rows allowed before pagination defaults to on", null, { tags: ["Private"] }), Table.prototype.publishProxy("itemsPerPage", "_paginator"), Table.prototype.publishProxy("pageNumber", "_paginator", "pageNumber", 1), Table.prototype.publishProxy("adjacentPages", "_paginator"), Table.prototype.publish("topN", null, "number", "Total number or rows of data to be displayed in the table", null, { tags: ["Private"] }), Table.prototype.publish("pivot", !1, "boolean", "Pivot Table"), Table.prototype.publish("showHeader", !0, "boolean", "Show or hide the table header", null, { tags: ["Private"] }), Table.prototype.publish("fixedHeader", !0, "boolean", "Enable or disable fixed table header", null, { tags: ["Private"] }), Table.prototype.publish("fixedColumn", !1, "boolean", "Enable or disable fixed first column", null, { tags: ["Private"] }), Table.prototype.publish("multiSelect", !1, "boolean", "Multiple Selection", null, { tags: ["Basic"] }), Table.prototype.publish("fixedSize", !1, "boolean", "Fix Size to Min Width/Height"), Table.prototype.publish("hideEmptyColumns", !1, "boolean", "Hide columns with all empty cells"), Table.prototype.publish("theadFontSize", null, "string", "Table head font size", null, {
|
|
2029
|
+
tags: ["Basic"],
|
|
2030
|
+
optional: !0
|
|
2031
|
+
}), Table.prototype.publish("tbodyFontSize", null, "string", "Table body font size", null, {
|
|
2032
|
+
tags: ["Basic"],
|
|
2033
|
+
optional: !0
|
|
2034
|
+
}), Table.prototype.publish("tfootFontSize", null, "string", "Table body font size", null, {
|
|
2035
|
+
tags: ["Basic"],
|
|
2036
|
+
optional: !0
|
|
2037
|
+
}), Table.prototype.publish("theadFontColor", null, "html-color", "Table head font color", null, {
|
|
2038
|
+
tags: ["Basic"],
|
|
2039
|
+
optional: !0
|
|
2040
|
+
}), Table.prototype.publish("tbodyFontColor", null, "html-color", "Table body font color", null, {
|
|
2041
|
+
tags: ["Basic"],
|
|
2042
|
+
optional: !0
|
|
2043
|
+
}), Table.prototype.publish("tfootFontColor", null, "html-color", "Table body font color", null, {
|
|
2044
|
+
tags: ["Basic"],
|
|
2045
|
+
optional: !0
|
|
2046
|
+
}), Table.prototype.publish("theadFontFamily", null, "string", "Table head font family", null, {
|
|
2047
|
+
tags: ["Basic"],
|
|
2048
|
+
optional: !0
|
|
2049
|
+
}), Table.prototype.publish("tbodyFontFamily", null, "string", "Table body font family", null, {
|
|
2050
|
+
tags: ["Basic"],
|
|
2051
|
+
optional: !0
|
|
2052
|
+
}), Table.prototype.publish("tfootFontFamily", null, "string", "Table body font family", null, {
|
|
2053
|
+
tags: ["Basic"],
|
|
2054
|
+
optional: !0
|
|
2055
|
+
}), Table.prototype.publish("theadCellBorderColor", null, "html-color", "Table head cell border color", null, {
|
|
2056
|
+
tags: ["Basic"],
|
|
2057
|
+
optional: !0
|
|
2058
|
+
}), Table.prototype.publish("tfootCellBorderColor", null, "html-color", "Table head cell border color", null, {
|
|
2059
|
+
tags: ["Basic"],
|
|
2060
|
+
optional: !0
|
|
2061
|
+
}), Table.prototype.publish("theadRowBackgroundColor", null, "html-color", "Table head row color", null, {
|
|
2062
|
+
tags: ["Basic"],
|
|
2063
|
+
optional: !0
|
|
2064
|
+
}), Table.prototype.publish("tfootRowBackgroundColor", null, "html-color", "Table head row color", null, {
|
|
2065
|
+
tags: ["Basic"],
|
|
2066
|
+
optional: !0
|
|
2067
|
+
}), Table.prototype.publish("tbodyCellBorderColor", null, "html-color", "Table body cell border color", null, {
|
|
2068
|
+
tags: ["Basic"],
|
|
2069
|
+
optional: !0
|
|
2070
|
+
}), Table.prototype.publish("tbodyRowBackgroundColor", null, "html-color", "Table body row color", null, {
|
|
2071
|
+
tags: ["Basic"],
|
|
2072
|
+
optional: !0
|
|
2073
|
+
}), Table.prototype.publish("tbodyFirstColFontColor", null, "html-color", "Table body first column font color", null, {
|
|
2074
|
+
tags: ["Basic"],
|
|
2075
|
+
optional: !0
|
|
2076
|
+
}), Table.prototype.publish("tbodyFirstColBackgroundColor", null, "html-color", "Table body first column background color", null, {
|
|
2077
|
+
tags: ["Basic"],
|
|
2078
|
+
optional: !0
|
|
2079
|
+
}), Table.prototype.publish("tbodyHoverRowFontColor", null, "html-color", "Table body hover row font color", null, {
|
|
2080
|
+
tags: ["Basic"],
|
|
2081
|
+
optional: !0
|
|
2082
|
+
}), Table.prototype.publish("tbodyHoverRowBackgroundColor", null, "html-color", "Table body hover row background color", null, {
|
|
2083
|
+
tags: ["Basic"],
|
|
2084
|
+
optional: !0
|
|
2085
|
+
}), Table.prototype.publish("tbodySelectedRowFontColor", null, "html-color", "Table body selected row color", null, {
|
|
2086
|
+
tags: ["Basic"],
|
|
2087
|
+
optional: !0
|
|
2088
|
+
}), Table.prototype.publish("tbodySelectedRowBackgroundColor", null, "html-color", "Table body selected row color", null, {
|
|
2089
|
+
tags: ["Basic"],
|
|
2090
|
+
optional: !0
|
|
2091
|
+
}), Table.prototype.publish("tableZebraColor", null, "html-color", "Table zebra row color", null, {
|
|
2092
|
+
tags: ["Basic"],
|
|
2093
|
+
optional: !0
|
|
2094
|
+
}), Table.prototype.publish("totalledColumns", [], "array", "Array of indices of the columns to be totalled", null, {
|
|
2095
|
+
tags: ["Basic"],
|
|
2096
|
+
optional: !0,
|
|
2097
|
+
disable: (e) => e.pivot()
|
|
2098
|
+
}), Table.prototype.publish("totalledLabel", null, "string", "Adds a label to the first column of the 'Totalled' row", null, {
|
|
2099
|
+
tags: ["Basic"],
|
|
2100
|
+
optional: !0,
|
|
2101
|
+
disable: (e) => e.pivot()
|
|
2102
|
+
}), Table.prototype.publish("hiddenColumns", [], "array", "Array of indices of the columns to be hidden", null, {
|
|
2103
|
+
tags: ["Basic"],
|
|
2104
|
+
optional: !0,
|
|
2105
|
+
disable: (e) => e.pivot()
|
|
2106
|
+
}), Table.prototype.publish("stringAlign", "left", "set", "Cell alignment for strings", [
|
|
2107
|
+
"left",
|
|
2108
|
+
"right",
|
|
2109
|
+
"center"
|
|
2110
|
+
], {
|
|
2111
|
+
tags: ["Basic"],
|
|
2112
|
+
optional: !0
|
|
2113
|
+
}), Table.prototype.publish("numberAlign", "right", "set", "Cell alignment for numbers", [
|
|
2114
|
+
"left",
|
|
2115
|
+
"right",
|
|
2116
|
+
"center"
|
|
2117
|
+
], {
|
|
2118
|
+
tags: ["Basic"],
|
|
2119
|
+
optional: !0
|
|
2120
|
+
}), Table.prototype.publish("verticalAlign", null, "set", "Cell vertical alignment", [
|
|
2121
|
+
null,
|
|
2122
|
+
"middle",
|
|
2123
|
+
"top",
|
|
2124
|
+
"bottom"
|
|
2125
|
+
], {
|
|
2126
|
+
tags: ["Basic"],
|
|
2127
|
+
optional: !0
|
|
2128
|
+
}), Table.prototype.publish("minWidgetWidth", 320, "number", "Minimum width of a child widget", null, {
|
|
2129
|
+
tags: ["Basic"],
|
|
2130
|
+
optional: !0
|
|
2131
|
+
}), Table.prototype.publish("minWidgetHeight", 240, "number", "Minimum height of a child widget", null, {
|
|
2132
|
+
tags: ["Basic"],
|
|
2133
|
+
optional: !0
|
|
2134
|
+
}), Table.prototype.publish("sortByFieldIndex", null, "number", "Index for the field/column to sort the data", null, {
|
|
2135
|
+
tags: ["Basic"],
|
|
2136
|
+
optional: !0
|
|
2137
|
+
}), Table.prototype.publish("descending", !1, "boolean", "Direction for sorting the data: ascending (true) or descending (false)", null, {
|
|
2138
|
+
tags: ["Basic"],
|
|
2139
|
+
optional: !0
|
|
2140
|
+
});
|
|
2141
|
+
//#endregion
|
|
2142
|
+
//#region src/Legend.ts
|
|
2143
|
+
function _htmlColorBlock(e) {
|
|
2144
|
+
return "<div class=\"colorBlock\" style=\"background-color:" + e + ";\"></div>";
|
|
2145
|
+
}
|
|
2146
|
+
var Legend = class extends Table {
|
|
2147
|
+
_targetWidget;
|
|
2148
|
+
_targetWidgetMonitor;
|
|
2149
|
+
constructor() {
|
|
2150
|
+
super(), this.showHeader(!1), this.pagination(!1);
|
|
2151
|
+
}
|
|
2152
|
+
isRainbow() {
|
|
2153
|
+
let e = this.getWidget();
|
|
2154
|
+
return e && e._palette && e._palette.type() === "rainbow";
|
|
2155
|
+
}
|
|
2156
|
+
targetWidget(e) {
|
|
2157
|
+
if (!arguments.length) return this._targetWidget;
|
|
2158
|
+
this._targetWidget = e, this._targetWidgetMonitor && (this._targetWidgetMonitor.remove(), delete this._targetWidgetMonitor);
|
|
2159
|
+
let t = this;
|
|
2160
|
+
return this._targetWidgetMonitor = this._targetWidget.monitor(function(e, n, r, i) {
|
|
2161
|
+
switch (e) {
|
|
2162
|
+
case "chart":
|
|
2163
|
+
case "columns":
|
|
2164
|
+
case "data":
|
|
2165
|
+
case "paletteID":
|
|
2166
|
+
t.lazyRender();
|
|
2167
|
+
break;
|
|
2168
|
+
}
|
|
2169
|
+
}), this;
|
|
2170
|
+
}
|
|
2171
|
+
getWidget() {
|
|
2172
|
+
if (this._targetWidget) switch (this._targetWidget.classID()) {
|
|
2173
|
+
case "chart_MultiChart": return this._targetWidget.chart();
|
|
2174
|
+
}
|
|
2175
|
+
return this._targetWidget;
|
|
2176
|
+
}
|
|
2177
|
+
getPalette() {
|
|
2178
|
+
let e = this.getWidget();
|
|
2179
|
+
if (e && e._palette) switch (e._palette.type()) {
|
|
2180
|
+
case "ordinal": return r.ordinal(e._palette.id());
|
|
2181
|
+
case "rainbow": return r.rainbow(e._palette.id());
|
|
2182
|
+
}
|
|
2183
|
+
return r.ordinal("default");
|
|
2184
|
+
}
|
|
2185
|
+
enter(e, t) {
|
|
2186
|
+
super.enter(e, t), h(e.parentNode).style("overflow-y", "auto"), this.renderHtmlDataCells(!0), this.fixedHeader(!1), this.fixedSize(!0), t.classed("other_Legend", !0);
|
|
2187
|
+
}
|
|
2188
|
+
update(e, t) {
|
|
2189
|
+
let n = ["Key", "Label"], r = [];
|
|
2190
|
+
if (this._targetWidget) {
|
|
2191
|
+
let e = this.getPalette();
|
|
2192
|
+
switch (e.type()) {
|
|
2193
|
+
case "ordinal":
|
|
2194
|
+
let t = e;
|
|
2195
|
+
switch (this.dataFamily()) {
|
|
2196
|
+
case "2D":
|
|
2197
|
+
r = this._targetWidget.data().map(function(e) {
|
|
2198
|
+
return [_htmlColorBlock(t(e[0])), e[0]];
|
|
2199
|
+
}, this);
|
|
2200
|
+
break;
|
|
2201
|
+
case "ND":
|
|
2202
|
+
r = this._targetWidget.columns().filter(function(e, t) {
|
|
2203
|
+
return t > 0;
|
|
2204
|
+
}).map(function(e) {
|
|
2205
|
+
return [_htmlColorBlock(t(e)), e];
|
|
2206
|
+
}, this);
|
|
2207
|
+
break;
|
|
2208
|
+
}
|
|
2209
|
+
break;
|
|
2210
|
+
case "rainbow":
|
|
2211
|
+
let n = e, i = d(this.rainbowFormat()), a = this.getWidget(), o = this.rainbowBins(), s = a._dataMinWeight, c = a._dataMaxWeight, l = (c - s) / (o - 1);
|
|
2212
|
+
r.push([_htmlColorBlock(n(s, s, c)), i(s)]);
|
|
2213
|
+
for (let e = 1; e < o - 1; ++e) {
|
|
2214
|
+
let t = l * e;
|
|
2215
|
+
r.push([_htmlColorBlock(n(t, s, c)), i(Math.floor(t))]);
|
|
2216
|
+
}
|
|
2217
|
+
r.push([_htmlColorBlock(n(c, s, c)), i(c)]);
|
|
2218
|
+
break;
|
|
2219
|
+
}
|
|
2220
|
+
}
|
|
2221
|
+
this.columns(n), this.data(r), super.update(e, t), t.classed("horiz-legend", this.orientation() === "horizontal");
|
|
2222
|
+
let i = t.select(".tableDiv > table"), a = i.node().getBoundingClientRect(), o = this._placeholderElement.node().getBoundingClientRect();
|
|
2223
|
+
t.select(".tableDiv").style("overflow", "visible");
|
|
2224
|
+
let s = o.height / 2 - a.height / 2, c = o.width / 2 - a.width / 2;
|
|
2225
|
+
i.style("position", "absolute").style("top", s + "px").style("left", c + "px");
|
|
2226
|
+
let l = this.pageNumber() - 1, u = this.itemsPerPage(), f = l * u, p = l * parseInt(u) + parseInt(u), m;
|
|
2227
|
+
m = this.pagination() ? this.data().slice(f, p) : this.data();
|
|
2228
|
+
let h = this.tbody.selectAll("tr").data(m), g = this;
|
|
2229
|
+
h.on("click", function(e, t) {
|
|
2230
|
+
g.onClick(e, t);
|
|
2231
|
+
}).on("dblclick", function(e, t) {
|
|
2232
|
+
g.onDblClick(e, t);
|
|
2233
|
+
}).on("mouseover", function(e, t) {
|
|
2234
|
+
g.onMouseOver(e, t);
|
|
2235
|
+
});
|
|
2236
|
+
}
|
|
2237
|
+
exit(e, t) {
|
|
2238
|
+
this._targetWidgetMonitor && (this._targetWidgetMonitor.remove(), delete this._targetWidgetMonitor), super.exit(e, t);
|
|
2239
|
+
}
|
|
2240
|
+
onClick(e, t) {}
|
|
2241
|
+
onDblClick(e, t) {}
|
|
2242
|
+
onMouseOver(e, t) {}
|
|
2243
|
+
};
|
|
2244
|
+
Legend.prototype._class += " other_Legend", Legend.prototype.publish("dataFamily", "ND", "set", "Type of data", [
|
|
2245
|
+
"1D",
|
|
2246
|
+
"2D",
|
|
2247
|
+
"ND",
|
|
2248
|
+
"map",
|
|
2249
|
+
"any",
|
|
2250
|
+
"other"
|
|
2251
|
+
], { tags: ["Private"] }), Legend.prototype.publish("orientation", "vertical", "set", "Orientation of Legend rows", ["vertical", "horizontal"], { tags: ["Private"] }), Legend.prototype.publish("rainbowFormat", ",", "string", "Rainbow number formatting", null, {
|
|
2252
|
+
tags: ["Private"],
|
|
2253
|
+
optional: !0,
|
|
2254
|
+
disable: (e) => !e.isRainbow()
|
|
2255
|
+
}), Legend.prototype.publish("rainbowBins", 8, "number", "Number of rainbow bins", null, {
|
|
2256
|
+
tags: ["Private"],
|
|
2257
|
+
disable: (e) => !e.isRainbow()
|
|
2258
|
+
});
|
|
2259
|
+
var fe = Table.prototype.getBBox;
|
|
2260
|
+
Legend.prototype.getBBox = function(e, t) {
|
|
2261
|
+
let n = fe.apply(this, arguments), r = this.element().select(".tableDiv > table");
|
|
2262
|
+
if (!r.empty()) {
|
|
2263
|
+
let e = r.node().getBoundingClientRect(), a = e.width + 8 + (this.hasVScroll(this._placeholderElement) ? i.getScrollbarWidth() : 0), o = e.height + 8 + (this.hasHScroll(this._placeholderElement) ? i.getScrollbarWidth() : 0);
|
|
2264
|
+
return {
|
|
2265
|
+
x: n.x,
|
|
2266
|
+
y: n.y,
|
|
2267
|
+
width: (t ? Math.round(a) : a) * this._scale,
|
|
2268
|
+
height: (t ? Math.round(o) : o) * this._scale
|
|
2269
|
+
};
|
|
2270
|
+
}
|
|
2271
|
+
return n;
|
|
2272
|
+
};
|
|
2273
|
+
//#endregion
|
|
2274
|
+
//#region src/MorphText.ts
|
|
2275
|
+
var MorphText = class extends o {
|
|
2276
|
+
_fontWidth;
|
|
2277
|
+
_textElement;
|
|
2278
|
+
constructor() {
|
|
2279
|
+
super();
|
|
2280
|
+
}
|
|
2281
|
+
enter(e, t) {
|
|
2282
|
+
if (!this.fontSize()) {
|
|
2283
|
+
let t = window.getComputedStyle(e, null);
|
|
2284
|
+
this.fontSize(parseInt(t.fontSize));
|
|
2285
|
+
}
|
|
2286
|
+
this._fontWidth = this.fontSize() * 32 / 48, this._textElement = t.append("g");
|
|
2287
|
+
}
|
|
2288
|
+
dateTime() {
|
|
2289
|
+
let e = /* @__PURE__ */ new Date(), t = e.getSeconds().toString().length === 1 ? "0" + e.getSeconds() : e.getSeconds(), n = e.getMinutes().toString().length === 1 ? "0" + e.getMinutes() : e.getMinutes(), r = e.getHours().toString().length === 1 ? "0" + e.getHours() : e.getHours(), i = e.getHours() >= 12 ? "pm" : "am";
|
|
2290
|
+
return [
|
|
2291
|
+
"Sun",
|
|
2292
|
+
"Mon",
|
|
2293
|
+
"Tue",
|
|
2294
|
+
"Wed",
|
|
2295
|
+
"Thu",
|
|
2296
|
+
"Fri",
|
|
2297
|
+
"Sat"
|
|
2298
|
+
][e.getDay()] + " " + [
|
|
2299
|
+
"Jan",
|
|
2300
|
+
"Feb",
|
|
2301
|
+
"Mar",
|
|
2302
|
+
"Apr",
|
|
2303
|
+
"May",
|
|
2304
|
+
"Jun",
|
|
2305
|
+
"Jul",
|
|
2306
|
+
"Aug",
|
|
2307
|
+
"Sep",
|
|
2308
|
+
"Oct",
|
|
2309
|
+
"Nov",
|
|
2310
|
+
"Dec"
|
|
2311
|
+
][e.getMonth()] + " " + e.getDate() + " " + e.getFullYear() + " " + r + ":" + n + ":" + t + i;
|
|
2312
|
+
}
|
|
2313
|
+
update(e, t) {
|
|
2314
|
+
let n = this, r = this._textElement.selectAll("text").data(this.data(), function(e) {
|
|
2315
|
+
return e.id;
|
|
2316
|
+
});
|
|
2317
|
+
r.attr("class", "update"), this.transition.apply(r).attr("x", function(e, t) {
|
|
2318
|
+
return (-n.data().length / 2 + t) * n._fontWidth + n._fontWidth / 2;
|
|
2319
|
+
});
|
|
2320
|
+
let i = r.enter().append("text").attr("class", "enter").attr("font-size", this.fontSize()).attr("dy", ".35em").attr("y", (this.reverse() ? 1 : -1) * this._fontWidth * 2).attr("x", function(e, t) {
|
|
2321
|
+
return (-n.data().length / 2 + t) * n._fontWidth + n._fontWidth / 2;
|
|
2322
|
+
}).style("fill-opacity", 1e-6).style("text-anchor", this.anchor()).text(function(e) {
|
|
2323
|
+
return e.text;
|
|
2324
|
+
});
|
|
2325
|
+
this.transition.apply(i).attr("y", 0).style("fill-opacity", 1), r.exit().attr("class", "exit"), this.transition.apply(r.exit()).attr("y", (this.reverse() ? -1 : 1) * this._fontWidth * 2).style("fill-opacity", 1e-6).remove();
|
|
2326
|
+
}
|
|
2327
|
+
};
|
|
2328
|
+
MorphText.prototype._class += " other_MorphText", MorphText.prototype.publish("anchor", "middle", "set", "Sets anchor point", ["middle"], { tags: ["Basic"] }), MorphText.prototype.publish("fontSize", 14, "number", "Sets fontsize", null, { tags: ["Basic"] }), MorphText.prototype.publish("reverse", !1, "boolean", "Reverse Animation", null, { tags: ["Basic"] }), MorphText.prototype.publish("text", "", "string", "Sets text/data of widget", null, { tags: ["Basic"] });
|
|
2329
|
+
var pe = MorphText.prototype.text;
|
|
2330
|
+
MorphText.prototype.text = function(e) {
|
|
2331
|
+
let t = pe.apply(this, arguments);
|
|
2332
|
+
if (arguments.length) {
|
|
2333
|
+
let t = {}, n = e.split("");
|
|
2334
|
+
this.data(n.map(function(e) {
|
|
2335
|
+
let n = "_" + e;
|
|
2336
|
+
return t[n] === void 0 && (t[n] = 0), t[n]++, {
|
|
2337
|
+
text: e,
|
|
2338
|
+
id: e.charCodeAt(0) + 1024 * t[n]
|
|
2339
|
+
};
|
|
2340
|
+
}));
|
|
2341
|
+
}
|
|
2342
|
+
return t;
|
|
2343
|
+
};
|
|
2344
|
+
//#endregion
|
|
2345
|
+
//#region src/NestedTable.ts
|
|
2346
|
+
var NestedTable = class extends Table {
|
|
2347
|
+
constructor() {
|
|
2348
|
+
super(), this.minWidgetHeight(240), this.minWidgetWidth(360);
|
|
2349
|
+
}
|
|
2350
|
+
};
|
|
2351
|
+
NestedTable.prototype._class += " other_NestedTable";
|
|
2352
|
+
var Q = NestedTable.prototype.columns;
|
|
2353
|
+
NestedTable.prototype.columns = function(e) {
|
|
2354
|
+
return arguments.length ? (this._columns = e, Q.call(this, e.map(function(e) {
|
|
2355
|
+
return typeof e == "object" ? e.label : e;
|
|
2356
|
+
}))) : Q.apply(this, arguments);
|
|
2357
|
+
};
|
|
2358
|
+
var me = NestedTable.prototype.data;
|
|
2359
|
+
NestedTable.prototype.data = function(e) {
|
|
2360
|
+
if (arguments.length) {
|
|
2361
|
+
let t = this;
|
|
2362
|
+
return me.call(this, e.map(function(e) {
|
|
2363
|
+
return e.map(function(e, n) {
|
|
2364
|
+
if (e instanceof Array) {
|
|
2365
|
+
let r = [];
|
|
2366
|
+
if (typeof t._columns[n] == "object" && t._columns[n].columns) r = t._columns[n].columns;
|
|
2367
|
+
else for (let i = 0; i < e.length; ++i) r.push(t._columns[n] + "." + i);
|
|
2368
|
+
return new Table().columns(r).data(e);
|
|
2369
|
+
}
|
|
2370
|
+
return e;
|
|
2371
|
+
});
|
|
2372
|
+
}));
|
|
2373
|
+
}
|
|
2374
|
+
return me.apply(this, arguments);
|
|
2375
|
+
};
|
|
2376
|
+
//#endregion
|
|
2377
|
+
//#region src/Opportunity.ts
|
|
2378
|
+
var Column = class extends a {
|
|
2379
|
+
_owner;
|
|
2380
|
+
constructor() {
|
|
2381
|
+
super();
|
|
2382
|
+
}
|
|
2383
|
+
owner(e) {
|
|
2384
|
+
return arguments.length ? (this._owner = e, this) : this._owner;
|
|
2385
|
+
}
|
|
2386
|
+
valid() {
|
|
2387
|
+
return !!this.headerLabel();
|
|
2388
|
+
}
|
|
2389
|
+
};
|
|
2390
|
+
Column.prototype._class += " other_Opportunity.Column", Column.prototype.publish("headerLabel", null, "string", "Header value of a table", function() {
|
|
2391
|
+
return this._owner ? this._owner.columns() : [];
|
|
2392
|
+
}, {
|
|
2393
|
+
tags: ["Basic"],
|
|
2394
|
+
optional: !0
|
|
2395
|
+
});
|
|
2396
|
+
var MouseHoverColumn = class extends a {
|
|
2397
|
+
_owner;
|
|
2398
|
+
constructor() {
|
|
2399
|
+
super();
|
|
2400
|
+
}
|
|
2401
|
+
owner(e) {
|
|
2402
|
+
return arguments.length ? (this._owner = e, this) : this._owner;
|
|
2403
|
+
}
|
|
2404
|
+
valid() {
|
|
2405
|
+
return !!this.hoverValue() && !!this.hoverList();
|
|
2406
|
+
}
|
|
2407
|
+
};
|
|
2408
|
+
MouseHoverColumn.prototype._class += " other_Opportunity.MouseHoverColumn", MouseHoverColumn.prototype.publish("hoverValue", null, "string", "Hover value of a table", function() {
|
|
2409
|
+
return this._owner ? this._owner.columns() : [];
|
|
2410
|
+
}, {
|
|
2411
|
+
tags: ["Basic"],
|
|
2412
|
+
optional: !0
|
|
2413
|
+
}), MouseHoverColumn.prototype.publish("hoverList", null, "set", "Hover value of a table", function() {
|
|
2414
|
+
return this._owner ? this._owner.getIds() : [];
|
|
2415
|
+
}, {
|
|
2416
|
+
tags: ["Basic"],
|
|
2417
|
+
optional: !0
|
|
2418
|
+
});
|
|
2419
|
+
var ColumnDropdown = class extends a {
|
|
2420
|
+
_owner;
|
|
2421
|
+
constructor() {
|
|
2422
|
+
super();
|
|
2423
|
+
}
|
|
2424
|
+
owner(e) {
|
|
2425
|
+
return arguments.length ? (this._owner = e, this) : this._owner;
|
|
2426
|
+
}
|
|
2427
|
+
valid() {
|
|
2428
|
+
return !!this.columnIndex() && !!this.ColumnDropdownList();
|
|
2429
|
+
}
|
|
2430
|
+
};
|
|
2431
|
+
ColumnDropdown.prototype._class += " other_Opportunity.ColumnDropdown", ColumnDropdown.prototype.publish("columnIndex", null, "number", "Column index for display context data based on column dropdown list selction", {}, { tags: ["Basic", "Shared"] }), ColumnDropdown.prototype.publish("ColumnDropdownList", null, "set", "column value of a table", function() {
|
|
2432
|
+
return this._owner ? this._owner.getIds() : [];
|
|
2433
|
+
}, {
|
|
2434
|
+
tags: ["Basic"],
|
|
2435
|
+
optional: !0
|
|
2436
|
+
});
|
|
2437
|
+
var Opportunity = class extends o {
|
|
2438
|
+
groupCount;
|
|
2439
|
+
svg;
|
|
2440
|
+
tooltipdiv;
|
|
2441
|
+
Column;
|
|
2442
|
+
MouseHoverColumn;
|
|
2443
|
+
ColumnDropdown;
|
|
2444
|
+
constructor() {
|
|
2445
|
+
super(), this._drawStartPos = "origin", this.groupCount = 7;
|
|
2446
|
+
}
|
|
2447
|
+
enter(e, t) {
|
|
2448
|
+
super.enter(e, t);
|
|
2449
|
+
let n = (this.data().length + 1) * 25 + 30;
|
|
2450
|
+
this.svg = t.append("g").attr("width", this.groupCount * 100 + 1).attr("height", n), this.svg.append("defs").append("marker").classed("arrowhead", !0).attr("id", "end-arrow").attr("viewBox", "0 -5 10 10").attr("refX", 6).attr("markerWidth", 8).attr("markerHeight", 8).attr("orient", "auto").append("svg:path").attr("d", "M0,-5L10,0L0,5").attr("fill", "rgb(100,100,100)"), this.tooltipdiv = h("body").append("div").attr("class", "other_Opportunity-tooltip tooltip").style("opacity", 0);
|
|
2451
|
+
}
|
|
2452
|
+
update(e, t) {
|
|
2453
|
+
super.update(e, t);
|
|
2454
|
+
let n = this, r = this.data(), i = this.opportunityId();
|
|
2455
|
+
r.sort(function(e, t) {
|
|
2456
|
+
return e.cur_group > t.cur_group ? 1 : e.cur_group < t.cur_group ? -1 : 0;
|
|
2457
|
+
});
|
|
2458
|
+
let a = [];
|
|
2459
|
+
for (let e = 1; e <= n.groupCount; e++) a.push(e);
|
|
2460
|
+
let o = (r.length + 1) * 25 + 30, s = this.width(), c = s / n.groupCount - 30, u = this.svg.selectAll(".group").data(a);
|
|
2461
|
+
u.enter().append("rect").attr("class", "group"), u.attr("x", function(e, t) {
|
|
2462
|
+
return t * s / n.groupCount + 1;
|
|
2463
|
+
}).attr("y", 30).attr("width", s / this.groupCount).attr("height", o - 30), u.exit().remove();
|
|
2464
|
+
let d = this.svg.selectAll(".group_headings").data(a);
|
|
2465
|
+
if (d.enter().append("text").attr("class", "group_headings").attr("y", 20), d.attr("x", function(e, t) {
|
|
2466
|
+
return t * s / n.groupCount + s / n.groupCount / n.groupCount;
|
|
2467
|
+
}).text(function(e, t) {
|
|
2468
|
+
return n.headerLabels().length > 0 && n.headerLabels()[t] && n.headerLabels()[t].headerLabel() ? n.headerLabels()[t].headerLabel() : "";
|
|
2469
|
+
}), d.exit().remove(), this.previousGroup() === "prev_group" && this.currentGroup() === "cur_group") {
|
|
2470
|
+
let e = this.svg.selectAll(".node_date_change").data(r);
|
|
2471
|
+
e.enter().append("g").attr("class", "node_date_change update").on("mouseover", function(e) {
|
|
2472
|
+
n.tooltipdiv.transition().duration(200).style("opacity", .9);
|
|
2473
|
+
let t = "<span style='font-weight:bolder'>Close Date Change </span><br/>";
|
|
2474
|
+
n.mouseHover().forEach(function(n, r) {
|
|
2475
|
+
n.hoverValue() !== void 0 && (t = t + "<span style='font-weight:bold'>" + n.hoverValue() + ": </span>" + e[n.hoverList()] + "<br/>");
|
|
2476
|
+
});
|
|
2477
|
+
let r = e.prevdate + "";
|
|
2478
|
+
r = r.replace(/(\d\d\d\d)(\d\d)(\d\d)/g, "$3-$2-$1");
|
|
2479
|
+
let i = e.curdate + "";
|
|
2480
|
+
i = i.replace(/(\d\d\d\d)(\d\d)(\d\d)/g, "$3-$2-$1"), t = t + "<span style='font-weight:bold'>From: </span>" + r + "<br/><span style='font-weight:bold'>To: </span>" + i + "<br/>";
|
|
2481
|
+
let a = l();
|
|
2482
|
+
n.tooltipdiv.html(t).style("left", a.pageX + "px").style("top", a.pageY - 50 + "px");
|
|
2483
|
+
}).on("mouseout", function(e) {
|
|
2484
|
+
n.tooltipdiv.transition().duration(500).style("opacity", 0);
|
|
2485
|
+
}).each(function(e) {
|
|
2486
|
+
h(this).append("rect").attr("class", "node_date_change_rect").attr("width", 5).attr("height", 14).attr("rx", 6).attr("ry", 6);
|
|
2487
|
+
}), e.attr("transform", function(e, t) {
|
|
2488
|
+
return "translate(" + (9 * s / n.groupCount + 30 - 80) + "," + (t + t * 24 + 12 + 30) + ")";
|
|
2489
|
+
}), e.exit().remove();
|
|
2490
|
+
let t = this.svg.selectAll(".node_prev_group").data(r);
|
|
2491
|
+
t.enter().append("g").attr("class", "node_prev_group").on("mouseover", function(e, t) {
|
|
2492
|
+
n.tooltipdiv.transition().duration(200).style("opacity", .9);
|
|
2493
|
+
let r = "";
|
|
2494
|
+
n.mouseHover().forEach(function(t, n) {
|
|
2495
|
+
t.hoverValue() !== void 0 && (r = r + "<span style='font-weight:bold'>" + t.hoverValue() + ": </span>" + e[t.hoverList()] + "<br/>");
|
|
2496
|
+
});
|
|
2497
|
+
let i = l();
|
|
2498
|
+
n.tooltipdiv.html(r).style("left", i.pageX + "px").style("top", i.pageY - 100 + "px");
|
|
2499
|
+
}).on("mouseout", function(e) {
|
|
2500
|
+
n.tooltipdiv.transition().duration(500).style("opacity", 0);
|
|
2501
|
+
}).each(function(e) {
|
|
2502
|
+
let t = h(this);
|
|
2503
|
+
t.append("rect").attr("class", "node_prev_rect").attr("rx", 6).attr("ry", 6), t.append("text").attr("class", "node_prev_text");
|
|
2504
|
+
}), t.classed("update", !0).classed("changed", function(e) {
|
|
2505
|
+
return e.delta !== 0;
|
|
2506
|
+
}).attr("transform", function(e, t) {
|
|
2507
|
+
return "translate(" + ((e.prev_group - 1) * s / n.groupCount + 30 / 2) + "," + (t + t * 24 + 10 + 30) + ")";
|
|
2508
|
+
}).each(function(e) {
|
|
2509
|
+
let t = h(this).selectAll(".arrow").data(e.delta === 0 ? [] : [e]);
|
|
2510
|
+
t.enter().append("line").attr("class", "arrow update"), t.attr("x1", function(e) {
|
|
2511
|
+
return e.delta > 0 ? c : 0;
|
|
2512
|
+
}).attr("y1", 14 / 2).attr("x2", function(e) {
|
|
2513
|
+
return e.delta > 0 ? c + 30 - 4 + (Math.abs(e.delta) - 1) * (s / n.groupCount) : -30 - (Math.abs(e.delta) - 1) * (s / n.groupCount) + 4;
|
|
2514
|
+
}).attr("y2", 14 / 2).style("stroke-dasharray", "3, 3").style("stroke", "rgb(100,100,100)").style("marker-end", "url(#end-arrow)").style("opacity", "1"), t.exit().remove();
|
|
2515
|
+
}), t.select(".node_prev_rect").attr("width", c).attr("height", 14), t.select(".node_prev_text").attr("dy", 10).attr("dx", c / 4).text(function(e) {
|
|
2516
|
+
return typeof e[i] == "number" ? e[i] : e[i].substring(0, 14);
|
|
2517
|
+
}), t.exit().remove();
|
|
2518
|
+
let a = this.svg.selectAll(".node_cur_group").data(r);
|
|
2519
|
+
a.enter().append("g").attr("class", "node_cur_group").attr("transform", function(e, t) {
|
|
2520
|
+
return "translate(" + ((e.prev_group - 1) * s / n.groupCount + 30 / 2) + "," + (t + t * 24 + 10 + 30) + ")";
|
|
2521
|
+
}).on("mouseover", function(e, t) {
|
|
2522
|
+
n.tooltipdiv.transition().duration(200).style("opacity", .9);
|
|
2523
|
+
let r = "";
|
|
2524
|
+
n.mouseHover().forEach(function(t, n) {
|
|
2525
|
+
t.hoverValue() !== void 0 && (r = r + "<span style='font-weight:bold'>" + t.hoverValue() + ": </span>" + e[t.hoverList()] + "<br/>");
|
|
2526
|
+
});
|
|
2527
|
+
let i = l();
|
|
2528
|
+
n.tooltipdiv.html(r).style("left", i.pageX + "px").style("top", i.pageY - 100 + "px");
|
|
2529
|
+
}).on("mouseout", function(e) {
|
|
2530
|
+
n.tooltipdiv.transition().duration(500).style("opacity", 0);
|
|
2531
|
+
}).each(function(e) {
|
|
2532
|
+
let t = h(this);
|
|
2533
|
+
t.append("rect").attr("class", "node_cur_rect").attr("fill", function(e) {
|
|
2534
|
+
let t;
|
|
2535
|
+
return t = e.delta < 0 || e.cur_group === 7 ? "#F78181" : "#A9F5A9", t;
|
|
2536
|
+
}).attr("rx", 6).attr("ry", 6), t.append("a").append("text").attr("class", "node_cur_text");
|
|
2537
|
+
}), a.classed("update", !0).classed("changed", function(e) {
|
|
2538
|
+
return e.delta !== 0;
|
|
2539
|
+
}).transition().duration(800).ease("linear").attr("transform", function(e, t) {
|
|
2540
|
+
return "translate(" + ((e.cur_group - 1) * s / n.groupCount + 30 / 2) + "," + (t + t * 24 + 10 + 30) + ")";
|
|
2541
|
+
}).each("end", function() {
|
|
2542
|
+
g(".arrow").style("opacity", "1");
|
|
2543
|
+
}), a.select(".node_cur_group a").classed("update", !0).attr("xlink:href", function(e) {
|
|
2544
|
+
return n.url() + e.id;
|
|
2545
|
+
}).attr("xlink:show", "new"), a.select(".node_cur_rect").attr("width", c).attr("height", 14), a.select(".node_cur_text").classed("update", !0).attr("dy", 10).attr("dx", c / 4).style("fill", "blue").text(function(e) {
|
|
2546
|
+
return typeof e[i] == "number" ? e[i] : e[i].substring(0, 14);
|
|
2547
|
+
}), a.exit().remove();
|
|
2548
|
+
}
|
|
2549
|
+
for (let e = 0; e < n.columnData().length; e++) if (n.columnData()[e] && n.columnData()[e].ColumnDropdownList()) {
|
|
2550
|
+
let t = this.svg.selectAll(".columnDataText_" + e).data(r);
|
|
2551
|
+
t.enter().append("g").attr("class", "columnDataText_" + e + " update").each(function(e) {
|
|
2552
|
+
h(this).append("text");
|
|
2553
|
+
}), t.attr("transform", function(t, r) {
|
|
2554
|
+
return "translate(" + (n.columnData()[e].columnIndex() * s / n.groupCount + 30 / 2) + "," + (r + r * 24 + 12 + 30) + ")";
|
|
2555
|
+
}).attr("width", 5).attr("height", 14).attr("rx", 6).attr("ry", 6), t.select("text").attr("y", -6).attr("dy", 28).attr("dx", 0).attr("height", 20).attr("width", 29).text(function(t, r) {
|
|
2556
|
+
return t[n.columnData()[e].ColumnDropdownList()];
|
|
2557
|
+
}), t.exit().remove();
|
|
2558
|
+
}
|
|
2559
|
+
}
|
|
2560
|
+
exit(e, t) {
|
|
2561
|
+
super.exit(e, t);
|
|
2562
|
+
}
|
|
2563
|
+
getIds() {
|
|
2564
|
+
let e = this.columns();
|
|
2565
|
+
return e.unshift("default"), e;
|
|
2566
|
+
}
|
|
2567
|
+
};
|
|
2568
|
+
Opportunity.prototype._class += " other_Opportunity", Opportunity.prototype.Column = Column, Opportunity.prototype.MouseHoverColumn = MouseHoverColumn, Opportunity.prototype.ColumnDropdown = ColumnDropdown, Opportunity.prototype.publish("previousGroup", "", "set", "label in Opportunity", function() {
|
|
2569
|
+
return this.getIds();
|
|
2570
|
+
}, { tags: ["Basic", "Shared"] }), Opportunity.prototype.publish("currentGroup", "", "set", "label in Opportunity", function() {
|
|
2571
|
+
return this.getIds();
|
|
2572
|
+
}, { tags: ["Basic", "Shared"] }), Opportunity.prototype.publish("opportunityId", "id", "set", "Id for label in Opportunity", function() {
|
|
2573
|
+
return this.getIds();
|
|
2574
|
+
}, { tags: ["Basic", "Shared"] }), Opportunity.prototype.publish("url", null, "string", "URL in Opportunity", {}, { tags: ["Basic", "Shared"] }), Opportunity.prototype.publish("width", 1100, "number", "label in Opportunity", {}, { tags: ["Basic", "Shared"] }), Opportunity.prototype.publish("addColumn", null, "string", "number of columns in a table", {}, {
|
|
2575
|
+
tags: ["Basic", "Shared"],
|
|
2576
|
+
editor_input: (e, t, n, r) => {
|
|
2577
|
+
n.append("button").attr("id", e.id() + "_addColumn" + r.id).classed("property-input custom-editor-input addColumn update", !0).text("AddColumn").on("click", function() {
|
|
2578
|
+
t.groupCount += 1, e.setProperty(t, r.id, "Added a new column");
|
|
2579
|
+
});
|
|
2580
|
+
}
|
|
2581
|
+
}), Opportunity.prototype.publish("removeColumn", null, "string", "number of columns in a table", function() {
|
|
2582
|
+
return this.columns();
|
|
2583
|
+
}, {
|
|
2584
|
+
tags: ["Basic", "Shared"],
|
|
2585
|
+
editor_input: (e, t, n, r) => {
|
|
2586
|
+
n.append("button").attr("id", e.id() + "_removeColumn" + r.id).classed("property-input custom-editor-input removeColumn update", !0).text("RemoveColumn").on("click", function() {
|
|
2587
|
+
--t.groupCount, e.setProperty(t, r.id, "Removed a column");
|
|
2588
|
+
});
|
|
2589
|
+
}
|
|
2590
|
+
}), Opportunity.prototype.publish("headerLabels", [], "propertyArray", "Source Columns", null, { autoExpand: Column }), Opportunity.prototype.publish("mouseHover", [], "propertyArray", "mouse hover options", null, { autoExpand: MouseHoverColumn }), Opportunity.prototype.publish("columnData", [], "propertyArray", "column data", null, { autoExpand: ColumnDropdown });
|
|
2591
|
+
//#endregion
|
|
2592
|
+
//#region src/Persist.ts
|
|
2593
|
+
var he = /* @__PURE__ */ __exportAll({
|
|
2594
|
+
applyTheme: () => applyTheme,
|
|
2595
|
+
discover: () => discover,
|
|
2596
|
+
removeTheme: () => removeTheme,
|
|
2597
|
+
serialize: () => serialize,
|
|
2598
|
+
serializeTheme: () => serializeTheme,
|
|
2599
|
+
serializeThemeToObject: () => serializeThemeToObject,
|
|
2600
|
+
serializeToObject: () => serializeToObject,
|
|
2601
|
+
widgetArrayWalker: () => widgetArrayWalker,
|
|
2602
|
+
widgetPropertyWalker: () => widgetPropertyWalker
|
|
2603
|
+
});
|
|
2604
|
+
function discover(e) {
|
|
2605
|
+
return e.publishedProperties(!1, !0);
|
|
2606
|
+
}
|
|
2607
|
+
function widgetArrayWalker(e, t) {
|
|
2608
|
+
e && e.forEach(function(e) {
|
|
2609
|
+
e.widgetWalker(t);
|
|
2610
|
+
});
|
|
2611
|
+
}
|
|
2612
|
+
function widgetPropertyWalker(e, t, n) {
|
|
2613
|
+
e.widgetWalker(function(e) {
|
|
2614
|
+
e.propertyWalker(t, n);
|
|
2615
|
+
});
|
|
2616
|
+
}
|
|
2617
|
+
function serializeTheme(e, t) {
|
|
2618
|
+
return JSON.stringify(serializeThemeToObject(e, t));
|
|
2619
|
+
}
|
|
2620
|
+
function serializeThemeToObject(e, t) {
|
|
2621
|
+
t ||= [
|
|
2622
|
+
"surface",
|
|
2623
|
+
"Color",
|
|
2624
|
+
"Font",
|
|
2625
|
+
"palette"
|
|
2626
|
+
];
|
|
2627
|
+
let n = {};
|
|
2628
|
+
widgetPropertyWalker(e, null, function(e, r) {
|
|
2629
|
+
if ((e[r.id + "_modified"]() || e.publishedProperty(r.id).origDefaultValue !== e.publishedProperty(r.id).defaultValue) && _isFilterMatch(r.id, t)) {
|
|
2630
|
+
let t = e._class.trim().split(" ");
|
|
2631
|
+
for (let i in t) if (t.HasOwnProperty(i)) {
|
|
2632
|
+
if (n[t[i]] === void 0 && (n[t[i]] = {}), n[t[i]][r.id] === void 0) {
|
|
2633
|
+
n[t[i]][r.id] = e[r.id]();
|
|
2634
|
+
break;
|
|
2635
|
+
} else if (n[t[i]][r.id] === e[r.id]()) break;
|
|
2636
|
+
}
|
|
2637
|
+
}
|
|
2638
|
+
});
|
|
2639
|
+
function _isFilterMatch(e, t) {
|
|
2640
|
+
let n = !1;
|
|
2641
|
+
for (let r in t) if (e.indexOf(t[r]) !== -1) {
|
|
2642
|
+
n = !0;
|
|
2643
|
+
break;
|
|
2644
|
+
}
|
|
2645
|
+
return n;
|
|
2646
|
+
}
|
|
2647
|
+
return n;
|
|
2648
|
+
}
|
|
2649
|
+
function removeTheme(e, t) {
|
|
2650
|
+
widgetPropertyWalker(e, null, function(e, t) {
|
|
2651
|
+
e.publishedProperty(t.id).defaultValue = e.publishedProperty(t.id).origDefaultValue;
|
|
2652
|
+
}), typeof t == "function" && t.call(this);
|
|
2653
|
+
}
|
|
2654
|
+
function applyTheme(e, t, n) {
|
|
2655
|
+
let r = this;
|
|
2656
|
+
widgetPropertyWalker(e, null, function(e, n) {
|
|
2657
|
+
switch (n.type) {
|
|
2658
|
+
case "widget": return r.applyTheme(e[n.id](), t), !0;
|
|
2659
|
+
case "widgetArray": return e[n.id]().forEach(function(e) {
|
|
2660
|
+
r.applyTheme(e, t);
|
|
2661
|
+
}, this), !0;
|
|
2662
|
+
default:
|
|
2663
|
+
e.applyTheme(t);
|
|
2664
|
+
break;
|
|
2665
|
+
}
|
|
2666
|
+
}), typeof n == "function" && n.call(this);
|
|
2667
|
+
}
|
|
2668
|
+
function serializeToObject(e, t, n, r) {
|
|
2669
|
+
let i = { __class: e.classID() };
|
|
2670
|
+
if (e._id.indexOf(e._idSeed) !== 0 && (i.__id = e._id), e.version && (i.__version = e.version()), i.__properties = {}, e.propertyWalker((t, a) => {
|
|
2671
|
+
if (t[a.id + "_modified"]()) switch (a.type) {
|
|
2672
|
+
case "widget": return i.__properties[a.id] = serializeToObject(t[a.id](), null, n, r && !e.serializeState), !0;
|
|
2673
|
+
case "widgetArray":
|
|
2674
|
+
case "propertyArray": return i.__properties[a.id] = [], t[a.id]().forEach((t) => {
|
|
2675
|
+
i.__properties[a.id].push(serializeToObject(t, null, n, r && !e.serializeState));
|
|
2676
|
+
}), !0;
|
|
2677
|
+
default:
|
|
2678
|
+
i.__properties[a.id] = t[a.id]();
|
|
2679
|
+
break;
|
|
2680
|
+
}
|
|
2681
|
+
}, t), e.classID() === "marshaller_Graph") {
|
|
2682
|
+
let t = e.data().vertices;
|
|
2683
|
+
t && (this.__vertices = t.map((t) => serializeToObject(t, null, n, r && !e.serializeState)));
|
|
2684
|
+
}
|
|
2685
|
+
return n && e.data && (i.__data ||= {}, i.__data.data = e.data()), r && (e.serializeState ? i.__state = e.serializeState() : e.data && (i.__state = { data: e.data() })), i;
|
|
2686
|
+
}
|
|
2687
|
+
function serialize(e, t, n, r) {
|
|
2688
|
+
return JSON.stringify(serializeToObject(e, t, n, r));
|
|
2689
|
+
}
|
|
2690
|
+
//#endregion
|
|
2691
|
+
//#region src/PropertyEditor.ts
|
|
2692
|
+
function hasProperties(e) {
|
|
2693
|
+
switch (e) {
|
|
2694
|
+
case "widget":
|
|
2695
|
+
case "widgetArray":
|
|
2696
|
+
case "propertyArray": return !0;
|
|
2697
|
+
default:
|
|
2698
|
+
}
|
|
2699
|
+
return !1;
|
|
2700
|
+
}
|
|
2701
|
+
var $ = class PropertyEditor extends n {
|
|
2702
|
+
_widgetOrig;
|
|
2703
|
+
_parentPropertyEditor;
|
|
2704
|
+
_show_settings;
|
|
2705
|
+
_selectedItems;
|
|
2706
|
+
__meta_sorting;
|
|
2707
|
+
_watch;
|
|
2708
|
+
_childPE = f();
|
|
2709
|
+
constructor() {
|
|
2710
|
+
super(), this._parentPropertyEditor = null, this._tag = "div", this._show_settings = !1;
|
|
2711
|
+
}
|
|
2712
|
+
parentPropertyEditor(e) {
|
|
2713
|
+
return arguments.length ? (this._parentPropertyEditor = e, this) : this._parentPropertyEditor;
|
|
2714
|
+
}
|
|
2715
|
+
depth() {
|
|
2716
|
+
let e = 0, t = this.parentPropertyEditor();
|
|
2717
|
+
for (; t;) ++e, t = t.parentPropertyEditor();
|
|
2718
|
+
return e;
|
|
2719
|
+
}
|
|
2720
|
+
_show_header = !0;
|
|
2721
|
+
show_header(e) {
|
|
2722
|
+
return arguments.length ? (this._show_header = e, this) : this._show_header;
|
|
2723
|
+
}
|
|
2724
|
+
show_settings(e) {
|
|
2725
|
+
return arguments.length ? (this._show_settings = e, this) : this._show_settings;
|
|
2726
|
+
}
|
|
2727
|
+
rootWidgets() {
|
|
2728
|
+
return this._selectedItems && this._selectedItems.length ? this._selectedItems : this.show_settings() ? [this] : this.widget() ? [this.widget()] : [];
|
|
2729
|
+
}
|
|
2730
|
+
update(e, t) {
|
|
2731
|
+
super.update(e, t);
|
|
2732
|
+
let n = this, r = this.rootWidgets().filter(function(e) {
|
|
2733
|
+
return !(e._owningWidget && e._owningWidget.excludeObjs instanceof Array && e._owningWidget.excludeObjs.indexOf(e.classID()) !== -1);
|
|
2734
|
+
}), i = t.selectAll(`table.property-table.table-${this.depth()}`).data(r, function(e) {
|
|
2735
|
+
return typeof e.id == "function" ? e.id() : `meta-${e.id}`;
|
|
2736
|
+
});
|
|
2737
|
+
i.enter().append("table").attr("class", `property-table table-${this.depth()}`).each(function() {
|
|
2738
|
+
let e = h(this);
|
|
2739
|
+
n._show_header && n.parentPropertyEditor() === null && e.append("thead").append("tr").append("th").attr("colspan", "2").each(function() {
|
|
2740
|
+
n.enterHeader(h(this));
|
|
2741
|
+
}), e.append("tbody");
|
|
2742
|
+
}).merge(i).each(function(e) {
|
|
2743
|
+
let t = h(this);
|
|
2744
|
+
n._show_header && n.parentPropertyEditor() === null && n.updateHeader(t.select("thead > tr > th")), n.renderInputs(t.select("tbody"), e);
|
|
2745
|
+
}), i.exit().each(function() {
|
|
2746
|
+
n.renderInputs(t.select("tbody"), null);
|
|
2747
|
+
}).remove();
|
|
2748
|
+
}
|
|
2749
|
+
exit(e, t) {
|
|
2750
|
+
super.exit(e, t), this.watchWidget(null);
|
|
2751
|
+
}
|
|
2752
|
+
watchDepth = 0;
|
|
2753
|
+
watchWidget(e) {
|
|
2754
|
+
if (this._watch && (window.__hpcc_debug && (--this.watchDepth, console.info("watchDepth: " + this.watchDepth)), this._watch.remove(), delete this._watch), e) {
|
|
2755
|
+
let t = this;
|
|
2756
|
+
this._watch = e.monitor(function(e, n, r) {
|
|
2757
|
+
r !== n && (t.parentPropertyEditor() || t).lazyRender();
|
|
2758
|
+
}), window.__hpcc_debug && (++this.watchDepth, console.info("watchDepth: " + this.watchDepth));
|
|
2759
|
+
}
|
|
2760
|
+
}
|
|
2761
|
+
enterHeader(e) {
|
|
2762
|
+
let t = this;
|
|
2763
|
+
e.append("span"), e.append("i").attr("class", "expandIcon fa").on("click", function() {
|
|
2764
|
+
switch (t.peInputIcon()) {
|
|
2765
|
+
case "fa-caret-up":
|
|
2766
|
+
case "fa-caret-right":
|
|
2767
|
+
t.element().selectAll(`.table-${t.depth()} > tbody > tr > .headerRow > .peInput > .property-table-collapsed`).classed("property-table-collapsed", !1), t.element().selectAll(`.table-${t.depth()} > tbody > tr > .headerRow > .peInput > i`).classed("fa-minus-square-o", !0).classed("fa-plus-square-o", !1);
|
|
2768
|
+
break;
|
|
2769
|
+
case "fa-caret-down":
|
|
2770
|
+
t.element().selectAll(`.table-${t.depth()} > tbody > tr > .headerRow > .peInput > div`).classed("property-table-collapsed", !0), t.element().selectAll(`.table-${t.depth()} > tbody > tr > .headerRow > .peInput > i`).classed("fa-minus-square-o", !1).classed("fa-plus-square-o", !0);
|
|
2771
|
+
break;
|
|
2772
|
+
}
|
|
2773
|
+
t.refreshExpandIcon();
|
|
2774
|
+
});
|
|
2775
|
+
let n = e.append("i").attr("class", "sortIcon fa").on("click", function() {
|
|
2776
|
+
t.refreshSortIcon(n, !0);
|
|
2777
|
+
});
|
|
2778
|
+
e.append("i").attr("class", "hideParamsIcon fa").on("click", function() {
|
|
2779
|
+
t.hideNonWidgets(!t.hideNonWidgets()).render();
|
|
2780
|
+
});
|
|
2781
|
+
}
|
|
2782
|
+
updateHeader(e) {
|
|
2783
|
+
let t = this.widget(), n = "";
|
|
2784
|
+
t && (t.label && (n += t.label()), t.classID && (n && (n += " - "), n += t.classID())), e.select("span").text(n), this.refreshExpandIcon(), this.refreshSortIcon(e.select(".sortIcon")), this.refreshHideParamsIcon(e.select(".hideParamsIcon"));
|
|
2785
|
+
}
|
|
2786
|
+
peInputCount() {
|
|
2787
|
+
return this.element().selectAll(`.table-${this.depth()} > tbody > tr > .headerRow > .peInput > div`).size();
|
|
2788
|
+
}
|
|
2789
|
+
peInputCollapsedCount() {
|
|
2790
|
+
return this.element().selectAll(`.table-${this.depth()} > tbody > tr > .headerRow > .peInput > div.property-table-collapsed`).size();
|
|
2791
|
+
}
|
|
2792
|
+
peInputIcon() {
|
|
2793
|
+
let e = this.peInputCollapsedCount();
|
|
2794
|
+
return e === 0 ? "fa-caret-down" : e === this.peInputCount() ? "fa-caret-up" : "fa-caret-right";
|
|
2795
|
+
}
|
|
2796
|
+
refreshExpandIcon() {
|
|
2797
|
+
let e = this.peInputIcon();
|
|
2798
|
+
this.element().select(`.table-${this.depth()} > thead > tr > th > .expandIcon`).classed("fa-caret-up", !1).classed("fa-caret-right", !1).classed("fa-caret-down", !1).classed(e, !0);
|
|
2799
|
+
}
|
|
2800
|
+
refreshSortIcon(e, t = !1) {
|
|
2801
|
+
let n = this.sorting(), r = this.sorting_options(), i = this.__meta_sorting.ext.icons;
|
|
2802
|
+
t ? (e.classed(i[r.indexOf(n)], !1), this.sorting(r[(r.indexOf(n) + 1) % r.length]).render()) : e.classed(i[r.indexOf(n) % r.length], !0).attr("title", n);
|
|
2803
|
+
}
|
|
2804
|
+
refreshHideParamsIcon(e) {
|
|
2805
|
+
e.classed("fa-eye", !this.hideNonWidgets()).classed("fa-eye-slash", this.hideNonWidgets());
|
|
2806
|
+
}
|
|
2807
|
+
gatherDataTree(e) {
|
|
2808
|
+
if (!e) return null;
|
|
2809
|
+
let t = {
|
|
2810
|
+
label: e.id() + " (" + e.classID() + ")",
|
|
2811
|
+
children: []
|
|
2812
|
+
};
|
|
2813
|
+
return discover(e).forEach(function(n) {
|
|
2814
|
+
let r = {
|
|
2815
|
+
label: n.id,
|
|
2816
|
+
children: []
|
|
2817
|
+
};
|
|
2818
|
+
switch (n.type) {
|
|
2819
|
+
case "widget":
|
|
2820
|
+
r.children.push(this.gatherDataTree(e[n.id]()));
|
|
2821
|
+
break;
|
|
2822
|
+
case "widgetArray":
|
|
2823
|
+
case "propertyArray":
|
|
2824
|
+
let t = e[n.id]();
|
|
2825
|
+
t && t.forEach(function(e) {
|
|
2826
|
+
r.children.push(this.gatherDataTree(e));
|
|
2827
|
+
}, this);
|
|
2828
|
+
break;
|
|
2829
|
+
default:
|
|
2830
|
+
}
|
|
2831
|
+
t.children.push(r);
|
|
2832
|
+
}, this), t;
|
|
2833
|
+
}
|
|
2834
|
+
getDataTree() {
|
|
2835
|
+
return this.gatherDataTree(this.widget());
|
|
2836
|
+
}
|
|
2837
|
+
_rowSorting(e) {
|
|
2838
|
+
if (this.sorting() === "type") {
|
|
2839
|
+
let t = [
|
|
2840
|
+
"boolean",
|
|
2841
|
+
"number",
|
|
2842
|
+
"string",
|
|
2843
|
+
"html-color",
|
|
2844
|
+
"array",
|
|
2845
|
+
"object",
|
|
2846
|
+
"widget",
|
|
2847
|
+
"widgetArray",
|
|
2848
|
+
"propertyArray"
|
|
2849
|
+
];
|
|
2850
|
+
e.sort(function(e, n) {
|
|
2851
|
+
return e.type === n.type ? e.id < n.id ? -1 : 1 : t.indexOf(e.type) < t.indexOf(n.type) ? -1 : 1;
|
|
2852
|
+
});
|
|
2853
|
+
} else this.sorting() === "A-Z" ? e.sort(function(e, t) {
|
|
2854
|
+
return e.id < t.id ? -1 : 1;
|
|
2855
|
+
}) : this.sorting() === "Z-A" && e.sort(function(e, t) {
|
|
2856
|
+
return e.id > t.id ? -1 : 1;
|
|
2857
|
+
});
|
|
2858
|
+
}
|
|
2859
|
+
filterInputs(e) {
|
|
2860
|
+
let t = discover(e);
|
|
2861
|
+
if ((this.filterTags() || this.excludeTags().length > 0 || this.excludeParams.length > 0) && !(e instanceof PropertyEditor)) {
|
|
2862
|
+
let n = this;
|
|
2863
|
+
return t.filter(function(t, r) {
|
|
2864
|
+
if (e[t.id + "_hidden"] && e[t.id + "_hidden"]()) return !1;
|
|
2865
|
+
for (let r of n.excludeParams()) {
|
|
2866
|
+
let n = r.split("."), i, a;
|
|
2867
|
+
if (n.length > 2 ? (i = n[0], a = n[2]) : (i = n[0], a = n[1]), e.class().indexOf(i) !== -1) return t.id !== a;
|
|
2868
|
+
}
|
|
2869
|
+
return n.excludeTags().length > 0 && t.ext && t.ext.tags && t.ext.tags.some(function(e) {
|
|
2870
|
+
return n.excludeTags().indexOf(e) > -1;
|
|
2871
|
+
}) ? !1 : !!(n.filterTags() && t.ext && t.ext.tags && t.ext.tags.indexOf(n.filterTags()) !== -1 || !n.filterTags());
|
|
2872
|
+
});
|
|
2873
|
+
}
|
|
2874
|
+
return t;
|
|
2875
|
+
}
|
|
2876
|
+
renderInputs(e, t) {
|
|
2877
|
+
let n = this, r = [], i = !this.show_settings() && this.showFields();
|
|
2878
|
+
t && (r = this.filterInputs(t).filter(function(e) {
|
|
2879
|
+
return e.id === "fields" ? i : !0;
|
|
2880
|
+
}), !this.show_settings() && this.showData() && t.data && r.push({
|
|
2881
|
+
id: "data",
|
|
2882
|
+
type: "array"
|
|
2883
|
+
}), this.hideNonWidgets() && (r = r.filter(function(e) {
|
|
2884
|
+
return hasProperties(e.type);
|
|
2885
|
+
})), this._rowSorting(r));
|
|
2886
|
+
let a = e.selectAll("tr.prop" + this.id()).data(r, function(e) {
|
|
2887
|
+
return e.id;
|
|
2888
|
+
});
|
|
2889
|
+
a.enter().append("tr").attr("class", "property-wrapper prop" + this.id()).each(function(e) {
|
|
2890
|
+
let r = h(this);
|
|
2891
|
+
if (hasProperties(e.type)) r.classed("property-widget-wrapper", !0), r.append("td").attr("colspan", "2");
|
|
2892
|
+
else {
|
|
2893
|
+
r.classed("property-input-wrapper", !0), r.append("td").classed("property-label", !0).text(e.id);
|
|
2894
|
+
let i = r.append("td").classed("property-input-cell", !0);
|
|
2895
|
+
n.enterInputs(t, i, e);
|
|
2896
|
+
}
|
|
2897
|
+
}).merge(a).each(function(e) {
|
|
2898
|
+
let r = h(this);
|
|
2899
|
+
r.classed("disabled", t[e.id + "_disabled"] && t[e.id + "_disabled"]()), r.classed("invalid", t[e.id + "_valid"] && !t[e.id + "_valid"]()), r.attr("title", e.description), hasProperties(e.type) ? n.updateWidgetRow(t, r.select("td"), e) : n.updateInputs(t, e);
|
|
2900
|
+
}), a.exit().each(function(e) {
|
|
2901
|
+
let r = h(this);
|
|
2902
|
+
hasProperties(e.type) && n.updateWidgetRow(t, r.select("td"), null);
|
|
2903
|
+
}).remove(), a.order();
|
|
2904
|
+
}
|
|
2905
|
+
updateWidgetRow(e, t, n) {
|
|
2906
|
+
let r = [];
|
|
2907
|
+
e && n && (r = e[n.id]() || []);
|
|
2908
|
+
let i = r instanceof Array ? r : [r];
|
|
2909
|
+
if (n && n.ext && n.ext.autoExpand) {
|
|
2910
|
+
let t = !0, r = i.filter(function(n, r) {
|
|
2911
|
+
return t = n.valid(), n._owner = e, t || r === i.length - 1;
|
|
2912
|
+
}, this), a = e[n.id + "_disabled"] && e[n.id + "_disabled"](), o = !!(i.length - r.length);
|
|
2913
|
+
if (t && !a) {
|
|
2914
|
+
o = !0;
|
|
2915
|
+
let t = new n.ext.autoExpand().owner(e);
|
|
2916
|
+
r.push(t);
|
|
2917
|
+
}
|
|
2918
|
+
o && (e[n.id](r), i = r);
|
|
2919
|
+
}
|
|
2920
|
+
let a = this;
|
|
2921
|
+
t.classed("headerRow", !0);
|
|
2922
|
+
let o = t.selectAll(`div.peInput-${this.depth()}`).data(i, function(e) {
|
|
2923
|
+
return e.id();
|
|
2924
|
+
});
|
|
2925
|
+
o.enter().append("div").attr("class", `peInput peInput-${this.depth()}`).each(function(e) {
|
|
2926
|
+
let t = h(this);
|
|
2927
|
+
t.append("span"), t.append("i").attr("class", "fa").on("click", function(e) {
|
|
2928
|
+
let n = t.select("div");
|
|
2929
|
+
n.classed("property-table-collapsed", !n.classed("property-table-collapsed")), h(this).classed("fa-minus-square-o", !n.classed("property-table-collapsed")).classed("fa-plus-square-o", n.classed("property-table-collapsed")), a.refreshExpandIcon();
|
|
2930
|
+
});
|
|
2931
|
+
let r = t.append("div");
|
|
2932
|
+
a._childPE.set(this, new PropertyEditor().label(n.id).target(r.node()));
|
|
2933
|
+
}).merge(o).each(function(e) {
|
|
2934
|
+
let t = h(this).select("div");
|
|
2935
|
+
h(this).select("span").text(`${n.id}`), h(this).select("i").classed("fa-minus-square-o", !t.classed("property-table-collapsed")).classed("fa-plus-square-o", t.classed("property-table-collapsed")), a._childPE.get(this).parentPropertyEditor(a).showFields(a.showFields()).showData(a.showData()).sorting(a.sorting()).filterTags(a.filterTags()).excludeTags(a.excludeTags()).excludeParams(a.excludeParams()).hideNonWidgets(a.hideNonWidgets() && e._class.indexOf("layout_") >= 0).widget(e).render();
|
|
2936
|
+
}), o.exit().each(function(e) {
|
|
2937
|
+
a._childPE.get(this).widget(null).render().target(null), a._childPE.remove(this);
|
|
2938
|
+
}).remove();
|
|
2939
|
+
}
|
|
2940
|
+
setProperty(e, t, n) {
|
|
2941
|
+
let r, i, a = this, o;
|
|
2942
|
+
for (; a && e;) {
|
|
2943
|
+
if (a === this && (o = e[t](), e[t](n)), a) {
|
|
2944
|
+
i = a;
|
|
2945
|
+
let e = a.widget();
|
|
2946
|
+
e instanceof c && (r = e);
|
|
2947
|
+
}
|
|
2948
|
+
a = a.parentPropertyEditor();
|
|
2949
|
+
}
|
|
2950
|
+
r && r.render(), i && i.broadcast(t, n, o, e);
|
|
2951
|
+
}
|
|
2952
|
+
enterInputs(e, t, n) {
|
|
2953
|
+
t.classed(n.type + "-cell", !0);
|
|
2954
|
+
let r = this;
|
|
2955
|
+
switch (typeof n.ext.editor_input == "function" && n.ext.editor_input(this, e, t, n), n.type) {
|
|
2956
|
+
case "boolean":
|
|
2957
|
+
t.append("input").attr("id", this.id() + "_" + n.id).classed("property-input", !0).attr("type", "checkbox").on("change", function() {
|
|
2958
|
+
r.setProperty(e, n.id, this.checked);
|
|
2959
|
+
});
|
|
2960
|
+
break;
|
|
2961
|
+
case "set":
|
|
2962
|
+
t.append("select").attr("id", this.id() + "_" + n.id).classed("property-input", !0).on("change", function() {
|
|
2963
|
+
r.setProperty(e, n.id, this.value);
|
|
2964
|
+
});
|
|
2965
|
+
break;
|
|
2966
|
+
case "array":
|
|
2967
|
+
case "object":
|
|
2968
|
+
t.append("textarea").attr("id", this.id() + "_" + n.id).classed("property-input", !0).attr("autocomplete", "off").attr("autocorrect", "off").attr("autocapitalize", "off").attr("spellcheck", "false").on("change", function() {
|
|
2969
|
+
let t;
|
|
2970
|
+
try {
|
|
2971
|
+
t = JSON.parse(this.value);
|
|
2972
|
+
} catch {
|
|
2973
|
+
t = this.value;
|
|
2974
|
+
}
|
|
2975
|
+
r.setProperty(e, n.id, t);
|
|
2976
|
+
});
|
|
2977
|
+
break;
|
|
2978
|
+
default:
|
|
2979
|
+
n.ext && n.ext.range ? (t.append("span").classed("property-input-span", !0).attr("id", this.id() + "_" + n.id + "_currentVal").text(n.defaultValue), t.append("input").attr("type", "range").attr("step", n.ext.range.step).attr("min", n.ext.range.min).attr("max", n.ext.range.max).attr("id", this.id() + "_" + n.id).classed("property-input", !0).on("input", function() {
|
|
2980
|
+
r.setProperty(e, n.id, this.value), h("#" + this.id + "_currentVal").text("Current Value: " + this.value);
|
|
2981
|
+
}).on("change", function() {
|
|
2982
|
+
r.setProperty(e, n.id, this.value), h("#" + this.id + "_currentVal").text("Current Value: " + this.value);
|
|
2983
|
+
})) : (t.append(n.ext && n.ext.multiline ? "textarea" : "input").attr("id", this.id() + "_" + n.id).classed("property-input", !0).attr("autocomplete", "off").attr("autocorrect", "off").attr("autocapitalize", "off").attr("spellcheck", "false").on("change", function() {
|
|
2984
|
+
r.setProperty(e, n.id, this.value);
|
|
2985
|
+
}), n.type === "html-color" && !i.isIE && t.append("input").attr("id", this.id() + "_" + n.id + "_2").classed("property-input", !0).attr("type", "color").on("change", function() {
|
|
2986
|
+
r.setProperty(e, n.id, this.value);
|
|
2987
|
+
}));
|
|
2988
|
+
break;
|
|
2989
|
+
}
|
|
2990
|
+
}
|
|
2991
|
+
updateInputs(e, t) {
|
|
2992
|
+
let n = g("#" + this.id() + "_" + t.id + ", #" + this.id() + "_" + t.id + "_2"), r = e ? e[t.id]() : "";
|
|
2993
|
+
switch (n.property("disabled", e[t.id + "_disabled"] && e[t.id + "_disabled"]()), n.property("invalid", e[t.id + "_valid"] && !e[t.id + "_valid"]()), t.type) {
|
|
2994
|
+
case "boolean":
|
|
2995
|
+
n.property("checked", r);
|
|
2996
|
+
break;
|
|
2997
|
+
case "set":
|
|
2998
|
+
let i = n.selectAll("option").data(e[t.id + "_options"]());
|
|
2999
|
+
i.enter().append("option").merge(i).attr("value", (e) => e && e.value !== void 0 ? e.value : e).text((e) => e && e.text !== void 0 ? e.text : e), i.exit().remove(), n.property("value", r);
|
|
3000
|
+
break;
|
|
3001
|
+
case "array":
|
|
3002
|
+
case "object":
|
|
3003
|
+
n.property("value", JSON.stringify(r, function replacer(e, t) {
|
|
3004
|
+
return t instanceof c ? serialize(t) : t;
|
|
3005
|
+
}, " "));
|
|
3006
|
+
break;
|
|
3007
|
+
default:
|
|
3008
|
+
t.ext && t.ext.range && h("#" + this.id() + "_" + t.id + "_currentVal").text("Current Value: " + r), n.property("value", r && r.length && r.length > 1e5 ? "...too big to display..." : r);
|
|
3009
|
+
break;
|
|
3010
|
+
}
|
|
3011
|
+
}
|
|
3012
|
+
};
|
|
3013
|
+
$.prototype._class += " other_PropertyEditor", $.prototype.publish("showFields", !1, "boolean", "If true, widget.fields() will display as if it was a publish parameter.", null, { tags: ["Basic"] }), $.prototype.publish("showData", !1, "boolean", "If true, widget.data() will display as if it was a publish parameter.", null, { tags: ["Basic"] }), $.prototype.publish("sorting", "none", "set", "Specify the sorting type", [
|
|
3014
|
+
"none",
|
|
3015
|
+
"A-Z",
|
|
3016
|
+
"Z-A",
|
|
3017
|
+
"type"
|
|
3018
|
+
], {
|
|
3019
|
+
tags: ["Basic"],
|
|
3020
|
+
icons: [
|
|
3021
|
+
"fa-sort",
|
|
3022
|
+
"fa-sort-alpha-asc",
|
|
3023
|
+
"fa-sort-alpha-desc",
|
|
3024
|
+
"fa-sort-amount-asc"
|
|
3025
|
+
]
|
|
3026
|
+
}), $.prototype.publish("hideNonWidgets", !1, "boolean", "Hides non-widget params (at this tier only)", null, { tags: ["Basic"] }), $.prototype.publish("label", "", "string", "Label to display in header of property editor table", null, { tags: ["Basic"] }), $.prototype.publish("filterTags", "", "set", "Only show Publish Params of this type", [
|
|
3027
|
+
"Basic",
|
|
3028
|
+
"Intermediate",
|
|
3029
|
+
"Advance",
|
|
3030
|
+
""
|
|
3031
|
+
], {}), $.prototype.publish("excludeTags", ["Private"], "array", "Exclude this array of tags", null, {}), $.prototype.publish("excludeParams", [], "array", "Exclude this array of params (widget.param)", null, {}), $.prototype.publish("widget", null, "widget", "Widget", null, {
|
|
3032
|
+
tags: ["Basic"],
|
|
3033
|
+
render: !1
|
|
3034
|
+
});
|
|
3035
|
+
var ge = $.prototype.widget;
|
|
3036
|
+
$.prototype.widget = function(e) {
|
|
3037
|
+
if (arguments.length && ge.call(this) === e) return this;
|
|
3038
|
+
let t = ge.apply(this, arguments);
|
|
3039
|
+
if (arguments.length && (this.watchWidget(e), e instanceof v)) {
|
|
3040
|
+
let t = this;
|
|
3041
|
+
e.postSelectionChange = function() {
|
|
3042
|
+
t._selectedItems = e._selectionBag.get().map(function(e) {
|
|
3043
|
+
return e.widget;
|
|
3044
|
+
}), t.lazyRender();
|
|
3045
|
+
};
|
|
3046
|
+
}
|
|
3047
|
+
return t;
|
|
3048
|
+
};
|
|
3049
|
+
//#endregion
|
|
3050
|
+
//#region src/RadioCheckbox.ts
|
|
3051
|
+
var RadioCheckbox = class extends n {
|
|
3052
|
+
_span;
|
|
3053
|
+
_label;
|
|
3054
|
+
_Checkbox;
|
|
3055
|
+
constructor() {
|
|
3056
|
+
super();
|
|
3057
|
+
}
|
|
3058
|
+
rcData() {
|
|
3059
|
+
if (this.data().length === 0) return [];
|
|
3060
|
+
let e = this._db.rollupView([this.textColumn(), this.valueColumn()]), t = [];
|
|
3061
|
+
if (t = t.concat(e.entries().map(function(e) {
|
|
3062
|
+
return {
|
|
3063
|
+
text: e.key,
|
|
3064
|
+
value: e.values.length ? e.values[0].key : "",
|
|
3065
|
+
origRow: e.values.length && e.values[0].values.length ? e.values[0].values[0] : []
|
|
3066
|
+
};
|
|
3067
|
+
}, this)), this.sort_exists()) {
|
|
3068
|
+
let e = this.sort() === "descending";
|
|
3069
|
+
t.sort(function(t, n) {
|
|
3070
|
+
return t.text < n.text ? e ? 1 : -1 : t.text > n.text ? e ? -1 : 1 : 0;
|
|
3071
|
+
});
|
|
3072
|
+
}
|
|
3073
|
+
return t;
|
|
3074
|
+
}
|
|
3075
|
+
enter(e, t) {
|
|
3076
|
+
super.enter(e, t), this._span = t.append("span"), this._label = this._span.append("label").attr("for", this.id() + "_radioCheckbox"), this._Checkbox = this._span.append("div").attr("id", this.id() + "_radioCheckbox");
|
|
3077
|
+
}
|
|
3078
|
+
update(e, t) {
|
|
3079
|
+
super.update(e, t);
|
|
3080
|
+
let n = this;
|
|
3081
|
+
this._label.text(this.label());
|
|
3082
|
+
let r = this._Checkbox.selectAll(".dataRow").data(this.rcData());
|
|
3083
|
+
r.enter().append("div").attr("class", "dataRow").each(function(e, t) {
|
|
3084
|
+
let r = h(this), i = n.id() + "_checkbox_" + t;
|
|
3085
|
+
r.append("input").attr("id", i).attr("name", n.id() + "_radioCheckbox").on("change", function(e) {
|
|
3086
|
+
n.handleClick();
|
|
3087
|
+
}), r.append("label").attr("for", i);
|
|
3088
|
+
}), r.each(function(e, t) {
|
|
3089
|
+
let r = h(this);
|
|
3090
|
+
r.select("input").attr("type", n.multiple() ? "checkbox" : "radio").attr("value", e.value), r.select("label").text(e.text);
|
|
3091
|
+
}), r.exit().remove(), r.order();
|
|
3092
|
+
}
|
|
3093
|
+
exit(e, t) {
|
|
3094
|
+
this._span.remove(), super.exit(e, t);
|
|
3095
|
+
}
|
|
3096
|
+
handleClick() {
|
|
3097
|
+
let e = [];
|
|
3098
|
+
this._Checkbox.selectAll(".dataRow > input").each(function(t, n) {
|
|
3099
|
+
h(this).property("checked") && t && t.origRow && e.push(t.origRow);
|
|
3100
|
+
}), e.length ? this.click(this.rowToObj(e[0]), this.valueColumn(), !0) : this.click([], this.valueColumn(), !1);
|
|
3101
|
+
}
|
|
3102
|
+
click(e, t, n) {}
|
|
3103
|
+
};
|
|
3104
|
+
RadioCheckbox.prototype._class += " other_RadioCheckbox", RadioCheckbox.prototype.publish("label", null, "string", "Label for RadioCheckbox"), RadioCheckbox.prototype.publish("valueColumn", null, "set", "RadioCheckbox display value", function() {
|
|
3105
|
+
return this.columns();
|
|
3106
|
+
}, { optional: !0 }), RadioCheckbox.prototype.publish("textColumn", null, "set", "RadioCheckbox value(s)", function() {
|
|
3107
|
+
return this.columns();
|
|
3108
|
+
}, { optional: !0 }), RadioCheckbox.prototype.publish("sort", null, "set", "Sort contents", [
|
|
3109
|
+
"",
|
|
3110
|
+
"ascending",
|
|
3111
|
+
"descending"
|
|
3112
|
+
], { optional: !0 }), RadioCheckbox.prototype.publish("multiple", !1, "boolean", "Multiple selection");
|
|
3113
|
+
//#endregion
|
|
3114
|
+
//#region src/Select.ts
|
|
3115
|
+
var Select = class extends n {
|
|
3116
|
+
_span;
|
|
3117
|
+
_prompt;
|
|
3118
|
+
_select;
|
|
3119
|
+
constructor() {
|
|
3120
|
+
super();
|
|
3121
|
+
}
|
|
3122
|
+
selectData() {
|
|
3123
|
+
if (this.data().length === 0) return [];
|
|
3124
|
+
let e = this._db.rollupView([this.textColumn(), this.valueColumn()]), t = [];
|
|
3125
|
+
if (t = t.concat(e.entries().map(function(e) {
|
|
3126
|
+
return {
|
|
3127
|
+
text: e.key,
|
|
3128
|
+
value: e.values.length ? e.values[0].key : "",
|
|
3129
|
+
origRow: e.values.length && e.values[0].value.length ? e.values[0].value[0] : []
|
|
3130
|
+
};
|
|
3131
|
+
}, this)), this.sort_exists()) {
|
|
3132
|
+
let e = this.sort() === "descending";
|
|
3133
|
+
t.sort(function(t, n) {
|
|
3134
|
+
return t.text < n.text ? e ? 1 : -1 : t.text > n.text ? e ? -1 : 1 : 0;
|
|
3135
|
+
});
|
|
3136
|
+
}
|
|
3137
|
+
return this.optional() && t.unshift({
|
|
3138
|
+
value: "",
|
|
3139
|
+
text: ""
|
|
3140
|
+
}), t;
|
|
3141
|
+
}
|
|
3142
|
+
enter(e, t) {
|
|
3143
|
+
super.enter(e, t), this._span = t.append("span"), this._prompt = this._span.append("label").attr("for", this.id() + "_select");
|
|
3144
|
+
let n = this;
|
|
3145
|
+
this._select = this._span.append("select").attr("id", this.id() + "_select").on("change", function(e) {
|
|
3146
|
+
let t = [], r = n._select.node().options;
|
|
3147
|
+
for (let e = 0; e < r.length; ++e) {
|
|
3148
|
+
let n = r[e];
|
|
3149
|
+
n.selected && t.push(h(n).datum().origRow);
|
|
3150
|
+
}
|
|
3151
|
+
t.length ? n.click(n.rowToObj(t[0]), n.valueColumn(), !0) : n.click([], n.valueColumn(), !1);
|
|
3152
|
+
});
|
|
3153
|
+
}
|
|
3154
|
+
update(e, t) {
|
|
3155
|
+
super.update(e, t), this._prompt.text(this.label()), this._select.attr("multiple", this.multiple() ? this.multiple() : null).attr("size", this.multiple() && this.selectSize() ? this.selectSize() : null);
|
|
3156
|
+
let n = this._select.selectAll(".dataRow").data(this.selectData()), r = n.enter().append("option").attr("class", "dataRow").merge(n).attr("value", function(e) {
|
|
3157
|
+
return e.value;
|
|
3158
|
+
}).text(function(e) {
|
|
3159
|
+
return e.text;
|
|
3160
|
+
});
|
|
3161
|
+
n.exit().remove(), r.order();
|
|
3162
|
+
}
|
|
3163
|
+
exit(e, t) {
|
|
3164
|
+
this._span.remove(), super.exit(e, t);
|
|
3165
|
+
}
|
|
3166
|
+
click(e, t, n) {}
|
|
3167
|
+
};
|
|
3168
|
+
Select.prototype._class += " other_Select", Select.prototype.publish("label", null, "string", "Label for select"), Select.prototype.publish("valueColumn", null, "set", "Select display value", function() {
|
|
3169
|
+
return this.columns();
|
|
3170
|
+
}, { optional: !0 }), Select.prototype.publish("textColumn", null, "set", "Select value(s)", function() {
|
|
3171
|
+
return this.columns();
|
|
3172
|
+
}, { optional: !0 }), Select.prototype.publish("optional", !0, "boolean", "Optional Select"), Select.prototype.publish("sort", null, "set", "Sort contents", [
|
|
3173
|
+
"",
|
|
3174
|
+
"ascending",
|
|
3175
|
+
"descending"
|
|
3176
|
+
], { optional: !0 }), Select.prototype.publish("multiple", !1, "boolean", "Multiple selection"), Select.prototype.publish("selectSize", 5, "number", "Size of multiselect box", null, { disable: (e) => !e.multiple() });
|
|
3177
|
+
//#endregion
|
|
3178
|
+
//#region src/ThemeEditor.ts
|
|
3179
|
+
function hasLocalStorage() {
|
|
3180
|
+
let e = "@hpcc-js/other";
|
|
3181
|
+
try {
|
|
3182
|
+
return localStorage.setItem(e, e), localStorage.removeItem(e), !0;
|
|
3183
|
+
} catch {
|
|
3184
|
+
return !1;
|
|
3185
|
+
}
|
|
3186
|
+
}
|
|
3187
|
+
var _e = hasLocalStorage() ? localStorage : { getItem(e) {} }, getThemes = function(e) {
|
|
3188
|
+
return typeof window.g_defaultThemes == "function" && window.g_defaultThemes(e), JSON.parse(_e.getItem("themeEditorThemes") || "{}");
|
|
3189
|
+
}, getSerials = function(e) {
|
|
3190
|
+
return typeof window.g_defaultSerials == "function" && window.g_defaultSerials(e), JSON.parse(_e.getItem("themeEditorSerials") || "{}");
|
|
3191
|
+
}, getThemeNames = function(e) {
|
|
3192
|
+
let t = getThemes(), n = [];
|
|
3193
|
+
for (let e in t) n.push(e);
|
|
3194
|
+
return e !== void 0 && n[e] !== void 0 && (n = n[e]), n;
|
|
3195
|
+
}, getSerialNames = function(e) {
|
|
3196
|
+
let t = getSerials(), n = [];
|
|
3197
|
+
for (let e in t) n.push(e);
|
|
3198
|
+
return e !== void 0 && n[e] !== void 0 && (n = n[e]), n;
|
|
3199
|
+
}, tableNeedsRedraw = function(e) {
|
|
3200
|
+
let t = !1;
|
|
3201
|
+
return e._current_grouping === void 0 ? e._current_grouping = e._group_params_by : e._current_grouping !== e._group_params_by && (t = !0), e._showing_columns === void 0 ? e._showing_columns = e.showColumns() : e._showing_columns !== e.showColumns() && (t = !0), e._showing_data === void 0 ? e._showing_data = e.showData() : e._showing_data !== e.showData() && (t = !0), t;
|
|
3202
|
+
}, camelizeString = function(e) {
|
|
3203
|
+
return e.split(/(?=[0-9A-Z])/).map(function(e) {
|
|
3204
|
+
return e.length > 1 ? e + " " : e;
|
|
3205
|
+
}).join("").replace(/(?:^|\s)\S/g, function(e) {
|
|
3206
|
+
return e.toUpperCase();
|
|
3207
|
+
});
|
|
3208
|
+
}, tableInputHtml = function(e, t, n, r) {
|
|
3209
|
+
let i = "", a = "te-input-" + e.id + "-" + r, o;
|
|
3210
|
+
e.ext !== void 0 && e.ext.inputType !== void 0 && (o = e.ext.inputType), e.inputID !== void 0 && (a = e.inputID);
|
|
3211
|
+
let s = "data-paramid='" + e.id + "' data-wids='" + n.map(function(e) {
|
|
3212
|
+
return typeof e.widget == "object" ? e.widget._id : e;
|
|
3213
|
+
}).join(",") + "'";
|
|
3214
|
+
switch (e.type) {
|
|
3215
|
+
case "boolean":
|
|
3216
|
+
let n = t ? " checked" : "";
|
|
3217
|
+
i = "<input id='" + a + "' " + s + " type='checkbox' class='te-checkbox te-input'" + n + ">";
|
|
3218
|
+
break;
|
|
3219
|
+
case "number":
|
|
3220
|
+
o === void 0 ? i = "<input id='" + a + "' type='text' class='te-text te-input' " + s + " value='" + t + "'>" : o === "textarea" ? i = "<textarea id='" + a + "' class='te-textarea te-input' " + s + ">" + t + "</textarea>" : o === "range" && (i = "<input id='" + a + "' class='te-input' type='range' " + s + " value='" + t + "' min='" + e.ext.min + "' max='" + e.ext.max + "' step='" + e.ext.step + "'>");
|
|
3221
|
+
break;
|
|
3222
|
+
case "string":
|
|
3223
|
+
o === void 0 ? i = "<input id='" + a + "' type='text' class='te-text te-input' value='" + t + "' " + s + ">" : o === "textarea" && (i = "<textarea id='" + a + "' class='te-textarea te-input' " + s + ">" + t + "</textarea>");
|
|
3224
|
+
break;
|
|
3225
|
+
case "html-color":
|
|
3226
|
+
let r = t === "" ? "" : " value='" + t + "'";
|
|
3227
|
+
i = "<input id='" + a + "' type='text' class='te-html-color-input te-input' " + s + " " + r + ">", i += "<input type='color' class='te-html-color-button te-input' " + s + " " + r + ">";
|
|
3228
|
+
break;
|
|
3229
|
+
case "set":
|
|
3230
|
+
let c = _options(e, t);
|
|
3231
|
+
i = "<select id='" + a + "' class='te-select te-input'" + s + ">" + c + "</select>";
|
|
3232
|
+
break;
|
|
3233
|
+
case "array":
|
|
3234
|
+
i = "<textarea id='" + a + "' class='te-textarea te-input' data-type='array' " + s + ">" + t + "</textarea>";
|
|
3235
|
+
break;
|
|
3236
|
+
default: break;
|
|
3237
|
+
}
|
|
3238
|
+
return e.ext.saveButton !== void 0 && (i += "<button id='" + e.ext.saveButtonID + "'>" + e.ext.saveButton + "</button>"), i;
|
|
3239
|
+
function _options(e, t) {
|
|
3240
|
+
let n = "";
|
|
3241
|
+
return e.set.forEach(function(e) {
|
|
3242
|
+
let r = e === t ? " selected" : "";
|
|
3243
|
+
n += "<option value='" + e + "'" + r + ">" + e + "</option>";
|
|
3244
|
+
}), n;
|
|
3245
|
+
}
|
|
3246
|
+
}, ThemeEditor = class extends n {
|
|
3247
|
+
_current_grouping;
|
|
3248
|
+
_showing_columns;
|
|
3249
|
+
_showing_data;
|
|
3250
|
+
_contentEditors;
|
|
3251
|
+
_showSettings;
|
|
3252
|
+
_defaultThemes;
|
|
3253
|
+
_widgetObjsById;
|
|
3254
|
+
_sharedProperties;
|
|
3255
|
+
getThemes;
|
|
3256
|
+
getSerials;
|
|
3257
|
+
getDefaultThemes;
|
|
3258
|
+
getDefaultSerials;
|
|
3259
|
+
constructor() {
|
|
3260
|
+
super(), this._tag = "div", this._current_grouping = void 0, this._showing_columns = void 0, this._showing_data = void 0, this.columns(["Key", "Value"]), this._contentEditors = [], this._showSettings = !0, this._defaultThemes = [], this._widgetObjsById = {};
|
|
3261
|
+
}
|
|
3262
|
+
showSettings(e) {
|
|
3263
|
+
return arguments.length ? (this._showSettings = e, this) : this._showSettings;
|
|
3264
|
+
}
|
|
3265
|
+
onChange(e, t) {}
|
|
3266
|
+
enter(e, t) {
|
|
3267
|
+
super.enter(e, t), this._placeholderElement.style("overflow", "auto");
|
|
3268
|
+
}
|
|
3269
|
+
widgetProperty(e, t, n) {
|
|
3270
|
+
return n === void 0 ? e[t]() : e[t](n);
|
|
3271
|
+
}
|
|
3272
|
+
load(e) {}
|
|
3273
|
+
save(e) {}
|
|
3274
|
+
needsPropTableRedraw() {
|
|
3275
|
+
return document.getElementById("te-themeEditorOptions") === null;
|
|
3276
|
+
}
|
|
3277
|
+
update(e, t) {
|
|
3278
|
+
if (super.update(e, t), tableNeedsRedraw(this) && t.selectAll("#" + this._id + " > table").remove(), this._current_grouping = this.paramGrouping(), this._widgetObjsById[this._id] = this, this._sharedProperties = this.findSharedProperties(this.data()), this.needsPropTableRedraw() && this.showSettings()) {
|
|
3279
|
+
let t = discover(this);
|
|
3280
|
+
for (let e in t) if (t[e].ext.tags.indexOf(this.editorComplexity()) !== -1) {
|
|
3281
|
+
let n = this[t[e].id]();
|
|
3282
|
+
(t[e].id === "loadedTheme" || t[e].id === "loadedSerial") && (t[e].inputID = "te-load-theme"), t[e].input = tableInputHtml(t[e], n, [this._id], this._id);
|
|
3283
|
+
} else delete t[e];
|
|
3284
|
+
e.innerHTML = this.propertiesTableHtml(t);
|
|
3285
|
+
let n = document.createEvent("Events");
|
|
3286
|
+
n.initEvent("TE Properties Ready", !0, !0), document.dispatchEvent(n);
|
|
3287
|
+
}
|
|
3288
|
+
this.buildTableObjects(e, this._sharedProperties), this.initFunctionality(e);
|
|
3289
|
+
}
|
|
3290
|
+
exit(e, t) {
|
|
3291
|
+
super.exit(e, t);
|
|
3292
|
+
}
|
|
3293
|
+
click(e) {}
|
|
3294
|
+
propertiesTableHtml(e) {
|
|
3295
|
+
let t = {
|
|
3296
|
+
id: "te-themeEditorOptions",
|
|
3297
|
+
label: "Editor Options",
|
|
3298
|
+
rowArr: []
|
|
3299
|
+
}, n = {
|
|
3300
|
+
id: "te-tableModeOptions",
|
|
3301
|
+
label: this.themeMode() ? "Save/Load Theme" : "Save/Load Serial",
|
|
3302
|
+
rowArr: []
|
|
3303
|
+
};
|
|
3304
|
+
for (let r in e) this.themeMode() ? e[r].ext.tags.indexOf("Theme") === -1 && e[r].ext.tags.indexOf("Serial") === -1 ? t.rowArr.push({
|
|
3305
|
+
th: camelizeString(e[r].id),
|
|
3306
|
+
td: e[r].input,
|
|
3307
|
+
trClass: "propertyRow"
|
|
3308
|
+
}) : e[r].ext.tags.indexOf("Theme") !== -1 && n.rowArr.push({
|
|
3309
|
+
th: camelizeString(e[r].id),
|
|
3310
|
+
td: e[r].input,
|
|
3311
|
+
trClass: "propertyRow"
|
|
3312
|
+
}) : e[r].ext.tags.indexOf("Serial") === -1 && e[r].ext.tags.indexOf("Theme") === -1 ? t.rowArr.push({
|
|
3313
|
+
th: camelizeString(e[r].id),
|
|
3314
|
+
td: e[r].input,
|
|
3315
|
+
trClass: "propertyRow"
|
|
3316
|
+
}) : e[r].ext.tags.indexOf("Serial") !== -1 && n.rowArr.push({
|
|
3317
|
+
th: camelizeString(e[r].id),
|
|
3318
|
+
td: e[r].input,
|
|
3319
|
+
trClass: "propertyRow"
|
|
3320
|
+
});
|
|
3321
|
+
let r = "";
|
|
3322
|
+
return t.rowArr.length > 0 && (r += this.tableObjHtml(t)), n.rowArr.length > 0 && (r += this.tableObjHtml(n)), r;
|
|
3323
|
+
}
|
|
3324
|
+
buildTableObjects(e, t) {
|
|
3325
|
+
let n;
|
|
3326
|
+
n = this.themeMode() ? {
|
|
3327
|
+
chartColorSection: {
|
|
3328
|
+
id: "te-colorOptions",
|
|
3329
|
+
label: "Chart Colors",
|
|
3330
|
+
rowObjArr: []
|
|
3331
|
+
},
|
|
3332
|
+
surfaceSection: {
|
|
3333
|
+
id: "te-containerOptions",
|
|
3334
|
+
label: "Container Styles/Colors",
|
|
3335
|
+
rowObjArr: []
|
|
3336
|
+
},
|
|
3337
|
+
fontSection: {
|
|
3338
|
+
id: "te-fontOptions",
|
|
3339
|
+
label: "Font Styles/Colors",
|
|
3340
|
+
rowObjArr: []
|
|
3341
|
+
}
|
|
3342
|
+
} : { nonSurfaceSection: {
|
|
3343
|
+
id: "te-chartOptions",
|
|
3344
|
+
label: "Chart Properties",
|
|
3345
|
+
rowObjArr: []
|
|
3346
|
+
} };
|
|
3347
|
+
for (let e in t) this.themeMode() ? e.toUpperCase().indexOf("FONT") !== -1 && !(t[e].arr[0].widget._class.indexOf("layout_Surface") !== -1 && e.toUpperCase().indexOf("COLOR") !== -1) ? n.fontSection.rowObjArr.push(t[e]) : e === "paletteID" ? n.chartColorSection.rowObjArr.push(t[e]) : t[e].arr[0].widget._class.indexOf("layout_Surface") !== -1 && n.surfaceSection.rowObjArr.push(t[e]) : t[e].arr[0].widget._class.indexOf("layout_Surface") === -1 && n.nonSurfaceSection.rowObjArr.push(t[e]);
|
|
3348
|
+
let r = "";
|
|
3349
|
+
for (let e in n) r += this.sharedPropertyTableHtml(n[e]);
|
|
3350
|
+
e.innerHTML += r;
|
|
3351
|
+
}
|
|
3352
|
+
initFunctionality(e) {
|
|
3353
|
+
let t = this;
|
|
3354
|
+
_expandCollapse(e), _inputOnChange(e), _inputOnClick(e);
|
|
3355
|
+
function _inputOnClick(e) {
|
|
3356
|
+
if (t.showSettings()) {
|
|
3357
|
+
let e = document.getElementById("te-save-button");
|
|
3358
|
+
e.onclick = function(e) {
|
|
3359
|
+
let t = e.target, n = t.previousSibling.value;
|
|
3360
|
+
if (n.length > 1) {
|
|
3361
|
+
let e = document.getElementById("te-load-theme"), r = e.getElementsByTagName("option"), i = !1;
|
|
3362
|
+
for (let e in r) r[e].value === n && (i = !0);
|
|
3363
|
+
i || (e.innerHTML += "<option value='" + n + "'>" + n + "</option>"), t.previousSibling.value = "", e.value = n;
|
|
3364
|
+
} else alert("Save Name cannot be empty.");
|
|
3365
|
+
};
|
|
3366
|
+
}
|
|
3367
|
+
}
|
|
3368
|
+
function _inputOnChange(e) {
|
|
3369
|
+
let n = e.getElementsByClassName("te-input");
|
|
3370
|
+
for (let e in n) {
|
|
3371
|
+
if (isNaN(parseInt(e))) break;
|
|
3372
|
+
let r = n[e], i = r.getAttribute("id");
|
|
3373
|
+
i === "te-load-theme" ? r.onchange = function(e) {
|
|
3374
|
+
let n = e.srcElement;
|
|
3375
|
+
t.load(n.value);
|
|
3376
|
+
} : i !== null && i.indexOf("te-input-themeMode") !== -1 ? r.onchange = function(e) {
|
|
3377
|
+
let n = e.srcElement;
|
|
3378
|
+
t.themeMode(n.checked);
|
|
3379
|
+
let r = document.getElementById("te-load-theme"), i = r === null ? "Default" : r.value;
|
|
3380
|
+
t.load(i);
|
|
3381
|
+
} : (r.tagName === "INPUT" || r.tagName === "SELECT" || r.tagName === "TEXTAREA") && (r.onchange = function(e) {
|
|
3382
|
+
let n = e.srcElement, r = n.getAttribute("id");
|
|
3383
|
+
n.className.split(" ").indexOf("te-html-color-button") !== -1 && (r = n.previousSibling.getAttribute("id"), n.previousSibling.value = n.value);
|
|
3384
|
+
let i = n.getAttribute("type"), a = r.split("-"), o = a.slice(0, a.length - 1).join("-") + "-", s = n.getAttribute("data-wids"), c = n.getAttribute("data-paramid");
|
|
3385
|
+
s.split(",").forEach(function(e) {
|
|
3386
|
+
let r = o + e, a = document.getElementById(r);
|
|
3387
|
+
if (i === "checkbox") a.checked = n.checked, t._widgetObjsById[e][c](n.checked);
|
|
3388
|
+
else if (n.getAttribute("data-type") === "array") {
|
|
3389
|
+
a.value = n.value;
|
|
3390
|
+
try {
|
|
3391
|
+
t._widgetObjsById[e][c](JSON.parse(n.value));
|
|
3392
|
+
} catch {}
|
|
3393
|
+
} else a.value = n.value, t._widgetObjsById[e][c](n.value), a.className.split(" ").indexOf("te-html-color-input") === -1 ? a.className.split(" ").indexOf("te-html-color-button") !== -1 && (a.previousSibling.value = n.value) : a.nextSibling.value = n.value;
|
|
3394
|
+
}), t.data().forEach(function(e) {
|
|
3395
|
+
e.render();
|
|
3396
|
+
});
|
|
3397
|
+
});
|
|
3398
|
+
}
|
|
3399
|
+
}
|
|
3400
|
+
function _expandCollapse(e) {
|
|
3401
|
+
let t = e.getElementsByClassName("te-section-table");
|
|
3402
|
+
for (let e in t) if (typeof t[e].getElementsByTagName == "function") {
|
|
3403
|
+
let n = t[e].getElementsByTagName("thead");
|
|
3404
|
+
n[0].onclick = function(e) {
|
|
3405
|
+
let t = e.toElement;
|
|
3406
|
+
t.tagName === "TH" && (t = t.parentElement.parentElement);
|
|
3407
|
+
let n = t.parentElement, r;
|
|
3408
|
+
n.className.split(" ").indexOf("expanded") === -1 ? (n.className = "te-section-table expanded", r = "shown") : (n.className = "te-section-table collapsed", r = "hidden");
|
|
3409
|
+
let i = n.getElementsByTagName("tbody");
|
|
3410
|
+
i[0].className = r;
|
|
3411
|
+
};
|
|
3412
|
+
}
|
|
3413
|
+
let n = e.getElementsByClassName("sharedPropertyRow");
|
|
3414
|
+
for (let e in n) if (typeof n[e].getElementsByClassName == "function") {
|
|
3415
|
+
let t = n[e].getElementsByClassName("te-label");
|
|
3416
|
+
t[0].onclick = function(e) {
|
|
3417
|
+
let t = e.toElement.parentElement, n;
|
|
3418
|
+
t.className.split(" ").indexOf("expanded") === -1 ? (t.className = "sharedPropertyRow expanded", n = "shown") : (t.className = "sharedPropertyRow collapsed", n = "hidden");
|
|
3419
|
+
let r = t.nextSibling;
|
|
3420
|
+
for (; r !== null;) r.className.split(" ").indexOf("sharedPropertyRow") === -1 ? (r.className = "propertyRow " + n, r = r.nextSibling) : r = null;
|
|
3421
|
+
};
|
|
3422
|
+
}
|
|
3423
|
+
}
|
|
3424
|
+
}
|
|
3425
|
+
sharedPropertyTableHtml(e) {
|
|
3426
|
+
let t = {
|
|
3427
|
+
id: e.id,
|
|
3428
|
+
label: e.label,
|
|
3429
|
+
rowArr: []
|
|
3430
|
+
};
|
|
3431
|
+
return e.rowObjArr.forEach(function(e) {
|
|
3432
|
+
e.arr.forEach(function(n, r) {
|
|
3433
|
+
r === 0 && t.rowArr.push({
|
|
3434
|
+
th: _sharedPropertyLabel(e),
|
|
3435
|
+
td: _sharedPropertyInput(e),
|
|
3436
|
+
trClass: "sharedPropertyRow collapsed"
|
|
3437
|
+
}), t.rowArr.push({
|
|
3438
|
+
th: _propertyLabel(n),
|
|
3439
|
+
td: _propertyInput(e, r),
|
|
3440
|
+
trClass: "propertyRow hidden"
|
|
3441
|
+
});
|
|
3442
|
+
});
|
|
3443
|
+
}), this.tableObjHtml(t);
|
|
3444
|
+
function _propertyLabel(e) {
|
|
3445
|
+
return e.widget.classID().split("_").join("/") + " <i>[" + e.widget._id + "]</i>";
|
|
3446
|
+
}
|
|
3447
|
+
function _sharedPropertyLabel(e) {
|
|
3448
|
+
return camelizeString(e.id);
|
|
3449
|
+
}
|
|
3450
|
+
function _propertyInput(e, t) {
|
|
3451
|
+
return tableInputHtml(e, _value(e, t), [e.arr[t]], e.arr[t].widget._id);
|
|
3452
|
+
function _value(e, t) {
|
|
3453
|
+
let n = e.arr[t].widget[e.id]();
|
|
3454
|
+
return n === null ? "" : n;
|
|
3455
|
+
}
|
|
3456
|
+
}
|
|
3457
|
+
function _sharedPropertyInput(e) {
|
|
3458
|
+
return tableInputHtml(e, _sharedValue(e), e.arr, "shared");
|
|
3459
|
+
function _sharedValue(e) {
|
|
3460
|
+
let t = e.arr[0].widget[e.id]();
|
|
3461
|
+
return e.arr.forEach(function(e, n) {
|
|
3462
|
+
if (t !== e.widget[e.id]()) return "";
|
|
3463
|
+
}), t === null ? "" : e.type === "array" ? JSON.stringify(t) : t;
|
|
3464
|
+
}
|
|
3465
|
+
}
|
|
3466
|
+
}
|
|
3467
|
+
tableObjHtml(e) {
|
|
3468
|
+
let t = "<table id='" + e.id + "' class='te-section-table expanded'>";
|
|
3469
|
+
return t += "<thead><tr><th colspan='2'>" + e.label + "</th></tr></thead>", t += "<tbody>", e.rowArr.forEach(function(e) {
|
|
3470
|
+
t += this.tableRowObjHtml(e);
|
|
3471
|
+
}, this), t += "</tbody>", t + "</table>";
|
|
3472
|
+
}
|
|
3473
|
+
tableRowObjHtml(e) {
|
|
3474
|
+
let t = e.trClass === void 0 ? "<tr>" : "<tr class='" + e.trClass + "'>";
|
|
3475
|
+
return t += "<th class='te-label'>" + e.th + "</th>", t += "<td>" + e.td + "</td>", t + "</tr>";
|
|
3476
|
+
}
|
|
3477
|
+
setWidgetObjsById(e) {
|
|
3478
|
+
let t = this, n = e.widget[e.id]();
|
|
3479
|
+
e.type === "widgetArray" ? n.forEach(function(e) {
|
|
3480
|
+
t._widgetObjsById[e._id] = e;
|
|
3481
|
+
}) : e.type === "widget" && n !== null && (this._widgetObjsById[n._id] = n);
|
|
3482
|
+
}
|
|
3483
|
+
checkTagFilter(e) {
|
|
3484
|
+
let t = ["Basic"], n = !1;
|
|
3485
|
+
return e.forEach(function(e) {
|
|
3486
|
+
t.indexOf(e) !== -1 && (n = !0);
|
|
3487
|
+
}), n;
|
|
3488
|
+
}
|
|
3489
|
+
findSharedProperties(e) {
|
|
3490
|
+
let t = this, n;
|
|
3491
|
+
if (e !== void 0 && e.length > 0) {
|
|
3492
|
+
let r = [];
|
|
3493
|
+
n = {};
|
|
3494
|
+
let i = {}, a = {};
|
|
3495
|
+
e.forEach(function(e) {
|
|
3496
|
+
let t = _getParams(e, 0);
|
|
3497
|
+
r = r.concat(t);
|
|
3498
|
+
}), r.forEach(function(e) {
|
|
3499
|
+
if (["widget", "widgetArray"].indexOf(e.type) !== -1) t.setWidgetObjsById(e);
|
|
3500
|
+
else if (t.checkTagFilter(e.ext.tags)) {
|
|
3501
|
+
let t = e.id;
|
|
3502
|
+
e.widget._class.indexOf("Surface") === -1 ? (a[t] === void 0 && (a[t] = { arr: [] }), a[t].id = e.id, a[t].description = e.description, a[t].type = e.type, a[t].set = e.set, a[t].ext = e.ext, a[t].arr.push(e)) : (i[t] === void 0 && (i[t] = { arr: [] }), i[t].id = e.id, i[t].description = e.description, i[t].type = e.type, i[t].set = e.set, i[t].ext = e.ext, i[t].arr.push(e)), n[t] === void 0 && (n[t] = { arr: [] }), n[t].id = e.id, n[t].description = e.description, n[t].type = e.type, n[t].set = e.set, n[t].ext = e.ext, n[t].arr.push(e);
|
|
3503
|
+
}
|
|
3504
|
+
});
|
|
3505
|
+
}
|
|
3506
|
+
return n;
|
|
3507
|
+
function _getParams(e, n) {
|
|
3508
|
+
let r = [];
|
|
3509
|
+
return e !== null && discover(e).forEach(function(i, a) {
|
|
3510
|
+
if (i.ext.tags !== void 0 && r.push({
|
|
3511
|
+
id: i.id,
|
|
3512
|
+
type: i.type,
|
|
3513
|
+
description: i.description,
|
|
3514
|
+
set: i.set,
|
|
3515
|
+
ext: i.ext,
|
|
3516
|
+
widget: e
|
|
3517
|
+
}), i.type === "widgetArray") t.widgetProperty(e, i.id).forEach(function(e) {
|
|
3518
|
+
let t = _getParams(e, n + 1);
|
|
3519
|
+
r = r.concat(t);
|
|
3520
|
+
});
|
|
3521
|
+
else if (i.type === "widget") {
|
|
3522
|
+
let a = _getParams(t.widgetProperty(e, i.id), n + 1);
|
|
3523
|
+
r = r.concat(a);
|
|
3524
|
+
}
|
|
3525
|
+
}), r;
|
|
3526
|
+
}
|
|
3527
|
+
}
|
|
3528
|
+
};
|
|
3529
|
+
ThemeEditor.prototype._class += " other_ThemeEditor", ThemeEditor.prototype.publish("themeMode", !0, "boolean", "Edit default values", null, { tags: ["Basic"] }), ThemeEditor.prototype.publish("saveTheme", "", "string", "Save Theme", null, {
|
|
3530
|
+
tags: ["Basic", "Theme"],
|
|
3531
|
+
saveButton: "Save",
|
|
3532
|
+
saveButtonID: "te-save-button"
|
|
3533
|
+
}), ThemeEditor.prototype.publish("loadedTheme", getThemeNames(1), "set", "Loaded Theme", getThemeNames(), { tags: ["Basic", "Theme"] }), ThemeEditor.prototype.publish("saveSerial", "", "string", "Save Serial", null, {
|
|
3534
|
+
tags: ["Basic", "Serial"],
|
|
3535
|
+
saveButton: "Save",
|
|
3536
|
+
saveButtonID: "te-save-button"
|
|
3537
|
+
}), ThemeEditor.prototype.publish("loadedSerial", getSerialNames(0), "set", "Loaded Serial", getSerialNames(), { tags: ["Basic", "Serial"] }), ThemeEditor.prototype.publish("showColumns", !0, "boolean", "Show Columns", null, { tags: ["Intermediate"] }), ThemeEditor.prototype.publish("showData", !0, "boolean", "Show Data", null, { tags: ["Intermediate"] }), ThemeEditor.prototype.publish("shareCountMin", 1, "number", "Share Count Min", null, { tags: ["Private"] }), ThemeEditor.prototype.publish("paramGrouping", "By Param", "set", "Param Grouping", ["By Param", "By Widget"], { tags: ["Private"] }), ThemeEditor.prototype.publish("editorComplexity", "Basic", "set", "Choose what publish properties to display within the editor.", [
|
|
3538
|
+
"Basic",
|
|
3539
|
+
"Intermediate",
|
|
3540
|
+
"Advanced",
|
|
3541
|
+
"Private"
|
|
3542
|
+
], { tags: ["Private"] }), ThemeEditor.prototype.publish("sectionTitle", "", "string", "Section Title", null, { tags: ["Private"] }), ThemeEditor.prototype.publish("collapsibleSections", !0, "boolean", "Collapsible Sections", null, { tags: ["Intermediate"] }), ThemeEditor.prototype.getThemes = getThemes, ThemeEditor.prototype.getSerials = getSerials, ThemeEditor.prototype.getDefaultThemes = getThemeNames, ThemeEditor.prototype.getDefaultSerials = getSerialNames;
|
|
3543
|
+
//#endregion
|
|
3544
|
+
export { Audio, AutoCompleteText, k as BUILD_VERSION, CalendarHeatMap, Column, ColumnDropdown, ue as Comms, HPCCBadge, HeatMap, Html, IconList, Legend, MorphText, MouseHoverColumn, NestedTable, Opportunity, D as PKG_NAME, O as PKG_VERSION, Paginator, he as Persist, $ as PropertyEditor, RadioCheckbox, Select, Table, ThemeEditor, cache, createConnection, createResult, enableCache, flattenResult };
|
|
3545
|
+
|
|
2
3546
|
//# sourceMappingURL=index.js.map
|
|
3
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var t=document.createElement("style");t.appendChild(document.createTextNode('.other_autoCompleteText label{display:inline-block;vertical-align:top}.other_autoCompleteText input{width:100%;max-width:600px;outline:0;border-radius:100}.autocomplete-suggestions{text-align:left;cursor:default;border:1px solid #ccc;border-top:0;background:#fff;box-shadow:-1px 1px 3px #0000001a;position:absolute;display:none;z-index:9999;max-height:254px;overflow:hidden;overflow-y:auto;box-sizing:border-box}.autocomplete-suggestion{position:relative;padding:0 .6em;line-height:23px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:1.02em;color:#333}.autocomplete-suggestion b{font-weight:400;color:#1f8dd6}.autocomplete-suggestion.selected{background:#f0f0f0}.other_CalendarHeatMap{shape-rendering:crispEdges}.other_CalendarHeatMap .day{fill:#fff;stroke:#ccc}.other_CalendarHeatMap .day.selected{stroke:red}.other_CalendarHeatMap .day.over{stroke:orange}.other_CalendarHeatMap .day.selected.over{stroke:red}.other_CalendarHeatMap .month{fill:none;stroke:#000;stroke-width:2px}.other_Html{height:100%;width:100%;overflow-x:auto;overflow-y:scroll}.other_IconList .other_Html{overflow-x:hidden;overflow-y:hidden}.other_Paginator{display:block;position:absolute;white-space:nowrap}.other_Paginator .pagination{display:inline-block;white-space:nowrap;margin:0;padding:0}.other_Paginator .pagination>li{display:inline}.other_Paginator input[type=number].currentPageNumber{border:1px solid #ddd;outline:0 none;position:relative;width:37px;text-align:center}.other_Paginator div.side{padding-top:5px;padding-left:8px;vertical-align:top}.other_Paginator span.side{position:relative;color:#337ab7}.other_Paginator .pagination>li>a,.other_Paginator .pagination>div,.other_Paginator .pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.other_Paginator .pagination>li:first-child>a,.other_Paginator .pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.other_Paginator .pagination>li:last-child>a,.other_Paginator .pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.other_Paginator .pagination>li>a:hover,.other_Paginator .pagination>li>span:hover,.other_Paginator .pagination>li>a:focus,.other_Paginator .pagination>li>span:focus{color:#23527c;background-color:#eee;border-color:#ddd}.other_Paginator .pagination>.active>a,.other_Paginator .pagination>.active>span,.other_Paginator .pagination>.active>a:hover,.other_Paginator .pagination>.active>span:hover,.other_Paginator .pagination>.active>a:focus,.other_Paginator .pagination>.active>span:focus{z-index:2;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.other_Paginator .pagination>.disabled>span,.other_Paginator .pagination>.disabled>span:hover,.other_Paginator .pagination>.disabled>span:focus,.other_Paginator .pagination>.disabled>a,.other_Paginator .pagination>.disabled>a:hover,.other_Paginator .pagination>.disabled>a:focus{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.other_Paginator .pagination-lg>li>a,.other_Paginator .pagination-lg>li>span{padding:10px 16px;font-size:18px}.other_Paginator .pagination-lg>li:first-child>a,.other_Paginator .pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.other_Paginator .pagination-lg>li:last-child>a,.other_Paginator .pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.other_Paginator .pagination-sm>li>a,.other_Paginator .pagination-sm>li>span{padding:5px 10px;font-size:12px}.other_Paginator .pagination-sm>li:first-child>a,.other_Paginator .pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.other_Paginator .pagination-sm>li:last-child>a,.other_Paginator .pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.other_Table{color:#333;border-width:1px;border-color:#999}.other_Table table{border-collapse:collapse;border-spacing:0}.other_Table .tableDiv{position:absolute}.other_Table th,.labels-wrapper th{padding:5px 10px;border-width:1px;border-style:solid;border-color:#a9c6c9;color:#fff;white-space:nowrap;cursor:pointer;box-sizing:border-box}.other_Table thead>tr,.cols-wrapper tr{background-color:#1f77b4}.other_Table .thIcon,.labels-wrapper .thIcon{font-family:FontAwesome;padding-left:8px}.other_Table .tableDiv tbody>tr:nth-child(odd){background-color:#f3faff;color:#000}.other_Table .tableDiv tbody>tr:nth-child(2n){background-color:#fff;color:#000}.other_Table .tableDiv tbody>tr.selected{background-color:#f48a00;color:#fff}.other_Table .rows-wrapper table>tbody>tr{background-color:#bce1fb;color:#000}.other_Table .rows-wrapper .labels-wrapper{width:100%}.other_Table table tbody>tr.selected{background-color:#f48a00;color:#fff}.other_Table .tableDiv tbody>tr:hover,.other_Table .tableDiv tbody>tr.hover,.rows-wrapper table tbody tr.hover{background-color:#bfd7e7;color:#fff}.other_Table .tableDiv tbody>tr.selected:hover,.other_Table .tableDiv tbody>tr.selected.hover{background-color:#5ea8db;color:#fff}.other_Table .rows-wrapper tbody tr.hover.selected,.other_Table tr.selected:hover,.other_Table tr.selected.hover{background-color:#5ea8db;color:#fff}.other_Table td,.rows-wrapper td{border-width:1px;padding:2px 5px;border-style:solid;border-color:#a9c6c9;white-space:nowrap;box-sizing:border-box;vertical-align:middle}.other_Table tfoot td,.rows-wrapper tfoot td{background-color:#addff3;font-weight:700}.other_Legend .colorBlock{width:10px;height:10px}.other_Legend>table,.other_Legend>table td,.other_Legend>table th{border-collapse:collapse;border-spacing:0px}.other_Table.other_Legend table{border-spacing:0}.other_Table.other_Legend th,.labels-wrapper th{padding:2px 5px;background-color:transparent;border-width:1px;border-style:solid;border-color:transparent;color:#333;white-space:nowrap;cursor:default;font-weight:400;text-align:left}.other_Table.other_Legend tr{background-color:transparent;color:#333}.other_Table.other_Legend .tableDiv tbody>tr:nth-child(odd){background-color:unset;color:#000}.other_Table.other_Legend .tableDiv tbody>tr:hover,.other_Table.other_Legend .tableDiv tbody>tr.hover,.rows-wrapper table tbody tr.hover{background-color:#bfd7e7;color:#fff}.other_Table.other_Legend thead>tr:hover{background-color:transparent}.other_Table.other_Legend tbody>tr:hover,.other_Table.other_Legend tbody>tr.hover,.rows-wrapper tbody tr.hover{background-color:#eee}.other_Table.other_Legend td,.rows-wrapper td{border-width:0px;padding:2px 5px;white-space:nowrap;box-sizing:border-box}.other_Legend>.tableDiv>table>tbody>tr:hover{cursor:pointer;color:#000;background-color:#ddd}.other_Legend.horiz-legend .tableDiv{width:100%!important;text-align:left}.other_Legend.horiz-legend .tableDiv>table{display:inline-block;width:100%!important;top:0!important;left:0!important}.other_Legend.horiz-legend thead,.other_Legend.horiz-legend tbody,.other_Legend.horiz-legend tr{display:inline-block}.other_Legend.horiz-legend td,.other_Legend.horiz-legend td>div{display:inline-block;white-space:nowrap}.other_Legend.horiz-legend tr{white-space:nowrap}.other_Legend.horiz-legend tbody{display:inline-block;width:100%!important;text-align:center}.other_MorphText .enter{fill:green}.other_MorphText .update{fill:#333}.other_MorphText .exit{fill:brown}.graph_Opportunity{transform:translate(20px,20px)scale(1)!important}.graph_Opportunity .group{stroke-width:1;stroke:#555;fill:#fefefe}.graph_Opportunity .group_headings{font-family:Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:20px}.graph_Opportunity .node_prev_rect{fill:#fff;stroke-width:2;stroke:#000;stroke-dasharray:3,3;opacity:.6}.graph_Opportunity .node_rev_change{fill:#fff}.graph_Opportunity .node_rev_change_text{font-size:18px;font-family:Arial;color:#000;font-weight:700}.graph_Opportunity .node_date_change{fill:#fff}.graph_Opportunity .node_date_change_text{font-size:18px;font-family:Arial;color:#000;font-weight:700}.graph_Opportunity .node_prev_text{font-size:9px;font-family:Arial;opacity:.6}.graph_Opportunity .node_cur_rect{stroke-width:2;stroke:#000}.graph_Opportunity .node_cur_text{font-size:9px;font-family:Arial;text-decoration:underline}.graph_Opportunity .arrowhead{refX:6}.graph_Opportunity-tooltip.tooltip{position:absolute;text-align:left;width:350px;height:135px;padding:15px 10px 10px;font:14px arial;background:#bdbdbd;border:0px;border-radius:8px;pointer-events:none;z-index:1}.other_PropertyEditor{overflow-y:scroll;height:100%;width:100%}.other_PropertyEditor .other_PropertyEditor{overflow:hidden}.other_PropertyEditor .property-table{width:100%;border:1px solid #ddd;border-width:0 0 0 1px}.other_PropertyEditor thead>tr>th{background-color:#333}.other_PropertyEditor .other_PropertyEditor th{background-color:#444}.other_PropertyEditor .other_PropertyEditor .other_PropertyEditor th{background-color:#555}.other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor th{background-color:#666}.other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor th{background-color:#777}.other_PropertyEditor .headerRow{background-color:#eee}.other_PropertyEditor .other_PropertyEditor .headerRow{background-color:#ddd}.other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .headerRow{background-color:#ccc}.other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .headerRow{background-color:#bbb}.other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .headerRow{background-color:#aaa}.other_PropertyEditor .fa{font-size:14px;width:14px}.other_PropertyEditor div.property-table-collapsed{display:none}.other_PropertyEditor .headerRow>.peInput{padding-top:2px}.other_PropertyEditor .headerRow>.peInput>span{font-weight:700;padding-left:2px}.other_PropertyEditor .headerRow>.peInput>i{float:right;padding-top:2px;padding-bottom:2px}.other_PropertyEditor .headerRow>span>i:hover{background-color:#555;cursor:pointer}.other_PropertyEditor .property-table thead>tr>th{text-align:left;background-color:#333;color:#fff;padding-top:2px;padding-left:4px}.other_PropertyEditor .property-table thead>tr>th>i{float:right;padding-top:2px;padding-right:4px;padding-bottom:2px}.other_PropertyEditor .property-table thead>tr>th>i:hover{background-color:#555;cursor:pointer}.other_PropertyEditor .property-table tbody>tr:nth-child(2n){background-color:#f9f9f9}.other_PropertyEditor .property-table tbody>tr:nth-child(odd){background-color:#fff}.other_PropertyEditor .property-table tbody>tr>td{text-align:left;color:#333;padding:0 0 0 2px}.other_PropertyEditor .property-table tbody>tr.disabled>td{color:gray}.other_PropertyEditor .property-table tbody>tr.invalid>td{color:red}.other_PropertyEditor .property-input-cell>div{padding-left:8px}.other_PropertyEditor .property-label{padding-right:4px;box-sizing:border-box;height:20px}.other_PropertyEditor td.property-input-cell{text-align:left;height:20px;padding:1px 0;width:80%}.other_PropertyEditor .property-input-cell>input,.other_PropertyEditor .property-input-cell>textarea{width:100%;box-sizing:border-box}.other_PropertyEditor .property-input-cell>input{height:20px}.other_PropertyEditor .property-input-cell>textarea{height:120px}.other_PropertyEditor .property-input-cell.boolean-cell{width:auto;margin:0;position:relative}.other_PropertyEditor .property-input-cell>input[type=checkbox]{width:auto;margin:0;position:absolute;top:0}.other_PropertyEditor .html-color-cell>input{width:80%}.other_PropertyEditor .html-color-cell>input[type=color]{width:20%;position:relative;top:-1px}.other_RadioCheckbox span,.other_RadioCheckbox label,.other_Select span,.other_Select label{vertical-align:top}.other_ThemeEditor *{box-sizing:border-box}.other_ThemeEditor table{width:100%;margin-bottom:4px}.other_ThemeEditor table:last-child{margin-bottom:0}.other_ThemeEditor thead>tr>th{text-align:left}.other_ThemeEditor thead>tr>th>b{font-weight:700}.other_ThemeEditor thead>tr>th{background-color:#fafafa}.other_ThemeEditor tbody>tr>th,.other_ThemeEditor tbody>tr>td{font-weight:400;background-color:#fafafa}.other_ThemeEditor thead>tr:first-child>th{background-color:#e5e5e5}.other_ThemeEditor thead>tr.mm-content>th{padding:0 4px;font-size:12px}.other_ThemeEditor th,.other_ThemeEditor td{padding:4px;white-space:nowrap}.other_ThemeEditor thead.mm-label>tr:first-child>th{position:relative;padding-left:29px}.other_ThemeEditor thead.mm-label>tr:first-child>th:before{content:"[+]";position:absolute;left:3px;top:3px;color:#404040;height:15px;width:15px;font-family:monospace}.other_ThemeEditor thead.mm-label.max>tr:first-child>th:before{content:"[-]"}.other_ThemeEditor tr.sharedPropertyRow>td.label:after{content:"[+]";position:absolute;right:10px;top:3px;color:#404040;height:15px;width:15px;font-family:monospace}.other_ThemeEditor tr.sharedPropertyRow>td.label.expanded:after{content:"[-]"}.other_ThemeEditor tr.sharedPropertyRow>td.label{position:relative;padding-right:30px;text-decoration:underline}.other_ThemeEditor tr.sharedPropertyRow>td.label:hover{text-decoration:none;cursor:pointer}.other_ThemeEditor tr.propertyRow>th,.other_ThemeEditor tr.propertyRow>td{background-color:#f4f4f4}.other_ThemeEditor tr.propertyRow>td.label{padding-left:24px}.other_ThemeEditor table,.other_ThemeEditor th,.other_ThemeEditor td{border:1px solid #e5e5e5}.other_ThemeEditor .mm-label.min .mm-content,.other_ThemeEditor .mm-label.min+.mm-content{display:none}.mm-label:hover{cursor:pointer}.other_ThemeEditor .sharedPropertyRow>.te-label{cursor:pointer}.other_ThemeEditor .sharedPropertyRow>.te-label:hover{text-decoration:none}.other_ThemeEditor .propertyRow.shown>.te-label{padding-left:15px}.other_ThemeEditor .propertyRow>td{background-color:#f4f4f4}.other_ThemeEditor input,.other_ThemeEditor textarea,.other_ThemeEditor select{height:30px;float:left}.other_ThemeEditor input,.other_ThemeEditor select{width:150px}.other_ThemeEditor .te-checkbox{width:20px;height:20px;margin:0}.other_ThemeEditor .te-html-color-input{height:30px;width:120px}.other_ThemeEditor .te-html-color-button{width:30px}.other_ThemeEditor button,.other_ThemeEditor .te-html-color-button{background-color:#ccc;border:1px solid #A9A9A9;border-left:0;height:30px;float:left;padding:4px}.other_ThemeEditor button,.other_ThemeEditor .te-html-color-button,.other_ThemeEditor .te-section-table thead{cursor:pointer}.other_ThemeEditor button:hover,.other_ThemeEditor .te-html-color-button:hover{background-color:#bbb}.other_ThemeEditor button:active,.other_ThemeEditor .te-html-color-button:active{background-color:#aaa}.other_ThemeEditor .te-label{white-space:nowrap;width:1%;vertical-align:top}.other_ThemeEditor .te-section-table>tbody>tr:hover{background-color:#f8ff98}.te-section-table thead th{font-weight:700}.te-section-table.expanded>thead>tr>th:after{font: 14px/1 FontAwesome;content:"";float:right;margin-right:6px;margin-top:4px}.te-section-table.collapsed>thead>tr>th:after{font: 14px/1 FontAwesome;content:"";float:right;margin-right:6px;margin-top:4px}#te-tableModeOptions thead>tr>th,#te-themeEditorOptions thead>tr>th{border:1px solid #6E6E73;background-color:#6e6e73;color:#fafafa}')),document.head.appendChild(t)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}}();
|
|
3547
|
+
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.other_autoCompleteText label{vertical-align:top;display:inline-block}.other_autoCompleteText input{border-radius:100px;outline:0;width:100%;max-width:600px}.autocomplete-suggestions{text-align:left;cursor:default;z-index:9999;box-sizing:border-box;background:#fff;border:1px solid #ccc;border-top:0;max-height:254px;display:none;position:absolute;overflow:hidden auto;box-shadow:-1px 1px 3px #0000001a}.autocomplete-suggestion{white-space:nowrap;text-overflow:ellipsis;color:#333;padding:0 .6em;font-size:1.02em;line-height:23px;position:relative;overflow:hidden}.autocomplete-suggestion b{color:#1f8dd6;font-weight:400}.autocomplete-suggestion.selected{background:#f0f0f0}.other_CalendarHeatMap{shape-rendering:crispedges}.other_CalendarHeatMap .day{fill:#fff;stroke:#ccc}.other_CalendarHeatMap .day.selected{stroke:red}.other_CalendarHeatMap .day.over{stroke:orange}.other_CalendarHeatMap .day.selected.over{stroke:red}.other_CalendarHeatMap .month{fill:none;stroke:#000;stroke-width:2px}.other_Html{width:100%;height:100%;overflow:auto scroll}.other_IconList .other_Html{overflow:hidden}.other_Paginator{white-space:nowrap;display:block;position:absolute}.other_Paginator .pagination{white-space:nowrap;margin:0;padding:0;display:inline-block}.other_Paginator .pagination>li{display:inline}.other_Paginator input[type=number].currentPageNumber{text-align:center;border:1px solid #ddd;outline:0;width:37px;position:relative}.other_Paginator div.side{vertical-align:top;padding-top:5px;padding-left:8px}.other_Paginator span.side{color:#337ab7;position:relative}.other_Paginator .pagination>li>a,.other_Paginator .pagination>div,.other_Paginator .pagination>li>span{float:left;color:#337ab7;background-color:#fff;border:1px solid #ddd;margin-left:-1px;padding:6px 12px;line-height:1.42857;text-decoration:none;position:relative}.other_Paginator .pagination>li:first-child>a,.other_Paginator .pagination>li:first-child>span{border-top-left-radius:4px;border-bottom-left-radius:4px;margin-left:0}.other_Paginator .pagination>li:last-child>a,.other_Paginator .pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.other_Paginator .pagination>li>a:hover,.other_Paginator .pagination>li>span:hover,.other_Paginator .pagination>li>a:focus,.other_Paginator .pagination>li>span:focus{color:#23527c;background-color:#eee;border-color:#ddd}.other_Paginator .pagination>.active>a,.other_Paginator .pagination>.active>span,.other_Paginator .pagination>.active>a:hover,.other_Paginator .pagination>.active>span:hover,.other_Paginator .pagination>.active>a:focus,.other_Paginator .pagination>.active>span:focus{z-index:2;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.other_Paginator .pagination>.disabled>span,.other_Paginator .pagination>.disabled>span:hover,.other_Paginator .pagination>.disabled>span:focus,.other_Paginator .pagination>.disabled>a,.other_Paginator .pagination>.disabled>a:hover,.other_Paginator .pagination>.disabled>a:focus{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.other_Paginator .pagination-lg>li>a,.other_Paginator .pagination-lg>li>span{padding:10px 16px;font-size:18px}.other_Paginator .pagination-lg>li:first-child>a,.other_Paginator .pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.other_Paginator .pagination-lg>li:last-child>a,.other_Paginator .pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.other_Paginator .pagination-sm>li>a,.other_Paginator .pagination-sm>li>span{padding:5px 10px;font-size:12px}.other_Paginator .pagination-sm>li:first-child>a,.other_Paginator .pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.other_Paginator .pagination-sm>li:last-child>a,.other_Paginator .pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.other_Table{color:#333;border-width:1px;border-color:#999}.other_Table table{border-collapse:collapse;border-spacing:0}.other_Table .tableDiv{position:absolute}.other_Table th,.labels-wrapper th{color:#fff;white-space:nowrap;cursor:pointer;box-sizing:border-box;border:1px solid #a9c6c9;padding:5px 10px}.other_Table thead>tr,.cols-wrapper tr{background-color:#1f77b4}.other_Table .thIcon,.labels-wrapper .thIcon{padding-left:8px;font-family:FontAwesome}.other_Table .tableDiv tbody>tr:nth-child(odd){color:#000;background-color:#f3faff}.other_Table .tableDiv tbody>tr:nth-child(2n){color:#000;background-color:#fff}.other_Table .tableDiv tbody>tr.selected{color:#fff;background-color:#f48a00}.other_Table .rows-wrapper table>tbody>tr{color:#000;background-color:#bce1fb}.other_Table .rows-wrapper .labels-wrapper{width:100%}.other_Table table tbody>tr.selected{color:#fff;background-color:#f48a00}.other_Table .tableDiv tbody>tr:hover,.other_Table .tableDiv tbody>tr.hover,.rows-wrapper table tbody tr.hover{color:#fff;background-color:#bfd7e7}.other_Table .tableDiv tbody>tr.selected:hover,.other_Table .tableDiv tbody>tr.selected.hover,.other_Table .rows-wrapper tbody tr.hover.selected,.other_Table tr.selected:hover,.other_Table tr.selected.hover{color:#fff;background-color:#5ea8db}.other_Table td,.rows-wrapper td{white-space:nowrap;box-sizing:border-box;vertical-align:middle;border:1px solid #a9c6c9;padding:2px 5px}.other_Table tfoot td,.rows-wrapper tfoot td{background-color:#addff3;font-weight:700}.other_Legend .colorBlock{width:10px;height:10px}.other_Legend>table,.other_Legend>table td,.other_Legend>table th{border-collapse:collapse;border-spacing:0}.other_Table.other_Legend table{border-spacing:0}.other_Table.other_Legend th,.labels-wrapper th{color:#333;white-space:nowrap;cursor:default;text-align:left;background-color:#0000;border:1px solid #0000;padding:2px 5px;font-weight:400}.other_Table.other_Legend tr{color:#333;background-color:#0000}.other_Table.other_Legend .tableDiv tbody>tr:nth-child(odd){background-color:unset;color:#000}.other_Table.other_Legend .tableDiv tbody>tr:hover,.other_Table.other_Legend .tableDiv tbody>tr.hover,.rows-wrapper table tbody tr.hover{color:#fff;background-color:#bfd7e7}.other_Table.other_Legend thead>tr:hover{background-color:#0000}.other_Table.other_Legend tbody>tr:hover,.other_Table.other_Legend tbody>tr.hover,.rows-wrapper tbody tr.hover{background-color:#eee}.other_Table.other_Legend td,.rows-wrapper td{white-space:nowrap;box-sizing:border-box;border-width:0;padding:2px 5px}.other_Legend>.tableDiv>table>tbody>tr:hover{cursor:pointer;color:#000;background-color:#ddd}.other_Legend.horiz-legend .tableDiv{text-align:left;width:100%!important}.other_Legend.horiz-legend .tableDiv>table{display:inline-block;width:100%!important;top:0!important;left:0!important}.other_Legend.horiz-legend thead,.other_Legend.horiz-legend tbody,.other_Legend.horiz-legend tr{display:inline-block}.other_Legend.horiz-legend td,.other_Legend.horiz-legend td>div{white-space:nowrap;display:inline-block}.other_Legend.horiz-legend tr{white-space:nowrap}.other_Legend.horiz-legend tbody{text-align:center;display:inline-block;width:100%!important}.other_MorphText .enter{fill:green}.other_MorphText .update{fill:#333}.other_MorphText .exit{fill:brown}.graph_Opportunity{transform:translate(20px,20px)scale(1)!important}.graph_Opportunity .group{stroke-width:1px;stroke:#555;fill:#fefefe}.graph_Opportunity .group_headings{font-family:Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:20px}.graph_Opportunity .node_prev_rect{fill:#fff;stroke-width:2px;stroke:#000;stroke-dasharray:3 3;opacity:.6}.graph_Opportunity .node_rev_change{fill:#fff}.graph_Opportunity .node_rev_change_text{color:#000;font-family:Arial;font-size:18px;font-weight:700}.graph_Opportunity .node_date_change{fill:#fff}.graph_Opportunity .node_date_change_text{color:#000;font-family:Arial;font-size:18px;font-weight:700}.graph_Opportunity .node_prev_text{opacity:.6;font-family:Arial;font-size:9px}.graph_Opportunity .node_cur_rect{stroke-width:2px;stroke:#000}.graph_Opportunity .node_cur_text{font-family:Arial;font-size:9px;text-decoration:underline}.graph_Opportunity .arrowhead{refX:6}.graph_Opportunity-tooltip.tooltip{text-align:left;pointer-events:none;z-index:1;background:#bdbdbd;border:0;border-radius:8px;width:350px;height:135px;padding:15px 10px 10px;font:14px arial;position:absolute}.other_PropertyEditor{width:100%;height:100%;overflow-y:scroll}.other_PropertyEditor .other_PropertyEditor{overflow:hidden}.other_PropertyEditor .property-table{border:0 solid #ddd;border-left-width:1px;width:100%}.other_PropertyEditor thead>tr>th{background-color:#333}.other_PropertyEditor .other_PropertyEditor th{background-color:#444}.other_PropertyEditor .other_PropertyEditor .other_PropertyEditor th{background-color:#555}.other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor th{background-color:#666}.other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor th{background-color:#777}.other_PropertyEditor .headerRow{background-color:#eee}.other_PropertyEditor .other_PropertyEditor .headerRow{background-color:#ddd}.other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .headerRow{background-color:#ccc}.other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .headerRow{background-color:#bbb}.other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .headerRow{background-color:#aaa}.other_PropertyEditor .fa{width:14px;font-size:14px}.other_PropertyEditor div.property-table-collapsed{display:none}.other_PropertyEditor .headerRow>.peInput{padding-top:2px}.other_PropertyEditor .headerRow>.peInput>span{padding-left:2px;font-weight:700}.other_PropertyEditor .headerRow>.peInput>i{float:right;padding-top:2px;padding-bottom:2px}.other_PropertyEditor .headerRow>span>i:hover{cursor:pointer;background-color:#555}.other_PropertyEditor .property-table thead>tr>th{text-align:left;color:#fff;background-color:#333;padding-top:2px;padding-left:4px}.other_PropertyEditor .property-table thead>tr>th>i{float:right;padding-top:2px;padding-bottom:2px;padding-right:4px}.other_PropertyEditor .property-table thead>tr>th>i:hover{cursor:pointer;background-color:#555}.other_PropertyEditor .property-table tbody>tr:nth-child(2n){background-color:#f9f9f9}.other_PropertyEditor .property-table tbody>tr:nth-child(odd){background-color:#fff}.other_PropertyEditor .property-table tbody>tr>td{text-align:left;color:#333;padding:0 0 0 2px}.other_PropertyEditor .property-table tbody>tr.disabled>td{color:gray}.other_PropertyEditor .property-table tbody>tr.invalid>td{color:red}.other_PropertyEditor .property-input-cell>div{padding-left:8px}.other_PropertyEditor .property-label{box-sizing:border-box;height:20px;padding-right:4px}.other_PropertyEditor td.property-input-cell{text-align:left;width:80%;height:20px;padding:1px 0}.other_PropertyEditor .property-input-cell>input,.other_PropertyEditor .property-input-cell>textarea{box-sizing:border-box;width:100%}.other_PropertyEditor .property-input-cell>input{height:20px}.other_PropertyEditor .property-input-cell>textarea{height:120px}.other_PropertyEditor .property-input-cell.boolean-cell{width:auto;margin:0;position:relative}.other_PropertyEditor .property-input-cell>input[type=checkbox]{width:auto;margin:0;position:absolute;top:0}.other_PropertyEditor .html-color-cell>input{width:80%}.other_PropertyEditor .html-color-cell>input[type=color]{width:20%;position:relative;top:-1px}.other_RadioCheckbox span,.other_RadioCheckbox label,.other_Select span,.other_Select label{vertical-align:top}.other_ThemeEditor *{box-sizing:border-box}.other_ThemeEditor table{width:100%;margin-bottom:4px}.other_ThemeEditor table:last-child{margin-bottom:0}.other_ThemeEditor thead>tr>th{text-align:left}.other_ThemeEditor thead>tr>th>b{font-weight:700}.other_ThemeEditor thead>tr>th{background-color:#fafafa}.other_ThemeEditor tbody>tr>th,.other_ThemeEditor tbody>tr>td{background-color:#fafafa;font-weight:400}.other_ThemeEditor thead>tr:first-child>th{background-color:#e5e5e5}.other_ThemeEditor thead>tr.mm-content>th{padding:0 4px;font-size:12px}.other_ThemeEditor th,.other_ThemeEditor td{white-space:nowrap;padding:4px}.other_ThemeEditor thead.mm-label>tr:first-child>th{padding-left:29px;position:relative}.other_ThemeEditor thead.mm-label>tr:first-child>th:before{content:"[+]";color:#404040;width:15px;height:15px;font-family:monospace;position:absolute;top:3px;left:3px}.other_ThemeEditor thead.mm-label.max>tr:first-child>th:before{content:"[-]"}.other_ThemeEditor tr.sharedPropertyRow>td.label:after{content:"[+]";color:#404040;width:15px;height:15px;font-family:monospace;position:absolute;top:3px;right:10px}.other_ThemeEditor tr.sharedPropertyRow>td.label.expanded:after{content:"[-]"}.other_ThemeEditor tr.sharedPropertyRow>td.label{padding-right:30px;text-decoration:underline;position:relative}.other_ThemeEditor tr.sharedPropertyRow>td.label:hover{cursor:pointer;text-decoration:none}.other_ThemeEditor tr.propertyRow>th,.other_ThemeEditor tr.propertyRow>td{background-color:#f4f4f4}.other_ThemeEditor tr.propertyRow>td.label{padding-left:24px}.other_ThemeEditor table,.other_ThemeEditor th,.other_ThemeEditor td{border:1px solid #e5e5e5}.other_ThemeEditor .mm-label.min .mm-content,.other_ThemeEditor .mm-label.min+.mm-content{display:none}.mm-label:hover,.other_ThemeEditor .sharedPropertyRow>.te-label{cursor:pointer}.other_ThemeEditor .sharedPropertyRow>.te-label:hover{text-decoration:none}.other_ThemeEditor .propertyRow.shown>.te-label{padding-left:15px}.other_ThemeEditor .propertyRow>td{background-color:#f4f4f4}.other_ThemeEditor input,.other_ThemeEditor textarea,.other_ThemeEditor select{float:left;height:30px}.other_ThemeEditor input,.other_ThemeEditor select{width:150px}.other_ThemeEditor .te-checkbox{width:20px;height:20px;margin:0}.other_ThemeEditor .te-html-color-input{width:120px;height:30px}.other_ThemeEditor .te-html-color-button{width:30px}.other_ThemeEditor button,.other_ThemeEditor .te-html-color-button{float:left;background-color:#ccc;border:1px solid #a9a9a9;border-left:0;height:30px;padding:4px}.other_ThemeEditor button,.other_ThemeEditor .te-html-color-button,.other_ThemeEditor .te-section-table thead{cursor:pointer}.other_ThemeEditor button:hover,.other_ThemeEditor .te-html-color-button:hover{background-color:#bbb}.other_ThemeEditor button:active,.other_ThemeEditor .te-html-color-button:active{background-color:#aaa}.other_ThemeEditor .te-label{white-space:nowrap;vertical-align:top;width:1%}.other_ThemeEditor .te-section-table>tbody>tr:hover{background-color:#f8ff98}.te-section-table thead th{font-weight:700}.te-section-table.expanded>thead>tr>th:after{content:"";float:right;margin-top:4px;margin-right:6px;font:14px/1 FontAwesome}.te-section-table.collapsed>thead>tr>th:after{content:"";float:right;margin-top:4px;margin-right:6px;font:14px/1 FontAwesome}#te-tableModeOptions thead>tr>th,#te-themeEditorOptions thead>tr>th{color:#fafafa;background-color:#6e6e73;border:1px solid #6e6e73}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
|