realmap
Version:
Wooritech map chart component library
7 lines (6 loc) • 352 kB
JavaScript
/**
* Realmap v1.0.5
* Copyright (C) 2023-2025 WooriTech Inc.
* All Rights Reserved.
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).RealMap={})}(this,function(t){"use strict";const e="http://www.w3.org/2000/svg",s=Object.prototype.hasOwnProperty,i=function(t){return t&&"object"==typeof t&&!Array.isArray(t)},r=Array.isArray,o=function(t){return"function"==typeof t},n=function(t){return"string"==typeof t},a=function(t){return"number"==typeof t},h=function(t){return"boolean"==typeof t},l=Object.assign,c=Math.floor,d=Math.ceil,_=Math.cos,u=Math.sin,p=Math.min,g=Math.max,m=Math.abs,f=function(t){if(t&&"object"==typeof t&&!r(t))return l({},t)},b=function(t,e){return t=parseFloat(t),isNaN(t)?parseFloat(e):t},y=function(t,e,s){let i=parseFloat(t);return isNaN(i)?(i=parseFloat(e),isNaN(i)?parseFloat(s):e):t},w=function(t,e){return void 0!==t?t:e},x=function(t,e,s){return void 0!==t?t:void 0!==e?e:s},v=(t,e,s)=>t+(e-t)*s;class C{static setDebugging(t=!0){this._debugging=t}static debugging(){this._debugging}}C._debugging=!1;class S{static async loadConfigAsync(t,e=!1){if(t&&t.map){if(n(t.map))t.map={url:t.map};else if(r(t.map))for(let e=0;e<t.map.length;e++)n(t.map[e])&&(t.map[e]={url:t.map[e]});const s=r(t.map)?t.map:[t.map];for(const t of s)!i(t.source)&&n(t.url)&&t.url&&(e?console.warn("원격 맵 소스를 사용하기 위해서는 RealMap.createChartAsync()로 생성해야 합니다: "+t.url):t.source=await fetch(t.url).then(t=>t.json()))}if(t&&t.series){const s=r(t.series)?t.series:[t.series];for(const t of s)!i(t.data)&&!r(t.data)&&n(t.dataUrl)&&t.dataUrl&&(e?console.warn("원격 시리즈 데이터를 사용하기 위해서는 RealMap.createChartAsync()로 생성해야 합니다: "+t.dataUrl):(t.data=await fetch(t.dataUrl).then(t=>t.json()),delete t.dataUrl))}}}const L={ko:{dateFormat:"yyyy.MM.dd",am:"오전",pm:"오후",notExistsDataField:"존재하지 않는 필드입니다: %1",notSpecifiedDataField:"하나 이상의 데이터필드가 설정돼야 합니다.",invalidFieldName:"잘못된 데이터필드 이름입니다: %1",invalidFieldIndex:"잘못된 데이터필드 index입니다: %1",invalidRowIndex:"잘못된 데이터행 index입니다: %1",canNotModifyData:"읽기 전용 데이터를 변경할 수 없습니다.",canNotModifyDeleted:"삭제 상태 행을 변경할 수 없습니다: %1",requiredField:"반드시 값을 지정해야 하는 필드입니다: %1",invalidValueInDomain:"값이 필드 값 도메인에 포함되지 않습니다: %1",invalidValueInRange:"값이 필드 값 범위에 포함되지 않습니다: %1",invalidToIndex:"잘못된 'to' index입니다.: %1",requireSourceData:"원본 data가 반드시 지정돼야 합니다.",requireFilterName:"필터 이름이 반드시 지정돼야 합니다.",alreadyEditing:"이미 데이터 편집 중입니다.",invalidDateFormat:"잘못된 시간 날짜 형식입니다: %1",invalidSizeValue:"잘못된 Size 값입니다: %1",invalidOuterDiv:"잘못된 외부 div 입니다: %1",canNotHorzGrouping:"수평 모드일 때 그룹핑할 수 없습니다.",dataMustSet:"데이터가 먼저 설정돼야 합니다.",requireGroupingInfos:"하나 이상의 행 그룹핑 정보가 설정돼야 합니다.",canNotRowGrouping:"데이터링크 view에 대해 행그룹핑 할 수 없습니다. dataGroupBy()를 사용하세요.",canNotDataGrouping:"데이터링크 view가 아니면 데이터그룹핑할 수 없습니다. rowGroupBy()를 사용하세요.",canNotHorzInGrouping:"그룹핑 상태일 때 수평모드로 변경할 수 없습니다.",unknownLayoutType:"잘못된 layout 종류입니다: %1",layoutMustSet:"레이아웃 모델이 반드시 설정돼야 합니다.",unknownItemViewType:"잘못된 item view 종류입니다: %1",requireCommandName:"Command 이름이 지정돼야 합니다.",commandNameDuplicated:"이미 존재하는 command 이름입니다: %1",requireDataOrGroup:"데이터소스나 그룹 모델이 반드시 지정돼야 합니다.",requireTableName:"테이블모델의 이름이 지정돼야 합니다.",alreadyTableExists:"이미 존해하는 테이블모델입니다: %1",selectEditRowFirst:"수정하거나 삽입할 행을 먼저 선택하세요."},en:{dateFormat:"M/d/yyyy",am:"AM",pm:"PM",notExistsDataField:"A data field is not exists: %1",notSpecifiedDataField:"At least one datafield must be set.",invalidFieldName:"Invalid field name: %1",invalidFieldIndex:"Invalid field index: %1",invalidRowIndex:"Invalid row index: %1",canNotModifyData:"Can not modify a readonly data.",canNotModifyDeleted:"Can not modify a deleted row: %1",requiredField:"Required field: %1",invalidValueInDomain:"The value is not int the domain: %1",invalidValueInRange:"The value is not int the range: %1",invalidToIndex:"Invalid 'to' index: %1",requireSourceData:"A source data must be set.",requireFilterName:"A filter name must be set.",alreadyEditing:"DataView is already editing.",invalidDateFormat:"Invalid datetime format: %1",invalidSizeValue:"Invalid size value: %1",invalidOuterDiv:"Invalid outer div element: %1",canNotHorzGrouping:"Can not row grouping in horz mode.",dataMustSet:"A data must be set first.",requireGroupingInfos:"At least one grouping info must be set.",canNotRowGrouping:"Can not row grouping by data link view. use dataGroupBy().",canNotDataGrouping:"Can not data grouping without data link view. rowGroupBy()를 사용하세요.",canNotHorzInGrouping:"Can not change to horz mode while grouping",unknownLayoutType:"Invalid layout: %1",layoutMustSet:"A layout model must be set.",unknownItemViewType:"Unknow item view type: %1",requireCommandName:"Command name must be supplied.",commandNameDuplicated:"Command name is already exists: %1",requireDataOrGroup:"A data or group view must be set.",requireTableName:"The name of table model is required.",alreadyTableExists:"A table model is already exists: %1",selectEditRowFirst:"First select the row you want to edit or insert."}};let A=L.ko;const M=void 0,k="%".charCodeAt(0),P=Math.PI,I=2*P,N=-P/2,T=P/180,E=180/P;function V(t){return t>I?t%I:t}function D(t){return parseFloat(t.toPrecision(12))}function R(t){return t*Math.PI/180}function $(t){return 180*t/Math.PI}function O(t){return t+"px"}function F(t){return t+"%"}function B(t){return null==t||Number.isNaN(t)||""===t}function z(t){return null==t||Number.isNaN(t)||""===t}function j(t){return t<10?"0"+t:String(t)}function H(t){return t<10?"00"+t:t<100?"0"+t:String(t)}function G(t,e){const s={};return s[t]=e,s}function Y(t,e){let s,i;if(null==t||Number.isNaN(t)){if(e)return null;i=0,s=!0}else if(!(s=!isNaN(i=+t))){const s=t.trim();if(s.charCodeAt(s.length-1)===k&&(i=1===s.length?NaN:parseFloat(s)),isNaN(i)){if(e)return null;K(A.invalidSizeValue,t)}}return{size:i,fixed:s}}function W(t,e,s=NaN){return t?t.fixed?t.size:t.size*e/100:s}const Z={fill:"fill",fillOpacity:"fill-opacity",stroke:"stroke",strokeWidth:"stroke-width",strokeDasharray:"stroke-dasharray",fontFamily:"font-family",fontSize:"font-size",fontWeight:"font-weight",fontStyle:"font-style",padding:"padding",margin:"margin"},U=function(t){const e=Z[t];if(!e){let e=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();return Z[t]=e,e}return e};var X;!function(t){t.UP="up",t.DOWN="down",t.LEFT="left",t.RIGHT="right"}(X||(X={}));const K=(t,e)=>{throw new Error(((t,e)=>t.replace("%1",e))(t,e))},q="vertical-lr",J="vertical-rl";function Q(t){const e=String(t).split(/\s+/g),s=b(parseFloat(e[0]),0),i=parseFloat(e[1]),r=parseFloat(e[2]),o=parseFloat(e[3]);return{l:isNaN(o)?isNaN(i)?s:i:o,r:isNaN(i)?s:i,t:s,b:isNaN(r)?s:r}}const tt={BOTTOM:"bottom",TOP:"top",RIGHT:"right",LEFT:"left",BODY:"body"},et=Object.freeze([0,0]);function st(t){return isFinite(t[0]+t[1])}function it(t){let e=1/0,s=1/0,i=-1/0,r=-1/0;for(const o of t){const t=o.map(t=>t[0]),n=o.map(t=>t[1]);e=p(e,...t),s=p(s,...n),i=g(i,...t),r=g(r,...n)}return{h1:e,v1:s,h2:i,v2:r}}const rt=(new Date).getTime();"undefined"==typeof window||Element.prototype.animate||(Element.prototype.animate=function(t){});const ot="undefined"!=typeof navigator?navigator.userAgent:"",nt=ot?navigator.appVersion:"",at=!!ot.match(/Trident.*rv\:11\./),ht=-1!==nt.indexOf("MSIE 10"),lt=-1!==nt.indexOf("MSIE 9"),ct=at||ht||lt;class dt{static log(...t){this.LOGGING&&console.log(...t)}static logIf(t,...e){this.LOGGING&&t&&console.log(...e)}static now(){return+new Date}static parseDate(t,e){const s=new Date(t);return isNaN(s.getTime())?e||new Date:s}static isLeapYear(t){return t%4==0&&t%100!=0||t%400==0}static dateOfYear(t){var e=t.getMonth(),s=t.getDate(),i=[0,31,59,90,120,151,181,212,243,273,304,334][e]+s;return e>1&&dt.isLeapYear(t.getFullYear())&&i++,i}static incMonth(t,e){const s=t.getDate();return t.setDate(1),t.setMonth(t.getMonth()+e),t.setDate(p(s,dt.month_days[dt.isLeapYear(t.getFullYear())?1:0][t.getMonth()])),t}static minDate(t,e){return null!==t?t:null!==e?e:t.getTime()<e.getTime()?t:e}static maxDate(t,e){return null!==t?e:null!==e||t.getTime()>e.getTime()?t:e}static weekOfMonth(t,e,s){const i=t.getMonth(),r=t.getFullYear(),o=new Date(r,i,1).getDay(),n=new Date(r,i+1,0).getDate(),a=t.getDate()+o-1,h=e+Math.ceil((n+o-7)/7),l=e+Math.floor(a/7);return s||l<2+e?l:l===h?e+5:l}static weekOfYear(t,e){const s=t.getFullYear(),i=new Date(s,0,1).getDay(),r=this.dateOfYear(t)+i-1;return e+Math.floor(r/7)}static isObject(t){return t&&"object"==typeof t&&!r(t)}static isValidObject(t){if(this.isObject(t))for(let e in t)if(t.hasOwnProperty(e))return!0}static checkArray(t){return r(t)?t:void 0}static makeArray(t,e=!1){return null!=t?r(t)?t:[t]:e?[]:void 0}static makeNumArray(t){return r(t)?t.map(t=>+t):null!=t?[+t]:[]}static getIntArray(t,e=0){const s=[];for(let i=e,r=e+t;i<r;i++)s.push(i);return s}static isValueArray(t){if(r(t)){for(let e=t.length-1;e>=0;e--)if(null!=t[e]&&"object"==typeof t[e])return!1;return!0}return!1}static toArray(t){return r(t)?t:null!=t?[t]:null}static copyArray(t){return r(t)?t.slice(0):null!=t?[t]:void 0}static push(t,e){if(e&&e.length>0)for(let s=0,i=e.length;s<i;s++)t.push(e[s])}static isDefined(t){return null!=t}static isNotDefined(t){return null==t}static isNum(t){return"number"==typeof t}static canNumber(t){return!isNaN(t)&&!isNaN(parseFloat(t))}static isValidNum(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}static getNum(t,e=0){const s=parseFloat(t);return isFinite(s)?s:e}static toNum(t,e=0){return isNaN(t)||null===t||""===t?e:+t}static compareText(t,e,s=!1){return t=t||"",e=e||"",s&&(t=t.toLocaleLowerCase(),e=e.toLocaleLowerCase()),t>e?1:t<e?-1:0}static getTimeF(){return(new Date).getTime()/1e3}static getTimer(){return(new Date).getTime()-rt}static isWhiteSpace(t){return!t||!t.trim()}static pad(t,e,s){return e=g(e||2,1),s=s||"0",new Array(e-String(t).length+1).join(s)+t}static pad16(t,e,s){return e=g(e||2,1),s=s||"0",new Array(e-t.toString(16).length+1).join(s)+t.toString(16)}static pick(...t){const e=t.length;let s;for(let i=0;i<e;i++)if(s=t[i],null!=s)return s}static toStr(t){return Number.isNaN(t)||null==t?"":String(t)}static extend(t,e){t=t||{};for(let s in e)t[s]=e[s];return t}static equalNumbers(t,e){return isNaN(t)==isNaN(e)&&!isNaN(t)&&t==e}static equalArrays(t,e){if(t===e)return!0;if(null==t||null==e)return!1;const s=t.length;if(s!=e.length)return!1;for(let i=0;i<s;++i)if(t[i]!==e[i])return!1;return!0}static isEmpty(t){if(t)for(let e in t)return!1;return!0}static isNotEmpty(t){if(t)for(let e in t)return!0;return!1}static deepClone(t){if(t instanceof Date)return new Date(t);if(null==t||"object"!=typeof t)return t;{const e=r(t)?[]:{};for(let s of Object.keys(t))e[s]=dt.deepClone(t[s]);return e}}static getArray(t,e){const s=[];for(let i=0;i<t;i++)s.push(e);return s}static getNumArray(t,e=0){const s=[];for(let i=0;i<t;i++)s.push(e);return s}static dedupe(t,e){for(let s=(t=t.sort(e||((t,e)=>t>e?1:t<e?-1:0))).length-1;s>0;s--)t[s]===t[s-1]&&t.splice(s,1);return t}static sortNum(t){return t.sort((t,e)=>t-e)}static logElapsed(t,e){const s=+new Date;e(),dt.log(t,+new Date-s+"ms")}static clamp(t,e,s){return g(e,p(s,t))}static clampEx(t,e,s){return isNaN(e)||(t=g(e,t)),isNaN(s)||(t=p(s,t)),t}static makeIntArray(t,e){const s=new Array(g(0,e-t));for(let i=t;i<e;i++)s[i-t]=i;return s}static shuffle(t){for(let e=t.length-1;e>0;e--){const s=Math.floor(Math.random()*(e+1));[t[e],t[s]]=[t[s],t[e]]}}static isDate(t){return"[object Date]"===Object.prototype.toString.call(t)}static isValidDate(t){return t.getTime()==t.getTime()}static asFunction(t){return"function"==typeof t?t:void 0}static getFieldProp(t){const e=t.indexOf(".");if(e>=0)return{field:t.substring(0,e),props:t.substring(e+1).split(".")}}static uniqueKey(){return Math.random().toString(36).substring(2,10)}static startsWith(t,e){if(t&&e)return 0===t.indexOf(e)}static endsWith(t,e){if(t&&e)return t.indexOf(e,-t.length)===t.length-e.length}static scaleNumber(t,e,s){const i=m(t);if(i>=1e3){let r=e.length;for(;r>0;){const o=Math.pow(1e3,r--);if(o<=Math.pow(10,Math.log(i)*Math.LOG10E)&&(s||10*i%o==0))return{value:t/o,symbol:e[r]}}}}static jitter(t,e){return t+(2*Math.random()-1)*e}static getDistance(t,e){const s=(e[0]-t[0])*T,i=(e[1]-t[1])*T,r=Math.sin(s/2)*Math.sin(s/2)+Math.cos(t[0]*T)*Math.cos(e[0]*T)*Math.sin(i/2)*Math.sin(i/2);return 6371*(2*Math.atan2(Math.sqrt(r),Math.sqrt(1-r)))}static getLogger(t){if(t>=2)return function(e){return Math.log(e)/Math.log(t)}}static getMinMax(t){let e=t[0],s=t[0];for(let i=1;i<t.length;i++)e=p(e,t[i]),s=g(s,t[i]);return{min:e,max:s}}}dt.LOGGING=!1,dt.week_days=["일","월","화","수","목","금","토"],dt.long_week_days=["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],dt.month_days=[[31,28,31,30,31,30,31,31,30,31,30,31],[31,29,31,30,31,30,31,31,30,31,30,31]];const _t=Object.freeze({x:0,y:0,width:0,height:0});function ut(t){return{width:t.width,height:t.height}}class pt{static create(t,e,s,i){const r=arguments.length;return dt.isObject(t)?new pt(t.x,t.y,t.width,t.height):r<2?new pt(t,t,t,t):r<3?new pt(t,e,t,e):new pt(t,e,s,i)}constructor(t=0,e=0,s=0,i=0){this.x=t,this.y=e,this.width=s,this.height=i}get left(){return this.x}set left(t){const e=t-this.x;this.x+=e,this.width-=e}get right(){return this.x+this.width}set right(t){const e=t-(this.x+this.width);this.width+=e}get top(){return this.y}set top(t){const e=t-this.y;this.y+=e,this.height-=e}get bottom(){return this.y+this.height}set bottom(t){const e=t-(this.y+this.height);this.height+=e}get isEmpty(){return 0===this.width||0===this.height}get isValid(){return function(t){return!(isNaN(t.x)||isNaN(t.y)||isNaN(t.width)||isNaN(t.height))}(this)}clone(){return new pt(this.x,this.y,this.width,this.height)}getInner(){return new pt(0,0,this.width,this.height)}equals(t){return t===this||t&&this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height}leftBy(t){return this.x+=t,this.width-=t,this}rightBy(t){return this.width+=t,this}topBy(t){return this.y+=t,this.height-=t,this}bottomBy(t){return this.height+=t,this}shrink(t,e){return this.width-=t,this.height-=e,this}expand(t,e){return this.width+=t,this.height+=e,this}contains(t,e){return t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height}setEmpty(){return this.width=this.height=0,this}move(t=0,e=0){return this.x=t,this.y=e,this}set(t,e,s,i){return this.x=t,this.y=e,this.width=s,this.height=i,this}setWidth(t){return this.width=t,this}copy(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyHorz(t){return this.x=t.x,this.width=t.width,this}copyVert(t){return this.y=t.y,this.height=t.height,this}inflate(t=0,e,s,i){return e=void 0!==e?e:t,s=void 0!==s?s:t,i=void 0!==i?i:e,t&&(this.left=this.x-t),e&&(this.top=this.y-e),s&&(this.right=this.right+s),i&&(this.bottom=this.bottom+i),this}offset(t,e){return this.x+=t,this.y+=e,this}round(){const t=this.clone();return t.x>>>=0,t.y>>>=0,t.width>>>=0,t.height>>>=0,t}union(t){const e=this.clone();return e.left=Math.min(this.x,t.x),e.right=Math.max(this.right,t.right),e.top=Math.min(this.y,t.y),e.bottom=Math.max(this.bottom,t.bottom),e}normalize(){return this.width<0&&(this.x-=this.width,this.width*=-1),this.height<0&&(this.y-=this.height,this.height*=-1),this}toString(){return"{x: "+this.x+", y: "+this.y+", width: "+this.width+", height: "+this.height+"}"}}pt.Empty=new pt,pt.Temp=new pt;const gt={inOutSine:t=>-(_(P*t)-1)/2};class mt{constructor(){this.delay=0,this.duration=mt.DURATION,this.easing="inOutSine",this._handler=()=>{const t=+new Date-this._started-this.delay;let e=p(1,g(0,D(t/this.duration)));this._easing&&(e=this._easing(e));try{this._timer&&this._canUpdate()&&!1!==this._doUpdate(e)||this._stop()}finally{t>=this.duration?this._stop():this._started&&this._timer&&(this._ani=window.requestAnimationFrame(this._handler))}}}setDuration(t){return this.duration=t,this}start(t){return t&&(this.endHandler=t),this._start(this.duration,this.delay,this.easing),this}stop(){this._stop()}_start(t,e=0,s=null){this._started&&this._stop(),this.duration=b(t,mt.DURATION),this.delay=e||0,this._easing=gt[s],this._doStart(),this._started=+new Date,this._timer=setTimeout(()=>this._stop(),1.2*this.duration),this._handler()}_stop(){var t;this._started&&(cancelAnimationFrame(this._ani),clearTimeout(this._timer),this._timer=null,this._started=null,this._doStop(),null===(t=this.endHandler)||void 0===t||t.call(this,this))}_doStart(){}_doStop(){}_canUpdate(){return!0}}mt.DURATION=700,mt.SHORT_DURATION=300;let ft=0;class bt{constructor(t){this.$_destroyed=!1,this.$_destroying=!1,t||(this.$_hash=String(ft++))}destroy(){return this.$_destroyed||this.$_destroying||(this.$_destroying=!0,this._doDestory(),this.$_destroyed=!0),null}_doDestory(){}get destroying(){return this.$_destroying}get orphaned(){return this.$_destroying||this.$_destroyed}get hash(){return this.$_hash}isMe(t){return t===this.$_hash}toString(){return this.constructor.name}toBool(t){return"string"==typeof t?"true"===t:t}toNum(t,e=NaN){return t=parseFloat(t),isNaN(t)?e:t}}class yt extends bt{constructor(){super(...arguments),this._listeners=[]}_addListener(t){t&&this._listeners.indexOf(t)<0&&this._listeners.push(t)}_removeListener(t){const e=this._listeners.indexOf(t);e>=0&&this._listeners.splice(e,1)}_fireEvent(t,...e){const s=Array.prototype.slice.call(arguments,0);s[0]=this;for(const e of this._listeners){const i=e[t];if(i){const t=i.apply(e,s);if(void 0!==t)return t}}}}const wt=Object.values({CIRCLE:"circle",DIAMOND:"diamond",SQUARE:"square",TRIANGLE:"triangle",STAR:"star",ITRIANGLE:"itriangle",RECTANGLE:"rectangle"}),xt=.001,vt=Math.PI;class Ct{static line(t,e,s,i){return["M",t,e,"L",s,i]}static lines(...t){let e=0;const s=["M",t[e],t[e+1]];for(e+=2;e<t.length;e+=2)s.push("L",t[e],t[e+1]);return s}static lines2(...t){let e=0;const s=["M",t[e].x,t[e].y];for(;e<t.length;e++)s.push("L",t[e].x,t[e].y);return s}static box(t,e,s,i){return["M",t,e,"L",s,e,"L",s,i,"L",t,i,"Z"]}static rect(t){return this.rectangle(t.x,t.y,t.width,t.height)}static rectangle(t,e,s,i){return["M",t,e,"h",s,"v",i,"h",-s,"Z"]}static bar(t,e,s,i,r,o){return r>0?o>0?(r=p(-i/2,s/2,r),["M",t,e-(o=p(-i/2,s/2,o)),"v",i+o+r,"a",r,r,0,0,1,r,-r,"h",s-2*r,"a",r,r,0,0,1,r,r,"v",-i-r-o,"a",o,o,0,0,1,-o,o,"h",2*o-s,"a",o,o,0,0,1,-o,-o,"Z"]):["M",t,e,"v",i+(r=p(-i/2,s/2,r)),"a",r,r,0,0,1,r,-r,"h",s-2*r,"a",r,r,0,0,1,r,r,"v",-i-r,"Z"]:o>0?["M",t,e-(o=p(-i/2,s/2,o)),"v",i+o,"h",s,"v",-i-o,"a",o,o,0,0,1,-o,o,"h",2*o-s,"a",o,o,0,0,1,-o,-o,"Z"]:["M",t,e,"h",s,"v",i,"h",-s,"v",-i,"Z"]}static square(t,e,s,i){const r=p(s,i);return["M",t+=(s-r)/2,e+=(i-r)/2,"h",r,"v",r,"h",-r,"Z"]}static circle(t,e,s){return["M",t,e,"m",s,0,"a",s,s,0,1,1,2*-s,0,"a",s,s,0,1,1,2*s,0]}static ellipse(t,e,s,i){return this.arc(t+s/2,e+i/2,s/2,i/2,0,2*Math.PI,!0,!0)}static arc(t,e,s,i,r,o,n,a=!1){const h=V(m(o-r)),l=2*vt-h<.01,c=h-vt<.01?0:1,d=n?1:0,p=_(r),g=u(r),f=_(o-=l?d?xt:-.001:0),b=u(o),y=[];return y.push("M",t+s*p,e+i*g,"A",s,i,0,c,d,t+s*f,e+i*b),l&&y.push("M",t,e),a&&y.push("Z"),y}static sector(t,e,s,i,r,o,n,a){const h=V(m(n-o)),l=2*vt-h<xt;let c=h-vt<xt?0:1;const d=a?1:0,p=_(o),g=u(o),f=_(n-=l?d?xt:-.001:0),b=u(n),y=s*r,w=i*r,x=[];return x.push("M",t+s*p,e+i*g,"A",s,i,0,c,d,t+s*f,e+i*b),l?x.push("M",t+y*f,e+w*b):x.push("L",t+y*f,e+w*b),isNaN(y)||x.push("A",y,w,0,c,1-d,t+y*p,e+w*g),x.push("Z"),x}static diamond(t,e,s,i){return["M",t+s/2,e,"L",t+s,e+i/2,"L",t+s/2,e+i,"L",t,e+i/2,"Z"]}static triangle(t,e,s,i){return["M",t+s/2,e,"L",t+s,e+i,"L",t,e+i,"Z"]}static itriangle(t,e,s,i){return["M",t,e,"L",t+s,e,"L",t+s/2,e+i,"Z"]}static star(t,e,s,i){let r=-Math.PI/2;const o=t+s/2,n=e+i/2+(i/2-i/2*u(r+6*Math.PI/5))/2,a=s/2,h=i/2,l=s/4,c=i/4,d=2*Math.PI/5,p=d/2,g=[];g.push("M",o+a*_(r),n+h*u(r));for(let t=0;t<5;t++)g.push("L",o+a*_(r),n+h*u(r),"L",o+l*_(r+p),n+c*u(r+p)),r+=d;return g.push("Z"),g}static setShape(t,e,s,i){let r;switch(e){case"square":case"diamond":case"triangle":case"itriangle":case"star":case"rectangle":r=Ct[e](0,0,2*s,2*i);break;default:r=Ct.circle(s,i,p(s,i))}t.setPath(r)}static pin(t){const{rd:e,cx:s,cy:i,innerRd:r}=t,o=["M",0,0,"C",0,0,.8*-e,-e,-e,2*-e,"A",e,e,1,1,1,e,2*-e,"C",e,2*-e,.8*e,-e,0,0,"Z"];return r>0&&o.push("M",s-r,i,"a",r,r,0,1,0,2*r,0,"a",r,r,0,1,0,2*-r,0),o}}const St={minimumZoom:200,maximumZoom:1600};var Lt;!function(t){t.Developer="developer",t.Evaluation="evaluation",t.Limited="limited",t.Enterprise="enterprise"}(Lt||(Lt={}));const At={name:"RealMap",version:"1.0.5",license:"enterprise",code:""};class Mt{static decode(t){const e=Mt.CHARS,s=Mt.PAD;let i=t.split(""),r=[],o=i.length;for(;i[--o]==s;);for(let t=0;t<o;){let s=e.indexOf(i[t++])<<18;t<=o&&(s|=e.indexOf(i[t++])<<12),t<=o&&(s|=e.indexOf(i[t++])<<6),t<=o&&(s|=e.indexOf(i[t++])),r.push(s>>>16&255),r.push(s>>>8&255),r.push(255&s)}for(;0==r[r.length-1];)r.pop();return r}}Mt.PAD="=",Mt.CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";class kt{static union(t,e){const s=e.s3[255&t];t>>=8;const i=e.s2[255&t];t>>=8;const r=e.s1[255&t];t>>=8;const o=e.s0[255&t];let n=(o>>16)+(r>>16)+((65535&o)+(65535&r)>>16)<<16|(65535&o)+(65535&r)&65535;return n=(n>>16^i>>16)<<16|65535&(65535&n^65535&i),(n>>16)+(s>>16)+((65535&n)+(65535&s)>>16)<<16|(65535&n)+(65535&s)&65535}static xor(t,e){return(t>>16^e>>16)<<16|65535&(65535&t^65535&e)}static _encryptBlock(t,e){const s=kt.xor,i=kt.union;let r=t.left,o=t.right;r=s(r,e.p[0]),o=s(o,s(i(r,e),e.p[1])),r=s(r,s(i(o,e),e.p[2])),o=s(o,s(i(r,e),e.p[3])),r=s(r,s(i(o,e),e.p[4])),o=s(o,s(i(r,e),e.p[5])),r=s(r,s(i(o,e),e.p[6])),o=s(o,s(i(r,e),e.p[7])),r=s(r,s(i(o,e),e.p[8])),o=s(o,s(i(r,e),e.p[9])),r=s(r,s(i(o,e),e.p[10])),o=s(o,s(i(r,e),e.p[11])),r=s(r,s(i(o,e),e.p[12])),o=s(o,s(i(r,e),e.p[13])),r=s(r,s(i(o,e),e.p[14])),o=s(o,s(i(r,e),e.p[15])),r=s(r,s(i(o,e),e.p[16])),t.right=r,t.left=s(o,e.p[17])}static _decryptBlock(t,e){const s=kt.xor,i=kt.union;let r=t.left,o=t.right;r=s(r,e.p[17]),o=s(o,s(i(r,e),e.p[16])),r=s(r,s(i(o,e),e.p[15])),o=s(o,s(i(r,e),e.p[14])),r=s(r,s(i(o,e),e.p[13])),o=s(o,s(i(r,e),e.p[12])),r=s(r,s(i(o,e),e.p[11])),o=s(o,s(i(r,e),e.p[10])),r=s(r,s(i(o,e),e.p[9])),o=s(o,s(i(r,e),e.p[8])),r=s(r,s(i(o,e),e.p[7])),o=s(o,s(i(r,e),e.p[6])),r=s(r,s(i(o,e),e.p[5])),o=s(o,s(i(r,e),e.p[4])),r=s(r,s(i(o,e),e.p[3])),o=s(o,s(i(r,e),e.p[2])),r=s(r,s(i(o,e),e.p[1])),t.right=r,t.left=s(o,e.p[0])}static _init(t){let e=t.split("").map(function(t){return 255&t.charCodeAt(0)});const s=kt.kb,i=kt._encryptBlock;let r,o,n,a=0,h=0,l={left:0,right:0};const c={p:s.p.slice(0).map(function(t){let s,i=e.length;for(s=0;s<4;s++)h=h*kt.POW8|e[a++%i];return(t>>16^h>>16)<<16|65535&(65535&t^65535&h)}),s0:s.s0.slice(0),s1:s.s1.slice(0),s2:s.s2.slice(0),s3:s.s3.slice(0)};for(r=0,n=c.p.length;r<n;)i(l,c),c.p[r++]=l.left,c.p[r++]=l.right;for(r=0;r<4;r++)for(o=0,n=c["s"+r].length;o<n;)i(l,c),c["s"+r][o++]=l.left,c["s"+r][o++]=l.right;return c}static decrypt(t,e){const s=kt._decryptBlock;let i=kt._init(e),r=[],o=Mt.decode(t),n=o.length>>3,a=0,h={left:null,right:null};for(let t=0;t<n;t++){h.left=o[a]*kt.POW24|o[a+1]*kt.POW16|o[a+2]*kt.POW8|o[a+3],h.right=o[a+4]*kt.POW24|o[a+5]*kt.POW16|o[a+6]*kt.POW8|o[a+7],s(h,i);const t=h.left,e=h.right;r.push(t>>24&255),r.push(t>>16&255),r.push(t>>8&255),r.push(255&t),r.push(e>>24&255),r.push(e>>16&255),r.push(e>>8&255),r.push(255&e),a+=8}if(r[r.length-1]==r[r.length-2]||1==r[r.length-1]){let t=r[r.length-1];r.splice(r.length-t,t)}return String.fromCharCode.apply(null,r)}}kt.POW2=Math.pow(2,2),kt.POW3=Math.pow(2,3),kt.POW4=Math.pow(2,4),kt.POW8=Math.pow(2,8),kt.POW16=Math.pow(2,16),kt.POW24=Math.pow(2,24),kt.kb={p:[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],s0:[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],s1:[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],s2:[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],s3:[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462],k:[202,218,204,100]};class Pt{static eqaulsUpperDomain(t,e){return t==e||0===t.indexOf("*")&&(t=t.substring(1),e.substring(e.indexOf(t))==t)}static _getLDKey(t){let e="";for(let s=0,i=t.length;s<i;s++)e+=String.fromCharCode(t[s]>>1);return e}static includedDomains(t,e,s){let i=t.split(",");for(let t=0,r=i.length;t<r;t++){const r=i[t];if(this.eqaulsUpperDomain(r,e))return!0;if(s&&r&&"*"===r[0]&&"*."!==r.substring(0,2)){if(new RegExp("^/"+r.substring(1)+"/").exec(s))return!0}const o=r.split(".").length,n=r.indexOf("*");if(o>=2&&o<=4&&n>=2){const t=r.substring(0,n);return 0===e.indexOf(t)}}return!1}static decrypt(t){const e={},s=kt.decrypt(t,"dkdl"+this._getLDKey(kt.kb.k)).split(";");for(let t=0,i=s.length;t<i;t++){const i=s[t].split("="),r=i[0],o=i[1];o&&o.length>0&&(e[r]=o)}return e}}let It=651212;class Nt{static getWin(t){return t.defaultView||t.parentWindow}static isVisible(t){return t&&"none"!==t.style.display}static setVisible(t,e,s=""){return t.style.display=e?s||"":"none",e}static hide(t){t.style.display="none"}static show(t,e=""){t.style.display=e}static addClass(t,e){if(e){e.split(/\s+/g).forEach(e=>t.classList.add(e))}return t}static removeClass(t,e){if(e){e.split(/\s+/g).forEach(e=>t.classList.remove(e))}return t}static getImageUrl(t){const e=t.backgroundImage;if(e&&e.startsWith('url("'))return e.substring(5,e.length-2)}static getFocused(){let t=document.getSelection().focusNode;for(;t;){if(t instanceof HTMLElement)return t;t=t.parentElement}}static isAncestorOf(t,e){let s=e;for(;s;){if(s==t)return!0;s=s.parentElement}return!1}static getOffset(t){const e=t.ownerDocument,s=e.defaultView,i=t.getBoundingClientRect(),r=e.body,o=e.documentElement,n=s.pageYOffset||o.scrollTop||r.scrollTop,a=s.pageXOffset||o.scrollLeft||r.scrollLeft,h=o.clientTop||r.clientTop||0,l=o.clientLeft||r.clientLeft||0,c=i.left+a-l,d=i.top+n-h;return{x:Math.round(c),y:Math.round(d)}}static getSize(t){const e=t.getBoundingClientRect();return{width:e.width,height:e.height}}static moveX(t,e){t.style.left=e+"px"}static moveY(t,e){t.style.top=e+"px"}static move(t,e,s){t.style.left=e+"px",t.style.top=s+"px"}static moveI(t,e,s){t.style.left=(e>>>0)+"px",t.style.top=(s>>>0)+"px"}static resize(t,e,s){t.style.width=e+"px",t.style.height=s+"px"}static resizeSVG(t,e,s){t.setAttribute("viewBox",`0 0 ${e} ${s}`)}static setWidth(t,e){t.style.width=e+"px"}static setHeight(t,e){t.style.height=e+"px"}static getBrowserSize(t){const e=t?t.ownerDocument:document,s=e.defaultView;return{width:s.innerWidth||e.documentElement.clientWidth||e.body.clientWidth,height:s.innerHeight||e.documentElement.clientHeight||e.body.clientHeight}}static setRect(t,e){const s=t.style;s.left=e.x+"px",s.top=e.y+"px",s.width=e.width+"px",s.height=e.height+"px"}static setBounds(t,e,s,i,r){const o=t.style;o.left=e+"px",o.top=s+"px",o.width=i+"px",o.height=r+"px"}static setBoundsEx(t,e,s,i,r){const o=t.style;!isNaN(e)&&(o.left=e+"px"),!isNaN(s)&&(o.top=s+"px"),!isNaN(e)&&(o.width=i+"px"),!isNaN(e)&&(o.height=r+"px")}static getClientRect(t){const e=t.getBoundingClientRect();return e.cx=t.offsetLeft,e.cy=t.offsetTop,e}static getChildIndex(t){if(t){const e=t.parentNode;if(e){const s=e.children;for(let e=s.length;e--;)if(s[e]===t)return e}}return-1}static clearChildren(t){let e;for(;e=t.lastChild;)t.removeChild(e)}static clearElements(t){let e;for(;e=t.lastChild;)Nt.clearElements(e),t.removeChild(e)}static append(t,e){e.parentNode!==t&&t.appendChild(e)}static addChild(t,e){return!(!t||!e||e.parentNode===t)&&(t.appendChild(e),!0)}static removeChild(t,e){return!(!t||!e||e.parentNode!==t)&&(t.removeChild(e),!0)}static removeChildren(t,e){e.forEach(e=>{e instanceof Element?e.parentNode===t&&t.removeChild(e):e&&e.dom().parentNode==t&&t.removeChild(e.dom())})}static remove(t){const e=t&&t.parentElement;return e&&e.removeChild(t),null}static clearStyle(t){t.style.cssText=""}static removeStyles(t,e){if(e)for(const s in e)t[s]=""}static setStyle(t,e){e&&Object.assign(t.style,e)}static replaceStyle(t,e,s){if(e!=s){if(s)for(const e in s)t[e]="";return e&&Object.assign(t,e),e}return s}static createElement(t,e,s){const i=t.createElement(e);return s&&Object.assign(i.style,s),i}static htmlEncode(t){return document.createElement("a").appendChild(document.createTextNode(t)).parentNode.innerHTML}static setData(t,e,s){null==s||""===s?delete t.dataset[e]:t.dataset[e]=s}static toggleData(t,e,s){s?t.dataset[e]="1":delete t.dataset[e]}static getData(t,e){return t.dataset[e]}static hasData(t,e){return void 0!==t.dataset[e]}static setVar(t,e,s){t.style.setProperty(e,s)}static animate(t,e,s,i,r=150,o="none"){const n={},a={};return n[e]=s,a[e]=i,t.animate([n,a],{duration:r,fill:o})}static setAttr(t,e,s){null!=s&&""!==s?t.setAttribute(e,s):t.removeAttribute(e)}static setAttrs(t,e){for(const s in e)t.setAttribute(s,e[s])}static getDomId(){return"-rtc-"+It++}static createBR(t,e){const s=t.createElement("br");return s.className=e,s}static createSpan(t,e){const s=t.createElement("span");return e&&Object.assign(s.style,e),s}static createCheckBox(t,e){const s=t.createElement("input");return s.type="checkbox",e&&Object.assign(s.style,e),s}static createRadio(t,e){const s=t.createElement("input");return s.type="radio",e&&Object.assign(s.style,e),s}static getPadding(t){const e=getComputedStyle(t);return{left:parseFloat(e.paddingLeft)||0,right:parseFloat(e.paddingRight)||0,top:parseFloat(e.paddingTop)||0,bottom:parseFloat(e.paddingBottom)||0}}static getPaddingEx(t){const e=this.getPadding(t);return e.horz=e.left+e.right,e.vert=e.top+e.bottom,e}static stopAnimation(t){if(t)try{t.finish()}catch(t){C.debugging(),console.error(t)}return null}static childByPath(t,e){let s=t;if(e){let t=0;for(;t<e.length;)s=s.childNodes[e[t++]]}return s}static childByClass(t,e){return t.getElementsByClassName(e)[0]}static setDisabled(t,e){this.setAttr(t,"disabled",!!e||void 0)}static setImportantStyle(t,e,s){t.setProperty(e,s,"important")}}const Tt={background:"fill",border:"stroke",borderWidth:"strokeWidth",borderRadius:"borderRadius"};class Et extends bt{constructor(t,e,s){super(),this._inited=!1,this._testing=!1,this._dirty=!0,this._invalidElements=[],this._toAnimation=0,this._invalidateLock=!1,this._lockDirty=!1,this._cssVars={},this.loaded=!1,this._scrolling=!1,this._windowResizeHandler=t=>{this._windowResized()},this._clickHandler=t=>{var e;this._doClick(t),null===(e=this._tool)||void 0===e||e.click(t)},this._dblClickHandler=t=>{var e;this._doDblClick(t),null===(e=this._tool)||void 0===e||e.dblClick(t)},this._touchStartHandler=t=>{var e;this._doTouchStart(t),null===(e=this._tool)||void 0===e||e.touchStart(t)},this._touchMoveHandler=t=>{var e;t.touches.length<2&&this._scrolling?t.preventDefault():(this._doTouchMove(t),null===(e=this._tool)||void 0===e||e.touchMove(t))},this._touchEndHandler=t=>{var e;this._doTouchEnd(t),null===(e=this._tool)||void 0===e||e.touchEnd(t)},this._pointerDownHandler=t=>{var e;this._doPointerDown(t)||null===(e=this._tool)||void 0===e||e.pointerDown(t)},this._pointerMoveHandler=t=>{var e;this._doPointerMove(t),null===(e=this._tool)||void 0===e||e.pointerMove(t)},this._pointerUpHandler=t=>{var e;this._doPointerUp(t),null===(e=this._tool)||void 0===e||e.pointerUp(t)},this._pointerCancelHandler=t=>{var e;this._doPointerCancel(t),null===(e=this._tool)||void 0===e||e.pointerCancel(t)},this._pointerLeaveHandler=t=>{var e;this._doPointerLeave(t),null===(e=this._tool)||void 0===e||e.pointerLeave(t)},this._keyPressHandler=t=>{var e;this._doKeyPress(t),null===(e=this._tool)||void 0===e||e.keyPress(t)},this._wheelHandler=t=>{var e;this._doWheel(t),null===(e=this._tool)||void 0===e||e.wheel(t)},function(){const t=location.hostname;let e;try{if(e=realMapLic,!e)return!1}catch(t){return!1}const s=Pt.decrypt(e);if("RealMap"!=s.name||"RealMap"!==At.name)return!1;const i=s.server.toLowerCase(),r=location.pathname.toLowerCase();if(At.license!=Lt.Developer&&!Pt.includedDomains(i,t.toLowerCase(),r))return!1;const o=s.lic.toLowerCase();if(!Object.values(Lt).includes(o))return!1;if(At.code=s.code,At.license=s.lic,o==Lt.Evaluation||o==Lt.Limited){const t=s.expire.split(".").map(function(t){return parseInt(t)}),e=new Date(t[0],t[1],t[2],23,59,59,999);if(new Date>e)return!1}return!0}()?(!t&&e instanceof HTMLDivElement&&(t=e.ownerDocument),this._initControl(t||document,e,s||Et.CLASS_NAME),this._resigterEventHandlers(this._dom),this._inited=!0,this.invalidate(!0)):console.error("need license!")}_doDestory(){this._requestTimer&&(window.requestAnimationFrame?cancelAnimationFrame(this._requestTimer):clearTimeout(this._requestTimer)),this._unresigterEventHandlers(this._dom),Nt.remove(this._dom),this._dom=null,this._container=null}isInited(){return this._inited}isTesting(){return this._testing}doc(){return this._dom.ownerDocument}dom(){return this._dom}width(){return this._container.offsetWidth}height(){return this._container.offsetHeight}contentWidth(){return this.width()-this._padding.left-this._padding.right}contentHeight(){return this.height()-this._padding.top-this._padding.bottom}contentRight(){return this.width()-this._padding.right}clipContainer(){return this._defs}activeTool(){return this._activeTool||this._tool}setSctiveTool(t){t!==this._activeTool&&(this._activeTool=t,this._tool=t||this._defaultTool)}clearDefs(){Nt.clearChildren(this._defs)}$_clearDefs(t){const e=this._defs.children||[];for(let s=e.length-1;s>=0;s--)e[s].hasAttribute(t)&&e[s].remove()}clearAssetDefs(){this.$_clearDefs(Vt.ASSET_KEY)}clearTemporaryDefs(){this.$_clearDefs(Vt.TEMP_KEY)}appendDom(t){return t&&this._htmlRoot.append(t),t}addElement(t){return t&&this._root.add(t)}removeElement(t){this._root.removeChild(t)}invalidate(t=!1){t||!this._invalidateLock&&!this._dirty&&this._inited?(this._dirty=!0,this._requestTimer||this._testing||this.$_requestRender()):this._invalidateLock&&(this._lockDirty=!0)}invalidateLayout(t=!1){this.invalidate(t)}setLock(){this._invalidateLock=!0}releaseLock(t=!0){this._invalidateLock&&(this._invalidateLock=!1),this._lockDirty&&t&&this.invalidate(),this._lockDirty=!1}lock(t){this.setLock();try{t(this)}finally{this.releaseLock()}}silentLock(t){this.setLock();try{t(this)}finally{this.releaseLock(!1)}}getBounds(){return this._dom.getBoundingClientRect()}setAnimation(t){this._toAnimation=t||0}fling(t,e){}getCssVar(t){let e=this._cssVars[t];return t in this._cssVars?this._cssVars[t]:(e=getComputedStyle(this._root.dom).getPropertyValue(t),this._cssVars[t]=e,e)}addDef(t){this._defs.appendChild(t)}removeDef(t){if(n(t))for(const e in this._defs.children)if(e instanceof Element&&e.id===t){t=e;break}t instanceof Element&&this._defs.removeChild(t)}clipBounds(t=NaN,e=NaN,s=NaN,i=NaN,r=0){return this.clip(new zt(this.doc(),t,e,s,i,r,r))}clip(t){return this._defs.appendChild(t.dom),t}_setTesting(){this._testing=!0,Vt.TESTING=!0}_setSize(t,e){isNaN(t)||(this._container.style.width=t+"px"),isNaN(e)||(this._container.style.height=e+"px")}$_addListener(t,e,s,i){i?t.addEventListener(e,s,{passive:!0}):t.addEventListener(e,s)}_resigterEventHandlers(t){window.addEventListener("resize",this._windowResizeHandler),this.$_addListener(t,"click",this._clickHandler),this.$_addListener(t,"dblclick",this._dblClickHandler),this.$_addListener(t,"touchstart",this._touchStartHandler),this.$_addListener(t,"touchmove",this._touchMoveHandler),this.$_addListener(t,"touchend",this._touchEndHandler),this.$_addListener(t,"pointerdown",this._pointerDownHandler),this.$_addListener(t,"pointermove",this._pointerMoveHandler),this.$_addListener(t,"pointerup",this._pointerUpHandler),this.$_addListener(t,"pointercancel",this._pointerCancelHandler),this.$_addListener(t,"pointerleave",this._pointerLeaveHandler),this.$_addListener(t,"keypress",this._keyPressHandler),this.$_addListener(t,"wheel",this._wheelHandler)}_unresigterEventHandlers(t){window.removeEventListener("resize",this._windowResizeHandler),t.removeEventListener("click",this._clickHandler),t.removeEventListener("dblclick",this._dblClickHandler),t.removeEventListener("touchstart",this._touchStartHandler),t.removeEventListener("touchmove",this._touchMoveHandler),t.removeEventListener("touchend",this._touchEndHandler),t.removeEventListener("pointerdown",this._pointerDownHandler),t.removeEventListener("pointermove",this._pointerMoveHandler),t.removeEventListener("pointerup",this._pointerUpHandler),t.removeEventListener("pointercancel",this._pointerCancelHandler),t.removeEventListener("pointerleave",this._pointerLeaveHandler),t.removeEventListener("keypress",this._keyPressHandler),t.removeEventListener("wheel",this._wheelHandler)}_prepareRenderers(t){}_initControl(t,s,i){if(this._inited)return;s instanceof HTMLDivElement?this._container=s:this._container=t.getElementById(s),this._container instanceof HTMLDivElement||K(A.invalidOuterDiv,s);const r=this._container.ownerDocument,o=this._dom=r.createElement("div");Object.assign(o.style,{position:"relative",width:"100%",height:"100%",boxSizing:"border-box",overflow:"hidden","-webkit-touch-callout":"none","-webkit-user-select":"none","user-select":"none","-webkit-tap-highlight-color":"rgba(0, 0, 0, 0)"}),o.className=i,this._container.appendChild(o);const n=this._svg=r.createElementNS(e,"svg");n.classList.add("rm-svg"),n.style.setProperty("overflow","visible","important"),n.setAttribute("width","100%"),n.setAttribute("height","100%");const a=r.createElement("desc");a.textContent="Created with RealMap 1.0.0",n.appendChild(a);const h=this._defs=r.createElementNS(e,"defs");this._initDefs(r,h),n.appendChild(h),o.appendChild(n),this._root=new Rt(this),n.appendChild(this._root._dom),this._htmlRoot=r.createElement("div"),o.appendChild(this._htmlRoot),Object.assign(this._htmlRoot.style,{position:"absolute"}),this._debugger=r.createElement("div"),o.appendChild(this._debugger),Object.assign(this._debugger.style,{position:"absolute",left:"0px",top:"0px",fontSize:"20px",background:"black",color:"white"}),this._defaultTool=this._tool=this._creatDefaultTool()}_initDefs(t,s){let i=t.createElementNS(e,"filter");const r=t.createElementNS(e,"feDropShadow");i.setAttribute("id",Et.SHADOW_FILTER),r.setAttribute("dx","1"),r.setAttribute("dy","1"),r.setAttribute("flood-color","#000"),r.setAttribute("flood-opacity","0.75"),r.setAttribute("stdDeviation","1.5"),i.appendChild(r),s.appendChild(i)}_render(){this.$_render()}$_requestRender(){this.orphaned||(window.requestAnimationFrame?this._requestTimer=requestAnimationFrame(()=>this.$_render()):this._requestTimer=setTimeout(()=>{this.$_render()},0))}updateNow(){this.$_render()}$_render(){if(this.orphaned)return;const t=+new Date;if(t<=this._toAnimation)this.$_requestRender();else{try{this._doBeforeRender(this._root);const t=this._dom.getBoundingClientRect(),e=this._svg.getBoundingClientRect(),s=this._padding=Nt.getPadding(this._root.dom),i=s.left,r=s.top,o=this._svg.clientWidth-i-s.right,n=this._svg.clientHeight-r-s.bottom;this._htmlRoot.style.left=e.left-t.left+"px",this._htmlRoot.style.top=e.top-t.top+"px",this._doRender({x:i,y:r,width:o,height:n});const a=this._debugger;if(a.textContent){a.style.display="";const t=a.getBoundingClientRect();a.style.left=i+(o-t.width)/2+"px",a.style.top=r+(n-t.height)/2+"px"}else a.style.display="none"}finally{this.loaded=!0,this._dirty=!1,this._requestTimer=null,this._invalidE