!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=923)}([function(t,e,n){"use strict";var r,i,o,a,s,u,c,l=n(46),h=n.n(l),f=n(270),d=n.n(f),p=(n(128),n(109),n(18),n(196)),v=n.n(p),m=n(38),g=n.n(m),y=(n(78),n(77),n(193),n(86),n(85),n(99),n(64),n(189),n(127),n(17),n(384)),_=n.n(y),b=n(385),E=n.n(b),S=n(386),T=n.n(S),k=n(387),x=n.n(k),w=n(125),C=n.n(w),O=n(187),A=n.n(O),R=n(388),L=n.n(R),P=n(389),I=n.n(P),D=n(390),N=n.n(D),F=n(391),M=n.n(F),H=n(392),U=n.n(H),j=n(263),B=n.n(j),Y=n(393),W=n.n(Y),K=n(68),G=n.n(K),V=n(394),z=n.n(V),q=n(395),$=n.n(q),Q=n(396),X=n.n(Q),J=n(397),Z=n.n(J),tt=n(264),et=n.n(tt),nt=n(398),rt=n.n(nt),it=n(265),ot=n.n(it),at=n(399),st=n.n(at),ut=n(400),ct=n.n(ut),lt=n(401),ht=n.n(lt),ft=n(402),dt=n.n(ft),pt=n(150),vt=n.n(pt),mt=n(42),gt=n.n(mt),yt=n(149),_t=n.n(yt),bt=n(403),Et=n.n(bt),St=n(404),Tt=n.n(St),kt=n(405),xt=n.n(kt),wt=n(406),Ct=n.n(wt),Ot=n(266),At=n.n(Ot),Rt=n(407),Lt=n.n(Rt),Pt=n(408),It=n.n(Pt),Dt=n(409),Nt=n.n(Dt),Ft=n(410),Mt=n.n(Ft),Ht=n(411),Ut=n.n(Ht),jt=n(30),Bt=n.n(jt),Yt=n(267),Wt=n.n(Yt),Kt=n(412),Gt=n.n(Kt),Vt=n(413),zt=n.n(Vt),qt=n(414),$t=n.n(qt),Qt=n(415),Xt=n.n(Qt),Jt=n(416),Zt=n.n(Jt),te=n(417),ee=n.n(te),ne=n(418),re=n.n(ne),ie=n(419),oe=n.n(ie),ae=n(420),se=n.n(ae),ue=n(421),ce=n.n(ue),le=n(422),he=n.n(le),fe=n(423),de=n.n(fe),pe=n(424),ve=n.n(pe),me=n(425),ge=n.n(me),ye=n(426),_e=n.n(ye),be=n(185),Ee=n.n(be),Se=n(427),Te=n.n(Se),ke=n(428),xe=n.n(ke),we=n(429),Ce=n.n(we),Oe=n(430),Ae=n.n(Oe),Re=n(431),Le=n.n(Re);(r={}).concat=_.a,r.toArray=se.a,r.isNil=E.a,r.isUndefined=T.a,r.slice=x.a,r.get=C.a,r.set=A.a,r.first=L.a,r.compact=I.a,r.drop=N.a,r.delay=M.a,r.defer=U.a,r.debounce=B.a,r.throttle=W.a,r.keys=G.a,r.each=z.a,r.map=$.a,r.reduce=X.a,r.find=Z.a,r.findIndex=et.a,r.filter=rt.a,r.flatten=ot.a,r.extend=st.a,r.clone=ct.a,r.cloneDeep=ht.a,r.every=dt.a,r.isString=vt.a,r.isObject=gt.a,r.isFunction=_t.a,r.isEqual=Et.a,r.isEmpty=Tt.a,r.transform=xt.a,r.has=Ct.a,r.last=At.a,r.split=It.a,r.trim=Lt.a,r.min=Nt.a,r.max=Mt.a,r.indexOf=Ut.a,r.isArray=Bt.a,r.noop=Wt.a,r.startsWith=Gt.a,r.endsWith=zt.a,r.toLower=$t.a,r.toUpper=Xt.a,r.range=Zt.a,r.pick=ee.a,r.includes=re.a,r.remove=oe.a,r.difference=ce.a,r.reverse=he.a,r.orderBy=de.a,r.groupBy=ve.a,r.uniqBy=ge.a,r.size=_e.a,r.values=Ee.a,r.forEachRight=Te.a,r.times=xe.a,r.truncate=Ce.a,r.join=Ae.a,r.chunk=Le.a,r.time=function(){return(new Date).getTime()},r.timeout=function(t,e){return function(){for(var n=[],r=0,i=g()(arguments);r=o);){var s=i?i[a]:a;if(e.call(n,t[s],s,t))return!0;a++}return!1},r.evalTagExpression=function(t,e,n){if(n||(n=""),!e||0===e.length)return!0;var i=r.getTags(t,n);if(!i||0===i.length)return!0;if(1===i.length&&(""===i[0]||"$"===i[0]))return!0;var o=!1;return!r.any(e,(function(t){if(r.evalMultipleTagExpression(t.c,i))o=!0;else if(t.c.length)return!!r.evalMultipleTagExpression(t.u,i);return!1}))&&o},r.evalMultipleTagExpression=function(t,e){return r.any(t,(function(t){return r.evalSingleTagExpression(t,e)}))},r.evalSingleTagExpression=(i={},o=["&","|","!"],a=function(t){var e=t.splice(t.length-2);return t.push(1===e[0]&&1===e[1]?1:0)},s=function(t){var e=t.splice(t.length-2);return t.push(1===e[0]||1===e[1]?1:0)},u=function(t){var e=t.splice(t.length-1);return t.push(1===e[0]?0:1)},function(t,e){var n="".concat(t,":").concat(e),c=i[n];if(null!=c)return c;var l=r.map(t.split(" "),(function(t){return-1!==o.indexOf(t)?t:-1===e.indexOf(t)?0:1}));if(l.length>1){for(var h=[],f=0,d=g()(l);f1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=document.createElement("script");return a.type="text/javascript",a.async=!0===e,a.src=t,a.onload=function(t){return o&&document.body.removeChild(a),n&&n.call(null,t)},a.onerror=function(t){r.isFunction(i)?i.call(null,t):r.isFunction(n)&&n.call(null,t)},document.body.appendChild(a)},c=function(){return Math.floor(65536*(1+Math.random())).toString(32).substring(1)},r.uniqueId=function(){return"".concat(r.time().toString(32),"_").concat(c()).concat(c()).concat(c())},r.one=function(t){return function(){if("function"==typeof t){var e=t;return t=null,e.apply(this,arguments)}}},r.cache=function(t,e){return null==e&&(e={}),function(n,r){return 1===arguments.length?e[n]:!t||t(r)?e[n]=r:void 0}},r.toRegExp=function(t){var e;if(!t||!r.isString(t))return t;var n=t.match(/\B\/([^\/]*)\//g),i=n&&n[0];if(i){var o=i.substring(1,i.length-1),a=t.substring(i.length);e=new RegExp(o,a)}return e||t},r.explodeAndMap=function(t,e,n,r){null==t&&(t=" "),null==r&&(r={});var i=t.split(e),o=new RegExp(n+"(.+)?"),a={},s=!0,u=!1,c=void 0;try{for(var l,h=d()(g()(i));!(s=(l=h.next()).done);s=!0){var f=l.value.split(o),p=f[0].trim(),v=f[1];r.caseInsensitive&&(p=p.toLowerCase()),r.trim&&(v=v&&v.trim()),null!=r.default&&null==v&&(v=r.default),""!==p&&(a[p]=v)}}catch(t){u=!0,c=t}finally{try{!s&&h.return&&h.return()}finally{if(u)throw c}}return a},r.memoize=function(t,e){return null==e&&(e={}),function(){for(var n,i=0,o=g()(arguments);i1&&(n=r.pop());var s=r.join(", ");return s in e?"function"==typeof n?n(e[s]):void 0:(r.push((function(t){return e[s]=t,"function"==typeof n?n(t):void 0})),t.apply(this,r))}},r.require=r.memoizeAsync((function(t,e){return r.loadScript(t,!0,(function(){return e(r.exports())}))})),function(){var t=void 0;r.exports=function(e){var n=t;return t=null!=e?e:void 0,n}}(),r.getFullPath=function(t,e){return window._getFullPath(t,e)},r.isLocal=function(){return"file:"===window.location.protocol},r.isRemote=function(){return"file:"!==window.location.protocol},e.a=r},function(t,e,n){var r=n(319);t.exports=function(t,e,n){return e in t?r(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){"use strict";n(78),n(77),n(86);var r=n(38),i=n.n(r),o=n(46),a=n.n(o),s=n(4),u=n.n(s),c=n(5),l=n.n(c),h=n(1),f=n.n(h),d=n(0),p=n(14),v=n(19),m=n(7),g=n(6),y=n(20),_=function(){function t(){u()(this,t),f()(this,"toString",(function(){return"Storage"})),f()(this,"namespace",void 0),f()(this,"storageMap",void 0)}return l()(t,[{key:"init",value:function(t){if(!this.namespace){var e;if(this.namespace=t,d.a.canUseLocalDB())e=localStorage.getItem(this.namespace);else{var n=d.a.explodeAndMap(document.cookie,";","=");n[this.namespace]&&(e=unescape(n[this.namespace]))}return this.storageMap=e?JSON.parse(e):{}}if(p.a._debug&&this.namespace!==t)return p.a._d("error","Storage","Namespace cann't be changed")}},{key:"isValid",value:function(){return p.a._debug&&!this.storageMap&&p.a._d("error","Storage","Namespace is not set yet."),null!=this.storageMap}},{key:"persist",value:function(t,e){if(this.isValid())return this.storageMap[t]=e,this.dump()}},{key:"fetch",value:function(t){if(this.isValid())return this.storageMap[t]}},{key:"dump",value:function(){if(this.isValid())return d.a.canUseLocalDB()?localStorage.setItem(this.namespace,a()(this.storageMap)):document.cookie="".concat(this.namespace,"=").concat(escape(a()(this.storageMap)))}}]),t}(),b={8:"backspace",13:"return",27:"escape",38:"down",40:"up",39:"right"};d.a.getKeyIndex=function(t){return b[t]?b[t]:"default"},d.a.getUrl=function(){return decodeURI(document.location.href)},d.a.isEqualURL=function(t,e,n){if(!t)return!1;var r=g.a.makeFullPath(t,d.a.getUrl());n=n||p.a.model.get(p.a.consts("KEY_MASTER_PROJECT_PATH"));var i=g.a.makeFullPath(e,g.a.appendSlash(d.a.getMasterHostFolder(n)));return g.a.filePath(i)===g.a.filePath(r)&&g.a.extractHashString(d.a.getUrl())===g.a.extractHashString(r)},d.a.isEqualPath=function(t,e,n){if(!t)return!1;var r=g.a.makeFullPath(t,d.a.getUrl());n=n||p.a.model.get(p.a.consts("KEY_MASTER_PROJECT_PATH"));var i=g.a.makeFullPath(e,g.a.appendSlash(d.a.getMasterHostFolder(n)));return g.a.filePath(i)===g.a.filePath(r)},d.a.setUrl=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return document.location.href=e?encodeURI(t):t},d.a.findEditDist=function(t,e){if(t==e)return 0;for(var n=[],r=[],i=0;i127}))},d.a.getTopicTitle=function(){return document.title||v.a.get(p.a.consts("KEY_TOPIC_TITLE"))},d.a.toggleClass=function(t,e){!d.a.includes(t,e)&&(t||[]).push(e)},d.a.preventDefault=function(t){return null!=t.preventDefault?t.preventDefault():t.returnValue=!1},d.a.isJavaScriptUrl=function(t){return"javascript:"===g.a.scheme(t)},d.a.isValidFileUrl=function(t){if(t.startsWith("#"))return!1;var e=g.a.scheme(t);return!e||-1!==["http:","https:","ftp:","sftp:","file:"].indexOf(e)},d.a.handleHref=function(t,e,n){if(t&&!(t=decodeURI(t)).startsWith("#")&&d.a.isValidFileUrl(t)&&(g.a.isRelativeUrl(t)&&(t=g.a.makeFullPath(t,g.a.filePath(d.a.getUrl()))),!d.a.isExternalUrl(t))){var r=g.a.params(),i=n&&n.removeParams;d.a.each(i,(function(t){return delete r[t]}));var o=g.a.updateUrlParams(encodeURI(t),r);return d.a.setUrl(o,!1),d.a.preventDefault(e)}},d.a.hookClick=function(t,e){var n;if(!("button"in t&&0!==t.button||t.defaultPrevented)){for(var r=t.target;r&&r!==document&&!(n=r.getAttribute("href"));)r=r.parentNode;var i=y.a.getAttribute(r,"target");if(!i||"_self"===i)return d.a.handleHref(n,t,e)}},d.a.getInnerLink=function(t){var e,n=0;if(!t||!t.getAttribute)return null;if(e=t.getAttribute("href"))return{href:e,node:t};if(!("childNodes"in t)||0==t.childNodes.length)return null;for(;n1&&void 0!==arguments[1])||arguments[1];return c.a.transform(c.a.map(e&&e.split("&"),(function(t){return t.split("=")})),(function(e,r){r[1]&&(e[r[0]]=n?t.decodeURI(r[1]):r[1])}),{})}},{key:"decodeURI",value:function(t){try{return decodeURIComponent(t)}catch(t){return""}}},{key:"createUrl",value:function(e){var n=e.baseUrl;if(!c.a.isEmpty(e.params)){var r=c.a.isString(e.params)?e.params:t.mapToEncodedString(e.params);n="".concat(n,"?").concat(r)}if(!c.a.isEmpty(e.hash)){var i=c.a.isString(e.hash)?e.hash:t.mapToEncodedString(e.hash);n="".concat(n,"#").concat(i)}return n}},{key:"updateUrlParams",value:function(e,n){var r=t.extractHashString(e);return n=c.a.extend(t.parseParams(t.extractParamString(e)),n),t.createUrl({baseUrl:t.filePath(e),hash:r,params:n})}},{key:"removeParam",value:function(e,n){var r=t.extractHashString(e),i=t.params(t.extractParamString(e));return delete i[n],t.createUrl({baseUrl:t.filePath(e),hash:r,params:i})}},{key:"updateUrlHash",value:function(e,n){var r=t.extractParamString(e);return n=c.a.extend(t.parseParams(t.extractHashString(e)),n),t.createUrl({baseUrl:t.filePath(e),hash:n,params:r})}},{key:"loadScript",value:function(t,e,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=document.createElement("script");i.type="text/javascript",i.async=!0===r,i.src=t,i.onload=function(){var t=l.b.fmxml&&l.b.fmxml.exports;l.b.fmxml&&(l.b.fmxml.exports=void 0),c.a.isFunction(e)&&e.call(null,t)},c.a.isFunction(n)&&(i.onerror=n),document.body.appendChild(i)}},{key:"scheme",value:function(t){t=t||"";var e,n="",r=c.a.first(t);return e=t.indexOf(":"),"."!==r&&"/"!==r&&-1!==e&&(n=t.substring(0,e+1).toLowerCase().trim()),n+""}},{key:"protocol",value:function(e){var n=e&&h.parse(e);return e&&!t.hasWindowsDrive(e)&&n.protocol||""}},{key:"hasWindowsDrive",value:function(t){var e=l.a.matches(t,/^([a-zA-Z]+):\//),n=l.a.matches(t,/^([a-zA-Z]+):\/\//);return e&&!n}},{key:"host",value:function(e){e=e||"";var n=t.scheme(e);return c.a.first(c.a.compact(c.a.split(e.substr(n.length),"/")))}},{key:"hostName",value:function(e){return c.a.first(c.a.split(t.host(e),":"))}},{key:"hasHttpProtocol",value:function(e){var n=t.protocol(e);return"http:"===n||"https:"===n}},{key:"hasFtpProtocol",value:function(e){return"ftp:"===t.protocol(e)}},{key:"getOrigin",value:function(){return location.origin}},{key:"hasFileProtocol",value:function(e){return"file:"===t.protocol(e)}},{key:"stripProtocol",value:function(e){var n=t.protocol(e);return e&&e.substring(n.length+2)}},{key:"isRemoteUrl",value:function(e){return t.hasHttpProtocol(e)||t.hasFtpProtocol(e)}},{key:"assureOrigin",value:function(e){return!e||t.isRelativeUrl(e)||t.scheme(e)?e:"".concat(t.getOrigin()).concat(e)}},{key:"removeOrigin",value:function(e){return t.isRelativeUrl(e)||(e=encodeURI("/".concat(t.makeRelativeUrl(e,"".concat(t.getOrigin(),"/"))))),e}},{key:"isRelativeUrl",value:function(e){return""===e||e&&!t.scheme(e)&&l.a.indexOf(l.a.trim(e),"/")}},{key:"filePath",value:function(t){var e;return-1!==(e=(t=t||"").indexOf("?"))&&(t=t.substring(0,e)),-1!==(e=t.indexOf("#"))&&(t=t.substring(0,e)),t}},{key:"sanitize",value:function(t){return l.a.replaceAll(t," ","_")}},{key:"fileName",value:function(e){var n=l.a.lastIndexOf(e,"/");return-1!==n&&n===l.a.length(e)-1?t.fileName(e.substr(0,n)):-1!==n?l.a.substr(e,n+1):e}},{key:"fileNameWithoutExt",value:function(e){var n=t.fileName(e),r=l.a.indexOf(n,".");return l.a.substring(n,0,-1===r?l.a.length(n):r)}},{key:"fileNameNoExt",value:function(e){return t.fileNameWithoutExt(e)}},{key:"extractAfterFile",value:function(e){return l.a.substring(e,l.a.length(t.filePath(e)))}},{key:"extractHashString",value:function(t){return l.a.extractStringBetween(t,"#","?")}},{key:"extractParamString",value:function(t){return l.a.extractStringBetween(t,"?","#")}},{key:"isSameOrigin",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.getOrigin();if(!t.protocol(e)&&!t.protocol(n))return!0;e=t.assureOrigin(e);var r=(n=t.assureOrigin(n))?c.a.slice(l.a.split(n,"/"),0,3).join("/"):"";return 0===l.a.search(e,r)}},{key:"hasBaseUrl",value:function(t,e){return t&&t.startsWith(e)}},{key:"isInternal",value:function(e,n){var r=t.makeFullPath(e,n);return t.isSameOrigin(r,n)}},{key:"makeRelativeUrl",value:function(e,n){if(e===n)return"";if(!e||!n)return e;var r=t.filePath(e),i=t.makeRelativePath(r,t.filePath(n));return"".concat(i).concat(l.a.substring(e,r.length))}},{key:"makeRelativeFolder",value:function(e,n){var r=t.makeRelativePath(e,n);return r?t.removeSlash(r):"."}},{key:"makeRelativePath",value:function(e,n){if(e=t.assureOrigin(e),n=t.assureOrigin(n),!e||t.isRelativeUrl(e)||t.isRelativeUrl(n)||!t.isSameOrigin(e,n))return e;var r=l.a.commonPrefix(e,n).split("/"),i=l.a.split(e,"/"),o=l.a.split(n,"/"),a=c.a.map(c.a.range(o.length-r.length),(function(){return".."})),s=c.a.slice(i,r.length-1);if(1===(a=a.concat(s)).length){var u=c.a.first(a),h=t.filePath(u);return h===u||h!==c.a.last(r)?u:u.substring(h.length)}return a.join("/")}},{key:"makeFullPath",value:function(e,n){if(!t.isRelativeUrl(e)||t.isRelativeUrl(n))return e;var r=t.filePath(n).split("/"),i=t.filePath(e),o=e&&e.substring(i.length),a=l.a.split(i,"/");return(a.length>1||a[0])&&(r.pop(),c.a.each(a,(function(t){".."===t?r.pop():"."!==t&&r.push(t)}))),"".concat(r.join("/")).concat(o)}},{key:"makeRelativePathFromFolder",value:function(e,n){return t.makeRelativePath(e,t.appendSlash(n))}},{key:"makePathFromFolder",value:function(e,n){return t.makeFullPath(e,t.appendSlash(n))}},{key:"makePath",value:function(t,e){return t?("/"===c.a.first(e)&&(e=l.a.substring(e,1)),"/"===c.a.last(t)?"".concat(t).concat(e):"".concat(t,"/").concat(e)):e}},{key:"mapToEncodedString",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"&",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"=";return c.a.reduce(t,(function(t,r,i){return c.a.isUndefined(r)||(t.length>0&&(t+=e),t+="".concat(i).concat(n).concat(encodeURIComponent(r))),t}),"")}},{key:"ext",value:function(t){if(t){var e=l.a.lastIndexOf(t,".");if(-1!==e)return l.a.substring(t,e+1)}return""}},{key:"appendBookmark",value:function(e,n){if(n){var r=t.extractHashString(n);e=""!==r?"".concat(e,"#").concat(r):e}return e}},{key:"isSameExt",value:function(e,n){return t.ext(e)===t.ext(n)}},{key:"removeExtension",value:function(t){if(t){var e=l.a.lastIndexOf(t,"."),n=t;return-1!==e&&(n=l.a.substring(t,0,e)),n}return t||""}},{key:"changeExt",value:function(t,e){if(t&&e){e=l.a.removeFirstChar(e,".");var n=l.a.lastIndexOf(t,"."),r=t;return-1!==n&&(r=l.a.substring(t,0,n)),e?"".concat(r,".").concat(e):r}return t||""}},{key:"changeName",value:function(e,n){var r=t.parentPath(e);return"".concat(t.appendSlash(r)).concat(n)}},{key:"changeNameNoExt",value:function(e,n){var r=t.parentPath(e);return t.changeExt("".concat(t.appendSlash(r)).concat(n),t.ext(e))}},{key:"parentName",value:function(e){var n=t.parentPath(e);return t.fileName(n)}},{key:"isAncestor",value:function(t,e){return c.a.startsWith(t,e)}},{key:"isSubDirectory",value:function(e,n){return!t.makeRelativePath(n,e).startsWith("..")}},{key:"changeAncestor",value:function(t,e,n){return(t=t||"").replace(e,n)}},{key:"parentPath",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.filePath(""),n=l.a.length(e),r=l.a.lastIndexOf(e,"/");return-1===r?"":(-1!==r&&(e=l.a.substring(e,0,r),r===n-1&&(e=t.parentPath(e))),e)}},{key:"ancestors",value:function(e){for(var n=[];e=t.parentPath(e);)n.push(e);return n}},{key:"nearestFolder",value:function(e){return l.a.endsWith(e,"/")?e:t.parentPath(e)}},{key:"isAbsoluteUrl",value:function(e){return!t.isRelativeUrl(e)}},{key:"isFilePath",value:function(e){var n=(e=t.filePath(e))&&t.fileName(e);return n&&"."!==n&&-1!==n.indexOf(".")}},{key:"isFolder",value:function(e){return e&&!t.isFilePath(e)}},{key:"toWindowsBashPath",value:function(e){return(e=(e=e&&t.toForwardSlash(e))&&e.replace(/^[A-Z]:/,(function(t){return t&&"/"+t.toLowerCase().slice(0,1)})))&&e.replace(/ /g,"\\ ")}},{key:"toForwardSlash",value:function(e){return c.a.isArray(e)?c.a.map(e,(function(e){return t._toFwdSlash(e)})):t._toFwdSlash(e)}},{key:"_toFwdSlash",value:function(t){return t&&c.a.replace(t,/\\/g,"/")}},{key:"toBackSlash",value:function(t){return t&&c.a.replace(t,/\//g,"\\")}},{key:"toDoubleBackSlash",value:function(t){return t&&c.a.replace(t,/\//g,"\\\\")}},{key:"appendSlash",value:function(t){return t&&t.lastIndexOf("/")!==t.length-1&&t+"/"||t}},{key:"prependSlash",value:function(t){return!t||c.a.isEmpty(t)||t.startsWith("/")?t:"/"+t}},{key:"appendPath",value:function(e,n){return e=t.appendSlash(e),(n=n&&n.length>0&&"/"===n[0]&&n.substring(1)||n)&&n.length>0?"".concat(e).concat(n):e}},{key:"appendPaths",value:function(e){for(var n=e,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:" ";return o.a.isString(t)&&t.charAt(0)===e?t.slice(1):t},toggle:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return o.a.isUndefined(t)||t===e?n:e},_stringifyObject:function(t){var e="";if(t&&o.a.get(t,"constructor")===s.Object)try{e=i()(t)}catch(t){e=""}return e},toString:function(t){return o.a.isNil(t)&&!1!==t?"":o.a.isFunction(t.getName)?t.getName():o.a.get(t,"constructor")===s.Object?this._stringifyObject(t):t.toString&&t.toString!==s.toString?t.toString():o.a.get(t,"constructor.name")},removeAllButLast:function(t,e){var n=this.split(t,e);return"".concat(n.slice(0,-1).join("")).concat(e).concat(n.slice(-1))},splitIntoWords:function(t){return t.match(/\b(\w+)\b/g)},replaceWordsWith:function(t,e){var n=new RegExp(/\b(\w+)\b/);return function t(r){var i=n.exec(r);if(i){var o=i[0];return"".concat(r.substr(0,i.index)).concat(e(o)).concat(t(r.substr(i.index+o.length)))}return r}(t)},searchWord:function(t,e){var n=new RegExp("\\b"+e+"\\b");return t.search(n)},findWord:function(t,e){return RegExp("\\b"+t+"\\b").test(e)},firstWord:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return t&&t.split(e)[0]},lastWord:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return t&&t.split(e).pop()},mergeSpaces:function(t){return t&&t.replace(/\s\s+/g," ")},toLowerCase:function(t){return t&&t.toLowerCase()},toUpperCase:function(t){return t&&t.toUpperCase()},equal:function(t,e){return t===e},equalNoCase:function(t,e){return this.toLowerCase(t)===this.toLowerCase(e)},compare:function(t,e){return te?1:0},compareNoCase:function(t,e){return this.compare(this.toLowerCase(t),this.toLowerCase(e))},localeEqualNoCase:function(t,e,n){return!this.localeCompare(t,e,n)||!this.localeCompare(t,e,n,{sensitivity:"base"})},localeCompare:function(t,e,n,r){if(t=t||"",e=e||"",this.localeCompareSupportsLocales())return t.localeCompare(e,n,r);var i="upper"===o.a.get(r,"caseFirst")?-1:1;return"case"!==o.a.get(r,"sensitivity")?this.compareNoCase(t,e)*i:this.compare(t,e)*i},reverseResult:function(t){return 1===t?-1:-1===t?1:0},localeCompareSupportsLocales:function(){if(!o.a.isUndefined(this._localeIsSupported))return!0;try{"foo".localeCompare("bar","i"),this._localeIsSupported=!0}catch(t){this._localeIsSupported="RangeError"===t.name}return this._localeIsSupported},replaceAll:function(t,e,n){var r=new RegExp(e,"g");return t&&t.replace(r,n)},replaceChars:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=e&&e.split("")||[];return o.a.each(r,(function(e){t=t&&t.replace(new RegExp(e),n)})),t},removeFirstChar:function(t,e){return void 0!==e?t=(t&&t.substring(0,1))===e?t.substring(1):t:t&&t.substring(1)||""},removeFromStart:function(t,e){return this.startsWith(t,e)?this.substr(t,this.length(e)):t},removeLastChar:function(t){return t&&t.length>1?t.substring(0,t.length-1):""},length:function(t){return t&&t.length},uuid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))},firstLine:function(t){var e=t.search("\n");return-1!==e?t.subsbstring(0,e):t},wrap:function(t,e){return o.a.join(o.a.concat(e,t,e),"")},escapeRegExp:function(t){return t&&t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},captialize:function(t){var e=this;return t&&t.replace(/(^|\s)\S/g,(function(t){return e.toUpperCase(t)}))},multiLineToSingle:function(t){return t&&t.replace(/(\r\n|\n|\r)/g," ").trim()},toLetters:function(t){if(t<0)return"";var e=t%26||26,n=Math.ceil(t/26)-1,r=String.fromCharCode(64+e);return n?this.toLetters(n)+r:r},romanize:function(t){var e="";return o.a.each({M:1e3,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1},(function(n,r){o.a.times(t/n,(function(){return e+=r})),t%=n})),e}});e.a=u}).call(this,n(102))},function(t,e,n){"use strict";var r=n(135),i={};i[n(29)("toStringTag")]="z",i+""!="[object z]"&&n(44)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(t,e,n){"use strict";n(305);var r=n(25),i=n(160),o=n(34),a=/./.toString,s=function(t){n(44)(RegExp.prototype,"toString",t,!0)};n(24)((function(){return"/a/b"!=a.call({source:"a",flags:"b"})}))?s((function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)})):"toString"!=a.name&&s((function(){return a.call(this)}))},function(t,e,n){"use strict";n(85);var r=n(38),i=n.n(r),o=n(46),a=n.n(o),s=(n(18),n(17),n(3)),u=n.n(s),c=n(9),l=n.n(c),h=n(13),f=n.n(h),d=n(8),p=n.n(d),v=n(12),m=n.n(v),g=(n(99),n(4)),y=n.n(g),_=n(5),b=n.n(_),E=n(1),S=n.n(E),T=n(0),k=n(14),x=n(15);function w(){if("undefined"==typeof Reflect||!u.a)return!1;if(u.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(u()(Date,[],(function(){}))),!0}catch(t){return!1}}var C=function(){function t(e,n){y()(this,t),S()(this,"subscribers",void 0),S()(this,"children",void 0),null==e&&(e=[]),this.subscribers=e,null==n&&(n={}),this.children=n}return b()(t,[{key:"getSubscribers",value:function(t,e,n,r){if(t.length>1){var i;r.push({fnsInfo:this.subscribers,key:e,value:n});var o=t[1];if(i=this.children[o]){var a="".concat(e,".").concat(o);i.getSubscribers(t.slice(1),a,null!=n?n[o]:void 0,r)}}else t.length>0&&this._getAllChildSubscribers(e,n,r);return r}},{key:"addSubscribers",value:function(e,n,r){if(1===n.length)return this.subscribers.push([e,r]);if(n.length>1){var i=n[1];return null==this.children[i]&&(this.children[i]=new t),this.children[i].addSubscribers(e,n.slice(1),r)}}},{key:"removeSubscriber",value:function(t,e){return 1===e.length?this._deleteSubscriber(t):e.length>1?this.children[e[1]].removeSubscriber(t,e.slice(1)):void 0}},{key:"_deleteSubscriber",value:function(t){var e=T.a.findIndex(this.subscribers,(function(e){return e[0]===t}));return null!=e&&-1!==e?this.subscribers.splice(e,1):k.a._debug?k.a._d("error","_unsubscribe","".concat(this,".{key} is not subscribed with ").concat(t)):void 0}},{key:"_getAllChildSubscribers",value:function(t,e,n){if(n.push({fnsInfo:this.subscribers,key:t,value:e}),this.children)for(var r in null==e&&(e={}),this.children){this.children[r]._getAllChildSubscribers("".concat(t,".").concat(r),e[r],n)}return n}}]),t}(),O=function(t){m()(r,t);var e,n=(e=r,function(){var t,n=p()(e);if(w()){var r=p()(this).constructor;t=u()(n,arguments,r)}else t=n.apply(this,arguments);return f()(this,t)});function r(t,e,i){var o;return y()(this,r),o=n.call(this,t||[],e||[]),S()(l()(o),"data",void 0),S()(l()(o),"childs",void 0),o.subscribers=t||[],o.children=e||[],o.data=i||{},o}return b()(r,[{key:"getSubscribers",value:function(t){var e=T.a.first(t),n=this.children[e];return n?n.getSubscribers(t,"".concat(T.a.first(t)),T.a.get(this.data,T.a.first(t)),[]):[]}},{key:"addSubscribers",value:function(t,e,n){var r=e[0];return null==this.children[r]&&(this.children[r]=new C),this.children[r].addSubscribers(t,e,n)}},{key:"removeSubscriber",value:function(t,e){var n=e[0];return null!=this.children[n]?this.children[n].removeSubscriber(t,e):void 0}},{key:"getData",value:function(t){for(var e,n=this.data,r=0;r=o)}));return{key:t.key,value:t.value,fns:T.a.map(e,(function(t){return t[0]}))}}));T.a.each(s,(function(t){return T.a.each(t.fns,(function(e){k.a._debug&&k.a._d("log","Publish call","".concat(r,".").concat(t.key,": ").concat(a()(t.value)));var i=function(){return r._unsubscribe(t.key,e)};return n.sync?e(t.value,t.key,i):T.a.defer(e,t.value,t.key,i)}))}))}}},{key:"cpublish",value:function(t,e,n){return this.publish(Object(x.a)(t),e,n)}},{key:"isSubscribed",value:function(t){var e;if(this._isForGlobal(t))return k.a.model.isSubscribed(t);"."===t[0]&&(t=t.substring(1));for(var n=this._rootNode.getSubscribers(this._getKeys(t)),r=0,o=i()(n);r1?(t=arguments[0],e=arguments[1]):(t=document,e=arguments[0]);try{return t.querySelectorAll(e)}catch(t){return}}},{key:"findOne",value:function(e,n){var r=t.find(e,n);return p.a.first(r)}},{key:"getName",value:function(t){return t&&(t.nodeName||t.tagName)}},{key:"traverseNode",value:function(e,n,r,i,o){return null==o&&(o=window),n&&n.call(o,e)&&(t.eachChildNode(e,(function(e){if(!i||i.call(o,e))return t.traverseNode(e,n,r,i,o)})),r&&r.call(o,e)),e}},{key:"traverseNodes",value:function(t){t.nodes=[t.node];for(var e=!0,n=t.nodes,r=t.preChild,i=t.context,o=void 0===i?window:i,a=n.length-1;a>=0;a=n.length-1){var s=n[a];if(p.a.isArray(n)&&n.splice(a,1),r&&!1===r.call(o,s))return e=!1,!1;p.a.forEachRight(s&&s.childNodes,(function(t,e){t.idx=e,n.push(t)}))}return e}},{key:"traverseNodesWithOpts",value:function(t){t.nodesData=[{node:t.node,opts:t.opts}];for(var e=!0,n=t.nodesData,r=t.preChild,i=t.passToChild,o=t.context,s=void 0===o?window:o,u=function(t){var o=n[t];if(r&&!1===r.call(s,o.node,o.opts))return e=!1,{v:!1};var a=o.node;p.a.each(a&&a.childNodes,(function(t){n.push({node:t,opts:i&&i.call(s,t,o.opts)||o.opts})}))},c=0;c1&&void 0!==arguments[1]?arguments[1]:c.a.get(this,"eventHandler");this._unsubs=this._unsubs||[];var r=c.a.compact(t.key?[t.key]:t.keys);return t.keys=void 0,c.a.each(r,(function(r){var i=n&&n.subscribe(c.a.extend({key:r},t));e._unsubs.push(i)})),this._unsubs}},{key:"rhsubscribe",value:function(t,e){this._rhunsubs=this._rhunsubs||[];var n=l.a.model.subscribe(t,e);return this._rhunsubs.push(n),this._rhunsubs}},{key:"dispose",value:function(){var t=this;c.a.defer((function(){c.a.each(t._unsubs,(function(t){return t.complete()})),c.a.each(t._rhunsubs,(function(t){return t()})),t.eventHandler=void 0,t.parentEventHandler=void 0,t.config=void 0}))}}]),t}()},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(26);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){"use strict";var r=n(84),i=n(802),o=n(257),a=n(805),s=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r=this.operator,o=i.toSubscriber(t,e,n);if(r?r.call(o,this.source):o.add(this.source||!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.syncErrorThrown=!0,t.syncErrorValue=e,t.error(e)}},t.prototype.forEach=function(t,e){var n=this;if(e||(r.root.Rx&&r.root.Rx.config&&r.root.Rx.config.Promise?e=r.root.Rx.config.Promise:r.root.Promise&&(e=r.root.Promise)),!e)throw new Error("no Promise impl found");return new e((function(e,r){var i;i=n.subscribe((function(e){if(i)try{t(e)}catch(t){r(t),i.unsubscribe()}else t(e)}),r,e)}))},t.prototype._subscribe=function(t){return this.source.subscribe(t)},t.prototype[o.observable]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e0?i(r(t),9007199254740991):0}},function(t,e){var n=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},function(t,e,n){t.exports=!n(24)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(25),i=n(284),o=n(80),a=Object.defineProperty;e.f=n(34)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(39),i=n(28),o=n(87),a=n(88),s=n(89),u=function(t,e,n){var c,l,h,f=t&u.F,d=t&u.G,p=t&u.S,v=t&u.P,m=t&u.B,g=t&u.W,y=d?i:i[e]||(i[e]={}),_=y.prototype,b=d?r:p?r[e]:(r[e]||{}).prototype;for(c in d&&(n=e),n)(l=!f&&b&&void 0!==b[c])&&s(y,c)||(h=l?b[c]:n[c],y[c]=d&&"function"!=typeof b[c]?n[c]:m&&l?o(h,r):g&&b[c]==h?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(h):v&&"function"==typeof h?o(Function.call,h):h,v&&((y.virtual||(y.virtual={}))[c]=h,t&u.R&&_&&!_[c]&&a(_,c,h)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e,n){"use strict";n.d(e,"a",(function(){return k}));n(18),n(17);var r=n(3),i=n.n(r),o=n(75),a=n.n(o),s=n(4),u=n.n(s),c=n(5),l=n.n(c),h=n(9),f=n.n(h),d=n(13),p=n.n(d),v=n(8),m=n.n(v),g=n(12),y=n.n(g),_=n(1),b=n.n(_),E=n(11),S=n(0);function T(){if("undefined"==typeof Reflect||!i.a)return!1;if(i.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(i()(Date,[],(function(){}))),!0}catch(t){return!1}}var k=function(t){y()(r,t);var e,n=(e=r,function(){var t,n=m()(e);if(T()){var r=m()(this).constructor;t=i()(n,arguments,r)}else t=n.apply(this,arguments);return p()(this,t)});function r(){var t;u()(this,r);for(var e=arguments.length,i=new Array(e),o=0;o"+i+""};t.exports=function(t,e){var n={};n[t]=e(s),r(r.P+r.F*i((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3})),"String",n)}},function(t,e,n){t.exports=n(650)},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(35),i=n(90);t.exports=n(34)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(133),i=n(73);t.exports=function(t){return r(i(t))}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(50);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){"use strict";var r=n(24);t.exports=function(t,e){return!!t&&r((function(){e?t.call(null,(function(){}),1):t.call(null)}))}},function(t,e,n){var r=n(327),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e,n){var r=n(149),i=n(234);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,e,n){var r=n(697),i=n(714),o=n(105),a=n(30),s=n(716);t.exports=function(t){return"function"==typeof t?t:null==t?o:"object"==typeof t?a(t)?i(t[0],t[1]):r(t):s(t)}},function(t,e,n){"use strict";n(18),n(17);var r=n(3),i=n.n(r),o=n(31),a=n.n(o),s=(n(86),n(75)),u=n.n(s),c=n(186),l=n.n(c),h=n(4),f=n.n(h),d=n(5),p=n.n(d),v=n(9),m=n.n(v),g=n(13),y=n.n(g),_=n(8),b=n.n(_),E=n(12),S=n.n(E),T=n(1),k=n.n(T),x=n(11),w=n.n(x),C=n(0),O=n(281),A=n(37);function R(){if("undefined"==typeof Reflect||!i.a)return!1;if(i.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(i()(Date,[],(function(){}))),!0}catch(t){return!1}}var L=function(t){S()(r,t);var e,n=(e=r,function(){var t,n=b()(e);if(R()){var r=b()(this).constructor;t=i()(n,arguments,r)}else t=n.apply(this,arguments);return y()(this,t)});function r(){return f()(this,r),n.apply(this,arguments)}return p()(r,[{key:"render",value:function(){var t=this;return this.hide?null:w.a.createElement("p",a()({ref:function(e){e&&(e.innerHTML=t.text)}},this.classNames,{title:this.props.title}))}}]),r}(A.a),P=n(6),I=n(2);function D(){if("undefined"==typeof Reflect||!i.a)return!1;if(i.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(i()(Date,[],(function(){}))),!0}catch(t){return!1}}var N={XXS:18,XS:10,S:18,M:24,L:18,XL:24,XXL:36},F=function(t){S()(r,t);var e,n=(e=r,function(){var t,n=b()(e);if(D()){var r=b()(this).constructor;t=i()(n,arguments,r)}else t=n.apply(this,arguments);return y()(this,t)});function r(){var t;f()(this,r);for(var e=arguments.length,i=new Array(e),o=0;o0&&(" "===e[n]||" "===e[n-1])}},{key:"compareNoCase",value:function(t,e){return t===e?0:-1}},{key:"isPrevious",value:function(t){return t.selStart0&&n===e.length&&" "!==e[e.length-1]}},{key:"getFirstLevelNextModel",value:function(t,e){if(t&&C.a.isArray(t)){if(!e&&t.length>Fe.NEXT)return t[Fe.NEXT];if(e&&t.length>Fe.PREVIOUS)return t[Fe.PREVIOUS]}}},{key:"getSafeElement",value:function(t,e){if(t&&C.a.isArray(t)&&t.length>e)return t[e]}},{key:"getCountfromModel",value:function(t){return C.a.isArray(t)&&t.length>Ne.COUNT?t[Ne.COUNT]:0}},{key:"getNextModel",value:function(t){if(t&&C.a.isArray(t)&&t.length>Ne.NEXT_MODEL)return t[Ne.NEXT_MODEL]}},{key:"getFirstPrediction",value:function(t){if(t&&C.a.isArray(t)&&t.length>0&&C.a.isArray(t[0]))return t[0]}},{key:"getCountfromWordHash",value:function(t){return C.a.isArray(t)&&t.length>De.COUNT?t[De.COUNT]:0}}]),t}(),He=(n(109),function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20;f()(this,t),k()(this,"_items",void 0),k()(this,"_max_items",void 0),this._items=e,this._max_items=n}return p()(t,[{key:"merge",value:function(t){var e=this;C.a.each(t,(function(t){return e.mergeItem(t)})),this._sort(),this._purge()}},{key:"clear",value:function(){this._items=[]}},{key:"_purge",value:function(){this._items.length>this._max_items&&this._items.splice(this._max_items)}},{key:"mergeItem",value:function(t){var e=this.find_item(t);e?e.merge(t):this._items.push(t)}},{key:"find_item",value:function(t){return C.a.find(this._items,(function(e){return e.match(t)}))}},{key:"merge_item",value:function(t,e){t.probability+=e.probability,t.count=Math.max(t.count,e.count)}},{key:"_sort",value:function(){this.items.sort(this.compare_items)}},{key:"compare_items",value:function(t,e){return t.compare(e)}},{key:"items",get:function(){return this._items}}]),t}()),Ue=(n(128),function(){function t(e,n,r,i){f()(this,t),k()(this,"isPrevious",void 0),k()(this,"isWholeWord",void 0),k()(this,"selection",void 0),k()(this,"_right_text",void 0),k()(this,"_left_text",void 0),k()(this,"original_text",void 0),k()(this,"trimmedText",void 0),k()(this,"_partial",void 0),k()(this,"words",void 0),k()(this,"isSplitText",void 0),k()(this,"_matchExp",void 0),this.isPrevious=i,this.selection=void 0===r?e.length:r;var o=this._calculateSeparator(e);this.isPrevious||(this.isWholeWord=n||this._isWholeWord(e,o)),this.initText(e,o)}return p()(t,[{key:"initText",value:function(t,e){this._computeText(t,e),this.trimmedText=this.original_text.trim(),this.words=C.a.compact(this.trimmedText.split(" ")||[]),this._reverseIfPrevious(),!this.isWholeWord&&this.words.length>0&&(this._partial=C.a.first(this.words.splice(-1)))}},{key:"_computeText",value:function(t,e){this._right_text="",this._left_text="",!e&&(e=t.length),this.isSplitText=!(0===e||e===t.length);var n=t.substring(0,e),r=t.substring(e);this.isPrevious?(this.original_text=r,this._left_text=n.trim()):(this.original_text=n,this._right_text=r.trim())}},{key:"equalRemaingWord",value:function(t){if(""!==this._left_text||""!==this._right_text){var e=this._getRemainigWord();return!!e&&0===Me.compareNoCase(e,t)}return!1}},{key:"_getRemainigWord",value:function(){var t=this.isPrevious?this._left_text.split(" "):this._right_text.split(" ");if(t=t||[],(t=C.a.compact(t)).length>0)return this.isPrevious?t[t.length-1]:t[0]}},{key:"completeSuggestion",value:function(t){return this.isPrevious?0===this._left_text.length?t:this._left_text+" "+t:0===this._right_text.length?t:t+" "+this._right_text}},{key:"_calculateSeparator",value:function(t){if(this.isPrevious){if(0===this.selection)return this.isWholeWord=!0,0;if(t.length>this.selection&&" "!==t[this.selection-1]){var e=t.lastIndexOf(" ",this.selection-1);return this.isWholeWord=!1,e>=0?e+1:0}this.isWholeWord=!0}return this.selection}},{key:"_reverseIfPrevious",value:function(){this.isPrevious&&this.words.reverse()}},{key:"_isWholeWord",value:function(t,e){return this.isPrevious?0===e||t.length>e&&" "===t[e-1]:e>0&&" "===t[e-1]}},{key:"compare",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(n=void 0===n?this.words.length-1:n,this.words.length>t.words.length)return!1;for(var r=e;r<=n;r++){var i=this.words[r],o=t.words[r];if(0!==Me.compareNoCase(i,o))return!1}return this.matchPartial(t,r)}},{key:"matchPartial",value:function(t,e){if(void 0===this._partial)return!0;if(t.words.length<=e)return!1;var n=t.words[e];return this.comparePartial(n)}},{key:"comparePartial",value:function(t){return this._matchExp=new RegExp("^"+this._partial,"i"),this._matchExp.test(t)}},{key:"completeWord",value:function(t){return this.isWholeWord||void 0===this._partial||0===this._partial.length?this.getTermForCompleteWord(t):this.getTermForPartialText(t)}},{key:"getTermForPartialText",value:function(t){var e=t.substring(this._partial.length,t.length);if(this.isPrevious){var n="",r=this.trimmedText.indexOf(" ");return r>=0&&(n=this.trimmedText.substring(r)),this._partial+e+n}return this.trimmedText+e}},{key:"getTermForCompleteWord",value:function(t){return this.isPrevious?t+" "+this.trimmedText:this.trimmedText+" "+t}},{key:"replaceLastWord",value:function(t){var e=this.trimmedText;if(void 0!==this._partial&&!this.isWholeWord){var n=this.trimmedText.length-this._partial.length;e=(e=this.trimmedText.substring(0,n)).trim()}return e+" "+t}},{key:"equalLastWord",value:function(t){if(0===this.words.length)return!1;var e=this.words[this.words.length-1];return 0===Me.compareNoCase(e,t)}}]),t}()),je=function(){function t(e){f()(this,t),k()(this,"_callback",void 0),k()(this,"_count",void 0),this._callback=e,this._count=0}return p()(t,[{key:"signal",value:function(){this._count++,this._count>=0&&this._callback&&this._callback()}},{key:"wait",value:function(t){var e=t||1;this._count-=e}}]),t}(),Be=function(){function t(){f()(this,t),k()(this,"_list",void 0)}return p()(t,[{key:"initHistory",value:function(t){this._list||(this._list=t||[])}},{key:"getHistory",value:function(){return this._list||[]}},{key:"_updateText",value:function(t,e){this.getHistory().splice(e,1),this.getHistory().unshift(t)}},{key:"_addNewText",value:function(t){this.getHistory().push(t)}},{key:"add",value:function(t){var e=C.a.findIndex(this.getHistory(),(function(e){return 0===Me.compareNoCase(t.text,e.text)}));e>=0?this._updateText(t,e):this._addNewText(t)}},{key:"delete",value:function(t){var e=C.a.findIndex(this.getHistory(),(function(e){return 0===Me.compareNoCase(t,e.text)}));e>=0&&this.getHistory().splice(e)}}]),t}(),Ye=function(){function t(e){f()(this,t),k()(this,"_set",void 0),k()(this,"_initialised",void 0),this._set=e||[],this._initialised=!1}return p()(t,[{key:"intersect",value:function(t){!C.a.isArray(t)&&(t=t.set);for(var e=[],n=0,r=0,i=0;rt[i]||(e[n++]=this._set[r],r++),i++);this._set=e}},{key:"intersectOrSet",value:function(t){this._initialised?this.intersect(t):(C.a.isArray(t)||(t=t.set),this.set=t,this._initialised=!0)}},{key:"intersectCount",value:function(t){C.a.isArray(t)||(t=t.set);for(var e=0,n=0,r=0;nt[r]||(e++,n++),r++);return e}},{key:"set",set:function(t){this._set=t||[]},get:function(){return this._set}},{key:"length",get:function(){return this._set.length}}]),t}(),We=function(){function t(e,n,r,i){f()(this,t),k()(this,"term",void 0),k()(this,"probability",void 0),k()(this,"count",void 0),k()(this,"source",void 0),this.probability=n,this.term=e,this.count=r,this.source=i}return p()(t,[{key:"merge",value:function(t){this.probability+=t.probability,this.count=Math.max(this.count,t.count)}},{key:"compare",value:function(t){return t.probability-this.probability}},{key:"match",value:function(t){return 0===Me.compareNoCase(t.term,this.term)}}]),t}(),Ke=function(){function t(e){f()(this,t),k()(this,"newPredictions",void 0),k()(this,"predictionSet",void 0),k()(this,"inputSet",void 0),k()(this,"_loader",void 0),k()(this,"newPrediction",void 0),k()(this,"parsed_input",void 0),this.newPredictions=[],this.predictionSet=new Ye,this.inputSet=new Ye,this._loader=e}return p()(t,[{key:"computeCounts",value:function(t,e){var n=this;return this.newPredictions=[],this.parsed_input=e,C.a.each(t,(function(t){return n.addUpdatedPrediction(t)})),this.newPredictions}},{key:"addUpdatedPrediction",value:function(t){var e=1;if(void 0!==this._loader&&(this.createPredictionSet(t),e=this.computeTopicCount()),e>0){var n=new We(t.term,t.probability,e,t.source);this.newPredictions.push(n)}}},{key:"computeTopicCount",value:function(){return this.predictionSet.set.length}},{key:"createPredictionSet",value:function(t){var e=this;this.predictionSet=new Ye;var n=new Ue(t.term,!0);C.a.each(n.words,(function(t,n){return e._addWordToSet(t,e.predictionSet)}))}},{key:"initInput",value:function(t){var e=this;this.inputSet=new Ye,C.a.each(t.words,(function(t){e._addWordToSet(t,e.inputSet)}))}},{key:"_addWordToSet",value:function(t,e){if(!this._loader.isStopWord(t)){var n=this._loader._getHashForWord(t);n&&n.length>De.TOPICS&&e.intersectOrSet(n[De.TOPICS])}}}]),t}(),Ge=n(111),Ve=n.n(Ge),ze=.2,qe=1,$e=5,Qe=2,Xe={HISTORY_PREDICTOR:0,NGRAM_PREDICTOR:1,GENERAL_PREDICTOR:2,CORRECTOR:3},Je=I.a.consts,Ze=function(){function t(e){f()(this,t),k()(this,"_path",void 0),this._path=e||"",this.initPath()}return p()(t,[{key:"getPath",value:function(){return this._path}},{key:"initPath",value:function(){"./"===this._path&&(this._path=""),"."===this._path[0]&&"/"===this._path[1]&&(this._path=this._path.slice(2))}},{key:"_getModelFileName",value:function(t){return Je("SEARCH_MODEL_ADDR")+t.toString()+".js"}},{key:"getModelFilePath",value:function(t){var e=this._getModelFileName(t);return this._getRelativePath(e)}},{key:"_getRelativePath",value:function(t){return""===this._path?t:P.a.makePath(this._path,t)}},{key:"_getPathKey",value:function(){return""===this._path?"":"_"+this._path+"_"}},{key:"getModelKey",value:function(t){return Je("SEARCH_MODEL_KEY")+this._getPathKey()+t.toString()}},{key:"_getMapFileName",value:function(){return Je("SEARCH_MAP_ADDR")}},{key:"getMapFilePath",value:function(){var t=this._getMapFileName();return this._getRelativePath(t)}},{key:"getIndexFilePath",value:function(){var t=Je("SEARCH_INDEX_FILE");return this._getRelativePath(t)}},{key:"getTopicUrl",value:function(t){return this._getRelativePath(t)}},{key:"getSearchDbFilePath",value:function(){var t=Je("SEARCH_DB_FILE");return this._getRelativePath(t)}},{key:"getMetadataFilePath",value:function(){var t=Je("SEARCH_METADATA_FILE");return this._getRelativePath(t)}},{key:"getTextFilePath",value:function(t){var e=Je("SEARCH_TEXT_FILE"),n=this._getRelativePath(e);return"".concat(n,"/").concat(t,".js")}}]),t}(),tn=I.a.model,en=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";f()(this,t),k()(this,"_paths",void 0),k()(this,"index_data",void 0),k()(this,"_hash_to_word",void 0),k()(this,"map_data",void 0),k()(this,"_top_words",void 0),k()(this,"_word_hash",void 0),this._paths=new Ze(e)}return p()(t,[{key:"init",value:function(t){this.loadIndex(t),this.loadMap(t)}},{key:"_isIndexLoaded",value:function(){return void 0!==this.index_data}},{key:"getModelCount",value:function(){return this.index_data.Model.length}},{key:"getMapHash",value:function(t){return this._hash_to_word[t]}},{key:"getHashes",value:function(t){if(void 0!==t&&t.length>0)return this.getAplhabetHashes(t[0])}},{key:"getAplhabetHashes",value:function(t){if(this.map_data&&1===t.length){var e=t.toLowerCase();return this.map_data[e]}}},{key:"getWordModel",value:function(t,e){var n,r=this._getHashForWord(t);return r&&e&&(n=e[r[De.MODEL_INDEX]]),n}},{key:"getCount",value:function(t){var e=this._getHashForWord(t);if(e)return e[De.COUNT]}},{key:"getModelData",value:function(t){var e=t[De.MODEL_FILE_NO],n=t[De.MODEL_INDEX],r=tn.get(this._paths.getModelKey(e));return r||this.loadModel(e),r&&r[n]}},{key:"_compareWordCount",value:function(t,e){var n=Me.getSafeElement(t,De.COUNT),r=Me.getSafeElement(e,De.COUNT);return n&&r?r-n:0}},{key:"_buildTopWords",value:function(t){t.sort(this._compareWordCount),t.splice(100*$e),this._top_words=t}},{key:"getModelFileNo",value:function(t){var e=this._getHashForWord(t);if(e)return e[De.MODEL_FILE_NO]}},{key:"_getHashForWord",value:function(t){var e,n=this.getHashKey(t);return n&&(e=this._hash_to_word[n]),e}},{key:"getHashKey",value:function(t){if(t&&t.length>0){var e=t.toLowerCase();return this._word_hash[e]}}},{key:"loadIndex",value:function(t){var e=this;!1===this._isIndexLoaded()?C.a.loadScript(this._paths.getIndexFilePath(),!0,(function(){e.index_data=C.a.exports(),e.onIndexLoaded(t)}),!0):this.onIndexLoaded(t)}},{key:"loadModel",value:function(t,e){if(void 0!==t){var n=this._paths.getModelKey(t),r=tn.get(n);if(void 0===r){tn.publish(n,null);var i=this._paths.getModelFilePath(t);C.a.loadScript(i,!0,this.getOnModelLoadFn(t,e),!0)}else null===r&&void 0!==e?tn.subscribe(n,e):this.doCallback(e,r,t)}else this.doCallback(e,[],t)}},{key:"doCallback",value:function(t,e,n){t&&t(e,n)}},{key:"getOnModelLoadFn",value:function(t,e){var n=this;return function(){var r=C.a.exports();tn.publish(n._paths.getModelKey(t),r),e&&e(r,t)}}},{key:"onMapLoaded",value:function(t){this.parseMap(),this.index_data&&t&&t(this)}},{key:"onIndexLoaded",value:function(t){this.map_data&&t&&t(this)}},{key:"parseMap",value:function(){var t=this.map_data;this._word_hash={},this._hash_to_word={};var e=[];for(var n in t){var r=t[n];this._parseWordsData(r),e=e.concat(r)}this._buildTopWords(e)}},{key:"_parseWordsData",value:function(t){var e=this;C.a.each(t,(function(t){var n=Ve()(t[De.HASH]);if(t[De.WORD]){var r=t[De.WORD].toString();e._word_hash[r]=n}e._hash_to_word[n]=t}))}},{key:"isStopWord",value:function(t){return void 0!==C.a.find(this.index_data.stopWords,(function(e){return 0===Me.compareNoCase(t,e)}))}},{key:"getTotalCount",value:function(){return this.index_data.totalCount}},{key:"wordHashfromIndexKey",value:function(t,e){return C.a.find(this._hash_to_word,(function(n){return n[De.MODEL_INDEX]===t&&n[De.MODEL_FILE_NO]===e}))}},{key:"loadMap",value:function(t){var e=this;void 0===this.map_data?C.a.loadScript(this._paths.getMapFilePath(),!0,(function(){e.map_data=C.a.exports(),e.onMapLoaded(t)}),!0):this.onMapLoaded(t)}},{key:"top_words",get:function(){return this._top_words}},{key:"nGram",get:function(){return this.index_data.nGram}},{key:"search_model",get:function(){return this.index_data.Model}},{key:"search_map",get:function(){return this.index_data.Map}},{key:"total_count",get:function(){return this.index_data.totalCount}},{key:"stop_words",get:function(){return this.index_data.stopWords}}]),t}(),nn=function(){function t(e,n){f()(this,t),k()(this,"parsed_input",void 0),k()(this,"_list",void 0),this.parsed_input=n,this._list=e||[]}return p()(t,[{key:"isForInput",value:function(t,e){return this.parsed_input.isPrevious?void 0!==e&&this.parsed_input.original_text===e.original_text:this.parsed_input.original_text===t.original_text}},{key:"isEmpty",value:function(){return 0===this._list.length}},{key:"predictions",get:function(){return this._list}}]),t}(),rn=function(){function t(e,n){f()(this,t),k()(this,"_reader",void 0),k()(this,"_predictions",void 0),k()(this,"_callback",void 0),k()(this,"_source",void 0),k()(this,"_max_predictions",void 0),k()(this,"_parsed_input",void 0),this._reader=e,this._predictions=[],this._callback=n,this._source=Xe.HISTORY_PREDICTOR,this._max_predictions=void 0===Qe?2:Qe}return p()(t,[{key:"getPredictions",value:function(t){return this._predictions=[],this._parsed_input=t,this._computePredictions(),this._callback&&this._callback(new nn(this._predictions,this._parsed_input)),this._predictions}},{key:"init",value:function(){}},{key:"clear",value:function(){this._predictions=[]}},{key:"_computePredictions",value:function(){var t=this;""!==this._parsed_input.trimmedText&&(C.a.each(this._reader._list,(function(e){t._match(e.text)&&t._predictions.push(t._createPrediction(e))})),this._purge())}},{key:"_purge",value:function(){this._predictions.splice(this._max_predictions)}},{key:"_createPrediction",value:function(t){return new We(t.text,1,t.count,this._source)}},{key:"_match",value:function(t){if(this._parsed_input.original_text.length>t.length)return!1;var e=new Ue(t,!0);return this._parsed_input.compare(e)}}]),t}(),on=function(){function t(e){var n=e.loader,r=e.model_item,i=e.total_count,o=e.parsed_input,a=e.continueFn;f()(this,t),k()(this,"parsed_input",void 0),k()(this,"_model_item",void 0),k()(this,"_total_count",void 0),k()(this,"_continueFn",void 0),k()(this,"_nextModelFn",void 0),k()(this,"_multi_prediction",void 0),k()(this,"_loader",void 0),k()(this,"_predictions",void 0),k()(this,"term",void 0),k()(this,"probability",void 0),k()(this,"_first_word",void 0),k()(this,"isFirstLevel",void 0),k()(this,"_level",void 0),k()(this,"word_hash",void 0),k()(this,"previous",void 0),k()(this,"source",void 0),this._model_item=r,this.parsed_input=o||new Ue(""),this._init(),this._total_count=i,this._continueFn=a||this._isStopWord,this._nextModelFn=this._nextModel,this._predictions=[],this._multi_prediction=!1,this._loader=n}return p()(t,[{key:"_init",value:function(){this.term="",this.probability=1,this._first_word=!0,this.isFirstLevel=!1,this._level=0}},{key:"getPrediction",value:function(t,e,n,r){return this.word_hash=t,this.isFirstLevel=e,this.previous=n,this.source=r,this.isFirstLevel&&this._appendPreviousPredictions(this._model_item),this._appendPrediction(this._model_item),this._createPrediction()}},{key:"getMultiPredictions",value:function(t,e,n,r){return this._multi_prediction=!0,this.word_hash=t,this.isFirstLevel=e,this.previous=n,this.source=r,this.isFirstLevel&&this._appendPreviousPredictions(this._model_item),this._appendPrediction(this._model_item),this._predictions}},{key:"equalRemaingWord",value:function(t){var e=this._getword(t,this.word_hash);return!(!e||!this.parsed_input.equalRemaingWord(e))}},{key:"_appendPreviousPredictions",value:function(t){var e=this._getPreviousItem(t);e&&(this._getPreviousProbability(e)>ze&&this._appendPreviousTerm(e))}},{key:"_getPreviousItem",value:function(t){var e=Me.getFirstLevelNextModel(t,!0);if(e)return Me.getSafeElement(e,0)}},{key:"_appendPreviousTerm",value:function(t){var e=this._getword(t);if(e){if(this.parsed_input.equalLastWord(e))return;this.term=this.parsed_input.replaceLastWord(e),this._first_word=!1}}},{key:"_createPrediction",value:function(){if(""!==this.term){var t=this.parsed_input.completeSuggestion(this.term);return new We(t,this.probability,1,this.source)}}},{key:"_appendPrediction",value:function(t){if(this.probability=this.probability*this._calculateProbability(t),this._update_term(t),this._shouldCreatePrediction(t)&&this._predictions.push(this._createPrediction()),this._continueFn(t)){var e=this._nextModel(t);this._total_count=this._getCount(t),this._level++,this._first_word=!1,this.isFirstLevel=!1,this.word_hash=void 0,e&&this._appendPrediction(e)}}},{key:"_getPreviousProbability",value:function(t){var e=this._getCount(this._model_item);return Me.getCountfromModel(t)/e}},{key:"_update_term",value:function(t){this.parsed_input.isPrevious?this.term=this._nextTerm(t)+this.term:this.term=this.term+this._nextTerm(t)}},{key:"_getword",value:function(t,e){return e=e||this._get_word_hash(t),Me.getSafeElement(e,De.WORD)}},{key:"_get_word_hash",value:function(t){return this._loader.getMapHash(t[Ne.WORD_HASH])}},{key:"_nextModel",value:function(t){var e;if((e=this.isFirstLevel?Me.getFirstLevelNextModel(t,this.previous):Me.getNextModel(t))&&e.length>0)return Me.getFirstPrediction(e)}},{key:"_nextTerm",value:function(t){var e=this._getword(t,this.word_hash);return e?this._first_word?this.parsed_input.completeWord(e):" "+e:""}},{key:"_calculateProbability",value:function(t){return this._getCount(t)/this._total_count}},{key:"_getCount",value:function(t){return this.word_hash?Me.getCountfromWordHash(this.word_hash):Me.getCountfromModel(t)}},{key:"_shouldCreatePrediction",value:function(t){return this._multi_prediction&&!this._isStopWord(t)&&!this.equalRemaingWord(t)}},{key:"_isStopWord",value:function(t){var e=this._getword(t,this.word_hash);return!!e&&this._loader.isStopWord(e)}}]),t}(),an=function(){function t(e){var n=e.loader,r=e.level,i=e.callback,o=e.previous,a=e.max_predictions,s=void 0===a?20:a;f()(this,t),k()(this,"_loader",void 0),k()(this,"level",void 0),k()(this,"_callback",void 0),k()(this,"previous",void 0),k()(this,"_max_predictions",void 0),k()(this,"predictions",void 0),k()(this,"_source",void 0),k()(this,"parsed_input",void 0),k()(this,"_word",void 0),k()(this,"word_index",void 0),k()(this,"_word_model",void 0),k()(this,"_prediction_array",void 0),this.level=r,this.previous=o,this._max_predictions=s,this.predictions=[],this._callback=i,this._loader=n,this._source=Xe.NGRAM_PREDICTOR}return p()(t,[{key:"init",value:function(){}},{key:"clear",value:function(){this._word_model=void 0,this._prediction_array=void 0,this.parsed_input=void 0,this.predictions=[]}},{key:"getPredictions",value:function(t){this.parsed_input=t,this.predictions=[],void 0!==t&&t.words.length>=this.level?(this.word_index=t.words.length-this.level,this._word=t.words[this.word_index],this._loadInputModel(this._word,this._compute_word_predictions.bind(this))):this._onResultsComputed()}},{key:"_compute_word_predictions",value:function(t){this.predictions=[];var e=this.level,n=this._word,r=this._loader.getCount(n);this._word_model=this._loader.getWordModel(n,t),this._word_model&&(this._prediction_array=this._get_prediction_array(),this._compute_prediction_from_model(n,e,r)),this._onResultsComputed()}},{key:"_onResultsComputed",value:function(){this._callback&&this._callback(new nn(this.predictions,this.parsed_input),this._loader)}},{key:"_compute_prediction_from_model",value:function(t,e,n){if(void 0!==this._prediction_array)if(this._is_my_level(e))this._compute_next_words(n);else{e--;var r=this._get_word_index(e),i=this.parsed_input.words[r],o=this._loader.getHashKey(i),a=this._get_next_model(this._prediction_array,o);a&&(n=a[Ne.COUNT],this._prediction_array=a[Ne.NEXT_MODEL],this._compute_prediction_from_model(i,e,n))}}},{key:"_get_next_model",value:function(t,e){if(e){var n=C.a.find(t,(function(t){return t.length>1&&t[Ne.WORD_HASH]===e}));return n&&n.length>Ne.NEXT_MODEL&&we()(n)?n:void 0}}},{key:"_get_word_index",value:function(t){return this.parsed_input.words.length-t}},{key:"_is_my_level",value:function(t){return 1===t}},{key:"_continueFn",value:function(){return!0}},{key:"_compute_next_words",value:function(t){var e=this._prediction_array;if(e&&e.length>0)for(var n=0;this.predictions.length1;n++)if(this._matches_partially(e[n])){var r=this._create_predictions(e[n],t);this._compute_next_multi_words(r)}}},{key:"_compute_next_multi_words",value:function(t){var e=this;C.a.each(t,(function(t){void 0!==t&&e.predictions.push(t)}))}},{key:"_get_word_hash",value:function(t){return this._loader.getMapHash(t[Ne.WORD_HASH])}},{key:"_matches_partially",value:function(t){if(this.parsed_input.isWholeWord)return!0;var e=this._loader.getMapHash(t[Ne.WORD_HASH]);if(!e)return!1;var n=e[De.WORD];return this.parsed_input.comparePartial(n)}},{key:"_create_predictions",value:function(t,e){return new on({loader:this._loader,model_item:t,total_count:e,parsed_input:this.parsed_input,continueFn:this._continueFn}).getMultiPredictions(void 0,void 0,void 0,this._source)}},{key:"_get_prediction_array",value:function(){return this.parsed_input.isPrevious&&this._word_model.length>1?this._word_model[1]:this._word_model[0]}},{key:"_loadInputModel",value:function(t,e){var n=this._findFileIndex(t);this._loader.loadModel(n,e)}},{key:"_findFileIndex",value:function(t){return this._loader.getModelFileNo(t)}},{key:"max_predictions",set:function(t){this.max_predictions=t},get:function(){return this._max_predictions}}]),t}(),sn=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:20;f()(this,t),k()(this,"_max_predictions",void 0),k()(this,"_loader",void 0),k()(this,"total_count",void 0),k()(this,"_callback",void 0),k()(this,"_source",void 0),k()(this,"prediction_merger",void 0),k()(this,"parsed_input",void 0),this._max_predictions=r,this._loader=n,this.total_count=this._loader.getTotalCount(),this._callback=e,this._source=Xe.GENERAL_PREDICTOR,this.prediction_merger=new He([],5*this.total_count)}return p()(t,[{key:"clear",value:function(){this.prediction_merger.clear(),this.parsed_input=void 0}},{key:"getPredictions",value:function(t){this._init(t),this._computePredictions(),this._onResultComputed()}},{key:"_computePredictions",value:function(){var t=this._getWordHashes();t&&this._addPredictions(t)}},{key:"_isWholeWordInput",value:function(){return this.parsed_input.isWholeWord}},{key:"_getWordHashes",value:function(){return this.parsed_input.isWholeWord?this._loader.top_words:this._loader.getHashes(this.parsed_input._partial)}},{key:"_init",value:function(t){this.prediction_merger=new He([],5*this.total_count),this.parsed_input=t}},{key:"_onResultComputed",value:function(){this._callback&&this._callback(new nn(this.predictions,this.parsed_input),this._loader)}},{key:"_addPredictions",value:function(t){if(t)for(var e=t.length,n=0;n2&&void 0!==arguments[2]?arguments[2]:20;f()(this,t),k()(this,"_loader",void 0),k()(this,"predictions",void 0),k()(this,"max_predictions",void 0),k()(this,"_callback",void 0),k()(this,"_parsed_input",void 0),k()(this,"_hamming_dist",void 0),this._loader=e,this.predictions=[],this.max_predictions=r,this._callback=n}return p()(t,[{key:"getCorrections",value:function(t){this._parsed_input=t,this.predictions=[],this._computePredictions();var e=this._loader.getHashes(this._parsed_input._partial);if(e)for(var n=e.length,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};t=this.fixContent(t),this.settings=n,this.content=t,this.code=C.a.get(this.settings,"language.code"),this.languageSetter=new bn(this.code,e,this.loadDb.bind(this)),this.languageSetter.setLanguage(gn.a),this.docCount=t.documentCount}},{key:"fixContent",value:function(t){return t.pipeline=t.pipeline||[],t.fieldVectors=t.fieldVectors||[],t.invertedIndex=t.invertedIndex||[],t}},{key:"loadDb",value:function(){this.processSyn(),this.registerFunctions(),this.db=gn.a.Index.load(this.content),C.a.isEmptyObject(this.content.pipeline)||this.languageSetter.replaceFn(this.db,gn.a)}},{key:"registerFunctions",value:function(){var t=this.replaceSynonymn.bind(this),e=this.addQuery.bind(this);gn.a.Pipeline.registerFunction(t,"replaceSynonymn"),gn.a.Pipeline.registerFunction(e,"addQuery")}},{key:"processSyn",value:function(){var t=this.settings&&this.settings.synonyms||{},e=new yn(t);this.settings.rootWords=e.rootWords,En.a.model.publish(En.a.consts("SYNONYMS"),e.synonymns)}},{key:"addQuery",value:function(t){var e=t.toString();return this.queryWords.push(e),this.queryWords=C.a.unique(this.queryWords),t}},{key:"replaceSynonymn",value:function(t){var e=this,n=t.toString(),r=this.settings&&this.settings.rootWords&&this.settings.rootWords[n];return r&&C.a.isString(r)&&r!==n?t.update((function(){return e.settings.rootWords[n]})):t}},{key:"addStopWords",value:function(t,e){if(e){var n=gn.a.generateStopWordFilter(e);t.pipeline.before(gn.a.stopWordFilter,n),t.pipeline.remove(gn.a.stopWordFilter)}}},{key:"search",value:function(t){var e=this;this.queryWords=[];var n,r=t.getParamsList(this.isStopWord.bind(this)),i=[];if(C.a.isNotMerge()){if(n=r.join(" ").trim()){var o=this.db.search(n);i=C.a.map(o,(function(t){return new Tn(t)}))}}else C.a.each(r,(function(t){if(!C.a.isEmptyString(t)&&(n=t.trim())){var r=e.db.search(n);i=i.concat(C.a.map(r,(function(t){var n=new Tn(t);return n.setdocRank(r.length,e.docCount),n})))}}));return t.opts?C.a.filter(i,(function(n){return e.match(n,t.opts)})):i}},{key:"match",value:function(t,e){var n=this,r=!0;if(e.andSearch){var i=t&&t.matchData.metadata||[];C.a.each(this.queryWords,(function(t){i[t]||n.isStopWord(t)||(r=!1)}))}return r}},{key:"isStopWord",value:function(t){return-1!==this.settings.stopWords.indexOf(t.toLowerCase())}},{key:"searchGlossary",value:function(t){var e=this,n=this.settings&&this.settings.glossary||{},r=this.getRootTokens(t);return C.a.reduce(n,(function(t,n,i){var o=e.getRootTokens(i);return r.length===o.length&&e.matchTokens(r,o)&&(t[i]=n),t}),{})}},{key:"matchTokens",value:function(t,e){var n=!0;return C.a.each(t,(function(t,r){t!==e[r]&&(n=!1)})),n}},{key:"getRootTokens",value:function(t){var e=this,n=gn.a.tokenizer(t);return C.a.map(n,(function(t){var n=t.toString();return e.settings.rootWords[n]||n}))}},{key:"export",value:function(){return this.db.toJSON()}}]),t}(),xn=n(883),wn=(n(439),n(440),function(){function t(e,n,r){f()(this,t),k()(this,"nextTexts",void 0),k()(this,"texts",void 0),k()(this,"filter",void 0),this.nextTexts=e,this.texts=n,this.filter=r||this.defaultFilter}return p()(t,[{key:"join",value:function(t,e,n){for(var r=[],i=e;i<=n;i++)this.texts[t][i]&&r.push(this.texts[t][i]);return r.join("").replace(/[\n ]+/g," ").replace(/\u00A0/gi," ")}},{key:"defaultFilter",value:function(){return!1}},{key:"getIndexText",value:function(t){return t.join(" ").replace(/\n/gi," ").trim()}},{key:"getText",value:function(){var t=this,e=[];return C.a.each(this.nextTexts,(function(n){t.filter(n[0])||e.push(t.join(n[0],n[1],n[2]))})),e.join("")}}]),t}()),Cn=function(){function t(e,n,r){f()(this,t),k()(this,"topicData",void 0),k()(this,"context",void 0),k()(this,"contextLimit",void 0),k()(this,"rightLimit",void 0),k()(this,"leftLimit",void 0),this.topicData=e,this.context=n,this.contextLimit=vn()(r),this.rightLimit=Math.ceil(70*this.contextLimit/100),this.leftLimit=Math.ceil(30*this.contextLimit/100)}return p()(t,[{key:"minDistance",value:function(){}},{key:"getSummary",value:function(t,e,n,r){var i=this,o=[],a="";this.context&&(a=this.topicData[t]&&(this.topicData[t].summary||"").substring(0,this.contextLimit));try{o=C.a.map(e,(function(t){return C.a.union(t,(function(t,e){if(t&&t.position&&t.position[0])return C.a.union(t.position,(function(t){if(void 0!==t[0]&&void 0!==t[1]){var o=r[e],a=(new wn).getIndexText(o),s=a.substring(t[0],t[0]+t[1]);return s=s.toLowerCase(),-1===n.indexOf(s)&&n.push(s),i.getSummaryText(a,t[0],t[1],s)}}));var o=r[e];return C.a.map(o,(function(t){return i.trimRight(t)}))}))})),this.context&&a&&""!==a||C.a.each(o[0]||[],(function(t){t.length>a.length&&(a=t)}))}catch(t){a=""}return""===a&&(a=this.getDefaultSummary(r)),a}},{key:"getDefaultSummary",value:function(t){var e="";try{var n="";C.a.each(t,(function(t,e){"id"!==e&&(n+=" ")})),e=this.getSummaryText(n,0,this.contextLimit||100,"")}catch(t){e=""}return e}},{key:"getSummaryText",value:function(t,e,n,r){var i=t.substring(0,e),o=t.substring(e+n);return"".concat(this.trimLeft(i),"").concat(r,"\n ").concat(this.trimRight(o))}},{key:"trimLeft",value:function(t){var e=t.indexOf(" ",t.length-this.leftLimit);return(t=t.substring(e,t.length)).trimStart()}},{key:"trimRight",value:function(t){var e=t.indexOf(" ",this.rightLimit);return e=-1===e?t.length:e,(t=t.substring(0,e)).trimEnd()}}]),t}(),On=n(21),An=function(){function t(e){f()(this,t),k()(this,"data",void 0),this.data=JSON.parse(e||"{}")}return p()(t,[{key:"getTopicData",value:function(t){return this.topicData[t]}},{key:"getTopicSummary",value:function(t){return this.topicData[t]&&this.topicData[t].summary}},{key:"getTopicNextId",value:function(t){return this.topicData[t]&&this.topicData[t].next}},{key:"settings",get:function(){return this.data.settings}},{key:"topicData",get:function(){return this.data.metadata}},{key:"context",get:function(){return this.settings.context}},{key:"contextLimit",get:function(){return this.settings.contextLimit}},{key:"fields",get:function(){return this.settings.fields}}]),t}(),Rn=n(461),Ln=n(19),Pn=n(15),In=function(){function t(e){f()(this,t),k()(this,"loader",void 0),k()(this,"metadataLoaded",void 0),k()(this,"dbLoaded",void 0),k()(this,"init",void 0),k()(this,"metadata",void 0),k()(this,"db",void 0),k()(this,"waiting",void 0),k()(this,"exactSearch",void 0),k()(this,"dbContent",void 0),k()(this,"query",void 0),k()(this,"text",void 0),k()(this,"seamaphore",void 0),k()(this,"topicCallback",void 0),k()(this,"opts",void 0),k()(this,"resultsCallback",void 0),k()(this,"results",void 0),k()(this,"glossaryResult",void 0),k()(this,"summaries",{}),k()(this,"dbDocCount",void 0),k()(this,"resultsMetadata",{}),this.loader=e,this.metadataLoaded=this.dbLoaded=!1}return p()(t,[{key:"initProcessor",value:function(){var t=this,e=On.a.subject;return this.loader.loadDB((function(n){t.initDB(n),t.loader.loadMetaData((function(n){t.initMetadata(n),e.next(!0)}))})),e}},{key:"initMetadata",value:function(t){this.metadataLoaded=!0,this.metadata=new An(t),!this.init&&this.dbContent&&(this.initDB(this.dbContent),this.dbContent=null),Ln.a.publish(Object(Pn.a)("KEY_SHOW_CONTEXT"),vn()(this.contextLimit)>0)}},{key:"initDB",value:function(t){this.metadataLoaded?(this.db=new kn(t,this.loader,this.metadata.settings),this.init=!0,this.waiting&&(this.waiting=!1,this.getResults())):this.dbContent=t}},{key:"topicsLoaded",value:function(){this.exactSearch&&this.filter()}},{key:"isNewQuery",value:function(t,e){if(!this.init)return!0;if(!this.metadata.settings)return!1;var n=this.buildQuery(t,e);return!this.query||!this.query.isEqual(n)}},{key:"search",value:function(t,e,n,r){this.text=t,this.dbDocCount=this.db.docCount,this.seamaphore=new je(this.topicsLoaded.bind(this)),this.topicCallback=n,this.opts=e,this.summaries={},this.resultsCallback=r,this.getResults()}},{key:"filter",value:function(){var t=this,e=this.query.exaxctTerms;this.results=C.a.filter(this.results,(function(n){var r=t.resultsMetadata[n.id].topicText;return t.matchesExact(e,r,n.id)})),this.resultsCallback(this.query.text,this.results,this.glossaryResult,this.dbDocCount),this.processSummary()}},{key:"processSummary",value:function(){var t=this;C.a.each(this.results,(function(e){var n=e.id;t.topicCallback(t.loader.getId(n),t.summaries[n],t.createUrl(n,t.query.exaxctTerms))}))}},{key:"matchesExact",value:function(t,e,n){var r=this,i=!1;return C.a.each(t,(function(t){var o=e.toLowerCase().indexOf(t);-1!==o&&(r.addSummary(n,e,o,t),i=!0)})),i}},{key:"addSummary",value:function(t,e,n,r){var i=this.metadata.getTopicSummary(t);if(this.metadata.context&&i)this.summaries[t]=i;else{var o=new Cn(this.metadata.topicData,this.metadata.context,this.metadata.contextLimit);this.summaries[t]=o.getSummaryText(e,n,r.length,r)}}},{key:"getResults",value:function(){this.init?(this.query=this.buildQuery(this.text,C.a.extend(this.opts,{searchSubstrings:this.searchSubstrings})),this.exactSearch=this.query.exactMatch,this.glossaryResult=this.searchGlossary(),this.results=this.process(),this.needsCorrection&&this.doCorrection(),this.exactSearch&&0!==this.results.length||this.resultsCallback(this.query.text,this.results,this.glossaryResult,this.dbDocCount)):this.waiting=!0}},{key:"doCorrection",value:function(){this.query=this.buildQuery(this.query.text,C.a.extend(this.opts,{fuzzy:!0})),this.results=this.process()}},{key:"searchGlossary",value:function(){return this.processGlossary()}},{key:"buildQuery",value:function(t,e){return new xn.a(t,this.metadata.settings,e)}},{key:"process",value:function(){var t=this;this.resultsMetadata={};var e=this.db.search(this.query);return this.seamaphore.wait(e.length),C.a.each(e,(function(e){var n=t.metadata.getTopicData(e.ref);t.resultsMetadata[e.ref]?C.a.extend(t.resultsMetadata[e.ref],e.matchData.metadata):t.resultsMetadata[e.ref]=e.matchData.metadata,t.loader.loadTextData(t.query,e.ref,t.processTopicData.bind(t)),e.setTopicData(n),C.a.extend(e,n),e.id=e.ref,e.setRef(t.loader.getId(e.ref))})),e}},{key:"processGlossary",value:function(){return this.db.searchGlossary(this.text)}},{key:"processTopicData",value:function(t,e,n){if(this.query.isEqual(t)){var r=this.resultsMetadata[e];if(r){var i=[],o=new Cn(this.metadata.topicData,this.metadata.context,this.metadata.contextLimit).getSummary(e,r,i,n);o=o.replace(/\t+/gi," ").trim(),this.resultsMetadata[e].topicText=this.createText(e,n),this.exactSearch||this.topicCallback(this.getId(e),o,this.createUrl(e,i))}this.seamaphore.signal()}}},{key:"createText",value:function(t,e){var n=this.metadata.getTopicNextId(t);return new wn(n,e,this.filterId.bind(this)).getText()}},{key:"filterId",value:function(t){var e=this.metadata.fields[t];return this.filterItem(e)}},{key:"filterItem",value:function(t){var e=this.metadata.fields,n=new Rn.a(e,this.opts.origin,this.opts);return t&&n.filter(t)}},{key:"getId",value:function(t){return this.loader.getId(t)}},{key:"createUrl",value:function(t,e){var n=this.metadata.getTopicData(t),r=k()({},At.a.URL_PARAMS.RHHIGHLIGHT,this.searchSubstrings?this.query.originalText:this.exactSearch?'"'+e[0]+'"':(e||[]).join(" "));if(n){var i="?"+C.a.mapToEncodedString(r);return"".concat(this.loader.getUrl(n.relUrl)).concat(i)}}},{key:"path",get:function(){return this.loader.getPath()||"./"}},{key:"searchSubstrings",get:function(){return C.a.get(this.metadata.settings,"searchsubstrings")}},{key:"contextLimit",get:function(){var t=Ve()(this.metadata.contextLimit);return dn()(t)?100:t}},{key:"needsCorrection",get:function(){return 0===this.results.length&&this.metadata.settings.fuzzy&&!this.query.exactMatch}}]),t}(),Dn=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";f()(this,t),k()(this,"_paths",void 0),k()(this,"id",void 0),this._paths=new Ze(e)}return p()(t,[{key:"getPath",value:function(){return this._paths.getPath()}},{key:"init",value:function(t,e){return this.id=t,e(this)}},{key:"loadDB",value:function(t){var e=this._paths.getSearchDbFilePath();C.a.loadScript(e,!0,(function(){var e=C.a.exports();t&&t(e)}),!0)}},{key:"getId",value:function(t){return"".concat(this._paths._path).concat(this.id,"_").concat(t)}},{key:"getUrl",value:function(t){return this._paths._getRelativePath(t)}},{key:"loadMetaData",value:function(t){var e=this._paths.getMetadataFilePath();C.a.loadScript(e,!0,(function(){var e=C.a.exports();t&&t(e)}),!0)}},{key:"loadTextData",value:function(t,e,n){var r=this._paths.getTextFilePath(e);C.a.loadScript(r,!0,(function(){var r=C.a.exports();n&&n(t,e,r)}),!0)}}]),t}(),Nn=function(){function t(e,n){f()(this,t),k()(this,"_items",void 0),k()(this,"_max_items",void 0),this._items=e,this._max_items=n||I.a.model.get(I.a.consts("MAX_SEARCH_RESULTS"))||20}return p()(t,[{key:"append",value:function(t){this._items=this._items.concat(t)}},{key:"mergeAll",value:function(){var t=this._items;return this.clear(),this.merge(t,!0)}},{key:"merge",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return C.a.each(t,(function(t){e.mergeItem(t,n)})),this._sort(),this._purge()}},{key:"clear",value:function(){this._items=[]}},{key:"_purge",value:function(){return this._items.length>this._max_items?this._items.splice(this._max_items):[]}},{key:"mergeItem",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.find_item(t,e);n?n.merge(t):this._items.push(t)}},{key:"find_item",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?C.a.find(this._items,(function(e){return e.matchDoc(t)})):C.a.find(this._items,(function(e){return e.match(t)}))}},{key:"merge_item",value:function(t,e){t.probability+=e.probability,t.count=Math.max(t.count,e.count)}},{key:"_sort",value:function(){this.items.sort(this.compare_items)}},{key:"compare_items",value:function(t,e){return t.compare(e)}},{key:"items",get:function(){return this._items}}]),t}(),Fn=I.a.consts,Mn=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;f()(this,t),k()(this,"initDone",void 0),k()(this,"max_results",void 0),k()(this,"queryProcessors",void 0),k()(this,"merger",void 0),k()(this,"_resutSeamaphore",void 0),k()(this,"text",void 0),k()(this,"totalDocCount",void 0),k()(this,"glossaryResult",void 0),k()(this,"matchedTokens",void 0),this.initDone=!1,this.max_results=e,this.queryProcessors=[],this.merger=new Nn([]),this._resutSeamaphore=new je(this.onResultComplete.bind(this)),this.glossaryResult={term:"",desc:""}}return p()(t,[{key:"checkInit",value:function(){var t=this;if(this.initDone)return On.a.of(!0);var e=this._createLoaders();return On.a.allMap(e,(function(e,n){return e.init(n,t.addProcessors.bind(t))})).map((function(){return t.initDone=!0,On.a.of(!0)}))}},{key:"addProcessors",value:function(t){var e=this,n=new In(t);return n.initProcessor().map((function(){e.queryProcessors.push(n)}))}},{key:"_createLoaders",value:function(){return C.a.map(this.projectPaths,(function(t){return new Dn(t)}))}},{key:"showSearchResults",value:function(t){var e=this;this.checkInit().subscribe((function(){e.glossaryResult={term:"",desc:""},e.merger=new Nn([]),e.totalDocCount=0,e.matchedTokens={},e._resutSeamaphore=new je(e.onResultComplete.bind(e)),e._resutSeamaphore.wait(e.processorCount),C.a.each(e.queryProcessors,(function(n){n.search(t,e.searchOpts(n.path),e.topicCallback.bind(e),e.onSearchResults.bind(e))}))}))}},{key:"onSearchResults",value:function(t,e,n,r){this.processTopicsResults(t,e,r),this.processGlossaryResults(t,n),this._resutSeamaphore.signal()}},{key:"calculateFranks",value:function(){var t=this;C.a.each(this.merger.items,(function(e){return e.setfRanking(Sn.idf(t.matchedTokens[C.a.first(C.a.keys(e.metadata))],t.totalDocCount))}));var e=this.merger.mergeAll();I.a.model.subscribeOnce(I.a.consts("CLEAR_REDUNDANT_RESULTS"),(function(){return t.clearReduntItems(e)}))}},{key:"onResultComplete",value:function(){C.a.isNotMerge()||this.calculateFranks(),I.a.model.publish(Fn("KEY_SEARCH_RESULTS"),this.merger.items),I.a.model.publish(Fn("KEY_GLOSSARY_RESULT_TERM"),this.glossaryResult.term),I.a.model.publish(Fn("KEY_GLOSSARY_RESULT"),this.glossaryResult.desc)}},{key:"searchOpts",value:function(t){return{andSearch:"1"===I.a.model.get(I.a.consts("KEY_AND_SEARCH")),cbt:I.a.model.cget("SELECTED_TAGS"),filterData:I.a.model.cget("KEY_FILTER_DATA"),origin:P.a.makeFullPath(t,P.a.filePath(C.a.getUrl()))}}},{key:"topicCallback",value:function(t,e,n){I.a.model.publish(".p.searchsummary".concat(t),e),I.a.model.publish(".p.searchurl".concat(t),n)}},{key:"processGlossaryResults",value:function(t,e){var n=e&&hn()(e)[0];n&&(this.glossaryResult={term:n,desc:e[n]})}},{key:"clearReduntItems",value:function(t){var e=["strSummary","strUrl"];C.a.each(t,(function(t){return C.a.each(e,(function(e){return I.a.model.publish(C.a.get(t,e))}))}))}},{key:"processTopicsResults",value:function(t,e,n){var r=this;if(this.text=t,C.a.isNotMerge()){this.merger.append(e);var i=this.merger._purge();I.a.model.subscribeOnce(I.a.consts("CLEAR_REDUNDANT_RESULTS"),(function(){return r.clearReduntItems(i)}))}else this.totalDocCount=this.totalDocCount+n,C.a.each(e,(function(t){C.a.each(C.a.keys(t.metadata),(function(t){return r.matchedTokens[t]?r.matchedTokens[t]++:r.matchedTokens[t]=1}))})),this.merger.append(e)}},{key:"projectPaths",get:function(){return I.a.model.get(I.a.consts("KEY_PROJECT_LIST"))}},{key:"processorCount",get:function(){return this.queryProcessors.length}}]),t}(),Hn=n(273),Un=function(){function t(){var e=this;f()(this,t),k()(this,"handle_key_hash",void 0),k()(this,"selectedTerm",void 0),k()(this,"results",void 0),k()(this,"predicton_merger",void 0),k()(this,"search_handler",void 0),k()(this,"parsed_input",void 0),k()(this,"_previous_input",void 0),k()(this,"history_reader",void 0),k()(this,"_resutSeamaphore",void 0),k()(this,"_predictors",void 0),k()(this,"_correctors",void 0),k()(this,"_previous_predictors",void 0),k()(this,"_computing_correction",void 0),this._predictors=[],this._correctors=[],this._previous_predictors=[],this.predicton_merger=new He([]),this.history_reader=new Be,I.a.model.subscribe(I.a.consts("KEY_PROJECT_LIST"),(function(){return e.init()})),this.search_handler=new Mn,this.handle_key_hash={up:this.handleArrowKey.bind(this),down:this.handleArrowKey.bind(this),backspace:this.handleBackSpace.bind(this),return:this.handleReturn.bind(this),default:this.handleDefault.bind(this),escape:this.handleEscape.bind(this),right:this.handleRight.bind(this)}}return p()(t,[{key:"init",value:function(){var t=I.a.storage.fetch(I.a.consts("PREV_SEARCH_KEY"));this.history_reader.initHistory(t),this.create_predictors(),I.a.model.subscribe(I.a.consts("EVT_SEARCH_TERM"),this.search.bind(this))}},{key:"search",value:function(){var t=I.a.model.get(I.a.consts("KEY_SEARCH_TERM"))||"";t&&(Hn.a.doSearch()||this.search_handler.showSearchResults(t))}},{key:"create_predictors",value:function(){this._predictors=[],new cn(this.history_reader,this.processResult.bind(this)).createPredictors(this.addPredictor.bind(this),this.addPrevPredictor.bind(this),this.addCorrector.bind(this))}},{key:"addPredictor",value:function(t){this._predictors.push(t)}},{key:"addPrevPredictor",value:function(t){this._previous_predictors.push(t)}},{key:"addCorrector",value:function(t){this._correctors.push(t)}},{key:"processResult",value:function(t,e){if(t.isForInput(this.parsed_input,this._previous_input)){if(!t.isEmpty()){this.predicton_merger.merge(t.predictions);var n=new Ke(e);this.predictions=n.computeCounts(this.predictions,this.parsed_input)}this._resutSeamaphore.signal()}}},{key:"handleKey",value:function(t){var e=t.keyCode,n={keyCode:e,selStart:t.target.selectionStart,text:t.target.value};this._isMovementKey(e)||this._resetMovement();var r=C.a.getKeyIndex(e);if(void 0===r)return!0;var i=this.handle_key_hash[r];return i?i(n):void 0}},{key:"_isMovementKey",value:function(t){return[38,39,40].indexOf(t)>=0}},{key:"_resetMovement",value:function(){this.selectedTerm=void 0,I.a.model.publish(I.a.consts("SELECTED_PREDICTION"),void 0)}},{key:"handleArrowKey",value:function(t){var e=this.selectedTerm,n=40===t.keyCode,r=this.getPredictionsLength();r>0&&(this.selectedTerm=e||0==e?this.getNextSuggestionIndex(e,r,n):this.getFirstSuggestionIndex(r,n)),I.a.model.publish(I.a.consts("SELECTED_PREDICTION"),this.selectedTerm);var i=C.a.get(this.results[this.selectedTerm],"term");I.a.model.publish(I.a.consts("KEY_SEARCH_TERM"),i)}},{key:"handleRight",value:function(t){return this._isHandlingCursorMove()?(Me.shouldAppendSpace(t)&&(t.text+=" ",t.selStart+=1,I.a.model.publish(I.a.consts("KEY_SEARCH_TERM"),t.text)),this._resetMovement(),this.handleShowSuggestion(t),!1):(this._resetMovement(),this.handleShowSuggestion(t))}},{key:"handleEscape",value:function(){this.closeSuggestions()}},{key:"handleBackSpace",value:function(t){return this.handleShowSuggestion(t)}},{key:"handleDefault",value:function(t){if(""===t.text)this.closeSuggestions();else{var e=(t.text||"").substr(0,t.selStart);t.text=e,this.showSuggestions(t)}}},{key:"handleShowSuggestion",value:function(t){""===t.text||!1===Me.shouldShowSuggestion(t)?this.closeSuggestions():this.showSuggestions(t)}},{key:"showSuggestions",value:function(t){this._initSuggestions(t),this._calculateSugguestions()}},{key:"_initSuggestions",value:function(t){this._initResult(),this._initInputs(t),this._resutSeamaphore=new je(this.onResultComplete.bind(this))}},{key:"_initResult",value:function(){this.predicton_merger&&this.predicton_merger.clear(),this.selectedTerm=void 0,I.a.model.publish(I.a.consts("SELECTED_PREDICTION"),void 0),this._previous_input=void 0,this._computing_correction=!1}},{key:"_initInputs",value:function(t){this.parsed_input=new Ue(t.text,!1,t.selStart,!1),Me.isPrevious(t)&&(this._previous_input=new Ue(t.text,!1,t.selStart,!0))}},{key:"_calculateSugguestions",value:function(){var t=this;this._resutSeamaphore.wait(this._predictorCount()),C.a.each(this._predictors,(function(e){e.getPredictions(t.parsed_input)})),this._previous_input&&C.a.each(this._previous_predictors,(function(e){return e.getPredictions(t._previous_input)}))}},{key:"closeSuggestions",value:function(){this._clearResult(),this.selectedTerm=void 0,I.a.model.publish(I.a.consts("SELECTED_PREDICTION"),void 0),I.a.model.publish(I.a.consts("SEARCH_RESULTS_KEY"),[])}},{key:"_clearResult",value:function(){this._resetMovement(),this._previous_input=void 0,this.parsed_input=void 0,this._resutSeamaphore=void 0,this._clearPredictors()}},{key:"_isHandlingCursorMove",value:function(){return void 0!==I.a.model.get(I.a.consts("SELECTED_PREDICTION"))}},{key:"getPredictionsLength",value:function(){return this.results=I.a.model.get(I.a.consts("SEARCH_RESULTS_KEY")),this.results?this.results.length:0}},{key:"getFirstSuggestionIndex",value:function(t,e){return e?0:t-1}},{key:"getNextSuggestionIndex",value:function(t,e,n){return t=((t=t||0)+(n?1:e-1))%e}},{key:"_clearPredictors",value:function(){C.a.each(this._predictors,(function(t){return t.clear()})),C.a.each(this._previous_predictors,(function(t){return t.clear()})),C.a.each(this._correctors,(function(t){return t.clear()}))}},{key:"handleReturn",value:function(t){this.triggerSearch(t.text)}},{key:"updateUrl",value:function(t){var e=At.a.URL_PARAMS.SEARCH,n=P.a.params();C.a.extend(n,k()({},At.a.URL_PARAMS.SEARCH,t));var r=C.a.isEmpty(t)?P.a.removeParam(C.a.getUrl(),e):P.a.updateUrlParams(encodeURI(C.a.getUrl()),n);window.history.pushState(null,"",r)}},{key:"_predictorCount",value:function(){var t=this._predictors.length;return this._previous_input&&(t+=this._previous_predictors.length),t}},{key:"triggerSearch",value:function(t){this._addToHistory(t),this.closeSuggestions(),I.a.model.publish(I.a.consts("KEY_SEARCH_TERM"),t),I.a.model.publish(I.a.consts("EVT_SEARCH_TERM"),!0),this.updateUrl(t)}},{key:"_addToHistory",value:function(t){t&&""!==t&&this.history_reader.add({text:t.trim(),count:10})}},{key:"needCorrection",value:function(){return!this._computing_correction&&0===this.predictions.length&&""!==this.parsed_input.trimmedText}},{key:"onResultComplete",value:function(){this.needCorrection()?this.doCorrection():(this.predictions.splice(5),I.a.model.publish(I.a.consts("SEARCH_RESULTS_KEY"),this.predictions),this._clearResult())}},{key:"doCorrection",value:function(){var t=this;this._computing_correction=!0,this._resutSeamaphore=new je(this.onResultComplete.bind(this)),this._resutSeamaphore.wait(this._correctors.length),C.a.each(this._correctors,(function(e){return e.getCorrections(t.parsed_input)}))}},{key:"predictions",get:function(){return this.predicton_merger.items},set:function(t){this.predicton_merger=new He(t)}}]),t}(),jn=function t(e,n){f()(this,t),k()(this,"nStart",void 0),k()(this,"nEnd",void 0),this.nStart=e,this.nEnd=n},Bn=function(){function t(e,n,r){f()(this,t),k()(this,"node",void 0),k()(this,"nFrom",void 0),k()(this,"aClosedRanges",void 0),k()(this,"sReplaceStringsSrc",void 0),k()(this,"sReplaceStringsDst",void 0),k()(this,"pos",void 0),this.node=e,this.nFrom=n,this.pos=r,this.sReplaceStringsSrc=[],this.sReplaceStringsDst=[],this.aClosedRanges=[],this.sReplaceStringsSrc[0]="&",this.sReplaceStringsSrc[1]=">",this.sReplaceStringsSrc[2]="<",this.sReplaceStringsSrc[3]=""",this.sReplaceStringsSrc[4]=String.fromCharCode(8364),this.sReplaceStringsSrc[5]=" ",this.sReplaceStringsDst[0]="&",this.sReplaceStringsDst[1]=">",this.sReplaceStringsDst[2]="<",this.sReplaceStringsDst[3]='"',this.sReplaceStringsDst[4]=String.fromCharCode(128),this.sReplaceStringsDst[5]=" "}return p()(t,[{key:"getClosedRanges",value:function(t,e){for(var n=this.nFrom+C.a.get(this.node,"data").length,r=e;r=this.nFrom&&this.aClosedRanges.push(new jn(t[r].nStart>this.nFrom?t[r].nStart:this.nFrom,t[r].nEndn)return r;return r}},{key:"isValidParentForSpan",value:function(t){if(!t)return!1;var e=t.tagName.toLowerCase();return null=="applet object iframe embed table thead tfoot tbody tr ul ol script".match("\\b"+e+"\\b")}},{key:"doHighlight",value:function(t,e){I.a.model.publish(I.a.consts("TOPIC_HIGHLIGHTED"),!0);var n='";if(e>=t.length)return e;var r=this.getClosedRanges(t,e);if(C.a.isEmpty(this.aClosedRanges))return r;if(!this.isValidParentForSpan(this.node.parentNode))return r;var i=C.a.get(this.node,"data");i=i.replace(/[\n\r\t]/g," ");for(var o="",a=0,s=0;s",a=this.aClosedRanges[s].nEnd-this.nFrom;o+=this._textToHtml_nonbsp(i.substr(a));var u=document.createElement("span");if(u.setAttribute("data-highlight-container","true"),u.innerHTML=o,this.node.parentNode.replaceChild(u,this.node),-1==this.pos.gnYPos){var c=u,l=0;if(c.offsetParent)for(;c.offsetParent;)l+=c.offsetTop,c=c.offsetParent;else C.a.get(c,"y")&&(l+=C.a.get(c,"y"));this.pos.gnYPos=l}return this.showHighlightedElement(u),r}},{key:"_textToHtml_nonbsp",value:function(t){if(null==t)return null;for(var e=t,n=0;n-1;)if(null!=(a=i.exec(u))&&a.index>-1){var c=a[0];for(var l in n){new RegExp(l,"i").test(c)&&(n[l]=1)}this.aRanges[this.aRanges.length]=new jn(r[o].nCharLocation+s+a.index,r[o].nCharLocation+s+a.index+c.length),s=s+a.index+c.length,u=u.substring(a.index+c.length,u.length)}this.calculateMatchLength(n)}}}},{key:"dolSegment",value:function(t){var e=t.length,n=0,r=1,i="",o=new Array;for(n+=this._getLengthOfWordBreak(t,n);n?/{}[]|+-=…’“”•–—™©®·".indexOf(t)>=0}},{key:"_getNormalizedWord",value:function(t){return t.toLowerCase()}},{key:"_getWord",value:function(t,e){var n=this._getLengthOfWord(t,e);return t.substr(e,n)}},{key:"_getLengthOfWord",value:function(t,e){for(var n=e,r=t.length;n=0}},{key:"highlightNodes",value:function(){for(var t=0,e=0;e51&&window.scrollTo(0,this.pos.gnYPos-50)}},{key:"isSubstrSearchEnabled",get:function(){return Yn||Ln.a.get(Object(Pn.a)("KEY_SUBSTR_SEARCH"))||!1}}]),t}();function Gn(t){if(void 0===Re.a||null==t[Oe.a]){if(we()(t)||(t=function(t,e){if(!t)return;if("string"==typeof t)return Vn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Pe()(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vn(t,e)}(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=ke()(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function Vn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0}},{key:"handleKey",value:function(t){var e=t&&t.event;this.element=t&&t.component,this.searchController.handleKey(e)}},{key:"handleSelection",value:function(t){var e=I.a.model.get(I.a.consts("SEARCH_RESULTS_KEY"));if(this.model.predictions=C.a.map(e,(function(t){return t.term})),void 0!==t&&this.element){var n=C.a.get(this.element.predictionElement.children,t);this.setStyling(this.element,n),this.model.text=C.a.get(n,"textContent")}this.widget.setState({model:this.model})}},{key:"setStyling",value:function(t,e){var n=this;C.a.map(t.predictionElement.children,(function(t){return t.classList.remove(n.model.predictionSelectedClass)})),e&&e.classList.add(this.model.predictionSelectedClass)}},{key:"initModel",value:function(){this.model=new $n,this.model.search_suggestions=[]}},{key:"initWidget",value:function(){var t=this;this.rhsubscribe(I.a.consts("SELECTED_PREDICTION"),this.handleSelection.bind(this)),this.rhsubscribe(I.a.consts("SEARCH_HIDE"),this.showSearch.bind(this,!1)),this.rhsubscribe(I.a.consts("SHOW_SEARCH"),this.showSearch.bind(this,!0)),this.rhsubscribe(I.a.consts("EVT_PROJ_SEARCH"),this.doSearch.bind(this));var e=At.a.URL_PARAMS.SEARCH,n=P.a.params()[e];this.model.search_suggestions=[],this.model.text=n,this.isToolBarSearch=I.a.model.get(I.a.consts("KEY_TOOLBAR_SEARCH")),n&&(I.a.model.get(I.a.consts("KEY_TRIGGER_SEARCH_ON_INIT"))&&this.searchController.triggerSearch(n),I.a.model.publish(I.a.consts("KEY_TRIGGER_SEARCH_ON_INIT"),!1),this.widget.setState({model:this.model})),setTimeout((function(){return t.applyHighlight()}),500)}},{key:"applyHighlight",value:function(){!I.a.model.get(I.a.consts("HIGHLIGHT_DONE"))&&this.startHighLightSearch()}},{key:"startHighLightSearch",value:function(){var t=this,e=this.getHighlightTextFromURL();e.length>0&&(C.a.each(e,(function(e){e.startsWith('"')&&e.endsWith('"')&&(t.gbPhraseTerm=!0,e=e.substring(1,e.length-1)),t.findSearchTerms(e)})),this.highlightDocument(),I.a.model.publish(I.a.consts("HIGHLIGHT_DONE"),!0))}},{key:"eqSet",value:function(t,e){if(t.size!==e.size)return!1;var n,r=Gn(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(!e.has(i))return!1}}catch(t){r.e(t)}finally{r.f()}return!0}},{key:"highlightDocument",value:function(){if(document.body){var t=[];this.aLongestNodes=[],this.aLongestlength=0;var e=document.getElementById("rh-topic");e||(e=document.body),this.doHighLightDomElement(t,e),this.processSuspendNodes(t)}}},{key:"getHighlightTextFromURL",value:function(){var t=At.a.URL_PARAMS.RHHIGHLIGHT,e=P.a.params()[t];return e&&C.a.startsWith(e,'"')&&C.a.endsWith(e.substring(1),'"')?[e]:e?C.a.compact(e.split(" ")):[]}},{key:"getSynonymsFromURL",value:function(){var t=At.a.URL_PARAMS.RHSYNSTR,e=P.a.params()[t];return e?e.split(" "):[]}},{key:"findSearchTerms",value:function(t){t.length>0&&(this.gaSearchTerms.push(t),this.gaSearchTermType.push(1))}},{key:"isFormElement",value:function(t){switch(t.tagName){case"INPUT":case"SELECT":case"OPTION":case"TEXTAREA":case"BUTTON":case"DATALIST":case"KEYGEN":case"OUTPUT":return!0;default:return!1}}},{key:"doHighLightDomElement",value:function(t,e){var n=this,r=e.childNodes;if(r){r.length;C.a.each(r,(function(e){e&&!n.isFormElement(e)&&1==e.nodeType?(n.doesTagRecursiveProcess(e)&&(C.a.isEmpty(t)||(n.processSuspendNodes(t),t.length=0)),n.doHighLightDomElement(t,e)):e&&3==e.nodeType&&t.push(e)}))}}},{key:"doesTagRecursiveProcess",value:function(t){if(!t)return!1;var e="\\b"+t.tagName.toLowerCase()+"\\b";return null!=qn.match(e)}},{key:"processSuspendNodes",value:function(t){if(0==t.length)return!1;for(var e=new Kn(this.gaSearchTerms,this.gbPhraseTerm,this.pos),n=0;nthis.aLongestlength){this.aLongestlength=e.nMatch,this.aLongestNodes.length=0,this.pos.gnYPos=-1;n=0;for(var i=e.aRanges.length;n0?this.model.extraClass="RH-LAYOUT-HOMEPAGE-SEARCHBOX-search-on-going":this.model.extraClass=""}},{key:"removeOnsearchClass",value:function(){this.searchBarElement.classList.remove(this.model.onSearchClass)}},{key:"addOnSearchClass",value:function(){this.searchBarElement.classList.add(this.model.onSearchClass)}},{key:"shouldApplySearchClass",value:function(t){return t&&t.length>0}},{key:"searchBarElement",get:function(){return C.a.first(document.getElementsByClassName("RH-LAYOUT-HOMEPAGE-SEARCHBOX-inner-box"))}}]),r}(Qn),tr=n(129);function er(){if("undefined"==typeof Reflect||!i.a)return!1;if(i.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(i()(Date,[],(function(){}))),!0}catch(t){return!1}}var nr=function t(){f()(this,t),k()(this,"title",void 0),k()(this,"searchBarClass",At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE),k()(this,"searchClass",""),k()(this,"hideTitle",!1),k()(this,"logodivExtraClass","")},rr=function(){I.a.brdcrmbManager.clear();var t=decodeURI(I.a.consts("HOME_FILEPATH")||"index.htm"),e=P.a.params(),n={area:e.area,project:e.project,type:e.type};C.a.setUrl(P.a.createUrl({baseUrl:P.a.makePath(C.a.getMasterHostFolder(),t),params:n}))},ir=function(){var t=C.a.getMasterHostFolder();I.a.brdcrmbManager.clear();var e=decodeURI(I.a.consts("DEFAULT_TOPIC")||"index.htm");if("rhpj"===P.a.ext(e)){var n=P.a.appendPath(t,"".concat(At.a.FOLDER.MERGED_PROJECT,"/").concat(P.a.fileNameNoExt(e),"/"));tr.a.loadProjectSettings(n).subscribe((function(){e=decodeURI(I.a.consts("DEFAULT_TOPIC")||"index.htm"),C.a.setUrl(P.a.updateUrlParams(P.a.makePath(n,e),P.a.params()),!1)}))}C.a.setUrl(P.a.updateUrlParams(P.a.makePath(t,e),P.a.params()),!1)};I.a._.goToDefaultTopic=ir;var or=function(t){S()(r,t);var e,n=(e=r,function(){var t,n=b()(e);if(er()){var r=b()(this).constructor;t=i()(n,arguments,r)}else t=n.apply(this,arguments);return y()(this,t)});function r(){return f()(this,r),n.apply(this,arguments)}return p()(r,[{key:"registerCommands",value:function(){var t=this;this.subscribe({key:"search-clicked",next:function(){return t.showSearch()}}),this.subscribe({key:"homePageClicked",next:function(){return rr()}})}},{key:"initModel",value:function(){this.model=new nr}},{key:"initWidget",value:function(){var t=this;this.rhsubscribe(I.a.consts("EVT_GO_TO_HOME"),(function(){return rr()})),this.rhsubscribe(I.a.consts("SEARCH_HIDE"),this.closeSearch.bind(this)),this.rhsubscribe(I.a.consts("KEY_SEARCH_RESULTS"),(function(){return t.showSearch()})),this.model.title=I.a.model.get(I.a.consts("KEY_HEADER_TITLE")),this.widget.setState({model:this.model})}},{key:"showSearch",value:function(){this.model.searchBarClass="",I.a.model.get(I.a.consts("KEY_TOOLBAR_SEARCH"))||I.a.model.get(I.a.consts("IS_HOMEPAGE"))?this.model.logodivExtraClass="":(this.model.hideTitle=!0,"KEY_SCREEN_PHONE"===I.a.model.get(I.a.consts("KEY_SCREEN_FRAMELESS"))&&(this.model.logodivExtraClass=At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE)),this.widget.setState({model:this.model})}},{key:"closeSearch",value:function(){this.model.hideTitle=!1,this.model.logodivExtraClass="",this.model.searchBarClass=At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE,this.widget.setState({model:this.model})}}]),r}(Ie.a);function ar(){if("undefined"==typeof Reflect||!i.a)return!1;if(i.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(i()(Date,[],(function(){}))),!0}catch(t){return!1}}var sr="RH-LAYOUT-TOOLBAR-panel-hide",ur=function t(){f()(this,t),k()(this,"customButton_0",[At.a.CSS_DEFAULT_CLASSES.TOOL_BAR_SPAN_CLASS]),k()(this,"customButton_1",[At.a.CSS_DEFAULT_CLASSES.TOOL_BAR_SPAN_CLASS]),k()(this,"customButton_2",[At.a.CSS_DEFAULT_CLASSES.TOOL_BAR_SPAN_CLASS]),k()(this,"customButton_3",[At.a.CSS_DEFAULT_CLASSES.TOOL_BAR_SPAN_CLASS]),k()(this,"customButton_4",[At.a.CSS_DEFAULT_CLASSES.TOOL_BAR_SPAN_CLASS]),k()(this,"customButton_5",[At.a.CSS_DEFAULT_CLASSES.TOOL_BAR_SPAN_CLASS]),k()(this,"customButton_6",[At.a.CSS_DEFAULT_CLASSES.TOOL_BAR_SPAN_CLASS]),k()(this,"customButton_7",[At.a.CSS_DEFAULT_CLASSES.TOOL_BAR_SPAN_CLASS]),k()(this,"customButton_8",[At.a.CSS_DEFAULT_CLASSES.TOOL_BAR_SPAN_CLASS]),k()(this,"tocTogglerClasses",["rh-button",sr]),k()(this,"darkThemeLabel","Dark"),k()(this,"showLabels",void 0),k()(this,"disabled",void 0),k()(this,"bmrkSelect",void 0),k()(this,"showBmrkSelect",void 0),k()(this,"showFav",void 0),k()(this,"showPdf",void 0),k()(this,"showFilter",void 0),k()(this,"showSearchIcon",void 0),k()(this,"searchExtraClass",void 0)},cr=function(t){S()(r,t);var e,n=(e=r,function(){var t,n=b()(e);if(ar()){var r=b()(this).constructor;t=i()(n,arguments,r)}else t=n.apply(this,arguments);return y()(this,t)});function r(t,e){var i;return f()(this,r),i=n.call(this,t,e),k()(m()(i),"filterMode",void 0),k()(m()(i),"isFilterCreated",void 0),k()(m()(i),"bmrkSelected",void 0),k()(m()(i),"favMode",void 0),k()(m()(i),"isFavCreated",void 0),k()(m()(i),"expand",void 0),k()(m()(i),"pdfMode",void 0),k()(m()(i),"shareMode",void 0),k()(m()(i),"activeTabId",void 0),k()(m()(i),"previousTabId",void 0),k()(m()(i),"widgetOpenMode",void 0),k()(m()(i),"tocOpen",void 0),k()(m()(i),"doSearch",void 0),k()(m()(i),"activeScreen",void 0),k()(m()(i),"topicNode",void 0),k()(m()(i),"toolbarNode",void 0),k()(m()(i),"mainLayoutNode",void 0),k()(m()(i),"rightPanelNode",void 0),k()(m()(i),"centerPanelNode",void 0),i.topicNode=document.getElementById("rh-topic"),i.mainLayoutNode=document.getElementById("rh-layout-main"),i.toolbarNode=document.getElementById("rh-toolbar"),i.rightPanelNode=document.getElementById("rh-rightpanel"),i.centerPanelNode=document.querySelector(".RH-LAYOUT-CENTERPANEL-container"),i.handleLayoutBody=i.handleLayoutBody.bind(m()(i)),i.saveTopic=i.saveTopic.bind(m()(i)),i.toggleExpandCollapse=i.toggleExpandCollapse.bind(m()(i)),i.applyFilter=i.applyFilter.bind(m()(i)),i.selectBmark=i.selectBmark.bind(m()(i)),i.downloadPDF=i.downloadPDF.bind(m()(i)),i}return p()(r,[{key:"registerCommands",value:function(){var t=this;this.subscribe({key:"tabChange",next:function(e){return t.handleTabChange(e)}}),this.subscribe({key:"handleTOC",next:this.handleTOC.bind(this)}),this.subscribe({key:"TOOL_BAR_UNSELECT_EVT",next:this.handleUnselect.bind(this)}),this.subscribe({key:"WIDGET_CLOSED",next:function(){t.widgetOpenMode=!1}}),this.subscribe({key:"PRINT",next:function(){return t.printPdf()}}),this.subscribe({key:"CLOSE_TOC_MOBILE",next:this.onCloseTocMobile.bind(this)},this.parentEventHandler);var e=At.a.URL_PARAMS,n=e.SEARCH,r=e.RH_MAP_NO,i=e.RH_MAP_ID,o=e.RHHIGHLIGHT,a=e.RHSYNSTR,s=e.KEY,u=e.REF,c=e.RH_SKIN;C.a.addEventListener(this.centerPanelNode,"click",(function(t){return C.a.hookClick(t,{removeParams:[n,r,i,o,a,s,u,c]})}))}},{key:"registerRHCommands",value:function(){var t=this;this.rhsubscribe(Object(Pn.a)("EVT_REMOVE_HIGHLIGHT"),this.doRemoveHighlight.bind(this)),this.rhsubscribe(Object(Pn.a)("DESKTOP_TOPIC_ONLY_MODE"),this.handleTopicOnlyMode.bind(this)),this.rhsubscribe(Object(Pn.a)("KEY_SEARCH_RESULTS"),this.addSearchClass.bind(this,!0)),this.rhsubscribe(Object(Pn.a)("SEARCH_HIDE"),this.addSearchClass.bind(this,!1)),this.rhsubscribe(Object(Pn.a)("KEY_SCREEN_FRAMELESS"),this.setScreen.bind(this)),this.rhsubscribe(Object(Pn.a)("TOGGLE_FAVOURITE_TOPIC"),this.togglebmrkSelect.bind(this)),this.rhsubscribe(Object(Pn.a)("COOKIES_STATUS"),this.setCookieWidgetsStatus.bind(this)),this.rhsubscribe(Object(Pn.a)("HIDE_FILTER"),this.setFilterStatus.bind(this)),this.rhsubscribe(Object(Pn.a)("EVT_EXPAND_COLLAPSE_ALL"),(function(e){return t.toggleExpandCollapse.bind(t)(e)})),this.rhsubscribe(Object(Pn.a)("EVT_SHOW_FAVORITES"),(function(e){return t.saveTopic.bind(t)(e)})),this.rhsubscribe(Object(Pn.a)("EVT_SHOW_FILTERS"),(function(e){return t.applyFilter.bind(t)(e)})),this.rhsubscribe(Object(Pn.a)("EVT_SHOW_BOOKMARKS"),(function(e){return t.selectBmark.bind(t)(e)})),this.rhsubscribe(Object(Pn.a)("EVT_DOWNLOAD_PDF"),(function(e){return t.downloadPDF.bind(t)(e)})),this.rhsubscribe(Object(Pn.a)("EVT_PROJ_SEARCH"),this.showSearch.bind(this))}},{key:"addSearchClass",value:function(t){this.model.searchExtraClass=t?"RH-LAYOUT-TOOLBAR-search-container":"",this.widget.setState({model:this.model})}},{key:"setFilterStatus",value:function(t){this.model.showFilter=!t,this.widget.setState({model:this.model})}},{key:"setCookieWidgetsStatus",value:function(t){this.model.showFav=t,this.model.showBmrkSelect=t&&"KEY_SCREEN_PHONE"===this.activeScreen,this.widget.setState({model:this.model})}},{key:"handleTOC",value:function(){"KEY_SCREEN_PHONE"===this.activeScreen?(this.mainLayoutNode&&this.mainLayoutNode.classList.add(At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE),this.parentEventHandler.next("OPEN_TOC_MOBILE",{})):(this.parentEventHandler.next("TOGGLE_TOC",{}),this.toggleTOCIcon(),this.widget.setState({model:this.model}))}},{key:"toggleTOCIcon",value:function(t){(C.a.isUndefined(t)||C.a.isNil(t))&&(t=!C.a.includes(this.model.tocTogglerClasses,"RH-LAYOUT-TOOLBAR-panel-show")),t?(this.model.tocTogglerClasses.push("RH-LAYOUT-TOOLBAR-panel-show"),C.a.remove(this.model.tocTogglerClasses,(function(t){return t===sr}))):(C.a.remove(this.model.tocTogglerClasses,(function(t){return"RH-LAYOUT-TOOLBAR-panel-show"===t})),this.model.tocTogglerClasses.push(sr))}},{key:"onCloseTocMobile",value:function(){this.hide(!1,[this.mainLayoutNode],!1),this.hide(this.widgetOpenMode,[this.centerPanelNode],!1),this.hide(!this.widgetOpenMode,[this.rightPanelNode],!1),this.widget.setState({model:this.model})}},{key:"doRemoveHighlight",value:function(){var t=this.topicNode.querySelectorAll("span[data-highlight]")||[];C.a.each(t,(function(t){t.removeAttribute("style")}))}},{key:"initModel",value:function(){this.model=new ur}},{key:"initWidget",value:function(){this.registerRHCommands(),this.tocOpen=!0;var t=Ln.a.get(Object(Pn.a)("DESKTOP_TOPIC_ONLY_MODE"))||"KEY_SCREEN_DESKTOP"===this.activeScreen;!Ln.a.get(Object(Pn.a)("SHOW_CUSTOM_BUTTON_LABELS"))||Ln.a.get(Object(Pn.a)("DESKTOP_TOPIC_ONLY_MODE"))||"KEY_SCREEN_PHONE"===this.activeScreen?this.model.showLabels=!1:this.model.showLabels=!0,this.model.showFav=Ln.a.get(Object(Pn.a)("COOKIES_STATUS"))||!1,this.model.showFilter=Ln.a.get(Object(Pn.a)("HIDE_FILTER"))||!0,this.model.showPdf=!!Ln.a.get(Object(Pn.a)("SHOW_PDF_DOWNLOAD")),this.model.showLabels=!!C.a.isUndefined(t)||t,this.model.showBmrkSelect=!!Ln.a.get(Object(Pn.a)("COOKIES_STATUS"))&&"KEY_SCREEN_PHONE"===this.activeScreen,this.bmrkSelected=!C.a.isEmpty(this.isSaved()),this.updatebmrkSelectIcon(),this.model.showSearchIcon=Ln.a.get(Object(Pn.a)("KEY_TOOLBAR_SEARCH"))||!1}},{key:"handleTopicOnlyMode",value:function(t){this.model.showLabels=!t,this.toggleTOCIcon(t),this.widget.setState({model:this.model})}},{key:"handleUnselect",value:function(t){switch(t){case"Saved":this.favMode=!1,C.a.remove(this.model.customButton_1,(function(t){return t===At.a.CSS_DEFAULT_CLASSES.TOOL_BAR_SPAN_APPLIED_CLASS})),Ln.a.publish("SAVED_WIDGET_STATE",!1);break;case"Filter":this.filterMode=!1,C.a.remove(this.model.customButton_2,(function(t){return t===At.a.CSS_DEFAULT_CLASSES.TOOL_BAR_SPAN_APPLIED_CLASS})),Ln.a.publish("FILTER_WIDGET_STATE",!1);break;default:return}"KEY_SCREEN_PHONE"===this.activeScreen&&(!this.widgetOpenMode&&this.centerPanelNode.classList.remove(At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE)),this.widget.setState({model:this.model})}},{key:"setScreen",value:function(t){switch(this.activeScreen=t,t){case"KEY_SCREEN_DESKTOP":return this.model.showBmrkSelect=!1,this.model.showLabels=Ln.a.get(Object(Pn.a)("SHOW_CUSTOM_BUTTON_LABELS")),this.hide(!1,[this.toolbarNode,this.rightPanelNode]),this.toggleTOCIcon(!1),void this.widget.setState({model:this.model});case"KEY_SCREEN_PHONE":return this.toggleTOCIcon(!0),this.model.showBmrkSelect=Ln.a.get(Object(Pn.a)("COOKIES_STATUS"))||!1,this.model.showLabels=!1,this.widget.setState({model:this.model}),this.mainLayoutNode.classList.remove(At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE),void this.hide(this.widgetOpenMode,[this.centerPanelNode],!1);default:return}}},{key:"hide",value:function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=n?C.a.concat([this.centerPanelNode,this.mainLayoutNode],e||[]):e||[];t?C.a.each(r,(function(t){return t.classList.add(At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE)})):C.a.each(r,(function(t){return t.classList.remove(At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE)}))}},{key:"toggleExpandCollapse",value:function(t){t&&(this.previousTabId=this.activeTabId,this.activeTabId=t),this.expand=!C.a.includes(this.model.customButton_0,At.a.CSS_DEFAULT_CLASSES.TOOL_BAR_SPAN_APPLIED_CLASS),this.expand?this.model.customButton_0.push(At.a.CSS_DEFAULT_CLASSES.TOOL_BAR_SPAN_APPLIED_CLASS):C.a.remove(this.model.customButton_0,(function(t){return t===At.a.CSS_DEFAULT_CLASSES.TOOL_BAR_SPAN_APPLIED_CLASS})),Ln.a.publish(Object(Pn.a)("EVT_EXPAND_ALL"),this.expand),this.widget.setState({model:this.model})}},{key:"showSearch",value:function(t){t&&(this.previousTabId=this.activeTabId,this.activeTabId=t),Ln.a.publish(Object(Pn.a)("SHOW_SEARCH"),!0),this.widget.setState({model:this.model})}},{key:"saveTopic",value:function(t){t&&(this.previousTabId=this.activeTabId,this.activeTabId=t),this.favMode=!C.a.includes(this.model.customButton_1,At.a.CSS_DEFAULT_CLASSES.TOOL_BAR_SPAN_APPLIED_CLASS),this.favMode?this.model.customButton_1.push(At.a.CSS_DEFAULT_CLASSES.TOOL_BAR_SPAN_APPLIED_CLASS):C.a.remove(this.model.customButton_1,(function(t){return t===At.a.CSS_DEFAULT_CLASSES.TOOL_BAR_SPAN_APPLIED_CLASS})),this.handleLayoutBody(this.favMode),this.eventHandler.next("TOOL_BAR_EVT",{previousTabId:this.previousTabId,activeTabId:this.activeTabId,isCreated:!!this.isFavCreated,widgetOpenMode:this.favMode}),Ln.a.publish("SAVED_WIDGET_STATE",this.favMode),this.favMode&&!this.isFavCreated&&(this.isFavCreated=!0),this.widget.setState({model:this.model})}},{key:"applyFilter",value:function(t){t&&(this.previousTabId=this.activeTabId,this.activeTabId=t),this.filterMode=!C.a.includes(this.model.customButton_2,At.a.CSS_DEFAULT_CLASSES.TOOL_BAR_SPAN_APPLIED_CLASS),this.filterMode?this.model.customButton_2.push(At.a.CSS_DEFAULT_CLASSES.TOOL_BAR_SPAN_APPLIED_CLASS):C.a.remove(this.model.customButton_2,(function(t){return t===At.a.CSS_DEFAULT_CLASSES.TOOL_BAR_SPAN_APPLIED_CLASS})),this.handleLayoutBody(this.filterMode),this.eventHandler.next("TOOL_BAR_EVT",{previousTabId:this.previousTabId,activeTabId:this.activeTabId,isCreated:!!this.isFilterCreated,widgetOpenMode:this.filterMode}),Ln.a.publish("FILTER_WIDGET_STATE",this.filterMode),this.filterMode&&!this.isFilterCreated&&(this.isFilterCreated=!0),this.widget.setState({model:this.model})}},{key:"selectBmark",value:function(t){t&&(this.previousTabId=this.activeTabId,this.activeTabId=t),Ln.a.publish(Object(Pn.a)("TOGGLE_FAVOURITE_TOPIC"),C.a.getTopicUrlRelToMP(Ln.a.get(Object(Pn.a)("KEY_MASTER_PROJECT_PATH")))),this.widget.setState({model:this.model})}},{key:"downloadPDF",value:function(t){t&&(this.previousTabId=this.activeTabId,this.activeTabId=t);var e=Ln.a.get(Object(Pn.a)("KEY_MASTER_PROJECT_PATH")),n=Ln.a.get(Object(Pn.a)("PDF_FILE_NAME")),r="".concat(e,"/assets/downloads/").concat(n),i=document.createElement("a");i.href=r,i.target="_blank",i.download="".concat(n),i.click(),window.URL.revokeObjectURL(r),i.remove(),this.widget.setState({model:this.model})}},{key:"handleTabChange",value:function(t){switch(this.previousTabId=this.activeTabId,this.activeTabId=t&&C.a.get(t,"data.tabId")){case"Expand":this.toggleExpandCollapse();break;case"Saved":this.saveTopic();break;case"Filter":this.applyFilter();break;case"BmrkSelect":this.selectBmark();break;case"Pdf":this.downloadPDF();case"Search":this.showSearch();default:return void this.toggleClasses()}}},{key:"togglebmrkSelect",value:function(){this.bmrkSelected=!this.bmrkSelected,this.updatebmrkSelectIcon()}},{key:"updatebmrkSelectIcon",value:function(){this.bmrkSelected?this.model.customButton_3.push(At.a.CSS_DEFAULT_CLASSES.TOOL_BAR_SPAN_APPLIED_CLASS):C.a.remove(this.model.customButton_3,(function(t){return t===At.a.CSS_DEFAULT_CLASSES.TOOL_BAR_SPAN_APPLIED_CLASS})),this.widget.setState({model:this.model})}},{key:"isSaved",value:function(){var t=C.a.getTopicUrlRelToMP(Ln.a.get(Object(Pn.a)("KEY_MASTER_PROJECT_PATH"))),e=Ln.a.get(Object(Pn.a)("FAVLIST"));return C.a.find(e,(function(e){return e.topic===t}))}},{key:"handleLayoutBody",value:function(t){this.widgetOpenMode=t;var e=[this.centerPanelNode];"KEY_SCREEN_PHONE"===this.activeScreen&&(this.widgetOpenMode?C.a.each(e,(function(t){return t.classList.add(At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE)})):C.a.each(e,(function(t){return t.classList.remove(At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE)})))}},{key:"printPdf",value:function(){var t=window.open("","PRINT");t.document.write(""+document.title+""),t.document.write(document.head.innerHTML),t.document.write(''),t.document.write(document.getElementById("rh-topic").innerHTML),t.document.write(""),t.document.close(),t.focus(),C.a.defer((function(){t.print(),t.close()}))}}]),r}(Ie.a);function lr(){if("undefined"==typeof Reflect||!i.a)return!1;if(i.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(i()(Date,[],(function(){}))),!0}catch(t){return!1}}var hr=function t(){f()(this,t),k()(this,"slctedfilters",void 0),k()(this,"topicUrl",void 0),k()(this,"brdcrmbSeq",void 0),k()(this,"showSkinBcrumbs",void 0),k()(this,"showTopicHiddenText",!1)},fr=function(t){S()(r,t);var e,n=(e=r,function(){var t,n=b()(e);if(lr()){var r=b()(this).constructor;t=i()(n,arguments,r)}else t=n.apply(this,arguments);return y()(this,t)});function r(){return f()(this,r),n.apply(this,arguments)}return p()(r,[{key:"registerCommands",value:function(){this.subscribe({key:"goToDefaultTopic",next:this.takeToDefaultTopic.bind(this)},this.parentEventHandler)}},{key:"takeToDefaultTopic",value:function(){ir()}},{key:"initModel",value:function(){this.model=new hr}},{key:"initWidget",value:function(){var t=this;this.rhsubscribe(I.a.consts("SELECTED_TAGS"),this.setSelectedTags.bind(this)),this.rhsubscribe(I.a.consts("SHOW_SKIN_BCRUMBS"),(function(e){return t.showSkinBCrumbs.bind(t)(e)})),this.rhsubscribe(I.a.consts("SHOW_TOPIC_HIDDEN_TEXT"),(function(e){t.model.showTopicHiddenText=e,t.widget.setState({model:t.model})})),I.a.model.subscribeOnce(I.a.consts("EVT_LOAD_BRDCRMBS"),(function(){var e=I.a.model.get(I.a.consts("BRDCRMBDATA"))||{};t.model.showSkinBcrumbs=!1!==I.a.model.get(I.a.consts("SHOW_SKIN_BCRUMBS")),t.model.topicUrl=C.a.getTopicUrlRelToMP(I.a.model.get(I.a.consts("KEY_MASTER_PROJECT_PATH")));var n=C.a.getTopicTitle(),r=C.a.get(e[t.model.topicUrl],"seq"),i=C.a.first(r);t.model.brdcrmbSeq=C.a.map(C.a.reverse(C.a.drop(r)),(function(t){return{name:t}})),n?t.model.brdcrmbSeq.push({name:n}):t.model.brdcrmbSeq.push({name:i}),t.setSelectedTags()}))}},{key:"setSelectedTags",value:function(t){t=t||I.a.model.get(I.a.consts("SELECTED_TAGS")),this.model.slctedfilters=this.getDisplayNames(t),this.widget.setState({model:this.model})}},{key:"getDisplayNames",value:function(t){var e=this,n=I.a.model.get(I.a.consts("KEY_TAG_GROUPS")),r=C.a.flatten(C.a.compact(C.a.map(n,(function(t){return C.a.get(t,"children")}))));return C.a.compact(C.a.map(t,(function(t){return e.getDisplayName(t,r)})))}},{key:"getDisplayName",value:function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"name";arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(n in e){var i=e[n];if(C.a.get(i,r)===t)return i}return null}},{key:"showSkinBCrumbs",value:function(t){this.model.showSkinBcrumbs=t,this.widget.setState({model:this.model})}}]),r}(Ie.a),dr=n(40);function pr(){if("undefined"==typeof Reflect||!i.a)return!1;if(i.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(i()(Date,[],(function(){}))),!0}catch(t){return!1}}var vr=function(t){S()(r,t);var e,n=(e=r,function(){var t,n=b()(e);if(pr()){var r=b()(this).constructor;t=i()(n,arguments,r)}else t=n.apply(this,arguments);return y()(this,t)});function r(){return f()(this,r),n.apply(this,arguments)}return p()(r,[{key:"registerCommands",value:function(){this.subscribe({key:"delete",next:this.doDelete.bind(this)})}},{key:"initEventHandler",value:function(){this.eventHandler=new dr.a}},{key:"doDelete",value:function(){I.a.model.publish(I.a.consts("FILTER_REMOVE"),this.model.name)}}]),r}(Ie.a);function mr(){if("undefined"==typeof Reflect||!i.a)return!1;if(i.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(i()(Date,[],(function(){}))),!0}catch(t){return!1}}var gr,yr,_r=function t(){f()(this,t),k()(this,"langLabel",I.a.consts("custom_link_1")||""),k()(this,"custom_link_1_show",void 0),k()(this,"custom_link_1",void 0),k()(this,"custom_link_1_label",void 0),k()(this,"custom_link_2_show",void 0),k()(this,"custom_link_2",void 0),k()(this,"custom_link_2_label",void 0),k()(this,"custom_link_3_show",void 0),k()(this,"custom_link_3",void 0),k()(this,"custom_link_3_label",void 0),k()(this,"custom_link_4_show",void 0),k()(this,"custom_link_4",void 0),k()(this,"custom_link_4_label",void 0),k()(this,"custom_link_5_show",void 0),k()(this,"custom_link_5",void 0),k()(this,"custom_link_5_label",void 0),k()(this,"custom_link_6_show",void 0),k()(this,"custom_link_6",void 0),k()(this,"custom_link_6_label",void 0),k()(this,"custom_link_7_show",void 0),k()(this,"custom_link_7",void 0),k()(this,"custom_link_7_label",void 0),k()(this,"custom_link_8_show",void 0),k()(this,"custom_link_8",void 0),k()(this,"custom_link_8_label",void 0),k()(this,"custom_link_9_show",void 0),k()(this,"custom_link_9",void 0),k()(this,"custom_link_9_label",void 0),k()(this,"custom_link_10_show",void 0),k()(this,"custom_link_10",void 0),k()(this,"custom_link_10_label",void 0)},br=function(t){S()(r,t);var e,n=(e=r,function(){var t,n=b()(e);if(mr()){var r=b()(this).constructor;t=i()(n,arguments,r)}else t=n.apply(this,arguments);return y()(this,t)});function r(){return f()(this,r),n.apply(this,arguments)}return p()(r,[{key:"initModel",value:function(){this.model=new _r}},{key:"initWidget",value:function(){this.model.langLabel=C.a.toUpper(I.a.model.get(I.a.consts("KEY_LNG_NAME")))||At.a.LANG.DEFAULT_LANG,this.model.custom_link_1_show=I.a.consts("custom_link_1_show")||!0,this.model.custom_link_1=I.a.consts("custom_link_1")||"",this.model.custom_link_1_label=I.a.consts("custom_link_1_label")||"Contact us",this.model.custom_link_2_show=I.a.consts("custom_link_2_show")||!0,this.model.custom_link_2=I.a.consts("custom_link_2")||"",this.model.custom_link_2_label=I.a.consts("custom_link_2_label")||"Privacy Policy",this.model.custom_link_3_show=I.a.consts("custom_link_3_show")||!0,this.model.custom_link_3=I.a.consts("custom_link_3")||"",this.model.custom_link_3_label=I.a.consts("custom_link_3_label")||"Terms and Conditions",this.model.custom_link_4_show=I.a.consts("custom_link_4_show")||!0,this.model.custom_link_4=I.a.consts("custom_link_4")||"",this.model.custom_link_4_label=I.a.consts("custom_link_4_label")||"Blog",this.model.custom_link_5_show=I.a.consts("custom_link_5_show")||!1,this.model.custom_link_5=I.a.consts("custom_link_5")||"",this.model.custom_link_5_label=I.a.consts("custom_link_5_label")||"",this.model.custom_link_6_show=I.a.consts("custom_link_6_show")||!1,this.model.custom_link_6=I.a.consts("custom_link_6")||"",this.model.custom_link_6_label=I.a.consts("custom_link_6_label")||"",this.model.custom_link_7_show=I.a.consts("custom_link_7_show")||!1,this.model.custom_link_7=I.a.consts("custom_link_7")||"",this.model.custom_link_7_label=I.a.consts("custom_link_7_label")||"",this.model.custom_link_8_show=I.a.consts("custom_link_8_show")||!1,this.model.custom_link_8=I.a.consts("custom_link_8")||"",this.model.custom_link_8_label=I.a.consts("custom_link_8_label")||"",this.model.custom_link_9_show=I.a.consts("custom_link_9_show")||!1,this.model.custom_link_9=I.a.consts("custom_link_9")||"",this.model.custom_link_9_label=I.a.consts("custom_link_9_label")||"",this.model.custom_link_10_show=I.a.consts("custom_link_10_show")||!1,this.model.custom_link_10=I.a.consts("custom_link_10")||"",this.model.custom_link_10_label=I.a.consts("custom_link_10_label")||"",this.widget.setState({model:this.model})}}]),r}(Ie.a),Er=n(272),Sr=n.n(Er),Tr=function(){function t(e,n,r){var i=this;f()(this,t),k()(this,"key",void 0),k()(this,"href",void 0),k()(this,"ref",void 0),k()(this,"type",void 0),k()(this,"name",void 0),k()(this,"tilePath",void 0),k()(this,"brdcrmbPath",void 0),k()(this,"rhtags",void 0),k()(this,"projPath",void 0),k()(this,"expanded",void 0),k()(this,"items",void 0),k()(this,"url",void 0),k()(this,"show",void 0),k()(this,"select",void 0),this.projPath=P.a.appendSlash(n),this.href=e.url,this.key=e.key,this.name=e.name,this.type=e.type,this.tilePath=e.tilePath,this.rhtags=e[At.a.TAGS.RH_DATA],this.brdcrmbPath=e.brdcrmbPath,this.expanded=!1,this.show=!0,this.setRef(e.ref,r),this.url=!this.href||P.a.protocol(this.href)&&C.a.isExternalUrl(this.href)?this.href:P.a.makePath(this.ref,this.href),this.items=C.a.map(e.items,(function(e){return new t(e,i.projPath,i.ref)}))}return p()(t,[{key:"setRef",value:function(t,e){this.ref=P.a.makePath(e||this.projPath||"",t||"")}},{key:"getRelPath",value:function(t){var e=t.url,n=I.a.model.get(I.a.consts("KEY_MASTER_PROJECT_PATH")),r=P.a.makeFullPath(C.a.getTopicUrlRelToMP(n),C.a.getMasterHostFolder(n)),i=P.a.makeFullPath(e,r);return P.a.makeRelativePath(i,C.a.getMasterHostFolder(n))}},{key:"initLowestBrdcrmbData",value:function(){this.isBook?(I.a.brdcrmbManager._updatePath({path:this.name,seq:[this.name],type:"book"}),this.brdcrmbPath=this.name,this.href&&I.a.brdcrmbManager._updatePath({path:this.getRelPath(this),seq:[P.a.fileName(this.href)]})):I.a.brdcrmbManager._updatePath({path:this.getRelPath(this),seq:[P.a.fileName(this.href)]})}},{key:"updateBookInfo",value:function(t){this.expanded=t;var e=I.a.model.get(I.a.consts("BRDCRMBDATA"))||{};C.a.set(e[this.brdcrmbPath],"open",t),!t&&this.closeInnerBooks(this,e),I.a.brdcrmbManager._updatePath(e[this.brdcrmbPath])}},{key:"closeInnerBooks",value:function(t,e){var n=this;C.a.each(C.a.filter(t.items,(function(t){return t.isBook})),(function(t){t.brdcrmbPath&&(C.a.set(e[t.brdcrmbPath],"open",!1),I.a.brdcrmbManager._updatePath(e[t.brdcrmbPath])),n.closeInnerBooks(t,e)}))}},{key:"toObj",value:function(t){var e=this;return{url:!this.href||P.a.protocol(this.href)&&C.a.isExternalUrl(this.href)?this.href:P.a.makePath(this.ref,this.href),ref:this.ref,key:this.key,name:this.name,brdcrmbPath:this.brdcrmbPath,type:this.type,tilePath:this.tilePath,expanded:this.expanded,rhtags:this.rhtags,items:C.a.map(this.items,(function(n){return n.toObj(P.a.appendPath(t,e.ref))}))}}},{key:"dispose",value:function(){C.a.each(this.items,(function(t){return t.dispose()})),this.key=void 0,this.href=void 0,this.ref=void 0,this.type=void 0,this.name=void 0,this.tilePath=void 0,this.brdcrmbPath=void 0,this.rhtags=void 0,this.projPath=void 0,this.expanded=void 0,this.items=void 0,this.url=void 0}},{key:"isBook",get:function(){return this.type===At.a.TOC.TYPE.BOOK}},{key:"isPage",get:function(){return this.type===At.a.TOC.TYPE.PAGE}},{key:"isPrj",get:function(){return this.type===At.a.TOC.TYPE.PROJECT}},{key:"selected",get:function(){return this.select},set:function(t){this.select=t}}]),t}(),kr=new(yr=gr=function(){function t(){f()(this,t),k()(this,"tocMap",void 0)}return p()(t,[{key:"getTocFileData",value:function(e){return t.tocMap[e]}},{key:"addTocFileData",value:function(e,n){t.tocMap[e]=n}},{key:"updateBrdcrmbs",value:function(t,e){var n=this,r=C.a.filter(t,(function(t){return t.isPrj})),i=C.a.difference(t,r),o=this.getBrdCrmbSeq(e),a=C.a.map(r,(function(t){var e=n.getRelPath(t);return{path:e,seq:C.a.concat(P.a.fileName(e),o)}}));C.a.each(i,(function(t){if(t.brdcrmbPath=P.a.makePath(e.brdcrmbPath,t.name),a.push({path:t.brdcrmbPath,seq:C.a.concat(t.name,o),type:"book"}),t.url){var r=n.getRelPath(t);a.push({path:r,seq:C.a.concat(P.a.fileName(r),o)})}})),I.a.brdcrmbManager._updatePaths(a)}},{key:"getBrdCrmbSeq",value:function(t){var e=I.a.model.get(I.a.consts("BRDCRMBDATA"))||{};return t.brdcrmbPath&&C.a.get(e[t.brdcrmbPath],"seq")||[t.name]}},{key:"getRelPath",value:function(t){var e=t.url,n=I.a.model.get(I.a.consts("KEY_MASTER_PROJECT_PATH")),r=P.a.makeFullPath(C.a.getTopicUrlRelToMP(n),C.a.getMasterHostFolder(n)),i=P.a.makeFullPath(e,r);return P.a.makeRelativePath(i,C.a.getMasterHostFolder(n))}},{key:"loadTempItems",value:function(t){var e=this;return On.a.op((function(n){var r=C.a.cloneDeep(e.getTocFileData(t));C.a.isDefined(r)?n.next(r):C.a.loadScript(t,!0,(function(){var r=I.a.model.get(I.a.consts("KEY_TEMP_DATA"));e.addTocFileData(t,C.a.cloneDeep(r)),I.a.model.publish(I.a.consts("KEY_TEMP_DATA")),n.next(r)}))}))}},{key:"getNonProjData",value:function(t,e,n){t=t||"toc",e=e||I.a.model.get(I.a.consts("KEY_MASTER_PROJECT_PATH"));var r=On.a.subject,i=At.a.FILE.WHXFILE.replace("%s1",t);return i=P.a.makePath(e,i),this.loadTempItems(i).subscribe((function(t){var i=[],o=[];C.a.each(t,(function(t){var r=new Tr(t,e,n);r.initLowestBrdcrmbData(),r.isPrj?(o.push(r),i.push({projPath:r.ref})):i.push(r)})),I.a.model.publish(I.a.consts("KEY_TEMP_DATA"));var a={tocItems:i=C.a.compact(i),projectItems:o};r.next(a)})),r}},{key:"getProjItemsData",value:function(t){var e=this;return On.a.allMap(t,(function(t){var n=t.ref;return e.getNonProjData(null,n,t.ref).switchMap((function(t){var r=t.projectItems;return e.getProjItemsData(r).switchMap((function(r){return C.a.each(r,(function(n){var r=n.itemData,i=n.projPath;t.tocItems=e.fitAtPlace(t.tocItems,r,i)})),On.a.of({itemData:t.tocItems,projPath:n})}))}))}))}},{key:"fitAtPlace",value:function(t,e,n){var r=C.a.findIndex(t,(function(t){return t.projPath===n}));return-1===r?t:C.a.concat(C.a.slice(t,0,r),e,C.a.slice(t,r+1))}},{key:"getMasterTocs",value:function(){var t=this,e=I.a.model.get(I.a.consts("KEY_MASTER_PROJECT_LIST"));return On.a.allMap(e,(function(e){return t.getNonProjData(null,e,null).switchMap((function(e){var n=e.projectItems;return t.getProjItemsData(n).switchMap((function(n){return C.a.each(n,(function(n){var r=n.itemData,i=n.projPath;e.tocItems=t.fitAtPlace(e.tocItems,r,i)})),On.a.of(e)}))}))}))}}]),t}(),k()(gr,"tocMap",{}),yr);function xr(){if("undefined"==typeof Reflect||!i.a)return!1;if(i.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(i()(Date,[],(function(){}))),!0}catch(t){return!1}}var wr=function t(){f()(this,t),k()(this,"data",void 0)},Cr=function t(e){var n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"name",o=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0;for(n in e){if(C.a.get(e[n],i)===o)return e[n];if(a&&a(C.a.get(e[n],i)))return e[n];if(e[n].items)for(r in e[n]){var s=t(e[n][r],i,o,a);if(s)return s}}return null},Or=function(t){S()(r,t);var e,n=(e=r,function(){var t,n=b()(e);if(xr()){var r=b()(this).constructor;t=i()(n,arguments,r)}else t=n.apply(this,arguments);return y()(this,t)});function r(t,e){var i;return f()(this,r),i=n.call(this,t,e),k()(m()(i),"$el",void 0),k()(m()(i),"fullData",void 0),k()(m()(i),"_setInitialData",void 0),k()(m()(i),"initDone",void 0),i.handleToggle=i.handleToggle.bind(m()(i)),i.setTreeState=i.setTreeState.bind(m()(i)),i.restoreTocState=i.restoreTocState.bind(m()(i)),i.loadinToc=i.loadinToc.bind(m()(i)),i.setData=i.setData.bind(m()(i)),i.initDone=!1,i}return p()(r,[{key:"registerEvents",value:function(){}},{key:"updateTOCTagData",value:function(t){var e=this;t&&(this.model.data=t,this.widget.setState({model:this.model},(function(){e.initDone||(C.a.defer((function(){e.scrollTo(document.querySelector(".rh-layout-INDEX-selected-item"),document.querySelector(".RH-LAYOUT-LEFTPANEL-content-box"))})),e.initDone=!!Cr(e.model.data,"selected",!0))})))}},{key:"scrollTo",value:function(t,e){t&&e&&C.a.isFunction(e.scroll)&&e.scroll(0,t.offsetTop-e.offsetTop)}},{key:"initEventHandler",value:function(){this.eventHandler=new dr.a,this.eventHandler.toString=function(){return"Tree View Event Handler"}}},{key:"setTreeState",value:function(){I.a.model.publish(I.a.consts("TOC_DATA"),this.model.data)}},{key:"handleTabChange",value:function(t){var e=t&&t.selectedTab,n=t&&t.toggled,r=C.a.get(this.$el,"current");this.widget.props.config.id===e&&this.shouldOpen(n)?r.classList.remove(At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE):r.classList.add(At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE)}},{key:"shouldOpen",value:function(t){return!!C.a.isUndefined(t)||t}},{key:"initWidget",value:function(){var t=this;return this.rhsubscribe(I.a.consts("UPDATE_TOC_TAGS"),this.updateTOCTagData.bind(this)),kr.getMasterTocs().subscribe((function(e){var n=C.a.flatten(C.a.map(e,(function(t){return t.tocItems})));return t.fullData=t.model.data=n,t.synchronizeParents(t.model.data).switchMap((function(e){var n=e.data,r=e.projPath;return t.synchronizeItem(n,C.a.get(window,"gTopicId"),At.a.TOC.TYPE.PAGE,r).switchMap((function(){return I.a.model.cpublish("EVT_LOAD_BRDCRMBS",!0),t.restoreTocState(t.model.data)}))})).subscribe((function(){I.a.model.publish(I.a.consts("TOC_DATA"),t.model.data),t.widget.setState({model:t.model})}))}))}},{key:"restoreTocState",value:function(t){var e=this,n=I.a.model.get(I.a.consts("BRDCRMBDATA"))||{},r=C.a.filter(n,(function(t){return"book"===t.type&&t.open}));return C.a.reduce(r,(function(t,n){return t.switchMap((function(t){return e.loadinToc(t,C.a.get(n,"seq"))}))}),On.a.of(t))}},{key:"loadinToc",value:function(t,e){var n=this;return C.a.reduce(C.a.reverse(e),(function(t,e){return t.switchMap((function(t){var r=Cr(t,"name",e);if(!r)return On.a.of(t);r.updateBookInfo(!0);var i=On.a.of(t);return"book"===C.a.get(r,"type")&&C.a.isEmpty(r.items)?n.setData(r).switchMap((function(){return i})):i}))}),On.a.of(t))}},{key:"initModel",value:function(){this.model=new wr,this.model.data=[]}},{key:"registerCommands",value:function(){this.subscribe({key:"onTabChange",next:this.handleTabChange.bind(this)},this.parentEventHandler),this.subscribe({key:"onToggle",next:this.handleToggle.bind(this)}),this.subscribe({key:"onScroll",next:this.handleScroll.bind(this)})}},{key:"handleScroll",value:function(t){var e=t.currentTarget;t.preventDefault(),e.scrollHeight,e.scrollTop,e.clientHeight}},{key:"handleToggle",value:function(t){var e=this,n=t.item,r=C.a.get(t,"expanded"),i=I.a.model.get(I.a.consts("KEY_MASTER_PROJECT_PATH")),o=C.a.getTopicUrlRelToMP(i);n.updateBookInfo(r),r?this.setData(n).subscribe((function(t){Cr(t,"url",null,(function(t){return C.a.isEqualURL(t,o,i)}));return e.setTreeState()})):(C.a.each(n.items,(function(t){return t.dispose()})),n.items=[],this.setTreeState())}},{key:"setData",value:function(t){var e=On.a.subject,n=t&&t.key,r=At.a.FILE.WHXFILE.replace("%s1",n),i=[],o=[];return t.isBook&&(r=C.a.get(t,"ref")?P.a.makePath(t.ref,r):P.a.makePath(C.a.gPath,r),kr.loadTempItems(r).subscribe((function(n){C.a.each(n,(function(e){var n=new Tr(e,C.a.get(t,"projPath"),t.ref);n.isPrj?(i.push(n),o.push({projPath:n.ref})):o.push(n)})),kr.getProjItemsData(i).subscribe((function(n){C.a.each(n,(function(t){var e=t.itemData,n=t.projPath;o=kr.fitAtPlace(o,e,n)})),t.items=o,kr.updateBrdcrmbs(t.items,t),e.next(t.items)}))}))),e}},{key:"synchronizeParents",value:function(t){var e=this,n=I.a.model.get(I.a.consts("PARENTS_ORDER")),r=n.pop(),i=C.a.reverse(n),o=I.a.model.get(I.a.consts("KEY_CHILD_ID_MAP"));return C.a.reduce(i,(function(t,n){var r=o[P.a.makeFullPath(n,P.a.filePath(C.a.getUrl()))];return t.switchMap((function(t){var n=t.data,i=t.projPath;return e.synchronizeItem(n,r,At.a.TOC.TYPE.PROJECT,i)}))}),On.a.of({data:t,projPath:r}))}},{key:"synchronizeItem",value:function(t,e,n,r){var i=this;if(!e)return On.a.of({data:t,projPath:r});var o,a,s,u,c=n===At.a.TOC.TYPE.PAGE?"_":"#";return e.includes(c)?(o=C.a.split(e,c),s=vn()(o.pop()),a=C.a.first(o).split("."),u=vn()(a.pop())):(s=0,u=0,a=e.split(".")),C.a.reduce(a,(function(t,e){return t?t.switchMap((function(t){var n=t.items,r=t.projPath,o=vn()(e)-1,a=C.a.filter(n,(function(t){return t.isBook&&t.projPath===r}))[o];return a.expanded=!0,i.setData(a).map((function(t){return{items:t,projPath:a.projPath,parentItem:a}}))})):On.a.of(null)}),On.a.of({projPath:r,items:t,parentItem:null})).map((function(t){var e=t.items,r=t.projPath,o=t.parentItem;return 0===u&&0===s?(o.selected=!0,{data:e,projPath:r}):n===At.a.TOC.TYPE.PAGE?i.selectCurTopic(e,u,s,r):i.selectCurPrj(e,u,s,r)}))}},{key:"selectCurTopic",value:function(t,e,n,r){var i=0,o=0;return C.a.each(t,(function(t){if(t.isBook&&t.projPath===r&&i++,e===i&&t.isPage&&t.projPath===r&&o++,n===o)return t.selected=!0,!1})),{data:t,projPath:r}}},{key:"selectCurPrj",value:function(t,e,n,r){var i,o,a=0,s=new Sr.a;return C.a.each(t,(function(u,c){if(u.isBook&&u.projPath===r&&a++,e===a&&u.projPath!==r&&s.add(u.projPath),n===s.size)return i=t.slice(c),o=u.projPath,!1})),{data:i,projPath:o}}}]),r}(Ie.a);function Ar(){if("undefined"==typeof Reflect||!i.a)return!1;if(i.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(i()(Date,[],(function(){}))),!0}catch(t){return!1}}var Rr=function t(){f()(this,t),k()(this,"showCross",void 0),k()(this,"leftPanelClass",void 0),k()(this,"tocIconClass",void 0),k()(this,"tocTogglerClasses",["rh-button","RH-LAYOUT-LEFTPANEL-panel-show"]),k()(this,"disabled",void 0),k()(this,"defaultSelectedtabId",void 0),k()(this,"showTOC",void 0),k()(this,"showIndex",void 0),k()(this,"showGlossary",void 0),k()(this,"showTocIcon",void 0),k()(this,"showTabView",void 0),k()(this,"showAccordion",void 0)},Lr={toc:"contents",idx:"index",glo:"glossary"},Pr=function(t){S()(r,t);var e,n=(e=r,function(){var t,n=b()(e);if(Ar()){var r=b()(this).constructor;t=i()(n,arguments,r)}else t=n.apply(this,arguments);return y()(this,t)});function r(t,e){var i;return f()(this,r),i=n.call(this,t,e),k()(m()(i),"leftPanelNode",void 0),k()(m()(i),"activeScreen",void 0),k()(m()(i),"panelOpen",void 0),k()(m()(i),"$el",void 0),i.toggleToc=i.toggleToc.bind(m()(i)),i.leftPanelNode=document.getElementById("rh-leftpanel"),i.subscribe({key:"OPEN_TOC_MOBILE",next:i.openTocMobile.bind(m()(i))},i.parentEventHandler),i}return p()(r,[{key:"registerCommands",value:function(){var t=this;this.subscribe({key:"toggleToc",next:function(){t.handleToggleToc()}}),this.subscribe({key:"TOGGLE_TOC",next:function(){t.handleToggleToc()}},this.parentEventHandler),this.subscribe({key:"onTabChange",next:this.onTabChange.bind(this)}),this.subscribe({key:"updateAccordionTab",next:this.onTabChange.bind(this)})}},{key:"getDOMElementByClass",value:function(t){return document.getElementsByClassName(t)}},{key:"openTocMobile",value:function(){this.toggleToc(!0),this.leftPanelNode.classList.remove(At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE)}},{key:"closeTocMobile",value:function(){this.toggleToc(!1),this.leftPanelNode.classList.add(At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE),this.parentEventHandler.next("CLOSE_TOC_MOBILE")}},{key:"handleToggleToc",value:function(){"KEY_SCREEN_PHONE"===this.activeScreen&&this.panelOpen&&(this.parentEventHandler.next("CLOSE_TOC_MOBILE"),this.leftPanelNode.classList.add(At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE)),this.toggleToc(!this.panelOpen)}},{key:"onTabChange",value:function(t){var e=t&&t.selectedTab;if(e){var n,r=P.a.params(),i=At.a.URL_PARAMS.AGT;e===Lr[I.a.model.get(I.a.consts("KEY_DEFAULT_TAB"))]?n=P.a.removeParam(C.a.getUrl(),i):(r[i]=e,n=C.a.isEmpty(e)?P.a.removeParam(C.a.getUrl(),i):P.a.updateUrlParams(encodeURI(C.a.getUrl()),r)),window.history.pushState(null,"",n)}}},{key:"getSelectedtabId",value:function(){return P.a.params()[At.a.URL_PARAMS.AGT]||Lr[I.a.model.get(I.a.consts("KEY_DEFAULT_TAB"))]||""}},{key:"handleTopicOnlyMode",value:function(t){this.toggleToc(!t),this.widget.setState({model:this.model})}},{key:"initModel",value:function(){this.model=new Rr,this.model.defaultSelectedtabId=this.getSelectedtabId(),this.model.showAccordion=!!I.a.model.get(I.a.consts("KEY_SHOW_ACCORDIAN"))}},{key:"initWidget",value:function(){this.rhsubscribe(I.a.consts("KEY_SCREEN_FRAMELESS"),this.setScreen.bind(this)),this.rhsubscribe(I.a.consts("DESKTOP_TOPIC_ONLY_MODE"),this.handleTopicOnlyMode.bind(this)),this.model.showTOC=!I.a.model.get(I.a.consts("KEY_SHOW_TOC")),this.model.showGlossary=!I.a.model.get(I.a.consts("KEY_SHOW_GLOSSARY"))||I.a.model.get(I.a.consts("HIDE_GLO")),this.model.showIndex=!I.a.model.get(I.a.consts("KEY_SHOW_INDEX"))||I.a.model.get(I.a.consts("HIDE_IDX")),this.model.disabled=!1,this.widget.setState({model:this.model})}},{key:"initEventHandler",value:function(){this.eventHandler=new dr.a}},{key:"toggleToc",value:function(t){!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.panelOpen=t;var e=this.$el&&this.$el.current,n=e&&e.parentNode,r=document.querySelector(".".concat(At.a.CSS_DEFAULT_CLASSES.BODY));t?(this.model.showCross="KEY_SCREEN_PHONE"===this.activeScreen,this.model.tocIconClass="",n&&Rt.a.removeClass(n,At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE),C.a.remove(this.model.tocTogglerClasses,(function(t){return"RH-LAYOUT-LEFTPANEL-panel-hide"===t})),r&&r.classList.add(At.a.CSS_DEFAULT_CLASSES.LEFT_PANEL_EXPANDED_MOB)):(n&&Rt.a.addClass(n,At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE),this.model.tocIconClass="rh-layout-LEFTPANEL-toc-icon-collapsed",this.model.tocTogglerClasses.push("RH-LAYOUT-LEFTPANEL-panel-hide"),r&&r.classList.remove(At.a.CSS_DEFAULT_CLASSES.LEFT_PANEL_EXPANDED_MOB)),this.widget.setState({model:this.model})}},{key:"handleUrlParams",value:function(t){var e=t&&t.lpnlClose,n={};n[At.a.URL_PARAMS.LEFT_PANEL_CLOSE]="true";var r=e?P.a.updateUrlParams(encodeURI(C.a.getUrl()),n):P.a.removeParam(C.a.getUrl(),At.a.URL_PARAMS.LEFT_PANEL_CLOSE);window.history.pushState(null,"",encodeURI(r))}},{key:"setScreen",value:function(t){switch(this.activeScreen=t,t){case"KEY_SCREEN_DESKTOP":this.model.showTocIcon=!1,this.toggleToc(!0),this.leftPanelNode.classList.remove(At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE);break;case"KEY_SCREEN_PHONE":this.panelOpen=!1,this.model.showTocIcon=!0,this.leftPanelNode.classList.add(At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE),C.a.toggleClass(this.model.tocTogglerClasses,"RH-LAYOUT-LEFTPANEL-panel-hide"),this.widget.setState({model:this.model});break;default:return}this.widget.setState({model:this.model})}}]),r}(Ie.a);function Ir(){if("undefined"==typeof Reflect||!i.a)return!1;if(i.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(i()(Date,[],(function(){}))),!0}catch(t){return!1}}var Dr=function t(){f()(this,t),k()(this,"favImgClasses",["rh-button","RH-LAYOUT-RIGHTPANEL-fav-button"]),k()(this,"rightPanelBtnsClass",void 0),k()(this,"screenModeClasses",["rh-button","RH-LAYOUT-RIGHTPANEL-fullscreen-button"]),k()(this,"show",void 0),k()(this,"desktopView",void 0),k()(this,"minitocExtraClass",""),k()(this,"showFav",void 0),k()(this,"showGoToTop",void 0),k()(this,"showFullScreen",void 0),k()(this,"favTitle",void 0)},Nr={Filter:"filter_widget",Saved:"fav_widget"},Fr={Filter:"RH-LAYOUT-FILTERS-container",Saved:"RH-LAYOUT-FAVORITE-container"},Mr=function(t){S()(r,t);var e,n=(e=r,function(){var t,n=b()(e);if(Ir()){var r=b()(this).constructor;t=i()(n,arguments,r)}else t=n.apply(this,arguments);return y()(this,t)});function r(t,e){var i;return f()(this,r),i=n.call(this,t,e),k()(m()(i),"$el",void 0),k()(m()(i),"activeScreen",void 0),k()(m()(i),"activeTabId",void 0),k()(m()(i),"rightPanelNode",void 0),k()(m()(i),"widgetOpenMode",void 0),k()(m()(i),"fullScreenMode",void 0),k()(m()(i),"selectDetailsNode",void 0),i.rightPanelNode=document.getElementById("rh-rightpanel"),i.selectDetailsNode=document.getElementById("rh-selectdetails"),i.setDesktopView=i.setDesktopView.bind(m()(i)),i}return p()(r,[{key:"registerCommands",value:function(){this.subscribe({key:"TOOL_BAR_EVT",next:this.handleEvt.bind(this)},this.parentEventHandler),this.subscribe({key:"onClick",next:this.handleClick.bind(this)}),this.subscribe({key:"CLOSE_WIDGET",next:this.doCloseWidget.bind(this)}),this.subscribe({key:"pageUp",next:this.pageUp}),this.subscribe({key:"fullScreen",next:this.fullScreen.bind(this)})}},{key:"setDesktopView",value:function(t){this.model.desktopView=t,this.setShowToTop(Ln.a.get(Object(Pn.a)("KEY_SHOW_TO_TOP"))),this.setShowFullScreen(Ln.a.get(Object(Pn.a)("KEY_SHOW_FULL_SCREEN")))}},{key:"setShowToTop",value:function(t){this.model.showGoToTop=t&&this.model.desktopView}},{key:"setShowFullScreen",value:function(t){this.model.showFullScreen=t&&this.model.desktopView}},{key:"setCookieWidgetsStatus",value:function(t){this.model.showFav=t,this.widget.setState({model:this.model})}},{key:"pageUp",value:function(){window.scrollTo(0,0)}},{key:"fullScreen",value:function(){Ln.a.publish(Object(Pn.a)("DESKTOP_TOPIC_ONLY_MODE"),!this.fullScreenMode)}},{key:"doCloseWidget",value:function(){this.parentEventHandler.next("WIDGET_CLOSED"),this.widgetOpenMode=!1,this.model.rightPanelBtnsClass="",this.hide(this.activeTabId,!0),"KEY_SCREEN_PHONE"===this.activeScreen&&this.rightPanelNode.classList.add(At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE),this.widget.setState({model:this.model})}},{key:"handlefavDelete",value:function(t){t===C.a.getTopicUrlRelToMP(Ln.a.get(Object(Pn.a)("KEY_MASTER_PROJECT_PATH")))&&(this.setfavIconClasses(),this.widget.setState({model:this.model}))}},{key:"handleClick",value:function(t){switch(t&&t.metadata){case"save":this.toggleFav();break;case"read_aloud":break;case"print":this.parentEventHandler.next("PRINT");break;case"remove_search_highlight":this.removeHighlight();default:return}}},{key:"removeHighlight",value:function(){Ln.a.publish(Object(Pn.a)("EVT_REMOVE_HIGHLIGHT"))}},{key:"initModel",value:function(){this.model=new Dr}},{key:"setfavIconClasses",value:function(){this.isSaved()?(!C.a.includes(this.model.favImgClasses,"RH-LAYOUT-RIGHTPANEL-rightpanel-bmrk-saved")&&this.model.favImgClasses.push("RH-LAYOUT-RIGHTPANEL-rightpanel-bmrk-saved"),this.model.favTitle=C.a.get(Ln.a.get(Object(Pn.a)("KEY_LNG")),"UnsetAsFavorite")):(C.a.includes(this.model.favImgClasses,"RH-LAYOUT-RIGHTPANEL-rightpanel-bmrk-saved")&&C.a.remove(this.model.favImgClasses,(function(t){return"RH-LAYOUT-RIGHTPANEL-rightpanel-bmrk-saved"==t})),this.model.favTitle=C.a.get(Ln.a.get(Object(Pn.a)("KEY_LNG")),"SetAsFavorite"))}},{key:"initWidget",value:function(){this.rhsubscribe(Object(Pn.a)("KEY_SCREEN_FRAMELESS"),this.setScreen.bind(this)),this.rhsubscribe(Object(Pn.a)("FAVOURITE_DELETE"),this.handlefavDelete.bind(this)),this.rhsubscribe(Object(Pn.a)("FAVLIST"),this.updateFavIcon.bind(this)),this.rhsubscribe(Object(Pn.a)("DESKTOP_TOPIC_ONLY_MODE"),this.handleTopicOnlyMode.bind(this)),this.rhsubscribe(Object(Pn.a)("COOKIES_STATUS"),this.setCookieWidgetsStatus.bind(this)),this.rhsubscribe(Object(Pn.a)("KEY_SHOW_TO_TOP"),this.setShowToTop.bind(this)),this.rhsubscribe(Object(Pn.a)("KEY_SHOW_FULL_SCREEN"),this.setShowFullScreen.bind(this)),this.setfavIconClasses(),this.fullScreenMode=Ln.a.get(Object(Pn.a)("DESKTOP_TOPIC_ONLY_MODE")),this.model.showFav=Ln.a.get(Object(Pn.a)("COOKIES_STATUS"))||!1,this.setfullScreenStatus(),this.widget.setState({model:this.model})}},{key:"initEventHandler",value:function(){this.eventHandler=new dr.a,this.eventHandler.toString=function(){return"RightPanel Event Handler"}}},{key:"handleEvt",value:function(t){t&&t.previousTabId;this.activeTabId=t&&t.activeTabId;var e=t&&t.isCreated;this.widgetOpenMode=t&&t.widgetOpenMode;var n=t&&t.props;this.widgetOpenMode?(this.model.rightPanelBtnsClass=At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE,this.model.minitocExtraClass=At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE,this.rightPanelNode.classList.remove(At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE),this.hideOtherWidgets(this.activeTabId),e?this.hide(this.activeTabId,!1):this.appendElement(C.a.get(Nr,this.activeTabId),n)):(this.model.rightPanelBtnsClass="",this.model.minitocExtraClass=this.fullScreenMode?At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE:"",e&&this.hide(this.activeTabId,!0),"KEY_SCREEN_PHONE"===this.activeScreen&&this.rightPanelNode.classList.add(At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE)),this.widget.setState({model:this.model})}},{key:"appendElement",value:function(t,e){C.a.get(this.widget,"props.config").items.push({component:"widget",id:t,props:e}),this.widget.setState({model:this.model})}},{key:"hide",value:function(t,e){var n=C.a.get(this.$el,"current").querySelector(".".concat(C.a.get(Fr,t)));return!e||this.parentEventHandler.next("TOOL_BAR_UNSELECT_EVT",t),n?e?n.classList.add(At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE):n.classList.remove(At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE):null}},{key:"hideOtherWidgets",value:function(t){var e=this,n=C.a.get(this.$el,"current");C.a.each(Fr,(function(r,i){if(i!==t){var o=n.querySelector(".".concat(r));!e.isHidden(o)&&e.hide(i,!0)}}))}},{key:"isHidden",value:function(t){return t&&t.classList.contains(At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE)}},{key:"setScreen",value:function(t){switch(this.activeScreen=t,t){case"KEY_SCREEN_DESKTOP":this.rightPanelNode.classList.remove(At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE);break;case"KEY_SCREEN_PHONE":this.widgetOpenMode?this.rightPanelNode.classList.remove(At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE):this.rightPanelNode.classList.add(At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE),this.setDesktopView(!1)}this.widget.setState({model:this.model})}},{key:"isSaved",value:function(){var t=C.a.getTopicUrlRelToMP(Ln.a.get(Object(Pn.a)("KEY_MASTER_PROJECT_PATH"))),e=Ln.a.get(Object(Pn.a)("FAVLIST"));return C.a.find(e,(function(e){return e.topic===t}))}},{key:"toggleFav",value:function(){Ln.a.publish(Object(Pn.a)("TOGGLE_FAVOURITE_TOPIC"),C.a.getTopicUrlRelToMP(Ln.a.get(Object(Pn.a)("KEY_MASTER_PROJECT_PATH"))))}},{key:"updateFavIcon",value:function(){this.setfavIconClasses(),this.widget.setState({model:this.model})}},{key:"handleTopicOnlyMode",value:function(t){this.fullScreenMode=t,this.setfullScreenStatus()}},{key:"setfullScreenStatus",value:function(){this.fullScreenMode?this.model.screenModeClasses.push("RH-LAYOUT-RIGHTPANEL-regular-screen-button"):C.a.remove(this.model.screenModeClasses,(function(t){return"RH-LAYOUT-RIGHTPANEL-regular-screen-button"===t})),this.model.show=!this.fullScreenMode,this.model.minitocExtraClass=this.model.show?"":At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE,this.widget.setState({model:this.model})}}]),r}(Ie.a);function Hr(){if("undefined"==typeof Reflect||!i.a)return!1;if(i.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(i()(Date,[],(function(){}))),!0}catch(t){return!1}}var Ur=function(t){S()(r,t);var e,n=(e=r,function(){var t,n=b()(e);if(Hr()){var r=b()(this).constructor;t=i()(n,arguments,r)}else t=n.apply(this,arguments);return y()(this,t)});function r(){var t;f()(this,r);for(var e=arguments.length,i=new Array(e),o=0;o0&&n.filterChildData(t.keys,e)}))}},{key:"filterChildData",value:function(t,e){var n=this;C.a.each(t,(function(t){"key"===t.type&&(C.a.startsWith(C.a.toLower(t.name),C.a.toLower(e))&&n.expandToTop(t),t.keys&&t.keys.length>0&&n.filterChildData(t.keys,e))}))}},{key:"expandToTop",value:function(t){if(t){var e=t.parent;e?(e.expanded=!0,this.expandToTop(e)):this.filterDataList.push(t)}}},{key:"textIsChanging",value:function(t){var e=C.a.get(t,"data");this.model.text=e;var n=C.a.slice(this.fullData);this.filterData(n,e),this.model.data=this.filterDataList,this.setTreeState()}},{key:"handleScroll",value:function(t){var e=t.currentTarget;t.preventDefault(),e.scrollHeight,e.scrollTop,e.clientHeight}}]),r}(Ie.a);function Gr(){if("undefined"==typeof Reflect||!i.a)return!1;if(i.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(i()(Date,[],(function(){}))),!0}catch(t){return!1}}var Vr=function(t){S()(r,t);var e,n=(e=r,function(){var t,n=b()(e);if(Gr()){var r=b()(this).constructor;t=i()(n,arguments,r)}else t=n.apply(this,arguments);return y()(this,t)});function r(){var t;f()(this,r);for(var e=arguments.length,i=new Array(e),o=0;o=0;n--){var r=t[n];if(C.a.get(r,"link")!==C.a.get(t[e],"link"))return r}}}]),r}(Ie.a);function vi(){if("undefined"==typeof Reflect||!i.a)return!1;if(i.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(i()(Date,[],(function(){}))),!0}catch(t){return!1}}var mi=function t(){f()(this,t),k()(this,"tocBookData",void 0)},gi=function(t){S()(r,t);var e,n=(e=r,function(){var t,n=b()(e);if(vi()){var r=b()(this).constructor;t=i()(n,arguments,r)}else t=n.apply(this,arguments);return y()(this,t)});function r(){return f()(this,r),n.apply(this,arguments)}return p()(r,[{key:"registerCommands",value:function(){var t=this;this.subscribe({key:"onDrillDown",next:function(e){return t.drillDown.bind(t)(e)}})}},{key:"initModel",value:function(){this.model=new mi}},{key:"initEventHandler",value:function(){this.eventHandler=new dr.a}},{key:"initWidget",value:function(){var t=P.a.params(),e=t[At.a.URL_PARAMS.KEY],n=t[At.a.URL_PARAMS.REF];return e&&n?this.createTocDrillDownPage(null,n,e):this.createTocDrillDownPage(null,null,null,!0)}},{key:"createTocDrillDownPage",value:function(t,e,n){var r,i=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=On.a.subject;o?(I.a.model.get(I.a.consts("KEY_MASTER_PROJECT_LIST")),kr.getMasterTocs().subscribe((function(t){var e=C.a.flatten(C.a.map(t,(function(t){return t.tocItems})));i.model.tocBookData=e,I.a.model.publish(I.a.consts("TOC_FIRST_LEVEL"),C.a.filter(i.model.tocBookData,{type:"item"})),i.widget.setState({model:i.model}),a.next(i.model.tocBookData)}))):(e&&n?r=kr.getNonProjData(n,e,e):(e=e||C.a.get(t,"ref"),n=n||C.a.get(t,"key"),r=C.a.get(t,"ref")?kr.getNonProjData(n,e,e):kr.getNonProjData(n)),r.subscribe((function(t){var e=t.projectItems;kr.getProjItemsData(e).subscribe((function(e){C.a.each(e,(function(e){var n=e.itemData,r=e.projPath;t.tocItems=kr.fitAtPlace(t.tocItems,n,r)})),i.model.tocBookData=t.tocItems,I.a.model.publish(I.a.consts("TOC_FIRST_LEVEL"),C.a.filter(i.model.tocBookData,{type:"item"})),i.widget.setState({model:i.model}),a.next(i.model.tocBookData)}))})));return a}},{key:"getRelPath",value:function(t){var e=t.url,n=I.a.model.get(I.a.consts("KEY_MASTER_PROJECT_PATH")),r=P.a.makeFullPath(C.a.getTopicUrlRelToMP(n),C.a.getMasterHostFolder(n)),i=P.a.makeFullPath(e,r);return P.a.makeRelativePath(i,C.a.getMasterHostFolder(n))}},{key:"drillDown",value:function(t){var e=C.a.get(t,"item");e.updateBookInfo(!0),this.updateURLParam(e)}},{key:"updateURLParam",value:function(t){var e=P.a.params();e[At.a.URL_PARAMS.KEY]=t.key,e[At.a.URL_PARAMS.REF]=t.ref;var n=P.a.updateUrlParams(encodeURI(C.a.getUrl()),e);C.a.setUrl(n,!1)}}]),r}(Ie.a);function yi(){if("undefined"==typeof Reflect||!i.a)return!1;if(i.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(i()(Date,[],(function(){}))),!0}catch(t){return!1}}var _i=function t(){f()(this,t)},bi=function(t){S()(r,t);var e,n=(e=r,function(){var t,n=b()(e);if(yi()){var r=b()(this).constructor;t=i()(n,arguments,r)}else t=n.apply(this,arguments);return y()(this,t)});function r(){return f()(this,r),n.apply(this,arguments)}return p()(r,[{key:"registerCommands",value:function(){}},{key:"initModel",value:function(){this.model=new _i}},{key:"initEventHandler",value:function(){this.eventHandler=new dr.a}}]),r}(Ie.a);function Ei(){if("undefined"==typeof Reflect||!i.a)return!1;if(i.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(i()(Date,[],(function(){}))),!0}catch(t){return!1}}var Si=function(t){S()(r,t);var e,n=(e=r,function(){var t,n=b()(e);if(Ei()){var r=b()(this).constructor;t=i()(n,arguments,r)}else t=n.apply(this,arguments);return y()(this,t)});function r(){var t;f()(this,r);for(var e=arguments.length,i=new Array(e),o=0;o0,this.widget.setState({model:this.model})}}]),r}(Ie.a);function Ui(){if("undefined"==typeof Reflect||!i.a)return!1;if(i.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(i()(Date,[],(function(){}))),!0}catch(t){return!1}}var ji=function(t){S()(r,t);var e,n=(e=r,function(){var t,n=b()(e);if(Ui()){var r=b()(this).constructor;t=i()(n,arguments,r)}else t=n.apply(this,arguments);return y()(this,t)});function r(){return f()(this,r),n.apply(this,arguments)}return p()(r,[{key:"registerCommands",value:function(){}},{key:"handleSelection",value:function(t){this.model.name&&(this.model.extraClass=this.model.index===t?"RH-LAYOUT-CENTERPANEL-search-prediction-item-selected":""),this.widget.setState({model:this.model})}},{key:"initWidget",value:function(){this.rhsubscribe(I.a.consts("SELECTED_PREDICTION"),this.handleSelection.bind(this))}}]),r}(Ie.a),Bi=n(884),Yi=n.n(Bi);function Wi(){if("undefined"==typeof Reflect||!i.a)return!1;if(i.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(i()(Date,[],(function(){}))),!0}catch(t){return!1}}var Ki=function(t){S()(r,t);var e,n=(e=r,function(){var t,n=b()(e);if(Wi()){var r=b()(this).constructor;t=i()(n,arguments,r)}else t=n.apply(this,arguments);return y()(this,t)});function r(){return f()(this,r),n.apply(this,arguments)}return p()(r,[{key:"registerCommands",value:function(){this.subscribe({key:"closeSearchResults",next:function(){return I.a.model.publish(I.a.consts("EVT_SEARCH_RESULTS_CLOSE"),{close:!0})}})}},{key:"updateResults",value:function(t){C.a.get(this.$el,"current").classList.remove(At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE),C.a.first(document.getElementsByClassName("RH-LAYOUT-HOMEPAGE-TOC-toc-list")).classList.add(At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE),Yi()(b()(r.prototype),"updateSearchResults",this).call(this,t)}},{key:"showPopover",value:function(t){t?C.a.get(this.$el,"current").classList.remove(At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE):(C.a.get(this.$el,"current").classList.add(At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE),C.a.first(document.getElementsByClassName("RH-LAYOUT-HOMEPAGE-TOC-toc-list")).classList.remove(At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE)),this.widget.setState({model:this.model})}},{key:"initModel",value:function(){this.model=new Zr,this.model.divInitClass=At.a.CSS_DEFAULT_CLASSES.FRAMELESS_HIDE,this.showPopover=this.showPopover.bind(this)}},{key:"initWidget",value:function(){var t=this;this.rhsubscribe(I.a.consts("KEY_SEARCH_RESULTS"),this.updateResults.bind(this)),this.rhsubscribe(I.a.consts("EVT_SEARCH_RESULTS_CLOSE"),(function(e){t.showPopover(!1),t.closeResults(e)})),this.rhsubscribe(I.a.consts("KEY_SHOW_CONTEXT"),this.showSearchContext.bind(this))}}]),r}(ti);function Gi(){if("undefined"==typeof Reflect||!i.a)return!1;if(i.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(i()(Date,[],(function(){}))),!0}catch(t){return!1}}var Vi=function(t){S()(r,t);var e,n=(e=r,function(){var t,n=b()(e);if(Gi()){var r=b()(this).constructor;t=i()(n,arguments,r)}else t=n.apply(this,arguments);return y()(this,t)});function r(){var t;f()(this,r);for(var e=arguments.length,i=new Array(e),o=0;o]*>)/g,d=/\$([$&`']|\d\d?)/g;n(162)("replace",2,(function(t,e,n,p){return[function(r,i){var o=t(this),a=null==r?void 0:r[e];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},function(t,e){var i=p(n,t,this,e);if(i.done)return i.value;var h=r(t),f=String(this),d="function"==typeof e;d||(e=String(e));var m=h.global;if(m){var g=h.unicode;h.lastIndex=0}for(var y=[];;){var _=u(h,f);if(null===_)break;if(y.push(_),!m)break;""===String(_[0])&&(h.lastIndex=s(f,o(h.lastIndex),g))}for(var b,E="",S=0,T=0;T=S&&(E+=f.slice(S,x)+R,S=x+k.length)}return E+f.slice(S)}];function v(t,e,r,o,a,s){var u=r+t.length,c=o.length,l=d;return void 0!==a&&(a=i(a),l=f),n.call(s,l,(function(n,i){var s;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(u);case"<":s=a[i.slice(1,-1)];break;default:var l=+i;if(0===l)return n;if(l>c){var f=h(l/10);return 0===f?n:f<=c?void 0===o[f-1]?i.charAt(1):o[f-1]+i.charAt(1):n}s=o[l-1]}return void 0===s?"":s}))}}))},function(t,e,n){var r=n(59);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(134),i=n(90),o=n(49),a=n(80),s=n(47),u=n(284),c=Object.getOwnPropertyDescriptor;e.f=n(34)?c:function(t,e){if(t=o(t),e=a(e,!0),u)try{return c(t,e)}catch(t){}if(s(t,e))return i(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(10),i=n(33),o=n(24);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o((function(){n(1)})),"Object",a)}},function(t,e,n){var r=n(58),i=n(133),o=n(41),a=n(32),s=n(300);t.exports=function(t,e){var n=1==t,u=2==t,c=3==t,l=4==t,h=6==t,f=5==t||h,d=e||s;return function(e,s,p){for(var v,m,g=o(e),y=i(g),_=r(s,p,3),b=a(y.length),E=0,S=n?d(e,b):u?d(e,0):void 0;b>E;E++)if((f||E in y)&&(m=_(v=y[E],E,g),t))if(n)S[E]=m;else if(m)switch(t){case 3:return!0;case 5:return v;case 6:return E;case 2:S.push(v)}else if(l)return!1;return h?-1:c||l?l:S}}},function(t,e,n){"use strict";var r=n(10),i=n(63)(5),o=!0;"find"in[]&&Array(1).find((function(){o=!1})),r(r.P+r.F*o,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(98)("find")},function(t,e,n){var r=n(51),i=n(315),o=n(223),a=Object.defineProperty;e.f=n(69)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){var r=n(328);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},function(t,e,n){var r=n(335),i=n(241),o=n(54);t.exports=function(t){return o(t)?r(t):i(t)}},function(t,e,n){t.exports=!n(82)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=n(372),o=n(148),a=n(375),s=n(256),u=function(t){function e(e,n,r){switch(t.call(this),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=a.empty;break;case 1:if(!e){this.destination=a.empty;break}if("object"==typeof e){if(l(e)){var i=e[s.rxSubscriber]();this.syncErrorThrowable=i.syncErrorThrowable,this.destination=i,i.add(this)}else this.syncErrorThrowable=!0,this.destination=new c(this,e);break}default:this.syncErrorThrowable=!0,this.destination=new c(this,e,n,r)}}return r(e,t),e.prototype[s.rxSubscriber]=function(){return this},e.create=function(t,n,r){var i=new e(t,n,r);return i.syncErrorThrowable=!1,i},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parent,e=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=e,this},e}(o.Subscription);e.Subscriber=u;var c=function(t){function e(e,n,r,o){var s;t.call(this),this._parentSubscriber=e;var u=this;i.isFunction(n)?s=n:n&&(s=n.next,r=n.error,o=n.complete,n!==a.empty&&(u=Object.create(n),i.isFunction(u.unsubscribe)&&this.add(u.unsubscribe.bind(u)),u.unsubscribe=this.unsubscribe.bind(this))),this._context=u,this._next=s,this._error=r,this._complete=o}return r(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber;if(this._error)e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else{if(!e.syncErrorThrowable)throw this.unsubscribe(),t;e.syncErrorValue=t,e.syncErrorThrown=!0,this.unsubscribe()}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){throw this.unsubscribe(),t}},e.prototype.__tryOrSetError=function(t,e,n){try{e.call(this._context,n)}catch(e){return t.syncErrorValue=e,t.syncErrorThrown=!0,!0}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(u);function l(t){return t instanceof u||"syncErrorThrowable"in t&&t[s.rxSubscriber]}},function(t,e,n){var r=n(35).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||n(34)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){"use strict";if(n(34)){var r=n(92),i=n(23),o=n(24),a=n(10),s=n(166),u=n(221),c=n(58),l=n(116),h=n(90),f=n(48),d=n(117),p=n(60),v=n(32),m=n(311),g=n(94),y=n(80),_=n(47),b=n(135),E=n(26),S=n(41),T=n(214),k=n(95),x=n(97),w=n(96).f,C=n(216),O=n(91),A=n(29),R=n(63),L=n(156),P=n(137),I=n(127),D=n(114),N=n(159),F=n(115),M=n(217),H=n(302),U=n(35),j=n(61),B=U.f,Y=j.f,W=i.RangeError,K=i.TypeError,G=i.Uint8Array,V=Array.prototype,z=u.ArrayBuffer,q=u.DataView,$=R(0),Q=R(2),X=R(3),J=R(4),Z=R(5),tt=R(6),et=L(!0),nt=L(!1),rt=I.values,it=I.keys,ot=I.entries,at=V.lastIndexOf,st=V.reduce,ut=V.reduceRight,ct=V.join,lt=V.sort,ht=V.slice,ft=V.toString,dt=V.toLocaleString,pt=A("iterator"),vt=A("toStringTag"),mt=O("typed_constructor"),gt=O("def_constructor"),yt=s.CONSTR,_t=s.TYPED,bt=s.VIEW,Et=R(1,(function(t,e){return wt(P(t,t[gt]),e)})),St=o((function(){return 1===new G(new Uint16Array([1]).buffer)[0]})),Tt=!!G&&!!G.prototype.set&&o((function(){new G(1).set({})})),kt=function(t,e){var n=p(t);if(n<0||n%e)throw W("Wrong offset!");return n},xt=function(t){if(E(t)&&_t in t)return t;throw K(t+" is not a typed array!")},wt=function(t,e){if(!E(t)||!(mt in t))throw K("It is not a typed array constructor!");return new t(e)},Ct=function(t,e){return Ot(P(t,t[gt]),e)},Ot=function(t,e){for(var n=0,r=e.length,i=wt(t,r);r>n;)i[n]=e[n++];return i},At=function(t,e,n){B(t,e,{get:function(){return this._d[n]}})},Rt=function(t){var e,n,r,i,o,a,s=S(t),u=arguments.length,l=u>1?arguments[1]:void 0,h=void 0!==l,f=C(s);if(null!=f&&!T(f)){for(a=f.call(s),r=[],e=0;!(o=a.next()).done;e++)r.push(o.value);s=r}for(h&&u>2&&(l=c(l,arguments[2],2)),e=0,n=v(s.length),i=wt(this,n);n>e;e++)i[e]=h?l(s[e],e):s[e];return i},Lt=function(){for(var t=0,e=arguments.length,n=wt(this,e);e>t;)n[t]=arguments[t++];return n},Pt=!!G&&o((function(){dt.call(new G(1))})),It=function(){return dt.apply(Pt?ht.call(xt(this)):xt(this),arguments)},Dt={copyWithin:function(t,e){return H.call(xt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return J(xt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return M.apply(xt(this),arguments)},filter:function(t){return Ct(this,Q(xt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return Z(xt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(xt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){$(xt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return nt(xt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return et(xt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ct.apply(xt(this),arguments)},lastIndexOf:function(t){return at.apply(xt(this),arguments)},map:function(t){return Et(xt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return st.apply(xt(this),arguments)},reduceRight:function(t){return ut.apply(xt(this),arguments)},reverse:function(){for(var t,e=xt(this).length,n=Math.floor(e/2),r=0;r1?arguments[1]:void 0)},sort:function(t){return lt.call(xt(this),t)},subarray:function(t,e){var n=xt(this),r=n.length,i=g(t,r);return new(P(n,n[gt]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,v((void 0===e?r:g(e,r))-i))}},Nt=function(t,e){return Ct(this,ht.call(xt(this),t,e))},Ft=function(t){xt(this);var e=kt(arguments[1],1),n=this.length,r=S(t),i=v(r.length),o=0;if(i+e>n)throw W("Wrong length!");for(;o255?255:255&r),i.v[d](n*e+i.o,r,St)}(this,n,t)},enumerable:!0})};_?(p=n((function(t,n,r,i){l(t,p,c,"_d");var o,a,s,u,h=0,d=0;if(E(n)){if(!(n instanceof z||"ArrayBuffer"==(u=b(n))||"SharedArrayBuffer"==u))return _t in n?Ot(p,n):Rt.call(p,n);o=n,d=kt(r,e);var g=n.byteLength;if(void 0===i){if(g%e)throw W("Wrong length!");if((a=g-d)<0)throw W("Wrong length!")}else if((a=v(i)*e)+d>g)throw W("Wrong length!");s=a/e}else s=m(n),o=new z(a=s*e);for(f(t,"_d",{b:o,o:d,l:a,e:s,v:new q(o)});h1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(10),i=n(156)(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(98)("includes")},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(4),i=n.n(r),o=n(5),a=n.n(o),s=n(20),u=1,c=3,l=function(){function t(){i()(this,t)}return a()(t,null,[{key:"removeChild",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.parentNode(e);return n&&n.removeChild&&n.removeChild(e)}},{key:"appendChild",value:function(t,e){return t&&t.appendChild&&t.appendChild(e)}},{key:"parentNode",value:function(t){return t&&t.parentNode}},{key:"childNodes",value:function(t){return t&&t.childNodes||[]}},{key:"toHtmlNode",value:function(e){return t.childNodes(s.a.createNode("div",e))}},{key:"outerHTML",value:function(t){return t&&t.outerHTML||""}},{key:"innerHTML",value:function(t,e){return t&&(t.innerHTML=e)}},{key:"innerText",value:function(t,e){return t&&(t.innerText=e)}},{key:"getInnerText",value:function(t){return t&&t.innerText}},{key:"insertAfter",value:function(t,e){return t.parentNode.insertBefore(e,t.nextSibling)}},{key:"value",value:function(t){return t&&t.nodeValue}},{key:"nodeName",value:function(t){return t&&t.nodeName}},{key:"type",value:function(t){return t&&t.nodeType}},{key:"isElementNode",value:function(e){return t.type(e)===u}},{key:"isTextNode",value:function(e){return t.type(e)===c}}]),t}()},function(t,e,n){var r=n(26);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(91)("meta"),i=n(26),o=n(47),a=n(35).f,s=0,u=Object.isExtensible||function(){return!0},c=!n(24)((function(){return u(Object.preventExtensions({}))})),l=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},h=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!u(t))return"F";if(!e)return"E";l(t)}return t[r].i},getWeak:function(t,e){if(!o(t,r)){if(!u(t))return!0;if(!e)return!1;l(t)}return t[r].w},onFreeze:function(t){return c&&h.NEED&&u(t)&&!o(t,r)&&l(t),t}}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(121);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){"use strict";(function(t){var n="undefined"!=typeof window&&window,r="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,i=n||void 0!==t&&t||r;e.root=i,function(){if(!i)throw new Error("RxJS could not find any global context (window, self, global)")}()}).call(this,n(102))},function(t,e,n){"use strict";var r=n(212),i=n(25),o=n(137),a=n(219),s=n(32),u=n(161),c=n(218),l=n(24),h=Math.min,f=[].push,d="length",p=!l((function(){RegExp(4294967295,"y")}));n(162)("split",2,(function(t,e,n,l){var v;return v="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[d]||2!="ab".split(/(?:ab)*/)[d]||4!=".".split(/(.?)(.?)/)[d]||".".split(/()()/)[d]>1||"".split(/.?/)[d]?function(t,e){var i=String(this);if(void 0===t&&0===e)return[];if(!r(t))return n.call(i,t,e);for(var o,a,s,u=[],l=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),h=0,p=void 0===e?4294967295:e>>>0,v=new RegExp(t.source,l+"g");(o=c.call(v,i))&&!((a=v.lastIndex)>h&&(u.push(i.slice(h,o.index)),o[d]>1&&o.index=p));)v.lastIndex===o.index&&v.lastIndex++;return h===i[d]?!s&&v.test("")||u.push(""):u.push(i.slice(h)),u[d]>p?u.slice(0,p):u}:"0".split(void 0,0)[d]?function(t,e){return void 0===t&&0===e?[]:n.call(this,t,e)}:n,[function(n,r){var i=t(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,i,r):v.call(String(i),n,r)},function(t,e){var r=l(v,t,this,e,v!==n);if(r.done)return r.value;var c=i(t),f=String(this),d=o(c,RegExp),m=c.unicode,g=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(p?"y":"g"),y=new d(p?c:"^(?:"+c.source+")",g),_=void 0===e?4294967295:e>>>0;if(0===_)return[];if(0===f.length)return null===u(y,f)?[f]:[];for(var b=0,E=0,S=[];E1?arguments[1]:void 0,e.length)),r=String(t);return a?a.call(e,r,n):e.slice(n,n+r.length)===r}})},function(t,e,n){var r=n(107);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var r=n(65),i=n(138);t.exports=n(69)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports=!1},function(t,e,n){var r=n(286),i=n(201);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){var r=n(60),i=Math.max,o=Math.min;t.exports=function(t,e){return(t=r(t))<0?i(t+e,0):o(t,e)}},function(t,e,n){var r=n(25),i=n(287),o=n(201),a=n(200)("IE_PROTO"),s=function(){},u=function(){var t,e=n(198)("iframe"),r=o.length;for(e.style.display="none",n(202).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("