@astrodraw/astrochart
Version:
A free and open-source JavaScript library for generating SVG charts to display planets in astrology.
1 lines • 99.4 kB
JavaScript
!function(t,s){"object"==typeof exports&&"object"==typeof module?module.exports=s():"function"==typeof define&&define.amd?define([],s):"object"==typeof exports?exports.astrochart=s():t.astrochart=s()}(self,(()=>(()=>{"use strict";var t={d:(s,e)=>{for(var i in e)t.o(e,i)&&!t.o(s,i)&&Object.defineProperty(s,i,{enumerable:!0,get:e[i]})},o:(t,s)=>Object.prototype.hasOwnProperty.call(t,s),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},s={};t.r(s),t.d(s,{AspectCalculator:()=>_,Chart:()=>m,default:()=>R});const e={SYMBOL_SCALE:1,COLOR_BACKGROUND:"#fff",POINTS_COLOR:"#000",POINTS_TEXT_SIZE:8,POINTS_STROKE:1.8,SIGNS_COLOR:"#000",SIGNS_STROKE:1.5,MARGIN:50,PADDING:18,ID_CHART:"astrology",ID_RADIX:"radix",ID_TRANSIT:"transit",ID_ASPECTS:"aspects",ID_POINTS:"planets",ID_SIGNS:"signs",ID_CIRCLES:"circles",ID_AXIS:"axis",ID_CUSPS:"cusps",ID_RULER:"ruler",ID_BG:"bg",CIRCLE_COLOR:"#333",CIRCLE_STRONG:2,LINE_COLOR:"#333",INDOOR_CIRCLE_RADIUS_RATIO:2,INNER_CIRCLE_RADIUS_RATIO:8,RULER_RADIUS:4,SYMBOL_SUN:"Sun",SYMBOL_MOON:"Moon",SYMBOL_MERCURY:"Mercury",SYMBOL_VENUS:"Venus",SYMBOL_MARS:"Mars",SYMBOL_JUPITER:"Jupiter",SYMBOL_SATURN:"Saturn",SYMBOL_URANUS:"Uranus",SYMBOL_NEPTUNE:"Neptune",SYMBOL_PLUTO:"Pluto",SYMBOL_CHIRON:"Chiron",SYMBOL_LILITH:"Lilith",SYMBOL_NNODE:"NNode",SYMBOL_SNODE:"SNode",SYMBOL_FORTUNE:"Fortune",SYMBOL_AS:"As",SYMBOL_DS:"Ds",SYMBOL_MC:"Mc",SYMBOL_IC:"Ic",SYMBOL_AXIS_FONT_COLOR:"#333",SYMBOL_AXIS_STROKE:1.6,SYMBOL_CUSP_1:"1",SYMBOL_CUSP_2:"2",SYMBOL_CUSP_3:"3",SYMBOL_CUSP_4:"4",SYMBOL_CUSP_5:"5",SYMBOL_CUSP_6:"6",SYMBOL_CUSP_7:"7",SYMBOL_CUSP_8:"8",SYMBOL_CUSP_9:"9",SYMBOL_CUSP_10:"10",SYMBOL_CUSP_11:"11",SYMBOL_CUSP_12:"12",CUSPS_STROKE:1,CUSPS_FONT_COLOR:"#000",SYMBOL_ARIES:"Aries",SYMBOL_TAURUS:"Taurus",SYMBOL_GEMINI:"Gemini",SYMBOL_CANCER:"Cancer",SYMBOL_LEO:"Leo",SYMBOL_VIRGO:"Virgo",SYMBOL_LIBRA:"Libra",SYMBOL_SCORPIO:"Scorpio",SYMBOL_SAGITTARIUS:"Sagittarius",SYMBOL_CAPRICORN:"Capricorn",SYMBOL_AQUARIUS:"Aquarius",SYMBOL_PISCES:"Pisces",SYMBOL_SIGNS:["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"],COLOR_ARIES:"#FF4500",COLOR_TAURUS:"#8B4513",COLOR_GEMINI:"#87CEEB",COLOR_CANCER:"#27AE60",COLOR_LEO:"#FF4500",COLOR_VIRGO:"#8B4513",COLOR_LIBRA:"#87CEEB",COLOR_SCORPIO:"#27AE60",COLOR_SAGITTARIUS:"#FF4500",COLOR_CAPRICORN:"#8B4513",COLOR_AQUARIUS:"#87CEEB",COLOR_PISCES:"#27AE60",COLORS_SIGNS:["#FF4500","#8B4513","#87CEEB","#27AE60","#FF4500","#8B4513","#87CEEB","#27AE60","#FF4500","#8B4513","#87CEEB","#27AE60"],CUSTOM_SYMBOL_FN:null,SHIFT_IN_DEGREES:180,STROKE_ONLY:!1,ADD_CLICK_AREA:!1,COLLISION_RADIUS:10,ASPECTS:{conjunction:{degree:0,orbit:10,color:"transparent"},square:{degree:90,orbit:8,color:"#FF4500"},trine:{degree:120,orbit:8,color:"#27AE60"},opposition:{degree:180,orbit:10,color:"#27AE60"}},SHOW_DIGNITIES_TEXT:!0,DIGNITIES_RULERSHIP:"r",DIGNITIES_DETRIMENT:"d",DIGNITIES_EXALTATION:"e",DIGNITIES_EXACT_EXALTATION:"E",DIGNITIES_FALL:"f",DIGNITIES_EXACT_EXALTATION_DEFAULT:[{name:"Sun",position:19,orbit:2},{name:"Moon",position:33,orbit:2},{name:"Mercury",position:155,orbit:2},{name:"Venus",position:357,orbit:2},{name:"Mars",position:298,orbit:2},{name:"Jupiter",position:105,orbit:2},{name:"Saturn",position:201,orbit:2},{name:"NNode",position:63,orbit:2}],ANIMATION_CUSPS_ROTATION_SPEED:2,DEBUG:!1};var i=function(t,s,e,i,n){var r=(n.SHIFT_IN_DEGREES-i)*Math.PI/180;return{x:t+e*Math.cos(r),y:s+e*Math.sin(r)}},n=function(t){return 180*t/Math.PI},r=function(t,s,e){var i=[],n=t.x+e.COLLISION_RADIUS/1.4*e.SYMBOL_SCALE,r=t.y-e.COLLISION_RADIUS*e.SYMBOL_SCALE;return s.forEach((function(t,s){i.push({text:t,x:n,y:r+e.COLLISION_RADIUS/1.4*e.SYMBOL_SCALE*s})}),this),i},h=function(t){var s={hasError:!1,messages:[]};if(null==t)return s.messages.push("Data is not set."),s.hasError=!0,s;for(var e in null==t.planets&&(s.messages.push("There is not property 'planets'."),s.hasError=!0),t.planets)t.planets.hasOwnProperty(e)&&(Array.isArray(t.planets[e])||(s.messages.push("The planets property '"+e+"' has to be Array."),s.hasError=!0));return null==t.cusps||Array.isArray(t.cusps)||(s.messages.push("Property 'cusps' has to be Array."),s.hasError=!0),null!=t.cusps&&12!==t.cusps.length&&(s.messages.push("Count of 'cusps' values has to be 12."),s.hasError=!0),s},a=function(t,s,e){var i=document.getElementById(s);if(null!=i)return o(i),i;var n=document.getElementById(e);if(null==n)throw new Error("Paper element should exist");var r=document.createElementNS(n.namespaceURI,"g");return r.setAttribute("id",s),t.appendChild(r),r},o=function(t){if(null!=t)for(var s;null!=(s=t.lastChild);)t.removeChild(s)},S=function(t,s,e,n){if(0===t.length)return t.push(s),t;if(2*Math.PI*e.r-n.COLLISION_RADIUS*n.SYMBOL_SCALE*2*(t.length+2)<=0)throw n.DEBUG&&console.log("Universe circumference: "+2*Math.PI*e.r+", Planets circumference: "+n.COLLISION_RADIUS*n.SYMBOL_SCALE*2*(t.length+2)),new Error("Unresolved planet collision. Try change SYMBOL_SCALE or paper size.");var r,h,a,o,p,g=!1;t.sort(c);for(var A=0,L=t.length;A<L;A++)if(a=s,void 0,void 0,o=(h=t[A]).x-a.x,p=h.y-a.y,Math.sqrt(o*o+p*p)<=h.r+a.r){g=!0,(r=t[A]).index=A,n.DEBUG&&console.log("Resolve collision: "+r.name+" X "+s.name);break}if(g&&null!=r&&null!=r.index){u(r,s);var _=i(e.cx,e.cy,e.r,r.angle,n);r.x=_.x,r.y=_.y,_=i(e.cx,e.cy,e.r,s.angle,n),s.x=_.x,s.y=_.y,t.splice(r.index,1),t=S(t,r,e,n),t=S(t,s,e,n)}else t.push(s);return t.sort(c),t},u=function(t,s){var e=void 0===t.pointer?t.angle:t.pointer,i=void 0===s.pointer?s.angle:s.pointer;Math.abs(e-i)>180&&(e=(e+180)%360,i=(i+180)%360),e<=i?(t.angle=t.angle-1,s.angle=s.angle+1):e>=i&&(t.angle=t.angle+1,s.angle=s.angle-1),t.angle=(t.angle+360)%360,s.angle=(s.angle+360)%360},p=function(t,s,e,n,r,h){for(var a=[],o=n,S=e<=n?o-Math.abs(n-e)/2:o+Math.abs(n-e)/2,u=0,p=0;u<72;u++){var c=p+r,g=i(t,s,e,c,h),A=i(t,s,u%2==0?o:S,c,h);a.push({startX:g.x,startY:g.y,endX:A.x,endY:A.y}),p+=5}return a},c=function(t,s){return t.angle-s.angle};const g=function(){function t(t,s){if(null===t)throw new Error("Param 'cusps' must not be empty.");if(!Array.isArray(t)||12!==t.length)throw new Error("Param 'cusps' is not 12 length Array.");this.cusps=t,this.settings=null!=s?s:e}return t.prototype.getSign=function(t){var s=t%n(2*Math.PI);return Math.floor(s/30+1)},t.prototype.isRetrograde=function(t){return t<0},t.prototype.getHouseNumber=function(t){for(var s=t%n(2*Math.PI),e=0,i=this.cusps.length;e<i;e++)if(s>=this.cusps[e]&&s<this.cusps[e%(i-1)+1])return e+1;for(e=0,i=this.cusps.length;e<i;e++)if(this.cusps[e]>this.cusps[e%(i-1)+1])return e+1;throw new Error("Oops, serious error in the method: 'astrology.Zodiac.getHouseNumber'.")},t.prototype.getDignities=function(t,s){if(!t||!t.name||null==t.position)return[];var e=[],i=this.getSign(t.position);switch(t.position,n(2*Math.PI),t.name){case this.settings.SYMBOL_SUN:5===i?e.push(this.settings.DIGNITIES_RULERSHIP):11===i&&e.push(this.settings.DIGNITIES_DETRIMENT),1===i?e.push(this.settings.DIGNITIES_EXALTATION):6===i&&e.push(this.settings.DIGNITIES_FALL);break;case this.settings.SYMBOL_MOON:4===i?e.push(this.settings.DIGNITIES_RULERSHIP):10===i&&e.push(this.settings.DIGNITIES_DETRIMENT),2===i?e.push(this.settings.DIGNITIES_EXALTATION):8===i&&e.push(this.settings.DIGNITIES_FALL);break;case this.settings.SYMBOL_MERCURY:3===i?e.push(this.settings.DIGNITIES_RULERSHIP):9===i&&e.push(this.settings.DIGNITIES_DETRIMENT),6===i?e.push(this.settings.DIGNITIES_EXALTATION):12===i&&e.push(this.settings.DIGNITIES_FALL);break;case this.settings.SYMBOL_VENUS:2===i||7===i?e.push(this.settings.DIGNITIES_RULERSHIP):1!==i&&8!==i||e.push(this.settings.DIGNITIES_DETRIMENT),12===i?e.push(this.settings.DIGNITIES_EXALTATION):6===i&&e.push(this.settings.DIGNITIES_FALL);break;case this.settings.SYMBOL_MARS:1===i||8===i?e.push(this.settings.DIGNITIES_RULERSHIP):2!==i&&7!==i||e.push(this.settings.DIGNITIES_DETRIMENT),10===i?e.push(this.settings.DIGNITIES_EXALTATION):4===i&&e.push(this.settings.DIGNITIES_FALL);break;case this.settings.SYMBOL_JUPITER:9===i||12===i?e.push(this.settings.DIGNITIES_RULERSHIP):3!==i&&6!==i||e.push(this.settings.DIGNITIES_DETRIMENT),4===i?e.push(this.settings.DIGNITIES_EXALTATION):10===i&&e.push(this.settings.DIGNITIES_FALL);break;case this.settings.SYMBOL_SATURN:10===i||11===i?e.push(this.settings.DIGNITIES_RULERSHIP):4!==i&&5!==i||e.push(this.settings.DIGNITIES_DETRIMENT),7===i?e.push(this.settings.DIGNITIES_EXALTATION):1===i&&e.push(this.settings.DIGNITIES_FALL);break;case this.settings.SYMBOL_URANUS:11===i?e.push(this.settings.DIGNITIES_RULERSHIP):5===i&&e.push(this.settings.DIGNITIES_DETRIMENT),8===i?e.push(this.settings.DIGNITIES_EXALTATION):2===i&&e.push(this.settings.DIGNITIES_FALL);break;case this.settings.SYMBOL_NEPTUNE:12===i?e.push(this.settings.DIGNITIES_RULERSHIP):6===i&&e.push(this.settings.DIGNITIES_DETRIMENT),5===i||9===i?e.push(this.settings.DIGNITIES_EXALTATION):11!==i&&3!==i||e.push(this.settings.DIGNITIES_FALL);break;case this.settings.SYMBOL_PLUTO:8===i?e.push(this.settings.DIGNITIES_RULERSHIP):2===i&&e.push(this.settings.DIGNITIES_DETRIMENT),1===i?e.push(this.settings.DIGNITIES_EXALTATION):7===i&&e.push(this.settings.DIGNITIES_FALL)}if(null!=s&&Array.isArray(s))for(var r=0,h=s.length;r<h;r++)t.name===s[r].name&&this.hasConjunction(t.position,s[r].position,s[r].orbit)&&e.push(this.settings.DIGNITIES_EXACT_EXALTATION);return e},t.prototype.toDMS=function(t){t+=.5/3600/1e4;var s=parseInt(t.toString(),10);t=60*(t-s);var e=parseInt(t.toString(),10);return s+"° "+e+"' "+parseInt((60*(t-e)).toString(),10)},t.prototype.hasConjunction=function(t,s,e){var i=!1,r=s-e/2<0?n(2*Math.PI)-(s-e/2):s-e/2,h=s+e/2>=n(2*Math.PI)?s+e/2-n(2*Math.PI):s+e/2;return r>h?r>=t&&t<=r&&(i=!0):r<=t&&t<=h&&(i=!0),i},t}();var A={conjunction:{degree:0,orbit:10,color:"transparent"},square:{degree:90,orbit:8,color:"#FF4500"},trine:{degree:120,orbit:8,color:"#27AE60"},opposition:{degree:180,orbit:10,color:"#27AE60"}},L=function(){function t(t,s){var e;if(null==t)throw new Error("Param 'toPoint' must not be empty.");this.settings=null!=s?s:{},this.settings.ASPECTS=null!==(e=null==s?void 0:s.ASPECTS)&&void 0!==e?e:A,this.toPoints=t,this.context=this}return t.prototype.getToPoints=function(){return this.toPoints},t.prototype.radix=function(t){if(null==t)return[];var s=[];for(var e in t)if(t.hasOwnProperty(e))for(var i in this.toPoints)if(this.toPoints.hasOwnProperty(i)&&e!==i)for(var n in this.settings.ASPECTS)this.hasAspect(t[e][0],this.toPoints[i][0],this.settings.ASPECTS[n])&&s.push({aspect:{name:n,degree:this.settings.ASPECTS[n].degree,orbit:this.settings.ASPECTS[n].orbit,color:this.settings.ASPECTS[n].color},point:{name:e,position:t[e][0]},toPoint:{name:i,position:this.toPoints[i][0]},precision:this.calcPrecision(t[e][0],this.toPoints[i][0],this.settings.ASPECTS[n].degree).toFixed(4)});return s.sort(this.compareAspectsByPrecision)},t.prototype.transit=function(t){if(null==t)return[];var s=[];for(var e in t)if(t.hasOwnProperty(e))for(var i in this.toPoints)if(this.toPoints.hasOwnProperty(i))for(var n in this.settings.ASPECTS)if(this.hasAspect(t[e][0],this.toPoints[i][0],this.settings.ASPECTS[n])){var r=this.calcPrecision(t[e][0],this.toPoints[i][0],this.settings.ASPECTS[n].degree);this.isTransitPointApproachingToAspect(this.settings.ASPECTS[n].degree,this.toPoints[i][0],t[e][0])&&(r*=-1),t[e][1]&&t[e][1]<0&&(r*=-1),s.push({aspect:{name:n,degree:this.settings.ASPECTS[n].degree,orbit:this.settings.ASPECTS[n].orbit,color:this.settings.ASPECTS[n].color},point:{name:e,position:t[e][0]},toPoint:{name:i,position:this.toPoints[i][0]},precision:r.toFixed(4)})}return s.sort(this.compareAspectsByPrecision)},t.prototype.hasAspect=function(t,s,e){var i=!1,r=Math.abs(t-s);r>n(Math.PI)&&(r=n(2*Math.PI)-r);var h=e.degree-e.orbit/2,a=e.degree+e.orbit/2;return h<=r&&r<=a&&(i=!0),i},t.prototype.calcPrecision=function(t,s,e){var i=Math.abs(t-s);return i>n(Math.PI)&&(i=n(2*Math.PI)-i),Math.abs(i-e)},t.prototype.isTransitPointApproachingToAspect=function(t,s,e){e-s>0?e-s>n(Math.PI)?e=(e+t)%n(2*Math.PI):s=(s+t)%n(2*Math.PI):s-e>n(Math.PI)?s=(s+t)%n(2*Math.PI):e=(e+t)%n(2*Math.PI);var i=e,r=s,h=i-r;return Math.abs(h)>n(Math.PI)&&(i=s,r=e),i-r<0},t.prototype.compareAspectsByPrecision=function(t,s){return parseFloat(t.precision)-parseFloat(s.precision)},t}();const _=L,O=function(){function t(t,s){if("function"!=typeof t)throw new Error("param 'callback' has to be a function.");this.debug=s,this.callback=t,this.boundTick_=this.tick.bind(this)}return t.prototype.start=function(){this.requestID_||(this.lastGameLoopFrame=(new Date).getTime(),this.tick(),this.debug&&console.log("[astrology.Timer] start"))},t.prototype.stop=function(){this.requestID_&&(window.cancelAnimationFrame(this.requestID_),this.requestID_=void 0,this.debug&&console.log("[astrology.Timer] stop"))},t.prototype.isRunning=function(){return!!this.requestID_},t.prototype.tick=function(){var t=(new Date).getTime();this.requestID_=window.requestAnimationFrame(this.boundTick_),this.callback(t-this.lastGameLoopFrame),this.lastGameLoopFrame=t},t}();const d=function(){function t(t,s){for(var e in this.transit=t,this.isReverse=!1,this.rotation=0,this.settings=s,this.actualPlanetPos={},this.transit.data.planets)this.transit.data.planets.hasOwnProperty(e)&&(this.actualPlanetPos[e]=this.transit.data.planets[e]);this.timer=new O(this.update.bind(this),this.settings.DEBUG),this.timeSinceLoopStart=0,this.context=this,this.cuspsElement=null}return t.prototype.animate=function(t,s,e,i){this.data=t,this.duration=1e3*s,this.isReverse=e||!1,this.callback=i,this.rotation=0,this.cuspsElement=document.getElementById(this.transit.paper._paperElementId+"-"+this.settings.ID_TRANSIT+"-"+this.settings.ID_CUSPS),this.timer.start()},t.prototype.update=function(t){if(t=null!=t?t:1,this.timeSinceLoopStart+=t,this.timeSinceLoopStart>=this.duration)return this.timer.stop(),void("function"==typeof this.callback&&this.callback());var s=this.duration-this.timeSinceLoopStart<t?1:Math.round((this.duration-this.timeSinceLoopStart)/t);this.updatePlanets(s),this.updateCusps(s)},t.prototype.updateCusps=function(t){var s=n(2*Math.PI),e=this.transit.data.cusps[0]-this.data.cusps[0];e<0&&(e+=s),this.settings.ANIMATION_CUSPS_ROTATION_SPEED>0&&(e+=this.isReverse?-1*(this.settings.ANIMATION_CUSPS_ROTATION_SPEED*s+s):this.settings.ANIMATION_CUSPS_ROTATION_SPEED*s);var i=this.isReverse?this.rotation-e:e-this.rotation;i<0&&(i+=s);var r=i/t;this.isReverse&&(r*=-1),this.rotation+=r,this.cuspsElement.setAttribute("transform","rotate("+this.rotation+" "+this.transit.cx+" "+this.transit.cy+")"),1===t&&this.cuspsElement.removeAttribute("transform")},t.prototype.updatePlanets=function(t){for(var s in this.data.planets)if(this.data.planets.hasOwnProperty(s)){var e=this.actualPlanetPos[s][0],i=this.data.planets[s][0],r=null!=this.actualPlanetPos[s][1]&&this.actualPlanetPos[s][1]<0,h=void 0;(h=this.isReverse&&r?i-e:this.isReverse||r?e-i:i-e)<0&&(h+=n(2*Math.PI));var a=h/t;this.isReverse&&(a*=-1),r&&(a*=-1);var o=e+a;o<0&&(o+=n(2*Math.PI)),this.actualPlanetPos[s][0]=o}this.transit.drawPoints(this.actualPlanetPos)},t}();const l=function(){function t(t,s,e){var i=h(s);if(i.hasError)throw new Error(i.messages.join(" | "));this.data=s,this.paper=t.paper,this.cx=t.cx,this.cy=t.cy,this.toPoints=t.toPoints,this.radius=t.radius,this.settings=e,this.rulerRadius=this.radius/this.settings.INNER_CIRCLE_RADIUS_RATIO/this.settings.RULER_RADIUS,this.pointRadius=this.radius+(this.radius/this.settings.INNER_CIRCLE_RADIUS_RATIO+this.settings.PADDING*this.settings.SYMBOL_SCALE),this.shift=t.shift,this.universe=document.createElementNS(this.paper.root.namespaceURI,"g"),this.universe.setAttribute("id",this.paper._paperElementId+"-"+this.settings.ID_TRANSIT),this.paper.root.appendChild(this.universe),this.context=this}return t.prototype.drawBg=function(){var t=this.universe,s=a(t,this.paper._paperElementId+"-"+this.settings.ID_BG,this.paper._paperElementId),e=this.paper.segment(this.cx,this.cy,this.radius+this.radius/this.settings.INNER_CIRCLE_RADIUS_RATIO,0,359.99,this.radius/this.settings.INDOOR_CIRCLE_RADIUS_RATIO,1);e.setAttribute("fill",this.settings.STROKE_ONLY?"none":this.settings.COLOR_BACKGROUND),s.appendChild(e)},t.prototype.drawPoints=function(t){var s=null==t?this.data.planets:t;if(null!=s){var e,n,h=this.universe,o=a(h,this.paper._paperElementId+"-"+this.settings.ID_TRANSIT+"-"+this.settings.ID_POINTS,this.paper._paperElementId),u=(this.radius,this.radius,this.settings.INNER_CIRCLE_RADIUS_RATIO,this.radius,this.settings.INDOOR_CIRCLE_RADIUS_RATIO,this.settings.PADDING,this.settings.SYMBOL_SCALE,Object.keys(s).length,this.radius+this.radius/this.settings.INNER_CIRCLE_RADIUS_RATIO);for(var p in this.locatedPoints=[],s)if(s.hasOwnProperty(p)){var c=i(this.cx,this.cy,this.pointRadius,s[p][0]+this.shift,this.settings),A={name:p,x:c.x,y:c.y,r:this.settings.COLLISION_RADIUS*this.settings.SYMBOL_SCALE,angle:s[p][0]+this.shift,pointer:s[p][0]+this.shift};this.locatedPoints=S(this.locatedPoints,A,{cx:this.cx,cy:this.cy,r:this.pointRadius},this.settings)}this.settings.DEBUG&&console.log("Transit count of points: "+this.locatedPoints.length),this.settings.DEBUG&&console.log("Transit located points:\n"+JSON.stringify(this.locatedPoints)),this.locatedPoints.forEach((function(t){e=i(this.cx,this.cy,u,s[t.name][0]+this.shift,this.settings),n=i(this.cx,this.cy,u+this.rulerRadius/2,s[t.name][0]+this.shift,this.settings);var h=this.paper.line(e.x,e.y,n.x,n.y);if(h.setAttribute("stroke",this.settings.CIRCLE_COLOR),h.setAttribute("stroke-width",this.settings.CUSPS_STROKE*this.settings.SYMBOL_SCALE),o.appendChild(h),!this.settings.STROKE_ONLY&&s[t.name][0]+this.shift!==t.angle){e=n,n=i(this.cx,this.cy,this.pointRadius-this.settings.COLLISION_RADIUS*this.settings.SYMBOL_SCALE,t.angle,this.settings);var a=this.paper.line(e.x,e.y,n.x,n.y);a.setAttribute("stroke",this.settings.LINE_COLOR),a.setAttribute("stroke-width",this.settings.CUSPS_STROKE*this.settings.SYMBOL_SCALE*.5),o.appendChild(a)}var S=this.paper.getSymbol(t.name,t.x,t.y);S.setAttribute("id",this.paper.root.id+"-"+this.settings.ID_TRANSIT+"-"+this.settings.ID_POINTS+"-"+t.name),o.appendChild(S);var p=[(Math.floor(s[t.name][0])%30).toString()],c=new g(this.data.cusps,this.settings);s[t.name][1]&&c.isRetrograde(s[t.name][1])?p.push("R"):p.push(""),p=p.concat(c.getDignities({name:t.name,position:s[t.name][0]},this.settings.DIGNITIES_EXACT_EXALTATION_DEFAULT).join(",")),r(t,p,this.settings).forEach((function(t){o.appendChild(this.paper.text(t.text,t.x,t.y,this.settings.POINTS_TEXT_SIZE,this.settings.SIGNS_COLOR))}),this)}),this)}},t.prototype.drawCircles=function(){var t=this.universe,s=a(t,this.paper._paperElementId+"-"+this.settings.ID_TRANSIT+"-"+this.settings.ID_CIRCLES,this.paper._paperElementId),e=this.radius+this.radius/this.settings.INNER_CIRCLE_RADIUS_RATIO,i=this.paper.circle(this.cx,this.cy,e);i.setAttribute("stroke",this.settings.CIRCLE_COLOR),i.setAttribute("stroke-width",(this.settings.CIRCLE_STRONG*this.settings.SYMBOL_SCALE).toString()),s.appendChild(i)},t.prototype.drawCusps=function(t){var s=null==t?this.data.cusps:t;if(null!=s)for(var e=this.universe,r=a(e,this.paper._paperElementId+"-"+this.settings.ID_TRANSIT+"-"+this.settings.ID_CUSPS,this.paper._paperElementId),h=this.radius+(this.radius/this.settings.INNER_CIRCLE_RADIUS_RATIO-this.rulerRadius)/2,o=0,S=s.length;o<S;o++){var u=i(this.cx,this.cy,this.radius,s[o]+this.shift,this.settings),p=i(this.cx,this.cy,this.radius+this.radius/this.settings.INNER_CIRCLE_RADIUS_RATIO-this.rulerRadius,s[o]+this.shift,this.settings),c=this.paper.line(u.x,u.y,p.x,p.y);c.setAttribute("stroke",this.settings.LINE_COLOR),c.setAttribute("stroke-width",(this.settings.CUSPS_STROKE*this.settings.SYMBOL_SCALE).toString()),r.appendChild(c);var g=n(2*Math.PI),A=s[o],L=s[(o+1)%12],_=L-A>0?L-A:L-A+g,O=i(this.cx,this.cy,h,(A+_/2)%g+this.shift,this.settings);r.appendChild(this.paper.getSymbol((o+1).toString(),O.x,O.y))}},t.prototype.drawRuler=function(){var t=this.universe,s=a(t,this.paper.root.id+"-"+this.settings.ID_TRANSIT+"-"+this.settings.ID_RULER,this.paper._paperElementId),e=this.radius+this.radius/this.settings.INNER_CIRCLE_RADIUS_RATIO;p(this.cx,this.cy,e,e-this.rulerRadius,this.shift,this.settings).forEach((function(t){var e=this.paper.line(t.startX,t.startY,t.endX,t.endY);e.setAttribute("stroke",this.settings.CIRCLE_COLOR),e.setAttribute("stroke-width",this.settings.CUSPS_STROKE*this.settings.SYMBOL_SCALE),s.appendChild(e)}),this);var i=this.paper.circle(this.cx,this.cy,e-this.rulerRadius);i.setAttribute("stroke",this.settings.CIRCLE_COLOR),i.setAttribute("stroke-width",(this.settings.CUSPS_STROKE*this.settings.SYMBOL_SCALE).toString()),s.appendChild(i)},t.prototype.aspects=function(t){for(var s=null!=t&&Array.isArray(t)?t:new _(this.toPoints,this.settings).transit(this.data.planets),e=this.universe,n=a(e,this.paper.root.id+"-"+this.settings.ID_ASPECTS,this.paper._paperElementId),r=0,h=s.length;r<h;r++){var o=i(this.cx,this.cy,this.radius/this.settings.INDOOR_CIRCLE_RADIUS_RATIO,s[r].toPoint.position+this.shift,this.settings),S=i(this.cx,this.cy,this.radius/this.settings.INDOOR_CIRCLE_RADIUS_RATIO,s[r].point.position+this.shift,this.settings),u=this.paper.line(o.x,o.y,S.x,S.y);u.setAttribute("stroke",this.settings.STROKE_ONLY?this.settings.LINE_COLOR:s[r].aspect.color),u.setAttribute("stroke-width",(this.settings.CUSPS_STROKE*this.settings.SYMBOL_SCALE).toString()),u.setAttribute("data-name",s[r].aspect.name),u.setAttribute("data-degree",s[r].aspect.degree.toString()),u.setAttribute("data-point",s[r].point.name),u.setAttribute("data-toPoint",s[r].toPoint.name),u.setAttribute("data-precision",s[r].precision.toString()),n.appendChild(u)}return this.context},t.prototype.animate=function(t,s,e,i){var n=h(t);if(n.hasError)throw new Error(n.messages.join(" | "));return a(this.universe,this.paper._paperElementId+"-"+this.settings.ID_ASPECTS,this.paper._paperElementId),new d(this.context,this.settings).animate(t,s,e,function(){this.data=t,this.drawPoints(),this.drawCusps(),this.aspects(),"function"==typeof i&&i()}.bind(this)),this.context},t}();const C=function(){function t(t,s,e,i,r,a){this.settings=a;var o=h(r);if(o.hasError)throw new Error(o.messages.join(" | "));if(this.data=r,this.paper=t,this.cx=s,this.cy=e,this.radius=i,this.locatedPoints=[],this.rulerRadius=this.radius/this.settings.INNER_CIRCLE_RADIUS_RATIO/this.settings.RULER_RADIUS,this.pointRadius=this.radius-(this.radius/this.settings.INNER_CIRCLE_RADIUS_RATIO+2*this.rulerRadius+this.settings.PADDING*this.settings.SYMBOL_SCALE),this.toPoints=JSON.parse(JSON.stringify(this.data.planets)),this.shift=0,this.data.cusps&&this.data.cusps[0]){var S=n(2*Math.PI);this.shift=S-this.data.cusps[0]}var u=document.createElementNS(this.paper.root.namespaceURI,"g");u.setAttribute("id",this.paper.root.id+"-"+this.settings.ID_ASPECTS),this.paper.root.appendChild(u),this.universe=document.createElementNS(this.paper.root.namespaceURI,"g"),this.universe.setAttribute("id",this.paper.root.id+"-"+this.settings.ID_RADIX),this.paper.root.appendChild(this.universe),this.context=this}return t.prototype.drawBg=function(){var t=this.universe,s=a(t,this.paper.root.id+"-"+this.settings.ID_BG,this.paper.root.id),e=this.paper.segment(this.cx,this.cy,this.radius-this.radius/this.settings.INNER_CIRCLE_RADIUS_RATIO,0,359.99,this.radius/this.settings.INDOOR_CIRCLE_RADIUS_RATIO,1);e.setAttribute("fill",this.settings.STROKE_ONLY?"none":this.settings.COLOR_BACKGROUND),s.appendChild(e)},t.prototype.drawUniverse=function(){for(var t=this.universe,s=a(t,this.paper.root.id+"-"+this.settings.ID_RADIX+"-"+this.settings.ID_SIGNS,this.paper.root.id),e=0,n=30,r=this.shift,h=this.settings.COLORS_SIGNS.length;e<h;e++){var o=this.paper.segment(this.cx,this.cy,this.radius,r,r+n,this.radius-this.radius/this.settings.INNER_CIRCLE_RADIUS_RATIO);o.setAttribute("fill",this.settings.STROKE_ONLY?"none":this.settings.COLORS_SIGNS[e]),o.setAttribute("id",this.paper.root.id+"-"+this.settings.ID_RADIX+"-"+this.settings.ID_SIGNS+"-"+e),o.setAttribute("stroke",this.settings.STROKE_ONLY?this.settings.CIRCLE_COLOR:"none"),o.setAttribute("stroke-width",this.settings.STROKE_ONLY?"1":"0"),s.appendChild(o),r+=n}for(e=0,n=30,r=15+this.shift,h=this.settings.SYMBOL_SIGNS.length;e<h;e++){var S=i(this.cx,this.cy,this.radius-this.radius/this.settings.INNER_CIRCLE_RADIUS_RATIO/2,r,this.settings);s.appendChild(this.paper.getSymbol(this.settings.SYMBOL_SIGNS[e],S.x,S.y)),r+=n}},t.prototype.drawPoints=function(){if(null!=this.data.planets){var t,s,e=this.universe,n=a(e,this.paper.root.id+"-"+this.settings.ID_RADIX+"-"+this.settings.ID_POINTS,this.paper.root.id),h=(this.radius,this.radius,this.settings.INNER_CIRCLE_RADIUS_RATIO,this.radius,this.settings.INDOOR_CIRCLE_RADIUS_RATIO,this.settings.PADDING,this.settings.SYMBOL_SCALE,Object.keys(this.data.planets).length,this.radius-(this.radius/this.settings.INNER_CIRCLE_RADIUS_RATIO+this.rulerRadius));for(var o in this.data.planets)if(this.data.planets.hasOwnProperty(o)){var u=i(this.cx,this.cy,this.pointRadius,this.data.planets[o][0]+this.shift,this.settings),p={name:o,x:u.x,y:u.y,r:this.settings.COLLISION_RADIUS*this.settings.SYMBOL_SCALE,angle:this.data.planets[o][0]+this.shift,pointer:this.data.planets[o][0]+this.shift};this.locatedPoints=S(this.locatedPoints,p,{cx:this.cx,cy:this.cy,r:this.pointRadius},this.settings)}this.settings.DEBUG&&console.log("Radix count of points: "+this.locatedPoints.length),this.settings.DEBUG&&console.log("Radix located points:\n"+JSON.stringify(this.locatedPoints)),this.locatedPoints.forEach((function(e){t=i(this.cx,this.cy,h,this.data.planets[e.name][0]+this.shift,this.settings),s=i(this.cx,this.cy,h-this.rulerRadius/2,this.data.planets[e.name][0]+this.shift,this.settings);var a=this.paper.line(t.x,t.y,s.x,s.y);if(a.setAttribute("stroke",this.settings.CIRCLE_COLOR),a.setAttribute("stroke-width",this.settings.CUSPS_STROKE*this.settings.SYMBOL_SCALE),n.appendChild(a),!this.settings.STROKE_ONLY&&this.data.planets[e.name][0]+this.shift!==e.angle){t=s,s=i(this.cx,this.cy,this.pointRadius+this.settings.COLLISION_RADIUS*this.settings.SYMBOL_SCALE,e.angle,this.settings);var o=this.paper.line(t.x,t.y,s.x,s.y);o.setAttribute("stroke",this.settings.LINE_COLOR),o.setAttribute("stroke-width",this.settings.CUSPS_STROKE*this.settings.SYMBOL_SCALE*.5),n.appendChild(o)}var S=this.paper.getSymbol(e.name,e.x,e.y);S.setAttribute("id",this.paper.root.id+"-"+this.settings.ID_RADIX+"-"+this.settings.ID_POINTS+"-"+e.name),n.appendChild(S);var u=[(Math.floor(this.data.planets[e.name][0])%30).toString()],p=new g(this.data.cusps,this.settings);this.data.planets[e.name][1]&&p.isRetrograde(this.data.planets[e.name][1])?u.push("R"):u.push(""),this.settings.SHOW_DIGNITIES_TEXT&&(u=u.concat(p.getDignities({name:e.name,position:this.data.planets[e.name][0]},this.settings.DIGNITIES_EXACT_EXALTATION_DEFAULT).join(","))),r(e,u,this.settings).forEach((function(t){n.appendChild(this.paper.text(t.text,t.x,t.y,this.settings.POINTS_TEXT_SIZE,this.settings.SIGNS_COLOR))}),this)}),this)}},t.prototype.drawAxis=function(){if(null!=this.data.cusps){var t,s,e,n=this.universe,r=a(n,this.paper.root.id+"-"+this.settings.ID_RADIX+"-"+this.settings.ID_AXIS,this.paper.root.id),h=this.radius+this.radius/this.settings.INNER_CIRCLE_RADIUS_RATIO/4,o=0,S=3,u=6,p=9;[o,S,u,p].forEach((function(n){var a;s=i(this.cx,this.cy,this.radius,this.data.cusps[n]+this.shift,this.settings),e=i(this.cx,this.cy,h,this.data.cusps[n]+this.shift,this.settings),(t=this.paper.line(s.x,s.y,e.x,e.y)).setAttribute("stroke",this.settings.LINE_COLOR),t.setAttribute("stroke-width",this.settings.SYMBOL_AXIS_STROKE*this.settings.SYMBOL_SCALE),r.appendChild(t),n===o&&(a=i(this.cx,this.cy,h+20*this.settings.SYMBOL_SCALE,this.data.cusps[n]+this.shift,this.settings),r.appendChild(this.paper.getSymbol(this.settings.SYMBOL_AS,a.x,a.y))),n===u&&(a=i(this.cx,this.cy,h+2*this.settings.SYMBOL_SCALE,this.data.cusps[n]+this.shift,this.settings),r.appendChild(this.paper.getSymbol(this.settings.SYMBOL_DS,a.x,a.y))),n===S&&(a=i(this.cx,this.cy,h+10*this.settings.SYMBOL_SCALE,this.data.cusps[n]-2+this.shift,this.settings),r.appendChild(this.paper.getSymbol(this.settings.SYMBOL_IC,a.x,a.y))),n===p&&(a=i(this.cx,this.cy,h+10*this.settings.SYMBOL_SCALE,this.data.cusps[n]+2+this.shift,this.settings),r.appendChild(this.paper.getSymbol(this.settings.SYMBOL_MC,a.x,a.y)))}),this)}},t.prototype.drawCusps=function(){if(null!=this.data.cusps)for(var t=this.universe,s=a(t,this.paper.root.id+"-"+this.settings.ID_RADIX+"-"+this.settings.ID_CUSPS,this.paper.root.id),e=this.radius/this.settings.INDOOR_CIRCLE_RADIUS_RATIO+this.settings.COLLISION_RADIUS*this.settings.SYMBOL_SCALE,r=[0,3,6,9],h=function(t,h){var a,S,u,p,c,g,A,L,_,O,d;(a=o.cx,S=o.cy,u=o.data.cusps[t]+o.shift,p=o.radius/o.settings.INDOOR_CIRCLE_RADIUS_RATIO,c=o.radius-(o.radius/o.settings.INNER_CIRCLE_RADIUS_RATIO+o.rulerRadius),g=o.pointRadius,A=o.locatedPoints,L=o.settings,d=[],function(t,s,e){for(var i=n(2*Math.PI),r=e.COLLISION_RADIUS*e.SYMBOL_SCALE/2,h=!1,a=0,o=s.length;a<o;a++)if(Math.abs(s[a].angle-t)<=r||i-Math.abs(s[a].angle-t)<=r){h=!0;break}return h}(u,A,L)?(_=i(a,S,p,u,L),O=i(a,S,g-L.COLLISION_RADIUS*L.SYMBOL_SCALE,u,L),d.push({startX:_.x,startY:_.y,endX:O.x,endY:O.y}),g+L.COLLISION_RADIUS*L.SYMBOL_SCALE*2<c&&(_=i(a,S,g+L.COLLISION_RADIUS*L.SYMBOL_SCALE*2,u,L),O=i(a,S,c,u,L),d.push({startX:_.x,startY:_.y,endX:O.x,endY:O.y}))):(_=i(a,S,p,u,L),O=i(a,S,c,u,L),d.push({startX:_.x,startY:_.y,endX:O.x,endY:O.y})),d).forEach((function(e){var i=this.paper.line(e.startX,e.startY,e.endX,e.endY);i.setAttribute("stroke",this.settings.LINE_COLOR),r.includes(t)?i.setAttribute("stroke-width",this.settings.SYMBOL_AXIS_STROKE*this.settings.SYMBOL_SCALE):i.setAttribute("stroke-width",this.settings.CUSPS_STROKE*this.settings.SYMBOL_SCALE),s.appendChild(i)}),o);var l=n(2*Math.PI),C=o.data.cusps[t],I=o.data.cusps[(t+1)%12],E=I-C>0?I-C:I-C+l,m=i(o.cx,o.cy,e,(C+E/2)%l+o.shift,o.settings);s.appendChild(o.paper.getSymbol((t+1).toString(),m.x,m.y))},o=this,S=0,u=this.data.cusps.length;S<u;S++)h(S)},t.prototype.aspects=function(t){for(var s=null!=t&&Array.isArray(t)?t:new _(this.toPoints).radix(this.data.planets),e=this.universe,n=a(e,this.paper.root.id+"-"+this.settings.ID_ASPECTS,this.paper.root.id),r=[],h=0,o=s.length;h<o;h++){var S=s[h].aspect.name+"-"+s[h].point.name+"-"+s[h].toPoint.name,u=s[h].aspect.name+"-"+s[h].toPoint.name+"-"+s[h].point.name;if(!r.includes(u)){r.push(S);var p=i(this.cx,this.cy,this.radius/this.settings.INDOOR_CIRCLE_RADIUS_RATIO,s[h].toPoint.position+this.shift,this.settings),c=i(this.cx,this.cy,this.radius/this.settings.INDOOR_CIRCLE_RADIUS_RATIO,s[h].point.position+this.shift,this.settings),g=this.paper.line(p.x,p.y,c.x,c.y);g.setAttribute("stroke",this.settings.STROKE_ONLY?this.settings.LINE_COLOR:s[h].aspect.color),g.setAttribute("stroke-width",(this.settings.CUSPS_STROKE*this.settings.SYMBOL_SCALE).toString()),g.setAttribute("data-name",s[h].aspect.name),g.setAttribute("data-degree",s[h].aspect.degree.toString()),g.setAttribute("data-point",s[h].point.name),g.setAttribute("data-toPoint",s[h].toPoint.name),g.setAttribute("data-precision",s[h].precision.toString()),n.appendChild(g)}}return this.context},t.prototype.addPointsOfInterest=function(t){for(var s in t)t.hasOwnProperty(s)&&(this.toPoints[s]=t[s]);return this.context},t.prototype.drawRuler=function(){var t=this.universe,s=a(t,this.paper.root.id+"-"+this.settings.ID_RADIX+"-"+this.settings.ID_RULER,this.paper.root.id),e=this.radius-(this.radius/this.settings.INNER_CIRCLE_RADIUS_RATIO+this.rulerRadius);p(this.cx,this.cy,e,e+this.rulerRadius,this.shift,this.settings).forEach((function(t){var e=this.paper.line(t.startX,t.startY,t.endX,t.endY);e.setAttribute("stroke",this.settings.CIRCLE_COLOR),e.setAttribute("stroke-width",this.settings.CUSPS_STROKE*this.settings.SYMBOL_SCALE),s.appendChild(e)}),this);var i=this.paper.circle(this.cx,this.cy,e);i.setAttribute("stroke",this.settings.CIRCLE_COLOR),i.setAttribute("stroke-width",(this.settings.CUSPS_STROKE*this.settings.SYMBOL_SCALE).toString()),s.appendChild(i)},t.prototype.drawCircles=function(){var t=this.universe,s=a(t,this.paper.root.id+"-"+this.settings.ID_RADIX+"-"+this.settings.ID_CIRCLES,this.paper.root.id),e=this.paper.circle(this.cx,this.cy,this.radius/this.settings.INDOOR_CIRCLE_RADIUS_RATIO);e.setAttribute("stroke",this.settings.CIRCLE_COLOR),e.setAttribute("stroke-width",(this.settings.CIRCLE_STRONG*this.settings.SYMBOL_SCALE).toString()),s.appendChild(e),(e=this.paper.circle(this.cx,this.cy,this.radius)).setAttribute("stroke",this.settings.CIRCLE_COLOR),e.setAttribute("stroke-width",(this.settings.CIRCLE_STRONG*this.settings.SYMBOL_SCALE).toString()),s.appendChild(e),(e=this.paper.circle(this.cx,this.cy,this.radius-this.radius/this.settings.INNER_CIRCLE_RADIUS_RATIO)).setAttribute("stroke",this.settings.CIRCLE_COLOR),e.setAttribute("stroke-width",(this.settings.CIRCLE_STRONG*this.settings.SYMBOL_SCALE).toString()),s.appendChild(e)},t.prototype.transit=function(t){a(this.universe,this.paper.root.id+"-"+this.settings.ID_RADIX+"-"+this.settings.ID_AXIS,this.paper.root.id);var s=new l(this.context,t,this.settings);return s.drawBg(),s.drawPoints(),s.drawCusps(),s.drawRuler(),s.drawCircles(),s},t}();var I=function(){function t(t,s,e,i){this.settings=i;var n=document.getElementById(t);if(null==n)throw new Error("Root element not found");var r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),r.setAttribute("style","position: relative; overflow: hidden;"),r.setAttribute("version","1.1"),r.setAttribute("width",s.toString()),r.setAttribute("height",e.toString()),r.setAttribute("viewBox","0 0 "+s+" "+e),n.appendChild(r),this._paperElementId=t+"-"+this.settings.ID_CHART;var h=document.createElementNS(r.namespaceURI,"g");h.setAttribute("id",this._paperElementId),r.appendChild(h),this.DOMElement=r,this.root=h,this.width=s,this.height=e,this.context=this}return t.prototype._getSymbol=function(t,s,e){switch(t){case this.settings.SYMBOL_SUN:return this.sun(s,e);case this.settings.SYMBOL_MOON:return this.moon(s,e);case this.settings.SYMBOL_MERCURY:return this.mercury(s,e);case this.settings.SYMBOL_VENUS:return this.venus(s,e);case this.settings.SYMBOL_MARS:return this.mars(s,e);case this.settings.SYMBOL_JUPITER:return this.jupiter(s,e);case this.settings.SYMBOL_SATURN:return this.saturn(s,e);case this.settings.SYMBOL_URANUS:return this.uranus(s,e);case this.settings.SYMBOL_NEPTUNE:return this.neptune(s,e);case this.settings.SYMBOL_PLUTO:return this.pluto(s,e);case this.settings.SYMBOL_CHIRON:return this.chiron(s,e);case this.settings.SYMBOL_LILITH:return this.lilith(s,e);case this.settings.SYMBOL_NNODE:return this.nnode(s,e);case this.settings.SYMBOL_SNODE:return this.snode(s,e);case this.settings.SYMBOL_FORTUNE:return this.fortune(s,e);case this.settings.SYMBOL_ARIES:return this.aries(s,e);case this.settings.SYMBOL_TAURUS:return this.taurus(s,e);case this.settings.SYMBOL_GEMINI:return this.gemini(s,e);case this.settings.SYMBOL_CANCER:return this.cancer(s,e);case this.settings.SYMBOL_LEO:return this.leo(s,e);case this.settings.SYMBOL_VIRGO:return this.virgo(s,e);case this.settings.SYMBOL_LIBRA:return this.libra(s,e);case this.settings.SYMBOL_SCORPIO:return this.scorpio(s,e);case this.settings.SYMBOL_SAGITTARIUS:return this.sagittarius(s,e);case this.settings.SYMBOL_CAPRICORN:return this.capricorn(s,e);case this.settings.SYMBOL_AQUARIUS:return this.aquarius(s,e);case this.settings.SYMBOL_PISCES:return this.pisces(s,e);case this.settings.SYMBOL_AS:return this.ascendant(s,e);case this.settings.SYMBOL_DS:return this.descendant(s,e);case this.settings.SYMBOL_MC:return this.mediumCoeli(s,e);case this.settings.SYMBOL_IC:return this.immumCoeli(s,e);case this.settings.SYMBOL_CUSP_1:return this.number1(s,e);case this.settings.SYMBOL_CUSP_2:return this.number2(s,e);case this.settings.SYMBOL_CUSP_3:return this.number3(s,e);case this.settings.SYMBOL_CUSP_4:return this.number4(s,e);case this.settings.SYMBOL_CUSP_5:return this.number5(s,e);case this.settings.SYMBOL_CUSP_6:return this.number6(s,e);case this.settings.SYMBOL_CUSP_7:return this.number7(s,e);case this.settings.SYMBOL_CUSP_8:return this.number8(s,e);case this.settings.SYMBOL_CUSP_9:return this.number9(s,e);case this.settings.SYMBOL_CUSP_10:return this.number10(s,e);case this.settings.SYMBOL_CUSP_11:return this.number11(s,e);case this.settings.SYMBOL_CUSP_12:return this.number12(s,e);default:var i=this.circle(s,e,8);return i.setAttribute("stroke","#ffff00"),i.setAttribute("stroke-width","1"),i.setAttribute("fill","#ff0000"),i}},t.prototype.getSymbol=function(t,s,e){if(null==this.settings.CUSTOM_SYMBOL_FN)return this._getSymbol(t,s,e);var i=this.settings.CUSTOM_SYMBOL_FN(t,s,e,this.context);return null==i||void 0===i?this._getSymbol(t,s,e):i},t.prototype.createRectForClick=function(t,s){var e=document.createElementNS(this.context.root.namespaceURI,"rect");return e.setAttribute("x",(t-this.settings.SIGNS_STROKE).toString()),e.setAttribute("y",(s-this.settings.SIGNS_STROKE).toString()),e.setAttribute("width","20px"),e.setAttribute("height","20px"),e.setAttribute("fill","transparent"),e},t.prototype.getSignWrapperId=function(t){return this._paperElementId+"-"+this.settings.ID_RADIX+"-"+this.settings.ID_SIGNS+"-"+t},t.prototype.getHouseIdWrapper=function(t){return this._paperElementId+"-"+this.settings.ID_RADIX+"-"+this.settings.ID_CUSPS+"-"+t},t.prototype.sun=function(t,s){t=Math.round(t+-1*this.settings.SYMBOL_SCALE),s=Math.round(s+-8*this.settings.SYMBOL_SCALE);var e=document.createElementNS(this.context.root.namespaceURI,"g");e.setAttribute("transform","translate("+-t*(this.settings.SYMBOL_SCALE-1)+","+-s*(this.settings.SYMBOL_SCALE-1)+") scale("+this.settings.SYMBOL_SCALE+")");var i=document.createElementNS(this.context.root.namespaceURI,"path");return i.setAttribute("d","m"+t+", "+s+" -2.18182,0.727268 -2.181819,1.454543 -1.454552,2.18182 -0.727268,2.181819 0,2.181819 0.727268,2.181819 1.454552,2.18182 2.181819,1.454544 2.18182,0.727276 2.18181,0 2.18182,-0.727276 2.181819,-1.454544 1.454552,-2.18182 0.727268,-2.181819 0,-2.181819 -0.727268,-2.181819 -1.454552,-2.18182 -2.181819,-1.454543 -2.18182,-0.727268 -2.18181,0 m 0.727267,6.54545 -0.727267,0.727276 0,0.727275 0.727267,0.727268 0.727276,0 0.727267,-0.727268 0,-0.727275 -0.727267,-0.727276 -0.727276,0 m 0,0.727276 0,0.727275 0.727276,0 0,-0.727275 -0.727276,0"),i.setAttribute("stroke",this.settings.POINTS_COLOR),i.setAttribute("stroke-width",this.settings.POINTS_STROKE.toString()),i.setAttribute("fill","none"),e.appendChild(i),e},t.prototype.moon=function(t,s){t=Math.round(t+-2*this.settings.SYMBOL_SCALE),s=Math.round(s+-7*this.settings.SYMBOL_SCALE);var e=document.createElementNS(this.context.root.namespaceURI,"g");e.setAttribute("transform","translate("+-t*(this.settings.SYMBOL_SCALE-1)+","+-s*(this.settings.SYMBOL_SCALE-1)+") scale("+this.settings.SYMBOL_SCALE+")");var i=document.createElementNS(this.context.root.namespaceURI,"path");return i.setAttribute("d","m"+t+", "+s+" a 7.4969283,7.4969283 0 0 1 0,14.327462 7.4969283,7.4969283 0 1 0 0,-14.327462 z"),i.setAttribute("stroke",this.settings.POINTS_COLOR),i.setAttribute("stroke-width",this.settings.POINTS_STROKE.toString()),i.setAttribute("fill","none"),e.appendChild(i),e},t.prototype.mercury=function(t,s){t=Math.round(t+-2*this.settings.SYMBOL_SCALE),s=Math.round(s+7*this.settings.SYMBOL_SCALE);var e=document.createElementNS(this.context.root.namespaceURI,"g");e.setAttribute("transform","translate("+-t*(this.settings.SYMBOL_SCALE-1)+","+-s*(this.settings.SYMBOL_SCALE-1)+") scale("+this.settings.SYMBOL_SCALE+")");var i=document.createElementNS(this.context.root.namespaceURI,"path");i.setAttribute("d","m"+t+", "+s+" 4.26011,0 m -2.13005,-2.98207 0,5.11213 m 4.70312,-9.7983 a 4.70315,4.70315 0 0 1 -4.70315,4.70314 4.70315,4.70315 0 0 1 -4.70314,-4.70314 4.70315,4.70315 0 0 1 4.70314,-4.70315 4.70315,4.70315 0 0 1 4.70315,4.70315 z"),i.setAttribute("stroke",this.settings.POINTS_COLOR),i.setAttribute("stroke-width",this.settings.POINTS_STROKE.toString()),i.setAttribute("fill","none"),e.appendChild(i);var n=document.createElementNS(this.context.root.namespaceURI,"path");return n.setAttribute("d","m"+(t+6)+", "+(s+-16)+" a 3.9717855,3.9717855 0 0 1 -3.95541,3.59054 3.9717855,3.9717855 0 0 1 -3.95185,-3.59445"),n.setAttribute("stroke",this.settings.POINTS_COLOR),n.setAttribute("stroke-width",this.settings.POINTS_STROKE.toString()),n.setAttribute("fill","none"),e.appendChild(n),e},t.prototype.venus=function(t,s){t=Math.round(t+2*this.settings.SYMBOL_SCALE),s=Math.round(s+7*this.settings.SYMBOL_SCALE);var e=document.createElementNS(this.context.root.namespaceURI,"g");e.setAttribute("transform","translate("+-t*(this.settings.SYMBOL_SCALE-1)+","+-s*(this.settings.SYMBOL_SCALE-1)+") scale("+this.settings.SYMBOL_SCALE+")");var i=document.createElementNS(this.context.root.namespaceURI,"path");return i.setAttribute("d","m"+t+", "+s+" -4.937669,0.03973 m 2.448972,2.364607 0,-5.79014 c -3.109546,-0.0085 -5.624617,-2.534212 -5.620187,-5.64208 0.0044,-3.107706 2.526514,-5.621689 5.635582,-5.621689 3.109068,0 5.631152,2.513983 5.635582,5.621689 0.0044,3.107868 -2.510641,5.633586 -5.620187,5.64208"),i.setAttribute("stroke",this.settings.POINTS_COLOR),i.setAttribute("stroke-width",this.settings.POINTS_STROKE.toString()),i.setAttribute("fill","none"),e.appendChild(i),e},t.prototype.mars=function(t,s){t=Math.round(t+2*this.settings.SYMBOL_SCALE),s=Math.round(s+-2*this.settings.SYMBOL_SCALE);var e=document.createElementNS(this.context.root.namespaceURI,"g");e.setAttribute("transform","translate("+-t*(this.settings.SYMBOL_SCALE-1)+","+-s*(this.settings.SYMBOL_SCALE-1)+") scale("+this.settings.SYMBOL_SCALE+")");var i=document.createElementNS(this.context.root.namespaceURI,"path");return i.setAttribute("d","m"+t+", "+s+" c -5.247438,-4.150623 -11.6993,3.205518 -7.018807,7.886007 4.680494,4.680488 12.036628,-1.771382 7.885999,-7.018816 z m 0,0 0.433597,0.433595 3.996566,-4.217419 m -3.239802,-0.05521 3.295015,0 0.110427,3.681507"),i.setAttribute("stroke",this.settings.POINTS_COLOR),i.setAttribute("stroke-width",this.settings.POINTS_STROKE.toString()),i.setAttribute("fill","none"),e.appendChild(i),e},t.prototype.jupiter=function(t,s){t=Math.round(t+-5*this.settings.SYMBOL_SCALE),s=Math.round(s+-2*this.settings.SYMBOL_SCALE);var e=document.createElementNS(this.context.root.namespaceURI,"g");e.setAttribute("transform","translate("+-t*(this.settings.SYMBOL_SCALE-1)+","+-s*(this.settings.SYMBOL_SCALE-1)+") scale("+this.settings.SYMBOL_SCALE+")");var i=document.createElementNS(this.context.root.namespaceURI,"path");return i.setAttribute("d","m"+t+", "+s+" c -0.43473,0 -1.30422,-0.40572 -1.30422,-2.02857 0,-1.62285 1.73897,-3.2457 3.47792,-3.2457 1.73897,0 3.47792,1.21715 3.47792,4.05713 0,2.83999 -2.1737,7.30283 -6.52108,7.30283 m 12.17269,0 -12.60745,0 m 9.99902,-11.76567 0,15.82279"),i.setAttribute("stroke",this.settings.POINTS_COLOR),i.setAttribute("stroke-width",this.settings.POINTS_STROKE.toString()),i.setAttribute("fill","none"),e.appendChild(i),this.settings.ADD_CLICK_AREA&&e.appendChild(this.createRectForClick(t,s-3)),e},t.prototype.saturn=function(t,s){t=Math.round(t+5*this.settings.SYMBOL_SCALE),s=Math.round(s+10*this.settings.SYMBOL_SCALE);var e=document.createElementNS(this.context.root.namespaceURI,"g");e.setAttribute("transform","translate("+-t*(this.settings.SYMBOL_SCALE-1)+","+-s*(this.settings.SYMBOL_SCALE-1)+") scale("+this.settings.SYMBOL_SCALE+")");var i=document.createElementNS(this.context.root.namespaceURI,"path");return i.setAttribute("d","m"+t+", "+s+" c -0.52222,0.52221 -1.04445,1.04444 -1.56666,1.04444 -0.52222,0 -1.56667,-0.52223 -1.56667,-1.56667 0,-1.04443 0.52223,-2.08887 1.56667,-3.13332 1.04444,-1.04443 2.08888,-3.13331 2.08888,-5.22219 0,-2.08888 -1.04444,-4.17776 -3.13332,-4.17776 -1.97566,0 -3.65555,1.04444 -4.69998,3.13333 m -2.55515,-5.87499 6.26664,0 m -3.71149,-2.48054 0,15.14438"),i.setAttribute("stroke",this.settings.POINTS_COLOR),i.setAttribute("stroke-width",this.settings.POINTS_STROKE.toString()),i.setAttribute("fill","none"),e.appendChild(i),e},t.prototype.uranus=function(t,s){t=Math.round(t+-5*this.settings.SYMBOL_SCALE),s=Math.round(s+-7*this.settings.SYMBOL_SCALE);var e=document.createElementNS(this.context.root.namespaceURI,"g");e.setAttribute("transform","translate("+-t*(this.settings.SYMBOL_SCALE-1)+","+-s*(this.settings.SYMBOL_SCALE-1)+") scale("+this.settings.SYMBOL_SCALE+")");var i=document.createElementNS(this.context.root.namespaceURI,"path");i.setAttribute("d","m"+t+", "+s+" 0,10.23824 m 10.23633,-10.32764 0,10.23824 m -10.26606,-4.6394 10.23085,0 m -5.06415,-5.51532 0,11.94985"),i.setAttribute("stroke",this.settings.POINTS_COLOR),i.setAttribute("stroke-width",this.settings.POINTS_STROKE.toString()),i.setAttribute("fill","none"),e.appendChild(i);var n=document.createElementNS(this.context.root.namespaceURI,"path");return n.setAttribute("d","m"+(t+7)+", "+(s+14.5)+" a 1.8384377,1.8384377 0 0 1 -1.83844,1.83843 1.8384377,1.8384377 0 0 1 -1.83842,-1.83843 1.8384377,1.8384377 0 0 1 1.83842,-1.83844 1.8384377,1.8384377 0 0 1 1.83844,1.83844 z"),n.setAttribute("stroke",this.settings.POINTS_COLOR),n.setAttribute("stroke-width",this.settings.POINTS_STROKE.toString()),n.setAttribute("fill","none"),e.appendChild(n),this.settings.ADD_CLICK_AREA&&e.appendChild(this.createRectForClick(t,s)),e},t.prototype.neptune=function(t,s){t=Math.round(t+3*this.settings.SYMBOL_SCALE),s=Math.round(s+-5*this.settings.SYMBOL_SCALE);var e=document.createElementNS(this.context.root.namespaceURI,"g");e.setAttribute("transform","translate("+-t*(this.settings.SYMBOL_SCALE-1)+","+-s*(this.settings.SYMBOL_SCALE-1)+") scale("+this.settings.SYMBOL_SCALE+")");var i=document.createElementNS(this.context.root.namespaceURI,"path");return i.setAttribute("d","m"+t+", "+s+" 1.77059,-2.36312 2.31872,1.8045 m -14.44264,-0.20006 2.34113,-1.77418 1.74085,2.38595 m -1.80013,-1.77265 c -1.23776,8.40975 0.82518,9.67121 4.95106,9.67121 4.12589,0 6.18883,-1.26146 4.95107,-9.67121 m -7.05334,3.17005 2.03997,-2.12559 2.08565,2.07903 m -5.32406,9.91162 6.60142,0 m -3.30071,-12.19414 0,15.55803"),i.setAttribute("stroke",this.settings.POINTS_COLOR),i.setAttribute("stroke-width",this.settings.POINTS_STROKE.toString()),i.setAttribute("fill","none"),e.appendChild(i),e},t.prototype.pluto=function(t,s){t=Math.round(t+5*this.settings.SYMBOL_SCALE),s=Math.round(s+-5*this.settings.SYMBOL_SCALE);var e=document.createElementNS(this.context.root.namespaceURI,"g");e.setAttribute("transform","translate("+-t*(this.settings.SYMBOL_SCALE-1)+","+-s*(this.settings.SYMBOL_SCALE-1)+") scale("+this.settings.SYMBOL_SCALE+")");var i=document.createElementNS(this.context.root.namespaceURI,"path");i.setAttribute("d","m"+t+", "+s+" a 5.7676856,5.7676856 0 0 1 -2.88385,4.99496 5.7676856,5.7676856 0 0 1 -5.76768,0 5.7676856,5.7676856 0 0 1 -2.88385,-4.99496 m 5.76771,13.93858 0,-8.17088 m -3.84512,4.32576 7.69024,0"),i.setAttribute("stroke",this.settings.POINTS_COLOR),i.setAttribute("stroke-width",this.settings.POINTS_STROKE.toString()),i.setAttribute("fill","none"),e.appendChild(i);var n=document.createElementNS(this.context.root.namespaceURI,"path");return n.setAttribute("d","m"+(t+-2.3)+", "+(s+0)+" a 3.3644834,3.3644834 0 0 1 -3.36448,3.36449 3.3644834,3.3644834 0 0 1 -3.36448,-3.36449 3.3644834,3.3644834 0 0 1 3.36448,-3.36448 3.3644834,3.3644834 0 0 1 3.36448,3.36448 z"),n.setAttribute("stroke",this.settings.POINTS_COLOR),n.setAttribute("stroke-width",this.settings.POINTS_STROKE.toString()),n.setAttribute("fill","none"),e.appendChild(n),e},t.prototype.chiron=function(t,s){t=Math.round(t+3*this.settings.SYMBOL_SCALE),s=Math.round(s+5*this.settings.SYMBOL_SCALE);var e=document.createElementNS(this.context.root.namespaceURI,"g");e.setAttribute("transform","translate("+-t*(this.settings.SYMBOL_SCALE-1)+","+-s*(this.settings.SYMBOL_SCALE-1)+") scale("+this.settings.SYMBOL_SCALE+")");var i=document.createElementNS(this.context.root.namespaceURI,"path");i.setAttribute("d","m"+t+", "+s+" a 3.8764725,3.0675249 0 0 1 -3.876473,3.067525 3.8764725,3.0675249 0 0 1 -3.876472,-3.067525 3.8764725,3.0675249 0 0 1 3.876472,-3.067525 3.8764725,3.0675249 0 0 1 3.876473,3.067525 z"),i.setAttribute("stroke",this.settings.POINTS_COLOR),i.setAttribute("stroke-width",this.settings.POINTS_STROKE.toString()),i.setAttribute("fill","none"),e.appendChild(i);var n=document.createElementNS(this.context.root.namespaceURI,"path");return n.setAttribute("d","m"+(t+0)+", "+(s+-13)+" -3.942997,4.243844 4.110849,3.656151 m -4.867569,-9.009468 0,11.727251"),n.setAttribute("stroke",this.settings.POINTS_COLOR),n.setAttribute("stroke-width",this.settings.POINTS_STROKE.toString()),n.setAttribute("fill","none"),e.appendChild(n),e},t.prototype.lilith=function(t,s){t=Math.round(t+2*this.settings.SYMBOL_SCALE),s=Math.round(s+4*this.settings.SYMBOL_SCALE);var e=document.createElementNS(this.context.root.namespaceURI,"g");e.setAttribute("transform","translate("+-t*(this.settings.SYMBOL_SCALE-1)+","+-s*(this.settings.SYMBOL_SCALE-1)+") scale("+this.settings.SYMBOL_SCALE+")");var i=document.createElementNS(this.context.root.namespaceURI,"path");return i.setAttribute("d","m"+t+", "+s+" -2.525435,-1.12853 -1.464752,-1.79539 -0.808138,-2.20576 0.151526,-2.05188 0.909156,-1.5389 1.010173,-1.02593 0.909157,-0.56427 1.363735,-0.61556 m 2.315327,-0.39055 -1.716301,0.54716 -1.7163,1.09431 -1.1442,1.64146 -0.572102,1.64146 0,1.64146 0.572102,1.64147 1.1442,1.64145 1.7163,1.09432 1.716301,0.54715 m 0,-11.49024 -2.2884,0 -2.288401,0.54716 -1.716302,1.09431 -1.144201,1.64