(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-524df97c"],{"0010":function(e,t,n){"use strict";n.d(t,"a",(function(){return P})),n.d(t,"b",(function(){return M})),n.d(t,"c",(function(){return v})),n.d(t,"d",(function(){return f})),n.d(t,"e",(function(){return x})),n.d(t,"f",(function(){return E})),n.d(t,"g",(function(){return C}));var o=n("0ac0"),r=n("304a"),i=n("5313");function s(e,t){return!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0)}function a(e,t,n){var r=e.selection,s=r.$cursor;if(!s||(n?!n.endOfTextblock("backward",e):s.parentOffset>0))return!1;var a=u(s);if(!a){var l=s.blockRange(),d=l&&Object(o["k"])(l);return null!=d&&(t&&t(e.tr.lift(l,d).scrollIntoView()),!0)}var p=a.nodeBefore;if(!p.type.spec.isolating&&S(e,a,t))return!0;if(0==s.parent.content.size&&(c(p,"end")||i["NodeSelection"].isSelectable(p))){if(t){var h=e.tr.deleteRange(s.before(),s.after());h.setSelection(c(p,"end")?i["Selection"].findFrom(h.doc.resolve(h.mapping.map(a.pos,-1)),-1):i["NodeSelection"].create(h.doc,a.pos-p.nodeSize)),t(h.scrollIntoView())}return!0}return!(!p.isAtom||a.depth!=s.depth-1)&&(t&&t(e.tr.delete(a.pos-p.nodeSize,a.pos).scrollIntoView()),!0)}function c(e,t){for(;e;e="start"==t?e.firstChild:e.lastChild)if(e.isTextblock)return!0;return!1}function l(e,t,n){var o=e.selection,r=o.$head,s=o.empty,a=r;if(!s)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;a=u(r)}var c=a&&a.nodeBefore;return!(!c||!i["NodeSelection"].isSelectable(c))&&(t&&t(e.tr.setSelection(i["NodeSelection"].create(e.doc,a.pos-c.nodeSize)).scrollIntoView()),!0)}function u(e){if(!e.parent.type.spec.isolating)for(var t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function d(e,t,n){var o=e.selection,r=o.$cursor;if(!r||(n?!n.endOfTextblock("forward",e):r.parentOffset=0;t--){var n=e.node(t);if(e.index(t)+11&&r.after()!=r.end(-1)){var i=r.before();if(Object(o["g"])(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}var s=r.blockRange(),a=s&&Object(o["k"])(s);return null!=a&&(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}function w(e,t){var n=e.selection,s=n.$from,a=n.$to;if(e.selection instanceof i["NodeSelection"]&&e.selection.node.isBlock)return!(!s.parentOffset||!Object(o["g"])(e.doc,s.pos))&&(t&&t(e.tr.split(s.pos).scrollIntoView()),!0);if(!s.parent.isBlock)return!1;if(t){var c=a.parentOffset==a.parent.content.size,l=e.tr;e.selection instanceof i["TextSelection"]&&l.deleteSelection();var u=0==s.depth?null:g(s.node(-1).contentMatchAt(s.indexAfter(-1))),d=c&&u?[{type:u}]:null,p=Object(o["g"])(l.doc,l.mapping.map(s.pos),1,d);d||p||!Object(o["g"])(l.doc,l.mapping.map(s.pos),1,u&&[{type:u}])||(d=[{type:u}],p=!0),p&&(l.split(l.mapping.map(s.pos),1,d),c||s.parentOffset||s.parent.type==u||!s.node(-1).canReplace(s.index(-1),s.indexAfter(-1),r["Fragment"].from(u.create(),s.parent))||l.setNodeMarkup(l.mapping.map(s.before()),u)),t(l.scrollIntoView())}return!0}function A(e,t){return t&&t(e.tr.setSelection(new i["AllSelection"](e.doc))),!0}function k(e,t,n){var r=t.nodeBefore,i=t.nodeAfter,s=t.index();return!!(r&&i&&r.type.compatibleContent(i.type))&&(!r.content.size&&t.parent.canReplace(s-1,s)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!(!t.parent.canReplace(s,s+1)||!i.isTextblock&&!Object(o["f"])(e.doc,t.pos))&&(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),!0))}function S(e,t,n){var s,a,c=t.nodeBefore,l=t.nodeAfter;if(c.type.spec.isolating||l.type.spec.isolating)return!1;if(k(e,t,n))return!0;if(t.parent.canReplace(t.index(),t.index()+1)&&(s=(a=c.contentMatchAt(c.childCount)).findWrapping(l.type))&&a.matchType(s[0]||l.type).validEnd){if(n){for(var u=t.pos+l.nodeSize,d=r["Fragment"].empty,p=s.length-1;p>=0;p--)d=r["Fragment"].from(s[p].create(null,d));d=r["Fragment"].from(c.copy(d));var h=e.tr.step(new o["b"](t.pos-1,u,t.pos,u,new r["Slice"](d,1,0),s.length,!0)),f=u+2*s.length;Object(o["f"])(h.doc,f)&&h.join(f),n(h.scrollIntoView())}return!0}var m=i["Selection"].findFrom(t,1),g=m&&m.$from.blockRange(m.$to),v=g&&Object(o["k"])(g);return null!=v&&v>=t.depth&&(n&&n(e.tr.lift(g,v).scrollIntoView()),!0)}function C(e,t){return function(n,r){var i=n.selection,s=i.$from,a=i.$to,c=s.blockRange(a),l=c&&Object(o["i"])(c,e,t);return!!l&&(r&&r(n.tr.wrap(c,l).scrollIntoView()),!0)}}function x(e,t){return function(n,o){var r=n.selection,i=r.from,s=r.to,a=!1;return n.doc.nodesBetween(i,s,(function(o,r){if(a)return!1;if(o.isTextblock&&!o.hasMarkup(e,t))if(o.type==e)a=!0;else{var i=n.doc.resolve(r),s=i.index();a=i.parent.canReplaceWith(s,s+1,e)}})),!!a&&(o&&o(n.tr.setBlockType(i,s,e,t).scrollIntoView()),!0)}}function O(e,t,n){for(var o=function(o){var r=t[o],i=r.$from,s=r.$to,a=0==i.depth&&e.type.allowsMarkType(n);if(e.nodesBetween(i.pos,s.pos,(function(e){if(a)return!1;a=e.inlineContent&&e.type.allowsMarkType(n)})),a)return{v:!0}},r=0;re)break;var u=this.ranges[a+r],d=this.ranges[a+i],p=c+u;if(e<=p){var h=u?e==c?-1:e==p?1:t:t,f=c+o+(h<0?0:d);if(n)return f;var m=e==(t<0?c:p)?null:s(a/3,e-c);return new l(f,t<0?e!=c:e!=p,m)}o+=d-u}return n?e+o:new l(e+o)},u.prototype.touches=function(e,t){for(var n=0,o=a(t),r=this.inverted?2:1,i=this.inverted?1:2,s=0;se)break;var l=this.ranges[s+r],u=c+l;if(e<=u&&s==3*o)return!0;n+=this.ranges[s+i]-l}return!1},u.prototype.forEach=function(e){for(var t=this.inverted?2:1,n=this.inverted?1:2,o=0,r=0;o=0;t--){var o=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=o&&o>t?n-o-1:null)}},d.prototype.invert=function(){var e=new d;return e.appendMappingInverted(this),e},d.prototype.map=function(e,t){if(void 0===t&&(t=1),this.mirror)return this._map(e,t,!0);for(var n=this.from;nr&&a0},h.prototype.addStep=function(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t},Object.defineProperties(h.prototype,f);var g=Object.create(null),v=function(){};v.prototype.apply=function(e){return m()},v.prototype.getMap=function(){return u.empty},v.prototype.invert=function(e){return m()},v.prototype.map=function(e){return m()},v.prototype.merge=function(e){return null},v.prototype.toJSON=function(){return m()},v.fromJSON=function(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=g[t.stepType];if(!n)throw new RangeError("No step type "+t.stepType+" defined");return n.fromJSON(e,t)},v.jsonID=function(e,t){if(e in g)throw new RangeError("Duplicate use of step JSON ID "+e);return g[e]=t,t.prototype.jsonID=e,t};var b=function(e,t){this.doc=e,this.failed=t};b.ok=function(e){return new b(e,null)},b.fail=function(e){return new b(null,e)},b.fromReplace=function(e,t,n,r){try{return b.ok(e.replace(t,n,r))}catch(i){if(i instanceof o["ReplaceError"])return b.fail(i.message);throw i}};var y=function(e){function t(t,n,o,r){e.call(this),this.from=t,this.to=n,this.slice=o,this.structure=!!r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){return this.structure&&A(e,this.from,this.to)?b.fail("Structure replace would overwrite content"):b.fromReplace(e,this.from,this.to,this.slice)},t.prototype.getMap=function(){return new u([this.from,this.to-this.from,this.slice.size])},t.prototype.invert=function(e){return new t(this.from,this.from+this.slice.size,e.slice(this.from,this.to))},t.prototype.map=function(e){var n=e.mapResult(this.from,1),o=e.mapResult(this.to,-1);return n.deleted&&o.deleted?null:new t(n.pos,Math.max(n.pos,o.pos),this.slice)},t.prototype.merge=function(e){if(!(e instanceof t)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;var n=this.slice.size+e.slice.size==0?o["Slice"].empty:new o["Slice"](e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new t(e.from,this.to,n,this.structure)}var r=this.slice.size+e.slice.size==0?o["Slice"].empty:new o["Slice"](this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new t(this.from,this.to+(e.to-e.from),r,this.structure)},t.prototype.toJSON=function(){var e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new t(n.from,n.to,o["Slice"].fromJSON(e,n.slice),!!n.structure)},t}(v);v.jsonID("replace",y);var w=function(e){function t(t,n,o,r,i,s,a){e.call(this),this.from=t,this.to=n,this.gapFrom=o,this.gapTo=r,this.slice=i,this.insert=s,this.structure=!!a}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){if(this.structure&&(A(e,this.from,this.gapFrom)||A(e,this.gapTo,this.to)))return b.fail("Structure gap-replace would overwrite content");var t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return b.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,t.content);return n?b.fromReplace(e,this.from,this.to,n):b.fail("Content does not fit in gap")},t.prototype.getMap=function(){return new u([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])},t.prototype.invert=function(e){var n=this.gapTo-this.gapFrom;return new t(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),o=e.mapResult(this.to,-1),r=e.map(this.gapFrom,-1),i=e.map(this.gapTo,1);return n.deleted&&o.deleted||ro.pos?null:new t(n.pos,o.pos,r,i,this.slice,this.insert,this.structure)},t.prototype.toJSON=function(){var e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to||"number"!=typeof n.gapFrom||"number"!=typeof n.gapTo||"number"!=typeof n.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new t(n.from,n.to,n.gapFrom,n.gapTo,o["Slice"].fromJSON(e,n.slice),n.insert,!!n.structure)},t}(v);function A(e,t,n){var o=e.resolve(t),r=n-t,i=o.depth;while(r>0&&i>0&&o.indexAfter(i)==o.node(i).childCount)i--,r--;if(r>0){var s=o.node(i).maybeChild(o.indexAfter(i));while(r>0){if(!s||s.isLeaf)return!0;s=s.firstChild,r--}}return!1}function k(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function S(e){for(var t=e.parent,n=t.content.cutByIndex(e.startIndex,e.endIndex),o=e.depth;;--o){var r=e.$from.node(o),i=e.$from.index(o),s=e.$to.indexAfter(o);if(oi;a--,c--){var l=r.node(a),u=r.index(a);if(l.type.spec.isolating)return!1;var d=l.content.cutByIndex(u,l.childCount),p=o&&o[c]||l;if(p!=l&&(d=d.replaceChild(0,p.type.create(p.attrs))),!l.canReplace(u+1,l.childCount)||!p.type.validContent(d))return!1}var h=r.indexAfter(i),f=o&&o[0];return r.node(i).canReplaceWith(h,h,f?f.type:r.node(i+1).type)}function N(e,t){var n=e.resolve(t),o=n.index();return T(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(o,o+1)}function T(e,t){return e&&t&&!e.isLeaf&&e.canAppend(t)}function _(e,t,n){void 0===n&&(n=-1);for(var o=e.resolve(t),r=o.depth;;r--){var i=void 0,s=void 0,a=o.index(r);if(r==o.depth?(i=o.nodeBefore,s=o.nodeAfter):n>0?(i=o.node(r+1),a++,s=o.node(r).maybeChild(a)):(i=o.node(r).maybeChild(a-1),s=o.node(r+1)),i&&!i.isTextblock&&T(i,s)&&o.node(r).canReplace(a,a+1))return t;if(0==r)break;t=n<0?o.before(r):o.after(r)}}function I(e,t,n){var o=e.resolve(t);if(o.parent.canReplaceWith(o.index(),o.index(),n))return t;if(0==o.parentOffset)for(var r=o.depth-1;r>=0;r--){var i=o.index(r);if(o.node(r).canReplaceWith(i,i,n))return o.before(r+1);if(i>0)return null}if(o.parentOffset==o.parent.content.size)for(var s=o.depth-1;s>=0;s--){var a=o.indexAfter(s);if(o.node(s).canReplaceWith(a,a,n))return o.after(s+1);if(a=0;a--){var c=a==o.depth?0:o.pos<=(o.start(a+1)+o.end(a+1))/2?-1:1,l=o.index(a)+(c>0?1:0);if(1==s?o.node(a).canReplace(l,l,r):o.node(a).contentMatchAt(l).findWrapping(r.firstChild.type))return 0==c?o.pos:c<0?o.before(a+1):o.after(a+1)}return null}function P(e,t,n){for(var r=[],i=0;it;p--)h||n.index(p)>0?(h=!0,u=o["Fragment"].from(n.node(p).copy(u)),d++):c--;for(var f=o["Fragment"].empty,m=0,g=i,v=!1;g>t;g--)v||r.after(g+1)=0;r--)n=o["Fragment"].from(t[r].type.create(t[r].attrs,n));var i=e.start,s=e.end;return this.step(new w(i,s,i,s,new o["Slice"](n,0,0),t.length,!0))},h.prototype.setBlockType=function(e,t,n,r){var i=this;if(void 0===t&&(t=e),!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var s=this.steps.length;return this.doc.nodesBetween(e,t,(function(e,t){if(e.isTextblock&&!e.hasMarkup(n,r)&&M(i.doc,i.mapping.slice(s).map(t),n)){i.clearIncompatible(i.mapping.slice(s).map(t,1),n);var a=i.mapping.slice(s),c=a.map(t,1),l=a.map(t+e.nodeSize,1);return i.step(new w(c,l,c+1,l-1,new o["Slice"](o["Fragment"].from(n.create(r,null,e.marks)),0,0),1,!0)),!1}})),this},h.prototype.setNodeMarkup=function(e,t,n,r){var i=this.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");t||(t=i.type);var s=t.create(n,null,r||i.marks);if(i.isLeaf)return this.replaceWith(e,e+i.nodeSize,s);if(!t.validContent(i.content))throw new RangeError("Invalid content for node type "+t.name);return this.step(new w(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new o["Slice"](o["Fragment"].from(s),0,0),1,!0))},h.prototype.split=function(e,t,n){void 0===t&&(t=1);for(var r=this.doc.resolve(e),i=o["Fragment"].empty,s=o["Fragment"].empty,a=r.depth,c=r.depth-t,l=t-1;a>c;a--,l--){i=o["Fragment"].from(r.node(a).copy(i));var u=n&&n[l];s=o["Fragment"].from(u?u.type.create(u.attrs,s):r.node(a).copy(s))}return this.step(new y(e,e,new o["Slice"](i.append(s),t,t),!0))},h.prototype.join=function(e,t){void 0===t&&(t=1);var n=new y(e-t,e+t,o["Slice"].empty,!0);return this.step(n)};var D=function(e){function t(t,n,o){e.call(this),this.from=t,this.to=n,this.mark=o}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){var t=this,n=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),s=new o["Slice"](P(n.content,(function(e,n){return e.isAtom&&n.type.allowsMarkType(t.mark.type)?e.mark(t.mark.addToSet(e.marks)):e}),i),n.openStart,n.openEnd);return b.fromReplace(e,this.from,this.to,s)},t.prototype.invert=function(){return new j(this.from,this.to,this.mark)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),o=e.mapResult(this.to,-1);return n.deleted&&o.deleted||n.pos>=o.pos?null:new t(n.pos,o.pos,this.mark)},t.prototype.merge=function(e){if(e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))},t}(v);v.jsonID("addMark",D);var j=function(e){function t(t,n,o){e.call(this),this.from=t,this.to=n,this.mark=o}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){var t=this,n=e.slice(this.from,this.to),r=new o["Slice"](P(n.content,(function(e){return e.mark(t.mark.removeFromSet(e.marks))})),n.openStart,n.openEnd);return b.fromReplace(e,this.from,this.to,r)},t.prototype.invert=function(){return new D(this.from,this.to,this.mark)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),o=e.mapResult(this.to,-1);return n.deleted&&o.deleted||n.pos>=o.pos?null:new t(n.pos,o.pos,this.mark)},t.prototype.merge=function(e){if(e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))},t}(v);function z(e,t,n,r){if(void 0===n&&(n=t),void 0===r&&(r=o["Slice"].empty),t==n&&!r.size)return null;var i=e.resolve(t),s=e.resolve(n);return L(i,s,r)?new y(t,n,r):new $(i,s,r).fit()}function L(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}v.jsonID("removeMark",j),h.prototype.addMark=function(e,t,n){var o=this,r=[],i=[],s=null,a=null;return this.doc.nodesBetween(e,t,(function(o,c,l){if(o.isInline){var u=o.marks;if(!n.isInSet(u)&&l.type.allowsMarkType(n.type)){for(var d=Math.max(c,e),p=Math.min(c+o.nodeSize,t),h=n.addToSet(u),f=0;f=0;h--)this.step(i[h]);return this},h.prototype.replace=function(e,t,n){void 0===t&&(t=e),void 0===n&&(n=o["Slice"].empty);var r=z(this.doc,e,t,n);return r&&this.step(r),this},h.prototype.replaceWith=function(e,t,n){return this.replace(e,t,new o["Slice"](o["Fragment"].from(n),0,0))},h.prototype.delete=function(e,t){return this.replace(e,t,o["Slice"].empty)},h.prototype.insert=function(e,t){return this.replaceWith(e,e,t)};var $=function(e,t,n){this.$to=t,this.$from=e,this.unplaced=n,this.frontier=[];for(var r=0;r<=e.depth;r++){var i=e.node(r);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(r))})}this.placed=o["Fragment"].empty;for(var s=e.depth;s>0;s--)this.placed=o["Fragment"].from(e.node(s).copy(this.placed))},F={depth:{configurable:!0}};function V(e,t,n){return 0==t?e.cutByIndex(n):e.replaceChild(0,e.firstChild.copy(V(e.firstChild.content,t-1,n)))}function H(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(H(e.lastChild.content,t-1,n)))}function U(e,t){for(var n=0;n1&&(r=r.replaceChild(0,W(r.firstChild,t-1,1==r.childCount?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(o["Fragment"].empty,!0)))),e.copy(r)}function q(e,t,n,o,r){var i=e.node(t),s=r?e.indexAfter(t):e.index(t);if(s==i.childCount&&!n.compatibleContent(i.type))return null;var a=o.fillBefore(i.content,!0,s);return a&&!J(n,i.content,s)?a:null}function J(e,t,n){for(var o=n;or){var a=i.contentMatchAt(0),c=a.fillBefore(e).append(e);e=c.append(a.matchFragment(c).fillBefore(o["Fragment"].empty,!0))}return e}function G(e,t){for(var n=[],o=Math.min(e.depth,t.depth),r=o;r>=0;r--){var i=e.start(r);if(it.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;i==t.start(r)&&n.push(r)}return n}F.depth.get=function(){return this.frontier.length-1},$.prototype.fit=function(){while(this.unplaced.size){var e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}var t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(t<0?this.$to:r.doc.resolve(t));if(!i)return null;var s=this.placed,a=r.depth,c=i.depth;while(a&&c&&1==s.childCount)s=s.firstChild.content,a--,c--;var l=new o["Slice"](s,a,c);return t>-1?new w(r.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new y(r.pos,i.pos,l):void 0},$.prototype.findFittable=function(){for(var e=1;e<=2;e++)for(var t=this.unplaced.openStart;t>=0;t--){var n=void 0,r=void 0;t?(r=U(this.unplaced.content,t-1).firstChild,n=r.content):n=this.unplaced.content;for(var i=n.firstChild,s=this.depth;s>=0;s--){var a=this.frontier[s],c=a.type,l=a.match,u=void 0,d=void 0;if(1==e&&(i?l.matchType(i.type)||(d=l.fillBefore(o["Fragment"].from(i),!1)):c.compatibleContent(r.type)))return{sliceDepth:t,frontierDepth:s,parent:r,inject:d};if(2==e&&i&&(u=l.findWrapping(i.type)))return{sliceDepth:t,frontierDepth:s,parent:r,wrap:u};if(r&&l.matchType(r.type))break}}},$.prototype.openMore=function(){var e=this.unplaced,t=e.content,n=e.openStart,r=e.openEnd,i=U(t,n);return!(!i.childCount||i.firstChild.isLeaf)&&(this.unplaced=new o["Slice"](t,n+1,Math.max(r,i.size+n>=t.size-r?n+1:0)),!0)},$.prototype.dropNode=function(){var e=this.unplaced,t=e.content,n=e.openStart,r=e.openEnd,i=U(t,n);if(i.childCount<=1&&n>0){var s=t.size-n<=n+i.size;this.unplaced=new o["Slice"](V(t,n-1,1),n-1,s?n-1:r)}else this.unplaced=new o["Slice"](V(t,n,1),n,r)},$.prototype.placeNodes=function(e){var t=e.sliceDepth,n=e.frontierDepth,r=e.parent,i=e.inject,s=e.wrap;while(this.depth>n)this.closeFrontierNode();if(s)for(var a=0;a1||0==u||b.content.size)&&(f=y,p.push(W(b.mark(m.allowedMarks(b.marks)),1==d?u:0,d==l.childCount?v:-1)))}var w=d==l.childCount;w||(v=-1),this.placed=H(this.placed,n,o["Fragment"].from(p)),this.frontier[n].match=f,w&&v<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var A=0,k=l;A1&&r==this.$to.end(--o))++r;return r},$.prototype.findCloseLevel=function(e){e:for(var t=Math.min(this.depth,e.depth);t>=0;t--){var n=this.frontier[t],o=n.match,r=n.type,i=t=0;a--){var c=this.frontier[a],l=c.match,u=c.type,d=q(e,a,u,l,!0);if(!d||d.childCount)continue e}return{depth:t,fit:s,move:i?e.doc.resolve(e.after(t+1)):e}}}},$.prototype.close=function(e){var t=this.findCloseLevel(e);if(!t)return null;while(this.depth>t.depth)this.closeFrontierNode();t.fit.childCount&&(this.placed=H(this.placed,t.depth,t.fit)),e=t.move;for(var n=t.depth+1;n<=e.depth;n++){var o=e.node(n),r=o.type.contentMatch.fillBefore(o.content,!0,e.index(n));this.openFrontierNode(o.type,o.attrs,r)}return e},$.prototype.openFrontierNode=function(e,t,n){var r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=H(this.placed,this.depth,o["Fragment"].from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})},$.prototype.closeFrontierNode=function(){var e=this.frontier.pop(),t=e.match.fillBefore(o["Fragment"].empty,!0);t.childCount&&(this.placed=H(this.placed,this.frontier.length,t))},Object.defineProperties($.prototype,F),h.prototype.replaceRange=function(e,t,n){if(!n.size)return this.deleteRange(e,t);var r=this.doc.resolve(e),i=this.doc.resolve(t);if(L(r,i,n))return this.step(new y(e,t,n));var s=G(r,this.doc.resolve(t));0==s[s.length-1]&&s.pop();var a=-(r.depth+1);s.unshift(a);for(var c=r.depth,l=r.pos-1;c>0;c--,l--){var u=r.node(c).type.spec;if(u.defining||u.isolating)break;s.indexOf(c)>-1?a=c:r.before(c)==l&&s.splice(1,0,-c)}for(var d=s.indexOf(a),p=[],h=n.openStart,f=n.content,m=0;;m++){var g=f.firstChild;if(p.push(g),m==n.openStart)break;f=g.content}h>0&&p[h-1].type.spec.defining&&r.node(d).type!=p[h-1].type?h-=1:h>=2&&p[h-1].isTextblock&&p[h-2].type.spec.defining&&r.node(d).type!=p[h-2].type&&(h-=2);for(var v=n.openStart;v>=0;v--){var b=(v+h+1)%(n.openStart+1),w=p[b];if(w)for(var A=0;A=0;E--){if(this.replace(e,t,n),this.steps.length>O)break;var M=s[E];E<0||(e=r.before(M),t=i.after(M))}return this},h.prototype.replaceRangeWith=function(e,t,n){if(!n.isInline&&e==t&&this.doc.resolve(e).parent.content.size){var r=I(this.doc,e,n.type);null!=r&&(e=t=r)}return this.replaceRange(e,t,new o["Slice"](o["Fragment"].from(n),0,0))},h.prototype.deleteRange=function(e,t){for(var n=this.doc.resolve(e),o=this.doc.resolve(t),r=G(n,o),i=0;i0&&(a||n.node(s-1).canReplace(n.index(s-1),o.indexAfter(s-1))))return this.delete(n.before(s),o.after(s))}for(var c=1;c<=n.depth&&c<=o.depth;c++)if(e-n.start(c)==n.depth-c&&t>n.end(c)&&o.end(c)-t!=o.depth-c)return this.delete(n.before(c),t);return this.delete(e,t)}},"0b7b":function(e,t,n){"use strict";var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ZyroPill",e._b({staticClass:"overlay-pill",class:{"overlay-pill--no-overflow":e.disablePillOverflow},attrs:{"text-class":"z-body-small","text-to-uppercase":!1}},"ZyroPill",e.$attrs,!1))},r=[],i={props:{disablePillOverflow:{type:Boolean,default:!1}}},s=i,a=(n("c60b"),n("2877")),c=Object(a["a"])(s,o,r,!1,null,"a5c9634a",null);t["a"]=c.exports},"0c4b":function(e,t,n){"use strict";n("4dd3")},"0cf4":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAOCAYAAAAvxDzwAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFpSURBVHgBnZO/S8NAHMXfpYm2ik380foTFIUidFFUxMlNXHQoLkpxEBf/HAeHDrro4iLOIrg4CILgWmhBaG2F0h/WFm2bi7lrsEiTS+gH7pLLy/fdu+SOPEVnDVgM39yhF0qxrb97mXULfoUPxiIR2wL6ngH9yENeXrXVC1Z96rsJCQKM2hdoLota4hS18zMY1SpvImSh6pNRPoyBlop8WNzdxOj9s7DEMSHN58xOBwlqHf/JGRj1OvRsBp4TGtVPlI/3Ab0Foo7ANzUN/S3dnj08gcpJHFD6QAsFaBfXkEJhsSEZCoL4JLRSzCT9T2s8PnTSzs13mfFJ7RK6ffi2+w9opexuyBKq5lKUlXU4wTTt8haSqrkb8oehcaiJKyhL3ftOWdvgGrExYwi3jX/vAIH4ERAYMJfYMN0UUMEfdjXs397h1+brC08kL0bhhgQvEMJPjRd4QnYGGcVk0v4t/2C7Oeglq57xC8SQcZk4jUgeAAAAAElFTkSuQmCC"},"0fba":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var o=n("a6f4"),r=n("91e0");const i=Object(o["i"])([]),s=(e,t)=>{var n,s;const{$store:a}=null!==(n=null===(s=Object(o["c"])())||void 0===s?void 0:s.proxy)&&void 0!==n?n:{},{setActiveSlide:c,setSlidingDirection:l,activeSlidesTransitioning:u,activeSlides:d}=Object(r["c"])(e),p=Object(o["a"])(()=>{var e;return null!==(e=i.value[i.value.length-1])&&void 0!==e?e:null}),h=Object(o["a"])(()=>a.state.currentBlockId),f=Object(o["a"])(()=>a.getters.currentBlock),m=Object(o["a"])(()=>a.getters.siteBlocks),g=Object(o["a"])(()=>d.value[h.value]),v=Object(o["a"])(()=>f.value.slides.length),b=Object(o["a"])(()=>{var e,t;return null!==(e=null===(t=f.value.slides.find(e=>e.blockId===d.value[h.value]))||void 0===t?void 0:t.name)&&void 0!==e?e:f.value.slides[0].name}),y=Object(o["a"])(()=>u.value[h.value]),w=Object(o["a"])(()=>{var e,t;const n=null===(e=m.value)||void 0===e||null===(t=e[h.value])||void 0===t?void 0:t.slides.findIndex(e=>{var t;return(null===d||void 0===d||null===(t=d.value)||void 0===t?void 0:t[h.value])===e.blockId});return-1===n?0:n}),A=Object(o["a"])(()=>{const e=w.value+1;return e<=v.value-1?e:0}),k=Object(o["a"])(()=>{const e=w.value-1;return e>=0?e:v.value-1}),S=e=>{c({slideshowId:h.value,slideId:e})},C=()=>{if(y.value)return;l(r["b"]);const e=a.getters.currentBlock.slides[A.value].blockId;S(e)},x=()=>{if(y.value)return;l(r["a"]);const e=a.getters.currentBlock.slides[k.value].blockId;S(e)},O=()=>{i.value.pop(),0===i.value.length&&t.emit("close")},E=e=>{i.value.push(e)},M=e=>{S(e),E("EditBlockSlideshowSlideBackground")};return{currentEditBlockSlideshowComponent:p,currentBlockId:h,websiteBlocks:m,currentSlideshowSlideName:b,currentSlideshowActiveSlideIndex:w,currentSlideshowSlideId:g,setActiveSlide:c,goToNextSlideInCurrentActiveSlideshow:C,goToPreviousSlideInCurrentActiveSlideshow:x,setEditBlockSlideshowComponent:E,openSlideBackgroundEdit:M,closeEditBlockSlideshowComponent:O}}},1020:function(e,t){function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){var o=e[t];"object"!=typeof o||Object.isFrozen(o)||n(o)})),e}var o=n,r=n;o.default=r;class i{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function s(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function a(e,...t){const n=Object.create(null);for(const o in e)n[o]=e[o];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const c="",l=e=>!!e.kind;class u{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=s(e)}openNode(e){if(!l(e))return;let t=e.kind;e.sublanguage||(t=`${this.classPrefix}${t}`),this.span(t)}closeNode(e){l(e)&&(this.buffer+=c)}value(){return this.buffer}span(e){this.buffer+=``}}class d{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t={kind:e,children:[]};this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){while(this.closeNode());}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"===typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(e){"string"!==typeof e&&e.children&&(e.children.every(e=>"string"===typeof e)?e.children=[e.children.join("")]:e.children.forEach(e=>{d._collapse(e)}))}}class p extends d{constructor(e){super(),this.options=e}addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root;n.kind=t,n.sublanguage=!0,this.add(n)}toHTML(){const e=new u(this,this.options);return e.value()}finalize(){return!0}}function h(e){return new RegExp(e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")}function f(e){return e?"string"===typeof e?e:e.source:null}function m(...e){const t=e.map(e=>f(e)).join("");return t}function g(...e){const t="("+e.map(e=>f(e)).join("|")+")";return t}function v(e){return new RegExp(e.toString()+"|").exec("").length-1}function b(e,t){const n=e&&e.exec(t);return n&&0===n.index}const y=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function w(e,t="|"){let n=0;return e.map(e=>{n+=1;const t=n;let o=f(e),r="";while(o.length>0){const e=y.exec(o);if(!e){r+=o;break}r+=o.substring(0,e.index),o=o.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?r+="\\"+String(Number(e[1])+t):(r+=e[0],"("===e[0]&&n++)}return r}).map(e=>`(${e})`).join(t)}const A=/\b\B/,k="[a-zA-Z]\\w*",S="[a-zA-Z_]\\w*",C="\\b\\d+(\\.\\d+)?",x="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",O="\\b(0b[01]+)",E="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",M=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=m(t,/.*\b/,e.binary,/\b.*/)),a({className:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},B={begin:"\\\\[\\s\\S]",relevance:0},N={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[B]},T={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[B]},_={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},I=function(e,t,n={}){const o=a({className:"comment",begin:e,end:t,contains:[]},n);return o.contains.push(_),o.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),o},R=I("//","$"),P=I("/\\*","\\*/"),D=I("#","$"),j={className:"number",begin:C,relevance:0},z={className:"number",begin:x,relevance:0},L={className:"number",begin:O,relevance:0},$={className:"number",begin:C+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},F={begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[B,{begin:/\[/,end:/\]/,relevance:0,contains:[B]}]}]},V={className:"title",begin:k,relevance:0},H={className:"title",begin:S,relevance:0},U={begin:"\\.\\s*"+S,relevance:0},W=function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})};var q=Object.freeze({__proto__:null,MATCH_NOTHING_RE:A,IDENT_RE:k,UNDERSCORE_IDENT_RE:S,NUMBER_RE:C,C_NUMBER_RE:x,BINARY_NUMBER_RE:O,RE_STARTERS_RE:E,SHEBANG:M,BACKSLASH_ESCAPE:B,APOS_STRING_MODE:N,QUOTE_STRING_MODE:T,PHRASAL_WORDS_MODE:_,COMMENT:I,C_LINE_COMMENT_MODE:R,C_BLOCK_COMMENT_MODE:P,HASH_COMMENT_MODE:D,NUMBER_MODE:j,C_NUMBER_MODE:z,BINARY_NUMBER_MODE:L,CSS_NUMBER_MODE:$,REGEXP_MODE:F,TITLE_MODE:V,UNDERSCORE_TITLE_MODE:H,METHOD_GUARD:U,END_SAME_AS_BEGIN:W});function J(e,t){const n=e.input[e.index-1];"."===n&&t.ignoreMatch()}function K(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=J,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function G(e,t){Array.isArray(e.illegal)&&(e.illegal=g(...e.illegal))}function Y(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function Z(e,t){void 0===e.relevance&&(e.relevance=1)}const Q=["of","and","for","in","not","or","if","then","parent","list","value"],X="keyword";function ee(e,t,n=X){const o={};return"string"===typeof e?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach((function(n){Object.assign(o,ee(e[n],t,n))})),o;function r(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach((function(t){const n=t.split("|");o[n[0]]=[e,te(n[0],n[1])]}))}}function te(e,t){return t?Number(t):ne(e)?0:1}function ne(e){return Q.includes(e.toLowerCase())}function oe(e,{plugins:t}){function n(t,n){return new RegExp(f(t),"m"+(e.case_insensitive?"i":"")+(n?"g":""))}class o{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=v(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map(e=>e[1]);this.matcherRe=n(w(e),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex((e,t)=>t>0&&void 0!==e),o=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,o)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new o;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}function i(e){const t=new r;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:"begin"})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}function s(t,o){const r=t;if(t.isCompiled)return r;[Y].forEach(e=>e(t,o)),e.compilerExtensions.forEach(e=>e(t,o)),t.__beforeBegin=null,[K,G,Z].forEach(e=>e(t,o)),t.isCompiled=!0;let a=null;if("object"===typeof t.keywords&&(a=t.keywords.$pattern,delete t.keywords.$pattern),t.keywords&&(t.keywords=ee(t.keywords,e.case_insensitive)),t.lexemes&&a)throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return a=a||t.lexemes||/\w+/,r.keywordPatternRe=n(a,!0),o&&(t.begin||(t.begin=/\B|\b/),r.beginRe=n(t.begin),t.endSameAsBegin&&(t.end=t.begin),t.end||t.endsWithParent||(t.end=/\B|\b/),t.end&&(r.endRe=n(t.end)),r.terminatorEnd=f(t.end)||"",t.endsWithParent&&o.terminatorEnd&&(r.terminatorEnd+=(t.end?"|":"")+o.terminatorEnd)),t.illegal&&(r.illegalRe=n(t.illegal)),t.contains||(t.contains=[]),t.contains=[].concat(...t.contains.map((function(e){return ie("self"===e?t:e)}))),t.contains.forEach((function(e){s(e,r)})),t.starts&&s(t.starts,o),r.matcher=i(r),r}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=a(e.classNameAliases||{}),s(e)}function re(e){return!!e&&(e.endsWithParent||re(e.starts))}function ie(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return a(e,{variants:null},t)}))),e.cachedVariants?e.cachedVariants:re(e)?a(e,{starts:e.starts?a(e.starts):null}):Object.isFrozen(e)?a(e):e}var se="10.7.1";function ae(e){return Boolean(e||""===e)}function ce(e){const t={props:["language","code","autodetect"],data:function(){return{detectedLanguage:"",unknownLanguage:!1}},computed:{className(){return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){if(!this.autoDetect&&!e.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`),this.unknownLanguage=!0,s(this.code);let t={};return this.autoDetect?(t=e.highlightAuto(this.code),this.detectedLanguage=t.language):(t=e.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),t.value},autoDetect(){return!this.language||ae(this.autodetect)},ignoreIllegals(){return!0}},render(e){return e("pre",{},[e("code",{class:this.className,domProps:{innerHTML:this.highlighted}})])}},n={install(e){e.component("highlightjs",t)}};return{Component:t,VuePlugin:n}}const le={"after:highlightElement":({el:e,result:t,text:n})=>{const o=de(e);if(!o.length)return;const r=document.createElement("div");r.innerHTML=t.value,t.value=pe(o,de(r),n)}};function ue(e){return e.nodeName.toLowerCase()}function de(e){const t=[];return function e(n,o){for(let r=n.firstChild;r;r=r.nextSibling)3===r.nodeType?o+=r.nodeValue.length:1===r.nodeType&&(t.push({event:"start",offset:o,node:r}),o=e(r,o),ue(r).match(/br|hr|img|input/)||t.push({event:"stop",offset:o,node:r}));return o}(e,0),t}function pe(e,t,n){let o=0,r="";const i=[];function a(){return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset"}function l(e){r+=""}function u(e){("start"===e.event?c:l)(e.node)}while(e.length||t.length){let t=a();if(r+=s(n.substring(o,t[0].offset)),o=t[0].offset,t===e){i.reverse().forEach(l);do{u(t.splice(0,1)[0]),t=a()}while(t===e&&t.length&&t[0].offset===o);i.reverse().forEach(c)}else"start"===t[0].event?i.push(t[0].node):i.pop(),u(t.splice(0,1)[0])}return r+s(n.substr(o))}const he=e=>{console.error(e)},fe=(e,...t)=>{console.log("WARN: "+e,...t)},me=(e,t)=>{console.log(`Deprecated as of ${e}. ${t}`)},ge=s,ve=a,be=Symbol("nomatch"),ye=function(e){const t=Object.create(null),n=Object.create(null),r=[];let s=!0;const a=/(^(<[^>]+>|\t|)+|\n)/gm,c="Could not find the language '{}', did you forget to load/include a language module?",l={disableAutodetect:!0,name:"Plain text",contains:[]};let u={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:null,__emitter:p};function d(e){return u.noHighlightRe.test(e)}function f(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=u.languageDetectRe.exec(t);if(n){const t=D(n[1]);return t||(fe(c.replace("{}",n[1])),fe("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find(e=>d(e)||D(e))}function m(e,t,n,o){let r="",i="";"object"===typeof t?(r=e,n=t.ignoreIllegals,i=t.language,o=void 0):(me("10.7.0","highlight(lang, code, ...args) has been deprecated."),me("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),i=e,r=t);const s={code:r,language:i};F("before:highlight",s);const a=s.result?s.result:g(s.language,s.code,n,o);return a.code=s.code,F("after:highlight",a),a}function g(e,n,o,a){function l(e,t){const n=O.case_insensitive?t[0].toLowerCase():t[0];return Object.prototype.hasOwnProperty.call(e.keywords,n)&&e.keywords[n]}function d(){if(!B.keywords)return void T.addText(_);let e=0;B.keywordPatternRe.lastIndex=0;let t=B.keywordPatternRe.exec(_),n="";while(t){n+=_.substring(e,t.index);const o=l(B,t);if(o){const[e,r]=o;if(T.addText(n),n="",I+=r,e.startsWith("_"))n+=t[0];else{const n=O.classNameAliases[e]||e;T.addKeyword(t[0],n)}}else n+=t[0];e=B.keywordPatternRe.lastIndex,t=B.keywordPatternRe.exec(_)}n+=_.substr(e),T.addText(n)}function p(){if(""===_)return;let e=null;if("string"===typeof B.subLanguage){if(!t[B.subLanguage])return void T.addText(_);e=g(B.subLanguage,_,!0,N[B.subLanguage]),N[B.subLanguage]=e.top}else e=y(_,B.subLanguage.length?B.subLanguage:null);B.relevance>0&&(I+=e.relevance),T.addSublanguage(e.emitter,e.language)}function f(){null!=B.subLanguage?p():d(),_=""}function m(e){return e.className&&T.openNode(O.classNameAliases[e.className]||e.className),B=Object.create(e,{parent:{value:B}}),B}function v(e,t,n){let o=b(e.endRe,n);if(o){if(e["on:end"]){const n=new i(e);e["on:end"](t,n),n.isMatchIgnored&&(o=!1)}if(o){while(e.endsParent&&e.parent)e=e.parent;return e}}if(e.endsWithParent)return v(e.parent,t,n)}function w(e){return 0===B.matcher.regexIndex?(_+=e[0],1):(j=!0,0)}function A(e){const t=e[0],n=e.rule,o=new i(n),r=[n.__beforeBegin,n["on:begin"]];for(const i of r)if(i&&(i(e,o),o.isMatchIgnored))return w(t);return n&&n.endSameAsBegin&&(n.endRe=h(t)),n.skip?_+=t:(n.excludeBegin&&(_+=t),f(),n.returnBegin||n.excludeBegin||(_=t)),m(n),n.returnBegin?0:t.length}function k(e){const t=e[0],o=n.substr(e.index),r=v(B,e,o);if(!r)return be;const i=B;i.skip?_+=t:(i.returnEnd||i.excludeEnd||(_+=t),f(),i.excludeEnd&&(_=t));do{B.className&&T.closeNode(),B.skip||B.subLanguage||(I+=B.relevance),B=B.parent}while(B!==r.parent);return r.starts&&(r.endSameAsBegin&&(r.starts.endRe=r.endRe),m(r.starts)),i.returnEnd?0:t.length}function S(){const e=[];for(let t=B;t!==O;t=t.parent)t.className&&e.unshift(t.className);e.forEach(e=>T.openNode(e))}let C={};function x(t,r){const i=r&&r[0];if(_+=t,null==i)return f(),0;if("begin"===C.type&&"end"===r.type&&C.index===r.index&&""===i){if(_+=n.slice(r.index,r.index+1),!s){const t=new Error("0 width match regex");throw t.languageName=e,t.badRule=C.rule,t}return 1}if(C=r,"begin"===r.type)return A(r);if("illegal"===r.type&&!o){const e=new Error('Illegal lexeme "'+i+'" for mode "'+(B.className||"")+'"');throw e.mode=B,e}if("end"===r.type){const e=k(r);if(e!==be)return e}if("illegal"===r.type&&""===i)return 1;if(P>1e5&&P>3*r.index){const e=new Error("potential infinite loop, way more iterations than matches");throw e}return _+=i,i.length}const O=D(e);if(!O)throw he(c.replace("{}",e)),new Error('Unknown language: "'+e+'"');const E=oe(O,{plugins:r});let M="",B=a||E;const N={},T=new u.__emitter(u);S();let _="",I=0,R=0,P=0,j=!1;try{for(B.matcher.considerAll();;){P++,j?j=!1:B.matcher.considerAll(),B.matcher.lastIndex=R;const e=B.matcher.exec(n);if(!e)break;const t=n.substring(R,e.index),o=x(t,e);R=e.index+o}return x(n.substr(R)),T.closeAllNodes(),T.finalize(),M=T.toHTML(),{relevance:Math.floor(I),value:M,language:e,illegal:!1,emitter:T,top:B}}catch(z){if(z.message&&z.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:z.message,context:n.slice(R-100,R+100),mode:z.mode},sofar:M,relevance:0,value:ge(n),emitter:T};if(s)return{illegal:!1,relevance:0,value:ge(n),emitter:T,language:e,top:B,errorRaised:z};throw z}}function v(e){const t={relevance:0,emitter:new u.__emitter(u),value:ge(e),illegal:!1,top:l};return t.emitter.addText(e),t}function y(e,n){n=n||u.languages||Object.keys(t);const o=v(e),r=n.filter(D).filter(z).map(t=>g(t,e,!1));r.unshift(o);const i=r.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(D(e.language).supersetOf===t.language)return 1;if(D(t.language).supersetOf===e.language)return-1}return 0}),[s,a]=i,c=s;return c.second_best=a,c}function w(e){return u.tabReplace||u.useBR?e.replace(a,e=>"\n"===e?u.useBR?"
":e:u.tabReplace?e.replace(/\t/g,u.tabReplace):e):e}function A(e,t,o){const r=t?n[t]:o;e.classList.add("hljs"),r&&e.classList.add(r)}const k={"before:highlightElement":({el:e})=>{u.useBR&&(e.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n"))},"after:highlightElement":({result:e})=>{u.useBR&&(e.value=e.value.replace(/\n/g,"
"))}},S=/^(<[^>]+>|\t)+/gm,C={"after:highlightElement":({result:e})=>{u.tabReplace&&(e.value=e.value.replace(S,e=>e.replace(/\t/g,u.tabReplace)))}};function x(e){let t=null;const n=f(e);if(d(n))return;F("before:highlightElement",{el:e,language:n}),t=e;const o=t.textContent,r=n?m(o,{language:n,ignoreIllegals:!0}):y(o);F("after:highlightElement",{el:e,result:r,text:o}),e.innerHTML=r.value,A(e,n,r.language),e.result={language:r.language,re:r.relevance,relavance:r.relevance},r.second_best&&(e.second_best={language:r.second_best.language,re:r.second_best.relevance,relavance:r.second_best.relevance})}function O(e){e.useBR&&(me("10.3.0","'useBR' will be removed entirely in v11.0"),me("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")),u=ve(u,e)}const E=()=>{if(E.called)return;E.called=!0,me("10.6.0","initHighlighting() is deprecated. Use highlightAll() instead.");const e=document.querySelectorAll("pre code");e.forEach(x)};function M(){me("10.6.0","initHighlightingOnLoad() is deprecated. Use highlightAll() instead."),B=!0}let B=!1;function N(){if("loading"===document.readyState)return void(B=!0);const e=document.querySelectorAll("pre code");e.forEach(x)}function T(){B&&N()}function _(n,o){let r=null;try{r=o(e)}catch(i){if(he("Language definition for '{}' could not be registered.".replace("{}",n)),!s)throw i;he(i),r=l}r.name||(r.name=n),t[n]=r,r.rawDefinition=o.bind(null,e),r.aliases&&j(r.aliases,{languageName:n})}function I(e){delete t[e];for(const t of Object.keys(n))n[t]===e&&delete n[t]}function R(){return Object.keys(t)}function P(e){me("10.4.0","requireLanguage will be removed entirely in v11."),me("10.4.0","Please see https://github.com/highlightjs/highlight.js/pull/2844");const t=D(e);if(t)return t;const n=new Error("The '{}' language is required, but not loaded.".replace("{}",e));throw n}function D(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}function j(e,{languageName:t}){"string"===typeof e&&(e=[e]),e.forEach(e=>{n[e.toLowerCase()]=t})}function z(e){const t=D(e);return t&&!t.disableAutodetect}function L(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}function $(e){L(e),r.push(e)}function F(e,t){const n=e;r.forEach((function(e){e[n]&&e[n](t)}))}function V(e){return me("10.2.0","fixMarkup will be removed entirely in v11.0"),me("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"),w(e)}function H(e){return me("10.7.0","highlightBlock will be removed entirely in v12.0"),me("10.7.0","Please use highlightElement now."),x(e)}"undefined"!==typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",T,!1),Object.assign(e,{highlight:m,highlightAuto:y,highlightAll:N,fixMarkup:V,highlightElement:x,highlightBlock:H,configure:O,initHighlighting:E,initHighlightingOnLoad:M,registerLanguage:_,unregisterLanguage:I,listLanguages:R,getLanguage:D,registerAliases:j,requireLanguage:P,autoDetection:z,inherit:ve,addPlugin:$,vuePlugin:ce(e).VuePlugin}),e.debugMode=function(){s=!1},e.safeMode=function(){s=!0},e.versionString=se;for(const i in q)"object"===typeof q[i]&&o(q[i]);return Object.assign(e,q),e.addPlugin(k),e.addPlugin(le),e.addPlugin(C),e};var we=ye({});e.exports=we},"10b5":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAOCAYAAADNGCeJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADISURBVHgB1ZG9DsFgFIZfUqFTLRX5NH6WjmIwi1hch83qAiTWGixcgElicQvuwGAwiqSJtip+mgb100/MlfZLdfGM78l5cnLeGNpNii/MO33U5bIn15QRdGXoyWOUjuOIkD+X2QcD1H39JnPdJzaLGSa9FqaDLoLg/Ib2SYN1NrGzHNz1LdT1ynfBV6buDSwfWSSqNZCcDI7nwl8mZQiMyxECSpAKRYhiHmZYmZAmaFQInNsVyRSPIJjaZBExy1iJVPb5GUU00DdYeTchxkWG2gAAAABJRU5ErkJggg=="},11364:function(e,t,n){},"12e0":function(e,t,n){"use strict";n("9286")},"17f9":function(e,t,n){},"19c7":function(e,t,n){},"1d29":function(e,t,n){},"1e0e":function(e,t,n){},"1e75":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAOCAYAAAAvxDzwAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACiSURBVHgB7dItDsJAEAXgNxvapBpCoKqG1WAQGC4BtwCN7gFQKAwWwQGwvUFN1aq6JvU1bdK/rWxNuyP7iclLNnmZZIewf1YYcL9I3K4SYy30dLa9h+XGg5TjCpVSXaFtCZwPa1CTgzBFXpSYSrTDXTn4+ie8H0edTegN4ySD/4kgiHQ2Lmy9fgocBJjRf+dWnm2BQ5wX/BvOhea6w25+h0sN/RAhg9uLDOUAAAAASUVORK5CYII="},"1eb4":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAOCAYAAADNGCeJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFJSURBVHgBzZO7SgNBFIa/2Z1osgYvSSFGMZAQtRPrFHYWAS9gYWGjjQ8g2Fn4CBYWFiLaW1gLPoCXgKUgghpNTNwmN2NidtfdIIQYgyhb+DfDzDnznZ/DOSKlDVq4IIF1oOCiXIXJTgGh+ZDRCEpggPrNLUY6w59gSmiIwO42cmSY16NjVPtev7undnYJpvkLmKoQ3NtBxqJk4zOYudznu4rwa7ZlBStf+BbW1jPPxBjd03HK+4dNkCPDgEoV33yC3s0NPOOxn2FKMNg4zXyxLVmNhNEWF/DNJTBe9La4+Dpnor+P0HWS6kUSfXapNdnrbTgydN0uVsAqlZsxe87UdY9/q+XHWxXjIYV/bRUhJWb62e6sRIZHbUAe4/EJq1iC2ntrIbgSnTaga2qSnpVlG6RSO09SOTnFzGTpJMeZ+Lfr5MyZK84czgdmvGsXZK24JgAAAABJRU5ErkJggg=="},"1f45":function(e,t,n){"use strict";n("d954")},"2b3a":function(e,t,n){},"2b95":function(e,t,n){"use strict";n.r(t),n.d(t,"AI_WRITER",(function(){return T}));var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ZyroDrawer",{attrs:{"data-qa":"builder-sidebar-aiwriter"}},[n("div",{ref:"aiWriter",staticClass:"ai-writer"},[n("div",{staticClass:"ai-writer__header"},[n("div",{staticClass:"ai-writer__title z-h5"},[e._v(" "+e._s(e.$t("builder.AIWriter.title"))+" ")]),n("p",{directives:[{name:"show",rawName:"v-show",value:e.currentlyChoosing,expression:"currentlyChoosing"}],staticClass:"ai-writer__description z-body-small"},[e._v(" "+e._s(e.$t("builder.AIWriter.description"))+" ")])]),n("div",{staticClass:"ai-writer__content"},[n("AiWriterChoice",{attrs:{"currently-choosing":e.currentlyChoosing},on:{"on-content-update":e.scrollToAction,"toggle-choosing":function(t){e.currentlyChoosing=!e.currentlyChoosing},"generate-text":e.generateText}}),e.loading?n("ZyroLoader"):e.currentlyChoosing?e._e():n("AiWriterList",{attrs:{"text-array":e.textArray}})],1)])])},r=[],i=n("5530"),s=n("bc3a"),a=n.n(s);const c="".concat("https://backend.zyro.com","/v1/ai"),l=()=>a.a.get("".concat(c,"/categories")),u=e=>a.a.get("".concat(c,"/subcategories/").concat(e.id)),d=e=>a.a.get("".concat(c,"/types/").concat(e.id)),p=({category:e,subcategory:t,type:n})=>a.a.get("".concat(c,"/texts?\n\t\tcategory=").concat(encodeURIComponent(e),"&\n\t\tsubcategory=").concat(encodeURIComponent(t),"&\n\t\ttype=").concat(encodeURIComponent(n)));var h=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"choice-container"},[e.currentlyChoosing?n("form",{staticClass:"selection-form",on:{submit:function(t){return t.preventDefault(),e.generateText(t)}}},[n("div",{staticClass:"choice-list"},[n("h6",{staticClass:"choice-list__title z-subheading"},[e._v(" 1. "+e._s(e.$t("builder.AIWriter.choices.selectTopic"))+" "),e.initialChoices?n("button",{staticClass:"choice-list__back-icon",on:{click:function(t){t.stopPropagation(),e.currentChoices=Object.assign({},e.initialChoices),e.$emit("toggle-choosing")}}},[n("ZyroSvg",{attrs:{name:"arrow",direction:"right"}})],1):e._e()]),n("ul",{directives:[{name:"qa",rawName:"v-qa",value:"ai-writer-categories",expression:"'ai-writer-categories'"}],staticClass:"choice-list__buttons"},e._l(e.categories,(function(t){return n("button",{directives:[{name:"qa",rawName:"v-qa",value:"aiwriter-category-"+t.id,expression:"`aiwriter-category-${category.id}`"}],key:t.id,staticClass:"choice-list__button",class:{"choice-list__button--active":t===e.currentChoices.category},attrs:{type:"button"},on:{click:function(n){return e.chooseCategory(t)}}},[e._v(" "+e._s(t.id)+" ")])})),0)]),e.currentChoices.category?n("div",{staticClass:"choice-list"},[n("h6",{staticClass:"choice-list__title z-subheading"},[e._v(" 2. "+e._s(e.$t("builder.AIWriter.choices.selectCategory"))+" ")]),n("ul",{directives:[{name:"qa",rawName:"v-qa",value:"ai-writer-subcategories",expression:"'ai-writer-subcategories'"}],staticClass:"choice-list__buttons"},[n("TransitionGroup",{attrs:{name:"drop"}},e._l(e.currentChoices.category.subcategories,(function(t){return n("button",{directives:[{name:"qa",rawName:"v-qa",value:"aiwriter-subcategory-"+t.id,expression:"`aiwriter-subcategory-${subcategory.id}`"}],key:t.id,staticClass:"choice-list__button",class:{"choice-list__button--active":t===e.currentChoices.subcategory},attrs:{type:"button"},on:{click:function(n){e.chooseSubcategory(t),e.$emit("type-selected")}}},[e._v(" "+e._s(t.id)+" ")])})),0)],1)]):e._e(),e.currentChoices.subcategory?n("div",{ref:"typeList",staticClass:"choice-list"},[n("h6",{staticClass:"choice-list__title z-subheading"},[e._v(" 3. "+e._s(e.$t("builder.AIWriter.choices.selectParagraph"))+" ")]),n("ul",{directives:[{name:"qa",rawName:"v-qa",value:"ai-writer-types",expression:"'ai-writer-types'"}],staticClass:"choice-list__buttons"},[n("TransitionGroup",{attrs:{name:"drop"}},e._l(e.currentChoices.subcategory.types,(function(t){return n("button",{directives:[{name:"qa",rawName:"v-qa",value:"aiwriter-type-"+t.id,expression:"`aiwriter-type-${type.id}`"}],key:t.id,staticClass:"choice-list__button",class:{"choice-list__button--active":t===e.currentChoices.type},attrs:{type:"button"},on:{click:function(n){e.currentChoices.type=t}}},[e._v(" "+e._s(t.id)+" ")])})),0)],1)]):e._e(),e.loading?n("ZyroLoader"):e._e(),n("div",{staticClass:"selection-form__button-container"},[n("ZyroButton",{staticClass:"generate-button",attrs:{type:"submit","data-qa":"builder-aiwriter-btn-generatetext",theme:"primary",color:"red",size:"sm","icon-left":"refresh-icon",disabled:!e.currentChoices.type}},[e._v(" "+e._s(e.$t("builder.AIWriter.btn"))+" ")])],1)],1):n("div",{staticClass:"options"},[n("h5",{staticClass:"options__category z-subheading"},[e._v(" "+e._s(e.currentChoices.category.id)+" ")]),e.currentChoices.category?n("div",{staticClass:"current-options"},[e.currentChoices.subcategory?n("span",{staticClass:"current-options__option z-h5"},[e._v(" "+e._s(e.currentChoices.type.id)+" ")]):e._e(),n("span",{staticClass:"current-options__option z-h5 current-options__option--blank"},[e._v(" "+e._s(e.$t("builder.AIWriter.text"))+" ")]),e.currentChoices.type?n("span",{staticClass:"current-options__option z-h5"},[e._v(" "+e._s(e.currentChoices.subcategory.id)+" ")]):e._e()]):e._e(),n("ZyroButton",{staticClass:"options__toggle-button",attrs:{theme:"outline"},on:{click:function(t){return t.stopPropagation(),e.$emit("toggle-choosing")}}},[e._v(" "+e._s(e.$t("common.change"))+" ")])],1)])},f=[],m={props:{currentlyChoosing:{type:Boolean,default:!0}},data(){return{loading:!1,initialChoices:null,currentChoices:{category:null,subcategory:null,type:null},categories:null,lastContentOffsetBottom:null}},mounted(){this.loadCategories()},methods:{generateText(){this.initialChoices=Object(i["a"])({},this.currentChoices),this.$emit("generate-text",{category:this.currentChoices.category.id,subcategory:this.currentChoices.subcategory.id,type:this.currentChoices.type.id})},async loadCategories(){this.loading=!0;const{data:e}=await l();this.categories=e,this.loading=!1},async loadSubcategories(){this.loading=!0,this.$emit("on-content-update");const{data:e}=await u(this.currentChoices.category);this.currentChoices.category.subcategories=e,await this.$forceUpdate(),this.$emit("on-content-update"),this.loading=!1},async loadTypes(){this.loading=!0,this.$emit("on-content-update");const{data:e}=await d(this.currentChoices.subcategory);this.currentChoices.subcategory.types=e,await this.$forceUpdate(),this.$emit("on-content-update"),this.loading=!1},async chooseCategory(e){this.currentChoices.category=e,this.currentChoices.subcategory=null,this.currentChoices.type=null,this.currentChoices.category.subcategories?this.$emit("on-content-update"):await this.loadSubcategories()},async chooseSubcategory(e){this.currentChoices.subcategory=e,this.currentChoices.type=null,this.currentChoices.subcategory.types?this.$emit("on-content-update"):await this.loadTypes()}}},g=m,v=(n("f797"),n("2877")),b=Object(v["a"])(g,h,f,!1,null,"f8f47918",null),y=b.exports,w=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"text-list"},[n("ul",{staticClass:"text-list__items"},e._l(e.textArray,(function(t,o){return n("li",{key:"ai-text-"+o,staticClass:"text-list__item body-small body-small--light"},[n("p",{staticClass:"text-list__text",attrs:{"data-qa":"aiwriter-generatedtext"}},[e._v(" "+e._s(t.text)+" ")]),e.isEditingTextBoxElement?n("ZyroButton",{staticClass:"text-list__insert-button",attrs:{theme:"plain","icon-left":"duplicate","data-qa":"aiwriter-button-inserttext"},on:{click:function(n){return e.insertTextToTextBox(t.text,o)}}},[e._v(" "+e._s(e.lastInsertedTextIndex===o?e.$t("common.inserted"):e.$t("common.insertText"))+" ")]):e._e(),n("ZyroButton",{attrs:{theme:"plain","icon-left":"duplicate","data-qa":"aiwriter-button-copytext"},on:{click:function(n){return e.copyTextToClipboard(t.text,o)}}},[e._v(" "+e._s(e.lastCopiedTextIndex===o?e.$t("common.copied"):e.$t("common.copyText"))+" ")])],1)})),0)])},A=[],k=n("2f62"),S=n("2d27"),C=n("81fb"),x=n("c7d1"),O={props:{textArray:{type:Array,default:()=>[]}},setup(){const{insertHTMLToEnd:e}=Object(x["a"])();return{insertHTMLToEnd:e}},data(){return{lastCopiedTextIndex:null,lastInsertedTextIndex:null}},computed:Object(i["a"])({},Object(k["d"])(["currentElement","isEditingTextBoxElement"])),methods:{copyTextToClipboard(e,t){this.lastCopiedTextIndex=t,navigator.clipboard.writeText(e),S["a"].logEvent({eventName:"ai.select-text",eventProperties:{text:e}})},insertTextToTextBox(e,t){const n="<".concat(C["m"],' class="').concat(C["b"],'">').concat(e,"");this.insertHTMLToEnd(n),this.lastInsertedTextIndex=t,S["a"].logEvent({eventName:"ai.select-text",eventProperties:{text:e}})}}},E=O,M=(n("3008"),Object(v["a"])(E,w,A,!1,null,"bced460a",null)),B=M.exports,N=n("5f84");const T="AiWriter";var _={components:{AiWriterChoice:y,AiWriterList:B},data(){return{currentlyChoosing:!0,loading:!1,textArray:[]}},methods:Object(i["a"])(Object(i["a"])({},Object(N["g"])({notify:N["e"]})),{},{async generateText(e){try{if(!e)return;this.loading=!0;const{data:t}=await p(e);this.currentlyChoosing=!1,this.textArray=t}catch(t){this.notify({message:"Error while generating texts. Try again.",origin:"AiWriter"})}finally{setTimeout(()=>{this.loading=!1},1e3*Math.random()+500)}},async scrollToAction(){await this.$nextTick();const{aiWriter:e}=this.$refs;e.scrollTop=e.scrollHeight-e.offsetHeight}})},I=_,R=(n("ea1f"),Object(v["a"])(I,o,r,!1,null,"251616a4",null));t["default"]=R.exports},"2bb2":function(e,t,n){"use strict";n("19c7")},3003:function(e,t,n){"use strict";n("3bd0")},3008:function(e,t,n){"use strict";n("fbd3")},"304a":function(e,t,n){"use strict";function o(e){this.content=e}n.r(t),n.d(t,"ContentMatch",(function(){return F})),n.d(t,"DOMParser",(function(){return he})),n.d(t,"DOMSerializer",(function(){return Ne})),n.d(t,"Fragment",(function(){return c})),n.d(t,"Mark",(function(){return h})),n.d(t,"MarkType",(function(){return ue})),n.d(t,"Node",(function(){return j})),n.d(t,"NodeRange",(function(){return R})),n.d(t,"NodeType",(function(){return se})),n.d(t,"ReplaceError",(function(){return f})),n.d(t,"ResolvedPos",(function(){return B})),n.d(t,"Schema",(function(){return de})),n.d(t,"Slice",(function(){return m})),o.prototype={constructor:o,find:function(e){for(var t=0;t>1}},o.from=function(e){if(e instanceof o)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new o(t)};var r=o,i=r;function s(e,t,n){for(var o=0;;o++){if(o==e.childCount||o==t.childCount)return e.childCount==t.childCount?null:n;var r=e.child(o),i=t.child(o);if(r!=i){if(!r.sameMarkup(i))return n;if(r.isText&&r.text!=i.text){for(var a=0;r.text[a]==i.text[a];a++)n++;return n}if(r.content.size||i.content.size){var c=s(r.content,i.content,n+1);if(null!=c)return c}n+=r.nodeSize}else n+=r.nodeSize}}function a(e,t,n,o){for(var r=e.childCount,i=t.childCount;;){if(0==r||0==i)return r==i?null:{a:n,b:o};var s=e.child(--r),c=t.child(--i),l=s.nodeSize;if(s!=c){if(!s.sameMarkup(c))return{a:n,b:o};if(s.isText&&s.text!=c.text){var u=0,d=Math.min(s.text.length,c.text.length);while(ue&&!1!==n(a,o+s,r,i)&&a.content.size){var l=s+1;a.nodesBetween(Math.max(0,e-l),Math.min(a.content.size,t-l),n,o+l)}s=c}},c.prototype.descendants=function(e){this.nodesBetween(0,this.size,e)},c.prototype.textBetween=function(e,t,n,o){var r="",i=!0;return this.nodesBetween(e,t,(function(s,a){s.isText?(r+=s.text.slice(Math.max(e,a)-a,t-a),i=!n):s.isLeaf&&o?(r+=o,i=!n):!i&&s.isBlock&&(r+=n,i=!0)}),0),r},c.prototype.append=function(e){if(!e.size)return this;if(!this.size)return e;var t=this.lastChild,n=e.firstChild,o=this.content.slice(),r=0;for(t.isText&&t.sameMarkup(n)&&(o[o.length-1]=t.withText(t.text+n.text),r=1);re)for(var r=0,i=0;ie&&((it)&&(s=s.isText?s.cut(Math.max(0,e-i),Math.min(s.text.length,t-i)):s.cut(Math.max(0,e-i-1),Math.min(s.content.size,t-i-1))),n.push(s),o+=s.nodeSize),i=a}return new c(n,o)},c.prototype.cutByIndex=function(e,t){return e==t?c.empty:0==e&&t==this.content.length?this:new c(this.content.slice(e,t))},c.prototype.replaceChild=function(e,t){var n=this.content[e];if(n==t)return this;var o=this.content.slice(),r=this.size+t.nodeSize-n.nodeSize;return o[e]=t,new c(o,r)},c.prototype.addToStart=function(e){return new c([e].concat(this.content),this.size+e.nodeSize)},c.prototype.addToEnd=function(e){return new c(this.content.concat(e),this.size+e.nodeSize)},c.prototype.eq=function(e){if(this.content.length!=e.content.length)return!1;for(var t=0;tthis.size||e<0)throw new RangeError("Position "+e+" outside of fragment ("+this+")");for(var n=0,o=0;;n++){var r=this.child(n),i=o+r.nodeSize;if(i>=e)return i==e||t>0?d(n+1,i):d(n,o);o=i}},c.prototype.toString=function(){return"<"+this.toStringInner()+">"},c.prototype.toStringInner=function(){return this.content.join(", ")},c.prototype.toJSON=function(){return this.content.length?this.content.map((function(e){return e.toJSON()})):null},c.fromJSON=function(e,t){if(!t)return c.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new c(t.map(e.nodeFromJSON))},c.fromArray=function(e){if(!e.length)return c.empty;for(var t,n=0,o=0;othis.type.rank&&(t||(t=e.slice(0,o)),t.push(this),n=!0),t&&t.push(r)}}return t||(t=e.slice()),n||t.push(this),t},h.prototype.removeFromSet=function(e){for(var t=0;te.depth)throw new f("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new f("Inconsistent open depths");return w(e,t,n,0)}function w(e,t,n,o){var r=e.index(o),i=e.node(o);if(r==t.index(o)&&o=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function C(e,t,n,o){var r=(t||e).node(n),i=0,s=t?t.index(n):r.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(S(e.nodeAfter,o),i++));for(var a=i;ar&&k(e,t,r+1),s=o.depth>r&&k(n,o,r+1),a=[];return C(null,e,r,a),i&&s&&t.index(r)==n.index(r)?(A(i,s),S(x(i,O(e,t,n,o,r+1)),a)):(i&&S(x(i,E(e,t,r+1)),a),C(t,n,r,a),s&&S(x(s,E(n,o,r+1)),a)),C(o,null,r,a),new c(a)}function E(e,t,n){var o=[];if(C(null,e,n,o),e.depth>n){var r=k(e,t,n+1);S(x(r,E(e,t,n+1)),o)}return C(t,null,n,o),new c(o)}function M(e,t){for(var n=t.depth-e.openStart,o=t.node(n),r=o.copy(e.content),i=n-1;i>=0;i--)r=t.node(i).copy(c.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}g.size.get=function(){return this.content.size-this.openStart-this.openEnd},m.prototype.insertAt=function(e,t){var n=b(this.content,e+this.openStart,t,null);return n&&new m(n,this.openStart,this.openEnd)},m.prototype.removeBetween=function(e,t){return new m(v(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)},m.prototype.eq=function(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd},m.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},m.prototype.toJSON=function(){if(!this.content.size)return null;var e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e},m.fromJSON=function(e,t){if(!t)return m.empty;var n=t.openStart||0,o=t.openEnd||0;if("number"!=typeof n||"number"!=typeof o)throw new RangeError("Invalid input for Slice.fromJSON");return new m(c.fromJSON(e,t.content),n,o)},m.maxOpen=function(e,t){void 0===t&&(t=!0);for(var n=0,o=0,r=e.firstChild;r&&!r.isLeaf&&(t||!r.type.spec.isolating);r=r.firstChild)n++;for(var i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)o++;return new m(e,n,o)},Object.defineProperties(m.prototype,g),m.empty=new m(c.empty,0,0);var B=function(e,t,n){this.pos=e,this.path=t,this.depth=t.length/3-1,this.parentOffset=n},N={parent:{configurable:!0},doc:{configurable:!0},textOffset:{configurable:!0},nodeAfter:{configurable:!0},nodeBefore:{configurable:!0}};B.prototype.resolveDepth=function(e){return null==e?this.depth:e<0?this.depth+e:e},N.parent.get=function(){return this.node(this.depth)},N.doc.get=function(){return this.node(0)},B.prototype.node=function(e){return this.path[3*this.resolveDepth(e)]},B.prototype.index=function(e){return this.path[3*this.resolveDepth(e)+1]},B.prototype.indexAfter=function(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)},B.prototype.start=function(e){return e=this.resolveDepth(e),0==e?0:this.path[3*e-1]+1},B.prototype.end=function(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size},B.prototype.before=function(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]},B.prototype.after=function(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize},N.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},N.nodeAfter.get=function(){var e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;var n=this.pos-this.path[this.path.length-1],o=e.child(t);return n?e.child(t).cut(n):o},N.nodeBefore.get=function(){var e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)},B.prototype.posAtIndex=function(e,t){t=this.resolveDepth(t);for(var n=this.path[3*t],o=0==t?0:this.path[3*t-1]+1,r=0;r0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0},B.prototype.blockRange=function(e,t){if(void 0===e&&(e=this),e.pos=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new R(this,e,n)},B.prototype.sameParent=function(e){return this.pos-this.parentOffset==e.pos-e.parentOffset},B.prototype.max=function(e){return e.pos>this.pos?e:this},B.prototype.min=function(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");for(var n=[],o=0,r=t,i=e;;){var s=i.content.findIndex(r),a=s.index,c=s.offset,l=r-c;if(n.push(i,a,o+c),!l)break;if(i=i.child(a),i.isText)break;r=l-1,o+=c+1}return new B(t,n,r)},B.resolveCached=function(e,t){for(var n=0;ne&&this.nodesBetween(e,t,(function(e){return n.isInSet(e.marks)&&(o=!0),!o})),o},z.isBlock.get=function(){return this.type.isBlock},z.isTextblock.get=function(){return this.type.isTextblock},z.inlineContent.get=function(){return this.type.inlineContent},z.isInline.get=function(){return this.type.isInline},z.isText.get=function(){return this.type.isText},z.isLeaf.get=function(){return this.type.isLeaf},z.isAtom.get=function(){return this.type.isAtom},j.prototype.toString=function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),$(this.marks,e)},j.prototype.contentMatchAt=function(e){var t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t},j.prototype.canReplace=function(e,t,n,o,r){void 0===n&&(n=c.empty),void 0===o&&(o=0),void 0===r&&(r=n.childCount);var i=this.contentMatchAt(e).matchFragment(n,o,r),s=i&&i.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(var a=o;a=0;n--)t=e[n].type.name+"("+t+")";return t}var F=function(e){this.validEnd=e,this.next=[],this.wrapCache=[]},V={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};F.parse=function(e,t){var n=new H(e,t);if(null==n.next)return F.empty;var o=W(n);n.next&&n.err("Unexpected trailing text");var r=te(Q(o));return ne(r,n),r},F.prototype.matchType=function(e){for(var t=0;t>1},F.prototype.edge=function(e){var t=e<<1;if(t>=this.next.length)throw new RangeError("There's no "+e+"th edge in this content match");return{type:this.next[t],next:this.next[t+1]}},F.prototype.toString=function(){var e=[];function t(n){e.push(n);for(var o=1;o"+e.indexOf(t.next[r+1]);return o})).join("\n")},Object.defineProperties(F.prototype,V),F.empty=new F(!0);var H=function(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()},U={next:{configurable:!0}};function W(e){var t=[];do{t.push(q(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function q(e){var t=[];do{t.push(J(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function J(e){for(var t=Z(e);;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=G(e,t)}return t}function K(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");var t=Number(e.next);return e.pos++,t}function G(e,t){var n=K(e),o=n;return e.eat(",")&&(o="}"!=e.next?K(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:o,expr:t}}function Y(e,t){var n=e.nodeTypes,o=n[t];if(o)return[o];var r=[];for(var i in n){var s=n[i];s.groups.indexOf(t)>-1&&r.push(s)}return 0==r.length&&e.err("No node type or group '"+t+"' found"),r}function Z(e){if(e.eat("(")){var t=W(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){var n=Y(e,e.next).map((function(t){return null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}}));return e.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}e.err("Unexpected token '"+e.next+"'")}function Q(e){var t=[[]];return r(i(e,0),n()),t;function n(){return t.push([])-1}function o(e,n,o){var r={term:o,to:n};return t[e].push(r),r}function r(e,t){e.forEach((function(e){return e.to=t}))}function i(e,t){if("choice"==e.type)return e.exprs.reduce((function(e,n){return e.concat(i(n,t))}),[]);if("seq"==e.type)for(var s=0;;s++){var a=i(e.exprs[s],t);if(s==e.exprs.length-1)return a;r(a,t=n())}else{if("star"==e.type){var c=n();return o(t,c),r(i(e.expr,c),c),[o(c)]}if("plus"==e.type){var l=n();return r(i(e.expr,t),l),r(i(e.expr,l),l),[o(l)]}if("opt"==e.type)return[o(t)].concat(i(e.expr,t));if("range"==e.type){for(var u=t,d=0;d-1&&r[i+1];ee(e,o).forEach((function(e){s||r.push(n,s=[]),-1==s.indexOf(e)&&s.push(e)}))}}))}));for(var i=t[o.join(",")]=new F(o.indexOf(e.length-1)>-1),s=0;s-1},se.prototype.allowsMarks=function(e){if(null==this.markSet)return!0;for(var t=0;t-1};var de=function(e){for(var t in this.spec={},e)this.spec[t]=e[t];this.spec.nodes=i.from(e.nodes),this.spec.marks=i.from(e.marks),this.nodes=se.compile(this.spec.nodes,this),this.marks=ue.compile(this.spec.marks,this);var n=Object.create(null);for(var o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");var r=this.nodes[o],s=r.spec.content||"",a=r.spec.marks;r.contentMatch=n[s]||(n[s]=F.parse(s,this.nodes)),r.inlineContent=r.contentMatch.inlineContent,r.markSet="_"==a?null:a?pe(this,a.split(" ")):""!=a&&r.inlineContent?null:[]}for(var c in this.marks){var l=this.marks[c],u=l.spec.excludes;l.excluded=null==u?[l]:""==u?[]:pe(this,u.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached=Object.create(null),this.cached.wrappings=Object.create(null)};function pe(e,t){for(var n=[],o=0;o-1)&&n.push(s=c)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[o]+"'")}return n}de.prototype.node=function(e,t,n,o){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof se))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,o)},de.prototype.text=function(e,t){var n=this.nodes.text;return new L(n,n.defaultAttrs,e,h.setFrom(t))},de.prototype.mark=function(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)},de.prototype.nodeFromJSON=function(e){return j.fromJSON(this,e)},de.prototype.markFromJSON=function(e){return h.fromJSON(this,e)},de.prototype.nodeType=function(e){var t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t};var he=function(e,t){var n=this;this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach((function(e){e.tag?n.tags.push(e):e.style&&n.styles.push(e)})),this.normalizeLists=!this.tags.some((function(t){if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;var n=e.nodes[t.node];return n.contentMatch.matchType(n)}))};he.prototype.parse=function(e,t){void 0===t&&(t={});var n=new ke(this,t,!1);return n.addAll(e,null,t.from,t.to),n.finish()},he.prototype.parseSlice=function(e,t){void 0===t&&(t={});var n=new ke(this,t,!0);return n.addAll(e,null,t.from,t.to),m.maxOpen(n.finish())},he.prototype.matchTag=function(e,t,n){for(var o=n?this.tags.indexOf(n)+1:0;oe.length&&(61!=i.style.charCodeAt(e.length)||i.style.slice(e.length+1)!=t))){if(i.getAttrs){var s=i.getAttrs(t);if(!1===s)continue;i.attrs=s}return i}}},he.schemaRules=function(e){var t=[];function n(e){for(var n=null==e.priority?50:e.priority,o=0;o=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]},Ae.prototype.applyPending=function(e){for(var t=0,n=this.pendingMarks;t=0;o--){var r=this.nodes[o],i=r.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,n=r,!i.length))break;if(r.solid)break}if(!t)return!1;this.sync(n);for(var s=0;sthis.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}},ke.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},ke.prototype.sync=function(e){for(var t=this.open;t>=0;t--)if(this.nodes[t]==e)return void(this.open=t)},Se.currentPos.get=function(){this.closeExtra();for(var e=0,t=this.open;t>=0;t--){for(var n=this.nodes[t].content,o=n.length-1;o>=0;o--)e+=n[o].nodeSize;t&&e++}return e},ke.prototype.findAtPoint=function(e,t){if(this.find)for(var n=0;n-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);var n=e.split("/"),o=this.options.context,r=!this.isOpen&&(!o||o.parent.type==this.nodes[0].type),i=-(o?o.depth+1:0)+(r?0:1),s=function(e,a){for(;e>=0;e--){var c=n[e];if(""==c){if(e==n.length-1||0==e)continue;for(;a>=i;a--)if(s(e-1,a))return!0;return!1}var l=a>0||0==a&&r?t.nodes[a].type:o&&a>=i?o.node(a-i).type:null;if(!l||l.name!=c&&-1==l.groups.indexOf(c))return!1;a--}return!0};return s(n.length-1,this.open)},ke.prototype.textblockFromContext=function(){var e=this.options.context;if(e)for(var t=e.depth;t>=0;t--){var n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(var o in this.parser.schema.nodes){var r=this.parser.schema.nodes[o];if(r.isTextblock&&r.defaultAttrs)return r}},ke.prototype.addPendingMark=function(e){var t=Be(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)},ke.prototype.removePendingMark=function(e,t){for(var n=this.open;n>=0;n--){var o=this.nodes[n],r=o.pendingMarks.lastIndexOf(e);if(r>-1)o.pendingMarks=e.removeFromSet(o.pendingMarks);else{o.activeMarks=e.removeFromSet(o.activeMarks);var i=o.popFromStashMark(e);i&&(o.activeMarks=i.addToSet(o.activeMarks))}if(o==t)break}},Object.defineProperties(ke.prototype,Se);var Ne=function(e,t){this.nodes=e||{},this.marks=t||{}};function Te(e){var t={};for(var n in e){var o=e[n].spec.toDOM;o&&(t[n]=o)}return t}function _e(e){return e.document||window.document}Ne.prototype.serializeFragment=function(e,t,n){var o=this;void 0===t&&(t={}),n||(n=_e(t).createDocumentFragment());var r=n,i=null;return e.forEach((function(e){if(i||e.marks.length){i||(i=[]);var n=0,s=0;while(n=0;o--){var r=this.serializeMark(e.marks[o],e.isInline,t);r&&((r.contentDOM||r.dom).appendChild(n),n=r.dom)}return n},Ne.prototype.serializeMark=function(e,t,n){void 0===n&&(n={});var o=this.marks[e.type.name];return o&&Ne.renderSpec(_e(n),o(e,t))},Ne.renderSpec=function(e,t,n){if(void 0===n&&(n=null),"string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;var o=t[0],r=o.indexOf(" ");r>0&&(n=o.slice(0,r),o=o.slice(r+1));var i=null,s=n?e.createElementNS(n,o):e.createElement(o),a=t[1],c=1;if(a&&"object"==typeof a&&null==a.nodeType&&!Array.isArray(a))for(var l in c=2,a)if(null!=a[l]){var u=l.indexOf(" ");u>0?s.setAttributeNS(l.slice(0,u),l.slice(u+1),a[l]):s.setAttribute(l,a[l])}for(var d=c;dc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}var h=Ne.renderSpec(e,p,n),f=h.dom,m=h.contentDOM;if(s.appendChild(f),m){if(i)throw new RangeError("Multiple content holes");i=m}}return{dom:s,contentDOM:i}},Ne.fromSchema=function(e){return e.cached.domSerializer||(e.cached.domSerializer=new Ne(this.nodesFromSchema(e),this.marksFromSchema(e)))},Ne.nodesFromSchema=function(e){var t=Te(e.nodes);return t.text||(t.text=function(e){return e.text}),t},Ne.marksFromSchema=function(e){return Te(e.marks)}},3220:function(e,t,n){},3335:function(e,t,n){"use strict";n.d(t,"k",(function(){return m})),n.d(t,"a",(function(){return g})),n.d(t,"e",(function(){return v})),n.d(t,"g",(function(){return b})),n.d(t,"b",(function(){return y})),n.d(t,"f",(function(){return w})),n.d(t,"d",(function(){return A})),n.d(t,"c",(function(){return k})),n.d(t,"h",(function(){return S})),n.d(t,"i",(function(){return C})),n.d(t,"j",(function(){return x}));var o=n("5530"),r=n("a6f4"),i=n("bc3a"),s=n.n(i),a=n("e1bd");const c=e=>{var t,n,o,r;const i=null===e||void 0===e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.message,s=null===e||void 0===e||null===(o=e.response)||void 0===o||null===(r=o.data)||void 0===r?void 0:r.msg;return i||s||e.message};var l=n("fa49"),u=n("720d");const d=()=>{const e=Object(r["i"])(null),t=Object(r["i"])(null),n=Object(r["i"])(null),o=Object(r["i"])(!1),i=Object(r["i"])(!1),s=e=>{t.value=e},a=e=>{throw s(null),console.error(e),e},c=async()=>{o.value=!0;try{n.value=await Object(u["load"])("6LewOLYUAAAAAPFPGFDFYphHRmk3BHJvD9ybsun0"),i.value=!0}catch(e){a(null!==e&&void 0!==e?e:new Error("Invalid VUE_APP_RE_CAPTCHA_SITE_KEY"))}finally{o.value=!1}},l=async()=>{o.value||i.value||await c();try{return e.value=await n.value.execute(),e.value}catch(t){return a(t)}};return{fallback:t,setFallback:s,getToken:l}};var p;const h=null!==(p=window.sessionStorage.getItem("z-window-id"))&&void 0!==p?p:Object(a["a"])();window.sessionStorage.setItem("z-window-id",h);const f={method:"get",baseURL:"https://backend.zyro.com",headers:{common:{Accept:"application/json"},"z-app":"builder","z-window-id":h},withCredentials:!0,withReCaptcha:!1},m=()=>{const e=Object(r["i"])(!1),t=Object(r["i"])(!1),n=Object(r["i"])(!1),i=Object(r["i"])(!1),a=Object(r["i"])(!1),u=Object(r["i"])(null),p=Object(r["i"])(null),h=Object(r["h"])({}),{fallback:m,getToken:g,setFallback:v}=d(),{notify:b}=Object(l["a"])(),y=Object(r["a"])(()=>{var e;return null===(e=u.value)||void 0===e?void 0:e.message}),w=Object(r["a"])(()=>{var e,t,n;return null===(e=u.value)||void 0===e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.captcha}),A=(e,t,r)=>{var i;n.value=!0,a.value=s.a.isCancel(e);const l=null!==(i=t.message)&&void 0!==i?i:c(e);r&&!a.value&&b(Object(o["a"])(Object(o["a"])({},t),{},{message:l})),u.value=Object(o["a"])(Object(o["a"])({},e),{},{message:l})},k=async(r,a={},c={},l=!0)=>{var d;e.value=!0,t.value=!1,n.value=!1,i.value=s.a.CancelToken.source(),u.value=null,h.value=Object(o["a"])(Object(o["a"])(Object(o["a"])({url:r},f),a),{},{cancelToken:i.value.token}),null!==(d=h.value.data)&&void 0!==d&&d.withRecaptcha&&(h.value.data.token=await g(),m.value&&(h.value.data.captchaFallback=m.value));try{const{data:n}=await s()(h.value);n?(p.value=n,t.value=!0):A(new Error("A malformed response"))}catch(v){A(v,c,l)}finally{e.value=!1}};return{isLoading:e,hasLoaded:t,hasFailed:n,hasRequestCancelled:a,cancelTokenSource:i,error:u,errorMessage:y,reCaptchaSvg:w,setFallback:v,result:p,callApi:k}},g="/v1/ai/heatmap/page",v="/v3/domains/whois/",b=Object({NODE_ENV:"production",VUE_APP_API_URL:"https://backend.zyro.com",VUE_APP_BUILDER_URL:"https://editor.zyro.com",VUE_APP_HOMEPAGE_URL:"https://zyro.com",VUE_APP_PREVIEW_URL:"https://latest-user-app.zyro.com",VUE_APP_PUBLISH_DOMAIN:".zyrosite.com",VUE_APP_HOTJAR_ID:"1393591",VUE_APP_HOTJAR_SV:"6",VUE_APP_GTM_ID:"GTM-KDF9B7B",VUE_APP_GTM_AUTH:"LlecFQokRL0EBGDSGfDLDQ",VUE_APP_GTM_PREVIEW:"env-2",VUE_APP_AMPLITUDE_API_KEY:"e792f3f621456711beac5b4d29a7fba2",VUE_APP_RE_CAPTCHA_SITE_KEY:"6LewOLYUAAAAAPFPGFDFYphHRmk3BHJvD9ybsun0",VUE_APP_SENTRY_DSN:"https://cc0ee5b1e05d417c8a46c4da579e159a@o324647.ingest.sentry.io/1879448",VUE_APP_SENTRY_ENV:"PROD",VUE_APP_ENV_NAME:"PROD",VUE_APP_INTERCOM_APP_ID:"drniypbv",VUE_APP_INTERCOM_DELAY:"10000",VUE_APP_INSTAGRAM_APP_ID:"201274757743438",VUE_APP_TRANSLATIONS_BRAND:"zyro-builder",VUE_APP_TRANSLATIONS_LIVE_TRANSLATE:"false",VUE_APP_TRANSLATIONS_ENABLED:"true",VUE_APP_WEBSITE_IMPORTER_API_URL:"https://ws-importer2.zyro.space",VUE_APP_BUILD_NUMBER:"842",BASE_URL:"/"}).VUE_APP_USER_APP_DPREVIEW?"/v3/publish/current?userAppDpreview=".concat(Object({NODE_ENV:"production",VUE_APP_API_URL:"https://backend.zyro.com",VUE_APP_BUILDER_URL:"https://editor.zyro.com",VUE_APP_HOMEPAGE_URL:"https://zyro.com",VUE_APP_PREVIEW_URL:"https://latest-user-app.zyro.com",VUE_APP_PUBLISH_DOMAIN:".zyrosite.com",VUE_APP_HOTJAR_ID:"1393591",VUE_APP_HOTJAR_SV:"6",VUE_APP_GTM_ID:"GTM-KDF9B7B",VUE_APP_GTM_AUTH:"LlecFQokRL0EBGDSGfDLDQ",VUE_APP_GTM_PREVIEW:"env-2",VUE_APP_AMPLITUDE_API_KEY:"e792f3f621456711beac5b4d29a7fba2",VUE_APP_RE_CAPTCHA_SITE_KEY:"6LewOLYUAAAAAPFPGFDFYphHRmk3BHJvD9ybsun0",VUE_APP_SENTRY_DSN:"https://cc0ee5b1e05d417c8a46c4da579e159a@o324647.ingest.sentry.io/1879448",VUE_APP_SENTRY_ENV:"PROD",VUE_APP_ENV_NAME:"PROD",VUE_APP_INTERCOM_APP_ID:"drniypbv",VUE_APP_INTERCOM_DELAY:"10000",VUE_APP_INSTAGRAM_APP_ID:"201274757743438",VUE_APP_TRANSLATIONS_BRAND:"zyro-builder",VUE_APP_TRANSLATIONS_LIVE_TRANSLATE:"false",VUE_APP_TRANSLATIONS_ENABLED:"true",VUE_APP_WEBSITE_IMPORTER_API_URL:"https://ws-importer2.zyro.space",VUE_APP_BUILD_NUMBER:"842",BASE_URL:"/"}).VUE_APP_USER_APP_DPREVIEW):"/v3/publish/current",y="/v3/publish/custom-domain",w="/v3/domains/is-connected/",A="/v3/publish/custom-domain",k="v3/hostinger-integration/connect-imported-domain",S="/v3/templates",C="/v3/wizard/category-suggestion",x="/v3/wizard/category-suggestion-log"},"397e":function(e,t,n){"use strict";n("b998")},"3bd0":function(e,t,n){},"3bec":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAcCAYAAAATFf3WAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGgSURBVHgB7dY/SAJRHAfw75mhmaaJERaCYkVhBEUGJSkVhYQYNVRzaXNUNDfU1iItjbY01VKrjW02NFlmaUQQ+AfTNMLU8omN5d0jeMN9lt8N78GX3+/u3eNuj1EGwyRgnLT20GMAU8JP1cp8B8WAtMSAtJgPyDlnp8hBrVI2gyXZtxypHDq91T9JoxY0JsfMuA69oEkuxaClA+eBEKgUUqRQjdg2bESvuQ1dJh38+4toUcqgUclxuLuAbqMO7Tol7CMm0BAcUCaTYnvNgYE+PSLRBKzuAzw+p3FzH8eQy4e7WAITo2Zseu1krVC8R9yqbsLctAX+kyC0agVSr/lf12s1CqQz79jwjOPo9ArxZA51ETpiCSfB+oqNjPavcBWpdB4GvQbzzn6Uy/wvTrw7qJA3olAsoVAogg/Nd+clHEcC10VIB1eXrPDtuHmHq8hkP7C3NQPPspXXPl5v72UwhkgsCSFKpRLOLkIIP8R57eMcWhcZsaJBBZbki1lSuQD0JKAJwo+C/xDFJ6niZYGWGJCWGJDWz9lS+6xZw3wHvwABmnSPZXY/lAAAAABJRU5ErkJggg=="},"3ce4":function(e,t,n){"use strict";var o=n("1020"),r=n("073e");t.highlight=s,t.highlightAuto=a,t.registerLanguage=c,t.listLanguages=l,t.registerAlias=u,d.prototype.addText=f,d.prototype.addKeyword=p,d.prototype.addSublanguage=h,d.prototype.openNode=m,d.prototype.closeNode=g,d.prototype.closeAllNodes=b,d.prototype.finalize=b,d.prototype.toHTML=v;var i="hljs-";function s(e,t,n){var s,a=o.configure({}),c=n||{},l=c.prefix;if("string"!==typeof e)throw r("Expected `string` for name, got `%s`",e);if(!o.getLanguage(e))throw r("Unknown language: `%s` is not registered",e);if("string"!==typeof t)throw r("Expected `string` for value, got `%s`",t);if(null!==l&&void 0!==l||(l=i),o.configure({__emitter:d,classPrefix:l}),s=o.highlight(t,{language:e,ignoreIllegals:!0}),o.configure(a||{}),s.errorRaised)throw s.errorRaised;return{relevance:s.relevance,language:s.language,value:s.emitter.rootNode.children}}function a(e,t){var n,a,c,l,u=t||{},d=u.subset||o.listLanguages(),p=u.prefix,h=d.length,f=-1;if(null!==p&&void 0!==p||(p=i),"string"!==typeof e)throw r("Expected `string` for value, got `%s`",e);a={relevance:0,language:null,value:[]},n={relevance:0,language:null,value:[]};while(++fa.relevance&&(a=c),c.relevance>n.relevance&&(a=n,n=c));return a.language&&(n.secondBest=a),n}function c(e,t){o.registerLanguage(e,t)}function l(){return o.listLanguages()}function u(e,t){var n,r=e;for(n in t&&(r={},r[e]=t),r)o.registerAliases(r[n],{languageName:n})}function d(e){this.options=e,this.rootNode={children:[]},this.stack=[this.rootNode]}function p(e,t){this.openNode(t),this.addText(e),this.closeNode()}function h(e,t){var n=this.stack,o=n[n.length-1],r=e.rootNode.children,i=t?{type:"element",tagName:"span",properties:{className:[t]},children:r}:r;o.children=o.children.concat(i)}function f(e){var t,n,o=this.stack;""!==e&&(t=o[o.length-1],n=t.children[t.children.length-1],n&&"text"===n.type?n.value+=e:t.children.push({type:"text",value:e}))}function m(e){var t=this.stack,n=this.options.classPrefix+e,o=t[t.length-1],r={type:"element",tagName:"span",properties:{className:[n]},children:[]};o.children.push(r),t.push(r)}function g(){this.stack.pop()}function v(){return""}function b(){}},"3d37":function(e,t,n){"use strict";n("c765")},4230:function(e,t,n){"use strict";n("ab8d")},4262:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var o=n("5530"),r=(n("13d5"),n("ddb0"),n("a6f4")),i=n("9361");const s=["padding","m-padding","block-padding"],a=e=>{const t=Object(r["a"])(()=>{var t,n,r,a;const c=null===(t=e.data)||void 0===t||null===(n=t.settings)||void 0===n?void 0:n.styles,l=null===(r=e.data)||void 0===r||null===(a=r.background)||void 0===a?void 0:a.current;let u={};const{background:d}=e.data;if(l){const e="image"===d.current,t=e?"url(".concat(d[d.current],")"):d[d.current];u={["--background-".concat(d.current)]:t}}return c||l?Object.entries(c).reduce((e,[t,n])=>{const r="--".concat(t),a=s.includes(t)?Object.entries(Object(i["a"])(n)).reduce((e,[t,i])=>Object(o["a"])(Object(o["a"])({},e),{},{["".concat(r,"-").concat(t)]:i,[r]:n}),{}):{[r]:n};return Object(o["a"])(Object(o["a"])({},e),a)},u):{}});return{computedStyles:t}}},4621:function(e,t,n){},"47f5":function(e,t,n){},"487e":function(e,t,n){},"4dd3":function(e,t,n){},"4e1a":function(e,t,n){},5313:function(e,t,n){"use strict";n.r(t),n.d(t,"AllSelection",(function(){return h})),n.d(t,"EditorState",(function(){return x})),n.d(t,"NodeSelection",(function(){return d})),n.d(t,"Plugin",(function(){return B})),n.d(t,"PluginKey",(function(){return _})),n.d(t,"Selection",(function(){return s})),n.d(t,"SelectionRange",(function(){return c})),n.d(t,"TextSelection",(function(){return l})),n.d(t,"Transaction",(function(){return w}));var o=n("304a"),r=n("0ac0"),i=Object.create(null),s=function(e,t,n){this.ranges=n||[new c(e.min(t),e.max(t))],this.$anchor=e,this.$head=t},a={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};a.anchor.get=function(){return this.$anchor.pos},a.head.get=function(){return this.$head.pos},a.from.get=function(){return this.$from.pos},a.to.get=function(){return this.$to.pos},a.$from.get=function(){return this.ranges[0].$from},a.$to.get=function(){return this.ranges[0].$to},a.empty.get=function(){for(var e=this.ranges,t=0;t=0;r--){var i=t<0?m(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):m(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(i)return i}},s.near=function(e,t){return void 0===t&&(t=1),this.findFrom(e,t)||this.findFrom(e,-t)||new h(e.node(0))},s.atStart=function(e){return m(e,e,0,0,1)||new h(e)},s.atEnd=function(e){return m(e,e,e.content.size,e.childCount,-1)||new h(e)},s.fromJSON=function(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=i[t.type];if(!n)throw new RangeError("No selection type "+t.type+" defined");return n.fromJSON(e,t)},s.jsonID=function(e,t){if(e in i)throw new RangeError("Duplicate use of selection JSON ID "+e);return i[e]=t,t.prototype.jsonID=e,t},s.prototype.getBookmark=function(){return l.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(s.prototype,a),s.prototype.visible=!0;var c=function(e,t){this.$from=e,this.$to=t},l=function(e){function t(t,n){void 0===n&&(n=t),e.call(this,t,n)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={$cursor:{configurable:!0}};return n.$cursor.get=function(){return this.$anchor.pos==this.$head.pos?this.$head:null},t.prototype.map=function(n,o){var r=n.resolve(o.map(this.head));if(!r.parent.inlineContent)return e.near(r);var i=n.resolve(o.map(this.anchor));return new t(i.parent.inlineContent?i:r,r)},t.prototype.replace=function(t,n){if(void 0===n&&(n=o["Slice"].empty),e.prototype.replace.call(this,t,n),n==o["Slice"].empty){var r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}},t.prototype.eq=function(e){return e instanceof t&&e.anchor==this.anchor&&e.head==this.head},t.prototype.getBookmark=function(){return new u(this.anchor,this.head)},t.prototype.toJSON=function(){return{type:"text",anchor:this.anchor,head:this.head}},t.fromJSON=function(e,n){if("number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new t(e.resolve(n.anchor),e.resolve(n.head))},t.create=function(e,t,n){void 0===n&&(n=t);var o=e.resolve(t);return new this(o,n==t?o:e.resolve(n))},t.between=function(n,o,r){var i=n.pos-o.pos;if(r&&!i||(r=i>=0?1:-1),!o.parent.inlineContent){var s=e.findFrom(o,r,!0)||e.findFrom(o,-r,!0);if(!s)return e.near(o,r);o=s.$head}return n.parent.inlineContent||(0==i?n=o:(n=(e.findFrom(n,-r,!0)||e.findFrom(n,r,!0)).$anchor,n.pos0?0:1);r>0?s=0;s+=r){var a=t.child(s);if(a.isAtom){if(!i&&d.isSelectable(a))return d.create(e,n-(r<0?a.nodeSize:0))}else{var c=m(e,a,n+r,r<0?a.childCount:0,r,i);if(c)return c}n+=a.nodeSize*r}}function g(e,t,n){var o=e.steps.length-1;if(!(o0},t.prototype.setStoredMarks=function(e){return this.storedMarks=e,this.updated|=b,this},t.prototype.ensureMarks=function(e){return o["Mark"].sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this},t.prototype.addStoredMark=function(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))},t.prototype.removeStoredMark=function(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))},n.storedMarksSet.get=function(){return(this.updated&b)>0},t.prototype.addStep=function(t,n){e.prototype.addStep.call(this,t,n),this.updated=this.updated&~b,this.storedMarks=null},t.prototype.setTime=function(e){return this.time=e,this},t.prototype.replaceSelection=function(e){return this.selection.replace(this,e),this},t.prototype.replaceSelectionWith=function(e,t){var n=this.selection;return!1!==t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||o["Mark"].none))),n.replaceWith(this,e),this},t.prototype.deleteSelection=function(){return this.selection.replace(this),this},t.prototype.insertText=function(e,t,n){void 0===n&&(n=t);var o=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(o.text(e),!0):this.deleteSelection();if(!e)return this.deleteRange(t,n);var r=this.storedMarks;if(!r){var i=this.doc.resolve(t);r=n==t?i.marks():i.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,o.text(e,r)),this.selection.empty||this.setSelection(s.near(this.selection.$to)),this},t.prototype.setMeta=function(e,t){return this.meta["string"==typeof e?e:e.key]=t,this},t.prototype.getMeta=function(e){return this.meta["string"==typeof e?e:e.key]},n.isGeneric.get=function(){for(var e in this.meta)return!1;return!0},t.prototype.scrollIntoView=function(){return this.updated|=y,this},n.scrolledIntoView.get=function(){return(this.updated&y)>0},Object.defineProperties(t.prototype,n),t}(r["e"]);function A(e,t){return t&&e?e.bind(t):e}var k=function(e,t,n){this.name=e,this.init=A(t.init,n),this.apply=A(t.apply,n)},S=[new k("doc",{init:function(e){return e.doc||e.schema.topNodeType.createAndFill()},apply:function(e){return e.doc}}),new k("selection",{init:function(e,t){return e.selection||s.atStart(t.doc)},apply:function(e){return e.selection}}),new k("storedMarks",{init:function(e){return e.storedMarks||null},apply:function(e,t,n,o){return o.selection.$cursor?e.storedMarks:null}}),new k("scrollToSelection",{init:function(){return 0},apply:function(e,t){return e.scrolledIntoView?t+1:t}})],C=function(e,t){var n=this;this.schema=e,this.fields=S.concat(),this.plugins=[],this.pluginsByKey=Object.create(null),t&&t.forEach((function(e){if(n.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");n.plugins.push(e),n.pluginsByKey[e.key]=e,e.spec.state&&n.fields.push(new k(e.key,e.spec.state,e))}))},x=function(e){this.config=e},O={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};O.schema.get=function(){return this.config.schema},O.plugins.get=function(){return this.config.plugins},x.prototype.apply=function(e){return this.applyTransaction(e).state},x.prototype.filterTransaction=function(e,t){void 0===t&&(t=-1);for(var n=0;n-1&&E.splice(t,1)},Object.defineProperties(x.prototype,O);var E=[];function M(e,t,n){for(var o in e){var r=e[o];r instanceof Function?r=r.bind(t):"handleDOMEvents"==o&&(r=M(r,t,{})),n[o]=r}return n}var B=function(e){this.props={},e.props&&M(e.props,this,this.props),this.spec=e,this.key=e.key?e.key.key:T("plugin")};B.prototype.getState=function(e){return e[this.key]};var N=Object.create(null);function T(e){return e in N?e+"$"+ ++N[e]:(N[e]=0,e+"$")}var _=function(e){void 0===e&&(e="key"),this.key=T(e)};_.prototype.get=function(e){return e.config.pluginsByKey[this.key]},_.prototype.getState=function(e){return e[this.key]}},"55be":function(e,t,n){"use strict";n.r(t),n.d(t,"CellSelection",(function(){return $})),n.d(t,"TableMap",(function(){return m})),n.d(t,"TableView",(function(){return Ve})),n.d(t,"__clipCells",(function(){return G})),n.d(t,"__insertCells",(function(){return X})),n.d(t,"__pastedCells",(function(){return q})),n.d(t,"addColSpan",(function(){return z})),n.d(t,"addColumn",(function(){return ge})),n.d(t,"addColumnAfter",(function(){return be})),n.d(t,"addColumnBefore",(function(){return ve})),n.d(t,"addRow",(function(){return ke})),n.d(t,"addRowAfter",(function(){return Ce})),n.d(t,"addRowBefore",(function(){return Se})),n.d(t,"cellAround",(function(){return x})),n.d(t,"colCount",(function(){return R})),n.d(t,"columnIsHeader",(function(){return L})),n.d(t,"columnResizing",(function(){return We})),n.d(t,"columnResizingPluginKey",(function(){return Ue})),n.d(t,"deleteColumn",(function(){return we})),n.d(t,"deleteRow",(function(){return Oe})),n.d(t,"deleteTable",(function(){return Fe})),n.d(t,"findCell",(function(){return I})),n.d(t,"fixTables",(function(){return he})),n.d(t,"fixTablesKey",(function(){return de})),n.d(t,"goToNextCell",(function(){return $e})),n.d(t,"handlePaste",(function(){return se})),n.d(t,"inSameTable",(function(){return _})),n.d(t,"isInTable",(function(){return E})),n.d(t,"mergeCells",(function(){return Be})),n.d(t,"moveCellForward",(function(){return T})),n.d(t,"nextCell",(function(){return P})),n.d(t,"pointsAtCell",(function(){return N})),n.d(t,"removeColSpan",(function(){return j})),n.d(t,"removeColumn",(function(){return ye})),n.d(t,"removeRow",(function(){return xe})),n.d(t,"rowIsHeader",(function(){return Ae})),n.d(t,"selectedRect",(function(){return me})),n.d(t,"selectionCell",(function(){return M})),n.d(t,"setAttr",(function(){return D})),n.d(t,"setCellAttr",(function(){return _e})),n.d(t,"splitCell",(function(){return Ne})),n.d(t,"splitCellWithType",(function(){return Te})),n.d(t,"tableEditing",(function(){return it})),n.d(t,"tableEditingKey",(function(){return C})),n.d(t,"tableNodeTypes",(function(){return S})),n.d(t,"tableNodes",(function(){return k})),n.d(t,"toggleHeader",(function(){return Pe})),n.d(t,"toggleHeaderCell",(function(){return ze})),n.d(t,"toggleHeaderColumn",(function(){return je})),n.d(t,"toggleHeaderRow",(function(){return De})),n.d(t,"updateColumnsOnResize",(function(){return He}));var o,r,i=n("5313"),s=n("304a"),a=n("7f06"),c=n("576a"),l=n("0ac0");if("undefined"!=typeof WeakMap){var u=new WeakMap;o=function(e){return u.get(e)},r=function(e,t){return u.set(e,t),t}}else{var d=[],p=10,h=0;o=function(e){for(var t=0;t=n){(i||(i=[])).push({type:"overlong_rowspan",pos:u,n:y-A});break}for(var k=r+A*t,S=0;So&&(i+=l.attrs.colspan)}for(var u=0;u1&&(n=!0)}-1==t?t=i:t!=i&&(t=Math.max(t,i))}return t}function b(e,t,n){e.problems||(e.problems=[]);for(var o=0,r={};o0;t--)if("row"==e.node(t).type.spec.tableRole)return e.node(0).resolve(e.before(t+1));return null}function O(e){for(var t=e.depth;t>0;t--){var n=e.node(t).type.spec.tableRole;if("cell"===n||"header_cell"===n)return e.node(t)}return null}function E(e){for(var t=e.selection.$head,n=t.depth;n>0;n--)if("row"==t.node(n).type.spec.tableRole)return!0;return!1}function M(e){var t=e.selection;return t.$anchorCell?t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell:t.node&&"cell"==t.node.type.spec.tableRole?t.$anchor:x(t.$head)||B(t.$head)}function B(e){for(var t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){var o=t.type.spec.tableRole;if("cell"==o||"header_cell"==o)return e.doc.resolve(n)}for(var r=e.nodeBefore,i=e.pos;r;r=r.lastChild,i--){var s=r.type.spec.tableRole;if("cell"==s||"header_cell"==s)return e.doc.resolve(i-r.nodeSize)}}function N(e){return"row"==e.parent.type.spec.tableRole&&e.nodeAfter}function T(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function _(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function I(e){return m.get(e.node(-1)).findCell(e.pos-e.start(-1))}function R(e){return m.get(e.node(-1)).colCount(e.pos-e.start(-1))}function P(e,t,n){var o=e.start(-1),r=m.get(e.node(-1)),i=r.nextCell(e.pos-o,t,n);return null==i?null:e.node(0).resolve(o+i)}function D(e,t,n){var o={};for(var r in e)o[r]=e[r];return o[t]=n,o}function j(e,t,n){void 0===n&&(n=1);var o=D(e,"colspan",e.colspan-n);return o.colwidth&&(o.colwidth=o.colwidth.slice(),o.colwidth.splice(t,n),o.colwidth.some((function(e){return e>0}))||(o.colwidth=null)),o}function z(e,t,n){void 0===n&&(n=1);var o=D(e,"colspan",e.colspan+n);if(o.colwidth){o.colwidth=o.colwidth.slice();for(var r=0;r0||g>0){var v=h.attrs;f>0&&(v=j(v,0,f)),g>0&&(v=j(v,v.colspan-g,g)),h=p.lefto.bottom){var b=D(h.attrs,"rowspan",Math.min(p.bottom,o.bottom)-Math.max(p.top,o.top));h=p.top0)return!1;var n=e+this.$anchorCell.nodeAfter.attrs.rowspan,o=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,o)==this.$headCell.node(-1).childCount},t.colSelection=function(e,n){void 0===n&&(n=e);var o=m.get(e.node(-1)),r=e.start(-1),i=o.findCell(e.pos-r),s=o.findCell(n.pos-r),a=e.node(0);return i.top<=s.top?(i.top>0&&(e=a.resolve(r+o.map[i.left])),s.bottom0&&(n=a.resolve(r+o.map[s.left])),i.bottom0)return!1;var r=n+this.$anchorCell.nodeAfter.attrs.colspan,i=o+this.$headCell.nodeAfter.attrs.colspan;return Math.max(r,i)==e.width},t.prototype.eq=function(e){return e instanceof t&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos},t.rowSelection=function(e,n){void 0===n&&(n=e);var o=m.get(e.node(-1)),r=e.start(-1),i=o.findCell(e.pos-r),s=o.findCell(n.pos-r),a=e.node(0);return i.left<=s.left?(i.left>0&&(e=a.resolve(r+o.map[i.top*o.width])),s.right0&&(n=a.resolve(r+o.map[s.top*o.width])),i.right=0;i--,o++)if(t.after(i+1)=0;s--,r--)if(n.before(s+1)>n.start(s))break;return o==r&&/row|table/.test(t.node(i).type.spec.tableRole)}function U(e){for(var t,n,o=e.$from,r=e.$to,i=o.depth;i>0;i--){var s=o.node(i);if("cell"===s.type.spec.tableRole||"header_cell"===s.type.spec.tableRole){t=s;break}}for(var a=r.depth;a>0;a--){var c=r.node(a);if("cell"===c.type.spec.tableRole||"header_cell"===c.type.spec.tableRole){n=c;break}}return t!==n&&0===r.parentOffset}function W(e,t,n){var o,r,s=(t||e).selection,a=(t||e).doc;if(s instanceof i["NodeSelection"]&&(r=s.node.type.spec.tableRole)){if("cell"==r||"header_cell"==r)o=$.create(a,s.from);else if("row"==r){var c=a.resolve(s.from+1);o=$.rowSelection(c,c)}else if(!n){var l=m.get(s.node),u=s.from+1,d=u+l.map[l.width*l.height-1];o=$.create(a,u+1,d)}}else s instanceof i["TextSelection"]&&H(s)?o=i["TextSelection"].create(a,s.from):s instanceof i["TextSelection"]&&U(s)&&(o=i["TextSelection"].create(a,s.$from.start(),s.$from.end()));return o&&(t||(t=e.tr)).setSelection(o),t}function q(e){if(!e.size)return null;var t=e.content,n=e.openStart,o=e.openEnd;while(1==t.childCount&&(n>0&&o>0||"table"==t.firstChild.type.spec.tableRole))n--,o--,t=t.firstChild.content;var r=t.firstChild,i=r.type.spec.tableRole,a=r.type.schema,c=[];if("row"==i)for(var l=0;l=0;i--)for(var a=r.child(i).attrs,c=a.rowspan,l=a.colspan,u=o;u=t.length&&t.push(s["Fragment"].empty),n[h]t&&(f=f.type.create(j(f.attrs,f.attrs.colspan,p+f.attrs.colspan-t),f.content)),d.push(f),p+=f.attrs.colspan;for(var m=1;mn&&(k=k.type.create(D(k.attrs,"rowspan",Math.max(1,n-k.attrs.rowspan)),k.content)),y.push(k)}g.push(s["Fragment"].from(y))}i=g,r=n}return{width:o,height:r,rows:i}}function Y(e,t,n,o,r,i,a){var c,l,u=e.doc.type.schema,d=S(u);if(r>t.width)for(var p=0,h=0;pt.height){for(var b=[],y=0,w=(t.height-1)*t.width;y=t.width)&&n.nodeAt(t.map[w+y]).type==d.header_cell;b.push(A?l||(l=d.header_cell.createAndFill()):c||(c=d.cell.createAndFill()))}for(var k=d.row.create(null,s["Fragment"].from(b)),C=[],x=t.height;x=0;s--){var a=r.node(s),c=n<0?r.index(s):r.indexAfter(s);if(c!=(n<0?0:a.childCount))return null;if("cell"==a.type.spec.tableRole||"header_cell"==a.type.spec.tableRole){var l=r.before(s),u="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(u)?l:null}}return null}function le(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t}function ue(e,t){var n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?x(e.state.doc.resolve(n.pos)):null}var de=new i["PluginKey"]("fix-tables");function pe(e,t,n,o){var r=e.childCount,i=t.childCount;e:for(var s=0,a=0;s0){var k="cell";y.firstChild&&(k=y.firstChild.type.spec.tableRole);for(var C=[],x=0;x0?-1:0;L(o,i,n+s)&&(s=0==n||n==o.width?null:0);for(var a=0;a0&&n0&&o.map[c-1]==l||n0?-1:0;Ae(o,i,n+l)&&(l=0==n||n==o.height?null:0);for(var u=0,d=o.width*n;u0&&n0&&p==o.map[d-o.width]){var h=r.nodeAt(p).attrs;e.setNodeMarkup(e.mapping.slice(l).map(p+i),null,D(h,"rowspan",h.rowspan-1)),u+=h.colspan-1}else if(n0&&r[s]==r[s-1]||t.right0&&r[i]==r[i-n]||t.bottom1&&(s=D(s,"rowspan",1)),s.colspan>1&&(s=D(s,"colspan",1));for(var l,u=me(t),d=t.tr,p=0;p=0;o--){var i=e.node(-1).child(o);if(i.childCount)return r-1-i.lastChild.nodeSize;r-=i.nodeSize}}else{if(e.index()0;o--){var r=n.node(o);if("table"==r.type.spec.tableRole)return t&&t(e.tr.delete(n.before(o),n.after(o)).scrollIntoView()),!0}return!1}var Ve=function(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),He(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))};function He(e,t,n,o,r,i){for(var s=0,a=!0,c=t.firstChild,l=e.firstChild,u=0,d=0;u-1?{class:"resize-cursor"}:null},handleDOMEvents:{mousemove:function(e,o){Je(e,o,t,n,r)},mouseleave:function(e){Ke(e)},mousedown:function(e,t){Ge(e,t,n)}},decorations:function(e){var t=Ue.getState(e);if(t.activeHandle>-1)return rt(e,t.activeHandle)},nodeViews:{}}});return s}var qe=function(e,t){this.activeHandle=e,this.dragging=t};function Je(e,t,n,o,r){var i=Ue.getState(e.state);if(!i.dragging){var s=Ze(t.target),a=-1;if(s){var c=s.getBoundingClientRect(),l=c.left,u=c.right;t.clientX-l<=n?a=Qe(e,t,"left"):u-t.clientX<=n&&(a=Qe(e,t,"right"))}if(a!=i.activeHandle){if(!r&&-1!==a){var d=e.state.doc.resolve(a),p=d.node(-1),h=m.get(p),f=d.start(-1),g=h.colCount(d.pos-f)+d.nodeAfter.attrs.colspan-1;if(g==h.width-1)return}et(e,a)}}}function Ke(e){var t=Ue.getState(e.state);t.activeHandle>-1&&!t.dragging&&et(e,-1)}function Ge(e,t,n){var o=Ue.getState(e.state);if(-1==o.activeHandle||o.dragging)return!1;var r=e.state.doc.nodeAt(o.activeHandle),i=Ye(e,o.activeHandle,r.attrs);function s(t){window.removeEventListener("mouseup",s),window.removeEventListener("mousemove",a);var o=Ue.getState(e.state);o.dragging&&(tt(e,o.activeHandle,Xe(o.dragging,t,n)),e.dispatch(e.state.tr.setMeta(Ue,{setDragging:null})))}function a(t){if(!t.which)return s(t);var o=Ue.getState(e.state),r=Xe(o.dragging,t,n);nt(e,o.activeHandle,r,n)}return e.dispatch(e.state.tr.setMeta(Ue,{setDragging:{startX:t.clientX,startWidth:i}})),window.addEventListener("mouseup",s),window.addEventListener("mousemove",a),t.preventDefault(),!0}function Ye(e,t,n){var o=n.colspan,r=n.colwidth,i=r&&r[r.length-1];if(i)return i;var s=e.domAtPos(t),a=s.node.childNodes[s.offset],c=a.offsetWidth,l=o;if(r)for(var u=0;u-1&&e.docChanged){var o=e.mapping.map(t.activeHandle,-1);N(e.doc.resolve(o))||(o=null),t=new qe(o,t.dragging)}return t}},"567a":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAcCAYAAAATFf3WAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAALXSURBVHgB7ZbLTxNRFMa/gZlp6UugrQUUEBESiA+ISLQsjCujiQuNj4T4CGsT/wC3xoWJ0cS4kUQ0rIwx8YExGJNqJL4IQkRJaZs+aC1QOi3Y6cBAlTq9kzYgstFMOwt+yeTczMy9OXO++e65lMvlSkPFFK33IL28DDVAZweNjY0kchPfYKndiRnvCMw1zYgHx2DZ3gKKKkI+cbvdqxMU+TiYEj38Hx+C1bDwvuuFhj0Lz8A9WOtvIxkLw2Deklug+7EPV+6MQilSQnh1glpjOYYfXIK5dj8G7x6BmCrDh/Ao6nc3YKz/FjRGG3Z0nMktkEgu4XtkHoqxKJJAdBMTHITYBGy7TsLvuAyB8yEx+RnCpAOjjj4IoX7pLQojT24i31AZF/NcGMkv9xH1DkiljaGlNQFrJZDkgYhUaY+LRtOhTrSc7kYxoyETQ1L1gtPKVTAU9JJIJBb5GEyWzWBSJggzflgrMvWSLmkDyphZozcgPh3HuKMHde0noCuzodqmI5dSuEviJBKJM66tbu8CbWzCTARgWSAWBUyl0s+aAn6Jc6jbdxT1djm5fEIkFvlZpEMvpa1lEMzSJwTGOdgPAlEp2QVB+oDmU0hTRsynKtBx/iqZ2Pc2jN7nfigFHw+SSCQupmlsPXAO5koLnO91KLc+g8+zhIVFA5jSvfgx6UZb1wvozVW5BVwTPB69CkIxFqdIIBIzJUZo9aVY+FkO+4VroDe1ompPJ5qP3ZD0nYP94mtMeQZRCKhsL851ksBXTDkHQLPF2NZ2HFzQCVarh62hbdXEIecs3gxFoBTcdODvCabTy6StZfZGrcmCQpFtdWsabLbnFjK5ldA9T31kYKlQx+klS05iNF2Xz4OaSqiKlS5WM/Rhu1w5Q1kN1ERyVo5rXKwW1nWx2qCHx+VaRsUY1EQoIOe14eL/hbaZtWTA6JQ7fP4LqXk5L9W7mP7zhtpQ/T/4G2T+GhmhRE7PAAAAAElFTkSuQmCC"},"56ea":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAOCAYAAADNGCeJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABHSURBVHgB7dNBDcAgEETRv80KqJBaqxU0YAUbKEAB18HEJHDgCZhkDj80EB71weiObR7L+AoWimNvivxnw0NE5z0zpwRb6FpKBA4L9+lZVQAAAABJRU5ErkJggg=="},"576a":function(e,t,n){"use strict";n.d(t,"a",(function(){return An})),n.d(t,"b",(function(){return xn})),n.d(t,"c",(function(){return zn}));var o=n("5313"),r=n("304a"),i=n("0ac0"),s={};if("undefined"!=typeof navigator&&"undefined"!=typeof document){var a=/Edge\/(\d+)/.exec(navigator.userAgent),c=/MSIE \d/.test(navigator.userAgent),l=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);s.mac=/Mac/.test(navigator.platform);var u=s.ie=!!(c||l||a);s.ie_version=c?document.documentMode||6:l?+l[1]:a?+a[1]:null,s.gecko=!u&&/gecko\/(\d+)/i.test(navigator.userAgent),s.gecko_version=s.gecko&&+(/Firefox\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];var d=!u&&/Chrome\/(\d+)/.exec(navigator.userAgent);s.chrome=!!d,s.chrome_version=d&&+d[1],s.ios=!u&&/AppleWebKit/.test(navigator.userAgent)&&(/Mobile\/\w+/.test(navigator.userAgent)||!!(navigator.maxTouchPoints&&navigator.maxTouchPoints>2)),s.android=/Android \d/.test(navigator.userAgent),s.webkit="webkitFontSmoothing"in document.documentElement.style,s.safari=/Apple Computer/.test(navigator.vendor),s.webkit_version=s.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var p=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},h=function(e){var t=e.parentNode;return t&&11==t.nodeType?t.host:t},f=null,m=function(e,t,n){var o=f||(f=document.createRange());return o.setEnd(e,null==n?e.nodeValue.length:n),o.setStart(e,t||0),o},g=function(e,t,n,o){return n&&(b(e,t,n,o,-1)||b(e,t,n,o,1))},v=/^(img|br|input|textarea|hr)$/i;function b(e,t,n,o,r){for(;;){if(e==n&&t==o)return!0;if(t==(r<0?0:y(e))){var i=e.parentNode;if(1!=i.nodeType||A(e)||v.test(e.nodeName)||"false"==e.contentEditable)return!1;t=p(e)+(r<0?0:1),e=i}else{if(1!=e.nodeType)return!1;if(e=e.childNodes[t+(r<0?-1:0)],"false"==e.contentEditable)return!1;t=r<0?y(e):0}}}function y(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function w(e,t,n){for(var o=0==t,r=t==y(e);o||r;){if(e==n)return!0;var i=p(e);if(e=e.parentNode,!e)return!1;o=o&&0==i,r=r&&i==y(e)}}function A(e){for(var t,n=e;n;n=n.parentNode)if(t=n.pmViewDesc)break;return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var k=function(e){var t=e.isCollapsed;return t&&s.chrome&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function S(e,t){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function C(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function x(e,t){return"number"==typeof e?e:e[t]}function O(e){var t=e.getBoundingClientRect();return{left:t.left,right:t.left+e.clientWidth,top:t.top,bottom:t.top+e.clientHeight}}function E(e,t,n){for(var o=e.someProp("scrollThreshold")||0,r=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument,s=n||e.dom;;s=h(s)){if(!s)break;if(1==s.nodeType){var a=s==i.body||1!=s.nodeType,c=a?C(i):O(s),l=0,u=0;if(t.topc.bottom-x(o,"bottom")&&(u=t.bottom-c.bottom+x(r,"bottom")),t.leftc.right-x(o,"right")&&(l=t.right-c.right+x(r,"right")),l||u)if(a)i.defaultView.scrollBy(l,u);else{var d=s.scrollLeft,p=s.scrollTop;u&&(s.scrollTop+=u),l&&(s.scrollLeft+=l);var f=s.scrollLeft-d,m=s.scrollTop-p;t={left:t.left-f,top:t.top-m,right:t.right-f,bottom:t.bottom-m}}if(a)break}}}function M(e){for(var t,n,o=e.dom.getBoundingClientRect(),r=Math.max(0,o.top),i=(o.left+o.right)/2,s=r+1;s=r-20){t=a,n=c.top;break}}}return{refDOM:t,refTop:n,stack:B(e.dom)}}function B(e){for(var t=[],n=e.ownerDocument;e;e=h(e))if(t.push({dom:e,top:e.scrollTop,left:e.scrollLeft}),e==n)break;return t}function N(e){var t=e.refDOM,n=e.refTop,o=e.stack,r=t?t.getBoundingClientRect().top:0;T(o,0==r?0:r-n)}function T(e,t){for(var n=0;n=a){s=Math.max(p.bottom,s),a=Math.min(p.top,a);var h=p.left>t.left?p.left-t.left:p.right=(p.left+p.right)/2?1:0));continue}}!n&&(t.left>=p.right&&t.top>=p.top||t.left>=p.left&&t.top>=p.bottom)&&(i=l+1)}}return n&&3==n.nodeType?P(n,o):!n||r&&1==n.nodeType?{node:e,offset:i}:R(n,o)}function P(e,t){for(var n=e.nodeValue.length,o=document.createRange(),r=0;r=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}function D(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function j(e,t){var n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left(a.left+a.right)/2?1:-1}return e.docView.posFromDOM(r,i,s)}function L(e,t,n,o){for(var r=-1,i=t;;){if(i==e.dom)break;var s=e.docView.nearestDesc(i,!0);if(!s)return null;if(s.node.isBlock&&s.parent){var a=s.dom.getBoundingClientRect();if(a.left>o.left||a.top>o.top)r=s.posBefore;else{if(!(a.right-1?r:e.docView.posFromDOM(t,n)}function $(e,t,n){var o=e.childNodes.length;if(o&&n.topt.top&&i++}r==e.dom&&i==r.childNodes.length-1&&1==r.lastChild.nodeType&&t.top>r.lastChild.getBoundingClientRect().bottom?u=e.state.doc.content.size:0!=i&&1==r.nodeType&&"BR"==r.childNodes[i-1].nodeName||(u=L(e,r,i,t))}null==u&&(u=z(e,d,t));var m=e.docView.nearestDesc(d,!0);return{pos:u,inside:m?m.posAtStart-m.border:-1}}function V(e,t){var n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}var H=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function U(e,t,n){var o=e.docView.domFromPos(t),r=o.node,i=o.offset,a=e.state.doc.resolve(t),c=a.parent.inlineContent,l=s.webkit||s.gecko;if(3==r.nodeType&&l&&H.test(r.nodeValue)){var u=V(m(r,i,i),n);if(s.gecko&&i&&/\s/.test(r.nodeValue[i-1])&&i=0&&i==y(r)&&r!=f)i=p(r)+1,r=r.parentNode}if(3==r.nodeType)return n<0?W(V(m(r,i-1,i),1),!1):W(V(m(r,i,i+1),-1),!0);if(!c){if(i&&(n<0||i==y(r))){var g=r.childNodes[i-1];if(1==g.nodeType)return q(g.getBoundingClientRect(),!1)}if(i=0)}if(i&&(n<0||i==y(r))){var b=r.childNodes[i-1],w=3==b.nodeType?m(b,y(b)-(l?0:1)):1==b.nodeType&&"BR"!=b.nodeName?b:null;if(w)return W(V(w,1),!1)}if(i=0)}function W(e,t){if(0==e.width)return e;var n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function q(e,t){if(0==e.height)return e;var n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function J(e,t,n){var o=e.state,r=e.root.activeElement;o!=t&&e.updateState(t),r!=e.dom&&e.focus();try{return n()}finally{o!=t&&e.updateState(o),r!=e.dom&&r&&r.focus()}}function K(e,t,n){var o=t.selection,r="up"==n?o.$anchor.min(o.$head):o.$anchor.max(o.$head);return J(e,t,(function(){for(var t=e.docView.domFromPos(r.pos),o=t.node;;){var i=e.docView.nearestDesc(o,!0);if(!i)break;if(i.node.isBlock){o=i.dom;break}o=i.dom.parentNode}for(var s=U(e,r.pos,1),a=o.firstChild;a;a=a.nextSibling){var c=void 0;if(1==a.nodeType)c=a.getClientRects();else{if(3!=a.nodeType)continue;c=m(a,0,a.nodeValue.length).getClientRects()}for(var l=0;lu.top&&("up"==n?u.bottoms.bottom-1))return!1}}return!0}))}var G=/[\u0590-\u08ac]/;function Y(e,t,n){var o=t.selection,r=o.$head;if(!r.parent.isTextblock)return!1;var i=r.parentOffset,s=!i,a=i==r.parent.content.size,c=getSelection();return G.test(r.parent.textContent)&&c.modify?J(e,t,(function(){var t=c.getRangeAt(0),o=c.focusNode,i=c.focusOffset,s=c.caretBidiLevel;c.modify("move",n,"character");var a=r.depth?e.docView.domAfterPos(r.before()):e.dom,l=!a.contains(1==c.focusNode.nodeType?c.focusNode:c.focusNode.parentNode)||o==c.focusNode&&i==c.focusOffset;return c.removeAllRanges(),c.addRange(t),null!=s&&(c.caretBidiLevel=s),l})):"left"==n||"backward"==n?s:a}var Z=null,Q=null,X=!1;function ee(e,t,n){return Z==t&&Q==n?X:(Z=t,Q=n,X="up"==n||"down"==n?K(e,t,n):Y(e,t,n))}var te=0,ne=1,oe=2,re=3,ie=function(e,t,n,o){this.parent=e,this.children=t,this.dom=n,n.pmViewDesc=this,this.contentDOM=o,this.dirty=te},se={beforePosition:{configurable:!0},size:{configurable:!0},border:{configurable:!0},posBefore:{configurable:!0},posAtStart:{configurable:!0},posAfter:{configurable:!0},posAtEnd:{configurable:!0},contentLost:{configurable:!0}};ie.prototype.matchesWidget=function(){return!1},ie.prototype.matchesMark=function(){return!1},ie.prototype.matchesNode=function(){return!1},ie.prototype.matchesHack=function(){return!1},se.beforePosition.get=function(){return!1},ie.prototype.parseRule=function(){return null},ie.prototype.stopEvent=function(){return!1},se.size.get=function(){for(var e=0,t=0;t0:a)?this.posAtEnd:this.posAtStart},ie.prototype.nearestDesc=function(e,t){for(var n=!0,o=e;o;o=o.parentNode){var r=this.getDesc(o);if(r&&(!t||r.node)){if(!n||!r.nodeDOM||(1==r.nodeDOM.nodeType?r.nodeDOM.contains(1==e.nodeType?e:e.parentNode):r.nodeDOM==e))return r;n=!1}}},ie.prototype.getDesc=function(e){for(var t=e.pmViewDesc,n=t;n;n=n.parent)if(n==this)return t},ie.prototype.posFromDOM=function(e,t,n){for(var o=e;o;o=o.parentNode){var r=this.getDesc(o);if(r)return r.localPosFromDOM(e,t,n)}return-1},ie.prototype.descAt=function(e){for(var t=0,n=0;t=l&&t<=c-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(e,t,l);e=i;for(var u=s;u>0;u--){var d=this.children[u-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){o=p(d.dom)+1;break}e-=d.size}-1==o&&(o=0)}if(o>-1&&(c>t||s==this.children.length-1)){t=c;for(var h=s+1;hc&&it){var b=d;d=p,p=b}var y=document.createRange();y.setEnd(p.node,p.offset),y.setStart(d.node,d.offset),h.removeAllRanges(),h.addRange(y)}}},ie.prototype.ignoreMutation=function(e){return!this.contentDOM&&"selection"!=e.type},se.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},ie.prototype.markDirty=function(e,t){for(var n=0,o=0;o=n:en){var s=n+r.border,a=i-r.border;if(e>=s&&t<=a)return this.dirty=e==n||t==i?oe:ne,void(e!=s||t!=a||!r.contentLost&&r.dom.parentNode==this.contentDOM?r.markDirty(e-s,t-s):r.dirty=re);r.dirty=re}n=i}this.dirty=oe},ie.prototype.markParentsDirty=function(){for(var e=1,t=this.parent;t;t=t.parent,e++){var n=1==e?oe:ne;t.dirty0&&(i=_e(i,0,e,o));for(var a=0;a=0&&!a&&c.syncToMarks(s==n.node.childCount?r["Mark"].none:n.node.child(s).marks,o,e),c.placeWidget(t,e,i)}),(function(t,n,r,s){c.syncToMarks(t.marks,o,e),c.findNodeMatch(t,n,r,s)||c.updateNextNode(t,n,r,e,s)||c.addNode(t,n,r,e,i),i+=t.nodeSize})),c.syncToMarks(ae,o,e),this.node.isTextblock&&c.addTextblockHacks(),c.destroyRest(),(c.changed||this.dirty==oe)&&(a&&this.protectLocalComposition(e,a),ge(this.contentDOM,this.children,e),s.ios&&Be(this.dom))},t.prototype.localCompositionNode=function(e,t){var n=e.state.selection,r=n.from,i=n.to;if(!(!(e.state.selection instanceof o["TextSelection"])||rt+this.node.content.size)){var s=e.root.getSelection(),a=Ne(s.focusNode,s.focusOffset);if(a&&this.dom.contains(a.parentNode)){var c=a.nodeValue,l=Te(this.node.content,c,r-t,i-t);return l<0?null:{node:a,pos:l,text:c}}}},t.prototype.protectLocalComposition=function(e,t){var n=t.node,o=t.pos,r=t.text;if(!this.getDesc(n)){for(var i=n;;i=i.parentNode){if(i.parentNode==this.contentDOM)break;while(i.previousSibling)i.parentNode.removeChild(i.previousSibling);while(i.nextSibling)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=null)}var s=new le(this,i,n,r);e.compositionNodes.push(s),this.children=_e(this.children,o,o+r.length,e,s)}},t.prototype.update=function(e,t,n,o){return!(this.dirty==re||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,o),!0)},t.prototype.updateInner=function(e,t,n,o){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=te},t.prototype.updateOuterDeco=function(e){if(!Se(e,this.outerDeco)){var t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=we(this.dom,this.nodeDOM,ye(this.outerDeco,this.node,t),ye(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=null,this.dom.pmViewDesc=this),this.outerDeco=e}},t.prototype.selectNode=function(){this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)},t.prototype.deselectNode=function(){this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")},Object.defineProperties(t.prototype,n),t}(ie);function pe(e,t,n,o,r){return ke(o,t,e),new de(null,e,t,n,o,o,o,r,0)}var he=function(e){function t(t,n,o,r,i,s,a){e.call(this,t,n,o,r,i,null,s,a)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.parseRule=function(){var e=this.nodeDOM.parentNode;while(e&&e!=this.dom&&!e.pmIsDeco)e=e.parentNode;return{skip:e||!0}},t.prototype.update=function(e,t,n,o){return!(this.dirty==re||this.dirty!=te&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),this.dirty==te&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=e,this.dirty=te,!0)},t.prototype.inParent=function(){for(var e=this.parent.contentDOM,t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1},t.prototype.domFromPos=function(e){return{node:this.nodeDOM,offset:e}},t.prototype.localPosFromDOM=function(t,n,o){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):e.prototype.localPosFromDOM.call(this,t,n,o)},t.prototype.ignoreMutation=function(e){return"characterData"!=e.type&&"selection"!=e.type},t.prototype.slice=function(e,n,o){var r=this.node.cut(e,n),i=document.createTextNode(r.text);return new t(this.parent,r,this.outerDeco,this.innerDeco,i,i,o)},t}(de),fe=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.parseRule=function(){return{ignore:!0}},t.prototype.matchesHack=function(){return this.dirty==te},t}(ie),me=function(e){function t(t,n,o,r,i,s,a,c,l,u){e.call(this,t,n,o,r,i,s,a,l,u),this.spec=c}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.update=function(t,n,o,r){if(this.dirty==re)return!1;if(this.spec.update){var i=this.spec.update(t,n);return i&&this.updateInner(t,n,o,r),i}return!(!this.contentDOM&&!t.isLeaf)&&e.prototype.update.call(this,t,n,o,r)},t.prototype.selectNode=function(){this.spec.selectNode?this.spec.selectNode():e.prototype.selectNode.call(this)},t.prototype.deselectNode=function(){this.spec.deselectNode?this.spec.deselectNode():e.prototype.deselectNode.call(this)},t.prototype.setSelection=function(t,n,o,r){this.spec.setSelection?this.spec.setSelection(t,n,o):e.prototype.setSelection.call(this,t,n,o,r)},t.prototype.destroy=function(){this.spec.destroy&&this.spec.destroy(),e.prototype.destroy.call(this)},t.prototype.stopEvent=function(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)},t.prototype.ignoreMutation=function(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):e.prototype.ignoreMutation.call(this,t)},t}(de);function ge(e,t,n){for(var o=e.firstChild,r=!1,i=0;i0&&r>=0;r--){var i=t[r],s=i.node;if(s){if(s!=e.child(o-1))break;n.push(i),--o}}return{nodes:n.reverse(),offset:o}}function Ee(e,t){return e.type.side-t.type.side}function Me(e,t,n,o){var r=t.locals(e),i=0;if(0!=r.length)for(var s=0,a=[],c=null,l=0;;){if(si)a.push(r[s++]);var g=i+h.nodeSize;if(h.isText){var v=g;s0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];e=e.childNodes[t-1],t=y(e)}else{if(!(1==e.nodeType&&t=n){var u=c.lastIndexOf(t,o-a);if(u>=0&&u+t.length+a>=n)return a+u}}}return-1}function _e(e,t,n,o,r){for(var i=[],s=0,a=0;s=n||u<=t?i.push(c):(ln&&i.push(c.slice(n-l,c.size,o)))}return i}function Ie(e,t){var n=e.root.getSelection(),r=e.state.doc;if(!n.focusNode)return null;var i=e.docView.nearestDesc(n.focusNode),s=i&&0==i.size,a=e.docView.posFromDOM(n.focusNode,n.focusOffset);if(a<0)return null;var c,l,u=r.resolve(a);if(k(n)){c=u;while(i&&!i.node)i=i.parent;if(i&&i.node.isAtom&&o["NodeSelection"].isSelectable(i.node)&&i.parent&&(!i.node.isInline||!w(n.focusNode,n.focusOffset,i.dom))){var d=i.posBefore;l=new o["NodeSelection"](a==d?u:r.resolve(d))}}else{var p=e.docView.posFromDOM(n.anchorNode,n.anchorOffset);if(p<0)return null;c=r.resolve(p)}if(!l){var h="pointer"==t||e.state.selection.head=this.preMatchOffset?this.preMatched[e-this.preMatchOffset]:null},xe.prototype.destroyBetween=function(e,t){if(e!=t){for(var n=e;n>1,i=Math.min(r,e.length);while(o-1)s>this.index&&(this.changed=!0,this.destroyBetween(this.index,s)),this.top=this.top.children[this.index];else{var c=ue.create(this.top,e[r],t,n);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,r++}},xe.prototype.findNodeMatch=function(e,t,n,o){var r=-1,i=o<0?void 0:this.getPreMatch(o),s=this.top.children;if(i&&i.matchesNode(e,t,n))r=s.indexOf(i);else for(var a=this.index,c=Math.min(s.length,a+5);a-1&&a+this.preMatchOffset!=r)return!1;var c=s.dom,l=this.lock&&(c==this.lock||1==c.nodeType&&c.contains(this.lock.parentNode))&&!(e.isText&&s.node&&s.node.isText&&s.nodeDOM.nodeValue==e.text&&s.dirty!=re&&Se(t,s.outerDeco));if(!l&&s.update(e,t,n,o))return this.destroyBetween(this.index,i),s.dom!=c&&(this.changed=!0),this.index++,!0;break}}return!1},xe.prototype.addNode=function(e,t,n,o,r){this.top.children.splice(this.index++,0,de.create(this.top,e,t,n,o,r)),this.changed=!0},xe.prototype.placeWidget=function(e,t,n){var o=this.index0?r.max(i):r.min(i),a=s.parent.inlineContent?s.depth?e.doc.resolve(t>0?s.after():s.before()):null:s;return a&&o["Selection"].findFrom(a,t)}function Ke(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Ge(e,t,n){var r=e.state.selection;if(!(r instanceof o["TextSelection"])){if(r instanceof o["NodeSelection"]&&r.node.isInline)return Ke(e,new o["TextSelection"](t>0?r.$to:r.$from));var i=Je(e.state,t);return!!i&&Ke(e,i)}if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){var a=Je(e.state,t);return!!(a&&a instanceof o["NodeSelection"])&&Ke(e,a)}if(!(s.mac&&n.indexOf("m")>-1)){var c,l=r.$head,u=l.textOffset?null:t<0?l.nodeBefore:l.nodeAfter;if(!u||u.isText)return!1;var d=t<0?l.pos-u.nodeSize:l.pos;return!!(u.isAtom||(c=e.docView.descAt(d))&&!c.contentDOM)&&(o["NodeSelection"].isSelectable(u)?Ke(e,new o["NodeSelection"](t<0?e.state.doc.resolve(l.pos-u.nodeSize):l)):!!s.webkit&&Ke(e,new o["TextSelection"](e.state.doc.resolve(t<0?d:d+u.nodeSize))))}}function Ye(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Ze(e){var t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function Qe(e){var t=e.root.getSelection(),n=t.focusNode,o=t.focusOffset;if(n){var r,i,a=!1;for(s.gecko&&1==n.nodeType&&o0){if(1!=n.nodeType)break;var c=n.childNodes[o-1];if(Ze(c))r=n,i=--o;else{if(3!=c.nodeType)break;n=c,o=n.nodeValue.length}}else{if(et(n))break;var l=n.previousSibling;while(l&&Ze(l))r=n.parentNode,i=p(l),l=l.previousSibling;if(l)n=l,o=Ye(n);else{if(n=n.parentNode,n==e.dom)break;o=0}}a?tt(e,t,n,o):r&&tt(e,t,r,i)}}function Xe(e){var t=e.root.getSelection(),n=t.focusNode,o=t.focusOffset;if(n){for(var r,i,s=Ye(n);;)if(o-1)return!1;if(s.mac&&n.indexOf("m")>-1)return!1;var i=r.$from,a=r.$to;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){var c=Je(e.state,t);if(c&&c instanceof o["NodeSelection"])return Ke(e,c)}if(!i.parent.inlineContent){var l=o["Selection"].findFrom(t<0?i:a,t);return!l||Ke(e,l)}return!1}function ot(e,t){if(!(e.state.selection instanceof o["TextSelection"]))return!0;var n=e.state.selection,r=n.$head,i=n.$anchor,s=n.empty;if(!r.sameParent(i))return!0;if(!s)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;var a=!r.textOffset&&(t<0?r.nodeBefore:r.nodeAfter);if(a&&!a.isText){var c=e.state.tr;return t<0?c.delete(r.pos-a.nodeSize,r.pos):c.delete(r.pos,r.pos+a.nodeSize),e.dispatch(c),!0}return!1}function rt(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function it(e){if(s.safari&&!(e.state.selection.$head.parentOffset>0)){var t=e.root.getSelection(),n=t.focusNode,o=t.focusOffset;if(n&&1==n.nodeType&&0==o&&n.firstChild&&"false"==n.firstChild.contentEditable){var r=n.firstChild;rt(e,r,!0),setTimeout((function(){return rt(e,r,!1)}),20)}}}function st(e){var t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function at(e,t){var n=t.keyCode,o=st(t);return 8==n||s.mac&&72==n&&"c"==o?ot(e,-1)||Qe(e):46==n||s.mac&&68==n&&"c"==o?ot(e,1)||Xe(e):13==n||27==n||(37==n?Ge(e,-1,o)||Qe(e):39==n?Ge(e,1,o)||Xe(e):38==n?nt(e,-1,o)||Qe(e):40==n?it(e)||nt(e,1,o)||Xe(e):o==(s.mac?"m":"c")&&(66==n||73==n||89==n||90==n))}function ct(e,t,n){var o=e.docView.parseRange(t,n),i=o.node,a=o.fromOffset,c=o.toOffset,l=o.from,u=o.to,d=e.root.getSelection(),p=null,h=d.anchorNode;if(h&&e.dom.contains(1==h.nodeType?h:h.parentNode)&&(p=[{node:h,offset:d.anchorOffset}],k(d)||p.push({node:d.focusNode,offset:d.focusOffset})),s.chrome&&8===e.lastKeyCode)for(var f=c;f>a;f--){var m=i.childNodes[f-1],g=m.pmViewDesc;if("BR"==m.nodeType&&!g){c=f;break}if(!g||g.size)break}var v=e.state.doc,b=e.someProp("domParser")||r["DOMParser"].fromSchema(e.state.schema),y=v.resolve(l),w=null,A=b.parse(i,{topNode:y.parent,topMatch:y.parent.contentMatchAt(y.index()),topOpen:!0,from:a,to:c,preserveWhitespace:!y.parent.type.spec.code||"full",editableContent:!0,findPositions:p,ruleFromNode:lt,context:y});if(p&&null!=p[0].pos){var S=p[0].pos,C=p[1]&&p[1].pos;null==C&&(C=S),w={anchor:S+l,head:C+l}}return{doc:A,sel:w,from:l,to:u}}function lt(e){var t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(s.safari&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){var n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(e.parentNode.lastChild==e||s.safari&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0}}function ut(e,t,n,r,i){if(t<0){var a=e.lastSelectionTime>Date.now()-50?e.lastSelectionOrigin:null,c=Ie(e,a);if(c&&!e.state.selection.eq(c)){var l=e.state.tr.setSelection(c);"pointer"==a?l.setMeta("pointer",!0):"key"==a&&l.scrollIntoView(),e.dispatch(l)}}else{var u=e.state.doc.resolve(t),d=u.sharedDepth(n);t=u.before(d+1),n=e.state.doc.resolve(n).after(d+1);var p,h,f=e.state.selection,m=ct(e,t,n),g=e.state.doc,v=g.slice(m.from,m.to);8===e.lastKeyCode&&Date.now()-100Date.now()-225&&i.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName}))&&e.someProp("handleKeyDown",(function(t){return t(e,S(13,"Enter"))})))return void(e.lastIOSEnter=0);if(m.sel){var y=dt(e,e.state.doc,m.sel);y&&!y.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(y))}return}b={start:f.from,endA:f.to,endB:f.to}}e.domChangeCount++,e.state.selection.frome.state.selection.from&&b.start<=e.state.selection.from+2?b.start=e.state.selection.from:b.endA=e.state.selection.to-2&&(b.endB+=e.state.selection.to-b.endA,b.endA=e.state.selection.to)),s.ie&&s.ie_version<=11&&b.endB==b.start+1&&b.endA==b.start&&b.start>m.from&&"  "==m.doc.textBetween(b.start-m.from-1,b.start-m.from+1)&&(b.start--,b.endA--,b.endB--);var w,A=m.doc.resolveNoCache(b.start-m.from),k=m.doc.resolveNoCache(b.endB-m.from),C=A.sameParent(k)&&A.parent.inlineContent;if((s.ios&&e.lastIOSEnter>Date.now()-225&&(!C||i.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName})))||!C&&A.posb.start&&ht(g,b.start,b.endA,A,k)&&e.someProp("handleKeyDown",(function(t){return t(e,S(8,"Backspace"))})))s.android&&s.chrome&&e.domObserver.suppressSelectionUpdates();else{s.android&&!C&&A.start()!=k.start()&&0==k.parentOffset&&A.depth==k.depth&&m.sel&&m.sel.anchor==m.sel.head&&m.sel.head==b.endA&&(b.endB-=2,k=m.doc.resolveNoCache(b.endB-m.from),setTimeout((function(){e.someProp("handleKeyDown",(function(t){return t(e,S(13,"Enter"))}))}),20));var x,O,E,M,B=b.start,N=b.endA;if(C)if(A.pos==k.pos)s.ie&&s.ie_version<=11&&0==A.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((function(){return Re(e)}),20)),x=e.state.tr.delete(B,N),O=g.resolve(b.start).marksAcross(g.resolve(b.endA));else if(b.endA==b.endB&&(M=g.resolve(b.start))&&(E=pt(A.parent.content.cut(A.parentOffset,k.parentOffset),M.parent.content.cut(M.parentOffset,b.endA-M.start()))))x=e.state.tr,"add"==E.type?x.addMark(B,N,E.mark):x.removeMark(B,N,E.mark);else if(A.parent.child(A.index()).isText&&A.index()==k.index()-(k.textOffset?0:1)){var T=A.parent.textBetween(A.parentOffset,k.parentOffset);if(e.someProp("handleTextInput",(function(t){return t(e,B,N,T)})))return;x=e.state.tr.insertText(T,B,N)}if(x||(x=e.state.tr.replace(B,N,m.doc.slice(b.start-m.from,b.endB-m.from))),m.sel){var _=dt(e,x.doc,m.sel);_&&!(s.chrome&&s.android&&e.composing&&_.empty&&(_.head==B||_.head==x.mapping.map(N)-1)||s.ie&&_.empty&&_.head==B)&&x.setSelection(_)}O&&x.ensureMarks(O),e.dispatch(x.scrollIntoView())}}}function dt(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:He(e,t.resolve(n.anchor),t.resolve(n.head))}function pt(e,t){for(var n,o,i,s=e.firstChild.marks,a=t.firstChild.marks,c=s,l=a,u=0;un||ft(s,!0,!1)0&&(t||e.indexAfter(o)==e.node(o).childCount))o--,r++,t=!1;if(n){var i=e.node(o).maybeChild(e.indexAfter(o));while(i&&!i.isLeaf)i=i.firstChild,r++}return r}function mt(e,t,n,o,r){var i=e.findDiffStart(t,n);if(null==i)return null;var s=e.findDiffEnd(t,n+e.size,n+t.size),a=s.a,c=s.b;if("end"==r){var l=Math.max(0,i-Math.min(a,c));o-=a+l-i}if(a=a?i-o:0;i-=u,c=i+(c-a),a=i}else if(c=c?i-o:0;i-=d,a=i+(a-c),c=i}return{start:i,endA:a,endB:c}}function gt(e,t){var n=[],o=t.content,i=t.openStart,s=t.openEnd;while(i>1&&s>1&&1==o.childCount&&1==o.firstChild.childCount){i--,s--;var a=o.firstChild;n.push(a.type.name,a.attrs!=a.type.defaultAttrs?a.attrs:null),o=a.content}var c=e.someProp("clipboardSerializer")||r["DOMSerializer"].fromSchema(e.state.schema),l=Ot(),u=l.createElement("div");u.appendChild(c.serializeFragment(o,{document:l}));var d,p=u.firstChild;while(p&&1==p.nodeType&&(d=Ct[p.nodeName.toLowerCase()])){for(var h=d.length-1;h>=0;h--){var f=l.createElement(d[h]);while(u.firstChild)f.appendChild(u.firstChild);u.appendChild(f)}p=u.firstChild}p&&1==p.nodeType&&p.setAttribute("data-pm-slice",i+" "+s+" "+JSON.stringify(n));var m=e.someProp("clipboardTextSerializer",(function(e){return e(t)}))||t.content.textBetween(0,t.content.size,"\n\n");return{dom:u,text:m}}function vt(e,t,n,o,i){var s,a,c=i.parent.type.spec.code;if(!n&&!t)return null;var l=t&&(o||c||!n);if(l){if(e.someProp("transformPastedText",(function(e){t=e(t,c||o)})),c)return new r["Slice"](r["Fragment"].from(e.state.schema.text(t)),0,0);var u=e.someProp("clipboardTextParser",(function(e){return e(t,i,o)}));u?a=u:(s=document.createElement("div"),t.trim().split(/(?:\r\n?|\n)+/).forEach((function(e){s.appendChild(document.createElement("p")).textContent=e})))}else e.someProp("transformPastedHTML",(function(e){n=e(n)})),s=Et(n);var d=s&&s.querySelector("[data-pm-slice]"),p=d&&/^(\d+) (\d+) (.*)/.exec(d.getAttribute("data-pm-slice"));if(!a){var h=e.someProp("clipboardParser")||e.someProp("domParser")||r["DOMParser"].fromSchema(e.state.schema);a=h.parseSlice(s,{preserveWhitespace:!(!l&&!p),context:i})}return a=p?Mt(St(a,+p[1],+p[2]),p[3]):r["Slice"].maxOpen(bt(a.content,i),!1),e.someProp("transformPasted",(function(e){a=e(a)})),a}function bt(e,t){if(e.childCount<2)return e;for(var n=function(n){var o=t.node(n),i=o.contentMatchAt(t.index(n)),s=void 0,a=[];if(e.forEach((function(e){if(a){var t,n=i.findWrapping(e.type);if(!n)return a=null;if(t=a.length&&s.length&&wt(n,s,e,a[a.length-1],0))a[a.length-1]=t;else{a.length&&(a[a.length-1]=At(a[a.length-1],s.length));var o=yt(e,n);a.push(o),i=i.matchType(o.type,o.attrs),s=n}}})),a)return{v:r["Fragment"].from(a)}},o=t.depth;o>=0;o--){var i=n(o);if(i)return i.v}return e}function yt(e,t,n){void 0===n&&(n=0);for(var o=t.length-1;o>=n;o--)e=t[o].create(null,r["Fragment"].from(e));return e}function wt(e,t,n,o,i){if(i=n&&(c=t<0?a.contentMatchAt(0).fillBefore(c,e.childCount>1||s<=i).append(c):c.append(a.contentMatchAt(a.childCount).fillBefore(r["Fragment"].empty,!0))),e.replaceChild(t<0?0:e.childCount-1,a.copy(c))}function St(e,t,n){return t]*>)*/.exec(e);t&&(e=e.slice(t[0].length));var n,o=Ot().createElement("div"),r=/(?:]*>)*<([a-z][^>\s]+)/i.exec(e),i=0;(n=r&&Ct[r[1].toLowerCase()])&&(e=n.map((function(e){return"<"+e+">"})).join("")+e+n.map((function(e){return""})).reverse().join(""),i=n.length),o.innerHTML=e;for(var s=0;s=0;c-=2){var l=o.nodes[n[c]];if(!l||l.hasRequiredAttrs())break;i=r["Fragment"].from(l.create(n[c+1],i)),s++,a++}return new r["Slice"](i,s,a)}var Bt={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Nt=s.ie&&s.ie_version<=11,Tt=function(){this.anchorNode=this.anchorOffset=this.focusNode=this.focusOffset=null};Tt.prototype.set=function(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset},Tt.prototype.eq=function(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset};var _t=function(e,t){var n=this;this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=window.MutationObserver&&new window.MutationObserver((function(e){for(var t=0;te.target.nodeValue.length}))?n.flushSoon():n.flush()})),this.currentSelection=new Tt,Nt&&(this.onCharData=function(e){n.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),n.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.suppressingSelectionUpdates=!1};_t.prototype.flushSoon=function(){var e=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){e.flushingSoon=-1,e.flush()}),20))},_t.prototype.forceFlush=function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())},_t.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,Bt),Nt&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},_t.prototype.stop=function(){var e=this;if(this.observer){var t=this.observer.takeRecords();if(t.length){for(var n=0;n-1)){var e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);var t=this.view.root.getSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&We(this.view)&&!this.ignoreSelectionChange(t),o=-1,r=-1,i=!1,a=[];if(this.view.editable)for(var c=0;c1){var u=a.filter((function(e){return"BR"==e.nodeName}));if(2==u.length){var d=u[0],p=u[1];d.parentNode&&d.parentNode.parentNode==p.parentNode?p.remove():d.remove()}}(o>-1||n)&&(o>-1&&(this.view.docView.markDirty(o,r),Rt(this.view)),this.handleDOMChange(o,r,i,a),this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||Re(this.view))}},_t.prototype.registerMutation=function(e,t){if(t.indexOf(e.target)>-1)return null;var n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){var o=e.previousSibling,r=e.nextSibling;if(s.ie&&s.ie_version<=11&&e.addedNodes.length)for(var i=0;ii.depth?t(e,n,i.nodeAfter,i.before(o),r,!0):t(e,n,i.node(o),i.before(o),r,!1)})))return{v:!0}},a=i.depth+1;a>0;a--){var c=s(a);if(c)return c.v}return!1}function Jt(e,t,n){e.focused||e.focus();var o=e.state.tr.setSelection(t);"pointer"==n&&o.setMeta("pointer",!0),e.dispatch(o)}function Kt(e,t){if(-1==t)return!1;var n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&o["NodeSelection"].isSelectable(r))&&(Jt(e,new o["NodeSelection"](n),"pointer"),!0)}function Gt(e,t){if(-1==t)return!1;var n,r,i=e.state.selection;i instanceof o["NodeSelection"]&&(n=i.node);for(var s=e.state.doc.resolve(t),a=s.depth+1;a>0;a--){var c=a>s.depth?s.nodeAfter:s.node(a);if(o["NodeSelection"].isSelectable(c)){r=n&&i.$from.depth>0&&a>=i.$from.depth&&s.before(i.$from.depth+1)==i.$from.pos?s.before(i.$from.depth):s.before(a);break}}return null!=r&&(Jt(e,o["NodeSelection"].create(e.state.doc,r),"pointer"),!0)}function Yt(e,t,n,o,r){return qt(e,"handleClickOn",t,n,o)||e.someProp("handleClick",(function(n){return n(e,t,o)}))||(r?Gt(e,n):Kt(e,n))}function Zt(e,t,n,o){return qt(e,"handleDoubleClickOn",t,n,o)||e.someProp("handleDoubleClick",(function(n){return n(e,t,o)}))}function Qt(e,t,n,o){return qt(e,"handleTripleClickOn",t,n,o)||e.someProp("handleTripleClick",(function(n){return n(e,t,o)}))||Xt(e,n)}function Xt(e,t){var n=e.state.doc;if(-1==t)return!!n.inlineContent&&(Jt(e,o["TextSelection"].create(n,0,n.content.size),"pointer"),!0);for(var r=n.resolve(t),i=r.depth+1;i>0;i--){var s=i>r.depth?r.nodeAfter:r.node(i),a=r.before(i);if(s.inlineContent)Jt(e,o["TextSelection"].create(n,a+1,a+1+s.content.size),"pointer");else{if(!o["NodeSelection"].isSelectable(s))continue;Jt(e,o["NodeSelection"].create(n,a),"pointer")}return!0}}function en(e){return cn(e)}Dt.keydown=function(e,t){if(e.shiftKey=16==t.keyCode||t.shiftKey,!on(e,t))if(e.domObserver.forceFlush(),e.lastKeyCode=t.keyCode,e.lastKeyCodeTime=Date.now(),!s.ios||13!=t.keyCode||t.ctrlKey||t.altKey||t.metaKey)e.someProp("handleKeyDown",(function(n){return n(e,t)}))||at(e,t)?t.preventDefault():zt(e,"key");else{var n=Date.now();e.lastIOSEnter=n,e.lastIOSEnterFallbackTimeout=setTimeout((function(){e.lastIOSEnter==n&&(e.someProp("handleKeyDown",(function(t){return t(e,S(13,"Enter"))})),e.lastIOSEnter=0)}),200)}},Dt.keyup=function(e,t){16==t.keyCode&&(e.shiftKey=!1)},Dt.keypress=function(e,t){if(!(on(e,t)||!t.charCode||t.ctrlKey&&!t.altKey||s.mac&&t.metaKey))if(e.someProp("handleKeyPress",(function(n){return n(e,t)})))t.preventDefault();else{var n=e.state.selection;if(!(n instanceof o["TextSelection"])||!n.$from.sameParent(n.$to)){var r=String.fromCharCode(t.charCode);e.someProp("handleTextInput",(function(t){return t(e,n.$from.pos,n.$to.pos,r)}))||e.dispatch(e.state.tr.insertText(r).scrollIntoView()),t.preventDefault()}}};var tn=s.mac?"metaKey":"ctrlKey";Pt.mousedown=function(e,t){e.shiftKey=t.shiftKey;var n=en(e),o=Date.now(),r="singleClick";o-e.lastClick.time<500&&Wt(t,e.lastClick)&&!t[tn]&&("singleClick"==e.lastClick.type?r="doubleClick":"doubleClick"==e.lastClick.type&&(r="tripleClick")),e.lastClick={time:o,x:t.clientX,y:t.clientY,type:r};var i=e.posAtCoords(Ut(t));i&&("singleClick"==r?e.mouseDown=new nn(e,i,t,n):("doubleClick"==r?Zt:Qt)(e,i.pos,i.inside,t)?t.preventDefault():zt(e,"pointer"))};var nn=function(e,t,n,r){var i,a,c=this;if(this.view=e,this.startDoc=e.state.doc,this.pos=t,this.event=n,this.flushed=r,this.selectNode=n[tn],this.allowDefault=n.shiftKey,t.inside>-1)i=e.state.doc.nodeAt(t.inside),a=t.inside;else{var l=e.state.doc.resolve(t.pos);i=l.parent,a=l.depth?l.before():0}this.mightDrag=null;var u=r?null:n.target,d=u?e.docView.nearestDesc(u,!0):null;this.target=d?d.dom:null,(i.type.spec.draggable&&!1!==i.type.spec.selectable||e.state.selection instanceof o["NodeSelection"]&&a==e.state.selection.from)&&(this.mightDrag={node:i,pos:a,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&s.gecko&&!this.target.hasAttribute("contentEditable")}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((function(){return c.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),zt(e,"pointer")};function on(e,t){return!!e.composing||!!(s.safari&&Math.abs(t.timeStamp-e.compositionEndedAt)<500)&&(e.compositionEndedAt=-2e8,!0)}nn.prototype.done=function(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.view.mouseDown=null},nn.prototype.up=function(e){if(this.done(),this.view.dom.contains(3==e.target.nodeType?e.target.parentNode:e.target)){var t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Ut(e))),this.allowDefault||!t?zt(this.view,"pointer"):Yt(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():this.flushed||s.safari&&this.mightDrag&&!this.mightDrag.node.isAtom||s.chrome&&!(this.view.state.selection instanceof o["TextSelection"])&&(t.pos==this.view.state.selection.from||t.pos==this.view.state.selection.to)?(Jt(this.view,o["Selection"].near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):zt(this.view,"pointer")}},nn.prototype.move=function(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),zt(this.view,"pointer")},Pt.touchdown=function(e){en(e),zt(e,"pointer")},Pt.contextmenu=function(e){return en(e)};var rn=s.android?5e3:-1;function sn(e,t){clearTimeout(e.composingTimeout),t>-1&&(e.composingTimeout=setTimeout((function(){return cn(e)}),t))}function an(e){e.composing=!1;while(e.compositionNodes.length>0)e.compositionNodes.pop().markParentsDirty()}function cn(e,t){if(e.domObserver.forceFlush(),an(e),t||e.docView.dirty){var n=Ie(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}function ln(e,t){if(e.dom.parentNode){var n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";var o=getSelection(),r=document.createRange();r.selectNodeContents(t),e.dom.blur(),o.removeAllRanges(),o.addRange(r),setTimeout((function(){n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}}Dt.compositionstart=Dt.compositionupdate=function(e){if(!e.composing){e.domObserver.flush();var t=e.state,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(e){return!1===e.type.spec.inclusive}))))e.markCursor=e.state.storedMarks||n.marks(),cn(e,!0),e.markCursor=null;else if(cn(e),s.gecko&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var o=e.root.getSelection(),r=o.focusNode,i=o.focusOffset;r&&1==r.nodeType&&0!=i;){var a=i<0?r.lastChild:r.childNodes[i-1];if(!a)break;if(3==a.nodeType){o.collapse(a,a.nodeValue.length);break}r=a,i=-1}e.composing=!0}sn(e,rn)},Dt.compositionend=function(e,t){e.composing&&(e.composing=!1,e.compositionEndedAt=t.timeStamp,sn(e,20))};var un=s.ie&&s.ie_version<15||s.ios&&s.webkit_version<604;function dn(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}function pn(e,t){if(e.dom.parentNode){var n=e.shiftKey||e.state.selection.$from.parent.type.spec.code,o=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(o.contentEditable="true"),o.style.cssText="position: fixed; left: -10000px; top: 10px",o.focus(),setTimeout((function(){e.focus(),o.parentNode&&o.parentNode.removeChild(o),n?hn(e,o.value,null,t):hn(e,o.textContent,o.innerHTML,t)}),50)}}function hn(e,t,n,o){var i=vt(e,t,n,e.shiftKey,e.state.selection.$from);if(!e.someProp("handlePaste",(function(t){return t(e,o,i||r["Slice"].empty)}))&&i){var s=dn(i),a=s?e.state.tr.replaceSelectionWith(s,e.shiftKey):e.state.tr.replaceSelection(i);e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste"))}}Pt.copy=Dt.cut=function(e,t){var n=e.state.selection,o="cut"==t.type;if(!n.empty){var r=un?null:t.clipboardData,i=n.content(),s=gt(e,i),a=s.dom,c=s.text;r?(t.preventDefault(),r.clearData(),r.setData("text/html",a.innerHTML),r.setData("text/plain",c)):ln(e,a),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},Dt.paste=function(e,t){var n=un?null:t.clipboardData,o=n&&n.getData("text/html"),r=n&&n.getData("text/plain");n&&(o||r||n.files.length)?(hn(e,r,o,t),t.preventDefault()):pn(e,t)};var fn=function(e,t){this.slice=e,this.move=t},mn=s.mac?"altKey":"ctrlKey";for(var gn in Pt.dragstart=function(e,t){var n=e.mouseDown;if(n&&n.done(),t.dataTransfer){var r=e.state.selection,i=r.empty?null:e.posAtCoords(Ut(t));if(i&&i.pos>=r.from&&i.pos<=(r instanceof o["NodeSelection"]?r.to-1:r.to));else if(n&&n.mightDrag)e.dispatch(e.state.tr.setSelection(o["NodeSelection"].create(e.state.doc,n.mightDrag.pos)));else if(t.target&&1==t.target.nodeType){var s=e.docView.nearestDesc(t.target,!0);if(!s||!s.node.type.spec.draggable||s==e.docView)return;e.dispatch(e.state.tr.setSelection(o["NodeSelection"].create(e.state.doc,s.posBefore)))}var a=e.state.selection.content(),c=gt(e,a),l=c.dom,u=c.text;t.dataTransfer.clearData(),t.dataTransfer.setData(un?"Text":"text/html",l.innerHTML),un||t.dataTransfer.setData("text/plain",u),e.dragging=new fn(a,!t[mn])}},Pt.dragend=function(e){var t=e.dragging;window.setTimeout((function(){e.dragging==t&&(e.dragging=null)}),50)},Dt.dragover=Dt.dragenter=function(e,t){return t.preventDefault()},Dt.drop=function(e,t){var n=e.dragging;if(e.dragging=null,t.dataTransfer){var s=e.posAtCoords(Ut(t));if(s){var a=e.state.doc.resolve(s.pos);if(a){var c=n&&n.slice||vt(e,t.dataTransfer.getData(un?"Text":"text/plain"),un?null:t.dataTransfer.getData("text/html"),!1,a),l=n&&!t[mn];if(e.someProp("handleDrop",(function(n){return n(e,t,c||r["Slice"].empty,l)})))t.preventDefault();else if(c){t.preventDefault();var u=c?Object(i["h"])(e.state.doc,a.pos,c):a.pos;null==u&&(u=a.pos);var d=e.state.tr;l&&d.deleteSelection();var p=d.mapping.map(u),h=0==c.openStart&&0==c.openEnd&&1==c.content.childCount,f=d.doc;if(h?d.replaceRangeWith(p,p,c.content.firstChild):d.replaceRange(p,p,c),!d.doc.eq(f)){var m=d.doc.resolve(p);if(h&&o["NodeSelection"].isSelectable(c.content.firstChild)&&m.nodeAfter&&m.nodeAfter.sameMarkup(c.content.firstChild))d.setSelection(new o["NodeSelection"](m));else{var g=d.mapping.map(u);d.mapping.maps[d.mapping.maps.length-1].forEach((function(e,t,n,o){return g=o})),d.setSelection(He(e,m,d.doc.resolve(g)))}e.focus(),e.dispatch(d.setMeta("uiEvent","drop"))}}}}}},Pt.focus=function(e){e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((function(){e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.root.getSelection())&&Re(e)}),20))},Pt.blur=function(e){e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),e.domObserver.currentSelection.set({}),e.focused=!1)},Pt.beforeinput=function(e,t){if(s.chrome&&s.android&&"deleteContentBackward"==t.inputType){var n=e.domChangeCount;setTimeout((function(){if(e.domChangeCount==n&&(e.dom.blur(),e.focus(),!e.someProp("handleKeyDown",(function(t){return t(e,S(8,"Backspace"))})))){var t=e.state.selection,o=t.$cursor;o&&o.pos>0&&e.dispatch(e.state.tr.delete(o.pos-1,o.pos).scrollIntoView())}}),50)}},Dt)Pt[gn]=Dt[gn];function vn(e,t){if(e==t)return!0;for(var n in e)if(e[n]!==t[n])return!1;for(var o in t)if(!(o in e))return!1;return!0}var bn=function(e,t){this.spec=t||Cn,this.side=this.spec.side||0,this.toDOM=e};bn.prototype.map=function(e,t,n,o){var r=e.mapResult(t.from+o,this.side<0?-1:1),i=r.pos,s=r.deleted;return s?null:new An(i-n,i-n,this)},bn.prototype.valid=function(){return!0},bn.prototype.eq=function(e){return this==e||e instanceof bn&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&vn(this.spec,e.spec))};var yn=function(e,t){this.spec=t||Cn,this.attrs=e};yn.prototype.map=function(e,t,n,o){var r=e.map(t.from+o,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+o,this.spec.inclusiveEnd?1:-1)-n;return r>=i?null:new An(r,i,this)},yn.prototype.valid=function(e,t){return t.from=e&&(!r||r(s.spec))&&n.push(s.copy(s.from+o,s.to+o))}for(var a=0;ae){var c=this.children[a]+1;this.children[a+2].findInner(e-c,t-c,n,o+c,r)}},xn.prototype.map=function(e,t,n){return this==On||0==e.maps.length?this:this.mapInner(e,t,0,0,n||Cn)},xn.prototype.mapInner=function(e,t,n,o,r){for(var i,s=0;ss&&l.to=e){this.children[r]==e&&(n=this.children[r+2]);break}for(var i=e+1,s=i+t.content.size,a=0;ai&&c.type instanceof yn){var l=Math.max(i,c.from)-i,u=Math.min(s,c.to)-i;lc+i||(t>=a[s]+i?a[s+1]=-1:n>=r&&(l=o-n-(t-e))&&(a[s]+=l,a[s+1]+=l))}},l=0;l=o.content.size){u=!0;continue}var f=n.map(e[d+1]+i,-1),m=f-r,g=o.content.findIndex(h),v=g.index,b=g.offset,y=o.maybeChild(v);if(y&&b==h&&b+y.nodeSize==m){var w=a[d+2].mapInner(n,y,p+1,e[d]+i+1,s);w!=On?(a[d]=h,a[d+1]=m,a[d+2]=w):(a[d+1]=-2,u=!0)}else u=!0}if(u){var A=Nn(a,e,t||[],n,r,i,s),k=In(A,o,0,s);t=k.local;for(var S=0;Sn&&s.to0)t++;e.splice(t,0,n)}function jn(e){var t=[];return e.someProp("decorations",(function(n){var o=n(e.state);o&&o!=On&&t.push(o)})),e.cursorWrapper&&t.push(xn.create(e.state.doc,[e.cursorWrapper.deco])),En.from(t)}En.prototype.forChild=function(e,t){if(t.isLeaf)return xn.empty;for(var n=[],o=0;or.scrollToSelection?"to selection":"preserve",p=i||!this.docView.matchesNode(e.doc,u,l);!p&&e.selection.eq(r.selection)||(a=!0);var h="preserve"==d&&a&&null==this.dom.style.overflowAnchor&&M(this);if(a){this.domObserver.stop();var f=p&&(s.ie||s.chrome)&&!this.composing&&!r.selection.empty&&!e.selection.empty&&Hn(r.selection,e.selection);if(p){var m=s.chrome?this.trackWrites=this.root.getSelection().focusNode:null;!i&&this.docView.update(e.doc,u,l,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=pe(e.doc,u,l,this.dom,this)),m&&!this.trackWrites&&(f=!0)}f||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&qe(this))?Re(this,f):(Fe(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(r),"reset"==d)this.dom.scrollTop=0;else if("to selection"==d){var g=this.root.getSelection().focusNode;this.someProp("handleScrollToSelection",(function(e){return e(n)}))||(e.selection instanceof o["NodeSelection"]?E(this,this.docView.domAfterPos(e.selection.from).getBoundingClientRect(),g):E(this,this.coordsAtPos(e.selection.head,1),g))}else h&&N(h)},zn.prototype.destroyPluginViews=function(){var e;while(e=this.pluginViews.pop())e.destroy&&e.destroy()},zn.prototype.updatePluginViews=function(e){if(e&&e.plugins==this.state.plugins)for(var t=0;t0?parseInt(n):null};a"mac"in e&&"windows"in e},isDisabled:{type:Boolean,default:!1}},setup(){const e=navigator.platform.toUpperCase().includes("MAC");return{isMac:e}}},s=i,a=(n("9f0b"),n("2877")),c=Object(a["a"])(s,o,r,!1,null,"08212936",null);t["a"]=c.exports},"653b":function(e,t,n){"use strict";n("4621")},"655b":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAOCAYAAADNGCeJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADvSURBVHgBrZO7TsMwFIY/WyZtQlKgBXGJmKjExMaKhMQzdODZWJjpS/ASMFRcJCqUKSAVmqaqE/c61JsHf4t1bOvzr2Md8XSUGvzwKPGIV5m66I3wher2/qwNg6AyAdpIGrJcVO4tVdtFrQXjPODjOWbhontbs9uZIhybYV0rdJv/rEkdVOxf3zM7vKOsD3DFSlZ8d8hfNF9BQjE8phr/EO+0CC9/nWRWsuZJRHQV0s4zJq8PyOmAMN3DFTuZzIjPNWc3KUJHNE6HlGpGy0G0/Cb11k+2dZv1c3VYDNbViMTJpt77Lu+64XcCAF+Dbubyw0YgwrtbdQAAAABJRU5ErkJggg=="},"67b4":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAOCAYAAAAvxDzwAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAEVSURBVHgB1ZM/S8NAHIafpq20SkNpai0YiqQ04mooImLp5Ojm4GA3/TzO/ht08QOIUl0VJ6E4lQxaSCuIhgQnJdjYW+1RSujSB+6W594f78FdrKmWQiRk9xtkD/ZkCv/oAv/4XOoSYltSkkNCy8+jmaY05A6cK8l0+gEKE2biAxPjHHp8uSIdCzH0OmoyE33g5est8eAX1+mxUdY5aZ2xWahhjMiMvHLbs+l639y33un/fLFWXOH0rUnkhrlUDvW5zXZ4TeFukZt0HqeYGpgykRquL1g4mS41a4ag02MurnBYaRC5YVVbxqvuYD8ZKLs6q7MqFdPC5SHaQMFWqQ5ijcmUPGzxB//jf37g2rY0JJwvyQj+AF9DTHQJNpXlAAAAAElFTkSuQmCC"},"6a7d":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAQCAYAAAAWGF8bAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAALxSURBVHgBnZJpbIxRFIaf+3UWQ2e02jFoMrWNaiKGH7YSKtReghCCkBBL7PwgWip2P0QkVElVFYm0tvghQamiS+xtiYmlpNXqmLYzreqi9PN1mo5MJ20aJ7m5N+99z3vPec8VrwUZUmwczwdMZOuOTBJORhG+cwlSTBxL4p38bpSJH2cnMP4ox0KWctERSkehKly4PnL8iePMXteAKXEpZouR3n5qhNlM9CQTqypvY7h0ARGfQE2GEW59QpIEoWY9ao0f7987/6nJLqTl6UaerD2OLvk8kZf2M9CoRSdJ6LroiKm/g+lyIpqEJGJsYdy4VaRkqZFlNUmJ0aRemUdQkN6NtSylwt2xo6nu3ZeaZdnoC54qiMrzoJg+A7FhI4VNPYgQdgoLXdy990URlInbm41G60dFRb1XyyJvxkzZYtB7gXL6PbAORxiDvfCNL0M5V9TLx7ewQYFETQ4l7WoWKkaMBFNPb0bmQ4R1GAwc4P16hQxFDT6CkZFmjh6ZwP0HL5BO2C2UTF3UTIf8fMTc+dA9AOYp+6xo+PgBvhbz2DKNx/aubgGtVuUlmJpmY9KUVGw2J9L0qf0IObAdefsWyk39cdDNQ3xg+wOTpyCfPcu4wysZHNCgDKELhw6MdbfYGk5nA7m539zeSpbYVcg3r5Ox+RRDz/jz3VHnIe7bn83i5EZ+pmdBSQnBOel01akVsb5Yhxo9PKu1J2NG93GfVUk2A8zZRkryL1yuelJS3hJcOwJxpZSKynqePivj85cqFkQdpCApl+KvP5T20qira/QIjhrZi/79AsjJyVOM0+6SlXF6Lg0GDQa9hiFDjLzOs1NWVkunQ3YgtcXUaj/e5K/gWtpsxkaEdJgvhPDBfAQHhwVSZq9VDFZ+k6lbu2L+/ho2bRjOMKv3l1O1JWZll7J6zV2lUonMR8XtCjZPe8/uCE4nvCK/wEFTk9xStdtDuvM/ER4eRHl5HQ5Hq89VzRXKD8HViXQfd3j3rroNIvgLa3H8b7xvU0QAAAAASUVORK5CYII="},"6a80":function(e,t,n){"use strict";n("7f3c")},"6f94":function(e,t,n){"use strict";n("17f9")},7039:function(e,t,n){},"709e":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAOCAYAAADNGCeJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABHSURBVHgB7cyxEQAQEETRZRQiUoJYKTrRADmZGYXoS3LkJ7zw3swmG3yDUAgfe2Wk6Nl/asdpg/0GmBaCNKYxjYlxbwQZdAGFmAr3sILrzAAAAABJRU5ErkJggg=="},"767c":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAOCAYAAADNGCeJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABZSURBVHgBzdKxDYAwEANAmzywBKJmHBpWYQt2YAGoo8yRfT5RZnDxJ31r6WXz3w6HAIl3glDcMNuvEwppnUHvoBG4AFP9OMLuJ0NhsQT7SoUC6ZFH20/VgTfxjBAnjRSr4wAAAABJRU5ErkJggg=="},7799:function(e,t,n){"use strict";n("9936")},"79c0":function(e,t,n){},"7f06":function(e,t,n){"use strict";n.d(t,"a",(function(){return w})),n.d(t,"b",(function(){return y}));for(var o={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},r={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},i="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),s="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),a="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),c="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),l="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),u=i&&(c||+i[1]<57)||a&&c,d=0;d<10;d++)o[48+d]=o[96+d]=String(d);for(d=1;d<=24;d++)o[d+111]="F"+d;for(d=65;d<=90;d++)o[d]=String.fromCharCode(d+32),r[d]=String.fromCharCode(d);for(var p in o)r.hasOwnProperty(p)||(r[p]=o[p]);function h(e){var t=u&&(e.ctrlKey||e.altKey||e.metaKey)||(s||l)&&e.shiftKey&&e.key&&1==e.key.length,n=!t&&e.key||(e.shiftKey?r:o)[e.keyCode]||e.key||"Unidentified";return"Esc"==n&&(n="Escape"),"Del"==n&&(n="Delete"),"Left"==n&&(n="ArrowLeft"),"Up"==n&&(n="ArrowUp"),"Right"==n&&(n="ArrowRight"),"Down"==n&&(n="ArrowDown"),n}var f=n("5313"),m="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);function g(e){var t,n,o,r,i=e.split(/-(?!$)/),s=i[i.length-1];"Space"==s&&(s=" ");for(var a=0;a127)&&(r=o[n.keyCode])&&r!=i){var c=t[b(r,n,!0)];if(c&&c(e.state,e.dispatch,e))return!0}else if(s&&n.shiftKey){var l=t[b(i,n,!0)];if(l&&l(e.state,e.dispatch,e))return!0}return!1}}},"7f30":function(e,t,n){"use strict";n("1d29")},"7f3c":function(e,t,n){},"805d":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAOCAYAAADNGCeJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAHNSURBVHgBrZFNTxNBGMf/89bttl3aSls3sgKmRgJqotEY4MJZwxfwYOLFcPJgPPoVPHj1qgf9GMaLH8C3ioGQAkpT26ULa7u7MzuOcGUTDvtL5jB5Jr//88xDlh88071BALdRw35viHmvhe6vPlrTVWgAQRCiXnNwZXSgNirHE2RB6Vu+dzDEvVvX8Lmzg6WrHr5sdrF6dxFff3RRr5Yxf9k1IQPUV5bJyotHhSwXE0KQ1fXnmhAKx7Hhj45hW5bpSIOYB1ZRIAwnKNkW3KPB+OksH2U3xt7zKJGYqpQQxRKMUiilTIGCmBNHEtQExaZWW1okCxvrPFMmGOP+YQi3dQE7uz3MeU1sbu3j9o02vv/cxYw7DUlTjMy/+d86he3Xv50smfw7tvmsEQz9AHMzTfwxi1hoe+ju9eFdakBrjShK0GxU4VSEbK7dGSMTkvDJJMGUU0I4jiAERyIVyuWiGTc1IxJYFj8RpgWkyaEfZalUnMT8/trNIJUalBOk0myFkRMR+39P9WkmJWgXiUpP93ImjBueXL+ocH5EVsHkEN7/8LGEHKC2bZGjre0+coBx9o53Xr6SyAHKmCKR78fIAcrFG/7p4eMIeZAq9Q+Z2rGwtvwxqAAAAABJRU5ErkJggg=="},"81fb":function(e,t,n){"use strict";n.d(t,"h",(function(){return s})),n.d(t,"k",(function(){return a})),n.d(t,"f",(function(){return c})),n.d(t,"c",(function(){return l})),n.d(t,"i",(function(){return u})),n.d(t,"j",(function(){return d})),n.d(t,"d",(function(){return f})),n.d(t,"b",(function(){return y})),n.d(t,"g",(function(){return A})),n.d(t,"l",(function(){return k})),n.d(t,"n",(function(){return S})),n.d(t,"e",(function(){return C})),n.d(t,"m",(function(){return x})),n.d(t,"a",(function(){return O}));var o=n("5530"),r=n("124e"),i=n("119c");const s=["uppercase","lowercase","capitalize"],a="paragraph",c="heading",l="color",u="letterCase",d="link",p="h-1",h="h-2",f="h-3",m="h-4",g="h-5",v="h-6",b="body-large",y="body",w="body-small",A={[p]:{title:"".concat(i["a"].t("common.heading")," 1"),typographyName:r["O"]},[h]:{title:"".concat(i["a"].t("common.heading")," 2"),typographyName:r["P"]},[f]:{title:"".concat(i["a"].t("common.heading")," 3"),typographyName:r["Q"]},[m]:{title:"".concat(i["a"].t("common.heading")," 4"),typographyName:r["R"]},[g]:{title:"".concat(i["a"].t("common.heading")," 5"),typographyName:r["S"]},[v]:{title:"".concat(i["a"].t("common.heading")," 6"),typographyName:r["T"]}},k={[b]:{title:"".concat(i["a"].t("common.paragraph")," 1"),typographyName:r["M"]},[y]:{title:"".concat(i["a"].t("common.paragraph")," 2"),typographyName:r["L"]},[w]:{title:"".concat(i["a"].t("common.paragraph")," 3"),typographyName:r["N"]}},S=Object(o["a"])(Object(o["a"])({},A),k),C="h3",x="p",O=["color","text-transform","font-style","text-decoration","font-weight"]},"82e2":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAOCAYAAADNGCeJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJiSURBVHgBrZNLSFRhGIafc84cZ2zUcXI6TngZm0lkFhaIEtUikIIgSBBDUCjaVFAWrYLaFAVtok1iq0SiTQlGixZFG1MoBUPS7Grj/TqNl5nRmfHMOZ0zglLhZdG3/b7//d//+d9P8DYf0/kPJei0iFsNlWZFuFYSIMuibjWKZaOGVdS44BvltGecdEnjyK5f3P3ioyOYbfrYnphk+K1wLqTcSItOmlprmAi6yFdmuXLwHVV5Mzz4UchwNH1zsZy0BA3FI1TnTdMz4Odq40XiK/Ja/+X7A9w+28Lj8o80Dnp4Pq6g6uukJGeV76ZguCnLDvOwbIBDOfNoup03gRvk+RSKCu1k2GViyxrzizL9Q0XUV7Zz1B2kJDNK70ImYdViPrzXkmuLc847So3hRhZXP3ZmbgfP2uzE4hEcDhmXInD8pJ2ZKY3OdpWfE7vxe0aoVELsc0RoGiygdSwXS1ITsVs0krqAzKpYMikQXoqjqhIrQY1oVKKvbwmv18apWgWrdZ2Xxfgo3TwrgRhMyFzvK+Zyr5+xZWtqQHHOUVYSwmYViSWS6Jp5gU4gEGOof5gC13Tq2o6gkzPdpTwdcxtsRVL0NEO502jUd+3nxYSCIKnUVT4xnr2INU1kIZLAkSHjdqoGr2ZihLnz2celD36+R+xrLoW/N8CMRrkRjYbiYWzzO3nVXWFEQ8HjnuLE4U6+keT+1z2MLtv+iIW5Af/kzGTXFcrmU08mtQWTnK9uI8NgOm4guGeIvJ52sdH+bbgBEQP+o0A+b2ed1BVOGkH1EErIbFam2KaLbjK5NbCXbZT+G81y56cZ/h2yAAAAAElFTkSuQmCC"},8312:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAOCAYAAADNGCeJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABISURBVHgBzdOpEQAgDAXRDcPgkJSFoSI8TdAnIkAPX+QVsCKHAY7GTgjFjeWBRvmxhU7gmWFovGvNbSLh58VqR8NiL0D36H4B9LoIkk+xGfkAAAAASUVORK5CYII="},"84ae":function(e,t,n){"use strict";n("a9bc")},"87b8":function(e,t,n){"use strict";var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("Transition",{attrs:{name:"fade-in"}},[e.renderMenu&&e.isRenderingAllowed?n("PopupFrame",{ref:"contextMenu",staticClass:"context-menu",attrs:{left:e.computedStyles.left,top:e.computedStyles.top},nativeOn:{mousedown:function(e){e.stopPropagation()}}},[e._t("default")],2):e._e()],1)},r=[],i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"card",style:e.computedStyles},[e._t("default")],2)},s=[],a={props:{left:{type:String,required:!0},top:{type:String,required:!0}},computed:{computedStyles(){return{"--popup-frame-left":this.left,"--popup-frame-top":this.top}}}},c=a,l=(n("d826"),n("2877")),u=Object(l["a"])(c,i,s,!1,null,"6ef23705",null),d=u.exports,p=n("8ad7");const h=()=>{function e(e,t,n){if(!e||!t)return{left:t.left,top:t.top};const{left:o,top:r}=n,{width:i,height:s}=e.getBoundingClientRect(),{height:a,width:c}=t.getBoundingClientRect();let{left:l,top:u}=n;return o+i>c&&(l-=i),r+s>a&&(u-=i),{left:l,top:u}}return{fitCoordinatesToScreen:e}};var f={components:{PopupFrame:d},props:{isRenderingAllowed:{type:Boolean,default:!1}},setup(){const{mousePosition:e,closeContextMenu:t}=Object(p["a"])(),{fitCoordinatesToScreen:n}=h();return{fitCoordinatesToScreen:n,closeContextMenu:t,mousePosition:e}},data(){return{renderMenu:!1}},computed:{computedStyles(){var e;const{clientX:t,clientY:n}=this.mousePosition,{left:o,top:r}=this.fitCoordinatesToScreen(null===(e=this.$refs.contextMenu)||void 0===e?void 0:e.$el,document.body,{left:t,top:n});return{left:"".concat(o,"px"),top:"".concat(r+window.scrollY,"px")}}},watch:{async mousePosition(e){this.renderMenu=!1,e&&(this.renderMenu=!0,await this.$nextTick(),this.$recompute("computedStyles"))}},created(){window.addEventListener("mousedown",this.hideMenu)},beforeDestroy(){window.removeEventListener("mousedown",this.hideMenu)},methods:{hideMenu(){this.closeContextMenu(),this.$emit("close-context-menu")}}},m=f,g=(n("653b"),Object(l["a"])(m,o,r,!1,null,"5cdc2cbf",null));t["a"]=g.exports},"8ad7":function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var o=n("a6f4"),r=n("2b0e");r["default"].use(o["b"]);const i=Object(o["i"])(null),s=Object(o["i"])(null),a=Object(o["i"])(null),c=()=>{const e=Object(o["a"])(()=>i.value&&s.value?{clientX:i.value,clientY:s.value}:null),t=e=>{i.value=e.clientX,s.value=e.clientY,a.value=e},n=()=>{i.value=null,s.value=null,a.value=null};return{mousePosition:e,mouseEventRaw:a,openContextMenu:t,closeContextMenu:n}}},"8ec7":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAOCAYAAADNGCeJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAA3SURBVHgB7ZOxDQAgDMMM6gNsnM93bLwQekSkLrWU1UvkcVnCgs7ESMuKZbH1cNEHFMsiZwodfWTNB7n/P175AAAAAElFTkSuQmCC"},9286:function(e,t,n){},"986d":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("5313"),r=n("304a"),i=n("55be"),s=function(e){return function(t){var n=F(e)(t.selection);return n?S(n.pos)(t):t}},a=function(e,t){return function(n){Array.isArray(e)||(e=[e]);for(var o=0,r=e.length;o1&&void 0!==arguments[1]?arguments[1]:1;return function(n){var r=o.Selection.findFrom(n.doc.resolve(e),t,!0);return r?n.setSelection(r):n}},d=function(e){return e.type&&e.type.spec.selectable},p=function(e){return d(e)&&e.type.isLeaf},h=function(e,t,n){return p(e)?n.setSelection(new o.NodeSelection(n.doc.resolve(t))):u(t)(n)},f=function(e,t,n){return function(o){var r="number"===typeof t,i=o.selection.$from,s=r?o.doc.resolve(t):b(o.selection)?o.doc.resolve(i.pos+1):i,c=s.parent;if(b(o.selection)&&n){var u=o;if(o=l(e)(o),u!==o)return o}if(O(c)){var p=o;if(o=a(c.type,e)(o),p!==o){var f=d(e)?s.before(s.depth):s.pos;return h(e,f,o)}}if(x(s,e)){o.insert(s.pos,e);var m=r?s.pos:d(e)?o.selection.$anchor.pos-1:o.selection.$anchor.pos;return w(h(e,m,o))}for(var g=s.depth;g>0;g--){var v=s.after(g),y=o.doc.resolve(v);if(x(y,e))return o.insert(v,e),w(h(e,v,o))}return o}},m=function(e,t,n,o){return function(r){var i=F(e)(r.selection);return i?w(r.setNodeMarkup(i.pos,t,Object.assign({},i.node.attrs,n),o)):r}},g=function(e){return function(t){if(!b(t.selection)){var n=F(e)(t.selection);if(n)return w(t.setSelection(o.NodeSelection.create(t.doc,n.pos)))}return t}},v=function(e){var t=q(e.selection);return"number"===typeof t?S(t)(e):e},b=function(e){return e instanceof o.NodeSelection},y=function(e,t){return Array.isArray(e)&&e.indexOf(t.type)>-1||t.type===e},w=function(e){return Object.assign(Object.create(e),e).setTime(Date.now())},A=function(e,t){return function(n){var o=n.doc.nodeAt(e),r=n.doc.resolve(e);if(k(r,t)){n=n.replaceWith(e,e+o.nodeSize,t);var i=n.selection.$from.pos-1;return n=u(Math.max(i,0),-1)(n),n=u(n.selection.$from.start())(n),w(n)}return n}},k=function(e,t){var n=e.node(e.depth);return n&&n.type.validContent(t instanceof r.Fragment?t:r.Fragment.from(t))},S=function(e){return function(t){var n=t.doc.nodeAt(e);return w(t.delete(e,e+n.nodeSize))}},C=function(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;var t={};return Object.keys(e.nodes).forEach((function(n){var o=e.nodes[n];o.spec.tableRole&&(t[o.spec.tableRole]=o)})),e.cached.tableNodeTypes=t,t},x=function(e,t){var n=e.index();return t instanceof r.Fragment?e.parent.canReplace(n,n,t):t instanceof r.Node&&e.parent.canReplaceWith(n,n,t.type)},O=function(e){return!e||"paragraph"===e.type.name&&2===e.nodeSize},E=function(e){var t=function(e){return e.type.spec.tableRole&&/table/i.test(e.type.spec.tableRole)};return z(e,t)},M=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t?e.createChecked(null,t):e.createAndFill()},B=function(e){return function(t){for(var n=i.TableMap.get(t.$anchorCell.node(-1)),o=t.$anchorCell.start(-1),r=n.cellsInRect(e),s=n.cellsInRect(n.rectBetween(t.$anchorCell.pos-o,t.$headCell.pos-o)),a=0,c=r.length;an[0]?-1:1,i=e.splice(t[0],t.length),s=i.length%2===0?1:0,a=void 0;return a=-1===o&&1===r?n[0]-1:1===o&&-1===r?n[n.length-1]-s+1:-1===r?n[0]:n[n.length-1]-s,e.splice.apply(e,[a,0].concat(i)),e},D=function(e,t,n,o){var r=e>t?-1:1,i="Target position is invalid, you can't move the "+o+" "+e+" to "+t+", the target can't be split. You could use tryToFit option.";if(1===r){if(-1!==n.slice(0,n.length-1).indexOf(t))throw new Error(i)}else if(-1!==n.slice(1).indexOf(t))throw new Error(i);return!0},j=function(e){return function(t){var n=t.$from;return z(n,e)}},z=function(e,t){for(var n=e.depth;n>0;n--){var o=e.node(n);if(t(o))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:o}}},L=function(e,t){return function(n){var o=j(e)(n);if(o)return J(o.pos,t)}},$=function(e){return function(t){return!!j(e)(t)}},F=function(e){return function(t){return j((function(t){return y(e,t)}))(t)}},V=function(e,t){return z(e,(function(e){return y(t,e)}))},H=function(e){return function(t){return $((function(t){return y(e,t)}))(t)}},U=function(e,t){return function(n){return L((function(t){return y(e,t)}),t)(n)}},W=function(e){return function(t){if(b(t)){var n=t.node,o=t.$from;if(y(e,n))return{node:n,pos:o.pos,depth:o.depth}}}},q=function(e){var t=e.$from.nodeBefore,n=o.Selection.findFrom(e.$from,-1);if(n&&t){var r=F(t.type)(n);return r?r.pos:n.$from.pos}},J=function(e,t){var n=t(e),o=n.node.childNodes[n.offset];return n.node.nodeType===Node.TEXT_NODE?n.node.parentNode:o&&o.nodeType!==Node.TEXT_NODE?o:n.node},K=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)throw new Error('Invalid "node" parameter');var n=[];return e.descendants((function(e,o){if(n.push({node:e,pos:o}),!t)return!1})),n},G=function(e,t,n){if(!e)throw new Error('Invalid "node" parameter');if(!t)throw new Error('Invalid "predicate" parameter');return K(e,n).filter((function(e){return t(e.node)}))},Y=function(e,t){return G(e,(function(e){return e.isText}),t)},Z=function(e,t){return G(e,(function(e){return e.isInline}),t)},Q=function(e,t){return G(e,(function(e){return e.isBlock}),t)},X=function(e,t,n){return G(e,(function(e){return!!t(e.attrs)}),n)},ee=function(e,t,n){return G(e,(function(e){return e.type===t}),n)},te=function(e,t,n){return G(e,(function(e){return t.isInSet(e.marks)}),n)},ne=function(e,t){return!!ee(e,t).length};function oe(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t=0&&t<=o.width-1){var r=o.cellsInRect({left:t,right:t+1,top:0,bottom:o.height});return e.concat(r.map((function(e){var t=n.node.nodeAt(e),o=e+n.start;return{pos:o,start:o+1,node:t}})))}}),[])}}},de=function(e){return function(t){var n=re(t);if(n){var o=i.TableMap.get(n.node),r=Array.isArray(e)?e:Array.from([e]);return r.reduce((function(e,t){if(t>=0&&t<=o.height-1){var r=o.cellsInRect({left:0,right:o.width,top:t,bottom:t+1});return e.concat(r.map((function(e){var t=n.node.nodeAt(e),o=e+n.start;return{pos:o,start:o+1,node:t}})))}}),[])}}},pe=function(e){var t=re(e);if(t){var n=i.TableMap.get(t.node),o=n.cellsInRect({left:0,right:n.width,top:0,bottom:n.height});return o.map((function(e){var n=t.node.nodeAt(e),o=e+t.start;return{pos:o,start:o+1,node:n}}))}},he=function(e){return function(t,n){return function(o){var r=re(o.selection),s="row"===e;if(r){var a=i.TableMap.get(r.node);if(t>=0&&t<(s?a.height:a.width)){var c=s?0:t,l=s?t:0,u=s?a.width:t+1,d=s?t+1:a.height;if(n){var p=Re(o.selection.$from);if(!p)return o;var h=a.findCell(p.pos-r.start);s?(l=Math.min(l,h.top),d=Math.max(d,h.bottom)):(c=Math.min(c,h.left),u=Math.max(u,h.right))}var f=a.cellsInRect({left:c,top:l,right:s?u:c+1,bottom:s?l+1:d}),m=d-l===1?f:a.cellsInRect({left:s?c:u-1,top:s?d-1:l,right:u,bottom:d}),g=r.start+f[0],v=r.start+m[m.length-1],b=o.doc.resolve(g),y=o.doc.resolve(v);return w(o.setSelection(new i.CellSelection(y,b)))}}return o}}},fe=he("column"),me=he("row"),ge=function(e){var t=re(e.selection);if(t){var n=i.TableMap.get(t.node),o=n.map;if(o&&o.length){var r=t.start+o[0],s=t.start+o[o.length-1],a=e.doc.resolve(r),c=e.doc.resolve(s);return w(e.setSelection(new i.CellSelection(c,a)))}}return e},ve=function(e,t){return function(n){if(e){var o=C(t).cell.createAndFill(),r=o.content;if(!e.node.content.eq(r))return n.replaceWith(e.pos+1,e.pos+e.node.nodeSize,r),w(n)}return n}},be=function(e){return function(t){var n=re(t.selection);if(n){var o=i.TableMap.get(n.node);if(e>=0&&e<=o.width)return w(i.addColumn(t,{map:o,tableStart:n.start,table:n.node},e))}return t}},ye=function(e,t,n){return function(o){var r={tryToFit:!1,direction:0},i=Object.assign(r,n),s=re(o.selection);if(!s)return o;var a=ze(e)(o),c=a.indexes,l=ze(t)(o),u=l.indexes;if(c.indexOf(t)>-1)return o;!i.tryToFit&&u.length>1&&D(e,t,u,"row");var d=R(s,c,u,i.direction);return w(o).replaceWith(s.pos,s.pos+s.node.nodeSize,d)}},we=function(e,t,n){return function(o){var r={tryToFit:!1,direction:0},i=Object.assign(r,n),s=re(o.selection);if(!s)return o;var a=je(e)(o),c=a.indexes,l=je(t)(o),u=l.indexes;if(c.indexOf(t)>-1)return o;!i.tryToFit&&u.length>1&&D(e,t,u,"column");var d=I(s,c,u,i.direction);return w(o).replaceWith(s.pos,s.pos+s.node.nodeSize,d)}},Ae=function(e,t){return function(n){var o=re(n.selection);if(o){var r=i.TableMap.get(o.node),s=e-1;if(t&&s>=0)return w(ke(s)(n));if(e>=0&&e<=r.height)return w(i.addRow(n,{map:r,tableStart:o.start,table:o.node},e))}return n}},ke=function(e){return function(t){var n=re(t.selection);if(n){var o=i.TableMap.get(n.node);if(e>=0&&e<=o.height){for(var r=n.node,s=C(r.type.schema),a=n.start,c=0;c1&&i>e}))(t);p.push.apply(p,oe(o))},m=e;m>=0;m--)h(m);p.length&&p.forEach((function(e){t=_e(e,{rowspan:e.node.attrs.rowspan+1})(t)}))}return f(s.row.create(l.attrs,u),a)(t)}}return t}},Se=function(e){return function(t){var n=re(t.selection);if(n){var o=i.TableMap.get(n.node);if(0===e&&1===o.width)return xe(t);if(e>=0&&e<=o.width)return i.removeColumn(t,{map:o,tableStart:n.start,table:n.node},e),w(t)}return t}},Ce=function(e){return function(t){var n=re(t.selection);if(n){var o=i.TableMap.get(n.node);if(0===e&&1===o.height)return xe(t);if(e>=0&&e<=o.height)return i.removeRow(t,{map:o,tableStart:n.start,table:n.node},e),w(t)}return t}},xe=function(e){for(var t=e.selection.$from,n=t.depth;n>0;n--){var o=t.node(n);if("table"===o.type.spec.tableRole)return w(e.delete(t.before(n),t.after(n)))}return e},Oe=function(e){var t=e.selection;if(le(t))return xe(e);if(ie(t)){var n=re(t);if(n){var o=i.TableMap.get(n.node),r=o.rectBetween(t.$anchorCell.pos-n.start,t.$headCell.pos-n.start);if(0==r.left&&r.right==o.width)return!1;for(var s=Object.assign({},r,{map:o,table:n.node,tableStart:n.start}),a=s.right-1;;a--){if(i.removeColumn(e,s,a),a===s.left)break;s.table=s.tableStart?e.doc.nodeAt(s.tableStart-1):e.doc,s.map=i.TableMap.get(s.table)}return w(e)}}return e},Ee=function(e){var t=e.selection;if(le(t))return xe(e);if(ie(t)){var n=re(t);if(n){var o=i.TableMap.get(n.node),r=o.rectBetween(t.$anchorCell.pos-n.start,t.$headCell.pos-n.start);if(0==r.top&&r.bottom==o.height)return!1;for(var s=Object.assign({},r,{map:o,table:n.node,tableStart:n.start}),a=s.bottom-1;;a--){if(i.removeRow(e,s,a),a===s.top)break;s.table=s.tableStart?e.doc.nodeAt(s.tableStart-1):e.doc,s.map=i.TableMap.get(s.table)}return w(e)}}return e},Me=function(e){return function(t){var n=Pe(e);return n?Se(n.left)(u(e.pos)(t)):t}},Be=function(e){return function(t){var n=Pe(e);return n?Ce(n.top)(u(e.pos)(t)):t}},Ne=function(e,t,n){return function(r){var i=ue(e)(r.selection);if(i){for(var s=i.length-1;s>=0;s--)r=t(i[s],r);if(n){var a=r.doc.resolve(r.mapping.map(i[i.length-1].pos));r.setSelection(o.Selection.near(a))}return w(r)}return r}},Te=function(e,t,n){return function(r){var i=de(e)(r.selection);if(i){for(var s=i.length-1;s>=0;s--)r=t(i[s],r);if(n){var a=r.doc.resolve(r.mapping.map(i[i.length-1].pos));r.setSelection(o.Selection.near(a))}}return r}},_e=function(e,t){return function(n){return e?(n.setNodeMarkup(e.pos,null,Object.assign({},e.node.attrs,t)),w(n)):n}},Ie=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i=C(e),s=i.cell,a=i.header_cell,c=i.row,l=i.table,u=[],d=[],p=0;p=0;i--)t(r[i],n)&&o.push(r[i]);return o}},je=function(e){return function(t){for(var n=e,o=e,r=function(e){var r=ue(e)(t.selection);r&&r.forEach((function(t){var r=t.node.attrs.colspan+e-1;r>=n&&(n=e),r>o&&(o=r)}))},i=e;i>=0;i--)r(i);var s=function(e){var n=ue(e)(t.selection);n&&n.forEach((function(t){var n=t.node.attrs.colspan+e-1;t.node.attrs.colspan>1&&n>o&&(o=n)}))};for(i=e;i<=o;i++)s(i);var a=[];for(i=n;i<=o;i++){var c=ue(i)(t.selection);c&&c.length&&a.push(i)}n=a[0],o=a[a.length-1];for(var l=ue(n)(t.selection),u=de(0)(t.selection),d=t.doc.resolve(l[l.length-1].pos),p=void 0,h=o;h>=n;h--){var f=ue(h)(t.selection);if(f&&f.length){for(var m=u.length-1;m>=0;m--)if(u[m].pos===f[0].pos){p=f[0];break}if(p)break}}var g=t.doc.resolve(p.pos);return{$anchor:d,$head:g,indexes:a}}},ze=function(e){return function(t){for(var n=e,o=e,r=function(e){var r=de(e)(t.selection);r.forEach((function(t){var r=t.node.attrs.rowspan+e-1;r>=n&&(n=e),r>o&&(o=r)}))},i=e;i>=0;i--)r(i);var s=function(e){var n=de(e)(t.selection);n.forEach((function(t){var n=t.node.attrs.rowspan+e-1;t.node.attrs.rowspan>1&&n>o&&(o=n)}))};for(i=e;i<=o;i++)s(i);var a=[];for(i=n;i<=o;i++){var c=de(i)(t.selection);c&&c.length&&a.push(i)}n=a[0],o=a[a.length-1];for(var l=de(n)(t.selection),u=ue(0)(t.selection),d=t.doc.resolve(l[l.length-1].pos),p=void 0,h=o;h>=n;h--){var f=de(h)(t.selection);if(f&&f.length){for(var m=u.length-1;m>=0;m--)if(u[m].pos===f[0].pos){p=f[0];break}if(p)break}}var g=t.doc.resolve(p.pos);return{$anchor:d,$head:g,indexes:a}}};t.isNodeSelection=b,t.canInsert=x,t.convertTableNodeToArrayOfRows=T,t.convertArrayOfRowsToTableNode=_,t.findParentNode=j,t.findParentNodeClosestToPos=z,t.findParentDomRef=L,t.hasParentNode=$,t.findParentNodeOfType=F,t.findParentNodeOfTypeClosestToPos=V,t.hasParentNodeOfType=H,t.findParentDomRefOfType=U,t.findSelectedNodeOfType=W,t.findPositionOfNodeBefore=q,t.findDomRefAtPos=J,t.flatten=K,t.findChildren=G,t.findTextNodes=Y,t.findInlineNodes=Z,t.findBlockNodes=Q,t.findChildrenByAttr=X,t.findChildrenByType=ee,t.findChildrenByMark=te,t.contains=ne,t.findTable=re,t.isCellSelection=ie,t.getSelectionRect=se,t.isColumnSelected=ae,t.isRowSelected=ce,t.isTableSelected=le,t.getCellsInColumn=ue,t.getCellsInRow=de,t.getCellsInTable=pe,t.selectColumn=fe,t.selectRow=me,t.selectTable=ge,t.emptyCell=ve,t.addColumnAt=be,t.moveRow=ye,t.moveColumn=we,t.addRowAt=Ae,t.cloneRowAt=ke,t.removeColumnAt=Se,t.removeRowAt=Ce,t.removeTable=xe,t.removeSelectedColumns=Oe,t.removeSelectedRows=Ee,t.removeColumnClosestToPos=Me,t.removeRowClosestToPos=Be,t.forEachCellInColumn=Ne,t.forEachCellInRow=Te,t.setCellAttrs=_e,t.createTable=Ie,t.findCellClosestToPos=Re,t.findCellRectClosestToPos=Pe,t.getSelectionRangeInColumn=je,t.getSelectionRangeInRow=ze,t.removeParentNodeOfType=s,t.replaceParentNodeOfType=a,t.removeSelectedNode=c,t.replaceSelectedNode=l,t.setTextSelection=u,t.safeInsert=f,t.setParentNodeMarkup=m,t.selectParentNodeOfType=g,t.removeNodeBefore=v},"98e7":function(e,t,n){"use strict";n("a65e")},9936:function(e,t,n){},"9daa":function(e,t,n){"use strict";var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ZyroButton",{directives:[{name:"qa",rawName:"v-qa",value:"builder-header-btn-publishsite",expression:"'builder-header-btn-publishsite'"}],staticClass:"publish-button",attrs:{disabled:e.isSiteBeingPublished,theme:"header",color:"red"},on:{click:e.handlePublish}},[n("div",{staticClass:"publish-button__content",attrs:{"data-qa":"builder-header-text-publishsite"}},[e.isSiteBeingPublished?n("Transition",{attrs:{name:"fade"}},[n("ZyroLoader",{staticClass:"publish-button__loader",style:{"--size":"20px","--weight":"4px","--border-color":"var(--accent-two-light)","--color":"var(--light)"}})],1):e._e(),e._v(" "+e._s(e.buttonText)+" ")],1)])},r=[],i=n("5530"),s=n("2f62"),a={data(){return{isBeingUpdated:!1}},computed:Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])({},Object(s["f"])("blog",["isBlogEditMode"])),Object(s["f"])(["domain"])),Object(s["f"])("gui",["isSiteBeingPublished"])),Object(s["f"])("pages",["currentPageId"])),Object(s["d"])("pages",["currentPage"])),Object(s["d"])("saving",["hasUnsavedChanges"])),{},{buttonText(){return this.isSiteBeingPublished?this.$t("builder.header.publishing"):this.domain?this.$t("builder.header.updateWebsite"):this.$t("builder.header.publishWebsite")}}),watch:{async isSiteBeingPublished(){this.isSiteBeingPublished&&(this.$emit("pre-publish"),await(this.isBeingUpdated?this.updateWebsite():this.publishWebsite(this.domain)),this.toggleSiteBeingPublished(),this.$emit("after-publish"))}},methods:Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])({},Object(s["e"])("gui",["toggleSiteBeingPublished"])),Object(s["c"])(["updateWebsite","publishWebsite"])),Object(s["c"])("gui",["setElementEditMode","openPublishModal"])),{},{async handlePublish(){this.setElementEditMode(!1),await this.$nextTick(),this.domain?(this.isBeingUpdated=!0,this.toggleSiteBeingPublished()):this.openPublishModal()}})},c=a,l=(n("3d37"),n("2877")),u=Object(l["a"])(c,o,r,!1,null,"726b3908",null);t["a"]=u.exports},"9f0b":function(e,t,n){"use strict";n("a49f")},"9f51":function(e,t,n){},a15a:function(e,t,n){"use strict";n("4e1a")},a15f:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return d})),n.d(t,"e",(function(){return p})),n.d(t,"f",(function(){return h})),n.d(t,"g",(function(){return f}));var o=n("5313"); /*! * tiptap-utils v1.13.0 * (c) 2021 überdosis GbR (limited liability) * @license MIT */function r(e,t){return Array.isArray(e)&&e.indexOf(t.type)>-1||t.type===e}function i(e,t){for(let n=e.depth;n>0;n-=1){const o=e.node(n);if(t(o))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:o}}}function s(e){return t=>i(t.$from,e)}function a(e){return e instanceof o["NodeSelection"]}function c(e){return function(t){if(a(t)){const{node:n}=t,{$from:o}=t;if(r(e,n))return{node:n,pos:o.pos,depth:o.depth}}}}function l(e,t){const{from:n,to:o}=e.selection;let r=[];e.doc.nodesBetween(n,o,e=>{r=[...r,...e.marks]});const i=r.find(e=>e.type.name===t.name);return i?i.attrs:{}}function u(e=null,t=null){if(!e||!t)return!1;const n=e.parent.childAfter(e.parentOffset);if(!n.node)return!1;const o=n.node.marks.find(e=>e.type===t);if(!o)return!1;let r=e.index(),i=e.start()+n.offset,s=r+1,a=i+n.node.nodeSize;while(r>0&&o.isInSet(e.parent.child(r-1).marks))r-=1,i-=e.parent.child(r).nodeSize;while(s{r=[...r,e]});const i=r.reverse().find(e=>e.type.name===t.name);return i?i.attrs:{}}function p(e,t){const{from:n,$from:o,to:r,empty:i}=e.selection;return i?!!t.isInSet(e.storedMarks||o.marks()):!!e.doc.rangeHasMark(n,r,t)}function h({types:e,node:t}){return Array.isArray(e)&&e.includes(t.type)||t.type===e}function f(e,t,n={}){const o=e=>e.type===t,r=c(t)(e.selection)||s(o)(e.selection);return Object.keys(n).length&&r?r.node.hasMarkup(t,{...r.node.attrs,...n}):!!r}},a1806:function(e,t,n){"use strict";n("79c0")},a49f:function(e,t,n){},a618:function(e,t,n){},a65e:function(e,t,n){},a6c2:function(e,t,n){"use strict";n.r(t);var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("BlockHeader",{style:e.computedStyles,attrs:{items:e.navigationItems,"is-open":e.isOpen,"is-logo-visible":e.settings.showLogo,"is-cart-visible":e.settings.isCartVisible&&e.isSiteWithEcwid,"logo-url":e.settings.logoUrl,"cart-text":e.settings.cartText,"cart-icon-size":e.styles.cartIconSize,"items-in-cart":e.ecwidCartItemCount,"logo-placement":e.logoPlacement,"logo-placement-mobile":e.logoPlacementMobile,"navigation-placement":e.navigationPlacement,"navigation-placement-mobile":e.navigationPlacementMobile,background:e.data.background,"is-sticky":e.settings.isSticky,height:e.height,"is-transparent":e.data.background.isTransparent,"logo-max-width":e.styles["logo-width"],"logo-max-width-mobile":e.styles["m-logo-width"],"is-logo-optimized":!1,"logo-height":e.styles["logo-height"],"logo-height-mobile":e.styles["m-logo-height"],"logo-object-position":e.styles["logo-image-object-position"],"logo-object-position-mobile":e.styles["m-logo-image-object-position"],"dropdown-background-color":e.data.background.color,"is-dropdown-background-mobile-transparent":"image"===e.data.background.current,"are-dropdowns-hidden":!e.isMobileMode},on:{"cart-click":e.handleCartClick,"logo-click":e.handleLogoClick,"toggle-visibility":function(t){e.isOpen=!e.isOpen},"navigation-item-click":function(t){return e.handleNavigationItemClick(t)},"update-height":function(t){return e.$emit("update-height",t)}}})},r=[],i=n("5530"),s=n("2f62"),a=n("4262"),c=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("header",{ref:"headerRef",staticClass:"block-header",class:{"block-header--is-sticky":e.isSticky,"block-header--with-shadow":e.isWithShadow}},[e.headerBackground?n("BlockBackground",{attrs:{background:e.headerBackground}}):e._e(),n("div",{staticClass:"block-header__content",class:{"block-header__content--open":e.isOpen},style:e.computedStyles},[e.isLogoVisible?n("BlockHeaderLogo",{staticClass:"block-header__logo",class:{"block-header__logo--m-with-cart":e.isCartVisible},attrs:{url:e.logoUrl,"max-width":e.logoMaxWidth,"max-width-mobile":e.logoMaxWidthMobile,height:e.logoHeight,"height-mobile":e.logoHeightMobile,"is-optimized":e.isLogoOptimized,"object-position":e.logoObjectPosition,"object-position-mobile":e.logoObjectPositionMobile},nativeOn:{click:function(t){return e.$emit("logo-click")}}}):e._e(),e.items.length?n("ZyroHamburger",{directives:[{name:"qa",rawName:"v-qa",value:"builder-siteheader-btn-hamburger",expression:"'builder-siteheader-btn-hamburger'"}],staticClass:"block-header__burger",class:{"block-header__burger--m-with-cart":e.isCartVisible},attrs:{"is-open":e.isOpen},on:{click:function(t){return t.stopPropagation(),e.$emit("toggle-visibility")}}}):e._e(),n("nav",{staticClass:"block-header__nav"},[n("ul",{directives:[{name:"qa",rawName:"v-qa",value:"builder-siteheader-emptyspace",expression:"'builder-siteheader-emptyspace'"}],staticClass:"block-header__links",class:[{"block-header__links--open":e.isOpen},"block-header__links--align-"+(e.navigationPlacementMobile||e.navigationPlacement)]},e._l(e.items,(function(t){return n("BlockHeaderItem",{key:t.id,attrs:{item:t,"are-dropdowns-hidden":e.areDropdownsHidden,"dropdown-background-color":e.dropdownBackgroundColor,"is-dropdown-background-mobile-transparent":e.isDropdownBackgroundMobileTransparent},on:{"navigation-item-click":function(t){return e.$emit("navigation-item-click",t)}}})})),1)]),e.isCartVisible?n("BlockHeaderCart",{staticClass:"block-header__cart",attrs:{"cart-text":e.cartText,"cart-icon-size":e.cartIconSize,"items-in-cart":e.itemsInCart},on:{click:function(t){return e.$emit("cart-click")}}}):e._e()],1)],1)},l=[],u=(n("ddb0"),function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"block-header-cart-wrapper",style:{cartIconSize:e.cartIconSize}},[n("button",{staticClass:"block-header-cart",attrs:{title:"Go to cart"},on:{click:function(t){return e.$emit("click")}}},[n("div",{staticClass:"block-header-cart__icon-container"},[n("svg",{staticClass:"block-header-cart__icon",attrs:{width:"19",height:"24",viewBox:"0 0 19 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[n("path",{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.94636 5.35922C6.29451 3.00506 7.9363 1.39824 9.67973\n\t\t\t\t\t1.39824C11.4232 1.39824 13.0649 3.00506\n\t\t\t\t\t13.4131 5.35922H5.94636ZM4.53847 5.35922C4.90317 2.43147\n\t\t\t\t\t6.95866 0.000183105 9.67973 0.000183105C12.4008\n\t\t\t\t\t0.000183105 14.4563 2.43147 14.821 5.35922H17.2816H18.6797V6.75728V21.2039C18.6797\n\t\t\t\t\t22.7481 17.4278 24 15.8836\n\t\t\t\t\t24H3.4758C1.93155 24 0.679688 22.7481 0.679688\n\t\t\t\t\t21.2039V6.75728V5.35922H2.07775H4.53847ZM2.07775 6.75728H4.52596V9.08752C4.52596\n\t\t\t\t\t9.47359 4.83893 9.78655 5.22499 9.78655C5.61105 9.78655 5.92402 9.47359\n\t\t\t\t\t5.92402 9.08752V6.75728H13.5259V9.08752C13.5259 9.47359\n\t\t\t\t\t13.8389 9.78655 14.2249 9.78655C14.611 9.78655 14.9239\n\t\t\t\t\t9.47359 14.9239 9.08752V6.75728H17.2816V21.2039C17.2816 21.976 16.6557 22.6019\n\t\t\t\t\t15.8836 22.6019H3.4758C2.70368 22.6019 2.07775 21.976 2.07775 21.2039V6.75728Z",fill:"currentColor"}})]),n("span",[e._v(e._s(e.cartText)+" ("+e._s(e.itemsInCart)+")")])])])])}),d=[],p={name:"BlockHeaderCart",props:{cartIconSize:{type:String,required:!0},cartText:{type:String,required:!0},itemsInCart:{type:Number,required:!0}}},h=p,f=(n("7f30"),n("2877")),m=Object(f["a"])(h,u,d,!1,null,"1cbcdf0d",null),g=m.exports,v=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("li",{staticClass:"block-header-item",class:{"block-header-item--has-desktop-dropdown":!e.areDropdownsHidden&&e.isShownOnDesktop,"block-header-item--has-mobile-dropdown":e.isShownOnMobile},style:e.computedStyles},[n("BlockHeaderItemContent",{staticClass:"block-header-item__item",attrs:{item:e.item,"aria-haspopup":e.item.hasDropdown,"aria-expanded":e.isShownOnDesktop||e.isShownOnMobile},on:{toggle:function(t){e.isShownOnMobile=!e.isShownOnMobile,e.isShownOnDesktop=!e.isShownOnDesktop},"navigation-item-click":function(t){return e.$emit("navigation-item-click",t)}},nativeOn:{mouseover:function(t){e.isShownOnDesktop=!0},mouseleave:function(t){e.isShownOnDesktop=!1}}}),!e.areDropdownsHidden&&e.item.hasDropdown?n("div",{staticClass:"block-header-item__dropdown-area",on:{mouseover:function(t){e.isShownOnDesktop=!0},mouseleave:function(t){e.isShownOnDesktop=!1}}},[n("ul",{staticClass:"block-header-item__dropdown"},e._l(e.item.subItems,(function(t){return n("BlockHeaderItem",e._g({key:t.id,attrs:{item:t}},e.$listeners))})),1)]):e._e()],1)},b=[],y=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:["item-content-wrapper",{"item-content-wrapper--active":e.item.isCurrent}]},[n("a",{directives:[{name:"qa",rawName:"v-qa",value:e.item.isCurrent?"navigationblock-page-active-"+e.item.name:"navigationblock-page-"+e.item.name,expression:"item.isCurrent ? `navigationblock-page-active-${item.name}` : `navigationblock-page-${item.name}`"}],staticClass:"item-content",attrs:{target:e.item.target,rel:e.item.rel,href:e.item.url},domProps:{textContent:e._s(e.item.name)},on:{click:e.handleClick}}),e.item.hasDropdown?n("div",{staticClass:"item-content__icon-container-wrapper"},[n("button",{staticClass:"item-content__icon-container",attrs:{label:"Expand dropdown"},on:{click:function(t){return e.$emit("toggle")}}},[n("svg",{staticClass:"item-content__icon",attrs:{width:"10",height:"7",viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[n("path",{attrs:{d:"M5 6.5L0.669873 0.5L9.33013 0.500001L5 6.5Z",fill:"currentColor"}})])])]):e._e()])},w=[],A={name:"BlockHeaderItemContent",props:{item:{type:Object,required:!0}},methods:{handleClick(e){this.$emit("navigation-item-click",{navigationItem:this.item,event:e,toggle:()=>this.$emit("toggle")})}}},k=A,S=(n("7799"),Object(f["a"])(k,y,w,!1,null,"556a7567",null)),C=S.exports,x={name:"BlockHeaderItem",components:{BlockHeaderItemContent:C},props:{item:{type:Object,required:!0},isDropdownItem:{type:Boolean,default:!1},dropdownBackgroundColor:{type:String,default:null},isDropdownBackgroundMobileTransparent:{type:Boolean,default:!1},areDropdownsHidden:{type:Boolean,default:!1}},data(){return{isShownOnDesktop:!1,isShownOnMobile:!1}},computed:{computedStyles:({dropdownBackgroundColor:e,isDropdownBackgroundMobileTransparent:t})=>({"--dropdown-background-color":e,"--m-dropdown-background-color":t?"transparent":"var(--contrastBackgroundColor)"})}},O=x,E=(n("6f94"),Object(f["a"])(O,v,b,!1,null,"6d15e1ba",null)),M=E.exports,B=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"block-header-logo",style:e.computedStyles},[n("img",{directives:[{name:"qa",rawName:"v-qa",value:"builder-siteheader-img-logo",expression:"'builder-siteheader-img-logo'"}],staticClass:"block-header-logo__image",attrs:{src:e.optimizedUrl,alt:"Logo"},on:{load:e.handleLogoImageLoad}})])},N=[],T=n("7853"),_={name:"BlockHeaderLogo",props:{url:{type:String,default:null},height:{type:String,default:null},heightMobile:{type:String,default:null},maxWidth:{type:String,default:null},maxWidthMobile:{type:String,default:null},objectPosition:{type:String,default:null},objectPositionMobile:{type:String,default:null},isOptimized:{type:Boolean,default:!1}},data(){return{optimizedHeight:null,optimizedHeightMobile:null}},computed:{baseComputedStyles:({height:e,heightMobile:t,maxWidth:n,maxWidthMobile:o,objectPosition:r,objectPositionMobile:i})=>({"--height":"".concat(e,"px"),"--m-height":"".concat(t,"px"),"--width":n,"--m-width":o,"--object-position":r,"--m-object-position":i}),optimizedComputedStyles:({baseComputedStyles:e,optimizedHeight:t,optimizedHeightMobile:n})=>t&&n?Object(i["a"])(Object(i["a"])({},e),{},{"--height":"".concat(t,"px"),"--m-height":"".concat(n,"px")}):null,computedStyles:({isOptimized:e,baseComputedStyles:t,optimizedComputedStyles:n})=>e?n:t,optimizedUrl:({isOptimized:e,maxWidth:t,url:n})=>{var o,r;if(!e)return n;const i=Number.parseInt(t,10);return Object(T["e"])(n,{width:(null!==(o=null===(r=window)||void 0===r?void 0:r.devicePixelRatio)&&void 0!==o?o:1)*i})}},methods:{handleLogoImageLoad(e){if(!this.isOptimized)return;const t=Number.parseInt(this.maxWidth,10),n=Number.parseInt(this.maxWidthMobile,10)||t,o=e.target.naturalWidth/e.target.naturalHeight;this.optimizedHeight=t/o,this.optimizedHeightMobile=n/o}}},I=_,R=(n("d2f9"),Object(f["a"])(I,B,N,!1,null,"cd5cf7a8",null)),P=R.exports,D=n("c2f0"),j=n("af85"),z=n("822d"),L={name:"BlockHeader",components:{ZyroHamburger:D["a"],BlockHeaderCart:g,BlockHeaderLogo:P,BlockHeaderItem:M,BlockBackground:z["default"]},props:{items:{type:Array,default:()=>[]},isOpen:{type:Boolean,default:!1},isSticky:{type:Boolean,default:!1},isTransparent:{type:Boolean,default:!1},isWithShadow:{type:Boolean,default:!1},height:{type:Number,default:null},isLogoVisible:{type:Boolean,default:!1},isCartVisible:{type:Boolean,default:!1},logoUrl:{type:String,default:null},cartText:{type:String,default:null},itemsInCart:{type:Number,default:0},logoPlacement:{type:String,default:null},logoPlacementMobile:{type:String,default:null},navigationPlacement:{type:String,default:null},navigationPlacementMobile:{type:String,default:null},areDropdownsHidden:{type:Boolean,default:!1},isDropdownBackgroundMobileTransparent:{type:Boolean,default:!1},isLogoOptimized:{type:Boolean,default:!1},background:{type:Object,default:null},cartIconSize:{type:String,default:null},logoMaxWidth:{type:String,default:null},logoHeight:{type:String,default:null},logoHeightMobile:{type:String,default:null},logoMaxWidthMobile:{type:String,default:null},logoObjectPosition:{type:String,default:null},logoObjectPositionMobile:{type:String,default:null},dropdownBackgroundColor:{type:String,default:null}},data(){return{headerResizeObserver:null,headerHeight:null}},computed:{headerBackground({background:e,isSticky:t,isWithShadow:n,isTransparent:o}){if(!o)return e;const r=t&&!n||!t;return r?{current:"color",color:"transparent"}:e},isLogoAndNavigationCentered:({logoPlacement:e,navigationPlacement:t})=>"center"===e&&"center"===t,isLogoAndNavigationCenteredMobile:({logoPlacementMobile:e,navigationPlacementMobile:t})=>"center"===e&&"center"===t,navigationGridRowCount:({isLogoVisible:e,isCartVisible:t})=>e&&t?3:2,computedStyles:({logoPlacement:e,navigationPlacement:t,logoPlacementMobile:n,navigationPlacementMobile:o,isCartVisible:r,isLogoVisible:i,navigationGridRowCount:s,getJustifyContent:a,getLogoImageObjectPosition:c,getLogoMarginPlacement:l,isTransparent:u})=>{const d="".concat(e,"-").concat(t),p="".concat(n,"-").concat(o),{templateColumns:h}=j["f"][d],f=r?"auto minmax(0, calc(var(--m-logo-width) + var(--space-between-menu) * 2)) 1fr":j["f"][p].mTemplateColumns,m=r||"center-center"===p?"calc(100% + var(--m-padding-top, var(--padding-top)))":"calc(var(--m-padding-top, var(--padding-top)) - 1px)";return{"--navigation-grid-template-columns":i?h:"1fr","--m-navigation-grid-template-columns":i?f:"1fr","--logo-grid-row":"".concat(j["f"][d].logoRow,"/").concat(s),"--m-logo-grid-row":"".concat(j["f"][p].logoRow,"/").concat(s),"--logo-grid-column":j["f"][d].logoColumn,"--m-logo-grid-column":j["f"][p].logoColumn,"--logo-justify-self":a(e),"--m-logo-justify-self":a(n),"--logo-image-object-position":c(e),"--m-logo-image-object-position":c(n),"--links-grid-row":"".concat(j["f"][d].menuRow,"/").concat(s),"--m-links-grid-row":"".concat(j["f"][p].menuRow,"/").concat(s),"--links-grid-column":i?j["f"][d].menuColumn:"1/2","--m-links-grid-column":i?j["f"][p].menuColumn:"1/2","--cart-grid-row":"".concat(j["f"][d].cartRow,"/").concat(s),"--cart-grid-column":i?j["f"][d].cartColumn:"2/2","--logo-spacing":l(),"--m-logo-spacing":l(!0),"--navigation-text-align":t,"--m-navigation-text-align":o,"--navigation-justify-self":a(t),"--m-navigation-justify-self":a(o),"--hamburgerMenuPositionTop":m,"--mobileBackgroundColor":u?"var(--contrastBackgroundColor)":"var(--background-color, var(--background-image))"}}},mounted(){this.$forceUpdate(),this.headerResizeObserver=new ResizeObserver(([{contentRect:e}])=>{const{height:t}=e;t!==this.height&&this.$emit("update-height",t)}),this.headerResizeObserver.observe(this.$refs.headerRef)},beforeDestroy(){this.headerResizeObserver.disconnect()},methods:{getJustifyContent(e){return j["c"][e]||j["c"].default},getLogoImageObjectPosition(e){return j["e"][e]||j["e"].default},getLogoMarginPlacement(e=!1){const t=e?this.isLogoAndNavigationCenteredMobile:this.isLogoAndNavigationCentered,n=e?this.logoPlacementMobile:this.logoPlacement;return e&&this.isCartVisible?j["g"].center:t?j["g"]["center-center"]:j["g"][n]}}},$=L,F=(n("5c67"),Object(f["a"])($,c,l,!1,null,"35025700",null)),V=F.exports,H=n("d456"),U={name:"BlockHeaderProviderBuilder",components:{BlockHeader:V},props:{data:{type:Object,required:!0},height:{type:Number,default:null}},setup(e){const{ecwidCartItemCount:t,openCart:n}=Object(H["a"])(),{computedStyles:o}=Object(a["a"])(e);return{ecwidCartItemCount:t,openCart:n,computedStyles:o}},data(){return{isOpen:!1}},computed:Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])({},Object(s["f"])("pages",["currentPageId"])),Object(s["d"])("gui",["isMobileMode"])),Object(s["d"])(["siteMeta"])),Object(s["d"])("onlineStore",["isSiteWithEcwid"])),Object(s["d"])("pages",["defaultPages","ecommercePages"])),Object(s["d"])("navigation",["items","itemsIds"])),{},{settings:({data:e})=>e.settings,styles:({settings:e})=>e.styles,navigationItems:({items:e,defaultPages:t,currentPageId:n,itemsIds:o})=>{const r=o=>{const s=e[o],{name:a,type:c}=s,l=c===j["h"],u=c===j["d"],d=c===j["b"];return Object(i["a"])(Object(i["a"])({},s),{},{name:l?t[o].name:a,id:o,isPage:l,isLink:u,isFolder:d,hasDropdown:s.subItems.length>0||s.isFolder,isCurrent:o===n,subItems:s.subItems.map(r)})};return o.map(r)},navigationPlacement:({settings:e})=>e.navigationPlacement,navigationPlacementMobile:({settings:e,navigationPlacement:t})=>e["m-navigationPlacement"]||t,logoPlacement:({settings:e})=>e.logoPlacement,logoPlacementMobile:({settings:e,logoPlacement:t})=>e["m-logoPlacement"]||t}),watch:{isMobileMode(e){e||(this.isOpen=e)}},methods:Object(i["a"])(Object(i["a"])({},Object(s["c"])("pages",["changePage"])),{},{handleChangePage(e){window.Ecwid&&window.Ecwid.openPage("category"),this.changePage({pageId:e}),this.isOpen=!1},handleCartClick(){const e=Object.keys(this.ecommercePages)[0];this.handleChangePage(e),window.Ecwid&&this.openCart()},handleLogoClick(){this.handleChangePage(this.siteMeta.homePageId)},handleNavigationItemClick({navigationItem:e,event:t,toggle:n}){e.isPage?this.handleChangePage(e.id):e.isFolder&&this.isMobileMode?n():e.isLink&&t.preventDefault()}})},W=U,q=Object(f["a"])(W,o,r,!1,null,null,null);t["default"]=q.exports},a979:function(e,t,n){"use strict";n("5b2e")},a9bc:function(e,t,n){},a9de:function(e,t,n){"use strict";n.d(t,"a",(function(){return o["b"]})),n.d(t,"b",(function(){return o["c"]})),n.d(t,"k",(function(){return o["e"]})),n.d(t,"r",(function(){return o["f"]})),n.d(t,"d",(function(){return l})),n.d(t,"l",(function(){return p})),n.d(t,"m",(function(){return c})),n.d(t,"o",(function(){return h["c"]})),n.d(t,"u",(function(){return h["e"]})),n.d(t,"c",(function(){return g})),n.d(t,"e",(function(){return b})),n.d(t,"f",(function(){return A})),n.d(t,"g",(function(){return y})),n.d(t,"h",(function(){return w})),n.d(t,"i",(function(){return k})),n.d(t,"j",(function(){return S})),n.d(t,"n",(function(){return x})),n.d(t,"p",(function(){return O})),n.d(t,"q",(function(){return M})),n.d(t,"s",(function(){return B})),n.d(t,"t",(function(){return N}));var o=n("0010"),r=n("0ac0"),i=n("304a");function s(e,t){return function(n,o){var s=n.selection,c=s.$from,l=s.$to,u=c.blockRange(l),d=!1,p=u;if(!u)return!1;if(u.depth>=2&&c.node(u.depth-1).type.compatibleContent(e)&&0==u.startIndex){if(0==c.index(u.depth-1))return!1;var h=n.doc.resolve(u.start-2);p=new i["NodeRange"](h,h,u.depth),u.endIndex=0;c--)a=i["Fragment"].from(n[c].type.create(n[c].attrs,a));e.step(new r["b"](t.start-(o?2:0),t.end,t.start,t.end,new i["Slice"](a,0,0),n.length,!0));for(var l=0,u=0;u0,p=s.depth-(d?1:2);p>=s.depth-3;p--)u=i["Fragment"].from(s.node(p).copy(u));u=u.append(i["Fragment"].from(e.createAndFill()));var h=t.tr.replace(s.before(d?null:-1),s.after(-3),new i["Slice"](u,d?3:2,2));h.setSelection(t.selection.constructor.near(h.doc.resolve(s.pos+(d?3:2)))),n(h.scrollIntoView())}return!0}var f=a.pos==s.end()?l.contentMatchAt(0).defaultType:null,m=t.tr.delete(s.pos,a.pos),g=f&&[null,{type:f}];return!!Object(r["g"])(m.doc,s.pos,2,g)&&(n&&n(m.split(s.pos,2,g).scrollIntoView()),!0)}}function l(e){return function(t,n){var o=t.selection,r=o.$from,i=o.$to,s=r.blockRange(i,(function(t){return t.childCount&&t.firstChild.type==e}));return!!s&&(!n||(r.node(s.depth-1).type==e?u(t,n,e,s):d(t,n,s)))}}function u(e,t,n,o){var s=e.tr,a=o.end,c=o.$to.end(o.depth);return al;c--)a-=s.child(c).nodeSize,o.delete(a-1,a+1);var u=o.doc.resolve(n.start),d=u.nodeAfter,p=0==n.startIndex,h=n.endIndex==s.childCount,f=u.node(-1),m=u.index(-1);if(!f.canReplace(m+(p?0:1),m+1,d.content.append(h?i["Fragment"].empty:i["Fragment"].from(s))))return!1;var g=u.pos,v=g+d.nodeSize;return o.step(new r["b"](g-(p?1:0),v+(h?1:0),g+1,v-1,new i["Slice"]((p?i["Fragment"].empty:i["Fragment"].from(s.copy(i["Fragment"].empty))).append(h?i["Fragment"].empty:i["Fragment"].from(s.copy(i["Fragment"].empty))),p?0:1,h?0:1),p?0:1)),t(o.scrollIntoView()),!0}function p(e){return function(t,n){var o=t.selection,s=o.$from,a=o.$to,c=s.blockRange(a,(function(t){return t.childCount&&t.firstChild.type==e}));if(!c)return!1;var l=c.startIndex;if(0==l)return!1;var u=c.parent,d=u.child(l-1);if(d.type!=e)return!1;if(n){var p=d.lastChild&&d.lastChild.type==u.type,h=i["Fragment"].from(p?e.create():null),f=new i["Slice"](i["Fragment"].from(e.create(null,i["Fragment"].from(u.type.create(null,h)))),p?3:1,0),m=c.start,g=c.end;n(t.tr.step(new r["b"](m-(p?3:1),g,m,g,f,1,!0)).scrollIntoView())}return!0}}var h=n("f95e"),f=n("5313"),m=n("a15f"); /*! * tiptap-commands v1.17.0 * (c) 2021 überdosis GbR (limited liability) * @license MIT */ function g(e=""){return(t,n)=>{const{$from:o}=t.selection,{pos:r}=o.pos;return n(t.tr.insertText(e,r)),!0}}function v(e,t,n){let o=[];return n.doc.nodesBetween(e,t,(e,t)=>{o=[...o,...e.marks.map(n=>({start:t,end:t+e.nodeSize,mark:n}))]}),o}function b(e,t,n){return new h["a"](e,(e,o,r,i)=>{const s=n instanceof Function?n(o):n,{tr:a}=e,c=o.length-1;let l=i,u=r;if(o[c]){const n=r+o[0].indexOf(o[c-1]),s=n+o[c-1].length-1,d=n+o[c-1].lastIndexOf(o[c]),p=d+o[c].length,h=v(r,i,e).filter(e=>{const{excluded:n}=e.mark.type;return n.find(e=>e.name===t.name)}).filter(e=>e.end>n);if(h.length)return!1;pn&&a.delete(n,d),u=n,l=u+o[c].length}return a.addMark(u,l,t.create(s)),a.removeStoredMark(t),a})}function y(e,t,n){return new h["a"](e,(e,o,r,i)=>{const s=n instanceof Function?n(o):n,{tr:a}=e;return o[0]&&a.replaceWith(r-1,i,t.create(s)),a})}function w(e,t,n){const o=r=>{const s=[];return r.forEach(r=>{if(r.isText){const{text:o}=r;let i,a=0;do{if(i=e.exec(o),i){const e=i.index,o=e+i[0].length,c=n instanceof Function?n(i[0]):n;e>0&&s.push(r.cut(a,e)),s.push(r.cut(e,o).mark(t.create(c).addToSet(r.marks))),a=o}}while(i);anew i["Slice"](o(e.content),e.openStart,e.openEnd)}})}function A(e,t,n){const o=(r,s)=>{const a=[];return r.forEach(r=>{if(r.isText){const{text:o,marks:i}=r;let c,l=0;const u=!!i.filter(e=>"link"===e.type.name)[0];while(!u&&null!==(c=e.exec(o)))if(s&&s.type.allowsMarkType(t)&&c[1]){const e=c.index,o=e+c[0].length,i=e+c[0].indexOf(c[1]),s=i+c[1].length,u=n instanceof Function?n(c):n;e>0&&a.push(r.cut(l,e)),a.push(r.cut(i,s).mark(t.create(u).addToSet(r.marks))),l=o}lnew i["Slice"](o(e.content),e.openStart,e.openEnd)}})}function k(e){return(t,n)=>{const{tr:o,selection:r}=t;let{from:i,to:s}=r;const{$from:a,empty:c}=r;if(c){const t=Object(m["c"])(a,e);i=t.from,s=t.to}return o.removeMark(i,s,e),n(o)}}function S(e=null,t,n={},o=i["Fragment"].empty){return(r,i)=>{const{$from:s,$to:a}=r.selection,c=s.index(),l=e?e.from:s.pos,u=e?e.to:a.pos;return!!s.parent.canReplaceWith(c,c,t)&&(i&&i(r.tr.replaceWith(l,u,t.create(n,o))),!0)}}function C(e,t,n=1,o){const r=e.resolve(t),i=r.depth-n,s=o&&o[o.length-1]||r.parent;if(i<0||r.parent.type.spec.isolating||!r.parent.canReplace(r.index(),r.parent.childCount)||!s.type.validContent(r.parent.content.cutByIndex(r.index(),r.parent.childCount)))return!1;for(let l=r.depth-1,u=n-2;l>i;l--,u--){const e=r.node(l),t=r.index(l);if(e.type.spec.isolating)return!1;let n=e.content.cutByIndex(t,e.childCount);const i=o&&o[u]||e;if(i!=e&&(n=n.replaceChild(0,i.type.create(i.attrs))),!e.canReplace(t+1,e.childCount))return!1}const a=r.indexAfter(i),c=o&&o[0];return r.node(i).canReplaceWith(a,a,c?c.type:r.node(i+1).type)}function x(e){return function(t,n){const{$from:o,$to:r,node:s}=t.selection;if(s&&s.isBlock||o.depth<2||!o.sameParent(r))return!1;const a=o.node(-1);if(a.type!=e)return!1;if(0==o.parent.content.size){if(2==o.depth||o.node(-3).type!=e||o.index(-2)!=o.node(-2).childCount-1)return!1;if(n){let r=i["Fragment"].empty;const s=o.index(-1)>0;for(let e=o.depth-(s?1:2);e>=o.depth-3;e--)r=i["Fragment"].from(o.node(e).copy(r));r=r.append(i["Fragment"].from(e.createAndFill()));const a=t.tr.replace(o.before(s?null:-1),o.after(-3),new i["Slice"](r,s?3:2,2));a.setSelection(t.selection.constructor.near(a.doc.resolve(o.pos+(s?3:2)))),n(a.scrollIntoView())}return!0}const c=r.pos==o.end()?a.contentMatchAt(o.indexAfter(-1)).defaultType:null,l=t.tr.delete(o.pos,r.pos);let u=c&&[{type:e},{type:c}];return u||(u=[{type:e},null]),!!C(l.doc,o.pos,2,u)&&(n&&n(l.split(o.pos,2,u).scrollIntoView()),!0)}}function O(e,t,n={}){return(r,i,s)=>{const a=Object(m["g"])(r,e,n);return a?Object(o["e"])(t)(r,i,s):Object(o["e"])(e,n)(r,i,s)}}function E(e,t){return e.type===t.nodes.bullet_list||e.type===t.nodes.ordered_list||e.type===t.nodes.todo_list}function M(e,t){return(n,o,r)=>{const{schema:i,selection:a}=n,{$from:c,$to:u}=a,d=c.blockRange(u);if(!d)return!1;const p=Object(m["a"])(e=>E(e,i))(a);if(d.depth>=1&&p&&d.depth-p.depth<=1){if(p.node.type===e)return l(t)(n,o,r);if(E(p.node,i)&&e.validContent(p.node.content)){const{tr:t}=n;return t.setNodeMarkup(p.pos,e),o&&o(t),!1}}return s(e)(n,o,r)}}function B(e,t={}){return(n,r,i)=>{const s=Object(m["g"])(n,e,t);return s?Object(o["d"])(n,r):Object(o["g"])(e,t)(n,r,i)}}function N(e,t){return(n,o)=>{const{tr:r,selection:i,doc:s}=n,{ranges:a,empty:c}=i;if(c){const{from:n,to:o}=Object(m["c"])(i.$from,e);s.rangeHasMark(n,o,e)&&r.removeMark(n,o,e),r.addMark(n,o,e.create(t))}else a.forEach(n=>{const{$to:o,$from:i}=n;s.rangeHasMark(i.pos,o.pos,e)&&r.removeMark(i.pos,o.pos,e),r.addMark(i.pos,o.pos,e.create(t))});return o(r)}}},a9f2:function(e,t,n){"use strict";n("487e")},aa85:function(e,t,n){"use strict";n("db09")},ab8d:function(e,t,n){},ac62:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAOCAYAAADNGCeJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABGSURBVHgB7cyxEQAQEETRZXShCC2IFKAsoUAk0Ily6OJcjPDCezObbPANaiJ8zFwQfXj+1To272YIw0KQxjSmMTGOR5BBB0agC+tWQgJ5AAAAAElFTkSuQmCC"},b5a7:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAOCAYAAADNGCeJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAD4SURBVHgBrZM9TsNAEIW/2ZiERHYQSEAXcQBKRMMBEAUtF4AuLSfgHBRUtFTcgooTUCJACKxY+XNm4jhFUiTrLfyaXe2+eW9mV09+ODTqwZOjRgSJSRzWfLWYQOchC7KtpDROc1p3I1xvVkUl2uhwpOxcTcp983qMJEb7fsjsvYFNhelrE/1yYWL6V8xWFMWPKbSXZ7v9IfrpyG4T9NuFd8ZEGD+3sKxL8pKW72apkF7uFd1tLiknwgPX03LN3yKkY7hjxcv3XUZnOYObLv/n+2T9mOgi99ERXwLciaIfKz85MOxXttH9CVgXWsAjtDSnRiy+pq6g2xyIHUcH67fHcwAAAABJRU5ErkJggg=="},b743:function(e,t,n){var o={"./AddEcommerceStoreDrawer.vue":["4449","chunk-697ac427"],"./AddElementDrawer.vue":["935a","chunk-24ad66c5"],"./AiWriterDrawer.vue":["2b95"],"./BlogDrawer.vue":["0b99","chunk-160f112e"],"./GlobalStylesDrawer.vue":["c2bf6","chunk-819878a6"],"./HelpAndResourcesDrawer.vue":["a107","chunk-149f7a4e"],"./ManageEcommerceStoreDrawer.vue":["fd8f","chunk-87ffa15c"],"./MultiPageDrawer.vue":["5a9e","chunk-2d0c0a73","chunk-15487612","chunk-92b20f58"],"./SinglePageImporterDrawer.vue":["1174","chunk-fb023c30"],"./UserStylesDrawer.vue":["a17c","chunk-2d0d3bf5","chunk-40148524","chunk-63fd8d29"],"./partials/blogDrawer/EmptyBlogDrawer.vue":["af01","chunk-dd62a1f0"],"./partials/globalStylesDrawer/GlobalStyles.vue":["454e","chunk-6b77b0fa"],"./partials/globalStylesDrawer/colors/Colors.vue":["6e7d","chunk-5f9e88de","chunk-379b5bd8"],"./partials/globalStylesDrawer/colors/MultipleColorSet.vue":["2be8","chunk-5f9e88de"],"./partials/globalStylesDrawer/controls/StyleCollapseControl.vue":["f59f","chunk-7f89110f"],"./partials/globalStylesDrawer/controls/StyleColorControl.vue":["668f","chunk-cd502676"],"./partials/globalStylesDrawer/controls/StylePropertyControl.vue":["39c5","chunk-f80a8480"],"./partials/globalStylesDrawer/controls/StyleSelectControl.vue":["ddab","chunk-34e35862"],"./partials/globalStylesDrawer/controls/StyleToggleControl.vue":["b925","chunk-2c88c5ec"],"./partials/globalStylesDrawer/controls/sections/BackgroundControl.vue":["2f1a","chunk-6b623183"],"./partials/globalStylesDrawer/controls/sections/BorderControl.vue":["482a","chunk-cc12083a"],"./partials/globalStylesDrawer/controls/sections/PaddingControl.vue":["a893","chunk-0b325988"],"./partials/globalStylesDrawer/controls/sections/ShadowControl.vue":["af96","chunk-ada5ce54"],"./partials/globalStylesDrawer/controls/sections/StateGroupControl.vue":["e299","chunk-034a20d4","chunk-4a6ce805"],"./partials/globalStylesDrawer/controls/sections/TextControl.vue":["2aeb","chunk-220ea667"],"./partials/globalStylesDrawer/controls/sections/TransitionControl.vue":["9630","chunk-8d40515e"],"./partials/globalStylesDrawer/elements/Elements.vue":["baa2","chunk-bbe5d21e"],"./partials/globalStylesDrawer/elements/type/ButtonStyles.vue":["172c","chunk-220ea667","chunk-034a20d4","chunk-0e49f2d2"],"./partials/globalStylesDrawer/typography/AllStyles.vue":["54a1","chunk-108b9636"],"./partials/globalStylesDrawer/typography/Fonts.vue":["ab44","chunk-1fbde560"],"./partials/globalStylesDrawer/typography/Typography.vue":["9def","chunk-220ea667","chunk-41cf2427"],"./partials/stylesDrawer/Misc/EditStyleSeparator.vue":["1181","chunk-42d14f58"],"./partials/stylesDrawer/Misc/Edited.vue":["06cb","chunk-68eef516"],"./partials/stylesDrawer/UserStyles.vue":["c59b","chunk-51dc5dc0"],"./partials/stylesDrawer/buttons/ButtonSetsLibrary.vue":["4c68","chunk-e1f51954"],"./partials/stylesDrawer/colors/ColorPaletteEdit.vue":["0cbb","chunk-c6ee3a40"],"./partials/stylesDrawer/colors/ColorSetsLibrary.vue":["f715","chunk-2d0d3bf5","chunk-40148524","chunk-5cff4386"],"./partials/stylesDrawer/typograpghy/TypographyCategorySelect.vue":["e49b","chunk-2d0d3bf5","chunk-28dad70e"],"./partials/stylesDrawer/typograpghy/TypographyStyleList.vue":["b7cc","chunk-2d0d3bf5","chunk-08891ed1"],"./partials/stylesDrawer/typograpghy/TypographyTypeSelect.vue":["be8c","chunk-2d0d3bf5","chunk-f1648082","chunk-79d99c29","chunk-75036211"],"./partials/stylesDrawer/typograpghy/controls/TypographyControls.vue":["938d","chunk-f1648082"],"./partials/stylesMisc/TextBoxPreview.vue":["196e","chunk-710dca82"]};function r(e){if(!n.o(o,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=o[e],r=t[0];return Promise.all(t.slice(1).map(n.e)).then((function(){return n(r)}))}r.keys=function(){return Object.keys(o)},r.id="b743",e.exports=r},b8f5:function(e,t,n){"use strict";var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ZyroTooltip",{attrs:{"content-position":"fixed","toggle-event":"hover"},scopedSlots:e._u([{key:"trigger",fn:function(){return[n("ZyroButton",{directives:[{name:"qa",rawName:"v-qa",value:"builder-header-btn-"+(e.canSave?"save":"saved"),expression:"`builder-header-btn-${!canSave ? 'saved' : 'save'}`"}],staticClass:"save-tooltip-trigger",attrs:{id:"saveWebsiteButton",theme:"header",color:"white",disabled:!e.canSave},on:{click:e.handleSaveClick}},[n("div",{staticClass:"save-icon",class:{"is-hidden":e.canSave,"is-saved":!e.canSave,"is-saving":e.isSaving}},[n("div",{staticClass:"save-icon__stroke save-icon__stroke--grey"}),n("div",{staticClass:"save-icon__stroke save-icon__stroke--blue"}),n("div",{staticClass:"save-icon__check"})]),n("div",{staticClass:"save-text"},[e._v(" "+e._s(e.buttonLabel)+" ")])])]},proxy:!0}])},[e.user?n("div",{directives:[{name:"qa",rawName:"v-qa",value:"builder-header-save-button",expression:"'builder-header-save-button'"}],staticClass:"save-tooltip"},[n("div",{staticClass:"save-tooltip__title z-subheading"},[e._v(" "+e._s(e.$t("builder.saveButtonPopup.user.title"))+" ")]),n("div",{staticClass:"save-tooltip__description z-body-small"},[n("ZyroSvg",{attrs:{name:"auto-save"}})],1),n("div",{staticClass:"save-tooltip__description z-body-small"},[e._v(" "+e._s(e.$t("builder.saveButtonPopup.user.description"))+" ")])]):n("div",{directives:[{name:"qa",rawName:"v-qa",value:"builder-header-save-button-no-user",expression:"'builder-header-save-button-no-user'"}],staticClass:"save-tooltip"},[n("div",{staticClass:"save-tooltip__title z-subheading"},[e._v(" "+e._s(e.$t("common.saveYourChanges"))+" ")]),n("ZyroSvg",{staticClass:"save-tooltip__image",attrs:{name:"dont-leave"}}),n("div",{staticClass:"save-tooltip__description z-body-small"},[e._v(" "+e._s(e.$t("builder.saveButtonPopup.noUser.description"))+" ")]),n("ZyroButton",{staticClass:"save-tooltip__button",attrs:{theme:"primary"},on:{click:e.redirectToWWWSignUp}},[e._v(" "+e._s(e.$t("common.joinZyro"))+" ")]),n("ZyroButton",{staticClass:"save-tooltip__button",attrs:{theme:"outline"},on:{click:e.redirectToWWWSignIn}},[e._v(" "+e._s(e.$t("common.signIn"))+" ")])],1)])},r=[],i=n("5530"),s=n("2f62"),a=n("119c"),c=n("d363"),l={setup(){const{redirectToWWWSignUp:e,redirectToWWWSignIn:t}=Object(c["a"])();return{redirectToWWWSignUp:e,redirectToWWWSignIn:t}},computed:Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])({},Object(s["f"])("user",["user"])),Object(s["f"])("saving",["isSaving"])),Object(s["d"])("saving",["canSave"])),{},{buttonLabel(){return this.isSaving?a["a"].t("common.saving"):this.canSave?a["a"].t("common.save"):a["a"].t("common.saved")}}),created(){document.addEventListener("keydown",this.handleKeydown,!1)},beforeDestroy(){document.removeEventListener("keydown",this.handleKeydown)},methods:Object(i["a"])(Object(i["a"])({},Object(s["c"])("saving",["saveWebsite"])),{},{handleSaveClick(){this.canSave&&this.saveWebsite()},handleKeydown(e){(e.ctrlKey||e.metaKey)&&"s"===e.key&&this.canSave&&(e.preventDefault(),this.saveWebsite())}})},u=l,d=(n("c580"),n("2877")),p=Object(d["a"])(u,o,r,!1,null,"625e9d99",null);t["a"]=p.exports},b998:function(e,t,n){},c0a6:function(e,t,n){"use strict";n("645c")},c2f0:function(e,t,n){"use strict";var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("button",e._g({staticClass:"burger",class:{"burger--open":e.isOpen},style:e.computedStyles,attrs:{type:"button",title:e.title}},e.$listeners),[n("span",{staticClass:"burger__bun"}),n("span",{staticClass:"burger__meat"}),n("span",{staticClass:"burger__bun"})])},r=[],i={props:{title:{type:String,default:"Menu"},isOpen:{type:Boolean,required:!0},color:{type:String,default:"var(--nav-link-color)"}},computed:{computedStyles(){return{"--burger-color":this.color}}}},s=i,a=(n("a979"),n("2877")),c=Object(a["a"])(s,o,r,!1,null,"4610f8b1",null);t["a"]=c.exports},c580:function(e,t,n){"use strict";n("6237")},c60b:function(e,t,n){"use strict";n("fc44")},c765:function(e,t,n){},c7d1:function(e,t,n){"use strict";n.d(t,"a",(function(){return re}));var o=n("5530"),r=(n("ddb0"),n("a6f4")),i=n("cd42"),s=n("a9de"),a=(n("3ce4"),n("576a"),n("986d"),n("304a"),n("5313")),c=n("55be"),l=(n("a15f"),n("0ac0"));new a["PluginKey"]("collab");var u=200,d=function(){};d.prototype.append=function(e){return e.length?(e=d.from(e),!this.length&&e||e.length=t?d.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},d.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},d.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},d.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var o=[];return this.forEach((function(t,n){return o.push(e(t,n))}),t,n),o},d.from=function(e){return e instanceof d?e:e&&e.length?new p(e):d.empty};var p=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,o){for(var r=t;r=n;r--)if(!1===e(this.values[r],o+r))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=u)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=u)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(d);d.empty=new p([]);var h=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return er&&!1===this.right.forEachInner(e,Math.max(t-r,0),Math.min(this.length,n)-r,o+r))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,n,o){var r=this.left.length;return!(t>r&&!1===this.right.forEachInvertedInner(e,t-r,Math.max(n,r)-r,o+r))&&(!(n=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(d),f=d,m=f,g=500,v=function(e,t){this.items=e,this.eventCount=t};function b(e,t){var n;return e.forEach((function(e,o){if(e.selection&&0==t--)return n=o,!1})),e.slice(n)}v.prototype.popEvent=function(e,t){var n=this;if(0==this.eventCount)return null;for(var o,r,i=this.items.length;;i--){var s=this.items.get(i-1);if(s.selection){--i;break}}t&&(o=this.remapping(i,this.items.length),r=o.maps.length);var a,c,l=e.tr,u=[],d=[];return this.items.forEach((function(e,t){if(!e.step)return o||(o=n.remapping(i,t+1),r=o.maps.length),r--,void d.push(e);if(o){d.push(new y(e.map));var s,p=e.step.map(o.slice(r));p&&l.maybeStep(p).doc&&(s=l.mapping.maps[l.mapping.maps.length-1],u.push(new y(s,null,null,u.length+d.length))),r--,s&&o.appendMap(s,r)}else l.maybeStep(e.step);return e.selection?(a=o?e.selection.map(o.slice(r)):e.selection,c=new v(n.items.slice(0,i).append(d.reverse().concat(u)),n.eventCount-1),!1):void 0}),this.items.length,0),{remaining:c,transform:l,selection:a}},v.prototype.addTransform=function(e,t,n,o){for(var r=[],i=this.eventCount,s=this.items,a=!o&&s.length?s.get(s.length-1):null,c=0;cA&&(s=b(s,p),i-=p),new v(s.append(r),i)},v.prototype.remapping=function(e,t){var n=new l["a"];return this.items.forEach((function(t,o){var r=null!=t.mirrorOffset&&o-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:null;n.appendMap(t.map,r)}),e,t),n},v.prototype.addMaps=function(e){return 0==this.eventCount?this:new v(this.items.append(e.map((function(e){return new y(e)}))),this.eventCount)},v.prototype.rebased=function(e,t){if(!this.eventCount)return this;var n=[],o=Math.max(0,this.items.length-t),r=e.mapping,i=e.steps.length,s=this.eventCount;this.items.forEach((function(e){e.selection&&s--}),o);var a=t;this.items.forEach((function(t){var o=r.getMirror(--a);if(null!=o){i=Math.min(i,o);var c=r.maps[o];if(t.step){var l=e.steps[o].invert(e.docs[o]),u=t.selection&&t.selection.map(r.slice(a+1,o));u&&s++,n.push(new y(c,l,u))}else n.push(new y(c))}}),o);for(var c=[],l=t;lg&&(d=d.compress(this.items.length-n.length)),d},v.prototype.emptyItemCount=function(){var e=0;return this.items.forEach((function(t){t.step||e++})),e},v.prototype.compress=function(e){void 0===e&&(e=this.items.length);var t=this.remapping(0,e),n=t.maps.length,o=[],r=0;return this.items.forEach((function(i,s){if(s>=e)o.push(i),i.selection&&r++;else if(i.step){var a=i.step.map(t.slice(n)),c=a&&a.getMap();if(n--,c&&t.appendMap(c,n),a){var l=i.selection&&i.selection.map(t.slice(n));l&&r++;var u,d=new y(c.invert(),a,l),p=o.length-1;(u=o.length&&o[p].merge(d))?o[p]=u:o.push(d)}}else i.map&&n--}),this.items.length,0),new v(m.from(o.reverse()),r)},v.empty=new v(m.empty,0);var y=function(e,t,n,o){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=o};y.prototype.merge=function(e){if(this.step&&e.step&&!e.selection){var t=e.step.merge(this.step);if(t)return new y(t.getMap().invert(),t,this.selection)}};var w=function(e,t,n,o){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=o},A=20;function k(e,t,n,o){var r,i=n.getMeta(N);if(i)return i.historyState;n.getMeta(T)&&(e=new w(e.done,e.undone,null,0));var s=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(s&&s.getMeta(N))return s.getMeta(N).redo?new w(e.done.addTransform(n,null,o,B(t)),e.undone,C(n.mapping.maps[n.steps.length-1]),e.prevTime):new w(e.done,e.undone.addTransform(n,null,o,B(t)),null,e.prevTime);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(r=n.getMeta("rebased"))?new w(e.done.rebased(n,r),e.undone.rebased(n,r),x(e.prevRanges,n.mapping),e.prevTime):new w(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),x(e.prevRanges,n.mapping),e.prevTime);var a=0==e.prevTime||!s&&(e.prevTime<(n.time||0)-o.newGroupDelay||!S(n,e.prevRanges)),c=s?x(e.prevRanges,n.mapping):C(n.mapping.maps[n.steps.length-1]);return new w(e.done.addTransform(n,a?t.selection.getBookmark():null,o,B(t)),v.empty,c,n.time)}function S(e,t){if(!t)return!1;if(!e.docChanged)return!0;var n=!1;return e.mapping.maps[0].forEach((function(e,o){for(var r=0;r=t[r]&&(n=!0)})),n}function C(e){var t=[];return e.forEach((function(e,n,o,r){return t.push(o,r)})),t}function x(e,t){if(!e)return null;for(var n=[],o=0;o["br"]}}commands({type:e}){return()=>Object(s["a"])(s["b"],(t,n)=>(n(t.tr.replaceSelectionWith(e.create()).scrollIntoView()),!0))}keys({type:e}){const t=Object(s["a"])(s["b"],(t,n)=>(n(t.tr.replaceSelectionWith(e.create()).scrollIntoView()),!0));return{"Mod-Enter":t,"Shift-Enter":t}}}i["g"];i["g"];i["g"];i["g"];i["g"];i["g"];Object(c["tableNodes"])({tableGroup:"block",cellContent:"block+",cellAttributes:{background:{default:null,getFromDOM(e){return e.style.backgroundColor||null},setDOMAttr(e,t){if(e){const n={style:"".concat(t.style||"","background-color: ").concat(e,";")};Object.assign(t,n)}}}}});i["g"];i["g"];i["g"];i["g"];i["g"];i["g"];class z extends i["f"]{get name(){return"bold"}get schema(){return{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM:()=>["strong",0]}}keys({type:e}){return{"Mod-b":Object(s["r"])(e)}}commands({type:e}){return()=>Object(s["r"])(e)}inputRules({type:e}){return[Object(s["e"])(/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,e)]}pasteRules({type:e}){return[Object(s["f"])(/(?:\*\*|__)([^*_]+)(?:\*\*|__)/g,e)]}}i["f"];class L extends i["f"]{get name(){return"italic"}get schema(){return{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"}],toDOM:()=>["em",0]}}keys({type:e}){return{"Mod-i":Object(s["r"])(e)}}commands({type:e}){return()=>Object(s["r"])(e)}inputRules({type:e}){return[Object(s["e"])(/(?:^|[^_])(_([^_]+)_)$/,e),Object(s["e"])(/(?:^|[^*])(\*([^*]+)\*)$/,e)]}pasteRules({type:e}){return[Object(s["f"])(/_([^_]+)_/g,e),Object(s["f"])(/\*([^*]+)\*/g,e)]}}i["f"];i["f"];class $ extends i["f"]{get name(){return"underline"}get schema(){return{parseDOM:[{tag:"u"},{style:"text-decoration",getAttrs:e=>"underline"===e}],toDOM:()=>["u",0]}}keys({type:e}){return{"Mod-u":Object(s["r"])(e)}}commands({type:e}){return()=>Object(s["r"])(e)}}i["e"];i["e"];class F extends i["e"]{get name(){return"history"}get defaultOptions(){return{depth:"",newGroupDelay:""}}keys(){const e={"Mod-z":I,"Mod-y":R,"Shift-Mod-z":R,"Mod-я":I,"Shift-Mod-я":R};return e}get plugins(){return[_({depth:this.options.depth,newGroupDelay:this.options.newGroupDelay})]}commands(){return{undo:()=>I,redo:()=>R,undoDepth:()=>P,redoDepth:()=>D}}}i["e"];i["e"];i["e"];var V=n("2b0e"),H=n("81fb");class U extends i["f"]{get name(){return H["c"]}get schema(){return{attrs:{color:{default:""}},parseDOM:[{style:"color",getAttrs:e=>({color:e})}],toDOM:({attrs:{color:e}})=>["span",{style:"color: ".concat(e)},0]}}commands({type:e}){return t=>Object(s["t"])(e,t)}}class W extends i["f"]{get name(){return H["i"]}get defaultOptions(){return{letterCases:H["h"]}}get schema(){return{attrs:{letterCase:{default:""}},parseDOM:this.options.letterCases.map(e=>({style:"text-transform=".concat(e),attrs:{letterCase:e}})),toDOM:e=>["span",{style:"text-transform: ".concat(e.attrs.letterCase)},0]}}commands({type:e}){return t=>t.letterCase?Object(s["t"])(e,t):Object(s["i"])(e)}}class q extends i["f"]{get name(){return H["j"]}get schema(){return{attrs:{href:{default:null},target:{default:null},rel:{default:null},internalLink:{default:null},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:e=>({href:e.getAttribute("href"),target:e.getAttribute("target"),rel:e.getAttribute("rel"),title:e.getAttribute("title"),internalLink:e.getAttribute("data-internal-link")})}],toDOM:({attrs:{href:e,target:t,rel:n,title:o,internalLink:r}})=>["a",{href:e,target:t,rel:n,title:o,"data-internal-link":r},0]}}commands({type:e}){return t=>t.href?Object(s["t"])(e,t):Object(s["i"])(e)}pasteRules({type:e}){return[Object(s["h"])(/https?:\/\/(www\.)?[\w#%+.:=@~-]{1,256}\.[a-z]{2,}\b([\w#%&+,./:=?@~-]*)/gi,e,e=>({href:e}))]}}n("13d5"),n("498a");const J=e=>{if(!e)return"";const t=e.split(";").filter(e=>H["a"].some(t=>{const n=e.split(":")[0].trim();return n===t}));return"".concat(t.join(";"),";")},K=3,G=[1,2,3,4,5,6].map(e=>({level:e,tag:"h".concat(e),defaultClassName:"h-".concat(e)})),Y=Object.keys(H["n"]).reduce((e,t)=>[...e,...G.map(e=>Object(o["a"])(Object(o["a"])({},e),{},{className:t}))],[]);class Z extends i["g"]{get name(){return H["f"]}get schema(){return{attrs:{className:{default:H["d"]},style:{default:null},level:{default:K},tag:{default:H["e"]}},content:"inline*",group:"block",defining:!0,draggable:!1,parseDOM:[...Y.map(({tag:e,className:t})=>({tag:"".concat(e,".").concat(t),getAttrs:n=>({className:t,style:n.getAttribute("style"),tag:e})})),...Y.map(({tag:e,defaultClassName:t})=>({tag:e,getAttrs:n=>({className:t,style:n.getAttribute("style"),tag:e})}))],toDOM:({attrs:{className:e,style:t,tag:n}})=>[n,{class:e,style:J(t)},0]}}commands({type:e,schema:t}){return n=>Object(s["p"])(e,t.nodes.paragraph,n)}inputRules({type:e}){return Y.map(({level:t,tag:n})=>Object(s["o"])(new RegExp("^(#{1,".concat(t,"})\\s$")),e,()=>({tag:n})))}}class Q extends i["g"]{get name(){return H["k"]}get schema(){return{attrs:{className:{default:H["b"]},style:{default:null}},content:"inline*",group:"block",draggable:!1,parseDOM:[...Object.keys(H["n"]).map(e=>({tag:"".concat(H["m"],".").concat(e),getAttrs:t=>({className:e,style:t.getAttribute("style")})})),{tag:H["m"],getAttrs:e=>({className:H["b"],style:e.getAttribute("style")})}],toDOM:({attrs:{className:e,style:t}})=>[H["m"],{class:e,styles:J(t)},0]}}commands({type:e,schema:t}){return n=>Object(s["p"])(e,t.nodes.paragraph,n)}}V["default"].use(r["b"]);const X={useBuiltInExtensions:!1,extensions:[new i["a"],new i["j"],new F,new z,new L,new j,new Q,new Z,new U,new q,new W,new $]},ee=Object(r["i"])(new Map),te=Object(r["i"])(null),ne=Object(r["a"])(()=>ee.value.get(te.value)||null),oe=Object(r["i"])(!1),re=()=>{var e,t,n;const{commit:s}=null!==(e=null===(t=Object(r["c"])())||void 0===t||null===(n=t.proxy)||void 0===n?void 0:n.$store)&&void 0!==e?e:{},a=Object(r["i"])(null),c=Object(r["a"])(()=>ee.value.get(a.value)),l=(e,t)=>{if(!ee.value.has(e)){const n=new i["b"](Object(o["a"])(Object(o["a"])({},X),{},{content:t,editable:!1}));ee.value.set(e,n)}a.value=e},u=()=>{c.value.setOptions({editable:!0}),te.value=a.value,oe.value=!0},d=()=>{ne.value.setOptions({editable:!1}),te.value=null,oe.value=!1},p=e=>{s("setElementData",{elementId:e,data:{content:ne.value.getHTML()}})},h=()=>{const e=c.value.state.doc.content.size-1;c.value.setSelection(e,e)},f=e=>{ne.value.setContent("".concat(ne.value.getHTML()).concat(e))};return{editor:Object(r["a"])(()=>ne.value),localEditor:Object(r["a"])(()=>c.value),isTextEditMode:Object(r["a"])(()=>oe.value),setCurrentEditor:u,createLocalEditor:l,unsetCurrentEditor:d,saveChanges:p,setCaretPositionToEnd:h,insertHTMLToEnd:f}}},cc1e:function(e,t,n){},ccf8:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAOCAYAAADNGCeJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACwSURBVHgBzZO7DgFREIb/OUZcE7YQOg0JPT2PJNkH8QhbKjyIxHYSokLHbhQSB3E5x9LvqabYr5hmJnP9h/z5zkIASwgUBMluMh60q5CAFYFsQlqAeT1w2S+gT2t4nTEqrb4rX8Aur462iMMp+LbC+R6hUPfBxfRJnDujv7VQTDCfJ6x5u8Lh7Kzc7KExnEAfN/C6I+RLNTiLz5axiGhzigIOD1dIkHxAlkWL37lksF/GXzHj/2NzZwAAAABJRU5ErkJggg=="},ccfe:function(e,t,n){"use strict";n("cc1e")},cd42:function(e,t,n){"use strict";n.d(t,"h",(function(){return o["Plugin"]})),n.d(t,"i",(function(){return o["PluginKey"]})),n.d(t,"a",(function(){return I})),n.d(t,"b",(function(){return j})),n.d(t,"c",(function(){return z})),n.d(t,"d",(function(){return U})),n.d(t,"e",(function(){return E})),n.d(t,"f",(function(){return N})),n.d(t,"g",(function(){return _})),n.d(t,"j",(function(){return P}));var o=n("5313"),r=n("576a"),i=n("304a"),s=n("0ac0");function a(e){return void 0===e&&(e={}),new o["Plugin"]({view:function(t){return new c(t,e)}})}var c=function(e,t){var n=this;this.editorView=e,this.width=t.width||1,this.color=t.color||"black",this.class=t.class,this.cursorPos=null,this.element=null,this.timeout=null,this.handlers=["dragover","dragend","drop","dragleave"].map((function(t){var o=function(e){return n[t](e)};return e.dom.addEventListener(t,o),{name:t,handler:o}}))};c.prototype.destroy=function(){var e=this;this.handlers.forEach((function(t){var n=t.name,o=t.handler;return e.editorView.dom.removeEventListener(n,o)}))},c.prototype.update=function(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&this.updateOverlay()},c.prototype.setCursor=function(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())},c.prototype.updateOverlay=function(){var e,t=this.editorView.state.doc.resolve(this.cursorPos);if(!t.parent.inlineContent){var n=t.nodeBefore,o=t.nodeAfter;if(n||o){var r=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0)).getBoundingClientRect(),i=n?r.bottom:r.top;n&&o&&(i=(i+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),e={left:r.left,right:r.right,top:i-this.width/2,bottom:i+this.width/2}}}if(!e){var s=this.editorView.coordsAtPos(this.cursorPos);e={left:s.left-this.width/2,right:s.left+this.width/2,top:s.top,bottom:s.bottom}}var a=this.editorView.dom.offsetParent;this.element||(this.element=a.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color);var c=!a||a==document.body&&"static"==getComputedStyle(a).position?{left:-pageXOffset,top:-pageYOffset}:a.getBoundingClientRect();this.element.style.left=e.left-c.left+"px",this.element.style.top=e.top-c.top+"px",this.element.style.width=e.right-e.left+"px",this.element.style.height=e.bottom-e.top+"px"},c.prototype.scheduleRemoval=function(e){var t=this;clearTimeout(this.timeout),this.timeout=setTimeout((function(){return t.setCursor(null)}),e)},c.prototype.dragover=function(e){if(this.editorView.editable){var t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY});if(t){var n=t.pos;this.editorView.dragging&&this.editorView.dragging.slice&&(n=Object(s["h"])(this.editorView.state.doc,n,this.editorView.dragging.slice),null==n&&(n=t.pos)),this.setCursor(n),this.scheduleRemoval(5e3)}}},c.prototype.dragend=function(){this.scheduleRemoval(20)},c.prototype.drop=function(){this.scheduleRemoval(20)},c.prototype.dragleave=function(e){e.target!=this.editorView.dom&&this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)};var l=n("7f06"),u=function(e){function t(t){e.call(this,t,t)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.map=function(n,o){var r=n.resolve(o.map(this.head));return t.valid(r)?new t(r):e.near(r)},t.prototype.content=function(){return i["Slice"].empty},t.prototype.eq=function(e){return e instanceof t&&e.head==this.head},t.prototype.toJSON=function(){return{type:"gapcursor",pos:this.head}},t.fromJSON=function(e,n){if("number"!=typeof n.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new t(e.resolve(n.pos))},t.prototype.getBookmark=function(){return new d(this.anchor)},t.valid=function(e){var t=e.parent;if(t.isTextblock||!p(e)||!h(e))return!1;var n=t.type.spec.allowGapCursor;if(null!=n)return n;var o=t.contentMatchAt(e.index()).defaultType;return o&&o.isTextblock},t.findFrom=function(e,n,r){e:for(;;){if(!r&&t.valid(e))return e;for(var i=e.pos,s=null,a=e.depth;;a--){var c=e.node(a);if(n>0?e.indexAfter(a)0){s=c.child(n>0?e.indexAfter(a):e.index(a)-1);break}if(0==a)return null;i+=n;var l=e.doc.resolve(i);if(t.valid(l))return l}for(;;){var u=n>0?s.firstChild:s.lastChild;if(!u){if(s.isAtom&&!s.isText&&!o["NodeSelection"].isSelectable(s)){e=e.doc.resolve(i+s.nodeSize*n),r=!1;continue e}break}s=u,i+=n;var d=e.doc.resolve(i);if(t.valid(d))return d}return null}},t}(o["Selection"]);u.prototype.visible=!1,o["Selection"].jsonID("gapcursor",u);var d=function(e){this.pos=e};function p(e){for(var t=e.depth;t>=0;t--){var n=e.index(t);if(0!=n)for(var o=e.node(t).child(n-1);;o=o.lastChild){if(0==o.childCount&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function h(e){for(var t=e.depth;t>=0;t--){var n=e.indexAfter(t),o=e.node(t);if(n!=o.childCount)for(var r=o.child(n);;r=r.firstChild){if(0==r.childCount&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}}return!0}d.prototype.map=function(e){return new d(e.map(this.pos))},d.prototype.resolve=function(e){var t=e.resolve(this.pos);return u.valid(t)?new u(t):o["Selection"].near(t)};var f=function(){return new o["Plugin"]({props:{decorations:b,createSelectionBetween:function(e,t,n){if(t.pos==n.pos&&u.valid(n))return new u(n)},handleClick:v,handleKeyDown:m}})},m=Object(l["a"])({ArrowLeft:g("horiz",-1),ArrowRight:g("horiz",1),ArrowUp:g("vert",-1),ArrowDown:g("vert",1)});function g(e,t){var n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,i){var s=e.selection,a=t>0?s.$to:s.$from,c=s.empty;if(s instanceof o["TextSelection"]){if(!i.endOfTextblock(n)||0==a.depth)return!1;c=!1,a=e.doc.resolve(t>0?a.after():a.before())}var l=u.findFrom(a,t,c);return!!l&&(r&&r(e.tr.setSelection(new u(l))),!0)}}function v(e,t,n){if(!e.editable)return!1;var r=e.state.doc.resolve(t);if(!u.valid(r))return!1;var i=e.posAtCoords({left:n.clientX,top:n.clientY}),s=i.inside;return!(s>-1&&o["NodeSelection"].isSelectable(e.state.doc.nodeAt(s)))&&(e.dispatch(e.state.tr.setSelection(new u(r))),!0)}function b(e){if(!(e.selection instanceof u))return null;var t=document.createElement("div");return t.className="ProseMirror-gapcursor",r["b"].create(e.doc,[r["a"].widget(e.selection.head,t,{key:"gapcursor"})])}var y=n("0010"),w=n("f95e"),A=n("a15f"),k=n("2b0e"),S=n("a9de"); /*! * tiptap v1.30.0 * (c) 2021 überdosis GbR (limited liability) * @license MIT */ function C(e){return e.replace(/(?:^\w|[A-Z]|\b\w)/g,(e,t)=>0===t?e.toLowerCase():e.toUpperCase()).replace(/\s+/g,"")}class x{constructor(e,{editor:t,extension:n,parent:o,node:r,view:i,decorations:s,getPos:a}){this.component=e,this.editor=t,this.extension=n,this.parent=o,this.node=r,this.view=i,this.decorations=s,this.isNode=!!this.node.marks,this.isMark=!this.isNode,this.getPos=this.isMark?this.getMarkPos:a,this.captureEvents=!0,this.dom=this.createDOM(),this.contentDOM=this.vm.$refs.content}createDOM(){const e=k["default"].extend(this.component),t={editor:this.editor,node:this.node,view:this.view,getPos:()=>this.getPos(),decorations:this.decorations,selected:!1,options:this.extension.options,updateAttrs:e=>this.updateAttrs(e)};return"function"===typeof this.extension.setSelection&&(this.setSelection=this.extension.setSelection),"function"===typeof this.extension.update&&(this.update=this.extension.update),this.vm=new e({parent:this.parent,propsData:t}).$mount(),this.vm.$el}update(e,t){return e.type===this.node.type&&(e===this.node&&this.decorations===t||(this.node=e,this.decorations=t,this.updateComponentProps({node:e,decorations:t})),!0)}updateComponentProps(e){if(!this.vm._props)return;const t=k["default"].config.silent;k["default"].config.silent=!0,Object.entries(e).forEach(([e,t])=>{this.vm._props[e]=t}),k["default"].config.silent=t}updateAttrs(e){if(!this.view.editable)return;const{state:t}=this.view,{type:n}=this.node,o=this.getPos(),r={...this.node.attrs,...e},i=this.isMark?t.tr.removeMark(o.from,o.to,n).addMark(o.from,o.to,n.create(r)):t.tr.setNodeMarkup(o,null,r);this.view.dispatch(i)}ignoreMutation(e){return"selection"!==e.type&&(!this.contentDOM||!this.contentDOM.contains(e.target))}stopEvent(e){if("function"===typeof this.extension.stopEvent)return this.extension.stopEvent(e);const t=!!this.extension.schema.draggable;if(t&&"mousedown"===e.type){const t=e.target.closest&&e.target.closest("[data-drag-handle]"),n=t&&(this.dom===t||this.dom.contains(t));n&&(this.captureEvents=!1,document.addEventListener("dragend",()=>{this.captureEvents=!0},{once:!0}))}const n="copy"===e.type,o="paste"===e.type,r="cut"===e.type,i=e.type.startsWith("drag")||"drop"===e.type;return!(t&&i||n||o||r)&&this.captureEvents}selectNode(){this.updateComponentProps({selected:!0})}deselectNode(){this.updateComponentProps({selected:!1})}getMarkPos(){const e=this.view.posAtDOM(this.dom),t=this.view.state.doc.resolve(e),n=Object(A["c"])(t,this.node.type);return n}destroy(){this.vm.$destroy()}}class O{on(e,t){return this._callbacks=this._callbacks||{},this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(t),this}emit(e,...t){this._callbacks=this._callbacks||{};const n=this._callbacks[e];return n&&n.forEach(e=>e.apply(this,t)),this}off(e,t){if(arguments.length){const n=this._callbacks?this._callbacks[e]:null;n&&(t?this._callbacks[e]=n.filter(e=>e!==t):delete this._callbacks[e])}else this._callbacks={};return this}}class E{constructor(e={}){this.options={...this.defaultOptions,...e}}init(){return null}bindEditor(e=null){this.editor=e}get name(){return null}get type(){return"extension"}get defaultOptions(){return{}}get plugins(){return[]}inputRules(){return[]}pasteRules(){return[]}keys(){return{}}}class M{constructor(e=[],t){e.forEach(e=>{e.bindEditor(t),e.init()}),this.extensions=e}get nodes(){return this.extensions.filter(e=>"node"===e.type).reduce((e,{name:t,schema:n})=>({...e,[t]:n}),{})}get options(){const{view:e}=this;return this.extensions.reduce((t,n)=>({...t,[n.name]:new Proxy(n.options,{set(t,n,o){const r=t[n]!==o;return Object.assign(t,{[n]:o}),r&&e.updateState(e.state),!0}})}),{})}get marks(){return this.extensions.filter(e=>"mark"===e.type).reduce((e,{name:t,schema:n})=>({...e,[t]:n}),{})}get plugins(){return this.extensions.filter(e=>e.plugins).reduce((e,{plugins:t})=>[...e,...t],[])}keymaps({schema:e}){const t=this.extensions.filter(e=>["extension"].includes(e.type)).filter(e=>e.keys).map(t=>t.keys({schema:e})),n=this.extensions.filter(e=>["node","mark"].includes(e.type)).filter(e=>e.keys).map(t=>t.keys({type:e["".concat(t.type,"s")][t.name],schema:e}));return[...t,...n].map(e=>Object(l["b"])(e))}inputRules({schema:e,excludedExtensions:t}){if(!(t instanceof Array)&&t)return[];const n=t instanceof Array?this.extensions.filter(e=>!t.includes(e.name)):this.extensions,o=n.filter(e=>["extension"].includes(e.type)).filter(e=>e.inputRules).map(t=>t.inputRules({schema:e})),r=n.filter(e=>["node","mark"].includes(e.type)).filter(e=>e.inputRules).map(t=>t.inputRules({type:e["".concat(t.type,"s")][t.name],schema:e}));return[...o,...r].reduce((e,t)=>[...e,...t],[])}pasteRules({schema:e,excludedExtensions:t}){if(!(t instanceof Array)&&t)return[];const n=t instanceof Array?this.extensions.filter(e=>!t.includes(e.name)):this.extensions,o=n.filter(e=>["extension"].includes(e.type)).filter(e=>e.pasteRules).map(t=>t.pasteRules({schema:e})),r=n.filter(e=>["node","mark"].includes(e.type)).filter(e=>e.pasteRules).map(t=>t.pasteRules({type:e["".concat(t.type,"s")][t.name],schema:e}));return[...o,...r].reduce((e,t)=>[...e,...t],[])}commands({schema:e,view:t}){return this.extensions.filter(e=>e.commands).reduce((n,o)=>{const{name:r,type:i}=o,s={},a=o.commands({schema:e,...["node","mark"].includes(i)?{type:e["".concat(i,"s")][r]}:{}}),c=(e,n)=>!!t.editable&&(t.focus(),e(n)(t.state,t.dispatch,t)),l=(e,t)=>{Array.isArray(t)?s[e]=e=>t.forEach(t=>c(t,e)):"function"===typeof t&&(s[e]=e=>c(t,e))};return"object"===typeof a?Object.entries(a).forEach(([e,t])=>{l(e,t)}):l(r,a),{...n,...s}},{})}}function B(e){{const t=document.createElement("style");t.type="text/css",t.textContent=e;const{head:n}=document,{firstChild:o}=n;o?n.insertBefore(t,o):n.appendChild(t)}}class N extends E{constructor(e={}){super(e)}get type(){return"mark"}get view(){return null}get schema(){return null}command(){return()=>{}}}function T(e=0,t=0,n=0){return Math.min(Math.max(parseInt(e,10),t),n)}class _ extends E{constructor(e={}){super(e)}get type(){return"node"}get view(){return null}get schema(){return null}command(){return()=>{}}}class I extends _{get name(){return"doc"}get schema(){return{content:"block+"}}}class R extends _{get name(){return"paragraph"}get schema(){return{content:"inline*",group:"block",draggable:!1,parseDOM:[{tag:"p"}],toDOM:()=>["p",0]}}commands({type:e}){return()=>Object(S["k"])(e)}}class P extends _{get name(){return"text"}get schema(){return{group:"inline"}}}var D='.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n';class j extends O{constructor(e={}){super(),this.defaultOptions={editorProps:{},editable:!0,autoFocus:null,extensions:[],content:"",topNode:"doc",emptyDocument:{type:"doc",content:[{type:"paragraph"}]},useBuiltInExtensions:!0,disableInputRules:!1,disablePasteRules:!1,dropCursor:{},enableDropCursor:!0,enableGapCursor:!0,parseOptions:{},injectCSS:!0,onInit:()=>{},onTransaction:()=>{},onUpdate:()=>{},onFocus:()=>{},onBlur:()=>{},onPaste:()=>{},onDrop:()=>{}},this.events=["init","transaction","update","focus","blur","paste","drop"],this.init(e)}init(e={}){this.setOptions({...this.defaultOptions,...e}),this.focused=!1,this.selection={from:0,to:0},this.element=document.createElement("div"),this.extensions=this.createExtensions(),this.nodes=this.createNodes(),this.marks=this.createMarks(),this.schema=this.createSchema(),this.plugins=this.createPlugins(),this.keymaps=this.createKeymaps(),this.inputRules=this.createInputRules(),this.pasteRules=this.createPasteRules(),this.view=this.createView(),this.commands=this.createCommands(),this.setActiveNodesAndMarks(),this.options.injectCSS&&B(D),null!==this.options.autoFocus&&this.focus(this.options.autoFocus),this.events.forEach(e=>{this.on(e,this.options[C("on ".concat(e))]||(()=>{}))}),this.emit("init",{view:this.view,state:this.state}),this.extensions.view=this.view}setOptions(e){this.options={...this.options,...e},this.view&&this.state&&this.view.updateState(this.state)}get builtInExtensions(){return this.options.useBuiltInExtensions?[new I,new P,new R]:[]}get state(){return this.view?this.view.state:null}createExtensions(){return new M([...this.builtInExtensions,...this.options.extensions],this)}createPlugins(){return this.extensions.plugins}createKeymaps(){return this.extensions.keymaps({schema:this.schema})}createInputRules(){return this.extensions.inputRules({schema:this.schema,excludedExtensions:this.options.disableInputRules})}createPasteRules(){return this.extensions.pasteRules({schema:this.schema,excludedExtensions:this.options.disablePasteRules})}createCommands(){return this.extensions.commands({schema:this.schema,view:this.view})}createNodes(){return this.extensions.nodes}createMarks(){return this.extensions.marks}createSchema(){return new i["Schema"]({topNode:this.options.topNode,nodes:this.nodes,marks:this.marks})}createState(){return o["EditorState"].create({schema:this.schema,doc:this.createDocument(this.options.content),plugins:[...this.plugins,Object(w["b"])({rules:this.inputRules}),...this.pasteRules,...this.keymaps,Object(l["b"])({Backspace:w["d"]}),Object(l["b"])(y["a"]),...this.options.enableDropCursor?[a(this.options.dropCursor)]:[],...this.options.enableGapCursor?[f()]:[],new o["Plugin"]({key:new o["PluginKey"]("editable"),props:{editable:()=>this.options.editable}}),new o["Plugin"]({props:{attributes:{tabindex:0},handleDOMEvents:{focus:(e,t)=>{this.focused=!0,this.emit("focus",{event:t,state:e.state,view:e});const n=this.state.tr.setMeta("focused",!0);this.view.dispatch(n)},blur:(e,t)=>{this.focused=!1,this.emit("blur",{event:t,state:e.state,view:e});const n=this.state.tr.setMeta("focused",!1);this.view.dispatch(n)}}}}),new o["Plugin"]({props:this.options.editorProps})]})}createDocument(e,t=this.options.parseOptions){if(null===e)return this.schema.nodeFromJSON(this.options.emptyDocument);if("object"===typeof e)try{return this.schema.nodeFromJSON(e)}catch(n){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",n),this.schema.nodeFromJSON(this.options.emptyDocument)}if("string"===typeof e){const n="
".concat(e,"
"),o=new window.DOMParser,r=o.parseFromString(n,"text/html").body.firstElementChild;return i["DOMParser"].fromSchema(this.schema).parse(r,t)}return!1}createView(){return new r["c"](this.element,{state:this.createState(),handlePaste:(...e)=>{this.emit("paste",...e)},handleDrop:(...e)=>{this.emit("drop",...e)},dispatchTransaction:this.dispatchTransaction.bind(this)})}setParentComponent(e=null){e&&this.view.setProps({nodeViews:this.initNodeViews({parent:e,extensions:[...this.builtInExtensions,...this.options.extensions]})})}initNodeViews({parent:e,extensions:t}){return t.filter(e=>["node","mark"].includes(e.type)).filter(e=>e.view).reduce((t,n)=>{const o=(t,o,r,i)=>{const s=n.view;return new x(s,{editor:this,extension:n,parent:e,node:t,view:o,getPos:r,decorations:i})};return{...t,[n.name]:o}},{})}dispatchTransaction(e){const t=this.state.apply(e);this.view.updateState(t),this.selection={from:this.state.selection.from,to:this.state.selection.to},this.setActiveNodesAndMarks(),this.emit("transaction",{getHTML:this.getHTML.bind(this),getJSON:this.getJSON.bind(this),state:this.state,transaction:e}),e.docChanged&&!e.getMeta("preventUpdate")&&this.emitUpdate(e)}emitUpdate(e){this.emit("update",{getHTML:this.getHTML.bind(this),getJSON:this.getJSON.bind(this),state:this.state,transaction:e})}resolveSelection(e=null){if(this.selection&&null===e)return this.selection;if("start"===e||!0===e)return{from:0,to:0};if("end"===e){const{doc:e}=this.state;return{from:e.content.size,to:e.content.size}}return{from:e,to:e}}focus(e=null){if(this.view.focused&&null===e||!1===e)return;const{from:t,to:n}=this.resolveSelection(e);this.setSelection(t,n),setTimeout(()=>this.view.focus(),10)}setSelection(e=0,t=0){const{doc:n,tr:r}=this.state,i=T(e,0,n.content.size),s=T(t,0,n.content.size),a=o["TextSelection"].create(n,i,s),c=r.setSelection(a);this.view.dispatch(c)}blur(){this.view.dom.blur()}getSchemaJSON(){return JSON.parse(JSON.stringify({nodes:this.extensions.nodes,marks:this.extensions.marks}))}getHTML(){const e=document.createElement("div"),t=i["DOMSerializer"].fromSchema(this.schema).serializeFragment(this.state.doc.content);return e.appendChild(t),e.innerHTML}getJSON(){return this.state.doc.toJSON()}setContent(e={},t=!1,n){const{doc:r,tr:i}=this.state,s=this.createDocument(e,n),a=o["TextSelection"].create(r,0,r.content.size),c=i.setSelection(a).replaceSelectionWith(s,!1).setMeta("preventUpdate",!t);this.view.dispatch(c)}clearContent(e=!1){this.setContent(this.options.emptyDocument,e)}setActiveNodesAndMarks(){this.activeMarks=Object.entries(this.schema.marks).reduce((e,[t,n])=>({...e,[t]:(e={})=>Object(A["e"])(this.state,n,e)}),{}),this.activeMarkAttrs=Object.entries(this.schema.marks).reduce((e,[t,n])=>({...e,[t]:Object(A["b"])(this.state,n)}),{}),this.activeNodes=Object.entries(this.schema.nodes).reduce((e,[t,n])=>({...e,[t]:(e={})=>Object(A["g"])(this.state,n,e)}),{})}getMarkAttrs(e=null){return this.activeMarkAttrs[e]}getNodeAttrs(e=null){return{...Object(A["d"])(this.state,this.schema.nodes[e])}}get isActive(){return Object.entries({...this.activeMarks,...this.activeNodes}).reduce((e,[t,n])=>({...e,[t]:(e={})=>n(e)}),{})}registerPlugin(e=null,t){const n="function"===typeof t?t(e,this.state.plugins):[e,...this.state.plugins],o=this.state.reconfigure({plugins:n});this.view.updateState(o)}unregisterPlugin(e=null){if(!e||!this.view.docView)return;const t=this.state.reconfigure({plugins:this.state.plugins.filter(t=>!t.key.startsWith("".concat(e,"$")))});this.view.updateState(t)}destroy(){this.view&&this.view.destroy()}}var z={props:{editor:{default:null,type:Object}},watch:{editor:{immediate:!0,handler(e){e&&e.element&&this.$nextTick(()=>{this.$el.appendChild(e.element.firstChild),e.setParentComponent(this)})}}},render(e){return e("div")},beforeDestroy(){this.editor.element=this.$el}};function L(e,t,n){const o=document.createRange();return o.setEnd(e,null==n?e.nodeValue.length:n),o.setStart(e,t||0),o}function $(e,t){const n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}function F(e,t,n=!1){const{node:o,offset:r}=e.docView.domFromPos(t);let i,s;if(3===o.nodeType)n&&r!1,...e},this.editorView=t,this.isActive=!1,this.left=0,this.bottom=0,this.top=0,this.preventHide=!1,this.mousedownHandler=this.handleClick.bind(this),this.options.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.focusHandler=({view:e})=>{this.update(e)},this.options.editor.on("focus",this.focusHandler),this.blurHandler=({event:e})=>{this.preventHide?this.preventHide=!1:this.hide(e)},this.options.editor.on("blur",this.blurHandler)}handleClick(){this.preventHide=!0}update(e,t){const{state:n}=e;if(e.composing)return;if(t&&t.doc.eq(n.doc)&&t.selection.eq(n.selection))return;if(n.selection.empty)return void this.hide();const{from:o,to:r}=n.selection,i=F(e,o),s=F(e,r,!0),a=this.options.element.offsetParent;if(!a)return void this.hide();const c=a.getBoundingClientRect(),l=this.options.element.getBoundingClientRect(),u=(i.left+s.left)/2-c.left;this.left=Math.round(this.options.keepInBounds?Math.min(c.width-l.width/2,Math.max(u,l.width/2)):u),this.bottom=Math.round(c.bottom-i.top),this.top=Math.round(s.bottom-c.top),this.isActive=!0,this.sendUpdate()}sendUpdate(){this.options.onUpdate({isActive:this.isActive,left:this.left,bottom:this.bottom,top:this.top})}hide(e){e&&e.relatedTarget&&this.options.element.parentNode&&this.options.element.parentNode.contains(e.relatedTarget)||(this.isActive=!1,this.sendUpdate())}destroy(){this.options.element.removeEventListener("mousedown",this.mousedownHandler),this.options.editor.off("focus",this.focusHandler),this.options.editor.off("blur",this.blurHandler)}}function H(e){return new o["Plugin"]({key:new o["PluginKey"]("menu_bubble"),view(t){return new V({editorView:t,options:e})}})}var U={props:{editor:{default:null,type:Object},keepInBounds:{default:!0,type:Boolean}},data(){return{menu:{isActive:!1,left:0,bottom:0}}},watch:{editor:{immediate:!0,handler(e){e&&this.$nextTick(()=>{e.registerPlugin(H({editor:e,element:this.$el,keepInBounds:this.keepInBounds,onUpdate:e=>{e.isActive&&!1===this.menu.isActive?this.$emit("show",e):e.isActive||!0!==this.menu.isActive||this.$emit("hide",e),this.menu=e}}))})}}},render(){return this.editor?this.$scopedSlots.default({focused:this.editor.view.focused,focus:this.editor.focus,commands:this.editor.commands,isActive:this.editor.isActive,getMarkAttrs:this.editor.getMarkAttrs.bind(this.editor),getNodeAttrs:this.editor.getNodeAttrs.bind(this.editor),menu:this.menu}):null},beforeDestroy(){this.editor.unregisterPlugin("menu_bubble")}}},cfd4:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var o=n("a6f4");const r=Object(o["i"])(null),i=Object(o["i"])(null),s=Object(o["i"])(!1),a=()=>({rightClickedElementId:r,copiedElementId:i,isElementCut:s})},d2c4:function(e,t,n){"use strict";var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"desktopPreview",staticClass:"builder-root"},[n("div",{staticClass:"builder-root__main"},[e.isSafariDisclaimerRibbonVisible?n("BuilderSafariDisclaimerRibbon"):e._e(),n("BuilderMobileFrame",[e.website?n("BuilderPreview"):e._e(),e.isHeatmapOpen?n("BuilderHeatmap"):e._e()],1)],1),n("BuilderDrawers"),n("ContextMenuGridElement"),n("PortalTarget",{attrs:{name:"root",multiple:""}}),n("Transition",{attrs:{name:"slide-left"}},[e.isToastVisible?n("Toast",{directives:[{name:"qa",rawName:"v-qa",value:"builder-root-toast-paytopublish",expression:"'builder-root-toast-paytopublish'"}],staticClass:"toast-notify",attrs:{"data-qa-close-button":"btn-p2p-toast-close",icon:"info-circle",message:e.$t("builder.payToPublishToastText"),"button-color":"blue"},on:{close:e.hideToast}}):e._e()],1),n("BuilderSidebar",{staticClass:"builder-root__sidebar"})],1)},r=[],i=n("5530"),s=n("2b0e"),a=n("2f62"),c=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("KeepAlive",{attrs:{include:e.$options.cachedDrawers}},[e.component?n(e.component,{tag:"Component"}):e._e()],1)},l=[],u=(n("ddb0"),n("2b95")),d=n("45c6"),p=n("0a84");const h=[d["c"]];var f={components:{AiWriterDrawer:u["default"]},data(){return{component:null}},computed:Object(p["s"])(["activeDrawer"]),watch:{activeDrawer(){this.$options.cachedDrawers.includes(this.activeDrawer)?this.component=this.activeDrawer:this.component=this.activeDrawer?()=>n("b743")("./".concat(this.activeDrawer,".vue")):null}},cachedDrawers:h},m=f,g=n("2877"),v=Object(g["a"])(m,c,l,!1,null,null,null),b=v.exports,y=n("6335"),w=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:{handler:e.handleClickOutside,events:["click"]},expression:"{\n\t\thandler: handleClickOutside,\n\t\tevents: ['click'],\n\t}"}],ref:"heatmap",staticClass:"heatmap",class:e.heatmapClass,attrs:{"data-qa":"builder-heatmap-overlay"}},[n("Transition",{attrs:{appear:"",name:"slide-bottom-to-top"}},[e.showOverlay?n("BuilderHeatmapNotification",{staticClass:"heatmap__notification",attrs:{"data-qa":"builder-heatmap-loader-generatingattentionmap","is-loading":e.isLoading,"has-failed":e.hasFailed,"error-message":e.errorMessage,"re-captcha-svg":e.reCaptchaSvg},on:{"set-fallback":e.setFallback,retry:e.callHeatmapApi}}):e._e()],1),n("div",{directives:[{name:"qa",rawName:"v-qa",value:"builder-heatmap-preview-"+(e.showOverlay?"off":"on"),expression:"`builder-heatmap-preview-${showOverlay ? 'off' : 'on'}`"}],ref:"preview",staticClass:"heatmap__preview",class:e.previewClass,style:e.previewStyle}),n("BuilderHeatmapControls",{staticClass:"heatmap__controls",attrs:{"is-preview-enabled":e.isPreviewEnabled,"show-overlay":e.showOverlay},on:{toggle:function(t){e.isPreviewEnabled=!e.isPreviewEnabled}}})],1)},A=[],k=n("3335"),S=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"controls"},[n("div",{staticClass:"controls__wrapper"},[n("ZyroButton",{directives:[{name:"qa",rawName:"v-qa",value:"builder-heatmap-show-"+(e.isPreviewEnabled?"less":"more"),expression:"`builder-heatmap-show-${isPreviewEnabled ? 'less' : 'more'}`"}],staticClass:"controls__toggle",attrs:{theme:"primary",size:"xxs",color:"black","icon-dimesnions":"16px",icon:e.toggleIcon,disabled:e.showOverlay},on:{click:function(t){return e.$emit("toggle")}}}),n("div",{staticClass:"controls__divider"}),n("div",{staticClass:"controls__legend"},[n("div",{staticClass:"controls__label z-subheading"},[e._v(" "+e._s(e.$t("builder.AIHeatmapLessAttention"))+" ")]),n("div",{staticClass:"controls__gradient"}),n("div",{staticClass:"controls__label z-subheading"},[e._v(" "+e._s(e.$t("builder.AIHeatmapMoreAttention"))+" ")])]),n("div",{staticClass:"controls__info"},[n("ZyroTooltip",{staticClass:"info",attrs:{mode:"dark",position:"right",size:"small","toggle-event":"hover","is-on-modal":""},scopedSlots:e._u([{key:"trigger",fn:function(){return[n("ZyroButton",{staticClass:"controls__info-icon",attrs:{theme:"primary",size:"xxs",color:"black",icon:"help","icon-dimesnions":"16px"}})]},proxy:!0}])},[n("div",{staticClass:"controls__info-content z-body-small"},[e._v(" "+e._s(e.$t("builder.AIHeatmapTooltip"))+" ")])])],1)],1)])},C=[],x={props:{isPreviewEnabled:{type:Boolean,required:!0},showOverlay:{type:Boolean,required:!0}},computed:{toggleIcon:({isPreviewEnabled:e})=>e?"eye-open":"eye-closed"}},O=x,E=(n("04a0"),Object(g["a"])(O,S,C,!1,null,"61849167",null)),M=E.exports,B=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"notification"},[e.isLoading?n("div",{staticClass:"notification__loading"},[n("ZyroLoader",{staticClass:"notification__icon"}),n("div",{directives:[{name:"qa",rawName:"v-qa",value:"builder-heatmap-generating",expression:"'builder-heatmap-generating'"}],staticClass:"notification__label z-subheading"},[e._v(" "+e._s(e.$t("builder.AIHeatmapGenerating"))+" ")])],1):e.hasFailed?n("div",{staticClass:"notification__error"},[e.reCaptchaSvg?[n("div",{staticClass:"notification__svg",domProps:{innerHTML:e._s(e.reCaptchaSvg)}}),n("ZyroInput",{staticClass:"notification__input",on:{change:e.handleInputChange}})]:n("div",{staticClass:"notification__label z-subheading"},[e._v(" "+e._s(e.errorMessage)+" ")]),n("ZyroButton",{staticClass:"notification__retry",attrs:{color:"plump-purple",theme:"primary",type:"button"},on:{click:function(t){return e.$emit("retry")}}},[e._v(" "+e._s(e.$t("builder.AIHeatmapRetry"))+" ")])],2):e._e()])},N=[],T={props:{isLoading:{type:Boolean,required:!0},hasFailed:{type:Boolean,required:!0},errorMessage:{type:String,default:null},reCaptchaSvg:{type:String,default:null}},methods:{handleInputChange(e){this.$emit("set-fallback",e.target.value)}}},_=T,I=(n("6a80"),Object(g["a"])(_,B,N,!1,null,"0f472000",null)),R=I.exports,P={components:{BuilderHeatmapNotification:R,BuilderHeatmapControls:M},setup(){const{isLoading:e,hasFailed:t,errorMessage:n,reCaptchaSvg:o,setFallback:r,result:i,callApi:s}=Object(k["k"])();return{result:i,isLoading:e,hasFailed:t,errorMessage:n,reCaptchaSvg:o,setFallback:r,callApi:s}},data(){return{isPreviewEnabled:!0}},computed:Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])({},Object(a["f"])(["website"])),Object(a["d"])(["siteMeta"])),Object(a["f"])("pages",["currentPageId"])),Object(p["s"])(["isHeatmapOpen"])),{},{showOverlay:({isLoading:e,hasFailed:t})=>e||t,heatmapClass:({isHeatmapOpen:e,showOverlay:t})=>({"heatmap--bordered":e,"heatmap--darkened":t}),previewClass:({isPreviewEnabled:e})=>({"heatmap__preview--enabled":e}),previewStyle:({result:e})=>e&&{backgroundImage:"url(".concat(e,")")}}),mounted(){this.callHeatmapApi()},methods:Object(i["a"])(Object(i["a"])({},Object(p["r"])({closeHeatmap:p["e"]})),{},{async callHeatmapApi(){const{offsetWidth:e,offsetHeight:t}=this.$refs.heatmap;this.callApi(k["a"],{method:"post",data:{zyroWebsiteData:Object(i["a"])(Object(i["a"])({},this.website),{},{meta:Object(i["a"])(Object(i["a"])({},this.siteMeta),{},{homePageId:this.currentPageId})}),mode:"base64",width:Math.round(e),height:Math.round(t),heatmapOnly:!0,withRecaptcha:!0}})},handleClickOutside(e){e.target.closest(".heatmap-header")||this.closeHeatmap()}})},D=P,j=(n("a15a"),Object(g["a"])(D,w,A,!1,null,"7c0b0226",null)),z=j.exports,L=n("53b9"),$=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"safari-ribbon z-body-small"},[n("ZyroSvg",{staticClass:"safari-ribbon__icon",attrs:{name:"info-circle"}}),n("div",{staticClass:"safari-ribbon__text"},[n("i18n",{attrs:{tag:"p",path:"builder.safariDisclaimerRibbon"}},[n("a",{staticClass:"safari-ribbon__link",attrs:{title:e.$t("builder.safariDisclaimerRibbonLink"),target:"_blank",href:"https://support.apple.com/en-us/HT204416"}},[e._v(" "+e._s(e.$t("builder.safariDisclaimerRibbonLink"))+" ")])])],1)],1)},F=[],V=(n("0a3c"),{}),H=Object(g["a"])(V,$,F,!1,null,"388f3c9c",null),U=H.exports,W=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"sidebar"},[n("div",{staticClass:"sidebar__content"},e._l(e.sidebarActions,(function(t,o){return n("div",{key:o,staticClass:"sidebar__category",class:{"sidebar__category--pushed-down":"settingsActions"===o}},[o===e.ACTIONS_CATEGORY_SETTINGS?n("ZyroSeparator",{staticClass:"sidebar__separator"}):e._e(),e._l(t,(function(t,o){return n("BuilderSidebarAction",e._b({key:""+t.title+o,attrs:{"data-qa":"builder-sidebar-action-"+o},on:{"action-click":t.clickHandler,"close-popup":function(t){return e.setOpenPopup(null)}}},"BuilderSidebarAction",t,!1))})),o===e.ACTIONS_CATEGORY_BUILDER?n("ZyroSeparator",{staticClass:"sidebar__separator"}):e._e()],2)})),0)])},q=[];const J="#ff455c",K="builderActions",G="aiActions",Y="settingsActions",Z="https://logo.zyro.com/",Q="https://roadmap.zyro.com/tabs/1-new-ideas/submit-idea";var X=n("119c"),ee=n("b0e9"),te=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.preventRender?e._e():n("div",{staticClass:"action",class:{"is-active":e.isActive},style:e.computedStyles,attrs:{tabindex:"0"}},[n("ZyroTooltip",{attrs:{position:"right",size:"small","toggle-event":"hover","content-position":"absolute","forced-position":{left:"60px",top:"6px","white-space":"nowrap"},"use-portal":!1,"hide-tooltip":e.isActive},scopedSlots:e._u([{key:"trigger",fn:function(){return[n(e.component,{directives:[{name:"qa",rawName:"v-qa",value:"builder-sidebar-btn-"+e.title,expression:"`builder-sidebar-btn-${title}`"}],tag:"Component",staticClass:"action__button",attrs:{icon:e.icon,"icon-dimensions":e.iconDimensions,"aria-label":e.title,tabindex:"-1",title:e.title},on:{click:function(t){return t.stopPropagation(),e.$emit("action-click")},toggle:function(t){return e.$emit("action-click",t)},"close-popup":function(t){return e.$emit("close-popup")}}})]},proxy:!0}],null,!1,1044589319)},[e._v(" "+e._s(e.title)+" ")])],1)},ne=[],oe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("ZyroPopup",{staticClass:"sidebar-popup",attrs:{"show-close-button":!1,offset:{bottom:-20,left:35},type:"no-padding"},on:{toggle:function(t){return e.$emit("toggle",t)},close:function(t){return e.$emit("close-popup",!1)}},scopedSlots:e._u([{key:"trigger",fn:function(){return[n("ZyroButton",{directives:[{name:"qa",rawName:"v-qa",value:"builder-sidebar-btn-aitools",expression:"'builder-sidebar-btn-aitools'"}],staticClass:"sidebar-popup__trigger-button",attrs:{color:"white",icon:e.icon,title:e.title}})]},proxy:!0},{key:"default",fn:function(t){var o=t.close;return[n("ul",{staticClass:"sidebar-popup__content"},e._l(e.aiTools,(function(t){return n("li",{key:t.title,staticClass:"sidebar-popup__list-item"},[n("ZyroButton",{directives:[{name:"qa",rawName:"v-qa",value:"builder-sidebar-btn-aitool"+t.title,expression:"`builder-sidebar-btn-aitool${aiTool.title}`"}],staticClass:"sidebar-popup__button z-body-small",attrs:{title:t.title,"icon-left":t.icon},on:{click:function(e){e.stopPropagation(),t.clickHandler(),o()}}},[e._v(" "+e._s(t.title)+" ")])],1)})),0)]}}])})],1)},re=[],ie={props:{title:{type:String,required:!0},icon:{type:String,required:!0}},computed:{aiTools:({toggleDrawer:e,toggleHeatmap:t})=>[{title:X["a"].t("builder.singlePageImporter.title"),icon:"single-page-importer",clickHandler:()=>{e(d["i"])}},{title:X["a"].t("builder.logoMaker"),icon:"logo-maker",iconDimensions:"40px",clickHandler:()=>window.open(Z,"_blank")},{title:X["a"].t("builder.AIWriter.title"),icon:"app-ai-text-generator",clickHandler:()=>e(d["c"])},{title:X["a"].t("builder.AIHeatmapLabel"),icon:"app-ai-heatmap",clickHandler:t}]},methods:Object(i["a"])({},Object(p["r"])({toggleDrawer:p["l"],toggleHeatmap:p["m"]}))},se=ie,ae=(n("0382"),Object(g["a"])(se,oe,re,!1,null,"516bbe39",null)),ce=ae.exports,le=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("ZyroPopup",{staticClass:"sidebar-popup",attrs:{"show-close-button":!1,offset:{bottom:-20,left:35},type:"no-padding"},on:{toggle:function(t){return e.$emit("toggle",t)},close:function(t){return e.$emit("close-popup",!1)}},scopedSlots:e._u([{key:"trigger",fn:function(){return[n("ZyroButton",{staticClass:"sidebar-popup__trigger-button",attrs:{"data-qa":"builder-sidebar-btn-feedback",color:"white",icon:e.icon,title:e.title}})]},proxy:!0}])},[n("ul",{staticClass:"sidebar-popup__content"},[e.isMobileScreen?e._e():n("li",{staticClass:"sidebar-popup__list-item"},[n("ZyroButton",{staticClass:"sidebar-popup__button z-body-small",attrs:{"data-qa":"builder-sidebar-btn-sendfeedback",title:e.$t("builder.sidebarFeedback.sendFeedback")},on:{click:function(t){return e.setNpsData({isVisible:!0})}}},[e._v(" "+e._s(e.$t("builder.sidebarFeedback.sendFeedback"))+" ")])],1),n("li",{staticClass:"sidebar-popup__list-item"},[n("ZyroButton",{staticClass:"sidebar-popup__button z-body-small",attrs:{title:e.$t("builder.sidebarFeedback.requestFeature"),"data-qa":"builder-sidebar-btn-requestfeature",href:e.$options.ROADMAP_LINK,target:"_blank"}},[e._v(" "+e._s(e.$t("builder.sidebarFeedback.requestFeature"))+" ")])],1)])])],1)},ue=[],de={ROADMAP_LINK:Q,props:{title:{type:String,required:!0},icon:{type:String,required:!0}},computed:Object(a["f"])("gui",["isMobileScreen"]),methods:Object(a["c"])("nps",["setNpsData"])},pe=de,he=(n("84ae"),Object(g["a"])(pe,le,ue,!1,null,"0bd76e0b",null)),fe=he.exports,me=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.user||e.$options.isLocalEnv?n("ZyroPopup",{staticClass:"sidebar-popup",attrs:{"show-close-button":!1,offset:{bottom:-20,left:35},type:"no-padding"},on:{toggle:function(t){return e.$emit("toggle",t)},close:function(t){return e.$emit("close-popup",!1)}},scopedSlots:e._u([{key:"trigger",fn:function(){return[n("ZyroButton",{staticClass:"sidebar-popup__trigger-button",attrs:{"data-qa":"builder-header-btn-settings",color:"white",icon:e.icon,title:e.title}})]},proxy:!0}],null,!1,813043637)},[n("ul",{staticClass:"sidebar-popup__content"},e._l(e.$options.LINKS,(function(t){return n("li",{key:t.title,staticClass:"sidebar-popup__list-item"},[n("ZyroButton",{directives:[{name:"qa",rawName:"v-qa",value:"builder-header-settingsddl-"+t.title,expression:"`builder-header-settingsddl-${link.title}`"}],staticClass:"sidebar-popup__button z-body-small",attrs:{to:{name:t.to}}},[e._v(" "+e._s(t.title)+" ")])],1)})),0),n("div",{staticClass:"settings__lang-switcher",on:{mouseenter:e.toggleList,mouseleave:e.toggleList}},[n("ZyroButton",{staticClass:"z-body-small",attrs:{"data-qa":"builder-header-settingsddl-language","icon-right":"globe"}},[e._v(" "+e._s(e.$t("common.language"))+" ")]),n("span",{staticClass:"settings__lang-switcher-text z-body-small"},[e._v(e._s(e.currentLanguage))]),n("Transition",{attrs:{name:"fade"}},[e.isListOpen?n("LanguageSwitcher",{staticClass:"settings__languages-list"}):e._e()],1)],1)]):n("div",{staticClass:"sidebar-popup"},[n("ZyroPopup",{attrs:{offset:{bottom:-20,left:35},type:"no-padding","show-close-button":!1},on:{toggle:function(t){return e.$emit("toggle",t)},close:function(t){return e.$emit("toggle",!1)}}},[n("template",{slot:"trigger"},[n("ZyroButton",{attrs:{color:"white",icon:"globe"}})],1),n("LanguageSwitcher")],2)],1)],1)},ge=[],ve=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"lang-switcher"},e._l(e.availableLocales,(function(t){return o("div",{directives:[{name:"qa",rawName:"v-qa",value:"builder-header-localeslist-link-"+t.code,expression:"`builder-header-localeslist-link-${locale.code}`"}],key:t.code,staticClass:"locale",on:{click:function(n){return e.setLocale(t.code)}}},[o("img",{staticClass:"locale__img",attrs:{src:n("e3db2")("./"+t.code+".png"),alt:t.code+"-flag"}}),o("label",{staticClass:"locale__label z-body-small"},[e._v(" "+e._s(t.region)+" "),o("span",{staticClass:"locale__text"},[e._v(e._s(t.language))])])])})),0)},be=[],ye=(n("5319"),n("a911")),we={computed:{availableLocales(){return ye["b"]}},methods:{setLocale(e){if(this.$i18n.locale!==e){const t=Object(i["a"])(Object(i["a"])({},this.$route),{},{query:Object(i["a"])(Object(i["a"])({},this.$route.query),{},{lang:e})}),{href:n}=this.$router.resolve(t);window.location.replace(n)}}}},Ae=we,ke=(n("3003"),Object(g["a"])(Ae,ve,be,!1,null,"37b8cd02",null)),Se=ke.exports,Ce=n("a060");const xe=[{title:X["a"].t("siteSettings.nav.quick-start"),to:Ce["k"]},{title:X["a"].t("siteSettings.nav.general"),to:Ce["e"]},{title:X["a"].t("siteSettings.nav.domain"),to:Ce["c"]},{title:X["a"].t("siteSettings.nav.integrations"),to:Ce["h"]},{title:X["a"].t("siteSettings.nav.online-store"),to:Ce["i"]},{title:X["a"].t("siteSettings.nav.subscription"),to:Ce["o"]},{title:X["a"].t("siteSettings.nav.seo"),to:Ce["l"]},{title:X["a"].t("siteSettings.nav.forms"),to:Ce["d"]}],Oe=!1;var Ee={LINKS:xe,components:{LanguageSwitcher:Se},props:{title:{type:String,required:!0},icon:{type:String,required:!0}},data(){return{isListOpen:!1}},computed:Object(i["a"])(Object(i["a"])(Object(i["a"])({},Object(a["f"])(["websiteId"])),Object(a["f"])("user",["user"])),{},{currentLanguage(){return Object(ye["c"])(this.$i18n.locale).language}}),methods:{toggleList(){this.isListOpen=!this.isListOpen}},isLocalEnv:Oe},Me=Ee,Be=(n("397e"),Object(g["a"])(Me,me,ge,!1,null,"93a4d836",null)),Ne=Be.exports,Te={components:{BuilderSidebarSettingsPopup:Ne,BuilderSidebarFeedbackPopup:fe,BuilderSidebarAiPopup:ce},props:{isActive:{type:Boolean,default:!1},preventRender:{type:Boolean,default:!1},title:{type:String,required:!0},icon:{type:String,required:!0},color:{type:String,default:"var(--primary)"},iconDimensions:{type:String,default:null,validator:e=>e.includes("px")},component:{type:String,default:"ZyroButton"}},computed:{computedStyles(){return{"--action-color":this.color}}}},_e=Te,Ie=(n("633a"),Object(g["a"])(_e,te,ne,!1,null,"6de1595f",null)),Re=Ie.exports,Pe={components:{BuilderSidebarAction:Re},setup(){return{isDevelopment:ee["a"],ACTIONS_CATEGORY_BUILDER:K,ACTIONS_CATEGORY_SETTINGS:Y,ACTIONS_CATEGORY_AI:G}},data(){return{activePopup:""}},computed:Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])({},Object(p["s"])(["isSidebarOpen","isHeatmapOpen","activeDrawer"])),Object(a["f"])("blog",["isBlogEditMode"])),Object(a["d"])("onlineStore",["isSiteWithEcwid"])),Object(a["d"])("user",["isZyroUser"])),{},{isAiToolActive:({activeDrawer:e,isHeatmapOpen:t,activePopup:n})=>e===d["i"]||e===d["c"]||t||"aiPopup"===n,sidebarActions({toggleDrawer:e}){return this.isBlogEditMode?{[K]:[{isActive:this.activeDrawer===d["b"],title:X["a"].t("builder.addElementDrawer.title"),icon:"plus-circle",clickHandler:()=>e(d["b"])}]}:{[K]:[{isActive:this.activeDrawer===d["h"],title:X["a"].t("builder.siteMenu.title"),icon:"layers",clickHandler:()=>e(d["h"])},{isActive:this.activeDrawer===d["b"],title:X["a"].t("builder.addElementDrawer.title"),icon:"plus-circle",clickHandler:()=>e(d["b"])},{isActive:this.activeDrawer===d["j"],title:X["a"].t("builder.userStyles.drawerLabel"),icon:"styles-brush",clickHandler:()=>e(d["j"])},{isActive:this.activeDrawer===d["e"],preventRender:!this.isZyroUser&&!this.isDevelopment,title:"Designer website styles",icon:"styles",clickHandler:()=>e(d["e"])},{isActive:this.activeDrawer===d["d"],title:X["a"].t("builder.blog.blogDrawer.title"),icon:"edit",clickHandler:()=>e(d["d"])},{isActive:this.activeDrawer===d["a"]||this.activeDrawer===d["g"],title:X["a"].t("builder.addEcommerceStoreDrawer.title"),icon:"shopping-cart",iconDimensions:"16px",clickHandler:()=>e(this.isSiteWithEcwid?d["g"]:d["a"])}],[G]:[{isActive:this.isAiToolActive,color:J,title:X["a"].t("common.aiTools"),icon:"ai-tools",component:"BuilderSidebarAiPopup",clickHandler:()=>{this.setOpenPopup("aiPopup")}}],[Y]:[{title:X["a"].t("builder.sidebarKnowledgeBase"),icon:"question-circle",component:"ZyroButton",clickHandler:()=>e(d["f"])},{title:X["a"].t("builder.sidebarFeedback.title"),isActive:"supportPopup"===this.activePopup,component:"BuilderSidebarFeedbackPopup",icon:"mail",clickHandler:()=>{this.setOpenPopup("supportPopup")}},{isActive:"builderSettings"===this.activePopup,component:"BuilderSidebarSettingsPopup",title:X["a"].t("builder.sidebarWebsiteSettingsLabel"),color:"var(--primary-light)",icon:"settings",clickHandler:()=>{this.setOpenPopup("builderSettings")}}]}}}),methods:Object(i["a"])(Object(i["a"])({},Object(p["r"])({toggleDrawer:p["l"],toggleHeatmap:p["m"],toggleSidebar:p["n"],closeDrawer:p["d"]})),{},{setOpenPopup(e){this.activeDrawer&&null!==e&&this.closeDrawer(),this.activePopup=e}})},De=Pe,je=(n("aa85"),Object(g["a"])(De,W,q,!1,null,"715240b9",null)),ze=je.exports,Le=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"preview"},[e.website?n("main",{ref:"mobilePreview",staticClass:"preview__content"},[e.isNavigationVisible?n("BlockControls",{attrs:{"is-first":"","data-qa":"builder-section-navigation","slot-name":"navigation","is-block-selected":"navigation"===e.selectedBlockId,"is-dragging-over":"navigation"===e.draggedOverBlockId,"is-block-hovered":e.getIsBlockHovered("navigation")}},[n("BlockHeaderProviderBuilder",{ref:"navigation-ref",attrs:{id:"navigation",data:e.headerBlock,height:e.headerHeight},on:{"update-height":function(t){e.headerHeight=t}},nativeOn:{click:function(t){e.handleBlockSelect("navigation"),e.unsetCurrentElement()},mouseover:function(t){return e.handleBlockHover("navigation")}}})],1):e._e(),e.isEmptyPageBlockShown?n("BuilderEmptyPage"):e._e(),e._l(e.allBlocks,(function(t,o){return n("BlockControls",{key:t,attrs:{"is-hidden":e.isBlockHidden(t),"is-first":!e.isNavigationVisible&&0===o,"is-block-selected":t===e.selectedBlockId,"slot-name":e.siteBlocks[t].slot,"is-dragging-over":t===e.draggedOverBlockId,"is-block-hovered":e.getIsBlockHovered(t)},on:{"unhide-block":function(t){return e.onToggleLinkedBlock("footer",!1,!1)}}},[n("Block",{directives:[{name:"qa",rawName:"v-qa",value:"builder-section-"+o,expression:"`builder-section-${index}`"}],ref:t+"-ref",refInFor:!0,style:e.getTransparentBlockStyle(o),attrs:{id:t,data:e.siteBlocks[t],"active-event-info":e.activeEventInfo,"is-block-hovered":e.getIsBlockHovered(t)},on:{"lock-hovered-block":function(t){e.lockHoveredBlock=t},"set-edit-control-visibility":function(t){e.editControlsVisible=t},"drag-status-change":function(n){return e.setDraggedOverBlock({blockId:t,isDraggedOver:n})}},nativeOn:{click:function(n){return e.handleBlockSelect(t)},mouseover:function(n){return e.handleBlockHover(t)}}})],1)})),e.editControlsVisible&&e.selectedBlockRef&&e.selectedBlockId?n("EditControls",{attrs:{"block-ref":e.selectedBlockRef,"block-id":e.selectedBlockId}}):e._e(),e.editControlsVisible?n("div",{staticClass:"preview__edit-block"},[n("Transition",{attrs:{name:"fade-in"}},[e.currentElementId||!e.selectedBlockRef||e.selectedBlockId===e.currentBlockId&&e.blockEditorOpen||e.isTransitioning?e._e():n("PositionBlockEditor",{staticClass:"preview__edit-block-button",attrs:{component:"EditBlockButton","block-ref":e.selectedBlockRef,"block-id":e.selectedBlockId,"block-type":e.selectedBlockType,"block-slot":e.selectedBlockSlot||"","is-linked-block-hidden":e.currentPage[e.selectedBlockSlot+"SlotIsHidden"],"is-moving-block-up-allowed":e.isMovingBlockUpAllowed(e.selectedBlockId),"is-moving-block-down-allowed":e.isMovingBlockDownAllowed(e.selectedBlockId)},on:{"move-block-up":function(t){return e.onMoveBlockUp(e.selectedBlockId)},"move-block-down":function(t){return e.onMoveBlockDown(e.selectedBlockId)},"edit-block":e.onEditBlock,"remove-block":e.onRemoveBlock,"duplicate-block":e.onDuplicateBlock,"toggle-linked-block":e.onToggleLinkedBlock,"sort-block-components":e.onSortBlockComponents}})],1),n("Transition",{attrs:{name:"fade-in"}},[e.blockEditorOpen?n("PositionBlockEditor",{directives:[{name:"click-outside",rawName:"v-click-outside",value:{handler:e.closeBlockEditor,middleware:function(e){return!e.target.closest(".app-portal")},events:["mousedown"]},expression:"{\n\t\t\t\t\t\thandler: closeBlockEditor,\n\t\t\t\t\t\tmiddleware: (e) => !e.target.closest('.app-portal'),\n\t\t\t\t\t\tevents: ['mousedown'],\n\t\t\t\t\t}"}],attrs:{"block-ref":e.selectedBlockRef,"block-id":e.selectedBlockId,"block-type":e.selectedBlockType,"start-tab-id":e.defaultBlockEditTab,component:"EditBlockPopup","starting-popup-component":e.editBlockStartingPopupComponent},on:{close:e.closeBlockEditor}}):e._e()],1)],1):e._e(),n("Transition",{attrs:{name:"fade-in--quick"}},[e.hoveredBlock&&!e.isTransitioning?n("PositionBlockEditor",{attrs:{"display-add-block":"footer"!==e.selectedBlockSlot&&"footer"!==e.hoveredBlock.slot,"block-ref":e.hoveredBlock.ref,"block-id":e.hoveredBlock.id,"block-type":e.hoveredBlock.type,component:"SectionControlLine","active-event-info":e.activeEventInfo},on:{"update:activeEventInfo":function(t){e.activeEventInfo=t},"update:active-event-info":function(t){e.activeEventInfo=t},"lock-hovered-block":function(t){e.lockHoveredBlock=t}}}):e._e()],1)],2):e._e()])},$e=[],Fe=(n("4e82"),n("cffa")),Ve=n("a6c2"),He=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",{ref:"block",staticClass:"block",style:e.computedStyles},[n("BlockBackground",{attrs:{background:e.data.background,"is-fixed":"fixed"===e.data.settings.styles.attachment}}),n(e.data.type,{tag:"Component",attrs:{"block-id":e.id,data:e.data,blocks:e.siteBlocks,"active-event-info":e.activeEventInfo,"is-block-hovered":e.isBlockHovered},on:{"lock-hovered-block":function(t){return e.$emit("lock-hovered-block",t)},"set-edit-control-visibility":function(t){return e.$emit("set-edit-control-visibility",t)},"drag-status-change":function(t){return e.$emit("drag-status-change",t)}}})],1)},Ue=[],We=n("4262"),qe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"block__hidden-overlay"},[n("p",{staticClass:"z-body"},[e._v(" This section is hidden ")]),n("ZyroButton",{staticClass:"block__hidden-button",attrs:{theme:"primary",color:"black","icon-left":"eye-open"},on:{click:function(t){return e.$emit("click")}}},[e._v(" show section ")])],1)},Je=[],Ke=(n("c0a6"),{}),Ge=Object(g["a"])(Ke,qe,Je,!1,null,"0f45e941",null),Ye=Ge.exports,Ze={name:"Block",components:{BlockNavigation:()=>Promise.resolve().then(n.bind(null,"a6c2")),BlockGrid:()=>Promise.all([n.e("chunk-2d0c0a73"),n.e("chunk-5d1d44b1")]).then(n.bind(null,"84e9")),BlockBackground:()=>Promise.resolve().then(n.bind(null,"822d")),BlockBlogList:()=>n.e("chunk-957f3660").then(n.bind(null,"ecb7")),BlockSlideshow:()=>Promise.all([n.e("chunk-2d0c0a73"),n.e("chunk-5d1d44b1"),n.e("chunk-d10cc06a")]).then(n.bind(null,"f27e")),BlockBlogHeader:()=>Promise.resolve().then(n.bind(null,"6cb2")),BlockEcwidStore:()=>n.e("chunk-64a310ff").then(n.bind(null,"dda1")),BlockGridElementInfoOverlay:()=>Promise.resolve().then(n.bind(null,"ec78")),BlockHidden:Ye},props:{id:{type:String,required:!0},data:{type:Object,required:!0},isBlockHovered:{type:Boolean,default:!1},activeEventInfo:{type:Object,default:()=>({})}},setup(e){const{computedStyles:t}=Object(We["a"])(e);return{computedStyles:t}},computed:Object(i["a"])({},Object(a["d"])(["siteBlocks"]))},Qe=Ze,Xe=(n("2bb2"),Object(g["a"])(Qe,He,Ue,!1,null,"363a7864",null)),et=Xe.exports,tt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"controls",class:{"is-selected":e.isBlockSelected,"is-dragging-over":e.isDraggingOver}},[e._t("default"),n("Transition",{attrs:{name:"fade"}},[e.isHidden?n("BlockHidden",{on:{click:function(t){return e.$emit("unhide-block")}}}):e._e()],1),n("div",{staticClass:"controls__selection"},[n("BlockGridElementInfoOverlay",{attrs:{"disable-pill-overflow":e.isFirst,info:e.blockSelectionInfo}})],1)],2)},nt=[],ot=n("ec78"),rt=n("7c9b");const it={footer:X["a"].t("common.footer"),navigation:X["a"].t("common.header"),default:X["a"].t("common.section")};var st={components:{BlockGridElementInfoOverlay:ot["default"]},props:{isHidden:{type:Boolean,default:!1},isFirst:{type:Boolean,required:!1},isBlockSelected:{type:Boolean,default:!1},slotName:{type:String,default:null},isDraggingOver:{type:Boolean,default:!1},isBlockHovered:{type:Boolean,default:!1}},computed:{isTitleShown(){return!this.isBlockSelected||this.isBlockHovered||this.isDraggingOver},sectionTitle(){return Object(rt["c"])(this.slotName,it)},blockSelectionInfo(){const e=this.isTitleShown?this.sectionTitle:null,t="footer"===this.slotName?"var(--primary)":"var(--accent-two)";return{y1:0,y2:0,x1:0,x2:0,title:e,color:t}}}},at=st,ct=(n("d7ac"),Object(g["a"])(at,tt,nt,!1,null,"628c9e99",null)),lt=ct.exports,ut=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.currentElement&&e.currentElement.type?n(e.componentType,{tag:"Component",staticClass:"edit-controls",attrs:{"block-id":e.blockId,"block-ref":e.blockRef},on:{close:e.close}}):e._e()},dt=[],pt={components:{EditText:()=>n.e("chunk-7ac16a00").then(n.bind(null,"5728")),EditButton:()=>n.e("chunk-8ceaf77c").then(n.bind(null,"2afe")),EditGallery:()=>n.e("chunk-2ea3ab7b").then(n.bind(null,"8475")),EditImage:()=>n.e("chunk-0a04d2a4").then(n.bind(null,"9da7")),EditMap:()=>n.e("chunk-e933d452").then(n.bind(null,"d01a")),EditVideo:()=>n.e("chunk-4ed51d3d").then(n.bind(null,"81cc")),EditSocialIcons:()=>Promise.all([n.e("chunk-2d0c0a73"),n.e("chunk-15487612"),n.e("chunk-88732eb0")]).then(n.bind(null,"b109")),EditInstagramFeed:()=>n.e("chunk-2a4c5996").then(n.bind(null,"cf14")),EditForm:()=>Promise.all([n.e("chunk-2d0c0a73"),n.e("chunk-62408766")]).then(n.bind(null,"569d")),EditEmbed:()=>n.e("chunk-c95aaf00").then(n.bind(null,"5472")),BaseEditControls:()=>n.e("chunk-fa572990").then(n.bind(null,"a4df"))},props:{blockId:{type:String,required:!0},blockRef:{type:HTMLElement,required:!0}},editors:{GridTextBox:"EditText",GridButton:"EditButton",GridStripeButton:"EditButton",GridGallery:"EditGallery",GridImage:"EditImage",GridMap:"EditMap",GridVideo:"EditVideo",GridSocialIcons:"EditSocialIcons",GridInstagramFeed:"EditInstagramFeed",GridForm:"EditForm",GridEmbed:"EditEmbed"},computed:Object(i["a"])(Object(i["a"])({},Object(a["d"])(["currentElement"])),{},{componentType(){var e;return null!==(e=this.$options.editors[this.currentElement.type])&&void 0!==e?e:"BaseEditControls"}}),methods:Object(i["a"])(Object(i["a"])({},Object(a["c"])("gui",["setElementEditMode"])),{},{close(){this.setElementEditMode(!1)}})},ht=pt,ft=(n("a9f2"),Object(g["a"])(ht,ut,dt,!1,null,"1fb459af",null)),mt=ft.exports,gt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n(e.component,e._g(e._b({ref:"componentRoot",tag:"Component",attrs:{position:e.position},on:{"hook:mounted":function(t){return e.computeBlockEditorPosition(e.blockRef)}}},"Component",Object.assign({},e.$attrs,e.$props),!1),e.$listeners))},vt=[],bt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.allowEditing?n("div",{key:e.blockId+"-btn-for-transition",staticClass:"edit-actions",style:e.position},[e.isLinkedBlockHidden?e._e():["BlockSlideshow"===e.blockType?n("div",{staticClass:"edit-actions__button edit-actions__slideshow-buttons-container",attrs:{"data-qa":"builder-section-btn-editslideshow"}},[n("ZyroButton",{on:{click:e.goToPreviousSlideInCurrentActiveSlideshow}},[n("template",{slot:"icon"},[n("ZyroSvg",{attrs:{name:"chevron",direction:"left"}})],1)],2),n("ZyroButton",{staticClass:"edit-actions__button-slideshow-manage",on:{click:function(t){return e.$emit("edit-block",{startingPopupComponent:"EditBlockSlideshowSettingsTabs",tabId:"slides"})}}},[n("span",{staticClass:"z-body-small"},[e._v(e._s(e.currentSlideshowSlideName))])]),n("ZyroButton",{on:{click:e.goToNextSlideInCurrentActiveSlideshow}},[n("template",{slot:"icon"},[n("ZyroSvg",{attrs:{name:"chevron",direction:"right"}})],1)],2)],1):e._e(),"BlockEcwidStore"===e.blockType?n("ZyroButton",{staticClass:"edit-actions__button",attrs:{"data-qa":"builder-section-btn-managestore",theme:"editor",title:e.$t("builder.editStore.title")},on:{click:e.openStoreSettings}},[e._v(" "+e._s(e.$t("builder.editStore.title"))+" ")]):e._e(),e.allowEditBackground?n("ZyroButton",{staticClass:"edit-actions__button",attrs:{"data-qa":"builder-section-btn-changebackground",theme:"editor"},on:{click:e.openBlockBackground}},[e._v(" "+e._s(e.$t("builder.editBlockButton.changeBackground"))+" ")]):e._e(),e.isBlockNavigation?[n("ZyroButton",{directives:[{name:"qa",rawName:"v-qa",value:"builder-section-btn-editnavigation",expression:"'builder-section-btn-editnavigation'"}],staticClass:"edit-actions__button",attrs:{theme:"editor",title:e.$t("builder.editBlockButton.editNavigation")},on:{click:function(t){return e.openDrawer(e.MULTI_PAGE_DRAWER)}}},[e._v(" "+e._s(e.$t("builder.editBlockButton.editNavigation"))+" ")]),n("ZyroButton",{directives:[{name:"qa",rawName:"v-qa",value:"builder-section-btn-changelogo",expression:"'builder-section-btn-changelogo'"}],staticClass:"edit-actions__button",attrs:{theme:"editor",title:e.$t("builder.editBlockButton.changeLogo")},on:{click:function(t){return e.$emit("edit-block",{tabId:"logo"})}}},[e._v(" "+e._s(e.$t("builder.editBlockButton.changeLogo"))+" ")]),e.isSiteWithEcwid?n("ZyroButton",{directives:[{name:"qa",rawName:"v-qa",value:"builder-section-btn-editcart",expression:"'builder-section-btn-editcart'"}],staticClass:"edit-actions__button",attrs:{theme:"editor",icon:"shopping-bag","icon-dimensions":"20px",title:e.$t("builder.editBlockButton.editShoppingCart")},on:{click:function(t){return e.$emit("edit-block",{tabId:"cart"})}}}):e._e(),n("ZyroButton",{directives:[{name:"qa",rawName:"v-qa",value:"builder-section-btn-editstyles",expression:"'builder-section-btn-editstyles'"}],staticClass:"edit-actions__button",attrs:{theme:"editor",icon:"styles-brush",title:e.$t("builder.editBlockButton.editStyles")},on:{click:function(t){return e.$emit("edit-block",{tabId:"style"})}}})]:e._e(),n("ZyroButton",{staticClass:"edit-actions__button",attrs:{"data-qa":"builder-section-btn-settings",theme:"editor",icon:"settings",title:e.title},on:{click:e.openBlockSettings}}),e.allowDuplication?n("ZyroButton",{staticClass:"edit-actions__button",attrs:{"data-qa":"builder-sectionedit-buttonduplicate",theme:"editor",icon:"duplicate",title:e.$t("common.duplicate")},on:{click:function(t){return e.$emit("duplicate-block")}}}):e._e(),e.allowSorting?n("ZyroButton",{staticClass:"edit-actions__button",attrs:{"data-qa":"builder-sectionedit-buttonsort",theme:"editor",icon:"refresh-icon",title:"Sort"},on:{click:function(t){return e.$emit("sort-block-components")}}}):e._e(),e.allowReordering?[n("ZyroButton",{directives:[{name:"qa",rawName:"v-qa",value:"builder-section-btn-moveup",expression:"'builder-section-btn-moveup'"}],staticClass:"edit-actions__button",attrs:{theme:"editor",icon:"arrow",title:e.$t("builder.editBlockButton.moveSectionUp"),disabled:!e.isMovingBlockUpAllowed},on:{click:function(t){return e.$emit("move-block-up")}}}),n("ZyroButton",{directives:[{name:"qa",rawName:"v-qa",value:"builder-section-btn-movedown",expression:"'builder-section-btn-movedown'"}],staticClass:"edit-actions__button",attrs:{theme:"editor",title:e.$t("builder.editBlockButton.moveSectionDown"),disabled:!e.isMovingBlockDownAllowed},on:{click:function(t){return e.$emit("move-block-down")}}},[n("template",{slot:"icon"},[n("ZyroSvg",{attrs:{name:"arrow",direction:"down"}})],1)],2)]:e._e(),e.allowRemoval?n("ZyroButton",{staticClass:"edit-actions__button",attrs:{"data-qa":"builder-sectionedit-buttondelete",theme:"editor",icon:"trash",title:e.$t("common.delete")},on:{click:function(t){return e.removeBlock(!1)}}}):e._e()],e.showLinkedActions?n("ZyroPopup",{attrs:{type:"editor",offset:{top:40,right:0},"show-close-button":!1},scopedSlots:e._u([{key:"trigger",fn:function(){return[n("ZyroButton",{attrs:{"data-qa":"builder-sectionedit-buttonlinked",theme:"primary",color:"plump-purple",icon:"link",title:e.$t("common.hide")}})]},proxy:!0}],null,!1,3749309556)},[n("div",{staticClass:"edit-actions__hide-block"},[n("ZyroButton",{attrs:{"icon-left":e.isLinkedBlockHidden?"eye-open":"eye-closed"},on:{click:function(t){return e.$emit("toggle-linked-block","footer",!1,e.isLinkedBlockHidden)}}},[e._v(" "+e._s(e.isLinkedBlockHidden?e.$t("builder.globalBlock.showOnSingle"):e.$t("builder.globalBlock.hideOnSingle"))+" ")]),n("ZyroButton",{attrs:{"icon-left":"eye-closed"},on:{click:function(t){return e.$emit("toggle-linked-block","footer",!0,!0)}}},[e._v(" "+e._s(e.$t("builder.globalBlock.hideOnAll"))+" ")]),n("ZyroButton",{attrs:{"icon-left":"eye-open"},on:{click:function(t){return e.$emit("toggle-linked-block","footer",!0,!1)}}},[e._v(" "+e._s(e.$t("builder.globalBlock.showOnAll"))+" ")])],1)]):e._e(),e.showRemoveWarning?n("SystemDialogModal",{attrs:{title:e.$t("builder.editBlockButton.deleteLinkedSection"),"primary-button-text":e.$t("common.delete"),"secondary-button-text":e.$t("common.cancel")},on:{"click-primary":function(t){return e.removeBlock(!0)},"click-secondary":function(t){e.showRemoveWarning=!1},close:function(t){e.showRemoveWarning=!1}}},[e._v(" "+e._s(e.$t("builder.editBlockButton.removeWarningText"))+" ")]):e._e()],2):e._e()},yt=[],wt=n("2d27"),At=n("0fba");const kt={BlockNavigation:X["a"].t("builder.editBlockButton.editHeader"),BlockBlogList:X["a"].t("builder.editBlockButton.editBlogList"),BlockBlogHeader:X["a"].t("builder.editBlockButton.editBlogHeader"),default:X["a"].t("builder.editBlockButton.editSection")},St={default:!0},Ct={BlockNavigation:!1,BlockBlogHeader:!1,default:!0},xt={BlockNavigation:!1,BlockBlogHeader:!1,BlockEcwidStore:!1,default:!0},Ot={BlockNavigation:!1,default:!0},Et={BlockNavigation:!1,default:!0},Mt={navigation:!1,default:!0},Bt={footer:!1,default:!0},Nt={footer:!0,default:!1},Tt={footer:!0,default:!1};var _t=n("4639"),It={components:{SystemDialogModal:_t["default"]},props:{position:{type:Object,required:!0},blockType:{type:String,required:!0},blockSlot:{type:String,required:!0},blockId:{type:String,required:!0},blockRef:{type:HTMLElement,required:!0},isLinkedBlockHidden:{type:Boolean,default:!1},isMovingBlockUpAllowed:{type:Boolean,required:!0},isMovingBlockDownAllowed:{type:Boolean,required:!0}},setup(e,t){const{currentSlideshowSlideName:n,goToPreviousSlideInCurrentActiveSlideshow:o,goToNextSlideInCurrentActiveSlideshow:r}=Object(At["a"])(e,t);return{MULTI_PAGE_DRAWER:d["h"],currentSlideshowSlideName:n,goToPreviousSlideInCurrentActiveSlideshow:o,goToNextSlideInCurrentActiveSlideshow:r}},data(){return{showRemoveWarning:!1}},computed:Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])({},Object(a["f"])(["website"])),Object(a["d"])("gui",["isMobileMode"])),Object(a["d"])("onlineStore",["isSiteWithEcwid"])),Object(a["d"])("subscription",["hasActiveEcommerceSubscription"])),{},{isBlockNavigation:({blockType:e})=>"BlockNavigation"===e,title(){return Object(rt["c"])(this.blockType,kt)},allowEditing(){return Object(rt["c"])(this.blockType,St)},allowRemoval(){return Object(rt["c"])(this.blockType,Ct)},allowReordering(){return Object(rt["c"])(this.blockType,Ot)},allowEditBackground(){return Object(rt["c"])(this.blockType,Et)},allowDuplication(){return Object(rt["c"])(this.blockType,xt)&&Object(rt["c"])(this.blockId,Mt)&&Object(rt["c"])(this.blockSlot,Bt)},showLinkedActions(){return Object(rt["c"])(this.blockSlot,Nt)},allowSorting(){return"BlockGrid"===this.blockType&&this.isMobileMode}}),methods:Object(i["a"])(Object(i["a"])({},Object(p["r"])({openModal:p["j"],openDrawer:p["i"]})),{},{removeBlock(e){Object(rt["c"])(this.blockSlot,Tt)&&!e?this.showRemoveWarning=!0:this.$emit("remove-block")},async openStoreSettings(){wt["a"].logEvent({eventName:"builder.storefront.click_button(manage_store)"}),this.hasActiveEcommerceSubscription?this.$router.push({name:Ce["n"]}):this.openModal({name:"EditOnlineStoreModal"})},openBlockSettings(){"BlockSlideshow"===this.blockType?this.$emit("edit-block",{startingPopupComponent:"EditBlockSlideshowSettingsTabs",tabId:"style"}):this.$emit("edit-block")},openBlockBackground(){"BlockSlideshow"===this.blockType?this.$emit("edit-block",{startingPopupComponent:"EditBlockSlideshowSlideBackground"}):this.$emit("edit-block",{tabId:"background"})}})},Rt=It,Pt=(n("12e0"),Object(g["a"])(Rt,bt,yt,!1,null,"87d54488",null)),Dt=Pt.exports,jt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n(e.currentEditor,{key:e.currentBlockId+"-for-transition",tag:"Component",staticClass:"edit-block-popup",style:e.position,attrs:{"start-tab-id":e.startTabId,"starting-popup-component":e.startingPopupComponent},on:{close:function(t){return e.$emit("close")}}})},zt=[],Lt=n("87e2");const $t={BlockNavigation:"EditBlockNavigationTabs",BlockSlideshow:"EditBlockSlideshow",BlockBlogList:"EditBlockBlogListTabs",BlockBlogHeader:"EditBlockBlogHeaderTabs",BlockEcwidStore:"EditBlockEcwidStoreTabs",default:"EditBlockTabs"};var Ft={components:{EditBlockTabs:()=>n.e("chunk-cec99a6c").then(n.bind(null,"40ed")),EditBlockNavigationTabs:()=>n.e("chunk-3191b775").then(n.bind(null,"6879")),EditBlockBlogListTabs:()=>Promise.all([n.e("chunk-2d0c0a73"),n.e("chunk-15487612"),n.e("chunk-cfbcbb82")]).then(n.bind(null,"e8a7")),EditBlockBlogHeaderTabs:()=>n.e("chunk-45c97941").then(n.bind(null,"ceab")),EditBlockEcwidStoreTabs:()=>n.e("chunk-8bf12b3c").then(n.bind(null,"4c4a")),EditBlockSlideshow:()=>n.e("chunk-2d22bef0").then(n.bind(null,"f0a1"))},props:{position:{type:Object,required:!0},startTabId:{type:String,default:""},startingPopupComponent:{type:String,default:null}},computed:Object(i["a"])(Object(i["a"])(Object(i["a"])({},Object(a["f"])(["currentBlockId"])),Object(a["d"])(["currentBlock"])),{},{currentEditor(){return Object(rt["c"])(this.currentBlock.type,$t)}}),created(){window.addEventListener("keydown",this.onEscapeClick)},beforeDestroy(){window.removeEventListener("keydown",this.onEscapeClick)},methods:{onEscapeClick(e){Object(Lt["b"])(e)===Lt["a"].Escape&&this.$emit("close")}}},Vt=Ft,Ht=(n("ccfe"),Object(g["a"])(Vt,jt,zt,!1,null,"69da6e1c",null)),Ut=Ht.exports,Wt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{key:e.blockId+"-section-control-transition",staticClass:"section-control",style:e.position,on:{click:function(t){return e.setElementEditMode(!1)}}},[n("div",{staticClass:"section-control__container",style:{maxWidth:e.maxWidth}},[n("AddBlockButton",{class:{"section-control__button--invisible":!e.displayAddBlock||e.activeEventInfo.blockId},attrs:{"block-id":e.blockId,"block-ref":e.blockRef}}),n("div",{staticClass:"section-control__resize-handle"},[n("ZyroTooltip",{attrs:{position:"top","toggle-event":"hover","hide-tooltip":e.blockIsLocked,"use-portal":!1,"content-position":"absolute","forced-position":{left:"-39px",bottom:"40px","white-space":"nowrap"}},scopedSlots:e._u([{key:"trigger",fn:function(){return[n("ResizeButtonHandle",{attrs:{"block-id":e.blockId,"block-ref":e.blockRef,"active-event-info":e.activeEventInfo},on:{"update:activeEventInfo":function(t){e.activeEventInfo=t},"update:active-event-info":function(t){e.activeEventInfo=t},"lock-hovered-block":function(t){e.blockIsLocked=t}}})]},proxy:!0}])},[n("p",{staticClass:"section-control__resize-handle-text z-body-small"},[e._v(" "+e._s(e.$t("builder.sectionControlLine.text"))+" ")])])],1)],1)])},qt=[],Jt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"add-block-button",on:{click:e.addSection}},[e.isMobileView||e.isMobileScreen?n("ZyroButton",{ref:"addSectionButton",attrs:{"data-qa":"builder-btn-addsection",theme:"primary",color:"blue",icon:"plus","aria-label":e.$t("common.addSection")}}):n("ZyroButton",{ref:"addSectionButton",attrs:{"data-qa":"builder-btn-addsection",theme:"primary",color:"blue","icon-left":"plus"}},[e._v(" "+e._s(e.$t("common.addSection"))+" ")])],1)},Kt=[],Gt={props:{blockId:{type:String,default:null},blockRef:{type:HTMLElement,default:null}},data(){return{eventInfo:null}},computed:Object(i["a"])({},Object(a["f"])("gui",["isMobileView","isMobileScreen"])),methods:Object(i["a"])(Object(i["a"])({},Object(p["r"])({openModal:p["j"]})),{},{addSection(){this.openModal({name:"AddBlockModal",settings:{previousBlockId:this.blockId,previousBlockRef:this.blockRef}}),this.$refs.addSectionButton.$el.blur(),wt["a"].logEvent({eventName:"user.openBlockLibrary"})}})},Yt=Gt,Zt=(n("0c4b"),Object(g["a"])(Yt,Jt,Kt,!1,null,"e5260b42",null)),Qt=Zt.exports,Xt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.isResizeBlockHandleVisible?n("button",{ref:"resizeButton",staticClass:"resize-handle",style:{"--resize-handle-color":e.activeEventInfo.outlineColor},on:{mousedown:e.startSectionResize}},[n("ZyroSvg",{staticClass:"resize-handle__icon",class:{"resize-handle__icon--disabled":e.minimumHeightReached},attrs:{name:"chevron",direction:"up"}}),n("ZyroSvg",{attrs:{name:"chevron",direction:"down"}})],1):e._e()},en=[];n("5db7"),n("73d9");const tn=()=>Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight);var nn=n("ebdb"),on=n("9361");const rn=100,sn=10,an=5;var cn={props:{blockId:{type:String,required:!0},blockRef:{type:HTMLElement,required:!0},activeEventInfo:{type:Object,default:()=>{}}},data(){return{eventInfo:null,minimumHeightReached:!1,currentBlockBeforeEdit:null,autoResizeInterval:null}},computed:Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])({},Object(a["f"])(["website"])),Object(a["f"])("gui",["mobilePreviewRef"])),Object(a["d"])(["siteElements","siteBlocks"])),Object(a["d"])("gui",["isMobileMode"])),{},{blockData(){return this.siteBlocks[this.blockId]},distanceBetweenButtonAndHandle(){return-(this.eventInfo.y-this.eventInfo.currentMouseMoveClientY)},shouldScrollUp(){const e=this.eventInfo.currentMouseMoveClientYdocument.documentElement.clientHeight-rn,t=this.distanceBetweenButtonAndHandle>0;return e&&t},shouldScroll(){return this.shouldScrollUp||this.shouldScrollDown},autoResizeAmount(){return this.shouldScrollDown?an:-an},distanceMoved(){return this.distanceBetweenButtonAndHandle+(this.shouldScroll?this.autoResizeAmount:0)},sizeDifference(){return this.distanceMoved+this.eventInfo.buttonMovedByScroll},calculatedHeight(){return this.eventInfo.originalHeightPx+this.sizeDifference},currentBlockHeightInPx(){return"".concat(Math.max(this.calculatedHeight,this.eventInfo.minimumHeight),"px")},isResizeBlockHandleVisible(){return("BlockGrid"===this.blockData.type||"BlockSlideshow"===this.blockData.type)&&!this.isMobileMode},isBlockSlideshow(){return"BlockSlideshow"===this.siteBlocks[this.blockId].type},blockSlideshowComponents(){return this.siteBlocks[this.blockId].slides.flatMap(e=>this.siteBlocks[e.blockId].components)}}),watch:{minimumHeightReached(e){this.eventInfo&&(e?this.eventInfo.lastElementId?this.$emit("update:activeEventInfo",{blockId:this.eventInfo.id,elementId:this.eventInfo.lastElementId,outlineColor:"var(--secondary)"}):this.$emit("update:activeEventInfo",{blockId:this.eventInfo.id,outlineColor:"var(--secondary)"}):this.$emit("update:activeEventInfo",{blockId:this.eventInfo.id}))}},methods:Object(i["a"])(Object(i["a"])({},Object(a["e"])(["setBlockData","pushBlockDataToHistory"])),{},{getNewSectionHeight(e){const{originalHeight:t,rowHeight:n,rowGap:o}=this.eventInfo,r=Math.round(e/(n+o));return t+r},resetAutoScrollInterval(){clearInterval(this.autoResizeInterval),this.autoResizeInterval=null},startSectionResize(e){this.currentBlockBeforeEdit=Object(rt["a"])(this.blockData);const t=e=>Number.parseInt(e,10),{settings:n,background:o={}}=this.blockData,r=this.isBlockSlideshow?this.blockSlideshowComponents:this.blockData.components,{styles:i}=n,s=Object(on["a"])(i["block-padding"]||"0px"),a=t(s.bottom),c=t(s.top),l=t(i["row-size"]),u=t(i["row-gap"]),d=window.pageYOffset;let p=null,h=2,f=null;const m=r.filter(e=>e in this.siteElements);r.length>0?(p=m.map(e=>{const{position:t}=this.siteElements[e].settings.styles;return{endsAt:Number.parseInt(t.split("/")[2],10),componentId:e}}),h=Math.max(...p.map(e=>e.endsAt),2),f=p.find(e=>e.endsAt===h).componentId):o.current||(h=9);const g=(l+u)*(h-1)-u+a+c,v=Math.max(i.rows||0,h-1);this.eventInfo={y:e.clientY,yPrev:e.clientY,id:this.blockId,currentMouseMoveClientY:null,originalHeightPx:Number.parseInt(this.blockRef.clientHeight,10),originalHeight:v,lastEndPosition:h,lastElementId:f,previousHeight:v,minimumHeight:g,rowHeight:l,rowGap:u,scrollTop:d,buttonMovedByScroll:0},window.addEventListener("mousemove",this.controlSectionResizing),window.addEventListener("mouseup",this.stopResizingSection),this.$emit("update:activeEventInfo",{blockId:this.eventInfo.id}),this.$emit("lock-hovered-block",!0)},controlSectionResizing(e){this.eventInfo.currentMouseMoveClientY=e.clientY,this.resetAutoScrollInterval(),this.shouldScroll?this.autoResizeInterval=setInterval(()=>{this.shouldScroll?this.resizeSection():this.resetAutoScrollInterval()},sn):this.resizeSection()},resizeSection(){this.animateButton(),this.scrollPage({shouldScroll:this.shouldScroll,scrollByAmount:this.autoResizeAmount}),this.blockRef.style.setProperty("--block-height",this.currentBlockHeightInPx),this.minimumHeightReached=this.eventInfo.minimumHeight>=this.calculatedHeight;const e=this.getNewSectionHeight(this.sizeDifference);e!==this.eventInfo.previousHeight&&(nn["a"]||this.updateSectionHeight(e),this.eventInfo.previousHeight=e)},stopResizingSection(){window.removeEventListener("mousemove",this.controlSectionResizing),window.removeEventListener("mouseup",this.stopResizingSection),this.resetAutoScrollInterval(),this.pushBlockDataToHistory({blockId:this.eventInfo.id,oldData:this.currentBlockBeforeEdit}),this.mobilePreviewRef.style.paddingBottom&&(this.mobilePreviewRef.style.setProperty("padding-bottom",""),window.scrollTo(0,document.body.scrollHeight)),this.$refs.resizeButton&&this.$refs.resizeButton.style.setProperty("--moved-y",""),this.blockRef.style.setProperty("--block-height",""),nn["a"]&&this.updateSectionHeight(this.eventInfo.previousHeight),this.eventInfo=null,this.$emit("update:activeEventInfo",{}),this.$emit("lock-hovered-block",!1)},animateButton(){const e=this.eventInfo.currentMouseMoveClientY>=this.eventInfo.yPrev?an:-an;this.$refs.resizeButton&&this.$refs.resizeButton.style.setProperty("--moved-y","".concat(e,"px")),Math.abs(this.eventInfo.currentMouseMoveClientY-this.eventInfo.yPrev)>an&&(this.eventInfo.yPrev=this.eventInfo.currentMouseMoveClientY)},updateSectionHeight(e){this.setBlockData({blockId:this.eventInfo.id,data:{settings:{styles:{rows:Math.max(e,this.eventInfo.lastEndPosition-1)}}}})},scrollPage({shouldScroll:e,scrollByAmount:t}){this.isBrowserWindowAtTheBottomOfTheScreen()&&this.mobilePreviewRef.style.setProperty("padding-bottom","".concat(tn(),"px")),e&&!this.minimumHeightReached&&(window.scrollBy(0,t),this.eventInfo.buttonMovedByScroll=-(this.eventInfo.scrollTop-window.pageYOffset))},isBrowserWindowAtTheBottomOfTheScreen(){const{pageYOffset:e}=window,{body:t,documentElement:n}=document,{scrollTop:o,clientHeight:r}=n;return 0!==e&&Math.max(e,o,t.scrollTop)+r===tn()}})},ln=cn,un=(n("1f45"),Object(g["a"])(ln,Xt,en,!1,null,"15e91ef1",null)),dn=un.exports,pn={components:{ResizeButtonHandle:dn,AddBlockButton:Qt},props:{position:{type:Object,required:!0},blockId:{type:String,required:!0},blockRef:{type:HTMLElement,required:!0},displayAddBlock:{type:Boolean,default:!0}},data(){return{blockIsLocked:!1,activeEventInfo:{}}},computed:Object(i["a"])(Object(i["a"])({},Object(a["d"])(["siteBlocks"])),{},{maxWidth(){return"BlockGrid"===this.siteBlocks[this.blockId]?this.siteBlocks[this.blockId].settings.styles["grid-width"]:"1200px"}}),watch:{blockIsLocked(e){this.$emit("lock-hovered-block",e)},activeEventInfo(e){this.$emit("update:activeEventInfo",e)}},methods:Object(i["a"])({},Object(a["c"])("gui",["setElementEditMode"]))},hn=pn,fn=(n("4230"),Object(g["a"])(hn,Wt,qt,!1,null,"861b9e7c",null)),mn=fn.exports,gn=n("4a3e"),vn={components:{SectionControlLine:mn,EditBlockButton:Dt,EditBlockPopup:Ut},inheritAttrs:!1,props:{component:{type:String,required:!0},blockId:{type:String,required:!0},blockRef:{type:HTMLElement,required:!0},blockType:{type:String,required:!0}},data(){return{position:{},resizeObserver:null}},computed:Object(i["a"])(Object(i["a"])(Object(i["a"])({},Object(a["f"])("gui",["mobilePreviewRef","desktopPreviewRef","isMobileView"])),Object(a["d"])("gui",["isMobileMode"])),Object(a["d"])(["currentBlock"])),watch:{blockRef(e){this.computeBlockEditorPosition(e)}},mounted(){this.resizeObserver=new ResizeObserver(()=>this.computeBlockEditorPosition(this.blockRef)),this.resizeObserver.observe(this.mobilePreviewRef),this.computeBlockEditorPosition(this.blockRef)},beforeDestroy(){this.resizeObserver.unobserve(this.mobilePreviewRef),this.resizeObserver=null},methods:{computeBlockEditorPosition(e){if(!e)return;const t=gn["a"].getElementOffset(e,this.isMobileView?this.mobilePreviewRef:this.desktopPreviewRef),n=80,o=15,r=60,i=()=>{const e=this.isMobileView?"".concat(t.top+t.height-this.$refs.componentRoot.$el.clientHeight,"px"):"".concat(t.top+(t.height>r?t.height:r)-o-this.$refs.componentRoot.$el.clientHeight,"px"),i="".concat(t.right+n,"px");this.position={top:e,right:i}},s=()=>{const e=t.top-o-35,r=this.isMobileView&&e>0?"".concat(e,"px"):"".concat(t.top+o,"px"),i=this.isMobileView?0:"".concat(t.right+n,"px"),s=this.isMobileView?0:"unset";this.position={top:r,right:i,left:s}};switch(this.component){case"SectionControlLine":{const e="".concat(t.top+t.height-1-this.$refs.componentRoot.$el.clientHeight/2,"px");this.position={top:e};break}case"EditBlockButton":switch(this.blockType){case"BlockNavigation":this.isMobileMode?s():i();break;default:s();break}break;case"EditBlockPopup":{if(this.isMobileView){s(),this.position.left="".concat(this.mobilePreviewRef.clientWidth+n/2,"px");break}const e={top:"".concat(t.top+t.height+14,"px"),right:"".concat(t.right+this.isMobileView?0:n,"px")};switch(this.currentBlock.type){case"BlockNavigation":this.position={top:e.top,right:e.right};break;case"BlockBlogHeader":this.position={top:e.top,right:e.right};break;default:{const e=580,o=document.body.scrollHeight-t.top"footer"===this.siteBlocks[e].slot);return e?[e]:[]},allBlocks(){return[...this.pageBlocks,...this.pageBlocksSlotFooter]},currentPageWithId(){return Object(i["a"])(Object(i["a"])({},this.currentPage),{},{pageId:this.currentPageId})}}),watch:{currentPageWithId:{deep:!0,async handler(e,t){if(this.resetHoveredBlock(),e.pageId!==t.pageId)return;const n=e.blocks.find(e=>!t.blocks.includes(e));n&&(await this.$nextTick(),this.getBlockRef(n).scrollIntoView({behavior:"smooth",block:"center"}))}},blockEditorOpen(e){this.activeEventInfo={blockId:e?this.selectedBlockId:null}}},mounted(){this.setRef({el:"mobilePreviewRef",ref:this.$refs.mobilePreview}),this.setElementEditMode(!1)},methods:Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])({},Object(a["e"])("gui",["setRef"])),Object(a["e"])(["setCurrentBlock","setBlockData","unsetCurrentElement"])),Object(a["c"])(["duplicateBlock","removeBlock"])),Object(a["c"])("pages",["changePage","setPageData"])),Object(a["c"])("gui",["setElementEditMode"])),{},{setDraggedOverBlock({blockId:e,isDraggedOver:t}){this.draggedOverBlockId=t?e:""},getIsBlockHovered(e){var t;return(null===(t=this.hoveredBlock)||void 0===t?void 0:t.id)===e},getBlockRef(e){var t,n;const o=["navigation","footer"];return o.includes(e)?null===(t=this.$refs["".concat(e,"-ref")])||void 0===t?void 0:t.$el:null===(n=this.$refs["".concat(e,"-ref")][0])||void 0===n?void 0:n.$el},handleBlockHover(e){this.lockHoveredBlock||(this.hoveredBlock={id:e,ref:this.getBlockRef(e),type:this.siteBlocks[e].type,slot:this.siteBlocks[e].slot})},handleBlockSelect(e){this.lockHoveredBlock||(this.selectedBlockId=e,this.selectedBlockRef=this.getBlockRef(e),this.setCurrentBlock({blockId:this.selectedBlockId,blockRef:this.selectedBlockRef}),this.selectedBlockType=this.siteBlocks[e].type,this.selectedBlockSlot=this.siteBlocks[e].slot)},resetHoveredBlock(){this.selectedBlockId=null,this.selectedBlockRef=null,this.selectedBlockType=null,this.selectedBlockSlot=null,this.hoveredBlock=null},closeBlockEditor(){this.blockEditorOpen=!1,this.defaultBlockEditTab=""},onEditBlock(e){this.editBlockStartingPopupComponent=(null===e||void 0===e?void 0:e.startingPopupComponent)||null,this.selectedBlockId!==this.currentBlockId?(this.setHoveredBlockAsCurrent(),this.blockEditorOpen=!0):this.blockEditorOpen=!this.blockEditorOpen,this.setElementEditMode(!1),this.defaultBlockEditTab=(null===e||void 0===e?void 0:e.tabId)||""},setHoveredBlockAsCurrent(){this.setCurrentBlock({blockId:this.selectedBlockId,blockRef:this.selectedBlockRef})},async onDuplicateBlock(){this.setHoveredBlockAsCurrent(),this.setElementEditMode(!1),this.closeBlockEditor(),this.duplicateBlock({addToPage:!0}),await this.$nextTick()},onToggleLinkedBlock(e,t,n){const o="".concat(e,"SlotIsHidden");if(t)Object.keys(this.sitePages).forEach(e=>{this.setPageData({type:"default",payload:{data:{[o]:n},pageId:e}})});else{const e=this.currentPage[o];this.setPageData({type:"default",payload:{data:{[o]:!e}}})}},isBlockHidden(e){return this.siteBlocks[e].isHidden||"footer"===this.siteBlocks[e].slot&&this.currentPage.footerSlotIsHidden},isMovingBlockUpAllowed(e){const t=this.pageBlocks.indexOf(e);return 0!==t&&-1!==t},isMovingBlockDownAllowed(e){const t=this.pageBlocks.indexOf(e);return t!==this.pageBlocks.length-1&&-1!==t},setPageBlocks(e){this.setPageData({type:"default",payload:{data:{blocks:e}}})},onMoveBlockUp(e){this.setPageBlocks(Object(En["f"])(this.pageBlocks,e)),this.onAfterSectionReorder(e)},onMoveBlockDown(e){this.setPageBlocks(Object(En["g"])(this.pageBlocks,e)),this.onAfterSectionReorder(e)},async onAfterSectionReorder(e){await this.$nextTick(),this.handleBlockSelect(e),await this.$nextTick();const t=-150,n=this.selectedBlockRef.getBoundingClientRect().top+window.pageYOffset+t;window.scrollTo({top:n,behavior:"smooth"})},onSortBlockComponents(){this.setHoveredBlockAsCurrent();const e=this.currentBlock.components.map(e=>{const{position:t}=this.siteElements[e].settings.styles;return{position:t,componentId:e}});e.sort((e,t)=>{const n=e.position.split("/").map(e=>Number.parseInt(e,10)),o=t.position.split("/").map(e=>Number.parseInt(e,10));return n[2]>o[2]?1:n[2]o[3]?1:n[3]e.componentId);this.currentBlock.components=t},onRemoveBlock(){this.setHoveredBlockAsCurrent(),this.setElementEditMode(!1),this.closeBlockEditor(),this.isTransitioning=!0,Fe["a"].to(this.currentBlockRef,{height:0,duration:Mn/1e3,onComplete:()=>{this.isTransitioning=!1,this.removeBlock({blockId:this.currentBlockId}),this.resetHoveredBlock()}})},getTransparentBlockStyle(e){return 0===e&&this.headerBlock.background.isTransparent?{"--header-height":"".concat(this.headerHeight,"px")}:null}})},Nn=Bn,Tn=(n("5cb7"),Object(g["a"])(Nn,Le,$e,!1,null,"a0137ea8",null)),_n=Tn.exports,In=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ContextMenu",{attrs:{"is-rendering-allowed":!!e.rightClickedElementId},on:{"close-context-menu":function(t){e.rightClickedElementId=null}}},[n("ContextMenuButton",{attrs:{title:e.$t("builder.contextMenu.gridItem.cut"),shortcut:{mac:"⌘ X",windows:"Ctrl+X"}},nativeOn:{click:function(t){e.closeContextMenu(),e.cutElement()}}}),n("ContextMenuButton",{attrs:{title:e.$t("builder.contextMenu.gridItem.copy"),shortcut:{mac:"⌘ C",windows:"Ctrl+C"}},nativeOn:{click:function(t){e.closeContextMenu(),e.copyElement()}}}),n("ContextMenuButton",{attrs:{title:e.$t("common.duplicate"),shortcut:{mac:"⌘ D",windows:"Ctrl+D"}},nativeOn:{click:function(t){e.closeContextMenu(),e.duplicateCurrentElement()}}}),n("ZyroSeparator"),n("ContextMenuButton",{attrs:{title:e.$t("builder.contextMenu.gridItem.sendFront"),shortcut:{mac:"⌥ ⌘ ]",windows:"Ctrl+Shift+]"},disabled:e.isElementZindexMax},nativeOn:{click:function(t){e.closeContextMenu(),e.updateZIndex({shouldMoveLeft:!1,shouldMoveFully:!0})}}}),n("ContextMenuButton",{attrs:{title:e.$t("builder.contextMenu.gridItem.moveForward"),shortcut:{mac:"⌘ ]",windows:"Ctrl+]"},disabled:e.isElementZindexMax},nativeOn:{click:function(t){e.closeContextMenu(),e.updateZIndex({shouldMoveLeft:!1,shouldMoveFully:!1})}}}),n("ContextMenuButton",{attrs:{title:e.$t("builder.contextMenu.gridItem.sendBack"),shortcut:{mac:"⌥ ⌘ [",windows:"Ctrl+Shift+["},disabled:e.isElementZindexMin},nativeOn:{click:function(t){e.closeContextMenu(),e.updateZIndex({shouldMoveLeft:!0,shouldMoveFully:!0})}}}),n("ContextMenuButton",{attrs:{title:e.$t("builder.contextMenu.gridItem.moveBackward"),shortcut:{mac:"⌘ [",windows:"Ctrl+["},disabled:e.isElementZindexMin},nativeOn:{click:function(t){e.closeContextMenu(),e.updateZIndex({shouldMoveLeft:!0,shouldMoveFully:!1})}}}),n("ZyroSeparator"),n("ContextMenuButton",{attrs:{title:e.$t("common.delete"),shortcut:{mac:"⌫",windows:"Backspace"}},nativeOn:{click:function(t){e.closeContextMenu(),e.removeCurrentElement()}}})],1)},Rn=[],Pn=n("8ad7"),Dn=n("cfd4"),jn=n("87b8"),zn=n("64a0"),Ln={components:{ContextMenu:jn["a"],ContextMenuButton:zn["a"]},setup(){const{rightClickedElementId:e,copiedElementId:t,isElementCut:n}=Object(Dn["a"])(),{closeContextMenu:o}=Object(Pn["a"])();return{rightClickedElementId:e,copiedElementId:t,isElementCut:n,closeContextMenu:o}},computed:Object(i["a"])(Object(i["a"])({},Object(a["d"])(["currentElementBlockId","currentElement","siteBlocks"])),{},{blockZIndexes(){var e;return(null===(e=this.siteBlocks[this.currentElementBlockId])||void 0===e?void 0:e.zindexes)||[]},isElementZindexMax(){return this.blockZIndexes[this.blockZIndexes.length-1]===this.rightClickedElementId},isElementZindexMin(){return this.blockZIndexes[0]===this.rightClickedElementId}}),watch:{currentElement(){this.rightClickedElementId=null,this.closeContextMenu()}},methods:Object(i["a"])(Object(i["a"])(Object(i["a"])({},Object(a["e"])(["setBlockData"])),Object(a["c"])(["duplicateCurrentElement","removeCurrentElement"])),{},{cutElement(){this.copiedElementId=this.rightClickedElementId,this.isElementCut=!0},copyElement(){this.copiedElementId=this.rightClickedElementId,this.isElementCut=!1},updateZIndex(e){const{shouldMoveLeft:t=!1,shouldMoveFully:n=!1}=e,o=t?Object(En["e"])(this.blockZIndexes,this.rightClickedElementId,n):Object(En["h"])(this.blockZIndexes,this.rightClickedElementId,n);this.setBlockData({blockId:this.currentElementBlockId,data:{zindexes:o},skipHistory:!1})}})},$n=Ln,Fn=Object(g["a"])($n,In,Rn,!1,null,null,null),Vn=Fn.exports,Hn=n("c7d1"),Un=n("d363");const Wn=()=>{const e=navigator.userAgent;let t,n=e.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(n[1])?(t=/\brv[ :]+(\d+)/g.exec(e)||[],{name:"IE",version:t[1]||""}):"Chrome"===n[1]&&(t=e.match(/\bOPR|Edge\/(\d+)/),null!=t)?{name:"Opera",version:t[1]}:(n=n[2]?[n[1],n[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(t=e.match(/version\/(\d+)/i))&&n.splice(1,1,t[1]),{name:n[0],version:n[1]})};var qn={components:{BuilderPreview:_n,BuilderSidebar:ze,BuilderDrawers:b,BuilderMobileFrame:L["a"],BuilderSafariDisclaimerRibbon:U,ContextMenuGridElement:Vn,BuilderHeatmap:z,Toast:y["a"]},setup(){const{redirectToWWW:e}=Object(Un["a"])(),{isTextEditMode:t}=Object(Hn["a"])();return{redirectToWWW:e,isTextEditMode:t}},data(){return{isToastVisible:!1,isSafariDisclaimerRibbonVisible:!1}},computed:Object(i["a"])(Object(i["a"])(Object(i["a"])({},Object(a["f"])(["website","domain"])),Object(a["f"])("gui",["isMobileView","isMobileScreen","isSidebarOpen","isHeatmapOpen"])),Object(a["d"])("subscription",["hasActiveSubscription"])),beforeMount(){this.website.forms||s["default"].set(this.website,"forms",{}),this.handleSafariDisclaimer()},async mounted(){window.addEventListener("keydown",this.handleUndoRedo),window.addEventListener("keydown",this.handleDeleteElement),this.setRef({el:"desktopPreviewRef",ref:this.$refs.desktopPreview}),this.hasActiveSubscription||this.domain||null!==window.sessionStorage.getItem("was-pay-to-publish-toast-displayed")||(this.isToastVisible=!0)},beforeDestroy(){window.removeEventListener("keydown",this.handleUndoRedo),window.removeEventListener("keydown",this.handleDeleteElement)},methods:Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])({},Object(a["e"])("undoRedo",["undoWebsite","redoWebsite"])),Object(a["e"])("gui",["setRef"])),Object(p["r"])({openModal:p["j"]})),{},{hideToast(){window.sessionStorage.setItem("was-pay-to-publish-toast-displayed",!0),this.isToastVisible=!1},handleUndoRedo(e){if(!this.isTextEditMode)return(e.ctrlKey||e.metaKey)&&e.shiftKey&&Object(Lt["b"])(e)===Lt["a"].KeyZ||e.ctrlKey&&Object(Lt["b"])(e)===Lt["a"].KeyY?(e.preventDefault(),void this.redoWebsite()):void((e.ctrlKey||e.metaKey)&&Object(Lt["b"])(e)===Lt["a"].KeyZ&&(e.preventDefault(),this.undoWebsite()))},handleSafariDisclaimer(){const e=Wn();"Safari"===e.name&&Number(e.version)<14&&(this.isSafariDisclaimerRibbonVisible=!0)}})},Jn=qn,Kn=(n("a1806"),Object(g["a"])(Jn,o,r,!1,null,"5f8ef227",null));t["a"]=Kn.exports},d2d2:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAOCAYAAADABlfOAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAC+SURBVHgB5ZOxDcIwEEX/JSZRWmpKJAagzgAMkAWoGIUVWAMYAJQZUoQqRVoQoQiKndhYpPe5gALxG8vS+7bu/h2Z3dLgs6oCfEG/86jAfMVCGgZKE+LQXrgEiEDGysU0TYc8ryEigcf9iSxbWB+5LHxQZXmDUgOO+wuSRKAorpyF72nbqvcp5YCxKH4CSRvtpLqux/lUIwxCRDEhTWds+bQ5rD2+BnppMIkCMBFYlCqabuM/3igBnzhHkSeHF0d9Qx9podLVAAAAAElFTkSuQmCC"},d2f9:function(e,t,n){"use strict";n("7039")},d7ac:function(e,t,n){"use strict";n("62f8")},d826:function(e,t,n){"use strict";n("fffd")},d954:function(e,t,n){},db09:function(e,t,n){},e3db2:function(e,t,n){var o={"./ar.png":"ccf8","./au.png":"6a7d","./bo.png":"ed09","./br.png":"82e2","./ca.png":"0cf4","./cl.png":"1e75","./co.png":"56ea","./de.png":"8312","./ec.png":"644f","./en.png":"805d","./es.png":"655b","./fr.png":"709e","./id.png":"8ec7","./in.png":"d2d2","./it.png":"ac62","./lt.png":"57e3","./mx.png":"10b5","./nl.png":"767c","./pe.png":"67b4","./pl.png":"fb8f","./pt.png":"ff46","./ru.png":"ff60","./tr.png":"1eb4","./uk.png":"0087","./uy.png":"567a","./ve.png":"3bec","./vn.png":"b5a7"};function r(e){var t=i(e);return n(t)}function i(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id="e3db2"},e578:function(e,t,n){"use strict";n("1e0e")},e8cf:function(e,t,n){},ea1f:function(e,t,n){"use strict";n("11364")},ebdb:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));const o=void 0!==window.safari},ec78:function(e,t,n){"use strict";n.r(t);var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.info?n("div",{staticClass:"grid-ghost",style:e.computedStyles},[e.info.title?n("OverlayPill",{attrs:{"disable-pill-overflow":e.disablePillOverflow,text:e.info.title}}):e._e()],1):e._e()},r=[],i=n("0b7b"),s={components:{OverlayPill:i["a"]},props:{info:{validator:e=>"object"===typeof e||null===e,required:!0},disablePillOverflow:{type:Boolean,default:!1}},computed:{computedStyles(){const{y1:e,x1:t,y2:n,x2:o,color:r}=this.info;return{"--position":"".concat(e,"/").concat(t,"/").concat(n,"/").concat(o),"--outline-color":r}}}},a=s,c=(n("e578"),n("2877")),l=Object(c["a"])(a,o,r,!1,null,"303483c3",null);t["default"]=l.exports},ed09:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAcCAYAAAATFf3WAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAIDSURBVHgB7ZZNaxNRFIafmdzJTDqxTT9i20ix2CIurOA/EBeCUFSQgj/Af+DenQu36sqFILjvzg8oUhCVUt3YaKCGIjZtSE3STjBJk0nmdtJJ6bpzN7PIs7lnFgPvnPfMe4+2CpIIoxNxxElxiWix1T8j38GBQFUGAlWJfsxYj4MicR4ltg8E6WQXS0h2a4LMcAcVrL3gFOJmUBghgtDzwHV9E/Q075bnSEmHtS8d7iyNM7Wwjq73DGpjiLNfVqIfhEoW1+uCwso47X9N5vd/8ac0weZ2jf+uS8ex2F0ept6wUSG0wEbT5O9KGp5WafyscWjPsTF1i/TiQ6xuhloujva6QuFjArejEZbQAocSLfTvJWTGo3hZ8IpJXt7O8uLeZ57kEuxddGjHPbyv1VAWnyBQwMxL2oYkV46TjI2xmXtLvmlgyhl+VwRXkx1GCh4qKM2gNiqRFZhJGIwlU2Tjd3n2w2Z21OaCZULT3+WE2janJPDcoi8yC9PFLpM767z55CG9G1wvfyC9I9HX/FFYQgnt22qwsM6HiBnH0dl6H6OUG6K1oOHGLJLxQ6r7EnvDYPbaAVfudzHNs3cx348Z7dFz+/jtielwzXT9PDb6kyx7lrZ8W1LBcy8n9ZAelYvB7Go8yASfN2IQKRz3+BgsC6oMBKoyEKjK6V3c/62jRuQ7eAT/V6VaON0WEgAAAABJRU5ErkJggg=="},ed57:function(e,t,n){},f797:function(e,t,n){"use strict";n("9f51")},f95e:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return u})),n.d(t,"e",(function(){return d}));var o=n("5313"),r=n("0ac0"),i=function(e,t){this.match=e,this.handler="string"==typeof t?s(t):t};function s(e){return function(t,n,o,r){var i=e;if(n[1]){var s=n[0].lastIndexOf(n[1]);i+=n[0].slice(s+n[1].length),o+=s;var a=o-r;a>0&&(i=n[0].slice(s-a,s)+i,o=r)}return t.tr.insertText(i,o,r)}}var a=500;function c(e){var t=e.rules,n=new o["Plugin"]({state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(this);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:function(e,o,r,i){return l(e,o,r,i,t,n)},handleDOMEvents:{compositionend:function(e){setTimeout((function(){var o=e.state.selection,r=o.$cursor;r&&l(e,r.pos,r.pos,"",t,n)}))}}},isInputRules:!0});return n}function l(e,t,n,o,r,i){if(e.composing)return!1;var s=e.state,c=s.doc.resolve(t);if(c.parent.type.spec.code)return!1;for(var l=c.parent.textBetween(Math.max(0,c.parentOffset-a),c.parentOffset,null,"")+o,u=0;u=0;c--)s.step(a.steps[c].invert(a.docs[c]));if(i.text){var l=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,e.schema.text(i.text,l))}else s.delete(i.from,i.to);t(s)}return!0}}return!1}new i(/--$/,"—"),new i(/\.\.\.$/,"…"),new i(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“"),new i(/"$/,"”"),new i(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘"),new i(/'$/,"’");function d(e,t,n,o){return new i(e,(function(e,i,s,a){var c=n instanceof Function?n(i):n,l=e.tr.delete(s,a),u=l.doc.resolve(s),d=u.blockRange(),p=d&&Object(r["i"])(d,t,c);if(!p)return null;l.wrap(d,p);var h=l.doc.resolve(s-1).nodeBefore;return h&&h.type==t&&Object(r["f"])(l.doc,s-1)&&(!o||o(i,h))&&l.join(s-1),l}))}function p(e,t,n){return new i(e,(function(e,o,r,i){var s=e.doc.resolve(r),a=n instanceof Function?n(o):n;return s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),t)?e.tr.delete(r,i).setBlockType(r,r,t,a):null}))}},fb8f:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAOCAYAAADNGCeJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAA3SURBVHgB7ZOxDQBACALx4wo/jru6mLMoQ5DYeAntNYA1gYZ8EHKyZZnXDygwLuwKWJY5ozp6D9oBCejWT3W5AAAAAElFTkSuQmCC"},fbd3:function(e,t,n){},fc44:function(e,t,n){},ff46:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAOCAYAAADNGCeJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAEiSURBVHgBvZI7SMNQGEZPHmrA1EARiojg1MWCIoKPQRdB3JwcBN3s5uLo5uDs7CYujiLi5ODgA6SDiosPHEoFC9XGCsZIbdPbqUOa3FBKz3S5/Bz+x6eQxiOAnQylrVssorGv0kY6I+vvBSshHjEiozf7XE6ZLCTijE94ZnlSQbv/QD12CN5ugGx1CvZG4hi7McpJS9Of34W9BwpCdhUu8405NgSvbwqF2RWOZg6wp5fgTJSlkOKTFX/g/OkfcjbdXQrq4xfegAF9UpdfdpcTTSwW0ZwT5rfTmPolbNhwI3X5d3b6IJowfknOZVkbdSvDn3lN3fyDC6mr+TUPM3Why+BL1lm/FuEoEYnAnH274oB5qlFFobJWqI8ZFkUPaVQbtTXJfUt+19gAxwAAAABJRU5ErkJggg=="},ff60:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAOCAYAAADNGCeJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABTSURBVHgBzdJBDYBAEEPRP2RM4QJRCNkTF+64wAI2CFmSQlZDD/MENE3a0A+PNmFUNyzbceHwdBHMm2eAiMIDZOAicr13HF6SXPqJhUqfllHQQh9R3BWjxtYMUAAAAABJRU5ErkJggg=="},fffd:function(e,t,n){}}]); //# sourceMappingURL=chunk-524df97c.bd105fce.js.map