1/*! For license information please see slide-preview.2b89b4ad9d65ce50.js.LICENSE.txt */ 2(self.webpackChunk=self.webpackChunk||[]).push([[2690,5007,9649],{1403:(t,e,n)=>{"use strict";n.d(e,{A:()=>b});var i=n(9347);function r(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}var s={class:"flex-auto"},a=["src"],l={class:"flex-auto p-625"},c={class:"u-text-black text-14"},u={class:"flex-auto text-right"},d={key:0,class:"align-middle u-img-responsive",src:"/img-dist/icons/coins/icon-coin-5-chevron-30x30.png",alt:"5 Coin"},h={key:1,class:"align-middle u-img-responsive",src:"/img-dist/icons/coins/icon-coin-10-chevron-30x30.png",alt:"5 Coin"},m={key:2,class:"align-middle u-img-responsive",src:"/img-dist/icons/coins/icon-coin-25-chevron-30x30.png",alt:"5 Coin"},p={class:"mt-625"};function g(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return f(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}const v={props:{awards:{type:Array},hover:{type:Boolean,default:!1}},data:function(){return{domain:window.App.domain,awardsCount:this.awards.length,limit:5}},computed:{awardsArray:function(){var t=g(this.awards).sort(function(t,e){return t.denomination<e.denomination?1:-1});return this.limit?t.slice(0,this.limit):t}},methods:{}};const b=(0,n(6262).A)(v,[["render",function(t,e,n,o,g,f){return(0,i.openBlock)(),(0,i.createElementBlock)("div",{class:(0,i.normalizeClass)({"bg-white absolute z-10 w-64 border-2 border-blue mt-3125 ml-6 shadow sm:shadow-sm rounded-lg":n.hover})},[n.hover?((0,i.openBlock)(),(0,i.createElementBlock)("div",{key:0,class:(0,i.normalizeClass)({"bg-blue-lightest p-4 rounded-t-lg border-b border-blue-light":n.hover})},r(e[1]||(e[1]=[(0,i.createElementVNode)("h3",{class:"u-text-blue text-center"},"Awards",-1)])),2)):(0,i.createCommentVNode)("",!0),((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(f.awardsArray,function(t,e){return(0,i.openBlock)(),(0,i.createElementBlock)("div",{key:e,class:"container flex items-center content-center border-b border-blue-lighter px-4 py-625"},[(0,i.createElementVNode)("div",s,[(0,i.createElementVNode)("img",{src:t.giver.avatar_url,class:"w-12 h-12 u-img-responsive u-img-avatar"},null,8,a)]),(0,i.createElementVNode)("div",l,[(0,i.createElementVNode)("span",c,(0,i.toDisplayString)(t.giver.name),1)]),(0,i.createElementVNode)("div",u,[5===t.denomination?((0,i.openBlock)(),(0,i.createElementBlock)("img",d)):(0,i.createCommentVNode)("",!0),10===t.denomination?((0,i.openBlock)(),(0,i.createElementBlock)("img",h)):(0,i.createCommentVNode)("",!0),25===t.denomination?((0,i.openBlock)(),(0,i.createElementBlock)("img",m)):(0,i.createCommentVNode)("",!0)])])}),128)),(0,i.createElementVNode)("div",p,[null!==g.limit&&g.limit<g.awardsCount&&!0!==n.hover?((0,i.openBlock)(),(0,i.createElementBlock)("a",{key:0,href:"#",onClick:e[0]||(e[0]=(0,i.withModifiers)(function(t){return g.limit=null},["prevent"]))},"Show All")):(0,i.createCommentVNode)("",!0)])],2)}]])},2690:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>wt});var i=n(9347);function r(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}var s={class:"post-form",id:"comment_form"},a={key:0},l=["aria-controls"],c=["id"],u={key:0,class:"px-3 pb-4"},d={key:0}
2,h={key:0,class:"flex"},m={key:1,class:"font-normal text-sm text-center"},p={key:1},g={key:0,class:"border border-blue-lighter p-2"},f={class:"mt-3"},v=["textContent"],b={key:1},y=["id"],A={key:1,class:"my-3"},x={class:"space-y-4 sm:flex sm:items-center sm:space-y-0 sm:space-x-10"},w=["id","value"],k=["for"],C={key:2,class:"text-red text-sm my-2",role:"alert"},E={class:"comment-composer-footer"},S={class:"comment-composer-tools"},F=["aria-controls"],D=["aria-label","title","aria-expanded","aria-controls"],T={class:"comment-composer-incognito"},B={class:"comment-composer-actions"},R={key:0,class:"comment-composer-status",role:"status"},N=["disabled"],L=["disabled"],O={key:0,class:"comment-composer-hint"},M={key:4,class:"p-2"},P={class:"flex"},I={class:"mr-5"},_=["disabled"],z={key:0},V={key:1},j={key:2},U={key:0},q={key:0,class:"font-normal text-sm"},W={key:1},H={class:"text-center p-6"},G={key:0,class:"bg-yellow-50 border border-yellow-200 rounded-lg p-4 mb-4"},K=["disabled"],Y={key:0},J={key:1},X={key:1,class:"bg-blue-50 border border-blue-200 rounded-lg p-4"},Q={class:"text-sm text-blue-800"};var Z=n(427),tt=n(9833),et=n(9198),nt=n(5284),it=n(6815),rt=n(7088),ot=n(3692);function st(t){return st="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},st(t)}function at(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function lt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?at(Object(n),!0).forEach(function(e){ct(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):at(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function ct(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=st(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=st(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==st(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ut(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function o(n,i,r,o){var l=i&&i.prototype instanceof a?i:a,c=Object.create(l.prototype);return dt(c,"_invoke",function(n,i,r){var o,a,l,c=0,u=r||[],d=!1,h={p:0,n:0,v:t,a:m,f:m.bind(t,4),d:function(e,n){return o=e,a=0,l=t,h.n=n,s}};function m(n,i){for(a=n,l=i,e=0;!d&&c&&!r&&e<u.length;e++){var r,o=u[e],m=h.p,p=o[2];n>3?(r=p===i)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=m&&((r=n<2&&m<o[1])?(a=0,h.v=i,h.n=o[1]):m<p&&(r=n<3||o[0]>i||i>p)&&(o[4]=n,o[5]=i,h.n=p,a=0))}if(r||n>1)return s;throw d=!0,i}return function(r,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&m(u,p),a=u,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(h.n=-1),m(a,l)):h.n=l:h.v=l);try{if(c=2,o){if(a||(r="next"),e=o[r]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+r+"' method"),a=1);o=t}else if((e=(d=h.n<0)?l:n.call(i,h))!==s)break}catch(e){o=t,a=1,l=e}finally{c=1}}return{value:e,done:d}}}(n,r,o),!0),c}var s={};function a(){}function l(){}function c(){}e=Object.getPrototypeOf;var u=[][i]?e(e([][i]())):(dt(e={},i,function(){return this}),e),d=c.prototype=a.prototype=Object.create(u);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,dt(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return l.prototype=c,dt(d,"constructor",c),dt(c,"constructor",l),l.displayName="GeneratorFunction",dt(c,r,"GeneratorFunction"),dt(d),dt(d,r,"Generator"),dt(d,i,function(){return this}),dt(d,"toString",function(){return"[object Generator]"}),(ut=function(){return{w:o,m:h}})()}function dt(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}dt=function(t,e,n,i){function o(e,n){dt(t,e,function(t){return this._invoke(e,n,t)})}e?r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},dt(t,e,n,i)}function ht(t,e,n,i,r,o,s){try{var a=t[o](s),l=a.value}catch(t){return void n(t)}a.done?e(l):Promise.resolve(l).then(i,r)}function mt(t){return function(){var e=this,n=arguments;
2return new Promise(function(i,r){var o=t.apply(e,n);function s(t){ht(o,i,r,s,a,"next",t)}function a(t){ht(o,i,r,s,a,"throw",t)}s(void 0)})}}var pt=0;const gt={emits:["add-comment","close"],props:{compact:{type:Boolean,default:!1},replyTo:{type:String,default:""},postUrl:{type:String},parents:{type:Array,default:function(){return[]}},commentArray:{},incognito:{type:Boolean,default:!1},existingSubmittedReview:{type:Object,required:!1},review:{type:Boolean,default:!1},post:{type:Object},autoSavedComment:{type:Object}},components:{Wysiwyg:et.A,PostOpengraphPreview:nt.A,SwitchButton:ot.A},mixins:[it.A,rt.A],data:function(){var t,e,n,i,r,o,s,a;return{composerId:"comment-composer-".concat(++pt),editorVersion:0,submissionError:"",autosaveRequest:null,composerExpanded:Boolean(this.parents.length||(null===(t=this.autoSavedComment)||void 0===t?void 0:t.id)||(null===(e=this.autoSavedComment)||void 0===e?void 0:e.text)),formattingVisible:!1,attachmentsVisible:!1,errors:new tt.A,formText:this.setFormTextOnLoad(),isIncognito:this.incognito,user:!!window.App.signedIn&&window.App.user,signedInId:!!window.App.signedIn&&window.App.user.id,isReview:!1,isSubmitted:!1,canCreateReview:!this.checkForContent(),media:[],disableAutosave:!1,saving:!1,timeout:!1,commentId:!!this.autoSavedComment&&this.autoSavedComment.id,reviewStatus:!!this.autoSavedComment&&this.autoSavedComment.review_status,reviewStatusOptions:[{id:"accepted",title:"Accept - no revisions needed"},{id:"accepted_revisions",title:"Accept - revisions needed"},{id:"rejected",title:"Reject"}],reviewArray:{tldr_summary:(null===(n=this.autoSavedComment)||void 0===n||null===(n=n.review)||void 0===n||null===(n=n.response)||void 0===n?void 0:n.tldr_summary)||"",proper_conclusion:(null===(i=this.autoSavedComment)||void 0===i||null===(i=i.review)||void 0===i||null===(i=i.response)||void 0===i?void 0:i.proper_conclusion)||"",novel_addition:(null===(r=this.autoSavedComment)||void 0===r||null===(r=r.review)||void 0===r||null===(r=r.response)||void 0===r?void 0:r.novel_addition)||"",appropriate_citation:(null===(o=this.autoSavedComment)||void 0===o||null===(o=o.review)||void 0===o||null===(o=o.response)||void 0===o?void 0:o.appropriate_citation)||"",quality_figures:(null===(s=this.autoSavedComment)||void 0===s||null===(s=s.review)||void 0===s||null===(s=s.response)||void 0===s?void 0:s.quality_figures)||"",suggestions:(null===(a=this.autoSavedComment)||void 0===a||null===(a=a.review)||void 0===a||null===(a=a.response)||void 0===a?void 0:a.suggestions)||""},resendingVerification:!1,verificationMessage:"",verificationMessageClass:""}},created:function(){"case_report"===this.post.research_type&&(0!==this.parents.length?this.isReview=!1:this.autoSavedComment&&!this.post.is_published_case_report?this.isReview=this.autoSavedComment.is_review:this.isReview=!0)},mounted:function(){this.parents.length>0&&this.usesCompactComposer&&this.expandComposer()},beforeUnmount:function(){clearTimeout(this.timeout)},watch:{"reviewArray.tldr_summary":function(t,e){this.autoSave(),this.setFormTextToReviewObject()},"reviewArray.proper_conclusion":function(t,e){this.autoSave(),this.setFormTextToReviewObject()},"reviewArray.adds_something_novel":function(t,e){this.autoSave(),this.setFormTextToReviewObject()},"reviewArray.appropriate_citation":function(t,e){this.autoSave(),this.setFormTextToReviewObject()},"reviewArray.quality_figures":function(t,e){this.autoSave(),this.setFormTextToReviewObject()},"reviewArray.suggestions":function(t,e){this.autoSave(),this.setFormTextToReviewObject()},isReview:function(t,e){this.isReview||(this.reviewStatus=!1),this.setHtmlDefault()},canCreateReview:function(){this.canCreateReview||(this.isReview=!1)}},methods:{chooseImages:function(){var t;this.attachmentsVisible=!0,null===(t=this.$refs.myVueDropzone)||void 0===t||t.$el.click()},revealImageUploads:function(t){var e;this.usesCompactComposer&&null!==(e=t.dataTransfer)&&void 0!==e&&e.types.includes("Files")&&(this.attachmentsVisible=!0)},expandComposer:function(){var t=this;return mt(ut().m(function e(){var n;return ut().w(function(e){for(;;)switch(e.n){case 0:return t.composerExpanded=!0,e.n=1,t.$nextTick();case 1:null===(n=t.$refs.composer)||void 0===n||null===(n=n.querySelector("trix-editor"))||void 0===n||n.focus({preventScroll:!0});case 2:return e.a(2)}},e)}))()},isAccountOldEnough:function(){if(!this.user||!this.user.verified_at)return!1;if("clean"===this.user.spam_status)return!0;var t=new Date(this.user.verified_at);return new Date-t>1728e5},isReviewTimeRemaining:function(){if(this.post&&this.post.published_at){var t=moment.utc(this.post.published_at).local().clone().add(2,"weeks");return moment().isBefore(t)}return!1},checkForContent:function(){var t,e;
2return!!(null!==(t=this.existingSubmittedReview)&&void 0!==t&&t.id||null!==(e=this.commentArray)&&void 0!==e&&e.id||this.parents.length>0)},setFormTextToReviewObject:function(){this.formText="\n <div>\n <h1>TLDR Summary:</h1> ".concat(this.reviewArray.tldr_summary,"\n <h1>Do the authors draw the proper conclusion, given the evidence offered?</h1> ").concat(this.reviewArray.proper_conclusion,"\n <h1>Does the manuscript add something novel to the literature?</h1> ").concat(this.reviewArray.novel_addition,"\n <h1>Does the manuscript cite appropriate literature?</h1> ").concat(this.reviewArray.appropriate_citation,"\n <h1>Is the quality of the figures and tables sufficient?</h1> ").concat(this.reviewArray.quality_figures,"\n <h1>What other suggestions or comments do you have for the authors?</h1> ").concat(this.reviewArray.suggestions,"\n </div>\n ")},validateSections:function(){var t={};for(var e in this.reviewArray)("string"==typeof this.reviewArray[e]&&""===this.reviewArray[e].trim()||null==this.reviewArray[e])&&(t[e]=["".concat(e," field is required")]);return Object.keys(t).length>0?(this.errors.record(t),!1):(this.errors.clear(),!0)},setFormTextOnLoad:function(){return this.autoSavedComment?this.autoSavedComment.text:this.post.research_type?"Leave a comment or tag someone that would be a good reviewer":""},setHtmlDefault:function(){return this.isReview?(this.formText="",this.setFormTextToReviewObject()):this.post.research_type?this.formText="Leave a comment or tag someone that would be a good reviewer":this.formText="",this.formText},autoSave:function(){var t=this;if(!this.disableAutosave&&!this.saving&&this.formText&&(!this.isReview||""!==this.reviewArray.tldr_summary)){clearTimeout(this.timeout);this.timeout=setTimeout(function(){t.saving=!0;var e={text:t.formText,incognito:t.isIncognito,is_review:t.isReview,og_data:t.hasOpenGraph?t.openGraphArray:null,parent_comment_id:t.parents.length>0?t.parents[t.parents.length-1]:null,media:t.media,comment_id:t.commentId,review_status:t.reviewStatus};t.isReview&&(e.review=t.reviewArray),t.autosaveRequest=axios.post("/"+t.postUrl+"/comment/autosave",e).then(function(e){t.saving=!1,t.commentId=e.data.comment_id}).catch(function(e){var n;422==(null===(n=e.response)||void 0===n?void 0:n.status)&&$.each(e.response.data.errors,function(t,e){e[0]}),t.saving=!1})},1e3)}},closeCommentForm:function(){this.$emit("close")},submitForm:function(){var t=this;return mt(ut().m(function e(){var n,i;return ut().w(function(e){for(;;)switch(e.n){case 0:if(!t.isSubmitted){e.n=1;break}return e.a(2);case 1:if(n={text:t.formText,incognito:t.isIncognito,is_review:t.isReview,og_data:t.hasOpenGraph?t.openGraphArray:null,parent_comment_id:t.parents.length>0?t.parents[t.parents.length-1]:null,media:t.media,comment_id:t.commentId,review_status:t.reviewStatus},!t.isReview){e.n=3;break}if(t.validateSections()){e.n=2;break}return t.$toasted.show("Review is missing some information",{theme:"",position:"bottom-right",className:"bg-red text-white rounded-full",type:"error",duration:5e4}),t.saving=!1,t.isSubmitted=!1,e.a(2);case 2:if(n.review=t.reviewArray,i="accepted_revisions"===t.reviewStatus?"Are you sure you'd like accept the case report with revisions?":"rejected"===t.reviewStatus?"Are you sure you'd like reject the case report?":"Are you sure you'd like accept the case report?",confirm(i)){e.n=3;break}return e.a(2);case 3:return t.isSubmitted=!0,t.submissionError="",t.disableAutosave=!0,clearTimeout(t.timeout),e.n=4,t.autosaveRequest;case 4:n.comment_id=t.commentId,t.saving=!0,axios.post("/"+t.postUrl+"/comment",lt(lt({},n),(0,Z.wr)(t.post.id))).then(function(){var e=mt(ut().m(function e(n){return ut().w(function(e){for(;;)switch(e.n){case 0:return t.commentId=n.data.comment_id,t.comment=n.data.comment,t.isReview&&(t.canCreateReview=!1,t.isReview=!1,t.reviewArray.tldr_summary=null,t.disableAutosave=!0),t.saving=!1,t.removeOpengraphPreview(),e.n=1,t.finalizeNewComment();case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()).catch(function(e){var n,i;422==(null===(n=e.response)||void 0===n?void 0:n.status)&&$.each(e.response.data.errors,function(t,e){e[0]}),t.saving=!1,t.isSubmitted=!1,t.disableAutosave=!1,t.submissionError=(null===(i=e.response)||void 0===i||null===(i=i.data)||void 0===i||null===(i=i.errors)||void 0===i||null===(i=i.text)||void 0===i?void 0:i[0])||"Your comment could not be posted. Please try again. Your draft is still here."});case 5:return e.a(2)}},e)}))()},toggleIsReview:function(){this.isReview=!this.isReview},finalizeNewComment:function(){var t=this;return mt(ut().m(function e(){var n,i,r;return ut().w(function(e){for(;;)switch(e.n){case 0:return i=t.comment.id,t.$emit("add-comment",t.comment),t.eventHub.$emit("refreshCommentCount",{postId:t.post.id}),t.formText="",t.commentId=!1,t.media=[],null===(n=t.$refs.myVueDropzone)||void 0===n||n.removeAllFiles(),t.formattingVisible=!1,t.attachmentsVisible=!1,t.composerExpanded=!1,t.editorVersion++,t.isSubmitted=!1,t.$toasted.show("Your comment has been posted!",{theme:"",position:"bottom-right",className:"bg-green text-white rounded-full",type:"success",duration:5e3}
2),t.closeCommentForm(),e.n=1,t.$nextTick();case 1:t.disableAutosave=!1,(r=document.getElementById("comment_"+i))&&(r.setAttribute("tabindex","-1"),r.focus({preventScroll:!0}),r.scrollIntoView({block:"center"}));case 2:return e.a(2)}},e)}))()},complete:function(t){var e=JSON.parse(t.xhr.response);this.media.push(e.id)},resendVerificationEmail:function(){var t=this;this.resendingVerification=!0,this.verificationMessage="",this.verificationMessageClass="",axios.post("/resend-verification-email").then(function(e){t.verificationMessage="Verification email sent successfully! Please check your inbox.",t.verificationMessageClass="text-green-600"}).catch(function(e){t.verificationMessage="Failed to resend verification email. Please try again.",t.verificationMessageClass="text-red-600"}).finally(function(){t.resendingVerification=!1})},formatDate:function(t){return moment(t).format("YYYY-MM-DD HH:mm")},getRemainingTime:function(){if(!this.user.verified_at)return"N/A";var t=new Date(this.user.verified_at),e=moment(),n=t.getTime()+1728e5-e.valueOf();if(n<=0)return"0 hours";var i=Math.floor(n/36e5);return"".concat(i," hours")}},computed:{usesCompactComposer:function(){return!this.isReview&&(this.parents.length>0||this.compact&&!this.post.research_type)},composerPlaceholder:function(){return this.parents.length>0?this.replyTo?"Reply to ".concat(this.replyTo):"Write a reply":"Join the conversation"},allowMedia:function(){return!this.post||!this.post.research_type},isDisabled:function(){return!!this.isSubmitted||!(!this.isReview||this.reviewStatus)},isCaseReportAuthor:function(){var t=this;return"case_report"===this.post.research_type&&this.post.confirmed_case_report_authors.find(function(e){return e.id===t.signedInId})}},filters:{titleCase:function(t){return(t=t.replace(/_/g," ")).replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()})}}};var ft=n(5072),vt=n.n(ft),bt=n(9253),yt={insert:"head",singleton:!1};vt()(bt.A,yt);bt.A.locals;var At=n(5495),xt={insert:"head",singleton:!1};vt()(At.A,xt);At.A.locals;const wt=(0,n(6262).A)(gt,[["render",function(t,e,n,o,$,Z){var tt=(0,i.resolveComponent)("switch-button"),et=(0,i.resolveComponent)("wysiwyg"),nt=(0,i.resolveComponent)("vue-dropzone"),it=(0,i.resolveComponent)("post-opengraph-preview");return(0,i.openBlock)(),(0,i.createElementBlock)("div",s,[Z.isAccountOldEnough()?((0,i.openBlock)(),(0,i.createElementBlock)("div",a,[Z.usesCompactComposer&&!$.composerExpanded?((0,i.openBlock)(),(0,i.createElementBlock)("button",{key:0,ref:"composerPrompt",type:"button",class:"comment-composer-prompt","aria-controls":$.composerExpanded?$.composerId:void 0,"aria-expanded":!1,onClick:e[0]||(e[0]=function(){return Z.expandComposer&&Z.expandComposer.apply(Z,arguments)})}," Join the conversation ",8,l)):(0,i.createCommentVNode)("",!0),$.composerExpanded||!Z.usesCompactComposer?((0,i.openBlock)(),(0,i.createElementBlock)("form",{key:1,id:$.composerId,ref:"composer",class:(0,i.normalizeClass)({"comment-composer":Z.usesCompactComposer}),action:"POST",onSubmit:e[12]||(e[12]=(0,i.withModifiers)(function(){return Z.submitForm&&Z.submitForm.apply(Z,arguments)},["prevent"])),onDragenter:e[13]||(e[13]=function(){return Z.revealImageUploads&&Z.revealImageUploads.apply(Z,arguments)})},[(0,i.createElementVNode)("div",null,[n.post.research_type&&!Z.isCaseReportAuthor&&0===n.parents.length?((0,i.openBlock)(),(0,i.createElementBlock)("div",u,[!n.post.is_published_case_report||Z.isReviewTimeRemaining?((0,i.openBlock)(),(0,i.createElementBlock)("div",d,[$.canCreateReview?((0,i.openBlock)(),(0,i.createElementBlock)("div",h,[(0,i.createElementVNode)("div",{class:(0,i.normalizeClass)(["flex-1 text-right mr-3",$.isReview?"text-purple-lightest":"font-bold"])},"Post a comment",2),((0,i.openBlock)(),(0,i.createBlock)(tt,{onToggled:Z.toggleIsReview,value:$.isReview,key:"review","same-color":!0,class:"cursor-pointer"},null,8,["onToggled","value"])),(0,i.createElementVNode)("div",{class:(0,i.normalizeClass)(["flex-1 text-left",$.isReview?"font-bold":"text-purple-lightest"])},"Post a review",2)])):(0,i.createCommentVNode)("",!0),$.isReview?((0,i.openBlock)(),(0,i.createElementBlock)("div",m," Use the provided template to structure your review. Once your review has been submitted, it cannot be edited. ")):(0,i.createCommentVNode)("",!0)])):((0,i.openBlock)(),(0,i.createElementBlock)("div",p,r(e[15]||(e[15]=[(0,i.createElementVNode)("div",{class:"font-normal text-sm text-center"}," This case report has been published - you can no longer submit reviews ",-1)]))))])):(0,i.createCommentVNode)("",!0)]),(0,i.createElementVNode)("div",{class:(0,i.normalizeClass)(Z.usesCompactComposer?"comment-composer-body":"u-mb-10")},[$.isReview?((0,i.openBlock)(),(0,i.createElementBlock)("div",g,[((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)($.reviewArray,function(n,r){return(0,i.openBlock)(),(0,i.createElementBlock)("div",null,[(0,i.createElementVNode)("h4",f,(0,i.toDisplayString)(t.titleCase(r)),1),((0,i.openBlock)(),(0,i.createBlock)(et,{name:r,class:"case-report-editor",ke
2y:"review."+r,onContentUpdated:e[1]||(e[1]=function(t){return Z.autoSave()}),onOpengraph:t.displayOpenGraph,modelValue:$.reviewArray[r],"onUpdate:modelValue":function(t){return $.reviewArray[r]=t}},null,8,["name","onOpengraph","modelValue","onUpdate:modelValue"])),(0,i.createElementVNode)("p",{class:"text-red text-12 mt-3125",textContent:(0,i.toDisplayString)($.errors.get(r))},null,8,v)])}),256))])):((0,i.openBlock)(),(0,i.createElementBlock)("div",b,[((0,i.openBlock)(),(0,i.createBlock)(et,{name:$.composerId+"-content",key:"is_review_"+$.isReview+"_"+$.editorVersion,"toolbar-id":Z.usesCompactComposer?$.composerId+"-toolbar":void 0,"show-formatting":!Z.usesCompactComposer||$.formattingVisible,placeholder:Z.usesCompactComposer?Z.composerPlaceholder:void 0,onContentUpdated:e[2]||(e[2]=function(t){return Z.autoSave()}),onOpengraph:t.displayOpenGraph,modelValue:$.formText,"onUpdate:modelValue":e[3]||(e[3]=function(t){return $.formText=t})},null,8,["name","toolbar-id","show-formatting","placeholder","onOpengraph","modelValue"]))])),(0,i.withDirectives)((0,i.createElementVNode)("div",{id:$.composerId+"-uploads"},[this.allowMedia?((0,i.openBlock)(),(0,i.createBlock)(nt,{key:0,ref:"myVueDropzone",id:"dropzone",class:"rounded-b-sm",onVdropzoneThumbnail:t.thumbnail,onVdropzoneComplete:Z.complete,options:t.dropzoneImageOptions},null,8,["onVdropzoneThumbnail","onVdropzoneComplete","options"])):(0,i.createCommentVNode)("",!0)],8,y),[[i.vShow,!Z.usesCompactComposer||$.attachmentsVisible]])],2),t.hasOpenGraph?((0,i.openBlock)(),(0,i.createBlock)(it,{key:0,opengraph:t.openGraphArray,removable:!0,onRemoveOpengraphPreview:t.removeOpengraphPreview},null,8,["opengraph","onRemoveOpengraphPreview"])):(0,i.createCommentVNode)("",!0),$.isReview?((0,i.openBlock)(),(0,i.createElementBlock)("div",A,[e[16]||(e[16]=(0,i.createElementVNode)("legend",{class:"sr-only"},"Review Status",-1)),(0,i.createElementVNode)("div",x,[((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)($.reviewStatusOptions,function(t){return(0,i.openBlock)(),(0,i.createElementBlock)("div",{key:t.id,class:"flex items-center"},[(0,i.withDirectives)((0,i.createElementVNode)("input",{id:t.id,"onUpdate:modelValue":e[4]||(e[4]=function(t){return $.reviewStatus=t}),name:"notification-method",type:"radio",value:t.id,class:"h-4 w-4 border-gray-300 text-indigo-600 focus:ring-indigo-500"},null,8,w),[[i.vModelRadio,$.reviewStatus]]),(0,i.createElementVNode)("label",{for:t.id,class:"ml-3 mb-0 block text-sm font-medium text-gray-700"},(0,i.toDisplayString)(t.title),9,k)])}),128))])])):(0,i.createCommentVNode)("",!0),$.submissionError?((0,i.openBlock)(),(0,i.createElementBlock)("p",C,(0,i.toDisplayString)($.submissionError),1)):(0,i.createCommentVNode)("",!0),Z.usesCompactComposer?((0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,{key:3},[(0,i.createElementVNode)("div",E,[(0,i.createElementVNode)("div",S,[Z.allowMedia?((0,i.openBlock)(),(0,i.createElementBlock)("button",{key:0,type:"button",class:"comment-composer-tool","aria-label":"Add images",title:"Add images","aria-controls":$.composerId+"-uploads",onClick:e[5]||(e[5]=function(){return Z.chooseImages&&Z.chooseImages.apply(Z,arguments)})},r(e[17]||(e[17]=[(0,i.createElementVNode)("svg",{"aria-hidden":"true",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.7","stroke-linecap":"round","stroke-linejoin":"round"},[(0,i.createElementVNode)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"3"}),(0,i.createElementVNode)("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),(0,i.createElementVNode)("path",{d:"m21 15-5-5L6 21"})],-1)])),8,F)):(0,i.createCommentVNode)("",!0),(0,i.createElementVNode)("button",{type:"button",class:"comment-composer-tool comment-composer-formatting","aria-label":$.formattingVisible?"Hide formatting options":"Show formatting options",title:$.formattingVisible?"Hide formatting options":"Show formatting options","aria-expanded":$.formattingVisible,"aria-controls":$.composerId+"-toolbar",onMousedown:e[6]||(e[6]=(0,i.withModifiers)(function(){},["prevent"])),onClick:e[7]||(e[7]=function(t){return $.formattingVisible=!$.formattingVisible})},r(e[18]||(e[18]=[(0,i.createElementVNode)("span",{"aria-hidden":"true"},"Aa",-1)])),40,D),(0,i.createElementVNode)("label",T,[(0,i.withDirectives)((0,i.createElementVNode)("input",{type:"checkbox","onUpdate:modelValue":e[8]||(e[8]=function(t){return $.isIncognito=t}),"aria-label":"Post incognito"},null,512),[[i.vModelCheckbox,$.isIncognito]]),e[19]||(e[19]=(0,i.createElementVNode)("span",null,"Incognito",-1))])]),(0,i.createElementVNode)("div",B,[$.saving?((0,i.openBlock)(),(0,i.createElementBlock)("span",R,"Savingâ¦")):(0,i.createCommentVNode)("",!0),n.parents.length>0?((0,i.openBlock)(),(0,i.createElementBlock)("button",{key:1,type:"button",class:"comment-composer-cancel",disabled:$.isSubmitted,onClick:e[9]||(e[9]=function(){return Z.closeCommentForm&&Z.closeCommentForm.apply(Z,arguments)})}," Cancel ",8,N)):(0,i.createCommentVNode)("",!0),(0,i.createElementVNode)("button",{type:"submit",class:"comment-composer-submit",disabled:Z.isDisabled},(0,i.toDisplayString)($.isSubmitted?"Postingâ¦":"Comment"),9,L)])]),$.isIncognito?((0,i.openBlock)(),(0,i.createElementBlock)("p",O," Your name will be hidden, but you'll still receive XP for upvotes. ")):(0,i.createCommentVNode)("",!0)],64)):((0,i.openBlock)(),(0,i.createElementBlock)("div",M,[(0,i.createElementVNode)("div",P,[(0,i.createElementVNode)("div",I,[(0,i.createElementVNode)("button",{type:"submit",class:"btn btn-small",disabled:Z.isDisabled},[$.isSubmitted?((0,i.openBlock)(),(0,i.createElementBlock)("span",z," Posting Comment... ")):$.isReview?((0,i.openBlock)(),(0,i.createElementBlock)("span",V," Submit Review ")):((0,i.openBlock)(),(0,i.createElementBlock)("span",j," Post "))],8,_)]),$.saving?((0,i.openBlock)(),(0,i.createElementBlock)("div",U,"saving...")):(0,i.createCommentVNode)("",!0),(0,i.createElementVNode)("div",null,[((0,i.openBlock)(),(0,i.createBlock)(tt,{onToggled:e[10]||(e[10]=function(t){return $.isIncognito=!$.isIncognito}),key:"incognito",value:$.isIncognito,label:"Post incognito","same-color":!1,class:"cursor-pointer"},null,8,["value"])),e[21]||(e[21]=(0,i.createElementVNode)("span",null,[(0,i.createElementVNode)("strong",null,"Incognito")],-1)),$.isIncognito?((0,i.openBlock)(),(0,i.createElementBlock)("span",q,r(e[20]||(e[20]=[(0,i.createElementVNode)("span",{class:"italic"},"â Your name will be hidden but you'll still receive XP for any upvotes you earn",-1)])))):(0,i.createCommentVNode)("",!0)])]),e[22]||(e[22]=(0,i.createElementVNode)("div",null,null,-1)),n.parents.length>
20?((0,i.openBlock)(),(0,i.createElementBlock)("button",{key:0,type:"button",class:"btn-small btn-text",onClick:e[11]||(e[11]=(0,i.withModifiers)(function(){return Z.closeCommentForm&&Z.closeCommentForm.apply(Z,arguments)},["prevent"]))}," Cancel ")):(0,i.createCommentVNode)("",!0)]))],42,c)):(0,i.createCommentVNode)("",!0)])):((0,i.openBlock)(),(0,i.createElementBlock)("div",W,[(0,i.createElementVNode)("div",H,[e[25]||(e[25]=(0,i.createElementVNode)("h3",{class:"text-lg font-semibold mb-4"},"Account Verification Required",-1)),e[26]||(e[26]=(0,i.createElementVNode)("p",{class:"text-gray-700 mb-4"}," Your account must be at least 48 hours old after email verification to comment. ",-1)),$.user.verified_at?((0,i.openBlock)(),(0,i.createElementBlock)("div",X,[(0,i.createElementVNode)("p",Q,[e[24]||(e[24]=(0,i.createElementVNode)("strong",null,"Waiting Period:",-1)),(0,i.createTextVNode)(" Your account was verified on "+(0,i.toDisplayString)(Z.formatDate($.user.verified_at))+". You can start commenting in approximately "+(0,i.toDisplayString)(Z.getRemainingTime())+". ",1)])])):((0,i.openBlock)(),(0,i.createElementBlock)("div",G,[e[23]||(e[23]=(0,i.createElementVNode)("p",{class:"text-sm text-yellow-800 mb-3"},[(0,i.createElementVNode)("strong",null,"Email Verification Required:"),(0,i.createTextVNode)(" Please verify your email address first. ")],-1)),(0,i.createElementVNode)("button",{onClick:e[14]||(e[14]=function(){return Z.resendVerificationEmail&&Z.resendVerificationEmail.apply(Z,arguments)}),disabled:$.resendingVerification,class:"btn btn-small bg-yellow-600 hover:bg-yellow-700 text-white"},[$.resendingVerification?((0,i.openBlock)(),(0,i.createElementBlock)("span",Y,"Sending...")):((0,i.openBlock)(),(0,i.createElementBlock)("span",J,"Resend Verification Email"))],8,K),$.verificationMessage?((0,i.openBlock)(),(0,i.createElementBlock)("div",{key:0,class:(0,i.normalizeClass)(["mt-2 text-sm",$.verificationMessageClass])},(0,i.toDisplayString)($.verificationMessage),3)):(0,i.createCommentVNode)("",!0)]))])]))])}],["__scopeId","data-v-2ed960e1"]])},2721:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var i=n(6314),r=n.n(i)()(function(t){return t[1]});r.push([t.id,".comment[data-v-4d350aab]{padding-bottom:12px;padding-top:12px;position:relative}.comment--with-votes[data-v-4d350aab]{padding-right:60px}.comment-header[data-v-4d350aab]{align-items:center;-moz-column-gap:10px;column-gap:10px;display:grid;grid-template-columns:44px minmax(0,1fr) auto;row-gap:2px}.comment-avatar-frame[data-v-4d350aab]{height:44px;width:44px}.comment-author[data-v-4d350aab]{display:flex;flex-direction:column;gap:3px;min-width:0;overflow-wrap:anywhere}.comment-author h3[data-v-4d350aab]{line-height:1.3;margin:0}.comment-timestamp[data-v-4d350aab]{text-align:right}.comment-editor[data-v-4d350aab]{grid-column:2/-1;min-width:0}.comment-footer[data-v-4d350aab]{display:flex;flex-direction:column;gap:8px}.comment-actions[data-v-4d350aab],.comment-links[data-v-4d350aab]{align-items:center;display:flex;flex-wrap:wrap;gap:8px}.comment-votes[data-v-4d350aab]{float:none;margin:0;position:absolute;right:15px;top:12px}.comment-links a[data-v-4d350aab]{align-items:center;display:inline-flex;gap:4px;min-height:32px}@media (max-width:639px){.comment-header[data-v-4d350aab]{grid-template-columns:44px minmax(0,1fr)}.comment-timestamp[data-v-4d350aab]{grid-column:2;text-align:left}}.comment-avatar[data-v-4d350aab]{border-radius:50%;display:block;height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.comment-links a[data-v-4d350aab]{border-right-width:1px;padding-left:.3125rem;padding-right:.3125rem}.comment-links a[data-v-4d350aab]:first-of-type{padding-left:0}.comment-links a[data-v-4d350aab]:last-of-type{border-right-width:0}#dropzone[data-v-4d350aab]{border-style:solid}",""]);const o=r},3692:(t,e,n)=>{"use strict";n.d(e,{A:()=>m});var i=n(9347),r=["for"],o={class:"relative"},s=["id","aria-label"];var a=0;const l={name:"SwitchButton",props:{modelValue:{type:Boolean,default:void 0},value:{type:Boolean,default:void 0},sameColor:{type:Boolean,default:!1},label:{type:String,default:"Toggle option"}},emits:["update:modelValue","toggled"],data:function(){var t,e;return{inputId:"switch-".concat(++a),isChecked:null!==(t=null!==(e=this.modelValue)&&void 0!==e?e:this.value)&&void 0!==t&&t}},watch:{modelValue:function(t){void 0!==t&&(this.isChecked=t)},value:function(t){void 0===this.modelValue&&void 0!==t&&(this.isChecked=t)}},methods:{emitChange:function(){this.$emit("update:modelValue",this.isChecked),this.$emit("toggled",this.isChecked)}}};var c=n(5072),u=n.n(c),d=n(9298),h={insert:"head",singleton:!1};u()(d.A,h);d.A.locals;const m=(0,n(6262).A)(l,[["render",function(t,e,n,a,l,c){return(0,i.openBlock)(),(0,i.createElementBlock)("label",{for:t.inputId,class:"cursor-pointer mb-0 inline-block align-middle pr-3"},[(0,i.createElementVNode)("div",o,[(0,i.withDirectives)((0,i.createElementVNode)("input",{type:"checkbox",id:t.
2inputId,"aria-label":n.label,class:"sr-only","onUpdate:modelValue":e[0]||(e[0]=function(e){return t.isChecked=e}),onChange:e[1]||(e[1]=function(){return c.emitChange&&c.emitChange.apply(c,arguments)})},null,40,s),[[i.vModelCheckbox,t.isChecked]]),(0,i.createElementVNode)("div",{class:"block bg-blue-lighter w-10 h-5 rounded-full",style:(0,i.normalizeStyle)(n.sameColor?"background-color: #BBBDFA":"")},null,4),e[2]||(e[2]=(0,i.createElementVNode)("div",{class:"dot absolute bg-white w-5 h-5 rounded-full transition switch-shadow",style:{left:"0px",bottom:"0px"}},null,-1))]),(0,i.renderSlot)(t.$slots,"default",{},void 0,!0)],8,r)}],["__scopeId","data-v-595b4000"]])},5495:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var i=n(6314),r=n.n(i)()(function(t){return t[1]});r.push([t.id,".post-content{border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-width:0}",""]);const o=r},5849:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>Zt});var i=n(9347),r={key:0},o={key:0,class:"mt-4 mb-2 text-center sm:text-left"},s={key:1,id:"reviews",class:"mt-4 mb-2 text-center sm:text-left"},a={key:2,id:"comments",class:"mt-4 mb-2 text-center sm:text-left"},l=["id"];function c(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}var d=["id"],h={key:1,class:"py-1 mb-1 bg-blue-darker text-white text-center text-sm"},m={key:0},p={class:"comment-header"},g={class:"comment-avatar-frame"},f={key:0},v=["src"],b=["href"],y=["src"],A={class:"post-comment__author comment-author"},x={key:0,class:"text-16 leading-tight"},w=["href"],k={class:"text-12 text-purple-lightest hover:text-blue"},C={class:"comment-timestamp text-purple-lightest text-12"},E={key:1,class:"comment-editor"},S={class:"field"},F=["textContent"],D={class:"u-flex u-justify-space-between"},T=["innerHTML"],B=["textContent"],R={class:"comment-footer"},N={key:0,class:"text-left w-full"},L={key:1,class:"text-sm"},O={key:0,class:"ml-0"},M={key:1,class:"ml-0"},P={key:1,class:"comment-actions"},I={key:0,class:"comment-links"},z={key:2,class:"text-12",href:"#"},V={key:3,class:"text-sm"},j={key:0,class:"ml-0"},U={class:"ml-0"},q={key:1,class:"py-625 px-15 post-border comment"},W={class:"comment-header"},H={class:"comment-avatar-frame"},$=["href"],G={key:2,class:"pl-5 sm:pl-30 md:pl-10 reply-bg post-border"};var K=n(5903),Y=["onClick"],J={class:"top-0 left-0 fixed h-full w-full bg-lightbox flex items-center justify-center z-50"},X={href:"",ref:"lightboxLink",target:"_blank"},Q={ref:"lightboxImg",class:"max-w-lightbox max-h-screen px-5 pb-10",dusk:"media-lightbox"},Z={key:0,class:"text-white text-center"};const tt={extends:n(1301).default,data:function(){return{mediaArray:this.media.slice(0,6)}}};var et=n(6262);const nt=(0,et.A)(tt,[["render",function(t,e,n,r,o,s){return o.mediaArray.length?((0,i.openBlock)(),(0,i.createElementBlock)("section",{key:0,class:(0,i.normalizeClass)([t.mediaClass,"flex flex-wrap h-auto ml-0 md:ml-30 md:h-1 md:w-48"])},[((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(o.mediaArray,function(e,n){return(0,i.openBlock)(),(0,i.createElementBlock)("div",{key:e.id,style:(0,i.normalizeStyle)(t.mediaObject(e)),onClick:function(n){return t.showLightbox(e)},class:"cursor-pointer relative h-24 w-24 border-4 border-white bg-cover bg-center md:flex-grow",dusk:"media"},null,12,Y)}),128)),(0,i.withDirectives)((0,i.createElementVNode)("div",J,[(0,i.createElementVNode)("a",{onClick:e[0]||(e[0]=(0,i.withModifiers)(function(e){return t.lightboxIsVisible=!1},["prevent"])),class:"absolute top-0 right-0 mt-10 mr-10 text-white text-24",href:"#",dusk:"media-lightbox-close"}," â "),(0,i.createElementVNode)("a",{onClick:e[1]||(e[1]=(0,i.withModifiers)(function(e){return t.navigateLightbox("back")},["prevent"])),class:"mr-10 text-white text-30",href:"#",dusk:"media-lightbox-back"}," â "),(0,i.createElementVNode)("div",null,[(0,i.createElementVNode)("a",X,[(0,i.createElementVNode)("img",Q,null,512)],512),t.currentMediaCount?((0,i.openBlock)(),(0,i.createElementBlock)("p",Z,(0,i.toDisplayString)(t.currentMediaCount)+" / "+(0,i.toDisplayString)(t.totalMediaCount),1)):(0,i.createCommentVNode)("",!0)]),(0,i.createElementVNode)("a",{onClick:e[2]||(e[2]=(0,i.withModifiers)(function(e){return t.navigateLightbox("forward")},["prevent"])),class:"ml-10 text-white text-30",href:"#",dusk:"media-lightbox-forward"}," â ")],512),[[i.vShow,t.lightboxIsVisible]])],2)):(0,i.createCommentVNode)("",!0)}]]);var it=n(2690),rt=n(9833);function ot(t){return function(t){if(Array.isArray(t))return st(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return st(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?st(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function st(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}var at={key:0},lt={key:0,class:"text-center pb-10 border-b border-blue-light"},ct={key:0},ut={key:0,class:"align-middle mr-4 u-img-responsive",src:"/img-dist/icons/coins/icon-coin-5-60x60.png",alt:"5 Coin"},dt={key:1,class:"align-middle mr-4 u-img-responsive",src:"/img-dist/icons/coins/icon-coin-10-60x60.png",alt:"10 Coin"},ht={key:2,class:"align-middle mr-4 u-img-responsive",src:"/img-dist/icons/coins/icon-coin-25-60x60.png",alt:"25 Coin"},mt={key:1},pt={class:"flex mb-625 justify-center items-center"},gt={class:"inline-block px-5"},ft={class:"inline-block px-5"},vt={key:0,class:"align-middle u-img-responsive",src:"/img-dist/icons/coins/icon-coin-10-gray-60x60.png",alt:"10 Coin"},bt={class:"inline-block px-5"},yt={key:0,class:"align-middle u-img-responsive",src:"/img-dist/icons/coins/icon-coin-25-gray-60x60.png",alt:"25 Coin"},At={class:"u-text-blue"},xt={class:"flex justify-start p-625 border-b border-grey-light"},wt={class:"flex-auto"},kt={class:"inline-block px-625 text-22 align-middle"},Ct={class:"flex-auto"},Et={class:"inline-block px-625 text-22 align-middle"},St={class:"flex-auto"},Ft={class:"inline-block px-625 text-22 align-middle"},Dt={class:"flex-auto"},Tt={class:"inline-block px-625 text-22 align-middle"},Bt={key:0,class:"px-625"},Rt={key:1,class:"sm:inline-block relative"};const Nt={props:["comment","currentUser"],data:function(){return{domain:window.App.domain,coins:this.currentUser.coins,awards:this.comment.awards,scrollable:!1,showAwards:!1}},components:{AwardsList:n(1403).A},computed:{canAward:function(){return!this.comment.is_original_author},awarded:function(){var t=this,e=this.awards.find(function(e){return e.giver_id===t.currentUser.id});return!!e&&e.denomination},fives:function(){return this.awards.filter(function(t){return 5===t.denomination}).length},tens:function(){return this.awards.filter(function(t){return 10===t.denomination}).length},twentyfives:function(){return this.awards.filter(function(t){return 25===t.denomination}).length},total:function(){return this.fives+this.tens+this.twentyfives}},methods:{award:function(t){var e=this;this.coins<t&&this.error("Something went wrong, please make sure you have the correct number of coins available."),axios.post("".concat(window.location.origin,"/posts/").concat(this.comment.post_id,"/comments/").concat(this.comment.id,"/coins/award"),{coin:t}).then(function(t){e.coins=t.data.coins,e.awards=t.data.awards}).catch(function(t){var n='Something has gone wrong: "'.concat(t.message,'"');422===t.response.status&&(console.log(t.response.data.message),n=t.response.data.message),e.error(n)})},error:function(t){this.$toasted.show(t,{theme:"",position:"bottom-right",className:"bg-red text-white rounded-full",type:"error",duration:5e3})}}},Lt=(0,et.A)(Nt,[["render",function(t,e,n,r,o,s){var a=this,l=(0,i.resolveComponent)("awards-list"),c=(0,i.resolveComponent)("modal");return(0,i.openBlock)(),(0,i.createBlock)(c,{appearance:"compact",class:(0,i.normalizeClass)({"overflow-scroll":o.scrollable})},{header:(0,i.withCtx)(function(){return[s.canAward?((0,i.openBlock)(),(0,i.createElementBlock)("div",at,[s.awarded||o.coins>=5?((0,i.openBlock)(),(0,i.createElementBlock)("div",lt,[s.awarded?((0,i.openBlock)(),(0,i.createElementBlock)("div",ct,[e[6]||(e[6]=(0,i.createElementVNode)("h3",{class:"u-text-blue mb-625"},"You have given an award!",-1)),5===s.awarded?((0,i.openBlock)(),(0,i.createElementBlock)("img",ut)):(0,i.createCommentVNode)("",!0),10===s.awarded?((0,i.openBlock)(),(0,i.createElementBlock)("img",dt)):(0,i.createCommentVNode)("",!0),25===s.awarded?((0,i.openBlock)(),(0,i.createElementBlock)("img",ht)):(0,i.createCommentVNode)("",!0)])):((0,i.openBlock)(),(0,i.createElementBlock)("div",mt,[e[10]||(e[10]=(0,i.createElementVNode)("h3",{class:"u-text-blue mb-625"},"Give this comment an award!",-1)),(0,i.createElementVNode)("div",pt,[(0,i.createElementVNode)("div",gt,[(0,i.createElementVNode)("a",{href:"#",onClick:e[0]||(e[0]=(0,i.withModifiers)(function(t){return s.award(5)},["prevent"]))}
2,ot(e[7]||(e[7]=[(0,i.createElementVNode)("img",{class:"align-middle mr-4 u-img-responsive",src:"/img-dist/icons/coins/icon-coin-5-60x60.png",alt:"5 Coin"},null,-1)])))]),(0,i.createElementVNode)("div",ft,[o.coins<10?((0,i.openBlock)(),(0,i.createElementBlock)("img",vt)):((0,i.openBlock)(),(0,i.createElementBlock)("a",{key:1,href:"#",onClick:e[1]||(e[1]=(0,i.withModifiers)(function(t){return s.award(10)},["prevent"]))},ot(e[8]||(e[8]=[(0,i.createElementVNode)("img",{class:"align-middle u-img-responsive",src:"/img-dist/icons/coins/icon-coin-10-60x60.png",alt:"10 Coin"},null,-1)]))))]),(0,i.createElementVNode)("div",bt,[o.coins<25?((0,i.openBlock)(),(0,i.createElementBlock)("img",yt)):((0,i.openBlock)(),(0,i.createElementBlock)("a",{key:1,href:"#",onClick:e[2]||(e[2]=(0,i.withModifiers)(function(t){return s.award(25)},["prevent"]))},ot(e[9]||(e[9]=[(0,i.createElementVNode)("img",{class:"align-middle u-img-responsive",src:"/img-dist/icons/coins/icon-coin-25-60x60.png",alt:"25 Coin"},null,-1)]))))])])])),(0,i.createElementVNode)("h3",At,"You have "+(0,i.toDisplayString)(o.coins)+" coins remaining.",1)])):(0,i.createCommentVNode)("",!0)])):(0,i.createCommentVNode)("",!0)]}),body:(0,i.withCtx)(function(){return[(0,i.createElementVNode)("div",xt,[(0,i.createElementVNode)("div",wt,[e[11]||(e[11]=(0,i.createElementVNode)("img",{class:"align-middle mr-4 u-img-responsive",src:"/img-dist/icons/coins/icon-coin-5-chevron-30x30.png",alt:"5 Coin"},null,-1)),(0,i.createElementVNode)("span",kt,(0,i.toDisplayString)(s.fives),1)]),(0,i.createElementVNode)("div",Ct,[e[12]||(e[12]=(0,i.createElementVNode)("img",{class:"align-middle mr-4 u-img-responsive",src:"/img-dist/icons/coins/icon-coin-10-chevron-30x30.png",alt:"10 Coin"},null,-1)),(0,i.createElementVNode)("span",Et,(0,i.toDisplayString)(s.tens),1)]),(0,i.createElementVNode)("div",St,[e[13]||(e[13]=(0,i.createElementVNode)("img",{class:"align-middle mr-4 u-img-responsive",src:"/img-dist/icons/coins/icon-coin-25-chevron-30x30.png",alt:"25 Coin"},null,-1)),(0,i.createElementVNode)("span",Ft,(0,i.toDisplayString)(s.twentyfives),1)]),(0,i.createElementVNode)("div",Dt,[(0,i.createElementVNode)("span",Tt,"Total: "+(0,i.toDisplayString)(s.total),1)])]),o.awards.length>0?((0,i.openBlock)(),(0,i.createElementBlock)("div",Bt,[(0,i.createVNode)(l,{awards:o.awards,onAll:e[3]||(e[3]=function(t){return o.scrollable=!0})},null,8,["awards"])])):(0,i.createCommentVNode)("",!0)]}),footer:(0,i.withCtx)(function(){return ot(e[14]||(e[14]=[]))}),trigger:(0,i.withCtx)(function(){return[a.awards.length>0?((0,i.openBlock)(),(0,i.createElementBlock)("div",{key:0,class:"sm:inline-block relative",onMouseover:e[4]||(e[4]=function(t){return o.showAwards=!0}),onMouseleave:e[5]||(e[5]=function(t){return o.showAwards=!1})},[e[15]||(e[15]=(0,i.createElementVNode)("svg",{class:"ml-625 align-middle cursor-pointer u-img-responsive",width:"30px",height:"31px",viewBox:"0 0 30 31",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[(0,i.createElementVNode)("defs",null,[(0,i.createElementVNode)("linearGradient",{x1:"50%",y1:"100%",x2:"50%",y2:"-1.89478063e-14%",id:"linearGradient-1"},[(0,i.createElementVNode)("stop",{"stop-color":"#000000",offset:"0%"}),(0,i.createElementVNode)("stop",{"stop-color":"#FFFFFF",offset:"100%"})]),(0,i.createElementVNode)("linearGradient",{x1:"50.0048328%",y1:"99.9985382%",x2:"50.0048328%",y2:"0%",id:"linearGradient-2"},[(0,i.createElementVNode)("stop",{"stop-color":"#FFFFFF",offset:"0%"}),(0,i.createElementVNode)("stop",{"stop-color":"#000000",offset:"100%"})]),(0,i.createElementVNode)("linearGradient",{x1:"50.0048328%",y1:"99.9985382%",x2:"50.0048328%",y2:"0%",id:"linearGradient-3"},[(0,i.createElementVNode)("stop",{"stop-color":"#FFFFFF",offset:"0%"}),(0,i.createElementVNode)("stop",{"stop-color":"#000000",offset:"100%"})])]),(0,i.createElementVNode)("g",{id:"Page-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[(0,i.createElementVNode)("g",{id:"Group"},[(0,i.createElementVNode)("path",{d:"M15,30.0000247 C23.2842712,30.0000247 30,23.284296 30,15.0000247 C30,6.71575349 23.2842712,2.47397855e-05 15,2.47397855e-05 C6.71572875,2.47397855e-05 0,6.71575349 0,15.0000247 C0,23.284296 6.71572875,30.0000247 15,30.0000247 Z",id:"Oval",fill:"#4B59E0","fill-rule":"nonzero"}),(0,i.createElementVNode)("path",{d:"M30,15.0000247 C30,23.2842959 23.2842712,30.0000247 15,30.0000247 C6.71572875,30.0000247 0,23.2842959 0,15.0000247 C0,6.71575349 6.71572875,2.47397855e-05 15,2.47397855e-05 C23.2842712,2.47397855e-05 30,6.71575349 30,15.0000247 Z",id:"Shape-path",fill:"url(#linearGradient-1)","fill-rule":"nonzero",style:{"mix-blend-mode":"soft-light"}}),(0,i.createElementVNode)("path",{d:"M15,0.64502474 C7.07195242,0.64502474 0.645,7.07197716 0.645,15.0000247 C0.645,22.9280723 7.07195242,29.3550247 15,29.3550247 C22.9280476,29.3550247 29.355,22.9280723 29.355,15.0000247 C29.355,7.07197716 22.9280476,0.64502474 15,0.64502474 L15,0.64502474 Z",id:"Shape-path",fill:"url(#linearGradient-1)","fill-rule":"nonzero",style:{"mix-blend-mode":"soft-light"}}),(0,i.createElementVNode)("path",{d:"M27.1870001,15.0000247 C27.1870001,19.9297015 24.2173809,24.3739519 19.6629147,26.2603641 C15.1084484,28.1467763 9.8660939,27.1038395 6.38042899,23.6178885 C2.89476408,20.1319376 1.85225738,14.8894975 3.7390433,10.3351861 C5.62582921,5.78087468 10.0703232,2.81162027 15,2.81202474 C18.2323666,2.81202474 21.3323293,4.09614581 23.6178639,6.38186794 C25.9033985,8.66759007 27.1872652,11.7676581 27.1870001,15.0000247 Z",id:"Shape-path",fill:"url(#linearGradient-2)","fill-rule":"nonzero",style:{"mix-blend-mode":"soft-light"}}),(0,i.createElementVNode)("path",{d:"M15,3.47702474 C8.63602283,3.47702474 3.477,8.63604757 3.477,15.0000247 C3.477,21.3640019 8.63602283,26.5230247 15,26.5230247 C21.3639772,26.5230247 26.523,21.3640019 26.523,15.0000247 C26.523,11.9439351 25.3089731,9.01301499 23.1479914,6.8520333 C20.9870098,4.69105161 18.0560896,3.47702474 15,3.47702474 L15,3.47702474 Z",id:"Shape-path",fill:"url(#linearGradient-3)","fill-rule":"nonzero",style:{"mix-blend-mode":"soft-light"}}),(0,i.createElementVNode)("path",{d:"M15,26.5230247 C21.3639772,26.5230247 26.523,21.3640019 26.523,15.0000247 C26.523,8.63604757 21.3639772,3.47702474 15,3.47702474 C8.63602283,3.47702474 3.477,8.63604757 3.477,15.0000247 C3.477,21.3640019 8.63602283,26.5230247 15,26.5230247 Z",id:"Oval",fill:"#000000","fill-rule":"nonzero",style:{"mix-blend-mode":"soft-light"}}),(0,i.createElementVNode)("path",{d:"M15,26.5230247 C21.3639772,26.5230247 26.523,21.3640019 26.523,15.0000247 C26.523,8.63604757 21.3639772,3.47702474 15,3.47702474 C8.63602283,3.47702474 3.477,8.63604757 3.477,15.0000247 C3.477,21.3640019 8.63602283,26.5230247 15,26.5230247 Z",id:"Oval",fill:"#333333","fill-rule":"nonzero",style:{"mix-blend-mode":"soft-light"}}),(0,i.createElementVNode)("path",{d:"M30.0000224,15.0000247 C30.0074436,22.5260002 24.4368436,28.8924137 16.9764837,29.884075 C9.51612371,30.8757363 2.47584393,26.1856122 0.517,18.9190247 C3.57630367,23.0092203 8.69879505,24.9988086 13.7168595,24.0458827 C18.734924,23.0929569 22.7714828,19.3640733 24.1184406,14.4371327 C25.4653983,9.51019214 23.887328,4.24634626 20.052,0.87302474 C26.0183191,3.00906116 29.9996332,8.6628633 30.0000224,15.0000247 L30.0000224,15.0000247 Z",id:"Path",fill:"#808080","fill-rule":"nonzero",style:{"mix-blend-mode":"soft-light"}}),(0,i.createElementVNode)("path",{d:"M24.5890286,10.9080247 C24.5890286,16.6648449 20.9037665,21.7752246 15.4414831,23.5930359 C9.97919959,25.4108472 3.96660923,23.5278396 0.517,18.9190247 C-0.0361817322,16.8539883 -0.144234685,14.6949744 0.2,12.5850247 C2.39583735,15.0356835 5.75478641,16.0914122 8.95779096,15.337627 C12.1607955,14.5838419 14.6963811,12.1409118 15.5688255,8.96817311 C16.44127,5.7954344 15.5112563,2.39952858 13.144,0.11402474 C13.7597516,0.0380875448 14.3795836,0 15,0 C16.7216838,-0.0017910471 18.430766,0.293543218 20.052,0.87302474 C22.9399091,3.40782136 24.5935985,7.06547457 24.5890286,10.9080247 Z",id:"Path",fill:"#B3B3B3","fill-rule":"nonzero",style:{"mix-blend-mode":"soft-light"}}),(0,i.createElementVNode)("path",{d:"M15.8400241,6.53302474 C15.8388591,10.2459555 13.5557609,13.5763862 10.0930365,14.91631 C6.63031207,16.2562338 2.70010194,15.3300832 0.2,12.5850247 C1.27276339,6.01809945 6.54170563,0.94169504 13.144,0.11402474 C14.871108,1.80285736 15.8432401,4.11744055 15.8400241,6.53302474 L15.8400241,6.53302474 Z",id:"Path",fill:"#E6E6E6","fill-rule":"nonzero",style:{"mix-blend-mode":"soft-light"}}),(0,i.createElementVNode)("polygon",{id:"Path",stroke:"#FFFFFF","stroke-width":"0.9","stroke-linejoin":"round",points:"20.208 7.58302474 20.208 17.5440247 14.998 22.4170247 9.727 17.4820247"}),(0,i.createElementVNode)("path",{d:"M11.467,19.0900247 L20.273,10.8140247 L11.467,19.0900247 Z",id:"Path",stroke:"#FFFFFF","stroke-width":"0.9","stroke-linejoin":"round"}),(0,i.createElementVNode)("path",{d:"M13.144,20.6830247 L20.19,14.0570247 L13.144,20.6830247 Z",id:"Path",stroke:"#FFFFFF","stroke-width":"0.9","stroke-linejoin":"round"}),(0,i.createElementVNode)("polygon",{id:"Path",stroke:"#FFFFFF","stroke-width":"0.9","stroke-linejoin":"round",points:"9.727 17.4820247 9.727 10.8320247 16.73 10.8320247"}),(0,i.createElementVNode)("polygon",{id:"Path",fill:"#FFFFFF","fill-rule":"nonzero",points:"6.714 4.80602474 7.253 6.26402474 8.711 6.80302474 7.253 7.34302474 6.714 8.80002474 6.174 7.34302474 4.717 6.80302474 6.174 6.26402474"}),(0,i.createElementVNode)("polygon",{id:"Path",fill:"#FFFFFF","fill-rule":"nonzero",points:"23.286 21.2000247 23.825 22.6570247 25.283 23.1970247 23.825 23.7360247 23.286 25.1940247 22.747 23.7360247 21.289 23.1970247 22.747 22.6570247"})])])],-1)),o.showAwards?((0,i.openBlock)(),(0,i.createBlock)(l,{key:0,awards:o.awards,hover:!0},null,8,["awards"])):(0,i.createCommentVNode)("",!0)],32)):o.coins>=5&&s.canAward?((0,i.openBlock)(),(0,i.createElementBlock)("div",Rt,ot(e[16
2]||(e[16]=[(0,i.createElementVNode)("svg",{class:"ml-625 align-middle cursor-pointer u-img-responsive",width:"30px",height:"30px",viewBox:"0 0 30 30",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[(0,i.createElementVNode)("defs",null,[(0,i.createElementVNode)("linearGradient",{x1:"50%",y1:"100%",x2:"50%",y2:"-1.89478063e-14%",id:"linearGradient-1"},[(0,i.createElementVNode)("stop",{"stop-color":"#000000",offset:"0%"}),(0,i.createElementVNode)("stop",{"stop-color":"#FFFFFF",offset:"100%"})]),(0,i.createElementVNode)("linearGradient",{x1:"50.0048323%",y1:"99.9944375%",x2:"50.0048323%",y2:"2.71188186e-06%",id:"linearGradient-2"},[(0,i.createElementVNode)("stop",{"stop-color":"#FFFFFF",offset:"0%"}),(0,i.createElementVNode)("stop",{"stop-color":"#000000",offset:"100%"})])]),(0,i.createElementVNode)("g",{id:"Page-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[(0,i.createElementVNode)("g",{id:"Group"},[(0,i.createElementVNode)("g",{id:"icon-grey-kiko-chevron"}),(0,i.createElementVNode)("path",{d:"M11.572,19.132 L20.379,10.857 L11.572,19.132 Z",id:"Path",stroke:"#FFFFFF","stroke-width":"0.9","stroke-linejoin":"round"}),(0,i.createElementVNode)("path",{d:"M13.25,20.725 L20.295,14.1 L13.25,20.725 Z",id:"Path",stroke:"#FFFFFF","stroke-width":"0.9","stroke-linejoin":"round"}),(0,i.createElementVNode)("path",{d:"M15,30 C23.2842712,30 30,23.2842712 30,15 C30,6.71572875 23.2842712,0 15,0 C6.71572875,0 0,6.71572875 0,15 C0,23.2842712 6.71572875,30 15,30 Z",id:"Oval",fill:"#D4D4D4","fill-rule":"nonzero"}),(0,i.createElementVNode)("path",{d:"M30,15 C30,23.2842712 23.2842712,30 15,30 C6.71572875,30 0,23.2842712 0,15 C0,6.71572875 6.71572875,0 15,0 C23.2842712,0 30,6.71572875 30,15 Z M15,0.645 C7.07195242,0.645 0.645,7.07195242 0.645,15 C0.645,22.9280476 7.07195242,29.355 15,29.355 C22.9280476,29.355 29.355,22.9280476 29.355,15 C29.355,7.07195242 22.9280476,0.645 15,0.645 L15,0.645 Z",id:"Shape",fill:"url(#linearGradient-1)","fill-rule":"nonzero",style:{"mix-blend-mode":"soft-light"}}),(0,i.createElementVNode)("path",{d:"M27.284,15.042 C27.2844042,19.9720408 24.3147168,24.4167876 19.7599143,26.3033389 C15.2051117,28.1898903 9.9623579,27.1466502 6.47672178,23.6601558 C2.99108566,20.1736615 1.94913638,14.930651 3.83680902,10.376313 C5.72448165,5.82197504 10.1699595,2.85338202 15.1,2.85499868 C21.8295226,2.85665657 27.284,8.31247715 27.284,15.042 L27.284,15.042 Z M15.1,3.51899921 C10.4391087,3.51778654 6.23648417,6.32450587 4.45199742,10.6302597 C2.66751068,14.9360135 3.65262901,19.8927532 6.94794783,23.1889302 C10.2432667,26.4851072 15.1997497,27.4715161 19.505968,25.6881506 C23.8121863,23.904785 26.62,19.7028914 26.62,15.042 C26.62,8.67919422 21.4628056,3.52065655 15.1,3.51899921 L15.1,3.51899921 Z",id:"Shape",fill:"url(#linearGradient-2)","fill-rule":"nonzero",style:{"mix-blend-mode":"soft-light"}}),(0,i.createElementVNode)("path",{d:"M15.097,26.565 C21.4609772,26.565 26.62,21.4059772 26.62,15.042 C26.62,8.67802283 21.4609772,3.519 15.097,3.519 C8.73302283,3.519 3.574,8.67802283 3.574,15.042 C3.574,21.4059772 8.73302283,26.565 15.097,26.565 Z",id:"Oval",fill:"#000000","fill-rule":"nonzero",style:{"mix-blend-mode":"soft-light"}}),(0,i.createElementVNode)("path",{d:"M15.097,26.565 C21.4609772,26.565 26.62,21.4059772 26.62,15.042 C26.62,8.67802283 21.4609772,3.519 15.097,3.519 C8.73302283,3.519 3.574,8.67802283 3.574,15.042 C3.574,21.4059772 8.73302283,26.565 15.097,26.565 Z",id:"Oval",fill:"#F0F0F0","fill-rule":"nonzero",style:{"mix-blend-mode":"soft-light"}}),(0,i.createElementVNode)("polygon",{id:"Path",fill:"#FFFFFF","fill-rule":"nonzero",points:"6.714 4.806 7.253 6.264 8.711 6.803 7.253 7.343 6.714 8.8 6.174 7.343 4.717 6.803 6.174 6.264"}),(0,i.createElementVNode)("polygon",{id:"Path",fill:"#FFFFFF","fill-rule":"nonzero",points:"23.286 21.2 23.825 22.657 25.283 23.197 23.825 23.736 23.286 25.194 22.747 23.736 21.289 23.197 22.747 22.657"}),(0,i.createElementVNode)("polygon",{id:"Path",stroke:"#FFFFFF","stroke-width":"0.9","stroke-linejoin":"round",points:"20.208 7.583 20.208 17.544 14.998 22.417 9.727 17.482"}),(0,i.createElementVNode)("path",{d:"M11.467,19.09 L20.273,10.814 L11.467,19.09 Z",id:"Path",stroke:"#FFFFFF","stroke-width":"0.9","stroke-linejoin":"round"}),(0,i.createElementVNode)("path",{d:"M13.144,20.683 L20.19,14.057 L13.144,20.683 Z",id:"Path",stroke:"#FFFFFF","stroke-width":"0.9","stroke-linejoin":"round"}),(0,i.createElementVNode)("polygon",{id:"Path",stroke:"#FFFFFF","stroke-width":"0.9","stroke-linejoin":"round",points:"9.727 17.482 9.727 10.832 16.73 10.832"})])])],-1)])))):(0,i.createCommentVNode)("",!0)]}),_:1},8,["class"])}]]);var Ot=n(5284),Mt={class:"border border-blue-lighter rounded-lg p-625 mt-5 bg-white relative sm:flex"},Pt=["href"],It={class:"sm:flex-1 ml-625"},_t=["href"],zt=["textContent"],Vt=["textContent"],jt=["textContent"];const Ut={name:"CommentOpengraphPreview",extends:Ot.A},qt=(0,et.A)(Ut,[["render",function(t,e,n,r,o,s){return(0,i.openBlock)(),(0,i.createElementBlock)("div",Mt,[t.opengraph.og_image?((0,i.openBlock)(),(0,i.createElementBlock)("a",{key:0,href:t.opengraph.og_url,class:"u-link-black invisible sm:visible",target:"_blank"},[(0,i.createElementVNode)("div",{style:(0,i.normalizeStyle)("background-image: url(".concat(t.opengraph.og_image,")")),class:"w-48 h-full bg-cover bg-center mb-4 sm:mb-0"},null,4)],8,Pt)):(0,i.createCommentVNode)("",!0),(0,i.createElementVNode)("div",It,[(0,i.createElementVNode)("a",{href:t.opengraph.og_url,class:"u-link-black",target:"_blank"},[(0,i.createElementVNode)("h3",{textContent:(0,i.toDisplayString)(t.opengraph.og_title),class:"comment-article-preview__title u-text-bold text-14 leading-tight"},null,8,zt)],8,_t),t.opengraph.og_site_name?((0,i.openBlock)(),(0,i.createElementBlock)("p",{key:0,textContent:(0,i.toDisplayString)(t.opengraph.og_site_name),class:"text-grey text-12 mb-625"},null,8,Vt)):(0,i.createCommentVNode)("",!0),t.opengraph.og_description?((0,i.openBlock)(),(0,i.createElementBlock)("p",{key:1,textContent:(0,i.toDisplayString)(t.opengraph.og_description),class:"mb-625 text-black text-12"},null,8,jt)):(0,i.createCommentVNode)("",!0)]),t.removable?((0,i.openBlock)(),(0,i.createElementBlock)("a",{key:1,href:"#",class:"block mt-625 text-10",onClick:e[0]||(e[0]=(0,i.withModifiers)(function(){return t.removeOpengraphPreview&&t.removeOpengraphPreview.apply(t,arguments)},["prevent"]))}," Remove Preview ")):(0,i.createCommentVNode)("",!0)])}]]);
2var Wt=n(6815),Ht=n(7088),$t=n(9198);const Gt={props:{comment:{type:Object},parents:{type:Array,default:function(){return[]}},incognito:{type:Boolean,default:!1},post:{type:Object}},components:{CommentForm:it.default,CommentAward:Lt,Counter:K.A,Media:nt,PostOpengraphPreview:Ot.A,CommentOpengraphPreview:qt,Wysiwyg:$t.A},name:"comment",mixins:[Wt.A,Ht.A],data:function(){var t;return{signedIn:window.App.signedIn,commentArray:this.comment,showForm:!1,isEditing:!1,profileUrl:null!==(t=this.comment.author)&&void 0!==t&&t.username?"".concat(window.location.origin,"/").concat(this.comment.author.username):"#",voteUrl:"/posts/"+this.comment.post_id+"/comments/"+this.comment.id+"/vote/",errors:new rt.A,existingFiles:[],checked:this.incognito,domainUrl:"".concat(window.location.origin),userId:!!window.App.signedIn&&window.App.user.id}},computed:{avatarUrl:function(){var t;return(null===(t=this.commentArray.author)||void 0===t?void 0:t.avatar_url)||"/img-dist/icons/icon-default-avatar.svg"},isVendor:function(){return 0!=window.App.signedIn&&"Vendor"==window.App.user.role},canVote:function(){var t=this;return 0!=window.App.signedIn&&this.authorize(function(e){return t.commentArray.author_id!=e.id})},canUpdate:function(){var t=this;return 0!=window.App.signedIn&&this.authorize(function(e){return t.commentArray.author_id==e.id})},createdAt:function(){return moment.utc(this.commentArray.created_at).local().format("MMMM DD, YYYY [at] h:mma")},canReply:function(){return!this.showForm&&this.signedIn&&this.parents.length<4},hasOpenGraphData:function(){return this.commentArray.og_data&&Object.keys(this.commentArray.og_data).length>0},currentUser:function(){return window.App.user}},methods:{formatDate:function(t){var e=moment.utc(t).local(),n=moment().startOf("day");return e.isSame(n,"d")?e.format("h:mm A"):e.format("MMM D, YYYY, h:mm A")},closeCommentForm:function(){this.showForm=!1},stopEditing:function(){this.isEditing=!1,this.commentArray.text=this.comment.text},updateComment:function(){var t=this,e={text:this.commentArray.text,og_data:this.hasOpenGraphData?this.commentArray.og_data:null,existing_files:this.existingFiles,media:this.commentArray.media.map(function(t){return t.id})};axios.put("/posts/".concat(this.comment.post_id,"/comment/").concat(this.comment.id),e).then(function(e){t.finalizeUpdatedComment()}).catch(function(e){t.errors.record(e.response.data.errors)})},acceptRevisions:function(){var t=this;axios.post("/posts/".concat(this.comment.post_id,"/comment/").concat(this.comment.id,"/accept")).then(function(e){t.commentArray=e.data.comment,t.finalizeUpdatedComment()}).catch(function(e){t.errors.record(e.response.data.errors)})},saveMedia:function(){this.$toasted.show("Processing your images",{theme:"",position:"bottom-right",className:"bg-green text-white rounded-full",type:"success",duration:5e3});var t=this.$refs.myVueDropzone;t&&(t.setOption("url","".concat(window.location.origin,"/posts/").concat(this.comment.post_id,"/comments/").concat(this.comment.id,"/media")),t.processQueue())},complete:function(t){var e;if(!t.manuallyAdded&&null!==(e=t.xhr)&&void 0!==e&&e.response){var n=JSON.parse(t.xhr.response);this.commentArray.media.push(n),this.$refs.myVueDropzone.removeFile(t),this.finalizeUpdatedComment()}},finalizeUpdatedComment:function(){this.$toasted.show("Your comment has been updated!",{theme:"",position:"bottom-right",className:"bg-green text-white rounded-full",type:"success",duration:5e3}),this.isEditing=!1},deleteComment:function(){var t=this;confirm("Are you sure you want to delete this comment?")&&axios.post("/posts/".concat(this.comment.post_id,"/comment/").concat(this.comment.id,"/delete")).then(function(e){t.$toasted.show("Your comment has been deleted!",{theme:"",position:"bottom-right",className:"bg-green text-white rounded-full",type:"success",duration:5e3}),t.isEditing=!1,t.commentArray=e.data}).catch(function(e){t.errors.record(e.response.data.errors)})},displayOpenGraph:function(t){1!=this.hasOpenGraph&&null!=t.url&&(this.hasOpenGraph=!0,this.commentArray.og_data={og_description:t.description,og_title:t.title,og_site_name:t.siteName,og_url:t.url,og_image:_.isEmpty(t.images)?null:t.images[0].url})},removeOpengraphPreview:function(){this.hasOpenGraph=!1,this.commentArray.og_data=null,this.openGraphArray=null},setupDropzone:function(){var t=this;
2this.commentArray.media.forEach(function(e){var n={size:"",name:e.id,type:"image/jpg"};t.$refs.myVueDropzone.manuallyAddFile(n,e.media_url),t.existingFiles.push(e.id)})},handleRemovedFile:function(t){var e=this.existingFiles.indexOf(t.name);-1!==e&&this.existingFiles.splice(e,1)},thumbnail:function(t,e){var n,i,r,o;if(t.previewElement){for(t.previewElement.classList.remove("dz-file-preview"),n=0,i=(r=t.previewElement.querySelectorAll("[data-dz-thumbnail-bg]")).length;n<i;n++)(o=r[n]).alt=t.name,o.style.backgroundImage='url("'+e+'")';return setTimeout(function(){return t.previewElement.classList.add("dz-image-preview")},1)}}},beforeCreate:function(){}};var Kt=n(5072),Yt=n.n(Kt),Jt=n(2721),Xt={insert:"head",singleton:!1};Yt()(Jt.A,Xt);Jt.A.locals;const Qt={props:{comments:{type:[Object,Array]},post:{type:[Object]},parents:{type:Array,default:function(){return[]}},incognito:{type:Boolean,default:!1},isCaseReport:{type:Boolean,default:!1},isNested:{type:Boolean,default:!1}},components:{Comment:(0,et.A)(Gt,[["render",function(t,e,n,r,o,s){var a=(0,i.resolveComponent)("counter"),l=(0,i.resolveComponent)("wysiwyg"),u=(0,i.resolveComponent)("vue-dropzone"),_=(0,i.resolveComponent)("post-opengraph-preview"),K=(0,i.resolveComponent)("comment-opengraph-preview"),Y=(0,i.resolveComponent)("media"),J=(0,i.resolveComponent)("comment-form"),X=(0,i.resolveComponent)("comment-list");return(0,i.openBlock)(),(0,i.createElementBlock)("div",null,[!o.commentArray.deleted_at&&o.commentArray.author?((0,i.openBlock)(),(0,i.createElementBlock)("section",{key:0,class:(0,i.normalizeClass)(["py-625 px-15 post-border comment",{"comment--with-votes":o.signedIn}]),id:"comment_"+o.commentArray.id},[o.signedIn?((0,i.openBlock)(),(0,i.createBlock)(a,{key:0,class:"comment-votes",canVote:s.canVote,id:n.comment.id,count:n.comment.votes,"vote-type":n.comment.user_voted,url:o.voteUrl},null,8,["canVote","id","count","vote-type","url"])):(0,i.createCommentVNode)("",!0),o.commentArray.is_review?((0,i.openBlock)(),(0,i.createElementBlock)("div",h,[(0,i.createTextVNode)((0,i.toDisplayString)(o.commentArray.author.first_name)+" "+(0,i.toDisplayString)(o.commentArray.author.last_name)+"'s Review | "+(0,i.toDisplayString)(o.commentArray.review_status_readable)+" ",1),o.commentArray.review_points?((0,i.openBlock)(),(0,i.createElementBlock)("span",m,"("+(0,i.toDisplayString)(o.commentArray.review_points)+" points)",1)):(0,i.createCommentVNode)("",!0)])):(0,i.createCommentVNode)("",!0),(0,i.createElementVNode)("div",p,[(0,i.createElementVNode)("div",g,[o.commentArray.incognito?((0,i.openBlock)(),(0,i.createElementBlock)("span",f,[(0,i.createElementVNode)("img",{src:s.avatarUrl,class:"comment-avatar"},null,8,v)])):((0,i.openBlock)(),(0,i.createElementBlock)("a",{key:1,href:o.profileUrl,target:"_blank"},[(0,i.createElementVNode)("img",{src:s.avatarUrl,class:"comment-avatar"},null,8,y)],8,b))]),o.isEditing?((0,i.openBlock)(),(0,i.createElementBlock)("div",E,[(0,i.createElementVNode)("div",S,[(0,i.createVNode)(l,{name:"text",modelValue:o.commentArray.text,"onUpdate:modelValue":e[0]||(e[0]=function(t){return o.commentArray.text=t}),onOpengraph:s.displayOpenGraph},null,8,["modelValue","onOpengraph"]),(0,i.createVNode)(u,{ref:"myVueDropzone",onVdropzoneComplete:s.complete,id:"dropzone",onVdropzoneThumbnail:s.thumbnail,onVdropzoneMounted:s.setupDropzone,onVdropzoneRemovedFile:s.handleRemovedFile,options:t.dropzoneImageOptions},null,8,["onVdropzoneComplete","onVdropzoneThumbnail","onVdropzoneMounted","onVdropzoneRemovedFile","options"]),o.errors.has("text")?((0,i.openBlock)(),(0,i.createElementBlock)("p",{key:0,class:"field__error",textContent:(0,i.toDisplayString)(o.errors.get("text"))},null,8,F)):(0,i.createCommentVNode)("",!0)]),s.hasOpenGraphData?((0,i.openBlock)(),(0,i.createBlock)(_,{key:0,opengraph:o.commentArray.og_data,removable:!0,onRemoveOpengraphPreview:s.removeOpengraphPreview},null,8,["opengraph","onRemoveOpengraphPreview"])):(0,i.createCommentVNode)("",!0),(0,i.createElementVNode)("div",D,[(0,i.createElementVNode)("div",null,[(0,i.createElementVNode)("button",{class:"btn btn-small",onClick:e[1]||(e[1]=function(){return s.updateComment&&s.updateComment.apply(s,arguments)})},"Update"),(0,i.createElementVNode)("a",{href:"#",class:"text-red text-14 ml-625",onClick:e[2]||(e[2]=(0,i.withModifiers)(function(){return s.deleteComment&&s.deleteComment.apply(s,arguments)},["prevent"]))},"Delete")]),(0,i.createElementVNode)("button",{class:"btn-small btn-text",onClick:e[3]||(e[3]=function(){return s.stopEditing&&s.stopEditing.a
2pply(s,arguments)})},"Cancel")])])):((0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,{key:0},[(0,i.createElementVNode)("div",A,[o.commentArray.incognito?((0,i.openBlock)(),(0,i.createElementBlock)("span",x,(0,i.toDisplayString)(o.commentArray.author.first_name)+" "+(0,i.toDisplayString)(o.commentArray.author.last_name),1)):((0,i.openBlock)(),(0,i.createElementBlock)("a",{key:1,href:o.profileUrl,class:"text-16 u-link-black tracking-headline leading-tight"},(0,i.toDisplayString)(o.commentArray.author.first_name)+" "+(0,i.toDisplayString)(o.commentArray.author.last_name),9,w)),(0,i.createElementVNode)("h3",k,[(0,i.createElementVNode)("span",null,(0,i.toDisplayString)(o.commentArray.author.echelon.level?"Level ".concat(o.commentArray.author.echelon.level):null)+" "+(0,i.toDisplayString)(o.commentArray.author.echelon.name)+" | "+(0,i.toDisplayString)(o.commentArray.author.role),1)])]),(0,i.createElementVNode)("small",C,(0,i.toDisplayString)(s.createdAt),1)],64))]),!o.isEditing&&s.hasOpenGraphData?((0,i.openBlock)(),(0,i.createBlock)(K,{key:2,opengraph:o.commentArray.og_data,class:"my-2"},null,8,["opengraph"])):(0,i.createCommentVNode)("",!0),(0,i.createElementVNode)("div",{class:"flex flex-row w-full post-comment__text text-16 u-text-black my-2",style:(0,i.normalizeStyle)("min-height:".concat(100*Math.ceil(o.commentArray.media.length/2),"px"))},[(0,i.createElementVNode)("div",{innerHTML:o.commentArray.text,class:"flex-1"},null,8,T),o.errors.has("text")?((0,i.openBlock)(),(0,i.createElementBlock)("p",{key:0,class:"field__error",textContent:(0,i.toDisplayString)(o.errors.get("text"))},null,8,B)):(0,i.createCommentVNode)("",!0),o.commentArray.media?((0,i.openBlock)(),(0,i.createBlock)(Y,{key:1,media:n.comment.media,post:n.comment,dusk:"media",class:"flex-none w-full md:flex"},null,8,["media","post"])):(0,i.createCommentVNode)("",!0)],4),(0,i.createElementVNode)("div",R,[o.
2commentArray.is_review?((0,i.openBlock)(),(0,i.createElementBlock)("div",N,[o.commentArray.is_accepted||o.commentArray.author_id!==o.userId?(0,i.createCommentVNode)("",!0):((0,i.openBlock)(),(0,i.createElementBlock)("button",{key:0,class:"btn btn-blue btn-small",onClick:e[4]||(e[4]=function(){return s.acceptRevisions&&s.acceptRevisions.apply(s,arguments)})},"Accept Revisions")),o.commentArray.accepted_at?((0,i.openBlock)(),(0,i.createElementBlock)("div",L,[e[9]||(e[9]=(0,i.createTextVNode)(" Activity: ",-1)),o.commentArray.is_accepted?((0,i.openBlock)(),(0,i.createElementBlock)("div",O,(0,i.toDisplayString)(o.commentArray.review_status_readable)+" - "+(0,i.toDisplayString)(s.formatDate(o.commentArray.accepted_at)),1)):(0,i.createCommentVNode)("",!0),o.commentArray.rejected_at?((0,i.openBlock)(),(0,i.createElementBlock)("div",M,(0,i.toDisplayString)(o.commentArray.review_status_readable)+" - "+(0,i.toDisplayString)(s.formatDate(o.commentArray.rejected_at)),1)):(0,i.createCommentVNode)("",!0)])):(0,i.createCommentVNode)("",!0)])):(0,i.createCommentVNode)("",!0),o.signedIn?((0,i.openBlock)(),(0,i.createElementBlock)("div",P,[s.isVendor||o.showForm?(0,i.createCommentVNode)("",!0):((0,i.openBlock)(),(0,i.createElementBlock)("div",I,[s.canReply?((0,i.openBlock)(),(0,i.createElementBlock)("a",{key:0,class:"text-12",href:"#",onClick:e[5]||(e[5]=(0,i.withModifiers)(function(t){return o.showForm=!o.showForm},["prevent"]))},c(e[10]||(e[10]=[(0,i.createElementVNode)("svg",{class:"inline",width:"16",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},[(0,i.createElementVNode)("path",{style:{fill:"#5458F7"},d:"M8.309 189.836L184.313 37.851C199.719 24.546 224 35.347 224 56.015v80.053c160.629 1.839 288 34.032 288 186.258 0 61.441-39.581 122.309-83.333 154.132-13.653 9.931-33.111-2.533-28.077-18.631 45.344-145.012-21.507-183.51-176.59-185.742V360c0 20.7-24.3 31.453-39.687 18.164l-176.004-152c-11.071-9.562-11.086-26.753 0-36.328z"})],-1),(0,i.createTextVNode)(" Reply ",-1)])))):(0,i.createCommentVNode)("",!0),!s.canUpdate||o.showForm||o.commentArray.is_review?(0,i.createCommentVNode)("",!0):((0,i.openBlock)(),(0,i.createElementBlock)("a",{key:1,class:"text-12",href:"#",onClick:e[6]||(e[6]=(0,i.withModifiers)(function(t){return o.isEditing=!0},["prevent"]))}," Edit ")),s.canUpdate&&!o.showForm&&o.commentArray.is_review?((0,i.openBlock)(),(0,i.createElementBlock)("div",z," Reviews can't be edited ")):(0,i.createCommentVNode)("",!0)]))])):(0,i.createCommentVNode)("",!0),o.showForm?((0,i.openBlock)(),(0,i.createBlock)(J,{key:2,"post-url":"".concat(n.comment.commentable_url),parents:[o.commentArray.id],"reply-to":[o.commentArray.author.first_name,o.commentArray.author.last_name].filter(Boolean).join(" "),post:n.post,incognito:o.checked,onChangeIncognito:e[7]||(e[7]=function(t){return o.checked=t}),onAddComment:e[8]||(e[8]=function(t){return o.commentArray.replies.push(t)}),onClose:s.closeCommentForm,class:"w-full"},null,8,["post-url","parents","reply-to","post","incognito","onClose"])):(0,i.createCommentVNode)("",!0)]),o.commentArray.rejected_at&&!o.commentArray.accepted_at?((0,i.openBlock)(),(0,i.createElementBlock)("div",V,[e[11]||(e[11]=(0,i.createTextVNode)(" Activity: ",-1)),o.commentArray.is_accepted?((0,i.openBlock)(),(0,i.createElementBlock)("div",j,"Accepted - "+(0,i.toDisplayString)(s.formatDate(o.commentArray.accepted_at)),1)):(0,i.createCommentVNode)("",!0),(0,i.createElementVNode)("div",U,(0,i.toDisplayString)(o.commentArray.review_status_readable)+" - "+(0,i.toDisplayString)(s.formatDate(o.commentArray.rejected_at)),1)])):(0,i.createCommentVNode)("",!0)],10,d)):((0,i.openBlock)(),(0,i.createElementBlock)("section",q,[(0,i.createElementVNode)("div",W,[(0,i.createElementVNode)("div",H,[(0,i.createElementVNode)("a",{href:o.profileUrl,target:"_blank"},c(e[12]||(e[12]=[(0,i.createElementVNode)("img",{src:"/img-dist/icons/icon-default-avatar.svg",class:"comment-avatar"},null,-1)])),8,$)]),e[13]||(e[13]=(0,i.createElementVNode)("div",{class:"flex-1"},[(0,i.createElementVNode)("p",{class:"text-12 text-black italic m-0"}," This comment has been removed. ")],-1))])])),o.commentArray.replies.length?((0,i.openBlock)(),(0,i.createElementBlock)("div",G,[(0,i.createVNode)(X,{comments:o.commentArray.replies,parents:[],"is-nested":!0,post:n.post,incognito:o.checked},null,8,["comments","post","incognito"])])):(0,i.createCommentVNode)("",!0)])}],["__scopeId","data-v-4d350aab"]])},name:"comment-list",data:function(){return{checked:this.incognito,commentsArray:this.comments,userId:!!window.App.signedIn&&window.App.user.id}},computed:{commentsOnly:function(){return this.commentsArray.filter(function(t){return!t.is_review})},reviewsOnly:function(){var t=this;return this.commentsArray.filter(function(e){return e.is_review&&e.author_id!==t.userId})},yourReviewsOnly:function(){var t=this;return this.commentsArray.filter(function(e){return e.is_review&&e.author_id===t.userId})}}},Zt=(0,et.A)(Qt,[["render",function(t,e,n,c,u,d){var h=(0,i.resolveComponent)("comment");return(0,i.openBlock)(),(0,i.createElementBlock)("div",null,[n.isCaseReport?((0,i.openBlock)(),(0,i.createElementBlock)("div",r,[d.yourReviewsOnly.length>0?((0,i.openBlock)(),(0,i.createElementBlock)("h3",o,"Your Review")):(0,i.createCommentVNode)("",!0),((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(d.yourReviewsOnly,function(t){return(0,i.openBlock)(),(0,i.createElementBlock)("div",{key:t.id,class:(0,i.normalizeClass)([n.isNested?"":"bg-white","post-comment"])}
2,[(0,i.createVNode)(h,{comment:t,post:n.post,incognito:u.checked},null,8,["comment","post","incognito"])],2)}),128)),d.reviewsOnly.length>0?((0,i.openBlock)(),(0,i.createElementBlock)("h3",s,"Reviews")):(0,i.createCommentVNode)("",!0),((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(d.reviewsOnly,function(t){return(0,i.openBlock)(),(0,i.createElementBlock)("div",{key:t.id,class:(0,i.normalizeClass)([n.isNested?"":"bg-white","post-comment"])},[(0,i.createVNode)(h,{comment:t,post:n.post,incognito:u.checked},null,8,["comment","post","incognito"])],2)}),128)),d.commentsOnly.length>0?((0,i.openBlock)(),(0,i.createElementBlock)("h3",a,"Comments")):(0,i.createCommentVNode)("",!0),((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(d.commentsOnly,function(t){return(0,i.openBlock)(),(0,i.createElementBlock)("div",{key:t.id,class:(0,i.normalizeClass)([n.isNested?"":"bg-white","post-comment"])},[(0,i.createVNode)(h,{comment:t,post:n.post,incognito:u.checked},null,8,["comment","post","incognito"])],2)}),128))])):((0,i.openBlock)(),(0,i.createElementBlock)("div",{key:1,id:n.isNested?"":"comments"},[((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(u.commentsArray,function(t){return(0,i.openBlock)(),(0,i.createElementBlock)("div",{key:t.id,class:(0,i.normalizeClass)([n.isNested?"":"bg-white","post-comment"])},[(0,i.createVNode)(h,{comment:t,post:n.post,incognito:u.checked},null,8,["comment","post","incognito"])],2)}),128))],8,l))])}]])},6815:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});const i={data:function(){return{hasOpenGraph:!1,openGraphArray:{}}},methods:{displayOpenGraph:function(t){1!=this.hasOpenGraph&&null!=t.url&&(this.hasOpenGraph=!0,this.openGraphArray={og_description:t.description,og_title:t.title,og_site_name:t.siteName,og_url:t.url,og_image:_.isEmpty(t.images)?null:t.images[0].url})},removeOpengraphPreview:function(){this.hasOpenGraph=!1,this.openGraphArray={}}}}},7088:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});var i=n(9133);const r={components:{vueDropzone:n.n(i)()},data:function(){return{dropzoneImageOptions:{url:"".concat(window.location.origin,"/profile/media/upload-media"),acceptedFiles:"image/*",thumbnailWidth:150,maxThumbnailFilesize:150,thumbnailMethod:"crop",maxFilesize:1e9,timeout:3e6,maxFiles:20,dictDefaultMessage:"Drag and Drop your images here to add them to your content library!",headers:{"X-CSRF-TOKEN":$('meta[name="csrf-token"]').attr("content")}},dropzoneVideoOptions:{url:"".concat(window.location.origin,"/profile/media/upload-media"),acceptedFiles:".mp4",thumbnailWidth:150,maxThumbnailFilesize:150,thumbnailMethod:"crop",maxFilesize:1e9,timeout:3e6,maxFiles:20,dictDefaultMessage:"Drag and Drop your videos here to add them to your content library!",headers:{"X-CSRF-TOKEN":$('meta[name="csrf-token"]').attr("content")}},dropzoneOptions:{url:"".concat(window.location.origin,"/profile/media/upload-media"),acceptedFiles:"image/*, .mp4",thumbnailWidth:150,maxThumbnailFilesize:150,thumbnailMethod:"crop",maxFilesize:1e9,timeout:3e6,maxFiles:20,dictDefaultMessage:"Drag and Drop your content here to add it to your content library! You can add images or videos in mp4 format.",headers:{"X-CSRF-TOKEN":$('meta[name="csrf-token"]').attr("content")}}}},methods:{dropzoneTemplate:function(){return'\n <div class="w-1/4 mb-5">\n <div class="dz-preview relative w-full mb-5">\n <div class="dz-image w-full px-625 pb-3125" >\n <div class="bg-cover w-full h-full bg-center bg-no-repeat" data-dz-thumbnail-bg></div>\n </div>\n <div class="flex justify-center my-4">\n <div class="dz-progress h-2 w-1/3">\n <span class="dz-upload block bg-blue-darker h-2" data-dz-uploadprogress></span>\n </div>\n </div>\n <a class="text-12 block mb-5" href="javascript:undefined;" data-dz-remove="">Remove</a>\n <div class="dz-size">
2\n <span data-dz-size="">\n <strong>0.4</strong> MB\n </span>\n </div>\n <div class="dz-error-message text-12 text-red px-5"><span data-dz-errormessage></span></div>\n <div class="dz-success-mark"><i class="fa fa-check"></i></div>\n <div class="dz-error-mark"><i class="fa fa-close"></i></div>\n\n </div>\n </div>\n '},thumbnail:function(t,e){var n,i,r,o;if(t.previewElement){for(t.previewElement.classList.remove("dz-file-preview"),n=0,i=(r=t.previewElement.querySelectorAll("[data-dz-thumbnail-bg]")).length;n<i;n++)(o=r[n]).alt=t.name,o.style.backgroundImage='url("'+e+'")';return setTimeout(function(){return t.previewElement.classList.add("dz-image-preview")},1)}}}}},7689:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>k});var i=n(9347),r=["id"],o={class:"w-full md:w-5/6"},s={class:"flex"},a={class:"font-bold text-16 mb-3125 tracking-headline leading-tight"},l=["href"],c={class:"post-card__content u-text-black text-14 tracking-copy"},u={class:"post-card-links mt-15 flex items-center"},d={class:"flex items-center pr-8 border-r-1 border-blue-lighter"},h=["src"],m=["href"],p={class:"hidden md:block w-1/6"},g=["href"],f=["src","alt"];var v=n(5903),b=n(2690),y=n(5849),A=n(7842),x=n(5768);const w={mixins:[A.A,x.A],props:["slide"],components:{Counter:v.A,CommentList:y.default,CommentForm:b.default},data:function(){return{slideArray:this.slide,domainUrl:"".concat(window.location.origin)}},computed:{canVote:function(){var t=this;return this.authorize(function(e){return t.slideArray.owner_id!=e.id})},diagnoses:function(){return this.slideArray.diagnoses.map(function(t){return t.name}).join()},title:function(){return this.slideArray.name||this.diagnoses||this.slideArray.reference_id}},methods:{viewSlide:function(){window.location.href=this.slide.url}},mounted:function(){}};const k=(0,n(6262).A)(w,[["render",function(t,e,n,v,b,y){var A=(0,i.resolveComponent)("counter");return(0,i.openBlock)(),(0,i.createElementBlock)("article",{id:b.slideArray.id,class:"px-625 py-625"},[(0,i.createElementVNode)("div",o,[(0,i.createElementVNode)("div",s,[(0,i.createVNode)(A,{class:"mb-5 mr-15",canVote:y.canVote,id:b.slideArray.id,count:b.slideArray.votes,"vote-type":b.slideArray.user_voted,url:"".concat(b.slideArray.url,"/vote/")},null,8,["canVote","id","count","vote-type","url"]),(0,i.createElementVNode)("div",null,[(0,i.createElementVNode)("h3",a,[(0,i.createElementVNode)("a",{href:b.slideArray.url,class:"text-black hover:text-blue"},(0,i.toDisplayString)(y.title),9,l)]),(0,i.createElementVNode)("div",c,(0,i.toDisplayString)(t.createExcerpt(b.slideArray.notes,100)),1),(0,i.createElementVNode)("section",u,[(0,i.createElementVNode)("div",d,[(0,i.createElementVNode)("img",{class:"pr-3125 w-5",src:"".concat(b.domainUrl,"/img-dist/icons/icon-comments-card.svg"),alt:""},null,8,h),(0,i.createElementVNode)("a",{href:b.slideArray.url,class:"text-12"},(0,i.toDisplayString)(b.slideArray.comments_count)+" "+(0,i.toDisplayString)(t.pluralize("Comment",b.slideArray.comments_count)),9,m)])])])])]),(0,i.createElementVNode)("div",p,[b.slideArray.slide_thumbnail_url?((0,i.openBlock)(),(0,i.createElementBlock)("a",{key:0,class:"h-24 block border border-blue-lighter rounded hover:border-blue-light",href:b.slideArray.url},[(0,i.createElementVNode)("img",{class:"h-24 w-full p-3125 object-cover",src:b.slideArray.slide_thumbnail_url,alt:y.title},null,8,f)],8,g)):(0,i.createCommentVNode)("",!0)])],8,r)}]])},9133:function(t){t.exports=function(){"use strict";var t,e=(function(t){var e=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var r=function(){function t(){i(this,t)}return e(t,[{key:"on",value:function(t,e){return this._callbacks=this._callbacks||{},this._callbacks[t]||(this._callbacks[t]=[]),this._callbacks[t].push(e),this}},{key:"emit",value:function(t){this._callbacks=this._callbacks||{};var e=this._callbacks[t];if(e){for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];for(var o=0,s=s=e;!(o>=s.length);)s[o++].apply(this,i)}return this}},{key:"off",value:function(t,e){if(!this._callbacks||0===arguments.length)return this._callbacks={},this;var n=this._callbacks[t];if(!n)return this;if(1===arguments.length)return delete this._callbacks[t],this;for(var i=0;i<n.length;i++)if(n[i]===e){n.splice(i,1);break}return this}}]),t}(),o=function(){function t(e,r){i(this,t);var o,s=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),a=void 0;if(s.element=e,s.version=t.version,s.defaultOptions.previewTemplate=s.defaultOptions.previewTemplate.replace(/\n*/g,""),s.clickableElements=[],s.listeners=[],s.files=[],"string"==typeof s.element&&(s.element=document.querySelector(s.element)),!s.element||null==s.element.nodeType)throw new Error("Invalid dropzone element.");if(s.element.dropzone)throw new Error("Dropzone already attached.");t.instances.push(s),s.element.dropzone=s;var l,c=null!=(o=t.optionsForElement(s.element))?o:{};if(s.options=t.extend({},s.defaultOptions,c,null!=r?r:{}),s.options.forceFallback||!t.isBrowserSupported())return l=s.options.fallback.call(s),n(s,l);if(null==s.options.url&&(s.options.url=s.element.getAttribute("action")),!s.options.url)throw new Error("No URL provided.");if(s.options.acceptedFiles&&s.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");
vendor: 33,962 bytes, line 2
2if(s.options.uploadMultiple&&s.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");return s.options.acceptedMimeTypes&&(s.options.acceptedFiles=s.options.acceptedMimeTypes,delete s.options.acceptedMimeTypes),null!=s.options.renameFilename&&(s.options.renameFile=function(t){return s.options.renameFilename.call(s,t.name,t)}),s.options.method=s.options.method.toUpperCase(),(a=s.getExistingFallback())&&a.parentNode&&a.parentNode.removeChild(a),!1!==s.options.previewsContainer&&(s.options.previewsContainer?s.previewsContainer=t.getElement(s.options.previewsContainer,"previewsContainer"):s.previewsContainer=s.element),s.options.clickable&&(!0===s.options.clickable?s.clickableElements=[s.element]:s.clickableElements=t.getElements(s.options.clickable,"clickable")),s.init(),s}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(t,r),e(t,null,[{key:"initClass",value:function(){this.prototype.Emitter=r,this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],this.prototype.defaultOptions={url:null,method:"post",withCredentials:!1,timeout:3e4,parallelUploads:2,uploadMultiple:!1,chunking:!1,forceChunking:!1,chunkSize:2e6,parallelChunkUploads:!1,retryChunks:!1,retryChunksLimit:3,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,headers:null,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictUploadCanceled:"Upload canceled.",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init:function(){},params:function(t,e,n){if(n)return{dzuuid:n.file.upload.uuid,dzchunkindex:n.index,dztotalfilesize:n.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:n.file.upload.totalChunkCount,dzchunkbyteoffset:n.index*this.options.chunkSize}},accept:function(t,e){return e()},chunksUploaded:function(t,e){e()},fallback:function(){var e=void 0;this.element.className=this.element.className+" dz-browser-not-supported";for(var n=0,i=i=this.element.getElementsByTagName("div");!(n>=i.length);){var r=i[n++];if(/(^| )dz-message($| )/.test(r.className)){e=r,r.className="dz-message";break}}e||(e=t.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(e));var o=e.getElementsByTagName("span")[0];return o&&(null!=o.textContent?o.textContent=this.options.dictFallbackMessage:null!=o.innerText&&(o.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(t,e,n,i){var r={srcX:0,srcY:0,srcWidth:t.width,srcHeight:t.height},o=t.width/t.height;null==e&&null==n?(e=r.srcWidth,n=r.srcHeight):null==e?e=n*o:null==n&&(n=e/o);var s=(e=Math.min(e,r.srcWidth))/(n=Math.min(n,r.srcHeight));if(r.srcWidth>e||r.srcHeight>n)if("crop"===i)o>s?(r.srcHeight=t.height,r.srcWidth=r.srcHeight*s):(r.srcWidth=t.width,r.srcHeight=r.srcWidth/s);else{if("contain"!==i)throw new Error("Unknown resizeMethod '"+i+"'");o>s?n=e/o:e=n*o}return r.srcX=(t.width-r.srcWidth)/2,r.srcY=(t.height-r.srcHeight)/2,r.trgWidth=e,r.trgHeight=n,r},transformFile:function(t,e){return(this.options.resizeWidth||this.options.resizeHeight)&&t.type.match(/image.*/)?this.resizeImage(t,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,e):e(t)},previewTemplate:'<div class="dz-preview dz-file-preview">\n <div class="dz-image"><img data-dz-thumbnail /></div>\n <div class="dz-details">\n <div class="dz-size"><span data-dz-size></span></div>\n <div class="dz-filename"><span data-dz-name></span></div>\n </div>\n <div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div>\n <div class="dz-error-message"><span data-dz-errormessage></span></div>\n <div class="dz-success-mark">\n <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">\n <title>Check</title>\n <defs></defs>\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">\n <path d="M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" id="Oval-2" stroke-opacity="0.198794158" stroke="#747474" fill-opacity="0.816519475" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>\n </g>\n </svg>\n </div>\n <div class="dz-error-mark">\n <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">\n <title>Error</title>\n <defs></defs>\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">\n <g id="Check-+-Oval-2" sketch:type="MSLayerGroup" stroke="#747474" stroke-opacity="0.198794158" fill="#FFFFFF" fill-opacity="0.816519475">\n <path d="M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" id="Oval-2" sketch:type="MSShapeGroup"></path>\n </g>\n </g>\n </svg>\n </div>\n</div>',drop:function(t){return this.element.classList.remove("dz-drag-hover")},dragstart:function(t){},dragend:function(t){return this.element.classList.remove("dz-drag-hover")},dragenter:function(t){return this.element.classList.add("dz-drag-hover")},dragover:function(t){return this.element.classList.add("dz-drag-hover")},dragleave:function(t){return this.element.classList.remove("dz-drag-hover")},paste:function(t){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(e){var n=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){e.previewElement=t.createElement(this.options.previewTemplate.trim()),e.previewTemplate=e.previewElement,this.previewsContainer.appendChild(e.previewElement);for(var i=0,r=r=e.previewElement.querySelectorAll("[data-dz-name]");!(i>=r.length);){var o=r[i++];o.textContent=e.name}for(var s=0,a=a=e.previewElement.querySelectorAll("[data-dz-size]");!(s>=a.length);)(o=a[s++]).innerHTML=this.filesize(e.size);this.options.addRemoveLinks&&(e._removeLink=t.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'+this.options.dictRemoveFile+"</a>"),e.previewElement.appendChild(e._removeLink));for(var l=function(i){return i.preventDefault(),i.stopPropagation(),e.status===t.UPLOADING?t.confirm(n.options.dictCancelUploadConfirmation,function(){return n.removeFile(e)}):n.options.dictRemoveFileConfirmation?t.confirm(n.options.dictRemoveFileConfirmation,function(){return n.removeFile(e)}):n.removeFile(e)},c=0,u=u=e.previewElement.querySelectorAll("[data-dz-remove]");!(c>=u.length);)u[c++].addEventListener("click",l)}},removedfile:function(t){return null!=t.previewElement&&null!=t.previewElement.parentNode&&t.previewElement.parentNode.removeChild(t.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(t,e){if(t.previewElement){t.previewElement.classList.remove("dz-file-preview");for(var n=0,i=i=t.previewElement.querySelectorAll("[data-dz-thumbnail]");!(n>=i.length);){var r=i[n++];r.alt=t.name,r.src=e}return setTimeout(function(){return t.previewElement.classList.add("dz-image-preview")},1)}},error:function(t,e){if(t.previewElement){t.previewElement.classList.add("dz-error"),"String"!=typeof e&&e.error&&(e=e.error);for(var n=0,i=i=t.previewElement.querySelectorAll("[data-dz-errormessage]");!(n>=i.length);)i[n++].textContent=e}},errormultiple:function(){},processing:function(t){if(t.previewElement&&(t.previewElement.classList.add("dz-processing"),t._removeLink))return t._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(t,e,n){if(t.previewElement)for(var i=0,r=r=t.previewElement.querySelectorAll("[data-dz-uploadprogress]");!(i>=r.length);){var o=r[i++];"PROGRESS"===o.nodeName?o.value=e:o.style.width=e+"%"}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(t){if(t.previewElement)return t.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(t){return this.emit("error",t,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(t){if(t._removeLink&&(t._removeLink.innerHTML=this.options.dictRemoveFile),t.previewElement)return t.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];for(var r=0,o=o=n;!(r>=o.length);){var s=o[r++];for(var a in s){var l=s[a];t[a]=l}}return t}}]),e(t,[{key:"getAcceptedFiles",value:function(){return this.files.filter(function(t){return t.accepted}).map(function(t){return t})}},{key:"getRejectedFiles",value:function(){return this.files.filter(function(t){return!t.accepted}).map(function(t){return t})}},{key:"getFilesWithStatus",value:function(t){return this.files.filter(function(e){return e.status===t}).map(function(t){return t})}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(t.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(t.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(t.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter(function(e){return e.status===t.UPLOADING||e.status===t.QUEUED}).map(function(t){return t})}},{key:"init",value:function(){var e=this;"form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(t.createElement('<div class="dz-default dz-message"><span>'+this.options.dictDefaultMessage+"</span></div>")),this.clickableElements.length&&function n(){return e.hiddenFileInput&&e.hiddenFileInput.parentNode.removeChild(e.hiddenFileInput),e.hiddenFileInput=document.createElement("input"),e.hiddenFileInput.setAttribute("type","file"),(null===e.options.maxFiles||e.options.maxFiles>1)&&e.hiddenFileInput.setAttribute("multiple","multiple"),e.hiddenFileInput.className="dz-hidden-input",null!==e.options.acceptedFiles&&e.hiddenFileInput.setAttribute("accept",e.options.acceptedFiles),null!==e.options.capture&&e.hiddenFileInput.setAttribute("capture",e.options.capture),e.hiddenFileInput.style.visibility="hidden",e.hiddenFileInput.style.position="absolute",e.hiddenFileInput.style.top="0",e.hiddenFileInput.style.left="0",e.hiddenFileInput.style.height="0",e.hiddenFileInput.style.width="0",t.getElement(e.options.hiddenInputContainer,"hiddenInputContainer").appendChild(e.hiddenFileInput),e.hiddenFileInput.addEventListener("change",function(){var t=e.hiddenFileInput.files;if(t.length)for(var i=0,r=r=t;!(i>=r.length);){var o=r[i++];e.addFile(o)}return e.emit("addedfiles",t),n()})}(),this.URL=null!==window.URL?window.URL:window.webkitURL;for(var n=0,i=i=this.events;!(n>=i.length);){var r=i[n++];this.on(r,this.options[r])}this.on("uploadprogress",function(){return e.updateTotalUploadProgress()}),this.on("removedfile",function(){return e.updateTotalUploadProgress()}),this.on("canceled",function(t){return e.emit("complete",t)}),this.on("complete",function(t){if(0===e.getAddedFiles().length&&0===e.getUploadingFiles().length&&0===e.getQueuedFiles().length)return setTimeout(function(){return e.emit("queuecomplete")},0)});var o=function(t){return t.stopPropagation(),t.preventDefault?t.preventDefault():t.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(t){return e.emit("dragstart",t)},dragenter:function(t){return o(t),e.emit("dragenter",t)},dragover:function(t){var n=void 0;try{n=t.dataTransfer.effectAllowed}catch(t){}return t.dataTransfer.dropEffect="move"===n||"linkMove"===n?"move":"copy",o(t),e.emit("dragover",t)},dragleave:function(t){return e.emit("dragleave",t)},drop:function(t){return o(t),e.drop(t)},dragend:function(t){return e.emit("dragend",t)}}}],this.clickableElements.forEach(function(n){return e.listeners.push({element:n,events:{click:function(i){return(n!==e.element||i.target===e.element||t.elementInside(i.target,e.element.querySelector(".dz-message")))&&e.hiddenFileInput.click(),!0}}})}),this.enable(),this.options.init.call(this)}},{key:"destroy",value:function(){return this.disable(),this.removeAllFiles(!0),(null!=this.hiddenFileInput?this.hiddenFileInput.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,t.instances.splice(t.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var t=void 0,e=0,n=0;if(this.getActiveFiles().length){for(var i=0,r=r=this.getActiveFiles();!(i>=r.length);){var o=r[i++];e+=o.upload.bytesSent,n+=o.upload.total}t=100*e/n}else t=100;return this.emit("totaluploadprogress",t,n,e)}},{key:"_getParamName",value:function(t){return"function"==typeof this.options.paramName?this.options.paramName(t):this.options.paramName+(this.options.uploadMultiple?"["+t+"]":"")}},{key:"_renameFile",value:function(t){return"function"!=typeof this.options.renameFile?t.name:this.options.renameFile(t)}},{key:"getFallbackForm",value:function(){var e,n=void 0;if(e=this.getExistingFallback())return e;var i='<div class="dz-fallback">';this.options.dictFallbackText&&(i+="<p>"+this.options.dictFallbackText+"</p>"),i+='<input type="file" name="'+this._getParamName(0)+'" '+(this.options.uploadMultiple?'multiple="multiple"':void 0)+' /><input type="submit" value="Upload!"></div>';var r=t.createElement(i);return"FORM"!==this.element.tagName?(n=t.createElement('<form action="'+this.options.url+'" enctype="multipart/form-data" method="'+this.options.method+'"></form>')).appendChild(r):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=n?n:r}},{key:"getExistingFallback",value:function(){for(var t=function(t){for(var e=0,n=n=t;!(e>=n.length);){var i=n[e++];if(/(^| )fallback($| )/.test(i.className))return i}},e=["div","form"],n=0;n<e.length;n++){var i,r=e[n];if(i=t(this.element.getElementsByTagName(r)))return i}}},{key:"setupEventListeners",value:function(){return this.listeners.map(function(t){return function(){var e=[];for(var n in t.events){var i=t.events[n];e.push(t.element.addEventListener(n,i,!1))}return e}()})}},{key:"removeEventListeners",value:function(){return this.listeners.map(function(t){return function(){var e=[];for(var n in t.events){var i=t.events[n];e.push(t.element.removeEventListener(n,i,!1))}return e}()})}},{key:"disable",value:function(){var t=this;return this.clickableElements.forEach(function(t){return t.classList.remove("dz-clickable")}),this.removeEventListeners(),this.disabled=!0,this.files.map(function(e){return t.cancelUpload(e)})}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach(function(t){return t.classList.add("dz-clickable")}),this.setupEventListeners()}},{key:"filesize",value:function(t){var e=0,n="b";if(t>0){for(var i=["tb","gb","mb","kb","b"],r=0;r<i.length;r++){var o=i[r];if(t>=Math.pow(this.options.filesizeBase,4-r)/10){e=t/Math.pow(this.options.filesizeBase,4-r),n=o;break}}e=Math.round(10*e)/10}return"<strong>"+e+"</strong> "+this.options.dictFileSizeUnits[n]}},{key:"_updateMaxFilesReachedClass",value:function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(t){if(t.dataTransfer){this.emit("drop",t);for(var e=[],n=0;n<t.dataTransfer.files.length;n++)e[n]=t.dataTransfer.files[n];if(this.emit("addedfiles",e),e.length){var i=t.dataTransfer.items;i&&i.length&&null!=i[0].webkitGetAsEntry?this._addFilesFromItems(i):this.handleFiles(e)}}}},{key:"paste",value:function(t){if(null!=(n=function(t){return t.items},null!=(e=null!=t?t.clipboardData:void 0)?n(e):void 0)){var e,n;this.emit("paste",t);var i=t.clipboardData.items;return i.length?this._addFilesFromItems(i):void 0}}},{key:"handleFiles",value:function(t){for(var e=0,n=n=t;!(e>=n.length);){var i=n[e++];this.addFile(i)}}},{key:"_addFilesFromItems",value:function(t){var e=this;return function(){for(var n=[],i=0,r=r=t;!(i>=r.length);){var o,s=r[i++];null!=s.webkitGetAsEntry&&(o=s.webkitGetAsEntry())?o.isFile?n.push(e.addFile(s.getAsFile())):o.isDirectory?n.push(e._addFilesFromDirectory(o,o.name)):n.push(void 0):null==s.getAsFile||null!=s.kind&&"file"!==s.kind?n.push(void 0):n.push(e.addFile(s.getAsFile()))}return n}()}},{key:"_addFilesFromDirectory",value:function(t,e){var n=this,i=t.createReader(),r=function(t){return n="log",i=function(e){return e.log(t)},null!=(e=console)&&"function"==typeof e[n]?i(e,n):void 0;var e,n,i};return function t(){return i.readEntries(function(i){if(i.length>0){for(var r=0,o=o=i;!(r>=o.length);){var s=o[r++];s.isFile?s.file(function(t){if(!n.options.ignoreHiddenFiles||"."!==t.name.substring(0,1))return t.fullPath=e+"/"+t.name,n.addFile(t)}):s.isDirectory&&n._addFilesFromDirectory(s,e+"/"+s.name)}t()}return null},r)}()}},{key:"accept",value:function(e,n){return this.options.maxFilesize&&e.size>1024*this.options.maxFilesize*1024?n(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(e.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):t.isValidFile(e,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(n(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",e)):this.options.accept.call(this,e,n):n(this.options.dictInvalidFileType)}},{key:"addFile",value:function(e){var n=this;return e.upload={uuid:t.uuidv4(),progress:0,total:e.size,bytesSent:0,filename:this._renameFile(e),chunked:this.options.chunking&&(this.options.forceChunking||e.size>this.options.chunkSize),totalChunkCount:Math.ceil(e.size/this.options.chunkSize)},this.files.push(e),e.status=t.ADDED,this.emit("addedfile",e),this._enqueueThumbnail(e),this.accept(e,function(t){return t?(e.accepted=!1,n._errorProcessing([e],t)):(e.accepted=!0,n.options.autoQueue&&n.enqueueFile(e)),n._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(t){for(var e=0,n=n=t;!(e>=n.length);){var i=n[e++];this.enqueueFile(i)}return null}},{key:"enqueueFile",value:function(e){var n=this;if(e.status!==t.ADDED||!0!==e.accepted)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(e.status=t.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return n.processQueue()},0)}},{key:"_enqueueThumbnail",value:function(t){var e=this;if(this.options.createImageThumbnails&&t.type.match(/image.*/)&&t.size<=1024*this.options.maxThumbnailFilesize*1024)return this._thumbnailQueue.push(t),setTimeout(function(){return e._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var t=this;if(!this._processingThumbnail&&0!==this._thumbnailQueue.length){this._processingThumbnail=!0;var e=this._thumbnailQueue.shift();return this.createThumbnail(e,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(n){return t.emit("thumbnail",e,n),t._processingThumbnail=!1,t._processThumbnailQueue()})}}},{key:"removeFile",value:function(e){if(e.status===t.UPLOADING&&this.cancelUpload(e),this.files=s(this.files,e),this.emit("removedfile",e),0===this.files.length)return this.emit("reset")}},{key:"removeAllFiles",value:function(e){null==e&&(e=!1);for(var n=0,i=i=this.files.slice();!(n>=i.length);){var r=i[n++];(r.status!==t.UPLOADING||e)&&this.removeFile(r)}return null}},{key:"resizeImage",value:function(e,n,i,r,o){var s=this;return this.createThumbnail(e,n,i,r,!0,function(n,i){if(null==i)return o(e);var r=s.options.resizeMimeType;null==r&&(r=e.type);var a=i.toDataURL(r,s.options.resizeQuality);return"image/jpeg"!==r&&"image/jpg"!==r||(a=c.restore(e.dataURL,a)),o(t.dataURItoBlob(a))})}},{key:"createThumbnail",value:function(t,e,n,i,r,o){var s=this,a=new FileReader;return a.onload=function(){if(t.dataURL=a.result,"image/svg+xml"!==t.type)return s.createThumbnailFromUrl(t,e,n,i,r,o);null!=o&&o(a.result)},a.readAsDataURL(t)}},{key:"createThumbnailFromUrl",value:function(t,e,n,i,r,o,s){var a=this,c=document.createElement("img");return s&&(c.crossOrigin=s),c.onload=function(){var s=function(t){return t(1)};return"undefined"!=typeof EXIF&&null!==EXIF&&r&&(s=function(t){return EXIF.getData(c,function(){return t(EXIF.getTag(this,"Orientation"))})}),s(function(r){t.width=c.width,t.height=c.height;var s=a.options.resize.call(a,t,e,n,i),u=document.createElement("canvas"),d=u.getContext("2d");switch(u.width=s.trgWidth,u.height=s.trgHeight,r>4&&(u.width=s.trgHeight,u.height=s.trgWidth),r){case 2:d.translate(u.width,0),d.scale(-1,1);break;case 3:d.translate(u.width,u.height),d.rotate(Math.PI);break;case 4:d.translate(0,u.height),d.scale(1,-1);break;case 5:d.rotate(.5*Math.PI),d.scale(1,-1);break;case 6:d.rotate(.5*Math.PI),d.translate(0,-u.width);break;case 7:d.rotate(.5*Math.PI),d.translate(u.height,-u.width),d.scale(-1,1);break;case 8:d.rotate(-.5*Math.PI),d.translate(-u.height,0)}l(d,c,null!=s.srcX?s.srcX:0,null!=s.srcY?s.srcY:0,s.srcWidth,s.srcHeight,null!=s.trgX?s.trgX:0,null!=s.trgY?s.trgY:0,s.trgWidth,s.trgHeight);var h=u.toDataURL("image/png");if(null!=o)return o(h,u)})},null!=o&&(c.onerror=o),c.src=t.dataURL}},{key:"processQueue",value:function(){var t=this.options.parallelUploads,e=this.getUploadingFiles().length,n=e;if(!(e>=t)){var i=this.getQueuedFiles();if(i.length>0){if(this.options.uploadMultiple)return this.processFiles(i.slice(0,t-e));for(;n<t;){if(!i.length)return;this.processFile(i.shift()),n++}}}}},{key:"processFile",value:function(t){return this.processFiles([t])}},{key:"processFiles",value:function(e){for(var n=0,i=i=e;!(n>=i.length);){var r=i[n++];r.processing=!0,r.status=t.UPLOADING,this.emit("processing",r)}return this.options.uploadMultiple&&this.emit("processingmultiple",e),this.uploadFiles(e)}},{key:"_getFilesWithXhr",value:function(t){return this.files.filter(function(e){return e.xhr===t}).map(function(t){return t})}},{key:"cancelUpload",value:function(e){if(e.status===t.UPLOADING){for(var n=this._getFilesWithXhr(e.xhr),i=0,r=r=n;!(i>=r.length);)r[i++].status=t.CANCELED;void 0!==e.xhr&&e.xhr.abort();for(var o=0,s=s=n;!(o>=s.length);){var a=s[o++];this.emit("canceled",a)}this.options.uploadMultiple&&this.emit("canceledmultiple",n)}else e.status!==t.ADDED&&e.status!==t.QUEUED||(e.status=t.CANCELED,this.emit("canceled",e),this.options.uploadMultiple&&this.emit("canceledmultiple",[e]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(t){if("function"==typeof t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return t.apply(this,n)}return t}},{key:"uploadFile",value:function(t){return this.uploadFiles([t])}},{key:"uploadFiles",value:function(e){var n=this;this._transformFiles(e,function(i){if(e[0].upload.chunked){var r=e[0],o=i[0];r.upload.chunks=[];var s=function(){for(var i=0;void 0!==r.upload.chunks[i];)i++;if(!(i>=r.upload.totalChunkCount)){var s=i*n.options.chunkSize,a=Math.min(s+n.options.chunkSize,r.size),l={name:n._getParamName(0),data:o.webkitSlice?o.webkitSlice(s,a):o.slice(s,a),filename:r.upload.filename,chunkIndex:i};r.upload.chunks[i]={file:r,index:i,dataBlock:l,status:t.UPLOADING,progress:0,retries:0},n._uploadData(e,[l])}};if(r.upload.finishedChunkUpload=function(i){var o=!0;i.status=t.SUCCESS,i.dataBlock=null,i.xhr=null;for(var a=0;a<r.upload.totalChunkCount;a++){if(void 0===r.upload.chunks[a])return s();r.upload.chunks[a].status!==t.SUCCESS&&(o=!1)}o&&n.options.chunksUploaded(r,function(){n._finished(e,"",null)})},n.options.parallelChunkUploads)for(var a=0;a<r.upload.totalChunkCount;a++)s();else s()}else{for(var l=[],c=0;c<e.length;c++)l[c]={name:n._getParamName(c),data:i[c],filename:e[c].upload.filename};n._uploadData(e,l)}})}},{key:"_getChunk",value:function(t,e){for(var n=0;n<t.upload.totalChunkCount;n++)if(void 0!==t.upload.chunks[n]&&t.upload.chunks[n].xhr===e)return t.upload.chunks[n]}},{key:"_uploadData",value:function(e,n){for(var i=this,r=new XMLHttpRequest,o=0,s=s=e;!(o>=s.length);)s[o++].xhr=r;e[0].upload.chunked&&(e[0].upload.chunks[n[0].chunkIndex].xhr=r);var a=this.resolveOption(this.options.method,e),l=this.resolveOption(this.options.url,e);r.open(a,l,!0),r.timeout=this.resolveOption(this.options.timeout,e),r.withCredentials=!!this.options.withCredentials,r.onload=function(t){i._finishedUploading(e,r,t)},r.onerror=function(){i._handleUploadError(e,r)},(null!=r.upload?r.upload:r).onprogress=function(t){return i._updateFilesUploadProgress(e,r,t)};var c={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};for(var u in this.options.headers&&t.extend(c,this.options.headers),c){var d=c[u];d&&r.setRequestHeader(u,d)}var h=new FormData;if(this.options.params){var m=this.options.params;for(var p in"function"==typeof m&&(m=m.call(this,e,r,e[0].upload.chunked?this._getChunk(e[0],r):null)),m){var g=m[p];h.append(p,g)}}for(var f=0,v=v=e;!(f>=v.length);){var b=v[f++];this.emit("sending",b,r,h)}this.options.uploadMultiple&&this.emit("sendingmultiple",e,r,h),this._addFormElementData(h);for(var y=0;y<n.length;y++){var A=n[y];h.append(A.name,A.data,A.filename)}this.submitRequest(r,h,e)}},{key:"_transformFiles",value:function(t,e){for(var n=this,i=[],r=0,o=function(o){n.options.transformFile.call(n,t[o],function(n){i[o]=n,++r===t.length&&e(i)})},s=0;s<t.length;s++)o(s)}},{key:"_addFormElementData",value:function(t){if("FORM"===this.element.tagName)for(var e=0,n=n=this.element.querySelectorAll("input, textarea, select, button");!(e>=n.length);){var i=n[e++],r=i.getAttribute("name"),o=i.getAttribute("type");if(o&&(o=o.toLowerCase()),null!=r)if("SELECT"===i.tagName&&i.hasAttribute("multiple"))for(var s=0,a=a=i.options;!(s>=a.length);){var l=a[s++];l.selected&&t.append(r,l.value)}else(!o||"checkbox"!==o&&"radio"!==o||i.checked)&&t.append(r,i.value)}}},{key:"_updateFilesUploadProgress",value:function(t,e,n){var i=void 0;if(void 0!==n){if(i=100*n.loaded/n.total,t[0].upload.chunked){var r=t[0],o=this._getChunk(r,e);o.progress=i,o.total=n.total,o.bytesSent=n.loaded,r.upload.progress=0,r.upload.total=0,r.upload.bytesSent=0;for(var s=0;s<r.upload.totalChunkCount;s++)void 0!==r.upload.chunks[s]&&void 0!==r.upload.chunks[s].progress&&(r.upload.progress+=r.upload.chunks[s].progress,r.upload.total+=r.upload.chunks[s].total,r.upload.bytesSent+=r.upload.chunks[s].bytesSent);r.upload.progress=r.upload.progress/r.upload.totalChunkCount}else for(var a=0,l=l=t;!(a>=l.length);){var c=l[a++];c.upload.progress=i,c.upload.total=n.total,c.upload.bytesSent=n.loaded}for(var u=0,d=d=t;!(u>=d.length);){var h=d[u++];this.emit("uploadprogress",h,h.upload.progress,h.upload.bytesSent)}}else{var m=!0;i=100;for(var p=0,g=g=t;!(p>=g.length);){var f=g[p++];100===f.upload.progress&&f.upload.bytesSent===f.upload.total||(m=!1),f.upload.progress=i,f.upload.bytesSent=f.upload.total}if(m)return;for(var v=0,b=b=t;!(v>=b.length);){var y=b[v++];this.emit("uploadprogress",y,i,y.upload.bytesSent)}}}},{key:"_finishedUploading",value:function(e,n,i){var r=void 0;if(e[0].status!==t.CANCELED&&4===n.readyState){if("arraybuffer"!==n.responseType&&"blob"!==n.responseType&&(r=n.responseText,n.getResponseHeader("content-type")&&~n.getResponseHeader("content-type").indexOf("application/json")))try{r=JSON.parse(r)}catch(e){i=e,r="Invalid JSON response from server."}this._updateFilesUploadProgress(e),200<=n.status&&n.status<300?e[0].upload.chunked?e[0].upload.finishedChunkUpload(this._getChunk(e[0],n)):this._finished(e,r,i):this._handleUploadError(e,n,r)}}},{key:"_handleUploadError",value:function(e,n,i){if(e[0].status!==t.CANCELED){if(e[0].upload.chunked&&this.options.retryChunks){var r=this._getChunk(e[0],n);if(r.retries++<this.options.retryChunksLimit)return void this._uploadData(e,[r.dataBlock]);console.warn("Retried this chunk too often. Giving up.")}for(var o=0,s=s=e;!(o>=s.length);)s[o++],this._errorProcessing(e,i||this.options.dictResponseError.replace("{{statusCode}}",n.status),n)}}},{key:"submitRequest",value:function(t,e,n){t.send(e)}},{key:"_finished",value:function(e,n,i){for(var r=0,o=o=e;!(r>=o.length);){var s=o[r++];s.status=t.SUCCESS,this.emit("success",s,n,i),this.emit("complete",s)}if(this.options.uploadMultiple&&(this.emit("successmultiple",e,n,i),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(e,n,i){for(var r=0,o=o=e;!(r>=o.length);){var s=o[r++];s.status=t.ERROR,this.emit("error",s,n,i),this.emit("complete",s)}if(this.options.uploadMultiple&&(this.emit("errormultiple",e,n,i),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()}}],[{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})}}]),t}();o.initClass(),o.version="5.5.1",o.options={},o.optionsForElement=function(t){return t.getAttribute("id")?o.options[a(t.getAttribute("id"))]:void 0},o.instances=[],o.forElement=function(t){if("string"==typeof t&&(t=document.querySelector(t)),null==(null!=t?t.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return t.dropzone},o.autoDiscover=!0,o.discover=function(){var t=void 0;if(document.querySelectorAll)t=document.querySelectorAll(".dropzone");else{t=[];var e=function(e){return function(){for(var n=[],i=0,r=r=e;!(i>=r.length);){var o=r[i++];/(^| )dropzone($| )/.test(o.className)?n.push(t.push(o)):n.push(void 0)}return n}()};e(document.getElementsByTagName("div")),e(document.getElementsByTagName("form"))}return function(){for(var e=[],n=0,i=i=t;!(n>=i.length);){var r=i[n++];!1!==o.optionsForElement(r)?e.push(new o(r)):e.push(void 0)}return e}()},o.blacklistedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],o.isBrowserSupported=function(){var t=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(var e=0,n=n=o.blacklistedBrowsers;!(e>=n.length);)n[e++].test(navigator.userAgent)&&(t=!1);else t=!1;else t=!1;return t},o.dataURItoBlob=function(t){for(var e=atob(t.split(",")[1]),n=t.split(",")[0].split(":")[1].split(";
2")[0],i=new ArrayBuffer(e.length),r=new Uint8Array(i),o=0,s=e.length,a=0<=s;a?o<=s:o>=s;a?o++:o--)r[o]=e.charCodeAt(o);return new Blob([i],{type:n})};var s=function(t,e){return t.filter(function(t){return t!==e}).map(function(t){return t})},a=function(t){return t.replace(/[\-_](\w)/g,function(t){return t.charAt(1).toUpperCase()})};o.createElement=function(t){var e=document.createElement("div");return e.innerHTML=t,e.childNodes[0]},o.elementInside=function(t,e){if(t===e)return!0;for(;t=t.parentNode;)if(t===e)return!0;return!1},o.getElement=function(t,e){var n=void 0;if("string"==typeof t?n=document.querySelector(t):null!=t.nodeType&&(n=t),null==n)throw new Error("Invalid `"+e+"` option provided. Please provide a CSS selector or a plain HTML element.");return n},o.getElements=function(t,e){var n=void 0,i=void 0;if(t instanceof Array){i=[];try{for(var r=0,o=o=t;!(r>=o.length);)n=o[r++],i.push(this.getElement(n,e))}catch(t){i=null}}else if("string"==typeof t){i=[];for(var s=0,a=a=document.querySelectorAll(t);!(s>=a.length);)n=a[s++],i.push(n)}else null!=t.nodeType&&(i=[t]);if(null==i||!i.length)throw new Error("Invalid `"+e+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");return i},o.confirm=function(t,e,n){return window.confirm(t)?e():null!=n?n():void 0},o.isValidFile=function(t,e){if(!e)return!0;e=e.split(",");for(var n=t.type,i=n.replace(/\/.*$/,""),r=0,o=o=e;!(r>=o.length);){var s=o[r++];if("."===(s=s.trim()).charAt(0)){if(-1!==t.name.toLowerCase().indexOf(s.toLowerCase(),t.name.length-s.length))return!0}else if(/\/\*$/.test(s)){if(i===s.replace(/\/.*$/,""))return!0}else if(n===s)return!0}return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(t){return this.each(function(){return new o(this,t)})}),null!==t?t.exports=o:window.Dropzone=o,o.ADDED="added",o.QUEUED="queued",o.ACCEPTED=o.QUEUED,o.UPLOADING="uploading",o.PROCESSING=o.UPLOADING,o.CANCELED="canceled",o.ERROR="error",o.SUCCESS="success";var l=function(t,e,n,i,r,o,s,a,l,c){var u=function(t){t.naturalWidth;var e=t.naturalHeight,n=document.createElement("canvas");n.width=1,n.height=e;var i=n.getContext("2d");i.drawImage(t,0,0);for(var r=i.getImageData(1,0,1,e).data,o=0,s=e,a=e;a>o;)0===r[4*(a-1)+3]?s=a:o=a,a=s+o>>1;var l=a/e;return 0===l?1:l}(e);return t.drawImage(e,n,i,r,o,s,a,l,c/u)},c=function(){function t(){i(this,t)}return e(t,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(t){for(var e="",n=void 0,i=void 0,r="",o=void 0,s=void 0,a=void 0,l="",c=0;o=(n=t[c++])>>2,s=(3&n)<<4|(i=t[c++])>>4,a=(15&i)<<2|(r=t[c++])>>6,l=63&r,isNaN(i)?a=l=64:isNaN(r)&&(l=64),e=e+this.KEY_STR.charAt(o)+this.KEY_STR.charAt(s)+this.KEY_STR.charAt(a)+this.KEY_STR.charAt(l),n=i=r="",o=s=a=l="",c<t.length;);return e}},{key:"restore",value:function(t,e){if(!t.match("data:image/jpeg;base64,"))return e;var n=this.decode64(t.replace("data:image/jpeg;base64,","")),i=this.slice2Segments(n),r=this.exifManipulation(e,i);return"data:image/jpeg;base64,"+this.encode64(r)}},{key:"exifManipulation",value:function(t,e){var n=this.getExifArray(e),i=this.insertExif(t,n);return new Uint8Array(i)}},{key:"getExifArray",value:function(t){for(var e=void 0,n=0;n<t.length;){if(255===(e=t[n])[0]&225===e[1])return e;n++}return[]}},{key:"insertExif",value:function(t,e){var n=t.replace("data:image/jpeg;base64,",""),i=this.decode64(n),r=i.indexOf(255,3),o=i.slice(0,r),s=i.slice(r),a=o;return(a=a.concat(e)).concat(s)}},{key:"slice2Segments",value:function(t){for(var e=0,n=[];!(255===t[e]&218===t[e+1]);){if(255===t[e]&216===t[e+1])e+=2;else{var i=e+(256*t[e+2]+t[e+3])+2,r=t.slice(e,i);n.push(r),e=i}if(e>t.length)break}return n}},{key:"decode64",value:function(t){var e=void 0,n=void 0,i="",r=void 0,o=void 0,s="",a=0,l=[];for(/[^A-Za-z0-9\+\/\=]/g.exec(t)&&console.warn("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."),t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");e=this.KEY_STR.indexOf(t.charAt(a++))<<2|(r=this.KEY_STR.indexOf(t.charAt(a++)))>>4,n=(15&r)<<4|(o=this.KEY_STR.indexOf(t.charAt(a++)))>>2,i=(3&o)<<6|(s=this.KEY_STR.indexOf(t.charAt(a++))),l.push(e),64!==o&&l.push(n),64!==s&&l.push(i),e=n=i="",r=o=s="",a<t.length;);return l}}]),t}();c.initClass(),o._autoDiscoverFunction=function(){if(o.autoDiscover)return o.discover()},function(t,e){var n=!1,i=!0,r=t.document,o=r.documentElement,s=r.addEventListener?"addEventListener":"attachEvent",a=r.addEventListener?"removeEventListener":"detachEvent",l=r.addEventListener?"":"on",c=function i(o){if("readystatechange"!==o.type||"complete"===r.readyState)return("load"===o.type?t:r)[a](l+o.type,i,!1),!n&&(n=!0)?e.call(t,o.type||o):void 0};if("complete"!==r.readyState){if(r.createEventObject&&o.doScroll){try{i=!t.frameElement}catch(t){}i&&function t(){try{o.doScroll("left")}catch(e){return void setTimeout(t,50)}return c("poll")}()}r[s](l+"DOMContentLoaded",c,!1),r[s](l+"readystatechange",c,!1),t[s](l+"load",c,!1)}}(window,o._autoDiscoverFunction)}(t={exports:{}},t.exports),t.exports),n={getSignedURL(t,e){let n={filePath:t.name,contentType:t.type};return new Promise((i,r)=>{var o=new FormData;let s=new XMLHttpRequest,a="function"==typeof e.signingURL?e.signingURL(t):e.signingURL;s.open("POST",a),s.onload=function(){200==s.status?i(JSON.parse(s.response)):r(s.statusText)},s.onerror=function(t){console.error("Network Error : Could not send request to AWS (Maybe CORS errors)"),r(t)},!0===e.withCredentials&&(s.withCredentials=!0),Object.entries(e.headers||{}
vendor: 5,996 bytes, line 2
2).forEach(([t,e])=>{s.setRequestHeader(t,e)}),n=Object.assign(n,e.params||{}),Object.entries(n).forEach(([t,e])=>{o.append(t,e)}),s.send(o)})},sendFile(t,e,n){var i=n?this.setResponseHandler:this.sendS3Handler;return this.getSignedURL(t,e).then(e=>i(e,t)).catch(t=>t)},setResponseHandler(t,e){e.s3Signature=t.signature,e.s3Url=t.postEndpoint},sendS3Handler(t,e){let n=new FormData,i=t.signature;return Object.keys(i).forEach(function(t){n.append(t,i[t])}),n.append("file",e),new Promise((e,i)=>{let r=new XMLHttpRequest;r.open("POST",t.postEndpoint),r.onload=function(){if(201==r.status){var t=(new window.DOMParser).parseFromString(r.response,"text/xml").firstChild.children[0].innerHTML;e({success:!0,message:t})}else{var n=(new window.DOMParser).parseFromString(r.response,"text/xml").firstChild.children[0].innerHTML;i({success:!1,message:n+". Request is marked as resolved when returns as status 201"})}},r.onerror=function(t){var e=(new window.DOMParser).parseFromString(r.response,"text/xml").firstChild.children[1].innerHTML;i({success:!1,message:e})},r.send(n)})}};return e.autoDiscover=!1,function(t,e,n,i,r,o,s,a,l,c){"boolean"!=typeof s&&(l=a,a=s,s=!1);var u,d="function"==typeof n?n.options:n;if(t&&t.render&&(d.render=t.render,d.staticRenderFns=t.staticRenderFns,d._compiled=!0,r&&(d.functional=!0)),i&&(d._scopeId=i),o?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,l(t)),t&&t._registeredComponents&&t._registeredComponents.add(o)},d._ssrRegister=u):e&&(u=s?function(){e.call(this,c(this.$root.$options.shadowRoot))}:function(t){e.call(this,a(t))}),u)if(d.functional){var h=d.render;d.render=function(t,e){return u.call(e),h(t,e)}}else{var m=d.beforeCreate;d.beforeCreate=m?[].concat(m,u):[u]}return n}({render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{ref:"dropzoneElement",class:{"vue-dropzone dropzone":this.includeStyling},attrs:{id:this.id}},[this.useCustomSlot?e("div",{staticClass:"dz-message"},[this._t("default",[this._v("Drop files here to upload")])],2):this._e()])},staticRenderFns:[]},void 0,{props:{id:{type:String,required:!0,default:"dropzone"},options:{type:Object,required:!0},includeStyling:{type:Boolean,default:!0,required:!1},awss3:{type:Object,required:!1,default:null},destroyDropzone:{type:Boolean,default:!0,required:!1},duplicateCheck:{type:Boolean,default:!1,required:!1},useCustomSlot:{type:Boolean,default:!1,required:!1}},data:()=>({isS3:!1,isS3OverridesServerPropagation:!1,wasQueueAutoProcess:!0}),computed:{dropzoneSettings(){let t={thumbnailWidth:200,thumbnailHeight:200};return Object.keys(this.options).forEach(function(e){t[e]=this.options[e]},this),null!==this.awss3&&(t.autoProcessQueue=!1,this.isS3=!0,this.isS3OverridesServerPropagation=!1===this.awss3.sendFileToServer,void 0!==this.options.autoProcessQueue&&(this.wasQueueAutoProcess=this.options.autoProcessQueue),this.isS3OverridesServerPropagation&&(t.url=t=>t[0].s3Url)),t}},mounted(){if(this.$isServer&&this.hasBeenMounted)return;this.hasBeenMounted=!0,this.dropzone=new e(this.$refs.dropzoneElement,this.dropzoneSettings);let t=this;this.dropzone.on("thumbnail",function(e,n){t.$emit("vdropzone-thumbnail",e,n)}),this.dropzone.on("addedfile",function(e){var n,i;if(t.duplicateCheck&&this.files.length)for(n=0,i=this.files.length;n<i-1;n++)this.files[n].name===e.name&&this.files[n].size===e.size&&this.files[n].lastModifiedDate.toString()===e.lastModifiedDate.toString()&&(this.removeFile(e),t.$emit("vdropzone-duplicate-file",e));t.$emit("vdropzone-file-added",e),t.isS3&&t.wasQueueAutoProcess&&!e.manuallyAdded&&t.getSignedAndUploadToS3(e)}),this.dropzone.on("addedfiles",function(e){t.$emit("vdropzone-files-added",e)}),this.dropzone.on("removedfile",function(e){t.$emit("vdropzone-removed-file",e),e.manuallyAdded&&null!==t.dropzone.options.maxFiles&&t.dropzone.options.maxFiles++}),this.dropzone.on("success",function(e,n){if(t.$emit("vdropzone-success",e,n),t.isS3){if(t.isS3OverridesServerPropagation){var i=(new window.DOMParser).parseFromString(n,"text/xml").firstChild.children[0].innerHTML;t.$emit("vdropzone-s3-upload-success",i)}t.wasQueueAutoProcess&&t.setOption("autoProcessQueue",!1)}}),this.dropzone.on("successmultiple",function(e,n){t.$emit("vdropzone-success-multiple",e,n)}),this.dropzone.on("error",function(e,n,i){t.$emit("vdropzone-error",e,n,i),this.isS3&&t.$emit("vdropzone-s3-upload-error")}),this.dropzone.on("errormultiple",function(e,n,i){t.$emit("vdropzone-error-multiple",e,n,i)}),this.dropzone.on("sending",function(e,n,i){if(t.isS3)if(t.isS3OverridesServerPropagation){let t=e.s3Signature;Object.keys(t).forEach(function(e){i.append(e,t[e])})}else i.append("s3ObjectLocation",e.s3ObjectLocation);t.$emit("vdropzone-sending",e,n,i)}),this.dropzone.on("sendingmultiple",function(e,n,i){t.$emit("vdropzone-sending-multiple",e,n,i)}),this.dropzone.on("complete",function(e){t.$emit("vdropzone-complete",e)}),this.dropzone.on("completemultiple",function(e){t.$emit("vdropzone-complete-multiple",e)}),this.dropzone.on("canceled",function(e){t.$emit("vdropzone-canceled",e)}),this.dropzone.on("canceledmultiple",function(e){t.$emit("vdropzone-canceled-multiple",e)}),this.dropzone.on("maxfilesreached",function(e){t.$emit("vdropzone-max-files-reached",e)}),this.dropzone.on("maxfilesexceeded",function(e){t.$emit("vdropzone-max-files-exceeded",e)}),this.dropzone.on("processing",function(e){t.$emit("vdropzone-processing",e)}),this.dropzone.on("processingmultiple",function(e){t.$emit("vdropzone-processing-multiple",e)}),this.dropzone.on("uploadprogress",function(e,n,i){t.$emit("vdropzone-upload-progress",e,n,i)}),this.dropzone.on("totaluploadprogress",function(e,n,i){t.$emit("vdropzone-total-upload-progress",e,n,i)}),this.dropzone.on("reset",function(){t.$emit("vdropzone-reset")}),this.dropzone.on("queuecomplete",function(){t.$emit("vdropzone-queue-complete")}
2),this.dropzone.on("drop",function(e){t.$emit("vdropzone-drop",e)}),this.dropzone.on("dragstart",function(e){t.$emit("vdropzone-drag-start",e)}),this.dropzone.on("dragend",function(e){t.$emit("vdropzone-drag-end",e)}),this.dropzone.on("dragenter",function(e){t.$emit("vdropzone-drag-enter",e)}),this.dropzone.on("dragover",function(e){t.$emit("vdropzone-drag-over",e)}),this.dropzone.on("dragleave",function(e){t.$emit("vdropzone-drag-leave",e)}),t.$emit("vdropzone-mounted")},beforeDestroy(){this.destroyDropzone&&this.dropzone.destroy()},methods:{manuallyAddFile:function(t,e){t.manuallyAdded=!0,this.dropzone.emit("addedfile",t);let n=!1;if((e.indexOf(".svg")>-1||e.indexOf(".png")>-1||e.indexOf(".jpg")>-1||e.indexOf(".jpeg")>-1||e.indexOf(".gif")>-1||e.indexOf(".webp")>-1)&&(n=!0),this.dropzone.options.createImageThumbnails&&n&&t.size<=1024*this.dropzone.options.maxThumbnailFilesize*1024){e&&this.dropzone.emit("thumbnail",t,e);for(var i=t.previewElement.querySelectorAll("[data-dz-thumbnail]"),r=0;r<i.length;r++)i[r].style.width=this.dropzoneSettings.thumbnailWidth+"px",i[r].style.height=this.dropzoneSettings.thumbnailHeight+"px",i[r].style["object-fit"]="contain"}this.dropzone.emit("complete",t),this.dropzone.options.maxFiles&&this.dropzone.options.maxFiles--,this.dropzone.files.push(t),this.$emit("vdropzone-file-added-manually",t)},setOption:function(t,e){this.dropzone.options[t]=e},removeAllFiles:function(t){this.dropzone.removeAllFiles(t)},processQueue:function(){let t=this.dropzone;this.isS3&&!this.wasQueueAutoProcess?this.getQueuedFiles().forEach(t=>{this.getSignedAndUploadToS3(t)}):this.dropzone.processQueue(),this.dropzone.on("success",function(){t.options.autoProcessQueue=!0}),this.dropzone.on("queuecomplete",function(){t.options.autoProcessQueue=!1})},init:function(){return this.dropzone.init()},destroy:function(){return this.dropzone.destroy()},updateTotalUploadProgress:function(){return this.dropzone.updateTotalUploadProgress()},getFallbackForm:function(){return this.dropzone.getFallbackForm()},getExistingFallback:function(){return this.dropzone.getExistingFallback()},setupEventListeners:function(){return this.dropzone.setupEventListeners()},removeEventListeners:function(){return this.dropzone.removeEventListeners()},disable:function(){return this.dropzone.disable()},enable:function(){return this.dropzone.enable()},filesize:function(t){return this.dropzone.filesize(t)},accept:function(t,e){return this.dropzone.accept(t,e)},addFile:function(t){return this.dropzone.addFile(t)},removeFile:function(t){this.dropzone.removeFile(t)},getAcceptedFiles:function(){return this.dropzone.getAcceptedFiles()},getRejectedFiles:function(){return this.dropzone.getRejectedFiles()},getFilesWithStatus:function(){return this.dropzone.getFilesWithStatus()},getQueuedFiles:function(){return this.dropzone.getQueuedFiles()},getUploadingFiles:function(){return this.dropzone.getUploadingFiles()},getAddedFiles:function(){return this.dropzone.getAddedFiles()},getActiveFiles:function(){return this.dropzone.getActiveFiles()},getSignedAndUploadToS3(t){var e=n.sendFile(t,this.awss3,this.isS3OverridesServerPropagation);this.isS3OverridesServerPropagation?e.then(()=>{setTimeout(()=>this.dropzone.processFile(t))}):e.then(e=>{e.success?(t.s3ObjectLocation=e.message,setTimeout(()=>this.dropzone.processFile(t)),this.$emit("vdropzone-s3-upload-success",e.message)):void 0!==e.message?this.$emit("vdropzone-s3-upload-error",e.message):this.$emit("vdropzone-s3-upload-error","Network Error : Could not send request to AWS. (Maybe CORS error)")}),e.catch(t=>{alert(t)})},setAWSSigningURL(t){this.isS3&&(this.awss3.signingURL=t)}}},void 0,!1,void 0,void 0,void 0)}()},9198:(t,e,n)=>{"use strict";n.d(e,{A:()=>Ls});var i=n(9347);function r(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}var s={style:{position:"relative"}}
vendor: 7,181 bytes, line 2
2,a=["id","name","value"],l=["input","toolbar","placeholder","aria-label"],c={class:"fixed w-80 max-h-300 bg-white border border-blue-light overflow-x-hidden overflow-scroll z-50",ref:"userList"},u={role:"list",class:"divide-y divide-gray-200",id:"user-search"},d=["onClick"],h=["src"],m={class:"ml-2"},p={class:"text-15 text-black m-0"},g={class:"text-sm text-gray m-0"},f={class:"text-sm text-gray m-0"},v={key:0,class:"flex items-center py-1 m-0 mx-3 my-3"},b={class:""},y={class:"field mb-2"},A={class:"field mb-2"},x={class:"field mb-2"},w=["disabled"],k={key:0,class:"p-625"};const C="[data-trix-attachment]",E={preview:{presentation:"gallery",caption:{name:!0,size:!0}},file:{caption:{size:!0}}},S={default:{tagName:"div",parse:!1},quote:{tagName:"blockquote",nestable:!0},heading1:{tagName:"h1",terminal:!0,breakOnReturn:!0,group:!1},code:{tagName:"pre",terminal:!0,htmlAttributes:["language"],text:{plaintext:!0}},bulletList:{tagName:"ul",parse:!1},bullet:{tagName:"li",listAttribute:"bulletList",group:!1,nestable:!0,test(t){return F(t.parentNode)===S[this.listAttribute].tagName}},numberList:{tagName:"ol",parse:!1},number:{tagName:"li",listAttribute:"numberList",group:!1,nestable:!0,test(t){return F(t.parentNode)===S[this.listAttribute].tagName}},attachmentGallery:{tagName:"div",exclusive:!0,terminal:!0,parse:!1,group:!1}},F=t=>{var e;return null==t||null===(e=t.tagName)||void 0===e?void 0:e.toLowerCase()},D=navigator.userAgent.match(/android\s([0-9]+.*Chrome)/i),T=D&&parseInt(D[1]);var B={composesExistingText:/Android.*Chrome/.test(navigator.userAgent),recentAndroid:T&&T>12,samsungAndroid:T&&navigator.userAgent.match(/Android.*SM-/),forcesObjectResizing:/Trident.*rv:11/.test(navigator.userAgent),supportsInputEvents:"undefined"!=typeof InputEvent&&["data","getTargetRanges","inputType"].every(t=>t in InputEvent.prototype)},R={ADD_ATTR:["language"],SAFE_FOR_XML:!1,RETURN_DOM:!0},N={attachFiles:"Attach Files",bold:"Bold",bullets:"Bullets",byte:"Byte",bytes:"Bytes",captionPlaceholder:"Add a captionâ¦",code:"Code",heading1:"Heading",indent:"Increase Level",italic:"Italic",link:"Link",numbers:"Numbers",outdent:"Decrease Level",quote:"Quote",redo:"Redo",remove:"Remove",strike:"Strikethrough",undo:"Undo",unlink:"Unlink",url:"URL",urlPlaceholder:"Enter a URLâ¦",GB:"GB",KB:"KB",MB:"MB",PB:"PB",TB:"TB"};const L=[N.bytes,N.KB,N.MB,N.GB,N.TB,N.PB];var O={prefix:"IEC",precision:2,formatter(t){switch(t){case 0:return"0 ".concat(N.bytes);case 1:return"1 ".concat(N.byte);default:let e;"SI"===this.prefix?e=1e3:"IEC"===this.prefix&&(e=1024);const n=Math.floor(Math.log(t)/Math.log(e)),i=(t/Math.pow(e,n)).toFixed(this.precision).replace(/0*$/,"").replace(/\.$/,"");return"".concat(i," ").concat(L[n])}}};const M="\ufeff",P=" ",I=function(t){for(const e in t){const n=t[e];this[e]=n}return this},_=document.documentElement,z=_.matches,V=function(t){let{onElement:e,matchingSelector:n,withCallback:i,inPhase:r,preventDefault:o,times:s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const a=e||_,l=n,c="capturing"===r,u=function(t){null!=s&&0==--s&&u.destroy();const e=W(t.target,{matchingSelector:l});null!=e&&(null==i||i.call(e,t,e),o&&t.preventDefault())};return u.destroy=()=>a.removeEventListener(t,u,c),a.addEventListener(t,u,c),u},j=function(t){let{bubbles:e,cancelable:n,attributes:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=!1!==e,n=!1!==n;const r=document.createEvent("Events");return r.initEvent(t,e,n),null!=i&&I.call(r,i),r},U=function(t){let{onElement:e,bubbles:n,cancelable:i,attributes:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=null!=e?e:_,s=j(t,{bubbles:n,cancelable:i,attributes:r});return o.dispatchEvent(s)},q=function(t,e){if(1===(null==t?void 0:t.nodeType))return z.call(t,e)},W=function(t){let{matchingSelector:e,untilNode:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.parentNode;if(null!=t){if(null==e)return t;if(t.closest&&null==n)return t.closest(e);for(;t&&t!==n;){if(q(t,e))return t;t=t.parentNode}}},H=t=>document.activeElement!==t&&$(t,document.activeElement),$=function(t,e){if(t&&e)for(;e;){if(e===t)return!0;e=e.parentNode}},G=function(t){var e;if(null===(e=t)||void 0===e||!e.parentNode)return;let n=0;for(t=t.previousSibling;t;)n++,t=t.previousSibling;return n},K=t=>{var e;return null==t||null===(e=t.parentNode)||void 0===e?void 0:e.removeChild(t)},Y=function(t){let{onlyNodesOfType:e,usingFilter:n,expandEntityReferences:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=(()=>{switch(e){case"element":return NodeFilter.SHOW_ELEMENT;case"text":return NodeFilter.SHOW_TEXT;case"comment":return NodeFilter.SHOW_COMMENT;default:return NodeFilter.SHOW_ALL}})();return document.createTreeWalker(t,r,null!=n?n:null,!0===i)},J=t=>{var e;return null==t||null===(e=t.tagName)||void 0===e?void 0:e.toLowerCase()},X=function(t){let e,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"==typeof t?(i=t,t=i.tagName):i={attributes:i};const r=document.createElement(t);if(null!=i.editable&&(null==i.attributes&&(i.attributes={}),i.attributes.contenteditable=i.editable),i.attributes)for(e in i.attributes)n=i.attributes[e],r.setAttribute(e,n);if(i.style)for(e in i.style)n=i.style[e],r.style[e]=n;if(i.data)for(e in i.data)n=i.data[e],r.dataset[e]=n;return i.className&&i.className.split(" ").forEach(t=>{r.classList.add(t)}),i.textContent&&(r.textContent=i.textContent),i.childNodes&&[].concat(i.childNodes).forEach(t=>{r.appendChild(t)}),r};let Q;const Z=function(){if(null!=Q)return Q;Q=[];for(const t in S){const e=S[t];e.tagName&&Q.push(e.tagName)}return Q},tt=t=>nt(null==t?void 0:t.firstChild),et=function(t){let{strict:e}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{strict:!0};return e?nt(t):nt(t)||!nt(t.firstChild)&&function(t){return Z().includes(J(t))&&!Z().includes(J(t.firstChild))}(t)},nt=t=>it(t)&&"block"===(null==t?void 0:t.data),it=t=>(null==t?void 0:t.nodeType)===Node.COMMENT_NODE,rt=function(t){let{name:e}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t)return at(t)?t.data===M?!e||t.parentNode.dataset.trixCursorTarget===e:void 0:rt(t.firstChild)},ot=t=>q(t,C),st=t=>at(t)&&""===(null==t?void 0:t.data),at=t=>(null==t?void 0:t.nodeType)===Node.TEXT_NODE,lt={level2Enabled:!0,getLevel(){return this.level2Enabled&&B.supportsInputEvents?2:0},pickFiles(t){const e=X("input",{type:"file",multiple:!0,hidden:!0,id:this.fileInputId});e.addEventListener("change",()=>{t(e.files),K(e)}),K(document.getElementById(this.fileInputId)),document.body.appendChild(e),e.click()}};var ct={removeBlankTableCells:!1,tableCellSeparator:" | ",tableRowSeparator:"\n"},ut={bold:{tagName:"strong",inheritable:!0,parser(t){const e=window.getComputedStyle(t);return"bold"===e.fontWeight||e.fontWeight>=600}},italic:{tagName:"em",inheritable:!0,parser:t=>"italic"===window.getComputedStyle(t).fontStyle},href:{groupTagName:"a",parser(t){const e="a:not(".concat(C,")"),n=t.closest(e);if(n)return n.getAttribute("href")}},strike:{tagName:"del",inheritable:!0},frozen:{style:{backgroundColor:"highlight"}}},dt={getDefaultHTML:()=>'<div class="trix-button-row">
2\n <span class="trix-button-group trix-button-group--text-tools" data-trix-button-group="text-tools">\n <button type="button" class="trix-button trix-button--icon trix-button--icon-bold" data-trix-attribute="bold" data-trix-key="b" title="'.concat(N.bold,'" tabindex="-1">').concat(N.bold,'</button>\n <button type="button" class="trix-button trix-button--icon trix-button--icon-italic" data-trix-attribute="italic" data-trix-key="i" title="').concat(N.italic,'" tabindex="-1">').concat(N.italic,'</button>\n <button type="button" class="trix-button trix-button--icon trix-button--icon-strike" data-trix-attribute="strike" title="').concat(N.strike,'" tabindex="-1">').concat(N.strike,'</button>\n <button type="button" class="trix-button trix-button--icon trix-button--icon-link" data-trix-attribute="href" data-trix-action="link" data-trix-key="k" title="').concat(N.link,'" tabindex="-1">').concat(N.link,'</button>\n </span>\n\n <span class="trix-button-group trix-button-group--block-tools" data-trix-button-group="block-tools">\n <button type="button" class="trix-button trix-button--icon trix-button--icon-heading-1" data-trix-attribute="heading1" title="').concat(N.heading1,'" tabindex="-1">').concat(N.heading1,'</button>\n <button type="button" class="trix-button trix-button--icon trix-button--icon-quote" data-trix-attribute="quote" title="').concat(N.quote,'" tabindex="-1">').concat(N.quote,'</button>\n <button type="button" class="trix-button trix-button--icon trix-button--icon-code" data-trix-attribute="code" title="').concat(N.code,'" tabindex="-1">').concat(N.code,'</button>\n <button type="button" class="trix-button trix-button--icon trix-button--icon-bullet-list" data-trix-attribute="bullet" title="').concat(N.bullets,'" tabindex="-1">').concat(N.bullets,'</button>\n <button type="button" class="trix-button trix-button--icon trix-button--icon-number-list" data-trix-attribute="number" title="').concat(N.numbers,'" tabindex="-1">').concat(N.numbers,'</button>\n <button type="button" class="trix-button trix-button--icon trix-button--icon-decrease-nesting-level" data-trix-action="decreaseNestingLevel" title="').concat(N.outdent,'" tabindex="-1">').concat(N.outdent,'</button>\n <button type="button" class="trix-button trix-button--icon trix-button--icon-increase-nesting-level" data-trix-action="increaseNestingLevel" title="').concat(N.indent,'" tabindex="-1">').concat(N.indent,'</button>\n </span>\n\n <span class="trix-button-group trix-button-group--file-tools" data-trix-button-group="file-tools">\n <button type="button" class="trix-button trix-button--icon trix-button--icon-attach" data-trix-action="attachFiles" title="').concat(N.attachFiles,'" tabindex="-1">').concat(N.attachFiles,'</button>\n </span>\n\n <span class="trix-button-group-spacer"></span>\n\n <span class="trix-button-group trix-button-group--history-tools" data-trix-button-group="history-tools">\n <button type="button" class="trix-button trix-button--icon trix-button--icon-undo" data-trix-action="undo" data-trix-key="z" title="').concat(N.undo,'" tabindex="-1">').concat(N.undo,'</button>\n <button type="button" class="trix-button trix-button--icon trix-button--icon-redo" data-trix-action="redo" data-trix-key="shift+z" title="').concat(N.redo,'" tabindex="-1">').concat(N.redo,'</button>\n </span>\n </div>\n\n <div class="trix-dialogs" data-trix-dialogs>\n <div class="trix-dialog trix-dialog--link" data-trix-dialog="href" data-trix-dialog-attribute="href">\n <div class="trix-dialog__link-fields">\n <input type="url" name="href" class="trix-input trix-input--dialog" placeholder="').concat(N.urlPlaceholder,'" aria-label="').concat(N.url,'" data-trix-validate-href required data-trix-input>\n <div class="trix-button-group">\n <input type="button" class="trix-button trix-button--dialog" value="').concat(N.link,'" data-trix-method="setAttribute">\n <input type="button" class="trix-button trix-button--dialog" value="').concat(N.unlink,'" data-trix-method="removeAttribute">\n </div>\n </div>\n </div>\n </div>')};const ht={interval:5e3};var mt=Object.freeze({__proto__:null,attachments:E,blockAttributes:S,browser:B,css:{attachment:"attachment",attachmentCaption:"attachment__caption",attachmentCaptionEditor:"attachment__caption-editor",attachmentMetadata:"attachment__metadata",attachmentMetadataContainer:"attachment__metadata-container",attachmentName:"attachment__name",attachmentProgress:"attachment__progress",attachmentSize:"attachment__size",attachmentToolbar:"attachment__toolbar",attachmentGallery:"attachment-gallery"},dompurify:R,fileSize:O,input:lt,keyNames:{8:"backspace",9:"tab",13:"return",27:"escape",37:"left",39:"right",46:"delete",68:"d",72:"h",79:"o"},lang:N,parser:ct,textAttributes:ut,toolbar:dt,undo:ht});class pt{static proxyMethod(t){const{name:e,toMethod:n,toProperty:i,optional:r}=gt(t);this.prototype[e]=function(){let t,o;var s,a;return n?o=r?null===(s=this[n])||void 0===s?void 0:s.call(this):this[n]():i&&(o=this[i]),r?(t=null===(a=o)||void 0===a?void 0:a[e],t?ft.call(t,o,arguments):void 0):(t=o[e],ft.call(t,o,arguments))}}}const gt=function(t){const e=t.match(vt);if(!e)throw new Error("can't parse @proxyMethod expression: ".concat(t));const n={name:e[4]};return null!=e[2]?n.toMethod=e[1]:n.toProperty=e[1],null!=e[3]&&(n.optional=!0),n},{apply:ft}=Function.prototype,vt=new RegExp("^(.+?)(\\(\\))?(\\?)?\\.(.+?)$");var bt,yt,At;class xt extends pt{static box(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t instanceof this?t:this.fromUCS2String(null==t?void 0:t.toString())}static fromUCS2String(t){return new this(t,Et(t))}static fromCodepoints(t){return new this(St(t),t)}
vendor: 10,896 bytes, line 2
2constructor(t,e){super(...arguments),this.ucs2String=t,this.codepoints=e,this.length=this.codepoints.length,this.ucs2Length=this.ucs2String.length}offsetToUCS2Offset(t){return St(this.codepoints.slice(0,Math.max(0,t))).length}offsetFromUCS2Offset(t){return Et(this.ucs2String.slice(0,Math.max(0,t))).length}slice(){return this.constructor.fromCodepoints(this.codepoints.slice(...arguments))}charAt(t){return this.slice(t,t+1)}isEqualTo(t){return this.constructor.box(t).ucs2String===this.ucs2String}toJSON(){return this.ucs2String}getCacheKey(){return this.ucs2String}toString(){return this.ucs2String}}const wt=1===(null===(bt=Array.from)||void 0===bt?void 0:bt.call(Array,"ð¼").length),kt=null!=(null===(yt=" ".codePointAt)||void 0===yt?void 0:yt.call(" ",0)),Ct=" ð¼"===(null===(At=String.fromCodePoint)||void 0===At?void 0:At.call(String,32,128124));let Et,St;Et=wt&&kt?t=>Array.from(t).map(t=>t.codePointAt(0)):function(t){const e=[];let n=0;const{length:i}=t;for(;n<i;){let r=t.charCodeAt(n++);if(55296<=r&&r<=56319&&n<i){const e=t.charCodeAt(n++);56320==(64512&e)?r=((1023&r)<<10)+(1023&e)+65536:n--}e.push(r)}return e},St=Ct?t=>String.fromCodePoint(...Array.from(t||[])):function(t){return(()=>{const e=[];return Array.from(t).forEach(t=>{let n="";t>65535&&(t-=65536,n+=String.fromCharCode(t>>>10&1023|55296),t=56320|1023&t),e.push(n+String.fromCharCode(t))}),e})().join("")};let Ft=0;class Dt extends pt{static fromJSONString(t){return this.fromJSON(JSON.parse(t))}constructor(){super(...arguments),this.id=++Ft}hasSameConstructorAs(t){return this.constructor===(null==t?void 0:t.constructor)}isEqualTo(t){return this===t}inspect(){const t=[],e=this.contentsForInspection()||{};for(const n in e){const i=e[n];t.push("".concat(n,"=").concat(i))}return"#<".concat(this.constructor.name,":").concat(this.id).concat(t.length?" ".concat(t.join(", ")):"",">")}contentsForInspection(){}toJSONString(){return JSON.stringify(this)}toUTF16String(){return xt.box(this)}getCacheKey(){return this.id.toString()}}const Tt=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0},Bt=function(t){const e=t.slice(0);for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return e.splice(...i),e},Rt=/[\u05BE\u05C0\u05C3\u05D0-\u05EA\u05F0-\u05F4\u061B\u061F\u0621-\u063A\u0640-\u064A\u066D\u0671-\u06B7\u06BA-\u06BE\u06C0-\u06CE\u06D0-\u06D5\u06E5\u06E6\u200F\u202B\u202E\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE72\uFE74\uFE76-\uFEFC]/,Nt=function(){const t=X("input",{dir:"auto",name:"x",dirName:"x.dir"}),e=X("textarea",{dir:"auto",name:"y",dirName:"y.dir"}),n=X("form");n.appendChild(t),n.appendChild(e);const i=function(){try{return new FormData(n).has(e.dirName)}catch(t){return!1}}(),r=function(){try{return t.matches(":dir(ltr),:dir(rtl)")}catch(t){return!1}}();return i?function(t){return e.value=t,new FormData(n).get(e.dirName)}:r?function(e){return t.value=e,t.matches(":dir(rtl)")?"rtl":"ltr"}:function(t){const e=t.trim().charAt(0);return Rt.test(e)?"rtl":"ltr"}}();let Lt=null,Ot=null,Mt=null,Pt=null;const It=()=>(Lt||(Lt=jt().concat(zt())),Lt),_t=t=>S[t],zt=()=>(Ot||(Ot=Object.keys(S)),Ot),Vt=t=>ut[t],jt=()=>(Mt||(Mt=Object.keys(ut)),Mt),Ut=function(t,e){qt(t).textContent=e.replace(/%t/g,t)},qt=function(t){const e=document.createElement("style");e.setAttribute("type","text/css"),e.setAttribute("data-tag-name",t.toLowerCase());const n=Wt();return n&&e.setAttribute("nonce",n),document.head.insertBefore(e,document.head.firstChild),e},Wt=function(){const t=Ht("trix-csp-nonce")||Ht("csp-nonce");if(t){const{nonce:e,content:n}=t;return""==e?n:e}},Ht=t=>document.head.querySelector("meta[name=".concat(t,"]")),$t={"application/x-trix-feature-detection":"test"},Gt=function(t){const e=t.getData("text/plain"),n=t.getData("text/html");if(!e||!n)return null==e?void 0:e.length;{const{body:t}=(new DOMParser).parseFromString(n,"text/html");if(t.textContent===e)return!t.querySelector("*")}},Kt=/Mac|^iP/.test(navigator.platform)?t=>t.metaKey:t=>t.ctrlKey,Yt=t=>setTimeout(t,1),Jt=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e={};for(const n in t){const i=t[n];e[n]=i}return e},Xt=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0},Qt=function(t){if(null!=t)return Array.isArray(t)||(t=[t,t]),[ee(t[0]),ee(null!=t[1]?t[1]:t[0])]},Zt=function(t){if(null==t)return;const[e,n]=Qt(t);return ne(e,n)},te=function(t,e){if(null==t||null==e)return;const[n,i]=Qt(t),[r,o]=Qt(e);return ne(n,r)&&ne(i,o)},ee=function(t){return"number"==typeof t?t:Jt(t)},ne=function(t,e){return"number"==typeof t?t===e:Xt(t,e)};class ie extends pt{constructor(){super(...arguments),this.update=this.update.bind(this),this.selectionManagers=[]}start(){this.started||(this.started=!0,document.addEventListener("selectionchange",this.update,!0))}stop(){if(this.started)return this.started=!1,document.removeEventListener("selectionchange",this.update,!0)}registerSelectionManager(t){if(!this.selectionManagers.includes(t))return this.selectionManagers.push(t),this.start()}unregisterSelectionManager(t){if(this.selectionManagers=this.selectionManagers.filter(e=>e!==t),0===this.selectionManagers.length)return this.stop()}notifySelectionManagersOfSelectionChange(){return this.selectionManagers.map(t=>t.selectionDidChange())}update(){this.notifySelectionManagersOfSelectionChange()}reset(){this.update()}}const re=new ie,oe=function(){const t=window.getSelection();if(t.rangeCount>0)return t},se=function(){var t;const e=null===(t=oe())||void 0===t?void 0:t.getRangeAt(0);if(e&&!le(e))return e},ae=function(t){const e=window.getSelection();return e.removeAllRanges(),e.addRange(t),re.update()},le=t=>ce(t.startContainer)||ce(t.endContainer),ce=t=>!Object.getPrototypeOf(t),ue=t=>t.replace(new RegExp("".concat(M),"g"),"").replace(new RegExp("".concat(P),"g")," "),de=new RegExp("[^\\S".concat(P,"]")),he=t=>t.replace(new RegExp("".concat(de.source),"g")," ").replace(/\ {2,}/g," "),me=function(t,e){if(t.isEqualTo(e))return["",""];const n=pe(t,e),{length:i}=n.utf16String;let r;if(i){const{offset:o}=n,s=t.codepoints.slice(0,o).concat(t.codepoints.slice(o+i));r=pe(e,xt.fromCodepoints(s))}else r=pe(e,t);return[n.utf16String.toString(),r.utf16String.toString()]},pe=function(t,e){let n=0,i=t.length,r=e.length;for(;n<i&&t.charAt(n).isEqualTo(e.charAt(n));)n++;for(;i>n+1&&t.charAt(i-1).isEqualTo(e.charAt(r-1));)i--,r--;return{utf16String:t.slice(n,i),offset:n}};class ge extends Dt{static fromCommonAttributesOfObjects(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!t.length)return new this;let e=ye(t[0]),n=e.getKeys();return t.slice(1).forEach(t=>{n=e.getKeysCommonToHash(ye(t)),e=e.slice(n)}),e}static box(t){return ye(t)}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(...arguments),this.values=be(t)}add(t,e){return this.merge(fe(t,e))}remove(t){return new ge(be(this.values,t))}get(t){return this.values[t]}has(t){return t in this.values}merge(t){return new ge(ve(this.values,Ae(t)))}slice(t){const e={};return Array.from(t).forEach(t=>{this.has(t)&&(e[t]=this.values[t])}),new ge(e)}getKeys(){return Object.keys(this.values)}getKeysCommonToHash(t){return t=ye(t),this.getKeys().filter(e=>this.values[e]===t.values[e])}isEqualTo(t){return Tt(this.toArray(),ye(t).toArray())}isEmpty(){return 0===this.getKeys().length}toArray(){if(!this.array){const t=[];for(const e in this.values){const n=this.values[e];t.push(t.push(e,n))}this.array=t.slice(0)}return this.array}toObject(){return be(this.values)}toJSON(){return this.toObject()}contentsForInspection(){return{values:JSON.stringify(this.values)}}}const fe=function(t,e){const n={};return n[t]=e,n},ve=function(t,e){const n=be(t);for(const t in e){const i=e[t];n[t]=i}return n},be=function(t,e){const n={};return Object.keys(t).sort().forEach(i=>{i!==e&&(n[i]=t[i])}),n},ye=function(t){return t instanceof ge?t:new ge(t)},Ae=function(t){return t instanceof ge?t.values:t};class xe{static groupObjects(){let t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],{depth:n,asTree:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i&&null==n&&(n=0);const r=[];return Array.from(e).forEach(e=>{var o;if(t){var s,a,l;if(null!==(s=e.canBeGrouped)&&void 0!==s&&s.call(e,n)&&null!==(a=(l=t[t.length-1]).canBeGroupedWith)&&void 0!==a&&a.call(l,e,n))return void t.push(e);r.push(new this(t,{depth:n,asTree:i})),t=null}null!==(o=e.canBeGrouped)&&void 0!==o&&o.call(e,n)?t=[e]:r.push(e)}),t&&r.push(new this(t,{depth:n,asTree:i})),r}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],{depth:e,asTree:n}=arguments.length>1?arguments[1]:void 0;this.objects=t,n&&(this.depth=e,this.objects=this.constructor.groupObjects(this.objects,{asTree:n,depth:this.depth+1}))}getObjects(){return this.objects}getDepth(){return this.depth}getCacheKey(){const t=["objectGroup"];return Array.from(this.getObjects()).forEach(e=>{t.push(e.getCacheKey())}),t.join("/")}}class we extends pt{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];super(...arguments),this.objects={},Array.from(t).forEach(t=>{const e=JSON.stringify(t);null==this.objects[e]&&(this.objects[e]=t)})}find(t){const e=JSON.stringify(t);return this.objects[e]}}class ke{constructor(t){this.reset(t)}add(t){const e=Ce(t);this.elements[e]=t}remove(t){const e=Ce(t),n=this.elements[e];if(n)return delete this.elements[e],n}reset(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return this.elements={},Array.from(t).forEach(t=>{this.add(t)}),t}}const Ce=t=>t.dataset.trixStoreKey;class Ee extends pt{isPerforming(){return!0===this.performing}hasPerformed(){return!0===this.performed}hasSucceeded(){return this.performed&&this.succeeded}hasFailed(){return this.performed&&!this.succeeded}getPromise(){return this.promise||(this.promise=new Promise((t,e)=>(this.performing=!0,this.perform((n,i)=>{this.succeeded=n,this.performing=!1,this.performed=!0,this.succeeded?t(i):e(i)})))),this.promise}perform(t){return t(!1)}release(){var t,e;null===(t=this.promise)||void 0===t||null===(e=t.cancel)||void 0===e||e.call(t),this.promise=null,this.performing=null,this.performed=null,this.succeeded=null}}Ee.proxyMethod("getPromise().then"),Ee.proxyMethod("getPromise().catch");class Se extends pt{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(...arguments),this.object=t,this.options=e,this.childViews=[],this.root
2View=this}getNodes(){return this.nodes||(this.nodes=this.createNodes()),this.nodes.map(t=>t.cloneNode(!0))}invalidate(){var t;return this.nodes=null,this.childViews=[],null===(t=this.parentView)||void 0===t?void 0:t.invalidate()}invalidateViewForObject(t){var e;return null===(e=this.findViewForObject(t))||void 0===e?void 0:e.invalidate()}findOrCreateCachedChildView(t,e,n){let i=this.getCachedViewForObject(e);return i?this.recordChildView(i):(i=this.createChildView(...arguments),this.cacheViewForObject(i,e)),i}createChildView(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e instanceof xe&&(n.viewClass=t,t=Fe);const i=new t(e,n);return this.recordChildView(i)}recordChildView(t){return t.parentView=this,t.rootView=this.rootView,this.childViews.push(t),t}getAllChildViews(){let t=[];return this.childViews.forEach(e=>{t.push(e),t=t.concat(e.getAllChildViews())}),t}findElement(){return this.findElementForObject(this.object)}findElementForObject(t){const e=null==t?void 0:t.id;if(e)return this.rootView.element.querySelector("[data-trix-id='".concat(e,"']"))}findViewForObject(t){for(const e of this.getAllChildViews())if(e.object===t)return e}getViewCache(){return this.rootView!==this?this.rootView.getViewCache():this.isViewCachingEnabled()?(this.viewCache||(this.viewCache={}),this.viewCache):void 0}isViewCachingEnabled(){return!1!==this.shouldCacheViews}enableViewCaching(){this.shouldCacheViews=!0}disableViewCaching(){this.shouldCacheViews=!1}getCachedViewForObject(t){var e;return null===(e=this.getViewCache())||void 0===e?void 0:e[t.getCacheKey()]}cacheViewForObject(t,e){const n=this.getViewCache();n&&(n[e.getCacheKey()]=t)}garbageCollectCachedViews(){const t=this.getViewCache();if(t){const e=this.getAllChildViews().concat(this).map(t=>t.object.getCacheKey());for(const n in t)e.includes(n)||delete t[n]}}}class Fe extends Se{constructor(){super(...arguments),this.objectGroup=this.object,this.viewClass=this.options.viewClass,delete this.options.viewClass}getChildViews(){return this.childViews.length||Array.from(this.objectGroup.getObjects()).forEach(t=>{this.findOrCreateCachedChildView(this.viewClass,t,this.options)}),this.childViews}createNodes(){const t=this.createContainerElement();return this.getChildViews().forEach(e=>{Array.from(e.getNodes()).forEach(e=>{t.appendChild(e)})}),[t]}createContainerElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.objectGroup.getDepth();return this.getChildViews()[0].createContainerElement(t)}}const{entries:De,setPrototypeOf:Te,isFrozen:Be,getPrototypeOf:Re,getOwnPropertyDescriptor:Ne}=Object;let{freeze:Le,seal:Oe,create:Me}=Object,{apply:Pe,construct:Ie}="undefined"!=typeof Reflect&&Reflect;Le||(Le=function(t){return t}),Oe||(Oe=function(t){return t}),Pe||(Pe=function(t,e){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];return t.apply(e,i)}),Ie||(Ie=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return new t(...n)});const _e=sn(Array.prototype.forEach),ze=sn(Array.prototype.lastIndexOf),Ve=sn(Array.prototype.pop),je=sn(Array.prototype.push),Ue=sn(Array.prototype.splice),qe=Array.isArray,We=sn(String.prototype.toLowerCase),He=sn(String.prototype.toString),$e=sn(String.prototype.match),Ge=sn(String.prototype.replace),Ke=sn(String.prototype.indexOf),Ye=sn(String.prototype.trim),Je=sn(Number.prototype.toString),Xe=sn(Boolean.prototype.toString),Qe="undefined"==typeof BigInt?null:sn(BigInt.prototype.toString),Ze="undefined"==typeof Symbol?null:sn(Symbol.prototype.toString),tn=sn(Object.prototype.hasOwnProperty),en=sn(Object.prototype.toString),nn=sn(RegExp.prototype.test),rn=(on=TypeError,function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Ie(on,e)});var on;function sn(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return Pe(t,e,i)}}function an(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:We;if(Te&&Te(t,null),!qe(e))return t;let i=e.length;for(;i--;){let r=e[i];if("string"==typeof r){const t=n(r);t!==r&&(Be(e)||(e[i]=t),r=t)}t[r]=!0}return t}function ln(t){for(let e=0;e<t.length;e++)tn(t,e)||(t[e]=null);return t}function cn(t){const e=Me(null);
vendor: 6,672 bytes, line 2
2for(const[n,i]of De(t))tn(t,n)&&(qe(i)?e[n]=ln(i):i&&"object"==typeof i&&i.constructor===Object?e[n]=cn(i):e[n]=i);return e}function un(t,e){for(;null!==t;){const n=Ne(t,e);if(n){if(n.get)return sn(n.get);if("function"==typeof n.value)return sn(n.value)}t=Re(t)}return function(){return null}}const dn=Le(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),hn=Le(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),mn=Le(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),pn=Le(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),gn=Le(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),fn=Le(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),vn=Le(["#text"]),bn=Le(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),yn=Le(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),An=Le(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","
2subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),xn=Le(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),wn=Oe(/\{\{[\w\W]*|[\w\W]*\}\}/gm),kn=Oe(/<%[\w\W]*|[\w\W]*%>/gm),Cn=Oe(/\$\{[\w\W]*/gm),En=Oe(/^data-[\-\w.\u00B7-\uFFFF]+$/),Sn=Oe(/^aria-[\-\w]+$/),Fn=Oe(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Dn=Oe(/^(?:\w+script|data):/i),Tn=Oe(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Bn=Oe(/^html$/i),Rn=Oe(/^[a-z][.\w]*(-[.\w]+)+$/i);var Nn=Object.freeze({__proto__:null,ARIA_ATTR:Sn,ATTR_WHITESPACE:Tn,CUSTOM_ELEMENT:Rn,DATA_ATTR:En,DOCTYPE_NAME:Bn,ERB_EXPR:kn,IS_ALLOWED_URI:Fn,IS_SCRIPT_OR_DATA:Dn,MUSTACHE_EXPR:wn,TMPLIT_EXPR:Cn});var Ln=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window;const n=e=>t(e);if(n.version="3.4.2",n.removed=[],!e||!e.document||9!==e.document.nodeType||!e.Element)return n.isSupported=!1,n;let{document:i}=e;const r=i,o=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:a,Node:l,Element:c,NodeFilter:u,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:h,DOMParser:m,trustedTypes:p}=e,g=c.prototype,f=un(g,"cloneNode"),v=un(g,"remove"),b=un(g,"nextSibling"),y=un(g,"childNodes"),A=un(g,"parentNode");if("function"==typeof a){const t=i.createElement("template");t.content&&t.content.ownerDocument&&(i=t.content.ownerDocument)}let x,w="";const{implementation:k,createNodeIterator:C,createDocumentFragment:E,getElementsByTagName:S}=i,{importNode:F}=r;let D={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof De&&"function"==typeof A&&k&&void 0!==k.createHTMLDocument;const{MUSTACHE_EXPR:T,ERB_EXPR:B,TMPLIT_EXPR:R,DATA_ATTR:N,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:M,CUSTOM_ELEMENT:P}=Nn;let{IS_ALLOWED_URI:I}=Nn,_=null;const z=an({},[...dn,...hn,...mn,...gn,...vn]);let V=null;const j=an({},[...bn,...yn,...An,...xn]);let U=Object.seal(Me(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),q=null,W=null;const H=Object.seal(Me(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let $=!0,G=!0,K=!1,Y=!0,J=!1,X=!0,Q=!1,Z=!1,tt=!1,et=!1,nt=!1,it=!1,rt=!0,ot=!1;const st="user-content-";let at=!0,lt=!1,ct={},ut=null;const dt=an({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ht=null;const mt=an({},["audio","video","img","source","image","track"]);let pt=null;const gt=an({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ft="http://www.w3.org/1998/Math/MathML",vt="http://www.w3.org/2000/svg",bt="http://www.w3.org/1999/xhtml";let yt=bt,At=!1,xt=null;const wt=an({},[ft,vt,bt],He);let kt=an({},["mi","mo","mn","ms","mtext"]),Ct=an({},["annotation-xml"]);const Et=an({},["title","style","font","a","script"]);let St=null;const Ft=["application/xhtml+xml","text/html"];let Dt=null,Tt=null;const Bt=i.createElement("form"),Rt=function(t){return t instanceof RegExp||t instanceof Function},Nt=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Tt&&Tt===t)return;t&&"object"==typeof t||(t={}),t=cn(t),St=-1===Ft.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,Dt="application/xhtml+xml"===St?He:We,_=tn(t,"ALLOWED_TAGS")&&qe(t.ALLOWED_TAGS)?an({},t.ALLOWED_TAGS,Dt):z,V=tn(t,"ALLOWED_ATTR")&&qe(t.ALLOWED_ATTR)?an({},t.ALLOWED_ATTR,Dt):j,xt=tn(t,"ALLOWED_NAMESPACES")&&qe(t.ALLOWED_NAMESPACES)?an({},t.ALLOWED_NAMESPACES,He):wt,pt=tn(t,"ADD_URI_SAFE_ATTR")&&qe(t.ADD_URI_SAFE_ATTR)?an(cn(gt),t.ADD_URI_SAFE_ATTR,Dt):gt,ht=tn(t,"ADD_DATA_URI_TAGS")&&qe(t.ADD_DATA_URI_TAGS)?an(cn(mt),t.ADD_DATA_URI_TAGS,Dt):mt,ut=tn(t,"FORBID_CONTENTS")&&qe(t.FORBID_CONTENTS)?an({},t.FORBID_CONTENTS,Dt):dt,q=tn(t,"FORBID_TAGS")&&qe(t.FORBID_TAGS)?an({},t.FORBID_TAGS,Dt):cn({}),W=tn(t,"FORBID_ATTR")&&qe(t.FORBID_ATTR)?an({},t.FORBID_ATTR,Dt):cn({}),ct=!!tn(t,"USE_PROFILES")&&(t.USE_PROFILES&&"object"==typeof t.USE_PROFILES?cn(t.USE_PROFILES):t.USE_PROFILES),$=!1!==t.ALLOW_ARIA_ATTR,G=!1!==t.ALLOW_DATA_ATTR,K=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Y=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,J=t.SAFE_FOR_TEMPLATES||!1,X=!1!==t.SAFE_FOR_XML,Q=t.WHOLE_DOCUMENT||!1,et=t.RETURN_DOM||!1,nt=t.RETURN_DOM_FRAGMENT||!1,it=t.RETURN_TRUSTED_TYPE||!1,tt=t.FORCE_BODY||!1,rt=!1!==t.SANITIZE_DOM,ot=t.SANITIZE_NAMED_PROPS||!1,at=!1!==t.KEEP_CONTENT,lt=t.IN_PLACE||!1,I=function(t){try{return nn(t,""),!0}catch(t){return!1}}(t.ALLOWED_URI_REGEXP)?t.ALLOWED_URI_REGEXP:Fn,yt="string"==typeof t.NAMESPACE?t.NAMESPACE:bt,kt=tn(t,"MATHML_TEXT_INTEGRATION_POINTS")&&t.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof t.MATHML_TEXT_INTEGRATION_POINTS?cn(t.MATHML_TEXT_INTEGRATION_POINTS):an({},["mi","mo","mn","ms","mtext"]),Ct=tn(t,"HTML_INTEGRATION_POINTS")&&t.HTML_INTEGRATION_POINTS&&"object"==typeof t.HTML_INTEGRATION_POINTS?cn(t.HTML_INTEGRATION_POINTS):an({},["annotation-xml"]);const e=tn(t,"CUSTOM_ELEMENT_HANDLING")&&t.CUSTOM_ELEMENT_HANDLING&&"object"==typeof t.CUSTOM_ELEMENT_HANDLING?cn(t.CUSTOM_ELEMENT_HANDLING):Me(null);if(U=Me(null),tn(e,"tagNameCheck")&&Rt(e.tagNameCheck)&&(U.tagNameCheck=e.tagNameCheck),tn(e,"attributeNameCheck")&&Rt(e.attributeNameCheck)&&(U.attributeNameCheck=e.attributeNameCheck),tn(e,"allowCustomizedBuiltInElements")&&"boolean"==typeof e.allowCustomizedBuiltInElements&&(U.allowCustomizedBuiltInElements=e.allowCustomizedBuiltInElements),J&&(G=!1),nt&&(et=!0),ct&&(_=an({},vn),V=Me(null),!0===ct.html&&(an(_,dn),an(V,bn)),!0===ct.svg&&(an(_,hn),an(V,yn),an(V,xn)),!0===ct.svgFilters&&
vendor: 1,239 bytes, line 2
2(an(_,mn),an(V,yn),an(V,xn)),!0===ct.mathMl&&(an(_,gn),an(V,An),an(V,xn))),H.tagCheck=null,H.attributeCheck=null,tn(t,"ADD_TAGS")&&("function"==typeof t.ADD_TAGS?H.tagCheck=t.ADD_TAGS:qe(t.ADD_TAGS)&&(_===z&&(_=cn(_)),an(_,t.ADD_TAGS,Dt))),tn(t,"ADD_ATTR")&&("function"==typeof t.ADD_ATTR?H.attributeCheck=t.ADD_ATTR:qe(t.ADD_ATTR)&&(V===j&&(V=cn(V)),an(V,t.ADD_ATTR,Dt))),tn(t,"ADD_URI_SAFE_ATTR")&&qe(t.ADD_URI_SAFE_ATTR)&&an(pt,t.ADD_URI_SAFE_ATTR,Dt),tn(t,"FORBID_CONTENTS")&&qe(t.FORBID_CONTENTS)&&(ut===dt&&(ut=cn(ut)),an(ut,t.FORBID_CONTENTS,Dt)),tn(t,"ADD_FORBID_CONTENTS")&&qe(t.ADD_FORBID_CONTENTS)&&(ut===dt&&(ut=cn(ut)),an(ut,t.ADD_FORBID_CONTENTS,Dt)),at&&(_["#text"]=!0),Q&&an(_,["html","head","body"]),_.table&&(an(_,["tbody"]),delete q.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw rn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw rn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=t.TRUSTED_TYPES_POLICY,w=x.createHTML("")}else void 0===x&&(x=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;
vendor: 1,895 bytes, line 2
2const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(n=e.getAttribute(i));const r="dompurify"+(n?"#"+n:"");try{return t.createPolicy(r,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(p,o)),null!==x&&"string"==typeof w&&(w=x.createHTML(""));Le&&Le(t),Tt=t},Lt=an({},[...hn,...mn,...pn]),Ot=an({},[...gn,...fn]),Mt=function(t){je(n.removed,{element:t});try{A(t).removeChild(t)}catch(e){v(t)}},Pt=function(t,e){try{je(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){je(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(et||nt)try{Mt(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},It=function(t){let e=null,n=null;if(tt)t="<remove></remove>"+t;else{const e=$e(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===St&&yt===bt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const r=x?x.createHTML(t):t;if(yt===bt)try{e=(new m).parseFromString(r,St)}catch(t){}if(!e||!e.documentElement){e=k.createDocument(yt,"template",null);try{e.documentElement.innerHTML=At?w:r}catch(t){}}const o=e.body||e.documentElement;return t&&n&&o.insertBefore(i.createTextNode(n),o.childNodes[0]||null),yt===bt?S.call(e,Q?"html":"body")[0]:Q?e.documentElement:o},_t=function(t){return C.call(t.ownerDocument||t,t,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},zt=function(t){return t instanceof h&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof d)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},Vt=function(t){return"function"==typeof l&&t instanceof l};function jt(t,e,i){_e(t,t=>{t.call(n,e,i,Tt)}
vendor: 4,879 bytes, line 2
2)}const Ut=function(t){let e=null;if(jt(D.beforeSanitizeElements,t,null),zt(t))return Mt(t),!0;const i=Dt(t.nodeName);if(jt(D.uponSanitizeElement,t,{tagName:i,allowedTags:_}),X&&t.hasChildNodes()&&!Vt(t.firstElementChild)&&nn(/<[/\w!]/g,t.innerHTML)&&nn(/<[/\w!]/g,t.textContent))return Mt(t),!0;if(X&&t.namespaceURI===bt&&"style"===i&&Vt(t.firstElementChild))return Mt(t),!0;if(7===t.nodeType)return Mt(t),!0;if(X&&8===t.nodeType&&nn(/<[/\w]/g,t.data))return Mt(t),!0;if(q[i]||!(H.tagCheck instanceof Function&&H.tagCheck(i))&&!_[i]){if(!q[i]&&Ht(i)){if(U.tagNameCheck instanceof RegExp&&nn(U.tagNameCheck,i))return!1;if(U.tagNameCheck instanceof Function&&U.tagNameCheck(i))return!1}if(at&&!ut[i]){const e=A(t)||t.parentNode,n=y(t)||t.childNodes;if(n&&e)for(let i=n.length-1;i>=0;--i){const r=f(n[i],!0);e.insertBefore(r,b(t))}}return Mt(t),!0}return t instanceof c&&!function(t){let e=A(t);e&&e.tagName||(e={namespaceURI:yt,tagName:"template"});const n=We(t.tagName),i=We(e.tagName);return!!xt[t.namespaceURI]&&(t.namespaceURI===vt?e.namespaceURI===bt?"svg"===n:e.namespaceURI===ft?"svg"===n&&("annotation-xml"===i||kt[i]):Boolean(Lt[n]):t.namespaceURI===ft?e.namespaceURI===bt?"math"===n:e.namespaceURI===vt?"math"===n&&Ct[i]:Boolean(Ot[n]):t.namespaceURI===bt?!(e.namespaceURI===vt&&!Ct[i])&&!(e.namespaceURI===ft&&!kt[i])&&!Ot[n]&&(Et[n]||!Lt[n]):!("application/xhtml+xml"!==St||!xt[t.namespaceURI]))}(t)?(Mt(t),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!nn(/<\/no(script|embed|frames)/i,t.innerHTML)?(J&&3===t.nodeType&&(e=t.textContent,_e([T,B,R],t=>{e=Ge(e,t," ")}),t.textContent!==e&&(je(n.removed,{element:t.cloneNode()}),t.textContent=e)),jt(D.afterSanitizeElements,t,null),!1):(Mt(t),!0)},qt=function(t,e,n){if(W[e])return!1;if(rt&&("id"===e||"name"===e)&&(n in i||n in Bt))return!1;const r=V[e]||H.attributeCheck instanceof Function&&H.attributeCheck(e,t);if(G&&!W[e]&&nn(N,e));else if($&&nn(L,e));else if(!r||W[e]){if(!(Ht(t)&&(U.tagNameCheck instanceof RegExp&&nn(U.tagNameCheck,t)||U.tagNameCheck instanceof Function&&U.tagNameCheck(t))&&(U.attributeNameCheck instanceof RegExp&&nn(U.attributeNameCheck,e)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(e,t))||"is"===e&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&&nn(U.tagNameCheck,n)||U.tagNameCheck instanceof Function&&U.tagNameCheck(n))))return!1}else if(pt[e]);else if(nn(I,Ge(n,M,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==Ke(n,"data:")||!ht[t])if(K&&!nn(O,Ge(n,M,"")));else if(n)return!1;return!0},Wt=an({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ht=function(t){return!Wt[We(t)]&&nn(P,t)},$t=function(t){jt(D.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||zt(t))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:V,forceKeepAttr:void 0};let r=e.length;for(;r--;){const o=e[r],{name:s,namespaceURI:a,value:l}=o,c=Dt(s),u=l;let d="value"===s?u:Ye(u);if(i.attrName=c,i.attrValue=d,i.keepAttr=!0,i.forceKeepAttr=void 0,jt(D.uponSanitizeAttribute,t,i),d=i.attrValue,!ot||"id"!==c&&"name"!==c||0===Ke(d,st)||(Pt(s,t),d=st+d),X&&nn(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){Pt(s,t);continue}if("attributename"===c&&$e(d,"href")){Pt(s,t);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){Pt(s,t);continue}if(!Y&&nn(/\/>/i,d)){Pt(s,t);continue}J&&_e([T,B,R],t=>{d=Ge(d,t," ")});const h=Dt(t.nodeName);if(qt(h,c,d)){if(x&&"object"==typeof p&&"function"==typeof p.getAttributeType)if(a);else switch(p.getAttributeType(h,c)){case"TrustedHTML":d=x.createHTML(d);break;case"TrustedScriptURL":d=x.createScriptURL(d)}if(d!==u)try{a?t.setAttributeNS(a,s,d):t.setAttribute(s,d),zt(t)?Mt(t):Ve(n.removed)}catch(e){Pt(s,t)}}else Pt(s,t)}jt(D.afterSanitizeAttributes,t,null)},Gt=function(t){let e=null;const n=_t(t);for(jt(D.beforeSanitizeShadowDOM,t,null);e=n.nextNode();)jt(D.uponSanitizeShadowNode,e,null),Ut(e),$t(e),e.content instanceof s&&Gt(e.content);jt(D.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,o=null,a=null,c=null;if(At=!t,At&&(t="\x3c!--\x3e"),"string"!=typeof t&&!Vt(t)&&"string"!=typeof(t=function(t){switch(typeof t){case"string":return t;case"number":return Je(t);case"boolean":return Xe(t);case"bigint":return Qe?Qe(t):"0";case"symbol":return Ze?Ze(t):"Symbol()";case"undefined":default:return en(t);case"function":case"object":{if(null===t)return en(t);const e=t,n=un(e,"toString");if("function"==typeof n){const t=n(e);return"string"==typeof t?t:en(t)}return en(t)}}}(t)))throw rn("dirty is not a string, aborting");if(!n.isSupported)return t;if(Z||Nt(e),n.removed=[],"string"==typeof t&&(lt=!1),lt){const e=t.nodeName;if("string"==typeof e){const t=Dt(e);
2if(!_[t]||q[t])throw rn("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof l)i=It("\x3c!----\x3e"),o=i.ownerDocument.importNode(t,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?i=o:i.appendChild(o);else{if(!et&&!J&&!Q&&-1===t.indexOf("<"))return x&&it?x.createHTML(t):t;if(i=It(t),!i)return et?null:it?w:""}i&&tt&&Mt(i.firstChild);const u=_t(lt?t:i);for(;a=u.nextNode();)Ut(a),$t(a),a.content instanceof s&&Gt(a.content);if(lt)return t;if(et){if(J){i.normalize();let t=i.innerHTML;_e([T,B,R],e=>{t=Ge(t,e," ")}),i.innerHTML=t}if(nt)for(c=E.call(i.ownerDocument);i.firstChild;)c.appendChild(i.firstChild);else c=i;return(V.shadowroot||V.shadowrootmode)&&(c=F.call(r,c,!0)),c}let d=Q?i.outerHTML:i.innerHTML;return Q&&_["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&nn(Bn,i.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+d),J&&_e([T,B,R],t=>{d=Ge(d,t," ")}),x&&it?x.createHTML(d):d},n.setConfig=function(){Nt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Z=!0},n.clearConfig=function(){Tt=null,Z=!1},n.isValidAttribute=function(t,e,n){Tt||Nt({});const i=Dt(t),r=Dt(e);return qt(i,r,n)},n.addHook=function(t,e){"function"==typeof e&&je(D[t],e)},n.removeHook=function(t,e){if(void 0!==e){const n=ze(D[t],e);return-1===n?void 0:Ue(D[t],n,1)[0]}return Ve(D[t])},n.removeHooks=function(t){D[t]=[]},n.removeAllHooks=function(){D={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();Ln.addHook("uponSanitizeAttribute",function(t,e){"data-trix-serialized-attributes"!==e.attrName?/^data-trix-/.test(e.attrName)&&(e.forceKeepAttr=!0):e.keepAttr=!1});const On="style href src width height language class".split(" "),Mn="javascript:".split(" "),Pn="script iframe form noscript".split(" ");class In extends pt{static setHTML(t,e,n){const i=new this(e,n).sanitize(),r=i.getHTML?i.getHTML():i.outerHTML;t.innerHTML=r}static sanitize(t,e){const n=new this(t,e);return n.sanitize(),n}constructor(t){let{allowedAttributes:e,forbiddenProtocols:n,forbiddenElements:i,purifyOptions:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(...arguments),this.allowedAttributes=e||On,this.forbiddenProtocols=n||Mn,this.forbiddenElements=i||Pn,this.purifyOptions=r||{},this.body=_n(t)}sanitize(){this.sanitizeElements(),this.normalizeListElementNesting();const t=Object.assign({},R,this.purifyOptions);return Ln.setConfig(t),this.body=Ln.sanitize(this.body),this.body}getHTML(){return this.body.innerHTML}getBody(){return this.body}sanitizeElements(){const t=Y(this.body),e=[];for(;t.nextNode();){const n=t.currentNode;switch(n.nodeType){case Node.ELEMENT_NODE:this.elementIsRemovable(n)?e.push(n):this.sanitizeElement(n);break;case Node.COMMENT_NODE:e.push(n)}}return e.forEach(t=>K(t)),this.body}sanitizeElement(t){return t.hasAttribute("href")&&this.forbiddenProtocols.includes(t.protocol)&&t.removeAttribute("href"),Array.from(t.attributes).forEach(e=>{let{name:n}=e;this.allowedAttributes.includes(n)||0===n.indexOf("data-trix")||t.removeAttribute(n)}),t}normalizeListElementNesting(){return Array.from(this.body.querySelectorAll("ul,ol")).forEach(t=>{const e=t.previousElementSibling;e&&"li"===J(e)&&e.appendChild(t)}),this.body}elementIsRemovable(t){if((null==t?void 0:t.nodeType)===Node.ELEMENT_NODE)return this.elementIsForbidden(t)||this.elementIsntSerializable(t)}elementIsForbidden(t){return this.forbiddenElements.includes(J(t))}elementIsntSerializable(t){return"false"===t.getAttribute("data-trix-serialize")&&!ot(t)}}const _n=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";t=t.replace(/<\/html[^>]*>[^]*$/i,"</html>");const e=document.implementation.createHTMLDocument("");return e.documentElement.innerHTML=t,Array.from(e.head.querySelectorAll("style")).forEac
vendor: 5,427 bytes, line 2
2h(t=>{e.body.appendChild(t)}),e.body},{css:zn}=mt;class Vn extends Se{constructor(){super(...arguments),this.attachment=this.object,this.attachment.uploadProgressDelegate=this,this.attachmentPiece=this.options.piece}createContentNodes(){return[]}createNodes(){let t;const e=t=X({tagName:"figure",className:this.getClassName(),data:this.getData(),editable:!1}),n=this.getHref();return n&&(t=X({tagName:"a",editable:!1,attributes:{href:n,tabindex:-1}}),e.appendChild(t)),this.attachment.hasContent()?In.setHTML(t,this.attachment.getContent()):this.createContentNodes().forEach(e=>{t.appendChild(e)}),t.appendChild(this.createCaptionElement()),this.attachment.isPending()&&(this.progressElement=X({tagName:"progress",attributes:{class:zn.attachmentProgress,value:this.attachment.getUploadProgress(),max:100},data:{trixMutable:!0,trixStoreKey:["progressElement",this.attachment.id].join("/")}}),e.appendChild(this.progressElement)),[jn("left"),e,jn("right")]}createCaptionElement(){const t=X({tagName:"figcaption",className:zn.attachmentCaption}),e=this.attachmentPiece.getCaption();if(e)t.classList.add("".concat(zn.attachmentCaption,"--edited")),t.textContent=e;else{let e,n;const i=this.getCaptionConfig();if(i.name&&(e=this.attachment.getFilename()),i.size&&(n=this.attachment.getFormattedFilesize()),e){const n=X({tagName:"span",className:zn.attachmentName,textContent:e});t.appendChild(n)}if(n){e&&t.appendChild(document.createTextNode(" "));const i=X({tagName:"span",className:zn.attachmentSize,textContent:n});t.appendChild(i)}}return t}getClassName(){const t=[zn.attachment,"".concat(zn.attachment,"--").concat(this.attachment.getType())],e=this.attachment.getExtension();return e&&t.push("".concat(zn.attachment,"--").concat(e)),t.join(" ")}getData(){const t={trixAttachment:JSON.stringify(this.attachment),trixContentType:this.attachment.getContentType(),trixId:this.attachment.id},{attributes:e}=this.attachmentPiece;return e.isEmpty()||(t.trixAttributes=JSON.stringify(e)),this.attachment.isPending()&&(t.trixSerialize=!1),t}getHref(){if(!Un(this.attachment.getContent(),"a")){const t=this.attachment.getHref();if(t&&Ln.isValidAttribute("a","href",t))return t}}getCaptionConfig(){var t;const e=this.attachment.getType(),n=Jt(null===(t=E[e])||void 0===t?void 0:t.caption);return"file"===e&&(n.name=!0),n}findProgressElement(){var t;return null===(t=this.findElement())||void 0===t?void 0:t.querySelector("progress")}attachmentDidChangeUploadProgress(){const t=this.attachment.getUploadProgress(),e=this.findProgressElement();e&&(e.value=t)}}const jn=t=>X({tagName:"span",textContent:M,data:{trixCursorTarget:t,trixSerialize:!1}}),Un=function(t,e){const n=X("div");return In.setHTML(n,t||""),n.querySelector(e)};class qn extends Vn{constructor(){super(...arguments),this.attachment.previewDelegate=this}createContentNodes(){return this.image=X({tagName:"img",attributes:{src:""},data:{trixMutable:!0}}),this.refresh(this.image),[this.image]}createCaptionElement(){const t=super.createCaptionElement(...arguments);return t.textContent||t.setAttribute("data-trix-placeholder",N.captionPlaceholder),t}refresh(t){var e;if(t||(t=null===(e=this.findElement())||void 0===e?void 0:e.querySelector("img")),t)return this.updateAttributesForImage(t)}updateAttributesForImage(t){const e=this.attachment.getURL(),n=this.attachment.getPreviewURL();if(t.src=n||e,n===e)t.removeAttribute("data-trix-serialized-attributes");else{const n=JSON.stringify({src:e});t.setAttribute("data-trix-serialized-attributes",n)}const i=this.attachment.getWidth(),r=this.attachment.getHeight(),o=this.attachment.getAttribute("alt");null!=i&&(t.width=i),null!=r&&(t.height=r),null!=o&&(t.alt=o);const s=["imageElement",this.attachment.id,t.src,t.width,t.height].join("/");t.dataset.trixStoreKey=s}attachmentDidChangeAttributes(){return this.refresh(this.image),this.refresh()}}class Wn extends Se{constructor(){super(...arguments),this.piece=this.object,this.attributes=this.piece.getAttributes(),this.textConfig=this.options.textConfig,this.context=this.options.context,this.piece.attachment?this.attachment=this.piece.attachment:this.string=this.piece.toString()}createNodes(){let t=this.attachment?this.createAttachmentNodes():this.createStringNodes();const e=this.createElement();if(e){const n=function(t){for(;null!==(e=t)&&void 0!==e&&e.firstElementChild;){var e;t=t.firstElementChild}return t}(e);Array.from(t).forEach(t=>{n.appendChild(t)}),t=[e]}return t}createAttachmentNodes(){const t=this.attachment.isPreviewable()?qn:Vn;return this.createChildView(t,this.piece.attachment,{piece:this.piece}).getNodes()}createStringNodes(){var t;if(null!==(t=this.textConfig)&&void 0!==t&&t.plaintext)return[document.createTextNode(this.string)];{const t=[],e=this.string.split("\n");for(let n=0;n<e.length;n++){const i=e[n];if(n>0){const e=X("br");t.push(e)}if(i.length){const e=document.createTextNode(this.preserveSpaces(i));t.push(e)}}return t}}createElement(){let t,e,n;const i={};for(e in this.attributes){n=this.attributes[e];const o=Vt(e);if(o){if(o.tagName){var r;const e=X(o.tagName);r?(r.appendChild(e),r=e):t=r=e}if(o.styleProperty&&(i[o.styleProperty]=n),o.style)for(e in o.style)n=o.style[e],i[e]=n}}if(Object.keys(i).length)for(e in t||(t=X("span")),i)n=i[e],t.style[e]=n;return t}createContainerElement(){for(const t in this.attributes){const e=this.attributes[t],n=Vt(t);if(n&&n.groupTagName){const i={};return i[t]=e,X(n.groupTagName,i)}}}
2preserveSpaces(t){return this.context.isLast&&(t=t.replace(/\ $/,P)),t=t.replace(/(\S)\ {3}(\S)/g,"$1 ".concat(P," $2")).replace(/\ {2}/g,"".concat(P," ")).replace(/\ {2}/g," ".concat(P)),(this.context.isFirst||this.context.followsWhitespace)&&(t=t.replace(/^\ /,P)),t}}class Hn extends Se{constructor(){super(...arguments),this.text=this.object,this.textConfig=this.options.textConfig}createNodes(){const t=[],e=xe.groupObjects(this.getPieces()),n=e.length-1;for(let r=0;r<e.length;r++){const o=e[r],s={};0===r&&(s.isFirst=!0),r===n&&(s.isLast=!0),$n(i)&&(s.followsWhitespace=!0);const a=this.findOrCreateCachedChildView(Wn,o,{textConfig:this.textConfig,context:s});t.push(...Array.from(a.getNodes()||[]));var i=o}return t}getPieces(){return Array.from(this.text.getPieces()).filter(t=>!t.hasAttribute("blockBreak"))}}const $n=t=>/\s$/.test(null==t?void 0:t.toString()),{css:Gn}=mt;class Kn extends Se{constructor(){super(...arguments),this.block=this.object,this.attributes=this.block.getAttributes()}createNodes(){const t=[document.createComment("block")];if(this.block.isEmpty())t.push(X("br"));else{var e;const n=null===(e=_t(this.block.getLastAttribute()))||void 0===e?void 0:e.text,i=this.findOrCreateCachedChildView(Hn,this.block.text,{textConfig:n});t.push(...Array.from(i.getNodes()||[])),this.shouldAddExtraNewlineElement()&&t.push(X("br"))}if(this.attributes.length)return t;{let e;const{tagName:n}=S.default;this.block.isRTL()&&(e={dir:"rtl"});const i=X({tagName:n,attributes:e});return t.forEach(t=>i.appendChild(t)),[i]}}createContainerElement(t){const e={};let n;const i=this.attributes[t],{tagName:r,htmlAttributes:o=[]}=_t(i);if(0===t&&this.block.isRTL()&&Object.assign(e,{dir:"rtl"}),"attachmentGallery"===i){const t=this.block.getBlockBreakPosition();n="".concat(Gn.attachmentGallery," ").concat(Gn.attachmentGallery,"--").concat(t)}return Object.entries(this.block.htmlAttributes).forEach(t=>{let[n,i]=t;o.includes(n)&&(e[n]=i)}),X({tagName:r,className:n,attributes:e})}shouldAddExtraNewlineElement(){return/\n\n$/.test(this.block.toString())}}class Yn extends Se{static render(t){const e=X("div"),n=new this(t,{element:e});return n.render(),n.sync(),e}constructor(){super(...arguments),this.element=this.options.element,this.elementStore=new ke,this.setDocument(this.object)}setDocument(t){t.isEqualTo(this.document)||(this.document=this.object=t)}render(){if(this.childViews=[],this.shadowElement=X("div"),!this.document.isEmpty()){const t=xe.groupObjects(this.document.getBlocks(),{asTree:!0});Array.from(t).forEach(t=>{const e=this.findOrCreateCachedChildView(Kn,t);Array.from(e.getNodes()).map(t=>this.shadowElement.appendChild(t))})}}isSynced(){return Xn(this.shadowElement,this.element)}sync(){const t=j("trix-before-render",{cancelable:!1,attributes:{render:(t,e)=>{for(;t.lastChild;)t.removeChild(t.lastChild);t.appendChild(e)}}});this.element.dispatchEvent(t);const e=this.createDocumentFragmentForSync();return t.render(this.element,e),this.didSync()}didSync(){return this.elementStore.reset(Jn(this.element)),Yt(()=>this.garbageCollectCachedViews())}createDocumentFragmentForSync(){const t=document.createDocumentFragment();return Array.from(this.shadowElement.childNodes).forEach(e=>{t.appendChild(e.cloneNode(!0))}),Array.from(Jn(t)).forEach(t=>{const e=this.elementStore.remove(t);e&&t.parentNode.replaceChild(e,t)}),t}}const Jn=t=>t.querySelectorAll("[data-trix-store-key]"),Xn=(t,e)=>Qn(t.innerHTML)===Qn(e.innerHTML),Qn=t=>t.replace(/ /g," ");function Zn(t){var e,n;function i(e,n){try{var o=t[e](n),s=o.value,a=s instanceof ti;Promise.resolve(a?s.v:s).then(function(n){if(a){var l="return"===e?"return":"next";if(!s.k||n.done)return i(l,n);n=t[l](n).value}r(o.done?"return":"normal",n)},function(t){i("throw",t)})}catch(t){r("throw",t)}}function r(t,r){switch(t){case"return":e.resolve({value:r,done:!0});break;case"throw":e.reject(r);break;default:e.resolve({value:r,done:!1})}(e=e.next)?i(e.key,e.arg):n=null}this._invoke=function(t,r){return new Promise(function(o,s){var a={key:t,arg:r,resolve:o,reject:s,next:null};n?n=n.next=a:(e=n=a,i(t,r))})}
vendor: 24,917 bytes, line 2
2,"function"!=typeof t.return&&(this.return=void 0)}function ti(t,e){this.v=t,this.k=e}function ei(t,e,n){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ni(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,ri(t,e,"get"))}function ii(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,ri(t,e,"set"),n),n}function ri(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function oi(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function si(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ai(t,e,n){si(t,e),e.set(t,n)}Zn.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Zn.prototype.next=function(t){return this._invoke("next",t)},Zn.prototype.throw=function(t){return this._invoke("throw",t)},Zn.prototype.return=function(t){return this._invoke("return",t)};class li extends Dt{static registerType(t,e){e.type=t,this.types[t]=e}static fromJSON(t){const e=this.types[t.type];if(e)return e.fromJSON(t)}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(...arguments),this.attributes=ge.box(e)}copyWithAttributes(t){return new this.constructor(this.getValue(),t)}copyWithAdditionalAttributes(t){return this.copyWithAttributes(this.attributes.merge(t))}copyWithoutAttribute(t){return this.copyWithAttributes(this.attributes.remove(t))}copy(){return this.copyWithAttributes(this.attributes)}getAttribute(t){return this.attributes.get(t)}getAttributesHash(){return this.attributes}getAttributes(){return this.attributes.toObject()}hasAttribute(t){return this.attributes.has(t)}hasSameStringValueAsPiece(t){return t&&this.toString()===t.toString()}hasSameAttributesAsPiece(t){return t&&(this.attributes===t.attributes||this.attributes.isEqualTo(t.attributes))}isBlockBreak(){return!1}isEqualTo(t){return super.isEqualTo(...arguments)||this.hasSameConstructorAs(t)&&this.hasSameStringValueAsPiece(t)&&this.hasSameAttributesAsPiece(t)}isEmpty(){return 0===this.length}isSerializable(){return!0}toJSON(){return{type:this.constructor.type,attributes:this.getAttributes()}}contentsForInspection(){return{type:this.constructor.type,attributes:this.attributes.inspect()}}canBeGrouped(){return this.hasAttribute("href")}canBeGroupedWith(t){return this.getAttribute("href")===t.getAttribute("href")}getLength(){return this.length}canBeConsolidatedWith(t){return!1}}ei(li,"types",{});class ci extends Ee{constructor(t){super(...arguments),this.url=t}perform(t){const e=new Image;e.onload=()=>(e.width=this.width=e.naturalWidth,e.height=this.height=e.naturalHeight,t(!0,e)),e.onerror=()=>t(!1),e.src=this.url}}class ui extends Dt{static attachmentForFile(t){const e=new this(this.attributesForFile(t));return e.setFile(t),e}static attributesForFile(t){return new ge({filename:t.name,filesize:t.size,contentType:t.type})}static fromJSON(t){return new this(t)}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(t),this.releaseFile=this.releaseFile.bind(this),this.attributes=ge.box(t),this.didChangeAttributes()}setAttribute(t,e){this.setAttributes({[t]:e})}getAttribute(t){return this.attributes.get(t)}hasAttribute(t){return this.attributes.has(t)}getAttributes(){return this.attributes.toObject()}setAttributes(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=this.attributes.merge(t);var n,i,r,o;if(!this.attributes.isEqualTo(e))return this.attributes=e,this.didChangeAttributes(),null===(n=this.previewDelegate)||void 0===n||null===(i=n.attachmentDidChangeAttributes)||void 0===i||i.call(n,this),null===(r=this.delegate)||void 0===r||null===(o=r.attachmentDidChangeAttributes)||void 0===o?void 0:o.call(r,this)}didChangeAttributes(){if(this.isPreviewable())return this.preloadURL()}isPending(){return null!=this.file&&!(this.getURL()||this.getHref())}isPreviewable(){return this.attributes.has("previewable")?this.attributes.get("previewable"):ui.previewablePattern.test(this.getContentType())}getType(){return this.hasContent()?"content":this.isPreviewable()?"preview":"file"}getURL(){return this.attributes.get("url")}getHref(){return this.attributes.get("href")}getFilename(){return this.attributes.get("filename")||""}getFilesize(){return this.attributes.get("filesize")}getFormattedFilesize(){const t=this.attributes.get("filesize");return"number"==typeof t?O.formatter(t):""}getExtension(){var t;return null===(t=this.getFilename().match(/\.(\w+)$/))||void 0===t?void 0:t[1].toLowerCase()}getContentType(){return this.attributes.get("contentType")}hasContent(){return this.attributes.has("content")}getContent(){return this.attributes.get("content")}getWidth(){return this.attributes.get("width")}getHeight(){return this.attributes.get("height")}getFile(){return this.file}setFile(t){if(this.file=t,this.isPreviewable())return this.preloadFile()}releaseFile(){this.releasePreloadedFile(),this.file=null}getUploadProgress(){return null!=this.uploadProgress?this.uploadProgress:0}setUploadProgress(t){var e,n;if(this.uploadProgress!==t)return this.uploadProgress=t,null===(e=this.uploadProgressDelegate)||void 0===e||null===(n=e.attachmentDidChangeUploadProgress)||void 0===n?void 0:n.call(e,this)}toJSON(){return this.getAttributes()}getCacheKey(){return[super.getCacheKey(...arguments),this.attributes.getCacheKey(),this.getPreviewURL()].join("/")}getPreviewURL(){return this.previewURL||this.preloadingURL}setPreviewURL(t){var e,n,i,r;if(t!==this.getPreviewURL())return this.previewURL=t,null===(e=this.previewDelegate)||void 0===e||null===(n=e.attachmentDidChangeAttributes)||void 0===n||n.call(e,this),null===(i=this.delegate)||void 0===i||null===(r=i.attachmentDidChangePreviewURL)||void 0===r?void 0:r.call(i,this)}preloadURL(){return this.preload(this.getURL(),this.releaseFile)}preloadFile(){if(this.file)return this.fileObjectURL=URL.createObjectURL(this.file),this.preload(this.fileObjectURL)}releasePreloadedFile(){this.fileObjectURL&&(URL.revokeObjectURL(this.fileObjectURL),this.fileObjectURL=null)}preload(t,e){if(t&&t!==this.getPreviewURL())return this.preloadingURL=t,new ci(t).then(n=>{let{width:i,height:r}=n;return this.getWidth()&&this.getHeight()||this.setAttributes({width:i,height:r}),this.preloadingURL=null,this.setPreviewURL(t),null==e?void 0:e()}).catch(()=>(this.preloadingURL=null,null==e?void 0:e()))}}ei(ui,"previewablePattern",/^image(\/(gif|png|webp|jpe?g)|$)/);class di extends li{static fromJSON(t){return new this(ui.fromJSON(t.attachment),t.attributes)}constructor(t){super(...arguments),this.attachment=t,this.length=1,this.ensureAttachmentExclusivelyHasAttribute("href"),this.attachment.hasContent()||this.removeProhibitedAttributes()}ensureAttachmentExclusivelyHasAttribute(t){this.hasAttribute(t)&&(this.attachment.hasAttribute(t)||this.attachment.setAttributes(this.attributes.slice([t])),this.attributes=this.attributes.remove(t))}removeProhibitedAttributes(){const t=this.attributes.slice(di.permittedAttributes);t.isEqualTo(this.attributes)||(this.attributes=t)}getValue(){return this.attachment}isSerializable(){return!this.attachment.isPending()}getCaption(){return this.attributes.get("caption")||""}isEqualTo(t){var e;return super.isEqualTo(t)&&this.attachment.id===(null==t||null===(e=t.attachment)||void 0===e?void 0:e.id)}toString(){return""}toJSON(){const t=super.toJSON(...arguments);return t.attachment=this.attachment,t}getCacheKey(){return[super.getCacheKey(...arguments),this.attachment.getCacheKey()].join("/")}toConsole(){return JSON.stringify(this.toString())}}ei(di,"permittedAttributes",["caption","presentation"]),li.registerType("attachment",di);class hi extends li{static fromJSON(t){const e={...t.attributes};return e.href&&!Ln.isValidAttribute("a","href",e.href)&&delete e.href,new this(t.string,e)}constructor(t){super(...arguments),this.string=(t=>t.replace(/\r\n?/g,"\n"))(t),this.length=this.string.length}getValue(){return this.string}toString(){return this.string.toString()}isBlockBreak(){return"\n"===this.toString()&&!0===this.getAttribute("blockBreak")}toJSON(){const t=super.toJSON(...arguments);return t.string=this.string,t}canBeConsolidatedWith(t){return t&&this.hasSameConstructorAs(t)&&this.hasSameAttributesAsPiece(t)}consolidateWith(t){return new this.constructor(this.toString()+t.toString(),this.attributes)}splitAtOffset(t){let e,n;return 0===t?(e=null,n=this):t===this.length?(e=this,n=null):(e=new this.constructor(this.string.slice(0,t),this.attributes),n=new this.constructor(this.string.slice(t),this.attributes)),[e,n]}toConsole(){let{string:t}=this;return t.length>15&&(t=t.slice(0,14)+"â¦"),JSON.stringify(t.toString())}}li.registerType("string",hi);class mi extends Dt{static box(t){return t instanceof this?t:new this(t)}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];super(...arguments),this.objects=t.slice(0),this.length=this.objects.length}indexOf(t){return this.objects.indexOf(t)}splice(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return new this.constructor(Bt(this.objects,...e))}eachObject(t){return this.objects.map((e,n)=>t(e,n))}insertObjectAtIndex(t,e){return this.splice(e,0,t)}insertSplittableListAtIndex(t,e){return this.splice(e,0,...t.objects)}insertSplittableListAtPosition(t,e){const[n,i]=this.splitObjectAtPosition(e);return new this.constructor(n).insertSplittableListAtIndex(t,i)}editObjectAtIndex(t,e){return this.replaceObjectAtIndex(e(this.objects[t]),t)}replaceObjectAtIndex(t,e){return this.splice(e,1,t)}removeObjectAtIndex(t){return this.splice(t,1)}getObjectAtIndex(t){return this.objects[t]}getSplittableListInRange(t){const[e,n,i]=this.splitObjectsAtRange(t);return new this.constructor(e.slice(n,i+1))}selectSplittableList(t){const e=this.objects.filter(e=>t(e));return new this.constructor(e)}removeObjectsInRange(t){const[e,n,i]=this.splitObjectsAtRange(t);return new this.constructor(e).splice(n,i-n+1)}transformObjectsInRange(t,e){const[n,i,r]=this.splitObjectsAtRange(t),o=n.map((t,n)=>i<=n&&n<=r?e(t):t);return new this.constructor(o)}splitObjectsAtRange(t){let e,[n,i,r]=this.splitObjectAtPosition(gi(t));return[n,e]=new this.constructor(n).splitObjectAtPosition(fi(t)+r),[n,i,e-1]}getObjectAtPosition(t){const{index:e}=this.findIndexAndOffsetAtPosition(t);return this.objects[e]}splitObjectAtPosition(t){let e,n;const{index:i,offset:r}=this.findIndexAndOffsetAtPosition(t),o=this.objects.slice(0);if(null!=i)if(0===r)e=i,n=0;else{const t=this.getObjectAtIndex(i),[s,a]=t.splitAtOffset(r);o.splice(i,1,s,a),e=i+1,n=s.getLength()-r}else e=o.length,n=0;return[o,e,n]}consolidate(){const t=[];let e=this.objects[0];return this.objects.slice(1).forEach(n=>{var i,r;null!==(i=(r=e).canBeConsolidatedWith)&&void 0!==i&&i.call(r,n)?e=e.consolidateWith(n):(t.push(e),e=n)}),e&&t.push(e),new this.constructor(t)}consolidateFromIndexToIndex(t,e){const n=this.objects.slice(0).slice(t,e+1),i=new this.constructor(n).consolidate().toArray();return this.splice(t,n.length,...i)}findIndexAndOffsetAtPosition(t){let e,n=0;for(e=0;e<this.objects.length;e++){const i=n+this.objects[e].getLength();if(n<=t&&t<i)return{index:e,offset:t-n};n=i}return{index:null,offset:null}}findPositionAtIndexAndOffset(t,e){let n=0;for(let i=0;i<this.objects.length;i++){const r=this.objects[i];if(i<t)n+=r.getLength();else if(i===t){n+=e;break}}return n}getEndPosition(){return null==this.endPosition&&(this.endPosition=0,this.objects.forEach(t=>this.endPosition+=t.getLength())),this.endPosition}toString(){return this.objects.join("")}toArray(){return this.objects.slice(0)}toJSON(){return this.toArray()}isEqualTo(t){return super.isEqualTo(...arguments)||pi(this.objects,null==t?void 0:t.objects)}contentsForInspection(){return{objects:"[".concat(this.objects.map(t=>t.inspect()).join(", "),"]")}}}const pi=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(t.length!==e.length)return!1;let n=!0;for(let i=0;i<t.length;i++){const r=t[i];n&&!r.isEqualTo(e[i])&&(n=!1)}return n},gi=t=>t[0],fi=t=>t[1];class vi extends Dt{static textForAttachmentWithAttributes(t,e){return new this([new di(t,e)])}static textForStringWithAttributes(t,e){return new this([new hi(t,e)])}static fromJSON(t){return new this(Array.from(t).map(t=>li.fromJSON(t)))}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];super(...arguments);const e=t.filter(t=>!t.isEmpty());this.pieceList=new mi(e)}copy(){return this.copyWithPieceList(this.pieceList)}copyWithPieceList(t){return new this.constructor(t.consolidate().toArray())}copyUsingObjectMap(t){const e=this.getPieces().map(e=>t.find(e)||e);return new this.constructor(e)}appendText(t){return this.insertTextAtPosition(t,this.getLength())}insertTextAtPosition(t,e){return this.copyWithPieceList(this.pieceList.insertSplittableListAtPosition(t.pieceList,e))}removeTextAtRange(t){return this.copyWithPieceList(this.pieceList.removeObjectsInRange(t))}replaceTextAtRange(t,e){return this.removeTextAtRange(e).insertTextAtPosition(t,e[0])}moveTextFromRangeToPosition(t,e){if(t[0]<=e&&e<=t[1])return;const n=this.getTextAtRange(t),i=n.getLength();return t[0]<e&&(e-=i),this.removeTextAtRange(t).insertTextAtPosition(n,e)}addAttributeAtRange(t,e,n){const i={};return i[t]=e,this.addAttributesAtRange(i,n)}addAttributesAtRange(t,e){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e,e=>e.copyWithAdditionalAttributes(t)))}removeAttributeAtRange(t,e){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e,e=>e.copyWithoutAttribute(t)))}setAttributesAtRange(t,e){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e,e=>e.copyWithAttributes(t)))}getAttributesAtPosition(t){var e;return(null===(e=this.pieceList.getObjectAtPosition(t))||void 0===e?void 0:e.getAttributes())||{}}getCommonAttributes(){const t=Array.from(this.pieceList.toArray()).map(t=>t.getAttributes());return ge.fromCommonAttributesOfObjects(t).toObject()}getCommonAttributesAtRange(t){return this.getTextAtRange(t).getCommonAttributes()||{}}getExpandedRangeForAttributeAtOffset(t,e){let n,i=n=e;const r=this.getLength();for(;i>0&&this.getCommonAttributesAtRange([i-1,n])[t];)i--;for(;n<r&&this.getCommonAttributesAtRange([e,n+1])[t];)n++;return[i,n]}getTextAtRange(t){return this.copyWithPieceList(this.pieceList.getSplittableListInRange(t))}getStringAtRange(t){return this.pieceList.getSplittableListInRange(t).toString()}getStringAtPosition(t){return this.getStringAtRange([t,t+1])}startsWithString(t){return this.getStringAtRange([0,t.length])===t}endsWithString(t){const e=this.getLength();return this.getStringAtRange([e-t.length,e])===t}getAttachmentPieces(){return this.pieceList.toArray().filter(t=>!!t.attachment)}getAttachments(){return this.getAttachmentPieces().map(t=>t.attachment)}getAttachmentAndPositionById(t){let e=0;for(const i of this.pieceList.toArray()){var n;if((null===(n=i.attachment)||void 0===n?void 0:n.id)===t)return{attachment:i.attachment,position:e};e+=i.length}return{attachment:null,position:null}}getAttachmentById(t){const{attachment:e}=this.getAttachmentAndPositionById(t);return e}getRangeOfAttachment(t){const e=this.getAttachmentAndPositionById(t.id),n=e.position;if(t=e.attachment)return[n,n+1]}updateAttributesForAttachment(t,e){const n=this.getRangeOfAttachment(e);return n?this.addAttributesAtRange(t,n):this}getLength(){return this.pieceList.getEndPosition()}isEmpty(){return 0===this.getLength()}isEqualTo(t){var e;return super.isEqualTo(t)||(null==t||null===(e=t.pieceList)||void 0===e?void 0:e.isEqualTo(this.pieceList))}isBlockBreak(){return 1===this.getLength()&&this.pieceList.getObjectAtIndex(0).isBlockBreak()}eachPiece(t){return this.pieceList.eachObject(t)}getPieces(){return this.pieceList.toArray()}getPieceAtPosition(t){return this.pieceList.getObjectAtPosition(t)}contentsForInspection(){return{pieceList:this.pieceList.inspect()}}toSerializableText(){const t=this.pieceList.selectSplittableList(t=>t.isSerializable());return this.copyWithPieceList(t)}toString(){return this.pieceList.toString()}toJSON(){return this.pieceList.toJSON()}toConsole(){return JSON.stringify(this.pieceList.toArray().map(t=>JSON.parse(t.toConsole())))}getDirection(){return Nt(this.toString())}isRTL(){return"rtl"===this.getDirection()}}class bi extends Dt{static fromJSON(t){return new this(vi.fromJSON(t.text),t.attributes,t.htmlAttributes)}constructor(t,e,n){super(...arguments),this.text=yi(t||new vi),this.attributes=e||[],this.htmlAttributes=n||{}}isEmpty(){return this.text.isBlockBreak()}isEqualTo(t){return!!super.isEqualTo(t)||this.text.isEqualTo(null==t?void 0:t.text)&&Tt(this.attributes,null==t?void 0:t.attributes)&&Xt(this.htmlAttributes,null==t?void 0:t.htmlAttributes)}copyWithText(t){return new bi(t,this.attributes,this.htmlAttributes)}copyWithoutText(){return this.copyWithText(null)}copyWithAttributes(t){return new bi(this.text,t,this.htmlAttributes)}copyWithoutAttributes(){return this.copyWithAttributes(null)}copyUsingObjectMap(t){const e=t.find(this.text);return e?this.copyWithText(e):this.copyWithText(this.text.copyUsingObjectMap(t))}addAttribute(t){const e=this.attributes.concat(Ei(t));return this.copyWithAttributes(e)}addHTMLAttribute(t,e){const n=Object.assign({},this.htmlAttributes,{[t]:e});return new bi(this.text,this.attributes,n)}removeAttribute(t){const{listAttribute:e}=_t(t),n=Fi(Fi(this.attributes,t),e);return this.copyWithAttributes(n)}removeLastAttribute(){return this.removeAttribute(this.getLastAttribute())}getLastAttribute(){return Si(this.attributes)}getAttributes(){return this.attributes.slice(0)}getAttributeLevel(){return this.attributes.length}getAttributeAtLevel(t){return this.attributes[t-1]}hasAttribute(t){return this.attributes.includes(t)}hasAttributes(){return this.getAttributeLevel()>0}getLastNestableAttribute(){return Si(this.getNestableAttributes())}getNestableAttributes(){return this.attributes.filter(t=>_t(t).nestable)}getNestingLevel(){return this.getNestableAttributes().length}decreaseNestingLevel(){const t=this.getLastNestableAttribute();return t?this.removeAttribute(t):this}increaseNestingLevel(){const t=this.getLastNestableAttribute();if(t){const e=this.attributes.lastIndexOf(t),n=Bt(this.attributes,e+1,0,...Ei(t));return this.copyWithAttributes(n)}return this}getListItemAttributes(){return this.attributes.filter(t=>_t(t).listAttribute)}isListItem(){var t;return null===(t=_t(this.getLastAttribute()))||void 0===t?void 0:t.listAttribute}isTerminalBlock(){var t;return null===(t=_t(this.getLastAttribute()))||void 0===t?void 0:t.terminal}breaksOnReturn(){var t;return null===(t=_t(this.getLastAttribute()))||void 0===t?void 0:t.breakOnReturn}findLineBreakInDirectionFromPosition(t,e){const n=this.toString();let i;switch(t){case"forward":i=n.indexOf("\n",e);break;case"backward":i=n.slice(0,e).lastIndexOf("\n")}if(-1!==i)return i}contentsForInspection(){return{text:this.text.inspect(),attributes:this.attributes}}toString(){return this.text.toString()}toJSON(){return{text:this.text,attributes:this.attributes,htmlAttributes:this.htmlAttributes}}getDirection(){return this.text.getDirection()}isRTL(){return this.text.isRTL()}getLength(){return this.text.getLength()}canBeConsolidatedWith(t){return!this.hasAttributes()&&!t.hasAttributes()&&this.getDirection()===t.getDirection()}consolidateWith(t){const e=vi.textForStringWithAttributes("\n"),n=this.getTextWithoutBlockBreak().appendText(e);return this.copyWithText(n.appendText(t.text))}splitAtOffset(t){let e,n;return 0===t?(e=null,n=this):t===this.getLength()?(e=this,n=null):(e=this.copyWithText(this.text.getTextAtRange([0,t])),n=this.copyWithText(this.text.getTextAtRange([t,this.getLength()]))),[e,n]}getBlockBreakPosition(){return this.text.getLength()-1}getTextWithoutBlockBreak(){return ki(this.text)?this.text.getTextAtRange([0,this.getBlockBreakPosition()]):this.text.copy()}canBeGrouped(t){return this.attributes[t]}canBeGroupedWith(t,e){const n=t.getAttributes(),i=n[e],r=this.attributes[e];return r===i&&!(!1===_t(r).group&&!(()=>{if(!Pt){Pt=[];for(const t in S){const{listAttribute:e}=S[t];null!=e&&Pt.push(e)}}return Pt})().includes(n[e+1]))&&(this.getDirection()===t.getDirection()||t.isEmpty())}}const yi=function(t){return t=Ai(t),wi(t)},Ai=function(t){let e=!1;const n=t.getPieces();let i=n.slice(0,n.length-1);const r=n[n.length-1];return r?(i=i.map(t=>t.isBlockBreak()?(e=!0,Ci(t)):t),e?new vi([...i,r]):t):t},xi=vi.textForStringWithAttributes("\n",{blockBreak:!0}),wi=function(t){return ki(t)?t:t.appendText(xi)},ki=function(t){const e=t.getLength();return 0!==e&&t.getTextAtRange([e-1,e]).isBlockBreak()},Ci=t=>t.copyWithoutAttribute("blockBreak"),Ei=function(t){const{listAttribute:e}=_t(t);return e?[e,t]:[t]},Si=t=>t.slice(-1)[0],Fi=function(t,e){const n=t.lastIndexOf(e);return-1===n?t:Bt(t,n,1)};class Di extends Dt{static fromJSON(t){return new this(Array.from(t).map(t=>bi.fromJSON(t)))}static fromString(t,e){const n=vi.textForStringWithAttributes(t,e);return new this([new bi(n)])}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];super(...arguments),0===t.length&&(t=[new bi]),this.blockList=mi.box(t)}isEmpty(){const t=this.getBlockAtIndex(0);return 1===this.blockList.length&&t.isEmpty()&&!t.hasAttributes()}copy(){const t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).consolidateBlocks?this.blockList.consolidate().toArray():this.blockList.toArray();return new this.constructor(t)}copyUsingObjectsFromDocument(t){const e=new we(t.getObjects());return this.copyUsingObjectMap(e)}copyUsingObjectMap(t){const e=this.getBlocks().map(e=>t.find(e)||e.copyUsingObjectMap(t));return new this.constructor(e)}copyWithBaseBlockAttributes(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const e=this.getBlocks().map(e=>{const n=t.concat(e.getAttributes());return e.copyWithAttributes(n)});return new this.constructor(e)}replaceBlock(t,e){const n=this.blockList.indexOf(t);return-1===n?this:new this.constructor(this.blockList.replaceObjectAtIndex(e,n))}insertDocumentAtRange(t,e){const{blockList:n}=t;e=Qt(e);let[i]=e;const{index:r,offset:o}=this.locationFromPosition(i);let s=this;const a=this.getBlockAtPosition(i);return Zt(e)&&a.isEmpty()&&!a.hasAttributes()?s=new this.constructor(s.blockList.removeObjectAtIndex(r)):a.getBlockBreakPosition()===o&&i++,s=s.removeTextAtRange(e),new this.constructor(s.blockList.insertSplittableListAtPosition(n,i))}mergeDocumentAtRange(t,e){let n,i;e=Qt(e);const[r]=e,o=this.locationFromPosition(r),s=this.getBlockAtIndex(o.index).getAttributes(),a=t.getBaseBlockAttributes(),l=s.slice(-a.length);if(Tt(a,l)){const e=s.slice(0,-a.length);n=t.copyWithBaseBlockAttributes(e)}else n=t.copy({consolidateBlocks:!0}).copyWithBaseBlockAttributes(s);const c=n.getBlockCount(),u=n.getBlockAtIndex(0);if(Tt(s,u.getAttributes())){const t=u.getTextWithoutBlockBreak();if(i=this.insertTextAtRange(t,e),c>1){n=new this.constructor(n.getBlocks().slice(1));const e=r+t.getLength();i=i.insertDocumentAtRange(n,e)}}else i=this.insertDocumentAtRange(n,e);return i}insertTextAtRange(t,e){e=Qt(e);const[n]=e,{index:i,offset:r}=this.locationFromPosition(n),o=this.removeTextAtRange(e);return new this.constructor(o.blockList.editObjectAtIndex(i,e=>e.copyWithText(e.text.insertTextAtPosition(t,r))))}removeTextAtRange(t){let e;t=Qt(t);const[n,i]=t;if(Zt(t))return this;const[r,o]=Array.from(this.locationRangeFromRange(t)),s=r.index,a=r.offset,l=this.getBlockAtIndex(s),c=o.index,u=o.offset,d=this.getBlockAtIndex(c);if(i-n==1&&l.getBlockBreakPosition()===a&&d.getBlockBreakPosition()!==u&&"\n"===d.text.getStringAtPosition(u))e=this.blockList.editObjectAtIndex(c,t=>t.copyWithText(t.text.removeTextAtRange([u,u+1])));else{let t;const n=l.text.getTextAtRange([0,a]),i=d.text.getTextAtRange([u,d.getLength()]),r=n.appendText(i);t=s!==c&&0===a&&l.getAttributeLevel()>=d.getAttributeLevel()?d.copyWithText(r):l.copyWithText(r);const o=c+1-s;e=this.blockList.splice(s,o,t)}return new this.constructor(e)}moveTextFromRangeToPosition(t,e){let n;t=Qt(t);const[i,r]=t;if(i<=e&&e<=r)return this;let o=this.getDocumentAtRange(t),s=this.removeTextAtRange(t);const a=i<e;a&&(e-=o.getLength());const[l,...c]=o.getBlocks();return 0===c.length?(n=l.getTextWithoutBlockBreak(),a&&(e+=1)):n=l.text,s=s.insertTextAtRange(n,e),0===c.length?s:(o=new this.constructor(c),e+=n.getLength(),s.insertDocumentAtRange(o,e))}
2addAttributeAtRange(t,e,n){let{blockList:i}=this;return this.eachBlockAtRange(n,(n,r,o)=>i=i.editObjectAtIndex(o,function(){return _t(t)?n.addAttribute(t,e):r[0]===r[1]?n:n.copyWithText(n.text.addAttributeAtRange(t,e,r))})),new this.constructor(i)}addAttribute(t,e){let{blockList:n}=this;return this.eachBlock((i,r)=>n=n.editObjectAtIndex(r,()=>i.addAttribute(t,e))),new this.constructor(n)}removeAttributeAtRange(t,e){let{blockList:n}=this;return this.eachBlockAtRange(e,function(e,i,r){_t(t)?n=n.editObjectAtIndex(r,()=>e.removeAttribute(t)):i[0]!==i[1]&&(n=n.editObjectAtIndex(r,()=>e.copyWithText(e.text.removeAttributeAtRange(t,i))))}),new this.constructor(n)}updateAttributesForAttachment(t,e){const n=this.getRangeOfAttachment(e),[i]=Array.from(n),{index:r}=this.locationFromPosition(i),o=this.getTextAtIndex(r);return new this.constructor(this.blockList.editObjectAtIndex(r,n=>n.copyWithText(o.updateAttributesForAttachment(t,e))))}removeAttributeForAttachment(t,e){const n=this.getRangeOfAttachment(e);return this.removeAttributeAtRange(t,n)}setHTMLAttributeAtPosition(t,e,n){const i=this.getBlockAtPosition(t),r=i.addHTMLAttribute(e,n);return this.replaceBlock(i,r)}insertBlockBreakAtRange(t){let e;t=Qt(t);const[n]=t,{offset:i}=this.locationFromPosition(n),r=this.removeTextAtRange(t);return 0===i&&(e=[new bi]),new this.constructor(r.blockList.insertSplittableListAtPosition(new mi(e),n))}applyBlockAttributeAtRange(t,e,n){const i=this.expandRangeToLineBreaksAndSplitBlocks(n);let r=i.document;n=i.range;const o=_t(t);if(o.listAttribute){r=r.removeLastListAttributeAtRange(n,{exceptAttributeName:t});const e=r.convertLineBreaksToBlockBreaksInRange(n);r=e.document,n=e.range}else r=o.exclusive?r.removeBlockAttributesAtRange(n):o.terminal?r.removeLastTerminalAttributeAtRange(n):r.consolidateBlocksAtRange(n);return r.addAttributeAtRange(t,e,n)}removeLastListAttributeAtRange(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{blockList:n}=this;return this.eachBlockAtRange(t,function(t,i,r){const o=t.getLastAttribute();o&&_t(o).listAttribute&&o!==e.exceptAttributeName&&(n=n.editObjectAtIndex(r,()=>t.removeAttribute(o)))}),new this.constructor(n)}removeLastTerminalAttributeAtRange(t){let{blockList:e}=this;return this.eachBlockAtRange(t,function(t,n,i){const r=t.getLastAttribute();r&&_t(r).terminal&&(e=e.editObjectAtIndex(i,()=>t.removeAttribute(r)))}),new this.constructor(e)}removeBlockAttributesAtRange(t){let{blockList:e}=this;return this.eachBlockAtRange(t,function(t,n,i){t.hasAttributes()&&(e=e.editObjectAtIndex(i,()=>t.copyWithoutAttributes()))}),new this.constructor(e)}expandRangeToLineBreaksAndSplitBlocks(t){let e;t=Qt(t);let[n,i]=t;const r=this.locationFromPosition(n),o=this.locationFromPosition(i);let s=this;const a=s.getBlockAtIndex(r.index);if(r.offset=a.findLineBreakInDirectionFromPosition("backward",r.offset),null!=r.offset&&(e=s.positionFromLocation(r),s=s.insertBlockBreakAtRange([e,e+1]),o.index+=1,o.offset-=s.getBlockAtIndex(r.index).getLength(),r.index+=1),r.offset=0,0===o.offset&&o.index>r.index)o.index-=1,o.offset=s.getBlockAtIndex(o.index).getBlockBreakPosition();else{const t=s.getBlockAtIndex(o.index);"\n"===t.text.getStringAtRange([o.offset-1,o.offset])?o.offset-=1:o.offset=t.findLineBreakInDirectionFromPosition("forward",o.offset),o.offset!==t.getBlockBreakPosition()&&(e=s.positionFromLocation(o),s=s.insertBlockBreakAtRange([e,e+1]))}return n=s.positionFromLocation(r),i=s.positionFromLocation(o),{document:s,range:t=Qt([n,i])}}
vendor: 48,254 bytes, line 2
2convertLineBreaksToBlockBreaksInRange(t){t=Qt(t);let[e]=t;const n=this.getStringAtRange(t).slice(0,-1);let i=this;return n.replace(/.*?\n/g,function(t){e+=t.length,i=i.insertBlockBreakAtRange([e-1,e])}),{document:i,range:t}}consolidateBlocksAtRange(t){t=Qt(t);const[e,n]=t,i=this.locationFromPosition(e).index,r=this.locationFromPosition(n).index;return new this.constructor(this.blockList.consolidateFromIndexToIndex(i,r))}getDocumentAtRange(t){t=Qt(t);const e=this.blockList.getSplittableListInRange(t).toArray();return new this.constructor(e)}getStringAtRange(t){let e;const n=t=Qt(t);return n[n.length-1]!==this.getLength()&&(e=-1),this.getDocumentAtRange(t).toString().slice(0,e)}getBlockAtIndex(t){return this.blockList.getObjectAtIndex(t)}getBlockAtPosition(t){const{index:e}=this.locationFromPosition(t);return this.getBlockAtIndex(e)}getTextAtIndex(t){var e;return null===(e=this.getBlockAtIndex(t))||void 0===e?void 0:e.text}getTextAtPosition(t){const{index:e}=this.locationFromPosition(t);return this.getTextAtIndex(e)}getPieceAtPosition(t){const{index:e,offset:n}=this.locationFromPosition(t);return this.getTextAtIndex(e).getPieceAtPosition(n)}getCharacterAtPosition(t){const{index:e,offset:n}=this.locationFromPosition(t);return this.getTextAtIndex(e).getStringAtRange([n,n+1])}getLength(){return this.blockList.getEndPosition()}getBlocks(){return this.blockList.toArray()}getBlockCount(){return this.blockList.length}getEditCount(){return this.editCount}eachBlock(t){return this.blockList.eachObject(t)}eachBlockAtRange(t,e){let n,i;t=Qt(t);const[r,o]=t,s=this.locationFromPosition(r),a=this.locationFromPosition(o);if(s.index===a.index)return n=this.getBlockAtIndex(s.index),i=[s.offset,a.offset],e(n,i,s.index);for(let t=s.index;t<=a.index;t++)if(n=this.getBlockAtIndex(t),n){switch(t){case s.index:i=[s.offset,n.text.getLength()];break;case a.index:i=[0,a.offset];break;default:i=[0,n.text.getLength()]}e(n,i,t)}}getCommonAttributesAtRange(t){t=Qt(t);const[e]=t;if(Zt(t))return this.getCommonAttributesAtPosition(e);{const e=[],n=[];return this.eachBlockAtRange(t,function(t,i){if(i[0]!==i[1])return e.push(t.text.getCommonAttributesAtRange(i)),n.push(Ti(t))}),ge.fromCommonAttributesOfObjects(e).merge(ge.fromCommonAttributesOfObjects(n)).toObject()}}getCommonAttributesAtPosition(t){let e,n;const{index:i,offset:r}=this.locationFromPosition(t),o=this.getBlockAtIndex(i);if(!o)return{};const s=Ti(o),a=o.text.getAttributesAtPosition(r),l=o.text.getAttributesAtPosition(r-1),c=Object.keys(ut).filter(t=>ut[t].inheritable);for(e in l)n=l[e],(n===a[e]||c.includes(e))&&(s[e]=n);return s}getRangeOfCommonAttributeAtPosition(t,e){const{index:n,offset:i}=this.locationFromPosition(e),r=this.getTextAtIndex(n),[o,s]=Array.from(r.getExpandedRangeForAttributeAtOffset(t,i)),a=this.positionFromLocation({index:n,offset:o}),l=this.positionFromLocation({index:n,offset:s});return Qt([a,l])}getBaseBlockAttributes(){let t=this.getBlockAtIndex(0).getAttributes();for(let e=1;e<this.getBlockCount();e++){const n=this.getBlockAtIndex(e).getAttributes(),i=Math.min(t.length,n.length);t=(()=>{const e=[];for(let r=0;r<i&&n[r]===t[r];r++)e.push(n[r]);return e})()}return t}getAttachmentById(t){for(const e of this.getAttachments())if(e.id===t)return e}getAttachmentPieces(){let t=[];return this.blockList.eachObject(e=>{let{text:n}=e;return t=t.concat(n.getAttachmentPieces())}),t}getAttachments(){return this.getAttachmentPieces().map(t=>t.attachment)}getRangeOfAttachment(t){let e=0;const n=this.blockList.toArray();for(let i=0;i<n.length;i++){const{text:r}=n[i],o=r.getRangeOfAttachment(t);if(o)return Qt([e+o[0],e+o[1]]);e+=r.getLength()}}getLocationRangeOfAttachment(t){const e=this.getRangeOfAttachment(t);return this.locationRangeFromRange(e)}getAttachmentPieceForAttachment(t){for(const e of this.getAttachmentPieces())if(e.attachment===t)return e}findRangesForBlockAttribute(t){let e=0;const n=[];return this.getBlocks().forEach(i=>{const r=i.getLength();i.hasAttribute(t)&&n.push([e,e+r]),e+=r}),n}findRangesForTextAttribute(t){let{withValue:e}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=0,i=[];const r=[];return this.getPieces().forEach(o=>{const s=o.getLength();(function(n){return e?n.getAttribute(t)===e:n.hasAttribute(t)})(o)&&(i[1]===n?i[1]=n+s:r.push(i=[n,n+s])),n+=s}),r}locationFromPosition(t){const e=this.blockList.findIndexAndOffsetAtPosition(Math.max(0,t));if(null!=e.index)return e;{const t=this.getBlocks();return{index:t.length-1,offset:t[t.length-1].getLength()}}}positionFromLocation(t){return this.blockList.findPositionAtIndexAndOffset(t.index,t.offset)}locationRangeFromPosition(t){return Qt(this.locationFromPosition(t))}locationRangeFromRange(t){if(!(t=Qt(t)))return;const[e,n]=Array.from(t),i=this.locationFromPosition(e),r=this.locationFromPosition(n);return Qt([i,r])}rangeFromLocationRange(t){let e;t=Qt(t);const n=this.positionFromLocation(t[0]);return Zt(t)||(e=this.positionFromLocation(t[1])),Qt([n,e])}isEqualTo(t){return this.blockList.isEqualTo(null==t?void 0:t.blockList)}getTexts(){return this.getBlocks().map(t=>t.text)}getPieces(){const t=[];return Array.from(this.getTexts()).forEach(e=>{t.push(...Array.from(e.getPieces()||[]))}),t}getObjects(){return this.getBlocks().concat(this.getTexts()).concat(this.getPieces())}toSerializableDocument(){const t=[];return this.blockList.eachObject(e=>t.push(e.copyWithText(e.text.toSerializableText()))),new this.constructor(t)}toString(){return this.blockList.toString()}toJSON(){return this.blockList.toJSON()}toConsole(){return JSON.stringify(this.blockList.toArray().map(t=>JSON.parse(t.text.toConsole())))}}const Ti=function(t){const e={},n=t.getLastAttribute();return n&&(e[n]=!0),e},Bi=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{string:t=ue(t),attributes:e,type:"string"}},Ri=(t,e)=>{try{return JSON.parse(t.getAttribute("data-trix-".concat(e)))}catch(t){return{}}};class Ni extends pt{static parse(t,e){const n=new this(t,e);return n.parse(),n}constructor(t){let{referenceElement:e,purifyOptions:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(...arguments),this.html=t,this.referenceElement=e,this.purifyOptions=n,this.blocks=[],this.blockElements=[],this.processedElements=[]}getDocument(){return Di.fromJSON(this.blocks)}parse(){try{this.createHiddenContainer(),In.setHTML(this.containerElement,this.html,{purifyOptions:this.purifyOptions});const t=Y(this.containerElement,{usingFilter:Pi});for(;t.nextNode();)this.processNode(t.currentNode);return this.translateBlockElementMarginsToNewlines()}finally{this.removeHiddenContainer()}}createHiddenContainer(){return this.referenceElement?(this.containerElement=this.referenceElement.cloneNode(!1),this.containerElement.removeAttribute("id"),this.containerElement.setAttribute("data-trix-internal",""),this.containerElement.style.display="none",this.referenceElement.parentNode.insertBefore(this.containerElement,this.referenceElement.nextSibling)):(this.containerElement=X({tagName:"div",style:{display:"none"}}),document.body.appendChild(this.containerElement))}removeHiddenContainer(){return K(this.containerElement)}processNode(t){switch(t.nodeType){case Node.TEXT_NODE:if(!this.isInsignificantTextNode(t))return this.appendBlockForTextNode(t),this.processTextNode(t);break;case Node.ELEMENT_NODE:return this.appendBlockForElement(t),this.processElement(t)}}appendBlockForTextNode(t){const e=t.parentNode;if(e===this.currentBlockElement&&this.isBlockElement(t.previousSibling))return this.appendStringWithAttributes("\n");if(e===this.containerElement||this.isBlockElement(e)){var n;const t=this.getBlockAttributes(e),i=this.getBlockHTMLAttributes(e);Tt(t,null===(n=this.currentBlock)||void 0===n?void 0:n.attributes)||(this.currentBlock=this.appendBlockForAttributesWithElement(t,e,i),this.currentBlockElement=e)}}appendBlockForElement(t){const e=this.isBlockElement(t),n=$(this.currentBlockElement,t);if(e&&!this.isBlockElement(t.firstChild)){if(!this.isInsignificantTextNode(t.firstChild)||!this.isBlockElement(t.firstElementChild)){const e=this.getBlockAttributes(t),i=this.getBlockHTMLAttributes(t);if(t.firstChild){if(n&&Tt(e,this.currentBlock.attributes))return this.appendStringWithAttributes("\n");this.currentBlock=this.appendBlockForAttributesWithElement(e,t,i),this.currentBlockElement=t}}}else if(this.currentBlockElement&&!n&&!e){const e=this.findParentBlockElement(t);if(e)return this.appendBlockForElement(e);this.currentBlock=this.appendEmptyBlock(),this.currentBlockElement=null}}findParentBlockElement(t){let{parentElement:e}=t;for(;e&&e!==this.containerElement;){if(this.isBlockElement(e)&&this.blockElements.includes(e))return e;e=e.parentElement}return null}processTextNode(t){let e=t.data;var n;return Li(t.parentNode)||(e=he(e),zi(null===(n=t.previousSibling)||void 0===n?void 0:n.textContent)&&(e=Ii(e))),this.appendStringWithAttributes(e,this.getTextAttributes(t.parentNode))}processElement(t){let e;if(ot(t)){if(e=Ri(t,"attachment"),Object.keys(e).length){const n=this.getTextAttributes(t);this.appendAttachmentWithAttributes(e,n),t.innerHTML=""}return this.processedElements.push(t)}switch(J(t)){case"br":return this.isExtraBR(t)||this.isBlockElement(t.nextSibling)||this.appendStringWithAttributes("\n",this.getTextAttributes(t)),this.processedElements.push(t);case"img":e={url:t.getAttribute("src"),contentType:"image"};const n=(t=>{const e=t.getAttribute("width"),n=t.getAttribute("height"),i={};return e&&(i.width=parseInt(e,10)),n&&(i.height=parseInt(n,10)),i})(t);for(const t in n){const i=n[t];e[t]=i}return this.appendAttachmentWithAttributes(e,this.getTextAttributes(t)),this.processedElements.push(t);case"tr":if(this.needsTableSeparator(t))return this.appendStringWithAttributes(ct.tableRowSeparator);break;case"td":if(this.needsTableSeparator(t))return this.appendStringWithAttributes(ct.tableCellSeparator)}}appendBlockForAttributesWithElement(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.blockElements.push(e);const i=function(){return{text:[],attributes:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},htmlAttributes:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}}}(t,n);return this.blocks.push(i),i}appendEmptyBlock(){return this.appendBlockForAttributesWithElement([],null)}appendStringWithAttributes(t,e){return this.appendPiece(Bi(t,e))}appendAttachmentWithAttributes(t,e){return this.appendPiece(function(t){return{attachment:t,attributes:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},type:"attachment"}}(t,e))}appendPiece(t){return 0===this.blocks.length&&this.appendEmptyBlock(),this.blocks[this.blocks.length-1].text.push(t)}appendStringToTextAtIndex(t,e){const{text:n}=this.blocks[e],i=n[n.length-1];if("string"!==(null==i?void 0:i.type))return n.push(Bi(t));i.string+=t}prependStringToTextAtIndex(t,e){const{text:n}=this.blocks[e],i=n[0];if("string"!==(null==i?void 0:i.type))return n.unshift(Bi(t));i.string=t+i.string}getTextAttributes(t){let e;const n={};for(const i in ut){const r=ut[i];if(r.tagName&&W(t,{matchingSelector:r.tagName,untilNode:this.containerElement}))n[i]=!0;else if(r.parser){if(e=r.parser(t),e){let o=!1;for(const n of this.findBlockElementAncestors(t))if(r.parser(n)===e){o=!0;break}o||(n[i]=e)}}else r.styleProperty&&(e=t.style[r.styleProperty],e&&(n[i]=e))}if(ot(t)){const i=Ri(t,"attributes");for(const t in i)e=i[t],n[t]=e}return n}getBlockAttributes(t){const e=[];for(;t&&t!==this.containerElement;){for(const i in S){const r=S[i];var n;!1!==r.parse&&J(t)===r.tagName&&(null!==(n=r.test)&&void 0!==n&&n.call(r,t)||!r.test)&&(e.push(i),r.listAttribute&&e.push(r.listAttribute))}t=t.parentNode}return e.reverse()}getBlockHTMLAttributes(t){const e={},n=Object.values(S).find(e=>e.tagName===J(t));return((null==n?void 0:n.htmlAttributes)||[]).forEach(n=>{t.hasAttribute(n)&&(e[n]=t.getAttribute(n))}),e}findBlockElementAncestors(t){const e=[];for(;t&&t!==this.containerElement;){const n=J(t);Z().includes(n)&&e.push(t),t=t.parentNode}return e}isBlockElement(t){if((null==t?void 0:t.nodeType)===Node.ELEMENT_NODE&&!ot(t)&&!W(t,{matchingSelector:"td",untilNode:this.containerElement}))return Z().includes(J(t))||"block"===window.getComputedStyle(t).display}isInsignificantTextNode(t){if((null==t?void 0:t.nodeType)!==Node.TEXT_NODE)return;if(!_i(t.data))return;const{parentNode:e,previousSibling:n,nextSibling:i}=t;return Oi(e.previousSibling)&&!this.isBlockElement(e.previousSibling)||Li(e)?void 0:!n||this.isBlockElement(n)||!i||this.isBlockElement(i)}isExtraBR(t){return"br"===J(t)&&this.isBlockElement(t.parentNode)&&t.parentNode.lastChild===t}needsTableSeparator(t){if(ct.removeBlankTableCells){var e;const n=null===(e=t.previousSibling)||void 0===e?void 0:e.textContent;return n&&/\S/.test(n)}return t.previousSibling}translateBlockElementMarginsToNewlines(){const t=this.getMarginOfDefaultBlockElement();for(let e=0;e<this.blocks.length;e++){const n=this.getMarginOfBlockElementAtIndex(e);n&&(n.top>2*t.top&&this.prependStringToTextAtIndex("\n",e),n.bottom>2*t.bottom&&this.appendStringToTextAtIndex("\n",e))}}getMarginOfBlockElementAtIndex(t){const e=this.blockElements[t];if(e&&e.textContent&&!Z().includes(J(e))&&!this.processedElements.includes(e))return Mi(e)}getMarginOfDefaultBlockElement(){const t=X(S.default.tagName);return this.containerElement.appendChild(t),Mi(t)}}const Li=function(t){const{whiteSpace:e}=window.getComputedStyle(t);return["pre","pre-wrap","pre-line"].includes(e)},Oi=t=>t&&!zi(t.textContent),Mi=function(t){const e=window.getComputedStyle(t);if("block"===e.display)return{top:parseInt(e.marginTop),bottom:parseInt(e.marginBottom)}},Pi=function(t){return"style"===J(t)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},Ii=t=>t.replace(new RegExp("^".concat(de.source,"+")),""),_i=t=>new RegExp("^".concat(de.source,"*$")).test(t),zi=t=>/\s$/.test(t),Vi=["contenteditable","data-trix-id","data-trix-store-key","data-trix-mutable","data-trix-placeholder","tabindex"],ji="data-trix-serialized-attributes",Ui="[".concat(ji,"]"),qi=new RegExp("\x3c!--block--\x3e","g"),Wi={"application/json":function(t){let e;if(t instanceof Di)e=t;else{if(!(t instanceof HTMLElement))throw new Error("unserializable object");e=Ni.parse(t.innerHTML).getDocument()}return e.toSerializableDocument().toJSONString()},"text/html":function(t){let e;if(t instanceof Di)e=Yn.render(t);else{if(!(t instanceof HTMLElement))throw new Error("unserializable object");e=t.cloneNode(!0)}return Array.from(e.querySelectorAll("[data-trix-serialize=false]")).forEach(t=>{K(t)}),Vi.forEach(t=>{Array.from(e.querySelectorAll("[".concat(t,"]"))).forEach(e=>{e.removeAttribute(t)})}),Array.from(e.querySelectorAll(Ui)).forEach(t=>{try{const e=JSON.parse(t.getAttribute(ji));t.removeAttribute(ji);for(const n in e){const i=e[n];t.setAttribute(n,i)}}catch(t){}}),e.innerHTML.replace(qi,"")}};var Hi=Object.freeze({__proto__:null});class $i extends pt{constructor(t,e){super(...arguments),this.attachmentManager=t,this.attachment=e,this.id=this.attachment.id,this.file=this.attachment.file}remove(){return this.attachmentManager.requestRemovalOfAttachment(this.attachment)}}$i.proxyMethod("attachment.getAttribute"),$i.proxyMethod("attachment.hasAttribute"),$i.proxyMethod("attachment.setAttribute"),$i.proxyMethod("attachment.getAttributes"),$i.proxyMethod("attachment.setAttributes"),$i.proxyMethod("attachment.isPending"),$i.proxyMethod("attachment.isPreviewable"),$i.proxyMethod("attachment.getURL"),$i.proxyMethod("attachment.getPreviewURL"),$i.proxyMethod("attachment.setPreviewURL"),$i.proxyMethod("attachment.getHref"),$i.proxyMethod("attachment.getFilename"),$i.proxyMethod("attachment.getFilesize"),$i.proxyMethod("attachment.getFormattedFilesize"),$i.proxyMethod("attachment.getExtension"),$i.proxyMethod("attachment.getContentType"),$i.proxyMethod("attachment.getFile"),$i.proxyMethod("attachment.setFile"),$i.proxyMethod("attachment.releaseFile"),$i.proxyMethod("attachment.getUploadProgress"),$i.proxyMethod("attachment.setUploadProgress");class Gi extends pt{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];super(...arguments),this.managedAttachments={},Array.from(t).forEach(t=>{this.manageAttachment(t)})}getAttachments(){const t=[];for(const e in this.managedAttachments){const n=this.managedAttachments[e];t.push(n)}return t}manageAttachment(t){return this.managedAttachments[t.id]||(this.managedAttachments[t.id]=new $i(this,t)),this.managedAttachments[t.id]}attachmentIsManaged(t){return t.id in this.managedAttachments}requestRemovalOfAttachment(t){var e,n;if(this.attachmentIsManaged(t))return null===(e=this.delegate)||void 0===e||null===(n=e.attachmentManagerDidRequestRemovalOfAttachment)||void 0===n?void 0:n.call(e,t)}unmanageAttachment(t){const e=this.managedAttachments[t.id];return delete this.managedAttachments[t.id],e}}class Ki{constructor(t){this.composition=t,this.document=this.composition.document;const e=this.composition.getSelectedRange();this.startPosition=e[0],this.endPosition=e[1],this.startLocation=this.document.locationFromPosition(this.startPosition),this.endLocation=this.document.locationFromPosition(this.endPosition),this.block=this.document.getBlockAtIndex(this.endLocation.index),this.breaksOnReturn=this.block.breaksOnReturn(),this.previousCharacter=this.block.text.getStringAtPosition(this.endLocation.offset-1),this.nextCharacter=this.block.text.getStringAtPosition(this.endLocation.offset)}shouldInsertBlockBreak(){return this.block.hasAttributes()&&this.block.isListItem()&&!this.block.isEmpty()?0!==this.startLocation.offset:this.breaksOnReturn&&"\n"!==this.nextCharacter}shouldBreakFormattedBlock(){return this.block.hasAttributes()&&!this.block.isListItem()&&(this.breaksOnReturn&&"\n"===this.nextCharacter||"\n"===this.previousCharacter)}shouldDecreaseListLevel(){return this.block.hasAttributes()&&this.block.isListItem()&&this.block.isEmpty()}shouldPrependListItem(){return this.block.isListItem()&&0===this.startLocation.offset&&!this.block.isEmpty()}shouldRemoveLastBlockAttribute(){return this.block.hasAttributes()&&!this.block.isListItem()&&this.block.isEmpty()}}class Yi extends pt{constructor(){super(...arguments),this.document=new Di,this.attachments=[],this.currentAttributes={},this.revision=0}setDocument(t){var e,n;if(!t.isEqualTo(this.document))return this.document=t,this.refreshAttachments(),this.revision++,null===(e=this.delegate)||void 0===e||null===(n=e.compositionDidChangeDocument)||void 0===n?void 0:n.call(e,t)}getSnapshot(){return{document:this.document,selectedRange:this.getSelectedRange()}}loadSnapshot(t){var e,n,i,r;let{document:o,selectedRange:s}=t;return null===(e=this.delegate)||void 0===e||null===(n=e.compositionWillLoadSnapshot)||void 0===n||n.call(e),this.setDocument(null!=o?o:new Di),this.setSelection(null!=s?s:[0,0]),null===(i=this.delegate)||void 0===i||null===(r=i.compositionDidLoadSnapshot)||void 0===r?void 0:r.call(i)}insertText(t){let{updatePosition:e}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{updatePosition:!0};const n=this.getSelectedRange();this.setDocument(this.document.insertTextAtRange(t,n));const i=n[0],r=i+t.getLength();return e&&this.setSelection(r),this.notifyDelegateOfInsertionAtRange([i,r])}insertBlock(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new bi;const e=new Di([t]);return this.insertDocument(e)}insertDocument(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Di;const e=this.getSelectedRange();this.setDocument(this.document.insertDocumentAtRange(t,e));const n=e[0],i=n+t.getLength();return this.setSelection(i),this.notifyDelegateOfInsertionAtRange([n,i])}insertString(t,e){const n=this.getCurrentTextAttributes(),i=vi.textForStringWithAttributes(t,n);return this.insertText(i,e)}insertBlockBreak(){const t=this.getSelectedRange();this.setDocument(this.document.insertBlockBreakAtRange(t));const e=t[0],n=e+1;return this.setSelection(n),this.notifyDelegateOfInsertionAtRange([e,n])}insertLineBreak(){const t=new Ki(this);if(t.shouldDecreaseListLevel())return this.decreaseListLevel(),this.setSelection(t.startPosition);if(t.shouldPrependListItem()){const e=new Di([t.block.copyWithoutText()]);return this.insertDocument(e)}return t.shouldInsertBlockBreak()?this.insertBlockBreak():t.shouldRemoveLastBlockAttribute()?this.removeLastBlockAttribute():t.shouldBreakFormattedBlock()?this.breakFormattedBlock(t):this.insertString("\n")}insertHTML(t){const e=Ni.parse(t,{purifyOptions:{SAFE_FOR_XML:!0}}).getDocument(),n=this.getSelectedRange();this.setDocument(this.document.mergeDocumentAtRange(e,n));const i=n[0],r=i+e.getLength()-1;return this.setSelection(r),this.notifyDelegateOfInsertionAtRange([i,r])}replaceHTML(t){const e=Ni.parse(t).getDocument().copyUsingObjectsFromDocument(this.document),n=this.getLocationRange({strict:!1}),i=this.document.rangeFromLocationRange(n);return this.setDocument(e),this.setSelection(i)}insertFile(t){return this.insertFiles([t])}insertFiles(t){const e=[];return Array.from(t).forEach(t=>{var n;if(null!==(n=this.delegate)&&void 0!==n&&n.compositionShouldAcceptFile(t)){const n=ui.attachmentForFile(t);e.push(n)}}),this.insertAttachments(e)}insertAttachment(t){return this.insertAttachments([t])}insertAttachments(t){let e=new vi;return Array.from(t).forEach(t=>{var n;const i=t.getType(),r=null===(n=E[i])||void 0===n?void 0:n.presentation,o=this.getCurrentTextAttributes();r&&(o.presentation=r);const s=vi.textForAttachmentWithAttributes(t,o);e=e.appendText(s)}),this.insertText(e)}shouldManageDeletingInDirection(t){const e=this.getLocationRange();if(Zt(e)){if("backward"===t&&0===e[0].offset)return!0;if(this.shouldManageMovingCursorInDirection(t))return!0}else if(e[0].index!==e[1].index)return!0;return!1}deleteInDirection(t){let e,n,i,{length:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=this.getLocationRange();let s=this.getSelectedRange();const a=Zt(s);if(a?n="backward"===t&&0===o[0].offset:i=o[0].index!==o[1].index,n&&this.canDecreaseBlockAttributeLevel()){const t=this.getBlock();if(t.isListItem()?this.decreaseListLevel():this.decreaseBlockAttributeLevel(),this.setSelection(s[0]),t.isEmpty())return!1}return a&&(s=this.getExpandedRangeInDirection(t,{length:r}),"backward"===t&&(e=this.getAttachmentAtRange(s))),e?(this.editAttachment(e),!1):(this.setDocument(this.document.removeTextAtRange(s)),this.setSelection(s[0]),!n&&!i&&void 0)}moveTextFromRange(t){const[e]=Array.from(this.getSelectedRange());return this.setDocument(this.document.moveTextFromRangeToPosition(t,e)),this.setSelection(e)}removeAttachment(t){const e=this.document.getRangeOfAttachment(t);if(e)return this.stopEditingAttachment(),this.setDocument(this.document.removeTextAtRange(e)),this.setSelection(e[0])}removeLastBlockAttribute(){const[t,e]=Array.from(this.getSelectedRange()),n=this.document.getBlockAtPosition(e);return this.removeCurrentAttribute(n.getLastAttribute()),this.setSelection(t)}insertPlaceholder(){return this.placeholderPosition=this.getPosition(),this.insertString(" ")}selectPlaceholder(){if(null!=this.placeholderPosition)return this.setSelectedRange([this.placeholderPosition,this.placeholderPosition+1]),this.getSelectedRange()}forgetPlaceholder(){this.placeholderPosition=null}hasCurrentAttribute(t){const e=this.currentAttributes[t];return null!=e&&!1!==e}toggleCurrentAttribute(t){const e=!this.currentAttributes[t];return e?this.setCurrentAttribute(t,e):this.removeCurrentAttribute(t)}canSetCurrentAttribute(t){return _t(t)?this.canSetCurrentBlockAttribute(t):this.canSetCurrentTextAttribute(t)}canSetCurrentTextAttribute(t){const e=this.getSelectedDocument();if(e){for(const t of Array.from(e.getAttachments()))if(!t.hasContent())return!1;return!0}}canSetCurrentBlockAttribute(t){const e=this.getBlock();if(e)return!e.isTerminalBlock()}setCurrentAttribute(t,e){return _t(t)?this.setBlockAttribute(t,e):(this.setTextAttribute(t,e),this.currentAttributes[t]=e,this.notifyDelegateOfCurrentAttributesChange())}setHTMLAtributeAtPosition(t,e,n){var i;const r=this.document.getBlockAtPosition(t),o=null===(i=_t(r.getLastAttribute()))||void 0===i?void 0:i.htmlAttributes;if(r&&null!=o&&o.includes(e)){const i=this.document.setHTMLAttributeAtPosition(t,e,n);this.setDocument(i)}}setTextAttribute(t,e){const n=this.getSelectedRange();if(!n)return;const[i,r]=Array.from(n);if(i!==r)return this.setDocument(this.document.addAttributeAtRange(t,e,n));if("href"===t){const t=vi.textForStringWithAttributes(e,{href:e});return this.insertText(t)}}setBlockAttribute(t,e){const n=this.getSelectedRange();if(this.canSetCurrentAttribute(t))return this.setDocument(this.document.applyBlockAttributeAtRange(t,e,n)),this.setSelection(n)}removeCurrentAttribute(t){return _t(t)?(this.removeBlockAttribute(t),this.updateCurrentAttributes()):(this.removeTextAttribute(t),delete this.currentAttributes[t],this.notifyDelegateOfCurrentAttributesChange())}removeTextAttribute(t){const e=this.getSelectedRange();if(e)return this.setDocument(this.document.removeAttributeAtRange(t,e))}removeBlockAttribute(t){const e=this.getSelectedRange();if(e)return this.setDocument(this.document.removeAttributeAtRange(t,e))}canDecreaseNestingLevel(){var t;return(null===(t=this.getBlock())||void 0===t?void 0:t.getNestingLevel())>0}canIncreaseNestingLevel(){var t;const e=this.getBlock();if(e){if(null===(t=_t(e.getLastNestableAttribute()))||void 0===t||!t.listAttribute)return e.getNestingLevel()>0;{const t=this.getPreviousBlock();if(t)return function(){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Tt((arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).slice(0,t.length),t)}(t.getListItemAttributes(),e.getListItemAttributes())}}}decreaseNestingLevel(){const t=this.getBlock();if(t)return this.setDocument(this.document.replaceBlock(t,t.decreaseNestingLevel()))}increaseNestingLevel(){const t=this.getBlock();if(t)return this.setDocument(this.document.replaceBlock(t,t.increaseNestingLevel()))}canDecreaseBlockAttributeLevel(){var t;return(null===(t=this.getBlock())||void 0===t?void 0:t.getAttributeLevel())>0}decreaseBlockAttributeLevel(){var t;const e=null===(t=this.getBlock())||void 0===t?void 0:t.getLastAttribute();if(e)return this.removeCurrentAttribute(e)}decreaseListLevel(){let[t]=Array.from(this.getSelectedRange());const{index:e}=this.document.locationFromPosition(t);let n=e;const i=this.getBlock().getAttributeLevel();let r=this.document.getBlockAtIndex(n+1);for(;r&&r.isListItem()&&!(r.getAttributeLevel()<=i);)n++,r=this.document.getBlockAtIndex(n+1);t=this.document.positionFromLocation({index:e,offset:0});const o=this.document.positionFromLocation({index:n,offset:0});return this.setDocument(this.document.removeLastListAttributeAtRange([t,o]))}updateCurrentAttributes(){const t=this.getSelectedRange({ignoreLock:!0});if(t){const e=this.document.getCommonAttributesAtRange(t);if(Array.from(It()).forEach(t=>{e[t]||this.canSetCurrentAttribute(t)||(e[t]=!1)}),!Xt(e,this.currentAttributes))return this.currentAttributes=e,this.notifyDelegateOfCurrentAttributesChange()}}getCurrentAttributes(){return I.call({},this.currentAttributes)}getCurrentTextAttributes(){const t={};for(const e in this.currentAttributes){const n=this.currentAttributes[e];!1!==n&&Vt(e)&&(t[e]=n)}return t}freezeSelection(){return this.setCurrentAttribute("frozen",!0)}thawSelection(){return this.removeCurrentAttribute("frozen")}hasFrozenSelection(){return this.hasCurrentAttribute("frozen")}setSelection(t){var e;const n=this.document.locationRangeFromRange(t);return null===(e=this.delegate)||void 0===e?void 0:e.compositionDidRequestChangingSelectionToLocationRange(n)}getSelectedRange(){const t=this.getLocationRange();if(t)return this.document.rangeFromLocationRange(t)}setSelectedRange(t){const e=this.document.locationRangeFromRange(t);return this.getSelectionManager().setLocationRange(e)}getPosition(){const t=this.getLocationRange();if(t)return this.document.positionFromLocation(t[0])}getLocationRange(t){return this.targetLocationRange?this.targetLocationRange:this.getSelectionManager().getLocationRange(t)||Qt({index:0,offset:0})}withTargetLocationRange(t,e){let n;this.targetLocationRange=t;try{n=e()}finally{this.targetLocationRange=null}return n}withTargetRange(t,e){const n=this.document.locationRangeFromRange(t);return this.withTargetLocationRange(n,e)}withTargetDOMRange(t,e){const n=this.createLocationRangeFromDOMRange(t,{strict:!1});return this.withTargetLocationRange(n,e)}getExpandedRangeInDirection(t){let{length:e}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},[n,i]=Array.from(this.getSelectedRange());return"backward"===t?e?n-=e:n=this.translateUTF16PositionFromOffset(n,-1):e?i+=e:i=this.translateUTF16PositionFromOffset(i,1),Qt([n,i])}shouldManageMovingCursorInDirection(t){if(this.editingAttachment)return!0;const e=this.getExpandedRangeInDirection(t);return null!=this.getAttachmentAtRange(e)}moveCursorInDirection(t){let e,n;if(this.editingAttachment)n=this.document.getRangeOfAttachment(this.editingAttachment);else{const i=this.getSelectedRange();n=this.getExpandedRangeInDirection(t),e=!te(i,n)}if("backward"===t?this.setSelectedRange(n[0]):this.setSelectedRange(n[1]),e){const t=this.getAttachmentAtRange(n);if(t)return this.editAttachment(t)}}expandSelectionInDirection(t){let{length:e}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getExpandedRangeInDirection(t,{length:e});return this.setSelectedRange(n)}expandSelectionForEditing(){if(this.hasCurrentAttribute("href"))return this.expandSelectionAroundCommonAttribute("href")}expandSelectionAroundCommonAttribute(t){const e=this.getPosition(),n=this.document.getRangeOfCommonAttributeAtPosition(t,e);return this.setSelectedRange(n)}selectionContainsAttachments(){var t;return(null===(t=this.getSelectedAttachments())||void 0===t?void 0:t.length)>0}selectionIsInCursorTarget(){return this.editingAttachment||this.positionIsCursorTarget(this.getPosition())}positionIsCursorTarget(t){const e=this.document.locationFromPosition(t);if(e)return this.locationIsCursorTarget(e)}positionIsBlockBreak(t){var e;return null===(e=this.document.getPieceAtPosition(t))||void 0===e?void 0:e.isBlockBreak()}getSelectedDocument(){const t=this.getSelectedRange();if(t)return this.document.getDocumentAtRange(t)}getSelectedAttachments(){var t;return null===(t=this.getSelectedDocument())||void 0===t?void 0:t.getAttachments()}getAttachments(){return this.attachments.slice(0)}refreshAttachments(){const t=this.document.getAttachments(),{added:e,removed:n}=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=[],i=[],r=new Set;t.forEach(t=>{r.add(t)});const o=new Set;return e.forEach(t=>{o.add(t),r.has(t)||n.push(t)}),t.forEach(t=>{o.has(t)||i.push(t)}),{added:n,removed:i}}(this.attachments,t);return this.attachments=t,Array.from(n).forEach(t=>{var e,n;t.delegate=null,null===(e=this.delegate)||void 0===e||null===(n=e.compositionDidRemoveAttachment)||void 0===n||n.call(e,t)}),(()=>{const t=[];return Array.from(e).forEach(e=>{var n,i;e.delegate=this,t.push(null===(n=this.delegate)||void 0===n||null===(i=n.compositionDidAddAttachment)||void 0===i?void 0:i.call(n,e))}),t})()}attachmentDidChangeAttributes(t){var e,n;return this.revision++,null===(e=this.delegate)||void 0===e||null===(n=e.compositionDidEditAttachment)||void 0===n?void 0:n.call(e,t)}attachmentDidChangePreviewURL(t){var e,n;return this.revision++,null===(e=this.delegate)||void 0===e||null===(n=e.compositionDidChangeAttachmentPreviewURL)||void 0===n?void 0:n.call(e,t)}editAttachment(t,e){var n,i;if(t!==this.editingAttachment)return this.stopEditingAttachment(),this.editingAttachment=t,null===(n=this.delegate)||void 0===n||null===(i=n.compositionDidStartEditingAttachment)||void 0===i?void 0:i.call(n,this.editingAttachment,e)}stopEditingAttachment(){var t,e;this.editingAttachment&&(null===(t=this.delegate)||void 0===t||null===(e=t.compositionDidStopEditingAttachment)||void 0===e||e.call(t,this.editingAttachment),this.editingAttachment=null)}updateAttributesForAttachment(t,e){return this.setDocument(this.document.updateAttributesForAttachment(t,e))}removeAttributeForAttachment(t,e){return this.setDocument(this.document.removeAttributeForAttachment(t,e))}breakFormattedBlock(t){let{document:e}=t;const{block:n}=t;let i=t.startPosition,r=[i-1,i];n.getBlockBreakPosition()===t.startLocation.offset?(n.breaksOnReturn()&&"\n"===t.nextCharacter?i+=1:e=e.removeTextAtRange(r),r=[i,i]):"\n"===t.nextCharacter?"\n"===t.previousCharacter?r=[i-1,i+1]:(r=[i,i+1],i+=1):t.startLocation.offset-1!=0&&(i+=1);const o=new Di([n.removeLastAttribute().copyWithoutText()]);return this.setDocument(e.insertDocumentAtRange(o,r)),this.setSelection(i)}getPreviousBlock(){const t=this.getLocationRange();if(t){const{index:e}=t[0];if(e>0)return this.document.getBlockAtIndex(e-1)}}getBlock(){const t=this.getLocationRange();if(t)return this.document.getBlockAtIndex(t[0].index)}getAttachmentAtRange(t){const e=this.document.getDocumentAtRange(t);if(e.toString()==="".concat("","\n"))return e.getAttachments()[0]}notifyDelegateOfCurrentAttributesChange(){var t,e;return null===(t=this.delegate)||void 0===t||null===(e=t.compositionDidChangeCurrentAttributes)||void 0===e?void 0:e.call(t,this.currentAttributes)}notifyDelegateOfInsertionAtRange(t){var e,n;return null===(e=this.delegate)||void 0===e||null===(n=e.compositionDidPerformInsertionAtRange)||void 0===n?void 0:n.call(e,t)}translateUTF16PositionFromOffset(t,e){const n=this.document.toUTF16String(),i=n.offsetFromUCS2Offset(t);return n.offsetToUCS2Offset(i+e)}}Yi.proxyMethod("getSelectionManager().getPointRange"),Yi.proxyMethod("getSelectionManager().setLocationRangeFromPointRange"),Yi.proxyMethod("getSelectionManager().createLocationRangeFromDOMRange"),Yi.proxyMethod("getSelectionManager().locationIsCursorTarget"),Yi.proxyMethod("getSelectionManager().selectionIsExpanded"),Yi.proxyMethod("delegate?.getSelectionManager");class Ji extends pt{constructor(t){super(...arguments),this.composition=t,this.undoEntries=[],this.redoEntries=[]}recordUndoEntry(t){let{context:e,consolidatable:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=this.undoEntries.slice(-1)[0];if(!n||!Xi(i,t,e)){const n=this.createEntry({description:t,context:e});this.undoEntries.push(n),this.redoEntries=[]}}undo(){const t=this.undoEntries.pop();if(t){const e=this.createEntry(t);return this.redoEntries.push(e),this.composition.loadSnapshot(t.snapshot)}}redo(){const t=this.redoEntries.pop();if(t){const e=this.createEntry(t);return this.undoEntries.push(e),this.composition.loadSnapshot(t.snapshot)}}canUndo(){return this.undoEntries.length>0}canRedo(){return this.redoEntries.length>0}createEntry(){let{description:t,context:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{description:null==t?void 0:t.toString(),context:JSON.stringify(e),snapshot:this.composition.getSnapshot()}}}const Xi=(t,e,n)=>(null==t?void 0:t.description)===(null==e?void 0:e.toString())&&(null==t?void 0:t.context)===JSON.stringify(n),Qi="attachmentGallery";class Zi{constructor(t){this.document=t.document,this.selectedRange=t.selectedRange}perform(){return this.removeBlockAttribute(),this.applyBlockAttribute()}getSnapshot(){return{document:this.document,selectedRange:this.selectedRange}}removeBlockAttribute(){return this.findRangesOfBlocks().map(t=>this.document=this.document.removeAttributeAtRange(Qi,t))}applyBlockAttribute(){let t=0;this.findRangesOfPieces().forEach(e=>{e[1]-e[0]>1&&(e[0]+=t,e[1]+=t,"\n"!==this.document.getCharacterAtPosition(e[1])&&(this.document=this.document.insertBlockBreakAtRange(e[1]),e[1]<this.selectedRange[1]&&this.moveSelectedRangeForward(),e[1]++,t++),0!==e[0]&&"\n"!==this.document.getCharacterAtPosition(e[0]-1)&&(this.document=this.document.insertBlockBreakAtRange(e[0]),e[0]<this.selectedRange[0]&&this.moveSelectedRangeForward(),e[0]++,t++),this.document=this.document.applyBlockAttributeAtRange(Qi,!0,e))})}findRangesOfBlocks(){return this.document.findRangesForBlockAttribute(Qi)}findRangesOfPieces(){return this.document.findRangesForTextAttribute("presentation",{withValue:"gallery"})}moveSelectedRangeForward(){this.selectedRange[0]+=1,this.selectedRange[1]+=1}}const tr=function(t){const e=new Zi(t);return e.perform(),e.getSnapshot()},er=[tr];class nr{constructor(t,e,n){this.insertFiles=this.insertFiles.bind(this),this.composition=t,this.selectionManager=e,this.element=n,this.undoManager=new Ji(this.composition),this.filters=er.slice(0)}loadDocument(t){return this.loadSnapshot({document:t,selectedRange:[0,0]})}loadHTML(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const e=Ni.parse(t,{referenceElement:this.element}).getDocument();return this.loadDocument(e)}loadJSON(t){let{document:e,selectedRange:n}=t;return e=Di.fromJSON(e),this.loadSnapshot({document:e,selectedRange:n})}loadSnapshot(t){return this.undoManager=new Ji(this.composition),this.composition.loadSnapshot(t)}getDocument(){return this.composition.document}getSelectedDocument(){return this.composition.getSelectedDocument()}getSnapshot(){return this.composition.getSnapshot()}toJSON(){return this.getSnapshot()}deleteInDirection(t){return this.composition.deleteInDirection(t)}insertAttachment(t){return this.composition.insertAttachment(t)}insertAttachments(t){return this.composition.insertAttachments(t)}insertDocument(t){return this.composition.insertDocument(t)}insertFile(t){return this.composition.insertFile(t)}insertFiles(t){return this.composition.insertFiles(t)}insertHTML(t){return this.composition.insertHTML(t)}insertString(t){return this.composition.insertString(t)}insertText(t){return this.composition.insertText(t)}insertLineBreak(){return this.composition.insertLineBreak()}getSelectedRange(){return this.composition.getSelectedRange()}getPosition(){return this.composition.getPosition()}getClientRectAtPosition(t){const e=this.getDocument().locationRangeFromRange([t,t+1]);return this.selectionManager.getClientRectAtLocationRange(e)}expandSelectionInDirection(t){return this.composition.expandSelectionInDirection(t)}moveCursorInDirection(t){return this.composition.moveCursorInDirection(t)}setSelectedRange(t){return this.composition.setSelectedRange(t)}activateAttribute(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.composition.setCurrentAttribute(t,e)}attributeIsActive(t){return this.composition.hasCurrentAttribute(t)}canActivateAttribute(t){return this.composition.canSetCurrentAttribute(t)}deactivateAttribute(t){return this.composition.removeCurrentAttribute(t)}setHTMLAtributeAtPosition(t,e,n){this.composition.setHTMLAtributeAtPosition(t,e,n)}canDecreaseNestingLevel(){return this.composition.canDecreaseNestingLevel()}canIncreaseNestingLevel(){return this.composition.canIncreaseNestingLevel()}decreaseNestingLevel(){if(this.canDecreaseNestingLevel())return this.composition.decreaseNestingLevel()}increaseNestingLevel(){if(this.canIncreaseNestingLevel())return this.composition.increaseNestingLevel()}canRedo(){return this.undoManager.canRedo()}canUndo(){return this.undoManager.canUndo()}recordUndoEntry(t){let{context:e,consolidatable:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.undoManager.recordUndoEntry(t,{context:e,consolidatable:n})}redo(){if(this.canRedo())return this.undoManager.redo()}undo(){if(this.canUndo())return this.undoManager.undo()}}class ir{constructor(t){this.element=t}findLocationFromContainerAndOffset(t,e){let{strict:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{strict:!0},i=0,r=!1;const o={index:0,offset:0},s=this.findAttachmentElementParentForNode(t);s&&(t=s.parentNode,e=G(s));const a=Y(this.element,{usingFilter:ar});for(;a.nextNode();){const s=a.currentNode;if(s===t&&at(t)){rt(s)||(o.offset+=e);break}if(s.parentNode===t){if(i++===e){!n&&et(s,{strict:n})&&(r&&o.index++,o.offset=0,r=!0);break}}else if(!$(t,s)&&i>0)break;et(s,{strict:n})?(r&&o.index++,o.offset=0,r=!0):o.offset+=rr(s)}return o}findContainerAndOffsetFromLocation(t){let e,n;if(0===t.index&&0===t.offset){for(e=this.element,n=0;e.firstChild;)if(e=e.firstChild,tt(e)){n=1;break}return[e,n]}let[i,r]=this.findNodeAndOffsetFromLocation(t);if(i){if(at(i))0===rr(i)?(e=i.parentNode.parentNode,n=G(i.parentNode),rt(i,{name:"right"})&&n++):(e=i,n=t.offset-r);else{if(e=i.parentNode,!et(i.previousSibling)&&!tt(e))for(;i===e.lastChild&&(i=e,e=e.parentNode,!tt(e)););n=G(i),0!==t.offset&&n++}return[e,n]}}findNodeAndOffsetFromLocation(t){let e,n,i=0;for(const r of this.getSignificantNodesForIndex(t.index)){const o=rr(r);if(t.offset<=i+o)if(at(r)){if(e=r,n=i,t.offset===n&&rt(e))break}else e||(e=r,n=i);if(i+=o,i>t.offset)break}return[e,n]}findAttachmentElementParentForNode(t){for(;t&&t!==this.element;){if(ot(t))return t;t=t.parentNode}}getSignificantNodesForIndex(t){const e=[],n=Y(this.element,{usingFilter:or});let i=!1;for(;n.nextNode();){const o=n.currentNode;var r;if(nt(o)){if(null!=r?r++:r=0,r===t)i=!0;else if(i)break}else i&&e.push(o)}return e}}const rr=function(t){return t.nodeType===Node.TEXT_NODE?rt(t)?0:t.textContent.length:"br"===J(t)||ot(t)?1:0},or=function(t){return sr(t)===NodeFilter.FILTER_ACCEPT?ar(t):NodeFilter.FILTER_REJECT},sr=function(t){return st(t)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},ar=function(t){return ot(t.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT};class lr{createDOMRangeFromPoint(t){let e,{x:n,y:i}=t;if(document.caretPositionFromPoint){const{offsetNode:t,offset:r}=document.caretPositionFromPoint(n,i);return e=document.createRange(),e.setStart(t,r),e}if(document.caretRangeFromPoint)return document.caretRangeFromPoint(n,i);if(document.body.createTextRange){const r=se();try{const t=document.body.createTextRange();t.moveToPoint(n,i),t.select()}catch(t){}return e=se(),ae(r),e}}getClientRectsForDOMRange(t){const e=Array.from(t.getClientRects());return[e[0],e[e.length-1]]}}class cr extends pt{constructor(t){super(...arguments),this.didMouseDown=this.didMouseDown.bind(this),this.selectionDidChange=this.selectionDidChange.bind(this),this.element=t,this.locationMapper=new ir(this.element),this.pointMapper=new lr,this.lockCount=0,V("mousedown",{onElement:this.element,withCallback:this.didMouseDown})}getLocationRange(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return!1===t.strict?this.createLocationRangeFromDOMRange(se()):t.ignoreLock?this.currentLocationRange:this.lockedLocationRange?this.lockedLocationRange:this.currentLocationRange}setLocationRange(t){if(this.lockedLocationRange)return;t=Qt(t);const e=this.createDOMRangeFromLocationRange(t);e&&(ae(e),this.updateCurrentLocationRange(t))}setLocationRangeFromPointRange(t){t=Qt(t);const e=this.getLocationAtPoint(t[0]),n=this.getLocationAtPoint(t[1]);this.setLocationRange([e,n])}getClientRectAtLocationRange(t){const e=this.createDOMRangeFromLocationRange(t);if(e)return this.getClientRectsForDOMRange(e)[1]}locationIsCursorTarget(t){const e=Array.from(this.findNodeAndOffsetFromLocation(t))[0];return rt(e)}lock(){0==this.lockCount++&&(this.updateCurrentLocationRange(),this.lockedLocationRange=this.getLocationRange())}unlock(){if(0==--this.lockCount){const{lockedLocationRange:t}=this;if(this.lockedLocationRange=null,null!=t)return this.setLocationRange(t)}}clearSelection(){var t;return null===(t=oe())||void 0===t?void 0:t.removeAllRanges()}selectionIsCollapsed(){var t;return!0===(null===(t=se())||void 0===t?void 0:t.collapsed)}selectionIsExpanded(){return!this.selectionIsCollapsed()}createLocationRangeFromDOMRange(t,e){if(null==t||!this.domRangeWithinElement(t))return;const n=this.findLocationFromContainerAndOffset(t.startContainer,t.startOffset,e);if(!n)return;const i=t.collapsed?void 0:this.findLocationFromContainerAndOffset(t.endContainer,t.endOffset,e);return Qt([n,i])}didMouseDown(){return this.pauseTemporarily()}pauseTemporarily(){let t;this.paused=!0;const e=()=>{if(this.paused=!1,clearTimeout(n),Array.from(t).forEach(t=>{t.destroy()}),$(document,this.element))return this.selectionDidChange()},n=setTimeout(e,200);t=["mousemove","keydown"].map(t=>V(t,{onElement:document,withCallback:e}))}selectionDidChange(){if(!this.paused&&!H(this.element))return this.updateCurrentLocationRange()}updateCurrentLocationRange(t){var e,n;if((null!=t?t:t=this.createLocationRangeFromDOMRange(se()))&&!te(t,this.currentLocationRange))return this.currentLocationRange=t,null===(e=this.delegate)||void 0===e||null===(n=e.locationRangeDidChange)||void 0===n?void 0:n.call(e,this.currentLocationRange.slice(0))}createDOMRangeFromLocationRange(t){const e=this.findContainerAndOffsetFromLocation(t[0]),n=Zt(t)?e:this.findContainerAndOffsetFromLocation(t[1])||e;if(null!=e&&null!=n){const t=document.createRange();return t.setStart(...Array.from(e||[])),t.setEnd(...Array.from(n||[])),t}}getLocationAtPoint(t){const e=this.createDOMRangeFromPoint(t);var n;if(e)return null===(n=this.createLocationRangeFromDOMRange(e))||void 0===n?void 0:n[0]}domRangeWithinElement(t){return t.collapsed?$(this.element,t.startContainer):$(this.element,t.startContainer)&&$(this.element,t.endContainer)}}cr.proxyMethod("locationMapper.findLocationFromContainerAndOffset"),cr.proxyMethod("locationMapper.findContainerAndOffsetFromLocation"),cr.proxyMethod("locationMapper.findNodeAndOffsetFromLocation"),cr.proxyMethod("pointMapper.createDOMRangeFromPoint"),cr.proxyMethod("pointMapper.getClientRectsForDOMRange");var ur=Object.freeze({__proto__:null,Attachment:ui,AttachmentManager:Gi,AttachmentPiece:di,Block:bi,Composition:Yi,Document:Di,Editor:nr,HTMLParser:Ni,HTMLSanitizer:In,LineBreakInsertion:Ki,LocationMapper:ir,ManagedAttachment:$i,Piece:li,PointMapper:lr,SelectionManager:cr,SplittableList:mi,StringPiece:hi,Text:vi,UndoManager:Ji}),dr=Object.freeze({__proto__:null,ObjectView:Se,AttachmentView:Vn,BlockView:Kn,DocumentView:Yn,PieceView:Wn,PreviewableAttachmentView:qn,TextView:Hn});const{lang:hr,css:mr,keyNames:pr}=mt,gr=function(t){return function(){const e=t.apply(this,arguments);e.do(),this.undos||(this.undos=[]),this.undos.push(e.undo)}};class fr extends pt{constructor(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(...arguments),ei(this,"makeElementMutable",gr(()=>({do:()=>{this.element.dataset.trixMutable=!0},undo:()=>delete this.element.dataset.trixMutable}))),ei(this,"addToolbar",gr(()=>{const t=X({tagName:"div",className:mr.attachmentToolbar,data:{trixMutable:!0},childNodes:X({tagName:"div",className:"trix-button-row",childNodes:X({tagName:"span",className:"trix-button-group trix-button-group--actions",childNodes:X({tagName:"button",className:"trix-button trix-button--remove",textContent:hr.remove,attributes:{title:hr.remove},data:{trixAction:"remove"}})})})});return this.attachment.isPreviewable()&&t.appendChild(X({tagName:"div",className:mr.attachmentMetadataContainer,childNodes:X({tagName:"span",className:mr.attachmentMetadata,childNodes:[X({tagName:"span",className:mr.attachmentName,textContent:this.attachment.getFilename(),attributes:{title:this.attachment.getFilename()}}),X({tagName:"span",className:mr.attachmentSize,textContent:this.attachment.getFormattedFilesize()})]})})),V("click",{onElement:t,withCallback:this.didClickToolbar}),V("click",{onElement:t,matchingSelector:"[data-trix-action]",withCallback:this.didClickActionButton}),U("trix-attachment-before-toolbar",{onElement:this.element,attributes:{toolbar:t,attachment:this.attachment}}),{do:()=>this.element.appendChild(t),undo:()=>K(t)}})),ei(this,"installCaptionEditor",gr(()=>{const t=X({tagName:"textarea",className:mr.attachmentCaptionEditor,attributes:{placeholder:hr.captionPlaceholder},data:{trixMutable:!0}});t.value=this.attachmentPiece.getCaption();const e=t.cloneNode();e.classList.add("trix-autoresize-clone"),e.tabIndex=-1;const n=function(){e.value=t.value,t.style.height=e.scrollHeight+"px"};V("input",{onElement:t,withCallback:n}),V("input",{onElement:t,withCallback:this.didInputCaption}),V("keydown",{onElement:t,withCallback:this.didKeyDownCaption}),V("change",{onElement:t,withCallback:this.didChangeCaption}),V("blur",{onElement:t,withCallback:this.didBlurCaption});const i=this.element.querySelector("figcaption"),r=i.cloneNode();return{do:()=>
2{if(i.style.display="none",r.appendChild(t),r.appendChild(e),r.classList.add("".concat(mr.attachmentCaption,"--editing")),i.parentElement.insertBefore(r,i),n(),this.options.editCaption)return Yt(()=>t.focus())},undo(){K(r),i.style.display=null}}})),this.didClickToolbar=this.didClickToolbar.bind(this),this.didClickActionButton=this.didClickActionButton.bind(this),this.didKeyDownCaption=this.didKeyDownCaption.bind(this),this.didInputCaption=this.didInputCaption.bind(this),this.didChangeCaption=this.didChangeCaption.bind(this),this.didBlurCaption=this.didBlurCaption.bind(this),this.attachmentPiece=t,this.element=e,this.container=n,this.options=i,this.attachment=this.attachmentPiece.attachment,"a"===J(this.element)&&(this.element=this.element.firstChild),this.install()}install(){this.makeElementMutable(),this.addToolbar(),this.attachment.isPreviewable()&&this.installCaptionEditor()}uninstall(){var t;let e=this.undos.pop();for(this.savePendingCaption();e;)e(),e=this.undos.pop();null===(t=this.delegate)||void 0===t||t.didUninstallAttachmentEditor(this)}savePendingCaption(){if(null!=this.pendingCaption){const r=this.pendingCaption;var t,e,n,i;this.pendingCaption=null,r?null===(t=this.delegate)||void 0===t||null===(e=t.attachmentEditorDidRequestUpdatingAttributesForAttachment)||void 0===e||e.call(t,{caption:r},this.attachment):null===(n=this.delegate)||void 0===n||null===(i=n.attachmentEditorDidRequestRemovingAttributeForAttachment)||void 0===i||i.call(n,"caption",this.attachment)}}didClickToolbar(t){return t.preventDefault(),t.stopPropagation()}didClickActionButton(t){var e;if("remove"===t.target.getAttribute("data-trix-action"))return null===(e=this.delegate)||void 0===e?void 0:e.attachmentEditorDidRequestRemovalOfAttachment(this.attachment)}didKeyDownCaption(t){var e,n;if("return"===pr[t.keyCode])return t.preventDefault(),this.savePendingCaption(),null===(e=this.delegate)||void 0===e||null===(n=e.attachmentEditorDidRequestDeselectingAttachment)||void 0===n?void 0:n.call(e,this.attachment)}didInputCaption(t){this.pendingCaption=t.target.value.replace(/\s/g," ").trim()}didChangeCaption(t){return this.savePendingCaption()}didBlurCaption(t){return this.savePendingCaption()}}class vr extends pt{constructor(t,e){super(...arguments),this.didFocus=this.didFocus.bind(this),this.didBlur=this.didBlur.bind(this),this.didClickAttachment=this.didClickAttachment.bind(this),this.element=t,this.composition=e,this.documentView=new Yn(this.composition.document,{element:this.element}),V("focus",{onElement:this.element,withCallback:this.didFocus}),V("blur",{onElement:this.element,withCallback:this.didBlur}),V("click",{onElement:this.element,matchingSelector:"a[contenteditable=false]",preventDefault:!0}),V("mousedown",{onElement:this.element,matchingSelector:C,withCallback:this.didClickAttachment}),V("click",{onElement:this.element,matchingSelector:"a".concat(C),preventDefault:!0})}didFocus(t){var e;const n=()=>{var t,e;if(!this.focused)return this.focused=!0,null===(t=this.delegate)||void 0===t||null===(e=t.compositionControllerDidFocus)||void 0===e?void 0:e.call(t)};return(null===(e=this.blurPromise)||void 0===e?void 0:e.then(n))||n()}didBlur(t){this.blurPromise=new Promise(t=>Yt(()=>{var e,n;return H(this.element)||(this.focused=null,null===(e=this.delegate)||void 0===e||null===(n=e.compositionControllerDidBlur)||void 0===n||n.call(e)),this.blurPromise=null,t()}))}didClickAttachment(t,e){var n,i;const r=this.findAttachmentForElement(e),o=!!W(t.target,{matchingSelector:"figcaption"});return null===(n=this.delegate)||void 0===n||null===(i=n.compositionControllerDidSelectAttachment)||void 0===i?void 0:i.call(n,r,{editCaption:o})}getSerializableElement(){return this.isEditingAttachment()?this.documentView.shadowElement:this.element}render(){var t,e,n,i,r,o;return this.revision!==this.composition.revision&&(this.documentView.setDocument(this.composition.document),this.documentView.render(),this.revision=this.composition.revision),this.canSyncDocumentView()&&!this.documentView.isSynced()&&(null===(n=this.delegate)||void 0===n||null===(i=n.compositionControllerWillSyncDocumentView)||void 0===i||i.call(n),this.documentView.sync(),null===(r=this.delegate)||void 0===r||null===(o=r.compositionControllerDidSyncDocumentView)||void 0===o||o.call(r)),null===(t=this.delegate)||void 0===t||null===(e=t.compositionControllerDidRender)||void 0===e?void 0:e.call(t)}rerenderViewForObject(t){return this.invalidateViewForObject(t),this.render()}invalidateViewForObject(t){return this.documentView.invalidateViewForObject(t)}isViewCachingEnabled(){return this.documentView.isViewCachingEnabled()}enableViewCaching(){return this.documentView.enableViewCaching()}disableViewCaching(){return this.documentView.disableViewCaching()}refreshViewCache(){return this.documentView.garbageCollectCachedViews()}isEditingAttachment(){return!!this.attachmentEditor}installAttachmentEditorForAttachment(t,e){var n;if((null===(n=this.attachmentEditor)||void 0===n?void 0:n.attachment)===t)return;
vendor: 19,022 bytes, line 2
2const i=this.documentView.findElementForObject(t);if(!i)return;this.uninstallAttachmentEditor();const r=this.composition.document.getAttachmentPieceForAttachment(t);this.attachmentEditor=new fr(r,i,this.element,e),this.attachmentEditor.delegate=this}uninstallAttachmentEditor(){var t;return null===(t=this.attachmentEditor)||void 0===t?void 0:t.uninstall()}didUninstallAttachmentEditor(){return this.attachmentEditor=null,this.render()}attachmentEditorDidRequestUpdatingAttributesForAttachment(t,e){var n,i;return null===(n=this.delegate)||void 0===n||null===(i=n.compositionControllerWillUpdateAttachment)||void 0===i||i.call(n,e),this.composition.updateAttributesForAttachment(t,e)}attachmentEditorDidRequestRemovingAttributeForAttachment(t,e){var n,i;return null===(n=this.delegate)||void 0===n||null===(i=n.compositionControllerWillUpdateAttachment)||void 0===i||i.call(n,e),this.composition.removeAttributeForAttachment(t,e)}attachmentEditorDidRequestRemovalOfAttachment(t){var e,n;return null===(e=this.delegate)||void 0===e||null===(n=e.compositionControllerDidRequestRemovalOfAttachment)||void 0===n?void 0:n.call(e,t)}attachmentEditorDidRequestDeselectingAttachment(t){var e,n;return null===(e=this.delegate)||void 0===e||null===(n=e.compositionControllerDidRequestDeselectingAttachment)||void 0===n?void 0:n.call(e,t)}canSyncDocumentView(){return!this.isEditingAttachment()}findAttachmentForElement(t){return this.composition.document.getAttachmentById(parseInt(t.dataset.trixId,10))}}class br extends pt{}const yr="data-trix-mutable",Ar="[".concat(yr,"]"),xr={attributes:!0,childList:!0,characterData:!0,characterDataOldValue:!0,subtree:!0};class wr extends pt{constructor(t){super(t),this.didMutate=this.didMutate.bind(this),this.element=t,this.observer=new window.MutationObserver(this.didMutate),this.start()}start(){return this.reset(),this.observer.observe(this.element,xr)}stop(){return this.observer.disconnect()}didMutate(t){var e,n;if(this.mutations.push(...Array.from(this.findSignificantMutations(t)||[])),this.mutations.length)return null===(e=this.delegate)||void 0===e||null===(n=e.elementDidMutate)||void 0===n||n.call(e,this.getMutationSummary()),this.reset()}reset(){this.mutations=[]}findSignificantMutations(t){return t.filter(t=>this.mutationIsSignificant(t))}mutationIsSignificant(t){if(this.nodeIsMutable(t.target))return!1;for(const e of Array.from(this.nodesModifiedByMutation(t)))if(this.nodeIsSignificant(e))return!0;return!1}nodeIsSignificant(t){return t!==this.element&&!this.nodeIsMutable(t)&&!st(t)}nodeIsMutable(t){return W(t,{matchingSelector:Ar})}nodesModifiedByMutation(t){const e=[];switch(t.type){case"attributes":t.attributeName!==yr&&e.push(t.target);break;case"characterData":e.push(t.target.parentNode),e.push(t.target);break;case"childList":e.push(...Array.from(t.addedNodes||[])),e.push(...Array.from(t.removedNodes||[]))}return e}getMutationSummary(){return this.getTextMutationSummary()}getTextMutationSummary(){const{additions:t,deletions:e}=this.getTextChangesFromCharacterData(),n=this.getTextChangesFromChildList();Array.from(n.additions).forEach(e=>{Array.from(t).includes(e)||t.push(e)}),e.push(...Array.from(n.deletions||[]));const i={},r=t.join("");r&&(i.textAdded=r);const o=e.join("");return o&&(i.textDeleted=o),i}getMutationsByType(t){return Array.from(this.mutations).filter(e=>e.type===t)}getTextChangesFromChildList(){let t,e;const n=[],i=[];Array.from(this.getMutationsByType("childList")).forEach(t=>{n.push(...Array.from(t.addedNodes||[])),i.push(...Array.from(t.removedNodes||[]))}),0===n.length&&1===i.length&&nt(i[0])?(t=[],e=["\n"]):(t=kr(n),e=kr(i));const r=t.filter((t,n)=>t!==e[n]).map(ue),o=e.filter((e,n)=>e!==t[n]).map(ue);return{additions:r,deletions:o}}getTextChangesFromCharacterData(){let t,e;const n=this.getMutationsByType("characterData");if(n.length){const i=n[0],r=n[n.length-1],o=function(t,e){let n,i;return t=xt.box(t),(e=xt.box(e)).length<t.length?[i,n]=me(t,e):[n,i]=me(e,t),{added:n,removed:i}}(ue(i.oldValue),ue(r.target.data));t=o.added,e=o.removed}return{additions:t?[t]:[],deletions:e?[e]:[]}}}const kr=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const e=[];for(const n of Array.from(t))switch(n.nodeType){case Node.TEXT_NODE:e.push(n.data);break;case Node.ELEMENT_NODE:"br"===J(n)?e.push("\n"):e.push(...Array.from(kr(n.childNodes)||[]))}return e};class Cr extends Ee{constructor(t){super(...arguments),this.file=t}perform(t){const e=new FileReader;return e.onerror=()=>t(!1),e.onload=()=>{e.onerror=null;try{e.abort()}catch(t){}return t(!0,this.file)},e.readAsArrayBuffer(this.file)}}class Er{constructor(t){this.element=t}shouldIgnore(t){return!!B.samsungAndroid&&(this.previousEvent=this.event,this.event=t,this.checkSamsungKeyboardBuggyModeStart(),this.checkSamsungKeyboardBuggyModeEnd(),this.buggyMode)}checkSamsungKeyboardBuggyModeStart(){this.insertingLongTextAfterUnidentifiedChar()&&Sr(this.element.innerText,this.event.data)&&(this.buggyMode=!0,this.event.preventDefault())}checkSamsungKeyboardBuggyModeEnd(){this.buggyMode&&"insertText"!==this.event.inputType&&(this.buggyMode=!1)}insertingLongTextAfterUnidentifiedChar(){var t;return this.isBeforeInputInsertText()&&this.previousEventWasUnidentifiedKeydown()&&(null===(t=this.event.data)||void 0===t?void 0:t.length)>50}isBeforeInputInsertText(){return"beforeinput"===this.event.type&&"insertText"===this.event.inputType}previousEventWasUnidentifiedKeydown(){var t,e;return"keydown"===(null===(t=this.previousEvent)||void 0===t?void 0:t.type)&&"Unidentified"===(null===(e=this.previousEvent)||void 0===e?void 0:e.key)}}const Sr=(t,e)=>Dr(t)===Dr(e),Fr=new RegExp("(".concat("","|").concat(M,"|").concat(P,"|\\s)+"),"g"),Dr=t=>t.replace(Fr," ").trim();class Tr extends pt{constructor(t){super(...arguments),this.element=t,this.mutationObserver=new wr(this.element),this.mutationObserver.delegate=this,this.flakyKeyboardDetector=new Er(this.element);for(const t in this.constructor.events)V(t,{onElement:this.element,withCallback:this.handlerFor(t)})}elementDidMutate(t){}editorWillSyncDocumentView(){return this.mutationObserver.stop()}editorDidSyncDocumentView(){return this.mutationObserver.start()}requestRender(){var t,e;return null===(t=this.delegate)||void 0===t||null===(e=t.inputControllerDidRequestRender)||void 0===e?void 0:e.call(t)}requestReparse(){var t,e;return null===(t=this.delegate)||void 0===t||null===(e=t.inputControllerDidRequestReparse)||void 0===e||e.call(t),this.requestRender()}attachFiles(t){const e=Array.from(t).map(t=>new Cr(t));return Promise.all(e).then(t=>{this.handleInput(function(){var e,n;return null===(e=this.delegate)||void 0===e||e.inputControllerWillAttachFiles(),null===(n=this.responder)||void 0===n||n.insertFiles(t),this.requestRender()})})}handlerFor(t){return e=>{e.defaultPrevented||this.handleInput(()=>{if(!H(this.element)){if(this.flakyKeyboardDetector.shouldIgnore(e))return;this.eventName=t,this.constructor.events[t].call(this,e)}})}}handleInput(t){try{var e;null===(e=this.delegate)||void 0===e||e.inputControllerWillHandleInput(),t.call(this)}finally{var n;null===(n=this.delegate)||void 0===n||n.inputControllerDidHandleInput()}}createLinkHTML(t,e){const n=document.createElement("a");return n.href=t,n.textContent=e||t,n.outerHTML}}var Br;ei(Tr,"events",{});const{browser:Rr,keyNames:Nr}=mt;let Lr=0;class Or extends Tr{constructor(){super(...arguments),this.resetInputSummary()}setInputSummary(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.inputSummary.eventName=this.eventName;for(const e in t){const n=t[e];this.inputSummary[e]=n}return this.inputSummary}resetInputSummary(){this.inputSummary={}}reset(){return this.resetInputSummary(),re.reset()}elementDidMutate(t){var e,n;return this.isComposing()?null===(e=this.delegate)||void 0===e||null===(n=e.inputControllerDidAllowUnhandledInput)||void 0===n?void 0:n.call(e):this.handleInput(function(){return this.mutationIsSignificant(t)&&(this.mutationIsExpected(t)?this.requestRender():this.requestReparse()),this.reset()})}mutationIsExpected(t){let{textAdded:e,textDeleted:n}=t;if(this.inputSummary.preferDocument)return!0;const i=null!=e?e===this.inputSummary.textAdded:!this.inputSummary.textAdded,r=null!=n?this.inputSummary.didDelete:!this.inputSummary.didDelete,o=["\n"," \n"].includes(e)&&!i,s="\n"===n&&!r;if(o&&!s||s&&!o){const t=this.getSelectedRange();if(t){var a;const n=o?e.replace(/\n$/,"").length||-1:(null==e?void 0:e.length)||1;if(null!==(a=this.responder)&&void 0!==a&&a.positionIsBlockBreak(t[1]+n))return!0}}return i&&r}mutationIsSignificant(t){var e;const n=Object.keys(t).length>0,i=""===(null===(e=this.compositionInput)||void 0===e?void 0:e.getEndData());return n||!i}getCompositionInput(){if(this.isComposing())return this.compositionInput;this.compositionInput=new zr(this)}isComposing(){return this.compositionInput&&!this.compositionInput.isEnded()}deleteInDirection(t,e){var n;return!1!==(null===(n=this.responder)||void 0===n?void 0:n.deleteInDirection(t))?this.setInputSummary({didDelete:!0}):e?(e.preventDefault(),this.requestRender()):void 0}serializeSelectionToDataTransfer(t){var e;if(!function(t){if(null==t||!t.setData)return!1;for(const e in $t){const n=$t[e];try{if(t.setData(e,n),!t.getData(e)===n)return!1}catch(t){return!1}}return!0}(t))return;const n=null===(e=this.responder)||void 0===e?void 0:e.getSelectedDocument().toSerializableDocument();return t.setData("application/x-trix-document",JSON.stringify(n)),t.setData("text/html",Yn.render(n).innerHTML),t.setData("text/plain",n.toString().replace(/\n$/,"")),!0}canAcceptDataTransfer(t){const e={};return Array.from((null==t?void 0:t.types)||[]).forEach(t=>{e[t]=!0}),e.Files||e["application/x-trix-document"]||e["text/html"]||e["text/plain"]}getPastedHTMLUsingHiddenElement(t){const e=this.getSelectedRange(),n={position:"absolute",left:"".concat(window.pageXOffset,"px"),top:"".concat(window.pageYOffset,"px"),opacity:0},i=X({style:n,tagName:"div",editable:!0});return document.body.appendChild(i),i.focus(),requestAnimationFrame(()=>{const n=i.innerHTML;return K(i),this.setSelectedRange(e),t(n)})}}ei(Or,"events",{keydown(t){this.isComposing()||this.resetInputSummary(),this.inputSummary.didInput=!0;const e=Nr[t.keyCode];if(e){var n;let i=this.keys;["ctrl","alt","shift","meta"].forEach(e=>{var n;t["".concat(e,"Key")]&&("ctrl"===e&&(e="control"),i=null===(n=i)||void 0===n?void 0:n[e])}),null!=(null===(n=i)||void 0===n?void 0:n[e])&&(this.setInputSummary({keyName:e}),re.reset(),i[e].call(this,t))}if(Kt(t)){const e=String.fromCharCode(t.keyCode).toLowerCase();if(e){var i;const n=["alt","shift"].map(e=>{if(t["".concat(e,"Key")])return e}).filter(t=>t);n.push(e),null!==(i=this.delegate)&&void 0!==i&&i.inputControllerDidReceiveKeyboardCommand(n)&&t.preventDefault()}}},keypress(t){if(null!=this.inputSummary.eventName)return;if(t.metaKey)return;if(t.ctrlKey&&!t.altKey)return;const e=Ir(t);var n,i;return e?(null===(n=this.delegate)||void 0===n||n.inputControllerWillPerformTyping(),null===(i=this.responder)||void 0===i||i.insertString(e),this.setInputSummary({textAdded:e,didDelete:this.selectionIsExpanded()})):void 0},textInput(t){const{data:e}=t,{textAdded:n}=this.inputSummary;if(n&&n!==e&&n.toUpperCase()===e){var i;const t=this.getSelectedRange();return this.setSelectedRange([t[0],t[1]+n.length]),null===(i=this.responder)||void 0===i||i.insertString(e),this.setInputSummary({textAdded:e}),this.setSelectedRange(t)}},dragenter(t){t.preventDefault()},dragstart(t){var e,n;return this.serializeSelectionToDataTransfer(t.dataTransfer),this.draggedRange=this.getSelectedRange(),null===(e=this.delegate)||void 0===e||null===(n=e.inputControllerDidStartDrag)||void 0===n?void 0:n.call(e)},dragover(t){if(this.draggedRange||this.canAcceptDataTransfer(t.dataTransfer)){t.preventDefault();const i={x:t.clientX,y:t.clientY};var e,n;if(!Xt(i,this.draggingPoint))return this.draggingPoint=i,null===(e=this.delegate)||void 0===e||null===(n=e.inputControllerDidReceiveDragOverPoint)||void 0===n?void 0:n.call(e,this.draggingPoint)}},dragend(t){var e,n;null===(e=this.delegate)||void 0===e||null===(n=e.inputControllerDidCancelDrag)||void 0===n||n.call(e),this.draggedRange=null,this.draggingPoint=null},drop(t){var e,n;t.preventDefault();const i=null===(e=t.dataTransfer)||void 0===e?void 0:e.files,r=t.dataTransfer.getData("application/x-trix-document"),o={x:t.clientX,y:t.clientY};if(null===(n=this.responder)||void 0===n||n.setLocationRangeFromPointRange(o),null!=i&&i.length)this.attachFiles(i);else if(this.draggedRange){var s,a;null===(s=this.delegate)||void 0===s||s.inputControllerWillMoveText(),null===(a=this.responder)||void 0===a||a.moveTextFromRange(this.draggedRange),this.draggedRange=null,this.requestRender()}else if(r){var l;const t=Di.fromJSONString(r);null===(l=this.responder)||void 0===l||l.insertDocument(t),this.requestRender()}this.draggedRange=null,this.draggingPoint=null},cut(t){var e,n;if(null!==(e=this.responder)&&void 0!==e&&e.selectionIsExpanded()&&(this.serializeSelectionToDataTransfer(t.clipboardData)&&t.preventDefault(),null===(n=this.delegate)||void 0===n||n.inputControllerWillCutText(),this.deleteInDirection("backward"),t.defaultPrevented))return this.requestRender()},copy(t){var e;null!==(e=this.responder)&&void 0!==e&&e.selectionIsExpanded()&&this.serializeSelectionToDataTransfer(t.clipboardData)&&t.preventDefault()},paste(t){const e=t.clipboardData||t.testClipboardData,n={clipboard:e};if(!e||_r(t))return void this.getPastedHTMLUsingHiddenElement(t=>{var e,i,r;return n.type="text/html",n.html=t,null===(e=this.delegate)||void 0===e||e.inputControllerWillPaste(n),null===(i=this.responder)||void 0===i||i.insertHTML(n.html),this.requestRender(),null===(r=this.delegate)||void 0===r?void 0:r.inputControllerDidPaste(n)});const i=e.getData("URL"),r=e.getData("text/html"),o=e.getData("public.url-name");if(i){var s,a,l;let t;n.type="text/html",t=o?he(o).trim():i,n.html=this.createLinkHTML(i,t),null===(s=this.delegate)||void 0===s||s.inputControllerWillPaste(n),this.setInputSummary({textAdded:t,didDelete:this.selectionIsExpanded()}),null===(a=this.responder)||void 0===a||a.insertHTML(n.html),this.requestRender(),null===(l=this.delegate)||void 0===l||l.inputControllerDidPaste(n)}else if(Gt(e)){var c,u,d;n.type="text/plain",n.string=e.getData("text/plain"),null===(c=this.delegate)||void 0===c||c.inputControllerWillPaste(n),this.setInputSummary({textAdded:n.string,didDelete:this.selectionIsExpanded()}),null===(u=this.responder)||void 0===u||u.insertString(n.string),this.requestRender(),null===(d=this.delegate)||void 0===d||d.inputControllerDidPaste(n)}else if(r){var h,m,p;n.type="text/html",n.html=r,null===(h=this.delegate)||void 0===h||h.inputControllerWillPaste(n),null===(m=this.responder)||void 0===m||m.insertHTML(n.html),this.requestRender(),null===(p=this.delegate)||void 0===p||p.inputControllerDidPaste(n)}else if(Array.from(e.types).includes("Files")){var g,f;const t=null===(g=e.items)||void 0===g||null===(g=g[0])||void 0===g||null===(f=g.getAsFile)||void 0===f?void 0:f.call(g);if(t){var v,b,y;const e=Mr(t);!t.name&&e&&(t.name="pasted-file-".concat(++Lr,".").concat(e)),n.type="File",n.file=t,null===(v=this.delegate)||void 0===v||v.inputControllerWillAttachFiles(),null===(b=this.responder)||void 0===b||b.insertFile(n.file),this.requestRender(),null===(y=this.delegate)||void 0===y||y.inputControllerDidPaste(n)}}t.preventDefault()},compositionstart(t){return this.getCompositionInput().start(t.data)},compositionupdate(t){return this.getCompositionInput().update(t.data)},compositionend(t){return this.getCompositionInput().end(t.data)},beforeinput(t){this.inputSummary.didInput=!0},input(t){return this.inputSummary.didInput=!0,t.stopPropagation()}}),ei(Or,"keys",{backspace(t){var e;return null===(e=this.delegate)||void 0===e||e.inputControllerWillPerformTyping(),this.deleteInDirection("backward",t)},delete(t){var e;return null===(e=this.delegate)||void 0===e||e.inputControllerWillPerformTyping(),this.deleteInDirection("forward",t)},return(t){var e,n;return this.setInputSummary({preferDocument:!0}),null===(e=this.delegate)||void 0===e||e.inputControllerWillPerformTyping(),null===(n=this.responder)||void 0===n?void 0:n.insertLineBreak()},tab(t){var e,n;null!==(e=this.responder)&&void 0!==e&&e.canIncreaseNestingLevel()&&(null===(n=this.responder)||void 0===n||n.increaseNestingLevel(),this.requestRender(),t.preventDefault())},left(t){var e;if(this.selectionIsInCursorTarget())return t.preventDefault(),null===(e=this.responder)||void 0===e?void 0:e.moveCursorInDirection("backward")},right(t){var e;if(this.selectionIsInCursorTarget())return t.preventDefault(),null===(e=this.responder)||void 0===e?void 0:e.moveCursorInDirection("forward")},control:{d(t){var e;return null===(e=this.delegate)||void 0===e||e.inputControllerWillPerformTyping(),this.deleteInDirection("forward",t)},h(t){var e;return null===(e=this.delegate)||void 0===e||e.inputControllerWillPerformTyping(),this.deleteInDirection("backward",t)},o(t){var e,n;return t.preventDefault(),null===(e=this.delegate)||void 0===e||e.inputControllerWillPerformTyping(),null===(n=this.responder)||void 0===n||n.insertString("\n",{updatePosition:!1}),this.requestRender()}},shift:{return(t){var e,n;null===(e=this.delegate)||void 0===e||e.inputControllerWillPerformTyping(),null===(n=this.responder)||void 0===n||n.insertString("\n"),this.requestRender(),t.preventDefault()},tab(t){var e,n;null!==(e=this.responder)&&void 0!==e&&e.canDecreaseNestingLevel()&&(null===(n=this.responder)||void 0===n||n.decreaseNestingLevel(),this.requestRender(),t.preventDefault())},left(t){if(this.selectionIsInCursorTarget())return t.preventDefault(),this.expandSelectionInDirection("backward")},right(t){if(this.selectionIsInCursorTarget())return t.preventDefault(),this.expandSelectionInDirection("forward")}},alt:{backspace(t){var e;return this.setInputSummary({preferDocument:!1}),null===(e=this.delegate)||void 0===e?void 0:e.inputControllerWillPerformTyping()}},meta:{backspace(t){var e;return this.setInputSummary({preferDocument:!1}),null===(e=this.delegate)||void 0===e?void 0:e.inputControllerWillPerformTyping()}}}),Or.proxyMethod("responder?.getSelectedRange"),Or.proxyMethod("responder?.setSelectedRange"),Or.proxyMethod("responder?.expandSelectionInDirection"),Or.proxyMethod("responder?.selectionIsInCursorTarget"),Or.proxyMethod("responder?.selectionIsExpanded");const Mr=t=>{var e;return null===(e=t.type)||void 0===e||null===(e=e.match(/\/(\w+)$/))||void 0===e?void 0:e[1]},Pr=!(null===(Br=" ".codePointAt)||void 0===Br||!Br.call(" ",0)),Ir=function(t){if(t.key&&Pr&&t.key.codePointAt(0)===t.keyCode)return t.key;{let e;if(null===t.which?e=t.keyCode:0!==t.which&&0!==t.charCode&&(e=t.charCode),null!=e&&"escape"!==Nr[e])return xt.fromCodepoints([e]).toString()}},_r=function(t){const e=t.clipboardData;if(e){if(e.types.includes("text/html")){for(const t of e.types){const n=/^CorePasteboardFlavorType/.test(t),i=/^dyn\./.test(t)&&e.getData(t);
2if(n||i)return!0}return!1}{const t=e.types.includes("com.apple.webarchive"),n=e.types.includes("com.apple.flat-rtfd");return t||n}}};class zr extends pt{constructor(t){super(...arguments),this.inputController=t,this.responder=this.inputController.responder,this.delegate=this.inputController.delegate,this.inputSummary=this.inputController.inputSummary,this.data={}}start(t){var e,n;(this.data.start=t,this.isSignificant())&&("keypress"===this.inputSummary.eventName&&this.inputSummary.textAdded&&(null===(n=this.responder)||void 0===n||n.deleteInDirection("left")),this.selectionIsExpanded()||(this.insertPlaceholder(),this.requestRender()),this.range=null===(e=this.responder)||void 0===e?void 0:e.getSelectedRange())}update(t){if(this.data.update=t,this.isSignificant()){const t=this.selectPlaceholder();t&&(this.forgetPlaceholder(),this.range=t)}}end(t){return this.data.end=t,this.isSignificant()?(this.forgetPlaceholder(),this.canApplyToDocument()?(this.setInputSummary({preferDocument:!0,didInput:!1}),null===(e=this.delegate)||void 0===e||e.inputControllerWillPerformTyping(),null===(n=this.responder)||void 0===n||n.setSelectedRange(this.range),null===(i=this.responder)||void 0===i||i.insertString(this.data.end),null===(r=this.responder)||void 0===r?void 0:r.setSelectedRange(this.range[0]+this.data.end.length)):null!=this.data.start||null!=this.data.update?(this.requestReparse(),this.inputController.reset()):void 0):this.inputController.reset();var e,n,i,r}getEndData(){return this.data.end}isEnded(){return null!=this.getEndData()}isSignificant(){return!Rr.composesExistingText||this.inputSummary.didInput}canApplyToDocument(){var t,e;return 0===(null===(t=this.data.start)||void 0===t?void 0:t.length)&&(null===(e=this.data.end)||void 0===e?void 0:e.length)>0&&this.range}}zr.proxyMethod("inputController.setInputSummary"),zr.proxyMethod("inputController.requestRender"),zr.proxyMethod("inputController.requestReparse"),zr.proxyMethod("responder?.selectionIsExpanded"),zr.proxyMethod("responder?.insertPlaceholder"),zr.proxyMethod("responder?.selectPlaceholder"),zr.proxyMethod("responder?.forgetPlaceholder");class Vr extends Tr{constructor(){super(...arguments),this.render=this.render.bind(this)}elementDidMutate(){return this.scheduledRender?this.composing?null===(t=this.delegate)||void 0===t||null===(e=t.inputControllerDidAllowUnhandledInput)||void 0===e?void 0:e.call(t):void 0:this.reparse();var t,e}scheduleRender(){return this.scheduledRender?this.scheduledRender:this.scheduledRender=requestAnimationFrame(this.render)}render(){var t,e;cancelAnimationFrame(this.scheduledRender),this.scheduledRender=null,this.composing||null===(e=this.delegate)||void 0===e||e.render(),null===(t=this.afterRender)||void 0===t||t.call(this),this.afterRender=null}reparse(){var t;return null===(t=this.delegate)||void 0===t?void 0:t.reparse()}insertString(){var t;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;return null===(t=this.delegate)||void 0===t||t.inputControllerWillPerformTyping(),this.withTargetDOMRange(function(){var t;return null===(t=this.responder)||void 0===t?void 0:t.insertString(e,n)})}toggleAttributeIfSupported(t){var e;if(It().includes(t))return null===(e=this.delegate)||void 0===e||e.inputControllerWillPerformFormatting(t),this.withTargetDOMRange(function(){var e;return null===(e=this.responder)||void 0===e?void 0:e.toggleCurrentAttribute(t)})}activateAttributeIfSupported(t,e){var n;if(It().includes(t))return null===(n=this.delegate)||void 0===n||n.inputControllerWillPerformFormatting(t),this.withTargetDOMRange(function(){var n;return null===(n=this.responder)||void 0===n?void 0:n.setCurrentAttribute(t,e)})}deleteInDirection(t){let{recordUndoEntry:e}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{recordUndoEntry:!0};var n;e&&(null===(n=this.delegate)||void 0===n||n.inputControllerWillPerformTyping());const i=()=>{var e;return null===(e=this.responder)||void 0===e?void 0:e.deleteInDirection(t)},r=this.getTargetDOMRange({minLength:this.composing?1:2});return r?this.withTargetDOMRange(r,i):i()}withTargetDOMRange(t,e){var n;return"function"==typeof t&&(e=t,t=this.getTargetDOMRange()),t?null===(n=this.responder)||void 0===n?void 0:n.withTargetDOMRange(t,e.bind(this)):(re.reset(),e.call(this))}getTargetDOMRange(){var t,e;let{minLength:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{minLength:0};const i=null===(t=(e=this.event).getTargetRanges)||void 0===t?void 0:t.call(e);
vendor: 4,892 bytes, line 2
2if(i&&i.length){const t=jr(i[0]);if(0===n||t.toString().length>=n)return t}}withEvent(t,e){let n;this.event=t;try{n=e.call(this)}finally{this.event=null}return n}}ei(Vr,"events",{keydown(t){if(Kt(t)){var e;const n=$r(t);null!==(e=this.delegate)&&void 0!==e&&e.inputControllerDidReceiveKeyboardCommand(n)&&t.preventDefault()}else{let e=t.key;t.altKey&&(e+="+Alt"),t.shiftKey&&(e+="+Shift");const n=this.constructor.keys[e];if(n)return this.withEvent(t,n)}},paste(t){var e;let n;const i=null===(e=t.clipboardData)||void 0===e?void 0:e.getData("URL");return Wr(t)?(t.preventDefault(),this.attachFiles(t.clipboardData.files)):Hr(t)?(t.preventDefault(),n={type:"text/plain",string:t.clipboardData.getData("text/plain")},null===(r=this.delegate)||void 0===r||r.inputControllerWillPaste(n),null===(o=this.responder)||void 0===o||o.insertString(n.string),this.render(),null===(s=this.delegate)||void 0===s?void 0:s.inputControllerDidPaste(n)):i?(t.preventDefault(),n={type:"text/html",html:this.createLinkHTML(i)},null===(a=this.delegate)||void 0===a||a.inputControllerWillPaste(n),null===(l=this.responder)||void 0===l||l.insertHTML(n.html),this.render(),null===(c=this.delegate)||void 0===c?void 0:c.inputControllerDidPaste(n)):void 0;var r,o,s,a,l,c},beforeinput(t){const e=this.constructor.inputTypes[t.inputType],n=(i=t,!(!/iPhone|iPad/.test(navigator.userAgent)||i.inputType&&"insertParagraph"!==i.inputType));var i;e&&(this.withEvent(t,e),n||this.scheduleRender()),n&&this.render()},input(t){re.reset()},dragstart(t){var e,n;null!==(e=this.responder)&&void 0!==e&&e.selectionContainsAttachments()&&(t.dataTransfer.setData("application/x-trix-dragging",!0),this.dragging={range:null===(n=this.responder)||void 0===n?void 0:n.getSelectedRange(),point:Gr(t)})},dragenter(t){Ur(t)&&t.preventDefault()},dragover(t){if(this.dragging){t.preventDefault();const n=Gr(t);var e;if(!Xt(n,this.dragging.point))return this.dragging.point=n,null===(e=this.responder)||void 0===e?void 0:e.setLocationRangeFromPointRange(n)}else Ur(t)&&t.preventDefault()},drop(t){var e,n;if(this.dragging)return t.preventDefault(),null===(e=this.delegate)||void 0===e||e.inputControllerWillMoveText(),null===(n=this.responder)||void 0===n||n.moveTextFromRange(this.dragging.range),this.dragging=null,this.scheduleRender();if(Ur(t)){var i;t.preventDefault();const e=Gr(t);return null===(i=this.responder)||void 0===i||i.setLocationRangeFromPointRange(e),this.attachFiles(t.dataTransfer.files)}},dragend(){var t;this.dragging&&(null===(t=this.responder)||void 0===t||t.setSelectedRange(this.dragging.range),this.dragging=null)},compositionend(t){this.composing&&(this.composing=!1,B.recentAndroid||this.scheduleRender())}}),ei(Vr,"keys",{ArrowLeft(){var t,e;if(null!==(t=this.responder)&&void 0!==t&&t.shouldManageMovingCursorInDirection("backward"))return this.event.preventDefault(),null===(e=this.responder)||void 0===e?void 0:e.moveCursorInDirection("backward")},ArrowRight(){var t,e;if(null!==(t=this.responder)&&void 0!==t&&t.shouldManageMovingCursorInDirection("forward"))return this.event.preventDefault(),null===(e=this.responder)||void 0===e?void 0:e.moveCursorInDirection("forward")},Backspace(){var t,e,n;if(null!==(t=this.responder)&&void 0!==t&&t.shouldManageDeletingInDirection("backward"))return this.event.preventDefault(),null===(e=this.delegate)||void 0===e||e.inputControllerWillPerformTyping(),null===(n=this.responder)||void 0===n||n.deleteInDirection("backward"),this.render()},Tab(){var t,e;if(null!==(t=this.responder)&&void 0!==t&&t.canIncreaseNestingLevel())return this.event.preventDefault(),null===(e=this.responder)||void 0===e||e.increaseNestingLevel(),this.render()},"Tab+Shift"(){var t,e;if(null!==(t=this.responder)&&void 0!==t&&t.canDecreaseNestingLevel())return this.event.preventDefault(),null===(e=this.responder)||void 0===e||e.decreaseNestingLevel(),this.render()}}),ei(Vr,"inputTypes",{deleteByComposition(){return this.deleteInDirection("backward",{recordUndoEntry:!1})},deleteByCut(){return this.deleteInDirection("backward")},deleteByDrag(){return this.event.preventDefault(),this.withTargetDOMRange(function(){var t;this.deleteByDragRange=null===(t=this.responder)||void 0===t?void 0:t.getSelectedRange()})},deleteCompositionText(){return this.deleteInDirection("backward",{recordUndoEntry:!1})},deleteContent(){return this.deleteInDirection("backward")},deleteContentBackward(){return this.deleteInDirection("backward")},deleteContentForward(){return this.deleteInDirection("forward")},deleteEntireSoftLine(){return this.deleteInDirection("forward")},deleteHardLineBackward(){return this.deleteInDirection("backward")},deleteHardLineForward(){return this.deleteInDirection("forward")},deleteSoftLineBackward(){return this.deleteInDirection("backward")},deleteSoftLineForward(){return this.deleteInDirection("forward")},deleteWordBackward(){return this.deleteInDirection("backward")}
2,deleteWordForward(){return this.deleteInDirection("forward")},formatBackColor(){return this.activateAttributeIfSupported("backgroundColor",this.event.data)},formatBold(){return this.toggleAttributeIfSupported("bold")},formatFontColor(){return this.activateAttributeIfSupported("color",this.event.data)},formatFontName(){return this.activateAttributeIfSupported("font",this.event.data)},formatIndent(){var t;if(null!==(t=this.responder)&&void 0!==t&&t.canIncreaseNestingLevel())return this.withTargetDOMRange(function(){var t;return null===(t=this.responder)||void 0===t?void 0:t.increaseNestingLevel()})},formatItalic(){return this.toggleAttributeIfSupported("italic")},formatJustifyCenter(){return this.toggleAttributeIfSupported("justifyCenter")},formatJustifyFull(){return this.toggleAttributeIfSupported("justifyFull")},formatJustifyLeft(){return this.toggleAttributeIfSupported("justifyLeft")},formatJustifyRight(){return this.toggleAttributeIfSupported("justifyRight")},formatOutdent(){var t;if(null!==(t=this.responder)&&void 0!==t&&t.canDecreaseNestingLevel())return this.withTargetDOMRange(function(){var t;return null===(t=this.responder)||void 0===t?void 0:t.decreaseNestingLevel()})},formatRemove(){this.withTargetDOMRange(function(){for(const n in null===(t=this.responder)||void 0===t?void 0:t.getCurrentAttributes()){var t,e;null===(e=this.responder)||void 0===e||e.removeCurrentAttribute(n)}})},formatSetBlockTextDirection(){return this.activateAttributeIfSupported("blockDir",this.event.data)},formatSetInlineTextDirection(){return this.activateAttributeIfSupported("textDir",this.event.data)},formatStrikeThrough(){return this.toggleAttributeIfSupported("strike")},formatSubscript(){return this.toggleAttributeIfSupported("sub")},formatSuperscript(){return this.toggleAttributeIfSupported("sup")},formatUnderline(){return this.toggleAttributeIfSupported("underline")},historyRedo(){var t;return null===(t=this.delegate)||void 0===t?void 0:t.inputControllerWillPerformRedo()},historyUndo(){var t;return null===(t=this.delegate)||void 0===t?void 0:t.inputControllerWillPerformUndo()},insertCompositionText(){return this.composing=!0,this.insertString(this.event.data)},insertFromComposition(){return this.composing=!1,this.insertString(this.event.data)},insertFromDrop(){const t=this.deleteByDragRange;var e;if(t)return this.deleteByDragRange=null,null===(e=this.delegate)||void 0===e||e.inputControllerWillMoveText(),this.withTargetDOMRange(function(){var e;return null===(e=this.responder)||void 0===e?void 0:e.moveTextFromRange(t)})},insertFromPaste(){const{dataTransfer:t}=this.event,e={dataTransfer:t},n=t.getData("URL"),i=t.getData("text/html");if(n){var r;let i;this.event.preventDefault(),e.type="text/html";const o=t.getData("public.url-name");i=o?he(o).trim():n,e.html=this.createLinkHTML(n,i),null===(r=this.delegate)||void 0===r||r.inputControllerWillPaste(e),this.withTargetDOMRange(function(){var t;return null===(t=this.responder)||void 0===t?void 0:t.insertHTML(e.html)}),this.afterRender=()=>{var t;return null===(t=this.delegate)||void 0===t?void 0:t.inputControllerDidPaste(e)}}else if(Gt(t)){var o;e.type="text/plain",e.string=t.getData("text/plain"),null===(o=this.delegate)||void 0===o||o.inputControllerWillPaste(e),this.withTargetDOMRange(function(){var t;return null===(t=this.responder)||void 0===t?void 0:t.insertString(e.string)}),this.afterRender=()=>{var t;return null===(t=this.delegate)||void 0===t?void 0:t.inputControllerDidPaste(e)}}else if(qr(this.event)){var s;e.type="File",e.file=t.files[0],null===(s=this.delegate)||void 0===s||s.inputControllerWillPaste(e),this.withTargetDOMRange(function(){var t;return null===(t=this.responder)||void 0===t?void 0:t.insertFile(e.file)}),this.afterRender=()=>{var t;return null===(t=this.delegate)||void 0===t?void 0:t.inputControllerDidPaste(e)}}else if(i){var a;this.event.preventDefault(),e.type="text/html",e.html=i,null===(a=this.delegate)||void 0===a||a.inputControllerWillPaste(e),this.withTargetDOMRange(function(){var t;return null===(t=this.responder)||void 0===t?void 0:t.insertHTML(e.html)}),this.afterRender=()=>{var t;return null===(t=this.delegate)||void 0===t?void 0:t.inputControllerDidPaste(e)}}},insertFromYank(){return this.insertString(this.event.data)},insertLineBreak(){return this.insertString("\n")},insertLink(){return this.activateAttributeIfSupported("href",this.event.data)},insertOrderedList(){return this.toggleAttributeIfSupported("number")},insertParagraph(){var t;return null===(t=this.delegate)||void 0===t||t.inputControllerWillPerformTyping(),this.withTargetDOMRange(function(){var t;return null===(t=this.responder)||void 0===t?void 0:t.insertLineBreak()})},insertReplacementText(){const t=this.event.dataTransfer.getData("text/plain"),e=this.event.getTargetRanges()[0];this.withTargetDOMRange(e,()=>{this.insertString(t,{updatePosition:!1})})},insertText(){var t;return this.insertString(this.event.data||(null===(t=this.event.dataTransfer)||void 0===t?void 0:t.getData("text/plain")))},insertTranspose(){return this.insertString(this.event.data)},insertUnorderedList(){return this.toggleAttributeIfSupported("bullet")}});const jr=function(t){const e=document.createRange();return e.setStart(t.startContainer,t.startOffset),e.setEnd(t.endContainer,t.endOffset),e},Ur=t=>{var e;return Array.from((null===(e=t.dataTransfer)||void 0===e?void 0:e.types)||[]).includes("Files")},qr=t=>{var e;return(null===(e=t.dataTransfer.files)||void 0===e?void 0:e[0])&&!Wr(t)&&!(t=>{let{dataTransfer:e}=t;return e.types.includes("Files")&&e.types.includes("text/html")&&e.getData("text/html").includes("urn:schemas-microsoft-com:office:office")})(t)},Wr=function(t){const e=t.clipboardData;if(e)return Array.from(e.types).filter(t=>t.match(/file/i)).length===e.types.length&&e.files.length>=1},Hr=function(t){const e=t.clipboardData;if(e)return e.types.includes("text/plain")&&1===e.types.length},$r=function(t){const e=[];return t.altKey&&e.push("alt"),t.shiftKey&&e.push("shift"),e.push(t.key),e},Gr=t=>({x:t.clientX,y:t.clientY}),Kr="[data-trix-attribute]",Yr="[data-trix-action]",Jr="".concat(Kr,", ").concat(Yr),Xr="[data-trix-dialog]",Qr="".concat(Xr,"[data-trix-active]"),Zr="".concat(Xr," [data-trix-method]"),to="".concat(Xr," [data-trix-input]"),eo=(t,e)=>(e||(e=io(t)),t.querySelector("[data-trix-input][name='".concat(e,"']"))),no=t=>t.getAttribute("data-trix-action"),io=t=>t.getAttribute("data-trix-attribute")||t.getAttribute("data-trix-dialog-attribute");class ro extends pt{constructor(t){super(t),this.didClickActionButton=this.didClickActionButton.bind(this),this.didClickAttributeButton=this.didClickAttributeButton.bind(this),this.didClickDialogButton=this.didClickDialogButton.bind(this),this.didKeyDownDialogInput=this.didKeyDownDialogInput.bind(this),this.element=t,this.attributes={},this.actions={},this.resetDialogInputs(),V("mousedown",{onElement:this.element,matchingSelector:Yr,withCallback:this.didClickActionButton}),V("mousedown",{onElement:this.element,matchingSelector:Kr,withCallback:this.didClickAttributeButton}),V("click",{onElement:this.element,matchingSelector:Jr,preventDefault:!0}),V("click",{onElement:this.element,matchingSelector:Zr,withCallback:this.didClickDialogButton}),V("keydown",{onElement:this.element,matchingSelector:to,withCallback:this.didKeyDownDialogInput})}didClickActionButton(t,e){var n;null===(n=this.delegate)||void 0===n||n.toolbarDidClickButton(),t.preventDefault();const i=no(e);return this.getDialog(i)?this.toggleDialog(i):null===(r=this.delegate)||void 0===r?void 0:r.toolbarDidInvokeAction(i,e);var r}didClickAttributeButton(t,e){var n;null===(n=this.delegate)||void 0===n||n.toolbarDidClickButton(),t.preventDefault();const i=io(e);var r;return this.getDialog(i)?this.toggleDialog(i):null===(r=this.delegate)||void 0===r||r.toolbarDidToggleAttribute(i),this.refreshAttributeButtons()}didClickDialogButton(t,e){const n=W(e,{matchingSelector:Xr});return this[e.getAttribute("data-trix-method")].call(this,n)}didKeyDownDialogInput(t,e){if(13===t.keyCode){t.preventDefault();const n=e.getAttribute("name"),i=this.getDialog(n);this.setAttribute(i)}if(27===t.keyCode)return t.preventDefault(),this.hideDialog()}updateActions(t){return this.actions=t,this.refreshActionButtons()}refreshActionButtons(){return this.eachActionButton((t,e)=>{t.disabled=!1===this.actions[e]})}eachActionButton(t){return Array.from(this.element.querySelectorAll(Yr)).map(e=>t(e,no(e)))}updateAttributes(t){return this.attributes=t,this.refreshAttributeButtons()}refreshAttributeButtons(){return this.eachAttributeButton((t,e)=>(t.disabled=!1===this.attributes[e],this.attributes[e]||this.dialogIsVisible(e)?(t.setAttribute("data-trix-active",""),t.classList.add("trix-active")):(t.removeAttribute("data-trix-active"),t.classList.remove("trix-active"))))}eachAttributeButton(t){return Array.from(this.element.querySelectorAll(Kr)).map(e=>t(e,io(e)))}applyKeyboardCommand(t){const e=JSON.stringify(t.sort());for(const t of Array.from(this.element.querySelectorAll("[data-trix-key]"))){const n=t.getAttribute("data-trix-key").split("+");if(JSON.stringify(n.sort())===e)return U("mousedown",{onElement:t}),!0}return!1}dialogIsVisible(t){const e=this.getDialog(t);if(e)return e.hasAttribute("data-trix-active")}toggleDialog(t){return this.dialogIsVisible(t)?this.hideDialog():this.showDialog(t)}
vendor: 18,752 bytes, line 2
2showDialog(t){var e,n;this.hideDialog(),null===(e=this.delegate)||void 0===e||e.toolbarWillShowDialog();const i=this.getDialog(t);i.setAttribute("data-trix-active",""),i.classList.add("trix-active"),Array.from(i.querySelectorAll("input[disabled]")).forEach(t=>{t.removeAttribute("disabled")});const r=io(i);if(r){const e=eo(i,t);e&&(e.value=this.attributes[r]||"",e.select())}return null===(n=this.delegate)||void 0===n?void 0:n.toolbarDidShowDialog(t)}setAttribute(t){var e;const n=io(t),i=eo(t,n);return!i.willValidate||(i.setCustomValidity(""),i.checkValidity()&&this.isSafeAttribute(i))?(null===(e=this.delegate)||void 0===e||e.toolbarDidUpdateAttribute(n,i.value),this.hideDialog()):(i.setCustomValidity("Invalid value"),i.setAttribute("data-trix-validate",""),i.classList.add("trix-validate"),i.focus())}isSafeAttribute(t){return!t.hasAttribute("data-trix-validate-href")||Ln.isValidAttribute("a","href",t.value)}removeAttribute(t){var e;const n=io(t);return null===(e=this.delegate)||void 0===e||e.toolbarDidRemoveAttribute(n),this.hideDialog()}hideDialog(){const t=this.element.querySelector(Qr);var e;if(t)return t.removeAttribute("data-trix-active"),t.classList.remove("trix-active"),this.resetDialogInputs(),null===(e=this.delegate)||void 0===e?void 0:e.toolbarDidHideDialog((t=>t.getAttribute("data-trix-dialog"))(t))}resetDialogInputs(){Array.from(this.element.querySelectorAll(to)).forEach(t=>{t.setAttribute("disabled","disabled"),t.removeAttribute("data-trix-validate"),t.classList.remove("trix-validate")})}getDialog(t){return this.element.querySelector("[data-trix-dialog=".concat(t,"]"))}}class oo extends br{constructor(t){let{editorElement:e,document:n,html:i}=t;super(...arguments),this.editorElement=e,this.selectionManager=new cr(this.editorElement),this.selectionManager.delegate=this,this.composition=new Yi,this.composition.delegate=this,this.attachmentManager=new Gi(this.composition.getAttachments()),this.attachmentManager.delegate=this,this.inputController=2===lt.getLevel()?new Vr(this.editorElement):new Or(this.editorElement),this.inputController.delegate=this,this.inputController.responder=this.composition,this.compositionController=new vr(this.editorElement,this.composition),this.compositionController.delegate=this,this.toolbarController=new ro(this.editorElement.toolbarElement),this.toolbarController.delegate=this,this.editor=new nr(this.composition,this.selectionManager,this.editorElement),n?this.editor.loadDocument(n):this.editor.loadHTML(i)}registerSelectionManager(){return re.registerSelectionManager(this.selectionManager)}unregisterSelectionManager(){return re.unregisterSelectionManager(this.selectionManager)}render(){return this.compositionController.render()}reparse(){return this.composition.replaceHTML(this.editorElement.innerHTML)}compositionDidChangeDocument(t){if(this.notifyEditorElement("document-change"),!this.handlingInput)return this.render()}compositionDidChangeCurrentAttributes(t){return this.currentAttributes=t,this.toolbarController.updateAttributes(this.currentAttributes),this.updateCurrentActions(),this.notifyEditorElement("attributes-change",{attributes:this.currentAttributes})}compositionDidPerformInsertionAtRange(t){this.pasting&&(this.pastedRange=t)}compositionShouldAcceptFile(t){return this.notifyEditorElement("file-accept",{file:t})}compositionDidAddAttachment(t){const e=this.attachmentManager.manageAttachment(t);return this.notifyEditorElement("attachment-add",{attachment:e})}compositionDidEditAttachment(t){this.compositionController.rerenderViewForObject(t);const e=this.attachmentManager.manageAttachment(t);return this.notifyEditorElement("attachment-edit",{attachment:e}),this.notifyEditorElement("change")}compositionDidChangeAttachmentPreviewURL(t){return this.compositionController.invalidateViewForObject(t),this.notifyEditorElement("change")}compositionDidRemoveAttachment(t){const e=this.attachmentManager.unmanageAttachment(t);return this.notifyEditorElement("attachment-remove",{attachment:e})}compositionDidStartEditingAttachment(t,e){return this.attachmentLocationRange=this.composition.document.getLocationRangeOfAttachment(t),this.compositionController.installAttachmentEditorForAttachment(t,e),this.selectionManager.setLocationRange(this.attachmentLocationRange)}compositionDidStopEditingAttachment(t){this.compositionController.uninstallAttachmentEditor(),this.attachmentLocationRange=null}compositionDidRequestChangingSelectionToLocationRange(t){if(!this.loadingSnapshot||this.isFocused())return this.requestedLocationRange=t,this.compositionRevisionWhenLocationRangeRequested=this.composition.revision,this.handlingInput?void 0:this.render()}compositionWillLoadSnapshot(){this.loadingSnapshot=!0}compositionDidLoadSnapshot(){this.compositionController.refreshViewCache(),this.render(),this.loadingSnapshot=!1}getSelectionManager(){return this.selectionManager}attachmentManagerDidRequestRemovalOfAttachment(t){return this.removeAttachment(t)}compositionControllerWillSyncDocumentView(){return this.inputController.editorWillSyncDocumentView(),this.selectionManager.lock(),this.selectionManager.clearSelection()}compositionControllerDidSyncDocumentView(){return this.inputController.editorDidSyncDocumentView(),this.selectionManager.unlock(),this.updateCurrentActions(),this.notifyEditorElement("sync")}compositionControllerDidRender(){this.requestedLocationRange&&(this.compositionRevisionWhenLocationRangeRequested===this.composition.revision&&this.selectionManager.setLocationRange(this.requestedLocationRange),this.requestedLocationRange=null,this.compositionRevisionWhenLocationRangeRequested=null),this.renderedCompositionRevision!==this.composition.revision&&(this.runEditorFilters(),this.composition.updateCurrentAttributes(),this.notifyEditorElement("render")),this.renderedCompositionRevision=this.composition.revision}compositionControllerDidFocus(){return this.isFocusedInvisibly()&&this.setLocationRange({index:0,offset:0}),this.toolbarController.hideDialog(),this.notifyEditorElement("focus")}compositionControllerDidBlur(){return this.notifyEditorElement("blur")}compositionControllerDidSelectAttachment(t,e){return this.toolbarController.hideDialog(),this.composition.editAttachment(t,e)}compositionControllerDidRequestDeselectingAttachment(t){const e=this.attachmentLocationRange||this.composition.document.getLocationRangeOfAttachment(t);return this.selectionManager.setLocationRange(e[1])}compositionControllerWillUpdateAttachment(t){return this.editor.recordUndoEntry("Edit Attachment",{context:t.id,consolidatable:!0})}compositionControllerDidRequestRemovalOfAttachment(t){return this.removeAttachment(t)}inputControllerWillHandleInput(){this.handlingInput=!0,this.requestedRender=!1}inputControllerDidRequestRender(){this.requestedRender=!0}inputControllerDidHandleInput(){if(this.handlingInput=!1,this.requestedRender)return this.requestedRender=!1,this.render()}inputControllerDidAllowUnhandledInput(){return this.notifyEditorElement("change")}inputControllerDidRequestReparse(){return this.reparse()}inputControllerWillPerformTyping(){return this.recordTypingUndoEntry()}inputControllerWillPerformFormatting(t){return this.recordFormattingUndoEntry(t)}inputControllerWillCutText(){return this.editor.recordUndoEntry("Cut")}inputControllerWillPaste(t){return this.editor.recordUndoEntry("Paste"),this.pasting=!0,this.notifyEditorElement("before-paste",{paste:t})}inputControllerDidPaste(t){return t.range=this.pastedRange,this.pastedRange=null,this.pasting=null,this.notifyEditorElement("paste",{paste:t})}inputControllerWillMoveText(){return this.editor.recordUndoEntry("Move")}inputControllerWillAttachFiles(){return this.editor.recordUndoEntry("Drop Files")}inputControllerWillPerformUndo(){return this.editor.undo()}inputControllerWillPerformRedo(){return this.editor.redo()}inputControllerDidReceiveKeyboardCommand(t){return this.toolbarController.applyKeyboardCommand(t)}inputControllerDidStartDrag(){this.locationRangeBeforeDrag=this.selectionManager.getLocationRange()}inputControllerDidReceiveDragOverPoint(t){return this.selectionManager.setLocationRangeFromPointRange(t)}inputControllerDidCancelDrag(){this.selectionManager.setLocationRange(this.locationRangeBeforeDrag),this.locationRangeBeforeDrag=null}locationRangeDidChange(t){return this.composition.updateCurrentAttributes(),this.updateCurrentActions(),this.attachmentLocationRange&&!te(this.attachmentLocationRange,t)&&this.composition.stopEditingAttachment(),this.notifyEditorElement("selection-change")}toolbarDidClickButton(){if(!this.getLocationRange())return this.setLocationRange({index:0,offset:0})}toolbarDidInvokeAction(t,e){return this.invokeAction(t,e)}toolbarDidToggleAttribute(t){if(this.recordFormattingUndoEntry(t),this.composition.toggleCurrentAttribute(t),this.render(),!this.selectionFrozen)return this.editorElement.focus()}toolbarDidUpdateAttribute(t,e){if(this.recordFormattingUndoEntry(t),this.composition.setCurrentAttribute(t,e),this.render(),!this.selectionFrozen)return this.editorElement.focus()}toolbarDidRemoveAttribute(t){if(this.recordFormattingUndoEntry(t),this.composition.removeCurrentAttribute(t),this.render(),!this.selectionFrozen)return this.editorElement.focus()}toolbarWillShowDialog(t){return this.composition.expandSelectionForEditing(),this.freezeSelection()}toolbarDidShowDialog(t){return this.notifyEditorElement("toolbar-dialog-show",{dialogName:t})}toolbarDidHideDialog(t){return this.thawSelection(),this.editorElement.focus(),this.notifyEditorElement("toolbar-dialog-hide",{dialogName:t})}freezeSelection(){if(!this.selectionFrozen)return this.selectionManager.lock(),this.composition.freezeSelection(),this.selectionFrozen=!0,this.render()}thawSelection(){if(this.selectionFrozen)return this.composition.thawSelection(),this.selectionManager.unlock(),this.selectionFrozen=!1,this.render()}canInvokeAction(t){return!!this.actionIsExternal(t)||!(null===(e=this.actions[t])||void 0===e||null===(e=e.test)||void 0===e||!e.call(this));var e}invokeAction(t,e){return this.actionIsExternal(t)?this.notifyEditorElement("action-invoke",{actionName:t,invokingElement:e}):null===(n=this.actions[t])||void 0===n||null===(n=n.perform)||void 0===n?void 0:n.call(this);var n}actionIsExternal(t){return/^x-./.test(t)}getCurrentActions(){const t={};for(const e in this.actions)t[e]=this.canInvokeAction(e);return t}updateCurrentActions(){const t=this.getCurrentActions();if(!Xt(t,this.currentActions))return this.currentActions=t,this.toolbarController.updateActions(this.currentActions),this.notifyEditorElement("actions-change",{actions:this.currentActions})}runEditorFilters(){let t=this.composition.getSnapshot();if(Array.from(this.editor.filters).forEach(e=>{const{document:n,selectedRange:i}=t;t=e.call(this.editor,t)||{},t.document||(t.document=n),t.selectedRange||(t.selectedRange=i)}),e=t,n=this.composition.getSnapshot(),!te(e.selectedRange,n.selectedRange)||!e.document.isEqualTo(n.document))return this.composition.loadSnapshot(t);var e,n}updateInputElement(){const t=function(t,e){const n=Wi[e];if(n)return n(t);throw new Error("unknown content type: ".concat(e))}(this.compositionController.getSerializableElement(),"text/html");return this.editorElement.setFormValue(t)}notifyEditorElement(t,e){switch(t){case"document-change":this.documentChangedSinceLastRender=!0;break;case"render":this.documentChangedSinceLastRender&&(this.documentChangedSinceLastRender=!1,this.notifyEditorElement("change"));break;case"change":case"attachment-add":case"attachment-edit":case"attachment-remove":this.updateInputElement()}return this.editorElement.notify(t,e)}removeAttachment(t){return this.editor.recordUndoEntry("Delete Attachment"),this.composition.removeAttachment(t),this.render()}recordFormattingUndoEntry(t){const e=_t(t),n=this.selectionManager.getLocationRange();if(e||!Zt(n))return this.editor.recordUndoEntry("Formatting",{context:this.getUndoContext(),consolidatable:!0})}recordTypingUndoEntry(){return this.editor.recordUndoEntry("Typing",{context:this.getUndoContext(this.currentAttributes),consolidatable:!0})}getUndoContext(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return[this.getLocationContext(),this.getTimeContext(),...Array.from(e)]}getLocationContext(){const t=this.selectionManager.getLocationRange();return Zt(t)?t[0].index:t}getTimeContext(){return ht.interval>0?Math.floor((new Date).getTime()/ht.interval):0}isFocused(){var t;return this.editorElement===(null===(t=this.editorElement.ownerDocument)||void 0===t?void 0:t.activeElement)}isFocusedInvisibly(){return this.isFocused()&&!this.getLocationRange()}get actions(){return this.constructor.actions}}ei(oo,"actions",{undo:{test(){return this.editor.canUndo()},perform(){return this.editor.undo()}},redo:{test(){return this.editor.canRedo()},perform(){return this.editor.redo()}},link:{test(){return this.editor.canActivateAttribute("href")}},increaseNestingLevel:{test(){return this.editor.canIncreaseNestingLevel()},perform(){return this.editor.increaseNestingLevel()&&this.render()}},decreaseNestingLevel:{test(){return this.editor.canDecreaseNestingLevel()},perform(){return this.editor.decreaseNestingLevel()&&this.render()}},attachFiles:{test:()=>!0,perform(){return lt.pickFiles(this.editor.insertFiles)}}}),oo.proxyMethod("getSelectionManager().setLocationRange"),oo.proxyMethod("getSelectionManager().getLocationRange");var so=Object.freeze({__proto__:null,AttachmentEditorController:fr,CompositionController:vr,Controller:br,EditorController:oo,InputController:Tr,Level0InputController:Or,Level2InputController:Vr,ToolbarController:ro}),ao=Object.freeze({__proto__:null,MutationObserver:wr,SelectionChangeObserver:ie}),lo=Object.freeze({__proto__:null,FileVerificationOperation:Cr,ImagePreloadOperation:ci});Ut("trix-toolbar","%t {\n display: block;\n}\n\n%t {\n white-space: nowrap;\n}\n\n%t [data-trix-dialog] {\n display: none;\n}\n\n%t [data-trix-dialog][data-trix-active] {\n display: block;\n}\n\n%t [data-trix-dialog] [data-trix-validate]:invalid {\n background-color: #ffdddd;\n}");class co extends HTMLElement{connectedCallback(){""===this.innerHTML&&(this.innerHTML=dt.getDefaultHTML())}get editorElements(){if(this.id){var t;const e=null===(t=this.ownerDocument)||void 0===t?void 0:t.querySelectorAll('trix-editor[toolbar="'.concat(this.id,'"]'));return Array.from(e)}return[]}get editorElement(){const[t]=this.editorElements;return t}}let uo=0;const ho=function(t){return mo(t),po(t)},mo=function(t){var e,n;if(null!==(e=(n=document).queryCommandSupported)&&void 0!==e&&e.call(n,"enableObjectResizing"))return document.execCommand("enableObjectResizing",!1,!1),V("mscontrolselect",{onElement:t,preventDefault:!0})},po=function(t){var e,n;if(null!==(e=(n=document).queryCommandSupported)&&void 0!==e&&e.call(n,"DefaultParagraphSeparator")){const{tagName:t}=S.default;if(["div","p"].includes(t))return document.execCommand("DefaultParagraphSeparator",!1,t)}},go=B.forcesObjectResizing?{display:"inline",width:"auto"}:{display:"inline-block",width:"1px"};Ut("trix-editor","%t {\n display: block;\n}\n\n%t:empty::before {\n content: attr(placeholder);\n color: graytext;\n cursor: text;\n pointer-events: none;\n white-space: pre-line;\n}\n\n%t a[contenteditable=false] {\n cursor: text;\n}\n\n%t img {\n max-width: 100%;\n height: auto;\n}\n\n%t ".concat(C," figcaption textarea {\n resize: none;\n}\n\n%t ").concat(C," figcaption textarea.trix-autoresize-clone {\n position: absolute;\n left: -9999px;\n max-height: 0px;\n}\n\n%t ").concat(C," figcaption[data-trix-placeholder]:empty::before {\n content: attr(data-trix-placeholder);\n color: graytext;\n}\n\n%t [data-trix-cursor-target] {\n display: ").concat(go.display," !important;\n width: ").concat(go.width," !important;\n padding: 0 !important;\n margin: 0 !important;\n border: none !important;\n}\n\n%t [data-trix-cursor-target=left] {\n vertical-align: top !important;\n margin-left: -1px !important;\n}\n\n%t [data-trix-cursor-target=right] {\n vertical-align: bottom !important;\n margin-right: -1px !important;\n}"));var fo=new WeakMap,vo=new WeakMap,bo=new WeakSet;class yo{constructor(t){var e;si(this,e=bo),e.add(this),ei(this,"value",""),ai(this,fo,{writable:!0,value:void 0}),ai(this,vo,{writable:!0,value:void 0}),this.element=t,ii(this,fo,t.attachInternals()),ii(this,vo,!1)}connectedCallback(){oi(this,bo,Ao).call(this)}disconnectedCallback(){}get form(){return ni(this,fo).form}get name(){return this.element.getAttribute("name")}set name(t){this.element.setAttribute("name",t)}get labels(){return ni(this,fo).labels}get disabled(){return ni(this,vo)||this.element.hasAttribute("disabled")}set disabled(t){this.element.toggleAttribute("disabled",t)}get required(){return this.element.hasAttribute("required")}set required(t){this.element.toggleAttribute("required",t),oi(this,bo,Ao).call(this)}get validity(){return ni(this,fo).validity}get validationMessage(){return ni(this,fo).validationMessage}get willValidate(){return ni(this,fo).willValidate}formDisabledCallback(t){ii(this,vo,t)}setFormValue(t){this.value=t,oi(this,bo,Ao).call(this),ni(this,fo).setFormValue(this.element.disabled?void 0:this.value)}checkValidity(){return ni(this,fo).checkValidity()}reportValidity(){return ni(this,fo).reportValidity()}setCustomValidity(t){oi(this,bo,Ao).call(this,t)}}function Ao(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{required:e,value:n}=this.element,i=e&&!n,r=!!t,o=X("input",{required:e}),s=t||o.validationMessage;ni(this,fo).setValidity({valueMissing:i,customError:r},s)}var xo=new WeakMap,wo=new WeakMap,ko=new WeakMap;class Co{constructor(t){ai(this,xo,{writable:!0,value:void 0}),ai(this,wo,{writable:!0,value:t=>{t.defaultPrevented||t.target===this.element.form&&this.element.reset()}}),ai(this,ko,{writable:!0,value:t=>{if(t.defaultPrevented)return;if(this.element.contains(t.target))return;const e=W(t.target,{matchingSelector:"label"});e&&Array.from(this.labels).includes(e)&&this.element.focus()}}),this.element=t}connectedCallback(){ii(this,xo,function(t){if(t.hasAttribute("aria-label")||t.hasAttribute("aria-labelledby"))return;const e=function(){const e=Array.from(t.labels).map(e=>{if(!e.contains(t))return e.textContent}).filter(t=>t).join(" ");return e?t.setAttribute("aria-label",e):t.removeAttribute("aria-label")};return e(),V("focus",{onElement:t,withCallback:e})}(this.element)),window.addEventListener("reset",ni(this,wo),!1),window.addEventListener("click",ni(this,ko),!1)}disconnectedCallback(){var t;null===(t=ni(this,xo))||void 0===t||t.destroy(),window.removeEventListener("reset",ni(this,wo),!1),window.removeEventListener("click",ni(this,ko),!1)}get labels(){const t=[];
2this.element.id&&this.element.ownerDocument&&t.push(...Array.from(this.element.ownerDocument.querySelectorAll("label[for='".concat(this.element.id,"']"))||[]));const e=W(this.element,{matchingSelector:"label"});return e&&[this.element,null].includes(e.control)&&t.push(e),t}get form(){return console.warn("This browser does not support the .form property for trix-editor elements."),null}get name(){return console.warn("This browser does not support the .name property for trix-editor elements."),null}set name(t){console.warn("This browser does not support the .name property for trix-editor elements.")}get disabled(){return console.warn("This browser does not support the [disabled] attribute for trix-editor elements."),!1}set disabled(t){console.warn("This browser does not support the [disabled] attribute for trix-editor elements.")}get required(){return console.warn("This browser does not support the [required] attribute for trix-editor elements."),!1}set required(t){console.warn("This browser does not support the [required] attribute for trix-editor elements.")}get validity(){return console.warn("This browser does not support the validity property for trix-editor elements."),null}get validationMessage(){return console.warn("This browser does not support the validationMessage property for trix-editor elements."),""}get willValidate(){return console.warn("This browser does not support the willValidate property for trix-editor elements."),!1}formDisabledCallback(t){}setFormValue(t){}checkValidity(){return console.warn("This browser does not support checkValidity() for trix-editor elements."),!0}reportValidity(){return console.warn("This browser does not support reportValidity() for trix-editor elements."),!0}setCustomValidity(t){console.warn("This browser does not support setCustomValidity(validationMessage) for trix-editor elements.")}}var Eo=new WeakMap;class So extends HTMLElement{constructor(){super(),ai(this,Eo,{writable:!0,value:void 0}),this.willCreateInput=!0,ii(this,Eo,this.constructor.formAssociated?new yo(this):new Co(this))}get trixId(){return this.hasAttribute("trix-id")?this.getAttribute("trix-id"):(this.setAttribute("trix-id",++uo),this.trixId)}get labels(){return ni(this,Eo).labels}get disabled(){const{inputElement:t}=this;return t?t.disabled:ni(this,Eo).disabled}set disabled(t){const{inputElement:e}=this;e&&(e.disabled=t),ni(this,Eo).disabled=t}get required(){return ni(this,Eo).required}set required(t){ni(this,Eo).required=t}get validity(){return ni(this,Eo).validity}get validationMessage(){return ni(this,Eo).validationMessage}get willValidate(){return ni(this,Eo).willValidate}get type(){return this.localName}get toolbarElement(){var t;if(this.hasAttribute("toolbar"))return null===(t=this.ownerDocument)||void 0===t?void 0:t.getElementById(this.getAttribute("toolbar"));if(this.parentNode){const t="trix-toolbar-".concat(this.trixId);return this.setAttribute("toolbar",t),this.internalToolbar=X("trix-toolbar",{id:t}),this.parentNode.insertBefore(this.internalToolbar,this),this.internalToolbar}}get form(){const{inputElement:t}=this;return t?t.form:ni(this,Eo).form}get inputElement(){var t;return this.hasAttribute("input")?null===(t=this.ownerDocument)||void 0===t?void 0:t.getElementById(this.getAttribute("input")):void 0}get editor(){var t;return null===(t=this.editorController)||void 0===t?void 0:t.editor}get name(){const{inputElement:t}=this;return t?t.name:ni(this,Eo).name}set name(t){const{inputElement:e}=this;e?e.name=t:ni(this,Eo).name=t}get value(){const{inputElement:t}=this;return t?t.value:ni(this,Eo).value}set value(t){var e;this.defaultValue=t,null===(e=this.editor)||void 0===e||e.loadHTML(this.defaultValue)}attributeChangedCallback(t,e,n){"connected"===t&&this.isConnected&&null!=e&&e!==n&&requestAnimationFrame(()=>this.reconnect())}notify(t,e){if(this.editorController)return U("trix-".concat(t),{onElement:this,attributes:e})}setFormValue(t){const{inputElement:e}=this;e&&(e.value=t),ni(this,Eo).setFormValue(t)}connectedCallback(){if(!this.hasAttribute("data-trix-internal")){if(function(t){if(!t.hasAttribute("contenteditable"))t.toggleAttribute("contenteditable",!t.disabled),function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.times=1,V(t,e)}("focus",{onElement:t,withCallback:()=>ho(t)})}(this),function(t){t.hasAttribute("role")||t.setAttribute("role","textbox")}(this),!this.editorController){if(U("trix-before-initialize",{onElement:this}),this.defaultValue=this.inputElement?this.inputElement.value:this.innerHTML,!this.hasAttribute("input")&&this.parentNode&&this.willCreateInput){const t="trix-input-".concat(this.trixId);this.setAttribute("input",t);const e=X("input",{type:"hidden",id:t});this.parentNode.insertBefore(e,this.nextElementSibling)}this.editorController=new oo({editorElement:this,html:this.defaultValue}),requestAnimationFrame(()=>U("trix-initialize",{onElement:this}))}this.editorController.registerSelectionManager(),ni(this,Eo).connectedCallback(),this.toggleAttribute("connected",!0),function(t){!document.querySelector(":focus")&&t.hasAttribute("autofocus")&&document.querySelector("[autofocus]")===t&&t.focus()}(this)}}disconnectedCallback(){var t;null===(t=this.editorController)||void 0===t||t.unregisterSelectionManager(),ni(this,Eo).disconnectedCallback(),this.toggleAttribute("connected",!1)}reconnect(){this.removeInternalToolbar(),this.disconnectedCallback(),this.connectedCallback()}removeInternalToolbar(){var t;null===(t=this.internalToolbar)||void 0===t||t.remove(),this.internalToolbar=null}checkValidity(){return ni(this,Eo).checkValidity()}reportValidity(){return ni(this,Eo).reportValidity()}setCustomValidity(t){ni(this,Eo).setCustomValidity(t)}formDisabledCallback(t){const{inputElement:e}=this;e&&(e.disabled=t),this.toggleAttribute("contenteditable",!t),ni(this,Eo).formDisabledCallback(t)}formResetCallback(){this.reset()}reset(){this.value=this.defaultValue}}ei(So,"formAssociated","ElementInternals"in window),ei(So,"observedAttributes",["connected"]);const Fo={VERSION:"2.1.19",config:mt,core:Hi,models:ur,views:dr,controllers:so,observers:ao,operations:lo,elements:Object.freeze({__proto__:null,TrixEditorElement:So,TrixToolbarElement:co}),filters:Object.freeze({__proto__:null,Filter:Zi,attachmentGalleryFilter:tr})};Object.assign(Fo,ur),window.Trix=Fo,setTimeout(function(){customElements.get("trix-toolbar")||customElements.define("trix-toolbar",co),customElements.get("trix-editor")||customElements.define("trix-editor",So)},0);
vendor: 5,655 bytes, line 2
2var Do=n(9931);function To(t,e){if(Array.prototype.indexOf)return t.indexOf(e);for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1}function Bo(t,e){for(var n=t.length-1;n>=0;n--)!0===e(t[n])&&t.splice(n,1)}function Ro(t){throw new Error("Unhandled case for value: '".concat(t,"'"))}var No=function(){function t(t){void 0===t&&(t={}),this.tagName="",this.attrs={},this.innerHTML="",this.whitespaceRegex=/\s+/,this.tagName=t.tagName||"",this.attrs=t.attrs||{},this.innerHTML=t.innerHtml||t.innerHTML||""}return t.prototype.setTagName=function(t){return this.tagName=t,this},t.prototype.getTagName=function(){return this.tagName||""},t.prototype.setAttr=function(t,e){return this.getAttrs()[t]=e,this},t.prototype.getAttr=function(t){return this.getAttrs()[t]},t.prototype.setAttrs=function(t){return Object.assign(this.getAttrs(),t),this},t.prototype.getAttrs=function(){return this.attrs||(this.attrs={})},t.prototype.setClass=function(t){return this.setAttr("class",t)},t.prototype.addClass=function(t){for(var e,n=this.getClass(),i=this.whitespaceRegex,r=n?n.split(i):[],o=t.split(i);e=o.shift();)-1===To(r,e)&&r.push(e);return this.getAttrs().class=r.join(" "),this},t.prototype.removeClass=function(t){for(var e,n=this.getClass(),i=this.whitespaceRegex,r=n?n.split(i):[],o=t.split(i);r.length&&(e=o.shift());){var s=To(r,e);-1!==s&&r.splice(s,1)}return this.getAttrs().class=r.join(" "),this},t.prototype.getClass=function(){return this.getAttrs().class||""},t.prototype.hasClass=function(t){return-1!==(" "+this.getClass()+" ").indexOf(" "+t+" ")},t.prototype.setInnerHTML=function(t){return this.innerHTML=t,this},t.prototype.setInnerHtml=function(t){return this.setInnerHTML(t)},t.prototype.getInnerHTML=function(){return this.innerHTML||""},t.prototype.getInnerHtml=function(){return this.getInnerHTML()},t.prototype.toAnchorString=function(){var t=this.getTagName(),e=this.buildAttrsStr();return["<",t,e=e?" "+e:"",">",this.getInnerHtml(),"</",t,">"].join("")},t.prototype.buildAttrsStr=function(){if(!this.attrs)return"";var t=this.getAttrs(),e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n+'="'+t[n]+'"');return e.join(" ")},t}();var Lo=function(){function t(t){void 0===t&&(t={}),this.newWindow=!1,this.truncate={},this.className="",this.newWindow=t.newWindow||!1,this.truncate=t.truncate||{},this.className=t.className||""}return t.prototype.build=function(t){return new No({tagName:"a",attrs:this.createAttrs(t),innerHtml:this.processAnchorText(t.getAnchorText())})},t.prototype.createAttrs=function(t){var e={href:t.getAnchorHref()},n=this.createCssClass(t);return n&&(e.class=n),this.newWindow&&(e.target="_blank",e.rel="noopener noreferrer"),this.truncate&&this.truncate.length&&this.truncate.length<t.getAnchorText().length&&(e.title=t.getAnchorHref()),e},t.prototype.createCssClass=function(t){var e=this.className;if(e){for(var n=[e],i=t.getCssClassSuffixes(),r=0,o=i.length;r<o;r++)n.push(e+"-"+i[r]);return n.join(" ")}return""},t.prototype.processAnchorText=function(t){return t=this.doTruncate(t)},t.prototype.doTruncate=function(t){var e=this.truncate;if(!e||!e.length)return t;var n=e.length,i=e.location;return"smart"===i?function(t,e,n){var i,r;null==n?(n="…",r=3,i=8):(r=n.length,i=n.length);var o=function(t){var e="";return t.scheme&&t.host&&(e+=t.scheme+"://"),t.host&&(e+=t.host),t.path&&(e+="/"+t.path),t.query&&(e+="?"+t.query),t.fragment&&(e+="#"+t.fragment),e},s=function(t,e){var i=e/2,r=Math.ceil(i),o=-1*Math.floor(i),s="";return o<0&&(s=t.substr(o)),t.substr(0,r)+n+s};if(t.length<=e)return t;var a=e-r,l=function(t){var e={},n=t,i=n.match(/^([a-z]+):\/\//i);return i&&(e.scheme=i[1],n=n.substr(i[0].length)),(i=n.match(/^(.*?)(?=(\?|#|\/|$))/i))&&(e.host=i[1],n=n.substr(i[0].length)),(i=n.match(/^\/(.*?)(?=(\?|#|$))/i))&&(e.path=i[1],n=n.substr(i[0].length)),(i=n.match(/^\?(.*?)(?=(#|$))/i))&&(e.query=i[1],n=n.substr(i[0].length)),(i=n.match(/^#(.*?)$/i))&&(e.fragment=i[1]),e}(t);if(l.query){var c=l.query.match(/^(.*?)(?=(\?|\#))(.*?)$/i);c&&(l.query=l.query.substr(0,c[1].length),t=o(l))}if(t.length<=e)return t;if(l.host&&(l.host=l.host.replace(/^www\./,""),t=o(l)),t.length<=e)return t;var u="";if(l.host&&(u+=l.host),u.length>=a)return l.host.length==e?(l.host.substr(0,e-r)+n).substr(0,a+i):s(u,a).substr(0,a+i);var d="";if(l.path&&(d+="/"+l.path),l.query&&(d+="?"+l.query),d){if((u+d).length>=a)return(u+d).length==e?(u+d).substr(0,e):(u+s(d,a-u.length)).substr(0,a+i);u+=d}if(l.fragment){var h="#"+l.fragment;if((u+h).length>=a)return(u+h).length==e?(u+h).substr(0,e):(u+s(h,a-u.length)).substr(0,a+i);u+=h}if(l.scheme&&l.host){var m=l.scheme+"://";if((u+m).length<a)return(m+u).substr(0,e)}if(u.length<=e)return u;var p="";return a>0&&(p=u.substr(-1*Math.floor(a/2))),(u.substr(0,Math.ceil(a/2))+n+p).substr(0,a+i)}(t,n):"middle"===i?function(t,e,n){if(t.length<=e)return t;var i,r;null==n?(n="…",i=8,r=3):(i=n.length,r=n.length);var o=e-r,s="";return o>0&&(s=t.substr(-1*Math.floor(o/2))),(t.substr(0,Math.ceil(o/2))+n+s).substr(0,o+i)}(t,n):function(t,e,n){return function(t,e,n){var i;return t.length>e&&(null==n?(n="…",i=3):i=n.length,t=t.substring(0,e-i)+n),t}(t,e,n)}(t,n)},t}(),Oo=function(){function t(t){this.__jsduckDummyDocProp=null,this.matchedText="",this.offset=0,this.tagBuilder=t.tagBuilder,this.matchedText=t.matchedText,this.offset=t.offset}return t.prototype.getMatchedText=function(){return this.matchedText},t.prototype.setOffset=function(t){this.offset=t},t.prototype.getOffset=function(){return this.offset},t.prototype.getCssClassSuffixes=function(){return[this.getType()]},t.prototype.buildTag=function(){return this.tagBuilder.build(this)},t}
vendor: 7,008 bytes, line 2
2(),Mo=function(t,e){return Mo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},Mo(t,e)};function Po(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Mo(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var Io=function(){return Io=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},Io.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;var _o,zo=function(t){function e(e){var n=t.call(this,e)||this;return n.email="",n.email=e.email,n}return Po(e,t),e.prototype.getType=function(){return"email"},e.prototype.getEmail=function(){return this.email},e.prototype.getAnchorHref=function(){return"mailto:"+this.email},e.prototype.getAnchorText=function(){return this.email},e}(Oo),Vo=function(t){function e(e){var n=t.call(this,e)||this;return n.serviceName="",n.hashtag="",n.serviceName=e.serviceName,n.hashtag=e.hashtag,n}return Po(e,t),e.prototype.getType=function(){return"hashtag"},e.prototype.getServiceName=function(){return this.serviceName},e.prototype.getHashtag=function(){return this.hashtag},e.prototype.getAnchorHref=function(){var t=this.serviceName,e=this.hashtag;switch(t){case"twitter":return"https://twitter.com/hashtag/"+e;case"facebook":return"https://www.facebook.com/hashtag/"+e;case"instagram":return"https://instagram.com/explore/tags/"+e;case"tiktok":return"https://www.tiktok.com/tag/"+e;default:throw new Error("Unknown service name to point hashtag to: "+t)}},e.prototype.getAnchorText=function(){return"#"+this.hashtag},e}(Oo),jo=function(t){function e(e){var n=t.call(this,e)||this;return n.serviceName="twitter",n.mention="",n.mention=e.mention,n.serviceName=e.serviceName,n}return Po(e,t),e.prototype.getType=function(){return"mention"},e.prototype.getMention=function(){return this.mention},e.prototype.getServiceName=function(){return this.serviceName},e.prototype.getAnchorHref=function(){switch(this.serviceName){case"twitter":return"https://twitter.com/"+this.mention;case"instagram":return"https://instagram.com/"+this.mention;case"soundcloud":return"https://soundcloud.com/"+this.mention;case"tiktok":return"https://www.tiktok.com/@"+this.mention;default:throw new Error("Unknown service name to point mention to: "+this.serviceName)}},e.prototype.getAnchorText=function(){return"@"+this.mention},e.prototype.getCssClassSuffixes=function(){var e=t.prototype.getCssClassSuffixes.call(this),n=this.getServiceName();return n&&e.push(n),e},e}(Oo),Uo=function(t){function e(e){var n=t.call(this,e)||this;return n.number="",n.plusSign=!1,n.number=e.number,n.plusSign=e.plusSign,n}return Po(e,t),e.prototype.getType=function(){return"phone"},e.prototype.getPhoneNumber=function(){return this.number},e.prototype.getNumber=function(){return this.getPhoneNumber()},e.prototype.getAnchorHref=function(){return"tel:"+(this.plusSign?"+":"")+this.number},e.prototype.getAnchorText=function(){return this.matchedText},e}(Oo),qo=function(t){function e(e){var n=t.call(this,e)||this;return n.url="",n.urlMatchType="scheme",n.protocolUrlMatch=!1,n.protocolRelativeMatch=!1,n.stripPrefix={scheme:!0,www:!0},n.stripTrailingSlash=!0,n.decodePercentEncoding=!0,n.schemePrefixRegex=/^(https?:\/\/)?/i,n.wwwPrefixRegex=/^(https?:\/\/)?(www\.)?/i,n.protocolRelativeRegex=/^\/\//,n.protocolPrepended=!1,n.urlMatchType=e.urlMatchType,n.url=e.url,n.protocolUrlMatch=e.protocolUrlMatch,n.protocolRelativeMatch=e.protocolRelativeMatch,n.stripPrefix=e.stripPrefix,n.stripTrailingSlash=e.stripTrailingSlash,n.decodePercentEncoding=e.decodePercentEncoding,n}return Po(e,t),e.prototype.getType=function(){return"url"},e.prototype.getUrlMatchType=function(){return this.urlMatchType},e.prototype.getUrl=function(){var t=this.url;return this.protocolRelativeMatch||this.protocolUrlMatch||this.protocolPrepended||(t=this.url="http://"+t,this.protocolPrepended=!0),t},e.prototype.getAnchorHref=function(){return this.getUrl().replace(/&/g,"&")},e.prototype.getAnchorText=function(){var t=this.getMatchedText();return this.protocolRelativeMatch&&(t=this.stripProtocolRelativePrefix(t)),this.stripPrefix.scheme&&(t=this.stripSchemePrefix(t)),this.stripPrefix.www&&(t=this.stripWwwPrefix(t)),this.stripTrailingSlash&&(t=this.removeTrailingSlash(t)),this.decodePercentEncoding&&(t=this.removePercentEncoding(t)),t},e.prototype.stripSchemePrefix=function(t){return t.replace(this.schemePrefixRegex,"")},e.prototype.stripWwwPrefix=function(t){return t.replace(this.wwwPrefixRegex,"$1")},e.prototype.stripProtocolRelativePrefix=function(t){return t.replace(this.protocolRelativeRegex,"")},e.prototype.removeTrailingSlash=function(t){return"/"===t.charAt(t.length-1)&&(t=t.slice(0,-1)),t},e.prototype.removePercentEncoding=function(t){var e=t.replace(/%22/gi,""").replace(/%26/gi,"&").replace(/%27/gi,"'").replace(/%3C/gi,"<").replace(/%3E/gi,">");try{return decodeURIComponent(e)}catch(t){return e}},e}(Oo),Wo=function(t){this.__jsduckDummyDocProp=null,this.tagBuilder=t.tagBuilder},Ho=/[A-Za-z]/,$o=/[\d]/,Go=/[\D]/,Ko=/\s/,Yo=/['"]/,Jo=/[\x00-\x1F\x7F]/,Xo=/A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u
20EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source,Qo=Xo+/\u2700-\u27bf\udde6-\uddff\ud800-\udbff\udc00-\udfff\ufe0e\ufe0f\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0\ud83c\udffb-\udfff\u200d\u3299\u3297\u303d\u3030\u24c2\ud83c\udd70-\udd71\udd7e-\udd7f\udd8e\udd91-\udd9a\udde6-\uddff\ude01-\ude02\ude1a\ude2f\ude32-\ude3a\ude50-\ude51\u203c\u2049\u25aa-\u25ab\u25b6\u25c0\u25fb-\u25fe\u00a9\u00ae\u2122\u2139\udc04\u2600-\u26FF\u2b05\u2b06\u2b07\u2b1b\u2b1c\u2b50\u2b55\u231a\u231b\u2328\u23cf\u23e9-\u23f3\u23f8-\u23fa\udccf\u2935\u2934\u2190-\u21ff/.source+/\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D
27F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F/.source,Zo=/0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19/.source,ts=Qo+Zo,es=Qo+Zo,ns=new RegExp("[".concat(es,"]")),is="(?:["+Zo+"]{1,3}\\.){3}["+Zo+"]{1,3}",rs="["+es+"](?:["+es+"\\-_]{0,61}["+es+"])?",os=function(t){return"(?=("+rs+"))\\"+t},ss=function(t){return"(?:"+os(t)+"(?:\\."+os(t+1)+"){0,126}|"+is+")"},as=(new RegExp("["+es+".\\-]*["+es+"\\-]"),ns),ls
vendor: 11,453 bytes, line 2
2=/(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|northwesternmutual|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbaakc7dvf|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|bananarepublic|cancerresearch|cookingchannel|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--jlq61u9w7b|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|travelchannel|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|foodnetwork|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|à®à®¿à®à¯à®à®ªà¯à®ªà¯à®°à¯|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|volkswagen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|alfaromeo|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|frontdoor|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|passagens|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|Ù
ÙØ±ÙتاÙÙØ§|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cityeats|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|etisalat|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|guardian|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|maserati|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|showtime|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|Ø§ÙØ³Ø¹ÙØ¯ÙØ©|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|avianca|banamex|bauhaus|bentley|bestbuy|booking|brother|bugatti|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|comcast|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hoteles|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|oldnavy|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|tiffany|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|xfinity|yamaxun|youtube|zuerich|каÑолик|Ø§ØªØµØ§ÙØ§Øª|Ø§ÙØ¨ØØ±ÙÙ|Ø§ÙØ¬Ø²Ø§Ø¦Ø±|Ø§ÙØ¹ÙÙØ§Ù|پاکستاÙ|ÙØ§Ø«ÙÙÙÙ|à®à®¨à¯à®¤à®¿à®¯à®¾|abarth|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kinder|kindle|kosher|lancia|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|mutual|nagoya|natura|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rocher|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|vuelos|walter|webcam|xihuan|yachts|yandex|zappos|моÑква|онлайн|Ø§Ø¨ÙØ¸Ø¨Ù|اراÙ
ÙÙ|Ø§ÙØ§Ø±Ø¯Ù|اÙÙ
غرب|اÙ
ارات|ÙÙØ³Ø·ÙÙ|Ù
ÙÙØ³Ùا|à¤à¤¾à¤°à¤¤à¤®à¥|à®à®²à®à¯à®à¯|ãã¡ãã·ã§ã³|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dabur|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|linde|lipsy|loans|locus|lotte|lotto|macys|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|×שר××|Ø§ÛØ±Ø§Ù|بازار|بھارت|Ø³ÙØ¯Ø§Ù|Ø³ÙØ±ÙØ©|ÙÙ
راÙ|à¤à¤¾à¤°à¥à¤¤|सà¤à¤à¤ न|বাà¦à¦²à¦¾|à°à°¾à°°à°¤à±|à´à´¾à´°à´¤à´|åé大é
åº|aarp|able|adac|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fiat|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|hgtv|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|loft|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shaw|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|деÑи|ÑайÑ|بارت|Ø¨ÙØªÙ|ÚØ§Ø±Øª|تÙÙØ³|Ø´Ø¨ÙØ©|عراÙ|عÙ
اÙ|Ù
ÙÙØ¹|à¤à¤¾à¤°à¤¤|à¦à¦¾à¦°à¦¤|à¦à¦¾à§°à¦¤|à¨à¨¾à¨°à¨¤|àªàª¾àª°àª¤|à¬à¬¾à¬°à¬¤|à²à²¾à²°à²¤|à¶½à¶à¶à·|ã¢ãã¾ã³|ã°ã¼ã°ã«|ã¯ã©ã¦ã|ãã¤ã³ã|ç»ç»æºæ|é»è¨çç§|馿 ¼éæ|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|cbs|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|sca|scb|ses|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|Òаз|мкд|мон|оÑг|ÑÑÑ|ÑÑб|ÑкÑ|Õ°Õ¡Õµ|×§××|عرب|ÙØ·Ø±|ÙÙÙ
|Ù
صر|à¤à¥à¤®|नà¥à¤|à¸à¸à¸¡|à¹à¸à¸¢|ລາວ|ã¹ãã¢|ã»ã¼ã«|ã¿ããª|䏿ç½|äºé©¬é|天主æ|æç±ä½ |æ°å å¡|淡马é¡|诺åºäº|é£å©æµ¦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|εÏ
|бг|еÑ|ÑÑ|áá|ë·ë·|ë·ì»´|ì¼ì±|íêµ|ã³ã |ä¸ç|ä¸ä¿¡|ä¸å½|ä¸å|ä¼ä¸|ä½å±±|ä¿¡æ¯|å¥åº·|å
«å¦|å
¬å¸|å
¬ç|å°æ¹¾|å°ç£|åå|ååº|åæ |åé|å¨çº¿|大æ¿|娱ä¹|å®¶é»|广ä¸|å¾®å|æ
å|ææº|æè|æ¿å¡|æ¿åº|æ°é»|æ¶å°|æ¸ç±|æºæ|游æ|æ¾³é|ç¹ç|ç§»å¨|ç½å|ç½åº|ç½ç«|ç½ç»|èé|è°·æ|è´ç©|é販|éå¢|é£å|é¤å
|馿¸¯)/,
vendor: 5,941 bytes, line 2
2cs=new RegExp("[".concat(es,"!#$%&'*+/=?^_`{|}~-]")),us=new RegExp("^".concat(ls.source,"$")),ds=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.localPartCharRegex=cs,e.strictTldRegex=us,e}return Po(e,t),e.prototype.parseMatches=function(t){for(var e=this.tagBuilder,n=this.localPartCharRegex,i=this.strictTldRegex,r=[],o=t.length,s=new hs,a={m:"a",a:"i",i:"l",l:"t",t:"o",o:":"},l=0,c=0,u=s;l<o;){var d=t.charAt(l);switch(c){case 0:h(d);break;case 1:m(t.charAt(l-1),d);break;case 2:p(d);break;case 3:g(d);break;case 4:f(d);break;case 5:v(d);break;case 6:b(d);break;case 7:y(d);break;default:Ro(c)}l++}return w(),r;function h(t){"m"===t?A(1):n.test(t)&&A()}function m(t,e){":"===t?n.test(e)?(c=2,u=new hs(Io(Io({},u),{hasMailtoPrefix:!0}))):x():a[t]===e||(n.test(e)?c=2:"."===e?c=3:"@"===e?c=4:x())}function p(t){"."===t?c=3:"@"===t?c=4:n.test(t)||x()}function g(t){"."===t||"@"===t?x():n.test(t)?c=2:x()}function f(t){as.test(t)?c=5:x()}function v(t){"."===t?c=7:"-"===t?c=6:as.test(t)||w()}function b(t){"-"===t||"."===t?w():as.test(t)?c=5:w()}function y(t){"."===t||"-"===t?w():as.test(t)?(c=5,u=new hs(Io(Io({},u),{hasDomainDot:!0}))):w()}function A(t){void 0===t&&(t=2),c=t,u=new hs({idx:l})}function x(){c=0,u=s}function w(){if(u.hasDomainDot){var n=t.slice(u.idx,l);/[-.]$/.test(n)&&(n=n.slice(0,-1));var o=u.hasMailtoPrefix?n.slice(7):n;(function(t){var e=t.split(".").pop()||"",n=e.toLowerCase();return i.test(n)})(o)&&r.push(new zo({tagBuilder:e,matchedText:n,offset:u.idx,email:o}))}x()}},e}(Wo),hs=function(t){void 0===t&&(t={}),this.idx=void 0!==t.idx?t.idx:-1,this.hasMailtoPrefix=!!t.hasMailtoPrefix,this.hasDomainDot=!!t.hasDomainDot},ms=function(){function t(){}return t.isValid=function(t,e){return!(e&&!this.isValidUriScheme(e)||this.urlMatchDoesNotHaveProtocolOrDot(t,e)||this.urlMatchDoesNotHaveAtLeastOneWordChar(t,e)&&!this.isValidIpAddress(t)||this.containsMultipleDots(t))},t.isValidIpAddress=function(t){var e=new RegExp(this.hasFullProtocolRegex.source+this.ipRegex.source);return null!==t.match(e)},t.containsMultipleDots=function(t){var e=t;return this.hasFullProtocolRegex.test(t)&&(e=t.split("://")[1]),e.split("/")[0].indexOf("..")>-1},t.isValidUriScheme=function(t){var e=t.match(this.uriSchemeRegex),n=e&&e[0].toLowerCase();return"javascript:"!==n&&"vbscript:"!==n},t.urlMatchDoesNotHaveProtocolOrDot=function(t,e){return!(!t||e&&this.hasFullProtocolRegex.test(e)||-1!==t.indexOf("."))},t.urlMatchDoesNotHaveAtLeastOneWordChar=function(t,e){return!(!t||!e)&&(!this.hasFullProtocolRegex.test(e)&&!this.hasWordCharAfterProtocolRegex.test(t))},t.hasFullProtocolRegex=/^[A-Za-z][-.+A-Za-z0-9]*:\/\//,t.uriSchemeRegex=/^[A-Za-z][-.+A-Za-z0-9]*:/,t.hasWordCharAfterProtocolRegex=new RegExp(":[^\\s]*?["+Xo+"]"),t.ipRegex=/[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?(:[0-9]*)?\/?$/,t}(),ps=(_o=new RegExp("[/?#](?:["+es+"\\-+&@#/%=~_()|'$*\\[\\]{}?!:,.;^â]*["+es+"\\-+&@#/%=~_()|'$*\\[\\]{}â])?"),new RegExp(["(?:","(",/(?:[A-Za-z][-.+A-Za-z0-9]{0,63}:(?![A-Za-z][-.+A-Za-z0-9]{0,63}:\/\/)(?!\d+\/?)(?:\/\/)?)/.source,ss(2),")","|","(","(//)?",/(?:www\.)/.source,ss(6),")","|","(","(//)?",ss(10)+"\\.",ls.source,"(?![-"+ts+"])",")",")","(?::[0-9]+)?","(?:"+_o.source+")?"].join(""),"gi")),gs=new RegExp("["+es+"]"),fs=function(t){function e(e){var n=t.call(this,e)||this;return n.stripPrefix={scheme:!0,www:!0},n.stripTrailingSlash=!0,n.decodePercentEncoding=!0,n.matcherRegex=ps,n.wordCharRegExp=gs,n.stripPrefix=e.stripPrefix,n.stripTrailingSlash=e.stripTrailingSlash,n.decodePercentEncoding=e.decodePercentEncoding,n}return Po(e,t),e.prototype.parseMatches=function(t){for(var e,n=this.matcherRegex,i=this.stripPrefix,r=this.stripTrailingSlash,o=this.decodePercentEncoding,s=this.tagBuilder,a=[],l=function(){var n=e[0],l=e[1],u=e[4],d=e[5],h=e[9],m=e.index,p=d||h,g=t.charAt(m-1);if(!ms.isValid(n,l))return"continue";if(m>0&&"@"===g)return"continue";if(m>0&&p&&c.wordCharRegExp.test(g))return"continue";if(/\?$/.test(n)&&(n=n.substr(0,n.length-1)),c.matchHasUnbalancedClosingParen(n))n=n.substr(0,n.length-1);else{var f=c.matchHasInvalidCharAfterTld(n,l);f>-1&&(n=n.substr(0,f))}var v=["http://","https://"].find(function(t){return!!l&&-1!==l.indexOf(t)});if(v){var b=n.indexOf(v);n=n.substr(b),l=l.substr(b),m+=b}var y=l?"scheme":u?"www":"tld",A=!!l;a.push(new qo({tagBuilder:s,matchedText:n,offset:m,urlMatchType:y,url:n,protocolUrlMatch:A,protocolRelativeMatch:!!p,stripPrefix:i,stripTrailingSlash:r,decodePercentEncoding:o}))},c=this;null!==(e=n.exec(t));)l();return a},e.prototype.matchHasUnbalancedClosingParen=function(t){var e,n=t.charAt(t.length-1);if(")"===n)e="(";else if("]"===n)e="[";else{if("}"!==n)return!1;e="{"}for(var i=0,r=0,o=t.length-1;r<o;r++){var s=t.charAt(r);s===e?i++:s===n&&(i=Math.max(i-1,0))}return 0===i},e.prototype.matchHasInvalidCharAfterTld=function(t,e){if(!t)return-1;var n=0;e&&(n=t.indexOf(":"),t=t.slice(n));var i=new RegExp("^((.?//)?[-."+es+"]*[-"+es+"]\\.[-"+es+"]+)").exec(t);return null===i?-1:(n+=i[1].length,t=t.slice(i[1].length),/^[^-.A-Za-z0-9:\/?#]/.test(t)?n:-1)},e}(Wo),vs=new RegExp("[_".concat(es,"]")),bs=function(t){function e(e){var n=t.call(this,e)||this;return n.serviceName="twitter",n.serviceName=e.serviceName,n}return Po(e,t),e.prototype.parseMatches=function(t){for(var e=this.tagBuilder,n=this.serviceName,i=[],r=t.length,o=0,s=-1,a=0;o<r;){var l=t.charAt(o);switch(a){case 0:c(l);break;case 1:u(l);break;case 2:d(l);break;case 3:h(l);break;default:Ro(a)}o++}return m(),i;function c(t){"#"===t?(a=2,s=o):ns.test(t)&&(a=1)}function u(t){ns.test(t)||(a=0)}function d(t){a=vs.test(t)?3:ns.test(t)?1:0}function h(t){vs.test(t)||(m(),s=-1,a=ns.test(t)?1:0)}function m(){if(s>-1&&o-s<=140){var r=t.slice(s,o),a=new Vo({tagBuilder:e,matchedText:r,offset:s,serviceName:n,hashtag:r.slice(1)});i.push(a)}}},e}(Wo),ys=["twitter","facebook","instagram","tiktok"],As=new RegExp("".concat(/(?
2:(?:(?:(\+)?\d{1,3}[-\040.]?)?\(?\d{3}\)?[-\040.]?\d{3}[-\040.]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-\040.]?(?:\d[-\040.]?){6,12}\d+))([,;]+[0-9]+#?)*/.source,"|").concat(/(0([1-9]{1}-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/.source),"g"),xs=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.matcherRegex=As,e}return Po(e,t),e.prototype.parseMatches=function(t){for(var e,n=this.matcherRegex,i=this.tagBuilder,r=[];null!==(e=n.exec(t));){var o=e[0],s=o.replace(/[^0-9,;#]/g,""),a=!(!e[1]&&!e[2]),l=0==e.index?"":t.substr(e.index-1,1),c=t.substr(e.index+o.length,1),u=!l.match(/\d/)&&!c.match(/\d/);this.testMatch(e[3])&&this.testMatch(o)&&u&&r.push(new Uo({tagBuilder:i,matchedText:o,offset:e.index,number:s,plusSign:a}))}return r},e.prototype.testMatch=function(t){return Go.test(t)},e}(Wo),ws=new RegExp("@[_".concat(es,"]{1,50}(?![_").concat(es,"])"),"g"),ks=new RegExp("@[_.".concat(es,"]{1,30}(?![_").concat(es,"])"),"g"),Cs=new RegExp("@[-_.".concat(es,"]{1,50}(?![-_").concat(es,"])"),"g"),Es=new RegExp("@[_.".concat(es,"]{1,23}[_").concat(es,"](?![_").concat(es,"])"),"g"),Ss=new RegExp("[^"+es+"]"),Fs=function(t){function e(e){var n=t.call(this,e)||this;return n.serviceName="twitter",n.matcherRegexes={twitter:ws,instagram:ks,soundcloud:Cs,tiktok:Es},n.nonWordCharRegex=Ss,n.serviceName=e.serviceName,n}return Po(e,t),e.prototype.parseMatches=function(t){var e,n=this.serviceName,i=this.matcherRegexes[this.serviceName],r=this.nonWordCharRegex,o=this.tagBuilder,s=[];if(!i)return s;for(;null!==(e=i.exec(t));){var a=e.index,l=t.charAt(a-1);if(0===a||r.test(l)){var c=e[0].replace(/\.+$/g,""),u=c.slice(1);s.push(new jo({tagBuilder:o,matchedText:c,offset:a,serviceName:n,mention:u}))}}return s},e}(Wo);function Ds(t,e){for(var n,i=e.onOpenTag,r=e.onCloseTag,o=e.onText,s=e.onComment,a=e.onDoctype,l=new Ts,c=0,u=t.length,d=0,h=0,m=l;c<u;){var p=t.charAt(c);switch(d){case 0:g(p);break;case 1:f(p);break;case 2:b(p);break;case 3:v(p);break;case 4:y(p);break;case 5:A(p);break;case 6:x(p);break;case 7:w(p);break;case 8:k(p);break;case 9:C(p);break;case 10:E(p);break;case 11:S(p);break;case 12:F(p);break;case 13:D(p);break;case 14:T(p);break;case 15:B(p);break;case 16:R(p);break;case 17:N(p);break;case 18:L(p);break;case 19:O(p);break;case 20:M(p);break;default:Ro(d)}c++}function g(t){"<"===t&&I()}function f(t){"!"===t?d=13:"/"===t?(d=2,m=new Ts(Io(Io({},m),{isClosing:!0}))):"<"===t?I():Ho.test(t)?(d=3,m=new Ts(Io(Io({},m),{isOpening:!0}))):(d=0,m=l)}function v(t){Ko.test(t)?(m=new Ts(Io(Io({},m),{name:z()})),d=4):"<"===t?I():"/"===t?(m=new Ts(Io(Io({},m),{name:z()})),d=12):">"===t?(m=new Ts(Io(Io({},m),{name:z()})),_()):Ho.test(t)||$o.test(t)||":"===t||P()}function b(t){">"===t?P():Ho.test(t)?d=3:P()}function y(t){Ko.test(t)||("/"===t?d=12:">"===t?_():"<"===t?I():"="===t||Yo.test(t)||Jo.test(t)?P():d=5)}function A(t){Ko.test(t)?d=6:"/"===t?d=12:"="===t?d=7:">"===t?_():"<"===t?I():Yo.test(t)&&P()}function x(t){Ko.test(t)||("/"===t?d=12:"="===t?d=7:">"===t?_():"<"===t?I():Yo.test(t)?P():d=5)}function w(t){Ko.test(t)||('"'===t?d=8:"'"===t?d=9:/[>=`]/.test(t)?P():"<"===t?I():d=10)}function k(t){'"'===t&&(d=11)}function C(t){"'"===t&&(d=11)}function E(t){Ko.test(t)?d=4:">"===t?_():"<"===t&&I()}function S(t){Ko.test(t)?d=4:"/"===t?d=12:">"===t?_():"<"===t?I():(d=4,c--)}function F(t){">"===t?(m=new Ts(Io(Io({},m),{isClosing:!0})),_()):d=4}function D(e){"--"===t.substr(c,2)?(c+=2,m=new Ts(Io(Io({},m),{type:"comment"})),d=14):"DOCTYPE"===t.substr(c,7).toUpperCase()?(c+=7,m=new Ts(Io(Io({},m),{type:"doctype"})),d=20):P()}function T(t){"-"===t?d=15:">"===t?P():d=16}function B(t){"-"===t?d=18:">"===t?P():d=16}function R(t){"-"===t&&(d=17)}function N(t){d="-"===t?18:16}function L(t){">"===t?_():"!"===t?d=19:"-"===t||(d=16)}function O(t){"-"===t?d=17:">"===t?_():d=16}function M(t){">"===t?_():"<"===t&&I()}function P(){d=0,m=l}function I(){d=1,m=new Ts({idx:c})}function _(){var e=t.slice(h,m.idx);e&&o(e,h),"comment"===m.type?s(m.idx):"doctype"===m.type?a(m.idx):(m.isOpening&&i(m.name,m.idx),m.isClosing&&r(m.name,m.idx)),P(),h=c+1}function z(){var e=m.idx+(m.isClosing?2:1);return t.slice(e,c).toLowerCase()}h<c&&(n=t.slice(h,c),o(n,h),h=c+1)}var Ts=function(t){void 0===t&&(t={}),this.idx=void 0!==t.idx?t.idx:-1,this.type=t.type||"tag",this.name=t.name||"",this.isOpening=!!t.isOpening,this.isClosing=!!t.isClosing},Bs=function(){function t(e){void 0===e&&(e={}),this.version=t.version,this.urls={},this.email=!0,this.phone=!0,this.hashtag=!1,this.mention=!1,this.newWindow=!0,this.stripPrefix={scheme:!0,www:!0},this.stripTrailingSlash=!0,this.decodePercentEncoding=!0,this.truncate={length:0,location:"end"},this.className="",this.replaceFn=null,this.context=void 0,this.sanitizeHtml=!1,this.matchers=null,this.tagBuilder=null,this.urls=this.normalizeUrlsCfg(e.urls),this.email="boolean"==typeof e.email?e.email:this.email,this.phone="boolean"==typeof e.phone?e.phone:this.phone,this.hashtag=e.hashtag||this.hashtag,this.mention=e.mention||this.mention,this.newWindow="boolean"==typeof e.newWindow?e.newWindow:this.newWindow,this.stripPrefix=this.normalizeStripPrefixCfg(e.stripPrefix),this.stripTrailingSlash="boolean"==typeof e.stripTrailingSlash?e.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding="boolean"==typeof e.decodePercentEncoding?e.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=e.s
2anitizeHtml||!1;var n=this.mention;if(!1!==n&&-1===["twitter","instagram","soundcloud","tiktok"].indexOf(n))throw new Error("invalid `mention` cfg '".concat(n,"' - see docs"));var i=this.hashtag;if(!1!==i&&-1===ys.indexOf(i))throw new Error("invalid `hashtag` cfg '".concat(i,"' - see docs"));this.truncate=this.normalizeTruncateCfg(e.truncate),this.className=e.className||this.className,this.replaceFn=e.replaceFn||this.replaceFn,this.context=e.context||this}return t.link=function(e,n){return new t(n).link(e)},t.parse=function(e,n){return new t(n).parse(e)},t.prototype.normalizeUrlsCfg=function(t){return null==t&&(t=!0),"boolean"==typeof t?{schemeMatches:t,wwwMatches:t,tldMatches:t}:{schemeMatches:"boolean"!=typeof t.schemeMatches||t.schemeMatches,wwwMatches:"boolean"!=typeof t.wwwMatches||t.wwwMatches,tldMatches:"boolean"!=typeof t.tldMatches||t.tldMatches}},t.prototype.normalizeStripPrefixCfg=function(t){return null==t&&(t=!0),"boolean"==typeof t?{scheme:t,www:t}:{scheme:"boolean"!=typeof t.scheme||t.scheme,www:"boolean"!=typeof t.www||t.www}},t.prototype.normalizeTruncateCfg=function(t){return"number"==typeof t?{length:t,location:"end"}:function(t,e){for(var n in e)e.hasOwnProperty(n)&&void 0===t[n]&&(t[n]=e[n]);return t}(t||{},{length:Number.POSITIVE_INFINITY,location:"end"})},t.prototype.parse=function(t){var e=this,n=["a","style","script"],i=0,r=[];return Ds(t,{onOpenTag:function(t){n.indexOf(t)>=0&&i++},onText:function(t,n){if(0===i){var o=function(t,e){if(!e.global)throw new Error("`splitRegex` must have the 'g' flag set");for(var n,i=[],r=0;n=e.exec(t);)i.push(t.substring(r,n.index)),i.push(n[0]),r=n.index+n[0].length;return i.push(t.substring(r)),i}(t,/( | |<|<|>|>|"|"|')/gi),s=n;o.forEach(function(t,n){if(n%2==0){var i=e.parseText(t,s);r.push.apply(r,i)}s+=t.length})}},onCloseTag:function(t){n.indexOf(t)>=0&&(i=Math.max(i-1,0))},onComment:function(t){},onDoctype:function(t){}}),r=this.compactMatches(r),r=this.removeUnwantedMatches(r)},t.prototype.compactMatches=function(t){t.sort(function(t,e){return t.getOffset()-e.getOffset()});for(var e=0;e<t.length-1;){var n=t[e],i=n.getOffset(),r=n.getMatchedText().length,o=i+r;if(e+1<t.length){if(t[e+1].getOffset()===i){var s=t[e+1].getMatchedText().length>r?e:e+1;t.splice(s,1);continue}if(t[e+1].getOffset()<o){t.splice(e+1,1);continue}}e++}return t},t.prototype.removeUnwantedMatches=function(t){return this.hashtag||Bo(t,function(t){return"hashtag"===t.getType()}),this.email||Bo(t,function(t){return"email"===t.getType()}),this.phone||Bo(t,function(t){return"phone"===t.getType()}),this.mention||Bo(t,function(t){return"mention"===t.getType()}),this.urls.schemeMatches||Bo(t,function(t){return"url"===t.getType()&&"scheme"===t.getUrlMatchType()}),this.urls.wwwMatches||Bo(t,function(t){return"url"===t.getType()&&"www"===t.getUrlMatchType()}),this.urls.tldMatches||Bo(t,function(t){return"url"===t.getType()&&"tld"===t.getUrlMatchType()}),t},t.prototype.parseText=function(t,e){void 0===e&&(e=0),e=e||0;for(var n=this.getMatchers(),i=[],r=0,o=n.length;r<o;r++){for(var s=n[r].parseMatches(t),a=0,l=s.length;a<l;a++)s[a].setOffset(e+s[a].getOffset());i.push.apply(i,s)}return i},t.prototype.link=function(t){if(!t)return"";this.sanitizeHtml&&(t=t.replace(/</g,"<").replace(/>/g,">"));for(var e=this.parse(t),n=[],i=0,r=0,o=e.length;r<o;r++){var s=e[r];n.push(t.substring(i,s.getOffset())),n.push(this.createMatchReturnVal(s)),i=s.getOffset()+s.getMatchedText().length}return n.push(t.substring(i)),n.join("")},t.prototype.createMatchReturnVal=function(t){var e;return this.replaceFn&&(e=this.replaceFn.call(this.context,t)),"string"==typeof e?e:!1===e?t.getMatchedText():e instanceof No?e.toAnchorString():t.buildTag().toAnchorString()},t.prototype.getMatchers=function(){if(this.matchers)return this.matchers;var t=this.getTagBuilder(),e=[new bs({tagBuilder:t,serviceName:this.hashtag}),new ds({tagBuilder:t}),new xs({tagBuilder:t}),new Fs({tagBuilder:t,serviceName:this.mention}),new fs({tagBuilder:t,stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding})];return this.matchers=e},t.prototype.getTagBuilder=function(){var t=this.tagBuilder;return t||(t=this.tagBuilder=new Lo({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),t},t.version="3.16.2",t.AnchorTagBuilder=Lo,t.HtmlTag=No,t.matcher={Email:ds,Hashtag:bs,Matcher:Wo,Mention:Fs,Phone:xs,Url:fs},t.match={Email:zo,Hashtag:Vo,Match:Oo,Mention:jo,Phone:Uo,Url:qo},t}();const Rs=Bs,Ns={name:"Wysiwyg",compatConfig:{COMPONENT_V_MODEL:!1},directives:{clickaway:Do.u$},props:{name:String,toolbarId:String,placeholder:String,showFormatting:{type:Boolean,default:!0},model:[String,Object],modelValue:{type:String,default:""},value:{type:String,default:void 0},inviteUser:Boolean},emits:["update:modelValue","input","contentUpdated","opengraph"],data:function(){return{firstCursorPosition:null,currentCursorPosition:null,showUserList:!1,userList:{},userSearch:!1,userSearchTerm:"",newUser:{email:"",firstName:"",lastName:""},creatingUser:!1,clearTrixHandler:null}},computed:{editorValue:function(){return this.modelValue||this.value||""}},methods:{addUser:function(){var t=this;axios.post("/users/mention/invite-user",this.newUser).then(function(e){t.user=e.data,t.insertUser(t.user),t.newUser={email:"",firstName:"",lastName:""}}).catch(function(t){console.log(t)})},listenForUser:function(t){if(this.userSearch){if("Enter"===t.key&&t.preventDefault(),"Escape"===t.key||"Tab"===t.key)return this.clearUserSearchString(),void this.clearUserSearch();var e=this.$refs.trix.editor.getDocument().toString();this.currentCursorPosition=this.$refs.trix.editor.getPosition(),this.firstCursorPosition>=e.length?this.clearUserSearch():(this.userSearchTerm=e.substring(this.firstCursorPosition,this.currentCursorPosition),this.fetchUsers())}},fetchUsers:function(){var t=this;axios.get("/users/search?name=".concat(this.userSearchTerm)).then(function(e){t.userList=e.data,t.showUserList=!0;var n=t.$refs.trix.editor.getClientRectAtPosition(t.currentCursorPosition);n&&(t.$refs.userList.style.top="".concat(n.top+n.height,"px"))}).catch(function(t){console.log(t)})},insertUser:function(t){this.clearUserSearchString(),this.$refs.trix.editor.insertHTML('<a href="'.concat(window.location.origin,"/").concat(t.username,'">').concat(t.first_name," ").concat(t.last_name,"</a>")),this.clearUserSearch()},clearUserSearch:function(){this.userSearch=!1,this.userSearchTerm="",this.userList={},this.showUserList=!1,this.selectedUser=null},clearUserSearchString:function(){this.$refs.trix.editor.getDocument().toString();this.$refs.trix.editor.setSelectedRange([this.firstCursorPosition-1,this.currentCursorPosition]),this.$refs.trix.editor.deleteInDirection("backward")},fetchOpengraph:function(t){var e=this,n=t.clipboardData.getData("Text");n&&n.match(/^(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})$/gi)&&(console.log(n),axios.post("".concat(window.location.origin,"/posts/opengraph"),{url:n}).then(function(t){e.$emit("opengraph",t.data.opengraph)}).catch(function(t){console.error(t)}))},findLinks:function(t){for(var e=this.$refs.trix.editor,n=this.$refs.trix.value,i=e.getSelectedRange(),r=(new DOMParser).parseFromString(n,"text/html"),o=r.getElementsByTagName("a"),s=o.length;s-- >0;){var a=o[s];if(a.getAttribute("href")==a.innerHTML){var l=r.createTextNode(a.firstChild.nodeValue);a.parentNode.replaceChild(l,a)}}n=r.documentElement.outerHTML;var c=Rs.link(n,{urls:{schemeMatches:!0,wwwMatches:!0,tldMatches:!1},stripPrefix:!1,stripTrailingSlash:!1,phone:!1,email:!1});c!=n&&(this.$refs.trix.value=c,e.setSelectedRange(i))},clearTrix:function(){this.$refs.trix&&this.$refs.trix.editor.loadHTML("")}
2,checkForEmail:function(t,e){var n=t.substring(e-2,e),i=n.indexOf("@");if(0===i)return!1;var r=n[i-1];return/^[a-z0-9]$/i.test(r)}},mounted:function(){var t=this;this.clearTrixHandler=this.clearTrix.bind(this),window.addEventListener("clearTrix",this.clearTrixHandler),this.$refs.trix.addEventListener("trix-change",function(e){if(t.$emit("update:modelValue",e.target.innerHTML),t.$emit("input",e.target.innerHTML),"Vendor"!=window.App.user.role){var n=t.$refs.trix.editor.getDocument().toString(),i=t.$refs.trix.editor.getPosition();if("@"==n.substring(i-1,i)){if(t.checkForEmail(n,i))return;t.userSearch=!0,t.userSearchTerm="",t.firstCursorPosition=t.$refs.trix.editor.getPosition()}}}),this.$refs.trix.addEventListener("paste",function(e){t.fetchOpengraph(e),t.findLinks(e)}),this.$refs.trix.addEventListener("trix-file-accept",function(e){e.preventDefault(),t.$toasted.show("You can upload your images in the space below the editor",{theme:"",position:"bottom-right",className:"bg-orange text-white rounded-full",type:"error",duration:5e3})})},beforeUnmount:function(){this.clearTrixHandler&&window.removeEventListener("clearTrix",this.clearTrixHandler)}};const Ls=(0,n(6262).A)(Ns,[["render",function(t,e,n,o,C,E){var S=(0,i.resolveComponent)("trix-toolbar"),F=(0,i.resolveDirective)("click-away");return(0,i.openBlock)(),(0,i.createElementBlock)("div",s,[(0,i.createElementVNode)("input",{id:n.name,type:"hidden",name:n.name,value:E.editorValue},null,8,a),(0,i.withDirectives)((0,i.createElementVNode)("input",{id:"user-search",type:"hidden",name:"user-search","onUpdate:modelValue":e[0]||(e[0]=function(t){return C.userSearchTerm=t})},null,512),[[i.vModelText,C.userSearchTerm]]),n.toolbarId?(0,i.withDirectives)(((0,i.openBlock)(),(0,i.createBlock)(S,{key:0,id:n.toolbarId},null,8,["id"])),[[i.vShow,n.showFormatting]]):(0,i.createCommentVNode)("",!0),(0,i.createElementVNode)("trix-editor",{ref:"trix",class:"trix-editor",input:n.name,toolbar:n.toolbarId,placeholder:n.placeholder,"aria-label":n.placeholder,onKeyup:e[1]||(e[1]=function(e){E.listenForUser(e),E.findLinks(e),t.$emit("contentUpdated")})},null,40,l),(0,i.withDirectives)(((0,i.openBlock)(),(0,i.createElementBlock)("div",c,[(0,i.createElementVNode)("ul",u,[((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(C.userList,function(t){return(0,i.openBlock)(),(0,i.createElementBlock)("li",{onClick:function(e){return E.insertUser(t)},key:t.id,class:"flex items-center py-1 pl-3 m-0 hover:bg-blue-lighter cursor-pointer border-none"},[(0,i.createElementVNode)("img",{class:"h-15 w-15 rounded-full",src:t.avatar_url,alt:""},null,8,h),(0,i.createElementVNode)("div",m,[(0,i.createElementVNode)("strong",p,(0,i.toDisplayString)(t.first_name)+" "+(0,i.toDisplayString)(t.last_name),1),(0,i.createElementVNode)("p",g,(0,i.toDisplayString)(t.formatted_kiko_xp)+" XP",1),(0,i.createElementVNode)("p",f,(0,i.toDisplayString)(t.is_following?"Following":" "),1)])],8,d)}),128)),n.inviteUser?((0,i.openBlock)(),(0,i.createElementBlock)("li",v,[(0,i.createElementVNode)("div",b,[e[12]||(e[12]=(0,i.createElementVNode)("strong",{class:"text-15 text-black m-0"},"Can't find the user?",-1)),e[13]||(e[13]=(0,i.createElementVNode)("p",{class:"text-sm text-gray m-0"}
2,"Invite a colleague to KiKo! Once you enter their name and email, we'll create an their account and reach out them. You'll be able to tag them as an author once you invite them.",-1)),(0,i.createElementVNode)("div",y,[e[6]||(e[6]=(0,i.createElementVNode)("label",{for:"first_name"},[(0,i.createTextVNode)(" First Name "),(0,i.createElementVNode)("span",{class:"u-text-required"},"(required)")],-1)),(0,i.withDirectives)((0,i.createElementVNode)("input",{type:"text",name:"first_name",id:"first_name","onUpdate:modelValue":e[2]||(e[2]=function(t){return C.newUser.firstName=t}),autocomplete:"off"},null,512),[[i.vModelText,C.newUser.firstName]]),e[7]||(e[7]=(0,i.createElementVNode)("p",{class:"text-red text-12 mt-3125"},null,-1))]),(0,i.createElementVNode)("div",A,[e[8]||(e[8]=(0,i.createElementVNode)("label",{for:"last_name"},[(0,i.createTextVNode)(" Last Name "),(0,i.createElementVNode)("span",{class:"u-text-required"},"(required)")],-1)),(0,i.withDirectives)((0,i.createElementVNode)("input",{type:"text",name:"last_name",id:"last_name","onUpdate:modelValue":e[3]||(e[3]=function(t){return C.newUser.lastName=t}),autocomplete:"off"},null,512),[[i.vModelText,C.newUser.lastName]]),e[9]||(e[9]=(0,i.createElementVNode)("p",{class:"text-red text-12 mt-3125"},null,-1))]),(0,i.createElementVNode)("div",x,[e[10]||(e[10]=(0,i.createElementVNode)("label",{for:"email"},[(0,i.createTextVNode)(" Email "),(0,i.createElementVNode)("span",{class:"u-text-required"},"(required)")],-1)),(0,i.withDirectives)((0,i.createElementVNode)("input",{type:"text",name:"email",id:"email",autocomplete:"off","onUpdate:modelValue":e[4]||(e[4]=function(t){return C.newUser.email=t})},null,512),[[i.vModelText,C.newUser.email]]),e[11]||(e[11]=(0,i.createElementVNode)("p",{class:"text-red text-12 mt-3125"},null,-1))]),(0,i.createElementVNode)("button",{type:"submit",class:"btn-purple",disabled:C.creatingUser,onClick:e[5]||(e[5]=(0,i.withModifiers)(function(){return E.addUser&&E.addUser.apply(E,arguments)},["prevent"]))}," Invite ",8,w)])])):(0,i.createCommentVNode)("",!0)]),C.showUserList&&0==C.userList.length?((0,i.openBlock)(),(0,i.createElementBlock)("div",k,r(e[14]||(e[14]=[(0,i.createElementVNode)("b",{class:"text-14 m-0 text-gray"}," No users match your search ",-1)])))):(0,i.createCommentVNode)("",!0)])),[[i.vShow,C.showUserList],[F,E.clearUserSearch]])])}]])},9253:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var i=n(6314),r=n.n(i)()(function(t){return t[1]});r.push([t.id,".comment-composer-prompt[data-v-2ed960e1]{background:#fff;border:1px solid #d1d5db;border-radius:24px;color:#4b5563;cursor:pointer;font:inherit;min-height:48px;padding:12px 16px;text-align:left;width:100%}.comment-composer-prompt[data-v-2ed960e1]:hover{background:#f9f9ff;border-color:#5458f7}.comment-composer button[data-v-2ed960e1]:focus-visible,.comment-composer input[data-v-2ed960e1]:focus-visible,.comment-composer-prompt[data-v-2ed960e1]:focus-visible{outline:2px solid #5458f7;outline-offset:3px}.comment-composer[data-v-2ed960e1]{background:#fff;border:1px solid #b7bdc5;border-radius:24px;padding:12px}.comment-composer[data-v-2ed960e1]:focus-within{border-color:#5458f7}.comment-composer[data-v-2ed960e1] trix-editor{border:0;border-radius:0;color:#374151;font-size:16px;line-height:1.5;min-height:80px;padding:8px 4px 12px}.comment-composer[data-v-2ed960e1] trix-editor:empty:not(:focus):before{color:#6b7280}.comment-composer[data-v-2ed960e1] trix-toolbar .trix-button-row{flex-wrap:wrap;padding-bottom:8px}.comment-composer[data-v-2ed960e1] .vue-dropzone{border-radius:12px;margin:8px 0}.comment-composer-actions[data-v-2ed960e1],.comment-composer-footer[data-v-2ed960e1],.comment-composer-tools[data-v-2ed960e1]{align-items:center;display:flex;gap:4px}.comment-composer-footer[data-v-2ed960e1]{flex-wrap:wrap;gap:8px;justify-content:space-between}.comment-composer-actions[data-v-2ed960e1]{margin-left:auto}.comment-composer-tool[data-v-2ed960e1]{align-items:center;background:transparent;border:0;border-radius:22px;color:#4b5563;cursor:pointer;display:inline-flex;font:inherit;justify-content:center;min-height:44px;min-width:44px;padding:8px}.comment-composer-tool[data-v-2ed960e1]:hover,.comment-composer-tool[aria-expanded=true][data-v-2ed960e1]{background:#eeeefe;color:#5458f7}.comment-composer-formatting[data-v-2ed960e1]{font-size:20px}.comment-composer-incognito[data-v-2ed960e1]{align-items:center;color:#4b5563;cursor:pointer;display:inline-flex;font-size:13px;gap:6px;margin:0 4px;min-height:44px}
2.comment-composer-incognito input[data-v-2ed960e1]{accent-color:#5458f7;height:15px;margin:0;width:15px}.comment-composer-submit[data-v-2ed960e1]{background:#5458f7;border:1px solid #5458f7;border-radius:22px;color:#fff;cursor:pointer;font:inherit;font-weight:600;min-height:44px;padding:8px 18px}.comment-composer-submit[data-v-2ed960e1]:hover{background:#4246d9}.comment-composer-cancel[data-v-2ed960e1]{background:#f3f4f6;border:0;border-radius:22px;color:#374151;cursor:pointer;font:inherit;min-height:44px;padding:8px 14px}.comment-composer-cancel[data-v-2ed960e1]:hover{background:#e5e7eb}.comment-composer button[data-v-2ed960e1]:disabled{cursor:wait;opacity:.6}.comment-composer-hint[data-v-2ed960e1],.comment-composer-status[data-v-2ed960e1]{color:#6b7280;font-size:12px}.comment-composer-hint[data-v-2ed960e1]{margin:8px 4px 0}@media (max-width:639px){.comment-composer-footer[data-v-2ed960e1]{gap:4px}.comment-composer-tools[data-v-2ed960e1]{gap:0}.comment-composer-incognito[data-v-2ed960e1]{font-size:12px;gap:4px;margin:0}.comment-composer-cancel[data-v-2ed960e1],.comment-composer-submit[data-v-2ed960e1]{font-size:14px;padding-inline:12px}.comment-composer-status[data-v-2ed960e1]{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}}#dropzone[data-v-2ed960e1]{border-style:solid}",""]);const o=r},9298:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var i=n(6314),r=n.n(i)()(function(t){return t[1]});r.push([t.id,"input:checked~.dot[data-v-595b4000]{transform:translateX(100%)}input:checked~.block[data-v-595b4000]{background-color:#bbbdfa}.switch-shadow[data-v-595b4000]{box-shadow:0 0 8px 0 rgba(37,23,91,.1);-webkit-box-shadow:0 0 8px 0 rgba(37,23,91,.1);-moz-box-shadow:0 0 8px 0 rgba(37,23,91,.1)}",""]);const o=r}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.