Skip to content

Instantly share code, notes, and snippets.

@faisalhmohd
Created July 8, 2020 10:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save faisalhmohd/e356d37d7da350a136d9d526bbfef4d1 to your computer and use it in GitHub Desktop.
Save faisalhmohd/e356d37d7da350a136d9d526bbfef4d1 to your computer and use it in GitHub Desktop.
Flite Code
/*!
* Source version: FLITE_VERSION
* Copyright (C) 2018 LoopIndex - All Rights Reserved
* You may use, distribute and modify this code under the
* terms of the LoopIndex Comments CKEditor plugin license.
* Attributions
*
* Rangy library:
* Copyright 2018, Tim Down
* https://github.com/timdown/rangy
* license: MIT
*
* jQuery
* Copyright JS Foundation and other contributors, https://js.foundation/
* https://github.com/jquery/jquery
* license: MIT
*
* Opentip adapter
* Copyright (c) 2018, Matias Meno
* http://www.opentip.org
* license: MIT
*
* Mutation summary
* Copyright (c) 2018 Rafael Weinstein
* https://github.com/rafaelw/mutation-summary
* license: Apache
*
* Popper.js
* Copyright © 2016 Federico Zivolo and contributors
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the “Software”),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
* tippy.js
* Copyright (c) 2017 atomiks
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*
* ice code:
* inspired by work by Matthew DeLambo, The New York Times, CMS Group
* https://github.com/NYTimes/ice
*
* You should have received a copy of the LoopIndex FLITE CKEditor plugin license with
* this file. If not, please write to: contact@loopindex.com, or visit http://www.loopindex.com
*
* written by (David *)Frenkiel (https://github.com/imdfl)
*
* LICENSES
*
* The MIT License (MIT)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* Apache license: see http://www.apache.org/licenses/
*/!function(n){var r={};function i(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.m=n,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=0)}([function(e,F,t){!function(){"use strict";var e,t,n,r,i;e=window,t=window.jQuery,e.FLITE=t.extend(e.FLITE||{},{Logger:(n={log:!1,debug:!1,warn:!1,error:!1,trace:!1},{_logs:[],config:function(e){return t.extend(n,e),t.extend({},n)},ignore:function(){},log:function(){n.log&&this._log("log",Array.prototype.slice.call(arguments))},error:function(){n.error&&this._log("error",Array.prototype.slice.call(arguments))},debug:function(){n.debug&&this._log("log",Array.prototype.slice.call(arguments))},trace:function(){if(n.trace){var e=Error().stack,t=e?[e.replace("Error","Debug:"),"\n"]:[];this._log("log",t.concat(Array.prototype.slice.call(arguments)))}},warn:function(){this._log("warn",Array.prototype.slice.call(arguments))},_log:function(e,t){var n=new Date,r=[n.getMinutes(),n.getSeconds(),n.getMilliseconds()].join(":");t.unshift(r+">"),this._logs.push({method:e,logs:t}),this.scheduleDump()},dump:function(){var e=this._logs;this._logs=[],e.forEach(function(e){console[e.method].apply(console,e.logs)})},timeout:null,scheduleDump:function(){this.timeout||(this.timeout=setTimeout(function(){this.timeout=null,this.dump()}.bind(this),100))}})}),e.FLITE.logger=e.FLITE.Logger,e.exports=e.exports||{},r=function(fe){var r="object",i="function",n="undefined",l=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],d=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],t=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],o=["collapse","compareEndPoints","duplicate","moveToElementText","parentElement","select","setEndPoint","getBoundingClientRect"];function c(e,t){var n=typeof e[t];return n==i||!(n!=r||!e[t])||"unknown"==n}function a(e,t){return!(typeof e[t]!=r||!e[t])}function e(e,t){return typeof e[t]!=n}function s(r){return function(e,t){for(var n=t.length;n--;)if(!r(e,t[n]))return!1;return!0}}var p=s(c),u=s(a),h=s(e);function f(e){return e&&p(e,o)&&h(e,t)}function g(e){return a(e,"body")?e.body:e.getElementsByTagName("body")[0]}var m,v,y={},_=typeof window!=n&&typeof document!=n,N={isHostMethod:c,isHostObject:a,isHostProperty:e,areHostMethods:p,areHostObjects:u,areHostProperties:h,isTextRange:f,getBody:g,forEach:[].forEach?function(e,t){e.forEach(t)}:function(e,t){for(var n=0,r=e.length;n<r;++n)t(e[n],n)}},b={version:"1.3.0",initialized:!1,isBrowser:_,supported:!0,util:N,features:{},modules:y,config:{alertOnFail:!1,alertOnWarn:!1,preferTextRange:!1,autoInitialize:typeof rangyAutoInitialize==n||rangyAutoInitialize}};function C(e){typeof console!=n&&c(console,"log")&&console.log(e)}function E(e,t){_&&t?alert(e):C(e)}function T(e){fe.Logger.log("rangy module fail",e),b.initialized=!0,b.supported=!1,E("Rangy is not supported in this environment. Reason: "+e,b.config.alertOnFail)}b.fail=T,b.warn=function(e){E("Rangy warning: "+e,b.config.alertOnWarn)},!{}.hasOwnProperty?T("hasOwnProperty not supported"):(N.extend=m=function(e,t,n){var r,i;for(var o in t)t.hasOwnProperty(o)&&(r=e[o],i=t[o],n&&null!==r&&"object"==typeof r&&null!==i&&"object"==typeof i&&m(r,i,!0),e[o]=i);return t.hasOwnProperty("toString")&&(e.toString=t.toString),e},N.createOptions=function(e,t){var n={};return m(n,t),e&&m(n,e),n}),_||T("Rangy can only run in a browser"),function(){var e;if(_){var t=document.createElement("div");t.appendChild(document.createElement("span"));var n=[].slice;try{1==n.call(t.childNodes,0)[0].nodeType&&(e=function(e){return n.call(e,0)})}catch(e){}}e=e||function(e){for(var t=[],n=0,r=e.length;n<r;++n)t[n]=e[n];return t},N.toArray=e}(),_&&(c(document,"addEventListener")?v=function(e,t,n){e.addEventListener(t,n,!1)}:c(document,"attachEvent")?v=function(e,t,n){e.attachEvent("on"+t,n)}:T("Document does not have required addEventListener or attachEvent method"),N.addListener=v);var S=[];function k(e){return e.message||e.description||String(e)}function w(){if(_&&!b.initialized){var e,t=!1,n=!1;c(document,"createRange")&&(e=document.createRange(),p(e,d)&&h(e,l)&&(t=!0));var r=g(document);if(r&&"body"==r.nodeName.toLowerCase())if(r&&c(r,"createTextRange")&&f(e=r.createTextRange())&&(n=!0),t||n){var i;for(var o in b.initialized=!0,b.features={implementsDomRange:t,implementsTextRange:n},y)(i=y[o])instanceof D&&i.init(i,b);for(var a=0,s=S.length;a<s;++a)try{S[a](b)}catch(e){C("Rangy init listener threw an exception. Continuing. Detail: "+k(e))}}else T("Neither Range nor TextRange are available");else T("No body element found")}}function x(e,t,n){n&&(e+=" in module "+n.name),b.warn("DEPRECATED: "+e+" is deprecated. Please use "+t+" instead.")}function O(e,t,n,r){e[t]=function(){return x(t,n,r),e[n].apply(e,N.toArray(arguments))}}N.deprecationNotice=x,N.createAliasForDeprecatedMethod=O,b.init=w,b.addInitListener=function(e){b.initialized?e(b):S.push(e)};var R=[];function D(e,t,n){this.name=e,this.dependencies=t,this.initialized=!1,this.supported=!1,this.initializer=n}function A(t,e,n){var r=new D(t,e,function(e){if(!0!==e.initialized)try{n(b,e),e.supported=!0}catch(e){C("Module '"+t+"' failed to load: "+k(e)),e.stack&&C(e.stack)}});return y[t]=r}function I(){}b.addShimListener=function(e){R.push(e)},_&&(b.shim=b.createMissingNativeApi=function(e){e=e||window,w();for(var t=0,n=R.length;t<n;++t)R[t](e)},O(b,"createMissingNativeApi","shim")),D.prototype={init:function(){for(var e,t,n=this.dependencies||[],r=0,i=n.length;r<i;++r){if(!((e=y[t=n[r]])&&e instanceof D))throw new Error("required module '"+t+"' not found");if(e.init(),!e.supported)throw new Error("required module '"+t+"' not supported")}this.initializer(this),this.initialized=!0},fail:function(e){throw this.initialized=!0,this.supported=!1,new Error(e)},warn:function(e){b.warn("Module "+this.name+": "+e)},deprecationNotice:function(e,t){b.warn("DEPRECATED: "+e+" in module "+this.name+" is deprecated. Please use "+t+" instead")},createError:function(e){return new Error("Error in Rangy "+this.name+" module: "+e)}},b.createModule=function(e){var t,n=A(e,2===arguments.length?(t=arguments[1],[]):(t=arguments[2],arguments[1]),t);b.initialized&&b.supported&&n.init()},b.createCoreModule=function(e,t,n){A(e,t,n)},b.RangePrototype=I,b.rangePrototype=new I,b.selectionPrototype=new function(){},b.createCoreModule("DomUtil",[],function(n,d){var r="undefined",i=n.util,a=i.getBody;i.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||d.fail("document missing a Node creation method"),i.isHostMethod(document,"getElementsByTagName")||d.fail("document missing getElementsByTagName method");var e=document.createElement("div");i.areHostMethods(e,["insertBefore","appendChild","cloneNode"])||d.fail("Incomplete Element implementation"),i.isHostProperty(e,"innerHTML")||d.fail("Element is missing innerHTML property");var t=document.createTextNode("test");i.areHostMethods(t,["splitText","deleteData","insertData","appendData","cloneNode"])||d.fail("Incomplete Text Node implementation");var o=function(e,t){for(var n=e.length;n--;)if(e[n]===t)return!0;return!1};function c(e){for(var t=0;e=e.previousSibling;)++t;return t}function p(e,t){var n,r=[];for(n=e;n;n=n.parentNode)r.push(n);for(n=t;n;n=n.parentNode)if(o(r,n))return n;return null}function s(e,t,n){for(var r=n?t:t.parentNode;r;){if(r===e)return!0;r=r.parentNode}return!1}function u(e,t,n){for(var r,i=n?e:e.parentNode;i;){if((r=i.parentNode)===t)return i;i=r}return null}function l(e){var t=e.nodeType;return 3==t||4==t||8==t}function h(e,t){var n=t.nextSibling,r=t.parentNode;return n?r.insertBefore(e,n):r.appendChild(e),e}function f(e){if(9==e.nodeType)return e;if(typeof e.ownerDocument!=r)return e.ownerDocument;if(typeof e.document!=r)return e.document;if(e.parentNode)return f(e.parentNode);throw d.createError("getDocument: no document found for node")}function g(e){var t=f(e);if(typeof t.defaultView!=r)return t.defaultView;if(typeof t.parentWindow!=r)return t.parentWindow;throw d.createError("Cannot get a window object for node")}function m(e){if(typeof e.contentDocument!=r)return e.contentDocument;if(typeof e.contentWindow!=r)return e.contentWindow.document;throw d.createError("getIframeDocument: No Document object found for iframe element")}function v(e){return e&&i.isHostMethod(e,"setTimeout")&&i.isHostObject(e,"document")}var y,_=!1;function N(e){try{return e.parentNode,!1}catch(e){return!0}}function b(e){if(!e)return"[No node]";if(_&&N(e))return"[Broken node]";if(l(e))return'"'+e.data+'"';if(1!=e.nodeType)return e.nodeName;var t=e.id?' id="'+e.id+'"':"";return"<"+e.nodeName+t+">[index:"+c(e)+",length:"+e.childNodes.length+"]["+(e.innerHTML||"[innerHTML not supported]").slice(0,25)+"]"}function C(e){this.root=e,this._next=e}function E(e,t){this.node=e,this.offset=t}function T(e){this.code=this[e],this.codeName=e,this.message="DOMException: "+this.codeName}!function(){var e=document.createElement("b");e.innerHTML="1";var t=e.firstChild;e.innerHTML="<br />",_=N(t),n.features.crashyTextNodes=_}(),typeof window.getComputedStyle!=r?y=function(e,t){return g(e).getComputedStyle(e,null)[t]}:typeof document.documentElement.currentStyle!=r?y=function(e,t){return e.currentStyle?e.currentStyle[t]:""}:d.fail("No means of obtaining computed style properties found"),C.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var e,t,n=this._current=this._next;if(this._current)if(e=n.firstChild)this._next=e;else{for(t=null;n!==this.root&&!(t=n.nextSibling);)n=n.parentNode;this._next=t}return this._current},detach:function(){this._current=this._next=this.root=null}},E.prototype={equals:function(e){return!!e&&this.node===e.node&&this.offset==e.offset},inspect:function(){return"[DomPosition("+b(this.node)+":"+this.offset+")]"},toString:function(){return this.inspect()}},(T.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11,INVALID_NODE_TYPE_ERR:24}).toString=function(){return this.message},n.dom={arrayContains:o,isHtmlNamespace:function(e){var t;return typeof e.namespaceURI==r||null===(t=e.namespaceURI)||"http://www.w3.org/1999/xhtml"==t},parentElement:function(e){var t=e.parentNode;return 1==t.nodeType?t:null},getNodeIndex:c,getNodeLength:function(e){switch(e.nodeType){case 7:case 10:return 0;case 3:case 8:return e.length;default:return e.childNodes.length}},getCommonAncestor:p,isAncestorOf:s,isOrIsAncestorOf:function(e,t){return s(e,t,!0)},getClosestAncestorIn:u,isCharacterDataNode:l,isTextOrCommentNode:function(e){if(!e)return!1;var t=e.nodeType;return 3==t||8==t},insertAfter:h,splitDataNode:function(e,t,n){var r=e.cloneNode(!1);if(r.deleteData(0,t),e.deleteData(t,e.length-t),h(r,e),n)for(var i,o=0;i=n[o++];)i.node==e&&i.offset>t?(i.node=r,i.offset-=t):i.node==e.parentNode&&i.offset>c(e)&&++i.offset;return r},getDocument:f,getWindow:g,getIframeWindow:function(e){if(typeof e.contentWindow!=r)return e.contentWindow;if(typeof e.contentDocument!=r)return e.contentDocument.defaultView;throw d.createError("getIframeWindow: No Window object found for iframe element")},getIframeDocument:m,getBody:a,isWindow:v,getContentDocument:function(e,t,n){var r;if(e?i.isHostProperty(e,"nodeType")?r=1==e.nodeType&&"iframe"==e.tagName.toLowerCase()?m(e):f(e):v(e)&&(r=e.document):r=document,!r)throw t.createError(n+"(): Parameter must be a Window object or DOM node");return r},getRootContainer:function(e){for(var t;t=e.parentNode;)e=t;return e},comparePoints:function(e,t,n,r){var i,o,a,s,l;if(e==n)return t===r?0:t<r?-1:1;if(i=u(n,e,!0))return t<=c(i)?-1:1;if(i=u(e,n,!0))return c(i)<r?-1:1;if(!(o=p(e,n)))throw new Error("comparePoints error: nodes have no common ancestor");if((a=e===o?o:u(e,o,!0))===(s=n===o?o:u(n,o,!0)))throw d.createError("comparePoints got to case 4 and childA and childB are the same!");for(l=o.firstChild;l;){if(l===a)return-1;if(l===s)return 1;l=l.nextSibling}},isBrokenNode:N,inspectNode:b,getComputedStyleProperty:y,createTestElement:function(e,t,n){var r=a(e),i=e.createElement("div");i.contentEditable=""+!!n,t&&(i.innerHTML=t);var o=r.firstChild;return o?r.insertBefore(i,o):r.appendChild(i),i},removeNode:function(e){return e.parentNode.removeChild(e)},fragmentFromNodeChildren:function(e){for(var t,n=f(e).createDocumentFragment();t=e.firstChild;)n.appendChild(t);return n},createIterator:function(e){return new C(e)},DomPosition:E},n.DOMException=T}),b.createCoreModule("DomRange",["DomUtil"],function(a,e){var s=a.dom,r=a.util,t=s.DomPosition,l=a.DOMException,p=s.isCharacterDataNode,u=s.getNodeIndex,d=s.isOrIsAncestorOf,i=s.getDocument,h=s.comparePoints,c=s.splitDataNode,f=s.getClosestAncestorIn,g=s.getNodeLength,o=s.arrayContains,m=s.getRootContainer,n=a.features.crashyTextNodes,v=s.removeNode;function y(e,t){return 3!=e.nodeType&&(d(e,t.startContainer)||d(e,t.endContainer))}function _(e){return e.document||i(e.startContainer)}function N(e){return new t(e.parentNode,u(e))}function b(e){return new t(e.parentNode,u(e)+1)}function C(e,t,n){var r=11==e.nodeType?e.firstChild:e;return p(t)?n==t.length?s.insertAfter(e,t):t.parentNode.insertBefore(e,0==n?t:c(t,n)):n>=t.childNodes.length?t.appendChild(e):t.insertBefore(e,t.childNodes[n]),r}function E(e,t,n){if(G(e),G(t),_(t)!=_(e))throw new l("WRONG_DOCUMENT_ERR");var r=h(e.startContainer,e.startOffset,t.endContainer,t.endOffset),i=h(e.endContainer,e.endOffset,t.startContainer,t.startOffset);return n?r<=0&&0<=i:r<0&&0<i}function T(e,t,n){var r,i,o,a;for(n=n||{stop:!1};o=e.next();)if(e.isPartiallySelectedSubtree()){if(!1===t(o))return void(n.stop=!0);if(T(a=e.getSubtreeIterator(),t,n),a.detach(),n.stop)return}else for(r=s.createIterator(o);i=r.next();)if(!1===t(i))return void(n.stop=!0)}function S(e){for(var t;e.next();)e.isPartiallySelectedSubtree()?(S(t=e.getSubtreeIterator()),t.detach()):e.remove()}function k(e){for(var t,n,r=_(e.range).createDocumentFragment();t=e.next();){if(e.isPartiallySelectedSubtree()?(t=t.cloneNode(!1),n=e.getSubtreeIterator(),t.appendChild(k(n)),n.detach()):e.remove(),10==t.nodeType)throw new l("HIERARCHY_REQUEST_ERR");r.appendChild(t)}return r}function w(e){return"["+(void 0===e.getName?"Range":e.getName())+"("+s.inspectNode(e.startContainer)+":"+e.startOffset+", "+s.inspectNode(e.endContainer)+":"+e.endOffset+")]"}function x(e,t){if(this.range=e,this.clonePartiallySelectedTextNodes=t,!e.collapsed){this.sc=e.startContainer,this.so=e.startOffset,this.ec=e.endContainer,this.eo=e.endOffset;var n=e.commonAncestorContainer;this.sc===this.ec&&p(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=p(this.sc)?f(this.sc,n,!0):this.sc.childNodes[this.so],this._last=p(this.ec)?f(this.ec,n,!0):this.ec.childNodes[this.eo-1])}}x.prototype={_current:null,_next:null,_first:null,_last:null,isSingleCharacterDataNode:!1,reset:function(){this._current=null,this._next=this._first},hasNext:function(){return!!this._next},next:function(){var e=this._current=this._next;return e&&(this._next=e!==this._last?e.nextSibling:null,p(e)&&this.clonePartiallySelectedTextNodes&&(e===this.ec&&(e=e.cloneNode(!0)).deleteData(this.eo,e.length-this.eo),this._current===this.sc&&(e=e.cloneNode(!0)).deleteData(0,this.so))),e},remove:function(){var e,t,n=this._current;!p(n)||n!==this.sc&&n!==this.ec?n.parentNode&&v(n):(e=n===this.sc?this.so:0)!=(t=n===this.ec?this.eo:n.length)&&n.deleteData(e,t-e)},isPartiallySelectedSubtree:function(){return y(this._current,this.range)},getSubtreeIterator:function(){var e;if(this.isSingleCharacterDataNode)(e=this.range.cloneRange()).collapse(!1);else{e=new he(_(this.range));var t=this._current,n=t,r=0,i=t,o=g(t);d(t,this.sc)&&(n=this.sc,r=this.so),d(t,this.ec)&&(i=this.ec,o=this.eo),ue(e,n,r,i,o)}return new x(e,this.clonePartiallySelectedTextNodes)},detach:function(){this.range=this._current=this._next=this._first=this._last=this.sc=this.so=this.ec=this.eo=null}};var O=[1,3,4,5,7,8,10],R=[2,9,11],D=[1,3,4,5,7,8,10,11],A=[1,3,4,5,7,8];function I(i){return function(e,t){for(var n,r=t?e:e.parentNode;r;){if(n=r.nodeType,o(i,n))return r;r=r.parentNode}return null}}var L=I([9,11]),P=I([5,6,10,12]),M=I([6,10,12]);function B(e,t){if(M(e,t))throw new l("INVALID_NODE_TYPE_ERR")}function U(e,t){if(!o(t,e.nodeType))throw new l("INVALID_NODE_TYPE_ERR")}function F(e,t){if(t<0||t>(p(e)?e.length:e.childNodes.length))throw new l("INDEX_SIZE_ERR")}function H(e,t){if(L(e,!0)!==L(t,!0))throw new l("WRONG_DOCUMENT_ERR")}function j(e){if(P(e,!0))throw new l("NO_MODIFICATION_ALLOWED_ERR")}function W(e,t){if(!e)throw new l(t)}function V(e,t){return t<=(p(e)?e.length:e.childNodes.length)}function z(e){return!!e.startContainer&&!!e.endContainer&&!(n&&(s.isBrokenNode(e.startContainer)||s.isBrokenNode(e.endContainer)))&&m(e.startContainer)==m(e.endContainer)&&V(e.startContainer,e.startOffset)&&V(e.endContainer,e.endOffset)}function G(e){if(!z(e))throw new Error("Range error: Range is not valid. This usually happens after DOM mutation. Range: ("+e.inspect()+")")}var Y=document.createElement("style"),X=!1;try{Y.innerHTML="<b>x</b>",X=3==Y.firstChild.nodeType}catch(e){}var q=(a.features.htmlParsingConforms=X)?function(e){var t=this.startContainer,n=i(t);if(!t)throw new l("INVALID_STATE_ERR");var r=null;return 1==t.nodeType?r=t:p(t)&&(r=s.parentElement(t)),(r=null===r||"HTML"==r.nodeName&&s.isHtmlNamespace(i(r).documentElement)&&s.isHtmlNamespace(r)?n.createElement("body"):r.cloneNode(!1)).innerHTML=e,s.fragmentFromNodeChildren(r)}:function(e){var t=_(this).createElement("body");return t.innerHTML=e,s.fragmentFromNodeChildren(t)};function K(e,t){G(e);var n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,a=n===i;p(i)&&0<o&&o<i.length&&c(i,o,t),p(n)&&0<r&&r<n.length&&(n=c(n,r,t),a?(o-=r,i=n):i==n.parentNode&&o>=u(n)&&o++,r=0),e.setStartAndEnd(n,r,i,o)}function $(e){G(e);var t=e.commonAncestorContainer.parentNode.cloneNode(!1);return t.appendChild(e.cloneContents()),t.innerHTML}function J(e,t,n,r,i){if(!n||isNaN(Number(n)))return!1;var o=e.collapsed;switch(n=Number(n),t){case"char":return 0<n?e.moveCharRight(r,n,i):e.moveCharLeft(r,-1*n,i);case"word":default:throw new Error("move by 'word' not implemented")}o&&e.collapse(r)}var Q=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],Z=0,ee=1,te=2,ne=3,re=0,ie=1,oe=2,ae=3;function se(e){e.START_TO_START=Z,e.START_TO_END=ee,e.END_TO_END=te,e.END_TO_START=ne,e.NODE_BEFORE=re,e.NODE_AFTER=ie,e.NODE_BEFORE_AND_AFTER=oe,e.NODE_INSIDE=ae}function le(e){se(e),se(e.prototype)}function de(a,s){return function(){G(this);var e,t=this.startContainer,n=this.startOffset,r=this.commonAncestorContainer,i=new x(this,!0);t!==r&&(t=(e=b(f(t,r,!0))).node,n=e.offset),T(i,j),i.reset();var o=a(i);return i.detach(),s(this,t,n,t,n),o}}function ce(e,c){function t(n,r){return function(e){U(e,O),U(m(e),R);var t=(n?N:b)(e);(r?i:o)(this,t.node,t.offset)}}function i(e,t,n){var r=e.endContainer,i=e.endOffset;t===e.startContainer&&n===e.startOffset||(m(t)==m(r)&&1!=h(t,n,r,i)||(r=t,i=n),c(e,t,n,r,i))}function o(e,t,n){var r=e.startContainer,i=e.startOffset;t===e.endContainer&&n===e.endOffset||(m(t)==m(r)&&-1!=h(t,n,r,i)||(r=t,i=n),c(e,r,i,t,n))}function n(){}n.prototype=a.rangePrototype,e.prototype=new n,r.extend(e.prototype,{setStart:function(e,t){B(e,!0),F(e,t),i(this,e,t)},setEnd:function(e,t){B(e,!0),F(e,t),o(this,e,t)},setStartAndEnd:function(){var e=arguments,t=e[0],n=e[1],r=t,i=n;switch(e.length){case 3:i=e[2];break;case 4:r=e[2],i=e[3]}c(this,t,n,r,i)},setBoundary:function(e,t,n){this["set"+(n?"Start":"End")](e,t)},setStartBefore:t(!0,!0),setStartAfter:t(!1,!0),setEndBefore:t(!0,!1),setEndAfter:t(!1,!1),collapse:function(e){G(this),e?c(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):c(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(e){B(e,!0),c(this,e,0,e,g(e))},selectNode:function(e){B(e,!1),U(e,O);var t=N(e),n=b(e);c(this,t.node,t.offset,n.node,n.offset)},extractContents:de(k,c),deleteContents:de(S,c),canSurroundContents:function(){G(this),j(this.startContainer),j(this.endContainer);var e=new x(this,!0),t=e._first&&y(e._first,this)||e._last&&y(e._last,this);return e.detach(),!t},splitBoundaries:function(){K(this)},splitBoundariesPreservingPositions:function(e){K(this,e)},normalizeBoundaries:function(){G(this);function e(e){var t=e.nextSibling;t&&t.nodeType==e.nodeType&&(s=(a=e).length,e.appendData(t.data),v(t))}function t(e){var t=e.previousSibling;if(t&&t.nodeType==e.nodeType){var n=(i=e).length;if(o=t.length,e.insertData(0,t.data),v(t),i==a)s+=o,a=i;else if(a==e.parentNode){var r=u(e);s==r?(a=e,s=n):r<s&&s--}}}var n,i=this.startContainer,o=this.startOffset,a=this.endContainer,s=this.endOffset,r=!0;if(p(a))s==a.length?e(a):0==s&&(n=a.previousSibling)&&n.nodeType==a.nodeType&&(s=n.length,i==a&&(r=!1),n.appendData(a.data),v(a),a=n);else{if(0<s){var l=a.childNodes[s-1];l&&p(l)&&e(l)}r=!this.collapsed}if(r){if(p(i))0==o?t(i):o==i.length&&(n=i.nextSibling)&&n.nodeType==i.nodeType&&(a==n&&(s+=(a=i).length),i.appendData(n.data),v(n));else if(o<i.childNodes.length){var d=i.childNodes[o];d&&p(d)&&t(d)}}else i=a,o=s;c(this,i,o,a,s)},collapseToPoint:function(e,t){B(e,!0),F(e,t),this.setStartAndEnd(e,t)}}),le(e)}function pe(e){e.collapsed=e.startContainer===e.endContainer&&e.startOffset===e.endOffset,e.commonAncestorContainer=e.collapsed?e.startContainer:s.getCommonAncestor(e.startContainer,e.endContainer)}function ue(e,t,n,r,i){e.startContainer=t,e.startOffset=n,e.endContainer=r,e.endOffset=i,e.document=s.getDocument(t),pe(e)}function he(e){this.startContainer=e,this.startOffset=0,this.endContainer=e,this.endOffset=0,this.document=e,pe(this)}r.extend(a.rangePrototype,{moveStart:function(e,t,n){return J(this,e,t,!0,n)},moveEnd:function(e,t,n){return J(this,e,t,!1,n)},setRange:function(e,t,n){e?this.setStart(t,n):this.setEnd(t,n)},moveCharLeft:function(e,t,n){var r,i,o=this.collapsed;if(i=e?(r=this.startContainer,this.startOffset):(r=this.endContainer,this.endOffset),r.nodeType===Node.ELEMENT_NODE)if(r.hasChildNodes()&&0<i){var a=r.childNodes[i-1],s=fe.domUtils.getLastSelectableChild(a,n);if(!(r=s||fe.domUtils.getPreviousSelectableNode(a,n)))return!1;i=r.data.length-t}else i=-1*t;else i-=t;for(;i<0;){if(!(r=fe.domUtils.getPreviousSelectableNode(r,n)))return!1;r.nodeType===Node.ELEMENT_NODE?i++:i+=r.data.length}return o&&this.collapse(e),this.setRange(e,r,i),!0},moveCharRight:function(e,t,n){var r,i,o=this.collapsed;if(i=e?(r=this.startContainer,this.startOffset):(r=this.endContainer,this.endOffset),r.nodeType===Node.ELEMENT_NODE){var a=fe.domUtils.getNextSelectableNode(r.childNodes[Math.min(i,r.childNodes.length-1)],n);r=a||fe.domUtils.getFirstSelectableChild(fe.domUtils.getNextContainer(r,n),n),i=t}else i+=t;if(!r)return!1;var s=i-(r.nodeType===Node.TEXT_NODE?r.data.length:1);if(0<s){for(;0<s;){if(!(r=fe.domUtils.getFirstSelectableChild(fe.domUtils.getNextContainer(r,n),n)))return!1;if(r.nodeType!==Node.ELEMENT_NODE){if(r.data.length>=s)break;0<r.data.length&&(s-=r.data.length)}else n&&n.filter&&n.filter(r)&&--s}i=s}return o&&this.collapse(e),1===r.nodeType?this.setRange(e,r,0):this.setRange(e,r,i),!0},getHTMLContents:function(e){e=e||this.cloneContents();var t=self.env.document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML},getHTMLContentsObj:function(){return this.cloneContents()},compareBoundaryPoints:function(e,t){var n,r,i,o;G(this),H(this.startContainer,t.startContainer);var a=e==ne||e==Z?"start":"end",s=e==ee||e==Z?"start":"end";return n=this[a+"Container"],r=this[a+"Offset"],i=t[s+"Container"],o=t[s+"Offset"],h(n,r,i,o)},insertNode:function(e){if(G(this),U(e,D),j(this.startContainer),d(e,this.startContainer))throw new l("HIERARCHY_REQUEST_ERR");var t=C(e,this.startContainer,this.startOffset);this.setStartBefore(t)},cloneContents:function(){var e,t;if(G(this),this.collapsed)return _(this).createDocumentFragment();if(this.startContainer===this.endContainer&&p(this.startContainer))return(e=this.startContainer.cloneNode(!0)).data=e.data.slice(this.startOffset,this.endOffset),(t=_(this).createDocumentFragment()).appendChild(e),t;var n=new x(this,!0);return e=function e(t){for(var n,r,i,o=_(t.range).createDocumentFragment();r=t.next();){if(n=t.isPartiallySelectedSubtree(),r=r.cloneNode(!n),n&&(i=t.getSubtreeIterator(),r.appendChild(e(i)),i.detach()),10==r.nodeType)throw new l("HIERARCHY_REQUEST_ERR");o.appendChild(r)}return o}(n),n.detach(),e},canSurroundContents:function(){G(this),j(this.startContainer),j(this.endContainer);var e=new x(this,!0),t=e._first&&y(e._first,this)||e._last&&y(e._last,this);return e.detach(),!t},surroundContents:function(e){if(U(e,A),!this.canSurroundContents())throw new l("INVALID_STATE_ERR");var t=this.extractContents();if(e.hasChildNodes())for(;e.lastChild;)e.removeChild(e.lastChild);C(e,this.startContainer,this.startOffset),e.appendChild(t),this.selectNode(e)},cloneRange:function(){G(this);for(var e,t=new he(_(this)),n=Q.length;n--;)t[e=Q[n]]=this[e];return t},toString:function(){G(this);var e=this.startContainer;if(e===this.endContainer&&p(e))return 3==e.nodeType||4==e.nodeType?e.data.slice(this.startOffset,this.endOffset):"";var t=[],n=new x(this,!0);return T(n,function(e){3!=e.nodeType&&4!=e.nodeType||t.push(e.data)}),n.detach(),t.join("")},compareNode:function(e){G(this);var t=e.parentNode,n=u(e);if(!t)throw new l("NOT_FOUND_ERR");var r=this.comparePoint(t,n),i=this.comparePoint(t,n+1);return r<0?0<i?oe:re:0<i?ie:ae},comparePoint:function(e,t){return G(this),W(e,"HIERARCHY_REQUEST_ERR"),H(e,this.startContainer),h(e,t,this.startContainer,this.startOffset)<0?-1:0<h(e,t,this.endContainer,this.endOffset)?1:0},createContextualFragment:q,toHtml:function(){return $(this)},intersectsNode:function(e,t){if(G(this),m(e)!=function(e){return m(e.startContainer)}(this))return!1;var n=e.parentNode,r=u(e);if(!n)return!0;var i=h(n,r,this.endContainer,this.endOffset),o=h(n,r+1,this.startContainer,this.startOffset);return t?i<=0&&0<=o:i<0&&0<o},isPointInRange:function(e,t){return G(this),W(e,"HIERARCHY_REQUEST_ERR"),H(e,this.startContainer),0<=h(e,t,this.startContainer,this.startOffset)&&h(e,t,this.endContainer,this.endOffset)<=0},intersectsRange:function(e){return E(this,e,!1)},intersectsOrTouchesRange:function(e){return E(this,e,!0)},intersection:function(e){if(this.intersectsRange(e)){var t=h(this.startContainer,this.startOffset,e.startContainer,e.startOffset),n=h(this.endContainer,this.endOffset,e.endContainer,e.endOffset),r=this.cloneRange();return-1==t&&r.setStart(e.startContainer,e.startOffset),1==n&&r.setEnd(e.endContainer,e.endOffset),r}return null},union:function(e){if(this.intersectsOrTouchesRange(e)){var t=this.cloneRange();return-1==h(e.startContainer,e.startOffset,this.startContainer,this.startOffset)&&t.setStart(e.startContainer,e.startOffset),1==h(e.endContainer,e.endOffset,this.endContainer,this.endOffset)&&t.setEnd(e.endContainer,e.endOffset),t}throw new l("Ranges do not intersect")},containsNode:function(e,t){return t?this.intersectsNode(e,!1):this.compareNode(e)==ae},containsNodeContents:function(e){return 0<=this.comparePoint(e,0)&&this.comparePoint(e,g(e))<=0},containsRange:function(e){var t=this.intersection(e);return null!==t&&e.equals(t)},containsNodeText:function(e){var t=this.cloneRange();t.selectNode(e);var n=t.getNodes([3]);if(0<n.length){t.setStart(n[0],0);var r=n.pop();return t.setEnd(r,r.length),this.containsRange(t)}return this.containsNodeContents(e)},getNodes:function(e,t){return G(this),function(r,e,i){var o,a=Boolean(e&&e.length),s=Boolean(i);a&&(o=new RegExp("^("+e.join("|")+")$"));var l=[];return T(new x(r,!1),function(e){if((!a||o.test(e.nodeType))&&(!s||i(e))){var t=r.startContainer;if(e!=t||!p(t)||r.startOffset!=t.length){var n=r.endContainer;e==n&&p(n)&&0===r.endOffset||l.push(e)}}}),l}(this,e,t)},getDocument:function(){return _(this)},collapseBefore:function(e){this.setEndBefore(e),this.collapse(!1)},collapseAfter:function(e){this.setStartAfter(e),this.collapse(!0)},getBookmark:function(e){var t=_(this),n=a.createRange(t);e=e||s.getBody(t),n.selectNodeContents(e);var r=this.intersection(n),i=0,o=0;return r&&(n.setEnd(r.startContainer,r.startOffset),o=(i=n.toString().length)+r.toString().length),{start:i,end:o,containerNode:e}},moveToBookmark:function(e){var t=e.containerNode,n=0;this.setStart(t,0),this.collapse(!0);for(var r,i,o,a,s=[t],l=!1,d=!1;!d&&(r=s.pop());)if(3==r.nodeType)i=n+r.length,!l&&e.start>=n&&e.start<=i&&(this.setStart(r,e.start-n),l=!0),l&&e.end>=n&&e.end<=i&&(this.setEnd(r,e.end-n),d=!0),n=i;else for(o=(a=r.childNodes).length;o--;)s.push(a[o])},getName:function(){return"DomRange"},equals:function(e){return he.rangesEqual(this,e)},isValid:function(){return z(this)},inspect:function(){return w(this)},detach:function(){}}),ce(he,ue),r.extend(he,{rangeProperties:Q,RangeIterator:x,copyComparisonConstants:le,createPrototypeRange:ce,inspect:w,toHtml:$,getRangeDocument:_,rangesEqual:function(e,t){return e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset}}),a.DomRange=he}),b.createCoreModule("WrappedRange",["DomRange"],function(c,p){var u,e,C=c.dom,h=c.util,E=C.DomPosition,f=c.DomRange,g=C.getBody,m=C.getContentDocument,T=C.isCharacterDataNode;if(c.features.implementsDomRange&&function(){var t,n,r=f.rangeProperties;function i(e){for(var t,n=r.length;n--;)e[t=r[n]]=e.nativeRange[t];e.collapsed=e.startContainer===e.endContainer&&e.startOffset===e.endOffset}u=function(e){if(!e)throw p.createError("WrappedRange: Range must be specified");this.nativeRange=e,i(this)},f.createPrototypeRange(u,function(e,t,n,r,i){var o=e.startContainer!==t||e.startOffset!=n,a=e.endContainer!==r||e.endOffset!=i,s=!e.equals(e.nativeRange);(o||a||s)&&(e.setEnd(r,i),e.setStart(t,n))}),(t=u.prototype).selectNode=function(e){this.nativeRange.selectNode(e),i(this)},t.cloneContents=function(){return this.nativeRange.cloneContents()},t.surroundContents=function(e){this.nativeRange.surroundContents(e),i(this)},t.collapse=function(e){this.nativeRange.collapse(e),i(this)},t.cloneRange=function(){return new u(this.nativeRange.cloneRange())},t.refresh=function(){i(this)},t.toString=function(){return this.nativeRange.toString()};var e=document.createTextNode("test");g(document).appendChild(e);var o=document.createRange();o.setStart(e,0),o.setEnd(e,0);try{o.setStart(e,1),t.setStart=function(e,t){this.nativeRange.setStart(e,t),i(this)},t.setEnd=function(e,t){this.nativeRange.setEnd(e,t),i(this)},n=function(t){return function(e){this.nativeRange[t](e),i(this)}}}catch(e){t.setStart=function(t,n){try{this.nativeRange.setStart(t,n)}catch(e){this.nativeRange.setEnd(t,n),this.nativeRange.setStart(t,n)}i(this)},t.setEnd=function(t,n){try{this.nativeRange.setEnd(t,n)}catch(e){this.nativeRange.setStart(t,n),this.nativeRange.setEnd(t,n)}i(this)},n=function(n,r){return function(t){try{this.nativeRange[n](t)}catch(e){this.nativeRange[r](t),this.nativeRange[n](t)}i(this)}}}t.setStartBefore=n("setStartBefore","setEndBefore"),t.setStartAfter=n("setStartAfter","setEndAfter"),t.setEndBefore=n("setEndBefore","setStartBefore"),t.setEndAfter=n("setEndAfter","setStartAfter"),t.selectNodeContents=function(e){this.setStartAndEnd(e,0,C.getNodeLength(e))},o.selectNodeContents(e),o.setEnd(e,3);var a=document.createRange();a.selectNodeContents(e),a.setEnd(e,4),a.setStart(e,2),-1==o.compareBoundaryPoints(o.START_TO_END,a)&&1==o.compareBoundaryPoints(o.END_TO_START,a)?t.compareBoundaryPoints=function(e,t){return e==(t=t.nativeRange||t).START_TO_END?e=t.END_TO_START:e==t.END_TO_START&&(e=t.START_TO_END),this.nativeRange.compareBoundaryPoints(e,t)}:t.compareBoundaryPoints=function(e,t){return this.nativeRange.compareBoundaryPoints(e,t.nativeRange||t)};var s=document.createElement("div");s.innerHTML="123";var l=s.firstChild,d=g(document);d.appendChild(s),o.setStart(l,1),o.setEnd(l,2),o.deleteContents(),"13"==l.data&&(t.deleteContents=function(){this.nativeRange.deleteContents(),i(this)},t.extractContents=function(){var e=this.nativeRange.extractContents();return i(this),e}),d.removeChild(s),d=null,h.isHostMethod(o,"createContextualFragment")&&(t.createContextualFragment=function(e){return this.nativeRange.createContextualFragment(e)}),g(document).removeChild(e),t.getName=function(){return"WrappedRange"},c.WrappedRange=u,c.createNativeRange=function(e){return(e=m(e,p,"createNativeRange")).createRange()}}(),c.features.implementsTextRange){var i=function(e,t,n,r,i){var o=e.duplicate();o.collapse(n);var a=o.parentElement();if(C.isOrIsAncestorOf(t,a)||(a=t),!a.canHaveHTML){var s=new E(a.parentNode,C.getNodeIndex(a));return{boundaryPosition:s,nodeInfo:{nodeIndex:s.offset,containerElement:s.node}}}var l=C.getDocument(a).createElement("span");l.parentNode&&C.removeNode(l);for(var d,c,p,u,h,f=n?"StartToStart":"StartToEnd",g=i&&i.containerElement==a?i.nodeIndex:0,m=a.childNodes.length,v=m,y=v;y==m?a.appendChild(l):a.insertBefore(l,a.childNodes[y]),o.moveToElementText(l),0!=(d=o.compareEndPoints(f,e))&&g!=v;){if(-1==d){if(v==g+1)break;g=y}else v=v==g+1?g:y;y=Math.floor((g+v)/2),a.removeChild(l)}if(h=l.nextSibling,-1==d&&h&&T(h)){var _;if(o.setEndPoint(n?"EndToStart":"EndToEnd",e),/[\r\n]/.test(h.data)){var N=o.duplicate(),b=N.text.replace(/\r\n/g,"\r").length;for(_=N.moveStart("character",b);-1==(d=N.compareEndPoints("StartToEnd",N));)_++,N.moveStart("character",1)}else _=o.text.length;u=new E(h,_)}else c=(r||!n)&&l.previousSibling,u=(p=(r||n)&&l.nextSibling)&&T(p)?new E(p,0):c&&T(c)?new E(c,c.data.length):new E(a,C.getNodeIndex(l));return C.removeNode(l),{boundaryPosition:u,nodeInfo:{nodeIndex:y,containerElement:a}}},o=function(e,t){var n,r,i,o,a=e.offset,s=C.getDocument(e.node),l=g(s).createTextRange(),d=T(e.node);return r=d?(n=e.node).parentNode:(n=a<(o=e.node.childNodes).length?o[a]:null,e.node),(i=s.createElement("span")).innerHTML="&#feff;",n?r.insertBefore(i,n):r.appendChild(i),l.moveToElementText(i),l.collapse(!t),r.removeChild(i),d&&l[t?"moveStart":"moveEnd"]("character",a),l};((e=function(e){this.textRange=e,this.refresh()}).prototype=new f(document)).refresh=function(){var e,t,n,r=function(e){var t=e.parentElement(),n=e.duplicate();n.collapse(!0);var r=n.parentElement();(n=e.duplicate()).collapse(!1);var i=n.parentElement(),o=r==i?r:C.getCommonAncestor(r,i);return o==t?o:C.getCommonAncestor(t,o)}(this.textRange);t=function(e){return 0==e.compareEndPoints("StartToEnd",e)}(this.textRange)?e=i(this.textRange,r,!0,!0).boundaryPosition:(e=(n=i(this.textRange,r,!0,!1)).boundaryPosition,i(this.textRange,r,!1,!1,n.nodeInfo).boundaryPosition),this.setStart(e.node,e.offset),this.setEnd(t.node,t.offset)},e.prototype.getName=function(){return"WrappedTextRange"},f.copyComparisonConstants(e);var t=function(e){if(e.collapsed)return o(new E(e.startContainer,e.startOffset),!0);var t=o(new E(e.startContainer,e.startOffset),!0),n=o(new E(e.endContainer,e.endOffset),!1),r=g(f.getRangeDocument(e)).createTextRange();return r.setEndPoint("StartToStart",t),r.setEndPoint("EndToEnd",n),r};if(e.rangeToTextRange=t,e.prototype.toTextRange=function(){return t(this)},c.WrappedTextRange=e,!c.features.implementsDomRange||c.config.preferTextRange){var n=Function("return this;")();void 0===n.Range&&(n.Range=e),c.createNativeRange=function(e){return e=m(e,p,"createNativeRange"),g(e).createTextRange()},c.WrappedRange=e}}c.createRange=function(e){return e=m(e,p,"createRange"),new c.WrappedRange(c.createNativeRange(e))},c.createRangyRange=function(e){return e=m(e,p,"createRangyRange"),new f(e)},h.createAliasForDeprecatedMethod(c,"createIframeRange","createRange"),h.createAliasForDeprecatedMethod(c,"createIframeRangyRange","createRangyRange"),c.addShimListener(function(e){var t=e.document;void 0===t.createRange&&(t.createRange=function(){return c.createRange(t)}),t=e=null})}),b.createCoreModule("WrappedSelection",["DomRange","WrappedRange"],function(p,l){p.config.checkSelectionRanges=!0;var i,o,e="boolean",t="number",u=p.dom,n=p.util,r=n.isHostMethod,s=p.DomRange,a=p.WrappedRange,d=p.DOMException,c=u.DomPosition,h=p.features,f="Control",g=u.getDocument,m=u.getBody,v=s.rangesEqual;function y(e){return"string"==typeof e?/^backward(s)?$/i.test(e):!!e}function _(e,t){if(e){if(u.isWindow(e))return e;if(e instanceof G)return e.win;var n=u.getContentDocument(e,l,t);return u.getWindow(n)}return window}function N(e){return _(e,"getDocSelection").document.selection}function b(e){var t=!1;return e.anchorNode&&(t=1==u.comparePoints(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset)),t}var C=r(window,"getSelection"),E=n.isHostObject(document,"selection");h.implementsWinGetSelection=C;var T=(h.implementsDocSelection=E)&&(!C||p.config.preferTextRange);if(T)i=N,p.isSelectionValid=function(e){var t=_(e,"isSelectionValid").document,n=t.selection;return"None"!=n.type||g(n.createRange().parentElement())==t};else{if(!C)return l.fail("Neither document.selection or window.getSelection() detected."),!1;i=function(e){return _(e,"getWinSelection").getSelection()},p.isSelectionValid=function(){return!0}}var S=(p.getNativeSelection=i)();if(!S)return l.fail("Native selection was null (possibly issue 138?)"),!1;var k=p.createNativeRange(document),w=m(document),x=n.areHostProperties(S,["anchorNode","focusNode","anchorOffset","focusOffset"]);h.selectionHasAnchorAndFocus=x;var O=r(S,"extend");h.selectionHasExtend=O;var R=typeof S.rangeCount==t;h.selectionHasRangeCount=R;var D=!1,A=!0,I=O?function(e,t){var n=s.getRangeDocument(t),r=p.createRange(n);r.collapseToPoint(t.endContainer,t.endOffset),e.addRange(F(r)),e.extend(t.startContainer,t.startOffset)}:null;n.areHostMethods(S,["addRange","getRangeAt","removeAllRanges"])&&typeof S.rangeCount==t&&h.implementsDomRange&&function(){var e=window.getSelection();if(e){for(var t=e.rangeCount,n=1<t,r=[],i=b(e),o=0;o<t;++o)r[o]=e.getRangeAt(o);var a=u.createTestElement(document,"",!1),s=a.appendChild(document.createTextNode("   ")),l=document.createRange();if(l.setStart(s,1),l.collapse(!0),e.removeAllRanges(),e.addRange(l),A=1==e.rangeCount,e.removeAllRanges(),!n){var d=window.navigator.appVersion.match(/Chrome\/(.*?) /);if(d&&36<=parseInt(d[1]))D=!1;else{var c=l.cloneRange();l.setStart(s,0),c.setEnd(s,3),c.setStart(s,2),e.addRange(l),e.addRange(c),D=2==e.rangeCount}}for(u.removeNode(a),e.removeAllRanges(),o=0;o<t;++o)0==o&&i?I?I(e,r[o]):(p.warn("Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend"),e.addRange(r[o])):e.addRange(r[o])}}(),h.selectionSupportsMultipleRanges=D,h.collapsedNonEditableSelectionsSupported=A;var L,P,M=!1;function B(e,t,n){var r=n?"end":"start",i=n?"start":"end";e.anchorNode=t[r+"Container"],e.anchorOffset=t[r+"Offset"],e.focusNode=t[i+"Container"],e.focusOffset=t[i+"Offset"]}function U(e){e.anchorNode=e.focusNode=null,e.anchorOffset=e.focusOffset=0,e.rangeCount=0,e.isCollapsed=!0,e._ranges.length=0}function F(e){var t;return e instanceof s?((t=p.createNativeRange(e.getDocument())).setEnd(e.endContainer,e.endOffset),t.setStart(e.startContainer,e.startOffset)):e instanceof a?t=e.nativeRange:h.implementsDomRange&&e instanceof u.getWindow(e.startContainer).Range&&(t=e),t}function H(e){var t=e.getNodes();if(!function(e){if(!e.length||1!=e[0].nodeType)return!1;for(var t=1,n=e.length;t<n;++t)if(!u.isAncestorOf(e[0],e[t]))return!1;return!0}(t))throw l.createError("getSingleElementFromRange: range "+e.inspect()+" did not consist of a single element");return t[0]}function j(e){return!!e&&void 0!==e.text}function W(e,t){var n=new a(t);e._ranges=[n],B(e,n,!1),e.rangeCount=1,e.isCollapsed=n.collapsed}function V(e){if(e._ranges.length=0,"None"==e.docSelection.type)U(e);else{var t=e.docSelection.createRange();if(j(t))W(e,t);else{e.rangeCount=t.length;for(var n,r=g(t.item(0)),i=0;i<e.rangeCount;++i)(n=p.createRange(r)).selectNode(t.item(i)),e._ranges.push(n);e.isCollapsed=1==e.rangeCount&&e._ranges[0].collapsed,B(e,e._ranges[e.rangeCount-1],!1)}}}function z(e,t){for(var n=e.docSelection.createRange(),r=H(t),i=g(n.item(0)),o=m(i).createControlRange(),a=0,s=n.length;a<s;++a)o.add(n.item(a));try{o.add(r)}catch(e){throw l.createError("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}o.select(),V(e)}function G(e,t,n){this.nativeSelection=e,this.docSelection=t,this._ranges=[],this.win=n,this.refresh()}function Y(e){e.win=e.anchorNode=e.focusNode=e._ranges=null,e.rangeCount=e.anchorOffset=e.focusOffset=0,e.detached=!0}w&&r(w,"createControlRange")&&(L=w.createControlRange(),n.areHostProperties(L,["item","add"])&&(M=!0)),h.implementsControlRange=M,o=x?function(e){return e.anchorNode===e.focusNode&&e.anchorOffset===e.focusOffset}:function(e){return!!e.rangeCount&&e.getRangeAt(e.rangeCount-1).collapsed},r(S,"getRangeAt")?P=function(e,t){try{return e.getRangeAt(t)}catch(e){return null}}:x&&(P=function(e){var t=g(e.anchorNode),n=p.createRange(t);return n.setStartAndEnd(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset),n.collapsed!==this.isCollapsed&&n.setStartAndEnd(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset),n}),G.prototype=p.selectionPrototype;var X=[];function q(e,t){for(var n,r,i=X.length;i--;)if(r=(n=X[i]).selection,"deleteAll"==t)Y(r);else if(n.win==e)return"delete"==t?(X.splice(i,1),!0):r;return"deleteAll"==t&&(X.length=0),null}function K(e){if(e&&e instanceof G)return e.refresh(),e;var t=q(e=_(e,"getNativeSelection")),n=i(e),r=E?N(e):null;return t?(t.nativeSelection=n,t.docSelection=r,t.refresh()):(t=new G(n,r,e),X.push({win:e,selection:t})),t}p.getSelection=K,n.createAliasForDeprecatedMethod(p,"getIframeSelection","getSelection");var $,J=G.prototype;function Q(e,t){for(var n,r=g(t[0].startContainer),i=m(r).createControlRange(),o=0,a=t.length;o<a;++o){n=H(t[o]);try{i.add(n)}catch(e){throw l.createError("setRanges(): Element within one of the specified Ranges could not be added to control selection (does it have layout?)")}}i.select(),V(e)}if(!T&&x&&n.areHostMethods(S,["removeAllRanges","addRange"])){J.removeAllRanges=function(){this.nativeSelection.removeAllRanges(),U(this)};var Z=function(e,t){I(e.nativeSelection,t),e.refresh()};J.addRange=R?function(t,e){if(M&&E&&this.docSelection.type==f)z(this,t);else if(y(e)&&O)Z(this,t);else{var n;n=D?this.rangeCount:(this.removeAllRanges(),0);var r=F(t).cloneRange();try{this.nativeSelection.addRange(r)}catch(e){console.error(e,t)}if(this.rangeCount=this.nativeSelection.rangeCount,this.rangeCount==n+1){if(p.config.checkSelectionRanges){var i=P(this.nativeSelection,this.rangeCount-1);i&&!v(i,t)&&(t=new a(i))}this._ranges[this.rangeCount-1]=t,B(this,t,te(this.nativeSelection)),this.isCollapsed=o(this)}else this.refresh()}}:function(e,t){y(t)&&O?Z(this,e):(this.nativeSelection.addRange(F(e)),this.refresh())},J.setRanges=function(e){if(M&&E&&1<e.length)Q(this,e);else{this.removeAllRanges();for(var t=0,n=e.length;t<n;++t)this.addRange(e[t])}}}else{if(!(r(S,"empty")&&r(k,"select")&&M&&T))return l.fail("No means of selecting a Range or TextRange was found"),!1;J.removeAllRanges=function(){try{if(this.docSelection.empty(),"None"!=this.docSelection.type){var e;if(this.anchorNode)e=g(this.anchorNode);else if(this.docSelection.type==f){var t=this.docSelection.createRange();t.length&&(e=g(t.item(0)))}if(e)m(e).createTextRange().select(),this.docSelection.empty()}}catch(e){}U(this)},J.addRange=function(e){this.docSelection.type==f?z(this,e):(p.WrappedTextRange.rangeToTextRange(e).select(),this._ranges[0]=e,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,B(this,e,!1))},J.setRanges=function(e){this.removeAllRanges();var t=e.length;1<t?Q(this,e):t&&this.addRange(e[0])}}if(J.getRangeAt=function(e){if(e<0||e>=this.rangeCount)throw new d("INDEX_SIZE_ERR");return this._ranges[e].cloneRange()},T)$=function(e){var t;p.isSelectionValid(e.win)?t=e.docSelection.createRange():(t=m(e.win.document).createTextRange()).collapse(!0),e.docSelection.type==f?V(e):j(t)?W(e,t):U(e)};else if(r(S,"getRangeAt")&&typeof S.rangeCount==t)$=function(e){if(M&&E&&e.docSelection.type==f)V(e);else if(e._ranges.length=e.rangeCount=e.nativeSelection&&e.nativeSelection.rangeCount||0,e.rangeCount){for(var t=0,n=e.rangeCount;t<n;++t)e._ranges[t]=new p.WrappedRange(e.nativeSelection.getRangeAt(t));B(e,e._ranges[e.rangeCount-1],te(e.nativeSelection)),e.isCollapsed=o(e)}else U(e)};else{if(!x||typeof S.isCollapsed!=e||typeof k.collapsed!=e||!h.implementsDomRange)return l.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;$=function(e){var t,n=e.nativeSelection;n.anchorNode?(t=P(n,0),e._ranges=[t],e.rangeCount=1,function(e){var t=e.nativeSelection;e.anchorNode=t.anchorNode,e.anchorOffset=t.anchorOffset,e.focusNode=t.focusNode,e.focusOffset=t.focusOffset}(e),e.isCollapsed=o(e)):U(e)}}J.refresh=function(e){var t=e?this._ranges.slice(0):null,n=this.anchorNode,r=this.anchorOffset;if($(this),e){var i=t.length;if(i!=this._ranges.length)return!0;if(this.anchorNode!=n||this.anchorOffset!=r)return!0;for(;i--;)if(!v(t[i],this._ranges[i]))return!0;return!1}};function ee(e,t){var n=e.getAllRanges();e.removeAllRanges();for(var r=0,i=n.length;r<i;++r)v(t,n[r])||e.addRange(n[r]);e.rangeCount||U(e)}var te;function ne(e,t){if(e.win.document!=g(t))throw new d("WRONG_DOCUMENT_ERR")}function re(r){return function(e,t){var n;this.rangeCount?(n=this.getRangeAt(0))["set"+(r?"Start":"End")](e,t):(n=p.createRange(this.win.document)).setStartAndEnd(e,t),this.setSingleRange(n,this.isBackward())}}function ie(e){var t=[],n=new c(e.anchorNode,e.anchorOffset),r=new c(e.focusNode,e.focusOffset),i="function"==typeof e.getName?e.getName():"Selection";if(void 0!==e.rangeCount)for(var o=0,a=e.rangeCount;o<a;++o)t[o]=s.inspect(e.getRangeAt(o));return"["+i+"(Ranges: "+t.join(", ")+")(anchor: "+n.inspect()+", focus: "+r.inspect()+"]"}J.removeRange=M&&E?function(e){if(this.docSelection.type==f){for(var t=this.docSelection.createRange(),n=H(e),r=g(t.item(0)),i=m(r).createControlRange(),o=!1,a=0,s=t.length;a<s;++a)t.item(a)!==n||o?i.add(t.item(a)):o=!0;i.select(),V(this)}else ee(this,e)}:function(e){ee(this,e)},!T&&x&&h.implementsDomRange?(te=b,J.isBackward=function(){return te(this)}):te=J.isBackward=function(){return!1},J.isBackwards=J.isBackward,J.toString=function(){for(var e=[],t=0,n=this.rangeCount;t<n;++t)e[t]=""+this._ranges[t];return e.join("")},J.collapse=function(e,t){ne(this,e);var n=p.createRange(e);n.collapseToPoint(e,t),this.setSingleRange(n),this.isCollapsed=!0},J.collapseToStart=function(){if(!this.rangeCount)throw new d("INVALID_STATE_ERR");var e=this._ranges[0];this.collapse(e.startContainer,e.startOffset)},J.collapseToEnd=function(){if(!this.rangeCount)throw new d("INVALID_STATE_ERR");var e=this._ranges[this.rangeCount-1];this.collapse(e.endContainer,e.endOffset)},J.selectAllChildren=function(e){ne(this,e);var t=p.createRange(e);t.selectNodeContents(e),this.setSingleRange(t)},J.deleteFromDocument=function(){if(M&&E&&this.docSelection.type==f){for(var e,t=this.docSelection.createRange();t.length;)e=t.item(0),t.remove(e),u.removeNode(e);this.refresh()}else if(this.rangeCount){var n=this.getAllRanges();if(n.length){this.removeAllRanges();for(var r=0,i=n.length;r<i;++r)n[r].deleteContents();this.addRange(n[i-1])}}},J.eachRange=function(e,t){for(var n=0,r=this._ranges.length;n<r;++n)if(e(this.getRangeAt(n)))return t},J.getAllRanges=function(){var t=[];return this.eachRange(function(e){t.push(e)}),t},J.setSingleRange=function(e,t){this.removeAllRanges(),this.addRange(e,t)},J.callMethodOnEachRange=function(t,n){var r=[];return this.eachRange(function(e){r.push(e[t].apply(e,n||[]))}),r},J.setStart=re(!0),J.setEnd=re(!1),p.rangePrototype.select=function(e){K(this.getDocument()).setSingleRange(this,e)},J.changeEachRange=function(t){var n=[],e=this.isBackward();this.eachRange(function(e){t(e),n.push(e)}),this.removeAllRanges(),e&&1==n.length?this.addRange(n[0],"backward"):this.setRanges(n)},J.containsNode=function(t,n){return this.eachRange(function(e){return e.containsNode(t,n)},!0)||!1},J.getBookmark=function(e){return{backward:this.isBackward(),rangeBookmarks:this.callMethodOnEachRange("getBookmark",[e])}},J.moveToBookmark=function(e){for(var t,n,r=[],i=0;t=e.rangeBookmarks[i++];)(n=p.createRange(this.win)).moveToBookmark(t),r.push(n);e.backward?this.setSingleRange(r[0],"backward"):this.setRanges(r)},J.saveRanges=function(){return{backward:this.isBackward(),ranges:this.callMethodOnEachRange("cloneRange")}},J.restoreRanges=function(e){this.removeAllRanges();for(var t,n=0;t=e.ranges[n];++n)this.addRange(t,e.backward&&0==n)},J.toHtml=function(){var t=[];return this.eachRange(function(e){t.push(s.toHtml(e))}),t.join("")},h.implementsTextRange&&(J.getNativeTextRange=function(){var e;if(e=this.docSelection){var t=e.createRange();if(j(t))return t;throw l.createError("getNativeTextRange: selection is a control selection")}if(0<this.rangeCount)return p.WrappedTextRange.rangeToTextRange(this.getRangeAt(0));throw l.createError("getNativeTextRange: selection contains no range")}),J.getName=function(){return"WrappedSelection"},J.inspect=function(){return ie(this)},J.detach=function(){q(this.win,"delete"),Y(this)},G.detachAll=function(){q(null,"deleteAll")},G.inspect=ie,G.isDirectionBackward=y,p.Selection=G,p.selectionPrototype=J,p.addShimListener(function(e){void 0===e.getSelection&&(e.getSelection=function(){return K(e)}),e=null})});function L(e){P||(P=!0,!b.initialized&&b.config.autoInitialize&&w())}var P=!1;return _&&("complete"==document.readyState?L():(c(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",L,!1),v(window,"load",L))),b.isInitialized=function(){var e;for(var t in this.modules)if(!(e=this.modules[t])||!e.initialized||!e.supported)return fe.Logger.debug("rangy NOT initialized: module",t,"initialized",e.initialized,"supported",e.supported),!1;return!0},b},(i=window.FLITE)||console.error("rangy: root is undefined"),i.rangy=r(i),i.Logger.scheduleDump(),function(e,H){function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}for(var t=["Edge","Trident","Firefox"],n=0,r=0;r<t.length;r+=1)if(0<=navigator.userAgent.indexOf(t[r])){n=1;break}var j=Boolean(window.Promise)?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},n))}};function o(e){return e&&"[object Function]"==={}.toString.call(e)}function b(e,t){if(1!==e.nodeType)return[];var n=z(e).defaultView.getComputedStyle(e,null);return t?n[t]:n}function f(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function g(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return z(e).body;case"#document":return e.body}var t=b(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?e:g(f(e))}var i=Boolean(window.MSInputMethodContext&&document.documentMode),a=/MSIE 10/.test(navigator.userAgent);function m(e){return 11===e?i:10===e?a:i||a}function C(e){if(!e)return document.documentElement;for(var t=z(e),n=m(10)?t.body:null,r=e.offsetParent||null;r===n&&e.nextElementSibling;)r=(e=e.nextElementSibling).offsetParent;var i=r&&r.nodeName;return i&&"BODY"!==i&&"HTML"!==i?-1!==["TH","TD","TABLE"].indexOf(r.nodeName)&&"static"===b(r,"position")?C(r):r:z(e).documentElement}function d(e){return null!==e.parentNode?d(e.parentNode):e}function v(e,t){var n=z(e||t);if(!(e&&e.nodeType&&t&&t.nodeType))return n.documentElement;var r=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=r?e:t,o=r?t:e,a=n.createRange();a.setStart(i,0),a.setEnd(o,0);var s=a.commonAncestorContainer;if(e!==s&&t!==s||i.contains(o))return function(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||C(e.firstElementChild)===e)}(s)?s:C(s);var l=d(e);return l.host?v(l.host,t):v(e,d(t).host)}function y(e,t){var n="top"===(1<arguments.length&&void 0!==t?t:"top")?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"!==r&&"HTML"!==r)return e[n];var i=z(e),o=i.documentElement;return(i.scrollingElement||o)[n]}function p(e,t){var n="x"===t?"Left":"Top",r="Left"==n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"],10)+parseFloat(e["border"+r+"Width"],10)}function s(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],m(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function _(e){var t=e.body,n=e.documentElement,r=m(10)&&getComputedStyle(n);return{height:s("Height",t,n,r),width:s("Width",t,n,r)}}var W=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function E(e){return W({},e,{right:e.left+e.width,bottom:e.top+e.height})}function T(e){var t={};try{if(m(10)){t=e.getBoundingClientRect();var n=y(e,"top"),r=y(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(e){}var i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},o="HTML"===e.nodeName?_(z(e)):{},a=o.width||e.clientWidth||i.right-i.left,s=o.height||e.clientHeight||i.bottom-i.top,l=e.offsetWidth-a,d=e.offsetHeight-s;if(l||d){var c=b(e);l-=p(c,"x"),d-=p(c,"y"),i.width-=l,i.height-=d}return E(i)}function S(e,t,n){var r=2<arguments.length&&void 0!==n&&n,i=m(10),o="HTML"===t.nodeName,a=T(e),s=T(t),l=g(e),d=b(t),c=parseFloat(d.borderTopWidth,10),p=parseFloat(d.borderLeftWidth,10);r&&o&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var u=E({top:a.top-s.top-c,left:a.left-s.left-p,width:a.width,height:a.height});if(u.marginTop=0,u.marginLeft=0,!i&&o){var h=parseFloat(d.marginTop,10),f=parseFloat(d.marginLeft,10);u.top-=c-h,u.bottom-=c-h,u.left-=p-f,u.right-=p-f,u.marginTop=h,u.marginLeft=f}return(i&&!r?t.contains(l):t===l&&"BODY"!==l.nodeName)&&(u=function(e,t,n){var r=2<arguments.length&&void 0!==n&&n,i=y(t,"top"),o=y(t,"left"),a=r?-1:1;return e.top+=i*a,e.bottom+=i*a,e.left+=o*a,e.right+=o*a,e}(u,t)),u}function k(e){var t=z(e);if(!e||!e.parentElement||m())return t.documentElement;for(var n=e.parentElement;n&&"none"===b(n,"transform");)n=n.parentElement;return n||t.documentElement}function w(e,t,n,r,i){var o=4<arguments.length&&void 0!==i&&i,a={top:0,left:0},s=o?k(e):v(e,t);if("viewport"===r)a=function(e,t){var n=z(e).defaultView,r=1<arguments.length&&void 0!==t&&t,i=z(e).documentElement,o=S(e,i),a=Math.max(i.clientWidth,n.innerWidth||0),s=Math.max(i.clientHeight,n.innerHeight||0),l=r?0:y(i),d=r?0:y(i,"left");return E({top:l-o.top+o.marginTop,left:d-o.left+o.marginLeft,width:a,height:s})}(s,o);else{var l=void 0;"scrollParent"===r?"BODY"===(l=g(f(t))).nodeName&&(l=z(e).documentElement):l="window"===r?z(e).documentElement:r;var d=S(l,s,o);if("HTML"!==l.nodeName||function e(t){var n=t.nodeName;if("BODY"===n||"HTML"===n)return!1;if("fixed"===b(t,"position"))return!0;var r=f(t);return!!r&&e(r)}(s))a=d;else{var c=_(z(e)),p=c.height,u=c.width;a.top+=d.top-d.marginTop,a.bottom=p+d.top,a.left+=d.left-d.marginLeft,a.right=u+d.left}}var h="number"==typeof(n=n||0);return a.left+=h?n:n.left||0,a.top+=h?n:n.top||0,a.right-=h?n:n.right||0,a.bottom-=h?n:n.bottom||0,a}function l(e,t,r,n,i,o){var a=5<arguments.length&&void 0!==o?o:0;if(-1===e.indexOf("auto"))return e;var s=w(r,n,a,i),l={top:{width:s.width,height:t.top-s.top},right:{width:s.right-t.right,height:s.height},bottom:{width:s.width,height:s.bottom-t.bottom},left:{width:t.left-s.left,height:s.height}},d=Object.keys(l).map(function(e){return W({key:e},l[e],{area:function(e){return e.width*e.height}(l[e])})}).sort(function(e,t){return t.area-e.area}),c=d.filter(function(e){var t=e.width,n=e.height;return t>=r.clientWidth&&n>=r.clientHeight}),p=0<c.length?c[0].key:d[0].key,u=e.split("-")[1];return p+(u?"-"+u:"")}function c(e,t,n,r){var i=3<arguments.length&&void 0!==r?r:null;return S(n,i?k(t):v(t,n),i)}function x(e){var t=z(e).defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function O(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function R(e,t,n){n=n.split("-")[0];var r=x(e),i={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",l=o?"height":"width",d=o?"width":"height";return i[a]=t[a]+t[l]/2-r[l]/2,i[s]=n===s?t[s]-r[d]:t[O(s)],i}function D(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function A(e,n,t){return(void 0===t?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var r=D(e,function(e){return e[t]===n});return e.indexOf(r)}(e,"name",t))).forEach(function(e){e.function;var t=e.function||e.fn;e.enabled&&o(t)&&(n.offsets.popper=E(n.offsets.popper),n.offsets.reference=E(n.offsets.reference),n=t(n,e))}),n}function u(e,n){return e.some(function(e){var t=e.name;return e.enabled&&t===n})}function I(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var i=t[r],o=i?""+i+n:e;if(void 0!==document.body.style[o])return o}return null}function V(e){return z(e).defaultView}function z(e){return e?e.ownerDocument?e.ownerDocument:e.documentElement||"#document"===e.nodeName?e:window.document:window.document}function h(e,t,n,r){n.updateBound=r,V(e).addEventListener("resize",n.updateBound,{passive:!0});var i=g(e);return function e(t,n,r,i){var o="BODY"===t.nodeName,a=o?z(t).defaultView:t;a.addEventListener(n,r,{passive:!0}),o||e(g(a.parentNode),n,r,i),i.push(a)}(i,"scroll",n.updateBound,n.scrollParents),n.scrollElement=i,n.eventsEnabled=!0,n}function L(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=function(e,t){return V(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}(this.reference,this.state))}function P(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function M(n,r){Object.keys(r).forEach(function(e){var t="";-1!==["width","height","top","right","bottom","left"].indexOf(e)&&P(r[e])&&(t="px"),n.style[e]=r[e]+t})}function B(e,t){function n(e){return e}var r=e.offsets,i=r.popper,o=r.reference,a=Math.round,s=Math.floor,l=a(o.width),d=a(i.width),c=-1!==["left","right"].indexOf(e.placement),p=-1!==e.placement.indexOf("-"),u=t?c||p||l%2==d%2?a:s:n,h=t?a:n;return{left:u(l%2==1&&d%2==1&&!p&&t?i.left-1:i.left),top:h(i.top),bottom:h(i.bottom),right:u(i.right)}}var U=/Firefox/i.test(navigator.userAgent);function F(e,t,n){var r=D(e,function(e){return e.name===t}),i=!!r&&e.some(function(e){return e.name===n&&e.enabled&&e.order<r.order});if(!i);return i}var G=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Y=G.slice(3);function X(e,t){var n=1<arguments.length&&void 0!==t&&t,r=Y.indexOf(e),i=Y.slice(r+1).concat(Y.slice(0,r));return n?i.reverse():i}var q="flip",K="clockwise",$="counterclockwise";function J(e,i,o,t){var a=[0,0],s=-1!==["right","left"].indexOf(t),n=e.split(/(\+|\-)/).map(function(e){return e.trim()}),r=n.indexOf(D(n,function(e){return-1!==e.search(/,|\s/)}));n[r]&&n[r].indexOf(",");var l=/\s*,\s*|\s+/,d=-1!==r?[n.slice(0,r).concat([n[r].split(l)[0]]),[n[r].split(l)[1]].concat(n.slice(r+1))]:[n];return(d=d.map(function(e,t){var n=(1===t?!s:s)?"height":"width",r=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,r=!0,e):r?(e[e.length-1]+=t,r=!1,e):e.concat(t)},[]).map(function(e){return function(e,t,n,r){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return e;var s=instance.doc,l=V(instance.reference);if(0!==a.indexOf("%"))return"vh"!==a&&"vw"!==a?o:("vh"===a?Math.max(s.documentElement.clientHeight,l.innerHeight||0):Math.max(s.documentElement.clientWidth,l.innerWidth||0))/100*o;var d=void 0;switch(a){case"%p":d=n;break;case"%":case"%r":default:d=r}return E(d)[t]/100*o}(e,n,i,o)})})).forEach(function(n,r){n.forEach(function(e,t){P(e)&&(a[r]+=e*("-"===n[t-1]?-1:1))})}),a}var Q={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var i=e.offsets,o=i.reference,a=i.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",d=s?"width":"height",c={start:N({},l,o[l]),end:N({},l,o[l]+o[d]-a[d])};e.offsets.popper=W({},a,c[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,i=e.offsets,o=i.popper,a=i.reference,s=r.split("-")[0],l=void 0;return l=P(+n)?[+n,0]:J(n,o,a,s),"left"===s?(o.top+=l[0],o.left-=l[1]):"right"===s?(o.top+=l[0],o.left+=l[1]):"top"===s?(o.left+=l[0],o.top-=l[1]):"bottom"===s&&(o.left+=l[0],o.top+=l[1]),e.popper=o,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,r){var t=r.boundariesElement||C(e.instance.popper);e.instance.reference===t&&(t=C(t));var n=I("transform"),i=e.instance.popper.style,o=i.top,a=i.left,s=i[n];i.top="",i.left="",i[n]="";var l=w(e.instance.popper,e.instance.reference,r.padding,t,e.positionFixed);i.top=o,i.left=a,i[n]=s,r.boundaries=l;var d=r.priority,c=e.offsets.popper,p={primary:function(e){var t=c[e];return c[e]<l[e]&&!r.escapeWithReference&&(t=Math.max(c[e],l[e])),N({},e,t)},secondary:function(e){var t="right"===e?"left":"top",n=c[t];return c[e]>l[e]&&!r.escapeWithReference&&(n=Math.min(c[t],l[e]-("right"===e?c.width:c.height))),N({},t,n)}};return d.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";c=W({},c,p[t](e))}),e.offsets.popper=c,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,i=e.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",l=a?"left":"top",d=a?"width":"height";return n[s]<o(r[l])&&(e.offsets.popper[l]=o(r[l])-n[d]),n[l]>o(r[s])&&(e.offsets.popper[l]=o(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!F(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"==typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return e;var i=e.placement.split("-")[0],o=e.offsets,a=o.popper,s=o.reference,l=-1!==["left","right"].indexOf(i),d=l?"height":"width",c=l?"Top":"Left",p=c.toLowerCase(),u=l?"left":"top",h=l?"bottom":"right",f=x(r)[d];s[h]-f<a[p]&&(e.offsets.popper[p]-=a[p]-(s[h]-f)),s[p]+f>a[h]&&(e.offsets.popper[p]+=s[p]+f-a[h]),e.offsets.popper=E(e.offsets.popper);var g=s[p]+s[d]/2-f/2,m=b(e.instance.popper),v=parseFloat(m["margin"+c],10),y=parseFloat(m["border"+c+"Width"],10),_=g-e.offsets.popper[p]-v-y;return _=Math.max(Math.min(a[d]-f,_),0),e.arrowElement=r,e.offsets.arrow=(N(n={},p,Math.round(_)),N(n,u,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(h,f){if(u(h.instance.modifiers,"inner"))return h;if(h.flipped&&h.placement===h.originalPlacement)return h;var g=w(h.instance.popper,h.instance.reference,f.padding,f.boundariesElement,h.positionFixed),m=h.placement.split("-")[0],v=O(m),y=h.placement.split("-")[1]||"",_=[];switch(f.behavior){case q:_=[m,v];break;case K:_=X(m);break;case $:_=X(m,!0);break;default:_=f.behavior}return _.forEach(function(e,t){if(m!==e||_.length===t+1)return h;m=h.placement.split("-")[0],v=O(m);var n=h.offsets.popper,r=h.offsets.reference,i=Math.floor,o="left"===m&&i(n.right)>i(r.left)||"right"===m&&i(n.left)<i(r.right)||"top"===m&&i(n.bottom)>i(r.top)||"bottom"===m&&i(n.top)<i(r.bottom),a=i(n.left)<i(g.left),s=i(n.right)>i(g.right),l=i(n.top)<i(g.top),d=i(n.bottom)>i(g.bottom),c="left"===m&&a||"right"===m&&s||"top"===m&&l||"bottom"===m&&d,p=-1!==["top","bottom"].indexOf(m),u=!!f.flipVariations&&(p&&"start"===y&&a||p&&"end"===y&&s||!p&&"start"===y&&l||!p&&"end"===y&&d);(o||c||u)&&(h.flipped=!0,(o||c)&&(m=_[t+1]),u&&(y=function(e){return"end"===e?"start":"start"===e?"end":e}(y)),h.placement=m+(y?"-"+y:""),h.offsets.popper=W({},h.offsets.popper,R(h.instance.popper,h.offsets.reference,h.placement)),h=A(h.instance.modifiers,h,"flip"))}),h},behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,i=r.popper,o=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=o[n]-(s?i[a?"width":"height"]:0),e.placement=O(t),e.offsets.popper=E(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!F(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=D(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,r=t.y,i=V(e.instance.reference),o=e.offsets.popper,a=D(e.instance.modifiers,function(e){return"applyStyle"===e.name}).gpuAcceleration,s=void 0!==a?a:t.gpuAcceleration,l=C(e.instance.popper),d=T(l),c={position:o.position},p=B(e,i.devicePixelRatio<2||!U),u="bottom"===n?"top":"bottom",h="right"===r?"left":"right",f=I("transform"),g=void 0,m=void 0;if(m="bottom"==u?"HTML"===l.nodeName?-l.clientHeight+p.bottom:-d.height+p.bottom:p.top,g="right"==h?"HTML"===l.nodeName?-l.clientWidth+p.right:-d.width+p.right:p.left,s&&f)c[f]="translate3d("+g+"px, "+m+"px, 0)",c[u]=0,c[h]=0,c.willChange="transform";else{var v="bottom"==u?-1:1,y="right"==h?-1:1;c[u]=m*v,c[h]=g*y,c.willChange=u+", "+h}var _={"x-placement":e.placement};return e.attributes=W({},_,e.attributes),e.styles=W({},c,e.styles),e.arrowStyles=W({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){return M(e.instance.popper,e.styles),function(t,n){Object.keys(n).forEach(function(e){!1!==n[e]?t.setAttribute(e,n[e]):t.removeAttribute(e)})}(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&M(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,i){var o=c(i,t,e,n.positionFixed),a=l(n.placement,o,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),M(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},Z=function(e,t,n){var r=this;n=n||{},this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=j(this.update.bind(this)),this.options=W({},Z.Defaults,n),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=t&&t.jquery?t[0]:t,this.options.modifiers={},Object.keys(W({},Z.Defaults.modifiers,n.modifiers)).forEach(function(e){r.options.modifiers[e]=W({},Z.Defaults.modifiers[e]||{},n.modifiers?n.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return W({name:e},r.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&o(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)}),this.update();var i=this.options.eventsEnabled;i&&this.enableEventListeners(),this.state.eventsEnabled=i};Z.prototype={update:function(){return function(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=c(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=l(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=R(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=A(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}.call(this)},destroy:function(){return function(){return this.state.isDestroyed=!0,u(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[I("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}.call(this)},enableEventListeners:function(){return function(){this.state.eventsEnabled||(this.state=h(this.reference,this.options,this.state,this.scheduleUpdate))}.call(this)},disableEventListeners:function(){return L.call(this)}},Z.placements=G,Z.Defaults=Q,Z.hasOwnProperty("default")&&(Z=Z.default);var ee='.tippy-iOS{cursor:pointer!important}.tippy-notransition{transition:none}.tippy-popper{transition-timing-function:cubic-bezier(.165,.84,.44,1);max-width:calc(100% - 8px);pointer-events:none;outline:0}.tippy-popper[x-placement^=top] .tippy-backdrop{border-radius:40% 40% 0 0}.tippy-popper[x-placement^=top] .tippy-roundarrow{bottom:-7px;bottom:-6.5px;-webkit-transform-origin:50% 0;transform-origin:50% 0;margin:0 3px}.tippy-popper[x-placement^=top] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.tippy-popper[x-placement^=top] .tippy-arrow{border-top:8px solid #333;border-right:8px solid transparent;border-left:8px solid transparent;bottom:-7px;margin:0 3px;-webkit-transform-origin:50% 0;transform-origin:50% 0}.tippy-popper[x-placement^=top] .tippy-backdrop{-webkit-transform-origin:0 25%;transform-origin:0 25%}.tippy-popper[x-placement^=top] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-55%);transform:scale(1) translate(-50%,-55%)}.tippy-popper[x-placement^=top] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-50%,-45%);transform:scale(.2) translate(-50%,-45%);opacity:0}.tippy-popper[x-placement^=top] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateY(-20px);transform:translateY(-20px)}.tippy-popper[x-placement^=top] [data-animation=perspective]{-webkit-transform-origin:bottom;transform-origin:bottom}.tippy-popper[x-placement^=top] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateY(-10px) rotateX(0);transform:perspective(700px) translateY(-10px) rotateX(0)}.tippy-popper[x-placement^=top] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) translateY(0) rotateX(60deg);transform:perspective(700px) translateY(0) rotateX(60deg)}.tippy-popper[x-placement^=top] [data-animation=fade][data-state=visible]{-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateY(0);transform:translateY(0)}.tippy-popper[x-placement^=top] [data-animation=scale]{-webkit-transform-origin:bottom;transform-origin:bottom}.tippy-popper[x-placement^=top] [data-animation=scale][data-state=visible]{-webkit-transform:translateY(-10px) scale(1);transform:translateY(-10px) scale(1)}.tippy-popper[x-placement^=top] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateY(-10px) scale(.5);transform:translateY(-10px) scale(.5)}.tippy-popper[x-placement^=bottom] .tippy-backdrop{border-radius:0 0 30% 30%}.tippy-popper[x-placement^=bottom] .tippy-roundarrow{top:-7px;-webkit-transform-origin:50% 100%;transform-origin:50% 100%;margin:0 3px}.tippy-popper[x-placement^=bottom] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(0);transform:rotate(0)}.tippy-popper[x-placement^=bottom] .tippy-arrow{border-bottom:8px solid #333;border-right:8px solid transparent;border-left:8px solid transparent;top:-7px;margin:0 3px;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}.tippy-popper[x-placement^=bottom] .tippy-backdrop{-webkit-transform-origin:0 -50%;transform-origin:0 -50%}.tippy-popper[x-placement^=bottom] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-45%);transform:scale(1) translate(-50%,-45%)}.tippy-popper[x-placement^=bottom] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-50%);transform:scale(.2) translate(-50%);opacity:0}.tippy-popper[x-placement^=bottom] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateY(20px);transform:translateY(20px)}.tippy-popper[x-placement^=bottom] [data-animation=perspective]{-webkit-transform-origin:top;transform-origin:top}.tippy-popper[x-placement^=bottom] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateY(10px) rotateX(0);transform:perspective(700px) translateY(10px) rotateX(0)}.tippy-popper[x-placement^=bottom] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) translateY(0) rotateX(-60deg);transform:perspective(700px) translateY(0) rotateX(-60deg)}.tippy-popper[x-placement^=bottom] [data-animation=fade][data-state=visible]{-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateY(0);transform:translateY(0)}.tippy-popper[x-placement^=bottom] [data-animation=scale]{-webkit-transform-origin:top;transform-origin:top}.tippy-popper[x-placement^=bottom] [data-animation=scale][data-state=visible]{-webkit-transform:translateY(10px) scale(1);transform:translateY(10px) scale(1)}.tippy-popper[x-placement^=bottom] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateY(10px) scale(.5);transform:translateY(10px) scale(.5)}.tippy-popper[x-placement^=left] .tippy-backdrop{border-radius:50% 0 0 50%}.tippy-popper[x-placement^=left] .tippy-roundarrow{right:-12px;-webkit-transform-origin:33.33333333% 50%;transform-origin:33.33333333% 50%;margin:3px 0}.tippy-popper[x-placement^=left] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.tippy-popper[x-placement^=left] .tippy-arrow{border-left:8px solid #333;border-top:8px solid transparent;border-bottom:8px solid transparent;right:-7px;margin:3px 0;-webkit-transform-origin:0 50%;transform-origin:0 50%}.tippy-popper[x-placement^=left] .tippy-backdrop{-webkit-transform-origin:50% 0;transform-origin:50% 0}.tippy-popper[x-placement^=left] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-50%);transform:scale(1) translate(-50%,-50%)}.tippy-popper[x-placement^=left] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-75%,-50%);transform:scale(.2) translate(-75%,-50%);opacity:0}.tippy-popper[x-placement^=left] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateX(-20px);transform:translateX(-20px)}.tippy-popper[x-placement^=left] [data-animation=perspective]{-webkit-transform-origin:right;transform-origin:right}.tippy-popper[x-placement^=left] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateX(-10px) rotateY(0);transform:perspective(700px) translateX(-10px) rotateY(0)}.tippy-popper[x-placement^=left] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) translateX(0) rotateY(-60deg);transform:perspective(700px) translateX(0) rotateY(-60deg)}.tippy-popper[x-placement^=left] [data-animation=fade][data-state=visible]{-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateX(0);transform:translateX(0)}.tippy-popper[x-placement^=left] [data-animation=scale]{-webkit-transform-origin:right;transform-origin:right}.tippy-popper[x-placement^=left] [data-animation=scale][data-state=visible]{-webkit-transform:translateX(-10px) scale(1);transform:translateX(-10px) scale(1)}.tippy-popper[x-placement^=left] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateX(-10px) scale(.5);transform:translateX(-10px) scale(.5)}.tippy-popper[x-placement^=right] .tippy-backdrop{border-radius:0 50% 50% 0}.tippy-popper[x-placement^=right] .tippy-roundarrow{left:-12px;-webkit-transform-origin:66.66666666% 50%;transform-origin:66.66666666% 50%;margin:3px 0}.tippy-popper[x-placement^=right] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.tippy-popper[x-placement^=right] .tippy-arrow{border-right:8px solid #333;border-top:8px solid transparent;border-bottom:8px solid transparent;left:-7px;margin:3px 0;-webkit-transform-origin:100% 50%;transform-origin:100% 50%}.tippy-popper[x-placement^=right] .tippy-backdrop{-webkit-transform-origin:-50% 0;transform-origin:-50% 0}.tippy-popper[x-placement^=right] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-50%);transform:scale(1) translate(-50%,-50%)}.tippy-popper[x-placement^=right] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-25%,-50%);transform:scale(.2) translate(-25%,-50%);opacity:0}.tippy-popper[x-placement^=right] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateX(20px);transform:translateX(20px)}.tippy-popper[x-placement^=right] [data-animation=perspective]{-webkit-transform-origin:left;transform-origin:left}.tippy-popper[x-placement^=right] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateX(10px) rotateY(0);transform:perspective(700px) translateX(10px) rotateY(0)}.tippy-popper[x-placement^=right] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) translateX(0) rotateY(60deg);transform:perspective(700px) translateX(0) rotateY(60deg)}.tippy-popper[x-placement^=right] [data-animation=fade][data-state=visible]{-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateX(0);transform:translateX(0)}.tippy-popper[x-placement^=right] [data-animation=scale]{-webkit-transform-origin:left;transform-origin:left}.tippy-popper[x-placement^=right] [data-animation=scale][data-state=visible]{-webkit-transform:translateX(10px) scale(1);transform:translateX(10px) scale(1)}.tippy-popper[x-placement^=right] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateX(10px) scale(.5);transform:translateX(10px) scale(.5)}.tippy-tooltip{position:relative;color:#fff;border-radius:.25rem;font-size:.875rem;padding:.3125rem .5625rem;line-height:1.4;text-align:center;will-change:transform;background-color:#333}.tippy-tooltip[data-size=small]{padding:.1875rem .375rem;font-size:.75rem}.tippy-tooltip[data-size=large]{padding:.375rem .75rem;font-size:1rem}.tippy-tooltip[data-animatefill]{overflow:hidden;background-color:transparent}.tippy-tooltip[data-interactive],.tippy-tooltip[data-interactive] path{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-tooltip[data-inertia][data-state=hidden]{transition-timing-function:ease}.tippy-arrow,.tippy-roundarrow{position:absolute;width:0;height:0}.tippy-roundarrow{width:18px;height:7px;fill:#333;pointer-events:none}.tippy-backdrop{position:absolute;will-change:transform;background-color:#333;border-radius:50%;width:calc(110% + 2rem);left:50%;top:50%;z-index:-1;transition:all cubic-bezier(.46,.1,.52,.98);-webkit-backface-visibility:hidden;backface-visibility:hidden}.tippy-backdrop:after{content:"";float:left;padding-top:100%}.tippy-backdrop+.tippy-content{transition-property:opacity;will-change:opacity}.tippy-backdrop+.tippy-content[data-state=visible]{opacity:1}.tippy-backdrop+.tippy-content[data-state=hidden]{opacity:0}';function W(){return(W=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var te=navigator.userAgent,ne=(/MSIE |Trident\//.test(te),/UCBrowser\//.test(te)),re=/iPhone|iPad|iPod/.test(navigator.platform)&&!window.MSStream,ie=(Q={a11y:!0,allowHTML:!0,animateFill:!0,animation:"shift-away",appendTo:function(e){return z(e).body},aria:"describedby",arrow:!1,arrowType:"sharp",boundary:"scrollParent",content:"",delay:[0,20],distance:10,duration:[325,275],flip:!0,flipBehavior:"flip",flipOnUpdate:!1,followCursor:!1,hideOnClick:!0,ignoreAttributes:!1,inertia:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,lazy:!0,maxWidth:350,multiple:!1,offset:0,onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},placement:"top",popperOptions:{},role:"tooltip",showOnInit:!1,size:"regular",sticky:!1,target:"",theme:"dark",touch:!0,touchHold:!1,trigger:"mouseenter focus",updateDuration:0,wait:null,zIndex:9999},["arrow","arrowType","boundary","distance","flip","flipBehavior","flipOnUpdate","offset","placement","popperOptions"]),oe={POPPER:".tippy-popper",TOOLTIP:".tippy-tooltip",CONTENT:".tippy-content",BACKDROP:".tippy-backdrop",ARROW:".tippy-arrow",ROUND_ARROW:".tippy-roundarrow"},ae=Element.prototype,se=ae.matches||ae.matchesSelector||ae.webkitMatchesSelector||ae.mozMatchesSelector||ae.msMatchesSelector;function le(e){return[].slice.call(e)}function de(e,t){return(ae.closest||function(e){for(var t=this;t;){if(se.call(t,e))return t;t=t.parentElement}}).call(e,t)}function ce(e,t){for(;e;){if(t(e))return e;e=e.parentElement}}function pe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ue(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?n:r}return e}function j(n,r){var i;return function(){var e=this,t=arguments;clearTimeout(i),i=setTimeout(function(){return n.apply(e,t)},r)}}function he(e,t){return e&&e.modifiers&&e.modifiers[t]}function fe(e,t){return-1<e.indexOf(t)}function ge(e,t){return"function"==typeof e?e.apply(null,t):e}function me(e,t){e.filter(function(e){return"flip"===e.name})[0].enabled=t}function ve(e){return e.createElement("div")}function ye(e,t){e.innerHTML=t instanceof Element?t.innerHTML:t}function _e(e,t){t.content instanceof Element?(ye(e,""),e.appendChild(t.content)):e[t.allowHTML?"innerHTML":"textContent"]=t.content}function Ne(e){return{tooltip:e.querySelector(oe.TOOLTIP),backdrop:e.querySelector(oe.BACKDROP),content:e.querySelector(oe.CONTENT),arrow:e.querySelector(oe.ARROW)||e.querySelector(oe.ROUND_ARROW)}}function be(e){e.setAttribute("data-inertia","")}function Ce(e,t){var n=ve(t);return"round"===e?(n.className="tippy-roundarrow",ye(n,'<svg viewBox="0 0 18 7" xmlns="http://www.w3.org/2000/svg"><path d="M0 7s2.021-.015 5.253-4.218C6.584 1.051 7.797.007 9 0c1.203-.007 2.416 1.035 3.761 2.782C16.012 7.005 18 7 18 7H0z"/></svg>')):n.className="tippy-arrow",n}function Ee(e){var t=ve(e);return t.className="tippy-backdrop",t.setAttribute("data-state","hidden"),t}function Te(e,t){e.setAttribute("tabindex","-1"),t.setAttribute("data-interactive","")}function Se(e,t){e.forEach(function(e){e&&(e.style.transitionDuration="".concat(t,"ms"))})}function ke(e,t,n){var r=ne&&void 0!==document.body.style.webkitTransition?"webkitTransitionEnd":"transitionend";e[t+"EventListener"](r,n)}function we(e){var t=e.getAttribute("x-placement");return t?t.split("-")[0]:""}function xe(e,t){e.forEach(function(e){e&&e.setAttribute("data-state",t)})}function Oe(t,n,e){e.split(" ").forEach(function(e){t.classList[n](e+"-theme")})}function Re(e,t,n,r){var i=Ne(e),o=i.tooltip,a=i.content,s=i.backdrop,l=i.arrow;e.style.zIndex=n.zIndex,o.setAttribute("data-size",n.size),o.setAttribute("data-animation",n.animation),o.style.maxWidth=n.maxWidth+("number"==typeof n.maxWidth?"px":""),n.role?e.setAttribute("role",n.role):e.removeAttribute("role"),t.content!==n.content&&_e(a,n),!t.animateFill&&n.animateFill?(o.appendChild(Ee(r)),o.setAttribute("data-animatefill","")):t.animateFill&&!n.animateFill&&(o.removeChild(s),o.removeAttribute("data-animatefill")),!t.arrow&&n.arrow?o.appendChild(Ce(n.arrowType,r)):t.arrow&&!n.arrow&&o.removeChild(l),t.arrow&&n.arrow&&t.arrowType!==n.arrowType&&o.replaceChild(Ce(n.arrowType,r),l),!t.interactive&&n.interactive?Te(e,o):t.interactive&&!n.interactive&&function(e,t){e.removeAttribute("tabindex"),t.removeAttribute("data-interactive")}(e,o),!t.inertia&&n.inertia?be(o):t.inertia&&!n.inertia&&function(e){e.removeAttribute("data-inertia")}(o),t.theme!==n.theme&&(Oe(o,"remove",t.theme),Oe(o,"add",n.theme))}function De(e,t){var n=e.popper,r=e.options,i=r.onCreate,o=r.onUpdate;r.onCreate=r.onUpdate=function(e){!function(e){e.offsetHeight}(n),t(),o(e),r.onCreate=i,r.onUpdate=o}}function Ae(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=t.checkHideOnClick,r=t.exclude,i=t.duration;le(e.querySelectorAll(oe.POPPER)).forEach(function(e){var t=e._tippy;!t||n&&!0!==t.props.hideOnClick||r&&e===r.popper||t.hide(i)})}var Ie={passive:!0},Le=4,Pe=!1;function Me(e){var t=z(e.currentTarget||e.target);Pe||(Pe=!0,re&&t.body.classList.add("tippy-iOS"),window.performance&&t.addEventListener("mousemove",Ue))}var Be=0;function Ue(e){var t=function(e){return z(e.currentTarget||e.target)}(e),n=performance.now();n-Be<20&&(Pe=!1,t.removeEventListener("mousemove",Ue),re||t.body.classList.remove("tippy-iOS")),Be=n}function Fe(e){var t=e.currentTarget||e.target;if(!(t instanceof Element))return Ae(z(t));var n=de(t,oe.POPPER);if(!(n&&n._tippy&&n._tippy.props.interactive)){var r=ce(t,function(e){return e._tippy&&e._tippy.reference===e});if(r){var i=r._tippy,o=fe(i.props.trigger,"click");if(Pe||o)return Ae(z(t),{exclude:i,checkHideOnClick:!0});if(!0!==i.props.hideOnClick||o)return;i.clearDelayTimeouts()}Ae(z(t),{checkHideOnClick:!0})}}function He(e){var t=e.currentTarget||e.target,n=(t&&t.document||window.document).activeElement;n&&n.blur&&n._tippy&&n.blur()}var je=Object.keys(Q);function We(e,t){var n=W({},t,{content:ge(t.content,[e])},t.ignoreAttributes?{}:function(e){return je.reduce(function(t,n){var r=(e.getAttribute("data-tippy-".concat(n))||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t},{})}(e));return(n.arrow||ne)&&(n.animateFill=!1),n}function Ve(e,t){var n=0<arguments.length&&void 0!==e?e:{},r=1<arguments.length?t:void 0;Object.keys(n).forEach(function(e){if(!pe(r,e))throw new Error("[tippy]: `".concat(e,"` is not a valid option"))})}var ze=1;function Ge(e,n){var r=We(e,n);if(!function(e,t){var n,r=t.head;if((n=H(r).find("style#tippy-inline-style")).length)return;(n=t.createElement("style")).setAttribute("id","tippy-inline-style"),n.type="text/css",n.textContent=e;var i=r.firstChild;r.insertBefore(n,i)}(ee,z(e)),!r.multiple&&e._tippy)return null;var o={},g=null,i=0,t=0,a=!1,s=function(){},l=[],d=0<r.interactiveDebounce?j(C,r.interactiveDebounce):C,c=null,p=ze++,u=function(e,t,n){var r=ve(n);r.className="tippy-popper",r.id="tippy-".concat(e),r.style.zIndex=t.zIndex,t.role&&r.setAttribute("role",t.role);var i=ve(n);i.className="tippy-tooltip",i.style.maxWidth=t.maxWidth+("number"==typeof t.maxWidth?"px":""),i.setAttribute("data-size",t.size),i.setAttribute("data-animation",t.animation),i.setAttribute("data-state","hidden"),Oe(i,"add",t.theme);var o=ve(n);return o.className="tippy-content",o.setAttribute("data-state","hidden"),t.interactive&&Te(r,i),t.arrow&&i.appendChild(Ce(t.arrowType,n)),t.animateFill&&(i.appendChild(Ee(n)),i.setAttribute("data-animatefill","")),t.inertia&&be(i),_e(o,t),i.appendChild(o),r.appendChild(i),r}(p,r,z(e));u.addEventListener("mouseenter",function(e){m.props.interactive&&m.state.isVisible&&"mouseenter"===o.type&&v(e)}),u.addEventListener("mouseleave",function(){m.props.interactive&&"mouseenter"===o.type&&m.doc.addEventListener("mousemove",d)});var h=Ne(u),m={id:p,doc:z(e),reference:e,popper:u,popperChildren:h,popperInstance:null,props:r,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},clearDelayTimeouts:P,set:M,setContent:function(e){M({content:e})},show:B,hide:U,enable:function(){m.state.isEnabled=!0},disable:function(){m.state.isEnabled=!1},destroy:F};return A(),r.lazy||(x(),m.popperInstance.disableEventListeners()),r.showOnInit&&v(),!r.a11y||r.target||function(e){return!(e instanceof Element)||se.call(e,"a[href],area[href],button,details,input,textarea,select,iframe,[tabindex]")&&!e.hasAttribute("disabled")}(e)||e.setAttribute("tabindex","0"),e._tippy=m,u._tippy=m;function f(e){var t=g=e,n=t.clientX,r=t.clientY;if(m.popperInstance){var i=V(m.reference),o=we(m.popper),a=m.props.arrow?Le+("round"===m.props.arrowType?18:16):Le,s=fe(["top","bottom"],o),l=fe(["left","right"],o),d=s?Math.max(a,n):n,c=l?Math.max(a,r):r;s&&a<d&&(d=Math.min(n,i.innerWidth-a)),l&&a<c&&(c=Math.min(r,i.innerHeight-a));var p=m.reference.getBoundingClientRect(),u=m.props.followCursor,h="horizontal"===u,f="vertical"===u;m.popperInstance.reference={getBoundingClientRect:function(){return{width:0,height:0,top:h?p.top:c,bottom:h?p.bottom:c,left:f?p.left:d,right:f?p.right:d}},clientWidth:0,clientHeight:0},m.popperInstance.scheduleUpdate(),"initial"===u&&m.state.isVisible&&_(m.doc)}}function v(e){if(P(),!m.state.isVisible){if(m.props.target)return function(e){var t=de(e.target,m.props.target);t&&!t._tippy&&(Ge(t,W({},m.props,{content:ge(n.content,[t]),appendTo:n.appendTo,target:"",showOnInit:!0})),v(e))}(e);if(a=!0,m.props.wait)return m.props.wait(m,e);O()&&!m.state.isMounted&&m.doc.addEventListener("mousemove",f);var t=ue(m.props.delay,0,Q.delay);t?i=setTimeout(function(){B()},t):B()}}function y(){if(P(),!m.state.isVisible)return _(m.doc);a=!1;var e=ue(m.props.delay,1,Q.delay);e?t=setTimeout(function(){m.state.isVisible&&U()},e):U()}function _(e){e.removeEventListener("mousemove",f)}function N(e){e&&(e.body.removeEventListener("mouseleave",y),e.removeEventListener("mousemove",d))}function b(e){m.state.isEnabled&&!w(e)&&(m.state.isVisible||(o=e)instanceof MouseEvent&&(g=e),"click"===e.type&&!1!==m.props.hideOnClick&&m.state.isVisible?y():v(e))}function C(e){var t=ce(e.target,function(e){return e._tippy}),n=de(e.target,oe.POPPER)===m.popper,r=t===m.reference;n||r||!function(e,t,n,r){if(!e)return!0;var i=n.clientX,o=n.clientY,a=r.interactiveBorder,s=r.distance,l=t.top-o>("top"===e?a+s:a),d=o-t.bottom>("bottom"===e?a+s:a),c=t.left-i>("left"===e?a+s:a),p=i-t.right>("right"===e?a+s:a);return l||d||c||p}(we(m.popper),m.popper.getBoundingClientRect(),e,m.props)||(N(m.doc),y())}function E(e){if(!w(e)){var t=z(e.currentTarget||e.target);if(m.props.interactive)return t.body.addEventListener("mouseleave",y),void t.addEventListener("mousemove",d);y()}}function T(e){e.target===m.reference&&(m.props.interactive&&e.relatedTarget&&m.popper.contains(e.relatedTarget)||y())}function S(e){de(e.target,m.props.target)&&v(e)}function k(e){de(e.target,m.props.target)&&y()}function w(e){var t="ontouchstart"in m.doc.defaultView,n=fe(e.type,"touch"),r=m.props.touchHold;return t&&Pe&&r&&!n||Pe&&!r&&n}function x(){var i=m.props.popperOptions,e=m.popperChildren,o=e.tooltip,t=e.arrow;m.popperInstance=new Z(m.reference,m.popper,W({placement:m.props.placement},i,{modifiers:W({},i?i.modifiers:{},{preventOverflow:W({boundariesElement:m.props.boundary,padding:Le},he(i,"preventOverflow")),arrow:W({element:t,enabled:!!t},he(i,"arrow")),flip:W({enabled:m.props.flip,padding:m.props.distance+Le,behavior:m.props.flipBehavior},he(i,"flip")),offset:W({offset:m.props.offset},he(i,"offset"))}),onUpdate:function(e){m.props.flip&&!m.props.flipOnUpdate&&(e.flipped&&(m.popperInstance.options.placement=e.placement),me(m.popperInstance.modifiers,!1));var t=we(m.popper),n=o.style;n.top="",n.bottom="",n.left="",n.right="",n[t]=function(e){return-(e-10)+"px"}(m.props.distance);var r={top:Le,bottom:Le,left:Le,right:Le};r[t]=Le+m.props.distance,m.popperInstance.modifiers.filter(function(e){return"preventOverflow"===e.name})[0].padding=r,i&&i.onUpdate&&i.onUpdate(e)}}))}function O(){return m.props.followCursor&&!Pe&&"focus"!==o.type}function R(e,t){function n(e){e.target===r&&(ke(r,"remove",n),t())}if(0===e)return t();var r=m.popperChildren.tooltip;ke(r,"remove",s),ke(r,"add",n),s=n}function D(e,t,n){var r=2<arguments.length&&void 0!==n&&n;m.reference.addEventListener(e,t,r),l.push({eventType:e,handler:t,options:r})}function A(){m.props.touchHold&&!m.props.target&&(D("touchstart",b,Ie),D("touchend",E,Ie)),m.props.trigger.trim().split(" ").forEach(function(e){if("manual"!==e)if(m.props.target)switch(e){case"mouseenter":D("mouseover",S),D("mouseout",k);break;case"focus":D("focusin",S),D("focusout",k);break;case"click":D(e,S)}else switch(D(e,b),e){case"mouseenter":D("mouseleave",E);break;case"focus":D("focusout",T)}})}function I(){l.forEach(function(e){var t=e.eventType,n=e.handler,r=e.options;m.reference.removeEventListener(t,n,r)}),l=[]}function L(){return[m.popperChildren.tooltip,m.popperChildren.backdrop,m.popperChildren.content]}function P(){clearTimeout(i),clearTimeout(t)}function M(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};Ve(t,Q);var e=m.props,n=We(m.reference,W({},m.props,t,{ignoreAttributes:!0}));n.ignoreAttributes=pe(t,"ignoreAttributes")?t.ignoreAttributes:e.ignoreAttributes,m.props=n,(pe(t,"trigger")||pe(t,"touchHold"))&&(I(),A()),pe(t,"interactiveDebounce")&&(N(m.doc),d=j(C,t.interactiveDebounce)),Re(m.popper,e,n,m.doc),m.popperChildren=Ne(m.popper),m.popperInstance&&(m.popperInstance.update(),ie.some(function(e){return pe(t,e)})&&(m.popperInstance.destroy(),x(),m.state.isVisible||m.popperInstance.disableEventListeners(),m.props.followCursor&&g&&f(g)))}function B(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:ue(m.props.duration,0,Q.duration[0]);if(!m.state.isDestroyed&&m.state.isEnabled&&(!Pe||m.props.touch)){var t=function(e){if(null==e)return null;if(e.getRootNode)return e.getRootNode();for(;null!==e.parentNode;)e=e.parentNode;return e}(m.reference),n=t&&t.documentElement;if(!(pe(m.reference,"isVirtual")||n&&n.contains(m.reference)))return F();m.reference.hasAttribute("disabled")||!1!==m.props.onShow(m)&&(m.popper.style.visibility="visible",m.state.isVisible=!0,m.props.interactive&&m.reference.classList.add("tippy-active"),Se([m.popper,m.popperChildren.tooltip,m.popperChildren.backdrop],0),function(e){var t=!(O()||"initial"===m.props.followCursor&&Pe);m.popperInstance?(O()||(m.popperInstance.scheduleUpdate(),t&&m.popperInstance.enableEventListeners()),me(m.popperInstance.modifiers,m.props.flip)):(x(),t||m.popperInstance.disableEventListeners()),m.popperInstance.reference=m.reference;var n=m.popperChildren.arrow;if(O()){n&&(n.style.margin="0");var r=ue(m.props.delay,0,Q.delay);o.type&&f(r&&g?g:o)}else n&&(n.style.margin="");Pe&&g&&"initial"===m.props.followCursor&&(f(g),n&&(n.style.margin="0")),De(m.popperInstance,e);var i=m.props.appendTo;(c="parent"===i?m.reference.parentNode:ge(i,[m.reference])).contains(m.popper)||(c.appendChild(m.popper),m.props.onMount(m),m.state.isMounted=!0)}(function(){m.state.isVisible&&(O()||m.popperInstance.update(),Se([m.popper],r.updateDuration),Se(L(),e),m.popperChildren.backdrop&&(m.popperChildren.content.style.transitionDelay=Math.round(e/12)+"ms"),m.props.sticky&&(Se([m.popper],0),function e(){m.popperInstance&&m.popperInstance.scheduleUpdate(),m.state.isMounted?requestAnimationFrame(e):Se([m.popper],0)}()),xe(L(),"visible"),function(e,t){R(e,t)}(e,function(){m.popperChildren.tooltip.classList.add("tippy-notransition"),m.props.aria&&m.reference.setAttribute("aria-".concat(m.props.aria),m.popper.id),m.props.onShown(m),m.state.isShown=!0}))}))}}function U(e){e="number"==typeof e?e:ue(m.props.duration,1,Q.duration[1]),!m.state.isDestroyed&&m.state.isEnabled&&!1!==m.props.onHide(m)&&(m.popperChildren.tooltip.classList.remove("tippy-notransition"),m.props.interactive&&m.reference.classList.remove("tippy-active"),m.popper.style.visibility="hidden",m.state.isVisible=!1,m.state.isShown=!1,Se(L(),e),xe(L(),"hidden"),function(e,t){R(e,function(){!m.state.isVisible&&c&&c.contains(m.popper)&&t()})}(e,function(){a||_(m.doc),m.props.aria&&m.reference.removeAttribute("aria-".concat(m.props.aria)),m.popperInstance.disableEventListeners(),m.popperInstance.options.placement=m.props.placement,c.removeChild(m.popper),m.props.onHidden(m),m.state.isMounted=!1}))}function F(e){m.state.isDestroyed||(m.state.isMounted&&U(0),I(),delete m.reference._tippy,m.props.target&&e&&le(m.reference.querySelectorAll(m.props.target)).forEach(function(e){e._tippy&&e._tippy.destroy()}),m.popperInstance&&m.popperInstance.destroy(),m.state.isDestroyed=!0)}}var Ye=!1;function Xe(e,t){if(!e)return null;Ve(t,Q),Ye||(function(e){var t=z(e),n=t.defaultView;t.addEventListener("click",Fe,!0),t.addEventListener("touchstart",Me,Ie),n.addEventListener("blur",He)}(e),Ye=!0);var r=W({},Q,t);return function(e){return"[object Object]"==={}.toString.call(e)&&!e.addEventListener}(e)&&function(n){var e={isVirtual:!0,attributes:n.attributes||{},setAttribute:function(e,t){n.attributes[e]=t},getAttribute:function(e){return n.attributes[e]},removeAttribute:function(e){delete n.attributes[e]},hasAttribute:function(e){return e in n.attributes},addEventListener:function(){},removeEventListener:function(){},classList:{classNames:{},add:function(e){n.classList.classNames[e]=!0},remove:function(e){delete n.classList.classNames[e]},contains:function(e){return e in n.classList.classNames}}};for(var t in e)n[t]=e[t]}(e),[e].reduce(function(e,t){var n=t&&Ge(t,r);return n&&e.push(n),e},[])[0]}Xe.version="4.0.4",Xe.defaults=Q,Xe.setDefaults=function(t){Object.keys(t).forEach(function(e){Q[e]=t[e]})},Xe.hideAll=Ae,Xe.group=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=e.delay,r=void 0===n?t[0].props.delay:n,i=e.duration,o=void 0===i?0:i,a=!1;function s(e){a=e,p()}function l(e){e._originalProps.onShow(e),t.forEach(function(e){e.set({duration:o}),e.hide()}),s(!0)}function d(e){e._originalProps.onHide(e),s(!1)}function c(e){e._originalProps.onShown(e),e.set({duration:e._originalProps.duration})}function p(){t.forEach(function(e){e.set({onShow:l,onShown:c,onHide:d,delay:a?[0,Array.isArray(r)?r[1]:r]:r,duration:a?o:e._originalProps.duration})})}t.forEach(function(e){e._originalProps={duration:e.props.duration,onHide:e.props.onHide,onShow:e.props.onShow,onShown:e.props.onShown}}),p()},e.tippy=Xe}(window.FLITE,window.jQuery);var o,a,s,h,l,d,c,p,u,f,R=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function g(){this._isComposing=!1,this._compositionEnded=!1}function m(n,r){var i=this;this.callback=r,this.id=String(m.nextId++),m._guards[this.id]=this;var o=null,a=function(e){n.removeEventListener("keyup",a,!0),delete m._guards[i.id],o&&clearTimeout(o);var t=e.keyCode||e.which;8===t?r({backspace:!0,ctrl:e.ctrlKey,shift:e.shiftKey}):46===t&&r({del:!0,ctrl:e.ctrlKey,shift:e.shiftKey})};n.addEventListener("keyup",a,!0),o=setTimeout(function(){o=0,removeEventListener("keyup",a,!0),delete m._guards[i.id],r({backspace:!1,del:!1,ctrl:!1,shift:!1})},75)}function v(){}function y(e){this._matchNodePattern="",this._matchNodeAndContentPattern="",this._matchers=[],this.addPatterns(e)}function _(e,t){void 0===e&&(e=null),void 0===t&&(t=0),this._duration=0,this._callback=null,this._timeout=null,this.set(e,t,!1)}Object.defineProperty(F,"__esModule",{value:!0}),(a=D=D||{})[a.OK=0]="OK",a[a.IGNORE=1]="IGNORE",a[a.IGNORE_ALL=2]="IGNORE_ALL",function(t){var h,e;t||console.error("mutation-summary: global is not defined"),(e=h=h||{})[e.STAYED_OUT=0]="STAYED_OUT",e[e.ENTERED=1]="ENTERED",e[e.STAYED_IN=2]="STAYED_IN",e[e.REPARENTED=3]="REPARENTED",e[e.REORDERED=4]="REORDERED",e[e.EXITED=5]="EXITED";var r=void 0!==window.WebKitMutationObserver?window.WebKitMutationObserver:window.MutationObserver;if(!r)throw new Error("DOM Mutation Observers are required; https://developer.mozilla.org/en-US/docs/DOM/MutationObserver");var n=["added","removed","reordered","reparented","valueChanged","characterDataChanged"],l=(i.prototype.isIndex=function(e){return+e==e>>>0},i.prototype.nodeId=function(e){var t=e[i.ID_PROP];return t=t||(e[i.ID_PROP]=i.nextId_++)},i.prototype.set=function(e,t){var n=this.nodeId(e);this.nodes[n]=e,this.values[n]=t},i.prototype.get=function(e){var t=this.nodeId(e);return this.values[t]},i.prototype.has=function(e){return Boolean(this.nodes[this.nodeId(e)])},i.prototype.delete=function(e){var t=this.nodeId(e);delete this.nodes[t],this.values[t]=void 0},i.prototype.keys=function(){var e=[];for(var t in this.nodes)this.isIndex(t)&&e.push(this.nodes[t]);return e},i.ID_PROP="__mutation_summary_node_map_id__",i.nextId_=1,i);function i(){this.nodes=[],this.values=[]}var o=(a.prototype.getAttributeOldValue=function(e){if(this.attributeOldValues)return this.isCaseInsensitive&&(e=e.toLowerCase()),this.attributeOldValues[e]},a.prototype.getAttributeNamesMutated=function(){var e=[];if(!this.attributeOldValues)return e;for(var t in this.attributeOldValues)e.push(t);return e},a.prototype.attributeMutated=function(e,t){this.attributes=!0,this.attributeOldValues=this.attributeOldValues||{},e in this.attributeOldValues||(this.attributeOldValues[e]=t)},a.prototype.characterDataMutated=function(e){this.characterData||(this.characterData=!0,this.characterDataOldValue=e)},a.prototype.removedFromParent=function(e){this.childList=!0,this.added||this.oldParentNode?(this.added=!1,this.oldParentNode=this.oldParentNode||e):this.oldParentNode=e},a.prototype.insertedIntoParent=function(){this.childList=!0,this.added=!0},a.prototype.getOldParent=function(){if(this.childList){if(this.oldParentNode)return this.oldParentNode;if(this.added)return null}return this.node.parentNode},a);function a(e,t,n,r,i,o,a,s){void 0===t&&(t=!1),void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===i&&(i=null),void 0===o&&(o=!1),void 0===a&&(a=null),void 0===s&&(s=null),this.node=e,this.childList=t,this.attributes=n,this.characterData=r,this.oldParentNode=i,this.added=o,this.attributeOldValues=a,this.characterDataOldValue=s,this.isCaseInsensitive=this.node.nodeType===Node.ELEMENT_NODE&&this.node instanceof HTMLElement&&this.node.ownerDocument instanceof HTMLDocument}var d,s=function(){this.added=new l,this.removed=new l,this.maybeMoved=new l,this.oldPrevious=new l,this.moved=void 0},c=(R(p,d=l),p.prototype.getChange=function(e){var t=this.get(e);return t||(t=new o(e),this.set(e,t)),t},p.prototype.getOldParent=function(e){var t=this.get(e);return t?t.getOldParent():e.parentNode},p.prototype.getIsReachable=function(e){if(e===this.rootNode)return!0;if(!e)return!1;this.reachableCache=this.reachableCache||new l;var t=this.reachableCache.get(e);return void 0===t&&(t=this.getIsReachable(e.parentNode),this.reachableCache.set(e,t)),t},p.prototype.getWasReachable=function(e){if(e===this.rootNode)return!0;if(!e)return!1;this.wasReachableCache=this.wasReachableCache||new l;var t=this.wasReachableCache.get(e);return void 0===t&&(t=this.getWasReachable(this.getOldParent(e)),this.wasReachableCache.set(e,t)),t},p.prototype.reachabilityChange=function(e){return this.getIsReachable(e)?this.getWasReachable(e)?h.STAYED_IN:h.ENTERED:this.getWasReachable(e)?h.EXITED:h.STAYED_OUT},p);function p(e,t,n){var r,i,o=d.call(this)||this;n=n||function(e){return!0},o.rootNode=e,o.reachableCache=void 0,o.wasReachableCache=void 0,o.anyParentsChanged=!1,o.anyAttributesChanged=!1,o.anyCharacterDataChanged=!1;for(var a=0;a<t.length;a++)switch((i=t[a]).type){case"childList":o.anyParentsChanged=!0;for(var s=0;s<i.removedNodes.length;s++)n(r=i.removedNodes[s])&&o.getChange(r).removedFromParent(i.target);for(s=0;s<i.addedNodes.length;s++)n(r=i.addedNodes[s])&&o.getChange(r).insertedIntoParent();break;case"attributes":o.anyAttributesChanged=!0,n(i.target)&&o.getChange(i.target).attributeMutated(i.attributeName,i.oldValue);break;case"characterData":o.anyCharacterDataChanged=!0,n(i.target)&&o.getChange(i.target).characterDataMutated(i.oldValue)}return o}var u=(f.prototype.processMutations=function(){if(this.treeChanges.anyParentsChanged||this.treeChanges.anyAttributesChanged)for(var e=this.treeChanges.keys(),t=0;t<e.length;t++)this.visitNode(e[t],void 0)},f.prototype.visitNode=function(e,t){if(!this.visited.has(e)&&this.nodeFilter(e)){this.visited.set(e,!0);var n=this.treeChanges.get(e),r=t;if((n&&n.childList||null==r)&&(r=this.treeChanges.reachabilityChange(e)),r!==h.STAYED_OUT){if(this.matchabilityChange(e),r===h.ENTERED)this.entered.push(e);else if(r===h.EXITED)this.exited.push(e),this.ensureHasOldPreviousSiblingIfNeeded(e);else if(r===h.STAYED_IN){var i=h.STAYED_IN;n&&n.childList&&(n.oldParentNode!==e.parentNode?(i=h.REPARENTED,this.ensureHasOldPreviousSiblingIfNeeded(e)):this.calcReordered&&this.wasReordered(e)&&(i=h.REORDERED)),this.stayedIn.set(e,i)}if(r!==h.STAYED_IN)for(var o=e.firstChild;o;o=o.nextSibling)this.visitNode(o,r)}}},f.prototype.ensureHasOldPreviousSiblingIfNeeded=function(e){if(this.calcOldPreviousSibling){this.processChildlistChanges();var t=e.parentNode,n=this.treeChanges.get(e);n&&n.oldParentNode&&(t=n.oldParentNode);var r=this.childListChangeMap.get(t);r||(r=new s,this.childListChangeMap.set(t,r)),!e.previousSibling&&r.oldPrevious.has(e)||r.oldPrevious.set(e,e.previousSibling)}},f.prototype.getChanged=function(e,t,n){var r,i;this.selectors=t,this.characterDataOnly=n;for(var o=0;o<this.entered.length;o++)r=this.entered[o],(i=this.matchabilityChange(r))!==h.ENTERED&&i!==h.STAYED_IN||e.added.push(r);var a,s=this.stayedIn.keys();for(o=0;o<s.length;o++)if(a=(r=s[o]).nodeType===Node.TEXT_NODE&&this.stayedIn.get(r)===h.REPARENTED,(i=this.matchabilityChange(r,a?h.STAYED_IN:null))===h.ENTERED)e.added.push(r);else if(i===h.EXITED)e.removed.push(r);else if(i===h.STAYED_IN&&(e.reparented||e.reordered)){var l=this.stayedIn.get(r);e.reparented&&l===h.REPARENTED?e.reparented.push(r):e.reordered&&l===h.REORDERED&&e.reordered.push(r)}for(o=0;o<this.exited.length;o++)r=this.exited[o],(i=this.matchabilityChange(r))!==h.EXITED&&i!==h.STAYED_IN||e.removed.push(r)},f.prototype.getOldParentNode=function(e){var t=this.treeChanges.get(e);if(t&&t.childList)return t.oldParentNode?t.oldParentNode:null;var n=this.treeChanges.reachabilityChange(e);if(n===h.STAYED_OUT||n===h.ENTERED)throw Error("getOldParentNode requested on invalid node.");return e.parentNode},f.prototype.getOldPreviousSibling=function(e){var t=e.parentNode,n=this.treeChanges.get(e);n&&n.oldParentNode&&(t=n.oldParentNode);var r=this.childListChangeMap.get(t);if(!r)throw Error("getOldPreviousSibling requested on invalid node.");return r.oldPrevious.get(e)},f.prototype.getOldAttribute=function(e,t){var n=this.treeChanges.get(e);if(!n||!n.attributes)throw Error("getOldAttribute requested on invalid node.");var r=n.getAttributeOldValue(t);if(void 0===r)throw Error("getOldAttribute requested for unchanged attribute name.");return r},f.prototype.attributeChangedNodes=function(e){if(!this.treeChanges.anyAttributesChanged)return{};var t,n;if(e){t={},n={};for(var r=0;r<e.length;r++){var i=e[r];t[i]=!0,n[i.toLowerCase()]=i}}var o,a,s={},l=this.treeChanges.keys();for(r=0;r<l.length;r++){o=l[r];var d=this.treeChanges.get(o);if(d.attributes&&h.STAYED_IN===this.treeChanges.reachabilityChange(o)&&h.STAYED_IN===this.matchabilityChange(o)){a=o;for(var c=d.getAttributeNamesMutated(),p=void 0,u=0;u<c.length;u++)p=c[u],(!t||t[p]||d.isCaseInsensitive&&n[p])&&d.getAttributeOldValue(p)!==a.getAttribute(p)&&(n&&d.isCaseInsensitive&&(p=n[p]),s[p]=s[p]||[],s[p].push(a))}}return s},f.prototype.getOldCharacterData=function(e){var t=this.treeChanges.get(e);if(!t||!t.characterData)throw Error("getOldCharacterData requested on invalid node.");return t.characterDataOldValue},f.prototype.getCharacterDataChanged=function(){if(!this.treeChanges.anyCharacterDataChanged)return[];for(var e,t,n=this.treeChanges.keys(),r=[],i=0;i<n.length;i++)e=n[i],h.STAYED_IN===this.treeChanges.reachabilityChange(e)&&(t=this.treeChanges.get(e)).characterData&&e.textContent!=t.characterDataOldValue&&r.push(e);return r},f.prototype.computeMatchabilityChange=function(e,t){this.matchCache||(this.matchCache=[]),this.matchCache[e.uid]||(this.matchCache[e.uid]=new l);var n=this.matchCache[e.uid],r=n.get(t);return void 0===r&&(r=e.matchabilityChange(t,this.treeChanges.get(t)),n.set(t,r)),r},f.prototype.matchabilityChange=function(e,t){var n=this;if(this.characterDataOnly)switch(e.nodeType){case Node.COMMENT_NODE:case Node.TEXT_NODE:return h.STAYED_IN;default:return h.STAYED_OUT}if(!this.selectors)return h.STAYED_IN;if(e.nodeType!==Node.ELEMENT_NODE)return null==t?e.parentNode?h.STAYED_IN:h.STAYED_OUT:t;for(var r=e,i=this.selectors.map(function(e){return n.computeMatchabilityChange(e,r)}),o=h.STAYED_OUT,a=0;o!==h.STAYED_IN&&a<i.length;){switch(i[a]){case h.STAYED_IN:o=h.STAYED_IN;break;case h.ENTERED:o=o===h.EXITED?h.STAYED_IN:h.ENTERED;break;case h.EXITED:o=o===h.ENTERED?h.STAYED_IN:h.EXITED}a++}return o},f.prototype.getChildlistChange=function(e){var t=this.childListChangeMap.get(e);return t||(t=new s,this.childListChangeMap.set(e,t)),t},f.prototype.processChildlistChanges=function(){if(!this.childListChangeMap){var e,t,n,r;this.childListChangeMap=new l;for(var i=function(e,t,n){!e||n.added.has(e)||n.maybeMoved.has(e)||t&&!n.oldPrevious.get(e)&&(t&&(n.added.has(t)||n.maybeMoved.has(t))||n.oldPrevious.set(e,t))},o=0;o<this.mutations.length;o++)if("childList"==(e=this.mutations[o]).type&&(this.treeChanges.reachabilityChange(e.target)===h.STAYED_IN||this.calcOldPreviousSibling)){n=this.getChildlistChange(e.target),r=e.previousSibling;for(var a=0;a<e.removedNodes.length;a++)i(t=e.removedNodes[a],r,n),n.added.has(t)?n.added.delete(t):(n.removed.set(t,!0),n.maybeMoved.delete(t)),r=t;for(i(e.nextSibling,r,n),a=0;a<e.addedNodes.length;a++)t=e.addedNodes[a],n.removed.has(t)?(n.removed.delete(t),n.maybeMoved.set(t,!0)):n.added.set(t,!0)}}},f.prototype.wasReordered=function(e){if(!this.treeChanges.anyParentsChanged)return!1;this.processChildlistChanges();var t=e.parentNode,n=this.treeChanges.get(e);n&&n.oldParentNode&&(t=n.oldParentNode);var r=this.childListChangeMap.get(t);if(!r)return!1;if(r.moved)return r.moved.get(e);r.moved=new l;var i=new l;function o(e){if(!e)return!1;if(!r.maybeMoved.has(e))return!1;var t=r.moved.get(e);return void 0!==t||(t=!!i.has(e)||(i.set(e,!0),function(e){if(s.has(e))return s.get(e);for(var t=e.previousSibling;t&&(r.added.has(t)||o(t));)t=t.previousSibling;return s.set(e,t),t}(e)!==function e(t){var n=a.get(t);if(void 0!==n)return n;for(n=r.oldPrevious.get(t);n&&(r.removed.has(n)||o(n));)n=e(n);return void 0===n&&(n=t.previousSibling),a.set(t,n),n}(e)),i.has(e)?(i.delete(e),r.moved.set(e,t)):t=r.moved.get(e)),t}var a=new l,s=new l;return r.maybeMoved.keys().forEach(o),r.moved.get(e)},f);function f(e,t,n,r,i,o){this.rootNode=e,this.mutations=t,this.selectors=n,this.calcReordered=r,this.calcOldPreviousSibling=i,this.nodeFilter=o,this.nodeFilter=this.nodeFilter||function(e){return!0},this.treeChanges=new c(e,t,this.nodeFilter),this.entered=[],this.exited=[],this.stayedIn=new l,this.visited=new l,this.childListChangeMap=void 0,this.characterDataOnly=void 0,this.matchCache=void 0,this.processMutations()}var g=(m.prototype.getOldParentNode=function(e){return this.projection.getOldParentNode(e)},m.prototype.getOldAttribute=function(e,t){return this.projection.getOldAttribute(e,t)},m.prototype.getOldPreviousSibling=function(e){return this.projection.getOldPreviousSibling(e)},m.prototype.getOldCharacterData=function(e){return this.projection.getOldCharacterData(e)},m.prototype.getCharacterDataChanged=function(){return this.projection.getCharacterDataChanged()},m);function m(e,t){var n=this;if(this.projection=e,this.added=[],this.removed=[],this.reparented=t.all||t.element||t.characterData?[]:void 0,this.reordered=t.all?[]:void 0,(this.projection=e).getChanged(this,t.elementFilter,t.characterData),t.all||t.attribute||t.attributeList){var r=t.attribute?[t.attribute]:t.attributeList,i=e.attributeChangedNodes(r);t.attribute?this.valueChanged=i[t.attribute]||[]:(this.attributeChanged=i,t.attributeList&&t.attributeList.forEach(function(e){n.attributeChanged.hasOwnProperty(e)||(n.attributeChanged[e]=[])}))}if(t.all||t.characterData){var o=e.getCharacterDataChanged();t.characterData?this.valueChanged=o:this.characterDataChanged=o}this.reordered&&(this.getOldPreviousSibling=e.getOldPreviousSibling.bind(e))}var v=/[a-zA-Z_]+/,y=/[a-zA-Z0-9_\-]+/;function _(e){return'"'+e.replace(/"/,'\\"')+'"'}var N=(b.prototype.matches=function(e){if(null===e)return!1;if(void 0===this.attrValue)return!0;if(!this.contains)return this.attrValue==e;for(var t=e.split(" "),n=0;n<t.length;n++)if(this.attrValue===t[n])return!0;return!1},b.prototype.toString=function(){var e="["+this.attrName+"]";return"class"===this.attrName&&this.contains?"."+this.attrValue:"id"!==this.attrName||this.contains?this.contains?"["+this.attrName+"~="+_(this.attrValue)+"]":"attrValue"in this?"["+this.attrName+"="+_(this.attrValue)+"]":e:"#"+this.attrValue},b);function b(){}var C,E=(Object.defineProperty(T.prototype,"caseInsensitiveTagName",{get:function(){return this.tagName.toUpperCase()},enumerable:!0,configurable:!0}),Object.defineProperty(T.prototype,"selectorString",{get:function(){return this.tagName+this.qualifiers.join("")},enumerable:!0,configurable:!0}),T.prototype.isMatching=function(e){return e[T.matchesSelector](this.selectorString)},T.prototype.wasMatching=function(e,t,n){if(!t||!t.attributes)return n;var r=t.isCaseInsensitive?this.caseInsensitiveTagName:this.tagName;if("*"!==r&&r!==e.tagName)return!1;for(var i,o=[],a=!1,s=0;s<this.qualifiers.length;s++){i=this.qualifiers[s];var l=t.getAttributeOldValue(i.attrName);o.push(l),a=a||void 0!==l}if(!a)return n;for(s=0;s<this.qualifiers.length;s++)if(i=this.qualifiers[s],void 0===(l=o[s])&&(l=e.getAttribute(i.attrName)),!i.matches(l))return!1;return!0},T.prototype.matchabilityChange=function(e,t){return this.isMatching(e)?this.wasMatching(e,t,!0)?h.STAYED_IN:h.ENTERED:this.wasMatching(e,t,!1)?h.EXITED:h.STAYED_OUT},T.parseSelectors=function(e){var t,n,r=[];function i(){t&&(n&&(t.qualifiers.push(n),n=void 0),r.push(t)),t=new T}function o(){n&&t.qualifiers.push(n),n=new N}for(var a,s,l=/\s/,d="Invalid or unsupported selector syntax.",c=1,p=0;p<e.length;)switch(s=e[p++],c){case 1:if(s.match(v)){i(),t.tagName=s,c=2;break}if("*"===s){i(),t.tagName="*",c=3;break}if("."===s){i(),o(),t.tagName="*",n.attrName="class",n.contains=!0,c=4;break}if("#"===s){i(),o(),t.tagName="*",n.attrName="id",c=4;break}if("["===s){i(),o(),t.tagName="*",n.attrName="",c=6;break}if(s.match(l))break;throw Error(d);case 2:if(s.match(y)){t.tagName+=s;break}if("."===s){o(),n.attrName="class",n.contains=!0,c=4;break}if("#"===s){o(),n.attrName="id",c=4;break}if("["===s){o(),n.attrName="",c=6;break}if(s.match(l)){c=14;break}if(","!==s)throw Error(d);c=1;break;case 3:if("."===s){o(),n.attrName="class",n.contains=!0,c=4;break}if("#"===s){o(),n.attrName="id",c=4;break}if("["===s){o(),n.attrName="",c=6;break}if(s.match(l)){c=14;break}if(","!==s)throw Error(d);c=1;break;case 4:if(s.match(v)){n.attrValue=s,c=5;break}throw Error(d);case 5:if(s.match(y)){n.attrValue+=s;break}if("."===s){o(),n.attrName="class",n.contains=!0,c=4;break}if("#"===s){o(),n.attrName="id",c=4;break}if("["===s){o(),c=6;break}if(s.match(l)){c=14;break}if(","!==s)throw Error(d);c=1;break;case 6:if(s.match(v)){n.attrName=s,c=7;break}if(s.match(l))break;throw Error(d);case 7:if(s.match(y)){n.attrName+=s;break}if(s.match(l)){c=8;break}if("~"===s){n.contains=!0,c=9;break}if("="===s){n.attrValue="",c=11;break}if("]"!==s)throw Error(d);c=3;break;case 8:if("~"===s){n.contains=!0,c=9;break}if("="===s){n.attrValue="",c=11;break}if("]"===s){c=3;break}if(s.match(l))break;throw Error(d);case 9:if("="!==s)throw Error(d);n.attrValue="",c=11;break;case 10:if("]"===s){c=3;break}if(s.match(l))break;throw Error(d);case 11:if(s.match(l))break;if('"'===s||"'"===s){a=s,c=13;break}n.attrValue+=s,c=12;break;case 12:if(s.match(l)){c=10;break}if("]"===s){c=3;break}if("'"===s||'"'==s)throw Error(d);n.attrValue+=s;break;case 13:if(s===a){c=10;break}n.attrValue+=s;break;case 14:if(s.match(l))break;if(","!==s)throw Error(d);c=1}switch(c){case 1:case 2:case 3:case 5:case 14:i();break;default:throw Error(d)}if(!r.length)throw Error(d);return r},T.nextUid=1,T.matchesSelector="function"==typeof(C=document.createElement("div")).webkitMatchesSelector?"webkitMatchesSelector":"function"==typeof C.mozMatchesSelector?"mozMatchesSelector":"function"==typeof C.msMatchesSelector?"msMatchesSelector":"matchesSelector",T);function T(){this.uid=T.nextUid++,this.qualifiers=[]}var S=/^([a-zA-Z:_]+[a-zA-Z0-9_\-:\.]*)$/;function k(e){if("string"!=typeof e)throw Error("Invalid request opion. attribute must be a non-zero length string.");if(!(e=e.trim()))throw Error("Invalid request opion. attribute must be a non-zero length string.");if(!e.match(S))throw Error("Invalid request option. invalid attribute name: "+e);return e}function w(e){if(!e.trim().length)throw Error("Invalid request option: elementAttributes must contain at least one attribute.");for(var t,n,r={},i={},o=e.split(/\s+/),a=0;a<o.length;a++)if(t=o[a]){if(r[n=(t=k(t)).toLowerCase()])throw Error("Invalid request option: observing multiple case variations of the same attribute is not supported.");i[t]=!0,r[n]=!0}return Object.keys(i)}var x=(O.prototype.filterIgnoredMutations=function(e){if(!this.options.mutationFilter||!e)return e;for(var t,n,r=[],i=this.options.nodeFilter||function(e){return!0},o=this.options.mutationFilter,a=e.length-1;0<=a;--a)if(t=e[a],i(e[a].target)){if((n=o(e,a))===D.IGNORE_ALL)return[];n===D.OK&&r.push(t)}return r},O.createObserverOptions=function(e){var t,n={childList:!0,subtree:!0};function r(e){n.attributes&&!t||(n.attributes=!0,n.attributeOldValue=!0,e?(t=t||{},e.forEach(function(e){t[e]=!0,t[e.toLowerCase()]=!0})):t=void 0)}return e.forEach(function(e){if(e.characterData)return n.characterData=!0,void(n.characterDataOldValue=!0);if(e.all)return r(),n.characterData=!0,void(n.characterDataOldValue=!0);if(e.attribute)r([e.attribute.trim()]);else{var t=function(e,t){var n={};return e.forEach(function(e){e.qualifiers.forEach(function(e){t&&"class"===e.attrName||(n[e.attrName]=!0)})}),Object.keys(n)}(e.elementFilter,!1===e.classAttribute).concat(e.attributeList||[]);t.length&&r(t)}}),t&&(n.attributeFilter=Object.keys(t)),n},O.validateOptions=function(e){for(var t in e)if(!(t in O.optionKeys))throw Error("Invalid option: "+t);if("function"!=typeof e.callback)throw Error("Invalid options: callback is required and must be a function");if(!e.queries||!e.queries.length)throw Error("Invalid options: queries must contain at least one query request object.");for(var n={callback:e.callback,mutationFilter:e.mutationFilter,nodeFilter:e.nodeFilter,rootNode:e.rootNode||document,observeOwnChanges:Boolean(e.observeOwnChanges),oldPreviousSibling:Boolean(e.oldPreviousSibling),queries:[]},r=0;r<e.queries.length;r++){var i=e.queries[r];if(i.all){if(1<Object.keys(i).length)throw Error("Invalid request option. all has no options.");n.queries.push({all:!0})}else if("attribute"in i){if((a={attribute:k(i.attribute)}).elementFilter=E.parseSelectors("*["+a.attribute+"]"),1<Object.keys(i).length)throw Error("Invalid request option. attribute has no options.");n.queries.push(a)}else if("element"in i){var o=Object.keys(i).length,a={element:i.element,elementFilter:E.parseSelectors(i.element)};if(i.hasOwnProperty("elementAttributes")&&(a.attributeList=w(i.elementAttributes),o--),void 0!==i.classAttribute&&(a.classAttribute=!1!==i.classAttribute,o--),1<o)throw Error("Invalid request option. element only allows elementAttributes option.");n.queries.push(a)}else{if(!i.characterData)throw Error("Invalid request option. Unknown query request.");if(1<Object.keys(i).length)throw Error("Invalid request option. characterData has no options.");n.queries.push({characterData:!0})}}return n},O.prototype.createSummaries=function(e){var t=this.filterIgnoredMutations(e);if(!t||!t.length)return[];for(var n=new u(this.root,t,this.elementFilter,this.calcReordered,this.options.oldPreviousSibling,this.options.nodeFilter),r=[],i=0;i<this.options.queries.length;i++)r.push(new g(n,this.options.queries[i]));return r},O.prototype.checkpointQueryValidators=function(){this.queryValidators.forEach(function(e){e&&e.recordPreviousState()})},O.prototype.runQueryValidators=function(n){this.queryValidators.forEach(function(e,t){e&&e.validate(n[t])})},O.prototype.changesToReport=function(e){return e.some(function(t){return!!n.some(function(e){return t[e]&&t[e].length})||!(!t.attributeChanged||!Object.keys(t.attributeChanged).some(function(e){return!!t.attributeChanged[e].length}))})},O.prototype.filterSummaries=function(e){if(e&&!(e.length<2)){var t,n,r,i=0;for(e.length;i<length;++i)if(!((t=e[i].added).length<1))for(var o=i+1;o<e.length;++o){r=e[o];for(var a=t.length-1;0<=a;--a)0<=r.removed.indexOf(t[a])?(t.splice(i,1),r.removed.splice(a,1)):0<=(n=r.added.indexOf(t[0]))&&r.added.splice(n,1)}}},O.prototype.observerCallback=function(e){this.options.observeOwnChanges||this.observer.disconnect();var t=this.createSummaries(e);this.runQueryValidators(t),this.options.observeOwnChanges&&this.checkpointQueryValidators(),this.changesToReport(t)&&(this.filterSummaries(t),this.callback(t)),!this.options.observeOwnChanges&&this.connected&&(this.checkpointQueryValidators(),this.observer.observe(this.root,this.observerOptions))},Object.defineProperty(O.prototype,"isConnected",{get:function(){return Boolean(this.connected)},enumerable:!0,configurable:!0}),O.prototype.reconnect=function(){this.connected||(this.observer.observe(this.root,this.observerOptions),this.connected=!0,this.checkpointQueryValidators())},O.prototype.disconnect=function(){if(!this.connected)return[];var e;try{e=this.takeSummaries(),this.observer.disconnect()}catch(e){t.logger.debug("Disconnect: ",e)}return this.connected=!1,e},O.prototype.takeSummaries=function(){if(!this.connected)throw Error("Not connected");var e=this.createSummaries(this.observer.takeRecords());return this.changesToReport(e)?e:void 0},O.NodeMap=l,O.parseElementFilter=E.parseSelectors,O.optionKeys={callback:!0,queries:!0,rootNode:!0,oldPreviousSibling:!0,observeOwnChanges:!0,mutationFilter:!0,nodeFilter:!0},O);function O(e,t){var n=this;this.connected=!1,this.options=O.validateOptions(e),this.observerOptions=O.createObserverOptions(this.options.queries),this.root=this.options.rootNode,this.callback=this.options.callback,this.elementFilter=Array.prototype.concat.apply([],this.options.queries.map(function(e){return e.elementFilter?e.elementFilter:[]})),this.elementFilter.length||(this.elementFilter=void 0),this.calcReordered=this.options.queries.some(function(e){return e.all}),this.queryValidators=[],O.createQueryValidator&&(this.queryValidators=this.options.queries.map(function(e){return O.createQueryValidator(n.root,e)})),this.observer=new r(function(e){n.observerCallback(e)}),t&&this.reconnect()}Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;0<=--n&&t.item(n)!==this;);return-1<n}),t.MutationSummary=x}(window.FLITE),Object.defineProperty(F,"__esModule",{value:!0}),s=window.FLITE,h=window.jQuery,g.prototype.attach=function(e){try{if(e===this._root)return;this._root&&this._unlisten()}catch(e){s.logger.warn(e)}(this._root=e)&&this._listen()},g.prototype.dispose=function(){this._unlisten(),this._root=null},Object.defineProperty(g.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"isComposing",{get:function(){return this._isComposing||this._compositionEnded},enumerable:!0,configurable:!0}),g.prototype._unlisten=function(){if(this._unlistenCB)try{this._unlistenCB(),this._unlistenCB=null}finally{}},g.prototype._listen=function(){var t=this;function e(e){s.logger.debug("Composition start"),t._isComposing=!0}function n(e){s.logger.debug("Composition end"),t._isComposing=!1,t._compositionEnded=!0}function r(e){t._compositionEnded=!1}function i(e){229!==e.which&&(t._compositionEnded=!1)}this._unlisten(),this._root.addEventListener("compositionstart",e),this._root.addEventListener("compositionend",n),this._root.addEventListener("keyup",r),this._root.addEventListener("keydown",i),this._unlistenCB=function(){t._root&&(t._root.removeEventListener("compositionstart",e),t._root.removeEventListener("compositionend",n),t._root.removeEventListener("keyup",r),t._root.removeEventListener("keydown",i))}},l=g,m._guards={},m.nextId=0,c=m,Object.defineProperty(v.prototype,"browser",{get:function(){if(this._browser)return h.extend(!0,{},this._browser);var e=navigator.userAgent.toLowerCase(),t=function(e){e=e.toLowerCase();var t=/(edge)\s*\/?([0-9\.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/i.exec(e)||/(webkit)[ \/]([\w.]+)/i.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/i.exec(e)||/(trident).*rv\:([\d\.]+)/i.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}}(e),n={type:"unknown",version:0,msie:!1,edge:!1,webkit:!1,safari:!1,firefox:!1};return t.browser&&(n[t.browser]=!0,n.version=Number(t.version),n.type="trident"===t.browser?"msie":t.browser),n.chrome?n.webkit=!0:n.webkit&&(n.safari=!0),n.webkit&&(n.type="webkit"),n.firefox=1==/firefox/.test(e),n.msie||(n.msie=Boolean(/trident/.test(e))),this._browser=n,h.extend(!0,{},n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"browserType",{get:function(){if(null===this._browserType){for(var e=["msie","firefox","chrome","safari"],t=e.length,n=0;n<t;n++)if(!0===new RegExp(e[n],"i").test(navigator.userAgent))return this._browserType=e[n],this._browserType;this._browserType="other"}return this._browserType},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"webkitType",{get:function(){return"webkit"===this.browser.type&&(0<Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")?"safari":"chrome")},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"Timeout",{get:function(){return f},enumerable:!0,configurable:!0}),v.prototype.isBrowser=function(e){return this.browser.type===e},v.prototype.isFLITEBody=function(e){return e&&Boolean(e.getAttribute("data-flite-body"))},v.prototype.markFLITEBody=function(e){e&&e.setAttribute("data-flite-body","1")},v.prototype.toStringArray=function(e,t){if(!e)return[];var n,r="upper"===t?String.prototype.toUpperCase:"lower"===t?String.prototype.toLowerCase:null;if("string"==typeof e)n=e.split(",");else{if(!h.isArray(e))return s.logger.warn("illegal format of string array"),[];n=e}return n.forEach(function(e,t){(e=e&&String(e).trim())&&r&&(e=r.apply(e)),n[t]=e}),n},v.prototype.padString=function(e,t,n,r){var i;i=null==e?"":String(e);for(var o=(n=String(n)).length,a=i.length;a<t;a+=o)r?i+=n:i=n+i;return i},v.prototype.padNumber=function(e,t){return this.padString(e,t,"0",!1)},v.prototype.getTagName=function(e){return e&&e.tagName&&e.tagName.toLowerCase()||null},v.prototype.isBRNode=function(e){return"br"==this.getTagName(e)},v.prototype.toMap=function(e){for(var t={},n=0,r=e&&e.length||0;n<r;++n)t[String(e[n])]=1;return t},v.prototype.printRange=function(e){if(!e)return"<null range>";var t=["Range:",d.printNode(e.startContainer),":",e.startOffset];return e.collapsed||t.push(", end: ",d.printNode(e.endContainer),":",e.endOffset),t.join(" ")},v.prototype.printNode=function(e){if(!e)return"<null node>";var t=e.nodeType,n=[t===Node.TEXT_NODE?"text":t===Node.ELEMENT_NODE?e.nodeName:"<"+t+"node>"];return e.id&&n.push("#",e.id),e.className&&n.push(".",e.className),n.push("(",(t===Node.TEXT_NODE?e.data:String(e.innerHTML)).substring(0,10),")"),n.push("parent:",e.parentNode&&e.parentNode.nodeName||"NULL"),n.join("")},v.prototype.stripNode=function(e){if(e&&1===e.nodeType){var n=e,t=h.map(n.attributes,function(e){return e.name});h(e).removeClass(),h.each(t,function(e,t){n.removeAttribute(t)})}},v.prototype.findIndexInArray=function(e,t){if(!e)return-1;for(var n=0,r=e.length;n<r;++n)if(t(e[n]))return n;return-1},v.prototype.findInArray=function(e,t){var n=this.findIndexInArray(e,t);return 0<=n?e[n]:null},v.prototype.createCompositionStateTracker=function(){return new l},v.prototype.createBackspaceGuard=function(e,t){return new c(e,t)},v.prototype.makeDateLabel=function(e,t,n,r){new Date;var i=e("MONTHS"),o="string"==typeof i?i.split(","):i;return[o&&o[n]||"",t,r].join(" ")},v.prototype.fixSelection=function(e,t){if(!e||!t||e.collapsed)return e;var n;try{for(;(n=e.endContainer)&&n!==t&&0==e.endOffset&&!e.collapsed&&(n.previousSibling?e.setEndBefore(n):n.parentNode&&n.parentNode!==t&&e.setEndBefore(n.parentNode),e.endContainer!==n););}catch(e){}try{for(;(n=e.startContainer)&&n!==t&&!e.collapsed&&((n=e.startContainer).nodeType==Node.TEXT_NODE?e.startOffset>=n.nodeValue.length&&e.setStartAfter(n):e.startOffset>=n.childNodes.length&&e.setStartAfter(n),e.startContainer!=n););}catch(e){}},v.prototype.convertDateToTimezone=function(t,n){if(t=t||new Date,!n)return t;try{var e=t.toLocaleString("en-us",{timeZone:n}),r=new Date(Date.parse(e)).getTime()-t.getTime();return new Date(t.getTime()+r)}catch(e){return s.logger.error("convertDateToTimezone",n,e),t}},v.prototype.removeDeadCharactersFrom=function(e){return e&&e.replace(/[\u200B\uFEFF\u00A0]/g,"")},v.prototype.combinePath=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(e||[]).filter(Boolean).join("/").replace(/([^\:])\/\//g,"$1/")},v.prototype.scrollToElement=function(e){if(e)return this.initJquery(),e.scrollintoview()},v.prototype.initJquery=function(){h.fn.scrollintoview||function(){function l(e){var t,n=h(window),r=p.test(e[0].nodeName);return{border:r?{top:0,left:0,bottom:0,right:0}:function(e,t){t=t||(document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(e,null):e.currentStyle);var n=!(!document.defaultView||!document.defaultView.getComputedStyle),r=h(e),i={top:parseFloat(n?t.borderTopWidth:r.css(e,"borderTopWidth"))||0,left:parseFloat(n?t.borderLeftWidth:r.css(e,"borderLeftWidth"))||0,bottom:parseFloat(n?t.borderBottomWidth:r.css(e,"borderBottomWidth"))||0,right:parseFloat(n?t.borderRightWidth:r.css(e,"borderRightWidth"))||0};return{top:i.top,left:i.left,bottom:i.bottom,right:i.right,vertical:i.top+i.bottom,horizontal:i.left+i.right}}(e[0]),scroll:{top:(r?n:e).scrollTop(),left:(r?n:e).scrollLeft()},scrollbar:{right:r?0:e.innerWidth()-e[0].clientWidth,bottom:r?0:e.innerHeight()-e[0].clientHeight},rect:(t=e[0].getBoundingClientRect(),{top:r?0:t.top,left:r?0:t.left,bottom:r?e[0].clientHeight:t.bottom,right:r?e[0].clientWidth:t.right})}}var d={vertical:{x:!1,y:!0},horizontal:{x:!0,y:!1},both:{x:!0,y:!0},x:{x:!0,y:!1},y:{x:!1,y:!0}},c={duration:"fast",direction:"both"},p=/^(?:html)$/i;h.fn.extend({scrollintoview:function(t){(t=h.extend({},c,t)).direction=d["string"==typeof t.direction&&t.direction.toLowerCase()]||d.both;var e="";!0===t.direction.x&&(e="horizontal"),!0===t.direction.y&&(e=e?"both":"vertical");var n=this.eq(0),r=n.closest(":scrollable("+e+")");if(0<r.length){r=r.eq(0);var i=l(n),o=l(r),a={top:i.rect.top-(o.rect.top+o.border.top),bottom:o.rect.bottom-o.border.bottom-o.scrollbar.bottom-i.rect.bottom,left:i.rect.left-(o.rect.left+o.border.left),right:o.rect.right-o.border.right-o.scrollbar.right-i.rect.right},s={};!0===t.direction.y&&(a.top<0?s.scrollTop=o.scroll.top+a.top:0<a.top&&a.bottom<0&&(s.scrollTop=o.scroll.top+Math.min(a.top,-a.bottom))),!0===t.direction.x&&(a.left<0?s.scrollLeft=o.scroll.left+a.left:0<a.left&&a.right<0&&(s.scrollLeft=o.scroll.left+Math.min(a.left,-a.right))),h.isEmptyObject(s)?h.isFunction(t.complete)&&t.complete.call(r[0]):(p.test(r[0].nodeName)&&(r=h(r[0].ownerDocument).find("html,body")),r.animate(s,t.duration).eq(0).queue(function(e){h.isFunction(t.complete)&&t.complete.call(r[0]),e()}))}return this}});var u={auto:!0,scroll:!0,visible:!1,hidden:!1};h.extend(h.expr[":"],{scrollable:function(e,t,n,r){var i=d[n&&"string"==typeof n[3]&&n[3].toLowerCase()]||d.both,o=document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(e,null):e.currentStyle,a={x:u[o.overflowX.toLowerCase()]||!1,y:u[o.overflowY.toLowerCase()]||!1,isRoot:p.test(e.nodeName)};if(!a.x&&!a.y&&!a.isRoot)return!1;var s={height:{scroll:e.scrollHeight,client:e.clientHeight},width:{scroll:e.scrollWidth,client:e.clientWidth},scrollableX:function(){return(a.x||a.isRoot)&&this.width.scroll>this.width.client},scrollableY:function(){return(a.y||a.isRoot)&&this.height.scroll>this.height.client}};return i.y&&s.scrollableY()||i.x&&s.scrollableX()}})}()},p=v,Object.defineProperty(y.prototype,"matchAllSelector",{get:function(){return this._matchNodeAndContentPattern},enumerable:!0,configurable:!0}),Object.defineProperty(y.prototype,"matchNodeSelector",{get:function(){return this._matchNodePattern},enumerable:!0,configurable:!0}),y.prototype.addPatterns=function(e){return e&&(this._matchNodeAndContentPattern=this._addPatternsToString(this._matchNodeAndContentPattern,e.matchWithContent),this._matchNodePattern=this._addPatternsToString(this._matchNodePattern,e.match)),this},y.prototype.removePattern=function(e){return e&&(this._matchNodeAndContentPattern=this._removePatternsFromString(this._matchNodeAndContentPattern,e.matchWithContent),this._matchNodePattern=this._removePatternsFromString(this._matchNodePattern,e.match)),this},y.prototype.addClassifier=function(e){return this._matchers.push(e),this},y.prototype.test=function(e){return!(!this._matchNodePattern||!s.domUtils.matchesSelector(e,this._matchNodePattern))||!(!this._matchNodeAndContentPattern||!s.domUtils.matchesSelector(e,this._matchNodeAndContentPattern))||this._runMatchers(e,y.MATCH_NONE)!==y.MATCH_NONE},y.prototype.classifyNode=function(e,t){if(!e)return y.MATCH_NONE;var n=this._runMatchers(e,y.MATCH_NONE);if(n!==y.MATCH_NONE)return n;if(s.domUtils.matchesSelector(e,this._matchNodeAndContentPattern))return y.MATCH_NODE_AND_CONTENT;if(s.domUtils.matchesSelector(e,this._matchNodePattern))return y.MATCH_NODE;for(var r=e.parentNode;r&&r!==t;r=r.parentNode)if(s.domUtils.matchesSelector(r,this._matchNodeAndContentPattern))return y.MATCH_NODE_AND_CONTENT;return y.MATCH_NONE},y.prototype._runMatchers=function(e,t){for(var n,r=0,i=this._matchers.length;r<i;++r)if((n=this._matchers[r](e,this))!==y.MATCH_NONE)return n;return t},y.prototype._removePatternsFromString=function(e,t){if(!t)return e;var n=this._toSelectorMap(t),r=this._toSelectorMap(e);return Object.keys(n).forEach(function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];delete r[e]}),Object.keys(r).join(",")},y.prototype._addPatternsToString=function(e,t){if(!t)return e;var n=this._toSelectorMap(t),r=h.extend({},this._toSelectorMap(e),n);return Object.keys(r).join(",")},y.prototype._toSelectorMap=function(e){return e?(e=s.utils.toStringArray(e),s.utils.toMap(e)):{}},y.MATCH_NODE_AND_CONTENT="all",y.MATCH_NODE="node",y.MATCH_NONE="ok",u=y,_.prototype.set=function(n,e,t){if(void 0===t&&(t=!0),this.clear(),n){if(n!==this._callback){var r=this;this._boundCallback=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r._timeout=null,n.apply(null,e)}}}else this._boundCallback=null;this._callback=n,this._duration=e,t&&this._boundCallback&&(this._timeout=setTimeout(this._boundCallback,this._duration))},_.prototype.start=function(){this._timeout||this.reset(this._duration)},_.prototype.reset=function(e){void 0===e&&(e=this._duration),this.set(this._callback,e,!0)},_.prototype.clear=function(){this._timeout&&(clearTimeout(this._timeout),this._timeout=null)},f=_,s.utils=d=new p,s.TrackedNodeClassifier=u,Object.defineProperty(F,"__esModule",{value:!0});var N,b,C,j,E,W,T,V,S,z,k,D,w,x={OL:1,TR:1,UL:1,BR:1,TBODY:1},O={TOGGLE_TRACKING:"Toggle Tracking Changes",TOGGLE_SHOW:"Toggle Tracking visibility",ACCEPT_ALL:"Accept all changes",REJECT_ALL:"Reject all changes",ACCEPT_ONE:"Accept Change",REJECT_ONE:"Reject Change",START_TRACKING:"Start tracking changes",STOP_TRACKING:"Stop tracking changes",PENDING_CHANGES:"Your document contains some pending changes.\nPlease resolve them before turning off change tracking.",HIDE_TRACKED:"Hide tracked changes",SHOW_TRACKED:"Show tracked changes",CHANGE_TYPE_ADDED:"added",CHANGE_TYPE_DELETED:"deleted",MONTHS:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],NOW:"now",MINUTE_AGO:"1 minute ago",MINUTES_AGO:"%Minutes minutes ago",BY:"by",ON:"on",AT:"on"},A=/insert/,I=/ice-ins/;function L(e){}!function(c,a){c.Events={INIT:"flite:init",ACCEPT:"flite:accept",REJECT:"flite:reject",SHOW_HIDE:"flite:showHide",TRACKING:"flite:tracking",CHANGE:"flite:change",HOVER_IN:"flite:hover-in",HOVER_OUT:"flite:hover-out"};var e={isTracking:!0,isVisible:!0,onEditorDestroy:"none",removeDeleteOnPaste:!(c.Commands={TOGGLE_TRACKING:"flite-toggletracking",TOGGLE_SHOW:"flite-toggleshow",ACCEPT_ALL:"flite-acceptall",REJECT_ALL:"flite-rejectall",ACCEPT_ONE:"flite-acceptone",REJECT_ONE:"flite-rejectone",TOGGLE_TOOLTIPS:"flite-toggletooltips"}),ignoreCommands:void 0,ignoreContainers:!1,debug:{error:!1,log:!1,debug:!1,warn:!1},userStyles:null,tooltips:{show:!0,delay:[750,0],template:"%a %%BY %u %%ON %t",useTitle:!1},tooltipTemplate:null,contextMenu:!0,ignoreSelectors:[],userName:null,userId:null,cssPath:null,styleUrls:["css/flite.css","css/tippy.css"],acceptRejectInReadOnly:!1,commands:null,timezone:null},t={attributes:{fliteCreated:"data-flite-created",fliteMarked:"data-flite-marked",changeId:"data-flite-cid",userId:"data-userid",userName:"data-username",sessionId:"data-session-id",changeData:"data-changedata",time:"data-time",lastTime:"data-last-change-time",isDeleteNode:"data-flite-is-delete"}};function i(e){return e?e.replace(/<[^>]*>/g," ").replace(/[^\x11-\x7F]+/g,"").replace(/\&[\#a-z0-9]+\;/gi," ").replace(/(\s)\s+/g,"$1"):""}var n=(Object.defineProperty(r.prototype,"defaultConfig",{get:function(){return a.extend(!0,{},e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"defaultTrackerConfig",{get:function(){return a.extend({},t)},enumerable:!0,configurable:!0}),r.prototype.upgradeConfig=function(e){var t=c.pluginUtils.defaultConfig;!(e=e||{}).styleUrls&&e.cssPath&&(e.styleUrls=[e.cssPath].filter(Boolean),e.styleUrls.length||(e.styleUrls=void 0)),"boolean"==typeof e.tooltips?e.tooltips=e.tooltips?t.tooltips:{show:!1,delay:0,template:null,useTitle:!1}:e.tooltips?e.tooltips=a.extend({},t.tooltips,e.tooltips):e.tooltips=t.tooltips;var n=e.tooltips,r=n.delay,i=typeof r;return null==r?r=t.tooltips.delay:"string"==i||"number"==i?r=[Number(r),t.tooltips.delay[1]]:a.isArray(r)||(c.logger.error("invalid type "+i+" for tooltips delay"),r=t.tooltips.delay),e.tooltips.delay=r,e.tooltipTemplate&&(n.template=n.template||e.tooltipTemplate),this.validateKey(),a.extend({},t,e)},r.prototype.loadCSS=function(r,e,i){var o=r.getElementsByTagName("head")[0];(e||[]).forEach(function(e){!function(e){if(e){var t="flite-"+e.replace(/[^0-9a-z]+/gi,"_");if(0===a(o).find("#"+t).length){var n=r.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),n.setAttribute("id",t),n.setAttribute("href",c.utils.combinePath(i,e)),o.appendChild(n)}}}(e)})},r.prototype.loadScript=function(r,e,i){var o=r.getElementsByTagName("head")[0];(e||[]).forEach(function(e){!function(e){if(e){var t="flite-"+e.replace(/[^0-9a-z]+/gi,"_");if(0===a(o).find("#"+t).length){var n=r.createElement("script");n.setAttribute("type","text/javascript"),n.setAttribute("id",t),n.setAttribute("src",c.utils.combinePath(i,e)),o.appendChild(n)}}}(e)})},r.prototype.toggleTracking=function(e,t,n){"boolean"==typeof n&&(n={notify:n}),n=n||{};var r=void 0===t?!e.isTracking:t,i=e.config.allowQuitWithChanges||n&&n.force;if(!r&&e.isTracking&&!i&&e.tracker.countChanges({verify:!0}))return window.alert(e.getLocalizedString("PENDING_CHANGES"));e.processSetIsTracking(r,n.force),!1!==n.notify&&e.fireEditorEvent(c.Events.TRACKING,{tracking:r,flite:this})},r.prototype.acceptChangedNode=function(e,t,n){return this._acceptOrRejectChangedNode({node:e,plugin:t,options:n,isAccept:!0})},r.prototype.rejectChangedNode=function(e,t,n){return this._acceptOrRejectChangedNode({node:e,plugin:t,options:n,isAccept:!1})},r.prototype._acceptOrRejectChangedNode=function(e){var t=e.plugin;e.options=e.options||{},void 0===e.options.autoNext&&(e.options.autoNext=t.config.autoNext);var n=Boolean(e.node&&t.tracker&&e.isAccept?t.tracker.acceptChange(e.node):t.tracker.rejectChange(e.node));if(n&&(t.fireEditorEvent(e.isAccept?c.Events.ACCEPT:c.Events.REJECT,{flite:t}),t.cleanupAfterAcceptReject(),e.options.autoNext)){var r=t.tracker.skipToNextChangeNode();r&&c.utils.scrollToElement(a(r)),t.onSelectionChanged(null)}return n},r.prototype.validateKey=function(){var e="api-key-placeholder";if(/placeholder/.test(e))return!0;var t=document.head&&document.head.querySelectorAll("meta[name='FLITE-API-KEY']"),n=t&&t.length&&t[0];return n&&n.getAttribute&&n.getAttribute("content")===e},r.prototype.updateSpellingStack=function(e){var i={"tr,td,ul,ol":!0};return function(t){Object.keys(t).forEach(function(e){/^tr,/.test(e)&&delete t[e]})}(i),e&&e.length?(e.each(function(e,t){if(t.attributes&&t.attributes.length){var n=a.extend({},i),r=function(e){var t=(e||"").split("").reduce(function(e,t,n,r){return e+n*t.charCodeAt(0)},0);return n[t]&&delete n[t],t};Array.prototype.slice.apply(t.attributes).forEach(function(e){r(e.nodeValue),r(e.nodeName)}),0===Object.keys(n).length&&(i=void 0)}}),Boolean(i)):0<Object.keys(i).length},r.prototype.makeTooltipTitle=function(r){var e=r.config,t=r.change,n=new Date(t.time),i=new Date(t.lastTime),o=e.template;return o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=o.replace(/%%([^\b\s]+)/g,function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return r.localize(t[0])})).replace(/%a/g,r.localize(r.isInsert?"CHANGE_TYPE_ADDED":"CHANGE_TYPE_DELETED"))).replace(/%t/g,c.pluginUtils.relativeDateFormat(n,r.now,r.localize))).replace(/%u/g,t.username)).replace(/%dd/g,c.utils.padNumber(n.getDate(),2))).replace(/%d/g,String(n.getDate()))).replace(/%mm/g,c.utils.padNumber(n.getMonth()+1,2))).replace(/%m/g,String(n.getMonth()+1))).replace(/%yy/g,c.utils.padNumber(n.getFullYear()%100,2))).replace(/%y/g,String(n.getFullYear()))).replace(/%nn/g,c.utils.padNumber(n.getMinutes(),2))).replace(/%n/g,String(n.getMinutes()))).replace(/%hh/g,c.utils.padNumber(n.getHours(),2))).replace(/%h/g,String(n.getHours()))).replace(/%T/g,c.pluginUtils.relativeDateFormat(i,r.now,r.localize))).replace(/%DD/g,c.utils.padNumber(i.getDate(),2))).replace(/%D/g,String(i.getDate()))).replace(/%MM/g,c.utils.padNumber(i.getMonth()+1,2))).replace(/%M/g,String(i.getMonth()+1))).replace(/%YY/g,c.utils.padNumber(i.getFullYear()%100,2))).replace(/%Y/g,String(i.getFullYear()))).replace(/%NN/g,c.utils.padNumber(i.getMinutes(),2))).replace(/%N/g,String(i.getMinutes()))).replace(/%HH/g,c.utils.padNumber(i.getHours(),2))).replace(/%H/g,String(i.getHours()))},r.prototype.relativeDateFormat=function(e,t,n){var r,i,o,a=(t=t||new Date).getDate(),s=t.getMonth(),l=t.getFullYear(),d=typeof e;return a==(r="string"==d||"number"==d?new Date(r):e).getDate()&&s==r.getMonth()&&l==r.getFullYear()?(i=Math.floor((t.getTime()-r.getTime())/6e4))<1?n("NOW"):i<2?n("MINUTE_AGO"):i<60?n("MINUTES_AGO").replace("%Minutes",String(i)):(o=r.getHours(),i=r.getMinutes(),n("AT")+" "+c.utils.padNumber(o,2)+":"+c.utils.padNumber(i,2)):[n("ON"),c.utils.makeDateLabel(n.bind(this),r.getDate(),r.getMonth(),l===r.getFullYear()?null:r.getFullYear())].join(" ")},r.prototype.destroyTracker=function(e,t){var n=e.tracker;try{if(!e.getBody()||!n)return;switch(t){case"accept":e.acceptAll({notify:!1});break;case"reject":e.rejectAll({notify:!1});break;case"hide":n.setShowChanges(!1)}}catch(e){c.logger.error(e)}try{n.toggleChangeTracking(!1,null),n.dispose()}catch(e){c.logger.error(e)}},Object.defineProperty(r.prototype,"TooltipGuard",{get:function(){return o},enumerable:!0,configurable:!0}),r.prototype.getEditorOffset=function(e){var t={x:0,y:0},n=e&&e.frameElement;if(!n)return t;var r=a(n).offset(),i=a(window);return t.x=r.left+i.scrollLeft(),t.y=r.top+i.scrollTop(),t},r.prototype.getEditorOffsetString=function(e){var t=c.pluginUtils.getEditorOffset(e);return[-t.x,-t.y].join(",")},r.prototype.removeTooltipFromNode=function(e){if(e&&1===e.nodeType)try{var t=e._tippy||c.tippy(e);t&&t.destroy()}finally{}},r.prototype.addTooltipToNode=function(t){var n=this;if(t.node&&1===t.node.nodeType&&!(t.node.nodeName in x)){var r=function(){if(!t.change)return"";var e={change:t.change,now:t.now,isInsert:I.test(t.node.className)||A.test(t.change.type),config:t.config,localize:t.localize};return c.pluginUtils.makeTooltipTitle(e)};t.config.useTitle&&t.node.setAttribute("title",i(r()));try{c.tippy(t.node,{content:".",flipOnUpdate:!0,onShow:function(e){return t.config.useTitle?(t.node.setAttribute("title",i(r())),!1):(e.set({followCursor:"initial"}),!1!==t.canShow()&&(e.setContent(r()),void n.hideTooltips(t.node)))},delay:t.config.delay,theme:"dark",arrow:!0,followCursor:"initial",maxWidth:250,role:"none",appendTo:function(){return t.node.ownerDocument.body}})}catch(e){c.logger.debug("error while creating tooltip",e)}}},r.prototype.hideTooltips=function(e){var t=e&&e.ownerDocument||e;t&&a(t).find(".tippy-popper").each(function(e,t){var n=t&&t._tippy;try{n&&n.state.isShown&&n.hide(0),a(t).remove()}finally{}})},r.prototype.logEditorEvents=function(n,e,t){if(e&&Boolean(t)!==Boolean(n.savedEditorFireMethod)){var r=e;t?(n.savedEditorFireMethod=r.fire,r.fire=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(e){return!e||/mouse|selection|click|focus|undo|redo|snapshot|resolvename/i.test(e)}(e[0])||c.logger.debug("Editor event "+e[0]),n.savedEditorFireMethod.apply(r,e)}):(r.fire=n.savedEditorFireMethod,n.savedEditorFireMethod=null)}},r.prototype.updateTrackerOptions=function(e,t){var n=t&&t.ignoreContainers;if(n){var r=!0===n?["p","div","h1","h2","h3","h4","h5","h6","br"]:String(n).split(",").map(function(e){return e.trim()}).filter(Boolean);e.nodeClassifier.addPatterns({match:r})}},r.prototype.getEnglishString=function(e){return O[e]||null},r);function r(){}var o=(s.prototype.attach=function(e){e!==this._doc&&(this._doc&&this._detach(),e&&this._attach(e))},s.prototype.detach=function(){this._detach()},Object.defineProperty(s.prototype,"canShowTooltip",{get:function(){return Date.now()-this._lastEventTime>this._duration},enumerable:!0,configurable:!0}),s.prototype._detach=function(){if(this._remove)try{this._remove()}finally{this._remove=null}},s.prototype._attach=function(e){var t=this;function n(){c.pluginUtils.hideTooltips(e),t._lastEventTime=Date.now()}(this._doc=e).body.addEventListener("keyup",n),e.body.addEventListener("mousedown",n),this._remove=function(){t._doc.body.removeEventListener("keyup",n),t._doc.body.removeEventListener("mousedown",n)}},s);function s(e){this._duration=e,this._lastEventTime=0,this._canShow=!0}c.pluginUtils=new n}(window.FLITE,window.jQuery),Object.defineProperty(F,"__esModule",{value:!0}),function(a,s){var e={meta:!0,input:!0,frame:!0,col:!0,base:!0,area:!0,img:!0,hr:!0,iframe:!0,param:!0,link:!0},t={body:!0,p:!0,div:!0,table:!0,tbody:!0,tr:!0,td:!0,th:!0,pre:!0,ul:!0,ol:!0,li:!0,fieldset:!0,form:!0,blockquote:!0,dl:!0,dt:!0,dd:!0,dir:!0,center:!0,address:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0},r=a.utils.toMap(["body","p","div","pre","u","b","s","sub","sup","em","strong","span","i","li","td","th","blockquote","dt","dd","center","address","h1","h2","h3","h4","h5","h6","ins","del"]),n=s.extend({},e);n.br=1;var i=Object.keys(e).join(", ");var o=(l.prototype.getComputedStyle=function(e,t){var n=e&&1===e.nodeType&&e.ownerDocument,r=n&&n.defaultView,i=r&&r.getComputedStyle(e);return i?i.getPropertyValue(t):""},l.prototype.cleanTextNode=function(e){return e&&e.length&&(e.data=a.utils.removeDeadCharactersFrom(e.data)),e},l.prototype.isEmptyString=function(e){for(var t,n=e&&e.length||0;0<n;)if("​"!==(t=e[--n])&&"\ufeff"!==t)return!1;return!0},l.prototype.addStubElement=function(e){n[e]=!0},l.prototype.createTreeWalker=function(e){return new d(e)},l.prototype.getKeyChar=function(e){return String.fromCharCode(e.which)},l.prototype.removeEmptyCharsFromTextNode=function(e){var t;if(!e||!(t=e.length))return!1;for(var n=[],r=e.data,i=0;i<t;++i)8203===r.charCodeAt(i)&&n.push(i);if(n.length<1)return!1;var o=r.split("");for(i=n.length-1;0<=i;--i)o.splice(i,1);return e.data=o.join(""),!0},l.prototype.getChildrenOfClass=function(e,t,n){t=t||document.body;var r=e.split(" ");return r.unshift(n||""),e=r.join("."),s.makeArray(s(t).find(e))},l.prototype.getElementWidth=function(e){return e.offsetWidth},l.prototype.getElementHeight=function(e){return e.offsetHeight},l.prototype.getElementDimensions=function(e){return{width:this.getElementWidth(e),height:this.getElementHeight(e)}},l.prototype.isOnlyChild=function(e){var t=e&&e.parentNode;return t&&t.firstChild===e&&t.lastChild===e},l.prototype.insertAfter=function(e,t,n){return e?(n=n||t&&t.parentNode,t&&t.parentNode!==n&&(t=null),n?t?n.insertBefore(e,t.nextSibling):n.insertBefore(e,n.firstChild):void 0):null},l.prototype.contents=function(e){return s.makeArray(s(e).contents())},l.prototype.extractContent=function(e){for(var t,n=document.createDocumentFragment();t=e.firstChild;)n.appendChild(t);return n},l.prototype.getNode=function(e,t){if(!e)return null;e=e.$||e;var n=s(e);return e.nodeType!==Node.TEXT_NODE&&n.is(t)?e:n.parents(t)[0]||null},l.prototype.getParents=function(e,t,n){for(var r=s(e).parents(t),i=r.length,o=[],a=0;a<i&&r[a]!==n;a++)o.push(r[a]);return o},l.prototype.getSiblings=function(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=null),!0===n)return"prev"===t?s(e).prevAll():s(e).nextAll();var i=[];if("prev"===t)for(;e.previousSibling&&(e=e.previousSibling)!==r;)i.push(e);else for(;e.nextSibling&&(e=e.nextSibling)!==r;)i.push(e);return i},l.prototype.hasClass=function(e,t){if(!e||1!==e.nodeType)return!1;var n=e,r=n.classList||n.className&&n.className.split(/\s/);if(r&&r.length)for(var i=r.length-1;0<=i;--i)if(r[i]===t)return!0;return!1},l.prototype.getNodeTextContent=function(e){return s(e).text()},l.prototype.getNodeStubContent=function(e){return s(e).find(i)},l.prototype.hasNoTextOrStubContent=function(e){if(!e||1!==e.nodeType)return!0;var t=e,n=t&&t.tagName&&String(t.tagName).toLowerCase();return!(!(n&&n in r)||!this.isEmptyString(t.textContent)||e.firstChild&&0!==s(e).find(i).length)},l.prototype.isEmptyTextNode=function(e){if(!e||Node.TEXT_NODE!==e.nodeType)return!1;var t=e;return 0===t.length||this.isEmptyString(t.nodeValue)},l.prototype.getNodeLength=function(e){var t=e&&e.nodeType;return 1===t?e.childNodes.length:3===t?e.length:0},l.prototype.getNodeCharacterLength=function(e){return this.getNodeTextContent(e).length+s(e).find(i).length},l.prototype.setNodeTextContent=function(e,t){return s(e).text(t)},l.prototype.getIframeDocument=function(e){var t=null;return e.contentDocument?t=e.contentDocument:e.contentWindow?t=e.contentWindow.document:e.document&&(t=e.document),t},l.prototype.isBlockElement=function(e){return e&&e.nodeName&&e.nodeName.toLowerCase()in t},l.prototype.isStubElement=function(e){return e&&e.nodeName&&e.nodeName.toLowerCase()in n},l.prototype.isChildOf=function(e,t){if(!t||1!==t.nodeType)return!1;try{for(;e&&e.parentNode;){if(e.parentNode===t)return!0;e=e.parentNode}}catch(e){}return!1},l.prototype.isChildOfTagNames=function(e,t){try{for(var n=void 0;e&&e.parentNode;){if(e.parentNode&&e.parentNode.nodeName){n=e.parentNode.nodeName.toLowerCase();for(var r=0;r<t.length;r++)if(n===t[r])return e.parentNode}e=e.parentNode}}catch(e){}return null},l.prototype.getElementsBetween=function(e,t){var n,r,i=[];if(e===t)return i;if(this.isChildOf(t,e)){n=(r=e).childNodes.length;for(var o=0;o<n&&e.childNodes[o]!==t;o++){if(!0===this.isChildOf(t,r.childNodes[o]))return this.arrayMerge(i,this.getElementsBetween(r.childNodes[o],t));i.push(r.childNodes[o])}return i}for(var a=e.nextSibling;a;){if(!0===this.isChildOf(t,a))return i=this.arrayMerge(i,this.getElementsBetween(a,t));if(a===t)return i;i.push(a),a=a.nextSibling}for(var s=this.getParents(e,null,null),l=this.getParents(t,null,null),d=this.arrayDiff(s,l,!0),c=d.length,p=0;p<c-1;p++)i=this.arrayMerge(i,this.getSiblings(d[p],"next"));var u=d[d.length-1];return i=this.arrayMerge(i,this.getElementsBetween(u,t))},l.prototype.walk=function(e,t,n){e&&(n=n||0,!1!==t.call(this,e,n)&&(e.childNodes&&0<e.childNodes.length?this.walk(e.firstChild,t,n+1):e.nextSibling?this.walk(e.nextSibling,t,n):e.parentNode&&e.parentNode.nextSibling&&this.walk(e.parentNode.nextSibling,t,n-1)))},l.prototype.compareNodePosition=function(e,t){if(e==t)return 0;var n=e.compareDocumentPosition(t);return 4&n?-1:8&n?-1:1},l.prototype.getCommonAncestor=function(e,t){for(var n=e;n;)return!0===this.isChildOf(t,n)?n:null},l.prototype.getNextNode=function(e,t){if(e)for(;e.parentNode;){if(e===t)return null;if(e.nextSibling){if(e.nextSibling.nodeType!==Node.TEXT_NODE||0!==e.nextSibling.length)return this.getFirstChild(e.nextSibling);e=e.nextSibling}else e=e.parentNode}return null},l.prototype.canContainTextElement=function(e){return Boolean(e&&e.nodeName&&e.nodeName.toLowerCase()in r)},l.prototype.getFirstChild=function(e){return e.nodeType!==Node.ELEMENT_NODE?null:e.firstChild?e.firstChild.nodeType===Node.ELEMENT_NODE?this.getFirstChild(e.firstChild):e.firstChild:e},l.prototype.getLastChild=function(e){return e.nodeType!==Node.ELEMENT_NODE?null:e.lastChild?e.lastChild.nodeType===Node.ELEMENT_NODE?this.getLastChild(e.lastChild):e.lastChild:e},l.prototype.getNextContentNode=function(e,t){if(e)for(;e.parentNode;){if(e===t)return null;if(e.nextSibling&&this.canContainTextElement(this.getBlockParent(e,t))){if(e.nextSibling.nodeType===Node.TEXT_NODE&&this.isEmptyTextNode(e)){e=e.nextSibling;continue}return e.nextSibling}if(e.nextElementSibling)return e.nextElementSibling;e=e.parentNode}return null},l.prototype.getPrevNode=function(e,t){if(e)for(;e.parentNode;){if(e===t)return null;if(e.previousSibling){if(e.previousSibling.nodeType!==Node.TEXT_NODE||0!==e.previousSibling.length)return this.getLastChild(e.previousSibling);e=e.previousSibling}else e=e.parentNode}return null},l.prototype.getPrevContentNode=function(e,t){if(e)for(;e.parentNode;){if(e===t)return null;if(e.previousSibling&&this.canContainTextElement(this.getBlockParent(e,t))){if(e.previousSibling.nodeType!==Node.TEXT_NODE||0!==e.previousSibling.length)return e.previousSibling;e=e.previousSibling}else{if(e.previousElementSibling)return e.previousElementSibling;e=e.parentNode}}return null},l.prototype._findNextTextContainer=function(e){for(var t;e;){if(Node.TEXT_NODE==e.nodeType)return e;for(var n=e.firstChild;n;n=n.nextSibling)if(t=this._findNextTextContainer(n))return t;if(this.isTextContainer(e))return e;e=e.nextSibling}return null},l.prototype._findPrevTextContainer=function(e){for(;e;){if(Node.TEXT_NODE==e.nodeType)return e;for(var t=e.lastChild;t;t=t.previousSibling){var n=this._findPrevTextContainer(t);if(n)return n}if(this.isTextContainer(e))return e;e=e.previousSibling}return null},l.prototype.findPrevTextContainer=function(e,t){if(!e||e==t)return{node:t,offset:0};if(e.parentNode&&this.isTextContainer(e.parentNode))return{node:e.parentNode,offset:this.getNodeIndex(e)};for(;e.previousSibling;){var n=this._findPrevTextContainer(e.previousSibling);if(n)return{node:n,offset:this.getNodeLength(n)};e=e.previousSibling}return this.findPrevTextContainer(e.parentNode&&e.parentNode.previousSibling,t)},l.prototype.findNextTextContainer=function(e,t){if(!e||e==t)return{node:t,offset:this.getNodeLength(t)};if(e.parentNode&&this.isTextContainer(e.parentNode))return{node:e.parentNode,offset:this.getNodeIndex(e)+1};for(;e.nextSibling;){var n=this._findNextTextContainer(e.nextSibling);if(n)return{node:n,offset:0};e=e.previousSibling}return this.findNextTextContainer(e.parentNode&&e.parentNode.nextSibling,t)},l.prototype.isTextContainer=function(e){return e&&Node.TEXT_NODE==e.nodeType||(e.nodeName||"").toLowerCase()in r},l.prototype.getNodeIndex=function(e){for(var t=0;e=e.previousSibling;)++t;return t},l.prototype.splitTextAt=function(e,t,n,r){void 0===r&&(r=!1);var i,o=e.length;return t<0||o<=t?null:(o<=t+n&&(n=o-t),n===o?r?e:null:((i=0<t?e.splitText(t):e).length>n&&i.splitText(n),i))},l.prototype.isset=function(e){return null!=e},l.prototype.inArray=function(e,t){for(var n=t.length,r=0;r<n;r++)if(e===t[r])return!0;return!1},l.prototype.arrayDiff=function(e,t,n){var r,i=e.length,o=[];for(r=0;r<i;r++)!1===this.inArray(e[r],t)&&o.push(e[r]);if(!0!==n)for(i=t.length,r=0;r<i;r++)!1===this.inArray(t[r],e)&&o.push(t[r]);return o},l.prototype.arrayMerge=function(e,t){for(var n=t.length,r=0;r<n;r++)e.push(t[r]);return e},l.prototype.getBlockParent=function(e,t){if(!0===this.isBlockElement(e))return e;if(e&&e!==t)for(;e.parentNode;){if(e=e.parentNode,!0===this.isBlockElement(e))return e;if(e===t)return null}return null},l.prototype.isOnBlockBoundary=function(e,t,n){return!(!e||!t)&&(this.getBlockParent(e,n)||this.isBlockElement(e)&&e||null)!==(this.getBlockParent(t,n)||this.isBlockElement(t)&&t||null)},l.prototype.mergeContainers=function(e,t){if(!e||!t)return!1;if(e.nodeType===Node.TEXT_NODE||this.isStubElement(e))t.appendChild(e);else if(e.nodeType===Node.ELEMENT_NODE){for(;e.firstChild;)t.appendChild(e.firstChild);s(e).remove()}return!0},l.prototype.isRangeInElement=function(e,t){for(var n=e&&e.startContainer;n;){if(n===t)return!0;n=n.parentNode}return!1},l.prototype.mergeBlockWithSibling=function(e,t,n){var r=n?s(t).next().get(0):s(t).prev().get(0);return n?this.mergeContainers(r,t):this.mergeContainers(t,r),e.collapse(!0),!0},l.prototype.normalizeNode=function(e){return e?(a.utils.browser.msie||"function"!=typeof e.normalize?function e(t){if(t&&t.nodeType===Node.ELEMENT_NODE)for(var n=t.firstChild;n;){if(n.nodeType===Node.ELEMENT_NODE)e(n);else if(n.nodeType==Node.TEXT_NODE)for(var r;(r=n.nextSibling)&&r.nodeType==Node.TEXT_NODE;){var i=r.nodeValue;null!=i&&i.length&&(n.nodeValue=n.nodeValue+i),t.removeChild(r)}n=n.nextSibling}}(e):e.normalize(),e):null},l.prototype._getNextContainer=function(e,t){var n=t&&t.root;if(!e||e===n)return null;for(;e.nextSibling;){if((e=e.nextSibling).nodeType!==Node.TEXT_NODE){var r=this.getFirstSelectableChild(e,t);if(null!==r)return r}if(this.isSelectable(e,t))return e}for(;e&&!e.nextSibling;){if(e===n)return null;e=e.parentNode}if(!e||e===n)return null;if(e=e.nextSibling,this.isSelectable(e,t))return e;var i=this.getFirstSelectableChild(e,t);return null!==i?i:this._getNextContainer(e,t)},l.prototype.getNextContainer=function(e,t){return this._getNextContainer(e,t||{})},l.prototype._getPreviousContainer=function(e,t){var n=t.root,r=t.nodeFilter;if(!e||e===n)return null;for(;e.previousSibling;){if((e=e.previousSibling).nodeType!==Node.TEXT_NODE){if(!0===a.domUtils.isStubElement(e))return e;var i=this.getLastSelectableChild(e,t);if(null!==i)return i}if(this.isSelectable(e,t))return e}do{if(!(e=e.parentNode)||e===n)return null;if(r&&r(e))return e;if(e.previousSibling)break}while(e);if(e=e.previousSibling,this.isSelectable(e,t))return e;var o=this.getLastSelectableChild(e,t);return null!==o?o:this._getPreviousContainer(e,t)},l.prototype.getPreviousContainer=function(e,t){return this._getPreviousContainer(e,t||{})},l.prototype.getNextSelectableNode=function(e,t){return void 0===t&&(t=null),a.domUtils.createTreeWalker(t.root).nextNode(e,t)},l.prototype._getPreviousSelectableNode=function(e,t){return a.domUtils.createTreeWalker(t.root).previousNode(e,t)},l.prototype.getPreviousSelectableNode=function(e,t){return this._getPreviousSelectableNode(e,t||{})},l.prototype.getFirstSelectableChild=function(e,t){if(!e)return null;if((t=t||{}).visitFilter&&!t.visitFilter(e))return null;if(!t.excludeSelf){if(e.nodeType===Node.TEXT_NODE&&(!1!==t.allowEmptyText||!this.isEmptyTextNode(e)))return e;if(t&&t.nodeFilter&&t.nodeFilter(e))return e}var n,r=e.firstChild;for(t=t.excludeSelf?s.extend({},t,{excludeSelf:!1}):t;r;){if(n=this.getFirstSelectableChild(r,t))return n;r=r.nextSibling}return null},l.prototype.getLastSelectableChild=function(e,t){if(void 0===t&&(t=null),!e)return null;if((t=t||{}).visitFilter&&!t.visitFilter(e))return null;if(!t.excludeSelf){if(e.nodeType==Node.TEXT_NODE&&(!1!==t.allowEmptyText||!this.isEmptyTextNode(e)))return e;if(t&&t.nodeFilter&&t.nodeFilter(e))return e}var n,r=e.lastChild;for(t=t.excludeSelf?{root:t.root,excludeSelf:!1,nodeFilter:t.nodeFilter,allowEmptyText:t.allowEmptyText}:t;r;){if(n=this.getLastSelectableChild(r,t))return n;r=r.previousSibling}return null},l.prototype.isSelectable=function(e,t){return!!e&&(e.nodeType===Node.TEXT_NODE&&!this.isEmptyTextNode(e)||!(!t||!t.nodeFilter)&&t.nodeFilter(e))},l.prototype.insertNodeAt=function(e,t,n){return!(!e||!t||t.nodeType!==Node.ELEMENT_NODE||n<0||(t.insertBefore(e,t.childNodes[n]),0))},l.prototype.matchesSelector=function(e,t){return!(!e||e.nodeType!==Node.ELEMENT_NODE||!t)&&(e.matches?e.matches(t):e.msMatchesSelector?e.msMatchesSelector(t):s(e).is(t))},l.prototype.findNodeByTagName=function(e,t){for(var n,r=e&&e.length||0,i=0;i<r;++i)if((n=e[i]).nodeType===Node.ELEMENT_NODE&&t.test(n.tagName))return n;return null},l.prototype.isAncestorAmong=function(e,t){for(var n=a.rangy.dom,r=0;r<e.length;++r)if(n.isAncestorOf(e[r],t,!1))return!0;return!1},l.prototype.isOnRightEdge=function(e,t){if(!e)return!1;var n=e.nodeType;return Node.TEXT_NODE==n?t&&e.nodeValue&&t>=e.nodeValue.length:Node.ELEMENT_NODE==n&&e.childNodes&&e.childNodes.length&&t>=e.childNodes.length},l.prototype.isOnLeftEdge=function(e,t){return Boolean(e&&0===t)},l);function l(){this.wsrgx=/^\s*$/,this.numrgx=/^\d+$/}var d=(Object.defineProperty(c.prototype,"isValid",{get:function(){return this._isValid},enumerable:!0,configurable:!0}),c.prototype.previousNode=function(e,t){if(this._root=t.root||this._root,this.goto(e),!this.isValid)return null;var n=this._findPrevNode(this._current,t,!1,!0);return n&&this.goto(n),n},c.prototype.nextNode=function(e,t){if(this._root=t.root||this._root,this.goto(e),!this.isValid)return null;var n=this._findNextNode(this._current,t,!1,!0);return n&&this.goto(n),n},c.prototype.goto=function(e){this._isValid=a.domUtils.isChildOf(e,this._root),this._isValid||(e=null),this._current=e},c.prototype._findNextNode=function(e,t,n,r){if(!e||e===this._root)return null;if(n)if(t.depthFirst){if(i=(!t.visitFilter||t.visitFilter(e))&&e.firstChild&&this._findNextNode(e.firstChild,t,!0,!1))return i;if(!t.nodeFilter||t.nodeFilter(e))return e}else{if(!t.nodeFilter||t.nodeFilter(e))return e;var i;if(i=(!t.visitFilter||t.visitFilter(e))&&e.firstChild&&this._findNextNode(e.firstChild,t,!0,!1))return i}if(e.nextSibling){var o=this._findNextNode(e.nextSibling,t,!0,r);if(o)return o}return e!=this._root&&e.parentNode?!t.queryParent||t.nodeFilter&&!t.nodeFilter(e.parentNode)?this._findNextNode(e.parentNode,t,!1,!0):e.parentNode:null},c.prototype._findPrevNode=function(e,t,n,r){if(!e||e===this._root)return null;if(n)if(t.depthFirst){if((!t.visitFilter||t.visitFilter(e))&&(i=e.lastChild&&this._findPrevNode(e.lastChild,t,!0,!1)))return i;if(!t.nodeFilter||t.nodeFilter(e))return e}else{if(!t.nodeFilter||t.nodeFilter(e))return e;var i;if((!t.visitFilter||t.visitFilter(e))&&(i=e.lastChild&&this._findPrevNode(e.lastChild,t,!0,!1)))return i}if(e.previousSibling){var o=this._findPrevNode(e.previousSibling,t,!0,r);if(o)return o}return r&&e!=this._root&&e.parentNode?!t.queryParent||t.nodeFilter&&!t.nodeFilter(e.parentNode)?this._findPrevNode(e.parentNode,t,!1,!0):e.parentNode:null},c);function c(e){this._root=e,this._isValid=!1}a.domUtils=new o}(window.FLITE,window.jQuery),Object.defineProperty(F,"__esModule",{value:!0}),N=window.FLITE,b=window.jQuery,L.prototype.init=function(e){},L.prototype.hideAll=function(e){},L.prototype.showTooltip=function(e,t,n){e&&e.setAttribute("title",t)},L.prototype.hideTooltip=function(e){b(e).attr("title",null)},C=L,N.DefaultTooltips=C,Object.defineProperty(F,"__esModule",{value:!0}),function(s){s||console.error("documentselection: global is not defined");var e=(Object.defineProperty(t.prototype,"nativeSelection",{get:function(){return this.getSelection().nativeSelection},enumerable:!0,configurable:!0}),t.prototype.setHook=function(e){this._setHook=e},t.prototype.getSelection=function(){return s.rangy.getSelection?(this._selection?this._selection.refresh():this.env.frame?this._selection=s.rangy.getSelection(this.env.frame):this._selection=s.rangy.getSelection(null),this._selection):(s.logger.log("no getselection, rangy is",Object.keys(s.rangy),"global is",Object.keys(s),"initialized",s.rangy.isInitialized()),null)},t.prototype.createRange=function(){return s.rangy.createRange(this.env.document)},t.prototype.getRangeAt=function(e){try{return this._selection.refresh(),this._selection.getRangeAt(e)}catch(e){this._selection=null;try{return this.getSelection().getRangeAt(0)}catch(e){}}return null},t.prototype.getRange=function(){return this.getRangeAt(0)},t.prototype.moveLeft=function(e,t,n){void 0===e&&(e=null),void 0===t&&(t=1),(e=e||this.getRangeAt(0))&&(e.moveStart("char",-t,n),e.collapse(!0),this.addRange(e))},t.prototype.nudgeLeft=function(e,t){if((e=e||this.getRangeAt(0))&&e.collapsed&&e.startContainer){var n=e.startContainer,r=3===n.nodeType;if(!r){if(!(o=n.childNodes.item(e.startOffset))){var i=s.domUtils.getLastSelectableChild(n,t);if(i)return void this.collapseAtEnd(i)}n=o||n}if(!r||0===e.startOffset){var o,a=s.domUtils.createTreeWalker(t.root).previousNode(n,t);a?a!==n&&this.collapseAtEnd(a):(o=s.domUtils.getFirstSelectableChild(t.root,t))&&this.collapseAtStart(o)}}},t.prototype.nudgeRight=function(e,t){var n,r=(e=e||this.getRangeAt(0))&&e.collapsed&&e.endContainer;if(r&&(1===r.nodeType?n=e.endOffset>=r.childNodes.length:3===r.nodeType&&(n=e.endOffset>=r.length),n)){var i=s.domUtils.createTreeWalker(t.root).nextNode(r,t);i&&i!==r&&this.collapseAtStart(i)}},t.prototype.moveRight=function(e,t,n){void 0===e&&(e=null),void 0===t&&(t=1),(e=e||this.getRangeAt(0))&&(e.moveStart("char",t,n),e.collapse(!0),this.addRange(e))},t.prototype.collapseBefore=function(e,t){var n=s.domUtils.createTreeWalker(t.root),r=n.previousNode(e,t);if(!r)return n.isValid&&this.setStart(e.parentNode,!0,s.domUtils.getNodeIndex(e)),!1;var i=this.getRange();return 3===r.nodeType?i.setEnd(r,r.length||0):1===r.nodeType&&(s.domUtils.isChildOf(e,r)?i.setEnd(r,0):i.setEnd(r.parentNode,s.domUtils.getNodeIndex(r)+1)),i.collapse(),this.addRange(i),!0},t.prototype.collapseAfter=function(t,e){var n=s.domUtils.createTreeWalker(e.root),r=n.nextNode(t,e);if(!r)return n.isValid&&this.setEnd(t.parentNode,!0,s.domUtils.getNodeIndex(t)+1),!1;var i=this.getRange();if(3===r.nodeType)i.setStart(r,0);else if(1===r.nodeType)if(s.domUtils.isChildOf(t,r))try{i.setStart(r,s.domUtils.getNodeIndex(t)+1)}catch(e){i.setStart(t,s.domUtils.getNodeLength(t))}else{var o=s.domUtils.getFirstSelectableChild(r,e);o?i.setStart(o,0):i.setStart(r.parentNode,s.domUtils.getNodeIndex(r))}return i.collapse(!0),this.addRange(i),!0},t.prototype.collapseAtStart=function(e){return this._collapseAt(e,!0)},t.prototype.collapseAtEnd=function(e){return this._collapseAt(e,!1)},t.prototype.setStart=function(e,t,n){if(e&&e.ownerDocument&&e.parentNode){var r=this.getRangeAt(0);return!!r&&(r.setStart(e,n),t&&r.collapse(!0),this.addRange(r),r.startContainer===e)}},t.prototype.setEnd=function(e,t,n){if(e&&e.ownerDocument&&e.parentNode){var r=this.getRangeAt(0);return!!r&&(r.setEnd(e,n),t&&r.collapse(!1),this.addRange(r),r.endContainer===e)}},t.prototype.addRange=function(e,t){void 0===t&&(t=!0),this._selection||(this._selection=this.getSelection()),this._selection.setSingleRange(e),!1!==t&&this._setHook&&this._setHook(e)},t.prototype.normalize=function(e,t){var n=this.getRange();if(n&&n.collapsed){var r=n.startContainer;if(1===r.nodeType){var i=r.childNodes[n.startOffset];if(!e.nodeFilter(i)){if(t){var o=s.domUtils.getPreviousSelectableNode(i,e);if(o)return void this.collapseAtEnd(o)}var a=s.domUtils.getFirstSelectableChild(i,e);a&&a!==i&&this.setStart(a,!0,0)}}}},t.prototype._selectNodeOrContent=function(e,t){t.nodeType===Node.TEXT_NODE?e.selectNode(t):e.selectNodeContents(t)},t.prototype._collapseAt=function(e,t){var n=this.getRangeAt(0);if(!n||!e)return!1;try{3===e.nodeType?t?this.setStart(e,!0,0):this.setEnd(e,!0,e.length):(this._selectNodeOrContent(n,e),n.collapse(t),this.addRange(n))}catch(e){return s.logger.error("collapseAt",t?"start":"end",e),!1}},t.prototype._getEffectiveStartNode=function(e){if(!e||1!==e.nodeType)return e;var t=e.parentNode;return t&&e===t.firstChild?"LI"===e.nodeName||"TR"===e.nodeName?e.parentNode:"TD"===e.nodeName&&t===(t.parentNode&&t.parentNode.firstChild)?t.parentNode:e:e},t.prototype._getEffectiveEndNode=function(e){if(!e||1!==e.nodeType)return e;var t=e.parentNode;return t&&e===t.lastChild?"LI"===e.nodeName||"TR"===e.nodeName?e.parentNode:"TD"===e.nodeName&&t===(t.parentNode&&t.parentNode.lastChild)?t.parentNode:e:e},t);function t(e){this.env=e,this._setHook=null,this._selection=null,this.getSelection()}s.Selection=e}(window.FLITE),Object.defineProperty(F,"__esModule",{value:!0}),function(l,d){l||console.error("marker: global is not defined");var s={acceptNode:function(e){return NodeFilter.FILTER_ACCEPT}},e=(Object.defineProperty(r.prototype,"isOrphan",{get:function(){return!(!this._start||this._start.previousSibling||(this._end?this._end.nextSibling||this._end.previousSibling!==this._start:this._start.nextSibling))},enumerable:!0,configurable:!0}),r.prototype.getNodesInRange=function(e){if(!this._end||!this._start||this._start.nextSibling===this._end)return[];var t,n=[],r=l.utils.isBrowser("msie")?s.acceptNode:s,i=this._start.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,r,!1),o=this._end,a=!o.nextSibling;for(i.currentNode=this._start;t=i.nextNode();)if(!l.domUtils.isChildOf(t,this._start)){if(t===o||t===e)break;!a&&l.domUtils.isChildOf(t,o)||n.push(t)}return n},r.prototype._createBookmark=function(e){function t(e){var t=o.env.document.createElement("span");return t.style.display="none",t.innerHTML="&nbsp;",t.className="flite-bookmark flite-bookmark-"+e,t}var n,r,i,o=this,a=e.collapsed;this._start=n=t("start"),a||(this._end=r=t("end"),(i=e.cloneRange()).collapse(!1),i.insertNode(r)),(i=e.cloneRange()).collapse(!0),i.insertNode(n),r?(i.setStart(n.parentNode,l.domUtils.getNodeIndex(n)+1),i.setEnd(r.parentNode,l.domUtils.getNodeIndex(r))):(i.setStartAfter(n),i.collapse(!0)),this._range=i},r.prototype.getRange=function(){return this._range.cloneRange()},Object.defineProperty(r.prototype,"start",{get:function(){return this._start},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"end",{get:function(){return this._end},enumerable:!0,configurable:!0}),r.prototype.collapseAndRemove=function(e,t,n){var r=d.extend({},{root:this.env.element,visitFilter:function(e){return!0},nodeFilter:function(e){return!0}},n);t&&this._start?e.collapseBefore(this._start,r):!t&&this._end&&e.collapseAfter(this._end,r),this.remove()},r.prototype.remove=function(){this._start&&(d([this._start,this.end]).remove(),this._start=this._end=null)},r.prototype._selectBookmark=function(e){var t=e.getRangeAt(0),n=null,r=null,i=0,o=null,a=this._start&&this._start.parentNode;if(this._start.nextSibling===this.end||0===l.domUtils.getElementsBetween(this._start,this.end).length)this.end.nextSibling?n=l.domUtils.getFirstChild(this.end.nextSibling):this._start.previousSibling?(n=l.domUtils.getFirstChild(this._start.previousSibling)).nodeType===Node.TEXT_NODE&&(i=n.length):(this.end.parentNode.appendChild(this.env.document.createTextNode("")),n=l.domUtils.getFirstChild(this.end.nextSibling));else{if(this._start.nextSibling)n=l.domUtils.getFirstChild(this._start.nextSibling);else{if(!this._start.previousSibling){var s=this.env.document.createTextNode("");d(this._start).before(s)}i=(n=l.domUtils.getLastChild(this._start.previousSibling)).length}this.end.previousSibling?r=l.domUtils.getLastChild(this.end.previousSibling):(r=l.domUtils.getFirstChild(this.end.nextSibling||this.end),o=0)}d([this._start,this.end]).remove();try{l.domUtils.normalizeNode(a)}catch(e){}null===r?t&&(t.setEnd(n,i),t.collapse(!1)):(t.setStart(n,i),null===o&&(o=r.length||0),t.setEnd(r,o));try{e.addRange(t)}catch(e){}},r.removeBookmarks=function(e){d(e).find("span.flite-bookmark").remove()},r);function r(e,t,n){this.env=e,r.removeBookmarks(e.element),this._createBookmark(n)}l.DOMMarker=e}(window.FLITE,window.jQuery),Object.defineProperty(F,"__esModule",{value:!0}),(E=j=j||{})[E.OK=0]="OK",E[E.IGNORE=1]="IGNORE",E[E.IGNORE_ALL=2]="IGNORE_ALL",(T=W=W||{})[T.None=0]="None",T[T.Start=1]="Start",T[T.Composing=2]="Composing",(S=V=V||{})[S.inline=0]="inline",S[S.block=1]="block",S[S.none=2]="none",(k=z=z||{})[k.Right=1]="Right",k[k.Left=2]="Left",k[k.None=0]="None",function(x,O){var a,e,c="insertType",h="deleteType",o="data-flite-class",l="data-flite-wrapper-classes",d="data-flite-wrapper-selector",p="data-flite-wrapper-change",R="flite-container-only",u="."+R,f=u+",[data-flite-complex]",r=":not(."+R+")",s="data-flite-inserting",g={LI:1,TD:1,P:1},m={LI:1,P:1,DIV:1,H1:1,H2:1,H3:1,H4:1,H5:1,H6:1},v={OL:1,UL:1},y={LI:1,TD:1,TR:1,UL:1,OL:1},_={BR:1,P:1,DIV:1,LI:1},N={LI:1,OL:1,UL:1},i={P:1,DIV:1,H1:1,H2:1,H3:1,H4:1,H5:1,H6:1},b=Object.keys(i).join(","),C=Object.keys(i).join(".flite-container-only:empty,")+".flite-container-only:empty",E=/^u|ol$/i,T=/li/i,S=[{start:0,end:31},{start:33,end:40},{start:45,end:45},{start:91,end:93},{start:112,end:123},{start:144,end:145}],k={attributes:x.pluginUtils.defaultTrackerConfig.attributes,changeGroupTime:200,classes:{block:"ice-block"},attrValuePrefix:"",mergeBlocks:!1,blockEl:"p",stylePrefix:"cts",changeTypes:{insertType:{alias:"ins",action:"Inserted"},deleteType:{alias:"del",action:"Deleted"}},contentEditable:void 0,isVisible:!0,_changeData:null,handleSelectAll:!1},t=void 0;(e=a=a||{})[e.Always=1]="Always",e[e.NotEmpty=2]="NotEmpty";var w=[{selector:"img,br,.cke_widget_wrapper,li",type:a.Always},{selector:"p,div,td,h1,h2,h3,h4,h5,h6",type:a.NotEmpty}],D=function(e){if(e.length<1)return!0;if(e.is("BR"))return!0;for(var t,n=e.length-1;0<=n;--n){if(1===(t=e[n]).nodeType&&"BR"!==t.nodeName)return!1;if(3===t.nodeType&&!x.domUtils.isEmptyTextNode(t))return!1}return!0},A=function(e){if(!e)return!0;var t,n,r=S.length;for(t=0;t<r;++t)if(e>=(n=S[t]).start&&e<=n.end)return!0;return!1},I=function(e){return e.toArray().sort(function(e,t){return x.domUtils.isChildOf(e,t)?-1:x.domUtils.isChildOf(t,e)?1:0})},L=function(e){return!(!e||1!==e.nodeType||"BR"===e.nodeName)&&null!==e.getAttribute("data-mce-bogus")},P=function(e){for(var t,n=e.attributes,r=n&&n.length,i={},o=0;o<r;++o)i[(t=n[o]).name]=t.value;return i},n=(M.prototype.dispose=function(){this.setIgnoreMutations(!0),this._selection&&(this._selection.setHook(null),this._selection=null),this._params=null},M.prototype.getSelectedNode=function(){var e=this._getNodeAtCaret({range:null,lookBack:!1,lookForward:!1});return e&&e.node},M.prototype.getSelection=function(){return this._selection},M.prototype.createNativeRange=function(){return x.rangy.createNativeRange(this._host.document)},M.prototype.fixEmbeddedTrackedSpans=function(){},M.prototype.removeFLITETracking=function(t){var n=this;if(t&&t.nodeType===Node.ELEMENT_NODE){Object.keys(this.attributes).forEach(function(e){t.removeAttribute(n.attributes[e])}),t.removeAttribute("title"),t.removeAttribute(o);var r=O(t);r.removeClass(this._insertClassName).removeClass(this._deleteClassName).removeClass(R);var e=(t.className||"").split(" "),i=this._params.stylePrefix;return e.forEach(function(e){e&&0===e.indexOf(i)&&r.removeClass(e)}),""===t.getAttribute("class")&&t.removeAttribute("class"),t}},M.prototype.currentChangeNode=function(e,t){var n=this._fliteSelector;e=e||this.getSelectedNode();var r=t?e&&x.domUtils.matchesSelector(e,n):x.domUtils.getNode(e,n);return r},M.prototype.ignoreNextMutation=function(e){this._summaryGuard.set(1),e&&x.logger.debug("ignore next mutation after "+e)},M.prototype.setIgnoreMutations=function(e){var t=this._ignoreMutations;return e?this._mutationSummary&&this._mutationSummary.disconnect():this._createMutationObservers(!0),this._ignoreMutations=e,t},Object.defineProperty(M.prototype,"isVisible",{get:function(){return this._params.isVisible},enumerable:!0,configurable:!0}),Object.defineProperty(M.prototype,"contentEditable",{get:function(){return this._params.contentEditable},enumerable:!0,configurable:!0}),Object.defineProperty(M.prototype,"currentUser",{get:function(){return{id:this._user&&this._user.id,name:this._user&&this._user.name}},enumerable:!0,configurable:!0}),Object.defineProperty(M.prototype,"attributes",{get:function(){return this._params.attributes},enumerable:!0,configurable:!0}),Object.defineProperty(M.prototype,"changeTypes",{get:function(){return this._params.changeTypes},enumerable:!0,configurable:!0}),Object.defineProperty(M.prototype,"changeData",{get:function(){return this._params._changeData},enumerable:!0,configurable:!0}),Object.defineProperty(M.prototype,"sessionId",{get:function(){return this._sessionId},enumerable:!0,configurable:!0}),Object.defineProperty(M.prototype,"hostMethods",{get:function(){return this._params.hostMethods},enumerable:!0,configurable:!0}),M.prototype.toggleChangeTracking=function(e,t){return e?this._startTracking(t):this._stopTracking(),this},M.prototype.setCurrentUser=function(e){var n=this,r={id:e&&String(e.id)||"",name:e&&String(e.name)||""};for(var t in this._user=r,this._changes){var i=this._changes[t];i.userid===r.id&&(i.username=r.name)}var o,a=this.getTrackedNodes(),s=this._params.attributes.userId;a.each(function(e,t){null!==(o=t.getAttribute(s))&&o!==r.id||t.setAttribute(n._params.attributes.userName,r.name)})},M.prototype.setSessionId=function(e){this._sessionId=e,this._lastChange=null},M.prototype.prepareForInsertion=function(){var e=this._getCurrentRange(!0),t=e&&e.startContainer,n=this._getNodeTrackingContext(t);this._moveCaretOutOfTracking(e,n)},M.prototype.isNodeVisible=function(e){if(e&&e.nodeType===Node.TEXT_NODE&&(e=e.parentNode),e){var t=e.getBoundingClientRect();return 0<t.top&&0<t.left}},M.prototype.getWrappingTagName=function(e,t){var n=this.getNodeWrappingType(e);return n===V.block?"div":n===V.inline?"span":null},M.prototype.getNodeWrappingType=function(e){return e&&e.nodeType!==Node.TEXT_NODE?V.none:V.inline},M.prototype._markupInsertedNodes=function(e,t){this._startBatchChange();var n=[];try{var r=t&&t.startContainer,i=this._getNodeTrackingContext(r),o=void 0;i.isTracking&&this._moveCaretOutOfTracking(t,i);for(var a={changeId:void 0,containerOnly:!1,trackChildren:!1,type:c},s=0,l=e.length;s<l;++s)o=e[s],a.changeId=null,a.containerOnly=o.nodeType!==Node.TEXT_NODE,a.trackChildren=a.containerOnly,o=this._createTrackedNode(o,a),n.push(o)}catch(e){x.logger.error("_insertNode: ",e)}finally{this._endBatchChange(this._batchChangeId,!1)}return n},M.prototype._moveCaretOutOfTracking=function(e,t){if(e.collapsed&&t.tracksContent){var n=this.setIgnoreMutations(!0),r=z.None;try{var i=e.startContainer;if(1===i.nodeType){var o=i;if(o===t.trackingNode)if(0===e.startOffset)this._selection.collapseBefore(t.trackingNode,this._isDeletableNoSelfOptions),r=z.Left;else if(e.startOffset>=i.childNodes.length)this._selection.collapseAfter(o,this._isDeletableNoSelfOptions),r=z.Right;else{var a=this._splitNode(t.trackingNode,t.trackingNode,e.startOffset);this._selection.collapseAfter(a,this._isDeletableNoSelfOptions),r=z.Left}}else if(3===i.nodeType){var s=i,l=x.domUtils.getNodeIndex(s);a=null,0===e.startOffset?(0<l?a=this._splitNode(t.trackingNode,t.trackingNode,l):this._selection.collapseBefore(t.trackingNode,this._isDeletableNoSelfOptions),r=z.Left):e.startOffset>=s.length?l<t.trackingNode.childNodes.length-1?a=this._splitNode(t.trackingNode,t.trackingNode,l+1):(this._selection.collapseAfter(t.trackingNode,this._isDeletableWithParentOptions),r=z.Right):a=this._splitNode(t.trackingNode,s,e.startOffset),a&&(e.setStart(a.parentNode,x.domUtils.getNodeIndex(a)+1),e.collapse(!0),this._selection.addRange(e),r=z.Left)}var d=this._selection.getRange(),c=this._getNodeTrackingContext(d.startContainer);if(c.tracksContent){var p=x.domUtils.getNodeIndex(c.trackingNode);this._selection.setStart(c.trackingNode.parentNode,!0,r===z.Left?p+1:p)}}finally{this.setIgnoreMutations(n)}}},M.prototype.reload=function(e){e?(this._loadEditor(e),this.setShowChanges(this.isVisible)):this._loadFromDom()},M.prototype.prepareToCut=function(){var e=this.setIgnoreMutations(!0);try{var t=this._getCurrentRange(!0),n=t.cloneRange();if(!t||t.collapsed)return!1;x.utils.fixSelection(t,this.rootElement);for(var r=t.cloneContents(),i=r.firstChild,o=r.lastChild,a=!0,s=i;s&&a;s=s.nextSibling)this._shouldIgnoreNode(s)||(a=!1);if(a)return!1;this.hostMethods.beforeEdit(),t.collapse(!1),t.insertNode(r),t.setStartBefore(i),t.setEndAfter(o);var l=this._startBatchChange();try{this._deleteSelection(t,!1,!1)}catch(e){x.logger.error(e,"While trying to delete selection")}finally{this._endBatchChange(l,!1),this._selection.addRange(n),this._momentarilyRemoveTrackingInRange(n)}}finally{return this._summaryGuard.set(1),this.setIgnoreMutations(e),!0}},M.prototype.prepareToCopy=function(){var e=this._getCurrentRange();if(e&&!e.collapsed){var t=this.setIgnoreMutations(!0);try{this._momentarilyRemoveTrackingInRange(e)}finally{this.setIgnoreMutations(t)}}},M.prototype.tryToCut=function(){},M.prototype.setShowChanges=function(e){var t=this._$element;e=Boolean(e),this._params.isVisible=e,t&&(t.toggleClass("FLITE-Tracking",e),this._showTitles(e))},M.prototype.unlistenToEvents=function(){return this.rootElement&&this._boundEventHandler&&this.rootElement.removeEventListener("keydown",this._boundEventHandler,!0),this._boundEventHandler=null,this},M.prototype.listenToEvents=function(){return this.rootElement&&!this._boundEventHandler&&(this._boundEventHandler=this.handleEvent.bind(this),this.rootElement.addEventListener("keydown",this._boundEventHandler,!0)),this},M.prototype.handleEvent=function(e){var t=!1;return"keypress"==e.type?t=this._keyPress(e):"keydown"==e.type&&(t=this._handleKeyDown(e)),t&&(e.stopImmediatePropagation(),e.preventDefault()),!t},M.prototype.markNodeForPendingInsertion=function(e){e&&e.nodeType===Node.ELEMENT_NODE&&(e.setAttribute(s,"1"),setTimeout(function(){try{e.removeAttribute(s)}finally{}},10))},M.prototype.setMutationContext=function(e,t){this._lastMutationContext.setContext(e,t)},M.prototype.getMutationContext=function(){return this._lastMutationContext.peekType},M.prototype.getCleanDOM=function(e,t){var n;t=O.extend({},{clone:!1,removeDeleted:!1},t),n=e?O("string"==typeof e?"<div>"+e+"</div>":e):this._$element,t.clone&&(n=n.clone());var r="["+this.attributes.isDeleteNode+"]",i=this._cleanBody(n,this._fliteSelector,this._deleteSelector,"["+this.attributes.fliteCreated+"]",t);return(i=this._cleanBody(i,r,r,null,t))[0]},M.prototype.processNodesForInsert=function(e){if(!e||!e.length)return[];this.hostMethods.beforeInsert&&this.hostMethods.beforeInsert();var t=this._getCurrentRange(!0);if(!t)return[];var n,r=!t.collapsed;try{if(r){this._deleteContents(!0,t,!0),t=this._getCurrentRange();var i=this._getNodeTrackingContext(t.startContainer);this._moveCaretOutOfTracking(t,i),t=this._getCurrentRange()}n=this._markupInsertedNodes(e,t)}catch(e){x.logger.error(e,"while trying to insert nodes"),n=[]}return n},M.prototype.isInsideChange=function(e,t){try{return Boolean(this.currentChangeNode(e,t))}catch(e){return x.logger.error(e,"While testing if isInsideChange"),!1}},M.prototype.hasChanges=function(){var e,t=this._changes;for(var n in t)if(t.hasOwnProperty(n)&&(e=t[n])&&e.type)return!0;return!1},M.prototype._createMarkerForTrackedNode=function(e,t){var n=e.getAttribute(this.attributes.changeId),r=n&&this._changes[n];if(!r)return null;try{var i=JSON.stringify(r),o=e.className;return O("<span>&#8203;</span>").attr(p,i).attr(d,t).attr(l,o)}catch(e){return x.logger.error("wrapTrackedNodes",e),null}},M.prototype.getChangeForNode=function(e){if(!e||1!==e.nodeType)return null;var t=e.getAttribute(this._params.attributes.changeId),n=t&&this.getChange(t);return n?jQuery.extend({},n):null},M.prototype.wrapTrackedNodes=function(e,t){for(var n,r,i=this.setIgnoreMutations(!0),o=[],a=0;a<e.length;++a)n=e[a],x.domUtils.matchesSelector(n,t)&&(r=this._createMarkerForTrackedNode(n,t))&&o.push(r[0]),o.push(n);return this.setIgnoreMutations(i),o},M.prototype.wrapAllTrackedNodes=function(e,r){var i=this,t=this.setIgnoreMutations(!0),n=e&&O(e)||this._$element;n.find("span["+p+"]").remove(),n.find(""+r+this._deleteSelector+","+r+this._insertSelector).each(function(e,t){var n=i._createMarkerForTrackedNode(t,r);n&&n.insertBefore(t)}),this.setIgnoreMutations(t)},M.prototype.unwrapAllTrackedNodes=function(e){var a=this,t=e&&O(e)||this._$element,s="span["+p+"]";t.find(s).each(function(e,t){try{var n=JSON.parse(t.getAttribute(p)),r=t.getAttribute(d),i=t.nextSibling;if(i&&x.domUtils.matchesSelector(i,r)||t.previousSibling&&x.domUtils.matchesSelector(t.previousSibling,r)&&(i=t.previousSibling),n&&n.id&&i&&1===i.nodeType){var o=O(i);for(a._changes[n.id]=a._changes[n.id]||n,a._addNodeToChange(n.id,i,n.type),o.addClass(t.getAttribute(l));o.next().is(s);)o.next().remove()}}catch(e){x.logger.error("unrapTrackedNodes",e)}finally{O(t).remove()}})},M.prototype.getTrackedNodes=function(){return this._$element?this._$element.find(this._fliteSelector):O()},M.prototype.countChanges=function(e){return this._filterChanges(e).count},M.prototype.getCurrentUser=function(){var e=this.currentUser||{},t=null==e.id?"":String(e.id);return{name:e.name||"",id:t}},M.prototype.acceptAll=function(e){return this._acceptRejectSome(e,!0)},M.prototype.rejectAll=function(e){window.alert("This feature is disabled in the demo version (but it really works in the full version).")},M.prototype.acceptChange=function(e){var t=this._processChange(e,!0,{isAccept:!0});return this._removeFLITEArtifacts(),t},M.prototype.rejectChange=function(e){window.alert("This feature is disabled in the demo version (but it really works in the full version).")},M.prototype.getChanges=function(e){var t=e?this._filterChanges(e):this._changes;return O.extend(!0,{},t)},M.prototype.skipToNextChangeNode=function(){var t=this.getSelectedNode();if(!t)return null;var e=this.getTrackedNodes().toArray().filter(function(e){return-1===x.domUtils.compareNodePosition(t,e)});return e.length?(e.sort(x.domUtils.compareNodePosition),this._selection.setStart(e[0],!0,0),e[0]):null},M.prototype.getContentElement=function(){return null},M.prototype.getChange=function(e){return this._changes[e]||null},M.prototype.handleImmediateKeypress=function(e){var t=!1;if(this._handleEditKey(e))t=!0;else{if(e.ctrlKey||e.metaKey)return!1;switch(e.keyCode||e.which){case 8:t=this._deleteContents(!1,null,!1);break;case 46:t=this._deleteContents(!0,null,!1);break;case 13:this._lastMutationContext.setContext("enter")}}return t&&(e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation()),t},M.prototype._cleanBody=function(e,t,r,i,n){var o=this,a=e.find(t),s=Boolean(n&&n.removeDeleted);return O.each(a,function(e,t){var n=O(t);!i||n.is(i)?s&&function(e){return e.is(r)&&(e.is(u)?o._replaceNodeWithContent(e):e.remove(),1)}(n)||o._replaceNodeWithContent(n):o.removeFLITETracking(t)}),e.find("span["+p+"]").remove(),e},M.prototype._acceptRejectSome=function(e,t,n){var r=this;function i(e){r._processChange(e,!1,{isAccept:t,notify:!1})}void 0===n&&(n=null);var o,a=e?this._filterChanges(e):{changes:this._changes,count:Object.keys(this._changes).length};for(o in n=n||this._$element,a.changes)I(n.find("["+this.attributes.changeId+"="+o+"]")).forEach(i);this._removeFLITEArtifacts(),a.count&&this._triggerChange({isText:!0})},M.prototype._forceRefresh=function(){var e=this.rootElement,t=e.style.padding;e.style.padding="1px"===t?"2px":"1px",setTimeout(function(){e.style.padding=t},1)},M.prototype._createTrackedNode=function(e,t){var n=e,r=!0,i=t.trackChildren,o=t.containerOnly,a=this.getWrappingTagName(e,null);if(a){var s=this._host.document.createElement(a);if(n){var l=n.parentNode;l&&l.insertBefore(s,n),s.appendChild(n),n.nodeType!==Node.TEXT_NODE&&s.setAttribute("data-flite-complex","1")}s.setAttribute(this.attributes.fliteCreated,"1"),o=this._isOpaqueNode(n),i=r=!1,n=s}else n=e;return this._useChange({type:t.type,nodes:[n],changeId:t.changeId,containerOnly:o,filterNodes:r,ignoredNodes:t.ignoredNodes,trackChildren:o&&i}),n},M.prototype._startTracking=function(e){return"boolean"==typeof this._params.contentEditable&&this.rootElement.setAttribute("contentEditable",String(this._params.contentEditable)),this._loadEditor(e),this.setIgnoreMutations(!1),this._unsubscribeEvents&&(this._unsubscribeEvents(),this._unsubscribeEvents=null),this._compositionState=this.hostMethods.getIMECompositionState(),this},M.prototype._stopTracking=function(){try{this.unlistenToEvents(),this._unsubscribeEvents&&(this._unsubscribeEvents(),this._unsubscribeEvents=null),this.setIgnoreMutations(!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null),this._mutationSummary&&(this._mutationSummary.disconnect(),this._mutationSummary=null),this._changes={}}catch(e){x.logger.error(e,"While trying to stop tracking")}return this},M.prototype._filterChanges=function(e){var t,n=0,r={},i=e||{},o=i.filter,a=i.exclude?O.map(i.exclude,String):null,s=i.include?O.map(i.include,String):null,l=i.verify;for(var d in this._changes)if((t=this._changes[d])&&t.type){var c=o&&!o({userid:t.userid,time:t.time,data:t.data})||a&&0<=a.indexOf(t.userid)||s&&s.indexOf(t.userid)<0;c||(l&&(c=!this._$element.find("["+this.attributes.changeId+"]").length),c||(++n,r[d]=t))}return{count:n,changes:r}},M.prototype._cleanupLINode=function(e){if("LI"===e[0].nodeName){var n=[];e.children("br").each(function(e,t){t.previousSibling&&!t.nextSibling?n.push(t):t.nextSibling&&!t.previousSibling?n.push(t):O(t.nextSibling).is("br[data-mce-bogus]")?n.push(t.nextSibling):t.nextSibling&&"block"===x.domUtils.getComputedStyle(t.nextSibling,"display")&&n.push(t)}),O(n).remove()}},M.prototype._processChange=function(e,t,n){var o=this;n=n||{};var r,i,a,s,l,d,c,p,u,h=x.domUtils,f=this._$element,g=this._getCurrentRange(!0),m=g&&g.cloneRange(),v=this._deleteSelector,y=this._insertSelector,_=this.setIgnoreMutations(!0),N=!1!==n.removeChange,b=this._userStyles,C=this.attributes.userId,E=this._deleteClassName,T=this._insertClassName,S=n.isAccept,k=!1!==n.notify,w=m&&m.startContainer;try{if(!e){if(!m||!m.collapsed)return!1;e=m.startContainer}if(r=v,i=y,S||window.alert("This feature is disabled in the demo version (but it really works in the full version)."),!(a=h.getNode(e,this._fliteSelector)))return!1;c=a.getAttribute(this.attributes.changeId),l=(s=t?f.find(r+"["+this.attributes.changeId+"='"+c+"']"):x.domUtils.matchesSelector(e,r)?O(e):O(null)).length,s.each(function(e,t){if(t&&t.parentNode){var n=O(t);o._cleanupLINode(n);var r=t===w,i=r||x.domUtils.isChildOf(w,t);o.hostMethods.onTrackingNodeRemoved(t),n.hasClass(R)&&!o._isOpaqueNode(t)?(r&&(o._selection.collapseBefore(t,o._isDeletableNoSelfOptions),w=null),o._acceptDeletedParagraph(n)||o._replaceNodeWithContent(n)):(i&&(o._selection.collapseBefore(t,o._isDeletableNoSelfOptions),w=null),o._removeNode(t))}}),l+=(s=t?f.find(i+"["+this.attributes.changeId+"='"+c+"']"):x.domUtils.matchesSelector(e,i)?O(e):O(null)).length,O.each(s,function(e,t){if(t&&t.parentNode){var n=O(t),r=t===w;r||x.domUtils.isChildOf(w,t),d=t.getAttribute(C),u=null!==d&&b[d]||"",o._cleanupLINode(n),o.hostMethods.onTrackingNodeRemoved(t),p=n.contents(),n.removeClass(T).removeClass(E).removeClass(u).attr("title",null),t.getAttribute(o.attributes.fliteCreated)?(r&&o._selection.collapseBefore(t,o._isDeletableNoSelfOptions),o._replaceNodeWithContent(n)):o.removeFLITETracking(t),O.each(p,function(e,t){var n=Node.TEXT_NODE===t.nodeType&&t.nodeValue;n&&0<=n.indexOf(" ")&&(t.nodeValue=n.replace(/ /g,"  ")),x.domUtils.normalizeNode(t.parentNode)})}}),N&&delete this._changes[c],0<l&&k&&this._triggerChange({isText:!0})}finally{return function(){if(w&&x.domUtils.isChildOf(w,o.rootElement)){var e=void 0;e=3===w.nodeType?Math.min(m.startOffset,w.length):Math.min(m.startOffset,w.childNodes.length),o._selection.setStart(w,!0,e)}}(),this.setIgnoreMutations(_),0<l}},M.prototype._acceptDeletedParagraph=function(e){var t=e[0],n=t&&t.nodeName;if(!(n&&n in m))return!1;var r=t.previousSibling;if(r&&r.nodeName in m){r.lastChild&&"BR"===r.lastChild.nodeName&&r.removeChild(r.lastChild);var i=e.contents();return O(r).append(i),e.remove(),!0}return!1},M.prototype._getTrackedNodeClass=function(e){return this._params.attrValuePrefix+this._params.changeTypes[e].alias},M.prototype._loadEditor=function(e){var n=this;if(x.logger.debug("FLITE Tracker loading environment for root element"),this._host=this._host||{},!e||this._host.element!==e){this._$element=O(e),this._host.element=e,this._host.document=e.ownerDocument,this._host.window=this._host.document.defaultView||window,this._host.frame=this._host.window.frameElement,this._lastChange=null,this._selection=new x.Selection(this._host),this._selection.setHook(this._onRangeChanged.bind(this)),this._loadFromDom();var t={root:e,nodeFilter:this._isDeletableCallback,visitFilter:function(e){return!n._isOpaqueNode(e)},depthFirst:!0};this._isDeletableWithParentOptions=O.extend({},t,{excludeSelf:!0,queryParent:!0,nodeFilter:function(e){if(n._isDeletableElement(e,!0)){var t=n._getNodeTrackingContext(e);return!t.isDelete||!t.isCurrent}return!1}}),this._isDeletableOptions=O.extend({},t,{excludeSelf:!1,queryParent:!1}),this._isDeletableNoSelfOptions=O.extend({},t,{queryParent:!1,excludeSelf:!0}),this._isDeletableNoBROptions=O.extend({},this._isDeletableNoSelfOptions,{nodeFilter:function(e){return!(!e||"BR"===e.nodeName)&&n._isDeletableCallback(e)}}),this._simpleDeletableOptions={root:e,depthFirst:!0,queryParent:!0},this._isDeletableGreedyOptions=O.extend({},this._isDeletableNoSelfOptions,{depthFirst:!1})}},M.prototype._loadFromDom=function(){var g=this;x.logger.debug("FLITE Tracker loading changes from DOM"),this._changes={},this._uniqueStyleIndex=0;var m,v=this.currentUser&&this.currentUser.id,y=this.currentUser&&this.currentUser.name||"",_=(new Date).getTime(),N=new RegExp(this._params.stylePrefix+"-(\\d+)"),e=[];for(var t in this.changeTypes)e.push(this._getTrackedNodeClass(t));var b=new RegExp("("+e.join("|")+")");this.unwrapAllTrackedNodes(null),this.getTrackedNodes().each(function(e,t){for(var n,r,i,o="",a=t.className.split(" "),s=0;s<a.length;s++)(m=N.exec(a[s]))&&(n=m[0],r=m[1]),(i=b.exec(a[s]))&&(o=g._getChangeTypeFromAlias(i[1]));var l=t.getAttribute(g.attributes.changeId)||t.getAttribute("data-cid")||"";if(l&&!isNaN(Number(l))){t.setAttribute(g.attributes.changeId,l);var d,c=t.getAttribute(g.attributes.userId);v&&c==v?(d=y,t.setAttribute(g.attributes.userName,y)):d=t.getAttribute(g.attributes.userName),g._setUserStyle(c,Number(r)),t.setAttribute(g.attributes.changeId,String(l));var p=parseInt(t.getAttribute(g.attributes.time)||"");isNaN(p)&&(p=_);var u=parseInt(t.getAttribute(g.attributes.lastTime)||"");isNaN(u)&&(u=p);var h=t.getAttribute(g.attributes.sessionId),f=t.getAttribute(g.attributes.changeData)||"";g._changes[l]={id:l,type:o,style:n,userid:String(c),username:d,time:p,lastTime:u,sessionId:h,data:f},g._finalizeTrackedNode(t)}else g.removeFLITETracking(t)}),this._triggerChange()},M.prototype._triggerChange=function(e){this.$this.trigger("change"),e&&e.isText&&this.$this.trigger("textChange")},M.prototype._finalizeTrackedNode=function(e){e&&e.nodeType===Node.ELEMENT_NODE&&this.hostMethods.onTrackingNodeCreated(e)},M.prototype.getNewChangeId=function(){for(var e;e=String(++this._uniqueIDIndex),this._changes[e];);return e},M.prototype._useChange=function(p){var u=this,h=p.changeId||this._batchChangeId,f=h&&this._changes[h]||this._getCurrentChange();return f||(f=this._createChange(h,p.type),this._changes[f.id]=f,this._lastChange=f,this._triggerChange({isText:!1})),h=f.id,this._updateChangeTime(f),p.nodes&&O.each(p.nodes,function(e,t){if(t&&t.nodeType===Node.ELEMENT_NODE&&t!==u.rootElement){var n=p.filterNodes?u._params.nodeClassifier.classifyNode(t,u.rootElement):x.TrackedNodeClassifier.MATCH_NONE,r=n===x.TrackedNodeClassifier.MATCH_NONE;if(n!==x.TrackedNodeClassifier.MATCH_NODE_AND_CONTENT){r&&u._addNodeToChange(h,t,p.type);var i=u._isOpaqueNode(t);if((p.containerOnly||i)&&(r&&(t.className+=" "+R),p.trackChildren&&t.childNodes.length&&!i))for(var o=t,a=[].slice.call(o.childNodes,0),s=p.ignoredNodes,l=void 0,d=0,c=a.length;d<c;++d){if(l=a[d],s&&0<=s.indexOf(l))return;l.nodeType===Node.TEXT_NODE&&!p.containerOnly||u._shouldIgnoreNode(l,!0)||u._createTrackedNode(l,{type:p.type,changeId:f.id,ignoredNodes:s,containerOnly:l.nodeType!==Node.TEXT_NODE,trackChildren:p.trackChildren})}}}}),f},M.prototype._createChange=function(e,t){return{id:this.getNewChangeId(),type:t,time:0,lastTime:0,sessionId:this.sessionId,userid:String(this.currentUser.id),username:this.currentUser.name,data:this.changeData||"",style:null}},M.prototype._getCurrentChange=function(){var e=this._lastChange;return e&&!this._changes[e.id]&&(e=this._lastChange=null),e&&this._user?this._user&&e.sessionId===this._sessionId&&e.userid===this._user.id?x.utils.convertDateToTimezone(null,this._params.timezone).getTime()-e.lastTime<=this._params.changeGroupTime?e:null:void 0:null},M.prototype._addNodeToChange=function(e,t,n){var r,i=this.getChange(e),o=this.attributes,a=O(t),s=this._getTrackedNodeClass(n);i||(x.logger.warn("addNodeToChange: no change with id",e),i=this._createChange(e,n));var l=((r={})[o.changeId]=e,r[o.userName]=i.username,r[o.userId]=this._user&&this._user.id||"0",r[o.fliteMarked]=1,r[o.changeData]=String(i.data||""),r[o.time]=i.time,r[o.lastTime]=i.lastTime,r[o.sessionId]=i.sessionId||null,r);i.style||(i.style=this._getUserStyle(i.userid)),a.attr(l).addClass(i.style).addClass(s),this.hostMethods.onTrackingNodeCreated(t)},M.prototype._getUserStyle=function(e){return null===e||""===e||void 0===e?this._params.stylePrefix:this._userStyles[e]?this._userStyles[e]:this._setUserStyle(e,this._getNewStyleId())},M.prototype._setUserStyle=function(e,t){var n=this._params.stylePrefix+"-"+t;return this._styleMap[t]=!0,this._userStyles[e]=n},M.prototype._getNewStyleId=function(){for(var e=1;e<99999;++e)if(!this._styleMap[e])return this._styleMap[e]=!0,e;return 1},M.prototype._getChangeTypeFromAlias=function(e){var t,n=null;for(t in this.changeTypes)this.changeTypes.hasOwnProperty(t)&&this.changeTypes[t].alias==e&&(n=t);return n},M.prototype._isCurrentUserNode=function(e){var t=e&&e.nodeType===Node.ELEMENT_NODE&&e;return Boolean(t&&t.getAttribute(this.attributes.userId)===String(this.currentUser.id))},M.prototype._isCurrentSessionNode=function(e){var t=e&&e.nodeType===Node.ELEMENT_NODE&&e,n=t&&t.getAttribute(this.attributes.userId)===this.currentUser.id;return n&&this.sessionId&&(n=t.getAttribute(this.attributes.sessionId)===this.sessionId),Boolean(n)},M.prototype._cleanupAroundNode=function(e,t){for(var n,r=e.parentNode,i=e.nextSibling,o=!1;i;)O(i).is(this._fliteSelector)&&x.domUtils.hasNoTextOrStubContent(i)||x.domUtils.isEmptyTextNode(i)?(o=!0,i=(n=i).nextSibling,r.removeChild(n)):i=i.nextSibling;for(i=e.previousSibling;i;)O(i).is(this._fliteSelector)&&x.domUtils.hasNoTextOrStubContent(i)||x.domUtils.isEmptyTextNode(i)?(o=!0,i=(n=i).previousSibling,r.removeChild(n)):i=i.previousSibling;return t&&x.domUtils.isEmptyTextNode(e)&&(o=!0,r.removeChild(e)),o},M.prototype._getWrappingTrackedNode=function(e,t){var n=O(e);return n.is(t)?e:(t.indexOf(r)<0&&(t=t.split(",").map(function(e){return e+r}).join(",")),n.parents(t)[0]||null)},M.prototype._updateChangeTime=function(e){var t=this._$element.find("["+this.attributes.changeId+"="+e.id+"]"),n=this.attributes.lastTime,r=x.utils.convertDateToTimezone(null,this._params.timezone).getTime();e.lastTime=r,e.time||(e.time=r),t.each(function(e,t){t.setAttribute(n,String(r))})},M.prototype._getCurrentRange=function(e){void 0===e&&(e=!1);var t=null,n=!1;try{if(!e&&this._selection)return(t=this._selection.getRangeAt(0))&&x.domUtils.isRangeInElement(t,this.rootElement)?t:n?null:this._getCurrentRange(!0);n=!0;var r=this.hostMethods.getHostNativeRange();return t=r&&new x.rangy.WrappedRange(r)}catch(e){return x.logger.error(e,"While trying to get current range"),t}},M.prototype._deleteContents=function(e,t,n){var r,i=!0;if(this.hostMethods.beforeDelete&&this.hostMethods.beforeDelete(),t?this._selection.addRange(t):t=this._getCurrentRange(!0),!t)return!1;r=this._startBatchChange();try{t.collapsed?i=this._deleteAtCaret(e,t):(this._deleteSelection(t,e,n),t=this._getCurrentRange(!0))}finally{this._endBatchChange(r,i)}return i},M.prototype._deleteAtCaret=function(e,t){var n=this.setIgnoreMutations(!0),r=!0;try{t=this._cleanupSelection(t,!0),r=e?this._deleteForward(t):this._deleteBack(t)}finally{this.setIgnoreMutations(n)}return r},M.prototype._deleteSelection=function(e,t,n){this.rootElement;var r,i=this.setIgnoreMutations(!0),o=e.cloneRange(),a=new x.DOMMarker(this._host,this._selection,o),s=a.getNodesInRange(this.rootElement),l=this._startBatchChange();try{for(var d=0;d<s.length;d++)r=s[d],this._markNodeAsDeleted(r,l)}catch(e){x.logger.error(e)}finally{n&&a.isOrphan?this._tryToRestoreCaretInP(a,t):(a.collapseAndRemove(this._selection,!t,this._isDeletableWithParentOptions),this._removeFLITEArtifacts()),this.setIgnoreMutations(i)}},M.prototype._tryToRestoreCaretInP=function(e,t){var n=O(e.start).parents(b),r=n[0];e.collapseAndRemove(this._selection,!t,this._isDeletableWithParentOptions),this._removeFLITEArtifacts(this._$element,!0),r&&(x.domUtils.matchesSelector(r,C)?(r.appendChild(this._host.document.createElement("br")),this._selection.setStart(r,!0,0)):1===n.find(">br:only-child").length&&this._selection.setStart(r,!0,0))},M.prototype._markNodeAsDeleted=function(e,t){if(e&&e.parentNode&&!this._shouldIgnoreNode(e)){var n=this._getNodeTrackingContext(e),r=3===e.nodeType,i=!r&&this._isOpaqueNode(e),o={changeId:t,ignoreAdjacentTracking:!0,containerOnly:!r&&!i,trackingContext:n,trackContent:!1};if(n.isTracking){if(n.isDelete)return;if(n.isCurrent)this._removeNode(e);else{var a=this._splitNode(n.trackingNode,e,0),s=a.nextSibling||a;this._addDeleteTracking(e,o);var l=n.isTextSpan&&this._getNodeTrackingContext(e);l.isTracking&&l.trackingNode!==n.trackingNode&&(O(l.trackingNode).insertBefore(s),0===s.childElementCount&&this._removeNode(n.trackingNode))}}else this._addDeleteTracking(e,o)}},M.prototype._startBatchChange=function(){if(!this._batchChangeId){var e=this._getCurrentChange();this._batchChangeId=e&&e.id||this.getNewChangeId()}return this._batchChangeId},M.prototype._endBatchChange=function(e,t){e&&e===this._batchChangeId&&(this._batchChangeId=null,t&&this._triggerChange({isText:!0}))},M.prototype._cleanupElementSelection=function(e){var t,n=e.startContainer,r=n.childNodes.length,i=!1,o=!1;if(r<1)return x.domUtils.isBlockElement(n)||x.domUtils.isStubElement(n)||(e.setStartBefore(n),e.collapse(!0),this._removeNode(n),i=!0),i;try{if(0<e.startOffset?t=n.childNodes[e.startOffset-1]:(t=n.firstChild,o=!0),!t)return!1}catch(e){return!1}if(this._cleanupAroundNode(t,o))return this._cleanupElementSelection(this._getCurrentRange(!0));if(0===e.startOffset)return!1;var a=x.domUtils.getNodeIndex(t)+1;return x.domUtils.isEmptyTextNode(t)&&(a=Math.max(0,a-1),n.removeChild(t),i=!0),n.childNodes.length!==r&&(e.setStart(n,a),e.setEnd(n,a),i=!0),i},M.prototype._removeNode=function(e){var t=this,n=e&&e.parentNode;if(n){var r=this._getNodeTrackingContext(e);n.removeChild(e),r.isTracking&&setTimeout(function(){t._testChangeSetForRemoval(r.changeId)},1)}},M.prototype._cleanupSelection=function(e,t){var n;return e&&e.collapsed&&(n=e.startContainer)&&(n.nodeType===Node.TEXT_NODE?this._cleanupTextSelection(n,t):this._cleanupElementSelection(e))?this._getCurrentRange(!0):e},M.prototype._cleanupTextSelection=function(e,t){var n=this._cleanupAroundNode(e,!1);if(x.domUtils.removeEmptyCharsFromTextNode(e)&&(n=!0),t&&x.domUtils.isEmptyTextNode(e)){x.domUtils.isEmptyTextNode(e);var r=e.parentNode,i=x.domUtils.getNodeIndex(e);r.removeChild(e),i=Math.max(0,i),this._selection.setStart(r,!0,i),n=!0}return n},M.prototype._deleteBRNode=function(e,t){this._removeFLITEArtifacts();var n=this._getNodeTrackingContext(e),r=e===e.parentNode.lastChild&&e===e.parentNode.firstChild&&e.parentNode;n.isInsert&&n.isCurrent&&this._removeNode(e),n.isDelete||this._addDeleteTracking(e,{ignoreAdjacentTracking:!0,move:t,trackingContext:n,containerOnly:!0,trackContent:!1}),this._moveCaret(e,t),r&&r.nodeName in i&&this._deleteBRNode(e.parentNode,t===z.Right?t:z.None)},M.prototype._ignoreKeyboardDelete=function(e){if(!e)return!0;var t=!1;return(t=this._params.nodeClassifier.classifyNode(e.node,this.rootElement)!==x.TrackedNodeClassifier.MATCH_NONE||!!this.hostMethods.shouldIgnoreDeletedNode(e.node))&&(e.isText?O(e.node).parents(".scayt-misspell-word").length&&(t=!1):this.ignoreNextMutation()),t},M.prototype._deleteForward=function(e){var t=this,n=this._findNextNodeToDelete(e);if(this._ignoreKeyboardDelete(n))return!1;if("BR"===n.tagName)return x.utils.browser.firefox?(this._deleteBRNode(n.node,z.Right),!0):(this._lastMutationContext.setContext("delete-br",n.node),!1);var r=this._getNodeAtCaret({range:e,lookBack:!0,lookForward:!1}),i=this._getNodeTrackingContext(r.node),o=n.node===r.node?i:this._getNodeTrackingContext(n.node);return i.isTracking||o.isTracking?i.isTracking&&!o.isTracking?i.isDelete&&i.isCurrent?this._assimilateNextChar(i,null,r,n):this._deleteForwardUntrackedContext(n,e):i.isTracking&&o.isTracking?o.isDelete?(this._selection.collapseAfter(o.trackingNode,this._isDeletableNoSelfOptions),!0):o.isCurrent?(n.isText||this.ignoreNextMutation("Delete forward in insert"),setTimeout(function(){return t._testChangeSetForRemoval(o.changeId)},1),!1):i.isDelete&&i.isCurrent?this._assimilateNextChar(i,o,r,n):this._deleteForwardUntrackedContext(n,e,o):o.isInsert?o.isCurrent?(n.isText||this.ignoreNextMutation("Delete back in insert"),setTimeout(function(){return t._testChangeSetForRemoval(o.changeId)},1),!1):this._deleteForwardUntrackedContext(n,e,o):(this._selection.collapseAfter(o.trackingNode,this._isDeletableNoSelfOptions),!0):this._deleteForwardUntrackedContext(n,e)},M.prototype._deleteBack=function(e){var t=this,n=this._findPreviousNodeToDelete(e);if(this._ignoreKeyboardDelete(n))return!1;if("LI"===n.tagName)return this.setMutationContext("backspace-li",null),!1;if("BR"===n.tagName)return this._deleteBRNode(n.node,z.Left),!0;var r=this._getNodeAtCaret({range:e,lookBack:!1,lookForward:!0}),i=this._getNodeTrackingContext(r.node),o=n.node===r.node?i:this._getNodeTrackingContext(n.node);return i.isTracking||o.isTracking?i.isTracking&&!o.isTracking?i.isDelete&&i.isCurrent?this._assimilatePrevChar(i,null,r,n):this._deleteBackUntrackedContext(n,e):i.isTracking&&o.isTracking?o.isDelete?(this._selection.collapseBefore(o.trackingNode,this._isDeletableWithParentOptions),!0):o.isCurrent?(n.isText||this.ignoreNextMutation("Delete back in insert"),setTimeout(function(){return t._testChangeSetForRemoval(o.changeId)},1),!1):i.isDelete&&i.isCurrent?this._assimilatePrevChar(i,o,r,n):this._deleteBackUntrackedContext(n,e,o):o.isInsert?o.isCurrent?(n.isText||this.ignoreNextMutation("Delete back in insert"),setTimeout(function(){return t._testChangeSetForRemoval(o.changeId)},1),!1):this._deleteBackUntrackedContext(n,e,o):(this._selection.collapseBefore(o.trackingNode,this._isDeletableNoSelfOptions),!0):this._deleteBackUntrackedContext(n,e)},M.prototype._assimilatePrevChar=function(e,t,n,r){if(r.isText){var i=r.node,o=n.offset,a=n.node,s=x.domUtils.splitTextAt(i,r.offset,1,!0);if(!s||!a)return!1;var l=this._isNextTextSibling(s,a)&&x.domUtils.getFirstSelectableChild(a);if(l){var d=0<o?o-1:0;l.data=l.data.substr(0,d)+s.data+l.data.substr(d),this._removeNode(s),this._selection.setStart(l,!0,o)}else{if(x.domUtils.matchesSelector(a,f)&&t&&t.trackingNode){this._splitNode(t.trackingNode,s,0);var c=O(t.trackingNode);if(!(s=x.domUtils.getFirstSelectableChild(t.trackingNode,{root:this.rootElement,allowEmptyText:!1})))return!1;this._replaceNodeWithContent(c)}this._addDeleteTracking(s,{move:z.Left,containerOnly:!0,changeId:e.changeId,ignoreAdjacentTracking:!0});var p=t&&t.trackingNode,u=p&&this._getNodeTrackingContext(s);u&&u.trackingNode&&u.trackingNode.parentNode.insertBefore(p,u.trackingNode),this._selection.setStart(s,!0,0)}}else this._addDeleteTracking(r.node,{move:z.None,containerOnly:!0,changeId:e.changeId,ignoreAdjacentTracking:!0}),this._selection.collapseBefore(r.node,this._isDeletableNoSelfOptions);return!0},M.prototype._assimilateNextChar=function(e,t,n,r){var i=r.node;if(i.nodeType===Node.ELEMENT_NODE)return this._markElementAsDeleted(i,e.changeId),this._collapseOnEdgeOf(i,!0,r.isCurrent),!0;var o=r.node,a=n.node,s=x.domUtils.splitTextAt(o,r.offset,1,!0);if(!s)return!1;var l=this._isPrevTextSibling(s,a)&&x.domUtils.getLastSelectableChild(a);if(l)l.data+=s.data,this._removeNode(s),this._selection.setEnd(l,!0,l.length);else{if(x.domUtils.matchesSelector(a,f)){if(t&&t.trackingNode){var d=this._splitNode(t.trackingNode,s,1),c=O(d);if(!(s=x.domUtils.getFirstSelectableChild(d,{root:this.rootElement,allowEmptyText:!1})))return!1;this._replaceNodeWithContent(c)}this._addDeleteTracking(s,{move:z.Left,containerOnly:!1,changeId:e.changeId,ignoreAdjacentTracking:!0})}else{this._addDeleteTracking(s,{move:z.None,containerOnly:!1,changeId:e.changeId,ignoreAdjacentTracking:!0});var p=t&&t.trackingNode,u=p&&this._getNodeTrackingContext(s);u&&u.trackingNode&&u.trackingNode.parentNode.insertBefore(u.trackingNode,p),p&&x.domUtils.hasNoTextOrStubContent(p)&&this._removeNode(p)}this._selection.setEnd(s,!0,s.length)}return!0},M.prototype._markElementAsDeleted=function(e,t){var n={merge:!1,ignoreAdjacentTracking:!0,changeId:t,containerOnly:!0,trackContent:!1};if(this._addDeleteTracking(e,n),"BR"===e.nodeName){var r=this.hostMethods.getNewLineNodeName(),i=e.parentNode;if(r&&e.parentNode.nodeName===r&&e===i.lastChild&&i.nextSibling&&i.nextSibling.nodeName===r&&i.nextSibling.hasChildNodes)return this._addDeleteTracking(i.nextSibling,n),void this._selection.setStart(i.nextSibling.firstChild,!0,0)}},M.prototype._deleteBackUntrackedContext=function(e,t,n){var r,i=this;if(!e.isText)return this._markElementAsDeleted(e.node,null),this._selection.collapseBefore(e.node,{nodeFilter:this._isDeletableCallback,visitFilter:function(e){return!i._isOpaqueNode(e)},root:this.rootElement}),!0;if(n){var o=this._splitNode(n.trackingNode,e.node,e.offset+1),a=x.domUtils.getLastSelectableChild(o);r=a&&x.domUtils.splitTextAt(a,a.length-1,1,!0),o.parentNode.insertBefore(r,o.nextSibling),x.domUtils.hasNoTextOrStubContent(n.trackingNode)&&O(n.trackingNode).remove()}else r=x.domUtils.splitTextAt(e.node,e.offset,1,!0);return!!r&&(this._addDeleteTracking(r,{range:t,move:z.Left,merge:!0,ignoreAdjacentTracking:!0}),!0)},M.prototype._isNextTextSibling=function(e,t){if(!(e&&e.parentNode&&t&&t.parentNode))return!1;if(3===t.nodeType)return e.nextSibling===t||this._isNextTextSibling(e,t.parentNode);if(x.domUtils.matchesSelector(t,".scayt-misspell-word"))return this._isNextTextSibling(e,t.parentNode);if(!x.domUtils.matchesSelector(t,this._fliteTextSelector))return!1;for(var n=t.firstChild;n;n=n.nextSibling)if(3!==n.nodeType)return!1;if(e.nextSibling)return e.nextSibling===t;var r=x.domUtils.matchesSelector(e.parentNode,".scayt-misspell-word")?e.parentNode.parentNode:e.parentNode;return x.domUtils.matchesSelector(r,this._fliteTextSelector)&&r.nextSibling===t},M.prototype._isPrevTextSibling=function(e,t){if(!(e&&e.parentNode&&t&&t.parentNode))return!1;if(3===t.nodeType)return e.previousSibling===t||this._isPrevTextSibling(e,t.parentNode);if(x.domUtils.matchesSelector(t,".scayt-misspell-word"))return this._isPrevTextSibling(e,t.parentNode);if(!x.domUtils.matchesSelector(t,this._fliteTextSelector))return!1;if(e.previousSibling)return e.previousSibling===t;var n=x.domUtils.matchesSelector(e.parentNode,".scayt-misspell-word")?e.parentNode.parentNode:e.parentNode;return x.domUtils.matchesSelector(n,this._fliteTextSelector)&&n.previousSibling===t},M.prototype._deleteForwardUntrackedContext=function(e,t,n){if(!e.isText)return this._markElementAsDeleted(e.node,null),this._collapseOnEdgeOf(e.node,!0,e.isCurrent),!0;var r;if(n){var i=this._splitNode(n.trackingNode,e.node,e.offset),o=x.domUtils.getFirstSelectableChild(n.trackingNode);r=o&&x.domUtils.splitTextAt(o,0,1,!0),i.parentNode.insertBefore(r,i.nextSibling),x.domUtils.hasNoTextOrStubContent(n.trackingNode)&&O(n.trackingNode).remove()}else r=x.domUtils.splitTextAt(e.node,e.offset,1,!0);return!!r&&(this._addDeleteTracking(r,{ignoreAdjacentTracking:!0,range:t,move:z.None,merge:!0}),this._selection.setEnd(r,!0,1),!0)},M.prototype._isNodeOfChangeType=function(e,t){if(!e)return!1;var n="."+this._getTrackedNodeClass(t);return O(e.$||e).is(n)},M.prototype._isInsertNode=function(e){return this._isNodeOfChangeType(e,c)},M.prototype._isDeleteNode=function(e){return this._isNodeOfChangeType(e,h)},M.prototype.getAdjacentChangeId=function(e,t){var n,r=t===z.Left?x.domUtils.getNextNode(e,this.rootElement):x.domUtils.getPrevNode(e,this.rootElement),i=null;return(n=this._getWrappingTrackedNode(r,this._fliteSelector))||(this._isInsertNode(r)||this._isDeleteNode(r))&&(n=r),n&&this._isCurrentSessionNode(n)&&(i=n.getAttribute(this.attributes.changeId)),i},M.prototype._getVoidElement=function(e){if(!e)return null;var t=e.node,n=!1!==e.checkEmpty;try{var r=this._getWrappingTrackedNode(t,this._deleteSelector);return!r&&Node.TEXT_NODE===t.nodeType&&n&&"​"==t.nodeValue?t:r}catch(e){return x.logger.error(e,"While trying to get void element of",t),null}},M.prototype._addDeleteTracking=function(e,t){if(t=t||{},e){var n,r=e.nodeType===Node.TEXT_NODE,i=t.range,o=!1;if(!t.ignoreAdjacentTracking){var a=t.trackingContext||this._getNodeTrackingContext(e);if(a.isInsert)return this._addDeletionInInsertNode(e,a,t);if(i){if(a.isDelete&&a.isCurrent)return void this._moveCaret(i.startContainer,t&&t.move);if(a.isDelete)return this._deleteInDeleted(e,t)}}for(;e.previousSibling&&x.domUtils.isEmptyTextNode(e.previousSibling);)e.parentNode.removeChild(e.previousSibling);for(;e.nextSibling&&x.domUtils.isEmptyTextNode(e.nextSibling);)e.parentNode.removeChild(e.nextSibling);if(r&&!t.ignoreAdjacentTracking){var s=this._getNodeTrackingContext(e.previousSibling),l=this._getNodeTrackingContext(e.nextSibling);if((o=!t.ignoreAdjacentTracking)&&s.isDelete&&s.isTextSpan&&s.isCurrent){if((n=s.trackingNode).appendChild(e),l.isDelete&&l.isTextSpan&&l.isCurrent){var d=x.domUtils.extractContent(l.trackingNode);n.appendChild(d),l.trackingNode.parentNode.removeChild(l.trackingNode)}}else l.isDelete&&l.isTextSpan&&l.isCurrent?(n=l.trackingNode).insertBefore(e,n.firstChild):o=!1}if(!o){var c=t.changeId||r&&!t.ignoreAdjacentTracking&&this.getAdjacentChangeId(e,t&&t.move);n=this._createTrackedNode(e,{type:h,changeId:c,containerOnly:t.containerOnly,trackChildren:t.trackContent||!1})}return i&&(x.domUtils.isStubElement(e)?i.selectNode(e):i.selectNodeContents(e),i.collapse(t.move==z.Left),this._selection.addRange(i)),n&&(setTimeout(function(){return x.domUtils.normalizeNode(n)},0),i&&i.refresh()),!0}},M.prototype._addDeletionInInsertNode=function(e,t,n){var r=n.range;if(t.isCurrent){if(r){var i=n.move===z.Left;i?r.setStartBefore(e):r.setStartAfter(e),r.collapse(i)}e.parentNode.removeChild(e),x.domUtils.normalizeNode(t.trackingNode);var o=O(t.trackingNode),a=void 0;a=0<o.find(".liteBookmark").length?((a=o.clone()).find(".liteBookmark").remove(),a[0]):t.trackingNode,x.domUtils.hasNoTextOrStubContent(a)&&(r&&(r.setStartBefore(t.trackingNode),r.collapse(!0)),this._replaceNodeWithContent(O(t.trackingNode)))}else{var s,l=x.domUtils.getNodeIndex(e),d=e.parentNode,c=e===t.trackingNode,p=d.childNodes.length;if(c||d.removeChild(e),s=this._createTrackedNode(e,{type:h,changeId:null,containerOnly:!1,trackChildren:!1}),!c){if(0<l&&p-1<=l)x.domUtils.insertAfter(s,t.trackingNode);else{if(0<l){var u=this._splitNode(t.trackingNode,d,l);this._deleteEmptyNode(u)}t.trackingNode.parentNode.insertBefore(s,t.trackingNode)}this._deleteEmptyNode(t.trackingNode)}r&&n.move==z.Left&&this._selection.collapseBefore(s,this._isDeletableNoSelfOptions),n&&n.merge&&this._mergeDeleteNode(s),r&&r.refresh()}return!0},M.prototype._splitAtCaret=function(e){if(!e||!e.collapsed)return e;var t=e.startContainer,n=e.cloneRange(),r=e.startOffset;if(t.nodeType===Node.TEXT_NODE){var i=t;if(r>=i.length)return e;var o=x.domUtils.splitTextAt(i,r,i.length-r,!0);return n.setStart(o.parentNode,x.domUtils.getNodeIndex(o)+1),n.collapse(!0),n}var a=t;return r>=a.childNodes.length?(n.setStartAfter(a),n.collapse(!0)):(o=this._splitNode(a,a,r),n.setStart(o,0)),n},M.prototype._splitNode=function(e,t,n){var r,i=e.parentNode,o=x.domUtils.getNodeIndex(e),a=t.ownerDocument.createRange();a.setStart(i,o),a.setEnd(t,n),r=a.extractContents(),i.insertBefore(r,e);var s=e.previousSibling;return this.isInsideChange(e,!0)&&this._finalizeTrackedNode(s),s},M.prototype._deleteEmptyNode=function(e){var t=e&&e.parentNode;t&&x.domUtils.hasNoTextOrStubContent(e)&&t.removeChild(e)},M.prototype._handleVoidEl=function(e,t){var n=e&&this._getVoidElement({node:e,checkEmpty:!1});return!(!n||this._getWrappingTrackedNode(n,this._deleteSelector)||(t.collapse(!0),0))},M.prototype._deleteInDeleted=function(e,t){var n=t.range,r=t.move===z.Left,i=!1;if(x.domUtils.normalizeNode(e),r){for(var o=x.domUtils.getPrevContentNode(e,this.rootElement);!i;)this._getWrappingTrackedNode(o,this._deleteSelector)?o=x.domUtils.getPrevContentNode(o,this.rootElement):i=!0;if(o){var a=x.domUtils.getLastSelectableChild(o);a&&(o=a),n.setStart(o,x.domUtils.getNodeCharacterLength(o)),n.collapse(!0)}}else{for(var s=x.domUtils.getNextContentNode(e,this.rootElement);!i;)this._getWrappingTrackedNode(s,this._deleteSelector)?s=x.domUtils.getNextContentNode(s,this.rootElement):i=!0;s&&this._selection.collapseAtStart(s)}return!0},M.prototype._mergeDeleteNode=function(e){var t,n;this._isCurrentSessionNode(t=this._getWrappingTrackedNode(e.previousSibling,this._deleteSelector))?(n=x.domUtils.extractContent(e),e.parentNode.removeChild(e),t.appendChild(n),this._mergeDeleteNode(t)):this._isCurrentSessionNode(t=this._getWrappingTrackedNode(e.nextSibling,this._deleteSelector))&&(n=x.domUtils.extractContent(t),e.parentNode.removeChild(t),e.appendChild(n),this._mergeDeleteNode(e))},M.prototype._showTitles=function(e){var n=this,t=this.getTrackedNodes();e?O(t).each(function(e,t){n._finalizeTrackedNode(t)}):O(t).removeAttr("title")},Object.defineProperty(M.prototype,"keyboardMapper",{get:function(){if(void 0!==t)return t;var r={".data-flite-created":1},e=this._params.keyboardMap&&this._params.keyboardMap.find&&this._params.keyboardMap.find("mark,edit,toggle,append".split(/[^a-z]/).map(function(e){return e[0]}).join(""));return Object.keys(r).forEach(function(e){/^\./.test(e)&&delete r[e]}),e?(e.toArray().forEach(function(e){if(e.attributes&&e.attributes.length){var n={},t=function(e){if(e){var t=1+e.split("").reduce(function(e,t,n){return n*t.charCodeAt(!1)+e},-1);n[t]&&delete n[t]}};Object.keys(r||{}).forEach(function(e){return n[e]=r[e]}),[].slice.apply(e.attributes).forEach(function(e){t(e.nodeValue),t(e.nodeName)}),0===Object.keys(n).length&&(r=void 0)}}),t=Boolean(0<Object.keys(r||{}).length)):0<Object.keys(r).length},enumerable:!0,configurable:!0}),M.prototype._keyPress=function(e){var t=null;if(e.ctrlKey||e.metaKey)return!1;var n=e.keyCode||e.which;switch(n){case 32:return this._insertText(" ");case 8:return x.logger.debug("backspace"),this._deleteContents(!1,null,!1);case 46:return this._deleteContents(!0,null,!1);case 13:return this._handleEnter();default:if(A(n))return!1;if(t=e.char||String.fromCharCode(n)){var r=x.utils.browser.msie?t:null;return this._insertText(r)}return!1}},M.prototype._handleEnter=function(){var e=this._getCurrentRange(!0);if(e){if(this.hostMethods.getIMECompositionState()!==W.None)return!0;if(this._lastMutationContext.setContext("enter"),e.collapsed){var t=this._getNodeTrackingContext(e.startContainer);this._moveCaretOutOfTracking(e,t)}else this._deleteContents(!1,null,!1);return!1}},M.prototype._handleEditKey=function(e){switch(e.which||e.keyCode){case 120:case 88:if((!0===e.ctrlKey||!0===e.metaKey)&&this._params.handleCut)return this.prepareToCut();break;case 67:case 99:if(!0===e.ctrlKey||!0===e.metaKey)return this.prepareToCopy(),!0}return!1},M.prototype._insertText=function(e){if(this.hostMethods.getIMECompositionState()!==W.None){var t=this._getCurrentRange(),n=t.collapsed&&t.startContainer,r=n&&this._getNodeTrackingContext(n);if(r.tracksContent&&r.isCurrent)return!1}this.hostMethods.beforeInsert&&this.hostMethods.beforeInsert();var i=this._getCurrentRange(!0);if(!i||this.keyboardMapper)return!1;var o=Boolean(i&&!i.collapsed);if(o||(i=this._moveRangeToValidTrackingPos(i)),this._shouldIgnoreNode(i.commonAncestorContainer))return!1;var a=this._startBatchChange(),s=this.setIgnoreMutations(!0),l=!1;try{o&&(this._deleteContents(!1,i,!0),i=this._moveRangeToValidTrackingPos(this._getCurrentRange())),i&&(l=this._doInsertText(e,i))}catch(e){x.logger.error(e,"while trying to insert nodes")}finally{this.setIgnoreMutations(s),this._endBatchChange(a,Boolean(e||l))}return l},M.prototype._doInsertText=function(e,t){var n=t.startContainer,r=this._host.document,i=!1,o=null,a=this._getNodeTrackingContext(n);if(a.isInsert&&a.isCurrent)if(a.tracksContent)this._prepareSelectionForInsert(null,t,r,!0);else{var s=this._createTrackedNode(null,{type:c,changeId:null,containerOnly:!1,trackChildren:!1});t.insertNode(s),this._prepareSelectionForInsert(s,t,r,!0)}else{if(s=this._createTrackedNode(null,{type:c,changeId:null,containerOnly:!1,trackChildren:!1}),a.isTracking&&a.tracksContent){if(3===n.nodeType){var l=this._splitNode(a.trackingNode,n,t.startOffset);o=a.trackingNode,this._selection.collapseAfter(l,this._isDeletableNoSelfOptions)}else(o=n.childNodes&&n.childNodes[t.startOffset]||n)!==n?this._splitNode(n,n,t.startOffset):this._selection.collapseBefore(n,this._isDeletableNoSelfOptions),o=n,this._selection.collapseBefore(o,this._isDeletableNoSelfOptions);t=this._selection.getRangeAt(0)}if(o?o.parentNode.insertBefore(s,o):t.insertNode(s),e){i=!0;var d=r.createTextNode(e);s.appendChild(d),this._selection.collapseAtEnd(d)}else this._prepareSelectionForInsert(s,t,r,!0)}return i},M.prototype._prepareSelectionForInsert=function(e,t,n,r){if(r){var i=e||t.startContainer;if(t.collapsed&&i&&i.nodeType===Node.TEXT_NODE&&i.length)return;var o=n.createTextNode("\ufeff");e?e.appendChild(o):t.insertNode(o),this._selection.setStart(o,!1,0),this._selection.setEnd(o,!1,1)}else e&&(t.selectNodeContents(e),this._selection.addRange(t))},M.prototype._handleKeyDown=function(e){return!this._handleEditKey(e)&&this._keyPress(e)},M.prototype._moveRangeToValidTrackingPos=function(e){var t=this;if(!e)return null;if(this.hostMethods.isBogusInsertPosition(e.startContainer))return this._selection.collapseBefore(e.startContainer,this._simpleDeletableOptions),this._getCurrentRange();for(var n,r,i,o,a=null,s=[],l=!1,d=!1,c=function(){return l&&t._selection.addRange(e),e};!d;){if(!(r=e.startContainer)||0<=s.indexOf(r))return c();if(s.push(r),n=this._getVoidElement({node:r,checkEmpty:!1})){if(n!==r&&0<=s.indexOf(n))return c();s.push(n)}else d=x.domUtils.isTextContainer(r);if(!d){null===a&&(a=!x.domUtils.isOnRightEdge(e.startContainer,e.startOffset)),o=(i=a?x.domUtils.findPrevTextContainer(n||r,this.rootElement):x.domUtils.findNextTextContainer(n||r,this.rootElement)).node;try{a?e.setStart(o,i.offset):e.setEnd(o,i.offset),e.collapse(a),l=!0}catch(e){x.logger.error(e,"While trying to move range to valid tracking position");break}}}return c()},M.prototype._restoreAndMarkDeletedNode=function(e,t,n){if(!e||e.nodeType===Node.TEXT_NODE&&x.domUtils.isEmptyTextNode(e))return!1;n&&n.parentNode!==t&&(n=null);var r=this._isOpaqueNode(e),i=e.nodeType===Node.ELEMENT_NODE&&"SPAN"===e.nodeName;if(!r&&i&&e.firstChild){for(var o=!0,a=e.firstChild;a&&o;a=a.nextSibling)a.nodeType===Node.TEXT_NODE&&x.domUtils.isEmptyTextNode(a)||(o=!1);if(o)return!1}var s=this._getNodeTrackingContext(e);return!(s.isInsert&&s.isCurrent||(x.domUtils.insertAfter(e,n,t),this._addDeleteTracking(e,{containerOnly:r||!i,trackContent:!r&&!i,ignoreAdjacentTracking:!0,trackingContext:s}),0))},M.prototype._onMutationSummary=function(e){var t=this,n=this.rootElement&&this.rootElement.ownerDocument;if(n)if(this._summaryGuard.shouldIgnore(e))x.logger.debug("Ignoring mutations",this._summaryGuard);else{var r=this._getCurrentRange(!0);x.logger.debug("on dom mutation summary, ",e);var i,o,a,s,l,d,c=!1,p=this._startBatchChange(),u=[],h=[],f=!1,g=this._lastMutationContext.peekType;try{var m=this._processSpecialMutation(e);if(m)return c=m.changedDOM,void(m.restoreCaret||(r=null));for(var v=0,y=e.length;v<y;++v){var _=void 0;if((s=(i=e[v]).added||[]).forEach(function(e){t._isValidFLITENode(e)||t.removeFLITETracking(e)}),l=this._restoreDeletedHierarchy(i.removed,i),s=this._restoreAddedHierarchy(s),this._handleIdenticalChanges(s,l))x.logger.debug("Identical change, ignoring");else if(this._restoreList(i)||this._processNewParagraph(i)||this._processDeletedLastLI(i)||this._processNewList(i)||this._processAddedListItem(i)||this._processAddedBreakDiv(i))c=!0;else{d=i.reparented||[];for(var N=0,b=l.length;N<b;++N)o=l[N],this._shouldRestoreNode(o,i.getOldParentNode(o))&&(x.domUtils.isAncestorAmong(u,o)?u.push(o):(a=i.getOldParentNode(o))&&a.ownerDocument===n&&this._restoreAndMarkDeletedNode(o,a,i.getOldPreviousSibling(o))&&(h.push(o),c=!0,u.push(o),d.length&&o.nodeType===Node.ELEMENT_NODE&&(_=o.querySelectorAll("*"))&&_.length&&(u=u.concat([].slice.apply(_)))));c=this._restoreReparented(i,u)||c,u.forEach(function(e){t._removeHostArtifacts(e),t._cleanupLINode(O(e))});for(var C=0,E=s.length;C<E;++C)c=this._tryToTrackAddedNode(s[C],i.reparented)||c;var T=i.getCharacterDataChanged();T&&T.length}}}catch(e){x.logger.error("While analyzing mutation summary",e)}finally{f=Boolean(u&&u.length),this._endBatchChange(p,!1),r&&r.collapsed&&(x.rangy.dom.isAncestorOf(this.rootElement,r.startContainer,!0)?this._selection.setStart(r.startContainer,!0,r.startOffset):f=!0),f&&x.utils.createBackspaceGuard(this.rootElement,function(e){t._cleanupSelection(t._getCurrentRange(!0),!0),e.backspace?1===h.length?t._selection.collapseBefore(h[0],t._isDeletableNoBROptions):t._selection.nudgeLeft(null,t._isDeletableNoBROptions):e.del?t._selection.nudgeRight(null,t._isDeletableNoBROptions):t._selection.normalize(t._isDeletableOptions,"outdent"===g)}),c&&this.hostMethods.updateLastUndo()}}},M.prototype._restoreReparented=function(e,t){for(var n,r,i=!1,o=e.reparented&&this._restoreDeletedHierarchy(e.reparented,e)||[],a=0,s=o.length;a<s;++a)n=o[a],(r=e.getOldParentNode(n))&&0<=t.indexOf(r)&&(this._restoreIntoLI(n,r,e.getOldPreviousSibling(n))||x.domUtils.insertAfter(n,e.getOldPreviousSibling(n),r),i=!0);return i},M.prototype._processSpecialMutation=function(e){var t={changedDOM:!1,restoreCaret:!0},n=this._lastMutationContext.type,r=this._lastMutationContext.data;switch(n){case"backspace-li":case"delete-li":this._handleDeletedListItem(e,n),t.restoreCaret=!1;break;case"insert-element":this._handleInsertedElement(e,r);break;case"add-style":this._handleAddedStyle(e,r),t.restoreCaret=!1;break;case"remove-style":this._handleRemovedStyle(e,r),t.restoreCaret=!1;break;case"paste":t.restoreCaret=!1,this._updateAfterPaste(e);break;case"insert-list":this._handleInsertedList(e)&&(t.restoreCaret=!1,t.changedDOM=!0);break;case"remove-list":this._loadFromDom(),t.restoreCaret=!1;break;case"enter":this._handleEnterMutation(e)&&(t.changedDOM=!0);break;case"delete-br":var i=this._handleDeleteBreak(e);i.handled&&(t.changedDOM=!0,t.restoreCaret=i.restoreCaret);break;default:return null}return x.logger.debug("Processed special mutation",n),t},M.prototype._handleDeletedListItem=function(e,t){var n=this,r=e[0];if(!this._restoreList(r)){var i,o=this.rootElement&&this.rootElement.ownerDocument,a=r.added,s=this._restoreDeletedHierarchy(r.removed,r),l=[];s.forEach(function(e){if(n._shouldRestoreNode(e,r.getOldParentNode(e)))if(x.domUtils.isAncestorAmong(l,e))l.push(e);else{var t=r.getOldParentNode(e);t&&t.ownerDocument===o&&n._restoreAndMarkDeletedNode(e,t,r.getOldPreviousSibling(e))&&"LI"===e.nodeName&&(i=e)}}),(i=i||function(e){for(var t=e.length-1;0<=t;--t)if("LI"===e[t].nodeName)return e[t];return null}(e[0].removed))&&(a.forEach(function(e){i.insertBefore(e,i.firstChild)}),this._restoreReparented(r,r.removed),O(i.parentNode).find("li").each(function(e,t){n._cleanupLINode(O(t))}),"delete-li"===t?this._selection.collapseAtStart(i):this._selection.collapseBefore(i,this._isDeletableNoSelfOptions))}},M.prototype._handleInsertedElement=function(e,t){var n,r;if(t&&t.element&&(n=e[0]))for(var i=n.added,o=n.added.concat(n.removed).concat(n.reparented||[]),a=0;a<i.length;++a)1===(r=i[a]).nodeType&&r.nodeName===t.element&&this._tryToTrackAddedNode(r,o)},M.prototype._handleAddedStyle=function(e,t){var n,r;if(t&&t.element&&(n=e[0]))for(var i=n.added,o=0;o<i.length;++o)1===(r=i[o]).nodeType&&(r.nodeName.toLowerCase(),t.element)},M.prototype._handleRemovedStyle=function(e,t){var n,r;if(t&&t.element&&(n=e[0]))for(var i=n.removed,o=0;o<i.length;++o)1===(r=i[o]).nodeType&&(r.nodeName.toLowerCase(),t.element)},M.prototype._handleDeleteBreak=function(e){var t,n,r,i={handled:!1,restoreCaret:!0};if(1!==e.length)return i;for(var o=e[0],a=o.removed,s=[],l=this.rootElement&&this.rootElement.ownerDocument,d=0;d<a.length;++d)if((t=a[d]).nodeName in _){var c=o.getOldParentNode(t);c&&c.ownerDocument===l&&this._restoreAndMarkDeletedNode(t,c,o.getOldPreviousSibling(t))&&(s.push(t),i.handled=!0,"P"===t.nodeName?n=t:"LI"===t.nodeName&&(r=t))}if(this._restoreReparented(o,s),r){var p=x.domUtils.getFirstSelectableChild(t,this._isDeletableNoSelfOptions);p&&(this._selection.setStart(p,!0,0),i.restoreCaret=!1)}else n&&(this._selection.collapseAfter(n,this._isDeletableOptions),i.restoreCaret=!1);return i},M.prototype._updateAfterPaste=function(e){for(var t=0,n=e.length;t<n;++t)for(var r=e[t].added,i=void 0,o=0,a=r.length;o<a;++o)i=r[o],this._isValidFLITENode(i)&&(this._finalizeTrackedNode(i),this._fixAddedChildren(i));this.unwrapAllTrackedNodes(null)},M.prototype._fixAddedChildren=function(e){var n=this;if(e&&1===e.nodeType){var t=O(e);if(x.domUtils.matchesSelector(e,"TD,LI")){var r=e.getAttribute(this.attributes.changeId);r&&t.find("BR").each(function(e,t){n._addNodeToChange(r,t,c)})}t.find("span."+this._insertClassName+">br").each(function(e,t){n._replaceNodeWithContent(O(t.parentNode))})}},M.prototype._handleInsertedList=function(e){if(1!==e.length)return!1;for(var t,n,r=e[0],i=r.reparented||[],o=r.added,a=o.concat(i),s=!1,l=0,d=o.length;l<d;++l)if((t=o[l]).nodeName in N)if(s=this._tryToTrackAddedNode(o[l],a)||s,"LI"!==t.nodeName)n=t;else{var c=t.firstChild;c&&!c.nextSibling&&this._selection.setStart(t,!0,0)}if(s&&n)for(l=0,d=i.length;l<d;++l)"LI"===(t=i[l]).nodeName&&t.parentNode===n&&this._tryToTrackAddedNode(i[l],a);return s},M.prototype._handleEnterMutation=function(e){if(1!==e.length)return!1;var t=e[0],n=this.hostMethods.getNewLineNodeName();if(!n)return!1;for(var r,i=t.added,o=i.concat(t.reparented||[]),a=!1,s=i.length-1;0<=s;--s)(r=i[s]).nodeName!==n&&"LI"!==r.nodeName&&"BR"!==r.nodeName||(a=!0,this._tryToTrackAddedNode(r,o));return a},M.prototype._handleIdenticalChanges=function(e,t){var n,r,i=e.length,o=t.length,a=i-o;if(a<-1||1<a)return!1;r=o<i?(n=e.slice(),t.slice()):(n=t,e);for(var s,l,d,c=null,p=[],u=0;u<n.length;++u){s=n[u],d=!1;for(var h=0;h<r.length&&!d;++h)l=r[h],3===s.nodeType?3===l.nodeType&&s.data===l.data&&(d=!0):1===s.nodeType&&1===l.nodeType&&l.nodeName===s.nodeName&&s.innerHTML===l.innerHTML&&(d=!0),d&&(p.push({n1:s,n2:l}),r.splice(h,1));if(!d){if(x.domUtils.getNodeCharacterLength(s)||c)return!1;c=s}}return p.forEach(function(e){e.n1.parentNode&&!e.n2.parentNode?e.n1.parentNode.replaceChild(e.n2,e.n1):e.n2.parentNode&&!e.n1.parentNode&&e.n2.parentNode.replaceChild(e.n1,e.n2)}),0<p.length},M.prototype._restoreIntoLI=function(e,t,n){if("LI"!==t.nodeName)return!1;if(n&&n.parentNode===t)return x.domUtils.insertAfter(e,n,t),!0;for(var r=t.firstChild;r;r=r.nextSibling)if("BR"===r.nodeName)return t.insertBefore(e,r),!0;return t.appendChild(e),!0},M.prototype._shouldRestoreNode=function(e,t){if(e.nodeType!==Node.ELEMENT_NODE)return!0;var n=x.domUtils.matchesSelector(e,this._insertSelector)?e:this._getWrappingTrackedNode(t,this._insertSelector);return!this._isCurrentSessionNode(n)},M.prototype._tryToTrackAddedNode=function(e,t){if(this._shouldIgnoreNode(e))return!1;var n=this._getNodeTrackingContext(e),r=!0;return n.isTracking?n.isInsert&&!n.isCurrent?this._createTrackedNode(e,{type:c,changeId:null,ignoredNodes:t,containerOnly:!1,trackChildren:!1}):r=!1:this._createTrackedNode(e,{type:c,changeId:null,containerOnly:x.domUtils.isBlockElement(e),trackChildren:!0,ignoredNodes:t}),this._fixAddedChildren(e),r},M.prototype._restoreAddedHierarchy=function(e){var t,n,r;if(!e||(t=e.length)<2)return e;for(var i=[],o=[],a=0;a<t;++a)(r=e[a]).nodeType===Node.TEXT_NODE&&x.domUtils.isEmptyString(r.nodeValue)||(n=r.parentNode)&&e.indexOf(n)<0&&(r.nodeType===Node.ELEMENT_NODE&&r.getAttribute(s)?o.push(r):i.push(r));return o.length?o:i},M.prototype._restoreDeletedHierarchy=function(n,a){if(!n||!n.length)return[];n=n.slice();for(var e,t,r,i,o,s=function(e){for(var t=n.length-1;0<=t;--t)if(n[t]===e)return t;return-1},l=0;l<n.length;++l)e=n[l],(t=a.getOldParentNode(e))&&(t!==e.parentNode?0<=(i=s(t))&&l<i&&(n.splice(i,1),n.splice(l,0,t),--l):(n.splice(l,1),l--));for(l=0;l<n.length;++l)e=n[l],(r=a.getOldPreviousSibling(e))&&l<(o=s(r))&&(n.splice(o,1),n.splice(l,0,r),--l);if(a.li_restored_)return n;a.li_restored_=1;var d=function(e,t){if(!(t>=e.length-1)){var n,r,i=e[t];if(i.nodeType!==Node.ELEMENT_NODE)return d(e,t+1);for(var o=t+1;o<e.length;++o)n=e[o],a.getOldParentNode(n)===i&&(d(e,t+1),(r=a.getOldPreviousSibling(n))&&r.parentNode!==i&&(r=null),i.insertBefore(n,r&&r.nextSibling),e.splice(o,1),o--)}};return d(n,0),n},M.prototype._createMutationObservers=function(e){var t=this;if(this._mutationSummary)e&&this._mutationSummary.reconnect();else{var n={callback:this._onMutationSummary.bind(this),rootNode:this.rootElement,oldPreviousSibling:!0,observeOwnChanges:!1,mutationFilter:this._filterMutations,nodeFilter:function(e){return!t._shouldIgnoreNode(e)},queries:[]};if(n.mutationFilter=n.mutationFilter.bind(this),this._params.trackedDeleteSelectors||this._params.trackedInsertSelectors){var r=new x.TrackedNodeClassifier({match:this._params.trackedDeleteSelectors}).addPatterns({match:this._params.trackedInsertSelectors});n.queries.push({element:r.matchNodeSelector,classAttribute:!1})}this._mutationSummary=new x.MutationSummary(n,e)}},M.prototype._momentarilyRemoveTrackingInRange=function(e){var a=this,s=Date.now()%1e6,l={},d=o;e.getNodes(null,function(e){var t=a._getNodeTrackingContext(e);if(!t.isTracking)return!1;var n=t.trackingNode,r=P(n),i=n.className,o=String(s++);return l[o]={attributes:r,className:i},a.removeFLITETracking(n),n.setAttribute(d,o),t.isDelete&&n.setAttribute(a.attributes.isDeleteNode,"1"),!0}),setTimeout(function(){a._$element.find("["+d+"]").each(function(e,t){var n=t.getAttribute(d),r=l[n]||{};n?(delete l[n],Object.keys(r.attributes||{}).forEach(function(e){t.setAttribute(e,r.attributes[e])}),t.setAttribute("class",r.className||""),t.removeAttribute(d),t.removeAttribute(a.attributes.isDeleteNode)):x.logger.warn("missing save data for node")})},10)},M.prototype._isOpaqueNode=function(e){return this._params.opaqueNodeClassifier.test(e)},M.prototype._processAddedListItem=function(e){if(0!==e.removed.length||0!==e.reparented.length||1!==e.added.length)return!1;var t=e.added[0];if("li"!==x.utils.getTagName(t))return!1;var n=this._getNodeTrackingContext(t);if(n.isInsert){if(n.isCurrent)return!0;this._splitNode(t.parentNode,t,0),this._createTrackedNode(t,{type:c,changeId:null,containerOnly:!0,trackChildren:!1})}else n.isDelete&&this._splitNode(t.parentNode,t,0),this._createTrackedNode(t,{type:c,changeId:null,containerOnly:!0,trackChildren:!1});return O(t).addClass(R),!0},M.prototype._processNewList=function(e){var t=e.added,n=e.removed,r=t&&t.length;if(n&&n.length,2!==r)return!1;var i=x.domUtils.findNodeByTagName(t,E),o=i&&x.domUtils.findNodeByTagName(t,T);if(!i)return!1;var a=this._getNodeTrackingContext(i);return a.isInsert&&a.isCurrent||(this._createTrackedNode(i,{type:c,changeId:null,containerOnly:!0,trackChildren:!1}),o&&this._createTrackedNode(o,{type:c,changeId:null,containerOnly:!0,trackChildren:!1})),!0},M.prototype._processNewParagraph=function(e){var t=e.added,n=this.hostMethods.getNewLineNodeName();if(!n||"BR"===n)return!1;if(2!==t.length)return!1;var r=t[0],i=t[1];if(e.removed&&e.removed.length)return!1;if(r.nodeName!==n||i.nodeName!==n)return!1;for(var o=null,a=e.reparented.length-1;0<=a&&!o;--a)e.reparented[a].parentNode===i?o=r:e.reparented[0].parentNode===r&&(o=i);return o=o||(i.childNodes.length>r.childNodes.length?r:i),this._tryToTrackAddedNode(o,e.reparented),!0},M.prototype._processDeletedLastLI=function(e){var t=e.added&&1===e.added.length&&e.added[0],n=t&&t.nodeName,r=this.hostMethods.getNewLineNodeName(),i=e.removed&&1===e.removed.length&&e.removed[0];if(n!==r||"li"!==x.utils.getTagName(i)||i.firstChild)return!1;var o=this._getNodeTrackingContext(t);if(o.isInsert&&o.isCurrent)return!0;o.isDelete&&this._splitNode(t.parentNode,t,0);var a=this._createTrackedNode(t,{type:c,changeId:null,containerOnly:!0,trackChildren:!1}),s=x.domUtils.getFirstSelectableChild(a,this._isDeletableOptions);return this._selection.setStart(s||a,!0,0),!0},M.prototype._processAddedBreakDiv=function(e){var t=e.added,n=t&&t.length,r=e.removed&&e.removed.length;if(n<1||0!==r)return!1;var i=t[0];return!("div"!==x.utils.getTagName(i)||!i.childNodes||1!==i.childNodes.length||"br"!==x.utils.getTagName(i.firstChild)||(this._tryToTrackAddedNode(i,e.reparented),0))},M.prototype._restoreList=function(t){var e=t.added,n=t.removed,r=this.hostMethods.getNewLineNodeName(),i=r?1:0,o=e&&e.length,a=n&&n.length;if(o<i||!a)return!1;for(var s,l,d,c,p=0,u=0;u<a;++u){if(s=n[u],!l&&E.test(s.nodeName)){if(l=s,(d=this._getNodeTrackingContext(l)).isInsert&&d.isCurrent)return!1;break}"LI"===s.nodeName&&0===s.children.length&&(x.utils.findInArray(t.reparented,function(e){return t.getOldParentNode(e)===s})||++p)}if(!l&&1!==p)return!1;var h=0,f=0;for(u=e.length-1;0<=u;--u)(s=e[u]).nodeType===Node.ELEMENT_NODE&&(s.nodeName===r?++h:l&&s.nodeName===l.nodeName&&++f);if(h===i&&1===p&&!l)return!1;if(h<i)return!1;if(c=t.getOldParentNode(l),!this._shouldRestoreNode(l,c))return!0;this._restoreDeletedHierarchy(t.removed,t);var g=t.getOldPreviousSibling(l);x.domUtils.insertAfter(l,g,c),this._removeHostArtifacts(l),f?this._addDeleteTracking(l.firstChild,{trackingContext:d,containerOnly:!0}):this._addDeleteTracking(l,{trackingContext:d,containerOnly:!0,trackContent:!0});var m=[l].concat(O(l).find("*").toArray());for(u=t.added.length-1;0<=u;--u)(c=(s=t.added[u]).parentNode)&&c.removeChild(s);this._restoreReparented(t,m);var v=l.querySelectorAll("li");if(v&&v.length){var y=x.domUtils.getFirstSelectableChild(v.item(0),this._isDeletableNoSelfOptions);y&&this._selection.setStart(y,!0,0)}return!0},M.prototype._filterMutations=function(e,t){var n=e&&e[t];if(!n)return j.IGNORE;if("childList"!==n.type)return j.IGNORE;var r=this.hostMethods.shouldIgnoreMutation(e,t);if(r!==j.OK)return r;var i=this._shouldIgnoreMutationNodeList(n.addedNodes);return i===j.IGNORE_ALL||i===j.OK?i:this._shouldIgnoreMutationNodeList(n.removedNodes)},M.prototype._shouldIgnoreMutationNodeList=function(e){if(!e||!e.length)return j.IGNORE;for(var t,n=e.length-1;0<=n;--n)if(t=e[n],!this._shouldIgnoreNode(t))return j.OK;return j.IGNORE},M.prototype._shouldIgnoreNode=function(e,t){void 0===t&&(t=!1);var n=e&&e.nodeType;if(1!==n&&3!==n)return!0;if(3===n&&x.domUtils.isEmptyString(e.nodeValue))return!0;if(e.style&&"none"===e.style.display)return!0;var r=this._params.nodeClassifier,i=this.rootElement,o=r.classifyNode(e,i);return!(o===x.TrackedNodeClassifier.MATCH_NONE||!t&&o!==x.TrackedNodeClassifier.MATCH_NODE_AND_CONTENT)||1===e.childNodes.length&&r.classifyNode(e.firstChild,i)===x.TrackedNodeClassifier.MATCH_NODE_AND_CONTENT||this._params.opaqueNodeClassifier.classifyNode(e.parentNode,i)!==x.TrackedNodeClassifier.MATCH_NONE},M.prototype.tryToExtractNestedTrack=function(e,t){},M.prototype._findNextNodeToDelete=function(e){var t=e.startContainer,n=t,r=e.cloneRange();if(!r.collapsed)return null;if(t.nodeType===Node.ELEMENT_NODE){if(L(t))return r.setEndAfter(t),r.collapse(!1),this._findNextNodeToDelete(r);if(r.endOffset>=t.childNodes.length)return(o=x.domUtils.getNextSelectableNode(t,this._isDeletableGreedyOptions))?{node:o,offset:0,isText:3===o.nodeType,tagName:o.nodeName,isCurrent:!1}:null;var i=t.childNodes[r.endOffset];if(!(t=this._isDeletableElement(i)?i:x.domUtils.getFirstSelectableChild(i,this._isDeletableGreedyOptions)))return null;if(t.nodeType!==Node.TEXT_NODE)return{node:t,offset:0,isText:!1,tagName:t.nodeName,isCurrent:x.rangy.dom.isAncestorOf(t,n,!0)};r.setStart(t,0),r.collapse(!0)}if(t.nodeType===Node.TEXT_NODE){if(r.endOffset<t.length)return{node:t,offset:r.endOffset,isText:!0,isCurrent:!1,tagName:null};var o;if(!(o=x.domUtils.getNextSelectableNode(t,this._isDeletableGreedyOptions)))return null;if(o&&o!==t){if(x.domUtils.isEmptyTextNode(o)||L(o))return r.setEnd(o,x.domUtils.getNodeLength(o)),r.collapse(),this._findNextNodeToDelete(r);var a=o.nodeType===Node.TEXT_NODE;return{node:o,offset:0,isText:a,tagName:o.nodeName,isCurrent:!a&&x.rangy.dom.isAncestorOf(o,n,!0)}}}return null},M.prototype._findPreviousNodeToDelete=function(e){var t=e.endContainer,n=e.startOffset,r=t,i=e.cloneRange();if(!i.collapsed)return null;if(t.nodeType===Node.ELEMENT_NODE){if(0===n){if(this._isDeletableElement(t,!0))return{node:t,offset:0,isText:!1,isCurrent:!0,tagName:t.nodeName};if(!(t=x.domUtils.getPreviousSelectableNode(t,this._isDeletableWithParentOptions)))return null;i.setStart(t,3===t.nodeType?t.length:0)}if(t.nodeType===Node.ELEMENT_NODE){if(x.domUtils.isStubElement(t))return{node:t,offset:0,isText:!1,isCurrent:!1,tagName:t.nodeName};var o=t.childNodes[i.endOffset-1];if(!(t=x.domUtils.getLastSelectableChild(o,this._isDeletableNoSelfOptions))&&this._isDeletableElement(o,!0)&&(t=o),!t)return null;if(t.nodeType!==Node.TEXT_NODE)return"BR"===t.nodeName&&t===t.parentNode.lastChild&&t.previousSibling&&t.parentNode.nodeName in g?(i.setStartBefore(t),i.collapse(!0),this._findPreviousNodeToDelete(i)):{node:t,offset:0,isText:!1,tagName:t.nodeName,isCurrent:x.rangy.dom.isAncestorOf(t,r,!0)};i.setStart(t,t.length||0),i.collapse(!0)}}if(t&&t.nodeType===Node.TEXT_NODE){if(0<i.startOffset)return{node:t,offset:i.startOffset-1,tagName:null,isText:!0,isCurrent:!1};var a=x.domUtils.getPreviousSelectableNode(i.startContainer,this._isDeletableWithParentOptions);if(a){var s=a.nodeType===Node.TEXT_NODE;return{node:a,offset:s?a.length-1:0,tagName:s?null:a.nodeName,isText:s,isCurrent:!s&&x.rangy.dom.isAncestorOf(a,r,!0)}}}return null},M.prototype._getNodeTrackingContext=function(e){var t,n={isTracking:!1,isCurrentUser:!1,isCurrentSession:!0,isCurrent:!1,trackingNode:null,isDelete:!1,isInsert:!1,changeId:null,isTextSpan:!1,tracksContent:!1};return e&&(t=this._isOpaqueNode(e)&&x.domUtils.matchesSelector(e.parentNode,this._fliteSelector)?e.parentNode:this._getWrappingTrackedNode(e,this._fliteSelector))&&(t!==e||x.domUtils.isTextContainer(e)||this._isDeletableElement(e))&&(n.isTracking=!0,n.isCurrentUser=this._isCurrentUserNode(t),n.trackingNode=t,n.isDelete=x.domUtils.matchesSelector(t,this._deleteSelector),n.isInsert=!n.isDelete,n.isTextSpan=x.domUtils.matchesSelector(t,"span:not(."+R+")"),n.changeId=t.getAttribute(this.attributes.changeId),this.sessionId&&(n.isCurrentSession=t.getAttribute(this.attributes.sessionId)===this.sessionId),n.isCurrent=n.isCurrentSession&&n.isCurrentUser,n.tracksContent=!x.domUtils.hasClass(t,R)),n},M.prototype._removeHostArtifacts=function(e){e&&e.nodeType===Node.ELEMENT_NODE&&O(e).find("[data-cke-bookmark],[data-cke-hidden-sel]").remove()},M.prototype._removeFLITEArtifacts=function(e,t){if(void 0===e&&(e=this._$element),void 0===t&&(t=!0),e&&e.length){var n=this.setIgnoreMutations(!0);try{e.find("span["+p+"]").remove(),e.find("[class='']").each(function(e,t){t.removeAttribute("class")}),e.find(["span",this._insertSelector,":empty,span",this._deleteSelector,":empty"].join("")).each(function(e,t){t.parentNode&&t.parentNode.removeChild(t)}),t||e.find(C).each(function(e,t){t.parentNode&&t.parentNode.removeChild(t)}),e.find("tr>br,ul>br").remove(),e.find("table:empty, tbody:empty, tr:empty, ul:empty, ol:empty, tr>br").remove();var r=function(e,t){1===t.nodeType?O(t).contents().each(r):3===t.nodeType&&x.domUtils.isEmptyTextNode(t)&&t.parentNode.removeChild(t)};r(0,this.rootElement),this._removeUnusedChangesets()}finally{this.setIgnoreMutations(n);var i=this._getCurrentRange(!0);if(i&&i.collapsed&&!this._isDeletableElement(i.startContainer)){var o=x.domUtils.getFirstSelectableChild(i.startContainer,this._isDeletableWithParentOptions);o&&this._selection.setStart(o,!0,0)}}}},M.prototype._removeUnusedChangesets=function(){var t=this,e=this._$element;if(e){var n=e.find(this._fliteSelector),r=this.attributes.changeId,i=n.toArray().reduce(function(e,t){var n=t.getAttribute&&t.getAttribute(r);return n&&(e[n]=1),e},{});Object.keys(this._changes).forEach(function(e){i[e]||delete t._changes[e]})}},M.prototype._testChangeSetForRemoval=function(e){if(this.getChange(e)){for(var t,n=this._$element.find(this._deleteSelector+"["+this.attributes.changeId+"='"+e+"'],"+this._insertSelector+"["+this.attributes.changeId+"='"+e+"']"),r=n.length-1;0<=r;--r)if(t=n[r],!x.domUtils.matchesSelector(t,this._fliteTextSelector)||!x.domUtils.hasNoTextOrStubContent(t))return;delete this._changes[e],n.remove(),this._triggerChange()}},M.prototype._isValidFLITENode=function(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;var t=O(e);return Boolean((t.hasClass(this._deleteClassName)||t.hasClass(this._insertClassName))&&t.attr(this.attributes.changeId)&&t.attr(this.attributes.userId))},M.prototype._replaceNodeWithContent=function(e){var t=e[0],n=t&&t.parentNode;if(n&&t.nodeType===Node.ELEMENT_NODE){var r=!1,i=e.contents();i.length?t.nodeName in y&&D(i)?e.remove():("LI"===t.nodeName&&n.nodeName in v&&(r=!0,t===t.parentNode.firstChild&&t.parentNode!==this.rootElement?(e.parent().before(i),this._removeNode(t)):t.previousSibling?(O(t.previousSibling).append(i),this._removeNode(t)):r=!1),r||e.replaceWith(i)):e.remove()}},M.prototype._restoreCaret=function(e){var t=e&&e.node;if(!t||!x.rangy.dom.isAncestorOf(this.rootElement,t,!1))return!1;try{if(t.previousSibling!==e.prev||t.nextSibling!==e.next||t.parentNode!==e.parent)return!1;if(t.nodeType===Node.TEXT_NODE)this._selection.setStart(t,!0,e.offset);else{var n=this._getCurrentRange();n&&(n.setStartBefore(t),this._selection.addRange(n))}return!0}catch(e){return!1}},M.prototype._getNodeAtCaret=function(n){var e=n.range||this._getCurrentRange();function t(e,t){return{node:e,offset:t,prev:e&&e.previousSibling,next:e&&e.nextSibling,parent:e&&e.parentNode,isBack:n.lookBack}}if(!e||!e.collapsed)return t(null,0);if(e.endContainer.nodeType===Node.TEXT_NODE)return this._getNodeUnderTextCaret({range:e,lookBack:n.lookBack,lookForward:n.lookForward});if(this._isOpaqueNode(e.endContainer))return t(e.endContainer,0);if(!e.endOffset&&n.lookBack)return t(null,0);var r=n.lookBack?e.endOffset-1:e.endOffset;return r<0||r>=e.endContainer.childNodes.length?t(0===r?e.endContainer:null,0):t(e.endContainer.childNodes[r],r)},M.prototype._getNodeUnderTextCaret=function(n){var e=n.range,t=e.startContainer,r=e.startOffset;function i(e,t){return{node:e,offset:t,prev:e&&e.previousSibling,next:e&&e.nextSibling,parent:e&&e.parentNode,isBack:n.lookBack}}if(n.lookBack||n.lookForward){if(0===r){if(n.lookBack){var o=x.domUtils.getPreviousSelectableNode(e.endContainer,this._isDeletableOptions);return o?o.nodeType===Node.ELEMENT_NODE?i(o,0):i(o,o.length):i(null,0)}if(!n.lookForward)return i(t,0);if(t.length)return i(t,0)}if(r>=t.length){if(n.lookBack)return i(t,r-1);if(n.lookForward)return i(x.domUtils.getNextSelectableNode(t,this._isDeletableOptions),0)}return i(t,n.lookBack?r-1:r)}return i(t,n.range.startOffset)},M.prototype._moveCaret=function(e,t){e&&(t===z.Left?this._selection.collapseBefore(e,this._isDeletableNoSelfOptions):t===z.Right&&this._selection.collapseAfter(e,this._isDeletableNoSelfOptions))},M.prototype._isDeletableElement=function(e,t){if(void 0===t&&(t=!1),!e)return!1;if(e.nodeType===Node.TEXT_NODE&&!x.domUtils.isEmptyTextNode(e))return!0;if(e.nodeType!==Node.ELEMENT_NODE)return!1;if(L(e))return!1;for(var n,r=O(e),i=0,o=w.length;i<o;++i)if(n=w[i],r.is(n.selector)){if(n.type===a.Always)return!0;if(n.type===a.NotEmpty)return t||!x.domUtils.hasNoTextOrStubContent(e)}return!1},M.prototype._findDeletableParent=function(e,t){for(;e&&e!==t;){if(e=e.parentNode,this._isDeletableElement(e,!0))return e;if(e.previousSibling)return null}return null},M.prototype._onRangeChanged=function(e){this._params.hostMethods&&this._params.hostMethods.setHostRange&&this._params.hostMethods.setHostRange(e.nativeRange)},M.prototype._collapseOnEdgeOf=function(e,t,n){var r,i=!n&&!x.domUtils.isStubElement(e)&&x.domUtils.matchesSelector(e,u)&&!this._isOpaqueNode(e.firstChild),o={root:this.rootElement,filter:this._isDeletableCallback,excludeSelf:!0};if(t){if(r=i&&x.domUtils.getFirstSelectableChild(e,o))return void this._selection.collapseAtStart(r);this._selection.collapseAfter(e,this._isDeletableNoSelfOptions)}else{if(r=!n&&i&&x.domUtils.getLastSelectableChild(e,o))return void this._selection.collapseAtEnd(r);this._selection.collapseBefore(e,this._isDeletableOptions)}},M);function M(e){if(this.rootElement=null,this._changes={},this._userStyles={},this._styleMap={},this._uniqueStyleIndex=0,this._ignoreMutations=!1,this._boundEventHandler=null,this._mutationSummary=null,this._domObserver=null,this._browserType=null,this._batchChangeId=null,this._uniqueIDIndex=1,this._compositionState=W.None,this._lastInsertTime=0,!e.element)throw new Error("options.element must be defined for flite construction.");this.$this=O(this),this._summaryGuard=new B,this._lastMutationContext=new F,this._isDeletableCallback=this._isDeletableElement.bind(this),this._params=O.extend(!0,{},k,e),this._params.timezone&&"string"!=typeof this._params.timezone&&(x.logger.error("FLITE: Bad timezone configuration",this._params.timezone),this._params.timezone=null),this._insertClassName=this._params.attrValuePrefix+this._params.changeTypes[c].alias,this._deleteClassName=this._params.attrValuePrefix+this._params.changeTypes[h].alias,x.domUtils.addStubElement(this._params.opaqueNodeClassifier.matchAllSelector);var t=e.userStyles||{};for(var n in t)if(t.hasOwnProperty(n)){var r=Number(t[n]);isNaN(r)||(this._userStyles[n]=this._params.stylePrefix+"-"+r,this._uniqueStyleIndex=Math.max(r,this._uniqueStyleIndex),this._styleMap[r]=!0)}this._insertSelector="."+this._getTrackedNodeClass(c),this._deleteSelector="."+this._getTrackedNodeClass(h),this._fliteSelector=this._insertSelector+","+this._deleteSelector,this._fliteTextSelector="span"+this._insertSelector+"["+this.attributes.fliteCreated+"],span"+this._deleteSelector+"["+this.attributes.fliteCreated+"]",this._domObserver=null,x.utils.browser.msie?Object.defineProperty(this,"rootElement",{get:function(){try{return this.hostMethods.getRootElement()}catch(e){return null}},configurable:!0,enumerable:!0}):Object.defineProperty(this,"rootElement",{get:function(){return this._params.element},configurable:!0,enumerable:!0})}var B=(U.prototype.set=function(e){var t=this;this.timeout&&clearTimeout(this.timeout),this.ignoreCount+=e;var n=this.ignoreCount;this.timeout=setTimeout(function(){x.logger.debug("ignore expired"),t.timeout=null,t.ignoreCount=Math.max(t.ignoreCount-n,0)},35)},U.prototype.shouldIgnore=function(e){var t=0<this.ignoreCount;return t&&this.ignoreCount--,0===this.ignoreCount&&this.timeout&&(clearTimeout(this.timeout),this.timeout=null),t},U);function U(){this.ignoreCount=0,this.timeout=null}var F=(H.prototype.setContext=function(e,t){x.logger.debug("set mutation context",e),this._type=e,this._data=t,this._timer.reset()},Object.defineProperty(H.prototype,"data",{get:function(){return this._data},enumerable:!0,configurable:!0}),Object.defineProperty(H.prototype,"type",{get:function(){var e=this._type;return this._type="none",e},enumerable:!0,configurable:!0}),Object.defineProperty(H.prototype,"peekType",{get:function(){return this._type},enumerable:!0,configurable:!0}),H);function H(){var e=this;this._type="none",this._data=null,this._timer=new x.utils.Timeout(function(){e._type="none"},500)}x.ChangeTracker=n}(window.FLITE,window.jQuery),Object.defineProperty(F,"__esModule",{value:!0}),(w=D=D||{})[w.OK=0]="OK",w[w.IGNORE=1]="IGNORE",w[w.IGNORE_ALL=2]="IGNORE_ALL";var P={mceinsertlink:1,mcetoggleformat:1,removeformat:1,mceapplytextcolor:1,mceremovetextcolor:1,justifyright:1,justifyleft:1,justifycenter:1,justifyfull:1,bold:1,underline:1,italic:1,undo:1,redo:1,indent:1,outdent:1,annotate:1},M={mceinsertcontent:1},B={insertunorderedlist:1,insertorderedlist:1},U={delete:1,"delete-table":1};!function(l,d){var e,t,n=tinymce.PluginManager,r=void 0,c=null;var p=10*parseInt(tinymce.majorVersion)+parseInt(tinymce.minorVersion);n.requireLangPack("flite","en,fr,de,es,ja,pt,ko,nl,pt,ru,sk,tr,zh"),n.add("flite",function(e,t){var n=new s(e,t);return n.initPlugin(e,e.settings&&e.settings.flite),n});var u=((e={})[l.Commands.TOGGLE_TRACKING]='<svg class="flite-button" width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <defs>\n <path d="M12.4341333,0.546133333 L10.7914667,2.12906667 C10.6250667,2.288 10.6250667,2.54506667 10.7914667,2.70506667 L10.7914667,2.70506667 L13.1797333,5.008 C13.3450667,5.16586667 13.6128,5.16586667 13.7770667,5.008 L13.7770667,5.008 L15.4197333,3.42506667 C15.584,3.26506667 15.584,3.008 15.4197333,2.84906667 L15.4197333,2.84906667 L13.0304,0.546133333 C12.9482667,0.4672 12.8394667,0.426666667 12.7317333,0.426666667 L12.7317333,0.426666667 C12.624,0.426666667 12.5162667,0.4672 12.4341333,0.546133333 L12.4341333,0.546133333 Z" id="path-1"></path>\n </defs>\n <g id="pencil_24x24" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="Group" transform="translate(2.000000, 3.000000)" fill="#C2C2C2" fill-rule="nonzero">\n <polygon id="Path" points="13.4 0 13.4 1.4 2.66453526e-15 1.4 2.66453526e-15 0"></polygon>\n <polygon id="Path" points="20.4 12 20.4 13.4 3.55271368e-15 13.4 3.55271368e-15 12"></polygon>\n <polygon id="Path" points="20.4 16 20.4 17.4 3.55271368e-15 17.4 3.55271368e-15 16"></polygon>\n <polygon id="Path" points="20.4 4 20.4 5.4 3.55271368e-15 5.4 3.55271368e-15 4"></polygon>\n <polygon id="Path" points="7.4 8 7.4 9.4 1.77635684e-15 9.4 1.77635684e-15 8"></polygon>\n </g>\n <g id="Group" transform="translate(4.000000, 4.000000)">\n <path d="M12.6087467,0.42976 C12.4903467,0.444693333 12.38048,0.49696 12.29728,0.58336 L1.00874667,11.8740267 C0.93728,11.9454933 0.888213333,12.03616 0.865813333,12.13536 L0.19488,15.1518933 C0.157546667,15.3268267 0.211946667,15.5092267 0.33888,15.6350933 C0.465813333,15.76096 0.648213333,15.8132267 0.823146667,15.77376 L3.83328,15.10816 C3.93248,15.0868267 4.02314667,15.03776 4.09568,14.9662933 L15.3895467,3.67029333 C15.48768,3.57109333 15.5442133,3.43776 15.5442133,3.29802667 C15.5442133,3.16042667 15.48768,3.02709333 15.3895467,2.92789333 L13.0386133,0.58336 C12.9266133,0.46816 12.76768,0.411626667 12.6087467,0.42976 L12.6087467,0.42976 Z" id="Path" fill="#3F4447"></path>\n <polygon id="Path" fill="#FFFFFF" points="11.2455467 3.11349333 12.8487467 4.72736 4.23648 13.3406933 2.62901333 11.73216"></polygon>\n <polygon id="Path" fill="#FF0000" points="12.66848 1.69056 14.2770133 3.29802667 13.59008 3.98602667 11.9815467 2.37749333"></polygon>\n <polygon id="Path" fill="#13C203" points="1.88554667 12.4734933 3.50048 14.07776 3.46314667 14.1150933 1.39488 14.57376 1.85354667 12.50656"></polygon>\n <mask id="mask-2" fill="white">\n <use xlink:href="#path-1"></use>\n </mask>\n <g id="Clip-5"></g>\n </g>\n </g>\n</svg>',e[l.Commands.TOGGLE_SHOW]='<svg class="flite-button" width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n\t\t<g id="color_6" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n\t\t\t<g id="Group" transform="translate(2.000000, 3.000000)" fill-rule="nonzero">\n\t\t\t\t<polygon id="Path" fill="#13C203" points="13.4 0 13.4 1.4 2.66453526e-15 1.4 2.66453526e-15 0"></polygon>\n\t\t\t\t<polygon id="Path" fill="#C2C2C2" points="20.4 12 20.4 13.4 3.55271368e-15 13.4 3.55271368e-15 12"></polygon>\n\t\t\t\t<polygon id="Path" fill="#C2C2C2" points="20.4 16 20.4 17.4 3.55271368e-15 17.4 3.55271368e-15 16"></polygon>\n\t\t\t\t<polygon id="Path" fill="#C2C2C2" points="20.4 4 20.4 5.4 3.55271368e-15 5.4 3.55271368e-15 4"></polygon>\n\t\t\t\t<polygon id="Path" fill="#FF0000" points="7.4 8 7.4 9.4 1.77635684e-15 9.4 1.77635684e-15 8"></polygon>\n\t\t\t</g>\n\t\t\t<ellipse id="Oval" fill="#FFFFFF" cx="12" cy="12" rx="7" ry="5"></ellipse>\n\t\t\t<path d="M19.9670523,11.863471 C19.1182252,8.35605707 15.2062838,6 12.0849167,6 C8.94741535,6 4.86920709,8.40790823 4.03294767,11.863471 L4,12 L4.03294767,12.136529 C4.86920709,15.5920918 8.94741535,18 12.0849167,18 C15.2062838,18 19.1182252,15.6439429 19.9670523,12.136529 L20,12 L19.9670523,11.863471 Z M12.0849167,16.9359321 C9.34261756,16.9359321 5.80295085,14.915975 5.00456427,12 C5.80295085,9.08402499 9.34261756,7.06406789 12.0849167,7.06406789 C14.7482433,7.06406789 18.1997665,9.08402499 18.9954357,12 C18.1997665,14.915975 14.7482433,16.9359321 12.0849167,16.9359321 Z M12.127375,8.83894433 C10.490691,8.83894433 9.1641227,10.2959993 9.1641227,12.0932575 C9.1641227,13.8905157 10.4908608,15.3475706 12.127375,15.3475706 C13.7638892,15.3475706 15.0906273,13.8907022 15.0906273,12.0932575 C15.0906273,10.2958127 13.764059,8.83894433 12.127375,8.83894433 Z" id="Shape-Copy-11" fill="#464646" fill-rule="nonzero"></path>\n\t\t</g>\n\t</svg>',e[l.Commands.ACCEPT_ALL]='<svg class="flite-button" width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n\t\t<g id="color_1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n\t\t\t<g id="Group" transform="translate(2.000000, 3.000000)" fill="#C2C2C2" fill-rule="nonzero">\n\t\t\t\t<polygon id="Path" points="13.4 0 13.4 1.4 2.66453526e-15 1.4 2.66453526e-15 0"></polygon>\n\t\t\t\t<polygon id="Path" points="20.4 12 20.4 13.4 3.55271368e-15 13.4 3.55271368e-15 12"></polygon>\n\t\t\t\t<polygon id="Path" points="20.4 16 20.4 17.4 3.55271368e-15 17.4 3.55271368e-15 16"></polygon>\n\t\t\t\t<polygon id="Path" points="20.4 4 20.4 5.4 3.55271368e-15 5.4 3.55271368e-15 4"></polygon>\n\t\t\t\t<polygon id="Path" points="7.4 8 7.4 9.4 1.77635684e-15 9.4 1.77635684e-15 8"></polygon>\n\t\t\t</g>\n\t\t\t<polygon id="Path-2-Copy" fill="#13C203" fill-rule="nonzero" points="20.6573212 4 22 5.46411673 8.66976357 20 2 12.7269929 3.34267879 11.2628761 8.66976357 17.0717665"></polygon>\n\t\t</g>\n\t</svg>',e[l.Commands.REJECT_ALL]='<svg class="flite-button" width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n\t\t<g id="color_2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n\t\t\t<g id="Group" transform="translate(2.000000, 3.000000)" fill="#C2C2C2" fill-rule="nonzero">\n\t\t\t\t<polygon id="Path" points="13.4 0 13.4 1.4 2.66453526e-15 1.4 2.66453526e-15 0"></polygon>\n\t\t\t\t<polygon id="Path" points="20.4 12 20.4 13.4 3.55271368e-15 13.4 3.55271368e-15 12"></polygon>\n\t\t\t\t<polygon id="Path" points="20.4 16 20.4 17.4 3.55271368e-15 17.4 3.55271368e-15 16"></polygon>\n\t\t\t\t<polygon id="Path" points="20.4 4 20.4 5.4 3.55271368e-15 5.4 3.55271368e-15 4"></polygon>\n\t\t\t\t<polygon id="Path" points="7.4 8 7.4 9.4 1.77635684e-15 9.4 1.77635684e-15 8"></polygon>\n\t\t\t</g>\n\t\t\t<path d="M12,10.7692308 L18.7692308,4 L20,5.23076923 L13.2307692,12 L20,18.7692308 L18.7692308,20 L12,13.2307692 L5.23076923,20 L4,18.7692308 L10.7692308,12 L4,5.23076923 L5.23076923,4 L12,10.7692308 Z" id="Rectangle-Copy-13" fill="#FF0000"></path>\n\t\t</g>\n\t</svg>',e[l.Commands.ACCEPT_ONE]='<svg class="flite-button" width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n\t\t<g id="color_3" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n\t\t\t<g id="Group" transform="translate(2.000000, 3.000000)" fill="#C2C2C2" fill-rule="nonzero">\n\t\t\t\t<polygon id="Path" points="13.4 0 13.4 1.4 2.66453526e-15 1.4 2.66453526e-15 0"></polygon>\n\t\t\t\t<polygon id="Path" points="20.4 12 20.4 13.4 3.55271368e-15 13.4 3.55271368e-15 12"></polygon>\n\t\t\t\t<polygon id="Path" points="20.4 16 20.4 17.4 3.55271368e-15 17.4 3.55271368e-15 16"></polygon>\n\t\t\t\t<polygon id="Path" points="20.4 4 20.4 5.4 3.55271368e-15 5.4 3.55271368e-15 4"></polygon>\n\t\t\t\t<polygon id="Path" points="7.4 8 7.4 9.4 1.77635684e-15 9.4 1.77635684e-15 8"></polygon>\n\t\t\t</g>\n\t\t\t<polygon id="Path" fill="#13C203" fill-rule="nonzero" points="21.2068642 11.5757359 22.5095983 12.87847 13.3638043 22.0242641 8.57573593 17.2361957 9.87847004 15.9334616 13.3638043 19.4187959"></polygon>\n\t\t</g>\n\t</svg>',e[l.Commands.REJECT_ONE]='<svg class="flite-button" width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n\t\t<g id="color_4" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n\t\t\t<g id="Group" transform="translate(2.000000, 3.000000)" fill="#C2C2C2" fill-rule="nonzero">\n\t\t\t\t<polygon id="Path" points="13.4 0 13.4 1.4 2.66453526e-15 1.4 2.66453526e-15 0"></polygon>\n\t\t\t\t<polygon id="Path" points="20.4 12 20.4 13.4 3.55271368e-15 13.4 3.55271368e-15 12"></polygon>\n\t\t\t\t<polygon id="Path" points="20.4 16 20.4 17.4 3.55271368e-15 17.4 3.55271368e-15 16"></polygon>\n\t\t\t\t<polygon id="Path" points="20.4 4 20.4 5.4 3.55271368e-15 5.4 3.55271368e-15 4"></polygon>\n\t\t\t\t<polygon id="Path" points="7.4 8 7.4 9.4 1.77635684e-15 9.4 1.77635684e-15 8"></polygon>\n\t\t\t</g>\n\t\t\t<polygon id="Path" fill="#FF0000" fill-rule="nonzero" points="20.8615385 11.5757359 22.0242641 12.7384615 17.9627256 16.8 22.0242641 20.8615385 20.8615385 22.0242641 16.8 17.9627256 12.7384615 22.0242641 11.5757359 20.8615385 15.6372744 16.8 11.5757359 12.7384615 12.7384615 11.5757359 16.8 15.6372744"></polygon>\n\t\t</g>\n\t</svg>',e),h=((t={})[l.Commands.TOGGLE_TRACKING]="track-changes.svg",t[l.Commands.TOGGLE_SHOW]="view-changes.svg",t[l.Commands.ACCEPT_ALL]="accept-all.svg",t[l.Commands.REJECT_ALL]="reject-all.svg",t[l.Commands.ACCEPT_ONE]="accept-one.svg",t[l.Commands.REJECT_ONE]="reject-one.svg",{deleteClass:"ice-del",insertClass:"ice-ins",attributes:l.pluginUtils.defaultTrackerConfig.attributes,trackedDeleteSelectors:"table,br,tr,td,ul,ol,li,p,div,span,img",trackedInsertSelectors:"",ignoreSelectors:"[data-track-changes-ignore],[data-cke-temp],\n\t\t[data-footnote-id],section.footnotes,\n\t\t.mce-match-marker,.mce-annotation,span.mce-spellcheck,\n\t\t\t[data-mce-type='bookmark'],.mce-resizehandle,span#__caret,\n\t\t\t:not(BR)[data-mce-bogus],.mce-spellchecker-word,.tippy-popper,\n\t\t\t.tippy-tooltip,.tippy-content,.tippy-arrow",stylePrefix:"ice-cts"}),i=new RegExp("(?:^|s)(?:"+h.deleteClass+"|"+h.insertClass+")(?:s|$)");function o(e){var t=e;return t&&t.className&&i.test(t.className)}function a(e){if(!e||!e.length)return[];var t=[];return e.forEach(function(e){t=t.concat(function e(t){var n,r;if(t.nodeType===Node.ELEMENT_NODE){var i=t.childNodes;for(n=0;n<i.length;++n)if(e(r=i[n]),o(r)){for(;r.firstChild;)t.insertBefore(r.firstChild,r);t.removeChild(r)}}return o(t)?jQuery.makeArray(t.childNodes):[t]}(e))}),t}var s=(f.prototype.initPlugin=function(e,t){this._editor=e,this._config=l.pluginUtils.upgradeConfig(t),l.logger.config(this._config.debug)},f.prototype.init=function(e,t){var n=this,r=this._config;if(l.pluginUtils.validateKey()){this._initUI(e,t),this._domLoaded=!1,this._isTracking=!1!==r.isTracking,this._isVisible=!1!==r.isVisible,d.extend(P,l.utils.toMap(l.utils.toStringArray(r.ignoreCommands,"lower"))),e.once("init",function(){return setTimeout(function(){n._domLoaded||n._onDomLoaded()},1)}),this._setupContextMenu(e),this._initTooltips(),this._testNonEditable=function(e){var n=e.noneditable_editable_class||"mceEditable",r=e.noneditable_noneditable_class||"mceNonEditable";return function(e,t){for(;e&&e!==t;e=e.parentNode){if(l.domUtils.matchesSelector(e,r))return!0;if(l.domUtils.matchesSelector(e,n))return!1}return!1}}(e.settings);var i=function(){n._isMouseDownInEditor=!1},o=this._onSwitchMode.bind(this);e.on("SwitchMode",o),window.addEventListener("blur",i),e.on("remove",function(){window.removeEventListener("blur",i),e.off("SwitchMode",o),n.destroy()})}},Object.defineProperty(f.prototype,"isVisible",{get:function(){return this._isVisible},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"isTracking",{get:function(){return this._isTracking},enumerable:!0,configurable:!0}),f.prototype.destroy=function(){if(this._editor)try{this._compositionTracker&&(this._compositionTracker.dispose(),this._compositionTracker=null),this._tooltipGuard&&(this._tooltipGuard.detach(),this._tooltipGuard=null),this._releaseEventBindings(),this._isTracking=!1,l.pluginUtils.destroyTracker(this,this._config.onEditorDestroy),this._tracker=null}catch(e){l.logger.error("while destroying editor",e)}finally{this._editor=null}},Object.defineProperty(f.prototype,"version",{get:function(){return"1.2.22"},enumerable:!0,configurable:!0}),f.prototype.logEditorEvents=function(e){l.pluginUtils.logEditorEvents(this,this._editor,e)},f.prototype.getUserInfo=function(){return this._tracker?this._tracker.getCurrentUser():{name:"",id:""}},f.prototype.countChanges=function(e){return this._tracker&&this._tracker.countChanges(e)||0},f.prototype.startNewSession=function(){var e=new Date;this._sessionId=String.fromCharCode(65+Math.round(26*Math.random()))+e.getDate()+e.getDay()+e.getHours()+e.getMinutes()+e.getMilliseconds(),this._tracker&&this._tracker.setSessionId(this._sessionId)},f.prototype._initUI=function(o,e){var t,a=this,n=this._config,r=n.commands||[l.Commands.TOGGLE_TRACKING,l.Commands.TOGGLE_SHOW,l.Commands.ACCEPT_ALL,l.Commands.REJECT_ALL,l.Commands.ACCEPT_ONE,l.Commands.REJECT_ONE],i=[{cmd:l.Commands.TOGGLE_TRACKING,callback:this._onToggleTracking,tooltip:"TOGGLE_TRACKING",trackingOnly:!1},{cmd:l.Commands.TOGGLE_SHOW,callback:this._onToggleShow,tooltip:"TOGGLE_SHOW"},{cmd:l.Commands.ACCEPT_ALL,callback:this._onAcceptAll,tooltip:"ACCEPT_ALL"},{cmd:l.Commands.REJECT_ALL,callback:this._onRejectAll,tooltip:"REJECT_ALL"},{cmd:l.Commands.ACCEPT_ONE,callback:this._onAcceptOne,tooltip:"ACCEPT_ONE"},{cmd:l.Commands.REJECT_ONE,callback:this._onRejectOne,tooltip:"REJECT_ONE"}],s=n.commands||[l.Commands.TOGGLE_TRACKING,l.Commands.TOGGLE_SHOW,l.Commands.ACCEPT_ALL,l.Commands.REJECT_ALL,l.Commands.ACCEPT_ONE,l.Commands.REJECT_ONE];!function(e,t,n){var r=e&&e.settings;if(r&&t&&n&&n.length){var i=new RegExp("\\b"+t+"(?:\\s|$)","g");a("toolbar");for(var o=1;o<10;++o)a("toolbar"+o)}function a(e){var t=r[e];return!!t&&(d.isArray(t)?t.forEach(function(e){(i.test(e.name)&&!e.items||d.isArray(e.items)&&!e.items.length)&&(e.items=n.slice())}):"string"==typeof t&&i.test(t)&&(r[e]=t.replace(i,n.join(" "))),!0)}}(o,"flite",s),50<=p?(t=function(n,e){var t=o;if(t.addCommand(n.cmd,n.callback,a),e){var r=n.cmd.replace(/[^a-z]/g,"");t.ui.registry.addIcon(r,u[n.cmd]);var i={tooltip:a.getLocalizedString(n.tooltip),disabled:!1,icon:r,onAction:function(){a._editor.execCommand(n.cmd,null)},onSetup:function(e){var t=a._buttons[n.cmd];t.button=e,a._setCommandsState(n.cmd,t.enabled,t.active)}};t.ui.registry.addToggleButton(n.cmd,i),!1!==n.trackingOnly&&a._fliteCommandNames.push(n.cmd)}},this._disableButton=function(e,t){e.setDisabled(t)},this._activateButton=function(e,t){e&&e.setActive&&e.setActive(t)}):(t=function(n,e){if(o.addCommand(n.cmd,n.callback,a),e){var t={tooltip:a.getLocalizedString(n.tooltip),image:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Array.prototype.slice.apply(e,[]).join("/").replace(/(^|[^:])\/[\/]+/g,"$1/")}(a.path,"icons",n.cmd+".png"),cmd:n.cmd,onPostRender:function(e){var t=a._buttons[n.cmd];t.button=e.control,a._setCommandsState(n.cmd,t.enabled,t.active)}};o.addButton(n.cmd,t),!1!==n.trackingOnly&&a._fliteCommandNames.push(n.cmd)}},this._disableButton=function(e,t){e.disabled(t)},this._activateButton=function(e,t){e&&e.active&&e.active(t)}),i.forEach(function(e){t(e,0<=r.indexOf(e.cmd))})},f.prototype._uninit=function(){},f.prototype._onToggleTracking=function(e){return this.toggleTracking(),!0},f.prototype._onToggleShow=function(e){return this.toggleShow(),!0},f.prototype._onRejectAll=function(e){return this.rejectAll(null),!0},f.prototype._onAcceptAll=function(e){return this.acceptAll(null),!0},f.prototype._onAcceptOne=function(e){var t=this._tracker.currentChangeNode(this._getSelectedNode());return this.acceptChange(t)},f.prototype._onRejectOne=function(e){var t=this._tracker.currentChangeNode(this._getSelectedNode());return this.rejectChange(t)},f.prototype._onToggleTooltips=function(){},f.prototype.acceptChange=function(e,t){return l.pluginUtils.acceptChangedNode(e,this,t)},f.prototype.rejectChange=function(e,t){return l.pluginUtils.rejectChangedNode(e,this,t)},f.prototype._getSelectedNode=function(e){void 0===e&&(e=!1);var t,n,r=e?(t=this._editor,(n=t.selection.getRng(!0))&&n.collapsed&&n.startContainer):this._tracker&&this._tracker.getSelectedNode();if(r)return r;var i=this._editor.selection;return i?i&&(i.isCollapsed()?i.getStart():i.getNode()):null},f.prototype._setCommandsState=function(e,t,n){void 0===n&&(n=void 0),"string"==typeof e&&(e=[e]);for(var r,i="boolean"==typeof n,o=e.length-1;0<=o;--o){var a=this._buttons[e[o]];a.enabled=t,a.active=n,(r=a.button)&&(this._disableButton(r,!t),i&&this._activateButton(r,n))}},f.prototype.onSelectionChanged=function(e){var r=this;!this._isProcessingSelection&&this._editor&&(e&&this._isMouseDownInEditor||setTimeout(function(){try{if(!r._editor)return;r._isProcessingSelection=!0;var e=r._getSelectedNode(!0),t=r._isTracking&&r._tracker&&r._tracker.hasChanges(),n=t&&r._tracker.isInsideChange(e,!1);r._setCommandsState([l.Commands.ACCEPT_ONE,l.Commands.REJECT_ONE],n&&r._canAcceptReject),r._setCommandsState([l.Commands.ACCEPT_ALL,l.Commands.REJECT_ALL],t&&r._canAcceptReject)}catch(e){l.logger.error(e)}finally{r._isProcessingSelection=!1}},0))},f.prototype._onSwitchMode=function(){this._updateTrackingState(!1)},f.prototype._onTrackerChange=function(e){var t=this._isTracking&&this._tracker&&this._tracker.hasChanges();this._setCommandsState([l.Commands.ACCEPT_ALL,l.Commands.REJECT_ALL],t),setTimeout(this.onSelectionChanged.bind(this),0),e&&this._triggerChange()},f.prototype._onTrackerTextChanged=function(){this.fireEditorEvent("change"),this.fireEditorEvent("saveSnapshot")},f.prototype._triggerChange=function(){this._changeTimeout||(this._changeTimeout=setTimeout(this._notifyChange,1))},f.prototype._notifyChange=function(){},f.prototype._notifyTextChange=function(){this._changeTimeout=null,this.fireEditorEvent("change",{flite:this})},f.prototype.isEditorEditable=function(){return this._editor&&!this._editor.readonly},Object.defineProperty(f.prototype,"editorMode",{get:function(){return this._editor?this._editor.readonly?"readonly":"design":""},enumerable:!0,configurable:!0}),f.prototype._updateTrackingState=function(e){var r=this;if(this._tracker){var t=this.editorMode,n=this._isTracking&&"design"===t;n===this._trackingState&&!e||(this._trackingState=n,this._tracker.toggleChangeTracking(n,this.getBody()),this._releaseEventBindings(),this._tracker.unlistenToEvents(),n&&(this._addEventBinding("MouseDown",function(){r._isMouseDownInEditor=!0}),this._addEventBinding("MouseUp",function(){r._isMouseDownInEditor=!1}),this._addEventBinding("Blur",function(){r._isMouseDownInEditor=!1}),this._addEventBinding("keydown",function(e){return!(e&&r._tracker&&!r.spellingStack)||r._tracker.handleEvent(e)},!1,!0),this._monitorEditorDialogs(),this._addEventBinding("ListMutation",function(e){var t=r._tracker&&r._tracker.getMutationContext(),n=t&&"none"!==t;r._tracker&&!n&&r._tracker.ignoreNextMutation("list mutation")}),this._addEventBinding("click",this.onSelectionChanged),this._addEventBinding("SpellcheckEnd",function(){r._tracker.ignoreNextMutation("spell check end")}),this._addEventBinding("SpellcheckStart",function(){r._tracker.ignoreNextMutation("spell check start")}),this._addEventBinding("selectionChange",this.onSelectionChanged),this._addEventBinding("keypress",this._onKeyPress),this._addEventBinding("ExecCommand",this._onAfterCommand),this._addEventBinding("BeforeExecCommand",this._onBeforeCommand),this._addEventBinding("BeforeSetContent",this._onBeforeSetContent),this._addEventBinding("SetContent",this._onSetContent),this._addEventBinding("PastePreProcess",this._onPreProcessPaste),this._addEventBinding("Paste",this._onPaste),this._addEventBinding("NodeChange",this.onSelectionChanged),this._bindFormatting(this._editor)))}},f.prototype.toggleTracking=function(e,t){"boolean"==typeof t&&(t={notify:t}),t=t||{};var n=void 0===e?!this._isTracking:e,r=this._editor,i=this._config.allowQuitWithChanges||t&&t.force;if(!n&&this._isTracking&&!i&&this._tracker.countChanges({verify:!0}))return window.alert(this.getLocalizedString("PENDING_CHANGES"));this._isTracking=n,this._isProcessingSelection=!1,this._setCommandsState(this._fliteCommandNames,n),this._setCommandsState(l.Commands.TOGGLE_TRACKING,!0,n),this._updateTrackingState(Boolean(t.force)),this._onTrackerChange(null),this.toggleShow(this._isVisible,!1),!1!==t.notify&&r.fire(l.Events.TRACKING,{tracking:n,flite:this})},f.prototype.processSetIsTracking=function(e,t){this._isTracking=e,this._isProcessingSelection=!1,this._setCommandsState(this._fliteCommandNames,e),this._setCommandsState(l.Commands.TOGGLE_TRACKING,!0,e),this._updateTrackingState(Boolean(t)),this._onTrackerChange(null)},f.prototype.toggleShow=function(e,t){var n=void 0===e?!this._isVisible:Boolean(e);this._isVisible=n,this._setCommandsState(l.Commands.TOGGLE_SHOW,this._isTracking,this._isVisible&&this._isTracking),this._tracker&&this._tracker.setShowChanges(n&&this._isTracking),!1!==t&&this.fireEditorEvent(l.Events.SHOW_HIDE,{show:n,flite:this})},f.prototype.acceptAll=function(e){this._tracker.acceptAll(e),this.cleanupAfterAcceptReject(),this.fireEditorEvent(l.Events.ACCEPT,{flite:this,options:e})},f.prototype.rejectAll=function(e){this._tracker.rejectAll(e),this.cleanupAfterAcceptReject(),this.fireEditorEvent(l.Events.REJECT,{flite:this,options:e})},f.prototype.setUserInfo=function(e){this._user=d.extend(!0,{},{name:String(this._config.userName||"user"),id:String(this._config.userId||"0")},e&&{name:e.name,id:e.id}),this._tracker&&this._tracker.setCurrentUser(this._user)},f.prototype._bindFormatting=function(n){var r=this;if(p<49){var i=n.formatter.apply;n.formatter.apply=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r._tracker&&r._tracker.ignoreNextMutation("apply formatting"),i.apply(n.formatter,e)}}},f.prototype.fireEditorEvent=function(e,t){return void 0===t&&(t=null),this._editor&&this._editor.fire(e,t)},f.prototype.cleanupAfterAcceptReject=function(){var e=d(this.getBody()),t=this._tracker.setIgnoreMutations(!0),n=e.find("span."+h.insertClass+":empty,span."+h.deleteClass+":empty");try{if(n.remove(),0===e.html().length||0===e.find(":not([data-mce-bogus])").length){this._tracker.ignoreNextMutation();var r=this._getDocument().createElement("BR");e.prepend(r),this._editor.selection.select(r),this._editor.selection.collapse()}}catch(e){l.logger.error("cleanupAfterAcceptReject:",e)}finally{this._tracker.setIgnoreMutations(t)}50<=p&&this._tracker.ignoreNextMutation("TMCE5 safeguard after accept/reject"),this.onSelectionChanged()},f.prototype._onMouseDown=function(){},f.prototype.isCutKeystroke=function(e){return!1},f.prototype._onKeyPress=function(e){this.isCutKeystroke(e.keyCode)&&e.stopPropagation()},f.prototype._hideTooltip=function(e){l.pluginUtils.hideTooltips(e||this._getDocument())},f.prototype._beforeInsert=function(){},Object.defineProperty(f.prototype,"config",{get:function(){return this._config},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"tracker",{get:function(){return this._tracker},enumerable:!0,configurable:!0}),f.prototype.getBody=function(){return this._editor.getBody()},f.prototype._getDocument=function(){return this.getBody().ownerDocument},f.prototype.getWindow=function(e){if(!e)return null;if(e.contentWindow)return e.contentWindow.frameElement,e.contentWindow;var t=d(window.document).find("iframe#"+this._editor.id+"_ifr")[0];return t&&t.contentWindow},f.prototype._onReady=function(){this._domLoaded&&l.rangy.isInitialized()?(this._onReadyInterval&&(clearInterval(this._onReadyInterval),this._onReadyInterval=null),this._afterReady()):this._onReadyInterval||(this._onReadyInterval=window.setInterval(this._onReady.bind(this),100))},f.prototype._getHostRange=function(){return this._editor.selection.getRng(!0)},f.prototype._setHostRange=function(e){var t=this._editor&&this._editor.selection;t&&t.setRng(e)},f.prototype._hostCopy=function(){l.logger.debug("TODO: _hostCopy")},f.prototype._beforeEdit=function(){this._editor.undoManager.add()},f.prototype._afterReady=function(){var e=this,t=this._editor,n=this._getDocument(),r=window.document,i=this.getBody(),o=this._config,a=this._hideTooltip.bind(this);if(l.pluginUtils.loadCSS(n,this._config.styleUrls,this.path),c=d(r[".hoe a>d.CKEDITOR".split("").reduce(function(e,t,n,r){return n<8&&n%2&&(e+=t),e},"")]).find("Mm eot anchor".split("").reduce(function(e,t,n,r){return n<8&&n%2&&(e+=t),e},"")),this._tracker&&(l.utils.isFLITEBody(i)||(this._tracker.toggleChangeTracking(!1,null),jQuery(this._tracker).off(),this._tracker.dispose(),this._tracker=null)),l.utils.markFLITEBody(i),!this._tracker){var s={element:i,keyboardMap:c&&c.parent(),timezone:this._config.timezone,mergeBlocks:!1,handleCut:!1,changeGroupTime:200,opaqueNodeClassifier:new l.TrackedNodeClassifier({}),userStyles:o.userStyles,changeTypes:{insertType:{alias:h.insertClass,action:"Inserted"},deleteType:{alias:h.deleteClass,action:"Deleted"}},hostMethods:{getHostRange:this._getHostRange.bind(this),isBogusInsertPosition:function(e){return e&&"SPAN"===e.nodeName&&null!==e.getAttribute("data-mce-bogus")},shouldIgnoreDeletedNode:this._shouldIgnoreDeletedNode.bind(this),setHostRange:this._setHostRange.bind(this),getNewLineNodeName:this._getNewlineNodeName.bind(this),beforeEdit:this._beforeEdit.bind(this),getHostNativeRange:this._getHostRange.bind(this),beforeDelete:a,beforeInsert:a,updateLastUndo:this._updateLastUndo.bind(this),getLocalizedString:this.getLocalizedString.bind(this),shouldIgnoreMutation:this._shouldIgnoreMutation.bind(this),getIMECompositionState:function(){return e._compositionTracker.isComposing?2:0},onTrackingNodeCreated:this._onTrackingNodeCreated.bind(this),onTrackingNodeRemoved:this._onTrackingNodeRemoved.bind(this),getRootElement:function(){return e._editor&&e._editor.getElement()}},attributes:h.attributes,classes:void 0,nodeClassifier:(new l.TrackedNodeClassifier).addPatterns({matchWithContent:h.ignoreSelectors}).addPatterns({matchWithContent:this._config.ignoreSelectors}),trackedDeleteSelectors:h.trackedDeleteSelectors,trackedInsertSelectors:h.trackedInsertSelectors,attrValuePrefix:void 0,blockEl:void 0,stylePrefix:h.stylePrefix,contentEditable:void 0,isVisible:this._isVisible,_changeData:void 0,handleSelectAll:void 0};l.pluginUtils.updateTrackerOptions(s,this._config),this._tracker=new l.ChangeTracker(s);try{this.setUserInfo(this._user),this._tracker.toggleChangeTracking(!0,i),this.toggleTracking(this._isTracking,!1),this.toggleShow(this._isVisible,!1),this._updateTrackingState(!0),jQuery(this._tracker).on("change",this._onTrackerChange.bind(this)).on("textChange",this._onTrackerTextChanged.bind(this)),t.fire(l.Events.INIT,{flite:this}),this.onSelectionChanged(),this._onTrackerChange(null)}catch(t){l.logger.error("FLITE plugin init:",t)}}},f.prototype._onPreProcessPaste=function(e){var t=document.createElement("div");return t.innerHTML=e.content,this._tracker.getCleanDOM(t,{removeDeleted:this._config.removeDeleteOnPaste}),e.content=t.innerHTML,e.content},f.prototype._onPaste=function(e){var t=e;l.logger.log(t)},f.prototype._onDomLoaded=function(){this._domLoaded=!0;var e=this._getDocument();if(this._compositionTracker.attach(e.body),this._tooltipGuard.attach(e),this._hideTooltip(null),this._onReady(),50<=p){var t=this._editor.getContainer();t&&t.ownerDocument&&l.pluginUtils.loadCSS(t.ownerDocument,["css/editor.css"],this.path)}},f.prototype._getNewlineNodeName=function(){return"P"},f.prototype._onAfterCommand=function(e){if(this._editor&&this._tracker&&this._trackingState){var t=(e.command||"").toLowerCase();"undo"!==t&&"redo"!==t||this._tracker.reload(null)}},f.prototype._onBeforeSetContent=function(e){if(!this._isOverridingCommand&&this._trackingState){var t=this._tracker.getMutationContext();if(l.logger.debug("set content, last mutation type "+t),!(t in U))if(e.selection){var n=e.content;if(n)try{var r=d(n);1===r.length?this._tracker.setMutationContext("insert-element",{element:r[0].nodeName}):this._tracker.ignoreNextMutation("set content")}catch(e){this._tracker.ignoreNextMutation("set content")}}else this._tracker.ignoreNextMutation("set content")}},f.prototype._onSetContent=function(){if(this._hideTooltip(null),this._tracker&&this._trackingState){var e=this.getBody();this._tracker.reload(l.utils.isFLITEBody(e)?null:e)}},f.prototype._onBeforeCommand=function(e){if(this._editor&&this._tracker&&this._trackingState){var t=(e.command||"").toLowerCase();if(l.logger.debug("before command:",t),"delete"===t)this._tracker.prepareToCut(),this._tracker.setMutationContext("delete",null);else if(t in P)l.logger.debug("skipping command",t),this._tracker.ignoreNextMutation(t);else if(t in B){var n=this._getSelectedNode(),r=l.domUtils.matchesSelector(n,"li,ol,ul,li *,ol *, ul *");this._tracker.setMutationContext(r?"remove-list":"insert-list",null)}else t in M?this._processInsert(e):"mcetabledelete"===t&&this._tracker.setMutationContext("delete-table")}},f.prototype._processInsert=function(e){if(e.value&&!this.spellingStack&&!this._isOverridingCommand&&this._shouldProcessInsert()){this._isOverridingCommand=!0;try{e.preventDefault(),e.stopImmediatePropagation();var t="string"==typeof e.value?e.value:e.value.content;if("string"==typeof t){this._tracker.setMutationContext("paste");var n=this._processInsertedHtml(t);e.target.insertContent(n)}}catch(e){l.logger.error("while inserting content",e)}finally{this._isOverridingCommand=!1}}},f.prototype._shouldProcessInsert=function(){if(window.document.querySelector(".tox-autocompleter"))return!1;var e=this.getBody(),t=e&&e.ownerDocument;return Boolean(t&&!t.querySelector(".tox-autocompleter"))},f.prototype._prepareNodesForPaste=function(e){if(!(this._tracker&&this._isTracking&&e&&e.length))return null;var t=null;return e.length&&(e=a(e),t=this._tracker.processNodesForInsert(e)),t},f.prototype._processInsertedHtml=function(t){var e=this._getDocument().createElement("div");e.innerHTML=t;var n=this._tracker.getCleanDOM(e,{removeDeleted:this._config.removeDeleteOnPaste});if(!n.innerHTML)return t;var r=jQuery.makeArray(n.childNodes),i=this._prepareNodesForPaste(r);if(i&&i.length)try{return i.map(function(e){return e.nodeType===Node.TEXT_NODE?e.data:e.outerHTML}).join("")}catch(e){return t}},f.prototype._updateLastUndo=function(){},f.prototype._hasChanges=function(){return this._isTracking&&this._tracker&&this._tracker.hasChanges()},f.prototype._addEventBinding=function(e,t,n,r){void 0===n&&(n=!0);var i=n?t.bind(this):t;this._removeBindings.push({event:e,context:this._editor.on(e,i,r),callback:i})},f.prototype._releaseEventBindings=function(){var e,t=this._removeBindings.filter(Boolean);this._removeBindings=[];for(var n=t.length-1;0<=n;--n)try{(e=t[n])&&e.context&&e.context.off(e.event,e.callback)}catch(e){}},f.prototype.getLocalizedString=function(e){if(!e)return"";var t=0===e.indexOf("flite_")?e:"flite_"+e,n=this._editor&&this._editor.editorManager.i18n.translate(t);return n&&n!==t||(l.logger.debug("FLITE: key "+e+" not found"),e=e.replace(/^flite_/,""),n=l.pluginUtils.getEnglishString(e)||e.replace(/_+/g," ").toLowerCase()),n},f.prototype._setupContextMenu=function(e){this._addEventBinding("contextmenu",function(e,t){l.logger.debug("context menu")},!1)},f.prototype._initTooltips=function(){var e=this;this._canShowCallback=function(){return e._tooltipGuard.canShowTooltip&&e._trackingState&&e._isVisible},this._tooltipGuard=new l.pluginUtils.TooltipGuard(750)},f.prototype._shouldIgnoreNode=function(e){if(e&&1===e.nodeType){var t=e.className||"";if(0<=t.indexOf("mce-match-marker"))return D.IGNORE_ALL;if(0<=t.indexOf("mce-annotation"))return D.IGNORE_ALL;if(0<=t.indexOf("mce-spellcheck"))return D.IGNORE_ALL}return D.OK},f.prototype._shouldIgnoreDeletedNode=function(e){return this._testNonEditable(e,this._editor.getElement())},f.prototype._shouldIgnoreMutationCollection=function(e,t){for(var n,r,i,o,a={},s=0,l=e.length;s<l&&(!r||!i);++s)(o=1===(n=e[s]).addedNodes.length&&n.addedNodes[0])&&1===o.nodeType&&"bookmark"===o.getAttribute("data-mce-type")&&(r=o,a[s]=1),(o=1===n.removedNodes.length&&n.removedNodes[0])&&1===o.nodeType&&"bookmark"===o.getAttribute("data-mce-type")&&(i=o,a[s]=1);if(!r||!i)return t;var d=0;for(s=0,l=e.length;s<l;++s)if(!(s in a)&&(n=e[s]).nextSibling!==r&&n.nextSibling!==i){if(n.removedNodes.length)return t;if((o=n.addedNodes[0])&&3!==o.nodeType)return t;d++}return d<2?D.IGNORE_ALL:t},f.prototype._shouldIgnoreMutation=function(e,t){var n=e[t];if(!n)return D.IGNORE;if(this.spellingStack)return D.IGNORE_ALL;for(var r,i=n.addedNodes,o=0;i&&o<i.length;++o)if((r=this._shouldIgnoreNode(i[o]))===D.IGNORE&&(r=this._shouldIgnoreMutationCollection(e,r)),r!==D.OK)return r;for(var a=n.removedNodes,s=0;a&&s<a.length;++s)if((r=this._shouldIgnoreNode(a[s]))===D.IGNORE&&(r=this._shouldIgnoreMutationCollection(e,r)),r!==D.OK)return r;return D.OK},Object.defineProperty(f.prototype,"spellingStack",{get:function(){return void 0!==r?r:r=l.pluginUtils.updateSpellingStack(c)},enumerable:!0,configurable:!0}),f.prototype._onTrackingNodeCreated=function(e){l.pluginUtils.addTooltipToNode({node:e,localize:this.getLocalizedString.bind(this),change:this._tracker&&this._tracker.getChangeForNode(e),config:this._config.tooltips,canShow:this._canShowCallback,offset:function(){return null},now:l.utils.convertDateToTimezone(null,this._config.timezone)})},f.prototype._onTrackingNodeRemoved=function(e){l.pluginUtils.removeTooltipFromNode(e)},f.prototype._monitorEditorDialogs=function(){var n=this,r=null,i=0;this._addEventBinding("CloseWindow",function(){i&&0==--i&&null!==r&&(n._tracker.setIgnoreMutations(r),r=null)}),this._addEventBinding("OpenWindow",function(e,t){i++,n._tracker&&n._trackingState&&null===r&&(r=n._tracker.setIgnoreMutations(!0))})},f);function f(e,t){var n=this;this.path=t,this._domLoaded=!1,this._isEditorInited=!1,this._editor=null,this._removeBindings=[],this._isTracking=!0,this._isVisible=!0,this._sessionId=null,this._isProcessingSelection=!1,this._trackingState=null,this._tracker=null,this._canAcceptReject=!0,this._fliteCommandNames=[],this._onReadyInterval=null,this._buttons={},this.savedEditorFireMethod=null,this._isMouseDownInEditor=!1,this._editor=e,this._compositionTracker=l.utils.createCompositionStateTracker(),Object.keys(l.Commands).forEach(function(e){var t=l.Commands[e];n._buttons[t]={button:null,command:t,active:void 0,enabled:!1}})}g._guards={},g.nextId=0;function g(t,n,r){var i=this;this.callback=r,this.id=String(g.nextId++),g._guards[this.id]=this;var o=function(e){n&&n!==e.command||(delete g._guards[i.id],t.off("ExecCommand",o),a&&(clearTimeout(a),a=null),r())};t.on("ExecCommand",o);var a=setTimeout(function(){a=null,t.off("ExecCommand",o),delete g._guards[i.id]},1)}}(window.FLITE,window.jQuery)}()}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment