/* @license Copyright (C) Exontrol. All rights reserved. */ !function(){"use strict";function e(e){try{var t=window.innerWidth-W,o=parseInt(getComputedStyle(vsplit).width)+4,r=W;e=Math.max(0,Math.min(e,t-o)),list.style.width=G(e),content.style.width=G(t-(o+parseInt(list.style.width))),vsplit.style.height=content.style.height=list.style.height=G(window.innerHeight-r),n()}catch(e){}}function n(){}function t(){window.frameElement&&(window.frameElement.height=window.parent.innerHeight-58)}function o(){ne(F,de,!Filter.value)}function r(e){return(e=(null!=e?String(e):"").toLowerCase())&&"ex"!=e.substr(0,"ex".length)&&(e="ex"+e),e}function i(){return document.getElementById(ye)}function a(e,n){return e.getElementsByTagName(n).item(0)}function l(e,n){function t(){C&&C.setExample(e.exsamp.sQ)}if(e&&e.exsamp){var o=i();o&&o==e||(c(!1),e.id=ye,!I.Get(Be)&&C&&(n?t():(clearTimeout(H),H=setTimeout(function(){t()},64))),e.parentElement.id&&e.exsamp.e&&(I.Set(Ne,e.parentElement.id),I.Set(Ie,e.exsamp.e),I.Set(Be,null),window.top.history.replaceState(null,null,I.href),ne(content,ye)))}}function c(e){var n=i();n&&(n.removeAttribute(be),(e||null==e)&&(I.Set(Ie,null),I.Set(Be,null),window.top.history.replaceState(null,null,I.href),ne(content,ye,!0)))}function u(e,n){if(O&&clearTimeout(O),e&&e.scrollIntoView){var t={block:"nearest"};(n=null!=n?n:128)?O=setTimeout(function(){t.behavior="smooth",e.scrollIntoView(t),O=null},n):e.scrollIntoView(t)}}function s(e,n,t){e=Z(e);var o=_(e);return{q:e,p:function(e){var n,t=e instanceof HTMLLIElement?e.parentElement:e,o="";return t instanceof HTMLUListElement&&~(n=(o=t.previousElementSibling.innerText.toLowerCase()).indexOf("\n"))&&(o=o.substr(0,n).trim()),re+o}(t),e:o.o&&o.o.e&&o.o.e[0]||n||0,sQ:o}}function f(e){function n(e){!function(e,n){e&&e.exsamp&&(e.exsamp=s(J(e.exsamp.sQ.c,n,e.exsamp.sQ.o),e.exsamp.e,e),i()==e&&!I.Get(Be)&&C&&C.setExample(e.exsamp.sQ),h(e.parentElement))}(this.parentElement.parentElement,this.innerHTML)}var t,o,r=i(),c=e.previousElementSibling.exname;return r&&r.parentElement!=e&&!confirm("You are about to add a copy of the selected question '"+r.exsamp.sQ.d+"' to a different component '"+c+"'. Is this really what you want to do?")||(o=Q.addLI(e,(r&&r.exsamp.q||Ue+oe+"o"+c).replace(Re,"$1"+function(){var n,t,o=e.children.length+1,r=e.lastChild;return r&&r.exsamp&&(n=r.exsamp.e)&&(t=n.match(Ae))&&(o=n.replace(Ae,1+~~t[0])),o}()+"$3").replace(Me,""),!0))&&(De&&(o.className=xe,(t=a(o,"QDESC"))&&(t.setAttribute(ue,le),t.oninput=n,t.onkeydown=function(e){if(13==e.keyCode)return C&&C.code.focus(),q(e)})),l(o),u(o),h(e)),o}function m(e){for(var n=e&&e.target;n;){if(n.tagName!=ie&&n.tagName!=ae||(n=n.parentElement),n&&Q.contains(n)&&"A"==n.tagName&&"LI"==n.parentElement.tagName)return n;n=n.parentElement}}function d(e){if(e&&e.exname){var n,t=e.exname,o=document.getElementById(r(e.exname));o&&o.children&&o.children.length&&(n=o.children.length-ee(o.getElementsByClassName(pe)).length)&&(t+=""+n,n!=o.children.length&&(t+="/"+o.children.length),t+=""),e.innerHTML=t}}function h(e,n){ne(e,he,n),ne(e.previousElementSibling,he,n),!n&&g(e)}function p(e){return e?[e]:ee(Q.getElementsByTagName(Qe))}function g(e){p(e).forEach(function(e){e.exblob&&(URL.revokeObjectURL(e.exblob),e.exblob=null)})}function w(e){var n,t=new Map,o=[];if(e){for(var r in z)t.set(r=(re+r).toLowerCase(),r);e.toLowerCase().split(" ").forEach(function(e){(e=function(e){if(e&&e.startsWith(re))for(var n in te)if(~te[n].indexOf(e)){e=n;break}return e}(e.trim()))&&(!n&&t.has(e)?n=e:~o.indexOf(e)||o.push(e))})}return(n||o.length)&&{c:n,f:o}||null}function x(e){function n(e){return e.exsamp.q}function t(e){ee(document.getElementsByClassName(pe)).forEach(function(e){ne(e,pe,!0)}),r&&Q.getElementsByTagName(Te).forEach(function(n){n.exsamp&&!((!r.c||n.exsamp.p==r.c)&&function(e){for(var n=!0,t=0,o=r.f.length;n&&t"}function E(e,n,t){var o="",r=0,i=-1,a=n.length;if(a)for(;~(i=e.indexOf(n,r));)o+=e.substr(r,i-r)+t,r=i+a;return o+=e.substr(r)}function b(e,n){var t="";return e.children.forEach(function(e){if(!~e.className.indexOf(ve)&&e.exsamp&&(t+=t?oe:"",t+=e.exsamp.q,n))for(var o=e.exsamp.q,r=0,i=o.length;!n.c&&r255&&(n.c=o.charAt(r),n.li=e)}),function(e){return k&&k.forEach(function(n,t){e=E(e,n,v(t))}),e}(t).replace(/\n/g,"\r\n")}function y(e){p(e).forEach(function(e){~e.className.indexOf(he)&&function(e){function n(e){var n=this.parentElement.nextElementSibling;this.remove(),e&&n&&h(n,!0)}var t,o=e.previousElementSibling;o&&o.exname&&(ee(o.getElementsByClassName(ge)).forEach(function(e){n.call(e)}),g(e),e.exblob=URL.createObjectURL(new Blob([b(e)],{type:"text/plain"})),(t=document.createElement(Se)).href=e.exblob,t.download=e.id+ce,t.className=ge,t.onclick=n,o.appendChild(t))}(e)})}function S(){document.getElementsByClassName(he).length&&(A||!De||confirm("Do you want to save the changes?"))&&(A=!0,y(),De&&function(e){var n,t,o,r,i,a=window.top.location;if("file:"==a.protocol&&(n=a.pathname.substr(1,a.pathname.lastIndexOf("/")))){for(var c={},s=p(e),f=0,m=s.length;!i&&fl;)c=l,l=t+oe.length,u++;n=a.substr(c,i-c),c=i-c,r=e.getBoundingClientRect(),o=getComputedStyle(e),e.scrollLeft=function(e,n){var t=document.createElement("canvas").getContext("2d");return t.font=n,t.measureText(e)}(n,o.font).width-r.width/2,e.scrollTop=parseInt(o.lineHeight)*u-r.height/2}(C.code))},128)}):t&&((o=new XMLHttpRequest).onreadystatechange=function(){this.readyState==(XMLHttpRequest.DONE||4)&&(~this.response.indexOf(Ce)?ee(Q.getElementsByClassName(he)).forEach(function(e){ne(e,he,!0)}):R||(R=!0,alert("The 'localhost-upload.py' server failed. You need to start the 'localhost-upload.py' server, to let changes being saved once CTRL + S is pressed (also make sure that only ANSI characters are allowed!!).")))},o.open("POST","http://localhost/"),o.send(t))}}())}function T(e,n){function t(e){return e&&(e.nextElementSibling||e.parentElement.nextElementSibling&&e.parentElement.nextElementSibling.nextElementSibling&&e.parentElement.nextElementSibling.nextElementSibling.firstElementChild)}function o(e){return e&&(e.previousElementSibling||e.parentElement.previousElementSibling&&e.parentElement.previousElementSibling.previousElementSibling&&e.parentElement.previousElementSibling.previousElementSibling.lastElementChild)}for(var r=-1==e||2==e?o:t,i=function(e,n){var r;return-2==e||2==e?(r=Q.getElementsByTagName(Te))&&r.length&&(-2==e?r.item(0):r.item(r.length-1))||null:-1==e?o(n):t(n)}(e,n);i&&~i.className.indexOf(pe);)i=r(i);return i}function L(){return(new Date).getTime()}function N(){function e(){var e,n="Runs in: "+function(e){function n(e,n){var o=1==e?t:t%e;return t=~~(t/e),o?o+n:""}for(var t=e,o=[n(1e3," ms"),n(60," sec"),n(60," min"),n(24," hour"),n(1," day")],r="",i=o.length-1;i>=0;i--)o[i]&&(r+=(r?" ":"")+o[i]);return r}(L()-c),t=window.extnfo,o=n;t&&(t.err&&(n+="\nError(s): "+(t.err||0)),t.run&&(n+="\nRun for: "+(t.run||0)+" times"),t.rel&&(n+="\nReplace path for: "+(t.rel||0)+" times"),t.occ&&(n+="\nUnique replace path for: "+t.occ.size+" times"),o=n,t.occ&&t.occ.forEach(function(e,n){o+="\n "+n}),e="\nChecksum: "+((t.run||0)*(t.run||0)+(t.rel||0)+1)*((t.err||0)+1)*((t.occ&&t.occ.size||0)+1)%256,n+=e,o+=e),setTimeout(function(){alert(n),console.log("--------------------------------"),console.log(o),console.log("--------------------------------")},128),window.exttsa=null}function n(){clearTimeout(t),t=setTimeout(function(){qe?e():(l(r,!0),u(r,0),window.extnfo=window.extnfo||{},window.extnfo.run=(window.extnfo.run||0)+1,(r=T(1,r))?n():e())},a)}var t,o,r=i(),a=64,c=L();if(!r&&(o=Q.getElementsByTagName(Qe)))for(var s=0,f=o.length;!r&&s/,Fe=/(?:.*\s*){2}/m,Ue="//e://t://k://Sample",De=comrun.isLocal(),qe=!1,je="AddTreeView,RemoveTreeView,TreeView,TreeColumnIndex".split(",");window.onload=function(){function n(){function e(e,n){var t,o=i.get(e.toLowerCase());o&&(t=document.getElementById(r(n)))&&Q.addUL(n.toLowerCase(),function(t){return t=function(e,n,t,o){var r="",i=0,a=-1,l=n.length;if(l)for(;~(a=e.indexOf(n,i));)r+=e.substr(i,a-i)+(o(a,n)?t:n),i=a+l;return r+=e.substr(i)}(t,e,n,function(e,n){function o(e){return/['"]/.test(e)}function r(e){return/\s|[\[\](){};,]/.test(e)||o(e)}for(var i,a=!0,l=e,c=e+n.length,u=t.length;l-1>0&&!r(t.charAt(l-1));)l--;for(l>0&&o(t.charAt(l-1))&&l--;co.clientWidth-18)&&o.exname?f(o.nextElementSibling):o.exsamp?t?confirm("You are about to delete '"+o.exsamp.sQ.d+"'. Is this really what you want to do?")&&function(e){if(e&&e.exsamp){var n=e.parentElement,t=n.previousElementSibling,o=i();e.remove(),d(t),!o&&window.top.history.replaceState(null,null,I.Set(Ie,null).href),ne(content,ye,o),h(n),De&&(e=function(e){for(var n=e.lastElementChild;n&&~n.className.indexOf(pe);)n=n.previousElementSibling;return n}(n))&&ne(e,xe)}}(o):l(o):o.className.indexOf(ge)<0&&(o==Q||!function(e){for(;e;){if(e.exsamp)return!0;e=e.parentElement}}(o))&&(c(),o.exname&&window.top.history.replaceState(null,null,I.Set(Ne,r(o.exname)).href)))})},Q.onkeydown=function(e){if(document.activeElement==Q){var n=0,t=e.keyCode,o=i();if(36==t&&(n=-2),38==t&&(n=-1),40==t&&(n=1),35==t&&(n=2),n)return e.altKey?Filter.focus():(l(o=T(n,o)||function(){var e,n,t=T(-2);if(t)for(n=t.offsetTop;t&&t.offsetTop-n'+r.exsamp.e+""+function(e){var n=He.exec(e);return n&&(e=e.substr(0,n.index).trim()),e}(r.exsamp.sQ.d)+"",e.insertBefore(r,o),t&&d(e.previousElementSibling),r},Q.addUL=function(e,n,t){function o(n){if(!c){var o=document.createElement(Le);o.exname=e,De&&(o.className=we),(c=document.createElement(Qe)).id=l,Q.insertBefore(c,function(e){for(var n=null,t=Q.getElementsByTagName(Qe),o=0,r=t.length;ot.item(o).id;o++)n=t.item(o);return n&&n.nextElementSibling||null}(l)),Q.insertBefore(o,c),d(o)}if(n=Z(n))return Q.addLI(c,n,null,t)}if(e){var i,a=-1,l=r(e),c=document.getElementById(l);return Y(Re,n,function(e){~a&&(i=o(n.substr(a,e.index-a))||i),a=e.index}),i=o(n.substr(a))||i,De&&i&&!~i.className.indexOf(ve)&&ne(i,xe),c}},Filter.oninput=function(){clearTimeout(M),M=setTimeout(function(){x(Filter.value||"")},256)},Filter.onkeydown=function(e){if(38==e.keyCode||40==e.keyCode)return Q.focus(),!1},C=content.contentWindow,I=new D(function(){var e="";return j(function(){e=window.top.location.href},window),e}()),(B=new D(I.o.host)).Set("config","/js"),t(),ke=~~((~~P(se)||ke+1)-1),o(),e(ke),document.getElementsByClassName(Ee).forEach(function(e){(k=k||new Map).set(e.id,E(e.innerHTML,"-x_yz2","").trim())}),n()},window.onpointerdown=window.onmousedown=function(e){var n=function(e){var n=e&&e.target;if(n.tagName==ie)return n}(e);if((!n||n.getAttribute(ue)!=le)&&m(e))return q(e)},window.onclick=function(e){var n=m(e);if(n)return l(n.parentElement),q(e)},window.onbeforeunload=function(){g(),V(se,ke+1),V(fe,Filter.value),V(me,function(){var e="",n=i();return n&&(e=n.parentElement.id+":"+n.exsamp.e),e}())},window.onresize=function(){t(),e(ke),n()},window.onkeydown=function(e){var n=!1;switch(e.keyCode){case 83:(n=e.ctrlKey)&&S();break;case 27:qe=!0;break;case 13:(n=De&&e.shiftKey&&e.ctrlKey)&&N()}if(n)return q(e)},window.onexample=function(e){var n,t,o=e,r=i();r&&r.exsamp.q!=o&&(r.exsamp=s(o,0,r),(n=a(r,ae))&&(n.innerHTML=r.exsamp.e),(t=a(r,ie))&&(t.innerHTML=r.exsamp.sQ.d),h(r.parentElement)),S()},window.setError=function(e,n,t,o){e&&(qe=!0)},window.testAll=N}();