(function(){(function(){'use strict';var e={"class":"className",contenteditable:"contentEditable","for":"htmlFor",readonly:"readOnly",maxlength:"maxLength",tabindex:"tabIndex",colspan:"colSpan",rowspan:"rowSpan",usemap:"useMap"};function aa(a,b){try{return a(b)}catch(c){return b}} var k=document,m=window,ba=k.documentElement,n=k.createElement.bind(k),ca=n("div"),p=n("table"),da=n("tbody"),ea=n("tr"),q=Array.isArray,r=Array.prototype,fa=r.concat,t=r.filter,ha=r.indexOf,ia=r.map,ja=r.push,ka=r.slice,u=r.some,la=r.splice,ma=/^#(?:[\w-]|\\.|[^\x00-\xa0])*$/,na=/^\.(?:[\w-]|\\.|[^\x00-\xa0])*$/,oa=/<.+>/,pa=/^\w+$/;function v(a,b){return a&&(w(b)||x(b))?na.test(a)?b.getElementsByClassName(a.slice(1)):pa.test(a)?b.getElementsByTagName(a):b.querySelectorAll(a):[]} var B=function(){function a(a,c){if(a){if(a instanceof B)return a;var b=a;if(C(a)){if(b=(c instanceof B?c[0]:c)||k,b=ma.test(a)?b.getElementById(a.slice(1)):oa.test(a)?qa(a):v(a,b),!b)return}else if(D(a))return this.ready(a);if(b.nodeType||b===m)b=[b];this.length=b.length;a=0;for(c=this.length;aa?a+this.length:a]};E.eq=function(a){return F(this.get(a))};E.first=function(){return this.eq(0)};E.last=function(){return this.eq(-1)};function J(a,b,c){if(c)for(c=a.length;c--&&!1!==b.call(a[c],c,a[c]););else if(I(a)){var d=Object.keys(a);c=0;for(var h=d.length;carguments.length?this[0]&&this[0][a]:this.each(function(c,h){h[a]=b});for(var c in a)this.prop(c,a[c]);return this}};E.removeProp=function(a){return this.each(function(b,c){delete c[e[a]||a]})};function K(){for(var a=[],b=0;barguments.length){if(!this[0]||!x(this[0]))return;var c=this[0].getAttribute(a);return null===c?void 0:c}return void 0===b?this:null===b?this.removeAttr(a):this.each(function(c,h){x(h)&&h.setAttribute(a,b)})}for(c in a)this.attr(c,a[c]);return this}};E.toggleClass=function(a,b){var c=N(a),d=void 0!==b;return this.each(function(a,f){x(f)&&J(c,function(a,c){d?b?f.classList.add(c):f.classList.remove(c):f.classList.toggle(c)})})};E.addClass=function(a){return this.toggleClass(a,!0)};E.removeClass=function(a){return arguments.length?this.toggleClass(a,!1):this.attr("class","")};function O(a,b,c,d){for(var h=[],f=D(b),g=d&&L(d),y=0,z=a.length;yarguments.length)return this[0]&&Q(this[0],a,c);if(!a)return this;b=za(a,b,c);return this.each(function(d,f){x(f)&&(c?f.style.setProperty(a,b):f.style[a]=b)})}for(var d in a)this.css(d,a[d]);return this};var Aa=/^\s+|\s+$/;function Ba(a,b){a=a.dataset[b]||a.dataset[G(b)];return Aa.test(a)?a:aa(JSON.parse,a)} E.data=function(a,b){if(!a){if(!this[0])return;var c={},d;for(d in this[0].dataset)c[d]=Ba(this[0],d);return c}if(C(a))return 2>arguments.length?this[0]&&Ba(this[0],a):void 0===b?this:this.each(function(c,d){c=b;c=aa(JSON.stringify,c);d.dataset[G(a)]=c});for(d in a)this.data(d,a[d]);return this};function Ca(a,b){var c=a.documentElement;return Math.max(a.body["scroll"+b],c["scroll"+b],a.body["offset"+b],c["offset"+b],c["client"+b])} function Da(a,b){return R(a,"border"+(b?"Left":"Top")+"Width")+R(a,"padding"+(b?"Left":"Top"))+R(a,"padding"+(b?"Right":"Bottom"))+R(a,"border"+(b?"Right":"Bottom")+"Width")} J([!0,!1],function(a,b){J(["Width","Height"],function(a,d){E[(b?"outer":"inner")+d]=function(c){if(this[0])return H(this[0])?b?this[0]["inner"+d]:this[0].document.documentElement["client"+d]:w(this[0])?Ca(this[0],d):this[0][(b?"offset":"client")+d]+(c&&b?R(this[0],"margin"+(a?"Top":"Left"))+R(this[0],"margin"+(a?"Bottom":"Right")):0)}})});J(["Width","Height"],function(a,b){var c=b.toLowerCase();E[c]=function(d){if(!this[0])return void 0===d?void 0:this;if(!arguments.length)return H(this[0])?this[0].document.documentElement["client"+b]:w(this[0])?Ca(this[0],b):this[0].getBoundingClientRect()[c]-Da(this[0],!a);var h=parseInt(d,10);return this.each(function(b,d){x(d)&&(b=Q(d,"boxSizing"),d.style[c]=za(c,h+("border-box"===b?Da(d,!a):0)))})}});var U={};E.toggle=function(a){return this.each(function(b,c){if(x(c))if(void 0===a?"none"===Q(c,"display"):a){if(c.style.display=c.___cd||"","none"===Q(c,"display")){b=c.style;c=c.tagName;if(U[c])c=U[c];else{var d=n(c);k.body.insertBefore(d,null);var h=Q(d,"display");k.body.removeChild(d);c=U[c]="none"!==h?h:"block"}b.display=c}}else c.___cd=Q(c,"display"),c.style.display="none"})};E.hide=function(){return this.toggle(!1)};E.show=function(){return this.toggle(!0)};function Ea(a,b){return!b||!u.call(b,function(b){return 0>a.indexOf(b)})}var V={focus:"focusin",blur:"focusout"},W={mouseenter:"mouseover",mouseleave:"mouseout"},Fa=/^(mouse|pointer|contextmenu|drag|drop|click|dblclick)/i;function Ga(a,b,c,d,h){var f=a.___ce=a.___ce||{};f[b]=f[b]||[];f[b].push([c,d,h]);a.addEventListener(b,h)}function X(a){a=a.split(".");return[a[0],a.slice(1).sort()]} function Y(a,b,c,d,h){var f=a.___ce=a.___ce||{};if(b)f[b]&&(f[b]=f[b].filter(function(f){var g=f[0],z=f[1];f=f[2];if(h&&f.guid!==h.guid||!Ea(g,c)||d&&d!==z)return!0;a.removeEventListener(b,f)}));else for(b in f)Y(a,b,c,d,h)} E.off=function(a,b,c){var d=this;if(void 0===a)this.each(function(a,b){(x(b)||w(b)||H(b))&&Y(b)});else if(C(a))D(b)&&(c=b,b=""),J(N(a),function(a,h){a=X(h);h=a[0];var f=a[1],g=W[h]||V[h]||h;d.each(function(a,d){(x(d)||w(d)||H(d))&&Y(d,g,f,b,c)})});else for(var h in a)this.off(h,a[h]);return this};E.on=function(a,b,c,d,h){var f=this;if(!C(a)){for(var g in a)this.on(g,b,c,a[g],h);return this}C(b)||(void 0!==b&&null!==b&&(void 0!==c&&(d=c),c=b),b="");D(d)||(d=c,c=void 0);if(!d)return this;J(N(a),function(a,g){a=X(g);g=a[0];var l=a[1],z=W[g]||V[g]||g,y=g in W,Ka=g in V;z&&f.each(function(a,f){if(x(f)||w(f)||H(f))a=function La(a){if(a.target["___i"+a.type])return a.stopImmediatePropagation();if(!a.namespace||Ea(l,a.namespace.split(".")))if(b||!(Ka&&(a.target!==f||a.___ot===z)||y&&a.relatedTarget&&f.contains(a.relatedTarget))){var g=f;if(b){for(var A=a.target;!sa(A,b);){if(A===f)return;A=A.parentNode;if(!A)return}g=A;a.___cd=!0}a.___cd&&Object.defineProperty(a,"currentTarget",{configurable:!0,get:function(){return g}});Object.defineProperty(a,"data",{configurable:!0,get:function(){return c}});A=d.call(g,a,a.___td);h&&Y(f,z,l,b,La);!1===A&&(a.preventDefault(),a.stopPropagation())}},a.guid=d.guid=d.guid||F.guid++,Ga(f,z,l,b,a)})});return this};E.one=function(a,b,c,d){return this.on(a,b,c,d,!0)};E.ready=function(a){function b(){return setTimeout(a,0,F)}"loading"!==k.readyState?b():k.addEventListener("DOMContentLoaded",b);return this};E.trigger=function(a,b){if(C(a)){var c=X(a),d=c[0];c=c[1];var h=W[d]||V[d]||d;if(!h)return this;var f=Fa.test(h)?"MouseEvents":"HTMLEvents";a=k.createEvent(f);a.initEvent(h,!0,!0);a.namespace=c.join(".");a.___ot=d}a.___td=b;var g=a.___ot in V;return this.each(function(b,c){g&&D(c[a.___ot])&&(c["___i"+a.type]=!0,c[a.___ot](),c["___i"+a.type]=!1);c.dispatchEvent(a)})};function Ha(a){return a.multiple&&a.options?O(t.call(a.options,function(a){return a.selected&&!a.disabled&&!a.parentNode.disabled}),"value"):a.value||""}var Ia=/%20/g,Ja=/\r?\n/g,Ma=/file|reset|submit|button|image/i,Na=/radio|checkbox/i;E.serialize=function(){var a="";this.each(function(b,c){J(c.elements||[c],function(b,c){c.disabled||!c.name||"FIELDSET"===c.tagName||Ma.test(c.type)||Na.test(c.type)&&!c.checked||(b=Ha(c),void 0!==b&&(b=q(b)?b:[b],J(b,function(b,d){b=a;d="&"+encodeURIComponent(c.name)+"="+encodeURIComponent(d.replace(Ja,"\r\n")).replace(Ia,"+");a=b+d})))})});return a.slice(1)};E.val=function(a){return arguments.length?this.each(function(b,c){if((b=c.multiple&&c.options)||Na.test(c.type)){var d=q(a)?ia.call(a,String):null===a?[]:[String(a)];b?J(c.options,function(a,b){b.selected=0<=d.indexOf(b.value)},!0):c.checked=0<=d.indexOf(c.value)}else c.value=void 0===a||null===a?"":a}):this[0]&&Ha(this[0])};E.clone=function(){return this.map(function(a,b){return b.cloneNode(!0)})};E.detach=function(a){M(this,a).each(function(a,c){c.parentNode&&c.parentNode.removeChild(c)});return this};var Oa=/^\s*<(\w+)[^>]*>/,Pa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,Qa={"*":ca,tr:da,td:ea,th:ea,thead:p,tbody:p,tfoot:p};function qa(a){if(!C(a))return[];if(Pa.test(a))return[n(RegExp.$1)];var b=Oa.test(a)&&RegExp.$1;b=Qa[b]||Qa["*"];b.innerHTML=a;return F(b.childNodes).detach().get()}F.parseHTML=qa;E.empty=function(){return this.each(function(a,b){for(;b.firstChild;)b.removeChild(b.firstChild)})};E.html=function(a){return arguments.length?void 0===a?this:this.each(function(b,c){x(c)&&(c.innerHTML=a)}):this[0]&&this[0].innerHTML};E.remove=function(a){M(this,a).detach().off();return this};E.text=function(a){return void 0===a?this[0]?this[0].textContent:"":this.each(function(b,c){x(c)&&(c.textContent=a)})};E.unwrap=function(){this.parent().each(function(a,b){"BODY"!==b.tagName&&(a=F(b),a.replaceWith(a.children()))});return this};E.offset=function(){var a=this[0];if(a)return a=a.getBoundingClientRect(),{top:a.top+m.pageYOffset,left:a.left+m.pageXOffset}};E.offsetParent=function(){return this.map(function(a,b){for(a=b.offsetParent;a&&"static"===Q(a,"position");)a=a.offsetParent;return a||ba})};E.position=function(){var a=this[0];if(a){var b="fixed"===Q(a,"position"),c=b?a.getBoundingClientRect():this.offset();if(!b){var d=a.ownerDocument;for(b=a.offsetParent||d.documentElement;(b===d.body||b===d.documentElement)&&"static"===Q(b,"position");)b=b.parentNode;b!==a&&x(b)&&(d=F(b).offset(),c.top-=d.top+R(b,"borderTopWidth"),c.left-=d.left+R(b,"borderLeftWidth"))}return{top:c.top-R(a,"marginTop"),left:c.left-R(a,"marginLeft")}}};E.children=function(a){return M(F(P(O(this,function(a){return a.children}))),a)};E.contents=function(){return F(P(O(this,function(a){return"IFRAME"===a.tagName?[a.contentDocument]:"TEMPLATE"===a.tagName?a.content.childNodes:a.childNodes})))};E.find=function(a){return F(P(O(this,function(b){return v(a,b)})))};var Ra=/^\s*\s*$/g,Sa=/^$|^module$|\/(java|ecma)script/i,Ta=["type","src","nonce","noModule"];function Ua(a,b){a=F(a);a.filter("script").add(a.find("script")).each(function(a,d){if(Sa.test(d.type)&&ba.contains(d)){var c=n("script");c.text=d.textContent.replace(Ra,"");J(Ta,function(a,b){d[b]&&(c[b]=d[b])});b.head.insertBefore(c,null);b.head.removeChild(c)}})} function Z(a,b,c,d,h,f,g,y){J(a,function(a,f){J(F(f),function(a,f){J(F(b),function(b,g){var l=c?g:f;b=c?a:b;g=c?f:g;l=b?l.cloneNode(!0):l;b=!b;h?g.insertBefore(l,d?g.firstChild:null):g.parentNode.insertBefore(l,d?g:g.nextSibling);b&&Ua(l,g.ownerDocument)},y)},g)},f);return b}E.after=function(){return Z(arguments,this,!1,!1,!1,!0,!0)};E.append=function(){return Z(arguments,this,!1,!1,!0)};E.appendTo=function(a){return Z(arguments,this,!0,!1,!0)};E.before=function(){return Z(arguments,this,!1,!0)};E.insertAfter=function(a){return Z(arguments,this,!0,!1,!1,!1,!1,!0)};E.insertBefore=function(a){return Z(arguments,this,!0,!0)};E.prepend=function(){return Z(arguments,this,!1,!0,!0,!0,!0)};E.prependTo=function(a){return Z(arguments,this,!0,!0,!0,!1,!1,!0)};E.replaceWith=function(a){return this.before(a).remove()};E.replaceAll=function(a){F(a).replaceWith(this);return this};E.wrapAll=function(a){a=F(a);for(var b=a[0];b.children.length;)b=b.firstElementChild;this.first().before(a);return this.appendTo(b)};E.wrap=function(a){return this.each(function(b,c){var d=F(a)[0];F(c).wrapAll(b?d.cloneNode(!0):d)})};E.wrapInner=function(a){return this.each(function(b,c){b=F(c);c=b.contents();c.length?c.wrapAll(a):b.append(a)})};E.has=function(a){var b=C(a)?function(b,d){return v(a,d).length}:function(b,d){return d.contains(a)};return this.filter(b)};E.is=function(a){var b=L(a);return u.call(this,function(a,d){return b.call(a,d,a)})};E.next=function(a,b,c){return M(F(P(O(this,"nextElementSibling",b,c))),a)};E.nextAll=function(a){return this.next(a,!0)};E.nextUntil=function(a,b){return this.next(b,!0,a)};E.not=function(a){var b=L(a);return this.filter(function(c,d){return(!C(a)||x(d))&&!b.call(d,c,d)})};E.parent=function(a){return M(F(P(O(this,"parentNode"))),a)};E.index=function(a){var b=a?F(a)[0]:this[0];a=a?this:F(b).parent().children();return ha.call(a,b)};E.closest=function(a){var b=this.filter(a);if(b.length)return b;var c=this.parent();return c.length?c.closest(a):b};E.parents=function(a,b){return M(F(P(O(this,"parentElement",!0,b))),a)};E.parentsUntil=function(a,b){return this.parents(b,a)};E.prev=function(a,b,c){return M(F(P(O(this,"previousElementSibling",b,c))),a)};E.prevAll=function(a){return this.prev(a,!0)};E.prevUntil=function(a,b){return this.prev(b,!0,a)};E.siblings=function(a){return M(F(P(O(this,function(a){return F(a).parent().children().not(a)}))),a)};"undefined"!==typeof exports?module.exports=F:m.cash=m.$=F;})();!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SlimSelect=t():e.SlimSelect=t()}(window,function(){return s={},n.m=i=[function(e,t,i){"use strict";function s(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var i=document.createEvent("CustomEvent");return i.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),i}var n;t.__esModule=!0,t.hasClassInTree=function(e,t){function s(e,t){return t&&e&&e.classList&&e.classList.contains(t)?e:null}return s(e,t)||function e(t,i){return t&&t!==document?s(t,i)?t:e(t.parentNode,i):null}(e,t)},t.ensureElementInView=function(e,t){var i=e.scrollTop+e.offsetTop,s=i+e.clientHeight,n=t.offsetTop,a=n+t.clientHeight;n=window.innerHeight?"above":i?t:"below"},t.debounce=function(n,a,o){var l;return void 0===a&&(a=100),void 0===o&&(o=!1),function(){for(var e=[],t=0;t[^<>]*'+l+"")},t.kebabCase=function(e){var t=e.replace(/[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g,function(e){return"-"+e.toLowerCase()});return e[0]===e[0].toUpperCase()?t.substring(1):t},"function"!=typeof(n=window).CustomEvent&&(s.prototype=n.Event.prototype,n.CustomEvent=s)},function(e,t,i){"use strict";t.__esModule=!0;var s=(n.prototype.newOption=function(e){return{id:e.id?e.id:String(Math.floor(1e8*Math.random())),value:e.value?e.value:"",text:e.text?e.text:"",innerHTML:e.innerHTML?e.innerHTML:"",selected:!!e.selected&&e.selected,display:void 0===e.display||e.display,disabled:!!e.disabled&&e.disabled,placeholder:!!e.placeholder&&e.placeholder,class:e.class?e.class:void 0,data:e.data?e.data:{},mandatory:!!e.mandatory&&e.mandatory}},n.prototype.add=function(e){this.data.push({id:String(Math.floor(1e8*Math.random())),value:e.value,text:e.text,innerHTML:"",selected:!1,display:!0,disabled:!1,placeholder:!1,class:void 0,mandatory:e.mandatory,data:{}})},n.prototype.parseSelectData=function(){this.data=[];for(var e=0,t=this.main.select.element.childNodes;e{}),onSubmit:L=(()=>{}),onOpened:v=(()=>{}),onReset:f=(()=>{}),onRender:x=(()=>{}),onClose:A=(()=>{}),noResults:g=(()=>{}),onSelectedItem:b=(()=>{})}){var T;t(this,"init",()=>{const t=this.root;this.clearbutton(),this.output(),t.addEventListener("input",this.handleInput),this.showAll&&t.addEventListener("click",this.handleInput),this.onRender({element:t,results:this.resultList})}),t(this,"cacheAct",(t,e)=>{const s=this.root;this.cache&&("update"===t?s.setAttribute(this.cacheData,e.value):"remove"===t?s.removeAttribute(this.cacheData):s.value=s.getAttribute(this.cacheData))}),t(this,"handleInput",({target:t,type:e})=>{if("true"===this.root.getAttribute("aria-expanded")&&"click"===e)return;const s=t.value.replace(this.regex,"\\$&");if(this.cacheAct("update",t),this.showAll&&"click"===e)return this.reset(),void this.searchItem(s.trim());clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.searchItem(s.trim())},this.delay)}),t(this,"output",()=>{this.setAttr(this.resultList,{id:this.outputUl,tabIndex:"0",role:"listbox"}),this.setAttr(this.resultWrap,{addClass:this.prefix+"-wrapper"}),this.resultWrap.insertAdjacentElement("beforeend",this.resultList),this.root.parentNode.insertBefore(this.resultWrap,this.root.nextSibling)}),t(this,"reset",()=>{var t;this.setAttr(this.root,{"aria-owns":this.id+"-list","aria-expanded":"false","aria-autocomplete":"list","aria-activedescendant":"",role:"combobox",removeClass:"auto-expanded"}),this.resultWrap.classList.remove(this.isActive),this.scrollResultsToTop(),(0==(null===(t=this.matches)||void 0===t?void 0:t.length)&&!this.toInput||this.showAll)&&(this.resultList.innerHTML=""),this.index=this.selectFirst?0:-1,this.onClose()}),t(this,"scrollResultsToTop",()=>{this.resultList.scrollTop=this.resultList.offsetTop-this.resultWrap.offsetHeight}),t(this,"searchItem",t=>{this.value=t,this.onLoading(!0),this.showBtn(),0==t.length&&this.clearButton&&this.cBtn.classList.add("hidden"),this.characters>t.length&&!this.showAll?this.onLoading():this.onSearch({currentValue:t,element:this.root}).then(e=>{const s=this.root.value.length,i=e.length;this.matches=Array.isArray(e)?[...e]:JSON.parse(JSON.stringify(e)),this.onLoading(),this.error(),0==i&&0==s&&this.cBtn.classList.add("hidden"),0==i&&s?(this.root.classList.remove("auto-expanded"),this.reset(),this.noResults({element:this.root,currentValue:t,template:this.results}),this.events()):(i>0||(t=>t&&"object"==typeof t&&t.constructor===Object)(e))&&(this.index=this.selectFirst?0:-1,this.results(),this.events())}).catch(()=>{this.onLoading(),this.reset()})}),t(this,"onLoading",t=>this.root.parentNode.classList[t?"add":"remove"](this.isLoading)),t(this,"error",()=>this.root.classList.remove(this.err)),t(this,"events",()=>{this.root.addEventListener("keydown",this.handleKeys),this.root.addEventListener("click",this.handleShowItems),["mousemove","click"].map(t=>{this.resultList.addEventListener(t,this.handleMouse)}),document.addEventListener("click",this.handleDocClick)}),t(this,"results",t=>{this.setAttr(this.root,{"aria-expanded":"true",addClass:this.prefix+"-expanded"}),this.resultList.innerHTML=0===this.matches.length?this.onResults({currentValue:this.value,matches:0,template:t}):this.onResults({currentValue:this.value,matches:this.matches,classGroup:this.classGroup}),this.resultWrap.classList.add(this.isActive),this.scrollResultsToTop();const e=this.classGroup?`:not(.${this.classGroup})`:"";this.itemsLi=document.querySelectorAll(`#${this.outputUl} > li${e}`),this.selectFirstEl(),this.onOpened({type:"results",element:this.root,results:this.resultList}),this.addAria()}),t(this,"handleDocClick",({target:t})=>{let e=null;(t.closest("ul")&&this.disable||t.closest("."+this.prevClosing))&&(e=!0),t.id===this.id||e||this.reset()}),t(this,"addAria",()=>{for(let t=0;t{if(this.remAria(document.querySelector("."+this.activeList)),!this.selectFirst)return;const{firstElementChild:t}=this.resultList,e=this.classGroup&&this.matches.length>0&&this.selectFirst?t.nextElementSibling:t;this.setAttr(e,{id:this.selectedOption+"-0",addClass:this.activeList,"aria-selected":"true"}),this.setAriaDes(this.selectedOption+"-0"),this.follow(t)}),t(this,"showBtn",()=>{this.cBtn&&(this.cBtn.classList.remove("hidden"),this.cBtn.addEventListener("click",this.destroy))}),t(this,"setAttr",(t,e)=>{for(let s in e)"addClass"===s?t.classList.add(e[s]):"removeClass"===s?t.classList.remove(e[s]):t.setAttribute(s,e[s])}),t(this,"handleShowItems",()=>{const t=this.resultWrap;this.resultList.textContent.length>0&&!t.classList.contains(this.isActive)&&(this.setAttr(this.root,{"aria-expanded":"true",addClass:this.prefix+"-expanded"}),t.classList.add(this.isActive),this.scrollResultsToTop(),this.selectFirstEl(),this.onOpened({type:"showItems",element:this.root,results:this.resultList}))}),t(this,"handleMouse",t=>{t.preventDefault();const{target:e,type:s}=t,i=e.closest("li"),h=null==i?void 0:i.hasAttribute("role"),r=this.activeList,o=document.querySelector("."+r);i&&h&&("click"===s&&this.getTextFromLi(i),"mousemove"!==s||i.classList.contains(r)||(this.remAria(o),this.setAria(i),this.index=this.indexLiSelected(i),this.onSelected({index:this.index,element:this.root,object:this.matches[this.index]})))}),t(this,"getTextFromLi",t=>{t&&0!==this.matches.length?(this.addToInput(t),this.onSubmit({index:this.index,element:this.root,object:this.matches[this.index],results:this.resultList}),this.disable||(this.remAria(t),this.reset()),this.clearButton&&this.cBtn.classList.remove("hidden"),this.cacheAct("remove")):!this.disable&&this.reset()}),t(this,"firstElement",t=>t.firstElementChild||t),t(this,"addToInput",t=>{this.root.value=this.firstElement(t).textContent.trim()}),t(this,"indexLiSelected",t=>Array.prototype.indexOf.call(this.itemsLi,t)),t(this,"handleKeys",t=>{const e=this.keyCodes,{keyCode:s}=t,i=this.resultWrap.classList.contains(this.isActive),h=this.matches.length+1;switch(this.selectedLi=document.querySelector("."+this.activeList),s){case e.UP:case e.DOWN:if(t.preventDefault(),h<=1&&this.selectFirst||!i)return;s===e.UP?(this.index<0&&(this.index=h-1),this.index-=1):(this.index+=1,this.index>=h&&(this.index=0)),this.remAria(this.selectedLi),h>0&&this.index>=0&&this.index{const e=`${this.selectedOption}-${this.indexLiSelected(t)}`;this.setAttr(t,{id:e,"aria-selected":"true",addClass:this.activeList}),this.setAriaDes(e),this.follow(t)}),t(this,"getClassGroupHeight",()=>{const t=document.querySelectorAll(`#${this.outputUl} > li:not(.${this.classGroup})`);let e=0;return[].slice.call(t).map(t=>e+=t.offsetHeight),e}),t(this,"follow",t=>{const e=this.resultList,s=e.previousSibling,i=s?s.offsetHeight:0;if("0"==t.getAttribute("aria-posinset")&&(e.scrollTop=t.offsetTop-this.getClassGroupHeight()),t.offsetTop-ie.scrollTop+e.offsetHeight&&(e.scrollTop=s-e.offsetHeight)}}),t(this,"remAria",t=>{t&&this.setAttr(t,{id:"",removeClass:this.activeList,"aria-selected":"false"})}),t(this,"setAriaDes",t=>this.root.setAttribute("aria-activedescendant",t||"")),t(this,"clearbutton",()=>{this.clearButton&&(this.setAttr(this.cBtn,{class:this.prefix+"-clear hidden",type:"button","aria-label":"claar text from input"}),this.root.insertAdjacentElement("afterend",this.cBtn))}),t(this,"destroy",()=>{this.clearButton&&this.cBtn.classList.add("hidden"),this.root.value="",this.root.focus(),this.resultList.textContent="",this.reset(),this.error(),this.onReset(this.root),this.root.removeEventListener("keydown",this.handleKeys),this.root.removeEventListener("click",this.handleShowItems),document.removeEventListener("click",this.handleDocClick)}),this.id=e,this.root=document.getElementById(this.id),this.onSearch=(T=p,Boolean(T&&"function"==typeof T.then)?p:({currentValue:t,element:e})=>Promise.resolve(p({currentValue:t,element:e}))),this.onResults=m,this.onRender=x,this.onSubmit=L,this.onSelected=b,this.onOpened=v,this.onReset=f,this.noResults=g,this.onClose=A,this.delay=s,this.characters=h,this.clearButton=i,this.selectFirst=r,this.toInput=o,this.showAll=l,this.classGroup=c,this.prevClosing=d,this.prefix=u?u+"-auto":"auto",this.disable=a,this.cache=n,this.outputUl=`${this.prefix}-${this.id}-results`,this.cacheData="data-cache-auto-"+this.id,this.isLoading=this.prefix+"-is-loading",this.isActive=this.prefix+"-is-active",this.activeList=this.prefix+"-selected",this.selectedOption=this.prefix+"-selected-option",this.err=this.prefix+"-error",this.regex=/[|\\{}()[\]^$+*?.]/g,this.timeout=null,this.resultWrap=document.createElement("div"),this.resultList=document.createElement("ul"),this.cBtn=document.createElement("button"),this.keyCodes={ESC:27,ENTER:13,UP:38,DOWN:40,TAB:9},this.init()}}}();let style=`.ss-main{position: relative;display: inline-block;user-select: none;color: #666;width: 100% }.ss-main .ss-single-selected{display: flex;cursor: pointer;width: 100%;height: 30px;padding: 6px;border: 1px solid #dcdee2;border-radius: 4px;background-color: #fff;outline: 0;box-sizing: border-box;transition: background-color .2s }.ss-main .ss-single-selected.ss-disabled{background-color: #dcdee2;cursor: not-allowed }.ss-main .ss-single-selected.ss-open-above{border-top-left-radius: 0;border-top-right-radius: 0 }.ss-main .ss-single-selected.ss-open-below{border-bottom-left-radius: 0;border-bottom-right-radius: 0 }.ss-main .ss-single-selected .placeholder{display: flex;flex: 1 1 100%;align-items: center;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;text-align: left;width: calc(100% - 30px);line-height: 1em;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none }.ss-main .ss-single-selected .placeholder *{display: flex;align-items: center;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width: auto }.ss-main .ss-single-selected .placeholder .ss-disabled{color: #dedede }.ss-main .ss-single-selected .ss-deselect{display: flex;align-items: center;justify-content: flex-end;flex: 0 1 auto;margin: 0 6px 0 6px;font-weight: 700 }.ss-main .ss-single-selected .ss-deselect.ss-hide{display: none }.ss-main .ss-single-selected .ss-arrow{display: flex;align-items: center;justify-content: flex-end;flex: 0 1 auto;margin: 0 6px 0 6px }.ss-main .ss-single-selected .ss-arrow span{border: solid #666;border-width: 0 2px 2px 0;display: inline-block;padding: 3px;transition: transform .2s, margin .2s }.ss-main .ss-single-selected .ss-arrow span.arrow-up{transform: rotate(-135deg);margin: 3px 0 0 0 }.ss-main .ss-single-selected .ss-arrow span.arrow-down{transform: rotate(45deg);margin: -3px 0 0 0 }.ss-main .ss-multi-selected{display: flex;flex-direction: row;cursor: pointer;min-height: 30px;width: 100%;padding: 0 0 0 3px;border: 1px solid #dcdee2;border-radius: 4px;background-color: #fff;outline: 0;box-sizing: border-box;transition: background-color .2s }.ss-main .ss-multi-selected.ss-disabled{background-color: #dcdee2;cursor: not-allowed }.ss-main .ss-multi-selected.ss-disabled .ss-values .ss-disabled{color: #666 }.ss-main .ss-multi-selected.ss-disabled .ss-values .ss-value .ss-value-delete{cursor: not-allowed }.ss-main .ss-multi-selected.ss-open-above{border-top-left-radius: 0;border-top-right-radius: 0 }.ss-main .ss-multi-selected.ss-open-below{border-bottom-left-radius: 0;border-bottom-right-radius: 0 }.ss-main .ss-multi-selected .ss-values{display: flex;flex-wrap: wrap;justify-content: flex-start;flex: 1 1 100%;width: calc(100% - 30px) }.ss-main .ss-multi-selected .ss-values .ss-disabled{display: flex;padding: 4px 5px;margin: 2px 0;line-height: 1em;align-items: center;width: 100%;color: #dedede;overflow: hidden;text-overflow: ellipsis;white-space: nowrap }@keyframes scaleIn{0%{transform: scale(0);opacity: 0 }100%{transform: scale(1);opacity: 1 }}@keyframes scaleOut{0%{transform: scale(1);opacity: 1 }100%{transform: scale(0);opacity: 0 }}.ss-main .ss-multi-selected .ss-values .ss-value{display: flex;user-select: none;align-items: center;font-size: 12px;padding: 3px 5px;margin: 3px 5px 3px 0;color: #fff;background-color: #5897fb;border-radius: 4px;animation-name: scaleIn;animation-duration: .2s;animation-timing-function: ease-out;animation-fill-mode: both }.ss-main .ss-multi-selected .ss-values .ss-value.ss-out{animation-name: scaleOut;animation-duration: .2s;animation-timing-function: ease-out }.ss-main .ss-multi-selected .ss-values .ss-value .ss-value-delete{margin: 0 0 0 5px;cursor: pointer }.ss-main .ss-multi-selected .ss-add{display: flex;flex: 0 1 3px;margin: 9px 12px 0 5px }.ss-main .ss-multi-selected .ss-add .ss-plus{display: flex;justify-content: center;align-items: center;background: #666;position: relative;height: 10px;width: 2px;transition: transform .2s }.ss-main .ss-multi-selected .ss-add .ss-plus:after{background: #666;content: "";position: absolute;height: 2px;width: 10px;left: -4px;top: 4px }.ss-main .ss-multi-selected .ss-add .ss-plus.ss-cross{transform: rotate(45deg) }.ss-content{position: absolute;width: 100%;margin: -1px 0 0 0;box-sizing: border-box;border: solid 1px #dcdee2;z-index: 1010;background-color: #fff;transform-origin: center top;transition: transform .2s, opacity .2s;opacity: 0;transform: scaleY(0) }.ss-content.ss-open{display: block;opacity: 1;transform: scaleY(1) }.ss-content .ss-search{display: flex;flex-direction: row;padding: 8px 8px 6px 8px }.ss-content .ss-search.ss-hide{height: 0;opacity: 0;padding: 0;margin: 0 }.ss-content .ss-search.ss-hide input{height: 0;opacity: 0;padding: 0;margin: 0 }.ss-content .ss-search input{display: inline-flex;font-size: inherit;line-height: inherit;flex: 1 1 auto;width: 100%;min-width: 0;height: 30px;padding: 6px 8px;margin: 0;border: 1px solid #dcdee2;border-radius: 4px;background-color: #fff;outline: 0;text-align: left;box-sizing: border-box;-webkit-box-sizing: border-box;-webkit-appearance: textfield }.ss-content .ss-search input::placeholder{color: #8a8a8a;vertical-align: middle }.ss-content .ss-search .ss-addable{display: inline-flex;justify-content: center;align-items: center;cursor: pointer;font-size: 22px;font-weight: 700;flex: 0 0 30px;height: 30px;margin: 0 0 0 8px;border: 1px solid #dcdee2;border-radius: 4px;box-sizing: border-box }.ss-content .ss-addable{padding-top: 0 }.ss-content .ss-list{max-height: 200px;overflow-x: hidden;overflow-y: auto;text-align: left }.ss-content .ss-list .ss-optgroup .ss-optgroup-label{padding: 6px 10px 6px 10px;font-weight: 700 }.ss-content .ss-list .ss-optgroup .ss-option{padding: 6px 6px 6px 25px }.ss-content .ss-list .ss-optgroup-label-selectable{cursor: pointer }.ss-content .ss-list .ss-optgroup-label-selectable:hover{color: #fff;background-color: #5897fb }.ss-content .ss-list .ss-option{padding: 6px 10px 6px 10px;cursor: pointer;user-select: none }.ss-content .ss-list .ss-option *{display: inline-block }.ss-content .ss-list .ss-option.ss-highlighted,.ss-content .ss-list .ss-option:hover{color: #fff;background-color: #5897fb }.ss-content .ss-list .ss-option.ss-disabled{cursor: not-allowed;color: #dedede;background-color: #fff }.ss-content .ss-list .ss-option:not(.ss-disabled).ss-option-selected{color: #666;background-color: rgba(88, 151, 251, .1) }.ss-content .ss-list .ss-option.ss-hide{display: none }.ss-content .ss-list .ss-option .ss-search-highlight{background-color: #fffb8c }select[data-ssid]{pointer-events: none;opacity: 0;display: flex!important;position: absolute }:root{--close-button: url("data:image/svg xml;charset=utf-8,");--loupe-icon: url("data:image/svg xml;charset=utf-8,") }.auto-search{display: block;position: relative;width: 100% }.auto-search input{border: 1px solid #d7d7d7;box-shadow: none;box-sizing: border-box;font-size: 16px;padding: 12px 45px 12px 10px;width: 100% }.auto-search input:focus{border: 1px solid #858585;outline: 0 }.auto-search input::-ms-clear{display: none }.auto-search ul{list-style: none;margin: 0;overflow: auto;padding: 0 }.auto-search ul li{cursor: pointer;margin: 0;overflow: hidden;padding: 10px;position: relative }.auto-search ul li:not(:last-child){border-top: none }.auto-search ul li[disabled]{background: #ececec;opacity: .5;pointer-events: none }.auto-search .auto-expanded{border: 1px solid #858585;outline: 0 }.auto-search.loupe:before{filter: invert(60%) }.auto-is-loading:after{animation: auto-spinner .6s linear infinite;border-color: #d9d9d9 grey grey #d9d9d9;border-radius: 50%;border-style: solid;border-width: 2px;bottom: 0;box-sizing: border-box;content: "";height: 20px;margin: auto;position: absolute;right: 10px;top: 0;width: 20px }.auto-is-loading .auto-clear{display: none }@keyframes auto-spinner{to{transform: rotate(1turn) }}li.loupe:before{bottom: auto;top: 15px }.loupe input{padding: 12px 45px 12px 40px }.loupe:before{background-image: var(--loupe-icon);bottom: 0;content: "";height: 17px;left: 10px;margin: auto;position: absolute;top: 0;width: 17px }.auto-selected:before{opacity: 1 }.auto-clear{align-items: center;background-color: transparent;border: none;bottom: 0;cursor: pointer;display: flex;height: auto;justify-content: center;margin: auto;position: absolute;right: 0;top: 0;width: 40px }.auto-clear:before{content: var(--close-button);height: 24px;line-height: 100%;width: 24px }.auto-clear span{display: none }.auto-wrapper{background-color: #fff;border: 1px solid #858585;border-top: none;box-sizing: border-box;display: none;overflow: hidden }.auto-wrapper ul>.loupe{padding-left: 40px }.auto-wrapper.auto-is-active{display: block;margin-top: -1px;position: absolute;width: 100%;z-index: 99999 }.auto-selected{background-color: #e6e6e6 }.auto-selected li:before{border-top: none }.auto-error{border: 1px solid #ff3838 }.auto-error::placeholder{color: #f66;opacity: 1 }.hidden{display: none }.hdapi-loading{opacity: .8;cursor: wait }.hdapi-container{font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 16px }.hdapi-container h1{font-size: 2em;line-height: 1em }.hdapi-personality .hdapi-item{background: #bec4e1 }.hdapi-design .hdapi-item{background: #edc18a;color: #fff}#hdapi-page-form{max-width: 500px;padding: 20px;margin: auto;box-sizing: border-box }.hdapi-form-field{padding: 5px 0 }.hdapi-form-field label{display: block;padding: 4px 0 3px 0 }.hdapi-form-actions input[type=submit]{width: 100%;padding: 20px 15px;background: #222;color: #fff;cursor: pointer;border: 0 }.hdapi-form-actions input[type=submit]:hover{background: #000 }p.hdapi-note{font-size: .8em }button.auto-clear{background: 0 0 }.three-columns .hdapi-form-field.year{width: 32%;float: left }.three-columns .hdapi-form-field.month{width: 33%;float: left;margin: 0 1% }.three-columns .hdapi-form-field.day{width: 32%;float: left }.two-columns .hdapi-form-field.hours{width: 49%;float: left }.two-columns .hdapi-form-field.minutes{width: 49%;float: right }.clear{clear: both }#hdapi-page-result{max-width: 630px;margin: auto;box-sizing: border-box }.hdapi-orientation-landscape{max-width: 1200px!important;margin: auto;box-sizing: border-box }.hdapi-hd-chart{width: 100%;float: left }.hdapi-hd-properties{width: 100%;float: right }.hdapi-container{width: 100% }.hdapi-page{width: 100% }.hdapi-svg{width: calc(100% - 140px);height: auto;float: left;text-align: center;box-sizing: border-box;padding: 10px }.hdapi-svg svg{max-width: 100%;height: auto }.hdapi-design,.hdapi-personality{width: 70px;float: left }.hdapi-personality{float: right }.hdapi-icon{width: 18px;height: 18px;position: absolute;top: 6px }.hdapi-icon svg{width: 18px;height: 18px }.hdapi-item{padding: 3px;margin: 1px 0;font-size: .8em;position: relative }a#hdapi-new-chart{display: inline-block;margin-bottom: 30px }.hdapi-hd-properties .hdapi-item{display: flex;font-size: 1em;padding: 5px 0 }.hdapi-hd-properties .hdapi-item .hdpi-property-label{flex: 40%;padding: 0;margin: 0;font-weight: 700 }.hdapi-hd-properties .hdapi-item .hdpi-property-description{flex: 60%;padding: 0;margin: 0 }.hdapi-arrows{position: relative;top: 0;width: 80%;margin: auto }.hdapi-arrows-left{width: 70px;position: absolute;left: 0 }.hdapi-arrows-right{width: 70px;position: absolute;right: 0 }@media (max-width:1200px){#hdapi-page-result{padding: 20px }}@media (max-width:750px){.hdapi-arrows{width: 95% }}.hdapi-heading{font-size: .8em;text-align: center }.hdapi-clear{clear: both }@media (max-width:750px){.hdapi-hd-properties .hdapi-item{font-size: 1em;padding: 3px 0 }.hdapi-hd-chart,.hdapi-hd-properties{width: 100% }.hdapi-hd-properties{padding: 20px 0 }.hdapi-icon{width: 12px;height: 12px;top: 3px }.hdapi-fixing-state svg,.hdapi-icon svg{width: 100%;height: auto }.hdapi-fixing-state svg{width: 6px;height: 6px }.hdapi-heading{font-size: 10px }.hdapi-design,.hdapi-personality{width: 50px;float: left }.hdapi-label{font-size: 10px;padding: 2px 3px 2px 5px;left: 12px }.hdapi-fixing-state{width: 7px;height: 7px }.hdapi-svg{width: calc(100% - 100px) }#hdapi-page-result{padding: 20px }}a#hdapi-new-chart{color: #000 }.ss-main .ss-single-selected{border-radius: 0;height: 44px }.ss-main .ss-single-selected .placeholder{background: 0 0 }.hdapi-label{height: 25px;top: 5px;position: relative;display: block;text-align: left;padding: 0 5px;width: 35px;left: 20px }.hdapi-fixing-state{width: 10px;position: absolute;top: 7px;right: 3px }@media (max-width:750px){.hdapi-label{height: auto;top: auto;position: relative;left: 12px;width: 35px }.hdapi-fixing-state{right: -2px;top: 7px }}@media (max-width:660px){.hdapi-container{font-size: 12px }.hdapi-svg{padding-top: 0 }.hdapi-arrows{top: 0 }}.hdapi-reverse svg{transform: rotate(180deg);-webkit-transform: rotate(180deg);-moz-transform: rotate(180deg);-ms-transform: rotate(180deg);-o-transform: rotate(180deg) }.hdapi-arrows-left span{display: inline-block;margin-left: 7px }.hdapi-arrows-right span{display: inline-block;margin-right: 7px }.hdapi-body svg{width: 100%;height: auto;max-height: 481px }.hdapi-cta{width: 100%;clear: both }.hdapi-cta a{display: inline-block }#hdapi-logo img{display: none }@media print{body{font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 16px!important }.hdapi-hd-chart{width: 49%;float: left }.hdapi-cta{display: none }.hdapi-hd-chart{width: 49%;float: left }.hdapi-hd-properties{width: 49%;float: right }.hdapi-design,.hdapi-personality{width: 70px!important;float: left }.hdapi-svg{width: calc(100% - 140px)!important;height: auto;float: left;text-align: center;box-sizing: border-box;padding: 10px }.hdapi-icon svg{width: 18px;height: 18px }.hdapi-item .hdapi-label{font-size: 14px;left: 20px }.hdapi-item{margin: 2px 0!important;padding: 2px!important }.hdapi-body svg{width: 100%!important;height: auto;max-height: 421px!important }a#hdapi-download-pdf,a#hdapi-new-chart{display: none!important }.hdapi-icon{width: 16px;height: 16px;position: absolute;top: 7px;left: 2px }.hdapi-personality .hdapi-icon{left: initial }.hdapi-hd-properties .hdapi-item{display: flex;font-size: 14px!important;padding: 2px 0!important }#hdapi-page-result{max-width: 1200px!important;margin: auto;box-sizing: border-box }.hdapi-orientation-landscape{max-width: 1200px!important;margin: auto;box-sizing: border-box }@page{size: A4 landscape }.hdapi-orientation-landscape .hdapi-hd-chart{width: 49%;float: left }.hdapi-orientation-landscape .hdapi-hd-properties{width: 47%;float: right;padding-top: 10px }.hdapi-heading{font-size: 13px;text-align: center }.hdapi-hd-properties .hdapi-item .hdpi-property-description{line-height: 22px }.hdapi-loading{opacity: 1 }#hdapi-logo img{display: inline-block;width: auto;height: 60px;margin-bottom: 20px }.hdapi-report-list{display:none}#hdapi-charts-selector{display:none}}.hdapi-cta a#hdapi-download-pdf,.hdapi-cta a#hdapi-new-chart{display: inline-block;padding: 5px }.hdapi-copyright{font-size: 12px }.hdapi-terms{position: relative;margin-top: 5px;margin-bottom: 10px;padding-left: 25px }#hdapi-terms-input{position: absolute;left: 0;top: 4px }label.hdapi-terms-label{cursor: pointer }#hdapi-load-font{visibility:hidden}.hdpi-property-subdescription,.hdapi-property-subdescription{font-size:0.8em;padding-top:3px}#hdapi-tip{position:fixed;padding:10px;background:#f6f6f6;border-radius:3px;max-width:200px;font-family:sans-serif;border-radius:4px;box-shadow:9px 9px 5px -6px #000;font-size:16px;line-height:20px;z-index:999}.hdapi-tip-description{font-size:14px;padding-top:5px;opacity:.8;line-height:20px}#iframely-content{text-align:initial}.hdapi-charts-selector{margin: 20px 0}#hdapi-charts-selector select{max-width:300px;margin-right:20px}#hdapi-charts-selector a{display:inline-block;padding:2px 5px}#error-label{color:red;display:none;}.hdapi-design .hdapi-icon-Moon{transform: scaleX(-1);}.hdapi-personality .hdapi-label{left:10px;padding-left:4px}.hdapi-personality .hdapi-icon{right:3px}.hdapi-personality .hdapi-fixing-state{left:3px;right:0px}@media (max-width:750px){.hdapi-personality .hdapi-label{left:3px}}`;style+=`@media (max-width: 1200px) { #hdapi-page-result { padding: 0px !important; } }`;style+=`.hdapi-report-box{padding:15px;border-radius:4px;border:1px solid #ccc;margin:10px;font-size:16px;max-width:320px;width:320px;float:left;background:#fbfbfb;}.hdapi-report-box h3{margin:0;padding:0 0 4px 0;font-size:1.3em}.hdapi-report-description{padding:0 0 20px 0}.hdapi-report-price{width:80px;display:inline-block;line-height:22px;padding:10px 0x}.hdapi-report-box form{width:100px;display:inline-block;margin-bottom:0}.hdapi-report-box form input[type=submit]{border:0;border-radius:4px;font-size:16px;display:inline-block;line-height:22px;padding:10px 25px;cursor:pointer;min-width:100px;background:#358c00;color:#fff}.hdapi-report-box form input[type=submit]:hover{background:#307b02}.hdapi-report-list{padding-top:25px}.hdapi-overlay{position:fixed;top:0;bottom:0;left:0;right:0;background:rgba(0,0,0,.6)}.hdapi-popup{margin:70px auto;padding:20px;background:#fff;border-radius:5px;width:320px;text-align:center;position:relative;transition:all 5s ease-in-out}.hdapi-popup h2{margin-top:0;color:#333;font-size:1.5em}.hdapi-popup .hdapi-close{position:absolute;top:0;right:10px;transition:all .2s;font-size:30px;font-weight:700;text-decoration:none;color:#d3d3d3}.hdapi-popup .hdapi-close:hover{color:#333}.hdapi-popup .hdapi-content{max-height:30%;overflow:auto}.hdapi-payment-pending{font-size:16px}.hdapi-payment-pending p{padding:10px 0;margin:0;font-size:16px}input.hdapi-report-download{border:0;border-radius:4px;font-size:16px;display:inline-block;line-height:22px;padding:10px 25px;cursor:pointer;min-width:100px;background:#358c00;color:#fff;margin:10px 0}input.hdapi-report-download:hover{background:#307b02}.hdapi-loader{width:64px;height:64px;border-radius:50%;border:4px solid rgb(127 127 163 / 20%);margin:30px auto}.hdapi-loader:before{display:block;position:relative;left:calc(4px * -1);top:calc(4px * -1);content:' ';width:64px;height:64px;border-radius:50%;border:4px solid;border-color:#4caf50 transparent transparent transparent;animation:loading-rotate .8s ease-out infinite}@keyframes loading-rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}`;document.currentScript.insertAdjacentHTML('afterend',``);document.currentScript.insertAdjacentHTML('afterend',``);let strings={form:{name:'名字',first_name:'',last_name:'',year:'出生年',month:'月份',month_names:['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月',],day:'日期',hour:'時',minute:'分',dropdown_placeholder:'搜尋',place_of_birth:'地點 (輸入英文城市名)',email_address:'Email Address',newsletter_terms_text:``,submit_button:'輸入完成 ➤了解我的設計',current_transit:''},chart:{new_chart:'重新製作',new_relationship_chart:'Create new relationship chart',download_pdf:'下載PDF',select_chart:'選擇你的圖',edit:'編輯',delete:'刪除',pdf_filename:'bodygraphchart',design:'身體運作',personality:'靈魂意識',birth_date:'生日',age:'',birth_place:'',design_date:'',copyright_text:'Ⓒ Charisma Human Design'},bodygraph_readings_report:{free:'免費',buy_now:'立刻購買',download_now:'立刻下載',pdf_filename:'PDF 檔案名',payment_success:'感謝您的購買!',payment_success_message:'您的下載連結準備中。',dont_close_page:'請不要關閉頁面。頁面將跳轉到您的報告,並且會「立刻」寄下載連結到您的郵箱,有時會在垃圾郵件裡面,請盡快下載。',payment_failed:'付款失敗,請再試一次',payment_failed_message:'付款程序未完成,我們沒有在您的帳戶扣款'}};let containerId=Math.random().toString(16).slice(2);let containerEl=null;if(document.currentScript.parentElement.nodeName=='HEAD'){document.addEventListener('DOMContentLoaded',function(){document.body.innerHTML=`
`;init();});}else{document.currentScript.insertAdjacentHTML('afterend',`
`);init();} function init(){containerEl=document.getElementById(`hdapi-${containerId}`),hdUrl=null,hdData=null,hdDataParams=null,isRelationshipChart=false;let parameters;if(typeof Wix!='undefined'){if(window.location.pathname.includes('/chart/')){parameters=atob(window.location.pathname.split('/chart/')[1]).replace('email_address','__');}} try{if(typeof window.top.wsb!='undefined'){window.location.hash=window.top.location.hash;}}catch(err){} if(window.location.hash.startsWith('#chart,')){parameters=window.location.hash.split('#chart,')[1];if(parameters.includes('&')){parameters=parameters.split('&')[0];} parameters=atob(parameters).replace('email_address','__');} if(parameters){const requestData=new URLSearchParams(parameters);if(typeof parameters==='string'||parameters instanceof String){if(parameters.includes('relationship')){isRelationshipChart=true;}} fetch('https://embed.bodygraphchart.com/v1/5793/generate?token=6007f6cb-9325-46ed-b679-2a62a66d3486',{method:'post',body:requestData}).then((response)=>response.json()).then((data)=>{hdDataParams=requestData;hdData=data;if(hdData){createChartPage();document.querySelector(`#hdapi-${containerId}`).scrollIntoView();}else{createFormPage();}}).catch((error)=>{console.log(error);createFormPage();}).finally(()=>{});}else{let enableTransitChart=false;createFormPage(enableTransitChart);}} function createFormPage(enableTransitChart){let html=`
`;html+=`
`;if(enableTransitChart){const date=new Date();const transitDate='currentTime';const transitTimezone='UTC';let requestData=null;if(transitDate=='everyHour'){requestData=new URLSearchParams(`name=Transit&transit=everyHour&transit=${date.getUTCFullYear()}&month=${('0'+(date.getUTCMonth()+1)).slice(-2)}&day=${('0'+date.getUTCDate()).slice(-2)}&hour=${('0'+date.getUTCHours()).slice(-2)}&minute=00&birthplace=UTC&timezone=${transitTimezone}`);}else if(transitDate=='everyDay'){requestData=new URLSearchParams(`name=Transit&transit=everyDay&year=${date.getUTCFullYear()}&month=${('0'+(date.getUTCMonth()+1)).slice(-2)}&day=${('0'+date.getUTCDate()).slice(-2)}&hour=00&minute=00&birthplace=UTC&timezone=${transitTimezone}`);}else{requestData=new URLSearchParams(`name=Transit&transit=currentTime&year=${date.getUTCFullYear()}&month=${('0'+(date.getUTCMonth()+1)).slice(-2)}&day=${('0'+date.getUTCDate()).slice(-2)}&hour=${('0'+date.getUTCHours()).slice(-2)}&minute=${('0'+date.getUTCMinutes()).slice(-2)}&birthplace=UTC&timezone=${transitTimezone}`);} fetch('https://embed.bodygraphchart.com/v1/5793/generate?token=6007f6cb-9325-46ed-b679-2a62a66d3486',{method:'post',body:requestData}).then((response)=>response.json()).then((data)=>{hdData=data;if(hdData){createTransitChart();}}).catch((error)=>{console.log(error);});} containerEl.innerHTML=html;let selectEl=document.querySelector(`#hdapi-${containerId} #year`),currentYear=2030;for(let i=0;i<=150;i++){let value=currentYear-i;let option=document.createElement('option');option.value=value;option.innerHTML=value;selectEl.appendChild(option);} new SlimSelect({select:selectEl,searchPlaceholder:strings.form.dropdown_placeholder});$('.year input').attr('tabindex',1);selectEl=document.querySelector(`#hdapi-${containerId} #month`),monthNames=strings.form.month_names;for(let i=0;i<=11;i++){let value=(`0${(i+1)}`).slice(-2);let option=document.createElement('option');option.value=value;option.innerHTML=monthNames[i];selectEl.appendChild(option);} new SlimSelect({select:selectEl,searchPlaceholder:strings.form.dropdown_placeholder});$('.month input').attr('tabindex',2);selectEl=document.querySelector(`#hdapi-${containerId} #day`);for(let i=1;i<=31;i++){let value=(`0${i}`).slice(-2);let option=document.createElement('option');option.value=value;option.innerHTML=value;selectEl.appendChild(option);} new SlimSelect({select:selectEl,searchPlaceholder:strings.form.dropdown_placeholder});$('.day input').attr('tabindex',3);selectEl=document.querySelector(`#hdapi-${containerId} #hour`);for(let i=0;i<=23;i++){let value=(`0${i}`).slice(-2);let option=document.createElement('option');option.value=value;option.innerHTML=value;selectEl.appendChild(option);} new SlimSelect({select:selectEl,searchPlaceholder:strings.form.dropdown_placeholder});$('.hours input').attr('tabindex',4);selectEl=document.querySelector(`#hdapi-${containerId} #minute`);for(let i=0;i<=59;i++){let value=(`0${i}`).slice(-2);let option=document.createElement('option');option.value=value;option.innerHTML=value;selectEl.appendChild(option);} new SlimSelect({select:selectEl,searchPlaceholder:strings.form.dropdown_placeholder});$('.minutes input').attr('tabindex',5);document.querySelector(`#hdapi-${containerId} label[for="birthplace"]`).setAttribute('for',`birthplace-${containerId}`);document.querySelector(`#hdapi-${containerId} .location`).setAttribute('id',`birthplace-${containerId}`);const errorLabelEl=document.getElementById('error-label');var timeoutId;new Autocomplete(`birthplace-${containerId}`,{disableCloseOnSelect:false,delay:250,howManyCharacters:2,onSearch:({currentValue})=>{return new Promise((resolve)=>{fetch(`https://embed.bodygraphchart.com/api/v2/locations/search?token=6007f6cb-9325-46ed-b679-2a62a66d3486&query=${encodeURI(currentValue)}`).then((response)=>response.json()).then((data)=>{resolve(data.result);}).catch((error)=>{console.error(error);});});},onResults:({currentValue,matches,template,classGroup})=>{const regex=new RegExp(currentValue,'gi');return matches===0?template:matches.map((el,index,array)=>{let admin_name='';if(el.admin){admin_name=`${el.admin}`;} return `
  • ${el.formatted_name.replace(regex,(str)=>`${str}`)}
  • `;}).join('');},onSubmit:({index,element,object,results})=>{clearTimeout(timeoutId);errorLabelEl.style.display='none';element.value=object.formatted_name;document.querySelector(`#hdapi-${containerId} #timezone`).value=object.timezone;}});let locationInputEl=document.querySelector('.location');locationInputEl.addEventListener('blur',function(){if(locationInputEl.value!==''){locationInputEl.value='';errorLabelEl.textContent='Please select location from the list';errorLabelEl.style.display='block';timeoutId=setTimeout(function(){errorLabelEl.style.display='none';},3000);}});if(typeof Storage!=='undefined'){let formData=null;try{formData=window.localStorage.getItem('_form_data_5793');}catch(e){} if(formData){const searchParams=new URLSearchParams(formData);if(document.getElementById('name')){document.getElementById('name').value=searchParams.get('name');document.getElementById('name').value=searchParams.get('name');}else{if(document.getElementById('first_name')&&document.getElementById('last_name')){let name=searchParams.get('name').split(' ');if(name.length>=2){document.getElementById('first_name').value=name[0];document.getElementById('last_name').value=name[1];}}} document.getElementById('year').value=searchParams.get('year');document.getElementById('year').dispatchEvent(new Event('change'));document.getElementById('month').value=searchParams.get('month');document.getElementById('month').dispatchEvent(new Event('change'));document.getElementById('day').value=searchParams.get('day');document.getElementById('day').dispatchEvent(new Event('change'));document.getElementById('hour').value=searchParams.get('hour');document.getElementById('hour').dispatchEvent(new Event('change'));document.getElementById('minute').value=searchParams.get('minute');document.getElementById('minute').dispatchEvent(new Event('change'));if(searchParams.get('birthplace')){document.getElementById('birthplace-'+containerId).value=searchParams.get('birthplace');} document.getElementById('timezone').value=searchParams.get('timezone');if(document.getElementById('email_address')){document.getElementById('email_address').value=searchParams.get('email_address');}}} document.querySelector(`#hdapi-${containerId} .hdapi-form`).addEventListener('submit',function(event){event.preventDefault();const formEl=this;formEl.classList.add('hdapi-loading');const requestData=new URLSearchParams(),formData=new FormData(formEl);for(const pair of formData){if(pair[0]=='first_name'){formData.set('name',pair[1]);} if(pair[0]=='last_name'){formData.set('name',`${formData.get('name')} ${pair[1]}`);formData.delete('first_name');formData.delete('last_name');}} for(const pair of formData){if(isRelationshipChart){if(pair[0].includes('birthplace')){requestData.append('birthplace[]',pair[1]);}else{requestData.append(`${pair[0]}[]`,pair[1]);}}else{if(pair[0].includes('birthplace')){requestData.append('birthplace',pair[1]);}else{requestData.append(pair[0],pair[1]);}}} if(isRelationshipChart){for(const hdDataParam of hdDataParams){if(hdDataParam[0]=='relationship'){continue;} if(hdDataParam[0].includes('[]')){requestData.append(`${hdDataParam[0]}`,hdDataParam[1]);}else{requestData.append(`${hdDataParam[0]}[]`,hdDataParam[1]);}} requestData.append('relationship',1);} if(typeof Storage!=='undefined'){window.localStorage.setItem('_form_data_5793',requestData.toString());let charts=localStorage.getItem('_charts_5793');charts=charts?JSON.parse(charts):[];let name='';if(isRelationshipChart){const names=requestData.getAll('name[]');name=`${names[1]} - ${names[0]}`;}else{name=requestData.get('name');} charts.unshift({name:name,data:requestData.toString()});window.localStorage.setItem('_charts_5793',JSON.stringify(charts));} if(typeof Wix!='undefined'){Wix.getSiteInfo(function(siteInfo){if(siteInfo.url.slice(-1)=='/'){requestData.append('chartUrl',`${siteInfo.url}chart/${btoa(requestData.toString())}`);}else{requestData.append('chartUrl',`${siteInfo.url}/chart/${btoa(requestData.toString())}`);} fetch('https://embed.bodygraphchart.com/v1/5793/generate?token=6007f6cb-9325-46ed-b679-2a62a66d3486',{method:'post',body:requestData}).then((response)=>response.json()).then((data)=>{hdDataParams=requestData;hdData=data;if(hdData){requestData.delete('chartUrl');hdUrl=btoa(requestData.toString());window.location.hash=`#chart,${btoa(requestData.toString())}`;if(typeof Wix!='undefined'){Wix.pushState(`chart/${btoa(requestData.toString())}`);} try{if(typeof window.top.wsb!='undefined'){window.top.location.hash=window.location.hash;}}catch(err){} createChartPage();}}).catch((error)=>{console.log(error);}).finally(()=>{formEl.classList.remove('hdapi-loading');});});}else{requestData.append('chartUrl',`${window.location.href}#chart,${btoa(requestData.toString())}`);fetch('https://embed.bodygraphchart.com/v1/5793/generate?token=6007f6cb-9325-46ed-b679-2a62a66d3486',{method:'post',body:requestData}).then((response)=>response.json()).then((data)=>{hdDataParams=requestData;hdData=data;if(hdData){requestData.delete('chartUrl');hdUrl=btoa(requestData.toString());window.location.hash=`#chart,${btoa(requestData.toString())}`;if(typeof Wix!='undefined'){Wix.pushState(`chart/${btoa(requestData.toString())}`);} try{if(typeof window.top.wsb!='undefined'){window.top.location.hash=window.location.hash;}}catch(err){} createChartPage();}}).catch((error)=>{console.log(error);}).finally(()=>{formEl.classList.remove('hdapi-loading');});}});} function createChartPage(){containerEl.innerHTML=`
    ${strings.chart.design}
    ${strings.chart.design}
    36223764955302126514050322818485744605841391952535438142953427429359171325101524683331201662235635124524474174311646163
    ${strings.chart.personality}

      人類圖微報告

      如果你初入門,對以上的解說不了解,可以購買此份報告,踏出了解自己的第一步。
      9.99 EUR
      Loading... `;if(typeof hdData['svg']!=='undefined'){document.querySelector(`#hdapi-${containerId} #hdapi-svg-container`).innerHTML=hdData['svg'];document.querySelector(`#hdapi-${containerId} .hdapi-center-chart .hdapi-svg #bg`).innerHTML='';if($(`#hdapi-${containerId} .hdapi-center-chart .hdapi-svg #bg path`).length){$(`#hdapi-${containerId} .hdapi-center-chart .hdapi-svg #bg path`).attr('fill','#f2f2f2');}}else{document.querySelector(`#hdapi-${containerId} .hdapi-center-chart .hdapi-svg #bg`).innerHTML='';if(document.querySelector(`#hdapi-${containerId} .hdapi-center-chart .hdapi-svg #bg path`)!==null){document.querySelector(`#hdapi-${containerId} .hdapi-center-chart .hdapi-svg #bg path`).setAttribute('fill','#f2f2f2');} if(document.querySelector(`#hdapi-${containerId} .hdapi-center-chart #ChannelBorders`)){document.querySelector(`#hdapi-${containerId} .hdapi-center-chart #ChannelBorders`).setAttribute('stroke','black');} document.querySelectorAll(`#hdapi-${containerId} .hdapi-center-chart #Centers g`).forEach(function(x){if(typeof x.firstChild.setAttribute==='function'){x.firstChild.setAttribute('stroke','black');}});} if(isRelationshipChart){if(document.querySelector(`#hdapi-${containerId} .hdapi-report-list`)){document.querySelector(`#hdapi-${containerId} .hdapi-report-list`).remove();} if(document.querySelector(`#hdapi-${containerId} #hdapi-download-pdf`)){document.querySelector(`#hdapi-${containerId} #hdapi-download-pdf`).remove();} if(document.querySelector(`#hdapi-${containerId} #hdapi-download-pdf-report`)){document.querySelector(`#hdapi-${containerId} #hdapi-download-pdf-report`).remove();} containerEl.classList.add('hdapi-custom-styles');let style=`.hdapi-custom-styles .hdapi-orientation-landscape{max-width:1250px!important}.hdapi-chart-wrapper{display:flex;flex-wrap:nowrap}.hdapi-chart-wrapper .hdapi-left-chart,.hdapi-chart-wrapper .hdapi-right-chart{max-width:320px;flex:320px;padding:0 10px}.hdapi-chart-wrapper .hdapi-center-chart{max-width:calc(100% - 640px);flex:calc(100% - 640px);padding:0 10px}.hdapi-chart-wrapper .hdapi-center-chart .hdapi-hd-chart{width:100%;float:none!important;display:flex;flex-wrap:nowrap}.hdapi-chart-wrapper .hdapi-center-chart .hdapi-hd-chart .hdapi-item{background:0 0!important;color:#000!important;display:flex;flex-wrap:nowrap;padding:0;flex-direction:row;height:24px;align-items:center}.hdapi-chart-wrapper .hdapi-center-chart .hdapi-hd-chart .hdapi-item .hdapi-relationship{display:flex;flex-direction:row;-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1;align-items:center;width:35px}.hdapi-chart-wrapper .hdapi-center-chart .hdapi-hd-chart .hdapi-item .hdapi-relationship .hdapi-label{position:static;-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2;width:auto;height:auto;padding:0;font-size:11.5px;font-weight:600;color:#cb3920}.hdapi-chart-wrapper .hdapi-center-chart .hdapi-hd-chart .hdapi-item .hdapi-relationship .hdapi-fixing-state{position:static;-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1;margin-right:3px;width:10px;height:auto}.hdapi-chart-wrapper .hdapi-center-chart .hdapi-hd-chart .hdapi-item .hdapi-icon{position:static;display:inline-block;-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2;margin:0 6px;width:18px;text-align:center}.hdapi-chart-wrapper .hdapi-center-chart .hdapi-hd-chart .hdapi-item .hdapi-icon svg{width:15px;height:15px}.hdapi-chart-wrapper .hdapi-center-chart .hdapi-hd-chart .hdapi-item>.hdapi-fixing-state{position:static;display:inline-block;width:10px;height:auto;padding:0;order:4;min-width:10px}.hdapi-chart-wrapper .hdapi-center-chart .hdapi-hd-chart .hdapi-item>.hdapi-label{padding:0;display:inline-block;-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3;position:static;height:auto;font-size:11.5px;font-weight:600;margin-right:3px;width:22px;color:#64301e}.hdapi-chart-wrapper .hdapi-center-chart .hdapi-hd-chart .hdapi-item>.hdapi-fixing-state svg path{fill:#64301e!important}.hdapi-chart-wrapper .hdapi-center-chart .hdapi-hd-chart .hdapi-item .hdapi-relationship .hdapi-fixing-state svg path{fill:#cb3920}.hdapi-chart-wrapper .hdapi-center-chart .hdapi-hd-chart .hdapi-item .hdapi-relationship .hdapi-fixing-state svg,.hdapi-chart-wrapper .hdapi-center-chart .hdapi-hd-chart .hdapi-item>.hdapi-fixing-state svg{height:7px}.hdapi-chart-wrapper .hdapi-center-chart .hdapi-hd-chart .hdapi-design,.hdapi-chart-wrapper .hdapi-center-chart .hdapi-hd-chart .hdapi-personality{max-width:100px;flex:100px;width:auto;float:none}.hdapi-chart-wrapper .hdapi-center-chart .hdapi-hd-chart .hdapi-svg{width:auto;max-width:calc(100% - 200px);flex:calc(100% - 200px);float:none;margin-top:30px}.hdapi-chart-wrapper .hdapi-hd-properties{width:100%;float:none;margin-top:30px;text-align:left}.hdapi-chart-wrapper .hdapi-center-chart .hdapi-hd-chart .hdapi-heading{font-size:17px;font-weight:600;color:#cb3920;margin-bottom:12px}.hdapi-chart-wrapper .hdapi-hd-properties .hdpi-property-label{flex:45%}.hdapi-chart-wrapper .hdapi-hd-properties .hdpi-property-description{flex:55%}@media only screen and (max-width:1200px){.hdapi-chart-wrapper{flex-wrap:wrap}.hdapi-chart-wrapper .hdapi-left-chart,.hdapi-chart-wrapper .hdapi-right-chart{max-width:48%;flex:48%;-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.hdapi-chart-wrapper .hdapi-center-chart{max-width:100%;flex:100%;-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (max-width:600px){.hdapi-chart-wrapper .hdapi-left-chart,.hdapi-chart-wrapper .hdapi-right-chart{max-width:100%;flex:100%}.hdapi-chart-wrapper .hdapi-center-chart .hdapi-hd-chart{flex-wrap:wrap}.hdapi-chart-wrapper .hdapi-center-chart .hdapi-hd-chart .hdapi-svg{width:auto;max-width:100%;flex:100%;-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.hdapi-chart-wrapper .hdapi-center-chart .hdapi-hd-chart .hdapi-design,.hdapi-chart-wrapper .hdapi-center-chart .hdapi-hd-chart .hdapi-personality{max-width:48%;flex:48%;-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.hdapi-chart-wrapper .hdapi-center-chart .hdapi-hd-chart .hdapi-item{justify-content:center}.hdapi-chart-wrapper .hdapi-hd-properties{padding-top:0}}.hdapi-left-chart,.hdapi-right-chart{display:block !important}.hdapi-center-chart .hdapi-hd-properties,.hdapi-left-chart .hdapi-hd-properties,.hdapi-right-chart .hdapi-hd-properties{line-height:21px}.hdapi-left-chart .hdapi-hd-properties .hdapi-item,.hdapi-right-chart .hdapi-hd-properties .hdapi-item{display:flex;font-size:12px;padding:0;position:relative}.hdapi-left-chart .hdapi-hd-properties .hdapi-item .hdpi-property-label,.hdapi-right-chart .hdapi-hd-properties .hdapi-item .hdpi-property-label{flex:45%;padding:0;margin:0;font-weight:700}.hdapi-left-chart .hdapi-hd-properties .hdapi-item .hdpi-property-description,.hdapi-right-chart .hdapi-hd-properties .hdapi-item .hdpi-property-description{flex:55%;padding:0;margin:0}.hdapi-center-chart .hdapi-hd-properties ul{list-style:none;padding:0;margin:0}.hdapi-center-chart .hdapi-hd-properties ul .hdapi-item{display:flex;flex-wrap:nowrap;font-size:12px;padding:0}.hdapi-center-chart .hdapi-hd-properties ul .hdapi-item .hdpi-property-label{max-width:50%;flex:50%}.hdapi-center-chart .hdapi-hd-properties ul .hdapi-item .hdpi-property-description{max-width:50%;flex:50%;margin-bottom:10px}.hdapi-channel-colors{display:inline-block;height:5px;position:relative;margin-right:5px}.hdapi-channel-colors span:first-child,.hdapi-channel-colors span:nth-child(2),.hdapi-channel-colors span:nth-child(4),.hdapi-channel-colors span:nth-child(5){display:inline-block;height:5px;width:10px}.hdapi-chart-wrapper p{word-wrap:inherit!important}.hdpi-property-description,.hdpi-property-subdescription{line-height:15px}.hdpi-property-subdescription{padding:0 0 8px}.hdapi-item-color{height:5px;margin-top:10px}.hdapi-chart-wrapper .hdapi-center-chart .hdapi-hd-chart .hdapi-item .hdapi-relationship .hdapi-label,.hdapi-chart-wrapper .hdapi-center-chart .hdapi-hd-chart .hdapi-item>.hdapi-label{font-size:11px}.hdapi-channel-colors{line-height:0}@media only screen and (max-width:767px){.hdapi-chart-wrapper .hdapi-left-chart,.hdapi-chart-wrapper .hdapi-right-chart{display:none}}.hdapi-arrows{display:none}`;document.getElementById('hdapi-relationship-style').insertAdjacentHTML('beforeend',style);document.querySelector('.hdapi-page').classList.add('hdapi-orientation-landscape');let firstChartData=null;for(const[key,value]of hdDataParams.entries()){if(key=='name[]'){if(!firstChartData){document.querySelector(`#hdapi-${containerId} .hdapi-personality .hdapi-heading`).innerHTML=value;if(strings.form.name){document.querySelector(`#hdapi-${containerId} .hdapi-right-chart .hdapi-hd-properties`).insertAdjacentHTML('beforeend',`
      ${strings.form.name}
      ${value}
      `);} if(strings.chart.birth_date){document.querySelector(`#hdapi-${containerId} .hdapi-right-chart .hdapi-hd-properties`).insertAdjacentHTML('beforeend',`
      ${strings.chart.birth_date} ${strings.chart.birth_date}
      ${hdData[0].Properties.BirthDateLocal}
      `);} if(strings.chart.design_date){document.querySelector(`#hdapi-${containerId} .hdapi-right-chart .hdapi-hd-properties`).insertAdjacentHTML('beforeend',`
      ${strings.chart.design_date}
      ${hdData[0].Properties.DesignDateUtc}
      `);} for(const property in hdData[0].Properties){if(!hdData[0].Properties[property].name){continue;} if(hdData[0].Properties[property].link){document.querySelector(`#hdapi-${containerId} .hdapi-right-chart .hdapi-hd-properties`).insertAdjacentHTML('beforeend',`
      ${hdData[0].Properties[property].name}
      `);}else{document.querySelector(`#hdapi-${containerId} .hdapi-right-chart .hdapi-hd-properties`).insertAdjacentHTML('beforeend',`
      ${hdData[0].Properties[property].name}
      ${hdData[0].Properties[property].option}
      `);}} firstChartData=value;}else{document.querySelector(`#hdapi-${containerId} .hdapi-design .hdapi-heading`).innerHTML=value;if(strings.form.name){document.querySelector(`#hdapi-${containerId} .hdapi-left-chart .hdapi-hd-properties`).insertAdjacentHTML('beforeend',`
      ${strings.form.name}
      ${value}
      `);} if(strings.chart.birth_date){document.querySelector(`#hdapi-${containerId} .hdapi-left-chart .hdapi-hd-properties`).insertAdjacentHTML('beforeend',`
      ${strings.chart.birth_date}
      ${hdData[1].Properties.BirthDateLocal}
      `);} if(strings.chart.design_date){document.querySelector(`#hdapi-${containerId} .hdapi-left-chart .hdapi-hd-properties`).insertAdjacentHTML('beforeend',`
      ${strings.chart.design_date}
      ${hdData[1].Properties.DesignDateUtc}
      `);} for(const property in hdData[1].Properties){if(!hdData[1].Properties[property].name){continue;} if(hdData[1].Properties[property].link){document.querySelector(`#hdapi-${containerId} .hdapi-left-chart .hdapi-hd-properties`).insertAdjacentHTML('beforeend',`
      ${hdData[1].Properties[property].name}
      `);}else{document.querySelector(`#hdapi-${containerId} .hdapi-left-chart .hdapi-hd-properties`).insertAdjacentHTML('beforeend',`
      ${hdData[1].Properties[property].name}
      `);}}}}} for(const[key,value]of Object.entries(hdData[1].Design)){document.querySelector(`#hdapi-${containerId} .hdapi-design`).insertAdjacentHTML('beforeend',`
      ${value.Gate}.${value.Line}
      ${getFixingStateIcon(value.FixingState,'black')}
      ${getIcon(key,'black',true)}
      ${getFixingStateIcon(hdData[1].Personality[key].FixingState,'black')}
      ${hdData[1].Personality[key].Gate}.${hdData[1].Personality[key].Line}
      `);} document.querySelector(`#hdapi-${containerId} .hdapi-design`).insertAdjacentHTML('beforeend',`
      `);for(const[key,value]of Object.entries(hdData[0].Personality)){document.querySelector(`#hdapi-${containerId} .hdapi-personality`).insertAdjacentHTML('beforeend',`
      ${hdData[0].Design[key].Gate}.${hdData[0].Design[key].Line}
      ${getFixingStateIcon(hdData[0].Design[key].FixingState,'white')}
      ${getFixingStateIcon(value.FixingState,'black')}
      ${value.Gate}.${value.Line}
      ${getIcon(key,'white',true)}
      `);} document.querySelector(`#hdapi-${containerId} .hdapi-personality`).insertAdjacentHTML('beforeend',`
      `);delete hdData[0].Design.Chiron;delete hdData[0].Personality.Chiron;delete hdData[1].Design.Chiron;delete hdData[1].Personality.Chiron;delete hdData[0].Design.Lilith;delete hdData[0].Personality.Lilith;delete hdData[1].Design.Lilith;delete hdData[1].Personality.Lilith;document.querySelectorAll(`#hdapi-${containerId} .hdapi-left-chart svg text`).forEach((el)=>{el=el.previousElementSibling,gateNumber=el.getAttribute('id');el.style.fill='transparent';el.nextElementSibling.style.fill='black';if(hasGate(hdData[1],gateNumber)){el.style.fill='transparent';el.nextElementSibling.style.fill='black';}});document.querySelectorAll(`#hdapi-${containerId} .hdapi-center-chart svg text`).forEach((el)=>{el=el.previousElementSibling,gateNumber=el.getAttribute('id');el.style.fill='transparent';el.nextElementSibling.style.fill='black';if(hasGateRel(hdData,gateNumber)){el.style.fill='transparent';el.nextElementSibling.style.fill='black';}});document.querySelectorAll(`#hdapi-${containerId} .hdapi-right-chart svg text`).forEach((el)=>{el=el.previousElementSibling,gateNumber=el.getAttribute('id');el.style.fill='transparent';el.nextElementSibling.style.fill='black';if(hasGate(hdData[0],gateNumber)){el.style.fill='transparent';el.nextElementSibling.style.fill='black';}});document.querySelectorAll(`#hdapi-${containerId} .hdapi-left-chart svg [id^=design-], #hdapi-${containerId} .hdapi-left-chart svg [id^=personality-]`).forEach((el)=>{let gateNumber=el.getAttribute('id').split('-')[1];let designValues=Object.values(hdData[1].Design),personalityValues=Object.values(hdData[1].Personality);let designGate=null;for(const key in designValues){if(designValues[key].Gate==gateNumber){designGate=true;}} let personalityGate=null;for(const key in personalityValues){if(personalityValues[key].Gate==gateNumber){personalityGate=true;}} if(designGate!=null&&personalityGate!=null){if(document.querySelector(`#hdapi-${containerId} .hdapi-left-chart svg.hdapi-svg-style`).classList.contains('hdapi-line-style-fill')){document.querySelector(`#hdapi-${containerId} .hdapi-left-chart svg #design-${gateNumber}`).style.fill='#d7a860';document.querySelector(`#hdapi-${containerId} .hdapi-left-chart svg #personality-${gateNumber}`).style.fill='black';}else{document.querySelector(`#hdapi-${containerId} .hdapi-left-chart svg #design-${gateNumber}`).style.stroke='#d7a860';document.querySelector(`#hdapi-${containerId} .hdapi-left-chart svg #personality-${gateNumber}`).style.stroke='black';} fixLine(el,'both-'+gateNumber);}else if(designGate!=null){if(document.querySelector(`#hdapi-${containerId} .hdapi-left-chart svg.hdapi-svg-style`).classList.contains('hdapi-line-style-fill')){el.style.fill='#d7a860';}else{el.style.stroke='#d7a860';} fixLine(el,'design-'+gateNumber);}else if(personalityGate!=null){if(document.querySelector(`#hdapi-${containerId} .hdapi-left-chart svg.hdapi-svg-style`).classList.contains('hdapi-line-style-fill')){el.style.fill='black';}else{el.style.stroke='black';} fixLine(el,'personality-'+gateNumber);}});document.querySelectorAll(`#hdapi-${containerId} .hdapi-center-chart svg [id^=design-], #hdapi-${containerId} .hdapi-center-chart svg [id^=personality-]`).forEach((el)=>{let gateNumber=el.getAttribute('id').split('-')[1];for(const chartId in[hdData[0],hdData[1]]){if(chartId=='removeRange'||chartId=='removeAt'||chartId=='remove'||chartId=='shuffle'||chartId=='contains'){continue;} let designValues=Object.values(hdData[chartId].Design),personalityValues=Object.values(hdData[chartId].Personality);let designGate=null;for(const key in designValues){if(designValues[key].Gate==gateNumber){designGate=true;}} let personalityGate=null;for(const key in personalityValues){if(personalityValues[key].Gate==gateNumber){personalityGate=true;}} designColor='';personalityColor='';if(chartId==0){designColor='#0077ff';personalityColor='#0077ff';}else{designColor='#ffc800';personalityColor='#ffc800';} let designLineEl=document.querySelector(`#hdapi-${containerId} .hdapi-center-chart svg #design-${gateNumber}`),personalityLineEl=document.querySelector(`#hdapi-${containerId} .hdapi-center-chart svg #personality-${gateNumber}`);if(designGate!=null&&personalityGate!=null){if(chartId==1){if(document.querySelector(`#hdapi-${containerId} .hdapi-center-chart svg.hdapi-svg-style`).classList.contains('hdapi-line-style-fill')){if($(designLineEl).css('fill')==hexToRGB('#0077ff')){designLineEl.style.fill='#ffc800';}else{designLineEl.style.fill=designColor;personalityLineEl.style.fill=personalityColor;}}else{if($(designLineEl).css('stroke')==hexToRGB('#0077ff')){designLineEl.style.stroke='#ffc800';}else{designLineEl.style.stroke=designColor;personalityLineEl.style.stroke=personalityColor;}}}else{if(document.querySelector(`#hdapi-${containerId} .hdapi-center-chart svg.hdapi-svg-style`).classList.contains('hdapi-line-style-fill')){designLineEl.style.fill=designColor;personalityLineEl.style.fill=personalityColor;}else{designLineEl.style.stroke=designColor;personalityLineEl.style.stroke=personalityColor;}} fixLine(el,'both-'+gateNumber);}else if(designGate!=null){if(chartId==1){if(document.querySelector(`#hdapi-${containerId} .hdapi-center-chart svg.hdapi-svg-style`).classList.contains('hdapi-line-style-fill')){if($(el).css('fill')==hexToRGB('#0077ff')){designLineEl.style.fill='#ffc800';}else{el.style.fill=designColor;}}else{if($(el).css('stroke')==hexToRGB('#0077ff')){designLineEl.style.stroke='#ffc800';}else{el.style.stroke=designColor;}}}else{if(document.querySelector(`#hdapi-${containerId} .hdapi-center-chart svg.hdapi-svg-style`).classList.contains('hdapi-line-style-fill')){el.style.fill=designColor;}else{el.style.stroke=designColor;}} fixLine(el,'design-'+gateNumber);}else if(personalityGate!=null){if(chartId==1){if(document.querySelector(`#hdapi-${containerId} .hdapi-center-chart svg.hdapi-svg-style`).classList.contains('hdapi-line-style-fill')){if($(el).css('fill')==hexToRGB('#0077ff')){designLineEl.style.fill='#ffc800';}else{el.style.fill=designColor;}}else{if($(el).css('stroke')==hexToRGB('#0077ff')){designLineEl.style.stroke='#ffc800';}else{el.style.stroke=designColor;}}}else{if(document.querySelector(`#hdapi-${containerId} .hdapi-center-chart svg.hdapi-svg-style`).classList.contains('hdapi-line-style-fill')){el.style.fill=personalityColor;}else{el.style.stroke=personalityColor;}} fixLine(el,'personality-'+gateNumber);}}});document.querySelectorAll(`#hdapi-${containerId} .hdapi-right-chart svg [id^=design-], #hdapi-${containerId} .hdapi-right-chart svg [id^=personality-]`).forEach((el)=>{let gateNumber=el.getAttribute('id').split('-')[1];let designValues=Object.values(hdData[0].Design),personalityValues=Object.values(hdData[0].Personality);let designGate=null;for(const key in designValues){if(designValues[key].Gate==gateNumber){designGate=true;}} let personalityGate=null;for(const key in personalityValues){if(personalityValues[key].Gate==gateNumber){personalityGate=true;}} if(designGate!=null&&personalityGate!=null){if(document.querySelector(`#hdapi-${containerId} .hdapi-right-chart svg.hdapi-svg-style`).classList.contains('hdapi-line-style-fill')){document.querySelector(`#hdapi-${containerId} .hdapi-right-chart svg #design-${gateNumber}`).style.fill='#d7a860';document.querySelector(`#hdapi-${containerId} .hdapi-right-chart svg #personality-${gateNumber}`).style.fill='black';}else{document.querySelector(`#hdapi-${containerId} .hdapi-right-chart svg #design-${gateNumber}`).style.stroke='#d7a860';document.querySelector(`#hdapi-${containerId} .hdapi-right-chart svg #personality-${gateNumber}`).style.stroke='black';} fixLine(el,'both-'+gateNumber);}else if(designGate!=null){if(document.querySelector(`#hdapi-${containerId} .hdapi-right-chart svg.hdapi-svg-style`).classList.contains('hdapi-line-style-fill')){el.style.fill='#d7a860';}else{el.style.stroke='#d7a860';} fixLine(el,'design-'+gateNumber);}else if(personalityGate!=null){if(document.querySelector(`#hdapi-${containerId} .hdapi-right-chart svg.hdapi-svg-style`).classList.contains('hdapi-line-style-fill')){el.style.fill='black';}else{el.style.stroke='black';} fixLine(el,'personality-'+gateNumber);}});if(document.getElementById('fix-20-57-10-34-20-34-10-57-2')){fixLines();} for(let[key,value]of Object.entries(hdData[1].UnconsciousCenters)){let el=document.querySelector(`#hdapi-${containerId} .hdapi-left-chart svg #${value.replace(/\s+/g,'-').toLowerCase()}`);if(el){el.style.fill='#edc18a';}} for(let[key,value]of Object.entries(hdData[1].ConsciousCenters)){let el=document.querySelector(`#hdapi-${containerId} .hdapi-left-chart svg #${value.replace(/\s+/g,'-').toLowerCase()}`);if(el){el.style.fill='#edc18a';}} for(let[key,value]of Object.entries(hdData[1].DefinedCenters)){let el=document.querySelector(`#hdapi-${containerId} .hdapi-left-chart svg #${value.replace(/\s+/g,'-').toLowerCase()}`);if(el&&$(el).css('fill')=='rgb(255, 255, 255)'){el.style.fill='#edc18a';}} for(let[key,value]of Object.entries(hdData['Combined'].UnconsciousCenters)){let el=document.querySelector(`#hdapi-${containerId} .hdapi-center-chart svg #${value.replace(/\s+/g,'-').toLowerCase()}`);if(el){el.style.fill='#edc18a';}} for(let[key,value]of Object.entries(hdData['Combined'].ConsciousCenters)){let el=document.querySelector(`#hdapi-${containerId} .hdapi-center-chart svg #${value.replace(/\s+/g,'-').toLowerCase()}`);if(el){el.style.fill='#edc18a';}} for(let[key,value]of Object.entries(hdData['Combined'].DefinedCenters)){let el=document.querySelector(`#hdapi-${containerId} .hdapi-center-chart svg #${value.replace(/\s+/g,'-').toLowerCase()}`);if(el&&$(el).css('fill')=='rgb(255, 255, 255)'){el.style.fill='#edc18a';}} for(let[key,value]of Object.entries(hdData[0].UnconsciousCenters)){let el=document.querySelector(`#hdapi-${containerId} .hdapi-right-chart svg #${value.replace(/\s+/g,'-').toLowerCase()}`);if(el){el.style.fill='#edc18a';}} for(let[key,value]of Object.entries(hdData[0].ConsciousCenters)){let el=document.querySelector(`#hdapi-${containerId} .hdapi-right-chart svg #${value.replace(/\s+/g,'-').toLowerCase()}`);if(el){el.style.fill='#edc18a';}} for(let[key,value]of Object.entries(hdData[0].DefinedCenters)){let el=document.querySelector(`#hdapi-${containerId} .hdapi-right-chart svg #${value.replace(/\s+/g,'-').toLowerCase()}`);if(el&&$(el).css('fill')=='rgb(255, 255, 255)'){el.style.fill='#edc18a';}} for(const property in hdData['Combined'].Properties){if(hdData['Combined'].Properties[property].name){if(hdData['Combined'].Properties[property].link){document.querySelector(`#hdapi-${containerId} .hdapi-center-chart .hdapi-hd-properties ul`).insertAdjacentHTML('beforeend',`
    • ${hdData['Combined'].Properties[property].name}
    • `);}else{document.querySelector(`#hdapi-${containerId} .hdapi-center-chart .hdapi-hd-properties ul`).insertAdjacentHTML('beforeend',`
    • ${hdData['Combined'].Properties[property].name}
      ${hdData['Combined'].Properties[property].option}
    • `);}} if(hdData['Combined'].Properties[property].companionship){if(hdData['Combined'].Properties[property].companionship.list.length){document.querySelector(`#hdapi-${containerId} .hdapi-center-chart .hdapi-hd-properties ul`).insertAdjacentHTML('beforeend',`
    • ${hdData['Combined'].Properties[property].companionship.name}
    • `);for(const channel in hdData['Combined'].Properties[property].companionship.list){if(channel=='removeRange'||channel=='removeAt'||channel=='remove'||channel=='shuffle'||channel=='contains'){continue;} if(typeof channel==='function'){continue} document.querySelector(`#hdapi-${containerId} .hdapi-property-companionship`).insertAdjacentHTML('beforeend',`

      ${hdData['Combined'].Properties[property].companionship.list[channel].option}
      `);for(const gate in hdData['Combined'].Properties[property].companionship.list[channel].gates){let gateId=hdData['Combined'].Properties[property].companionship.list[channel].gates[gate];if(gateId=='removeRange'||gateId=='removeAt'||gateId=='remove'||gateId=='shuffle'||gateId=='contains'){continue;} if(typeof gateId==='function'){continue} let designGateColor=null,personalityGateColor=null;if(document.querySelector(`#hdapi-${containerId} .hdapi-center-chart svg.hdapi-svg-style`).classList.contains('hdapi-line-style-fill')){designGateColor=$(`#hdapi-${containerId} .hdapi-center-chart #design-${gateId}`).css('fill'),personalityGateColor=$(`#hdapi-${containerId} .hdapi-center-chart #personality-${gateId}`).css('fill');}else{designGateColor=$(`#hdapi-${containerId} .hdapi-center-chart #design-${gateId}`).css('stroke'),personalityGateColor=$(`#hdapi-${containerId} .hdapi-center-chart #personality-${gateId}`).css('stroke');} document.querySelector(`#hdapi-${containerId} .hdapi-property-companionship .hdapi-channel-design-${gateId}`).style.backgroundColor=designGateColor;document.querySelector(`#hdapi-${containerId} .hdapi-property-companionship .hdapi-channel-personality-${gateId}`).style.backgroundColor=personalityGateColor;}}} if(hdData['Combined'].Properties[property].dominance.list.length){document.querySelector(`#hdapi-${containerId} .hdapi-center-chart .hdapi-hd-properties ul`).insertAdjacentHTML('beforeend',`
    • ${hdData['Combined'].Properties[property].dominance.name}
    • `);for(const channel in hdData['Combined'].Properties[property].dominance.list){if(channel=='removeRange'||channel=='removeAt'||channel=='remove'||channel=='shuffle'||channel=='contains'){continue;} if(typeof channel==='function'){continue} document.querySelector(`#hdapi-${containerId} .hdapi-property-dominance`).insertAdjacentHTML('beforeend',`

      ${hdData['Combined'].Properties[property].dominance.list[channel].option}
      `);for(const gate in hdData['Combined'].Properties[property].dominance.list[channel].gates){let gateId=hdData['Combined'].Properties[property].dominance.list[channel].gates[gate];if(gateId=='removeRange'||gateId=='removeAt'||gateId=='remove'||gateId=='shuffle'||gateId=='contains'){continue;} if(typeof gateId==='function'){continue} if(document.querySelector(`#hdapi-${containerId} .hdapi-center-chart svg.hdapi-svg-style`).classList.contains('hdapi-line-style-fill')){designGateColor=$(`#hdapi-${containerId} .hdapi-center-chart #design-${gateId}`).css('fill'),personalityGateColor=$(`#hdapi-${containerId} .hdapi-center-chart #personality-${gateId}`).css('fill');}else{designGateColor=$(`#hdapi-${containerId} .hdapi-center-chart #design-${gateId}`).css('stroke'),personalityGateColor=$(`#hdapi-${containerId} .hdapi-center-chart #personality-${gateId}`).css('stroke');} document.querySelector(`#hdapi-${containerId} .hdapi-property-dominance .hdapi-channel-design-${gateId}`).style.backgroundColor=designGateColor;document.querySelector(`#hdapi-${containerId} .hdapi-property-dominance .hdapi-channel-personality-${gateId}`).style.backgroundColor=personalityGateColor;}}} if(hdData['Combined'].Properties[property].compromise.list.length){document.querySelector(`#hdapi-${containerId} .hdapi-center-chart .hdapi-hd-properties ul`).insertAdjacentHTML('beforeend',`
    • ${hdData['Combined'].Properties[property].compromise.name}
    • `);for(const channel in hdData['Combined'].Properties[property].compromise.list){if(channel=='removeRange'||channel=='removeAt'||channel=='remove'||channel=='shuffle'||channel=='contains'){continue;} if(typeof channel==='function'){continue} document.querySelector(`#hdapi-${containerId} .hdapi-property-compromise`).insertAdjacentHTML('beforeend',`

      ${hdData['Combined'].Properties[property].compromise.list[channel].option}
      `);for(const gate in hdData['Combined'].Properties[property].compromise.list[channel].gates){let gateId=hdData['Combined'].Properties[property].compromise.list[channel].gates[gate];if(gateId=='removeRange'||gateId=='removeAt'||gateId=='remove'||gateId=='shuffle'||gateId=='contains'){continue;} if(typeof gateId==='function'){continue} if(document.querySelector(`#hdapi-${containerId} .hdapi-center-chart svg.hdapi-svg-style`).classList.contains('hdapi-line-style-fill')){designGateColor=$(`#hdapi-${containerId} .hdapi-center-chart #design-${gateId}`).css('fill'),personalityGateColor=$(`#hdapi-${containerId} .hdapi-center-chart #personality-${gateId}`).css('fill');}else{designGateColor=$(`#hdapi-${containerId} .hdapi-center-chart #design-${gateId}`).css('stroke'),personalityGateColor=$(`#hdapi-${containerId} .hdapi-center-chart #personality-${gateId}`).css('stroke');} document.querySelector(`#hdapi-${containerId} .hdapi-property-compromise .hdapi-channel-design-${gateId}`).style.backgroundColor=designGateColor;document.querySelector(`#hdapi-${containerId} .hdapi-property-compromise .hdapi-channel-personality-${gateId}`).style.backgroundColor=personalityGateColor;}}} if(hdData['Combined'].Properties[property].electromagnetic.list.length){document.querySelector(`#hdapi-${containerId} .hdapi-center-chart .hdapi-hd-properties ul`).insertAdjacentHTML('beforeend',`
    • ${hdData['Combined'].Properties[property].electromagnetic.name}
    • `);for(const channel in hdData['Combined'].Properties[property].electromagnetic.list){if(channel=='removeRange'||channel=='removeAt'||channel=='remove'||channel=='shuffle'||channel=='contains'){continue;} if(typeof channel==='function'){continue} document.querySelector(`#hdapi-${containerId} .hdapi-property-electromagnetic`).insertAdjacentHTML('beforeend',`

      ${hdData['Combined'].Properties[property].electromagnetic.list[channel].option}
      `);for(const gate in hdData['Combined'].Properties[property].electromagnetic.list[channel].gates){let gateId=hdData['Combined'].Properties[property].electromagnetic.list[channel].gates[gate];if(gateId=='removeRange'||gateId=='removeAt'||gateId=='remove'||gateId=='shuffle'||gateId=='contains'){continue;} if(typeof gateId==='function'){continue} if(document.querySelector(`#hdapi-${containerId} .hdapi-center-chart svg.hdapi-svg-style`).classList.contains('hdapi-line-style-fill')){designGateColor=$(`#hdapi-${containerId} .hdapi-center-chart #design-${gateId}`).css('fill'),personalityGateColor=$(`#hdapi-${containerId} .hdapi-center-chart #personality-${gateId}`).css('fill');}else{designGateColor=$(`#hdapi-${containerId} .hdapi-center-chart #design-${gateId}`).css('stroke'),personalityGateColor=$(`#hdapi-${containerId} .hdapi-center-chart #personality-${gateId}`).css('stroke');} document.querySelector(`#hdapi-${containerId} .hdapi-property-electromagnetic .hdapi-channel-design-${gateId}`).style.backgroundColor=designGateColor;document.querySelector(`#hdapi-${containerId} .hdapi-property-electromagnetic .hdapi-channel-personality-${gateId}`).style.backgroundColor=personalityGateColor;}}}}}}else{for(const[key,value]of Object.entries(hdData.Design)){document.querySelector(`#hdapi-${containerId} .hdapi-center-chart .hdapi-design`).insertAdjacentHTML('beforeend',`
      ${getIcon(key,'black')}
      ${value.Gate}.${value.Line}
      ${getFixingStateIcon(value.FixingState,'black')}
      `);} for(const[key,value]of Object.entries(hdData.Personality)){document.querySelector(`#hdapi-${containerId} .hdapi-center-chart .hdapi-personality`).insertAdjacentHTML('beforeend',`
      ${getIcon(key,'white')}
      ${value.Gate}.${value.Line}
      ${getFixingStateIcon(value.FixingState,'white')}
      `);} delete hdData.Design.Chiron;delete hdData.Personality.Chiron;delete hdData.Design.Lilith;delete hdData.Personality.Lilith;document.querySelectorAll(`#hdapi-${containerId} .hdapi-svg .hdapi-arrows-left svg`).forEach(function(el){el.setAttribute('fill','#d7a860');el.setAttribute('stroke','#d7a860');});document.querySelectorAll(`#hdapi-${containerId} .hdapi-svg .hdapi-arrows-right svg`).forEach(function(el){el.setAttribute('fill','black');el.setAttribute('stroke','black');});if(hdData.Variables.Digestion=='left'){document.querySelector(`#hdapi-${containerId} #hdapi-variable-digestion`).classList.add('hdapi-reverse');} if(document.querySelector(`#hdapi-${containerId} #hdapi-variable-digestion`)){document.querySelector(`#hdapi-${containerId} #hdapi-variable-digestion`).children[1].innerHTML=`${hdData.Design.Sun.Color} ${hdData.Design.Sun.Tone}`;document.querySelectorAll(`#hdapi-${containerId} #hdapi-variable-digestion span`).forEach((el)=>{el.style.color='#d7a860';});} if(hdData.Variables.Environment=='left'){document.querySelector(`#hdapi-${containerId} #hdapi-variable-environment`).classList.add('hdapi-reverse');} if(document.querySelector(`#hdapi-${containerId} #hdapi-variable-environment`)){document.querySelector(`#hdapi-${containerId} #hdapi-variable-environment`).children[1].innerHTML=`${hdData.Design['North Node'].Color} ${hdData.Design['North Node'].Tone}`;document.querySelectorAll(`#hdapi-${containerId} #hdapi-variable-environment span`).forEach((el)=>{el.style.color='#d7a860';});} if(hdData.Variables.Awareness=='left'){document.querySelector(`#hdapi-${containerId} #hdapi-variable-awareness`).classList.add('hdapi-reverse');} if(document.querySelector(`#hdapi-${containerId} #hdapi-variable-awareness`)){document.querySelector(`#hdapi-${containerId} #hdapi-variable-awareness`).children[0].innerHTML=`${hdData.Personality.Sun.Tone} ${hdData.Personality.Sun.Color}`;document.querySelectorAll(`#hdapi-${containerId} #hdapi-variable-awareness span`).forEach((el)=>{el.style.color='black';});} if(hdData.Variables.Perspective=='left'){document.querySelector(`#hdapi-${containerId} #hdapi-variable-perspective`).classList.add('hdapi-reverse');} if(document.querySelector(`#hdapi-${containerId} #hdapi-variable-perspective`)){document.querySelector(`#hdapi-${containerId} #hdapi-variable-perspective`).children[0].innerHTML=`${hdData.Personality['North Node'].Tone} ${hdData.Personality['North Node'].Color}`;document.querySelectorAll(`#hdapi-${containerId} #hdapi-variable-perspective span`).forEach((el)=>{el.style.color='black';});} if(typeof hdData['svg']==='undefined'){if(!document.querySelector('svg.hdapi-svg-style').classList.contains('hdapi-svg-karen')){document.querySelectorAll(`#hdapi-${containerId} .hdapi-center-chart svg text`).forEach((el)=>{el=el.previousElementSibling,gateNumber=el.getAttribute('id');if(el.tagName=='circle'){gateNumber=gateNumber.replace('_','');} el.style.fill='transparent';el.nextElementSibling.style.fill='black';if(hasGate(hdData,gateNumber)){el.style.fill='transparent';el.nextElementSibling.style.fill='black';}});} document.querySelectorAll(`#hdapi-${containerId} .hdapi-center-chart svg [id^=design-], #hdapi-${containerId} .hdapi-center-chart svg [id^=personality-]`).forEach((el)=>{let gateNumber=el.getAttribute('id').split('-')[1];let designValues=Object.values(hdData.Design),personalityValues=Object.values(hdData.Personality);let designGate=null;for(const key in designValues){if(designValues[key].Gate==gateNumber){designGate=true;}} let personalityGate=null;for(const key in personalityValues){if(personalityValues[key].Gate==gateNumber){personalityGate=true;}} if(designGate!=null&&personalityGate!=null){if(document.querySelector(`#hdapi-${containerId} .hdapi-center-chart svg.hdapi-svg-style`).classList.contains('hdapi-line-style-fill')){document.querySelector(`#hdapi-${containerId} .hdapi-center-chart svg #design-${gateNumber}`).style.fill='#d7a860';document.querySelector(`#hdapi-${containerId} .hdapi-center-chart svg #personality-${gateNumber}`).style.fill='black';}else{document.querySelector(`#hdapi-${containerId} .hdapi-center-chart svg #design-${gateNumber}`).style.stroke='#d7a860';document.querySelector(`#hdapi-${containerId} .hdapi-center-chart svg #personality-${gateNumber}`).style.stroke='black';} fixLine(el,'both-'+gateNumber);}else if(designGate!=null){if(document.querySelector(`#hdapi-${containerId} .hdapi-center-chart svg.hdapi-svg-style`).classList.contains('hdapi-line-style-fill')){el.style.fill='#d7a860';}else{el.style.stroke='#d7a860';} fixLine(el,'design-'+gateNumber);}else if(personalityGate!=null){if(document.querySelector(`#hdapi-${containerId} .hdapi-center-chart svg.hdapi-svg-style`).classList.contains('hdapi-line-style-fill')){el.style.fill='black';}else{el.style.stroke='black';} fixLine(el,'personality-'+gateNumber);}});if(document.getElementById('fix-20-57-10-34-20-34-10-57-2')){fixLines();} for(let[key,value]of Object.entries(hdData.UnconsciousCenters)){let el=document.querySelector(`#hdapi-${containerId} .hdapi-center-chart svg #${value.replace(/\s+/g,'-').toLowerCase()}`);if(el){el.style.fill='#edc18a';}} for(let[key,value]of Object.entries(hdData.ConsciousCenters)){let el=document.querySelector(`#hdapi-${containerId} .hdapi-center-chart svg #${value.replace(/\s+/g,'-').toLowerCase()}`);if(el){el.style.fill='#edc18a';}} for(let[key,value]of Object.entries(hdData.DefinedCenters)){let el=document.querySelector(`#hdapi-${containerId} .hdapi-center-chart svg #${value.replace(/\s+/g,'-').toLowerCase()}`);if(el&&$(el).css('fill')=='rgb(255, 255, 255)'){el.style.fill='#edc18a';}} if(document.querySelector('.hdapi-center-chart svg.hdapi-svg-style').classList.contains('hdapi-svg-karen')){document.querySelectorAll(`#hdapi-${containerId} .hdapi-center-chart svg text`).forEach((el)=>{el=el.previousElementSibling,gateNumber=el.getAttribute('id');if(el.tagName=='circle'){gateNumber=gateNumber.replace('_','');} if(el.parentElement.getAttribute('id')=='HeadCenter'||el.parentElement.getAttribute('id')=='GCenter'){if(hasGate(hdData,gateNumber)){el.style.fill='#000000';el.nextElementSibling.style.fill='#FFFFFF';} if(el.parentElement.querySelector('#head-center')){console.log('2187');console.log(el.parentElement.querySelector('#head-center').style.fill);if(el.parentElement.querySelector('#head-center').style.fill=='rgb(79, 36, 53)'){if(hasGate(hdData,gateNumber)){el.style.fill='#FFFFFF';el.nextElementSibling.style.fill='#000000';}}else{console.log('2197');console.log(el.style.fill);if(el.style.fill=='rgb(0, 0, 0)'){el.nextElementSibling.style.fill='#FFFFFF';}else{el.nextElementSibling.style.fill='#000000';}}} if(el.parentElement.querySelector('#g-center')){console.log('2210');console.log(el.parentElement.querySelector('#g-center').style.fill);if(el.parentElement.querySelector('#g-center').style.fill=='rgb(79, 36, 53)'){if(hasGate(hdData,gateNumber)){el.style.fill='#FFFFFF';el.nextElementSibling.style.fill='#000000';}}else{if(!hasGate(hdData,gateNumber)){el.nextElementSibling.style.fill='#000000';}}}}else{el.style.fill='transparent';el.nextElementSibling.style.fill='black';if(hasGate(hdData,gateNumber)){el.style.fill='transparent';el.nextElementSibling.style.fill='black';}}});}} if(hdData.Properties.Type){document.querySelector(`#hdapi-${containerId} #hdapi-page-bg`).classList.add(`hdapi-type-${hdData.Properties.Type.id.toLowerCase().replace(/\s/g,'-').trim()}`);} if(strings.form.name){document.querySelector(`#hdapi-${containerId} .hdapi-center-chart .hdapi-hd-properties`).insertAdjacentHTML('beforeend',`
      ${strings.form.name}
      ${hdData.Name}
      `);} if(strings.chart.birth_date){document.querySelector(`#hdapi-${containerId} .hdapi-center-chart .hdapi-hd-properties`).insertAdjacentHTML('beforeend',`
      ${strings.chart.birth_date}
      ${hdData.Properties.BirthDateLocal}
      `);} if(strings.chart.age){document.querySelector(`#hdapi-${containerId} .hdapi-center-chart .hdapi-hd-properties`).insertAdjacentHTML('beforeend',`
      ${strings.chart.age}
      ${hdData.Properties.Age}
      `);} if(strings.chart.birth_place){document.querySelector(`#hdapi-${containerId} .hdapi-center-chart .hdapi-hd-properties`).insertAdjacentHTML('beforeend',`
      ${strings.chart.birth_place}
      ${hdData.BirthPlace}
      `);} if(strings.chart.design_date){document.querySelector(`#hdapi-${containerId} .hdapi-center-chart .hdapi-hd-properties`).insertAdjacentHTML('beforeend',`
      ${strings.chart.design_date}
      ${hdData.Properties.DesignDateUtc}
      `);} var displayGateList=false;var displayChannelList=false;var displayChannelList=true;for(const property in hdData.Properties){if(!hdData.Properties[property].name){continue;} if(hdData.Properties[property].list){if(property=='Gates'&&displayGateList){if(hdData.Properties[property].list.length){let gateListHtml='';for(const gate in hdData.Properties[property].list){if(gate=='removeRange'||gate=='removeAt'||gate=='remove'||gate=='shuffle'||gate=='contains'){continue;} if(hdData.Properties[property].list[gate].link){gateListHtml+=` ${hdData.Properties[property].list[gate].option} `;if(gate!=(hdData.Properties[property].list.length-1)){gateListHtml+=', ';} gateListHtml+=` `;}else{gateListHtml+=` ${hdData.Properties[property].list[gate].option} `;if(gate!=(hdData.Properties[property].list.length-1)){gateListHtml+=', ';} gateListHtml+=` `;}} document.querySelector(`#hdapi-${containerId} .hdapi-center-chart .hdapi-hd-properties`).insertAdjacentHTML('beforeend',`
      ${hdData.Properties[property].name}
      ${gateListHtml.replace(/\t|\n/g,'')}
      `);}} if(property=='Channels'&&displayChannelList){if(hdData.Properties[property].list.length){let channelListHtml='';for(const channel in hdData.Properties[property].list){if(channel=='removeRange'||channel=='removeAt'||channel=='remove'||channel=='shuffle'||channel=='contains'||channel=='move'){continue;} if(hdData.Properties[property].list[channel].link){channelListHtml+=` `;}else{channelListHtml+=`
      ${hdData.Properties[property].list[channel].option}
      `;}} document.querySelector(`#hdapi-${containerId} .hdapi-center-chart .hdapi-hd-properties`).insertAdjacentHTML('beforeend',`
      ${hdData.Properties[property].name}
      ${channelListHtml}
      `);}}}else{if(hdData.Properties[property].link){document.querySelector(`#hdapi-${containerId} .hdapi-center-chart .hdapi-hd-properties`).insertAdjacentHTML('beforeend',`
      ${hdData.Properties[property].name}
      `);}else{document.querySelector(`#hdapi-${containerId} .hdapi-center-chart .hdapi-hd-properties`).insertAdjacentHTML('beforeend',`
      ${hdData.Properties[property].name}
      ${hdData.Properties[property].option}
      `);}}}} document.querySelector(`#hdapi-${containerId} #hdapi-new-chart`).addEventListener('click',function(evt){evt.preventDefault();isRelationshipChart=false;if(document.getElementById('hdapi-relationship-style')){document.getElementById('hdapi-relationship-style').innerHTML='';} createFormPage();});if(document.querySelector(`#hdapi-${containerId} #hdapi-new-relationship-chart`)){document.querySelector(`#hdapi-${containerId} #hdapi-new-relationship-chart`).addEventListener('click',function(evt){evt.preventDefault();isRelationshipChart=true;if(document.getElementById('hdapi-relationship-style')){document.getElementById('hdapi-relationship-style').innerHTML='';} createFormPage();});} window.onpopstate=function(){if(location.hash==''){createFormPage();}else{createChartPage();}};document.querySelector(`#hdapi-${containerId}`).onmouseover=interactionHandler;document.querySelector(`#hdapi-${containerId}`).onmouseout=interactionHandler;function interactionHandler(evt){if(evt.type=='mouseover'){if(evt.target.id.match(/(.*)-center/gm)||evt.target.id.match(/personality-(.*)/gm)||evt.target.id.match(/design-(.*)/gm)){let tipEl=document.getElementById('hdapi-tip');if(!tipEl){tipEl=document.createElement('div');tipEl.setAttribute('id','hdapi-tip');if(evt.target.id.match(/(.*)-center/gm)){}else{} tipEl.style.top=evt.clientY+'px';tipEl.style.left=evt.clientX+'px';if(tipEl.innerHTML){document.body.appendChild(tipEl);}}}} if(evt.type=='mouseout'){if(document.getElementById('hdapi-tip')){document.getElementById('hdapi-tip').remove();}}} const downloadPdfEl=document.querySelector(`#hdapi-${containerId} a#hdapi-download-pdf`);if(downloadPdfEl){downloadPdfEl.addEventListener('click',function(evt){evt.preventDefault();containerEl.classList.add('hdapi-loading');let html=document.querySelector(`#hdapi-${containerId}`).outerHTML;html=html.replace(/)<[^<]*)*<\/script>/gi,'');html+=document.getElementById('hdapi-style').outerHTML;if(document.getElementById('hdapi-webfonts')){html+=``;} html=''+html+'';let form=document.createElement('form');form.setAttribute('method','POST');form.setAttribute('action','https://embed.bodygraphchart.com/v1/5793/generate-pdf?token=6007f6cb-9325-46ed-b679-2a62a66d3486');if(!window.navigator.userAgent.includes('Instagram')&&!window.navigator.userAgent.includes('FBAN')&&!window.navigator.userAgent.includes('FBAV')){form.setAttribute('target','_blank');} let htmlInput=document.createElement('input');htmlInput.setAttribute('type','hidden');htmlInput.setAttribute('name','html');htmlInput.setAttribute('value',html);form.appendChild(htmlInput);let dataInput=document.createElement('input');dataInput.setAttribute('type','hidden');dataInput.setAttribute('name','request');dataInput.setAttribute('value',hdDataParams);form.appendChild(dataInput);try{if(typeof window.top.wsb!='undefined'){window.top.document.body.appendChild(form);}else{document.body.appendChild(form);}}catch(err){document.body.appendChild(form);} setTimeout(function(){form.submit();},60);containerEl.classList.remove('hdapi-loading');});} handleChartsSelector(`#hdapi-${containerId} #hdapi-charts-selector`,true,true);var urlParams=new URLSearchParams(window.location.search);if(typeof Wix!='undefined'){Wix.getSiteInfo(function(siteInfo){urlParams=new URLSearchParams('?'+siteInfo.url.split('?').pop());});} setTimeout(function(){if(urlParams.get('bgc_payment_status')==='success'){const popupEl=document.createElement('div');popupEl.className='hdapi-overlay';popupEl.innerHTML=`

      ${strings.bodygraph_readings_report.payment_success}

      ×
      ${strings.bodygraph_readings_report.payment_success_message}
      ${strings.bodygraph_readings_report.dont_close_page}
      `;containerEl.appendChild(popupEl);const checkOrderInterval=setInterval(function(){const match=/\&token\=(.+)\&/g.exec(window.location.hash);let token=null;if(match){token=match[1];} fetch(`https://embed.bodygraphchart.com/check-order?reportId=${urlParams.get('bgc_report_id')}&orderId=${urlParams.get('bgc_order_id')}&token=${token}`).then((response)=>response.json()).then((data)=>{if(data.success){document.querySelector('.hdapi-report-single form').setAttribute('action','https://embed.bodygraphchart.com/v1/5793/report/111111111/get?orderId=222222222'.replace('111111111',data.report_id).replace('222222222',data.order_id));document.querySelector('.hdapi-payment-pending').style.display='none';document.querySelector('.hdapi-report-single').style.display='block';clearInterval(checkOrderInterval);}}).catch(function(error){console.error(error);clearInterval(checkOrderInterval);});},2500);} if(urlParams.get('bgc_payment_status')==='failed'){const popupEl=document.createElement('div');popupEl.className='hdapi-overlay';popupEl.innerHTML=`

      ${strings.bodygraph_readings_report.payment_failed}

      ×
      ${strings.bodygraph_readings_report.payment_failed_message}
      `;containerEl.appendChild(popupEl);} if(document.querySelector('.hdapi-close')){document.querySelector('.hdapi-close').addEventListener('click',function(evt){evt.preventDefault();document.querySelector('.hdapi-overlay').remove();});}},400);const downloadPdfReportEl=document.querySelector(`#hdapi-${containerId} a#hdapi-download-pdf-report`);if(downloadPdfReportEl){downloadPdfReportEl.addEventListener('click',function(evt){evt.preventDefault();document.querySelector(`#hdapi-${containerId} .hdapi-download-pdf-report-form`).click() document.querySelector(`#hdapi-${containerId} .hdapi-download-pdf-report-form`).submit();});} setTimeout(function(){document.querySelectorAll('.hdapi-report-list form, .hdapi-report-single form, .hdapi-download-pdf-report-form').forEach(function(el){el.addEventListener('click',function(evt){if(window.navigator.userAgent.includes('Instagram')||window.navigator.userAgent.includes('FBAN')||window.navigator.userAgent.includes('FBAV')||window.navigator.userAgent.includes('iPhone')){const iOSDevice=!!navigator.platform.match(/iPhone|iPod|iPad/);if(iOSDevice){if($('.hdapi-report-box form').length){$('.hdapi-report-box form').attr('target','_parent');} if($('.hdapi-report-single form').length){$('.hdapi-report-single form').attr('target','_parent');}} if(typeof Wix==='undefined'){if($('.hdapi-report-box form').length){$('.hdapi-report-box form').removeAttr('target');} if($('.hdapi-report-single form').length){$('.hdapi-report-single form').removeAttr('target');}}} if(evt.target.parentNode.parentNode.classList.contains('hdapi-report-single')){const dataInput=document.createElement('input');dataInput.setAttribute('type','hidden');dataInput.setAttribute('name','data');if(typeof Wix!='undefined'){if(typeof window.location.pathname.split('/chart/')[1]!='undefined'){dataInput.setAttribute('value',window.location.pathname.split('/chart/')[1]);}else{dataInput.setAttribute('value',hdUrl);}}else{dataInput.setAttribute('value',location.hash.replace('#chart,',''));} el.appendChild(dataInput);}else{const dataInput=document.createElement('input');dataInput.setAttribute('type','hidden');dataInput.setAttribute('name','data');if(typeof Wix!='undefined'){if(typeof window.location.pathname.split('/chart/')[1]!='undefined'){dataInput.setAttribute('value',window.location.pathname.split('/chart/')[1]);}else{dataInput.setAttribute('value',hdUrl);}}else{dataInput.setAttribute('value',location.hash.replace('#chart,',''));} el.appendChild(dataInput);const urlInput=document.createElement('input');urlInput.setAttribute('type','hidden');urlInput.setAttribute('name','url');if(typeof Wix!='undefined'){if(typeof window.location.pathname.split('/chart/')[1]!='undefined'){urlInput.setAttribute('value',Wix.Utils.getSectionUrl()+'chart/'+window.location.pathname.split('/chart/')[1]);}else{urlInput.setAttribute('value',Wix.Utils.getSectionUrl()+'chart/'+hdUrl);}}else if(location.href.indexOf('about:srcdoc')!==-1){urlInput.setAttribute('value',top.location.href.replace(location.hash,''));}else{const url=new URL(location.href.replace(location.hash,''));url.searchParams.delete('bgc_payment_status');url.searchParams.delete('bgc_report_id');url.searchParams.delete('bgc_order_id');urlInput.setAttribute('value',url.toString());} el.appendChild(urlInput);} try{if(typeof window.top.wsb!='undefined'){window.top.document.body.appendChild(el);}}catch(err){}});});},500);if(typeof Wix!='undefined'){Wix.setHeight(containerEl.clientHeight);}} function createTransitChart(){document.querySelector('.hdapi-page').classList.add('hdapi-page-transit');document.querySelector(`#hdapi-${containerId} #hdapi-transit-chart`).innerHTML=`
      ${strings.form.current_transit}
      36223764955302126514050322818485744605841391952535438142953427429359171325101524683331201662235635124524474174311646163
      ${strings.chart.personality} ${strings.chart.design}
      `;if(typeof hdData['svg']!=='undefined'){document.querySelector(`#hdapi-${containerId} #hdapi-transit-chart .hdapi-body`).innerHTML=hdData['svg'];document.querySelector(`#hdapi-${containerId} .hdapi-svg #bg`).innerHTML='';if(document.querySelector(`#hdapi-${containerId} .hdapi-svg #bg path`)!==null){document.querySelector(`#hdapi-${containerId} .hdapi-svg #bg path`).setAttribute('fill','#f2f2f2');}}else{document.querySelector(`#hdapi-${containerId} .hdapi-svg #bg`).innerHTML='';if(document.querySelector(`#hdapi-${containerId} .hdapi-svg #bg path`)!==null){document.querySelector(`#hdapi-${containerId} .hdapi-svg #bg path`).setAttribute('fill','#f2f2f2');} if(document.querySelector(`#hdapi-${containerId} #ChannelBorders`)){document.querySelector(`#hdapi-${containerId} #ChannelBorders`).setAttribute('stroke','black');} document.querySelectorAll(`#hdapi-${containerId} #Centers g`).forEach(function(x){if(typeof x.firstChild.setAttribute==='function'){x.firstChild.setAttribute('stroke','black');}});} for(const[key,value]of Object.entries(hdData.Personality)){document.querySelector(`#hdapi-${containerId} .hdapi-personality`).insertAdjacentHTML('beforeend',`
      ${getIcon(key,'white')}
      ${value.Gate}.${value.Line}
      ${getFixingStateIcon(value.FixingState,'white')}
      `);} delete hdData.Design.Chiron;delete hdData.Personality.Chiron;delete hdData.Design.Lilith;delete hdData.Personality.Lilith;document.querySelectorAll(`#hdapi-${containerId} .hdapi-svg .hdapi-arrows-right svg`).forEach(function(el){el.setAttribute('fill','black');el.setAttribute('stroke','black');});if(document.querySelector(`#hdapi-${containerId} #hdapi-variable-awareness`)){if(hdData.Variables.Awareness=='left'){document.querySelector(`#hdapi-${containerId} #hdapi-variable-awareness`).classList.add('hdapi-reverse');} document.querySelector(`#hdapi-${containerId} #hdapi-variable-awareness`).children[0].innerHTML=`${hdData.Personality.Sun.Tone} ${hdData.Personality.Sun.Color}`;document.querySelectorAll(`#hdapi-${containerId} #hdapi-variable-awareness span`).forEach((el)=>{el.style.color='black';});} if(document.querySelector(`#hdapi-${containerId} #hdapi-variable-perspective`)){if(hdData.Variables.Perspective=='left'){document.querySelector(`#hdapi-${containerId} #hdapi-variable-perspective`).classList.add('hdapi-reverse');} document.querySelector(`#hdapi-${containerId} #hdapi-variable-perspective`).children[0].innerHTML=`${hdData.Personality['North Node'].Tone} ${hdData.Personality['North Node'].Color}`;document.querySelectorAll(`#hdapi-${containerId} #hdapi-variable-perspective span`).forEach((el)=>{el.style.color='black';});} if(!document.querySelector('svg.hdapi-svg-style').classList.contains('hdapi-svg-karen')){document.querySelectorAll(`#hdapi-${containerId} svg text`).forEach((el)=>{el=el.previousElementSibling,gateNumber=el.getAttribute('id');if(el.tagName=='circle'){gateNumber=gateNumber.replace('_','');} el.style.fill='transparent';el.nextElementSibling.style.fill='black';if(hasGateTransit(hdData,gateNumber)){el.style.fill='transparent';el.nextElementSibling.style.fill='black';}});} document.querySelectorAll(`#hdapi-${containerId} svg [id^=design-], #hdapi-${containerId} svg [id^=personality-]`).forEach((el)=>{let gateNumber=el.getAttribute('id').split('-')[1];let personalityValues=Object.values(hdData.Personality);let personalityGate=null;for(const key in personalityValues){if(personalityValues[key].Gate==gateNumber){personalityGate=true;}} if(personalityGate!=null){if(document.querySelector(`#hdapi-${containerId} svg.hdapi-svg-style`).classList.contains('hdapi-line-style-fill')){el.style.fill='black';}else{el.style.stroke='black';} fixLine(el,'personality-'+gateNumber);}});if(document.getElementById('fix-20-57-10-34-20-34-10-57-2')){fixLines();} for(let[key,value]of Object.entries(hdData.ConsciousCenters)){let el=document.querySelector(`#hdapi-${containerId} svg #${value.replace(/\s+/g,'-').toLowerCase()}`);if(el){el.style.fill='#edc18a';}} if(document.querySelector('svg.hdapi-svg-style').classList.contains('hdapi-svg-karen')){document.querySelectorAll(`#hdapi-${containerId} svg text`).forEach((el)=>{el=el.previousElementSibling,gateNumber=el.getAttribute('id');if(el.tagName=='circle'){gateNumber=gateNumber.replace('_','');} if(el.parentElement.getAttribute('id')=='HeadCenter'||el.parentElement.getAttribute('id')=='GCenter'){if(hasGate(hdData,gateNumber)){el.style.fill='#000000';el.nextElementSibling.style.fill='#FFFFFF';} if(el.parentElement.querySelector('#head-center')){if(el.parentElement.querySelector('#head-center').style.fill=='rgb(79, 36, 53)'){if(hasGate(hdData,gateNumber)){el.style.fill='#FFFFFF';el.nextElementSibling.style.fill='#000000';}}else{if(el.style.fill=='rgb(0, 0, 0)'){el.nextElementSibling.style.fill='#FFFFFF';}else{el.nextElementSibling.style.fill='#000000';}}} if(el.parentElement.querySelector('#g-center')){if(el.parentElement.querySelector('#g-center').style.fill=='rgb(79, 36, 53)'){if(hasGate(hdData,gateNumber)){el.style.fill='#FFFFFF';el.nextElementSibling.style.fill='#000000';}}else{if(!hasGate(hdData,gateNumber)){el.nextElementSibling.style.fill='#000000';}}}}else{el.style.fill='transparent';el.nextElementSibling.style.fill='black';if(hasGate(hdData,gateNumber)){el.style.fill='transparent';el.nextElementSibling.style.fill='black';}}});} document.querySelector(`#hdapi-${containerId} .hdapi-transit-date`).innerHTML=`${hdData.Properties.BirthDateLocal}`;document.querySelector(`#hdapi-${containerId}`).onmouseover=interactionHandler;document.querySelector(`#hdapi-${containerId}`).onmouseout=interactionHandler;function interactionHandler(evt){if(evt.type=='mouseover'){if(evt.target.id.match(/(.*)-center/gm)||evt.target.id.match(/personality-(.*)/gm)||evt.target.id.match(/design-(.*)/gm)){let tipEl=document.getElementById('hdapi-tip');if(!tipEl){tipEl=document.createElement('div');tipEl.setAttribute('id','hdapi-tip');if(evt.target.id.match(/(.*)-center/gm)){}else{} tipEl.style.top=evt.clientY+'px';tipEl.style.left=evt.clientX+'px';if(tipEl.innerHTML){document.body.appendChild(tipEl);}}}} if(evt.type=='mouseout'){if(document.getElementById('hdapi-tip')){document.getElementById('hdapi-tip').remove();}}} if(typeof Wix!='undefined'){Wix.setHeight(containerEl.clientHeight);}} function getIcon(name,color,isRelationship){const planetIcon={"Sun":"","Earth":"","North Node":"","South Node":"","Moon":"","Mercury":"","Venus":"","Mars":"","Jupiter":"","Saturn":"","Uranus":"","Neptune":"","Pluto":"","Chiron":"","Lilith":""};if(isRelationship){color='#000000';} const icons={'Sun':planetIcon.Sun.replace(/\${color}/g,color),'Earth':planetIcon.Earth.replace(/\${color}/g,color),'North Node':planetIcon['North Node'].replace(/\${color}/g,color),'South Node':planetIcon['South Node'].replace(/\${color}/g,color),'Moon':planetIcon.Moon.replace(/\${color}/g,color),'Mercury':planetIcon.Mercury.replace(/\${color}/g,color),'Venus':planetIcon.Venus.replace(/\${color}/g,color),'Mars':planetIcon.Mars.replace(/\${color}/g,color),'Jupiter':planetIcon.Jupiter.replace(/\${color}/g,color),'Saturn':planetIcon.Saturn.replace(/\${color}/g,color),'Uranus':planetIcon.Uranus.replace(/\${color}/g,color),'Neptune':planetIcon.Neptune.replace(/\${color}/g,color),'Pluto':planetIcon.Pluto.replace(/\${color}/g,color),'Chiron':planetIcon.Chiron.replace(/\${color}/g,color),'Lilith':planetIcon.Lilith.replace(/\${color}/g,color)};return icons[name];} function getFixingStateIcon(value,color){let fixingStateIcon='';if(value=='Detriment'){fixingStateIcon=``;}else if(value=='Exalted'){fixingStateIcon=``;}else if(value=='Juxtaposed'){fixingStateIcon=``;} return fixingStateIcon;} function hasGate(data,gateNumber){const design=Object.values(data.Design);for(let key in design){if(design[key].Gate==gateNumber){return true;}} const personality=Object.values(data.Personality);for(let key in personality){if(personality[key].Gate==gateNumber){return true;}} return false;} function hasGateRel(data,gateNumber){const design1=Object.values(data[0].Design),design2=Object.values(data[1].Design);for(let key in design1){if(design1[key].Gate==gateNumber){return true;}} for(let key in design2){if(design2[key].Gate==gateNumber){return true;}} const personality1=Object.values(data[0].Personality),personality2=Object.values(data[1].Personality);for(let key in personality1){if(personality1[key].Gate==gateNumber){return true;}} for(let key in personality2){if(personality2[key].Gate==gateNumber){return true;}} return false;} function hasGateTransit(data,gateNumber){const personality=Object.values(data.Personality);for(let key in personality){if(personality[key].Gate==gateNumber){return true;}} return false;} let gates=[];function fixLine(el,gateNumber){const parent=el.parentElement;if(parent.getAttribute('id')=='fix-20-57-10-34-20-34-10-57-1'){el.style.display='block';} if(parent.getAttribute('id')=='fix-20-57-10-34-20-34-10-57-2'){el.style.display='block';} gates.push(gateNumber);} function fixLines(){if(!gates.includes('both-34')&&!gates.includes('personality-34')&&!gates.includes('design-34')){if(gates.includes('both-10')){if(gates.includes('both-57')||gates.includes('personality-57')||gates.includes('design-57')){$('.hdapi-body svg #design-57, .hdapi-body svg #personality-57').hide();let color1,color2;if(gates.includes('both-57')){color1='#d7a860';color2='black';} if(gates.includes('personality-57')){color1='black';color2='black';} if(gates.includes('design-57')){color1='#d7a860';color2='#d7a860';} $('.hdapi-body svg #design_57-10').attr('fill',color1).show() $('.hdapi-body svg #personality_57-10').attr('fill',color2).show();}else{$('.hdapi-body svg #design-10, .hdapi-body svg #personality-10').hide();$('.hdapi-body svg #design_10-34').attr('fill','#d7a860').show() $('.hdapi-body svg #personality_10-34').attr('fill','black').show();}} if(gates.includes('personality-10')){if(gates.includes('both-57')||gates.includes('personality-57')||gates.includes('design-57')){$('.hdapi-body svg #design-57, .hdapi-body svg #personality-57').hide();let color1,color2;if(gates.includes('both-57')){color1='#d7a860';color2='black';} if(gates.includes('personality-57')){color1='black';color2='black';} if(gates.includes('design-57')){color1='#d7a860';color2='#d7a860';} $('.hdapi-body svg #design_57-10').attr('fill',color1).show() $('.hdapi-body svg #personality_57-10').attr('fill',color2).show();}else{$('.hdapi-body svg #design-10, .hdapi-body svg #personality-10').hide();$('.hdapi-body svg #design_10-34, .hdapi-body svg #personality_10-34').attr('fill','black').show();}} if(gates.includes('design-10')){if(gates.includes('both-57')||gates.includes('personality-57')||gates.includes('design-57')){$('.hdapi-body svg #design-57, .hdapi-body svg #personality-57').hide();let color1,color2;if(gates.includes('both-57')){color1='#d7a860';color2='black';} if(gates.includes('personality-57')){color1='black';color2='black';} if(gates.includes('design-57')){color1='#d7a860';color2='#d7a860';} $('.hdapi-body svg #design_57-10').attr('fill',color1).show() $('.hdapi-body svg #personality_57-10').attr('fill',color2).show();}else{$('.hdapi-body svg #design-10, .hdapi-body svg #personality-10').hide();$('.hdapi-body svg #design_10-34, .hdapi-body svg #personality_10-34').attr('fill','#d7a860').show();}}} if(!gates.includes('both-10')&&!gates.includes('personality-10')&&!gates.includes('design-10')){if(gates.includes('both-34')){$('.hdapi-body svg #design-34, .hdapi-body svg #personality-34').hide();$('.hdapi-body svg #design_34-10').attr('fill','#d7a860').show() $('.hdapi-body svg #personality_34-10').attr('fill','black').show();} if(gates.includes('personality-34')){$('.hdapi-body svg #design-34, .hdapi-body svg #personality-34').hide();$('.hdapi-body svg #design_34-10, .hdapi-body svg #personality_34-10').attr('fill','black').show();} if(gates.includes('design-34')){$('.hdapi-body svg #design-34, .hdapi-body svg #personality-34').hide();$('.hdapi-body svg #design_34-10, .hdapi-body svg #personality_34-10').attr('fill','#d7a860').show();}}} function convert24To12Hour(hour){let h=hour%12;if(h===0){h=12;} return(h<10?'0':'')+h+(hour<12?' AM':' PM');} function hexToRGB(hex,opacity){return 'rgb('+(hex=hex.replace('#','')).match(new RegExp('(.{'+hex.length/3+'})','g')).map(function(l){return parseInt(hex.length%2?l+l:l,16)}).concat(isFinite(opacity)?opacity:1).join(',')+')';} function hexToRGB(hex){let alpha=false,h=hex.slice(hex.startsWith('#')?1:0);if(h.length===3){h=[...h].map(x=>x+x).join('');}else if(h.length===8){alpha=true;} h=parseInt(h,16);return('rgb'+ (alpha?'a':'')+ '('+ (h>>>(alpha?24:16))+ ', '+ ((h&(alpha?0x00ff0000:0x00ff00))>>>(alpha?16:8))+ ', '+ ((h&(alpha?0x0000ff00:0x0000ff))>>>(alpha?8:0))+ (alpha?`, ${h&0x000000ff}`:'')+ ')');} function unescapeHTML(string){let el=document.createElement('span');el.innerHTML=string;return el.innerText;} function createHTMLNode(htmlCode,tooltip){let htmlNode=document.createElement('span');htmlNode.innerHTML=htmlCode return htmlNode;} function unescapeHtml(s){return s.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,'"');} function handleChartsSelector(chartSelector,allowEdit=false,allowDelete=false){const chartsSelectorEl=document.querySelector(chartSelector);console.log(chartsSelectorEl);if(chartsSelectorEl){let charts=null;try{charts=localStorage.getItem('_charts_5793');}catch(e){} charts=charts?JSON.parse(charts):[];if(charts.length){let selectEl=document.createElement('select');let optionEl=document.createElement('option');optionEl.value='';optionEl.text=strings.chart.select_chart;selectEl.appendChild(optionEl);let selectedChart=null;for(let i=0;i