"use strict";function polyfill(){function v(n){return new RegExp("MSIE |Trident/|Edge/").test(n)}function s(n,t){this.scrollLeft=n;this.scrollTop=t}function y(n){return.5*(1-Math.cos(Math.PI*n))}function u(n){if(n===null||(typeof n=="undefined"?"undefined":_typeof(n))!=="object"||n.behavior===undefined||n.behavior==="auto"||n.behavior==="instant")return!0;if((typeof n=="undefined"?"undefined":_typeof(n))==="object"&&n.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+n.behavior+" is not a valid value for enumeration ScrollBehavior.");}function h(n,t){return t==="Y"?n.clientHeight+e<n.scrollHeight:t==="X"?n.clientWidth+e<n.scrollWidth:void 0}function c(t,i){var r=n.getComputedStyle(t,null)["overflow"+i];return r==="auto"||r==="scroll"}function p(n){var t=h(n,"Y")&&c(n,"Y"),i=h(n,"X")&&c(n,"X");return t||i}function w(n){var i;do n=n.parentNode,i=n===t.body;while(i===!1&&p(n)===!1);return i=null,n}function l(t){var e=o(),r,u,f,i=(e-t.startTime)/a;i=i>1?1:i;r=y(i);u=t.startX+(t.x-t.startX)*r;f=t.startY+(t.y-t.startY)*r;t.method.call(t.scrollable,u,f);(u!==t.x||f!==t.y)&&n.requestAnimationFrame(l.bind(n,t))}function f(i,u,f){var e,h,c,a,v=o();i===t.body?(e=n,h=n.scrollX||n.pageXOffset,c=n.scrollY||n.pageYOffset,a=r.scroll):(e=i,h=i.scrollLeft,c=i.scrollTop,a=s);l({scrollable:e,method:a,startTime:v,startX:h,startY:c,x:u,y:f})}var n=window,t=document,e;if(!("scrollBehavior"in t.documentElement.style)||n.__forceSmoothScrollPolyfill__===!0){var i=n.HTMLElement||n.Element,a=468,r={scroll:n.scroll||n.scrollTo,scrollBy:n.scrollBy,elementScroll:i.prototype.scroll||s,scrollIntoView:i.prototype.scrollIntoView},o=n.performance&&n.performance.now?n.performance.now.bind(n.performance):Date.now;e=v(n.navigator.userAgent)?1:0;n.scroll=n.scrollTo=function(){if(arguments[0]!==undefined){if(u(arguments[0])===!0){r.scroll.call(n,arguments[0].left!==undefined?arguments[0].left:_typeof(arguments[0])!=="object"?arguments[0]:n.scrollX||n.pageXOffset,arguments[0].top!==undefined?arguments[0].top:arguments[1]!==undefined?arguments[1]:n.scrollY||n.pageYOffset);return}f.call(n,t.body,arguments[0].left!==undefined?~~arguments[0].left:n.scrollX||n.pageXOffset,arguments[0].top!==undefined?~~arguments[0].top:n.scrollY||n.pageYOffset)}};n.scrollBy=function(){if(arguments[0]!==undefined){if(u(arguments[0])){r.scrollBy.call(n,arguments[0].left!==undefined?arguments[0].left:_typeof(arguments[0])!=="object"?arguments[0]:0,arguments[0].top!==undefined?arguments[0].top:arguments[1]!==undefined?arguments[1]:0);return}f.call(n,t.body,~~arguments[0].left+(n.scrollX||n.pageXOffset),~~arguments[0].top+(n.scrollY||n.pageYOffset))}};i.prototype.scroll=i.prototype.scrollTo=function(){if(arguments[0]!==undefined){if(u(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===undefined)throw new SyntaxError("Value could not be converted");r.elementScroll.call(this,arguments[0].left!==undefined?~~arguments[0].left:_typeof(arguments[0])!=="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==undefined?~~arguments[0].top:arguments[1]!==undefined?~~arguments[1]:this.scrollTop);return}var n=arguments[0].left,t=arguments[0].top;f.call(this,this,typeof n=="undefined"?this.scrollLeft:~~n,typeof t=="undefined"?this.scrollTop:~~t)}};i.prototype.scrollBy=function(){if(arguments[0]!==undefined){if(u(arguments[0])===!0){r.elementScroll.call(this,arguments[0].left!==undefined?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==undefined?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}};i.prototype.scrollIntoView=function(){if(u(arguments[0])===!0){r.scrollIntoView.call(this,arguments[0]===undefined?!0:arguments[0]);return}var i=w(this),e=i.getBoundingClientRect(),o=this.getBoundingClientRect();i!==t.body?(f.call(this,i,i.scrollLeft+o.left-e.left,i.scrollTop+o.top-e.top),n.getComputedStyle(i).position!=="fixed"&&n.scrollBy({left:e.left,top:e.top,behavior:"smooth"})):n.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}}}function _toConsumableArray(n){if(Array.isArray(n)){for(var t=0,i=Array(n.length);t<n.length;t++)i[t]=n[t];return i}return Array.from(n)}function _classCallCheck(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function escapeRegExp(n){return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function triggerEvent(n){if(n.target.closest("[data-popup-trigger]")!=undefined){n.stopImmediatePropagation();n.stopPropagation();n.preventDefault();var t=n.target.closest("[data-popup-trigger]"),r=t.getAttribute("data-popup-trigger"),i=!1;n.screenX==0&&n.screenY==0&&(i=!0);triggerPopup({hash:r,trigger:t,keyboard:i})}}function triggerPopup(n){function b(){var n=new CustomEvent("popup:open",{target:u,bubbles:!0});r.addEventListener("popup:open",function(){l&&i.parentElement.insertBefore(e,i);u.appendChild(v);u.appendChild(i);a.appendChild(u);this.appendChild(a);document.querySelector(".pageWrap").classList.add("is-blurred");document.querySelector("html").classList.add("no-scroll");document.querySelector("html").classList.add("popup-open");this.style.display="block";attachModalFocusTrap(r);w&&u.setAttribute("tabindex",0).focus()});document.querySelector(".pageWrap").parentElement.appendChild(r);r.dispatchEvent(n)}function o(){var n=new CustomEvent("popup:close",{target:u,bubbles:!0});r.addEventListener("popup:close",function(){r.style.display="none";l&&(e.parentElement.insertBefore(i,e.nextSibling),e.parentElement.removeChild(e),t!=""&&t.matches("[data-video]")&&(i.removeChild(i.querySelector("iframe")),u.classList.remove("is-loaded")));r.parentElement.removeChild(r);f.callbackPopup!==""?triggerPopup({hash:f.callbackPopup}):f.callbackPopupData!==""?triggerPopup({data:f.callbackPopupData}):t!=""&&t.matches("[data-callback-popup]")?triggerPopup({hash:$trigger.getAttribute("data-callback-popup")}):t!=""&&t.matches("[data-callback-popup-data]")&&triggerPopup({data:$trigger.getAttribute("data-callback-popup-data")});document.querySelector(".pageWrap").classList.remove("is-blurred");document.querySelector("html").classList.remove("no-scroll");document.querySelector("html").classList.remove("popup-open")});r.dispatchEvent(n)}var f=deepExtend({hash:"",data:"",callbackPopup:"",callbackPopupData:"",trigger:"",keyboard:!1},n),c,s,y,h,p;if(document.querySelectorAll(".popup").length)for(c=[].concat(_toConsumableArray(document.querySelectorAll(".popup"))),s=0;s<c.length;s++)y=c[s],y.querySelector(".popup-close").click();var t=f.trigger,w=f.keyboard,i=void 0,l=!1;if(f.data===""?(i=document.querySelector(f.hash),l=!0):i=createElement(f.data)[0],i==null){console.error("Popup data not found");return}var e=document.createElement("placeholder"),r=createElement('<div class="popup"><\/div>')[0],a=createElement('<div class="popup-overlay"><\/div>')[0],u=createElement('<div class="popup-content"><\/div>')[0],v=createElement('<div class="popup-close" tabindex="0"><\/div>')[0];e.style.display="none";r.style.display="none";i.matches("[data-width]")&&(u.style.width=i.getAttribute("data-width")+"px");t!=""&&t.matches("[data-width]")&&(u.style.width=t.getAttribute("data-width")+"px");t!=""&&t.matches("[data-target]")&&(h=i.querySelector(".externalLink"),h.setAttribute("href",t.getAttribute("data-target")),h.setAttribute("target","_blank"),h.addEventListener("click",function(){o()}));t!=""&&t.matches("[data-video]")&&(p=createElement('\n      <iframe\n        src="'+t.getAttribute("data-video")+"\"\n        onload=\"this.closest('.popup-content').classList.add('is-loaded')\">\n      <\/iframe>")[0],i.appendChild(p),u.classList.add("popup-content--video"));i.querySelectorAll(".js-closePopup").length&&i.querySelector(".js-closePopup").addEventListener("click",function(n){n.preventDefault();o();n.screenX==0&&n.screenY==0&&t.length&&t.setAttribute("tabindex",0).focus()});v.addEventListener("click",function(){o()});v.addEventListener("keypress",function(n){n.which==13&&(o(),console.log(t),t!=""&&(t.setAttribute("tabindex",0),t.focus()))});a.addEventListener("click",function(n){n.target.matches(".popup-overlay")&&o()});b()}function attachModalFocusTrap(n){var e,o;if(n!==null){var i=n.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),r=i[0],u=i[i.length-1],t=n.querySelector(".groupModal-button"),s=n.querySelector(".groupModal__link-button"),f=n.querySelector(".popup-close");i&&i.length&&(r.focus(),e=document.addEventListener("keydown",function(n){var t=(n.key||"").toLowerCase()==="tab";if(t){if(document.activeElement===r&&n.shiftKey){n.preventDefault();u.focus();return}if(document.activeElement===u){n.preventDefault();r.focus();return}}}),o=document.addEventListener("keydown",function(n){var r=(n.key||"").toLowerCase()==="enter",u=document.activeElement.type==="checkbox",i;if(r&&u){i=n.target.checked;i?(t.setAttribute("data-href",t.getAttribute("href")),t.removeAttribute("href")):(t.setAttribute("href",t.getAttribute("data-href")),t.removeAttribute("data-href"));n.target.checked=!i;return}}),[s,f].forEach(function(n){var t=n.addEventListener("keydown",function(i){var r=(i.key||"").toLowerCase()==="enter";r&&(f.click(),document.removeEventListener("keydown",o),document.removeEventListener("keydown",e),n.removeEventListener("keydown",t))})}))}}function processActiveTab(n){var i=n.attr("data-trigger");if(!n.hasClass("is-selected")){var t=n.closest(".tabsUtil"),r=t.find(".is-selected"),u=t.find($("[data-trigger^='"+i+"']")),f=t.find($(".tabsUtil-contentItem[data-target^='"+i+"']"));r.removeClass("is-selected");r.attr("aria-selected","false");u.addClass("is-selected");u.attr("aria-selected","true");t.find($(".tabsUtil-contentItem")).removeClass("is-open");f.addClass("is-open is-opening");f.children().first()[0].focus();setTimeout(function(){$(".tabsUtil-contentItem").removeClass("is-opening")},800)}}function initTabs(){$(".tabsUtil").length>0&&($(".tabsUtil-trigger").each(function(n){var t=$(this);$(this).attr("id","tab-trigger-"+n);$(this).attr("aria-controls","tab-content-"+n);n===0?$(this).attr("aria-selected","true"):$(this).attr("aria-selected","false");$(this).attr("tabindex","0");$(this).attr("role","tab");$(this).attr("type","button");$(this)[0].addEventListener("keydown",function(n){n.key==="Enter"&&processActiveTab($(this))})}),$(".tabsUtil-contentItem").each(function(n){var t,i;$(this).append('<span class="tabsUtil-lastFocusHack" tabindex="0"><\/span>');$(this).children().first().attr("tabindex","0");$(this).attr("id","tab-content-"+n);$(this).attr("aria-labelledby","tab-trigger-"+n);$(this).attr("role","tabpanel");t=[].concat(_toConsumableArray($(this)[0].querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])'))).filter(function(n){return!n.hasAttribute("disabled")&&!n.getAttribute("aria-hidden")});i=t[t.length-1];i.addEventListener("focus",function(){$(".tabsUtil-trigger.is-selected").next()[0]?$(".tabsUtil-trigger.is-selected").next()[0].focus():$(".contributeBar-help").focus()})}),$(".tabsUtil-triggerList").removeClass("is-selected"),$(".tabsUtil-trigger:first-child").addClass("is-selected"),$(".tabsUtil-contentItem:first-of-type").addClass("is-open"))}function initAnalyticsTracking(){ArthritisAnalytics.initSearchTracking();ArthritisAnalytics.initDonationTracking()}function cleanFooter(){var n,e,i,r;if(window.matchMedia("(min-width: 1100px)").matches){var o=[].concat(_toConsumableArray(document.querySelectorAll(".footerMain-nav"))),t=!0,u=!1,f=undefined;try{for(n=o[Symbol.iterator]();!(t=(e=n.next()).done);t=!0)i=e.value,r=i.querySelector(".footerMain-navContent"),i.classList.remove("is-active"),r.style.transition="",r.style.height=""}catch(s){u=!0;f=s}finally{try{!t&&n.return&&n.return()}finally{if(u)throw f;}}}}var _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},disableBodyScroll,objectFitImages,_createClass,touchmoved,FOCUSABLE_ELEMENTS,header,toggleInertBasedOnVisibility,observer,swipeEvent;!function(n){n.fn.fileuploader=function(t){return this.each(function(i,r){var e=n(r),o=null,h=null,s=null,c=[],f=n.extend(!0,{},n.fn.fileuploader.defaults,t),u={init:function(){return e.closest(".fileuploader").length||e.wrap('<div class="fileuploader"><\/div>'),o=e.closest(".fileuploader"),u.set("language"),u.set("attrOpts"),u.isSupported()?(!f.beforeRender||!n.isFunction(f.beforeRender)||!1!==f.beforeRender(o,e))&&(u.redesign(),f.files&&u.files.append(f.files),u.rendered=!0,f.afterRender&&n.isFunction(f.afterRender)&&f.afterRender(s,o,h,e),u.disabled||u.bindUnbindEvents(!0),void(u._itFl.length||u.reset())):(f.onSupportError&&n.isFunction(f.onSupportError)&&f.onSupportError(o,e),!1)},bindUnbindEvents:function(t){t&&u.bindUnbindEvents(!1);e[t?"on":"off"](u._assets.getAllEvents(),u.onEvent);f.changeInput&&h!==e&&h[t?"on":"off"]("click",u.clickHandler);f.dragDrop&&f.dragDrop.container.length&&(f.dragDrop.container[t?"on":"off"]("drag dragstart dragend dragover dragenter dragleave drop",function(n){n.preventDefault()}),f.dragDrop.container[t?"on":"off"]("drop",u.dragDrop.onDrop),f.dragDrop.container[t?"on":"off"]("dragover",u.dragDrop.onDragEnter),f.dragDrop.container[t?"on":"off"]("dragleave",u.dragDrop.onDragLeave));u.isUploadMode()&&f.clipboardPaste&&n(window)[t?"on":"off"]("paste",u.clipboard.paste);f.sorter&&f.thumbnails&&f.thumbnails._selectors.sorter&&u.sorter[t?"init":"destroy"]();e.closest("form")[t?"on":"off"]("reset",u.reset)},redesign:function(){if(h=e,f.theme&&o.addClass("fileuploader-theme-"+f.theme),f.changeInput){switch(_typeof(f.changeInput).toLowerCase()){case"boolean":h=n('<div class="fileuploader-input"><div class="fileuploader-input-caption"><span>'+u._assets.textParse(f.captions.feedback)+'<\/span><\/div><button type="button" class="fileuploader-input-button"><span>'+u._assets.textParse(f.captions.button)+"<\/span><\/button><\/div>");break;case"string":" "!=f.changeInput&&(h=n(u._assets.textParse(f.changeInput,f)));break;case"object":h=n(f.changeInput);break;case"function":h=n(f.changeInput(e,o,f,u._assets.textParse))}e.after(h);e.css({position:"absolute","z-index":"-9999",height:"0",width:"0",padding:"0",margin:"0","line-height":"0",outline:"0",border:"0",opacity:"0"})}f.thumbnails&&u.thumbnails.create();f.dragDrop&&(f.dragDrop="object"!=_typeof(f.dragDrop)?{container:null}:f.dragDrop,f.dragDrop.container=f.dragDrop.container?n(f.dragDrop.container):h)},clickHandler:function(n){n.preventDefault();u.clipboard._timer?u.clipboard.clean():e.click()},onEvent:function(t){switch(t.type){case"focus":o&&o.addClass("fileuploader-focused");break;case"blur":o&&o.removeClass("fileuploader-focused");break;case"change":u.onChange.call(this)}f.listeners&&n.isFunction(f.listeners[t.type])&&f.listeners[t.type].call(e,o)},set:function(t,i){var l,r,s,v,a;switch(t){case"attrOpts":for(l=["limit","maxSize","fileMaxSize","extensions","changeInput","theme","addMore","listInput","files"],r=0;r<l.length;r++){if(s="data-fileuploader-"+l[r],u._assets.hasAttr(s))switch(l[r]){case"changeInput":case"addMore":case"listInput":f[l[r]]=-1<["true","false"].indexOf(e.attr(s))?"true"==e.attr(s):e.attr(s);break;case"extensions":f[l[r]]=e.attr(s).replace(/ /g,"").split(",");break;case"files":f[l[r]]=JSON.parse(e.attr(s));break;default:f[l[r]]=e.attr(s)}e.removeAttr(s)}null==e.attr("disabled")&&null==e.attr("readonly")&&0!==f.limit||(u.disabled=!0);(!f.limit||f.limit&&2<=f.limit)&&(e.attr("multiple","multiple"),f.inputNameBrackets&&"[]"!=e.attr("name").slice(-2)&&e.attr("name",e.attr("name")+"[]"));!0===f.listInput&&(f.listInput=n('<input type="hidden" name="fileuploader-list-'+e.attr("name").replace("[]","").split("[").pop().replace("]","")+'">').insertBefore(e));"string"==typeof f.listInput&&0==n(f.listInput).length&&(f.listInput=n('<input type="hidden" name="'+f.listInput+'">').insertBefore(e));u.set("disabled",u.disabled);!f.fileMaxSize&&f.maxSize&&(f.fileMaxSize=f.maxSize);break;case"language":v=n.fn.fileuploader.languages;"string"==typeof f.captions&&(f.captions=f.captions in v?v[f.captions]:n.extend(!0,{},n.fn.fileuploader.defaults.captions));break;case"disabled":u.disabled=i;o[u.disabled?"addClass":"removeClass"]("fileuploader-disabled");e[u.disabled?"attr":"removeAttr"]("disabled","disabled");u.rendered&&u.bindUnbindEvents(!i);break;case"feedback":i=i||u._assets.textParse(0<u._itFl.length?f.captions.feedback2:f.captions.feedback,{length:u._itFl.length});n(!h.is(":file"))&&h.find(".fileuploader-input-caption span").html(i);break;case"input":a=u._assets.copyAllAttributes(n('<input type="file">'),e,!0);u.bindUnbindEvents(!1);e.after(e=a).remove();u.bindUnbindEvents(!0);break;case"prevInput":0<c.length&&(u.bindUnbindEvents(!1),c[i].remove(),c.splice(i,1),e=c[c.length-1],u.bindUnbindEvents(!0));break;case"nextInput":a=u._assets.copyAllAttributes(n('<input type="file">'),e);u.bindUnbindEvents(!1);0<c.length&&0==c[c.length-1].get(0).files.length?e=c[c.length-1]:(-1==c.indexOf(e)&&c.push(e),c.push(a),e.after(e=a));u.bindUnbindEvents(!0);break;case"listInput":f.listInput&&f.listInput.val(u.files.list(!0,null,!1,i))}},onChange:function(t,i){var r=e.get(0).files,v,a;if(i){if(!i.length)return u.set("input",""),u.files.clear(),!1;r=i}if(u.clipboard._timer&&u.clipboard.clean(),!u.isDefaultMode()||(u.reset(),0!=r.length)){if(f.beforeSelect&&n.isFunction(f.beforeSelect)&&0==f.beforeSelect(r,s,o,h,e))return!1;for(v=0,a=0;a<r.length;a++){var y=r[a],c=u._itFl[u.files.add(y,"choosed")],l=u.files.check(c,r,0==a);if(!0===l)f.thumbnails&&u.thumbnails.item(c),u.isUploadMode()&&u.upload.prepare(c),f.onSelect&&n.isFunction(f.onSelect)&&f.onSelect(c,s,o,h,e),v++;else if(u.files.remove(c,!0),l[2]||(u.isDefaultMode()&&(u.set("input",""),u.reset(),l[3]=!0),l[1]&&u._assets.dialogs.alert(l[1],c,s,o,h,e)),l[3])break}u.isUploadMode()&&0<v&&u.set("input","");u.set("feedback",null);u.isAddMoreMode()&&0<v&&u.set("nextInput");u.set("listInput",null);f.afterSelect&&n.isFunction(f.afterSelect)&&f.afterSelect(s,o,h,e)}},thumbnails:{create:function(){null!=f.thumbnails.beforeShow&&n.isFunction(f.thumbnails.beforeShow)&&f.thumbnails.beforeShow(o,h,e);var t=n(u._assets.textParse(f.thumbnails.box)).appendTo(f.thumbnails.boxAppendTo?f.thumbnails.boxAppendTo:o);s=t.is(f.thumbnails._selectors.list)?t:t.find(f.thumbnails._selectors.list);f.thumbnails._selectors.popup_open&&s.on("click",f.thumbnails._selectors.popup_open,function(t){t.preventDefault();var r=n(this).closest(f.thumbnails._selectors.item),i=u.files.find(r);i&&i.popup&&i.html.hasClass("file-has-popup")&&u.thumbnails.popup(i)});u.isUploadMode()&&f.thumbnails._selectors.start&&s.on("click",f.thumbnails._selectors.start,function(t){if(t.preventDefault(),u.locked)return!1;var r=n(this).closest(f.thumbnails._selectors.item),i=u.files.find(r);i&&u.upload.send(i,!0)});u.isUploadMode()&&f.thumbnails._selectors.retry&&s.on("click",f.thumbnails._selectors.retry,function(t){if(t.preventDefault(),u.locked)return!1;var r=n(this).closest(f.thumbnails._selectors.item),i=u.files.find(r);i&&u.upload.retry(i)});f.thumbnails._selectors.rotate&&s.on("click",f.thumbnails._selectors.rotate,function(t){if(t.preventDefault(),u.locked)return!1;var r=n(this).closest(f.thumbnails._selectors.item),i=u.files.find(r);i&&i.editor&&(i.editor.rotate(),i.editor.save())});f.thumbnails._selectors.remove&&s.on("click",f.thumbnails._selectors.remove,function(t){function r(){u.files.remove(i)}if(t.preventDefault(),u.locked)return!1;var e=n(this).closest(f.thumbnails._selectors.item),i=u.files.find(e);i&&(i.upload&&"successful"!=i.upload.status?u.upload.cancel(i):f.thumbnails.removeConfirmation&&!i.choosed?u._assets.dialogs.confirm(u._assets.textParse(f.captions.removeConfirmation,i),r):r())})},clear:function(){s&&s.html("")},item:function(t,i){t.icon=u.thumbnails.generateFileIcon(t.format,t.extension);t.image='<div class="fileuploader-item-image"><\/div>';t.progressBar=u.isUploadMode()?'<div class="fileuploader-progressbar"><div class="bar"><\/div><\/div>':"";t.html=n(u._assets.textParse(t.appended&&f.thumbnails.item2?f.thumbnails.item2:f.thumbnails.item,t));t.progressBar=t.html.find(".fileuploader-progressbar");t.html.addClass("file-type-"+(t.format?t.format:"no")+" file-ext-"+(t.extension?t.extension:"no"));i?i.replaceWith(t.html):t.html[f.thumbnails.itemPrepend?"prependTo":"appendTo"](s);f.thumbnails.popup&&!1!==t.data.popup&&(t.html.addClass("file-has-popup"),t.popup={open:function(){u.thumbnails.popup(t)}});u.thumbnails.renderThumbnail(t);t.renderThumbnail=function(n){n&&t.popup&&t.popup.close&&(t.popup.close(),t.popup={open:t.popup.open});u.thumbnails.renderThumbnail(t,!0,n)};null!=f.thumbnails.onItemShow&&n.isFunction(f.thumbnails.onItemShow)&&f.thumbnails.onItemShow(t,s,o,h,e)},generateFileIcon:function(n,t){var i='<div style="${style}" class="fileuploader-item-icon${class}"><i>'+(t||"")+"<\/i><\/div>",r=u._assets.textToColor(t);return r&&(u._assets.isBrightColor(r)&&(i=i.replace("${class}"," is-bright-color")),i=i.replace("${style}","background-color: "+r)),i.replace("${style}","").replace("${class}","")},renderThumbnail:function(t,i,r){function y(i){var r=n(i);c.removeClass("fileuploader-no-thumbnail fileuploader-loading").html(r);t.html.hasClass("file-will-popup")&&t.html.removeClass("file-will-popup").addClass("file-has-popup");r.is("img")&&r.attr("draggable","false").on("load error",function(i){"error"==i.type&&l();a();null!=f.thumbnails.onImageLoaded&&n.isFunction(f.thumbnails.onImageLoaded)&&f.thumbnails.onImageLoaded(t,s,o,h,e)});r.is("canvas")&&null!=f.thumbnails.onImageLoaded&&n.isFunction(f.thumbnails.onImageLoaded)&&f.thumbnails.onImageLoaded(t,s,o,h,e)}var c=t.html.find(".fileuploader-item-image"),p=t.data&&t.data.readerSkip,l=function(){c.addClass("fileuploader-no-thumbnail");c.removeClass("fileuploader-loading").html(t.icon);t.html.hasClass("file-will-popup")&&t.html.removeClass("file-will-popup").addClass("file-has-popup");null!=f.thumbnails.onImageLoaded&&n.isFunction(f.thumbnails.onImageLoaded)&&f.thumbnails.onImageLoaded(t,s,o,h,e)},a=function(){var n=0;if(t&&-1<u._pfrL.indexOf(t))for(u._pfrL.splice(u._pfrL.indexOf(t),1);n<u._pfrL.length;){if(-1<u._itFl.indexOf(u._pfrL[n])){setTimeout(function(){u.thumbnails.renderThumbnail(u._pfrL[n],!0)},"image"==t.format&&1.8<t.size/1e6?200:0);break}u._pfrL.splice(n,1);n++}},v;if(c.length){if(t.image=c.html("").addClass("fileuploader-loading"),(-1<["image","video","audio","astext"].indexOf(t.format)||t.data.thumbnail)&&u.isFileReaderSupported()&&!p&&(t.appended||f.thumbnails.startImageRenderer||i))return(t.html.hasClass("file-has-popup")&&t.html.removeClass("file-has-popup").addClass("file-will-popup"),f.thumbnails.synchronImages&&(-1!=u._pfrL.indexOf(t)||i||u._pfrL.push(t),1<u._pfrL.length&&!i))?void 0:(v=function(n,i){var e=n.nodeName&&"img"==n.nodeName.toLowerCase(),o=e?n.src:n;if(f.thumbnails.canvasImage){var s=document.createElement("canvas"),r=e?n:new Image,h=function(){u.editor.resize(this,s,f.thumbnails.canvasImage.width?f.thumbnails.canvasImage.width:c.width(),f.thumbnails.canvasImage.height?f.thumbnails.canvasImage.height:c.height(),!1,!0);u._assets.isBlankCanvas(s)?l():y(s);a()},v=function(){l();a();r=null};if("image"==t.format&&i&&t.reader.node)return h.call(t.reader.node);if(!o)return v();if(e)return h.call(n);r.onload=h;r.onerror=v;t.data&&t.data.readerCrossOrigin&&r.setAttribute("crossOrigin",t.data.readerCrossOrigin);r.src=o}else y(e?n:'<img src="'+o+'">')},"string"==typeof r||"object"==(typeof r=="undefined"?"undefined":_typeof(r))?v(r):u.files.read(t,function(){t.reader.node&&(t.reader.frame||"img"==t.reader.node.nodeName.toLowerCase())?v(t.reader.frame||t.reader.src,!0):(l(),a())},null,r,!0));l()}else a()},popup:function(t,i){if(!u.locked&&f.thumbnails.popup&&f.thumbnails._selectors.popup){var c=n(f.thumbnails.popup.container),r=c.find(".fileuploader-popup"),l=function(){function a(n){var i=n.which||n.keyCode;27==i&&t.popup&&t.popup.close&&t.popup.close();(37==i||39==i)&&f.thumbnails.popup.arrows&&t.popup.move(37==i?"prev":"next")}var l=t.popup.html||n(u._assets.textParse(f.thumbnails.popup.template,t)),v=t.popup.html!==l;r.removeClass("loading");r.children(f.thumbnails._selectors.popup).length&&(n.each(u._itFl,function(n,r){r!=t&&r.popup&&r.popup.close&&r.popup.close(i)}),r.find(f.thumbnails._selectors.popup).remove());l.show().appendTo(r);t.popup.html=l;t.popup.move=function(n){var s=u._itFl.indexOf(t),e=null,o=!1,i,r;if("prev"==(n=f.thumbnails.itemPrepend?"prev"==n?"next":"prev":n))for(i=s;0<=i;i--){if((r=u._itFl[i])!=t&&r.popup&&r.html.hasClass("file-has-popup")){e=r;break}0!=i||e||o||!f.thumbnails.popup.loop||(i=u._itFl.length,o=!0)}else for(i=s;i<u._itFl.length;i++){if((r=u._itFl[i])!=t&&r.popup&&r.html.hasClass("file-has-popup")){e=r;break}i+1!=u._itFl.length||e||o||!f.thumbnails.popup.loop||(i=-1,o=!0)}e&&u.thumbnails.popup(e,!0)};t.popup.close=function(i){t.reader.node&&t.reader.node.pause&&t.reader.node.pause();n(window).off("keyup",a);c.css({overflow:"",width:""});t.popup.editor&&t.popup.editor.cropper&&t.popup.editor.cropper.hide();t.popup.zoomer&&t.popup.zoomer.hide();t.popup.html&&f.thumbnails.popup.onHide&&n.isFunction(f.thumbnails.popup.onHide)?f.thumbnails.popup.onHide(t,s,o,h,e):t.popup.html&&t.popup.html.remove();i||r.fadeOut(400,function(){r.remove()});delete t.popup.close};t.reader.node?(v&&l.html(l.html().replace(/\$\{reader\.node\}/,'<div class="reader-node"><\/div>')).find(".reader-node").html(t.reader.node),t.reader.node.controls=!0,t.reader.node.currentTime=0,t.reader.node.play&&t.reader.node.play()):v&&l.find(".fileuploader-popup-node").html('<div class="reader-node"><div class="fileuploader-popup-file-icon">'+t.icon+"<\/div><\/div>");n(window).on("keyup",a);c.css({overflow:"hidden",width:c.innerWidth()});t.popup.html.find('[data-action="prev"], [data-action="next"]').removeAttr("style");t.popup.html[1!=u._itFl.length&&f.thumbnails.popup.arrows?"addClass":"removeClass"]("fileuploader-popup-has-arrows");f.thumbnails.popup.loop||(0==u._itFl.indexOf(t)&&t.popup.html.find('[data-action="prev"]').hide(),u._itFl.indexOf(t)==u._itFl.length-1&&t.popup.html.find('[data-action="next"]').hide());u.editor.zoomer(t);t.editor&&(t.popup.editor||(t.popup.editor={}),u.editor.rotate(t,t.popup.editor.rotation||t.editor.rotation||0,!0),t.popup.editor&&t.popup.editor.cropper&&(t.popup.editor.cropper.hide(!0),setTimeout(function(){u.editor.crop(t,t.editor.crop?n.extend({},t.editor.crop):t.popup.editor.cropper.setDefaultData())},100)));t.popup.html.on("click",'[data-action="prev"]',function(){t.popup.move("prev")}).on("click",'[data-action="next"]',function(){t.popup.move("next")}).on("click",'[data-action="crop"]',function(){t.editor&&t.editor.cropper()}).on("click",'[data-action="rotate-cw"]',function(){t.editor&&t.editor.rotate()}).on("click",'[data-action="zoom-in"]',function(){t.popup.zoomer&&t.popup.zoomer.zoomIn()}).on("click",'[data-action="zoom-out"]',function(){t.popup.zoomer&&t.popup.zoomer.zoomOut()});f.thumbnails.popup.onShow&&n.isFunction(f.thumbnails.popup.onShow)&&f.thumbnails.popup.onShow(t,s,o,h,e)};0==r.length&&(r=n('<div class="fileuploader-popup"><\/div>').appendTo(c));r.fadeIn(400).addClass("loading");(-1<["image","video","audio","astext"].indexOf(t.format)||-1<["application/pdf"].indexOf(t.type))&&!t.popup.html?u.files.read(t,l):l()}}},editor:{rotate:function(t,i,r){var e,f;if(!(t.popup&&t.popup.html&&n("html").find(t.popup.html).length))return e=t.editor.rotation||0,f=i||e+90,360<=f&&(f=0),t.popup.editor&&(t.popup.editor.rotation=f),t.editor.rotation=f;if(t.reader.node){if(t.popup.editor.isAnimating)return;t.popup.editor.isAnimating=!0;var o=t.popup.html.find(".fileuploader-popup-node").find(".reader-node"),u=o.find("> img"),s={rotation:e=t.popup.editor.rotation||0,scale:t.popup.editor.scale||1};t.popup.editor.cropper&&t.popup.editor.cropper.$template.hide();t.popup.editor.rotation=r?i:e+90;t.popup.editor.scale=(o.height()/u[-1<[90,270].indexOf(t.popup.editor.rotation)?"width":"height"]()).toFixed(3);u.height()*t.popup.editor.scale>o.width()&&-1<[90,270].indexOf(t.popup.editor.rotation)&&(t.popup.editor.scale=o.height()/u.width());1<t.popup.editor.scale&&(t.popup.editor.scale=1);n(s).stop().animate({rotation:t.popup.editor.rotation,scale:t.popup.editor.scale},{duration:r?2:300,easing:"swing",step:function(n,t){var o=u.css("-webkit-transform")||u.css("-moz-transform")||u.css("transform")||"none",i=0,r=1,s=t.prop;if("none"!==o){var h=o.split("(")[1].split(")")[0].split(","),f=h[0],e=h[1];i="rotation"==s?n:Math.round(Math.atan2(e,f)*(180/Math.PI));r="scale"==s?n:Math.round(10*Math.sqrt(f*f+e*e))/10}u.css({"-webkit-transform":"rotate("+i+"deg) scale("+r+")","-moz-transform":"rotate("+i+"deg) scale("+r+")",transform:"rotate("+i+"deg) scale("+r+")"})},always:function(){delete t.popup.editor.isAnimating;t.popup.editor.cropper&&!r&&(t.popup.editor.cropper.setDefaultData(),t.popup.editor.cropper.init("rotation"))}});360<=t.popup.editor.rotation&&(t.popup.editor.rotation=0);t.popup.editor.rotation!=t.editor.rotation&&(t.popup.editor.hasChanges=!0)}},crop:function(t,i){if(!(t.popup&&t.popup.html&&n("html").find(t.popup.html).length))return t.editor.crop=i||t.editor.crop;if(t.reader.node)if(t.popup.editor.cropper)i&&(t.popup.editor.cropper.crop=i),t.popup.editor.cropper.init(i);else{var e=t.popup.html.find(".fileuploader-popup-node .reader-node > img"),r=n('<div class="fileuploader-cropper"><div class="fileuploader-cropper-area"><div class="point point-a"><\/div><div class="point point-b"><\/div><div class="point point-c"><\/div><div class="point point-d"><\/div><div class="point point-e"><\/div><div class="point point-f"><\/div><div class="point point-g"><\/div><div class="point point-h"><\/div><div class="area-move"><\/div><div class="area-image"><\/div><div class="area-info"><\/div><\/div><\/div>'),o=r.find(".fileuploader-cropper-area");t.popup.editor.cropper={$imageEl:e,$template:r,$editor:o,isCropping:!1,crop:i||null,init:function(i){var e=t.popup.editor.cropper,s=e.$imageEl.position(),h=e.$imageEl[0].getBoundingClientRect().width,c=e.$imageEl[0].getBoundingClientRect().height,o=t.popup.editor.rotation&&-1<[90,270].indexOf(t.popup.editor.rotation)?t.popup.editor.scale:1;if(e.hide(),e.crop||e.setDefaultData(),0==h||0==c)return e.hide(!0);e.isCropping||(e.$imageEl.clone().appendTo(e.$template.find(".area-image")),e.$imageEl.parent().append(r));e.$template.hide().css({left:s.left,top:s.top,width:h,height:c}).fadeIn(150);e.$editor.hide();clearTimeout(e._editorAnimationTimeout);e._editorAnimationTimeout=setTimeout(function(){if(delete e._editorAnimationTimeout,e.$editor.fadeIn(250),t.editor.crop&&n.isPlainObject(i)&&(e.resize(),e.crop.left=e.crop.left*e.crop.cfWidth*o,e.crop.width=e.crop.width*e.crop.cfWidth*o,e.crop.top=e.crop.top*e.crop.cfHeight*o,e.crop.height=e.crop.height*e.crop.cfHeight*o),f.editor.cropper&&(f.editor.cropper.maxWidth||f.editor.cropper.maxHeight)&&(f.editor.cropper.maxWidth&&(e.crop.width=Math.min(f.editor.cropper.maxWidth*e.crop.cfWidth,e.crop.width)),f.editor.cropper.maxHeight&&(e.crop.height=Math.min(f.editor.cropper.maxHeight*e.crop.cfHeight,e.crop.height)),t.editor.crop&&"rotation"!=i||"resize"==i||(e.crop.left=(e.$template.width()-e.crop.width)/2,e.crop.top=(e.$template.height()-e.crop.height)/2)),(!t.editor.crop||"rotation"==i)&&f.editor.cropper&&f.editor.cropper.ratio&&"resize"!=i){var s=f.editor.cropper.ratio,r=u._assets.ratioToPx(e.crop.width,e.crop.height,s);r&&(e.crop.width=Math.min(e.crop.width,r[0]),e.crop.left=(e.$template.width()-e.crop.width)/2,e.crop.height=Math.min(e.crop.height,r[1]),e.crop.top=(e.$template.height()-e.crop.height)/2)}e.drawPlaceHolder(e.crop)},400);f.editor.cropper&&f.editor.cropper.showGrid&&e.$editor.addClass("has-grid");e.$imageEl.attr("draggable","false");e.$template.on("mousedown touchstart",e.mousedown);n(window).on("resize",e.resize);e.isCropping=!0;t.popup.editor.hasChanges=!0},setDefaultData:function(){var r=t.popup.editor.cropper,u=r.$imageEl,n=u.width(),i=u.height(),f=t.popup.editor.rotation&&-1<[90,270].indexOf(t.popup.editor.rotation),e=t.popup.editor.scale||1;return r.crop={left:0,top:0,width:f?i*e:n,height:f?n*e:i,cfWidth:n/t.reader.width,cfHeight:i/t.reader.height},null},hide:function(i){var r=t.popup.editor.cropper;i&&(r.$template.hide(),r.$editor.hide());r.$imageEl.attr("draggable","");r.$template.off("mousedown touchstart",r.mousedown);n(window).off("resize",r.resize)},resize:function(n){var i=t.popup.editor.cropper,r=i.$imageEl;0<r.width()&&(n?(i.$template.hide(),clearTimeout(i._resizeTimeout),i._resizeTimeout=setTimeout(function(){delete i._resizeTimeout;var n=r.width()/t.reader.width,u=r.height()/t.reader.height;i.crop.left=i.crop.left/i.crop.cfWidth*n;i.crop.width=i.crop.width/i.crop.cfWidth*n;i.crop.top=i.crop.top/i.crop.cfHeight*u;i.crop.height=i.crop.height/i.crop.cfHeight*u;i.crop.cfWidth=n;i.crop.cfHeight=u;i.init("resize")},500)):(i.crop.cfWidth=r.width()/t.reader.width,i.crop.cfHeight=r.height()/t.reader.height))},drawPlaceHolder:function(i){var u=t.popup.editor.cropper,r=t.popup.editor.rotation||0,e=t.popup.editor.scale||1,f=[0,0];i&&(i=n.extend({},i),r&&(f=[180==r||270==r?-100:0,90==r||180==r?-100:0]),u.$editor.css(i),u.setAreaInfo(),u.$editor.find(".area-image img").removeAttr("style").css({width:u.$imageEl.width(),height:u.$imageEl.height(),left:-1*u.$editor.position().left,top:-1*u.$editor.position().top,"-webkit-transform":"rotate("+r+"deg) scale("+e+") translateX("+f[0]+"%) translateY("+f[1]+"%)","-moz-transform":"rotate("+r+"deg) scale("+e+") translateX("+f[0]+"%) translateY("+f[1]+"%)",transform:"rotate("+r+"deg) scale("+e+") translateX("+f[0]+"%) translateY("+f[1]+"%)"}))},setAreaInfo:function(n){var i=t.popup.editor.cropper,r=t.popup.editor.scale||1;i.$editor.find(".area-info").html((i.isResizing||"size"==n?["W: "+Math.round(i.crop.width/i.crop.cfWidth/r)+"px"," ","H: "+Math.round(i.crop.height/i.crop.cfHeight/r)+"px"]:["X: "+Math.round(i.crop.left/i.crop.cfWidth/r)+"px"," ","Y: "+Math.round(i.crop.top/i.crop.cfHeight/r)+"px"]).join(""))},mousedown:function(i){function s(){r.pointData={el:o,x:e.x,y:e.y,xEditor:e.x-r.crop.left,yEditor:e.y-r.crop.top,left:r.crop.left,top:r.crop.top,width:r.crop.width,height:r.crop.height};(r.isMoving||r.isResizing)&&(r.setAreaInfo("size"),r.$editor.addClass("moving show-info"),n("body").css({"-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"}),n(document).on("mousemove touchmove",r.mousemove))}var u=i.originalEvent.touches&&i.originalEvent.touches[0]?"touchstart":"mousedown",o=n(i.target),r=t.popup.editor.cropper,e={x:("mousedown"==u?i.pageX:i.originalEvent.touches[0].pageX)-r.$template.offset().left,y:("mousedown"==u?i.pageY:i.originalEvent.touches[0].pageY)-r.$template.offset().top};t.popup.zoomer&&t.popup.zoomer.hasSpacePressed||(r.isMoving=o.is(".area-move"),r.isResizing=o.is(".point"),"mousedown"==u&&s(),"touchstart"==u&&1==i.originalEvent.touches.length&&((r.isMoving||r.isResizing)&&i.preventDefault(),r.isTouchLongPress=!0,setTimeout(function(){r.isTouchLongPress&&(delete r.isTouchLongPress,s())},f.thumbnails.touchDelay?f.thumbnails.touchDelay:0)),n(document).on("mouseup touchend",r.mouseup))},mousemove:function(i){var g=i.originalEvent.touches&&i.originalEvent.touches[0]?"touchstart":"mousedown",r=(n(i.target),t.popup.editor.cropper),v={x:("mousedown"==g?i.pageX:i.originalEvent.touches[0].pageX)-r.$template.offset().left,y:("mousedown"==g?i.pageY:i.originalEvent.touches[0].pageY)-r.$template.offset().top},y,p,w,b;if(i.originalEvent.touches&&1!=i.originalEvent.touches.length)return r.mouseup(i);if(r.isMoving&&(y=v.x-r.pointData.xEditor,p=v.y-r.pointData.yEditor,y+r.crop.width>r.$template.width()&&(y=r.$template.width()-r.crop.width),y<0&&(y=0),p+r.crop.height>r.$template.height()&&(p=r.$template.height()-r.crop.height),p<0&&(p=0),r.crop.left=y,r.crop.top=p),r.isResizing){var o,e=r.pointData.el.attr("class").substr(12),k=r.crop.left+r.crop.width,d=r.crop.top+r.crop.height,h=(f.editor.cropper&&f.editor.cropper.minWidth||0)*r.crop.cfWidth,c=(f.editor.cropper&&f.editor.cropper.minHeight||0)*r.crop.cfHeight,l=(f.editor.cropper&&f.editor.cropper.maxWidth)*r.crop.cfWidth,a=(f.editor.cropper&&f.editor.cropper.maxHeight)*r.crop.cfHeight,s=f.editor.cropper?f.editor.cropper.ratio:null;(h>r.$template.width()&&(h=r.$template.width()),c>r.$template.height()&&(c=r.$template.height()),l>r.$template.width()&&(l=r.$template.width()),a>r.$template.height()&&(a=r.$template.height()),("a"==e||"b"==e||"c"==e)&&!o&&(r.crop.top=v.y,r.crop.top<0&&(r.crop.top=0),r.crop.height=d-r.crop.top,r.crop.top>r.crop.top+r.crop.height&&(r.crop.top=d,r.crop.height=0),r.crop.height<c&&(r.crop.top=d-c,r.crop.height=c),r.crop.height>a&&(r.crop.top=d-a,r.crop.height=a),(o=s?u._assets.ratioToPx(r.crop.width,r.crop.height,s):null)&&(r.crop.width=o[0],"a"!=e&&"b"!=e||(r.crop.left=Math.max(0,r.pointData.left+(r.pointData.width-r.crop.width)/("b"==e?2:1))),r.crop.left+r.crop.width>r.$template.width())))&&(w=r.$template.width()-r.crop.left,r.crop.width=w,r.crop.height=w/o[2]*o[3],r.crop.top=d-r.crop.height);("e"==e||"f"==e||"g"==e)&&!o&&(r.crop.height=v.y-r.crop.top,r.crop.height+r.crop.top>r.$template.height()&&(r.crop.height=r.$template.height()-r.crop.top),r.crop.height<c&&(r.crop.height=c),r.crop.height>a&&(r.crop.height=a),(o=s?u._assets.ratioToPx(r.crop.width,r.crop.height,s):null)&&(r.crop.width=o[0],"f"!=e&&"g"!=e||(r.crop.left=Math.max(0,r.pointData.left+(r.pointData.width-r.crop.width)/("f"==e?2:1))),r.crop.left+r.crop.width>r.$template.width()))&&(w=r.$template.width()-r.crop.left,r.crop.width=w,r.crop.height=w/o[2]*o[3]);("c"==e||"d"==e||"e"==e)&&!o&&(r.crop.width=v.x-r.crop.left,r.crop.width+r.crop.left>r.$template.width()&&(r.crop.width=r.$template.width()-r.crop.left),r.crop.width<h&&(r.crop.width=h),r.crop.width>l&&(r.crop.width=l),(o=s?u._assets.ratioToPx(r.crop.width,r.crop.height,s):null)&&(r.crop.height=o[1],"c"!=e&&"d"!=e||(r.crop.top=Math.max(0,r.pointData.top+(r.pointData.height-r.crop.height)/("d"==e?2:1))),r.crop.top+r.crop.height>r.$template.height()))&&(b=r.$template.height()-r.crop.top,r.crop.height=b,r.crop.width=b/o[3]*o[2]);("a"==e||"g"==e||"h"==e)&&!o&&(r.crop.left=v.x,r.crop.left>r.$template.width()&&(r.crop.left=r.$template.width()),r.crop.left<0&&(r.crop.left=0),r.crop.width=k-r.crop.left,r.crop.left>r.crop.left+r.crop.width&&(r.crop.left=k,r.crop.width=0),r.crop.width<h&&(r.crop.left=k-h,r.crop.width=h),r.crop.width>l&&(r.crop.left=k-l,r.crop.width=l),(o=s?u._assets.ratioToPx(r.crop.width,r.crop.height,s):null)&&(r.crop.height=o[1],"a"!=e&&"h"!=e||(r.crop.top=Math.max(0,r.pointData.top+(r.pointData.height-r.crop.height)/("h"==e?2:1))),r.crop.top+r.crop.height>r.$template.height()))&&(b=r.$template.height()-r.crop.top,r.crop.height=b,r.crop.width=b/o[3]*o[2],r.crop.left=k-r.crop.width)}r.drawPlaceHolder(r.crop)},mouseup:function(){var i=t.popup.editor.cropper;0!=i.$editor.width()&&0!=i.$editor.height()||i.init(i.setDefaultData());delete i.isTouchLongPress;delete i.isMoving;delete i.isResizing;i.$editor.removeClass("moving show-info");n("body").css({"-webkit-user-select":"","-moz-user-select":"","-ms-user-select":"","user-select":""});n(document).off("mousemove touchmove",i.mousemove);n(document).off("mouseup touchend",i.mouseup)}};t.popup.editor.cropper.init()}},resize:function(n,t,i,r,u,f){var a=t.getContext("2d"),y=(i=!i&&r?r*n.width/n.height:i,r=!r&&i?i*n.height/n.width:r,n.width/n.height),s=1<=y?i:r*y,l=y<1?r:i/y,p,b,k;if(f&&s<i&&(l*=i/s,s=i),f&&l<r&&(s*=r/l,l=r),p=Math.min(Math.ceil(Math.log(n.width/s)/Math.log(2)),12),t.width=s,t.height=l,n.width<t.width||n.height<t.height||p<2)f||(t.width=Math.min(n.width,t.width),t.height=Math.min(n.height,t.height)),b=n.width<t.width?(t.width-n.width)/2:0,k=n.height<t.height?(t.height-n.height)/2:0,u||(a.fillStyle="#fff",a.fillRect(0,0,t.width,t.height)),a.drawImage(n,b,k,Math.min(n.width,t.width),Math.min(n.height,t.height));else{var e=document.createElement("canvas"),v=e.getContext("2d"),o=2;for(e.width=n.width/o,e.height=n.height/o,v.fillStyle="#fff",v.fillRect(0,0,e.width,e.height),v.drawImage(n,0,0,e.width,e.height);2<p;){var w=o+2,h=n.width/o,c=n.height/o;h>e.width&&(h=e.width);c>e.height&&(c=e.height);v.drawImage(e,0,0,h,c,0,0,n.width/w,n.height/w);o=w;p--}h=n.width/o;c=n.height/o;h>e.width&&(h=e.width);c>e.height&&(c=e.height);a.drawImage(e,0,0,h,c,0,0,s,l);e=v=null}a=null},zoomer:function(t){if(t.popup&&t.popup.html&&n("html").find(t.popup.html).length){if(!t.popup.zoomer){var o=t.popup.html,r=o.find(".fileuploader-popup-node"),i=r.find(".reader-node"),e=i.find("> img").attr("draggable","false").attr("ondragstart","return false;");t.popup.zoomer={html:o.find(".fileuploader-popup-zoomer"),isActive:"image"==t.format&&t.reader.node&&f.thumbnails.popup.zoomer,scale:100,zoom:100,init:function(){var t=this;if(!t.isActive||u._assets.isIE()||u._assets.isMobile())return t.html.hide()&&r.addClass("has-node-centered");t.hide();t.resize();n(window).on("resize",t.resize);n(window).on("keyup keydown",t.keyPress);t.html.find("input").on("input change",t.range);i.on("mousedown touchstart",t.mousedown);r.on("mousewheel DOMMouseScroll",t.scroll)},hide:function(){var t=this;n(window).off("resize",t.resize);n(window).off("keyup keydown",t.keyPress);t.html.find("input").off("input change",t.range);i.off("mousedown",t.mousedown);r.off("mousewheel DOMMouseScroll",t.scroll)},center:function(n){var f=this,u=0,t=0;t=n?(u=f.left,t=f.top,u-=(r.width()/2-f.left)*(i.width()/n[0]-1),t-=(r.height()/2-f.top)*(i.height()/n[1]-1),i.width()<=r.width()&&(u=Math.round((r.width()-i.width())/2)),i.height()<=r.height()&&(t=Math.round((r.height()-i.height())/2)),i.width()>r.width()&&(0<u?u=0:u+i.width()<r.width()&&(u=r.width()-i.width())),i.height()>r.height()&&(0<t?t=0:t+i.height()<r.height()&&(t=r.height()-i.height())),Math.min(t,0)):(u=Math.round((r.width()-i.width())/2),Math.round((r.height()-i.height())/2));i.css({left:(f.left=u)+"px",top:(f.top=t)+"px",width:i.width(),height:i.height()})},resize:function(){var n=t.popup.zoomer;r.removeClass("is-zoomed");i.removeAttr("style");n.scale=n.getImageScale();n.updateView()},range:function(i){var r=t.popup.zoomer,f=n(this),u=parseFloat(f.val());if(100<=r.scale)return i.preventDefault(),void f.val(r.scale);u<r.scale&&(i.preventDefault(),u=r.scale,f.val(u));r.updateView(u,!0)},scroll:function(n){var r=t.popup.zoomer,i=-100;n.originalEvent&&(n.originalEvent.wheelDelta&&(i=n.originalEvent.wheelDelta/-40),n.originalEvent.deltaY&&(i=n.originalEvent.deltaY),n.originalEvent.detail&&(i=n.originalEvent.detail));r[i<0?"zoomIn":"zoomOut"](3)},keyPress:function(n){var r=t.popup.zoomer,u=n.type;32==(n.keyCode||n.which)&&(r.hasSpacePressed="keydown"==u,r.hasSpacePressed&&r.isZoomed()?i.addClass("is-amoving"):i.removeClass("is-amoving"))},mousedown:function(r){function h(){u.pointData={x:s.x,y:s.y,xTarget:s.x-u.left,yTarget:s.y-u.top};n("body").css({"-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"});i.addClass("is-moving");n(document).on("mousemove",u.mousemove)}var u=t.popup.zoomer,c=n(r.target),o=r.originalEvent.touches&&r.originalEvent.touches[0]?"touchstart":"mousedown",s={x:"mousedown"==o?r.pageX:r.originalEvent.touches[0].pageX,y:"mousedown"==o?r.pageY:r.originalEvent.touches[0].pageY};1==r.which&&100!=u.scale&&u.zoom!=u.scale&&(u.hasSpacePressed||c[0]==e[0]||c.is(".fileuploader-cropper"))&&("mousedown"==o&&h(),"touchstart"==o&&(u.isTouchLongPress=!0,setTimeout(function(){u.isTouchLongPress&&(delete u.isTouchLongPress,h())},f.thumbnails.touchDelay?f.thumbnails.touchDelay:0)),n(document).on("mouseup touchend",u.mouseup))},mousemove:function(n){var e=t.popup.zoomer,o=n.originalEvent.touches&&n.originalEvent.touches[0]?"touchstart":"mousedown",s="mousedown"==o?n.pageX:n.originalEvent.touches[0].pageX,h="mousedown"==o?n.pageY:n.originalEvent.touches[0].pageY,u=s-e.pointData.xTarget,f=h-e.pointData.yTarget;0<f&&(f=0);f<r.height()-i.height()&&(f=r.height()-i.height());i.height()<r.height()&&(f=r.height()/2-i.height()/2);i.width()>r.width()?(0<u&&(u=0),u<r.width()-i.width()&&(u=r.width()-i.width())):u=r.width()/2-i.width()/2;i.css({left:(e.left=u)+"px",top:(e.top=f)+"px"})},mouseup:function(){var r=t.popup.zoomer;delete r.pointData;n("body").css({"-webkit-user-select":"","-moz-user-select":"","-ms-user-select":"","user-select":""});i.removeClass("is-moving");n(document).off("mousemove",r.mousemove);n(document).off("mouseup",r.mouseup)},zoomIn:function(n){var i=t.popup.zoomer,r=n||20;100<=i.zoom||(i.zoom=Math.min(100,i.zoom+r),i.updateView(i.zoom))},zoomOut:function(n){var i=t.popup.zoomer,r=n||20;i.zoom<=i.scale||(i.zoom=Math.max(i.scale,i.zoom-r),i.updateView(i.zoom))},updateView:function(n,u){var f=this,o=f.getImageSize().width/100*n,s=f.getImageSize().height/100*n,h=i.width(),c=i.height(),e=n&&n!=f.scale;if(!f.isActive)return f.center();e?(r.addClass("is-zoomed"),i.addClass("is-movable").css({width:o+"px",height:s+"px",maxWidth:"none",maxHeight:"none"})):(r.removeClass("is-zoomed"),i.removeClass("is-movable is-amoving").removeAttr("style"));f.zoom=n||f.scale;f.center(e?[h,c,f.left,f.top]:null);f.html.find("span").html(f.zoom+"%");u||f.html.find("input").val(f.zoom);n&&t.popup.editor&&t.popup.editor.cropper&&t.popup.editor.cropper.resize(!0)},isZoomed:function(){return this.zoom>this.scale},getImageSize:function(){return{width:e.prop("naturalWidth"),height:e.prop("naturalHeight")}},getImageScale:function(){return Math.round(100/(e.prop("naturalWidth")/e.width()))}}}t.popup.zoomer.init()}},save:function(t,i,r,c,l){function v(){var b,v;if(t.reader.node){var n=document.createElement("canvas"),a=n.getContext("2d"),w=[0,180];if(n.width=t.reader.width,n.height=t.reader.height,a.drawImage(this,0,0,t.reader.width,t.reader.height),void 0!==t.editor.rotation){t.editor.rotation=t.editor.rotation||0;n.width=-1<w.indexOf(t.editor.rotation)?t.reader.width:t.reader.height;n.height=-1<w.indexOf(t.editor.rotation)?t.reader.height:t.reader.width;var g=t.editor.rotation*Math.PI/180,nt=.5*n.width,tt=.5*n.height;a.clearRect(0,0,n.width,n.height);a.translate(nt,tt);a.rotate(g);a.translate(.5*-t.reader.width,.5*-t.reader.height);a.drawImage(this,0,0);a.setTransform(1,0,0,1,0,0)}t.editor.crop&&(b=a.getImageData(t.editor.crop.left,t.editor.crop.top,t.editor.crop.width,t.editor.crop.height),n.width=t.editor.crop.width,n.height=t.editor.crop.height,a.putImageData(b,0,0));var p=r||t.type||"image/jpeg",k=f.editor.quality||90,y=n.toDataURL(p,k/100),d=function(n,r){var a=i?u._assets.dataURItoBlob(n,p):n;l||u.thumbnails.renderThumbnail(t,!0,r||n);c&&c(a,t,s,o,h,e);null!=f.editor.onSave&&"function"==typeof f.editor.onSave&&f.editor.onSave(a,t,s,o,h,e);u.set("listInput",null)};f.editor.maxWidth||f.editor.maxHeight?(v=new Image,v.src=y,v.onload=function(){var t=document.createElement("canvas");u.editor.resize(v,t,f.editor.maxWidth,f.editor.maxHeight,!0,!1);y=t.toDataURL(p,k/100);d(y,v);n=a=t=null}):(d(y),n=a=null)}}var p=t.popup&&t.popup.html&&n("html").find(t.popup.html).length,y=new Image,a;if(p){if(!t.popup.editor.hasChanges)return;a=t.popup.editor.scale||1;t.editor.rotation=t.popup.editor.rotation||0;t.popup.editor.cropper&&(t.editor.crop=t.popup.editor.cropper.crop,t.editor.crop.width=t.editor.crop.width/t.popup.editor.cropper.crop.cfWidth/a,t.editor.crop.left=t.editor.crop.left/t.popup.editor.cropper.crop.cfWidth/a,t.editor.crop.height=t.editor.crop.height/t.popup.editor.cropper.crop.cfHeight/a,t.editor.crop.top=t.editor.crop.top/t.popup.editor.cropper.crop.cfHeight/a)}u._assets.isMobile()?(y.onload=v,y.src=t.reader.src):t.reader.node?v.call(t.reader.node):t.reader.read(function(){v.call(t.reader.node)})}},sorter:{init:function(){o.on("mousedown touchstart",f.thumbnails._selectors.sorter,u.sorter.mousedown)},destroy:function(){o.off("mousedown touchstart",f.thumbnails._selectors.sorter,u.sorter.mousedown)},findItemAtPos:function(t){var i=u.sorter.sort,f=i.items.not(i.item.html),r=null;return f.each(function(i,u){var f=n(u);if(t.x>f.offset().left&&t.x<f.offset().left+f.outerWidth()&&t.y>f.offset().top&&t.y<f.offset().top+f.outerHeight())return r=f,!1}),r},mousedown:function(t){function c(){u.sorter.sort={el:e,item:h,items:s.find(f.thumbnails._selectors.item),x:o.x,y:o.y,xItem:o.x-i.offset().left,yItem:o.y-i.offset().top,left:i.position().left,top:i.position().top,width:i.outerWidth(),height:i.outerHeight(),placeholder:f.sorter.placeholder?n(f.sorter.placeholder):h.html.clone().addClass("fileuploader-sorter-placeholder").html("")};n("body").css({"-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"});n(document).on("mousemove touchmove",u.sorter.mousemove)}var r=t.originalEvent.touches&&t.originalEvent.touches[0]?"touchstart":"mousedown",e=n(t.target),i=e.closest(f.thumbnails._selectors.item),h=u.files.find(i),o={x:"mousedown"!=r&&i.length?t.originalEvent.touches[0].pageX:t.pageX,y:"mousedown"!=r&&i.length?t.originalEvent.touches[0].pageY:t.pageY};t.preventDefault();u.sorter.sort&&u.sorter.mouseup();h&&(f.sorter.selectorExclude&&(e.is(f.sorter.selectorExclude)||e.closest(f.sorter.selectorExclude).length)||(n(f.thumbnails._selectors.sorter).on("click drop dragend dragleave dragover dragenter dragstart touchstart touchmove touchend touchcancel",function(n){n.preventDefault()}),"mousedown"==r&&c(),"touchstart"==r&&(u.sorter.isTouchLongPress=!0,setTimeout(function(){u.sorter.isTouchLongPress&&(delete u.sorter.isTouchLongPress,c())},f.thumbnails.touchDelay?f.thumbnails.touchDelay:0)),n(document).on("mouseup touchend",u.sorter.mouseup)))},mousemove:function(t){var p=t.originalEvent.touches&&t.originalEvent.touches[0]?"touchstart":"mousedown",i=u.sorter.sort,l=i.item,w=s.find(f.thumbnails._selectors.item),r=n(f.sorter.scrollContainer||window),tt=n(document).scrollLeft(),it=n(document).scrollTop(),b=r.scrollLeft(),k=r.scrollTop(),e={x:"mousedown"==p?t.clientX:t.originalEvent.touches[0].clientX,y:"mousedown"==p?t.clientY:t.originalEvent.touches[0].clientY},o,v,y,nt,a;t.preventDefault();var h=e.x-i.xItem,c=e.y-i.yItem,d=e.x-(r.prop("offsetLeft")||0),g=e.y-(r.prop("offsetTop")||0);if(h+i.xItem>r.width()&&(h=r.width()-i.xItem),h+i.xItem<0&&(h=0-i.xItem),c+i.yItem>r.height()&&(c=r.height()-i.yItem),c+i.yItem<0&&(c=0-i.yItem),g<=0&&r.scrollTop(k-10),g>r.height()&&r.scrollTop(k+10),d<0&&r.scrollLeft(b-10),d>r.width()&&r.scrollLeft(b+10),l.html.addClass("sorting").css({position:"fixed",left:h,top:c,width:u.sorter.sort.width,height:u.sorter.sort.height}),s.find(i.placeholder).length||l.html.after(i.placeholder),i.placeholder.css({width:u.sorter.sort.width,height:u.sorter.sort.height}),o=u.sorter.findItemAtPos({x:h+i.xItem+tt,y:c+i.yItem+it}),o){if(v=i.placeholder.offset().left!=o.offset().left,y=i.placeholder.offset().top!=o.offset().top,u.sorter.sort.lastHover&&u.sorter.sort.lastHover.el==o[0]){if(y&&"before"==u.sorter.sort.lastHover.direction&&e.y<u.sorter.sort.lastHover.y)return;if(y&&"after"==u.sorter.sort.lastHover.direction&&e.y>u.sorter.sort.lastHover.y)return;if(v&&"before"==u.sorter.sort.lastHover.direction&&e.x<u.sorter.sort.lastHover.x)return;if(v&&"after"==u.sorter.sort.lastHover.direction&&e.x>u.sorter.sort.lastHover.x)return}nt=w.index(l.html);a=w.index(o)<nt?"before":"after";o[a](i.placeholder);o[a](l.html);u.sorter.sort.lastHover={el:o[0],x:e.x,y:e.y,direction:a}}},mouseup:function(){var t=u.sorter.sort,i=t.item;n("body").css({"-webkit-user-select":"","-moz-user-select":"","-ms-user-select":"","user-select":""});i.html.removeClass("sorting").css({position:"",left:"",top:"",width:"",height:""});n(document).off("mousemove touchmove",u.sorter.mousemove);n(document).off("mouseup touchend",u.sorter.mouseup);t.placeholder.remove();delete u.sorter.sort;u.sorter.save()},save:function(t){var i,c=0,r=[],l=[],a=t?u._itFl:f.thumbnails.itemPrepend?s.children().get().reverse():s.children();n.each(a,function(t,f){var e=f.file?f:u.files.find(n(f));if(e){if(e.upload&&!e.uploaded)return;u.rendered&&e.index!=c&&(u._itSl&&u._itSl.indexOf(e.id),1)&&(i=!0);e.index=c;r.push(e);l.push(e.id);c++}});u._itSl&&u._itSl.length!=l.length&&(i=!0);u._itSl=l;i&&r.length==u._itFl.length&&(u._itFl=r);t||u.set("listInput","ignoreSorter");i&&null!=f.sorter.onSort&&"function"==typeof f.sorter.onSort&&f.sorter.onSort(r,s,o,h,e)}},upload:{prepare:function(t,i){t.upload={url:f.upload.url,data:n.extend({},f.upload.data),formData:new FormData,type:f.upload.type||"POST",enctype:f.upload.enctype||"multipart/form-data",cache:!1,contentType:!1,processData:!1,chunk:t.upload?t.upload.chunk:null,status:null,send:function(){u.upload.send(t,!0)},cancel:function(n){u.upload.cancel(t,n)}};t.upload.formData.append(e.attr("name"),t.file,!!t.name&&t.name);(f.upload.start||i)&&u.upload.send(t,i)},send:function(t,i){var r,a,c,v,y,p,l;if(t.upload){if(r=function(n){t.html&&t.html.removeClass("upload-pending upload-loading upload-cancelled upload-failed upload-successful").addClass("upload-"+(n||t.upload.status))},a=function(){var n=0;if(0<u._pfuL.length)for(-1<u._pfuL.indexOf(t)&&u._pfuL.splice(u._pfuL.indexOf(t),1);n<u._pfuL.length;){if(-1<u._itFl.indexOf(u._pfuL[n])&&u._pfuL[n].upload&&!u._pfuL[n].upload.$ajax){u.upload.send(u._pfuL[n],!0);break}u._pfuL.splice(n,1);n++}},f.upload.synchron&&!t.upload.chunk)if(t.upload.status="pending",t.html&&r(),i)-1<u._pfuL.indexOf(t)&&u._pfuL.splice(u._pfuL.indexOf(t),1);else if(-1==u._pfuL.indexOf(t)&&u._pfuL.push(t),1<u._pfuL.length)return;if(f.upload.chunk&&t.file.slice&&(c=u._assets.toBytes(f.upload.chunk),v=Math.ceil(t.size/c,c),(1<v&&!t.upload.chunk&&(t.upload.chunk={name:t.name,size:t.file.size,type:t.file.type,chunkSize:c,temp_name:t.name,loaded:0,total:v,i:-1}),t.upload.chunk)&&((t.upload.chunk.i++,delete t.upload.chunk.isFirst,delete t.upload.chunk.isLast,0==t.upload.chunk.i&&(t.upload.chunk.isFirst=!0),t.upload.chunk.i==t.upload.chunk.total-1&&(t.upload.chunk.isLast=!0),t.upload.chunk.i<=t.upload.chunk.total-1)?(y=t.upload.chunk.i*t.upload.chunk.chunkSize,p=t.file.slice(y,y+t.upload.chunk.chunkSize),t.upload.formData=new FormData,t.upload.formData.append(e.attr("name"),p),t.upload.data._chunkedd=JSON.stringify(t.upload.chunk)):delete t.upload.chunk)),f.upload.beforeSend&&n.isFunction(f.upload.beforeSend)&&!1===f.upload.beforeSend(t,s,o,h,e))return delete t.upload.chunk,r(),void a();if(o.addClass("fileuploader-is-uploading"),t.upload.$ajax&&t.upload.$ajax.abort(),delete t.upload.$ajax,delete t.upload.send,t.upload.status="loading",t.html&&(f.thumbnails._selectors.start&&t.html.find(f.thumbnails._selectors.start).remove(),r()),t.upload.data)for(l in t.upload.data)t.upload.data.hasOwnProperty(l)&&t.upload.formData.append(l,t.upload.data[l]);t.upload.data=t.upload.formData;t.upload.xhr=function(){var i=n.ajaxSettings.xhr(),r=t.upload.chunk&&t.upload.chunk.xhrStartedAt?t.upload.chunk.xhrStartedAt:new Date;return i.upload&&i.upload.addEventListener("progress",function(n){t.upload.$ajax&&(t.upload.$ajax.total=t.upload.chunk?t.upload.chunk.size:n.total,t.upload.$ajax.xhrStartedAt=r);u.upload.progressHandling(n,t,r)},!1),i};t.upload.complete=function(i,r){if(t.upload.chunk&&!t.upload.chunk.isLast&&"success"==r)return u.upload.prepare(t,!0);a();var c=!0;n.each(u._itFl,function(n,t){t.upload&&t.upload.$ajax&&(c=!1)});c&&(o.removeClass("fileuploader-is-uploading"),null!=f.upload.onComplete&&"function"==typeof f.upload.onComplete&&f.upload.onComplete(s,o,h,e,i,r))};t.upload.success=function(i,c,l){if(!t.upload.chunk||t.upload.chunk.isLast)delete t.upload.chunk,u.upload.progressHandling(null,t,t.upload.$ajax.xhrStartedAt,!0),t.uploaded=!0,delete t.upload,t.upload={status:"successful",resend:function(){u.upload.retry(t)}},t.html&&r(),null!=f.upload.onSuccess&&n.isFunction(f.upload.onSuccess)&&f.upload.onSuccess(i,t,s,o,h,e,c,l),u.set("listInput",null);else try{var a=JSON.parse(i);t.upload.chunk.temp_name=a.fileuploader.temp_name}catch(i){}};t.upload.error=function(i,c,l){t.upload.chunk&&(t.upload.chunk.i=Math.max(-1,t.upload.chunk.i-1));t.uploaded=!1;t.upload.status="cancelled"==t.upload.status?t.upload.status:"failed";t.upload.retry=function(){u.upload.retry(t)};delete t.upload.$ajax;t.html&&r();null!=f.upload.onError&&n.isFunction(f.upload.onError)&&f.upload.onError(t,s,o,h,e,i,c,l)};t.upload.$ajax=n.ajax(t.upload)}},cancel:function(n,t){n&&n.upload&&(n.upload.status="cancelled",delete n.upload.chunk,n.upload.$ajax&&n.upload.$ajax.abort(),delete n.upload.$ajax,t||u.files.remove(n))},retry:function(n){n&&n.upload&&(n.html&&f.thumbnails._selectors.retry&&n.html.find(f.thumbnails._selectors.retry).remove(),u.upload.prepare(n,!0))},progressHandling:function(t,i,r,c){if(!t&&c&&i.upload.$ajax&&(t={total:i.upload.$ajax.total,loaded:i.upload.$ajax.total,lengthComputable:!0}),t.lengthComputable){var k=new Date,l=t.loaded+(i.upload.chunk?i.upload.chunk.loaded:0),v=i.upload.chunk?i.upload.chunk.size:t.total,d=Math.round(100*l/v),g=i.upload.chunk&&i.upload.chunk.xhrStartedAt?i.upload.chunk.xhrStartedAt:r,a=(k.getTime()-g.getTime())/1e3,y=a?l/a:0,p=Math.max(0,v-l),b=Math.max(0,a?p/y:0),w={loaded:l,loadedInFormat:u._assets.bytesToText(l),total:v,totalInFormat:u._assets.bytesToText(v),percentage:d,secondsElapsed:a,secondsElapsedInFormat:u._assets.secondsToText(a,!0),bytesPerSecond:y,bytesPerSecondInFormat:u._assets.bytesToText(y)+"/s",remainingBytes:p,remainingBytesInFormat:u._assets.bytesToText(p),secondsRemaining:b,secondsRemainingInFormat:u._assets.secondsToText(b,!0)};i.upload.chunk&&(i.upload.chunk.isFirst&&(i.upload.chunk.xhrStartedAt=r),t.loaded!=t.total||i.upload.chunk.isLast||(i.upload.chunk.loaded+=Math.max(t.total,i.upload.chunk.total/i.upload.chunk.chunkSize)));99<w.percentage&&!c&&(w.percentage=99);f.upload.onProgress&&n.isFunction(f.upload.onProgress)&&f.upload.onProgress(w,i,s,o,h,e)}}},dragDrop:{onDragEnter:function(t){clearTimeout(u.dragDrop._timer);f.dragDrop.container.addClass("fileuploader-dragging");u.set("feedback",u._assets.textParse(f.captions.drop));null!=f.dragDrop.onDragEnter&&n.isFunction(f.dragDrop.onDragEnter)&&f.dragDrop.onDragEnter(t,s,o,h,e)},onDragLeave:function(t){clearTimeout(u.dragDrop._timer);u.dragDrop._timer=setTimeout(function(t){if(!u.dragDrop._dragLeaveCheck(t))return!1;f.dragDrop.container.removeClass("fileuploader-dragging");u.set("feedback",null);null!=f.dragDrop.onDragLeave&&n.isFunction(f.dragDrop.onDragLeave)&&f.dragDrop.onDragLeave(t,s,o,h,e)},100,t)},onDrop:function(t){clearTimeout(u.dragDrop._timer);f.dragDrop.container.removeClass("fileuploader-dragging");u.set("feedback",null);t&&t.originalEvent&&t.originalEvent.dataTransfer&&t.originalEvent.dataTransfer.files&&t.originalEvent.dataTransfer.files.length&&(u.isUploadMode()?u.onChange(t,t.originalEvent.dataTransfer.files):e.prop("files",t.originalEvent.dataTransfer.files).trigger("change"));null!=f.dragDrop.onDrop&&n.isFunction(f.dragDrop.onDrop)&&f.dragDrop.onDrop(t,s,o,h,e)},_dragLeaveCheck:function(t){var i=n(t.currentTarget);return!(!i.is(f.dragDrop.container)&&f.dragDrop.container.find(i).length)}},clipboard:{paste:function(n){var r,t,i,e;if(u._assets.isIntoView(h)&&n.originalEvent.clipboardData&&n.originalEvent.clipboardData.items&&n.originalEvent.clipboardData.items.length)for(r=n.originalEvent.clipboardData.items,u.clipboard.clean(),t=0;t<r.length;t++)(-1!==r[t].type.indexOf("image")||-1!==r[t].type.indexOf("text/uri-list"))&&(i=r[t].getAsFile(),e=1<f.clipboardPaste?f.clipboardPaste:2e3,i&&(i._name=u._assets.generateFileName(-1!=i.type.indexOf("/")?i.type.split("/")[1].toString().toLowerCase():"png","Clipboard "),u.set("feedback",u._assets.textParse(f.captions.paste,{ms:e/1e3})),u.clipboard._timer=setTimeout(function(){u.set("feedback",null);u.onChange(n,[i])},e-2)))},clean:function(){u.clipboard._timer&&(clearTimeout(u.clipboard._timer),delete u.clipboard._timer,u.set("feedback",null))}},files:{add:function(n,t){var o,i,r=n._name||n.name,l=n.size,v=u._assets.bytesToText(l),s=n.type,a=s?s.split("/",1).toString().toLowerCase():"",h=-1!=r.indexOf(".")?r.split(".").pop().toLowerCase():"",y=r.substr(0,r.length-(-1!=r.indexOf(".")?h.length+1:h.length)),c={name:r,title:y,size:l,size2:v,type:s,format:a,extension:h,data:c=n.data||{},file:n.file||n,reader:{read:function(n,t,r){return u.files.read(i,n,t,r)}},id:"updated"==t?n.id:Date.now(),input:"choosed"==t?e:null,html:null,choosed:"choosed"==t,appended:"appended"==t||"updated"==t,uploaded:"uploaded"==t};return"updated"!=t?(u._itFl.push(c),o=u._itFl.length-1,i=u._itFl[o]):(o=u._itFl.indexOf(n),u._itFl[o]=i=c),i.remove=function(){u.files.remove(i)},f.editor&&"image"==a&&(i.editor={rotate:!1!==f.editor.rotation?function(n){u.editor.rotate(i,n)}:null,cropper:!1!==f.editor.cropper?function(n){u.editor.crop(i,n)}:null,save:function(n,t,r,f){u.editor.save(i,t,r,n,f)}}),n.local&&(i.local=n.local),o},read:function(t,i,r,c,l){var d,a,p;if(u.isFileReaderSupported()&&!t.data.readerSkip){var v=new FileReader,w=window.URL||window.webkitURL,k=l&&t.data.thumbnail,b="string"!=typeof t.file,y=function(){var r=t.reader._callbacks||[],i;for(t.reader._timer&&(clearTimeout(t.reader._timer),delete t.reader._timer),delete t.reader._callbacks,delete t.reader._FileReader,i=0;i<r.length;i++)n.isFunction(r[i])&&r[i](t,s,o,h,e);f.onFileRead&&n.isFunction(f.onFileRead)&&f.onFileRead(t,s,o,h,e)};if((t.reader.src||t.reader._FileReader)&&!c||(t.reader={_FileReader:v,_callbacks:[],read:t.reader.read}),t.reader.src&&!c)return i&&n.isFunction(i)?i(t,s,o,h,e):null;if(i&&t.reader._callbacks&&(t.reader._callbacks.push(i),1<t.reader._callbacks.length))return;if("astext"==t.format)v.onload=function(n){var i=document.createElement("div");t.reader.node=i;t.reader.src=n.target.result;t.reader.length=n.target.result.length;i.innerHTML=t.reader.src.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");y()},v.onerror=function(){y();t.reader={read:t.reader.read}},b?v.readAsText(t.file):n.ajax({url:t.file,success:function(n){v.onload({target:{result:n}})},error:function(){v.onerror()}});else if("image"==t.format||k){if(v.onload=function(n){function r(){t.data&&t.data.readerCrossOrigin&&i.setAttribute("crossOrigin",t.data.readerCrossOrigin);i.src=n.target.result+(!t.data.readerForce&&!c||b||k||-1!=n.target.result.indexOf("data:image")?"":(-1==n.target.result.indexOf("?")?"?":"&")+"d="+Date.now());i.onload=function(){if(t.reader.exifOrientation){var n=document.createElement("canvas"),r=n.getContext("2d"),f=i,e=Math.abs(t.reader.exifOrientation),o=t.reader.exifOrientation<0?t.reader.exifOrientation:0,s=[0,180];1==e&&(e=0);n.width=f.naturalWidth;n.height=f.naturalHeight;r.drawImage(f,0,0);n.width=-1<s.indexOf(e)?f.naturalWidth:f.naturalHeight;n.height=-1<s.indexOf(e)?f.naturalHeight:f.naturalWidth;var h=e*Math.PI/180,c=.5*n.width,l=.5*n.height;return r.clearRect(0,0,n.width,n.height),r.translate(c,l),r.rotate(h),r.translate(.5*-f.naturalWidth,.5*-f.naturalHeight),o&&(-1<[-1,-180].indexOf(o)?(r.translate(n.width,0),r.scale(-1,1)):-1<[-90,-270].indexOf(o)&&(r.translate(0,n.width),r.scale(1,-1))),r.drawImage(f,0,0),r.setTransform(1,0,0,1,0,0),i.src=n.toDataURL(t.type,1),void delete t.reader.exifOrientation}t.reader.node=i;t.reader.src=i.src;t.reader.width=i.width;t.reader.height=i.height;t.reader.ratio=u._assets.pxToRatio(t.reader.width,t.reader.height);p&&w.revokeObjectURL(p);y();k&&(t.reader={read:t.reader.read})};i.onerror=function(){y();t.reader={read:t.reader.read}}}var i=new Image;f.thumbnails.exif&&t.choosed?u._assets.getExifOrientation(t.file,function(n){n&&(t.reader.exifOrientation=n);r()}):r()},v.onerror=function(){y();t.reader={read:t.reader.read}},!k&&t.size>u._assets.toBytes(f.reader.maxSize))return v.onerror();b?f.thumbnails.useObjectUrl&&f.thumbnails.canvasImage&&w?v.onload({target:{result:p=w.createObjectURL(t.file)}}):v.readAsDataURL(t.file):v.onload({target:{result:k?t.data.thumbnail:t.file}})}else if("video"==t.format||"audio"==t.format)if(d=(a=document.createElement(t.format)).canPlayType(t.type),v.onerror=function(){t.reader.node=null;y();t.reader={read:t.reader.read}},w&&""!==d){if(l&&!f.thumbnails.videoThumbnail)return t.reader.node=a,y(),void(t.reader={read:t.reader.read});p=b?w.createObjectURL(t.file):t.file;a.onloadedmetadata=function(){t.reader.node=a;t.reader.src=a.src;t.reader.duration=a.duration;t.reader.duration2=u._assets.secondsToText(a.duration);"video"==t.format&&(t.reader.width=a.videoWidth,t.reader.height=a.videoHeight,t.reader.ratio=u._assets.pxToRatio(t.reader.width,t.reader.height))};a.onerror=function(){y();t.reader={read:t.reader.read}};a.onloadeddata=function(){if("video"==t.format){var n=document.createElement("canvas"),i=n.getContext("2d");n.width=a.videoWidth;n.height=a.videoHeight;i.drawImage(a,0,0,n.width,n.height);t.reader.frame=u._assets.isBlankCanvas(n)?null:n.toDataURL();n=i=null}y()};setTimeout(function(){t.data&&t.data.readerCrossOrigin&&a.setAttribute("crossOrigin",t.data.readerCrossOrigin);a.src=p+"#t=1"},100)}else v.onerror();else"application/pdf"==t.type&&f.thumbnails.pdf?(a=document.createElement("iframe"),p=b?w.createObjectURL(t.file):(f.thumbnails.pdf.urlPrefix||"")+t.file,f.thumbnails.pdf.viewer||u._assets.hasPlugin("pdf")?(a.onload=function(){t.reader.node=a;t.reader.src=a.src;a.style.display="";y()},a.src=(f.thumbnails.pdf.viewer||"")+p,a.style.display="none",document.body.appendChild(a)):y()):(v.onload=function(n){t.reader.src=n.target.result;t.reader.length=n.target.result.length;y()},v.onerror=function(){y();t.reader={read:t.reader.read}},b?v[r||"readAsBinaryString"](t.file):y());t.reader._timer=setTimeout(v.onerror,l?f.reader.thumbnailTimeout:f.reader.timeout)}else i&&i(t,s,o,h,e);return null},list:function(t,i,r,c){var l=[];return!f.sorter||r||c&&"ignoreSorter"==c||u.sorter.save(!0),n.each(u._itFl,function(n,r){var f=r,e;if(f.upload&&!f.uploaded)return!0;if((i||t)&&(f=(f.choosed&&!f.uploaded?"0:/":"")+(i&&null!==u.files.getItemAttr(r,i)?u.files.getItemAttr(f,i):f.local||f["string"==typeof f.file?"file":"name"])),t&&(f={file:f},r.editor&&(r.editor.crop||r.editor.rotation)&&(f.editor={},r.editor.rotation&&(f.editor.rotation=r.editor.rotation),r.editor.crop&&(f.editor.crop=r.editor.crop)),void 0!==r.index&&(f.index=r.index),r.data&&r.data.listProps))for(e in r.data.listProps)f[e]=r.data.listProps[e];l.push(f)}),l=f.onListInput&&n.isFunction(f.onListInput)?f.onListInput(l,u._itFl,f.listInput,s,o,h,e):l,t?JSON.stringify(l):l},check:function(t,i,r){var c=["warning",null,!1,!1],l;return null!=f.limit&&r&&i.length+u._itFl.length-1>f.limit?(c[1]=u._assets.textParse(f.captions.errors.filesLimit),c[3]=!0,c):null!=f.maxSize&&r&&(l=0,n.each(u._itFl,function(n,t){l+=t.size}),l-=t.size,n.each(i,function(n,t){l+=t.size}),l>u._assets.toBytes(f.maxSize))?(c[1]=u._assets.textParse(f.captions.errors.filesSizeAll),c[3]=!0,c):null!=f.onFilesCheck&&n.isFunction(f.onFilesCheck)&&r&&!1===f.onFilesCheck(i,f,s,o,h,e)?(c[3]=!0,c):null!=f.extensions&&-1==n.inArray(t.extension,f.extensions)&&!f.extensions.filter(function(n){return t.type.length&&(-1<n.indexOf(t.type)||-1<n.indexOf(t.format+"/*"))}).length?(c[1]=u._assets.textParse(f.captions.errors.filesType,t),c):null!=f.disallowedExtensions&&(-1<n.inArray(t.extension,f.disallowedExtensions)||f.disallowedExtensions.filter(function(n){return!t.type.length||-1<n.indexOf(t.type)||-1<n.indexOf(t.format+"/*")}).length)?(c[1]=u._assets.textParse(f.captions.errors.filesType,t),c):null!=f.fileMaxSize&&t.size>u._assets.toBytes(f.fileMaxSize)?(c[1]=u._assets.textParse(f.captions.errors.fileSize,t),c):0==t.size&&""==t.type?(c[1]=u._assets.textParse(f.captions.errors.remoteFile,t),c):4096==t.size&&""==t.type?(c[1]=u._assets.textParse(f.captions.errors.folderUpload,t),c):!f.skipFileNameCheck&&(l=!1,n.each(u._itFl,function(n,r){if(r!=t&&1==r.choosed&&r.file&&r.name==t.name)return l=!0,r.file.size!=t.size||r.file.type!=t.type||t.file.lastModified&&r.file.lastModified&&r.file.lastModified!=t.file.lastModified||!(1<i.length)?(c[1]=u._assets.textParse(f.captions.errors.fileName,t),c[2]=!1):c[2]=!0,!1}),l)?c:!0},append:function(t){if((t=n.isArray(t)?t:[t]).length){for(var r,i=0;i<t.length;i++)u._assets.keyCompare(t[i],["name","file","size","type"])&&(r=u._itFl[u.files.add(t[i],"appended")],f.thumbnails&&u.thumbnails.item(r));return u.set("feedback",null),u.set("listInput",null),f.afterSelect&&n.isFunction(f.afterSelect)&&f.afterSelect(s,o,h,e),1!=t.length||r}},update:function(t,i){if(!(-1==u._itFl.indexOf(t)||t.upload&&t.upload.$ajax)){var r=t,e=u.files.add(n.extend(t,i),"updated");(t=u._itFl[e]).popup&&t.popup.close&&t.popup.close();f.thumbnails&&r.html&&u.thumbnails.item(t,r.html);u.set("listInput",null)}},find:function(t){var i=null;return n.each(u._itFl,function(n,r){if(r.html&&r.html.is(t))return i=r,!1}),i},remove:function(t,i){if(i||!f.onRemove||!n.isFunction(f.onRemove)||!1!==f.onRemove(t,s,o,h,e)){if(t.html&&(f.thumbnails.onItemRemove&&n.isFunction(f.thumbnails.onItemRemove)&&!i?f.thumbnails.onItemRemove(t.html,s,o,h,e):t.html.remove()),t.upload&&t.upload.$ajax&&t.upload.cancel&&t.upload.cancel(!0),t.popup&&t.popup.close&&t.popup.close(),t.reader.src&&(t.reader.node=null,URL.revokeObjectURL(t.reader.src)),t.input){var r=!0;n.each(u._itFl,function(n,u){if(t!=u&&(t.input==u.input||i&&1<t.input.get(0).files.length))return r=!1});r&&(u.isAddMoreMode()&&1<c.length?(u.set("nextInput"),c.splice(c.indexOf(t.input),1),t.input.remove()):u.set("input",""))}-1<u._pfrL.indexOf(t)&&u._pfrL.splice(u._pfrL.indexOf(t),1);-1<u._pfuL.indexOf(t)&&u._pfuL.splice(u._pfuL.indexOf(t),1);-1<u._itFl.indexOf(t)&&u._itFl.splice(u._itFl.indexOf(t),1);t=null;0==u._itFl.length&&u.reset();u.set("feedback",null);u.set("listInput",null)}},getItemAttr:function(n,t){var i=null;return n&&(void 0!==n[t]?i=n[t]:n.data&&void 0!==n.data[t]&&(i=n.data[t])),i},clear:function(t){for(var i,r=0;r<u._itFl.length;)i=u._itFl[r],t||!i.appended?(i.html&&i.html&&u._itFl[r].html.remove(),i.upload&&i.upload.$ajax&&u.upload.cancel(i),u._itFl.splice(r,1)):r++;u.set("feedback",null);u.set("listInput",null);0==u._itFl.length&&f.onEmpty&&n.isFunction(f.onEmpty)&&f.onEmpty(s,o,h,e)}},reset:function(t){t&&(u.clipboard._timer&&u.clipboard.clean(),n.each(c,function(n,t){n<c.length&&t.remove()}),c=[],u.set("input",""));u._itRl=[];u._pfuL=[];u._pfrL=[];u.files.clear(t)},destroy:function(){u.reset(!0);u.bindUnbindEvents(!1);e.removeAttr("style");o.before(e);delete e.get(0).FileUploader;o.remove();o=h=s=null},_assets:{toBytes:function(n){return 1048576*parseInt(n)},bytesToText:function(n){if(0==n)return"0 Byte";var t=Math.floor(Math.log(n)/Math.log(1024));return(n/Math.pow(1024,t)).toPrecision(3)+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][t]},escape:function(n){return(""+n).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")},secondsToText:function(n,t){n=parseInt(Math.round(n),10);var i=Math.floor(n/3600),r=Math.floor((n-3600*i)/60),u="";return(0<i||!t)&&(u+=(i<10?"0":"")+i+(t?"h ":":")),(0<r||!t)&&(u+=(r<10&&!t?"0":"")+r+(t?"m ":":")),u+(((n=n-3600*i-60*r)<10&&!t?"0":"")+n+(t?"s":""))},pxToRatio:function(n,t){var i=function i(n,t){return 0==t?n:i(t,n%t)},r=i(n,t);return[n/r,t/r]},ratioToPx:function(n,t,i){return(i=(i+"").split(":")).length<2?null:[t/i[1]*i[0],n/i[0]*i[1],i[0],i[1]]},hasAttr:function(n,t){var i=(t=t||e).attr(n);return!(!i||void 0===i)},copyAllAttributes:function(t,i){return n.each(i.get(0).attributes,function(){"required"!=this.name&&"type"!=this.name&&t.attr(this.name,this.value)}),i.get(0).FileUploader&&(t.get(0).FileUploader=i.get(0).FileUploader),t},getAllEvents:function(n){var t,i;n=n||e;t=[];for(i in n=n.get?n.get(0):n)0===i.indexOf("on")&&t.push(i.slice(2));return-1==t.indexOf("change")&&t.push("change"),t.join(" ")},isIntoView:function(t){var i=n(window).scrollTop(),u=i+window.innerHeight,r=t.offset().top,f=r+t.outerHeight();return i<r&&f<u},isBlankCanvas:function(n){var t=document.createElement("canvas"),i=!1;t.width=n.width;t.height=n.height;try{i=n.toDataURL()==t.toDataURL()}catch(n){}return t=null,i},generateFileName:function(n,t){function r(n){return n<10&&(n="0"+n),n}var i=new Date;return n=n?"."+n:"",(t=t||"")+i.getFullYear()+"-"+r(i.getMonth()+1)+"-"+r(i.getDate())+" "+r(i.getHours())+"-"+r(i.getMinutes())+"-"+r(i.getSeconds())+n},arrayBufferToBase64:function(n){for(var i="",r=new Uint8Array(n),t=0;t<r.byteLength;t++)i+=String.fromCharCode(r[t]);return window.btoa(i)},dataURItoBlob:function(n,t){for(var f,r=atob(n.split(",")[1]),e=n.split(",")[0].split(":")[1].split(";")[0],u=new ArrayBuffer(r.length),o=new Uint8Array(u),i=0;i<r.length;i++)o[i]=r.charCodeAt(i);return f=new DataView(u),new Blob([f.buffer],{type:t||e})},getExifOrientation:function(n,t){var i=new FileReader,r={1:0,2:-1,3:180,4:-180,5:-90,6:90,7:-270,8:270};i.onload=function(n){var u=new DataView(n.target.result),h=1,o,i,s,c,f,e;if(u.byteLength&&65496==u.getUint16(0,!1))for(o=u.byteLength,i=2;i<o&&!(u.getUint16(i+2,!1)<=8);)if(s=u.getUint16(i,!1),i+=2,65505==s){if(1165519206!=u.getUint32(i+=2,!1))break;for(f=18761==u.getUint16(i+=6,!1),i+=u.getUint32(i+4,f),c=u.getUint16(i,f),i+=2,e=0;e<c;e++)if(274==u.getUint16(i+12*e,f)){h=u.getUint16(i+12*e+8,f);o=0;break}}else{if(65280!=(65280&s))break;i+=u.getUint16(i,!1)}t&&t(r[h]||0)};i.onerror=function(){t&&t("")};i.readAsArrayBuffer(n)},textParse:function(t,i,r){switch(i=r?i||{}:n.extend({},{limit:f.limit,maxSize:f.maxSize,fileMaxSize:f.fileMaxSize,extensions:f.extensions?f.extensions.join(", "):null,captions:f.captions},i),typeof t=="undefined"?"undefined":_typeof(t)){case"string":for(var c in i)-1<["name","file","type","size"].indexOf(c)&&(i[c]=u._assets.escape(i[c]));t=t.replace(/\$\{(.*?)\}/g,function(match,a){var a=a.replace(/ /g,""),r=void 0!==i[a]&&null!=i[a]?i[a]:"",x,y;if(-1<["reader.node"].indexOf(a))return match;if((-1<a.indexOf(".")||-1<a.indexOf("[]"))&&(x=a.substr(0,-1<a.indexOf(".")?a.indexOf("."):-1<a.indexOf("[")?a.indexOf("["):a.length),y=a.substring(x.length),i[x]))try{r=eval('opts["'+x+'"]'+y)}catch(e){r=""}return r=n.isFunction(r)?u._assets.textParse(r):r,r||""});break;case"function":t=u._assets.textParse(t(i,s,o,h,e,u._assets.textParse),i,r)}return i=null,t},textToColor:function(n){var t,i,r;if(!n||0==n.length)return!1;for(t=0,i=0;t<n.length;i=n.charCodeAt(t++)+((i<<5)-i));for(t=0,r="#";t<3;r+=("00"+(i>>2*t++&255).toString(16)).slice(-2));return r},isBrightColor:function(t){var i;return 194<((i=function(t){var i;return t&&t.constructor==Array&&3==t.length?t:(i=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(t))?[parseInt(i[1]),parseInt(i[2]),parseInt(i[3])]:(i=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(t))?[2.55*parseFloat(i[1]),2.55*parseFloat(i[2]),2.55*parseFloat(i[3])]:(i=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(t))?[parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16)]:(i=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(t))?[parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16),parseInt(i[3]+i[3],16)]:"undefined"!=typeof colors?colors[n.trim(t).toLowerCase()]:null}(t))?.2126*i[0]+.7152*i[1]+.0722*i[2]:null)},keyCompare:function(t,i){for(var r=0;r<i.length;r++)if(!n.isPlainObject(t)||!t.hasOwnProperty(i[r]))throw new Error('Could not find valid *strict* attribute "'+i[r]+'" in '+JSON.stringify(t,null,4));return!0},dialogs:{alert:f.dialogs.alert,confirm:f.dialogs.confirm},hasPlugin:function(n){if(navigator.plugins&&navigator.plugins.length)for(var t in navigator.plugins)if(-1<navigator.plugins[t].name.toLowerCase().indexOf(n))return!0;return!1},isIE:function(){return-1<navigator.userAgent.indexOf("MSIE ")||-1<navigator.userAgent.indexOf("Trident/")||-1<navigator.userAgent.indexOf("Edge")},isMobile:function(){return void 0!==window.orientation||-1!==navigator.userAgent.indexOf("IEMobile")}},isSupported:function(){return e&&e.get(0).files},isFileReaderSupported:function(){return window.File&&window.FileList&&window.FileReader},isDefaultMode:function(){return!(f.upload||f.addMore&&1!=f.limit)},isAddMoreMode:function(){return!f.upload&&f.addMore&&1!=f.limit},isUploadMode:function(){return f.upload},_itFl:[],_pfuL:[],_pfrL:[],disabled:!1,locked:!1,rendered:!1};return f.enableApi&&(e.get(0).FileUploader={open:function(){e.trigger("click")},getOptions:function(){return f},getParentEl:function(){return o},getInputEl:function(){return e},getNewInputEl:function(){return h},getListEl:function(){return s},getListInputEl:function(){return f.listInput},getFiles:function(){return u._itFl},getChoosedFiles:function(){return u._itFl.filter(function(n){return n.choosed})},getAppendedFiles:function(){return u._itFl.filter(function(n){return n.appended})},getUploadedFiles:function(){return u._itFl.filter(function(n){return n.uploaded})},getFileList:function(n,t){return u.files.list(n,t,!0)},updateFileList:function(){return u.set("listInput",null),!0},setOption:function(n,t){return f[n]=t,!0},findFile:function(n){return u.files.find(n)},add:function(n,t,i){var r,f;return u.isUploadMode()?(n instanceof Blob?r=n:(f=/data:[a-z]+\/[a-z]+\;base64\,/.test(n)?n:"data:"+t+";base64,"+btoa(n),r=u._assets.dataURItoBlob(f,t)),r._name=i||u._assets.generateFileName(-1!=r.type.indexOf("/")?r.type.split("/")[1].toString().toLowerCase():"File "),u.onChange(null,[r]),!0):!1},append:function(n){return u.files.append(n)},update:function(n,t){return u.files.update(n,t)},remove:function(n){return n=n.jquery?u.files.find(n):n,-1<u._itFl.indexOf(n)&&(u.files.remove(n),!0)},uploadStart:function(){var n=this.getChoosedFiles()||[],t;if(u.isUploadMode()&&0<n.length&&!n[0].uploaded)for(t=0;t<n.length;t++)u.upload.send(n[t])},reset:function(){return u.reset(!0),!0},disable:function(n){return u.set("disabled",!0),n&&(u.locked=!0),!0},enable:function(){return u.set("disabled",!1),!(u.locked=!1)},destroy:function(){return u.destroy(),!0},isEmpty:function(){return 0==u._itFl.length},isDisabled:function(){return u.disabled},isRendered:function(){return u.rendered},assets:u._assets,getPluginMode:function(){return u.isDefaultMode()?"default":u.isAddMoreMode()?"addMore":u.isUploadMode()?"upload":void 0}}),u.init(),this})};n.fileuploader={getInstance:function(t){var i=t.prop?t:n(t);return i.length?i.get(0).FileUploader:null}};n.fn.fileuploader.languages={cz:{button:function(n){return"Procházet "+(1==n.limit?"soubor":"soubory")},feedback:function(n){return"Vyberte "+(1==n.limit?"soubor":"soubory")+", který chcete nahrát"},feedback2:function(n){return n.length+" "+(1<n.length?"vybráno souborů":"vybrán soubor")},confirm:"Potvrdit",cancel:"Zrušeni",name:"Jméno",type:"Format",size:"Velikost",dimensions:"Rozměry",duration:"Trvání",crop:"Oříznout",rotate:"Otočit",sort:"Roztřídit",open:"Otevřít",download:"Stáhnout",remove:"Odstranit",drop:"Pro nahrání přetahněte soubor sem",paste:'<div class="fileuploader-pending-loader"><\/div> Vkládání souboru, klikněte zde pro zrušeni',removeConfirmation:"Jste si jisti, že chcete odstranit tento soubor?",errors:{filesLimit:function(n){return"Pouze ${limit} "+(1==n.limit?"soubor může být nahrán":"soubory mohou byt nahrané")+"."},filesType:"Pouze ${extensions} soubory mohou byt nahrané.",fileSize:"${name} příliš velký! Prosím, vyberte soubor do velikosti ${fileMaxSize} MB.",filesSizeAll:"Vybraný soubor je příliš velký! Prosím, vyberte soubor do velikosti ${maxSize} MB.",fileName:"Soubor s tímto názvem  ${name} byl už vybran.",remoteFile:"Vzdálené soubory nejsou povoleny.",folderUpload:"Složky nejsou povolené."}},de:{button:function(n){return(1==n.limit?"Datei":"Dateien")+" durchsuchen"},feedback:function(n){return(1==n.limit?"Datei":"Dateien")+" zum Hochladen auswählen"},feedback2:function(n){return n.length+" "+(1==n.length?"Datei":"Dateien")+" ausgewählt"},confirm:"Speichern",cancel:"Schließen",name:"Name",type:"Typ",size:"Größe",dimensions:"Format",duration:"Länge",crop:"Crop",rotate:"Rotieren",sort:"Sortieren",open:"Öffnen",download:"Herunterladen",remove:"Löschen",drop:"Die Dateien hierher ziehen, um sie hochzuladen",paste:'<div class="fileuploader-pending-loader"><\/div> Eine Datei wird eingefügt. Klicken Sie hier zum abzubrechen',removeConfirmation:"Möchten Sie diese Datei wirklich löschen?",errors:{filesLimit:function(n){return"Nur ${limit} "+(1==n.limit?"Datei darf":"Dateien dürfen")+" hochgeladen werden."},filesType:"Nur ${extensions} Dateien dürfen hochgeladen werden.",fileSize:"${name} ist zu groß! Bitte wählen Sie eine Datei bis zu ${fileMaxSize} MB.",filesSizeAll:"Die ausgewählten Dateien sind zu groß! Bitte wählen Sie Dateien bis zu ${maxSize} MB.",fileName:"Eine Datei mit demselben Namen ${name} ist bereits ausgewählt.",remoteFile:"Remote-Dateien sind nicht zulässig.",folderUpload:"Ordner sind nicht erlaubt."}},dk:{button:function(n){return"Gennemse "+(1==n.limit?"fil":"filer")},feedback:function(n){return"Vælg "+(1==n.limit?"fil":"filer")+" til upload"},feedback2:function(n){return n.length+" "+(1==n.length?"fil":"filer")+" er valgt"},confirm:"Bekræft",cancel:"Fortrydl",name:"Navn",type:"Type",size:"Størrelse",dimensions:"Dimensioner",duration:"Varighed’",crop:"Tilpas",rotate:"Rotér",sort:"Sorter",open:"Åben",download:"Hent",remove:"Slet",drop:"Drop filer her til upload",paste:"Overfør fil, klik her for at afbryde",removeConfirmation:"Er du sikker på, du ønsker at slette denne fil?",errors:{filesLimit:function(n){return"Du kan kun uploade ${limit} "+(1==n.limit?"fil":"filer")+" ad gangen."},filesType:"Det er kun tilladt at uploade ${extensions} filer.",fileSize:"${name} er for stor! Vælg venligst en fil på højst ${fileMaxSize} MB.",filesSizeAll:"De valgte filer er for store! Vælg venligst filer op til ${maxSize} MB ialt.",fileName:"Du har allerede valgt en fil med navnet ${name}.",remoteFile:"Fremmede filer er ikke tilladt.",folderUpload:"Mapper er ikke tilladt."}},en:{button:function(n){return"Browse "+(1==n.limit?"file":"files")},feedback:function(n){return"Choose "+(1==n.limit?"file":"files")+" to upload"},feedback2:function(n){return n.length+" "+(1<n.length?" files were":" file was")+" chosen"},confirm:"Confirm",cancel:"Cancel",name:"Name",type:"Type",size:"Size",dimensions:"Dimensions",duration:"Duration",crop:"Crop",rotate:"Rotate",sort:"Sort",open:"Open",download:"Download",remove:"Delete",drop:"Drop the files here to upload",paste:'<div class="fileuploader-pending-loader"><\/div> Pasting a file, click here to cancel',removeConfirmation:"Are you sure you want to delete this file?",errors:{filesLimit:function(n){return"Only ${limit} "+(1==n.limit?"file":"files")+" can be uploaded."},filesType:"Only ${extensions} files are allowed to be uploaded.",fileSize:"${name} is too large! Please choose a file up to ${fileMaxSize} MB.",filesSizeAll:"The chosen files are too large! Please select files up to ${maxSize} MB.",fileName:"A file with the same name ${name} is already selected.",remoteFile:"Remote files are not allowed.",folderUpload:"Folders are not allowed."}},es:{button:function(n){return"Examinar "+(1==n.limit?"archivo":"archivos")},feedback:function(n){return"Selecciona "+(n.limit,"archivos")+" para subir"},feedback2:function(n){return n.length+" "+(1<n.length?"archivos seleccionados":"archivo seleccionado")},confirm:"Guardar",cancel:"Anular",name:"Nombre",type:"Tipo",size:"Tamaño",dimensions:"Dimensiones",duration:"Duracion",crop:"Corta",rotate:"Rotar",sort:"Ordenar",open:"Abierto",download:"Descargar",remove:"Eliminar",drop:"Suelta los archivos aquí para subirlos",paste:'<div class="fileuploader-pending-loader"><\/div> Pegar un archivo, haga clic aquí para cancelar',removeConfirmation:"¿Estás seguro de que deseas eliminar este archivo?",errors:{filesLimit:function(n){return"Solo se pueden seleccionar ${limit} "+(1==n.limit?"archivo":"archivos")+"."},filesType:"Solo se pueden seleccionar archivos ${extensions}.",fileSize:"${name} es demasiado grande! Por favor, seleccione un archivo hasta ${fileMaxSize} MB.",filesSizeAll:"¡Los archivos seleccionados son demasiado grandes! Por favor seleccione archivos de hasta ${maxSize} MB.",fileName:"Un archivo con el mismo nombre ${name} ya está seleccionado.",remoteFile:"Los archivos remotos no están permitidos.",folderUpload:"No se permiten carpetas."}},fr:{button:function(n){return"Parcourir "+(1==n.limit?"le fichier":"les fichiers")},feedback:function(n){return"Choisir "+(1==n.limit?"le fichier ":"les fichiers")+" à télécharger"},feedback2:function(n){return n.length+" "+(1<n.length?"fichiers ont été choisis":"fichier a été choisi")},confirm:"Confirmer",cancel:"Annuler",name:"Nom",type:"Type",size:"Taille",dimensions:"Dimensions",duration:"Durée",crop:"Recadrer",rotate:"Pivoter",sort:"Trier",download:"Télécharger",remove:"Supprimer",drop:"Déposez les fichiers ici pour les télécharger",paste:'<div class="fileuploader-pending-loader"><\/div> Collant un fichier, cliquez ici pour annuler.',removeConfirmation:"Êtes-vous sûr de vouloir supprimer ce fichier ?",errors:{filesLimit:"Seuls les fichiers ${limit} peuvent être téléchargés.",filesType:"Seuls les fichiers ${extensions} peuvent être téléchargés.",fileSize:"${name} est trop lourd, la limite est de ${fileMaxSize} MB.",filesSizeAll:"Les fichiers que vous avez choisis sont trop lourd, la limite totale est de ${maxSize} MB.",fileName:"Le fichier portant le nom ${name} est déjà sélectionné.",folderUpload:"Vous n'êtes pas autorisé à télécharger des dossiers."}},it:{button:function(n){return"Sfoglia"+(1==n.limit?"il file":"i file")},feedback:function(n){return"Seleziona "+(1==n.limit?"file":"i file")+" per caricare"},feedback2:function(n){return n.length+" "+(1<n.length?"i file sono scelti":"il file è scelto")},confirm:"Conferma",cancel:"Cancella",name:"Nome",type:"Tipo file",size:"Dimensione file",dimensions:"Dimensioni",duration:"Durata",crop:"Taglia",rotate:"Ruota",sort:"Ordina",open:"Apri",download:"Scarica",remove:"Elimina",drop:"Posiziona il file qui per caricare",paste:'<div class="fileuploader-pending-loader"><\/div> Incolla file, clicca qui per cancellare',removeConfirmation:"Sei sicuro di voler eliminare il file?",errors:{filesLimit:"Solo ${limit} file possono essere caricati.",filesType:"Solo ${extensions} file possono essere caricati.",fileSize:"${name} è troppo grande! Scegli un file fino a ${fileMaxSize} MB.",filesSizeAll:"I file selezioni sono troppo grandi! Scegli un file fino a ${maxSize} MB.",fileName:"Un file con lo stesso nome ${name} è già selezionato.",remoteFile:"I file remoti non sono consentiti.",folderUpload:"Le cartelle non sono consentite."}},lv:{button:function(n){return"Izvēlieties "+(1==n.limit?"fails":"faili")},feedback:function(n){return"Izvēliejaties "+(1==n.limit?"fails":"faili")+" lejupielādēt"},feedback2:function(n){return n.length+" "+(1<n.length?"failus izvelēts":"fails izvēlēts")},confirm:"Saglabāt",cancel:"Atcelt",name:"Vārds",type:"Formāts",size:"Izmērs",dimensions:"Izmēri",duration:"Ilgums",crop:"Nogriezt",rotate:"Pagriezt",sort:"Kārtot",open:"Atvērt",download:"Lejupielādēt",remove:"Dzēst",drop:"Lai augšupielādētu, velciet failus šeit",paste:'<div class="fileuploader-pending-loader"><\/div> Ievietojiet failu, noklikšķiniet šeit, lai atceltu',removeConfirmation:"Vai tiešām vēlaties izdzēst šo failu?",errors:{filesLimit:function(n){return"Tikai ${limit} "+(1==n.limit?"failu var augšupielādēt":"failus var augšupielādēt")+"."},filesType:"Tikai ${extensions} failus var augšupielādēt.",fileSize:"${name} ir par lielu! Lūdzu, atlasiet failu līdz ${fileMaxSize} MB.",filesSizeAll:"Atlasītie faili ir pārāk lieli! Lūdzu, atlasiet failus līdz ${maxSize} MB.",fileName:"Fails ar tādu pašu nosaukumu ${name} jau ir atlasīts.",remoteFile:"Attālie faili nav atļauti.",folderUpload:"Mapes nav atļautas."}},nl:{button:function(n){return(1==n.limit?"Bestand":"Bestanden")+" kiezen"},feedback:function(n){return"Kies "+(1==n.limit?"een bestand":"bestanden")+" om te uploaden"},feedback2:function(n){return n.length+" "+(1<n.length?"bestanden":"bestand")+" gekozen"},confirm:"Opslaan",cancel:"Annuleren",name:"Naam",type:"Type",size:"Grootte",dimensions:"Afmetingen",duration:"Duur",crop:"Uitsnijden",rotate:"Draaien",sort:"Sorteren",open:"Open",download:" Downloaden",remove:"Verwijderen",drop:"Laat de bestanden hier vallen om te uploaden",paste:'<div class="fileuploader-pending-loader"><\/div> Een bestand wordt geplakt, klik hier om te annuleren',removeConfirmation:"Weet u zeker dat u dit bestand wilt verwijderen?",errors:{filesLimit:function(n){return"Er "+(1==n.limit?"mag":"mogen")+" slechts ${limit} "+(1==n.limit?"bestand":"bestanden")+" worden geüpload."},filesType:"Alleen ${extensions} mogen worden geüpload.",fileSize:"${name} is te groot! Kies een bestand tot ${fileMaxSize} MB.",filesSizeAll:"De gekozen bestanden zijn te groot! Kies bestanden tot ${maxSize} MB.",fileName:"Een bestand met dezelfde naam ${name} is al gekozen.",remoteFile:"Externe bestanden zijn niet toegestaan.",folderUpload:"Mappen zijn niet toegestaan."}},pl:{button:function(n){return"Wybierz "+(1==n.limit?"plik":"pliki")},feedback:function(n){return"Wybierz "+(1==n.limit?"plik":"pliki")+" do przesłania"},feedback2:function(n){return n.length+" "+(1<n.length?"pliki zostały wybrane":"plik został wybrany")},confirm:"Potwierdź",cancel:"Anuluj",name:"Nazwa",type:"Typ",size:"Rozmiar",dimensions:"Wymiary",duration:"Czas trwania",crop:"Przytnij",rotate:"Obróć",sort:"Sortuj",open:"Otwórz",download:"Pobierz",remove:"Usuń",drop:"Upuść pliki tutaj do przesłania",paste:'<div class="fileuploader-pending-loader"><\/div> Wklejając plik, kliknij tutaj, aby anulować',removeConfirmation:"Czy jesteś pewien, że chcesz usunąć ten plik?",errors:{filesLimit:function(n){return"Tylko ${limit} "+(1==n.limit?"plik":"pliki")+" można wybrać."},filesType:"Tylko pliki ${extensions} mogą zostać pobrane.",fileSize:"Plik ${name} jest za duży! Proszę wybrać plik do ${fileMaxSize} MB.",filesSizeAll:"Wybrane pliki są za duże! Proszę wybrać pliki do  ${maxSize} MB.",fileName:", Plik o tej samej nazwie ${name} już został wybrany.",remoteFile:"Zdalne pliki nie są dozwolone.",folderUpload:"Foldery nie są dozwolone."}},pt:{button:function(n){return"Escolher "+(1==n.limit?"arquivo":"arquivos")},feedback:function(n){return"Escolha "+(1==n.limit?"arquivo":"arquivos")+" a carregar"},feedback2:function(n){return n.length+" "+(1<n.length?"arquivos foram escolhidos":"arquivo foi escolhido")},confirm:"Confirmar",cancel:"Cancelar",name:"Nome",type:"Tipo",size:"Tamanho",dimensions:"Dimensões",duration:"Duração",crop:"Recorte",rotate:"Girar",sort:"Ordenar",open:"Abrir",download:"Baixar",remove:"Excluir",drop:"Solte os arquivos aqui para fazer o upload",paste:'<div class="fileuploader-pending-loader"><\/div> Colando um arquivo, clique aqui para cancelar',removeConfirmation:"Tem certeza de que deseja excluir este arquivo?",errors:{filesLimit:function(n){return"Apenas ${limit} "+(1==n.limit?"arquivo a ser carregado":"arquivos a serem carregados")+"."},filesType:"Somente arquivos ${extensions} podem ser carregados.",fileSize:"${name} é muito grande! Selecione um arquivo de até ${fileMaxSize} MB.",filesSizeAll:"Os arquivos selecionados são muito grandes! Selecione arquivos de até ${maxSize} MB.",fileName:"Um arquivo com o mesmo nome ${name} já está selecionado.",remoteFile:"Arquivos remotos não são permitidos.",folderUpload:"Pastas não são permitidas."}},ro:{button:function(n){return"Atașează "+(1==n.limit?"fișier":"fișiere")},feedback:function(n){return"Selectează "+(1==n.limit?"fișier":"fișiere")+" pentru încărcare"},feedback2:function(n){return n.length+" "+(1<n.length?" fișiere":" fișier")+" selectate"},confirm:"Confirmă",cancel:"Anulează",name:"Nume",type:"Tip",size:"Mărimea",dimensions:"Dimensiunea",duration:"Durata",crop:"Crop",rotate:"Rotire",sort:"Sortare",open:"Deschide",download:"Download",remove:"Șterge",drop:"Aruncați fișierele aici pentru a le încărca",paste:'<div class="fileuploader-pending-loader"><\/div> Se atașează fișier, faceți click aici pentru anulare',removeConfirmation:"Sigur doriți să ștergeți acest fișier?",errors:{filesLimit:function(n){return"Doar ${limit} "+(1==n.limit?"fișier poate fi selectat":"fișiere pot fi selectat")+"."},filesType:"Doar fișierele ${extensions} pot fi încărcate.",fileSize:"${name} este prea mare! Vă rugăm să selectați un fișier până la ${fileMaxSize} MB.",filesSizeAll:"Fișierele selectate sunt prea mari! Vă rugăm să selectați fișiere până la ${maxSize} MB.",fileName:"Fișierul cu același numele ${nume} a fost deja selectat.",remoteFile:"Fișierele remote nu sunt permise.",folderUpload:"Folderele nu sunt permise."}},ru:{button:function(n){return"Выбрать "+(1==n.limit?"файл":"файлы")},feedback:function(n){return"Выберите "+(1==n.limit?"файл":"файлы")+" для загрузки"},feedback2:function(n){return n.length+" "+(1<n.length?"файлов выбрано":"файл выбран")},confirm:"Сохранить",cancel:"Отмена",name:"Имя",type:"Формат",size:"Размер",dimensions:"Размеры",duration:"Длительность",crop:"Обрезать",rotate:"Повернуть",sort:"Сортировть",open:"Открыть",download:"Скачать",remove:"Удалить",drop:"Перетащите файлы сюда для загрузки",paste:'<div class="fileuploader-pending-loader"><\/div> Вставка файла, нажмите здесь, чтобы отменить',removeConfirmation:"Вы уверены, что хотите удалить этот файл?",errors:{filesLimit:function(n){return"Только ${limit} "+(1==n.limit?"файл может быть загружен":"файлов могут быть загружены")+"."},filesType:"Только ${extensions} файлы могут быть загружены.",fileSize:"${name} слишком большой! Пожалуйста, выберите файл до ${fileMaxSize} МБ.",filesSizeAll:"Выбранные файлы слишком большие! Пожалуйста, выберите файлы до ${maxSize} МБ.",fileName:"Файл с таким именем ${name} уже выбран.",remoteFile:"Удаленные файлы не допускаются.",folderUpload:"Папки не допускаются."}},tr:{button:function(n){return(1==n.limit?"Dosya":"Dosyaları")+" seç"},feedback:function(n){return"Yüklemek istediğiniz "+(1==n.limit?"dosyayı":"dosyaları")+" seçin."},feedback2:function(n){return n.length+" "+(1<n.length?"dosyalar":"dosya")+" seçildi."},confirm:"Onayla",cancel:"İptal",name:"İsim",type:"Tip",size:"Boyut",dimensions:"Boyutlar",duration:"Süre",crop:"Kırp",rotate:"Döndür",sort:"Sırala",open:"Aç",download:"İndir",remove:"Sil",drop:"Yüklemek için dosyaları buraya bırakın",paste:'<div class="fileuploader-pending-loader"><\/div> Bir dosyayı yapıştırmak veya iptal etmek için buraya tıklayın',removeConfirmation:"Bu dosyayı silmek istediğinizden emin misiniz?",errors:{filesLimit:function(n){return"Sadece ${limit} "+(1==n.limit?"dosya":"dosyalar")+" yüklenmesine izin verilir."},filesType:"Sadece ${extensions} dosyaların yüklenmesine izin verilir.",fileSize:"${name} çok büyük! Lütfen ${fileMaxSize} MB'a kadar bir dosya seçin.",filesSizeAll:"Seçilen dosyalar çok büyük! Lütfen ${maxSize} MB'a kadar dosyaları seçin",fileName:"Aynı ada sahip bir dosya ${name} zaten seçilmiştir.",remoteFile:"Uzak dosyalara izin verilmez.",folderUpload:"Klasörlere izin verilmez."}}};n.fn.fileuploader.defaults={limit:null,maxSize:null,fileMaxSize:null,extensions:null,disallowedExtensions:null,changeInput:!0,inputNameBrackets:!0,theme:"default",thumbnails:{box:'<div class="fileuploader-items"><ul class="fileuploader-items-list"><\/ul><\/div>',boxAppendTo:null,item:'<li class="fileuploader-item"><div class="columns"><div class="column-thumbnail">${image}<span class="fileuploader-action-popup"><\/span><\/div><div class="column-title"><div title="${name}">${name}<\/div><span>${size2}<\/span><\/div><div class="column-actions"><button type="button" class="fileuploader-action fileuploader-action-remove" title="${captions.remove}"><i class="fileuploader-icon-remove"><\/i><\/a><\/div><\/div><div class="progress-bar2">${progressBar}<span><\/span><\/div><\/li>',item2:'<li class="fileuploader-item"><div class="columns"><div class="column-thumbnail">${image}<span class="fileuploader-action-popup"><\/span><\/div><div class="column-title"><a href="${file}" target="_blank"><div title="${name}">${name}<\/div><span>${size2}<\/span><\/a><\/div><div class="column-actions"><a href="${data.url}" class="fileuploader-action fileuploader-action-download" title="${captions.download}" download><i class="fileuploader-icon-download"><\/i><\/a><button type="button" class="fileuploader-action fileuploader-action-remove" title="${captions.remove}"><i class="fileuploader-icon-remove"><\/i><\/a><\/div><\/div><\/li>',popup:{container:"body",loop:!0,arrows:!0,zoomer:!0,template:function(n){return'<div class="fileuploader-popup-preview"><button type="button" class="fileuploader-popup-move" data-action="prev"><i class="fileuploader-icon-arrow-left"><\/i><\/button><div class="fileuploader-popup-node ${format}">${reader.node}<\/div><div class="fileuploader-popup-content"><div class="fileuploader-popup-footer"><ul class="fileuploader-popup-tools">'+("image"==n.format&&n.reader.node&&n.editor?(n.editor.cropper?'<li><button type="button" data-action="crop"><i class="fileuploader-icon-crop"><\/i> ${captions.crop}<\/button><\/li>':"")+(n.editor.rotate?'<li><button type="button" data-action="rotate-cw"><i class="fileuploader-icon-rotate"><\/i> ${captions.rotate}<\/button><\/li>':""):"")+("image"==n.format?'<li class="fileuploader-popup-zoomer"><button type="button" data-action="zoom-out">&minus;<\/button><input type="range" min="0" max="100"><button type="button" data-action="zoom-in">&plus;<\/button><span><\/span> <\/li>':"")+(n.data.url?'<li><a href="'+n.data.url+'" data-action target="_blank"><i class="fileuploader-icon-external"><\/i> ${captions.open}<\/a><\/li>':"")+'<li><button type="button" data-action="remove"><i class="fileuploader-icon-trash"><\/i> ${captions.remove}<\/button><\/li><\/ul><\/div><div class="fileuploader-popup-header"><ul class="fileuploader-popup-meta"><li><span>${captions.name}:<\/span><h5>${name}<\/h5><\/li><li><span>${captions.type}:<\/span><h5>${extension.toUpperCase()}<\/h5><\/li><li><span>${captions.size}:<\/span><h5>${size2}<\/h5><\/li>'+(n.reader&&n.reader.width?"<li><span>${captions.dimensions}:<\/span><h5>${reader.width}x${reader.height}px<\/h5><\/li>":"")+(n.reader&&n.reader.duration?"<li><span>${captions.duration}:<\/span><h5>${reader.duration2}<\/h5><\/li>":"")+'<\/ul><div class="fileuploader-popup-info"><\/div><ul class="fileuploader-popup-buttons"><li><button type="button" class="fileuploader-popup-button" data-action="cancel">${captions.cancel}<\/a><\/li>'+(n.editor?'<li><button type="button" class="fileuploader-popup-button button-success" data-action="save">${captions.confirm}<\/button><\/li>':"")+'<\/ul><\/div><\/div><button type="button" class="fileuploader-popup-move" data-action="next"><i class="fileuploader-icon-arrow-right"><\/i><\/button><\/div>'},onShow:function(n){n.popup.html.on("click",'[data-action="remove"]',function(){n.popup.close();n.remove()}).on("click",'[data-action="cancel"]',function(){n.popup.close()}).on("click",'[data-action="save"]',function(){n.editor&&n.editor.save();n.popup.close&&n.popup.close()})},onHide:null},itemPrepend:!1,removeConfirmation:!0,startImageRenderer:!0,synchronImages:!0,useObjectUrl:!1,canvasImage:!0,videoThumbnail:!0,pdf:!0,exif:!0,touchDelay:0,_selectors:{list:".fileuploader-items-list",item:".fileuploader-item",start:".fileuploader-action-start",retry:".fileuploader-action-retry",remove:".fileuploader-action-remove",sorter:".fileuploader-action-sort",rotate:".fileuploader-action-rotate",popup:".fileuploader-popup-preview",popup_open:".fileuploader-action-popup"},beforeShow:null,onItemShow:null,onItemRemove:function(n){n.children().animate({opacity:0},200,function(){setTimeout(function(){n.slideUp(200,function(){n.remove()})},100)})},onImageLoaded:null},editor:!1,sorter:!1,reader:{thumbnailTimeout:5e3,timeout:12e3,maxSize:20},files:null,upload:null,dragDrop:!0,addMore:!1,skipFileNameCheck:!1,clipboardPaste:!0,listInput:!0,enableApi:!1,listeners:null,onSupportError:null,beforeRender:null,afterRender:null,beforeSelect:null,onFilesCheck:null,onFileRead:null,onSelect:null,afterSelect:null,onListInput:null,onRemove:null,onEmpty:null,dialogs:{alert:function(n){function t(){return n.apply(this,arguments)}return t.toString=function(){return n.toString()},t}(function(n){return alert(n)}),confirm:function(n){function t(){return n.apply(this,arguments)}return t.toString=function(){return n.toString()},t}(function(n,t){confirm(n)&&t()})},captions:n.fn.fileuploader.languages.en}}(jQuery);!function(){function i(n){var t=Array.isArray(n)?{label:n[0],value:n[1]}:"object"==(typeof n=="undefined"?"undefined":_typeof(n))&&"label"in n&&"value"in n?n:{label:n,value:n};this.label=t.label||t.value;this.value=t.value}function e(n,t,i){var r,u,f;for(r in t)u=t[r],f=n.input.getAttribute("data-"+r.toLowerCase()),n[r]="number"==typeof u?parseInt(f):!1===u?null!==f:u instanceof Function?null:f,n[r]||0===n[r]||(n[r]=r in i?i[r]:u)}function n(n,t){return"string"==typeof n?(t||document).querySelector(n):n||null}function u(n,t){return r.call((t||document).querySelectorAll(n))}function f(){u("input.awesomplete").forEach(function(n){new t(n)})}var t=function t(i,r){var u=this;t.count=(t.count||0)+1;this.count=t.count;this.isOpened=!1;this.input=n(i);this.input.setAttribute("autocomplete","off");this.input.setAttribute("aria-expanded","false");this.input.setAttribute("aria-owns","awesomplete_list_"+this.count);this.input.setAttribute("role","combobox");this.options=r=r||{};e(this,{minChars:2,maxItems:10,autoFirst:!1,data:t.DATA,filter:t.FILTER_CONTAINS,sort:!1!==r.sort&&t.SORT_BYLENGTH,container:t.CONTAINER,item:t.ITEM,replace:t.REPLACE,tabSelect:!1},r);this.index=-1;this.container=this.container(i);this.ul=n.create("ul",{hidden:"hidden",role:"listbox",id:"awesomplete_list_"+this.count,inside:this.container});this.status=n.create("span",{className:"visually-hidden",role:"status","aria-live":"assertive","aria-atomic":!0,inside:this.container,textContent:0!=this.minChars?"Type "+this.minChars+" or more characters for results.":"Begin typing for results."});this._events={input:{input:this.evaluate.bind(this),blur:this.close.bind(this,{reason:"blur"}),keydown:function(n){var t=n.keyCode;u.opened&&(13===t&&u.selected?(n.preventDefault(),u.select(void 0,void 0,n)):9===t&&u.selected&&u.tabSelect?u.select(void 0,void 0,n):27===t?u.close({reason:"esc"}):38!==t&&40!==t||(n.preventDefault(),u[38===t?"previous":"next"]()))}},form:{submit:this.close.bind(this,{reason:"submit"})},ul:{mousedown:function(n){n.preventDefault()},click:function(n){var t=n.target;if(t!==this){for(;t&&!/li/i.test(t.nodeName);)t=t.parentNode;t&&0===n.button&&(n.preventDefault(),u.select(t,n.target,n))}}}};n.bind(this.input,this._events.input);n.bind(this.input.form,this._events.form);n.bind(this.ul,this._events.ul);this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||r.list||[];t.all.push(this)},r;t.prototype={set list(t){if(Array.isArray(t))this._list=t;else if("string"==typeof t&&t.indexOf(",")>-1)this._list=t.split(/\s*,\s*/);else if((t=n(t))&&t.children){var i=[];r.apply(t.children).forEach(function(n){if(!n.disabled){var t=n.textContent.trim(),r=n.value||t,u=n.label||t;""!==r&&i.push({label:u,value:r})}});this._list=i}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return this.isOpened},close:function(t){this.opened&&(this.input.setAttribute("aria-expanded","false"),this.ul.setAttribute("hidden",""),this.isOpened=!1,this.index=-1,this.status.setAttribute("hidden",""),n.fire(this.input,"awesomplete-close",t||{}))},open:function(){this.input.setAttribute("aria-expanded","true");this.ul.removeAttribute("hidden");this.isOpened=!0;this.status.removeAttribute("hidden");this.autoFirst&&-1===this.index&&this.goto(0);n.fire(this.input,"awesomplete-open")},destroy:function(){var i,r;(n.unbind(this.input,this._events.input),n.unbind(this.input.form,this._events.form),this.options.container)||(i=this.container.parentNode,i.insertBefore(this.input,this.container),i.removeChild(this.container));this.input.removeAttribute("autocomplete");this.input.removeAttribute("aria-autocomplete");r=t.all.indexOf(this);-1!==r&&t.all.splice(r,1)},next:function(){var n=this.ul.children.length;this.goto(this.index<n-1?this.index+1:n?0:-1)},previous:function(){var t=this.ul.children.length,n=this.index-1;this.goto(this.selected&&-1!==n?n:t-1)},goto:function(t){var i=this.ul.children;this.selected&&i[this.index].setAttribute("aria-selected","false");this.index=t;t>-1&&i.length>0&&(i[t].setAttribute("aria-selected","true"),this.status.textContent=i[t].textContent+", list item "+(t+1)+" of "+i.length,this.input.setAttribute("aria-activedescendant",this.ul.id+"_item_"+this.index),this.ul.scrollTop=i[t].offsetTop-this.ul.clientHeight+i[t].clientHeight,n.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,i,r){if(t?this.index=n.siblingIndex(t):t=this.ul.children[this.index],t){var u=this.suggestions[this.index];n.fire(this.input,"awesomplete-select",{text:u,origin:i||t,originalEvent:r})&&(this.replace(u),this.close({reason:"select"}),n.fire(this.input,"awesomplete-selectcomplete",{text:u,originalEvent:r}))}},evaluate:function(){var n=this,t=this.input.value;t.length>=this.minChars&&this._list&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map(function(r){return new i(n.data(r,t))}).filter(function(i){return n.filter(i,t)}),!1!==this.sort&&(this.suggestions=this.suggestions.sort(this.sort)),this.suggestions=this.suggestions.slice(0,this.maxItems),this.suggestions.forEach(function(i,r){n.ul.appendChild(n.item(i,t,r))}),0===this.ul.children.length?(this.status.textContent="No results found",this.close({reason:"nomatches"})):(this.open(),this.status.textContent=this.ul.children.length+" results found")):(this.close({reason:"nomatches"}),this.status.textContent="No results found")}};t.all=[];t.FILTER_CONTAINS=function(t,i){return RegExp(n.regExpEscape(i.trim()),"i").test(t)};t.FILTER_STARTSWITH=function(t,i){return RegExp("^"+n.regExpEscape(i.trim()),"i").test(t)};t.SORT_BYLENGTH=function(n,t){return n.length!==t.length?n.length-t.length:n<t?-1:1};t.CONTAINER=function(t){return n.create("div",{className:"awesomplete",around:t})};t.ITEM=function(t,i,r){return n.create("li",{innerHTML:""===i.trim()?t:t.replace(RegExp(n.regExpEscape(i.trim()),"gi"),"<mark>$&<\/mark>"),role:"option","aria-selected":"false",id:"awesomplete_list_"+this.count+"_item_"+r})};t.REPLACE=function(n){this.input.value=n.value};t.DATA=function(n){return n};Object.defineProperty(i.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}});i.prototype.toString=i.prototype.valueOf=function(){return""+this.label};r=Array.prototype.slice;n.create=function(t,i){var r=document.createElement(t),u,e,f;for(u in i)e=i[u],"inside"===u?n(e).appendChild(r):"around"===u?(f=n(e),f.parentNode.insertBefore(r,f),r.appendChild(f),null!=f.getAttribute("autofocus")&&f.focus()):u in r?r[u]=e:r.setAttribute(u,e);return r};n.bind=function(n,t){var i,r;if(n)for(i in t)r=t[i],i.split(/\s+/).forEach(function(t){n.addEventListener(t,r)})};n.unbind=function(n,t){var i,r;if(n)for(i in t)r=t[i],i.split(/\s+/).forEach(function(t){n.removeEventListener(t,r)})};n.fire=function(n,t,i){var r=document.createEvent("HTMLEvents"),u;r.initEvent(t,!0,!0);for(u in i)r[u]=i[u];return n.dispatchEvent(r)};n.regExpEscape=function(n){return n.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")};n.siblingIndex=function(n){for(var t=0;n=n.previousElementSibling;t++);return t};"undefined"!=typeof self&&(self.Awesomplete=t);"undefined"!=typeof Document&&("loading"!==document.readyState?f():document.addEventListener("DOMContentLoaded",f));t.$=n;t.$$=u;"object"==(typeof module=="undefined"?"undefined":_typeof(module))&&module.exports&&(module.exports=t)}();disableBodyScroll=function(){var t=!1,n=!1,i;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);Element.prototype.closest||(Element.prototype.closest=function(n){var t=this;if(!document.documentElement.contains(el))return null;do{if(t.matches(n))return t;t=t.parentElement}while(t!==null);return el});var r=function(i){!1!==n&&i.target.closest(t)||i.preventDefault()},u=function(n){n.targetTouches.length===1&&(i=n.targetTouches[0].clientY)},f=function(t){if(t.targetTouches.length===1){var r=t.targetTouches[0].clientY-i;n.scrollTop===0&&r>0&&t.preventDefault();n.scrollHeight-n.scrollTop<=n.clientHeight&&r<0&&t.preventDefault()}};return function(i,e){typeof e!="undefined"&&(t=e,n=document.querySelector(e));!0===i?(!1!==n&&(n.addEventListener("touchstart",u,!1),n.addEventListener("touchmove",f,!1)),document.body.addEventListener("touchmove",r,!1)):(!1!==n&&(n.removeEventListener("touchstart",u,!1),n.removeEventListener("touchmove",f,!1)),document.body.removeEventListener("touchmove",r,!1))}}();Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);Element.prototype.closest||(Element.prototype.closest=function(n){var t=this;do{if(t.matches(n))return t;t=t.parentElement||t.parentNode}while(t!==null&&t.nodeType===1);return null}),function(){function n(n,t){t=t||{bubbles:!1,cancelable:!1,detail:null};var i=document.createEvent("CustomEvent");return i.initCustomEvent(n,t.bubbles,t.cancelable,t.detail),i}if(typeof window.CustomEvent=="function")return!1;n.prototype=window.Event.prototype;window.CustomEvent=n}();window.addEventListener("DOMContentLoaded",function(){(function(){function n(n){for(var t=[];n=n.parentNode||n.host||n.defaultView;)t.push(n);return t}function t(n){return function(t){var i="undefined"!=typeof t.getAttribute?t.getAttribute("class")||"":void 0;i&&-1===i.indexOf(n)&&t.setAttribute("class",i.concat(" ",n).trim())}}function i(n){return function(t){var i="undefined"!=typeof t.getAttribute?t.getAttribute("class")||"":void 0;i&&-1!==i.indexOf(n)&&(i=i.replace(n,"").trim(),""===i?t.removeAttribute("class"):t.setAttribute("class",i))}}function r(){function r(r){function f(){u=!1;"blur"===r.type&&Array.prototype.slice.call(n(r.target)).forEach(i("focus-within"));"focus"===r.type&&Array.prototype.slice.call(n(r.target)).forEach(t("focus-within"))}if(!u){window.requestAnimationFrame(f);var u=!0}}return document.addEventListener("focus",r,!0),document.addEventListener("blur",r,!0),t("js-focus-within")(document.body),!0}try{return!document.querySelector(":focus-within")}catch(u){return r()}})()});window.addEventListener("DOMContentLoaded",function(){objectFitImages()});objectFitImages=function(){function l(n,t){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='"+n+"' height='"+t+"'%3E%3C/svg%3E"}function a(n){if(n.srcset&&!k&&window.picturefill){var t=window.picturefill._;n[t.ns]&&n[t.ns].evaled||t.fillImg(n,{reselect:!0});n[t.ns].curSrc||(n[t.ns].supported=!1,t.fillImg(n,{reselect:!0}));n.currentSrc=n[t.ns].curSrc||n.src}}function v(n){for(var t,r=getComputedStyle(n).fontFamily,i={};null!==(t=w.exec(r));)i[t[1]]=t[2];return i}function o(n,t,i){var f=l(t||1,i||0);u.call(n,"src")!==f&&r.call(n,"src",f)}function f(n,t){n.naturalWidth?t(n):setTimeout(f,100,n,t)}function s(t){var e=v(t),i=t[n];if(e["object-fit"]=e["object-fit"]||"fill",!i.img){if("fill"===e["object-fit"])return;if(!i.skipTest&&h&&!e["object-position"])return}if(!i.img){i.img=new Image(t.width,t.height);i.img.srcset=u.call(t,"data-ofi-srcset")||t.srcset;i.img.src=u.call(t,"data-ofi-src")||t.src;r.call(t,"data-ofi-src",t.src);t.srcset&&r.call(t,"data-ofi-srcset",t.srcset);o(t,t.naturalWidth||t.width,t.naturalHeight||t.height);t.srcset&&(t.srcset="");try{y(t)}catch(t){window.console&&console.warn("https://bit.ly/ofi-old-browser")}}a(i.img);t.style.backgroundImage='url("'+(i.img.currentSrc||i.img.src).replace(/"/g,'\\"')+'")';t.style.backgroundPosition=e["object-position"]||"center";t.style.backgroundRepeat="no-repeat";t.style.backgroundOrigin="content-box";/scale-down/.test(e["object-fit"])?f(i.img,function(){t.style.backgroundSize=i.img.naturalWidth>t.width||i.img.naturalHeight>t.height?"contain":"auto"}):t.style.backgroundSize=e["object-fit"].replace("none","auto").replace("fill","100% 100%");f(i.img,function(n){o(t,n.naturalWidth,n.naturalHeight)})}function y(t){var i={get:function(i){return t[n].img[i?i:"src"]},set:function(i,u){return t[n].img[u?u:"src"]=i,r.call(t,"data-ofi-"+u,i),s(t),i}};Object.defineProperty(t,"src",i);Object.defineProperty(t,"currentSrc",{get:function(){return i.get("currentSrc")}});Object.defineProperty(t,"srcset",{get:function(){return i.get("srcset")},set:function(n){return i.set(n,"srcset")}})}function p(){function t(t,i){return t[n]&&t[n].img&&("src"===i||"srcset"===i)?t[n].img:t}e||(HTMLImageElement.prototype.getAttribute=function(n){return u.call(t(this,n),n)},HTMLImageElement.prototype.setAttribute=function(n,i){return r.call(t(this,n),n,String(i))})}function i(t,r){var f=!c&&!t,u;if(r=r||{},t=t||"img",e&&!r.skipTest||!b)return!1;for("img"===t?t=document.getElementsByTagName("img"):"string"==typeof t?t=document.querySelectorAll(t):("length"in t)||(t=[t]),u=0;u<t.length;u++)t[u][n]=t[u][n]||{skipTest:r.skipTest},s(t[u]);f&&(document.body.addEventListener("load",function(n){"IMG"===n.target.tagName&&i(n.target,{skipTest:r.skipTest})},!0),c=!0,t="img");r.watchMQ&&window.addEventListener("resize",i.bind(null,t,{skipTest:r.skipTest}))}var n="bfred-it:object-fit-images",w=/(object-fit|object-position)\s*:\s*([-.\w\s%]+)/g,t="undefined"==typeof Image?{style:{"object-position":1}}:new Image,h="object-fit"in t.style,e="object-position"in t.style,b="background-size"in t.style,k="string"==typeof t.currentSrc,u=t.getAttribute,r=t.setAttribute,c=!1;return i.supportsObjectFit=h,i.supportsObjectPosition=e,p(),i}();document.createElement("picture");!function(n){var t=navigator.userAgent;n.HTMLPictureElement&&/ecko/.test(t)&&t.match(/rv\:(\d+)/)&&RegExp.$1<45&&addEventListener("resize",function(){var r,u=document.createElement("source"),e=function(n){var i,r,t=n.parentNode;"PICTURE"===t.nodeName.toUpperCase()?(i=u.cloneNode(),t.insertBefore(i,t.firstElementChild),setTimeout(function(){t.removeChild(i)})):(!n._pfLastSize||n.offsetWidth>n._pfLastSize)&&(n._pfLastSize=n.offsetWidth,r=n.sizes,n.sizes+=",100vw",setTimeout(function(){n.sizes=r}))},o=function(){for(var t=document.querySelectorAll("picture > img, img[srcset][sizes]"),n=0;n<t.length;n++)e(t[n])},t=function(){clearTimeout(r);r=setTimeout(o,99)},i=n.matchMedia&&matchMedia("(orientation: landscape)"),f=function(){t();i&&i.addListener&&i.addListener(t)};return u.srcset="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",/^[c|i]|d$/.test(document.readyState||"")?f():document.addEventListener("DOMContentLoaded",f),t}())}(window),function(n,t,i){function v(n){return" "===n||"\t"===n||"\n"===n||"\f"===n||"\r"===n}function wt(t,i){var r=new n.Image;return r.onerror=function(){o[t]=!1;f()},r.onload=function(){o[t]=1===r.width;f()},r.src=i,"pending"}function bt(){w=!1;a=n.devicePixelRatio;h={};b={};r.DPR=a||1;u.width=Math.max(n.innerWidth||0,e.clientWidth);u.height=Math.max(n.innerHeight||0,e.clientHeight);u.vw=u.width/100;u.vh=u.height/100;y=[u.height,u.width,a].join("-");u.em=r.getEmValue();u.rem=u.em}function kt(n,t,i,r){var f,o,e,u;return"saveData"===p.algorithm?n>2.7?u=i+1:(o=t-i,f=Math.pow(n-.6,1.5),e=o*f,r&&(e+=.1*f),u=n+e):u=i>1?Math.sqrt(n*t):n,u>i}function dt(n){var i,t=r.getSet(n),u=!1;"pending"!==t&&(u=y,t&&(i=r.setRes(t),r.applySetCandidate(i,n)));n[r.ns].evaled=u}function gt(n,t){return n.res-t.res}function ni(n,t,i){var u;return!i&&t&&(i=n[r.ns].sets,i=i&&i[i.length-1]),u=et(t,i),u&&(t=r.makeUrl(t),n[r.ns].curSrc=t,n[r.ns].curCan=u,u.res||ft(u,u.set.sizes)),u}function et(n,t){var i,f,u;if(n&&t)for(u=r.parseSet(t),n=r.makeUrl(n),i=0;i<u.length;i++)if(n===r.makeUrl(u[i].url)){f=u[i];break}return f}function ti(n,t){for(var i,f,o=n.getElementsByTagName("source"),u=0,e=o.length;e>u;u++)i=o[u],i[r.ns]=!0,f=i.getAttribute("srcset"),f&&t.push({srcset:f,media:i.getAttribute("media"),type:i.getAttribute("type"),sizes:i.getAttribute("sizes")})}function ii(n,t){function h(t){var i,r=t.exec(n.substring(e));if(r)return(i=r[0],e+=i.length,i)}function o(){for(var u,r,e,h,v,o,l,y,n=!1,i={},a=0;a<f.length;a++)h=f[a],v=h[h.length-1],o=h.substring(0,h.length-1),l=parseInt(o,10),y=parseFloat(o),vt.test(o)&&"w"===v?((u||r)&&(n=!0),0===l?n=!0:u=l):vi.test(o)&&"x"===v?((u||r||e)&&(n=!0),0>y?n=!0:r=y):vt.test(o)&&"h"===v?((e||r)&&(n=!0),0===l?n=!0:e=l):n=!0;n||(i.url=s,u&&(i.w=u),r&&(i.d=r),e&&(i.h=e),e||r||u||(i.d=1),1===i.d&&(t.has1x=!0),i.set=t,c.push(i))}function l(){for(h(hi),i="",u="in descriptor";;){if(r=n.charAt(e),"in descriptor"===u)if(v(r))i&&(f.push(i),i="",u="after descriptor");else{if(","===r)return e+=1,i&&f.push(i),void o();if("("===r)i+=r,u="in parens";else{if(""===r)return i&&f.push(i),void o();i+=r}}else if("in parens"===u)if(")"===r)i+=r,u="in descriptor";else{if(""===r)return f.push(i),void o();i+=r}else if("after descriptor"===u&&!v(r)){if(""===r)return void o();u="in descriptor";e-=1}e+=1}}for(var s,f,i,u,r,a=n.length,e=0,c=[];;){if(h(ci),e>=a)return c;s=h(li);f=[];","===s.slice(-1)?(s=s.replace(ai,""),o()):l()}}function ri(n){function s(n){function u(){r&&(f.push(r),r="")}function s(){f[0]&&(h.push(f),f=[])}for(var i,r="",f=[],h=[],e=0,t=0,o=!1;;){if(i=n.charAt(t),""===i)return u(),s(),h;if(o){if("*"===i&&"/"===n[t+1]){o=!1;t+=2;u();continue}t+=1}else{if(v(i)){if(n.charAt(t-1)&&v(n.charAt(t-1))||!r){t+=1;continue}if(0===e){u();t+=1;continue}i=" "}else if("("===i)e+=1;else if(")"===i)e-=1;else{if(","===i){u();s();t+=1;continue}if("/"===i&&"*"===n.charAt(t+1)){o=!0;t+=2;continue}}r+=i;t+=1}}}function h(n){return c.test(n)&&parseFloat(n)>=0?!0:l.test(n)?!0:"0"===n||"-0"===n||"+0"===n?!0:!1}var i,u,e,t,f,o,c=/^(?:[+-]?[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?(?:ch|cm|em|ex|in|mm|pc|pt|px|rem|vh|vmin|vmax|vw)$/i,l=/^calc\((?:[0-9a-z \.\+\-\*\/\(\)]+)\)$/i;for(u=s(n),e=u.length,i=0;e>i;i++)if((t=u[i],f=t[t.length-1],h(f))&&((o=f,t.pop(),0===t.length)||(t=t.join(" "),r.matchesMedia(t))))return o;return"100vw"}t.createElement("picture");var ui,c,ot,y,r={},k=!1,l=function(){},s=t.createElement("img"),d=s.getAttribute,st=s.setAttribute,ht=s.removeAttribute,e=t.documentElement,o={},p={algorithm:""},g="data-pfsrc",ct=g+"set",nt=navigator.userAgent,fi=/rident/.test(nt)||/ecko/.test(nt)&&nt.match(/rv\:(\d+)/)&&RegExp.$1>35,tt="currentSrc",ei=/\s+\+?\d+(e\d+)?w/,oi=/(\([^)]+\))?\s*(.+)/,it=n.picturefillCFG,si="position:absolute;left:0;visibility:hidden;display:block;padding:0;border:none;font-size:1em;width:1em;overflow:hidden;clip:rect(0px, 0px, 0px, 0px)",lt="font-size:100%!important;",w=!0,h={},b={},a=n.devicePixelRatio,u={px:1,"in":96},at=t.createElement("a"),rt=!1,hi=/^[ \t\n\r\u000c]+/,ci=/^[, \t\n\r\u000c]+/,li=/^[^ \t\n\r\u000c]+/,ai=/[,]+$/,vt=/^\d+$/,vi=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,yt=function(n,t,i,r){n.addEventListener?n.addEventListener(t,i,r||!1):n.attachEvent&&n.attachEvent("on"+t,i)},ut=function(n){var t={};return function(i){return i in t||(t[i]=n(i)),t[i]}},pt=function(){var n=/^([\d\.]+)(em|vw|px)$/,t=function(){for(var n=arguments,t=0,i=n[0];++t in n;)i=i.replace(n[t],n[++t]);return i},i=ut(function(n){return"return "+t((n||"").toLowerCase(),/\band\b/g,"&&",/,/g,"||",/min-([a-z-\s]+):/g,"e.$1>=",/max-([a-z-\s]+):/g,"e.$1<=",/calc([^)]+)/g,"($1)",/(\d+[\.]*[\d]*)([a-z]+)/g,"($1 * e.$2)",/^(?!(e.[a-z]|[0-9\.&=|><\+\-\*\(\)\/])).*/gi,"")+";"});return function(t,r){var f;if(!(t in h))if(h[t]=!1,r&&(f=t.match(n)))h[t]=f[1]*u[f[2]];else try{h[t]=new Function("e",i(t))(u)}catch(e){}return h[t]}}(),ft=function(n,t){return n.w?(n.cWidth=r.calcListLength(t||"100vw"),n.res=n.w/n.cWidth):n.res=n.d,n},f=function(n){if(k){var f,u,e,i=n||{};if(i.elements&&1===i.elements.nodeType&&("IMG"===i.elements.nodeName.toUpperCase()?i.elements=[i.elements]:(i.context=i.elements,i.elements=null)),f=i.elements||r.qsa(i.context||t,i.reevaluate||i.reselect?r.sel:r.selShort),e=f.length){for(r.setupRun(i),rt=!0,u=0;e>u;u++)r.fillImg(f[u],i);r.teardownRun(i)}}};for(ui=n.console&&console.warn?function(n){console.warn(n)}:l,(tt in s)||(tt="src"),o["image/jpeg"]=!0,o["image/gif"]=!0,o["image/png"]=!0,o["image/svg+xml"]=t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1"),r.ns=("pf"+(new Date).getTime()).substr(0,9),r.supSrcset=("srcset"in s),r.supSizes=("sizes"in s),r.supPicture=!!n.HTMLPictureElement,r.supSrcset&&r.supPicture&&!r.supSizes&&!function(n){s.srcset="data:,a";n.src="data:,a";r.supSrcset=s.complete===n.complete;r.supPicture=r.supSrcset&&r.supPicture}(t.createElement("img")),r.supSrcset&&!r.supSizes?!function(){var i="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",n=t.createElement("img"),u=function(){var t=n.width;2===t&&(r.supSizes=!0);ot=r.supSrcset&&!r.supSizes;k=!0;setTimeout(f)};n.onload=u;n.onerror=u;n.setAttribute("sizes","9px");n.srcset=i+" 1w,data:image/gif;base64,R0lGODlhAgABAPAAAP///wAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw== 9w";n.src=i}():k=!0,r.selShort="picture>img,img[srcset]",r.sel=r.selShort,r.cfg=p,r.DPR=a||1,r.u=u,r.types=o,r.setSize=l,r.makeUrl=ut(function(n){return at.href=n,at.href}),r.qsa=function(n,t){return"querySelector"in n?n.querySelectorAll(t):[]},r.matchesMedia=function(){return r.matchesMedia=n.matchMedia&&(matchMedia("(min-width: 0.1em)")||{}).matches?function(n){return!n||matchMedia(n).matches}:r.mMQ,r.matchesMedia.apply(this,arguments)},r.mMQ=function(n){return n?pt(n):!0},r.calcLength=function(n){var t=pt(n,!0)||!1;return 0>t&&(t=!1),t},r.supportsType=function(n){return n?o[n]:!0},r.parseSize=ut(function(n){var t=(n||"").match(oi);return{media:t&&t[1],length:t&&t[2]}}),r.parseSet=function(n){return n.cands||(n.cands=ii(n.srcset,n)),n.cands},r.getEmValue=function(){var n;if(!c&&(n=t.body)){var i=t.createElement("div"),r=e.style.cssText,u=n.style.cssText;i.style.cssText=si;e.style.cssText=lt;n.style.cssText=lt;n.appendChild(i);c=i.offsetWidth;n.removeChild(i);c=parseFloat(c,10);e.style.cssText=r;n.style.cssText=u}return c||16},r.calcListLength=function(n){if(!(n in b)||p.uT){var t=r.calcLength(ri(n));b[n]=t?t:u.width}return b[n]},r.setRes=function(n){var t,i,u;if(n)for(t=r.parseSet(n),i=0,u=t.length;u>i;i++)ft(t[i],n.sizes);return t},r.setRes.res=ft,r.applySetCandidate=function(n,t){if(n.length){var f,e,o,l,i,s,u,a,v,h=t[r.ns],c=r.DPR;if(s=h.curSrc||t[tt],u=h.curCan||ni(t,s,n[0].set),u&&u.set===n[0].set&&(v=fi&&!t.complete&&u.res-.1>c,v||(u.cached=!0,u.res>=c&&(i=u))),!i)for(n.sort(gt),l=n.length,i=n[l-1],e=0;l>e;e++)if(f=n[e],f.res>=c){o=e-1;i=n[o]&&(v||s!==r.makeUrl(f.url))&&kt(n[o].res,f.res,c,n[o].cached)?n[o]:f;break}i&&(a=r.makeUrl(i.url),h.curSrc=a,h.curCan=i,a!==s&&r.setSrc(t,i),r.setSize(t))}},r.setSrc=function(n,t){var i;n.src=t.url;"image/svg+xml"===t.set.type&&(i=n.style.width,n.style.width=n.offsetWidth+1+"px",n.offsetWidth+1&&(n.style.width=i))},r.getSet=function(n){for(var t,u,f=!1,e=n[r.ns].sets,i=0;i<e.length&&!f;i++)if(t=e[i],t.srcset&&r.matchesMedia(t.media)&&(u=r.supportsType(t.type))){"pending"===u&&(t=u);f=t;break}return f},r.parseSets=function(n,t,u){var o,e,s,h,c=t&&"PICTURE"===t.nodeName.toUpperCase(),f=n[r.ns];(f.src===i||u.src)&&(f.src=d.call(n,"src"),f.src?st.call(n,g,f.src):ht.call(n,g));(f.srcset===i||u.srcset||!r.supSrcset||n.srcset)&&(o=d.call(n,"srcset"),f.srcset=o,h=!0);f.sets=[];c&&(f.pic=!0,ti(t,f.sets));f.srcset?(e={srcset:f.srcset,sizes:d.call(n,"sizes")},f.sets.push(e),s=(ot||f.src)&&ei.test(f.srcset||""),s||!f.src||et(f.src,e)||e.has1x||(e.srcset+=", "+f.src,e.cands.push({url:f.src,d:1,set:e}))):f.src&&f.sets.push({srcset:f.src,sizes:null});f.curCan=null;f.curSrc=i;f.supported=!(c||e&&!r.supSrcset||s&&!r.supSizes);h&&r.supSrcset&&!f.supported&&(o?(st.call(n,ct,o),n.srcset=""):ht.call(n,ct));f.supported&&!f.srcset&&(!f.src&&n.src||n.src!==r.makeUrl(f.src))&&(null===f.src?n.removeAttribute("src"):n.src=f.src);f.parsed=!0},r.fillImg=function(n,t){var i,u=t.reselect||t.reevaluate;n[r.ns]||(n[r.ns]={});i=n[r.ns];(u||i.evaled!==y)&&((!i.parsed||t.reevaluate)&&r.parseSets(n,n.parentNode,t),i.supported?i.evaled=y:dt(n))},r.setupRun=function(){(!rt||w||a!==n.devicePixelRatio)&&bt()},r.supPicture?(f=l,r.fillImg=l):!function(){var i,h=n.attachEvent?/d$|^c/:/d$|^c|^i/,f=function f(){var n=t.readyState||"";o=setTimeout(f,"loading"===n?200:999);t.body&&(r.fillImgs(),i=i||h.test(n),i&&clearTimeout(o))},o=setTimeout(f,t.body?9:99),c=function(n,t){var i,r,u=function u(){var f=new Date-r;t>f?i=setTimeout(u,t-f):(i=null,n())};return function(){r=new Date;i||(i=setTimeout(u,t))}},s=e.clientHeight,l=function(){w=Math.max(n.innerWidth||0,e.clientWidth)!==u.width||e.clientHeight!==s;s=e.clientHeight;w&&r.fillImgs()};yt(n,"resize",c(l,99));yt(t,"readystatechange",f)}(),r.picturefill=f,r.fillImgs=f,r.teardownRun=l,f._=r,n.picturefillCFG={pf:r,push:function(n){var t=n.shift();"function"==typeof r[t]?r[t].apply(r,n):(p[t]=n[0],rt&&r.fillImgs({reselect:!0}))}};it&&it.length;)n.picturefillCFG.push(it.shift());n.picturefill=f;"object"==(typeof module=="undefined"?"undefined":_typeof(module))&&"object"==_typeof(module.exports)?module.exports=f:"function"==typeof define&&define.amd&&define("picturefill",function(){return f});r.supPicture||(o["image/webp"]=wt("image/webp","data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA=="))}(window,document),function(n,t){try{n.querySelector(":scope body")}catch(i){["querySelector","querySelectorAll"].forEach(function(i){var r=t[i];t[i]=function(t){var u,f;return/(^|,)\s*:scope/.test(t)?(u=this.id,this.id="ID_"+Date.now(),t=t.replace(/((^|,)\s*):scope/g,"$1#"+this.id),f=n[i](t),this.id=u,f):r.call(this,t)}})}}(window.document,Element.prototype);(typeof exports=="undefined"?"undefined":_typeof(exports))==="object"&&typeof module!="undefined"?module.exports={polyfill:polyfill}:polyfill();!function(n,t){function v(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function u(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])}function f(n){return parseFloat(n)||0}function h(n){for(var t=0;n;)t+=n.offsetTop,n=n.offsetParent;return t}function c(){function s(){n.pageXOffset!=r.left?(r.top=n.pageYOffset,r.left=n.pageXOffset,o.refreshAll()):n.pageYOffset!=r.top&&(r.top=n.pageYOffset,r.left=n.pageXOffset,i.forEach(function(n){return n._recalcPosition()}))}function e(){h=setInterval(function(){i.forEach(function(n){return n._fastCheck()})},500)}function c(){clearInterval(h)}if(!a){a=!0;s();n.addEventListener("scroll",s);n.addEventListener("resize",o.refreshAll);n.addEventListener("orientationchange",o.refreshAll);var h=void 0,u=void 0,f=void 0;"hidden"in t?(u="hidden",f="visibilitychange"):"webkitHidden"in t&&(u="webkitHidden",f="webkitvisibilitychange");f?(t[u]||e(),t.addEventListener(f,function(){t[u]?c():e()})):e()}}var y=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),e=!1,l="undefined"!=typeof n;l&&n.getComputedStyle?!function(){var n=t.createElement("div");["","-webkit-","-moz-","-ms-"].some(function(t){try{n.style.position=t+"sticky"}catch(n){}return""!=n.style.position})&&(e=!0)}():e=!0;var a=!1,p="undefined"!=typeof ShadowRoot,r={top:null,left:null},i=[],s=function(){function o(n){if(v(this,o),!(n instanceof HTMLElement))throw new Error("First argument must be HTMLElement");if(i.some(function(t){return t._node===n}))throw new Error("Stickyfill is already applied to this node");this._node=n;this._stickyMode=null;this._active=!1;i.push(this);this.refresh()}return y(o,[{key:"refresh",value:function(){var k,w,b,l;if(!e&&!this._removed){this._active&&this._deactivate();var i=this._node,r=getComputedStyle(i),o={position:r.position,top:r.top,display:r.display,marginTop:r.marginTop,marginBottom:r.marginBottom,marginLeft:r.marginLeft,marginRight:r.marginRight,cssFloat:r.cssFloat};if(!isNaN(parseFloat(o.top))&&"table-cell"!=o.display&&"none"!=o.display){this._active=!0;k=i.style.position;"sticky"!=r.position&&"-webkit-sticky"!=r.position||(i.style.position="static");var v=i.parentNode,c=p&&v instanceof ShadowRoot?v.host:v,s=i.getBoundingClientRect(),y=c.getBoundingClientRect(),a=getComputedStyle(c);this._parent={node:c,styles:{position:c.style.position},offsetHeight:c.offsetHeight};this._offsetToWindow={left:s.left,right:t.documentElement.clientWidth-s.right};this._offsetToParent={top:s.top-y.top-f(a.borderTopWidth),left:s.left-y.left-f(a.borderLeftWidth),right:-s.right+y.right-f(a.borderRightWidth)};this._styles={position:k,top:i.style.top,bottom:i.style.bottom,left:i.style.left,right:i.style.right,width:i.style.width,marginTop:i.style.marginTop,marginLeft:i.style.marginLeft,marginRight:i.style.marginRight};w=f(o.top);this._limits={start:s.top+n.pageYOffset-w,end:y.top+n.pageYOffset+c.offsetHeight-f(a.borderBottomWidth)-i.offsetHeight-w-f(o.marginBottom)};b=a.position;"absolute"!=b&&"relative"!=b&&(c.style.position="relative");this._recalcPosition();l=this._clone={};l.node=t.createElement("div");u(l.node.style,{width:s.right-s.left+"px",height:s.bottom-s.top+"px",marginTop:o.marginTop,marginBottom:o.marginBottom,marginLeft:o.marginLeft,marginRight:o.marginRight,cssFloat:o.cssFloat,padding:0,border:0,borderSpacing:0,fontSize:"1em",position:"static"});v.insertBefore(l.node,i);l.docOffsetTop=h(l.node)}}}},{key:"_recalcPosition",value:function(){if(this._active&&!this._removed){var n=r.top<=this._limits.start?"start":r.top>=this._limits.end?"end":"middle";if(this._stickyMode!=n){switch(n){case"start":u(this._node.style,{position:"absolute",left:this._offsetToParent.left+"px",right:this._offsetToParent.right+"px",top:this._offsetToParent.top+"px",bottom:"auto",width:"auto",marginLeft:0,marginRight:0,marginTop:0});break;case"middle":u(this._node.style,{position:"fixed",left:this._offsetToWindow.left+"px",right:this._offsetToWindow.right+"px",top:this._styles.top,bottom:"auto",width:"auto",marginLeft:0,marginRight:0,marginTop:0});break;case"end":u(this._node.style,{position:"absolute",left:this._offsetToParent.left+"px",right:this._offsetToParent.right+"px",top:"auto",bottom:0,width:"auto",marginLeft:0,marginRight:0})}this._stickyMode=n}}}},{key:"_fastCheck",value:function(){this._active&&!this._removed&&(Math.abs(h(this._clone.node)-this._clone.docOffsetTop)>1||Math.abs(this._parent.node.offsetHeight-this._parent.offsetHeight)>1)&&this.refresh()}},{key:"_deactivate",value:function(){var n=this;this._active&&!this._removed&&(this._clone.node.parentNode.removeChild(this._clone.node),delete this._clone,u(this._node.style,this._styles),delete this._styles,i.some(function(t){return t!==n&&t._parent&&t._parent.node===n._parent.node})||u(this._parent.node.style,this._parent.styles),delete this._parent,this._stickyMode=null,this._active=!1,delete this._offsetToWindow,delete this._offsetToParent,delete this._limits)}},{key:"remove",value:function(){var n=this;this._deactivate();i.some(function(t,r){if(t._node===n._node)return i.splice(r,1),!0});this._removed=!0}}]),o}(),o={stickies:i,Sticky:s,forceSticky:function(){e=!1;c();this.refreshAll()},addOne:function(n){if(!(n instanceof HTMLElement)){if(!n.length||!n[0])return;n=n[0]}for(var t=0;t<i.length;t++)if(i[t]._node===n)return i[t];return new s(n)},add:function(n){if(n instanceof HTMLElement&&(n=[n]),n.length){for(var t=[],u=function(r){var u=n[r];return u instanceof HTMLElement?i.some(function(n){if(n._node===u)return t.push(n),!0})?"continue":void t.push(new s(u)):(t.push(void 0),"continue")},r=0;r<n.length;r++)u(r);return t}},refreshAll:function(){i.forEach(function(n){return n.refresh()})},removeOne:function(n){if(!(n instanceof HTMLElement)){if(!n.length||!n[0])return;n=n[0]}i.some(function(t){if(t._node===n)return t.remove(),!0})},remove:function(n){if(n instanceof HTMLElement&&(n=[n]),n.length)for(var r=function(t){var r=n[t];i.some(function(n){if(n._node===r)return n.remove(),!0})},t=0;t<n.length;t++)r(t)},removeAll:function(){for(;i.length;)i[0].remove()}};e||c();"undefined"!=typeof module&&module.exports?module.exports=o:l&&(n.Stickyfill=o)}(window,document);!function(n,t){"object"==(typeof exports=="undefined"?"undefined":_typeof(exports))&&"object"==(typeof module=="undefined"?"undefined":_typeof(module))?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==(typeof exports=="undefined"?"undefined":_typeof(exports))?exports.Quill=t():n.Quill=t()}("undefined"!=typeof self?self:undefined,function(){return function(n){function t(r){if(i[r])return i[r].exports;var u=i[r]={i:r,l:!1,exports:{}};return n[r].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var i={};return t.m=n,t.c=i,t.d=function(n,i,r){t.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:r})},t.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(i,"a",i),i},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=45)}([function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0});var u=i(17),f=i(18),e=i(19),o=i(48),s=i(49),h=i(50),c=i(51),l=i(52),a=i(11),v=i(29),y=i(30),p=i(28),r=i(1),w={Scope:r.Scope,create:r.create,find:r.find,query:r.query,register:r.register,Container:u.default,Format:f.default,Leaf:e.default,Embed:c.default,Scroll:o.default,Block:h.default,Inline:s.default,Text:l.default,Attributor:{Attribute:a.default,Class:v.default,Style:y.default,Store:p.default}};t.default=w},function(n,t){function l(n,t){var u=o(n),i;if(null==u)throw new r("Unable to create "+n+" blot");return i=u,new i(n instanceof Node||n.nodeType===Node.TEXT_NODE?n:i.create(t),t)}function e(n,i){return void 0===i&&(i=!1),null==n?null:null!=n[t.DATA_KEY]?n[t.DATA_KEY].blot:i?e(n.parentNode,i):null}function o(n,t){var r,e,o;if(void 0===t&&(t=i.ANY),"string"==typeof n)r=u[n]||h[n];else if(n instanceof Text||n.nodeType===Node.TEXT_NODE)r=u.text;else if("number"==typeof n)n&i.LEVEL&i.BLOCK?r=u.block:n&i.LEVEL&i.INLINE&&(r=u.inline);else if(n instanceof HTMLElement){e=(n.getAttribute("class")||"").split(/\s+/);for(o in e)if(r=c[e[o]])break;r=r||f[n.tagName]}return null==r?null:t&i.LEVEL&r.scope&&t&i.TYPE&r.scope?r:null}function s(){for(var n,e,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];if(t.length>1)return t.map(function(n){return s(n)});if(n=t[0],"string"!=typeof n.blotName&&"string"!=typeof n.attrName)throw new r("Invalid definition");if("abstract"===n.blotName)throw new r("Cannot register abstract class");return(u[n.blotName||n.attrName]=n,"string"==typeof n.keyName)?h[n.keyName]=n:(null!=n.className&&(c[n.className]=n),null!=n.tagName)&&(n.tagName=Array.isArray(n.tagName)?n.tagName.map(function(n){return n.toUpperCase()}):n.tagName.toUpperCase(),e=Array.isArray(n.tagName)?n.tagName:[n.tagName],e.forEach(function(t){null!=f[t]&&null!=n.className||(f[t]=n)})),n}var a=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),r,i;Object.defineProperty(t,"__esModule",{value:!0});r=function(n){function t(t){var i=this;return t="[Parchment] "+t,i=n.call(this,t)||this,i.message=t,i.name=i.constructor.name,i}return a(t,n),t}(Error);t.ParchmentError=r;var h={},c={},f={},u={};t.DATA_KEY="__blot";!function(n){n[n.TYPE=3]="TYPE";n[n.LEVEL=12]="LEVEL";n[n.ATTRIBUTE=13]="ATTRIBUTE";n[n.BLOT=14]="BLOT";n[n.INLINE=7]="INLINE";n[n.BLOCK=11]="BLOCK";n[n.BLOCK_BLOT=10]="BLOCK_BLOT";n[n.INLINE_BLOT=6]="INLINE_BLOT";n[n.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE";n[n.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE";n[n.ANY=15]="ANY"}(i=t.Scope||(t.Scope={}));t.create=l;t.find=e;t.query=o;t.register=s},function(n){var t=Object.prototype.hasOwnProperty,i=Object.prototype.toString,r=function(n){return"function"==typeof Array.isArray?Array.isArray(n):"[object Array]"===i.call(n)},u=function(n){var u,f,r;if(!n||"[object Object]"!==i.call(n)||(u=t.call(n,"constructor"),f=n.constructor&&n.constructor.prototype&&t.call(n.constructor.prototype,"isPrototypeOf"),n.constructor&&!u&&!f))return!1;for(r in n);return void 0===r||t.call(n,r)};n.exports=function n(){var s,e,f,i,h,c,t=arguments[0],o=1,a=arguments.length,l=!1;for("boolean"==typeof t&&(l=t,t=arguments[1]||{},o=2),(null==t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t)&&(t={});o<a;++o)if(null!=(s=arguments[o]))for(e in s)f=t[e],i=s[e],t!==i&&(l&&i&&(u(i)||(h=r(i)))?(h?(h=!1,c=f&&r(f)?f:[]):c=f&&u(f)?f:{},t[e]=n(l,c,i)):void 0!==i&&(t[e]=i));return t}},function(n,t,i){function e(n){return n&&n.__esModule?n:{"default":n}}function s(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function h(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function c(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}function o(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==n?t:("function"==typeof n.formats&&(t=a.default(t,n.formats())),null==n.parent||"scroll"==n.parent.blotName||n.parent.statics.scope!==n.statics.scope?t:o(n.parent,t))}var f;Object.defineProperty(t,"__esModule",{value:!0});t.default=t.BlockEmbed=t.bubbleFormats=void 0;var l=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),r=function n(t,i,r){var u,f,e;return(null===t&&(t=Function.prototype),u=Object.getOwnPropertyDescriptor(t,i),void 0===u)?(f=Object.getPrototypeOf(t),null===f?void 0:n(f,i,r)):"value"in u?u.value:(e=u.get,void 0!==e?e.call(r):void 0)},p=i(2),a=e(p),w=i(4),v=e(w),b=i(0),u=e(b),k=i(14),d=e(k),g=i(5),nt=e(g),tt=i(8),it=e(tt),y=function(n){function t(){return s(this,t),h(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return c(t,n),l(t,[{key:"attach",value:function(){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"attach",this).call(this);this.attributes=new u.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return(new v.default).insert(this.value(),a.default(this.formats(),this.attributes.values()))}},{key:"format",value:function(n,t){var i=u.default.query(n,u.default.Scope.BLOCK_ATTRIBUTE);null!=i&&this.attributes.attribute(i,t)}},{key:"formatAt",value:function(n,t,i,r){this.format(i,r)}},{key:"insertAt",value:function(n,i,e){if("string"==typeof i&&i.endsWith("\n")){var o=u.default.create(f.blotName);this.parent.insertBefore(o,0===n?this:this.next);o.insertAt(0,i.slice(0,-1))}else r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,n,i,e)}}]),t}(u.default.Embed);y.scope=u.default.Scope.BLOCK_BLOT;f=function(n){function t(n){s(this,t);var i=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n));return i.cache={},i}return c(t,n),l(t,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(u.default.Leaf).reduce(function(n,t){return 0===t.length()?n:n.insert(t.value(),o(t))},new v.default).insert("\n",o(this))),this.cache.delta}},{key:"deleteAt",value:function(n,i){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,n,i);this.cache={}}},{key:"formatAt",value:function(n,i,f,e){i<=0||(u.default.query(f,u.default.Scope.BLOCK)?n+i===this.length()&&this.format(f,e):r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,n,Math.min(i,this.length()-n-1),f,e),this.cache={})}},{key:"insertAt",value:function(n,i,u){var o,f,e;if(null!=u)return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,n,i,u);0!==i.length&&(o=i.split("\n"),f=o.shift(),f.length>0&&(n<this.length()-1||null==this.children.tail?r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,Math.min(n,this.length()-1),f):this.children.tail.insertAt(this.children.tail.length(),f),this.cache={}),e=this,o.reduce(function(n,t){return e=e.split(n,!0),e.insertAt(0,t),t.length},n+f.length))}},{key:"insertBefore",value:function(n,i){var u=this.children.head;r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,n,i);u instanceof d.default&&u.remove();this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"length",this).call(this)+1),this.cache.length}},{key:"moveChildren",value:function(n,i){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"moveChildren",this).call(this,n,i);this.cache={}}},{key:"optimize",value:function(n){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,n);this.cache={}}},{key:"path",value:function(n){return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,n,!0)}},{key:"removeChild",value:function(n){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"removeChild",this).call(this,n);this.cache={}}},{key:"split",value:function(n){var u=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i,f;return u&&(0===n||n>=this.length()-1)?(i=this.clone(),0===n?(this.parent.insertBefore(i,this),this):(this.parent.insertBefore(i,this.next),i)):(f=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"split",this).call(this,n,u),this.cache={},f)}}]),t}(u.default.Block);f.blotName="block";f.tagName="P";f.defaultChild="break";f.allowedChildren=[nt.default,u.default.Embed,it.default];t.bubbleFormats=o;t.BlockEmbed=y;t.default=f},function(n,t,i){var f=i(54),e=i(12),o=i(2),u=i(20),s=String.fromCharCode(0),r=function(n){this.ops=Array.isArray(n)?n:null!=n&&Array.isArray(n.ops)?n.ops:[]};r.prototype.insert=function(n,t){var i={};return 0===n.length?this:(i.insert=n,null!=t&&"object"==(typeof t=="undefined"?"undefined":_typeof(t))&&Object.keys(t).length>0&&(i.attributes=t),this.push(i))};r.prototype.delete=function(n){return n<=0?this:this.push({"delete":n})};r.prototype.retain=function(n,t){if(n<=0)return this;var i={retain:n};return null!=t&&"object"==(typeof t=="undefined"?"undefined":_typeof(t))&&Object.keys(t).length>0&&(i.attributes=t),this.push(i)};r.prototype.push=function(n){var i=this.ops.length,t=this.ops[i-1];if(n=o(!0,{},n),"object"==(typeof t=="undefined"?"undefined":_typeof(t))){if("number"==typeof n.delete&&"number"==typeof t.delete)return this.ops[i-1]={"delete":t.delete+n.delete},this;if("number"==typeof t.delete&&null!=n.insert&&(i-=1,"object"!=_typeof(t=this.ops[i-1])))return this.ops.unshift(n),this;if(e(n.attributes,t.attributes)){if("string"==typeof n.insert&&"string"==typeof t.insert)return this.ops[i-1]={insert:t.insert+n.insert},"object"==_typeof(n.attributes)&&(this.ops[i-1].attributes=n.attributes),this;if("number"==typeof n.retain&&"number"==typeof t.retain)return this.ops[i-1]={retain:t.retain+n.retain},"object"==_typeof(n.attributes)&&(this.ops[i-1].attributes=n.attributes),this}}return i===this.ops.length?this.ops.push(n):this.ops.splice(i,0,n),this};r.prototype.chop=function(){var n=this.ops[this.ops.length-1];return n&&n.retain&&!n.attributes&&this.ops.pop(),this};r.prototype.filter=function(n){return this.ops.filter(n)};r.prototype.forEach=function(n){this.ops.forEach(n)};r.prototype.map=function(n){return this.ops.map(n)};r.prototype.partition=function(n){var t=[],i=[];return this.forEach(function(r){(n(r)?t:i).push(r)}),[t,i]};r.prototype.reduce=function(n,t){return this.ops.reduce(n,t)};r.prototype.changeLength=function(){return this.reduce(function(n,t){return t.insert?n+u.length(t):t.delete?n-t.delete:n},0)};r.prototype.length=function(){return this.reduce(function(n,t){return n+u.length(t)},0)};r.prototype.slice=function(n,t){var f;n=n||0;"number"!=typeof t&&(t=1/0);for(var o=[],e=u.iterator(this.ops),i=0;i<t&&e.hasNext();)i<n?f=e.next(n-i):(f=e.next(t-i),o.push(f)),i+=u.length(f);return new r(o)};r.prototype.compose=function(n){for(var o,c,t=u.iterator(this.ops),i=u.iterator(n.ops),f=new r;t.hasNext()||i.hasNext();)if("insert"===i.peekType())f.push(i.next());else if("delete"===t.peekType())f.push(t.next());else{var h=Math.min(t.peekLength(),i.peekLength()),e=t.next(h),s=i.next(h);"number"==typeof s.retain?(o={},"number"==typeof e.retain?o.retain=h:o.insert=e.insert,c=u.attributes.compose(e.attributes,s.attributes,"number"==typeof e.retain),c&&(o.attributes=c),f.push(o)):"number"==typeof s.delete&&"number"==typeof e.retain&&f.push(s)}return f.chop()};r.prototype.concat=function(n){var t=new r(this.ops.slice());return n.ops.length>0&&(t.push(n.ops[0]),t.ops=t.ops.concat(n.ops.slice(1))),t};r.prototype.diff=function(n,t){if(this.ops===n.ops)return new r;var c=[this,n].map(function(t){return t.map(function(i){if(null!=i.insert)return"string"==typeof i.insert?i.insert:s;var r=t===n?"on":"with";throw new Error("diff() called "+r+" non-document");}).join("")}),i=new r,l=f(c[0],c[1],t),o=u.iterator(this.ops),h=u.iterator(n.ops);return l.forEach(function(n){for(var t,c,s,r=n[1].length;r>0;){t=0;switch(n[0]){case f.INSERT:t=Math.min(h.peekLength(),r);i.push(h.next(t));break;case f.DELETE:t=Math.min(r,o.peekLength());o.next(t);i.delete(t);break;case f.EQUAL:t=Math.min(o.peekLength(),h.peekLength(),r);c=o.next(t);s=h.next(t);e(c.insert,s.insert)?i.retain(t,u.attributes.diff(c.attributes,s.attributes)):i.push(s).delete(t)}r-=t}}),i.chop()};r.prototype.eachLine=function(n,t){t=t||"\n";for(var i=u.iterator(this.ops),f=new r,e=0;i.hasNext();){if("insert"!==i.peekType())return;var o=i.peek(),h=u.length(o)-i.peekLength(),s="string"==typeof o.insert?o.insert.indexOf(t,h)-h:-1;if(s<0)f.push(i.next());else if(s>0)f.push(i.next(s));else{if(!1===n(f,i.next(1).attributes||{},e))return;e+=1;f=new r}}f.length()>0&&n(f,{},e)};r.prototype.transform=function(n,t){if(t=!!t,"number"==typeof n)return this.transformPosition(n,t);for(var f=u.iterator(this.ops),i=u.iterator(n.ops),e=new r;f.hasNext()||i.hasNext();)if("insert"===f.peekType()&&(t||"insert"!==i.peekType()))e.retain(u.length(f.next()));else if("insert"===i.peekType())e.push(i.next());else{var o=Math.min(f.peekLength(),i.peekLength()),h=f.next(o),s=i.next(o);if(h.delete)continue;s.delete?e.push(s):e.retain(o,u.attributes.transform(h.attributes,s.attributes,t))}return e.chop()};r.prototype.transformPosition=function(n,t){var i,r,f,e;for(t=!!t,i=u.iterator(this.ops),r=0;i.hasNext()&&r<=n;)f=i.peekLength(),e=i.peekType(),i.next(),"delete"!==e?("insert"===e&&(r<n||!t)&&(n+=f),r+=f):n-=Math.min(f,n-r);return n};n.exports=r},function(n,t,i){function f(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function s(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function h(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),e=function n(t,i,r){var u,f,e;return(null===t&&(t=Function.prototype),u=Object.getOwnPropertyDescriptor(t,i),void 0===u)?(f=Object.getPrototypeOf(t),null===f?void 0:n(f,i,r)):"value"in u?u.value:(e=u.get,void 0!==e?e.call(r):void 0)},l=i(8),a=f(l),v=i(0),r=f(v),u=function(n){function t(){return o(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return h(t,n),c(t,[{key:"formatAt",value:function(n,i,u,f){if(t.compare(this.statics.blotName,u)<0&&r.default.query(u,r.default.Scope.BLOT)){var o=this.isolate(n,i);f&&o.wrap(u,f)}else e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,n,i,u,f)}},{key:"optimize",value:function(n){if(e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,n),this.parent instanceof t&&t.compare(this.statics.blotName,this.parent.statics.blotName)>0){var i=this.parent.isolate(this.offset(),this.length());this.moveChildren(i);i.wrap(this)}}}],[{key:"compare",value:function(n,i){var r=t.order.indexOf(n),u=t.order.indexOf(i);return r>=0||u>=0?r-u:n===i?0:n<i?-1:1}}]),t}(r.default.Inline);u.allowedChildren=[u,r.default.Embed,a.default];u.order=["cursor","inline","underline","strike","italic","bold","script","link","code"];t.default=u},function(n,t,i){function o(n){return n&&n.__esModule?n:{"default":n}}function y(n,t,i){return t in n?Object.defineProperty(n,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[t]=i,n}function g(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function p(n,t){var i,r,u;if(t=v.default(!0,{container:n,modules:{clipboard:!0,keyboard:!0,history:!0}},t),t.theme&&t.theme!==e.DEFAULTS.theme){if(t.theme=e.import("themes/"+t.theme),null==t.theme)throw new Error("Invalid theme "+t.theme+". Did you register it?");}else t.theme=d.default;return i=v.default(!0,{},t.theme.DEFAULTS),[i,t].forEach(function(n){n.modules=n.modules||{};Object.keys(n.modules).forEach(function(t){!0===n.modules[t]&&(n.modules[t]={})})}),r=Object.keys(i.modules).concat(Object.keys(t.modules)),u=r.reduce(function(n,t){var i=e.import("modules/"+t);return null==i?l.error("Cannot load "+t+" module. Are you sure you registered it?"):n[t]=i.DEFAULTS||{},n},{}),null!=t.modules&&t.modules.toolbar&&t.modules.toolbar.constructor!==Object&&(t.modules.toolbar={container:t.modules.toolbar}),t=v.default(!0,{},e.DEFAULTS,{modules:u},i,t),["bounds","container","scrollingContainer"].forEach(function(n){"string"==typeof t[n]&&(t[n]=document.querySelector(t[n]))}),t.modules=Object.keys(t.modules).reduce(function(n,i){return t.modules[i]&&(n[i]=t.modules[i]),n},{}),t}function u(n,t,i,u){var s,o,c;if(this.options.strict&&!this.isEnabled()&&t===r.default.sources.USER)return new h.default;var f=null==i?null:this.getSelection(),l=this.editor.delta,e=n();return(null!=f&&(!0===i&&(i=f.index),null==u?f=w(f,e,t):0!==u&&(f=w(f,i,u,t)),this.setSelection(f,r.default.sources.SILENT)),e.length()>0)&&(o=[r.default.events.TEXT_CHANGE,e,l,t],((s=this.emitter).emit.apply(s,[r.default.events.EDITOR_CHANGE].concat(o)),t!==r.default.sources.SILENT)&&(c=this.emitter).emit.apply(c,o)),e}function s(n,t,i,u,f){var e={};return"number"==typeof n.index&&"number"==typeof n.length?"number"!=typeof t?(f=u,u=i,i=t,t=n.length,n=n.index):(t=n.length,n=n.index):"number"!=typeof t&&(f=u,u=i,i=t,t=0),"object"===(void 0===i?"undefined":nt(i))?(e=i,f=u):"string"==typeof i&&(null!=u?e[i]=u:f=i),f=f||r.default.sources.API,[n,t,e,f]}function w(n,t,i,u){var e,o,l,s,v,c;return null==n?null:(e=void 0,o=void 0,t instanceof h.default?(l=[n.index,n.index+n.length].map(function(n){return t.transformPosition(n,u!==r.default.sources.USER)}),s=f(l,2),e=s[0],o=s[1]):(v=[n.index,n.index+n.length].map(function(n){return n<t||n===t&&u===r.default.sources.USER?n:i>=0?n+i:Math.max(t,n+i)}),c=f(v,2),e=c[0],o=c[1]),new a.Range(e,o-e))}Object.defineProperty(t,"__esModule",{value:!0});t.default=t.overload=t.expandConfig=void 0;var nt="function"==typeof Symbol&&"symbol"==_typeof(Symbol.iterator)?function(n){return typeof n=="undefined"?"undefined":_typeof(n)}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n=="undefined"?"undefined":_typeof(n)},f=function(){function n(n,t){var r=[],u=!0,f=!1,e=void 0,o,i;try{for(i=n[Symbol.iterator]();!(u=(o=i.next()).done)&&(r.push(o.value),!t||r.length!==t);u=!0);}catch(n){f=!0;e=n}finally{try{!u&&i.return&&i.return()}finally{if(f)throw e;}}return r}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return n(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),b=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}();i(53);var tt=i(4),h=o(tt),it=i(57),rt=o(it),ut=i(9),r=o(ut),ft=i(7),et=o(ft),ot=i(0),c=o(ot),a=i(22),st=o(a),ht=i(2),v=o(ht),ct=i(10),k=o(ct),lt=i(32),d=o(lt),l=k.default("quill"),e=function(){function n(t){var i=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},f,e;if(g(this,n),this.options=p(t,o),this.container=this.options.container,null==this.container)return l.error("Invalid Quill container",t);this.options.debug&&n.debug(this.options.debug);f=this.container.innerHTML.trim();this.container.classList.add("ql-container");this.container.innerHTML="";this.container.__quill=this;this.root=this.addContainer("ql-editor");this.root.classList.add("ql-blank");this.root.setAttribute("data-gramm",!1);this.scrollingContainer=this.options.scrollingContainer||this.root;this.emitter=new r.default;this.scroll=c.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats});this.editor=new rt.default(this.scroll);this.selection=new st.default(this.scroll,this.emitter);this.theme=new this.options.theme(this,this.options);this.keyboard=this.theme.addModule("keyboard");this.clipboard=this.theme.addModule("clipboard");this.history=this.theme.addModule("history");this.theme.init();this.emitter.on(r.default.events.EDITOR_CHANGE,function(n){n===r.default.events.TEXT_CHANGE&&i.root.classList.toggle("ql-blank",i.editor.isBlank())});this.emitter.on(r.default.events.SCROLL_UPDATE,function(n,t){var r=i.selection.lastRange,f=r&&0===r.length?r.index:void 0;u.call(i,function(){return i.editor.update(null,t,f)},n)});e=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+f+"<p><br><\/p><\/div>");this.setContents(e);this.history.clear();this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder);this.options.readOnly&&this.disable()}return b(n,null,[{key:"debug",value:function(n){!0===n&&(n="log");k.default.level(n)}},{key:"find",value:function(n){return n.__quill||c.default.find(n)}},{key:"import",value:function(n){return null==this.imports[n]&&l.error("Cannot import "+n+". Are you sure it was registered?"),this.imports[n]}},{key:"register",value:function(n,t){var r=this,u=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i;"string"!=typeof n?(i=n.attrName||n.blotName,"string"==typeof i?this.register("formats/"+i,n,t):Object.keys(n).forEach(function(i){r.register(i,n[i],t)})):(null==this.imports[n]||u||l.warn("Overwriting "+n+" with",t),this.imports[n]=t,(n.startsWith("blots/")||n.startsWith("formats/"))&&"abstract"!==t.blotName?c.default.register(t):n.startsWith("modules")&&"function"==typeof t.register&&t.register())}}]),b(n,[{key:"addContainer",value:function(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t;return"string"==typeof n&&(t=n,n=document.createElement("div"),n.classList.add(t)),this.container.insertBefore(n,i),n}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(n,t,i){var e=this,o=s(n,t,i),r=f(o,4);return n=r[0],t=r[1],i=r[3],u.call(this,function(){return e.editor.deleteText(n,t)},i,n,-1*t)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(n);this.container.classList.toggle("ql-disabled",!n)}},{key:"focus",value:function(){var n=this.scrollingContainer.scrollTop;this.selection.focus();this.scrollingContainer.scrollTop=n;this.scrollIntoView()}},{key:"format",value:function(n,t){var i=this,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.default.sources.API;return u.call(this,function(){var u=i.getSelection(!0),f=new h.default;if(null==u)return f;if(c.default.query(n,c.default.Scope.BLOCK))f=i.editor.formatLine(u.index,u.length,y({},n,t));else{if(0===u.length)return i.selection.format(n,t),f;f=i.editor.formatText(u.index,u.length,y({},n,t))}return i.setSelection(u,r.default.sources.SILENT),f},f)}},{key:"formatLine",value:function(n,t,i,r,e){var c=this,h=void 0,l=s(n,t,i,r,e),o=f(l,4);return n=o[0],t=o[1],h=o[2],e=o[3],u.call(this,function(){return c.editor.formatLine(n,t,h)},e,n,0)}},{key:"formatText",value:function(n,t,i,r,e){var c=this,h=void 0,l=s(n,t,i,r,e),o=f(l,4);return n=o[0],t=o[1],h=o[2],e=o[3],u.call(this,function(){return c.editor.formatText(n,t,h)},e,n,0)}},{key:"getBounds",value:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=void 0,i;return t="number"==typeof n?this.selection.getBounds(n,r):this.selection.getBounds(n.index,n.length),i=this.container.getBoundingClientRect(),{bottom:t.bottom-i.top,height:t.height,left:t.left-i.left,right:t.right-i.left,top:t.top-i.top,width:t.width}}},{key:"getContents",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-n,r=s(n,t),i=f(r,2);return n=i[0],t=i[1],this.editor.getContents(n,t)}},{key:"getFormat",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof n?this.editor.getFormat(n,t):this.editor.getFormat(n.index,n.length)}},{key:"getIndex",value:function(n){return n.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(n){return this.scroll.leaf(n)}},{key:"getLine",value:function(n){return this.scroll.line(n)}},{key:"getLines",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof n?this.scroll.lines(n.index,n.length):this.scroll.lines(n,t)}},{key:"getModule",value:function(n){return this.theme.modules[n]}},{key:"getSelection",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-n,r=s(n,t),i=f(r,2);return n=i[0],t=i[1],this.editor.getText(n,t)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(t,i,r){var f=this,e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.sources.API;return u.call(this,function(){return f.editor.insertEmbed(t,i,r)},e,t)}},{key:"insertText",value:function(n,t,i,r,e){var c=this,h=void 0,l=s(n,0,i,r,e),o=f(l,4);return n=o[0],h=o[2],e=o[3],u.call(this,function(){return c.editor.insertText(n,t,h)},e,n,t.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(n,t,i){this.clipboard.dangerouslyPasteHTML(n,t,i)}},{key:"removeFormat",value:function(n,t,i){var e=this,o=s(n,t,i),r=f(o,4);return n=r[0],t=r[1],i=r[3],u.call(this,function(){return e.editor.removeFormat(n,t)},i,n)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(n){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.sources.API;return u.call(this,function(){n=new h.default(n);var u=t.getLength(),f=t.editor.deleteText(0,u),i=t.editor.applyDelta(n),r=i.ops[i.ops.length-1];return null!=r&&"string"==typeof r.insert&&"\n"===r.insert[r.insert.length-1]&&(t.editor.deleteText(t.getLength()-1,1),i.delete(1)),f.compose(i)},i)}},{key:"setSelection",value:function(t,i,u){if(null==t)this.selection.setRange(null,i||n.sources.API);else{var o=s(t,i,u),e=f(o,4);t=e[0];i=e[1];u=e[3];this.selection.setRange(new a.Range(t,i),u);u!==r.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.sources.API,i=(new h.default).insert(n);return this.setContents(i,t)}},{key:"update",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.default.sources.USER,t=this.scroll.update(n);return this.selection.update(n),t}},{key:"updateContents",value:function(n){var i=this,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.sources.API;return u.call(this,function(){return n=new h.default(n),i.editor.applyDelta(n,t)},t,!0)}}]),n}();e.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"};e.events=r.default.events;e.sources=r.default.sources;e.version="1.3.6";e.imports={delta:h.default,parchment:c.default,"core/module":et.default,"core/theme":d.default};t.expandConfig=p;t.overload=s;t.default=e},function(n,t){function r(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}Object.defineProperty(t,"__esModule",{value:!0});var i=function n(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r(this,n);this.quill=t;this.options=i};i.DEFAULTS={};t.default=i},function(n,t,i){function r(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function u(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function f(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var e=i(0),o=function(n){return n&&n.__esModule?n:{"default":n}}(e),s=function(n){function t(){return r(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return f(t,n),t}(o.default.Text);t.default=s},function(n,t,i){function f(n){return n&&n.__esModule?n:{"default":n}}function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var r;Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),c=function n(t,i,r){var u,f,e;return(null===t&&(t=Function.prototype),u=Object.getOwnPropertyDescriptor(t,i),void 0===u)?(f=Object.getPrototypeOf(t),null===f?void 0:n(f,i,r)):"value"in u?u.value:(e=u.get,void 0!==e?e.call(r):void 0)},l=i(58),a=f(l),v=i(10),y=f(v),u=y.default("quill:events");["selectionchange","mousedown","mouseup","click"].forEach(function(n){document.addEventListener(n,function(){for(var t=arguments.length,i=Array(t),n=0;n<t;n++)i[n]=arguments[n];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(n){if(n.__quill&&n.__quill.emitter){var t;(t=n.__quill.emitter).handleDOM.apply(t,i)}})})});r=function(n){function t(){e(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.listeners={},n.on("error",u.error),n}return s(t,n),h(t,[{key:"emit",value:function(){u.log.apply(u,arguments);c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(n){for(var i=arguments.length,r=Array(i>1?i-1:0),t=1;t<i;t++)r[t-1]=arguments[t];(this.listeners[n.type]||[]).forEach(function(t){var i=t.node,u=t.handler;(n.target===i||i.contains(n.target))&&u.apply(void 0,[n].concat(r))})}},{key:"listenDOM",value:function(n,t,i){this.listeners[n]||(this.listeners[n]=[]);this.listeners[n].push({node:t,handler:i})}}]),t}(a.default);r.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"};r.sources={API:"api",SILENT:"silent",USER:"user"};t.default=r},function(n,t){function r(n){if(i.indexOf(n)<=i.indexOf(f)){for(var u,r=arguments.length,e=Array(r>1?r-1:0),t=1;t<r;t++)e[t-1]=arguments[t];(u=console)[n].apply(u,e)}}function u(n){return i.reduce(function(t,i){return t[i]=r.bind(console,i,n),t},{})}Object.defineProperty(t,"__esModule",{value:!0});var i=["error","warn","log","info"],f="warn";r.level=u.level=function(n){f=n};t.default=u},function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0});var r=i(1),u=function(){function n(n,t,i){void 0===i&&(i={});this.attrName=n;this.keyName=t;var u=r.Scope.TYPE&r.Scope.ATTRIBUTE;this.scope=null!=i.scope?i.scope&r.Scope.LEVEL|u:r.Scope.ATTRIBUTE;null!=i.whitelist&&(this.whitelist=i.whitelist)}return n.keys=function(n){return[].map.call(n.attributes,function(n){return n.name})},n.prototype.add=function(n,t){return!!this.canAdd(n,t)&&(n.setAttribute(this.keyName,t),!0)},n.prototype.canAdd=function(n,t){return null!=r.query(n,r.Scope.BLOT&(this.scope|r.Scope.TYPE))&&(null==this.whitelist||("string"==typeof t?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1))},n.prototype.remove=function(n){n.removeAttribute(this.keyName)},n.prototype.value=function(n){var t=n.getAttribute(this.keyName);return this.canAdd(n,t)&&t?t:""},n}();t.default=u},function(n,t,i){function r(n){return null===n||void 0===n}function u(n){return!(!n||"object"!=(typeof n=="undefined"?"undefined":_typeof(n))||"number"!=typeof n.length)&&"function"==typeof n.copy&&"function"==typeof n.slice&&!(n.length>0&&"number"!=typeof n[0])}function h(n,t,i){var h,a,c,l;if(r(n)||r(t)||n.prototype!==t.prototype)return!1;if(o(n))return!!o(t)&&(n=f.call(n),t=f.call(t),s(n,t,i));if(u(n)){if(!u(t)||n.length!==t.length)return!1;for(h=0;h<n.length;h++)if(n[h]!==t[h])return!1;return!0}try{c=e(n);l=e(t)}catch(n){return!1}if(c.length!=l.length)return!1;for(c.sort(),l.sort(),h=c.length-1;h>=0;h--)if(c[h]!=l[h])return!1;for(h=c.length-1;h>=0;h--)if(a=c[h],!s(n[a],t[a],i))return!1;return(typeof n=="undefined"?"undefined":_typeof(n))==(typeof t=="undefined"?"undefined":_typeof(t))}var f=Array.prototype.slice,e=i(55),o=i(56),s=n.exports=function(n,t,i){return i||(i={}),n===t||(n instanceof Date&&t instanceof Date?n.getTime()===t.getTime():!n||!t||"object"!=(typeof n=="undefined"?"undefined":_typeof(n))&&"object"!=(typeof t=="undefined"?"undefined":_typeof(t))?i.strict?n===t:n==t:h(n,t,i))}},function(n,t,i){function r(n){return n&&n.__esModule?n:{"default":n}}function s(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function h(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function c(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var f;Object.defineProperty(t,"__esModule",{value:!0});t.default=t.Code=void 0;var l=function(){function n(n,t){var r=[],u=!0,f=!1,e=void 0,o,i;try{for(i=n[Symbol.iterator]();!(u=(o=i.next()).done)&&(r.push(o.value),!t||r.length!==t);u=!0);}catch(n){f=!0;e=n}finally{try{!u&&i.return&&i.return()}finally{if(f)throw e;}}return r}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return n(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),v=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),e=function n(t,i,r){var u,f,e;return(null===t&&(t=Function.prototype),u=Object.getOwnPropertyDescriptor(t,i),void 0===u)?(f=Object.getPrototypeOf(t),null===f?void 0:n(f,i,r)):"value"in u?u.value:(e=u.get,void 0!==e?e.call(r):void 0)},y=i(4),p=r(y),w=i(0),u=r(w),b=i(3),k=r(b),d=i(5),g=r(d),nt=i(8),a=r(nt),o=function(n){function t(){return s(this,t),h(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return c(t,n),t}(g.default);o.blotName="code";o.tagName="CODE";f=function(n){function t(){return s(this,t),h(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return c(t,n),v(t,[{key:"delta",value:function(){var t=this,n=this.domNode.textContent;return n.endsWith("\n")&&(n=n.slice(0,-1)),n.split("\n").reduce(function(n,i){return n.insert(i).insert("\n",t.formats())},new p.default)}},{key:"format",value:function(n,i){if(n!==this.statics.blotName||!i){var u=this.descendant(a.default,this.length()-1),f=l(u,1),r=f[0];null!=r&&r.deleteAt(r.length()-1,1);e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,n,i)}}},{key:"formatAt",value:function(n,i,r,f){var e;if(0!==i&&null!=u.default.query(r,u.default.Scope.BLOCK)&&(r!==this.statics.blotName||f!==this.statics.formats(this.domNode))&&(e=this.newlineIndex(n),!(e<0||e>=n+i))){var o=this.newlineIndex(n,!0)+1,s=e-o+1,h=this.isolate(o,s),c=h.next;h.format(r,f);c instanceof t&&c.formatAt(0,n-o+i-s,r,f)}}},{key:"insertAt",value:function(n,t,i){if(null==i){var u=this.descendant(a.default,n),r=l(u,2),f=r[0],e=r[1];f.insertAt(e,t)}}},{key:"length",value:function(){var n=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?n:n+1}},{key:"newlineIndex",value:function(n){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,n).lastIndexOf("\n");var t=this.domNode.textContent.slice(n).indexOf("\n");return t>-1?n+t:-1}},{key:"optimize",value:function(n){this.domNode.textContent.endsWith("\n")||this.appendChild(u.default.create("text","\n"));e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,n);var i=this.next;null!=i&&i.prev===this&&i.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===i.statics.formats(i.domNode)&&(i.optimize(n),i.moveChildren(this),i.remove())}},{key:"replace",value:function(n){e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,n);[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(n){var t=u.default.find(n);null==t?n.parentNode.removeChild(n):t instanceof u.default.Embed?t.remove():t.unwrap()})}}],[{key:"create",value:function(n){var i=e(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,n);return i.setAttribute("spellcheck",!1),i}},{key:"formats",value:function(){return!0}}]),t}(k.default);f.blotName="code-block";f.tagName="PRE";f.TAB="  ";t.Code=o;t.default=f},function(n,t,i){function u(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function f(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function e(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),s=function n(t,i,r){var u,f,e;return(null===t&&(t=Function.prototype),u=Object.getOwnPropertyDescriptor(t,i),void 0===u)?(f=Object.getPrototypeOf(t),null===f?void 0:n(f,i,r)):"value"in u?u.value:(e=u.get,void 0!==e?e.call(r):void 0)},h=i(0),c=function(n){return n&&n.__esModule?n:{"default":n}}(h),r=function(n){function t(){return u(this,t),f(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return e(t,n),o(t,[{key:"insertInto",value:function(n,i){0===n.children.length?s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertInto",this).call(this,n,i):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),t}(c.default.Embed);r.blotName="break";r.tagName="BR";t.default=r},function(n,t,i){function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}function u(n,t){var i=document.createElement("a"),r;return i.href=n,r=i.href.slice(0,i.href.indexOf(":")),t.indexOf(r)>-1}Object.defineProperty(t,"__esModule",{value:!0});t.sanitize=t.default=void 0;var h=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),f=function n(t,i,r){var u,f,e;return(null===t&&(t=Function.prototype),u=Object.getOwnPropertyDescriptor(t,i),void 0===u)?(f=Object.getPrototypeOf(t),null===f?void 0:n(f,i,r)):"value"in u?u.value:(e=u.get,void 0!==e?e.call(r):void 0)},c=i(5),l=function(n){return n&&n.__esModule?n:{"default":n}}(c),r=function(n){function t(){return e(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,n),h(t,[{key:"format",value:function(n,i){if(n!==this.statics.blotName||!i)return f(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,n,i);i=this.constructor.sanitize(i);this.domNode.setAttribute("href",i)}}],[{key:"create",value:function(n){var i=f(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,n);return n=this.sanitize(n),i.setAttribute("href",n),i.setAttribute("target","_blank"),i}},{key:"formats",value:function(n){return n.getAttribute("href")}},{key:"sanitize",value:function(n){return u(n,this.PROTOCOL_WHITELIST)?n:this.SANITIZED_URL}}]),t}(l.default);r.blotName="link";r.tagName="A";r.SANITIZED_URL="about:blank";r.PROTOCOL_WHITELIST=["http","https","mailto","tel"];t.default=r;t.sanitize=u},function(n,t,i){function u(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function f(n,t){n.setAttribute(t,!("true"===n.getAttribute(t)))}Object.defineProperty(t,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"==_typeof(Symbol.iterator)?function(n){return typeof n=="undefined"?"undefined":_typeof(n)}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n=="undefined"?"undefined":_typeof(n)},h=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),c=i(25),r=u(c),l=i(106),a=u(l),e=0,v=function(){function n(t){var i=this;o(this,n);this.select=t;this.container=document.createElement("span");this.buildPicker();this.select.style.display="none";this.select.parentNode.insertBefore(this.container,this.select);this.label.addEventListener("mousedown",function(){i.togglePicker()});this.label.addEventListener("keydown",function(n){switch(n.keyCode){case r.default.keys.ENTER:i.togglePicker();break;case r.default.keys.ESCAPE:i.escape();n.preventDefault()}});this.select.addEventListener("change",this.update.bind(this))}return h(n,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded");f(this.label,"aria-expanded");f(this.options,"aria-hidden")}},{key:"buildItem",value:function(n){var i=this,t=document.createElement("span");return t.tabIndex="0",t.setAttribute("role","button"),t.classList.add("ql-picker-item"),n.hasAttribute("value")&&t.setAttribute("data-value",n.getAttribute("value")),n.textContent&&t.setAttribute("data-label",n.textContent),t.addEventListener("click",function(){i.selectItem(t,!0)}),t.addEventListener("keydown",function(n){switch(n.keyCode){case r.default.keys.ENTER:i.selectItem(t,!0);n.preventDefault();break;case r.default.keys.ESCAPE:i.escape();n.preventDefault()}}),t}},{key:"buildLabel",value:function(){var n=document.createElement("span");return n.classList.add("ql-picker-label"),n.innerHTML=a.default,n.tabIndex="0",n.setAttribute("role","button"),n.setAttribute("aria-expanded","false"),this.container.appendChild(n),n}},{key:"buildOptions",value:function(){var t=this,n=document.createElement("span");n.classList.add("ql-picker-options");n.setAttribute("aria-hidden","true");n.tabIndex="-1";n.id="ql-picker-options-"+e;e+=1;this.label.setAttribute("aria-controls",n.id);this.options=n;[].slice.call(this.select.options).forEach(function(i){var r=t.buildItem(i);n.appendChild(r);!0===i.selected&&t.selectItem(r)});this.container.appendChild(n)}},{key:"buildPicker",value:function(){var n=this;[].slice.call(this.select.attributes).forEach(function(t){n.container.setAttribute(t.name,t.value)});this.container.classList.add("ql-picker");this.label=this.buildLabel();this.buildOptions()}},{key:"escape",value:function(){var n=this;this.close();setTimeout(function(){return n.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded");this.label.setAttribute("aria-expanded","false");this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(n){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=this.container.querySelector(".ql-selected"),i;n!==t&&(null!=t&&t.classList.remove("ql-selected"),null!=n&&(n.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(n.parentNode.children,n),n.hasAttribute("data-value")?this.label.setAttribute("data-value",n.getAttribute("data-value")):this.label.removeAttribute("data-value"),n.hasAttribute("data-label")?this.label.setAttribute("data-label",n.getAttribute("data-label")):this.label.removeAttribute("data-label"),r))&&("function"==typeof Event?this.select.dispatchEvent(new Event("change")):"object"===("undefined"==typeof Event?"undefined":s(Event))&&(i=document.createEvent("Event"),i.initEvent("change",!0,!0),this.select.dispatchEvent(i)),this.close())}},{key:"update",value:function(){var n=void 0,t,i;this.select.selectedIndex>-1?(t=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex],n=this.select.options[this.select.selectedIndex],this.selectItem(t)):this.selectItem(null);i=null!=n&&n!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",i)}}]),n}();t.default=v},function(n,t,i){function u(n){var t=r.find(n);if(null==t)try{t=r.create(n)}catch(i){t=r.create(r.Scope.INLINE);[].slice.call(n.childNodes).forEach(function(n){t.domNode.appendChild(n)});n.parentNode&&n.parentNode.replaceChild(t.domNode,n);t.attach()}return t}var f=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var e=i(47),o=i(27),r=i(1),s=function(n){function t(t){var i=n.call(this,t)||this;return i.build(),i}return f(t,n),t.prototype.appendChild=function(n){this.insertBefore(n)},t.prototype.attach=function(){n.prototype.attach.call(this);this.children.forEach(function(n){n.attach()})},t.prototype.build=function(){var n=this;this.children=new e.default;[].slice.call(this.domNode.childNodes).reverse().forEach(function(t){try{var i=u(t);n.insertBefore(i,n.children.head||void 0)}catch(n){if(n instanceof r.ParchmentError)return;throw n;}})},t.prototype.deleteAt=function(n,t){if(0===n&&t===this.length())return this.remove();this.children.forEachAt(n,t,function(n,t,i){n.deleteAt(t,i)})},t.prototype.descendant=function(n,i){var u=this.children.find(i),r=u[0],f=u[1];return null==n.blotName&&n(r)||null!=n.blotName&&r instanceof n?[r,f]:r instanceof t?r.descendant(n,f):[null,-1]},t.prototype.descendants=function(n,i,r){void 0===i&&(i=0);void 0===r&&(r=Number.MAX_VALUE);var u=[],f=r;return this.children.forEachAt(i,r,function(i,r,e){(null==n.blotName&&n(i)||null!=n.blotName&&i instanceof n)&&u.push(i);i instanceof t&&(u=u.concat(i.descendants(n,r,f)));f-=e}),u},t.prototype.detach=function(){this.children.forEach(function(n){n.detach()});n.prototype.detach.call(this)},t.prototype.formatAt=function(n,t,i,r){this.children.forEachAt(n,t,function(n,t,u){n.formatAt(t,u,i,r)})},t.prototype.insertAt=function(n,t,i){var u=this.children.find(n),f=u[0],o=u[1],e;f?f.insertAt(o,t,i):(e=null==i?r.create("text",t):r.create(t,i),this.appendChild(e))},t.prototype.insertBefore=function(n,t){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some(function(t){return n instanceof t}))throw new r.ParchmentError("Cannot insert "+n.statics.blotName+" into "+this.statics.blotName);n.insertInto(this,t)},t.prototype.length=function(){return this.children.reduce(function(n,t){return n+t.length()},0)},t.prototype.moveChildren=function(n,t){this.children.forEach(function(i){n.insertBefore(i,t)})},t.prototype.optimize=function(t){if(n.prototype.optimize.call(this,t),0===this.children.length)if(null!=this.statics.defaultChild){var i=r.create(this.statics.defaultChild);this.appendChild(i);i.optimize(t)}else this.remove()},t.prototype.path=function(n,i){void 0===i&&(i=!1);var f=this.children.find(n,i),r=f[0],e=f[1],u=[[this,n]];return r instanceof t?u.concat(r.path(e,i)):(null!=r&&u.push([r,e]),u)},t.prototype.removeChild=function(n){this.children.remove(n)},t.prototype.replace=function(i){i instanceof t&&i.moveChildren(this);n.prototype.replace.call(this,i)},t.prototype.split=function(n,t){if(void 0===t&&(t=!1),!t){if(0===n)return this;if(n===this.length())return this.next}var i=this.clone();return this.parent.insertBefore(i,this.next),this.children.forEachAt(n,this.length(),function(n,r){n=n.split(r,t);i.appendChild(n)}),i},t.prototype.unwrap=function(){this.moveChildren(this.parent,this.next);this.remove()},t.prototype.update=function(n){var t=this,i=[],f=[];n.forEach(function(n){n.target===t.domNode&&"childList"===n.type&&(i.push.apply(i,n.addedNodes),f.push.apply(f,n.removedNodes))});f.forEach(function(n){if(!(null!=n.parentNode&&"IFRAME"!==n.tagName&&document.body.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var i=r.find(n);null!=i&&(null!=i.domNode.parentNode&&i.domNode.parentNode!==t.domNode||i.detach())}});i.filter(function(n){return n.parentNode==t.domNode}).sort(function(n,t){return n===t?0:n.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(n){var f=null,i;null!=n.nextSibling&&(f=r.find(n.nextSibling));i=u(n);i.next==f&&null!=i.next||(null!=i.parent&&i.parent.removeChild(t),t.insertBefore(i,f||void 0))})},t}(o.default);t.default=s},function(n,t,i){var r=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var u=i(11),f=i(28),e=i(17),o=i(1),s=function(n){function t(t){var i=n.call(this,t)||this;return i.attributes=new f.default(i.domNode),i}return r(t,n),t.formats=function(n){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?n.tagName.toLowerCase():void 0)},t.prototype.format=function(n,t){var i=o.query(n);i instanceof u.default?this.attributes.attribute(i,t):t&&(null==i||n===this.statics.blotName&&this.formats()[n]===t||this.replaceWith(n,t))},t.prototype.formats=function(){var n=this.attributes.values(),t=this.statics.formats(this.domNode);return null!=t&&(n[this.statics.blotName]=t),n},t.prototype.replaceWith=function(t,i){var r=n.prototype.replaceWith.call(this,t,i);return this.attributes.copy(r),r},t.prototype.update=function(t,i){var r=this;n.prototype.update.call(this,t,i);t.some(function(n){return n.target===r.domNode&&"attributes"===n.type})&&this.attributes.build()},t.prototype.wrap=function(i,r){var u=n.prototype.wrap.call(this,i,r);return u instanceof t&&u.statics.scope===this.statics.scope&&this.attributes.move(u),u},t}(e.default);t.default=s},function(n,t,i){var r=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var u=i(27),f=i(1),e=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return r(t,n),t.value=function(){return!0},t.prototype.index=function(n,t){return this.domNode===n||this.domNode.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1},t.prototype.position=function(n){var t=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return n>0&&(t+=1),[this.parent.domNode,t]},t.prototype.value=function(){return n={},n[this.statics.blotName]=this.statics.value(this.domNode)||!0,n;var n},t.scope=f.Scope.INLINE_BLOT,t}(u.default);t.default=e},function(n,t,i){function r(n){this.ops=n;this.index=0;this.offset=0}var f=i(12),e=i(2),u={attributes:{compose:function(n,t,i){var r,u;"object"!=(typeof n=="undefined"?"undefined":_typeof(n))&&(n={});"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&(t={});r=e(!0,{},t);i||(r=Object.keys(r).reduce(function(n,t){return null!=r[t]&&(n[t]=r[t]),n},{}));for(u in n)void 0!==n[u]&&void 0===t[u]&&(r[u]=n[u]);if(Object.keys(r).length>0)return r},diff:function(n,t){"object"!=(typeof n=="undefined"?"undefined":_typeof(n))&&(n={});"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&(t={});var i=Object.keys(n).concat(Object.keys(t)).reduce(function(i,r){return f(n[r],t[r])||(i[r]=void 0===t[r]?null:t[r]),i},{});if(Object.keys(i).length>0)return i},transform:function(n,t,i){if("object"!=(typeof n=="undefined"?"undefined":_typeof(n)))return t;if("object"==(typeof t=="undefined"?"undefined":_typeof(t))){if(!i)return t;var r=Object.keys(t).reduce(function(i,r){return void 0===n[r]&&(i[r]=t[r]),i},{});return Object.keys(r).length>0?r:void 0}}},iterator:function(n){return new r(n)},length:function(n){return"number"==typeof n.delete?n.delete:"number"==typeof n.retain?n.retain:"string"==typeof n.insert?n.insert.length:1}};r.prototype.hasNext=function(){return this.peekLength()<1/0};r.prototype.next=function(n){var t,r,f,i;return(n||(n=1/0),t=this.ops[this.index],t)?(r=this.offset,f=u.length(t),n>=f-r?(n=f-r,this.index+=1,this.offset=0):this.offset+=n,"number"==typeof t.delete)?{"delete":n}:(i={},t.attributes&&(i.attributes=t.attributes),"number"==typeof t.retain?i.retain=n:i.insert="string"==typeof t.insert?t.insert.substr(r,n):t.insert,i):{retain:1/0}};r.prototype.peek=function(){return this.ops[this.index]};r.prototype.peekLength=function(){return this.ops[this.index]?u.length(this.ops[this.index])-this.offset:1/0};r.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"};n.exports=u},function(n){var t=function(){function t(n,t){return null!=t&&n instanceof t}function n(u,o,s,h,c){function l(u,s){var p,k,nt,tt,it,d,rt,w,g,b;if(null===u)return null;if(0===s||"object"!=(typeof u=="undefined"?"undefined":_typeof(u)))return u;if(t(u,i))p=new i;else if(t(u,r))p=new r;else if(t(u,f))p=new f(function(n,t){u.then(function(t){n(l(t,s-1))},function(n){t(l(n,s-1))})});else if(n.__isArray(u))p=[];else if(n.__isRegExp(u))p=new RegExp(u.source,e(u)),u.lastIndex&&(p.lastIndex=u.lastIndex);else if(n.__isDate(u))p=new Date(u.getTime());else{if(y&&Buffer.isBuffer(u))return p=new Buffer(u.length),u.copy(p),p;t(u,Error)?p=Object.create(u):void 0===h?(k=Object.getPrototypeOf(u),p=Object.create(k)):(p=Object.create(h),k=h)}if(o){if(nt=a.indexOf(u),-1!=nt)return v[nt];a.push(u);v.push(p)}t(u,i)&&u.forEach(function(n,t){var i=l(t,s-1),r=l(n,s-1);p.set(i,r)});t(u,r)&&u.forEach(function(n){var t=l(n,s-1);p.add(t)});for(w in u)k&&(tt=Object.getOwnPropertyDescriptor(k,w)),tt&&null==tt.set||(p[w]=l(u[w],s-1));if(Object.getOwnPropertySymbols)for(it=Object.getOwnPropertySymbols(u),w=0;w<it.length;w++)d=it[w],b=Object.getOwnPropertyDescriptor(u,d),(!b||b.enumerable||c)&&(p[d]=l(u[d],s-1),b.enumerable||Object.defineProperty(p,d,{enumerable:!1}));if(c)for(rt=Object.getOwnPropertyNames(u),w=0;w<rt.length;w++)g=rt[w],b=Object.getOwnPropertyDescriptor(u,g),b&&b.enumerable||(p[g]=l(u[g],s-1),Object.defineProperty(p,g,{enumerable:!1}));return p}"object"==(typeof o=="undefined"?"undefined":_typeof(o))&&(s=o.depth,h=o.prototype,c=o.includeNonEnumerable,o=o.circular);var a=[],v=[],y="undefined"!=typeof Buffer;return void 0===o&&(o=!0),void 0===s&&(s=1/0),l(u,s)}function u(n){return Object.prototype.toString.call(n)}function o(n){return"object"==(typeof n=="undefined"?"undefined":_typeof(n))&&"[object Date]"===u(n)}function s(n){return"object"==(typeof n=="undefined"?"undefined":_typeof(n))&&"[object Array]"===u(n)}function h(n){return"object"==(typeof n=="undefined"?"undefined":_typeof(n))&&"[object RegExp]"===u(n)}function e(n){var t="";return n.global&&(t+="g"),n.ignoreCase&&(t+="i"),n.multiline&&(t+="m"),t}var i,r,f;try{i=Map}catch(t){i=function(){}}try{r=Set}catch(t){r=function(){}}try{f=Promise}catch(t){f=function(){}}return n.clonePrototype=function(n){if(null===n)return null;var t=function(){};return t.prototype=n,new t},n.__objToStr=u,n.__isDate=o,n.__isArray=s,n.__isRegExp=h,n.__getRegExpFlags=e,n}();"object"==(typeof n=="undefined"?"undefined":_typeof(n))&&n.exports&&(n.exports=t)},function(n,t,i){function e(n){return n&&n.__esModule?n:{"default":n}}function o(n){if(Array.isArray(n)){for(var t=0,i=Array(n.length);t<n.length;t++)i[t]=n[t];return i}return Array.from(n)}function c(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function l(n,t){try{t.parentNode}catch(n){return!1}return t instanceof Text&&(t=t.parentNode),n.contains(t)}Object.defineProperty(t,"__esModule",{value:!0});t.default=t.Range=void 0;var u=function(){function n(n,t){var r=[],u=!0,f=!1,e=void 0,o,i;try{for(i=n[Symbol.iterator]();!(u=(o=i.next()).done)&&(r.push(o.value),!t||r.length!==t);u=!0);}catch(n){f=!0;e=n}finally{try{!u&&i.return&&i.return()}finally{if(f)throw e;}}return r}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return n(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),v=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),y=i(0),f=e(y),p=i(21),a=e(p),w=i(12),b=e(w),k=i(9),r=e(k),d=i(10),g=e(d),s=g.default("quill:selection"),h=function n(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;c(this,n);this.index=t;this.length=i},nt=function(){function n(t,i){var u=this;c(this,n);this.emitter=i;this.scroll=t;this.composing=!1;this.mouseDown=!1;this.root=this.scroll.domNode;this.cursor=f.default.create("cursor",this);this.lastRange=this.savedRange=new h(0,0);this.handleComposition();this.handleDragging();this.emitter.listenDOM("selectionchange",document,function(){u.mouseDown||setTimeout(u.update.bind(u,r.default.sources.USER),1)});this.emitter.on(r.default.events.EDITOR_CHANGE,function(n,t){n===r.default.events.TEXT_CHANGE&&t.length()>0&&u.update(r.default.sources.SILENT)});this.emitter.on(r.default.events.SCROLL_BEFORE_UPDATE,function(){if(u.hasFocus()){var n=u.getNativeRange();null!=n&&n.start.node!==u.cursor.textNode&&u.emitter.once(r.default.events.SCROLL_UPDATE,function(){try{u.setNativeRange(n.start.node,n.start.offset,n.end.node,n.end.offset)}catch(n){}})}});this.emitter.on(r.default.events.SCROLL_OPTIMIZE,function(n,t){if(t.range){var i=t.range,r=i.startNode,f=i.startOffset,e=i.endNode,o=i.endOffset;u.setNativeRange(r,f,e,o)}});this.update(r.default.sources.SILENT)}return v(n,[{key:"handleComposition",value:function(){var n=this;this.root.addEventListener("compositionstart",function(){n.composing=!0});this.root.addEventListener("compositionend",function(){if(n.composing=!1,n.cursor.parent){var t=n.cursor.restore();if(!t)return;setTimeout(function(){n.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)},1)}})}},{key:"handleDragging",value:function(){var n=this;this.emitter.listenDOM("mousedown",document.body,function(){n.mouseDown=!0});this.emitter.listenDOM("mouseup",document.body,function(){n.mouseDown=!1;n.update(r.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(n,t){var i,r,u;if((null==this.scroll.whitelist||this.scroll.whitelist[n])&&(this.scroll.update(),i=this.getNativeRange(),null!=i&&i.native.collapsed&&!f.default.query(n,f.default.Scope.BLOCK))){if(i.start.node!==this.cursor.textNode){if(r=f.default.find(i.start.node,!1),null==r)return;r instanceof f.default.Leaf?(u=r.split(i.start.offset),r.parent.insertBefore(this.cursor,u)):r.insertBefore(this.cursor,i.start.node);this.cursor.attach()}this.cursor.format(n,t);this.scroll.optimize();this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length);this.update()}}},{key:"getBounds",value:function(n){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=this.scroll.length(),y,h,r,p,c,w,l,o,f;n=Math.min(n,a-1);s=Math.min(n+s,a-1)-n;var i=void 0,b=this.scroll.leaf(n),v=u(b,2),e=v[0],t=v[1];return null==e?null:(y=e.position(t,!0),h=u(y,2),i=h[0],t=h[1],r=document.createRange(),s>0)?(r.setStart(i,t),p=this.scroll.leaf(n+s),c=u(p,2),e=c[0],t=c[1],null==e)?null:(w=e.position(t,!0),l=u(w,2),i=l[0],t=l[1],r.setEnd(i,t),r.getBoundingClientRect()):(o="left",f=void 0,i instanceof Text?(t<i.data.length?(r.setStart(i,t),r.setEnd(i,t+1)):(r.setStart(i,t-1),r.setEnd(i,t),o="right"),f=r.getBoundingClientRect()):(f=e.domNode.getBoundingClientRect(),t>0&&(o="right")),{bottom:f.top+f.height,height:f.height,left:f[o],right:f[o],top:f.top,width:0})}},{key:"getNativeRange",value:function(){var n=document.getSelection(),t,i;return null==n||n.rangeCount<=0?null:(t=n.getRangeAt(0),null==t)?null:(i=this.normalizeNative(t),s.info("getNativeRange",i),i)}},{key:"getRange",value:function(){var n=this.getNativeRange();return null==n?[null,null]:[this.normalizedToRange(n),n]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(n){var s=this,t=[[n.start.node,n.start.offset]];n.native.collapsed||t.push([n.end.node,n.end.offset]);var i=t.map(function(n){var r=u(n,2),e=r[0],o=r[1],t=f.default.find(e,!0),i=t.offset(s.scroll);return 0===o?i:t instanceof f.default.Container?i+t.length():i+t.index(e,o)}),r=Math.min(Math.max.apply(Math,o(i)),this.scroll.length()-1),e=Math.min.apply(Math,[r].concat(o(i)));return new h(e,r-e)}},{key:"normalizeNative",value:function(n){if(!l(this.root,n.startContainer)||!n.collapsed&&!l(this.root,n.endContainer))return null;var t={start:{node:n.startContainer,offset:n.startOffset},end:{node:n.endContainer,offset:n.endOffset},"native":n};return[t.start,t.end].forEach(function(n){for(var t=n.node,i=n.offset;!(t instanceof Text)&&t.childNodes.length>0;)if(t.childNodes.length>i)t=t.childNodes[i],i=0;else{if(t.childNodes.length!==i)break;t=t.lastChild;i=t instanceof Text?t.data.length:t.childNodes.length+1}n.node=t;n.offset=i}),t}},{key:"rangeToNative",value:function(n){var i=this,r=n.collapsed?[n.index]:[n.index,n.index+n.length],t=[],f=this.scroll.length();return r.forEach(function(n,r){n=Math.min(f-1,n);var o=void 0,c=i.scroll.leaf(n),s=u(c,2),l=s[0],e=s[1],a=l.position(e,0!==r),h=u(a,2);o=h[0];e=h[1];t.push(o,e)}),t.length<2&&(t=t.concat(t)),t}},{key:"scrollIntoView",value:function(n){var t=this.lastRange,i,s,r;if(null!=t&&(i=this.getBounds(t.index,t.length),null!=i)){var f=this.scroll.length()-1,h=this.scroll.line(Math.min(t.index,f)),c=u(h,1),e=c[0],o=e;t.length>0&&(s=this.scroll.line(Math.min(t.index+t.length,f)),o=u(s,1)[0]);null!=e&&null!=o&&(r=n.getBoundingClientRect(),i.top<r.top?n.scrollTop-=r.top-i.top:i.bottom>r.bottom&&(n.scrollTop+=i.bottom-r.bottom))}}},{key:"setNativeRange",value:function(n,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n,f=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],u,r,e;(s.info("setNativeRange",n,t,i,f),null==n||null!=this.root.parentNode&&null!=n.parentNode&&null!=i.parentNode)&&(u=document.getSelection(),null!=u&&(null!=n?(this.hasFocus()||this.root.focus(),r=(this.getNativeRange()||{}).native,(null==r||o||n!==r.startContainer||t!==r.startOffset||i!==r.endContainer||f!==r.endOffset)&&("BR"==n.tagName&&(t=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode),"BR"==i.tagName&&(f=[].indexOf.call(i.parentNode.childNodes,i),i=i.parentNode),e=document.createRange(),e.setStart(n,t),e.setEnd(i,f),u.removeAllRanges(),u.addRange(e))):(u.removeAllRanges(),this.root.blur(),document.body.focus())))}},{key:"setRange",value:function(n){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.default.sources.API,u;("string"==typeof t&&(i=t,t=!1),s.info("setRange",n),null!=n)?(u=this.rangeToNative(n),this.setNativeRange.apply(this,o(u).concat([t]))):this.setNativeRange(null);this.update(i)}},{key:"update",value:function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.default.sources.USER,f=this.lastRange,h=this.getRange(),e=u(h,2),c=e[0],n=e[1],o,t,s;(this.lastRange=c,null!=this.lastRange&&(this.savedRange=this.lastRange),b.default(f,this.lastRange))||(!this.composing&&null!=n&&n.native.collapsed&&n.start.node!==this.cursor.textNode&&this.cursor.restore(),t=[r.default.events.SELECTION_CHANGE,a.default(this.lastRange),a.default(f),i],((o=this.emitter).emit.apply(o,[r.default.events.EDITOR_CHANGE].concat(t)),i!==r.default.sources.SILENT)&&(s=this.emitter).emit.apply(s,t))}}]),n}();t.Range=h;t.default=nt},function(n,t,i){function u(n){return n&&n.__esModule?n:{"default":n}}function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var h=i(0),c=u(h),f=i(3),l=u(f),r=function(n){function t(){return e(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,n),t}(c.default.Container);r.allowedChildren=[l.default,f.BlockEmbed,r];t.default=r},function(n,t,i){function f(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function e(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function o(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});t.ColorStyle=t.ColorClass=t.ColorAttributor=void 0;var s=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),h=function n(t,i,r){var u,f,e;return(null===t&&(t=Function.prototype),u=Object.getOwnPropertyDescriptor(t,i),void 0===u)?(f=Object.getPrototypeOf(t),null===f?void 0:n(f,i,r)):"value"in u?u.value:(e=u.get,void 0!==e?e.call(r):void 0)},c=i(0),r=function(n){return n&&n.__esModule?n:{"default":n}}(c),u=function(n){function t(){return f(this,t),e(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,n),s(t,[{key:"value",value:function(n){var i=h(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,n);return i.startsWith("rgb(")?(i=i.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+i.split(",").map(function(n){return("00"+parseInt(n).toString(16)).slice(-2)}).join("")):i}}]),t}(r.default.Attributor.Style),l=new r.default.Attributor.Class("color","ql-color",{scope:r.default.Scope.INLINE}),a=new u("color","color",{scope:r.default.Scope.INLINE});t.ColorAttributor=u;t.ColorClass=l;t.ColorStyle=a},function(n,t,i){function e(n){return n&&n.__esModule?n:{"default":n}}function y(n,t,i){return t in n?Object.defineProperty(n,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[t]=i,n}function tt(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function it(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function rt(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}function h(n,t){var i,e=n===u.keys.LEFT?"prefix":"suffix";return i={key:n,shiftKey:t,altKey:null},y(i,e,/^$/),y(i,"handler",function(i){var e=i.index,s;return n===u.keys.RIGHT&&(e+=i.length+1),s=this.quill.getLeaf(e),!(f(s,1)[0]instanceof o.default.Embed)||(n===u.keys.LEFT?t?this.quill.setSelection(i.index-1,i.length+1,r.default.sources.USER):this.quill.setSelection(i.index-1,r.default.sources.USER):t?this.quill.setSelection(i.index,i.length+1,r.default.sources.USER):this.quill.setSelection(i.index+i.length+1,r.default.sources.USER),!1)}),i}function c(n,t){var o,s,i;if(!(0===n.index||this.quill.getLength()<=1)){var h=this.quill.getLine(n.index),c=f(h,1),l=c[0],u={};if(0===t.offset){var a=this.quill.getLine(n.index-1),y=f(a,1),e=y[0];null!=e&&e.length()>1&&(o=l.formats(),s=this.quill.getFormat(n.index-1,1),u=v.default.attributes.diff(o,s)||{})}i=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;this.quill.deleteText(n.index-i,i,r.default.sources.USER);Object.keys(u).length>0&&this.quill.formatLine(n.index-i,i,u,r.default.sources.USER);this.quill.focus()}}function p(n,t){var i=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1,h,c;if(!(n.index>=this.quill.getLength()-i)){var u={},e=0,l=this.quill.getLine(n.index),a=f(l,1),o=a[0];if(t.offset>=o.length()-1){var y=this.quill.getLine(n.index+1),p=f(y,1),s=p[0];s&&(h=o.formats(),c=this.quill.getFormat(n.index,1),u=v.default.attributes.diff(h,c)||{},e=s.length())}this.quill.deleteText(n.index,i,r.default.sources.USER);Object.keys(u).length>0&&this.quill.formatLine(n.index+e-1,i,u,r.default.sources.USER)}}function w(n){var t=this.quill.getLines(n),i={},u,f;t.length>1&&(u=t[0].formats(),f=t[t.length-1].formats(),i=v.default.attributes.diff(f,u)||{});this.quill.deleteText(n,r.default.sources.USER);Object.keys(i).length>0&&this.quill.formatLine(n.index,1,i,r.default.sources.USER);this.quill.setSelection(n.index,r.default.sources.SILENT);this.quill.focus()}function ut(n,t){var u=this,i;n.length>0&&this.quill.scroll.deleteAt(n.index,n.length);i=Object.keys(t.format).reduce(function(n,i){return o.default.query(i,o.default.Scope.BLOCK)&&!Array.isArray(t.format[i])&&(n[i]=t.format[i]),n},{});this.quill.insertText(n.index,"\n",i,r.default.sources.USER);this.quill.setSelection(n.index+1,r.default.sources.SILENT);this.quill.focus();Object.keys(t.format).forEach(function(n){null==i[n]&&(Array.isArray(t.format[n])||"link"!==n&&u.quill.format(n,t.format[n],r.default.sources.USER))})}function b(n){return{key:u.keys.TAB,shiftKey:!n,format:{"code-block":!0},handler:function(t){var i=o.default.query("code-block"),s=t.index,h=t.length,a=this.quill.scroll.descendant(i,s),l=f(a,2),e=l[0],u=l[1];if(null!=e){var v=this.quill.getIndex(e),c=e.newlineIndex(u,!0)+1,y=e.newlineIndex(v+u+h),p=e.domNode.textContent.slice(c,y).split("\n");u=0;p.forEach(function(t,r){n?(e.insertAt(c+u,i.TAB),u+=i.TAB.length,0===r?s+=i.TAB.length:h+=i.TAB.length):t.startsWith(i.TAB)&&(e.deleteAt(c+u,i.TAB.length),u-=i.TAB.length,0===r?s-=i.TAB.length:h-=i.TAB.length);u+=t.length+1});this.quill.update(r.default.sources.USER);this.quill.setSelection(s,h,r.default.sources.SILENT)}}}}function l(n){return{key:n[0].toUpperCase(),shortKey:!0,handler:function(t,i){this.quill.format(n,!i.format[n],r.default.sources.USER)}}}function a(n){if("string"==typeof n||"number"==typeof n)return a({key:n});if("object"===(void 0===n?"undefined":k(n))&&(n=et.default(n,!1)),"string"==typeof n.key)if(null!=u.keys[n.key.toUpperCase()])n.key=u.keys[n.key.toUpperCase()];else{if(1!==n.key.length)return null;n.key=n.key.toUpperCase().charCodeAt(0)}return n.shortKey&&(n[nt]=n.shortKey,delete n.shortKey),n}Object.defineProperty(t,"__esModule",{value:!0});t.SHORTKEY=t.default=void 0;var k="function"==typeof Symbol&&"symbol"==_typeof(Symbol.iterator)?function(n){return typeof n=="undefined"?"undefined":_typeof(n)}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n=="undefined"?"undefined":_typeof(n)},f=function(){function n(n,t){var r=[],u=!0,f=!1,e=void 0,o,i;try{for(i=n[Symbol.iterator]();!(u=(o=i.next()).done)&&(r.push(o.value),!t||r.length!==t);u=!0);}catch(n){f=!0;e=n}finally{try{!u&&i.return&&i.return()}finally{if(f)throw e;}}return r}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return n(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),d=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),ft=i(21),et=e(ft),ot=i(12),st=e(ot),ht=i(2),g=e(ht),ct=i(4),s=e(ct),lt=i(20),v=e(lt),at=i(0),o=e(at),vt=i(6),r=e(vt),yt=i(10),pt=e(yt),wt=i(7),bt=e(wt),kt=pt.default("quill:keyboard"),nt=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",u=function(n){function t(n,i){tt(this,t);var r=it(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n,i));return r.bindings={},Object.keys(r.options.bindings).forEach(function(t){("list autofill"!==t||null==n.scroll.whitelist||n.scroll.whitelist.list)&&r.options.bindings[t]&&r.addBinding(r.options.bindings[t])}),r.addBinding({key:t.keys.ENTER,shiftKey:null},ut),r.addBinding({key:t.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(r.addBinding({key:t.keys.BACKSPACE},{collapsed:!0},c),r.addBinding({key:t.keys.DELETE},{collapsed:!0},p)):(r.addBinding({key:t.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},c),r.addBinding({key:t.keys.DELETE},{collapsed:!0,suffix:/^.?$/},p)),r.addBinding({key:t.keys.BACKSPACE},{collapsed:!1},w),r.addBinding({key:t.keys.DELETE},{collapsed:!1},w),r.addBinding({key:t.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},c),r.listen(),r}return rt(t,n),d(t,null,[{key:"match",value:function(n,t){return t=a(t),!["altKey","ctrlKey","metaKey","shiftKey"].some(function(i){return!!t[i]!==n[i]&&null!==t[i]})&&t.key===(n.which||n.keyCode)}}]),d(t,[{key:"addBinding",value:function(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},t=a(n);if(null==t||null==t.key)return kt.warn("Attempted to add invalid keyboard binding",t);"function"==typeof i&&(i={handler:i});"function"==typeof r&&(r={handler:r});t=g.default(t,i,r);this.bindings[t.key]=this.bindings[t.key]||[];this.bindings[t.key].push(t)}},{key:"listen",value:function(){var n=this;this.quill.root.addEventListener("keydown",function(i){var h,e,r;if(!i.defaultPrevented&&(h=i.which||i.keyCode,e=(n.bindings[h]||[]).filter(function(n){return t.match(i,n)}),0!==e.length&&(r=n.quill.getSelection(),null!=r&&n.quill.hasFocus()))){var p=n.quill.getLine(r.index),c=f(p,2),w=c[0],b=c[1],d=n.quill.getLeaf(r.index),l=f(d,2),s=l[0],a=l[1],g=0===r.length?[s,a]:n.quill.getLeaf(r.index+r.length),v=f(g,2),y=v[0],nt=v[1],tt=s instanceof o.default.Text?s.value().slice(0,a):"",it=y instanceof o.default.Text?y.value().slice(nt):"",u={collapsed:0===r.length,empty:0===r.length&&w.length()<=1,format:n.quill.getFormat(r),offset:b,prefix:tt,suffix:it};e.some(function(t){if(null!=t.collapsed&&t.collapsed!==u.collapsed||null!=t.empty&&t.empty!==u.empty||null!=t.offset&&t.offset!==u.offset)return!1;if(Array.isArray(t.format)){if(t.format.every(function(n){return null==u.format[n]}))return!1}else if("object"===k(t.format)&&!Object.keys(t.format).every(function(n){return!0===t.format[n]?null!=u.format[n]:!1===t.format[n]?null==u.format[n]:st.default(t.format[n],u.format[n])}))return!1;return!(null!=t.prefix&&!t.prefix.test(u.prefix))&&!(null!=t.suffix&&!t.suffix.test(u.suffix))&&!0!==t.handler.call(n,r,u)})&&i.preventDefault()}})}}]),t}(bt.default);u.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};u.DEFAULTS={bindings:{bold:l("bold"),italic:l("italic"),underline:l("underline"),indent:{key:u.keys.TAB,format:["blockquote","indent","list"],handler:function(n,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","+1",r.default.sources.USER)}},outdent:{key:u.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(n,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","-1",r.default.sources.USER)}},"outdent backspace":{key:u.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(n,t){null!=t.format.indent?this.quill.format("indent","-1",r.default.sources.USER):null!=t.format.list&&this.quill.format("list",!1,r.default.sources.USER)}},"indent code-block":b(!0),"outdent code-block":b(!1),"remove tab":{key:u.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(n){this.quill.deleteText(n.index-1,1,r.default.sources.USER)}},tab:{key:u.keys.TAB,handler:function(n){this.quill.history.cutoff();var t=(new s.default).retain(n.index).delete(n.length).insert("\t");this.quill.updateContents(t,r.default.sources.USER);this.quill.history.cutoff();this.quill.setSelection(n.index+1,r.default.sources.SILENT)}},"list empty enter":{key:u.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(n,t){this.quill.format("list",!1,r.default.sources.USER);t.format.indent&&this.quill.format("indent",!1,r.default.sources.USER)}},"checklist enter":{key:u.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(n){var u=this.quill.getLine(n.index),t=f(u,2),i=t[0],e=t[1],o=g.default({},i.formats(),{list:"checked"}),h=(new s.default).retain(n.index).insert("\n",o).retain(i.length()-e-1).retain(1,{list:"unchecked"});this.quill.updateContents(h,r.default.sources.USER);this.quill.setSelection(n.index+1,r.default.sources.SILENT);this.quill.scrollIntoView()}},"header enter":{key:u.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(n,t){var u=this.quill.getLine(n.index),i=f(u,2),e=i[0],o=i[1],h=(new s.default).retain(n.index).insert("\n",t.format).retain(e.length()-o-1).retain(1,{header:null});this.quill.updateContents(h,r.default.sources.USER);this.quill.setSelection(n.index+1,r.default.sources.SILENT);this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(n,t){var u=t.prefix.length,c=this.quill.getLine(n.index),o=f(c,2),l=o[0],e=o[1],i,h;if(e>u)return!0;i=void 0;switch(t.prefix.trim()){case"[]":case"[ ]":i="unchecked";break;case"[x]":i="checked";break;case"-":case"*":i="bullet";break;default:i="ordered"}this.quill.insertText(n.index," ",r.default.sources.USER);this.quill.history.cutoff();h=(new s.default).retain(n.index-e).delete(u+1).retain(l.length()-2-e).retain(1,{list:i});this.quill.updateContents(h,r.default.sources.USER);this.quill.history.cutoff();this.quill.setSelection(n.index-u,r.default.sources.SILENT)}},"code exit":{key:u.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(n){var i=this.quill.getLine(n.index),t=f(i,2),u=t[0],e=t[1],o=(new s.default).retain(n.index+u.length()-e-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(o,r.default.sources.USER)}},"embed left":h(u.keys.LEFT,!1),"embed left shift":h(u.keys.LEFT,!0),"embed right":h(u.keys.RIGHT,!1),"embed right shift":h(u.keys.RIGHT,!0)}};t.default=u;t.SHORTKEY=nt},function(n,t,i){n.exports={align:{"":i(75),center:i(76),right:i(77),justify:i(78)},background:i(79),blockquote:i(80),bold:i(81),clean:i(82),code:i(40),"code-block":i(40),color:i(83),direction:{"":i(84),rtl:i(85)},float:{center:i(86),full:i(87),left:i(88),right:i(89)},formula:i(90),header:{1:i(91),2:i(92)},italic:i(93),image:i(94),indent:{"+1":i(95),"-1":i(96)},link:i(97),list:{ordered:i(98),bullet:i(99),check:i(100)},script:{sub:i(101),"super":i(102)},strike:i(103),underline:i(104),video:i(105)}},function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0});var r=i(1),u=function(){function n(n){this.domNode=n;this.domNode[r.DATA_KEY]={blot:this}}return Object.defineProperty(n.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),n.create=function(n){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var t;return Array.isArray(this.tagName)?("string"==typeof n&&(n=n.toUpperCase(),parseInt(n).toString()===n&&(n=parseInt(n))),t="number"==typeof n?document.createElement(this.tagName[n-1]):this.tagName.indexOf(n)>-1?document.createElement(n):document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t},n.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},n.prototype.clone=function(){var n=this.domNode.cloneNode(!1);return r.create(n)},n.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this);delete this.domNode[r.DATA_KEY]},n.prototype.deleteAt=function(n,t){this.isolate(n,t).remove()},n.prototype.formatAt=function(n,t,i,u){var e=this.isolate(n,t),f;null!=r.query(i,r.Scope.BLOT)&&u?e.wrap(i,u):null!=r.query(i,r.Scope.ATTRIBUTE)&&(f=r.create(this.statics.scope),e.wrap(f),f.format(i,u))},n.prototype.insertAt=function(n,t,i){var u=null==i?r.create("text",t):r.create(t,i),f=this.split(n);this.parent.insertBefore(u,f)},n.prototype.insertInto=function(n,t){void 0===t&&(t=null);null!=this.parent&&this.parent.children.remove(this);var i=null;n.children.insertBefore(this,t);null!=t&&(i=t.domNode);this.domNode.parentNode==n.domNode&&this.domNode.nextSibling==i||n.domNode.insertBefore(this.domNode,i);this.parent=n;this.attach()},n.prototype.isolate=function(n,t){var i=this.split(n);return i.split(t),i},n.prototype.length=function(){return 1},n.prototype.offset=function(n){return void 0===n&&(n=this.parent),null==this.parent||this==n?0:this.parent.children.offset(this)+this.parent.offset(n)},n.prototype.optimize=function(){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},n.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode);this.detach()},n.prototype.replace=function(n){null!=n.parent&&(n.parent.insertBefore(this,n.next),n.remove())},n.prototype.replaceWith=function(n,t){var i="string"==typeof n?r.create(n,t):n;return i.replace(this),i},n.prototype.split=function(n){return 0===n?this:this.next},n.prototype.update=function(){},n.prototype.wrap=function(n,t){var i="string"==typeof n?r.create(n,t):n;return null!=this.parent&&this.parent.insertBefore(i,this.next),i.appendChild(this),i},n.blotName="abstract",n}();t.default=u},function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0});var r=i(11),f=i(29),e=i(30),u=i(1),o=function(){function n(n){this.attributes={};this.domNode=n;this.build()}return n.prototype.attribute=function(n,t){t?n.add(this.domNode,t)&&(null!=n.value(this.domNode)?this.attributes[n.attrName]=n:delete this.attributes[n.attrName]):(n.remove(this.domNode),delete this.attributes[n.attrName])},n.prototype.build=function(){var n=this;this.attributes={};var t=r.default.keys(this.domNode),i=f.default.keys(this.domNode),o=e.default.keys(this.domNode);t.concat(i).concat(o).forEach(function(t){var i=u.query(t,u.Scope.ATTRIBUTE);i instanceof r.default&&(n.attributes[i.attrName]=i)})},n.prototype.copy=function(n){var t=this;Object.keys(this.attributes).forEach(function(i){var r=t.attributes[i].value(t.domNode);n.format(i,r)})},n.prototype.move=function(n){var t=this;this.copy(n);Object.keys(this.attributes).forEach(function(n){t.attributes[n].remove(t.domNode)});this.attributes={}},n.prototype.values=function(){var n=this;return Object.keys(this.attributes).reduce(function(t,i){return t[i]=n.attributes[i].value(n.domNode),t},{})},n}();t.default=o},function(n,t,i){function r(n,t){return(n.getAttribute("class")||"").split(/\s+/).filter(function(n){return 0===n.indexOf(t+"-")})}var e=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),u,f;Object.defineProperty(t,"__esModule",{value:!0});u=i(11);f=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return e(t,n),t.keys=function(n){return(n.getAttribute("class")||"").split(/\s+/).map(function(n){return n.split("-").slice(0,-1).join("-")})},t.prototype.add=function(n,t){return!!this.canAdd(n,t)&&(this.remove(n),n.classList.add(this.keyName+"-"+t),!0)},t.prototype.remove=function(n){r(n,this.keyName).forEach(function(t){n.classList.remove(t)});0===n.classList.length&&n.removeAttribute("class")},t.prototype.value=function(n){var i=r(n,this.keyName)[0]||"",t=i.slice(this.keyName.length+1);return this.canAdd(n,t)?t:""},t}(u.default);t.default=f},function(n,t,i){function r(n){var t=n.split("-"),i=t.slice(1).map(function(n){return n[0].toUpperCase()+n.slice(1)}).join("");return t[0]+i}var e=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),u,f;Object.defineProperty(t,"__esModule",{value:!0});u=i(11);f=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return e(t,n),t.keys=function(n){return(n.getAttribute("style")||"").split(";").map(function(n){return n.split(":")[0].trim()})},t.prototype.add=function(n,t){return!!this.canAdd(n,t)&&(n.style[r(this.keyName)]=t,!0)},t.prototype.remove=function(n){n.style[r(this.keyName)]="";n.getAttribute("style")||n.removeAttribute("style")},t.prototype.value=function(n){var t=n.style[r(this.keyName)];return this.canAdd(n,t)?t:""},t}(u.default);t.default=f},function(n,t,i){function e(n){return n&&n.__esModule?n:{"default":n}}function s(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function h(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function c(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function n(n,t){var r=[],u=!0,f=!1,e=void 0,o,i;try{for(i=n[Symbol.iterator]();!(u=(o=i.next()).done)&&(r.push(o.value),!t||r.length!==t);u=!0);}catch(n){f=!0;e=n}finally{try{!u&&i.return&&i.return()}finally{if(f)throw e;}}return r}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return n(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),u=function n(t,i,r){var u,f,e;return(null===t&&(t=Function.prototype),u=Object.getOwnPropertyDescriptor(t,i),void 0===u)?(f=Object.getPrototypeOf(t),null===f?void 0:n(f,i,r)):"value"in u?u.value:(e=u.get,void 0!==e?e.call(r):void 0)},o=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),a=i(0),f=e(a),v=i(8),y=e(v),r=function(n){function t(n,i){s(this,t);var r=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n));return r.selection=i,r.textNode=document.createTextNode(t.CONTENTS),r.domNode.appendChild(r.textNode),r._length=0,r}return c(t,n),o(t,null,[{key:"value",value:function(){}}]),o(t,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(n,i){if(0!==this._length)return u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,n,i);for(var r=this,e=0;null!=r&&r.statics.scope!==f.default.Scope.BLOCK_BLOT;)e+=r.offset(r.parent),r=r.parent;null!=r&&(this._length=t.CONTENTS.length,r.optimize(),r.formatAt(e,t.CONTENTS.length,n,i),this._length=0)}},{key:"index",value:function(n,i){return n===this.textNode?0:u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,n,i)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this);this.parent=null}},{key:"restore",value:function(){var e,s,c,h;if(!this.selection.composing&&null!=this.parent){var o=this.textNode,n=this.selection.getNativeRange(),i=void 0,r=void 0,u=void 0;for(null!=n&&n.start.node===o&&n.end.node===o&&(e=[o,n.start.offset,n.end.offset],i=e[0],r=e[1],u=e[2]);null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==t.CONTENTS&&(s=this.textNode.data.split(t.CONTENTS).join(""),this.next instanceof y.default?(i=this.next.domNode,this.next.insertAt(0,s),this.textNode.data=t.CONTENTS):(this.textNode.data=s,this.parent.insertBefore(f.default.create(this.textNode),this),this.textNode=document.createTextNode(t.CONTENTS),this.domNode.appendChild(this.textNode))),this.remove(),null!=r)return c=[r,u].map(function(n){return Math.max(0,Math.min(i.data.length,n-1))}),h=l(c,2),r=h[0],u=h[1],{startNode:i,startOffset:r,endNode:i,endOffset:u}}}},{key:"update",value:function(n,t){var r=this,i;n.some(function(n){return"characterData"===n.type&&n.target===r.textNode})&&(i=this.restore(),i&&(t.range=i))}},{key:"value",value:function(){return""}}]),t}(f.default.Embed);r.blotName="cursor";r.className="ql-cursor";r.tagName="span";r.CONTENTS="﻿";t.default=r},function(n,t){function r(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),i=function(){function n(t,i){r(this,n);this.quill=t;this.options=i;this.modules={}}return u(n,[{key:"init",value:function(){var n=this;Object.keys(this.options.modules).forEach(function(t){null==n.modules[t]&&n.addModule(t)})}},{key:"addModule",value:function(n){var t=this.quill.constructor.import("modules/"+n);return this.modules[n]=new t(this.quill,this.options.modules[n]||{}),this.modules[n]}}]),n}();i.DEFAULTS={modules:{}};i.themes={"default":i};t.default=i},function(n,t,i){function f(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function s(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function h(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),l=function n(t,i,r){var u,f,e;return(null===t&&(t=Function.prototype),u=Object.getOwnPropertyDescriptor(t,i),void 0===u)?(f=Object.getPrototypeOf(t),null===f?void 0:n(f,i,r)):"value"in u?u.value:(e=u.get,void 0!==e?e.call(r):void 0)},a=i(0),u=f(a),v=i(8),e=f(v),r="﻿",y=function(n){function t(n){o(this,t);var i=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n));return i.contentNode=document.createElement("span"),i.contentNode.setAttribute("contenteditable",!1),[].slice.call(i.domNode.childNodes).forEach(function(n){i.contentNode.appendChild(n)}),i.leftGuard=document.createTextNode(r),i.rightGuard=document.createTextNode(r),i.domNode.appendChild(i.leftGuard),i.domNode.appendChild(i.contentNode),i.domNode.appendChild(i.rightGuard),i}return h(t,n),c(t,[{key:"index",value:function(n,i){return n===this.leftGuard?0:n===this.rightGuard?1:l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,n,i)}},{key:"restore",value:function(n){var f=void 0,i=void 0,t=n.data.split(r).join(""),o;return n===this.leftGuard?this.prev instanceof e.default?(o=this.prev.length(),this.prev.insertAt(o,t),f={startNode:this.prev.domNode,startOffset:o+t.length}):(i=document.createTextNode(t),this.parent.insertBefore(u.default.create(i),this),f={startNode:i,startOffset:t.length}):n===this.rightGuard&&(this.next instanceof e.default?(this.next.insertAt(0,t),f={startNode:this.next.domNode,startOffset:t.length}):(i=document.createTextNode(t),this.parent.insertBefore(u.default.create(i),this.next),f={startNode:i,startOffset:t.length})),n.data=r,f}},{key:"update",value:function(n,t){var i=this;n.forEach(function(n){if("characterData"===n.type&&(n.target===i.leftGuard||n.target===i.rightGuard)){var r=i.restore(n.target);r&&(t.range=r)}})}}]),t}(u.default.Embed);t.default=y},function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0});t.AlignStyle=t.AlignClass=t.AlignAttribute=void 0;var f=i(0),r=function(n){return n&&n.__esModule?n:{"default":n}}(f),u={scope:r.default.Scope.BLOCK,whitelist:["right","center","justify"]},e=new r.default.Attributor.Attribute("align","align",u),o=new r.default.Attributor.Class("align","ql-align",u),s=new r.default.Attributor.Style("align","text-align",u);t.AlignAttribute=e;t.AlignClass=o;t.AlignStyle=s},function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0});t.BackgroundStyle=t.BackgroundClass=void 0;var u=i(0),r=function(n){return n&&n.__esModule?n:{"default":n}}(u),f=i(24),e=new r.default.Attributor.Class("background","ql-bg",{scope:r.default.Scope.INLINE}),o=new f.ColorAttributor("background","background-color",{scope:r.default.Scope.INLINE});t.BackgroundClass=e;t.BackgroundStyle=o},function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0});t.DirectionStyle=t.DirectionClass=t.DirectionAttribute=void 0;var f=i(0),r=function(n){return n&&n.__esModule?n:{"default":n}}(f),u={scope:r.default.Scope.BLOCK,whitelist:["rtl"]},e=new r.default.Attributor.Attribute("direction","dir",u),o=new r.default.Attributor.Class("direction","ql-direction",u),s=new r.default.Attributor.Style("direction","direction",u);t.DirectionAttribute=e;t.DirectionClass=o;t.DirectionStyle=s},function(n,t,i){function f(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function e(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function o(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});t.FontClass=t.FontStyle=void 0;var s=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),h=function n(t,i,r){var u,f,e;return(null===t&&(t=Function.prototype),u=Object.getOwnPropertyDescriptor(t,i),void 0===u)?(f=Object.getPrototypeOf(t),null===f?void 0:n(f,i,r)):"value"in u?u.value:(e=u.get,void 0!==e?e.call(r):void 0)},c=i(0),r=function(n){return n&&n.__esModule?n:{"default":n}}(c),u={scope:r.default.Scope.INLINE,whitelist:["serif","monospace"]},l=new r.default.Attributor.Class("font","ql-font",u),a=function(n){function t(){return f(this,t),e(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,n),s(t,[{key:"value",value:function(n){return h(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,n).replace(/["']/g,"")}}]),t}(r.default.Attributor.Style),v=new a("font","font-family",u);t.FontStyle=v;t.FontClass=l},function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0});t.SizeStyle=t.SizeClass=void 0;var u=i(0),r=function(n){return n&&n.__esModule?n:{"default":n}}(u),f=new r.default.Attributor.Class("size","ql-size",{scope:r.default.Scope.INLINE,whitelist:["small","large","huge"]}),e=new r.default.Attributor.Style("size","font-size",{scope:r.default.Scope.INLINE,whitelist:["10px","18px","32px"]});t.SizeClass=f;t.SizeStyle=e},function(n,t,i){function f(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function e(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function o(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),u=function n(t,i,r){var u,f,e;return(null===t&&(t=Function.prototype),u=Object.getOwnPropertyDescriptor(t,i),void 0===u)?(f=Object.getPrototypeOf(t),null===f?void 0:n(f,i,r)):"value"in u?u.value:(e=u.get,void 0!==e?e.call(r):void 0)},h=i(5),c=function(n){return n&&n.__esModule?n:{"default":n}}(h),r=function(n){function t(){return f(this,t),e(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,n),s(t,[{key:"optimize",value:function(n){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,n);this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return u(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),t}(c.default);r.blotName="bold";r.tagName=["STRONG","B"];t.default=r},function(n){n.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"><\/polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"><\/polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13><\/line> <\/svg>'},function(n,t,i){function u(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function f(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function e(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),r=function n(t,i,r){var u,f,e;return(null===t&&(t=Function.prototype),u=Object.getOwnPropertyDescriptor(t,i),void 0===u)?(f=Object.getPrototypeOf(t),null===f?void 0:n(f,i,r)):"value"in u?u.value:(e=u.get,void 0!==e?e.call(r):void 0)},s=i(16),h=function(n){return n&&n.__esModule?n:{"default":n}}(s),c=function(n){function t(n,i){u(this,t);var r=f(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n));return r.label.innerHTML=i,r.container.classList.add("ql-color-picker"),[].slice.call(r.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(n){n.classList.add("ql-primary")}),r}return e(t,n),o(t,[{key:"buildItem",value:function(n){var i=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"buildItem",this).call(this,n);return i.style.backgroundColor=n.getAttribute("value")||"",i}},{key:"selectItem",value:function(n,i){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,n,i);var u=this.label.querySelector(".ql-color-label"),f=n?n.getAttribute("data-value")||"":"";u&&("line"===u.tagName?u.style.stroke=f:u.style.fill=f)}}]),t}(h.default);t.default=c},function(n,t,i){function r(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function u(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function f(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var e=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),o=function n(t,i,r){var u,f,e;return(null===t&&(t=Function.prototype),u=Object.getOwnPropertyDescriptor(t,i),void 0===u)?(f=Object.getPrototypeOf(t),null===f?void 0:n(f,i,r)):"value"in u?u.value:(e=u.get,void 0!==e?e.call(r):void 0)},s=i(16),h=function(n){return n&&n.__esModule?n:{"default":n}}(s),c=function(n){function t(n,i){r(this,t);var f=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n));return f.container.classList.add("ql-icon-picker"),[].forEach.call(f.container.querySelectorAll(".ql-picker-item"),function(n){n.innerHTML=i[n.getAttribute("data-value")||""]}),f.defaultItem=f.container.querySelector(".ql-selected"),f.selectItem(f.defaultItem),f}return f(t,n),e(t,[{key:"selectItem",value:function(n,i){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,n,i);n=n||this.defaultItem;this.label.innerHTML=n.innerHTML}}]),t}(h.default);t.default=c},function(n,t){function i(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),u=function(){function n(t,r){var u=this;i(this,n);this.quill=t;this.boundsContainer=r||document.body;this.root=t.addContainer("ql-tooltip");this.root.innerHTML=this.constructor.TEMPLATE;this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){u.root.style.marginTop=-1*u.quill.root.scrollTop+"px"});this.hide()}return r(n,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(n){var u=n.left+n.width/2-this.root.offsetWidth/2,f=n.bottom+this.quill.root.scrollTop,e,o;this.root.style.left=u+"px";this.root.style.top=f+"px";this.root.classList.remove("ql-flip");var i=this.boundsContainer.getBoundingClientRect(),t=this.root.getBoundingClientRect(),r=0;return(t.right>i.right&&(r=i.right-t.right,this.root.style.left=u+r+"px"),t.left<i.left&&(r=i.left-t.left,this.root.style.left=u+r+"px"),t.bottom>i.bottom)&&(e=t.bottom-t.top,o=n.bottom-n.top+e,this.root.style.top=f-o+"px",this.root.classList.add("ql-flip")),r}},{key:"show",value:function(){this.root.classList.remove("ql-editing");this.root.classList.remove("ql-hidden")}}]),n}();t.default=u},function(n,t,i){function r(n){return n&&n.__esModule?n:{"default":n}}function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}function y(n){var t=n.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||n.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return t?(t[1]||"https")+"://www.youtube.com/embed/"+t[2]+"?showinfo=0":(t=n.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(t[1]||"https")+"://player.vimeo.com/video/"+t[2]+"/":n}function f(n,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach(function(t){var r=document.createElement("option");t===i?r.setAttribute("selected","selected"):r.setAttribute("value",t);n.appendChild(r)})}var v;Object.defineProperty(t,"__esModule",{value:!0});t.default=t.BaseTooltip=void 0;var h=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),p=function n(t,i,r){var u,f,e;return(null===t&&(t=Function.prototype),u=Object.getOwnPropertyDescriptor(t,i),void 0===u)?(f=Object.getPrototypeOf(t),null===f?void 0:n(f,i,r)):"value"in u?u.value:(e=u.get,void 0!==e?e.call(r):void 0)},w=i(2),b=r(w),k=i(4),d=r(k),g=i(9),u=r(g),nt=i(25),c=r(nt),tt=i(32),l=r(tt),it=i(41),rt=r(it),ut=i(42),ft=r(ut),et=i(16),ot=r(et),st=i(43),ht=r(st),ct=[!1,"center","right","justify"],lt=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],at=[!1,"serif","monospace"],vt=["1","2","3",!1],yt=["small",!1,"large","huge"],a=function(n){function t(n,i){e(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n,i)),u=function t(i){if(!document.body.contains(n.root))return document.body.removeEventListener("click",t);null==r.tooltip||r.tooltip.root.contains(i.target)||document.activeElement===r.tooltip.textbox||r.quill.hasFocus()||r.tooltip.hide();null!=r.pickers&&r.pickers.forEach(function(n){n.container.contains(i.target)||n.close()})};return n.emitter.listenDOM("click",document.body,u),r}return s(t,n),h(t,[{key:"addModule",value:function(n){var i=p(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addModule",this).call(this,n);return"toolbar"===n&&this.extendToolbar(i),i}},{key:"buildButtons",value:function(n,t){n.forEach(function(n){(n.getAttribute("class")||"").split(/\s+/).forEach(function(i){if(i.startsWith("ql-")&&(i=i.slice(3),null!=t[i]))if("direction"===i)n.innerHTML=t[i][""]+t[i].rtl;else if("string"==typeof t[i])n.innerHTML=t[i];else{var r=n.value||"";null!=r&&t[i][r]&&(n.innerHTML=t[i][r])}})})}},{key:"buildPickers",value:function(n,t){var r=this,i;this.pickers=n.map(function(n){if(n.classList.contains("ql-align"))return null==n.querySelector("option")&&f(n,ct),new ft.default(n,t.align);if(n.classList.contains("ql-background")||n.classList.contains("ql-color")){var i=n.classList.contains("ql-background")?"background":"color";return null==n.querySelector("option")&&f(n,lt,"background"===i?"#ffffff":"#000000"),new rt.default(n,t[i])}return null==n.querySelector("option")&&(n.classList.contains("ql-font")?f(n,at):n.classList.contains("ql-header")?f(n,vt):n.classList.contains("ql-size")&&f(n,yt)),new ot.default(n)});i=function(){r.pickers.forEach(function(n){n.update()})};this.quill.on(u.default.events.EDITOR_CHANGE,i)}}]),t}(l.default);a.DEFAULTS=b.default(!0,{},l.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var t=this,n=this.container.querySelector("input.ql-image[type=file]");null==n&&(n=document.createElement("input"),n.setAttribute("type","file"),n.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),n.classList.add("ql-image"),n.addEventListener("change",function(){if(null!=n.files&&null!=n.files[0]){var i=new FileReader;i.onload=function(i){var r=t.quill.getSelection(!0);t.quill.updateContents((new d.default).retain(r.index).delete(r.length).insert({image:i.target.result}),u.default.sources.USER);t.quill.setSelection(r.index+1,u.default.sources.SILENT);n.value=""};i.readAsDataURL(n.files[0])}}),this.container.appendChild(n));n.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});v=function(n){function t(n,i){e(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n,i));return r.textbox=r.root.querySelector('input[type="text"]'),r.listen(),r}return s(t,n),h(t,[{key:"listen",value:function(){var n=this;this.textbox.addEventListener("keydown",function(t){c.default.match(t,"enter")?(n.save(),t.preventDefault()):c.default.match(t,"escape")&&(n.cancel(),t.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden");this.root.classList.add("ql-editing");null!=t?this.textbox.value=t:n!==this.root.getAttribute("data-mode")&&(this.textbox.value="");this.position(this.quill.getBounds(this.quill.selection.savedRange));this.textbox.select();this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+n)||"");this.root.setAttribute("data-mode",n)}},{key:"restoreFocus",value:function(){var n=this.quill.scrollingContainer.scrollTop;this.quill.focus();this.quill.scrollingContainer.scrollTop=n}},{key:"save",value:function(){var n=this.textbox.value,r,t,i;switch(this.root.getAttribute("data-mode")){case"link":r=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",n,u.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",n,u.default.sources.USER));this.quill.root.scrollTop=r;break;case"video":n=y(n);case"formula":if(!n)break;t=this.quill.getSelection(!0);null!=t&&(i=t.index+t.length,this.quill.insertEmbed(i,this.root.getAttribute("data-mode"),n,u.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(i+1," ",u.default.sources.USER),this.quill.setSelection(i+2,u.default.sources.USER))}this.textbox.value="";this.hide()}}]),t}(ht.default);t.BaseTooltip=v;t.default=a},function(n,t,i){function r(n){return n&&n.__esModule?n:{"default":n}}Object.defineProperty(t,"__esModule",{value:!0});var v=i(46),f=r(v),e=i(34),u=i(36),y=i(62),p=i(63),w=r(p),b=i(64),k=r(b),l=i(65),d=r(l),o=i(35),s=i(24),h=i(37),c=i(38),g=i(39),nt=r(g),tt=i(66),it=r(tt),rt=i(15),ut=r(rt),ft=i(67),et=r(ft),ot=i(68),st=r(ot),ht=i(69),ct=r(ht),lt=i(70),at=r(lt),vt=i(71),yt=r(vt),a=i(13),pt=r(a),wt=i(72),bt=r(wt),kt=i(73),dt=r(kt),gt=i(74),ni=r(gt),ti=i(26),ii=r(ti),ri=i(16),ui=r(ri),fi=i(41),ei=r(fi),oi=i(42),si=r(oi),hi=i(43),ci=r(hi),li=i(107),ai=r(li),vi=i(108),yi=r(vi);f.default.register({"attributors/attribute/direction":u.DirectionAttribute,"attributors/class/align":e.AlignClass,"attributors/class/background":o.BackgroundClass,"attributors/class/color":s.ColorClass,"attributors/class/direction":u.DirectionClass,"attributors/class/font":h.FontClass,"attributors/class/size":c.SizeClass,"attributors/style/align":e.AlignStyle,"attributors/style/background":o.BackgroundStyle,"attributors/style/color":s.ColorStyle,"attributors/style/direction":u.DirectionStyle,"attributors/style/font":h.FontStyle,"attributors/style/size":c.SizeStyle},!0);f.default.register({"formats/align":e.AlignClass,"formats/direction":u.DirectionClass,"formats/indent":y.IndentClass,"formats/background":o.BackgroundStyle,"formats/color":s.ColorStyle,"formats/font":h.FontClass,"formats/size":c.SizeClass,"formats/blockquote":w.default,"formats/code-block":pt.default,"formats/header":k.default,"formats/list":d.default,"formats/bold":nt.default,"formats/code":a.Code,"formats/italic":it.default,"formats/link":ut.default,"formats/script":et.default,"formats/strike":st.default,"formats/underline":ct.default,"formats/image":at.default,"formats/video":yt.default,"formats/list/item":l.ListItem,"modules/formula":bt.default,"modules/syntax":dt.default,"modules/toolbar":ni.default,"themes/bubble":ai.default,"themes/snow":yi.default,"ui/icons":ii.default,"ui/picker":ui.default,"ui/icon-picker":si.default,"ui/color-picker":ei.default,"ui/tooltip":ci.default},!0);t.default=f.default},function(n,t,i){function r(n){return n&&n.__esModule?n:{"default":n}}Object.defineProperty(t,"__esModule",{value:!0});var a=i(0),v=r(a),y=i(6),u=r(y),f=i(3),e=r(f),p=i(14),o=r(p),w=i(23),b=r(w),k=i(31),s=r(k),d=i(33),g=r(d),nt=i(5),h=r(nt),tt=i(59),c=r(tt),it=i(8),l=r(it),rt=i(60),ut=r(rt),ft=i(61),et=r(ft),ot=i(25),st=r(ot);u.default.register({"blots/block":e.default,"blots/block/embed":f.BlockEmbed,"blots/break":o.default,"blots/container":b.default,"blots/cursor":s.default,"blots/embed":g.default,"blots/inline":h.default,"blots/scroll":c.default,"blots/text":l.default,"modules/clipboard":ut.default,"modules/history":et.default,"modules/keyboard":st.default});v.default.register(e.default,o.default,s.default,h.default,c.default,l.default);t.default=u.default},function(n,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(){this.head=this.tail=null;this.length=0}return n.prototype.append=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];this.insertBefore(n[0],null);n.length>1&&this.append.apply(this,n.slice(1))},n.prototype.contains=function(n){for(var t,i=this.iterator();t=i();)if(t===n)return!0;return!1},n.prototype.insertBefore=function(n,t){n&&(n.next=t,null!=t?(n.prev=t.prev,null!=t.prev&&(t.prev.next=n),t.prev=n,t===this.head&&(this.head=n)):null!=this.tail?(this.tail.next=n,n.prev=this.tail,this.tail=n):(n.prev=null,this.head=this.tail=n),this.length+=1)},n.prototype.offset=function(n){for(var i=0,t=this.head;null!=t;){if(t===n)return i;i+=t.length();t=t.next}return-1},n.prototype.remove=function(n){this.contains(n)&&(null!=n.prev&&(n.prev.next=n.next),null!=n.next&&(n.next.prev=n.prev),n===this.head&&(this.head=n.next),n===this.tail&&(this.tail=n.prev),this.length-=1)},n.prototype.iterator=function(n){return void 0===n&&(n=this.head),function(){var t=n;return null!=n&&(n=n.next),t}},n.prototype.find=function(n,t){var i,u,r;for(void 0===t&&(t=!1),u=this.iterator();i=u();){if(r=i.length(),n<r||t&&n===r&&(null==i.next||0!==i.next.length()))return[i,n];n-=r}return[null,0]},n.prototype.forEach=function(n){for(var t,i=this.iterator();t=i();)n(t)},n.prototype.forEachAt=function(n,t,i){var f;if(!(t<=0))for(var u,e=this.find(n),o=e[0],s=e[1],r=n-s,h=this.iterator(o);(u=h())&&r<n+t;)f=u.length(),n>r?i(u,n-r,Math.min(t,r+f-n)):i(u,0,Math.min(f,n+t-r)),r+=f},n.prototype.map=function(n){return this.reduce(function(t,i){return t.push(n(i)),t},[])},n.prototype.reduce=function(n,t){for(var i,r=this.iterator();i=r();)t=n(t,i);return t},n}();t.default=i},function(n,t,i){var f=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var u=i(17),r=i(1),e={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},o=function(n){function t(t){var i=n.call(this,t)||this;return i.scroll=i,i.observer=new MutationObserver(function(n){i.update(n)}),i.observer.observe(i.domNode,e),i.attach(),i}return f(t,n),t.prototype.detach=function(){n.prototype.detach.call(this);this.observer.disconnect()},t.prototype.deleteAt=function(t,i){this.update();0===t&&i===this.length()?this.children.forEach(function(n){n.remove()}):n.prototype.deleteAt.call(this,t,i)},t.prototype.formatAt=function(t,i,r,u){this.update();n.prototype.formatAt.call(this,t,i,r,u)},t.prototype.insertAt=function(t,i,r){this.update();n.prototype.insertAt.call(this,t,i,r)},t.prototype.optimize=function(t,i){var c=this,f;for(void 0===t&&(t=[]),void 0===i&&(i={}),n.prototype.optimize.call(this,i),f=[].slice.call(this.observer.takeRecords());f.length>0;)t.push(f.pop());for(var e=function e(n,t){void 0===t&&(t=!0);null!=n&&n!==c&&null!=n.domNode.parentNode&&(null==n.domNode[r.DATA_KEY].mutations&&(n.domNode[r.DATA_KEY].mutations=[]),t&&e(n.parent))},s=function s(n){null!=n.domNode[r.DATA_KEY]&&null!=n.domNode[r.DATA_KEY].mutations&&(n instanceof u.default&&n.children.forEach(s),n.optimize(i))},o=t,h=0;o.length>0;h+=1){if(h>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(o.forEach(function(n){var t=r.find(n.target,!0);null!=t&&(t.domNode===n.target&&("childList"===n.type?(e(r.find(n.previousSibling,!1)),[].forEach.call(n.addedNodes,function(n){var t=r.find(n,!1);e(t,!1);t instanceof u.default&&t.children.forEach(function(n){e(n,!1)})})):"attributes"===n.type&&e(t.prev)),e(t))}),this.children.forEach(s),o=[].slice.call(this.observer.takeRecords()),f=o.slice();f.length>0;)t.push(f.pop())}},t.prototype.update=function(t,i){var u=this;void 0===i&&(i={});t=t||this.observer.takeRecords();t.map(function(n){var t=r.find(n.target,!0);return null==t?null:null==t.domNode[r.DATA_KEY].mutations?(t.domNode[r.DATA_KEY].mutations=[n],t):(t.domNode[r.DATA_KEY].mutations.push(n),null)}).forEach(function(n){null!=n&&n!==u&&null!=n.domNode[r.DATA_KEY]&&n.update(n.domNode[r.DATA_KEY].mutations||[],i)});null!=this.domNode[r.DATA_KEY].mutations&&n.prototype.update.call(this,this.domNode[r.DATA_KEY].mutations,i);this.optimize(t,i)},t.blotName="scroll",t.defaultChild="block",t.scope=r.Scope.BLOCK_BLOT,t.tagName="DIV",t}(u.default);t.default=o},function(n,t,i){function f(n,t){if(Object.keys(n).length!==Object.keys(t).length)return!1;for(var i in n)if(n[i]!==t[i])return!1;return!0}var e=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var u=i(18),r=i(1),o=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return e(t,n),t.formats=function(i){if(i.tagName!==t.tagName)return n.formats.call(this,i)},t.prototype.format=function(i,r){var f=this;i!==this.statics.blotName||r?n.prototype.format.call(this,i,r):(this.children.forEach(function(n){n instanceof u.default||(n=n.wrap(t.blotName,!0));f.attributes.copy(n)}),this.unwrap())},t.prototype.formatAt=function(t,i,u,f){null!=this.formats()[u]||r.query(u,r.Scope.ATTRIBUTE)?this.isolate(t,i).format(u,f):n.prototype.formatAt.call(this,t,i,u,f)},t.prototype.optimize=function(i){var u,r;if(n.prototype.optimize.call(this,i),u=this.formats(),0===Object.keys(u).length)return this.unwrap();r=this.next;r instanceof t&&r.prev===this&&f(u,r.formats())&&(r.moveChildren(this),r.remove())},t.blotName="inline",t.scope=r.Scope.INLINE_BLOT,t.tagName="SPAN",t}(u.default);t.default=o},function(n,t,i){var u=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var f=i(18),r=i(1),e=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return u(t,n),t.formats=function(i){var u=r.query(t.blotName).tagName;if(i.tagName!==u)return n.formats.call(this,i)},t.prototype.format=function(i,u){null!=r.query(i,r.Scope.BLOCK)&&(i!==this.statics.blotName||u?n.prototype.format.call(this,i,u):this.replaceWith(t.blotName))},t.prototype.formatAt=function(t,i,u,f){null!=r.query(u,r.Scope.BLOCK)?this.format(u,f):n.prototype.formatAt.call(this,t,i,u,f)},t.prototype.insertAt=function(t,i,u){if(null==u||null!=r.query(i,r.Scope.INLINE))n.prototype.insertAt.call(this,t,i,u);else{var f=this.split(t),e=r.create(i,u);f.parent.insertBefore(e,f)}},t.prototype.update=function(t,i){navigator.userAgent.match(/Trident/)?this.build():n.prototype.update.call(this,t,i)},t.blotName="block",t.scope=r.Scope.BLOCK_BLOT,t.tagName="P",t}(f.default);t.default=e},function(n,t,i){var f=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),r,u;Object.defineProperty(t,"__esModule",{value:!0});r=i(19);u=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return f(t,n),t.formats=function(){},t.prototype.format=function(t,i){n.prototype.formatAt.call(this,0,this.length(),t,i)},t.prototype.formatAt=function(t,i,r,u){0===t&&i===this.length()?this.format(r,u):n.prototype.formatAt.call(this,t,i,r,u)},t.prototype.formats=function(){return this.statics.formats(this.domNode)},t}(r.default);t.default=u},function(n,t,i){var u=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var f=i(19),r=i(1),e=function(n){function t(t){var i=n.call(this,t)||this;return i.text=i.statics.value(i.domNode),i}return u(t,n),t.create=function(n){return document.createTextNode(n)},t.value=function(n){var t=n.data;return t.normalize&&(t=t.normalize()),t},t.prototype.deleteAt=function(n,t){this.domNode.data=this.text=this.text.slice(0,n)+this.text.slice(n+t)},t.prototype.index=function(n,t){return this.domNode===n?t:-1},t.prototype.insertAt=function(t,i,r){null==r?(this.text=this.text.slice(0,t)+i+this.text.slice(t),this.domNode.data=this.text):n.prototype.insertAt.call(this,t,i,r)},t.prototype.length=function(){return this.text.length},t.prototype.optimize=function(i){n.prototype.optimize.call(this,i);this.text=this.statics.value(this.domNode);0===this.text.length?this.remove():this.next instanceof t&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},t.prototype.position=function(n,t){return void 0===t&&(t=!1),[this.domNode,n]},t.prototype.split=function(n,t){if(void 0===t&&(t=!1),!t){if(0===n)return this;if(n===this.length())return this.next}var i=r.create(this.domNode.splitText(n));return this.parent.insertBefore(i,this.next),this.text=this.statics.value(this.domNode),i},t.prototype.update=function(n){var t=this;n.some(function(n){return"characterData"===n.type&&n.target===t.domNode})&&(this.text=this.statics.value(this.domNode))},t.prototype.value=function(){return this.text},t.blotName="text",t.scope=r.Scope.INLINE_BLOT,t}(f.default);t.default=e},function(){var n=document.createElement("div"),t;(n.classList.toggle("test-class",!1),n.classList.contains("test-class"))&&(t=DOMTokenList.prototype.toggle,DOMTokenList.prototype.toggle=function(n,i){return arguments.length>1&&!this.contains(n)==!i?i:t.call(this,n)});String.prototype.startsWith||(String.prototype.startsWith=function(n,t){return t=t||0,this.substr(t,n.length)===n});String.prototype.endsWith||(String.prototype.endsWith=function(n,t){var i=this.toString(),r;return("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>i.length)&&(t=i.length),t-=n.length,r=i.indexOf(n,t),-1!==r&&r===t});Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(n){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof n)throw new TypeError("predicate must be a function");for(var i,r=Object(this),u=r.length>>>0,f=arguments[1],t=0;t<u;t++)if(i=r[t],n.call(f,i,t,r))return i}});document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1);document.execCommand("autoUrlDetect",!1,!1)})},function(n){function u(n,i,r){var u,s,c,f;return n==i?n?[[t,n]]:[]:((r<0||n.length<r)&&(r=null),u=e(n,i),s=n.substring(0,u),n=n.substring(u),i=i.substring(u),u=o(n,i),c=n.substring(n.length-u),n=n.substring(0,n.length-u),i=i.substring(0,i.length-u),f=l(n,i),s&&f.unshift([t,s]),c&&f.push([t,c]),h(f),null!=r&&(f=p(f,r)),f=w(f))}function l(n,f){var o,e;if(!n)return[[r,f]];if(!f)return[[i,n]];var h=n.length>f.length?n:f,s=n.length>f.length?f:n,c=h.indexOf(s);if(-1!=c)return o=[[r,h.substring(0,c)],[t,s],[r,h.substring(c+s.length)]],n.length>f.length&&(o[0][0]=o[2][0]=i),o;if(1==s.length)return[[i,n],[r,f]];if(e=v(n,f),e){var l=e[0],y=e[1],p=e[2],w=e[3],b=e[4],k=u(l,p),d=u(y,w);return k.concat([[t,b]],d)}return a(n,f)}function a(n,t){for(var v,p,e,o,d,f,u,y,c=n.length,w=t.length,nt=Math.ceil((c+w)/2),b=nt,k=2*nt,l=new Array(k),a=new Array(k),g=0;g<k;g++)l[g]=-1,a[g]=-1;l[b+1]=0;a[b+1]=0;for(var tt=c-w,it=tt%2!=0,rt=0,ut=0,ft=0,et=0,h=0;h<nt;h++){for(v=-h+rt;v<=h-ut;v+=2){for(f=b+v,u=v==-h||v!=h&&l[f-1]<l[f+1]?l[f+1]:l[f-1]+1,y=u-v;u<c&&y<w&&n.charAt(u)==t.charAt(y);)u++,y++;if(l[f]=u,u>c)ut+=2;else if(y>w)rt+=2;else if(it&&(o=b+tt-v,o>=0&&o<k&&-1!=a[o]&&(e=c-a[o],u>=e)))return s(n,t,u,y)}for(p=-h+ft;p<=h-et;p+=2){for(o=b+p,e=p==-h||p!=h&&a[o-1]<a[o+1]?a[o+1]:a[o-1]+1,d=e-p;e<c&&d<w&&n.charAt(c-e-1)==t.charAt(w-d-1);)e++,d++;if(a[o]=e,e>c)et+=2;else if(d>w)ft+=2;else if(!it&&(f=b+tt-p,f>=0&&f<k&&-1!=l[f]&&(u=l[f],y=b+u-f,e=c-e,u>=e)))return s(n,t,u,y)}}return[[i,n],[r,t]]}function s(n,t,i,r){var f=n.substring(0,i),e=t.substring(0,r),o=n.substring(i),s=t.substring(r),h=u(f,e),c=u(o,s);return h.concat(c)}function e(n,t){if(!n||!t||n.charAt(0)!=t.charAt(0))return 0;for(var r=0,u=Math.min(n.length,t.length),i=u,f=0;r<i;)n.substring(f,i)==t.substring(f,i)?(r=i,f=r):u=i,i=Math.floor((u-r)/2+r);return i}function o(n,t){if(!n||!t||n.charAt(n.length-1)!=t.charAt(t.length-1))return 0;for(var r=0,u=Math.min(n.length,t.length),i=u,f=0;r<i;)n.substring(n.length-i,n.length-f)==t.substring(t.length-i,t.length-f)?(r=i,f=r):u=i,i=Math.floor((u-r)/2+r);return i}function v(n,t){function v(n,t,i){for(var u,f,h,c,l,a,v=n.substring(i,i+Math.floor(n.length/4)),r=-1,s="";-1!=(r=t.indexOf(v,r+1));)u=e(n.substring(i),t.substring(r)),f=o(n.substring(0,i),t.substring(0,r)),s.length<f+u&&(s=t.substring(r-f,r)+t.substring(r,r+u),h=n.substring(0,i-f),c=n.substring(i+u),l=t.substring(0,r-f),a=t.substring(r+u));return 2*s.length>=n.length?[h,c,l,a,s]:null}var r=n.length>t.length?n:t,s=n.length>t.length?t:n,i,u,f,h,c,l,a;return r.length<4||2*s.length<r.length?null:(u=v(r,s,Math.ceil(r.length/4)),f=v(r,s,Math.ceil(r.length/2)),!u&&!f)?null:(i=f?u&&u[4].length>f[4].length?u:f:u,n.length>t.length?(h=i[0],c=i[1],l=i[2],a=i[3]):(l=i[0],a=i[1],h=i[2],c=i[3]),[h,c,l,a,i[4]])}function h(n){var v;n.push([t,""]);for(var a,u=0,f=0,s=0,l="",c="";u<n.length;)switch(n[u][0]){case r:s++;c+=n[u][1];u++;break;case i:f++;l+=n[u][1];u++;break;case t:f+s>1?(0!==f&&0!==s&&(a=e(c,l),0!==a&&(u-f-s>0&&n[u-f-s-1][0]==t?n[u-f-s-1][1]+=c.substring(0,a):(n.splice(0,0,[t,c.substring(0,a)]),u++),c=c.substring(a),l=l.substring(a)),0!==(a=o(c,l))&&(n[u][1]=c.substring(c.length-a)+n[u][1],c=c.substring(0,c.length-a),l=l.substring(0,l.length-a))),0===f?n.splice(u-s,f+s,[r,c]):0===s?n.splice(u-f,f+s,[i,l]):n.splice(u-f-s,f+s,[i,l],[r,c]),u=u-f-s+(f?1:0)+(s?1:0)+1):0!==u&&n[u-1][0]==t?(n[u-1][1]+=n[u][1],n.splice(u,1)):u++;s=0;f=0;l="";c=""}for(""===n[n.length-1][1]&&n.pop(),v=!1,u=1;u<n.length-1;)n[u-1][0]==t&&n[u+1][0]==t&&(n[u][1].substring(n[u][1].length-n[u-1][1].length)==n[u-1][1]?(n[u][1]=n[u-1][1]+n[u][1].substring(0,n[u][1].length-n[u-1][1].length),n[u+1][1]=n[u-1][1]+n[u+1][1],n.splice(u-1,1),v=!0):n[u][1].substring(0,n[u+1][1].length)==n[u+1][1]&&(n[u-1][1]+=n[u+1][1],n[u][1]=n[u][1].substring(n[u+1][1].length)+n[u+1][1],n.splice(u+1,1),v=!0)),u++;v&&h(n)}function y(n,r){var e,f,u,o;if(0===r)return[t,n];for(e=0,f=0;f<n.length;f++)if(u=n[f],u[0]===i||u[0]===t){if(o=e+u[1].length,r===o)return[f+1,n];if(r<o){n=n.slice();var s=r-e,h=[u[0],u[1].slice(0,s)],c=[u[0],u[1].slice(s)];return n.splice(f,1,h,c),[f+1,n]}e=o}throw new Error("cursor_pos is out of bounds!");}function p(n,i){var s=y(n,i),f=s[1],e=s[0],r=f[e],u=f[e+1],o;return null==r?n:r[0]!==t?n:null!=u&&r[1]+u[1]===u[1]+r[1]?(f.splice(e,2,u,r),c(f,e,2)):null!=u&&0===u[1].indexOf(r[1])?(f.splice(e,2,[u[0],r[1]],[0,r[1]]),o=u[1].slice(r[1].length),o.length>0&&f.splice(e+2,0,[u[0],o]),c(f,e,3)):n}function w(n){for(var f,e=!1,o=function(n){return n.charCodeAt(0)>=56320&&n.charCodeAt(0)<=57343},u=2;u<n.length;u+=1)n[u-2][0]===t&&function(n){return n.charCodeAt(n.length-1)>=55296&&n.charCodeAt(n.length-1)<=56319}(n[u-2][1])&&n[u-1][0]===i&&o(n[u-1][1])&&n[u][0]===r&&o(n[u][1])&&(e=!0,n[u-1][1]=n[u-2][1].slice(-1)+n[u-1][1],n[u][1]=n[u-2][1].slice(-1)+n[u][1],n[u-2][1]=n[u-2][1].slice(0,-1));if(!e)return n;for(f=[],u=0;u<n.length;u+=1)n[u][1].length>0&&f.push(n[u]);return f}function c(n,t,i){for(var u,f,r=t+i-1;r>=0&&r>=t-1;r--)r+1<n.length&&(u=n[r],f=n[r+1],u[0]===f[1]&&n.splice(r,2,[u[0],u[1]+f[1]]));return n}var i=-1,r=1,t=0,f=u;f.INSERT=r;f.DELETE=i;f.EQUAL=t;n.exports=f},function(n,t){function i(n){var t=[];for(var i in n)t.push(i);return t}t=n.exports="function"==typeof Object.keys?Object.keys:i;t.shim=i},function(n,t){function i(n){return"[object Arguments]"==Object.prototype.toString.call(n)}function r(n){return n&&"object"==(typeof n=="undefined"?"undefined":_typeof(n))&&"number"==typeof n.length&&Object.prototype.hasOwnProperty.call(n,"callee")&&!Object.prototype.propertyIsEnumerable.call(n,"callee")||!1}var u="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();t=n.exports=u?i:r;t.supported=i;t.unsupported=r},function(n,t,i){function u(n){return n&&n.__esModule?n:{"default":n}}function a(n,t,i){return t in n?Object.defineProperty(n,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[t]=i,n}function v(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function y(n,t){return Object.keys(t).reduce(function(i,r){return null==n[r]?i:(t[r]===n[r]?i[r]=t[r]:Array.isArray(t[r])?t[r].indexOf(n[r])<0&&(i[r]=t[r].concat([n[r]])):i[r]=[t[r],n[r]],i)},{})}function p(n){return n.reduce(function(n,t){var i,r;return 1===t.insert?(i=o.default(t.attributes),delete i.image,n.insert({image:t.attributes.image},i)):(null==t.attributes||!0!==t.attributes.list&&!0!==t.attributes.bullet||(t=o.default(t),t.attributes.list?t.attributes.list="ordered":(t.attributes.list="bullet",delete t.attributes.bullet)),"string"==typeof t.insert)?(r=t.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),n.insert(r,t.attributes)):n.push(t)},new r.default)}Object.defineProperty(t,"__esModule",{value:!0});var w="function"==typeof Symbol&&"symbol"==_typeof(Symbol.iterator)?function(n){return typeof n=="undefined"?"undefined":_typeof(n)}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n=="undefined"?"undefined":_typeof(n)},s=function(){function n(n,t){var r=[],u=!0,f=!1,e=void 0,o,i;try{for(i=n[Symbol.iterator]();!(u=(o=i.next()).done)&&(r.push(o.value),!t||r.length!==t);u=!0);}catch(n){f=!0;e=n}finally{try{!u&&i.return&&i.return()}finally{if(f)throw e;}}return r}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return n(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),b=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),k=i(4),r=u(k),d=i(20),g=u(d),nt=i(0),e=u(nt),tt=i(13),l=u(tt),it=i(31),rt=u(it),f=i(3),c=u(f),ut=i(14),ft=u(ut),et=i(21),o=u(et),ot=i(12),st=u(ot),ht=i(2),h=u(ht),ct=/^[ -~]*$/,lt=function(){function n(t){v(this,n);this.scroll=t;this.delta=this.getDelta()}return b(n,[{key:"applyDelta",value:function(n){var t=this,i=!1,r;return this.scroll.update(),r=this.scroll.length(),this.scroll.batchStart(),n=p(n),n.reduce(function(n,u){var v=u.retain||u.delete||u.insert.length||1,l=u.attributes||{},o,a;if(null!=u.insert){if("string"==typeof u.insert){o=u.insert;o.endsWith("\n")&&i&&(i=!1,o=o.slice(0,-1));n>=r&&!o.endsWith("\n")&&(i=!0);t.scroll.insertAt(n,o);var k=t.scroll.line(n),b=s(k,2),y=b[0],d=b[1],p=h.default({},f.bubbleFormats(y));if(y instanceof c.default){var nt=y.descendant(e.default.Leaf,d),tt=s(nt,1),it=tt[0];p=h.default(p,f.bubbleFormats(it))}l=g.default.attributes.diff(p,l)||{}}else if("object"===w(u.insert)){if(a=Object.keys(u.insert)[0],null==a)return n;t.scroll.insertAt(n,a,u.insert[a])}r+=v}return Object.keys(l).forEach(function(i){t.scroll.formatAt(n,v,i,l[i])}),n+v},0),n.reduce(function(n,i){return"number"==typeof i.delete?(t.scroll.deleteAt(n,i.delete),n):n+(i.retain||i.insert.length||1)},0),this.scroll.batchEnd(),this.update(n)}},{key:"deleteText",value:function(n,t){return this.scroll.deleteAt(n,t),this.update((new r.default).retain(n).delete(t))}},{key:"formatLine",value:function(n,t){var i=this,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(u).forEach(function(r){if(null==i.scroll.whitelist||i.scroll.whitelist[r]){var e=i.scroll.lines(n,Math.max(t,1)),f=t;e.forEach(function(t){var s=t.length(),e,o;t instanceof l.default?(e=n-t.offset(i.scroll),o=t.newlineIndex(e+f)-e+1,t.formatAt(e,o,r,u[r])):t.format(r,u[r]);f-=s})}}),this.scroll.optimize(),this.update((new r.default).retain(n).retain(t,o.default(u)))}},{key:"formatText",value:function(n,t){var u=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(i).forEach(function(r){u.scroll.formatAt(n,t,r,i[r])}),this.update((new r.default).retain(n).retain(t,o.default(i)))}},{key:"getContents",value:function(n,t){return this.delta.slice(n,n+t)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(n,t){return n.concat(t.delta())},new r.default)}},{key:"getFormat",value:function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=[],r=[],u;return 0===t?this.scroll.path(n).forEach(function(n){var u=s(n,1),t=u[0];t instanceof c.default?i.push(t):t instanceof e.default.Leaf&&r.push(t)}):(i=this.scroll.lines(n,t),r=this.scroll.descendants(e.default.Leaf,n,t)),u=[i,r].map(function(n){var t,i;if(0===n.length)return{};for(t=f.bubbleFormats(n.shift());Object.keys(t).length>0;){if(i=n.shift(),null==i)return t;t=y(f.bubbleFormats(i),t)}return t}),h.default.apply(h.default,u)}},{key:"getText",value:function(n,t){return this.getContents(n,t).filter(function(n){return"string"==typeof n.insert}).map(function(n){return n.insert}).join("")}},{key:"insertEmbed",value:function(n,t,i){return this.scroll.insertAt(n,t,i),this.update((new r.default).retain(n).insert(a({},t,i)))}},{key:"insertText",value:function(n,t){var u=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=t.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(n,t),Object.keys(i).forEach(function(r){u.scroll.formatAt(n,t.length,r,i[r])}),this.update((new r.default).retain(n).insert(t,o.default(i)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var n=this.scroll.children.head;return n.statics.blotName===c.default.blotName&&!(n.children.length>1)&&n.children.head instanceof ft.default}},{key:"removeFormat",value:function(n,t){var h=this.getText(n,t),c=this.scroll.line(n+t),e=s(c,2),i=e[0],u=e[1],f=0,o=new r.default;null!=i&&(f=i instanceof l.default?i.newlineIndex(u)-u+1:i.length()-u,o=i.delta().slice(u,u+f-1).insert("\n"));var a=this.getContents(n,t+f),v=a.diff((new r.default).insert(h).concat(o)),y=(new r.default).retain(n).concat(v);return this.applyDelta(y)}},{key:"update",value:function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=this.delta;if(1===t.length&&"characterData"===t[0].type&&t[0].target.data.match(ct)&&e.default.find(t[0].target)){var u=e.default.find(t[0].target),s=f.bubbleFormats(u),h=u.offset(this.scroll),c=t[0].oldValue.replace(rt.default.CONTENTS,""),l=(new r.default).insert(c),a=(new r.default).insert(u.value());n=(new r.default).retain(h).concat(l.diff(a,o)).reduce(function(n,t){return t.insert?n.insert(t.insert,s):n.push(t)},new r.default);this.delta=i.compose(n)}else this.delta=this.getDelta(),n&&st.default(i.compose(n),this.delta)||(n=i.diff(this.delta,o));return n}}]),n}();t.default=lt},function(n){function r(){}function u(n,t,i){this.fn=n;this.context=t;this.once=i||!1}function t(){this._events=new r;this._eventsCount=0}var f=Object.prototype.hasOwnProperty,i="~";Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(i=!1));t.prototype.eventNames=function(){var r,n,t=[];if(0===this._eventsCount)return t;for(n in r=this._events)f.call(r,n)&&t.push(i?n.slice(1):n);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(r)):t};t.prototype.listeners=function(n,t){var o=i?i+n:n,r=this._events[o];if(t)return!!r;if(!r)return[];if(r.fn)return[r.fn];for(var u=0,f=r.length,e=new Array(f);u<f;u++)e[u]=r[u].fn;return e};t.prototype.emit=function(n,t,r,u,f,e){var a=i?i+n:n,h,s,o,c,l,v;if(!this._events[a])return!1;if(o=this._events[a],c=arguments.length,o.fn){switch(o.once&&this.removeListener(n,o.fn,void 0,!0),c){case 1:return o.fn.call(o.context),!0;case 2:return o.fn.call(o.context,t),!0;case 3:return o.fn.call(o.context,t,r),!0;case 4:return o.fn.call(o.context,t,r,u),!0;case 5:return o.fn.call(o.context,t,r,u,f),!0;case 6:return o.fn.call(o.context,t,r,u,f,e),!0}for(s=1,h=new Array(c-1);s<c;s++)h[s-1]=arguments[s];o.fn.apply(o.context,h)}else for(v=o.length,s=0;s<v;s++)switch(o[s].once&&this.removeListener(n,o[s].fn,void 0,!0),c){case 1:o[s].fn.call(o[s].context);break;case 2:o[s].fn.call(o[s].context,t);break;case 3:o[s].fn.call(o[s].context,t,r);break;case 4:o[s].fn.call(o[s].context,t,r,u);break;default:if(!h)for(l=1,h=new Array(c-1);l<c;l++)h[l-1]=arguments[l];o[s].fn.apply(o[s].context,h)}return!0};t.prototype.on=function(n,t,r){var e=new u(t,r||this),f=i?i+n:n;return this._events[f]?this._events[f].fn?this._events[f]=[this._events[f],e]:this._events[f].push(e):(this._events[f]=e,this._eventsCount++),this};t.prototype.once=function(n,t,r){var e=new u(t,r||this,!0),f=i?i+n:n;return this._events[f]?this._events[f].fn?this._events[f]=[this._events[f],e]:this._events[f].push(e):(this._events[f]=e,this._eventsCount++),this};t.prototype.removeListener=function(n,t,u,f){var o=i?i+n:n,e;if(!this._events[o])return this;if(!t)return 0==--this._eventsCount?this._events=new r:delete this._events[o],this;if(e=this._events[o],e.fn)e.fn!==t||f&&!e.once||u&&e.context!==u||(0==--this._eventsCount?this._events=new r:delete this._events[o]);else{for(var s=0,h=[],c=e.length;s<c;s++)(e[s].fn!==t||f&&!e[s].once||u&&e[s].context!==u)&&h.push(e[s]);h.length?this._events[o]=1===h.length?h[0]:h:0==--this._eventsCount?this._events=new r:delete this._events[o]}return this};t.prototype.removeAllListeners=function(n){var t;return n?(t=i?i+n:n,this._events[t]&&(0==--this._eventsCount?this._events=new r:delete this._events[t])):(this._events=new r,this._eventsCount=0),this};t.prototype.off=t.prototype.removeListener;t.prototype.addListener=t.prototype.on;t.prototype.setMaxListeners=function(){return this};t.prefixed=i;t.EventEmitter=t;void 0!==n&&(n.exports=t)},function(n,t,i){function f(n){return n&&n.__esModule?n:{"default":n}}function v(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function y(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function p(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}function h(n){return n instanceof l.default||n instanceof o.BlockEmbed}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function n(n,t){var r=[],u=!0,f=!1,e=void 0,o,i;try{for(i=n[Symbol.iterator]();!(u=(o=i.next()).done)&&(r.push(o.value),!t||r.length!==t);u=!0);}catch(n){f=!0;e=n}finally{try{!u&&i.return&&i.return()}finally{if(f)throw e;}}return r}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return n(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),w=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),u=function n(t,i,r){var u,f,e;return(null===t&&(t=Function.prototype),u=Object.getOwnPropertyDescriptor(t,i),void 0===u)?(f=Object.getPrototypeOf(t),null===f?void 0:n(f,i,r)):"value"in u?u.value:(e=u.get,void 0!==e?e.call(r):void 0)},b=i(0),r=f(b),k=i(9),s=f(k),o=i(3),l=f(o),d=i(14),g=f(d),nt=i(13),a=f(nt),tt=i(23),it=f(tt),e=function(n){function t(n,i){v(this,t);var r=y(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n));return r.emitter=i.emitter,Array.isArray(i.whitelist)&&(r.whitelist=i.whitelist.reduce(function(n,t){return n[t]=!0,n},{})),r.domNode.addEventListener("DOMNodeInserted",function(){}),r.optimize(),r.enable(),r}return p(t,n),w(t,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1;this.optimize()}},{key:"deleteAt",value:function(n,i){var v=this.line(n),h=c(v,2),f=h[0],y=h[1],p=this.line(n+i),w=c(p,1),r=w[0],e,s,l;if(u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,n,i),null!=r&&f!==r&&y>0){if(f instanceof o.BlockEmbed||r instanceof o.BlockEmbed)return void this.optimize();if(f instanceof a.default){if(e=f.newlineIndex(f.length(),!0),e>-1&&(f=f.split(e+1))===r)return void this.optimize()}else r instanceof a.default&&(s=r.newlineIndex(0),s>-1&&r.split(s+1));l=r.children.head instanceof g.default?null:r.children.head;f.moveChildren(r,l);f.remove()}this.optimize()}},{key:"enable",value:function(){var n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",n)}},{key:"formatAt",value:function(n,i,r,f){(null==this.whitelist||this.whitelist[r])&&(u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,n,i,r,f),this.optimize())}},{key:"insertAt",value:function(n,i,f){var e,o;(null==f||null==this.whitelist||this.whitelist[i])&&(n>=this.length()?null==f||null==r.default.query(i,r.default.Scope.BLOCK)?(e=r.default.create(this.statics.defaultChild),this.appendChild(e),null==f&&i.endsWith("\n")&&(i=i.slice(0,-1)),e.insertAt(0,i,f)):(o=r.default.create(i,f),this.appendChild(o)):u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,n,i,f),this.optimize())}},{key:"insertBefore",value:function(n,i){if(n.statics.scope===r.default.Scope.INLINE_BLOT){var f=r.default.create(this.statics.defaultChild);f.appendChild(n);n=f}u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,n,i)}},{key:"leaf",value:function(n){return this.path(n).pop()||[null,-1]}},{key:"line",value:function(n){return n===this.length()?this.line(n-1):this.descendant(h,n)}},{key:"lines",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return function n(t,i,u){var f=[],e=u;return t.children.forEachAt(i,u,function(t,i,u){h(t)?f.push(t):t instanceof r.default.Container&&(f=f.concat(n(t,i,e)));e-=u}),f}(this,n,t)}},{key:"optimize",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,n,i),n.length>0&&this.emitter.emit(s.default.events.SCROLL_OPTIMIZE,n,i))}},{key:"path",value:function(n){return u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,n).slice(1)}},{key:"update",value:function(n){if(!0!==this.batch){var i=s.default.sources.USER;"string"==typeof n&&(i=n);Array.isArray(n)||(n=this.observer.takeRecords());n.length>0&&this.emitter.emit(s.default.events.SCROLL_BEFORE_UPDATE,i,n);u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"update",this).call(this,n.concat([]));n.length>0&&this.emitter.emit(s.default.events.SCROLL_UPDATE,i,n)}}}]),t}(r.default.Scroll);e.blotName="scroll";e.className="ql-editor";e.tagName="DIV";e.defaultChild="block";e.allowedChildren=[l.default,o.BlockEmbed,it.default];t.default=e},function(n,t,i){function f(n){return n&&n.__esModule?n:{"default":n}}function b(n,t,i){return t in n?Object.defineProperty(n,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[t]=i,n}function ft(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function et(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function ot(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}function h(n,t,i){return"object"===(void 0===t?"undefined":at(t))?Object.keys(t).reduce(function(n,i){return h(n,i,t[i])},n):n.reduce(function(n,r){return r.attributes&&r.attributes[t]?n.push(r):n.insert(r.insert,pt.default({},b({},t,i),r.attributes))},new r.default)}function e(n){return n.nodeType!==Node.ELEMENT_NODE?{}:n["__ql-computed-style"]||(n["__ql-computed-style"]=window.getComputedStyle(n))}function c(n,t){for(var u,i="",r=n.ops.length-1;r>=0&&i.length<t.length;--r){if(u=n.ops[r],"string"!=typeof u.insert)break;i=u.insert+i}return i.slice(-1*t.length)===t}function o(n){return 0!==n.childNodes.length&&["block","list-item"].indexOf(e(n).display)>-1}function k(n,t,i){return n.nodeType===n.TEXT_NODE?i.reduce(function(t,i){return i(n,t)},new r.default):n.nodeType===n.ELEMENT_NODE?[].reduce.call(n.childNodes||[],function(r,u){var f=k(u,t,i);return u.nodeType===n.ELEMENT_NODE&&(f=t.reduce(function(n,t){return t(u,n)},f),f=(u[a]||[]).reduce(function(n,t){return t(u,n)},f)),r.concat(f)},new r.default):new r.default}function l(n,t,i){return h(i,n,!0)}function d(n,t){var r=u.default.Attributor.Attribute.keys(n),f=u.default.Attributor.Class.keys(n),e=u.default.Attributor.Style.keys(n),i={};return r.concat(f).concat(e).forEach(function(t){var r=u.default.query(t,u.default.Scope.ATTRIBUTE);null!=r&&(i[r.attrName]=r.value(n),i[r.attrName])||(r=hi[t],null==r||r.attrName!==t&&r.keyName!==t||(i[r.attrName]=r.value(n)||void 0),null==(r=rt[t])||r.attrName!==t&&r.keyName!==t||(r=rt[t],i[r.attrName]=r.value(n)||void 0))}),Object.keys(i).length>0&&(t=h(t,i)),t}function g(n,t){var i=u.default.query(n),f,e;return null==i?t:(i.prototype instanceof u.default.Embed?(f={},e=i.value(n),null!=e&&(f[i.blotName]=e,t=(new r.default).insert(f,i.formats(n)))):"function"==typeof i.formats&&(t=h(t,i.blotName,i.formats(n))),t)}function st(n,t){return c(t,"\n")||t.insert("\n"),t}function ht(){return new r.default}function ct(n,t){var e=u.default.query(n),f,i;if(null==e||"list-item"!==e.blotName||!c(t,"\n"))return t;for(f=-1,i=n.parentNode;!i.classList.contains("ql-clipboard");)"list"===(u.default.query(i)||{}).blotName&&(f+=1),i=i.parentNode;return f<=0?t:t.compose((new r.default).retain(t.length()-1).retain(1,{indent:f}))}function v(n,t){return c(t,"\n")||(o(n)||t.length()>0&&n.nextSibling&&o(n.nextSibling))&&t.insert("\n"),t}function y(n,t){if(o(n)&&null!=n.nextElementSibling&&!c(t,"\n\n")){var i=n.offsetHeight+parseFloat(e(n).marginTop)+parseFloat(e(n).marginBottom);n.nextElementSibling.offsetTop>n.offsetTop+1.5*i&&t.insert("\n")}return t}function lt(n,t){var i={},u=n.style||{};return u.fontStyle&&"italic"===e(n).fontStyle&&(i.italic=!0),u.fontWeight&&(e(n).fontWeight.startsWith("bold")||parseInt(e(n).fontWeight)>=700)&&(i.bold=!0),Object.keys(i).length>0&&(t=h(t,i)),parseFloat(u.textIndent||0)>0&&(t=(new r.default).insert("\t").concat(t)),t}function nt(n,t){var i=n.data,r;return"O:P"===n.parentNode.tagName?t.insert(i.trim()):0===i.trim().length&&n.parentNode.classList.contains("ql-clipboard")?t:(e(n.parentNode).whiteSpace.startsWith("pre")||(r=function(n,t){return t=t.replace(/[^\u00a0]/g,""),t.length<1&&n?" ":t},i=i.replace(/\r\n/g," ").replace(/\n/g," "),i=i.replace(/\s\s+/g,r.bind(r,!0)),(null==n.previousSibling&&o(n.parentNode)||null!=n.previousSibling&&o(n.previousSibling))&&(i=i.replace(/^\s+/,r.bind(r,!1))),(null==n.nextSibling&&o(n.parentNode)||null!=n.nextSibling&&o(n.nextSibling))&&(i=i.replace(/\s+$/,r.bind(r,!1)))),t.insert(i))}Object.defineProperty(t,"__esModule",{value:!0});t.matchText=t.matchSpacing=t.matchNewline=t.matchBlot=t.matchAttributor=t.default=void 0;var at="function"==typeof Symbol&&"symbol"==_typeof(Symbol.iterator)?function(n){return typeof n=="undefined"?"undefined":_typeof(n)}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n=="undefined"?"undefined":_typeof(n)},p=function(){function n(n,t){var r=[],u=!0,f=!1,e=void 0,o,i;try{for(i=n[Symbol.iterator]();!(u=(o=i.next()).done)&&(r.push(o.value),!t||r.length!==t);u=!0);}catch(n){f=!0;e=n}finally{try{!u&&i.return&&i.return()}finally{if(f)throw e;}}return r}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return n(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),vt=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),yt=i(2),pt=f(yt),wt=i(4),r=f(wt),bt=i(0),u=f(bt),kt=i(6),s=f(kt),dt=i(10),gt=f(dt),ni=i(7),ti=f(ni),tt=i(34),ii=i(35),ri=i(13),w=f(ri),ui=i(24),it=i(36),fi=i(37),ei=i(38),oi=gt.default("quill:clipboard"),a="__ql-matcher",si=[[Node.TEXT_NODE,nt],[Node.TEXT_NODE,v],["br",st],[Node.ELEMENT_NODE,v],[Node.ELEMENT_NODE,g],[Node.ELEMENT_NODE,y],[Node.ELEMENT_NODE,d],[Node.ELEMENT_NODE,lt],["li",ct],["b",l.bind(l,"bold")],["i",l.bind(l,"italic")],["style",ht]],hi=[tt.AlignAttribute,it.DirectionAttribute].reduce(function(n,t){return n[t.keyName]=t,n},{}),rt=[tt.AlignStyle,ii.BackgroundStyle,ui.ColorStyle,it.DirectionStyle,fi.FontStyle,ei.SizeStyle].reduce(function(n,t){return n[t.keyName]=t,n},{}),ut=function(n){function t(n,i){ft(this,t);var r=et(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n,i));return r.quill.root.addEventListener("paste",r.onPaste.bind(r)),r.container=r.quill.addContainer("ql-clipboard"),r.container.setAttribute("contenteditable",!0),r.container.setAttribute("tabindex",-1),r.matchers=[],si.concat(r.options.matchers).forEach(function(n){var t=p(n,2),f=t[0],u=t[1];(i.matchVisual||u!==y)&&r.addMatcher(f,u)}),r}return ot(t,n),vt(t,[{key:"addMatcher",value:function(n,t){this.matchers.push([n,t])}},{key:"convert",value:function(n){var i,u;if("string"==typeof n)return this.container.innerHTML=n.replace(/\>\r?\n +\</g,"><"),this.convert();if(i=this.quill.getFormat(this.quill.selection.savedRange.index),i[w.default.blotName])return u=this.container.innerText,this.container.innerHTML="",(new r.default).insert(u,b({},w.default.blotName,i[w.default.blotName]));var e=this.prepareMatching(),f=p(e,2),o=f[0],s=f[1],t=k(this.container,o,s);return c(t,"\n")&&null==t.ops[t.ops.length-1].attributes&&(t=t.compose((new r.default).retain(t.length()-1).delete(1))),oi.log("convert",this.container.innerHTML,t),this.container.innerHTML="",t}},{key:"dangerouslyPasteHTML",value:function(n,t){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.default.sources.API,i;"string"==typeof n?(this.quill.setContents(this.convert(n),t),this.quill.setSelection(0,s.default.sources.SILENT)):(i=this.convert(t),this.quill.updateContents((new r.default).retain(n).concat(i),u),this.quill.setSelection(n+i.length(),s.default.sources.SILENT))}},{key:"onPaste",value:function(n){var t=this;if(!n.defaultPrevented&&this.quill.isEnabled()){var u=this.quill.getSelection(),i=(new r.default).retain(u.index),f=this.quill.scrollingContainer.scrollTop;this.container.focus();this.quill.selection.update(s.default.sources.SILENT);setTimeout(function(){i=i.concat(t.convert()).delete(u.length);t.quill.updateContents(i,s.default.sources.USER);t.quill.setSelection(i.length()-u.length,s.default.sources.SILENT);t.quill.scrollingContainer.scrollTop=f;t.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var i=this,n=[],t=[];return this.matchers.forEach(function(r){var f=p(r,2),e=f[0],u=f[1];switch(e){case Node.TEXT_NODE:t.push(u);break;case Node.ELEMENT_NODE:n.push(u);break;default:[].forEach.call(i.container.querySelectorAll(e),function(n){n[a]=n[a]||[];n[a].push(u)})}}),[n,t]}}]),t}(ti.default);ut.DEFAULTS={matchers:[],matchVisual:!0};t.default=ut;t.matchAttributor=d;t.matchBlot=g;t.matchNewline=v;t.matchSpacing=y;t.matchText=nt},function(n,t,i){function u(n){return n&&n.__esModule?n:{"default":n}}function s(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function h(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function c(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}function l(n){var t=n.ops[n.ops.length-1];return null!=t&&(null!=t.insert?"string"==typeof t.insert&&t.insert.endsWith("\n"):null!=t.attributes&&Object.keys(t.attributes).some(function(n){return null!=e.default.query(n,e.default.Scope.BLOCK)}))}function f(n){var i=n.reduce(function(n,t){return n+(t.delete||0)},0),t=n.length()-i;return l(n)&&(t-=1),t}Object.defineProperty(t,"__esModule",{value:!0});t.getLastChangeIndex=t.default=void 0;var a=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),v=i(0),e=u(v),y=i(6),r=u(y),p=i(7),w=u(p),o=function(n){function t(n,i){s(this,t);var u=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n,i));return u.lastRecorded=0,u.ignoreChange=!1,u.clear(),u.quill.on(r.default.events.EDITOR_CHANGE,function(n,t,i,f){n!==r.default.events.TEXT_CHANGE||u.ignoreChange||(u.options.userOnly&&f!==r.default.sources.USER?u.transform(t):u.record(t,i))}),u.quill.keyboard.addBinding({key:"Z",shortKey:!0},u.undo.bind(u)),u.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},u.redo.bind(u)),/Win/i.test(navigator.platform)&&u.quill.keyboard.addBinding({key:"Y",shortKey:!0},u.redo.bind(u)),u}return c(t,n),a(t,[{key:"change",value:function(n,t){var i,u;0!==this.stack[n].length&&(i=this.stack[n].pop(),this.stack[t].push(i),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(i[n],r.default.sources.USER),this.ignoreChange=!1,u=f(i[n]),this.quill.setSelection(u))}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(n,t){var i,r,u;0!==n.ops.length&&(this.stack.redo=[],i=this.quill.getContents().diff(t),r=Date.now(),this.lastRecorded+this.options.delay>r&&this.stack.undo.length>0?(u=this.stack.undo.pop(),i=i.compose(u.undo),n=u.redo.compose(n)):this.lastRecorded=r,this.stack.undo.push({redo:n,undo:i}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(n){this.stack.undo.forEach(function(t){t.undo=n.transform(t.undo,!0);t.redo=n.transform(t.redo,!0)});this.stack.redo.forEach(function(t){t.undo=n.transform(t.undo,!0);t.redo=n.transform(t.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),t}(w.default);o.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};t.default=o;t.getLastChangeIndex=f},function(n,t,i){function f(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function e(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function o(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});t.IndentClass=void 0;var s=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),r=function n(t,i,r){var u,f,e;return(null===t&&(t=Function.prototype),u=Object.getOwnPropertyDescriptor(t,i),void 0===u)?(f=Object.getPrototypeOf(t),null===f?void 0:n(f,i,r)):"value"in u?u.value:(e=u.get,void 0!==e?e.call(r):void 0)},h=i(0),u=function(n){return n&&n.__esModule?n:{"default":n}}(h),c=function(n){function t(){return f(this,t),e(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,n),s(t,[{key:"add",value:function(n,i){if("+1"===i||"-1"===i){var u=this.value(n)||0;i="+1"===i?u+1:u-1}return 0===i?(this.remove(n),!0):r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"add",this).call(this,n,i)}},{key:"canAdd",value:function(n,i){return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,n,i)||r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,n,parseInt(i))}},{key:"value",value:function(n){return parseInt(r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,n))||void 0}}]),t}(u.default.Attributor.Class),l=new c("indent","ql-indent",{scope:u.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});t.IndentClass=l},function(n,t,i){function u(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function f(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function e(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=i(3),s=function(n){return n&&n.__esModule?n:{"default":n}}(o),r=function(n){function t(){return u(this,t),f(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return e(t,n),t}(s.default);r.blotName="blockquote";r.tagName="blockquote";t.default=r},function(n,t,i){function u(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function f(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function e(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),s=i(3),h=function(n){return n&&n.__esModule?n:{"default":n}}(s),r=function(n){function t(){return u(this,t),f(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return e(t,n),o(t,null,[{key:"formats",value:function(n){return this.tagName.indexOf(n.tagName)+1}}]),t}(h.default);r.blotName="header";r.tagName=["H1","H2","H3","H4","H5","H6"];t.default=r},function(n,t,i){function o(n){return n&&n.__esModule?n:{"default":n}}function a(n,t,i){return t in n?Object.defineProperty(n,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[t]=i,n}function h(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function c(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function l(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var u;Object.defineProperty(t,"__esModule",{value:!0});t.default=t.ListItem=void 0;var s=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),r=function n(t,i,r){var u,f,e;return(null===t&&(t=Function.prototype),u=Object.getOwnPropertyDescriptor(t,i),void 0===u)?(f=Object.getPrototypeOf(t),null===f?void 0:n(f,i,r)):"value"in u?u.value:(e=u.get,void 0!==e?e.call(r):void 0)},v=i(0),e=o(v),y=i(3),p=o(y),w=i(23),b=o(w),f=function(n){function t(){return h(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,n),s(t,[{key:"format",value:function(n,i){n!==u.blotName||i?r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,n,i):this.replaceWith(e.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(n,i){return this.parent.isolate(this.offset(this.parent),this.length()),n===this.parent.statics.blotName?(this.parent.replaceWith(n,i),this):(this.parent.unwrap(),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,n,i))}}],[{key:"formats",value:function(n){if(n.tagName!==this.tagName)return r(t.__proto__||Object.getPrototypeOf(t),"formats",this).call(this,n)}}]),t}(p.default);f.blotName="list-item";f.tagName="LI";u=function(n){function t(n){h(this,t);var i=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n)),r=function(t){if(t.target.parentNode===n){var r=i.statics.formats(n),u=e.default.find(t.target);"checked"===r?u.format("list","unchecked"):"unchecked"===r&&u.format("list","checked")}};return n.addEventListener("touchstart",r),n.addEventListener("mousedown",r),i}return l(t,n),s(t,null,[{key:"create",value:function(n){var u="ordered"===n?"OL":"UL",i=r(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,u);return"checked"!==n&&"unchecked"!==n||i.setAttribute("data-checked","checked"===n),i}},{key:"formats",value:function(n){return"OL"===n.tagName?"ordered":"UL"===n.tagName?n.hasAttribute("data-checked")?"true"===n.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),s(t,[{key:"format",value:function(n,t){this.children.length>0&&this.children.tail.format(n,t)}},{key:"formats",value:function(){return a({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(n,i){if(n instanceof f)r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,n,i);else{var e=null==i?this.length():i.offset(this),u=this.split(e);u.parent.insertBefore(n,u)}}},{key:"optimize",value:function(n){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,n);var i=this.next;null!=i&&i.prev===this&&i.statics.blotName===this.statics.blotName&&i.domNode.tagName===this.domNode.tagName&&i.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(i.moveChildren(this),i.remove())}},{key:"replace",value:function(n){if(n.statics.blotName!==this.statics.blotName){var i=e.default.create(this.statics.defaultChild);n.moveChildren(i);this.appendChild(i)}r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,n)}}]),t}(b.default);u.blotName="list";u.scope=e.default.Scope.BLOCK_BLOT;u.tagName=["OL","UL"];u.defaultChild="list-item";u.allowedChildren=[f];t.ListItem=f;t.default=u},function(n,t,i){function u(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function f(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function e(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=i(39),s=function(n){return n&&n.__esModule?n:{"default":n}}(o),r=function(n){function t(){return u(this,t),f(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return e(t,n),t}(s.default);r.blotName="italic";r.tagName=["EM","I"];t.default=r},function(n,t,i){function u(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function f(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function e(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),s=function n(t,i,r){var u,f,e;return(null===t&&(t=Function.prototype),u=Object.getOwnPropertyDescriptor(t,i),void 0===u)?(f=Object.getPrototypeOf(t),null===f?void 0:n(f,i,r)):"value"in u?u.value:(e=u.get,void 0!==e?e.call(r):void 0)},h=i(5),c=function(n){return n&&n.__esModule?n:{"default":n}}(h),r=function(n){function t(){return u(this,t),f(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return e(t,n),o(t,null,[{key:"create",value:function(n){return"super"===n?document.createElement("sup"):"sub"===n?document.createElement("sub"):s(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,n)}},{key:"formats",value:function(n){return"SUB"===n.tagName?"sub":"SUP"===n.tagName?"super":void 0}}]),t}(c.default);r.blotName="script";r.tagName=["SUB","SUP"];t.default=r},function(n,t,i){function u(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function f(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function e(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=i(5),s=function(n){return n&&n.__esModule?n:{"default":n}}(o),r=function(n){function t(){return u(this,t),f(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return e(t,n),t}(s.default);r.blotName="strike";r.tagName="S";t.default=r},function(n,t,i){function u(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function f(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function e(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=i(5),s=function(n){return n&&n.__esModule?n:{"default":n}}(o),r=function(n){function t(){return u(this,t),f(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return e(t,n),t}(s.default);r.blotName="underline";r.tagName="U";t.default=r},function(n,t,i){function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),u=function n(t,i,r){var u,f,e;return(null===t&&(t=Function.prototype),u=Object.getOwnPropertyDescriptor(t,i),void 0===u)?(f=Object.getPrototypeOf(t),null===f?void 0:n(f,i,r)):"value"in u?u.value:(e=u.get,void 0!==e?e.call(r):void 0)},c=i(0),l=function(n){return n&&n.__esModule?n:{"default":n}}(c),a=i(15),f=["alt","height","width"],r=function(n){function t(){return e(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,n),h(t,[{key:"format",value:function(n,i){f.indexOf(n)>-1?i?this.domNode.setAttribute(n,i):this.domNode.removeAttribute(n):u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,n,i)}}],[{key:"create",value:function(n){var i=u(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,n);return"string"==typeof n&&i.setAttribute("src",this.sanitize(n)),i}},{key:"formats",value:function(n){return f.reduce(function(t,i){return n.hasAttribute(i)&&(t[i]=n.getAttribute(i)),t},{})}},{key:"match",value:function(n){return/\.(jpe?g|gif|png)$/.test(n)||/^data:image\/.+;base64/.test(n)}},{key:"sanitize",value:function(n){return a.sanitize(n,["http","https","data"])?n:"//:0"}},{key:"value",value:function(n){return n.getAttribute("src")}}]),t}(l.default.Embed);r.blotName="image";r.tagName="IMG";t.default=r},function(n,t,i){function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),u=function n(t,i,r){var u,f,e;return(null===t&&(t=Function.prototype),u=Object.getOwnPropertyDescriptor(t,i),void 0===u)?(f=Object.getPrototypeOf(t),null===f?void 0:n(f,i,r)):"value"in u?u.value:(e=u.get,void 0!==e?e.call(r):void 0)},c=i(3),l=i(15),a=function(n){return n&&n.__esModule?n:{"default":n}}(l),f=["height","width"],r=function(n){function t(){return e(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,n),h(t,[{key:"format",value:function(n,i){f.indexOf(n)>-1?i?this.domNode.setAttribute(n,i):this.domNode.removeAttribute(n):u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,n,i)}}],[{key:"create",value:function(n){var i=u(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,n);return i.setAttribute("frameborder","0"),i.setAttribute("allowfullscreen",!0),i.setAttribute("src",this.sanitize(n)),i}},{key:"formats",value:function(n){return f.reduce(function(t,i){return n.hasAttribute(i)&&(t[i]=n.getAttribute(i)),t},{})}},{key:"sanitize",value:function(n){return a.default.sanitize(n)}},{key:"value",value:function(n){return n.getAttribute("src")}}]),t}(c.BlockEmbed);r.blotName="video";r.className="ql-video";r.tagName="IFRAME";t.default=r},function(n,t,i){function u(n){return n&&n.__esModule?n:{"default":n}}function f(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function e(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function o(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var h;Object.defineProperty(t,"__esModule",{value:!0});t.default=t.FormulaBlot=void 0;var s=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),c=function n(t,i,r){var u,f,e;return(null===t&&(t=Function.prototype),u=Object.getOwnPropertyDescriptor(t,i),void 0===u)?(f=Object.getPrototypeOf(t),null===f?void 0:n(f,i,r)):"value"in u?u.value:(e=u.get,void 0!==e?e.call(r):void 0)},l=i(33),a=u(l),v=i(6),y=u(v),p=i(7),w=u(p),r=function(n){function t(){return f(this,t),e(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,n),s(t,null,[{key:"create",value:function(n){var i=c(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,n);return"string"==typeof n&&(window.katex.render(n,i,{throwOnError:!1,errorColor:"#f00"}),i.setAttribute("data-value",n)),i}},{key:"value",value:function(n){return n.getAttribute("data-value")}}]),t}(a.default);r.blotName="formula";r.className="ql-formula";r.tagName="SPAN";h=function(n){function t(){f(this,t);var n=e(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(null==window.katex)throw new Error("Formula module requires KaTeX.");return n}return o(t,n),s(t,null,[{key:"register",value:function(){y.default.register(r,!0)}}]),t}(w.default);t.FormulaBlot=r;t.default=h},function(n,t,i){function u(n){return n&&n.__esModule?n:{"default":n}}function h(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function c(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function l(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var o,s;Object.defineProperty(t,"__esModule",{value:!0});t.default=t.CodeToken=t.CodeBlock=void 0;var e=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),v=function n(t,i,r){var u,f,e;return(null===t&&(t=Function.prototype),u=Object.getOwnPropertyDescriptor(t,i),void 0===u)?(f=Object.getPrototypeOf(t),null===f?void 0:n(f,i,r)):"value"in u?u.value:(e=u.get,void 0!==e?e.call(r):void 0)},y=i(0),a=u(y),p=i(6),r=u(p),w=i(7),b=u(w),k=i(13),d=u(k),f=function(n){function t(){return h(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,n),e(t,[{key:"replaceWith",value:function(n){this.domNode.textContent=this.domNode.textContent;this.attach();v(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,n)}},{key:"highlight",value:function(n){var t=this.domNode.textContent;this.cachedText!==t&&((t.trim().length>0||null==this.cachedText)&&(this.domNode.innerHTML=n(t),this.domNode.normalize(),this.attach()),this.cachedText=t)}}]),t}(d.default);f.className="ql-syntax";o=new a.default.Attributor.Class("token","hljs",{scope:a.default.Scope.INLINE});s=function(n){function t(n,i){var u,f;if(h(this,t),u=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n,i)),"function"!=typeof u.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");return f=null,u.quill.on(r.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(f);f=setTimeout(function(){u.highlight();f=null},u.options.interval)}),u.highlight(),u}return l(t,n),e(t,null,[{key:"register",value:function(){r.default.register(o,!0);r.default.register(f,!0)}}]),e(t,[{key:"highlight",value:function(){var t=this,n;this.quill.selection.composing||(this.quill.update(r.default.sources.USER),n=this.quill.getSelection(),this.quill.scroll.descendants(f).forEach(function(n){n.highlight(t.options.highlight)}),this.quill.update(r.default.sources.SILENT),null!=n&&this.quill.setSelection(n,r.default.sources.SILENT))}}]),t}(b.default);s.DEFAULTS={highlight:function(){return null==window.hljs?null:function(n){return window.hljs.highlightAuto(n).value}}(),interval:1e3};t.CodeBlock=f;t.CodeToken=o;t.default=s},function(n,t,i){function u(n){return n&&n.__esModule?n:{"default":n}}function a(n,t,i){return t in n?Object.defineProperty(n,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[t]=i,n}function v(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function h(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function y(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}function c(n,t,i){var r=document.createElement("button");r.setAttribute("type","button");r.classList.add("ql-"+t);null!=i&&(r.value=i);n.appendChild(r)}function l(n,t){Array.isArray(t[0])||(t=[t]);t.forEach(function(t){var i=document.createElement("span");i.classList.add("ql-formats");t.forEach(function(n){if("string"==typeof n)c(i,n);else{var t=Object.keys(n)[0],r=n[t];Array.isArray(r)?p(i,t,r):c(i,t,r)}});n.appendChild(i)})}function p(n,t,i){var r=document.createElement("select");r.classList.add("ql-"+t);i.forEach(function(n){var t=document.createElement("option");!1!==n?t.setAttribute("value",n):t.setAttribute("selected","selected");r.appendChild(t)});n.appendChild(r)}Object.defineProperty(t,"__esModule",{value:!0});t.addControls=t.default=void 0;var e=function(){function n(n,t){var r=[],u=!0,f=!1,e=void 0,o,i;try{for(i=n[Symbol.iterator]();!(u=(o=i.next()).done)&&(r.push(o.value),!t||r.length!==t);u=!0);}catch(n){f=!0;e=n}finally{try{!u&&i.return&&i.return()}finally{if(f)throw e;}}return r}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return n(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),w=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),b=i(4),k=u(b),d=i(0),f=u(d),g=i(6),r=u(g),nt=i(10),tt=u(nt),it=i(7),rt=u(it),o=tt.default("quill:toolbar"),s=function(n){function t(n,i){var u,f,s;return(v(this,t),u=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n,i)),Array.isArray(u.options.container)?(f=document.createElement("div"),l(f,u.options.container),n.container.parentNode.insertBefore(f,n.container),u.container=f):u.container="string"==typeof u.options.container?document.querySelector(u.options.container):u.options.container,!(u.container instanceof HTMLElement))?(s=o.error("Container required for toolbar",u.options),h(u,s)):(u.container.classList.add("ql-toolbar"),u.controls=[],u.handlers={},Object.keys(u.options.handlers).forEach(function(n){u.addHandler(n,u.options.handlers[n])}),[].forEach.call(u.container.querySelectorAll("button, select"),function(n){u.attach(n)}),u.quill.on(r.default.events.EDITOR_CHANGE,function(n,t){n===r.default.events.SELECTION_CHANGE&&u.update(t)}),u.quill.on(r.default.events.SCROLL_OPTIMIZE,function(){var n=u.quill.selection.getRange(),t=e(n,1),i=t[0];u.update(i)}),u)}return y(t,n),w(t,[{key:"addHandler",value:function(n,t){this.handlers[n]=t}},{key:"attach",value:function(n){var i=this,t=[].find.call(n.classList,function(n){return 0===n.indexOf("ql-")}),u;if(t){if(t=t.slice(3),"BUTTON"===n.tagName&&n.setAttribute("type","button"),null==this.handlers[t]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[t])return void o.warn("ignoring attaching to disabled format",t,n);if(null==f.default.query(t))return void o.warn("ignoring attaching to nonexistent format",t,n)}u="SELECT"===n.tagName?"change":"click";n.addEventListener(u,function(u){var o=void 0,s;if("SELECT"===n.tagName){if(n.selectedIndex<0)return;s=n.options[n.selectedIndex];o=!s.hasAttribute("selected")&&(s.value||!1)}else o=!n.classList.contains("ql-active")&&(n.value||!n.hasAttribute("value")),u.preventDefault();i.quill.focus();var c=i.quill.selection.getRange(),l=e(c,1),h=l[0];if(null!=i.handlers[t])i.handlers[t].call(i,o);else if(f.default.query(t).prototype instanceof f.default.Embed){if(!(o=prompt("Enter "+t)))return;i.quill.updateContents((new k.default).retain(h.index).delete(h.length).insert(a({},t,o)),r.default.sources.USER)}else i.quill.format(t,o,r.default.sources.USER);i.update(h)});this.controls.push([t,n])}}},{key:"update",value:function(n){var t=null==n?{}:this.quill.getFormat(n);this.controls.forEach(function(i){var s=e(i,2),u=s[0],r=s[1],f,o,h;"SELECT"===r.tagName?(f=void 0,null==n?f=null:null==t[u]?f=r.querySelector("option[selected]"):Array.isArray(t[u])||(o=t[u],"string"==typeof o&&(o=o.replace(/\"/g,'\\"')),f=r.querySelector('option[value="'+o+'"]')),null==f?(r.value="",r.selectedIndex=-1):f.selected=!0):null==n?r.classList.remove("ql-active"):r.hasAttribute("value")?(h=t[u]===r.getAttribute("value")||null!=t[u]&&t[u].toString()===r.getAttribute("value")||null==t[u]&&!r.getAttribute("value"),r.classList.toggle("ql-active",h)):r.classList.toggle("ql-active",null!=t[u])})}}]),t}(rt.default);s.DEFAULTS={};s.DEFAULTS={container:null,handlers:{clean:function(){var i=this,n=this.quill.getSelection(),t;null!=n&&(0==n.length?(t=this.quill.getFormat(),Object.keys(t).forEach(function(n){null!=f.default.query(n,f.default.Scope.INLINE)&&i.quill.format(n,!1)})):this.quill.removeFormat(n,r.default.sources.USER))},direction:function(n){var t=this.quill.getFormat().align;"rtl"===n&&null==t?this.quill.format("align","right",r.default.sources.USER):n||"right"!==t||this.quill.format("align",!1,r.default.sources.USER);this.quill.format("direction",n,r.default.sources.USER)},indent:function(n){var u=this.quill.getSelection(),i=this.quill.getFormat(u),f=parseInt(i.indent||0),t;("+1"===n||"-1"===n)&&(t="+1"===n?1:-1,"rtl"===i.direction&&(t*=-1),this.quill.format("indent",f+t,r.default.sources.USER))},link:function(n){!0===n&&(n=prompt("Enter link URL:"));this.quill.format("link",n,r.default.sources.USER)},list:function(n){var i=this.quill.getSelection(),t=this.quill.getFormat(i);"check"===n?"checked"===t.list||"unchecked"===t.list?this.quill.format("list",!1,r.default.sources.USER):this.quill.format("list","unchecked",r.default.sources.USER):this.quill.format("list",n,r.default.sources.USER)}}};t.default=s;t.addControls=l},function(n){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9><\/line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14><\/line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4><\/line> <\/svg>'},function(n){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9><\/line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14><\/line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4><\/line> <\/svg>'},function(n){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9><\/line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14><\/line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4><\/line> <\/svg>'},function(n){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9><\/line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14><\/line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4><\/line> <\/svg>'},function(n){n.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"><\/polygon> <rect height=1 width=1 x=4 y=4><\/rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"><\/polygon> <rect height=1 width=1 x=2 y=6><\/rect> <rect height=1 width=1 x=3 y=5><\/rect> <rect height=1 width=1 x=4 y=7><\/rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"><\/polygon> <rect height=1 width=1 x=2 y=12><\/rect> <rect height=1 width=1 x=2 y=9><\/rect> <rect height=1 width=1 x=2 y=15><\/rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"><\/polygon> <rect height=1 width=1 x=3 y=8><\/rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z><\/path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z><\/path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z><\/path> <rect height=1 width=1 x=12 y=2><\/rect> <rect height=1 width=1 x=11 y=3><\/rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z><\/path> <rect height=1 width=1 x=2 y=3><\/rect> <rect height=1 width=1 x=6 y=2><\/rect> <rect height=1 width=1 x=3 y=2><\/rect> <rect height=1 width=1 x=5 y=3><\/rect> <rect height=1 width=1 x=9 y=2><\/rect> <rect height=1 width=1 x=15 y=14><\/rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"><\/polygon> <rect height=1 width=1 x=13 y=7><\/rect> <rect height=1 width=1 x=15 y=5><\/rect> <rect height=1 width=1 x=14 y=6><\/rect> <rect height=1 width=1 x=15 y=8><\/rect> <rect height=1 width=1 x=14 y=9><\/rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z><\/path> <rect height=1 width=1 x=14 y=3><\/rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"><\/polygon> <rect height=1 width=1 x=15 y=2><\/rect> <rect height=1 width=1 x=12 y=5><\/rect> <rect height=1 width=1 x=13 y=4><\/rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"><\/polygon> <rect height=1 width=1 x=9 y=14><\/rect> <rect height=1 width=1 x=8 y=15><\/rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z><\/path> <rect height=1 width=1 x=5 y=15><\/rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z><\/path> <rect height=1 width=1 x=11 y=15><\/rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z><\/path> <rect height=1 width=1 x=14 y=15><\/rect> <rect height=1 width=1 x=15 y=11><\/rect> <\/g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"><\/polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11><\/line> <\/svg>'},function(n){n.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5><\/rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5><\/rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5><\/path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5><\/path> <\/svg>'},function(n){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z><\/path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z><\/path> <\/svg>'},function(n){n.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3><\/line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3><\/line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15><\/line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15><\/line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14><\/rect> <\/svg>'},function(n){n.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15><\/line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"><\/polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9><\/line> <\/svg>'},function(n){n.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"><\/polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4><\/line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z><\/path> <rect class=ql-fill height=11 width=1 x=11 y=4><\/rect> <rect class=ql-fill height=11 width=1 x=13 y=4><\/rect> <\/svg>'},function(n){n.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"><\/polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4><\/line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z><\/path> <rect class=ql-fill height=11 width=1 x=5 y=4><\/rect> <rect class=ql-fill height=11 width=1 x=7 y=4><\/rect> <\/svg>'},function(n){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> <\/svg>'},function(n){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> <\/svg>'},function(n){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> <\/svg>'},function(n){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> <\/svg>'},function(n){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z><\/path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2><\/rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z><\/path> <\/svg>'},function(n){n.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> <\/svg>'},function(n){n.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> <\/svg>'},function(n){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4><\/line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14><\/line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4><\/line> <\/svg>'},function(n){n.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4><\/rect> <circle class=ql-fill cx=6 cy=7 r=1><\/circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"><\/polyline> <\/svg>'},function(n){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14><\/line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4><\/line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9><\/line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"><\/polyline> <\/svg>'},function(n){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14><\/line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4><\/line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9><\/line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"><\/polyline> <\/svg>'},function(n){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11><\/line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z><\/path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z><\/path> <\/svg>'},function(n){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4><\/line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9><\/line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14><\/line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5><\/line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z><\/path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156><\/path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109><\/path> <\/svg>'},function(n){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4><\/line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9><\/line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14><\/line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4><\/line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9><\/line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14><\/line> <\/svg>'},function(n){n.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4><\/line> <polyline class=ql-stroke points="3 4 4 5 6 3"><\/polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14><\/line> <polyline class=ql-stroke points="3 14 4 15 6 13"><\/polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9><\/line> <polyline class=ql-stroke points="3 9 4 10 6 8"><\/polyline> <\/svg>'},function(n){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> <\/svg>'},function(n){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> <\/svg>'},function(n){n.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5><\/line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z><\/path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z><\/path> <\/svg>'},function(n){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3><\/path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15><\/rect> <\/svg>'},function(n){n.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3><\/rect> <rect class=ql-fill height=12 width=1 x=5 y=3><\/rect> <rect class=ql-fill height=12 width=1 x=12 y=3><\/rect> <rect class=ql-fill height=2 width=8 x=5 y=8><\/rect> <rect class=ql-fill height=1 width=3 x=3 y=5><\/rect> <rect class=ql-fill height=1 width=3 x=3 y=7><\/rect> <rect class=ql-fill height=1 width=3 x=3 y=10><\/rect> <rect class=ql-fill height=1 width=3 x=3 y=12><\/rect> <rect class=ql-fill height=1 width=3 x=12 y=5><\/rect> <rect class=ql-fill height=1 width=3 x=12 y=7><\/rect> <rect class=ql-fill height=1 width=3 x=12 y=10><\/rect> <rect class=ql-fill height=1 width=3 x=12 y=12><\/rect> <\/svg>'},function(n){n.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"><\/polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"><\/polygon> <\/svg>'},function(n,t,i){function r(n){return n&&n.__esModule?n:{"default":n}}function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var f;Object.defineProperty(t,"__esModule",{value:!0});t.default=t.BubbleTooltip=void 0;var h=function n(t,i,r){var u,f,e;return(null===t&&(t=Function.prototype),u=Object.getOwnPropertyDescriptor(t,i),void 0===u)?(f=Object.getPrototypeOf(t),null===f?void 0:n(f,i,r)):"value"in u?u.value:(e=u.get,void 0!==e?e.call(r):void 0)},c=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),p=i(2),w=r(p),b=i(9),u=r(b),l=i(44),a=r(l),k=i(22),d=i(26),v=r(d),g=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],y=function(n){function t(n,i){e(this,t);null!=i.modules.toolbar&&null==i.modules.toolbar.container&&(i.modules.toolbar.container=g);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n,i));return r.quill.container.classList.add("ql-bubble"),r}return s(t,n),c(t,[{key:"extendToolbar",value:function(n){this.tooltip=new f(this.quill,this.options.bounds);this.tooltip.root.appendChild(n.container);this.buildButtons([].slice.call(n.container.querySelectorAll("button")),v.default);this.buildPickers([].slice.call(n.container.querySelectorAll("select")),v.default)}}]),t}(a.default);y.DEFAULTS=w.default(!0,{},a.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(n){n?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});f=function(n){function t(n,i){e(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n,i));return r.quill.on(u.default.events.EDITOR_CHANGE,function(n,t,i,f){var e;if(n===u.default.events.SELECTION_CHANGE)if(null!=t&&t.length>0&&f===u.default.sources.USER)if(r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px",e=r.quill.getLines(t.index,t.length),1===e.length)r.position(r.quill.getBounds(t));else{var o=e[e.length-1],s=r.quill.getIndex(o),h=Math.min(o.length()-1,t.index+t.length-s),c=r.quill.getBounds(new k.Range(s,h));r.position(c)}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()}),r}return s(t,n),c(t,[{key:"listen",value:function(){var n=this;h(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this);this.root.querySelector(".ql-close").addEventListener("click",function(){n.root.classList.remove("ql-editing")});this.quill.on(u.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!n.root.classList.contains("ql-hidden")){var t=n.quill.getSelection();null!=t&&n.position(n.quill.getBounds(t))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(n){var i=h(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"position",this).call(this,n),r=this.root.querySelector(".ql-tooltip-arrow");if(r.style.marginLeft="",0===i)return i;r.style.marginLeft=-1*i-r.offsetWidth/2+"px"}}]),t}(l.BaseTooltip);f.TEMPLATE='<span class="ql-tooltip-arrow"><\/span><div class="ql-tooltip-editor"><input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL"><a class="ql-close"><\/a><\/div>';t.BubbleTooltip=f;t.default=y},function(n,t,i){function r(n){return n&&n.__esModule?n:{"default":n}}function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&"function"!=typeof t?n:t}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":_typeof(t)));n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var f;Object.defineProperty(t,"__esModule",{value:!0});var w=function(){function n(n,t){var r=[],u=!0,f=!1,e=void 0,o,i;try{for(i=n[Symbol.iterator]();!(u=(o=i.next()).done)&&(r.push(o.value),!t||r.length!==t);u=!0);}catch(n){f=!0;e=n}finally{try{!u&&i.return&&i.return()}finally{if(f)throw e;}}return r}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return n(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),h=function n(t,i,r){var u,f,e;return(null===t&&(t=Function.prototype),u=Object.getOwnPropertyDescriptor(t,i),void 0===u)?(f=Object.getPrototypeOf(t),null===f?void 0:n(f,i,r)):"value"in u?u.value:(e=u.get,void 0!==e?e.call(r):void 0)},c=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),b=i(2),k=r(b),d=i(9),u=r(d),l=i(44),a=r(l),g=i(15),v=r(g),nt=i(22),tt=i(26),y=r(tt),it=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],p=function(n){function t(n,i){e(this,t);null!=i.modules.toolbar&&null==i.modules.toolbar.container&&(i.modules.toolbar.container=it);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n,i));return r.quill.container.classList.add("ql-snow"),r}return s(t,n),c(t,[{key:"extendToolbar",value:function(n){n.container.classList.add("ql-snow");this.buildButtons([].slice.call(n.container.querySelectorAll("button")),y.default);this.buildPickers([].slice.call(n.container.querySelectorAll("select")),y.default);this.tooltip=new f(this.quill,this.options.bounds);n.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(t,i){n.handlers.link.call(n,!i.format.link)})}}]),t}(a.default);p.DEFAULTS=k.default(!0,{},a.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(n){var i,t;if(n){if(i=this.quill.getSelection(),null==i||0==i.length)return;t=this.quill.getText(i);/^\S+@\S+\.\S+$/.test(t)&&0!==t.indexOf("mailto:")&&(t="mailto:"+t);this.quill.theme.tooltip.edit("link",t)}else this.quill.format("link",!1)}}}}});f=function(n){function t(n,i){e(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n,i));return r.preview=r.root.querySelector("a.ql-preview"),r}return s(t,n),c(t,[{key:"listen",value:function(){var n=this;h(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this);this.root.querySelector("a.ql-action").addEventListener("click",function(t){n.root.classList.contains("ql-editing")?n.save():n.edit("link",n.preview.textContent);t.preventDefault()});this.root.querySelector("a.ql-remove").addEventListener("click",function(t){if(null!=n.linkRange){var i=n.linkRange;n.restoreFocus();n.quill.formatText(i,"link",!1,u.default.sources.USER);delete n.linkRange}t.preventDefault();n.hide()});this.quill.on(u.default.events.SELECTION_CHANGE,function(t,i,r){var e;if(null!=t){if(0===t.length&&r===u.default.sources.USER){var s=n.quill.scroll.descendant(v.default,t.index),o=w(s,2),f=o[0],h=o[1];if(null!=f)return n.linkRange=new nt.Range(t.index-h,f.length()),e=v.default.formats(f.domNode),n.preview.textContent=e,n.preview.setAttribute("href",e),n.show(),void n.position(n.quill.getBounds(n.linkRange))}else delete n.linkRange;n.hide()}})}},{key:"show",value:function(){h(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"show",this).call(this);this.root.removeAttribute("data-mode")}}]),t}(l.BaseTooltip);f.TEMPLATE='<a class="ql-preview" target="_blank" href="about:blank"><\/a><input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL"><a class="ql-action"><\/a><a class="ql-remove"><\/a>';t.default=p}]).default});_createClass=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}();_typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},function(n,t){(typeof exports=="undefined"?"undefined":_typeof(exports))==="object"&&typeof module!="undefined"?module.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis!="undefined"?globalThis:n||self,n.A11yDialog=t())}(undefined,function(){function n(n){this._show=this.show.bind(this);this._hide=this.hide.bind(this);this._maintainFocus=this._maintainFocus.bind(this);this._bindKeypress=this._bindKeypress.bind(this);this.$el=n;this.shown=!1;this._id=this.$el.getAttribute("data-a11y-dialog")||this.$el.id;this._previouslyFocused=null;this._listeners={};this.create()}function o(n){return Array.prototype.slice.call(n)}function t(n,t){return o((t||document).querySelectorAll(n))}function r(n){var t=n.querySelector("[autofocus]")||n;t.focus()}function s(n){return t(u.join(","),n).filter(function(n){return!!(n.offsetWidth||n.offsetHeight||n.getClientRects().length)})}function h(n,t){var i=s(n),r=i.indexOf(document.activeElement);t.shiftKey&&r===0?(i[i.length-1].focus(),t.preventDefault()):t.shiftKey||r!==i.length-1||(i[0].focus(),t.preventDefault())}function i(){t("[data-a11y-dialog]").forEach(function(t){new n(t)})}var u=['a[href]:not([tabindex^="-"])','area[href]:not([tabindex^="-"])','input:not([type="hidden"]):not([type="radio"]):not([disabled]):not([tabindex^="-"])','input[type="radio"]:not([disabled]):not([tabindex^="-"])','select:not([disabled]):not([tabindex^="-"])','textarea:not([disabled]):not([tabindex^="-"])','button:not([disabled]):not([tabindex^="-"])','iframe:not([tabindex^="-"])','audio[controls]:not([tabindex^="-"])','video[controls]:not([tabindex^="-"])','[contenteditable]:not([tabindex^="-"])','[tabindex]:not([tabindex^="-"])'],f="Tab",e="Escape";return n.prototype.create=function(){this.$el.setAttribute("aria-hidden",!0);this.$el.setAttribute("aria-modal",!0);this.$el.setAttribute("tabindex",-1);this.$el.hasAttribute("role")||this.$el.setAttribute("role","dialog");this._openers=t('[data-a11y-dialog-show="'+this._id+'"]');this._openers.forEach(function(n){n.addEventListener("click",this._show)}.bind(this));var n=this.$el;return this._closers=t("[data-a11y-dialog-hide]",this.$el).filter(function(t){return t.closest('[aria-modal="true"], [data-a11y-dialog]')===n}).concat(t('[data-a11y-dialog-hide="'+this._id+'"]')),this._closers.forEach(function(n){n.addEventListener("click",this._hide)}.bind(this)),this._fire("create"),this},n.prototype.show=function(n){return this.shown?this:(this._previouslyFocused=document.activeElement,this.$el.removeAttribute("aria-hidden"),this.shown=!0,r(this.$el),document.body.addEventListener("focus",this._maintainFocus,!0),document.addEventListener("keydown",this._bindKeypress),this._fire("show",n),this)},n.prototype.hide=function(n){return this.shown?(this.shown=!1,this.$el.setAttribute("aria-hidden","true"),this._previouslyFocused&&this._previouslyFocused.focus&&this._previouslyFocused.focus(),document.body.removeEventListener("focus",this._maintainFocus,!0),document.removeEventListener("keydown",this._bindKeypress),this._fire("hide",n),this):this},n.prototype.destroy=function(){return this.hide(),this._openers.forEach(function(n){n.removeEventListener("click",this._show)}.bind(this)),this._closers.forEach(function(n){n.removeEventListener("click",this._hide)}.bind(this)),this._fire("destroy"),this._listeners={},this},n.prototype.on=function(n,t){return typeof this._listeners[n]=="undefined"&&(this._listeners[n]=[]),this._listeners[n].push(t),this},n.prototype.off=function(n,t){var i=(this._listeners[n]||[]).indexOf(t);return i>-1&&this._listeners[n].splice(i,1),this},n.prototype._fire=function(n,t){var i=this._listeners[n]||[],r=new CustomEvent(n,{detail:t});this.$el.dispatchEvent(r);i.forEach(function(n){n(this.$el,t)}.bind(this))},n.prototype._bindKeypress=function(n){var t=document.activeElement;t&&t.closest('[aria-modal="true"]')!==this.$el||(this.shown&&n.key===e&&this.$el.getAttribute("role")!=="alertdialog"&&(n.preventDefault(),this.hide(n)),this.shown&&n.key===f&&h(this.$el,n))},n.prototype._maintainFocus=function(n){!this.shown||n.target.closest('[aria-modal="true"]')||n.target.closest("[data-a11y-dialog-ignore-focus-trap]")||r(this.$el)},typeof document!="undefined"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",i):window.requestAnimationFrame?window.requestAnimationFrame(i):window.setTimeout(i,16)),n});var Initialize=function(){function n(){var t=this;if(_classCallCheck(this,n),document.querySelector("html").classList.contains("kentico-page-builder")){var i=document.querySelector("html"),r=function(n){var r=!0,u=!1,f=undefined,i,e,o;try{for(i=n[Symbol.iterator]();!(r=(e=i.next()).done);r=!0)o=e.value,o.type=="childList"&&t._initAll()}catch(s){u=!0;f=s}finally{try{!r&&i.return&&i.return()}finally{if(u)throw f;}}},u=new MutationObserver(r);u.observe(i,{childList:!0,subtree:!0})}}return _createClass(n,[{key:"_initAll",value:function(){for(var n in this)n[0]!="_"&&this[n]()}},{key:"_addMethod",value:function(n,t,i){this.hasOwnProperty(n)?console.error("The method "+n+"() has already been defined. Please define a different name."):this[n]=function(){var h=[].concat(_toConsumableArray(document.querySelectorAll(t))),f=!0,e=!1,o=undefined,u,s,r;try{for(u=h[Symbol.iterator]();!(f=(s=u.next()).done);f=!0)r=s.value,r._init||(r._init=[]),r._init.indexOf(n)==-1&&(i(r),r._init.push(n))}catch(c){e=!0;o=c}finally{try{!f&&u.return&&u.return()}finally{if(e)throw o;}}}}},{key:"_methods",get:function(){for(var n in this)n[0]!="_"&&console.log(n+"()")}}]),n}(),init=new Initialize,ready=function(n,t,i){init._addMethod(n,t,i);window.addEventListener("DOMContentLoaded",init[n])},deepExtend=function(n,t){var r={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i]);for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i]);return r},createElement=function(n){var t=document.createElement("div");return t.innerHTML=n,t.children},between=function(n,t,i){var u=arguments.length>3&&arguments[3]!==undefined?arguments[3]:!1,f=n-t,e=i-t,r=f/e;return u&&(r=r*100),parseFloat(r.toFixed(8))},media=window.matchMedia("(min-width: 1100px)"),mediaMd=window.matchMedia("(min-width: 900px)"),mediaSm=window.matchMedia("(min-width: 768px)"),api={get:function(n){return axios.get(n).then(function(n){if(n)return n.data?n.data:{}})},"delete":function(n){return axios.delete(n).then(function(n){if(n)return n.data?n.data:{}})},post:function(n,t){return axios.post(n,t).then(function(n){if(n)return n.data?n.data:{}})},put:function(n,t){return axios.put(n,t).then(function(n){if(n)return n.data?n.data:{}})}},getSize=function(n){var a=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1,t=n.cloneNode(!0),v=n.parentElement,s={},i=void 0,r=void 0,u=void 0,f,l,o;t.style.transform="translate(-10000px, -10000px)";n.insertAdjacentElement("beforebegin",t);var e=!0,h=!1,c=undefined;try{for(f=["inline","block","contents","flex","grid","inline-block","inline-flex","inline-grid","inline-table","list-item","run-in","table","table-caption","table-column-group","table-header-group","table-footer-group","table-row-group","table-cell","table-column","table-row","initial","inherit"][Symbol.iterator]();!(e=(l=f.next()).done);e=!0)o=l.value,t.style.display=o,i=getComputedStyle(t),r=t.offsetHeight,u=t.offsetWidth,a&&(r=r+parseFloat(i.marginTop)+parseFloat(i.marginBottom),u=u+parseFloat(i.marginLeft)+parseFloat(i.marginRight)),s[o]={height:r,width:u}}catch(y){h=!0;c=y}finally{try{!e&&f.return&&f.return()}finally{if(h)throw c;}}return v.removeChild(t),s},absHeight=function(n){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1,t,i;return(n=typeof n=="string"?document.querySelector(n):n,t=window.getComputedStyle(n),i=parseFloat(t.marginTop)+parseFloat(t.marginBottom),r)?Math.ceil(n.offsetHeight+i):Math.ceil(n.offsetHeight)},absWidth=function(n){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1,t,i;return(n=typeof n=="string"?document.querySelector(n):n,t=window.getComputedStyle(n),i=parseFloat(t.marginLeft)+parseFloat(t.marginRight),r)?Math.ceil(n.offsetWidth+i):Math.ceil(n.offsetWidth)},absSize=function(n){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;return{height:absHeight(n,t),width:absWidth(n,t)}},inViewport=function(n){n=typeof n=="string"?document.querySelector(n):n;var u=absHeight(n),t=window.innerHeight,i=n.getBoundingClientRect(),r=i.top,f=i.bottom;return Math.max(0,r>0?Math.min(u,t-r):Math.min(f,t))},percVisible=function(n){n=typeof n=="string"?document.querySelector(n):n;var t=n.offsetHeight,i=inViewport(n);return i/t};window.addEventListener("DOMContentLoaded",function(){document.body.addEventListener("mousedown",function(){document.body.classList.add("using-mouse")});document.body.addEventListener("keydown",function(){document.body.classList.remove("using-mouse")})});ready("media",".media",function(n){var b=n.querySelector(".media-currentImage"),i=[].concat(_toConsumableArray(n.querySelectorAll(".media-thumbnail"))),st=[].concat(_toConsumableArray(n.querySelectorAll(".media-nav"))),e=[].concat(_toConsumableArray(n.querySelectorAll(".media-copyItem"))),t=0,r=void 0,k=function(n){var s=!0,a=!1,v=undefined,t,y,u,f,b,e,nt,o;try{for(t=r[Symbol.iterator]();!(s=(y=t.next()).done);s=!0)u=y.value,u.classList.remove("is-active"),r.indexOf(u)===n&&u.classList.add("is-active")}catch(h){a=!0;v=h}finally{try{!s&&t.return&&t.return()}finally{if(a)throw v;}}var c=!0,p=!1,w=undefined;try{for(f=i[Symbol.iterator]();!(c=(b=f.next()).done);c=!0){var tt=b.value,k=[].concat(_toConsumableArray(tt.querySelectorAll(".media-item"))),l=!0,d=!1,g=undefined;try{for(e=k[Symbol.iterator]();!(l=(nt=e.next()).done);l=!0)o=nt.value,o.classList.remove("is-active"),k.indexOf(o)==n&&o.classList.add("is-active")}catch(h){d=!0;g=h}finally{try{!l&&e.return&&e.return()}finally{if(d)throw g;}}}}catch(h){p=!0;w=h}finally{try{!c&&f.return&&f.return()}finally{if(p)throw w;}}},d=function(n){var r=e.filter(function(n){return n.classList.contains("is-active")})[0],t,o,s;r.classList.add("is-leaving");var i=!0,u=!1,f=undefined;try{for(t=e[Symbol.iterator]();!(i=(o=t.next()).done);i=!0)s=o.value,s.classList.remove("is-active")}catch(h){u=!0;f=h}finally{try{!i&&t.return&&t.return()}finally{if(u)throw f;}}e[n].classList.add("is-active");setTimeout(function(){r.classList.remove("is-leaving")},350)},yi=function(n){var t,s,h,f,r,c;n=n*100;var u=!0,e=!1,o=undefined;try{for(t=i[Symbol.iterator]();!(u=(s=t.next()).done);u=!0)for(h=s.value,f=[].concat(_toConsumableArray(h.querySelectorAll(".media-item"))),r=0;r<f.length;r++)c=f[r],c.style.left=n+"%"}catch(l){e=!0;o=l}finally{try{!u&&t.return&&t.return()}finally{if(e)throw o;}}},g=function(n){st[0].setAttribute("data-current",n+1)},nt=!0,ht=!1,ct=undefined,o,lt,at,s,pt,u,c,gt,l,a,ii,v,y,fi,ft,p,si,hi,w,ai,vi;try{for(o=i[Symbol.iterator]();!(nt=(lt=o.next()).done);nt=!0)at=lt.value,b.insertAdjacentElement("beforeend",at.querySelector(".media-item").cloneNode(!1))}catch(f){ht=!0;ct=f}finally{try{!nt&&o.return&&o.return()}finally{if(ht)throw ct;}}r=[].concat(_toConsumableArray(b.querySelectorAll(".media-item")));r[0].classList.add("is-active");e[0].classList.add("is-active");var tt=!0,vt=!1,yt=undefined;try{for(s=i[Symbol.iterator]();!(tt=(pt=s.next()).done);tt=!0)if(u=pt.value,i.indexOf(u)<4){var wt=i.indexOf(u),h=void 0,bt=void 0,it=!0,kt=!1,dt=undefined;try{for(c=i[Symbol.iterator]();!(it=(gt=c.next()).done);it=!0)l=gt.value,l!==u&&(h=l.querySelector(".media-item--orig").cloneNode(!0),bt=i.indexOf(l),h.classList.remove("media-item--orig"),bt<wt?u.insertAdjacentElement("afterbegin",h):u.insertAdjacentElement("beforeend",h))}catch(f){kt=!0;dt=f}finally{try{!it&&c.return&&c.return()}finally{if(kt)throw dt;}}u.querySelector(".media-item").style.marginLeft="-"+wt*100+"%";u.querySelector(".media-item").classList.add("is-active")}}catch(f){vt=!0;yt=f}finally{try{!tt&&s.return&&s.return()}finally{if(vt)throw yt;}}var rt=!0,ni=!1,ti=undefined;try{for(a=i[Symbol.iterator]();!(rt=(ii=a.next()).done);rt=!0)v=ii.value,i.indexOf(v)>=4&&v.parentNode.removeChild(v)}catch(f){ni=!0;ti=f}finally{try{!rt&&a.return&&a.return()}finally{if(ni)throw ti;}}var ut=!0,ri=!1,ui=undefined;try{for(y=i[Symbol.iterator]();!(ut=(fi=y.next()).done);ut=!0)ft=fi.value,i.indexOf(ft)<4&&function(){var i=[].concat(_toConsumableArray(ft.querySelectorAll(".media-item"))),s=function(n){n.addEventListener("click",function(t){t.stopPropagation();var u=i.indexOf(n);r[u].classList.contains("is-active")||(k(u),d(u),g(u));document.querySelector("broadstreet-zone-container")&&(broadstreet.clearCampaignLog(),broadstreet.refreshAll())})},t=!0,u=!1,f=undefined,n,e,o;try{for(n=i[Symbol.iterator]();!(t=(e=n.next()).done);t=!0)o=e.value,s(o)}catch(h){u=!0;f=h}finally{try{!t&&n.return&&n.return()}finally{if(u)throw f;}}}()}catch(f){ri=!0;ui=f}finally{try{!ut&&y.return&&y.return()}finally{if(ri)throw ui;}}var pi=function(n){n.addEventListener("click",function(){if(window.matchMedia("(min-width: 1100px)").matches)n.classList.contains("media-nav--prev")&&(t=t+3<=-1?t+4:t+2<=-1?t+3:t+1<=-1?t+2:t<=-1?t+1:-(i.length-4)),n.classList.contains("media-nav--next")&&(t=Math.abs(t)+7<i.length?t-4:Math.abs(t)+6<i.length?t-3:Math.abs(t)+5<i.length?t-2:Math.abs(t)+4<i.length?t-1:0),yi(t);else{document.querySelector("broadstreet-zone-container")&&(broadstreet.clearCampaignLog(),broadstreet.refreshAll());var u=r.indexOf(b.querySelector(".is-active"));n.classList.contains("media-nav--prev")?u<=0?u=r.length-1:u--:u>=r.length-1?u=0:u++;k(u);d(u);g(u)}})},et=!0,ei=!1,oi=undefined;try{for(p=st[Symbol.iterator]();!(et=(si=p.next()).done);et=!0)hi=si.value,pi(hi)}catch(f){ei=!0;oi=f}finally{try{!et&&p.return&&p.return()}finally{if(ei)throw oi;}}var wi=function(n){var s=40,f=void 0,e=void 0,t=void 0,o=function(e){window.matchMedia("(max-width: 1099px)").matches&&(f=e.clientX||e.touches[0].clientX,t=r.indexOf(n),window.addEventListener("mousemove",u),window.addEventListener("mouseup",i),window.addEventListener("touchmove",u),window.addEventListener("touchend",i))},u=function(n){e=n.clientX||n.touches[0].clientX;Math.abs(f-e)>s&&h(n)},h=function(){f-e<0?t>0?t--:t=r.length-1:t>=r.length-1?t=0:t++;k(t);d(t);g(t);i()},i=function i(){window.removeEventListener("mousemove",u);window.removeEventListener("mouseup",i);window.removeEventListener("touchmove",u);window.removeEventListener("touchend",i)};n.addEventListener("mousedown",o);n.addEventListener("touchstart",o)},ot=!0,ci=!1,li=undefined;try{for(w=r[Symbol.iterator]();!(ot=(ai=w.next()).done);ot=!0)vi=ai.value,wi(vi)}catch(f){ci=!0;li=f}finally{try{!ot&&w.return&&w.return()}finally{if(ci)throw li;}}});ready("formValidate",".formValidate",function(n){var i=[].concat(_toConsumableArray(n.querySelectorAll("input:not([type=submit]), textarea, select"))),f=n.querySelector("[type='submit']")||n.querySelector(".formValidate-submit"),r=function(n){return'<div class="formError">'+n+"<\/div>"},t,u;n.setAttribute("data-validated","false");t=function t(i){var r=i.target,u=void 0;r.removeEventListener("input",t);r.classList.remove("is-invalid");r.parentNode.classList.remove("is-errored");r.parentNode.querySelectorAll(".formError").length&&r.parentNode.removeChild(r.parentNode.querySelector(".formError"));r.addEventListener("input",t);r.checkValidity();r.getAttribute("name")!=null&&r.checkValidity()&&(u=[].concat(_toConsumableArray(n.querySelectorAll("[name="+r.getAttribute("name")+"]"))),u.forEach(function(n){n.parentNode.classList.remove("is-errored");n.classList.remove("is-invalid");n.parentNode.querySelectorAll(".formError").length&&n.parentNode.removeChild(n.parentNode.querySelector(".formError"))}))};u=function(n){var t=n.target;t.classList.add("is-invalid");t.parentNode.classList.add("is-errored");t.parentNode.querySelectorAll(".formError").length&&t.parentNode.removeChild(t.parentNode.querySelector(".formError"));t.value.length&&t.getAttribute("title")?t.parentNode.insertAdjacentHTML("beforeend",r(t.getAttribute("title"))):t.parentNode.insertAdjacentHTML("beforeend",r(t.validationMessage));n.preventDefault()};i.forEach(function(n){n.noValidate=!0;n.addEventListener("blur",t);n.addEventListener("change",t);n.addEventListener("invalid",u)});f.addEventListener("click",function(t){var r=!0;i.forEach(function(n){n.focus();n.blur();n.checkValidity()||(r=!1)});r?n.setAttribute("data-validated","true"):(n.setAttribute("data-validated","false"),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())})});ready("passwordVisibility",".formNote--toggle",function(n){n.addEventListener("click",function(n){n.preventDefault();var t=this.parentNode.querySelector("input");t.getAttribute("type")=="text"?t.setAttribute("type","password"):t.setAttribute("type","text")})});document.addEventListener("DOMContentLoaded",function(){function n(){var n=document.querySelector(".login-validation-div"),t=document.querySelector(".login-error-tooltip"),i,r;n&&t&&(i=window.getComputedStyle(n),r=i.display!=="none",t.style.display=r?"block":"none")}n();var t=new MutationObserver(function(){n()}),i=document.body;t.observe(i,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["style","class"]})});ready("groupmodal-confirm",".groupModal",function(n){var t=n.querySelector(".groupModal-button"),i=n.querySelector(".groupModal-confirm .groupModal-input");i&&t&&t.hasAttribute("data-href")&&i.addEventListener("input",function(){i.checked?(t.setAttribute("href",t.getAttribute("data-href")),t.removeAttribute("data-href")):(t.setAttribute("data-href",t.getAttribute("href")),t.removeAttribute("href"))})});window.addEventListener("DOMContentLoaded",function(){document.addEventListener("click",function(n){triggerEvent(n)})});touchmoved=!1;document.addEventListener("touchend",function(n){touchmoved||triggerEvent(n)});document.addEventListener("touchmove",function(){touchmoved=!0});document.addEventListener("touchstart",function(){touchmoved=!1});window.addEventListener("DOMContentLoaded",function(){var n=document.querySelector(".popup");n!==null&&attachModalFocusTrap(n)});$.fn.retach=function(n){function o(n){var t=window.matchMedia("(max-width: "+l+"px)").matches,i=n.hasClass(r);t&&!i&&(u==="prepend"?c.prepend(n):u==="append"&&c.append(n),n.addClass(r),y.call(this),f!=void 0&&n.wrap(f));return}function s(n){var t=window.matchMedia("(max-width: "+l+"px)").matches,i=n.hasClass(r);t||(f!=void 0&&n.parent().attr("data-wrapperid")==h&&n.unwrap(),e.after(n),n.removeClass(r),p.call(this));return}var v={destination:"body",mediaQuery:1023,movedClass:"is-moved",moveMethod:"append",wrapper:"",callback_move:function(){return},callback_back:function(){return}},t=$.extend({},v,n),i=this,c=$(t.destination),l=t.mediaQuery,r=t.movedClass,u=t.moveMethod,y=t.callback_move,p=t.callback_back,h,f,a,e;t.wrapper!==""&&(h=Math.floor(Math.random()*1e4+1)+Math.floor(Math.random()*1e4+1),f=$("<"+t.wrapper+"/>",{"data-wrapperid":h}));a=Math.floor(Math.random()*1e4+1)+Math.floor(Math.random()*1e4+1);e=$('<i class="placeholder" data-placeholderid="'+a+'" />');e.css("display","none");i.each(function(n){n===0&&$(this).before(e)});u==="prepend"&&($(i.get().reverse()).each(function(){var n=$(this);o(n);$(window).on("load resize",function(){o(n)})}),i.each(function(){var n=$(this);s(n);$(window).on("load resize",function(){s(n)})}));u==="append"&&(i.each(function(){var n=$(this);o(n);$(window).on("load resize",function(){o(n)})}),$(i.get().reverse()).each(function(){var n=$(this);s(n);$(window).on("load resize",function(){s(n)})}))};ready("retachLogin",".headerMain-login",function(n){$(n).retach({destination:".headerMain-navHeader",mediaQuery:1100})});ready("retachLanguage",".headerMain-language",function(n){$(n).retach({destination:".headerMain-navHeader",mediaQuery:1100})});ready("retachRegion",".headerMain-region",function(n){$(n).retach({destination:".headerMain-navHeader",mediaQuery:1100})});ready("retachProfile",".headerMain-profileBtn",function(n){$(n).retach({destination:".headerMain-navHeader",mediaQuery:1100})});ready("retachDonate",".headerMain-donateCta",function(n){$(n).retach({destination:".headerMain-donateMobile",mediaQuery:1100})});ready("swap","[data-lg][data-sm]",function(n){$(n).swapBackground({mediaQuery:768})}),function(n){n.fn.swapBackground=function(t){var i=t;return this.each(function(){function f(){window.matchMedia("(max-width: "+u+"px)").matches?t.attr("data-sm")?t.css("background-image","url("+o+")"):t.css("background-image",""):t.attr("data-lg")?t.css("background-image","url("+s+")"):t.css("background-image","")}var e={srcSm:n(this).data("sm"),srcLg:n(this).data("lg"),mediaQuery:1023},r=n.extend({},e,i),t=n(this),o=r.srcSm,s=r.srcLg,u=r.mediaQuery;f();window.matchMedia("(max-width: "+u+"px)").addListener(f)})}}(jQuery);ready("timeline",".timeline-wrapper",function(){function v(n,t,i){var r=[];for(n=n.nextElementSibling;n;){if(n.matches(t))break;if(i&&!n.matches(i)){n=n.nextElementSibling;continue}r.push(n);n=n.nextElementSibling}return r}var n=document.querySelectorAll(".timeline--date"),u=[],e=document.querySelectorAll(".timeline__video"),t=document.querySelectorAll(".timeline-nav .button"),o=document.querySelector(".timeline-nav__inner"),s=function(n){var u=/(youtu.*be.*)\/(watch\?v=|embed\/|v|shorts|)(.*?((?=[&#?])|$))/m,t=void 0,r=void 0,f,i;u.test(n)?(t=u.exec(n)[3],r='<iframe width="560" height="315" src="https://www.youtube.com/embed/'+t+'" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen><\/iframe>'):(t=n,r='<video controls width="560" height="315"><source src="'+t+'" type="video/mp4">Download the <a href="'+t+'">MP4<\/a>\tvideo.<\/video>');f='\n\t\t<div\n\t\tid="'+t+'"\n\t\tclass="dialog-container"\n\t\taria-labelledby="'+t+'-title"\n\t\taria-hidden="true"\n\t  >\n\t\t<div class="dialog-overlay" data-a11y-dialog-hide><\/div>\n\t\t<!-- 3. The actual dialog -->\n\t\t<div class="dialog-content" role="document">\n\t\t  <!-- 4. The close button -->\n\t\t  <button class="dialog-close" type="button" data-a11y-dialog-hide aria-label="Close dialog">\n\t\t\t&times;\n\t\t  <\/button>\n\t\t  <!-- 5. The dialog title -->\n\t\t  <p class="h4 dialog-title" id="'+t+'-title">Arthritis.org Video Player<\/p>\n\t\t  <!-- 6. Dialog content -->\n\t\t  '+r+"\n\t\t<\/div>\n\t  <\/div>\n\t\t";document.body.insertAdjacentHTML("afterend",f);i=new A11yDialog(document.getElementById(""+t));i.show();i.on("hide",function(){i.$el.remove()})},h=function(n){if(n.previousElementSibling){var t=[];return t[0]=n.getBoundingClientRect(),t[1]=n.previousElementSibling.previousElementSibling.getBoundingClientRect(),!(t[0].bottom<t[1].top||t[0].top>t[1].bottom)}return!1},c=function(n,t){var i=n.offsetLeft+n.clientWidth+r.translate;(i<n.clientWidth||i>o.clientWidth)&&r.slideTo(t)},i,r;document.body.classList.add("js-timeline");e.forEach(function(n){n.addEventListener("click",function(){s(n.dataset.video)})});t.forEach(function(n){n.addEventListener("click",function(){n.classList.add("is-active");f(t,n)})});var f=function(n,t){n.forEach(function(n){n!=t&&n.classList.remove("is-active")})},l=new IntersectionObserver(function(n){n.forEach(function(n){var i,r;if(n.isIntersecting)for(i=0;i<t.length;i++)if(r=t[i],r.hash.substring(1)===n.target.id){r.classList.add("is-active");c(r,i);f(t,r);break}})}),a=function(t){h(n[t])?n[t].classList.add("is-overlap"):"";u.push(v(n[t],".timeline--date"));l.observe(n[t]);n[t].addEventListener("click",function(){u[t].forEach(function(i){i.classList.contains("is-closed")?(i.classList.remove("is-closed"),i.classList.add("is-open"),i.style.display=i.style.display==="none"?"list-item":"none",n[t].style.setProperty("--hide-text","'hide'")):(i.classList.remove("is-open"),i.classList.add("is-closed"),n[t].style.setProperty("--hide-text","'show'"));i.addEventListener("animationend",function(){i.style.display=i.style.display==="none"?"list-item":"none"})})})};for(i=0;i<n.length;i++)a(i);r=new Swiper(".swiper",{loop:!1,initialSlide:0,navigation:{nextEl:".timeline-nav__control--next",prevEl:".timeline-nav__control--prev"},slidesPerView:"auto",spaceBetween:0})});ready("directory",".directory",function(n){var i=window.matchMedia("(max-width: 849px)"),r=n.querySelector(".js-directory-trigger"),u=[].concat(_toConsumableArray(n.querySelectorAll(".directory-trigger"))),t=function t(n){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1,o=n.parentElement,i=n.nextElementSibling,r={},f={};r.height=i.offsetHeight+"px";r.visibility=getComputedStyle(i).visibility;r.boxShadow=getComputedStyle(i).boxShadow;o[e?"removeAttribute":"toggleAttribute"]("data-active")?(n.setAttribute("data-active",""),i.setAttribute("data-active","")):(n.removeAttribute("data-active"),i.removeAttribute("data-active"));f.height=i.offsetHeight+"px";f.visibility=getComputedStyle(i).visibility;f.boxShadow=getComputedStyle(i).boxShadow;i.animate([r,f],{duration:200,easing:"ease"});n.matches(".directory-title")&&!n.hasAttribute("data-active")&&u.forEach(function(n){return t(n,!0)})},e=function(n){i.matches||n.target.closest(".directory-item")||u.forEach(function(n){return t(n,!0)})},f=function(){i.matches?r.removeAttribute("tabindex"):r.setAttribute("tabindex",-1);[].concat(_toConsumableArray(n.querySelectorAll("[data-active]"))).forEach(function(n){return n.removeAttribute("data-active")})};u.forEach(function(n){var i=u.filter(function(t){return t!==n});n.addEventListener("click",function(r){r.preventDefault();r.stopPropagation();t(n);i.forEach(function(n){return t(n,!0)})})});r.addEventListener("click",function(n){n.preventDefault();n.stopPropagation();i.matches&&t(r)});i.addEventListener("change",f);f();document.addEventListener("click",e)});ready("filterData",".filterData",function(n){function u(n){for(var u,f,r=n.target.value.toUpperCase(),t=0;t<i.length;t++)u=i[t].cells[0].textContent.toUpperCase(),f=i[t].cells[1].textContent.toUpperCase(),i[t].style.display=u.indexOf(r)>-1||f.indexOf(r)>-1?"":"none"}var r=n.querySelector(".filterData-dataTable"),t=n.querySelector(".filterData-input"),i=[].concat(_toConsumableArray(r.querySelectorAll("tbody tr")));t.addEventListener("keyup",u,!1);t.addEventListener("focus",function(){t.parentElement.classList.add("is-focused")});t.addEventListener("blur",function(){t.parentElement.classList.remove("is-focused")})});ready("dataTable",".dataTable",function(n){function v(){t.forEach(function(n){if(n.classList.contains("dataTable-shrinkCol")){n.classList.add("test");var t=[].concat(_toConsumableArray(n.parentElement.children)).indexOf(n),r=i.filter(function(n){var i=[].concat(_toConsumableArray(n.parentElement.children)).indexOf(n);t==i&&(n.style.textAlign="center")})}})}function s(){e.forEach(function(n){var t=n.closest("td").querySelector(".dataTable-hidden");t.innerHTML=n.checked==!0?"Yes":"No"})}function h(){u.matches&&(i.forEach(function(n){return n.style.height=""}),t.forEach(function(n){return n.style.height=""}),t.forEach(function(n){var t=n.offsetHeight,r=[].concat(_toConsumableArray(n.parentElement.children)).indexOf(n),u=i.filter(function(n){var i=[].concat(_toConsumableArray(n.parentElement.children)).indexOf(n);return r==i?(n.offsetHeight>t&&(t=n.offsetHeight),!0):!1});n.style.height=t+"px";u.forEach(function(n){return n.style.height=t+"px"})}))}function y(){i.forEach(function(n){return n.style.height=""});t.forEach(function(n){return n.style.height=""})}function p(){i.forEach(function(n){return n.style.textAlign=""})}function c(n){n.matches?(p(),h(),window.addEventListener("resize",h)):(y(),v())}var l=n.querySelector("thead"),r=n.querySelector("tbody"),t=[].concat(_toConsumableArray(l.querySelectorAll("th"))),i=[].concat(_toConsumableArray(r.querySelectorAll("td"))),a=[].concat(_toConsumableArray(r.querySelectorAll("tr"))),u=window.matchMedia("(max-width: 1200px)"),e=n.querySelectorAll(".dataTable-chk"),f,o;n.classList.contains("dataTable--sortable")&&(f=function(n,t){return n.children[t].innerText||n.children[t].textContent},o=function(n,t){return function(i,r){return function(n,t){return n!==""&&t!==""&&!isNaN(n)&&!isNaN(t)?n-t:n.toString().localeCompare(t)}(f(t?i:r,n),f(t?r:i,n))}},t.forEach(function(n){n.classList.contains("disable")||n.addEventListener("click",function(){a.sort(o(t.indexOf(n),n.asc=!n.asc)).forEach(function(n){return r.appendChild(n)})})}));s();e.forEach(function(n){n.addEventListener("click",function(){s()})});u.addListener(c);c(u)});ready("editable",".editable",function(n){var e=n.querySelector(".editable-inner"),t=Quill.import("ui/icons"),i;t.header[1]='\n    <svg width="17px" height="12px" viewBox="0 0 17 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n        <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n            <g id="h3" fill="currentColor">\n                <path d="M1.992,12.728 C1.81066576,12.9093342 1.58966797,13 1.329,13 C1.06833203,13 0.84733424,12.9093342 0.666,12.728 C0.48466576,12.5466658 0.394,12.325668 0.394,12.065 L0.394,1.525 C0.394,1.26433203 0.48466576,1.04333424 0.666,0.862 C0.84733424,0.68066576 1.06833203,0.59 1.329,0.59 C1.58966797,0.59 1.81066576,0.68066576 1.992,0.862 C2.17333424,1.04333424 2.264,1.26433203 2.264,1.525 L2.264,5.503 C2.264,5.60500051 2.31499949,5.656 2.417,5.656 L7.381,5.656 C7.48300051,5.656 7.534,5.60500051 7.534,5.503 L7.534,1.525 C7.534,1.26433203 7.62466576,1.04333424 7.806,0.862 C7.98733424,0.68066576 8.20833203,0.59 8.469,0.59 C8.72966797,0.59 8.95066576,0.68066576 9.132,0.862 C9.31333424,1.04333424 9.404,1.26433203 9.404,1.525 L9.404,12.065 C9.404,12.325668 9.31333424,12.5466658 9.132,12.728 C8.95066576,12.9093342 8.72966797,13 8.469,13 C8.20833203,13 7.98733424,12.9093342 7.806,12.728 C7.62466576,12.5466658 7.534,12.325668 7.534,12.065 L7.534,7.271 C7.534,7.16899949 7.48300051,7.118 7.381,7.118 L2.417,7.118 C2.31499949,7.118 2.264,7.16899949 2.264,7.271 L2.264,12.065 C2.264,12.325668 2.17333424,12.5466658 1.992,12.728 Z M11.42,8.63 C11.3266662,8.7033337 11.2283339,8.7133336 11.125,8.66 C11.0216661,8.6066664 10.97,8.5200006 10.97,8.4 L10.97,7.67 C10.97,7.2899981 11.1233318,6.9900011 11.43,6.77 L12.44,6.03 C12.7400015,5.8099989 13.0833314,5.7 13.47,5.7 L14.1,5.7 C14.2533341,5.7 14.3866661,5.7566661 14.5,5.87 C14.6133339,5.9833339 14.67,6.1166659 14.67,6.27 L14.67,12.43 C14.67,12.5833341 14.6133339,12.7166661 14.5,12.83 C14.3866661,12.9433339 14.2533341,13 14.1,13 L13.47,13 C13.3166659,13 13.1833339,12.9433339 13.07,12.83 C12.9566661,12.7166661 12.9,12.5833341 12.9,12.43 L12.9,7.57 L12.88,7.57 L11.42,8.63 Z" id="Shape" fill-rule="nonzero"><\/path>\n            <\/g>\n        <\/g>\n    <\/svg>';t=Quill.import("ui/icons");t.header[2]='\n    <svg width="17px" height="12px" viewBox="0 0 17 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n        <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n            <g id="h3" fill="currentColor">\n                <path d="M1.992,12.728 C1.81066576,12.9093342 1.58966797,13 1.329,13 C1.06833203,13 0.84733424,12.9093342 0.666,12.728 C0.48466576,12.5466658 0.394,12.325668 0.394,12.065 L0.394,1.525 C0.394,1.26433203 0.48466576,1.04333424 0.666,0.862 C0.84733424,0.68066576 1.06833203,0.59 1.329,0.59 C1.58966797,0.59 1.81066576,0.68066576 1.992,0.862 C2.17333424,1.04333424 2.264,1.26433203 2.264,1.525 L2.264,5.503 C2.264,5.60500051 2.31499949,5.656 2.417,5.656 L7.381,5.656 C7.48300051,5.656 7.534,5.60500051 7.534,5.503 L7.534,1.525 C7.534,1.26433203 7.62466576,1.04333424 7.806,0.862 C7.98733424,0.68066576 8.20833203,0.59 8.469,0.59 C8.72966797,0.59 8.95066576,0.68066576 9.132,0.862 C9.31333424,1.04333424 9.404,1.26433203 9.404,1.525 L9.404,12.065 C9.404,12.325668 9.31333424,12.5466658 9.132,12.728 C8.95066576,12.9093342 8.72966797,13 8.469,13 C8.20833203,13 7.98733424,12.9093342 7.806,12.728 C7.62466576,12.5466658 7.534,12.325668 7.534,12.065 L7.534,7.271 C7.534,7.16899949 7.48300051,7.118 7.381,7.118 L2.417,7.118 C2.31499949,7.118 2.264,7.16899949 2.264,7.271 L2.264,12.065 C2.264,12.325668 2.17333424,12.5466658 1.992,12.728 Z M11.35,13 C11.1966659,13 11.0633339,12.9433339 10.95,12.83 C10.8366661,12.7166661 10.78,12.5833341 10.78,12.43 L10.78,12.2 C10.78,11.8266648 10.9299985,11.5233345 11.23,11.29 C12.3500056,10.4099956 13.0916649,9.7400023 13.455,9.28 C13.8183351,8.8199977 14,8.3700022 14,7.93 C14,7.3166636 13.6600034,7.01 12.98,7.01 C12.5666646,7.01 12.060003,7.1233322 11.46,7.35 C11.3333327,7.3966669 11.2133339,7.3833337 11.1,7.31 C10.9866661,7.2366663 10.93,7.133334 10.93,7 L10.93,6.58 C10.93,6.4066658 10.9799995,6.25166735 11.08,6.115 C11.1800005,5.97833265 11.3133325,5.8866669 11.48,5.84 C12.0866697,5.6799992 12.6699972,5.6 13.23,5.6 C14.0366707,5.6 14.6583312,5.79166475 15.095,6.175 C15.5316688,6.55833525 15.75,7.0899966 15.75,7.77 C15.75,8.3566696 15.5650018,8.91499735 15.195,9.445 C14.8249981,9.97500265 14.1033387,10.6933288 13.03,11.6 C13.0233333,11.6066667 13.02,11.6133333 13.02,11.62 C13.02,11.6266667 13.0233333,11.63 13.03,11.63 L15.22,11.63 C15.3733341,11.63 15.5049995,11.6866661 15.615,11.8 C15.7250006,11.9133339 15.78,12.0466659 15.78,12.2 L15.78,12.43 C15.78,12.5833341 15.7250006,12.7166661 15.615,12.83 C15.5049995,12.9433339 15.3733341,13 15.22,13 L11.35,13 Z" id="Shape" fill-rule="nonzero"><\/path>\n            <\/g>\n        <\/g>\n    <\/svg>';t=Quill.import("ui/icons");t.header[3]='\n    <svg width="17px" height="12px" viewBox="0 0 17 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n        <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n            <g id="h3" fill="currentColor">\n                <path d="M1.992,12.728 C1.81066576,12.9093342 1.58966797,13 1.329,13 C1.06833203,13 0.84733424,12.9093342 0.666,12.728 C0.48466576,12.5466658 0.394,12.325668 0.394,12.065 L0.394,1.525 C0.394,1.26433203 0.48466576,1.04333424 0.666,0.862 C0.84733424,0.68066576 1.06833203,0.59 1.329,0.59 C1.58966797,0.59 1.81066576,0.68066576 1.992,0.862 C2.17333424,1.04333424 2.264,1.26433203 2.264,1.525 L2.264,5.503 C2.264,5.60500051 2.31499949,5.656 2.417,5.656 L7.381,5.656 C7.48300051,5.656 7.534,5.60500051 7.534,5.503 L7.534,1.525 C7.534,1.26433203 7.62466576,1.04333424 7.806,0.862 C7.98733424,0.68066576 8.20833203,0.59 8.469,0.59 C8.72966797,0.59 8.95066576,0.68066576 9.132,0.862 C9.31333424,1.04333424 9.404,1.26433203 9.404,1.525 L9.404,12.065 C9.404,12.325668 9.31333424,12.5466658 9.132,12.728 C8.95066576,12.9093342 8.72966797,13 8.469,13 C8.20833203,13 7.98733424,12.9093342 7.806,12.728 C7.62466576,12.5466658 7.534,12.325668 7.534,12.065 L7.534,7.271 C7.534,7.16899949 7.48300051,7.118 7.381,7.118 L2.417,7.118 C2.31499949,7.118 2.264,7.16899949 2.264,7.271 L2.264,12.065 C2.264,12.325668 2.17333424,12.5466658 1.992,12.728 Z M11.32,7.07 C11.1666659,7.07 11.0333339,7.0133339 10.92,6.9 C10.8066661,6.7866661 10.75,6.6533341 10.75,6.5 L10.75,6.27 C10.75,6.1166659 10.8066661,5.9833339 10.92,5.87 C11.0333339,5.7566661 11.1666659,5.7 11.32,5.7 L15.05,5.7 C15.2033341,5.7 15.3366661,5.7566661 15.45,5.87 C15.5633339,5.9833339 15.62,6.1166659 15.62,6.27 L15.62,6.5 C15.62,6.8800019 15.4733348,7.1899988 15.18,7.43 L13.67,8.68 L13.67,8.69 C13.67,8.6966667 13.6733333,8.7 13.68,8.7 L13.8,8.7 C14.3800029,8.7 14.8449983,8.8799982 15.195,9.24 C15.5450018,9.6000018 15.72,10.0866636 15.72,10.7 C15.72,11.4733372 15.4833357,12.0666646 15.01,12.48 C14.5366643,12.8933354 13.8566711,13.1 12.97,13.1 C12.436664,13.1 11.8966694,13.0366673 11.35,12.91 C11.1899992,12.8699998 11.0583339,12.7816674 10.955,12.645 C10.8516662,12.5083327 10.8,12.3533342 10.8,12.18 L10.8,11.84 C10.8,11.706666 10.8549995,11.6016671 10.965,11.525 C11.0750006,11.448333 11.196666,11.4299998 11.33,11.47 C11.9033362,11.6566676 12.4033312,11.75 12.83,11.75 C13.2166686,11.75 13.5166656,11.6600009 13.73,11.48 C13.9433344,11.2999991 14.05,11.0500016 14.05,10.73 C14.05,10.4033317 13.9266679,10.173334 13.68,10.04 C13.4333321,9.906666 12.9733367,9.8366667 12.3,9.83 C12.1466659,9.83 12.0133339,9.77500055 11.9,9.665 C11.7866661,9.55499945 11.73,9.4233341 11.73,9.27 L11.73,9.25 C11.73,8.8766648 11.8733319,8.5666679 12.16,8.32 L13.58,7.09 L13.58,7.08 C13.58,7.0733333 13.5766667,7.07 13.57,7.07 L11.32,7.07 Z" id="Shape" fill-rule="nonzero"><\/path>\n            <\/g>\n        <\/g>\n    <\/svg>';t=Quill.import("ui/icons");t.header[4]='\n    <svg width="17px" height="12px" viewBox="0 0 17 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n        <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n            <g id="h3" fill="currentColor">\n                <path d="M1.992,12.728 C1.81066576,12.9093342 1.58966797,13 1.329,13 C1.06833203,13 0.84733424,12.9093342 0.666,12.728 C0.48466576,12.5466658 0.394,12.325668 0.394,12.065 L0.394,1.525 C0.394,1.26433203 0.48466576,1.04333424 0.666,0.862 C0.84733424,0.68066576 1.06833203,0.59 1.329,0.59 C1.58966797,0.59 1.81066576,0.68066576 1.992,0.862 C2.17333424,1.04333424 2.264,1.26433203 2.264,1.525 L2.264,5.503 C2.264,5.60500051 2.31499949,5.656 2.417,5.656 L7.381,5.656 C7.48300051,5.656 7.534,5.60500051 7.534,5.503 L7.534,1.525 C7.534,1.26433203 7.62466576,1.04333424 7.806,0.862 C7.98733424,0.68066576 8.20833203,0.59 8.469,0.59 C8.72966797,0.59 8.95066576,0.68066576 9.132,0.862 C9.31333424,1.04333424 9.404,1.26433203 9.404,1.525 L9.404,12.065 C9.404,12.325668 9.31333424,12.5466658 9.132,12.728 C8.95066576,12.9093342 8.72966797,13 8.469,13 C8.20833203,13 7.98733424,12.9093342 7.806,12.728 C7.62466576,12.5466658 7.534,12.325668 7.534,12.065 L7.534,7.271 C7.534,7.16899949 7.48300051,7.118 7.381,7.118 L2.417,7.118 C2.31499949,7.118 2.264,7.16899949 2.264,7.271 L2.264,12.065 C2.264,12.325668 2.17333424,12.5466658 1.992,12.728 Z M11.62,10.25 L11.62,10.26 C11.62,10.2666667 11.6233333,10.27 11.63,10.27 L13.28,10.27 C13.3400003,10.27 13.37,10.2433336 13.37,10.19 L13.37,7.77 C13.37,7.7633333 13.3666667,7.76 13.36,7.76 C13.3466666,7.76 13.34,7.7633333 13.34,7.77 L11.62,10.25 Z M10.68,11.6 C10.5266659,11.6 10.3950005,11.5433339 10.285,11.43 C10.1749995,11.3166661 10.12,11.1833341 10.12,11.03 L10.12,10.84 C10.12,10.4666648 10.2299989,10.1233349 10.45,9.81 L13.04,6.16 C13.2600011,5.8533318 13.5566648,5.7 13.93,5.7 L14.43,5.7 C14.5833341,5.7 14.7149994,5.7566661 14.825,5.87 C14.9350006,5.9833339 14.99,6.1166659 14.99,6.27 L14.99,10.19 C14.99,10.2433336 15.0199997,10.27 15.08,10.27 L15.48,10.27 C15.6333341,10.27 15.7666661,10.3266661 15.88,10.44 C15.9933339,10.5533339 16.05,10.6866659 16.05,10.84 L16.05,11.03 C16.05,11.1833341 15.9933339,11.3166661 15.88,11.43 C15.7666661,11.5433339 15.6333341,11.6 15.48,11.6 L15.08,11.6 C15.0199997,11.6 14.99,11.6299997 14.99,11.69 L14.99,12.43 C14.99,12.5833341 14.9350006,12.7166661 14.825,12.83 C14.7149994,12.9433339 14.5833341,13 14.43,13 L13.93,13 C13.7766659,13 13.6450005,12.9433339 13.535,12.83 C13.4249995,12.7166661 13.37,12.5833341 13.37,12.43 L13.37,11.69 C13.37,11.6299997 13.3400003,11.6 13.28,11.6 L10.68,11.6 Z" id="Shape" fill-rule="nonzero"><\/path>\n            <\/g>\n        <\/g>\n    <\/svg>';i=new Quill(e,{modules:{toolbar:[["bold","italic"],["link","blockquote"],[{header:"1"},{header:"2"},{header:"3"},{header:"4"},{list:"ordered"},{list:"bullet"}]]},placeholder:"Enter your content...",theme:"snow"});i.keyboard.bindings[9].unshift({key:9,handler:function(){var t=n.closest(".formBlock").nextElementSibling.querySelector(".ql-editor");t!==undefined&&t.focus()}});var u=n.closest(".formWrap"),s=u.querySelector("[type='submit']")||u.querySelector(".formValidate-submit"),f=n.querySelector(".ql-editor"),r=n.querySelector(".formInput");console.log(f);f.addEventListener("keypress",function(){var n=i.getText().trim();r!==""?(console.log("stuff"),r.value=JSON.stringify(i.getContents()),r.addEventListener("change",console.log("change"))):(console.log("nostuff"),r.value="")})});ready("comments",".comments",function(n){function r(n){var u=this;n.preventDefault();var r=this.closest(".comments-commentInner"),i=r&&r.getAttribute("data-reply-toggle-id"),f=t.filter(function(n){return n!=u});f.forEach(function(n){return n.closest(".comments-commentInner").classList.remove("is-replying")});document.querySelector('[name="replyEditor1-'+i+'"]')&&CKEDITOR.replace("replyEditor1-"+i);document.querySelector('[name="replyEditor2-'+i+'"]')&&CKEDITOR.replace("replyEditor2-"+i);r.classList.toggle("is-replying")}function u(n){var u=this,t,r;n.preventDefault();t=this.closest(".comments-commentInner");r=i.filter(function(n){return n!=u});r.forEach(function(n){return n.closest(".comments-commentInner").classList.remove("is-replying")});t.classList.remove("is-replying")}var t=[].concat(_toConsumableArray(n.querySelectorAll(".comments-replyToggle"))),i=[].concat(_toConsumableArray(n.querySelectorAll(".comments-replyCancel"))),f=document.querySelectorAll(".comments-replyInput");t.forEach(function(n){return n.addEventListener("click",r)});i.forEach(function(n){return n.addEventListener("click",u)})});ready("quickLinks",".quickLinks",function(n){var t=n.querySelector("input"),r=n.querySelector("button"),i=function(n){var i,r;n.preventDefault();t.value.trim().length&&(n.type=="click"&&(i="/search?query="+t.value,window.location.href=i),n.type=="keyup"&&n.key=="Enter"&&(r="/search?query="+t.value,window.location.href=r))};r.addEventListener("click",i);t.addEventListener("keyup",i)});$(document).ready(function(){initTabs();$(".tabsUtil--accordion .tabsUtil-trigger").each(function(){var n=$(this).attr("data-trigger"),t=$(this).text(),i=$(".tabsUtil-contentItem[data-target^='"+n+"']"),r=$("<div>",{"class":"tabsUtil-accordionTrigger","data-trigger":n}).html(t);$(this).closest(".tabsUtil").find(i).before(r);$(".tabsUtil-accordionTrigger:first-of-type").addClass("is-selected")});$(".tabsUtil-trigger, .tabsUtil-accordionTrigger").click(function(){processActiveTab($(this))});$(".tabsUtil-accordionTrigger").on("click",function(){$("html, body").animate({scrollTop:$(this).offset().top-50},500)})});window.ArthritisAnalytics=window.ArthritisAnalytics||{};ArthritisAnalytics.trackSearch=function(n){n&&window.dataLayer&&window.dataLayer.push({event:"search",search:{query:n.trim()}})};ArthritisAnalytics.trackDonation=function(n,t){window.dataLayer&&window.dataLayer.push({event:"donation_click",donation:{campaign_id:n||"",source:t||""}})};ArthritisAnalytics.initSearchTracking=function(){var n=document.querySelectorAll('input[type="search"]');n.forEach(function(n){n.addEventListener("submit",function(){n&&n.value&&ArthritisAnalytics.trackSearch(n.value)})})};ArthritisAnalytics.initDonationTracking=function(){var n="CampaignUnknown",t=document.querySelectorAll('[data-track="donation"], .headerMain-donateCta');t.forEach(function(t){t.addEventListener("click",function(){var i,t,r;if(this.tagName.toLowerCase()==="a"&&this.href)try{i=new URLSearchParams(this.href.split("?")[1]);n=i.get("form")||""}catch(u){console.error("Error parsing campaign ID:",u)}t=this.closest("[id]");r=t?t.id:this.className||"unknown";ArthritisAnalytics.trackDonation(n,r)})})};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",initAnalyticsTracking):initAnalyticsTracking();ready("events",".events",function(n){var i=n.querySelector(".events__list"),r=n.querySelector(".events__pagination"),e=5,u=[],t=1,h=function(){return n.querySelector(".events__input").value},c=function(){return n.querySelector(".events__filter.active").dataset.filter},l=function(t){var i=n.querySelector(".events__tab.active").dataset.tab;return i===""?t:i==="virtual"?t.filter(function(n){return n.virtual===!0}):t.filter(function(n){return n.virtual===!1})},a=function(n){var i=(t-1)*e,r=i+e;return n.slice(i,r)},v=function(t){t.length===0&&o();t.forEach(function(t){var f=n.querySelector("#event__template"),r=f.content.cloneNode(!0).querySelector(".event"),e=r.querySelector(".event__date"),o=r.querySelector(".event__title"),s=r.querySelector(".event__location"),u=new Date(t.startDate),h=new Intl.DateTimeFormat("en-US",{month:"short"}).format(u),c=u.getDate(),l=t.virtual===!0?"Virtual":""+(t.city||"")+(t.state?", "+t.state:"");e.textContent=h+". "+c;o.textContent=t.name;s.textContent=l;r.href=t.url;t.url.includes("/events/event-detail/")||r.setAttribute("target","_blank");i.appendChild(r)})},y=function(i){var o=n.querySelector("#pagination__template"),f=Array(Math.ceil(i/e)).fill(0).map(function(n,t){return t+1}),h=function(n){t=parseInt(n.target.dataset.page);s(u)};(r.innerHTML="",f.length!==1)&&f.forEach(function(n){var u=o.content.cloneNode(!0),i=u.querySelector(".events__pagination-item");i.textContent=n;i.dataset.page=n;n===t&&i.classList.add("active");r.appendChild(i);i.addEventListener("click",h)})},p=function(){var t=n.querySelector(".events__search"),i=t.querySelector(".events__input"),r=t.querySelector(".events__button");i.addEventListener("keydown",function(n){n.stopPropagation();n.key==="Enter"&&(n.preventDefault(),f())});r.addEventListener("click",function(n){n.stopPropagation();n.preventDefault();f()})},w=function(){var t=n.querySelector(".events__filters"),i=t.querySelector(".events__active"),s=t.querySelector(".events__dropdown"),r=t.querySelectorAll(".events__filter"),u=window.matchMedia("(min-width: 1100px)"),e=function(n){n.stopPropagation();n.target.closest(".events__active")?t.classList.toggle("active"):t.classList.remove("active")},o=function(){var n=s.querySelector(".active");u.matches||(i.textContent=n.textContent)},h=function(n){var t=n.target.closest(".events__filter");r.forEach(function(n){return n.classList.remove("active")});t.classList.add("active");i.textContent=t.textContent;f()};r.forEach(function(n){return n.addEventListener("click",h)});i.addEventListener("click",e);window.addEventListener("click",e);u.addEventListener("change",o);o()},b=function(){var r=n.querySelector(".events__tabs"),i=r.querySelectorAll(".events__tab"),f=function(n){i.forEach(function(n){return n.classList.remove("active")});n.target.closest(".events__tab").classList.add("active");t=1;s(u)};i.forEach(function(n){return n.addEventListener("click",f)})},o=function(){i.innerHTML='<div class="eventHighlight-sectionTitle">There are no events within one hundred miles of your area.<\/div>'},s=function(n){i.innerHTML="";r.innerHTML="";var t=JSON.parse(JSON.stringify(n));t=l(t);y(t.length);t=a(t);t.length>0?v(t):o()},f=function(){i.innerHTML="";r.innerHTML="";t=1;var f=h(),e=c(),l=n.dataset.endpoint+"?zipCode="+f+"&latitude=&longitude=&eventType="+e;fetch(l).then(function(n){n.ok&&n.json().then(function(n){u=n;n.length===0?o():s(u)})})};p();w();b();f()});ready("accordion",".accordion",function(n){var r=[].concat(_toConsumableArray(n.querySelectorAll(".accordion-item"))),s=function(n){var i=n.querySelector(".accordion-itemTitle"),t=n.querySelector(".accordion-itemContent"),f=r.filter(function(t){return t!=n}),u=void 0;i.addEventListener("click",function(){var r=void 0,e,l,s;if(i.style.pointerEvents="none",t.style.transition="height 0.45s ease",n.classList.contains("is-active"))n.classList.remove("is-active"),setTimeout(function(){t.style.height=0},50),setTimeout(function(){t.style.transition="";i.style.pointerEvents=""},500);else if(u=f.filter(function(n){return n.classList.contains("is-active")}),n.classList.add("is-active"),t.style.height="auto",r=t.offsetHeight,t.style.height=0,u.length){setTimeout(function(){t.style.height=r+"px"},50);setTimeout(function(){t.style.transition="";i.style.pointerEvents=""},500);var a=function(n){n.classList.remove("is-active");n=n.querySelector(".accordion-itemContent");n.style.transition="height 0.45s ease";setTimeout(function(){n.style.height=0},50);setTimeout(function(){n.style.transition=""},500);s=n},o=!0,h=!1,c=undefined;try{for(e=u[Symbol.iterator]();!(o=(l=e.next()).done);o=!0)s=l.value,a(s)}catch(v){h=!0;c=v}finally{try{!o&&e.return&&e.return()}finally{if(h)throw c;}}}else setTimeout(function(){t.style.height=r+30+"px"},50),setTimeout(function(){t.style.height=r+"px"},500),setTimeout(function(){t.style.transition="";i.style.pointerEvents=""},1e3)})},i=!0,u=!1,f=undefined,t,e,o;try{for(t=r[Symbol.iterator]();!(i=(e=t.next()).done);i=!0)o=e.value,s(o)}catch(h){u=!0;f=h}finally{try{!i&&t.return&&t.return()}finally{if(u)throw f;}}});ready("footer",".footerMain-nav",function(n){var t=n.querySelector(".footerMain-navHeading");t!=null&&t.addEventListener("click",function(){if(!window.matchMedia("(min-width: 1100px)").matches){var t=n.querySelector(".footerMain-navContent"),i=void 0;n.classList.contains("is-active")?(n.classList.remove("is-active"),t.style.transition="height .25s ease",setTimeout(function(){t.style.height=0},50)):(n.classList.add("is-active"),t.style.height="auto",i=t.offsetHeight+"px",t.style.height=0,t.style.transition="height .25s ease",setTimeout(function(){t.style.height=i},50));setTimeout(function(){t.style.transition=""},300)}})});window.addEventListener("resize",function(){cleanFooter()});window.addEventListener("orientationchange",function(){cleanFooter()});FOCUSABLE_ELEMENTS='a[href]:not([href="#"]), button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])';ready("headerNavMainToggle",".headerMain-navToggle",function(n){n.addEventListener("click",function(){var i=document.querySelector(".headerMain"),y=[].concat(_toConsumableArray(document.querySelectorAll(".is-subActive"))),p=[].concat(_toConsumableArray(document.querySelectorAll(".is-thirdLevelNavActive"))),n,o,s,t,a,v;i.classList.contains("is-navOpen")?(i.classList.remove("is-navOpen"),document.body.classList.remove("noScroll")):(i.classList.add("is-navOpen"),media.matches||document.body.classList.add("noScroll"));var r=!0,f=!1,e=undefined;try{for(n=y[Symbol.iterator]();!(r=(o=n.next()).done);r=!0)s=o.value,s.classList.remove("is-subActive")}catch(h){f=!0;e=h}finally{try{!r&&n.return&&n.return()}finally{if(f)throw e;}}var u=!0,c=!1,l=undefined;try{for(t=p[Symbol.iterator]();!(u=(a=t.next()).done);u=!0)v=a.value,v.classList.remove("is-thirdLevelNavActive")}catch(h){c=!0;l=h}finally{try{!u&&t.return&&t.return()}finally{if(c)throw l;}}})});ready("headerMainLanguageSetup",".headerMain-language",function(n){var t=window.location.href;t.indexOf("espanol.arthritis")>-1?!n.querySelector('[data-lang="es"]')||n.querySelector('[data-lang="es"]').classList.add("is-active-language"):!n.querySelector('[data-lang="en"]')||n.querySelector('[data-lang="en"]').classList.add("is-active-language")});ready("headerMain-profile",".headerMain-profile",function(n){var i=n.querySelector(".headerMain-profileTrigger"),r=n.querySelector(".headerMain-profileDropdown"),e=document.querySelector(".headerMain-navContent ul"),t,u,f;if(r!=null){var s=i.innerHTML,o=r.innerHTML,h="<ul class='headerMain-navDropdown'>"+o+"<\/ul>";if(typeof theItems!="undefined")for(t=0;t<theItems.length;t++)theItems[t].classList.add("headerMain-navDropdownItem"),theItems[t].classList.remove("headerMain-profileDropdownItem")}else u=i.innerHTML,f="<li class='headerMain-navItem headerMain-navItem--profile'><a href='JavaScript:Void(0);'>"+u+"<\/a><\/li>",e.insertAdjacentHTML("afterbegin",f)});document.addEventListener("DOMContentLoaded",function(){var n=function(n){n.forEach(function(n){var t=n.querySelector(".secondLevelDropdownList");media.matches?(n.parentElement.style.position="relative",t.style.position="absolute",n.parentElement.matches(":nth-last-child(-n+3)")?t.style.right="0":t.style.left="0",n.matches(".headerMain-navSecondLevelDropdown--childless")&&(t.style.left=t.style.left-24+"px")):(t.style.position="static",n.parentElement.style.position="static")})},t=[].concat(_toConsumableArray(document.querySelectorAll(".headerMain-navSecondLevelDropdown")));t.forEach(function(i){var e=[].concat(_toConsumableArray(i.querySelectorAll(".headerMain-subSubnavItem--hasChildren"))),u,r,f;(e.length==0&&i.classList.add("headerMain-navSecondLevelDropdown--childless"),u=[].concat(_toConsumableArray(i.querySelectorAll(".headerMain-subSubnavItem--childless"))),u.length)&&(r=document.createElement("li"),f=document.createElement("ul"),r.classList.add("headerMain-subSubnavItem","headerMain-subSubnavItem--extra"),u.forEach(function(n){f.appendChild(n)}),r.appendChild(f),i.querySelector("ul").appendChild(r),n(t))});window.addEventListener("resize",function(){var t=[].concat(_toConsumableArray(document.querySelectorAll(".headerMain-navSecondLevelDropdown")));n(t)})});ready("headerNavSubToggle",".headerMain-navItem--hasChildren",function(n){function e(n){n.setAttribute("tabindex","0");n.setAttribute("aria-label","Toggle navigation menu with Enter key");n.setAttribute("type","button");n.setAttribute("role","menuitem");n.setAttribute("aria-expanded","false")}function r(){n.classList.remove("is-active");n.setAttribute("aria-expanded","false");t.setAttribute("aria-hidden","true");t.setAttribute("tabindex","-1")}function i(i){if(i){n.setAttribute("aria-expanded","true");t.setAttribute("aria-hidden","false");t.setAttribute("tabindex","0");return}n.setAttribute("aria-expanded","false");t.setAttribute("aria-hidden","true");t.setAttribute("tabindex","-1")}e(n);var t=n.querySelector(".headerMain-navSecondLevelDropdown"),u=[].concat(_toConsumableArray(t.querySelectorAll(FOCUSABLE_ELEMENTS))).filter(function(n){return!n.hasAttribute("disabled")&&!n.getAttribute("aria-hidden")}),f=u[u.length-1];f.addEventListener("keydown",function(n){if(n.stopPropagation(),n.shiftKey&&n.keyCode===9)return!0;n.keyCode===9&&r()});t.addEventListener("blur",function(){var n=t.matches(":focus-within");n||r()});t.setAttribute("aria-hidden","true");t.setAttribute("tabindex","-1");n.addEventListener("mouseenter",function(){media.matches&&(n.classList.add("is-active"),i(!0))});n.addEventListener("mouseleave",function(){media.matches&&(n.classList.remove("is-active"),i(!1))});n.addEventListener("keydown",function(u){var o,e,f;if(u.stopPropagation(),o=n.classList.contains("is-active"),u.code==="Escape"&&r(),u.code==="Enter"){if(e=n.querySelector(".toggle-menu"),document.activeElement===e){n.classList.add("is-active");i(!0);t.focus();return}f=n.querySelector(":scope > a");f&&f.getAttribute("href")&&(window.location.href=f.getAttribute("href"))}});n.insertAdjacentHTML("afterbegin",'<div class="headerMain-navItemToggle"><\/div>');n.querySelector(".headerMain-navItemToggle").addEventListener("click",function(){i(!0);t.focus();document.querySelector(".headerMain-navBack span").textContent="Back";n.classList.add("is-subActive");this.closest(".headerMain-nav").classList.add("is-subActive");var r=n.querySelector(".headerMain-persistentNavParent"),u=n.querySelector(":scope > a").textContent.trim(),f=n.querySelector(":scope > a").getAttribute("href")!==""?n.querySelector(":scope > a").getAttribute("href"):"#";r.textContent=u;r.setAttribute("href",f)})});ready("headerthirdLevelNavToggle",".headerMain-subSubnavItem--hasChildren",function(n){n.insertAdjacentHTML("afterbegin",'<div class="headerMain-navItemToggle"><\/div>');n.setAttribute("tabindex","-1");n.setAttribute("aria-label","Toggle navigation menu with Enter key");n.setAttribute("type","button");n.setAttribute("role","menuitem");n.setAttribute("aria-expanded","false");var t=n.querySelector(".headerMain-navThirdLevelDropdown");n.querySelector(".headerMain-navItemToggle").addEventListener("click",function(){var r,i,u,f;n.setAttribute("aria-expanded","true");t.setAttribute("aria-hidden","false");t.setAttribute("tabindex","0");t.focus();document.querySelector(".headerMain-navBack span").textContent="Back";this.closest(".headerMain-nav").classList.add("is-thirdLevelNavActive");n.classList.add("is-thirdLevelNavActive");r=n.querySelector(".headerMain-persistentNavParent");i=n.querySelector(":scope > :nth-child(2)");i.matches("a")&&(u=i.getAttribute("href")!==""?i.getAttribute("href"):"#",r.setAttribute("href",u));f=i.textContent.trim();r.textContent=f})});ready("headrNavBack",".headerMain-navBack",function(n){n.addEventListener("click",function(){var y=[].concat(_toConsumableArray(document.querySelectorAll(".is-subActive"))),u=[].concat(_toConsumableArray(document.querySelectorAll(".is-thirdLevelNavActive"))),n,o,s,t,a,v;if(u.length){var i=!0,f=!1,e=undefined;try{for(n=u[Symbol.iterator]();!(i=(o=n.next()).done);i=!0)s=o.value,s.classList.remove("is-thirdLevelNavActive")}catch(h){f=!0;e=h}finally{try{!i&&n.return&&n.return()}finally{if(f)throw e;}}}else{var r=!0,c=!1,l=undefined;try{for(t=y[Symbol.iterator]();!(r=(a=t.next()).done);r=!0)v=a.value,v.classList.remove("is-subActive")}catch(h){c=!0;l=h}finally{try{!r&&t.return&&t.return()}finally{if(c)throw l;}}}})});ready("stickyHeader",".headerMain",function(n){var u=document.querySelector("main"),e=document.body.classList.contains("js-timeline"),t=[].concat(_toConsumableArray(document.querySelectorAll(".articleNav"))).length?absHeight(n,!1):absHeight(n,!0);var i=window.pageYOffset,r=void 0,o=function(){r=window.pageYOffset;window.pageYOffset<t?(n.classList.add("is-active"),n.classList.add("is-top")):Math.abs(i-r)>10&&(r<i?(n.classList.add("is-active"),n.classList.remove("is-top")):(n.classList.remove("is-active"),n.classList.remove("is-top")),i=r)},f=function(){n.classList.remove("is-primed");n.classList.remove("is-active");n.classList.remove("is-top");n.style.top=0;t=[].concat(_toConsumableArray(document.querySelectorAll(".articleNav"))).length?absHeight(n,!1):absHeight(n,!0);i=window.pageYOffset;u.style.paddingTop=t+"px";n.classList.add("is-primed");n.classList.add("is-active")};e||(u.style.paddingTop=t+"px",n.classList.add("is-primed"),n.classList.add("is-active"),window.addEventListener("scroll",o),window.addEventListener("resize",f),window.addEventListener("orientationchange",f))});header=document.querySelector(".headerMain");toggleInertBasedOnVisibility=function(){var n=getComputedStyle(header),t=parseFloat(n.opacity),i=n.visibility,r=t===0||i==="hidden";r?header.setAttribute("inert",""):header.removeAttribute("inert")};toggleInertBasedOnVisibility();observer=new MutationObserver(toggleInertBasedOnVisibility);observer.observe(header,{attributes:!0,attributeFilter:["class"]});header.addEventListener("transitionend",function(n){n.propertyName==="opacity"&&toggleInertBasedOnVisibility()});ready("hero",".hero",function(n){var h=400,c=!0,d=5e3,g=n.dataset.randomize==="True",i=[].concat(_toConsumableArray(n.querySelectorAll(".hero-slide"))),p=n.querySelector(".hero-nav"),l=[].concat(_toConsumableArray(p.querySelectorAll(".nav-arrow"))),w=p.querySelector(".nav-dots"),o=i.length,t=0,r=void 0,f=void 0,u=void 0,a=void 0,e,v,it,rt,y,ot,st,s;if(g&&g===!0&&(i=i.map(function(n){return{value:n,sort:Math.random()}}).sort(function(n,t){return n.sort-t.sort}).map(function(n){return n.value})),i[0].classList.add("is-active"),i[0].classList.add("is-initial"),o>1){for(e=1;e<=o;e++)e==1?w.insertAdjacentHTML("beforeend",'<div class="nav-dot" data-current="'+e+'">'+e+"<\/div>"):w.insertAdjacentHTML("beforeend",'<div class="nav-dot">'+e+"<\/div>");u=[].concat(_toConsumableArray(w.querySelectorAll(".nav-dot")));u[0].classList.add("is-active")}else p.style.display="none";c&&(a=setInterval(function(){f="next";r=t<o-1?t+1:0;s&&s()},d+h*4));var ht=function(n){n.addEventListener("click",function(){if(c&&clearInterval(a),l.forEach(function(n){n.classList.add("is-inactive")}),u.forEach(function(n){n.classList.add("is-inactive")}),r=u.indexOf(n),r>t)f="next";else if(r<t)f="prev";else return;s(!0)})},b=!0,nt=!1,tt=undefined;try{for(v=u[Symbol.iterator]();!(b=(it=v.next()).done);b=!0)rt=it.value,ht(rt)}catch(ut){nt=!0;tt=ut}finally{try{!b&&v.return&&v.return()}finally{if(nt)throw tt;}}var ct=function(n){n.addEventListener("click",function(){c&&clearInterval(a);l.forEach(function(n){n.classList.add("is-inactive")});u.forEach(function(n){n.classList.add("is-inactive")});n.classList.contains("nav-arrow--next")?(f="next",r=t<o-1?t+1:0):(f="prev",r=t>0?t-1:o-1);s(!0)})},k=!0,ft=!1,et=undefined;try{for(y=l[Symbol.iterator]();!(k=(ot=y.next()).done);k=!0)st=ot.value,ct(st)}catch(ut){ft=!0;et=ut}finally{try{!k&&y.return&&y.return()}finally{if(ft)throw et;}}s=function s(){var n=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!1;i[t].classList.remove("is-initial");i[t].classList.add("is-leaving--"+f);i[t].classList.add("is-leaving");i[r].classList.add("is-active--"+f);i[r].classList.add("is-active");u[t].classList.remove("is-active");u[r].classList.add("is-active");u[0].setAttribute("data-current",r+1);setTimeout(function(){i[t].classList.remove("is-leaving");i[t].classList.remove("is-leaving--next");i[t].classList.remove("is-leaving--prev");i[t].classList.remove("is-active");i[t].classList.remove("is-active--next");i[t].classList.remove("is-active--prev");t=r},h*2);setTimeout(function(){i[r].classList.remove("is-active--next");i[r].classList.remove("is-active--prev");l.forEach(function(n){n.classList.remove("is-inactive")});u.forEach(function(n){n.classList.remove("is-inactive")});n&&c&&(a=setInterval(function(){f="next";r=t<o-1?t+1:0;s()},d+h*4))},h*4)}});ready("impact",".impact",function(n){var s=[].concat(_toConsumableArray(n.querySelectorAll(".impact-itemStat"))),r=function r(){var t=n.getBoundingClientRect().top,i=window.innerHeight*3/4;t<i&&setTimeout(function(){n.classList.add("is-active");window.removeEventListener("scroll",r)},500)},u=!0,f=!1,e=undefined,i,o;try{for(i=s[Symbol.iterator]();!(u=(o=i.next()).done);u=!0){for(var t=o.value,h=t.textContent.slice(0,1),c=t.textContent.slice(1,t.textContent.length);t.firstChild;)t.removeChild(t.firstChild);t.insertAdjacentHTML("afterbegin","<span>"+h+"<\/span><span>"+c+"<\/span>")}}catch(l){f=!0;e=l}finally{try{!u&&i.return&&i.return()}finally{if(f)throw e;}}window.addEventListener("scroll",r);r()});ready("eventHighlight",".eventHighlight",function(n){if(n.querySelector(".eventHighlight-goal")){var f=n.querySelector(".eventHighlight-goal > span:last-child").getAttribute("data-percent"),t=n.querySelector(".eventHighlight-goal > span > span"),i=!0,r=1e3,u=function u(){var n=t.getBoundingClientRect().top,e=window.innerHeight*3/4;setTimeout(function(){i=!1},r);n<e&&(setTimeout(function(){t.style.width=f},i?r:0),window.removeEventListener("scroll",u))};window.addEventListener("scroll",u)}});ready("info",".info:not(.info--textOnly)",function(n){var t=n.querySelector(".info-panels"),i=n.querySelector(".info-backgrounds"),u=[].concat(_toConsumableArray(t.querySelectorAll(".info-panel"))),f=[].concat(_toConsumableArray(i.querySelectorAll(".info-background"))),r=n.querySelector(".info-slider"),e,c,l;if(f!=null){var a=function(n){var t=u.indexOf(n);n.addEventListener("mouseover",function(){var i,l,a,e,w,b;if(mediaMd.matches){var o=!0,h=!1,c=undefined;try{for(i=u[Symbol.iterator]();!(o=(l=i.next()).done);o=!0)a=l.value,a.classList.remove("is-active")}catch(v){h=!0;c=v}finally{try{!o&&i.return&&i.return()}finally{if(h)throw c;}}var s=!0,y=!1,p=undefined;try{for(e=f[Symbol.iterator]();!(s=(w=e.next()).done);s=!0)b=w.value,b.classList.remove("is-active")}catch(v){y=!0;p=v}finally{try{!s&&e.return&&e.return()}finally{if(y)throw p;}}n.classList.add("is-active");f[t].classList.add("is-active");r.style.transform="translateX("+t*100+"%)"}})},o=!0,s=!1,h=undefined;try{for(e=u[Symbol.iterator]();!(o=(c=e.next()).done);o=!0)l=c.value,a(l)}catch(v){s=!0;h=v}finally{try{!o&&e.return&&e.return()}finally{if(s)throw h;}}}if(!mediaMd.matches){while(t.firstElementChild)t.insertAdjacentElement("beforebegin",t.firstElementChild);while(i.firstElementChild)i.insertAdjacentElement("beforebegin",i.firstElementChild);r.parentElement.removeChild(r);t.parentElement.removeChild(t);i.parentElement.removeChild(i)}mediaMd.addListener(function(e){var o,v,y,s,k,d;if(e.matches){n.insertAdjacentElement("afterbegin",r);u[0].insertAdjacentElement("beforebegin",t);f[0].insertAdjacentElement("beforebegin",i);var h=!0,l=!1,a=undefined;try{for(o=u[Symbol.iterator]();!(h=(v=o.next()).done);h=!0)y=v.value,t.insertAdjacentElement("beforeend",y)}catch(p){l=!0;a=p}finally{try{!h&&o.return&&o.return()}finally{if(l)throw a;}}var c=!0,w=!1,b=undefined;try{for(s=f[Symbol.iterator]();!(c=(k=s.next()).done);c=!0)d=k.value,i.insertAdjacentElement("beforeend",d)}catch(p){w=!0;b=p}finally{try{!c&&s.return&&s.return()}finally{if(w)throw b;}}}else{while(t.firstElementChild)t.insertAdjacentElement("beforebegin",t.firstElementChild);while(i.firstElementChild)i.insertAdjacentElement("beforebegin",i.firstElementChild);r.parentElement.removeChild(r);t.parentElement.removeChild(t);i.parentElement.removeChild(i)}})});ready("parallax",".parallax",function(n){var c=[].concat(_toConsumableArray(n.querySelectorAll(":scope > div"))),u=window.innerHeight,f=n.offsetHeight*-1,t=void 0,l=function(i){t=getComputedStyle(i).getPropertyValue("--parallax")||parseInt(getComputedStyle(i).fontFamily.replace('"',""));var r=function(){u=window.innerHeight;f=n.offsetHeight*-1;t=getComputedStyle(i).getPropertyValue("--parallax")||parseInt(getComputedStyle(i).fontFamily.replace('"',""))},e=function(){var e=n.getBoundingClientRect().top,r=between(e,f,u)*t;r>t?r=t:r<0&&(r=0);i.style.transform="translateY("+r+"px)"};window.addEventListener("scroll",e);window.addEventListener("resize",r);window.addEventListener("orientationchange",r);e()},r=!0,e=!1,o=undefined,i,s,h;try{for(i=c[Symbol.iterator]();!(r=(s=i.next()).done);r=!0)h=s.value,l(h)}catch(a){e=!0;o=a}finally{try{!r&&i.return&&i.return()}finally{if(e)throw o;}}});navigator.userAgent.match(/Trident\/7\./)&&window.addEventListener("DOMContentLoaded",function(){[].concat(_toConsumableArray(document.querySelectorAll(".parallax"))).length&&document.body.addEventListener("mousewheel",function(n){if(!document.querySelector("html").classList.contains("contributeBarOpen")){n.preventDefault();var t=n.wheelDelta,i=window.pageYOffset;window.scrollTo(0,i-t)}})});ready("searchPanelToggle",".headerMain-search",function(n){var u=n.querySelector(".headerMain-searchTrigger"),i=n.querySelector(".searchMain"),f=i.querySelector(".searchMain-close"),t=i.querySelector("input"),e=function e(){window.removeEventListener("keydown",e);t.addEventListener("focus",function(){var n=t.value;t.value="";t.value=n});t.focus()},r=function r(n){(n.type=="click"||n.key=="Escape")&&(window.removeEventListener("keydown",r),i.classList.remove("is-active"),document.body.classList.remove("noScroll"),t.value="");n.key=="Escape"&&u.focus()};u.addEventListener("click",function(){i.classList.add("is-active");media.matches||document.body.classList.add("noScroll");window.addEventListener("keydown",r)});u.addEventListener("keyup",function(n){n.key.toLowerCase()=="enter"&&(i.classList.add("is-active"),media.matches||document.body.classList.add("noScroll"),t.focus(),window.addEventListener("keydown",r))});f.addEventListener("click",r);f.addEventListener("keyup",function(n){n.key.toLowerCase()=="enter"&&(i.classList.remove("is-active"),document.body.classList.remove("noScroll"),t.value="")})});ready("doSearch",".searchMain-search",function(n){var t=n.querySelector("input"),r=n.querySelector("button"),i=function(n){var i,r;n.preventDefault();t.value.trim().length&&(n.type=="click"&&(ArthritisAnalytics.trackSearch(t.value),i="/search?query="+t.value,window.location.href=i),n.type=="keyup"&&n.key=="Enter"&&(ArthritisAnalytics.trackSearch(t.value),r="/search?query="+t.value,window.location.href=r))};r.addEventListener("click",i);t.addEventListener("keyup",i)});ready("filterItems",".filterItems",function(n){function d(){e.forEach(function(n){return n.classList.remove("is-active")});this.classList.add("is-active");i.forEach(function(n){n.classList.contains("is-showing")&&n.classList.add("is-leaving");n.classList.remove("is-showing");setTimeout(function(){n.classList.remove("is-showing","is-match","is-leaving")},350)});u=this.getAttribute("data-filter");r=u=="all"?i:i.filter(function(n){return n.getAttribute("data-filter")==u});r.forEach(function(n){n.classList.add("is-match");r.indexOf(n)<o?(t.style.display="none",setTimeout(function(){n.classList.add("is-showing")},350)):t.style.display="flex"});h.innerText=u==="all"?it:r.length+" total";f=1}function g(){f++;f*o>=r.length&&(t.style.display="none");r.forEach(function(n){r.indexOf(n)<f*o&&n.classList.add("is-showing")})}function s(n,e){n==="data-article-date"?i&&i.sort(function(t,i){return new Date(t.getAttribute(n))<new Date(i.getAttribute(n))?1:-1}):i&&i.sort(function(t,i){return t.getAttribute(n)>i.getAttribute(n)?1:-1});i&&i.forEach(function(n){return y&&y.appendChild(n)});p.innerText=e;r=u=="all"?i:i.filter(function(n){return n.getAttribute("data-filter")==u});r.forEach(function(n){n.classList.add("is-match");n.classList.remove("is-showing");r.indexOf(n)<f*o?(t.style.display="none",setTimeout(function(){n.classList.add("is-showing")},350)):t.style.display="flex"})}var e=[].concat(_toConsumableArray(n.querySelectorAll(".filterItems-menuItem"))),i=[].concat(_toConsumableArray(n.querySelectorAll(".fiterItems-item"))),v=n.dataset.loadingMode,t=n.querySelector(".filterItems-loadMore"),h=n.querySelector(".items-total"),y=n.querySelector(".fiterItems-items"),p=n.querySelector(".filterSort-menuTrigger"),w=n.querySelector(".sortAlph"),b=n.querySelector(".sortNewest"),k=n.querySelector(".sortFeatured"),it=h&&h.innerText,o=8,c=function(n){var r,t,i;if(n=="")return{};for(r={},t=0;t<n.length;++t)i=n[t].split("=",2),r[i[0]]=i.length==1?"":decodeURIComponent(i[1].replace(/\+/g," "));return r}(window.location.search.substr(1).split("&")),f=1,u=void 0,r=void 0,tt,a;if(document.addEventListener("keydown",function(n){if(n.key==="Enter"||n.key===" "){var t=document.activeElement;if(!t.matches(".filterItems-menuItem"))return;n.preventDefault();t.click()}}),e.forEach(function(n){n.addEventListener("click",d)}),v==="click"&&t.addEventListener("click",g),v==="lazy"){var l=t.querySelector(".filterItems-lazyLoadMessageText"),rt=t.dataset.loadingText,nt=t.dataset.staticText;l.innerText=nt;window.addEventListener("scroll",function(){var n=t.getBoundingClientRect();n.top>=0&&n.bottom<=window.innerHeight*.75&&(l.innerText=rt,t.classList.add("is-loading"),setTimeout(function(){g();t.classList.remove("is-loading");l.innerText=nt},1e3))})}d.apply(e[0]);p!==null&&document.addEventListener("keydown",function(n){var i,t,r;if(n.key==="Enter"||n.key===" "){if(i=document.activeElement,!i.matches(".filterSort-menuDropdownItem"))return;n.preventDefault();t="";r=i.querySelector("span").textContent;switch(r){case"Alphabetical":t="data-article-name";break;case"Newest":t="data-article-date";break;case"Featured":t="data-article-pop"}s(t,r)}});w!==null&&w.addEventListener("click",function(){s("data-article-name","Alphabetical")});b!==null&&b.addEventListener("click",function(){s("data-article-date","Newest")});k!==null&&k.addEventListener("click",function(){s("data-article-pop","Featured")});c.category!==undefined&&c.category.length>0&&(tt=c.category.toLowerCase(),a=e.filter(function(n){return n.getAttribute("data-filter")===tt})[0],a&&a.click())});ready("secNavScrollSpy",".secNav--internal",function(n){var t=[].concat(_toConsumableArray(n.querySelectorAll(".secNav-menuItem"))),i=[].concat(_toConsumableArray(document.querySelectorAll("[data-dest]"))),r;i=i.filter(function(n){return t.indexOf(n)==-1});r=function(){var o=void 0,a=void 0,n=void 0,v=0,s=!0,y=!1,p=undefined,r,w,u,f,d,g,e,it,rt;try{for(r=i[Symbol.iterator]();!(s=(w=r.next()).done);s=!0)u=w.value,(!n||percVisible(n)<=percVisible(u))&&inViewport(u)>100&&(n=u,v=percVisible(n))}catch(h){y=!0;p=h}finally{try{!s&&r.return&&r.return()}finally{if(y)throw p;}}if(v==0){var c=!0,b=!1,k=undefined;try{for(f=t[Symbol.iterator]();!(c=(d=f.next()).done);c=!0)g=d.value,g.classList.remove("is-active")}catch(h){b=!0;k=h}finally{try{!c&&f.return&&f.return()}finally{if(b)throw k;}}}else if(n){o=t.filter(function(t){return t.getAttribute("data-dest")==n.getAttribute("data-dest")})[0];a=t.filter(function(n){return n!=o});o.classList.add("is-active");var l=!0,nt=!1,tt=undefined;try{for(e=a[Symbol.iterator]();!(l=(it=e.next()).done);l=!0)rt=it.value,rt.classList.remove("is-active")}catch(h){nt=!0;tt=h}finally{try{!l&&e.return&&e.return()}finally{if(nt)throw tt;}}}};window.addEventListener("scroll",r)});ready("secNavSticky",".secNav",function(n){var t=n.querySelector(".secNav-nav"),i=n.querySelector(".secNav-navFixer"),u=document.querySelector(".headerMain"),f=i.offsetHeight,r=void 0,e=0,s=function(){r=t.getBoundingClientRect().top;u.classList.contains("is-active")?(e=u.offsetHeight,r=r-u.offsetHeight):e=0;r<=0?(t.classList.add("is-fixed"),i.style.top=e+"px"):(t.classList.remove("is-fixed"),i.style.top=0)},o=function(){f=i.offsetHeight;t.style.height=f+"px"};t.style.height=f+"px";window.addEventListener("scroll",s);window.addEventListener("resize",o);window.addEventListener("orientationchange",o)});ready("secNavAnchor",".secNav--internal",function(n){var u=[].concat(_toConsumableArray(n.querySelectorAll(".secNav-menuItem"))),c=document.querySelector(".headerMain"),i=[].concat(_toConsumableArray(document.querySelectorAll("[data-dest]"))),f=void 0,t,s,h;i=i.filter(function(n){return u.indexOf(n)==-1});var l=function(t){t.addEventListener("click",function(){f=n.querySelector("nav").offsetHeight;var u=i.filter(function(n){return n.getAttribute("data-dest")==t.getAttribute("data-dest")})[0],r=u.getBoundingClientRect().top-f-20;window.scrollBy({top:r>0?r:r-c.offsetHeight,behavior:"smooth"})})},r=!0,e=!1,o=undefined;try{for(t=u[Symbol.iterator]();!(r=(s=t.next()).done);r=!0)h=s.value,l(h)}catch(a){e=!0;o=a}finally{try{!r&&t.return&&t.return()}finally{if(e)throw o;}}});ready("tabsNavSticky",".tabsNav",function(n){var t=n.querySelector(".tabsNav-nav"),i=n.querySelector(".tabsNav-navFixer"),u=document.querySelector(".headerMain"),f=i.offsetHeight,r=void 0,e=0,s=function(){r=t.getBoundingClientRect().top;u.classList.contains("is-active")?(e=u.offsetHeight,r=r-u.offsetHeight):e=0;r<=0?(t.classList.add("is-fixed"),i.style.top=e+"px"):(t.classList.remove("is-fixed"),i.style.top=0)},o=function(){f=i.offsetHeight;t.style.height=f+"px"};t.style.height=f+"px";window.addEventListener("scroll",s);window.addEventListener("resize",o);window.addEventListener("orientationchange",o)});ready("tabsNavNav",".tabsNav",function(n){var t=[].concat(_toConsumableArray(n.querySelectorAll(".tabsNav-menuItem"))),i=[].concat(_toConsumableArray(n.parentElement.querySelectorAll(".tabsNav-content"))),u=document.querySelector(".headerMain").offsetHeight,r=void 0,f=function(){var e=this,o=t.indexOf(e),f=n.offsetTop;r=window.pageYOffset;r>f&&(f=f-u);t.forEach(function(n){return n.classList.remove("is-active")});i.forEach(function(n){return n.classList.remove("is-active")});e.classList.add("is-active");i[o].classList.add("is-active");window.scrollTo({top:f,behavior:"smooth"})};t.forEach(function(n){return n.addEventListener("click",f)})});ready("articleNavScrollSpy",".articleNav-nav",function(n){var t=[].concat(_toConsumableArray(n.querySelectorAll("li"))),i=[].concat(_toConsumableArray(document.querySelectorAll("[data-dest]"))),r;i=i.filter(function(n){return t.indexOf(n)==-1});r=function(){var l=function(n,t){return inViewport(n.el)>window.innerHeight*.8?n:Math.abs(t.top)<=Math.abs(n.top)?t:n},f=[],e=void 0,o=void 0,r=!0,s=!1,h=undefined,n,c,u;try{for(n=i[Symbol.iterator]();!(r=(c=n.next()).done);r=!0)u=c.value,f.push({el:u,top:u.getBoundingClientRect().top})}catch(a){s=!0;h=a}finally{try{!r&&n.return&&n.return()}finally{if(s)throw h;}}o=f.reduce(l).el;e=t.filter(function(n){return n.getAttribute("data-dest")==o.getAttribute("data-dest")})[0];t.forEach(function(n){n!=e?n.classList.remove("is-active"):n.classList.add("is-active")})};window.addEventListener("scroll",r)});ready("articleNavTop",".articleNav-nav",function(n){var i=n.querySelector(".articleNav-menu"),t=document.querySelector(".headerMain"),r=document.querySelector(".articleNav");window.addEventListener("scroll",function(){i.style.transform=!t.classList.contains("is-active")||t.classList.contains("is-top")||r.classList.contains("articleNav__right-rail")?"translateY(0px)":"translateY("+t.offsetHeight+"px)"})});ready("articleNavAdTop",".articleNav-ads",function(n){var i=[].concat(_toConsumableArray(n.querySelectorAll(".articleNav-ad"))),t=document.querySelector(".headerMain");window.addEventListener("scroll",function(){t.classList.contains("is-active")&&!t.classList.contains("is-top")?i.forEach(function(n){return n.style.transform="translateY("+t.offsetHeight+"px)"}):i.forEach(function(n){return n.style.transform="translateY(0px)"})})});ready("articleNavAnchor",".articleNav",function(n){var f=document.querySelector(".headerMain"),t=n.querySelector(".articleNav-nav");if(t!=null){var e=t.querySelector(".articleNav-menu"),i=[].concat(_toConsumableArray(document.querySelectorAll("[data-dest]"))),r=void 0,u=void 0;t.matches(".dynamic-anchors")&&i.forEach(function(n){var i=document.createElement("li"),r=document.createElement("button"),u=n.dataset.title,t;if(!u){for(t=n;t.firstElementChild;)t=t.firstElementChild;u=t.textContent}i.classList.add("articleNav-item");i.setAttribute("data-dest",n.dataset.dest);r.classList.add("articleNav-button");r.setAttribute("type","button");r.textContent=u;i.insertAdjacentElement("afterbegin",r);e.insertAdjacentElement("beforeend",i)});r=[].concat(_toConsumableArray(t.querySelectorAll(".articleNav-item")));i=i.filter(function(n){return r.indexOf(n)==-1});r.forEach(function(n){n.addEventListener("click",function(){var t=i.filter(function(t){return t.dataset.dest==n.dataset.dest})[0],r=t.getBoundingClientRect().top-20;u=f.offsetHeight;window.scrollBy({top:r-u,behavior:"smooth"})})});[].concat(_toConsumableArray(t.querySelectorAll("a.articleNav-link"))).forEach(function(n){n.addEventListener("click",function(n){n.preventDefault()})})}});ready("articleNavRightRail",".articleNav",function(n){if(n&&n.classList.contains("articleNav__right-rail")){var i=n.querySelector(".articleBack"),r=n.querySelector(".articleHead"),t=n.querySelector(".articleNav-nav"),u=t.querySelector(".articleNav-button"),f=i.offsetHeight+r.offsetHeight+u.offsetHeight*.5;t.style.marginTop=f+"px"}});ready("spotlightSlider",".spotlight",function(n){var o=400,s=!0,v=5e3,r=[].concat(_toConsumableArray(n.querySelectorAll(".spotlight-slide"))),l=n.querySelector(".spotlight-nav"),h=[].concat(_toConsumableArray(l.querySelectorAll(".spotlight-nav-arrow"))),a=l.querySelector(".spotlight-nav-dots"),e=r.length,t=0,i=void 0,f=void 0,u=void 0,c=void 0;r[0].classList.add("is-active");r[0].classList.add("is-initial");e>1?function(){for(var y,g,nt,p,ut,ft,l,n=1;n<=e;n++)n==1?a.insertAdjacentHTML("beforeend",'<div class="spotlight-nav-dot" data-current="'+n+'">'+n+"<\/div>"):a.insertAdjacentHTML("beforeend",'<div class="spotlight-nav-dot">'+n+"<\/div>");u=[].concat(_toConsumableArray(a.querySelectorAll(".spotlight-nav-dot")));u[0].classList.add("is-active");s&&(c=setInterval(function(){f="next";i=t<e-1?t+1:0;l()},v+o*4));var et=function(n){n.addEventListener("click",function(){if(s&&clearInterval(c),h.forEach(function(n){n.classList.add("is-inactive")}),u.forEach(function(n){n.classList.add("is-inactive")}),i=u.indexOf(n),i>t)f="next";else if(i<t)f="prev";else return;l(!0)})},w=!0,k=!1,d=undefined;try{for(y=u[Symbol.iterator]();!(w=(g=y.next()).done);w=!0)nt=g.value,et(nt)}catch(tt){k=!0;d=tt}finally{try{!w&&y.return&&y.return()}finally{if(k)throw d;}}var ot=function(n){n.addEventListener("click",function(){s&&clearInterval(c);h.forEach(function(n){n.classList.add("is-inactive")});u.forEach(function(n){n.classList.add("is-inactive")});n.classList.contains("spotlight-nav-arrow--next")?(f="next",i=t<e-1?t+1:0):(f="prev",i=t>0?t-1:e-1);l(!0)})},b=!0,it=!1,rt=undefined;try{for(p=h[Symbol.iterator]();!(b=(ut=p.next()).done);b=!0)ft=ut.value,ot(ft)}catch(tt){it=!0;rt=tt}finally{try{!b&&p.return&&p.return()}finally{if(it)throw rt;}}l=function l(){var n=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!1;r[t].classList.remove("is-initial");r[t].classList.add("is-leaving--"+f);r[t].classList.add("is-leaving");r[i].classList.add("is-active--"+f);r[i].classList.add("is-active");u[t].classList.remove("is-active");u[i].classList.add("is-active");u[0].setAttribute("data-current",i+1);setTimeout(function(){r[t].classList.remove("is-leaving");r[t].classList.remove("is-leaving--next");r[t].classList.remove("is-leaving--prev");r[t].classList.remove("is-active");r[t].classList.remove("is-active--next");r[t].classList.remove("is-active--prev");t=i},o*2);setTimeout(function(){r[i].classList.remove("is-active--next");r[i].classList.remove("is-active--prev");h.forEach(function(n){n.classList.remove("is-inactive")});u.forEach(function(n){n.classList.remove("is-inactive")});n&&s&&(c=setInterval(function(){f="next";i=t<e-1?t+1:0;l()},v+o*4))},o*4)}}():l.style.display="none"});ready("eventMap_tabs",".eventMap",function(n){var u=[].concat(_toConsumableArray(n.querySelectorAll(".eventMap-tab"))),e=[].concat(_toConsumableArray(n.querySelectorAll(".eventMap-events-inner"))),t=void 0,i=void 0,l=function(n){n.addEventListener("click",function(){var r,l,a,f,w,b;t=e.filter(function(t){return t.getAttribute("data-tab")==n.getAttribute("data-tab")});i=e.filter(function(t){return t.getAttribute("data-tab")!=n.getAttribute("data-tab")});var o=!0,h=!1,c=undefined;try{for(r=i[Symbol.iterator]();!(o=(l=r.next()).done);o=!0)a=l.value,a.classList.remove("is-active")}catch(v){h=!0;c=v}finally{try{!o&&r.return&&r.return()}finally{if(h)throw c;}}t[0].classList.add("is-active");t=u.filter(function(t){return t.getAttribute("data-tab")==n.getAttribute("data-tab")});i=u.filter(function(t){return t.getAttribute("data-tab")!=n.getAttribute("data-tab")});var s=!0,y=!1,p=undefined;try{for(f=i[Symbol.iterator]();!(s=(w=f.next()).done);s=!0)b=w.value,b.classList.remove("is-active")}catch(v){y=!0;p=v}finally{try{!s&&f.return&&f.return()}finally{if(y)throw p;}}t[0].classList.add("is-active")})},f=!0,o=!1,s=undefined,r,h,c;try{for(r=u[Symbol.iterator]();!(f=(h=r.next()).done);f=!0)c=h.value,l(c)}catch(a){o=!0;s=a}finally{try{!f&&r.return&&r.return()}finally{if(o)throw s;}}});ready("eventMap_slider",".eventMap",function(n){var f=n.querySelector(".eventMap-navItem--prev"),e=n.querySelector(".eventMap-navItem--next"),i=void 0,t=void 0,r=void 0,u=void 0;e.addEventListener("click",function(){i=[].concat(_toConsumableArray(n.querySelectorAll(".eventMap-events-inner.is-active .eventMap-event")));t=n.querySelector(".eventMap-events-inner.is-active .eventMap-event.is-active");u=t.nextElementSibling;u||(u=i[0]);t.classList.remove("is-active");u.classList.add("is-active")});f.addEventListener("click",function(){i=[].concat(_toConsumableArray(n.querySelectorAll(".eventMap-events-inner.is-active .eventMap-event")));t=n.querySelector(".eventMap-events-inner.is-active .eventMap-event.is-active");r=t.previousElementSibling;r||(r=i[i.length-1]);t.classList.remove("is-active");r.classList.add("is-active")})});ready("selectorHero",".selectorHero",function(n){var i=[].concat(_toConsumableArray(n.querySelectorAll(".selectorHero-selection"))),t=[].concat(_toConsumableArray(n.querySelectorAll(".selectorOverlay"))),h=function(n){n.addEventListener("click",function(){t.length>1?t[i.indexOf(n)].classList.contains("is-active")?(t.forEach(function(n){return n.classList.remove("is-active")}),t[i.indexOf(n)].classList.remove("is-active"),document.body.classList.remove("noScroll")):(t.forEach(function(n){return n.classList.remove("is-active")}),t[i.indexOf(n)].classList.add("is-active"),media.matches||document.body.classList.add("noScroll")):t[0].classList.contains("is-active")?(t[0].classList.remove("is-active"),document.body.classList.remove("noScroll")):(t[0].classList.add("is-active"),media.matches||document.body.classList.add("noScroll"))})},u=!0,f=!1,e=undefined,r,o,s;try{for(r=i[Symbol.iterator]();!(u=(o=r.next()).done);u=!0)s=o.value,h(s)}catch(c){f=!0;e=c}finally{try{!u&&r.return&&r.return()}finally{if(f)throw e;}}});ready("selectorOverlayClose",".selectorOverlay-close",function(n){var t=n.closest(".selectorOverlay");n.addEventListener("click",function(n){n.preventDefault();t.classList.remove("is-active");document.body.classList.remove("noScroll");setTimeout(function(){t.classList.remove("is-secondary")},500)})});ready("selectorOverlayClose_doc","body",function(){document.addEventListener("click",function(n){if(!n.target.matches(".selectorOverlay")&&!n.target.matches(".selectorHero-selection")&&!n.target.closest(".selectorOverlay")){var t=[].concat(_toConsumableArray(document.querySelectorAll(".selectorOverlay")));t.forEach(function(n){return n.classList.remove("is-active")});document.body.classList.remove("noScroll");setTimeout(function(){t.forEach(function(n){return n.classList.remove("is-secondary")})},500)}})});ready("selectorOverlaySecondTier",".selectorOverlay-all",function(n){var t=n.closest(".selectorOverlay");n.addEventListener("click",function(n){n.stopPropagation();n.preventDefault();t.classList.add("is-secondary")})});ready("selectorOverlayBack",".selectorOverlay-back",function(n){var t=n.closest(".selectorOverlay");n.addEventListener("click",function(n){n.stopPropagation();n.preventDefault();t.classList.remove("is-secondary")})});ready("selectorOverlayGroup",".selectorOverlay",function(n){var t=[].concat(_toConsumableArray(n.querySelectorAll(".selectorOverlay-groupLink[data-content]"))),i=[].concat(_toConsumableArray(n.querySelectorAll(".selectorOverlay-listing[data-content]"))),r=function(){var n=this.getAttribute("data-content");t.forEach(function(n){return n.classList.remove("is-active")});this.classList.add("is-active");i.forEach(function(t){t.getAttribute("data-content")==n?t.classList.add("is-active"):t.classList.remove("is-active")})};t.forEach(function(n){return n.addEventListener("click",r)})});ready("selectorOverlayCity",".selectorOverlay--state",function(n){var t=n.closest(".selectorHero"),u=t&&t.querySelector("#endpoint").value,s=t&&t.querySelector("#eventType").value,e=[].concat(_toConsumableArray(n.querySelectorAll(".selectorOverlay-listing li a"))),i=t&&t.querySelector(".selectorOverlay--city .selectorOverlay-listing"),o=t&&[].concat(_toConsumableArray(t.querySelectorAll(".selectorHero-selection"))),f;if(t&&t.getAttribute("data-hero-type")&&t.getAttribute("data-hero-type").toLowerCase()=="connectgroup"){var h=function(t){t.length>0&&(axios.get(c,{params:{state:t}}).then(function(n){r.innerHTML="";n.data.length===1?window.location.href=n.data[0].url.toLowerCase():n.data.forEach(function(n){var i=document.createElement("li"),t;n.url.length>0?(t=document.createElement("a"),t.setAttribute("href",n.url.toLowerCase()),t.innerText=n.name,i.appendChild(t)):i.appendChild(name);r.appendChild(i)})}).catch(function(n){var t=document.createElement("p");n.response.status!=200?t.innerText=n.response&&n.response.data&&n.response.data.message:(t.innerText="Could not load data.",console.error(n));r.innerHTML="";r.appendChild(t)}),n.classList.remove("is-active"),a.classList.remove("is-hidden"))},c="/api/groups/groups-by-state",r=t.querySelector("#cityGroupContainer"),l=t.querySelector("#stateSelector"),a=t.querySelector("#secondarySelector");e.forEach(function(n){n.addEventListener("click",function(t){n.text!="View All Connect Groups"&&(t.preventDefault(),l.innerText=n.text,h(n.text))})})}else f=function(t){var r=u.indexOf("GetLocalOfficesByState")==-1?"city":"localoffice",f=r==="city"?u+"?state="+t+"&eventType="+s:u+"?state="+t;axios.get(f).then(function(n){i.innerHTML="";r==="localoffice"&&n.data&&n.data.length===1&&n.data[0].url!==""?window.location.href=n.data[0].url.toLowerCase():n.data.forEach(function(n){var t=document.createElement("li");r==="city"&&(t.innerHTML=n.url?'<a href="'+n.url+'" target="_blank">'+n.city+"<\/a>":n.city);r==="localoffice"&&(t.innerHTML=n.url?'<a href="'+n.url.toLowerCase()+'">'+n.name+"<\/a>":n.name);i.insertAdjacentElement("beforeend",t)})}).catch(function(n){var t=document.createElement("p");n.response.status!=200?t.innerText=n.response&&n.response.data&&n.response.data.message:(t.innerText="Could not load data.",console.error(n));i.innerHTML="";i.appendChild(t)});o[0].innerText=t;o[1].classList.remove("is-hidden");n.classList.remove("is-active")},e.forEach(function(n){return n.attributes["data-selected"]&&n.attributes["data-selected"].value==="true"&&f(n.innerText),n.addEventListener("click",function(n){n.preventDefault();var t=n.target.innerText;f(t)})})});ready("stats",".stats-itemStat",function(n){!document.querySelector("html").classList.contains("kentico-page-builder")&&n.classList.contains("stats-item--no-animation")});ready("statsBar",".statsBar-stat h4",function(n){var u,a,t,i,f;if(!document.querySelector("html").classList.contains("kentico-page-builder")){var o=1e3,r=[].concat(_toConsumableArray(/(\D+)?(\d+)(\D+)?(\d+)?(\D+)?(\d+)?(\D+)?(\d+)?(\D+)?(\d+)?(\D+)?/.exec(n.textContent))),s=!0,h=void 0;for(r.shift(),r=r.filter(function(n){return n!=null});n.firstChild;)n.removeChild(n.firstChild);var e=!0,c=!1,l=undefined;try{for(u=r[Symbol.iterator]();!(e=(a=u.next()).done);e=!0)if(t=a.value,isNaN(t))n.insertAdjacentHTML("beforeend","<span>"+t+"<\/span>");else for(i=0;i<t.length;i++)n.insertAdjacentHTML("beforeend",'<span data-value="'+t[i]+'">\n\t\t\t\t\t\t<span aria-hidden="true">&ndash;<\/span>\n\t\t\t\t\t\t'+Array(parseInt(t[i])+1).join(0).split(0).map(function(n,t){return"\n\t\t\t\t\t\t\t<span>"+t+"<\/span>\n\t\t\t\t\t\t"}).join("")+"\n\t\t\t\t\t<\/span>")}catch(v){c=!0;l=v}finally{try{!e&&u.return&&u.return()}finally{if(c)throw l;}}h=[].concat(_toConsumableArray(n.querySelectorAll("span[data-value]")));f=function f(){var t=n.getBoundingClientRect().top,i=window.innerHeight*(7/8);setTimeout(function(){s=!1},o);t<i&&(setTimeout(function(){var t=!0,r=!1,u=undefined,n,f,i,e;try{for(n=h[Symbol.iterator]();!(t=(f=n.next()).done);t=!0)i=f.value,e=parseInt(i.getAttribute("data-value"))+1,i.style.transform="translateY(-"+e*100+"%)"}catch(o){r=!0;u=o}finally{try{!t&&n.return&&n.return()}finally{if(r)throw u;}}},s?o:0),window.removeEventListener("scroll",f))};f();window.addEventListener("scroll",f)}});ready("sticky",".sticky",function(n){Stickyfill.add(n)});ready("swipe",".swipe",function(n){for(var r,a,s,u,w,b,f=n.querySelector(".swipe-nav"),i=[].concat(_toConsumableArray(n.querySelectorAll(".swipe-panel"))),t=void 0,e=0;e<i.length;e++)e==0?f.insertAdjacentHTML("beforeend",'<span class="is-active"><\/span>'):f.insertAdjacentHTML("beforeend","<span><\/span>");mediaMd.addListener(function(n){var r,o,s;if(n.matches){i[0].style.marginLeft="";var u=!0,f=!1,e=undefined;try{for(r=t[Symbol.iterator]();!(u=(o=r.next()).done);u=!0)s=o.value,s.classList.remove("is-active")}catch(h){f=!0;e=h}finally{try{!u&&r.return&&r.return()}finally{if(f)throw e;}}}else t[0].classList.add("is-active")});t=[].concat(_toConsumableArray(f.querySelectorAll("span")));var o=!0,c=!1,l=undefined;try{for(r=i[Symbol.iterator]();!(o=(a=r.next()).done);o=!0)s=a.value,s.addEventListener("mousedown",function(n){return swipeEvent(n,i,t)}),s.addEventListener("touchstart",function(n){return swipeEvent(n,i,t)})}catch(v){c=!0;l=v}finally{try{!o&&r.return&&r.return()}finally{if(c)throw l;}}var k=function(n){n.addEventListener("click",function(){var h=i[0],r,s,u;h.style.marginLeft="-"+t.indexOf(n)*100+"%";var f=!0,e=!1,o=undefined;try{for(r=t[Symbol.iterator]();!(f=(s=r.next()).done);f=!0)u=s.value,u==n?u.classList.add("is-active"):u.classList.remove("is-active")}catch(c){e=!0;o=c}finally{try{!f&&r.return&&r.return()}finally{if(e)throw o;}}})},h=!0,y=!1,p=undefined;try{for(u=t[Symbol.iterator]();!(h=(w=u.next()).done);h=!0)b=w.value,k(b)}catch(v){y=!0;p=v}finally{try{!h&&u.return&&u.return()}finally{if(y)throw p;}}});swipeEvent=function(n,t,i){var c=t[0],r=Math.abs(parseInt(c.style.marginLeft)/100)||0,v=t.length-1,f=n.clientX||n.touches[0].clientX,y=n.clientY||n.touches[0].clientY,l=50,e=i,o=!1,u=void 0,a=void 0,s=function(t){var i,g,s,h,rt,p;if(u=t.clientX||t.touches[0].clientX,a=t.clientY||t.touches[0].clientY,Math.abs(y-a)<15)if(n.preventDefault(),t.preventDefault(),f-u>0&&Math.abs(f-u)>=l&&!o){if(o=!0,r<v){c.style.marginLeft="-"+(r+1)*100+"%";var w=!0,k=!1,d=undefined;try{for(i=e[Symbol.iterator]();!(w=(g=i.next()).done);w=!0)s=g.value,e.indexOf(s)==r+1?s.classList.add("is-active"):s.classList.remove("is-active")}catch(nt){k=!0;d=nt}finally{try{!w&&i.return&&i.return()}finally{if(k)throw d;}}}}else if(f-u<0&&Math.abs(f-u)>=l&&!o&&(o=!0,r>0)){c.style.marginLeft="-"+(r-1)*100+"%";var b=!0,tt=!1,it=undefined;try{for(h=e[Symbol.iterator]();!(b=(rt=h.next()).done);b=!0)p=rt.value,e.indexOf(p)==r-1?p.classList.add("is-active"):p.classList.remove("is-active")}catch(nt){tt=!0;it=nt}finally{try{!b&&h.return&&h.return()}finally{if(tt)throw it;}}}},h=function h(){window.removeEventListener("mousemove",s);window.removeEventListener("mouseup",h);window.addEventListener("touchmove",s,{passive:!1});window.addEventListener("touchend",h,{passive:!1})};window.addEventListener("mousemove",s);window.addEventListener("mouseup",h);window.addEventListener("touchmove",s,{passive:!1});window.addEventListener("touchend",h,{passive:!1})};$(function(){var n=$(":text.js-text-box-redirect");n.off(".redirect").on("keypress.redirect",function(n){var t,i,r;if(n.which==13)return n.stopPropagation(),t=$(this).data("url"),i=$(this).val(),t&&i&&(r=new URL(t,window.location.href),r.searchParams.append("email",encodeURI(i)),window.location.href=r),!1})});window.addEventListener("DOMContentLoaded",function(){[].concat(_toConsumableArray(document.querySelectorAll(".quiz"))).forEach(function(n){new Vue({el:"#"+n.getAttribute("id"),name:"Quiz",data:function(){return{step:0,quiz:{title:"",description:"",questions:[],results:{graphic:"",responses:[]}},user:[],done:!1}},computed:{score:function(){var t=this,n={correct:0,incorrect:0};return this.user.forEach(function(i,r){i===t.quiz.questions[r].correct.value?n.correct++:n.incorrect++}),n},response:function(){var t=this,i={title:"",message:""},n=this.quiz.results.responses.filter(function(n){return t.score.correct>=n.min&&t.score.correct<=n.max});return n&&n.length===1&&(i=n[0]),i}},watch:{step:function(n){n+1>this.quiz.questions.length&&(this.done=!0)}},methods:{boolAsString:function(n){return n===1||n===0?n===1||n===!0?"true":"false":n},restartQuiz:function(){this.step=0;this.user=[];this.done=!1},loadQuizData:function(n){var t=this;axios.get(n).then(function(n){var i=Object.keys(n.data);i.length&&(i.forEach(function(i){t.$set(t.quiz,i,n.data[i])}),t.user=new Array(i.questions.length))})}},mounted:function(){var n=this.$el.getAttribute("data-quiz");n&&this.loadQuizData(n)}})})});window.addEventListener("DOMContentLoaded",function(){if(typeof URLSearchParams!="undefined"){var n=new URL(location.href);n.searchParams.delete("rp");history.pushState({},null,n)}else console.log("Your browser does not support URLSearchParams")});ready("emailModal_inputAdjust",".emailModal-input",function(n){n.addEventListener("focus",function(){var t=n.closest(".popup-overlay");setTimeout(function(){var i=n.closest(".emailModal-body"),r=i&&i.offsetTop,u=!1;do i=i&&i.parentElement,r+=i&&i.offsetTop,u=i&&i==t;while(!u);t.scrollTo({top:r,behavior:"smooth"})},250)})});ready("videoModal",".video",function(n){var t=n.querySelector(".video__play"),f=n.querySelector(".video__caption .video__title"),e="";f&&(e=" - "+f.textContent);var s=document.querySelector(".pageWrap"),r=void 0,u=void 0,i=void 0;if(t!==null){var h=function(n,t){var i='<div class="dialog__container" id="video-'+n+'" aria-label="Arthritis.org Video'+e+'" aria-hidden="true" aria-modal="true" tabindex="-1" role="dialog">\n            <div class="dialog__overlay" data-a11y-dialog-hide=""><\/div>\n            <div class="dialog__content dialog__content--overflow-y" role="document">\n            <button class="dialog__close" type="button" data-a11y-dialog-hide="" aria-label="Close dialog"><i class="icon-close"><\/i><\/button>\n            <figure class="dialog__media">\n                '+t+"\n            <\/figure>\n            <\/div>\n        <\/div>";s.insertAdjacentHTML("beforeend",i)},c=function(n){t.setAttribute("data-a11y-dialog-show","video-"+n);t.setAttribute("aria-controls","video-"+n);t.setAttribute("aria-expanded","false");t.setAttribute("aria-label","Open dialog")},o=function(n,t){h(n,t);var i=document.getElementById("video-"+n);r=new A11yDialog(i);r.on("hide",function(n){n.remove()});r.show()};t.dataset.youtubeSrc&&(u='\n      <iframe style="--width: 670; --height: 377;" width="670" height="377" src="https://www.youtube.com/embed/'+t.dataset.youtubeSrc+'" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen=""><\/iframe>\n      ',i=t.dataset.youtubeSrc,c(i));t.addEventListener("keydown",function(n){n.key==="Enter"&&o(i,u)});t.addEventListener("click",function(){o(i,u)})}});ready("interstitial",".interstitial",function(n){function i(n){var i=document.querySelector('.interstitial[data-trigger="'+n+'"]');if(t=n,i&&(i.classList.add("show"),document.querySelector(".pageWrap").classList.add("is-blurred"),document.querySelector("html").classList.add("no-scroll"),n==="loggedoff")){var r=function(){window.location.reload()},u=i.querySelector(".interstitial-inner"),f=i.querySelector(".interstitial-close");f.addEventListener("click",r,{once:!0});i.addEventListener("click",r,{once:!0});u.addEventListener("click",function(n){return n.stopPropagation()})}}function r(){function f(){u.forEach(function(n){var r=n.querySelector(".interstitial-inner"),u=n.querySelector(".interstitial-close"),i=function(){n.classList.remove("show");document.querySelector(".pageWrap").classList.remove("is-blurred");document.querySelector("html").classList.remove("no-scroll");t==="loggedoff"&&window.location.reload()};u.addEventListener("click",function(n){n.preventDefault();i()});n.addEventListener("click",i);r.addEventListener("click",function(n){return n.stopPropagation()})})}function e(){var n=i.dataset.timeout*1e3;setTimeout(function(){i.classList.add("show");document.querySelector(".pageWrap").classList.add("is-blurred");document.querySelector("html").classList.add("no-scroll")},n)}function o(){var i=[].concat(_toConsumableArray(document.querySelectorAll("a[href]:not(.interstitial-confirm)"))),u=window.location.href,f=window.location.host,e=window.location.pathname,t=n.querySelector(".interstitial-confirm");i.forEach(function(n){n.addEventListener("click",function(n){if(n.preventDefault(),r.classList.add("show"),document.querySelector(".pageWrap").classList.add("is-blurred"),document.querySelector("html").classList.add("no-scroll"),this.host!==f)t.setAttribute("target","_blank");else if(this.pathname!==e)t.setAttribute("target","_self");else if(this.href===u)return;t.setAttribute("href",this.href)})})}var u=[].concat(_toConsumableArray(document.querySelectorAll(".interstitial"))),i=document.querySelector('.interstitial[data-trigger="entry"]'),r=document.querySelector('.interstitial[data-trigger="exit"]');i&&e();r&&o();f()}var t=null;window.triggerManualInterstitial=i;r()});ready("drawer",".drawer",function(n){var r=n.querySelector(".drawer-trigger"),u=n.querySelector(".drawer-items"),t=document.querySelector(".weatherText"),i=document.querySelector(".arthritisText");r.addEventListener("click",function(){this.classList.toggle("is-open");u.classList.toggle("is-open");t.innerHTML=document.querySelector(".weather .drawer-items").classList.contains("is-open")?"Less":"More";i.innerHTML=document.querySelector(".arthritisIndex .drawer-items").classList.contains("is-open")?"Close":"View"})});ready("weatherWidget",".weatherWidget",function(n){var t=[].concat(_toConsumableArray(n.querySelectorAll(".weatherWidget-rate"))),i=[].concat(_toConsumableArray(n.querySelectorAll(".weatherWidget-rating--question"))),r=[].concat(_toConsumableArray(n.querySelectorAll(".weatherWidget-rating--thankYou")));t.forEach(function(n){n.addEventListener("click",function(n){n.preventDefault();i.forEach(function(n){n.classList.remove("show")});r.forEach(function(n){n.classList.add("show")})})})});ready("circleGraph",".arthritisIndex-forecastGraph",function(n){var t=n.dataset.percent;n.querySelector("span").innerHTML=t*.1});ready("socialIcons",".socialIcons",function(){var r=function(){var n=500,t=350,i=window.innerWidth/2-n/2,r=window.innerHeight/2-t/2;return["resizable,scrollbars,status","height="+t,"width="+n,"left="+i,"top="+r].join()},u=function(n){n.element.click(function(t){t.preventDefault();var i=window.open(n.link,n.label,r());i.opener=null})},n=encodeURIComponent(location.href),t=$('meta[name="twitter:description"]'),i=t&&t.attr("content"),f=i?encodeURI(i):"",e="https://"+location.host+location.pathname+encodeURIComponent(location.search),o={element:$(".icon-facebook"),link:"https://www.facebook.com/sharer/sharer.php?u="+n,label:"fbShare"},s={element:$(".icon-twitter"),link:"https://twitter.com/intent/tweet?url="+n+"&text="+f,label:"ShareOnTwitter"},h={element:$(".icon-linkedin"),link:"https://www.linkedin.com/sharing/share-offsite/?url="+e,label:"ShareOnLinkedIn"},c=[o,s,h];c.forEach(u)});ready("eventListContainer",".eventListContainer",function(n){function b(n){return rt(n)||it(n)||tt()}function tt(){throw new TypeError("Invalid attempt to spread non-iterable instance");}function it(n){if(Symbol.iterator in Object(n)||Object.prototype.toString.call(n)==="[object Arguments]")return Array.from(n)}function rt(n){if(Array.isArray(n)){for(var t=0,i=new Array(n.length);t<n.length;t++)i[t]=n[t];return i}}function a(){var t="",n="",i;return c==""?(n=y(p),l.html(n)):(n=y(c),l.html(n)),i=r.length-1,r.each(function(n,r){n>0&&(t+=encodeURIComponent(r.innerHTML),n<i&&(t+="|"))}),t}function ut(n){var t=new Date(n);return t.setTime(t.getTime()+t.getTimezoneOffset()*6e4),t.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function u(n,i){t.empty();t.append('<div class="afloader"><\/div>');axios.get(n,{params:i}).then(function(n){ft(n.data)}).catch(function(n){console.error(n)})}function ft(n){var e,i,o;if(!n||n.length==0){t.empty();e='<div class="eventHighlight-sectionTitle">'+g+"<\/div>";t.append(e);return}var l=n,r=0,u=1,a=5;for(t.empty(),l.forEach(function(n){r===a&&(r=0,u+=1);var i='<a class="eventList-event" href="'+n.url+'" data-page="'+u+'">'+('<time class="eventList-date" datetime="'+n.startDate+'">'+ut(n.startDate)+"<\/time>")+('<h3 class="eventList-title">'+n.name+"<\/h3>");i+=n.virtual&n.national?'<address class="eventList-address">National Virtual Event<\/address>':n.virtual?'<address class="eventList-address">Virtual Event<\/address>':'<address class="eventList-address">'+("<span>"+n.city+", "+n.state+"<\/span><\/address>");i+="<\/a>";t.append(i);r++}),t.append('<ul class="eventList-pagination">'),i=1;i<=u;i++){o='<li><a href="#" data-page="'+i+'">'+i+"<\/a><\/li>";$(".eventList-pagination").append(o);var f=b(document.querySelectorAll(".eventList-pagination li a")),s=b(document.querySelectorAll(".eventList-event")),h=1,c,v=function(n){n&&n.preventDefault();h=this.getAttribute("data-page");f.forEach(function(n){return n.closest("li").classList.remove("is-active")});s.forEach(function(n){return n.style.display="none"});c=s.filter(function(n){return n.getAttribute("data-page")==h});this.closest("li").classList.add("is-active");c.forEach(function(n){return n.style.display=""})};f.forEach(function(n){return n.addEventListener("click",v)});f[0].click()}}function y(n){var t="";return r.each(function(i,r){r.innerHTML===n&&(t=r.innerText)}),t}var k=n.getAttribute("data-single-filter").toLowerCase()==="true",d=n.getAttribute("data-event-type")||"",g=n.getAttribute("data-no-events")||"",p=n.getAttribute("data-view-all")||"",o=n.getAttribute("data-local-zip")||"",nt=n.getAttribute("data-request-zip")||"",s=n.getAttribute("data-latitude")||"",h=n.getAttribute("data-longitude")||"",c=n.getAttribute("data-default-filter")||"",w=n.getAttribute("data-host-url")||"https://arthritis.org",t=$(".eventList-events"),r=$(".eventToolbar-menuDropdownLink"),l=$(".eventToolbar-menuTrigger");if(k){var et=w+"/api/events/events-by-type",ot=encodeURI(d),st={eventType:ot,latitude:s,longitude:h};u(et,st)}else{var f=a(),v=w+"/api/events/events-by-zip",e=o==""||o<1?nt:o,i={zipCode:"",latitude:"",longitude:"",eventType:encodeURI(c),allFilters:f};t.ready(function(){e!=undefined&&e!=""?($("#searchZip").val(e),i.zipCode=e):(i.latitude=s,i.longitude=h);u(v,i);$(".eventToolbar-searchInput").keypress(function(n){n.which===13&&this.value.trim()!==""&&(f=a(),i.zipCode=this.value,i.latitude="",i.longitude="",u(v,i))});r.click(function(n){var r;n.preventDefault();var i=this.dataset.value,o=n.currentTarget.innerText,e=$(".eventToolbar-searchInput").val(),t={zipCode:"",latitude:"",longitude:"",eventType:encodeURI(i),allFilters:f};i&&i=="View All"&&(i="",t.eventType="");f=a();r=o;r===""&&(r=y(p));l.html(r);e.trim()!==""?t.zipCode=e:(t.latitude=s,t.longitude=h);u(v,t)})})}});ready("mediaCarousel",".media-carousel",function(n){var f=n,i=n.querySelector(".carousel-slide"),r=n.querySelector(".carousel-list"),e=[].concat(_toConsumableArray(n.querySelectorAll(".carousel-item"))),o=n.querySelector(".carousel-nav .prev"),s=n.querySelector(".carousel-nav .next"),u=r.dataset.displayNum||1,t;i.classList.add("swiper-container");r.classList.add("swiper-wrapper");e.forEach(function(n){return n.classList.add("swiper-slide")});t={speed:500,loop:!0,allowTouchMove:!1,slidesPerView:u>3?3:u,slidesPerGroup:1,spaceBetween:16,navigation:{nextEl:s,prevEl:o},breakpoints:{}};f.dataset.autoScroll.toString().toLowerCase()==="true"&&(t.autoplay={delay:6500});new Swiper(i,t)});ready("articleFilterTrigger",".articleFilterItems-menuInner",function(n){n.addEventListener("click",function(){return n.classList.toggle("is-active")});n.addEventListener("keydown",function(t){var i=t.key;!0&&n.classList.toggle("is-active")});n.addEventListener("blur",function(){return n.classList.remove("is-active")})});ready("articleFilterItems",".articleFilterItems",function(n){function a(){r.forEach(function(n){return n.classList.remove("is-active")});this.classList.add("is-active");u.forEach(function(n){n.classList.contains("is-showing")&&n.classList.add("is-leaving");n.classList.remove("is-showing");setTimeout(function(){n.classList.remove("is-showing","is-match","is-leaving")},350)});i=this.getAttribute("data-filter");t=i=="oldest"?u.sort(function(n,t){return new Date(n.getAttribute("data-filter")).getTime()-new Date(t.getAttribute("data-filter")).getTime()}):i=="newest"?u.sort(function(n,t){return new Date(t.getAttribute("data-filter")).getTime()-new Date(n.getAttribute("data-filter")).getTime()}):i=="all"?u:u.filter(function(n){return n.getAttribute("data-filter")==i});t.forEach(function(n){n.classList.add("is-match");t.indexOf(n)<s?(f.style.display="none",setTimeout(function(){n.classList.add("is-showing")},350)):f.style.display="flex"});o.innerText=i==="all"?y:t.length+" total";e=1;var n=document.createDocumentFragment();t.forEach(function(t){n.appendChild(t)});l.innerHTML=null;l.appendChild(n)}function p(){e++;e*s>=t.length&&(f.style.display="none");t.forEach(function(n){t.indexOf(n)<e*s&&n.classList.add("is-showing")})}var r=[].concat(_toConsumableArray(n.querySelectorAll(".articleFilterItems-menuItem"))),u=[].concat(_toConsumableArray(n.querySelectorAll(".articleFiterItems-item"))),f=n.querySelector(".articleFilterItems-loadMore"),o=n.querySelector(".articleFilterItems-total"),l=n.querySelector(".articleFiterItems-items"),y=o&&o.innerText,s=8,h=function(n){var r,t,i;if(n=="")return{};for(r={},t=0;t<n.length;++t)i=n[t].split("=",2),r[i[0]]=i.length==1?"":decodeURIComponent(i[1].replace(/\+/g," "));return r}(window.location.search.substr(1).split("&")),e=1,i=void 0,t=void 0,v,c;r&&r.forEach(function(n){n.addEventListener("click",a)});f.addEventListener("click",p);a.apply(r[0]);h.category!==undefined&&h.category.length>0&&(v=h.category.toLowerCase(),c=r.filter(function(n){return n.getAttribute("data-filter")===v})[0],c&&c.click())});ready("partners",".partners",function(n){var i=n.querySelector(".partners__slider"),u=n.querySelector(".partners__container"),f=n.querySelector(".partners__wrapper"),e=[].concat(_toConsumableArray(n.querySelectorAll(".partners__slide"))),o=n.querySelector(".partners__nav--prev"),s=n.querySelector(".partners__nav--next"),t=i.dataset.slidesPerView,r;u.classList.add("swiper-container");f.classList.add("swiper-wrapper");e.forEach(function(n){return n.classList.add("swiper-slide")});r={speed:500,loop:!0,allowTouchMove:!1,slidesPerView:t?t:1,slidesPerGroup:1,spaceBetween:16,navigation:{nextEl:s,prevEl:o},breakpoints:{550:{slidesPerView:t?t:2},850:{slidesPerView:t?t:3}}};i.dataset.autoplay&&!isNaN(i.dataset.autoplay)&&(r.autoplay={delay:parseInt(i.dataset.autoplay)});new Swiper(u,r)});$(document).ready(function(){$("#unsubscribe-confirmation-form").on("submit",function(n){n.preventDefault();$.ajax({type:"POST",url:$(this).attr("action"),data:$(this).serialize(),success:function(){$(".unsubscribe-confirmation-form-container").hide();$(".unsubscribe-confirmation-success-message").show()},error:function(n){console.error("Error:",n.responseText);alert("Something went wrong. Please try again.")}})})});ready("scroll-to-main-content","#skip-to-main-content",function(n){var t=document.querySelector("body");t.focus();n.addEventListener("keydown",function(t){var i,u;t.preventDefault();var r=t.key.toLowerCase()==="tab",f=t.key.toLowerCase()==="enter",e=t.shiftKey;if(r||r&&e){n.blur();return}f&&(i=document.querySelector("main"),u=i.getBoundingClientRect().top+(window.scrollY+92),window.scrollTo({top:u,behavior:"smooth"}),n.blur(),i.focus())})});ready("groupHeaderBlock",".groupHeaderBlock",function(n){function o(n,t,i){axios.post(""+s,{groupId:n,userId:t,adding:i}).then(function(n){n&&n.data&&n.data.redirect?location.href=n.data.redirect:location.reload()}).catch(function(n){console.error(n)})}function u(n){axios.post(""+h,{groupID:t,stayOrGo:n}).then(function(n){n&&n.data&&n.data.redirect?location.href=n.data.redirect:location.reload()}).catch(function(n){console.error(n)})}function k(){r=CKEDITOR.instances.txtGroupEmailMessage;r&&axios.post(""+c,{groupId:t,messageText:r.getData()}).then(function(n){n&&n.data&&n.data.redirect?location.href=n.data.redirect:(triggerPopup({hash:"#popup_cgEmailGroupMembersConfirmation"}),i.addClass("confirmationModal--success"),i.removeClass("confirmationModal--error"))}).catch(function(){triggerPopup({hash:"#popup_cgEmailGroupMembersConfirmation"});i.addClass("confirmationModal--error");i.removeClass("confirmationModal--success")})}function d(){CKEDITOR.replace("groupMessageEditor");CKEDITOR.instances.txtGroupEmailMessage.focus()}var s="/groups/updateFacilitators",h="/groups/editgroupmembership",c="/groups/sendMessageToGroup",t=n.getAttribute("data-group-id")||"",f=n.getAttribute("data-user-id")||"",l=$("#becomeMemberOnly"),a=$("#becomeFacilitator"),e=$("#joinConnectGroup"),v=$("#leaveConnectGroup"),y=$("#sendEmailToGroup"),g=$("#popup_cgEmailGroupMembersConfirmation"),p=$("#messageGroup"),r=null,i=$("#divInnerGroupMessage"),w=$("#popup_cgBecomeFacilitatorConfirmation"),b=$("#cancelBecomeFacilitator");CKEDITOR.on("instanceReady",function(){});p.click(function(n){n.preventDefault();triggerPopup({hash:"#popup_cgEmailGroupMembersModal"});d()});a.click(function(){o(t,f,!0)});l.click(function(){o(t,f,!1)});e.click(function(n){n.preventDefault();u(!0)});e.keydown(function(n){var t=(n.key||"").toLowerCase()==="enter";t&&(n.preventDefault(),u(!0))});v.click(function(n){n.preventDefault();u(!1)});y.click(function(n){n.preventDefault();k()});b.click(function(){w.prev().click()})});ready("addCommentBlock",".addCommentBlock",function(n){function e(){var n=t.getData();n.length>0&&axios.post("createPost",{groupId:r,forumId:u,postText:n}).then(function(n){n&&n.data&&n.data.redirect?location.href=n.data.redirect:(t.setData(""),document.dispatchEvent(i))}).catch(function(n){console.error(n)})}var i=new CustomEvent("onUserCommentAdded",{bubbles:!0}),r=n.getAttribute("data-group-id")||"",u=n.getAttribute("data-forum-id")||"",t=CKEDITOR.replace("commentEditor"),f=$("#submitPost");f.click(function(){e()})});ready("groupListItems",".groupListItems",function(n){function a(){r.forEach(function(n){return n.classList.remove("is-active")});this.classList.add("is-active");e.forEach(function(n){n.classList.contains("is-showing")&&n.classList.add("is-leaving");n.classList.remove("is-showing");setTimeout(function(){n.classList.remove("is-showing","is-match","is-leaving")},350)});f=this.getAttribute("data-filter");i=f=="all"?e:e.filter(function(n){return n.getAttribute("data-filter")==f});i.forEach(function(n){n.classList.add("is-match");i.indexOf(n)<s?(t!==null&&(t.style.display="none"),setTimeout(function(){n.classList.add("is-showing")},350)):t!==null&&(t.style.display="flex")});o.innerText=f==="all"?y:i.length+" total";u=1}function p(){u++;u*s>=i.length&&t!==null&&(t.style.display="none");i.forEach(function(n){i.indexOf(n)<u*s&&n.classList.add("is-showing")})}var r=[].concat(_toConsumableArray(n.querySelectorAll(".groupListItems-menuItem"))),e=[].concat(_toConsumableArray(n.querySelectorAll(".groupListItems-item"))),t=n.querySelector(".groupListItems-loadMore"),o=n.querySelector(".groupListItems-total"),l=n.querySelector(".groupListItems-perPage"),s=l&&l.value,y=o&&o.innerText,h=function(n){var r,t,i;if(n=="")return{};for(r={},t=0;t<n.length;++t)i=n[t].split("=",2),r[i[0]]=i.length==1?"":decodeURIComponent(i[1].replace(/\+/g," "));return r}(window.location.search.substr(1).split("&")),u=1,f=void 0,i=void 0,v,c;r.forEach(function(n){return n.addEventListener("click",a)});t!==null&&t.addEventListener("click",p);a.apply(r[0]);h.category!==undefined&&h.category.length>0&&(v=h.category.toLowerCase(),c=r.filter(function(n){return n.getAttribute("data-filter")===v})[0],c&&c.click())});ready("ht-slider",".ht-slider",function(n){var t=n.querySelector(".ht-slider__track"),i=n.querySelector(".ht-slider__wrapper"),r=n.querySelector(".ht-slider__next"),u=n.querySelector(".ht-slider__prev"),f;n.querySelectorAll(".ht-slider__slide").forEach(function(n){var t=n.cloneNode(!0);i.appendChild(t)});f=new Swiper(t,{pauseOnMouseEnter:!0,loop:!0,speed:400,centeredSlides:!0,spaceBetween:24,autoHeight:!0,slidesPerView:"auto",draggable:!0,autoplay:{delay:1e4,disableOnInteraction:!0},navigation:{nextEl:r,prevEl:u}})})