UNPKG

@dimanoid/ngx-dm-tour

Version:

2 lines 23.8 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("@angular/common/http"),require("rxjs"),require("rxjs/operators"),require("resize-observer-polyfill")):"function"==typeof define&&define.amd?define("@dimanoid/ngx-dm-tour",["exports","@angular/core","@angular/common","@angular/common/http","rxjs","rxjs/operators","resize-observer-polyfill"],e):e(((t=t||self).dimanoid=t.dimanoid||{},t.dimanoid["ngx-dm-tour"]={}),t.ng.core,t.ng.common,t.ng.common.http,t.rxjs,t.rxjs.operators,t.ResizeObserver)}(this,(function(t,e,o,n,r,i,s){"use strict";s=s&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s;function l(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s}function d(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(a(arguments[e]));return t}var h=function(){function t(t){this.rootPath="assets/help",this.loadIndexOnStart=!0,this.loaderHtml='\n <span style="color: steelblue;\n text-shadow: 0 0 10px white, 0 0 10px white, 0 0 20px white, 0 0 20px white, 0 0 30px white, 0 0 30px white;\n margin: 0;\n position: absolute;\n top: 50%;\n left: 50%;\n font-weight: bold;\n font-size: 30px;\n transform: translate(-50%, -50%);"\n >\n Loading...\n </span>\n ',this.defaultShape="auto",this.debug=0,this.apply(t)}return t.prototype.apply=function(t){var e,o;if(t)try{for(var n=l(Object.keys(t)),r=n.next();!r.done;r=n.next()){var i=r.value;void 0!==t[i]&&(this[i]=t[i])}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}return this},t}();var u=new e.InjectionToken("ngx-dm-tour-config");console.debug,console.log,console.info,console.warn,console.error,console.time,console.timeLog?console.timeLog:console.log,console.timeEnd;var c=function(){function t(t,e,o,n){var l=this;if(this._rendererFactory=t,this._http=e,this.document=o,this._controls={},this._hlVisible=null,this._cfg=new h(n),this._r2=this._rendererFactory.createRenderer(null,null),this._cfg.loadIndexOnStart&&(this._addGlobalStyles(),this._loadSections().subscribe((function(){}),(function(t){return l._handleLoadError(t)}))),s){var a=new r.Subject;new s((function(){return a.next()})).observe(this.document.body),a.pipe(i.debounceTime(500)).subscribe((function(){return l._resized()}))}}return t.prototype._resized=function(){if(this._L("_resized",this._hlVisible),this._r2&&this._root&&this._hlVisible&&"controls"==this._hlVisible.type){var t=this.document.querySelector("#ngxDmTourRoot");this._L("_resized, bd:",t),t&&(t.remove(),this._root=null),this._onClickRemove&&(this._onClickRemove(),this._onClickRemove=null),this._onKeyupRemove&&(this._onKeyupRemove(),this._onKeyupRemove=null);var e=this._hlVisible.sectionId;this._hlVisible=null,this._showControlsHelp(e)}},t.prototype.registerControl=function(t,e,o){t&&e&&o&&(this._L("registerControl, sectionId: "+t+", is: "+e+", el:",o),this._controls[t]||(this._controls[t]={}),this._controls[t][e]||(this._controls[t][e]={id:e}),this._controls[t][e].el=o.nativeElement)},t.prototype.unregisterControl=function(t,e){this._controls[t]&&!this._controls[t][e]&&(this._L("unregisterControl, sectionId: "+t+", is: "+e),delete this._controls[t][e].el)},t.prototype.showControlsHelp=function(t){var e=this;this._hlVisible||(this._sections?this._sections[t]?this._sections[t]&&!this._sections[t].controlsLoaded?this._loadSectionControls(t).subscribe((function(){return e._showControlsHelp(t)}),(function(t){return e._handleLoadError(t)})):this._showControlsHelp(t):this._handleLoadError('There is no a section "'+t+'" defined.'):(this._addGlobalStyles(),this._loadSections().subscribe((function(){e._loadSectionControls(t).subscribe((function(){return e._showControlsHelp(t)}),(function(t){return e._handleLoadError(t)}))}),(function(t){return e._handleLoadError(t)}))))},t.prototype.showHelp=function(t){var e=this;this._hlVisible||(this._sections?this._sections[t]?this._sections[t]&&!this._sections[t].controlsLoaded?this._loadSectionHtml(t).subscribe((function(){return e._showHelp(t)}),(function(t){return e._handleLoadError(t)})):this._showHelp(t):this._handleLoadError('There is no a section "'+t+'" defined.'):(this._addGlobalStyles(),this._loadSections().subscribe((function(){e._loadSectionHtml(t).subscribe((function(){return e._showHelp(t)}),(function(t){return e._handleLoadError(t)}))}),(function(t){return e._handleLoadError(t)}))))},t.prototype._loadSections=function(){var t=this;return this._showLoading(),new r.Observable((function(e){t._http.get(t._cfg.rootPath+"/index.json").subscribe((function(o){var n,r;if(t._hideLoading(),o&&o.sections){t._sections={};try{for(var i=l(o.sections),s=i.next();!s.done;s=i.next()){var a=s.value;t._sections[a.id]=a}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.next()}else e.error("Wrong data format in ${this._cfg.rootPath}/index.json")}),(function(o){t._hideLoading(),e.error(o)}))}))},t.prototype._loadSectionControls=function(t){var e=this;return this._showLoading(),this._controls[t]||(this._controls[t]={}),new r.Observable((function(o){e._http.get(e._cfg.rootPath+"/"+t+"/index.json").subscribe((function(n){var r,i;if(e._hideLoading(),n&&n.controls){try{for(var s=l(n.controls),a=s.next();!a.done;a=s.next()){var d=a.value,h=e._controls[t][d.id];e._controls[t][d.id]=d,e._controls[t][d.id].el=h?h.el:null}}catch(t){r={error:t}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}o.next()}else o.error("${this._cfg.rootPath}/${sectionId}/index.json")}),(function(t){e._hideLoading(),o.error(t)}))}))},t.prototype._loadSectionHtml=function(t){var e=this;return this._showLoading(),new r.Observable((function(o){e._http.get(e._cfg.rootPath+"/"+t+"/index.html",{responseType:"text"}).subscribe((function(n){e._L("section html:",n),e._hideLoading(),e._sections[t].html=n,o.next()}),(function(t){e._hideLoading(),o.error(t)}))}))},t.prototype._showControlsHelp=function(t){var e,o,n,r,i,s,a=this,d=this._controls[t]?Object.keys(this._controls[t]):[];if(d&&0!=d.length){var h=this._r2,u=this.document.querySelector("#ngxDmTourRoot");u&&h.removeChild(this.document.body,u);var c,p=h.createElement("svg","svg"),g=h.createElement("defs","svg"),m=h.createElement("radialGradient","svg");h.setAttribute(m,"id","ngxDmTourGradientR"),c=h.createElement("stop","svg"),h.setAttribute(c,"offset","90%"),h.setAttribute(c,"stop-color","black"),h.appendChild(m,c),c=h.createElement("stop","svg"),h.setAttribute(c,"offset","100%"),h.setAttribute(c,"stop-color","transparent"),h.appendChild(m,c),h.appendChild(g,m);var x=h.createElement("mask","svg");h.setAttribute(x,"id","ngxDmTourControlsMask");var f=h.createElement("rect","svg");h.setAttribute(f,"width","10000"),h.setAttribute(f,"height","10000"),h.setAttribute(f,"fill","white"),h.appendChild(x,f);var b=[];try{for(var _=l(d),v=_.next();!v.done;v=_.next()){var y=v.value,C=this._controls[t][y];if(C&&C.el)if(!C.children&&C.text)(S=this._addControlHl(C,x))&&b.push(S);else if(C.children)try{for(var w=(n=void 0,l(C.children)),D=w.next();!D.done;D=w.next()){var T=D.value;if(T.text)(S=this._addControlHl(T,x))&&b.push(S)}}catch(t){n={error:t}}finally{try{D&&!D.done&&(r=w.return)&&r.call(w)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{v&&!v.done&&(o=_.return)&&o.call(_)}finally{if(e)throw e.error}}if(0!=b.length){h.appendChild(g,x),h.appendChild(p,g);var k=h.createElement("rect","svg");h.setAttribute(k,"width","10000"),h.setAttribute(k,"height","10000"),h.setAttribute(k,"x","0"),h.setAttribute(k,"y","0"),h.setAttribute(k,"fill","var(--ngx-dm-tour-backdrop-color, black)"),h.setAttribute(k,"mask","url(#ngxDmTourControlsMask)"),h.appendChild(p,k),h.setAttribute(p,"width","10000px"),h.setAttribute(p,"height","10000px"),this._root=h.createElement("div"),h.setAttribute(this._root,"id","ngxDmTourRoot"),this._cfg.customCssClass&&h.addClass(this._root,this._cfg.customCssClass);var A=h.createElement("div");h.appendChild(this._root,A),h.setAttribute(A,"id","ngxDmTourBackdrop"),h.appendChild(A,p);try{for(var E=l(b),L=E.next();!L.done;L=E.next()){var S=L.value;h.appendChild(this._root,S)}}catch(t){i={error:t}}finally{try{L&&!L.done&&(s=E.return)&&s.call(E)}finally{if(i)throw i.error}}this.document.activeElement.blur(),this._hlVisible={type:"controls",sectionId:t},h.appendChild(this.document.body,this._root),setTimeout((function(){h.addClass(a._root,"ngx-dm-tour-show"),a._onClickRemove=h.listen(a.document,"click",(function(t){return a.hideControlsHelp(t)})),a._onKeyupRemove=h.listen(a.document,"keyup",(function(t){return a.hideControlsHelp(t)}))}),300)}else this._W('There are no visible controls registered for the section "'+t+'"')}else this._W('There are no visible controls registered for the section "'+t+'"')},t.prototype._addControlHl=function(t,e){var o=this.document.body.getBoundingClientRect(),n=Math.round,r=this._r2,i="string"==typeof t.el?this.document.querySelector(t.el):t.el,s=this._getBoundaries(i),l=function(t){if(!t||!(t.offsetWidth||t.offsetHeight||t.getClientRects().length))return!1;var e=t.getBoundingClientRect(),o=e.top,n=e.left,r=e.height,i=e.width,s=t.parentNode;do{var l=s.getBoundingClientRect();if(l.height>0&&l.width>0&&(o<=l.bottom==!1||o+r<=l.top||n<=l.right==!1||n+i<=l.left))return!1;s=s.parentNode}while(s!=document.body);return o<=document.documentElement.clientHeight&&n<=document.documentElement.clientWidth}(i);if(this._L("control:",t,"\nelem:",i,"\nboundaries:",s,"\nisVisible:",l),!l||!s||0==s.width||0==s.height)return null;if("square"==(t.shape?t.shape:"auto"==this._cfg.defaultShape?s.width>200||s.height>200?"square":"circle":this._cfg.defaultShape)){var a=r.createElement("rect","svg");r.setAttribute(a,"x",""+n(s.left-10)),r.setAttribute(a,"y",""+n(s.top-10)),r.setAttribute(a,"width",""+n(s.width+20)),r.setAttribute(a,"height",""+n(s.height+20)),r.setAttribute(a,"rx","8"),r.setAttribute(a,"fill","black"),r.setAttribute(a,"stroke","black"),r.setAttribute(a,"stroke-width","var(--ngx-dm-tour-hl-stroke-width, 15)"),r.setAttribute(a,"stroke-opacity","var(--ngx-dm-tour-hl-stroke-opacity, .3)"),r.appendChild(e,a)}else{a=r.createElement("circle","svg");var d=s.width>s.height?s.width/2:s.height/2;r.setAttribute(a,"cx",""+n(s.left+s.width/2)),r.setAttribute(a,"cy",""+n(s.top+s.height/2)),r.setAttribute(a,"r",""+n(d+10)),r.setAttribute(a,"fill","black"),r.setAttribute(a,"stroke","black"),r.setAttribute(a,"stroke-width","var(--ngx-dm-tour-hl-stroke-width, 15)"),r.setAttribute(a,"stroke-opacity","var(--ngx-dm-tour-hl-stroke-opacity, .3)"),r.appendChild(e,a)}var h=r.createElement("div");r.addClass(h,"ngx-dm-tour-text");var u=r.createElement("div");r.addClass(u,"ngx-dm-tour-text-inner"),r.appendChild(u,r.createText(t.text)),r.appendChild(h,u);var c=t.pos&&"auto"!=t.pos?t.pos.split("-"):null;c?1==c.length&&c.push("center"):c=s.top>250?["top","center"]:o.width-s.right>250?["right","center"]:o.height-s.bottom>250?["bottom","center"]:s.left>250?["left","center"]:["center","center"];var p=n(s.left+s.width/2),g=n(s.top+s.height/2),m=-50,x=-50;return"top"==c[0]?(x=-100,g=s.top-20,"left"==c[1]?(m=0,p=s.left):"right"==c[1]&&(m=-100,p=s.right)):"bottom"==c[0]?(x=0,g=s.bottom+20,"left"==c[1]?(m=0,p=s.left):"right"==c[1]&&(m=-100,p=s.right)):"left"==c[0]?(m=-100,p=s.left-20,"top"==c[1]?(x=0,g=s.top):"bottom"==c[1]&&(x=-100,g=s.bottom)):"right"==c[0]&&(m=0,p=s.right+20,"top"==c[1]?(x=0,g=s.top):"bottom"==c[1]&&(x=-100,g=s.bottom)),r.setStyle(h,"top",g+"px"),r.setStyle(h,"left",p+"px"),r.setStyle(h,"transform","translate("+m+"%, "+x+"%) scale(1)"),r.addClass(h,"ngx-dm-tour-text-"+c[0]+"-"+c[1]),h},t.prototype._showHelp=function(t){var e=this,o=this._sections[t],n=this._r2,r=this.document.querySelector("ngxDmTourRoot");r&&r.remove(),this._root=n.createElement("div"),n.setAttribute(this._root,"id","ngxDmTourRoot"),this._cfg.customCssClass&&n.addClass(this._root,this._cfg.customCssClass);var i=n.createElement("div");n.appendChild(this._root,i),n.setAttribute(i,"id","ngxDmTourBackdrop"),n.addClass(i,"ngx-dm-tour-dialog");var s=n.createElement("div");n.appendChild(this._root,s),n.setAttribute(s,"id","ngxDmTourDialogContainer");var l=n.createElement("div");n.appendChild(s,l),n.setAttribute(l,"id","ngxDmTourDialog"),n.addClass(l,"ngx-dm-tour-section-"+o.id);var a=n.createElement("button");n.appendChild(l,a),n.setAttribute(a,"id","ngxDmTourDialogBtnClose"),n.addClass(a,"ngx-dm-tour-button");var d=n.createElement("button");n.appendChild(l,d),n.setAttribute(d,"id","ngxDmTourDialogBtnControls"),n.addClass(d,"ngx-dm-tour-button"),n.listen(d,"click",(function(o){return e.hideHelp(o,(function(){return e.showControlsHelp(t)}))}));var h=n.createElement("div");n.appendChild(l,h),n.setAttribute(h,"id","ngxDmTourDialogTitle"),n.appendChild(h,n.createText('Section "'+o.title+'"'));var u=n.createElement("div");n.appendChild(l,u),n.setAttribute(u,"id","ngxDmTourDialogDesc");var c=n.createElement("div");n.appendChild(u,c),n.setAttribute(c,"id","ngxDmTourDialogDescInner"),c.innerHTML=o.html,this.document.activeElement.blur(),this._hlVisible={type:"help",sectionId:t},n.appendChild(this.document.body,this._root),this._L("_showHelp, root:",this._root),setTimeout((function(){n.addClass(e._root,"ngx-dm-tour-show"),e._onClickRemove=n.listen(e.document,"click",(function(t){return e.hideControlsHelp(t)})),e._onKeyupRemove=n.listen(e.document,"keyup",(function(t){return e.hideControlsHelp(t)}))}))},t.prototype.hideControlsHelp=function(t){this.hideHelp(t)},t.prototype.hideHelp=function(t,e){var o=this;this._L("hideHelp"),t&&(t.stopImmediatePropagation(),t.preventDefault()),this._onClickRemove&&(this._onClickRemove(),this._onClickRemove=null),this._onKeyupRemove&&(this._onKeyupRemove(),this._onKeyupRemove=null),this._root&&this._r2?(this._r2.removeClass(this._root,"ngx-dm-tour-show"),setTimeout((function(){o._root&&o._root.remove(),o._hlVisible=null,e&&e()}),500)):(this._hlVisible=null,e&&e())},t.prototype._getBoundaries=function(t){return t&&t.getBoundingClientRect?t.getBoundingClientRect():null},t.prototype._showLoading=function(){var t=this._r2,e=this.document.querySelector("#ngxDmTourLoading");e&&e.remove();var o=t.createElement("div");t.setAttribute(o,"id","ngxDmTourLoading"),this._cfg.customCssClass&&t.addClass(o,this._cfg.customCssClass),o.innerHTML=this._cfg.loaderHtml,this.document.activeElement.blur(),t.appendChild(this.document.body,o),setTimeout((function(){return t.setStyle(o,"background-color","var(--ngx-dm-tour-loading-bg-color, rgba(0,0,0,.3))")}))},t.prototype._hideLoading=function(){this._r2;var t=this.document.querySelector("#ngxDmTourLoading");t&&t.remove()},t.prototype._handleLoadError=function(t){this._W("[ngx-dm-tour] load error:",t)},t.prototype._addGlobalStyles=function(){if(!this.document.head.querySelector("#ngxDmTourStyles")){var t=this._r2,e=t.createElement("style");t.setAttribute(e,"id","ngxDmTourStyles"),e.innerHTML='\n #ngxDmTourRoot,\n #ngxDmTourLoading,\n #ngxDmTourBackdrop,\n #ngxDmTourDialogContainer {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n overflow: hidden;\n }\n #ngxDmTourLoading {\n background-color: transparent;\n transition: background-color .5s;\n }\n #ngxDmTourBackdrop {\n opacity: 0;\n transition: opacity .5s;\n }\n #ngxDmTourRoot.ngx-dm-tour-show #ngxDmTourBackdrop {\n opacity: var(--ngx-dm-tour-backdrop-opacity, .3);\n }\n #ngxDmTourRoot.ngx-dm-tour-show #ngxDmTourDialog {\n opacity: 1;\n }\n #ngxDmTourRoot.ngx-dm-tour-show .ngx-dm-tour-text {\n opacity: 1;\n }\n #ngxDmTourBackdrop.ngx-dm-tour-dialog {\n background-color: var(--ngx-dm-tour-backdrop-color, black);\n }\n #ngxDmTourDialogContainer {\n justify-content: center;\n align-items: center;\n display: flex;\n overflow: auto;\n }\n #ngxDmTourDialog {\n transition: opacity .5s;\n opacity: 0;\n min-width: 800px;\n min-height: 600px;\n background-color: white;\n box-shadow: 0 0 10px rgba(0,153,228,.5);\n display: flex;\n flex-direction: column;\n overflow: hidden;\n padding: 10px 0;\n position: relative;\n }\n #ngxDmTourDialogTitle {\n color: #0099e4;\n padding: 0 16px 8px;\n font-weight: bold;\n font-size: 1.5em;\n }\n #ngxDmTourDialogDesc {\n position: relative;\n display: flex;\n flex: 1;\n flex-basis: 1e-9px;\n }\n #ngxDmTourDialogDescInner {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n overflow: auto;\n padding: 10px;\n }\n #ngxDmTourDialogFooter {\n padding: 8px 8px 0 8px;\n text-align: right;\n margin-top: 2px;\n }\n .ngx-dm-tour-button {\n transition: all .15s;\n height: 26px;\n line-height: 1.5;\n position: relative;\n display: inline-block;\n font-weight: 400;\n text-align: center;\n border: 1px solid #d9d9d9;\n cursor: pointer;\n padding: 0 8px;\n font-size: 14px;\n color: white;\n background-color: #0099e4;\n border-color: #1890ff;\n box-shadow: 0 2px 0 rgba(0,0,0,.045);\n }\n .ngx-dm-tour-button:hover {\n box-shadow: 0 2px 5px rgba(0,153,228,.5);\n top: 0 !important;\n }\n #ngxDmTourDialogBtnIndex:before {\n content: "Content Index"\n }\n #ngxDmTourDialogBtnControls{\n margin-left: 8px;\n position: absolute;\n top: -2px;\n right: 30px;\n border-bottom-left-radius: 12px;\n border-bottom-right-radius: 12px;\n padding: 0 8px;\n border-top: none;\n }\n #ngxDmTourDialogBtnControls:before {\n content: "Highlight Important Controls"\n }\n #ngxDmTourDialogBtnClose {\n position: absolute;\n right: 0;\n top: -2px;\n padding: 0 4px;\n border-radius: 0;\n border-bottom-left-radius: 50%;\n border-top: none;\n border-right: none;\n }\n #ngxDmTourDialogBtnClose:before {\n content: "\\01F5D9"\n }\n .ngx-dm-tour-text {\n transition: opacity .5s;\n opacity: 0;\n position: absolute;\n border: 2px solid white;\n border-radius: 8px;\n background: #0099e4;\n text-align: center;\n min-width: 70px;\n max-width: 400px;\n max-height: 200px;\n box-shadow: 0 0 4px rgba(0,0,0,.25);\n }\n .ngx-dm-tour-text > .ngx-dm-tour-text-inner {\n color: white;\n padding: 8px;\n }\n .ngx-dm-tour-text:after {\n border: 2px solid;\n border-color: transparent white white transparent;\n box-shadow: 2px 2px 2px rgba(0,0,0,.25);\n background: #0099e4;\n content: " ";\n position: absolute;\n z-index: -1\n }\n .ngx-dm-tour-text.ngx-dm-tour-text-top-left:after {\n bottom: -8px;\n left: 8px;\n width: 16px;\n height: 16px;\n transform: rotate(45deg);\n }\n .ngx-dm-tour-text.ngx-dm-tour-text-top-center:after {\n bottom: -8px;\n left: calc(50% - 8px);\n width: 16px;\n height: 16px;\n transform: rotate(45deg);\n }\n .ngx-dm-tour-text.ngx-dm-tour-text-top-right:after {\n bottom: -8px;\n right: 8px;\n width: 16px;\n height: 16px;\n transform: rotate(45deg);\n }\n .ngx-dm-tour-text.ngx-dm-tour-text-bottom-left:after {\n top: -8px;\n left: 8px;\n width: 16px;\n height: 16px;\n transform: rotate(-135deg);\n }\n .ngx-dm-tour-text.ngx-dm-tour-text-bottom-center:after {\n top: -8px;\n left: calc(50% - 8px);\n width: 16px;\n height: 16px;\n transform: rotate(-135deg);\n }\n .ngx-dm-tour-text.ngx-dm-tour-text-bottom-right:after {\n top: -8px;\n right: 8px;\n width: 16px;\n height: 16px;\n transform: rotate(-135deg);\n }\n .ngx-dm-tour-text.ngx-dm-tour-text-right-top:after {\n top: 8px;\n left: -8px;\n width: 16px;\n height: 16px;\n transform: rotate(135deg);\n }\n .ngx-dm-tour-text.ngx-dm-tour-text-right-center:after {\n top: calc(50% - 8px);\n left: -8px;\n width: 16px;\n height: 16px;\n transform: rotate(135deg);\n }\n .ngx-dm-tour-text.ngx-dm-tour-text-right-bottom:after {\n bottom: 8px;\n left: -8px;\n width: 16px;\n height: 16px;\n transform: rotate(135deg);\n }\n .ngx-dm-tour-text.ngx-dm-tour-text-left-top:after {\n top: 8px;\n right: -8px;\n width: 16px;\n height: 16px;\n transform: rotate(-45deg);\n }\n .ngx-dm-tour-text.ngx-dm-tour-text-left-center:after {\n top: calc(50% - 8px);\n right: -8px;\n width: 16px;\n height: 16px;\n transform: rotate(-45deg);\n }\n .ngx-dm-tour-text.ngx-dm-tour-text-left-bottom:after {\n bottom: 8px;\n right: -8px;\n width: 16px;\n height: 16px;\n transform: rotate(-45deg);\n }\n',t.appendChild(this.document.head,e)}},t.prototype._L=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._cfg.debug>0&&console.log.apply(console,d(["[ngx-dm-tour]"],t))},t.prototype._W=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._cfg.debug>1&&console.warn.apply(console,d(["[ngx-dm-tour]"],t))},t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:e.RendererFactory2},{type:n.HttpClient},{type:void 0,decorators:[{type:e.Inject,args:[o.DOCUMENT]}]},{type:h,decorators:[{type:e.Inject,args:[u]},{type:e.Optional}]}]},t.ɵprov=e["ɵɵdefineInjectable"]({factory:function(){return new t(e["ɵɵinject"](e.RendererFactory2),e["ɵɵinject"](n.HttpClient),e["ɵɵinject"](o.DOCUMENT),e["ɵɵinject"](u,8))},token:t,providedIn:"root"}),t}();var p=function(){function t(t,e){this._el=t,this._ts=e}return t.prototype.ngAfterViewInit=function(){if(this.item){var t=this.item.split(".");t&&2==t.length?this._ts.registerControl(t[0],t[1],this._el):console.warn('[dm-tour] tour element ID must be in form "sectionID.ItemID": ',this.item)}},t.prototype.ngOnDestroy=function(){if(this.item){var t=this.item.split(".");t&&2==t.length&&this._ts.unregisterControl(t[0],t[t.length-1])}},t.decorators=[{type:e.Directive,args:[{selector:"[dm-tour]"}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:c}]},t.propDecorators={item:[{type:e.Input,args:["dm-tour"]}]},t}();var g=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:[p],imports:[o.CommonModule,n.HttpClientModule],exports:[p]}]}],t}();t.DM_TOUR_CONF=u,t.DmTourConfig=h,t.DmTourDirective=p,t.DmTourModule=g,t.DmTourService=c,Object.defineProperty(t,"__esModule",{value:!0})})); //# sourceMappingURL=dimanoid-ngx-dm-tour.umd.min.js.map